mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improved logarithmic color legends for zero and negative values
p4#: 21804
This commit is contained in:
@@ -334,3 +334,29 @@ void RimCellEdgeResultSlot::minMaxCellEdgeValues(double& min, double& max)
|
||||
max = globalMax;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCellEdgeResultSlot::posNegClosestToZero(double& pos, double& neg)
|
||||
{
|
||||
pos = HUGE_VAL;
|
||||
neg = -HUGE_VAL;
|
||||
|
||||
size_t resultIndices[6];
|
||||
this->gridScalarIndices(resultIndices);
|
||||
|
||||
size_t idx;
|
||||
for (idx = 0; idx < 6; idx++)
|
||||
{
|
||||
if (resultIndices[idx] == cvf::UNDEFINED_SIZE_T) continue;
|
||||
|
||||
{
|
||||
double localPos, localNeg;
|
||||
m_reservoirView->currentGridCellResults()->cellResults()->posNegClosestToZero(resultIndices[idx], localPos, localNeg);
|
||||
|
||||
if (localPos > 0 && localPos < pos) pos = localPos;
|
||||
if (localNeg < 0 && localNeg > neg) neg = localNeg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user