ogstools.meshlib.data_processing module#
- ogstools.meshlib.data_processing.difference(mesh1, mesh2, mesh_property=None)[source]#
Compute the difference of properties between two meshes.
- Parameters:
mesh1 (UnstructuredGrid) – The first mesh to be subtracted from.
mesh2 (UnstructuredGrid) – The second mesh whose data is subtracted from the first mesh.
mesh_property (Property | str | None) – The property of interest. If not given, all point and cell_data will be processed raw.
- Returns:
A new mesh containing the difference of mesh_property or all datasets between mesh1 and mesh2.
- Return type:
UnstructuredGrid
- ogstools.meshlib.data_processing.difference_pairwise(meshes_1, meshes_2, mesh_property=None)[source]#
Compute pairwise difference between meshes from two lists/arrays (they have to be of the same length).
- Parameters:
meshes_1 (list | ndarray) – The first list/array of meshes to be subtracted from.
meshes_2 (list | ndarray) – The second list/array of meshes whose data is subtracted from the first list/array of meshes - meshes_1.
mesh_property (Property | str | None) – The property of interest. If not given, all point and cell_data will be processed raw.
- Returns:
An array of meshes containing the differences of mesh_property or all datasets between meshes_1 and meshes_2.
- Return type:
ndarray
- ogstools.meshlib.data_processing.difference_matrix(meshes_1, meshes_2=None, mesh_property=None)[source]#
Compute the difference between all combinations of two meshes from one or two arrays based on a specified property.
- Parameters:
meshes_1 (list | ndarray) – The first list/array of meshes to be subtracted from.
meshes_2 (list | ndarray | None) – The second list/array of meshes, it is subtracted from the first list/array of meshes - meshes_1 (optional).
mesh_property (Property | str | None) – The property of interest. If not given, all point and cell_data will be processed raw.
- Returns:
An array of meshes containing the differences of mesh_property or all datasets between meshes_1 and meshes_2 for all possible combinations.
- Return type:
ndarray