OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
CellParticleCachingPolicy.h
Go to the documentation of this file.
1 #ifndef CELL_PARTICLE_CACHING_POLICY
2 #define CELL_PARTICLE_CACHING_POLICY
3 
4 /*
5  *
6  * The Cell caching layout ensures that each node has all ghost particles
7  * for each external particle that is inside a neighboring cell.
8  *
9  */
10 
12 
13 template<class T, unsigned Dim, class Mesh>
15 public:
17  {
18  std::fill(cells, cells+Dim, 0);
19  }
20 
21  void setCacheCellRange(int d, int length)
22  {
23  cells[d] = length;
24  }
25 
26  void setAllCacheCellRanges(int length)
27  {
28  std::fill(cells, cells+Dim, length);
29  }
30 
31  template<class C>
34  )
35  {
36  for(int d = 0;d<Dim;++d)
38 
40  }
41 
42  template<class C>
46  )
47  {
48  for(int d = 0;d<Dim;++d)
50 
52  }
53 protected:
55 private:
56  int cells[Dim];
57 };
58 
59 #endif
void updateGhostParticles(IpplParticleBase< ParticleSpatialLayout< T, Dim, Mesh, C > > &PData, ParticleSpatialLayout< T, Dim, Mesh, C > &)
RegionLayout< T, Dim, Mesh > & getLayout()
void setCacheCellRange(int d, int length)
void updateCacheInformation(ParticleSpatialLayout< T, Dim, Mesh, C > &PLayout)
void updateGhostParticles(IpplParticleBase< ParticleSpatialLayout< T, Dim, Mesh, C > > &PData, ParticleSpatialLayout< T, Dim, Mesh, C > &PLayout)
void updateCacheInformation(ParticleSpatialLayout< T, Dim, Mesh, C > &PLayout)
MeshType & getMesh()
Definition: RegionLayout.h:141
const unsigned Dim