#4536 Make sure we guard against calculating Mobile Volume Weighted Mean for visible cell stats and not just all cell stats.

This commit is contained in:
Gaute Lindkvist
2019-08-03 16:08:07 +02:00
parent 25f13122a2
commit a9ee69587d
2 changed files with 22 additions and 1 deletions

View File

@@ -107,6 +107,13 @@ void RigEclipseNativeVisibleCellsStatCalc::mobileVolumeWeightedMean(size_t timeS
{
RigEclipseResultAddress mobPorvAddress(RiaDefines::ResultCatType::STATIC_NATIVE, RiaDefines::mobilePoreVolumeName());
// For statistics result cases, the pore volume is not available, as RigCaseCellResultsData::createPlaceholderResultEntries
// has not been executed
if (!m_caseData->ensureKnownResultLoaded(mobPorvAddress))
{
return;
}
m_caseData->ensureKnownResultLoaded(mobPorvAddress);
const std::vector<double>& weights = m_caseData->cellScalarResults(mobPorvAddress, 0);