ESyS-Particle  2.3.4
RankAndComm.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2017 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.apache.org/licenses/LICENSE-2.0 //
10 // //
12 
13 #ifndef __RANKANDCOMM_H
14 #define __RANKANDCOMM_H
15 
16 //--- MPI includes ---
17 #include <mpi.h>
18 
20 {
21 public:
22  MpiRankAndComm(int globalRank, MPI_Comm globalComm)
23  : m_globalRank(globalRank),
24  m_globalComm(globalComm)
25  {
26  }
27 
28  int getRank() const
29  {
30  return m_globalRank;
31  }
32 
33  MPI_Comm getComm() const
34  {
35  return m_globalComm;
36  }
37 
38 private:
40  MPI_Comm m_globalComm;
41 };
42 
43 #endif // __RANKANDCOMM_H
MpiRankAndComm::MpiRankAndComm
MpiRankAndComm(int globalRank, MPI_Comm globalComm)
Definition: RankAndComm.h:22
MpiRankAndComm::m_globalRank
int m_globalRank
Definition: RankAndComm.h:39
MpiRankAndComm::getRank
int getRank() const
Definition: RankAndComm.h:28
MpiRankAndComm::getComm
MPI_Comm getComm() const
Definition: RankAndComm.h:33
MpiRankAndComm::m_globalComm
MPI_Comm m_globalComm
Definition: RankAndComm.h:40
MpiRankAndComm
Definition: RankAndComm.h:20