changed: remove support for internal eclstate handling in simulators

This commit is contained in:
Arne Morten Kvarving 2022-06-14 10:09:35 +02:00
parent 371c8058bc
commit 1a35c5ac47
23 changed files with 30 additions and 32 deletions

View File

@ -56,7 +56,7 @@ double EclGenericVanguard::setupTime_ = 0.0;
std::shared_ptr<Deck> EclGenericVanguard::deck_;
std::unique_ptr<ParseContext> EclGenericVanguard::externalParseContext_;
std::unique_ptr<ErrorGuard> EclGenericVanguard::externalErrorGuard_;
std::shared_ptr<EclipseState> EclGenericVanguard::externalEclState_;
std::shared_ptr<EclipseState> EclGenericVanguard::eclState_;
std::shared_ptr<Schedule> EclGenericVanguard::externalEclSchedule_;
std::shared_ptr<SummaryConfig> EclGenericVanguard::externalEclSummaryConfig_;
std::unique_ptr<UDQState> EclGenericVanguard::externalUDQState_;
@ -113,14 +113,14 @@ void EclGenericVanguard::setDeck(std::unique_ptr<Deck> deck)
deck_ = std::move(deck);
}
void EclGenericVanguard::setExternalEclState(std::shared_ptr<EclipseState> eclState)
void EclGenericVanguard::setEclState(std::shared_ptr<EclipseState> eclState)
{
externalEclState_ = std::move(eclState);
eclState_ = std::move(eclState);
}
void EclGenericVanguard::setExternalEclState(std::unique_ptr<EclipseState> eclState)
void EclGenericVanguard::setEclState(std::unique_ptr<EclipseState> eclState)
{
externalEclState_ = std::move(eclState);
eclState_ = std::move(eclState);
}
void EclGenericVanguard::setExternalUDQState(std::unique_ptr<UDQState> udqState)
@ -269,9 +269,8 @@ void EclGenericVanguard::init()
parseContext_ = std::move(externalParseContext_);
errorGuard = std::move(externalErrorGuard_);
}
else if(externalEclState_ && externalEclSchedule_ && externalEclSummaryConfig_)
else if(externalEclSchedule_ && externalEclSummaryConfig_)
{
eclState_ = std::move(externalEclState_);
eclSchedule_ = std::move(externalEclSchedule_);
eclSummaryConfig_ = std::move(externalEclSummaryConfig_);
}

View File

@ -128,8 +128,8 @@ public:
* \brief Set the Opm::EclipseState object which ought to be used when the simulator
* vanguard is instantiated.
*/
static void setExternalEclState(std::shared_ptr<EclipseState> eclState);
static void setExternalEclState(std::unique_ptr<EclipseState> eclState);
static void setEclState(std::shared_ptr<EclipseState> eclState);
static void setEclState(std::unique_ptr<EclipseState> eclState);
/*!
* \brief Set the schedule object.
@ -315,7 +315,6 @@ protected:
static std::unique_ptr<ErrorGuard> externalErrorGuard_;
// These variables may be owned by both Python and the simulator
static std::shared_ptr<EclipseState> externalEclState_;
static std::shared_ptr<Schedule> externalEclSchedule_;
static std::shared_ptr<SummaryConfig> externalEclSummaryConfig_;
@ -359,7 +358,7 @@ protected:
std::shared_ptr<Python> python;
// These variables may be owned by both Python and the simulator
static std::shared_ptr<Deck> deck_;
std::shared_ptr<EclipseState> eclState_;
static std::shared_ptr<EclipseState> eclState_;
std::shared_ptr<Schedule> eclSchedule_;
std::shared_ptr<SummaryConfig> eclSummaryConfig_;

View File

@ -37,7 +37,7 @@ void flowEbosBlackoilSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setExternalEclState(std::move(eclState));
Vanguard::setEclState(std::move(eclState));
Vanguard::setExternalSchedule(std::move(schedule));
Vanguard::setExternalUDQState(std::move(udqState));
Vanguard::setExternalActionState(std::move(actionState));

View File

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

View File

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

View File

@ -52,7 +52,7 @@ void flowEbosBrineSaltPrecipitationSetDeck(double setupTime, std::shared_ptr<Dec
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setExternalEclState(std::move(eclState));
Vanguard::setEclState(std::move(eclState));
Vanguard::setExternalSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
}

View File

@ -47,7 +47,7 @@ void flowEbosEnergySetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setExternalEclState(std::move(eclState));
Vanguard::setEclState(std::move(eclState));
Vanguard::setExternalSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
}

View File

@ -47,7 +47,7 @@ void flowEbosExtboSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setExternalEclState(std::move(eclState));
Vanguard::setEclState(std::move(eclState));
Vanguard::setExternalSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
}

View File

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

View File

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

View File

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

View File

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

View File

@ -71,7 +71,7 @@ void flowEbosGasWaterBrineSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setExternalEclState(std::move(eclState));
Vanguard::setEclState(std::move(eclState));
Vanguard::setExternalSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
}

View File

@ -82,7 +82,7 @@ void flowEbosGasWaterSaltprecVapwatSetDeck(double setupTime, std::shared_ptr<Dec
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setExternalEclState(std::move(eclState));
Vanguard::setEclState(std::move(eclState));
Vanguard::setExternalSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
}

View File

@ -71,7 +71,7 @@ void flowEbosMICPSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setExternalEclState(std::move(eclState));
Vanguard::setEclState(std::move(eclState));
Vanguard::setExternalSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
}

View File

@ -68,7 +68,7 @@ void flowEbosOilWaterSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setExternalEclState(std::move(eclState));
Vanguard::setEclState(std::move(eclState));
Vanguard::setExternalSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
}

View File

@ -71,7 +71,7 @@ void flowEbosOilWaterBrineSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setExternalEclState(std::move(eclState));
Vanguard::setEclState(std::move(eclState));
Vanguard::setExternalSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
}

View File

@ -71,7 +71,7 @@ void flowEbosOilWaterPolymerSetDeck(double setupTime, std::shared_ptr<Deck> deck
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setExternalEclState(std::move(eclState));
Vanguard::setEclState(std::move(eclState));
Vanguard::setExternalSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
}

View File

@ -67,7 +67,7 @@ void flowEbosWaterOnlySetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setExternalEclState(std::move(eclState));
Vanguard::setEclState(std::move(eclState));
Vanguard::setExternalSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
}

View File

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

View File

@ -47,7 +47,7 @@ void flowEbosPolymerSetDeck(double setupTime, std::shared_ptr<Deck> deck,
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setExternalEclState(std::move(eclState));
Vanguard::setEclState(std::move(eclState));
Vanguard::setExternalSchedule(std::move(schedule));
Vanguard::setExternalSummaryConfig(std::move(summaryConfig));
}

View File

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

View File

@ -105,7 +105,7 @@ void flowEbosSetDeck(std::shared_ptr<Deck> deck,
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setDeck(deck);
Vanguard::setExternalEclState(eclState);
Vanguard::setEclState(eclState);
Vanguard::setExternalSchedule(schedule);
Vanguard::setExternalSummaryConfig(summaryConfig);
}