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

static BoutComm *getInstance()

Get a pointer to the only instance.

static MPI_Comm get()

Shortcut method.

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

Rank: my processor number.

static 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

static BoutComm *instance = nullptr

The only instance of this class (Singleton)