File: SphAggGougeBlock.h

package info (click to toggle)
esys-particle 2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 7,284 kB
  • sloc: cpp: 77,304; python: 5,647; makefile: 1,176; sh: 10
file content (86 lines) | stat: -rw-r--r-- 2,602 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/////////////////////////////////////////////////////////////
//                                                         //
// Copyright (c) 2003-2011 by The University of Queensland //
// Earth Systems Science Computational Centre (ESSCC)      //
// http://www.uq.edu.au/esscc                              //
//                                                         //
// Primary Business: Brisbane, Queensland, Australia       //
// Licensed under the Open Software License version 3.0    //
// http://www.opensource.org/licenses/osl-3.0.php          //
//                                                         //
/////////////////////////////////////////////////////////////

#ifndef __ESYS_LSM_SPHAGGGOUGEBLOCK3D_H
#define __ESYS_LSM_SPHAGGGOUGEBLOCK3D_H

// --- project includes --
#include "Foundation/vec3.h"
#include "Geometry/GougeBlock3D.h"
#include "Geometry/SimpleParticle.h"
#include "Geometry/SphereBlockGenerator.h"

// --- STL includes ---
#include <vector>
using std::vector;

namespace esys {
  namespace lsm {

    /*!
      \class SphAggGougeBlock 
      \brief Block of gouge consisting of spherical aggregate grains  
    */
    class SphAggGougeBlock : public GougeBlock3D
    {
    public:
      typedef boost::shared_ptr<SphereBlockGenerator> SBG_ptr;

    protected:
      double m_min_rad_grain;
      double m_max_rad_grain;
      vector<SimpleParticle> m_macro_grains;
      NTablePtr m_nTablePtr2;
      ParticlePoolPtr m_particlePoolPtr2;
      GeneratorPtr m_grainGen;
      vector<SBG_ptr> m_grainParticleGen;
      int m_min_grain_tag;

      void generateMacroGrains();
      void fillMacroGrains();
      void setupNT2();
      void createInteractionSet();
      virtual void createGougeBlockGenerators();
      
    public:
      SphAggGougeBlock(const GougeBlockPrms&,double,double,int);
      virtual void generate();

      template <typename TmplVisitor> void visitParticles(TmplVisitor&);
      template <typename TmplVisitor> void visitParticles(TmplVisitor&) const;
    };

    /*!
      \class SphAggInteractionValidator
      \brief Used to check the validity of an interaction in a SphAggGougeBlock

      \author Steffen Abe
       $Revision$
       $Date$
    */ 
    class SphAggInteractionValidator
      {    
      private:
	const SphAggGougeBlock *m_pGougeBlock;
	double m_tolerance;
	int m_grain_tag;

      public:
	SphAggInteractionValidator(const SphAggGougeBlock&, double,int);
	bool isValid(const SimpleParticle&, const SimpleParticle&) const;
      };
  };
};

#include "SphAggGougeBlock.hpp"

#endif // __ESYS_LSM_SPHAGGGOUGEBLOCK3D_H