Reference documentation for deal.II version 9.4.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
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
28
30
37
39
40#include <boost/serialization/split_member.hpp>
41
42#include <map>
43#include <memory>
44#include <set>
45#include <vector>
46
48
49// Forward declarations
50#ifndef DOXYGEN
51template <int dim, int spacedim>
52class FiniteElement;
53template <int dim, int spacedim>
54class Triangulation;
55
56namespace internal
57{
58 namespace DoFHandlerImplementation
59 {
60 struct Implementation;
61
62 namespace Policy
63 {
64 template <int dim, int spacedim>
65 class PolicyBase;
66 struct Implementation;
67 } // namespace Policy
68 } // namespace DoFHandlerImplementation
69
70 namespace DoFAccessorImplementation
71 {
72 struct Implementation;
73 }
74
75 namespace DoFCellAccessorImplementation
76 {
77 struct Implementation;
78 }
79
80 namespace hp
81 {
82 namespace DoFHandlerImplementation
83 {
84 struct Implementation;
85 }
86 } // namespace hp
87} // namespace internal
88
89namespace parallel
90{
91 namespace distributed
92 {
93 template <int dim, int spacedim, typename VectorType>
94 class CellDataTransfer;
95 }
96} // namespace parallel
97#endif
98
313template <int dim, int spacedim = dim>
315{
320
321public:
334 using cell_accessor = typename ActiveSelector::CellAccessor;
335
348 using face_accessor = typename ActiveSelector::FaceAccessor;
349
357 using line_iterator = typename ActiveSelector::line_iterator;
358
372 using active_line_iterator = typename ActiveSelector::active_line_iterator;
373
381 using quad_iterator = typename ActiveSelector::quad_iterator;
382
396 using active_quad_iterator = typename ActiveSelector::active_quad_iterator;
397
405 using hex_iterator = typename ActiveSelector::hex_iterator;
406
416 using active_hex_iterator = typename ActiveSelector::active_hex_iterator;
417
438 using active_cell_iterator = typename ActiveSelector::active_cell_iterator;
439
466 using cell_iterator = typename ActiveSelector::cell_iterator;
467
484 using face_iterator = typename ActiveSelector::face_iterator;
485
497 using active_face_iterator = typename ActiveSelector::active_face_iterator;
498
499 using level_cell_accessor = typename LevelSelector::CellAccessor;
500 using level_face_accessor = typename LevelSelector::FaceAccessor;
501
502 using level_cell_iterator = typename LevelSelector::cell_iterator;
503 using level_face_iterator = typename LevelSelector::face_iterator;
504
505
509 static constexpr unsigned int dimension = dim;
510
514 static constexpr unsigned int space_dimension = spacedim;
515
519 static const unsigned int default_fe_index = 0;
520
525
529 using active_fe_index_type = unsigned short int;
530
534 using offset_type = unsigned int;
535
541 static_cast<active_fe_index_type>(-1);
542
548
553
560 DoFHandler(const DoFHandler &) = delete;
561
565 virtual ~DoFHandler() override;
566
573 DoFHandler &
574 operator=(const DoFHandler &) = delete;
575
583 void
586
593 void
596
621 void
623
630 void
632
637 void
638 set_active_fe_indices(const std::vector<unsigned int> &active_fe_indices);
639
645 void
646 get_active_fe_indices(std::vector<unsigned int> &active_fe_indices) const;
647
655 void
657
687 void
689
693 void
695
701 void
703
707 bool
709
715 bool
717
732 bool
734
741 void
743
747 void
749
802 void
803 renumber_dofs(const std::vector<types::global_dof_index> &new_numbers);
804
809 void
810 renumber_dofs(const unsigned int level,
811 const std::vector<types::global_dof_index> &new_numbers);
812
841 unsigned int
843
856 unsigned int
858
859 /*--------------------------------------*/
860
865 /*
866 * @{
867 */
868
873 begin(const unsigned int level = 0) const;
874
892 begin_active(const unsigned int level = 0) const;
893
899 end() const;
900
906 end(const unsigned int level) const;
907
914 end_active(const unsigned int level) const;
915
921 begin_mg(const unsigned int level = 0) const;
922
928 end_mg(const unsigned int level) const;
929
935 end_mg() const;
936
953
996
1010
1027 cell_iterators_on_level(const unsigned int level) const;
1028
1045 active_cell_iterators_on_level(const unsigned int level) const;
1046
1063 mg_cell_iterators_on_level(const unsigned int level) const;
1064
1065 /*
1066 * @}
1067 */
1068
1069
1070 /*---------------------------------------*/
1071
1072
1097 n_dofs() const;
1098
1107 n_dofs(const unsigned int level) const;
1108
1115
1127 template <typename number>
1130 const std::map<types::boundary_id, const Function<spacedim, number> *>
1131 &boundary_ids) const;
1132
1138 n_boundary_dofs(const std::set<types::boundary_id> &boundary_ids) const;
1139
1155 const BlockInfo &
1156 block_info() const;
1157
1179
1185 const IndexSet &
1187
1192 const IndexSet &
1193 locally_owned_mg_dofs(const unsigned int level) const;
1194
1200 get_fe(const unsigned int index = 0) const;
1201
1208
1214
1218 MPI_Comm
1220
1237 void
1239
1255 void
1257
1266 virtual std::size_t
1268
1274 template <class Archive>
1275 void
1276 save(Archive &ar, const unsigned int version) const;
1277
1283 template <class Archive>
1284 void
1285 load(Archive &ar, const unsigned int version);
1286
1287#ifdef DOXYGEN
1293 template <class Archive>
1294 void
1295 serialize(Archive &archive, const unsigned int version);
1296#else
1297 // This macro defines the serialize() method that is compatible with
1298 // the templated save() and load() method that have been implemented.
1299 BOOST_SERIALIZATION_SPLIT_MEMBER()
1300#endif
1301
1316 int,
1317 << "The given level " << arg1
1318 << " is not in the valid range!");
1325 << "The given list of new dof indices is not consecutive: "
1326 << "the index " << arg1 << " does not exist.");
1331 int,
1332 int,
1333 << "The mesh contains a cell with an active FE index of "
1334 << arg1 << ", but the finite element collection only has "
1335 << arg2 << " elements");
1336
1342 "The current function doesn't make sense when used with a "
1343 "DoFHandler without hp-capabilities.");
1344
1350 "The current function has not yet been implemented for a "
1351 "DoFHandler with hp-capabilities.");
1352
1353private:
1361 {
1362 public:
1367
1373 void
1374 init(const unsigned int coarsest_level,
1375 const unsigned int finest_level,
1376 const unsigned int dofs_per_vertex);
1377
1381 unsigned int
1383
1387 unsigned int
1389
1395 access_index(const unsigned int level,
1396 const unsigned int dof_number,
1397 const unsigned int dofs_per_vertex);
1398
1399 private:
1403 unsigned int coarsest_level;
1404
1408 unsigned int finest_level;
1409
1419 std::unique_ptr<types::global_dof_index[]> indices;
1420 };
1421
1429 {
1434 std::map<const cell_iterator, const unsigned int> persisting_cells_fe_index;
1435
1440 std::map<const cell_iterator, const unsigned int> refined_cells_fe_index;
1441
1446 std::map<const cell_iterator, const unsigned int> coarsened_cells_fe_index;
1447
1453 std::vector<unsigned int> active_fe_indices;
1454
1460 std::unique_ptr<
1461 parallel::distributed::
1462 CellDataTransfer<dim, spacedim, std::vector<unsigned int>>>
1464 };
1465
1470
1476
1482
1489
1494 std::unique_ptr<::internal::DoFHandlerImplementation::Policy::
1495 PolicyBase<dim, spacedim>>
1497
1506
1510 std::vector<::internal::DoFHandlerImplementation::NumberCache>
1512
1518 mutable std::vector<std::vector<types::global_dof_index>>
1520
1525 mutable std::vector<std::vector<offset_type>> cell_dof_cache_ptr;
1526
1532 mutable std::vector<std::array<std::vector<types::global_dof_index>, dim + 1>>
1534
1543 mutable std::vector<std::array<std::vector<offset_type>, dim + 1>>
1545
1551 mutable std::array<std::vector<active_fe_index_type>, dim + 1>
1553
1557 mutable std::array<std::vector<offset_type>, dim + 1> hp_object_fe_ptr;
1558
1563 mutable std::vector<std::vector<active_fe_index_type>>
1565
1570 mutable std::vector<std::vector<active_fe_index_type>>
1572
1577 std::vector<MGVertexDoFs> mg_vertex_dofs;
1578
1582 std::vector<
1583 std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel<dim>>>
1585
1589 std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces<dim>>
1591
1596 std::unique_ptr<ActiveFEIndexTransfer> active_fe_index_transfer;
1597
1602 std::vector<boost::signals2::connection> tria_listeners;
1603
1609 std::vector<boost::signals2::connection> tria_listeners_for_transfer;
1610
1614 void
1616
1620 void
1622
1626 void
1628
1632 void
1634
1646 void
1648
1661 void
1663
1673 void
1675
1684 void
1686
1695 void
1697
1706 void
1708
1709
1710 // Make accessor objects friends.
1711 template <int, int, int, bool>
1712 friend class ::DoFAccessor;
1713 template <int, int, bool>
1714 friend class ::DoFCellAccessor;
1715 friend struct ::internal::DoFAccessorImplementation::Implementation;
1716 friend struct ::internal::DoFCellAccessorImplementation::Implementation;
1717
1718 // Likewise for DoFLevel objects since they need to access the vertex dofs
1719 // in the functions that set and retrieve vertex dof indices.
1720 friend struct ::internal::DoFHandlerImplementation::Implementation;
1721 friend struct ::internal::hp::DoFHandlerImplementation::Implementation;
1722 friend struct ::internal::DoFHandlerImplementation::Policy::
1723 Implementation;
1724
1725 // explicitly check for sensible template arguments, but not on windows
1726 // because MSVC creates bogus warnings during normal compilation
1727#ifndef DEAL_II_MSVC
1728 static_assert(dim <= spacedim,
1729 "The dimension <dim> of a DoFHandler must be less than or "
1730 "equal to the space dimension <spacedim> in which it lives.");
1731#endif
1732};
1733
1734namespace internal
1735{
1736 namespace hp
1737 {
1738 namespace DoFHandlerImplementation
1739 {
1751 template <int dim, int spacedim>
1752 void
1754
1779 template <int dim, int spacedim = dim>
1780 unsigned int
1782 const typename DoFHandler<dim, spacedim>::cell_iterator &parent);
1783
1789 "No FiniteElement has been found in your FECollection that is "
1790 "dominated by all children of a cell you are trying to coarsen!");
1791 } // namespace DoFHandlerImplementation
1792 } // namespace hp
1793} // namespace internal
1794
1795#ifndef DOXYGEN
1796
1797/* ----------------------- Inline functions ----------------------------------
1798 */
1799
1800
1801template <int dim, int spacedim>
1802inline bool
1804{
1805 return hp_capability_enabled;
1806}
1807
1808
1809
1810template <int dim, int spacedim>
1811inline bool
1813{
1814 return mg_number_cache.size() > 0;
1815}
1816
1817
1818
1819template <int dim, int spacedim>
1820inline bool
1822{
1823 return number_cache.n_global_dofs > 0;
1824}
1825
1826
1827
1828template <int dim, int spacedim>
1831{
1833}
1834
1835
1836
1837template <int dim, int spacedim>
1839DoFHandler<dim, spacedim>::n_dofs(const unsigned int level) const
1840{
1842 ExcMessage(
1843 "n_dofs(level) can only be called after distribute_mg_dofs()"));
1845 return mg_number_cache[level].n_global_dofs;
1846}
1847
1848
1849
1850template <int dim, int spacedim>
1853{
1855}
1856
1857
1858
1859template <int dim, int spacedim>
1860const IndexSet &
1862{
1864}
1865
1866
1867
1868template <int dim, int spacedim>
1869const IndexSet &
1871{
1872 Assert(level < this->get_triangulation().n_global_levels(),
1873 ExcMessage("The given level index exceeds the number of levels "
1874 "present in the triangulation"));
1875 Assert(
1876 mg_number_cache.size() == this->get_triangulation().n_global_levels(),
1877 ExcMessage(
1878 "The level dofs are not set up properly! Did you call distribute_mg_dofs()?"));
1879 return mg_number_cache[level].locally_owned_dofs;
1880}
1881
1882
1883
1884template <int dim, int spacedim>
1885inline const FiniteElement<dim, spacedim> &
1886DoFHandler<dim, spacedim>::get_fe(const unsigned int number) const
1887{
1889 ExcMessage("No finite element collection is associated with "
1890 "this DoFHandler"));
1891 return fe_collection[number];
1892}
1893
1894
1895
1896template <int dim, int spacedim>
1899{
1900 return fe_collection;
1901}
1902
1903
1904
1905template <int dim, int spacedim>
1906inline const Triangulation<dim, spacedim> &
1908{
1909 Assert(tria != nullptr,
1910 ExcMessage("This DoFHandler object has not been associated "
1911 "with a triangulation."));
1912 return *tria;
1913}
1914
1915
1916
1917template <int dim, int spacedim>
1918inline MPI_Comm
1920{
1921 Assert(tria != nullptr,
1922 ExcMessage("This DoFHandler object has not been associated "
1923 "with a triangulation."));
1924 return tria->get_communicator();
1925}
1926
1927
1928
1929template <int dim, int spacedim>
1930inline const BlockInfo &
1932{
1934
1935 return block_info_object;
1936}
1937
1938
1939
1940template <int dim, int spacedim>
1941template <typename number>
1944 const std::map<types::boundary_id, const Function<spacedim, number> *>
1945 &boundary_ids) const
1946{
1947 Assert(!(dim == 2 && spacedim == 3) || this->hp_capability_enabled == false,
1949
1950 // extract the set of boundary ids and forget about the function object
1951 // pointers
1952 std::set<types::boundary_id> boundary_ids_only;
1953 for (typename std::map<types::boundary_id,
1954 const Function<spacedim, number> *>::const_iterator p =
1955 boundary_ids.begin();
1956 p != boundary_ids.end();
1957 ++p)
1958 boundary_ids_only.insert(p->first);
1959
1960 // then just hand everything over to the other function that does the work
1961 return n_boundary_dofs(boundary_ids_only);
1962}
1963
1964
1965
1966namespace internal
1967{
1975 template <int dim, int spacedim>
1976 std::string
1977 policy_to_string(const ::internal::DoFHandlerImplementation::Policy::
1978 PolicyBase<dim, spacedim> &policy);
1979} // namespace internal
1980
1981
1982
1983template <int dim, int spacedim>
1984template <class Archive>
1985void
1986DoFHandler<dim, spacedim>::save(Archive &ar, const unsigned int) const
1987{
1988 if (this->hp_capability_enabled)
1989 {
1990 ar &this->object_dof_indices;
1991 ar &this->object_dof_ptr;
1992
1993 ar &this->cell_dof_cache_indices;
1994 ar &this->cell_dof_cache_ptr;
1995
1996 ar &this->hp_cell_active_fe_indices;
1997 ar &this->hp_cell_future_fe_indices;
1998
1999 ar &hp_object_fe_ptr;
2001
2002 ar &number_cache;
2003
2004 ar &mg_number_cache;
2005
2006 // write out the number of triangulation cells and later check during
2007 // loading that this number is indeed correct; same with something that
2008 // identifies the policy
2009 const unsigned int n_cells = this->tria->n_cells();
2010 std::string policy_name =
2012
2013 ar &n_cells &policy_name;
2014 }
2015 else
2016 {
2017 ar &this->block_info_object;
2018 ar &number_cache;
2019
2020 ar &this->object_dof_indices;
2021 ar &this->object_dof_ptr;
2022
2023 ar &this->cell_dof_cache_indices;
2024 ar &this->cell_dof_cache_ptr;
2025
2026 // write out the number of triangulation cells and later check during
2027 // loading that this number is indeed correct; same with something that
2028 // identifies the FE and the policy
2029 unsigned int n_cells = this->tria->n_cells();
2030 std::string fe_name = this->get_fe(0).get_name();
2031 std::string policy_name = internal::policy_to_string(*this->policy);
2032
2033 ar &n_cells &fe_name &policy_name;
2034 }
2035}
2036
2037
2038
2039template <int dim, int spacedim>
2040template <class Archive>
2041void
2042DoFHandler<dim, spacedim>::load(Archive &ar, const unsigned int)
2043{
2044 if (this->hp_capability_enabled)
2045 {
2046 ar &this->object_dof_indices;
2047 ar &this->object_dof_ptr;
2048
2049 ar &this->cell_dof_cache_indices;
2050 ar &this->cell_dof_cache_ptr;
2051
2052 ar &this->hp_cell_active_fe_indices;
2053 ar &this->hp_cell_future_fe_indices;
2054
2055 ar &hp_object_fe_ptr;
2057
2058 ar &number_cache;
2059
2060 ar &mg_number_cache;
2061
2062 // these are the checks that correspond to the last block in the save()
2063 // function
2064 unsigned int n_cells;
2065 std::string policy_name;
2066
2067 ar &n_cells &policy_name;
2068
2070 n_cells == this->tria->n_cells(),
2071 ExcMessage(
2072 "The object being loaded into does not match the triangulation "
2073 "that has been stored previously."));
2075 policy_name == ::internal::policy_to_string(*this->policy),
2076 ExcMessage("The policy currently associated with this DoFHandler (" +
2078 ") does not match the one that was associated with the "
2079 "DoFHandler previously stored (" +
2080 policy_name + ")."));
2081 }
2082 else
2083 {
2084 ar &this->block_info_object;
2085 ar &number_cache;
2086
2087 object_dof_indices.clear();
2088
2089 object_dof_ptr.clear();
2090
2091 ar &this->object_dof_indices;
2092 ar &this->object_dof_ptr;
2093
2094 ar &this->cell_dof_cache_indices;
2095 ar &this->cell_dof_cache_ptr;
2096
2097 // these are the checks that correspond to the last block in the save()
2098 // function
2099 unsigned int n_cells;
2100 std::string fe_name;
2101 std::string policy_name;
2102
2103 ar &n_cells &fe_name &policy_name;
2104
2106 n_cells == this->tria->n_cells(),
2107 ExcMessage(
2108 "The object being loaded into does not match the triangulation "
2109 "that has been stored previously."));
2111 fe_name == this->get_fe(0).get_name(),
2112 ExcMessage(
2113 "The finite element associated with this DoFHandler does not match "
2114 "the one that was associated with the DoFHandler previously stored."));
2115 AssertThrow(policy_name == internal::policy_to_string(*this->policy),
2116 ExcMessage(
2117 "The policy currently associated with this DoFHandler (" +
2119 ") does not match the one that was associated with the "
2120 "DoFHandler previously stored (" +
2121 policy_name + ")."));
2122 }
2123}
2124
2125
2126
2127template <int dim, int spacedim>
2130 const unsigned int level,
2131 const unsigned int dof_number,
2132 const unsigned int dofs_per_vertex)
2133{
2134 Assert((level >= coarsest_level) && (level <= finest_level),
2135 ExcInvalidLevel(level));
2136 return indices[dofs_per_vertex * (level - coarsest_level) + dof_number];
2137}
2138
2139
2140
2141extern template class DoFHandler<1, 1>;
2142extern template class DoFHandler<1, 2>;
2143extern template class DoFHandler<1, 3>;
2144extern template class DoFHandler<2, 2>;
2145extern template class DoFHandler<2, 3>;
2146extern template class DoFHandler<3, 3>;
2147
2148
2149#endif // DOXYGEN
2150
2152
2153#endif
A small class collecting the different BlockIndices involved in global, multilevel and local computat...
Definition: block_info.h:94
unsigned int coarsest_level
Definition: dof_handler.h:1403
types::global_dof_index & access_index(const unsigned int level, const unsigned int dof_number, const unsigned int dofs_per_vertex)
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:1419
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:1564
unsigned int max_couplings_between_dofs() const
std::vector< std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel< dim > > > mg_levels
Definition: dof_handler.h:1584
const FiniteElement< dim, spacedim > & get_fe(const unsigned int index=0) const
std::unique_ptr< ActiveFEIndexTransfer > active_fe_index_transfer
Definition: dof_handler.h:1596
hp::FECollection< dim, spacedim > fe_collection
Definition: dof_handler.h:1488
void create_active_fe_table()
static constexpr unsigned int dimension
Definition: dof_handler.h:509
SmartPointer< const Triangulation< dim, spacedim >, DoFHandler< dim, spacedim > > tria
Definition: dof_handler.h:1481
void initialize(const Triangulation< dim, spacedim > &tria, const hp::FECollection< dim, spacedim > &fe)
const hp::FECollection< dim, spacedim > & get_fe_collection() const
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:1469
bool has_active_dofs() const
std::vector< boost::signals2::connection > tria_listeners_for_transfer
Definition: dof_handler.h:1609
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:514
const IndexSet & locally_owned_mg_dofs(const unsigned int level) const
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:1519
std::vector< MGVertexDoFs > mg_vertex_dofs
Definition: dof_handler.h:1577
void set_fe(const hp::FECollection< dim, spacedim > &fe)
std::vector< std::vector< active_fe_index_type > > hp_cell_future_fe_indices
Definition: dof_handler.h:1571
std::vector< boost::signals2::connection > tria_listeners
Definition: dof_handler.h:1602
void post_distributed_transfer_action()
std::vector< std::array< std::vector< types::global_dof_index >, dim+1 > > object_dof_indices
Definition: dof_handler.h:1533
const Triangulation< dim, spacedim > & get_triangulation() const
typename LevelSelector::CellAccessor level_cell_accessor
Definition: dof_handler.h:499
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:1552
const IndexSet & locally_owned_dofs() const
void reinit(const Triangulation< dim, spacedim > &tria)
std::vector< std::array< std::vector< offset_type >, dim+1 > > object_dof_ptr
Definition: dof_handler.h:1544
std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces< dim > > mg_faces
Definition: dof_handler.h:1590
void serialize(Archive &archive, const unsigned int version)
DoFHandler & operator=(const DoFHandler &)=delete
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
void set_fe(const FiniteElement< dim, spacedim > &fe)
bool hp_capability_enabled
Definition: dof_handler.h:1475
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:1525
cell_iterator end(const unsigned int level) const
typename LevelSelector::cell_iterator level_cell_iterator
Definition: dof_handler.h:502
void prepare_for_serialization_of_active_fe_indices()
std::vector<::internal::DoFHandlerImplementation::NumberCache > mg_number_cache
Definition: dof_handler.h:1511
void load(Archive &ar, const unsigned int version)
static const unsigned int default_fe_index
Definition: dof_handler.h:519
typename LevelSelector::face_iterator level_face_iterator
Definition: dof_handler.h:503
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:1557
MPI_Comm get_communicator() const
static const unsigned int invalid_fe_index
Definition: dof_handler.h:524
void clear()
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:1496
typename LevelSelector::FaceAccessor level_face_accessor
Definition: dof_handler.h:500
types::global_dof_index n_dofs(const unsigned int level) const
unsigned int max_couplings_between_boundary_dofs() const
void setup_policy()
void initialize(const Triangulation< dim, spacedim > &tria, const FiniteElement< dim, spacedim > &fe)
types::global_dof_index n_locally_owned_dofs() const
static const active_fe_index_type invalid_active_fe_index
Definition: dof_handler.h:540
unsigned short int active_fe_index_type
Definition: dof_handler.h:529
void deserialize_active_fe_indices()
types::global_dof_index n_boundary_dofs(const std::set< types::boundary_id > &boundary_ids) const
const BlockInfo & block_info() const
::internal::DoFHandlerImplementation::NumberCache number_cache
Definition: dof_handler.h:1505
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_DEPRECATED
Definition: config.h:164
#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:4606
IteratorRange< active_cell_iterator > active_cell_iterators() const
IteratorRange< level_cell_iterator > mg_cell_iterators() const
IteratorRange< cell_iterator > cell_iterators_on_level(const unsigned int level) const
IteratorRange< cell_iterator > cell_iterators() const
IteratorRange< active_cell_iterator > active_cell_iterators_on_level(const unsigned int level) const
IteratorRange< level_cell_iterator > mg_cell_iterators_on_level(const unsigned int level) const
#define DeclException0(Exception0)
Definition: exceptions.h:464
static ::ExceptionBase & ExcInvalidBoundaryIndicator()
static ::ExceptionBase & ExcOnlyAvailableWithHP()
#define Assert(cond, exc)
Definition: exceptions.h:1473
static ::ExceptionBase & ExcNotImplementedWithHP()
static ::ExceptionBase & ExcNewNumbersNotConsecutive(types::global_dof_index arg1)
static ::ExceptionBase & ExcInvalidFEIndex(int arg1, int arg2)
#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 & ExcInvalidLevel(int arg1)
static ::ExceptionBase & ExcNoFESelected()
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
Definition: exceptions.h:1583
typename ActiveSelector::FaceAccessor face_accessor
Definition: dof_handler.h:348
typename ActiveSelector::cell_iterator cell_iterator
Definition: dof_handler.h:466
typename ActiveSelector::line_iterator line_iterator
Definition: dof_handler.h:357
typename ActiveSelector::face_iterator face_iterator
Definition: dof_handler.h:484
typename ActiveSelector::active_line_iterator active_line_iterator
Definition: dof_handler.h:372
typename ActiveSelector::active_cell_iterator active_cell_iterator
Definition: dof_handler.h:438
typename ActiveSelector::CellAccessor cell_accessor
Definition: dof_handler.h:334
typename ActiveSelector::quad_iterator quad_iterator
Definition: dof_handler.h:381
typename ActiveSelector::active_hex_iterator active_hex_iterator
Definition: dof_handler.h:416
typename ActiveSelector::active_quad_iterator active_quad_iterator
Definition: dof_handler.h:396
typename ActiveSelector::hex_iterator hex_iterator
Definition: dof_handler.h:405
typename ActiveSelector::active_face_iterator active_face_iterator
Definition: dof_handler.h:497
Definition: hp.h:118
unsigned int n_cells(const internal::TriangulationImplementation::NumberCache< 1 > &c)
Definition: tria.cc:13734
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:57
static const unsigned int invalid_unsigned_int
Definition: types.h:201
std::map< const cell_iterator, const unsigned int > coarsened_cells_fe_index
Definition: dof_handler.h:1446
std::vector< unsigned int > active_fe_indices
Definition: dof_handler.h:1453
std::map< const cell_iterator, const unsigned int > refined_cells_fe_index
Definition: dof_handler.h:1440
std::unique_ptr< parallel::distributed::CellDataTransfer< dim, spacedim, std::vector< unsigned int > > > cell_data_transfer
Definition: dof_handler.h:1463
std::map< const cell_iterator, const unsigned int > persisting_cells_fe_index
Definition: dof_handler.h:1434