PolyDEAL
 
Loading...
Searching...
No Matches
AgglomerationIterator< dim, spacedim > Class Template Reference

#include <agglomeration_iterator.h>

Public Types

using AgglomerationContainer
 
using iterator_category = std::bidirectional_iterator_tag
 
using value_type = AgglomerationAccessor<dim, spacedim>
 
using difference_type = std::ptrdiff_t
 
using pointer = AgglomerationAccessor<dim, spacedim> *
 
using reference = AgglomerationAccessor<dim, spacedim> &
 

Public Member Functions

 AgglomerationIterator ()
 
 AgglomerationIterator (const typename Triangulation< dim, spacedim >::active_cell_iterator &cell, const AgglomerationHandler< dim, spacedim > *handler)
 
 AgglomerationIterator (const typename Triangulation< dim, spacedim >::active_cell_iterator &master_cell, const CellId &cell_id, const AgglomerationHandler< dim, spacedim > *handler)
 
const AgglomerationAccessor< dim, spacedim > & operator* () const
 
AgglomerationAccessor< dim, spacedim > & operator* ()
 
const AgglomerationAccessor< dim, spacedim > * operator-> () const
 
AgglomerationAccessor< dim, spacedim > * operator-> ()
 
bool operator== (const AgglomerationIterator< dim, spacedim > &) const
 
bool operator!= (const AgglomerationIterator< dim, spacedim > &) const
 
AgglomerationIteratoroperator++ ()
 
AgglomerationIterator operator++ (int)
 
AgglomerationIteratoroperator-- ()
 
AgglomerationIterator operator-- (int)
 
IteratorState::IteratorStates state () const
 
const Triangulation< dim, spacedim >::active_cell_iterator & master_cell () const
 

Private Attributes

AgglomerationAccessor< dim, spacedim > accessor
 

Detailed Description

template<int dim, int spacedim = dim>
class AgglomerationIterator< dim, spacedim >

A class that is used to iterate over polygons. Together with the AgglomerationAccessor class this is used to hide the internal implementation of the particle class and the particle container.

Definition at line 26 of file agglomeration_iterator.h.

Member Typedef Documentation

◆ AgglomerationContainer

template<int dim, int spacedim = dim>
using AgglomerationIterator< dim, spacedim >::AgglomerationContainer
Initial value:
std::vector< typename Triangulation< dim, spacedim >::active_cell_iterator > AgglomerationContainer

Definition at line 29 of file agglomeration_iterator.h.

◆ difference_type

template<int dim, int spacedim = dim>
using AgglomerationIterator< dim, spacedim >::difference_type = std::ptrdiff_t

Definition at line 146 of file agglomeration_iterator.h.

◆ iterator_category

template<int dim, int spacedim = dim>
using AgglomerationIterator< 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 144 of file agglomeration_iterator.h.

◆ pointer

template<int dim, int spacedim = dim>
using AgglomerationIterator< dim, spacedim >::pointer = AgglomerationAccessor<dim, spacedim> *

Definition at line 147 of file agglomeration_iterator.h.

◆ reference

template<int dim, int spacedim = dim>
using AgglomerationIterator< dim, spacedim >::reference = AgglomerationAccessor<dim, spacedim> &

Definition at line 148 of file agglomeration_iterator.h.

◆ value_type

template<int dim, int spacedim = dim>
using AgglomerationIterator< dim, spacedim >::value_type = AgglomerationAccessor<dim, spacedim>

Definition at line 145 of file agglomeration_iterator.h.

Constructor & Destructor Documentation

◆ AgglomerationIterator() [1/3]

template<int dim, int spacedim>
AgglomerationIterator< dim, spacedim >::AgglomerationIterator ( )
inline

Empty constructor. This constructore creates an iterator pointing to an invalid object.

Definition at line 162 of file agglomeration_iterator.h.

◆ AgglomerationIterator() [2/3]

template<int dim, int spacedim>
AgglomerationIterator< dim, spacedim >::AgglomerationIterator ( const typename Triangulation< dim, spacedim >::active_cell_iterator & cell,
const AgglomerationHandler< dim, spacedim > * handler )
inline

Constructor of the iterator. Takes a reference to the master cell encoding the actual polytope.

