ESyS-Particle  4.0.1
SphAggGougeBlock.h
00001 
00002 //                                                         //
00003 // Copyright (c) 2003-2011 by The University of Queensland //
00004 // Earth Systems Science Computational Centre (ESSCC)      //
00005 // http://www.uq.edu.au/esscc                              //
00006 //                                                         //
00007 // Primary Business: Brisbane, Queensland, Australia       //
00008 // Licensed under the Open Software License version 3.0    //
00009 // http://www.opensource.org/licenses/osl-3.0.php          //
00010 //                                                         //
00012 
00013 #ifndef __ESYS_LSM_SPHAGGGOUGEBLOCK3D_H
00014 #define __ESYS_LSM_SPHAGGGOUGEBLOCK3D_H
00015 
00016 // --- project includes --
00017 #include "Foundation/vec3.h"
00018 #include "Geometry/GougeBlock3D.h"
00019 #include "Geometry/SimpleParticle.h"
00020 #include "Geometry/SphereBlockGenerator.h"
00021 
00022 // --- STL includes ---
00023 #include <vector>
00024 using std::vector;
00025 
00026 namespace esys {
00027   namespace lsm {
00028 
00033     class SphAggGougeBlock : public GougeBlock3D
00034     {
00035     public:
00036       typedef boost::shared_ptr<SphereBlockGenerator> SBG_ptr;
00037 
00038     protected:
00039       double m_min_rad_grain;
00040       double m_max_rad_grain;
00041       vector<SimpleParticle> m_macro_grains;
00042       NTablePtr m_nTablePtr2;
00043       ParticlePoolPtr m_particlePoolPtr2;
00044       GeneratorPtr m_grainGen;
00045       vector<SBG_ptr> m_grainParticleGen;
00046       int m_min_grain_tag;
00047 
00048       void generateMacroGrains();
00049       void fillMacroGrains();
00050       void setupNT2();
00051       void createInteractionSet();
00052       virtual void createGougeBlockGenerators();
00053       
00054     public:
00055       SphAggGougeBlock(const GougeBlockPrms&,double,double,int);
00056       virtual void generate();
00057 
00058       template <typename TmplVisitor> void visitParticles(TmplVisitor&);
00059       template <typename TmplVisitor> void visitParticles(TmplVisitor&) const;
00060     };
00061 
00070     class SphAggInteractionValidator
00071       {    
00072       private:
00073         const SphAggGougeBlock *m_pGougeBlock;
00074         double m_tolerance;
00075         int m_grain_tag;
00076 
00077       public:
00078         SphAggInteractionValidator(const SphAggGougeBlock&, double,int);
00079         bool isValid(const SimpleParticle&, const SimpleParticle&) const;
00080       };
00081   };
00082 };
00083 
00084 #include "SphAggGougeBlock.hpp"
00085 
00086 #endif // __ESYS_LSM_SPHAGGGOUGEBLOCK3D_H