28#include <boost/container/small_vector.hpp>
51 const double theta = dir.
norm();
61 return tmp / tmp.
norm();
78 template <
int spacedim>
90 ExcMessage(
"The direction parameter must not be zero!"));
97 normal[0] = (vector[1] + vector[2]) / vector[0];
104 normal[1] = (vector[0] + vector[2]) / vector[1];
110 normal[2] = (vector[0] + vector[1]) / vector[2];
113 normal /= normal.
norm();
125template <
int dim,
int spacedim>
136template <
int dim,
int spacedim>
137std::unique_ptr<Manifold<dim, spacedim>>
140 return std::make_unique<PolarManifold<dim, spacedim>>(*this);
145template <
int dim,
int spacedim>
162template <
int dim,
int spacedim>
167 Assert(spherical_point[0] >= 0.0,
168 ExcMessage(
"Negative radius for given point."));
169 const double rho = spherical_point[0];
170 const double theta = spherical_point[1];
182 const double phi = spherical_point[2];
196template <
int dim,
int spacedim>
202 const double rho = R.
norm();
211 p[1] = std::atan2(R[1], R[0]);
219 const double z = R[2];
220 p[2] = std::atan2(R[1], R[0]);
223 p[1] = std::atan2(
std::sqrt(R[0] * R[0] + R[1] * R[1]), z);
235template <
int dim,
int spacedim>
240 Assert(spherical_point[0] >= 0.0,
241 ExcMessage(
"Negative radius for given point."));
242 const double rho = spherical_point[0];
243 const double theta = spherical_point[1];
260 const double phi = spherical_point[2];
285 template <
int dim,
int spacedim>
287 spherical_face_is_horizontal(
297 constexpr unsigned int n_vertices =
299 std::array<double, n_vertices> sqr_distances_to_center;
300 std::array<double, n_vertices - 1> sqr_distances_to_first_vertex;
301 sqr_distances_to_center[0] =
302 (face->vertex(0) - manifold_center).norm_square();
303 for (
unsigned int i = 1; i < n_vertices; ++i)
305 sqr_distances_to_center[i] =
306 (face->vertex(i) - manifold_center).norm_square();
307 sqr_distances_to_first_vertex[i - 1] =
308 (face->vertex(i) - face->vertex(0)).norm_square();
310 const auto minmax_sqr_distance =
311 std::minmax_element(sqr_distances_to_center.begin(),
312 sqr_distances_to_center.end());
313 const auto min_sqr_distance_to_first_vertex =
314 std::min_element(sqr_distances_to_first_vertex.begin(),
315 sqr_distances_to_first_vertex.end());
317 return (*minmax_sqr_distance.second - *minmax_sqr_distance.first <
318 1.e-10 * *min_sqr_distance_to_first_vertex);
324template <
int dim,
int spacedim>
334 if (spherical_face_is_horizontal<dim, spacedim>(face, p_center))
341 unnormalized_spherical_normal / unnormalized_spherical_normal.
norm();
342 return normalized_spherical_normal;
359template <
int dim,
int spacedim>
364 , polar_manifold(center)
370template <
int dim,
int spacedim>
371std::unique_ptr<Manifold<dim, spacedim>>
374 return std::make_unique<SphericalManifold<dim, spacedim>>(*this);
379template <
int dim,
int spacedim>
384 const double w)
const
386 const double tol = 1e-10;
388 if ((p1 - p2).norm_square() < tol * tol ||
std::abs(w) < tol)
400 const double r1 =
v1.norm();
401 const double r2 = v2.
norm();
403 Assert(r1 > tol && r2 > tol,
404 ExcMessage(
"p1 and p2 cannot coincide with the center."));
410 const double cosgamma = e1 * e2;
413 if (cosgamma < -1 + 8. * std::numeric_limits<double>::epsilon())
417 if (cosgamma > 1 - 8. * std::numeric_limits<double>::epsilon())
423 const double sigma = w *
std::acos(cosgamma);
428 const double n_norm = n.
norm();
431 "Probably, this means v1==v2 or v2==0."));
445template <
int dim,
int spacedim>
451 const double tol = 1e-10;
457 const double r1 =
v1.norm();
458 const double r2 = v2.
norm();
468 const double cosgamma = e1 * e2;
470 Assert(cosgamma > -1 + 8. * std::numeric_limits<double>::epsilon(),
471 ExcMessage(
"p1 and p2 cannot lie on the same diameter and be opposite "
472 "respect to the center."));
474 if (cosgamma > 1 - 8. * std::numeric_limits<double>::epsilon())
480 const double n_norm = n.
norm();
483 "Probably, this means v1==v2 or v2==0."));
489 const double gamma =
std::acos(cosgamma);
490 return (r2 - r1) * e1 + r1 * gamma * n;
495template <
int dim,
int spacedim>
505 if (spherical_face_is_horizontal<dim, spacedim>(face, p_center))
512 unnormalized_spherical_normal / unnormalized_spherical_normal.
norm();
513 return normalized_spherical_normal;
547template <
int dim,
int spacedim>
558 if (spherical_face_is_horizontal<dim, spacedim>(face, p_center))
563 for (
unsigned int vertex = 0;
564 vertex < GeometryInfo<spacedim>::vertices_per_face;
566 face_vertex_normals[vertex] = face->vertex(vertex) - p_center;
574template <
int dim,
int spacedim>
584 do_get_new_points(surrounding_points,
make_array_view(weights), new_points);
591template <
int dim,
int spacedim>
600 do_get_new_points(vertices,
615 template <
int spacedim>
637 Point<3> candidate = candidate_point;
638 const unsigned int n_merged_points = directions.size();
639 const double tolerance = 1e-10;
640 const int max_iterations = 10;
645 for (
unsigned int i = 0; i < n_merged_points; ++i)
647 const double squared_distance =
648 (candidate - directions[i]).norm_square();
649 if (squared_distance < tolerance * tolerance)
655 if (n_merged_points == 2)
657 static const ::SphericalManifold<3, 3> unit_manifold;
661 unit_manifold.get_intermediate_point(
Point<3>(directions[0]),
674 for (
unsigned int i = 0; i < max_iterations; ++i)
680 const Tensor<1, 3> Clocaly = cross_product_3d(candidate, Clocalx);
688 for (
unsigned int i = 0; i < n_merged_points; ++i)
694 const double sintheta =
std::sqrt(sinthetaSq);
695 if (sintheta < tolerance)
697 Hessian[0][0] += weights[i];
698 Hessian[1][1] += weights[i];
702 const double costheta = (directions[i]) * candidate;
703 const double theta = std::atan2(sintheta, costheta);
704 const double sincthetaInv = theta / sintheta;
706 const double cosphi = vPerp * Clocalx;
707 const double sinphi = vPerp * Clocaly;
709 gradlocal[0] = cosphi;
710 gradlocal[1] = sinphi;
711 gradient += (weights[i] * sincthetaInv) * gradlocal;
713 const double wt = weights[i] / sinthetaSq;
714 const double sinphiSq = sinphi * sinphi;
715 const double cosphiSq = cosphi * cosphi;
716 const double tt = sincthetaInv * costheta;
717 const double offdiag =
718 cosphi * sinphi * wt * (1.0 - tt);
719 Hessian[0][0] += wt * (cosphiSq + tt * sinphiSq);
720 Hessian[0][1] += offdiag;
721 Hessian[1][0] += offdiag;
722 Hessian[1][1] += wt * (sinphiSq + tt * cosphiSq);
732 xDisplocal[0] * Clocalx + xDisplocal[1] * Clocaly;
736 const Point<3> candidateOld = candidate;
741 if ((candidate - candidateOld).norm_square() <
742 tolerance * tolerance)
754template <
int dim,
int spacedim>
762 new_points.size() * surrounding_points.size());
763 const unsigned int weight_rows = new_points.size();
764 const unsigned int weight_columns = surrounding_points.size();
766 if (surrounding_points.size() == 2)
768 for (
unsigned int row = 0; row < weight_rows; ++row)
771 surrounding_points[0],
772 surrounding_points[1],
773 weights[row * weight_columns + 1]);
777 boost::container::small_vector<std::pair<double, Tensor<1, spacedim>>, 100>
778 new_candidates(new_points.size());
779 boost::container::small_vector<Tensor<1, spacedim>, 100> directions(
781 boost::container::small_vector<double, 100> distances(
782 surrounding_points.size(), 0.0);
783 double max_distance = 0.;
784 for (
unsigned int i = 0; i < surrounding_points.size(); ++i)
786 directions[i] = surrounding_points[i] - p_center;
787 distances[i] = directions[i].norm();
789 if (distances[i] != 0.)
790 directions[i] /= distances[i];
793 ExcMessage(
"One of the vertices coincides with the center. "
794 "This is not allowed!"));
798 for (
unsigned int k = 0; k < i; ++k)
800 const double squared_distance =
801 (directions[i] - directions[k]).norm_square();
802 max_distance =
std::max(max_distance, squared_distance);
808 const double tolerance = 1e-10;
809 boost::container::small_vector<bool, 100> accurate_point_was_found(
810 new_points.size(),
false);
815 for (
unsigned int row = 0; row < weight_rows; ++row)
817 new_candidates[row] =
818 guess_new_point(array_directions,
825 if (new_candidates[row].
first == 0.0)
827 new_points[row] = p_center;
828 accurate_point_was_found[row] =
true;
835 new_points[row] = polar_manifold.get_new_point(
843 if constexpr (spacedim < 3)
851 if (max_distance < 2e-2)
853 for (
unsigned int row = 0; row < weight_rows; ++row)
855 p_center + new_candidates[row].
first * new_candidates[row].
second;
865 boost::container::small_vector<double, 1000> merged_weights(
867 boost::container::small_vector<Tensor<1, spacedim>, 100>
869 boost::container::small_vector<double, 100> merged_distances(
870 surrounding_points.size(), 0.0);
872 unsigned int n_unique_directions = 0;
873 for (
unsigned int i = 0; i < surrounding_points.size(); ++i)
875 bool found_duplicate =
false;
879 for (
unsigned int j = 0; j < n_unique_directions; ++j)
881 const double squared_distance =
882 (directions[i] - directions[j]).norm_square();
883 if (!found_duplicate && squared_distance < 1e-28)
885 found_duplicate =
true;
886 for (
unsigned int row = 0; row < weight_rows; ++row)
887 merged_weights[row * weight_columns + j] +=
888 weights[row * weight_columns + i];
892 if (found_duplicate ==
false)
894 merged_directions[n_unique_directions] = directions[i];
895 merged_distances[n_unique_directions] = distances[i];
896 for (
unsigned int row = 0; row < weight_rows; ++row)
897 merged_weights[row * weight_columns + n_unique_directions] =
898 weights[row * weight_columns + i];
900 ++n_unique_directions;
906 boost::container::small_vector<unsigned int, 100> merged_weights_index(
908 for (
unsigned int row = 0; row < weight_rows; ++row)
910 for (
unsigned int existing_row = 0; existing_row < row;
913 bool identical_weights =
true;
915 for (
unsigned int weight_index = 0;
916 weight_index < n_unique_directions;
919 merged_weights[row * weight_columns + weight_index] -
920 merged_weights[existing_row * weight_columns +
921 weight_index]) > tolerance)
923 identical_weights =
false;
927 if (identical_weights)
929 merged_weights_index[row] = existing_row;
939 merged_directions.begin() + n_unique_directions);
942 merged_distances.begin() + n_unique_directions);
944 for (
unsigned int row = 0; row < weight_rows; ++row)
945 if (!accurate_point_was_found[row])
950 &merged_weights[row * weight_columns], n_unique_directions);
951 new_candidates[row].second =
952 internal::SphericalManifold::do_get_new_point(
953 array_merged_directions,
954 array_merged_distances,
955 array_merged_weights,
959 new_candidates[row].second =
960 new_candidates[merged_weights_index[row]].second;
963 p_center + new_candidates[row].first * new_candidates[row].second;
970template <
int dim,
int spacedim>
971std::pair<double, Tensor<1, spacedim>>
977 const double tolerance = 1e-10;
982 double total_weights = 0.;
983 for (
unsigned int i = 0; i < directions.size(); ++i)
986 if (
std::abs(1 - weights[i]) < tolerance)
987 return std::make_pair(distances[i], directions[i]);
989 rho += distances[i] * weights[i];
990 candidate += directions[i] * weights[i];
991 total_weights += weights[i];
995 const double norm = candidate.
norm();
999 rho /= total_weights;
1001 return std::make_pair(rho, candidate);
1009template <
int dim,
int spacedim>
1011 const double tolerance)
1019 ExcMessage(
"CylindricalManifold can only be used for spacedim==3!"));
1024template <
int dim,
int spacedim>
1028 const double tolerance)
1031 , direction(direction / direction.norm())
1032 , point_on_axis(point_on_axis)
1033 , tolerance(tolerance)
1034 , dxn(cross_product_3d(this->direction, normal_direction))
1039 ExcMessage(
"CylindricalManifold can only be used for spacedim==3!"));
1044template <
int dim,
int spacedim>
1045std::unique_ptr<Manifold<dim, spacedim>>
1048 return std::make_unique<CylindricalManifold<dim, spacedim>>(*this);
1053template <
int dim,
int spacedim>
1060 ExcMessage(
"CylindricalManifold can only be used for spacedim==3!"));
1064 double average_length = 0.;
1065 for (
unsigned int i = 0; i < surrounding_points.size(); ++i)
1067 middle += surrounding_points[i] * weights[i];
1068 average_length += surrounding_points[i].square() * weights[i];
1070 middle -= point_on_axis;
1071 const double lambda = middle * direction;
1073 if ((middle - direction * lambda).square() < tolerance * average_length)
1074 return point_on_axis + direction * lambda;
1082template <
int dim,
int spacedim>
1088 ExcMessage(
"CylindricalManifold can only be used for spacedim==3!"));
1092 const double lambda = normalized_point * direction;
1093 const Point<spacedim> projection = point_on_axis + direction * lambda;
1108template <
int dim,
int spacedim>
1114 ExcMessage(
"CylindricalManifold can only be used for spacedim==3!"));
1117 const double sine_r =
std::sin(chart_point[1]) * chart_point[0];
1118 const double cosine_r =
std::cos(chart_point[1]) * chart_point[0];
1120 normal_direction * cosine_r + dxn * sine_r;
1123 return point_on_axis + direction * chart_point[2] + intermediate;
1128template <
int dim,
int spacedim>
1134 ExcMessage(
"CylindricalManifold can only be used for spacedim==3!"));
1139 const double sine =
std::sin(chart_point[1]);
1140 const double cosine =
std::cos(chart_point[1]);
1142 normal_direction * cosine + dxn * sine;
1145 constexpr int s0 = 0 % spacedim;
1146 constexpr int s1 = 1 % spacedim;
1147 constexpr int s2 = 2 % spacedim;
1150 derivatives[s0][s0] = intermediate[s0];
1151 derivatives[s1][s0] = intermediate[s1];
1152 derivatives[s2][s0] = intermediate[s2];
1156 const double sine_r = sine * chart_point[0];
1157 const double cosine_r = cosine * chart_point[0];
1159 derivatives[s0][s1] = -normal_direction[s0] * sine_r + dxn[s0] * cosine_r;
1160 derivatives[s1][s1] = -normal_direction[s1] * sine_r + dxn[s1] * cosine_r;
1161 derivatives[s2][s1] = -normal_direction[s2] * sine_r + dxn[s2] * cosine_r;
1164 derivatives[s0][s2] = direction[s0];
1165 derivatives[s1][s2] = direction[s1];
1166 derivatives[s2][s2] = direction[s2];
1179 const double norm = t.
norm();
1180 Assert(norm > 0.0,
ExcMessage(
"The major axis must have a positive norm."));
1190template <
int dim,
int spacedim>
1194 const double eccentricity)
1197 , direction(check_and_normalize(major_axis_direction))
1199 , eccentricity(eccentricity)
1200 , cosh_u(1.0 / eccentricity)
1201 , sinh_u(
std::sqrt(cosh_u * cosh_u - 1.0))
1208 "Invalid eccentricity: It must satisfy 0 < eccentricity < 1."));
1213template <
int dim,
int spacedim>
1214std::unique_ptr<Manifold<dim, spacedim>>
1217 return std::make_unique<EllipticalManifold<dim, spacedim>>(*this);
1222template <
int dim,
int spacedim>
1235template <
int dim,
int spacedim>
1249 const double cs =
std::cos(chart_point[1]);
1250 const double sn =
std::sin(chart_point[1]);
1253 const double x = chart_point[0] * cosh_u * cs;
1254 const double y = chart_point[0] * sinh_u * sn;
1256 const Point<2> p(direction[0] * x - direction[1] * y,
1257 direction[1] * x + direction[0] * y);
1263template <
int dim,
int spacedim>
1278 const double x0 = space_point[0] - center[0];
1279 const double y0 = space_point[1] - center[1];
1280 const double x = direction[0] * x0 + direction[1] * y0;
1281 const double y = -direction[1] * x0 + direction[0] * y0;
1283 std::sqrt((x * x) / (cosh_u * cosh_u) + (y * y) / (sinh_u * sinh_u));
1289 double cos_eta = x / (pt0 * cosh_u);
1299 const double pt1 = (std::signbit(y) ? 2.0 *
numbers::PI - eta : eta);
1305template <
int dim,
int spacedim>
1321 const double cs =
std::cos(chart_point[1]);
1322 const double sn =
std::sin(chart_point[1]);
1324 dX[0][0] = cosh_u * cs;
1325 dX[0][1] = -chart_point[0] * cosh_u * sn;
1326 dX[1][0] = sinh_u * sn;
1327 dX[1][1] = chart_point[0] * sinh_u * cs;
1331 {{+direction[0], -direction[1]}, {direction[1], direction[0]}}};
1341template <
int dim,
int spacedim,
int chartdim>
1346 const double tolerance)
1349 , push_forward_function(&push_forward_function)
1350 , pull_back_function(&pull_back_function)
1351 , tolerance(tolerance)
1352 , owns_pointers(false)
1353 , finite_difference_step(0)
1361template <
int dim,
int spacedim,
int chartdim>
1366 const double tolerance)
1369 , push_forward_function(push_forward.
release())
1370 , pull_back_function(pull_back.
release())
1371 , tolerance(tolerance)
1372 , owns_pointers(true)
1373 , finite_difference_step(0)
1381template <
int dim,
int spacedim,
int chartdim>
1383 const std::string push_forward_expression,
1384 const std::string pull_back_expression,
1387 const std::string chart_vars,
1388 const std::string space_vars,
1389 const double tolerance,
1392 , const_map(const_map)
1393 , tolerance(tolerance)
1394 , owns_pointers(true)
1395 , push_forward_expression(push_forward_expression)
1396 , pull_back_expression(pull_back_expression)
1397 , chart_vars(chart_vars)
1398 , space_vars(space_vars)
1399 , finite_difference_step(h)
1411template <
int dim,
int spacedim,
int chartdim>
1414 if (owns_pointers ==
true)
1417 push_forward_function =
nullptr;
1421 pull_back_function =
nullptr;
1428template <
int dim,
int spacedim,
int chartdim>
1429std::unique_ptr<Manifold<dim, spacedim>>
1444 if (!(push_forward_expression.empty() && pull_back_expression.empty()))
1446 return std::make_unique<FunctionManifold<dim, spacedim, chartdim>>(
1447 push_forward_expression,
1448 pull_back_expression,
1449 this->get_periodicity(),
1454 finite_difference_step);
1458 return std::make_unique<FunctionManifold<dim, spacedim, chartdim>>(
1459 *push_forward_function,
1460 *pull_back_function,
1461 this->get_periodicity(),
1468template <
int dim,
int spacedim,
int chartdim>
1475 push_forward_function->vector_value(chart_point, pf);
1476 for (
unsigned int i = 0; i < spacedim; ++i)
1482 pull_back_function->vector_value(result, pb);
1483 for (
unsigned int i = 0; i < chartdim; ++i)
1485 (chart_point.
norm() > tolerance &&
1486 (
std::abs(pb[i] - chart_point[i]) <
1487 tolerance * chart_point.
norm())) ||
1488 (
std::abs(pb[i] - chart_point[i]) < tolerance),
1490 "The push forward is not the inverse of the pull back! Bailing out."));
1498template <
int dim,
int spacedim,
int chartdim>
1504 for (
unsigned int i = 0; i < spacedim; ++i)
1506 const auto gradient = push_forward_function->gradient(chart_point, i);
1507 for (
unsigned int j = 0; j < chartdim; ++j)
1508 DF[i][j] = gradient[j];
1515template <
int dim,
int spacedim,
int chartdim>
1522 pull_back_function->vector_value(space_point, pb);
1523 for (
unsigned int i = 0; i < chartdim; ++i)
1540 double phi = std::atan2(y, x);
1541 double theta = std::atan2(z,
std::sqrt(x * x + y * y) - centerline_radius);
1544 Utilities::fixed_power<2>(x -
std::cos(phi) * centerline_radius) +
1547 return {phi, theta, w};
1556 double phi = chart_point[0];
1557 double theta = chart_point[1];
1558 double w = chart_point[2];
1560 return {
std::cos(phi) * centerline_radius +
1562 inner_radius * w *
std::sin(theta),
1563 std::sin(phi) * centerline_radius +
1571 const double inner_radius)
1573 , centerline_radius(centerline_radius)
1574 , inner_radius(inner_radius)
1577 ExcMessage(
"The centerline radius must be greater than the "
1585std::unique_ptr<Manifold<dim, 3>>
1588 return std::make_unique<TorusManifold<dim>>(centerline_radius, inner_radius);
1599 double phi = chart_point[0];
1600 double theta = chart_point[1];
1601 double w = chart_point[2];
1603 DX[0][0] = -
std::sin(phi) * centerline_radius -
1609 DX[1][1] = inner_radius * w *
std::cos(theta);
1610 DX[1][2] = inner_radius *
std::sin(theta);
1612 DX[2][0] =
std::cos(phi) * centerline_radius +
1625template <
int dim,
int spacedim>
1628 : triangulation(nullptr)
1636template <
int dim,
int spacedim>
1638 spacedim>::~TransfiniteInterpolationManifold()
1640 if (clear_signal.connected())
1641 clear_signal.disconnect();
1646template <
int dim,
int spacedim>
1647std::unique_ptr<Manifold<dim, spacedim>>
1652 ptr->initialize(*triangulation);
1653 return std::unique_ptr<Manifold<dim, spacedim>>(ptr);
1658template <
int dim,
int spacedim>
1663 this->triangulation = &triangulation;
1665 clear_signal.disconnect();
1666 clear_signal = triangulation.
signals.
clear.connect([&]() ->
void {
1667 this->triangulation =
nullptr;
1668 this->level_coarse = -1;
1670 level_coarse = triangulation.
last()->level();
1671 coarse_cell_is_flat.resize(triangulation.
n_cells(level_coarse),
false);
1672 quadratic_approximation.clear();
1682 const std::vector<Point<dim>> unit_points =
1684 std::vector<Point<spacedim>> real_points(unit_points.size());
1688 bool cell_is_flat =
true;
1689 for (
const auto l : cell->line_indices())
1690 if (cell->line(l)->manifold_id() != cell->manifold_id() &&
1692 cell_is_flat =
false;
1693 if constexpr (dim > 2)
1694 for (
const auto q : cell->face_indices())
1695 if (cell->quad(q)->manifold_id() != cell->manifold_id() &&
1697 cell_is_flat =
false;
1699 coarse_cell_is_flat.size());
1700 coarse_cell_is_flat[cell->index()] = cell_is_flat;
1703 for (
unsigned int i = 0; i < unit_points.size(); ++i)
1704 real_points[i] = push_forward(cell, unit_points[i]);
1705 quadratic_approximation.emplace_back(real_points, unit_points);
1714 template <
typename AccessorType>
1716 compute_transfinite_interpolation(
const AccessorType &cell,
1720 return cell.vertex(0) * (1. - chart_point[0]) +
1721 cell.vertex(1) * chart_point[0];
1725 template <
typename AccessorType>
1727 compute_transfinite_interpolation(
const AccessorType &cell,
1729 const bool cell_is_flat)
1731 const unsigned int dim = AccessorType::dimension;
1732 const unsigned int spacedim = AccessorType::space_dimension;
1740 const std::array<Point<spacedim>, 4> vertices{
1741 {cell.vertex(0), cell.vertex(1), cell.vertex(2), cell.vertex(3)}};
1746 std::array<double, 4> weights_vertices{
1747 {(1. - chart_point[0]) * (1. - chart_point[1]),
1748 chart_point[0] * (1. - chart_point[1]),
1749 (1. - chart_point[0]) * chart_point[1],
1750 chart_point[0] * chart_point[1]}};
1755 new_point += weights_vertices[v] * vertices[v];
1767 std::array<double, GeometryInfo<2>::vertices_per_face> weights;
1770 const auto weights_view =
1772 const auto points_view =
make_array_view(points.begin(), points.end());
1774 for (
unsigned int line = 0; line < GeometryInfo<2>::lines_per_cell;
1777 const double my_weight =
1778 (line % 2) ? chart_point[line / 2] : 1 - chart_point[line / 2];
1779 const double line_point = chart_point[1 - line / 2];
1786 cell.line(line)->manifold_id();
1787 if (line_manifold_id == my_manifold_id ||
1792 my_weight * (1. - line_point);
1795 my_weight * line_point;
1803 weights[0] = 1. - line_point;
1804 weights[1] = line_point;
1813 new_point -= weights_vertices[v] * vertices[v];
1822 static constexpr unsigned int face_to_cell_vertices_3d[6][4] = {{0, 2, 4, 6},
1832 static constexpr unsigned int face_to_cell_lines_3d[6][4] = {{8, 10, 0, 4},
1840 template <
typename AccessorType>
1842 compute_transfinite_interpolation(
const AccessorType &cell,
1844 const bool cell_is_flat)
1846 const unsigned int dim = AccessorType::dimension;
1847 const unsigned int spacedim = AccessorType::space_dimension;
1853 const std::array<Point<spacedim>, 8> vertices{{cell.vertex(0),
1865 double linear_shapes[10];
1866 for (
unsigned int d = 0;
d < 3; ++
d)
1868 linear_shapes[2 *
d] = 1. - chart_point[
d];
1869 linear_shapes[2 *
d + 1] = chart_point[
d];
1873 for (
unsigned int d = 6;
d < 10; ++
d)
1874 linear_shapes[d] = linear_shapes[d - 6];
1876 std::array<double, 8> weights_vertices;
1877 for (
unsigned int i2 = 0, v = 0; i2 < 2; ++i2)
1878 for (
unsigned int i1 = 0; i1 < 2; ++i1)
1879 for (
unsigned int i0 = 0; i0 < 2; ++i0, ++v)
1880 weights_vertices[v] =
1881 (linear_shapes[4 + i2] * linear_shapes[2 + i1]) * linear_shapes[i0];
1885 for (
unsigned int v = 0; v < 8; ++v)
1886 new_point += weights_vertices[v] * vertices[v];
1892 std::array<double, GeometryInfo<3>::lines_per_cell> weights_lines;
1893 std::fill(weights_lines.begin(), weights_lines.end(), 0.0);
1896 std::array<double, GeometryInfo<2>::vertices_per_cell> weights;
1899 const auto weights_view =
1901 const auto points_view =
make_array_view(points.begin(), points.end());
1903 for (
const unsigned int face :
GeometryInfo<3>::face_indices())
1905 const double my_weight = linear_shapes[face];
1906 const unsigned int face_even = face - face % 2;
1914 cell.face(face)->manifold_id();
1915 if (face_manifold_id == my_manifold_id ||
1918 for (
unsigned int line = 0;
1919 line < GeometryInfo<2>::lines_per_cell;
1922 const double line_weight =
1923 linear_shapes[face_even + 2 + line];
1924 weights_lines[face_to_cell_lines_3d[face][line]] +=
1925 my_weight * line_weight;
1931 weights_vertices[face_to_cell_vertices_3d[face][0]] -=
1932 linear_shapes[face_even + 2] *
1933 (linear_shapes[face_even + 4] * my_weight);
1934 weights_vertices[face_to_cell_vertices_3d[face][1]] -=
1935 linear_shapes[face_even + 3] *
1936 (linear_shapes[face_even + 4] * my_weight);
1937 weights_vertices[face_to_cell_vertices_3d[face][2]] -=
1938 linear_shapes[face_even + 2] *
1939 (linear_shapes[face_even + 5] * my_weight);
1940 weights_vertices[face_to_cell_vertices_3d[face][3]] -=
1941 linear_shapes[face_even + 3] *
1942 (linear_shapes[face_even + 5] * my_weight);
1947 points[v] = vertices[face_to_cell_vertices_3d[face][v]];
1949 linear_shapes[face_even + 2] * linear_shapes[face_even + 4];
1951 linear_shapes[face_even + 3] * linear_shapes[face_even + 4];
1953 linear_shapes[face_even + 2] * linear_shapes[face_even + 5];
1955 linear_shapes[face_even + 3] * linear_shapes[face_even + 5];
1963 const auto weights_view_line =
1965 const auto points_view_line =
1967 for (
unsigned int line = 0; line < GeometryInfo<3>::lines_per_cell;
1970 const double line_point =
1971 (line < 8 ? chart_point[1 - (line % 4) / 2] : chart_point[2]);
1972 double my_weight = 0.;
1974 my_weight = linear_shapes[line % 4] * linear_shapes[4 + line / 4];
1977 const unsigned int subline = line - 8;
1979 linear_shapes[subline % 2] * linear_shapes[2 + subline / 2];
1981 my_weight -= weights_lines[line];
1987 cell.line(line)->manifold_id();
1988 if (line_manifold_id == my_manifold_id ||
1993 my_weight * (1. - line_point);
1996 my_weight * (line_point);
2004 weights[0] = 1. - line_point;
2005 weights[1] = line_point;
2006 new_point -= my_weight * tria.
get_manifold(line_manifold_id)
2014 new_point += weights_vertices[v] * vertices[v];
2022template <
int dim,
int spacedim>
2034 ExcMessage(
"chart_point is not in unit interval"));
2036 return compute_transfinite_interpolation(*cell,
2038 coarse_cell_is_flat[cell->index()]);
2043template <
int dim,
int spacedim>
2052 for (
unsigned int d = 0; d < dim; ++d)
2055 const double step = chart_point[d] > 0.5 ? -1e-8 : 1e-8;
2058 modified[d] += step;
2060 compute_transfinite_interpolation(*cell,
2062 coarse_cell_is_flat[cell->index()]) -
2063 pushed_forward_chart_point;
2064 for (
unsigned int e = 0; e < spacedim; ++e)
2065 grad[e][d] = difference[e] / step;
2072template <
int dim,
int spacedim>
2080 for (
unsigned int d = 0; d < dim; ++d)
2084 Point<dim> chart_point = cell->reference_cell().closest_point(initial_guess);
2093 compute_transfinite_interpolation(*cell,
2095 coarse_cell_is_flat[cell->index()]);
2096 const double tolerance = 1e-21 * Utilities::fixed_power<2>(cell->diameter());
2097 double residual_norm_square = residual.
norm_square();
2099 bool must_recompute_jacobian =
true;
2100 for (
unsigned int i = 0; i < 100; ++i)
2102 if (residual_norm_square < tolerance)
2109 for (
unsigned int d = 0; d < spacedim; ++d)
2110 for (
unsigned int e = 0; e < dim; ++e)
2111 update[e] += inv_grad[d][e] * residual[d];
2112 return chart_point + update;
2124 if (must_recompute_jacobian || i % 9 == 0)
2132 push_forward_gradient(cell,
2138 must_recompute_jacobian =
false;
2141 for (
unsigned int d = 0; d < spacedim; ++d)
2142 for (
unsigned int e = 0; e < dim; ++e)
2143 update[e] += inv_grad[d][e] * residual[d];
2157 while (alpha > 1e-4)
2159 Point<dim> guess = chart_point + alpha * update;
2161 point - compute_transfinite_interpolation(
2162 *cell, guess, coarse_cell_is_flat[cell->index()]);
2163 const double residual_norm_new = residual_guess.
norm_square();
2164 if (residual_norm_new < residual_norm_square)
2166 residual = residual_guess;
2167 residual_norm_square = residual_norm_new;
2168 chart_point += alpha * update;
2181 must_recompute_jacobian =
true;
2195 for (
unsigned int d = 0; d < spacedim; ++d)
2196 for (
unsigned int e = 0; e < dim; ++e)
2197 Jinv_deltaf[e] += inv_grad[d][e] * delta_f[d];
2204 if (
std::abs(delta_x * Jinv_deltaf) > 1e-12 && !must_recompute_jacobian)
2207 (delta_x - Jinv_deltaf) / (delta_x * Jinv_deltaf);
2209 for (
unsigned int d = 0; d < spacedim; ++d)
2210 for (
unsigned int e = 0; e < dim; ++e)
2211 jac_update[d] += delta_x[e] * inv_grad[d][e];
2212 for (
unsigned int d = 0; d < spacedim; ++d)
2213 for (
unsigned int e = 0; e < dim; ++e)
2214 inv_grad[d][e] += factor[e] * jac_update[d];
2222template <
int dim,
int spacedim>
2223std::array<unsigned int, 20>
2232 Assert(triangulation->begin_active()->level() >= level_coarse,
2233 ExcMessage(
"The manifold was initialized with level " +
2234 std::to_string(level_coarse) +
" but there are now" +
2235 "active cells on a lower level. Coarsening the mesh is " +
2236 "currently not supported"));
2241 triangulation->begin(
2246 boost::container::small_vector<std::pair<double, unsigned int>, 200>
2247 distances_and_cells;
2248 for (; cell != endc; ++cell)
2251 if (&cell->get_manifold() !=
this)
2258 vertices[vertex_n] = cell->vertex(vertex_n);
2266 center += vertices[v];
2268 double radius_square = 0.;
2271 std::max(radius_square, (center - vertices[v]).norm_square());
2272 bool inside_circle =
true;
2273 for (
unsigned int i = 0; i < points.size(); ++i)
2274 if ((center - points[i]).norm_square() > radius_square * 1.5)
2276 inside_circle =
false;
2279 if (inside_circle ==
false)
2283 double current_distance = 0;
2284 for (
unsigned int i = 0; i < points.size(); ++i)
2287 quadratic_approximation[cell->index()].compute(points[i]);
2290 distances_and_cells.push_back(
2291 std::make_pair(current_distance, cell->index()));
2296 std::sort(distances_and_cells.begin(), distances_and_cells.end());
2297 std::array<unsigned int, 20> cells;
2299 for (
unsigned int i = 0; i < distances_and_cells.size() && i < cells.size();
2301 cells[i] = distances_and_cells[i].
second;
2308template <
int dim,
int spacedim>
2314 Assert(surrounding_points.size() == chart_points.size(),
2315 ExcMessage(
"The chart points array view must be as large as the "
2316 "surrounding points array view."));
2318 std::array<unsigned int, 20> nearby_cells =
2319 get_possible_cells_around_points(surrounding_points);
2343 auto guess_chart_point_structdim_2 = [&](
const unsigned int i) ->
Point<dim> {
2344 Assert(surrounding_points.size() == 8 && 2 < i && i < 8,
2345 ExcMessage(
"This function assumes that there are eight surrounding "
2346 "points around a two-dimensional object. It also assumes "
2347 "that the first three chart points have already been "
2357 return chart_points[1] + (chart_points[2] - chart_points[0]);
2359 return 0.5 * (chart_points[0] + chart_points[2]);
2361 return 0.5 * (chart_points[1] + chart_points[3]);
2363 return 0.5 * (chart_points[0] + chart_points[1]);
2365 return 0.5 * (chart_points[2] + chart_points[3]);
2394 auto guess_chart_point_structdim_3 = [&](
const unsigned int i) ->
Point<dim> {
2395 Assert(surrounding_points.size() == 8 && 4 < i && i < 8,
2396 ExcMessage(
"This function assumes that there are eight surrounding "
2397 "points around a three-dimensional object. It also "
2398 "assumes that the first five chart points have already "
2400 return chart_points[i - 4] + (chart_points[4] - chart_points[0]);
2404 bool use_structdim_2_guesses =
false;
2405 bool use_structdim_3_guesses =
false;
2410 if (surrounding_points.size() == 8)
2413 surrounding_points[6] - surrounding_points[0];
2415 surrounding_points[7] - surrounding_points[2];
2418 const double cosine = scalar_product(v06, v27) /
2423 use_structdim_2_guesses =
true;
2424 else if (spacedim == 3)
2427 use_structdim_3_guesses =
true;
2430 Assert((!use_structdim_2_guesses && !use_structdim_3_guesses) ||
2431 (use_structdim_2_guesses ^ use_structdim_3_guesses),
2436 auto compute_chart_point =
2438 const unsigned int point_index) {
2444 bool used_quadratic_approximation =
false;
2447 if (point_index == 3 && surrounding_points.size() >= 8)
2448 guess = chart_points[1] + (chart_points[2] - chart_points[0]);
2449 else if (use_structdim_2_guesses && 3 < point_index)
2450 guess = guess_chart_point_structdim_2(point_index);
2451 else if (use_structdim_3_guesses && 4 < point_index)
2452 guess = guess_chart_point_structdim_3(point_index);
2453 else if (dim == 3 && point_index > 7 && surrounding_points.size() == 26)
2455 if (point_index < 20)
2458 point_index - 8, 0)] +
2460 point_index - 8, 1)]);
2464 point_index - 20, 0)] +
2466 point_index - 20, 1)] +
2468 point_index - 20, 2)] +
2470 point_index - 20, 3)]);
2474 guess = quadratic_approximation[cell->index()].compute(
2475 surrounding_points[point_index]);
2476 used_quadratic_approximation =
true;
2478 chart_points[point_index] =
2479 pull_back(cell, surrounding_points[point_index], guess);
2484 if (chart_points[point_index][0] ==
2486 !used_quadratic_approximation)
2488 guess = quadratic_approximation[cell->index()].compute(
2489 surrounding_points[point_index]);
2490 chart_points[point_index] =
2491 pull_back(cell, surrounding_points[point_index], guess);
2494 if (chart_points[point_index][0] ==
2497 for (
unsigned int d = 0; d < dim; ++d)
2499 chart_points[point_index] =
2500 pull_back(cell, surrounding_points[point_index], guess);
2505 for (
unsigned int c = 0; c < nearby_cells.size(); ++c)
2508 triangulation, level_coarse, nearby_cells[c]);
2509 bool inside_unit_cell =
true;
2510 for (
unsigned int i = 0; i < surrounding_points.size(); ++i)
2512 compute_chart_point(cell, i);
2519 inside_unit_cell =
false;
2523 if (inside_unit_cell ==
true)
2530 if (c == nearby_cells.size() - 1 ||
2535 std::ostringstream message;
2536 for (
unsigned int b = 0; b <= c; ++b)
2539 triangulation, level_coarse, nearby_cells[b]);
2540 message <<
"Looking at cell " << cell->id()
2541 <<
" with vertices: " << std::endl;
2543 message << cell->vertex(v) <<
" ";
2544 message << std::endl;
2545 message <<
"Transformation to chart coordinates: " << std::endl;
2546 for (
unsigned int i = 0; i < surrounding_points.size(); ++i)
2548 compute_chart_point(cell, i);
2549 message << surrounding_points[i] <<
" -> " << chart_points[i]
2569template <
int dim,
int spacedim>
2575 boost::container::small_vector<Point<dim>, 100> chart_points(
2576 surrounding_points.size());
2579 const auto cell = compute_chart_points(surrounding_points, chart_points_view);
2582 chart_manifold.get_new_point(chart_points_view, weights);
2584 return push_forward(cell, p_chart);
2589template <
int dim,
int spacedim>
2599 boost::container::small_vector<Point<dim>, 100> chart_points(
2600 surrounding_points.size());
2603 const auto cell = compute_chart_points(surrounding_points, chart_points_view);
2605 boost::container::small_vector<Point<dim>, 100> new_points_on_chart(
2607 chart_manifold.get_new_points(chart_points_view,
2610 new_points_on_chart.end()));
2612 for (
unsigned int row = 0; row < weights.size(0); ++row)
2613 new_points[row] = push_forward(cell, new_points_on_chart[row]);
2619#include "grid/manifold_lib.inst"
ArrayView< std::remove_reference_t< typename std::iterator_traits< Iterator >::reference >, MemorySpaceType > make_array_view(const Iterator begin, const Iterator end)
virtual Point< spacedim > get_new_point(const ArrayView< const Point< spacedim > > &surrounding_points, const ArrayView< const double > &weights) const override
virtual Point< spacedim > push_forward(const Point< 3 > &chart_point) const override
virtual DerivativeForm< 1, 3, spacedim > push_forward_gradient(const Point< 3 > &chart_point) const override
virtual Point< spacedim > get_new_point(const ArrayView< const Point< spacedim > > &surrounding_points, const ArrayView< const double > &weights) const override
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
CylindricalManifold(const unsigned int axis=0, const double tolerance=1e-10)
virtual Point< 3 > pull_back(const Point< spacedim > &space_point) const override
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
virtual Point< spacedim > push_forward(const Point< spacedim > &chart_point) const override
EllipticalManifold(const Point< spacedim > ¢er, const Tensor< 1, spacedim > &major_axis_direction, const double eccentricity)
virtual DerivativeForm< 1, spacedim, spacedim > push_forward_gradient(const Point< spacedim > &chart_point) const override
virtual Point< spacedim > pull_back(const Point< spacedim > &space_point) const override
static Tensor< 1, spacedim > get_periodicity()
const FunctionParser< spacedim >::ConstMap const_map
const std::string chart_vars
const std::string pull_back_expression
virtual DerivativeForm< 1, chartdim, spacedim > push_forward_gradient(const Point< chartdim > &chart_point) const override
const std::string space_vars
virtual Point< spacedim > push_forward(const Point< chartdim > &chart_point) const override
FunctionManifold(const Function< chartdim > &push_forward_function, const Function< spacedim > &pull_back_function, const Tensor< 1, chartdim > &periodicity=Tensor< 1, chartdim >(), const double tolerance=1e-10)
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
const std::string push_forward_expression
virtual Point< chartdim > pull_back(const Point< spacedim > &space_point) const override
ObserverPointer< const Function< chartdim >, FunctionManifold< dim, spacedim, chartdim > > push_forward_function
ObserverPointer< const Function< spacedim >, FunctionManifold< dim, spacedim, chartdim > > pull_back_function
virtual ~FunctionManifold() override
virtual void initialize(const std::string &vars, const std::vector< std::string > &expressions, const ConstMap &constants, const bool time_dependent=false) override
std::map< std::string, double > ConstMap
virtual void get_normals_at_vertices(const typename Triangulation< dim, spacedim >::face_iterator &face, FaceVertexNormals &face_vertex_normals) const
std::array< Tensor< 1, spacedim >, GeometryInfo< dim >::vertices_per_face > FaceVertexNormals
virtual Tensor< 1, spacedim > normal_vector(const typename Triangulation< dim, spacedim >::face_iterator &face, const Point< spacedim > &p) const
virtual Point< spacedim > get_new_point(const ArrayView< const Point< spacedim > > &surrounding_points, const ArrayView< const double > &weights) const
Abstract base class for mapping classes.
PolarManifold(const Point< spacedim > center=Point< spacedim >())
static Tensor< 1, spacedim > get_periodicity()
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
virtual DerivativeForm< 1, spacedim, spacedim > push_forward_gradient(const Point< spacedim > &chart_point) const override
virtual Tensor< 1, spacedim > normal_vector(const typename Triangulation< dim, spacedim >::face_iterator &face, const Point< spacedim > &p) const override
virtual Point< spacedim > push_forward(const Point< spacedim > &chart_point) const override
virtual Point< spacedim > pull_back(const Point< spacedim > &space_point) const override
virtual Point< spacedim > get_new_point(const ArrayView< const Point< spacedim > > &vertices, const ArrayView< const double > &weights) const override
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
virtual Point< spacedim > get_intermediate_point(const Point< spacedim > &p1, const Point< spacedim > &p2, const double w) const override
virtual void get_normals_at_vertices(const typename Triangulation< dim, spacedim >::face_iterator &face, typename Manifold< dim, spacedim >::FaceVertexNormals &face_vertex_normals) const override
std::pair< double, Tensor< 1, spacedim > > guess_new_point(const ArrayView< const Tensor< 1, spacedim > > &directions, const ArrayView< const double > &distances, const ArrayView< const double > &weights) const
virtual void get_new_points(const ArrayView< const Point< spacedim > > &surrounding_points, const Table< 2, double > &weights, ArrayView< Point< spacedim > > new_points) const override
SphericalManifold(const Point< spacedim > center=Point< spacedim >())
virtual Tensor< 1, spacedim > get_tangent_vector(const Point< spacedim > &x1, const Point< spacedim > &x2) const override
virtual Tensor< 1, spacedim > normal_vector(const typename Triangulation< dim, spacedim >::face_iterator &face, const Point< spacedim > &p) const override
void do_get_new_points(const ArrayView< const Point< spacedim > > &surrounding_points, const ArrayView< const double > &weights, ArrayView< Point< spacedim > > new_points) const
numbers::NumberTraits< Number >::real_type norm() const
constexpr numbers::NumberTraits< Number >::real_type norm_square() const
virtual Point< 3 > pull_back(const Point< 3 > &p) const override
virtual DerivativeForm< 1, 3, 3 > push_forward_gradient(const Point< 3 > &chart_point) const override
virtual Point< 3 > push_forward(const Point< 3 > &chart_point) const override
TorusManifold(const double centerline_radius, const double inner_radius)
virtual std::unique_ptr< Manifold< dim, 3 > > clone() const override
DerivativeForm< 1, dim, spacedim > push_forward_gradient(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< dim > &chart_point, const Point< spacedim > &pushed_forward_chart_point) const
void initialize(const Triangulation< dim, spacedim > &triangulation)
Triangulation< dim, spacedim >::cell_iterator compute_chart_points(const ArrayView< const Point< spacedim > > &surrounding_points, ArrayView< Point< dim > > chart_points) const
std::array< unsigned int, 20 > get_possible_cells_around_points(const ArrayView< const Point< spacedim > > &surrounding_points) const
Point< dim > pull_back(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< spacedim > &p, const Point< dim > &initial_guess) const
virtual void get_new_points(const ArrayView< const Point< spacedim > > &surrounding_points, const Table< 2, double > &weights, ArrayView< Point< spacedim > > new_points) const override
virtual Point< spacedim > get_new_point(const ArrayView< const Point< spacedim > > &surrounding_points, const ArrayView< const double > &weights) const override
Point< spacedim > push_forward(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< dim > &chart_point) const
virtual std::unique_ptr< Manifold< dim, spacedim > > clone() const override
cell_iterator last() const
unsigned int n_cells() const
Triangulation< dim, spacedim > & get_triangulation()
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
constexpr bool running_in_debug_mode()
#define DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
#define DEAL_II_ASSERT_UNREACHABLE()
#define DEAL_II_NOT_IMPLEMENTED()
IteratorRange< active_cell_iterator > active_cell_iterators() const
static ::ExceptionBase & ExcNotImplemented()
static ::ExceptionBase & ExcEmptyObject()
#define Assert(cond, exc)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcNotInitialized()
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
TriaIterator< CellAccessor< dim, spacedim > > cell_iterator
const Manifold< dim, spacedim > & get_manifold(const types::manifold_id number) const
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
Number signed_angle(const Tensor< 1, spacedim, Number > &a, const Tensor< 1, spacedim, Number > &b, const Tensor< 1, spacedim, Number > &axis)
Tensor< 1, 3 > projected_direction(const Tensor< 1, 3 > &u, const Tensor< 1, 3 > &v)
Tensor< 1, 3 > apply_exponential_map(const Tensor< 1, 3 > &u, const Tensor< 1, 3 > &dir)
static constexpr double invalid_pull_back_coordinate
Point< spacedim > compute_normal(const Tensor< 1, spacedim > &, bool=false)
constexpr unsigned int invalid_unsigned_int
constexpr types::manifold_id flat_manifold_id
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > cos(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > sin(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > sqrt(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)
inline ::VectorizedArray< Number, width > acos(const ::VectorizedArray< Number, width > &x)
static double distance_to_unit_cell(const Point< dim > &p)
static unsigned int face_to_cell_vertices(const unsigned int face, const unsigned int vertex, const bool face_orientation=true, const bool face_flip=false, const bool face_rotation=false)
static unsigned int line_to_cell_vertices(const unsigned int line, const unsigned int vertex)
static std_cxx20::ranges::iota_view< unsigned int, unsigned int > vertex_indices()
boost::signals2::signal< void()> clear
constexpr Number determinant(const SymmetricTensor< 2, dim, Number > &)
constexpr SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &)