Reference documentation for deal.II version 9.0.0
|
#include <deal.II/particles/particle_iterator.h>
Public Types | |
typedef std::bidirectional_iterator_tag | iterator_category |
Public Member Functions | |
ParticleIterator ()=default | |
ParticleIterator (const std::multimap< internal::LevelInd, Particle< dim, spacedim > > &map, const typename std::multimap< internal::LevelInd, Particle< dim, spacedim > >::iterator &particle) | |
const ParticleAccessor< dim, spacedim > & | operator* () const |
ParticleAccessor< dim, spacedim > & | operator* () |
ParticleIterator & | operator= (const ParticleIterator &) |
const ParticleAccessor< dim, spacedim > * | operator-> () const |
ParticleAccessor< dim, spacedim > * | operator-> () |
bool | operator== (const ParticleIterator< dim, spacedim > &) const |
bool | operator!= (const ParticleIterator< dim, spacedim > &) const |
ParticleIterator & | operator++ () |
ParticleIterator | operator++ (int) |
ParticleIterator & | operator-- () |
ParticleIterator | operator-- (int) |
Private Attributes | |
ParticleAccessor< dim, spacedim > | accessor |
A class that is used to iterate over particles. Together with the ParticleAccessor class this is used to hide the internal implementation of the particle class and the particle container.
Definition at line 27 of file particle_accessor.h.
typedef std::bidirectional_iterator_tag Particles::ParticleIterator< dim, spacedim >::iterator_category |
Mark the class as bidirectional iterator and declare some typedefs which are standard for iterators and are used by algorithms to enquire about the specifics of the iterators they work on.
Definition at line 121 of file particle_iterator.h.
|
default |
Empty constructor. Such an object is not usable!
Particles::ParticleIterator< dim, spacedim >::ParticleIterator | ( | const std::multimap< internal::LevelInd, Particle< dim, spacedim > > & | map, |
const typename std::multimap< internal::LevelInd, Particle< dim, spacedim > >::iterator & | particle | ||
) |
Constructor of the iterator. Takes a reference to the particle container, and an iterator to the cell-particle pair.
Definition at line 23 of file particle_iterator.cc.
const ParticleAccessor< dim, spacedim > & Particles::ParticleIterator< dim, spacedim >::operator* | ( | ) | const |
Dereferencing operator, returns a reference to an accessor. Usage is thus like (*i).get_id ();
Definition at line 51 of file particle_iterator.cc.
ParticleAccessor< dim, spacedim > & Particles::ParticleIterator< dim, spacedim >::operator* | ( | ) |
Dereferencing operator, non-const
version.
Definition at line 33 of file particle_iterator.cc.
ParticleIterator< dim, spacedim > & Particles::ParticleIterator< dim, spacedim >::operator= | ( | const ParticleIterator< dim, spacedim > & | other | ) |
Assignment operator.
Definition at line 68 of file particle_iterator.cc.
const ParticleAccessor< dim, spacedim > * Particles::ParticleIterator< dim, spacedim >::operator-> | ( | ) | const |
Dereferencing operator, returns a pointer of the particle pointed to. Usage is thus like i->get_id ();
There is a const
and a non-const
version.
Definition at line 60 of file particle_iterator.cc.
ParticleAccessor< dim, spacedim > * Particles::ParticleIterator< dim, spacedim >::operator-> | ( | ) |
Dereferencing operator, non-const
version.
Definition at line 42 of file particle_iterator.cc.
bool Particles::ParticleIterator< dim, spacedim >::operator== | ( | const ParticleIterator< dim, spacedim > & | other | ) | const |
Compare for equality.
Definition at line 87 of file particle_iterator.cc.
bool Particles::ParticleIterator< dim, spacedim >::operator!= | ( | const ParticleIterator< dim, spacedim > & | other | ) | const |
Compare for inequality.
Definition at line 78 of file particle_iterator.cc.
ParticleIterator< dim, spacedim > & Particles::ParticleIterator< dim, spacedim >::operator++ | ( | ) |
Prefix ++
operator: ++iterator
. This operator advances the iterator to the next element and returns a reference to *this
.
Definition at line 96 of file particle_iterator.cc.
ParticleIterator< dim, spacedim > Particles::ParticleIterator< dim, spacedim >::operator++ | ( | int | ) |
Postfix ++
operator: iterator++
. This operator advances the iterator to the next element, but returns an iterator to the element previously pointed to.
Definition at line 106 of file particle_iterator.cc.
ParticleIterator< dim, spacedim > & Particles::ParticleIterator< dim, spacedim >::operator-- | ( | ) |
Prefix –
operator: –iterator
. This operator moves the iterator to the previous element and returns a reference to *this
.
Definition at line 118 of file particle_iterator.cc.
ParticleIterator< dim, spacedim > Particles::ParticleIterator< dim, spacedim >::operator-- | ( | int | ) |
Postfix –
operator: iterator–
. This operator moves the iterator to the previous element, but returns an iterator to the element previously pointed to.
Definition at line 128 of file particle_iterator.cc.
|
private |
The accessor to the actual particle.
Definition at line 131 of file particle_iterator.h.