ESyS-Particle  2.3.2
ARandomAssembly.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 __ARANDOMASSEMBLY2D_H
14 #define __ARANDOMASSEMBLY2D_H
15 
16 //-- project includes --
19 #include "Geometry/SimpleNTable.h"
20 #include "Geometry/Sphere2d.h"
21 #include "Geometry/Line.h"
22 
23 //-- STL includes --
24 #include <vector>
25 #include <set>
26 
27 using std::set;
28 using std::vector;
29 
30 //--- IO includes ---
31 #include <iostream>
32 
42 {
43  protected:
45  static double m_small_value;
46  set<BasicInteraction,BILess> m_iset;
47  vector<SimpleParticle> m_bpart;
48 
49  double m_random(double,double);
50  vector<SimpleParticle> getNeighborList(const SimpleParticle&);
51  vector<SimpleParticle> get3ClosestNeighbors(const SimpleParticle&, const vector<SimpleParticle>&);
52  vector<SimpleParticle> getClosestNeighbors(const SimpleParticle&, int);
53  SimpleParticle getClosestParticle(const SimpleParticle&, const vector<SimpleParticle>&);
54 
55  public:
56  virtual ~ARandomAssembly()
57  {
58  }
59 
60  virtual void generate(int,unsigned int)=0;
61  virtual void insertParticle(const SimpleParticle)=0;
62  virtual void tagParticleClosestTo(const Vec3&,int)=0;
63  virtual void tagEdgeY(int,int,double)=0;
64  virtual void tagEdgeZ(int,int,double)=0;
65  virtual void tagSplit(int,int,double){std::cout <<"ARA::tagSplit" << std::endl;};
66 
67  virtual void writeToGeoFile(const string&)=0;
68  virtual void writeToVtkFile(const string&); //{std::cerr << "writeToVtkFile not implemented" << std::endl;}; // empty default implementation
69  virtual double calcPorosity()=0;
70  virtual vector<pair<double,double> > getSizeDistribution(int)=0;
71 };
72 
73 #endif // __ARANDOMASSEMBLY2D_H