ESyS-Particle  2.3
Grain.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 #ifndef ESYS_LSMGRAIN_H
14 #define ESYS_LSMGRAIN_H
15 
17 
18 namespace esys
19 {
20  namespace lsm
21  {
25  template <typename TmplParticleCollection>
26  class Grain : public TmplParticleCollection
27  {
28  public:
29  typedef TmplParticleCollection Inherited;
30  typedef Inherited ParticleCollection;
31  typedef typename Inherited::Particle Particle;
34  typedef typename Inherited::ParticleIterator ParticleIterator;
35  typedef typename Inherited::ParticleConstIterator ParticleConstIterator;
36  typedef long Id;
37 
38  Grain();
39 
40  Grain(Id id);
41 
42  Grain(ParticlePoolPtr particlePoolPtr);
43 
44  Grain(Id id, ParticlePoolPtr particlePoolPtr);
45 
46  Grain(const Grain &g);
47 
48  Grain &operator=(const Grain &g);
49 
50  Id getId() const;
51 
52  void setId(Id id);
53 
54  void setParticleIds(typename Particle::Id minId);
55 
56  private:
57  Id m_id;
58  };
59  }
60 }
61 
62 #include "Geometry/Grain.hpp"
63 
64 #endif
void setParticleIds(typename Particle::Id minId)
Definition: Grain.hpp:79
Grain & operator=(const Grain &g)
Definition: Grain.hpp:58
void setId(Id id)
Definition: Grain.hpp:73
boost::shared_ptr< ParticlePool > ParticlePoolPtr
Definition: ParticleCollection.h:39
Id m_id
Definition: Grain.h:57
Inherited ParticleCollection
Definition: Grain.h:30
Id getId() const
Definition: Grain.hpp:67
Inherited::ParticleConstIterator ParticleConstIterator
Definition: Grain.h:35
Definition: Grain.h:26
int Id
Definition: SimpleParticleData.h:30
Definition: SimpleSpherePy.h:24
Definition: CheckPointable.cpp:16
TmplParticleCollection Inherited
Definition: Grain.h:29
long Id
Definition: Grain.h:36
Inherited::ParticlePool ParticlePool
Definition: Grain.h:32
Inherited::ParticleIterator ParticleIterator
Definition: Grain.h:34
Grain()
Definition: Grain.hpp:27
boost::object_pool< Particle > ParticlePool
Definition: ParticleCollection.h:38
Inherited::Particle Particle
Definition: Grain.h:31
Inherited::ParticlePoolPtr ParticlePoolPtr
Definition: Grain.h:33