19#ifndef EMBEDDED_PYTHON
20error BUG: The PyRunModule.hpp header should *not* be included in a configuration without EMBEDDED_PYTHON
23#ifndef OPM_PY_RUN_MODULE
24#define OPM_PY_RUN_MODULE
26#include <pybind11/embed.h>
27#include <pybind11/pybind11.h>
28namespace py = pybind11;
34#include <opm/input/eclipse/Python/Python.hpp>
35#include <opm/input/eclipse/EclipseState/EclipseState.hpp>
36#include <opm/input/eclipse/Schedule/Schedule.hpp>
37#include <opm/input/eclipse/Schedule/SummaryState.hpp>
41class __attribute__((visibility(
"default"))) PyRunModule {
43 PyRunModule(std::shared_ptr<const Python> python,
const std::string& fname);
45 bool run(EclipseState& ecl_state, Schedule& sched, std::size_t report_step, SummaryState& st,
const std::function<
void(
const std::string&,
const std::vector<std::string>&)>& actionx_callback);
48 py::object run_function = py::none();
49 std::shared_ptr<const Python> python_handle;
51 std::filesystem::path module_path;
52 std::string module_name;
53 py::module opm_embedded;
55 bool executeInnerRunFunction(
const std::function<
void(
const std::string&,
const std::vector<std::string>&)>& actionx_callback);
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30