Skip to content

Commit 60ec19e

Browse files
committed
Change dynamic documentation for geos-mesh to static documentation to avoid CI errors.
1 parent 6759376 commit 60ec19e

File tree

1 file changed

+183
-22
lines changed

1 file changed

+183
-22
lines changed

docs/geos-mesh.rst

Lines changed: 183 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,59 @@ Modules
1515

1616
To list all the modules available through ``mesh-doctor``, you can simply use the ``--help`` option, which will list all available modules as well as a quick summary.
1717

18-
.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py --help
19-
:cwd: ../geos-mesh
18+
.. code-block::
19+
20+
$ python src/geos/mesh/doctor/mesh_doctor.py --help
21+
usage: mesh_doctor.py [-h] [-v] [-q] -i VTK_MESH_FILE
22+
{collocated_nodes,element_volumes,fix_elements_orderings,generate_cube,generate_fractures,generate_global_ids,non_conformal,self_intersecting_elements,supported_elements}
23+
...
24+
25+
Inspects meshes for GEOSX.
26+
27+
positional arguments:
28+
{collocated_nodes,element_volumes,fix_elements_orderings,generate_cube,generate_fractures,generate_global_ids,non_conformal,self_intersecting_elements,supported_elements}
29+
Modules
30+
collocated_nodes
31+
Checks if nodes are collocated.
32+
element_volumes
33+
Checks if the volumes of the elements are greater than "min".
34+
fix_elements_orderings
35+
Reorders the support nodes for the given cell types.
36+
generate_cube
37+
Generate a cube and its fields.
38+
generate_fractures
39+
Splits the mesh to generate the faults and fractures. [EXPERIMENTAL]
40+
generate_global_ids
41+
Adds globals ids for points and cells.
42+
non_conformal
43+
Detects non conformal elements. [EXPERIMENTAL]
44+
self_intersecting_elements
45+
Checks if the faces of the elements are self intersecting.
46+
supported_elements
47+
Check that all the elements of the mesh are supported by GEOSX.
48+
49+
options:
50+
-h, --help
51+
show this help message and exit
52+
-v Use -v 'INFO', -vv for 'DEBUG'. Defaults to 'WARNING'.
53+
-q Use -q to reduce the verbosity of the output.
54+
-i VTK_MESH_FILE, --vtk-input-file VTK_MESH_FILE
55+
56+
Note that checks are dynamically loaded.
57+
An option may be missing because of an unloaded module.
58+
Increase verbosity (-v, -vv) to get full information.
2059
2160
Then, if you are interested in a specific module, you can ask for its documentation using the ``mesh-doctor module_name --help`` pattern.
2261
For example
2362

24-
.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py collocated_nodes --help
25-
:cwd: ../geos-mesh
63+
.. code-block::
64+
65+
$ python src/geos/mesh/doctor/mesh_doctor.py collocated_nodes --help
66+
usage: mesh_doctor.py collocated_nodes [-h] --tolerance TOLERANCE
67+
68+
options:
69+
-h, --help show this help message and exit
70+
--tolerance TOLERANCE [float]: The absolute distance between two nodes for them to be considered collocated.
2671
2772
``mesh-doctor`` loads its module dynamically.
2873
If a module can't be loaded, ``mesh-doctor`` will proceed and try to load other modules.
@@ -44,17 +89,29 @@ Here is a list and brief description of all the modules available.
4489
Displays the neighboring nodes that are closer to each other than a prescribed threshold.
4590
It is not uncommon to define multiple nodes for the exact same position, which will typically be an issue for ``geos`` and should be fixed.
4691

47-
.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py collocated_nodes --help
48-
:cwd: ../geos-mesh
92+
.. code-block::
93+
94+
$ python src/geos/mesh/doctor/mesh_doctor.py collocated_nodes --help
95+
usage: mesh_doctor.py collocated_nodes [-h] --tolerance TOLERANCE
96+
97+
options:
98+
-h, --help show this help message and exit
99+
--tolerance TOLERANCE [float]: The absolute distance between two nodes for them to be considered collocated.
49100
50101
``element_volumes``
51102
"""""""""""""""""""
52103

53104
Computes the volumes of all the cells and displays the ones that are below a prescribed threshold.
54105
Cells with negative volumes will typically be an issue for ``geos`` and should be fixed.
55106

56-
.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py element_volumes --help
57-
:cwd: ../geos-mesh
107+
.. code-block::
108+
109+
$ python src/geos/mesh/doctor/mesh_doctor.py element_volumes --help
110+
usage: mesh_doctor.py element_volumes [-h] --min 0.0
111+
112+
options:
113+
-h, --help show this help message and exit
114+
--min 0.0 [float]: The minimum acceptable volume. Defaults to 0.0.
58115
59116
``fix_elements_orderings``
60117
""""""""""""""""""""""""""
@@ -63,8 +120,29 @@ It sometimes happens that an exported mesh does not abide by the ``vtk`` orderin
63120
The ``fix_elements_orderings`` module can rearrange the nodes of given types of elements.
64121
This can be convenient if you cannot regenerate the mesh.
65122

66-
.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py fix_elements_orderings --help
67-
:cwd: ../geos-mesh
123+
.. code-block::
124+
125+
$ python src/geos/mesh/doctor/mesh_doctor.py fix_elements_orderings --help
126+
usage: mesh_doctor.py fix_elements_orderings [-h] [--Hexahedron 1,6,5,4,7,0,2,3] [--Prism5 8,2,0,7,6,9,5,1,4,3]
127+
[--Prism6 11,2,8,10,5,0,9,7,6,1,4,3] [--Pyramid 3,4,0,2,1]
128+
[--Tetrahedron 2,0,3,1] [--Voxel 1,6,5,4,7,0,2,3]
129+
[--Wedge 3,5,4,0,2,1] --output OUTPUT [--data-mode binary, ascii]
130+
131+
options:
132+
-h, --help show this help message and exit
133+
--Hexahedron 1,6,5,4,7,0,2,3
134+
[list of integers]: node permutation for "Hexahedron".
135+
--Prism5 8,2,0,7,6,9,5,1,4,3
136+
[list of integers]: node permutation for "Prism5".
137+
--Prism6 11,2,8,10,5,0,9,7,6,1,4,3
138+
[list of integers]: node permutation for "Prism6".
139+
--Pyramid 3,4,0,2,1 [list of integers]: node permutation for "Pyramid".
140+
--Tetrahedron 2,0,3,1 [list of integers]: node permutation for "Tetrahedron".
141+
--Voxel 1,6,5,4,7,0,2,3 [list of integers]: node permutation for "Voxel".
142+
--Wedge 3,5,4,0,2,1 [list of integers]: node permutation for "Wedge".
143+
--output OUTPUT [string]: The vtk output file destination.
144+
--data-mode binary, ascii
145+
[string]: For ".vtu" output format, the data mode can be binary or ascii. Defaults to binary.
68146
69147
``generate_cube``
70148
"""""""""""""""""
@@ -73,26 +151,84 @@ This module conveniently generates cubic meshes in ``vtk``.
73151
It can also generate fields with simple values.
74152
This tool can also be useful to generate a trial mesh that will later be refined or customized.
75153

76-
.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py generate_cube --help
77-
:cwd: ../geos-mesh
154+
.. code-block::
155+
156+
$ python src/geos/mesh/doctor/mesh_doctor.py generate_cube --help
157+
usage: mesh_doctor.py generate_cube [-h] [--x 0:1.5:3] [--y 0:5:10] [--z 0:1] [--nx 2:2] [--ny 1:1] [--nz 4]
158+
[--fields name:support:dim [name:support:dim ...]] [--cells] [--no-cells]
159+
[--points] [--no-points] --output OUTPUT [--data-mode binary, ascii]
160+
161+
options:
162+
-h, --help show this help message and exit
163+
--x 0:1.5:3 [list of floats]: X coordinates of the points.
164+
--y 0:5:10 [list of floats]: Y coordinates of the points.
165+
--z 0:1 [list of floats]: Z coordinates of the points.
166+
--nx 2:2 [list of integers]: Number of elements in the X direction.
167+
--ny 1:1 [list of integers]: Number of elements in the Y direction.
168+
--nz 4 [list of integers]: Number of elements in the Z direction.
169+
--fields name:support:dim
170+
[name:support:dim ...]: Create fields on CELLS or POINTS, with given dimension (typically 1 or 3).
171+
--cells [bool]: Generate global ids for cells. Defaults to true.
172+
--no-cells [bool]: Don't generate global ids for cells.
173+
--points [bool]: Generate global ids for points. Defaults to true.
174+
--no-points [bool]: Don't generate global ids for points.
175+
--output OUTPUT [string]: The vtk output file destination.
176+
--data-mode binary, ascii
177+
[string]: For ".vtu" output format, the data mode can be binary or ascii. Defaults to binary.
78178
79179
``generate_fractures``
80180
""""""""""""""""""""""
81181

82182
For a conformal fracture to be defined in a mesh, ``geos`` requires the mesh to be split at the faces where the fracture gets across the mesh.
83183
The ``generate_fractures`` module will split the mesh and generate the multi-block ``vtk`` files.
84184

