Reference documentation for deal.II version Git 0491297983 2019-09-23 09:31:59 +0200
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
particle_iterator.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2017 - 2019 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_particles_particle_iterator_h
17 #define dealii_particles_particle_iterator_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/particles/particle_accessor.h>
22 
23 DEAL_II_NAMESPACE_OPEN
24 
25 namespace Particles
26 {
27  // Forward declaration
28 #ifndef DOXYGEN
29  template <int, int>
30  class ParticleHandler;
31 #endif
32 
38  template <int dim, int spacedim = dim>
40  {
41  public:
45  ParticleIterator() = default;
46 
52  const std::multimap<internal::LevelInd, Particle<dim, spacedim>> &map,
53  const typename std::multimap<internal::LevelInd,
54  Particle<dim, spacedim>>::iterator
55  &particle);
56 
62 
67 
75 
80 
84  bool
86 
90  bool
92 
99  operator++();
100 
107  operator++(int);
108 
115  operator--();
116 
123  operator--(int);
124 
130  using iterator_category = std::bidirectional_iterator_tag;
131  using value_type = ParticleAccessor<dim, spacedim>;
132  using difference_type = std::ptrdiff_t;
133  using pointer = ParticleAccessor<dim, spacedim> *;
134  using reference = ParticleAccessor<dim, spacedim> &;
135 
136  private:
141  };
142 } // namespace Particles
143 
144 DEAL_II_NAMESPACE_CLOSE
145 
146 #endif
ParticleIterator & operator--()
std::bidirectional_iterator_tag iterator_category
ParticleIterator & operator++()
bool operator==(const ParticleIterator< dim, spacedim > &) const
ParticleAccessor< dim, spacedim > accessor
const ParticleAccessor< dim, spacedim > & operator*() const
const ParticleAccessor< dim, spacedim > * operator->() const
bool operator!=(const ParticleIterator< dim, spacedim > &) const