changed: introduce EclGenericVanguard::setParams

this is used transferring ownership of setup structures to the
simulator. drop all the flowEbosXXX set deck methods and use the
generic vanguard. also means various structs that were only passed
in the blackoil simulator are now passed in all simulators.
This commit is contained in:
Arne Morten Kvarving 2022-06-14 12:40:16 +02:00
parent 36ffb65525
commit a4d254b749
43 changed files with 58 additions and 733 deletions

View File

@ -55,9 +55,9 @@ std::shared_ptr<Deck> EclGenericVanguard::deck_;
std::shared_ptr<EclipseState> EclGenericVanguard::eclState_; std::shared_ptr<EclipseState> EclGenericVanguard::eclState_;
std::shared_ptr<Schedule> EclGenericVanguard::eclSchedule_; std::shared_ptr<Schedule> EclGenericVanguard::eclSchedule_;
std::shared_ptr<SummaryConfig> EclGenericVanguard::eclSummaryConfig_; std::shared_ptr<SummaryConfig> EclGenericVanguard::eclSummaryConfig_;
std::unique_ptr<UDQState> EclGenericVanguard::externalUDQState_; std::unique_ptr<UDQState> EclGenericVanguard::udqState_;
std::unique_ptr<Action::State> EclGenericVanguard::externalActionState_; std::unique_ptr<Action::State> EclGenericVanguard::actionState_;
std::unique_ptr<WellTestState> EclGenericVanguard::externalWTestState_; std::unique_ptr<WellTestState> EclGenericVanguard::wtestState_;
std::unique_ptr<Parallel::Communication> EclGenericVanguard::comm_; std::unique_ptr<Parallel::Communication> EclGenericVanguard::comm_;
EclGenericVanguard::EclGenericVanguard() EclGenericVanguard::EclGenericVanguard()
@ -67,61 +67,23 @@ EclGenericVanguard::EclGenericVanguard()
EclGenericVanguard::~EclGenericVanguard() = default; EclGenericVanguard::~EclGenericVanguard() = default;
void EclGenericVanguard::setSchedule(std::shared_ptr<Schedule> schedule) void EclGenericVanguard::setParams(double setupTime,
std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::unique_ptr<UDQState> udqState,
std::unique_ptr<Action::State> actionState,
std::unique_ptr<WellTestState> wtestState,
std::shared_ptr<SummaryConfig> summaryConfig)
{ {
eclSchedule_ = std::move(schedule); EclGenericVanguard::setupTime_ = setupTime;
} EclGenericVanguard::deck_ = std::move(deck);
EclGenericVanguard::eclState_ = std::move(eclState);
void EclGenericVanguard::setSchedule(std::unique_ptr<Schedule> schedule) EclGenericVanguard::eclSchedule_ = std::move(schedule);
{ EclGenericVanguard::udqState_ = std::move(udqState);
eclSchedule_ = std::move(schedule); EclGenericVanguard::actionState_ = std::move(actionState);
} EclGenericVanguard::wtestState_ = std::move(wtestState);
EclGenericVanguard::eclSummaryConfig_ = std::move(summaryConfig);
void EclGenericVanguard::setSummaryConfig(
std::shared_ptr<SummaryConfig> summaryConfig)
{
eclSummaryConfig_ = std::move(summaryConfig);
}
void EclGenericVanguard::setSummaryConfig(
std::unique_ptr<SummaryConfig> summaryConfig)
{
eclSummaryConfig_ = std::move(summaryConfig);
}
void EclGenericVanguard::setDeck(std::shared_ptr<Deck> deck)
{
deck_ = std::move(deck);
}
void EclGenericVanguard::setDeck(std::unique_ptr<Deck> deck)
{
deck_ = std::move(deck);
}
void EclGenericVanguard::setEclState(std::shared_ptr<EclipseState> eclState)
{
eclState_ = std::move(eclState);
}
void EclGenericVanguard::setEclState(std::unique_ptr<EclipseState> eclState)
{
eclState_ = std::move(eclState);
}
void EclGenericVanguard::setExternalUDQState(std::unique_ptr<UDQState> udqState)
{
externalUDQState_ = std::move(udqState);
}
void EclGenericVanguard::setExternalActionState(std::unique_ptr<Action::State> actionState)
{
externalActionState_ = std::move(actionState);
}
void EclGenericVanguard::setExternalWTestState(std::unique_ptr<WellTestState> wtestState)
{
externalWTestState_ = std::move(wtestState);
} }
std::string EclGenericVanguard::canonicalDeckPath(const std::string& caseName) std::string EclGenericVanguard::canonicalDeckPath(const std::string& caseName)
@ -210,21 +172,6 @@ void EclGenericVanguard::init()
std::transform(caseName_.begin(), caseName_.end(), caseName_.begin(), ::toupper); std::transform(caseName_.begin(), caseName_.end(), caseName_.begin(), ::toupper);
} }
if (EclGenericVanguard::externalUDQState_)
this->udqState_ = std::move(EclGenericVanguard::externalUDQState_);
else
this->udqState_ = std::make_unique<UDQState>( this->eclSchedule_->getUDQConfig(0).params().undefinedValue() );
if (EclGenericVanguard::externalActionState_)
this->actionState_ = std::move(EclGenericVanguard::externalActionState_);
else
this->actionState_ = std::make_unique<Action::State>();
if (EclGenericVanguard::externalWTestState_)
this->wtestState_ = std::move(EclGenericVanguard::externalWTestState_);
else
this->wtestState_ = std::make_unique<WellTestState>();
this->summaryState_ = std::make_unique<SummaryState>( TimeService::from_time_t(this->eclSchedule_->getStartTime() )); this->summaryState_ = std::make_unique<SummaryState>( TimeService::from_time_t(this->eclSchedule_->getStartTime() ));
// Initialize parallelWells with all local wells // Initialize parallelWells with all local wells

View File

@ -87,14 +87,6 @@ public:
*/ */
static std::string canonicalDeckPath(const std::string& caseName); static std::string canonicalDeckPath(const std::string& caseName);
/*!
* \brief Set the wall time which was spend externally to set up the external data structures
*
* i.e., the objects specified via the other set*() methods.
*/
static void setSetupTime(double t)
{ setupTime_ = t; }
/*! /*!
* \brief Returns the wall time required to set up the simulator before it was born. * \brief Returns the wall time required to set up the simulator before it was born.
*/ */
@ -102,35 +94,16 @@ public:
{ return setupTime_; } { return setupTime_; }
/*! /*!
* \brief Set the Opm::Deck object which ought to be used when the simulator vanguard * \brief Set the simulation configuration objects.
* is instantiated.
*/ */
static void setDeck(std::shared_ptr<Deck> deck); static void setParams(double setupTime,
static void setDeck(std::unique_ptr<Deck> deck); std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
/*! std::shared_ptr<Schedule> schedule,
* \brief Set the Opm::EclipseState object which ought to be used when the simulator std::unique_ptr<UDQState> udqState,
* vanguard is instantiated. std::unique_ptr<Action::State> actionState,
*/ std::unique_ptr<WellTestState> wtestState,
static void setEclState(std::shared_ptr<EclipseState> eclState); std::shared_ptr<SummaryConfig> summaryConfig);
static void setEclState(std::unique_ptr<EclipseState> eclState);
/*!
* \brief Set the schedule object.
*/
static void setSchedule(std::shared_ptr<Schedule> schedule);
static void setSchedule(std::unique_ptr<Schedule> schedule);
/*!
* \brief Set the summary configuration object.
*/
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);
static void setExternalWTestState(std::unique_ptr<WellTestState> wtestState);
/*! /*!
* \brief Return a reference to the parsed ECL deck. * \brief Return a reference to the parsed ECL deck.
@ -291,9 +264,6 @@ protected:
static double setupTime_; static double setupTime_;
// These variables may be owned by both Python and the simulator // These variables may be owned by both Python and the simulator
static std::unique_ptr<UDQState> externalUDQState_;
static std::unique_ptr<Action::State> externalActionState_;
static std::unique_ptr<WellTestState> externalWTestState_;
static std::unique_ptr<Parallel::Communication> comm_; static std::unique_ptr<Parallel::Communication> comm_;
std::string caseName_; std::string caseName_;
@ -315,14 +285,14 @@ protected:
bool enableExperiments_; bool enableExperiments_;
std::unique_ptr<SummaryState> summaryState_; std::unique_ptr<SummaryState> summaryState_;
std::unique_ptr<UDQState> udqState_; static std::unique_ptr<UDQState> udqState_;
std::unique_ptr<Action::State> actionState_; static std::unique_ptr<Action::State> actionState_;
// Observe that this instance is handled differently from the other state // Observe that this instance is handled differently from the other state
// variables, it will only be initialized for a restart run. While // variables, it will only be initialized for a restart run. While
// initializing a restarted run this instance is transferred to the WGState // initializing a restarted run this instance is transferred to the WGState
// member in the well model. // member in the well model.
std::unique_ptr<WellTestState> wtestState_; static std::unique_ptr<WellTestState> wtestState_;
// these attributes point either to the internal or to the external version of the // these attributes point either to the internal or to the external version of the
// parser objects. // parser objects.

View File

@ -24,27 +24,6 @@
namespace Opm { namespace Opm {
void flowEbosBlackoilSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::unique_ptr<UDQState> udqState,
std::unique_ptr<Action::State> actionState,
std::unique_ptr<WellTestState> wtestState,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setExternalUDQState(std::move(udqState));
Vanguard::setExternalActionState(std::move(actionState));
Vanguard::setExternalWTestState(std::move(wtestState));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
std::unique_ptr<FlowMainEbos<Properties::TTag::EclFlowProblem>> std::unique_ptr<FlowMainEbos<Properties::TTag::EclFlowProblem>>
flowEbosBlackoilMainInit(int argc, char** argv, bool outputCout, bool outputFiles) flowEbosBlackoilMainInit(int argc, char** argv, bool outputCout, bool outputFiles)
{ {

View File

@ -21,26 +21,13 @@
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
template<class TypeTag> class FlowMainEbos; template<class TypeTag> class FlowMainEbos;
class Schedule;
class SummaryConfig;
class UDQState;
class WellTestState;
namespace Action { namespace Action {
class State; class State;
} }
namespace Properties { namespace TTag { struct EclFlowProblem; } } namespace Properties { namespace TTag { struct EclFlowProblem; } }
void flowEbosBlackoilSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::unique_ptr<UDQState> udqState,
std::unique_ptr<Action::State> actionState,
std::unique_ptr<WellTestState> wtestState,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main function used in flow binary. //! \brief Main function used in flow binary.
int flowEbosBlackoilMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosBlackoilMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -37,21 +37,6 @@ struct EnableBrine<TypeTag, TTag::EclFlowBrineProblem> {
}} }}
namespace Opm { namespace Opm {
void flowEbosBrineSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowBrineProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosBrineMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosBrineMain(int argc, char** argv, bool outputCout, bool outputFiles)

View File

@ -17,20 +17,8 @@
#ifndef FLOW_EBOS_BRINE_HPP #ifndef FLOW_EBOS_BRINE_HPP
#define FLOW_EBOS_BRINE_HPP #define FLOW_EBOS_BRINE_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosBrineSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main function used in flow binary. //! \brief Main function used in flow binary.
int flowEbosBrineMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosBrineMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -47,21 +47,6 @@ struct EnableEvaporation<TypeTag, TTag::EclFlowBrinePrecsaltVapwatProblem> {
}} }}
namespace Opm { namespace Opm {
void flowEbosBrinePrecsaltVapwatSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowBrinePrecsaltVapwatProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosBrinePrecsaltVapwatMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosBrinePrecsaltVapwatMain(int argc, char** argv, bool outputCout, bool outputFiles)

View File

@ -17,20 +17,8 @@
#ifndef FLOW_EBOS_BRINE_PRECSALT_VAPWAT_HPP #ifndef FLOW_EBOS_BRINE_PRECSALT_VAPWAT_HPP
#define FLOW_EBOS_BRINE_PRECSALT_VAPWAT_HPP #define FLOW_EBOS_BRINE_PRECSALT_VAPWAT_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosBrinePrecsaltVapwatSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main function used in flow binary. //! \brief Main function used in flow binary.
int flowEbosBrinePrecsaltVapwatMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosBrinePrecsaltVapwatMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -42,21 +42,6 @@ struct EnableSaltPrecipitation<TypeTag, TTag::EclFlowBrineSaltPrecipitationProbl
}} }}
namespace Opm { namespace Opm {
void flowEbosBrineSaltPrecipitationSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowBrineSaltPrecipitationProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosBrineSaltPrecipitationMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosBrineSaltPrecipitationMain(int argc, char** argv, bool outputCout, bool outputFiles)

View File

@ -21,16 +21,6 @@
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosBrineSaltPrecipitationSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main function used in flow binary. //! \brief Main function used in flow binary.
int flowEbosBrineSaltPrecipitationMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosBrineSaltPrecipitationMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -37,20 +37,6 @@ struct EnableEnergy<TypeTag, TTag::EclFlowEnergyProblem> {
}} }}
namespace Opm { namespace Opm {
void flowEbosEnergySetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowEnergyProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles)

View File

@ -17,20 +17,8 @@
#ifndef FLOW_EBOS_ENERGY_HPP #ifndef FLOW_EBOS_ENERGY_HPP
#define FLOW_EBOS_ENERGY_HPP #define FLOW_EBOS_ENERGY_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosEnergySetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main function used in flow binary. //! \brief Main function used in flow binary.
int flowEbosEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -37,20 +37,6 @@ struct EnableExtbo<TypeTag, TTag::EclFlowExtboProblem> {
}} }}
namespace Opm { namespace Opm {
void flowEbosExtboSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowExtboProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosExtboMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosExtboMain(int argc, char** argv, bool outputCout, bool outputFiles)

View File

@ -17,20 +17,8 @@
#ifndef FLOW_EBOS_EXTBO_HPP #ifndef FLOW_EBOS_EXTBO_HPP
#define FLOW_EBOS_EXTBO_HPP #define FLOW_EBOS_EXTBO_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosExtboSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main function used in flow binary. //! \brief Main function used in flow binary.
int flowEbosExtboMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosExtboMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -37,21 +37,6 @@ struct EnableFoam<TypeTag, TTag::EclFlowFoamProblem> {
}} }}
namespace Opm { namespace Opm {
void flowEbosFoamSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowFoamProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosFoamMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosFoamMain(int argc, char** argv, bool outputCout, bool outputFiles)

View File

@ -17,20 +17,8 @@
#ifndef FLOW_EBOS_FOAM_HPP #ifndef FLOW_EBOS_FOAM_HPP
#define FLOW_EBOS_FOAM_HPP #define FLOW_EBOS_FOAM_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosFoamSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main function used in flow binary. //! \brief Main function used in flow binary.
int flowEbosFoamMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosFoamMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -58,21 +58,6 @@ public:
}} }}
namespace Opm { namespace Opm {
void flowEbosGasOilSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowGasOilProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosGasOilMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosGasOilMain(int argc, char** argv, bool outputCout, bool outputFiles)

View File

@ -17,20 +17,8 @@
#ifndef FLOW_EBOS_GASOIL_HPP #ifndef FLOW_EBOS_GASOIL_HPP
#define FLOW_EBOS_GASOIL_HPP #define FLOW_EBOS_GASOIL_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosGasOilSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main function used in flow binary. //! \brief Main function used in flow binary.
int flowEbosGasOilMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosGasOilMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -62,21 +62,6 @@ struct EnableEnergy<TypeTag, TTag::EclFlowGasOilEnergyProblem> {
}} }}
namespace Opm { namespace Opm {
void flowEbosGasOilEnergySetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowGasOilEnergyProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosGasOilEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosGasOilEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles)

View File

@ -17,20 +17,8 @@
#ifndef FLOW_EBOS_GASOIL_ENERGY_HPP #ifndef FLOW_EBOS_GASOIL_ENERGY_HPP
#define FLOW_EBOS_GASOIL_ENERGY_HPP #define FLOW_EBOS_GASOIL_ENERGY_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosGasOilEnergySetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main function used in flow binary. //! \brief Main function used in flow binary.
int flowEbosGasOilEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosGasOilEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -61,20 +61,6 @@ public:
}} }}
namespace Opm { namespace Opm {
void flowEbosGasWaterSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowGasWaterProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------

View File

@ -17,20 +17,8 @@
#ifndef FLOW_EBOS_GASWATER_HPP #ifndef FLOW_EBOS_GASWATER_HPP
#define FLOW_EBOS_GASWATER_HPP #define FLOW_EBOS_GASWATER_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosGasWaterSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main function used in flow binary. //! \brief Main function used in flow binary.
int flowEbosGasWaterMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosGasWaterMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -61,20 +61,6 @@ public:
}} }}
namespace Opm { namespace Opm {
void flowEbosGasWaterBrineSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowGasWaterBrineProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosGasWaterBrineMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosGasWaterBrineMain(int argc, char** argv, bool outputCout, bool outputFiles)

View File

@ -17,20 +17,8 @@
#ifndef FLOW_EBOS_GASWATER_BRINE_HPP #ifndef FLOW_EBOS_GASWATER_BRINE_HPP
#define FLOW_EBOS_GASWATER_BRINE_HPP #define FLOW_EBOS_GASWATER_BRINE_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosGasWaterBrineSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main function used in flow binary. //! \brief Main function used in flow binary.
int flowEbosGasWaterBrineMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosGasWaterBrineMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -72,20 +72,6 @@ public:
}} }}
namespace Opm { namespace Opm {
void flowEbosGasWaterSaltprecVapwatSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowGasWaterSaltprecVapwatProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosGasWaterSaltprecVapwatMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosGasWaterSaltprecVapwatMain(int argc, char** argv, bool outputCout, bool outputFiles)

View File

@ -17,20 +17,8 @@
#ifndef FLOW_EBOS_GASWATERSALTPRECVAPWAT_BRINE_HPP #ifndef FLOW_EBOS_GASWATERSALTPRECVAPWAT_BRINE_HPP
#define FLOW_EBOS_GASWATERSALTPRECVAPWAT_BRINE_HPP #define FLOW_EBOS_GASWATERSALTPRECVAPWAT_BRINE_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosGasWaterSaltprecVapwatSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main function used in flow binary. //! \brief Main function used in flow binary.
int flowEbosGasWaterSaltprecVapwatMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosGasWaterSaltprecVapwatMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -61,20 +61,6 @@ public:
}} }}
namespace Opm { namespace Opm {
void flowEbosMICPSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowMICPProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosMICPMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosMICPMain(int argc, char** argv, bool outputCout, bool outputFiles)

View File

@ -17,20 +17,8 @@
#ifndef FLOW_EBOS_MICP_HPP #ifndef FLOW_EBOS_MICP_HPP
#define FLOW_EBOS_MICP_HPP #define FLOW_EBOS_MICP_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosMICPSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main function used in flow binary. //! \brief Main function used in flow binary.
int flowEbosMICPMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosMICPMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -58,20 +58,6 @@ public:
}} }}
namespace Opm { namespace Opm {
void flowEbosOilWaterSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowOilWaterProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosOilWaterMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosOilWaterMain(int argc, char** argv, bool outputCout, bool outputFiles)

View File

@ -17,20 +17,8 @@
#ifndef FLOW_EBOS_OILWATER_HPP #ifndef FLOW_EBOS_OILWATER_HPP
#define FLOW_EBOS_OILWATER_HPP #define FLOW_EBOS_OILWATER_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosOilWaterSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main functon used in main flow binary. //! \brief Main functon used in main flow binary.
int flowEbosOilWaterMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosOilWaterMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -61,20 +61,6 @@ public:
}} }}
namespace Opm { namespace Opm {
void flowEbosOilWaterBrineSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowOilWaterBrineProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosOilWaterBrineMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosOilWaterBrineMain(int argc, char** argv, bool outputCout, bool outputFiles)

View File

@ -17,20 +17,8 @@
#ifndef FLOW_EBOS_OILWATER_BRINE_HPP #ifndef FLOW_EBOS_OILWATER_BRINE_HPP
#define FLOW_EBOS_OILWATER_BRINE_HPP #define FLOW_EBOS_OILWATER_BRINE_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosOilWaterBrineSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main function used in flow binary. //! \brief Main function used in flow binary.
int flowEbosOilWaterBrineMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosOilWaterBrineMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -61,20 +61,6 @@ public:
}} }}
namespace Opm { namespace Opm {
void flowEbosOilWaterPolymerSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowOilWaterPolymerProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosOilWaterPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosOilWaterPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles)

View File

@ -17,20 +17,8 @@
#ifndef FLOW_EBOS_OILWATER_POLYMER_HPP #ifndef FLOW_EBOS_OILWATER_POLYMER_HPP
#define FLOW_EBOS_OILWATER_POLYMER_HPP #define FLOW_EBOS_OILWATER_POLYMER_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosOilWaterPolymerSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main functon used in main flow binary. //! \brief Main functon used in main flow binary.
int flowEbosOilWaterPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosOilWaterPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -57,21 +57,6 @@ public:
} // namespace Opm::Properties } // namespace Opm::Properties
void flowEbosWaterOnlySetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowProblemWaterOnly;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosWaterOnlyMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosWaterOnlyMain(int argc, char** argv, bool outputCout, bool outputFiles)
{ {

View File

@ -22,26 +22,12 @@
#ifndef FLOW_ONEPHASE_HPP #ifndef FLOW_ONEPHASE_HPP
#define FLOW_ONEPHASE_HPP #define FLOW_ONEPHASE_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck; //! \brief Main functon used in main flow binary.
class EclipseState;
template<class TypeTag> class FlowMainEbos;
class Schedule;
class SummaryConfig;
class UDQState;
class WellTestState;
namespace Action {
class State;
}
void flowEbosWaterOnlySetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
int flowEbosWaterOnlyMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosWaterOnlyMain(int argc, char** argv, bool outputCout, bool outputFiles);
//! \brief Main function used in flow_onephase binary.
int flowEbosWaterOnlyMainStandalone(int argc, char** argv); int flowEbosWaterOnlyMainStandalone(int argc, char** argv);
} }

View File

@ -64,21 +64,6 @@ public:
} // namespace Opm::Properties } // namespace Opm::Properties
void flowEbosWaterOnlyEnergySetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowProblemWaterOnlyEnergy;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosWaterOnlyEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosWaterOnlyEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles)
{ {

View File

@ -22,27 +22,14 @@
#ifndef FLOW_ONEPHASE_ENERGY_HPP #ifndef FLOW_ONEPHASE_ENERGY_HPP
#define FLOW_ONEPHASE_ENERGY_HPP #define FLOW_ONEPHASE_ENERGY_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck; //! \brief Main functon used in main flow binary.
class EclipseState;
template<class TypeTag> class FlowMainEbos;
class Schedule;
class SummaryConfig;
class UDQState;
class WellTestState;
namespace Action {
class State;
}
void flowEbosWaterOnlyEnergySetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
int flowEbosWaterOnlyEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosWaterOnlyEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles);
//! \brief Main function used in flow_onephase_energy binary.
int flowEbosWaterOnlyEnergyMainStandalone(int argc, char** argv); int flowEbosWaterOnlyEnergyMainStandalone(int argc, char** argv);
} }
#endif #endif

View File

@ -37,20 +37,6 @@ struct EnablePolymer<TypeTag, TTag::EclFlowPolymerProblem> {
}} }}
namespace Opm { namespace Opm {
void flowEbosPolymerSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowPolymerProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles)

View File

@ -17,20 +17,8 @@
#ifndef FLOW_EBOS_POLYMER_HPP #ifndef FLOW_EBOS_POLYMER_HPP
#define FLOW_EBOS_POLYMER_HPP #define FLOW_EBOS_POLYMER_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosPolymerSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main function used in flow binary. //! \brief Main function used in flow binary.
int flowEbosPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles); int flowEbosPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles);

View File

@ -37,21 +37,6 @@ struct EnableSolvent<TypeTag, TTag::EclFlowSolventProblem> {
}} }}
namespace Opm { namespace Opm {
void flowEbosSolventSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using TypeTag = Properties::TTag::EclFlowSolventProblem;
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setSetupTime(setupTime);
Vanguard::setDeck(std::move(deck));
Vanguard::setEclState(std::move(eclState));
Vanguard::setSchedule(std::move(schedule));
Vanguard::setSummaryConfig(std::move(summaryConfig));
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
int flowEbosSolventMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosSolventMain(int argc, char** argv, bool outputCout, bool outputFiles)

View File

@ -17,20 +17,8 @@
#ifndef FLOW_EBOS_SOLVENT_HPP #ifndef FLOW_EBOS_SOLVENT_HPP
#define FLOW_EBOS_SOLVENT_HPP #define FLOW_EBOS_SOLVENT_HPP
#include <memory>
namespace Opm { namespace Opm {
class Deck;
class EclipseState;
class Schedule;
class SummaryConfig;
void flowEbosSolventSetDeck(double setupTime, std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig);
//! \brief Main function used in flow binary. //! \brief Main function used in flow binary.
int flowEbosSolventMain(int argc, char** argv, bool outoutCout, bool outputFiles); int flowEbosSolventMain(int argc, char** argv, bool outoutCout, bool outputFiles);

View File

@ -96,20 +96,6 @@ struct FlowEarlyBird {
namespace Opm { namespace Opm {
template <class TypeTag>
void flowEbosSetDeck(std::shared_ptr<Deck> deck,
std::shared_ptr<EclipseState> eclState,
std::shared_ptr<Schedule> schedule,
std::shared_ptr<SummaryConfig> summaryConfig)
{
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
Vanguard::setDeck(deck);
Vanguard::setEclState(eclState);
Vanguard::setSchedule(schedule);
Vanguard::setSummaryConfig(summaryConfig);
}
// ----------------- Main program ----------------- // ----------------- Main program -----------------
template <class TypeTag> template <class TypeTag>
int flowEbosMain(int argc, char** argv, bool outputCout, bool outputFiles) int flowEbosMain(int argc, char** argv, bool outputCout, bool outputFiles)
@ -260,7 +246,7 @@ public:
if (initialize_<Properties::TTag::FlowEarlyBird>(exitCode)) { if (initialize_<Properties::TTag::FlowEarlyBird>(exitCode)) {
// TODO: check that this deck really represents a blackoil // TODO: check that this deck really represents a blackoil
// case. E.g. check that number of phases == 3 // case. E.g. check that number of phases == 3
flowEbosBlackoilSetDeck( EclGenericVanguard::setParams(
setupTime_, setupTime_,
deck_, deck_,
eclipseState_, eclipseState_,
@ -283,6 +269,15 @@ private:
const auto& rspec = this->eclipseState_->runspec(); const auto& rspec = this->eclipseState_->runspec();
const auto& phases = rspec.phases(); const auto& phases = rspec.phases();
EclGenericVanguard::setParams(this->setupTime_,
this->deck_,
this->eclipseState_,
this->schedule_,
std::move(this->udqState_),
std::move(this->actionState_),
std::move(this->wtestState_),
this->summaryConfig_);
// run the actual simulator // run the actual simulator
// //
// TODO: make sure that no illegal combinations like thermal and // TODO: make sure that no illegal combinations like thermal and
@ -357,8 +352,14 @@ private:
template <class TypeTag> template <class TypeTag>
int dispatchStatic_() int dispatchStatic_()
{ {
flowEbosSetDeck<TypeTag>( EclGenericVanguard::setParams(this->setupTime_,
deck_, eclipseState_, schedule_, summaryConfig_); this->deck_,
this->eclipseState_,
this->schedule_,
std::move(this->udqState_),
std::move(this->actionState_),
std::move(this->wtestState_),
this->summaryConfig_);
return flowEbosMain<TypeTag>(argc_, argv_, outputCout_, outputFiles_); return flowEbosMain<TypeTag>(argc_, argv_, outputCout_, outputFiles_);
} }
@ -584,12 +585,6 @@ private:
return EXIT_FAILURE; return EXIT_FAILURE;
} }
flowEbosMICPSetDeck(this->setupTime_,
this->deck_,
this->eclipseState_,
this->schedule_,
this->summaryConfig_);
return flowEbosMICPMain(this->argc_, return flowEbosMICPMain(this->argc_,
this->argv_, this->argv_,
this->outputCout_, this->outputCout_,
@ -600,22 +595,16 @@ private:
{ {
// oil-gas // oil-gas
if (phases.active( Phase::OIL ) && phases.active( Phase::GAS )) { if (phases.active( Phase::OIL ) && phases.active( Phase::GAS )) {
flowEbosGasOilSetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosGasOilMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosGasOilMain(argc_, argv_, outputCout_, outputFiles_);
} }
// oil-water // oil-water
else if ( phases.active( Phase::OIL ) && phases.active( Phase::WATER ) ) { else if ( phases.active( Phase::OIL ) && phases.active( Phase::WATER ) ) {
flowEbosOilWaterSetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosOilWaterMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosOilWaterMain(argc_, argv_, outputCout_, outputFiles_);
} }
// gas-water // gas-water
else if ( phases.active( Phase::GAS ) && phases.active( Phase::WATER ) ) { else if ( phases.active( Phase::GAS ) && phases.active( Phase::WATER ) ) {
flowEbosGasWaterSetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosGasWaterMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosGasWaterMain(argc_, argv_, outputCout_, outputFiles_);
} }
else { else {
@ -646,22 +635,15 @@ private:
} }
if (phases.size() == 3) { // oil water polymer case if (phases.size() == 3) { // oil water polymer case
flowEbosOilWaterPolymerSetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosOilWaterPolymerMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosOilWaterPolymerMain(argc_, argv_, outputCout_, outputFiles_);
} }
else { else {
flowEbosPolymerSetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosPolymerMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosPolymerMain(argc_, argv_, outputCout_, outputFiles_);
} }
} }
int runFoam() int runFoam()
{ {
flowEbosFoamSetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosFoamMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosFoamMain(argc_, argv_, outputCout_, outputFiles_);
} }
@ -674,8 +656,6 @@ private:
return EXIT_FAILURE; return EXIT_FAILURE;
} }
flowEbosWaterOnlySetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosWaterOnlyMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosWaterOnlyMain(argc_, argv_, outputCout_, outputFiles_);
} }
@ -689,8 +669,6 @@ private:
return EXIT_FAILURE; return EXIT_FAILURE;
} }
flowEbosWaterOnlyEnergySetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosWaterOnlyEnergyMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosWaterOnlyEnergyMain(argc_, argv_, outputCout_, outputFiles_);
} }
@ -708,21 +686,15 @@ private:
if (phases.size() == 3) { if (phases.size() == 3) {
if (phases.active(Phase::OIL)){ // oil water brine case if (phases.active(Phase::OIL)){ // oil water brine case
flowEbosOilWaterBrineSetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosOilWaterBrineMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosOilWaterBrineMain(argc_, argv_, outputCout_, outputFiles_);
} }
if (phases.active(Phase::GAS)){ // gas water brine case if (phases.active(Phase::GAS)){ // gas water brine case
if (eclipseState_->getSimulationConfig().hasPRECSALT() && if (eclipseState_->getSimulationConfig().hasPRECSALT() &&
eclipseState_->getSimulationConfig().hasVAPWAT()) { eclipseState_->getSimulationConfig().hasVAPWAT()) {
//case with water vaporization into gas phase and salt precipitation //case with water vaporization into gas phase and salt precipitation
flowEbosGasWaterSaltprecVapwatSetDeck( return flowEbosGasWaterSaltprecVapwatMain(argc_, argv_, outputCout_, outputFiles_);
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosGasWaterSaltprecVapwatMain(argc_, argv_, outputCout_, outputFiles_);
} }
else { else {
flowEbosGasWaterBrineSetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosGasWaterBrineMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosGasWaterBrineMain(argc_, argv_, outputCout_, outputFiles_);
} }
} }
@ -730,19 +702,13 @@ private:
else if (eclipseState_->getSimulationConfig().hasPRECSALT()) { else if (eclipseState_->getSimulationConfig().hasPRECSALT()) {
if (eclipseState_->getSimulationConfig().hasVAPWAT()) { if (eclipseState_->getSimulationConfig().hasVAPWAT()) {
//case with water vaporization into gas phase and salt precipitation //case with water vaporization into gas phase and salt precipitation
flowEbosBrinePrecsaltVapwatSetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosBrinePrecsaltVapwatMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosBrinePrecsaltVapwatMain(argc_, argv_, outputCout_, outputFiles_);
} }
else { else {
flowEbosBrineSaltPrecipitationSetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosBrineSaltPrecipitationMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosBrineSaltPrecipitationMain(argc_, argv_, outputCout_, outputFiles_);
} }
} }
else { else {
flowEbosBrineSetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosBrineMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosBrineMain(argc_, argv_, outputCout_, outputFiles_);
} }
@ -751,17 +717,11 @@ private:
int runSolvent() int runSolvent()
{ {
flowEbosSolventSetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosSolventMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosSolventMain(argc_, argv_, outputCout_, outputFiles_);
} }
int runExtendedBlackOil() int runExtendedBlackOil()
{ {
flowEbosExtboSetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosExtboMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosExtboMain(argc_, argv_, outputCout_, outputFiles_);
} }
@ -769,28 +729,14 @@ private:
{ {
// oil-gas-thermal // oil-gas-thermal
if (!phases.active( Phase::WATER ) && phases.active( Phase::OIL ) && phases.active( Phase::GAS )) { if (!phases.active( Phase::WATER ) && phases.active( Phase::OIL ) && phases.active( Phase::GAS )) {
flowEbosGasOilEnergySetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosGasOilEnergyMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosGasOilEnergyMain(argc_, argv_, outputCout_, outputFiles_);
} }
flowEbosEnergySetDeck(
setupTime_, deck_, eclipseState_, schedule_, summaryConfig_);
return flowEbosEnergyMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosEnergyMain(argc_, argv_, outputCout_, outputFiles_);
} }
int runBlackOil() int runBlackOil()
{ {
flowEbosBlackoilSetDeck(this->setupTime_,
this->deck_,
this->eclipseState_,
this->schedule_,
std::move(this->udqState_),
std::move(this->actionState_),
std::move(this->wtestState_),
this->summaryConfig_);
return flowEbosBlackoilMain(argc_, argv_, outputCout_, outputFiles_); return flowEbosBlackoilMain(argc_, argv_, outputCout_, outputFiles_);
} }