- Include the eclipse_io.cpp file in existing extension library - do not create a new library. - Remove Python class EclFile - just expose the C++ through Pybind1, include some monkey-patching of the class to ensure proper Python strings for CHAR keywords. - Remove string based keyword lookup. - Use standard Python methods __len__, __getitem__ and __contains__; get() is an equivalent alternative to __getitem__(). - Add property arrays in addition to getListOfArrays()
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#ifndef SUNBEAM_HPP
|
|
#define SUNBEAM_HPP
|
|
|
|
#include <pybind11/pybind11.h>
|
|
|
|
namespace Opm {}
|
|
|
|
namespace py = pybind11;
|
|
|
|
using namespace Opm;
|
|
const py::return_value_policy ref_internal = py::return_value_policy::reference_internal;
|
|
const py::return_value_policy python_owner = py::return_value_policy::take_ownership;
|
|
const py::return_value_policy move = py::return_value_policy::move;
|
|
|
|
namespace python::common {
|
|
void export_all(py::module& module);
|
|
void export_UnitSystem(py::module& module);
|
|
void export_Connection(py::module& module);
|
|
void export_Deck(py::module& module);
|
|
void export_DeckKeyword(py::module& module);
|
|
void export_Eclipse3DProperties(py::module& module);
|
|
void export_EclipseConfig(py::module& module);
|
|
void export_EclipseGrid(py::module& module);
|
|
void export_EclipseState(py::module& module);
|
|
void export_Group(py::module& module);
|
|
void export_ParseContext(py::module& module);
|
|
void export_Parser(py::module& module);
|
|
void export_Schedule(py::module& module);
|
|
void export_TableManager(py::module& module);
|
|
void export_Well(py::module& module);
|
|
void export_Log(py::module& module);
|
|
void export_IO(py::module& module);
|
|
}
|
|
|
|
#endif //SUNBEAM_HPP
|