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
@ -128,10 +128,13 @@ double Rim2dGridProjection::maxValue() const
|
|||||||
for (uint i = 0; i < gridSize.x(); ++i)
|
for (uint i = 0; i < gridSize.x(); ++i)
|
||||||
{
|
{
|
||||||
for (uint j = 0; j < gridSize.y(); ++j)
|
for (uint j = 0; j < gridSize.y(); ++j)
|
||||||
|
{
|
||||||
|
if (hasResultAt(i, j))
|
||||||
{
|
{
|
||||||
maxV = std::max(maxV, value(i, j));
|
maxV = std::max(maxV, value(i, j));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return maxV;
|
return maxV;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -145,10 +148,13 @@ double Rim2dGridProjection::minValue() const
|
|||||||
for (uint i = 0; i < gridSize.x(); ++i)
|
for (uint i = 0; i < gridSize.x(); ++i)
|
||||||
{
|
{
|
||||||
for (uint j = 0; j < gridSize.y(); ++j)
|
for (uint j = 0; j < gridSize.y(); ++j)
|
||||||
|
{
|
||||||
|
if (hasResultAt(i, j))
|
||||||
{
|
{
|
||||||
minV = std::min(minV, value(i, j));
|
minV = std::min(minV, value(i, j));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return minV;
|
return minV;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,8 +217,6 @@ double Rim2dGridProjection::value(uint i, uint j) const
|
|||||||
}
|
}
|
||||||
avgValue = calculator.weightedMean();
|
avgValue = calculator.weightedMean();
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (m_resultAggregation())
|
switch (m_resultAggregation())
|
||||||
{
|
{
|
||||||
case RESULTS_MEAN_VALUE:
|
case RESULTS_MEAN_VALUE:
|
||||||
@ -224,7 +228,8 @@ double Rim2dGridProjection::value(uint i, uint j) const
|
|||||||
default:
|
default:
|
||||||
CVF_TIGHT_ASSERT(false);
|
CVF_TIGHT_ASSERT(false);
|
||||||
}
|
}
|
||||||
return 0.0;
|
}
|
||||||
|
return std::numeric_limits<double>::infinity();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user