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

ogstools.mesh.utils.check_datatypes(mesh, strict=False, name='')[source]#
Return type:

bool

ogstools.mesh.utils.reindex_material_ids(mesh)[source]#
ogstools.mesh.utils.remove_data(mesh, datanames)[source]#
ogstools.mesh.utils.axis_ids_2D(mesh)[source]#

Return the two axes, in which the mesh (predominantly) lives in.

Return type:

tuple[int, int]

ogstools.mesh.utils.reshape_obs_points(points, mesh=None)[source]#
Return type:

ndarray