Skip to content

Commit

Permalink
Parse FLUXNUM
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Apr 29, 2024
1 parent 3059bf2 commit f12a9e5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
21 changes: 18 additions & 3 deletions src/InputParser/keywords/grid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,21 @@ function unit_type(::ENDPOINT_TYPE)
end

function parse_keyword!(data, outer_data, units, cfg, f, v::Val{:MULTREGT})
parser_message(cfg, outer_data, "MULTREGT", PARSER_MISSING_SUPPORT)
skip_record(f)
defaults = [-1, -1, 1.0, "XYZ", "ALL", "M"]
mreg = []
while true
rec = read_record(f)
if length(rec) == 0
break
end
parsed = parse_defaulted_line(rec, defaults, required_num = 6, keyword = "MULTREGT")
@assert parsed[6] in ("M", "O", "F")
if parsed[5] != "ALL"
parser_message(cfg, outer_data, "MULTREGT", PARSER_JUTULDARCY_PARTIAL_SUPPORT, "Only the \"F\" option is supported in the solvers, not $(parsed[5])")
end
push!(mreg, parsed)
end
data["MULTREGT"] = mreg
end

function parse_keyword!(data, outer_data, units, cfg, f, v::Union{
Expand Down Expand Up @@ -178,7 +191,9 @@ function parse_keyword!(data, outer_data, units, cfg, f, v::Union{Val{:POELCOEF}
data["$k"] = vals
end

function parse_keyword!(data, outer_data, units, cfg, f, v::Union{Val{:FIPNUM}, Val{:PVTNUM}, Val{:SATNUM}, Val{:EQLNUM}, Val{:ROCKNUM}, Val{:IMBNUM}, Val{:MULTNUM}, Val{:FIPZON}})
const REGION_TYPE = Union{Val{:FIPNUM}, Val{:PVTNUM}, Val{:SATNUM}, Val{:EQLNUM}, Val{:ROCKNUM}, Val{:IMBNUM}, Val{:MULTNUM}, Val{:FIPZON}, Val{:FLUXNUM}, Val{:OPERNUM}, Val{:MULTNUM}}

function parse_keyword!(data, outer_data, units, cfg, f, v::REGION_TYPE)
k = unpack_val(v)
parse_and_set_grid_data!(data, outer_data, units, cfg, f, k, T = Int)
end
Expand Down
1 change: 0 additions & 1 deletion src/InputParser/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ function parse_keyword!(data, outer_data, units, cfg, f, v::Val{T}) where T
:EQLOPTS,
:TRACERS,
:PIMTDIMS,
:FLUXNUM,
:OPTIONS
]

Expand Down

0 comments on commit f12a9e5

Please sign in to comment.