mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: pass/store deck as a pointer
and remove asserts for null-ptr. preparatory step for only having deck on root mpi process
This commit is contained in:
parent
35de9fa53d
commit
68a9d17de1
@ -322,7 +322,6 @@ public:
|
||||
Opm::checkDeck(*deck_, parser, *parseContext_, *errorGuard_);
|
||||
}
|
||||
else {
|
||||
assert(externalDeck_);
|
||||
deck_ = externalDeck_;
|
||||
}
|
||||
|
||||
@ -331,7 +330,6 @@ public:
|
||||
eclState_ = internalEclState_.get();
|
||||
}
|
||||
else {
|
||||
assert(externalDeck_);
|
||||
assert(externalEclState_);
|
||||
|
||||
deck_ = externalDeck_;
|
||||
|
@ -410,13 +410,13 @@ int main(int argc, char** argv)
|
||||
// oil-gas
|
||||
if (phases.active( Opm::Phase::GAS ))
|
||||
{
|
||||
Opm::flowEbosGasOilSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||
Opm::flowEbosGasOilSetDeck(externalSetupTimer.elapsed(), deck.get(), *eclipseState, *schedule, *summaryConfig);
|
||||
return Opm::flowEbosGasOilMain(argc, argv, outputCout, outputFiles);
|
||||
}
|
||||
// oil-water
|
||||
else if ( phases.active( Opm::Phase::WATER ) )
|
||||
{
|
||||
Opm::flowEbosOilWaterSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||
Opm::flowEbosOilWaterSetDeck(externalSetupTimer.elapsed(), deck.get(), *eclipseState, *schedule, *summaryConfig);
|
||||
return Opm::flowEbosOilWaterMain(argc, argv, outputCout, outputFiles);
|
||||
}
|
||||
else {
|
||||
@ -444,37 +444,37 @@ int main(int argc, char** argv)
|
||||
}
|
||||
|
||||
if ( phases.size() == 3 ) { // oil water polymer case
|
||||
Opm::flowEbosOilWaterPolymerSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||
Opm::flowEbosOilWaterPolymerSetDeck(externalSetupTimer.elapsed(), deck.get(), *eclipseState, *schedule, *summaryConfig);
|
||||
return Opm::flowEbosOilWaterPolymerMain(argc, argv, outputCout, outputFiles);
|
||||
} else {
|
||||
Opm::flowEbosPolymerSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||
Opm::flowEbosPolymerSetDeck(externalSetupTimer.elapsed(), deck.get(), *eclipseState, *schedule, *summaryConfig);
|
||||
return Opm::flowEbosPolymerMain(argc, argv, outputCout, outputFiles);
|
||||
}
|
||||
}
|
||||
// Foam case
|
||||
else if ( phases.active( Opm::Phase::FOAM ) ) {
|
||||
Opm::flowEbosFoamSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||
Opm::flowEbosFoamSetDeck(externalSetupTimer.elapsed(), deck.get(), *eclipseState, *schedule, *summaryConfig);
|
||||
return Opm::flowEbosFoamMain(argc, argv, outputCout, outputFiles);
|
||||
}
|
||||
// Brine case
|
||||
else if ( phases.active( Opm::Phase::BRINE ) ) {
|
||||
Opm::flowEbosBrineSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||
Opm::flowEbosBrineSetDeck(externalSetupTimer.elapsed(), deck.get(), *eclipseState, *schedule, *summaryConfig);
|
||||
return Opm::flowEbosBrineMain(argc, argv, outputCout, outputFiles);
|
||||
}
|
||||
// Solvent case
|
||||
else if ( phases.active( Opm::Phase::SOLVENT ) ) {
|
||||
Opm::flowEbosSolventSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||
Opm::flowEbosSolventSetDeck(externalSetupTimer.elapsed(), deck.get(), *eclipseState, *schedule, *summaryConfig);
|
||||
return Opm::flowEbosSolventMain(argc, argv, outputCout, outputFiles);
|
||||
}
|
||||
// Energy case
|
||||
else if (eclipseState->getSimulationConfig().isThermal()) {
|
||||
Opm::flowEbosEnergySetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||
Opm::flowEbosEnergySetDeck(externalSetupTimer.elapsed(), deck.get(), *eclipseState, *schedule, *summaryConfig);
|
||||
return Opm::flowEbosEnergyMain(argc, argv, outputCout, outputFiles);
|
||||
}
|
||||
#endif // FLOW_BLACKOIL_ONLY
|
||||
// Blackoil case
|
||||
else if( phases.size() == 3 ) {
|
||||
Opm::flowEbosBlackoilSetDeck(externalSetupTimer.elapsed(), *deck, *eclipseState, *schedule, *summaryConfig);
|
||||
Opm::flowEbosBlackoilSetDeck(externalSetupTimer.elapsed(), deck.get(), *eclipseState, *schedule, *summaryConfig);
|
||||
return Opm::flowEbosBlackoilMain(argc, argv, outputCout, outputFiles);
|
||||
}
|
||||
else
|
||||
|
@ -34,13 +34,13 @@
|
||||
|
||||
namespace Opm {
|
||||
|
||||
void flowEbosBlackoilSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
void flowEbosBlackoilSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
{
|
||||
typedef TTAG(EclFlowProblem) TypeTag;
|
||||
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||
|
||||
Vanguard::setExternalSetupTime(setupTime);
|
||||
Vanguard::setExternalDeck(&deck);
|
||||
Vanguard::setExternalDeck(deck);
|
||||
Vanguard::setExternalEclState(&eclState);
|
||||
Vanguard::setExternalSchedule(&schedule);
|
||||
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosBlackoilSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
void flowEbosBlackoilSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
int flowEbosBlackoilMain(int argc, char** argv, bool outputCout, bool outputFiles);
|
||||
}
|
||||
|
||||
|
@ -36,13 +36,13 @@ SET_BOOL_PROP(EclFlowBrineProblem, EnableBrine, true);
|
||||
}}
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosBrineSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
void flowEbosBrineSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
{
|
||||
typedef TTAG(EclFlowBrineProblem) TypeTag;
|
||||
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||
|
||||
Vanguard::setExternalSetupTime(setupTime);
|
||||
Vanguard::setExternalDeck(&deck);
|
||||
Vanguard::setExternalDeck(deck);
|
||||
Vanguard::setExternalEclState(&eclState);
|
||||
Vanguard::setExternalSchedule(&schedule);
|
||||
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosBrineSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
void flowEbosBrineSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
int flowEbosBrineMain(int argc, char** argv, bool outputCout, bool outputFiles);
|
||||
}
|
||||
|
||||
|
@ -36,13 +36,13 @@ SET_BOOL_PROP(EclFlowEnergyProblem, EnableEnergy, true);
|
||||
}}
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosEnergySetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
void flowEbosEnergySetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
{
|
||||
typedef TTAG(EclFlowEnergyProblem) TypeTag;
|
||||
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||
|
||||
Vanguard::setExternalSetupTime(setupTime);
|
||||
Vanguard::setExternalDeck(&deck);
|
||||
Vanguard::setExternalDeck(deck);
|
||||
Vanguard::setExternalEclState(&eclState);
|
||||
Vanguard::setExternalSchedule(&schedule);
|
||||
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosEnergySetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
void flowEbosEnergySetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
int flowEbosEnergyMain(int argc, char** argv, bool outputCout, bool outputFiles);
|
||||
}
|
||||
|
||||
|
@ -36,13 +36,13 @@ SET_BOOL_PROP(EclFlowFoamProblem, EnableFoam, true);
|
||||
}}
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosFoamSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
void flowEbosFoamSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
{
|
||||
typedef TTAG(EclFlowFoamProblem) TypeTag;
|
||||
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||
|
||||
Vanguard::setExternalSetupTime(setupTime);
|
||||
Vanguard::setExternalDeck(&deck);
|
||||
Vanguard::setExternalDeck(deck);
|
||||
Vanguard::setExternalEclState(&eclState);
|
||||
Vanguard::setExternalSchedule(&schedule);
|
||||
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosFoamSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
void flowEbosFoamSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
int flowEbosFoamMain(int argc, char** argv, bool outputCout, bool outputFiles);
|
||||
}
|
||||
|
||||
|
@ -60,13 +60,13 @@ public:
|
||||
}}
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosGasOilSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
void flowEbosGasOilSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
{
|
||||
typedef TTAG(EclFlowGasOilProblem) TypeTag;
|
||||
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||
|
||||
Vanguard::setExternalSetupTime(setupTime);
|
||||
Vanguard::setExternalDeck(&deck);
|
||||
Vanguard::setExternalDeck(deck);
|
||||
Vanguard::setExternalEclState(&eclState);
|
||||
Vanguard::setExternalSchedule(&schedule);
|
||||
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosGasOilSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
void flowEbosGasOilSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
int flowEbosGasOilMain(int argc, char** argv, bool outputCout, bool outputFiles);
|
||||
}
|
||||
|
||||
|
@ -60,13 +60,13 @@ public:
|
||||
}}
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosOilWaterSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
void flowEbosOilWaterSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
{
|
||||
typedef TTAG(EclFlowOilWaterProblem) TypeTag;
|
||||
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||
|
||||
Vanguard::setExternalSetupTime(setupTime);
|
||||
Vanguard::setExternalDeck(&deck);
|
||||
Vanguard::setExternalDeck(deck);
|
||||
Vanguard::setExternalEclState(&eclState);
|
||||
Vanguard::setExternalSchedule(&schedule);
|
||||
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosOilWaterSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
void flowEbosOilWaterSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
int flowEbosOilWaterMain(int argc, char** argv, bool outputCout, bool outputFiles);
|
||||
}
|
||||
|
||||
|
@ -61,13 +61,13 @@ public:
|
||||
}}
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosOilWaterPolymerSetDeck(double setupTime, Deck& deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
void flowEbosOilWaterPolymerSetDeck(double setupTime, Deck* deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
{
|
||||
typedef TTAG(EclFlowOilWaterPolymerProblem) TypeTag;
|
||||
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||
|
||||
Vanguard::setExternalSetupTime(setupTime);
|
||||
Vanguard::setExternalDeck(&deck);
|
||||
Vanguard::setExternalDeck(deck);
|
||||
Vanguard::setExternalEclState(&eclState);
|
||||
Vanguard::setExternalSchedule(&schedule);
|
||||
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosOilWaterPolymerSetDeck(double setupTime, Deck& deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
void flowEbosOilWaterPolymerSetDeck(double setupTime, Deck* deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
int flowEbosOilWaterPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles);
|
||||
}
|
||||
|
||||
|
@ -36,13 +36,13 @@ SET_BOOL_PROP(EclFlowPolymerProblem, EnablePolymer, true);
|
||||
}}
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosPolymerSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
void flowEbosPolymerSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
{
|
||||
typedef TTAG(EclFlowPolymerProblem) TypeTag;
|
||||
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||
|
||||
Vanguard::setExternalSetupTime(setupTime);
|
||||
Vanguard::setExternalDeck(&deck);
|
||||
Vanguard::setExternalDeck(deck);
|
||||
Vanguard::setExternalEclState(&eclState);
|
||||
Vanguard::setExternalSchedule(&schedule);
|
||||
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosPolymerSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
void flowEbosPolymerSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
int flowEbosPolymerMain(int argc, char** argv, bool outputCout, bool outputFiles);
|
||||
}
|
||||
|
||||
|
@ -36,13 +36,13 @@ SET_BOOL_PROP(EclFlowSolventProblem, EnableSolvent, true);
|
||||
}}
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosSolventSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
void flowEbosSolventSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig)
|
||||
{
|
||||
typedef TTAG(EclFlowSolventProblem) TypeTag;
|
||||
typedef GET_PROP_TYPE(TypeTag, Vanguard) Vanguard;
|
||||
|
||||
Vanguard::setExternalSetupTime(setupTime);
|
||||
Vanguard::setExternalDeck(&deck);
|
||||
Vanguard::setExternalDeck(deck);
|
||||
Vanguard::setExternalEclState(&eclState);
|
||||
Vanguard::setExternalSchedule(&schedule);
|
||||
Vanguard::setExternalSummaryConfig(&summaryConfig);
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
|
||||
namespace Opm {
|
||||
void flowEbosSolventSetDeck(double setupTime, Deck &deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
void flowEbosSolventSetDeck(double setupTime, Deck *deck, EclipseState& eclState, Schedule& schedule, SummaryConfig& summaryConfig);
|
||||
int flowEbosSolventMain(int argc, char** argv, bool outoutCout, bool outputFiles);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user