ESyS-Particle  2.3.2
SimpleParticleData.h
Go to the documentation of this file.
1 
2 // //
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 #ifndef ESYS_LSMSIMPLEPARTICLEDATA_H
14 #define ESYS_LSMSIMPLEPARTICLEDATA_H
15 
16 #include "Foundation/vec3.h"
17 
18 #include <iostream>
19 
20 namespace esys
21 {
22  namespace lsm
23  {
28  {
29  public:
30  typedef int Id;
31  typedef int Tag;
32 
33  inline SimpleParticleData();
34 
35  inline SimpleParticleData(Id id, Tag tag, const Vec3 &position, double radius);
36 
37  inline SimpleParticleData(const Vec3 &position, double radius, Id id, Tag tag);
38 
39  inline SimpleParticleData(const SimpleParticleData &p);
40 
42 
43  inline bool operator==(const SimpleParticleData &particleData) const;
44 
45  inline Id getId() const;
46 
47  inline void setId(const Id &id);
48 
49  inline Id getID() const;
50 
51  inline void setID(const Id &id);
52 
53  inline const Vec3 &getPosition() const;
54 
55  inline void setPosition(const Vec3 &pos);
56 
57  inline Tag getTag() const;
58 
59  inline void setTag(const Tag &tag);
60 
61  inline double getRadius() const;
62 
63  inline void setRadius(const double &r);
64 
65  inline void setMass(double mass);
66 
67  inline double getMass() const;
68 
69  inline double get2dMass() const;
70 
71  inline double get3dMass() const;
72 
73  inline void read(std::istream &istream);
74 
75  inline void write(std::ostream &write) const;
76 
77  private:
81  double m_radius;
82  double m_mass;
83  };
84  inline std::istream &operator>>(std::istream &iStream, SimpleParticleData &particleData);
85  inline std::ostream &operator<<(std::ostream &oStream, const SimpleParticleData &particleData);
86 
87  }
88 }
89 
91 
92 #endif