ESyS-Particle  2.3
ClosePackBlock.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_LSMCLOSEPACKBLOCK_H
15 #define ESYS_LSMCLOSEPACKBLOCK_H
16 
19 
20 namespace esys
21 {
22  namespace lsm
23  {
27  template <typename TmplClosePackIterator,typename TmplParticle>
29  {
30  public:
31  typedef TmplClosePackIterator CentrePointIterator;
32 
34  unsigned int numX,
35  unsigned int numY,
36  unsigned int numZ,
37  double radius = 0.5,
39  );
40 
41  virtual ~ClosePackBlockGenerator();
42 
43  double getRadius() const;
44 
45  template <typename TmplParticleCollection>
46  void createParticles(TmplParticleCollection &particleCollection);
47 
48  protected:
49 
50  private:
51  double m_radius;
54  };
55 
59  template <typename TmplClosePackIterator, typename TmplParticle>
60  class ClosePackBlock : public ParticleCollection<TmplParticle>
61  {
62  public:
64  typedef TmplClosePackIterator ClosePackIterator;
67  unsigned int numX,
68  unsigned int numY,
69  unsigned int numZ,
70  double radius = 0.5,
72  );
73 
74  virtual ~ClosePackBlock();
75 
76  double getRadius() const;
77 
78  protected:
79  void createParticles();
80 
81  private:
82  BlockGenerator m_generator;
83  };
84  }
85 }
86 
88 
89 #endif
Definition: ClosePackOrientation.h:27
ClosePackOrientation m_orientation
Definition: ClosePackBlock.h:53
double getRadius() const
Definition: ClosePackBlock.hpp:112
void createParticles()
Definition: ClosePackBlock.hpp:106
virtual ~ClosePackBlock()
Definition: ClosePackBlock.hpp:101
Definition: CheckPointable.cpp:16
ClosePackBlock(unsigned int numX, unsigned int numY, unsigned int numZ, double radius=0.5, ClosePackOrientation orientation=DEFAULT_ORIENT)
Definition: ClosePackBlock.hpp:87
Definition: ClosePackBlock.h:60
virtual ~ClosePackBlockGenerator()
Definition: ClosePackBlock.hpp:70
Definition: Vec3L.h:28
Vec3L m_dimCounts
Definition: ClosePackBlock.h:52
TmplParticle Particle
Definition: ParticleCollection.h:37
double getRadius() const
Definition: ClosePackBlock.hpp:75
double m_radius
Definition: ClosePackBlock.h:51
ParticleCollection< TmplParticle >::Particle Particle
Definition: ClosePackBlock.h:63
void createParticles(TmplParticleCollection &particleCollection)
Definition: ClosePackBlock.hpp:41
ClosePackBlockGenerator(unsigned int numX, unsigned int numY, unsigned int numZ, double radius=0.5, ClosePackOrientation orientation=DEFAULT_ORIENT)
Definition: ClosePackBlock.hpp:25
ClosePackOrientation
Definition: ClosePackOrientation.h:25
TmplClosePackIterator ClosePackIterator
Definition: ClosePackBlock.h:64
ClosePackBlockGenerator< TmplClosePackIterator, Particle > BlockGenerator
Definition: ClosePackBlock.h:65
TmplClosePackIterator CentrePointIterator
Definition: ClosePackBlock.h:31
Definition: ClosePackBlock.h:28
Definition: ParticleCollection.h:34
BlockGenerator m_generator
Definition: ClosePackBlock.h:82