73 template <
int dim,
typename Number =
double>
85 double downstream_size = 0;
87 for (
unsigned int d = 0; d < dim; ++d)
89 downstream_size += (rhs[d] - lhs[d]) * weight;
92 if (downstream_size < 0)
94 else if (downstream_size > 0)
98 for (
unsigned int d = 0; d < dim; ++d)
100 if (lhs[d] == rhs[d])
102 return lhs[d] < rhs[d];
122 template <
int dim,
int spacedim>
123 std::vector<unsigned char>
127 std::vector<unsigned char> local_component_association(
136 local_component_association[i] =
147 const unsigned int first_comp =
152 local_component_association[i] = first_comp;
159 for (
unsigned int c = first_comp; c < fe.
n_components(); ++c)
160 if (component_mask[c] ==
true)
162 local_component_association[i] = c;
167 Assert(std::find(local_component_association.begin(),
168 local_component_association.end(),
169 static_cast<unsigned char>(-1)) ==
170 local_component_association.end(),
173 return local_component_association;
193 template <
int dim,
int spacedim>
198 std::vector<unsigned char> &dofs_by_component,
201 const ::hp::FECollection<dim, spacedim> &fe_collection =
205 const auto &locally_owned_dofs =
211 locally_owned_dofs.n_elements());
220 std::vector<std::vector<unsigned char>> local_component_association(
221 fe_collection.size());
222 for (
unsigned int f = 0; f < fe_collection.size(); ++f)
225 local_component_association[f] =
230 std::vector<types::global_dof_index> indices;
232 const auto runner = [&](
const auto &task) {
238 indices.resize(cell->get_fe().n_dofs_per_cell());
239 cell->get_dof_indices(indices);
246 for (
const auto &cell :
248 if (cell->is_locally_owned_on_level())
250 indices.resize(cell->get_fe().n_dofs_per_cell());
251 cell->get_mg_dof_indices(indices);
258 runner([&](
const auto &cell) {
260 for (
unsigned int i = 0; i < cell->get_fe().n_dofs_per_cell(); ++i)
261 if (locally_owned_dofs.is_element(indices[i]))
262 dofs_by_component[locally_owned_dofs.index_within_set(indices[i])] =
263 local_component_association[fe_index][i];
275 template <
int dim,
int spacedim>
278 std::vector<unsigned char> &dofs_by_block)
280 const ::hp::FECollection<dim, spacedim> &fe_collection =
294 std::vector<std::vector<unsigned char>> local_block_association(
295 fe_collection.size());
296 for (
unsigned int f = 0; f < fe_collection.size(); ++f)
300 static_cast<unsigned char>(-1));
304 Assert(std::find(local_block_association[f].begin(),
305 local_block_association[f].end(),
306 static_cast<unsigned char>(-1)) ==
307 local_block_association[f].end(),
312 std::vector<types::global_dof_index> indices;
314 if (cell->is_locally_owned())
317 const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
318 indices.resize(dofs_per_cell);
319 cell->get_dof_indices(indices);
320 for (
unsigned int i = 0; i < dofs_per_cell; ++i)
323 indices[i])] = local_block_association[fe_index][i];
330 template <
int dim,
int spacedim,
typename Number>
335 const unsigned int component)
344 for (
unsigned int i = 0; i < fe_collection.size(); ++i)
346 Assert(fe_collection[i].is_primitive() ==
true,
353 const bool consider_components =
357 if (consider_components ==
false)
361 std::vector<unsigned char> component_dofs(
368 for (
unsigned int i = 0; i < dof_data.
size(); ++i)
369 if (component_dofs[i] ==
static_cast<unsigned char>(component))
374 std::vector<unsigned char> touch_count(dof_handler.
n_dofs(), 0);
376 std::vector<types::global_dof_index> dof_indices;
377 dof_indices.reserve(fe_collection.max_dofs_per_cell());
381 const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
382 dof_indices.resize(dofs_per_cell);
383 cell->get_dof_indices(dof_indices);
385 for (
unsigned int i = 0; i < dofs_per_cell; ++i)
388 if (!consider_components ||
389 (cell->get_fe().system_to_component_index(i).first == component))
392 dof_data(dof_indices[i]) += cell_data(cell->active_cell_index());
395 ++touch_count[dof_indices[i]];
405 Assert(consider_components || (touch_count[i] != 0),
407 if (touch_count[i] != 0)
408 dof_data(i) /= touch_count[i];
414 template <
int dim,
int spacedim>
422 "The given component mask is not sized correctly to represent the "
423 "components of the given finite element."));
441 std::vector<types::global_dof_index> selected_dofs;
444 if (component_mask[dofs_by_component[i]] ==
true)
449 result.
add_indices(selected_dofs.begin(), selected_dofs.end());
455 template <
int dim,
int spacedim>
461 return extract_dofs<dim, spacedim>(
467 template <
int dim,
int spacedim>
468 std::vector<IndexSet>
475 "The given component mask is not sized correctly to represent the "
476 "components of the given finite element."));
485 std::vector<IndexSet> index_per_comp(n_comps,
IndexSet(dof.
n_dofs()));
489 const auto &comp_i = dofs_by_component[i];
490 if (component_mask[comp_i])
491 index_per_comp[comp_i].add_index(
492 locally_owned_dofs.nth_index_in_set(i));
494 for (
const auto &c : index_per_comp)
496 return index_per_comp;
501 template <
int dim,
int spacedim>
506 std::vector<bool> &selected_dofs)
513 "The given component mask is not sized correctly to represent the "
514 "components of the given finite element."));
523 std::fill_n(selected_dofs.begin(), dof.
n_dofs(
level),
false);
530 std::fill_n(selected_dofs.begin(), dof.
n_dofs(
level),
true);
535 std::fill_n(selected_dofs.begin(), dof.
n_dofs(
level),
false);
539 std::vector<unsigned char> local_component_association =
543 local_selected_dofs[i] = component_mask[local_component_association[i]];
549 cell->get_mg_dof_indices(indices);
551 selected_dofs[indices[i]] = local_selected_dofs[i];
557 template <
int dim,
int spacedim>
562 std::vector<bool> &selected_dofs)
573 template <
int dim,
int spacedim>
577 std::vector<bool> &selected_dofs,
578 const std::set<types::boundary_id> &boundary_ids)
584 "This function can not be used with distributed triangulations. "
585 "See the documentation for more information."));
591 selected_dofs.clear();
592 selected_dofs.resize(dof_handler.
n_dofs(),
false);
600 template <
int dim,
int spacedim>
605 const std::set<types::boundary_id> &boundary_ids)
614 template <
int dim,
int spacedim>
618 const std::set<types::boundary_id> &boundary_ids)
622 ExcMessage(
"Component mask has invalid size."));
631 const bool check_boundary_id = (boundary_ids.size() != 0);
635 const bool check_vector_component =
641 std::vector<types::global_dof_index> face_dof_indices;
642 face_dof_indices.reserve(
654 if (cell->is_artificial() ==
false)
655 for (
const unsigned int face : cell->face_indices())
656 if (cell->at_boundary(face))
657 if (!check_boundary_id ||
658 (boundary_ids.find(cell->face(face)->boundary_id()) !=
663 const auto reference_cell = cell->reference_cell();
665 const unsigned int n_vertices_per_cell =
666 reference_cell.n_vertices();
667 const unsigned int n_lines_per_cell = reference_cell.n_lines();
668 const unsigned int n_vertices_per_face =
669 reference_cell.face_reference_cell(face).n_vertices();
670 const unsigned int n_lines_per_face =
671 reference_cell.face_reference_cell(face).n_lines();
674 face_dof_indices.resize(dofs_per_face);
675 cell->face(face)->get_dof_indices(face_dof_indices,
676 cell->active_fe_index());
679 if (!check_vector_component)
680 selected_dofs.
add_index(face_dof_indices[i]);
695 (dim == 3 ? (i < n_vertices_per_face *
698 (i < n_vertices_per_face *
702 (i - n_vertices_per_face *
704 n_vertices_per_cell *
707 n_vertices_per_face *
711 n_vertices_per_cell *
721 selected_dofs.
add_index(face_dof_indices[i]);
725 const unsigned int first_nonzero_comp =
731 if (component_mask[first_nonzero_comp] ==
true)
732 selected_dofs.
add_index(face_dof_indices[i]);
737 return selected_dofs;
742 template <
int dim,
int spacedim>
747 std::vector<bool> &selected_dofs,
748 const std::set<types::boundary_id> &boundary_ids)
752 ExcMessage(
"This component mask has the wrong size."));
759 const bool check_boundary_id = (boundary_ids.size() != 0);
763 const bool check_vector_component =
767 selected_dofs.clear();
768 selected_dofs.resize(dof_handler.
n_dofs(),
false);
769 std::vector<types::global_dof_index> cell_dof_indices;
770 cell_dof_indices.reserve(
780 for (
const unsigned int face : cell->face_indices())
781 if (cell->at_boundary(face))
782 if (!check_boundary_id ||
783 (boundary_ids.find(cell->face(face)->boundary_id()) !=
789 cell_dof_indices.resize(dofs_per_cell);
790 cell->get_dof_indices(cell_dof_indices);
795 if (!check_vector_component)
796 selected_dofs[cell_dof_indices[i]] =
true;
803 selected_dofs[cell_dof_indices[i]] =
808 const unsigned int first_nonzero_comp =
814 selected_dofs[cell_dof_indices[i]] =
815 (component_mask[first_nonzero_comp] ==
true);
824 template <
int dim,
int spacedim,
typename number>
833 const std::function<
bool(
838 ->
bool {
return cell->is_locally_owned() && predicate(cell); };
840 std::vector<types::global_dof_index> local_dof_indices;
841 local_dof_indices.reserve(
845 std::set<types::global_dof_index> predicate_dofs;
848 if (!cell->is_artificial() && predicate(cell))
850 local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
851 cell->get_dof_indices(local_dof_indices);
852 predicate_dofs.insert(local_dof_indices.begin(),
853 local_dof_indices.end());
857 std::set<types::global_dof_index> dofs_with_support_on_halo_cells;
859 const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
863 active_cell_iterator>::const_iterator it =
865 it != halo_cells.end();
877 const unsigned int dofs_per_cell = (*it)->get_fe().n_dofs_per_cell();
878 local_dof_indices.resize(dofs_per_cell);
879 (*it)->get_dof_indices(local_dof_indices);
880 dofs_with_support_on_halo_cells.insert(local_dof_indices.begin(),
881 local_dof_indices.end());
893 std::set<types::global_dof_index> extra_halo;
894 for (
const auto dof : dofs_with_support_on_halo_cells)
900 const unsigned int line_size = line_ptr->size();
901 for (
unsigned int j = 0; j < line_size; ++j)
902 extra_halo.insert((*line_ptr)[j].first);
905 dofs_with_support_on_halo_cells.insert(extra_halo.begin(),
912 support_set.
add_indices(predicate_dofs.begin(), predicate_dofs.end());
916 halo_set.
add_indices(dofs_with_support_on_halo_cells.begin(),
917 dofs_with_support_on_halo_cells.end());
932 template <
int spacedim>
941 template <
int spacedim>
945 const unsigned int dim = 2;
953 for (
const auto &cell : dof_handler.active_cell_iterators())
954 if (!cell->is_artificial())
956 for (
const unsigned int face : cell->face_indices())
957 if (cell->face(face)->has_children())
960 line = cell->face(face);
964 selected_dofs.add_index(
965 line->child(0)->vertex_dof_index(1, dof));
967 for (
unsigned int child = 0; child < 2; ++child)
969 if (cell->neighbor_child_on_subface(face, child)
974 selected_dofs.add_index(
975 line->child(child)->dof_index(dof));
980 selected_dofs.compress();
981 return selected_dofs;
985 template <
int spacedim>
989 const unsigned int dim = 3;
996 for (
const auto &cell : dof_handler.active_cell_iterators())
997 if (!cell->is_artificial())
998 for (auto f : cell->face_indices())
1002 if (cell->face(f)->has_children())
1004 for (
unsigned int child = 0; child < 4; ++child)
1005 if (!cell->neighbor_child_on_subface(f, child)
1009 std::vector<types::global_dof_index> ldi(
1011 face->child(child)->get_dof_indices(ldi);
1012 selected_dofs.add_indices(ldi.begin(), ldi.end());
1017 for (
unsigned int vertex = 0; vertex < 4; ++vertex)
1020 unconstrained_dofs.add_index(
1021 face->vertex_dof_index(vertex, dof));
1024 selected_dofs.subtract_set(unconstrained_dofs);
1025 return selected_dofs;
1032 template <
int dim,
int spacedim>
1036 return internal::extract_hanging_node_dofs(dof_handler);
1041 template <
int dim,
int spacedim>
1045 std::vector<bool> &selected_dofs)
1051 std::fill_n(selected_dofs.begin(), dof_handler.
n_dofs(),
false);
1053 std::vector<types::global_dof_index> local_dof_indices;
1054 local_dof_indices.reserve(
1060 if (cell->subdomain_id() == subdomain_id)
1062 const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
1063 local_dof_indices.resize(dofs_per_cell);
1064 cell->get_dof_indices(local_dof_indices);
1065 for (
unsigned int i = 0; i < dofs_per_cell; ++i)
1066 selected_dofs[local_dof_indices[i]] =
true;
1072 template <
int dim,
int spacedim>
1082 std::vector<types::global_dof_index> dof_indices;
1083 std::set<types::global_dof_index> global_dof_indices;
1088 dof_indices.resize(cell->get_fe().n_dofs_per_cell());
1089 cell->get_dof_indices(dof_indices);
1093 global_dof_indices.insert(dof_index);
1096 dof_set.
add_indices(global_dof_indices.begin(), global_dof_indices.end());
1105 template <
int dim,
int spacedim>
1115 template <
int dim,
int spacedim>
1119 const unsigned int level)
1127 std::vector<types::global_dof_index> dof_indices;
1128 std::set<types::global_dof_index> global_dof_indices;
1130 const auto filtered_iterators_range =
1133 for (
const auto &cell : filtered_iterators_range)
1135 dof_indices.resize(cell->get_fe().n_dofs_per_cell());
1136 cell->get_mg_dof_indices(dof_indices);
1140 global_dof_indices.insert(dof_index);
1143 dof_set.
add_indices(global_dof_indices.begin(), global_dof_indices.end());
1152 template <
int dim,
int spacedim>
1157 const unsigned int level)
1164 template <
int dim,
int spacedim>
1179 std::vector<types::global_dof_index> dof_indices;
1180 std::vector<types::global_dof_index> dofs_on_ghosts;
1183 if (cell->is_ghost())
1185 dof_indices.resize(cell->get_fe().n_dofs_per_cell());
1186 cell->get_dof_indices(dof_indices);
1187 for (
const auto dof_index : dof_indices)
1189 dofs_on_ghosts.push_back(dof_index);
1193 std::sort(dofs_on_ghosts.begin(), dofs_on_ghosts.end());
1194 dof_set.
add_indices(dofs_on_ghosts.begin(), dofs_on_ghosts.end());
1202 template <
int dim,
int spacedim>
1212 template <
int dim,
int spacedim>
1216 const unsigned int level)
1229 std::vector<types::global_dof_index> dof_indices;
1230 std::vector<types::global_dof_index> dofs_on_ghosts;
1241 dof_indices.resize(cell->get_fe().n_dofs_per_cell());
1242 cell->get_mg_dof_indices(dof_indices);
1243 for (
const auto dof_index : dof_indices)
1245 dofs_on_ghosts.push_back(dof_index);
1249 std::sort(dofs_on_ghosts.begin(), dofs_on_ghosts.end());
1250 dof_set.
add_indices(dofs_on_ghosts.begin(), dofs_on_ghosts.end());
1258 template <
int dim,
int spacedim>
1262 const unsigned int level,
1271 template <
int dim,
int spacedim>
1272 std::vector<std::vector<bool>>
1275 const unsigned int mg_level)
1277 std::vector<std::vector<bool>> constant_modes;
1279 const auto &locally_owned_dofs =
1286 if (locally_owned_dofs.n_elements() == 0)
1288 return std::vector<std::vector<bool>>(0);
1295 std::vector<unsigned char> dofs_by_component(
1296 locally_owned_dofs.n_elements());
1301 unsigned int n_selected_dofs = 0;
1302 for (
unsigned int i = 0; i < n_components; ++i)
1303 if (component_mask[i] ==
true)
1305 std::count(dofs_by_component.begin(), dofs_by_component.end(), i);
1308 std::vector<unsigned int> component_numbering(
1310 for (
unsigned int i = 0, count = 0; i < locally_owned_dofs.n_elements();
1312 if (component_mask[dofs_by_component[i]])
1313 component_numbering[i] = count++;
1320 const ::hp::FECollection<dim, spacedim> &fe_collection =
1322 std::vector<Table<2, bool>> element_constant_modes;
1323 std::vector<std::vector<std::pair<unsigned int, unsigned int>>>
1324 constant_mode_to_component_translation(n_components);
1326 unsigned int n_constant_modes = 0;
1327 int first_non_empty_constant_mode = -1;
1328 for (
unsigned int f = 0; f < fe_collection.size(); ++f)
1330 std::pair<Table<2, bool>, std::vector<unsigned int>>
data =
1331 fe_collection[f].get_constant_modes();
1335 if (first_non_empty_constant_mode < 0 &&
data.first.n_rows() > 0)
1337 first_non_empty_constant_mode = f;
1341 for (
unsigned int i = 0; i <
data.second.size(); ++i)
1342 if (component_mask[
data.second[i]])
1343 constant_mode_to_component_translation[
data.second[i]]
1344 .emplace_back(n_constant_modes++, i);
1350 element_constant_modes.push_back(
data.first);
1351 Assert(element_constant_modes.back().n_rows() == 0 ||
1352 element_constant_modes.back().n_rows() ==
1353 element_constant_modes[first_non_empty_constant_mode]
1361 constant_modes.clear();
1362 constant_modes.resize(n_constant_modes,
1363 std::vector<bool>(n_selected_dofs,
false));
1367 std::vector<types::global_dof_index> dof_indices;
1369 const auto runner = [&](
const auto &task) {
1375 dof_indices.resize(cell->get_fe().n_dofs_per_cell());
1376 cell->get_dof_indices(dof_indices);
1383 for (
const auto &cell :
1385 if (cell->is_locally_owned_on_level())
1387 dof_indices.resize(cell->get_fe().n_dofs_per_cell());
1388 cell->get_mg_dof_indices(dof_indices);
1395 runner([&](
const auto &cell) {
1396 for (
unsigned int i = 0; i < dof_indices.size(); ++i)
1397 if (locally_owned_dofs.is_element(dof_indices[i]))
1399 const unsigned int loc_index =
1400 locally_owned_dofs.index_within_set(dof_indices[i]);
1401 const unsigned int comp = dofs_by_component[loc_index];
1402 if (component_mask[comp])
1403 for (auto &indices :
1404 constant_mode_to_component_translation[comp])
1405 constant_modes[indices
1406 .first][component_numbering[loc_index]] =
1407 element_constant_modes[cell->active_fe_index()](
1412 return constant_modes;
1424 static constexpr unsigned int n_modes = dim * (dim + 1) / 2;
1429 value(
const Point<dim> &p,
const unsigned int component)
const override;
1455 cproduct[0] = +tensor1[1] * tensor2[0];
1456 cproduct[1] = -tensor1[0] * tensor2[0];
1466 cproduct[0] = +tensor1[1] * tensor2[2] - tensor1[2] * tensor2[1];
1467 cproduct[1] = +tensor1[2] * tensor2[0] - tensor1[0] * tensor2[2];
1468 cproduct[2] = +tensor1[0] * tensor2[1] - tensor1[1] * tensor2[0];
1477 const unsigned int component)
const
1480 return static_cast<double>(component == type);
1482 if constexpr (dim >= 2)
1484 Tensor<1, n_modes - dim> dir;
1485 dir[type - dim] = 1.0;
1499 template <
int dim,
int spacedim>
1500 std::vector<std::vector<double>>
1504 const unsigned int mg_level)
1510 std::vector<std::vector<double>> rigid_body_modes(n_modes);
1521 for (
unsigned int i = 0; i < n_modes; ++i)
1526 rigid_body_modes_dealii,
1531 rigid_body_modes[i].assign(rigid_body_modes_dealii.begin(),
1532 rigid_body_modes_dealii.end());
1535 return rigid_body_modes;
1542 template <
int dim,
int spacedim>
1543 std::vector<std::vector<bool>>
1554 template <
int dim,
int spacedim>
1558 std::vector<std::vector<bool>> &constant_modes)
1564 constant_modes = temp;
1569 template <
int dim,
int spacedim>
1570 std::vector<std::vector<bool>>
1580 template <
int dim,
int spacedim>
1585 std::vector<std::vector<bool>> &constant_modes)
1589 constant_modes = temp;
1594 template <
int dim,
int spacedim>
1595 std::vector<std::vector<double>>
1608 template <
int dim,
int spacedim>
1609 std::vector<std::vector<double>>
1623 template <
int dim,
int spacedim>
1624 std::map<
typename DoFHandler<dim - 1, spacedim>::active_cell_iterator,
1625 std::pair<typename DoFHandler<dim, spacedim>::active_cell_iterator,
1636 std::map<
typename DoFHandler<dim - 1, spacedim>::active_cell_iterator,
1637 std::pair<typename DoFHandler<dim, spacedim>::active_cell_iterator,
1639 c1_to_c0_cell_and_face;
1642 if (c1_to_c0_face.empty())
1643 return c1_to_c0_cell_and_face;
1646 std::map<typename Triangulation<dim, spacedim>::face_iterator,
1647 typename DoFHandler<dim - 1, spacedim>::active_cell_iterator>
1651 for (
const auto &[c1_cell, c0_cell] : c1_to_c0_face)
1652 if (!c1_cell->has_children())
1653 c0_to_c1[c0_cell] = c1_cell->as_dof_handler_iterator(c1_dh);
1657 for (
const auto &cell :
1659 for (
const auto f : cell->face_indices())
1660 if (cell->face(f)->at_boundary())
1662 const auto &it = c0_to_c1.find(cell->face(f));
1663 if (it != c0_to_c1.end())
1665 const auto &c1_cell = it->second;
1666 c1_to_c0_cell_and_face[c1_cell] = {cell, f};
1672 return c1_to_c0_cell_and_face;
1677 template <
int dim,
int spacedim>
1680 std::vector<unsigned int> &active_fe_indices)
1687 active_fe_indices.assign(indices.begin(), indices.end());
1690 template <
int dim,
int spacedim>
1691 std::vector<IndexSet>
1695 ExcMessage(
"The given DoFHandler has no DoFs."));
1703 "For parallel::distributed::Triangulation objects and "
1704 "associated DoF handler objects, asking for any information "
1705 "related to a subdomain other than the locally owned one does "
1706 "not make sense."));
1710 std::vector<::types::subdomain_id> subdomain_association(
1713 subdomain_association);
1727 const unsigned int n_subdomains =
1731 unsigned int max_subdomain_id = 0;
1734 std::max(max_subdomain_id, cell->subdomain_id());
1735 return max_subdomain_id + 1;
1741 Assert(n_subdomains > *std::max_element(subdomain_association.begin(),
1742 subdomain_association.end()),
1745 std::vector<::IndexSet> index_sets(
1754 index < subdomain_association.size();
1758 if (subdomain_association[index] != this_subdomain)
1760 index_sets[this_subdomain].add_range(i_min, index);
1762 this_subdomain = subdomain_association[index];
1767 if (i_min == subdomain_association.size() - 1)
1769 index_sets[this_subdomain].add_index(i_min);
1775 index_sets[this_subdomain].add_range(i_min,
1776 subdomain_association.size());
1779 for (
unsigned int i = 0; i < n_subdomains; ++i)
1780 index_sets[i].compress();
1785 template <
int dim,
int spacedim>
1786 std::vector<IndexSet>
1796 "For parallel::distributed::Triangulation objects and "
1797 "associated DoF handler objects, asking for any information "
1798 "related to a subdomain other than the locally owned one does "
1799 "not make sense."));
1807 std::vector<IndexSet> dof_set =
1809 const ::types::subdomain_id n_subdomains = dof_set.size();
1815 subdomain_id < n_subdomains;
1828 std::vector<types::global_dof_index> local_dof_indices;
1829 std::set<types::global_dof_index> subdomain_halo_global_dof_indices;
1830 for (
typename std::vector<
1832 const_iterator it_cell = active_halo_layer.begin();
1833 it_cell != active_halo_layer.end();
1839 cell->subdomain_id() != subdomain_id,
1841 "The subdomain ID of the halo cell should not match that of the vector entry."));
1844 cell->get_dof_indices(local_dof_indices);
1848 subdomain_halo_global_dof_indices.insert(local_dof_index);
1851 dof_set[subdomain_id].add_indices(
1852 subdomain_halo_global_dof_indices.begin(),
1853 subdomain_halo_global_dof_indices.end());
1855 dof_set[subdomain_id].compress();
1861 template <
int dim,
int spacedim>
1865 std::vector<types::subdomain_id> &subdomain_association)
1873 "For parallel::distributed::Triangulation objects and "
1874 "associated DoF handler objects, asking for any subdomain other "
1875 "than the locally owned one does not make sense."));
1877 Assert(subdomain_association.size() == dof_handler.
n_dofs(),
1891 std::vector<types::subdomain_id> cell_owners(
1897 cell_owners = tr->get_true_subdomain_ids_of_cells();
1898 Assert(tr->get_true_subdomain_ids_of_cells().size() ==
1899 tr->n_active_cells(),
1906 cell_owners[cell->active_cell_index()] = cell->subdomain_id();
1910 std::fill_n(subdomain_association.begin(),
1914 std::vector<types::global_dof_index> local_dof_indices;
1915 local_dof_indices.reserve(
1923 cell_owners[cell->active_cell_index()];
1924 const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
1925 local_dof_indices.resize(dofs_per_cell);
1926 cell->get_dof_indices(local_dof_indices);
1932 for (
unsigned int i = 0; i < dofs_per_cell; ++i)
1933 if (subdomain_association[local_dof_indices[i]] ==
1935 subdomain_association[local_dof_indices[i]] = subdomain_id;
1936 else if (subdomain_association[local_dof_indices[i]] > subdomain_id)
1938 subdomain_association[local_dof_indices[i]] = subdomain_id;
1942 Assert(std::find(subdomain_association.begin(),
1943 subdomain_association.end(),
1945 subdomain_association.end(),
1951 template <
int dim,
int spacedim>
1957 std::vector<types::subdomain_id> subdomain_association(
1961 return std::count(subdomain_association.begin(),
1962 subdomain_association.end(),
1968 template <
int dim,
int spacedim>
1981 "For parallel::distributed::Triangulation objects and "
1982 "associated DoF handler objects, asking for any subdomain other "
1983 "than the locally owned one does not make sense."));
1987 std::vector<types::global_dof_index> local_dof_indices;
1988 local_dof_indices.reserve(
1996 std::vector<types::global_dof_index> subdomain_indices;
1999 if ((cell->is_artificial() ==
false) &&
2000 (cell->subdomain_id() == subdomain))
2002 const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
2003 local_dof_indices.resize(dofs_per_cell);
2004 cell->get_dof_indices(local_dof_indices);
2005 subdomain_indices.insert(subdomain_indices.end(),
2006 local_dof_indices.begin(),
2007 local_dof_indices.end());
2010 std::sort(subdomain_indices.begin(), subdomain_indices.end());
2011 index_set.
add_indices(subdomain_indices.begin(), subdomain_indices.end());
2019 template <
int dim,
int spacedim>
2024 std::vector<unsigned int> &n_dofs_on_subdomain)
2029 std::fill(n_dofs_on_subdomain.begin(), n_dofs_on_subdomain.end(), 0);
2038 return cell.subdomain_id() == subdomain;
2040 ExcMessage(
"There are no cells for the given subdomain!"));
2042 std::vector<types::subdomain_id> subdomain_association(
2046 std::vector<unsigned char> component_association(dof_handler.
n_dofs());
2049 component_association);
2051 for (
unsigned int c = 0; c < dof_handler.
get_fe(0).n_components(); ++c)
2054 if ((subdomain_association[i] == subdomain) &&
2055 (component_association[i] ==
static_cast<unsigned char>(c)))
2056 ++n_dofs_on_subdomain[c];
2068 template <
int dim,
int spacedim>
2071 const std::vector<unsigned char> &dofs_by_component,
2072 const std::vector<unsigned int> &target_component,
2073 const bool only_once,
2074 std::vector<types::global_dof_index> &dofs_per_component,
2075 unsigned int &component)
2094 for (
unsigned int dd = 0; dd < d; ++dd, ++component)
2095 dofs_per_component[target_component[component]] +=
2096 std::count(dofs_by_component.begin(),
2097 dofs_by_component.end(),
2104 for (
unsigned int dd = 1; dd < d; ++dd)
2105 dofs_per_component[target_component[component - d + dd]] =
2106 dofs_per_component[target_component[component - d]];
2113 template <
int dim,
int spacedim>
2116 const std::vector<unsigned char> &dofs_by_component,
2117 const std::vector<unsigned int> &target_component,
2118 const bool only_once,
2119 std::vector<types::global_dof_index> &dofs_per_component,
2120 unsigned int &component)
2125 for (
unsigned int fe = 1; fe < fe_collection.
size(); ++fe)
2127 Assert(fe_collection[fe].n_components() ==
2128 fe_collection[0].n_components(),
2130 Assert(fe_collection[fe].n_base_elements() ==
2131 fe_collection[0].n_base_elements(),
2133 for (
unsigned int b = 0; b < fe_collection[0].n_base_elements(); ++b)
2135 Assert(fe_collection[fe].base_element(b).n_components() ==
2136 fe_collection[0].base_element(b).n_components(),
2138 Assert(fe_collection[fe].base_element(b).n_base_elements() ==
2139 fe_collection[0].base_element(b).n_base_elements(),
2162 template <
int dim,
int spacedim>
2174 template <
int dim,
int spacedim>
2176 all_elements_are_primitive(
2177 const ::hp::FECollection<dim, spacedim> &fe_collection)
2179 for (
unsigned int i = 0; i < fe_collection.size(); ++i)
2180 if (fe_collection[i].is_primitive() ==
false)
2190 template <
int dim,
int spacedim>
2191 std::vector<types::global_dof_index>
2194 const bool only_once,
2195 const std::vector<unsigned int> &target_component_)
2201 std::vector<unsigned int> target_component = target_component_;
2202 if (target_component.empty())
2204 target_component.resize(n_components);
2205 for (
unsigned int i = 0; i < n_components; ++i)
2206 target_component[i] = i;
2209 Assert(target_component.size() == n_components,
2213 const unsigned int max_component =
2214 *std::max_element(target_component.begin(), target_component.end());
2215 const unsigned int n_target_components = max_component + 1;
2217 std::vector<types::global_dof_index> dofs_per_component(
2222 if (n_components == 1)
2225 return dofs_per_component;
2231 std::vector<unsigned char> dofs_by_component(
2238 unsigned int component = 0;
2249 Assert((internal::all_elements_are_primitive(
2251 (std::accumulate(dofs_per_component.begin(),
2252 dofs_per_component.end(),
2258#ifdef DEAL_II_WITH_MPI
2264 std::vector<types::global_dof_index> local_dof_count =
2267 const int ierr = MPI_Allreduce(local_dof_count.data(),
2268 dofs_per_component.data(),
2269 n_target_components,
2272 tria->get_mpi_communicator());
2277 return dofs_per_component;
2282 template <
int dim,
int spacedim>
2283 std::vector<types::global_dof_index>
2285 const std::vector<unsigned int> &target_block_)
2287 const ::hp::FECollection<dim, spacedim> &fe_collection =
2296 const unsigned int n_blocks = fe_collection[0].n_blocks();
2298 std::vector<unsigned int> target_block = target_block_;
2299 if (target_block.empty())
2301 target_block.resize(fe_collection[0].n_blocks());
2302 for (
unsigned int i = 0; i < n_blocks; ++i)
2303 target_block[i] = i;
2306 Assert(target_block.size() == n_blocks,
2308 for (
unsigned int f = 1; f < fe_collection.size(); ++f)
2309 Assert(fe_collection[0].n_blocks() == fe_collection[f].n_blocks(),
2310 ExcMessage(
"This function can only work if all elements in a "
2311 "collection have the same number of blocks."));
2317 std::vector<types::global_dof_index> dofs_per_block(1);
2318 dofs_per_block[0] = dof_handler.
n_dofs();
2319 return dofs_per_block;
2323 const unsigned int max_block =
2324 *std::max_element(target_block.begin(), target_block.end());
2325 const unsigned int n_target_blocks = max_block + 1;
2327 std::vector<types::global_dof_index> dofs_per_block(n_target_blocks);
2331 for (
unsigned int this_fe = fe_collection.size() - 1;
2332 this_fe < fe_collection.size();
2337 std::vector<unsigned char> dofs_by_block(
2342 for (
unsigned int block = 0; block < fe.
n_blocks(); ++block)
2343 dofs_per_block[target_block[block]] +=
2344 std::count(dofs_by_block.begin(), dofs_by_block.end(), block);
2346#ifdef DEAL_II_WITH_MPI
2353 std::vector<types::global_dof_index> local_dof_count =
2355 const int ierr = MPI_Allreduce(local_dof_count.data(),
2356 dofs_per_block.data(),
2360 tria->get_mpi_communicator());
2366 return dofs_per_block;
2371 template <
int dim,
int spacedim>
2374 std::vector<types::global_dof_index> &mapping)
2377 mapping.insert(mapping.end(),
2381 std::vector<types::global_dof_index> dofs_on_face;
2392 for (
const unsigned int f : cell->face_indices())
2393 if (cell->at_boundary(f))
2395 const unsigned int dofs_per_face =
2396 cell->get_fe().n_dofs_per_face(f);
2397 dofs_on_face.resize(dofs_per_face);
2398 cell->face(f)->get_dof_indices(dofs_on_face,
2399 cell->active_fe_index());
2400 for (
unsigned int i = 0; i < dofs_per_face; ++i)
2402 mapping[dofs_on_face[i]] = next_boundary_index++;
2410 template <
int dim,
int spacedim>
2413 const std::set<types::boundary_id> &boundary_ids,
2414 std::vector<types::global_dof_index> &mapping)
2421 mapping.insert(mapping.end(),
2426 if (boundary_ids.empty())
2429 std::vector<types::global_dof_index> dofs_on_face;
2434 for (
const unsigned int f : cell->face_indices())
2435 if (boundary_ids.find(cell->face(f)->boundary_id()) !=
2438 const unsigned int dofs_per_face =
2439 cell->get_fe().n_dofs_per_face(f);
2440 dofs_on_face.resize(dofs_per_face);
2441 cell->face(f)->get_dof_indices(dofs_on_face,
2442 cell->active_fe_index());
2443 for (
unsigned int i = 0; i < dofs_per_face; ++i)
2445 mapping[dofs_on_face[i]] = next_boundary_index++;
2456 template <
int dim,
int spacedim>
2457 std::map<types::global_dof_index, Point<spacedim>>
2463 std::map<types::global_dof_index, Point<spacedim>> support_points;
2469 for (
unsigned int fe_index = 0; fe_index < fe_collection.
size();
2473 Assert((fe_collection[fe_index].n_dofs_per_cell() == 0) ||
2474 (fe_collection[fe_index].has_support_points()),
2477 fe_collection[fe_index].get_unit_support_points()));
2482 (in_mask.
size() == 0 ?
2498 std::vector<types::global_dof_index> local_dof_indices;
2499 for (
const auto &cell : dof_handler.active_cell_iterators())
2501 if (cell->is_artificial() == false)
2503 hp_fe_values.reinit(cell);
2507 local_dof_indices.resize(cell->get_fe().n_dofs_per_cell());
2508 cell->get_dof_indices(local_dof_indices);
2510 const std::vector<Point<spacedim>> &points =
2512 for (
unsigned int i = 0; i < cell->get_fe().n_dofs_per_cell();
2515 const unsigned int dof_comp =
2516 cell->get_fe().system_to_component_index(i).first;
2520 support_points[local_dof_indices[i]] = points[i];
2524 return support_points;
2528 template <
int dim,
int spacedim>
2529 std::vector<Point<spacedim>>
2530 map_dofs_to_support_points_vector(
2535 std::vector<Point<spacedim>> support_points(dof_handler.
n_dofs());
2538 const std::map<types::global_dof_index, Point<spacedim>>
2546 Assert(x_support_points.find(i) != x_support_points.end(),
2549 support_points[i] = x_support_points.find(i)->second;
2552 return support_points;
2558 template <
int dim,
int spacedim>
2570 "This function can not be used with distributed triangulations. "
2571 "See the documentation for more information."));
2578 internal::map_dofs_to_support_points_vector(mapping_collection,
2584 template <
int dim,
int spacedim>
2597 "This function can not be used with distributed triangulations. "
2598 "See the documentation for more information."));
2603 internal::map_dofs_to_support_points_vector(mapping, dof_handler, mask);
2608 template <
int dim,
int spacedim>
2616 support_points.clear();
2622 support_points = internal::map_dofs_to_support_points(mapping_collection,
2629 template <
int dim,
int spacedim>
2637 support_points.clear();
2642 internal::map_dofs_to_support_points(mapping, dof_handler, mask);
2646 template <
int dim,
int spacedim>
2647 std::map<types::global_dof_index, Point<spacedim>>
2656 return internal::map_dofs_to_support_points(mapping_collection,
2662 template <
int dim,
int spacedim>
2663 std::map<types::global_dof_index, Point<spacedim>>
2669 return internal::map_dofs_to_support_points(mapping, dof_handler, mask);
2673 template <
int spacedim>
2681 std::map<Point<spacedim>,
2682 std::vector<types::global_dof_index>,
2687 for (
const auto &it : support_points)
2689 std::vector<types::global_dof_index> &v = point_map[it.second];
2690 v.push_back(it.first);
2694 for (
const auto &it : point_map)
2696 out << it.first <<
" \"";
2697 const std::vector<types::global_dof_index> &v = it.second;
2698 for (
unsigned int i = 0; i < v.size(); ++i)
2712 template <
int dim,
int spacedim>
2721 const unsigned int nb = fe.
n_blocks();
2723 tables_by_block.resize(1);
2724 tables_by_block[0].reinit(nb, nb);
2725 tables_by_block[0].fill(
none);
2733 tables_by_block[0](ib, jb) |= table(i, j);
2741 tables_by_block.resize(fe_collection.
size());
2743 for (
unsigned int f = 0; f < fe_collection.
size(); ++f)
2747 const unsigned int nb = fe.
n_blocks();
2748 tables_by_block[f].reinit(nb, nb);
2749 tables_by_block[f].fill(
none);
2756 tables_by_block[f](ib, jb) |= table(i, j);
2765 template <
int dim,
int spacedim>
2769 const unsigned int level,
2770 const std::vector<bool> &selected_dofs,
2773 std::vector<types::global_dof_index> indices;
2778 if (cell->is_locally_owned_on_level())
2785 if (cell->is_locally_owned_on_level())
2787 indices.resize(cell->get_fe().n_dofs_per_cell());
2788 cell->get_mg_dof_indices(indices);
2790 if (selected_dofs.size() != 0)
2795 if (selected_dofs.empty())
2796 block_list.
add(i, indices[j] - offset);
2799 if (selected_dofs[j])
2800 block_list.
add(i, indices[j] - offset);
2808 template <
int dim,
int spacedim>
2812 const unsigned int level,
2813 const bool interior_only)
2818 std::vector<types::global_dof_index> indices;
2819 std::vector<bool> exclude;
2823 indices.resize(cell->get_fe().n_dofs_per_cell());
2824 cell->get_mg_dof_indices(indices);
2830 std::fill(exclude.begin(), exclude.end(),
false);
2832 for (
const unsigned int face : cell->face_indices())
2833 if (cell->at_boundary(face) ||
2834 cell->neighbor(face)->level() != cell->level())
2839 block_list.
add(0, indices[j]);
2843 for (
const auto index : indices)
2844 block_list.
add(0, index);
2850 template <
int dim,
int spacedim>
2854 const unsigned int level,
2855 const bool interior_dofs_only,
2856 const bool boundary_dofs)
2861 std::vector<types::global_dof_index> indices;
2862 std::vector<bool> exclude;
2864 unsigned int block = 0;
2867 if (pcell->is_active())
2870 for (
unsigned int child = 0; child < pcell->n_children(); ++child)
2872 const auto cell = pcell->child(child);
2877 indices.resize(n_dofs);
2878 exclude.resize(n_dofs);
2879 std::fill(exclude.begin(), exclude.end(),
false);
2880 cell->get_mg_dof_indices(indices);
2882 if (interior_dofs_only)
2886 for (
unsigned int d = 0; d < dim; ++d)
2888 const unsigned int face =
2897 for (
const unsigned int face :
2899 if (cell->at_boundary(face))
2905 for (
unsigned int i = 0; i < n_dofs; ++i)
2907 block_list.
add(block, indices[i]);
2913 template <
int dim,
int spacedim>
2914 std::vector<unsigned int>
2917 const unsigned int level,
2918 const bool interior_only,
2919 const bool boundary_patches,
2920 const bool level_boundary_patches,
2921 const bool single_cell_patches,
2922 const bool invert_vertex_mapping)
2929 exclude_boundary_dofs,
2931 level_boundary_patches,
2932 single_cell_patches,
2933 invert_vertex_mapping);
2936 template <
int dim,
int spacedim>
2937 std::vector<unsigned int>
2940 const unsigned int level,
2942 const bool boundary_patches,
2943 const bool level_boundary_patches,
2944 const bool single_cell_patches,
2945 const bool invert_vertex_mapping)
2949 std::vector<unsigned int> vertex_cell_count(
2953 std::vector<bool> vertex_boundary(
2956 std::vector<unsigned int> vertex_mapping(
2961 std::vector<unsigned int> vertex_dof_count(
2967 for (
const unsigned int v : cell->vertex_indices())
2969 const unsigned int vg = cell->vertex_index(v);
2970 vertex_dof_count[vg] += cell->get_fe().n_dofs_per_cell();
2971 ++vertex_cell_count[vg];
2972 for (
unsigned int d = 0; d < dim; ++d)
2975 if (cell->at_boundary(face))
2976 vertex_boundary[vg] =
true;
2977 else if ((!level_boundary_patches) &&
2978 (cell->neighbor(face)->level() !=
2979 static_cast<int>(
level)))
2980 vertex_boundary[vg] =
true;
2986 for (
unsigned int vg = 0; vg < vertex_dof_count.size(); ++vg)
2987 if ((!single_cell_patches && vertex_cell_count[vg] < 2) ||
2988 (!boundary_patches && vertex_boundary[vg]))
2989 vertex_dof_count[vg] = 0;
2992 unsigned int n_vertex_count = 0;
2993 for (
unsigned int vg = 0; vg < vertex_mapping.size(); ++vg)
2994 if (vertex_dof_count[vg] != 0)
2995 vertex_mapping[vg] = n_vertex_count++;
2998 for (
unsigned int vg = 0; vg < vertex_mapping.size(); ++vg)
2999 if (vertex_dof_count[vg] != 0)
3000 vertex_dof_count[vertex_mapping[vg]] = vertex_dof_count[vg];
3004 vertex_dof_count.resize(n_vertex_count);
3008 block_list.
reinit(vertex_dof_count.size(),
3012 std::vector<types::global_dof_index> indices;
3013 std::vector<bool> exclude;
3019 cell->get_mg_dof_indices(indices);
3021 for (
const unsigned int v : cell->vertex_indices())
3023 const unsigned int vg = cell->vertex_index(v);
3024 const unsigned int block = vertex_mapping[vg];
3030 if (exclude_boundary_dofs.
size() == 0 ||
3036 std::fill(exclude.begin(), exclude.end(),
false);
3038 for (
unsigned int d = 0; d < dim; ++d)
3040 const unsigned int a_face =
3042 const unsigned int face =
3055 for (
unsigned int j = 0; j < indices.size(); ++j)
3057 block_list.
add(block, indices[j]);
3061 for (
const auto index : indices)
3062 block_list.
add(block, index);
3067 if (invert_vertex_mapping)
3070 unsigned int n_vertex_count = 0;
3071 for (
unsigned int vg = 0; vg < vertex_mapping.size(); ++vg)
3073 vertex_mapping[n_vertex_count++] = vg;
3076 vertex_mapping.resize(n_vertex_count);
3079 return vertex_mapping;
3083 template <
int dim,
int spacedim>
3089 std::set<types::global_dof_index> dofs_on_patch;
3090 std::vector<types::global_dof_index> local_dof_indices;
3095 for (
unsigned int i = 0; i < patch.size(); ++i)
3099 Assert(cell->is_artificial() ==
false,
3100 ExcMessage(
"This function can not be called with cells that are "
3101 "not either locally owned or ghost cells."));
3103 cell->get_dof_indices(local_dof_indices);
3104 dofs_on_patch.insert(local_dof_indices.begin(),
3105 local_dof_indices.end());
3109 return dofs_on_patch.size();
3114 template <
int dim,
int spacedim>
3115 std::vector<types::global_dof_index>
3120 std::set<types::global_dof_index> dofs_on_patch;
3121 std::vector<types::global_dof_index> local_dof_indices;
3126 for (
unsigned int i = 0; i < patch.size(); ++i)
3130 Assert(cell->is_artificial() ==
false,
3131 ExcMessage(
"This function can not be called with cells that are "
3132 "not either locally owned or ghost cells."));
3134 cell->get_dof_indices(local_dof_indices);
3135 dofs_on_patch.insert(local_dof_indices.begin(),
3136 local_dof_indices.end());
3139 Assert((dofs_on_patch.size() == count_dofs_on_patch<dim, spacedim>(patch)),
3146 return std::vector<types::global_dof_index>(dofs_on_patch.begin(),
3147 dofs_on_patch.end());
3157#include "dof_tools.inst"
const std::vector< std::pair< size_type, number > > * get_constraint_entries(const size_type line_n) const
size_type n_constraints() const
unsigned int size() const
unsigned int n_selected_blocks(const unsigned int overall_number_of_blocks=numbers::invalid_unsigned_int) const
bool represents_n_components(const unsigned int n) const
bool represents_the_all_selected_mask() const
unsigned int size() const
unsigned int n_selected_components(const unsigned int overall_number_of_components=numbers::invalid_unsigned_int) const
unsigned int first_selected_component(const unsigned int overall_number_of_components=numbers::invalid_unsigned_int) const
const hp::FECollection< dim, spacedim > & get_fe_collection() const
const FiniteElement< dim, spacedim > & get_fe(const types::fe_index index=0) const
const IndexSet & locally_owned_mg_dofs(const unsigned int level) const
types::global_dof_index n_boundary_dofs() const
const Triangulation< dim, spacedim > & get_triangulation() const
const IndexSet & locally_owned_dofs() const
active_cell_iterator begin_active(const unsigned int level=0) const
std::vector< types::fe_index > get_active_fe_indices() const
bool has_hp_capabilities() const
types::global_dof_index n_dofs() const
MPI_Comm get_communicator() const
types::global_dof_index n_locally_owned_dofs() const
virtual double value(const Point< dim > &p, const unsigned int component) const override
RigidBodyMotion(const unsigned int type)
static constexpr unsigned int n_modes
const std::vector< Point< spacedim > > & get_quadrature_points() const
const FEValues< dim, spacedim > & get_present_fe_values() const
unsigned int n_dofs_per_vertex() const
unsigned int n_dofs_per_cell() const
unsigned int n_dofs_per_line() const
unsigned int n_dofs_per_face(unsigned int face_no=0, unsigned int child=0) const
unsigned int n_blocks() const
unsigned int n_components() const
std::pair< unsigned int, types::global_dof_index > system_to_block_index(const unsigned int component) const
const ComponentMask & get_nonzero_components(const unsigned int i) const
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
ComponentMask component_mask(const FEValuesExtractors::Scalar &scalar) const
virtual unsigned int face_to_cell_index(const unsigned int face_dof_index, const unsigned int face, const unsigned char combined_orientation=ReferenceCell::default_combined_face_orientation()) const
bool is_primitive() const
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
unsigned int component_to_block_index(const unsigned int component) const
std::pair< unsigned int, unsigned int > system_to_component_index(const unsigned int index) const
unsigned int element_multiplicity(const unsigned int index) const
unsigned int n_base_elements() const
std::pair< unsigned int, unsigned int > face_system_to_component_index(const unsigned int index, const unsigned int face_no=0) const
size_type index_within_set(const size_type global_index) const
bool is_element(const size_type index) const
void add_index(const size_type index)
void fill_binary_vector(VectorType &vector) const
void subtract_set(const IndexSet &other)
size_type nth_index_in_set(const size_type local_index) const
void add_indices(const ForwardIterator &begin, const ForwardIterator &end)
Abstract base class for mapping classes.
void reinit(const size_type m, const size_type n, const ArrayView< const unsigned int > &row_lengths)
void add(const size_type i, const size_type j)
virtual types::subdomain_id locally_owned_subdomain() const
unsigned int n_active_cells() const
unsigned int n_levels() const
unsigned int n_vertices() const
virtual size_type size() const override
unsigned int size() const
unsigned int max_dofs_per_face() const
ComponentMask component_mask(const FEValuesExtractors::Scalar &scalar) const
unsigned int n_components() const
unsigned int max_dofs_per_cell() const
void push_back(const Quadrature< dim_in > &new_quadrature)
virtual MPI_Comm get_mpi_communicator() const override
#define DEAL_II_DEPRECATED
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
IteratorRange< active_cell_iterator > active_cell_iterators() const
IteratorRange< FilteredIterator< BaseIterator > > filter_iterators(IteratorRange< BaseIterator > i, const Predicate &p)
IteratorRange< cell_iterator > cell_iterators_on_level(const unsigned int level) const
static ::ExceptionBase & ExcIO()
static ::ExceptionBase & ExcInvalidBoundaryIndicator()
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define AssertThrowMPI(error_code)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcIndexRange(std::size_t arg1, std::size_t arg2, std::size_t arg3)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
typename ActiveSelector::line_iterator line_iterator
typename ActiveSelector::face_iterator face_iterator
typename ActiveSelector::active_cell_iterator active_cell_iterator
typename ActiveSelector::CellAccessor cell_accessor
@ update_quadrature_points
Transformed quadrature points.
std::vector< index_type > data
unsigned int n_mpi_processes(const MPI_Comm mpi_communicator)
const types::boundary_id internal_face_boundary_id
const types::subdomain_id artificial_subdomain_id
const types::subdomain_id invalid_subdomain_id
static const unsigned int invalid_unsigned_int
const types::global_dof_index invalid_dof_index
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
unsigned short int fe_index
static std_cxx20::ranges::iota_view< unsigned int, unsigned int > face_indices()
#define DEAL_II_DOF_INDEX_MPI_TYPE