File petsclib.hxx

Defines

PETSC_VERSION_GE(MAJOR, MINOR, SUBMINOR)
class PetscLib
#include <petsclib.hxx>

Handles initialisation and finalisation of PETSc library. The first instance which is created initialises PETSc Keeps a count of the number of how many instances exist When the last instance is destroyed it finalises PETSc.

Public Functions

PetscLib()

Ensure that PETSc has been initialised

~PetscLib()

Calls PetscFinalize when all PetscLib instances are destroyed

Public Static Functions

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

This is called once to set the command-line options. Should be done early in the program, before any instances of PetscLib are created. The arguments will be passed to PetscInitialize()

void cleanup()

Force cleanup. This will call PetscFinalize, printing a warning if any instances of PetscLib still exist

Private Static Attributes

int count = 0

How many instances?

char help = "BOUT++: Uses finite difference methods to solve plasma fluid problems in curvilinear coordinates"

Help string.

int *pargc = nullptr
char ***pargv = nullptr
PetscLogEvent USER_EVENT = 0