ogstools.mesh.utils module#
- ogstools.mesh.utils.node_reordering(mesh, method=1)[source]#
Reorders mesh nodes to make a mesh compatible with OGS6.
- Parameters:
mesh (UnstructuredGrid) – mesh whose nodes are to be reordered.
method (int) –
0: Reversing order of nodes for all elements.
- 1: Reversing order of nodes unless it’s perceived correct by OGS6
standards. This is the default selection.
- 2: Fixing node ordering issues between VTK and OGS6 (only applies
to prism-elements).
- 3: Re-ordering of mesh node vector such that all base nodes are
sorted before all nonlinear nodes.
- Return type:
UnstructuredGrid
- ogstools.mesh.utils.check_node_ordering(mesh, strict=False)[source]#
Check conformity of node ordering with OGS.
- Parameters:
mesh (UnstructuredGrid) – The node ordering of this mesh’s cells is checked.
strict (bool) – If True, raise a UserWarning if the node ordering is wrong, else return True if ordering is okay else False.
- Return type:
bool