#2294 Add a method to access Eclipse results in a convenient manner.

This commit is contained in:
Jacob Støren 2018-01-02 14:43:39 +01:00
parent 82d8b7c98a
commit 27835aceae
2 changed files with 24 additions and 0 deletions

View File

@ -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;
}
/*
//--------------------------------------------------------------------------------------------------
///

View File

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