OGS
ogs_callbacks_module.cpp
Go to the documentation of this file.
1
11#include <pybind11/eval.h>
12#include <pybind11/pybind11.h>
13
14#include <algorithm>
15
19
20PYBIND11_MODULE(callbacks, m)
21{
22 m.attr("__name__") = "ogs.callbacks";
26
27 pybind11::exec(R"(
28 try:
29 import OpenGeoSys
30 raise ImportError("The Python interpreter seems to be running inside the OGS binary, but you are about to import a Python module from OGS's Python bindings. Please do not import ogs.callbacks, but use the OpenGeoSys module, instead.")
31 except ModuleNotFoundError:
32 pass
33 )");
34}
void pythonBindSourceTerm(pybind11::module &m)
Creates Python bindings for the Python source term class.
void pythonBindBoundaryCondition(pybind11::module &m)
Creates Python bindings for the Python BC class.
void bheInflowpythonBindBoundaryCondition(pybind11::module &m)
Creates BHE Inflow Python bindings for the Python BC class.
PYBIND11_MODULE(callbacks, m)