15#ifndef dealii_tria_iterator_h
16#define dealii_tria_iterator_h
33template <
int dim,
int spacedim>
36template <
int,
int,
int>
218template <
typename Accessor>
258 template <
typename OtherAccessor>
270 const typename AccessorType::AccessorData *local_data =
nullptr);
281 template <
typename OtherAccessor>
292 Accessor::space_dimension> &tria_accessor,
293 const typename Accessor::AccessorData *local_data);
299 template <
typename OtherAccessor>
306 template <
typename OtherAccessor>
369 template <
typename OtherAccessor = Accessor>
370 std::enable_if_t<std::is_convertible_v<OtherAccessor, Accessor>,
bool>
469 template <
typename StreamType>
471 print(StreamType &out)
const;
501 <<
"You tried to dereference a cell iterator for which this "
502 <<
"is not possible. More information on this iterator: "
503 <<
"level=" << arg1.level() <<
", index=" << arg1.index()
516 <<
"You tried to dereference an iterator for which this "
517 <<
"is not possible. More information on this iterator: "
518 <<
"index=" << arg1.index() <<
", state="
549 template <
typename SomeAccessor>
551 template <
typename SomeAccessor>
553 template <
typename SomeAccessor>
565template <
typename Accessor>
604 const typename Accessor::AccessorData *local_data =
nullptr);
610 template <
typename OtherAccessor>
622 template <
typename OtherAccessor>
632 Accessor::space_dimension> &tria_accessor,
633 const typename Accessor::AccessorData *local_data);
640 template <
typename OtherAccessor>
647 template <
typename OtherAccessor>
667 template <
class OtherAccessor>
676 template <
class OtherAccessor>
746template <
typename Accessor>
796 const typename Accessor::AccessorData *local_data =
nullptr);
807 template <
typename OtherAccessor>
818 Accessor::space_dimension> &tria_accessor,
819 const typename Accessor::AccessorData *local_data);
832 template <
typename OtherAccessor>
859 template <
class OtherAccessor>
868 template <
class OtherAccessor>
877 template <
class OtherAccessor>
940template <
typename Accessor>
947template <
typename Accessor>
948template <
typename OtherAccessor>
955template <
typename Accessor>
956template <
typename OtherAccessor>
959 : accessor(i.accessor)
964template <
typename Accessor>
965template <
typename OtherAccessor>
968 : accessor(i.accessor)
973template <
typename Accessor>
974template <
typename OtherAccessor>
977 : accessor(i.accessor)
982template <
typename Accessor>
986 Assert(Accessor::structure_dimension != Accessor::dimension ||
988 ExcDereferenceInvalidCell(accessor));
989 Assert(Accessor::structure_dimension == Accessor::dimension ||
991 ExcDereferenceInvalidObject(accessor));
998template <
typename Accessor>
999inline const Accessor &
1007template <
typename Accessor>
1008inline const Accessor *
1016template <
typename Accessor>
1025template <
typename Accessor>
1029 return accessor.state();
1034template <
typename Accessor>
1040 ExcDereferenceInvalidObject(accessor));
1042 ExcDereferenceInvalidObject(other.
accessor));
1044 Assert(&accessor.get_triangulation() == &other.
accessor.get_triangulation(),
1045 ExcInvalidComparison());
1053 return ((**
this) < (*other));
1058template <
typename Accessor>
1063 return (other < *
this);
1068template <
typename Accessor>
1080template <
typename Accessor>
1092template <
typename Accessor>
1093template <
typename StreamType>
1097 if (Accessor::structure_dimension == Accessor::dimension)
1098 out << accessor.level() <<
'.' << accessor.index();
1100 out << accessor.index();
1105template <
typename Accessor>
1114template <
typename Accessor>
1115template <
typename OtherAccessor>
1123template <
typename Accessor>
1124template <
typename OtherAccessor>
1132template <
typename Accessor>
1133template <
typename OtherAccessor>
1150template <
typename Accessor>
1151template <
typename OtherAccessor>
1167template <
typename Accessor>
1168template <
typename OtherAccessor>
1176template <
typename Accessor>
1177template <
typename OtherAccessor>
1202template <
typename Accessor>
1203inline std::ostream &
1203inline std::ostream & {
…}
1217template <
typename Accessor>
1218inline std::ostream &
1218inline std::ostream & {
…}
1232template <
typename Accessor>
1233inline std::ostream &
1233inline std::ostream & {
…}
1246template <
typename Accessor>
1248 : accessor(nullptr, -2, -2, nullptr)
1252template <
typename Accessor>
1255 : accessor(i.accessor)
1260template <
typename Accessor>
1265 const typename Accessor::AccessorData *local_data)
1270template <
typename Accessor>
1273 Accessor::dimension,
1274 Accessor::space_dimension> &tria_accessor,
1275 const typename Accessor::AccessorData *local_data)
1276 : accessor(nullptr, -2, -2, local_data)
1278 accessor.copy_from(tria_accessor);
1282template <
typename Accessor>
1293template <
typename Accessor>
1294template <
typename OtherAccessor>
1295inline std::enable_if_t<std::is_convertible_v<OtherAccessor, Accessor>,
bool>
1303template <
typename Accessor>
1308 return !(*
this == other);
1312template <
typename Accessor>
1323template <
typename Accessor>
1337template <
typename Accessor>
1343template <
typename Accessor>
1349template <
typename Accessor>
1361 Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
1366template <
typename Accessor>
1371 const typename Accessor::AccessorData *local_data)
1382 Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
1387template <
typename Accessor>
1390 Accessor::dimension,
1391 Accessor::space_dimension> &tria_accessor,
1392 const typename Accessor::AccessorData *local_data)
1403 Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
1408template <
typename Accessor>
1412 this->accessor.copy_from(i.
accessor);
1417template <
typename Accessor>
1418template <
typename OtherAccessor>
1422 this->accessor.copy_from(i.
accessor);
1427template <
typename Accessor>
1431 this->accessor.copy_from(i.
accessor);
1440 Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
1446template <
typename Accessor>
1447template <
typename OtherAccessor>
1451 this->accessor.copy_from(i.
accessor);
1460 Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
1466template <
typename Accessor>
1472 if (this->accessor.used() ==
true)
1478template <
typename Accessor>
1489template <
typename Accessor>
1495 if (this->accessor.used() ==
true)
1501template <
typename Accessor>
1515template <
typename Accessor>
1521template <
typename Accessor>
1528template <
typename Accessor>
1541 Assert(this->accessor.has_children() ==
false,
1542 ExcAssignmentOfInactiveObject());
1547template <
typename Accessor>
1560 Assert(this->accessor.has_children() ==
false,
1561 ExcAssignmentOfInactiveObject());
1566template <
typename Accessor>
1571 const typename Accessor::AccessorData *local_data)
1582 Assert(this->accessor.has_children() ==
false,
1583 ExcAssignmentOfInactiveObject());
1588template <
typename Accessor>
1591 Accessor::dimension,
1592 Accessor::space_dimension> &tria_accessor,
1593 const typename Accessor::AccessorData *local_data)
1604 Assert(this->accessor.has_children() ==
false,
1605 ExcAssignmentOfInactiveObject());
1610template <
typename Accessor>
1614 this->accessor.copy_from(i.
accessor);
1619template <
typename Accessor>
1620template <
class OtherAccessor>
1625 this->accessor.copy_from(i.
accessor);
1630template <
typename Accessor>
1634 this->accessor.copy_from(i.
accessor);
1643 Assert(this->accessor.used() && this->accessor.has_children() ==
false,
1644 ExcAssignmentOfInactiveObject());
1650template <
typename Accessor>
1651template <
class OtherAccessor>
1655 this->accessor.copy_from(i.
accessor);
1664 Assert(this->accessor.used() && this->accessor.has_children() ==
false,
1665 ExcAssignmentOfInactiveObject());
1671template <
typename Accessor>
1672template <
class OtherAccessor>
1676 this->accessor.copy_from(i.
accessor);
1685 Assert(this->accessor.has_children() ==
false,
1686 ExcAssignmentOfInactiveObject());
1692template <
typename Accessor>
1696 this->accessor.copy_from(i.
accessor);
1705 Assert(this->accessor.has_children() ==
false,
1706 ExcAssignmentOfInactiveObject());
1712template <
typename Accessor>
1718 if (this->accessor.has_children() ==
false)
1724template <
typename Accessor>
1735template <
typename Accessor>
1741 if (this->accessor.has_children() ==
false)
1747template <
typename Accessor>
TriaActiveIterator< Accessor > & operator=(const TriaIterator< OtherAccessor > &)
TriaActiveIterator(const TriaActiveIterator< Accessor > &)
typename TriaIterator< Accessor >::reference reference
TriaActiveIterator< Accessor > & operator=(const TriaRawIterator< Accessor > &)
TriaActiveIterator< Accessor > operator--(int)
TriaActiveIterator(const TriaRawIterator< Accessor > &)
TriaActiveIterator< Accessor > & operator=(const TriaActiveIterator< Accessor > &)
typename TriaIterator< Accessor >::difference_type difference_type
typename TriaIterator< Accessor >::pointer pointer
TriaActiveIterator< Accessor > & operator=(const TriaActiveIterator< OtherAccessor > &)
TriaActiveIterator< Accessor > & operator--()
TriaActiveIterator(const TriaAccessorBase< Accessor::structure_dimension, Accessor::dimension, Accessor::space_dimension > &tria_accessor, const typename Accessor::AccessorData *local_data)
TriaActiveIterator< Accessor > & operator=(const TriaIterator< Accessor > &)
TriaActiveIterator(const Triangulation< Accessor::dimension, Accessor::space_dimension > *parent, const int level, const int index, const typename Accessor::AccessorData *local_data=nullptr)
TriaActiveIterator< Accessor > & operator++()
TriaActiveIterator< Accessor > & operator=(const TriaRawIterator< OtherAccessor > &)
typename TriaIterator< Accessor >::iterator_category iterator_category
TriaActiveIterator< Accessor > operator++(int)
typename TriaIterator< Accessor >::value_type value_type
TriaActiveIterator(const TriaIterator< Accessor > &)
typename TriaRawIterator< Accessor >::pointer pointer
TriaIterator(const TriaIterator< Accessor > &)
TriaIterator< Accessor > & operator++()
TriaIterator< Accessor > operator--(int)
typename TriaRawIterator< Accessor >::iterator_category iterator_category
TriaIterator< Accessor > & operator=(const TriaRawIterator< OtherAccessor > &)
typename TriaRawIterator< Accessor >::value_type value_type
TriaIterator< Accessor > operator++(int)
TriaIterator< Accessor > & operator=(const TriaIterator< Accessor > &)
typename TriaRawIterator< Accessor >::difference_type difference_type
TriaIterator< Accessor > & operator=(const TriaRawIterator< Accessor > &)
TriaIterator(const TriaAccessorBase< Accessor::structure_dimension, Accessor::dimension, Accessor::space_dimension > &tria_accessor, const typename Accessor::AccessorData *local_data)
typename TriaRawIterator< Accessor >::reference reference
TriaIterator< Accessor > & operator--()
TriaIterator(const Triangulation< Accessor::dimension, Accessor::space_dimension > *parent, const int level, const int index, const typename Accessor::AccessorData *local_data=nullptr)
TriaIterator< Accessor > & operator=(const TriaIterator< OtherAccessor > &)
TriaIterator(const TriaRawIterator< Accessor > &)
const Accessor * operator->() const
TriaRawIterator & operator=(const TriaRawIterator &)
bool operator>(const TriaRawIterator &) const
std::size_t memory_consumption() const
TriaRawIterator(const Triangulation< Accessor::dimension, Accessor::space_dimension > *parent, const int level, const int index, const typename AccessorType::AccessorData *local_data=nullptr)
TriaRawIterator(const TriaAccessorBase< Accessor::structure_dimension, Accessor::dimension, Accessor::space_dimension > &tria_accessor, const typename Accessor::AccessorData *local_data)
bool operator<(const TriaRawIterator &) const
TriaRawIterator(const TriaRawIterator &)
IteratorState::IteratorStates state() const
Accessor operator*() const
std::enable_if_t< std::is_convertible_v< OtherAccessor, Accessor >, bool > operator==(const TriaRawIterator< OtherAccessor > &) const
void print(StreamType &out) const
friend class TriaRawIterator
bool operator!=(const TriaRawIterator &) const
TriaRawIterator operator++(int)
std::bidirectional_iterator_tag iterator_category
TriaRawIterator & operator++()
const Accessor & access_any() const
TriaRawIterator & operator--()
TriaRawIterator operator--(int)
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_CXX20_REQUIRES(condition)
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcAssignmentOfUnusedObject()
#define DeclException0(Exception0)
static ::ExceptionBase & ExcAssignmentOfInactiveObject()
#define Assert(cond, exc)
static ::ExceptionBase & ExcAdvanceInvalidObject()
static ::ExceptionBase & ExcInvalidComparison()
#define DeclException1(Exception1, type1, outsequence)
static ::ExceptionBase & ExcDereferenceInvalidObject(Accessor arg1)
static ::ExceptionBase & ExcDereferenceInvalidCell(Accessor arg1)
@ past_the_end
Iterator reached end of container.
@ valid
Iterator points to a valid object.
@ invalid
Iterator is invalid, probably due to an error.
SynchronousIterators< Iterators > & operator--(SynchronousIterators< Iterators > &a)
SynchronousIterators< Iterators > & operator++(SynchronousIterators< Iterators > &a)
std::ostream & operator<<(std::ostream &out, const TriaRawIterator< Accessor > &i)