diff --git a/docs/geos_pv_docs/meshQuality.rst b/docs/geos_pv_docs/meshQuality.rst
index fa36d30df..8662d1276 100644
--- a/docs/geos_pv_docs/meshQuality.rst
+++ b/docs/geos_pv_docs/meshQuality.rst
@@ -5,9 +5,9 @@ Mesh Quality
PVCellTypeCounterEnhanced
----------------------------------
-.. automodule:: geos.pv.plugins.PVCellTypeCounterEnhanced
+.. automodule:: geos.pv.plugins.qc.PVCellTypeCounterEnhanced
PVMeshQualityEnhanced
---------------------------
-.. automodule:: geos.pv.plugins.PVMeshQualityEnhanced
+.. automodule:: geos.pv.plugins.qc.PVMeshQualityEnhanced
diff --git a/docs/geos_pv_docs/processing.rst b/docs/geos_pv_docs/processing.rst
index 04a828d06..762caef18 100644
--- a/docs/geos_pv_docs/processing.rst
+++ b/docs/geos_pv_docs/processing.rst
@@ -11,37 +11,37 @@ The plugins include:
PVAttributeMapping
--------------------
-.. automodule:: geos.pv.plugins.PVAttributeMapping
+.. automodule:: geos.pv.plugins.generic_processing.PVAttributeMapping
PVCreateConstantAttributePerRegion
-----------------------------------
-.. automodule:: geos.pv.plugins.PVCreateConstantAttributePerRegion
+.. automodule:: geos.pv.plugins.generic_processing.PVCreateConstantAttributePerRegion
PVFillPartialArrays
--------------------
-.. automodule:: geos.pv.plugins.PVFillPartialArrays
+.. automodule:: geos.pv.plugins.generic_processing.PVFillPartialArrays
PVSplitMesh
----------------------------------
-.. automodule:: geos.pv.plugins.PVSplitMesh
+.. automodule:: geos.pv.plugins.generic_processing.PVSplitMesh
PVMergeBlocksEnhanced module
--------------------------------------
-.. automodule:: geos.pv.plugins.PVMergeBlocksEnhanced
+.. automodule:: geos.pv.plugins.generic_processing.PVMergeBlocksEnhanced
PVClipToMainFrame
----------------------------------
-.. automodule:: geos.pv.plugins.PVClipToMainFrame
+.. automodule:: geos.pv.plugins.generic_processing.PVClipToMainFrame
Geos output pre-processing
@@ -50,7 +50,7 @@ Geos output pre-processing
PVGeosBlockExtractAndMerge plugin
----------------------------------
-.. automodule:: geos.pv.plugins.PVGeosBlockExtractAndMerge
+.. automodule:: geos.pv.plugins.post_processing.PVGeosBlockExtractAndMerge
Geomechanics workflows
@@ -60,16 +60,16 @@ Geomechanics workflows
PVGeomechanicsWorkflow plugin
------------------------------
-.. automodule:: geos.pv.plugins.PVGeomechanicsWorkflow
+.. automodule:: geos.pv.plugins.post_processing.PVGeomechanicsWorkflow
PVGeomechanicsCalculator plugin
---------------------------------------
-.. automodule:: geos.pv.plugins.PVGeomechanicsCalculator
+.. automodule:: geos.pv.plugins.post_processing.PVGeomechanicsCalculator
PVMohrCirclePlot plugin
---------------------------------
-.. automodule:: geos.pv.plugins.PVMohrCirclePlot
+.. automodule:: geos.pv.plugins.post_processing.PVMohrCirclePlot
diff --git a/docs/geos_pv_docs/readers.rst b/docs/geos_pv_docs/readers.rst
index a8e2d03bf..7d6f15169 100644
--- a/docs/geos_pv_docs/readers.rst
+++ b/docs/geos_pv_docs/readers.rst
@@ -4,4 +4,4 @@ Readers
PVGeosLogReader
--------------------
-.. automodule:: geos.pv.plugins.PVGeosLogReader
\ No newline at end of file
+.. automodule:: geos.pv.plugins.post_processing.PVGeosLogReader
\ No newline at end of file
diff --git a/geos-pv/src/geos/pv/plugins/PVAttributeMapping.py b/geos-pv/src/geos/pv/plugins/generic_processing/PVAttributeMapping.py
similarity index 92%
rename from geos-pv/src/geos/pv/plugins/PVAttributeMapping.py
rename to geos-pv/src/geos/pv/plugins/generic_processing/PVAttributeMapping.py
index 037ce55ab..dcc3e2b4e 100644
--- a/geos-pv/src/geos/pv/plugins/PVAttributeMapping.py
+++ b/geos-pv/src/geos/pv/plugins/generic_processing/PVAttributeMapping.py
@@ -8,7 +8,7 @@
from typing_extensions import Self
# update sys.path to load all GEOS Python Package dependencies
-geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
+geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths
@@ -33,7 +33,9 @@
vtkMultiBlockDataSet,
)
-__doc__ = """
+from geos.pv.utils.details import FilterCategory
+
+__doc__ = f"""
AttributeMapping is a paraview plugin that transfers global attributes from a source mesh to a final mesh with same point/cell coordinates.
Input and output meshes can be vtkDataSet or vtkMultiBlockDataSet.
@@ -47,19 +49,19 @@
To use it:
-* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVAttributeMapping.
-* Select the mesh to transfer the global attributes (meshTo).
-* Select Filters > 4- Geos Utils > Attribute Mapping.
-* Select the source mesh with global attributes to transfer (meshFrom).
-* Select the on witch element (onPoints/onCells) the attributes to transfer are.
-* Select the global attributes to transfer from the source mesh to the final mesh.
-* Apply.
+* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/generic_processing/PVAttributeMapping
+* Select the mesh to transfer the global attributes (meshTo)
+* Select the filter: Filters > { FilterCategory.GENERIC_PROCESSING.value } > Attribute Mapping
+* Select the source mesh with global attributes to transfer (meshFrom)
+* Select the on which element (onPoints/onCells) the attributes to transfer are
+* Select the global attributes to transfer from the source mesh to the final mesh
+* Apply
"""
@smproxy.filter( name="PVAttributeMapping", label="Attribute Mapping" )
-@smhint.xml( '' )
+@smhint.xml( f'' )
@smproperty.input( name="meshFrom", port_index=1, label="Mesh From" )
@smdomain.datatype(
dataTypes=[ "vtkDataSet", "vtkMultiBlockDataSet" ],
diff --git a/geos-pv/src/geos/pv/plugins/PVClipToMainFrame.py b/geos-pv/src/geos/pv/plugins/generic_processing/PVClipToMainFrame.py
similarity index 84%
rename from geos-pv/src/geos/pv/plugins/PVClipToMainFrame.py
rename to geos-pv/src/geos/pv/plugins/generic_processing/PVClipToMainFrame.py
index 1e52b0509..880731bfe 100644
--- a/geos-pv/src/geos/pv/plugins/PVClipToMainFrame.py
+++ b/geos-pv/src/geos/pv/plugins/generic_processing/PVClipToMainFrame.py
@@ -16,7 +16,7 @@
vtkMultiBlockDataSet, )
# update sys.path to load all GEOS Python Package dependencies
-geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
+geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths
@@ -25,18 +25,20 @@
from geos.pv.utils.details import ( SISOFilter, FilterCategory )
from geos.processing.generic_processing_tools.ClipToMainFrame import ClipToMainFrame
-__doc__ = """
+__doc__ = f"""
Clip the input mesh to the main frame applying the correct LandmarkTransform
To use it:
-* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVClipToMainFrame.
-* Apply.
+* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/generic_processing/PVClipToMainFrame
+* Select the mesh to process
+* Select the filter: Filters > { FilterCategory.GENERIC_PROCESSING.value } > Clip to the main frame
+* Apply
"""
-@SISOFilter( category=FilterCategory.GEOS_UTILS,
+@SISOFilter( category=FilterCategory.GENERIC_PROCESSING,
decoratedLabel="Clip to the main frame",
decoratedType=[ "vtkMultiBlockDataSet", "vtkDataSet" ] )
class PVClipToMainFrame( VTKPythonAlgorithmBase ):
diff --git a/geos-pv/src/geos/pv/plugins/PVCreateConstantAttributePerRegion.py b/geos-pv/src/geos/pv/plugins/generic_processing/PVCreateConstantAttributePerRegion.py
similarity index 96%
rename from geos-pv/src/geos/pv/plugins/PVCreateConstantAttributePerRegion.py
rename to geos-pv/src/geos/pv/plugins/generic_processing/PVCreateConstantAttributePerRegion.py
index 895df71e5..e30177ac9 100644
--- a/geos-pv/src/geos/pv/plugins/PVCreateConstantAttributePerRegion.py
+++ b/geos-pv/src/geos/pv/plugins/generic_processing/PVCreateConstantAttributePerRegion.py
@@ -22,7 +22,7 @@
vtkDataSet, )
# update sys.path to load all GEOS Python Package dependencies
-geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
+geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths
@@ -32,7 +32,7 @@
from geos.pv.utils.details import SISOFilter, FilterCategory
-__doc__ = """
+__doc__ = f"""
PVCreateConstantAttributePerRegion is a Paraview plugin that allows to create an attribute
with constant values per components for each chosen indexes of a reference/region attribute.
If other region indexes exist, values are set to nan for float type, -1 for int type or 0 for uint type.
@@ -45,16 +45,16 @@
To use it:
-* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVCreateConstantAttributePerRegion.
-* Select the mesh in which you want to create the attributes.
-* Select the filter Create Constant Attribute Per Region in filter|0- Geos Pre-processing.
-* Choose the region attribute, the relation index/values, the new attribute name, the type of the value, the number of components and their names.
-* Apply.
+* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/generic_processing/PVCreateConstantAttributePerRegion
+* Select the mesh in which you want to create the attributes
+* Select the filter: Filters > { FilterCategory.GENERIC_PROCESSING.value } > Create Constant Attribute Per Region
+* Choose the region attribute, the relation index/values, the new attribute name, the type of the value, the number of components and their names
+* Apply
"""
-@SISOFilter( category=FilterCategory.GEOS_PROP,
+@SISOFilter( category=FilterCategory.GENERIC_PROCESSING,
decoratedLabel="Create Constant Attribute Per Region",
decoratedType=[ "vtkMultiBlockDataSet", "vtkDataSet" ] )
class PVCreateConstantAttributePerRegion( VTKPythonAlgorithmBase ):
diff --git a/geos-pv/src/geos/pv/plugins/PVFillPartialArrays.py b/geos-pv/src/geos/pv/plugins/generic_processing/PVFillPartialArrays.py
similarity index 90%
rename from geos-pv/src/geos/pv/plugins/PVFillPartialArrays.py
rename to geos-pv/src/geos/pv/plugins/generic_processing/PVFillPartialArrays.py
index 80d8fb937..76b892955 100644
--- a/geos-pv/src/geos/pv/plugins/PVFillPartialArrays.py
+++ b/geos-pv/src/geos/pv/plugins/generic_processing/PVFillPartialArrays.py
@@ -27,23 +27,23 @@
from geos.pv.utils.details import SISOFilter, FilterCategory
from geos.processing.generic_processing_tools.FillPartialArrays import FillPartialArrays
-__doc__ = """
+__doc__ = f"""
Fill partial arrays of input mesh.
Input and output are vtkMultiBlockDataSet.
To use it:
-* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVFillPartialArrays.
-* Select the input mesh.
-* Select the partial arrays to fill.
-* Set the filling value (defaults to nan).
-* Apply.
+* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/generic_processing/PVFillPartialArrays
+* Select the input mesh to process
+* Select the filter: Filters > { FilterCategory.GENERIC_PROCESSING.value } > Fill Partial Arrays
+* Set the partial attribute to fill and its filling values
+* Apply
"""
-@SISOFilter( category=FilterCategory.GEOS_UTILS,
+@SISOFilter( category=FilterCategory.GENERIC_PROCESSING,
decoratedLabel="Fill Partial Arrays",
decoratedType="vtkMultiBlockDataSet" )
class PVFillPartialArrays( VTKPythonAlgorithmBase ):
diff --git a/geos-pv/src/geos/pv/plugins/PVMergeBlocksEnhanced.py b/geos-pv/src/geos/pv/plugins/generic_processing/PVMergeBlocksEnhanced.py
similarity index 91%
rename from geos-pv/src/geos/pv/plugins/PVMergeBlocksEnhanced.py
rename to geos-pv/src/geos/pv/plugins/generic_processing/PVMergeBlocksEnhanced.py
index 3ebcd7ebb..4f4b3a04b 100644
--- a/geos-pv/src/geos/pv/plugins/PVMergeBlocksEnhanced.py
+++ b/geos-pv/src/geos/pv/plugins/generic_processing/PVMergeBlocksEnhanced.py
@@ -23,15 +23,16 @@
)
# Update sys.path to load all GEOS Python Package dependencies
-geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
+geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths
update_paths()
from geos.processing.generic_processing_tools.MergeBlockEnhanced import MergeBlockEnhanced
+from geos.pv.utils.details import FilterCategory
-__doc__ = """
+__doc__ = f"""
Merge Blocks Keeping Partial Attributes is a Paraview plugin filter that allows to merge blocks from a multiblock dataset while keeping partial attributes.
Input is a vtkMultiBlockDataSet and output is a vtkUnstructuredGrid.
@@ -42,9 +43,9 @@
To use it:
-* Load the module in Paraview: Tools > Manage Plugins... > Load new > PVMergeBlocksEnhanced
+* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/generic_processing/PVMergeBlocksEnhanced
* Select the multiblock dataset mesh you want to merge
-* Select Filters > 4- Geos Utils > Merge Blocks Keeping Partial Attributes
+* Select the filter: Filters > { FilterCategory.GENERIC_PROCESSING.value } > Merge Blocks Keeping Partial Attributes
* Apply
@@ -57,7 +58,7 @@
@smproxy.filter( name="PVMergeBlocksEnhanced", label="Merge Blocks Keeping Partial Attributes" )
-@smhint.xml( '' )
+@smhint.xml( f'' )
@smproperty.input( name="Input", port_index=0, label="Input" )
@smdomain.datatype( dataTypes=[ "vtkMultiBlockDataSet" ], composite_data_supported=True )
class PVMergeBlocksEnhanced( VTKPythonAlgorithmBase ):
diff --git a/geos-pv/src/geos/pv/plugins/PVSplitMesh.py b/geos-pv/src/geos/pv/plugins/generic_processing/PVSplitMesh.py
similarity index 81%
rename from geos-pv/src/geos/pv/plugins/PVSplitMesh.py
rename to geos-pv/src/geos/pv/plugins/generic_processing/PVSplitMesh.py
index 697cc2858..17201a3c6 100644
--- a/geos-pv/src/geos/pv/plugins/PVSplitMesh.py
+++ b/geos-pv/src/geos/pv/plugins/generic_processing/PVSplitMesh.py
@@ -13,7 +13,7 @@
from vtkmodules.vtkCommonDataModel import vtkPointSet
# update sys.path to load all GEOS Python Package dependencies
-geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
+geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths
@@ -22,21 +22,22 @@
from geos.processing.generic_processing_tools.SplitMesh import SplitMesh
from geos.pv.utils.details import ( SISOFilter, FilterCategory )
-__doc__ = """
+__doc__ = f"""
Split each cell of input mesh to smaller cells.
Output mesh is of same type as input mesh. If input mesh is a composite mesh, the plugin split cells of each part independently.
To use it:
-* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVSplitMesh.
-* Select the input mesh.
-* Apply the filter.
+* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/generic_processing/PVSplitMesh
+* Select the input mesh to process
+* Select the filter: Filters > { FilterCategory.GENERIC_PROCESSING.value } > Split Mesh
+* Apply
"""
-@SISOFilter( category=FilterCategory.GEOS_UTILS, decoratedLabel="Split Mesh", decoratedType="vtkPointSet" )
+@SISOFilter( category=FilterCategory.GENERIC_PROCESSING, decoratedLabel="Split Mesh", decoratedType="vtkPointSet" )
class PVSplitMesh( VTKPythonAlgorithmBase ):
def __init__( self: Self ) -> None:
diff --git a/geos-pv/src/geos/pv/plugins/generic_processing/__init__.py b/geos-pv/src/geos/pv/plugins/generic_processing/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/geos-pv/src/geos/pv/plugins/PVGeomechanicsCalculator.py b/geos-pv/src/geos/pv/plugins/post_processing/PVGeomechanicsCalculator.py
similarity index 97%
rename from geos-pv/src/geos/pv/plugins/PVGeomechanicsCalculator.py
rename to geos-pv/src/geos/pv/plugins/post_processing/PVGeomechanicsCalculator.py
index 829eeaa91..e6c0599ca 100644
--- a/geos-pv/src/geos/pv/plugins/PVGeomechanicsCalculator.py
+++ b/geos-pv/src/geos/pv/plugins/post_processing/PVGeomechanicsCalculator.py
@@ -18,7 +18,7 @@
from vtkmodules.vtkCommonDataModel import ( vtkUnstructuredGrid, vtkMultiBlockDataSet )
# update sys.path to load all GEOS Python Package dependencies
-geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
+geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths
@@ -34,7 +34,7 @@
from geos.processing.post_processing.GeomechanicsCalculator import GeomechanicsCalculator
from geos.pv.utils.details import ( SISOFilter, FilterCategory )
-__doc__ = """
+__doc__ = f"""
PVGeomechanicsCalculator is a paraview plugin that allows to compute additional geomechanics properties from existing ones in the mesh.
To compute the geomechanics outputs, the mesh must have the following properties:
@@ -68,9 +68,9 @@
To use it:
-* Load the module in Paraview: Tools > Manage Plugins... > Load new > PVGeomechanicsCalculator
+* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/post_processing/PVGeomechanicsCalculator
* Select the mesh you want to compute geomechanics properties on
-* Search Filters > Filter Category.GEOS_GEOMECHANICS > GEOS Geomechanics Calculator
+* Select the filter: Filters > { FilterCategory.GEOS_POST_PROCESSING.value } > GEOS Geomechanics Calculator
* Change the physical constants if needed
* Select computeAdvancedProperties to compute the advanced properties
* Apply
@@ -78,7 +78,7 @@
"""
-@SISOFilter( category=FilterCategory.GEOS_GEOMECHANICS,
+@SISOFilter( category=FilterCategory.GEOS_POST_PROCESSING,
decoratedLabel="GEOS Geomechanics Calculator",
decoratedType=[ "vtkUnstructuredGrid", "vtkMultiBlockDataSet" ] )
class PVGeomechanicsCalculator( VTKPythonAlgorithmBase ):
diff --git a/geos-pv/src/geos/pv/plugins/PVGeomechanicsWorkflow.py b/geos-pv/src/geos/pv/plugins/post_processing/PVGeomechanicsWorkflow.py
similarity index 94%
rename from geos-pv/src/geos/pv/plugins/PVGeomechanicsWorkflow.py
rename to geos-pv/src/geos/pv/plugins/post_processing/PVGeomechanicsWorkflow.py
index 992a73020..b69405e56 100644
--- a/geos-pv/src/geos/pv/plugins/PVGeomechanicsWorkflow.py
+++ b/geos-pv/src/geos/pv/plugins/post_processing/PVGeomechanicsWorkflow.py
@@ -9,7 +9,7 @@
from typing_extensions import Self
# update sys.path to load all GEOS Python Package dependencies
-geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
+geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths
@@ -22,9 +22,10 @@
WATER_DENSITY,
)
-from geos.pv.plugins.PVGeosBlockExtractAndMerge import PVGeosBlockExtractAndMerge
-from geos.pv.plugins.PVGeomechanicsCalculator import PVGeomechanicsCalculator
-from geos.pv.plugins.PVSurfaceGeomechanics import PVSurfaceGeomechanics
+from geos.pv.plugins.post_processing.PVGeosBlockExtractAndMerge import PVGeosBlockExtractAndMerge
+from geos.pv.plugins.post_processing.PVGeomechanicsCalculator import PVGeomechanicsCalculator
+from geos.pv.plugins.post_processing.PVSurfaceGeomechanics import PVSurfaceGeomechanics
+from geos.pv.utils.details import FilterCategory
from vtkmodules.vtkCommonCore import ( vtkInformation, vtkInformationVector )
from vtkmodules.vtkCommonDataModel import vtkMultiBlockDataSet
@@ -34,7 +35,7 @@
from paraview.detail.loghandler import ( # type: ignore[import-not-found]
VTKHandler )
-__doc__ = """
+__doc__ = f"""
PVGeomechanicsWorkflow is a Paraview plugin that executes multiple plugins:
1. PVGeosBlockExtractAndMerge
2. PVGeomechanicsCalculator
@@ -76,12 +77,12 @@
To use it:
-* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVGeomechanicsWorkflow.
-* Select the Geos output .pvd file loaded in Paraview.
-* Select Filters > 3- Geos Geomechanics > Geos Geomechanics Workflow.
+* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/post_processing/PVGeomechanicsWorkflow
+* Select the Geos output .pvd file loaded in Paraview to process
+* Select the filter: Filters > { FilterCategory.GEOS_POST_PROCESSING.value } > GEOS Geomechanics Workflow.
* Change the physical constants if needed
* Select computeAdvancedProperties to compute the advanced properties on volume mesh
-* Apply PVGeomechanicsWorkflow
+* Apply
"""
@@ -90,14 +91,14 @@
@smproxy.filter(
name="PVGeomechanicsWorkflow",
- label="Geos Geomechanics Workflow",
+ label="GEOS Geomechanics Workflow",
)
-@smproperty.xml( """
+@smproperty.xml( f"""
-
+
diff --git a/geos-pv/src/geos/pv/plugins/PVGeosBlockExtractAndMerge.py b/geos-pv/src/geos/pv/plugins/post_processing/PVGeosBlockExtractAndMerge.py
similarity index 95%
rename from geos-pv/src/geos/pv/plugins/PVGeosBlockExtractAndMerge.py
rename to geos-pv/src/geos/pv/plugins/post_processing/PVGeosBlockExtractAndMerge.py
index c779c5eb1..5fe97bca0 100644
--- a/geos-pv/src/geos/pv/plugins/PVGeosBlockExtractAndMerge.py
+++ b/geos-pv/src/geos/pv/plugins/post_processing/PVGeosBlockExtractAndMerge.py
@@ -11,7 +11,7 @@
from typing_extensions import Self
# update sys.path to load all GEOS Python Package dependencies
-geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
+geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths
@@ -26,6 +26,7 @@
from geos.pv.utils.paraviewTreatments import getTimeStepIndex
from geos.pv.utils.workflowFunctions import doExtractAndMerge
+from geos.pv.utils.details import FilterCategory
from vtkmodules.vtkCommonCore import ( vtkInformation, vtkInformationVector )
from vtkmodules.vtkCommonDataModel import vtkMultiBlockDataSet
@@ -35,7 +36,7 @@
from paraview.detail.loghandler import ( # type: ignore[import-not-found]
VTKHandler )
-__doc__ = """
+__doc__ = f"""
PVGeosBlockExtractAndMerge is a Paraview plugin processing the input mesh at the current time in two steps:
1. Extraction of domains (volume, fault and well) from a GEOS output multiBlockDataSet mesh
2. Actions on each region of a GEOS output domain (volume, fault, wells) to:
@@ -62,9 +63,11 @@
To use it:
-* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVGeosBlockExtractAndMerge.
-* Select the Geos output .pvd file loaded in Paraview.
-* Search and Apply PVGeosBlockExtractAndMerge Filter.
+* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/post_processing/PVGeosBlockExtractAndMerge
+* Select the Geos output .pvd file loaded in Paraview to process
+* Select the filter: Filters > { FilterCategory.GEOS_POST_PROCESSING.value } > GEOS Extract and Merge Blocks
+* Apply
+
"""
loggerTitle: str = "Extract & Merge GEOS Block"
@@ -72,14 +75,14 @@
@smproxy.filter(
name="PVGeosBlockExtractAndMerge",
- label="Geos Extract and Merge Blocks",
+ label="GEOS Extract and Merge Blocks",
)
-@smproperty.xml( """
+@smproperty.xml( f"""
-
+
diff --git a/geos-pv/src/geos/pv/plugins/PVGeosLogReader.py b/geos-pv/src/geos/pv/plugins/post_processing/PVGeosLogReader.py
similarity index 98%
rename from geos-pv/src/geos/pv/plugins/PVGeosLogReader.py
rename to geos-pv/src/geos/pv/plugins/post_processing/PVGeosLogReader.py
index 743d6dc2c..09c6293e5 100644
--- a/geos-pv/src/geos/pv/plugins/PVGeosLogReader.py
+++ b/geos-pv/src/geos/pv/plugins/post_processing/PVGeosLogReader.py
@@ -60,7 +60,7 @@
strListToEnumerationDomainXml, )
__doc__ = """
-``PVGeosLogReader`` is a Paraview plugin that allows to read Geos output log.
+``PVGeosLogReader`` is a Paraview plugin that allows to read GEOS output log.
Input is a file and output is a vtkTable containing log information.
@@ -70,8 +70,8 @@
To use it:
-* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVGeosLogReader.
-* Open (File>Open...) and Select Geos output log .out/.txt file.
+* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/post_processing/PVGeosLogReader
+* Open (File>Open...) and Select GEOS output log .out/.txt file
* In the "Open data with..." window, Select PVGeosLogReader reader.
"""
@@ -79,7 +79,7 @@
@smproxy.reader(
name="PVGeosLogReader",
- label="Geos Log Reader",
+ label="GEOS Log Reader",
extensions=[ "txt", "out" ],
file_description="txt and out files of GEOS log files",
)
diff --git a/geos-pv/src/geos/pv/plugins/PVMohrCirclePlot.py b/geos-pv/src/geos/pv/plugins/post_processing/PVMohrCirclePlot.py
similarity index 97%
rename from geos-pv/src/geos/pv/plugins/PVMohrCirclePlot.py
rename to geos-pv/src/geos/pv/plugins/post_processing/PVMohrCirclePlot.py
index d6efdfd57..76a92140e 100644
--- a/geos-pv/src/geos/pv/plugins/PVMohrCirclePlot.py
+++ b/geos-pv/src/geos/pv/plugins/post_processing/PVMohrCirclePlot.py
@@ -25,7 +25,7 @@
vtkUnstructuredGrid, )
# Update sys.path to load all GEOS Python Package dependencies
-geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
+geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths
@@ -61,8 +61,9 @@
optionEnumToXml,
)
from geos.pv.utils.mohrCircles.functionsMohrCircle import StressConventionEnum
+from geos.pv.utils.details import FilterCategory
-__doc__ = """
+__doc__ = f"""
PVMohrCirclePlot is a ParaView plugin that allows to compute and plot
Mohr's circles of selected cells and times from effective stress attribute.
@@ -78,20 +79,20 @@
.. Warning::
The whole ParaView pipeline will be executed for all timesteps present in the initial PVD file. Please be aware that the number of pipeline filters and timesteps should be as limited as possible. Otherwise, please consider going to get a cup of coffee.
-* Load the module in ParaView: Tools > Manage Plugins.... > Load new > PVMohrCirclePlot
+* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/post_processing/PVMohrCirclePlot
If you start from a raw GEOS output, execute the following steps before moving on.
- First, consider removing some unnecessary timesteps manually from the PVD file in order to reduce the calculation time and resources used in the following steps.
-- Load the data into ParaView, then apply the `PVGeosExtractMergeBlock*` plugin on it.
+- Load the data into ParaView, then apply the `PVGeosBLockExtractAndMerge` plugin on it.
- Select the filter output that you want to consider for the Mohr's circle plot.
-* Extract a few number of cells with the `ExtractSelection` ParaView Filter, then use the `MergeBlocks` ParaView Filter.
-* Select the resulting mesh in the pipeline.
-* Select Filters > 3- Geos Geomechanics > Plot Mohr's Circle.
+* Extract a few number of cells with the `ExtractSelection` ParaView Filter, then use the `MergeBlocks` ParaView Filter
+* Select the resulting mesh in the pipeline
+* Select the filter: Filters > { FilterCategory.GENERIC_PROCESSING.value } > Plot Mohr's Circle
* Select the cell Ids and time steps you want
-* (Optional) Set rock cohesion and/or friction angle.
-* Apply.
+* (Optional) Set rock cohesion and/or friction angle
+* Apply
@@ -103,8 +104,8 @@
@smproxy.filter( name="PVMohrCirclePlot", label="Plot Mohr's Circles" )
-@smhint.xml( """
-
+@smhint.xml( f"""
+
""" )
@smproperty.input( name="Input", port_index=0 )
@@ -303,7 +304,7 @@ def b05SetStressCompressionConvention( self: Self, useGeosConvention: bool ) ->
@smproperty.intvector( name="AnnotateCircles", label="Annotate Circles", default_values=1 )
@smdomain.xml( """""" )
def b06SetAnnotateCircles( self: Self, boolean: bool ) -> None:
- """Set option to add annotatations to circles.
+ """Set option to add annotations to circles.
Args:
boolean (bool): True to annotate circles, False otherwise.
diff --git a/geos-pv/src/geos/pv/plugins/PVSurfaceGeomechanics.py b/geos-pv/src/geos/pv/plugins/post_processing/PVSurfaceGeomechanics.py
similarity index 89%
rename from geos-pv/src/geos/pv/plugins/PVSurfaceGeomechanics.py
rename to geos-pv/src/geos/pv/plugins/post_processing/PVSurfaceGeomechanics.py
index 3999d620c..b6e24d85d 100644
--- a/geos-pv/src/geos/pv/plugins/PVSurfaceGeomechanics.py
+++ b/geos-pv/src/geos/pv/plugins/post_processing/PVSurfaceGeomechanics.py
@@ -14,7 +14,7 @@
VTKHandler, )
# update sys.path to load all GEOS Python Package dependencies
-geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
+geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths
from geos.pv.utils.details import ( SISOFilter, FilterCategory )
@@ -37,30 +37,29 @@
vtkPolyData,
)
-__doc__ = """
+__doc__ = f"""
PVSurfaceGeomechanics is a Paraview plugin that allows to compute
additional geomechanical attributes from the input surfaces, such as shear capacity utilization (SCU).
Input and output are vtkMultiBlockDataSet.
.. Important::
- - Please refer to the GeosExtractMergeBlockVolumeSurface* filters to provide the correct input.
+ - Please refer to the PVGeosBlockExtractAndMerge plugin to provide the correct input.
- This filter only works on triangles at the moment. Please apply a triangulation algorithm beforehand if required.
To use it:
-* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVSurfaceGeomechanics.
-* Select any pipeline child of the second ouput from
- GeosExtractMergeBlocksVolumeSurface* filter.
-* Select Filters > 3- Geos Geomechanics > Geos Surface Geomechanics.
-* (Optional) Set rock cohesion and/or friction angle.
-* Apply.
+* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/post_processing/PVSurfaceGeomechanics
+* Select any pipeline child "Fault" from PVGeosBlockExtractAndMerge plugin
+* Select the filter: Filters > { FilterCategory.GENERIC_PROCESSING.value } > GEOS Surface Geomechanics
+* (Optional) Set rock cohesion and/or friction angle
+* Apply
"""
-@SISOFilter( category=FilterCategory.GEOS_GEOMECHANICS,
- decoratedLabel="Geos Surface Geomechanics",
+@SISOFilter( category=FilterCategory.GEOS_POST_PROCESSING,
+ decoratedLabel="GEOS Surface Geomechanics",
decoratedType="vtkMultiBlockDataSet" )
class PVSurfaceGeomechanics( VTKPythonAlgorithmBase ):
diff --git a/geos-pv/src/geos/pv/plugins/post_processing/__init__.py b/geos-pv/src/geos/pv/plugins/post_processing/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/geos-pv/src/geos/pv/plugins/pre_processing/__init__.py b/geos-pv/src/geos/pv/plugins/pre_processing/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/geos-pv/src/geos/pv/plugins/PVCellTypeCounterEnhanced.py b/geos-pv/src/geos/pv/plugins/qc/PVCellTypeCounterEnhanced.py
similarity index 93%
rename from geos-pv/src/geos/pv/plugins/PVCellTypeCounterEnhanced.py
rename to geos-pv/src/geos/pv/plugins/qc/PVCellTypeCounterEnhanced.py
index ad237bd83..e2db721e4 100644
--- a/geos-pv/src/geos/pv/plugins/PVCellTypeCounterEnhanced.py
+++ b/geos-pv/src/geos/pv/plugins/qc/PVCellTypeCounterEnhanced.py
@@ -15,7 +15,7 @@
from vtkmodules.vtkCommonDataModel import vtkPointSet, vtkTable
# update sys.path to load all GEOS Python Package dependencies
-geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
+geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths
@@ -23,21 +23,23 @@
from geos.processing.pre_processing.CellTypeCounterEnhanced import CellTypeCounterEnhanced
from geos.mesh.model.CellTypeCounts import CellTypeCounts
+from geos.pv.utils.details import FilterCategory
-__doc__ = """
+__doc__ = f"""
The ``Cell Type Counter Enhanced`` filter computes cell type counts. Counts can be exported into a file easily.
To use it:
-* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVCellTypeCounterEnhanced.
-* Select the input mesh.
-* Apply the filter.
+* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/qc/PVCellTypeCounterEnhanced
+* Select the input mesh to process
+* Select the filter: Filters > { FilterCategory.QC.value } > Cell Type Counter Enhanced
+* Apply
"""
@smproxy.filter( name="PVCellTypeCounterEnhanced", label="Cell Type Counter Enhanced" )
-@smhint.xml( '' )
+@smhint.xml( f'' )
@smproperty.input( name="Input", port_index=0 )
@smdomain.datatype(
dataTypes=[ "vtkUnstructuredGrid" ],
diff --git a/geos-pv/src/geos/pv/plugins/PVMeshQualityEnhanced.py b/geos-pv/src/geos/pv/plugins/qc/PVMeshQualityEnhanced.py
similarity index 97%
rename from geos-pv/src/geos/pv/plugins/PVMeshQualityEnhanced.py
rename to geos-pv/src/geos/pv/plugins/qc/PVMeshQualityEnhanced.py
index 9384f92fb..b671e640b 100644
--- a/geos-pv/src/geos/pv/plugins/PVMeshQualityEnhanced.py
+++ b/geos-pv/src/geos/pv/plugins/qc/PVMeshQualityEnhanced.py
@@ -33,7 +33,7 @@
from geos.pv.utils.paraviewTreatments import getArrayChoices
from geos.pv.utils.details import ( SISOFilter, FilterCategory )
-__doc__ = """
+__doc__ = f"""
The ``Mesh Quality Enhanced`` filter computes requested mesh quality metrics on meshes. Both surfaces and volumic metrics can be computed with this plugin.
The output stats are available as attributes of the filter output mesh and can be exported from spreadsheet.
@@ -44,11 +44,12 @@
To use it:
-* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVMeshQualityEnhanced.
-* Select the input mesh.
-* Select the metrics to compute.
-* Choose a filename for export if needed.
-* Apply the filter.
+* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/qc/PVMeshQualityEnhanced
+* Select the input mesh to process
+* Select the filter: Filters > { FilterCategory.QC.value } > Mesh Quality Enhanced
+* Select the metrics to compute
+* Choose a filename for export if needed
+* Apply
.. IMPORTANT::
@@ -56,7 +57,7 @@
"""
-@SISOFilter( category=FilterCategory.GEOS_QC,
+@SISOFilter( category=FilterCategory.QC,
decoratedLabel="Mesh Quality Enhanced",
decoratedType="vtkUnstructuredGrid" )
class PVMeshQualityEnhanced( VTKPythonAlgorithmBase ):
diff --git a/geos-pv/src/geos/pv/plugins/PVPythonViewConfigurator.py b/geos-pv/src/geos/pv/plugins/qc/PVPythonViewConfigurator.py
similarity index 96%
rename from geos-pv/src/geos/pv/plugins/PVPythonViewConfigurator.py
rename to geos-pv/src/geos/pv/plugins/qc/PVPythonViewConfigurator.py
index b03f001b7..c65c00270 100755
--- a/geos-pv/src/geos/pv/plugins/PVPythonViewConfigurator.py
+++ b/geos-pv/src/geos/pv/plugins/qc/PVPythonViewConfigurator.py
@@ -10,7 +10,7 @@
from typing_extensions import Self
# update sys.path to load all GEOS Python Package dependencies
-geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
+geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths
@@ -51,7 +51,7 @@
)
from geos.pv.utils.details import SISOFilter, FilterCategory
-__doc__ = """
+__doc__ = f"""
PVPythonViewConfigurator is a Paraview plugin that allows to create cross-plots
from input data using the PythonView.
@@ -61,14 +61,16 @@
To use it:
-* Load the module in Paraview: Tools>Manage Plugins...>Load new>PVPythonViewConfigurator.
-* Select the vtkDataObject containing the data to plot.
-* Search and Apply PVPythonViewConfigurator Filter.
+* Load the plugin in Paraview: Tools > Manage Plugins ... > Load New ... > .../geosPythonPackages/geos-pv/src/geos/pv/plugins/qc/PVPythonViewConfigurator.
+* Select the vtkDataObject containing the data to plot
+* Select the filter: Filters > { FilterCategory.QC.value } > Python View Configurator
+* Configure the plot with the widgets
+* Apply
"""
-@SISOFilter( category=FilterCategory.GEOS_UTILS,
+@SISOFilter( category=FilterCategory.QC,
decoratedLabel="Python View Configurator",
decoratedType="vtkDataObject" )
class PVPythonViewConfigurator( VTKPythonAlgorithmBase ):
diff --git a/geos-pv/src/geos/pv/plugins/qc/__init__.py b/geos-pv/src/geos/pv/plugins/qc/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/geos-pv/src/geos/pv/utils/details.py b/geos-pv/src/geos/pv/utils/details.py
index 57a3d83e3..5116bd0bb 100644
--- a/geos-pv/src/geos/pv/utils/details.py
+++ b/geos-pv/src/geos/pv/utils/details.py
@@ -13,10 +13,7 @@
VTKPythonAlgorithmBase, smdomain, smhint, smproperty, smproxy,
) # source: https://github.com/Kitware/ParaView/blob/master/Wrapping/Python/paraview/util/vtkAlgorithm.py
-from vtkmodules.vtkCommonDataModel import (
- vtkMultiBlockDataSet,
- vtkDataObject,
-)
+from vtkmodules.vtkCommonDataModel import vtkDataObject
from vtkmodules.vtkCommonCore import (
vtkInformation,
@@ -30,7 +27,7 @@
from geos.pv.utils.details import SISOFilter, FilterCategory
- @SISO(category=FilterCategory.GEOS_UTILS,decoratedLabel='Awesome Filter',decoratedType='vtkMultiBlockDataSet')
+ @SISO(category=FilterCategory.GEOS_POST_PROCESSING,decoratedLabel='Awesome Filter',decoratedType='vtkMultiBlockDataSet')
class PVMyFilter:
...
@@ -40,12 +37,10 @@ class PVMyFilter:
# Enum for filter categories
class FilterCategory( str, Enum ):
"""String Enum to sort into category in PV task bar under Plugins."""
- GEOS_PROP = '0- Geos Pre-processing'
- GEOS_MESH = '1- Geos Mesh'
- GEOS_GEOMECHANICS = '2- Geos Geomechanics'
- GEOS_PV = '3- Geos PV'
- GEOS_UTILS = '4- Geos Utils'
- GEOS_QC = '5- Geos QC'
+ GENERIC_PROCESSING = "0- Generic-Processing"
+ GEOS_PRE_PROCESSING = "1- GEOS Pre-Processing"
+ GEOS_POST_PROCESSING = "2- GEOS Post-Processing"
+ QC = "3- QC"
# Add more as needed
@@ -89,7 +84,7 @@ def __init__( self, *ar: Any, **kw: Any ) -> None:
"""Pre-init the filter with the Base algo and I/O single type (usually vtkMultiBlockDataSet).
Args:
- ar : Fowarded arguments
+ ar : Forwarded arguments
kw : Forwarded keywords args
"""
VTKPythonAlgorithmBase.__init__(
@@ -145,8 +140,9 @@ def RequestData(
Returns:
int: 1 if calculation successfully ended, 0 otherwise.
"""
- inputMesh: vtkMultiBlockDataSet = self.GetInputData( inInfoVec, 0, 0 )
- outputMesh: vtkMultiBlockDataSet = self.GetOutputData( outInfoVec, 0 )
+ inputMesh = self.GetInputData( inInfoVec, 0, 0 )
+ outputMesh = self.GetOutputData( outInfoVec, 0 )
+
assert inputMesh is not None, "Input server mesh is null."
assert outputMesh is not None, "Output pipeline is null."