Reference documentation for deal.II version GIT d8dacc551e 2022-08-19 06:50:03+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\}}\)
dof_handler.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_dof_handler_h
17 #define dealii_dof_handler_h
18 
19 
20 
21 #include <deal.II/base/config.h>
22 
24 #include <deal.II/base/function.h>
25 #include <deal.II/base/index_set.h>
28 
31 #include <deal.II/dofs/dof_faces.h>
35 
37 
38 #include <boost/serialization/split_member.hpp>
39 
40 #include <map>
41 #include <memory>
42 #include <set>
43 #include <vector>
44 
46 
47 // Forward declarations
48 #ifndef DOXYGEN
49 template <int dim, int spacedim>
50 class FiniteElement;
51 template <int dim, int spacedim>
52 class Triangulation;
53 
54 namespace internal
55 {
56  namespace DoFHandlerImplementation
57  {
58  struct Implementation;
59 
60  namespace Policy
61  {
62  template <int dim, int spacedim>
63  class PolicyBase;
64  struct Implementation;
65  } // namespace Policy
66  } // namespace DoFHandlerImplementation
67 
68  namespace DoFAccessorImplementation
69  {
70  struct Implementation;
71  }
72 
73  namespace DoFCellAccessorImplementation
74  {
75  struct Implementation;
76  }
77 
78  namespace hp
79  {
80  namespace DoFHandlerImplementation
81  {
82  struct Implementation;
83  }
84  } // namespace hp
85 } // namespace internal
86 
87 namespace parallel
88 {
89  namespace distributed
90  {
91  template <int dim, int spacedim, typename VectorType>
92  class CellDataTransfer;
93  }
94 } // namespace parallel
95 #endif
96 
311 template <int dim, int spacedim = dim>
312 class DoFHandler : public Subscriptor
313 {
318 
319 public:
332  using cell_accessor = typename ActiveSelector::CellAccessor;
333 
346  using face_accessor = typename ActiveSelector::FaceAccessor;
347 
355  using line_iterator = typename ActiveSelector::line_iterator;
356 
370  using active_line_iterator = typename ActiveSelector::active_line_iterator;
371 
379  using quad_iterator = typename ActiveSelector::quad_iterator;
380 
394  using active_quad_iterator = typename ActiveSelector::active_quad_iterator;
395 
403  using hex_iterator = typename ActiveSelector::hex_iterator;
404 
414  using active_hex_iterator = typename ActiveSelector::active_hex_iterator;
415 
436  using active_cell_iterator = typename ActiveSelector::active_cell_iterator;
437 
464  using cell_iterator = typename ActiveSelector::cell_iterator;
465 
482  using face_iterator = typename ActiveSelector::face_iterator;
483 
495  using active_face_iterator = typename ActiveSelector::active_face_iterator;
496 
497  using level_cell_accessor = typename LevelSelector::CellAccessor;
498  using level_face_accessor = typename LevelSelector::FaceAccessor;
499 
500  using level_cell_iterator = typename LevelSelector::cell_iterator;
501  using level_face_iterator = typename LevelSelector::face_iterator;
502 
503 
507  static constexpr unsigned int dimension = dim;
508 
512  static constexpr unsigned int space_dimension = spacedim;
513 
517  static const unsigned int default_fe_index = 0;
518 
522  static const unsigned int invalid_fe_index = numbers::invalid_unsigned_int;
523 
527  using active_fe_index_type = unsigned short int;
528 
532  using offset_type = unsigned int;
533 
539  static_cast<active_fe_index_type>(-1);
540 
546 
551 
558  DoFHandler(const DoFHandler &) = delete;
559 
563  virtual ~DoFHandler() override;
564 
571  DoFHandler &
572  operator=(const DoFHandler &) = delete;
573 
578  void
579  set_active_fe_indices(const std::vector<unsigned int> &active_fe_indices);
580 
586  void
587  get_active_fe_indices(std::vector<unsigned int> &active_fe_indices) const;
588 
596  void
598 
628  void
630 
634  void
636 
642  void
644 
648  bool
650 
656  bool
657  has_level_dofs() const;
658 
673  bool
675 
682  void
684 
688  void
689  clear();
690 
743  void
744  renumber_dofs(const std::vector<types::global_dof_index> &new_numbers);
745 
750  void
751  renumber_dofs(const unsigned int level,
752  const std::vector<types::global_dof_index> &new_numbers);
753 
782  unsigned int
784 
797  unsigned int
799 
800  /*--------------------------------------*/
801 
806  /*
807  * @{
808  */
809 
814  begin(const unsigned int level = 0) const;
815 
833  begin_active(const unsigned int level = 0) const;
834 
840  end() const;
841 
847  end(const unsigned int level) const;
848 
855  end_active(const unsigned int level) const;
856 
862  begin_mg(const unsigned int level = 0) const;
863 
869  end_mg(const unsigned int level) const;
870 
876  end_mg() const;
877 
893  cell_iterators() const;
894 
937 
951 
968  cell_iterators_on_level(const unsigned int level) const;
969 
986  active_cell_iterators_on_level(const unsigned int level) const;
987 
1004  mg_cell_iterators_on_level(const unsigned int level) const;
1005 
1006  /*
1007  * @}
1008  */
1009 
1010 
1011  /*---------------------------------------*/
1012 
1013 
1038  n_dofs() const;
1039 
1048  n_dofs(const unsigned int level) const;
1049 
1056 
1068  template <typename number>
1071  const std::map<types::boundary_id, const Function<spacedim, number> *>
1072  &boundary_ids) const;
1073 
1079  n_boundary_dofs(const std::set<types::boundary_id> &boundary_ids) const;
1080 
1096  const BlockInfo &
1097  block_info() const;
1098 
1120 
1126  const IndexSet &
1128 
1133  const IndexSet &
1134  locally_owned_mg_dofs(const unsigned int level) const;
1135 
1141  get_fe(const unsigned int index = 0) const;
1142 
1149 
1155 
1159  MPI_Comm
1161 
1178  void
1180 
1196  void
1198 
1207  virtual std::size_t
1209 
1215  template <class Archive>
1216  void
1217  save(Archive &ar, const unsigned int version) const;
1218 
1224  template <class Archive>
1225  void
1226  load(Archive &ar, const unsigned int version);
1227 
1228 #ifdef DOXYGEN
1234  template <class Archive>
1235  void
1236  serialize(Archive &archive, const unsigned int version);
1237 #else
1238  // This macro defines the serialize() method that is compatible with
1239  // the templated save() and load() method that have been implemented.
1240  BOOST_SERIALIZATION_SPLIT_MEMBER()
1241 #endif
1242 
1257  int,
1258  << "The given level " << arg1
1259  << " is not in the valid range!");
1266  << "The given list of new dof indices is not consecutive: "
1267  << "the index " << arg1 << " does not exist.");
1272  int,
1273  int,
1274  << "The mesh contains a cell with an active FE index of "
1275  << arg1 << ", but the finite element collection only has "
1276  << arg2 << " elements");
1277 
1283  "The current function doesn't make sense when used with a "
1284  "DoFHandler without hp-capabilities.");
1285 
1291  "The current function has not yet been implemented for a "
1292  "DoFHandler with hp-capabilities.");
1293 
1294 private:
1302  {
1303  public:
1308 
1314  void
1315  init(const unsigned int coarsest_level,
1316  const unsigned int finest_level,
1317  const unsigned int dofs_per_vertex);
1318 
1322  unsigned int
1324 
1328  unsigned int
1330 
1336  access_index(const unsigned int level,
1337  const unsigned int dof_number,
1338  const unsigned int dofs_per_vertex);
1339 
1340  private:
1344  unsigned int coarsest_level;
1345 
1349  unsigned int finest_level;
1350 
1360  std::unique_ptr<types::global_dof_index[]> indices;
1361  };
1362 
1370  {
1375  std::map<const cell_iterator, const unsigned int> persisting_cells_fe_index;
1376 
1381  std::map<const cell_iterator, const unsigned int> refined_cells_fe_index;
1382 
1387  std::map<const cell_iterator, const unsigned int> coarsened_cells_fe_index;
1388 
1394  std::vector<unsigned int> active_fe_indices;
1395 
1401  std::unique_ptr<
1402  parallel::distributed::
1403  CellDataTransfer<dim, spacedim, std::vector<unsigned int>>>
1405  };
1406 
1411 
1417 
1423 
1430 
1435  std::unique_ptr<::internal::DoFHandlerImplementation::Policy::
1436  PolicyBase<dim, spacedim>>
1438 
1447 
1451  std::vector<::internal::DoFHandlerImplementation::NumberCache>
1453 
1459  mutable std::vector<std::vector<types::global_dof_index>>
1461 
1466  mutable std::vector<std::vector<offset_type>> cell_dof_cache_ptr;
1467 
1473  mutable std::vector<std::array<std::vector<types::global_dof_index>, dim + 1>>
1475 
1484  mutable std::vector<std::array<std::vector<offset_type>, dim + 1>>
1486 
1492  mutable std::array<std::vector<active_fe_index_type>, dim + 1>
1494 
1498  mutable std::array<std::vector<offset_type>, dim + 1> hp_object_fe_ptr;
1499 
1504  mutable std::vector<std::vector<active_fe_index_type>>
1506 
1511  mutable std::vector<std::vector<active_fe_index_type>>
1513 
1518  std::vector<MGVertexDoFs> mg_vertex_dofs;
1519 
1523  std::vector<
1524  std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel<dim>>>
1526 
1530  std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces<dim>>
1532 
1537  std::unique_ptr<ActiveFEIndexTransfer> active_fe_index_transfer;
1538 
1543  std::vector<boost::signals2::connection> tria_listeners;
1544 
1550  std::vector<boost::signals2::connection> tria_listeners_for_transfer;
1551 
1555  void
1557 
1561  void
1563 
1567  void
1569 
1573  void
1575 
1587  void
1589 
1602  void
1604 
1614  void
1616 
1625  void
1627 
1636  void
1638 
1647  void
1649 
1650 
1651  // Make accessor objects friends.
1652  template <int, int, int, bool>
1653  friend class ::DoFAccessor;
1654  template <int, int, bool>
1655  friend class ::DoFCellAccessor;
1656  friend struct ::internal::DoFAccessorImplementation::Implementation;
1657  friend struct ::internal::DoFCellAccessorImplementation::Implementation;
1658 
1659  // Likewise for DoFLevel objects since they need to access the vertex dofs
1660  // in the functions that set and retrieve vertex dof indices.
1661  friend struct ::internal::DoFHandlerImplementation::Implementation;
1662  friend struct ::internal::hp::DoFHandlerImplementation::Implementation;
1663  friend struct ::internal::DoFHandlerImplementation::Policy::
1664  Implementation;
1665 
1666  // explicitly check for sensible template arguments, but not on windows
1667  // because MSVC creates bogus warnings during normal compilation
1668 #ifndef DEAL_II_MSVC
1669  static_assert(dim <= spacedim,
1670  "The dimension <dim> of a DoFHandler must be less than or "
1671  "equal to the space dimension <spacedim> in which it lives.");
1672 #endif
1673 };
1674 
1675 namespace internal
1676 {
1677  namespace hp
1678  {
1679  namespace DoFHandlerImplementation
1680  {
1692  template <int dim, int spacedim>
1693  void
1695 
1720  template <int dim, int spacedim = dim>
1721  unsigned int
1723  const typename DoFHandler<dim, spacedim>::cell_iterator &parent);
1724 
1730  "No FiniteElement has been found in your FECollection that is "
1731  "dominated by all children of a cell you are trying to coarsen!");
1732  } // namespace DoFHandlerImplementation
1733  } // namespace hp
1734 } // namespace internal
1735 
1736 #ifndef DOXYGEN
1737 
1738 /* ----------------------- Inline functions ----------------------------------
1739  */
1740 
1741 
1742 template <int dim, int spacedim>
1743 inline bool
1745 {
1746  return hp_capability_enabled;
1747 }
1748 
1749 
1750 
1751 template <int dim, int spacedim>
1752 inline bool
1754 {
1755  return mg_number_cache.size() > 0;
1756 }
1757 
1758 
1759 
1760 template <int dim, int spacedim>
1761 inline bool
1763 {
1764  return number_cache.n_global_dofs > 0;
1765 }
1766 
1767 
1768 
1769 template <int dim, int spacedim>
1772 {
1773  return number_cache.n_global_dofs;
1774 }
1775 
1776 
1777 
1778 template <int dim, int spacedim>
1780 DoFHandler<dim, spacedim>::n_dofs(const unsigned int level) const
1781 {
1783  ExcMessage(
1784  "n_dofs(level) can only be called after distribute_mg_dofs()"));
1786  return mg_number_cache[level].n_global_dofs;
1787 }
1788 
1789 
1790 
1791 template <int dim, int spacedim>
1794 {
1796 }
1797 
1798 
1799 
1800 template <int dim, int spacedim>
1801 const IndexSet &
1803 {
1805 }
1806 
1807 
1808 
1809 template <int dim, int spacedim>
1810 const IndexSet &
1812 {
1813  Assert(level < this->get_triangulation().n_global_levels(),
1814  ExcMessage("The given level index exceeds the number of levels "
1815  "present in the triangulation"));
1816  Assert(
1817  mg_number_cache.size() == this->get_triangulation().n_global_levels(),
1818  ExcMessage(
1819  "The level dofs are not set up properly! Did you call distribute_mg_dofs()?"));
1820  return mg_number_cache[level].locally_owned_dofs;
1821 }
1822 
1823 
1824 
1825 template <int dim, int spacedim>
1826 inline const FiniteElement<dim, spacedim> &
1827 DoFHandler<dim, spacedim>::get_fe(const unsigned int number) const
1828 {
1829  Assert(fe_collection.size() > 0,
1830  ExcMessage("No finite element collection is associated with "
1831  "this DoFHandler"));
1832  return fe_collection[number];
1833 }
1834 
1835 
1836 
1837 template <int dim, int spacedim>
1838 inline const hp::FECollection<dim, spacedim> &
1840 {
1841  return fe_collection;
1842 }
1843 
1844 
1845 
1846 template <int dim, int spacedim>
1847 inline const Triangulation<dim, spacedim> &
1849 {
1850  Assert(tria != nullptr,
1851  ExcMessage("This DoFHandler object has not been associated "
1852  "with a triangulation."));
1853  return *tria;
1854 }
1855 
1856 
1857 
1858 template <int dim, int spacedim>
1859 inline MPI_Comm
1861 {
1862  Assert(tria != nullptr,
1863  ExcMessage("This DoFHandler object has not been associated "
1864  "with a triangulation."));
1865  return tria->get_communicator();
1866 }
1867 
1868 
1869 
1870 template <int dim, int spacedim>
1871 inline const BlockInfo &
1873 {
1875 
1876  return block_info_object;
1877 }
1878 
1879 
1880 
1881 template <int dim, int spacedim>
1882 template <typename number>
1885  const std::map<types::boundary_id, const Function<spacedim, number> *>
1886  &boundary_ids) const
1887 {
1888  Assert(!(dim == 2 && spacedim == 3) || this->hp_capability_enabled == false,
1890 
1891  // extract the set of boundary ids and forget about the function object
1892  // pointers
1893  std::set<types::boundary_id> boundary_ids_only;
1894  for (typename std::map<types::boundary_id,
1895  const Function<spacedim, number> *>::const_iterator p =
1896  boundary_ids.begin();
1897  p != boundary_ids.end();
1898  ++p)
1899  boundary_ids_only.insert(p->first);
1900 
1901  // then just hand everything over to the other function that does the work
1902  return n_boundary_dofs(boundary_ids_only);
1903 }
1904 
1905 
1906 
1907 namespace internal
1908 {
1916  template <int dim, int spacedim>
1917  std::string
1918  policy_to_string(const ::internal::DoFHandlerImplementation::Policy::
1919  PolicyBase<dim, spacedim> &policy);
1920 } // namespace internal
1921 
1922 
1923 
1924 template <int dim, int spacedim>
1925 template <class Archive>
1926 void
1927 DoFHandler<dim, spacedim>::save(Archive &ar, const unsigned int) const
1928 {
1929  if (this->hp_capability_enabled)
1930  {
1931  ar &this->object_dof_indices;
1932  ar &this->object_dof_ptr;
1933 
1934  ar &this->cell_dof_cache_indices;
1935  ar &this->cell_dof_cache_ptr;
1936 
1937  ar &this->hp_cell_active_fe_indices;
1938  ar &this->hp_cell_future_fe_indices;
1939 
1940  ar &hp_object_fe_ptr;
1942 
1943  ar &number_cache;
1944 
1945  ar &mg_number_cache;
1946 
1947  // write out the number of triangulation cells and later check during
1948  // loading that this number is indeed correct; same with something that
1949  // identifies the policy
1950  const unsigned int n_cells = this->tria->n_cells();
1951  std::string policy_name =
1953 
1954  ar &n_cells &policy_name;
1955  }
1956  else
1957  {
1958  ar &this->block_info_object;
1959  ar &number_cache;
1960 
1961  ar &this->object_dof_indices;
1962  ar &this->object_dof_ptr;
1963 
1964  ar &this->cell_dof_cache_indices;
1965  ar &this->cell_dof_cache_ptr;
1966 
1967  // write out the number of triangulation cells and later check during
1968  // loading that this number is indeed correct; same with something that
1969  // identifies the FE and the policy
1970  unsigned int n_cells = this->tria->n_cells();
1971  std::string fe_name = this->get_fe(0).get_name();
1972  std::string policy_name = internal::policy_to_string(*this->policy);
1973 
1974  ar &n_cells &fe_name &policy_name;
1975  }
1976 }
1977 
1978 
1979 
1980 template <int dim, int spacedim>
1981 template <class Archive>
1982 void
1983 DoFHandler<dim, spacedim>::load(Archive &ar, const unsigned int)
1984 {
1985  if (this->hp_capability_enabled)
1986  {
1987  ar &this->object_dof_indices;
1988  ar &this->object_dof_ptr;
1989 
1990  ar &this->cell_dof_cache_indices;
1991  ar &this->cell_dof_cache_ptr;
1992 
1993  ar &this->hp_cell_active_fe_indices;
1994  ar &this->hp_cell_future_fe_indices;
1995 
1996  ar &hp_object_fe_ptr;
1998 
1999  ar &number_cache;
2000 
2001  ar &mg_number_cache;
2002 
2003  // these are the checks that correspond to the last block in the save()
2004  // function
2005  unsigned int n_cells;
2006  std::string policy_name;
2007 
2008  ar &n_cells &policy_name;
2009 
2010  AssertThrow(
2011  n_cells == this->tria->n_cells(),
2012  ExcMessage(
2013  "The object being loaded into does not match the triangulation "
2014  "that has been stored previously."));
2015  AssertThrow(
2016  policy_name == ::internal::policy_to_string(*this->policy),
2017  ExcMessage("The policy currently associated with this DoFHandler (" +
2019  ") does not match the one that was associated with the "
2020  "DoFHandler previously stored (" +
2021  policy_name + ")."));
2022  }
2023  else
2024  {
2025  ar &this->block_info_object;
2026  ar &number_cache;
2027 
2028  object_dof_indices.clear();
2029 
2030  object_dof_ptr.clear();
2031 
2032  ar &this->object_dof_indices;
2033  ar &this->object_dof_ptr;
2034 
2035  ar &this->cell_dof_cache_indices;
2036  ar &this->cell_dof_cache_ptr;
2037 
2038  // these are the checks that correspond to the last block in the save()
2039  // function
2040  unsigned int n_cells;
2041  std::string fe_name;
2042  std::string policy_name;
2043 
2044  ar &n_cells &fe_name &policy_name;
2045 
2046  AssertThrow(
2047  n_cells == this->tria->n_cells(),
2048  ExcMessage(
2049  "The object being loaded into does not match the triangulation "
2050  "that has been stored previously."));
2051  AssertThrow(
2052  fe_name == this->get_fe(0).get_name(),
2053  ExcMessage(
2054  "The finite element associated with this DoFHandler does not match "
2055  "the one that was associated with the DoFHandler previously stored."));
2056  AssertThrow(policy_name == internal::policy_to_string(*this->policy),
2057  ExcMessage(
2058  "The policy currently associated with this DoFHandler (" +
2060  ") does not match the one that was associated with the "
2061  "DoFHandler previously stored (" +
2062  policy_name + ")."));
2063  }
2064 }
2065 
2066 
2067 
2068 template <int dim, int spacedim>
2069 inline types::global_dof_index &
2071  const unsigned int level,
2072  const unsigned int dof_number,
2073  const unsigned int dofs_per_vertex)
2074 {
2075  Assert((level >= coarsest_level) && (level <= finest_level),
2076  ExcInvalidLevel(level));
2077  return indices[dofs_per_vertex * (level - coarsest_level) + dof_number];
2078 }
2079 
2080 
2081 
2082 extern template class DoFHandler<1, 1>;
2083 extern template class DoFHandler<1, 2>;
2084 extern template class DoFHandler<1, 3>;
2085 extern template class DoFHandler<2, 2>;
2086 extern template class DoFHandler<2, 3>;
2087 extern template class DoFHandler<3, 3>;
2088 
2089 
2090 #endif // DOXYGEN
2091 
2093 
2094 #endif
A small class collecting the different BlockIndices involved in global, multilevel and local computat...
Definition: block_info.h:94
types::global_dof_index & access_index(const unsigned int level, const unsigned int dof_number, const unsigned int dofs_per_vertex)
unsigned int coarsest_level
Definition: dof_handler.h:1344
void init(const unsigned int coarsest_level, const unsigned int finest_level, const unsigned int dofs_per_vertex)
unsigned int get_finest_level() const
std::unique_ptr< types::global_dof_index[]> indices
Definition: dof_handler.h:1360
unsigned int get_coarsest_level() const
cell_iterator end() const
void pre_distributed_transfer_action()
void post_transfer_action()
virtual std::size_t memory_consumption() const
std::vector< std::vector< active_fe_index_type > > hp_cell_active_fe_indices
Definition: dof_handler.h:1505
unsigned int max_couplings_between_dofs() const
std::vector< std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel< dim > > > mg_levels
Definition: dof_handler.h:1525
std::unique_ptr< ActiveFEIndexTransfer > active_fe_index_transfer
Definition: dof_handler.h:1537
hp::FECollection< dim, spacedim > fe_collection
Definition: dof_handler.h:1429
void create_active_fe_table()
static constexpr unsigned int dimension
Definition: dof_handler.h:507
SmartPointer< const Triangulation< dim, spacedim >, DoFHandler< dim, spacedim > > tria
Definition: dof_handler.h:1422
void save(Archive &ar, const unsigned int version) const
void set_active_fe_indices(const std::vector< unsigned int > &active_fe_indices)
BlockInfo block_info_object
Definition: dof_handler.h:1410
bool has_active_dofs() const
std::vector< boost::signals2::connection > tria_listeners_for_transfer
Definition: dof_handler.h:1550
level_cell_iterator end_mg() const
void renumber_dofs(const std::vector< types::global_dof_index > &new_numbers)
static constexpr unsigned int space_dimension
Definition: dof_handler.h:512
void renumber_dofs(const unsigned int level, const std::vector< types::global_dof_index > &new_numbers)
level_cell_iterator begin_mg(const unsigned int level=0) const
void distribute_dofs(const FiniteElement< dim, spacedim > &fe)
types::global_dof_index n_boundary_dofs() const
DoFHandler(const Triangulation< dim, spacedim > &tria)
void clear_mg_space()
void connect_to_triangulation_signals()
std::vector< std::vector< types::global_dof_index > > cell_dof_cache_indices
Definition: dof_handler.h:1460
unsigned int offset_type
Definition: dof_handler.h:532
std::vector< MGVertexDoFs > mg_vertex_dofs
Definition: dof_handler.h:1518
std::vector< std::vector< active_fe_index_type > > hp_cell_future_fe_indices
Definition: dof_handler.h:1512
std::vector< boost::signals2::connection > tria_listeners
Definition: dof_handler.h:1543
void post_distributed_transfer_action()
std::vector< std::array< std::vector< types::global_dof_index >, dim+1 > > object_dof_indices
Definition: dof_handler.h:1474
typename LevelSelector::CellAccessor level_cell_accessor
Definition: dof_handler.h:497
const BlockInfo & block_info() const
const Triangulation< dim, spacedim > & get_triangulation() const
void pre_transfer_action()
void clear_space()
std::array< std::vector< active_fe_index_type >, dim+1 > hp_object_fe_indices
Definition: dof_handler.h:1493
void reinit(const Triangulation< dim, spacedim > &tria)
std::vector< std::array< std::vector< offset_type >, dim+1 > > object_dof_ptr
Definition: dof_handler.h:1485
std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces< dim > > mg_faces
Definition: dof_handler.h:1531
void serialize(Archive &archive, const unsigned int version)
DoFHandler(const DoFHandler &)=delete
active_cell_iterator begin_active(const unsigned int level=0) const
void distribute_mg_dofs()
active_cell_iterator end_active(const unsigned int level) const
bool hp_capability_enabled
Definition: dof_handler.h:1416
bool has_hp_capabilities() const
void initialize_local_block_info()
types::global_dof_index n_dofs() const
void update_active_fe_table()
level_cell_iterator end_mg(const unsigned int level) const
std::vector< std::vector< offset_type > > cell_dof_cache_ptr
Definition: dof_handler.h:1466
cell_iterator end(const unsigned int level) const
typename LevelSelector::cell_iterator level_cell_iterator
Definition: dof_handler.h:500
void prepare_for_serialization_of_active_fe_indices()
std::vector<::internal::DoFHandlerImplementation::NumberCache > mg_number_cache
Definition: dof_handler.h:1452
void load(Archive &ar, const unsigned int version)
DoFHandler & operator=(const DoFHandler &)=delete
const FiniteElement< dim, spacedim > & get_fe(const unsigned int index=0) const
const IndexSet & locally_owned_mg_dofs(const unsigned int level) const
static const unsigned int default_fe_index
Definition: dof_handler.h:517
typename LevelSelector::face_iterator level_face_iterator
Definition: dof_handler.h:501
cell_iterator begin(const unsigned int level=0) const
std::array< std::vector< offset_type >, dim+1 > hp_object_fe_ptr
Definition: dof_handler.h:1498
MPI_Comm get_communicator() const
static const unsigned int invalid_fe_index
Definition: dof_handler.h:522
void clear()
const IndexSet & locally_owned_dofs() const
void get_active_fe_indices(std::vector< unsigned int > &active_fe_indices) const
void distribute_dofs(const hp::FECollection< dim, spacedim > &fe)
types::global_dof_index n_boundary_dofs(const std::map< types::boundary_id, const Function< spacedim, number > * > &boundary_ids) const
bool has_level_dofs() const
std::unique_ptr<::internal::DoFHandlerImplementation::Policy::PolicyBase< dim, spacedim > > policy
Definition: dof_handler.h:1437
typename LevelSelector::FaceAccessor level_face_accessor
Definition: dof_handler.h:498
types::global_dof_index n_dofs(const unsigned int level) const
const hp::FECollection< dim, spacedim > & get_fe_collection() const
unsigned int max_couplings_between_boundary_dofs() const
void setup_policy()
types::global_dof_index n_locally_owned_dofs() const
static const active_fe_index_type invalid_active_fe_index
Definition: dof_handler.h:538
unsigned short int active_fe_index_type
Definition: dof_handler.h:527
void deserialize_active_fe_indices()
types::global_dof_index n_boundary_dofs(const std::set< types::boundary_id > &boundary_ids) const
::internal::DoFHandlerImplementation::NumberCache number_cache
Definition: dof_handler.h:1446
virtual ~DoFHandler() override
virtual std::string get_name() const =0
virtual MPI_Comm get_communicator() const
unsigned int n_cells() const
unsigned int size() const
Definition: collection.h:264
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443
unsigned int level
Definition: grid_out.cc:4608
IteratorRange< active_cell_iterator > active_cell_iterators_on_level(const unsigned int level) const
IteratorRange< cell_iterator > cell_iterators_on_level(const unsigned int level) const
IteratorRange< active_cell_iterator > active_cell_iterators() const
IteratorRange< level_cell_iterator > mg_cell_iterators() const
IteratorRange< cell_iterator > cell_iterators() const
IteratorRange< level_cell_iterator > mg_cell_iterators_on_level(const unsigned int level) const
#define DeclException0(Exception0)
Definition: exceptions.h:464
static ::ExceptionBase & ExcInvalidFEIndex(int arg1, int arg2)
static ::ExceptionBase & ExcInvalidBoundaryIndicator()
static ::ExceptionBase & ExcInvalidLevel(int arg1)
static ::ExceptionBase & ExcNewNumbersNotConsecutive(types::global_dof_index arg1)
#define Assert(cond, exc)
Definition: exceptions.h:1473
static ::ExceptionBase & ExcNoFESelected()
static ::ExceptionBase & ExcOnlyAvailableWithHP()
static ::ExceptionBase & ExcNotImplementedWithHP()
#define DeclException2(Exception2, type1, type2, outsequence)
Definition: exceptions.h:532
#define DeclExceptionMsg(Exception, defaulttext)
Definition: exceptions.h:487
static ::ExceptionBase & ExcNoDominatedFiniteElementOnChildren()
#define DeclException1(Exception1, type1, outsequence)
Definition: exceptions.h:509
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
Definition: exceptions.h:1583
typename ActiveSelector::FaceAccessor face_accessor
Definition: dof_handler.h:346
typename ActiveSelector::cell_iterator cell_iterator
Definition: dof_handler.h:464
typename ActiveSelector::line_iterator line_iterator
Definition: dof_handler.h:355
typename ActiveSelector::face_iterator face_iterator
Definition: dof_handler.h:482
typename ActiveSelector::active_line_iterator active_line_iterator
Definition: dof_handler.h:370
typename ActiveSelector::active_cell_iterator active_cell_iterator
Definition: dof_handler.h:436
typename ActiveSelector::CellAccessor cell_accessor
Definition: dof_handler.h:332
typename ActiveSelector::quad_iterator quad_iterator
Definition: dof_handler.h:379
typename ActiveSelector::active_hex_iterator active_hex_iterator
Definition: dof_handler.h:414
typename ActiveSelector::active_quad_iterator active_quad_iterator
Definition: dof_handler.h:394
typename ActiveSelector::hex_iterator hex_iterator
Definition: dof_handler.h:403
typename ActiveSelector::active_face_iterator active_face_iterator
Definition: dof_handler.h:495
Definition: hp.h:118
unsigned int n_cells(const internal::TriangulationImplementation::NumberCache< 1 > &c)
Definition: tria.cc:13785
unsigned int dominated_future_fe_on_children(const typename DoFHandler< dim, spacedim >::cell_iterator &parent)
void communicate_future_fe_indices(DoFHandler< dim, spacedim > &dof_handler)
std::string policy_to_string(const ::internal::DoFHandlerImplementation::Policy::PolicyBase< dim, spacedim > &policy)
Definition: dof_handler.cc:58
static const unsigned int invalid_unsigned_int
Definition: types.h:201
unsigned int global_dof_index
Definition: types.h:76
unsigned int boundary_id
Definition: types.h:129
std::map< const cell_iterator, const unsigned int > coarsened_cells_fe_index
Definition: dof_handler.h:1387
std::vector< unsigned int > active_fe_indices
Definition: dof_handler.h:1394
std::map< const cell_iterator, const unsigned int > refined_cells_fe_index
Definition: dof_handler.h:1381
std::unique_ptr< parallel::distributed::CellDataTransfer< dim, spacedim, std::vector< unsigned int > > > cell_data_transfer
Definition: dof_handler.h:1404
std::map< const cell_iterator, const unsigned int > persisting_cells_fe_index
Definition: dof_handler.h:1375