20 #include <deal.II/base/mpi.templates.h>
23 #include <deal.II/distributed/cell_data_transfer.templates.h>
41 #include <unordered_set>
46 template <
int dim,
int spacedim>
53 template <
int dim,
int spacedim>
56 PolicyBase<dim, spacedim> &policy)
58 std::string policy_name;
59 if (
dynamic_cast<const typename ::internal::DoFHandlerImplementation::
60 Policy::Sequential<dim, spacedim> *
>(&policy) ||
61 dynamic_cast<const typename ::internal::DoFHandlerImplementation::
62 Policy::Sequential<dim, spacedim> *
>(&policy))
63 policy_name =
"Policy::Sequential<";
64 else if (
dynamic_cast<
65 const typename ::internal::DoFHandlerImplementation::
66 Policy::ParallelDistributed<dim, spacedim> *
>(&policy) ||
68 const typename ::internal::DoFHandlerImplementation::
69 Policy::ParallelDistributed<dim, spacedim> *
>(&policy))
70 policy_name =
"Policy::ParallelDistributed<";
71 else if (
dynamic_cast<
72 const typename ::internal::DoFHandlerImplementation::
73 Policy::ParallelShared<dim, spacedim> *
>(&policy) ||
75 const typename ::internal::DoFHandlerImplementation::
76 Policy::ParallelShared<dim, spacedim> *
>(&policy))
77 policy_name =
"Policy::ParallelShared<";
86 namespace DoFHandlerImplementation
98 template <
int spacedim>
108 template <
int spacedim>
227 template <
int spacedim>
240 const unsigned int max_adjacent_cells =
244 if (max_adjacent_cells <= 8)
263 template <
int dim,
int spacedim>
279 template <
int dim,
int spacedim>
282 const unsigned int n_inner_dofs_per_cell)
284 for (
unsigned int i = 0; i < dof_handler.
tria->
n_levels(); ++i)
289 for (
const auto &cell :
291 if (cell->is_active() && !cell->is_artificial())
293 n_inner_dofs_per_cell;
309 template <
int dim,
int spacedim,
typename T>
312 const unsigned int structdim,
313 const unsigned int n_raw_entities,
314 const T &cell_process)
319 dof_handler.
object_dof_ptr[0][structdim].assign(n_raw_entities + 1, -1);
322 if (cell->is_active() && !cell->is_artificial())
325 [&](
const unsigned int n_dofs_per_entity,
326 const unsigned int index) {
327 auto &n_dofs_per_entity_target =
332 Assert((n_dofs_per_entity_target ==
336 n_dofs_per_entity_target == n_dofs_per_entity),
339 n_dofs_per_entity_target = n_dofs_per_entity;
344 for (
unsigned int i = 1; i < n_raw_entities + 1; ++i)
368 template <
int dim,
int spacedim>
374 const auto &fe = dof_handler.
get_fe();
378 dim == 1 ? fe.n_dofs_per_line() :
379 (dim == 2 ? fe.n_dofs_per_quad(0) :
380 fe.n_dofs_per_hex()));
386 [&](
const auto &cell,
const auto &process) {
387 for (const auto vertex_index :
388 cell->vertex_indices())
389 process(fe.n_dofs_per_vertex(),
390 cell->vertex_index(vertex_index));
394 if (dim == 2 || dim == 3)
398 [&](
const auto &cell,
const auto &process) {
399 for (const auto line_index :
400 cell->line_indices())
401 process(fe.n_dofs_per_line(),
402 cell->line(line_index)->index());
410 [&](
const auto &cell,
const auto &process) {
411 for (const auto face_index :
412 cell->face_indices())
413 process(fe.n_dofs_per_quad(face_index),
414 cell->face(face_index)->index());
418 template <
int spacedim>
426 const ::Triangulation<1, spacedim> &
tria =
428 const unsigned int dofs_per_line =
432 for (
unsigned int i = 0; i < n_levels; ++i)
436 dof_handler.
mg_levels.back()->dof_object.dofs =
446 std::vector<unsigned int> max_level(n_vertices, 0);
447 std::vector<unsigned int> min_level(n_vertices, n_levels);
449 for (typename ::Triangulation<1, spacedim>::cell_iterator cell =
454 const unsigned int level = cell->level();
456 for (
const auto vertex : cell->vertex_indices())
458 const unsigned int vertex_index = cell->vertex_index(vertex);
460 if (min_level[vertex_index] >
level)
461 min_level[vertex_index] =
level;
463 if (max_level[vertex_index] <
level)
464 max_level[vertex_index] =
level;
468 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
472 Assert(max_level[vertex] >= min_level[vertex],
488 template <
int spacedim>
496 const ::FiniteElement<2, spacedim> &fe = dof_handler.
get_fe();
497 const ::Triangulation<2, spacedim> &
tria =
501 for (
unsigned int i = 0; i < n_levels; ++i)
506 dof_handler.
mg_levels.back()->dof_object.dofs =
507 std::vector<types::global_dof_index>(
509 fe.n_dofs_per_quad(0 ),
514 std::make_unique<internal::DoFHandlerImplementation::DoFFaces<2>>();
517 fe.n_dofs_per_line(),
524 std::vector<unsigned int> max_level(n_vertices, 0);
525 std::vector<unsigned int> min_level(n_vertices, n_levels);
527 for (typename ::Triangulation<2, spacedim>::cell_iterator cell =
532 const unsigned int level = cell->level();
534 for (
const auto vertex : cell->vertex_indices())
536 const unsigned int vertex_index = cell->vertex_index(vertex);
538 if (min_level[vertex_index] >
level)
539 min_level[vertex_index] =
level;
541 if (max_level[vertex_index] <
level)
542 max_level[vertex_index] =
level;
546 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
550 Assert(max_level[vertex] >= min_level[vertex],
554 fe.n_dofs_per_vertex());
565 template <
int spacedim>
573 const ::FiniteElement<3, spacedim> &fe = dof_handler.
get_fe();
574 const ::Triangulation<3, spacedim> &
tria =
578 for (
unsigned int i = 0; i < n_levels; ++i)
583 dof_handler.
mg_levels.back()->dof_object.dofs =
590 std::make_unique<internal::DoFHandlerImplementation::DoFFaces<3>>();
593 fe.n_dofs_per_line(),
599 dof_handler.
mg_faces->quads.dofs = std::vector<types::global_dof_index>(
607 std::vector<unsigned int> max_level(n_vertices, 0);
608 std::vector<unsigned int> min_level(n_vertices, n_levels);
610 for (typename ::Triangulation<3, spacedim>::cell_iterator cell =
615 const unsigned int level = cell->level();
617 for (
const auto vertex : cell->vertex_indices())
619 const unsigned int vertex_index = cell->vertex_index(vertex);
621 if (min_level[vertex_index] >
level)
622 min_level[vertex_index] =
level;
624 if (max_level[vertex_index] <
level)
625 max_level[vertex_index] =
level;
629 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
633 Assert(max_level[vertex] >= min_level[vertex],
637 fe.n_dofs_per_vertex());
654 namespace DoFHandlerImplementation
667 template <
int dim,
int spacedim>
674 if (cell->is_locally_owned())
676 !cell->future_fe_index_set(),
678 "There shouldn't be any cells flagged for p-adaptation when partitioning."));
687 template <
int dim,
int spacedim>
703 std::vector<bool> locally_used_vertices(
706 if (!cell->is_artificial())
707 for (
const auto v : cell->vertex_indices())
708 locally_used_vertices[cell->vertex_index(v)] =
true;
710 std::vector<std::vector<bool>> vertex_fe_association(
715 if (!cell->is_artificial())
716 for (
const auto v : cell->vertex_indices())
717 vertex_fe_association[cell->active_fe_index()]
718 [cell->vertex_index(v)] =
true;
727 if (locally_used_vertices[v] ==
true)
732 if (vertex_fe_association[fe][v] ==
true)
739 const unsigned int d = 0;
740 const unsigned int l = 0;
750 unsigned int vertex_slots_needed = 0;
751 unsigned int fe_slots_needed = 0;
759 for (
unsigned int fe = 0;
762 if (vertex_fe_association[fe][v] ==
true)
765 vertex_slots_needed +=
783 if (vertex_fe_association[fe][v] ==
true)
789 for (
unsigned int i = 0;
790 i < dof_handler.
get_fe(fe).n_dofs_per_vertex();
820 template <
int dim,
int spacedim>
837 std::vector<typename DoFHandler<dim, spacedim>::offset_type>(
845 if (cell->is_active() && !cell->is_artificial())
850 cell->get_fe().template n_dofs_per_object<dim>();
854 std::vector<types::global_dof_index>(
865 template <
int dim,
int spacedim>
886 std::vector<bool> face_touched(dim == 2 ?
890 const unsigned int d = dim - 1;
891 const unsigned int l = 0;
903 unsigned int n_face_slots = 0;
906 if (!cell->is_artificial())
907 for (
const auto face : cell->face_indices())
908 if (!face_touched[cell->face(face)->index()])
910 unsigned int fe_slots_needed = 0;
912 if (cell->at_boundary(face) ||
913 cell->face(face)->has_children() ||
914 cell->neighbor_is_coarser(face) ||
915 (!cell->at_boundary(face) &&
916 cell->neighbor(face)->is_artificial()) ||
917 (!cell->at_boundary(face) &&
918 !cell->neighbor(face)->is_artificial() &&
919 (cell->active_fe_index() ==
920 cell->neighbor(face)->active_fe_index())))
924 dof_handler.
get_fe(cell->active_fe_index())
925 .template n_dofs_per_object<dim - 1>(face);
931 dof_handler.
get_fe(cell->active_fe_index())
932 .
template n_dofs_per_object<dim - 1>(face) +
934 .
get_fe(cell->neighbor(face)->active_fe_index())
935 .
template n_dofs_per_object<dim - 1>(
936 cell->neighbor_face_no(face));
940 face_touched[cell->face(face)->index()] =
true;
964 face_touched = std::vector<bool>(face_touched.size());
967 if (!cell->is_artificial())
968 for (
const auto face : cell->face_indices())
969 if (!face_touched[cell->face(face)->index()])
972 if (cell->at_boundary(face) ||
973 cell->face(face)->has_children() ||
974 cell->neighbor_is_coarser(face) ||
975 (!cell->at_boundary(face) &&
976 cell->neighbor(face)->is_artificial()) ||
977 (!cell->at_boundary(face) &&
978 !cell->neighbor(face)->is_artificial() &&
979 (cell->active_fe_index() ==
980 cell->neighbor(face)->active_fe_index())))
983 const unsigned int n_dofs =
985 .template n_dofs_per_object<dim - 1>(face);
986 const unsigned int offset =
993 for (
unsigned int i = 0; i < n_dofs; ++i)
1000 unsigned int face_no_1 = face;
1002 cell->neighbor(face)->active_fe_index();
1003 unsigned int face_no_2 = cell->neighbor_face_no(face);
1011 const unsigned int n_dofs_1 =
1013 .template n_dofs_per_object<dim - 1>(face_no_1);
1015 const unsigned int n_dofs_2 =
1017 .template n_dofs_per_object<dim - 1>(face_no_2);
1019 const unsigned int offset =
1024 cell->active_fe_index());
1038 for (
unsigned int i = 0; i < n_dofs_1 + n_dofs_2; ++i)
1044 face_touched[cell->face(face)->index()] =
true;
1047 for (
unsigned int i = 1;
1063 template <
int spacedim>
1070 ExcMessage(
"The current Triangulation must not be empty."));
1088 template <
int spacedim>
1095 ExcMessage(
"The current Triangulation must not be empty."));
1115 template <
int spacedim>
1122 ExcMessage(
"The current Triangulation must not be empty."));
1151 std::vector<std::vector<bool>> line_fe_association(
1156 if (!cell->is_artificial())
1157 for (
const auto l : cell->line_indices())
1158 line_fe_association[cell->active_fe_index()]
1159 [cell->line_index(
l)] =
true;
1171 if (line_fe_association[fe][line] ==
true)
1173 line_is_used[line] =
true;
1179 const unsigned int d = 1;
1180 const unsigned int l = 0;
1190 unsigned int line_slots_needed = 0;
1191 unsigned int fe_slots_needed = 0;
1198 if (line_is_used[line] ==
true)
1200 for (
unsigned int fe = 0;
1203 if (line_fe_association[fe][line] ==
true)
1206 line_slots_needed +=
1225 if (line_is_used[line] ==
true)
1227 for (
unsigned int fe = 0;
1230 if (line_fe_association[fe][line] ==
true)
1236 for (
unsigned int i = 0;
1237 i < dof_handler.
get_fe(fe).n_dofs_per_line();
1251 fe_slots_needed + 1);
1273 template <
int dim,
int spacedim>
1281 if (const ::parallel::shared::Triangulation<dim, spacedim> *tr =
1283 const ::parallel::shared::Triangulation<dim, spacedim>
1296 std::vector<types::fe_index> active_fe_indices(
1297 tr->n_active_cells(), 0u);
1299 if (cell->is_locally_owned())
1300 active_fe_indices[cell->active_cell_index()] =
1301 cell->active_fe_index();
1304 tr->get_communicator(),
1314 if (!cell->is_locally_owned())
1317 active_fe_indices[cell->active_cell_index()];
1319 else if (const ::parallel::
1320 DistributedTriangulationBase<dim, spacedim> *tr =
1323 DistributedTriangulationBase<dim, spacedim> *
>(
1336 return cell->active_fe_index();
1362 const ::parallel::TriangulationBase<dim, spacedim> *
>(
1383 template <
int dim,
int spacedim>
1391 if (const ::parallel::shared::Triangulation<dim, spacedim> *tr =
1393 const ::parallel::shared::Triangulation<dim, spacedim>
1396 std::vector<types::fe_index> future_fe_indices(
1397 tr->n_active_cells(), 0u);
1400 future_fe_indices[cell->active_cell_index()] =
1405 tr->get_communicator(),
1409 if (!cell->is_locally_owned())
1412 future_fe_indices[cell->active_cell_index()];
1414 else if (const ::parallel::
1415 DistributedTriangulationBase<dim, spacedim> *tr =
1418 DistributedTriangulationBase<dim, spacedim> *
>(
1447 const ::parallel::TriangulationBase<dim, spacedim> *
>(
1475 template <
int dim,
int spacedim>
1483 if (cell->is_locally_owned())
1485 if (cell->refine_flag_set())
1490 fe_transfer->refined_cells_fe_index.insert(
1491 {cell, cell->future_fe_index()});
1493 else if (cell->coarsen_flag_set())
1500 const auto &parent = cell->parent();
1504 if (fe_transfer->coarsened_cells_fe_index.find(parent) ==
1505 fe_transfer->coarsened_cells_fe_index.end())
1512 for (
const auto &child : parent->child_iterators())
1513 Assert(child->is_active() &&
1514 child->coarsen_flag_set(),
1515 typename ::Triangulation<
1516 dim>::ExcInconsistentCoarseningFlags());
1520 DoFHandlerImplementation::Implementation::
1521 dominated_future_fe_on_children<dim, spacedim>(
1524 fe_transfer->coarsened_cells_fe_index.insert(
1533 if (cell->future_fe_index_set() ==
true)
1534 fe_transfer->persisting_cells_fe_index.insert(
1535 {cell, cell->future_fe_index()});
1546 template <
int dim,
int spacedim>
1554 for (
const auto &persist : fe_transfer->persisting_cells_fe_index)
1556 const auto &cell = persist.first;
1558 if (cell->is_locally_owned())
1561 cell->set_active_fe_index(persist.second);
1567 for (
const auto &
refine : fe_transfer->refined_cells_fe_index)
1569 const auto &parent =
refine.first;
1571 for (
const auto &child : parent->child_iterators())
1572 if (child->is_locally_owned())
1575 child->set_active_fe_index(
refine.second);
1581 for (
const auto &
coarsen : fe_transfer->coarsened_cells_fe_index)
1583 const auto &cell =
coarsen.first;
1585 if (cell->is_locally_owned())
1588 cell->set_active_fe_index(
coarsen.second);
1604 template <
int dim,
int spacedim>
1608 const std::vector<types::fe_index> &children_fe_indices,
1609 const ::hp::FECollection<dim, spacedim> &fe_collection)
1615 const std::set<unsigned int> children_fe_indices_set(
1616 children_fe_indices.begin(), children_fe_indices.end());
1619 fe_collection.find_dominated_fe_extended(children_fe_indices_set,
1625 return dominated_fe_index;
1636 template <
int dim,
int spacedim>
1642 !parent->is_active(),
1644 "You ask for information on children of this cell which is only "
1645 "available for active cells. This cell has no children."));
1647 const auto &dof_handler = parent->get_dof_handler();
1649 dof_handler.has_hp_capabilities(),
1653 std::set<unsigned int> future_fe_indices_children;
1654 for (
const auto &child : parent->child_iterators())
1659 "You ask for information on children of this cell which is only "
1660 "available for active cells. One of its children is not active."));
1669 ::internal::DoFCellAccessorImplementation::
1670 Implementation::future_fe_index<dim, spacedim, false>(*child);
1672 future_fe_indices_children.insert(future_fe_index_child);
1677 dof_handler.fe_collection.find_dominated_fe_extended(
1678 future_fe_indices_children,
1684 return future_fe_index;
1693 template <
int dim,
int spacedim>
1697 Implementation::communicate_future_fe_indices<dim, spacedim>(
1706 template <
int dim,
int spacedim>
1711 return Implementation::dominated_future_fe_on_children<dim, spacedim>(
1720 template <
int dim,
int spacedim>
1723 : hp_capability_enabled(true)
1724 ,
tria(nullptr, typeid(*this).name())
1730 template <
int dim,
int spacedim>
1740 template <
int dim,
int spacedim>
1745 for (
auto &connection : this->tria_listeners)
1746 connection.disconnect();
1747 this->tria_listeners.clear();
1749 for (
auto &connection : this->tria_listeners_for_transfer)
1750 connection.disconnect();
1751 this->tria_listeners_for_transfer.clear();
1762 this->policy.reset();
1767 template <
int dim,
int spacedim>
1775 for (
auto &connection : this->tria_listeners)
1776 connection.disconnect();
1777 this->tria_listeners.clear();
1779 for (
auto &connection : this->tria_listeners_for_transfer)
1780 connection.disconnect();
1781 this->tria_listeners_for_transfer.clear();
1785 this->policy.reset();
1795 this->setup_policy();
1798 hp_capability_enabled =
true;
1799 this->connect_to_triangulation_signals();
1800 this->create_active_fe_table();
1806 template <
int dim,
int spacedim>
1813 if (cell == this->get_triangulation().
end(
level))
1815 return cell_iterator(*cell,
this);
1820 template <
int dim,
int spacedim>
1829 while (i->has_children())
1837 template <
int dim,
int spacedim>
1842 return cell_iterator(&this->get_triangulation(), -1, -1,
this);
1847 template <
int dim,
int spacedim>
1853 this->get_triangulation().
end(
level);
1856 return cell_iterator(*cell,
this);
1861 template <
int dim,
int spacedim>
1869 return active_cell_iterator(
end());
1870 return active_cell_iterator(*cell,
this);
1875 template <
int dim,
int spacedim>
1880 Assert(this->has_level_dofs(),
1882 "levels if mg dofs got distributed."));
1885 if (cell == this->get_triangulation().
end(
level))
1886 return end_mg(
level);
1887 return level_cell_iterator(*cell,
this);
1892 template <
int dim,
int spacedim>
1897 Assert(this->has_level_dofs(),
1899 "levels if mg dofs got distributed."));
1901 this->get_triangulation().
end(
level);
1904 return level_cell_iterator(*cell,
this);
1909 template <
int dim,
int spacedim>
1914 return level_cell_iterator(&this->get_triangulation(), -1, -1,
this);
1919 template <
int dim,
int spacedim>
1923 spacedim>::cell_iterators()
const
1931 template <
int dim,
int spacedim>
1944 template <
int dim,
int spacedim>
1951 begin_mg(), end_mg());
1956 template <
int dim,
int spacedim>
1960 spacedim>::cell_iterators_on_level(
const unsigned int level)
const
1968 template <
int dim,
int spacedim>
1981 template <
int dim,
int spacedim>
1997 template <
int dim,
int spacedim>
2001 Assert(!(dim == 2 && spacedim == 3) || hp_capability_enabled ==
false,
2002 ExcNotImplementedWithHP());
2006 std::unordered_set<types::global_dof_index> boundary_dofs;
2007 std::vector<types::global_dof_index> dofs_on_face;
2008 dofs_on_face.reserve(this->get_fe_collection().max_dofs_per_face());
2010 const IndexSet &owned_dofs = locally_owned_dofs();
2017 for (
const auto &cell : this->active_cell_iterators())
2018 if (cell->is_locally_owned() && cell->at_boundary())
2020 for (
const auto iface : cell->face_indices())
2022 const auto face = cell->face(iface);
2023 if (face->at_boundary())
2025 const unsigned int dofs_per_face =
2026 cell->get_fe().n_dofs_per_face(iface);
2027 dofs_on_face.resize(dofs_per_face);
2029 face->get_dof_indices(dofs_on_face, cell->active_fe_index());
2030 for (
unsigned int i = 0; i < dofs_per_face; ++i)
2032 const unsigned int global_idof_index = dofs_on_face[i];
2033 if (owned_dofs.
is_element(global_idof_index))
2035 boundary_dofs.insert(global_idof_index);
2041 return boundary_dofs.size();
2046 template <
int dim,
int spacedim>
2049 const std::set<types::boundary_id> &boundary_ids)
const
2051 Assert(!(dim == 2 && spacedim == 3) || hp_capability_enabled ==
false,
2052 ExcNotImplementedWithHP());
2061 std::unordered_set<types::global_dof_index> boundary_dofs;
2062 std::vector<types::global_dof_index> dofs_on_face;
2063 dofs_on_face.reserve(this->get_fe_collection().max_dofs_per_face());
2065 const IndexSet &owned_dofs = locally_owned_dofs();
2067 for (
const auto &cell : this->active_cell_iterators())
2068 if (cell->is_locally_owned() && cell->at_boundary())
2070 for (
const auto iface : cell->face_indices())
2072 const auto face = cell->face(iface);
2073 const unsigned int boundary_id = face->boundary_id();
2074 if (face->at_boundary() &&
2075 (boundary_ids.find(
boundary_id) != boundary_ids.end()))
2077 const unsigned int dofs_per_face =
2078 cell->get_fe().n_dofs_per_face(iface);
2079 dofs_on_face.resize(dofs_per_face);
2081 face->get_dof_indices(dofs_on_face, cell->active_fe_index());
2082 for (
unsigned int i = 0; i < dofs_per_face; ++i)
2084 const unsigned int global_idof_index = dofs_on_face[i];
2085 if (owned_dofs.
is_element(global_idof_index))
2087 boundary_dofs.insert(global_idof_index);
2093 return boundary_dofs.size();
2098 template <
int dim,
int spacedim>
2114 if (hp_capability_enabled)
2127 if (this->mg_faces !=
nullptr)
2130 for (
unsigned int i = 0; i < this->mg_vertex_dofs.size(); ++i)
2131 mem +=
sizeof(MGVertexDoFs) +
2132 (1 + this->mg_vertex_dofs[i].get_finest_level() -
2133 this->mg_vertex_dofs[i].get_coarsest_level()) *
2142 template <
int dim,
int spacedim>
2152 template <
int dim,
int spacedim>
2157 Assert(this->tria !=
nullptr,
2159 "You need to set the Triangulation in the DoFHandler using reinit() "
2160 "or in the constructor before you can distribute DoFs."));
2162 ExcMessage(
"The Triangulation you are using is empty!"));
2168 ExcMessage(
"The given hp::FECollection contains more finite elements "
2169 "than the DoFHandler can cover with active FE indices."));
2174 if ((hp_cell_active_fe_indices.size() > 0) &&
2175 (hp_cell_future_fe_indices.size() > 0))
2179 for (
const auto &cell :
2183 ExcInvalidFEIndex(cell->active_fe_index(), ff.
size()));
2185 ExcInvalidFEIndex(cell->future_fe_index(), ff.
size()));
2194 if (this->fe_collection != ff)
2198 const bool contains_multiple_fes = (this->fe_collection.size() > 1);
2201 if (hp_capability_enabled && !contains_multiple_fes)
2203 hp_capability_enabled =
false;
2207 for (
auto &connection : this->tria_listeners_for_transfer)
2208 connection.disconnect();
2209 this->tria_listeners_for_transfer.clear();
2212 this->hp_cell_active_fe_indices.clear();
2213 this->hp_cell_active_fe_indices.shrink_to_fit();
2214 this->hp_cell_future_fe_indices.clear();
2215 this->hp_cell_future_fe_indices.shrink_to_fit();
2221 hp_capability_enabled || !contains_multiple_fes,
2223 "You cannot re-enable hp-capabilities after you registered a single "
2224 "finite element. Please call reinit() or create a new DoFHandler "
2225 "object instead."));
2231 if (hp_capability_enabled)
2249 subdomain_modifier(this->get_triangulation());
2258 if (hp_capability_enabled)
2266 this->number_cache = this->policy->distribute_dofs();
2283 if (!hp_capability_enabled &&
2285 *
>(&*this->tria) ==
nullptr)
2286 this->block_info_object.initialize(*
this,
false,
true);
2291 template <
int dim,
int spacedim>
2295 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2298 this->object_dof_indices.size() > 0,
2300 "Distribute active DoFs using distribute_dofs() before calling distribute_mg_dofs()."));
2307 "The mesh smoothing requirement 'limit_level_difference_at_vertices' has to be set for using multigrid!"));
2309 this->clear_mg_space();
2312 this->mg_number_cache = this->policy->distribute_mg_dofs();
2317 &*this->tria) ==
nullptr)
2318 this->block_info_object.initialize(*
this,
true,
false);
2323 template <
int dim,
int spacedim>
2327 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2329 this->block_info_object.initialize_local(*
this);
2334 template <
int dim,
int spacedim>
2339 if (
dynamic_cast<const ::parallel::shared::Triangulation<dim, spacedim>
2340 *
>(&this->get_triangulation()) !=
nullptr)
2341 this->policy = std::make_unique<internal::DoFHandlerImplementation::Policy::
2342 ParallelShared<dim, spacedim>>(*this);
2343 else if (
dynamic_cast<
2344 const ::parallel::DistributedTriangulationBase<dim, spacedim>
2345 *
>(&this->get_triangulation()) ==
nullptr)
2346 this->policy = std::make_unique<
2351 std::make_unique<internal::DoFHandlerImplementation::Policy::
2352 ParallelDistributed<dim, spacedim>>(*this);
2357 template <
int dim,
int spacedim>
2362 this->clear_space();
2363 this->clear_mg_space();
2368 template <
int dim,
int spacedim>
2372 object_dof_indices.clear();
2374 object_dof_ptr.clear();
2376 this->number_cache.clear();
2378 this->hp_cell_active_fe_indices.clear();
2379 this->hp_cell_future_fe_indices.clear();
2384 template <
int dim,
int spacedim>
2388 this->mg_levels.clear();
2389 this->mg_faces.reset();
2391 std::vector<MGVertexDoFs> tmp;
2395 this->mg_number_cache.clear();
2400 template <
int dim,
int spacedim>
2403 const std::vector<types::global_dof_index> &new_numbers)
2405 if (hp_capability_enabled)
2407 Assert(this->hp_cell_future_fe_indices.size() > 0,
2409 "You need to distribute DoFs before you can renumber them."));
2418 if (this->n_locally_owned_dofs() == this->n_dofs())
2420 std::vector<types::global_dof_index> tmp(new_numbers);
2421 std::sort(tmp.begin(), tmp.end());
2422 std::vector<types::global_dof_index>::const_iterator p = tmp.begin();
2424 for (; p != tmp.end(); ++p, ++i)
2425 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2428 for (
const auto new_number : new_numbers)
2429 Assert(new_number < this->n_dofs(),
2431 "New DoF index is not less than the total number of dofs."));
2448 this->number_cache = this->policy->renumber_dofs(new_numbers);
2463 Assert(this->object_dof_indices.size() > 0,
2465 "You need to distribute DoFs before you can renumber them."));
2469 &*this->tria) !=
nullptr)
2471 Assert(new_numbers.size() == this->n_dofs() ||
2472 new_numbers.size() == this->n_locally_owned_dofs(),
2473 ExcMessage(
"Incorrect size of the input array."));
2475 else if (
dynamic_cast<
2477 &*this->tria) !=
nullptr)
2490 if (this->n_locally_owned_dofs() == this->n_dofs())
2492 std::vector<types::global_dof_index> tmp(new_numbers);
2493 std::sort(tmp.begin(), tmp.end());
2494 std::vector<types::global_dof_index>::const_iterator p = tmp.begin();
2496 for (; p != tmp.end(); ++p, ++i)
2497 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2500 for (
const auto new_number : new_numbers)
2501 Assert(new_number < this->n_dofs(),
2503 "New DoF index is not less than the total number of dofs."));
2506 this->number_cache = this->policy->renumber_dofs(new_numbers);
2512 template <
int dim,
int spacedim>
2515 const unsigned int level,
2516 const std::vector<types::global_dof_index> &new_numbers)
2518 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2521 this->mg_levels.size() > 0 && this->object_dof_indices.size() > 0,
2523 "You need to distribute active and level DoFs before you can renumber level DoFs."));
2526 this->locally_owned_mg_dofs(
level).n_elements());
2533 if (this->n_locally_owned_dofs() == this->n_dofs())
2535 std::vector<types::global_dof_index> tmp(new_numbers);
2536 std::sort(tmp.begin(), tmp.end());
2537 std::vector<types::global_dof_index>::const_iterator p = tmp.begin();
2539 for (; p != tmp.end(); ++p, ++i)
2540 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2543 for (
const auto new_number : new_numbers)
2546 "New DoF index is not less than the total number of dofs."));
2549 this->mg_number_cache[
level] =
2550 this->policy->renumber_mg_dofs(
level, new_numbers);
2555 template <
int dim,
int spacedim>
2565 return this->fe_collection.max_dofs_per_vertex();
2567 return (3 * this->fe_collection.max_dofs_per_vertex() +
2568 2 * this->fe_collection.max_dofs_per_line());
2579 return (19 * this->fe_collection.max_dofs_per_vertex() +
2580 28 * this->fe_collection.max_dofs_per_line() +
2581 8 * this->fe_collection.max_dofs_per_quad());
2590 template <
int dim,
int spacedim>
2601 template <
int dim,
int spacedim>
2604 const std::vector<types::fe_index> &active_fe_indices)
2606 Assert(active_fe_indices.size() == this->get_triangulation().n_active_cells(),
2608 this->get_triangulation().n_active_cells()));
2610 this->create_active_fe_table();
2615 for (
const auto &cell : this->active_cell_iterators())
2616 if (cell->is_locally_owned())
2617 cell->set_active_fe_index(active_fe_indices[cell->active_cell_index()]);
2622 template <
int dim,
int spacedim>
2625 const std::vector<unsigned int> &active_fe_indices)
2627 set_active_fe_indices(std::vector<types::fe_index>(active_fe_indices.begin(),
2628 active_fe_indices.end()));
2633 template <
int dim,
int spacedim>
2638 std::vector<types::fe_index> active_fe_indices(
2644 for (
const auto &cell : this->active_cell_iterators())
2645 if (!cell->is_artificial())
2646 active_fe_indices[cell->active_cell_index()] = cell->active_fe_index();
2648 return active_fe_indices;
2653 template <
int dim,
int spacedim>
2656 std::vector<unsigned int> &active_fe_indices)
const
2660 active_fe_indices.assign(indices.begin(), indices.end());
2665 template <
int dim,
int spacedim>
2668 const std::vector<types::fe_index> &future_fe_indices)
2670 Assert(future_fe_indices.size() == this->get_triangulation().n_active_cells(),
2672 this->get_triangulation().n_active_cells()));
2674 this->create_active_fe_table();
2679 for (
const auto &cell : this->active_cell_iterators())
2680 if (cell->is_locally_owned() &&
2681 future_fe_indices[cell->active_cell_index()] !=
2683 cell->set_future_fe_index(future_fe_indices[cell->active_cell_index()]);
2688 template <
int dim,
int spacedim>
2693 std::vector<types::fe_index> future_fe_indices(
2699 for (
const auto &cell : this->active_cell_iterators())
2700 if (cell->is_locally_owned() && cell->future_fe_index_set())
2701 future_fe_indices[cell->active_cell_index()] = cell->future_fe_index();
2703 return future_fe_indices;
2708 template <
int dim,
int spacedim>
2713 Assert(hp_capability_enabled, ExcOnlyAvailableWithHP());
2716 this->tria_listeners.push_back(this->tria->
signals.create.connect(
2717 [
this]() { this->reinit(*(this->tria)); }));
2718 this->tria_listeners.push_back(
2719 this->tria->
signals.clear.connect([
this]() { this->clear(); }));
2724 const ::parallel::fullydistributed::Triangulation<dim, spacedim>
2725 *
>(&this->get_triangulation()))
2729 else if (
dynamic_cast<
2730 const ::parallel::distributed::Triangulation<dim, spacedim>
2731 *
>(&this->get_triangulation()))
2734 this->tria_listeners_for_transfer.push_back(
2735 this->tria->
signals.pre_distributed_repartition.connect([
this]() {
2736 internal::hp::DoFHandlerImplementation::Implementation::
2737 ensure_absence_of_future_fe_indices<dim, spacedim>(*this);
2739 this->tria_listeners_for_transfer.push_back(
2740 this->tria->
signals.pre_distributed_repartition.connect(
2741 [
this]() { this->pre_distributed_transfer_action(); }));
2742 this->tria_listeners_for_transfer.push_back(
2743 this->tria->
signals.post_distributed_repartition.connect(
2744 [
this]() { this->post_distributed_transfer_action(); }));
2747 this->tria_listeners_for_transfer.push_back(
2748 this->tria->
signals.post_p4est_refinement.connect(
2749 [
this]() { this->pre_distributed_transfer_action(); }));
2750 this->tria_listeners_for_transfer.push_back(
2751 this->tria->
signals.post_distributed_refinement.connect(
2752 [
this]() { this->post_distributed_transfer_action(); }));
2755 this->tria_listeners_for_transfer.push_back(
2756 this->tria->
signals.post_distributed_save.connect(
2757 [
this]() { this->active_fe_index_transfer.reset(); }));
2758 this->tria_listeners_for_transfer.push_back(
2759 this->tria->
signals.post_distributed_load.connect(
2760 [
this]() { this->update_active_fe_table(); }));
2762 else if (
dynamic_cast<
2763 const ::parallel::shared::Triangulation<dim, spacedim> *
>(
2764 &this->get_triangulation()) !=
nullptr)
2767 this->tria_listeners_for_transfer.push_back(
2768 this->tria->
signals.pre_partition.connect([
this]() {
2769 internal::hp::DoFHandlerImplementation::Implementation::
2770 ensure_absence_of_future_fe_indices(*this);
2774 this->tria_listeners_for_transfer.push_back(
2775 this->tria->
signals.pre_refinement.connect([
this]() {
2776 internal::hp::DoFHandlerImplementation::Implementation::
2777 communicate_future_fe_indices(*this);
2779 this->tria_listeners_for_transfer.push_back(
2780 this->tria->
signals.pre_refinement.connect(
2781 [
this]() { this->pre_transfer_action(); }));
2782 this->tria_listeners_for_transfer.push_back(
2783 this->tria->
signals.post_refinement.connect(
2784 [
this]() { this->post_transfer_action(); }));
2789 this->tria_listeners_for_transfer.push_back(
2790 this->tria->
signals.pre_refinement.connect(
2791 [
this]() { this->pre_transfer_action(); }));
2792 this->tria_listeners_for_transfer.push_back(
2793 this->tria->
signals.post_refinement.connect(
2794 [
this]() { this->post_transfer_action(); }));
2800 template <
int dim,
int spacedim>
2804 AssertThrow(hp_capability_enabled ==
true, ExcOnlyAvailableWithHP());
2811 this->hp_cell_active_fe_indices.resize(this->tria->
n_levels());
2812 this->hp_cell_future_fe_indices.resize(this->tria->
n_levels());
2816 for (
unsigned int level = 0;
level < this->hp_cell_future_fe_indices.size();
2819 if (this->hp_cell_active_fe_indices[
level].empty() &&
2820 this->hp_cell_future_fe_indices[
level].empty())
2822 this->hp_cell_active_fe_indices[
level].resize(
2824 this->hp_cell_future_fe_indices[
level].resize(
2832 Assert(this->hp_cell_active_fe_indices[
level].size() ==
2834 this->hp_cell_future_fe_indices[
level].size() ==
2835 this->tria->n_raw_cells(
level),
2851 template <
int dim,
int spacedim>
2867 this->hp_cell_active_fe_indices.resize(this->tria->
n_levels());
2868 this->hp_cell_active_fe_indices.shrink_to_fit();
2870 this->hp_cell_future_fe_indices.resize(this->tria->
n_levels());
2871 this->hp_cell_future_fe_indices.shrink_to_fit();
2873 for (
unsigned int i = 0; i < this->hp_cell_future_fe_indices.size(); ++i)
2876 this->hp_cell_active_fe_indices[i].resize(this->tria->
n_raw_cells(i), 0);
2883 this->hp_cell_future_fe_indices[i].assign(this->tria->
n_raw_cells(i),
2889 template <
int dim,
int spacedim>
2895 this->active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
2903 template <
int dim,
int spacedim>
2907 # ifndef DEAL_II_WITH_P4EST
2910 "You are attempting to use a functionality that is only available "
2911 "if deal.II was configured to use p4est, but cmake did not find a "
2912 "valid p4est library."));
2917 &this->get_triangulation()) !=
nullptr),
2922 active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
2931 active_fe_index_transfer->active_fe_indices.resize(
2934 for (
const auto &cell : active_cell_iterators())
2935 if (cell->is_locally_owned())
2936 active_fe_index_transfer->active_fe_indices[cell->active_cell_index()] =
2937 cell->future_fe_index();
2940 const auto *distributed_tria =
2942 &this->get_triangulation());
2944 active_fe_index_transfer->cell_data_transfer = std::make_unique<
2945 parallel::distributed::
2946 CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
2950 &::AdaptationStrategies::Refinement::
2951 preserve<dim, spacedim, types::fe_index>,
2954 const std::vector<types::fe_index> &children_fe_indices)
2956 return ::internal::hp::DoFHandlerImplementation::Implementation::
2957 determine_fe_from_children<dim, spacedim>(parent,
2958 children_fe_indices,
2962 active_fe_index_transfer->cell_data_transfer
2963 ->prepare_for_coarsening_and_refinement(
2964 active_fe_index_transfer->active_fe_indices);
2970 template <
int dim,
int spacedim>
2974 update_active_fe_table();
2988 this->active_fe_index_transfer.reset();
2993 template <
int dim,
int spacedim>
2997 # ifndef DEAL_II_WITH_P4EST
3000 update_active_fe_table();
3005 this->active_fe_index_transfer->active_fe_indices.resize(
3007 this->active_fe_index_transfer->cell_data_transfer->unpack(
3008 this->active_fe_index_transfer->active_fe_indices);
3011 this->set_active_fe_indices(
3012 this->active_fe_index_transfer->active_fe_indices);
3019 this->active_fe_index_transfer.reset();
3025 template <
int dim,
int spacedim>
3029 # ifndef DEAL_II_WITH_P4EST
3032 "You are attempting to use a functionality that is only available "
3033 "if deal.II was configured to use p4est, but cmake did not find a "
3034 "valid p4est library."));
3039 &this->get_triangulation()) !=
nullptr),
3044 active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
3047 const auto *distributed_tria =
3049 &this->get_triangulation());
3051 active_fe_index_transfer->cell_data_transfer = std::make_unique<
3052 parallel::distributed::
3053 CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
3057 &::AdaptationStrategies::Refinement::
3058 preserve<dim, spacedim, types::fe_index>,
3061 const std::vector<types::fe_index> &children_fe_indices)
3063 return ::internal::hp::DoFHandlerImplementation::Implementation::
3064 determine_fe_from_children<dim, spacedim>(parent,
3065 children_fe_indices,
3076 active_fe_index_transfer->cell_data_transfer->prepare_for_serialization(
3077 active_fe_index_transfer->active_fe_indices);
3083 template <
int dim,
int spacedim>
3087 # ifndef DEAL_II_WITH_P4EST
3090 "You are attempting to use a functionality that is only available "
3091 "if deal.II was configured to use p4est, but cmake did not find a "
3092 "valid p4est library."));
3097 &this->get_triangulation()) !=
nullptr),
3102 active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
3105 const auto *distributed_tria =
3107 &this->get_triangulation());
3109 active_fe_index_transfer->cell_data_transfer = std::make_unique<
3110 parallel::distributed::
3111 CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
3115 &::AdaptationStrategies::Refinement::
3116 preserve<dim, spacedim, types::fe_index>,
3119 const std::vector<types::fe_index> &children_fe_indices)
3121 return ::internal::hp::DoFHandlerImplementation::Implementation::
3122 determine_fe_from_children<dim, spacedim>(parent,
3123 children_fe_indices,
3128 active_fe_index_transfer->active_fe_indices.resize(
3130 active_fe_index_transfer->cell_data_transfer->deserialize(
3131 active_fe_index_transfer->active_fe_indices);
3134 set_active_fe_indices(active_fe_index_transfer->active_fe_indices);
3141 active_fe_index_transfer.reset();
3147 template <
int dim,
int spacedim>
3156 template <
int dim,
int spacedim>
3159 const unsigned int cl,
3160 const unsigned int fl,
3161 const unsigned int dofs_per_vertex)
3163 coarsest_level = cl;
3166 if (coarsest_level <= finest_level)
3168 const unsigned int n_levels = finest_level - coarsest_level + 1;
3169 const unsigned int n_indices = n_levels * dofs_per_vertex;
3171 indices = std::make_unique<types::global_dof_index[]>(n_indices);
3172 std::fill(indices.get(),
3173 indices.get() + n_indices,
3182 template <
int dim,
int spacedim>
3186 return coarsest_level;
3191 template <
int dim,
int spacedim>
3195 return finest_level;
3199 #include "dof_handler.inst"
void init(const unsigned int coarsest_level, const unsigned int finest_level, const unsigned int dofs_per_vertex)
unsigned int get_finest_level() const
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
unsigned int max_couplings_between_dofs() const
std::vector< std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel< dim > > > mg_levels
std::vector< types::fe_index > get_active_fe_indices() const
std::unique_ptr< ActiveFEIndexTransfer > active_fe_index_transfer
hp::FECollection< dim, spacedim > fe_collection
void create_active_fe_table()
std::vector< std::vector< types::fe_index > > hp_cell_future_fe_indices
SmartPointer< const Triangulation< dim, spacedim >, DoFHandler< dim, spacedim > > tria
level_cell_iterator end_mg() const
void renumber_dofs(const std::vector< types::global_dof_index > &new_numbers)
std::vector< types::fe_index > get_future_fe_indices() const
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
void connect_to_triangulation_signals()
std::vector< std::vector< types::fe_index > > hp_cell_active_fe_indices
std::vector< MGVertexDoFs > mg_vertex_dofs
void post_distributed_transfer_action()
std::vector< std::array< std::vector< types::global_dof_index >, dim+1 > > object_dof_indices
const Triangulation< dim, spacedim > & get_triangulation() const
void pre_transfer_action()
void reinit(const Triangulation< dim, spacedim > &tria)
std::vector< std::array< std::vector< offset_type >, dim+1 > > object_dof_ptr
std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces< dim > > mg_faces
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
void initialize_local_block_info()
types::global_dof_index n_dofs() const
void update_active_fe_table()
void prepare_for_serialization_of_active_fe_indices()
const FiniteElement< dim, spacedim > & get_fe(const types::fe_index index=0) const
cell_iterator begin(const unsigned int level=0) const
std::array< std::vector< offset_type >, dim+1 > hp_object_fe_ptr
std::array< std::vector< types::fe_index >, dim+1 > hp_object_fe_indices
void set_active_fe_indices(const std::vector< types::fe_index > &active_fe_indices)
unsigned int max_couplings_between_boundary_dofs() const
void deserialize_active_fe_indices()
void set_future_fe_indices(const std::vector< types::fe_index > &future_fe_indices)
virtual ~DoFHandler() override
unsigned int n_dofs_per_vertex() const
unsigned int n_dofs_per_line() const
bool is_element(const size_type index) const
virtual const MeshSmoothing & get_mesh_smoothing() const
cell_iterator begin(const unsigned int level=0) const
unsigned int n_raw_lines() const
unsigned int n_raw_faces() const
unsigned int n_levels() const
cell_iterator end() const
unsigned int n_raw_cells(const unsigned int level) const
unsigned int max_adjacent_cells() const
bool vertex_used(const unsigned int index) const
active_cell_iterator end_active(const unsigned int level) const
unsigned int n_raw_quads() const
unsigned int n_cells() const
unsigned int n_vertices() const
unsigned int n_raw_hexs(const unsigned int level) const
unsigned int size() const
unsigned int max_dofs_per_line() const
unsigned int max_dofs_per_hex() const
unsigned int max_dofs_per_vertex() const
unsigned int max_dofs_per_quad() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_CXX20_REQUIRES(condition)
#define DEAL_II_NAMESPACE_CLOSE
IteratorRange< active_cell_iterator > active_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
IteratorRange< cell_iterator > cell_iterators_on_level(const unsigned int level) const
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
#define Assert(cond, exc)
static ::ExceptionBase & ExcNotImplemented()
static ::ExceptionBase & ExcNoFESelected()
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcNoDominatedFiniteElementOnChildren()
static ::ExceptionBase & ExcMessage(std::string arg1)
static ::ExceptionBase & ExcInvalidBoundaryIndicator()
#define AssertThrow(cond, exc)
Task< RT > new_task(const std::function< RT()> &function)
void refine(Triangulation< dim, spacedim > &tria, const Vector< Number > &criteria, const double threshold, const unsigned int max_to_mark=numbers::invalid_unsigned_int)
void coarsen(Triangulation< dim, spacedim > &tria, const Vector< Number > &criteria, const double threshold)
@ valid
Iterator points to a valid object.
std::enable_if_t< std::is_fundamental_v< T >, std::size_t > memory_consumption(const T &t)
void swap(MemorySpaceData< T, MemorySpace > &u, MemorySpaceData< T, MemorySpace > &v)
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
Tensor< 2, dim, Number > l(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
VectorType::value_type * begin(VectorType &V)
VectorType::value_type * end(VectorType &V)
T sum(const T &t, const MPI_Comm mpi_communicator)
size_t pack(const T &object, std::vector< char > &dest_buffer, const bool allow_compression=true)
std::string int_to_string(const unsigned int value, const unsigned int digits=numbers::invalid_unsigned_int)
T unpack(const std::vector< char > &buffer, const bool allow_compression=true)
unsigned int n_active_cells(const internal::TriangulationImplementation::NumberCache< 1 > &c)
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)
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)
std::string policy_to_string(const ::internal::DoFHandlerImplementation::Policy::PolicyBase< dim, spacedim > &policy)
const types::boundary_id internal_face_boundary_id
const types::fe_index invalid_fe_index
static const unsigned int invalid_unsigned_int
const types::global_dof_index invalid_dof_index
unsigned int global_dof_index
unsigned short int fe_index
static void reserve_space_mg(DoFHandler< 3, spacedim > &dof_handler)
static void reserve_space(DoFHandler< dim, spacedim > &dof_handler)
static void reserve_subentities(DoFHandler< dim, spacedim > &dof_handler, const unsigned int structdim, const unsigned int n_raw_entities, const T &cell_process)
static unsigned int max_couplings_between_dofs(const DoFHandler< 2, spacedim > &dof_handler)
static void reset_to_empty_objects(DoFHandler< dim, spacedim > &dof_handler)
static unsigned int max_couplings_between_dofs(const DoFHandler< 3, spacedim > &dof_handler)
static void reserve_space_mg(DoFHandler< 1, spacedim > &dof_handler)
static unsigned int max_couplings_between_dofs(const DoFHandler< 1, spacedim > &dof_handler)
static void reserve_space_mg(DoFHandler< 2, spacedim > &dof_handler)
static void reserve_cells(DoFHandler< dim, spacedim > &dof_handler, const unsigned int n_inner_dofs_per_cell)
static void collect_fe_indices_on_cells_to_be_refined(DoFHandler< dim, spacedim > &dof_handler)
static void reserve_space(DoFHandler< 2, spacedim > &dof_handler)
static void reserve_space_cells(DoFHandler< dim, spacedim > &dof_handler)
static types::fe_index dominated_future_fe_on_children(const typename DoFHandler< dim, spacedim >::cell_iterator &parent)
static void distribute_fe_indices_on_refined_cells(DoFHandler< dim, spacedim > &dof_handler)
static void reserve_space(DoFHandler< 3, spacedim > &dof_handler)
static void ensure_absence_of_future_fe_indices(DoFHandler< dim, spacedim > &dof_handler)
static void reserve_space_faces(DoFHandler< dim, spacedim > &dof_handler)
static void communicate_future_fe_indices(DoFHandler< dim, spacedim > &dof_handler)
static void communicate_active_fe_indices(DoFHandler< dim, spacedim > &dof_handler)
static types::fe_index determine_fe_from_children(const typename Triangulation< dim, spacedim >::cell_iterator &, const std::vector< types::fe_index > &children_fe_indices, const ::hp::FECollection< dim, spacedim > &fe_collection)
static void reserve_space_vertices(DoFHandler< dim, spacedim > &dof_handler)
static void reserve_space(DoFHandler< 1, spacedim > &dof_handler)
const ::Triangulation< dim, spacedim > & tria