ESyS-Particle  2.3.4
Grain.hpp
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 #include "Geometry/Grain.h"
15 #include <stdexcept>
16 #include <fstream>
17 #include <sstream>
18 #include <iomanip>
19 
20 #include <boost/limits.hpp>
21 
22 namespace esys
23 {
24  namespace lsm
25  {
26  template <typename TmplParticleCollection>
28  {
29  }
30 
31  template <typename TmplParticleCollection>
33  : Inherited(particlePoolPtr),
34  m_id(-1)
35  {
36  }
37 
38  template <typename TmplParticleCollection>
40  {
41  }
42 
43  template <typename TmplParticleCollection>
45  : Inherited(particlePoolPtr),
46  m_id(id)
47  {
48  }
49 
50  template <typename TmplParticleCollection>
52  : Inherited(g), m_id(g.getId())
53  {
54  }
55 
56  template <typename TmplParticleCollection>
59  {
60  Inherited::operator=(g);
61  setId(g.getId());
62  return *this;
63  }
64 
65  template <typename TmplParticleCollection>
68  {
69  return m_id;
70  }
71 
72  template <typename TmplParticleCollection>
74  {
75  m_id = id;
76  }
77 
78  template <typename TmplParticleCollection>
80  typename Particle::Id minId
81  )
82  {
83  ParticleIterator it = this->getParticleIterator();
84  while (it.hasNext())
85  {
86  it.next().setId(minId++);
87  }
88  }
89  }
90 }
esys::lsm::Grain::operator=
Grain & operator=(const Grain &g)
Definition: Grain.hpp:58
esys::lsm::Grain::getId
Id getId() const
Definition: Grain.hpp:67
esys::lsm::ParticleCollectionPy::ParticlePoolPtr
Inherited::ParticlePoolPtr ParticlePoolPtr
Definition: ParticleCollectionPy.h:32
Grain.h
esys::lsm::Grain::Inherited
TmplParticleCollection Inherited
Definition: Grain.h:29
esys::lsm::Grain::setId
void setId(Id id)
Definition: Grain.hpp:73
esys
Definition: CheckPointable.cpp:17
esys::lsm::Grain::Id
long Id
Definition: Grain.h:36
esys::lsm::Grain::setParticleIds
void setParticleIds(typename Particle::Id minId)
Definition: Grain.hpp:79
esys::lsm::Grain
Definition: Grain.h:27
esys::lsm::Grain::Grain
Grain()
Definition: Grain.hpp:27
esys::lsm::ParticleCollection< SimpleSpherePy >
esys::lsm::Grain::ParticlePoolPtr
Inherited::ParticlePoolPtr ParticlePoolPtr
Definition: Grain.h:33
esys::lsm::Grain::ParticleIterator
Inherited::ParticleIterator ParticleIterator
Definition: Grain.h:34