19 #ifndef EMBEDDED_PYTHON 20 error 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> 28 namespace 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> 41 class __attribute__((visibility("default"))) PyRunModule {
43 PyRunModule(std::shared_ptr<const Python> python,
const std::string& fname);
45 bool run(EclipseState& ecl_state,
47 std::size_t report_step,
49 const std::function<
void(
const std::string&,
const std::vector<std::string>&)>& actionx_callback,
50 const std::unordered_map<std::string, double>& target_wellpi = {});
53 py::object run_function = py::none();
54 std::shared_ptr<const Python> python_handle;
56 std::filesystem::path module_path;
57 std::string module_name;
58 py::module opm_embedded;
60 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