From ceec6cb9ec709ab55855660248fc554a492637f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rnar=20Grip=20Fj=C3=A6r?= Date: Wed, 29 Mar 2017 11:21:06 +0200 Subject: [PATCH] #1353 Compute valid statistics for parameters with results for all cells --- .../RigEclipseNativeVisibleCellsStatCalc.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/ReservoirDataModel/RigEclipseNativeVisibleCellsStatCalc.h b/ApplicationCode/ReservoirDataModel/RigEclipseNativeVisibleCellsStatCalc.h index f5a229a04f..beb4283b9e 100644 --- a/ApplicationCode/ReservoirDataModel/RigEclipseNativeVisibleCellsStatCalc.h +++ b/ApplicationCode/ReservoirDataModel/RigEclipseNativeVisibleCellsStatCalc.h @@ -64,7 +64,11 @@ private: { if (!(*m_cellVisibilities)[cIdx]) continue; - size_t cellResultIndex = actCellInfo->cellResultIndex(cIdx); + size_t cellResultIndex = cIdx; + if (m_caseData->isUsingGlobalActiveIndex(m_scalarResultIndex)) + { + cellResultIndex = actCellInfo->cellResultIndex(cIdx); + } if (cellResultIndex != cvf::UNDEFINED_SIZE_T) accumulator.addValue(values[cellResultIndex]); }