SubSystemsManager

class dolfin.cpp.common.SubSystemsManager(*args, **kwargs)

Bases: object

This is a singleton class which manages the initialisation and finalisation of various sub systems, such as MPI and PETSc.

static finalize() → 'void'

Finalize subsystems. This will be called by the destructor, but in special cases it may be necessary to call finalize() explicitly.

static init_mpi(*args) → 'int'

Overloaded versions

  • init_mpi()

    Initialise MPI

  • init_mpi(argc, argv[], required_thread_level)

    Initialise MPI with required level of thread support

static init_petsc(*args) → 'void'

Overloaded versions

  • init_petsc()

    Initialize PETSc without command-line arguments

  • init_petsc(argc, argv[])

    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 mpi_finalized() → 'bool'

Check if MPI has been finalized (returns true if MPI has been finalised)

static mpi_initialized() → 'bool'

Check if MPI has been initialised (returns true if MPI has been initialised, even if it is later finalised)

petsc_err_msg
static responsible_mpi() → 'bool'

Return true if DOLFIN initialised MPI (and is therefore responsible for finalization)

static responsible_petsc() → 'bool'

Return true if DOLFIN initialised PETSc (and is therefore responsible for finalization)

static singleton() → 'dolfin::SubSystemsManager &'

Singleton instance. Calling this ensures singleton instance of SubSystemsManager is initialized according to the “Construct on First Use” idiom.

thisown

The membership flag