ESyS-Particle  2.3
SimpleBlock.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 
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
virtual ~SimpleBlockGenerator()
Definition: SimpleBlock.hpp:88
Definition: SimpleBlock.h:38
Vec3L m_dimCounts
Definition: SimpleBlock.h:62
Definition: vec3.h:46
double getRadius() const
Definition: SimpleBlock.hpp:93
int getId(const Vec3L &idx)
Definition: SimpleBlock.hpp:50
ParticleCollection< TmplParticle >::Particle Particle
Definition: SimpleBlock.h:72
Definition: CheckPointable.cpp:16
Definition: SimpleBlock.h:69
Definition: Vec3L.h:28
SimpleBlockGenerator(unsigned int numX, unsigned int numY, unsigned int numZ, double radius=0.5)
Definition: SimpleBlock.hpp:27
SimpleBlockGenerator< Particle > m_generator
Definition: SimpleBlock.h:88
TmplParticle Particle
Definition: ParticleCollection.h:37
SimpleBlock(unsigned int numX, unsigned int numY, unsigned int numZ, double radius=0.5)
Definition: SimpleBlock.hpp:105
Vec3 getPos(const Vec3L &idx)
Definition: SimpleBlock.hpp:39
double m_radius
Definition: SimpleBlock.h:61
void createParticles(TmplParticleCollection &particleCollection)
Definition: SimpleBlock.hpp:63
Definition: ParticleCollection.h:34
double getRadius() const
Definition: SimpleBlock.hpp:129
virtual ~SimpleBlock()
Definition: SimpleBlock.hpp:118
void createParticles()
Definition: SimpleBlock.hpp:123