Go to the documentation of this file.
7 #ifndef NIHU_ELEM_CENTER_ITERATOR_HPP_INCLUDED
8 #define NIHU_ELEM_CENTER_ITERATOR_HPP_INCLUDED
21 :
public std::iterator<std::forward_iterator_tag, typename It::value_type::x_t>
24 typedef typename It::value_type elem_t;
39 return static_cast<It
const &
>(*this);
46 return static_cast<It &
>(*this);
54 return base() - other;
91 return (*
base()).get_center();
98 return base()[idx].get_center();
105 return base() != other;
112 return base() == other;
131 :
public std::iterator<std::forward_iterator_tag, typename It::value_type::elem_t::x_t>
134 typedef typename It::value_type field_t;
150 return *
static_cast<It
const *
>(
this);
157 return *
static_cast<It *
>(
this);
165 return base() - other;
173 return base() - diff;
181 return base() + diff;
202 return (*
base()).get_elem().get_center();
209 return base()[idx].get_elem().get_center();
216 return base() != other;
223 return base() == other;
ptrdiff_t operator-(elem_center_iterator const &other) const
difference of two iterators
bool operator!=(field_center_iterator const &other) const
non-equality operator
field_center_iterator operator++(int)
postincrenet operator
elem_center_iterator operator+(ptrdiff_t diff) const
iterator arithmetics
field_center_iterator operator+(ptrdiff_t diff) const
iterator arithmetics
iterate through field centers
const x_t & operator[](size_t idx) const
index operator
It & base()
helper function to reach the element iterator interface
const It & base() const
helper function to reach the field iterator interface
bool operator==(elem_center_iterator const &other) const
equality operator
const x_t & operator*() const
dereference operator
iterate through element centers
bool operator!=(elem_center_iterator const &other) const
non-equality operator
It & base()
helper function to reach the field iterator interface
field_center_iterator operator-(ptrdiff_t diff) const
iterator arithmetics
elem_center_iterator(It it=It())
conversion constructor
elem_center_iterator operator++(int)
postincrenet operator
field_center_iterator(It it=It())
conversion constructor
field_center_iterator & operator++()
preincrenet operator
crtp_base_t::elem_t elem_t
the element type shorthand
elem_center_iterator & operator++()
preincrenet operator
element_traits::location_value_type< Derived, 0 >::type x_t
type of the element's physical location variable
auto create_field_center_iterator(It it)
factory function to create a field center iterator
bool operator==(field_center_iterator const &other) const
equality operator
const x_t & operator[](size_t idx) const
index operator
const x_t & operator*() const
dereference operator
auto create_elem_center_iterator(It it)
factory function to create an element center iterator
ptrdiff_t operator-(field_center_iterator const &other) const
difference of two iterators
const It & base() const
helper function to reach the element iterator interface
elem_center_iterator operator-(ptrdiff_t diff) const
iterator arithmetics