85-
.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py generate_fractures --help
86-
:cwd: ../geos-mesh
185+
.. code-block::
186+
187+
$ python src/geos/mesh/doctor/mesh_doctor.py generate_fractures --help
188+
usage: mesh_doctor.py generate_fractures [-h] --policy field, internal_surfaces [--name NAME] [--values VALUES]
189+
--output OUTPUT [--data-mode binary, ascii] --fracture-output
190+
FRACTURE_OUTPUT [--fracture-data-mode binary, ascii]
191+
192+
options:
193+
-h, --help show this help message and exit
194+
--policy field, internal_surfaces
195+
[string]: The criterion to define the surfaces that will be changed into fracture zones.
196+
Possible values are "field, internal_surfaces"
197+
--name NAME [string]: If the "field" policy is selected, defines which field will be considered to
198+
define the fractures. If the "internal_surfaces" policy is selected, defines the name of
199+
the attribute will be considered to identify the fractures.
200+
--values VALUES [list of comma separated integers]: If the "field" policy is selected, which changes of
201+
the field will be considered as a fracture. If the "internal_surfaces" policy is
202+
selected, list of the fracture attributes.
203+
--output OUTPUT [string]: The vtk output file destination.
204+
--data-mode binary, ascii
205+
[string]: For ".vtu" output format, the data mode can be binary or ascii. Defaults to binary.
206+
--fracture-output FRACTURE_OUTPUT
207+
[string]: The vtk output file destination.
208+
--fracture-data-mode binary, ascii
209+
[string]: For ".vtu" output format, the data mode can be binary or ascii. Defaults to binary.
87210
88211
``generate_global_ids``
89212
"""""""""""""""""""""""
90213

91214
When running ``geos`` in parallel, `global ids` can be used to refer to data across multiple ranks.
92215
The ``generate_global_ids`` can generate `global ids` for the imported ``vtk`` mesh.
93216

94-
.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py generate_global_ids --help
95-
:cwd: ../geos-mesh
217+
.. code-block::
218+
219+
$ python src/geos/mesh/doctor/mesh_doctor.py generate_global_ids --help
220+
usage: mesh_doctor.py generate_global_ids [-h] [--cells] [--no-cells] [--points] [--no-points] --output OUTPUT
221+
[--data-mode binary, ascii]
222+
223+
options:
224+
-h, --help show this help message and exit
225+
--cells [bool]: Generate global ids for cells. Defaults to true.
226+
--no-cells [bool]: Don't generate global ids for cells.
227+
--points [bool]: Generate global ids for points. Defaults to true.
228+
--no-points [bool]: Don't generate global ids for points.
229+
--output OUTPUT [string]: The vtk output file destination.
230+
--data-mode binary, ascii
231+
[string]: For ".vtu" output format, the data mode can be binary or ascii. Defaults to binary.
96232
97233
``non_conformal``
98234
"""""""""""""""""
@@ -102,17 +238,35 @@ This module will detect elements which are close enough (there's a user defined
102238
The angle between two faces can also be precribed.
103239
This module can be a bit time consuming.
104240

105-
.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py non_conformal --help
106-
:cwd: ../geos-mesh
241+
.. code-block::
242+
243+
$ python src/geos/mesh/doctor/mesh_doctor.py non_conformal --help
244+
usage: mesh_doctor.py non_conformal [-h] [--angle_tolerance 10.0] [--point_tolerance POINT_TOLERANCE]
245+
[--face_tolerance FACE_TOLERANCE]
246+
247+
options:
248+
-h, --help show this help message and exit
249+
--angle_tolerance 10.0 [float]: angle tolerance in degrees. Defaults to 10.0
250+
--point_tolerance POINT_TOLERANCE
251+
[float]: tolerance for two points to be considered collocated.
252+
--face_tolerance FACE_TOLERANCE
253+
[float]: tolerance for two faces to be considered "touching".
107254
108255
``self_intersecting_elements``
109256
""""""""""""""""""""""""""""""
110257

111258
Some meshes can have cells that auto-intersect.
112259
This module will display the elements that have faces intersecting.
113260

114-
.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py self_intersecting_elements --help
115-
:cwd: ../geos-mesh
261+
.. code-block::
262+
263+
$ python src/geos/mesh/doctor/mesh_doctor.py self_intersecting_elements --help
264+
usage: mesh_doctor.py self_intersecting_elements [-h] [--min 2.220446049250313e-16]
265+
266+
options:
267+
-h, --help show this help message and exit
268+
--min 2.220446049250313e-16
269+
[float]: The tolerance in the computation. Defaults to your machine precision 2.220446049250313e-16.
116270
117271
``supported_elements``
118272
""""""""""""""""""""""
@@ -125,8 +279,15 @@ But also prismes up to 11 faces.
125279
The ``supported_elements`` check will validate that no unsupported element is included in the input mesh.
126280
It will also verify that the ``VTK_POLYHEDRON`` cells can effectively get converted into a supported type of element.
127281

128-
.. command-output:: python src/geos/mesh/doctor/mesh_doctor.py supported_elements --help
129-
:cwd: ../geos-mesh
282+
.. code-block::
283+
284+
$ python src/geos/mesh/doctor/mesh_doctor.py supported_elements --help
285+
usage: mesh_doctor.py supported_elements [-h] [--chunck_size 1] [--nproc 8]
286+
287+
options:
288+
-h, --help show this help message and exit
289+
--chunck_size 1 [int]: Defaults chunk size for parallel processing to 1
290+
--nproc 8 [int]: Number of threads used for parallel processing. Defaults to your CPU count 8.
130291
131292
132293

0 commit comments

Comments
 (0)