mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2917 Add method to retreive union of possible summary addresses from ensemble
This commit is contained in:
@@ -116,6 +116,29 @@ void RimSummaryCaseCollection::setAsEnsemble(bool isEnsemble)
|
||||
updateIcon();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::set<RifEclipseSummaryAddress> RimSummaryCaseCollection::calculateUnionOfSummaryAddresses() const
|
||||
{
|
||||
std::set<RifEclipseSummaryAddress> addressUnion;
|
||||
|
||||
for (RimSummaryCase* currCase: m_cases)
|
||||
{
|
||||
if ( !currCase ) continue;
|
||||
|
||||
RifSummaryReaderInterface* reader = currCase->summaryReader();
|
||||
|
||||
if ( !reader ) continue;
|
||||
|
||||
const std::vector<RifEclipseSummaryAddress>& readerAddresses = reader->allResultAddresses();
|
||||
addressUnion.insert(readerAddresses.begin(), readerAddresses.end());
|
||||
|
||||
}
|
||||
|
||||
return addressUnion;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
QString name() const;
|
||||
bool isEnsemble() const;
|
||||
void setAsEnsemble(bool isEnsemble);
|
||||
|
||||
std::set<RifEclipseSummaryAddress> calculateUnionOfSummaryAddresses() const;
|
||||
private:
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
void updateReferringCurveSets() const;
|
||||
|
||||
Reference in New Issue
Block a user