Processing math: 0%
 deal.II version GIT relicensing-2516-ge1667ab5f0 2025-01-30 22:30:00+00:00
\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}} \newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=} \newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]} \newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
tria_iterator.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 1998 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_tria_iterator_h
16#define dealii_tria_iterator_h
17
18
19#include <deal.II/base/config.h>
20
22#include <deal.II/base/point.h>
23
25
26#include <iterator>
27#include <ostream>
28
30
31// Forward declarations
32#ifndef DOXYGEN
33template <int dim, int spacedim>
35class Triangulation;
36template <int, int, int>
38
39template <typename>
40class TriaIterator;
41template <typename>
43#endif
44
45
46
218template <typename Accessor>
220{
221public:
227 using AccessorType = Accessor;
228
234
239
252 explicit TriaRawIterator(const Accessor &a);
253
258 template <typename OtherAccessor>
259 explicit TriaRawIterator(const OtherAccessor &a);
260
268 const int level,
269 const int index,
270 const typename AccessorType::AccessorData *local_data = nullptr);
271
281 template <typename OtherAccessor>
283
290 const TriaAccessorBase<Accessor::structure_dimension,
291 Accessor::dimension,
292 Accessor::space_dimension> &tria_accessor,
293 const typename Accessor::AccessorData *local_data);
294
299 template <typename OtherAccessor>
301
306 template <typename OtherAccessor>
308
326 Accessor
327 operator*() const;
328
336 const Accessor *
337 operator->() const;
338
342 Accessor *
343 operator->();
344
345
355 const Accessor &
356 access_any() const;
357
365
369 template <typename OtherAccessor = Accessor>
370 std::enable_if_t<std::is_convertible_v<OtherAccessor, Accessor>, bool>
372
376 bool
378
404 bool
405 operator<(const TriaRawIterator &) const;
406
411 bool
412 operator>(const TriaRawIterator &) const;
413
424 operator++();
425
439
445 operator--();
446
463 state() const;
464
469 template <typename StreamType>
470 void
471 print(StreamType &out) const;
472
473
478 std::size_t
479 memory_consumption() const;
480
486 using iterator_category = std::bidirectional_iterator_tag;
487 using value_type = Accessor;
489 using pointer = Accessor *;
490 using reference = Accessor &;
491
500 Accessor,
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()
504 << ", state="
505 << (arg1.state() == IteratorState::valid ?
506 "valid" :
507 (arg1.state() == IteratorState::past_the_end ?
508 "past_the_end" :
509 "invalid")));
510
515 Accessor,
516 << "You tried to dereference an iterator for which this "
517 << "is not possible. More information on this iterator: "
518 << "index=" << arg1.index() << ", state="
519 << (arg1.state() == IteratorState::valid ?
520 "valid" :
521 (arg1.state() == IteratorState::past_the_end ?
522 "past_the_end" :
523 "invalid")));
524
533
535protected:
539 Accessor accessor;
540
541
542 // Make all other iterator class templates friends of this class. This is
543 // necessary for the implementation of conversion constructors.
544 //
545 // In fact, we would not need them to be friends if they were for different
546 // dimensions, but the compiler dislikes giving a fixed dimension and
547 // variable accessor since then it says that would be a partial
548 // specialization.
549 template <typename SomeAccessor>
550 friend class TriaRawIterator;
551 template <typename SomeAccessor>
552 friend class TriaIterator;
553 template <typename SomeAccessor>
554 friend class TriaActiveIterator;
555};
556
557
565template <typename Accessor>
566class TriaIterator : public TriaRawIterator<Accessor>
567{
568public:
574
579
590
602 const int level,
603 const int index,
604 const typename Accessor::AccessorData *local_data = nullptr);
605
610 template <typename OtherAccessor>
611 explicit TriaIterator(const OtherAccessor &a);
612
622 template <typename OtherAccessor>
624
630 TriaIterator(const TriaAccessorBase<Accessor::structure_dimension,
631 Accessor::dimension,
632 Accessor::space_dimension> &tria_accessor,
633 const typename Accessor::AccessorData *local_data);
634
640 template <typename OtherAccessor>
642
647 template <typename OtherAccessor>
649
655
662
667 template <class OtherAccessor>
670
676 template <class OtherAccessor>
679
691
703
710
729
734};
735
736
746template <typename Accessor>
747class TriaActiveIterator : public TriaIterator<Accessor>
748{
749public:
755
760
771
782
794 const int level,
795 const int index,
796 const typename Accessor::AccessorData *local_data = nullptr);
797
807 template <typename OtherAccessor>
809
816 const TriaAccessorBase<Accessor::structure_dimension,
817 Accessor::dimension,
818 Accessor::space_dimension> &tria_accessor,
819 const typename Accessor::AccessorData *local_data);
820
832 template <typename OtherAccessor>
834
840
847
854
859 template <class OtherAccessor>
862
868 template <class OtherAccessor>
871
877 template <class OtherAccessor>
880
888
904
911
929
934};
935
936
937/*----------------------- Inline functions -------------------*/
938
939
940template <typename Accessor>
942 : accessor(a)
943{}
944
945
946
947template <typename Accessor>
948template <typename OtherAccessor>
949inline TriaRawIterator<Accessor>::TriaRawIterator(const OtherAccessor &a)
950 : accessor(a)
951{}
952
953
954
955template <typename Accessor>
956template <typename OtherAccessor>
959 : accessor(i.accessor)
960{}
961
962
963
964template <typename Accessor>
965template <typename OtherAccessor>
968 : accessor(i.accessor)
969{}
970
971
972
973template <typename Accessor>
974template <typename OtherAccessor>
977 : accessor(i.accessor)
978{}
979
980
981
982template <typename Accessor>
983inline Accessor
985{
986 Assert(Accessor::structure_dimension != Accessor::dimension ||
987 state() == IteratorState::valid,
988 ExcDereferenceInvalidCell(accessor));
989 Assert(Accessor::structure_dimension == Accessor::dimension ||
990 state() == IteratorState::valid,
991 ExcDereferenceInvalidObject(accessor));
992
993 return accessor;
994}
995
996
997
998template <typename Accessor>
999inline const Accessor &
1001{
1002 return accessor;
1003}
1004
1005
1006
1007template <typename Accessor>
1008inline const Accessor *
1010{
1011 return &accessor;
1012}
1013
1014
1015
1016template <typename Accessor>
1017inline Accessor *
1019{
1020 return &accessor;
1021}
1022
1023
1024
1025template <typename Accessor>
1028{
1029 return accessor.state();
1030}
1031
1032
1033
1034template <typename Accessor>
1035inline bool
1037 const TriaRawIterator<Accessor> &other) const
1038{
1039 Assert(state() != IteratorState::invalid,
1040 ExcDereferenceInvalidObject(accessor));
1042 ExcDereferenceInvalidObject(other.accessor));
1043
1044 Assert(&accessor.get_triangulation() == &other.accessor.get_triangulation(),
1045 ExcInvalidComparison());
1046
1047 // Deal with iterators past end
1048 if (state() == IteratorState::past_the_end)
1049 return false;
1050 if (other.state() == IteratorState::past_the_end)
1051 return true;
1052
1053 return ((**this) < (*other));
1054}
1055
1056
1057
1058template <typename Accessor>
1059inline bool
1061 const TriaRawIterator<Accessor> &other) const
1062{
1063 return (other < *this);
1064}
1065
1066
1067
1068template <typename Accessor>
1071{
1072 Assert(state() == IteratorState::valid, ExcAdvanceInvalidObject());
1073
1074 ++accessor;
1075 return *this;
1076}
1077
1078
1079
1080template <typename Accessor>
1083{
1084 Assert(state() == IteratorState::valid, ExcAdvanceInvalidObject());
1085
1086 --accessor;
1087 return *this;
1088}
1089
1090
1091
1092template <typename Accessor>
1093template <typename StreamType>
1094inline void
1096{
1097 if (Accessor::structure_dimension == Accessor::dimension)
1098 out << accessor.level() << '.' << accessor.index();
1099 else
1100 out << accessor.index();
1101}
1102
1103
1104
1105template <typename Accessor>
1106inline std::size_t
1111
1112
1113
1114template <typename Accessor>
1115template <typename OtherAccessor>
1118 : TriaRawIterator<Accessor>(i.accessor)
1119{}
1120
1121
1122
1123template <typename Accessor>
1124template <typename OtherAccessor>
1127 : TriaRawIterator<Accessor>(i.accessor)
1128{}
1129
1130
1131
1132template <typename Accessor>
1133template <typename OtherAccessor>
1136 : TriaRawIterator<Accessor>(i.accessor)
1137{
1138#ifdef DEBUG
1139 // do this like this, because:
1140 // if we write
1141 // "Assert (IteratorState::past_the_end || used)"
1142 // used() is called anyway, even if
1143 // state==IteratorState::past_the_end, and will then
1144 // throw the exception!
1145 if (this->state() != IteratorState::past_the_end)
1147#endif
1148}
1149
1150template <typename Accessor>
1151template <typename OtherAccessor>
1153 : TriaRawIterator<Accessor>(a)
1154{
1155#ifdef DEBUG
1156 // do this like this, because:
1157 // if we write
1158 // "Assert (IteratorState::past_the_end || used)"
1159 // used() is called anyway, even if
1160 // state==IteratorState::past_the_end, and will then
1161 // throw the exception!
1162 if (this->state() != IteratorState::past_the_end)
1164#endif
1165}
1166
1167template <typename Accessor>
1168template <typename OtherAccessor>
1173
1174
1175
1176template <typename Accessor>
1177template <typename OtherAccessor>
1180 : TriaIterator<Accessor>(i)
1181{
1182#ifdef DEBUG
1183 // do this like this, because:
1184 // if we write
1185 // "Assert (IteratorState::past_the_end || !has_children())"
1186 // has_children() is called anyway, even if
1187 // state==IteratorState::past_the_end, and will then
1188 // throw the exception!
1189 if (this->state() != IteratorState::past_the_end)
1190 Assert(this->accessor.has_children() == false,
1192#endif
1193}
1194
1195
1196
1202template <typename Accessor>
1203inline std::ostream &
1204operator<<(std::ostream &out, const TriaRawIterator<Accessor> &i)
1205{
1206 i.print(out);
1207 return out;
1208}
1209
1210
1211
1217template <typename Accessor>
1218inline std::ostream &
1219operator<<(std::ostream &out, const TriaIterator<Accessor> &i)
1220{
1221 i.print(out);
1222 return out;
1223}
1224
1225
1226
1232template <typename Accessor>
1233inline std::ostream &
1234operator<<(std::ostream &out, const TriaActiveIterator<Accessor> &i)
1235{
1236 i.print(out);
1237 return out;
1238}
1239
1240
1241#ifndef DOXYGEN
1242
1243/*------------------------ Functions: TriaRawIterator ------------------*/
1244
1245
1246template <typename Accessor>
1248 : accessor(nullptr, -2, -2, nullptr)
1249{}
1250
1251
1252template <typename Accessor>
1255 : accessor(i.accessor)
1256{}
1257
1258
1259
1260template <typename Accessor>
1263 const int level,
1264 const int index,
1265 const typename Accessor::AccessorData *local_data)
1266 : accessor(parent, level, index, local_data)
1267{}
1268
1269
1270template <typename Accessor>
1272 const TriaAccessorBase<Accessor::structure_dimension,
1273 Accessor::dimension,
1274 Accessor::space_dimension> &tria_accessor,
1275 const typename Accessor::AccessorData *local_data)
1276 : accessor(nullptr, -2, -2, local_data)
1277{
1278 accessor.copy_from(tria_accessor);
1279}
1280
1281
1282template <typename Accessor>
1285{
1286 accessor.copy_from(i.accessor);
1287
1288 return *this;
1289}
1290
1291
1292
1293template <typename Accessor>
1294template <typename OtherAccessor>
1295inline std::enable_if_t<std::is_convertible_v<OtherAccessor, Accessor>, bool>
1297 const TriaRawIterator<OtherAccessor> &other) const
1298{
1299 return accessor == other.accessor;
1300}
1301
1302
1303template <typename Accessor>
1304inline bool
1306 const TriaRawIterator<Accessor> &other) const
1307{
1308 return !(*this == other);
1309}
1310
1311
1312template <typename Accessor>
1315{
1316 TriaRawIterator<Accessor> tmp(*this);
1317 operator++();
1318
1319 return tmp;
1320}
1321
1322
1323template <typename Accessor>
1326{
1327 TriaRawIterator<Accessor> tmp(*this);
1328 operator--();
1329
1330 return tmp;
1331}
1332
1333
1334/*----------------------- functions: TriaIterator ---------------*/
1335
1336
1337template <typename Accessor>
1339 : TriaRawIterator<Accessor>()
1340{}
1341
1342
1343template <typename Accessor>
1345 : TriaRawIterator<Accessor>(i.accessor)
1346{}
1347
1348
1349template <typename Accessor>
1351 : TriaRawIterator<Accessor>(i.accessor)
1352{
1353# ifdef DEBUG
1354 // do this like this, because:
1355 // if we write
1356 // "Assert (IteratorState::past_the_end || used)"
1357 // used() is called anyway, even if
1358 // state==IteratorState::past_the_end, and will then
1359 // throw the exception!
1360 if (this->state() != IteratorState::past_the_end)
1361 Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
1362# endif
1363}
1364
1365
1366template <typename Accessor>
1369 const int level,
1370 const int index,
1371 const typename Accessor::AccessorData *local_data)
1372 : TriaRawIterator<Accessor>(parent, level, index, local_data)
1373{
1374# ifdef DEBUG
1375 // do this like this, because:
1376 // if we write
1377 // "Assert (IteratorState::past_the_end || used)"
1378 // used() is called anyway, even if
1379 // state==IteratorState::past_the_end, and will then
1380 // throw the exception!
1381 if (this->state() != IteratorState::past_the_end)
1382 Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
1383# endif
1384}
1385
1386
1387template <typename Accessor>
1389 const TriaAccessorBase<Accessor::structure_dimension,
1390 Accessor::dimension,
1391 Accessor::space_dimension> &tria_accessor,
1392 const typename Accessor::AccessorData *local_data)
1393 : TriaRawIterator<Accessor>(tria_accessor, local_data)
1394{
1395# ifdef DEBUG
1396 // do this like this, because:
1397 // if we write
1398 // "Assert (IteratorState::past_the_end || used)"
1399 // used() is called anyway, even if
1400 // state==IteratorState::past_the_end, and will then
1401 // throw the exception!
1402 if (this->state() != IteratorState::past_the_end)
1403 Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
1404# endif
1405}
1406
1407
1408template <typename Accessor>
1411{
1412 this->accessor.copy_from(i.accessor);
1413 return *this;
1414}
1415
1416
1417template <typename Accessor>
1418template <typename OtherAccessor>
1421{
1422 this->accessor.copy_from(i.accessor);
1423 return *this;
1424}
1425
1426
1427template <typename Accessor>
1430{
1431 this->accessor.copy_from(i.accessor);
1432# ifdef DEBUG
1433 // do this like this, because:
1434 // if we write
1435 // "Assert (IteratorState::past_the_end || used)"
1436 // used() is called anyway, even if
1437 // state==IteratorState::past_the_end, and will then
1438 // throw the exception!
1439 if (this->state() != IteratorState::past_the_end)
1440 Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
1441# endif
1442 return *this;
1443}
1444
1445
1446template <typename Accessor>
1447template <typename OtherAccessor>
1450{
1451 this->accessor.copy_from(i.accessor);
1452# ifdef DEBUG
1453 // do this like this, because:
1454 // if we write
1455 // "Assert (IteratorState::past_the_end || used)"
1456 // used() is called anyway, even if
1457 // state==IteratorState::past_the_end, and will then
1458 // throw the exception!
1459 if (this->state() != IteratorState::past_the_end)
1460 Assert(this->accessor.used(), ExcAssignmentOfUnusedObject());
1461# endif
1462 return *this;
1463}
1464
1465
1466template <typename Accessor>
1469{
1471 (this->state() == IteratorState::valid))
1472 if (this->accessor.used() == true)
1473 return *this;
1474 return *this;
1475}
1476
1477
1478template <typename Accessor>
1481{
1482 TriaIterator<Accessor> tmp(*this);
1483 operator++();
1484
1485 return tmp;
1486}
1487
1488
1489template <typename Accessor>
1492{
1494 (this->state() == IteratorState::valid))
1495 if (this->accessor.used() == true)
1496 return *this;
1497 return *this;
1498}
1499
1500
1501template <typename Accessor>
1504{
1505 TriaIterator<Accessor> tmp(*this);
1506 operator--();
1507
1508 return tmp;
1509}
1510
1511
1512/*----------------------- functions: TriaActiveIterator ---------------*/
1513
1514
1515template <typename Accessor>
1517 : TriaIterator<Accessor>()
1518{}
1519
1520
1521template <typename Accessor>
1524 : TriaIterator<Accessor>(static_cast<TriaIterator<Accessor>>(i))
1525{}
1526
1527
1528template <typename Accessor>
1531 : TriaIterator<Accessor>(i)
1532{
1533# ifdef DEBUG
1534 // do this like this, because:
1535 // if we write
1536 // "Assert (IteratorState::past_the_end || !has_children())"
1537 // has_children() is called anyway, even if
1538 // state==IteratorState::past_the_end, and will then
1539 // throw the exception!
1540 if (this->state() != IteratorState::past_the_end)
1541 Assert(this->accessor.has_children() == false,
1542 ExcAssignmentOfInactiveObject());
1543# endif
1544}
1545
1546
1547template <typename Accessor>
1549 const TriaIterator<Accessor> &i)
1550 : TriaIterator<Accessor>(i)
1551{
1552# ifdef DEBUG
1553 // do this like this, because:
1554 // if we write
1555 // "Assert (IteratorState::past_the_end || !has_children())"
1556 // has_children() is called anyway, even if
1557 // state==IteratorState::past_the_end, and will then
1558 // throw the exception!
1559 if (this->state() != IteratorState::past_the_end)
1560 Assert(this->accessor.has_children() == false,
1561 ExcAssignmentOfInactiveObject());
1562# endif
1563}
1564
1565
1566template <typename Accessor>
1569 const int level,
1570 const int index,
1571 const typename Accessor::AccessorData *local_data)
1572 : TriaIterator<Accessor>(parent, level, index, local_data)
1573{
1574# ifdef DEBUG
1575 // do this like this, because:
1576 // if we write
1577 // "Assert (IteratorState::past_the_end || !has_children())"
1578 // has_children() is called anyway, even if
1579 // state==IteratorState::past_the_end, and will then
1580 // throw the exception!
1581 if (this->state() != IteratorState::past_the_end)
1582 Assert(this->accessor.has_children() == false,
1583 ExcAssignmentOfInactiveObject());
1584# endif
1585}
1586
1587
1588template <typename Accessor>
1590 const TriaAccessorBase<Accessor::structure_dimension,
1591 Accessor::dimension,
1592 Accessor::space_dimension> &tria_accessor,
1593 const typename Accessor::AccessorData *local_data)
1594 : TriaIterator<Accessor>(tria_accessor, local_data)
1595{
1596# ifdef DEBUG
1597 // do this like this, because:
1598 // if we write
1599 // "Assert (IteratorState::past_the_end || !has_children())"
1600 // has_children() is called anyway, even if
1601 // state==IteratorState::past_the_end, and will then
1602 // throw the exception!
1603 if (this->state() != IteratorState::past_the_end)
1604 Assert(this->accessor.has_children() == false,
1605 ExcAssignmentOfInactiveObject());
1606# endif
1607}
1608
1609
1610template <typename Accessor>
1613{
1614 this->accessor.copy_from(i.accessor);
1615 return *this;
1616}
1617
1618
1619template <typename Accessor>
1620template <class OtherAccessor>
1624{
1625 this->accessor.copy_from(i.accessor);
1626 return *this;
1627}
1628
1629
1630template <typename Accessor>
1633{
1634 this->accessor.copy_from(i.accessor);
1635# ifdef DEBUG
1636 // do this like this, because:
1637 // if we write
1638 // "Assert (IteratorState::past_the_end || !has_children())"
1639 // has_children() is called anyway, even if
1640 // state==IteratorState::past_the_end, and will then
1641 // throw the exception!
1642 if (this->state() != IteratorState::past_the_end)
1643 Assert(this->accessor.used() && this->accessor.has_children() == false,
1644 ExcAssignmentOfInactiveObject());
1645# endif
1646 return *this;
1647}
1648
1649
1650template <typename Accessor>
1651template <class OtherAccessor>
1654{
1655 this->accessor.copy_from(i.accessor);
1656# ifdef DEBUG
1657 // do this like this, because:
1658 // if we write
1659 // "Assert (IteratorState::past_the_end || !has_children())"
1660 // has_children() is called anyway, even if
1661 // state==IteratorState::past_the_end, and will then
1662 // throw the exception!
1663 if (this->state() != IteratorState::past_the_end)
1664 Assert(this->accessor.used() && this->accessor.has_children() == false,
1665 ExcAssignmentOfInactiveObject());
1666# endif
1667 return *this;
1668}
1669
1670
1671template <typename Accessor>
1672template <class OtherAccessor>
1675{
1676 this->accessor.copy_from(i.accessor);
1677# ifdef DEBUG
1678 // do this like this, because:
1679 // if we write
1680 // "Assert (IteratorState::past_the_end || !has_children())"
1681 // has_children() is called anyway, even if
1682 // state==IteratorState::past_the_end, and will then
1683 // throw the exception!
1684 if (this->state() != IteratorState::past_the_end)
1685 Assert(this->accessor.has_children() == false,
1686 ExcAssignmentOfInactiveObject());
1687# endif
1688 return *this;
1689}
1690
1691
1692template <typename Accessor>
1695{
1696 this->accessor.copy_from(i.accessor);
1697# ifdef DEBUG
1698 // do this like this, because:
1699 // if we write
1700 // "Assert (IteratorState::past_the_end || !has_children())"
1701 // has_children() is called anyway, even if
1702 // state==IteratorState::past_the_end, and will then
1703 // throw the exception!
1704 if (this->state() != IteratorState::past_the_end)
1705 Assert(this->accessor.has_children() == false,
1706 ExcAssignmentOfInactiveObject());
1707# endif
1708 return *this;
1709}
1710
1711
1712template <typename Accessor>
1715{
1717 (this->state() == IteratorState::valid))
1718 if (this->accessor.has_children() == false)
1719 return *this;
1720 return *this;
1721}
1722
1723
1724template <typename Accessor>
1727{
1729 operator++();
1730
1731 return tmp;
1732}
1733
1734
1735template <typename Accessor>
1738{
1740 (this->state() == IteratorState::valid))
1741 if (this->accessor.has_children() == false)
1742 return *this;
1743 return *this;
1744}
1745
1746
1747template <typename Accessor>
1750{
1752 operator--();
1753
1754 return tmp;
1755}
1756
1757#endif
1758
1760
1761#endif
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 &)
Accessor * pointer
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
Accessor AccessorType
bool operator!=(const TriaRawIterator &) const
TriaRawIterator operator++(int)
std::bidirectional_iterator_tag iterator_category
TriaRawIterator & operator++()
const Accessor & access_any() const
Accessor & reference
TriaRawIterator & operator--()
TriaRawIterator operator--(int)
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:498
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:175
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:499
unsigned int level
Definition grid_out.cc:4632
static ::ExceptionBase & ExcAssignmentOfUnusedObject()
#define DeclException0(Exception0)
Definition exceptions.h:466
static ::ExceptionBase & ExcAssignmentOfInactiveObject()
#define Assert(cond, exc)
static ::ExceptionBase & ExcAdvanceInvalidObject()
static ::ExceptionBase & ExcInvalidComparison()
#define DeclException1(Exception1, type1, outsequence)
Definition exceptions.h:511
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)