#14227 Compute depth-related geometry results once for both porosity models

The depth-related geometry results (DEPTH/DX/DY/DZ/TOPS/BOTTOM) are derived
purely from the shared grid geometry and were computed independently for the
matrix and fracture porosity models. For dual-porosity cases this recomputed the
identical per-cell geometry twice.

Replace the per-model computeDepthRelatedResults() with a single static routine
that traverses the shared main grid once, computing each cell's geometry a single
time and writing it to every porosity model in which the cell is active. The
per-property already-computed guards and the temporary-grid recompute path are
preserved, so the stored values are unchanged. All six matrix+fracture call sites
now go through a thin RigEclipseCaseData::computeDepthRelatedResults() wrapper.
This commit is contained in:
Kristian Bendiksen committed 2026-06-19 12:25:55 +02:00
1 parent f50b4d1291
commit a489db3e64
11 files changed
+167 -79

No files matched your search

@@ -380,8 +380,7 @@ void RimCornerPointCase::computeDepthRelatedResults( RimCornerPointCase& cornerP
{
if ( RiaPreferencesGrid::current()->autoComputeDepthRelatedProperties() )
{
cornerPointCase.results( RiaDefines::PorosityModelType::MATRIX_MODEL )->computeDepthRelatedResults();
cornerPointCase.results( RiaDefines::PorosityModelType::FRACTURE_MODEL )->computeDepthRelatedResults();
cornerPointCase.eclipseCaseData()->computeDepthRelatedResults();
}
}
@@ -226,8 +226,7 @@ bool RimEclipseInputCase::openEclipseGridFile()
if ( RiaPreferencesGrid::current()->autoComputeDepthRelatedProperties() )
{
results( RiaDefines::PorosityModelType::MATRIX_MODEL )->computeDepthRelatedResults();
results( RiaDefines::PorosityModelType::FRACTURE_MODEL )->computeDepthRelatedResults();
eclipseCaseData()->computeDepthRelatedResults();
}
results( RiaDefines::PorosityModelType::MATRIX_MODEL )->computeCellVolumes();
@@ -313,8 +313,7 @@ bool RimEclipseResultCase::importGridAndResultMetaData( bool showTimeStepFilter
if ( RiaPreferencesGrid::current()->autoComputeDepthRelatedProperties() )
{
results( RiaDefines::PorosityModelType::MATRIX_MODEL )->computeDepthRelatedResults();
results( RiaDefines::PorosityModelType::FRACTURE_MODEL )->computeDepthRelatedResults();
eclipseCaseData()->computeDepthRelatedResults();
}
results( RiaDefines::PorosityModelType::MATRIX_MODEL )->computeCellVolumes();
@@ -97,8 +97,7 @@ bool RimEmCase::openEclipseGridFile()
if ( RiaPreferencesGrid::current()->autoComputeDepthRelatedProperties() )
{
results( RiaDefines::PorosityModelType::MATRIX_MODEL )->computeDepthRelatedResults();
results( RiaDefines::PorosityModelType::FRACTURE_MODEL )->computeDepthRelatedResults();
eclipseCaseData()->computeDepthRelatedResults();
}
results( RiaDefines::PorosityModelType::MATRIX_MODEL )->computeCellVolumes();
@@ -99,8 +99,7 @@ bool RimRoffCase::openEclipseGridFile()
if ( RiaPreferencesGrid::current()->autoComputeDepthRelatedProperties() )
{
results( RiaDefines::PorosityModelType::MATRIX_MODEL )->computeDepthRelatedResults();
results( RiaDefines::PorosityModelType::FRACTURE_MODEL )->computeDepthRelatedResults();
eclipseCaseData()->computeDepthRelatedResults();
}
results( RiaDefines::PorosityModelType::MATRIX_MODEL )->computeCellVolumes();