Skip to content

Commit

Permalink
Handle depth and arbitrary solution/edit sections
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Sep 24, 2024
1 parent 873794c commit ee9d958
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/InputParser/keywords/grid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function parse_keyword!(data, outer_data, units, cfg, f, ::Val{:ZCORN})
data["ZCORN"] = zcorn
end

function unit_type(::Union{Val{:COORD}, Val{:ZCORN}})
function unit_type(::Union{Val{:COORD}, Val{:ZCORN}, Val{:DEPTH}})
return :length
end

Expand Down
2 changes: 1 addition & 1 deletion src/InputParser/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ function parse_keyword!(data, outer_data, units, cfg, f, v::Val{T}) where T
read_record(f)
elseif section == :REGIONS
data[kw_str] = parse_and_set_grid_data!(data, outer_data, units, cfg, f, T, T = Int)
elseif section == :GRID
elseif section in (:GRID, :EDIT, :SOLUTION)
data[kw_str] = parse_and_set_grid_data!(data, outer_data, units, cfg, f, T, T = Float64)
else
error("Unhandled keyword $T in $section encountered.")
Expand Down

0 comments on commit ee9d958

Please sign in to comment.