mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-09 23:53:04 -06:00
#2294 Add a method to access Eclipse results in a convenient manner.
This commit is contained in:
parent
82d8b7c98a
commit
27835aceae
@ -723,6 +723,26 @@ const RigCaseCellResultsData* RigEclipseCaseData::results(RiaDefines::PorosityMo
|
||||
return m_fractureModelResults.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const std::vector<double>* RigEclipseCaseData::resultValues(RiaDefines::PorosityModelType porosityModel,
|
||||
RiaDefines::ResultCatType type,
|
||||
const QString& resultName,
|
||||
size_t timeStepIndex)
|
||||
{
|
||||
RigCaseCellResultsData* gridCellResults = this->results(porosityModel);
|
||||
size_t scalarResultIndex = gridCellResults->findOrLoadScalarResult(type, resultName);
|
||||
|
||||
const std::vector<double>* swatResults = nullptr;
|
||||
if (scalarResultIndex != cvf::UNDEFINED_SIZE_T)
|
||||
{
|
||||
swatResults = &(gridCellResults->cellScalarResults(scalarResultIndex, timeStepIndex));
|
||||
}
|
||||
|
||||
return swatResults;
|
||||
}
|
||||
|
||||
/*
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
|
@ -73,6 +73,10 @@ public:
|
||||
|
||||
RigCaseCellResultsData* results(RiaDefines::PorosityModelType porosityModel);
|
||||
const RigCaseCellResultsData* results(RiaDefines::PorosityModelType porosityModel) const;
|
||||
const std::vector<double>* resultValues(RiaDefines::PorosityModelType porosityModel,
|
||||
RiaDefines::ResultCatType type,
|
||||
const QString& resultName,
|
||||
size_t timeStepIndex);
|
||||
|
||||
RigActiveCellInfo* activeCellInfo(RiaDefines::PorosityModelType porosityModel);
|
||||
const RigActiveCellInfo* activeCellInfo(RiaDefines::PorosityModelType porosityModel) const;
|
||||
|
Loading…
Reference in New Issue
Block a user