Skip to content

Commit

Permalink
Doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Aug 2, 2024
1 parent ac4270e commit 2056138
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
21 changes: 14 additions & 7 deletions src/CornerPointGrid/interface.jl
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
"""
mesh_from_grid_section(f, actnum = missing)
mesh_from_grid_section(f, actnum = missing, repair_zcorn = true)
Generate a Jutul unstructured mesh from a grid section. The input arugment `f`
can be one of the following:
- An already parsed complete data file read using `parse_data_file`.
The "GRID" field will be used.
- A parsed "GRID" section from `parse_grdecl_file`.
- The file-name of a `.GRDECL` file to be parsed before processing.
- (1) An already parsed complete data file read using `parse_data_file`. The
"GRID" field will be used.
- (2) A parsed "GRID" section from `parse_grdecl_file`.
- (3) The file-name of a `.GRDECL` file to be parsed before processing.
Optionally the `actnum` can be specified separately. The `actnum` should have
equal length to the number of logical cells in the grid with true/false
indicating if a cell is to be included in the processed mesh.
The additional argument `repair_zcorn` only applies when the grid is defined
using COORD/ZCORN arrays. If set to `true`, the monotonicity of the ZCORN
coordinates in each corner-point pillar will be checked and optionally fixed
prior to mesh construction. Note that if non-monotone ZCORN are fixed, if the
first input argument to this function is an already parsed data structure, the
ZCORN array will be mutated during fixing to avoid a copy.
"""
function mesh_from_grid_section(f, actnum = missing)
function mesh_from_grid_section(f, actnum = missing, repair_zcorn = true)
if f isa String
f = InputParser.parse_grdecl_file(f)
end
Expand All @@ -27,7 +34,7 @@ function mesh_from_grid_section(f, actnum = missing)
actnum = get_effective_actnum(grid)
end
if haskey(grid, "COORD")
G = mesh_from_zcorn_and_coord(grid, actnum = actnum)
G = mesh_from_zcorn_and_coord(grid, actnum = actnum, repair = repair_zcorn)
else
G = mesh_from_dxdydz_and_tops(grid, actnum = actnum)
end
Expand Down
6 changes: 3 additions & 3 deletions src/InputParser/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,9 @@ end
"""
keyword_default_value(x::AbstractString, T::Type)
Get the default value of a keyword (as String or ::Val{Symbol}) when placed in a
array with element type T. This is used to initialize defaulted entries when
using COPY, ADD, MULTIPLY and so on.
Get the default value of a keyword (as `String` or `::Val{X}` where `X` is a
`Symbol`) when placed in a array with element type `T`. This is used to
initialize defaulted entries when using COPY, ADD, MULTIPLY and so on.
"""
function keyword_default_value(x::AbstractString, T::Type)
return keyword_default_value(Val(Symbol(x)), T)
Expand Down

0 comments on commit 2056138

Please sign in to comment.