ESyS-Particle  2.3.4
CheckPointParams.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 
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
AMPIBuffer::pop_int
virtual int pop_int()=0
CheckPointParams::getPrecision
int getPrecision() const
Definition: CheckPointParams.h:39
AMPIBuffer
Abstract base class for MPI send/recv buffer.
Definition: mpibuf.h:34
CheckPointParams::packInto
void packInto(AMPIBuffer *mpiBuff) const
Definition: CheckPointParams.cpp:49
MpiInfo::rank
int rank() const
Definition: MpiInfo.cpp:25
CheckPointParams::~CheckPointParams
~CheckPointParams()
Definition: CheckPointParams.cpp:37
CheckPointParams::m_fileNamePrefix
std::string m_fileNamePrefix
Definition: CheckPointParams.h:53
CheckPointParams::getFileName
std::string getFileName() const
Definition: CheckPointParams.cpp:41
MpiInfo
Definition: MpiInfo.h:24
mpibuf.h
CheckPointParams::m_rank
int m_rank
Definition: CheckPointParams.h:63
MpiInfo.h
CheckPointParams::m_time
int m_time
Definition: CheckPointParams.h:58
CheckPointParams.h
CheckPointParams::CheckPointParams
CheckPointParams()
Definition: CheckPointParams.cpp:21
CheckPointParams::unpackFrom
static CheckPointParams unpackFrom(AMPIBuffer *mpiBuff, MPI_Comm mpiComm=MPI_COMM_WORLD)
Definition: CheckPointParams.cpp:56
CheckPointParams
Definition: CheckPointParams.h:29
AMPIBuffer::pop_string
virtual std::string pop_string()=0
CheckPointParams::m_prec
int m_prec
Definition: CheckPointParams.h:64
AMPIBuffer::append
virtual void append(int)=0