28#include <opm/input/eclipse/Schedule/SummaryState.hpp>
29#include <opm/input/eclipse/Schedule/Action/PyAction.hpp>
34#include <pybind11/embed.h>
35namespace py = pybind11;
47class __attribute__ ((visibility(
"hidden"))) PythonInterp {
49 explicit PythonInterp(
bool enable);
50 bool exec(
const std::string& python_code);
51 bool exec(
const std::string& python_code,
const Parser& parser, Deck& deck);
52 static bool supported() {
return true; };
53 explicit operator bool()
const {
return bool(this->guard); }
55 void load_module(
const std::string& python_file);
56 bool exec(
const std::string& python_code, py::module& context);
58 std::unique_ptr<py::scoped_interpreter> guard;
74 bool exec(
const std::string&) {
78 bool exec(
const std::string&,
const Parser&,
Deck&) {
86 static bool supported() {
return false; };
87 explicit operator bool()
const {
return false; }
89 bool fail() {
throw std::logic_error(
"The current opm code has been built without Python support;"); }
Definition PyAction.hpp:41
Definition EclipseState.hpp:63
The hub of the parsing process.
Definition Parser.hpp:60
Definition PythonInterp.hpp:67
Definition Schedule.hpp:88
Definition SummaryState.hpp:68
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30