ESyS-Particle  2.3.2
SimpleBlock.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 
14 #ifndef ESYS_LSMSIMPLEBLOCK_H
15 #define ESYS_LSMSIMPLEBLOCK_H
16 
17 #include "Foundation/BoundingBox.h"
22 #include "Geometry/Vec3L.h"
23 
24 #include <boost/shared_ptr.hpp>
25 #include <boost/pool/object_pool.hpp>
26 
27 #include <vector>
28 #include <float.h>
29 
30 namespace esys
31 {
32  namespace lsm
33  {
37  template <typename TmplParticle = SimpleParticle>
39  {
40  public:
42  unsigned int numX,
43  unsigned int numY,
44  unsigned int numZ,
45  double radius = 0.5
46  );
47 
48  virtual ~SimpleBlockGenerator();
49 
50  double getRadius() const;
51 
52  template <typename TmplParticleCollection>
53  void createParticles(TmplParticleCollection &particleCollection);
54 
55  protected:
56  Vec3 getPos(const Vec3L &idx);
57 
58  int getId(const Vec3L &idx);
59 
60  private:
61  double m_radius;
63  };
64 
68  template <typename TmplParticle = SimpleParticle>
69  class SimpleBlock : public ParticleCollection<TmplParticle>
70  {
71  public:
74  unsigned int numX,
75  unsigned int numY,
76  unsigned int numZ,
77  double radius = 0.5
78  );
79 
80  virtual ~SimpleBlock();
81 
82  double getRadius() const;
83 
84  protected:
85  void createParticles();
86 
87  private:
89  };
90  }
91 }
92 
93 #include "Geometry/SimpleBlock.hpp"
94 
95 #endif