Files
karl/include/simulation/mpi_communication.h
T
2024-12-04 17:15:04 +01:00

22 lines
478 B
C++
Executable File

#ifndef MPI_COMMUNICATION_H
#define MPI_COMMUNICATION_H
// class to handle MPI communication
class MpiCommunication {
public:
static int mpi_rank;
static int mpi_size;
// returns the MPI-rank of the process
static int mpiRank();
// returns the number of MPI processes
static int mpiSize();
// initialize the two member variables
static void init(int argc, char* argv[]);
// wrapper for MPI_Finalize()
static void finalize();
};
#endif /* MPI_COMMUNICATION_H */