20#include <deal.II/base/mpi.templates.h>
23#include <deal.II/distributed/cell_data_transfer.templates.h>
41#include <unordered_set>
45template <
int dim,
int spacedim>
52 template <
int dim,
int spacedim>
55 PolicyBase<dim, spacedim> &policy)
57 std::string policy_name;
58 if (
dynamic_cast<const typename ::internal::DoFHandlerImplementation::
59 Policy::Sequential<dim, spacedim> *
>(&policy) ||
60 dynamic_cast<const typename ::internal::DoFHandlerImplementation::
61 Policy::Sequential<dim, spacedim> *
>(&policy))
62 policy_name =
"Policy::Sequential<";
63 else if (
dynamic_cast<
64 const typename ::internal::DoFHandlerImplementation::
65 Policy::ParallelDistributed<dim, spacedim> *
>(&policy) ||
67 const typename ::internal::DoFHandlerImplementation::
68 Policy::ParallelDistributed<dim, spacedim> *
>(&policy))
69 policy_name =
"Policy::ParallelDistributed<";
70 else if (
dynamic_cast<
71 const typename ::internal::DoFHandlerImplementation::
72 Policy::ParallelShared<dim, spacedim> *
>(&policy) ||
74 const typename ::internal::DoFHandlerImplementation::
75 Policy::ParallelShared<dim, spacedim> *
>(&policy))
76 policy_name =
"Policy::ParallelShared<";
85 namespace DoFHandlerImplementation
97 template <
int spacedim>
107 template <
int spacedim>
226 template <
int spacedim>
239 const unsigned int max_adjacent_cells =
243 if (max_adjacent_cells <= 8)
262 template <
int dim,
int spacedim>
278 template <
int dim,
int spacedim>
281 const unsigned int n_inner_dofs_per_cell)
283 for (
unsigned int i = 0; i < dof_handler.
tria->
n_levels(); ++i)
288 for (
const auto &cell :
290 if (cell->is_active() && !cell->is_artificial())
292 n_inner_dofs_per_cell;
308 template <
int dim,
int spacedim,
typename T>
311 const unsigned int structdim,
312 const unsigned int n_raw_entities,
313 const T & cell_process)
318 dof_handler.
object_dof_ptr[0][structdim].assign(n_raw_entities + 1, -1);
321 if (cell->is_active() && !cell->is_artificial())
324 [&](
const unsigned int n_dofs_per_entity,
325 const unsigned int index) {
326 auto &n_dofs_per_entity_target =
331 Assert((n_dofs_per_entity_target ==
335 n_dofs_per_entity_target == n_dofs_per_entity),
338 n_dofs_per_entity_target = n_dofs_per_entity;
343 for (
unsigned int i = 1; i < n_raw_entities + 1; ++i)
367 template <
int dim,
int spacedim>
373 const auto &fe = dof_handler.
get_fe();
377 dim == 1 ? fe.n_dofs_per_line() :
378 (dim == 2 ? fe.n_dofs_per_quad(0) :
379 fe.n_dofs_per_hex()));
385 [&](
const auto &cell,
const auto &process) {
386 for (const auto vertex_index :
387 cell->vertex_indices())
388 process(fe.n_dofs_per_vertex(),
389 cell->vertex_index(vertex_index));
393 if (dim == 2 || dim == 3)
397 [&](
const auto &cell,
const auto &process) {
398 for (const auto line_index :
399 cell->line_indices())
400 process(fe.n_dofs_per_line(),
401 cell->line(line_index)->index());
409 [&](
const auto &cell,
const auto &process) {
410 for (const auto face_index :
411 cell->face_indices())
412 process(fe.n_dofs_per_quad(face_index),
413 cell->face(face_index)->index());
417 template <
int spacedim>
425 const ::Triangulation<1, spacedim> &
tria =
427 const unsigned int dofs_per_line =
431 for (
unsigned int i = 0; i < n_levels; ++i)
435 dof_handler.
mg_levels.back()->dof_object.dofs =
445 std::vector<unsigned int> max_level(n_vertices, 0);
446 std::vector<unsigned int> min_level(n_vertices, n_levels);
448 for (typename ::Triangulation<1, spacedim>::cell_iterator cell =
453 const unsigned int level = cell->level();
455 for (
const auto vertex : cell->vertex_indices())
457 const unsigned int vertex_index = cell->vertex_index(vertex);
459 if (min_level[vertex_index] >
level)
460 min_level[vertex_index] =
level;
462 if (max_level[vertex_index] <
level)
463 max_level[vertex_index] =
level;
467 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
471 Assert(max_level[vertex] >= min_level[vertex],
487 template <
int spacedim>
495 const ::FiniteElement<2, spacedim> &fe = dof_handler.
get_fe();
496 const ::Triangulation<2, spacedim> &
tria =
500 for (
unsigned int i = 0; i < n_levels; ++i)
505 dof_handler.
mg_levels.back()->dof_object.dofs =
506 std::vector<types::global_dof_index>(
508 fe.n_dofs_per_quad(0 ),
513 std::make_unique<internal::DoFHandlerImplementation::DoFFaces<2>>();
516 fe.n_dofs_per_line(),
523 std::vector<unsigned int> max_level(n_vertices, 0);
524 std::vector<unsigned int> min_level(n_vertices, n_levels);
526 for (typename ::Triangulation<2, spacedim>::cell_iterator cell =
531 const unsigned int level = cell->level();
533 for (
const auto vertex : cell->vertex_indices())
535 const unsigned int vertex_index = cell->vertex_index(vertex);
537 if (min_level[vertex_index] >
level)
538 min_level[vertex_index] =
level;
540 if (max_level[vertex_index] <
level)
541 max_level[vertex_index] =
level;
545 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
549 Assert(max_level[vertex] >= min_level[vertex],
553 fe.n_dofs_per_vertex());
564 template <
int spacedim>
572 const ::FiniteElement<3, spacedim> &fe = dof_handler.
get_fe();
573 const ::Triangulation<3, spacedim> &
tria =
577 for (
unsigned int i = 0; i < n_levels; ++i)
582 dof_handler.
mg_levels.back()->dof_object.dofs =
589 std::make_unique<internal::DoFHandlerImplementation::DoFFaces<3>>();
592 fe.n_dofs_per_line(),
598 dof_handler.
mg_faces->quads.dofs = std::vector<types::global_dof_index>(
606 std::vector<unsigned int> max_level(n_vertices, 0);
607 std::vector<unsigned int> min_level(n_vertices, n_levels);
609 for (typename ::Triangulation<3, spacedim>::cell_iterator cell =
614 const unsigned int level = cell->level();
616 for (
const auto vertex : cell->vertex_indices())
618 const unsigned int vertex_index = cell->vertex_index(vertex);
620 if (min_level[vertex_index] >
level)
621 min_level[vertex_index] =
level;
623 if (max_level[vertex_index] <
level)
624 max_level[vertex_index] =
level;
628 for (
unsigned int vertex = 0; vertex < n_vertices; ++vertex)
632 Assert(max_level[vertex] >= min_level[vertex],
636 fe.n_dofs_per_vertex());
653 namespace DoFHandlerImplementation
666 template <
int dim,
int spacedim>
673 if (cell->is_locally_owned())
675 !cell->future_fe_index_set(),
677 "There shouldn't be any cells flagged for p-adaptation when partitioning."));
686 template <
int dim,
int spacedim>
702 std::vector<bool> locally_used_vertices(
705 if (!cell->is_artificial())
706 for (
const auto v : cell->vertex_indices())
707 locally_used_vertices[cell->vertex_index(v)] =
true;
709 std::vector<std::vector<bool>> vertex_fe_association(
714 if (!cell->is_artificial())
715 for (
const auto v : cell->vertex_indices())
716 vertex_fe_association[cell->active_fe_index()]
717 [cell->vertex_index(v)] =
true;
726 if (locally_used_vertices[v] ==
true)
731 if (vertex_fe_association[fe][v] ==
true)
738 const unsigned int d = 0;
739 const unsigned int l = 0;
749 unsigned int vertex_slots_needed = 0;
750 unsigned int fe_slots_needed = 0;
758 for (
unsigned int fe = 0;
761 if (vertex_fe_association[fe][v] ==
true)
764 vertex_slots_needed +=
782 if (vertex_fe_association[fe][v] ==
true)
788 for (
unsigned int i = 0;
789 i < dof_handler.
get_fe(fe).n_dofs_per_vertex();
819 template <
int dim,
int spacedim>
836 std::vector<typename DoFHandler<dim, spacedim>::offset_type>(
844 if (cell->is_active() && !cell->is_artificial())
849 cell->get_fe().template n_dofs_per_object<dim>();
853 std::vector<types::global_dof_index>(
864 template <
int dim,
int spacedim>
885 std::vector<bool> face_touched(dim == 2 ?
889 const unsigned int d = dim - 1;
890 const unsigned int l = 0;
902 unsigned int n_face_slots = 0;
905 if (!cell->is_artificial())
906 for (
const auto face : cell->face_indices())
907 if (!face_touched[cell->face(face)->index()])
909 unsigned int fe_slots_needed = 0;
911 if (cell->at_boundary(face) ||
912 cell->face(face)->has_children() ||
913 cell->neighbor_is_coarser(face) ||
914 (!cell->at_boundary(face) &&
915 cell->neighbor(face)->is_artificial()) ||
916 (!cell->at_boundary(face) &&
917 !cell->neighbor(face)->is_artificial() &&
918 (cell->active_fe_index() ==
919 cell->neighbor(face)->active_fe_index())))
923 dof_handler.
get_fe(cell->active_fe_index())
924 .
template n_dofs_per_object<dim - 1>(face);
930 dof_handler.
get_fe(cell->active_fe_index())
931 .
template n_dofs_per_object<dim - 1>(face) +
933 .
get_fe(cell->neighbor(face)->active_fe_index())
934 .
template n_dofs_per_object<dim - 1>(
935 cell->neighbor_face_no(face));
939 face_touched[cell->face(face)->index()] =
true;
963 face_touched = std::vector<bool>(face_touched.size());
966 if (!cell->is_artificial())
967 for (
const auto face : cell->face_indices())
968 if (!face_touched[cell->face(face)->index()])
971 if (cell->at_boundary(face) ||
972 cell->face(face)->has_children() ||
973 cell->neighbor_is_coarser(face) ||
974 (!cell->at_boundary(face) &&
975 cell->neighbor(face)->is_artificial()) ||
976 (!cell->at_boundary(face) &&
977 !cell->neighbor(face)->is_artificial() &&
978 (cell->active_fe_index() ==
979 cell->neighbor(face)->active_fe_index())))
982 const unsigned int n_dofs =
984 .template n_dofs_per_object<dim - 1>(face);
985 const unsigned int offset =
992 for (
unsigned int i = 0; i < n_dofs; ++i)
999 unsigned int face_no_1 = face;
1001 cell->neighbor(face)->active_fe_index();
1002 unsigned int face_no_2 = cell->neighbor_face_no(face);
1006 std::swap(fe_1, fe_2);
1007 std::swap(face_no_1, face_no_2);
1010 const unsigned int n_dofs_1 =
1012 .template n_dofs_per_object<dim - 1>(face_no_1);
1014 const unsigned int n_dofs_2 =
1016 .template n_dofs_per_object<dim - 1>(face_no_2);
1018 const unsigned int offset =
1023 cell->active_fe_index());
1037 for (
unsigned int i = 0; i < n_dofs_1 + n_dofs_2; ++i)
1043 face_touched[cell->face(face)->index()] =
true;
1046 for (
unsigned int i = 1;
1062 template <
int spacedim>
1069 ExcMessage(
"The current Triangulation must not be empty."));
1087 template <
int spacedim>
1094 ExcMessage(
"The current Triangulation must not be empty."));
1114 template <
int spacedim>
1121 ExcMessage(
"The current Triangulation must not be empty."));
1150 std::vector<std::vector<bool>> line_fe_association(
1155 if (!cell->is_artificial())
1156 for (
const auto l : cell->line_indices())
1157 line_fe_association[cell->active_fe_index()]
1158 [cell->line_index(l)] =
true;
1170 if (line_fe_association[fe][line] ==
true)
1172 line_is_used[line] =
true;
1178 const unsigned int d = 1;
1179 const unsigned int l = 0;
1189 unsigned int line_slots_needed = 0;
1190 unsigned int fe_slots_needed = 0;
1197 if (line_is_used[line] ==
true)
1199 for (
unsigned int fe = 0;
1202 if (line_fe_association[fe][line] ==
true)
1205 line_slots_needed +=
1224 if (line_is_used[line] ==
true)
1226 for (
unsigned int fe = 0;
1229 if (line_fe_association[fe][line] ==
true)
1235 for (
unsigned int i = 0;
1236 i < dof_handler.
get_fe(fe).n_dofs_per_line();
1250 fe_slots_needed + 1);
1272 template <
int dim,
int spacedim>
1280 if (const ::parallel::shared::Triangulation<dim, spacedim> *tr =
1282 const ::parallel::shared::Triangulation<dim, spacedim>
1295 std::vector<types::fe_index> active_fe_indices(
1296 tr->n_active_cells(), 0u);
1298 if (cell->is_locally_owned())
1299 active_fe_indices[cell->active_cell_index()] =
1300 cell->active_fe_index();
1303 tr->get_communicator(),
1313 if (!cell->is_locally_owned())
1315 .hp_cell_active_fe_indices[cell->level()][cell->index()] =
1316 active_fe_indices[cell->active_cell_index()];
1318 else if (const ::parallel::
1319 DistributedTriangulationBase<dim, spacedim> *tr =
1322 DistributedTriangulationBase<dim, spacedim> *
>(
1335 return cell->active_fe_index();
1361 const ::parallel::TriangulationBase<dim, spacedim> *
>(
1382 template <
int dim,
int spacedim>
1390 if (const ::parallel::shared::Triangulation<dim, spacedim> *tr =
1392 const ::parallel::shared::Triangulation<dim, spacedim>
1395 std::vector<types::fe_index> future_fe_indices(
1396 tr->n_active_cells(), 0u);
1399 future_fe_indices[cell->active_cell_index()] =
1404 tr->get_communicator(),
1408 if (!cell->is_locally_owned())
1410 .hp_cell_future_fe_indices[cell->level()][cell->index()] =
1411 future_fe_indices[cell->active_cell_index()];
1413 else if (const ::parallel::
1414 DistributedTriangulationBase<dim, spacedim> *tr =
1417 DistributedTriangulationBase<dim, spacedim> *
>(
1446 const ::parallel::TriangulationBase<dim, spacedim> *
>(
1474 template <
int dim,
int spacedim>
1482 if (cell->is_locally_owned())
1484 if (cell->refine_flag_set())
1489 fe_transfer->refined_cells_fe_index.insert(
1490 {cell, cell->future_fe_index()});
1492 else if (cell->coarsen_flag_set())
1499 const auto &parent = cell->parent();
1503 if (fe_transfer->coarsened_cells_fe_index.find(parent) ==
1504 fe_transfer->coarsened_cells_fe_index.end())
1511 for (
const auto &child : parent->child_iterators())
1512 Assert(child->is_active() &&
1513 child->coarsen_flag_set(),
1514 typename ::Triangulation<
1515 dim>::ExcInconsistentCoarseningFlags());
1519 DoFHandlerImplementation::Implementation::
1520 dominated_future_fe_on_children<dim, spacedim>(
1523 fe_transfer->coarsened_cells_fe_index.insert(
1524 {parent, fe_index});
1532 if (cell->future_fe_index_set() ==
true)
1533 fe_transfer->persisting_cells_fe_index.insert(
1534 {cell, cell->future_fe_index()});
1545 template <
int dim,
int spacedim>
1553 for (
const auto &persist : fe_transfer->persisting_cells_fe_index)
1555 const auto &cell = persist.first;
1557 if (cell->is_locally_owned())
1560 cell->set_active_fe_index(persist.second);
1566 for (
const auto &refine : fe_transfer->refined_cells_fe_index)
1568 const auto &parent = refine.first;
1570 for (
const auto &child : parent->child_iterators())
1571 if (child->is_locally_owned())
1574 child->set_active_fe_index(refine.second);
1580 for (
const auto &coarsen : fe_transfer->coarsened_cells_fe_index)
1582 const auto &cell = coarsen.first;
1584 if (cell->is_locally_owned())
1587 cell->set_active_fe_index(coarsen.second);
1603 template <
int dim,
int spacedim>
1607 const std::vector<types::fe_index> & children_fe_indices,
1608 const ::hp::FECollection<dim, spacedim> &fe_collection)
1614 const std::set<unsigned int> children_fe_indices_set(
1615 children_fe_indices.begin(), children_fe_indices.end());
1618 fe_collection.find_dominated_fe_extended(children_fe_indices_set,
1624 return dominated_fe_index;
1635 template <
int dim,
int spacedim>
1641 !parent->is_active(),
1643 "You ask for information on children of this cell which is only "
1644 "available for active cells. This cell has no children."));
1646 const auto &dof_handler = parent->get_dof_handler();
1648 dof_handler.has_hp_capabilities(),
1652 std::set<unsigned int> future_fe_indices_children;
1653 for (
const auto &child : parent->child_iterators())
1658 "You ask for information on children of this cell which is only "
1659 "available for active cells. One of its children is not active."));
1668 ::internal::DoFCellAccessorImplementation::
1669 Implementation::future_fe_index<dim, spacedim, false>(*child);
1671 future_fe_indices_children.insert(future_fe_index_child);
1676 dof_handler.fe_collection.find_dominated_fe_extended(
1677 future_fe_indices_children,
1683 return future_fe_index;
1692 template <
int dim,
int spacedim>
1696 Implementation::communicate_future_fe_indices<dim, spacedim>(
1705 template <
int dim,
int spacedim>
1710 return Implementation::dominated_future_fe_on_children<dim, spacedim>(
1719template <
int dim,
int spacedim>
1722 : hp_capability_enabled(true)
1723 ,
tria(nullptr, typeid(*this).name())
1729template <
int dim,
int spacedim>
1739template <
int dim,
int spacedim>
1744 for (
auto &connection : this->tria_listeners)
1745 connection.disconnect();
1746 this->tria_listeners.clear();
1748 for (
auto &connection : this->tria_listeners_for_transfer)
1749 connection.disconnect();
1750 this->tria_listeners_for_transfer.clear();
1761 this->policy.reset();
1766template <
int dim,
int spacedim>
1774 for (
auto &connection : this->tria_listeners)
1775 connection.disconnect();
1776 this->tria_listeners.clear();
1778 for (
auto &connection : this->tria_listeners_for_transfer)
1779 connection.disconnect();
1780 this->tria_listeners_for_transfer.clear();
1784 this->policy.reset();
1794 this->setup_policy();
1797 hp_capability_enabled =
true;
1798 this->connect_to_triangulation_signals();
1799 this->create_active_fe_table();
1806template <
int dim,
int spacedim>
1812 this->get_triangulation().begin(
level);
1813 if (cell == this->get_triangulation().
end(
level))
1815 return cell_iterator(*cell,
this);
1820template <
int dim,
int spacedim>
1829 while (i->has_children())
1837template <
int dim,
int spacedim>
1842 return cell_iterator(&this->get_triangulation(), -1, -1,
this);
1847template <
int dim,
int spacedim>
1853 this->get_triangulation().end(
level);
1856 return cell_iterator(*cell,
this);
1861template <
int dim,
int spacedim>
1867 this->get_triangulation().end_active(
level);
1869 return active_cell_iterator(
end());
1870 return active_cell_iterator(*cell,
this);
1875template <
int dim,
int spacedim>
1880 Assert(this->has_level_dofs(),
1882 "levels if mg dofs got distributed."));
1884 this->get_triangulation().begin(
level);
1885 if (cell == this->get_triangulation().
end(
level))
1886 return end_mg(
level);
1887 return level_cell_iterator(*cell,
this);
1892template <
int dim,
int spacedim>
1897 Assert(this->has_level_dofs(),
1899 "levels if mg dofs got distributed."));
1901 this->get_triangulation().end(
level);
1904 return level_cell_iterator(*cell,
this);
1909template <
int dim,
int spacedim>
1914 return level_cell_iterator(&this->get_triangulation(), -1, -1,
this);
1919template <
int dim,
int spacedim>
1923 spacedim>::cell_iterators()
const
1931template <
int dim,
int spacedim>
1944template <
int dim,
int spacedim>
1951 begin_mg(), end_mg());
1956template <
int dim,
int spacedim>
1960 spacedim>::cell_iterators_on_level(
const unsigned int level)
const
1968template <
int dim,
int spacedim>
1981template <
int dim,
int spacedim>
1997template <
int dim,
int spacedim>
2001 Assert(!(dim == 2 && spacedim == 3) || hp_capability_enabled ==
false,
2002 ExcNotImplementedWithHP());
2004 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2006 std::unordered_set<types::global_dof_index> boundary_dofs;
2007 std::vector<types::global_dof_index> dofs_on_face;
2008 dofs_on_face.reserve(this->get_fe_collection().max_dofs_per_face());
2010 const IndexSet &owned_dofs = locally_owned_dofs();
2017 for (
const auto &cell : this->active_cell_iterators())
2018 if (cell->is_locally_owned() && cell->at_boundary())
2020 for (
const auto iface : cell->face_indices())
2022 const auto face = cell->face(iface);
2023 if (face->at_boundary())
2025 const unsigned int dofs_per_face =
2026 cell->get_fe().n_dofs_per_face(iface);
2027 dofs_on_face.resize(dofs_per_face);
2029 face->get_dof_indices(dofs_on_face, cell->active_fe_index());
2030 for (
unsigned int i = 0; i < dofs_per_face; ++i)
2032 const unsigned int global_idof_index = dofs_on_face[i];
2033 if (owned_dofs.
is_element(global_idof_index))
2035 boundary_dofs.insert(global_idof_index);
2041 return boundary_dofs.size();
2046template <
int dim,
int spacedim>
2049 const std::set<types::boundary_id> &boundary_ids)
const
2051 Assert(!(dim == 2 && spacedim == 3) || hp_capability_enabled ==
false,
2052 ExcNotImplementedWithHP());
2054 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2057 ExcInvalidBoundaryIndicator());
2061 std::unordered_set<types::global_dof_index> boundary_dofs;
2062 std::vector<types::global_dof_index> dofs_on_face;
2063 dofs_on_face.reserve(this->get_fe_collection().max_dofs_per_face());
2065 const IndexSet &owned_dofs = locally_owned_dofs();
2067 for (
const auto &cell : this->active_cell_iterators())
2068 if (cell->is_locally_owned() && cell->at_boundary())
2070 for (
const auto iface : cell->face_indices())
2072 const auto face = cell->face(iface);
2073 const unsigned int boundary_id = face->boundary_id();
2074 if (face->at_boundary() &&
2075 (boundary_ids.find(boundary_id) != boundary_ids.end()))
2077 const unsigned int dofs_per_face =
2078 cell->get_fe().n_dofs_per_face(iface);
2079 dofs_on_face.resize(dofs_per_face);
2081 face->get_dof_indices(dofs_on_face, cell->active_fe_index());
2082 for (
unsigned int i = 0; i < dofs_per_face; ++i)
2084 const unsigned int global_idof_index = dofs_on_face[i];
2085 if (owned_dofs.
is_element(global_idof_index))
2087 boundary_dofs.insert(global_idof_index);
2093 return boundary_dofs.size();
2098template <
int dim,
int spacedim>
2114 if (hp_capability_enabled)
2127 if (this->mg_faces !=
nullptr)
2130 for (
unsigned int i = 0; i < this->mg_vertex_dofs.size(); ++i)
2131 mem +=
sizeof(MGVertexDoFs) +
2132 (1 + this->mg_vertex_dofs[i].get_finest_level() -
2133 this->mg_vertex_dofs[i].get_coarsest_level()) *
2142template <
int dim,
int spacedim>
2152template <
int dim,
int spacedim>
2157 Assert(this->tria !=
nullptr,
2159 "You need to set the Triangulation in the DoFHandler using reinit() "
2160 "or in the constructor before you can distribute DoFs."));
2162 ExcMessage(
"The Triangulation you are using is empty!"));
2166 Assert((ff.
size() <= std::numeric_limits<types::fe_index>::max()) &&
2168 ExcMessage(
"The given hp::FECollection contains more finite elements "
2169 "than the DoFHandler can cover with active FE indices."));
2174 if ((hp_cell_active_fe_indices.size() > 0) &&
2175 (hp_cell_future_fe_indices.size() > 0))
2179 for (
const auto &cell :
2183 ExcInvalidFEIndex(cell->active_fe_index(), ff.
size()));
2185 ExcInvalidFEIndex(cell->future_fe_index(), ff.
size()));
2194 if (this->fe_collection != ff)
2198 const bool contains_multiple_fes = (this->fe_collection.size() > 1);
2201 if (hp_capability_enabled && !contains_multiple_fes)
2203 hp_capability_enabled =
false;
2207 for (
auto &connection : this->tria_listeners_for_transfer)
2208 connection.disconnect();
2209 this->tria_listeners_for_transfer.clear();
2212 this->hp_cell_active_fe_indices.clear();
2213 this->hp_cell_active_fe_indices.shrink_to_fit();
2214 this->hp_cell_future_fe_indices.clear();
2215 this->hp_cell_future_fe_indices.shrink_to_fit();
2221 hp_capability_enabled || !contains_multiple_fes,
2223 "You cannot re-enable hp-capabilities after you registered a single "
2224 "finite element. Please call reinit() or create a new DoFHandler "
2225 "object instead."));
2231 if (hp_capability_enabled)
2249 subdomain_modifier(this->get_triangulation());
2258 if (hp_capability_enabled)
2266 this->number_cache = this->policy->distribute_dofs();
2283 if (!hp_capability_enabled &&
2285 *
>(&*this->tria) ==
nullptr)
2286 this->block_info_object.initialize(*
this,
false,
true);
2291template <
int dim,
int spacedim>
2295 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2298 this->object_dof_indices.size() > 0,
2300 "Distribute active DoFs using distribute_dofs() before calling distribute_mg_dofs()."));
2307 "The mesh smoothing requirement 'limit_level_difference_at_vertices' has to be set for using multigrid!"));
2309 this->clear_mg_space();
2312 this->mg_number_cache = this->policy->distribute_mg_dofs();
2317 &*this->tria) ==
nullptr)
2318 this->block_info_object.initialize(*
this,
true,
false);
2323template <
int dim,
int spacedim>
2327 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2329 this->block_info_object.initialize_local(*
this);
2334template <
int dim,
int spacedim>
2339 if (
dynamic_cast<const ::parallel::shared::Triangulation<dim, spacedim>
2340 *
>(&this->get_triangulation()) !=
nullptr)
2341 this->policy = std::make_unique<internal::DoFHandlerImplementation::Policy::
2342 ParallelShared<dim, spacedim>>(*this);
2343 else if (
dynamic_cast<
2344 const ::parallel::DistributedTriangulationBase<dim, spacedim>
2345 *
>(&this->get_triangulation()) ==
nullptr)
2346 this->policy = std::make_unique<
2351 std::make_unique<internal::DoFHandlerImplementation::Policy::
2352 ParallelDistributed<dim, spacedim>>(*this);
2357template <
int dim,
int spacedim>
2362 this->clear_space();
2363 this->clear_mg_space();
2368template <
int dim,
int spacedim>
2372 object_dof_indices.clear();
2374 object_dof_ptr.clear();
2376 this->number_cache.clear();
2378 this->hp_cell_active_fe_indices.clear();
2379 this->hp_cell_future_fe_indices.clear();
2384template <
int dim,
int spacedim>
2388 this->mg_levels.clear();
2389 this->mg_faces.reset();
2391 std::vector<MGVertexDoFs> tmp;
2393 std::swap(this->mg_vertex_dofs, tmp);
2395 this->mg_number_cache.clear();
2400template <
int dim,
int spacedim>
2403 const std::vector<types::global_dof_index> &new_numbers)
2405 if (hp_capability_enabled)
2407 Assert(this->hp_cell_future_fe_indices.size() > 0,
2409 "You need to distribute DoFs before you can renumber them."));
2418 if (this->n_locally_owned_dofs() == this->n_dofs())
2420 std::vector<types::global_dof_index> tmp(new_numbers);
2421 std::sort(tmp.begin(), tmp.end());
2422 std::vector<types::global_dof_index>::const_iterator p = tmp.begin();
2424 for (; p != tmp.end(); ++p, ++i)
2425 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2428 for (
const auto new_number : new_numbers)
2429 Assert(new_number < this->n_dofs(),
2431 "New DoF index is not less than the total number of dofs."));
2448 this->number_cache = this->policy->renumber_dofs(new_numbers);
2463 Assert(this->object_dof_indices.size() > 0,
2465 "You need to distribute DoFs before you can renumber them."));
2469 &*this->tria) !=
nullptr)
2471 Assert(new_numbers.size() == this->n_dofs() ||
2472 new_numbers.size() == this->n_locally_owned_dofs(),
2473 ExcMessage(
"Incorrect size of the input array."));
2475 else if (
dynamic_cast<
2477 &*this->tria) !=
nullptr)
2490 if (this->n_locally_owned_dofs() == this->n_dofs())
2492 std::vector<types::global_dof_index> tmp(new_numbers);
2493 std::sort(tmp.begin(), tmp.end());
2494 std::vector<types::global_dof_index>::const_iterator p = tmp.begin();
2496 for (; p != tmp.end(); ++p, ++i)
2497 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2500 for (
const auto new_number : new_numbers)
2501 Assert(new_number < this->n_dofs(),
2503 "New DoF index is not less than the total number of dofs."));
2506 this->number_cache = this->policy->renumber_dofs(new_numbers);
2512template <
int dim,
int spacedim>
2515 const unsigned int level,
2516 const std::vector<types::global_dof_index> &new_numbers)
2518 AssertThrow(hp_capability_enabled ==
false, ExcNotImplementedWithHP());
2521 this->mg_levels.size() > 0 && this->object_dof_indices.size() > 0,
2523 "You need to distribute active and level DoFs before you can renumber level DoFs."));
2526 this->locally_owned_mg_dofs(
level).n_elements());
2533 if (this->n_locally_owned_dofs() == this->n_dofs())
2535 std::vector<types::global_dof_index> tmp(new_numbers);
2536 std::sort(tmp.begin(), tmp.end());
2537 std::vector<types::global_dof_index>::const_iterator p = tmp.begin();
2539 for (; p != tmp.end(); ++p, ++i)
2540 Assert(*p == i, ExcNewNumbersNotConsecutive(i));
2543 for (
const auto new_number : new_numbers)
2546 "New DoF index is not less than the total number of dofs."));
2549 this->mg_number_cache[
level] =
2550 this->policy->renumber_mg_dofs(
level, new_numbers);
2555template <
int dim,
int spacedim>
2560 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2565 return this->fe_collection.max_dofs_per_vertex();
2567 return (3 * this->fe_collection.max_dofs_per_vertex() +
2568 2 * this->fe_collection.max_dofs_per_line());
2579 return (19 * this->fe_collection.max_dofs_per_vertex() +
2580 28 * this->fe_collection.max_dofs_per_line() +
2581 8 * this->fe_collection.max_dofs_per_quad());
2590template <
int dim,
int spacedim>
2594 Assert(this->fe_collection.size() > 0, ExcNoFESelected());
2601template <
int dim,
int spacedim>
2604 const std::vector<types::fe_index> &active_fe_indices)
2606 Assert(active_fe_indices.size() == this->get_triangulation().n_active_cells(),
2608 this->get_triangulation().n_active_cells()));
2610 this->create_active_fe_table();
2615 for (
const auto &cell : this->active_cell_iterators())
2616 if (cell->is_locally_owned())
2617 cell->set_active_fe_index(active_fe_indices[cell->active_cell_index()]);
2622template <
int dim,
int spacedim>
2625 const std::vector<unsigned int> &active_fe_indices)
2627 set_active_fe_indices(std::vector<types::fe_index>(active_fe_indices.begin(),
2628 active_fe_indices.end()));
2633template <
int dim,
int spacedim>
2638 std::vector<types::fe_index> active_fe_indices(
2644 for (
const auto &cell : this->active_cell_iterators())
2645 if (!cell->is_artificial())
2646 active_fe_indices[cell->active_cell_index()] = cell->active_fe_index();
2648 return active_fe_indices;
2653template <
int dim,
int spacedim>
2656 std::vector<unsigned int> &active_fe_indices)
const
2660 active_fe_indices.assign(indices.begin(), indices.end());
2665template <
int dim,
int spacedim>
2668 const std::vector<types::fe_index> &future_fe_indices)
2670 Assert(future_fe_indices.size() == this->get_triangulation().n_active_cells(),
2672 this->get_triangulation().n_active_cells()));
2674 this->create_active_fe_table();
2679 for (
const auto &cell : this->active_cell_iterators())
2680 if (cell->is_locally_owned() &&
2681 future_fe_indices[cell->active_cell_index()] !=
2683 cell->set_future_fe_index(future_fe_indices[cell->active_cell_index()]);
2688template <
int dim,
int spacedim>
2693 std::vector<types::fe_index> future_fe_indices(
2699 for (
const auto &cell : this->active_cell_iterators())
2700 if (cell->is_locally_owned() && cell->future_fe_index_set())
2701 future_fe_indices[cell->active_cell_index()] = cell->future_fe_index();
2703 return future_fe_indices;
2708template <
int dim,
int spacedim>
2713 Assert(hp_capability_enabled, ExcOnlyAvailableWithHP());
2716 this->tria_listeners.push_back(this->tria->
signals.
create.connect(
2717 [
this]() { this->reinit(*(this->tria)); }));
2718 this->tria_listeners.push_back(
2719 this->tria->
signals.
clear.connect([
this]() { this->clear(); }));
2724 const ::parallel::fullydistributed::Triangulation<dim, spacedim>
2725 *
>(&this->get_triangulation()))
2729 else if (
dynamic_cast<
2730 const ::parallel::distributed::Triangulation<dim, spacedim>
2731 *
>(&this->get_triangulation()))
2734 this->tria_listeners_for_transfer.push_back(
2736 internal::hp::DoFHandlerImplementation::Implementation::
2737 ensure_absence_of_future_fe_indices<dim, spacedim>(*this);
2739 this->tria_listeners_for_transfer.push_back(
2741 [
this]() { this->pre_distributed_transfer_action(); }));
2742 this->tria_listeners_for_transfer.push_back(
2744 [
this] { this->post_distributed_transfer_action(); }));
2747 this->tria_listeners_for_transfer.push_back(
2749 [
this]() { this->pre_distributed_transfer_action(); }));
2750 this->tria_listeners_for_transfer.push_back(
2752 [
this]() { this->post_distributed_transfer_action(); }));
2755 this->tria_listeners_for_transfer.push_back(
2757 [
this]() { this->active_fe_index_transfer.reset(); }));
2758 this->tria_listeners_for_transfer.push_back(
2760 [
this]() { this->update_active_fe_table(); }));
2762 else if (
dynamic_cast<
2763 const ::parallel::shared::Triangulation<dim, spacedim> *
>(
2764 &this->get_triangulation()) !=
nullptr)
2767 this->tria_listeners_for_transfer.push_back(
2769 internal::hp::DoFHandlerImplementation::Implementation::
2770 ensure_absence_of_future_fe_indices(*this);
2774 this->tria_listeners_for_transfer.push_back(
2776 internal::hp::DoFHandlerImplementation::Implementation::
2777 communicate_future_fe_indices(*this);
2779 this->tria_listeners_for_transfer.push_back(
2781 [
this] { this->pre_transfer_action(); }));
2782 this->tria_listeners_for_transfer.push_back(
2784 [
this] { this->post_transfer_action(); }));
2789 this->tria_listeners_for_transfer.push_back(
2791 [
this] { this->pre_transfer_action(); }));
2792 this->tria_listeners_for_transfer.push_back(
2794 [
this] { this->post_transfer_action(); }));
2800template <
int dim,
int spacedim>
2804 AssertThrow(hp_capability_enabled ==
true, ExcOnlyAvailableWithHP());
2811 this->hp_cell_active_fe_indices.resize(this->tria->
n_levels());
2812 this->hp_cell_future_fe_indices.resize(this->tria->
n_levels());
2816 for (
unsigned int level = 0;
level < this->hp_cell_future_fe_indices.size();
2819 if (this->hp_cell_active_fe_indices[
level].size() == 0 &&
2820 this->hp_cell_future_fe_indices[
level].size() == 0)
2822 this->hp_cell_active_fe_indices[
level].resize(
2824 this->hp_cell_future_fe_indices[
level].resize(
2832 Assert(this->hp_cell_active_fe_indices[
level].size() ==
2834 this->hp_cell_future_fe_indices[
level].size() ==
2835 this->tria->n_raw_cells(
level),
2851template <
int dim,
int spacedim>
2867 this->hp_cell_active_fe_indices.resize(this->tria->
n_levels());
2868 this->hp_cell_active_fe_indices.shrink_to_fit();
2870 this->hp_cell_future_fe_indices.resize(this->tria->
n_levels());
2871 this->hp_cell_future_fe_indices.shrink_to_fit();
2873 for (
unsigned int i = 0; i < this->hp_cell_future_fe_indices.size(); ++i)
2876 this->hp_cell_active_fe_indices[i].resize(this->tria->
n_raw_cells(i), 0);
2883 this->hp_cell_future_fe_indices[i].assign(this->tria->
n_raw_cells(i),
2889template <
int dim,
int spacedim>
2895 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(
2934 for (
const auto &cell : active_cell_iterators())
2935 if (cell->is_locally_owned())
2936 active_fe_index_transfer->active_fe_indices[cell->active_cell_index()] =
2937 cell->future_fe_index();
2940 const auto *distributed_tria =
2942 &this->get_triangulation());
2944 active_fe_index_transfer->cell_data_transfer = std::make_unique<
2945 parallel::distributed::
2946 CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
2950 &::AdaptationStrategies::Refinement::
2951 preserve<dim, spacedim, types::fe_index>,
2954 const std::vector<types::fe_index> &children_fe_indices)
2956 return ::internal::hp::DoFHandlerImplementation::Implementation::
2957 determine_fe_from_children<dim, spacedim>(parent,
2958 children_fe_indices,
2962 active_fe_index_transfer->cell_data_transfer
2963 ->prepare_for_coarsening_and_refinement(
2964 active_fe_index_transfer->active_fe_indices);
2970template <
int dim,
int spacedim>
2974 update_active_fe_table();
2988 this->active_fe_index_transfer.reset();
2993template <
int dim,
int spacedim>
2997#ifndef DEAL_II_WITH_P4EST
3000 update_active_fe_table();
3005 this->active_fe_index_transfer->active_fe_indices.resize(
3007 this->active_fe_index_transfer->cell_data_transfer->unpack(
3008 this->active_fe_index_transfer->active_fe_indices);
3011 this->set_active_fe_indices(
3012 this->active_fe_index_transfer->active_fe_indices);
3019 this->active_fe_index_transfer.reset();
3025template <
int dim,
int spacedim>
3029#ifndef DEAL_II_WITH_P4EST
3032 "You are attempting to use a functionality that is only available "
3033 "if deal.II was configured to use p4est, but cmake did not find a "
3034 "valid p4est library."));
3039 &this->get_triangulation()) !=
nullptr),
3044 active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
3047 const auto *distributed_tria =
3049 &this->get_triangulation());
3051 active_fe_index_transfer->cell_data_transfer = std::make_unique<
3052 parallel::distributed::
3053 CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
3057 &::AdaptationStrategies::Refinement::
3058 preserve<dim, spacedim, types::fe_index>,
3061 const std::vector<types::fe_index> &children_fe_indices)
3063 return ::internal::hp::DoFHandlerImplementation::Implementation::
3064 determine_fe_from_children<dim, spacedim>(parent,
3065 children_fe_indices,
3076 active_fe_index_transfer->cell_data_transfer->prepare_for_serialization(
3077 active_fe_index_transfer->active_fe_indices);
3083template <
int dim,
int spacedim>
3087#ifndef DEAL_II_WITH_P4EST
3090 "You are attempting to use a functionality that is only available "
3091 "if deal.II was configured to use p4est, but cmake did not find a "
3092 "valid p4est library."));
3097 &this->get_triangulation()) !=
nullptr),
3102 active_fe_index_transfer = std::make_unique<ActiveFEIndexTransfer>();
3105 const auto *distributed_tria =
3107 &this->get_triangulation());
3109 active_fe_index_transfer->cell_data_transfer = std::make_unique<
3110 parallel::distributed::
3111 CellDataTransfer<dim, spacedim, std::vector<types::fe_index>>>(
3115 &::AdaptationStrategies::Refinement::
3116 preserve<dim, spacedim, types::fe_index>,
3119 const std::vector<types::fe_index> &children_fe_indices)
3121 return ::internal::hp::DoFHandlerImplementation::Implementation::
3122 determine_fe_from_children<dim, spacedim>(parent,
3123 children_fe_indices,
3128 active_fe_index_transfer->active_fe_indices.resize(
3130 active_fe_index_transfer->cell_data_transfer->deserialize(
3131 active_fe_index_transfer->active_fe_indices);
3134 set_active_fe_indices(active_fe_index_transfer->active_fe_indices);
3141 active_fe_index_transfer.reset();
3147template <
int dim,
int spacedim>
3150 : coarsest_level(
numbers::invalid_unsigned_int)
3156template <
int dim,
int spacedim>
3159 const unsigned int cl,
3160 const unsigned int fl,
3161 const unsigned int dofs_per_vertex)
3163 coarsest_level = cl;
3166 if (coarsest_level <= finest_level)
3168 const unsigned int n_levels = finest_level - coarsest_level + 1;
3169 const unsigned int n_indices = n_levels * dofs_per_vertex;
3171 indices = std::make_unique<types::global_dof_index[]>(n_indices);
3172 std::fill(indices.get(),
3173 indices.get() + n_indices,
3182template <
int dim,
int spacedim>
3186 return coarsest_level;
3191template <
int dim,
int spacedim>
3195 return finest_level;
3199#include "dof_handler.inst"
void init(const unsigned int coarsest_level, const unsigned int finest_level, const unsigned int dofs_per_vertex)
unsigned int get_finest_level() const
unsigned int get_coarsest_level() const
cell_iterator end() const
void pre_distributed_transfer_action()
void post_transfer_action()
virtual std::size_t memory_consumption() const
std::vector< types::fe_index > get_future_fe_indices() const
unsigned int max_couplings_between_dofs() const
std::vector< std::unique_ptr<::internal::DoFHandlerImplementation::DoFLevel< dim > > > mg_levels
std::unique_ptr< ActiveFEIndexTransfer > active_fe_index_transfer
hp::FECollection< dim, spacedim > fe_collection
void create_active_fe_table()
std::vector< std::vector< types::fe_index > > hp_cell_future_fe_indices
SmartPointer< const Triangulation< dim, spacedim >, DoFHandler< dim, spacedim > > tria
level_cell_iterator end_mg() const
void renumber_dofs(const std::vector< types::global_dof_index > &new_numbers)
const FiniteElement< dim, spacedim > & get_fe(const types::fe_index index=0) const
level_cell_iterator begin_mg(const unsigned int level=0) const
void distribute_dofs(const FiniteElement< dim, spacedim > &fe)
types::global_dof_index n_boundary_dofs() const
void connect_to_triangulation_signals()
std::vector< std::vector< types::fe_index > > hp_cell_active_fe_indices
std::vector< MGVertexDoFs > mg_vertex_dofs
void post_distributed_transfer_action()
std::vector< std::array< std::vector< types::global_dof_index >, dim+1 > > object_dof_indices
const Triangulation< dim, spacedim > & get_triangulation() const
void pre_transfer_action()
void reinit(const Triangulation< dim, spacedim > &tria)
std::vector< std::array< std::vector< offset_type >, dim+1 > > object_dof_ptr
std::unique_ptr<::internal::DoFHandlerImplementation::DoFFaces< dim > > mg_faces
active_cell_iterator begin_active(const unsigned int level=0) const
std::vector< types::fe_index > get_active_fe_indices() const
void distribute_mg_dofs()
active_cell_iterator end_active(const unsigned int level) const
bool hp_capability_enabled
void initialize_local_block_info()
types::global_dof_index n_dofs() const
void update_active_fe_table()
typename LevelSelector::cell_iterator level_cell_iterator
void prepare_for_serialization_of_active_fe_indices()
cell_iterator begin(const unsigned int level=0) const
std::array< std::vector< offset_type >, dim+1 > hp_object_fe_ptr
std::array< std::vector< types::fe_index >, dim+1 > hp_object_fe_indices
void set_active_fe_indices(const std::vector< types::fe_index > &active_fe_indices)
unsigned int max_couplings_between_boundary_dofs() const
void deserialize_active_fe_indices()
void set_future_fe_indices(const std::vector< types::fe_index > &future_fe_indices)
virtual ~DoFHandler() override
unsigned int n_dofs_per_vertex() const
unsigned int n_dofs_per_line() const
bool is_element(const size_type index) const
IteratorState::IteratorStates state() const
virtual const MeshSmoothing & get_mesh_smoothing() const
cell_iterator begin(const unsigned int level=0) const
unsigned int n_raw_lines() const
unsigned int n_raw_faces() const
unsigned int n_levels() const
cell_iterator end() const
unsigned int n_raw_cells(const unsigned int level) const
unsigned int max_adjacent_cells() const
bool vertex_used(const unsigned int index) const
unsigned int n_raw_quads() const
unsigned int n_cells() const
unsigned int n_vertices() const
unsigned int n_raw_hexs(const unsigned int level) const
unsigned int size() const
unsigned int max_dofs_per_line() const
unsigned int max_dofs_per_hex() const
unsigned int max_dofs_per_vertex() const
unsigned int max_dofs_per_quad() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_CXX20_REQUIRES(condition)
#define DEAL_II_NAMESPACE_CLOSE
IteratorRange< active_cell_iterator > active_cell_iterators() const
IteratorRange< level_cell_iterator > mg_cell_iterators() const
IteratorRange< active_cell_iterator > active_cell_iterators_on_level(const unsigned int level) const
IteratorRange< cell_iterator > cell_iterators_on_level(const unsigned int level) const
IteratorRange< cell_iterator > cell_iterators() const
IteratorRange< level_cell_iterator > mg_cell_iterators_on_level(const unsigned int level) const
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcNoDominatedFiniteElementOnChildren()
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
typename ActiveSelector::cell_iterator cell_iterator
typename ActiveSelector::active_cell_iterator active_cell_iterator
Task< RT > new_task(const std::function< RT()> &function)
@ valid
Iterator points to a valid object.
std::enable_if_t< std::is_fundamental< T >::value, 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)
const ::Triangulation< dim, spacedim > & tria