mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#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:
parent
25f13122a2
commit
a9ee69587d
@ -48,6 +48,7 @@
|
||||
#include "RimEclipseContourMapView.h"
|
||||
#include "RimEclipseFaultColors.h"
|
||||
#include "RimEclipsePropertyFilterCollection.h"
|
||||
#include "RimEclipseStatisticsCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimFaultInViewCollection.h"
|
||||
#include "RimGeoMechCase.h"
|
||||
@ -926,6 +927,11 @@ void Rim3dOverlayInfoConfig::update3DInfo()
|
||||
RimEclipseView* reservoirView = dynamic_cast<RimEclipseView*>(m_viewDef.p());
|
||||
if (reservoirView)
|
||||
{
|
||||
const RimEclipseStatisticsCase* eclipseStat = dynamic_cast<const RimEclipseStatisticsCase*>(reservoirView->eclipseCase());
|
||||
if (eclipseStat)
|
||||
{
|
||||
m_showVolumeWeightedMean = false;
|
||||
}
|
||||
updateEclipse3DInfo(reservoirView);
|
||||
|
||||
// Update statistics dialog
|
||||
@ -933,6 +939,7 @@ void Rim3dOverlayInfoConfig::update3DInfo()
|
||||
}
|
||||
|
||||
RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>(m_viewDef.p());
|
||||
|
||||
if (geoMechView)
|
||||
{
|
||||
m_showVolumeWeightedMean = false;
|
||||
@ -964,11 +971,18 @@ void Rim3dOverlayInfoConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOr
|
||||
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>(m_viewDef.p());
|
||||
RimEclipseContourMapView* contourMap = dynamic_cast<RimEclipseContourMapView*>(eclipseView);
|
||||
RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>(m_viewDef.p());
|
||||
|
||||
bool isEclipseStatsCase = false;
|
||||
if (eclipseView)
|
||||
{
|
||||
isEclipseStatsCase = dynamic_cast<RimEclipseStatisticsCase*>(eclipseView->eclipseCase()) != nullptr;
|
||||
}
|
||||
|
||||
|
||||
visGroup->add(&m_showAnimProgress);
|
||||
visGroup->add(&m_showCaseInfo);
|
||||
visGroup->add(&m_showResultInfo);
|
||||
if (!geoMechView && !contourMap)
|
||||
if (!geoMechView && !contourMap && !isEclipseStatsCase)
|
||||
{
|
||||
visGroup->add(&m_showVolumeWeightedMean);
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user