ApplicationsLib Namespace Reference

Detailed Description

The LinearSolverLibrarySetup takes care of proper initialization and shutting down of an external linear solver library. The concrete implementation is chosen by the build system. An object of this class must be created at the beginning of the scope where it is used. When the scope closes (or the object is destroyed explicitly) library shutting down functions are automatically called. The default implementation is empty providing polymorphic behaviour when using this class.


struct  LinearSolverLibrarySetup
class  TestDefinition


pybind11::scoped_interpreter setupEmbeddedPython ()

Function Documentation

◆ setupEmbeddedPython()

OGS_EXPORT_SYMBOL pybind11::scoped_interpreter ApplicationsLib::setupEmbeddedPython ( )

Sets up an embedded Python interpreter and makes sure that the OpenGeoSys Python module is not removed by the linker.

Definition at line 44 of file ogs_embedded_python.cpp.

47 // pybind11_init_impl_OpenGeoSys is the function initializing the embedded
48 // OpenGeoSys Python module. The name is generated by pybind11. If it is not
49 // obvious that this symbol is actually used, the linker might remove it
50 // under certain circumstances.
51 mark_used(&pybind11_init_impl_OpenGeoSys);
54 // Allows ogs to be interrupted by SIGINT, which otherwise is handled by
55 // python. See
56 // https://docs.python.org/3/c-api/exceptions.html#c.PyErr_CheckSignals and
57 // https://pybind11.readthedocs.io/en/stable/faq.html#how-can-i-properly-handle-ctrl-c-in-long-running-functions
58 constexpr bool init_signal_handlers = false;
59 return pybind11::scoped_interpreter{init_signal_handlers};
void mark_used(T p)

References mark_used().

Referenced by ProjectData::ProjectData().