ogstools.mesh.ip_mesh module#

ogstools.mesh.ip_mesh.tessellate(mesh, cell_type, integration_order)[source]#

Create a tessellated mesh with one subcell per integration point.

Return type:

PolyData

ogstools.mesh.ip_mesh.to_ip_point_cloud(mesh)[source]#

Create a point cloud from a given mesh containing integration point data.

Return type:

UnstructuredGrid

ogstools.mesh.ip_mesh.to_ip_mesh(mesh)[source]#

Create a mesh with cells centered around integration points.

Return type:

UnstructuredGrid

ogstools.mesh.ip_mesh.ip_data_threshold(mesh, value, scalars='MaterialIDs', invert=False)[source]#

Filters integration point data to match the threshold criterion.

Similar to pyvista’s threshold filter, but only acting on field data.

Parameters:
  • mesh (UnstructuredGrid) – original mesh, needs to contain MaterialIDs and IntegratioPointMetaData.

  • value (int | Sequence[int]) – Single value or (min, max) to be used for the threshold. If a sequence, then length must be 2. If single value, it is used as the lower bound and selecting everything above.

  • scalars (str) – Name of data to threshold on.

  • invert (bool) – Invert the threshold results

Return type:

DataSetAttributes