mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-23 23:13:39 -06:00
#2170 Summary Case: Simplified access function to all cases, remove unused function
This commit is contained in:
parent
a2a7155d1c
commit
6103f290bf
@ -368,10 +368,8 @@ std::set<std::string> RicSummaryCurveCreator::getAllSummaryCaseNames()
|
||||
{
|
||||
std::set<std::string> summaryCaseHashes;
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
std::vector<RimSummaryCase*> cases;
|
||||
|
||||
proj->allSummaryCases(cases);
|
||||
|
||||
|
||||
std::vector<RimSummaryCase*> cases = proj->allSummaryCases();
|
||||
for (RimSummaryCase* rimCase : cases)
|
||||
{
|
||||
summaryCaseHashes.insert(rimCase->summaryHeaderFilename().toUtf8().constData());
|
||||
@ -387,9 +385,8 @@ std::set<std::string> RicSummaryCurveCreator::getAllSummaryWellNames()
|
||||
{
|
||||
std::set<std::string> summaryWellNames;
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
std::vector<RimSummaryCase*> cases;
|
||||
|
||||
proj->allSummaryCases(cases);
|
||||
std::vector<RimSummaryCase*> cases = proj->allSummaryCases();
|
||||
for (RimSummaryCase* rimCase : cases)
|
||||
{
|
||||
RifSummaryReaderInterface* reader = nullptr;
|
||||
|
@ -547,9 +547,10 @@ void RimProject::allCases(std::vector<RimCase*>& cases)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::allSummaryCases(std::vector<RimSummaryCase*>& sumCases)
|
||||
std::vector<RimSummaryCase*> RimProject::allSummaryCases() const
|
||||
{
|
||||
sumCases.clear();
|
||||
std::vector<RimSummaryCase*> sumCases;
|
||||
|
||||
for (RimOilField* oilField: oilFields)
|
||||
{
|
||||
if(!oilField) continue;
|
||||
@ -567,24 +568,8 @@ void RimProject::allSummaryCases(std::vector<RimSummaryCase*>& sumCases)
|
||||
sumCases.insert(sumCases.end(), observedData.begin(), observedData.end());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::allObservedData(std::vector<RimSummaryCase*>& observedData)
|
||||
{
|
||||
for (RimOilField* oilField : oilFields)
|
||||
{
|
||||
if (!oilField) continue;
|
||||
RimObservedDataCollection* observedDataCollection = oilField->observedDataCollection();
|
||||
if (observedDataCollection)
|
||||
{
|
||||
observedData.clear();
|
||||
std::vector<RimSummaryCase*> allObservedData = observedDataCollection->allObservedData();
|
||||
observedData.insert(observedData.end(), allObservedData.begin(), allObservedData.end());
|
||||
}
|
||||
}
|
||||
return sumCases;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -100,8 +100,9 @@ public:
|
||||
void assignIdToCaseGroup(RimIdenticalGridCaseGroup* caseGroup);
|
||||
|
||||
void allCases(std::vector<RimCase*>& cases);
|
||||
void allSummaryCases(std::vector<RimSummaryCase*>& sumCases);
|
||||
void allObservedData(std::vector<RimSummaryCase*>& observedData);
|
||||
|
||||
std::vector<RimSummaryCase*> allSummaryCases() const;
|
||||
|
||||
void allNotLinkedViews(std::vector<RimView*>& views);
|
||||
void allVisibleViews(std::vector<RimView*>& views);
|
||||
|
||||
|
@ -311,9 +311,8 @@ QList<caf::PdmOptionItemInfo> RimSummaryCurve::calculateValueOptions(const caf::
|
||||
fieldNeedingOptions == &m_xValuesSummaryCase)
|
||||
{
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
std::vector<RimSummaryCase*> cases;
|
||||
|
||||
proj->allSummaryCases(cases);
|
||||
std::vector<RimSummaryCase*> cases = proj->allSummaryCases();
|
||||
|
||||
cases.push_back(proj->calculationCollection->calculationSummaryCase());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user