Skip to content

Commit 91f6699

Browse files
authored
feat: Adding a diff filter (#193)
* start filter diff * Refactor the script to compute L1Diff * test diffFields * fix setMeshes * Rename the test file of AttributesDiff filter * Change bool with enum for the attribute localization * fix dicSharedAttributes computation * implementation of inf norm * Factorize the two diff computation functions in one * Apply suggestions review * Add meshes for testing AttributesDiff filter * Update the test meshes --------- Authored-by: Romain Baville <romain.baville@external.totalenergies.com>
1 parent c265e30 commit 91f6699

13 files changed

Lines changed: 1710 additions & 1 deletion

File tree

docs/geos_processing_docs/generic_processing_tools.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ AttributeMapping
1212
:undoc-members:
1313
:show-inheritance:
1414

15+
geos.processing.generic_processing_tools.AttributesDiff filter
16+
----------------------------------------------------------------
17+
18+
.. automodule:: geos.processing.generic_processing_tools.AttributesDiff
19+
:members:
20+
:undoc-members:
21+
:show-inheritance:
1522

1623
CreateConstantAttributePerRegion
1724
--------------------------------------

geos-processing/src/geos/processing/generic_processing_tools/AttributesDiff.py

Lines changed: 371 additions & 0 deletions
Large diffs are not rendered by default.

geos-processing/tests/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ def _get_dataset( datasetType: str ) -> Union[ vtkMultiBlockDataSet, vtkPolyData
4444
vtkFilename = "data/domain_res5_id.vtu"
4545
elif datasetType == "emptydataset":
4646
vtkFilename = "data/domain_res5_id_empty.vtu"
47+
elif datasetType == "2Ranks":
48+
vtkFilename = "data/singlePhasePoromechanics_FaultModel_well_seq/CellElementRegion2Ranks.vtm"
49+
elif datasetType == "4Ranks":
50+
vtkFilename = "data/singlePhasePoromechanics_FaultModel_well_seq/CellElementRegion4Ranks.vtm"
4751
elif datasetType == "meshtet1":
4852
vtkFilename = "data/mesh1.vtu"
4953
elif datasetType == "meshtet1b":
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<VTKFile type="vtkMultiBlockDataSet" version="1.0" byte_order="LittleEndian" header_type="UInt64" compressor="vtkZLibDataCompressor">
2+
<vtkMultiBlockDataSet>
3+
<Block index="0" name="mesh1">
4+
<Block index="0" name="Level0">
5+
<Block index="0" name="CellElementRegion">
6+
<Block index="0" name="Region">
7+
<DataSet index="0" name="rank_0" file="CellElementRegion2Ranks/CellElementRegion2Ranks_0_0.vtu"/>
8+
<DataSet index="1" name="rank_1" file="CellElementRegion2Ranks/CellElementRegion2Ranks_1_0.vtu"/>
9+
</Block>
10+
</Block>
11+
</Block>
12+
</Block>
13+
</vtkMultiBlockDataSet>
14+
</VTKFile>

geos-processing/tests/data/singlePhasePoromechanics_FaultModel_well_seq/CellElementRegion2Ranks/CellElementRegion2Ranks_0_0.vtu

Lines changed: 208 additions & 0 deletions
Large diffs are not rendered by default.

geos-processing/tests/data/singlePhasePoromechanics_FaultModel_well_seq/CellElementRegion2Ranks/CellElementRegion2Ranks_1_0.vtu

Lines changed: 208 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<VTKFile type="vtkMultiBlockDataSet" version="1.0" byte_order="LittleEndian" header_type="UInt64" compressor="vtkZLibDataCompressor">
2+
<vtkMultiBlockDataSet>
3+
<Block index="0" name="mesh1">
4+
<Block index="0" name="Level0">
5+
<Block index="0" name="CellElementRegion">
6+
<Block index="0" name="Region">
7+
<DataSet index="0" name="rank_0" file="CellElementRegion4Ranks/CellElementRegion4Ranks_0_0.vtu"/>
8+
<DataSet index="1" name="rank_1" file="CellElementRegion4Ranks/CellElementRegion4Ranks_1_0.vtu"/>
9+
<DataSet index="2" name="rank_2" file="CellElementRegion4Ranks/CellElementRegion4Ranks_2_0.vtu"/>
10+
<DataSet index="3" name="rank_3" file="CellElementRegion4Ranks/CellElementRegion4Ranks_3_0.vtu"/>
11+
</Block>
12+
</Block>
13+
</Block>
14+
</Block>
15+
</vtkMultiBlockDataSet>
16+
</VTKFile>

geos-processing/tests/data/singlePhasePoromechanics_FaultModel_well_seq/CellElementRegion4Ranks/CellElementRegion4Ranks_0_0.vtu

Lines changed: 208 additions & 0 deletions
Large diffs are not rendered by default.

geos-processing/tests/data/singlePhasePoromechanics_FaultModel_well_seq/CellElementRegion4Ranks/CellElementRegion4Ranks_1_0.vtu

Lines changed: 208 additions & 0 deletions
Large diffs are not rendered by default.

geos-processing/tests/data/singlePhasePoromechanics_FaultModel_well_seq/CellElementRegion4Ranks/CellElementRegion4Ranks_2_0.vtu

Lines changed: 208 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)