Reference documentation for deal.II version 9.0.0
particle_iterator.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2017 - 2018 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 at
12 // the top level of the deal.II distribution.
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 #include <deal.II/particles/particle_accessor.h>
21 
22 DEAL_II_NAMESPACE_OPEN
23 
24 namespace Particles
25 {
26  template <int, int> class ParticleHandler;
27 
33  template<int dim, int spacedim=dim>
34  class ParticleIterator
35  {
36  public:
40  ParticleIterator () = default;
41 
46  ParticleIterator (const std::multimap<internal::LevelInd, Particle<dim,spacedim> > &map,
47  const typename std::multimap<internal::LevelInd, Particle<dim,spacedim> >::iterator &particle);
48 
53  const ParticleAccessor<dim,spacedim> &operator * () const;
54 
58  ParticleAccessor<dim,spacedim> &operator * ();
59 
64 
71  const ParticleAccessor<dim,spacedim> *operator -> () const;
72 
76  ParticleAccessor<dim,spacedim> *operator -> ();
77 
81  bool operator == (const ParticleIterator<dim,spacedim> &) const;
82 
86  bool operator != (const ParticleIterator<dim,spacedim> &) const;
87 
94 
101 
108 
115 
121  typedef std::bidirectional_iterator_tag iterator_category;
122  typedef ParticleAccessor<dim,spacedim> value_type;
123  typedef std::ptrdiff_t difference_type;
124  typedef ParticleAccessor<dim,spacedim> *pointer;
125  typedef ParticleAccessor<dim,spacedim> &reference;
126 
127  private:
131  ParticleAccessor<dim,spacedim> accessor;
132  };
133 }
134 
135 DEAL_II_NAMESPACE_CLOSE
136 
137 #endif
ParticleIterator & operator=(const ParticleIterator &)
ParticleIterator & operator--()
std::bidirectional_iterator_tag iterator_category
ParticleIterator & operator++()
bool operator==(const ParticleIterator< dim, spacedim > &) const
const ParticleAccessor< dim, spacedim > & operator*() const
const ParticleAccessor< dim, spacedim > * operator->() const
bool operator!=(const ParticleIterator< dim, spacedim > &) const
ParticleAccessor< dim, spacedim > accessor