Reference documentation for deal.II version 9.2.0
\(\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\}}\)
tria.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 2020 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.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_tria_h
17 #define dealii_tria_h
18 
19 
20 #include <deal.II/base/config.h>
21 
24 #include <deal.II/base/point.h>
27 
30 
31 #include <boost/serialization/map.hpp>
32 #include <boost/serialization/split_member.hpp>
33 #include <boost/serialization/unique_ptr.hpp>
34 #include <boost/serialization/vector.hpp>
35 #include <boost/signals2.hpp>
36 
37 #include <bitset>
38 #include <functional>
39 #include <list>
40 #include <map>
41 #include <memory>
42 #include <numeric>
43 #include <vector>
44 
45 
47 
48 // Forward declarations
49 #ifndef DOXYGEN
50 template <int dim, int spacedim>
51 class Manifold;
52 
53 template <int dim>
54 struct CellData;
55 
56 struct SubCellData;
57 
59 {
60  template <int, int>
61  struct Description;
62 }
63 
64 namespace GridTools
65 {
66  template <typename CellIterator>
67  struct PeriodicFacePair;
68 }
69 
70 template <int, int, int>
71 class TriaAccessor;
72 template <int spacedim>
73 class TriaAccessor<0, 1, spacedim>;
74 template <int, int, int>
75 class TriaAccessorBase;
76 
77 namespace internal
78 {
79  namespace TriangulationImplementation
80  {
81  template <int dim>
82  class TriaLevel;
83  template <int dim>
84  class TriaFaces;
85 
86  template <typename>
87  class TriaObjects;
88 
94  struct Implementation;
95  } // namespace TriangulationImplementation
96 
97  namespace TriaAccessorImplementation
98  {
99  struct Implementation;
100  }
101 } // namespace internal
102 
103 namespace hp
104 {
105  template <int dim, int spacedim>
106  class DoFHandler;
107 }
108 #endif
109 
110 
111 /*------------------------------------------------------------------------*/
112 
113 
114 namespace internal
115 {
120  namespace TriangulationImplementation
121  {
135  template <int dim>
136  struct NumberCache
137  {};
138 
152  template <>
153  struct NumberCache<1>
154  {
158  unsigned int n_levels;
159 
163  unsigned int n_lines;
164 
168  std::vector<unsigned int> n_lines_level;
169 
173  unsigned int n_active_lines;
174 
178  std::vector<unsigned int> n_active_lines_level;
179 
183  NumberCache();
184 
189  std::size_t
190  memory_consumption() const;
191 
196  template <class Archive>
197  void
198  serialize(Archive &ar, const unsigned int version);
199  };
200 
201 
216  template <>
217  struct NumberCache<2> : public NumberCache<1>
218  {
222  unsigned int n_quads;
223 
227  std::vector<unsigned int> n_quads_level;
228 
232  unsigned int n_active_quads;
233 
237  std::vector<unsigned int> n_active_quads_level;
238 
242  NumberCache();
243 
248  std::size_t
249  memory_consumption() const;
250 
255  template <class Archive>
256  void
257  serialize(Archive &ar, const unsigned int version);
258  };
259 
260 
276  template <>
277  struct NumberCache<3> : public NumberCache<2>
278  {
282  unsigned int n_hexes;
283 
287  std::vector<unsigned int> n_hexes_level;
288 
292  unsigned int n_active_hexes;
293 
297  std::vector<unsigned int> n_active_hexes_level;
298 
302  NumberCache();
303 
308  std::size_t
309  memory_consumption() const;
310 
315  template <class Archive>
316  void
317  serialize(Archive &ar, const unsigned int version);
318  };
319  } // namespace TriangulationImplementation
320 } // namespace internal
321 
322 
323 /*------------------------------------------------------------------------*/
324 
325 
1108 template <int dim, int spacedim = dim>
1110 {
1111 private:
1116  using IteratorSelector =
1118 
1119 public:
1125  {
1130  none = 0x0,
1305 
1319 
1326  };
1327 
1344 
1362 
1376  using face_iterator = TriaIterator<TriaAccessor<dim - 1, dim, spacedim>>;
1377 
1389  using active_face_iterator =
1390  TriaActiveIterator<TriaAccessor<dim - 1, dim, spacedim>>;
1391 
1401 
1414  using active_vertex_iterator =
1416 
1424  using line_iterator = typename IteratorSelector::line_iterator;
1425 
1439  using active_line_iterator = typename IteratorSelector::active_line_iterator;
1440 
1448  using quad_iterator = typename IteratorSelector::quad_iterator;
1449 
1463  using active_quad_iterator = typename IteratorSelector::active_quad_iterator;
1464 
1472  using hex_iterator = typename IteratorSelector::hex_iterator;
1473 
1483  using active_hex_iterator = typename IteratorSelector::active_hex_iterator;
1484 
1504  {
1511  virtual ~DistortedCellList() noexcept override = default;
1512 
1517  std::list<typename Triangulation<dim, spacedim>::cell_iterator>
1519  };
1520 
1524  static const unsigned int dimension = dim;
1525 
1529  static const unsigned int space_dimension = spacedim;
1530 
1546  const bool check_for_distorted_cells = false);
1547 
1563  Triangulation(const Triangulation<dim, spacedim> &) = delete;
1564 
1572 
1576  Triangulation &
1577  operator=(Triangulation<dim, spacedim> &&tria) noexcept;
1578 
1582  virtual ~Triangulation() override;
1583 
1590  virtual void
1591  clear();
1592 
1598  virtual void
1599  set_mesh_smoothing(const MeshSmoothing mesh_smoothing);
1600 
1604  virtual const MeshSmoothing &
1605  get_mesh_smoothing() const;
1606 
1629  void
1630  set_manifold(const types::manifold_id number,
1631  const Manifold<dim, spacedim> &manifold_object);
1632 
1645  void
1646  reset_manifold(const types::manifold_id manifold_number);
1647 
1659  void
1661 
1670  void
1672 
1681  void
1683 
1693  void
1695  const types::manifold_id number);
1696 
1706  const Manifold<dim, spacedim> &
1707  get_manifold(const types::manifold_id number) const;
1708 
1721  virtual std::vector<types::boundary_id>
1722  get_boundary_ids() const;
1723 
1736  virtual std::vector<types::manifold_id>
1737  get_manifold_ids() const;
1738 
1765  virtual void
1767 
1813  virtual void
1814  create_triangulation(const std::vector<Point<spacedim>> &vertices,
1815  const std::vector<CellData<dim>> & cells,
1816  const SubCellData & subcelldata);
1817 
1827  virtual void
1830  &construction_data);
1831 
1840  virtual void
1842  const std::vector<Point<spacedim>> &vertices,
1843  const std::vector<CellData<dim>> & cells,
1844  const SubCellData & subcelldata);
1845 
1852  void
1854 
1866  void
1868 
1883  void
1884  refine_global(const unsigned int times = 1);
1885 
1917  virtual void
1919 
1949  virtual bool
1951 
1952  /*
1953  * @}
1954  */
1955 
1970  {
1988  };
1989 
1995  template <typename T>
1997  {
1998  using result_type = T;
1999 
2000  template <typename InputIterator>
2001  T
2002  operator()(InputIterator first, InputIterator last) const
2003  {
2004  return std::accumulate(first, last, T());
2005  }
2006  };
2007 
2017  struct Signals
2018  {
2026  boost::signals2::signal<void()> create;
2027 
2035  boost::signals2::signal<void()> pre_refinement;
2036 
2042  boost::signals2::signal<void()> post_refinement;
2043 
2050  boost::signals2::signal<void()> pre_partition;
2051 
2059  boost::signals2::signal<void()> mesh_movement;
2060 
2068  boost::signals2::signal<void(
2069  const typename Triangulation<dim, spacedim>::cell_iterator &cell)>
2071 
2078  boost::signals2::signal<void(
2079  const typename Triangulation<dim, spacedim>::cell_iterator &cell)>
2081 
2088  boost::signals2::signal<void(
2089  const Triangulation<dim, spacedim> &destination_tria)>
2091 
2105  boost::signals2::signal<void()> clear;
2106 
2116  boost::signals2::signal<void()> any_change;
2117 
2141  boost::signals2::signal<unsigned int(const cell_iterator &,
2142  const CellStatus),
2145 
2157  boost::signals2::signal<void()> pre_distributed_refinement;
2158 
2167  boost::signals2::signal<void()> post_distributed_refinement;
2168 
2179  boost::signals2::signal<void()> pre_distributed_repartition;
2180 
2186  boost::signals2::signal<void()> post_distributed_repartition;
2187 
2194  boost::signals2::signal<void()> pre_distributed_save;
2195 
2201  boost::signals2::signal<void()> post_distributed_save;
2202 
2209  boost::signals2::signal<void()> pre_distributed_load;
2210 
2216  boost::signals2::signal<void()> post_distributed_load;
2217  };
2218 
2222  mutable Signals signals;
2223 
2224  /*
2225  * @}
2226  */
2227 
2237  void
2238  save_refine_flags(std::ostream &out) const;
2239 
2243  void
2244  save_refine_flags(std::vector<bool> &v) const;
2245 
2249  void
2250  load_refine_flags(std::istream &in);
2251 
2255  void
2256  load_refine_flags(const std::vector<bool> &v);
2257 
2261  void
2262  save_coarsen_flags(std::ostream &out) const;
2263 
2267  void
2268  save_coarsen_flags(std::vector<bool> &v) const;
2269 
2273  void
2274  load_coarsen_flags(std::istream &out);
2275 
2279  void
2280  load_coarsen_flags(const std::vector<bool> &v);
2281 
2286  bool
2288 
2289  /*
2290  * @}
2291  */
2292 
2302  void
2303  clear_user_flags();
2304 
2310  void
2311  save_user_flags(std::ostream &out) const;
2312 
2318  void
2319  save_user_flags(std::vector<bool> &v) const;
2320 
2325  void
2326  load_user_flags(std::istream &in);
2327 
2332  void
2333  load_user_flags(const std::vector<bool> &v);
2334 
2339  void
2341 
2346  void
2347  save_user_flags_line(std::ostream &out) const;
2348 
2354  void
2355  save_user_flags_line(std::vector<bool> &v) const;
2356 
2361  void
2362  load_user_flags_line(std::istream &in);
2363 
2368  void
2369  load_user_flags_line(const std::vector<bool> &v);
2370 
2375  void
2377 
2382  void
2383  save_user_flags_quad(std::ostream &out) const;
2384 
2390  void
2391  save_user_flags_quad(std::vector<bool> &v) const;
2392 
2397  void
2398  load_user_flags_quad(std::istream &in);
2399 
2404  void
2405  load_user_flags_quad(const std::vector<bool> &v);
2406 
2407 
2412  void
2414 
2419  void
2420  save_user_flags_hex(std::ostream &out) const;
2421 
2427  void
2428  save_user_flags_hex(std::vector<bool> &v) const;
2429 
2434  void
2435  load_user_flags_hex(std::istream &in);
2436 
2441  void
2442  load_user_flags_hex(const std::vector<bool> &v);
2443 
2449  void
2450  clear_user_data();
2451 
2457  void
2458  save_user_indices(std::vector<unsigned int> &v) const;
2459 
2464  void
2465  load_user_indices(const std::vector<unsigned int> &v);
2466 
2472  void
2473  save_user_pointers(std::vector<void *> &v) const;
2474 
2479  void
2480  load_user_pointers(const std::vector<void *> &v);
2481 
2487  void
2488  save_user_indices_line(std::vector<unsigned int> &v) const;
2489 
2494  void
2495  load_user_indices_line(const std::vector<unsigned int> &v);
2496 
2502  void
2503  save_user_indices_quad(std::vector<unsigned int> &v) const;
2504 
2509  void
2510  load_user_indices_quad(const std::vector<unsigned int> &v);
2511 
2517  void
2518  save_user_indices_hex(std::vector<unsigned int> &v) const;
2519 
2524  void
2525  load_user_indices_hex(const std::vector<unsigned int> &v);
2531  void
2532  save_user_pointers_line(std::vector<void *> &v) const;
2533 
2538  void
2539  load_user_pointers_line(const std::vector<void *> &v);
2540 
2546  void
2547  save_user_pointers_quad(std::vector<void *> &v) const;
2548 
2553  void
2554  load_user_pointers_quad(const std::vector<void *> &v);
2555 
2561  void
2562  save_user_pointers_hex(std::vector<void *> &v) const;
2563 
2568  void
2569  load_user_pointers_hex(const std::vector<void *> &v);
2570 
2571  /*
2572  * @}
2573  */
2574 
2598  begin(const unsigned int level = 0) const;
2599 
2631  begin_active(const unsigned int level = 0) const;
2632 
2638  end() const;
2639 
2659  end(const unsigned int level) const;
2660 
2681  end_active(const unsigned int level) const;
2682 
2683 
2688  last() const;
2689 
2694  last_active() const;
2695 
2711  cell_iterators() const;
2712 
2749  active_cell_iterators() const;
2750 
2767  cell_iterators_on_level(const unsigned int level) const;
2768 
2785  active_cell_iterators_on_level(const unsigned int level) const;
2786 
2787  /*
2788  * @}
2789  */
2790 
2791  /*-------------------------------------------------------------------------*/
2792 
2802  begin_face() const;
2803 
2808  begin_active_face() const;
2809 
2815  end_face() const;
2816 
2836  active_face_iterators() const;
2837 
2838  /*
2839  * @}
2840  */
2841 
2842  /*-------------------------------------------------------------------------*/
2843 
2854  begin_vertex() const;
2855 
2862  begin_active_vertex() const;
2863 
2870  end_vertex() const;
2871 
2872  /*
2873  * @}
2874  */
2875 
2893  unsigned int
2894  n_lines() const;
2895 
2899  unsigned int
2900  n_lines(const unsigned int level) const;
2901 
2905  unsigned int
2906  n_active_lines() const;
2907 
2911  unsigned int
2912  n_active_lines(const unsigned int level) const;
2913 
2917  unsigned int
2918  n_quads() const;
2919 
2923  unsigned int
2924  n_quads(const unsigned int level) const;
2925 
2929  unsigned int
2930  n_active_quads() const;
2931 
2935  unsigned int
2936  n_active_quads(const unsigned int level) const;
2937 
2941  unsigned int
2942  n_hexs() const;
2943 
2948  unsigned int
2949  n_hexs(const unsigned int level) const;
2950 
2954  unsigned int
2955  n_active_hexs() const;
2956 
2961  unsigned int
2962  n_active_hexs(const unsigned int level) const;
2963 
2968  unsigned int
2969  n_cells() const;
2970 
2975  unsigned int
2976  n_cells(const unsigned int level) const;
2977 
2982  unsigned int
2983  n_active_cells() const;
2984 
2992  virtual types::global_cell_index
2993  n_global_active_cells() const;
2994 
2995 
3000  unsigned int
3001  n_active_cells(const unsigned int level) const;
3002 
3008  unsigned int
3009  n_faces() const;
3010 
3016  unsigned int
3017  n_active_faces() const;
3018 
3036  unsigned int
3037  n_levels() const;
3038 
3045  virtual unsigned int
3046  n_global_levels() const;
3047 
3057  virtual bool
3058  has_hanging_nodes() const;
3059 
3067  unsigned int
3068  n_vertices() const;
3069 
3078  const std::vector<Point<spacedim>> &
3079  get_vertices() const;
3080 
3085  unsigned int
3086  n_used_vertices() const;
3087 
3091  bool
3092  vertex_used(const unsigned int index) const;
3093 
3098  const std::vector<bool> &
3099  get_used_vertices() const;
3100 
3112  unsigned int
3113  max_adjacent_cells() const;
3114 
3121  virtual types::subdomain_id
3122  locally_owned_subdomain() const;
3123 
3135 
3141  get_triangulation() const;
3142 
3143 
3144  /*
3145  * @}
3146  */
3147 
3162  unsigned int
3163  n_raw_lines() const;
3164 
3174  unsigned int
3175  n_raw_lines(const unsigned int level) const;
3176 
3186  unsigned int
3187  n_raw_quads() const;
3188 
3198  unsigned int
3199  n_raw_quads(const unsigned int level) const;
3200 
3210  unsigned int
3211  n_raw_hexs(const unsigned int level) const;
3212 
3222  unsigned int
3223  n_raw_cells(const unsigned int level) const;
3224 
3236  unsigned int
3237  n_raw_faces() const;
3238 
3239  /*
3240  * @}
3241  */
3242 
3251  virtual std::size_t
3252  memory_consumption() const;
3253 
3262  template <class Archive>
3263  void
3264  save(Archive &ar, const unsigned int version) const;
3265 
3281  template <class Archive>
3282  void
3283  load(Archive &ar, const unsigned int version);
3284 
3285 
3301  virtual void
3303  const std::vector<GridTools::PeriodicFacePair<cell_iterator>> &);
3304 
3308  const std::map<
3309  std::pair<cell_iterator, unsigned int>,
3310  std::pair<std::pair<cell_iterator, unsigned int>, std::bitset<3>>> &
3311  get_periodic_face_map() const;
3312 
3313 #ifdef DOXYGEN
3314 
3318  template <class Archive>
3319  void
3320  serialize(Archive &archive, const unsigned int version);
3321 #else
3322  // This macro defines the serialize() method that is compatible with
3323  // the templated save() and load() method that have been implemented.
3324  BOOST_SERIALIZATION_SPLIT_MEMBER()
3325 #endif
3326 
3338  int,
3339  int,
3340  << "You are requesting information from refinement level "
3341  << arg1
3342  << " of a triangulation, but this triangulation only has "
3343  << arg2 << " refinement levels. The given level " << arg1
3344  << " must be *less* than " << arg2 << ".");
3353  int,
3354  int,
3355  << "You are trying to perform an operation on a triangulation "
3356  << "that is only allowed if the triangulation is currently empty. "
3357  << "However, it currently stores " << arg1 << " vertices and has "
3358  << "cells on " << arg2 << " levels.");
3376  int,
3377  << "You tried to do something on level " << arg1
3378  << ", but this level is empty.");
3385 
3395  << "The given boundary_id " << arg1
3396  << " is not defined in this Triangulation!");
3397 
3405  "A cell is flagged for coarsening, but either not all of its siblings "
3406  "are active or flagged for coarsening as well. Please clean up all "
3407  "coarsen flags on your triangulation via "
3408  "Triangulation::prepare_coarsening_and_refinement() beforehand!");
3409 
3410  /*
3411  * @}
3412  */
3413 
3414 protected:
3420 
3434  static void
3435  write_bool_vector(const unsigned int magic_number1,
3436  const std::vector<bool> &v,
3437  const unsigned int magic_number2,
3438  std::ostream & out);
3439 
3444  static void
3445  read_bool_vector(const unsigned int magic_number1,
3446  std::vector<bool> &v,
3447  const unsigned int magic_number2,
3448  std::istream & in);
3449 
3454  void
3456 
3457 
3458 private:
3465  std::vector<GridTools::PeriodicFacePair<cell_iterator>>
3467 
3472  std::map<std::pair<cell_iterator, unsigned int>,
3473  std::pair<std::pair<cell_iterator, unsigned int>, std::bitset<3>>>
3475 
3490  using raw_face_iterator =
3491  TriaRawIterator<TriaAccessor<dim - 1, dim, spacedim>>;
3492  using raw_vertex_iterator =
3494  using raw_line_iterator = typename IteratorSelector::raw_line_iterator;
3495  using raw_quad_iterator = typename IteratorSelector::raw_quad_iterator;
3496  using raw_hex_iterator = typename IteratorSelector::raw_hex_iterator;
3497 
3503  begin_raw(const unsigned int level = 0) const;
3504 
3510  end_raw(const unsigned int level) const;
3511 
3512  /*
3513  * @}
3514  */
3515 
3528  begin_raw_line(const unsigned int level = 0) const;
3529 
3548  begin_line(const unsigned int level = 0) const;
3549 
3568  begin_active_line(const unsigned int level = 0) const;
3569 
3575  end_line() const;
3576 
3577  /*
3578  * @}
3579  */
3580 
3606  begin_raw_quad(const unsigned int level = 0) const;
3607 
3626  begin_quad(const unsigned int level = 0) const;
3627 
3646  begin_active_quad(const unsigned int level = 0) const;
3647 
3653  end_quad() const;
3654 
3655  /*
3656  * @}
3657  */
3658 
3683  begin_raw_hex(const unsigned int level = 0) const;
3684 
3702  hex_iterator
3703  begin_hex(const unsigned int level = 0) const;
3704 
3723  begin_active_hex(const unsigned int level = 0) const;
3724 
3729  hex_iterator
3730  end_hex() const;
3731 
3732  /*
3733  * @}
3734  */
3735 
3736 
3750  void
3752 
3759  void
3761 
3775  DistortedCellList
3777 
3784  void
3786 
3791  void
3793 
3807  virtual unsigned int
3810 
3811 
3824  virtual types::coarse_cell_id
3826  const unsigned int coarse_cell_index) const;
3827 
3832  std::vector<std::unique_ptr<
3835 
3841  std::unique_ptr<::internal::TriangulationImplementation::TriaFaces<dim>>
3843 
3844 
3848  std::vector<Point<spacedim>> vertices;
3849 
3853  std::vector<bool> vertices_used;
3854 
3859  std::map<types::manifold_id, std::unique_ptr<const Manifold<dim, spacedim>>>
3861 
3866 
3867 
3873 
3884 
3899  std::unique_ptr<std::map<unsigned int, types::boundary_id>>
3901 
3902 
3922  std::unique_ptr<std::map<unsigned int, types::manifold_id>>
3924 
3925  // make a couple of classes friends
3926  template <int, int, int>
3927  friend class TriaAccessorBase;
3928  template <int, int, int>
3929  friend class TriaAccessor;
3930  friend class TriaAccessor<0, 1, spacedim>;
3931 
3932  friend class CellAccessor<dim, spacedim>;
3933 
3934  friend struct ::internal::TriaAccessorImplementation::Implementation;
3935 
3936  friend class hp::DoFHandler<dim, spacedim>;
3937 
3938  friend struct ::internal::TriangulationImplementation::Implementation;
3939 
3940  template <typename>
3941  friend class ::internal::TriangulationImplementation::TriaObjects;
3942 
3943  friend class CellId;
3944 
3945  // explicitly check for sensible template arguments, but not on windows
3946  // because MSVC creates bogus warnings during normal compilation
3947 #ifndef DEAL_II_MSVC
3948  static_assert(dim <= spacedim,
3949  "The dimension <dim> of a Triangulation must be less than or "
3950  "equal to the space dimension <spacedim> in which it lives.");
3951 #endif
3952 };
3953 
3954 
3955 #ifndef DOXYGEN
3956 
3957 
3958 
3959 namespace internal
3960 {
3961  namespace TriangulationImplementation
3962  {
3963  template <class Archive>
3964  void
3965  NumberCache<1>::serialize(Archive &ar, const unsigned int)
3966  {
3967  ar &n_levels;
3968  ar &n_lines &n_lines_level;
3969  ar &n_active_lines &n_active_lines_level;
3970  }
3971 
3972 
3973  template <class Archive>
3974  void
3975  NumberCache<2>::serialize(Archive &ar, const unsigned int version)
3976  {
3977  this->NumberCache<1>::serialize(ar, version);
3978 
3979  ar &n_quads &n_quads_level;
3980  ar &n_active_quads &n_active_quads_level;
3981  }
3982 
3983 
3984  template <class Archive>
3985  void
3986  NumberCache<3>::serialize(Archive &ar, const unsigned int version)
3987  {
3988  this->NumberCache<2>::serialize(ar, version);
3989 
3990  ar &n_hexes &n_hexes_level;
3991  ar &n_active_hexes &n_active_hexes_level;
3992  }
3993 
3994  } // namespace TriangulationImplementation
3995 } // namespace internal
3996 
3997 
3998 template <int dim, int spacedim>
3999 inline bool
4000 Triangulation<dim, spacedim>::vertex_used(const unsigned int index) const
4001 {
4002  AssertIndexRange(index, vertices_used.size());
4003  return vertices_used[index];
4004 }
4005 
4006 
4007 
4008 template <int dim, int spacedim>
4009 inline unsigned int
4011 {
4012  return number_cache.n_levels;
4013 }
4014 
4015 template <int dim, int spacedim>
4016 inline unsigned int
4018 {
4019  return number_cache.n_levels;
4020 }
4021 
4022 
4023 template <int dim, int spacedim>
4024 inline unsigned int
4026 {
4027  return vertices.size();
4028 }
4029 
4030 
4031 
4032 template <int dim, int spacedim>
4033 inline const std::vector<Point<spacedim>> &
4035 {
4036  return vertices;
4037 }
4038 
4039 
4040 template <int dim, int spacedim>
4041 template <class Archive>
4042 void
4043 Triangulation<dim, spacedim>::save(Archive &ar, const unsigned int) const
4044 {
4045  // as discussed in the documentation, do not store the signals as
4046  // well as boundary and manifold description but everything else
4047  ar &smooth_grid;
4048 
4049  unsigned int n_levels = levels.size();
4050  ar & n_levels;
4051  for (unsigned int i = 0; i < levels.size(); ++i)
4052  ar &levels[i];
4053 
4054  // boost dereferences a nullptr when serializing a nullptr
4055  // at least up to 1.65.1. This causes problems with clang-5.
4056  // Therefore, work around it.
4057  bool faces_is_nullptr = (faces.get() == nullptr);
4058  ar & faces_is_nullptr;
4059  if (!faces_is_nullptr)
4060  ar &faces;
4061 
4062  ar &vertices;
4063  ar &vertices_used;
4064 
4065  ar &anisotropic_refinement;
4066  ar &number_cache;
4067 
4068  ar &check_for_distorted_cells;
4069 
4070  if (dim == 1)
4071  {
4072  ar &vertex_to_boundary_id_map_1d;
4073  ar &vertex_to_manifold_id_map_1d;
4074  }
4075 }
4076 
4077 
4078 
4079 template <int dim, int spacedim>
4080 template <class Archive>
4081 void
4082 Triangulation<dim, spacedim>::load(Archive &ar, const unsigned int)
4083 {
4084  // clear previous content. this also calls the respective signal
4085  clear();
4086 
4087  // as discussed in the documentation, do not store the signals as
4088  // well as boundary and manifold description but everything else
4089  ar &smooth_grid;
4090 
4091  unsigned int size;
4092  ar & size;
4093  levels.resize(size);
4094  for (unsigned int i = 0; i < levels.size(); ++i)
4095  {
4096  std::unique_ptr<internal::TriangulationImplementation::TriaLevel<dim>>
4097  level;
4098  ar &level;
4099  levels[i] = std::move(level);
4100  }
4101 
4102  // Workaround for nullptr, see in save().
4103  bool faces_is_nullptr = true;
4104  ar & faces_is_nullptr;
4105  if (!faces_is_nullptr)
4106  ar &faces;
4107 
4108  ar &vertices;
4109  ar &vertices_used;
4110 
4111  ar &anisotropic_refinement;
4112  ar &number_cache;
4113 
4114  // the levels do not serialize the active_cell_indices because
4115  // they are easy enough to rebuild upon re-loading data. do
4116  // this here. don't forget to first resize the fields appropriately
4117  {
4118  for (unsigned int l = 0; l < levels.size(); ++l)
4119  levels[l]->active_cell_indices.resize(levels[l]->refine_flags.size());
4120  reset_active_cell_indices();
4121  }
4122 
4123 
4124  bool my_check_for_distorted_cells;
4125  ar & my_check_for_distorted_cells;
4126 
4127  Assert(my_check_for_distorted_cells == check_for_distorted_cells,
4128  ExcMessage("The triangulation loaded into here must have the "
4129  "same setting with regard to reporting distorted "
4130  "cell as the one previously stored."));
4131 
4132  if (dim == 1)
4133  {
4134  ar &vertex_to_boundary_id_map_1d;
4135  ar &vertex_to_manifold_id_map_1d;
4136  }
4137 
4138  // trigger the create signal to indicate
4139  // that new content has been imported into
4140  // the triangulation
4141  signals.create();
4142 }
4143 
4144 
4145 
4146 template <int dim, int spacedim>
4147 inline unsigned int
4150 {
4151  return coarse_cell_id;
4152 }
4153 
4154 
4155 
4156 template <int dim, int spacedim>
4157 inline types::coarse_cell_id
4159  const unsigned int coarse_cell_index) const
4160 {
4161  return coarse_cell_index;
4162 }
4163 
4164 
4165 
4166 /* -------------- declaration of explicit specializations ------------- */
4167 
4168 template <>
4169 unsigned int
4170 Triangulation<1, 1>::n_raw_lines(const unsigned int level) const;
4171 template <>
4172 unsigned int
4174 template <>
4175 unsigned int
4176 Triangulation<1, 1>::n_quads(const unsigned int level) const;
4177 template <>
4178 unsigned int
4179 Triangulation<1, 1>::n_raw_quads(const unsigned int level) const;
4180 template <>
4181 unsigned int
4182 Triangulation<2, 2>::n_raw_quads(const unsigned int level) const;
4183 template <>
4184 unsigned int
4185 Triangulation<1, 1>::n_raw_hexs(const unsigned int level) const;
4186 template <>
4187 unsigned int
4188 Triangulation<1, 1>::n_active_quads(const unsigned int level) const;
4189 template <>
4190 unsigned int
4192 template <>
4193 unsigned int
4195 
4196 
4197 // -------------------------------------------------------------------
4198 // -- Explicit specializations for codimension one grids
4199 
4200 
4201 template <>
4202 unsigned int
4203 Triangulation<1, 2>::n_raw_lines(const unsigned int level) const;
4204 template <>
4205 unsigned int
4207 template <>
4208 unsigned int
4209 Triangulation<1, 2>::n_quads(const unsigned int level) const;
4210 template <>
4211 unsigned int
4212 Triangulation<1, 2>::n_raw_quads(const unsigned int level) const;
4213 template <>
4214 unsigned int
4215 Triangulation<2, 3>::n_raw_quads(const unsigned int level) const;
4216 template <>
4217 unsigned int
4218 Triangulation<1, 2>::n_raw_hexs(const unsigned int level) const;
4219 template <>
4220 unsigned int
4221 Triangulation<1, 2>::n_active_quads(const unsigned int level) const;
4222 template <>
4223 unsigned int
4225 template <>
4226 unsigned int
4228 
4229 // -------------------------------------------------------------------
4230 // -- Explicit specializations for codimension two grids
4231 
4232 
4233 template <>
4234 unsigned int
4235 Triangulation<1, 3>::n_raw_lines(const unsigned int level) const;
4236 template <>
4237 unsigned int
4239 template <>
4240 unsigned int
4241 Triangulation<1, 3>::n_quads(const unsigned int level) const;
4242 template <>
4243 unsigned int
4244 Triangulation<1, 3>::n_raw_quads(const unsigned int level) const;
4245 template <>
4246 unsigned int
4247 Triangulation<2, 3>::n_raw_quads(const unsigned int level) const;
4248 template <>
4249 unsigned int
4250 Triangulation<1, 3>::n_raw_hexs(const unsigned int level) const;
4251 template <>
4252 unsigned int
4253 Triangulation<1, 3>::n_active_quads(const unsigned int level) const;
4254 template <>
4255 unsigned int
4257 template <>
4258 unsigned int
4260 
4261 
4262 #endif // DOXYGEN
4263 
4265 
4266 // Include tria_accessor.h here, so that it is possible for an end
4267 // user to use the iterators of Triangulation<dim> directly without
4268 // the need to include tria_accessor.h separately. (Otherwise the
4269 // iterators are an 'opaque' or 'incomplete' type.)
4271 
4272 #endif
Triangulation::n_raw_lines
unsigned int n_raw_lines() const
Definition: tria.cc:12892
internal::TriangulationImplementation::NumberCache< 3 >::n_active_hexes_level
std::vector< unsigned int > n_active_hexes_level
Definition: tria.h:297
internal::TriangulationImplementation::Iterators
Definition: tria_iterator_selector.h:47
DeclExceptionMsg
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:496
Triangulation::maximum_smoothing
@ maximum_smoothing
Definition: tria.h:1325
GridTools
Definition: grid_tools.h:125
Triangulation::clear_user_flags_quad
void clear_user_flags_quad()
Definition: tria.cc:11125
Triangulation::save_user_flags
void save_user_flags(std::ostream &out) const
Definition: tria.cc:11185
Triangulation::Signals::any_change
boost::signals2::signal< void()> any_change
Definition: tria.h:2116
Triangulation::signals
Signals signals
Definition: tria.h:2222
Triangulation::n_faces
unsigned int n_faces() const
Definition: tria.cc:12691
Triangulation::write_bool_vector
static void write_bool_vector(const unsigned int magic_number1, const std::vector< bool > &v, const unsigned int magic_number2, std::ostream &out)
Definition: tria.cc:15084
internal::TriangulationImplementation::NumberCache< 2 >::n_active_quads_level
std::vector< unsigned int > n_active_quads_level
Definition: tria.h:237
Triangulation::coarse_cell_index_to_coarse_cell_id
virtual types::coarse_cell_id coarse_cell_index_to_coarse_cell_id(const unsigned int coarse_cell_index) const
Triangulation::allow_anisotropic_smoothing
@ allow_anisotropic_smoothing
Definition: tria.h:1260
Triangulation::n_active_quads
unsigned int n_active_quads() const
Definition: tria.cc:13142
Triangulation::save_coarsen_flags
void save_coarsen_flags(std::ostream &out) const
Definition: tria.cc:10953
Triangulation::fix_coarsen_flags
void fix_coarsen_flags()
Definition: tria.cc:13630
Triangulation::Signals::pre_distributed_load
boost::signals2::signal< void()> pre_distributed_load
Definition: tria.h:2209
Triangulation::load_user_pointers_hex
void load_user_pointers_hex(const std::vector< void * > &v)
Definition: tria.cc:11952
tria_accessor.h
Triangulation::ExcEmptyLevel
static ::ExceptionBase & ExcEmptyLevel(int arg1)
Triangulation::Signals::copy
boost::signals2::signal< void(const Triangulation< dim, spacedim > &destination_tria)> copy
Definition: tria.h:2090
tria_description.h
internal::TriangulationImplementation::NumberCache< 3 >::n_hexes
unsigned int n_hexes
Definition: tria.h:282
Triangulation::begin_raw_hex
raw_hex_iterator begin_raw_hex(const unsigned int level=0) const
Definition: tria.cc:12523
Triangulation::end_active
active_cell_iterator end_active(const unsigned int level) const
Definition: tria.cc:12148
Triangulation::clear_despite_subscriptions
void clear_despite_subscriptions()
Definition: tria.cc:13507
Triangulation::n_lines
unsigned int n_lines() const
Definition: tria.cc:12819
Triangulation::Signals::pre_coarsening_on_cell
boost::signals2::signal< void(const typename Triangulation< dim, spacedim >::cell_iterator &cell)> pre_coarsening_on_cell
Definition: tria.h:2070
Triangulation::vertex_used
bool vertex_used(const unsigned int index) const
Triangulation::CELL_REFINE
@ CELL_REFINE
Definition: tria.h:1979
internal::TriangulationImplementation::NumberCache< 1 >::n_lines
unsigned int n_lines
Definition: tria.h:163
Triangulation::coarsest_level_1
@ coarsest_level_1
Definition: tria.h:1235
Triangulation::load
void load(Archive &ar, const unsigned int version)
ExceptionBase
Definition: exceptions.h:49
CellData
Definition: tria_description.h:67
CellAccessor
Definition: tria_accessor.h:2667
Triangulation::get_vertices
const std::vector< Point< spacedim > > & get_vertices() const
Triangulation::load_user_indices_quad
void load_user_indices_quad(const std::vector< unsigned int > &v)
Definition: tria.cc:11704
Triangulation::set_all_refine_flags
void set_all_refine_flags()
Definition: tria.cc:10834
Triangulation::load_user_flags
void load_user_flags(std::istream &in)
Definition: tria.cc:11234
Triangulation< dim >::raw_hex_iterator
typename IteratorSelector::raw_hex_iterator raw_hex_iterator
Definition: tria.h:3496
Triangulation::get_triangulation
Triangulation< dim, spacedim > & get_triangulation()
Definition: tria.cc:13338
Triangulation::save_user_flags_hex
void save_user_flags_hex(std::ostream &out) const
Definition: tria.cc:11496
Triangulation
Definition: tria.h:1109
Triangulation::eliminate_refined_boundary_islands
@ eliminate_refined_boundary_islands
Definition: tria.h:1298
internal::TriangulationImplementation::NumberCache< 2 >::serialize
void serialize(Archive &ar, const unsigned int version)
Triangulation< dim >::raw_quad_iterator
typename IteratorSelector::raw_quad_iterator raw_quad_iterator
Definition: tria.h:3495
Triangulation::n_global_active_cells
virtual types::global_cell_index n_global_active_cells() const
Definition: tria.cc:12682
Triangulation::end_line
line_iterator end_line() const
Definition: tria.cc:12410
Triangulation::refine_global
void refine_global(const unsigned int times=1)
Definition: tria.cc:10851
Triangulation::save_user_indices_quad
void save_user_indices_quad(std::vector< unsigned int > &v) const
Definition: tria.cc:11686
Triangulation::space_dimension
static const unsigned int space_dimension
Definition: tria.h:1529
Triangulation::Signals::post_distributed_load
boost::signals2::signal< void()> post_distributed_load
Definition: tria.h:2216
Triangulation::coarse_cell_id_to_coarse_cell_index
virtual unsigned int coarse_cell_id_to_coarse_cell_index(const types::coarse_cell_id coarse_cell_id) const
Triangulation::Signals::clear
boost::signals2::signal< void()> clear
Definition: tria.h:2105
Triangulation::ExcInconsistentCoarseningFlags
static ::ExceptionBase & ExcInconsistentCoarseningFlags()
Triangulation::ExcFacesHaveNoLevel
static ::ExceptionBase & ExcFacesHaveNoLevel()
AssertIndexRange
#define AssertIndexRange(index, range)
Definition: exceptions.h:1649
Triangulation::execute_refinement
DistortedCellList execute_refinement()
Definition: tria.cc:13523
Triangulation::Signals::post_distributed_save
boost::signals2::signal< void()> post_distributed_save
Definition: tria.h:2201
internal::TriangulationImplementation::NumberCache< 1 >::n_lines_level
std::vector< unsigned int > n_lines_level
Definition: tria.h:168
Triangulation::Signals::post_refinement_on_cell
boost::signals2::signal< void(const typename Triangulation< dim, spacedim >::cell_iterator &cell)> post_refinement_on_cell
Definition: tria.h:2080
Triangulation::DistortedCellList::distorted_cells
std::list< typename Triangulation< dim, spacedim >::cell_iterator > distorted_cells
Definition: tria.h:1518
Triangulation::active_cell_iterators_on_level
IteratorRange< active_cell_iterator > active_cell_iterators_on_level(const unsigned int level) const
Definition: tria.cc:12207
Triangulation::vertex_to_boundary_id_map_1d
std::unique_ptr< std::map< unsigned int, types::boundary_id > > vertex_to_boundary_id_map_1d
Definition: tria.h:3900
Triangulation::n_active_hexs
unsigned int n_active_hexs() const
Definition: tria.cc:13187
Triangulation::check_for_distorted_cells
const bool check_for_distorted_cells
Definition: tria.h:3872
Triangulation::serialize
void serialize(Archive &archive, const unsigned int version)
Triangulation::smoothing_on_coarsening
@ smoothing_on_coarsening
Definition: tria.h:1316
Triangulation::get_anisotropic_refinement_flag
bool get_anisotropic_refinement_flag() const
Definition: tria.cc:10999
Triangulation::Signals::mesh_movement
boost::signals2::signal< void()> mesh_movement
Definition: tria.h:2059
Triangulation::load_user_flags_line
void load_user_flags_line(std::istream &in)
Definition: tria.cc:11318
Triangulation::clear_user_data
void clear_user_data()
Definition: tria.cc:11049
Triangulation::save_user_pointers_line
void save_user_pointers_line(std::vector< void * > &v) const
Definition: tria.cc:11870
Triangulation::Signals::post_distributed_refinement
boost::signals2::signal< void()> post_distributed_refinement
Definition: tria.h:2167
Triangulation::load_user_flags_quad
void load_user_flags_quad(std::istream &in)
Definition: tria.cc:11441
Triangulation::n_raw_quads
unsigned int n_raw_quads() const
Definition: tria.cc:13123
hp::DoFHandler
Definition: dof_handler.h:203
Triangulation::n_raw_faces
unsigned int n_raw_faces() const
Definition: tria.cc:12710
Triangulation< dim >::raw_line_iterator
typename IteratorSelector::raw_line_iterator raw_line_iterator
Definition: tria.h:3494
Triangulation::n_raw_hexs
unsigned int n_raw_hexs(const unsigned int level) const
Definition: tria.cc:13179
DoFHandler
Definition: dof_handler.h:205
Triangulation::save_user_indices
void save_user_indices(std::vector< unsigned int > &v) const
Definition: tria.cc:11546
Triangulation::n_global_levels
virtual unsigned int n_global_levels() const
Triangulation< dim >::active_line_iterator
typename IteratorSelector::active_line_iterator active_line_iterator
Definition: tria.h:1439
Triangulation::~Triangulation
virtual ~Triangulation() override
Definition: tria.cc:10180
Triangulation::get_boundary_ids
virtual std::vector< types::boundary_id > get_boundary_ids() const
Definition: tria.cc:10384
Triangulation::Signals::post_distributed_repartition
boost::signals2::signal< void()> post_distributed_repartition
Definition: tria.h:2186
Triangulation::update_periodic_face_map
void update_periodic_face_map()
Definition: tria.cc:13444
Triangulation::get_mesh_smoothing
virtual const MeshSmoothing & get_mesh_smoothing() const
Definition: tria.cc:10236
Triangulation::end_hex
hex_iterator end_hex() const
Definition: tria.cc:12601
Triangulation::begin_quad
quad_iterator begin_quad(const unsigned int level=0) const
Definition: tria.cc:12478
Triangulation::memory_consumption
virtual std::size_t memory_consumption() const
Definition: tria.cc:15157
internal::TriangulationImplementation::NumberCache< 3 >::serialize
void serialize(Archive &ar, const unsigned int version)
Triangulation::load_user_pointers_line
void load_user_pointers_line(const std::vector< void * > &v)
Definition: tria.cc:11884
Triangulation::set_manifold
void set_manifold(const types::manifold_id number, const Manifold< dim, spacedim > &manifold_object)
Definition: tria.cc:10245
Subscriptor
Definition: subscriptor.h:62
Triangulation::ExcTriangulationNotEmpty
static ::ExceptionBase & ExcTriangulationNotEmpty(int arg1, int arg2)
tria_iterator_selector.h
Triangulation::begin_face
face_iterator begin_face() const
Definition: tria.cc:12221
Triangulation::smoothing_on_refinement
@ smoothing_on_refinement
Definition: tria.h:1310
level
unsigned int level
Definition: grid_out.cc:4355
Triangulation< dim >::hex_iterator
typename IteratorSelector::hex_iterator hex_iterator
Definition: tria.h:1472
Triangulation< dim >::CellStatus
CellStatus
Definition: tria.h:1969
Triangulation::manifold
std::map< types::manifold_id, std::unique_ptr< const Manifold< dim, spacedim > > > manifold
Definition: tria.h:3860
Triangulation::CellWeightSum
Definition: tria.h:1996
Triangulation::n_vertices
unsigned int n_vertices() const
Triangulation::save_user_pointers_hex
void save_user_pointers_hex(std::vector< void * > &v) const
Definition: tria.cc:11934
Triangulation::reset_active_cell_indices
void reset_active_cell_indices()
Definition: tria.cc:13426
Triangulation::cell_iterators
IteratorRange< cell_iterator > cell_iterators() const
Definition: tria.cc:12176
LAPACKSupport::T
static const char T
Definition: lapack_support.h:163
Triangulation::execute_coarsening_and_refinement
virtual void execute_coarsening_and_refinement()
Definition: tria.cc:13385
Triangulation::Signals::pre_distributed_repartition
boost::signals2::signal< void()> pre_distributed_repartition
Definition: tria.h:2179
Triangulation::read_bool_vector
static void read_bool_vector(const unsigned int magic_number1, std::vector< bool > &v, const unsigned int magic_number2, std::istream &in)
Definition: tria.cc:15119
Triangulation::save_user_indices_line
void save_user_indices_line(std::vector< unsigned int > &v) const
Definition: tria.cc:11658
Triangulation::create_triangulation
virtual void create_triangulation(const std::vector< Point< spacedim >> &vertices, const std::vector< CellData< dim >> &cells, const SubCellData &subcelldata)
Definition: tria.cc:10521
Triangulation::Signals::pre_distributed_save
boost::signals2::signal< void()> pre_distributed_save
Definition: tria.h:2194
Triangulation< dim >::quad_iterator
typename IteratorSelector::quad_iterator quad_iterator
Definition: tria.h:1448
Triangulation::flip_all_direction_flags
void flip_all_direction_flags()
Definition: tria.cc:10822
Triangulation::end_face
face_iterator end_face() const
Definition: tria.cc:12263
Triangulation::n_raw_cells
unsigned int n_raw_cells(const unsigned int level) const
Definition: tria.cc:12748
Triangulation::save_user_flags_line
void save_user_flags_line(std::ostream &out) const
Definition: tria.cc:11304
Triangulation::Triangulation
Triangulation(const MeshSmoothing smooth_grid=none, const bool check_for_distorted_cells=false)
Definition: tria.cc:10106
StandardExceptions::ExcMessage
static ::ExceptionBase & ExcMessage(std::string arg1)
Triangulation::dimension
static const unsigned int dimension
Definition: tria.h:1524
geometry_info.h
IteratorRange
Definition: iterator_range.h:129
Triangulation::begin_active
active_cell_iterator begin_active(const unsigned int level=0) const
Definition: tria.cc:12013
Triangulation::load_user_pointers
void load_user_pointers(const std::vector< void * > &v)
Definition: tria.cc:11833
CellId
Definition: cell_id.h:69
Triangulation::DistortedCellList
Definition: tria.h:1503
Triangulation::n_used_vertices
unsigned int n_used_vertices() const
Definition: tria.cc:13253
Triangulation::clear_user_flags
void clear_user_flags()
Definition: tria.cc:11174
subscriptor.h
Triangulation::execute_coarsening
void execute_coarsening()
Definition: tria.cc:13555
Triangulation::DistortedCellList::~DistortedCellList
virtual ~DistortedCellList() noexcept override=default
Triangulation::ExcInvalidLevel
static ::ExceptionBase & ExcInvalidLevel(int arg1, int arg2)
internal::TriangulationImplementation::NumberCache
Definition: tria.h:136
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
Triangulation::set_all_manifold_ids
void set_all_manifold_ids(const types::manifold_id number)
Definition: tria.cc:10277
Triangulation::eliminate_refined_inner_islands
@ eliminate_refined_inner_islands
Definition: tria.h:1293
Triangulation::reset_all_manifolds
void reset_all_manifolds()
Definition: tria.cc:10269
Triangulation::patch_level_1
@ patch_level_1
Definition: tria.h:1211
Triangulation::ExcGridReadError
static ::ExceptionBase & ExcGridReadError()
Triangulation::n_active_faces
unsigned int n_active_faces() const
Definition: tria.cc:12729
internal::TriangulationImplementation::NumberCache< 3 >::n_active_hexes
unsigned int n_active_hexes
Definition: tria.h:292
MemoryConsumption::memory_consumption
std::enable_if< std::is_fundamental< T >::value, std::size_t >::type memory_consumption(const T &t)
Definition: memory_consumption.h:268
Physics::Elasticity::Kinematics::l
Tensor< 2, dim, Number > l(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
Triangulation::n_quads
unsigned int n_quads() const
Definition: tria.cc:13075
Triangulation::load_user_indices
void load_user_indices(const std::vector< unsigned int > &v)
Definition: tria.cc:11578
Triangulation::begin_raw_quad
raw_quad_iterator begin_raw_quad(const unsigned int level=0) const
Definition: tria.cc:12424
internal::TriangulationImplementation::NumberCache< 1 >::n_levels
unsigned int n_levels
Definition: tria.h:158
Triangulation::save_user_indices_hex
void save_user_indices_hex(std::vector< unsigned int > &v) const
Definition: tria.cc:11721
Triangulation::begin_raw_line
raw_line_iterator begin_raw_line(const unsigned int level=0) const
Definition: tria.cc:12338
Triangulation::anisotropic_refinement
bool anisotropic_refinement
Definition: tria.h:3865
DeclException1
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:518
smartpointer.h
TriangulationDescription
Definition: tria_description.h:245
TriaAccessor
Definition: tria_accessor.h:127
Triangulation::add_periodicity
virtual void add_periodicity(const std::vector< GridTools::PeriodicFacePair< cell_iterator >> &)
Definition: tria.cc:13356
Triangulation::none
@ none
Definition: tria.h:1130
Triangulation::Signals
Definition: tria.h:2017
iterator_range.h
Triangulation::limit_level_difference_at_vertices
@ limit_level_difference_at_vertices
Definition: tria.h:1174
Triangulation::end_quad
quad_iterator end_quad() const
Definition: tria.cc:12510
Triangulation::active_face_iterators
IteratorRange< active_face_iterator > active_face_iterators() const
Definition: tria.cc:12284
TriaActiveIterator
Definition: tria_iterator.h:759
internal::TriangulationImplementation::NumberCache< 1 >::n_active_lines
unsigned int n_active_lines
Definition: tria.h:173
Triangulation::set_mesh_smoothing
virtual void set_mesh_smoothing(const MeshSmoothing mesh_smoothing)
Definition: tria.cc:10224
Triangulation::save_user_flags_quad
void save_user_flags_quad(std::ostream &out) const
Definition: tria.cc:11427
Triangulation::copy_triangulation
virtual void copy_triangulation(const Triangulation< dim, spacedim > &other_tria)
Definition: tria.cc:10438
Triangulation::begin_active_face
active_face_iterator begin_active_face() const
Definition: tria.cc:12242
Triangulation::CELL_PERSIST
@ CELL_PERSIST
Definition: tria.h:1975
Triangulation::CELL_COARSEN
@ CELL_COARSEN
Definition: tria.h:1983
Triangulation::end_raw
raw_cell_iterator end_raw(const unsigned int level) const
Definition: tria.cc:12090
Triangulation::number_cache
::internal::TriangulationImplementation::NumberCache< dim > number_cache
Definition: tria.h:3883
Triangulation::load_user_indices_hex
void load_user_indices_hex(const std::vector< unsigned int > &v)
Definition: tria.cc:11739
Triangulation::save_user_pointers
void save_user_pointers(std::vector< void * > &v) const
Definition: tria.cc:11802
unsigned int
Triangulation::begin_hex
hex_iterator begin_hex(const unsigned int level=0) const
Definition: tria.cc:12569
vertices
Point< 3 > vertices[4]
Definition: data_out_base.cc:174
Triangulation::end_vertex
vertex_iterator end_vertex() const
Definition: tria.cc:12323
Triangulation::Signals::pre_refinement
boost::signals2::signal< void()> pre_refinement
Definition: tria.h:2035
Triangulation::reset_manifold
void reset_manifold(const types::manifold_id manifold_number)
Definition: tria.cc:10258
types::coarse_cell_id
global_cell_index coarse_cell_id
Definition: types.h:114
internal::TriangulationImplementation::NumberCache< 1 >::n_active_lines_level
std::vector< unsigned int > n_active_lines_level
Definition: tria.h:178
internal::TriangulationImplementation::NumberCache< 3 >::n_hexes_level
std::vector< unsigned int > n_hexes_level
Definition: tria.h:287
Assert
#define Assert(cond, exc)
Definition: exceptions.h:1419
Triangulation::last_active
active_cell_iterator last_active() const
Definition: tria.cc:12058
Triangulation::Signals::pre_distributed_refinement
boost::signals2::signal< void()> pre_distributed_refinement
Definition: tria.h:2157
Triangulation::last
cell_iterator last() const
Definition: tria.cc:12033
Triangulation::Signals::cell_weight
boost::signals2::signal< unsigned int(const cell_iterator &, const CellStatus), CellWeightSum< unsigned int > > cell_weight
Definition: tria.h:2144
Triangulation::Signals::create
boost::signals2::signal< void()> create
Definition: tria.h:2026
Triangulation< dim >::active_quad_iterator
typename IteratorSelector::active_quad_iterator active_quad_iterator
Definition: tria.h:1463
Triangulation::ExcBoundaryIdNotFound
static ::ExceptionBase & ExcBoundaryIdNotFound(types::boundary_id arg1)
Triangulation< dim >::MeshSmoothing
MeshSmoothing
Definition: tria.h:1124
Triangulation::vertices_used
std::vector< bool > vertices_used
Definition: tria.h:3853
Triangulation::begin_vertex
vertex_iterator begin_vertex() const
Definition: tria.cc:12296
DeclException0
#define DeclException0(Exception0)
Definition: exceptions.h:473
Triangulation::CellWeightSum::operator()
T operator()(InputIterator first, InputIterator last) const
Definition: tria.h:2002
Triangulation::cell_iterators_on_level
IteratorRange< cell_iterator > cell_iterators_on_level(const unsigned int level) const
Definition: tria.cc:12196
Triangulation::Signals::post_refinement
boost::signals2::signal< void()> post_refinement
Definition: tria.h:2042
Triangulation::ExcNonOrientableTriangulation
static ::ExceptionBase & ExcNonOrientableTriangulation()
GridTools::PeriodicFacePair
Definition: grid_tools.h:2463
hp
Definition: hp.h:117
Triangulation::periodic_face_pairs_level_0
std::vector< GridTools::PeriodicFacePair< cell_iterator > > periodic_face_pairs_level_0
Definition: tria.h:3466
Triangulation::n_active_lines
unsigned int n_active_lines() const
Definition: tria.cc:12910
Triangulation::prepare_coarsening_and_refinement
virtual bool prepare_coarsening_and_refinement()
Definition: tria.cc:14083
internal::TriangulationImplementation::NumberCache< 1 >::serialize
void serialize(Archive &ar, const unsigned int version)
Triangulation::locally_owned_subdomain
virtual types::subdomain_id locally_owned_subdomain() const
Definition: tria.cc:13329
Triangulation::vertices
std::vector< Point< spacedim > > vertices
Definition: tria.h:3848
Point< spacedim >
Triangulation::n_active_cells
unsigned int n_active_cells() const
Definition: tria.cc:12675
Triangulation::begin_active_quad
active_quad_iterator begin_active_quad(const unsigned int level=0) const
Definition: tria.cc:12494
Triangulation::load_coarsen_flags
void load_coarsen_flags(std::istream &out)
Definition: tria.cc:10967
Triangulation::faces
std::unique_ptr<::internal::TriangulationImplementation::TriaFaces< dim > > faces
Definition: tria.h:3842
internal::TriangulationImplementation::NumberCache< 2 >::n_quads
unsigned int n_quads
Definition: tria.h:222
Triangulation::load_user_indices_line
void load_user_indices_line(const std::vector< unsigned int > &v)
Definition: tria.cc:11672
config.h
Triangulation::begin_line
line_iterator begin_line(const unsigned int level=0) const
Definition: tria.cc:12378
Triangulation::begin_active_line
active_line_iterator begin_active_line(const unsigned int level=0) const
Definition: tria.cc:12394
Triangulation::n_hexs
unsigned int n_hexs() const
Definition: tria.cc:13161
internal
Definition: aligned_vector.h:369
TriaAccessorBase
Definition: tria_accessor.h:291
Triangulation::begin
cell_iterator begin(const unsigned int level=0) const
Definition: tria.cc:11993
Triangulation::load_user_pointers_quad
void load_user_pointers_quad(const std::vector< void * > &v)
Definition: tria.cc:11917
Manifold
Definition: manifold.h:334
Triangulation::active_cell_iterators
IteratorRange< active_cell_iterator > active_cell_iterators() const
Definition: tria.cc:12185
Triangulation::save_user_pointers_quad
void save_user_pointers_quad(std::vector< void * > &v) const
Definition: tria.cc:11899
TriangulationDescription::Description
Definition: tria_description.h:347
SubCellData
Definition: tria_description.h:199
Triangulation::vertex_to_manifold_id_map_1d
std::unique_ptr< std::map< unsigned int, types::manifold_id > > vertex_to_manifold_id_map_1d
Definition: tria.h:3923
Triangulation::create_triangulation_compatibility
virtual void create_triangulation_compatibility(const std::vector< Point< spacedim >> &vertices, const std::vector< CellData< dim >> &cells, const SubCellData &subcelldata)
Definition: tria.cc:10501
internal::TriangulationImplementation::NumberCache< 2 >::n_active_quads
unsigned int n_active_quads
Definition: tria.h:232
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
Triangulation< dim >::active_hex_iterator
typename IteratorSelector::active_hex_iterator active_hex_iterator
Definition: tria.h:1483
Triangulation::begin_active_hex
active_hex_iterator begin_active_hex(const unsigned int level=0) const
Definition: tria.cc:12585
Triangulation::set_all_manifold_ids_on_boundary
void set_all_manifold_ids_on_boundary(const types::manifold_id number)
Definition: tria.cc:10296
Triangulation::operator=
Triangulation & operator=(Triangulation< dim, spacedim > &&tria) noexcept
Definition: tria.cc:10155
Triangulation::n_cells
unsigned int n_cells() const
Definition: tria.cc:12667
Triangulation::begin_active_vertex
active_vertex_iterator begin_active_vertex() const
Definition: tria.cc:12313
Triangulation::clear_user_flags_hex
void clear_user_flags_hex()
Definition: tria.cc:11165
first
Point< 2 > first
Definition: grid_out.cc:4352
Triangulation::save_refine_flags
void save_refine_flags(std::ostream &out) const
Definition: tria.cc:10885
Triangulation::CellWeightSum::result_type
T result_type
Definition: tria.h:1998
Triangulation::clear_user_flags_line
void clear_user_flags_line()
Definition: tria.cc:11084
Triangulation::get_used_vertices
const std::vector< bool > & get_used_vertices() const
Definition: tria.cc:13262
Triangulation::has_hanging_nodes
virtual bool has_hanging_nodes() const
Definition: tria.cc:12807
Triangulation::begin_raw
raw_cell_iterator begin_raw(const unsigned int level=0) const
Definition: tria.cc:11973
TriaIterator
Definition: tria_iterator.h:578
Triangulation::CELL_INVALID
@ CELL_INVALID
Definition: tria.h:1987
Triangulation::periodic_face_map
std::map< std::pair< cell_iterator, unsigned int >, std::pair< std::pair< cell_iterator, unsigned int >, std::bitset< 3 > > > periodic_face_map
Definition: tria.h:3474
DeclException2
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:541
Triangulation< dim >::line_iterator
typename IteratorSelector::line_iterator line_iterator
Definition: tria.h:1424
internal::TriangulationImplementation::NumberCache< 2 >::n_quads_level
std::vector< unsigned int > n_quads_level
Definition: tria.h:227
Triangulation::do_not_produce_unrefined_islands
@ do_not_produce_unrefined_islands
Definition: tria.h:1304
Triangulation::n_levels
unsigned int n_levels() const
Triangulation::max_adjacent_cells
unsigned int max_adjacent_cells() const
Definition: tria.cc:13296
Triangulation::Signals::pre_partition
boost::signals2::signal< void()> pre_partition
Definition: tria.h:2050
Triangulation::clear
virtual void clear()
Definition: tria.cc:10209
Triangulation::save
void save(Archive &ar, const unsigned int version) const
Triangulation::load_refine_flags
void load_refine_flags(std::istream &in)
Definition: tria.cc:10899
Triangulation::smooth_grid
MeshSmoothing smooth_grid
Definition: tria.h:3419
Triangulation::eliminate_unrefined_islands
@ eliminate_unrefined_islands
Definition: tria.h:1195
Triangulation::get_manifold
const Manifold< dim, spacedim > & get_manifold(const types::manifold_id number) const
Definition: tria.cc:10361
Triangulation::get_manifold_ids
virtual std::vector< types::manifold_id > get_manifold_ids() const
Definition: tria.cc:10416
internal::TriangulationImplementation::TriaLevel
Definition: tria_levels.h:58
Triangulation::end
cell_iterator end() const
Definition: tria.cc:12079
Triangulation::get_periodic_face_map
const std::map< std::pair< cell_iterator, unsigned int >, std::pair< std::pair< cell_iterator, unsigned int >, std::bitset< 3 > > > & get_periodic_face_map() const
Definition: tria.cc:13376
int
Triangulation::levels
std::vector< std::unique_ptr< ::internal::TriangulationImplementation::TriaLevel< dim > > > levels
Definition: tria.h:3834
point.h
TriaRawIterator
Definition: tria_iterator.h:232
Triangulation::load_user_flags_hex
void load_user_flags_hex(std::istream &in)
Definition: tria.cc:11510