20#ifndef OPM_PY_BLACKOIL_SIMULATOR_HEADER_INCLUDED
21#define OPM_PY_BLACKOIL_SIMULATOR_HEADER_INCLUDED
25#include <opm/models/utils/propertysystem.hh>
26#include <opm/models/utils/parametersystem.hh>
30#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
31#include <opm/input/eclipse/Schedule/Schedule.hpp>
32#include <opm/input/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
38 using TypeTag = Opm::Properties::TTag::FlowProblemTPFA;
39 using Simulator = Opm::GetPropType<TypeTag, Opm::Properties::Simulator>;
44 std::shared_ptr<Opm::Deck> deck,
45 std::shared_ptr<Opm::EclipseState> state,
46 std::shared_ptr<Opm::Schedule> schedule,
47 std::shared_ptr<Opm::SummaryConfig> summary_config);
60 py::array_t<double, py::array::c_style | py::array::forcecast> array);
62 const std::string &idx_name,
64 py::array::c_style | py::array::forcecast> array);
65 void setupMpi(
bool init_mpi,
bool finalize_mpi);
75 const std::string deck_filename_;
76 bool has_run_init_ =
false;
77 bool has_run_cleanup_ =
false;
78 bool mpi_init_ =
true;
79 bool mpi_finalize_ =
true;
84 std::unique_ptr<Opm::Main> main_;
86 std::unique_ptr<Opm::FlowMain<TypeTag>> flow_main_;
87 Simulator* simulator_;
88 std::unique_ptr<PyFluidState<TypeTag>> fluid_state_;
89 std::unique_ptr<PyMaterialState<TypeTag>> material_state_;
90 std::shared_ptr<Opm::Deck> deck_;
91 std::shared_ptr<Opm::EclipseState> eclipse_state_;
92 std::shared_ptr<Opm::Schedule> schedule_;
93 std::shared_ptr<Opm::SummaryConfig> summary_config_;
Definition: FlowMain.hpp:83
Definition: PyBlackOilSimulator.hpp:36
void setPorosity(py::array_t< double, py::array::c_style|py::array::forcecast > array)
PyBlackOilSimulator(std::shared_ptr< Opm::Deck > deck, std::shared_ptr< Opm::EclipseState > state, std::shared_ptr< Opm::Schedule > schedule, std::shared_ptr< Opm::SummaryConfig > summary_config)
py::array_t< double > getPorosity()
bool checkSimulationFinished()
void setPrimaryVariable(const std::string &idx_name, py::array_t< double, py::array::c_style|py::array::forcecast > array)
void setupMpi(bool init_mpi, bool finalize_mpi)
py::array_t< double > getPrimaryVariable(const std::string &variable) const
py::array_t< double > getCellVolumes()
py::array_t< double > getFluidStateVariable(const std::string &name) const
py::array_t< int > getPrimaryVarMeaning(const std::string &variable) const
void advance(int report_step)
std::map< std::string, int > getPrimaryVarMeaningMap(const std::string &variable) const
PyBlackOilSimulator(const std::string &deckFilename)
Definition: PyFluidState.hpp:35
Definition: PyMaterialState.hpp:34
Definition: Pybind11Exporter.hpp:11