ESyS-Particle  2.3.2
SimpleNTable.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 __SIMPLENTABLE_H
14 #define __SIMPLENTABLE_H
15 
16 //-- project includes --
19 
20 //-- STL-includes --
21 #include <vector>
22 #include <set>
23 
24 using std::vector;
25 using std::set;
26 
36 {
37 protected:
38  vector<SimpleParticle> *m_data;
40  double m_dim;
42 
43  virtual int index(const Vec3&) const=0;
44  virtual vector<int> allidx(const Vec3&) const=0;
45  virtual void insertParticleCircular(SimpleParticle)=0;
46 
47 public:
48  ASimpleNTable();
49  virtual ~ASimpleNTable();
50 
51  int getNumInsertedParticles() const;
52  const vector<SimpleParticle>* getNeighbors(const Vec3&) const;
53  int getClosestParticleID(const Vec3&) const;
54  virtual void getInteractions(set<BasicInteraction,BILess>&,double)=0;
56 };
57 
68 {
69 private:
73 
74 protected:
75  virtual int index(const Vec3&) const;
76  virtual vector<int> allidx(const Vec3&) const;
78 
79 public:
80  CSimple2DNTable(const Vec3&,const Vec3&,double,bool xcirc=false,bool ycirc=false);
81  virtual void getInteractions(set<BasicInteraction,BILess>&,double);
82  void print();
83 };
84 
85 
86 #endif //__SIMPLENTABLE_H