55 template <
int dim,
template <
int,
int>
class MeshType,
int spacedim>
59 const std::vector<bool> & marked_vertices)
70 marked_vertices.size() == 0,
72 marked_vertices.size()));
82 marked_vertices.size() == 0 ||
83 std::equal(marked_vertices.begin(),
84 marked_vertices.end(),
86 [](
bool p,
bool q) {
return !p || q; }),
88 "marked_vertices should be a subset of used vertices in the triangulation " 89 "but marked_vertices contains one or more vertices that are not used vertices!"));
97 const std::vector<bool> &used = (marked_vertices.size() == 0) ?
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>
134 const MeshType<dim, spacedim> &mesh,
136 const std::vector<bool> & marked_vertices)
151 marked_vertices.size() == 0,
153 marked_vertices.size()));
163 marked_vertices.size() == 0 ||
164 std::equal(marked_vertices.begin(),
165 marked_vertices.end(),
167 [](
bool p,
bool q) {
return !p || q; }),
169 "marked_vertices should be a subset of used vertices in the triangulation " 170 "but marked_vertices contains one or more vertices that are not used vertices!"));
173 if (marked_vertices.size())
174 for (
auto it = vertices.begin(); it != vertices.end();)
176 if (marked_vertices[it->first] ==
false)
178 vertices.erase(it++);
191 template <
int dim,
template <
int,
int>
class MeshType,
int spacedim>
193 std::vector<typename MeshType<dim, spacedim>::active_cell_iterator>
196 typename ::internal::
197 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type>
200 const unsigned int vertex)
206 Assert(mesh.get_triangulation().get_used_vertices()[vertex],
213 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type>
216 typename ::internal::
217 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type
218 cell = mesh.begin_active(),
254 for (; cell != endc; ++cell)
256 for (
const unsigned int v : cell->vertex_indices())
257 if (cell->vertex_index(v) == vertex)
262 adjacent_cells.insert(cell);
269 for (
const auto face :
270 cell->reference_cell().faces_for_given_vertex(v))
271 if (!cell->at_boundary(face) &&
272 cell->neighbor(face)->is_active())
284 adjacent_cells.insert(cell->neighbor(face));
294 for (
unsigned int e = 0;
e < cell->n_lines(); ++
e)
295 if (cell->line(
e)->has_children())
299 if (cell->line(
e)->child(0)->vertex_index(1) == vertex)
301 adjacent_cells.insert(cell);
323 typename ::internal::
324 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type>(
325 adjacent_cells.begin(), adjacent_cells.end());
332 template <
int dim,
template <
int,
int>
class MeshType,
int spacedim>
334 find_active_cell_around_point_internal(
335 const MeshType<dim, spacedim> &mesh,
337 std::set<
typename MeshType<dim, spacedim>::active_cell_iterator>
339 std::set<
typename MeshType<dim, spacedim>::active_cell_iterator>
343 typename ::internal::
344 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type>
347 typename ::internal::
348 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type>
353 using cell_iterator =
354 typename MeshType<dim, spacedim>::active_cell_iterator;
356 using cell_iterator = typename ::internal::
357 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type;
361 searched_cells.insert(adjacent_cells.begin(), adjacent_cells.end());
365 std::set<cell_iterator> adjacent_cells_new;
367 typename std::set<cell_iterator>::const_iterator cell =
368 adjacent_cells.begin(),
370 adjacent_cells.end();
371 for (; cell != endc; ++cell)
373 std::vector<cell_iterator> active_neighbors;
374 get_active_neighbors<MeshType<dim, spacedim>>(*cell,
376 for (
unsigned int i = 0; i < active_neighbors.size(); ++i)
377 if (searched_cells.find(active_neighbors[i]) ==
378 searched_cells.end())
379 adjacent_cells_new.insert(active_neighbors[i]);
381 adjacent_cells.clear();
382 adjacent_cells.insert(adjacent_cells_new.begin(),
383 adjacent_cells_new.end());
384 if (adjacent_cells.size() == 0)
392 cell_iterator it = mesh.begin_active();
393 for (; it != mesh.end(); ++it)
394 if (searched_cells.find(it) == searched_cells.end())
396 adjacent_cells.insert(it);
405 template <
int dim,
template <
int,
int>
class MeshType,
int spacedim>
407 typename MeshType<dim, spacedim>::active_cell_iterator
409 typename ::internal::
410 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type
414 const std::vector<bool> & marked_vertices,
415 const double tolerance)
417 return find_active_cell_around_point<dim, MeshType, spacedim>(
428 template <
int dim,
template <
int,
int>
class MeshType,
int spacedim>
430 std::pair<typename MeshType<dim, spacedim>::active_cell_iterator,
Point<dim>>
432 std::pair<typename ::internal::
433 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type,
437 const MeshType<dim, spacedim> &mesh,
439 const std::vector<bool> & marked_vertices,
440 const double tolerance)
442 using active_cell_iterator = typename ::internal::
443 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type;
449 double best_distance = tolerance;
451 std::pair<active_cell_iterator, Point<dim>> best_cell;
455 std::vector<active_cell_iterator> adjacent_cells_tmp =
464 std::set<active_cell_iterator> adjacent_cells(adjacent_cells_tmp.begin(),
465 adjacent_cells_tmp.end());
466 std::set<active_cell_iterator> searched_cells;
475 mesh.get_triangulation().n_active_cells();
477 unsigned int cells_searched = 0;
478 while (!found && cells_searched < n_active_cells)
480 typename std::set<active_cell_iterator>::const_iterator
481 cell = adjacent_cells.begin(),
482 endc = adjacent_cells.end();
483 for (; cell != endc; ++cell)
485 if ((*cell)->is_artificial() ==
false)
501 if ((dist < best_distance) ||
502 ((dist == best_distance) &&
503 ((*cell)->level() > best_level)))
506 best_distance = dist;
507 best_level = (*cell)->level();
508 best_cell = std::make_pair(*cell, p_cell);
513 spacedim>::ExcTransformationFailed &)
531 cells_searched += adjacent_cells.size();
536 if (marked_vertices.size() > 0)
537 cells_searched = n_active_cells;
546 if (!found && cells_searched < n_active_cells)
548 find_active_cell_around_point_internal<dim, MeshType, spacedim>(
549 mesh, searched_cells, adjacent_cells);
554 ExcPointNotFound<spacedim>(p));
561 template <
int dim,
template <
int,
int>
class MeshType,
int spacedim>
563 std::vector<std::pair<typename MeshType<dim, spacedim>::active_cell_iterator,
566 std::vector<std::pair<
567 typename ::internal::
568 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type,
572 const MeshType<dim, spacedim> &mesh,
574 const double tolerance,
575 const std::vector<bool> &marked_vertices)
580 mapping, mesh, p, marked_vertices, tolerance);
583 mapping, mesh, p, tolerance, cell_and_point);
585 catch (ExcPointNotFound<spacedim> &)
593 template <
int dim,
template <
int,
int>
class MeshType,
int spacedim>
595 std::vector<std::pair<typename MeshType<dim, spacedim>::active_cell_iterator,
598 std::vector<std::pair<
599 typename ::internal::
600 ActiveCellIterator<dim, spacedim, MeshType<dim, spacedim>>::type,
605 const MeshType<dim, spacedim> &mesh,
607 const double tolerance,
608 const std::pair<
typename MeshType<dim, spacedim>::active_cell_iterator,
612 std::pair<typename MeshType<dim, spacedim>::active_cell_iterator,
617 cells_and_points.push_back(first_cell);
621 const Point<dim> unit_point = cells_and_points.front().second;
622 const auto my_cell = cells_and_points.front().first;
624 unsigned int n_dirs_at_threshold = 0;
626 for (
unsigned int d = 0;
d < dim; ++
d)
628 distance_to_center[
d] = std::abs(unit_point[
d] - 0.5);
629 if (distance_to_center[
d] > 0.5 - tolerance)
631 ++n_dirs_at_threshold;
632 last_point_at_threshold =
d;
636 std::vector<typename MeshType<dim, spacedim>::active_cell_iterator>
639 if (n_dirs_at_threshold == 1)
641 unsigned int neighbor_index =
642 2 * last_point_at_threshold +
643 (unit_point[last_point_at_threshold] > 0.5 ? 1 : 0);
644 if (!my_cell->at_boundary(neighbor_index))
645 cells_to_add.push_back(my_cell->neighbor(neighbor_index));
648 else if (n_dirs_at_threshold == dim)
650 unsigned int local_vertex_index = 0;
651 for (
unsigned int d = 0;
d < dim; ++
d)
652 local_vertex_index += (unit_point[
d] > 0.5 ? 1 : 0) <<
d;
653 std::vector<typename MeshType<dim, spacedim>::active_cell_iterator>
655 mesh, my_cell->vertex_index(local_vertex_index));
656 for (
const auto &cell : cells)
658 cells_to_add.push_back(cell);
665 else if (n_dirs_at_threshold == 2)
667 std::pair<unsigned int, unsigned int> vertex_indices[3];
668 unsigned int count_vertex_indices = 0;
670 for (
unsigned int d = 0;
d < dim; ++
d)
672 if (distance_to_center[
d] > 0.5 - tolerance)
674 vertex_indices[count_vertex_indices].first =
d;
675 vertex_indices[count_vertex_indices].second =
676 unit_point[
d] > 0.5 ? 1 : 0;
677 count_vertex_indices++;
687 const unsigned int first_vertex =
688 (vertex_indices[0].second << vertex_indices[0].first) +
689 (vertex_indices[1].
second << vertex_indices[1].first);
690 for (
unsigned int d = 0;
d < 2; ++
d)
694 my_cell->vertex_index(first_vertex + (
d << free_direction)));
695 for (
const auto &cell : tentative_cells)
697 bool cell_not_yet_present =
true;
698 for (
const auto &other_cell : cells_to_add)
699 if (cell == other_cell)
701 cell_not_yet_present =
false;
704 if (cell_not_yet_present)
705 cells_to_add.push_back(cell);
710 const double original_distance_to_unit_cell =
712 for (
const auto &cell : cells_to_add)
720 original_distance_to_unit_cell + tolerance)
721 cells_and_points.emplace_back(cell, p_unit);
728 cells_and_points.begin(),
729 cells_and_points.end(),
730 [](
const std::pair<typename MeshType<dim, spacedim>::active_cell_iterator,
732 const std::pair<typename MeshType<dim, spacedim>::active_cell_iterator,
735 return cells_and_points;
740 template <
class MeshType>
741 std::vector<typename MeshType::active_cell_iterator>
743 const MeshType &mesh,
744 const std::function<
bool(
const typename MeshType::active_cell_iterator &)>
747 std::vector<typename MeshType::active_cell_iterator> active_halo_layer;
748 std::vector<bool> locally_active_vertices_on_subdomain(
749 mesh.get_triangulation().n_vertices(),
false);
754 for (
const auto &cell : mesh.active_cell_iterators())
756 for (
const auto v : cell->vertex_indices())
757 locally_active_vertices_on_subdomain[cell->vertex_index(v)] =
true;
762 for (
const auto &cell : mesh.active_cell_iterators())
763 if (!predicate(cell))
764 for (
const auto v : cell->vertex_indices())
765 if (locally_active_vertices_on_subdomain[cell->vertex_index(v)] ==
768 active_halo_layer.push_back(cell);
772 return active_halo_layer;
777 template <
class MeshType>
778 std::vector<typename MeshType::cell_iterator>
780 const MeshType &mesh,
781 const std::function<
bool(
const typename MeshType::cell_iterator &)>
783 const unsigned int level)
785 std::vector<typename MeshType::cell_iterator> level_halo_layer;
786 std::vector<bool> locally_active_vertices_on_level_subdomain(
787 mesh.get_triangulation().n_vertices(),
false);
792 for (
typename MeshType::cell_iterator cell = mesh.begin(level);
793 cell != mesh.end(level);
796 for (
const unsigned int v : cell->vertex_indices())
797 locally_active_vertices_on_level_subdomain[cell->vertex_index(v)] =
803 for (
typename MeshType::cell_iterator cell = mesh.begin(level);
804 cell != mesh.end(level);
806 if (!predicate(cell))
807 for (
const unsigned int v : cell->vertex_indices())
808 if (locally_active_vertices_on_level_subdomain[cell->vertex_index(
811 level_halo_layer.push_back(cell);
815 return level_halo_layer;
821 template <
class MeshType>
823 contains_locally_owned_cells(
824 const std::vector<typename MeshType::active_cell_iterator> &cells)
826 for (
typename std::vector<
827 typename MeshType::active_cell_iterator>::const_iterator it =
832 if ((*it)->is_locally_owned())
838 template <
class MeshType>
840 contains_artificial_cells(
841 const std::vector<typename MeshType::active_cell_iterator> &cells)
843 for (
typename std::vector<
844 typename MeshType::active_cell_iterator>::const_iterator it =
849 if ((*it)->is_artificial())
858 template <
class MeshType>
859 std::vector<typename MeshType::active_cell_iterator>
862 std::function<bool(const typename MeshType::active_cell_iterator &)>
865 const std::vector<typename MeshType::active_cell_iterator>
870 Assert(contains_locally_owned_cells<MeshType>(active_halo_layer) ==
false,
871 ExcMessage(
"Halo layer contains locally owned cells"));
872 Assert(contains_artificial_cells<MeshType>(active_halo_layer) ==
false,
873 ExcMessage(
"Halo layer contains artificial cells"));
875 return active_halo_layer;
880 template <
class MeshType>
881 std::vector<typename MeshType::active_cell_iterator>
883 const MeshType &mesh,
884 const std::function<
bool(
const typename MeshType::active_cell_iterator &)>
886 const double layer_thickness)
888 std::vector<typename MeshType::active_cell_iterator>
889 subdomain_boundary_cells, active_cell_layer_within_distance;
890 std::vector<bool> vertices_outside_subdomain(
891 mesh.get_triangulation().n_vertices(),
false);
893 const unsigned int spacedim = MeshType::space_dimension;
895 unsigned int n_non_predicate_cells = 0;
903 for (
const auto &cell : mesh.active_cell_iterators())
904 if (!predicate(cell))
906 for (
const unsigned int v : cell->vertex_indices())
907 vertices_outside_subdomain[cell->vertex_index(v)] =
true;
908 n_non_predicate_cells++;
915 if (n_non_predicate_cells == 0 ||
916 n_non_predicate_cells == mesh.get_triangulation().n_active_cells())
917 return std::vector<typename MeshType::active_cell_iterator>();
921 for (
const auto &cell : mesh.active_cell_iterators())
924 for (
const unsigned int v : cell->vertex_indices())
925 if (vertices_outside_subdomain[cell->vertex_index(v)] ==
true)
927 subdomain_boundary_cells.push_back(cell);
940 for (
unsigned int d = 0;
d < spacedim; ++
d)
942 bounding_box.first[
d] -= (layer_thickness + DOUBLE_EPSILON);
943 bounding_box.second[
d] += (layer_thickness + DOUBLE_EPSILON);
946 std::vector<Point<spacedim>>
947 subdomain_boundary_cells_centers;
950 subdomain_boundary_cells_radii;
952 subdomain_boundary_cells_centers.reserve(subdomain_boundary_cells.size());
953 subdomain_boundary_cells_radii.reserve(subdomain_boundary_cells.size());
955 for (
typename std::vector<typename MeshType::active_cell_iterator>::
956 const_iterator subdomain_boundary_cell_iterator =
957 subdomain_boundary_cells.begin();
958 subdomain_boundary_cell_iterator != subdomain_boundary_cells.end();
959 ++subdomain_boundary_cell_iterator)
961 const std::pair<Point<spacedim>,
double>
962 &subdomain_boundary_cell_enclosing_ball =
963 (*subdomain_boundary_cell_iterator)->enclosing_ball();
965 subdomain_boundary_cells_centers.push_back(
966 subdomain_boundary_cell_enclosing_ball.first);
967 subdomain_boundary_cells_radii.push_back(
968 subdomain_boundary_cell_enclosing_ball.second);
970 AssertThrow(subdomain_boundary_cells_radii.size() ==
971 subdomain_boundary_cells_centers.size(),
980 for (
const auto &cell : mesh.active_cell_iterators())
986 const std::pair<Point<spacedim>,
double> &cell_enclosing_ball =
987 cell->enclosing_ball();
990 cell_enclosing_ball.first;
991 const double cell_enclosing_ball_radius = cell_enclosing_ball.second;
993 bool cell_inside =
true;
995 for (
unsigned int d = 0;
d < spacedim; ++
d)
997 (cell_enclosing_ball_center[
d] + cell_enclosing_ball_radius >
998 bounding_box.first[
d]) &&
999 (cell_enclosing_ball_center[
d] - cell_enclosing_ball_radius <
1000 bounding_box.second[
d]);
1006 for (
unsigned int i = 0; i < subdomain_boundary_cells_radii.size();
1009 subdomain_boundary_cells_centers[i]) <
1010 Utilities::fixed_power<2>(cell_enclosing_ball_radius +
1011 subdomain_boundary_cells_radii[i] +
1012 layer_thickness + DOUBLE_EPSILON))
1014 active_cell_layer_within_distance.push_back(cell);
1019 return active_cell_layer_within_distance;
1024 template <
class MeshType>
1025 std::vector<typename MeshType::active_cell_iterator>
1027 const double layer_thickness)
1030 std::function<bool(const typename MeshType::active_cell_iterator &)>
1031 predicate(locally_owned_cell_predicate);
1033 const std::vector<typename MeshType::active_cell_iterator>
1034 ghost_cell_layer_within_distance =
1042 contains_locally_owned_cells<MeshType>(
1043 ghost_cell_layer_within_distance) ==
false,
1045 "Ghost cells within layer_thickness contains locally owned cells."));
1047 contains_artificial_cells<MeshType>(ghost_cell_layer_within_distance) ==
1050 "Ghost cells within layer_thickness contains artificial cells. " 1051 "The function compute_ghost_cell_layer_within_distance " 1052 "is probably called while using parallel::distributed::Triangulation. " 1053 "In such case please refer to the description of this function."));
1055 return ghost_cell_layer_within_distance;
1060 template <
class MeshType>
1063 const MeshType &mesh,
1064 const std::function<
bool(
const typename MeshType::active_cell_iterator &)>
1067 std::vector<bool> locally_active_vertices_on_subdomain(
1068 mesh.get_triangulation().n_vertices(),
false);
1070 const unsigned int spacedim = MeshType::space_dimension;
1077 for (
const auto &cell : mesh.active_cell_iterators())
1078 if (predicate(cell))
1080 minp = cell->center();
1081 maxp = cell->center();
1087 for (
const auto &cell : mesh.active_cell_iterators())
1088 if (predicate(cell))
1089 for (
const unsigned int v : cell->vertex_indices())
1090 if (locally_active_vertices_on_subdomain[cell->vertex_index(v)] ==
1093 locally_active_vertices_on_subdomain[cell->vertex_index(v)] =
1095 for (
unsigned int d = 0;
d < spacedim; ++
d)
1098 maxp[
d] =
std::max(maxp[d], cell->vertex(v)[
d]);
1102 return std::make_pair(minp, maxp);
1107 template <
typename MeshType>
1108 std::list<std::pair<
typename MeshType::cell_iterator,
1109 typename MeshType::cell_iterator>>
1113 ExcMessage(
"The two meshes must be represent triangulations that " 1114 "have the same coarse meshes"));
1121 bool remove_ghost_cells =
false;
1122 #ifdef DEAL_II_WITH_MPI 1124 constexpr
int dim = MeshType::dimension;
1125 constexpr
int spacedim = MeshType::space_dimension;
1127 *
>(&mesh_1.get_triangulation()) !=
nullptr ||
1129 *
>(&mesh_2.get_triangulation()) !=
nullptr)
1131 Assert(&mesh_1.get_triangulation() == &mesh_2.get_triangulation(),
1132 ExcMessage(
"This function can only be used with meshes " 1133 "corresponding to distributed Triangulations when " 1134 "both Triangulations are equal."));
1135 remove_ghost_cells =
true;
1147 using CellList = std::list<std::pair<
typename MeshType::cell_iterator,
1148 typename MeshType::cell_iterator>>;
1152 typename MeshType::cell_iterator cell_1 = mesh_1.begin(0),
1153 cell_2 = mesh_2.begin(0);
1154 for (; cell_1 != mesh_1.end(0); ++cell_1, ++cell_2)
1155 cell_list.emplace_back(cell_1, cell_2);
1158 typename CellList::iterator cell_pair = cell_list.begin();
1159 while (cell_pair != cell_list.end())
1163 if (cell_pair->first->has_children() &&
1164 cell_pair->second->has_children())
1166 Assert(cell_pair->first->refinement_case() ==
1167 cell_pair->second->refinement_case(),
1169 for (
unsigned int c = 0; c < cell_pair->first->n_children(); ++c)
1170 cell_list.emplace_back(cell_pair->first->child(c),
1171 cell_pair->second->child(c));
1176 const auto previous_cell_pair = cell_pair;
1178 cell_list.erase(previous_cell_pair);
1183 if (remove_ghost_cells &&
1184 ((cell_pair->first->is_active() &&
1185 !cell_pair->first->is_locally_owned()) ||
1186 (cell_pair->second->is_active() &&
1187 !cell_pair->second->is_locally_owned())))
1190 const auto previous_cell_pair = cell_pair;
1192 cell_list.erase(previous_cell_pair);
1201 for (cell_pair = cell_list.begin(); cell_pair != cell_list.end();
1203 Assert(cell_pair->first->is_active() || cell_pair->second->is_active() ||
1204 (cell_pair->first->refinement_case() !=
1205 cell_pair->second->refinement_case()),
1213 template <
int dim,
int spacedim>
1230 endc = mesh_1.
end(0);
1231 for (; cell_1 != endc; ++cell_1, ++cell_2)
1233 if (cell_1->n_vertices() != cell_2->n_vertices())
1235 for (
const unsigned int v : cell_1->vertex_indices())
1236 if (cell_1->vertex(v) != cell_2->vertex(v))
1249 template <
typename MeshType>
1254 mesh_2.get_triangulation());
1259 template <
int dim,
int spacedim>
1260 std::pair<typename ::DoFHandler<dim, spacedim>::active_cell_iterator,
1266 const double tolerance)
1270 ExcMessage(
"Mapping collection needs to have either size 1 " 1271 "or size equal to the number of elements in " 1272 "the FECollection."));
1274 using cell_iterator =
1275 typename ::DoFHandler<dim, spacedim>::active_cell_iterator;
1277 std::pair<cell_iterator, Point<dim>> best_cell;
1281 if (mapping.
size() == 1)
1283 const std::vector<bool> marked_vertices = {};
1285 mapping[0], mesh, p, marked_vertices, tolerance);
1292 double best_distance = tolerance;
1293 int best_level = -1;
1300 std::vector<cell_iterator> adjacent_cells_tmp =
1308 std::set<cell_iterator> adjacent_cells(adjacent_cells_tmp.begin(),
1309 adjacent_cells_tmp.end());
1310 std::set<cell_iterator> searched_cells;
1320 unsigned int cells_searched = 0;
1321 while (!found && cells_searched < n_cells)
1323 typename std::set<cell_iterator>::const_iterator
1324 cell = adjacent_cells.begin(),
1325 endc = adjacent_cells.end();
1326 for (; cell != endc; ++cell)
1331 mapping[(*cell)->active_fe_index()]
1332 .transform_real_to_unit_cell(*cell, p);
1344 if (dist < best_distance || (dist == best_distance &&
1345 (*cell)->level() > best_level))
1348 best_distance = dist;
1349 best_level = (*cell)->level();
1350 best_cell = std::make_pair(*cell, p_cell);
1355 spacedim>::ExcTransformationFailed &)
1371 cells_searched += adjacent_cells.size();
1377 if (!found && cells_searched < n_cells)
1379 find_active_cell_around_point_internal<dim,
1382 mesh, searched_cells, adjacent_cells);
1388 ExcPointNotFound<spacedim>(p));
1394 template <
class MeshType>
1395 std::vector<typename MeshType::active_cell_iterator>
1398 Assert(cell->is_locally_owned(),
1399 ExcMessage(
"This function only makes sense if the cell for " 1400 "which you are asking for a patch, is locally " 1403 std::vector<typename MeshType::active_cell_iterator> patch;
1404 patch.push_back(cell);
1405 for (
const unsigned int face_number : cell->face_indices())
1406 if (cell->face(face_number)->at_boundary() ==
false)
1408 if (cell->neighbor(face_number)->has_children() ==
false)
1409 patch.push_back(cell->neighbor(face_number));
1414 if (MeshType::dimension > 1)
1416 for (
unsigned int subface = 0;
1417 subface < cell->face(face_number)->n_children();
1420 cell->neighbor_child_on_subface(face_number, subface));
1426 typename MeshType::cell_iterator neighbor =
1427 cell->neighbor(face_number);
1428 while (neighbor->has_children())
1429 neighbor = neighbor->child(1 - face_number);
1431 Assert(neighbor->neighbor(1 - face_number) == cell,
1433 patch.push_back(neighbor);
1441 template <
class Container>
1442 std::vector<typename Container::cell_iterator>
1444 const std::vector<typename Container::active_cell_iterator> &patch)
1448 "Vector containing patch cells should not be an empty vector!"));
1452 int min_level = patch[0]->level();
1454 for (
unsigned int i = 0; i < patch.size(); ++i)
1456 std::set<typename Container::cell_iterator> uniform_cells;
1457 typename std::vector<
1458 typename Container::active_cell_iterator>::const_iterator patch_cell;
1460 for (patch_cell = patch.begin(); patch_cell != patch.end(); ++patch_cell)
1465 if ((*patch_cell)->level() == min_level)
1466 uniform_cells.insert(*patch_cell);
1473 typename Container::cell_iterator parent = *patch_cell;
1475 while (parent->level() > min_level)
1476 parent = parent->parent();
1477 uniform_cells.insert(parent);
1481 return std::vector<typename Container::cell_iterator>(uniform_cells.begin(),
1482 uniform_cells.end());
1487 template <
class Container>
1490 const std::vector<typename Container::active_cell_iterator> &patch,
1492 &local_triangulation,
1495 Container::space_dimension>::active_cell_iterator,
1496 typename Container::active_cell_iterator> &patch_to_global_tria_map)
1499 const std::vector<typename Container::cell_iterator> uniform_cells =
1500 get_cells_at_coarsest_common_level<Container>(patch);
1502 local_triangulation.
clear();
1503 std::vector<Point<Container::space_dimension>>
vertices;
1504 const unsigned int n_uniform_cells = uniform_cells.size();
1505 std::vector<CellData<Container::dimension>> cells(n_uniform_cells);
1508 typename std::vector<typename Container::cell_iterator>::const_iterator
1510 for (uniform_cell = uniform_cells.begin();
1511 uniform_cell != uniform_cells.end();
1514 for (
const unsigned int v : (*uniform_cell)->vertex_indices())
1517 (*uniform_cell)->vertex(v);
1518 bool repeat_vertex =
false;
1520 for (
unsigned int m = 0; m < i; ++m)
1522 if (position == vertices[m])
1524 repeat_vertex =
true;
1525 cells[k].vertices[v] = m;
1529 if (repeat_vertex ==
false)
1531 vertices.push_back(position);
1532 cells[k].vertices[v] = i;
1543 unsigned int index = 0;
1546 Container::space_dimension>::cell_iterator,
1547 typename Container::cell_iterator>
1548 patch_to_global_tria_map_tmp;
1550 Container::space_dimension>::cell_iterator
1551 coarse_cell = local_triangulation.
begin();
1552 coarse_cell != local_triangulation.
end();
1553 ++coarse_cell, ++index)
1555 patch_to_global_tria_map_tmp.insert(
1556 std::make_pair(coarse_cell, uniform_cells[index]));
1560 Assert(coarse_cell->center().distance(uniform_cells[index]->
center()) <=
1561 1
e-15 * coarse_cell->diameter(),
1564 bool refinement_necessary;
1569 refinement_necessary =
false;
1570 for (
const auto &active_tria_cell :
1573 if (patch_to_global_tria_map_tmp[active_tria_cell]->has_children())
1575 active_tria_cell->set_refine_flag();
1576 refinement_necessary =
true;
1579 for (
unsigned int i = 0; i < patch.size(); ++i)
1584 if (patch_to_global_tria_map_tmp[active_tria_cell] ==
1589 for (
const unsigned int v :
1590 active_tria_cell->vertex_indices())
1591 active_tria_cell->vertex(v) = patch[i]->vertex(v);
1593 Assert(active_tria_cell->center().distance(
1594 patch_to_global_tria_map_tmp[active_tria_cell]
1596 1
e-15 * active_tria_cell->diameter(),
1599 active_tria_cell->set_user_flag();
1605 if (refinement_necessary)
1610 Container::dimension,
1611 Container::space_dimension>::cell_iterator cell =
1612 local_triangulation.
begin();
1613 cell != local_triangulation.
end();
1616 if (patch_to_global_tria_map_tmp.find(cell) !=
1617 patch_to_global_tria_map_tmp.end())
1619 if (cell->has_children())
1626 for (
unsigned int c = 0; c < cell->n_children(); ++c)
1628 if (patch_to_global_tria_map_tmp.find(cell->child(
1629 c)) == patch_to_global_tria_map_tmp.end())
1631 patch_to_global_tria_map_tmp.insert(
1634 patch_to_global_tria_map_tmp[cell]->child(
1656 patch_to_global_tria_map_tmp.erase(cell);
1662 while (refinement_necessary);
1668 Container::space_dimension>::cell_iterator
1669 cell = local_triangulation.
begin();
1670 cell != local_triangulation.
end();
1673 if (cell->user_flag_set())
1675 Assert(patch_to_global_tria_map_tmp.find(cell) !=
1676 patch_to_global_tria_map_tmp.end(),
1679 Assert(cell->center().distance(
1680 patch_to_global_tria_map_tmp[cell]->
center()) <=
1681 1
e-15 * cell->diameter(),
1689 Container::space_dimension>::cell_iterator,
1690 typename Container::cell_iterator>::iterator
1691 map_tmp_it = patch_to_global_tria_map_tmp.
begin(),
1692 map_tmp_end = patch_to_global_tria_map_tmp.end();
1696 for (; map_tmp_it != map_tmp_end; ++map_tmp_it)
1697 patch_to_global_tria_map[map_tmp_it->first] = map_tmp_it->second;
1702 template <
int dim,
int spacedim>
1705 std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>>
1719 std::set<typename DoFHandler<dim, spacedim>::active_cell_iterator>>
1720 dof_to_set_of_cells_map;
1722 std::vector<types::global_dof_index> local_dof_indices;
1723 std::vector<types::global_dof_index> local_face_dof_indices;
1724 std::vector<types::global_dof_index> local_line_dof_indices;
1728 std::vector<bool> user_flags;
1733 std::map<typename DoFHandler<dim, spacedim>::active_line_iterator,
1735 lines_to_parent_lines_map;
1742 .clear_user_flags();
1747 endc = dof_handler.
end();
1748 for (; cell != endc; ++cell)
1754 if (cell->is_artificial() ==
false)
1756 for (
unsigned int l = 0;
l < cell->n_lines(); ++
l)
1757 if (cell->line(
l)->has_children())
1758 for (
unsigned int c = 0; c < cell->line(
l)->n_children();
1761 lines_to_parent_lines_map[cell->line(
l)->child(c)] =
1765 cell->line(
l)->child(c)->set_user_flag();
1780 endc = dof_handler.
end();
1781 for (; cell != endc; ++cell)
1786 if (cell->is_artificial() ==
false)
1788 const unsigned int n_dofs_per_cell =
1789 cell->
get_fe().n_dofs_per_cell();
1790 local_dof_indices.resize(n_dofs_per_cell);
1794 cell->get_dof_indices(local_dof_indices);
1795 for (
unsigned int i = 0; i < n_dofs_per_cell; ++i)
1796 dof_to_set_of_cells_map[local_dof_indices[i]].insert(cell);
1806 for (
const unsigned int f : cell->face_indices())
1808 if (cell->face(f)->has_children())
1810 for (
unsigned int c = 0; c < cell->face(f)->n_children();
1825 Assert(cell->face(f)->child(c)->has_children() ==
false,
1828 const unsigned int n_dofs_per_face =
1829 cell->
get_fe().n_dofs_per_face(f, c);
1830 local_face_dof_indices.resize(n_dofs_per_face);
1832 cell->face(f)->child(c)->get_dof_indices(
1833 local_face_dof_indices);
1834 for (
unsigned int i = 0; i < n_dofs_per_face; ++i)
1835 dof_to_set_of_cells_map[local_face_dof_indices[i]]
1839 else if ((cell->face(f)->at_boundary() ==
false) &&
1840 (cell->neighbor_is_coarser(f)))
1857 std::pair<unsigned int, unsigned int>
1858 neighbor_face_no_subface_no =
1859 cell->neighbor_of_coarser_neighbor(f);
1860 unsigned int face_no = neighbor_face_no_subface_no.first;
1861 unsigned int subface = neighbor_face_no_subface_no.second;
1863 const unsigned int n_dofs_per_face =
1864 cell->
get_fe().n_dofs_per_face(face_no);
1865 local_face_dof_indices.resize(n_dofs_per_face);
1867 cell->neighbor(f)->face(face_no)->get_dof_indices(
1868 local_face_dof_indices);
1869 for (
unsigned int i = 0; i < n_dofs_per_face; ++i)
1870 dof_to_set_of_cells_map[local_face_dof_indices[i]].insert(
1875 for (
unsigned int c = 0;
1876 c < cell->neighbor(f)->face(face_no)->n_children();
1882 const unsigned int n_dofs_per_face =
1883 cell->
get_fe().n_dofs_per_face(face_no, c);
1884 local_face_dof_indices.resize(n_dofs_per_face);
1889 ->has_children() ==
false,
1894 ->get_dof_indices(local_face_dof_indices);
1895 for (
unsigned int i = 0; i < n_dofs_per_face; ++i)
1896 dof_to_set_of_cells_map[local_face_dof_indices[i]]
1913 for (
unsigned int l = 0;
l < cell->n_lines(); ++
l)
1915 if (cell->line(
l)->has_children())
1917 for (
unsigned int c = 0;
1918 c < cell->line(
l)->n_children();
1921 Assert(cell->line(
l)->child(c)->has_children() ==
1927 const unsigned int n_dofs_per_line =
1928 2 * cell->
get_fe().n_dofs_per_vertex() +
1929 cell->
get_fe().n_dofs_per_line();
1930 local_line_dof_indices.resize(n_dofs_per_line);
1932 cell->line(
l)->child(c)->get_dof_indices(
1933 local_line_dof_indices);
1934 for (
unsigned int i = 0; i < n_dofs_per_line; ++i)
1935 dof_to_set_of_cells_map[local_line_dof_indices[i]]
1943 else if (cell->line(
l)->user_flag_set() ==
true)
1947 lines_to_parent_lines_map[cell->line(
l)];
1952 const unsigned int n_dofs_per_line =
1953 2 * cell->
get_fe().n_dofs_per_vertex() +
1954 cell->
get_fe().n_dofs_per_line();
1955 local_line_dof_indices.resize(n_dofs_per_line);
1957 parent_line->get_dof_indices(local_line_dof_indices);
1958 for (
unsigned int i = 0; i < n_dofs_per_line; ++i)
1959 dof_to_set_of_cells_map[local_line_dof_indices[i]]
1962 for (
unsigned int c = 0; c < parent_line->n_children();
1965 Assert(parent_line->child(c)->has_children() ==
1969 const unsigned int n_dofs_per_line =
1970 2 * cell->
get_fe().n_dofs_per_vertex() +
1971 cell->
get_fe().n_dofs_per_line();
1972 local_line_dof_indices.resize(n_dofs_per_line);
1974 parent_line->child(c)->get_dof_indices(
1975 local_line_dof_indices);
1976 for (
unsigned int i = 0; i < n_dofs_per_line; ++i)
1977 dof_to_set_of_cells_map[local_line_dof_indices[i]]
1994 .load_user_flags(user_flags);
2001 std::vector<typename DoFHandler<dim, spacedim>::active_cell_iterator>>
2002 dof_to_cell_patches;
2006 std::set<typename DoFHandler<dim, spacedim>::active_cell_iterator>>::
2007 iterator it = dof_to_set_of_cells_map.begin(),
2008 it_end = dof_to_set_of_cells_map.end();
2009 for (; it != it_end; ++it)
2010 dof_to_cell_patches[it->first].assign(it->second.begin(),
2013 return dof_to_cell_patches;
2019 template <
typename CellIterator>
2022 std::set<std::pair<CellIterator, unsigned int>> &pairs1,
2025 const int direction,
2027 const ::Tensor<1, CellIterator::AccessorType::space_dimension>
2031 static const int space_dim = CellIterator::AccessorType::space_dimension;
2037 constexpr
int dim = CellIterator::AccessorType::dimension;
2038 constexpr
int spacedim = CellIterator::AccessorType::space_dimension;
2043 if (!(((pairs1.size() > 0) &&
2044 (
dynamic_cast<const parallel::fullydistributed::
2045 Triangulation<dim, spacedim> *
>(
2046 &pairs1.begin()->first->get_triangulation()) !=
nullptr)) ||
2047 ((pairs2.size() > 0) &&
2050 *
>(&pairs2.begin()->first->get_triangulation()) !=
nullptr))))
2051 Assert(pairs1.size() == pairs2.size(),
2052 ExcMessage(
"Unmatched faces on periodic boundaries"));
2056 unsigned int n_matches = 0;
2059 std::bitset<3> orientation;
2060 using PairIterator =
2061 typename std::set<std::pair<CellIterator, unsigned int>>::const_iterator;
2062 for (PairIterator it1 = pairs1.begin(); it1 != pairs1.end(); ++it1)
2064 for (PairIterator it2 = pairs2.begin(); it2 != pairs2.end(); ++it2)
2066 const CellIterator cell1 = it1->first;
2067 const CellIterator cell2 = it2->first;
2068 const unsigned int face_idx1 = it1->second;
2069 const unsigned int face_idx2 = it2->second;
2071 cell1->face(face_idx1),
2072 cell2->face(face_idx2),
2081 {cell1, cell2}, {face_idx1, face_idx2}, orientation, matrix};
2082 matched_pairs.push_back(matched_face);
2096 constexpr
int dim = CellIterator::AccessorType::dimension;
2097 constexpr
int spacedim = CellIterator::AccessorType::space_dimension;
2098 if (!(((pairs1.size() > 0) &&
2099 (
dynamic_cast<const parallel::fullydistributed::
2100 Triangulation<dim, spacedim> *
>(
2101 &pairs1.begin()->first->get_triangulation()) !=
nullptr)) ||
2102 ((pairs2.size() > 0) &&
2105 *
>(&pairs2.begin()->first->get_triangulation()) !=
nullptr))))
2106 AssertThrow(n_matches == pairs1.size() && pairs2.size() == 0,
2107 ExcMessage(
"Unmatched faces on periodic boundaries"));
2113 template <
typename MeshType>
2116 const MeshType & mesh,
2118 const int direction,
2124 static const int dim = MeshType::dimension;
2125 static const int space_dim = MeshType::space_dimension;
2135 std::set<std::pair<typename MeshType::cell_iterator, unsigned int>> pairs1;
2136 std::set<std::pair<typename MeshType::cell_iterator, unsigned int>> pairs2;
2138 for (
typename MeshType::cell_iterator cell = mesh.begin(0);
2139 cell != mesh.end(0);
2142 const typename MeshType::face_iterator face_1 =
2143 cell->face(2 * direction);
2144 const typename MeshType::face_iterator face_2 =
2145 cell->face(2 * direction + 1);
2147 if (face_1->at_boundary() && face_1->boundary_id() == b_id)
2149 const std::pair<typename MeshType::cell_iterator, unsigned int>
2150 pair1 = std::make_pair(cell, 2 * direction);
2151 pairs1.insert(pair1);
2154 if (face_2->at_boundary() && face_2->boundary_id() == b_id)
2156 const std::pair<typename MeshType::cell_iterator, unsigned int>
2157 pair2 = std::make_pair(cell, 2 * direction + 1);
2158 pairs2.insert(pair2);
2162 Assert(pairs1.size() == pairs2.size(),
2163 ExcMessage(
"Unmatched faces on periodic boundaries"));
2165 Assert(pairs1.size() > 0,
2166 ExcMessage(
"No new periodic face pairs have been found. " 2167 "Are you sure that you've selected the correct boundary " 2168 "id's and that the coarsest level mesh is colorized?"));
2171 const unsigned int size_old = matched_pairs.size();
2176 pairs1, pairs2, direction, matched_pairs, offset, matrix);
2180 const unsigned int size_new = matched_pairs.size();
2181 for (
unsigned int i = size_old; i < size_new; ++i)
2183 Assert(matched_pairs[i].orientation == 1,
2185 "Found a face match with non standard orientation. " 2186 "This function is only suitable for meshes with cells " 2187 "in default orientation"));
2194 template <
typename MeshType>
2197 const MeshType & mesh,
2200 const int direction,
2206 static const int dim = MeshType::dimension;
2207 static const int space_dim = MeshType::space_dimension;
2215 std::set<std::pair<typename MeshType::cell_iterator, unsigned int>> pairs1;
2216 std::set<std::pair<typename MeshType::cell_iterator, unsigned int>> pairs2;
2218 for (
typename MeshType::cell_iterator cell = mesh.begin(0);
2219 cell != mesh.end(0);
2222 for (
unsigned int i : cell->face_indices())
2224 const typename MeshType::face_iterator face = cell->face(i);
2225 if (face->at_boundary() && face->boundary_id() == b_id1)
2227 const std::pair<typename MeshType::cell_iterator, unsigned int>
2228 pair1 = std::make_pair(cell, i);
2229 pairs1.insert(pair1);
2232 if (face->at_boundary() && face->boundary_id() == b_id2)
2234 const std::pair<typename MeshType::cell_iterator, unsigned int>
2235 pair2 = std::make_pair(cell, i);
2236 pairs2.insert(pair2);
2247 if (!(((pairs1.size() > 0) &&
2250 *
>(&pairs1.begin()->first->get_triangulation()) !=
nullptr)) ||
2251 ((pairs2.size() > 0) &&
2254 *
>(&pairs2.begin()->first->get_triangulation()) !=
nullptr))))
2255 Assert(pairs1.size() == pairs2.size(),
2256 ExcMessage(
"Unmatched faces on periodic boundaries"));
2259 (pairs1.size() > 0 ||
2262 &mesh.begin()->get_triangulation()) !=
nullptr)),
2263 ExcMessage(
"No new periodic face pairs have been found. " 2264 "Are you sure that you've selected the correct boundary " 2265 "id's and that the coarsest level mesh is colorized?"));
2269 pairs1, pairs2, direction, matched_pairs, offset, matrix);
2283 template <
int spacedim>
2287 const int direction,
2297 if (matrix.
m() == spacedim)
2298 for (
int i = 0; i < spacedim; ++i)
2299 for (
int j = 0; j < spacedim; ++j)
2300 distance(i) +=
matrix(i, j) * point1(j);
2304 distance += offset - point2;
2306 for (
int i = 0; i < spacedim; ++i)
2312 if (std::abs(distance(i)) > 1.
e-10)
2338 std::array<unsigned int, GeometryInfo<1>::vertices_per_face>;
2339 static inline std::bitset<3>
2351 std::array<unsigned int, GeometryInfo<2>::vertices_per_face>;
2352 static inline std::bitset<3>
2360 static const MATCH_T m_tff = {{0, 1}};
2361 if (matching == m_tff)
2363 static const MATCH_T m_ttf = {{1, 0}};
2364 if (matching == m_ttf)
2377 std::array<unsigned int, GeometryInfo<3>::vertices_per_face>;
2379 static inline std::bitset<3>
2387 static const MATCH_T m_tff = {{0, 1, 2, 3}};
2388 if (matching == m_tff)
2390 static const MATCH_T m_tft = {{1, 3, 0, 2}};
2391 if (matching == m_tft)
2393 static const MATCH_T m_ttf = {{3, 2, 1, 0}};
2394 if (matching == m_ttf)
2396 static const MATCH_T m_ttt = {{2, 0, 3, 1}};
2397 if (matching == m_ttt)
2399 static const MATCH_T m_fff = {{0, 2, 1, 3}};
2400 if (matching == m_fff)
2402 static const MATCH_T m_fft = {{2, 3, 0, 1}};
2403 if (matching == m_fft)
2405 static const MATCH_T m_ftf = {{3, 1, 2, 0}};
2406 if (matching == m_ftf)
2408 static const MATCH_T m_ftt = {{1, 0, 3, 2}};
2409 if (matching == m_ftt)
2420 template <
typename FaceIterator>
2422 std::bitset<3> & orientation,
2423 const FaceIterator & face1,
2424 const FaceIterator & face2,
2425 const int direction,
2430 ExcMessage(
"The supplied matrix must be a square matrix"));
2432 static const int dim = FaceIterator::AccessorType::dimension;
2436 std::array<unsigned int, GeometryInfo<dim>::vertices_per_face> matching;
2440 std::set<unsigned int> face2_vertices;
2441 for (
unsigned int i = 0; i < face1->n_vertices(); ++i)
2442 face2_vertices.insert(i);
2444 for (
unsigned int i = 0; i < face1->n_vertices(); ++i)
2446 for (std::set<unsigned int>::iterator it = face2_vertices.begin();
2447 it != face2_vertices.end();
2457 face2_vertices.erase(it);
2464 if (face2_vertices.empty())
2467 return face2_vertices.empty();
2472 template <
typename FaceIterator>
2475 const FaceIterator & face1,
2476 const FaceIterator & face2,
2477 const int direction,
2482 std::bitset<3> dummy;
2491 #include "grid_tools_dof_handlers.inst"
unsigned int n_active_cells() const
static const unsigned int invalid_unsigned_int
#define AssertDimension(dim1, dim2)
Contents is actually a matrix.
unsigned int n_cells() const
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
const Mapping< dim, spacedim > & get_default_linear_mapping(const Triangulation< dim, spacedim > &triangulation)
IteratorRange< active_cell_iterator > active_cell_iterators() const
cell_iterator end() const
#define AssertIndexRange(index, range)
#define AssertThrow(cond, exc)
virtual Point< dim > transform_real_to_unit_cell(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< spacedim > &p) const =0
cell_iterator begin(const unsigned int level=0) const
SymmetricTensor< 2, dim, Number > epsilon(const Tensor< 2, dim, Number > &Grad_u)
const hp::FECollection< dim, spacedim > & get_fe_collection() const
const FiniteElement< dim, spacedim > & get_fe(const unsigned int index=0) const
static double distance_to_unit_cell(const Point< dim > &p)
cell_iterator end() const
active_cell_iterator begin_active(const unsigned int level=0) const
virtual void execute_coarsening_and_refinement()
static ::ExceptionBase & ExcMessage(std::string arg1)
virtual void create_triangulation(const std::vector< Point< spacedim >> &vertices, const std::vector< CellData< dim >> &cells, const SubCellData &subcelldata)
#define Assert(cond, exc)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
Abstract base class for mapping classes.
const std::vector< Point< spacedim > > & get_vertices() const
#define DEAL_II_NAMESPACE_CLOSE
unsigned int n_active_cells(const internal::TriangulationImplementation::NumberCache< 1 > &c)
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
unsigned int n_cells(const internal::TriangulationImplementation::NumberCache< 1 > &c)
SymmetricTensor< 2, dim, Number > b(const Tensor< 2, dim, Number > &F)
unsigned int global_dof_index
__global__ void set(Number *val, const Number s, const size_type N)
typename ActiveSelector::line_iterator line_iterator
const std::vector< bool > & get_used_vertices() const
const Triangulation< dim, spacedim > & get_triangulation() const
#define DEAL_II_NAMESPACE_OPEN
T min(const T &t, const MPI_Comm &mpi_communicator)
virtual bool preserves_vertex_locations() const =0
static ::ExceptionBase & ExcNotImplemented()
Iterator points to a valid object.
static ::ExceptionBase & ExcVertexNotUsed(unsigned int arg1)
typename ActiveSelector::active_cell_iterator active_cell_iterator
unsigned int size() const
T max(const T &t, const MPI_Comm &mpi_communicator)
numbers::NumberTraits< Number >::real_type distance_square(const Point< dim, Number > &p) const
Tensor< 2, dim, Number > l(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
static ::ExceptionBase & ExcInternalError()
Triangulation< dim, spacedim > & get_triangulation()