Skip to content

Commit

Permalink
Fix to unit handling for operate-type keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Mar 5, 2024
1 parent f621d6a commit 2c75853
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/InputParser/keywords/special.jl
Original file line number Diff line number Diff line change
Expand Up @@ -307,14 +307,14 @@ function apply_equals!(target, constval, I, J, K, dims)
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:MAXVALUE})
edit_apply_clamping!(f, outer_data, min)
edit_apply_clamping!(f, outer_data, units, min)
end

function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:MINVALUE})
edit_apply_clamping!(f, outer_data, max)
edit_apply_clamping!(f, outer_data, units, max)
end

function edit_apply_clamping!(f, outer_data, FUNCTION)
function edit_apply_clamping!(f, outer_data, units, FUNCTION)
rec = read_record(f)
l, u = outer_data["GRID"]["CURRENT_BOX"]
dims = outer_data["GRID"]["cartDims"]
Expand Down
4 changes: 3 additions & 1 deletion src/InputParser/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,9 @@ function unit_type(x::Symbol)
end

function unit_type(::Val{k}) where k
@warn "Unit type not defined for $k."
if !(k in (:FIPNUM, :EQLNUM, :PVTNUM, :SATNUM, :EQLNUM))
@warn "Unit type not defined for $k."
end
return :id
end

Expand Down

0 comments on commit 2c75853

Please sign in to comment.