ESyS-Particle  2.3.2
SphereBlockGenerator.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 #ifndef __ESYS_LSM_SPHEREBLOCKGENERATOR
14 #define __ESYS_LSM_SPHEREBLOCKGENERATOR
15 
16 // --- project includes ---
19 
20 // --- STL includes ---
21 #include <set>
22 using std::set;
23 
24 namespace esys
25 {
26  namespace lsm
27  {
32  {
33  public:
34  // types
37  typedef set<int> IdSet;
38 
39  // functions
40  SphereBlockGenerator(NTable&,ParticlePool&,double,const Vec3&,double,double,double,int,int);
41  virtual ~SphereBlockGenerator();
42 
43  virtual void generate();
44  virtual void generateSeedParticles();
45  virtual void generateFillParticles();
46  virtual SimpleParticle generateParticle(const Vec3 &point);
47  virtual void insertParticle(const SimpleParticle&);
48  virtual double getRadius() const;
49  int getNextId();
50  size_t getNumParticles() const {return m_idSet.size();};
51  const BoundingBox getBBox() const;
52  virtual double getGridRadius() const;
53  virtual bool particleFits(const SimpleParticle &particle) const;
55  vector<SimpleParticle*> getClosestNeighbors(const SimpleParticle&,int);
56  bool findAFitWithSphere(SimpleParticle&, const vector<SimpleParticle*>&);
57  bool findAFit(SimpleParticle&, const vector<SimpleParticle*>&);
58  bool checkAFit(const SimpleParticle&);
59  Vec3 getAPoint();
60 
61  private:
63  double m_tol;
66  double m_radius;
67  double m_min_rad;
68  double m_max_rad;
70  int m_tag;
71  };
72  }
73 }
74 
75 #endif // __ESYS_LSM_SPHEREBLOCKGENERATOR