#include <SubSystemsManager.h>
|
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) |
|
|
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.
◆ finalize()
void SubSystemsManager::finalize |
( |
| ) |
|
|
static |
Finalize subsystems. This will be called by the destructor, but in special cases it may be necessary to call finalize() explicitly.
◆ init_petsc()
void SubSystemsManager::init_petsc |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
|
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).
◆ mpi_finalized()
bool SubSystemsManager::mpi_finalized |
( |
| ) |
|
|
static |
Check if MPI has been finalized (returns true if MPI has been finalised)
◆ mpi_initialized()
bool SubSystemsManager::mpi_initialized |
( |
| ) |
|
|
static |
Check if MPI has been initialised (returns true if MPI has been initialised, even if it is later finalised)
◆ PetscDolfinErrorHandler()
PetscErrorCode SubSystemsManager::PetscDolfinErrorHandler |
( |
MPI_Comm |
comm, |
|
|
int |
line, |
|
|
const char * |
fun, |
|
|
const char * |
file, |
|
|
PetscErrorCode |
n, |
|
|
PetscErrorType |
p, |
|
|
const char * |
mess, |
|
|
void * |
ctx |
|
) |
| |
|
static |
PETSc error handler. Logs everything known to DOLFIN logging system (with level TRACE) and stores the error message into pests_err_msg member.
◆ responsible_mpi()
bool SubSystemsManager::responsible_mpi |
( |
| ) |
|
|
static |
Return true if DOLFIN initialised MPI (and is therefore responsible for finalization)
◆ responsible_petsc()
bool SubSystemsManager::responsible_petsc |
( |
| ) |
|
|
static |
Return true if DOLFIN initialised PETSc (and is therefore responsible for finalization)
◆ singleton()
Singleton instance. Calling this ensures singleton instance of SubSystemsManager is initialized according to the "Construct
on First Use" idiom.
The documentation for this class was generated from the following files:
- /build/dolfin-5PBa6z/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/common/SubSystemsManager.h
- /build/dolfin-5PBa6z/dolfin-2019.2.0~legacy20240219.1c52e83/dolfin/common/SubSystemsManager.cpp