changed: remove support for internal summaryconfig handling in simulators

This commit is contained in:
Arne Morten Kvarving 2022-06-14 10:09:35 +02:00
parent 4510f40b6d
commit 00c374be5c
23 changed files with 29 additions and 38 deletions

View File

@ -58,7 +58,7 @@ std::unique_ptr<ParseContext> EclGenericVanguard::externalParseContext_;
std::unique_ptr<ErrorGuard> EclGenericVanguard::externalErrorGuard_;
std::shared_ptr<EclipseState> EclGenericVanguard::eclState_;
std::shared_ptr<Schedule> EclGenericVanguard::eclSchedule_;
std::shared_ptr<SummaryConfig> EclGenericVanguard::externalEclSummaryConfig_;
std::shared_ptr<SummaryConfig> EclGenericVanguard::eclSummaryConfig_;
std::unique_ptr<UDQState> EclGenericVanguard::externalUDQState_;
std::unique_ptr<Action::State> EclGenericVanguard::externalActionState_;
std::unique_ptr<WellTestState> EclGenericVanguard::externalWTestState_;
@ -91,16 +91,16 @@ void EclGenericVanguard::setSchedule(std::unique_ptr<Schedule> schedule)
eclSchedule_ = std::move(schedule);
}
void EclGenericVanguard::setExternalSummaryConfig(
void EclGenericVanguard::setSummaryConfig(
std::shared_ptr<SummaryConfig> summaryConfig)
{
externalEclSummaryConfig_ = std::move(summaryConfig);
eclSummaryConfig_ = std::move(summaryConfig);
}
void EclGenericVanguard::setExternalSummaryConfig(
void EclGenericVanguard::setSummaryConfig(
std::unique_ptr<SummaryConfig> summaryConfig)
{
externalEclSummaryConfig_ = std::move(summaryConfig);
eclSummaryConfig_ = std::move(summaryConfig);
}
void EclGenericVanguard::setDeck(std::shared_ptr<Deck> deck)
@ -269,10 +269,6 @@ void EclGenericVanguard::init()
parseContext_ = std::move(externalParseContext_);
errorGuard = std::move(externalErrorGuard_);
}
else if(externalEclSummaryConfig_)
{
eclSummaryConfig_ = std::move(externalEclSummaryConfig_);
}
else
{
OPM_THROW(std::logic_error, "Either parse context and error guard or ECL state, schedule, and summary config need to be"

View File

@ -139,12 +139,9 @@ public:
/*!
* \brief Set the summary configuration object.
*
* The lifetime of this object is not managed by the vanguard, i.e., the object must
* stay valid until after the vanguard gets destroyed.
*/
static void setExternalSummaryConfig(std::shared_ptr<SummaryConfig> summaryConfig);
static void setExternalSummaryConfig(std::unique_ptr<SummaryConfig> summaryConfig);
static void setSummaryConfig(std::shared_ptr<SummaryConfig> summaryConfig);
static void setSummaryConfig(std::unique_ptr<SummaryConfig> summaryConfig);
static void setExternalUDQState(std::unique_ptr<UDQState> udqState);
static void setExternalActionState(std::unique_ptr<Action::State> actionState);
@ -312,8 +309,6 @@ protected:
static std::unique_ptr<ErrorGuard> externalErrorGuard_;
// These variables may be owned by both Python and the simulator
static std::shared_ptr<SummaryConfig> externalEclSummaryConfig_;
static std::unique_ptr<UDQState> externalUDQState_;
static std::unique_ptr<Action::State> externalActionState_;
static std::unique_ptr<WellTestState> externalWTestState_;
@ -356,7 +351,7 @@ protected:
static std::shared_ptr<Deck> deck_;
static std::shared_ptr<EclipseState> eclState_;
static std::shared_ptr<Schedule> eclSchedule_;
std::shared_ptr<SummaryConfig> eclSummaryConfig_;
static std::shared_ptr<SummaryConfig> eclSummaryConfig_;
/*! \brief Information about wells in parallel
*

View File

@ -42,7 +42,7 @@ void flowEbosBlackoilSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setExternalUDQState(std::move(udqState));
Vanguard::setExternalActionState(std::move(actionState));
Vanguard::setExternalWTestState(std::move(wtestState));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
std::unique_ptr<FlowMainEbos<Properties::TTag::EclFlowProblem>>

View File

@ -49,7 +49,7 @@ void flowEbosBrineSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}

View File

@ -59,7 +59,7 @@ void flowEbosBrinePrecsaltVapwatSetDeck(double setupTime, std::shared_ptr<Deck>
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}

View File

@ -54,7 +54,7 @@ void flowEbosBrineSaltPrecipitationSetDeck(double setupTime, std::shared_ptr<Dec
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}

View File

@ -49,7 +49,7 @@ void flowEbosEnergySetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program -----------------

View File

@ -49,7 +49,7 @@ void flowEbosExtboSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program -----------------

View File

@ -49,7 +49,7 @@ void flowEbosFoamSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}

View File

@ -70,7 +70,7 @@ void flowEbosGasOilSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}

View File

@ -74,7 +74,7 @@ void flowEbosGasOilEnergySetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}

View File

@ -73,7 +73,7 @@ void flowEbosGasWaterSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}

View File

@ -73,7 +73,7 @@ void flowEbosGasWaterBrineSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program -----------------

View File

@ -84,7 +84,7 @@ void flowEbosGasWaterSaltprecVapwatSetDeck(double setupTime, std::shared_ptr<Dec
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program -----------------

View File

@ -73,7 +73,7 @@ void flowEbosMICPSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program -----------------

View File

@ -70,7 +70,7 @@ void flowEbosOilWaterSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program -----------------

View File

@ -73,7 +73,7 @@ void flowEbosOilWaterBrineSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program -----------------

View File

@ -73,7 +73,7 @@ void flowEbosOilWaterPolymerSetDeck(double setupTime, std::shared_ptr<Deck> deck
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program -----------------

View File

@ -69,7 +69,7 @@ void flowEbosWaterOnlySetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program -----------------

View File

@ -76,7 +76,7 @@ void flowEbosWaterOnlyEnergySetDeck(double setupTime, std::shared_ptr<Deck> deck
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program -----------------

View File

@ -49,7 +49,7 @@ void flowEbosPolymerSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program -----------------

View File

@ -49,7 +49,7 @@ void flowEbosSolventSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}

View File

@ -107,7 +107,7 @@ void flowEbosSetDeck(std::shared_ptr<Deck> deck,
Vanguard::setDeck(deck);
Vanguard::setEclState(eclState);
Vanguard::setSchedule(schedule);
Vanguard::setExternalSummaryConfig(summaryConfig);
Vanguard::setSummaryConfig(summaryConfig);
}
// ----------------- Main program -----------------