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:
jonjenssen
2024-08-28 18:22:57 +02:00
committed by GitHub
parent 27c46a65fd
commit 0572069511
24 changed files with 670 additions and 78 deletions

View File

@@ -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" ) )

View File

@@ -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 );