mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
Fill statistical values with infinity if no values could be calculated
If percentiles could not be calculated (e.g. not enough data points or infinity in any of the input values), fill with infinity to indicate missing data. The previous solution caused no statistical curves to be displayed due to wrong number of elements in the percentile vector. Seen in regression test "ProjectFiles2024Tests\TestCase_Ensemble"
This commit is contained in:
1 parent
71b734efec
commit
b262527812
1 file changed
+9
@@ -287,6 +287,15 @@ void RimEnsembleStatisticsCase::calculate( const std::vector<RimSummaryCase*>& s
|
||||
m_percentileData[m_requestedPercentiles[i]].push_back( percentileValues[i] );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// If percentiles could not be calculated (e.g. not enough data points or infinity in any of the input values), fill with
|
||||
// infinity to indicate missing data.
|
||||
for ( size_t i = 0; i < m_requestedPercentiles.size(); i++ )
|
||||
{
|
||||
m_percentileData[m_requestedPercentiles[i]].push_back( std::numeric_limits<double>::infinity() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool showDebugTiming = false;
|
||||
|
||||
Reference in new issue
Block a user