ESyS-Particle  2.3.4
SimpleNTable.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2017 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.apache.org/licenses/LICENSE-2.0 //
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;
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
CSimple2DNTable::m_xshift
Vec3 m_xshift
Definition: SimpleNTable.h:70
BasicInteraction.h
CSimple2DNTable::m_ysize
int m_ysize
Definition: SimpleNTable.h:71
ASimpleNTable::getNumInsertedParticles
int getNumInsertedParticles() const
Definition: SimpleNTable.cpp:59
CSimple2DNTable::CSimple2DNTable
CSimple2DNTable(const Vec3 &, const Vec3 &, double, bool xcirc=false, bool ycirc=false)
Definition: SimpleNTable.cpp:99
CSimple2DNTable::m_yshift
Vec3 m_yshift
Definition: SimpleNTable.h:70
SimpleNTable.h
CSimple2DNTable::index
virtual int index(const Vec3 &) const
Definition: SimpleNTable.cpp:153
ASimpleNTable::ASimpleNTable
ASimpleNTable()
Definition: SimpleNTable.cpp:18
ASimpleNTable::insertParticle
void insertParticle(SimpleParticle)
Definition: SimpleNTable.cpp:46
ASimpleNTable::index
virtual int index(const Vec3 &) const =0
ASimpleNTable::m_p0
Vec3 m_p0
Definition: SimpleNTable.h:39
SimpleParticle::getPos
const Vec3 & getPos() const
Definition: SimpleParticle.hpp:30
ASimpleNTable::~ASimpleNTable
virtual ~ASimpleNTable()
Definition: SimpleNTable.cpp:26
SimpleParticle
Definition: SimpleParticle.h:25
CSimple2DNTable::m_ycirc
bool m_ycirc
Definition: SimpleNTable.h:72
Vec3::X
VEC3_INLINE double & X()
Definition: vec3.h:119
CSimple2DNTable::m_xcirc
bool m_xcirc
Definition: SimpleNTable.h:72
SimpleParticle.h
BasicInteraction
Class to represent the common part of a pair interaction, i.e. the IDs of the particles and the inter...
Definition: BasicInteraction.h:28
ASimpleNTable::allidx
virtual vector< int > allidx(const Vec3 &) const =0
CSimple2DNTable::allidx
virtual vector< int > allidx(const Vec3 &) const
Definition: SimpleNTable.cpp:168
NULL
#define NULL
Definition: t_list.h:17
ASimpleNTable::m_dim
double m_dim
Definition: SimpleNTable.h:40
ASimpleNTable::getInteractions
virtual void getInteractions(set< BasicInteraction, BILess > &, double)=0
ASimpleNTable::m_numInsertedParticles
int m_numInsertedParticles
Definition: SimpleNTable.h:41
ASimpleNTable::insertParticleCircular
virtual void insertParticleCircular(SimpleParticle)=0
ASimpleNTable::getNeighbors
const vector< SimpleParticle > * getNeighbors(const Vec3 &) const
Definition: SimpleNTable.cpp:36
Vec3::Y
VEC3_INLINE double & Y()
Definition: vec3.h:120
CSimple2DNTable::m_xsize
int m_xsize
Definition: SimpleNTable.h:71
Vec3
Definition: vec3.h:47
esys::lsm::bpu::iter
boost::python::object iter(const boost::python::object &pyOb)
Definition: Util.h:25
SimpleParticle::moveTo
void moveTo(const Vec3 &v)
Definition: SimpleParticle.hpp:40
ASimpleNTable::m_data
vector< SimpleParticle > * m_data
Definition: SimpleNTable.h:38
CSimple2DNTable::getInteractions
virtual void getInteractions(set< BasicInteraction, BILess > &, double)
Definition: SimpleNTable.cpp:210
CSimple2DNTable::print
void print()
Definition: SimpleNTable.cpp:235
CSimple2DNTable::insertParticleCircular
virtual void insertParticleCircular(SimpleParticle)
Definition: SimpleNTable.cpp:128
ASimpleNTable
Abstract base class providing the interface for a simple, serial neighbor table. Used in random initi...
Definition: SimpleNTable.h:36
CSimple2DNTable
2D implementation of simple, serial neighbor table
Definition: SimpleNTable.h:68
ASimpleNTable::getClosestParticleID
int getClosestParticleID(const Vec3 &) const
Definition: SimpleNTable.cpp:71