| 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 |
|
|---|
| 20 | namespace VMG
|
|---|
| 21 | {
|
|---|
| 22 |
|
|---|
| 23 | namespace Particle
|
|---|
| 24 | {
|
|---|
| 25 |
|
|---|
| 26 | class LinkedCellList : public IsGrid< std::list<Particle*> >
|
|---|
| 27 | {
|
|---|
| 28 | public:
|
|---|
| 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(std::list<Particle>& particles,
|
|---|
| 35 | const int& near_field_cells, const Grid& grid);
|
|---|
| 36 |
|
|---|
| 37 | ~LinkedCellList();
|
|---|
| 38 |
|
|---|
| 39 | void AddParticle(Particle* particle);
|
|---|
| 40 | void AddParticleToHalo(const vmg_float* x, const vmg_float& q);
|
|---|
| 41 |
|
|---|
| 42 | void ClearHalo();
|
|---|
| 43 |
|
|---|
| 44 | const Index& NearFieldCells() const {return near_field_cells_;}
|
|---|
| 45 | private:
|
|---|
| 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.