mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-10 23:46:00 -06:00
#1314 use of abs() is unsafe on linux. Ends up with integer abs() fossibly due to a different default <math.h> include behaviour. Changed to fabs
This commit is contained in:
parent
4c8e1e2bcd
commit
ef32c8bdc5
@ -689,7 +689,7 @@ void RigAccWellFlowCalculator::sortTracers()
|
|||||||
|
|
||||||
double totalFlow = 0.0;
|
double totalFlow = 0.0;
|
||||||
|
|
||||||
if (mainBranchAccFlow.size()) totalFlow = - abs( mainBranchAccFlow.back() ); // Based on size in reverse order (biggest to least)
|
if (mainBranchAccFlow.size()) totalFlow = - fabs( mainBranchAccFlow.back() ); // Based on size in reverse order (biggest to least)
|
||||||
|
|
||||||
sortedTracers.insert({totalFlow, tracerName});
|
sortedTracers.insert({totalFlow, tracerName});
|
||||||
}
|
}
|
||||||
@ -722,7 +722,7 @@ void RigAccWellFlowCalculator::groupSmallContributions()
|
|||||||
|
|
||||||
for ( const auto& tracerPair : totalTracerFractions )
|
for ( const auto& tracerPair : totalTracerFractions )
|
||||||
{
|
{
|
||||||
if ( abs(tracerPair.second) <= m_smallContributionsThreshold
|
if ( fabs(tracerPair.second) <= m_smallContributionsThreshold
|
||||||
&& (hasConsistentWellFlow || tracerPair.first != RIG_RESERVOIR_TRACER_NAME) ) // Do not group the Reservoir tracer if the well flow is inconsistent, because cross flow is shown as the reservoir fraction
|
&& (hasConsistentWellFlow || tracerPair.first != RIG_RESERVOIR_TRACER_NAME) ) // Do not group the Reservoir tracer if the well flow is inconsistent, because cross flow is shown as the reservoir fraction
|
||||||
{
|
{
|
||||||
tracersToGroup.push_back(tracerPair.first);
|
tracersToGroup.push_back(tracerPair.first);
|
||||||
|
Loading…
Reference in New Issue
Block a user