ESyS-Particle  4.0.1
SphAggGougeBlock.h
1 
2 // //
3 // Copyright (c) 2003-2011 by The University of Queensland //
4 // Earth Systems Science Computational Centre (ESSCC) //
5 // http://www.uq.edu.au/esscc //
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_SPHAGGGOUGEBLOCK3D_H
14 #define __ESYS_LSM_SPHAGGGOUGEBLOCK3D_H
15 
16 // --- project includes --
17 #include "Foundation/vec3.h"
18 #include "Geometry/GougeBlock3D.h"
19 #include "Geometry/SimpleParticle.h"
20 #include "Geometry/SphereBlockGenerator.h"
21 
22 // --- STL includes ---
23 #include <vector>
24 using std::vector;
25 
26 namespace esys {
27  namespace lsm {
28 
34  {
35  public:
36  typedef boost::shared_ptr<SphereBlockGenerator> SBG_ptr;
37 
38  protected:
39  double m_min_rad_grain;
40  double m_max_rad_grain;
41  vector<SimpleParticle> m_macro_grains;
42  NTablePtr m_nTablePtr2;
43  ParticlePoolPtr m_particlePoolPtr2;
44  GeneratorPtr m_grainGen;
45  vector<SBG_ptr> m_grainParticleGen;
46  int m_min_grain_tag;
47 
48  void generateMacroGrains();
49  void fillMacroGrains();
50  void setupNT2();
51  void createInteractionSet();
52  virtual void createGougeBlockGenerators();
53 
54  public:
55  SphAggGougeBlock(const GougeBlockPrms&,double,double,int);
56  virtual void generate();
57 
58  template <typename TmplVisitor> void visitParticles(TmplVisitor&);
59  template <typename TmplVisitor> void visitParticles(TmplVisitor&) const;
60  };
61 
71  {
72  private:
73  const SphAggGougeBlock *m_pGougeBlock;
74  double m_tolerance;
75  int m_grain_tag;
76 
77  public:
78  SphAggInteractionValidator(const SphAggGougeBlock&, double,int);
79  bool isValid(const SimpleParticle&, const SimpleParticle&) const;
80  };
81  };
82 };
83 
84 #include "SphAggGougeBlock.hpp"
85 
86 #endif // __ESYS_LSM_SPHAGGGOUGEBLOCK3D_H