Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
bb2911e
Move SurfaceGeomechanicsFilter and refactor functions
paloma-martinez Sep 9, 2025
391aeea
Move and refactor plugin
paloma-martinez Sep 9, 2025
176b508
add geos-processing to install script
paloma-martinez Sep 10, 2025
cd83faf
Merge branch 'main' into pmartinez/refactor/moveSurfaceGeomechanics
paloma-martinez Sep 10, 2025
8b72f3f
Add more log
paloma-martinez Sep 12, 2025
5bd267c
Add documentation
paloma-martinez Sep 18, 2025
4277ebb
Filter cleaning
paloma-martinez Oct 3, 2025
2e71538
Documentation
paloma-martinez Oct 3, 2025
4bdc33c
Merge branch 'main' into pmartinez/refactor/moveSurfaceGeomechanics
paloma-martinez Oct 3, 2025
b6f9d85
Refactor the basis change computation
paloma-martinez Oct 15, 2025
37e3fd6
Merge branch 'main' into pmartinez/refactor/moveSurfaceGeomechanics
paloma-martinez Oct 15, 2025
9c10aea
Refactor of normal and tangential vectors computation
paloma-martinez Oct 21, 2025
b2d6447
Merge branch 'main' into pmartinez/refactor/moveSurfaceGeomechanics
paloma-martinez Oct 21, 2025
4643add
Replace and add tests for attribute to vector functions
paloma-martinez Oct 29, 2025
64494c8
Add tests and better error handling
paloma-martinez Oct 29, 2025
98a825b
Adding tests for SurfaceGeomechanics filter
paloma-martinez Oct 29, 2025
c87b243
Merge branch 'main' into pmartinez/refactor/moveSurfaceGeomechanics
paloma-martinez Oct 29, 2025
52bcd56
Fix
paloma-martinez Oct 29, 2025
d3e4fc6
typo
paloma-martinez Oct 29, 2025
badc7cd
Small modifications from Romain review
paloma-martinez Oct 30, 2025
335782c
Fix typing and error in getTangents function
paloma-martinez Oct 31, 2025
359ceb0
Fix tests following previous commit modifs
paloma-martinez Oct 31, 2025
27ae09d
SISO filter
paloma-martinez Oct 31, 2025
58e30e3
fix docstring
paloma-martinez Oct 31, 2025
c56b2de
fix the fix
paloma-martinez Oct 31, 2025
cdd923c
typing
paloma-martinez Oct 31, 2025
24e4c5b
typing
paloma-martinez Oct 31, 2025
a7f17e0
Merge branch 'main' into pmartinez/refactor/moveSurfaceGeomechanics
paloma-martinez Oct 31, 2025
7e7eca1
.
paloma-martinez Oct 31, 2025
9df9481
Merge branch 'pmartinez/refactor/moveSurfaceGeomechanics' of https://…
paloma-martinez Oct 31, 2025
9243b3a
Move the plugins and adapt the import paths
paloma-martinez Oct 31, 2025
f014d46
Typing and doc move
paloma-martinez Oct 31, 2025
537bb8a
Merge branch 'main' into pmartinez/refactor/moveWorkflowPlugins
paloma-martinez Oct 31, 2025
0ff73c4
doc fix
paloma-martinez Oct 31, 2025
b9a0d5f
Fix doc
RomainBaville Oct 31, 2025
ac18a27
Fix GeomechanicsWorkflows
RomainBaville Oct 31, 2025
a3b23fa
fix conflict
RomainBaville Oct 31, 2025
f34ab9a
Merge branch 'pmartinez/refactor/moveWorkflowPlugins' of https://gith…
RomainBaville Oct 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 0 additions & 50 deletions docs/geos_posp_docs/PVplugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,59 +5,9 @@ Paraview plugins were developed using Python 3.9.13 and are compatible with Para

The plugins include:

* A reader that parse GEOS output log file;
* 3D mesh cleanning plugins;
* Processing plugins to compute additional geomechanical properties;
* Visualization plugins to plot Mohr's circles and cross plots using Paraview Python View.


PVExtractMergeBlocksVolume plugin
-------------------------------------------

.. automodule:: PVplugins.PVExtractMergeBlocksVolume


