mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #3680 from akva2/use_runstatic
Use Main::runStatic in PyBlackoilSimulator
This commit is contained in:
commit
fd743de749
@ -24,21 +24,19 @@
|
|||||||
|
|
||||||
#include <flow/flow_ebos_blackoil.hpp>
|
#include <flow/flow_ebos_blackoil.hpp>
|
||||||
|
|
||||||
# ifndef FLOW_BLACKOIL_ONLY
|
#include <flow/flow_ebos_gasoil.hpp>
|
||||||
# include <flow/flow_ebos_gasoil.hpp>
|
#include <flow/flow_ebos_oilwater.hpp>
|
||||||
# include <flow/flow_ebos_oilwater.hpp>
|
#include <flow/flow_ebos_gaswater.hpp>
|
||||||
# include <flow/flow_ebos_gaswater.hpp>
|
#include <flow/flow_ebos_solvent.hpp>
|
||||||
# include <flow/flow_ebos_solvent.hpp>
|
#include <flow/flow_ebos_polymer.hpp>
|
||||||
# include <flow/flow_ebos_polymer.hpp>
|
#include <flow/flow_ebos_extbo.hpp>
|
||||||
# include <flow/flow_ebos_extbo.hpp>
|
#include <flow/flow_ebos_foam.hpp>
|
||||||
# include <flow/flow_ebos_foam.hpp>
|
#include <flow/flow_ebos_brine.hpp>
|
||||||
# include <flow/flow_ebos_brine.hpp>
|
#include <flow/flow_ebos_oilwater_brine.hpp>
|
||||||
# include <flow/flow_ebos_oilwater_brine.hpp>
|
#include <flow/flow_ebos_energy.hpp>
|
||||||
# include <flow/flow_ebos_energy.hpp>
|
#include <flow/flow_ebos_oilwater_polymer.hpp>
|
||||||
# include <flow/flow_ebos_oilwater_polymer.hpp>
|
#include <flow/flow_ebos_oilwater_polymer_injectivity.hpp>
|
||||||
# include <flow/flow_ebos_oilwater_polymer_injectivity.hpp>
|
#include <flow/flow_ebos_micp.hpp>
|
||||||
# include <flow/flow_ebos_micp.hpp>
|
|
||||||
# endif
|
|
||||||
|
|
||||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
#include <opm/parser/eclipse/Parser/ErrorGuard.hpp>
|
||||||
@ -288,11 +286,8 @@ namespace Opm
|
|||||||
// TODO: make sure that no illegal combinations like thermal and
|
// TODO: make sure that no illegal combinations like thermal and
|
||||||
// twophase are requested.
|
// twophase are requested.
|
||||||
|
|
||||||
if (false) {}
|
|
||||||
|
|
||||||
#ifndef FLOW_BLACKOIL_ONLY
|
|
||||||
// Single-phase case
|
// Single-phase case
|
||||||
else if (rspec.micp()) {
|
if (rspec.micp()) {
|
||||||
return this->runMICP(phases);
|
return this->runMICP(phases);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -330,7 +325,6 @@ namespace Opm
|
|||||||
else if (eclipseState_->getSimulationConfig().isThermal()) {
|
else if (eclipseState_->getSimulationConfig().isThermal()) {
|
||||||
return this->runThermal();
|
return this->runThermal();
|
||||||
}
|
}
|
||||||
#endif // FLOW_BLACKOIL_ONLY
|
|
||||||
|
|
||||||
// Blackoil case
|
// Blackoil case
|
||||||
else if (phases.size() == 3) {
|
else if (phases.size() == 3) {
|
||||||
@ -546,7 +540,6 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef FLOW_BLACKOIL_ONLY
|
|
||||||
int runMICP(const Phases& phases)
|
int runMICP(const Phases& phases)
|
||||||
{
|
{
|
||||||
if (!phases.active(Phase::WATER) || (phases.size() > 2)) {
|
if (!phases.active(Phase::WATER) || (phases.size() > 2)) {
|
||||||
@ -684,7 +677,6 @@ namespace Opm
|
|||||||
|
|
||||||
return flowEbosEnergyMain(argc_, argv_, outputCout_, outputFiles_);
|
return flowEbosEnergyMain(argc_, argv_, outputCout_, outputFiles_);
|
||||||
}
|
}
|
||||||
#endif // FLOW_BLACKOIL_ONLY
|
|
||||||
|
|
||||||
int runBlackOil()
|
int runBlackOil()
|
||||||
{
|
{
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||||
#define FLOW_BLACKOIL_ONLY
|
|
||||||
#include <opm/simulators/flow/Main.hpp>
|
#include <opm/simulators/flow/Main.hpp>
|
||||||
#include <opm/simulators/flow/FlowMainEbos.hpp>
|
#include <opm/simulators/flow/FlowMainEbos.hpp>
|
||||||
// NOTE: EXIT_SUCCESS, EXIT_FAILURE is defined in cstdlib
|
// NOTE: EXIT_SUCCESS, EXIT_FAILURE is defined in cstdlib
|
||||||
@ -75,7 +74,7 @@ py::array_t<double> PyBlackOilSimulator::getPorosity()
|
|||||||
int PyBlackOilSimulator::run()
|
int PyBlackOilSimulator::run()
|
||||||
{
|
{
|
||||||
auto mainObject = Opm::Main( deckFilename_ );
|
auto mainObject = Opm::Main( deckFilename_ );
|
||||||
return mainObject.runDynamic();
|
return mainObject.runStatic<Opm::Properties::TTag::EclFlowProblem>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PyBlackOilSimulator::setPorosity( py::array_t<double,
|
void PyBlackOilSimulator::setPorosity( py::array_t<double,
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||||
#define FLOW_BLACKOIL_ONLY
|
|
||||||
#include <opm/simulators/flow/Main.hpp>
|
#include <opm/simulators/flow/Main.hpp>
|
||||||
#include <opm/simulators/flow/FlowMainEbos.hpp>
|
#include <opm/simulators/flow/FlowMainEbos.hpp>
|
||||||
#include <opm/simulators/flow/python/PyMaterialState.hpp>
|
#include <opm/simulators/flow/python/PyMaterialState.hpp>
|
||||||
|
Loading…
Reference in New Issue
Block a user