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
16#include "BaseLib/Logging.h"
20
21PYBIND11_MODULE(callbacks, m)
22{
23#ifndef NDEBUG
25#else // NDEBUG
27#endif // NDEBUG
28 m.attr("__name__") = "ogs.callbacks";
32
33 pybind11::exec(R"(
34 try:
35 import OpenGeoSys
36 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.")
37 except ModuleNotFoundError:
38 pass
39 )");
40}
void initOGSLogger(std::string const &log_level)
Definition Logging.cpp:64
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)