@@ -15,14 +15,59 @@ Modules
15
15
16
16
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.
17
17
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.
20
59
21
60
Then, if you are interested in a specific module, you can ask for its documentation using the ``mesh-doctor module_name --help `` pattern.
22
61
For example
23
62
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.
26
71
27
72
``mesh-doctor `` loads its module dynamically.
28
73
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.
44
89
Displays the neighboring nodes that are closer to each other than a prescribed threshold.
45
90
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.
46
91
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.
49
100
50
101
``element_volumes ``
51
102
"""""""""""""""""""
52
103
53
104
Computes the volumes of all the cells and displays the ones that are below a prescribed threshold.
54
105
Cells with negative volumes will typically be an issue for ``geos `` and should be fixed.
55
106
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.
58
115
59
116
``fix_elements_orderings ``
60
117
""""""""""""""""""""""""""
@@ -63,8 +120,29 @@ It sometimes happens that an exported mesh does not abide by the ``vtk`` orderin
63
120
The ``fix_elements_orderings `` module can rearrange the nodes of given types of elements.
64
121
This can be convenient if you cannot regenerate the mesh.
65
122
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.
68
146
69
147
``generate_cube ``
70
148
"""""""""""""""""
@@ -73,26 +151,84 @@ This module conveniently generates cubic meshes in ``vtk``.
73
151
It can also generate fields with simple values.
74
152
This tool can also be useful to generate a trial mesh that will later be refined or customized.
75
153
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.
78
178
79
179
``generate_fractures ``
80
180
""""""""""""""""""""""
81
181
82
182
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.
83
183
The ``generate_fractures `` module will split the mesh and generate the multi-block ``vtk `` files.
84
184
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.
87
210
88
211
``generate_global_ids ``
89
212
"""""""""""""""""""""""
90
213
91
214
When running ``geos `` in parallel, `global ids ` can be used to refer to data across multiple ranks.
92
215
The ``generate_global_ids `` can generate `global ids ` for the imported ``vtk `` mesh.
93
216
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.
96
232
97
233
``non_conformal ``
98
234
"""""""""""""""""
@@ -102,17 +238,35 @@ This module will detect elements which are close enough (there's a user defined
102
238
The angle between two faces can also be precribed.
103
239
This module can be a bit time consuming.
104
240
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".
107
254
108
255
``self_intersecting_elements ``
109
256
""""""""""""""""""""""""""""""
110
257
111
258
Some meshes can have cells that auto-intersect.
112
259
This module will display the elements that have faces intersecting.
113
260
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.
116
270
117
271
``supported_elements ``
118
272
""""""""""""""""""""""
@@ -125,8 +279,15 @@ But also prismes up to 11 faces.
125
279
The ``supported_elements `` check will validate that no unsupported element is included in the input mesh.
126
280
It will also verify that the ``VTK_POLYHEDRON `` cells can effectively get converted into a supported type of element.
127
281
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.
130
291
131
292
132
293
0 commit comments