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
*