ESyS-Particle  2.3
RandomAssembly2D.h
Go to the documentation of this file.
1 // //
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 __RANDOMASSEMBLY2D_H
14 #define __RANDOMASSEMBLY2D_H
15 
16 //-- project includes --
20 #include "Geometry/Sphere2d.h"
21 #include "Geometry/Line.h"
22 
23 //-- STL includes --
24 #include <vector>
25 
26 using std::vector;
27 
37 {
38  protected:
39  vector<Line> Borders;
40  double m_rmin,m_rmax;
42  bool m_circ_x;
43 
44 
45  virtual Vec3 getAPoint()=0;
46 
47  bool isInSpace(const Vec3&);
48  bool findAFit(SimpleParticle&, const vector<SimpleParticle>&, const Line&);
49  bool findAFit(SimpleParticle&, const vector<SimpleParticle>&);
50  virtual bool checkAFit(const SimpleParticle&);
51  virtual Line *getClosestPlane(const SimpleParticle&);
52  void fillSpace(int);
53  virtual int getNParts() const=0;
54 
55  public:
56  virtual void generate(int,unsigned int)=0;
57  virtual void insertParticle(const SimpleParticle)=0;
58  virtual void tagParticleClosestTo(const Vec3&,int)=0;
59  virtual void tagEdgeY(int,int,double)=0;
60 };
61 
62 #endif // __RANDOMASSEMBLY2D_H
double m_xmax
Definition: RandomAssembly2D.h:41
virtual Line * getClosestPlane(const SimpleParticle &)
Definition: RandomAssembly2D.cpp:40
double m_rmax
min/max particle radius
Definition: RandomAssembly2D.h:40
bool m_circ_x
Definition: RandomAssembly2D.h:42
Definition: vec3.h:46
double m_rmin
Definition: RandomAssembly2D.h:40
Class representing a line.
Definition: Line.h:25
virtual int getNParts() const =0
virtual Vec3 getAPoint()=0
Abstract base class for random assemblies, to be used for initialization of random lattices...
Definition: ARandomAssembly.h:41
virtual void insertParticle(const SimpleParticle)=0
bool isInSpace(const Vec3 &)
double m_ymin
Definition: RandomAssembly2D.h:41
void fillSpace(int)
Definition: RandomAssembly2D.cpp:169
bool findAFit(SimpleParticle &, const vector< SimpleParticle > &, const Line &)
Definition: RandomAssembly2D.cpp:71
virtual bool checkAFit(const SimpleParticle &)
Definition: RandomAssembly2D.cpp:124
double m_ymax
x,y borders of the lattice
Definition: RandomAssembly2D.h:41
virtual void generate(int, unsigned int)=0
virtual void tagParticleClosestTo(const Vec3 &, int)=0
Abstract base class for random assemblies, to be used for initialization of random lattices...
Definition: RandomAssembly2D.h:36
Definition: SimpleParticle.h:24
virtual void tagEdgeY(int, int, double)=0
vector< Line > Borders
Definition: RandomAssembly2D.h:39
double m_xmin
Definition: RandomAssembly2D.h:41