ESyS-Particle
4.0.1
|
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 __RANDOMASSEMBLY2D_H 00014 #define __RANDOMASSEMBLY2D_H 00015 00016 //-- project includes -- 00017 #include "Geometry/ARandomAssembly.h" 00018 #include "Geometry/SimpleParticle.h" 00019 #include "Geometry/BasicInteraction.h" 00020 #include "Geometry/Sphere2d.h" 00021 #include "Geometry/Line.h" 00022 00023 //-- STL includes -- 00024 #include <vector> 00025 00026 using std::vector; 00027 00036 class ARandomAssembly2D : public ARandomAssembly 00037 { 00038 protected: 00039 vector<Line> Borders; 00040 double m_rmin,m_rmax; 00041 double m_xmin,m_xmax,m_ymin,m_ymax; 00042 bool m_circ_x; 00043 00044 00045 virtual Vec3 getAPoint()=0; 00046 00047 bool isInSpace(const Vec3&); 00048 bool findAFit(SimpleParticle&, const vector<SimpleParticle>&, const Line&); 00049 bool findAFit(SimpleParticle&, const vector<SimpleParticle>&); 00050 virtual bool checkAFit(const SimpleParticle&); 00051 virtual Line *getClosestPlane(const SimpleParticle&); 00052 void fillSpace(int); 00053 virtual int getNParts() const=0; 00054 00055 public: 00056 virtual void generate(int,unsigned int)=0; 00057 virtual void insertParticle(const SimpleParticle)=0; 00058 virtual void tagParticleClosestTo(const Vec3&,int)=0; 00059 virtual void tagEdgeY(int,int,double)=0; 00060 }; 00061 00062 #endif // __RANDOMASSEMBLY2D_H