Static Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
oomph::MPI_Helpers Class Reference

MPI_Helpers class contains static helper methods to support MPI within oomph-lib. The methods init(...) and finalize() initialize and finalize MPI in oomph-lib and manage the oomph-libs global communicator communicator_pt(). NOTE: This class encapsulates static helper methods and instances of it CANNOT be instantiated. More...

#include <oomph_utilities.h>

Static Public Member Functions

static void init (int argc, char **argv, const bool &make_duplicate_of_mpi_comm_world=true)
 initialise mpi (oomph-libs equivalent of MPI_Init(...)) Initialises MPI and creates the global oomph-lib communicator. If optional boolean flag is set to false, we use MPI_COMM_WORLD itself as oomph-lib's communicator. Defaults to true. More...
 
static void finalize ()
 finalize mpi More...
 
static OomphCommunicatorcommunicator_pt ()
 access to the global oomph-lib communicator More...
 
static bool mpi_has_been_initialised ()
 return true if MPI has been initialised More...
 

Private Member Functions

 MPI_Helpers ()
 private default constructor definition (to prevent instances of the class being instantiated) More...
 
 MPI_Helpers (const MPI_Helpers &)
 private copy constructor definition (to prevent instances of the class being instantiated) More...
 

Static Private Attributes

static bool MPI_has_been_initialised = false
 Bool set to true if MPI has been initialised. More...
 
static OomphCommunicatorCommunicator_pt = 0
 the global communicator More...
 

Detailed Description

MPI_Helpers class contains static helper methods to support MPI within oomph-lib. The methods init(...) and finalize() initialize and finalize MPI in oomph-lib and manage the oomph-libs global communicator communicator_pt(). NOTE: This class encapsulates static helper methods and instances of it CANNOT be instantiated.

Definition at line 815 of file oomph_utilities.h.

Constructor & Destructor Documentation

oomph::MPI_Helpers::MPI_Helpers ( )
private

private default constructor definition (to prevent instances of the class being instantiated)

oomph::MPI_Helpers::MPI_Helpers ( const MPI_Helpers )
private

private copy constructor definition (to prevent instances of the class being instantiated)

Member Function Documentation

OomphCommunicator * oomph::MPI_Helpers::communicator_pt ( )
static
void oomph::MPI_Helpers::finalize ( )
static

finalize mpi

finalize mpi (oomph-lib equivalent of MPI_Finalize()) Deletes the global oomph-lib communicator and finalizes MPI.

Definition at line 1251 of file oomph_utilities.cc.

References Communicator_pt.

Referenced by oomph::CommandLineArgs::parse_and_assign().

void oomph::MPI_Helpers::init ( int  argc,
char **  argv,
const bool &  make_duplicate_of_mpi_comm_world = true 
)
static

initialise mpi (oomph-libs equivalent of MPI_Init(...)) Initialises MPI and creates the global oomph-lib communicator. If optional boolean flag is set to false, we use MPI_COMM_WORLD itself as oomph-lib's communicator. Defaults to true.

Initialize mpi. If optional boolean flag is set to false, we use MPI_COMM_WORLD itself as oomph-lib's communicator. Defaults to true.

Definition at line 1203 of file oomph_utilities.cc.

References oomph::MPIOutputModifier::communicator_pt(), Communicator_pt, MPI_has_been_initialised, oomph::oomph_info, oomph::oomph_mpi_output, and oomph::OomphInfo::output_modifier_pt().

static bool oomph::MPI_Helpers::mpi_has_been_initialised ( )
inlinestatic

Member Data Documentation

OomphCommunicator * oomph::MPI_Helpers::Communicator_pt = 0
staticprivate

the global communicator

Definition at line 852 of file oomph_utilities.h.

Referenced by communicator_pt(), finalize(), and init().

bool oomph::MPI_Helpers::MPI_has_been_initialised = false
staticprivate

Bool set to true if MPI has been initialised.

Definition at line 849 of file oomph_utilities.h.

Referenced by communicator_pt(), and init().


The documentation for this class was generated from the following files: