Use resolution enum in contourmaps (#12113)

* Use resolution enum in contourmaps
This commit is contained in:
jonjenssen authored and GitHub committed 2025-01-31 14:43:34 +01:00
1 parent 19a2c8b63d
commit 08c207e556
7 files changed
+17 -59

No files matched your search

@@ -60,9 +60,6 @@
CAF_CMD_SOURCE_INIT( RicNewContourMapViewFeature, "RicNewContourMapViewFeature" );
const size_t mediumSamplingThresholdCellCount = 500000u;
const size_t largeSamplingThresholdCellCount = 5000000u;
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -245,17 +242,6 @@ RimEclipseContourMapView* RicNewContourMapViewFeature::createEclipseContourMapFr
caf::PdmDefaultObjectFactory::instance() ) );
CVF_ASSERT( contourMap );
const RigActiveCellInfo* activeCellInfo = eclipseCase->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
size_t activeCellCount = activeCellInfo->reservoirActiveCellCount();
if ( activeCellCount >= largeSamplingThresholdCellCount )
{
contourMap->contourMapProjection()->setSampleSpacingFactor( 1.5 );
}
else if ( activeCellCount >= mediumSamplingThresholdCellCount )
{
contourMap->contourMapProjection()->setSampleSpacingFactor( 1.2 );
}
contourMap->setEclipseCase( eclipseCase );
auto col = RiuGuiTheme::getColorByVariableName( "backgroundColor2" );
@@ -330,17 +316,6 @@ RimEclipseContourMapView* RicNewContourMapViewFeature::createEclipseContourMap(
size_t i = eclipseCase->contourMapCollection()->views().size();
contourMap->setName( QString( "Contour Map %1" ).arg( i + 1 ) );
const RigActiveCellInfo* activeCellInfo = eclipseCase->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
size_t activeCellCount = activeCellInfo->reservoirActiveCellCount();
if ( activeCellCount >= largeSamplingThresholdCellCount )
{
contourMap->contourMapProjection()->setSampleSpacingFactor( 1.5 );
}
else if ( activeCellCount >= mediumSamplingThresholdCellCount )
{
contourMap->contourMapProjection()->setSampleSpacingFactor( 1.2 );
}
contourMap->faultCollection()->setActive( false );
contourMap->wellCollection()->isActive = false;