#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:
Magne Sjaastad committed 2025-05-16 07:53:46 +02:00
1 parent 84f9ad0dcd
commit dc4cd33c6e
19 files changed
+165 -157

No files matched your search

@@ -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, {} };
}