Add support for Reservoir Grid Ensembles

Introduce RimReservoirGridEnsemble and RimReservoirGridEnsembleBase to manage ensembles of grid-only Eclipse cases. Enable detection of identical grids for shared operations and statistics. Integrate grid ensembles into project structure, UI, and menu system. Refactor statistics and view handling to support both case groups and grid ensembles via a common interface. Add deferred grid loading, robust case referencing, and migration for well data source fields. New features and menu items allow creation and management of grid ensembles from file sets, enabling new workflows for grid-only ensemble analysis.
This commit is contained in:
Magne Sjaastad committed 2026-02-13 14:35:52 +01:00
1 parent 5819c14034
commit aa3372efce
35 files changed
+1704 -195

No files matched your search

@@ -0,0 +1,50 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2026 Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RimReservoirGridEnsembleBase.h"
#include "RimCaseCollection.h"
#include "RimEclipseStatisticsCase.h"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimEclipseStatisticsCase* RimReservoirGridEnsembleBase::createAndAppendStatisticsCase()
{
auto* statsColl = statisticsCaseCollection();
if ( !statsColl ) return nullptr;
RimEclipseStatisticsCase* newStatisticsCase = new RimEclipseStatisticsCase;
newStatisticsCase->setCaseUserDescription( QString( "Statistics " ) + QString::number( statsColl->reservoirs.size() + 1 ) );
statsColl->reservoirs.push_back( newStatisticsCase );
newStatisticsCase->populateResultSelectionAfterLoadingGrid();
auto cases = sourceCases();
if ( !cases.empty() )
{
newStatisticsCase->setWellDataSourceCase( cases.front() );
}
newStatisticsCase->openEclipseGridFile();
newStatisticsCase->computeActiveCellsBoundingBox();
newStatisticsCase->selectAllTimeSteps();
return newStatisticsCase;
}