DOLFIN
DOLFIN C++ interface
|
#include <SubSystemsManager.h>
Public Member Functions | |
SubSystemsManager (const SubSystemsManager &)=delete | |
Static Public Member Functions | |
static SubSystemsManager & | singleton () |
static void | init_mpi () |
Initialise MPI. | |
static int | init_mpi (int argc, char *argv[], int required_thread_level) |
Initialise MPI with required level of thread support. | |
static void | init_petsc () |
Initialize PETSc without command-line arguments. | |
static void | init_petsc (int argc, char *argv[]) |
static void | finalize () |
static bool | responsible_mpi () |
static bool | responsible_petsc () |
static bool | mpi_initialized () |
static bool | mpi_finalized () |
static PetscErrorCode | PetscDolfinErrorHandler (MPI_Comm comm, int line, const char *fun, const char *file, PetscErrorCode n, PetscErrorType p, const char *mess, void *ctx) |
Public Attributes | |
std::string | petsc_err_msg |
Last recorded PETSc error message. | |
This is a singleton class which manages the initialisation and finalisation of various sub systems, such as MPI and PETSc.
|
static |
Finalize subsystems. This will be called by the destructor, but in special cases it may be necessary to call finalize() explicitly.
|
static |
Initialize PETSc with command-line arguments. Note that PETSc command-line arguments may also be filtered and sent to PETSc by parameters.parse(argc, argv).
|
static |
|
static |
|
static |
PETSc error handler. Logs everything known to DOLFIN logging system (with level TRACE) and stores the error message into pests_err_msg member.
|
static |
Return true if DOLFIN initialised MPI (and is therefore responsible for finalization)
|
static |
Return true if DOLFIN initialised PETSc (and is therefore responsible for finalization)
|
static |
Singleton instance. Calling this ensures singleton instance of SubSystemsManager is initialized according to the "Construct on First Use" idiom.