From 9d83299da9329e76b71c20adc4fb4da11f426aab Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 6 Dec 2017 08:09:54 +0100 Subject: [PATCH] Statistics : Skip computation of mobile pore volume, as base data is not available --- .../ReservoirDataModel/RigEclipseNativeStatCalc.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseNativeStatCalc.cpp b/ApplicationCode/ReservoirDataModel/RigEclipseNativeStatCalc.cpp index 3c5e077e04..81a07041c6 100644 --- a/ApplicationCode/ReservoirDataModel/RigEclipseNativeStatCalc.cpp +++ b/ApplicationCode/ReservoirDataModel/RigEclipseNativeStatCalc.cpp @@ -103,6 +103,13 @@ void RigEclipseNativeStatCalc::mobileVolumeWeightedMean(size_t timeStepIndex, do { size_t mobPVResultIndex = m_resultsData->findOrLoadScalarResult(RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::mobilePoreVolumeName()); + // For statistics result cases, the pore volume is not available, as RigCaseCellResultsData::createPlaceholderResultEntries + // has not been executed + if (mobPVResultIndex == cvf::UNDEFINED_SIZE_T) + { + return; + } + const std::vector& weights = m_resultsData->cellScalarResults(mobPVResultIndex, 0); const std::vector& values = m_resultsData->cellScalarResults(m_scalarResultIndex, timeStepIndex);