ogstools.mesh.ip_data module#

class ogstools.mesh.ip_data.IPdict[source]#

Bases: object

IPdict(order: int, num_components: int, values: numpy.ndarray)

order: int#
num_components: int#
values: ndarray#
__init__(order, num_components, values)#
ogstools.mesh.ip_data.ip_metadata(mesh)[source]#

return the IntegrationPointMetaData in the mesh’s field_data as a dict.

Return type:

dict[str, list[dict[str, Any]]] | None

class ogstools.mesh.ip_data.IPdata[source]#

Bases: MutableMapping

An interface to the integration point data of a mesh.

Initialize an IPdata object

Parameters:
  • mesh (UnstructuredGrid) – Mesh, which should contain integration point metadata

  • auto_sync (bool) – By default, automatically syncs changes in this object with the given mesh. If set to False, sync should be manually called after all changes to IPdata.

__init__(mesh, auto_sync=True)[source]#

Initialize an IPdata object

Parameters:
  • mesh (UnstructuredGrid) – Mesh, which should contain integration point metadata

  • auto_sync (bool) – By default, automatically syncs changes in this object with the given mesh. If set to False, sync should be manually called after all changes to IPdata.

__getitem__(key)[source]#
Return type:

IPdict

property info: str#
property n_points: int#

Read number of integration points

return 0, if no integartion point metadata is present in the mesh.

set(name, order, num_components, values)[source]#

set integration point data according to the given values.

Return type:

None