MFEM
v4.6.0
Finite element discretization library
|
A simple singleton class that calls MPI_Init() at construction and MPI_Finalize() at destruction. It also provides easy access to MPI_COMM_WORLD's rank and size. More...
#include <communication.hpp>
Static Public Member Functions | |
static void | Init () |
Singleton creation with Mpi::Init();. More... | |
static void | Init (int &argc, char **&argv) |
Singleton creation with Mpi::Init(argc,argv);. More... | |
static void | Finalize () |
Finalize MPI (if it has been initialized and not yet already finalized). More... | |
static bool | IsInitialized () |
Return true if MPI has been initialized. More... | |
static bool | IsFinalized () |
Return true if MPI has been finalized. More... | |
static int | WorldRank () |
Return the MPI rank in MPI_COMM_WORLD. More... | |
static int | WorldSize () |
Return the size of MPI_COMM_WORLD. More... | |
static bool | Root () |
Return true if the rank in MPI_COMM_WORLD is zero. More... | |
A simple singleton class that calls MPI_Init() at construction and MPI_Finalize() at destruction. It also provides easy access to MPI_COMM_WORLD's rank and size.
Definition at line 32 of file communication.hpp.
|
inlinestatic |
Finalize MPI (if it has been initialized and not yet already finalized).
Definition at line 40 of file communication.hpp.
|
inlinestatic |
Singleton creation with Mpi::Init();.
Definition at line 36 of file communication.hpp.
|
inlinestatic |
Singleton creation with Mpi::Init(argc,argv);.
Definition at line 38 of file communication.hpp.
|
inlinestatic |
Return true if MPI has been finalized.
Definition at line 52 of file communication.hpp.
|
inlinestatic |
Return true if MPI has been initialized.
Definition at line 45 of file communication.hpp.
|
inlinestatic |
Return true if the rank in MPI_COMM_WORLD is zero.
Definition at line 73 of file communication.hpp.
|
inlinestatic |
Return the MPI rank in MPI_COMM_WORLD.
Definition at line 59 of file communication.hpp.
|
inlinestatic |
Return the size of MPI_COMM_WORLD.
Definition at line 66 of file communication.hpp.