#11088 Use non-optimized version for old projects to compute active cells BB

The performance to compute geometry BB for active cells has improved. The original code also set displayModelOffset based on the BB of active cells. To make sure that existing project files produce identically the the same, the non-optimized version is used in this case.
This commit is contained in:
Magne Sjaastad committed 2024-01-31 12:43:55 +01:00
1 parent 111eeb64b7
commit 5151717743
8 files changed
+97 -13

No files matched your search

@@ -626,7 +626,7 @@ void RimEclipseCase::computeCachedData()
{
auto task = pInf.task( "", 1 );
rigEclipseCase->computeActiveCellBoundingBoxes();
computeActiveCellsBoundingBox();
}
{
@@ -771,6 +771,26 @@ void RimEclipseCase::createDisplayModelAndUpdateAllViews()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimEclipseCase::computeActiveCellsBoundingBox()
{
if ( !eclipseCaseData() ) return;
bool useOptimizedVersion = true;
if ( auto proj = RimProject::current() )
{
if ( proj->isProjectFileVersionEqualOrOlderThan( "2023.12.0" ) )
{
useOptimizedVersion = false;
}
}
eclipseCaseData()->computeActiveCellBoundingBoxes( useOptimizedVersion );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -122,6 +122,7 @@ public:
void ensureFaultDataIsComputed();
bool ensureNncDataIsComputed();
void createDisplayModelAndUpdateAllViews();
void computeActiveCellsBoundingBox();
void setReaderSettings( std::shared_ptr<RifReaderSettings> readerSettings );
@@ -318,7 +318,7 @@ bool RimEclipseResultCase::openAndReadActiveCellData( RigEclipseCaseData* mainEc
CVF_ASSERT( eclipseCaseData() );
CVF_ASSERT( readerInterface.notNull() );
eclipseCaseData()->computeActiveCellBoundingBoxes();
computeActiveCellsBoundingBox();
m_activeCellInfoIsReadFromFile = true;
@@ -247,7 +247,7 @@ void RimIdenticalGridCaseGroup::loadMainCaseAndActiveCellInfo()
if ( i == 0 )
{
rimReservoir->eclipseCaseData()->computeActiveCellBoundingBoxes();
rimReservoir->computeActiveCellsBoundingBox();
}
}
}
@@ -375,7 +375,7 @@ void RimIdenticalGridCaseGroup::updateMainGridAndActiveCellsForStatisticsCases()
if ( i == 0 )
{
rimStaticsCase->eclipseCaseData()->computeActiveCellBoundingBoxes();
rimStaticsCase->computeActiveCellsBoundingBox();
}
}
}
@@ -432,7 +432,7 @@ RimEclipseStatisticsCase* RimIdenticalGridCaseGroup::createStatisticsCase( bool
if ( selectDefaultResults ) newStatisticsCase->populateResultSelectionAfterLoadingGrid();
newStatisticsCase->openEclipseGridFile();
newStatisticsCase->eclipseCaseData()->computeActiveCellBoundingBoxes();
newStatisticsCase->computeActiveCellsBoundingBox();
newStatisticsCase->selectAllTimeSteps();
return newStatisticsCase;