PVExtractMergeBlocksVolumeSurface plugin
--------------------------------------------------

.. automodule:: PVplugins.PVExtractMergeBlocksVolumeSurface


PVExtractMergeBlocksVolumeSurfaceWell plugin
------------------------------------------------------

.. automodule:: PVplugins.PVExtractMergeBlocksVolumeSurfaceWell


PVExtractMergeBlocksVolumeWell plugin
-----------------------------------------------

.. automodule:: PVplugins.PVExtractMergeBlocksVolumeWell

PVGeomechanicsWorkflowVolume plugin
---------------------------------------------

.. automodule:: PVplugins.PVGeomechanicsWorkflowVolume


PVGeomechanicsWorkflowVolumeSurface plugin
----------------------------------------------------

.. automodule:: PVplugins.PVGeomechanicsWorkflowVolumeSurface


PVGeomechanicsWorkflowVolumeSurfaceWell plugin
--------------------------------------------------------

.. automodule:: PVplugins.PVGeomechanicsWorkflowVolumeSurfaceWell


PVGeomechanicsWorkflowVolumeWell plugin
-------------------------------------------------

.. automodule:: PVplugins.PVGeomechanicsWorkflowVolumeWell


PVMohrCirclePlot plugin
---------------------------------

Expand Down
75 changes: 69 additions & 6 deletions docs/geos_pv_docs/processing.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
Post-/Pre-processing
=========================
The plugins include:

* A reader that parse GEOS output log file;
* 3D mesh cleanning plugins;
* Processing plugins to compute additional geomechanical properties;
* Visualization plugins to plot Mohr's circles (currently in `geos_posp`) and cross plots using Paraview Python View.


PVAttributeMapping
--------------------
Expand All @@ -19,12 +26,6 @@ PVFillPartialArrays
.. automodule:: geos.pv.plugins.PVFillPartialArrays


PVGeomechanicsCalculator plugin
---------------------------------------

.. automodule:: geos.pv.plugins.PVGeomechanicsCalculator


PVSplitMesh
----------------------------------

Expand All @@ -41,3 +42,65 @@ PVClipToMainFrame
----------------------------------

.. automodule:: geos.pv.plugins.PVClipToMainFrame


Geos output pre-processing
+++++++++++++++++++++++++++++

PVExtractMergeBlocksVolume plugin
-------------------------------------------

.. automodule:: geos.pv.plugins.PVExtractMergeBlocksVolume


PVExtractMergeBlocksVolumeSurface plugin
--------------------------------------------------

.. automodule:: geos.pv.plugins.PVExtractMergeBlocksVolumeSurface


PVExtractMergeBlocksVolumeSurfaceWell plugin
------------------------------------------------------

.. automodule:: geos.pv.plugins.PVExtractMergeBlocksVolumeSurfaceWell


PVExtractMergeBlocksVolumeWell plugin
-----------------------------------------------

.. automodule:: geos.pv.plugins.PVExtractMergeBlocksVolumeWell



Geomechanics workflows
++++++++++++++++++++++++


PVGeomechanicsWorkflowVolume plugin
---------------------------------------------

.. automodule:: geos.pv.plugins.PVGeomechanicsWorkflowVolume


PVGeomechanicsWorkflowVolumeSurface plugin
----------------------------------------------------

.. automodule:: geos.pv.plugins.PVGeomechanicsWorkflowVolumeSurface


PVGeomechanicsWorkflowVolumeSurfaceWell plugin
--------------------------------------------------------

.. automodule:: geos.pv.plugins.PVGeomechanicsWorkflowVolumeSurfaceWell


PVGeomechanicsWorkflowVolumeWell plugin
-------------------------------------------------

.. automodule:: geos.pv.plugins.PVGeomechanicsWorkflowVolumeWell


PVGeomechanicsCalculator plugin
---------------------------------------

.. automodule:: geos.pv.plugins.PVGeomechanicsCalculator
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
# SPDX-FileCopyrightText: Copyright 2023-2024 TotalEnergies.
# SPDX-FileContributor: Martin Lemay
# ruff: noqa: E402 # disable Module level import not at top of file
import os
import sys
from pathlib import Path
import numpy as np
import numpy.typing as npt
from typing_extensions import Self
from vtkmodules.vtkCommonCore import vtkInformation, vtkInformationVector
from vtkmodules.vtkCommonDataModel import vtkMultiBlockDataSet

