File boutcomm.hxx

class BoutComm
#include <boutcomm.hxx>

Class to represent the ‘global’ communicator.

Public Functions

~BoutComm()
void setComm(MPI_Comm c)
MPI_Comm getComm()
bool isSet()

Public Static Functions

BoutComm *getInstance()

Get a pointer to the only instance.

MPI_Comm get()

Shortcut method.

void setArgs(int &c, char **&v)
void cleanup()
int rank()

Rank: my processor number.

int size()

Size: number of processors.

Private Functions

BoutComm()

Private Members

int *pargc = {nullptr}
char ***pargv = {nullptr}

Command-line arguments. These can be modified by MPI init, so pointers are used

bool hasBeenSet = {false}
MPI_Comm comm

Private Static Attributes

BoutComm *instance = nullptr

The only instance of this class (Singleton)