16 #ifndef dealii_tria_iterator_h 17 # define dealii_tria_iterator_h 23 # include <deal.II/base/config.h> 25 # include <deal.II/base/exceptions.h> 26 # include <deal.II/base/point.h> 28 # include <deal.II/grid/tria_iterator_base.h> 33 DEAL_II_NAMESPACE_OPEN
35 template <
int dim,
int spacedim>
37 template <
int,
int,
int>
228 template <
typename Accessor>
268 template <
typename OtherAccessor>
280 const typename AccessorType::AccessorData *local_data =
nullptr);
291 template <
typename OtherAccessor>
302 Accessor::space_dimension> &tria_accessor,
303 const typename Accessor::AccessorData * local_data);
309 template <
typename OtherAccessor>
316 template <
typename OtherAccessor>
478 template <
class StreamType>
480 print(StreamType &out)
const;
496 using value_type = Accessor;
497 using difference_type = int;
498 using pointer = Accessor *;
499 using reference = Accessor &;
510 <<
"You tried to dereference a cell iterator for which this " 511 <<
"is not possible. More information on this iterator: " 512 <<
"level=" << arg1.level() <<
", index=" << arg1.index()
525 <<
"You tried to dereference an iterator for which this " 526 <<
"is not possible. More information on this iterator: " 527 <<
"index=" << arg1.index() <<
", state=" 560 template <
typename SomeAccessor>
562 template <
typename SomeAccessor>
564 template <
typename SomeAccessor>
576 template <
typename Accessor>
615 const typename Accessor::AccessorData *local_data =
nullptr);
621 template <
typename OtherAccessor>
633 template <
typename OtherAccessor>
643 Accessor::space_dimension> &tria_accessor,
644 const typename Accessor::AccessorData * local_data);
651 template <
typename OtherAccessor>
658 template <
typename OtherAccessor>
678 template <
class OtherAccessor>
687 template <
class OtherAccessor>
736 using value_type =
typename TriaRawIterator<Accessor>::value_type;
737 using pointer =
typename TriaRawIterator<Accessor>::pointer;
738 using reference =
typename TriaRawIterator<Accessor>::reference;
739 using difference_type =
typename TriaRawIterator<Accessor>::difference_type;
757 template <
typename Accessor>
807 const typename Accessor::AccessorData *local_data = 0);
818 template <
typename OtherAccessor>
829 Accessor::space_dimension> &tria_accessor,
830 const typename Accessor::AccessorData * local_data);
843 template <
typename OtherAccessor>
870 template <
class OtherAccessor>
879 template <
class OtherAccessor>
888 template <
class OtherAccessor>
936 using value_type =
typename TriaIterator<Accessor>::value_type;
937 using pointer =
typename TriaIterator<Accessor>::pointer;
938 using reference =
typename TriaIterator<Accessor>::reference;
939 using difference_type =
typename TriaIterator<Accessor>::difference_type;
951 template <
typename Accessor>
958 template <
typename Accessor>
959 template <
typename OtherAccessor>
966 template <
typename Accessor>
967 template <
typename OtherAccessor>
970 : accessor(i.accessor)
975 template <
typename Accessor>
976 template <
typename OtherAccessor>
979 : accessor(i.accessor)
984 template <
typename Accessor>
985 template <
typename OtherAccessor>
988 : accessor(i.accessor)
993 template <
typename Accessor>
996 Assert(Accessor::structure_dimension != Accessor::dimension ||
998 ExcDereferenceInvalidCell(accessor));
999 Assert(Accessor::structure_dimension == Accessor::dimension ||
1008 template <
typename Accessor>
1011 Assert(Accessor::structure_dimension != Accessor::dimension ||
1013 ExcDereferenceInvalidCell(accessor));
1014 Assert(Accessor::structure_dimension == Accessor::dimension ||
1023 template <
typename Accessor>
1024 inline const Accessor &
1032 template <
typename Accessor>
1040 template <
typename Accessor>
1048 template <
typename Accessor>
1052 return accessor.state();
1057 template <
typename Accessor>
1067 Assert(&accessor.get_triangulation() == &other.
accessor.get_triangulation(),
1068 ExcInvalidComparison());
1076 return ((**
this) < (*other));
1081 template <
typename Accessor>
1086 return (other < *
this);
1091 template <
typename Accessor>
1103 template <
typename Accessor>
1115 template <
typename Accessor>
1116 template <
class StreamType>
1120 if (Accessor::structure_dimension == Accessor::dimension)
1121 out << accessor.level() <<
"." << accessor.index();
1123 out << accessor.index();
1128 template <
typename Accessor>
1137 template <
typename Accessor>
1138 template <
typename OtherAccessor>
1146 template <
typename Accessor>
1147 template <
typename OtherAccessor>
1155 template <
typename Accessor>
1156 template <
typename OtherAccessor>
1173 template <
typename Accessor>
1174 template <
typename OtherAccessor>
1190 template <
typename Accessor>
1191 template <
typename OtherAccessor>
1199 template <
typename Accessor>
1200 template <
typename OtherAccessor>
1227 template <
typename Accessor>
1228 inline std::ostream &
1229 operator<<(std::ostream &out, const TriaRawIterator<Accessor> &i)
1244 template <
typename Accessor>
1245 inline std::ostream &
1246 operator<<(std::ostream &out, const TriaIterator<Accessor> &i)
1261 template <
typename Accessor>
1262 inline std::ostream &
1263 operator<<(std::ostream &out, const TriaActiveIterator<Accessor> &i)
1270 DEAL_II_NAMESPACE_CLOSE
1275 # include "tria_iterator.templates.h"
Iterator is invalid, probably due to an error.
TriaActiveIterator< Accessor > & operator++()
const Accessor * operator->() const
static ::ExceptionBase & ExcInvalidComparison()
static ::ExceptionBase & ExcAdvanceInvalidObject()
static ::ExceptionBase & ExcDereferenceInvalidObject(AccessorType arg1)
const Accessor & operator*() const
static ::ExceptionBase & ExcAssignmentOfInactiveObject()
bool operator>(const TriaRawIterator &) const
TriaIterator< Accessor > & operator++()
typename TriaRawIterator< Accessor >::iterator_category iterator_category
#define DeclException1(Exception1, type1, outsequence)
TriaActiveIterator< Accessor > & operator--()
#define Assert(cond, exc)
TriaRawIterator & operator++()
#define DeclException0(Exception0)
TriaIterator< Accessor > & operator--()
static ::ExceptionBase & ExcDereferenceInvalidObject(Accessor arg1)
bool operator==(const TriaRawIterator &) const
bool operator!=(const TriaRawIterator &) const
TriaRawIterator & operator--()
static ::ExceptionBase & ExcAssignmentOfUnusedObject()
TriaActiveIterator< Accessor > & operator=(const TriaActiveIterator< Accessor > &)
static ::ExceptionBase & ExcDereferenceInvalidCell(Accessor arg1)
TriaRawIterator & operator=(const TriaRawIterator &)
Iterator reached end of container.
const Accessor & access_any() const
Iterator points to a valid object.
TriaIterator< Accessor > & operator=(const TriaIterator< Accessor > &)
void print(StreamType &out) const
IteratorState::IteratorStates state() const
std::bidirectional_iterator_tag iterator_category
bool operator<(const TriaRawIterator &) const
std::size_t memory_consumption() const
Point< dim, typename ProductType< Number, typename EnableIfScalar< OtherNumber >::type >::type > operator*(const OtherNumber) const