Reference documentation for deal.II version GIT 85a786e179 2022-11-27 23:15:01+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 
25 #include <deal.II/base/point.h>
28 
29 #include <deal.II/grid/cell_id.h>
33 
34 #include <boost/serialization/map.hpp>
35 #include <boost/serialization/split_member.hpp>
36 #include <boost/serialization/unique_ptr.hpp>
37 #include <boost/serialization/vector.hpp>
38 #include <boost/signals2.hpp>
39 
40 #include <bitset>
41 #include <functional>
42 #include <list>
43 #include <map>
44 #include <memory>
45 #include <numeric>
46 #include <vector>
47 
48 
50 
51 #ifdef signals
52 # error \
53  "The name 'signals' is already defined. You are most likely using the QT library \
54 and using the 'signals' keyword. You can either #include the Qt headers (or any conflicting headers) \
55 *after* the deal.II headers or you can define the 'QT_NO_KEYWORDS' macro and use the 'Q_SIGNALS' macro."
56 #endif
57 
58 // Forward declarations
59 #ifndef DOXYGEN
60 template <int dim, int spacedim>
61 class Manifold;
62 
63 template <int dim>
64 struct CellData;
65 
66 struct SubCellData;
67 
69 {
70  template <int, int>
71  struct Description;
72 }
73 
74 namespace GridTools
75 {
76  template <typename CellIterator>
77  struct PeriodicFacePair;
78 }
79 
80 template <int, int, int>
81 class TriaAccessor;
82 template <int spacedim>
83 class TriaAccessor<0, 1, spacedim>;
84 template <int, int, int>
85 class TriaAccessorBase;
86 
87 namespace internal
88 {
89  namespace TriangulationImplementation
90  {
91  class TriaFaces;
92 
93  class TriaObjects;
94 
95  template <int, int>
96  class Policy;
97 
103  struct Implementation;
104  struct ImplementationMixedMesh;
105  } // namespace TriangulationImplementation
106 
107  namespace TriaAccessorImplementation
108  {
109  struct Implementation;
110  }
111 } // namespace internal
112 #endif
113 
114 
115 /*------------------------------------------------------------------------*/
116 
117 
118 namespace internal
119 {
124  namespace TriangulationImplementation
125  {
137  template <int dim>
138  struct NumberCache
139  {};
140 
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  std::shared_ptr<const Utilities::MPI::Partitioner>
185 
189  std::vector<std::shared_ptr<const Utilities::MPI::Partitioner>>
191 
195  NumberCache();
196 
201  std::size_t
202  memory_consumption() const;
203 
209  template <class Archive>
210  void
211  serialize(Archive &ar, const unsigned int version);
212  };
213 
214 
227  template <>
228  struct NumberCache<2> : public NumberCache<1>
229  {
233  unsigned int n_quads;
234 
238  std::vector<unsigned int> n_quads_level;
239 
243  unsigned int n_active_quads;
244 
248  std::vector<unsigned int> n_active_quads_level;
249 
253  NumberCache();
254 
259  std::size_t
260  memory_consumption() const;
261 
267  template <class Archive>
268  void
269  serialize(Archive &ar, const unsigned int version);
270  };
271 
272 
286  template <>
287  struct NumberCache<3> : public NumberCache<2>
288  {
292  unsigned int n_hexes;
293 
297  std::vector<unsigned int> n_hexes_level;
298 
302  unsigned int n_active_hexes;
303 
307  std::vector<unsigned int> n_active_hexes_level;
308 
312  NumberCache();
313 
318  std::size_t
319  memory_consumption() const;
320 
326  template <class Archive>
327  void
328  serialize(Archive &ar, const unsigned int version);
329  };
330  } // namespace TriangulationImplementation
331 } // namespace internal
332 
333 
334 /*------------------------------------------------------------------------*/
335 
336 
1133 template <int dim, int spacedim = dim>
1135 {
1136 private:
1143 
1144 public:
1150  {
1155  none = 0x0,
1330 
1344 
1351  };
1352 
1369 
1375 
1393 
1407  using face_iterator = TriaIterator<TriaAccessor<dim - 1, dim, spacedim>>;
1408 
1421  TriaActiveIterator<TriaAccessor<dim - 1, dim, spacedim>>;
1422 
1432 
1447 
1455  using line_iterator = typename IteratorSelector::line_iterator;
1456 
1470  using active_line_iterator = typename IteratorSelector::active_line_iterator;
1471 
1479  using quad_iterator = typename IteratorSelector::quad_iterator;
1480 
1494  using active_quad_iterator = typename IteratorSelector::active_quad_iterator;
1495 
1503  using hex_iterator = typename IteratorSelector::hex_iterator;
1504 
1514  using active_hex_iterator = typename IteratorSelector::active_hex_iterator;
1515 
1535  {
1542  virtual ~DistortedCellList() noexcept override;
1543 
1548  std::list<typename Triangulation<dim, spacedim>::cell_iterator>
1550  };
1551 
1555  static constexpr unsigned int dimension = dim;
1556 
1560  static constexpr unsigned int space_dimension = spacedim;
1561 
1577  const bool check_for_distorted_cells = false);
1578 
1594  Triangulation(const Triangulation<dim, spacedim> &) = delete;
1595 
1602  Triangulation(Triangulation<dim, spacedim> &&tria) noexcept;
1603 
1607  Triangulation &
1608  operator=(Triangulation<dim, spacedim> &&tria) noexcept;
1609 
1613  virtual ~Triangulation() override;
1614 
1621  virtual void
1623 
1628  virtual MPI_Comm
1630 
1636  virtual const std::weak_ptr<const Utilities::MPI::Partitioner>
1638 
1644  virtual const std::weak_ptr<const Utilities::MPI::Partitioner>
1645  global_level_cell_index_partitioner(const unsigned int level) const;
1646 
1652  virtual void
1653  set_mesh_smoothing(const MeshSmoothing mesh_smoothing);
1654 
1658  virtual const MeshSmoothing &
1660 
1683  void
1685  const Manifold<dim, spacedim> &manifold_object);
1686 
1699  void
1700  reset_manifold(const types::manifold_id manifold_number);
1701 
1713  void
1715 
1724  void
1726 
1735  void
1737 
1747  void
1749  const types::manifold_id number);
1750 
1762  const Manifold<dim, spacedim> &
1763  get_manifold(const types::manifold_id number) const;
1764 
1777  virtual std::vector<types::boundary_id>
1779 
1792  virtual std::vector<types::manifold_id>
1794 
1821  virtual void
1822  copy_triangulation(const Triangulation<dim, spacedim> &other_tria);
1823 
1871  virtual void
1872  create_triangulation(const std::vector<Point<spacedim>> &vertices,
1873  const std::vector<CellData<dim>> & cells,
1874  const SubCellData & subcelldata);
1875 
1888  virtual void
1890  const TriangulationDescription::Description<dim, spacedim>
1891  &construction_data);
1892 
1902  virtual void
1904  const std::vector<Point<spacedim>> &vertices,
1905  const std::vector<CellData<dim>> & cells,
1906  const SubCellData & subcelldata);
1907 
1914  void
1916 
1928  void
1930 
1953  void
1954  refine_global(const unsigned int times = 1);
1955 
1968  void
1969  coarsen_global(const unsigned int times = 1);
1970 
2002  virtual void
2004 
2034  virtual bool
2036 
2037  /*
2038  * @}
2039  */
2040 
2055  {
2072  CELL_INVALID
2073  };
2074 
2080  template <typename T>
2082  {
2083  using result_type = T;
2084 
2085  template <typename InputIterator>
2086  T
2087  operator()(InputIterator first, InputIterator last) const
2088  {
2089  return std::accumulate(first, last, T());
2090  }
2091  };
2092 
2102  struct Signals
2103  {
2111  boost::signals2::signal<void()> create;
2112 
2120  boost::signals2::signal<void()> pre_refinement;
2121 
2127  boost::signals2::signal<void()> post_refinement;
2128 
2135  boost::signals2::signal<void()> pre_partition;
2136 
2144  boost::signals2::signal<void()> mesh_movement;
2145 
2153  boost::signals2::signal<void(
2154  const typename Triangulation<dim, spacedim>::cell_iterator &cell)>
2156 
2163  boost::signals2::signal<void(
2164  const typename Triangulation<dim, spacedim>::cell_iterator &cell)>
2166 
2173  boost::signals2::signal<void(
2174  const Triangulation<dim, spacedim> &destination_tria)>
2176 
2190  boost::signals2::signal<void()> clear;
2191 
2201  boost::signals2::signal<void()> any_change;
2202 
2238  boost::signals2::signal<unsigned int(const cell_iterator &,
2239  const CellStatus),
2242 
2249  : cell_weight(weight)
2250  {}
2251 
2256  {
2257  public:
2258  using signature_type = unsigned int(const cell_iterator &,
2259  const CellStatus);
2261 
2262  using slot_function_type = boost::function<signature_type>;
2263  using slot_type =
2264  boost::signals2::slot<signature_type, slot_function_type>;
2265 
2270  boost::signals2::signal<signature_type, combiner_type> &new_signal)
2271  : new_signal(new_signal)
2272  {}
2273 
2278  {
2279  base_weight.disconnect();
2280  }
2281 
2289  boost::signals2::connection
2291  const slot_type & slot,
2292  boost::signals2::connect_position position = boost::signals2::at_back)
2293  {
2294  if (base_weight.connected() == false)
2295  {
2296  base_weight = new_signal.connect(
2297  [](const cell_iterator &, const CellStatus) -> unsigned int {
2298  return 1000;
2299  });
2300  Assert(base_weight.connected() && new_signal.num_slots() == 1,
2301  ExcInternalError());
2302  }
2303 
2304  return new_signal.connect(slot, position);
2305  }
2306 
2312  std::size_t
2313  num_slots() const
2314  {
2315  return new_signal.num_slots() -
2316  static_cast<std::size_t>(base_weight.connected());
2317  }
2318 
2323  bool
2324  empty() const
2325  {
2326  if (num_slots() == 0)
2327  {
2328  Assert(new_signal.num_slots() == 0, ExcInternalError());
2329  return true;
2330  }
2331  return false;
2332  }
2333 
2340  template <typename S>
2341  DEAL_II_DEPRECATED void
2342  disconnect(const S &connection)
2343  {
2344  new_signal.disconnect(connection);
2345 
2346  if (num_slots() == 0)
2347  {
2348  Assert(base_weight.connected() && new_signal.num_slots() == 1,
2349  ExcInternalError());
2350  new_signal.disconnect(base_weight);
2351  }
2352  }
2353 
2358  unsigned int
2359  operator()(const cell_iterator &iterator, const CellStatus status)
2360  {
2361  return new_signal(iterator, status);
2362  }
2363 
2364  private:
2368  boost::signals2::connection base_weight;
2369 
2373  boost::signals2::signal<signature_type, combiner_type> &new_signal;
2374  };
2375 
2396 
2408  boost::signals2::signal<void()> pre_distributed_refinement;
2409 
2417  boost::signals2::signal<void()> post_p4est_refinement;
2418 
2427  boost::signals2::signal<void()> post_distributed_refinement;
2428 
2434  boost::signals2::signal<void()> pre_distributed_repartition;
2435 
2441  boost::signals2::signal<void()> post_distributed_repartition;
2442 
2449  boost::signals2::signal<void()> pre_distributed_save;
2450 
2456  boost::signals2::signal<void()> post_distributed_save;
2457 
2464  boost::signals2::signal<void()> pre_distributed_load;
2465 
2471  boost::signals2::signal<void()> post_distributed_load;
2472  };
2473 
2477  mutable Signals signals;
2478 
2479  /*
2480  * @}
2481  */
2482 
2492  void
2493  save_refine_flags(std::ostream &out) const;
2494 
2498  void
2499  save_refine_flags(std::vector<bool> &v) const;
2500 
2504  void
2505  load_refine_flags(std::istream &in);
2506 
2510  void
2511  load_refine_flags(const std::vector<bool> &v);
2512 
2516  void
2517  save_coarsen_flags(std::ostream &out) const;
2518 
2522  void
2523  save_coarsen_flags(std::vector<bool> &v) const;
2524 
2528  void
2529  load_coarsen_flags(std::istream &out);
2530 
2534  void
2535  load_coarsen_flags(const std::vector<bool> &v);
2536 
2541  bool
2543 
2544  /*
2545  * @}
2546  */
2547 
2557  void
2559 
2565  void
2566  save_user_flags(std::ostream &out) const;
2567 
2573  void
2574  save_user_flags(std::vector<bool> &v) const;
2575 
2580  void
2581  load_user_flags(std::istream &in);
2582 
2587  void
2588  load_user_flags(const std::vector<bool> &v);
2589 
2594  void
2596 
2601  void
2602  save_user_flags_line(std::ostream &out) const;
2603 
2609  void
2610  save_user_flags_line(std::vector<bool> &v) const;
2611 
2616  void
2617  load_user_flags_line(std::istream &in);
2618 
2623  void
2624  load_user_flags_line(const std::vector<bool> &v);
2625 
2630  void
2632 
2637  void
2638  save_user_flags_quad(std::ostream &out) const;
2639 
2645  void
2646  save_user_flags_quad(std::vector<bool> &v) const;
2647 
2652  void
2653  load_user_flags_quad(std::istream &in);
2654 
2659  void
2660  load_user_flags_quad(const std::vector<bool> &v);
2661 
2662 
2667  void
2669 
2674  void
2675  save_user_flags_hex(std::ostream &out) const;
2676 
2682  void
2683  save_user_flags_hex(std::vector<bool> &v) const;
2684 
2689  void
2690  load_user_flags_hex(std::istream &in);
2691 
2696  void
2697  load_user_flags_hex(const std::vector<bool> &v);
2698 
2704  void
2706 
2712  void
2713  save_user_indices(std::vector<unsigned int> &v) const;
2714 
2719  void
2720  load_user_indices(const std::vector<unsigned int> &v);
2721 
2727  void
2728  save_user_pointers(std::vector<void *> &v) const;
2729 
2734  void
2735  load_user_pointers(const std::vector<void *> &v);
2736 
2742  void
2743  save_user_indices_line(std::vector<unsigned int> &v) const;
2744 
2749  void
2750  load_user_indices_line(const std::vector<unsigned int> &v);
2751 
2757  void
2758  save_user_indices_quad(std::vector<unsigned int> &v) const;
2759 
2764  void
2765  load_user_indices_quad(const std::vector<unsigned int> &v);
2766 
2772  void
2773  save_user_indices_hex(std::vector<unsigned int> &v) const;
2774 
2779  void
2780  load_user_indices_hex(const std::vector<unsigned int> &v);
2786  void
2787  save_user_pointers_line(std::vector<void *> &v) const;
2788 
2793  void
2794  load_user_pointers_line(const std::vector<void *> &v);
2795 
2801  void
2802  save_user_pointers_quad(std::vector<void *> &v) const;
2803 
2808  void
2809  load_user_pointers_quad(const std::vector<void *> &v);
2810 
2816  void
2817  save_user_pointers_hex(std::vector<void *> &v) const;
2818 
2823  void
2824  load_user_pointers_hex(const std::vector<void *> &v);
2825 
2826  /*
2827  * @}
2828  */
2829 
2853  begin(const unsigned int level = 0) const;
2854 
2886  begin_active(const unsigned int level = 0) const;
2887 
2893  end() const;
2894 
2914  end(const unsigned int level) const;
2915 
2936  end_active(const unsigned int level) const;
2937 
2938 
2943  last() const;
2944 
2949  last_active() const;
2950 
2964  create_cell_iterator(const CellId &cell_id) const;
2965 
2982 
3020 
3037  cell_iterators_on_level(const unsigned int level) const;
3038 
3055  active_cell_iterators_on_level(const unsigned int level) const;
3056 
3057  /*
3058  * @}
3059  */
3060 
3061  /*-------------------------------------------------------------------------*/
3062 
3072  begin_face() const;
3073 
3079 
3085  end_face() const;
3086 
3107 
3108  /*
3109  * @}
3110  */
3111 
3112  /*-------------------------------------------------------------------------*/
3113 
3124  begin_vertex() const;
3125 
3133 
3140  end_vertex() const;
3141 
3142  /*
3143  * @}
3144  */
3145 
3163  unsigned int
3164  n_lines() const;
3165 
3169  unsigned int
3170  n_lines(const unsigned int level) const;
3171 
3175  unsigned int
3177 
3181  unsigned int
3182  n_active_lines(const unsigned int level) const;
3183 
3187  unsigned int
3188  n_quads() const;
3189 
3193  unsigned int
3194  n_quads(const unsigned int level) const;
3195 
3199  unsigned int
3201 
3205  unsigned int
3206  n_active_quads(const unsigned int level) const;
3207 
3211  unsigned int
3212  n_hexs() const;
3213 
3218  unsigned int
3219  n_hexs(const unsigned int level) const;
3220 
3224  unsigned int
3225  n_active_hexs() const;
3226 
3231  unsigned int
3232  n_active_hexs(const unsigned int level) const;
3233 
3238  unsigned int
3239  n_cells() const;
3240 
3245  unsigned int
3246  n_cells(const unsigned int level) const;
3247 
3252  unsigned int
3254 
3262  virtual types::global_cell_index
3264 
3265 
3270  unsigned int
3271  n_active_cells(const unsigned int level) const;
3272 
3277  virtual types::coarse_cell_id
3279 
3285  unsigned int
3286  n_faces() const;
3287 
3293  unsigned int
3295 
3313  unsigned int
3314  n_levels() const;
3315 
3322  virtual unsigned int
3324 
3334  virtual bool
3336 
3344  unsigned int
3345  n_vertices() const;
3346 
3355  const std::vector<Point<spacedim>> &
3356  get_vertices() const;
3357 
3362  unsigned int
3364 
3368  bool
3369  vertex_used(const unsigned int index) const;
3370 
3375  const std::vector<bool> &
3377 
3389  unsigned int
3391 
3398  virtual types::subdomain_id
3400 
3412 
3419 
3420 
3421  /*
3422  * @}
3423  */
3424 
3439  unsigned int
3440  n_raw_lines() const;
3441 
3451  unsigned int
3452  n_raw_lines(const unsigned int level) const;
3453 
3463  unsigned int
3464  n_raw_quads() const;
3465 
3475  unsigned int
3476  n_raw_quads(const unsigned int level) const;
3477 
3487  unsigned int
3488  n_raw_hexs(const unsigned int level) const;
3489 
3499  unsigned int
3500  n_raw_cells(const unsigned int level) const;
3501 
3513  unsigned int
3514  n_raw_faces() const;
3515 
3516  /*
3517  * @}
3518  */
3519 
3528  virtual std::size_t
3530 
3540  template <class Archive>
3541  void
3542  save(Archive &ar, const unsigned int version) const;
3543 
3561  template <class Archive>
3562  void
3563  load(Archive &ar, const unsigned int version);
3564 
3565 
3581  virtual void
3583  const std::vector<GridTools::PeriodicFacePair<cell_iterator>> &);
3584 
3588  const std::map<
3589  std::pair<cell_iterator, unsigned int>,
3590  std::pair<std::pair<cell_iterator, unsigned int>, std::bitset<3>>> &
3592 
3597  const std::vector<ReferenceCell> &
3599 
3604  bool
3606 
3611  bool
3613 
3619  bool
3620  is_mixed_mesh() const;
3621 
3622 #ifdef DOXYGEN
3628  template <class Archive>
3629  void
3630  serialize(Archive &archive, const unsigned int version);
3631 #else
3632  // This macro defines the serialize() method that is compatible with
3633  // the templated save() and load() method that have been implemented.
3634  BOOST_SERIALIZATION_SPLIT_MEMBER()
3635 #endif
3636 
3648  int,
3649  int,
3650  << "You are requesting information from refinement level "
3651  << arg1
3652  << " of a triangulation, but this triangulation only has "
3653  << arg2 << " refinement levels. The given level " << arg1
3654  << " must be *less* than " << arg2 << '.');
3663  int,
3664  int,
3665  << "You are trying to perform an operation on a triangulation "
3666  << "that is only allowed if the triangulation is currently empty. "
3667  << "However, it currently stores " << arg1 << " vertices and has "
3668  << "cells on " << arg2 << " levels.");
3686  int,
3687  << "You tried to do something on level " << arg1
3688  << ", but this level is empty.");
3695 
3705  << "The given boundary_id " << arg1
3706  << " is not defined in this Triangulation!");
3707 
3715  "A cell is flagged for coarsening, but either not all of its siblings "
3716  "are active or flagged for coarsening as well. Please clean up all "
3717  "coarsen flags on your triangulation via "
3718  "Triangulation::prepare_coarsening_and_refinement() beforehand!");
3719 
3720  /*
3721  * @}
3722  */
3723 
3724 protected:
3730 
3735  std::vector<ReferenceCell> reference_cells;
3736 
3750  static void
3751  write_bool_vector(const unsigned int magic_number1,
3752  const std::vector<bool> &v,
3753  const unsigned int magic_number2,
3754  std::ostream & out);
3755 
3760  static void
3761  read_bool_vector(const unsigned int magic_number1,
3762  std::vector<bool> &v,
3763  const unsigned int magic_number2,
3764  std::istream & in);
3765 
3770  void
3772 
3776  virtual void
3778 
3779 
3780 private:
3785  std::unique_ptr<
3788 
3795  std::vector<GridTools::PeriodicFacePair<cell_iterator>>
3797 
3802  std::map<std::pair<cell_iterator, unsigned int>,
3803  std::pair<std::pair<cell_iterator, unsigned int>, std::bitset<3>>>
3805 
3821  TriaRawIterator<TriaAccessor<dim - 1, dim, spacedim>>;
3824  using raw_line_iterator = typename IteratorSelector::raw_line_iterator;
3825  using raw_quad_iterator = typename IteratorSelector::raw_quad_iterator;
3826  using raw_hex_iterator = typename IteratorSelector::raw_hex_iterator;
3827 
3833  begin_raw(const unsigned int level = 0) const;
3834 
3840  end_raw(const unsigned int level) const;
3841 
3842  /*
3843  * @}
3844  */
3845 
3858  begin_raw_line(const unsigned int level = 0) const;
3859 
3878  begin_line(const unsigned int level = 0) const;
3879 
3898  begin_active_line(const unsigned int level = 0) const;
3899 
3905  end_line() const;
3906 
3907  /*
3908  * @}
3909  */
3910 
3936  begin_raw_quad(const unsigned int level = 0) const;
3937 
3956  begin_quad(const unsigned int level = 0) const;
3957 
3976  begin_active_quad(const unsigned int level = 0) const;
3977 
3983  end_quad() const;
3984 
3985  /*
3986  * @}
3987  */
3988 
4013  begin_raw_hex(const unsigned int level = 0) const;
4014 
4032  hex_iterator
4033  begin_hex(const unsigned int level = 0) const;
4034 
4053  begin_active_hex(const unsigned int level = 0) const;
4054 
4059  hex_iterator
4060  end_hex() const;
4061 
4062  /*
4063  * @}
4064  */
4065 
4066 
4080  void
4082 
4086  void
4088 
4095  void
4097 
4101  void
4103 
4107  void
4109 
4125 
4132  void
4134 
4139  void
4141 
4155  virtual unsigned int
4158 
4159 
4172  virtual types::coarse_cell_id
4174  const unsigned int coarse_cell_index) const;
4175 
4180  std::vector<
4181  std::unique_ptr<::internal::TriangulationImplementation::TriaLevel>>
4183 
4189  std::unique_ptr<::internal::TriangulationImplementation::TriaFaces>
4191 
4192 
4196  std::vector<Point<spacedim>> vertices;
4197 
4201  std::vector<bool> vertices_used;
4202 
4207  std::map<types::manifold_id, std::unique_ptr<const Manifold<dim, spacedim>>>
4209 
4214 
4215 
4221 
4232 
4247  std::unique_ptr<std::map<unsigned int, types::boundary_id>>
4249 
4250 
4270  std::unique_ptr<std::map<unsigned int, types::manifold_id>>
4272 
4273  // make a couple of classes friends
4274  template <int, int, int>
4275  friend class TriaAccessorBase;
4276  template <int, int, int>
4277  friend class TriaAccessor;
4278  friend class TriaAccessor<0, 1, spacedim>;
4279 
4280  friend class CellAccessor<dim, spacedim>;
4281 
4282  friend struct ::internal::TriaAccessorImplementation::Implementation;
4283 
4284  friend struct ::internal::TriangulationImplementation::Implementation;
4285  friend struct ::internal::TriangulationImplementation::
4286  ImplementationMixedMesh;
4287 
4288  friend class ::internal::TriangulationImplementation::TriaObjects;
4289 
4290  // explicitly check for sensible template arguments, but not on windows
4291  // because MSVC creates bogus warnings during normal compilation
4292 #ifndef DEAL_II_MSVC
4293  static_assert(dim <= spacedim,
4294  "The dimension <dim> of a Triangulation must be less than or "
4295  "equal to the space dimension <spacedim> in which it lives.");
4296 #endif
4297 };
4298 
4299 
4300 #ifndef DOXYGEN
4301 
4302 
4303 
4304 namespace internal
4305 {
4306  namespace TriangulationImplementation
4307  {
4308  template <class Archive>
4309  void
4310  NumberCache<1>::serialize(Archive &ar, const unsigned int)
4311  {
4312  ar &n_levels;
4313  ar &n_lines &n_lines_level;
4314  ar &n_active_lines &n_active_lines_level;
4315  }
4316 
4317 
4318  template <class Archive>
4319  void
4320  NumberCache<2>::serialize(Archive &ar, const unsigned int version)
4321  {
4322  this->NumberCache<1>::serialize(ar, version);
4323 
4324  ar &n_quads &n_quads_level;
4325  ar &n_active_quads &n_active_quads_level;
4326  }
4327 
4328 
4329  template <class Archive>
4330  void
4331  NumberCache<3>::serialize(Archive &ar, const unsigned int version)
4332  {
4333  this->NumberCache<2>::serialize(ar, version);
4334 
4335  ar &n_hexes &n_hexes_level;
4336  ar &n_active_hexes &n_active_hexes_level;
4337  }
4338 
4339  } // namespace TriangulationImplementation
4340 } // namespace internal
4341 
4342 
4343 template <int dim, int spacedim>
4344 inline bool
4345 Triangulation<dim, spacedim>::vertex_used(const unsigned int index) const
4346 {
4347  AssertIndexRange(index, vertices_used.size());
4348  return vertices_used[index];
4349 }
4350 
4351 
4352 
4353 template <int dim, int spacedim>
4354 inline unsigned int
4356 {
4357  return number_cache.n_levels;
4358 }
4359 
4360 template <int dim, int spacedim>
4361 inline unsigned int
4363 {
4364  return number_cache.n_levels;
4365 }
4366 
4367 
4368 template <int dim, int spacedim>
4369 inline unsigned int
4371 {
4372  return vertices.size();
4373 }
4374 
4375 
4376 
4377 template <int dim, int spacedim>
4378 inline const std::vector<Point<spacedim>> &
4380 {
4381  return vertices;
4382 }
4383 
4384 
4385 template <int dim, int spacedim>
4386 template <class Archive>
4387 void
4388 Triangulation<dim, spacedim>::save(Archive &ar, const unsigned int) const
4389 {
4390  // as discussed in the documentation, do not store the signals as
4391  // well as boundary and manifold description but everything else
4392  ar &smooth_grid;
4393 
4394  unsigned int n_levels = levels.size();
4395  ar & n_levels;
4396  for (const auto &level : levels)
4397  ar &level;
4398 
4399  // boost dereferences a nullptr when serializing a nullptr
4400  // at least up to 1.65.1. This causes problems with clang-5.
4401  // Therefore, work around it.
4402  bool faces_is_nullptr = (faces.get() == nullptr);
4403  ar & faces_is_nullptr;
4404  if (!faces_is_nullptr)
4405  ar &faces;
4406 
4407  ar &vertices;
4408  ar &vertices_used;
4409 
4411  ar &number_cache;
4412 
4414 
4415  if (dim == 1)
4416  {
4419  }
4420 }
4421 
4422 
4423 
4424 template <int dim, int spacedim>
4425 template <class Archive>
4426 void
4427 Triangulation<dim, spacedim>::load(Archive &ar, const unsigned int)
4428 {
4429  // clear previous content. this also calls the respective signal
4430  clear();
4431 
4432  // as discussed in the documentation, do not store the signals as
4433  // well as boundary and manifold description but everything else
4434  ar &smooth_grid;
4435 
4436  unsigned int size;
4437  ar & size;
4438  levels.resize(size);
4439  for (auto &level_ : levels)
4440  {
4441  std::unique_ptr<internal::TriangulationImplementation::TriaLevel> level;
4442  ar & level;
4443  level_ = std::move(level);
4444  }
4445 
4446  // Workaround for nullptr, see in save().
4447  bool faces_is_nullptr = true;
4448  ar & faces_is_nullptr;
4449  if (!faces_is_nullptr)
4450  ar &faces;
4451 
4452  ar &vertices;
4453  ar &vertices_used;
4454 
4456  ar &number_cache;
4457 
4458  // the levels do not serialize the active_cell_indices because
4459  // they are easy enough to rebuild upon re-loading data. do
4460  // this here. don't forget to first resize the fields appropriately
4461  {
4462  for (auto &level : levels)
4463  {
4464  level->active_cell_indices.resize(level->refine_flags.size());
4465  level->global_active_cell_indices.resize(level->refine_flags.size());
4466  level->global_level_cell_indices.resize(level->refine_flags.size());
4467  }
4471  }
4472 
4473  reset_policy();
4474 
4475  bool my_check_for_distorted_cells;
4476  ar & my_check_for_distorted_cells;
4477 
4478  Assert(my_check_for_distorted_cells == check_for_distorted_cells,
4479  ExcMessage("The triangulation loaded into here must have the "
4480  "same setting with regard to reporting distorted "
4481  "cell as the one previously stored."));
4482 
4483  if (dim == 1)
4484  {
4487  }
4488 
4489  // trigger the create signal to indicate
4490  // that new content has been imported into
4491  // the triangulation
4492  signals.create();
4493 }
4494 
4495 
4496 
4497 template <int dim, int spacedim>
4498 inline unsigned int
4501 {
4502  return coarse_cell_id;
4503 }
4504 
4505 
4506 
4507 template <int dim, int spacedim>
4508 inline types::coarse_cell_id
4510  const unsigned int coarse_cell_index) const
4511 {
4512  return coarse_cell_index;
4513 }
4514 
4515 
4516 
4517 /* -------------- declaration of explicit specializations ------------- */
4518 
4519 template <>
4520 unsigned int
4522 template <>
4523 unsigned int
4524 Triangulation<1, 1>::n_quads(const unsigned int level) const;
4525 template <>
4526 unsigned int
4527 Triangulation<1, 1>::n_raw_quads(const unsigned int level) const;
4528 template <>
4529 unsigned int
4530 Triangulation<2, 2>::n_raw_quads(const unsigned int level) const;
4531 template <>
4532 unsigned int
4533 Triangulation<3, 3>::n_raw_quads(const unsigned int level) const;
4534 template <>
4535 unsigned int
4537 template <>
4538 unsigned int
4539 Triangulation<1, 1>::n_active_quads(const unsigned int level) const;
4540 template <>
4541 unsigned int
4543 template <>
4544 unsigned int
4545 Triangulation<1, 1>::n_raw_hexs(const unsigned int level) const;
4546 template <>
4547 unsigned int
4548 Triangulation<3, 3>::n_raw_hexs(const unsigned int level) const;
4549 template <>
4550 unsigned int
4552 template <>
4553 unsigned int
4555 template <>
4556 unsigned int
4557 Triangulation<3, 3>::n_active_hexs(const unsigned int) const;
4558 template <>
4559 unsigned int
4560 Triangulation<3, 3>::n_hexs(const unsigned int level) const;
4561 
4562 template <>
4563 unsigned int
4565 
4566 
4567 // -------------------------------------------------------------------
4568 // -- Explicit specializations for codimension one grids
4569 
4570 
4571 template <>
4572 unsigned int
4574 template <>
4575 unsigned int
4576 Triangulation<1, 2>::n_quads(const unsigned int level) const;
4577 template <>
4578 unsigned int
4579 Triangulation<1, 2>::n_raw_quads(const unsigned int level) const;
4580 template <>
4581 unsigned int
4582 Triangulation<2, 3>::n_raw_quads(const unsigned int level) const;
4583 template <>
4584 unsigned int
4585 Triangulation<1, 2>::n_raw_hexs(const unsigned int level) const;
4586 template <>
4587 unsigned int
4588 Triangulation<1, 2>::n_active_quads(const unsigned int level) const;
4589 template <>
4590 unsigned int
4592 template <>
4593 unsigned int
4595 
4596 // -------------------------------------------------------------------
4597 // -- Explicit specializations for codimension two grids
4598 
4599 template <>
4600 unsigned int
4602 template <>
4603 unsigned int
4604 Triangulation<1, 3>::n_quads(const unsigned int level) const;
4605 template <>
4606 unsigned int
4607 Triangulation<1, 3>::n_raw_quads(const unsigned int level) const;
4608 template <>
4609 unsigned int
4610 Triangulation<2, 3>::n_raw_quads(const unsigned int level) const;
4611 template <>
4612 unsigned int
4613 Triangulation<1, 3>::n_raw_hexs(const unsigned int level) const;
4614 template <>
4615 unsigned int
4616 Triangulation<1, 3>::n_active_quads(const unsigned int level) const;
4617 template <>
4618 unsigned int
4620 template <>
4621 unsigned int
4623 
4624 template <>
4625 bool
4627 template <>
4628 bool
4630 template <>
4631 bool
4633 
4634 
4635 extern template class Triangulation<1, 1>;
4636 extern template class Triangulation<1, 2>;
4637 extern template class Triangulation<1, 3>;
4638 extern template class Triangulation<2, 2>;
4639 extern template class Triangulation<2, 3>;
4640 extern template class Triangulation<3, 3>;
4641 
4642 #endif // DOXYGEN
4643 
4645 
4646 // Include tria_accessor.h here, so that it is possible for an end
4647 // user to use the iterators of Triangulation<dim> directly without
4648 // the need to include tria_accessor.h separately. (Otherwise the
4649 // iterators are an 'opaque' or 'incomplete' type.)
4651 
4652 #endif
Definition: cell_id.h:71
Definition: point.h:111
unsigned int operator()(const cell_iterator &iterator, const CellStatus status)
Definition: tria.h:2359
boost::signals2::slot< signature_type, slot_function_type > slot_type
Definition: tria.h:2264
std::size_t num_slots() const
Definition: tria.h:2313
boost::function< signature_type > slot_function_type
Definition: tria.h:2262
boost::signals2::connection connect(const slot_type &slot, boost::signals2::connect_position position=boost::signals2::at_back)
Definition: tria.h:2290
boost::signals2::signal< signature_type, combiner_type > & new_signal
Definition: tria.h:2373
LegacySignal(boost::signals2::signal< signature_type, combiner_type > &new_signal)
Definition: tria.h:2269
unsigned int(const cell_iterator &, const CellStatus) signature_type
Definition: tria.h:2259
boost::signals2::connection base_weight
Definition: tria.h:2368
void disconnect(const S &connection)
Definition: tria.h:2342
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:1236
@ smoothing_on_refinement
Definition: tria.h:1335
@ eliminate_refined_boundary_islands
Definition: tria.h:1323
@ do_not_produce_unrefined_islands
Definition: tria.h:1329
@ smoothing_on_coarsening
Definition: tria.h:1341
@ limit_level_difference_at_vertices
Definition: tria.h:1199
@ allow_anisotropic_smoothing
Definition: tria.h:1285
@ coarsest_level_1
Definition: tria.h:1260
@ eliminate_unrefined_islands
Definition: tria.h:1220
@ eliminate_refined_inner_islands
Definition: tria.h:1318
@ maximum_smoothing
Definition: tria.h:1350
virtual const MeshSmoothing & get_mesh_smoothing() const
const std::vector< bool > & get_used_vertices() const
static constexpr unsigned int dimension
Definition: tria.h:1555
quad_iterator begin_quad(const unsigned int level=0) const
typename IteratorSelector::raw_line_iterator raw_line_iterator
Definition: tria.h:3824
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:4201
virtual void clear()
bool anisotropic_refinement
Definition: tria.h:4213
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:4271
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:2068
@ CELL_REFINE
Definition: tria.h:2064
@ CELL_INVALID
Definition: tria.h:2072
@ CELL_PERSIST
Definition: tria.h:2060
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:3804
void fix_coarsen_flags()
virtual const std::weak_ptr< const Utilities::MPI::Partitioner > global_active_cell_index_partitioner() const
unsigned int n_active_cells(const unsigned int level) const
virtual const std::weak_ptr< const Utilities::MPI::Partitioner > global_level_cell_index_partitioner(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:4196
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:4220
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:4248
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:3735
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:4190
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:3825
void load_user_pointers(const std::vector< void * > &v)
::internal::TriangulationImplementation::NumberCache< dim > number_cache
Definition: tria.h:4231
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:1560
std::vector< GridTools::PeriodicFacePair< cell_iterator > > periodic_face_pairs_level_0
Definition: tria.h:3796
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:3826
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:4208
void serialize(Archive &archive, const unsigned int version)
void load_refine_flags(const std::vector< bool > &v)
MeshSmoothing smooth_grid
Definition: tria.h:3729
void save_refine_flags(std::ostream &out) const
std::unique_ptr< ::internal::TriangulationImplementation::Policy< dim, spacedim > > policy
Definition: tria.h:3787
Triangulation< dim, spacedim > & get_triangulation()
void save_user_flags_quad(std::ostream &out) const
Signals signals
Definition: tria.h:2477
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:4182
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:458
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:459
Point< 2 > first
Definition: grid_out.cc:4605
unsigned int level
Definition: grid_out.cc:4608
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:1501
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:532
static ::ExceptionBase & ExcInvalidLevel(int arg1, int arg2)
#define AssertIndexRange(index, range)
Definition: exceptions.h:1760
#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:1503
typename IteratorSelector::active_quad_iterator active_quad_iterator
Definition: tria.h:1494
typename IteratorSelector::active_hex_iterator active_hex_iterator
Definition: tria.h:1514
typename IteratorSelector::quad_iterator quad_iterator
Definition: tria.h:1479
typename IteratorSelector::line_iterator line_iterator
Definition: tria.h:1455
TriaIterator< CellAccessor< dim, spacedim > > cell_iterator
Definition: tria.h:1368
typename IteratorSelector::active_line_iterator active_line_iterator
Definition: tria.h:1470
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_t< std::is_fundamental< T >::value, std::size_t > memory_consumption(const T &t)
Definition: types.h:32
unsigned int manifold_id
Definition: types.h:146
global_cell_index coarse_cell_id
Definition: types.h:119
unsigned int subdomain_id
Definition: types.h:43
unsigned int global_cell_index
Definition: types.h:110
unsigned int boundary_id
Definition: types.h:134
T operator()(InputIterator first, InputIterator last) const
Definition: tria.h:2087
virtual ~DistortedCellList() noexcept override
std::list< typename Triangulation< dim, spacedim >::cell_iterator > distorted_cells
Definition: tria.h:1549
boost::signals2::signal< unsigned int(const cell_iterator &, const CellStatus), CellWeightSum< unsigned int > > weight
Definition: tria.h:2241
boost::signals2::signal< void()> mesh_movement
Definition: tria.h:2144
boost::signals2::signal< void()> post_distributed_load
Definition: tria.h:2471
boost::signals2::signal< void()> pre_distributed_save
Definition: tria.h:2449
boost::signals2::signal< void(const Triangulation< dim, spacedim > &destination_tria)> copy
Definition: tria.h:2175
boost::signals2::signal< void()> pre_distributed_refinement
Definition: tria.h:2408
boost::signals2::signal< void()> post_distributed_refinement
Definition: tria.h:2427
boost::signals2::signal< void()> pre_refinement
Definition: tria.h:2120
boost::signals2::signal< void()> any_change
Definition: tria.h:2201
boost::signals2::signal< void()> create
Definition: tria.h:2111
boost::signals2::signal< void()> clear
Definition: tria.h:2190
boost::signals2::signal< void(const typename Triangulation< dim, spacedim >::cell_iterator &cell)> post_refinement_on_cell
Definition: tria.h:2165
LegacySignal cell_weight
Definition: tria.h:2395
boost::signals2::signal< void(const typename Triangulation< dim, spacedim >::cell_iterator &cell)> pre_coarsening_on_cell
Definition: tria.h:2155
boost::signals2::signal< void()> post_refinement
Definition: tria.h:2127
boost::signals2::signal< void()> pre_partition
Definition: tria.h:2135
boost::signals2::signal< void()> pre_distributed_repartition
Definition: tria.h:2434
boost::signals2::signal< void()> pre_distributed_load
Definition: tria.h:2464
boost::signals2::signal< void()> post_p4est_refinement
Definition: tria.h:2417
boost::signals2::signal< void()> post_distributed_repartition
Definition: tria.h:2441
boost::signals2::signal< void()> post_distributed_save
Definition: tria.h:2456
std::shared_ptr< const Utilities::MPI::Partitioner > active_cell_index_partitioner
Definition: tria.h:184
void serialize(Archive &ar, const unsigned int version)
std::vector< unsigned int > n_active_lines_level
Definition: tria.h:178
std::vector< std::shared_ptr< const Utilities::MPI::Partitioner > > level_cell_index_partitioners
Definition: tria.h:190
std::vector< unsigned int > n_active_quads_level
Definition: tria.h:248
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:307
const ::Triangulation< dim, spacedim > & tria