ESyS-Particle  2.3.4
CubicBoxPacker.h
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 #ifndef ESYS_LSMCUBICBOXPACKER_H
15 #define ESYS_LSMCUBICBOXPACKER_H
16 
17 #include <Geometry/BoxPacker.h>
18 
19 namespace esys
20 {
21  namespace lsm
22  {
23  typedef std::vector<bool> BoolVector;
27  template <typename TmplParticleGenerator, typename TmplBoxPackerBase>
28  class CubicBoxPacker : public TmplBoxPackerBase
29  {
30  public:
31  typedef TmplParticleGenerator ParticleGenerator;
32  typedef boost::shared_ptr<ParticleGenerator> ParticleGeneratorPtr;
33  typedef TmplBoxPackerBase Inherited;
35  typedef typename Inherited::Particle Particle;
36  typedef typename Inherited::NTable NTable;
37  typedef typename Inherited::NTablePtr NTablePtr;
38  typedef typename Inherited::ParticlePool ParticlePool;
39  typedef typename Inherited::ParticlePoolPtr ParticlePoolPtr;
40 
42  ParticleGeneratorPtr particleGeneratorPtr,
43  ParticlePoolPtr particlePoolPtr,
44  NTablePtr nTablePtr,
45  const BoundingBox &bBox,
46  const BoolVector &periodicDimensions,
47  double tolerance,
48  double cubicPackRadius
49  );
50 
51  virtual ~CubicBoxPacker();
52 
53  Particle getCandidateParticle(const Vec3 &point);
54 
55  Particle getCandidateParticle(const Vec3 &point, double radius);
56 
57  double getCubicPackingRadius() const;
58 
60 
62 
63  void setParticleGenerator(ParticleGenerator &particleGenerator);
64 
65  void setParticleGenerator(ParticleGeneratorPtr particleGenerator);
66 
67  void generateCubicPacking();
68 
69  virtual void generate();
70 
71  private:
75  };
76  }
77 }
78 
80 
81 #endif
esys::lsm::CubicBoxPacker::NTable
Inherited::NTable NTable
Definition: CubicBoxPacker.h:36
CubicBoxPacker.h
esys::lsm::CubicBoxPacker::ParticlePoolPtr
Inherited::ParticlePoolPtr ParticlePoolPtr
Definition: CubicBoxPacker.h:39
esys::lsm::CubicBoxPacker::generate
virtual void generate()
Definition: CubicBoxPacker.hpp:121
esys::lsm::CubicBoxPacker::Inherited
TmplBoxPackerBase Inherited
Definition: CubicBoxPacker.h:33
BoxPacker.h
esys::lsm::CubicBoxPacker::ParticlePool
Inherited::ParticlePool ParticlePool
Definition: CubicBoxPacker.h:38
esys::lsm::CubicBoxPacker::generateCubicPacking
void generateCubicPacking()
Definition: CubicBoxPacker.hpp:107
esys::lsm::BoundingBox
3D bounding box
Definition: BoundingBox.h:28
esys
Definition: CheckPointable.cpp:17
esys::lsm::CubicBoxPacker::BoxPackerBase
Inherited BoxPackerBase
Definition: CubicBoxPacker.h:34
esys::lsm::CubicBoxPacker::ParticleGenerator
TmplParticleGenerator ParticleGenerator
Definition: CubicBoxPacker.h:31
esys::lsm::CubicBoxPacker::m_particleGeneratorPtr
ParticleGeneratorPtr m_particleGeneratorPtr
Definition: CubicBoxPacker.h:73
CubicBoxPacker.hpp
esys::lsm::CubicBoxPacker::getCandidateParticle
Particle getCandidateParticle(const Vec3 &point)
Definition: CubicBoxPacker.hpp:98
esys::lsm::CubicBoxPacker::setParticleGenerator
void setParticleGenerator(ParticleGenerator &particleGenerator)
Definition: CubicBoxPacker.hpp:61
esys::lsm::CubicBoxPacker::getCubicPackingRadius
double getCubicPackingRadius() const
Definition: CubicBoxPacker.hpp:81
esys::lsm::CubicBoxPacker::~CubicBoxPacker
virtual ~CubicBoxPacker()
Definition: CubicBoxPacker.hpp:41
esys::lsm::CubicBoxPacker::getParticleGenerator
const ParticleGenerator & getParticleGenerator() const
Definition: CubicBoxPacker.hpp:47
esys::lsm::BoolVector
std::vector< bool > BoolVector
Definition: BlockGenerator.h:28
esys::lsm::CubicBoxPacker::ParticleGeneratorPtr
boost::shared_ptr< ParticleGenerator > ParticleGeneratorPtr
Definition: CubicBoxPacker.h:32
esys::lsm::CubicBoxPacker::m_cubicPackRadius
double m_cubicPackRadius
Definition: CubicBoxPacker.h:72
Vec3
Definition: vec3.h:47
esys::lsm::CubicBoxPacker
Definition: CubicBoxPacker.h:29
esys::lsm::CubicBoxPacker::CubicBoxPacker
CubicBoxPacker(ParticleGeneratorPtr particleGeneratorPtr, ParticlePoolPtr particlePoolPtr, NTablePtr nTablePtr, const BoundingBox &bBox, const BoolVector &periodicDimensions, double tolerance, double cubicPackRadius)
Definition: CubicBoxPacker.hpp:19
esys::lsm::CubicBoxPacker::NTablePtr
Inherited::NTablePtr NTablePtr
Definition: CubicBoxPacker.h:37
esys::lsm::CubicBoxPacker::Particle
Inherited::Particle Particle
Definition: CubicBoxPacker.h:35
esys::lsm::CubicBoxPacker::m_pParticleGenerator
ParticleGenerator * m_pParticleGenerator
Definition: CubicBoxPacker.h:74