mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
2d Maps: Make Tops and Depth work right
This commit is contained in:
parent
0880fd5dec
commit
39ed7ad5d3
@ -129,7 +129,10 @@ double Rim2dGridProjection::maxValue() const
|
|||||||
{
|
{
|
||||||
for (uint j = 0; j < gridSize.y(); ++j)
|
for (uint j = 0; j < gridSize.y(); ++j)
|
||||||
{
|
{
|
||||||
maxV = std::max(maxV, value(i, j));
|
if (hasResultAt(i, j))
|
||||||
|
{
|
||||||
|
maxV = std::max(maxV, value(i, j));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return maxV;
|
return maxV;
|
||||||
@ -146,7 +149,10 @@ double Rim2dGridProjection::minValue() const
|
|||||||
{
|
{
|
||||||
for (uint j = 0; j < gridSize.y(); ++j)
|
for (uint j = 0; j < gridSize.y(); ++j)
|
||||||
{
|
{
|
||||||
minV = std::min(minV, value(i, j));
|
if (hasResultAt(i, j))
|
||||||
|
{
|
||||||
|
minV = std::min(minV, value(i, j));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return minV;
|
return minV;
|
||||||
@ -211,20 +217,19 @@ double Rim2dGridProjection::value(uint i, uint j) const
|
|||||||
}
|
}
|
||||||
avgValue = calculator.weightedMean();
|
avgValue = calculator.weightedMean();
|
||||||
|
|
||||||
|
switch (m_resultAggregation())
|
||||||
|
{
|
||||||
|
case RESULTS_MEAN_VALUE:
|
||||||
|
return avgValue;
|
||||||
|
case RESULTS_MAX_VALUE:
|
||||||
|
return maxValue;
|
||||||
|
case RESULTS_MIN_VALUE:
|
||||||
|
return minValue;
|
||||||
|
default:
|
||||||
|
CVF_TIGHT_ASSERT(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return std::numeric_limits<double>::infinity();
|
||||||
switch (m_resultAggregation())
|
|
||||||
{
|
|
||||||
case RESULTS_MEAN_VALUE:
|
|
||||||
return avgValue;
|
|
||||||
case RESULTS_MAX_VALUE:
|
|
||||||
return maxValue;
|
|
||||||
case RESULTS_MIN_VALUE:
|
|
||||||
return minValue;
|
|
||||||
default:
|
|
||||||
CVF_TIGHT_ASSERT(false);
|
|
||||||
}
|
|
||||||
return 0.0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user