dir_path = os.path.dirname( os.path.realpath( __file__ ) )
parent_dir_path = os.path.dirname( dir_path )
if parent_dir_path not in sys.path:
sys.path.append( parent_dir_path )
# update sys.path to load all GEOS Python Package dependencies
geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths

import PVplugins # noqa: F401
update_paths()

from geos.utils.GeosOutputsConstants import (
GeosMeshOutputsEnum,
Expand All @@ -28,7 +28,7 @@
copyAttribute,
createCellCenterAttribute,
)
from geos_posp.visu.PVUtils.paraviewTreatments import getTimeStepIndex
from geos.pv.utils.paraviewTreatments import getTimeStepIndex
from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found]
VTKPythonAlgorithmBase, smdomain, smhint, smproperty, smproxy,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
# SPDX-FileCopyrightText: Copyright 2023-2024 TotalEnergies.
# SPDX-FileContributor: Martin Lemay
# ruff: noqa: E402 # disable Module level import not at top of file
import os
import sys
from pathlib import Path

import numpy as np
import numpy.typing as npt
from typing_extensions import Self
from vtkmodules.vtkCommonCore import vtkInformation, vtkInformationVector
from vtkmodules.vtkCommonDataModel import vtkMultiBlockDataSet

dir_path = os.path.dirname( os.path.realpath( __file__ ) )
parent_dir_path = os.path.dirname( dir_path )
if parent_dir_path not in sys.path:
sys.path.append( parent_dir_path )
# update sys.path to load all GEOS Python Package dependencies
geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths

import PVplugins # noqa: F401
update_paths()

from geos.utils.GeosOutputsConstants import (
GeosMeshOutputsEnum,
Expand All @@ -29,7 +29,7 @@
copyAttribute,
createCellCenterAttribute,
)
from geos_posp.visu.PVUtils.paraviewTreatments import getTimeStepIndex
from geos.pv.utils.paraviewTreatments import getTimeStepIndex
from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found]
VTKPythonAlgorithmBase, smdomain, smhint, smproperty, smproxy,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
# SPDX-FileCopyrightText: Copyright 2023-2024 TotalEnergies.
# SPDX-FileContributor: Martin Lemay
# ruff: noqa: E402 # disable Module level import not at top of file
import os
import sys
from pathlib import Path

import numpy as np
import numpy.typing as npt
from typing_extensions import Self
from vtkmodules.vtkCommonCore import vtkInformation, vtkInformationVector
from vtkmodules.vtkCommonDataModel import vtkMultiBlockDataSet

dir_path = os.path.dirname( os.path.realpath( __file__ ) )
parent_dir_path = os.path.dirname( dir_path )
if parent_dir_path not in sys.path:
sys.path.append( parent_dir_path )
# update sys.path to load all GEOS Python Package dependencies
geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths

import PVplugins # noqa: F401
update_paths()

from geos.utils.GeosOutputsConstants import (
GeosMeshOutputsEnum,
Expand All @@ -29,7 +29,7 @@
copyAttribute,
createCellCenterAttribute,
)
from geos_posp.visu.PVUtils.paraviewTreatments import getTimeStepIndex
from geos.pv.utils.paraviewTreatments import getTimeStepIndex
from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found]
VTKPythonAlgorithmBase, smdomain, smhint, smproperty, smproxy,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# SPDX-FileCopyrightText: Copyright 2023-2024 TotalEnergies.
# SPDX-FileContributor: Martin Lemay
# ruff: noqa: E402 # disable Module level import not at top of file
import os
import sys
from pathlib import Path

import numpy as np
import numpy.typing as npt
Expand All @@ -14,12 +14,12 @@
from vtkmodules.vtkCommonCore import vtkInformation, vtkInformationVector
from vtkmodules.vtkCommonDataModel import vtkMultiBlockDataSet

