source: src/base/linked_cell_list.hpp@ e7e9a6

Last change on this file since e7e9a6 was dfed1c, checked in by Julian Iseringhausen <isering@…>, 14 years ago

Major vmg update.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1136 5161e1c8-67bf-11de-9fd5-51895aff932f

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/**
2 * @file linked_cell_list.hpp
3 * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
4 * @date Mon Nov 21 13:27:22 2011
5 *
6 * @brief A linked cell list implementation.
7 *
8 */
9
10#ifndef LINKED_CELL_LIST_HPP_
11#define LINKED_CELL_LIST_HPP_
12
13#include <list>
14#include <vector>
15
16#include "base/index.hpp"
17#include "base/particle.hpp"
18#include "grid/is_grid.hpp"
19
20namespace VMG
21{
22
23namespace Particle
24{
25
26class LinkedCellList : public IsGrid< std::list<Particle> >
27{
28public:
29 typedef std::list<Particle>::iterator iterator;
30 typedef std::list<Particle>::const_iterator const_iterator;
31 typedef std::list<Particle>::reverse_iterator reverse_iterator;
32 typedef std::list<Particle>::const_reverse_iterator const_reverse_iterator;
33
34 LinkedCellList(const std::list<Particle>& particles,
35 const int& near_field_cells, const Grid& grid);
36
37 void AddParticle(const Particle& particle);
38
39 void AddParticleToComplete(const vmg_float* pos, const vmg_float& charge,
40 const vmg_float& pot, const vmg_float* force,
41 const int& rank, const int& index);
42
43 void AddParticleToComplete(const Vector& pos, const vmg_float& charge,
44 const vmg_float& pot, const Vector& force,
45 const int& rank, const int& index);
46
47 void AddParticleToComplete(const vmg_float* pos, const vmg_float& charge);
48
49 std::list<Particle>& NotMyParticles() {return not_my_particles;}
50 const std::list<Particle>& NotMyParticles() const {return not_my_particles;}
51
52 const Index& NearFieldCells() const {return near_field_cells_;}
53
54private:
55 std::list<Particle> not_my_particles;
56 Index near_field_cells_;
57};
58
59}
60
61}
62
63#endif /* LINKED_CELL_LIST_HPP_ */
Note: See TracBrowser for help on using the repository browser.