#1056 Flow diagnostics cell edge min/max in info box

This commit is contained in:
Magne Sjaastad
2017-01-11 20:44:32 +01:00
parent f16228ecc5
commit 392e08a2ab

View File

@@ -21,6 +21,7 @@
#include "RimCellEdgeColors.h"
#include "RigCaseCellResultsData.h"
#include "RigFlowDiagResults.h"
#include "RimEclipseCellColors.h"
#include "RimEclipseView.h"
@@ -436,6 +437,17 @@ void RimCellEdgeColors::minMaxCellEdgeValues(double& min, double& max)
globalMin = HUGE_VAL;
globalMax = -HUGE_VAL;
if (isUsingSingleVariable() && singleVarEdgeResultColors()->resultType() == RimDefines::FLOW_DIAGNOSTICS)
{
int currentTimeStep = m_reservoirView->currentTimeStep();
RigFlowDiagResults* fldResults = singleVarEdgeResultColors()->flowDiagSolution()->flowDiagResults();
RigFlowDiagResultAddress resAddr = singleVarEdgeResultColors()->flowDiagResAddress();
fldResults->minMaxScalarValues(resAddr, currentTimeStep, &globalMin, &globalMax);
}
else
{
size_t resultIndices[6];
this->gridScalarIndices(resultIndices);
@@ -453,6 +465,7 @@ void RimCellEdgeColors::minMaxCellEdgeValues(double& min, double& max)
}
}
}
min = globalMin;
max = globalMax;