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;
718 if (locally_used_vertices[v] ==
true)
723 if (vertex_fe_association[fe][v] ==
true)
730 const unsigned int d = 0;
731 const unsigned int l = 0;
741 unsigned int vertex_slots_needed = 0;
742 unsigned int fe_slots_needed = 0;
750 for (
unsigned int fe = 0;
753 if (vertex_fe_association[fe][v] ==
true)
756 vertex_slots_needed +=
774 if (vertex_fe_association[fe][v] ==
true)
780 for (
unsigned int i = 0;
781 i < dof_handler.
get_fe(fe).n_dofs_per_vertex();
811 template <
int dim,
int spacedim>
828 std::vector<typename DoFHandler<dim, spacedim>::offset_type>(
836 if (cell->is_active() && !cell->is_artificial())
841 cell->get_fe().template n_dofs_per_object<dim>();
845 std::vector<types::global_dof_index>(
856 template <
int dim,
int spacedim>
877 std::vector<bool> face_touched(dim == 2 ?
881 const unsigned int d = dim - 1;
882 const unsigned int l = 0;
894 unsigned int n_face_slots = 0;
897 if (!cell->is_artificial())
898 for (
const auto face : cell->face_indices())
899 if (!face_touched[cell->face(face)->index()])
901 unsigned int fe_slots_needed = 0;
903 if (cell->at_boundary(face) ||
904 cell->face(face)->has_children() ||
905 cell->neighbor_is_coarser(face) ||
906 (!cell->at_boundary(face) &&
907 cell->neighbor(face)->is_artificial()) ||
908 (!cell->at_boundary(face) &&
909 !cell->neighbor(face)->is_artificial() &&
910 (cell->active_fe_index() ==
911 cell->neighbor(face)->active_fe_index())))
915 dof_handler.
get_fe(cell->active_fe_index())
916 .
template n_dofs_per_object<dim - 1>(face);
922 dof_handler.
get_fe(cell->active_fe_index())
923 .
template n_dofs_per_object<dim - 1>(face) +
925 .
get_fe(cell->neighbor(face)->active_fe_index())
926 .
template n_dofs_per_object<dim - 1>(
927 cell->neighbor_face_no(face));
931 face_touched[cell->face(face)->index()] =
true;
955 face_touched = std::vector<bool>(face_touched.size());
958 if (!cell->is_artificial())
959 for (
const auto face : cell->face_indices())
960 if (!face_touched[cell->face(face)->index()])
963 if (cell->at_boundary(face) ||
964 cell->face(face)->has_children() ||
965 cell->neighbor_is_coarser(face) ||
966 (!cell->at_boundary(face) &&
967 cell->neighbor(face)->is_artificial()) ||
968 (!cell->at_boundary(face) &&
969 !cell->neighbor(face)->is_artificial() &&
970 (cell->active_fe_index() ==
971 cell->neighbor(face)->active_fe_index())))
974 const unsigned int n_dofs =
976 .template n_dofs_per_object<dim - 1>(face);
977 const unsigned int offset =
984 for (
unsigned int i = 0; i < n_dofs; ++i)
991 unsigned int face_no_1 = face;
993 cell->neighbor(face)->active_fe_index();
994 unsigned int face_no_2 = cell->neighbor_face_no(face);
998 std::swap(fe_1, fe_2);
999 std::swap(face_no_1, face_no_2);
1002 const unsigned int n_dofs_1 =
1004 .template n_dofs_per_object<dim - 1>(face_no_1);
1006 const unsigned int n_dofs_2 =
1008 .template n_dofs_per_object<dim - 1>(face_no_2);
1010 const unsigned int offset =
1015 cell->active_fe_index());
1029 for (
unsigned int i = 0; i < n_dofs_1 + n_dofs_2; ++i)
1035 face_touched[cell->face(face)->index()] =
true;
1038 for (
unsigned int i = 1;
1054 template <
int spacedim>
1061 ExcMessage(
"The current Triangulation must not be empty."));
1079 template <
int spacedim>
1086 ExcMessage(
"The current Triangulation must not be empty."));
1106 template <
int spacedim>
1113 ExcMessage(
"The current Triangulation must not be empty."));
1142 std::vector<std::vector<bool>> line_fe_association(
1147 if (!cell->is_artificial())
1148 for (
const auto l : cell->line_indices())
1149 line_fe_association[cell->active_fe_index()]
1150 [cell->line_index(l)] =
true;
1162 if (line_fe_association[fe][line] ==
true)
1164 line_is_used[line] =
true;
1170 const unsigned int d = 1;
1171 const unsigned int l = 0;
1181 unsigned int line_slots_needed = 0;
1182 unsigned int fe_slots_needed = 0;
1189 if (line_is_used[line] ==
true)
1191 for (
unsigned int fe = 0;
1194 if (line_fe_association[fe][line] ==
true)
1197 line_slots_needed +=
1216 if (line_is_used[line] ==
true)
1218 for (
unsigned int fe = 0;
1221 if (line_fe_association[fe][line] ==
true)
1227 for (
unsigned int i = 0;
1228 i < dof_handler.
get_fe(fe).n_dofs_per_line();
1242 fe_slots_needed + 1);
1264 template <
int dim,
int spacedim>
1272 if (const ::parallel::shared::Triangulation<dim, spacedim> *tr =
1274 const ::parallel::shared::Triangulation<dim, spacedim>
1287 std::vector<types::fe_index> active_fe_indices(
1288 tr->n_active_cells(), 0u);
1290 if (cell->is_locally_owned())
1291 active_fe_indices[cell->active_cell_index()] =
1292 cell->active_fe_index();
1295 tr->get_communicator(),
1305 if (!cell->is_locally_owned())
1307 .hp_cell_active_fe_indices[cell->level()][cell->index()] =
1308 active_fe_indices[cell->active_cell_index()];
1310 else if (const ::parallel::
1311 DistributedTriangulationBase<dim, spacedim> *tr =
1314 DistributedTriangulationBase<dim, spacedim> *
>(
1327 return cell->active_fe_index();
1353 const ::parallel::TriangulationBase<dim, spacedim> *
>(
1374 template <
int dim,
int spacedim>
1382 if (const ::parallel::shared::Triangulation<dim, spacedim> *tr =
1384 const ::parallel::shared::Triangulation<dim, spacedim>
1387 std::vector<types::fe_index> future_fe_indices(
1388 tr->n_active_cells(), 0u);
1391 future_fe_indices[cell->active_cell_index()] =
1396 tr->get_communicator(),
1400 if (!cell->is_locally_owned())
1402 .hp_cell_future_fe_indices[cell->level()][cell->index()] =
1403 future_fe_indices[cell->active_cell_index()];
1405 else if (const ::parallel::
1406 DistributedTriangulationBase<dim, spacedim> *tr =
1409 DistributedTriangulationBase<dim, spacedim> *
>(
1438 const ::parallel::TriangulationBase<dim, spacedim> *
>(
1466 template <
int dim,
int spacedim>
1474 if (cell->is_locally_owned())
1476 if (cell->refine_flag_set())
1481 fe_transfer->refined_cells_fe_index.insert(
1482 {cell, cell->future_fe_index()});
1484 else if (cell->coarsen_flag_set())
1491 const auto &parent = cell->parent();
1495 if (fe_transfer->coarsened_cells_fe_index.find(parent) ==
1496 fe_transfer->coarsened_cells_fe_index.end())
1503 for (
const auto &child : parent->child_iterators())
1504 Assert(child->is_active() &&
1505 child->coarsen_flag_set(),
1506 typename ::Triangulation<
1507 dim>::ExcInconsistentCoarseningFlags());
1515 fe_transfer->coarsened_cells_fe_index.insert(
1516 {parent, fe_index});
1524 if (cell->future_fe_index_set() ==
true)
1525 fe_transfer->persisting_cells_fe_index.insert(
1526 {cell, cell->future_fe_index()});
1537 template <
int dim,
int spacedim>
1545 for (
const auto &persist : fe_transfer->persisting_cells_fe_index)
1547 const auto &cell = persist.first;
1549 if (cell->is_locally_owned())
1552 cell->set_active_fe_index(persist.second);
1558 for (
const auto &refine : fe_transfer->refined_cells_fe_index)
1560 const auto &parent = refine.first;
1562 for (
const auto &child : parent->child_iterators())
1563 if (child->is_locally_owned())
1566 child->set_active_fe_index(refine.second);
1572 for (
const auto &coarsen : fe_transfer->coarsened_cells_fe_index)
1574 const auto &cell = coarsen.first;
1576 if (cell->is_locally_owned())
1579 cell->set_active_fe_index(coarsen.second);
1595 template <
int dim,
int spacedim>
1599 const std::vector<types::fe_index> &children_fe_indices,
1600 const ::hp::FECollection<dim, spacedim> &fe_collection)
1606 const std::set<unsigned int> children_fe_indices_set(
1607 children_fe_indices.begin(), children_fe_indices.end());
1610 fe_collection.find_dominated_fe_extended(children_fe_indices_set,
1616 return dominated_fe_index;
1627 template <
int dim,
int spacedim>
1633 !parent->is_active(),
1635 "You ask for information on children of this cell which is only "
1636 "available for active cells. This cell has no children."));
1638 const auto &dof_handler = parent->get_dof_handler();
1640 dof_handler.has_hp_capabilities(),
1644 std::set<unsigned int> future_fe_indices_children;
1645 for (
const auto &child : parent->child_iterators())
1650 "You ask for information on children of this cell which is only "
1651 "available for active cells. One of its children is not active."));
1660 ::internal::DoFCellAccessorImplementation::
1661 Implementation::future_fe_index<dim, spacedim, false>(*child);
1663 future_fe_indices_children.insert(future_fe_index_child);
1668 dof_handler.fe_collection.find_dominated_fe_extended(
1669 future_fe_indices_children,
1675 return future_fe_index;
1684 template <
int dim,
int spacedim>
1697 template <
int dim,
int spacedim>
1711template <
int dim,
int spacedim>
1714 : hp_capability_enabled(true)
1715 , tria(nullptr, typeid(*this).name())
1721template <
int dim,
int spacedim>
1731template <
int dim,
int spacedim>
1736 for (
auto &connection : this->tria_listeners)
1737 connection.disconnect();
1738 this->tria_listeners.clear();
1740 for (
auto &connection : this->tria_listeners_for_transfer)
1741 connection.disconnect();
1742 this->tria_listeners_for_transfer.clear();
1753 this->policy.reset();
1758template <
int dim,
int spacedim>
1766 for (
auto &connection : this->tria_listeners)
1767 connection.disconnect();
1768 this->tria_listeners.clear();
1770 for (
auto &connection : this->tria_listeners_for_transfer)
1771 connection.disconnect();
1772 this->tria_listeners_for_transfer.clear();
1776 this->policy.reset();
1786 this->setup_policy();
1789 hp_capability_enabled =
true;
1790 this->connect_to_triangulation_signals();
1791 this->create_active_fe_table();
1797template <
int dim,
int spacedim>
1803 this->get_triangulation().begin(
level);
1804 if (cell == this->get_triangulation().
end(
level))
1806 return cell_iterator(*cell,
this);
1811template <
int dim,
int spacedim>
1820 while (i->has_children())
1828template <
int dim,
int spacedim>
1833 return cell_iterator(&this->get_triangulation(), -1, -1,
this);
1838template <
int dim,
int spacedim>
1844 this->get_triangulation().end(
level);
1847 return cell_iterator(*cell,
this);
1852template <
int dim,
int spacedim>
1858 this->get_triangulation().end_active(
level);
1860 return active_cell_iterator(
end());
1861 return active_cell_iterator(*cell,
this);
1866template <
int dim,
int spacedim>
1871 Assert(this->has_level_dofs(),
1873 "levels if mg dofs got distributed."));
1875 this->get_triangulation().begin(
level);
1876 if (cell == this->get_triangulation().
end(
level))
1877 return end_mg(
level);
1878 return level_cell_iterator(*cell,
this);
1883template <
int dim,
int spacedim>
1888 Assert(this->has_level_dofs(),
1890 "levels if mg dofs got distributed."));
1892 this->get_triangulation().end(
level);
1895 return level_cell_iterator(*cell,
this);
1900template <
int dim,
int spacedim>
1905 return level_cell_iterator(&this->get_triangulation(), -1, -1,
this);
1910template <
int dim,
int spacedim>
1914 spacedim>::cell_iterators()
const
1922template <
int dim,
int spacedim>
1935template <
int dim,
int spacedim>
1942 begin_mg(), end_mg());
1947template <
int dim,
int spacedim>
1951 spacedim>::cell_iterators_on_level(
const unsigned int level)
const
1959template <
int dim,
int spacedim>
1972template <
int dim,
int spacedim>
1988template <
int dim,
int spacedim>
1992 Assert(!(dim == 2 && spacedim == 3) || hp_capability_enabled ==
false,
1993 ExcNotImplementedWithHP());
1995 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
1997 std::unordered_set<types::global_dof_index> boundary_dofs;
1998 std::vector<types::global_dof_index> dofs_on_face;
1999 dofs_on_face.reserve(this->get_fe_collection().max_dofs_per_face());
2001 const IndexSet &owned_dofs = locally_owned_dofs();
2008 for (
const auto &cell : this->active_cell_iterators())
2009 if (cell->is_locally_owned() && cell->at_boundary())
2011 for (
const auto iface : cell->face_indices())
2013 const auto face = cell->face(iface);
2014 if (face->at_boundary())
2016 const unsigned int dofs_per_face =
2017 cell->get_fe().n_dofs_per_face(iface);
2018 dofs_on_face.resize(dofs_per_face);
2020 face->get_dof_indices(dofs_on_face, cell->active_fe_index());
2021 for (
unsigned int i = 0; i < dofs_per_face; ++i)
2023 const unsigned int global_idof_index = dofs_on_face[i];
2024 if (owned_dofs.
is_element(global_idof_index))
2026 boundary_dofs.insert(global_idof_index);
2032 return boundary_dofs.size();
2037template <
int dim,
int spacedim>
2040 const std::set<types::boundary_id> &boundary_ids)
const
2042 Assert(!(dim == 2 && spacedim == 3) || hp_capability_enabled ==
false,
2043 ExcNotImplementedWithHP());
2045 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2048 ExcInvalidBoundaryIndicator());
2052 std::unordered_set<types::global_dof_index> boundary_dofs;
2053 std::vector<types::global_dof_index> dofs_on_face;
2054 dofs_on_face.reserve(this->get_fe_collection().max_dofs_per_face());
2056 const IndexSet &owned_dofs = locally_owned_dofs();
2058 for (
const auto &cell : this->active_cell_iterators())
2059 if (cell->is_locally_owned() && cell->at_boundary())
2061 for (
const auto iface : cell->face_indices())
2063 const auto face = cell->face(iface);
2064 const unsigned int boundary_id = face->boundary_id();
2065 if (face->at_boundary() &&
2066 (boundary_ids.find(boundary_id) != boundary_ids.end()))
2068 const unsigned int dofs_per_face =
2069 cell->get_fe().n_dofs_per_face(iface);
2070 dofs_on_face.resize(dofs_per_face);
2072 face->get_dof_indices(dofs_on_face, cell->active_fe_index());
2073 for (
unsigned int i = 0; i < dofs_per_face; ++i)
2075 const unsigned int global_idof_index = dofs_on_face[i];
2076 if (owned_dofs.
is_element(global_idof_index))
2078 boundary_dofs.insert(global_idof_index);
2084 return boundary_dofs.size();
2089template <
int dim,
int spacedim>
2105 if (hp_capability_enabled)
2118 if (this->mg_faces !=
nullptr)
2121 for (
unsigned int i = 0; i < this->mg_vertex_dofs.size(); ++i)
2122 mem +=
sizeof(MGVertexDoFs) +
2123 (1 + this->mg_vertex_dofs[i].get_finest_level() -
2124 this->mg_vertex_dofs[i].get_coarsest_level()) *
2133template <
int dim,
int spacedim>
2143template <
int dim,
int spacedim>
2148 Assert(this->tria !=
nullptr,
2150 "You need to set the Triangulation in the DoFHandler using reinit() "
2151 "or in the constructor before you can distribute DoFs."));
2153 ExcMessage(
"The Triangulation you are using is empty!"));
2157 Assert((ff.
size() <= std::numeric_limits<types::fe_index>::max()) &&
2159 ExcMessage(
"The given hp::FECollection contains more finite elements "
2160 "than the DoFHandler can cover with active FE indices."));
2165 if ((hp_cell_active_fe_indices.size() > 0) &&
2166 (hp_cell_future_fe_indices.size() > 0))
2170 for (
const auto &cell :
2174 ExcInvalidFEIndex(cell->active_fe_index(), ff.
size()));
2176 ExcInvalidFEIndex(cell->future_fe_index(), ff.
size()));
2185 if (this->fe_collection != ff)
2189 const bool contains_multiple_fes = (this->fe_collection.size() > 1);
2192 if (hp_capability_enabled && !contains_multiple_fes)
2194 hp_capability_enabled =
false;
2198 for (
auto &connection : this->tria_listeners_for_transfer)
2199 connection.disconnect();
2200 this->tria_listeners_for_transfer.clear();
2203 this->hp_cell_active_fe_indices.clear();
2204 this->hp_cell_active_fe_indices.shrink_to_fit();
2205 this->hp_cell_future_fe_indices.clear();
2206 this->hp_cell_future_fe_indices.shrink_to_fit();
2212 hp_capability_enabled || !contains_multiple_fes,
2214 "You cannot re-enable hp-capabilities after you registered a single "
2215 "finite element. Please call reinit() or create a new DoFHandler "
2216 "object instead."));
2222 if (hp_capability_enabled)
2240 subdomain_modifier(this->get_triangulation());
2249 if (hp_capability_enabled)
2257 this->number_cache = this->policy->distribute_dofs();
2274 if (!hp_capability_enabled &&
2276 *
>(&*this->tria) ==
nullptr)
2277 this->block_info_object.initialize(*
this,
false,
true);
2282template <
int dim,
int spacedim>
2286 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2289 this->object_dof_indices.size() > 0,
2291 "Distribute active DoFs using distribute_dofs() before calling distribute_mg_dofs()."));
2298 "The mesh smoothing requirement 'limit_level_difference_at_vertices' has to be set for using multigrid!"));
2300 this->clear_mg_space();
2303 this->mg_number_cache = this->policy->distribute_mg_dofs();
2308 &*this->tria) ==
nullptr)
2309 this->block_info_object.initialize(*
this,
true,
false);
2314template <
int dim,
int spacedim>
2318 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2320 this->block_info_object.initialize_local(*
this);
2325template <
int dim,
int spacedim>
2330 if (
dynamic_cast<const ::parallel::shared::Triangulation<dim, spacedim>
2331 *
>(&this->get_triangulation()) !=
nullptr)
2332 this->policy = std::make_unique<internal::DoFHandlerImplementation::Policy::
2333 ParallelShared<dim, spacedim>>(*this);
2334 else if (
dynamic_cast<
2335 const ::parallel::DistributedTriangulationBase<dim, spacedim>
2336 *
>(&this->get_triangulation()) ==
nullptr)
2337 this->policy = std::make_unique<
2342 std::make_unique<internal::DoFHandlerImplementation::Policy::
2343 ParallelDistributed<dim, spacedim>>(*this);
2348template <
int dim,
int spacedim>
2353 this->clear_space();
2354 this->clear_mg_space();
2359template <
int dim,
int spacedim>
2363 object_dof_indices.clear();
2365 object_dof_ptr.clear();
2367 this->number_cache.clear();
2369 this->hp_cell_active_fe_indices.clear();
2370 this->hp_cell_future_fe_indices.clear();
2375template <
int dim,
int spacedim>
2379 this->mg_levels.clear();
2380 this->mg_faces.reset();
2382 std::vector<MGVertexDoFs> tmp;
2384 std::swap(this->mg_vertex_dofs, tmp);
2386 this->mg_number_cache.clear();
2391template <
int dim,
int spacedim>
2394 const std::vector<types::global_dof_index> &new_numbers)
2396 if (hp_capability_enabled)
2398 Assert(this->hp_cell_future_fe_indices.size() > 0,
2400 "You need to distribute DoFs before you can renumber them."));
2409 if (this->n_locally_owned_dofs() == this->n_dofs())
2411 std::vector<types::global_dof_index> tmp(new_numbers);
2412 std::sort(tmp.begin(), tmp.end());
2413 std::vector<types::global_dof_index>::const_iterator p = tmp.begin();
2415 for (; p != tmp.end(); ++p, ++i)
2416 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2419 for (
const auto new_number : new_numbers)
2420 Assert(new_number < this->n_dofs(),
2422 "New DoF index is not less than the total number of dofs."));
2439 this->number_cache = this->policy->renumber_dofs(new_numbers);
2454 Assert(this->object_dof_indices.size() > 0,
2456 "You need to distribute DoFs before you can renumber them."));
2460 &*this->tria) !=
nullptr)
2462 Assert(new_numbers.size() == this->n_dofs() ||
2463 new_numbers.size() == this->n_locally_owned_dofs(),
2464 ExcMessage(
"Incorrect size of the input array."));
2466 else if (
dynamic_cast<
2468 &*this->tria) !=
nullptr)
2481 if (this->n_locally_owned_dofs() == this->n_dofs())
2483 std::vector<types::global_dof_index> tmp(new_numbers);
2484 std::sort(tmp.begin(), tmp.end());
2485 std::vector<types::global_dof_index>::const_iterator p = tmp.begin();
2487 for (; p != tmp.end(); ++p, ++i)
2488 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2491 for (
const auto new_number : new_numbers)
2492 Assert(new_number < this->n_dofs(),
2494 "New DoF index is not less than the total number of dofs."));
2497 this->number_cache = this->policy->renumber_dofs(new_numbers);
2503template <
int dim,
int spacedim>
2506 const unsigned int level,
2507 const std::vector<types::global_dof_index> &new_numbers)
2509 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2512 this->mg_levels.size() > 0 && this->object_dof_indices.size() > 0,
2514 "You need to distribute active and level DoFs before you can renumber level DoFs."));
2517 this->locally_owned_mg_dofs(
level).n_elements());
2524 if (this->n_locally_owned_dofs() == this->n_dofs())
2526 std::vector<types::global_dof_index> tmp(new_numbers);
2527 std::sort(tmp.begin(), tmp.end());
2528 std::vector<types::global_dof_index>::const_iterator p = tmp.begin();
2530 for (; p != tmp.end(); ++p, ++i)
2531 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2534 for (
const auto new_number : new_numbers)
2537 "New DoF index is not less than the total number of dofs."));
2540 this->mg_number_cache[
level] =
2541 this->policy->renumber_mg_dofs(
level, new_numbers);
2546template <
int dim,
int spacedim>
2551 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2556 return this->fe_collection.max_dofs_per_vertex();
2558 return (3 * this->fe_collection.max_dofs_per_vertex() +
2559 2 * this->fe_collection.max_dofs_per_line());
2570 return (19 * this->fe_collection.max_dofs_per_vertex() +
2571 28 * this->fe_collection.max_dofs_per_line() +
2572 8 * this->fe_collection.max_dofs_per_quad());
2581template <
int dim,
int spacedim>
2585 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2592template <
int dim,
int spacedim>
2595 const std::vector<types::fe_index> &active_fe_indices)
2597 Assert(active_fe_indices.size() == this->get_triangulation().n_active_cells(),
2599 this->get_triangulation().n_active_cells()));
2601 this->create_active_fe_table();
2606 for (
const auto &cell : this->active_cell_iterators())
2607 if (cell->is_locally_owned())
2608 cell->set_active_fe_index(active_fe_indices[cell->active_cell_index()]);
2613template <
int dim,
int spacedim>
2616 const std::vector<unsigned int> &active_fe_indices)
2618 set_active_fe_indices(std::vector<types::fe_index>(active_fe_indices.begin(),
2619 active_fe_indices.end()));
2624template <
int dim,
int spacedim>
2629 std::vector<types::fe_index> active_fe_indices(
2635 for (
const auto &cell : this->active_cell_iterators())
2636 if (!cell->is_artificial())
2637 active_fe_indices[cell->active_cell_index()] = cell->active_fe_index();
2639 return active_fe_indices;
2644template <
int dim,
int spacedim>
2647 std::vector<unsigned int> &active_fe_indices)
const
2651 active_fe_indices.assign(indices.begin(), indices.end());
2656template <
int dim,
int spacedim>
2659 const std::vector<types::fe_index> &future_fe_indices)
2661 Assert(future_fe_indices.size() == this->get_triangulation().n_active_cells(),
2663 this->get_triangulation().n_active_cells()));
2665 this->create_active_fe_table();
2670 for (
const auto &cell : this->active_cell_iterators())
2671 if (cell->is_locally_owned() &&
2672 future_fe_indices[cell->active_cell_index()] !=
2674 cell->set_future_fe_index(future_fe_indices[cell->active_cell_index()]);
2679template <
int dim,
int spacedim>
2684 std::vector<types::fe_index> future_fe_indices(
2690 for (
const auto &cell : this->active_cell_iterators())
2691 if (cell->is_locally_owned() && cell->future_fe_index_set())
2692 future_fe_indices[cell->active_cell_index()] = cell->future_fe_index();
2694 return future_fe_indices;
2699template <
int dim,
int spacedim>
2704 Assert(hp_capability_enabled, ExcOnlyAvailableWithHP());
2707 this->tria_listeners.push_back(this->tria->
signals.
create.connect(
2708 [
this]() { this->reinit(*(this->tria)); }));
2709 this->tria_listeners.push_back(
2710 this->tria->
signals.
clear.connect([
this]() { this->clear(); }));
2715 const ::parallel::fullydistributed::Triangulation<dim, spacedim>
2716 *
>(&this->get_triangulation()))
2720 else if (
dynamic_cast<
2721 const ::parallel::distributed::Triangulation<dim, spacedim>
2722 *
>(&this->get_triangulation()))
2725 this->tria_listeners_for_transfer.push_back(
2727 internal::hp::DoFHandlerImplementation::Implementation::
2728 ensure_absence_of_future_fe_indices<dim, spacedim>(*this);
2730 this->tria_listeners_for_transfer.push_back(
2732 [
this]() { this->pre_distributed_transfer_action(); }));
2733 this->tria_listeners_for_transfer.push_back(
2735 [
this]() { this->post_distributed_transfer_action(); }));
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->active_fe_index_transfer.reset(); }));
2749 this->tria_listeners_for_transfer.push_back(
2751 [
this]() { this->update_active_fe_table(); }));
2753 else if (
dynamic_cast<
2754 const ::parallel::shared::Triangulation<dim, spacedim> *
>(
2755 &this->get_triangulation()) !=
nullptr)
2758 this->tria_listeners_for_transfer.push_back(
2760 internal::hp::DoFHandlerImplementation::Implementation::
2761 ensure_absence_of_future_fe_indices(*this);
2765 this->tria_listeners_for_transfer.push_back(
2767 [
this]() { this->pre_transfer_action(); }));
2768 this->tria_listeners_for_transfer.push_back(
2770 [
this]() { this->post_transfer_action(); }));
2775 this->tria_listeners_for_transfer.push_back(
2777 [
this]() { this->pre_transfer_action(); }));
2778 this->tria_listeners_for_transfer.push_back(
2780 [
this]() { this->post_transfer_action(); }));
2786template <
int dim,
int spacedim>
2790 AssertThrow(hp_capability_enabled ==
true, ExcOnlyAvailableWithHP());
2797 this->hp_cell_active_fe_indices.resize(this->tria->
n_levels());
2798 this->hp_cell_future_fe_indices.resize(this->tria->
n_levels());
2802 for (
unsigned int level = 0;
level < this->hp_cell_future_fe_indices.size();
2805 if (this->hp_cell_active_fe_indices[
level].empty() &&
2806 this->hp_cell_future_fe_indices[
level].empty())
2808 this->hp_cell_active_fe_indices[
level].resize(
2810 this->hp_cell_future_fe_indices[
level].resize(
2818 Assert(this->hp_cell_active_fe_indices[
level].size() ==
2820 this->hp_cell_future_fe_indices[
level].size() ==
2821 this->tria->n_raw_cells(
level),
2837template <
int dim,
int spacedim>
2853 this->hp_cell_active_fe_indices.resize(this->tria->
n_levels());
2854 this->hp_cell_active_fe_indices.shrink_to_fit();
2856 this->hp_cell_future_fe_indices.resize(this->tria->
n_levels());
2857 this->hp_cell_future_fe_indices.shrink_to_fit();
2859 for (
unsigned int i = 0; i < this->hp_cell_future_fe_indices.size(); ++i)
2862 this->hp_cell_active_fe_indices[i].resize(this->tria->
n_raw_cells(i), 0);
2869 this->hp_cell_future_fe_indices[i].assign(this->tria->
n_raw_cells(i),
2875template <
int dim,
int spacedim>
2881 this->active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
2892template <
int dim,
int spacedim>
2896# ifndef DEAL_II_WITH_P4EST
2899 "You are attempting to use a functionality that is only available "
2900 "if deal.II was configured to use p4est, but cmake did not find a "
2901 "valid p4est library."));
2906 &this->get_triangulation()) !=
nullptr),
2911 active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
2920 active_fe_index_transfer->active_fe_indices.resize(
2930 for (
const auto &cell : active_cell_iterators())
2931 if (cell->is_artificial() == false)
2932 active_fe_index_transfer->active_fe_indices[cell->active_cell_index()] =
2933 ::
internal::DoFCellAccessorImplementation::Implementation::
2934 future_fe_index<dim, spacedim, false>(*cell);
2937 const auto *distributed_tria =
2939 &this->get_triangulation());
2941 active_fe_index_transfer->cell_data_transfer = std::make_unique<
2942 parallel::distributed::
2943 CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
2947 &::AdaptationStrategies::Refinement::
2948 preserve<dim, spacedim, types::fe_index>,
2951 const std::vector<types::fe_index> &children_fe_indices)
2953 return ::internal::hp::DoFHandlerImplementation::Implementation::
2954 determine_fe_from_children<dim, spacedim>(parent,
2955 children_fe_indices,
2959 active_fe_index_transfer->cell_data_transfer
2960 ->prepare_for_coarsening_and_refinement(
2961 active_fe_index_transfer->active_fe_indices);
2967template <
int dim,
int spacedim>
2971 update_active_fe_table();
2985 this->active_fe_index_transfer.reset();
2990template <
int dim,
int spacedim>
2994# ifndef DEAL_II_WITH_P4EST
2997 update_active_fe_table();
3002 this->active_fe_index_transfer->active_fe_indices.resize(
3004 this->active_fe_index_transfer->cell_data_transfer->unpack(
3005 this->active_fe_index_transfer->active_fe_indices);
3008 this->set_active_fe_indices(
3009 this->active_fe_index_transfer->active_fe_indices);
3016 this->active_fe_index_transfer.reset();
3022template <
int dim,
int spacedim>
3026# ifndef DEAL_II_WITH_P4EST
3029 "You are attempting to use a functionality that is only available "
3030 "if deal.II was configured to use p4est, but cmake did not find a "
3031 "valid p4est library."));
3036 &this->get_triangulation()) !=
nullptr),
3041 active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
3044 const auto *distributed_tria =
3046 &this->get_triangulation());
3048 active_fe_index_transfer->cell_data_transfer = std::make_unique<
3049 parallel::distributed::
3050 CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
3054 &::AdaptationStrategies::Refinement::
3055 preserve<dim, spacedim, types::fe_index>,
3058 const std::vector<types::fe_index> &children_fe_indices)
3060 return ::internal::hp::DoFHandlerImplementation::Implementation::
3061 determine_fe_from_children<dim, spacedim>(parent,
3062 children_fe_indices,
3073 active_fe_index_transfer->cell_data_transfer->prepare_for_serialization(
3074 active_fe_index_transfer->active_fe_indices);
3080template <
int dim,
int spacedim>
3084# ifndef DEAL_II_WITH_P4EST
3087 "You are attempting to use a functionality that is only available "
3088 "if deal.II was configured to use p4est, but cmake did not find a "
3089 "valid p4est library."));
3094 &this->get_triangulation()) !=
nullptr),
3099 active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
3102 const auto *distributed_tria =
3104 &this->get_triangulation());
3106 active_fe_index_transfer->cell_data_transfer = std::make_unique<
3107 parallel::distributed::
3108 CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
3112 &::AdaptationStrategies::Refinement::
3113 preserve<dim, spacedim, types::fe_index>,
3116 const std::vector<types::fe_index> &children_fe_indices)
3118 return ::internal::hp::DoFHandlerImplementation::Implementation::
3119 determine_fe_from_children<dim, spacedim>(parent,
3120 children_fe_indices,
3125 active_fe_index_transfer->active_fe_indices.resize(
3127 active_fe_index_transfer->cell_data_transfer->deserialize(
3128 active_fe_index_transfer->active_fe_indices);
3131 set_active_fe_indices(active_fe_index_transfer->active_fe_indices);
3138 active_fe_index_transfer.reset();
3144template <
int dim,
int spacedim>
3147 : coarsest_level(
numbers::invalid_unsigned_int)
3153template <
int dim,
int spacedim>
3156 const unsigned int cl,
3157 const unsigned int fl,
3158 const unsigned int dofs_per_vertex)
3160 coarsest_level = cl;
3163 if (coarsest_level <= finest_level)
3165 const unsigned int n_levels = finest_level - coarsest_level + 1;
3166 const unsigned int n_indices = n_levels * dofs_per_vertex;
3168 indices = std::make_unique<types::global_dof_index[]>(n_indices);
3169 std::fill(indices.get(),
3170 indices.get() + n_indices,
3179template <
int dim,
int spacedim>
3183 return coarsest_level;
3188template <
int dim,
int spacedim>
3192 return finest_level;
3196#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
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
#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()
@ 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)
const types::boundary_id internal_face_boundary_id
const types::fe_index invalid_fe_index
const types::global_dof_index invalid_dof_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)