mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-25 06:38:13 -05:00
#14709 RimReservoirGridEnsemble: Auto-import per-realization formation zone files
This commit is contained in:
1 parent
cb6807102c
commit
055fbb60fa
1 file changed
+8
@@ -37,6 +37,7 @@
|
||||
#include "EnsembleFileSet/RimEnsembleFileSetTools.h"
|
||||
#include "Formations/RimFormationNames.h"
|
||||
#include "Formations/RimFormationNamesCollection.h"
|
||||
#include "Formations/RimFormationTools.h"
|
||||
#include "Rim2dIntersectionViewCollection.h"
|
||||
#include "RimCaseCollection.h"
|
||||
#include "RimDataFilterCollection.h"
|
||||
@@ -1049,6 +1050,13 @@ void RimReservoirGridEnsemble::createCaseObjects()
|
||||
resultCase->setGridFileName( gridFile );
|
||||
// DO NOT call openEclipseGridFile() here - deferred loading
|
||||
|
||||
// Auto-import per-realization formation zone file (.lyr), if present next to the grid file.
|
||||
auto folderNames = RimFormationTools::formationFoldersFromCaseFileName( gridFile );
|
||||
if ( RimFormationNames* formations = RimFormationTools::loadFormationNamesFromFolder( folderNames ) )
|
||||
{
|
||||
resultCase->setFormationNames( formations );
|
||||
}
|
||||
|
||||
RimProject::current()->assignCaseIdToCase( resultCase );
|
||||
m_caseCollection->reservoirs().push_back( resultCase );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user