19#include <deal.II/base/mpi.templates.h>
22#include <deal.II/distributed/cell_data_transfer.templates.h>
40#include <unordered_set>
45template <
int dim,
int spacedim>
52 template <
int dim,
int spacedim>
55 PolicyBase<dim, spacedim> &policy)
57 std::string policy_name;
58 if (
dynamic_cast<const typename ::internal::DoFHandlerImplementation::
59 Policy::Sequential<dim, spacedim> *
>(&policy) ||
60 dynamic_cast<const typename ::internal::DoFHandlerImplementation::
61 Policy::Sequential<dim, spacedim> *
>(&policy))
62 policy_name =
"Policy::Sequential<";
63 else if (
dynamic_cast<
64 const typename ::internal::DoFHandlerImplementation::
65 Policy::ParallelDistributed<dim, spacedim> *
>(&policy) ||
67 const typename ::internal::DoFHandlerImplementation::
68 Policy::ParallelDistributed<dim, spacedim> *
>(&policy))
69 policy_name =
"Policy::ParallelDistributed<";
70 else if (
dynamic_cast<
71 const typename ::internal::DoFHandlerImplementation::
72 Policy::ParallelShared<dim, spacedim> *
>(&policy) ||
74 const typename ::internal::DoFHandlerImplementation::
75 Policy::ParallelShared<dim, spacedim> *
>(&policy))
76 policy_name =
"Policy::ParallelShared<";
85 namespace DoFHandlerImplementation
97 template <
int spacedim>
107 template <
int spacedim>
226 template <
int spacedim>
239 const unsigned int max_adjacent_cells =
243 if (max_adjacent_cells <= 8)
262 template <
int dim,
int spacedim>
278 template <
int dim,
int spacedim>
281 const unsigned int n_inner_dofs_per_cell)
283 for (
unsigned int i = 0; i < dof_handler.
tria->
n_levels(); ++i)
288 for (
const auto &cell :
290 if (cell->is_active() && !cell->is_artificial())
292 n_inner_dofs_per_cell;
308 template <
int dim,
int spacedim,
typename T>
311 const unsigned int structdim,
312 const unsigned int n_raw_entities,
313 const T &cell_process)
318 dof_handler.
object_dof_ptr[0][structdim].assign(n_raw_entities + 1, -1);
321 if (cell->is_active() && !cell->is_artificial())
324 [&](
const unsigned int n_dofs_per_entity,
325 const unsigned int index) {
326 auto &n_dofs_per_entity_target =
331 Assert((n_dofs_per_entity_target ==
335 n_dofs_per_entity_target == n_dofs_per_entity),
338 n_dofs_per_entity_target = n_dofs_per_entity;
343 for (
unsigned int i = 1; i < n_raw_entities + 1; ++i)
367 template <
int dim,
int spacedim>
373 const auto &fe = dof_handler.
get_fe();
377 dim == 1 ? fe.n_dofs_per_line() :
378 (dim == 2 ? fe.n_dofs_per_quad(0) :
379 fe.n_dofs_per_hex()));
385 [&](
const auto &cell,
const auto &process) {
386 for (const auto vertex_index :
387 cell->vertex_indices())
388 process(fe.n_dofs_per_vertex(),
389 cell->vertex_index(vertex_index));
393 if (dim == 2 || dim == 3)
397 [&](
const auto &cell,
const auto &process) {
398 for (const auto line_index :
399 cell->line_indices())
400 process(fe.n_dofs_per_line(),
401 cell->line(line_index)->index());
409 [&](
const auto &cell,
const auto &process) {
410 for (const auto face_index :
411 cell->face_indices())
412 process(fe.n_dofs_per_quad(face_index),
413 cell->face(face_index)->index());
417 template <
int spacedim>
425 const ::Triangulation<1, spacedim> &tria =
427 const unsigned int dofs_per_line =
429 const unsigned int n_levels = tria.
n_levels();
431 for (
unsigned int i = 0; i < n_levels; ++i)
435 dof_handler.
mg_levels.back()->dof_object.dofs =
436 std::vector<types::global_dof_index>(tria.
n_raw_lines(i) *
441 const unsigned int n_vertices = tria.
n_vertices();
445 std::vector<unsigned int> max_level(n_vertices, 0);
446 std::vector<unsigned int> min_level(n_vertices, n_levels);
448 for (typename ::Triangulation<1, spacedim>::cell_iterator cell =
453 const unsigned int level = cell->level();
455 for (
const auto vertex : cell->vertex_indices())
457 const unsigned int vertex_index = cell->vertex_index(vertex);
459 if (min_level[vertex_index] >
level)
460 min_level[vertex_index] =
level;
462 if (max_level[vertex_index] <
level)
463 max_level[vertex_index] =
level;
467 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
471 Assert(max_level[vertex] >= min_level[vertex],
487 template <
int spacedim>
495 const ::FiniteElement<2, spacedim> &fe = dof_handler.
get_fe();
496 const ::Triangulation<2, spacedim> &tria =
498 const unsigned int n_levels = tria.
n_levels();
500 for (
unsigned int i = 0; i < n_levels; ++i)
505 dof_handler.
mg_levels.back()->dof_object.dofs =
506 std::vector<types::global_dof_index>(
508 fe.n_dofs_per_quad(0 ),
513 std::make_unique<internal::DoFHandlerImplementation::DoFFaces<2>>();
515 std::vector<types::global_dof_index>(tria.
n_raw_lines() *
516 fe.n_dofs_per_line(),
519 const unsigned int n_vertices = tria.
n_vertices();
523 std::vector<unsigned int> max_level(n_vertices, 0);
524 std::vector<unsigned int> min_level(n_vertices, n_levels);
526 for (typename ::Triangulation<2, spacedim>::cell_iterator cell =
531 const unsigned int level = cell->level();
533 for (
const auto vertex : cell->vertex_indices())
535 const unsigned int vertex_index = cell->vertex_index(vertex);
537 if (min_level[vertex_index] >
level)
538 min_level[vertex_index] =
level;
540 if (max_level[vertex_index] <
level)
541 max_level[vertex_index] =
level;
545 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
549 Assert(max_level[vertex] >= min_level[vertex],
553 fe.n_dofs_per_vertex());
564 template <
int spacedim>
572 const ::FiniteElement<3, spacedim> &fe = dof_handler.
get_fe();
573 const ::Triangulation<3, spacedim> &tria =
575 const unsigned int n_levels = tria.
n_levels();
577 for (
unsigned int i = 0; i < n_levels; ++i)
582 dof_handler.
mg_levels.back()->dof_object.dofs =
583 std::vector<types::global_dof_index>(tria.
n_raw_hexs(i) *
589 std::make_unique<internal::DoFHandlerImplementation::DoFFaces<3>>();
591 std::vector<types::global_dof_index>(tria.
n_raw_lines() *
592 fe.n_dofs_per_line(),
598 dof_handler.
mg_faces->quads.dofs = std::vector<types::global_dof_index>(
602 const unsigned int n_vertices = tria.
n_vertices();
606 std::vector<unsigned int> max_level(n_vertices, 0);
607 std::vector<unsigned int> min_level(n_vertices, n_levels);
609 for (typename ::Triangulation<3, spacedim>::cell_iterator cell =
614 const unsigned int level = cell->level();
616 for (
const auto vertex : cell->vertex_indices())
618 const unsigned int vertex_index = cell->vertex_index(vertex);
620 if (min_level[vertex_index] >
level)
621 min_level[vertex_index] =
level;
623 if (max_level[vertex_index] <
level)
624 max_level[vertex_index] =
level;
628 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
632 Assert(max_level[vertex] >= min_level[vertex],
636 fe.n_dofs_per_vertex());
653 namespace DoFHandlerImplementation
666 template <
int dim,
int spacedim>
673 if (cell->is_locally_owned())
675 !cell->future_fe_index_set(),
677 "There shouldn't be any cells flagged for p-adaptation when partitioning."));
686 template <
int dim,
int spacedim>
702 std::vector<bool> locally_used_vertices(
705 if (!cell->is_artificial())
706 for (
const auto v : cell->vertex_indices())
707 locally_used_vertices[cell->vertex_index(v)] =
true;
709 std::vector<std::vector<bool>> vertex_fe_association(
714 if (!cell->is_artificial())
715 for (
const auto v : cell->vertex_indices())
716 vertex_fe_association[cell->active_fe_index()]
717 [cell->vertex_index(v)] =
true;
726 if (locally_used_vertices[v] ==
true)
731 if (vertex_fe_association[fe][v] ==
true)
738 const unsigned int d = 0;
739 const unsigned int l = 0;
749 unsigned int vertex_slots_needed = 0;
750 unsigned int fe_slots_needed = 0;
758 for (
unsigned int fe = 0;
761 if (vertex_fe_association[fe][v] ==
true)
764 vertex_slots_needed +=
782 if (vertex_fe_association[fe][v] ==
true)
788 for (
unsigned int i = 0;
789 i < dof_handler.
get_fe(fe).n_dofs_per_vertex();
819 template <
int dim,
int spacedim>
836 std::vector<typename DoFHandler<dim, spacedim>::offset_type>(
844 if (cell->is_active() && !cell->is_artificial())
849 cell->get_fe().template n_dofs_per_object<dim>();
853 std::vector<types::global_dof_index>(
864 template <
int dim,
int spacedim>
885 std::vector<bool> face_touched(dim == 2 ?
889 const unsigned int d = dim - 1;
890 const unsigned int l = 0;
902 unsigned int n_face_slots = 0;
905 if (!cell->is_artificial())
906 for (
const auto face : cell->face_indices())
907 if (!face_touched[cell->face(face)->index()])
909 unsigned int fe_slots_needed = 0;
911 if (cell->at_boundary(face) ||
912 cell->face(face)->has_children() ||
913 cell->neighbor_is_coarser(face) ||
914 (!cell->at_boundary(face) &&
915 cell->neighbor(face)->is_artificial()) ||
916 (!cell->at_boundary(face) &&
917 !cell->neighbor(face)->is_artificial() &&
918 (cell->active_fe_index() ==
919 cell->neighbor(face)->active_fe_index())))
923 dof_handler.
get_fe(cell->active_fe_index())
924 .
template n_dofs_per_object<dim - 1>(face);
930 dof_handler.
get_fe(cell->active_fe_index())
931 .
template n_dofs_per_object<dim - 1>(face) +
933 .
get_fe(cell->neighbor(face)->active_fe_index())
934 .
template n_dofs_per_object<dim - 1>(
935 cell->neighbor_face_no(face));
939 face_touched[cell->face(face)->index()] =
true;
963 face_touched = std::vector<bool>(face_touched.size());
966 if (!cell->is_artificial())
967 for (
const auto face : cell->face_indices())
968 if (!face_touched[cell->face(face)->index()])
971 if (cell->at_boundary(face) ||
972 cell->face(face)->has_children() ||
973 cell->neighbor_is_coarser(face) ||
974 (!cell->at_boundary(face) &&
975 cell->neighbor(face)->is_artificial()) ||
976 (!cell->at_boundary(face) &&
977 !cell->neighbor(face)->is_artificial() &&
978 (cell->active_fe_index() ==
979 cell->neighbor(face)->active_fe_index())))
982 const unsigned int n_dofs =
984 .template n_dofs_per_object<dim - 1>(face);
985 const unsigned int offset =
992 for (
unsigned int i = 0; i < n_dofs; ++i)
999 unsigned int face_no_1 = face;
1001 cell->neighbor(face)->active_fe_index();
1002 unsigned int face_no_2 = cell->neighbor_face_no(face);
1006 std::swap(fe_1, fe_2);
1007 std::swap(face_no_1, face_no_2);
1010 const unsigned int n_dofs_1 =
1012 .template n_dofs_per_object<dim - 1>(face_no_1);
1014 const unsigned int n_dofs_2 =
1016 .template n_dofs_per_object<dim - 1>(face_no_2);
1018 const unsigned int offset =
1023 cell->active_fe_index());
1037 for (
unsigned int i = 0; i < n_dofs_1 + n_dofs_2; ++i)
1043 face_touched[cell->face(face)->index()] =
true;
1046 for (
unsigned int i = 1;
1062 template <
int spacedim>
1069 ExcMessage(
"The current Triangulation must not be empty."));
1087 template <
int spacedim>
1094 ExcMessage(
"The current Triangulation must not be empty."));
1114 template <
int spacedim>
1121 ExcMessage(
"The current Triangulation must not be empty."));
1150 std::vector<std::vector<bool>> line_fe_association(
1155 if (!cell->is_artificial())
1156 for (
const auto l : cell->line_indices())
1157 line_fe_association[cell->active_fe_index()]
1158 [cell->line_index(l)] =
true;
1170 if (line_fe_association[fe][line] ==
true)
1172 line_is_used[line] =
true;
1178 const unsigned int d = 1;
1179 const unsigned int l = 0;
1189 unsigned int line_slots_needed = 0;
1190 unsigned int fe_slots_needed = 0;
1197 if (line_is_used[line] ==
true)
1199 for (
unsigned int fe = 0;
1202 if (line_fe_association[fe][line] ==
true)
1205 line_slots_needed +=
1224 if (line_is_used[line] ==
true)
1226 for (
unsigned int fe = 0;
1229 if (line_fe_association[fe][line] ==
true)
1235 for (
unsigned int i = 0;
1236 i < dof_handler.
get_fe(fe).n_dofs_per_line();
1250 fe_slots_needed + 1);
1272 template <
int dim,
int spacedim>
1280 if (const ::parallel::shared::Triangulation<dim, spacedim> *tr =
1282 const ::parallel::shared::Triangulation<dim, spacedim>
1295 std::vector<types::fe_index> active_fe_indices(
1296 tr->n_active_cells(), 0u);
1298 if (cell->is_locally_owned())
1299 active_fe_indices[cell->active_cell_index()] =
1300 cell->active_fe_index();
1303 tr->get_communicator(),
1313 if (!cell->is_locally_owned())
1315 .hp_cell_active_fe_indices[cell->level()][cell->index()] =
1316 active_fe_indices[cell->active_cell_index()];
1318 else if (const ::parallel::
1319 DistributedTriangulationBase<dim, spacedim> *tr =
1322 DistributedTriangulationBase<dim, spacedim> *
>(
1335 return cell->active_fe_index();
1361 const ::parallel::TriangulationBase<dim, spacedim> *
>(
1382 template <
int dim,
int spacedim>
1390 if (const ::parallel::shared::Triangulation<dim, spacedim> *tr =
1392 const ::parallel::shared::Triangulation<dim, spacedim>
1395 std::vector<types::fe_index> future_fe_indices(
1396 tr->n_active_cells(), 0u);
1399 future_fe_indices[cell->active_cell_index()] =
1404 tr->get_communicator(),
1408 if (!cell->is_locally_owned())
1410 .hp_cell_future_fe_indices[cell->level()][cell->index()] =
1411 future_fe_indices[cell->active_cell_index()];
1413 else if (const ::parallel::
1414 DistributedTriangulationBase<dim, spacedim> *tr =
1417 DistributedTriangulationBase<dim, spacedim> *
>(
1446 const ::parallel::TriangulationBase<dim, spacedim> *
>(
1474 template <
int dim,
int spacedim>
1482 if (cell->is_locally_owned())
1484 if (cell->refine_flag_set())
1489 fe_transfer->refined_cells_fe_index.insert(
1490 {cell, cell->future_fe_index()});
1492 else if (cell->coarsen_flag_set())
1499 const auto &parent = cell->parent();
1503 if (fe_transfer->coarsened_cells_fe_index.find(parent) ==
1504 fe_transfer->coarsened_cells_fe_index.end())
1511 for (
const auto &child : parent->child_iterators())
1512 Assert(child->is_active() &&
1513 child->coarsen_flag_set(),
1514 typename ::Triangulation<
1515 dim>::ExcInconsistentCoarseningFlags());
1519 DoFHandlerImplementation::Implementation::
1520 dominated_future_fe_on_children<dim, spacedim>(
1523 fe_transfer->coarsened_cells_fe_index.insert(
1524 {parent, fe_index});
1532 if (cell->future_fe_index_set() ==
true)
1533 fe_transfer->persisting_cells_fe_index.insert(
1534 {cell, cell->future_fe_index()});
1545 template <
int dim,
int spacedim>
1553 for (
const auto &persist : fe_transfer->persisting_cells_fe_index)
1555 const auto &cell = persist.first;
1557 if (cell->is_locally_owned())
1560 cell->set_active_fe_index(persist.second);
1566 for (
const auto &refine : fe_transfer->refined_cells_fe_index)
1568 const auto &parent = refine.first;
1570 for (
const auto &child : parent->child_iterators())
1571 if (child->is_locally_owned())
1574 child->set_active_fe_index(refine.second);
1580 for (
const auto &coarsen : fe_transfer->coarsened_cells_fe_index)
1582 const auto &cell = coarsen.first;
1584 if (cell->is_locally_owned())
1587 cell->set_active_fe_index(coarsen.second);
1603 template <
int dim,
int spacedim>
1607 const std::vector<types::fe_index> &children_fe_indices,
1608 const ::hp::FECollection<dim, spacedim> &fe_collection)
1614 const std::set<unsigned int> children_fe_indices_set(
1615 children_fe_indices.begin(), children_fe_indices.end());
1618 fe_collection.find_dominated_fe_extended(children_fe_indices_set,
1624 return dominated_fe_index;
1635 template <
int dim,
int spacedim>
1641 !parent->is_active(),
1643 "You ask for information on children of this cell which is only "
1644 "available for active cells. This cell has no children."));
1646 const auto &dof_handler = parent->get_dof_handler();
1648 dof_handler.has_hp_capabilities(),
1652 std::set<unsigned int> future_fe_indices_children;
1653 for (
const auto &child : parent->child_iterators())
1658 "You ask for information on children of this cell which is only "
1659 "available for active cells. One of its children is not active."));
1668 ::internal::DoFCellAccessorImplementation::
1669 Implementation::future_fe_index<dim, spacedim, false>(*child);
1671 future_fe_indices_children.insert(future_fe_index_child);
1676 dof_handler.fe_collection.find_dominated_fe_extended(
1677 future_fe_indices_children,
1683 return future_fe_index;
1692 template <
int dim,
int spacedim>
1696 Implementation::communicate_future_fe_indices<dim, spacedim>(
1705 template <
int dim,
int spacedim>
1710 return Implementation::dominated_future_fe_on_children<dim, spacedim>(
1719template <
int dim,
int spacedim>
1722 : hp_capability_enabled(true)
1723 ,
tria(nullptr, typeid(*this).name())
1729template <
int dim,
int spacedim>
1739template <
int dim,
int spacedim>
1744 for (
auto &connection : this->tria_listeners)
1745 connection.disconnect();
1746 this->tria_listeners.clear();
1748 for (
auto &connection : this->tria_listeners_for_transfer)
1749 connection.disconnect();
1750 this->tria_listeners_for_transfer.clear();
1761 this->policy.reset();
1766template <
int dim,
int spacedim>
1774 for (
auto &connection : this->tria_listeners)
1775 connection.disconnect();
1776 this->tria_listeners.clear();
1778 for (
auto &connection : this->tria_listeners_for_transfer)
1779 connection.disconnect();
1780 this->tria_listeners_for_transfer.clear();
1784 this->policy.reset();
1794 this->setup_policy();
1797 hp_capability_enabled =
true;
1798 this->connect_to_triangulation_signals();
1799 this->create_active_fe_table();
1805template <
int dim,
int spacedim>
1811 this->get_triangulation().begin(
level);
1812 if (cell == this->get_triangulation().
end(
level))
1814 return cell_iterator(*cell,
this);
1819template <
int dim,
int spacedim>
1828 while (i->has_children())
1836template <
int dim,
int spacedim>
1841 return cell_iterator(&this->get_triangulation(), -1, -1,
this);
1846template <
int dim,
int spacedim>
1852 this->get_triangulation().end(
level);
1855 return cell_iterator(*cell,
this);
1860template <
int dim,
int spacedim>
1866 this->get_triangulation().end_active(
level);
1868 return active_cell_iterator(
end());
1869 return active_cell_iterator(*cell,
this);
1874template <
int dim,
int spacedim>
1879 Assert(this->has_level_dofs(),
1881 "levels if mg dofs got distributed."));
1883 this->get_triangulation().begin(
level);
1884 if (cell == this->get_triangulation().
end(
level))
1885 return end_mg(
level);
1886 return level_cell_iterator(*cell,
this);
1891template <
int dim,
int spacedim>
1896 Assert(this->has_level_dofs(),
1898 "levels if mg dofs got distributed."));
1900 this->get_triangulation().end(
level);
1903 return level_cell_iterator(*cell,
this);
1908template <
int dim,
int spacedim>
1913 return level_cell_iterator(&this->get_triangulation(), -1, -1,
this);
1918template <
int dim,
int spacedim>
1922 spacedim>::cell_iterators()
const
1930template <
int dim,
int spacedim>
1943template <
int dim,
int spacedim>
1950 begin_mg(), end_mg());
1955template <
int dim,
int spacedim>
1959 spacedim>::cell_iterators_on_level(
const unsigned int level)
const
1967template <
int dim,
int spacedim>
1980template <
int dim,
int spacedim>
1996template <
int dim,
int spacedim>
2000 Assert(!(dim == 2 && spacedim == 3) || hp_capability_enabled ==
false,
2001 ExcNotImplementedWithHP());
2003 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2005 std::unordered_set<types::global_dof_index> boundary_dofs;
2006 std::vector<types::global_dof_index> dofs_on_face;
2007 dofs_on_face.reserve(this->get_fe_collection().max_dofs_per_face());
2009 const IndexSet &owned_dofs = locally_owned_dofs();
2016 for (
const auto &cell : this->active_cell_iterators())
2017 if (cell->is_locally_owned() && cell->at_boundary())
2019 for (
const auto iface : cell->face_indices())
2021 const auto face = cell->face(iface);
2022 if (face->at_boundary())
2024 const unsigned int dofs_per_face =
2025 cell->get_fe().n_dofs_per_face(iface);
2026 dofs_on_face.resize(dofs_per_face);
2028 face->get_dof_indices(dofs_on_face, cell->active_fe_index());
2029 for (
unsigned int i = 0; i < dofs_per_face; ++i)
2031 const unsigned int global_idof_index = dofs_on_face[i];
2032 if (owned_dofs.
is_element(global_idof_index))
2034 boundary_dofs.insert(global_idof_index);
2040 return boundary_dofs.size();
2045template <
int dim,
int spacedim>
2048 const std::set<types::boundary_id> &boundary_ids)
const
2050 Assert(!(dim == 2 && spacedim == 3) || hp_capability_enabled ==
false,
2051 ExcNotImplementedWithHP());
2053 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2056 ExcInvalidBoundaryIndicator());
2060 std::unordered_set<types::global_dof_index> boundary_dofs;
2061 std::vector<types::global_dof_index> dofs_on_face;
2062 dofs_on_face.reserve(this->get_fe_collection().max_dofs_per_face());
2064 const IndexSet &owned_dofs = locally_owned_dofs();
2066 for (
const auto &cell : this->active_cell_iterators())
2067 if (cell->is_locally_owned() && cell->at_boundary())
2069 for (
const auto iface : cell->face_indices())
2071 const auto face = cell->face(iface);
2072 const unsigned int boundary_id = face->boundary_id();
2073 if (face->at_boundary() &&
2076 const unsigned int dofs_per_face =
2077 cell->get_fe().n_dofs_per_face(iface);
2078 dofs_on_face.resize(dofs_per_face);
2080 face->get_dof_indices(dofs_on_face, cell->active_fe_index());
2081 for (
unsigned int i = 0; i < dofs_per_face; ++i)
2083 const unsigned int global_idof_index = dofs_on_face[i];
2084 if (owned_dofs.
is_element(global_idof_index))
2086 boundary_dofs.insert(global_idof_index);
2092 return boundary_dofs.size();
2097template <
int dim,
int spacedim>
2113 if (hp_capability_enabled)
2126 if (this->mg_faces !=
nullptr)
2129 for (
unsigned int i = 0; i < this->mg_vertex_dofs.size(); ++i)
2130 mem +=
sizeof(MGVertexDoFs) +
2131 (1 + this->mg_vertex_dofs[i].get_finest_level() -
2132 this->mg_vertex_dofs[i].get_coarsest_level()) *
2141template <
int dim,
int spacedim>
2151template <
int dim,
int spacedim>
2156 Assert(this->tria !=
nullptr,
2158 "You need to set the Triangulation in the DoFHandler using reinit() "
2159 "or in the constructor before you can distribute DoFs."));
2161 ExcMessage(
"The Triangulation you are using is empty!"));
2165 Assert((ff.
size() <= std::numeric_limits<types::fe_index>::max()) &&
2167 ExcMessage(
"The given hp::FECollection contains more finite elements "
2168 "than the DoFHandler can cover with active FE indices."));
2173 if ((hp_cell_active_fe_indices.size() > 0) &&
2174 (hp_cell_future_fe_indices.size() > 0))
2178 for (
const auto &cell :
2182 ExcInvalidFEIndex(cell->active_fe_index(), ff.
size()));
2184 ExcInvalidFEIndex(cell->future_fe_index(), ff.
size()));
2193 if (this->fe_collection != ff)
2197 const bool contains_multiple_fes = (this->fe_collection.size() > 1);
2200 if (hp_capability_enabled && !contains_multiple_fes)
2202 hp_capability_enabled =
false;
2206 for (
auto &connection : this->tria_listeners_for_transfer)
2207 connection.disconnect();
2208 this->tria_listeners_for_transfer.clear();
2211 this->hp_cell_active_fe_indices.clear();
2212 this->hp_cell_active_fe_indices.shrink_to_fit();
2213 this->hp_cell_future_fe_indices.clear();
2214 this->hp_cell_future_fe_indices.shrink_to_fit();
2220 hp_capability_enabled || !contains_multiple_fes,
2222 "You cannot re-enable hp-capabilities after you registered a single "
2223 "finite element. Please call reinit() or create a new DoFHandler "
2224 "object instead."));
2230 if (hp_capability_enabled)
2248 subdomain_modifier(this->get_triangulation());
2257 if (hp_capability_enabled)
2265 this->number_cache = this->policy->distribute_dofs();
2282 if (!hp_capability_enabled &&
2284 *
>(&*this->tria) ==
nullptr)
2285 this->block_info_object.initialize(*
this,
false,
true);
2290template <
int dim,
int spacedim>
2294 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2297 this->object_dof_indices.size() > 0,
2299 "Distribute active DoFs using distribute_dofs() before calling distribute_mg_dofs()."));
2306 "The mesh smoothing requirement 'limit_level_difference_at_vertices' has to be set for using multigrid!"));
2308 this->clear_mg_space();
2311 this->mg_number_cache = this->policy->distribute_mg_dofs();
2316 &*this->tria) ==
nullptr)
2317 this->block_info_object.initialize(*
this,
true,
false);
2322template <
int dim,
int spacedim>
2326 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2328 this->block_info_object.initialize_local(*
this);
2333template <
int dim,
int spacedim>
2338 if (
dynamic_cast<const ::parallel::shared::Triangulation<dim, spacedim>
2339 *
>(&this->get_triangulation()) !=
nullptr)
2340 this->policy = std::make_unique<internal::DoFHandlerImplementation::Policy::
2341 ParallelShared<dim, spacedim>>(*this);
2342 else if (
dynamic_cast<
2343 const ::parallel::DistributedTriangulationBase<dim, spacedim>
2344 *
>(&this->get_triangulation()) ==
nullptr)
2345 this->policy = std::make_unique<
2350 std::make_unique<internal::DoFHandlerImplementation::Policy::
2351 ParallelDistributed<dim, spacedim>>(*this);
2356template <
int dim,
int spacedim>
2361 this->clear_space();
2362 this->clear_mg_space();
2367template <
int dim,
int spacedim>
2371 object_dof_indices.clear();
2373 object_dof_ptr.clear();
2375 this->number_cache.clear();
2377 this->hp_cell_active_fe_indices.clear();
2378 this->hp_cell_future_fe_indices.clear();
2383template <
int dim,
int spacedim>
2387 this->mg_levels.clear();
2388 this->mg_faces.reset();
2390 std::vector<MGVertexDoFs> tmp;
2392 std::swap(this->mg_vertex_dofs, tmp);
2394 this->mg_number_cache.clear();
2399template <
int dim,
int spacedim>
2402 const std::vector<types::global_dof_index> &new_numbers)
2404 if (hp_capability_enabled)
2406 Assert(this->hp_cell_future_fe_indices.size() > 0,
2408 "You need to distribute DoFs before you can renumber them."));
2417 if (this->n_locally_owned_dofs() == this->n_dofs())
2419 std::vector<types::global_dof_index> tmp(new_numbers);
2420 std::sort(tmp.begin(), tmp.end());
2421 std::vector<types::global_dof_index>::const_iterator
p = tmp.begin();
2423 for (;
p != tmp.end(); ++
p, ++i)
2424 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2427 for (
const auto new_number : new_numbers)
2428 Assert(new_number < this->n_dofs(),
2430 "New DoF index is not less than the total number of dofs."));
2447 this->number_cache = this->policy->renumber_dofs(new_numbers);
2462 Assert(this->object_dof_indices.size() > 0,
2464 "You need to distribute DoFs before you can renumber them."));
2468 &*this->tria) !=
nullptr)
2470 Assert(new_numbers.size() == this->n_dofs() ||
2471 new_numbers.size() == this->n_locally_owned_dofs(),
2472 ExcMessage(
"Incorrect size of the input array."));
2474 else if (
dynamic_cast<
2476 &*this->tria) !=
nullptr)
2489 if (this->n_locally_owned_dofs() == this->n_dofs())
2491 std::vector<types::global_dof_index> tmp(new_numbers);
2492 std::sort(tmp.begin(), tmp.end());
2493 std::vector<types::global_dof_index>::const_iterator
p = tmp.begin();
2495 for (;
p != tmp.end(); ++
p, ++i)
2496 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2499 for (
const auto new_number : new_numbers)
2500 Assert(new_number < this->n_dofs(),
2502 "New DoF index is not less than the total number of dofs."));
2505 this->number_cache = this->policy->renumber_dofs(new_numbers);
2511template <
int dim,
int spacedim>
2514 const unsigned int level,
2515 const std::vector<types::global_dof_index> &new_numbers)
2517 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2520 this->mg_levels.size() > 0 && this->object_dof_indices.size() > 0,
2522 "You need to distribute active and level DoFs before you can renumber level DoFs."));
2525 this->locally_owned_mg_dofs(
level).n_elements());
2532 if (this->n_locally_owned_dofs() == this->n_dofs())
2534 std::vector<types::global_dof_index> tmp(new_numbers);
2535 std::sort(tmp.begin(), tmp.end());
2536 std::vector<types::global_dof_index>::const_iterator
p = tmp.begin();
2538 for (;
p != tmp.end(); ++
p, ++i)
2539 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2542 for (
const auto new_number : new_numbers)
2545 "New DoF index is not less than the total number of dofs."));
2548 this->mg_number_cache[
level] =
2549 this->policy->renumber_mg_dofs(
level, new_numbers);
2554template <
int dim,
int spacedim>
2559 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2564 return this->fe_collection.max_dofs_per_vertex();
2566 return (3 * this->fe_collection.max_dofs_per_vertex() +
2567 2 * this->fe_collection.max_dofs_per_line());
2578 return (19 * this->fe_collection.max_dofs_per_vertex() +
2579 28 * this->fe_collection.max_dofs_per_line() +
2580 8 * this->fe_collection.max_dofs_per_quad());
2589template <
int dim,
int spacedim>
2593 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2600template <
int dim,
int spacedim>
2603 const std::vector<types::fe_index> &active_fe_indices)
2605 Assert(active_fe_indices.size() == this->get_triangulation().n_active_cells(),
2607 this->get_triangulation().n_active_cells()));
2609 this->create_active_fe_table();
2614 for (
const auto &cell : this->active_cell_iterators())
2615 if (cell->is_locally_owned())
2616 cell->set_active_fe_index(active_fe_indices[cell->active_cell_index()]);
2621template <
int dim,
int spacedim>
2624 const std::vector<unsigned int> &active_fe_indices)
2626 set_active_fe_indices(std::vector<types::fe_index>(active_fe_indices.begin(),
2627 active_fe_indices.end()));
2632template <
int dim,
int spacedim>
2637 std::vector<types::fe_index> active_fe_indices(
2643 for (
const auto &cell : this->active_cell_iterators())
2644 if (!cell->is_artificial())
2645 active_fe_indices[cell->active_cell_index()] = cell->active_fe_index();
2647 return active_fe_indices;
2652template <
int dim,
int spacedim>
2655 std::vector<unsigned int> &active_fe_indices)
const
2659 active_fe_indices.assign(indices.begin(), indices.end());
2664template <
int dim,
int spacedim>
2667 const std::vector<types::fe_index> &future_fe_indices)
2669 Assert(future_fe_indices.size() == this->get_triangulation().n_active_cells(),
2671 this->get_triangulation().n_active_cells()));
2673 this->create_active_fe_table();
2678 for (
const auto &cell : this->active_cell_iterators())
2679 if (cell->is_locally_owned() &&
2680 future_fe_indices[cell->active_cell_index()] !=
2682 cell->set_future_fe_index(future_fe_indices[cell->active_cell_index()]);
2687template <
int dim,
int spacedim>
2692 std::vector<types::fe_index> future_fe_indices(
2698 for (
const auto &cell : this->active_cell_iterators())
2699 if (cell->is_locally_owned() && cell->future_fe_index_set())
2700 future_fe_indices[cell->active_cell_index()] = cell->future_fe_index();
2702 return future_fe_indices;
2707template <
int dim,
int spacedim>
2712 Assert(hp_capability_enabled, ExcOnlyAvailableWithHP());
2715 this->tria_listeners.push_back(this->tria->
signals.
create.connect(
2716 [
this]() { this->reinit(*(this->tria)); }));
2717 this->tria_listeners.push_back(
2718 this->tria->
signals.
clear.connect([
this]() { this->clear(); }));
2723 const ::parallel::fullydistributed::Triangulation<dim, spacedim>
2724 *
>(&this->get_triangulation()))
2728 else if (
dynamic_cast<
2729 const ::parallel::distributed::Triangulation<dim, spacedim>
2730 *
>(&this->get_triangulation()))
2733 this->tria_listeners_for_transfer.push_back(
2735 internal::hp::DoFHandlerImplementation::Implementation::
2736 ensure_absence_of_future_fe_indices<dim, spacedim>(*this);
2738 this->tria_listeners_for_transfer.push_back(
2740 [
this]() { this->pre_distributed_transfer_action(); }));
2741 this->tria_listeners_for_transfer.push_back(
2743 [
this]() { this->post_distributed_transfer_action(); }));
2746 this->tria_listeners_for_transfer.push_back(
2748 [
this]() { this->pre_distributed_transfer_action(); }));
2749 this->tria_listeners_for_transfer.push_back(
2751 [
this]() { this->post_distributed_transfer_action(); }));
2754 this->tria_listeners_for_transfer.push_back(
2756 [
this]() { this->active_fe_index_transfer.reset(); }));
2757 this->tria_listeners_for_transfer.push_back(
2759 [
this]() { this->update_active_fe_table(); }));
2761 else if (
dynamic_cast<
2762 const ::parallel::shared::Triangulation<dim, spacedim> *
>(
2763 &this->get_triangulation()) !=
nullptr)
2766 this->tria_listeners_for_transfer.push_back(
2768 internal::hp::DoFHandlerImplementation::Implementation::
2769 ensure_absence_of_future_fe_indices(*this);
2773 this->tria_listeners_for_transfer.push_back(
2775 internal::hp::DoFHandlerImplementation::Implementation::
2776 communicate_future_fe_indices(*this);
2778 this->tria_listeners_for_transfer.push_back(
2780 [
this]() { this->pre_transfer_action(); }));
2781 this->tria_listeners_for_transfer.push_back(
2783 [
this]() { this->post_transfer_action(); }));
2788 this->tria_listeners_for_transfer.push_back(
2790 [
this]() { this->pre_transfer_action(); }));
2791 this->tria_listeners_for_transfer.push_back(
2793 [
this]() { this->post_transfer_action(); }));
2799template <
int dim,
int spacedim>
2803 AssertThrow(hp_capability_enabled ==
true, ExcOnlyAvailableWithHP());
2810 this->hp_cell_active_fe_indices.resize(this->tria->
n_levels());
2811 this->hp_cell_future_fe_indices.resize(this->tria->
n_levels());
2815 for (
unsigned int level = 0;
level < this->hp_cell_future_fe_indices.size();
2818 if (this->hp_cell_active_fe_indices[
level].empty() &&
2819 this->hp_cell_future_fe_indices[
level].empty())
2821 this->hp_cell_active_fe_indices[
level].resize(
2823 this->hp_cell_future_fe_indices[
level].resize(
2831 Assert(this->hp_cell_active_fe_indices[
level].size() ==
2833 this->hp_cell_future_fe_indices[
level].size() ==
2834 this->tria->n_raw_cells(
level),
2850template <
int dim,
int spacedim>
2866 this->hp_cell_active_fe_indices.resize(this->tria->
n_levels());
2867 this->hp_cell_active_fe_indices.shrink_to_fit();
2869 this->hp_cell_future_fe_indices.resize(this->tria->
n_levels());
2870 this->hp_cell_future_fe_indices.shrink_to_fit();
2872 for (
unsigned int i = 0; i < this->hp_cell_future_fe_indices.size(); ++i)
2875 this->hp_cell_active_fe_indices[i].resize(this->tria->
n_raw_cells(i), 0);
2882 this->hp_cell_future_fe_indices[i].assign(this->tria->
n_raw_cells(i),
2888template <
int dim,
int spacedim>
2894 this->active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
2902template <
int dim,
int spacedim>
2906# ifndef DEAL_II_WITH_P4EST
2909 "You are attempting to use a functionality that is only available "
2910 "if deal.II was configured to use p4est, but cmake did not find a "
2911 "valid p4est library."));
2916 &this->get_triangulation()) !=
nullptr),
2921 active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
2930 active_fe_index_transfer->active_fe_indices.resize(
2933 for (
const auto &cell : active_cell_iterators())
2934 if (cell->is_locally_owned())
2935 active_fe_index_transfer->active_fe_indices[cell->active_cell_index()] =
2936 cell->future_fe_index();
2939 const auto *distributed_tria =
2941 &this->get_triangulation());
2943 active_fe_index_transfer->cell_data_transfer = std::make_unique<
2944 parallel::distributed::
2945 CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
2949 &::AdaptationStrategies::Refinement::
2950 preserve<dim, spacedim, types::fe_index>,
2953 const std::vector<types::fe_index> &children_fe_indices)
2955 return ::internal::hp::DoFHandlerImplementation::Implementation::
2956 determine_fe_from_children<dim, spacedim>(parent,
2957 children_fe_indices,
2961 active_fe_index_transfer->cell_data_transfer
2962 ->prepare_for_coarsening_and_refinement(
2963 active_fe_index_transfer->active_fe_indices);
2969template <
int dim,
int spacedim>
2973 update_active_fe_table();
2987 this->active_fe_index_transfer.reset();
2992template <
int dim,
int spacedim>
2996# ifndef DEAL_II_WITH_P4EST
2999 update_active_fe_table();
3004 this->active_fe_index_transfer->active_fe_indices.resize(
3006 this->active_fe_index_transfer->cell_data_transfer->unpack(
3007 this->active_fe_index_transfer->active_fe_indices);
3010 this->set_active_fe_indices(
3011 this->active_fe_index_transfer->active_fe_indices);
3018 this->active_fe_index_transfer.reset();
3024template <
int dim,
int spacedim>
3028# ifndef DEAL_II_WITH_P4EST
3031 "You are attempting to use a functionality that is only available "
3032 "if deal.II was configured to use p4est, but cmake did not find a "
3033 "valid p4est library."));
3038 &this->get_triangulation()) !=
nullptr),
3043 active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
3046 const auto *distributed_tria =
3048 &this->get_triangulation());
3050 active_fe_index_transfer->cell_data_transfer = std::make_unique<
3051 parallel::distributed::
3052 CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
3056 &::AdaptationStrategies::Refinement::
3057 preserve<dim, spacedim, types::fe_index>,
3060 const std::vector<types::fe_index> &children_fe_indices)
3062 return ::internal::hp::DoFHandlerImplementation::Implementation::
3063 determine_fe_from_children<dim, spacedim>(parent,
3064 children_fe_indices,
3075 active_fe_index_transfer->cell_data_transfer->prepare_for_serialization(
3076 active_fe_index_transfer->active_fe_indices);
3082template <
int dim,
int spacedim>
3086# ifndef DEAL_II_WITH_P4EST
3089 "You are attempting to use a functionality that is only available "
3090 "if deal.II was configured to use p4est, but cmake did not find a "
3091 "valid p4est library."));
3096 &this->get_triangulation()) !=
nullptr),
3101 active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
3104 const auto *distributed_tria =
3106 &this->get_triangulation());
3108 active_fe_index_transfer->cell_data_transfer = std::make_unique<
3109 parallel::distributed::
3110 CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
3114 &::AdaptationStrategies::Refinement::
3115 preserve<dim, spacedim, types::fe_index>,
3118 const std::vector<types::fe_index> &children_fe_indices)
3120 return ::internal::hp::DoFHandlerImplementation::Implementation::
3121 determine_fe_from_children<dim, spacedim>(parent,
3122 children_fe_indices,
3127 active_fe_index_transfer->active_fe_indices.resize(
3129 active_fe_index_transfer->cell_data_transfer->deserialize(
3130 active_fe_index_transfer->active_fe_indices);
3133 set_active_fe_indices(active_fe_index_transfer->active_fe_indices);
3140 active_fe_index_transfer.reset();
3146template <
int dim,
int spacedim>
3149 : coarsest_level(
numbers::invalid_unsigned_int)
3155template <
int dim,
int spacedim>
3158 const unsigned int cl,
3159 const unsigned int fl,
3160 const unsigned int dofs_per_vertex)
3162 coarsest_level = cl;
3165 if (coarsest_level <= finest_level)
3167 const unsigned int n_levels = finest_level - coarsest_level + 1;
3168 const unsigned int n_indices = n_levels * dofs_per_vertex;
3170 indices = std::make_unique<types::global_dof_index[]>(n_indices);
3171 std::fill(indices.get(),
3172 indices.get() + n_indices,
3181template <
int dim,
int spacedim>
3185 return coarsest_level;
3190template <
int dim,
int spacedim>
3194 return finest_level;
3198#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
std::vector< types::fe_index > get_future_fe_indices() const
unsigned int max_couplings_between_dofs() const
std::vector< std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel< dim > > > mg_levels
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)
const FiniteElement< dim, spacedim > & get_fe(const types::fe_index index=0) 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
std::vector< types::fe_index > get_active_fe_indices() 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()
typename LevelSelector::cell_iterator level_cell_iterator
void prepare_for_serialization_of_active_fe_indices()
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
IteratorState::IteratorStates state() 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
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() const
IteratorRange< level_cell_iterator > mg_cell_iterators() const
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< cell_iterator > cell_iterators() const
IteratorRange< level_cell_iterator > mg_cell_iterators_on_level(const unsigned int level) const
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcNoDominatedFiniteElementOnChildren()
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
typename ActiveSelector::cell_iterator cell_iterator
typename ActiveSelector::active_cell_iterator active_cell_iterator
Task< RT > new_task(const std::function< RT()> &function)
#define DEAL_II_ASSERT_UNREACHABLE()
#define DEAL_II_NOT_IMPLEMENTED()
spacedim MeshType< dim - 1, spacedim > const std::set< types::boundary_id > & boundary_ids
@ valid
Iterator points to a valid object.
std::enable_if_t< std::is_fundamental_v< T >, std::size_t > memory_consumption(const T &t)
T sum(const T &t, const MPI_Comm mpi_communicator)
std::string int_to_string(const unsigned int value, const unsigned int digits=numbers::invalid_unsigned_int)
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
const types::global_dof_index invalid_dof_index
const Iterator const std_cxx20::type_identity_t< Iterator > & end
::VectorizedArray< Number, width > min(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
unsigned short int fe_index
boost::signals2::signal< void()> post_distributed_load
boost::signals2::signal< void()> post_distributed_refinement
boost::signals2::signal< void()> pre_refinement
boost::signals2::signal< void()> create
boost::signals2::signal< void()> clear
boost::signals2::signal< void()> post_refinement
boost::signals2::signal< void()> pre_partition
boost::signals2::signal< void()> pre_distributed_repartition
boost::signals2::signal< void()> post_p4est_refinement
boost::signals2::signal< void()> post_distributed_repartition
boost::signals2::signal< void()> post_distributed_save
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)