ESyS-Particle  2.3
CheckPointParams.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2014 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.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 
14 #ifndef CHECKPOINTPARAMS_H
15 #define CHECKPOINTPARAMS_H
16 
17 #include <mpi.h>
18 
19 #include <string>
20 #include <iostream>
21 
22 
23 class AMPIBuffer;
24 
29 {
30 public:
31  CheckPointParams(const std::string &fileNamePrefix, int time, int rank, int prec);
32 
34 
38  std::string getFileName() const;
39  int getPrecision() const {return m_prec;};
40 
41  void packInto(AMPIBuffer *mpiBuff) const;
42  static CheckPointParams unpackFrom(AMPIBuffer *mpiBuff, MPI_Comm mpiComm=MPI_COMM_WORLD);
43 
44  //friend std::ostream& operator<<(std::ostream &oStream, const CheckPointParams &checkPointParams);
45 
46 protected:
48 
49 private:
53  std::string m_fileNamePrefix;
54 
58  int m_time;
59 
63  int m_rank;
64  int m_prec;
65 };
66 
67 #endif
std::string m_fileNamePrefix
Definition: CheckPointParams.h:53
void packInto(AMPIBuffer *mpiBuff) const
Definition: CheckPointParams.cpp:49
int m_rank
Definition: CheckPointParams.h:63
static CheckPointParams unpackFrom(AMPIBuffer *mpiBuff, MPI_Comm mpiComm=MPI_COMM_WORLD)
Definition: CheckPointParams.cpp:56
CheckPointParams()
Definition: CheckPointParams.cpp:21
int m_time
Definition: CheckPointParams.h:58
int m_prec
Definition: CheckPointParams.h:64
Abstract base class for MPI send/recv buffer.
Definition: mpibuf.h:33
std::string getFileName() const
Definition: CheckPointParams.cpp:41
Definition: CheckPointParams.h:28
int getPrecision() const
Definition: CheckPointParams.h:39
~CheckPointParams()
Definition: CheckPointParams.cpp:37