source: src/base/linked_cell_list.hpp@ a40eea

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

Merge recent changes of the vmg library into ScaFaCos.

Includes a fix for the communication problems on Jugene.

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

  • Property mode set to 100644
File size: 1.1 KB
RevLine 
[dfed1c]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
[ac6d04]26class LinkedCellList : public IsGrid< std::list<Particle*> >
[dfed1c]27{
28public:
[ac6d04]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;
[dfed1c]33
[ac6d04]34 LinkedCellList(std::list<Particle>& particles,
[dfed1c]35 const int& near_field_cells, const Grid& grid);
36
[ac6d04]37 ~LinkedCellList();
[dfed1c]38
[ac6d04]39 void AddParticle(Particle* particle);
40 void AddParticleToHalo(const vmg_float* x, const vmg_float& q);
[dfed1c]41
[ac6d04]42 void ClearHalo();
[dfed1c]43
44 const Index& NearFieldCells() const {return near_field_cells_;}
45private:
46 Index near_field_cells_;
47};
48
49}
50
51}
52
53#endif /* LINKED_CELL_LIST_HPP_ */
Note: See TracBrowser for help on using the repository browser.