ESyS-Particle  2.3.2
Grain.hpp
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 
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 }