ESyS-Particle  4.0.1
LatticeParam.h
1 
2 // //
3 // Copyright (c) 2003-2011 by The University of Queensland //
4 // Earth Systems Science Computational Centre (ESSCC) //
5 // http://www.uq.edu.au/esscc //
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 #ifndef ESYS_LSMLATTICEPARAM_H
14 #define ESYS_LSMLATTICEPARAM_H
15 
16 class AMPIBuffer;
17 
18 #include <vector>
19 #include <string>
20 #include <iostream>
21 
22 namespace esys
23 {
24  namespace lsm
25  {
30  {
31  public:
32  typedef std::vector<unsigned int> ProcessDims;
34  const std::string &particleType,
35  double nrange,
36  double alpha,
37  const ProcessDims &dims = ProcessDims(3, 0)
38  );
39  void setSearchRange(double nr,double a){m_nrange=nr;m_alpha=a;};
40  void setParticleType(const std::string& pt){m_particle_type=pt;}
41  void packInto(AMPIBuffer*) const;
42  double nrange()const {return m_nrange;};
43  double alpha()const {return m_alpha;};
44  const ProcessDims &processDims() const {return m_dims;}
45  const std::string &particle_type() const {return m_particle_type;};
46  friend std::ostream& operator<<(std::ostream &oStream,const CLatticeParam &prms);
47 
48  static CLatticeParam extractLatticeParam(AMPIBuffer *pBuff);
49 
50  protected:
51  std::string m_particle_type;
52  double m_alpha;
53  double m_nrange;
54  ProcessDims m_dims;
55  };
56  };
57 };
58 
59 #endif