17#include <deal.II/base/mpi.templates.h>
20#include <deal.II/distributed/cell_data_transfer.templates.h>
38#include <unordered_set>
43template <
int dim,
int spacedim>
50 template <
int dim,
int spacedim>
53 PolicyBase<dim, spacedim> &policy)
55 std::string policy_name;
56 if (
dynamic_cast<const typename ::internal::DoFHandlerImplementation::
57 Policy::Sequential<dim, spacedim> *
>(&policy))
58 policy_name =
"Policy::Sequential<";
59 else if (
dynamic_cast<
60 const typename ::internal::DoFHandlerImplementation::
61 Policy::ParallelDistributed<dim, spacedim> *
>(&policy))
62 policy_name =
"Policy::ParallelDistributed<";
63 else if (
dynamic_cast<
64 const typename ::internal::DoFHandlerImplementation::
65 Policy::ParallelShared<dim, spacedim> *
>(&policy))
66 policy_name =
"Policy::ParallelShared<";
75 namespace DoFHandlerImplementation
87 template <
int spacedim>
97 template <
int spacedim>
216 template <
int spacedim>
229 const unsigned int max_adjacent_cells =
233 if (max_adjacent_cells <= 8)
252 template <
int dim,
int spacedim>
268 template <
int dim,
int spacedim>
271 const unsigned int n_inner_dofs_per_cell)
273 for (
unsigned int i = 0; i < dof_handler.
tria->
n_levels(); ++i)
278 for (
const auto &cell :
280 if (cell->is_active() && !cell->is_artificial())
282 n_inner_dofs_per_cell;
298 template <
int dim,
int spacedim,
typename T>
301 const unsigned int structdim,
302 const unsigned int n_raw_entities,
303 const T &cell_process)
308 dof_handler.
object_dof_ptr[0][structdim].assign(n_raw_entities + 1, -1);
311 if (cell->is_active() && !cell->is_artificial())
314 [&](
const unsigned int n_dofs_per_entity,
315 const unsigned int index) {
316 auto &n_dofs_per_entity_target =
321 Assert((n_dofs_per_entity_target ==
325 n_dofs_per_entity_target == n_dofs_per_entity),
328 n_dofs_per_entity_target = n_dofs_per_entity;
333 for (
unsigned int i = 1; i < n_raw_entities + 1; ++i)
357 template <
int dim,
int spacedim>
363 const auto &fe = dof_handler.
get_fe();
367 dim == 1 ? fe.n_dofs_per_line() :
368 (dim == 2 ? fe.n_dofs_per_quad(0) :
369 fe.n_dofs_per_hex()));
375 [&](
const auto &cell,
const auto &process) {
376 for (const auto vertex_index :
377 cell->vertex_indices())
378 process(fe.n_dofs_per_vertex(),
379 cell->vertex_index(vertex_index));
383 if (dim == 2 || dim == 3)
388 [&](
const auto &cell,
const auto &process) {
389 const auto line_indices = internal::TriaAccessorImplementation::
390 Implementation::get_line_indices_of_cell(*cell);
391 for (const auto &line_no : cell->line_indices())
392 process(fe.n_dofs_per_line(), line_indices[line_no]);
400 [&](
const auto &cell,
const auto &process) {
401 for (const auto face_index :
402 cell->face_indices())
403 process(fe.n_dofs_per_quad(face_index),
404 cell->face(face_index)->index());
408 template <
int spacedim>
416 const ::Triangulation<1, spacedim> &tria =
418 const unsigned int dofs_per_line =
420 const unsigned int n_levels = tria.n_levels();
422 for (
unsigned int i = 0; i < n_levels; ++i)
426 dof_handler.
mg_levels.back()->dof_object.dofs =
427 std::vector<types::global_dof_index>(tria.n_raw_lines(i) *
432 const unsigned int n_vertices = tria.n_vertices();
436 std::vector<unsigned int> max_level(n_vertices, 0);
437 std::vector<unsigned int> min_level(n_vertices, n_levels);
439 for (typename ::Triangulation<1, spacedim>::cell_iterator cell =
444 const unsigned int level = cell->level();
446 for (
const auto vertex : cell->vertex_indices())
448 const unsigned int vertex_index = cell->vertex_index(vertex);
450 if (min_level[vertex_index] >
level)
451 min_level[vertex_index] =
level;
453 if (max_level[vertex_index] <
level)
454 max_level[vertex_index] =
level;
458 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
459 if (tria.vertex_used(vertex))
462 Assert(max_level[vertex] >= min_level[vertex],
478 template <
int spacedim>
486 const ::FiniteElement<2, spacedim> &fe = dof_handler.
get_fe();
487 const ::Triangulation<2, spacedim> &tria =
489 const unsigned int n_levels = tria.
n_levels();
491 for (
unsigned int i = 0; i < n_levels; ++i)
496 dof_handler.
mg_levels.back()->dof_object.dofs =
497 std::vector<types::global_dof_index>(
498 tria.n_raw_quads(i) *
499 fe.n_dofs_per_quad(0 ),
504 std::make_unique<internal::DoFHandlerImplementation::DoFFaces<2>>();
506 std::vector<types::global_dof_index>(tria.n_raw_lines() *
507 fe.n_dofs_per_line(),
510 const unsigned int n_vertices = tria.n_vertices();
514 std::vector<unsigned int> max_level(n_vertices, 0);
515 std::vector<unsigned int> min_level(n_vertices, n_levels);
517 for (typename ::Triangulation<2, spacedim>::cell_iterator cell =
522 const unsigned int level = cell->level();
524 for (
const auto vertex : cell->vertex_indices())
526 const unsigned int vertex_index = cell->vertex_index(vertex);
528 if (min_level[vertex_index] >
level)
529 min_level[vertex_index] =
level;
531 if (max_level[vertex_index] <
level)
532 max_level[vertex_index] =
level;
536 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
537 if (tria.vertex_used(vertex))
540 Assert(max_level[vertex] >= min_level[vertex],
544 fe.n_dofs_per_vertex());
555 template <
int spacedim>
563 const ::FiniteElement<3, spacedim> &fe = dof_handler.
get_fe();
564 const ::Triangulation<3, spacedim> &tria =
566 const unsigned int n_levels = tria.
n_levels();
568 for (
unsigned int i = 0; i < n_levels; ++i)
573 dof_handler.
mg_levels.back()->dof_object.dofs =
574 std::vector<types::global_dof_index>(tria.n_raw_hexs(i) *
580 std::make_unique<internal::DoFHandlerImplementation::DoFFaces<3>>();
582 std::vector<types::global_dof_index>(tria.n_raw_lines() *
583 fe.n_dofs_per_line(),
589 dof_handler.
mg_faces->quads.dofs = std::vector<types::global_dof_index>(
590 tria.n_raw_quads() * fe.n_dofs_per_quad(0 ),
593 const unsigned int n_vertices = tria.n_vertices();
597 std::vector<unsigned int> max_level(n_vertices, 0);
598 std::vector<unsigned int> min_level(n_vertices, n_levels);
600 for (typename ::Triangulation<3, spacedim>::cell_iterator cell =
605 const unsigned int level = cell->level();
607 for (
const auto vertex : cell->vertex_indices())
609 const unsigned int vertex_index = cell->vertex_index(vertex);
611 if (min_level[vertex_index] >
level)
612 min_level[vertex_index] =
level;
614 if (max_level[vertex_index] <
level)
615 max_level[vertex_index] =
level;
619 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
620 if (tria.vertex_used(vertex))
623 Assert(max_level[vertex] >= min_level[vertex],
627 fe.n_dofs_per_vertex());
644 namespace DoFHandlerImplementation
657 template <
int dim,
int spacedim>
664 if (cell->is_locally_owned())
666 !cell->future_fe_index_set(),
668 "There shouldn't be any cells flagged for p-adaptation when partitioning."));
677 template <
int dim,
int spacedim>
693 std::vector<bool> locally_used_vertices(
696 if (!cell->is_artificial())
697 for (
const auto v : cell->vertex_indices())
698 locally_used_vertices[cell->vertex_index(v)] =
true;
700 std::vector<std::vector<bool>> vertex_fe_association(
705 if (!cell->is_artificial())
706 for (
const auto v : cell->vertex_indices())
707 vertex_fe_association[cell->active_fe_index()]
708 [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())
1149 const auto line_indices =
1150 internal::TriaAccessorImplementation::Implementation::
1151 get_line_indices_of_cell(*cell);
1152 for (
const auto line_no : cell->line_indices())
1153 line_fe_association[cell->active_fe_index()]
1154 [line_indices[line_no]] =
true;
1167 if (line_fe_association[fe][line] ==
true)
1169 line_is_used[line] =
true;
1175 const unsigned int d = 1;
1176 const unsigned int l = 0;
1186 unsigned int line_slots_needed = 0;
1187 unsigned int fe_slots_needed = 0;
1194 if (line_is_used[line] ==
true)
1196 for (
unsigned int fe = 0;
1199 if (line_fe_association[fe][line] ==
true)
1202 line_slots_needed +=
1221 if (line_is_used[line] ==
true)
1223 for (
unsigned int fe = 0;
1226 if (line_fe_association[fe][line] ==
true)
1232 for (
unsigned int i = 0;
1233 i < dof_handler.
get_fe(fe).n_dofs_per_line();
1247 fe_slots_needed + 1);
1269 template <
int dim,
int spacedim>
1277 if (const ::parallel::shared::Triangulation<dim, spacedim> *tr =
1279 const ::parallel::shared::Triangulation<dim, spacedim>
1292 std::vector<types::fe_index> active_fe_indices(
1293 tr->n_active_cells(), 0u);
1295 if (cell->is_locally_owned())
1296 active_fe_indices[cell->active_cell_index()] =
1297 cell->active_fe_index();
1300 tr->get_mpi_communicator(),
1310 if (!cell->is_locally_owned())
1312 .hp_cell_active_fe_indices[cell->level()][cell->index()] =
1313 active_fe_indices[cell->active_cell_index()];
1315 else if (const ::parallel::
1316 DistributedTriangulationBase<dim, spacedim> *tr =
1319 DistributedTriangulationBase<dim, spacedim> *
>(
1332 return cell->active_fe_index();
1358 const ::parallel::TriangulationBase<dim, spacedim> *
>(
1379 template <
int dim,
int spacedim>
1387 if (const ::parallel::shared::Triangulation<dim, spacedim> *tr =
1389 const ::parallel::shared::Triangulation<dim, spacedim>
1392 std::vector<types::fe_index> future_fe_indices(
1393 tr->n_active_cells(), 0u);
1396 future_fe_indices[cell->active_cell_index()] =
1401 tr->get_mpi_communicator(),
1405 if (!cell->is_locally_owned())
1407 .hp_cell_future_fe_indices[cell->level()][cell->index()] =
1408 future_fe_indices[cell->active_cell_index()];
1410 else if (const ::parallel::
1411 DistributedTriangulationBase<dim, spacedim> *tr =
1414 DistributedTriangulationBase<dim, spacedim> *
>(
1443 const ::parallel::TriangulationBase<dim, spacedim> *
>(
1471 template <
int dim,
int spacedim>
1479 if (cell->is_locally_owned())
1481 if (cell->refine_flag_set())
1486 fe_transfer->refined_cells_fe_index.emplace_back(
1487 cell, cell->future_fe_index());
1489 else if (cell->coarsen_flag_set())
1496 const auto &parent = cell->parent();
1500 if (fe_transfer->coarsened_cells_fe_index.find(parent) ==
1501 fe_transfer->coarsened_cells_fe_index.end())
1510 for (
const auto &child : parent->child_iterators())
1511 Assert(child->is_active() &&
1512 child->coarsen_flag_set(),
1518 DoFHandlerImplementation::Implementation::
1519 dominated_future_fe_on_children<dim, spacedim>(
1522 fe_transfer->coarsened_cells_fe_index.insert(
1523 {parent, fe_index});
1531 if (cell->future_fe_index_set() ==
true)
1532 fe_transfer->persisting_cells_fe_index.emplace_back(
1533 cell, cell->future_fe_index());
1544 template <
int dim,
int spacedim>
1552 for (
const auto &persist : fe_transfer->persisting_cells_fe_index)
1554 const auto &cell = persist.first;
1556 if (cell->is_locally_owned())
1559 cell->set_active_fe_index(persist.second);
1565 for (
const auto &refine : fe_transfer->refined_cells_fe_index)
1567 const auto &parent = refine.first;
1569 for (
const auto &child : parent->child_iterators())
1570 if (child->is_locally_owned())
1573 child->set_active_fe_index(refine.second);
1579 for (
const auto &coarsen : fe_transfer->coarsened_cells_fe_index)
1581 const auto &cell = coarsen.first;
1583 if (cell->is_locally_owned())
1586 cell->set_active_fe_index(coarsen.second);
1602 template <
int dim,
int spacedim>
1606 const std::vector<types::fe_index> &children_fe_indices,
1607 const ::hp::FECollection<dim, spacedim> &fe_collection)
1613 const std::set<unsigned int> children_fe_indices_set(
1614 children_fe_indices.begin(), children_fe_indices.end());
1617 fe_collection.find_dominated_fe_extended(children_fe_indices_set,
1623 return dominated_fe_index;
1634 template <
int dim,
int spacedim>
1640 !parent->is_active(),
1642 "You ask for information on children of this cell which is only "
1643 "available for active cells. This cell has no children."));
1645 const auto &dof_handler = parent->get_dof_handler();
1647 dof_handler.has_hp_capabilities(),
1651 std::set<unsigned int> future_fe_indices_children;
1652 for (
const auto &child : parent->child_iterators())
1657 "You ask for information on children of this cell which is only "
1658 "available for active cells. One of its children is not active."));
1667 ::internal::DoFCellAccessorImplementation::
1668 Implementation::future_fe_index<dim, spacedim, false>(*child);
1670 future_fe_indices_children.insert(future_fe_index_child);
1675 dof_handler.fe_collection.find_dominated_fe_extended(
1676 future_fe_indices_children,
1682 return future_fe_index;
1691 template <
int dim,
int spacedim>
1695 Implementation::communicate_future_fe_indices<dim, spacedim>(
1704 template <
int dim,
int spacedim>
1709 return Implementation::dominated_future_fe_on_children<dim, spacedim>(
1718template <
int dim,
int spacedim>
1721 : hp_capability_enabled(true)
1722 , tria(nullptr, typeid(*this).name())
1728template <
int dim,
int spacedim>
1738template <
int dim,
int spacedim>
1743 for (
auto &connection : this->tria_listeners)
1744 connection.disconnect();
1745 this->tria_listeners.clear();
1747 for (
auto &connection : this->tria_listeners_for_transfer)
1748 connection.disconnect();
1749 this->tria_listeners_for_transfer.clear();
1760 this->policy.reset();
1765template <
int dim,
int spacedim>
1773 for (
auto &connection : this->tria_listeners)
1774 connection.disconnect();
1775 this->tria_listeners.clear();
1777 for (
auto &connection : this->tria_listeners_for_transfer)
1778 connection.disconnect();
1779 this->tria_listeners_for_transfer.clear();
1783 this->policy.reset();
1793 this->setup_policy();
1796 hp_capability_enabled =
true;
1797 this->connect_to_triangulation_signals();
1798 this->create_active_fe_table();
1804template <
int dim,
int spacedim>
1810 this->get_triangulation().begin(
level);
1811 if (cell == this->get_triangulation().
end(
level))
1813 return cell_iterator(*cell,
this);
1818template <
int dim,
int spacedim>
1827 while (i->has_children())
1835template <
int dim,
int spacedim>
1840 return cell_iterator(&this->get_triangulation(), -1, -1,
this);
1845template <
int dim,
int spacedim>
1851 this->get_triangulation().end(
level);
1854 return cell_iterator(*cell,
this);
1859template <
int dim,
int spacedim>
1865 this->get_triangulation().end_active(
level);
1867 return active_cell_iterator(
end());
1868 return active_cell_iterator(*cell,
this);
1873template <
int dim,
int spacedim>
1878 Assert(this->has_level_dofs(),
1880 "levels if mg dofs got distributed."));
1882 this->get_triangulation().begin(
level);
1883 if (cell == this->get_triangulation().
end(
level))
1884 return end_mg(
level);
1885 return level_cell_iterator(*cell,
this);
1890template <
int dim,
int spacedim>
1895 Assert(this->has_level_dofs(),
1897 "levels if mg dofs got distributed."));
1899 this->get_triangulation().end(
level);
1902 return level_cell_iterator(*cell,
this);
1907template <
int dim,
int spacedim>
1912 return level_cell_iterator(&this->get_triangulation(), -1, -1,
this);
1917template <
int dim,
int spacedim>
1921 spacedim>::cell_iterators()
const
1929template <
int dim,
int spacedim>
1942template <
int dim,
int spacedim>
1949 begin_mg(), end_mg());
1954template <
int dim,
int spacedim>
1958 spacedim>::cell_iterators_on_level(
const unsigned int level)
const
1966template <
int dim,
int spacedim>
1979template <
int dim,
int spacedim>
1995template <
int dim,
int spacedim>
1999 Assert(!(dim == 2 && spacedim == 3) || hp_capability_enabled ==
false,
2000 ExcNotImplementedWithHP());
2002 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2004 std::unordered_set<types::global_dof_index> boundary_dofs;
2005 std::vector<types::global_dof_index> dofs_on_face;
2006 dofs_on_face.reserve(this->get_fe_collection().max_dofs_per_face());
2008 const IndexSet &owned_dofs = locally_owned_dofs();
2015 for (
const auto &cell : this->active_cell_iterators())
2016 if (cell->is_locally_owned() && cell->at_boundary())
2018 for (
const auto iface : cell->face_indices())
2020 const auto face = cell->face(iface);
2021 if (face->at_boundary())
2023 const unsigned int dofs_per_face =
2024 cell->get_fe().n_dofs_per_face(iface);
2025 dofs_on_face.resize(dofs_per_face);
2027 face->get_dof_indices(dofs_on_face, cell->active_fe_index());
2028 for (
unsigned int i = 0; i < dofs_per_face; ++i)
2030 const unsigned int global_idof_index = dofs_on_face[i];
2031 if (owned_dofs.
is_element(global_idof_index))
2033 boundary_dofs.insert(global_idof_index);
2039 return boundary_dofs.size();
2044template <
int dim,
int spacedim>
2047 const std::set<types::boundary_id> &boundary_ids)
const
2049 Assert(!(dim == 2 && spacedim == 3) || hp_capability_enabled ==
false,
2050 ExcNotImplementedWithHP());
2052 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2055 ExcInvalidBoundaryIndicator());
2059 std::unordered_set<types::global_dof_index> boundary_dofs;
2060 std::vector<types::global_dof_index> dofs_on_face;
2061 dofs_on_face.reserve(this->get_fe_collection().max_dofs_per_face());
2063 const IndexSet &owned_dofs = locally_owned_dofs();
2065 for (
const auto &cell : this->active_cell_iterators())
2066 if (cell->is_locally_owned() && cell->at_boundary())
2068 for (
const auto iface : cell->face_indices())
2070 const auto face = cell->face(iface);
2071 const unsigned int boundary_id = face->boundary_id();
2072 if (face->at_boundary() &&
2073 (boundary_ids.find(boundary_id) != boundary_ids.end()))
2075 const unsigned int dofs_per_face =
2076 cell->get_fe().n_dofs_per_face(iface);
2077 dofs_on_face.resize(dofs_per_face);
2079 face->get_dof_indices(dofs_on_face, cell->active_fe_index());
2080 for (
unsigned int i = 0; i < dofs_per_face; ++i)
2082 const unsigned int global_idof_index = dofs_on_face[i];
2083 if (owned_dofs.
is_element(global_idof_index))
2085 boundary_dofs.insert(global_idof_index);
2091 return boundary_dofs.size();
2096template <
int dim,
int spacedim>
2112 if (hp_capability_enabled)
2120 if (this->block_info_object.has_value())
2122 this->block_info_object.value());
2127 if (this->mg_faces !=
nullptr)
2130 for (
unsigned int i = 0; i < this->mg_vertex_dofs.size(); ++i)
2131 mem +=
sizeof(MGVertexDoFs) +
2132 (1 + this->mg_vertex_dofs[i].get_finest_level() -
2133 this->mg_vertex_dofs[i].get_coarsest_level()) *
2142template <
int dim,
int spacedim>
2146 Assert(this->hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2153 &*this->tria) ==
nullptr)
2158 return new_block_info;
2163template <
int dim,
int spacedim>
2173template <
int dim,
int spacedim>
2178 Assert(this->tria !=
nullptr,
2180 "You need to set the Triangulation in the DoFHandler using reinit() "
2181 "or in the constructor before you can distribute DoFs."));
2183 ExcMessage(
"The Triangulation you are using is empty!"));
2187 Assert((ff.
size() <= std::numeric_limits<types::fe_index>::max()) &&
2189 ExcMessage(
"The given hp::FECollection contains more finite elements "
2190 "than the DoFHandler can cover with active FE indices."));
2196 if ((hp_cell_active_fe_indices.size() > 0) &&
2197 (hp_cell_future_fe_indices.size() > 0))
2201 for (
const auto &cell : this->active_cell_iterators() |
2205 ExcInvalidFEIndex(cell->active_fe_index(), ff.
size()));
2207 ExcInvalidFEIndex(cell->future_fe_index(), ff.
size()));
2216 if (this->fe_collection != ff)
2220 const bool contains_multiple_fes = (this->fe_collection.size() > 1);
2223 if (hp_capability_enabled && !contains_multiple_fes)
2225 hp_capability_enabled =
false;
2229 for (
auto &connection : this->tria_listeners_for_transfer)
2230 connection.disconnect();
2231 this->tria_listeners_for_transfer.clear();
2234 this->hp_cell_active_fe_indices.clear();
2235 this->hp_cell_active_fe_indices.shrink_to_fit();
2236 this->hp_cell_future_fe_indices.clear();
2237 this->hp_cell_future_fe_indices.shrink_to_fit();
2243 hp_capability_enabled || !contains_multiple_fes,
2245 "You cannot re-enable hp-capabilities after you registered a single "
2246 "finite element. Please call reinit() or create a new DoFHandler "
2247 "object instead."));
2253 if (hp_capability_enabled)
2271 subdomain_modifier(this->get_triangulation());
2280 if (hp_capability_enabled)
2288 this->number_cache = this->policy->distribute_dofs();
2302 if (block_info_object.has_value())
2304 block_info_object.reset();
2311template <
int dim,
int spacedim>
2315 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2318 this->object_dof_indices.size() > 0,
2320 "Distribute active DoFs using distribute_dofs() before calling distribute_mg_dofs()."));
2327 "The mesh smoothing requirement 'limit_level_difference_at_vertices' has to be set for using multigrid!"));
2329 this->clear_mg_space();
2332 this->mg_number_cache = this->policy->distribute_mg_dofs();
2334 if (block_info_object.has_value())
2336 block_info_object.reset();
2343template <
int dim,
int spacedim>
2352template <
int dim,
int spacedim>
2357 if (
dynamic_cast<const ::parallel::shared::Triangulation<dim, spacedim>
2358 *
>(&this->get_triangulation()) !=
nullptr)
2359 this->policy = std::make_unique<internal::DoFHandlerImplementation::Policy::
2360 ParallelShared<dim, spacedim>>(*this);
2361 else if (
dynamic_cast<
2362 const ::parallel::DistributedTriangulationBase<dim, spacedim>
2363 *
>(&this->get_triangulation()) ==
nullptr)
2364 this->policy = std::make_unique<
2369 std::make_unique<internal::DoFHandlerImplementation::Policy::
2370 ParallelDistributed<dim, spacedim>>(*this);
2375template <
int dim,
int spacedim>
2380 this->clear_space();
2381 this->clear_mg_space();
2386template <
int dim,
int spacedim>
2390 object_dof_indices.clear();
2392 object_dof_ptr.clear();
2394 this->number_cache.clear();
2396 this->hp_cell_active_fe_indices.clear();
2397 this->hp_cell_future_fe_indices.clear();
2402template <
int dim,
int spacedim>
2406 this->mg_levels.clear();
2407 this->mg_faces.reset();
2409 std::vector<MGVertexDoFs> tmp;
2411 std::swap(this->mg_vertex_dofs, tmp);
2413 this->mg_number_cache.clear();
2418template <
int dim,
int spacedim>
2421 const std::vector<types::global_dof_index> &new_numbers)
2423 if (hp_capability_enabled)
2425 Assert(this->hp_cell_future_fe_indices.size() > 0,
2427 "You need to distribute DoFs before you can renumber them."));
2437 if (this->n_locally_owned_dofs() == this->n_dofs())
2439 std::vector<types::global_dof_index> tmp(new_numbers);
2440 std::sort(tmp.begin(), tmp.end());
2441 std::vector<types::global_dof_index>::const_iterator p =
2444 for (; p != tmp.end(); ++p, ++i)
2445 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2448 for (
const auto new_number : new_numbers)
2450 new_number < this->n_dofs(),
2452 "New DoF index is not less than the total number of dofs."));
2469 this->number_cache = this->policy->renumber_dofs(new_numbers);
2484 Assert(this->object_dof_indices.size() > 0,
2486 "You need to distribute DoFs before you can renumber them."));
2491 *
>(&*this->tria) !=
nullptr)
2493 Assert(new_numbers.size() == this->n_dofs() ||
2494 new_numbers.size() == this->n_locally_owned_dofs(),
2495 ExcMessage(
"Incorrect size of the input array."));
2497 else if (
dynamic_cast<
2499 *
>(&*this->tria) !=
nullptr)
2512 if (this->n_locally_owned_dofs() == this->n_dofs())
2514 std::vector<types::global_dof_index> tmp(new_numbers);
2515 std::sort(tmp.begin(), tmp.end());
2516 std::vector<types::global_dof_index>::const_iterator p =
2519 for (; p != tmp.end(); ++p, ++i)
2520 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2523 for (
const auto new_number : new_numbers)
2525 new_number < this->n_dofs(),
2527 "New DoF index is not less than the total number of dofs."));
2530 this->number_cache = this->policy->renumber_dofs(new_numbers);
2536template <
int dim,
int spacedim>
2539 const unsigned int level,
2540 const std::vector<types::global_dof_index> &new_numbers)
2542 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2545 this->mg_levels.size() > 0 && this->object_dof_indices.size() > 0,
2547 "You need to distribute active and level DoFs before you can renumber level DoFs."));
2550 this->locally_owned_mg_dofs(
level).n_elements());
2558 if (this->n_locally_owned_dofs() == this->n_dofs())
2560 std::vector<types::global_dof_index> tmp(new_numbers);
2561 std::sort(tmp.begin(), tmp.end());
2562 std::vector<types::global_dof_index>::const_iterator p = tmp.begin();
2564 for (; p != tmp.end(); ++p, ++i)
2565 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2568 for (
const auto new_number : new_numbers)
2571 "New DoF index is not less than the total number of dofs."));
2574 this->mg_number_cache[
level] =
2575 this->policy->renumber_mg_dofs(
level, new_numbers);
2580template <
int dim,
int spacedim>
2585 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2590 return this->fe_collection.max_dofs_per_vertex();
2592 return (3 * this->fe_collection.max_dofs_per_vertex() +
2593 2 * this->fe_collection.max_dofs_per_line());
2604 return (19 * this->fe_collection.max_dofs_per_vertex() +
2605 28 * this->fe_collection.max_dofs_per_line() +
2606 8 * this->fe_collection.max_dofs_per_quad());
2615template <
int dim,
int spacedim>
2619 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2626template <
int dim,
int spacedim>
2629 const std::vector<types::fe_index> &active_fe_indices)
2631 Assert(active_fe_indices.size() == this->get_triangulation().n_active_cells(),
2633 this->get_triangulation().n_active_cells()));
2635 this->create_active_fe_table();
2640 for (
const auto &cell : this->active_cell_iterators())
2641 if (cell->is_locally_owned())
2642 cell->set_active_fe_index(active_fe_indices[cell->active_cell_index()]);
2647template <
int dim,
int spacedim>
2652 std::vector<types::fe_index> active_fe_indices(
2658 for (
const auto &cell : this->active_cell_iterators())
2659 if (!cell->is_artificial())
2660 active_fe_indices[cell->active_cell_index()] = cell->active_fe_index();
2662 return active_fe_indices;
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,
3081 active_fe_index_transfer->active_fe_indices = get_active_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"
A small class collecting the different BlockIndices involved in global, multilevel and local computat...
void initialize_local(const DoFHandler< dim, spacedim > &)
Initialize block structure on cells and compute renumbering between cell dofs and block cell dofs.
void initialize(const DoFHandler< dim, spacedim > &, bool levels_only=false, bool active_only=false)
Fill the object with values describing block structure of the DoFHandler.
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()
BlockInfo compute_block_info() const
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)
static ::ExceptionBase & ExcInconsistentCoarseningFlags()
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)
* * if(update_pressure &update_flags) * compute_pressure(constitutive_request
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)