ogstools.propertylib.presets module#

Predefined properties.

“.. seealso:: ogstools.propertylib.tensor_math

ogstools.propertylib.presets.get_preset(mesh_property, mesh)[source]#

Returns a Property preset or creates one with correct type.

Searches for presets by data_name and output_name and returns if found. If ‘mesh_property’ is given as type Property this will also look for derived properties (difference, aggregate). Otherwise create Scalar, Vector, or Matrix Property depending on the shape of data in mesh.

Parameters:
  • mesh_property (Property | str) – The property to retrieve or its name if a string.

  • mesh (UnstructuredGrid) – The mesh containing the property data.

Returns:

A corresponding Property preset or a new Property of correct type.

Return type:

Property

ogstools.propertylib.presets.get_dataframe()[source]#
Return type:

DataFrame