mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Support for loading only active cell geometry (#11624)
* Only load active cells for main grid, skip LGRs for now * Handle wells with inactive cells * Validate mapaxes transform before using it. * Add log message * Additional guarding when trying to find the geometrical location of a simulation cell * Add extra safeguarding for init/restart file access in opm common. Only support unified restart files.
This commit is contained in:
@@ -771,6 +771,12 @@ void RimEclipseCase::computeActiveCellsBoundingBox()
|
||||
|
||||
bool useOptimizedVersion = true;
|
||||
|
||||
const auto gridPref = RiaPreferencesGrid::current();
|
||||
if ( ( gridPref != nullptr ) && ( gridPref->gridModelReader() == RiaDefines::GridModelReader::OPM_COMMON ) )
|
||||
{
|
||||
useOptimizedVersion = !gridPref->onlyLoadActiveCells();
|
||||
}
|
||||
|
||||
if ( auto proj = RimProject::current() )
|
||||
{
|
||||
if ( proj->isProjectFileVersionEqualOrOlderThan( "2023.12.0" ) )
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "RifReaderEclipseRft.h"
|
||||
#include "RifReaderMockModel.h"
|
||||
#include "RifReaderOpmCommon.h"
|
||||
#include "RifReaderOpmCommonActive.h"
|
||||
#include "RifReaderOpmRft.h"
|
||||
|
||||
#include "RigCaseCellResultsData.h"
|
||||
@@ -188,7 +189,16 @@ bool RimEclipseResultCase::importGridAndResultMetaData( bool showTimeStepFilter
|
||||
}
|
||||
else
|
||||
{
|
||||
auto readerOpmCommon = new RifReaderOpmCommon();
|
||||
RifReaderOpmCommon* readerOpmCommon = nullptr;
|
||||
|
||||
if ( RiaPreferencesGrid::current()->onlyLoadActiveCells() )
|
||||
{
|
||||
readerOpmCommon = new RifReaderOpmCommonActive();
|
||||
}
|
||||
else
|
||||
{
|
||||
readerOpmCommon = new RifReaderOpmCommon();
|
||||
}
|
||||
|
||||
std::vector<QDateTime> timeSteps = readerOpmCommon->timeStepsOnFile( gridFileName() );
|
||||
m_timeStepFilter->setTimeStepsFromFile( timeSteps );
|
||||
|
||||
Reference in New Issue
Block a user