mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: remove support for internal deck handling in simulators
This commit is contained in:
@@ -39,7 +39,6 @@
|
||||
#include <opm/input/eclipse/Parser/ErrorGuard.hpp>
|
||||
#include <opm/input/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/input/eclipse/Python/Python.hpp>
|
||||
#include <opm/simulators/utils/readDeck.hpp>
|
||||
|
||||
#include <dune/common/version.hh>
|
||||
#include <dune/common/parallel/mpihelper.hh>
|
||||
@@ -54,10 +53,9 @@
|
||||
namespace Opm {
|
||||
|
||||
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<Deck> EclGenericVanguard::externalDeck_;
|
||||
bool EclGenericVanguard::externalDeckSet_ = false;
|
||||
std::shared_ptr<EclipseState> EclGenericVanguard::externalEclState_;
|
||||
std::shared_ptr<Schedule> EclGenericVanguard::externalEclSchedule_;
|
||||
std::shared_ptr<SummaryConfig> EclGenericVanguard::externalEclSummaryConfig_;
|
||||
@@ -105,16 +103,14 @@ void EclGenericVanguard::setExternalSummaryConfig(
|
||||
externalEclSummaryConfig_ = std::move(summaryConfig);
|
||||
}
|
||||
|
||||
void EclGenericVanguard::setExternalDeck(std::shared_ptr<Deck> deck)
|
||||
void EclGenericVanguard::setDeck(std::shared_ptr<Deck> deck)
|
||||
{
|
||||
externalDeck_ = std::move(deck);
|
||||
externalDeckSet_ = true;
|
||||
deck_ = std::move(deck);
|
||||
}
|
||||
|
||||
void EclGenericVanguard::setExternalDeck(std::unique_ptr<Deck> deck)
|
||||
void EclGenericVanguard::setDeck(std::unique_ptr<Deck> deck)
|
||||
{
|
||||
externalDeck_ = std::move(deck);
|
||||
externalDeckSet_ = true;
|
||||
deck_ = std::move(deck);
|
||||
}
|
||||
|
||||
void EclGenericVanguard::setExternalEclState(std::shared_ptr<EclipseState> eclState)
|
||||
@@ -266,10 +262,8 @@ void EclGenericVanguard::init()
|
||||
|
||||
// Check that we are in one of the known configurations for external variables
|
||||
// and move them to internal
|
||||
if (externalDeck_)
|
||||
if (true)
|
||||
{
|
||||
deck_ = std::move(externalDeck_);
|
||||
|
||||
if (externalParseContext_ && externalErrorGuard_ )
|
||||
{
|
||||
parseContext_ = std::move(externalParseContext_);
|
||||
@@ -296,11 +290,6 @@ void EclGenericVanguard::init()
|
||||
parseContext_ = createParseContext(ignoredKeywords_, eclStrictParsing_);
|
||||
}
|
||||
|
||||
readDeck(EclGenericVanguard::comm(), fileName_, deck_, eclState_, eclSchedule_, udqState_, actionState_, wtestState_,
|
||||
eclSummaryConfig_, std::move(errorGuard), python,
|
||||
std::move(parseContext_), /* initFromRestart = */ false,
|
||||
/* checkDeck = */ enableExperiments_, outputInterval_);
|
||||
|
||||
if (EclGenericVanguard::externalUDQState_)
|
||||
this->udqState_ = std::move(EclGenericVanguard::externalUDQState_);
|
||||
else
|
||||
|
||||
@@ -120,15 +120,9 @@ public:
|
||||
/*!
|
||||
* \brief Set the Opm::Deck object which ought to be used when the simulator vanguard
|
||||
* is instantiated.
|
||||
*
|
||||
* This is basically an optimization: In cases where the ECL input deck must be
|
||||
* examined to decide which simulator ought to be used, this avoids having to parse
|
||||
* the input twice. When this method is used, the caller is responsible for lifetime
|
||||
* management of these two objects, i.e., they are not allowed to be deleted as long
|
||||
* as the simulator vanguard object is alive.
|
||||
*/
|
||||
static void setExternalDeck(std::shared_ptr<Deck> deck);
|
||||
static void setExternalDeck(std::unique_ptr<Deck> deck);
|
||||
static void setDeck(std::shared_ptr<Deck> deck);
|
||||
static void setDeck(std::unique_ptr<Deck> deck);
|
||||
|
||||
/*!
|
||||
* \brief Set the Opm::EclipseState object which ought to be used when the simulator
|
||||
@@ -321,12 +315,10 @@ protected:
|
||||
static std::unique_ptr<ErrorGuard> externalErrorGuard_;
|
||||
|
||||
// These variables may be owned by both Python and the simulator
|
||||
static std::shared_ptr<Deck> externalDeck_;
|
||||
static std::shared_ptr<EclipseState> externalEclState_;
|
||||
static std::shared_ptr<Schedule> externalEclSchedule_;
|
||||
static std::shared_ptr<SummaryConfig> externalEclSummaryConfig_;
|
||||
|
||||
static bool externalDeckSet_;
|
||||
static std::unique_ptr<UDQState> externalUDQState_;
|
||||
static std::unique_ptr<Action::State> externalActionState_;
|
||||
static std::unique_ptr<WellTestState> externalWTestState_;
|
||||
@@ -366,7 +358,7 @@ protected:
|
||||
std::unique_ptr<ErrorGuard> errorGuard_;
|
||||
std::shared_ptr<Python> python;
|
||||
// These variables may be owned by both Python and the simulator
|
||||
std::shared_ptr<Deck> deck_;
|
||||
static std::shared_ptr<Deck> deck_;
|
||||
std::shared_ptr<EclipseState> eclState_;
|
||||
std::shared_ptr<Schedule> eclSchedule_;
|
||||
std::shared_ptr<SummaryConfig> eclSummaryConfig_;
|
||||
|
||||
Reference in New Issue
Block a user