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 policy_name =
"Policy::Sequential<";
61 else if (
dynamic_cast<
62 const typename ::internal::DoFHandlerImplementation::
63 Policy::ParallelDistributed<dim, spacedim> *
>(&policy))
64 policy_name =
"Policy::ParallelDistributed<";
65 else if (
dynamic_cast<
66 const typename ::internal::DoFHandlerImplementation::
67 Policy::ParallelShared<dim, spacedim> *
>(&policy))
68 policy_name =
"Policy::ParallelShared<";
77 namespace DoFHandlerImplementation
89 template <
int spacedim>
99 template <
int spacedim>
218 template <
int spacedim>
231 const unsigned int max_adjacent_cells =
235 if (max_adjacent_cells <= 8)
254 template <
int dim,
int spacedim>
270 template <
int dim,
int spacedim>
273 const unsigned int n_inner_dofs_per_cell)
275 for (
unsigned int i = 0; i < dof_handler.
tria->
n_levels(); ++i)
280 for (
const auto &cell :
282 if (cell->is_active() && !cell->is_artificial())
284 n_inner_dofs_per_cell;
300 template <
int dim,
int spacedim,
typename T>
303 const unsigned int structdim,
304 const unsigned int n_raw_entities,
305 const T &cell_process)
310 dof_handler.
object_dof_ptr[0][structdim].assign(n_raw_entities + 1, -1);
313 if (cell->is_active() && !cell->is_artificial())
316 [&](
const unsigned int n_dofs_per_entity,
317 const unsigned int index) {
318 auto &n_dofs_per_entity_target =
323 Assert((n_dofs_per_entity_target ==
327 n_dofs_per_entity_target == n_dofs_per_entity),
330 n_dofs_per_entity_target = n_dofs_per_entity;
335 for (
unsigned int i = 1; i < n_raw_entities + 1; ++i)
359 template <
int dim,
int spacedim>
365 const auto &fe = dof_handler.
get_fe();
369 dim == 1 ? fe.n_dofs_per_line() :
370 (dim == 2 ? fe.n_dofs_per_quad(0) :
371 fe.n_dofs_per_hex()));
377 [&](
const auto &cell,
const auto &process) {
378 for (const auto vertex_index :
379 cell->vertex_indices())
380 process(fe.n_dofs_per_vertex(),
381 cell->vertex_index(vertex_index));
385 if (dim == 2 || dim == 3)
389 [&](
const auto &cell,
const auto &process) {
390 for (const auto line_index :
391 cell->line_indices())
392 process(fe.n_dofs_per_line(),
393 cell->line(line_index)->index());
401 [&](
const auto &cell,
const auto &process) {
402 for (const auto face_index :
403 cell->face_indices())
404 process(fe.n_dofs_per_quad(face_index),
405 cell->face(face_index)->index());
409 template <
int spacedim>
417 const ::Triangulation<1, spacedim> &tria =
419 const unsigned int dofs_per_line =
421 const unsigned int n_levels = tria.n_levels();
423 for (
unsigned int i = 0; i < n_levels; ++i)
427 dof_handler.
mg_levels.back()->dof_object.dofs =
428 std::vector<types::global_dof_index>(tria.n_raw_lines(i) *
433 const unsigned int n_vertices = tria.n_vertices();
437 std::vector<unsigned int> max_level(n_vertices, 0);
438 std::vector<unsigned int> min_level(n_vertices, n_levels);
440 for (typename ::Triangulation<1, spacedim>::cell_iterator cell =
445 const unsigned int level = cell->level();
447 for (
const auto vertex : cell->vertex_indices())
449 const unsigned int vertex_index = cell->vertex_index(vertex);
451 if (min_level[vertex_index] >
level)
452 min_level[vertex_index] =
level;
454 if (max_level[vertex_index] <
level)
455 max_level[vertex_index] =
level;
459 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
460 if (tria.vertex_used(vertex))
463 Assert(max_level[vertex] >= min_level[vertex],
479 template <
int spacedim>
487 const ::FiniteElement<2, spacedim> &fe = dof_handler.
get_fe();
488 const ::Triangulation<2, spacedim> &tria =
490 const unsigned int n_levels = tria.
n_levels();
492 for (
unsigned int i = 0; i < n_levels; ++i)
497 dof_handler.
mg_levels.back()->dof_object.dofs =
498 std::vector<types::global_dof_index>(
499 tria.n_raw_quads(i) *
500 fe.n_dofs_per_quad(0 ),
505 std::make_unique<internal::DoFHandlerImplementation::DoFFaces<2>>();
507 std::vector<types::global_dof_index>(tria.n_raw_lines() *
508 fe.n_dofs_per_line(),
511 const unsigned int n_vertices = tria.n_vertices();
515 std::vector<unsigned int> max_level(n_vertices, 0);
516 std::vector<unsigned int> min_level(n_vertices, n_levels);
518 for (typename ::Triangulation<2, spacedim>::cell_iterator cell =
523 const unsigned int level = cell->level();
525 for (
const auto vertex : cell->vertex_indices())
527 const unsigned int vertex_index = cell->vertex_index(vertex);
529 if (min_level[vertex_index] >
level)
530 min_level[vertex_index] =
level;
532 if (max_level[vertex_index] <
level)
533 max_level[vertex_index] =
level;
537 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
538 if (tria.vertex_used(vertex))
541 Assert(max_level[vertex] >= min_level[vertex],
545 fe.n_dofs_per_vertex());
556 template <
int spacedim>
564 const ::FiniteElement<3, spacedim> &fe = dof_handler.
get_fe();
565 const ::Triangulation<3, spacedim> &tria =
567 const unsigned int n_levels = tria.
n_levels();
569 for (
unsigned int i = 0; i < n_levels; ++i)
574 dof_handler.
mg_levels.back()->dof_object.dofs =
575 std::vector<types::global_dof_index>(tria.n_raw_hexs(i) *
581 std::make_unique<internal::DoFHandlerImplementation::DoFFaces<3>>();
583 std::vector<types::global_dof_index>(tria.n_raw_lines() *
584 fe.n_dofs_per_line(),
590 dof_handler.
mg_faces->quads.dofs = std::vector<types::global_dof_index>(
591 tria.n_raw_quads() * fe.n_dofs_per_quad(0 ),
594 const unsigned int n_vertices = tria.n_vertices();
598 std::vector<unsigned int> max_level(n_vertices, 0);
599 std::vector<unsigned int> min_level(n_vertices, n_levels);
601 for (typename ::Triangulation<3, spacedim>::cell_iterator cell =
606 const unsigned int level = cell->level();
608 for (
const auto vertex : cell->vertex_indices())
610 const unsigned int vertex_index = cell->vertex_index(vertex);
612 if (min_level[vertex_index] >
level)
613 min_level[vertex_index] =
level;
615 if (max_level[vertex_index] <
level)
616 max_level[vertex_index] =
level;
620 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
621 if (tria.vertex_used(vertex))
624 Assert(max_level[vertex] >= min_level[vertex],
628 fe.n_dofs_per_vertex());
645 namespace DoFHandlerImplementation
658 template <
int dim,
int spacedim>
665 if (cell->is_locally_owned())
667 !cell->future_fe_index_set(),
669 "There shouldn't be any cells flagged for p-adaptation when partitioning."));
678 template <
int dim,
int spacedim>
694 std::vector<bool> locally_used_vertices(
697 if (!cell->is_artificial())
698 for (
const auto v : cell->vertex_indices())
699 locally_used_vertices[cell->vertex_index(v)] =
true;
701 std::vector<std::vector<bool>> vertex_fe_association(
706 if (!cell->is_artificial())
707 for (
const auto v : cell->vertex_indices())
708 vertex_fe_association[cell->active_fe_index()]
709 [cell->vertex_index(v)] =
true;
719 if (locally_used_vertices[v] ==
true)
724 if (vertex_fe_association[fe][v] ==
true)
731 const unsigned int d = 0;
732 const unsigned int l = 0;
742 unsigned int vertex_slots_needed = 0;
743 unsigned int fe_slots_needed = 0;
751 for (
unsigned int fe = 0;
754 if (vertex_fe_association[fe][v] ==
true)
757 vertex_slots_needed +=
775 if (vertex_fe_association[fe][v] ==
true)
781 for (
unsigned int i = 0;
782 i < dof_handler.
get_fe(fe).n_dofs_per_vertex();
812 template <
int dim,
int spacedim>
829 std::vector<typename DoFHandler<dim, spacedim>::offset_type>(
837 if (cell->is_active() && !cell->is_artificial())
842 cell->get_fe().template n_dofs_per_object<dim>();
846 std::vector<types::global_dof_index>(
857 template <
int dim,
int spacedim>
878 std::vector<bool> face_touched(dim == 2 ?
882 const unsigned int d = dim - 1;
883 const unsigned int l = 0;
895 unsigned int n_face_slots = 0;
898 if (!cell->is_artificial())
899 for (
const auto face : cell->face_indices())
900 if (!face_touched[cell->face(face)->index()])
902 unsigned int fe_slots_needed = 0;
904 if (cell->at_boundary(face) ||
905 cell->face(face)->has_children() ||
906 cell->neighbor_is_coarser(face) ||
907 (!cell->at_boundary(face) &&
908 cell->neighbor(face)->is_artificial()) ||
909 (!cell->at_boundary(face) &&
910 !cell->neighbor(face)->is_artificial() &&
911 (cell->active_fe_index() ==
912 cell->neighbor(face)->active_fe_index())))
916 dof_handler.
get_fe(cell->active_fe_index())
917 .
template n_dofs_per_object<dim - 1>(face);
923 dof_handler.
get_fe(cell->active_fe_index())
924 .
template n_dofs_per_object<dim - 1>(face) +
926 .
get_fe(cell->neighbor(face)->active_fe_index())
927 .
template n_dofs_per_object<dim - 1>(
928 cell->neighbor_face_no(face));
932 face_touched[cell->face(face)->index()] =
true;
956 face_touched = std::vector<bool>(face_touched.size());
959 if (!cell->is_artificial())
960 for (
const auto face : cell->face_indices())
961 if (!face_touched[cell->face(face)->index()])
964 if (cell->at_boundary(face) ||
965 cell->face(face)->has_children() ||
966 cell->neighbor_is_coarser(face) ||
967 (!cell->at_boundary(face) &&
968 cell->neighbor(face)->is_artificial()) ||
969 (!cell->at_boundary(face) &&
970 !cell->neighbor(face)->is_artificial() &&
971 (cell->active_fe_index() ==
972 cell->neighbor(face)->active_fe_index())))
975 const unsigned int n_dofs =
977 .template n_dofs_per_object<dim - 1>(face);
978 const unsigned int offset =
985 for (
unsigned int i = 0; i < n_dofs; ++i)
992 unsigned int face_no_1 = face;
994 cell->neighbor(face)->active_fe_index();
995 unsigned int face_no_2 = cell->neighbor_face_no(face);
999 std::swap(fe_1, fe_2);
1000 std::swap(face_no_1, face_no_2);
1003 const unsigned int n_dofs_1 =
1005 .template n_dofs_per_object<dim - 1>(face_no_1);
1007 const unsigned int n_dofs_2 =
1009 .template n_dofs_per_object<dim - 1>(face_no_2);
1011 const unsigned int offset =
1016 cell->active_fe_index());
1030 for (
unsigned int i = 0; i < n_dofs_1 + n_dofs_2; ++i)
1036 face_touched[cell->face(face)->index()] =
true;
1039 for (
unsigned int i = 1;
1055 template <
int spacedim>
1062 ExcMessage(
"The current Triangulation must not be empty."));
1080 template <
int spacedim>
1087 ExcMessage(
"The current Triangulation must not be empty."));
1107 template <
int spacedim>
1114 ExcMessage(
"The current Triangulation must not be empty."));
1143 std::vector<std::vector<bool>> line_fe_association(
1148 if (!cell->is_artificial())
1149 for (
const auto l : cell->line_indices())
1150 line_fe_association[cell->active_fe_index()]
1151 [cell->line_index(l)] =
true;
1163 if (line_fe_association[fe][line] ==
true)
1165 line_is_used[line] =
true;
1171 const unsigned int d = 1;
1172 const unsigned int l = 0;
1182 unsigned int line_slots_needed = 0;
1183 unsigned int fe_slots_needed = 0;
1190 if (line_is_used[line] ==
true)
1192 for (
unsigned int fe = 0;
1195 if (line_fe_association[fe][line] ==
true)
1198 line_slots_needed +=
1217 if (line_is_used[line] ==
true)
1219 for (
unsigned int fe = 0;
1222 if (line_fe_association[fe][line] ==
true)
1228 for (
unsigned int i = 0;
1229 i < dof_handler.
get_fe(fe).n_dofs_per_line();
1243 fe_slots_needed + 1);
1265 template <
int dim,
int spacedim>
1273 if (const ::parallel::shared::Triangulation<dim, spacedim> *tr =
1275 const ::parallel::shared::Triangulation<dim, spacedim>
1288 std::vector<types::fe_index> active_fe_indices(
1289 tr->n_active_cells(), 0u);
1291 if (cell->is_locally_owned())
1292 active_fe_indices[cell->active_cell_index()] =
1293 cell->active_fe_index();
1296 tr->get_mpi_communicator(),
1306 if (!cell->is_locally_owned())
1308 .hp_cell_active_fe_indices[cell->level()][cell->index()] =
1309 active_fe_indices[cell->active_cell_index()];
1311 else if (const ::parallel::
1312 DistributedTriangulationBase<dim, spacedim> *tr =
1315 DistributedTriangulationBase<dim, spacedim> *
>(
1328 return cell->active_fe_index();
1354 const ::parallel::TriangulationBase<dim, spacedim> *
>(
1375 template <
int dim,
int spacedim>
1383 if (const ::parallel::shared::Triangulation<dim, spacedim> *tr =
1385 const ::parallel::shared::Triangulation<dim, spacedim>
1388 std::vector<types::fe_index> future_fe_indices(
1389 tr->n_active_cells(), 0u);
1392 future_fe_indices[cell->active_cell_index()] =
1397 tr->get_mpi_communicator(),
1401 if (!cell->is_locally_owned())
1403 .hp_cell_future_fe_indices[cell->level()][cell->index()] =
1404 future_fe_indices[cell->active_cell_index()];
1406 else if (const ::parallel::
1407 DistributedTriangulationBase<dim, spacedim> *tr =
1410 DistributedTriangulationBase<dim, spacedim> *
>(
1439 const ::parallel::TriangulationBase<dim, spacedim> *
>(
1467 template <
int dim,
int spacedim>
1475 if (cell->is_locally_owned())
1477 if (cell->refine_flag_set())
1482 fe_transfer->refined_cells_fe_index.insert(
1483 {cell, cell->future_fe_index()});
1485 else if (cell->coarsen_flag_set())
1492 const auto &parent = cell->parent();
1496 if (fe_transfer->coarsened_cells_fe_index.find(parent) ==
1497 fe_transfer->coarsened_cells_fe_index.end())
1506 for (
const auto &child : parent->child_iterators())
1507 Assert(child->is_active() &&
1508 child->coarsen_flag_set(),
1509 typename ::Triangulation<
1510 dim>::ExcInconsistentCoarseningFlags());
1514 DoFHandlerImplementation::Implementation::
1515 dominated_future_fe_on_children<dim, spacedim>(
1518 fe_transfer->coarsened_cells_fe_index.insert(
1519 {parent, fe_index});
1527 if (cell->future_fe_index_set() ==
true)
1528 fe_transfer->persisting_cells_fe_index.insert(
1529 {cell, cell->future_fe_index()});
1540 template <
int dim,
int spacedim>
1548 for (
const auto &persist : fe_transfer->persisting_cells_fe_index)
1550 const auto &cell = persist.first;
1552 if (cell->is_locally_owned())
1555 cell->set_active_fe_index(persist.second);
1561 for (
const auto &refine : fe_transfer->refined_cells_fe_index)
1563 const auto &parent = refine.first;
1565 for (
const auto &child : parent->child_iterators())
1566 if (child->is_locally_owned())
1569 child->set_active_fe_index(refine.second);
1575 for (
const auto &coarsen : fe_transfer->coarsened_cells_fe_index)
1577 const auto &cell = coarsen.first;
1579 if (cell->is_locally_owned())
1582 cell->set_active_fe_index(coarsen.second);
1598 template <
int dim,
int spacedim>
1602 const std::vector<types::fe_index> &children_fe_indices,
1603 const ::hp::FECollection<dim, spacedim> &fe_collection)
1609 const std::set<unsigned int> children_fe_indices_set(
1610 children_fe_indices.begin(), children_fe_indices.end());
1613 fe_collection.find_dominated_fe_extended(children_fe_indices_set,
1619 return dominated_fe_index;
1630 template <
int dim,
int spacedim>
1636 !parent->is_active(),
1638 "You ask for information on children of this cell which is only "
1639 "available for active cells. This cell has no children."));
1641 const auto &dof_handler = parent->get_dof_handler();
1643 dof_handler.has_hp_capabilities(),
1647 std::set<unsigned int> future_fe_indices_children;
1648 for (
const auto &child : parent->child_iterators())
1653 "You ask for information on children of this cell which is only "
1654 "available for active cells. One of its children is not active."));
1663 ::internal::DoFCellAccessorImplementation::
1664 Implementation::future_fe_index<dim, spacedim, false>(*child);
1666 future_fe_indices_children.insert(future_fe_index_child);
1671 dof_handler.fe_collection.find_dominated_fe_extended(
1672 future_fe_indices_children,
1678 return future_fe_index;
1687 template <
int dim,
int spacedim>
1691 Implementation::communicate_future_fe_indices<dim, spacedim>(
1700 template <
int dim,
int spacedim>
1705 return Implementation::dominated_future_fe_on_children<dim, spacedim>(
1714template <
int dim,
int spacedim>
1717 : hp_capability_enabled(true)
1718 , tria(nullptr, typeid(*this).name())
1724template <
int dim,
int spacedim>
1734template <
int dim,
int spacedim>
1739 for (
auto &connection : this->tria_listeners)
1740 connection.disconnect();
1741 this->tria_listeners.clear();
1743 for (
auto &connection : this->tria_listeners_for_transfer)
1744 connection.disconnect();
1745 this->tria_listeners_for_transfer.clear();
1756 this->policy.reset();
1761template <
int dim,
int spacedim>
1769 for (
auto &connection : this->tria_listeners)
1770 connection.disconnect();
1771 this->tria_listeners.clear();
1773 for (
auto &connection : this->tria_listeners_for_transfer)
1774 connection.disconnect();
1775 this->tria_listeners_for_transfer.clear();
1779 this->policy.reset();
1789 this->setup_policy();
1792 hp_capability_enabled =
true;
1793 this->connect_to_triangulation_signals();
1794 this->create_active_fe_table();
1800template <
int dim,
int spacedim>
1806 this->get_triangulation().begin(
level);
1807 if (cell == this->get_triangulation().
end(
level))
1809 return cell_iterator(*cell,
this);
1814template <
int dim,
int spacedim>
1823 while (i->has_children())
1831template <
int dim,
int spacedim>
1836 return cell_iterator(&this->get_triangulation(), -1, -1,
this);
1841template <
int dim,
int spacedim>
1847 this->get_triangulation().end(
level);
1850 return cell_iterator(*cell,
this);
1855template <
int dim,
int spacedim>
1861 this->get_triangulation().end_active(
level);
1863 return active_cell_iterator(
end());
1864 return active_cell_iterator(*cell,
this);
1869template <
int dim,
int spacedim>
1874 Assert(this->has_level_dofs(),
1876 "levels if mg dofs got distributed."));
1878 this->get_triangulation().begin(
level);
1879 if (cell == this->get_triangulation().
end(
level))
1880 return end_mg(
level);
1881 return level_cell_iterator(*cell,
this);
1886template <
int dim,
int spacedim>
1891 Assert(this->has_level_dofs(),
1893 "levels if mg dofs got distributed."));
1895 this->get_triangulation().end(
level);
1898 return level_cell_iterator(*cell,
this);
1903template <
int dim,
int spacedim>
1908 return level_cell_iterator(&this->get_triangulation(), -1, -1,
this);
1913template <
int dim,
int spacedim>
1917 spacedim>::cell_iterators()
const
1925template <
int dim,
int spacedim>
1938template <
int dim,
int spacedim>
1945 begin_mg(), end_mg());
1950template <
int dim,
int spacedim>
1954 spacedim>::cell_iterators_on_level(
const unsigned int level)
const
1962template <
int dim,
int spacedim>
1975template <
int dim,
int spacedim>
1991template <
int dim,
int spacedim>
1995 Assert(!(dim == 2 && spacedim == 3) || hp_capability_enabled ==
false,
1996 ExcNotImplementedWithHP());
1998 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2000 std::unordered_set<types::global_dof_index> boundary_dofs;
2001 std::vector<types::global_dof_index> dofs_on_face;
2002 dofs_on_face.reserve(this->get_fe_collection().max_dofs_per_face());
2004 const IndexSet &owned_dofs = locally_owned_dofs();
2011 for (
const auto &cell : this->active_cell_iterators())
2012 if (cell->is_locally_owned() && cell->at_boundary())
2014 for (
const auto iface : cell->face_indices())
2016 const auto face = cell->face(iface);
2017 if (face->at_boundary())
2019 const unsigned int dofs_per_face =
2020 cell->get_fe().n_dofs_per_face(iface);
2021 dofs_on_face.resize(dofs_per_face);
2023 face->get_dof_indices(dofs_on_face, cell->active_fe_index());
2024 for (
unsigned int i = 0; i < dofs_per_face; ++i)
2026 const unsigned int global_idof_index = dofs_on_face[i];
2027 if (owned_dofs.
is_element(global_idof_index))
2029 boundary_dofs.insert(global_idof_index);
2035 return boundary_dofs.size();
2040template <
int dim,
int spacedim>
2043 const std::set<types::boundary_id> &boundary_ids)
const
2045 Assert(!(dim == 2 && spacedim == 3) || hp_capability_enabled ==
false,
2046 ExcNotImplementedWithHP());
2048 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2051 ExcInvalidBoundaryIndicator());
2055 std::unordered_set<types::global_dof_index> boundary_dofs;
2056 std::vector<types::global_dof_index> dofs_on_face;
2057 dofs_on_face.reserve(this->get_fe_collection().max_dofs_per_face());
2059 const IndexSet &owned_dofs = locally_owned_dofs();
2061 for (
const auto &cell : this->active_cell_iterators())
2062 if (cell->is_locally_owned() && cell->at_boundary())
2064 for (
const auto iface : cell->face_indices())
2066 const auto face = cell->face(iface);
2067 const unsigned int boundary_id = face->boundary_id();
2068 if (face->at_boundary() &&
2069 (boundary_ids.find(boundary_id) != boundary_ids.end()))
2071 const unsigned int dofs_per_face =
2072 cell->get_fe().n_dofs_per_face(iface);
2073 dofs_on_face.resize(dofs_per_face);
2075 face->get_dof_indices(dofs_on_face, cell->active_fe_index());
2076 for (
unsigned int i = 0; i < dofs_per_face; ++i)
2078 const unsigned int global_idof_index = dofs_on_face[i];
2079 if (owned_dofs.
is_element(global_idof_index))
2081 boundary_dofs.insert(global_idof_index);
2087 return boundary_dofs.size();
2092template <
int dim,
int spacedim>
2108 if (hp_capability_enabled)
2121 if (this->mg_faces !=
nullptr)
2124 for (
unsigned int i = 0; i < this->mg_vertex_dofs.size(); ++i)
2125 mem +=
sizeof(MGVertexDoFs) +
2126 (1 + this->mg_vertex_dofs[i].get_finest_level() -
2127 this->mg_vertex_dofs[i].get_coarsest_level()) *
2136template <
int dim,
int spacedim>
2146template <
int dim,
int spacedim>
2151 Assert(this->tria !=
nullptr,
2153 "You need to set the Triangulation in the DoFHandler using reinit() "
2154 "or in the constructor before you can distribute DoFs."));
2156 ExcMessage(
"The Triangulation you are using is empty!"));
2160 Assert((ff.
size() <= std::numeric_limits<types::fe_index>::max()) &&
2162 ExcMessage(
"The given hp::FECollection contains more finite elements "
2163 "than the DoFHandler can cover with active FE indices."));
2169 if ((hp_cell_active_fe_indices.size() > 0) &&
2170 (hp_cell_future_fe_indices.size() > 0))
2174 for (
const auto &cell : this->active_cell_iterators() |
2178 ExcInvalidFEIndex(cell->active_fe_index(), ff.
size()));
2180 ExcInvalidFEIndex(cell->future_fe_index(), ff.
size()));
2189 if (this->fe_collection != ff)
2193 const bool contains_multiple_fes = (this->fe_collection.size() > 1);
2196 if (hp_capability_enabled && !contains_multiple_fes)
2198 hp_capability_enabled =
false;
2202 for (
auto &connection : this->tria_listeners_for_transfer)
2203 connection.disconnect();
2204 this->tria_listeners_for_transfer.clear();
2207 this->hp_cell_active_fe_indices.clear();
2208 this->hp_cell_active_fe_indices.shrink_to_fit();
2209 this->hp_cell_future_fe_indices.clear();
2210 this->hp_cell_future_fe_indices.shrink_to_fit();
2216 hp_capability_enabled || !contains_multiple_fes,
2218 "You cannot re-enable hp-capabilities after you registered a single "
2219 "finite element. Please call reinit() or create a new DoFHandler "
2220 "object instead."));
2226 if (hp_capability_enabled)
2244 subdomain_modifier(this->get_triangulation());
2253 if (hp_capability_enabled)
2261 this->number_cache = this->policy->distribute_dofs();
2278 if (!hp_capability_enabled &&
2280 *
>(&*this->tria) ==
nullptr)
2281 this->block_info_object.initialize(*
this,
false,
true);
2286template <
int dim,
int spacedim>
2290 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2293 this->object_dof_indices.size() > 0,
2295 "Distribute active DoFs using distribute_dofs() before calling distribute_mg_dofs()."));
2302 "The mesh smoothing requirement 'limit_level_difference_at_vertices' has to be set for using multigrid!"));
2304 this->clear_mg_space();
2307 this->mg_number_cache = this->policy->distribute_mg_dofs();
2312 &*this->tria) ==
nullptr)
2313 this->block_info_object.initialize(*
this,
true,
false);
2318template <
int dim,
int spacedim>
2322 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2324 this->block_info_object.initialize_local(*
this);
2329template <
int dim,
int spacedim>
2334 if (
dynamic_cast<const ::parallel::shared::Triangulation<dim, spacedim>
2335 *
>(&this->get_triangulation()) !=
nullptr)
2336 this->policy = std::make_unique<internal::DoFHandlerImplementation::Policy::
2337 ParallelShared<dim, spacedim>>(*this);
2338 else if (
dynamic_cast<
2339 const ::parallel::DistributedTriangulationBase<dim, spacedim>
2340 *
>(&this->get_triangulation()) ==
nullptr)
2341 this->policy = std::make_unique<
2346 std::make_unique<internal::DoFHandlerImplementation::Policy::
2347 ParallelDistributed<dim, spacedim>>(*this);
2352template <
int dim,
int spacedim>
2357 this->clear_space();
2358 this->clear_mg_space();
2363template <
int dim,
int spacedim>
2367 object_dof_indices.clear();
2369 object_dof_ptr.clear();
2371 this->number_cache.clear();
2373 this->hp_cell_active_fe_indices.clear();
2374 this->hp_cell_future_fe_indices.clear();
2379template <
int dim,
int spacedim>
2383 this->mg_levels.clear();
2384 this->mg_faces.reset();
2386 std::vector<MGVertexDoFs> tmp;
2388 std::swap(this->mg_vertex_dofs, tmp);
2390 this->mg_number_cache.clear();
2395template <
int dim,
int spacedim>
2398 const std::vector<types::global_dof_index> &new_numbers)
2400 if (hp_capability_enabled)
2402 Assert(this->hp_cell_future_fe_indices.size() > 0,
2404 "You need to distribute DoFs before you can renumber them."));
2414 if (this->n_locally_owned_dofs() == this->n_dofs())
2416 std::vector<types::global_dof_index> tmp(new_numbers);
2417 std::sort(tmp.begin(), tmp.end());
2418 std::vector<types::global_dof_index>::const_iterator p =
2421 for (; p != tmp.end(); ++p, ++i)
2422 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2425 for (
const auto new_number : new_numbers)
2427 new_number < this->n_dofs(),
2429 "New DoF index is not less than the total number of dofs."));
2446 this->number_cache = this->policy->renumber_dofs(new_numbers);
2461 Assert(this->object_dof_indices.size() > 0,
2463 "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 =
2496 for (; p != tmp.end(); ++p, ++i)
2497 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2500 for (
const auto new_number : new_numbers)
2502 new_number < this->n_dofs(),
2504 "New DoF index is not less than the total number of dofs."));
2507 this->number_cache = this->policy->renumber_dofs(new_numbers);
2513template <
int dim,
int spacedim>
2516 const unsigned int level,
2517 const std::vector<types::global_dof_index> &new_numbers)
2519 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2522 this->mg_levels.size() > 0 && this->object_dof_indices.size() > 0,
2524 "You need to distribute active and level DoFs before you can renumber level DoFs."));
2527 this->locally_owned_mg_dofs(
level).n_elements());
2535 if (this->n_locally_owned_dofs() == this->n_dofs())
2537 std::vector<types::global_dof_index> tmp(new_numbers);
2538 std::sort(tmp.begin(), tmp.end());
2539 std::vector<types::global_dof_index>::const_iterator p = tmp.begin();
2541 for (; p != tmp.end(); ++p, ++i)
2542 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2545 for (
const auto new_number : new_numbers)
2548 "New DoF index is not less than the total number of dofs."));
2551 this->mg_number_cache[
level] =
2552 this->policy->renumber_mg_dofs(
level, new_numbers);
2557template <
int dim,
int spacedim>
2562 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2567 return this->fe_collection.max_dofs_per_vertex();
2569 return (3 * this->fe_collection.max_dofs_per_vertex() +
2570 2 * this->fe_collection.max_dofs_per_line());
2581 return (19 * this->fe_collection.max_dofs_per_vertex() +
2582 28 * this->fe_collection.max_dofs_per_line() +
2583 8 * this->fe_collection.max_dofs_per_quad());
2592template <
int dim,
int spacedim>
2596 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2603template <
int dim,
int spacedim>
2606 const std::vector<types::fe_index> &active_fe_indices)
2608 Assert(active_fe_indices.size() == this->get_triangulation().n_active_cells(),
2610 this->get_triangulation().n_active_cells()));
2612 this->create_active_fe_table();
2617 for (
const auto &cell : this->active_cell_iterators())
2618 if (cell->is_locally_owned())
2619 cell->set_active_fe_index(active_fe_indices[cell->active_cell_index()]);
2624template <
int dim,
int spacedim>
2627 const std::vector<unsigned int> &active_fe_indices)
2629 set_active_fe_indices(std::vector<types::fe_index>(active_fe_indices.begin(),
2630 active_fe_indices.end()));
2635template <
int dim,
int spacedim>
2640 std::vector<types::fe_index> active_fe_indices(
2646 for (
const auto &cell : this->active_cell_iterators())
2647 if (!cell->is_artificial())
2648 active_fe_indices[cell->active_cell_index()] = cell->active_fe_index();
2650 return active_fe_indices;
2655template <
int dim,
int spacedim>
2658 std::vector<unsigned int> &active_fe_indices)
const
2662 active_fe_indices.assign(indices.begin(), indices.end());
2667template <
int dim,
int spacedim>
2670 const std::vector<types::fe_index> &future_fe_indices)
2672 Assert(future_fe_indices.size() == this->get_triangulation().n_active_cells(),
2674 this->get_triangulation().n_active_cells()));
2676 this->create_active_fe_table();
2681 for (
const auto &cell : this->active_cell_iterators())
2682 if (cell->is_locally_owned() &&
2683 future_fe_indices[cell->active_cell_index()] !=
2685 cell->set_future_fe_index(future_fe_indices[cell->active_cell_index()]);
2690template <
int dim,
int spacedim>
2695 std::vector<types::fe_index> future_fe_indices(
2701 for (
const auto &cell : this->active_cell_iterators())
2702 if (cell->is_locally_owned() && cell->future_fe_index_set())
2703 future_fe_indices[cell->active_cell_index()] = cell->future_fe_index();
2705 return future_fe_indices;
2710template <
int dim,
int spacedim>
2715 Assert(hp_capability_enabled, ExcOnlyAvailableWithHP());
2718 this->tria_listeners.push_back(this->tria->
signals.
create.connect(
2719 [
this]() { this->reinit(*(this->tria)); }));
2720 this->tria_listeners.push_back(
2721 this->tria->
signals.
clear.connect([
this]() { this->clear(); }));
2726 const ::parallel::fullydistributed::Triangulation<dim, spacedim>
2727 *
>(&this->get_triangulation()))
2731 else if (
dynamic_cast<
2732 const ::parallel::distributed::Triangulation<dim, spacedim>
2733 *
>(&this->get_triangulation()))
2736 this->tria_listeners_for_transfer.push_back(
2738 internal::hp::DoFHandlerImplementation::Implementation::
2739 ensure_absence_of_future_fe_indices<dim, spacedim>(*this);
2741 this->tria_listeners_for_transfer.push_back(
2743 [
this]() { this->pre_distributed_transfer_action(); }));
2744 this->tria_listeners_for_transfer.push_back(
2746 [
this]() { this->post_distributed_transfer_action(); }));
2749 this->tria_listeners_for_transfer.push_back(
2751 [
this]() { this->pre_distributed_transfer_action(); }));
2752 this->tria_listeners_for_transfer.push_back(
2754 [
this]() { this->post_distributed_transfer_action(); }));
2757 this->tria_listeners_for_transfer.push_back(
2759 [
this]() { this->active_fe_index_transfer.reset(); }));
2760 this->tria_listeners_for_transfer.push_back(
2762 [
this]() { this->update_active_fe_table(); }));
2764 else if (
dynamic_cast<
2765 const ::parallel::shared::Triangulation<dim, spacedim> *
>(
2766 &this->get_triangulation()) !=
nullptr)
2769 this->tria_listeners_for_transfer.push_back(
2771 internal::hp::DoFHandlerImplementation::Implementation::
2772 ensure_absence_of_future_fe_indices(*this);
2776 this->tria_listeners_for_transfer.push_back(
2778 [
this]() { this->pre_transfer_action(); }));
2779 this->tria_listeners_for_transfer.push_back(
2781 [
this]() { this->post_transfer_action(); }));
2786 this->tria_listeners_for_transfer.push_back(
2788 [
this]() { this->pre_transfer_action(); }));
2789 this->tria_listeners_for_transfer.push_back(
2791 [
this]() { this->post_transfer_action(); }));
2797template <
int dim,
int spacedim>
2801 AssertThrow(hp_capability_enabled ==
true, ExcOnlyAvailableWithHP());
2808 this->hp_cell_active_fe_indices.resize(this->tria->
n_levels());
2809 this->hp_cell_future_fe_indices.resize(this->tria->
n_levels());
2813 for (
unsigned int level = 0;
level < this->hp_cell_future_fe_indices.size();
2816 if (this->hp_cell_active_fe_indices[
level].empty() &&
2817 this->hp_cell_future_fe_indices[
level].empty())
2819 this->hp_cell_active_fe_indices[
level].resize(
2821 this->hp_cell_future_fe_indices[
level].resize(
2831 this->hp_cell_future_fe_indices[
level].size() ==
2832 this->tria->n_raw_cells(
level),
2848template <
int dim,
int spacedim>
2864 this->hp_cell_active_fe_indices.resize(this->tria->
n_levels());
2865 this->hp_cell_active_fe_indices.shrink_to_fit();
2867 this->hp_cell_future_fe_indices.resize(this->tria->
n_levels());
2868 this->hp_cell_future_fe_indices.shrink_to_fit();
2870 for (
unsigned int i = 0; i < this->hp_cell_future_fe_indices.size(); ++i)
2873 this->hp_cell_active_fe_indices[i].resize(this->tria->
n_raw_cells(i), 0);
2880 this->hp_cell_future_fe_indices[i].assign(this->tria->
n_raw_cells(i),
2886template <
int dim,
int spacedim>
2892 this->active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
2903template <
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(
2941 for (
const auto &cell : active_cell_iterators())
2942 if (cell->is_artificial() == false)
2943 active_fe_index_transfer->active_fe_indices[cell->active_cell_index()] =
2944 ::
internal::DoFCellAccessorImplementation::Implementation::
2945 future_fe_index<dim, spacedim, false>(*cell);
2948 const auto *distributed_tria =
2950 &this->get_triangulation());
2952 active_fe_index_transfer->cell_data_transfer = std::make_unique<
2953 parallel::distributed::
2954 CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
2958 &::AdaptationStrategies::Refinement::
2959 preserve<dim, spacedim, types::fe_index>,
2962 const std::vector<types::fe_index> &children_fe_indices)
2964 return ::internal::hp::DoFHandlerImplementation::Implementation::
2965 determine_fe_from_children<dim, spacedim>(parent,
2966 children_fe_indices,
2970 active_fe_index_transfer->cell_data_transfer
2971 ->prepare_for_coarsening_and_refinement(
2972 active_fe_index_transfer->active_fe_indices);
2978template <
int dim,
int spacedim>
2982 update_active_fe_table();
2996 this->active_fe_index_transfer.reset();
3001template <
int dim,
int spacedim>
3005# ifndef DEAL_II_WITH_P4EST
3008 update_active_fe_table();
3013 this->active_fe_index_transfer->active_fe_indices.resize(
3015 this->active_fe_index_transfer->cell_data_transfer->unpack(
3016 this->active_fe_index_transfer->active_fe_indices);
3019 this->set_active_fe_indices(
3020 this->active_fe_index_transfer->active_fe_indices);
3027 this->active_fe_index_transfer.reset();
3033template <
int dim,
int spacedim>
3037# ifndef DEAL_II_WITH_P4EST
3040 "You are attempting to use a functionality that is only available "
3041 "if deal.II was configured to use p4est, but cmake did not find a "
3042 "valid p4est library."));
3047 &this->get_triangulation()) !=
nullptr),
3052 active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
3055 const auto *distributed_tria =
3057 &this->get_triangulation());
3059 active_fe_index_transfer->cell_data_transfer = std::make_unique<
3060 parallel::distributed::
3061 CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
3065 &::AdaptationStrategies::Refinement::
3066 preserve<dim, spacedim, types::fe_index>,
3069 const std::vector<types::fe_index> &children_fe_indices)
3071 return ::internal::hp::DoFHandlerImplementation::Implementation::
3072 determine_fe_from_children<dim, spacedim>(parent,
3073 children_fe_indices,
3084 active_fe_index_transfer->cell_data_transfer->prepare_for_serialization(
3085 active_fe_index_transfer->active_fe_indices);
3091template <
int dim,
int spacedim>
3095# ifndef DEAL_II_WITH_P4EST
3098 "You are attempting to use a functionality that is only available "
3099 "if deal.II was configured to use p4est, but cmake did not find a "
3100 "valid p4est library."));
3105 &this->get_triangulation()) !=
nullptr),
3110 active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
3113 const auto *distributed_tria =
3115 &this->get_triangulation());
3117 active_fe_index_transfer->cell_data_transfer = std::make_unique<
3118 parallel::distributed::
3119 CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
3123 &::AdaptationStrategies::Refinement::
3124 preserve<dim, spacedim, types::fe_index>,
3127 const std::vector<types::fe_index> &children_fe_indices)
3129 return ::internal::hp::DoFHandlerImplementation::Implementation::
3130 determine_fe_from_children<dim, spacedim>(parent,
3131 children_fe_indices,
3136 active_fe_index_transfer->active_fe_indices.resize(
3138 active_fe_index_transfer->cell_data_transfer->deserialize(
3139 active_fe_index_transfer->active_fe_indices);
3142 set_active_fe_indices(active_fe_index_transfer->active_fe_indices);
3149 active_fe_index_transfer.reset();
3155template <
int dim,
int spacedim>
3164template <
int dim,
int spacedim>
3167 const unsigned int cl,
3168 const unsigned int fl,
3169 const unsigned int dofs_per_vertex)
3171 coarsest_level = cl;
3174 if (coarsest_level <= finest_level)
3176 const unsigned int n_levels = finest_level - coarsest_level + 1;
3177 const unsigned int n_indices = n_levels * dofs_per_vertex;
3179 indices = std::make_unique<types::global_dof_index[]>(n_indices);
3180 std::fill(indices.get(),
3181 indices.get() + n_indices,
3190template <
int dim,
int spacedim>
3194 return coarsest_level;
3199template <
int dim,
int spacedim>
3203 return finest_level;
3207#include "dofs/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
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
ObserverPointer< const Triangulation< dim, spacedim >, DoFHandler< dim, spacedim > > tria
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
unsigned int n_raw_lines() const
unsigned int n_raw_faces() const
unsigned int n_levels() 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 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
constexpr LibraryBuildMode library_build_mode
#define DEAL_II_NAMESPACE_OPEN
constexpr bool running_in_debug_mode()
#define DEAL_II_CXX20_REQUIRES(condition)
#define DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_ASSERT_UNREACHABLE()
#define DEAL_II_NOT_IMPLEMENTED()
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)
@ valid
Iterator points to a valid object.
std::enable_if_t< std::is_fundamental_v< T >, std::size_t > memory_consumption(const T &t)
VectorType::value_type * end(VectorType &V)
VectorType::value_type * begin(VectorType &V)
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)
constexpr types::global_dof_index invalid_dof_index
constexpr unsigned int invalid_unsigned_int
constexpr types::boundary_id internal_face_boundary_id
constexpr types::fe_index invalid_fe_index
::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)