55 template <
int dim,
template <
int,
int>
class MeshType,
int spacedim>
57 (concepts::is_triangulation_or_dof_handler<MeshType<dim, spacedim>>))
59 const Point<spacedim> &p,
60 const std::vector<
bool> &marked_vertices)
66 const Triangulation<dim, spacedim> &tria = mesh.get_triangulation();
68 const std::vector<Point<spacedim>> &vertices = tria.
get_vertices();
71 marked_vertices.empty(),
73 marked_vertices.size()));
83 marked_vertices.empty() ||
84 std::equal(marked_vertices.begin(),
85 marked_vertices.end(),
87 [](
bool p,
bool q) { return !p || q; }),
89 "marked_vertices should be a subset of used vertices in the triangulation "
90 "but marked_vertices contains one or more vertices that are not used vertices!"));
98 const std::vector<bool> &used =
103 std::vector<bool>::const_iterator first =
104 std::find(used.begin(), used.end(),
true);
110 unsigned int best_vertex = std::distance(used.begin(), first);
111 double best_dist = (p - vertices[best_vertex]).norm_square();
115 for (
unsigned int j = best_vertex + 1; j < vertices.size(); ++j)
118 double dist = (p - vertices[j]).norm_square();
119 if (dist < best_dist)
131 template <
int dim,
template <
int,
int>
class MeshType,
int spacedim>
133 (concepts::is_triangulation_or_dof_handler<MeshType<dim, spacedim>>))
135 const MeshType<dim, spacedim> &mesh,
136 const Point<spacedim> &p,
137 const std::vector<
bool> &marked_vertices)
152 marked_vertices.empty(),
154 marked_vertices.size()));
164 marked_vertices.empty() ||
165 std::equal(marked_vertices.begin(),
166 marked_vertices.end(),
168 [](
bool p,
bool q) { return !p || q; }),
170 "marked_vertices should be a subset of used vertices in the triangulation "
171 "but marked_vertices contains one or more vertices that are not used vertices!"));
174 if (marked_vertices.size())
175 for (
auto it = vertices.begin(); it != vertices.end();)
177 if (marked_vertices[it->first] ==
false)
179 vertices.erase(it++);
192 template <
typename MeshType>
195 std::vector<typename MeshType::active_cell_iterator>
198 typename ::internal::ActiveCellIterator<MeshType::dimension,
199 MeshType::space_dimension,
203 const unsigned int vertex)
205 const int dim = MeshType::dimension;
206 const int spacedim = MeshType::space_dimension;
212 Assert(mesh.get_triangulation().get_used_vertices()[vertex],
218 std::set<typename ::internal::
219 ActiveCellIterator<dim, spacedim, MeshType>::type>
222 typename ::internal::ActiveCellIterator<dim, spacedim, MeshType>::type
223 cell = mesh.begin_active(),
259 for (; cell != endc; ++cell)
261 for (
const unsigned int v : cell->vertex_indices())
262 if (cell->vertex_index(v) == vertex)
267 adjacent_cells.insert(cell);
275 const auto reference_cell = cell->reference_cell();
276 for (
const auto face :
277 reference_cell.faces_for_given_vertex(v))
278 if (!cell->at_boundary(face) &&
279 cell->neighbor(face)->is_active())
291 adjacent_cells.insert(cell->neighbor(face));
302 for (
unsigned int e = 0; e < cell->n_lines(); ++e)
303 if (cell->line(e)->has_children())
307 if (cell->line(e)->child(0)->vertex_index(1) == vertex)
309 adjacent_cells.insert(cell);
330 return std::vector<typename ::internal::
331 ActiveCellIterator<dim, spacedim, MeshType>::type>(
332 adjacent_cells.begin(), adjacent_cells.end());
339 template <
int dim,
template <
int,
int>
class MeshType,
int spacedim>
342 void find_active_cell_around_point_internal(
343 const MeshType<dim, spacedim> &mesh,
345 std::set<typename MeshType<dim, spacedim>::active_cell_iterator>
347 std::set<typename MeshType<dim, spacedim>::active_cell_iterator>
351 typename ::internal::
352 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type>
356 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type>
361 using cell_iterator =
362 typename MeshType<dim, spacedim>::active_cell_iterator;
364 using cell_iterator = typename ::internal::
365 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type;
369 searched_cells.insert(adjacent_cells.begin(), adjacent_cells.end());
373 std::set<cell_iterator> adjacent_cells_new;
375 for (
const auto &cell : adjacent_cells)
377 std::vector<cell_iterator> active_neighbors;
379 for (
unsigned int i = 0; i < active_neighbors.size(); ++i)
380 if (searched_cells.find(active_neighbors[i]) ==
381 searched_cells.end())
382 adjacent_cells_new.insert(active_neighbors[i]);
384 adjacent_cells.clear();
385 adjacent_cells.insert(adjacent_cells_new.begin(),
386 adjacent_cells_new.end());
387 if (adjacent_cells.empty())
395 cell_iterator it = mesh.begin_active();
396 for (; it != mesh.end(); ++it)
397 if (searched_cells.find(it) == searched_cells.end())
399 adjacent_cells.insert(it);
408 template <
int dim,
template <
int,
int>
class MeshType,
int spacedim>
410 (concepts::is_triangulation_or_dof_handler<MeshType<dim, spacedim>>))
412 typename MeshType<dim, spacedim>::active_cell_iterator
414 typename ::internal::
415 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type
419 const std::vector<bool> &marked_vertices,
420 const double tolerance)
433 template <
int dim,
template <
int,
int>
class MeshType,
int spacedim>
437 std::pair<typename MeshType<dim, spacedim>::active_cell_iterator,
Point<dim>>
439 std::pair<typename ::internal::
440 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type,
444 const MeshType<dim, spacedim> &mesh,
446 const std::vector<bool> &marked_vertices,
447 const double tolerance)
449 using active_cell_iterator = typename ::internal::
450 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type;
456 double best_distance = tolerance;
458 std::pair<active_cell_iterator, Point<dim>> best_cell;
461 best_cell.first = mesh.end();
465 std::vector<active_cell_iterator> adjacent_cells_tmp =
474 std::set<active_cell_iterator> adjacent_cells(adjacent_cells_tmp.begin(),
475 adjacent_cells_tmp.end());
476 std::set<active_cell_iterator> searched_cells;
484 const auto n_active_cells = mesh.get_triangulation().n_active_cells();
486 unsigned int cells_searched = 0;
487 while (!found && cells_searched < n_active_cells)
489 for (
const auto &cell : adjacent_cells)
491 if (cell->is_artificial() ==
false)
494 if (marked_vertices.size() > 0)
496 bool any_vertex_marked =
false;
497 for (
const auto &v : cell->vertex_indices())
499 if (marked_vertices[cell->vertex_index(v)])
501 any_vertex_marked =
true;
505 if (!any_vertex_marked)
512 mapping.transform_real_to_unit_cell(cell, p);
517 cell->reference_cell().closest_point(p_cell).distance(
524 if ((dist < best_distance) ||
525 ((dist == best_distance) &&
526 (cell->level() > best_level)))
529 best_distance = dist;
530 best_level = cell->level();
531 best_cell = std::make_pair(cell, p_cell);
553 cells_searched += adjacent_cells.size();
562 if (!found && cells_searched < n_active_cells)
564 find_active_cell_around_point_internal<dim, MeshType, spacedim>(
565 mesh, searched_cells, adjacent_cells);
574 template <
int dim,
template <
int,
int>
class MeshType,
int spacedim>
578 std::vector<std::pair<typename MeshType<dim, spacedim>::active_cell_iterator,
581 std::vector<std::pair<
582 typename ::internal::
583 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type,
587 const MeshType<dim, spacedim> &mesh,
589 const double tolerance,
590 const std::vector<bool> &marked_vertices)
593 mapping, mesh, p, marked_vertices, tolerance);
595 if (cell_and_point.first == mesh.end())
599 mapping, mesh, p, tolerance, cell_and_point);
604 template <
int dim,
template <
int,
int>
class MeshType,
int spacedim>
608 std::vector<std::pair<typename MeshType<dim, spacedim>::active_cell_iterator,
611 std::vector<std::pair<
612 typename ::internal::
613 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type,
618 const MeshType<dim, spacedim> &mesh,
620 const double tolerance,
621 const std::pair<
typename MeshType<dim, spacedim>::active_cell_iterator,
624 std::set<
typename MeshType<dim, spacedim>::active_cell_iterator>>
628 std::pair<typename MeshType<dim, spacedim>::active_cell_iterator,
633 cells_and_points.push_back(first_cell);
635 const Point<dim> unit_point = cells_and_points.front().second;
636 const auto my_cell = cells_and_points.front().first;
638 std::vector<typename MeshType<dim, spacedim>::active_cell_iterator>
641 if (my_cell->reference_cell().is_hyper_cube())
647 unsigned int n_dirs_at_threshold = 0;
649 for (
unsigned int d = 0; d < dim; ++d)
651 distance_to_center[d] =
std::abs(unit_point[d] - 0.5);
652 if (distance_to_center[d] > 0.5 - tolerance)
654 ++n_dirs_at_threshold;
655 last_point_at_threshold = d;
660 if (n_dirs_at_threshold == 1)
662 unsigned int neighbor_index =
663 2 * last_point_at_threshold +
664 (unit_point[last_point_at_threshold] > 0.5 ? 1 : 0);
665 if (!my_cell->at_boundary(neighbor_index))
667 const auto neighbor_cell = my_cell->neighbor(neighbor_index);
669 if (neighbor_cell->is_active())
670 cells_to_add.push_back(neighbor_cell);
672 for (
const auto &child_cell :
673 neighbor_cell->child_iterators())
675 if (child_cell->is_active())
676 cells_to_add.push_back(child_cell);
681 else if (n_dirs_at_threshold == dim)
683 unsigned int local_vertex_index = 0;
684 for (
unsigned int d = 0; d < dim; ++d)
685 local_vertex_index += (unit_point[d] > 0.5 ? 1 : 0) << d;
687 const auto fu = [&](
const auto &tentative_cells) {
688 for (
const auto &cell : tentative_cells)
690 cells_to_add.push_back(cell);
693 const auto vertex_index = my_cell->vertex_index(local_vertex_index);
695 if (vertex_to_cells !=
nullptr)
696 fu((*vertex_to_cells)[vertex_index]);
705 else if (n_dirs_at_threshold == 2)
707 std::pair<unsigned int, unsigned int> vertex_indices[3];
708 unsigned int count_vertex_indices = 0;
710 for (
unsigned int d = 0; d < dim; ++d)
712 if (distance_to_center[d] > 0.5 - tolerance)
714 vertex_indices[count_vertex_indices].first = d;
715 vertex_indices[count_vertex_indices].second =
716 unit_point[d] > 0.5 ? 1 : 0;
717 ++count_vertex_indices;
727 const unsigned int first_vertex =
728 (vertex_indices[0].second << vertex_indices[0].first) +
729 (vertex_indices[1].second << vertex_indices[1].first);
730 for (
unsigned int d = 0; d < 2; ++d)
732 const auto fu = [&](
const auto &tentative_cells) {
733 for (
const auto &cell : tentative_cells)
735 bool cell_not_yet_present =
true;
736 for (
const auto &other_cell : cells_to_add)
737 if (cell == other_cell)
739 cell_not_yet_present =
false;
742 if (cell_not_yet_present)
743 cells_to_add.push_back(cell);
747 const auto vertex_index =
748 my_cell->vertex_index(first_vertex + (d << free_direction));
750 if (vertex_to_cells !=
nullptr)
751 fu((*vertex_to_cells)[vertex_index]);
765 for (
const auto v : my_cell->vertex_indices())
767 const auto fu = [&](
const auto &tentative_cells) {
768 for (
const auto &cell : tentative_cells)
770 bool cell_not_yet_present =
true;
771 for (
const auto &other_cell : cells_to_add)
772 if (cell == other_cell)
774 cell_not_yet_present =
false;
777 if (cell_not_yet_present)
778 cells_to_add.push_back(cell);
782 const auto vertex_index = my_cell->vertex_index(v);
784 if (vertex_to_cells !=
nullptr)
785 fu((*vertex_to_cells)[vertex_index]);
791 for (
const auto &cell : cells_to_add)
797 mapping.transform_real_to_unit_cell(cell, p);
798 if (cell->reference_cell().contains_point(p_unit, tolerance))
799 cells_and_points.emplace_back(cell, p_unit);
806 cells_and_points.begin(),
807 cells_and_points.end(),
808 [](
const std::pair<
typename MeshType<dim, spacedim>::active_cell_iterator,
810 const std::pair<
typename MeshType<dim, spacedim>::active_cell_iterator,
811 Point<dim>> &b) { return a.first < b.first; });
813 return cells_and_points;
818 template <
typename MeshType>
822 const MeshType &mesh,
823 const std::function<
bool(
const typename MeshType::active_cell_iterator &)>
826 std::vector<typename MeshType::active_cell_iterator> active_halo_layer;
827 std::vector<bool> locally_active_vertices_on_subdomain(
828 mesh.get_triangulation().n_vertices(),
false);
830 std::map<unsigned int, std::vector<unsigned int>> coinciding_vertex_groups;
831 std::map<unsigned int, unsigned int> vertex_to_coinciding_vertex_group;
833 coinciding_vertex_groups,
834 vertex_to_coinciding_vertex_group);
839 for (
const auto &cell : mesh.active_cell_iterators())
841 for (
const auto v : cell->vertex_indices())
843 locally_active_vertices_on_subdomain[cell->vertex_index(v)] =
true;
844 for (
const auto vv : coinciding_vertex_groups
845 [vertex_to_coinciding_vertex_group[cell->vertex_index(v)]])
846 locally_active_vertices_on_subdomain[vv] =
true;
852 for (
const auto &cell : mesh.active_cell_iterators())
853 if (!predicate(cell))
854 for (
const auto v : cell->vertex_indices())
855 if (locally_active_vertices_on_subdomain[cell->vertex_index(v)] ==
858 active_halo_layer.push_back(cell);
862 return active_halo_layer;
867 template <
typename MeshType>
871 const MeshType &mesh,
872 const std::function<
bool(
const typename MeshType::cell_iterator &)>
874 const unsigned int level)
876 std::vector<typename MeshType::cell_iterator> level_halo_layer;
877 std::vector<bool> locally_active_vertices_on_level_subdomain(
878 mesh.get_triangulation().n_vertices(),
false);
883 for (
typename MeshType::cell_iterator cell = mesh.begin(level);
884 cell != mesh.end(level);
887 for (
const unsigned int v : cell->vertex_indices())
888 locally_active_vertices_on_level_subdomain[cell->vertex_index(v)] =
894 for (
typename MeshType::cell_iterator cell = mesh.begin(level);
895 cell != mesh.end(level);
897 if (!predicate(cell))
898 for (
const unsigned int v : cell->vertex_indices())
899 if (locally_active_vertices_on_level_subdomain[cell->vertex_index(
902 level_halo_layer.push_back(cell);
906 return level_halo_layer;
912 template <
typename MeshType>
914 bool contains_locally_owned_cells(
915 const std::vector<typename MeshType::active_cell_iterator> &cells)
917 for (
typename std::vector<
918 typename MeshType::active_cell_iterator>::const_iterator it =
923 if ((*it)->is_locally_owned())
929 template <
typename MeshType>
931 bool contains_artificial_cells(
932 const std::vector<typename MeshType::active_cell_iterator> &cells)
934 for (
typename std::vector<
935 typename MeshType::active_cell_iterator>::const_iterator it =
940 if ((*it)->is_artificial())
949 template <
typename MeshType>
955 std::function<
bool(
const typename MeshType::active_cell_iterator &)>
958 const std::vector<typename MeshType::active_cell_iterator>
963 Assert(contains_locally_owned_cells<MeshType>(active_halo_layer) ==
false,
964 ExcMessage(
"Halo layer contains locally owned cells"));
965 Assert(contains_artificial_cells<MeshType>(active_halo_layer) ==
false,
966 ExcMessage(
"Halo layer contains artificial cells"));
968 return active_halo_layer;
973 template <
typename MeshType>
977 const MeshType &mesh,
978 const std::function<
bool(
const typename MeshType::active_cell_iterator &)>
980 const double layer_thickness)
982 std::vector<typename MeshType::active_cell_iterator>
983 subdomain_boundary_cells, active_cell_layer_within_distance;
984 std::vector<bool> vertices_outside_subdomain(
985 mesh.get_triangulation().n_vertices(),
false);
987 const unsigned int spacedim = MeshType::space_dimension;
989 unsigned int n_non_predicate_cells = 0;
997 for (
const auto &cell : mesh.active_cell_iterators())
998 if (!predicate(cell))
1000 for (
const unsigned int v : cell->vertex_indices())
1001 vertices_outside_subdomain[cell->vertex_index(v)] =
true;
1002 ++n_non_predicate_cells;
1009 if (n_non_predicate_cells == 0 ||
1010 n_non_predicate_cells == mesh.get_triangulation().n_active_cells())
1011 return std::vector<typename MeshType::active_cell_iterator>();
1015 for (
const auto &cell : mesh.active_cell_iterators())
1016 if (predicate(cell))
1018 for (
const unsigned int v : cell->vertex_indices())
1019 if (vertices_outside_subdomain[cell->vertex_index(v)] ==
true)
1021 subdomain_boundary_cells.push_back(cell);
1031 const double DOUBLE_EPSILON = 100. * std::numeric_limits<double>::epsilon();
1034 for (
unsigned int d = 0; d < spacedim; ++d)
1036 bounding_box.first[d] -= (layer_thickness + DOUBLE_EPSILON);
1037 bounding_box.second[d] += (layer_thickness + DOUBLE_EPSILON);
1040 std::vector<Point<spacedim>>
1041 subdomain_boundary_cells_centers;
1044 subdomain_boundary_cells_radii;
1046 subdomain_boundary_cells_centers.reserve(subdomain_boundary_cells.size());
1047 subdomain_boundary_cells_radii.reserve(subdomain_boundary_cells.size());
1049 for (
typename std::vector<typename MeshType::active_cell_iterator>::
1050 const_iterator subdomain_boundary_cell_iterator =
1051 subdomain_boundary_cells.begin();
1052 subdomain_boundary_cell_iterator != subdomain_boundary_cells.end();
1053 ++subdomain_boundary_cell_iterator)
1055 const std::pair<Point<spacedim>,
double>
1056 &subdomain_boundary_cell_enclosing_ball =
1057 (*subdomain_boundary_cell_iterator)->enclosing_ball();
1059 subdomain_boundary_cells_centers.push_back(
1060 subdomain_boundary_cell_enclosing_ball.first);
1061 subdomain_boundary_cells_radii.push_back(
1062 subdomain_boundary_cell_enclosing_ball.second);
1064 AssertThrow(subdomain_boundary_cells_radii.size() ==
1065 subdomain_boundary_cells_centers.size(),
1074 for (
const auto &cell : mesh.active_cell_iterators())
1077 if (predicate(cell))
1080 const std::pair<Point<spacedim>,
double> &cell_enclosing_ball =
1081 cell->enclosing_ball();
1084 cell_enclosing_ball.first;
1085 const double cell_enclosing_ball_radius = cell_enclosing_ball.second;
1087 bool cell_inside =
true;
1089 for (
unsigned int d = 0; d < spacedim; ++d)
1091 (cell_enclosing_ball_center[d] + cell_enclosing_ball_radius >
1092 bounding_box.first[d]) &&
1093 (cell_enclosing_ball_center[d] - cell_enclosing_ball_radius <
1094 bounding_box.second[d]);
1100 for (
unsigned int i = 0; i < subdomain_boundary_cells_radii.size();
1103 subdomain_boundary_cells_centers[i]) <
1105 subdomain_boundary_cells_radii[i] +
1106 layer_thickness + DOUBLE_EPSILON))
1108 active_cell_layer_within_distance.push_back(cell);
1113 return active_cell_layer_within_distance;
1118 template <
typename MeshType>
1128 std::function<
bool(
const typename MeshType::active_cell_iterator &)>
1129 predicate(locally_owned_cell_predicate);
1131 const std::vector<typename MeshType::active_cell_iterator>
1132 ghost_cell_layer_within_distance =
1140 contains_locally_owned_cells<MeshType>(
1141 ghost_cell_layer_within_distance) ==
false,
1143 "Ghost cells within layer_thickness contains locally owned cells."));
1145 contains_artificial_cells<MeshType>(ghost_cell_layer_within_distance) ==
1148 "Ghost cells within layer_thickness contains artificial cells. "
1149 "The function compute_ghost_cell_layer_within_distance "
1150 "is probably called while using parallel::distributed::Triangulation. "
1151 "In such case please refer to the description of this function."));
1153 return ghost_cell_layer_within_distance;
1158 template <
typename MeshType>
1164 const std::function<
bool(
1165 const typename MeshType::
1166 active_cell_iterator &)>
1169 std::vector<bool> locally_active_vertices_on_subdomain(
1170 mesh.get_triangulation().n_vertices(),
false);
1172 const unsigned int spacedim = MeshType::space_dimension;
1179 for (
const auto &cell : mesh.active_cell_iterators())
1180 if (predicate(cell))
1182 minp = cell->center();
1183 maxp = cell->center();
1189 for (
const auto &cell : mesh.active_cell_iterators())
1190 if (predicate(cell))
1191 for (
const unsigned int v : cell->vertex_indices())
1192 if (locally_active_vertices_on_subdomain[cell->vertex_index(v)] ==
1195 locally_active_vertices_on_subdomain[cell->vertex_index(v)] =
1197 for (
unsigned int d = 0; d < spacedim; ++d)
1199 minp[d] =
std::min(minp[d], cell->vertex(v)[d]);
1200 maxp[d] =
std::max(maxp[d], cell->vertex(v)[d]);
1204 return std::make_pair(minp, maxp);
1209 template <
typename MeshType>
1211 std::list<std::pair<
1212 typename MeshType::cell_iterator,
1219 ExcMessage(
"The two meshes must be represent triangulations that "
1220 "have the same coarse meshes"));
1227 bool remove_ghost_cells =
false;
1228#ifdef DEAL_II_WITH_MPI
1230 constexpr int dim = MeshType::dimension;
1231 constexpr int spacedim = MeshType::space_dimension;
1233 *
>(&mesh_1.get_triangulation()) !=
nullptr ||
1235 *
>(&mesh_2.get_triangulation()) !=
nullptr)
1237 Assert(&mesh_1.get_triangulation() == &mesh_2.get_triangulation(),
1238 ExcMessage(
"This function can only be used with meshes "
1239 "corresponding to distributed Triangulations when "
1240 "both Triangulations are equal."));
1241 remove_ghost_cells =
true;
1253 using CellList = std::list<std::pair<
typename MeshType::cell_iterator,
1254 typename MeshType::cell_iterator>>;
1258 typename MeshType::cell_iterator cell_1 = mesh_1.begin(0),
1259 cell_2 = mesh_2.begin(0);
1260 for (; cell_1 != mesh_1.end(0); ++cell_1, ++cell_2)
1261 cell_list.emplace_back(cell_1, cell_2);
1264 typename CellList::iterator cell_pair = cell_list.begin();
1265 while (cell_pair != cell_list.end())
1269 if (cell_pair->first->has_children() &&
1270 cell_pair->second->has_children())
1272 Assert(cell_pair->first->refinement_case() ==
1273 cell_pair->second->refinement_case(),
1275 for (
unsigned int c = 0; c < cell_pair->first->n_children(); ++c)
1276 cell_list.emplace_back(cell_pair->first->child(c),
1277 cell_pair->second->child(c));
1282 const auto previous_cell_pair = cell_pair;
1284 cell_list.erase(previous_cell_pair);
1289 if (remove_ghost_cells &&
1290 ((cell_pair->first->is_active() &&
1291 !cell_pair->first->is_locally_owned()) ||
1292 (cell_pair->second->is_active() &&
1293 !cell_pair->second->is_locally_owned())))
1296 const auto previous_cell_pair = cell_pair;
1298 cell_list.erase(previous_cell_pair);
1307 for (cell_pair = cell_list.begin(); cell_pair != cell_list.end();
1309 Assert(cell_pair->first->is_active() || cell_pair->second->is_active() ||
1310 (cell_pair->first->refinement_case() !=
1311 cell_pair->second->refinement_case()),
1319 template <
int dim,
int spacedim>
1336 endc = mesh_1.
end(0);
1337 for (; cell_1 != endc; ++cell_1, ++cell_2)
1339 if (cell_1->
n_vertices() != cell_2->n_vertices())
1342 if (cell_1->
vertex(v) != cell_2->vertex(v))
1355 template <
typename MeshType>
1360 mesh_2.get_triangulation());
1365 template <
int dim,
int spacedim>
1366 std::pair<typename DoFHandler<dim, spacedim>::active_cell_iterator,
1372 const double tolerance)
1376 ExcMessage(
"Mapping collection needs to have either size 1 "
1377 "or size equal to the number of elements in "
1378 "the FECollection."));
1380 using cell_iterator =
1383 std::pair<cell_iterator, Point<dim>> best_cell;
1389 const std::vector<bool> marked_vertices = {};
1391 mapping[0], mesh, p, marked_vertices, tolerance);
1398 double best_distance = tolerance;
1399 int best_level = -1;
1406 std::vector<cell_iterator> adjacent_cells_tmp =
1414 std::set<cell_iterator> adjacent_cells(adjacent_cells_tmp.begin(),
1415 adjacent_cells_tmp.end());
1416 std::set<cell_iterator> searched_cells;
1426 unsigned int cells_searched = 0;
1427 while (!found && cells_searched < n_cells)
1429 for (
const auto &cell : adjacent_cells)
1434 mapping[cell->active_fe_index()]
1435 .transform_real_to_unit_cell(cell, p);
1441 cell->reference_cell().closest_point(p_cell).distance(
1448 if (dist < best_distance ||
1449 (dist == best_distance && cell->level() > best_level))
1452 best_distance = dist;
1453 best_level = cell->level();
1454 best_cell = std::make_pair(cell, p_cell);
1474 cells_searched += adjacent_cells.size();
1480 if (!found && cells_searched < n_cells)
1482 find_active_cell_around_point_internal<dim,
1485 mesh, searched_cells, adjacent_cells);
1494 template <
typename MeshType>
1497 const typename MeshType::active_cell_iterator &cell)
1499 Assert(cell->is_locally_owned(),
1500 ExcMessage(
"This function only makes sense if the cell for "
1501 "which you are asking for a patch, is locally "
1504 std::vector<typename MeshType::active_cell_iterator> patch;
1505 patch.push_back(cell);
1506 for (
const unsigned int face_number : cell->face_indices())
1507 if (cell->face(face_number)->at_boundary() ==
false)
1509 if (cell->neighbor(face_number)->has_children() ==
false)
1510 patch.push_back(cell->neighbor(face_number));
1515 if (MeshType::dimension > 1)
1517 for (
unsigned int subface = 0;
1518 subface < cell->face(face_number)->n_children();
1521 cell->neighbor_child_on_subface(face_number, subface));
1527 typename MeshType::cell_iterator neighbor =
1528 cell->neighbor(face_number);
1529 while (neighbor->has_children())
1530 neighbor = neighbor->child(1 - face_number);
1532 Assert(neighbor->neighbor(1 - face_number) == cell,
1534 patch.push_back(neighbor);
1542 template <
class Container>
1543 std::vector<typename Container::cell_iterator>
1545 const std::vector<typename Container::active_cell_iterator> &patch)
1549 "Vector containing patch cells should not be an empty vector!"));
1553 int min_level = patch[0]->level();
1555 for (
unsigned int i = 0; i < patch.size(); ++i)
1556 min_level =
std::min(min_level, patch[i]->level());
1557 std::set<typename Container::cell_iterator> uniform_cells;
1558 typename std::vector<
1559 typename Container::active_cell_iterator>::const_iterator patch_cell;
1561 for (patch_cell = patch.begin(); patch_cell != patch.end(); ++patch_cell)
1566 if ((*patch_cell)->level() == min_level)
1567 uniform_cells.insert(*patch_cell);
1574 typename Container::cell_iterator parent = *patch_cell;
1576 while (parent->level() > min_level)
1577 parent = parent->parent();
1578 uniform_cells.insert(parent);
1582 return std::vector<typename Container::cell_iterator>(uniform_cells.begin(),
1583 uniform_cells.end());
1588 template <
class Container>
1591 const std::vector<typename Container::active_cell_iterator> &patch,
1593 &local_triangulation,
1596 Container::space_dimension>::active_cell_iterator,
1597 typename Container::active_cell_iterator> &patch_to_global_tria_map)
1600 const std::vector<typename Container::cell_iterator> uniform_cells =
1603 local_triangulation.
clear();
1604 std::vector<Point<Container::space_dimension>> vertices;
1605 const unsigned int n_uniform_cells = uniform_cells.size();
1606 std::vector<CellData<Container::dimension>> cells(n_uniform_cells);
1609 typename std::vector<typename Container::cell_iterator>::const_iterator
1611 for (uniform_cell = uniform_cells.begin();
1612 uniform_cell != uniform_cells.end();
1615 for (
const unsigned int v : (*uniform_cell)->vertex_indices())
1618 (*uniform_cell)->vertex(v);
1619 bool repeat_vertex =
false;
1621 for (
unsigned int m = 0; m < i; ++m)
1623 if (position == vertices[m])
1625 repeat_vertex =
true;
1626 cells[k].vertices[v] = m;
1630 if (repeat_vertex ==
false)
1632 vertices.push_back(position);
1633 cells[k].vertices[v] = i;
1644 unsigned int index = 0;
1647 Container::space_dimension>::cell_iterator,
1648 typename Container::cell_iterator>
1649 patch_to_global_tria_map_tmp;
1651 Container::space_dimension>::cell_iterator
1652 coarse_cell = local_triangulation.
begin();
1653 coarse_cell != local_triangulation.
end();
1654 ++coarse_cell, ++index)
1656 patch_to_global_tria_map_tmp.insert(
1657 std::make_pair(coarse_cell, uniform_cells[index]));
1661 Assert(coarse_cell->center().distance(uniform_cells[index]->center()) <=
1662 1e-15 * coarse_cell->diameter(),
1665 bool refinement_necessary;
1670 refinement_necessary =
false;
1671 for (
const auto &active_tria_cell :
1674 if (patch_to_global_tria_map_tmp[active_tria_cell]->has_children())
1676 active_tria_cell->set_refine_flag();
1677 refinement_necessary =
true;
1680 for (
unsigned int i = 0; i < patch.size(); ++i)
1685 if (patch_to_global_tria_map_tmp[active_tria_cell] ==
1690 for (
const unsigned int v :
1691 active_tria_cell->vertex_indices())
1692 active_tria_cell->vertex(v) = patch[i]->vertex(v);
1694 Assert(active_tria_cell->center().distance(
1695 patch_to_global_tria_map_tmp[active_tria_cell]
1697 1e-15 * active_tria_cell->diameter(),
1700 active_tria_cell->set_user_flag();
1706 if (refinement_necessary)
1711 Container::dimension,
1712 Container::space_dimension>::cell_iterator cell =
1713 local_triangulation.
begin();
1714 cell != local_triangulation.
end();
1717 if (patch_to_global_tria_map_tmp.find(cell) !=
1718 patch_to_global_tria_map_tmp.end())
1720 if (cell->has_children())
1727 for (
unsigned int c = 0; c < cell->n_children(); ++c)
1729 if (patch_to_global_tria_map_tmp.find(cell->child(
1730 c)) == patch_to_global_tria_map_tmp.end())
1732 patch_to_global_tria_map_tmp.insert(
1735 patch_to_global_tria_map_tmp[cell]->child(
1757 patch_to_global_tria_map_tmp.erase(cell);
1763 while (refinement_necessary);
1769 Container::space_dimension>::cell_iterator
1770 cell = local_triangulation.
begin();
1771 cell != local_triangulation.
end();
1774 if (cell->user_flag_set())
1776 Assert(patch_to_global_tria_map_tmp.find(cell) !=
1777 patch_to_global_tria_map_tmp.end(),
1780 Assert(cell->center().distance(
1781 patch_to_global_tria_map_tmp[cell]->center()) <=
1782 1e-15 * cell->diameter(),
1790 Container::space_dimension>::cell_iterator,
1791 typename Container::cell_iterator>::iterator
1792 map_tmp_it = patch_to_global_tria_map_tmp.
begin(),
1793 map_tmp_end = patch_to_global_tria_map_tmp.end();
1797 for (; map_tmp_it != map_tmp_end; ++map_tmp_it)
1798 patch_to_global_tria_map[map_tmp_it->first] = map_tmp_it->second;
1803 template <
int dim,
int spacedim>
1806 std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>>
1820 std::set<typename DoFHandler<dim, spacedim>::active_cell_iterator>>
1821 dof_to_set_of_cells_map;
1823 std::vector<types::global_dof_index> local_dof_indices;
1824 std::vector<types::global_dof_index> local_face_dof_indices;
1825 std::vector<types::global_dof_index> local_line_dof_indices;
1829 std::vector<bool> user_flags;
1834 std::map<typename DoFHandler<dim, spacedim>::active_line_iterator,
1836 lines_to_parent_lines_map;
1848 endc = dof_handler.
end();
1849 for (; cell != endc; ++cell)
1855 if (cell->is_artificial() ==
false)
1857 for (
unsigned int l = 0; l < cell->n_lines(); ++l)
1858 if (cell->line(l)->has_children())
1859 for (
unsigned int c = 0; c < cell->line(l)->n_children();
1862 lines_to_parent_lines_map[cell->line(l)->child(c)] =
1866 cell->line(l)->child(c)->set_user_flag();
1881 endc = dof_handler.
end();
1882 for (; cell != endc; ++cell)
1887 if (cell->is_artificial() ==
false)
1889 const unsigned int n_dofs_per_cell =
1891 local_dof_indices.resize(n_dofs_per_cell);
1895 cell->get_dof_indices(local_dof_indices);
1896 for (
unsigned int i = 0; i < n_dofs_per_cell; ++i)
1897 dof_to_set_of_cells_map[local_dof_indices[i]].insert(cell);
1907 for (
const unsigned int f : cell->face_indices())
1909 if (cell->face(f)->has_children())
1911 for (
unsigned int c = 0; c < cell->face(f)->n_children();
1926 Assert(cell->face(f)->child(c)->has_children() ==
false,
1929 const unsigned int n_dofs_per_face =
1931 local_face_dof_indices.resize(n_dofs_per_face);
1933 cell->face(f)->child(c)->get_dof_indices(
1934 local_face_dof_indices);
1935 for (
unsigned int i = 0; i < n_dofs_per_face; ++i)
1936 dof_to_set_of_cells_map[local_face_dof_indices[i]]
1940 else if ((cell->face(f)->at_boundary() ==
false) &&
1941 (cell->neighbor_is_coarser(f)))
1958 std::pair<unsigned int, unsigned int>
1959 neighbor_face_no_subface_no =
1960 cell->neighbor_of_coarser_neighbor(f);
1961 unsigned int face_no = neighbor_face_no_subface_no.first;
1962 unsigned int subface = neighbor_face_no_subface_no.second;
1964 const unsigned int n_dofs_per_face =
1966 local_face_dof_indices.resize(n_dofs_per_face);
1968 cell->neighbor(f)->face(face_no)->get_dof_indices(
1969 local_face_dof_indices);
1970 for (
unsigned int i = 0; i < n_dofs_per_face; ++i)
1971 dof_to_set_of_cells_map[local_face_dof_indices[i]].insert(
1976 for (
unsigned int c = 0;
1977 c < cell->neighbor(f)->face(face_no)->n_children();
1983 const unsigned int n_dofs_per_face =
1985 local_face_dof_indices.resize(n_dofs_per_face);
1990 ->has_children() ==
false,
1995 ->get_dof_indices(local_face_dof_indices);
1996 for (
unsigned int i = 0; i < n_dofs_per_face; ++i)
1997 dof_to_set_of_cells_map[local_face_dof_indices[i]]
2014 for (
unsigned int l = 0; l < cell->n_lines(); ++l)
2016 if (cell->line(l)->has_children())
2018 for (
unsigned int c = 0;
2019 c < cell->line(l)->n_children();
2022 Assert(cell->line(l)->child(c)->has_children() ==
2028 const unsigned int n_dofs_per_line =
2031 local_line_dof_indices.resize(n_dofs_per_line);
2033 cell->line(l)->child(c)->get_dof_indices(
2034 local_line_dof_indices);
2035 for (
unsigned int i = 0; i < n_dofs_per_line; ++i)
2036 dof_to_set_of_cells_map[local_line_dof_indices[i]]
2044 else if (cell->line(l)->user_flag_set() ==
true)
2048 lines_to_parent_lines_map[cell->line(l)];
2053 const unsigned int n_dofs_per_line =
2056 local_line_dof_indices.resize(n_dofs_per_line);
2058 parent_line->get_dof_indices(local_line_dof_indices);
2059 for (
unsigned int i = 0; i < n_dofs_per_line; ++i)
2060 dof_to_set_of_cells_map[local_line_dof_indices[i]]
2063 for (
unsigned int c = 0; c < parent_line->n_children();
2066 Assert(parent_line->child(c)->has_children() ==
2070 const unsigned int n_dofs_per_line =
2073 local_line_dof_indices.resize(n_dofs_per_line);
2075 parent_line->child(c)->get_dof_indices(
2076 local_line_dof_indices);
2077 for (
unsigned int i = 0; i < n_dofs_per_line; ++i)
2078 dof_to_set_of_cells_map[local_line_dof_indices[i]]
2102 std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>>
2103 dof_to_cell_patches;
2107 std::set<typename DoFHandler<dim, spacedim>::active_cell_iterator>>::
2108 iterator it = dof_to_set_of_cells_map.begin(),
2109 it_end = dof_to_set_of_cells_map.end();
2110 for (; it != it_end; ++it)
2111 dof_to_cell_patches[it->first].assign(it->second.begin(),
2114 return dof_to_cell_patches;
2120 template <
typename CellIterator>
2123 std::set<std::pair<CellIterator, unsigned int>> &pairs1,
2126 const unsigned int direction,
2128 const ::Tensor<1, CellIterator::AccessorType::space_dimension>
2131 const double abs_tol = 1e-10)
2133 static const int space_dim = CellIterator::AccessorType::space_dimension;
2139 constexpr int dim = CellIterator::AccessorType::dimension;
2140 constexpr int spacedim = CellIterator::AccessorType::space_dimension;
2145 if (!(((pairs1.size() > 0) &&
2146 (
dynamic_cast<const parallel::fullydistributed::
2147 Triangulation<dim, spacedim> *
>(
2148 &pairs1.begin()->first->get_triangulation()) !=
nullptr)) ||
2149 ((pairs2.size() > 0) &&
2150 (
dynamic_cast<const parallel::fullydistributed::
2151 Triangulation<dim, spacedim> *
>(
2152 &pairs2.begin()->first->get_triangulation()) !=
nullptr))))
2153 Assert(pairs1.size() == pairs2.size(),
2154 ExcMessage(
"Unmatched faces on periodic boundaries"));
2158 unsigned int n_matches = 0;
2161 using PairIterator =
2162 typename std::set<std::pair<CellIterator, unsigned int>>::const_iterator;
2163 for (PairIterator it1 = pairs1.begin(); it1 != pairs1.end(); ++it1)
2165 for (PairIterator it2 = pairs2.begin(); it2 != pairs2.end(); ++it2)
2167 const CellIterator cell1 = it1->first;
2168 const CellIterator cell2 = it2->first;
2169 const unsigned int face_idx1 = it1->second;
2170 const unsigned int face_idx2 = it2->second;
2171 if (
const std::optional<types::geometric_orientation> orientation =
2173 cell2->face(face_idx2),
2184 {face_idx1, face_idx2},
2185 orientation.value(),
2187 matched_pairs.push_back(matched_face);
2201 constexpr int dim = CellIterator::AccessorType::dimension;
2202 constexpr int spacedim = CellIterator::AccessorType::space_dimension;
2203 if (!(((pairs1.size() > 0) &&
2204 (
dynamic_cast<const parallel::fullydistributed::
2205 Triangulation<dim, spacedim> *
>(
2206 &pairs1.begin()->first->get_triangulation()) !=
nullptr)) ||
2207 ((pairs2.size() > 0) &&
2210 *
>(&pairs2.begin()->first->get_triangulation()) !=
nullptr))))
2211 AssertThrow(n_matches == pairs1.size() && pairs2.empty(),
2212 ExcMessage(
"Unmatched faces on periodic boundaries"));
2218 template <
typename MeshType>
2221 const MeshType &mesh,
2222 const
types::boundary_id b_id,
2223 const
unsigned int direction,
2228 const
double abs_tol)
2230 static const int dim = MeshType::dimension;
2231 static const int space_dim = MeshType::space_dimension;
2238 std::set<std::pair<typename MeshType::cell_iterator, unsigned int>> pairs1;
2239 std::set<std::pair<typename MeshType::cell_iterator, unsigned int>> pairs2;
2241 for (
typename MeshType::cell_iterator cell = mesh.begin(0);
2242 cell != mesh.end(0);
2245 const typename MeshType::face_iterator face_1 =
2246 cell->face(2 * direction);
2247 const typename MeshType::face_iterator face_2 =
2248 cell->face(2 * direction + 1);
2250 if (face_1->at_boundary() && face_1->boundary_id() == b_id)
2252 const std::pair<typename MeshType::cell_iterator, unsigned int>
2253 pair1 = std::make_pair(cell, 2 * direction);
2254 pairs1.insert(pair1);
2257 if (face_2->at_boundary() && face_2->boundary_id() == b_id)
2259 const std::pair<typename MeshType::cell_iterator, unsigned int>
2260 pair2 = std::make_pair(cell, 2 * direction + 1);
2261 pairs2.insert(pair2);
2265 Assert(pairs1.size() == pairs2.size(),
2266 ExcMessage(
"Unmatched faces on periodic boundaries"));
2268 Assert(pairs1.size() > 0,
2269 ExcMessage(
"No new periodic face pairs have been found. "
2270 "Are you sure that you've selected the correct boundary "
2271 "id's and that the coarsest level mesh is colorized?"));
2273 [[maybe_unused]]
const unsigned int size_old = matched_pairs.size();
2277 pairs1, pairs2, direction, matched_pairs, offset, matrix, abs_tol);
2282 const unsigned int size_new = matched_pairs.size();
2283 for (
unsigned int i = size_old; i < size_new; ++i)
2285 Assert(matched_pairs[i].orientation ==
2288 "Found a face match with non standard orientation. "
2289 "This function is only suitable for meshes with cells "
2290 "in default orientation"));
2297 template <
typename MeshType>
2300 const MeshType &mesh,
2301 const
types::boundary_id b_id1,
2302 const
types::boundary_id b_id2,
2303 const
unsigned int direction,
2308 const
double abs_tol)
2310 static const int dim = MeshType::dimension;
2311 static const int space_dim = MeshType::space_dimension;
2317 std::set<std::pair<typename MeshType::cell_iterator, unsigned int>> pairs1;
2318 std::set<std::pair<typename MeshType::cell_iterator, unsigned int>> pairs2;
2320 for (
typename MeshType::cell_iterator cell = mesh.begin(0);
2321 cell != mesh.end(0);
2324 for (
const unsigned int i : cell->face_indices())
2326 const typename MeshType::face_iterator face = cell->face(i);
2327 if (face->at_boundary() && face->boundary_id() == b_id1)
2329 const std::pair<typename MeshType::cell_iterator, unsigned int>
2330 pair1 = std::make_pair(cell, i);
2331 pairs1.insert(pair1);
2334 if (face->at_boundary() && face->boundary_id() == b_id2)
2336 const std::pair<typename MeshType::cell_iterator, unsigned int>
2337 pair2 = std::make_pair(cell, i);
2338 pairs2.insert(pair2);
2349 if (!(((pairs1.size() > 0) &&
2352 *
>(&pairs1.begin()->first->get_triangulation()) !=
nullptr)) ||
2353 ((pairs2.size() > 0) &&
2356 *
>(&pairs2.begin()->first->get_triangulation()) !=
nullptr))))
2357 Assert(pairs1.size() == pairs2.size(),
2358 ExcMessage(
"Unmatched faces on periodic boundaries"));
2361 (pairs1.size() > 0 ||
2364 &mesh.begin()->get_triangulation()) !=
nullptr)),
2365 ExcMessage(
"No new periodic face pairs have been found. "
2366 "Are you sure that you've selected the correct boundary "
2367 "id's and that the coarsest level mesh is colorized?"));
2371 pairs1, pairs2, direction, matched_pairs, offset, matrix, abs_tol);
2385 template <
int spacedim>
2389 const unsigned int direction,
2392 const double abs_tol = 1e-10)
2400 if (matrix.m() == spacedim)
2401 for (
unsigned int i = 0; i < spacedim; ++i)
2402 for (
unsigned int j = 0; j < spacedim; ++j)
2403 distance[i] += matrix(i, j) * point1[j];
2407 distance += offset - point2;
2409 for (
unsigned int i = 0; i < spacedim; ++i)
2415 if (
std::abs(distance[i]) > abs_tol)
2424 template <
typename FaceIterator>
2425 std::optional<types::geometric_orientation>
2427 const FaceIterator &face1,
2428 const FaceIterator &face2,
2429 const unsigned int direction,
2432 const double abs_tol)
2434 Assert(matrix.m() == matrix.n(),
2435 ExcMessage(
"The supplied matrix must be a square matrix"));
2436 Assert(face1->reference_cell() == face2->reference_cell(),
2438 "The faces to be matched must have the same reference cell."));
2443 std::vector<unsigned int> face1_vertices(face1->n_vertices(),
2447 std::set<unsigned int> face2_vertices_set;
2448 for (
unsigned int i = 0; i < face1->n_vertices(); ++i)
2449 face2_vertices_set.insert(i);
2451 for (
unsigned int i = 0; i < face1->n_vertices(); ++i)
2453 for (
auto it = face2_vertices_set.begin();
2454 it != face2_vertices_set.end();
2464 face1_vertices[i] = *it;
2465 face2_vertices[i] = i;
2466 face2_vertices_set.erase(it);
2472 if (face2_vertices_set.empty())
2475 Assert(face1_vertices.end() ==
2476 std::find(face1_vertices.begin(),
2477 face1_vertices.begin() + face1->n_vertices(),
2480 Assert(face2_vertices.end() ==
2481 std::find(face2_vertices.begin(),
2482 face2_vertices.begin() + face1->n_vertices(),
2486 const auto reference_cell = face1->reference_cell();
2489 return std::make_optional(reference_cell.get_combined_orientation(
2491 face2_vertices.cbegin() + face2->n_vertices()),
2493 face1_vertices.cbegin() + face1->n_vertices())));
2496 return std::nullopt;
2501#include "grid/grid_tools_dof_handlers.inst"
ArrayView< std::remove_reference_t< typename std::iterator_traits< Iterator >::reference >, MemorySpaceType > make_array_view(const Iterator begin, const Iterator end)
cell_iterator end() const
const hp::FECollection< dim, spacedim > & get_fe_collection() const
const FiniteElement< dim, spacedim > & get_fe(const types::fe_index index=0) const
const Triangulation< dim, spacedim > & get_triangulation() const
active_cell_iterator begin_active(const unsigned int level=0) 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
virtual bool preserves_vertex_locations() const override
Abstract base class for mapping classes.
constexpr numbers::NumberTraits< Number >::real_type distance_square(const Point< dim, Number > &p) const
std_cxx20::ranges::iota_view< unsigned int, unsigned int > vertex_indices() const
unsigned int n_vertices() const
Point< spacedim > & vertex(const unsigned int i) const
cell_iterator begin(const unsigned int level=0) const
virtual void create_triangulation(const std::vector< Point< spacedim > > &vertices, const std::vector< CellData< dim > > &cells, const SubCellData &subcelldata)
unsigned int n_active_cells() const
void save_user_flags(std::ostream &out) const
const std::vector< Point< spacedim > > & get_vertices() const
cell_iterator end() const
virtual void execute_coarsening_and_refinement()
unsigned int n_cells() const
const std::vector< bool > & get_used_vertices() const
Triangulation< dim, spacedim > & get_triangulation()
void load_user_flags(std::istream &in)
unsigned int size() const
#define DEAL_II_NAMESPACE_OPEN
constexpr bool running_in_debug_mode()
#define DEAL_II_CXX20_REQUIRES(condition)
#define DEAL_II_NAMESPACE_CLOSE
const unsigned int DoFAccessor< structdim, dim, spacedim, level_dof_access >::space_dimension
IteratorRange< active_cell_iterator > active_cell_iterators() const
static ::ExceptionBase & ExcTransformationFailed()
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
static ::ExceptionBase & ExcVertexNotUsed(unsigned int arg1)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
typename ActiveSelector::line_iterator line_iterator
typename ActiveSelector::active_cell_iterator active_cell_iterator
TriaIterator< CellAccessor< dim, spacedim > > cell_iterator
const Mapping< dim, spacedim > & get_default_linear_mapping(const Triangulation< dim, spacedim > &triangulation)
MappingQ< dim, spacedim > StaticMappingQ1< dim, spacedim >::mapping
constexpr T fixed_power(const T t)
constexpr unsigned int invalid_unsigned_int
constexpr types::geometric_orientation default_geometric_orientation
typename type_identity< T >::type type_identity_t
::VectorizedArray< Number, width > min(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)
unsigned int global_dof_index