Reference documentation for deal.II version 9.5.0
|
#include <deal.II/particles/particle_accessor.h>
Public Member Functions | |
ParticlesInCell ()=default | |
ParticlesInCell (const std::vector< typename PropertyPool< dim, spacedim >::Handle > &particles, const typename Triangulation< dim, spacedim >::active_cell_iterator &cell) | |
Public Attributes | |
std::vector< typename PropertyPool< dim, spacedim >::Handle > | particles |
Triangulation< dim, spacedim >::active_cell_iterator | cell |
Data structure to describe the particles in a given cell. This is used inside an std::list in particle_container
. The storage of this field is typically handled by ParticleHandler, using an std::list of this structure.
There are four main reasons for the present design:
std::list
of particles (8 bytes per cell), or the std::list::end
in case no particles are present on a cell, there is a fast access from a ParticleAccessor -> surrounding cell (by access to ParticlesInCell::cell_iterator), as well as fast access from cell -> all particles (through the cache). It also allows for a fast iteration through all particles, by incrementing either the index of particles within a cell, or, if at the end of the cell, to the next element in the outer list. The cache is simple to keep consistent because the iterators into std::list
remain valid upon insertion or deletion of entries in the list, as specified by std::list
's API. cell_iterator
past the end of valid cells, which is used as a criterion to terminate the loops of ParticleAccessor, again minimizing the computational cost of handling the loop over particles. Definition at line 81 of file particle_accessor.h.
|
default |
Default constructor.
|
inline |
Construct from a vector of particles and a cell iterator.
Definition at line 91 of file particle_accessor.h.
std::vector<typename PropertyPool<dim, spacedim>::Handle> Particles::ParticleAccessor< dim, spacedim >::ParticlesInCell::particles |
A vector of particles on a cell.
Definition at line 102 of file particle_accessor.h.
Triangulation<dim,spacedim>::active_cell_iterator Particles::ParticleAccessor< dim, spacedim >::ParticlesInCell::cell |
The underlying cell.
Definition at line 107 of file particle_accessor.h.