Definition at line 169 of file agglomeration_iterator.h.

◆ AgglomerationIterator() [3/3]

template<int dim, int spacedim>
AgglomerationIterator< dim, spacedim >::AgglomerationIterator ( const typename Triangulation< dim, spacedim >::active_cell_iterator & master_cell,
const CellId & cell_id,
const AgglomerationHandler< dim, spacedim > * handler )
inline

Same as above, needed for ghosted elements.

Definition at line 177 of file agglomeration_iterator.h.

Member Function Documentation

◆ master_cell()

◆ operator!=()

template<int dim, int spacedim>
bool AgglomerationIterator< dim, spacedim >::operator!= ( const AgglomerationIterator< dim, spacedim > & other) const
inline

Compare for inequality.

Definition at line 225 of file agglomeration_iterator.h.

References AgglomerationIterator< dim, spacedim >::accessor.

◆ operator*() [1/2]

template<int dim, int spacedim>
AgglomerationAccessor< dim, spacedim > & AgglomerationIterator< dim, spacedim >::operator* ( )
inline

Dereferencing operator, non-const version.

Definition at line 189 of file agglomeration_iterator.h.

◆ operator*() [2/2]

template<int dim, int spacedim>
const AgglomerationAccessor< dim, spacedim > & AgglomerationIterator< dim, spacedim >::operator* ( ) const
inline

Dereferencing operator, returns a reference to an accessor. Usage is thus like (*i).get_dof_indices ();

Definition at line 207 of file agglomeration_iterator.h.

◆ operator++() [1/2]

template<int dim, int spacedim>
AgglomerationIterator< dim, spacedim > & AgglomerationIterator< dim, spacedim >::operator++ ( )
inline

Prefix ++ operator: ++iterator. This operator advances the iterator to the next element and returns a reference to *this.

Definition at line 245 of file agglomeration_iterator.h.

◆ operator++() [2/2]

template<int dim, int spacedim>
AgglomerationIterator< dim, spacedim > AgglomerationIterator< dim, spacedim >::operator++ ( int )
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 255 of file agglomeration_iterator.h.

References operator++().

◆ operator--() [1/2]

template<int dim, int spacedim>
AgglomerationIterator< dim, spacedim > & AgglomerationIterator< dim, spacedim >::operator-- ( )
inline

Prefix -- operator: --iterator. This operator moves the iterator to the previous element and returns a reference to *this.

Definition at line 267 of file agglomeration_iterator.h.

◆ operator--() [2/2]

template<int dim, int spacedim>
AgglomerationIterator< dim, spacedim > AgglomerationIterator< dim, spacedim >::operator-- ( int )
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 277 of file agglomeration_iterator.h.

◆ operator->() [1/2]

template<int dim, int spacedim>
AgglomerationAccessor< dim, spacedim > * AgglomerationIterator< dim, spacedim >::operator-> ( )
inline

Dereferencing operator, non-const version.

Definition at line 198 of file agglomeration_iterator.h.

References operator*().

◆ operator->() [2/2]

template<int dim, int spacedim>
const AgglomerationAccessor< dim, spacedim > * AgglomerationIterator< dim, spacedim >::operator-> ( ) const
inline

Dereferencing operator, returns a pointer of the particle pointed to. Usage is thus like i->get_dof_indices ();

There is a const and a non-const version.

Definition at line 216 of file agglomeration_iterator.h.

References operator*().

◆ operator==()

template<int dim, int spacedim>
bool AgglomerationIterator< dim, spacedim >::operator== ( const AgglomerationIterator< dim, spacedim > & other) const
inline

Compare for equality.

Definition at line 235 of file agglomeration_iterator.h.

References AgglomerationIterator< dim, spacedim >::accessor.

◆ state()

Member Data Documentation

◆ accessor

template<int dim, int spacedim = dim>
AgglomerationAccessor<dim, spacedim> AgglomerationIterator< dim, spacedim >::accessor
private

The accessor to the actual polytope.

Definition at line 154 of file agglomeration_iterator.h.

Referenced by AgglomerationIterator< dim, spacedim >::operator!=(), and AgglomerationIterator< dim, spacedim >::operator==().


The documentation for this class was generated from the following files: