Reference documentation for deal.II version GIT 6da2e5d553 2022-07-01 18:55:02+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\}}\)
tria.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 1998 - 2022 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 
28 #include <deal.II/grid/cell_id.h>
32 
33 #include <boost/serialization/map.hpp>
34 #include <boost/serialization/split_member.hpp>
35 #include <boost/serialization/unique_ptr.hpp>
36 #include <boost/serialization/vector.hpp>
37 #include <boost/signals2.hpp>
38 
39 #include <bitset>
40 #include <functional>
41 #include <list>
42 #include <map>
43 #include <memory>
44 #include <numeric>
45 #include <vector>
46 
47 
49 
50 #ifdef signals
51 # error \
52  "The name 'signals' is already defined. You are most likely using the QT library \
53 and using the 'signals' keyword. You can either #include the Qt headers (or any conflicting headers) \
54 *after* the deal.II headers or you can define the 'QT_NO_KEYWORDS' macro and use the 'Q_SIGNALS' macro."
55 #endif
56 
57 // Forward declarations
58 #ifndef DOXYGEN
59 template <int dim, int spacedim>
60 class Manifold;
61 
62 template <int dim>
63 struct CellData;
64 
65 struct SubCellData;
66 
68 {
69  template <int, int>
70  struct Description;
71 }
72 
73 namespace GridTools
74 {
75  template <typename CellIterator>
76  struct PeriodicFacePair;
77 }
78 
79 template <int, int, int>
80 class TriaAccessor;
81 template <int spacedim>
82 class TriaAccessor<0, 1, spacedim>;
83 template <int, int, int>
84 class TriaAccessorBase;
85 
86 namespace internal
87 {
88  namespace TriangulationImplementation
89  {
90  class TriaFaces;
91 
92  class TriaObjects;
93 
94  template <int, int>
95  class Policy;
96 
102  struct Implementation;
103  struct ImplementationMixedMesh;
104  } // namespace TriangulationImplementation
105 
106  namespace TriaAccessorImplementation
107  {
108  struct Implementation;
109  }
110 } // namespace internal
111 #endif
112 
113 
114 /*------------------------------------------------------------------------*/
115 
116 
117 namespace internal
118 {
123  namespace TriangulationImplementation
124  {
136  template <int dim>
137  struct NumberCache
138  {};
139 
151  template <>
152  struct NumberCache<1>
153  {
157  unsigned int n_levels;
158 
162  unsigned int n_lines;
163 
167  std::vector<unsigned int> n_lines_level;
168 
172  unsigned int n_active_lines;
173 
177  std::vector<unsigned int> n_active_lines_level;
178 
182  NumberCache();
183 
188  std::size_t
189  memory_consumption() const;
190 
196  template <class Archive>
197  void
198  serialize(Archive &ar, const unsigned int version);
199  };
200 
201 
214  template <>
215  struct NumberCache<2> : public NumberCache<1>
216  {
220  unsigned int n_quads;
221 
225  std::vector<unsigned int> n_quads_level;
226 
230  unsigned int n_active_quads;
231 
235  std::vector<unsigned int> n_active_quads_level;
236 
240  NumberCache();
241 
246  std::size_t
247  memory_consumption() const;
248 
254  template <class Archive>
255  void
256  serialize(Archive &ar, const unsigned int version);
257  };
258 
259 
273  template <>
274  struct NumberCache<3> : public NumberCache<2>
275  {
279  unsigned int n_hexes;
280 
284  std::vector<unsigned int> n_hexes_level;
285 
289  unsigned int n_active_hexes;
290 
294  std::vector<unsigned int> n_active_hexes_level;
295 
299  NumberCache();
300 
305  std::size_t
306  memory_consumption() const;
307 
313  template <class Archive>
314  void
315  serialize(Archive &ar, const unsigned int version);
316  };
317  } // namespace TriangulationImplementation
318 } // namespace internal
319 
320 
321 /*------------------------------------------------------------------------*/
322 
323 
1120 template <int dim, int spacedim = dim>
1122 {
1123 private:
1130 
1131 public:
1137  {
1142  none = 0x0,
1317 
1331 
1338  };
1339 
1356 
1362 
1380 
1394  using face_iterator = TriaIterator<TriaAccessor<dim - 1, dim, spacedim>>;
1395 
1408  TriaActiveIterator<TriaAccessor<dim - 1, dim, spacedim>>;
1409 
1419 
1434 
1442  using line_iterator = typename IteratorSelector::line_iterator;
1443 
1457  using active_line_iterator = typename IteratorSelector::active_line_iterator;
1458 
1466  using quad_iterator = typename IteratorSelector::quad_iterator;
1467 
1481  using active_quad_iterator = typename IteratorSelector::active_quad_iterator;
1482 
1490  using hex_iterator = typename IteratorSelector::hex_iterator;
1491 
1501  using active_hex_iterator = typename IteratorSelector::active_hex_iterator;
1502 
1522  {
1529  virtual ~DistortedCellList() noexcept override;
1530 
1535  std::list<typename Triangulation<dim, spacedim>::cell_iterator>
1537  };
1538 
1542  static constexpr unsigned int dimension = dim;
1543 
1547  static constexpr unsigned int space_dimension = spacedim;
1548 
1564  const bool check_for_distorted_cells = false);
1565 
1581  Triangulation(const Triangulation<dim, spacedim> &) = delete;
1582 
1589  Triangulation(Triangulation<dim, spacedim> &&tria) noexcept;
1590 
1594  Triangulation &
1595  operator=(Triangulation<dim, spacedim> &&tria) noexcept;
1596 
1600  virtual ~Triangulation() override;
1601 
1608  virtual void
1610 
1615  virtual MPI_Comm
1617 
1623  virtual void
1624  set_mesh_smoothing(const MeshSmoothing mesh_smoothing);
1625 
1629  virtual const MeshSmoothing &
1631 
1654  void
1656  const Manifold<dim, spacedim> &manifold_object);
1657 
1670  void
1671  reset_manifold(const types::manifold_id manifold_number);
1672 
1684  void
1686 
1695  void
1697 
1706  void
1708 
1718  void
1720  const types::manifold_id number);
1721 
1733  const Manifold<dim, spacedim> &
1734  get_manifold(const types::manifold_id number) const;
1735 
1748  virtual std::vector<types::boundary_id>
1750 
1763  virtual std::vector<types::manifold_id>
1765 
1792  virtual void
1793  copy_triangulation(const Triangulation<dim, spacedim> &other_tria);
1794 
1842  virtual void
1843  create_triangulation(const std::vector<Point<spacedim>> &vertices,
1844  const std::vector<CellData<dim>> & cells,
1845  const SubCellData & subcelldata);
1846 
1859  virtual void
1861  const TriangulationDescription::Description<dim, spacedim>
1862  &construction_data);
1863 
1873  virtual void
1875  const std::vector<Point<spacedim>> &vertices,
1876  const std::vector<CellData<dim>> & cells,
1877  const SubCellData & subcelldata);
1878 
1885  void
1887 
1899  void
1901 
1924  void
1925  refine_global(const unsigned int times = 1);
1926 
1939  void
1940  coarsen_global(const unsigned int times = 1);
1941 
1973  virtual void
1975 
2005  virtual bool
2007 
2008  /*
2009  * @}
2010  */
2011 
2026  {
2043  CELL_INVALID
2044  };
2045 
2051  template <typename T>
2053  {
2054  using result_type = T;
2055 
2056  template <typename InputIterator>
2057  T
2058  operator()(InputIterator first, InputIterator last) const
2059  {
2060  return std::accumulate(first, last, T());
2061  }
2062  };
2063 
2073  struct Signals
2074  {
2082  boost::signals2::signal<void()> create;
2083 
2091  boost::signals2::signal<void()> pre_refinement;
2092 
2098  boost::signals2::signal<void()> post_refinement;
2099 
2106  boost::signals2::signal<void()> pre_partition;
2107 
2115  boost::signals2::signal<void()> mesh_movement;
2116 
2124  boost::signals2::signal<void(
2125  const typename Triangulation<dim, spacedim>::cell_iterator &cell)>
2127 
2134  boost::signals2::signal<void(
2135  const typename Triangulation<dim, spacedim>::cell_iterator &cell)>
2137 
2144  boost::signals2::signal<void(
2145  const Triangulation<dim, spacedim> &destination_tria)>
2147 
2161  boost::signals2::signal<void()> clear;
2162 
2172  boost::signals2::signal<void()> any_change;
2173 
2209  boost::signals2::signal<unsigned int(const cell_iterator &,
2210  const CellStatus),
2213 
2220  : cell_weight(weight)
2221  {}
2222 
2227  {
2228  public:
2229  using signature_type = unsigned int(const cell_iterator &,
2230  const CellStatus);
2232 
2233  using slot_function_type = boost::function<signature_type>;
2234  using slot_type =
2235  boost::signals2::slot<signature_type, slot_function_type>;
2236 
2241  boost::signals2::signal<signature_type, combiner_type> &new_signal)
2242  : new_signal(new_signal)
2243  {}
2244 
2249  {
2250  base_weight.disconnect();
2251  }
2252 
2260  boost::signals2::connection
2262  const slot_type & slot,
2263  boost::signals2::connect_position position = boost::signals2::at_back)
2264  {
2265  if (base_weight.connected() == false)
2266  {
2267  base_weight = new_signal.connect(
2268  [](const cell_iterator &, const CellStatus) -> unsigned int {
2269  return 1000;
2270  });
2271  Assert(base_weight.connected() && new_signal.num_slots() == 1,
2272  ExcInternalError());
2273  }
2274 
2275  return new_signal.connect(slot, position);
2276  }
2277 
2283  std::size_t
2284  num_slots() const
2285  {
2286  return new_signal.num_slots() -
2287  static_cast<std::size_t>(base_weight.connected());
2288  }
2289 
2294  bool
2295  empty() const
2296  {
2297  if (num_slots() == 0)
2298  {
2299  Assert(new_signal.num_slots() == 0, ExcInternalError());
2300  return true;
2301  }
2302  return false;
2303  }
2304 
2311  template <typename S>
2312  DEAL_II_DEPRECATED void
2313  disconnect(const S &connection)
2314  {
2315  new_signal.disconnect(connection);
2316 
2317  if (num_slots() == 0)
2318  {
2319  Assert(base_weight.connected() && new_signal.num_slots() == 1,
2320  ExcInternalError());
2321  new_signal.disconnect(base_weight);
2322  }
2323  }
2324 
2329  unsigned int
2330  operator()(const cell_iterator &iterator, const CellStatus status)
2331  {
2332  return new_signal(iterator, status);
2333  }
2334 
2335  private:
2339  boost::signals2::connection base_weight;
2340 
2344  boost::signals2::signal<signature_type, combiner_type> &new_signal;
2345  };
2346 
2367 
2379  boost::signals2::signal<void()> pre_distributed_refinement;
2380 
2388  boost::signals2::signal<void()> post_p4est_refinement;
2389 
2398  boost::signals2::signal<void()> post_distributed_refinement;
2399 
2405  boost::signals2::signal<void()> pre_distributed_repartition;
2406 
2412  boost::signals2::signal<void()> post_distributed_repartition;
2413 
2420  boost::signals2::signal<void()> pre_distributed_save;
2421 
2427  boost::signals2::signal<void()> post_distributed_save;
2428 
2435  boost::signals2::signal<void()> pre_distributed_load;
2436 
2442  boost::signals2::signal<void()> post_distributed_load;
2443  };
2444 
2448  mutable Signals signals;
2449 
2450  /*
2451  * @}
2452  */
2453 
2463  void
2464  save_refine_flags(std::ostream &out) const;
2465 
2469  void
2470  save_refine_flags(std::vector<bool> &v) const;
2471 
2475  void
2476  load_refine_flags(std::istream &in);
2477 
2481  void
2482  load_refine_flags(const std::vector<bool> &v);
2483 
2487  void
2488  save_coarsen_flags(std::ostream &out) const;
2489 
2493  void
2494  save_coarsen_flags(std::vector<bool> &v) const;
2495 
2499  void
2500  load_coarsen_flags(std::istream &out);
2501 
2505  void
2506  load_coarsen_flags(const std::vector<bool> &v);
2507 
2512  bool
2514 
2515  /*
2516  * @}
2517  */
2518 
2528  void
2530 
2536  void
2537  save_user_flags(std::ostream &out) const;
2538 
2544  void
2545  save_user_flags(std::vector<bool> &v) const;
2546 
2551  void
2552  load_user_flags(std::istream &in);
2553 
2558  void
2559  load_user_flags(const std::vector<bool> &v);
2560 
2565  void
2567 
2572  void
2573  save_user_flags_line(std::ostream &out) const;
2574 
2580  void
2581  save_user_flags_line(std::vector<bool> &v) const;
2582 
2587  void
2588  load_user_flags_line(std::istream &in);
2589 
2594  void
2595  load_user_flags_line(const std::vector<bool> &v);
2596 
2601  void
2603 
2608  void
2609  save_user_flags_quad(std::ostream &out) const;
2610 
2616  void
2617  save_user_flags_quad(std::vector<bool> &v) const;
2618 
2623  void
2624  load_user_flags_quad(std::istream &in);
2625 
2630  void
2631  load_user_flags_quad(const std::vector<bool> &v);
2632 
2633 
2638  void
2640 
2645  void
2646  save_user_flags_hex(std::ostream &out) const;
2647 
2653  void
2654  save_user_flags_hex(std::vector<bool> &v) const;
2655 
2660  void
2661  load_user_flags_hex(std::istream &in);
2662 
2667  void
2668  load_user_flags_hex(const std::vector<bool> &v);
2669 
2675  void
2677 
2683  void
2684  save_user_indices(std::vector<unsigned int> &v) const;
2685 
2690  void
2691  load_user_indices(const std::vector<unsigned int> &v);
2692 
2698  void
2699  save_user_pointers(std::vector<void *> &v) const;
2700 
2705  void
2706  load_user_pointers(const std::vector<void *> &v);
2707 
2713  void
2714  save_user_indices_line(std::vector<unsigned int> &v) const;
2715 
2720  void
2721  load_user_indices_line(const std::vector<unsigned int> &v);
2722 
2728  void
2729  save_user_indices_quad(std::vector<unsigned int> &v) const;
2730 
2735  void
2736  load_user_indices_quad(const std::vector<unsigned int> &v);
2737 
2743  void
2744  save_user_indices_hex(std::vector<unsigned int> &v) const;
2745 
2750  void
2751  load_user_indices_hex(const std::vector<unsigned int> &v);
2757  void
2758  save_user_pointers_line(std::vector<void *> &v) const;
2759 
2764  void
2765  load_user_pointers_line(const std::vector<void *> &v);
2766 
2772  void
2773  save_user_pointers_quad(std::vector<void *> &v) const;
2774 
2779  void
2780  load_user_pointers_quad(const std::vector<void *> &v);
2781 
2787  void
2788  save_user_pointers_hex(std::vector<void *> &v) const;
2789 
2794  void
2795  load_user_pointers_hex(const std::vector<void *> &v);
2796 
2797  /*
2798  * @}
2799  */
2800 
2824  begin(const unsigned int level = 0) const;
2825 
2857  begin_active(const unsigned int level = 0) const;
2858 
2864  end() const;
2865 
2885  end(const unsigned int level) const;
2886 
2907  end_active(const unsigned int level) const;
2908 
2909 
2914  last() const;
2915 
2920  last_active() const;
2921 
2935  create_cell_iterator(const CellId &cell_id) const;
2936 
2953 
2991 
3008  cell_iterators_on_level(const unsigned int level) const;
3009 
3026  active_cell_iterators_on_level(const unsigned int level) const;
3027 
3028  /*
3029  * @}
3030  */
3031 
3032  /*-------------------------------------------------------------------------*/
3033 
3043  begin_face() const;
3044 
3050 
3056  end_face() const;
3057 
3078 
3079  /*
3080  * @}
3081  */
3082 
3083  /*-------------------------------------------------------------------------*/
3084 
3095  begin_vertex() const;
3096 
3104 
3111  end_vertex() const;
3112 
3113  /*
3114  * @}
3115  */
3116 
3134  unsigned int
3135  n_lines() const;
3136 
3140  unsigned int
3141  n_lines(const unsigned int level) const;
3142 
3146  unsigned int
3148 
3152  unsigned int
3153  n_active_lines(const unsigned int level) const;
3154 
3158  unsigned int
3159  n_quads() const;
3160 
3164  unsigned int
3165  n_quads(const unsigned int level) const;
3166 
3170  unsigned int
3172 
3176  unsigned int
3177  n_active_quads(const unsigned int level) const;
3178 
3182  unsigned int
3183  n_hexs() const;
3184 
3189  unsigned int
3190  n_hexs(const unsigned int level) const;
3191 
3195  unsigned int
3196  n_active_hexs() const;
3197 
3202  unsigned int
3203  n_active_hexs(const unsigned int level) const;
3204 
3209  unsigned int
3210  n_cells() const;
3211 
3216  unsigned int
3217  n_cells(const unsigned int level) const;
3218 
3223  unsigned int
3225 
3233  virtual types::global_cell_index
3235 
3236 
3241  unsigned int
3242  n_active_cells(const unsigned int level) const;
3243 
3248  virtual types::coarse_cell_id
3250 
3256  unsigned int
3257  n_faces() const;
3258 
3264  unsigned int
3266 
3284  unsigned int
3285  n_levels() const;
3286 
3293  virtual unsigned int
3295 
3305  virtual bool
3307 
3315  unsigned int
3316  n_vertices() const;
3317 
3326  const std::vector<Point<spacedim>> &
3327  get_vertices() const;
3328 
3333  unsigned int
3335 
3339  bool
3340  vertex_used(const unsigned int index) const;
3341 
3346  const std::vector<bool> &
3348 
3360  unsigned int
3362 
3369  virtual types::subdomain_id
3371 
3383 
3390 
3391 
3392  /*
3393  * @}
3394  */
3395 
3410  unsigned int
3411  n_raw_lines() const;
3412 
3422  unsigned int
3423  n_raw_lines(const unsigned int level) const;
3424 
3434  unsigned int
3435  n_raw_quads() const;
3436 
3446  unsigned int
3447  n_raw_quads(const unsigned int level) const;
3448 
3458  unsigned int
3459  n_raw_hexs(const unsigned int level) const;
3460 
3470  unsigned int
3471  n_raw_cells(const unsigned int level) const;
3472 
3484  unsigned int
3485  n_raw_faces() const;
3486 
3487  /*
3488  * @}
3489  */
3490 
3499  virtual std::size_t
3501 
3511  template <class Archive>
3512  void
3513  save(Archive &ar, const unsigned int version) const;
3514 
3532  template <class Archive>
3533  void
3534  load(Archive &ar, const unsigned int version);
3535 
3536 
3552  virtual void
3554  const std::vector<GridTools::PeriodicFacePair<cell_iterator>> &);
3555 
3559  const std::map<
3560  std::pair<cell_iterator, unsigned int>,
3561  std::pair<std::pair<cell_iterator, unsigned int>, std::bitset<3>>> &
3563 
3568  const std::vector<ReferenceCell> &
3570 
3575  bool
3577 
3582  bool
3584 
3590  bool
3591  is_mixed_mesh() const;
3592 
3593 #ifdef DOXYGEN
3599  template <class Archive>
3600  void
3601  serialize(Archive &archive, const unsigned int version);
3602 #else
3603  // This macro defines the serialize() method that is compatible with
3604  // the templated save() and load() method that have been implemented.
3605  BOOST_SERIALIZATION_SPLIT_MEMBER()
3606 #endif
3607 
3619  int,
3620  int,
3621  << "You are requesting information from refinement level "
3622  << arg1
3623  << " of a triangulation, but this triangulation only has "
3624  << arg2 << " refinement levels. The given level " << arg1
3625  << " must be *less* than " << arg2 << '.');
3634  int,
3635  int,
3636  << "You are trying to perform an operation on a triangulation "
3637  << "that is only allowed if the triangulation is currently empty. "
3638  << "However, it currently stores " << arg1 << " vertices and has "
3639  << "cells on " << arg2 << " levels.");
3657  int,
3658  << "You tried to do something on level " << arg1
3659  << ", but this level is empty.");
3666 
3676  << "The given boundary_id " << arg1
3677  << " is not defined in this Triangulation!");
3678 
3686  "A cell is flagged for coarsening, but either not all of its siblings "
3687  "are active or flagged for coarsening as well. Please clean up all "
3688  "coarsen flags on your triangulation via "
3689  "Triangulation::prepare_coarsening_and_refinement() beforehand!");
3690 
3691  /*
3692  * @}
3693  */
3694 
3695 protected:
3701 
3706  std::vector<ReferenceCell> reference_cells;
3707 
3721  static void
3722  write_bool_vector(const unsigned int magic_number1,
3723  const std::vector<bool> &v,
3724  const unsigned int magic_number2,
3725  std::ostream & out);
3726 
3731  static void
3732  read_bool_vector(const unsigned int magic_number1,
3733  std::vector<bool> &v,
3734  const unsigned int magic_number2,
3735  std::istream & in);
3736 
3741  void
3743 
3747  virtual void
3749 
3750 
3751 private:
3756  std::unique_ptr<
3759 
3766  std::vector<GridTools::PeriodicFacePair<cell_iterator>>
3768 
3773  std::map<std::pair<cell_iterator, unsigned int>,
3774  std::pair<std::pair<cell_iterator, unsigned int>, std::bitset<3>>>
3776 
3792  TriaRawIterator<TriaAccessor<dim - 1, dim, spacedim>>;
3795  using raw_line_iterator = typename IteratorSelector::raw_line_iterator;
3796  using raw_quad_iterator = typename IteratorSelector::raw_quad_iterator;
3797  using raw_hex_iterator = typename IteratorSelector::raw_hex_iterator;
3798 
3804  begin_raw(const unsigned int level = 0) const;
3805 
3811  end_raw(const unsigned int level) const;
3812 
3813  /*
3814  * @}
3815  */
3816 
3829  begin_raw_line(const unsigned int level = 0) const;
3830 
3849  begin_line(const unsigned int level = 0) const;
3850 
3869  begin_active_line(const unsigned int level = 0) const;
3870 
3876  end_line() const;
3877 
3878  /*
3879  * @}
3880  */
3881 
3907  begin_raw_quad(const unsigned int level = 0) const;
3908 
3927  begin_quad(const unsigned int level = 0) const;
3928 
3947  begin_active_quad(const unsigned int level = 0) const;
3948 
3954  end_quad() const;
3955 
3956  /*
3957  * @}
3958  */
3959 
3984  begin_raw_hex(const unsigned int level = 0) const;
3985 
4003  hex_iterator
4004  begin_hex(const unsigned int level = 0) const;
4005 
4024  begin_active_hex(const unsigned int level = 0) const;
4025 
4030  hex_iterator
4031  end_hex() const;
4032 
4033  /*
4034  * @}
4035  */
4036 
4037 
4051  void
4053 
4057  void
4059 
4066  void
4068 
4072  void
4074 
4078  void
4080 
4096 
4103  void
4105 
4110  void
4112 
4126  virtual unsigned int
4129 
4130 
4143  virtual types::coarse_cell_id
4145  const unsigned int coarse_cell_index) const;
4146 
4151  std::vector<
4152  std::unique_ptr<::internal::TriangulationImplementation::TriaLevel>>
4154 
4160  std::unique_ptr<::internal::TriangulationImplementation::TriaFaces>
4162 
4163 
4167  std::vector<Point<spacedim>> vertices;
4168 
4172  std::vector<bool> vertices_used;
4173 
4178  std::map<types::manifold_id, std::unique_ptr<const Manifold<dim, spacedim>>>
4180 
4185 
4186 
4192 
4203 
4218  std::unique_ptr<std::map<unsigned int, types::boundary_id>>
4220 
4221 
4241  std::unique_ptr<std::map<unsigned int, types::manifold_id>>
4243 
4244  // make a couple of classes friends
4245  template <int, int, int>
4246  friend class TriaAccessorBase;
4247  template <int, int, int>
4248  friend class TriaAccessor;
4249  friend class TriaAccessor<0, 1, spacedim>;
4250 
4251  friend class CellAccessor<dim, spacedim>;
4252 
4253  friend struct ::internal::TriaAccessorImplementation::Implementation;
4254 
4255  friend struct ::internal::TriangulationImplementation::Implementation;
4256  friend struct ::internal::TriangulationImplementation::
4257  ImplementationMixedMesh;
4258 
4259  friend class ::internal::TriangulationImplementation::TriaObjects;
4260 
4261  // explicitly check for sensible template arguments, but not on windows
4262  // because MSVC creates bogus warnings during normal compilation
4263 #ifndef DEAL_II_MSVC
4264  static_assert(dim <= spacedim,
4265  "The dimension <dim> of a Triangulation must be less than or "
4266  "equal to the space dimension <spacedim> in which it lives.");
4267 #endif
4268 };
4269 
4270 
4271 #ifndef DOXYGEN
4272 
4273 
4274 
4275 namespace internal
4276 {
4277  namespace TriangulationImplementation
4278  {
4279  template <class Archive>
4280  void
4281  NumberCache<1>::serialize(Archive &ar, const unsigned int)
4282  {
4283  ar &n_levels;
4284  ar &n_lines &n_lines_level;
4285  ar &n_active_lines &n_active_lines_level;
4286  }
4287 
4288 
4289  template <class Archive>
4290  void
4291  NumberCache<2>::serialize(Archive &ar, const unsigned int version)
4292  {
4293  this->NumberCache<1>::serialize(ar, version);
4294 
4295  ar &n_quads &n_quads_level;
4296  ar &n_active_quads &n_active_quads_level;
4297  }
4298 
4299 
4300  template <class Archive>
4301  void
4302  NumberCache<3>::serialize(Archive &ar, const unsigned int version)
4303  {
4304  this->NumberCache<2>::serialize(ar, version);
4305 
4306  ar &n_hexes &n_hexes_level;
4307  ar &n_active_hexes &n_active_hexes_level;
4308  }
4309 
4310  } // namespace TriangulationImplementation
4311 } // namespace internal
4312 
4313 
4314 template <int dim, int spacedim>
4315 inline bool
4316 Triangulation<dim, spacedim>::vertex_used(const unsigned int index) const
4317 {
4318  AssertIndexRange(index, vertices_used.size());
4319  return vertices_used[index];
4320 }
4321 
4322 
4323 
4324 template <int dim, int spacedim>
4325 inline unsigned int
4327 {
4328  return number_cache.n_levels;
4329 }
4330 
4331 template <int dim, int spacedim>
4332 inline unsigned int
4334 {
4335  return number_cache.n_levels;
4336 }
4337 
4338 
4339 template <int dim, int spacedim>
4340 inline unsigned int
4342 {
4343  return vertices.size();
4344 }
4345 
4346 
4347 
4348 template <int dim, int spacedim>
4349 inline const std::vector<Point<spacedim>> &
4351 {
4352  return vertices;
4353 }
4354 
4355 
4356 template <int dim, int spacedim>
4357 template <class Archive>
4358 void
4359 Triangulation<dim, spacedim>::save(Archive &ar, const unsigned int) const
4360 {
4361  // as discussed in the documentation, do not store the signals as
4362  // well as boundary and manifold description but everything else
4363  ar &smooth_grid;
4364 
4365  unsigned int n_levels = levels.size();
4366  ar & n_levels;
4367  for (const auto &level : levels)
4368  ar &level;
4369 
4370  // boost dereferences a nullptr when serializing a nullptr
4371  // at least up to 1.65.1. This causes problems with clang-5.
4372  // Therefore, work around it.
4373  bool faces_is_nullptr = (faces.get() == nullptr);
4374  ar & faces_is_nullptr;
4375  if (!faces_is_nullptr)
4376  ar &faces;
4377 
4378  ar &vertices;
4379  ar &vertices_used;
4380 
4382  ar &number_cache;
4383 
4385 
4386  if (dim == 1)
4387  {
4390  }
4391 }
4392 
4393 
4394 
4395 template <int dim, int spacedim>
4396 template <class Archive>
4397 void
4398 Triangulation<dim, spacedim>::load(Archive &ar, const unsigned int)
4399 {
4400  // clear previous content. this also calls the respective signal
4401  clear();
4402 
4403  // as discussed in the documentation, do not store the signals as
4404  // well as boundary and manifold description but everything else
4405  ar &smooth_grid;
4406 
4407  unsigned int size;
4408  ar & size;
4409  levels.resize(size);
4410  for (auto &level_ : levels)
4411  {
4412  std::unique_ptr<internal::TriangulationImplementation::TriaLevel> level;
4413  ar & level;
4414  level_ = std::move(level);
4415  }
4416 
4417  // Workaround for nullptr, see in save().
4418  bool faces_is_nullptr = true;
4419  ar & faces_is_nullptr;
4420  if (!faces_is_nullptr)
4421  ar &faces;
4422 
4423  ar &vertices;
4424  ar &vertices_used;
4425 
4427  ar &number_cache;
4428 
4429  // the levels do not serialize the active_cell_indices because
4430  // they are easy enough to rebuild upon re-loading data. do
4431  // this here. don't forget to first resize the fields appropriately
4432  {
4433  for (auto &level : levels)
4434  {
4435  level->active_cell_indices.resize(level->refine_flags.size());
4436  level->global_active_cell_indices.resize(level->refine_flags.size());
4437  level->global_level_cell_indices.resize(level->refine_flags.size());
4438  }
4442  }
4443 
4444  reset_policy();
4445 
4446  bool my_check_for_distorted_cells;
4447  ar & my_check_for_distorted_cells;
4448 
4449  Assert(my_check_for_distorted_cells == check_for_distorted_cells,
4450  ExcMessage("The triangulation loaded into here must have the "
4451  "same setting with regard to reporting distorted "
4452  "cell as the one previously stored."));
4453 
4454  if (dim == 1)
4455  {
4458  }
4459 
4460  // trigger the create signal to indicate
4461  // that new content has been imported into
4462  // the triangulation
4463  signals.create();
4464 }
4465 
4466 
4467 
4468 template <int dim, int spacedim>
4469 inline unsigned int
4472 {
4473  return coarse_cell_id;
4474 }
4475 
4476 
4477 
4478 template <int dim, int spacedim>
4479 inline types::coarse_cell_id
4481  const unsigned int coarse_cell_index) const
4482 {
4483  return coarse_cell_index;
4484 }
4485 
4486 
4487 
4488 /* -------------- declaration of explicit specializations ------------- */
4489 
4490 template <>
4491 unsigned int
4493 template <>
4494 unsigned int
4495 Triangulation<1, 1>::n_quads(const unsigned int level) const;
4496 template <>
4497 unsigned int
4498 Triangulation<1, 1>::n_raw_quads(const unsigned int level) const;
4499 template <>
4500 unsigned int
4501 Triangulation<2, 2>::n_raw_quads(const unsigned int level) const;
4502 template <>
4503 unsigned int
4504 Triangulation<3, 3>::n_raw_quads(const unsigned int level) const;
4505 template <>
4506 unsigned int
4508 template <>
4509 unsigned int
4510 Triangulation<1, 1>::n_active_quads(const unsigned int level) const;
4511 template <>
4512 unsigned int
4514 template <>
4515 unsigned int
4516 Triangulation<1, 1>::n_raw_hexs(const unsigned int level) const;
4517 template <>
4518 unsigned int
4519 Triangulation<3, 3>::n_raw_hexs(const unsigned int level) const;
4520 template <>
4521 unsigned int
4523 template <>
4524 unsigned int
4526 template <>
4527 unsigned int
4528 Triangulation<3, 3>::n_active_hexs(const unsigned int) const;
4529 template <>
4530 unsigned int
4531 Triangulation<3, 3>::n_hexs(const unsigned int level) const;
4532 
4533 template <>
4534 unsigned int
4536 
4537 
4538 // -------------------------------------------------------------------
4539 // -- Explicit specializations for codimension one grids
4540 
4541 
4542 template <>
4543 unsigned int
4545 template <>
4546 unsigned int
4547 Triangulation<1, 2>::n_quads(const unsigned int level) const;
4548 template <>
4549 unsigned int
4550 Triangulation<1, 2>::n_raw_quads(const unsigned int level) const;
4551 template <>
4552 unsigned int
4553 Triangulation<2, 3>::n_raw_quads(const unsigned int level) const;
4554 template <>
4555 unsigned int
4556 Triangulation<1, 2>::n_raw_hexs(const unsigned int level) const;
4557 template <>
4558 unsigned int
4559 Triangulation<1, 2>::n_active_quads(const unsigned int level) const;
4560 template <>
4561 unsigned int
4563 template <>
4564 unsigned int
4566 
4567 // -------------------------------------------------------------------
4568 // -- Explicit specializations for codimension two grids
4569 
4570 template <>
4571 unsigned int
4573 template <>
4574 unsigned int
4575 Triangulation<1, 3>::n_quads(const unsigned int level) const;
4576 template <>
4577 unsigned int
4578 Triangulation<1, 3>::n_raw_quads(const unsigned int level) const;
4579 template <>
4580 unsigned int
4581 Triangulation<2, 3>::n_raw_quads(const unsigned int level) const;
4582 template <>
4583 unsigned int
4584 Triangulation<1, 3>::n_raw_hexs(const unsigned int level) const;
4585 template <>
4586 unsigned int
4587 Triangulation<1, 3>::n_active_quads(const unsigned int level) const;
4588 template <>
4589 unsigned int
4591 template <>
4592 unsigned int
4594 
4595 template <>
4596 bool
4598 template <>
4599 bool
4601 template <>
4602 bool
4604 
4605 
4606 extern template class Triangulation<1, 1>;
4607 extern template class Triangulation<1, 2>;
4608 extern template class Triangulation<1, 3>;
4609 extern template class Triangulation<2, 2>;
4610 extern template class Triangulation<2, 3>;
4611 extern template class Triangulation<3, 3>;
4612 
4613 #endif // DOXYGEN
4614 
4616 
4617 // Include tria_accessor.h here, so that it is possible for an end
4618 // user to use the iterators of Triangulation<dim> directly without
4619 // the need to include tria_accessor.h separately. (Otherwise the
4620 // iterators are an 'opaque' or 'incomplete' type.)
4622 
4623 #endif
Definition: cell_id.h:71
Definition: point.h:111
unsigned int operator()(const cell_iterator &iterator, const CellStatus status)
Definition: tria.h:2330
boost::signals2::slot< signature_type, slot_function_type > slot_type
Definition: tria.h:2235
std::size_t num_slots() const
Definition: tria.h:2284
boost::function< signature_type > slot_function_type
Definition: tria.h:2233
boost::signals2::connection connect(const slot_type &slot, boost::signals2::connect_position position=boost::signals2::at_back)
Definition: tria.h:2261
boost::signals2::signal< signature_type, combiner_type > & new_signal
Definition: tria.h:2344
LegacySignal(boost::signals2::signal< signature_type, combiner_type > &new_signal)
Definition: tria.h:2240
unsigned int(const cell_iterator &, const CellStatus) signature_type
Definition: tria.h:2230
boost::signals2::connection base_weight
Definition: tria.h:2339
void disconnect(const S &connection)
Definition: tria.h:2313
unsigned int n_hexs(const unsigned int level) const
void save_user_flags_line(std::vector< bool > &v) const
virtual types::global_cell_index n_global_active_cells() const
virtual std::vector< types::boundary_id > get_boundary_ids() const
@ patch_level_1
Definition: tria.h:1223
@ smoothing_on_refinement
Definition: tria.h:1322
@ eliminate_refined_boundary_islands
Definition: tria.h:1310
@ do_not_produce_unrefined_islands
Definition: tria.h:1316
@ smoothing_on_coarsening
Definition: tria.h:1328
@ limit_level_difference_at_vertices
Definition: tria.h:1186
@ allow_anisotropic_smoothing
Definition: tria.h:1272
@ coarsest_level_1
Definition: tria.h:1247
@ eliminate_unrefined_islands
Definition: tria.h:1207
@ eliminate_refined_inner_islands
Definition: tria.h:1305
@ maximum_smoothing
Definition: tria.h:1337
virtual const MeshSmoothing & get_mesh_smoothing() const
const std::vector< bool > & get_used_vertices() const
static constexpr unsigned int dimension
Definition: tria.h:1542
quad_iterator begin_quad(const unsigned int level=0) const
typename IteratorSelector::raw_line_iterator raw_line_iterator
Definition: tria.h:3795
active_vertex_iterator begin_active_vertex() const
virtual MPI_Comm get_communicator() const
void load_user_indices_quad(const std::vector< unsigned int > &v)
unsigned int n_quads() const
void load_user_indices(const std::vector< unsigned int > &v)
std::vector< bool > vertices_used
Definition: tria.h:4172
virtual void clear()
bool anisotropic_refinement
Definition: tria.h:4184
active_quad_iterator begin_active_quad(const unsigned int level=0) const
bool get_anisotropic_refinement_flag() const
virtual void create_triangulation(const std::vector< Point< spacedim >> &vertices, const std::vector< CellData< dim >> &cells, const SubCellData &subcelldata)
virtual void copy_triangulation(const Triangulation< dim, spacedim > &other_tria)
virtual types::coarse_cell_id n_global_coarse_cells() const
std::unique_ptr< std::map< unsigned int, types::manifold_id > > vertex_to_manifold_id_map_1d
Definition: tria.h:4242
void save_user_pointers_quad(std::vector< void * > &v) const
void save_user_flags_hex(std::ostream &out) const
void clear_user_flags_quad()
unsigned int n_faces() const
active_hex_iterator begin_active_hex(const unsigned int level=0) const
@ CELL_COARSEN
Definition: tria.h:2039
@ CELL_REFINE
Definition: tria.h:2035
@ CELL_INVALID
Definition: tria.h:2043
@ CELL_PERSIST
Definition: tria.h:2031
static void read_bool_vector(const unsigned int magic_number1, std::vector< bool > &v, const unsigned int magic_number2, std::istream &in)
unsigned int n_active_lines(const unsigned int level) const
bool all_reference_cells_are_hyper_cube() const
void load_user_flags_line(std::istream &in)
void clear_user_data()
raw_hex_iterator begin_raw_hex(const unsigned int level=0) const
void save_user_flags_line(std::ostream &out) const
active_cell_iterator last_active() const
void save(Archive &ar, const unsigned int version) const
void reset_global_cell_indices()
face_iterator end_face() const
void reset_active_cell_indices()
cell_iterator create_cell_iterator(const CellId &cell_id) const
cell_iterator begin(const unsigned int level=0) const
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:3775
void fix_coarsen_flags()
unsigned int n_active_cells(const unsigned int level) const
unsigned int n_cells(const unsigned int level) const
void save_user_pointers_line(std::vector< void * > &v) const
void save_user_flags_quad(std::vector< bool > &v) const
void load_refine_flags(std::istream &in)
void save_user_indices_line(std::vector< unsigned int > &v) const
raw_cell_iterator begin_raw(const unsigned int level=0) const
unsigned int n_lines() const
void load_coarsen_flags(const std::vector< bool > &v)
virtual void set_mesh_smoothing(const MeshSmoothing mesh_smoothing)
unsigned int n_raw_lines() const
virtual std::size_t memory_consumption() const
std::vector< Point< spacedim > > vertices
Definition: tria.h:4167
raw_quad_iterator begin_raw_quad(const unsigned int level=0) const
virtual types::subdomain_id locally_owned_subdomain() const
unsigned int n_raw_faces() const
unsigned int n_active_faces() const
const bool check_for_distorted_cells
Definition: tria.h:4191
raw_cell_iterator end_raw(const unsigned int level) const
line_iterator end_line() const
std::unique_ptr< std::map< unsigned int, types::boundary_id > > vertex_to_boundary_id_map_1d
Definition: tria.h:4219
void load_user_flags_quad(std::istream &in)
unsigned int n_active_cells() const
virtual void update_reference_cells()
std::vector< ReferenceCell > reference_cells
Definition: tria.h:3706
void update_periodic_face_map()
unsigned int n_raw_lines(const unsigned int level) const
void clear_despite_subscriptions()
void coarsen_global(const unsigned int times=1)
void save_user_flags(std::ostream &out) const
void refine_global(const unsigned int times=1)
void load_user_flags_hex(std::istream &in)
void load_user_pointers_quad(const std::vector< void * > &v)
std::unique_ptr<::internal::TriangulationImplementation::TriaFaces > faces
Definition: tria.h:4161
virtual void add_periodicity(const std::vector< GridTools::PeriodicFacePair< cell_iterator >> &)
unsigned int n_used_vertices() const
void reset_cell_vertex_indices_cache()
unsigned int n_active_lines() const
unsigned int n_levels() const
void load_user_flags_hex(const std::vector< bool > &v)
void load_user_indices_line(const std::vector< unsigned int > &v)
void clear_user_flags_hex()
void save_user_pointers_hex(std::vector< void * > &v) const
typename IteratorSelector::raw_quad_iterator raw_quad_iterator
Definition: tria.h:3796
void load_user_pointers(const std::vector< void * > &v)
::internal::TriangulationImplementation::NumberCache< dim > number_cache
Definition: tria.h:4202
void load_user_flags_quad(const std::vector< bool > &v)
void load_user_flags_line(const std::vector< bool > &v)
void save_user_indices_hex(std::vector< unsigned int > &v) const
DistortedCellList execute_refinement()
active_line_iterator begin_active_line(const unsigned int level=0) const
void save_user_indices_quad(std::vector< unsigned int > &v) const
void load_user_pointers_hex(const std::vector< void * > &v)
cell_iterator end() const
virtual bool has_hanging_nodes() const
static constexpr unsigned int space_dimension
Definition: tria.h:1547
std::vector< GridTools::PeriodicFacePair< cell_iterator > > periodic_face_pairs_level_0
Definition: tria.h:3767
unsigned int n_raw_cells(const unsigned int level) const
cell_iterator end(const unsigned int level) const
virtual types::coarse_cell_id coarse_cell_index_to_coarse_cell_id(const unsigned int coarse_cell_index) const
unsigned int n_raw_quads(const unsigned int level) const
void load_coarsen_flags(std::istream &out)
quad_iterator end_quad() const
line_iterator begin_line(const unsigned int level=0) const
unsigned int max_adjacent_cells() const
vertex_iterator begin_vertex() const
void clear_user_flags()
unsigned int n_hexs() const
vertex_iterator end_vertex() const
bool vertex_used(const unsigned int index) const
void load_user_pointers_line(const std::vector< void * > &v)
void save_user_flags(std::vector< bool > &v) const
hex_iterator end_hex() const
const Triangulation< dim, spacedim > & get_triangulation() const
hex_iterator begin_hex(const unsigned int level=0) const
virtual void execute_coarsening_and_refinement()
virtual unsigned int n_global_levels() const
active_cell_iterator end_active(const unsigned int level) const
bool is_mixed_mesh() const
cell_iterator last() const
unsigned int n_active_quads() const
void save_coarsen_flags(std::vector< bool > &v) const
void load_user_indices_hex(const std::vector< unsigned int > &v)
virtual void create_triangulation_compatibility(const std::vector< Point< spacedim >> &vertices, const std::vector< CellData< dim >> &cells, const SubCellData &subcelldata)
unsigned int n_raw_quads() const
void save_user_pointers(std::vector< void * > &v) const
face_iterator begin_face() const
unsigned int n_cells() const
virtual bool prepare_coarsening_and_refinement()
unsigned int n_active_quads(const unsigned int level) const
void load_user_flags(const std::vector< bool > &v)
typename IteratorSelector::raw_hex_iterator raw_hex_iterator
Definition: tria.h:3797
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
std::map< types::manifold_id, std::unique_ptr< const Manifold< dim, spacedim > > > manifolds
Definition: tria.h:4179
void serialize(Archive &archive, const unsigned int version)
void load_refine_flags(const std::vector< bool > &v)
MeshSmoothing smooth_grid
Definition: tria.h:3700
void save_refine_flags(std::ostream &out) const
std::unique_ptr< ::internal::TriangulationImplementation::Policy< dim, spacedim > > policy
Definition: tria.h:3758
Triangulation< dim, spacedim > & get_triangulation()
void save_user_flags_quad(std::ostream &out) const
Signals signals
Definition: tria.h:2448
unsigned int n_active_hexs(const unsigned int level) const
unsigned int n_vertices() const
void load(Archive &ar, const unsigned int version)
void save_user_indices(std::vector< unsigned int > &v) const
void save_user_flags_hex(std::vector< bool > &v) const
bool all_reference_cells_are_simplex() const
std::vector< std::unique_ptr<::internal::TriangulationImplementation::TriaLevel > > levels
Definition: tria.h:4153
unsigned int n_raw_hexs(const unsigned int level) const
void set_all_refine_flags()
unsigned int n_lines(const unsigned int level) const
unsigned int n_active_hexs() const
virtual unsigned int coarse_cell_id_to_coarse_cell_index(const types::coarse_cell_id coarse_cell_id) const
unsigned int n_quads(const unsigned int level) const
void load_user_flags(std::istream &in)
void reset_policy()
const std::vector< ReferenceCell > & get_reference_cells() const
void save_coarsen_flags(std::ostream &out) const
active_face_iterator begin_active_face() const
void clear_user_flags_line()
raw_line_iterator begin_raw_line(const unsigned int level=0) const
static void write_bool_vector(const unsigned int magic_number1, const std::vector< bool > &v, const unsigned int magic_number2, std::ostream &out)
const std::vector< Point< spacedim > > & get_vertices() const
void flip_all_direction_flags()
active_cell_iterator begin_active(const unsigned int level=0) const
void execute_coarsening()
void save_refine_flags(std::vector< bool > &v) const
#define DEAL_II_DEPRECATED
Definition: config.h:164
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443
Point< 2 > first
Definition: grid_out.cc:4604
unsigned int level
Definition: grid_out.cc:4607
IteratorRange< active_cell_iterator > active_cell_iterators() const
IteratorRange< active_face_iterator > active_face_iterators() const
IteratorRange< active_cell_iterator > active_cell_iterators_on_level(const unsigned int level) const
IteratorRange< cell_iterator > cell_iterators() const
IteratorRange< cell_iterator > cell_iterators_on_level(const unsigned int level) const
#define DeclException0(Exception0)
Definition: exceptions.h:464
static ::ExceptionBase & ExcGridReadError()
static ::ExceptionBase & ExcNonOrientableTriangulation()
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcInconsistentCoarseningFlags()
static ::ExceptionBase & ExcFacesHaveNoLevel()
static ::ExceptionBase & ExcTriangulationNotEmpty(int arg1, int arg2)
static ::ExceptionBase & ExcEmptyLevel(int arg1)
#define Assert(cond, exc)
Definition: exceptions.h:1473
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:532
static ::ExceptionBase & ExcInvalidLevel(int arg1, int arg2)
#define AssertIndexRange(index, range)
Definition: exceptions.h:1732
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:487
static ::ExceptionBase & ExcBoundaryIdNotFound(types::boundary_id arg1)
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:509
static ::ExceptionBase & ExcMessage(std::string arg1)
typename IteratorSelector::hex_iterator hex_iterator
Definition: tria.h:1490
typename IteratorSelector::active_quad_iterator active_quad_iterator
Definition: tria.h:1481
typename IteratorSelector::active_hex_iterator active_hex_iterator
Definition: tria.h:1501
typename IteratorSelector::quad_iterator quad_iterator
Definition: tria.h:1466
typename IteratorSelector::line_iterator line_iterator
Definition: tria.h:1442
TriaIterator< CellAccessor< dim, spacedim > > cell_iterator
Definition: tria.h:1355
typename IteratorSelector::active_line_iterator active_line_iterator
Definition: tria.h:1457
virtual std::vector< types::manifold_id > get_manifold_ids() const
void set_all_manifold_ids_on_boundary(const types::manifold_id number)
void reset_manifold(const types::manifold_id manifold_number)
void set_manifold(const types::manifold_id number, const Manifold< dim, spacedim > &manifold_object)
const Manifold< dim, spacedim > & get_manifold(const types::manifold_id number) const
void reset_all_manifolds()
void set_all_manifold_ids(const types::manifold_id number)
static const char T
std::enable_if< std::is_fundamental< T >::value, std::size_t >::type memory_consumption(const T &t)
Definition: types.h:32
unsigned int manifold_id
Definition: types.h:141
global_cell_index coarse_cell_id
Definition: types.h:114
unsigned int subdomain_id
Definition: types.h:43
unsigned int global_cell_index
Definition: types.h:105
unsigned int boundary_id
Definition: types.h:129
T operator()(InputIterator first, InputIterator last) const
Definition: tria.h:2058
virtual ~DistortedCellList() noexcept override
std::list< typename Triangulation< dim, spacedim >::cell_iterator > distorted_cells
Definition: tria.h:1536
boost::signals2::signal< unsigned int(const cell_iterator &, const CellStatus), CellWeightSum< unsigned int > > weight
Definition: tria.h:2212
boost::signals2::signal< void()> mesh_movement
Definition: tria.h:2115
boost::signals2::signal< void()> post_distributed_load
Definition: tria.h:2442
boost::signals2::signal< void()> pre_distributed_save
Definition: tria.h:2420
boost::signals2::signal< void(const Triangulation< dim, spacedim > &destination_tria)> copy
Definition: tria.h:2146
boost::signals2::signal< void()> pre_distributed_refinement
Definition: tria.h:2379
boost::signals2::signal< void()> post_distributed_refinement
Definition: tria.h:2398
boost::signals2::signal< void()> pre_refinement
Definition: tria.h:2091
boost::signals2::signal< void()> any_change
Definition: tria.h:2172
boost::signals2::signal< void()> create
Definition: tria.h:2082
boost::signals2::signal< void()> clear
Definition: tria.h:2161
boost::signals2::signal< void(const typename Triangulation< dim, spacedim >::cell_iterator &cell)> post_refinement_on_cell
Definition: tria.h:2136
LegacySignal cell_weight
Definition: tria.h:2366
boost::signals2::signal< void(const typename Triangulation< dim, spacedim >::cell_iterator &cell)> pre_coarsening_on_cell
Definition: tria.h:2126
boost::signals2::signal< void()> post_refinement
Definition: tria.h:2098
boost::signals2::signal< void()> pre_partition
Definition: tria.h:2106
boost::signals2::signal< void()> pre_distributed_repartition
Definition: tria.h:2405
boost::signals2::signal< void()> pre_distributed_load
Definition: tria.h:2435
boost::signals2::signal< void()> post_p4est_refinement
Definition: tria.h:2388
boost::signals2::signal< void()> post_distributed_repartition
Definition: tria.h:2412
boost::signals2::signal< void()> post_distributed_save
Definition: tria.h:2427
void serialize(Archive &ar, const unsigned int version)
std::vector< unsigned int > n_active_lines_level
Definition: tria.h:177
std::vector< unsigned int > n_active_quads_level
Definition: tria.h:235
void serialize(Archive &ar, const unsigned int version)
void serialize(Archive &ar, const unsigned int version)
std::vector< unsigned int > n_active_hexes_level
Definition: tria.h:294
const ::Triangulation< dim, spacedim > & tria