Reference documentation for deal.II version 8.5.1
tria_accessor.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 2016 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE at
12 // the top level of the deal.II distribution.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii__tria_accessor_h
17 #define dealii__tria_accessor_h
18 
19 
20 #include <deal.II/base/config.h>
21 #include <deal.II/base/exceptions.h>
22 #include <deal.II/base/geometry_info.h>
23 #include <deal.II/base/point.h>
24 #include <deal.II/grid/tria_iterator_base.h>
25 #include <deal.II/grid/tria_iterator_selector.h>
26 #include <deal.II/grid/cell_id.h>
27 
28 #include <utility>
29 
30 
31 DEAL_II_NAMESPACE_OPEN
32 
33 template <int dim, int spacedim> class Triangulation;
34 template <typename Accessor> class TriaRawIterator;
35 template <typename Accessor> class TriaIterator;
36 template <typename Accessor> class TriaActiveIterator;
37 
38 template <int dim, int spacedim> class Boundary;
39 template <int dim, int spacedim> class Manifold;
40 
41 
42 namespace internal
43 {
44  namespace Triangulation
45  {
46  template <int dim> class TriaObject;
47  template <typename G> class TriaObjects;
48  struct Implementation;
49  }
50 
51  namespace TriaAccessor
52  {
53  struct Implementation;
54 
60  template <int structdim, int dim> struct PresentLevelType
61  {
62  struct type
63  {
67  type ()
68  {}
69 
73  type (const int level)
74  {
75  Assert (level == 0, ExcInternalError());
76  (void)level; // removes -Wunused-parameter warning in optimized mode
77  }
78 
82  operator int () const
83  {
84  return 0;
85  }
86 
87  void operator ++ () const
88  {
89  Assert (false, ExcInternalError());
90  }
91 
92  void operator -- () const
93  {
94  Assert (false, ExcInternalError());
95  }
96  };
97  };
98 
99 
105  template <int dim> struct PresentLevelType<dim,dim>
106  {
107  typedef int type;
108  };
109 
110  }
111 }
112 template <int structdim, int dim, int spacedim> class TriaAccessor;
113 template <int dim, int spacedim> class TriaAccessor<0, dim, spacedim>;
114 template <int spacedim> class TriaAccessor<0, 1, spacedim>;
115 
116 // note: the file tria_accessor.templates.h is included at the end of
117 // this file. this includes a lot of templates. originally, this was
118 // only done in debug mode, but led to cyclic reduction problems and
119 // so is now on by default.
120 
121 
126 {
127 //TODO: Write documentation!
155 //TODO: Write documentation!
160 //TODO: Write documentation!
165  int,
166  << "You can only set the child index if the cell has no "
167  << "children, or clear it. The given "
168  << "index was " << arg1 << " (-1 means: clear children)");
169 //TODO: Write documentation!
174 //TODO: Write documentation!
179 //TODO: Write documentation!
184 //TODO: Write documentation!
189 //TODO: Write documentation!
194 //TODO: Write documentation!
214 //TODO: Write documentation!
219  int,
220  << "You can only set the child index of an even numbered child."
221  << "The number of the child given was " << arg1 << ".");
222 }
223 
224 
251 template <int structdim, int dim, int spacedim=dim>
252 class TriaAccessorBase
253 {
254 public:
260  static const unsigned int space_dimension = spacedim;
261 
267  static const unsigned int dimension = dim;
268 
274  static const unsigned int structure_dimension = structdim;
275 
276 protected:
282  typedef void AccessorData;
283 
288  const int level = -1,
289  const int index = -1,
290  const AccessorData * = 0);
291 
296 
304  void copy_from (const TriaAccessorBase &);
305 
310 
317  bool operator < (const TriaAccessorBase &other) const;
318 
319 protected:
329  void operator = (const TriaAccessorBase *);
330 
334  bool operator == (const TriaAccessorBase &) const;
335 
339  bool operator != (const TriaAccessorBase &) const;
340 
354  void operator ++ ();
355 
363  void operator -- ();
372  objects () const;
373 
374 public:
380  typedef void *LocalData;
381 
405  int level () const;
406 
433  int index () const;
434 
440 
446 
450 protected:
455  typename ::internal::TriaAccessor::PresentLevelType<structdim,dim>::type present_level;
456 
462 
467 
468 private:
469 
470  template <typename Accessor> friend class TriaRawIterator;
471  template <typename Accessor> friend class TriaIterator;
472  template <typename Accessor> friend class TriaActiveIterator;
473 };
474 
475 
476 
497 template <int structdim, int dim, int spacedim=dim>
498 class InvalidAccessor : public TriaAccessorBase<structdim,dim,spacedim>
499 {
500 public:
505 
513  InvalidAccessor (const Triangulation<dim,spacedim> *parent = 0,
514  const int level = -1,
515  const int index = -1,
516  const AccessorData *local_data = 0);
517 
526 
531  template <typename OtherAccessor>
532  InvalidAccessor (const OtherAccessor &);
533 
537  void copy_from (const InvalidAccessor &);
538 
542  bool operator == (const InvalidAccessor &) const;
543  bool operator != (const InvalidAccessor &) const;
544 
548  void operator ++ () const;
549  void operator -- () const;
550 
555  bool used () const;
556 
561  bool has_children () const;
562 };
563 
564 
565 
581 template <int structdim, int dim, int spacedim>
582 class TriaAccessor : public TriaAccessorBase<structdim, dim, spacedim>
583 {
584 public:
588  typedef
591 
595  TriaAccessor (const Triangulation<dim,spacedim> *parent = 0,
596  const int level = -1,
597  const int index = -1,
598  const AccessorData *local_data = 0);
599 
612  template <int structdim2, int dim2, int spacedim2>
614 
619  template <int structdim2, int dim2, int spacedim2>
621 
628  bool used () const;
629 
641  typename ::internal::Triangulation::Iterators<dim,spacedim>::vertex_iterator
642  vertex_iterator (const unsigned int i) const;
643 
659  unsigned int vertex_index (const unsigned int i) const;
660 
698  Point<spacedim> &vertex (const unsigned int i) const;
699 
703  typename ::internal::Triangulation::Iterators<dim,spacedim>::line_iterator
704  line (const unsigned int i) const;
705 
712  unsigned int line_index (const unsigned int i) const;
713 
717  typename ::internal::Triangulation::Iterators<dim,spacedim>::quad_iterator
718  quad (const unsigned int i) const;
719 
726  unsigned int quad_index (const unsigned int i) const;
749  bool face_orientation (const unsigned int face) const;
750 
760  bool face_flip (const unsigned int face) const;
761 
771  bool face_rotation (const unsigned int face) const;
772 
783  bool line_orientation (const unsigned int line) const;
798  bool has_children () const;
799 
804  unsigned int n_children() const;
805 
819  unsigned int number_of_children () const;
820 
834  unsigned int max_refinement_depth () const;
835 
840  child (const unsigned int i) const;
841 
851  isotropic_child (const unsigned int i) const;
852 
857 
863  int child_index (const unsigned int i) const;
864 
870  int isotropic_child_index (const unsigned int i) const;
893 
923  void set_boundary_id (const types::boundary_id) const;
924 
955  void set_all_boundary_ids (const types::boundary_id) const;
956 
964  bool at_boundary () const;
965 
971  const Boundary<dim,spacedim> &get_boundary () const;
972 
982  const Manifold<dim,spacedim> &get_manifold () const;
983 
1005 
1023  void set_manifold_id (const types::manifold_id) const;
1024 
1038  void set_all_manifold_ids (const types::manifold_id) const;
1039 
1056  bool user_flag_set () const;
1057 
1063  void set_user_flag () const;
1064 
1070  void clear_user_flag () const;
1071 
1077  void recursively_set_user_flag () const;
1078 
1084  void recursively_clear_user_flag () const;
1085 
1091  void clear_user_data () const;
1092 
1104  void set_user_pointer (void *p) const;
1105 
1111  void clear_user_pointer () const;
1112 
1128  void *user_pointer () const;
1129 
1151  void recursively_set_user_pointer (void *p) const;
1152 
1159  void recursively_clear_user_pointer () const;
1160 
1170  void set_user_index (const unsigned int p) const;
1171 
1177  void clear_user_index () const;
1178 
1190  unsigned int user_index () const;
1191 
1209  void recursively_set_user_index (const unsigned int p) const;
1210 
1219  void recursively_clear_user_index () const;
1238  double diameter () const;
1239 
1249  double extent_in_direction (const unsigned int axis) const;
1250 
1254  double minimum_vertex_distance () const;
1255 
1269  Point<spacedim> intermediate_point(const Point<structdim> &coordinates) const;
1270 
1289  Point<spacedim> center (const bool respect_manifold=false,
1290  const bool use_laplace_transformation=false) const;
1291 
1295  Point<spacedim> barycenter () const;
1296 
1322  double measure () const;
1323 
1338  bool
1340 
1346 private:
1350  void set_boundary_id_internal(const types::boundary_id id) const;
1351 
1356  void set (const ::internal::Triangulation::TriaObject<structdim> &o) const;
1357 
1365  void set_line_orientation (const unsigned int line,
1366  const bool orientation) const;
1367 
1378  void set_face_orientation (const unsigned int face,
1379  const bool orientation) const;
1380 
1387  void set_face_flip (const unsigned int face,
1388  const bool flip) const;
1389 
1396  void set_face_rotation (const unsigned int face,
1397  const bool rotation) const;
1398 
1402  void set_used_flag () const;
1403 
1407  void clear_used_flag () const;
1408 
1417  void set_refinement_case (const RefinementCase<structdim> &ref_case) const;
1418 
1426  void clear_refinement_case () const;
1427 
1434  void set_children (const unsigned int i, const int index) const;
1435 
1440  void clear_children () const;
1441 
1442 private:
1453  void operator = (const TriaAccessor &);
1454 
1455  template <int, int> friend class Triangulation;
1456 
1457  friend struct ::internal::Triangulation::Implementation;
1458  friend struct ::internal::TriaAccessor::Implementation;
1459 };
1460 
1461 
1462 
1463 
1464 
1465 
1479 template<int dim, int spacedim>
1480 class TriaAccessor<0, dim, spacedim>
1481 {
1482 public:
1488  static const unsigned int space_dimension = spacedim;
1489 
1495  static const unsigned int dimension = dim;
1496 
1502  static const unsigned int structure_dimension = 0;
1503 
1507  typedef void AccessorData;
1508 
1514  const unsigned int vertex_index);
1515 
1522  const int level = 0,
1523  const int index = 0,
1524  const AccessorData * = 0);
1525 
1529  template <int structdim2, int dim2, int spacedim2>
1531 
1535  template <int structdim2, int dim2, int spacedim2>
1537 
1542 
1547  static int level ();
1548 
1553  int index () const;
1554 
1564  void operator ++ ();
1565 
1569  void operator -- ();
1573  bool operator == (const TriaAccessor &) const;
1574 
1578  bool operator != (const TriaAccessor &) const;
1579 
1607  unsigned int vertex_index (const unsigned int i = 0) const;
1608 
1614  Point<spacedim> &vertex (const unsigned int i = 0) const;
1615 
1620  typename ::internal::Triangulation::Iterators<dim,spacedim>::line_iterator
1621  static line (const unsigned int);
1622 
1626  static unsigned int line_index (const unsigned int i);
1627 
1631  static
1632  typename ::internal::Triangulation::Iterators<dim,spacedim>::quad_iterator
1633  quad (const unsigned int i);
1634 
1638  static unsigned int quad_index (const unsigned int i);
1639 
1655  double diameter () const;
1656 
1664  double extent_in_direction (const unsigned int axis) const;
1665 
1673  Point<spacedim> center (const bool respect_manifold=false,
1674  const bool use_laplace_transformation=false) const;
1675 
1684  double measure () const;
1699  static bool face_orientation (const unsigned int face);
1700 
1704  static bool face_flip (const unsigned int face);
1705 
1709  static bool face_rotation (const unsigned int face);
1710 
1714  static bool line_orientation (const unsigned int line);
1715 
1730  static bool has_children ();
1731 
1736  static unsigned int n_children();
1737 
1742  static unsigned int number_of_children ();
1743 
1747  static unsigned int max_refinement_depth ();
1748 
1752  static
1754  child (const unsigned int);
1755 
1759  static
1761  isotropic_child (const unsigned int);
1762 
1766  static
1768 
1772  static
1773  int child_index (const unsigned int i);
1774 
1778  static
1779  int isotropic_child_index (const unsigned int i);
1787  bool used () const;
1788 
1789 protected:
1797  void copy_from (const TriaAccessor &);
1798 
1803 
1807  unsigned int global_vertex_index;
1808 
1809 private:
1810 
1811  template <typename Accessor> friend class TriaRawIterator;
1812  template <typename Accessor> friend class TriaIterator;
1813  template <typename Accessor> friend class TriaActiveIterator;
1814 };
1815 
1816 
1817 
1827 template <int spacedim>
1828 class TriaAccessor<0, 1, spacedim>
1829 {
1830 public:
1836  static const unsigned int space_dimension = spacedim;
1837 
1843  static const unsigned int dimension = 1;
1844 
1850  static const unsigned int structure_dimension = 0;
1851 
1855  typedef void AccessorData;
1856 
1862  {
1874  right_vertex
1875  };
1876 
1889  const VertexKind vertex_kind,
1890  const unsigned int vertex_index);
1891 
1898  const int = 0,
1899  const int = 0,
1900  const AccessorData * = 0);
1901 
1905  template <int structdim2, int dim2, int spacedim2>
1907 
1911  template <int structdim2, int dim2, int spacedim2>
1913 
1918  void copy_from (const TriaAccessor &);
1919 
1926 
1931  static int level ();
1932 
1937  int index () const;
1938 
1949  void operator ++ () const;
1950 
1955  void operator -- () const;
1959  bool operator == (const TriaAccessor &) const;
1960 
1964  bool operator != (const TriaAccessor &) const;
1965 
1992  unsigned int vertex_index (const unsigned int i = 0) const;
1993 
1999  Point<spacedim> &vertex (const unsigned int i = 0) const;
2000 
2005  Point<spacedim> center () const;
2006 
2011  typename ::internal::Triangulation::Iterators<1,spacedim>::line_iterator
2012  static line (const unsigned int);
2013 
2020  static unsigned int line_index (const unsigned int i);
2021 
2025  static
2026  typename ::internal::Triangulation::Iterators<1,spacedim>::quad_iterator
2027  quad (const unsigned int i);
2028 
2035  static unsigned int quad_index (const unsigned int i);
2036 
2046  bool at_boundary () const;
2047 
2063 
2071 
2072 
2083  static bool face_orientation (const unsigned int face);
2084 
2088  static bool face_flip (const unsigned int face);
2089 
2093  static bool face_rotation (const unsigned int face);
2094 
2098  static bool line_orientation (const unsigned int line);
2099 
2114  static bool has_children ();
2115 
2120  static unsigned int n_children();
2121 
2126  static unsigned int number_of_children ();
2127 
2131  static unsigned int max_refinement_depth ();
2132 
2136  static
2138  child (const unsigned int);
2139 
2143  static
2145  isotropic_child (const unsigned int);
2146 
2150  static
2152 
2156  static
2157  int child_index (const unsigned int i);
2158 
2162  static
2163  int isotropic_child_index (const unsigned int i);
2196  void
2198 
2205  void
2207 
2219  void
2221 
2233  void
2242  bool used () const;
2243 
2244 protected:
2249 
2255 
2259  unsigned int global_vertex_index;
2260 };
2261 
2262 
2263 
2264 
2281 template <int dim, int spacedim=dim>
2282 class CellAccessor : public TriaAccessor<dim,dim,spacedim>
2283 {
2284 public:
2289 
2294 
2306  const int level = -1,
2307  const int index = -1,
2308  const AccessorData *local_data = 0);
2309 
2313  CellAccessor (const TriaAccessor<dim,dim,spacedim> &cell_accessor);
2314 
2327  template <int structdim2, int dim2, int spacedim2>
2329 
2334  template <int structdim2, int dim2, int spacedim2>
2336 
2353  child (const unsigned int i) const;
2354 
2358  TriaIterator<TriaAccessor<dim-1,dim,spacedim> >
2359  face (const unsigned int i) const;
2360 
2370  unsigned int
2371  face_index (const unsigned int i) const;
2372 
2421  neighbor_child_on_subface (const unsigned int face_no,
2422  const unsigned int subface_no) const;
2423 
2446  neighbor (const unsigned int i) const;
2447 
2452  int neighbor_index (const unsigned int i) const;
2453 
2458  int neighbor_level (const unsigned int i) const;
2459 
2471  unsigned int neighbor_of_neighbor (const unsigned int neighbor) const;
2472 
2483  bool neighbor_is_coarser (const unsigned int neighbor) const;
2484 
2499  std::pair<unsigned int, unsigned int>
2500  neighbor_of_coarser_neighbor (const unsigned int neighbor) const;
2501 
2508  unsigned int neighbor_face_no (const unsigned int neighbor) const;
2509 
2523  bool has_periodic_neighbor(const unsigned int i) const;
2524 
2542  periodic_neighbor (const unsigned int i) const;
2543 
2552  neighbor_or_periodic_neighbor (const unsigned int i) const;
2553 
2569  periodic_neighbor_child_on_subface (const unsigned int face_no,
2570  const unsigned int subface_no) const;
2571 
2581  std::pair<unsigned int, unsigned int>
2582  periodic_neighbor_of_coarser_periodic_neighbor (const unsigned face_no) const;
2583 
2589  int
2590  periodic_neighbor_index (const unsigned int i) const;
2591 
2597  int
2598  periodic_neighbor_level (const unsigned int i) const;
2599 
2614  unsigned int
2615  periodic_neighbor_of_periodic_neighbor (const unsigned int i) const;
2616 
2622  unsigned int
2623  periodic_neighbor_face_no (const unsigned int i) const;
2624 
2631  bool
2632  periodic_neighbor_is_coarser (const unsigned int i) const;
2633 
2650  bool at_boundary (const unsigned int i) const;
2651 
2660  bool at_boundary () const;
2661 
2669  bool has_boundary_lines () const;
2696 
2715 
2719  void clear_refine_flag () const;
2720 
2728  bool flag_for_face_refinement (const unsigned int face_no,
2729  const RefinementCase<dim-1> &face_refinement_case=RefinementCase<dim-1>::isotropic_refinement) const;
2730 
2736  bool flag_for_line_refinement (const unsigned int line_no) const;
2737 
2746  ::internal::SubfaceCase<dim> subface_case(const unsigned int face_no) const;
2747 
2751  bool coarsen_flag_set () const;
2752 
2757  void set_coarsen_flag () const;
2758 
2762  void clear_coarsen_flag () const;
2786 
2798  void set_material_id (const types::material_id new_material_id) const;
2799 
2808  void recursively_set_material_id (const types::material_id new_material_id) const;
2835 
2851  void set_subdomain_id (const types::subdomain_id new_subdomain_id) const;
2852 
2858 
2863  void set_level_subdomain_id (const types::subdomain_id new_level_subdomain_id) const;
2864 
2865 
2881  void recursively_set_subdomain_id (const types::subdomain_id new_subdomain_id) const;
2899  bool direction_flag () const;
2900 
2926  unsigned int active_cell_index () const;
2927 
2935  int parent_index () const;
2936 
2943  parent () const;
2944 
2964  bool active () const;
2965 
2985  bool is_locally_owned () const;
2986 
2991  bool is_locally_owned_on_level () const;
2992 
3016  bool is_ghost () const;
3017 
3044  bool is_artificial () const;
3045 
3059  bool point_inside (const Point<spacedim> &p) const;
3060 
3069  void set_neighbor (const unsigned int i,
3070  const TriaIterator<CellAccessor<dim, spacedim> > &pointer) const;
3071 
3085  CellId id() const;
3086 
3104 
3105 protected:
3121  unsigned int neighbor_of_neighbor_internal (const unsigned int neighbor) const;
3122 
3128  template<int dim_,int spacedim_ >
3129  bool point_inside_codim(const Point<spacedim_> &p) const;
3130 
3131 
3132 
3133 private:
3138  void set_active_cell_index (const unsigned int active_cell_index);
3139 
3143  void set_parent (const unsigned int parent_index);
3144 
3151  void set_direction_flag (const bool new_direction_flag) const;
3162 
3163  template <int, int> friend class Triangulation;
3164 
3165  friend struct ::internal::Triangulation::Implementation;
3166 };
3167 
3168 
3169 
3170 /* -------------- declaration of explicit
3171  specializations and general templates ------------- */
3172 
3173 
3174 template <int structdim, int dim, int spacedim>
3175 template <typename OtherAccessor>
3177 InvalidAccessor (const OtherAccessor &)
3178 {
3179  Assert (false,
3180  ExcMessage ("You are attempting an illegal conversion between "
3181  "iterator/accessor types. The constructor you call "
3182  "only exists to make certain template constructs "
3183  "easier to write as dimension independent code but "
3184  "the conversion is not valid in the current context."));
3185 }
3186 
3187 
3188 
3189 template <int structdim, int dim, int spacedim>
3190 template <int structdim2, int dim2, int spacedim2>
3193 {
3194  Assert (false,
3195  ExcMessage ("You are attempting an illegal conversion between "
3196  "iterator/accessor types. The constructor you call "
3197  "only exists to make certain template constructs "
3198  "easier to write as dimension independent code but "
3199  "the conversion is not valid in the current context."));
3200 }
3201 
3202 
3203 
3204 template <int dim, int spacedim>
3205 template <int structdim2, int dim2, int spacedim2>
3208 {
3209  Assert (false,
3210  ExcMessage ("You are attempting an illegal conversion between "
3211  "iterator/accessor types. The constructor you call "
3212  "only exists to make certain template constructs "
3213  "easier to write as dimension independent code but "
3214  "the conversion is not valid in the current context."));
3215 }
3216 
3217 
3218 
3219 template <int structdim, int dim, int spacedim>
3220 template <int structdim2, int dim2, int spacedim2>
3223 {
3224  Assert (false,
3225  ExcMessage ("You are attempting an illegal conversion between "
3226  "iterator/accessor types. The constructor you call "
3227  "only exists to make certain template constructs "
3228  "easier to write as dimension independent code but "
3229  "the conversion is not valid in the current context."));
3230 }
3231 
3232 
3233 
3234 template <int dim, int spacedim>
3235 template <int structdim2, int dim2, int spacedim2>
3238 {
3239  Assert (false,
3240  ExcMessage ("You are attempting an illegal conversion between "
3241  "iterator/accessor types. The constructor you call "
3242  "only exists to make certain template constructs "
3243  "easier to write as dimension independent code but "
3244  "the conversion is not valid in the current context."));
3245 }
3246 
3247 
3248 #ifndef DOXYGEN
3249 
3250 template <> bool CellAccessor<1,1>::point_inside (const Point<1> &) const;
3251 template <> bool CellAccessor<2,2>::point_inside (const Point<2> &) const;
3252 template <> bool CellAccessor<3,3>::point_inside (const Point<3> &) const;
3253 template <> bool CellAccessor<1,2>::point_inside (const Point<2> &) const;
3254 template <> bool CellAccessor<1,3>::point_inside (const Point<3> &) const;
3255 template <> bool CellAccessor<2,3>::point_inside (const Point<3> &) const;
3256 // -------------------------------------------------------------------
3257 
3258 template <> void TriaAccessor<3,3,3>::set_all_manifold_ids (const types::manifold_id) const;
3259 
3260 #endif // DOXYGEN
3261 
3262 DEAL_II_NAMESPACE_CLOSE
3263 
3264 // include more templates in debug and optimized mode
3265 # include "tria_accessor.templates.h"
3266 
3267 #endif
unsigned int periodic_neighbor_of_periodic_neighbor(const unsigned int i) const
void clear_used_flag() const
TriaAccessor< dim, dim, spacedim >::AccessorData AccessorData
static ::ExceptionBase & ExcUnusedCellAsChild()
static ::ExceptionBase & ExcCellHasNoChildren()
bool point_inside_codim(const Point< spacedim_ > &p) const
void set_face_rotation(const unsigned int face, const bool rotation) const
TriaIterator< CellAccessor< dim, spacedim > > neighbor_or_periodic_neighbor(const unsigned int i) const
static ::ExceptionBase & ExcNeighborIsNotCoarser()
static ::ExceptionBase & ExcUnusedCellAsNeighbor()
void set_active_cell_index(const unsigned int active_cell_index)
void recursively_clear_user_pointer() const
unsigned int active_cell_index() const
bool operator==(const InvalidAccessor &) const
static ::ExceptionBase & ExcNeighborIsCoarser()
static ::ExceptionBase & ExcRefineCellNotActive()
unsigned int neighbor_of_neighbor_internal(const unsigned int neighbor) const
void set_neighbor(const unsigned int i, const TriaIterator< CellAccessor< dim, spacedim > > &pointer) const
unsigned int user_index() const
unsigned char material_id
Definition: types.h:130
int isotropic_child_index(const unsigned int i) const
const Triangulation< dim, spacedim > * tria
void * user_pointer() const
types::material_id material_id() const
bool at_boundary() const
TriaAccessorBase< structdim, dim, spacedim >::AccessorData AccessorData
bool flag_for_line_refinement(const unsigned int line_no) const
void set_line_orientation(const unsigned int line, const bool orientation) const
TriaIterator< TriaAccessor< dim-1, dim, spacedim > > face(const unsigned int i) const
void copy_from(const TriaAccessorBase &)
double extent_in_direction(const unsigned int axis) const
bool operator!=(const TriaAccessorBase &) const
unsigned int n_children() const
const Boundary< dim, spacedim > & get_boundary() const
void set_all_manifold_ids(const types::manifold_id) const
const Triangulation< 1, spacedim > * tria
void set_children(const unsigned int i, const int index) const
void clear_user_pointer() const
unsigned int line_index(const unsigned int i) const
static ::ExceptionBase & ExcFacesHaveNoLevel()
unsigned int face_index(const unsigned int i) const
TriaIterator< CellAccessor< dim, spacedim > > neighbor_child_on_subface(const unsigned int face_no, const unsigned int subface_no) const
bool neighbor_is_coarser(const unsigned int neighbor) const
bool has_children() const
void operator++() const
int level() const
unsigned int vertex_index(const unsigned int i) const
typename ::internal::Triangulation::Iterators< dim, spacedim >::vertex_iterator vertex_iterator(const unsigned int i) const
types::manifold_id manifold_id() const
bool is_locally_owned() const
bool is_translation_of(const TriaIterator< TriaAccessor< structdim, dim, spacedim > > &o) const
bool face_rotation(const unsigned int face) const
static ::ExceptionBase & ExcCellNotUsed()
void copy_from(const InvalidAccessor &)
bool at_boundary() const
void clear_user_data() const
TriaIterator< CellAccessor< dim, spacedim > > parent() const
static const unsigned int space_dimension
CellId id() const
void set_user_pointer(void *p) const
void set_boundary_id_internal(const types::boundary_id id) const
bool coarsen_flag_set() const
TriaIterator< CellAccessor< dim, spacedim > > neighbor(const unsigned int i) const
::internal::Triangulation::TriaObjects<::internal::Triangulation::TriaObject< structdim > > & objects() const
Definition: tria.h:52
TriaAccessorBase< structdim, dim, spacedim >::AccessorData AccessorData
static ::ExceptionBase & ExcMessage(std::string arg1)
bool has_periodic_neighbor(const unsigned int i) const
void recursively_set_user_flag() const
bool operator==(const TriaAccessorBase &) const
typename ::internal::Triangulation::Iterators< dim, spacedim >::quad_iterator quad(const unsigned int i) const
void set_coarsen_flag() const
void operator=(const CellAccessor< dim, spacedim > &)
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:564
void clear_user_flag() const
bool active() const
bool is_locally_owned_on_level() const
bool periodic_neighbor_is_coarser(const unsigned int i) const
static ::ExceptionBase & ExcCellFlaggedForCoarsening()
static ::ExceptionBase & ExcSetOnlyEvenChildren(int arg1)
#define Assert(cond, exc)
Definition: exceptions.h:313
std::pair< unsigned int, unsigned int > periodic_neighbor_of_coarser_periodic_neighbor(const unsigned face_no) const
Point< spacedim > & vertex(const unsigned int i) const
bool line_orientation(const unsigned int line) const
void set_material_id(const types::material_id new_material_id) const
TriaAccessor(const Triangulation< dim, spacedim > *parent=0, const int level=-1, const int index=-1, const AccessorData *local_data=0)
bool is_ghost() const
static ::ExceptionBase & ExcUncaughtCase()
const Triangulation< dim, spacedim > * tria
#define DeclException0(Exception0)
Definition: exceptions.h:541
void set_face_orientation(const unsigned int face, const bool orientation) const
unsigned int quad_index(const unsigned int i) const
TriaAccessorBase & operator=(const TriaAccessorBase &)
bool operator<(const TriaAccessorBase &other) const
RefinementCase< dim > refine_flag_set() const
int index() const
static ::ExceptionBase & ExcCellNotActive()
IteratorState::IteratorStates state() const
void set_refine_flag(const RefinementCase< dim > ref_case=RefinementCase< dim >::isotropic_refinement) const
typename ::internal::TriaAccessor::PresentLevelType< structdim, dim >::type present_level
static ::ExceptionBase & ExcNoPeriodicNeighbor()
static ::ExceptionBase & ExcCantSetChildren(int arg1)
void clear_refine_flag() const
Point< spacedim > center(const bool respect_manifold=false, const bool use_laplace_transformation=false) const
void recursively_set_material_id(const types::material_id new_material_id) const
unsigned int subdomain_id
Definition: types.h:42
void clear_children() const
void recursively_clear_user_index() const
TriaIterator< CellAccessor< dim, spacedim > > periodic_neighbor_child_on_subface(const unsigned int face_no, const unsigned int subface_no) const
void set_user_index(const unsigned int p) const
double minimum_vertex_distance() const
void clear_user_index() const
bool has_children() const
void recursively_clear_user_flag() const
Definition: cell_id.h:56
int parent_index() const
static ::ExceptionBase & ExcCellHasNoParent()
void set_all_boundary_ids(const types::boundary_id) const
bool is_artificial() const
types::boundary_id boundary_id() const
double diameter() const
int periodic_neighbor_level(const unsigned int i) const
void recursively_set_user_pointer(void *p) const
std::pair< unsigned int, unsigned int > neighbor_of_coarser_neighbor(const unsigned int neighbor) const
bool flag_for_face_refinement(const unsigned int face_no, const RefinementCase< dim-1 > &face_refinement_case=RefinementCase< dim-1 >::isotropic_refinement) const
void set_manifold_id(const types::manifold_id) const
unsigned int manifold_id
Definition: types.h:122
void recursively_set_subdomain_id(const types::subdomain_id new_subdomain_id) const
void set_boundary_id(const types::boundary_id) const
bool face_flip(const unsigned int face) const
::internal::SubfaceCase< dim > subface_case(const unsigned int face_no) const
int neighbor_level(const unsigned int i) const
bool point_inside(const Point< spacedim > &p) const
Point< spacedim > barycenter() const
bool used() const
void set_direction_flag(const bool new_direction_flag) const
static const unsigned int structure_dimension
unsigned int periodic_neighbor_face_no(const unsigned int i) const
CellAccessor(const Triangulation< dim, spacedim > *parent=0, const int level=-1, const int index=-1, const AccessorData *local_data=0)
int periodic_neighbor_index(const unsigned int i) const
TriaIterator< CellAccessor< dim, spacedim > > periodic_neighbor(const unsigned int i) const
unsigned int number_of_children() const
Triangulation< dim, spacedim > Container
void clear_refinement_case() const
int child_index(const unsigned int i) const
void set_parent(const unsigned int parent_index)
void clear_coarsen_flag() const
bool used() const
bool face_orientation(const unsigned int face) const
Point< spacedim > intermediate_point(const Point< structdim > &coordinates) const
bool direction_flag() const
InvalidAccessor(const Triangulation< dim, spacedim > *parent=0, const int level=-1, const int index=-1, const AccessorData *local_data=0)
int neighbor_index(const unsigned int i) const
const Triangulation< dim, spacedim > & get_triangulation() const
void set_level_subdomain_id(const types::subdomain_id new_level_subdomain_id) const
void recursively_set_user_index(const unsigned int p) const
TriaIterator< TriaAccessor< structdim, dim, spacedim > > isotropic_child(const unsigned int i) const
void set_subdomain_id(const types::subdomain_id new_subdomain_id) const
unsigned char boundary_id
Definition: types.h:110
types::subdomain_id level_subdomain_id() const
void set_user_flag() const
bool user_flag_set() const
void set_face_flip(const unsigned int face, const bool flip) const
unsigned int neighbor_face_no(const unsigned int neighbor) const
types::subdomain_id subdomain_id() const
static ::ExceptionBase & ExcCellFlaggedForRefinement()
static const unsigned int dimension
double measure() const
const Manifold< dim, spacedim > & get_manifold() const
void set_refinement_case(const RefinementCase< structdim > &ref_case) const
TriaAccessorBase(const Triangulation< dim, spacedim > *parent=0, const int level=-1, const int index=-1, const AccessorData *=0)
RefinementCase< structdim > refinement_case() const
void operator=(const TriaAccessor &)
typename ::internal::Triangulation::Iterators< dim, spacedim >::line_iterator line(const unsigned int i) const
unsigned int max_refinement_depth() const
static ::ExceptionBase & ExcDereferenceInvalidObject()
unsigned int neighbor_of_neighbor(const unsigned int neighbor) const
void set_used_flag() const
TriaIterator< CellAccessor< dim, spacedim > > child(const unsigned int i) const
bool has_boundary_lines() const
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcCantCompareIterators()
TriaIterator< TriaAccessor< structdim, dim, spacedim > > child(const unsigned int i) const