dir_path = os.path.dirname( os.path.realpath( __file__ ) )
parent_dir_path = os.path.dirname( dir_path )
if parent_dir_path not in sys.path:
sys.path.append( parent_dir_path )
# update sys.path to load all GEOS Python Package dependencies
geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths

import PVplugins # noqa: F401
update_paths()

from geos.utils.GeosOutputsConstants import (
GeosMeshOutputsEnum,
Expand All @@ -32,7 +32,7 @@
copyAttribute,
createCellCenterAttribute,
)
from geos_posp.visu.PVUtils.paraviewTreatments import getTimeStepIndex
from geos.pv.utils.paraviewTreatments import getTimeStepIndex

__doc__ = """
PVExtractMergeBlocksVolumeWell is a Paraview plugin that allows to merge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
# SPDX-FileCopyrightText: Copyright 2023-2024 TotalEnergies.
# SPDX-FileContributor: Martin Lemay
# ruff: noqa: E402 # disable Module level import not at top of file
import os
import sys
from pathlib import Path

import numpy as np
from typing_extensions import Self
from vtkmodules.vtkCommonCore import vtkInformation, vtkInformationVector
from vtkmodules.vtkCommonDataModel import (
vtkMultiBlockDataSet, )

dir_path = os.path.dirname( os.path.realpath( __file__ ) )
parent_dir_path = os.path.dirname( dir_path )
if parent_dir_path not in sys.path:
sys.path.append( parent_dir_path )
# update sys.path to load all GEOS Python Package dependencies
geos_pv_path: Path = Path( __file__ ).parent.parent.parent.parent.parent
sys.path.insert( 0, str( geos_pv_path / "src" ) )
from geos.pv.utils.config import update_paths

import PVplugins # noqa: F401
update_paths()

from geos.utils.Logger import Logger, getLogger
from geos.utils.PhysicalConstants import (
Expand All @@ -29,12 +29,9 @@
from paraview.util.vtkAlgorithm import ( # type: ignore[import-not-found]
VTKPythonAlgorithmBase, smdomain, smhint, smproperty, smproxy,
)
from paraview.detail.loghandler import ( # type: ignore[import-not-found]
VTKHandler,
) # source: https://github.com/Kitware/ParaView/blob/master/Wrapping/Python/paraview/detail/loghandler.py

from PVplugins.PVExtractMergeBlocksVolume import PVExtractMergeBlocksVolume
from geos.processing.post_processing.GeomechanicsCalculator import GeomechanicsCalculator
from geos.pv.plugins.PVExtractMergeBlocksVolume import PVExtractMergeBlocksVolume
from geos.pv.plugins.PVGeomechanicsCalculator import PVGeomechanicsCalculator

__doc__ = """
PVGeomechanicsWorkflowVolume is a Paraview plugin that execute multiple filters
Expand Down Expand Up @@ -372,16 +369,14 @@ def computeAdditionalOutputsVolume( self: Self ) -> bool:
Returns:
bool: True if calculation successfully eneded, False otherwise.
"""
filter = GeomechanicsCalculator( self.m_volumeMesh,
computeAdvancedOutputs=self.getComputeAdvancedOutputs(),
speHandler=True )
if not filter.logger.hasHandlers():
filter.setLoggerHandler( VTKHandler() )
filter.physicalConstants.grainBulkModulus = self.grainBulkModulus
filter.physicalConstants.specificDensity = self.specificDensity
filter.physicalConstants.rockCohesion = self.rockCohesion
filter.physicalConstants.frictionAngle = self.frictionAngle
filter.applyFilter()
self.m_volumeMesh.ShallowCopy( filter.getOutput() )
filter = PVGeomechanicsCalculator()
filter.SetInputDataObject( self.m_volumeMesh ),
filter.setComputeAdvancedProperties( self.getComputeAdvancedOutputs() )
filter.setGrainBulkModulus( self.m_grainBulkModulus )
filter.setSpecificDensity = ( self.m_specificDensity )
filter.setRockCohesion = ( self.m_rockCohesion )
filter.setFrictionAngle = ( self.m_frictionAngle )
filter.Update()
self.m_volumeMesh.ShallowCopy( filter.GetOutputDataObject( 0 ) )
self.m_volumeMesh.Modified()
return True
Loading