OGS
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.

Classes

struct  LinearSolverLibrarySetup
 
class  TestDefinition
 

Functions

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 46 of file ogs_embedded_python.cpp.

47{
48 // Allows ogs to be interrupted by SIGINT, which otherwise is handled by
49 // python. See
50 // https://docs.python.org/3/c-api/exceptions.html#c.PyErr_CheckSignals and
51 // https://pybind11.readthedocs.io/en/stable/faq.html#how-can-i-properly-handle-ctrl-c-in-long-running-functions
52 constexpr bool init_signal_handlers = false;
53 return pybind11::scoped_interpreter{init_signal_handlers};
54}

Referenced by ProjectData::ProjectData().