mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-27 05:37:21 -05:00
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.
121 lines
4.1 KiB
C++
121 lines
4.1 KiB
C++
/////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Copyright (C) 2011- Statoil ASA
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
|
//
|
|
// 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.
|
|
//
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
|
|
#include "RiaDefines.h"
|
|
#include "RimEclipseStatisticsCase.h"
|
|
|
|
#include <cmath>
|
|
#include <vector>
|
|
|
|
class RigActiveCellInfo;
|
|
class RimEclipseCase;
|
|
class RigEclipseCaseData;
|
|
class RigCaseCellResultsData;
|
|
|
|
class RimStatisticsConfig
|
|
{
|
|
public:
|
|
RimStatisticsConfig()
|
|
: m_calculatePercentiles( true )
|
|
, m_pMinPos( 10.0 )
|
|
, m_pMidPos( 50.0 )
|
|
, m_pMaxPos( 90.0 )
|
|
, m_pValMethod( RimEclipseStatisticsCase::PercentileCalcType::INTERPOLATED_OBSERVATION )
|
|
{
|
|
}
|
|
|
|
public:
|
|
bool m_calculatePercentiles;
|
|
double m_pMinPos;
|
|
double m_pMidPos;
|
|
double m_pMaxPos;
|
|
RimEclipseStatisticsCase::PercentileCalcType m_pValMethod;
|
|
};
|
|
|
|
class RimEclipseStatisticsCaseEvaluator
|
|
{
|
|
public:
|
|
RimEclipseStatisticsCaseEvaluator( const std::vector<RimEclipseCase*>& sourceCases,
|
|
const std::vector<int>& timeStepIndices,
|
|
const RimStatisticsConfig& statisticsConfig,
|
|
RigEclipseCaseData* destinationCase,
|
|
RigActiveCellInfo* unionOfMatrixActiveCells,
|
|
RigActiveCellInfo* unionOfFractureActiveCells,
|
|
bool clearGridCalculationMemory );
|
|
|
|
struct ResSpec
|
|
{
|
|
ResSpec()
|
|
: m_resType( RiaDefines::ResultCatType::DYNAMIC_NATIVE )
|
|
, m_poroModel( RiaDefines::PorosityModelType::MATRIX_MODEL )
|
|
{
|
|
}
|
|
ResSpec( RiaDefines::PorosityModelType poroModel, RiaDefines::ResultCatType resType, QString resVarName )
|
|
: m_poroModel( poroModel )
|
|
, m_resType( resType )
|
|
, m_resVarName( resVarName )
|
|
{
|
|
}
|
|
|
|
RiaDefines::PorosityModelType m_poroModel;
|
|
RiaDefines::ResultCatType m_resType;
|
|
QString m_resVarName;
|
|
};
|
|
|
|
void useZeroAsValueForInActiveCellsBasedOnUnionOfActiveCells();
|
|
|
|
void evaluateForResults( const QList<ResSpec>& resultSpecification, RimEclipseView* filterView );
|
|
|
|
private:
|
|
void addNamedResults( const QList<ResSpec>& resultSpecification );
|
|
void addNamedResult( RigCaseCellResultsData* cellResults,
|
|
RiaDefines::ResultCatType resultType,
|
|
const QString& resultName,
|
|
size_t activeCellCount );
|
|
|
|
enum StatisticsParamType
|
|
{
|
|
MIN,
|
|
MAX,
|
|
SUM,
|
|
RANGE,
|
|
MEAN,
|
|
STDEV,
|
|
PMIN,
|
|
PMID,
|
|
PMAX,
|
|
STAT_PARAM_COUNT
|
|
};
|
|
|
|
private:
|
|
std::vector<RimEclipseCase*> m_sourceCases;
|
|
std::vector<int> m_timeStepIndices;
|
|
|
|
size_t m_reservoirCellCount;
|
|
RimStatisticsConfig m_statisticsConfig;
|
|
RigEclipseCaseData* m_destinationCase;
|
|
RigActiveCellInfo* m_unionOfMatrixActiveCells;
|
|
RigActiveCellInfo* m_unionOfFractureActiveCells;
|
|
bool m_useZeroAsInactiveCellValue;
|
|
bool m_clearGridCalculationMemory;
|
|
};
|