![]() |
deal.II version GIT relicensing-6759-gba22b5843e 2026-09-18 10:10:01+00:00
|
#include <deal.II/particles/particle_iterator.h>
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 36 of file particle_iterator.h.
Public Types | |
| using | particle_container = typename ParticleAccessor< dim, spacedim >::particle_container |
| using | iterator_category = std::bidirectional_iterator_tag |
| using | value_type = ParticleAccessor< dim, spacedim > |
| using | difference_type = std::ptrdiff_t |
| using | pointer = ParticleAccessor< dim, spacedim > * |
| using | reference = ParticleAccessor< dim, spacedim > & |
Public Member Functions | |
| ParticleIterator ()=default | |
| ParticleIterator (const typename particle_container::iterator particles_in_cell, const PropertyPool< dim, spacedim > &property_pool, const unsigned int particle_index_within_cell) | |
| const ParticleAccessor< dim, spacedim > & | operator* () const |
| ParticleAccessor< dim, spacedim > & | operator* () |
| 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) |
| IteratorState::IteratorStates | state () const |
Private Attributes | |
| ParticleAccessor< dim, spacedim > | accessor |
| using Particles::ParticleIterator< dim, spacedim >::particle_container = typename ParticleAccessor<dim, spacedim>::particle_container |
A type for the storage container for particles.
Definition at line 42 of file particle_iterator.h.
| using Particles::ParticleIterator< dim, spacedim >::iterator_category = std::bidirectional_iterator_tag |
Mark the class as bidirectional iterator and declare some alias which are standard for iterators and are used by algorithms to enquire about the specifics of the iterators they work on.
Definition at line 143 of file particle_iterator.h.
| using Particles::ParticleIterator< dim, spacedim >::value_type = ParticleAccessor<dim, spacedim> |
Definition at line 144 of file particle_iterator.h.
| using Particles::ParticleIterator< dim, spacedim >::difference_type = std::ptrdiff_t |
Definition at line 145 of file particle_iterator.h.
| using Particles::ParticleIterator< dim, spacedim >::pointer = ParticleAccessor<dim, spacedim> * |
Definition at line 146 of file particle_iterator.h.
| using Particles::ParticleIterator< dim, spacedim >::reference = ParticleAccessor<dim, spacedim> & |
Definition at line 147 of file particle_iterator.h.
|
default |
Empty constructor. Such an object is not usable!
|
inline |
Constructor of the iterator. Takes a reference to the particle container, an iterator to the cell, and the particle index within that cell.
Definition at line 161 of file particle_iterator.h.
|
inline |
Dereferencing operator, returns a reference to an accessor. Usage is thus like (*i).get_id ();
Definition at line 190 of file particle_iterator.h.
|
inline |
Dereferencing operator, non-const version.
Definition at line 172 of file particle_iterator.h.
|
inline |
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 199 of file particle_iterator.h.
|
inline |
Dereferencing operator, non-const version.
Definition at line 181 of file particle_iterator.h.
|
inline |
Compare for equality.
Definition at line 218 of file particle_iterator.h.
|
inline |
Compare for inequality.
Definition at line 208 of file particle_iterator.h.
|
inline |
Prefix ++ operator: ++iterator. This operator advances the iterator to the next element and returns a reference to *this.
Definition at line 228 of file particle_iterator.h.
|
inline |
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 238 of file particle_iterator.h.
|
inline |
Prefix -- operator: --iterator. This operator moves the iterator to the previous element and returns a reference to *this.
Definition at line 250 of file particle_iterator.h.
|
inline |
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 260 of file particle_iterator.h.
|
inline |
Return the state of the iterator.
Definition at line 272 of file particle_iterator.h.
|
private |
The accessor to the actual particle.
Definition at line 153 of file particle_iterator.h.