SubSystemsManager¶
-
class
dolfin.cpp.common.SubSystemsManager(*args, **kwargs)¶ Bases:
objectThis is a singleton class which manages the initialisation and finalisation of various sub systems, such as
MPIand PETSc.-
static
finalize()¶ Finalize subsystems. This will be called by the destructor, but in special cases it may be necessary to call
finalizeexplicitly.Return type: void
-
static
init_mpi(*args) → int¶ Initialise
MPIwith required level of thread support.Parameters: Return type:
-
static
init_petsc()¶ 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).
Parameters: - argc (int) –
- * argv (char) –
Return type: void
-
static
mpi_finalized() → bool¶ Check if
MPIhas been finalized (returns true ifMPIhas been finalised)Return type: bool
-
static
mpi_initialized() → bool¶ Check if
MPIhas been initialised (returns true ifMPIhas been initialised, even if it is later finalised)Return type: bool
-
petsc_err_msg¶ Last recorded PETSc error message.
Return type: std::string
-
static
responsible_mpi() → bool¶ Return true if DOLFIN initialised
MPI(and is therefore responsible for finalization)Return type: bool
-
static
responsible_petsc() → bool¶ Return true if DOLFIN initialised PETSc (and is therefore responsible for finalization)
Return type: bool
-
static
singleton()¶ Singleton instance. Calling this ensures singleton instance of
SubSystemsManageris initialized according to the “Construct on First Use” idiom.Return type: SubSystemsManager &
-
thisown¶ The membership flag
-
static