mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 07:00:17 -05:00
#12495 Refactors ensemble statistics handling
Removes the dedicated `SUMMARY_ENSEMBLE_STATISTICS` category and instead uses a `statisticsType` field within `RifEclipseSummaryAddress` to represent ensemble statistics. This change simplifies the code and avoids potential confusion by representing statistics as attributes of existing summary types, rather than a separate category. It also improves code robustness.
This commit is contained in:
1 parent
84f9ad0dcd
commit
dc4cd33c6e
19 files changed
+165
-157
No files matched your search
+13
-10
@@ -49,16 +49,19 @@ std::pair<bool, std::vector<double>> RimEnsembleCrossPlotStatisticsCase::values(
|
||||
}
|
||||
}
|
||||
|
||||
auto quantityName = resultAddress.ensembleStatisticsVectorName();
|
||||
|
||||
if ( quantityName == RifEclipseSummaryAddressDefines::statisticsNameP10() )
|
||||
return { true, m_p10Data };
|
||||
else if ( quantityName == RifEclipseSummaryAddressDefines::statisticsNameP50() )
|
||||
return { true, m_p50Data };
|
||||
else if ( quantityName == RifEclipseSummaryAddressDefines::statisticsNameP90() )
|
||||
return { true, m_p90Data };
|
||||
else if ( quantityName == RifEclipseSummaryAddressDefines::statisticsNameMean() )
|
||||
return { true, m_meanData };
|
||||
switch ( resultAddress.statisticsType() )
|
||||
{
|
||||
case RifEclipseSummaryAddressDefines::StatisticsType::P10:
|
||||
return { true, m_p10Data };
|
||||
case RifEclipseSummaryAddressDefines::StatisticsType::P50:
|
||||
return { true, m_p50Data };
|
||||
case RifEclipseSummaryAddressDefines::StatisticsType::P90:
|
||||
return { true, m_p90Data };
|
||||
case RifEclipseSummaryAddressDefines::StatisticsType::MEAN:
|
||||
return { true, m_meanData };
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return { true, {} };
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user