76 template <
int dim,
typename Number =
double>
88 double downstream_size = 0;
90 for (
unsigned int d = 0;
d < dim; ++
d)
92 downstream_size += (rhs[
d] - lhs[
d]) * weight;
95 if (downstream_size < 0)
97 else if (downstream_size > 0)
101 for (
unsigned int d = 0;
d < dim; ++
d)
103 if (lhs[
d] == rhs[
d])
105 return lhs[
d] < rhs[
d];
125 template <
int dim,
int spacedim>
126 std::vector<unsigned char>
130 std::vector<unsigned char> local_component_association(
139 local_component_association[i] =
150 const unsigned int first_comp =
155 local_component_association[i] = first_comp;
162 for (
unsigned int c = first_comp; c < fe.
n_components(); ++c)
163 if (component_mask[c] ==
true)
165 local_component_association[i] = c;
170 Assert(std::find(local_component_association.begin(),
171 local_component_association.end(),
172 static_cast<unsigned char>(-1)) ==
173 local_component_association.end(),
176 return local_component_association;
196 template <
int dim,
int spacedim>
200 std::vector<unsigned char> &dofs_by_component)
202 const ::hp::FECollection<dim, spacedim> &fe_collection =
216 std::vector<std::vector<unsigned char>> local_component_association(
217 fe_collection.size());
218 for (
unsigned int f = 0; f < fe_collection.size(); ++f)
221 local_component_association[f] =
226 std::vector<types::global_dof_index> indices;
228 if (c->is_locally_owned())
230 const unsigned int fe_index = c->active_fe_index();
231 const unsigned int dofs_per_cell = c->get_fe().n_dofs_per_cell();
232 indices.resize(dofs_per_cell);
233 c->get_dof_indices(indices);
234 for (
unsigned int i = 0; i < dofs_per_cell; ++i)
237 indices[i])] = local_component_association[fe_index][i];
249 template <
int dim,
int spacedim>
252 std::vector<unsigned char> & dofs_by_block)
254 const ::hp::FECollection<dim, spacedim> &fe_collection =
268 std::vector<std::vector<unsigned char>> local_block_association(
269 fe_collection.size());
270 for (
unsigned int f = 0; f < fe_collection.size(); ++f)
274 static_cast<unsigned char>(-1));
278 Assert(std::find(local_block_association[f].
begin(),
279 local_block_association[f].
end(),
280 static_cast<unsigned char>(-1)) ==
281 local_block_association[f].
end(),
286 std::vector<types::global_dof_index> indices;
288 if (cell->is_locally_owned())
290 const unsigned int fe_index = cell->active_fe_index();
291 const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
292 indices.resize(dofs_per_cell);
293 cell->get_dof_indices(indices);
294 for (
unsigned int i = 0; i < dofs_per_cell; ++i)
297 indices[i])] = local_block_association[fe_index][i];
304 template <
int dim,
int spacedim,
typename Number>
307 const Vector<Number> & cell_data,
308 Vector<double> & dof_data,
309 const unsigned int component)
318 for (
unsigned int i = 0; i < fe_collection.size(); ++i)
320 Assert(fe_collection[i].is_primitive() ==
true,
327 const bool consider_components =
331 if (consider_components ==
false)
335 std::vector<unsigned char> component_dofs(
342 for (
unsigned int i = 0; i < dof_data.size(); ++i)
343 if (component_dofs[i] == static_cast<unsigned char>(component))
348 std::vector<unsigned char> touch_count(dof_handler.
n_dofs(), 0);
352 endc = dof_handler.
end();
353 std::vector<types::global_dof_index> dof_indices;
354 dof_indices.reserve(fe_collection.max_dofs_per_cell());
356 for (
unsigned int present_cell = 0; cell != endc; ++cell, ++present_cell)
358 const unsigned int dofs_per_cell = cell->get_fe().n_dofs_per_cell();
359 dof_indices.resize(dofs_per_cell);
360 cell->get_dof_indices(dof_indices);
362 for (
unsigned int i = 0; i < dofs_per_cell; ++i)
365 if (!consider_components ||
366 (cell->get_fe().system_to_component_index(i).first == component))
369 dof_data(dof_indices[i]) += cell_data(present_cell);
372 ++touch_count[dof_indices[i]];
382 Assert(consider_components || (touch_count[i] != 0),
384 if (touch_count[i] != 0)
385 dof_data(i) /= touch_count[i];
391 template <
int dim,
int spacedim>
395 std::vector<bool> & selected_dofs)
400 "The given component mask is not sized correctly to represent the " 401 "components of the given finite element."));
432 if (component_mask[dofs_by_component[i]] ==
true)
433 selected_dofs[i] =
true;
438 template <
int dim,
int spacedim>
446 "The given component mask is not sized correctly to represent the " 447 "components of the given finite element."));
465 std::vector<types::global_dof_index> selected_dofs;
468 if (component_mask[dofs_by_component[i]] ==
true)
473 result.
add_indices(selected_dofs.begin(), selected_dofs.end());
479 template <
int dim,
int spacedim>
483 std::vector<bool> & selected_dofs)
486 extract_dofs<dim, spacedim>(
492 template <
int dim,
int spacedim>
498 return extract_dofs<dim, spacedim>(
504 template <
int dim,
int spacedim>
505 std::vector<IndexSet>
512 "The given component mask is not sized correctly to represent the " 513 "components of the given finite element."));
522 std::vector<IndexSet> index_per_comp(n_comps,
IndexSet(dof.
n_dofs()));
526 const auto &comp_i = dofs_by_component[i];
527 if (component_mask[comp_i])
528 index_per_comp[comp_i].add_index(
529 locally_owned_dofs.nth_index_in_set(i));
531 for (
auto &c : index_per_comp)
533 return index_per_comp;
538 template <
int dim,
int spacedim>
543 std::vector<bool> & selected_dofs)
550 "The given component mask is not sized correctly to represent the " 551 "components of the given finite element."));
560 std::fill_n(selected_dofs.begin(), dof.
n_dofs(level),
false);
567 std::fill_n(selected_dofs.begin(), dof.
n_dofs(level),
true);
572 std::fill_n(selected_dofs.begin(), dof.
n_dofs(level),
false);
576 std::vector<unsigned char> local_component_asssociation =
580 local_selected_dofs[i] = component_mask[local_component_asssociation[i]];
585 for (c = dof.
begin(level); c != dof.
end(level); ++c)
587 c->get_mg_dof_indices(indices);
589 selected_dofs[indices[i]] = local_selected_dofs[i];
595 template <
int dim,
int spacedim>
600 std::vector<bool> & selected_dofs)
605 dof.
get_fe().component_mask(block_mask),
611 template <
int dim,
int spacedim>
615 std::vector<bool> & selected_dofs,
616 const std::set<types::boundary_id> &boundary_ids)
622 "This function can not be used with distributed triangulations. " 623 "See the documentation for more information."));
629 selected_dofs.clear();
630 selected_dofs.resize(dof_handler.
n_dofs(),
false);
633 indices.fill_binary_vector(selected_dofs);
637 template <
int dim,
int spacedim>
642 const std::set<types::boundary_id> &boundary_ids)
646 ExcMessage(
"Component mask has invalid size."));
652 selected_dofs.
clear();
657 const bool check_boundary_id = (boundary_ids.size() != 0);
661 const bool check_vector_component =
667 std::vector<types::global_dof_index> face_dof_indices;
668 face_dof_indices.reserve(
681 if (cell->is_artificial() ==
false)
682 for (
const unsigned int face : cell->face_indices())
683 if (cell->at_boundary(face))
684 if (!check_boundary_id ||
685 (boundary_ids.find(cell->face(face)->boundary_id()) !=
692 const unsigned int n_vertices_per_cell =
695 const unsigned int n_vertices_per_face =
697 const unsigned int n_lines_per_face =
701 face_dof_indices.resize(dofs_per_face);
702 cell->face(face)->get_dof_indices(face_dof_indices,
703 cell->active_fe_index());
706 if (!check_vector_component)
707 selected_dofs.
add_index(face_dof_indices[i]);
715 const unsigned int cell_index =
722 (dim == 3 ? (i < n_vertices_per_face *
725 (i < n_vertices_per_face *
729 (i - n_vertices_per_face *
731 n_vertices_per_cell *
734 n_vertices_per_face *
738 n_vertices_per_cell *
748 selected_dofs.
add_index(face_dof_indices[i]);
752 const unsigned int first_nonzero_comp =
758 if (component_mask[first_nonzero_comp] ==
true)
759 selected_dofs.
add_index(face_dof_indices[i]);
767 template <
int dim,
int spacedim>
772 std::vector<bool> & selected_dofs,
773 const std::set<types::boundary_id> &boundary_ids)
777 ExcMessage(
"This component mask has the wrong size."));
784 const bool check_boundary_id = (boundary_ids.size() != 0);
788 const bool check_vector_component =
792 selected_dofs.clear();
793 selected_dofs.resize(dof_handler.
n_dofs(),
false);
794 std::vector<types::global_dof_index> cell_dof_indices;
795 cell_dof_indices.reserve(
805 for (
const unsigned int face : cell->face_indices())
806 if (cell->at_boundary(face))
807 if (!check_boundary_id ||
808 (boundary_ids.find(cell->face(face)->boundary_id()) !=
814 cell_dof_indices.resize(dofs_per_cell);
815 cell->get_dof_indices(cell_dof_indices);
820 if (!check_vector_component)
821 selected_dofs[cell_dof_indices[i]] =
true;
828 selected_dofs[cell_dof_indices[i]] =
833 const unsigned int first_nonzero_comp =
839 selected_dofs[cell_dof_indices[i]] =
840 (component_mask[first_nonzero_comp] ==
true);
849 template <
int dim,
int spacedim,
typename number>
858 const std::function<
bool(
863 ->
bool {
return cell->is_locally_owned() && predicate(cell); };
865 std::vector<types::global_dof_index> local_dof_indices;
866 local_dof_indices.reserve(
870 std::set<types::global_dof_index> predicate_dofs;
874 endc = dof_handler.
end();
875 for (; cell != endc; ++cell)
876 if (!cell->is_artificial() && predicate(cell))
878 local_dof_indices.resize(cell->
get_fe().n_dofs_per_cell());
879 cell->get_dof_indices(local_dof_indices);
880 predicate_dofs.insert(local_dof_indices.begin(),
881 local_dof_indices.end());
885 std::set<types::global_dof_index> dofs_with_support_on_halo_cells;
887 const std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>
891 active_cell_iterator>::const_iterator it =
893 it != halo_cells.end();
905 const unsigned int dofs_per_cell = (*it)->get_fe().n_dofs_per_cell();
906 local_dof_indices.resize(dofs_per_cell);
907 (*it)->get_dof_indices(local_dof_indices);
908 dofs_with_support_on_halo_cells.insert(local_dof_indices.begin(),
909 local_dof_indices.end());
921 std::set<types::global_dof_index> extra_halo;
922 for (
const auto dof : dofs_with_support_on_halo_cells)
928 const unsigned int line_size = line_ptr->size();
929 for (
unsigned int j = 0; j < line_size; ++j)
930 extra_halo.insert((*line_ptr)[j].first);
933 dofs_with_support_on_halo_cells.insert(extra_halo.begin(),
940 support_set.
add_indices(predicate_dofs.begin(), predicate_dofs.end());
941 support_set.compress();
944 halo_set.
add_indices(dofs_with_support_on_halo_cells.begin(),
945 dofs_with_support_on_halo_cells.end());
948 support_set.subtract_set(halo_set);
960 template <
int spacedim>
963 const ::DoFHandler<1, spacedim> &dof_handler)
966 return IndexSet(dof_handler.n_dofs());
970 template <
int spacedim>
973 const ::DoFHandler<2, spacedim> &dof_handler)
975 const unsigned int dim = 2;
977 IndexSet selected_dofs(dof_handler.n_dofs());
983 for (
const auto &cell : dof_handler.active_cell_iterators())
984 if (!cell->is_artificial())
986 for (
const unsigned int face : cell->face_indices())
987 if (cell->face(face)->has_children())
989 const typename ::DoFHandler<dim,
990 spacedim>::line_iterator
991 line = cell->face(face);
993 for (
unsigned int dof = 0; dof != fe.n_dofs_per_vertex();
995 selected_dofs.add_index(
996 line->child(0)->vertex_dof_index(1, dof));
998 for (
unsigned int child = 0; child < 2; ++child)
1000 if (cell->neighbor_child_on_subface(face, child)
1003 for (
unsigned int dof = 0; dof != fe.n_dofs_per_line();
1005 selected_dofs.add_index(
1006 line->child(child)->dof_index(dof));
1011 selected_dofs.compress();
1012 return selected_dofs;
1016 template <
int spacedim>
1019 const ::DoFHandler<3, spacedim> &dof_handler)
1021 const unsigned int dim = 3;
1023 IndexSet selected_dofs(dof_handler.n_dofs());
1024 IndexSet unconstrained_dofs(dof_handler.n_dofs());
1028 for (
const auto &cell : dof_handler.active_cell_iterators())
1029 if (!cell->is_artificial())
1030 for (
auto f : cell->face_indices())
1032 const typename ::DoFHandler<dim, spacedim>::face_iterator
1033 face = cell->face(f);
1034 if (cell->face(f)->has_children())
1036 for (
unsigned int child = 0; child < 4; ++child)
1037 if (!cell->neighbor_child_on_subface(f, child)
1041 std::vector<types::global_dof_index> ldi(
1042 fe.n_dofs_per_face(f, child));
1043 face->child(child)->get_dof_indices(ldi);
1044 selected_dofs.add_indices(ldi.begin(), ldi.end());
1049 for (
unsigned int vertex = 0; vertex < 4; ++vertex)
1050 for (
unsigned int dof = 0; dof != fe.n_dofs_per_vertex();
1052 unconstrained_dofs.add_index(
1053 face->vertex_dof_index(vertex, dof));
1056 selected_dofs.subtract_set(unconstrained_dofs);
1057 return selected_dofs;
1064 template <
int dim,
int spacedim>
1067 std::vector<bool> & selected_dofs)
1069 const IndexSet selected_dofs_as_index_set =
1074 std::fill(selected_dofs.begin(), selected_dofs.end(),
false);
1075 for (
const auto index : selected_dofs_as_index_set)
1076 selected_dofs[index] =
true;
1081 template <
int dim,
int spacedim>
1090 template <
int dim,
int spacedim>
1094 std::vector<bool> & selected_dofs)
1100 std::fill_n(selected_dofs.begin(), dof_handler.
n_dofs(),
false);
1102 std::vector<types::global_dof_index> local_dof_indices;
1103 local_dof_indices.reserve(
1110 endc = dof_handler.
end();
1111 for (; cell != endc; ++cell)
1114 const unsigned int dofs_per_cell = cell->
get_fe().n_dofs_per_cell();
1115 local_dof_indices.resize(dofs_per_cell);
1116 cell->get_dof_indices(local_dof_indices);
1117 for (
unsigned int i = 0; i < dofs_per_cell; ++i)
1118 selected_dofs[local_dof_indices[i]] =
true;
1124 template <
int dim,
int spacedim>
1135 std::vector<types::global_dof_index> dof_indices;
1136 std::set<types::global_dof_index> global_dof_indices;
1140 endc = dof_handler.
end();
1141 for (; cell != endc; ++cell)
1142 if (cell->is_locally_owned())
1144 dof_indices.resize(cell->
get_fe().n_dofs_per_cell());
1145 cell->get_dof_indices(dof_indices);
1149 global_dof_indices.insert(dof_index);
1152 dof_set.
add_indices(global_dof_indices.begin(), global_dof_indices.end());
1159 template <
int dim,
int spacedim>
1164 const unsigned int level)
1172 std::vector<types::global_dof_index> dof_indices;
1173 std::set<types::global_dof_index> global_dof_indices;
1175 const auto filtered_iterators_range =
1178 for (
const auto &cell : filtered_iterators_range)
1180 dof_indices.resize(cell->get_fe().n_dofs_per_cell());
1181 cell->get_mg_dof_indices(dof_indices);
1185 global_dof_indices.insert(dof_index);
1188 dof_set.
add_indices(global_dof_indices.begin(), global_dof_indices.end());
1195 template <
int dim,
int spacedim>
1211 std::vector<types::global_dof_index> dof_indices;
1212 std::vector<types::global_dof_index> dofs_on_ghosts;
1216 endc = dof_handler.
end();
1217 for (; cell != endc; ++cell)
1218 if (cell->is_ghost())
1220 dof_indices.resize(cell->
get_fe().n_dofs_per_cell());
1221 cell->get_dof_indices(dof_indices);
1222 for (
const auto dof_index : dof_indices)
1224 dofs_on_ghosts.push_back(dof_index);
1228 std::sort(dofs_on_ghosts.begin(), dofs_on_ghosts.end());
1230 std::unique(dofs_on_ghosts.begin(),
1231 dofs_on_ghosts.end()));
1237 template <
int dim,
int spacedim>
1241 const unsigned int level,
1255 std::vector<types::global_dof_index> dof_indices;
1256 std::vector<types::global_dof_index> dofs_on_ghosts;
1261 dof_handler.
end(level);
1262 for (; cell != endc; ++cell)
1271 dof_indices.resize(cell->
get_fe().n_dofs_per_cell());
1272 cell->get_mg_dof_indices(dof_indices);
1273 for (
const auto dof_index : dof_indices)
1275 dofs_on_ghosts.push_back(dof_index);
1279 std::sort(dofs_on_ghosts.begin(), dofs_on_ghosts.end());
1281 std::unique(dofs_on_ghosts.begin(),
1282 dofs_on_ghosts.end()));
1289 template <
int dim,
int spacedim>
1293 std::vector<std::vector<bool>> & constant_modes)
1299 constant_modes = std::vector<std::vector<bool>>(0);
1303 const unsigned int n_components = dof_handler.
get_fe(0).n_components();
1307 std::vector<unsigned char> dofs_by_component(
1312 unsigned int n_selected_dofs = 0;
1313 for (
unsigned int i = 0; i < n_components; ++i)
1314 if (component_mask[i] ==
true)
1316 std::count(dofs_by_component.begin(), dofs_by_component.end(), i);
1320 std::vector<unsigned int> component_numbering(
1322 for (
unsigned int i = 0, count = 0; i < locally_owned_dofs.n_elements();
1324 if (component_mask[dofs_by_component[i]])
1325 component_numbering[i] = count++;
1332 const ::hp::FECollection<dim, spacedim> &fe_collection =
1334 std::vector<Table<2, bool>> element_constant_modes;
1335 std::vector<std::vector<std::pair<unsigned int, unsigned int>>>
1336 constant_mode_to_component_translation(n_components);
1337 unsigned int n_constant_modes = 0;
1338 for (
unsigned int f = 0; f < fe_collection.size(); ++f)
1340 std::pair<Table<2, bool>, std::vector<unsigned int>> data =
1341 fe_collection[f].get_constant_modes();
1342 element_constant_modes.push_back(data.first);
1344 for (
unsigned int i = 0; i < data.second.size(); ++i)
1345 if (component_mask[data.second[i]])
1346 constant_mode_to_component_translation[data.second[i]]
1347 .emplace_back(n_constant_modes++, i);
1349 element_constant_modes[0].n_rows());
1353 constant_modes.clear();
1354 constant_modes.resize(n_constant_modes,
1355 std::vector<bool>(n_selected_dofs,
false));
1358 std::vector<types::global_dof_index> dof_indices;
1360 if (cell->is_locally_owned())
1362 dof_indices.resize(cell->get_fe().n_dofs_per_cell());
1363 cell->get_dof_indices(dof_indices);
1365 for (
unsigned int i = 0; i < dof_indices.size(); ++i)
1366 if (locally_owned_dofs.is_element(dof_indices[i]))
1368 const unsigned int loc_index =
1369 locally_owned_dofs.index_within_set(dof_indices[i]);
1370 const unsigned int comp = dofs_by_component[loc_index];
1371 if (component_mask[comp])
1372 for (
auto &indices :
1373 constant_mode_to_component_translation[comp])
1374 constant_modes[indices
1375 .first][component_numbering[loc_index]] =
1376 element_constant_modes[cell->active_fe_index()](
1384 template <
int dim,
int spacedim>
1387 std::vector<unsigned int> & active_fe_indices)
1394 endc = dof_handler.
end();
1395 for (; cell != endc; ++cell)
1396 active_fe_indices[cell->active_cell_index()] = cell->active_fe_index();
1399 template <
int dim,
int spacedim>
1400 std::vector<IndexSet>
1404 ExcMessage(
"The given DoFHandler has no DoFs."));
1412 "For parallel::distributed::Triangulation objects and " 1413 "associated DoF handler objects, asking for any information " 1414 "related to a subdomain other than the locally owned one does " 1415 "not make sense."));
1419 std::vector<::types::subdomain_id> subdomain_association(
1422 subdomain_association);
1436 const unsigned int n_subdomains =
1440 unsigned int max_subdomain_id = 0;
1443 std::max(max_subdomain_id, cell->subdomain_id());
1444 return max_subdomain_id + 1;
1449 ->get_communicator()));
1450 Assert(n_subdomains > *std::max_element(subdomain_association.begin(),
1451 subdomain_association.end()),
1454 std::vector<::IndexSet> index_sets(
1463 index < subdomain_association.size();
1467 if (subdomain_association[index] != this_subdomain)
1469 index_sets[this_subdomain].add_range(i_min, index);
1471 this_subdomain = subdomain_association[index];
1476 if (i_min == subdomain_association.size() - 1)
1478 index_sets[this_subdomain].add_index(i_min);
1484 index_sets[this_subdomain].add_range(i_min,
1485 subdomain_association.size());
1488 for (
unsigned int i = 0; i < n_subdomains; i++)
1494 template <
int dim,
int spacedim>
1495 std::vector<IndexSet>
1505 "For parallel::distributed::Triangulation objects and " 1506 "associated DoF handler objects, asking for any information " 1507 "related to a subdomain other than the locally owned one does " 1508 "not make sense."));
1516 std::vector<IndexSet> dof_set =
1537 std::vector<types::global_dof_index> local_dof_indices;
1538 std::set<types::global_dof_index> subdomain_halo_global_dof_indices;
1539 for (
typename std::vector<
1541 const_iterator it_cell = active_halo_layer.begin();
1542 it_cell != active_halo_layer.end();
1550 "The subdomain ID of the halo cell should not match that of the vector entry."));
1552 local_dof_indices.resize(cell->
get_fe().n_dofs_per_cell());
1553 cell->get_dof_indices(local_dof_indices);
1557 subdomain_halo_global_dof_indices.insert(local_dof_index);
1561 subdomain_halo_global_dof_indices.begin(),
1562 subdomain_halo_global_dof_indices.end());
1570 template <
int dim,
int spacedim>
1574 std::vector<types::subdomain_id> &subdomain_association)
1582 "For parallel::distributed::Triangulation objects and " 1583 "associated DoF handler objects, asking for any subdomain other " 1584 "than the locally owned one does not make sense."));
1586 Assert(subdomain_association.size() == dof_handler.
n_dofs(),
1600 std::vector<types::subdomain_id> cell_owners(
1606 cell_owners = tr->get_true_subdomain_ids_of_cells();
1607 Assert(tr->get_true_subdomain_ids_of_cells().size() ==
1608 tr->n_active_cells(),
1615 cell != dof_handler.
end();
1617 if (cell->is_locally_owned())
1618 cell_owners[cell->active_cell_index()] = cell->subdomain_id();
1622 std::fill_n(subdomain_association.begin(),
1626 std::vector<types::global_dof_index> local_dof_indices;
1627 local_dof_indices.reserve(
1634 endc = dof_handler.
end();
1635 for (; cell != endc; ++cell)
1638 cell_owners[cell->active_cell_index()];
1639 const unsigned int dofs_per_cell = cell->
get_fe().n_dofs_per_cell();
1640 local_dof_indices.resize(dofs_per_cell);
1641 cell->get_dof_indices(local_dof_indices);
1647 for (
unsigned int i = 0; i < dofs_per_cell; ++i)
1648 if (subdomain_association[local_dof_indices[i]] ==
1650 subdomain_association[local_dof_indices[i]] =
subdomain_id;
1651 else if (subdomain_association[local_dof_indices[i]] > subdomain_id)
1653 subdomain_association[local_dof_indices[i]] =
subdomain_id;
1657 Assert(std::find(subdomain_association.begin(),
1658 subdomain_association.end(),
1660 subdomain_association.end(),
1666 template <
int dim,
int spacedim>
1672 std::vector<types::subdomain_id> subdomain_association(
1676 return std::count(subdomain_association.begin(),
1677 subdomain_association.end(),
1683 template <
int dim,
int spacedim>
1696 "For parallel::distributed::Triangulation objects and " 1697 "associated DoF handler objects, asking for any subdomain other " 1698 "than the locally owned one does not make sense."));
1702 std::vector<types::global_dof_index> local_dof_indices;
1703 local_dof_indices.reserve(
1711 std::vector<types::global_dof_index> subdomain_indices;
1715 endc = dof_handler.
end();
1716 for (; cell != endc; ++cell)
1717 if ((cell->is_artificial() ==
false) &&
1718 (cell->subdomain_id() == subdomain))
1720 const unsigned int dofs_per_cell = cell->
get_fe().n_dofs_per_cell();
1721 local_dof_indices.resize(dofs_per_cell);
1722 cell->get_dof_indices(local_dof_indices);
1723 subdomain_indices.insert(subdomain_indices.end(),
1724 local_dof_indices.begin(),
1725 local_dof_indices.end());
1728 std::sort(subdomain_indices.begin(), subdomain_indices.end());
1729 subdomain_indices.erase(std::unique(subdomain_indices.begin(),
1730 subdomain_indices.end()),
1731 subdomain_indices.end());
1734 index_set.add_indices(subdomain_indices.begin(), subdomain_indices.end());
1735 index_set.compress();
1742 template <
int dim,
int spacedim>
1747 std::vector<unsigned int> & n_dofs_on_subdomain)
1749 Assert(n_dofs_on_subdomain.size() == dof_handler.
get_fe(0).n_components(),
1751 dof_handler.
get_fe(0).n_components()));
1752 std::fill(n_dofs_on_subdomain.begin(), n_dofs_on_subdomain.end(), 0);
1761 return cell.subdomain_id() == subdomain;
1763 ExcMessage(
"There are no cells for the given subdomain!"));
1765 std::vector<types::subdomain_id> subdomain_association(
1769 std::vector<unsigned char> component_association(dof_handler.
n_dofs());
1771 std::vector<bool>(),
1772 component_association);
1774 for (
unsigned int c = 0; c < dof_handler.
get_fe(0).n_components(); ++c)
1777 if ((subdomain_association[i] == subdomain) &&
1778 (component_association[i] ==
static_cast<unsigned char>(c)))
1779 ++n_dofs_on_subdomain[c];
1791 template <
int dim,
int spacedim>
1794 const std::vector<unsigned char> & dofs_by_component,
1795 const std::vector<unsigned int> & target_component,
1796 const bool only_once,
1797 std::vector<types::global_dof_index> &dofs_per_component,
1798 unsigned int & component)
1817 for (
unsigned int dd = 0; dd <
d; ++dd, ++component)
1818 dofs_per_component[target_component[component]] +=
1819 std::count(dofs_by_component.begin(),
1820 dofs_by_component.end(),
1827 for (
unsigned int dd = 1; dd <
d; ++dd)
1828 dofs_per_component[target_component[component - d + dd]] =
1829 dofs_per_component[target_component[component - d]];
1836 template <
int dim,
int spacedim>
1839 const std::vector<unsigned char> & dofs_by_component,
1840 const std::vector<unsigned int> & target_component,
1841 const bool only_once,
1842 std::vector<types::global_dof_index> &dofs_per_component,
1843 unsigned int & component)
1848 for (
unsigned int fe = 1; fe < fe_collection.
size(); ++fe)
1850 Assert(fe_collection[fe].n_components() ==
1851 fe_collection[0].n_components(),
1853 Assert(fe_collection[fe].n_base_elements() ==
1854 fe_collection[0].n_base_elements(),
1856 for (
unsigned int b = 0;
b < fe_collection[0].n_base_elements(); ++
b)
1858 Assert(fe_collection[fe].base_element(
b).n_components() ==
1859 fe_collection[0].base_element(
b).n_components(),
1861 Assert(fe_collection[fe].base_element(
b).n_base_elements() ==
1862 fe_collection[0].base_element(
b).n_base_elements(),
1885 template <
int dim,
int spacedim>
1897 template <
int dim,
int spacedim>
1899 all_elements_are_primitive(
1900 const ::hp::FECollection<dim, spacedim> &fe_collection)
1902 for (
unsigned int i = 0; i < fe_collection.size(); ++i)
1903 if (fe_collection[i].is_primitive() ==
false)
1914 template <
int dim,
int spacedim>
1918 std::vector<types::global_dof_index> &dofs_per_component,
1919 const bool only_once,
1920 const std::vector<unsigned int> & target_component)
1922 dofs_per_component =
1928 template <
int dim,
int spacedim>
1929 std::vector<types::global_dof_index>
1932 const bool only_once,
1933 const std::vector<unsigned int> &target_component_)
1935 const unsigned int n_components = dof_handler.
get_fe(0).n_components();
1939 std::vector<unsigned int> target_component = target_component_;
1940 if (target_component.size() == 0)
1942 target_component.resize(n_components);
1943 for (
unsigned int i = 0; i < n_components; ++i)
1944 target_component[i] = i;
1947 Assert(target_component.size() == n_components,
1951 const unsigned int max_component =
1952 *std::max_element(target_component.begin(), target_component.end());
1953 const unsigned int n_target_components = max_component + 1;
1955 std::vector<types::global_dof_index> dofs_per_component(
1960 if (n_components == 1)
1963 return dofs_per_component;
1969 std::vector<unsigned char> dofs_by_component(
1976 unsigned int component = 0;
1987 Assert((internal::all_elements_are_primitive(
1989 (std::accumulate(dofs_per_component.begin(),
1990 dofs_per_component.end(),
1996 #ifdef DEAL_II_WITH_MPI 2002 std::vector<types::global_dof_index> local_dof_count =
2005 const int ierr = MPI_Allreduce(local_dof_count.data(),
2006 dofs_per_component.data(),
2007 n_target_components,
2010 tria->get_communicator());
2015 return dofs_per_component;
2021 template <
int dim,
int spacedim>
2024 std::vector<types::global_dof_index> &dofs_per_block,
2025 const std::vector<unsigned int> & target_block)
2032 template <
int dim,
int spacedim>
2033 std::vector<types::global_dof_index>
2035 const std::vector<unsigned int> &target_block_)
2037 const ::hp::FECollection<dim, spacedim> &fe_collection =
2046 const unsigned int n_blocks = fe_collection[0].n_blocks();
2048 std::vector<unsigned int> target_block = target_block_;
2049 if (target_block.size() == 0)
2051 target_block.resize(fe_collection[0].
n_blocks());
2052 for (
unsigned int i = 0; i <
n_blocks; ++i)
2053 target_block[i] = i;
2058 for (
unsigned int f = 1; f < fe_collection.size(); ++f)
2059 Assert(fe_collection[0].
n_blocks() == fe_collection[f].n_blocks(),
2060 ExcMessage(
"This function can only work if all elements in a " 2061 "collection have the same number of blocks."));
2067 std::vector<types::global_dof_index> dofs_per_block(1);
2068 dofs_per_block[0] = dof_handler.
n_dofs();
2069 return dofs_per_block;
2073 const unsigned int max_block =
2074 *std::max_element(target_block.begin(), target_block.end());
2075 const unsigned int n_target_blocks = max_block + 1;
2077 std::vector<types::global_dof_index> dofs_per_block(n_target_blocks);
2081 for (
unsigned int this_fe = fe_collection.size() - 1;
2082 this_fe < fe_collection.size();
2087 std::vector<unsigned char> dofs_by_block(
2092 for (
unsigned int block = 0; block < fe.
n_blocks(); ++block)
2093 dofs_per_block[target_block[block]] +=
2094 std::count(dofs_by_block.begin(), dofs_by_block.end(), block);
2096 #ifdef DEAL_II_WITH_MPI 2103 std::vector<types::global_dof_index> local_dof_count =
2105 const int ierr = MPI_Allreduce(local_dof_count.data(),
2106 dofs_per_block.data(),
2110 tria->get_communicator());
2116 return dofs_per_block;
2121 template <
int dim,
int spacedim>
2124 std::vector<types::global_dof_index> &mapping)
2127 mapping.insert(mapping.end(),
2131 std::vector<types::global_dof_index> dofs_on_face;
2143 endc = dof_handler.
end();
2144 for (; cell != endc; ++cell)
2145 for (
const unsigned int f : cell->face_indices())
2146 if (cell->at_boundary(f))
2148 const unsigned int dofs_per_face =
2149 cell->
get_fe().n_dofs_per_face(f);
2150 dofs_on_face.resize(dofs_per_face);
2151 cell->face(f)->get_dof_indices(dofs_on_face,
2152 cell->active_fe_index());
2153 for (
unsigned int i = 0; i < dofs_per_face; ++i)
2155 mapping[dofs_on_face[i]] = next_boundary_index++;
2163 template <
int dim,
int spacedim>
2166 const std::set<types::boundary_id> &boundary_ids,
2167 std::vector<types::global_dof_index> &mapping)
2174 mapping.insert(mapping.end(),
2179 if (boundary_ids.size() == 0)
2182 std::vector<types::global_dof_index> dofs_on_face;
2188 endc = dof_handler.
end();
2189 for (; cell != endc; ++cell)
2190 for (
const unsigned int f : cell->face_indices())
2191 if (boundary_ids.find(cell->face(f)->boundary_id()) !=
2194 const unsigned int dofs_per_face =
2195 cell->
get_fe().n_dofs_per_face(f);
2196 dofs_on_face.resize(dofs_per_face);
2197 cell->face(f)->get_dof_indices(dofs_on_face,
2198 cell->active_fe_index());
2199 for (
unsigned int i = 0; i < dofs_per_face; ++i)
2201 mapping[dofs_on_face[i]] = next_boundary_index++;
2212 template <
int dim,
int spacedim>
2224 for (
unsigned int fe_index = 0; fe_index < fe_collection.
size();
2228 Assert(fe_collection[fe_index].has_support_points(),
2231 fe_collection[fe_index].get_unit_support_points()));
2236 (in_mask.
size() == 0 ?
2253 endc = dof_handler.
end();
2255 std::vector<types::global_dof_index> local_dof_indices;
2256 for (; cell != endc; ++cell)
2258 if (cell->is_artificial() ==
false)
2260 hp_fe_values.
reinit(cell);
2264 local_dof_indices.resize(cell->
get_fe().n_dofs_per_cell());
2265 cell->get_dof_indices(local_dof_indices);
2267 const std::vector<Point<spacedim>> &points =
2268 fe_values.get_quadrature_points();
2269 for (
unsigned int i = 0; i < cell->
get_fe().n_dofs_per_cell();
2272 const unsigned int dof_comp =
2273 cell->
get_fe().system_to_component_index(i).first;
2277 support_points[local_dof_indices[i]] = points[i];
2283 template <
int dim,
int spacedim>
2292 std::map<types::global_dof_index, Point<spacedim>> x_support_points;
2302 Assert(x_support_points.find(i) != x_support_points.end(),
2305 support_points[i] = x_support_points[i];
2311 template <
int dim,
int spacedim>
2323 "This function can not be used with distributed triangulations. " 2324 "See the documentation for more information."));
2337 template <
int dim,
int spacedim>
2350 "This function can not be used with distributed triangulations. " 2351 "See the documentation for more information."));
2362 template <
int dim,
int spacedim>
2370 support_points.clear();
2383 template <
int dim,
int spacedim>
2391 support_points.clear();
2401 template <
int spacedim>
2409 using dof_map_t = std::map<types::global_dof_index, Point<spacedim>>;
2411 using point_map_t = std::map<Point<spacedim>,
2412 std::vector<types::global_dof_index>,
2415 point_map_t point_map;
2418 for (
typename dof_map_t::const_iterator it = support_points.begin();
2419 it != support_points.end();
2422 std::vector<types::global_dof_index> &v = point_map[it->second];
2423 v.push_back(it->first);
2427 for (
typename point_map_t::iterator it = point_map.begin();
2428 it != point_map.end();
2431 out << it->first <<
" \"";
2432 const std::vector<types::global_dof_index> &v = it->second;
2433 for (
unsigned int i = 0; i < v.size(); ++i)
2447 template <
int dim,
int spacedim>
2456 const unsigned int nb = fe.
n_blocks();
2458 tables_by_block.resize(1);
2459 tables_by_block[0].reinit(nb, nb);
2460 tables_by_block[0].fill(none);
2468 tables_by_block[0](ib, jb) |= table(i, j);
2476 tables_by_block.resize(fe_collection.
size());
2478 for (
unsigned int f = 0; f < fe_collection.
size(); ++f)
2482 const unsigned int nb = fe.
n_blocks();
2483 tables_by_block[f].reinit(nb, nb);
2484 tables_by_block[f].fill(none);
2491 tables_by_block[f](ib, jb) |= table(i, j);
2500 template <
int dim,
int spacedim>
2504 const unsigned int level,
2505 const std::vector<bool> & selected_dofs,
2510 dof_handler.
end(level);
2511 std::vector<types::global_dof_index> indices;
2515 for (cell = dof_handler.
begin(level); cell != endc; ++cell)
2516 if (cell->is_locally_owned_on_level())
2520 dof_handler.
get_fe().n_dofs_per_cell());
2522 for (cell = dof_handler.
begin(level); cell != endc; ++cell)
2523 if (cell->is_locally_owned_on_level())
2525 indices.resize(cell->
get_fe().n_dofs_per_cell());
2526 cell->get_mg_dof_indices(indices);
2528 if (selected_dofs.size() != 0)
2533 if (selected_dofs.size() == 0)
2534 block_list.
add(i, indices[j] - offset);
2537 if (selected_dofs[j])
2538 block_list.
add(i, indices[j] - offset);
2546 template <
int dim,
int spacedim>
2550 const unsigned int level,
2551 const bool interior_only)
2557 dof_handler.
end(level);
2559 std::vector<types::global_dof_index> indices;
2560 std::vector<bool> exclude;
2562 for (cell = dof_handler.
begin(level); cell != endc; ++cell)
2564 indices.resize(cell->
get_fe().n_dofs_per_cell());
2565 cell->get_mg_dof_indices(indices);
2571 std::fill(exclude.begin(), exclude.end(),
false);
2573 for (
const unsigned int face : cell->face_indices())
2574 if (cell->at_boundary(face) ||
2575 cell->neighbor(face)->level() != cell->level())
2580 block_list.
add(0, indices[j]);
2584 for (
const auto index : indices)
2585 block_list.
add(0, index);
2591 template <
int dim,
int spacedim>
2595 const unsigned int level,
2596 const bool interior_dofs_only,
2597 const bool boundary_dofs)
2603 dof_handler.
begin(level - 1);
2605 dof_handler.
end(level - 1);
2607 std::vector<types::global_dof_index> indices;
2608 std::vector<bool> exclude;
2610 for (
unsigned int block = 0; pcell != endc; ++pcell)
2612 if (pcell->is_active())
2615 for (
unsigned int child = 0; child < pcell->n_children(); ++child)
2618 pcell->child(child);
2623 indices.resize(n_dofs);
2624 exclude.resize(n_dofs);
2625 std::fill(exclude.begin(), exclude.end(),
false);
2626 cell->get_mg_dof_indices(indices);
2628 if (interior_dofs_only)
2632 for (
unsigned int d = 0;
d < dim; ++
d)
2634 const unsigned int face =
2643 for (
const unsigned int face :
2645 if (cell->at_boundary(face))
2651 for (
unsigned int i = 0; i < n_dofs; ++i)
2653 block_list.
add(block, indices[i]);
2659 template <
int dim,
int spacedim>
2660 std::vector<unsigned int>
2663 const unsigned int level,
2664 const bool interior_only,
2665 const bool boundary_patches,
2666 const bool level_boundary_patches,
2667 const bool single_cell_patches,
2668 const bool invert_vertex_mapping)
2675 exclude_boundary_dofs,
2677 level_boundary_patches,
2678 single_cell_patches,
2679 invert_vertex_mapping);
2682 template <
int dim,
int spacedim>
2683 std::vector<unsigned int>
2686 const unsigned int level,
2687 const BlockMask & exclude_boundary_dofs,
2688 const bool boundary_patches,
2689 const bool level_boundary_patches,
2690 const bool single_cell_patches,
2691 const bool invert_vertex_mapping)
2695 dof_handler.
end(level);
2699 std::vector<unsigned int> vertex_cell_count(
2703 std::vector<bool> vertex_boundary(
2706 std::vector<unsigned int> vertex_mapping(
2711 std::vector<unsigned int> vertex_dof_count(
2716 for (cell = dof_handler.
begin(level); cell != endc; ++cell)
2717 for (
const unsigned int v : cell->vertex_indices())
2719 const unsigned int vg = cell->vertex_index(v);
2720 vertex_dof_count[vg] += cell->
get_fe().n_dofs_per_cell();
2721 ++vertex_cell_count[vg];
2722 for (
unsigned int d = 0;
d < dim; ++
d)
2725 if (cell->at_boundary(face))
2726 vertex_boundary[vg] =
true;
2727 else if ((!level_boundary_patches) &&
2728 (cell->neighbor(face)->level() !=
2729 static_cast<int>(
level)))
2730 vertex_boundary[vg] =
true;
2736 for (
unsigned int vg = 0; vg < vertex_dof_count.size(); ++vg)
2737 if ((!single_cell_patches && vertex_cell_count[vg] < 2) ||
2738 (!boundary_patches && vertex_boundary[vg]))
2739 vertex_dof_count[vg] = 0;
2742 unsigned int n_vertex_count = 0;
2743 for (
unsigned int vg = 0; vg < vertex_mapping.size(); ++vg)
2744 if (vertex_dof_count[vg] != 0)
2745 vertex_mapping[vg] = n_vertex_count++;
2748 for (
unsigned int vg = 0; vg < vertex_mapping.size(); ++vg)
2749 if (vertex_dof_count[vg] != 0)
2750 vertex_dof_count[vertex_mapping[vg]] = vertex_dof_count[vg];
2754 vertex_dof_count.resize(n_vertex_count);
2758 block_list.
reinit(vertex_dof_count.size(),
2759 dof_handler.
n_dofs(level),
2762 std::vector<types::global_dof_index> indices;
2763 std::vector<bool> exclude;
2765 for (cell = dof_handler.
begin(level); cell != endc; ++cell)
2769 cell->get_mg_dof_indices(indices);
2771 for (
const unsigned int v : cell->vertex_indices())
2773 const unsigned int vg = cell->vertex_index(v);
2774 const unsigned int block = vertex_mapping[vg];
2780 if (exclude_boundary_dofs.
size() == 0 ||
2786 std::fill(exclude.begin(), exclude.end(),
false);
2788 for (
unsigned int d = 0;
d < dim; ++
d)
2790 const unsigned int a_face =
2792 const unsigned int face =
2805 for (
unsigned int j = 0; j < indices.size(); ++j)
2807 block_list.
add(block, indices[j]);
2811 for (
const auto index : indices)
2812 block_list.
add(block, index);
2817 if (invert_vertex_mapping)
2820 unsigned int n_vertex_count = 0;
2821 for (
unsigned int vg = 0; vg < vertex_mapping.size(); ++vg)
2823 vertex_mapping[n_vertex_count++] = vg;
2826 vertex_mapping.resize(n_vertex_count);
2829 return vertex_mapping;
2833 template <
int dim,
int spacedim>
2839 std::set<types::global_dof_index> dofs_on_patch;
2840 std::vector<types::global_dof_index> local_dof_indices;
2845 for (
unsigned int i = 0; i < patch.size(); ++i)
2849 Assert(cell->is_artificial() ==
false,
2850 ExcMessage(
"This function can not be called with cells that are " 2851 "not either locally owned or ghost cells."));
2852 local_dof_indices.resize(cell->
get_fe().n_dofs_per_cell());
2853 cell->get_dof_indices(local_dof_indices);
2854 dofs_on_patch.insert(local_dof_indices.begin(),
2855 local_dof_indices.end());
2859 return dofs_on_patch.size();
2864 template <
int dim,
int spacedim>
2865 std::vector<types::global_dof_index>
2870 std::set<types::global_dof_index> dofs_on_patch;
2871 std::vector<types::global_dof_index> local_dof_indices;
2876 for (
unsigned int i = 0; i < patch.size(); ++i)
2880 Assert(cell->is_artificial() ==
false,
2881 ExcMessage(
"This function can not be called with cells that are " 2882 "not either locally owned or ghost cells."));
2883 local_dof_indices.resize(cell->
get_fe().n_dofs_per_cell());
2884 cell->get_dof_indices(local_dof_indices);
2885 dofs_on_patch.insert(local_dof_indices.begin(),
2886 local_dof_indices.end());
2889 Assert((dofs_on_patch.size() == count_dofs_on_patch<dim, spacedim>(patch)),
2896 return std::vector<types::global_dof_index>(dofs_on_patch.begin(),
2897 dofs_on_patch.end());
2907 #include "dof_tools.inst"
unsigned int n_active_cells() const
static const unsigned int invalid_unsigned_int
#define AssertDimension(dim1, dim2)
const types::subdomain_id invalid_subdomain_id
void add_index(const size_type index)
cell_iterator begin(const unsigned int level=0) const
static ::ExceptionBase & ExcIO()
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
cell_iterator end() const
#define AssertIndexRange(index, range)
void add_indices(const ForwardIterator &begin, const ForwardIterator &end)
bool represents_n_components(const unsigned int n) const
#define DEAL_II_DOF_INDEX_MPI_TYPE
unsigned int n_dofs_per_vertex() const
bool represents_the_all_selected_mask() const
typename ActiveSelector::CellAccessor cell_accessor
unsigned int size() const
Transformed quadrature points.
#define AssertThrow(cond, exc)
IteratorRange< FilteredIterator< BaseIterator > > filter_iterators(IteratorRange< BaseIterator > i, const Predicate &p)
bool is_primitive() const
static ::ExceptionBase & ExcIndexRange(int arg1, int arg2, int arg3)
unsigned int n_blocks() const
const hp::FECollection< dim, spacedim > & get_fe_collection() const
const FiniteElement< dim, spacedim > & get_fe(const unsigned int index=0) const
active_cell_iterator begin_active(const unsigned int level=0) const
unsigned int component_to_block_index(const unsigned int component) const
size_type n_constraints() const
virtual void reinit(const size_type m, const size_type n, const ArrayView< const unsigned int > &row_lengths) override
static ::ExceptionBase & ExcMessage(std::string arg1)
std::string compress(const std::string &input)
unsigned int subdomain_id
unsigned int n_dofs_per_line() const
#define Assert(cond, exc)
unsigned int element_multiplicity(const unsigned int index) const
IteratorRange< active_cell_iterator > active_cell_iterators() const
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
void reference_cell(const ReferenceCell &reference_cell, Triangulation< dim, spacedim > &tria)
size_type index_within_set(const size_type global_index) const
types::global_dof_index n_dofs() const
Abstract base class for mapping classes.
const ComponentMask & get_nonzero_components(const unsigned int i) const
void add(const size_type i, const size_type j)
#define DEAL_II_NAMESPACE_CLOSE
VectorType::value_type * end(VectorType &V)
typename LevelSelector::cell_iterator level_cell_iterator
unsigned int size() const
virtual const FiniteElement< dim, spacedim > & base_element(const unsigned int index) const
std::enable_if< IsBlockVector< VectorType >::value, unsigned int >::type n_blocks(const VectorType &vector)
virtual unsigned int face_to_cell_index(const unsigned int face_dof_index, const unsigned int face, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false) const
unsigned int n_dofs_per_face(unsigned int face_no=0, unsigned int child=0) const
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, lda >> &cell, const unsigned int q_index=numbers::invalid_unsigned_int, const unsigned int mapping_index=numbers::invalid_unsigned_int, const unsigned int fe_index=numbers::invalid_unsigned_int)
unsigned int n_mpi_processes(const MPI_Comm &mpi_communicator)
SymmetricTensor< 2, dim, Number > b(const Tensor< 2, dim, Number > &F)
const IndexSet & locally_owned_dofs() const
void push_back(const Quadrature< dim_in > &new_quadrature)
void set_size(const size_type size)
const std::vector< std::pair< size_type, number > > * get_constraint_entries(const size_type line_n) const
unsigned int global_dof_index
const types::subdomain_id artificial_subdomain_id
bool has_hp_capabilities() const
std::pair< unsigned int, unsigned int > system_to_component_index(const unsigned int index) const
#define AssertThrowMPI(error_code)
unsigned int n_components() const
unsigned int n_dofs_per_cell() const
std::pair< unsigned int, types::global_dof_index > system_to_block_index(const unsigned int component) const
const Triangulation< dim, spacedim > & get_triangulation() const
#define DEAL_II_NAMESPACE_OPEN
VectorType::value_type * begin(VectorType &V)
unsigned int n_selected_blocks(const unsigned int overall_number_of_blocks=numbers::invalid_unsigned_int) const
unsigned int first_selected_component(const unsigned int overall_number_of_components=numbers::invalid_unsigned_int) const
unsigned int n_selected_components(const unsigned int overall_number_of_components=numbers::invalid_unsigned_int) const
types::global_dof_index n_boundary_dofs() const
static ::ExceptionBase & ExcInvalidBoundaryIndicator()
IteratorRange< cell_iterator > cell_iterators_on_level(const unsigned int level) const
static ::ExceptionBase & ExcNotImplemented()
bool is_element(const size_type index) const
typename ActiveSelector::cell_iterator cell_iterator
const types::boundary_id internal_face_boundary_id
const IndexSet & locally_owned_mg_dofs(const unsigned int level) const
typename ActiveSelector::active_cell_iterator active_cell_iterator
const types::global_dof_index invalid_dof_index
unsigned int size() const
unsigned int n_base_elements() const
unsigned int n_components() const
size_type nth_index_in_set(const size_type local_index) const
T max(const T &t, const MPI_Comm &mpi_communicator)
types::global_dof_index n_locally_owned_dofs() const
std::pair< unsigned int, unsigned int > face_system_to_component_index(const unsigned int index, const unsigned int face_no=0) const
virtual bool has_support_on_face(const unsigned int shape_index, const unsigned int face_index) const
static ::ExceptionBase & ExcInternalError()
const ::FEValues< dim, spacedim > & get_present_fe_values() const