15#ifndef dealii_mapping_q_internal_h
16#define dealii_mapping_q_internal_h
62 template <
int spacedim>
76 template <
int spacedim>
88 const long double x = p[0];
89 const long double y = p[1];
91 const long double x0 =
vertices[0][0];
92 const long double x1 =
vertices[1][0];
93 const long double x2 =
vertices[2][0];
94 const long double x3 =
vertices[3][0];
96 const long double y0 =
vertices[0][1];
97 const long double y1 =
vertices[1][1];
98 const long double y2 =
vertices[2][1];
99 const long double y3 =
vertices[3][1];
101 const long double a = (x1 - x3) * (y0 - y2) - (x0 - x2) * (y1 - y3);
102 const long double b = -(x0 - x1 - x2 + x3) * y + (x - 2 * x1 + x3) * y0 -
103 (x - 2 * x0 + x2) * y1 - (x - x1) * y2 +
105 const long double c = (x0 - x1) * y - (x - x1) * y0 + (x - x0) * y1;
107 const long double discriminant = b * b - 4 * a * c;
116 const long double sqrt_discriminant =
std::sqrt(discriminant);
119 if (b != 0.0 &&
std::abs(b) == sqrt_discriminant)
130 eta1 = 2 * c / (-b - sqrt_discriminant);
131 eta2 = 2 * c / (-b + sqrt_discriminant);
136 eta1 = (-b - sqrt_discriminant) / (2 * a);
137 eta2 = (-b + sqrt_discriminant) / (2 * a);
140 const long double eta =
147 const long double subexpr0 = -eta * x2 + x0 * (eta - 1);
148 const long double xi_denominator0 = eta * x3 - x1 * (eta - 1) + subexpr0;
152 if (
std::abs(xi_denominator0) > 1e-10 * max_x)
154 const double xi = (x + subexpr0) / xi_denominator0;
155 return {xi,
static_cast<double>(eta)};
159 const long double max_y =
162 const long double subexpr1 = -eta * y2 + y0 * (eta - 1);
163 const long double xi_denominator1 =
164 eta * y3 - y1 * (eta - 1) + subexpr1;
165 if (
std::abs(xi_denominator1) > 1e-10 * max_y)
167 const double xi = (subexpr1 + y) / xi_denominator1;
168 return {xi,
static_cast<double>(eta)};
175 spacedim>::ExcTransformationFailed()));
181 return {std::numeric_limits<double>::quiet_NaN(),
182 std::numeric_limits<double>::quiet_NaN()};
187 template <
int spacedim>
196 return {std::numeric_limits<double>::quiet_NaN(),
197 std::numeric_limits<double>::quiet_NaN(),
198 std::numeric_limits<double>::quiet_NaN()};
209 namespace MappingQImplementation
216 std::vector<Point<dim>>
218 const std::vector<unsigned int> &renumbering)
222 std::vector<Point<dim>> points(renumbering.size());
223 const unsigned int n1 = line_support_points.size();
224 for (
unsigned int q2 = 0, q = 0; q2 < (dim > 2 ? n1 : 1); ++q2)
225 for (
unsigned int q1 = 0; q1 < (dim > 1 ? n1 : 1); ++q1)
226 for (
unsigned int q0 = 0; q0 < n1; ++q0, ++q)
228 points[renumbering[q]][0] = line_support_points[q0][0];
230 points[renumbering[q]][1] = line_support_points[q1][0];
232 points[renumbering[q]][2] = line_support_points[q2][0];
246 inline ::Table<2, double>
253 if (polynomial_degree == 1)
256 const unsigned int M = polynomial_degree - 1;
257 const unsigned int n_inner_2d = M * M;
258 const unsigned int n_outer_2d = 4 + 4 * M;
261 loqvs.reinit(n_inner_2d, n_outer_2d);
263 for (
unsigned int i = 0; i < M; ++i)
264 for (
unsigned int j = 0; j < M; ++j)
267 gl.point((i + 1) * (polynomial_degree + 1) + (j + 1));
268 const unsigned int index_table = i * M + j;
269 for (
unsigned int v = 0; v < 4; ++v)
270 loqvs(index_table, v) =
272 loqvs(index_table, 4 + i) = 1. - p[0];
273 loqvs(index_table, 4 + i + M) = p[0];
274 loqvs(index_table, 4 + j + 2 * M) = 1. - p[1];
275 loqvs(index_table, 4 + j + 3 * M) = p[1];
280 for (
unsigned int unit_point = 0; unit_point < n_inner_2d; ++unit_point)
281 Assert(std::fabs(std::accumulate(loqvs[unit_point].begin(),
282 loqvs[unit_point].end(),
284 1) < 1e-13 * polynomial_degree,
298 inline ::Table<2, double>
305 if (polynomial_degree == 1)
308 const unsigned int M = polynomial_degree - 1;
311 const unsigned int n_outer = 8 + 12 * M + 6 * M * M;
314 lohvs.reinit(n_inner, n_outer);
316 for (
unsigned int i = 0; i < M; ++i)
317 for (
unsigned int j = 0; j < M; ++j)
318 for (
unsigned int k = 0; k < M; ++k)
320 const Point<3> &p = gl.point((i + 1) * (M + 2) * (M + 2) +
321 (j + 1) * (M + 2) + (k + 1));
322 const unsigned int index_table = i * M * M + j * M + k;
325 for (
unsigned int v = 0; v < 8; ++v)
326 lohvs(index_table, v) =
331 constexpr std::array<unsigned int, 4> line_coordinates_y(
334 for (
unsigned int l = 0; l < 4; ++l)
335 lohvs(index_table, 8 + line_coordinates_y[l] * M + j) =
340 constexpr std::array<unsigned int, 4> line_coordinates_x(
343 for (
unsigned int l = 0; l < 4; ++l)
344 lohvs(index_table, 8 + line_coordinates_x[l] * M + k) =
349 constexpr std::array<unsigned int, 4> line_coordinates_z(
352 for (
unsigned int l = 0; l < 4; ++l)
353 lohvs(index_table, 8 + line_coordinates_z[l] * M + i) =
358 lohvs(index_table, 8 + 12 * M + 0 * M * M + i * M + j) =
360 lohvs(index_table, 8 + 12 * M + 1 * M * M + i * M + j) = p[0];
361 lohvs(index_table, 8 + 12 * M + 2 * M * M + k * M + i) =
363 lohvs(index_table, 8 + 12 * M + 3 * M * M + k * M + i) = p[1];
364 lohvs(index_table, 8 + 12 * M + 4 * M * M + j * M + k) =
366 lohvs(index_table, 8 + 12 * M + 5 * M * M + j * M + k) = p[2];
371 for (
unsigned int unit_point = 0; unit_point < n_inner; ++unit_point)
372 Assert(std::fabs(std::accumulate(lohvs[unit_point].begin(),
373 lohvs[unit_point].end(),
375 1) < 1e-13 * polynomial_degree,
387 inline std::vector<::Table<2, double>>
389 const unsigned int polynomial_degree,
390 const unsigned int dim)
393 std::vector<::Table<2, double>> output(dim);
394 if (polynomial_degree <= 1)
399 output[0].reinit(polynomial_degree - 1,
401 for (
unsigned int q = 0; q < polynomial_degree - 1; ++q)
422 inline ::Table<2, double>
426 if (polynomial_degree <= 1)
427 return ::Table<2, double>();
430 const std::vector<unsigned int> h2l =
436 for (
unsigned int q = 0; q < output.size(0); ++q)
453 template <
int dim,
int spacedim>
456 const typename ::MappingQ<dim, spacedim>::InternalData &data)
459 data.mapping_support_points.size());
463 for (
unsigned int i = 0; i < data.mapping_support_points.size(); ++i)
464 p_real += data.mapping_support_points[i] * data.shape(0, i);
475 template <
int dim,
int spacedim,
typename Number>
482 const std::vector<unsigned int> &renumber,
483 const bool print_iterations_to_deallog =
false)
485 if (print_iterations_to_deallog)
486 deallog <<
"Start MappingQ::do_transform_real_to_unit_cell for real "
487 <<
"point [ " << p <<
" ] " << std::endl;
504 polynomials_1d, points, p_unit, polynomials_1d.size() == 2, renumber);
513 f.
norm_square() - 1e-24 * p_real.second[0].norm_square()) ==
551 const double eps = 1.e-11;
552 const unsigned int newton_iteration_limit = 20;
555 invalid_point[0] = std::numeric_limits<double>::infinity();
556 bool tried_project_to_unit_cell =
false;
558 unsigned int newton_iteration = 0;
559 Number f_weighted_norm_square = 1.;
560 Number last_f_weighted_norm_square = 1.;
564 if (print_iterations_to_deallog)
565 deallog <<
"Newton iteration " << newton_iteration
566 <<
" for unit point guess " << p_unit << std::endl;
570 for (
unsigned int d = 0; d < spacedim; ++d)
571 for (
unsigned int e = 0; e < dim; ++e)
572 df[d][e] = p_real.second[e][d];
576 Number(std::numeric_limits<double>::min())) ==
577 Number(std::numeric_limits<double>::min())))
585 if (tried_project_to_unit_cell ==
false)
592 polynomials_1d.size() == 2,
594 f = p_real.first - p;
595 f_weighted_norm_square = 1.;
596 last_f_weighted_norm_square = 1;
597 tried_project_to_unit_cell =
true;
601 return invalid_point;
609 if (print_iterations_to_deallog)
610 deallog <<
" delta=" << delta << std::endl;
613 double step_length = 1.0;
621 for (
unsigned int i = 0; i < dim; ++i)
622 p_unit_trial[i] -= step_length * delta[i];
625 const auto p_real_trial =
630 polynomials_1d.size() == 2,
633 p_real_trial.first - p;
634 f_weighted_norm_square = (df_inverse * f_trial).norm_square();
636 if (print_iterations_to_deallog)
638 deallog <<
" step_length=" << step_length << std::endl;
639 if (step_length == 1.0)
640 deallog <<
" ||f || =" << f.norm() << std::endl;
641 deallog <<
" ||f*|| =" << f_trial.
norm() << std::endl
643 <<
std::sqrt(f_weighted_norm_square) << std::endl;
663 if (
std::max(f_weighted_norm_square - 1e-6 * 1e-6, Number(0.)) *
668 p_real = p_real_trial;
669 p_unit = p_unit_trial;
673 else if (step_length > 0.05)
684 if (step_length <= 0.05 && tried_project_to_unit_cell ==
false)
691 polynomials_1d.size() == 2,
693 f = p_real.first - p;
694 f_weighted_norm_square = 1.;
695 last_f_weighted_norm_square = 1;
696 tried_project_to_unit_cell =
true;
699 else if (step_length <= 0.05)
700 return invalid_point;
703 if (newton_iteration > newton_iteration_limit)
704 return invalid_point;
712 !(
std::max(f_weighted_norm_square - eps * eps, Number(0.)) *
713 std::max(last_f_weighted_norm_square -
714 std::min(f_weighted_norm_square, Number(1e-6 * 1e-6)) *
719 if (print_iterations_to_deallog)
720 deallog <<
"Iteration converged for p_unit = [ " << p_unit
721 <<
" ] and iteration error "
722 <<
std::sqrt(f_weighted_norm_square) << std::endl;
739 const std::vector<unsigned int> &renumber)
741 const unsigned int spacedim = dim + 1;
748 const double eps = 1.e-12;
749 const unsigned int loop_limit = 10;
751 unsigned int loop = 0;
752 double f_weighted_norm_square = 1.;
754 while (f_weighted_norm_square > eps * eps && loop++ < loop_limit)
761 polynomials_1d.size() == 2,
767 polynomials_1d, points, p_unit, renumber);
770 for (
unsigned int j = 0; j < dim; ++j)
772 f[j] = DF[j] * p_minus_F;
773 for (
unsigned int l = 0; l < dim; ++l)
774 df[j][l] = -DF[j] * DF[l] +
hessian[j][l] * p_minus_F;
780 f_weighted_norm_square = d.norm_square();
814 template <
int dim,
int spacedim>
815 class InverseQuadraticApproximation
822 (spacedim == 1 ? 3 : (spacedim == 2 ? 6 : 10));
840 1. / real_support_points[0].distance(real_support_points[1]))
853 Assert(dim == spacedim || real_support_points.size() ==
861 affine.first.covariant_form().transpose();
868 for (
unsigned int d = 0; d < spacedim; ++d)
869 for (
unsigned int e = 0; e < dim; ++e)
877 std::array<double, n_functions> shape_values;
883 shape_values[0] = 1.;
887 for (
unsigned int d = 0; d < spacedim; ++d)
888 shape_values[1 + d] = p_scaled[d];
889 for (
unsigned int d = 0, c = 0; d < spacedim; ++d)
890 for (
unsigned int e = 0; e <= d; ++e, ++c)
891 shape_values[1 + spacedim + c] = p_scaled[d] * p_scaled[e];
900 matrix[i][j] += shape_values[i] * shape_values[j];
913 for (
unsigned int j = 0; j < i; ++j)
915 double Lik_Ljk_sum = 0;
916 for (
unsigned int k = 0; k < j; ++k)
917 Lik_Ljk_sum += matrix[i][k] * matrix[j][k];
918 matrix[i][j] = matrix[j][j] * (matrix[i][j] - Lik_Ljk_sum);
919 Lij_sum += matrix[i][j] * matrix[i][j];
922 ExcMessage(
"Matrix of normal equations not positive "
928 matrix[i][i] = 1. /
std::sqrt(matrix[i][i] - Lij_sum);
935 for (
unsigned int j = 0; j < i; ++j)
953 for (
unsigned int i = dim + 1; i <
n_functions; ++i)
970 template <
typename Number>
975 for (
unsigned int d = 0; d < dim; ++d)
983 for (
unsigned int d = 0; d < spacedim; ++d)
986 for (
unsigned int d = 0; d < spacedim; ++d)
992 for (
unsigned int d = 0, c = 0; d < spacedim; ++d)
993 for (
unsigned int e = 0; e <= d; ++e, ++c)
995 coefficients[1 + spacedim + c] * (p_scaled[d] * p_scaled[e]);
1006 const Number affine_distance_to_unit_cell =
1009 for (
unsigned int d = 0; d < dim; ++d)
1011 distance_to_unit_cell,
1012 affine_distance_to_unit_cell + 0.5,
1054 template <
int dim,
int spacedim>
1058 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1064 const UpdateFlags update_flags = data.update_each;
1066 using VectorizedArrayType =
1067 typename ::MappingQ<dim,
1068 spacedim>::InternalData::VectorizedArrayType;
1069 const unsigned int n_shape_values = data.n_shape_functions;
1070 const unsigned int n_q_points = data.shape_info.n_q_points;
1071 constexpr unsigned int n_lanes = VectorizedArrayType::size();
1072 constexpr unsigned int n_comp = 1 + (spacedim - 1) / n_lanes;
1073 constexpr unsigned int n_hessians = (dim * (dim + 1)) / 2;
1080 jacobians.resize(n_q_points);
1082 inverse_jacobians.resize(n_q_points);
1099 n_q_points == quadrature_points.size(),
1102 data.n_shape_functions > 0,
1105 n_q_points == jacobian_grads.size(),
1111 data.shape_info.element_type ==
1114 for (
unsigned int q = 0; q < n_q_points; ++q)
1115 quadrature_points[q] =
1116 data.mapping_support_points[data.shape_info
1117 .lexicographic_numbering[q]];
1130 for (
unsigned int i = 0; i < n_shape_values * n_comp; ++i)
1133 const std::vector<unsigned int> &renumber_to_lexicographic =
1134 data.shape_info.lexicographic_numbering;
1135 for (
unsigned int i = 0; i < n_shape_values; ++i)
1136 for (
unsigned int d = 0; d < spacedim; ++d)
1138 const unsigned int in_comp = d % n_lanes;
1139 const unsigned int out_comp = d / n_lanes;
1142 data.mapping_support_points[renumber_to_lexicographic[i]][d];
1153 for (
unsigned int out_comp = 0; out_comp < n_comp; ++out_comp)
1154 for (
unsigned int i = 0; i < n_q_points; ++i)
1155 for (
unsigned int in_comp = 0;
1156 in_comp < n_lanes && in_comp < spacedim - out_comp * n_lanes;
1158 quadrature_points[i][out_comp * n_lanes + in_comp] =
1159 eval.
begin_values()[out_comp * n_q_points + i][in_comp];
1165 for (
unsigned int out_comp = 0; out_comp < n_comp; ++out_comp)
1166 for (
unsigned int point = 0; point < n_q_points; ++point)
1167 for (
unsigned int in_comp = 0;
1168 in_comp < n_lanes && in_comp < spacedim - out_comp * n_lanes;
1170 for (
unsigned int j = 0; j < dim; ++j)
1172 jacobians[point][out_comp * n_lanes + in_comp][j] =
1181 for (
unsigned int point = 0; point < n_q_points; ++point)
1182 data.volume_elements[point] = jacobians[point].determinant();
1190 for (
unsigned int point = 0; point < n_q_points; ++point)
1191 inverse_jacobians[point] =
1192 jacobians[point].covariant_form().transpose();
1197 constexpr int desymmetrize_3d[6][2] = {
1198 {0, 0}, {1, 1}, {2, 2}, {0, 1}, {0, 2}, {1, 2}};
1199 constexpr int desymmetrize_2d[3][2] = {{0, 0}, {1, 1}, {0, 1}};
1202 for (
unsigned int out_comp = 0; out_comp < n_comp; ++out_comp)
1203 for (
unsigned int point = 0; point < n_q_points; ++point)
1204 for (
unsigned int j = 0; j < n_hessians; ++j)
1205 for (
unsigned int in_comp = 0;
1206 in_comp < n_lanes &&
1207 in_comp < spacedim - out_comp * n_lanes;
1210 const unsigned int total_number = point * n_hessians + j;
1211 const unsigned int new_point = total_number % n_q_points;
1212 const unsigned int new_hessian_comp =
1213 total_number / n_q_points;
1214 const unsigned int new_hessian_comp_i =
1215 dim == 2 ? desymmetrize_2d[new_hessian_comp][0] :
1216 desymmetrize_3d[new_hessian_comp][0];
1217 const unsigned int new_hessian_comp_j =
1218 dim == 2 ? desymmetrize_2d[new_hessian_comp][1] :
1219 desymmetrize_3d[new_hessian_comp][1];
1220 const double value =
1224 jacobian_grads[new_point][out_comp * n_lanes + in_comp]
1225 [new_hessian_comp_i][new_hessian_comp_j] =
1227 jacobian_grads[new_point][out_comp * n_lanes + in_comp]
1228 [new_hessian_comp_j][new_hessian_comp_i] =
1236 template <
int dim,
int spacedim>
1240 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1243 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1248 const UpdateFlags update_flags = data.update_each;
1250 data.mapping_support_points);
1252 const unsigned int n_points = unit_points.size();
1260 jacobians.resize(n_points);
1262 inverse_jacobians.resize(n_points);
1264 const bool is_translation =
1267 const bool needs_gradient =
1275 for (
unsigned int i = 0; i < n_points; i += n_lanes)
1276 if (n_points - i > 1)
1279 for (
unsigned int j = 0; j < n_lanes; ++j)
1280 if (i + j < n_points)
1281 for (
unsigned int d = 0; d < dim; ++d)
1282 p_vec[d][j] = unit_points[i + j][d];
1284 for (
unsigned int d = 0; d < dim; ++d)
1285 p_vec[d][j] = unit_points[i][d];
1297 polynomials_1d.size() == 2,
1298 renumber_lexicographic_to_hierarchic);
1300 value = result.first;
1302 for (
unsigned int d = 0; d < spacedim; ++d)
1303 for (
unsigned int e = 0; e < dim; ++e)
1304 derivative[d][e] = result.second[e][d];
1311 polynomials_1d.size() == 2,
1312 renumber_lexicographic_to_hierarchic);
1315 for (
unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
1316 for (
unsigned int d = 0; d < spacedim; ++d)
1317 quadrature_points[i + j][d] =
value[d][j];
1323 for (
unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
1324 for (
unsigned int d = 0; d < spacedim; ++d)
1325 for (
unsigned int e = 0; e < dim; ++e)
1326 jacobians[i + j][d][e] = derivative[d][e][j];
1331 for (
unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
1338 for (
unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
1339 for (
unsigned int d = 0; d < dim; ++d)
1340 for (
unsigned int e = 0; e < spacedim; ++e)
1341 inverse_jacobians[i + j][d][e] = covariant[e][d][j];
1355 polynomials_1d.
size() == 2,
1356 renumber_lexicographic_to_hierarchic);
1358 value = result.first;
1360 for (
unsigned int d = 0; d < spacedim; ++d)
1361 for (
unsigned int e = 0; e < dim; ++e)
1362 derivative[d][e] = result.second[e][d];
1369 polynomials_1d.
size() == 2,
1370 renumber_lexicographic_to_hierarchic);
1373 quadrature_points[i] =
value;
1379 data.volume_elements[i] = derivative.
determinant();
1382 jacobians[i] = derivative;
1397 template <
int dim,
int spacedim>
1401 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1404 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1410 data.mapping_support_points);
1411 const unsigned int n_q_points = jacobian_grads.size();
1414 for (
unsigned int point = 0; point < n_q_points; ++point)
1421 renumber_lexicographic_to_hierarchic);
1423 for (
unsigned int i = 0; i < spacedim; ++i)
1424 for (
unsigned int j = 0; j < dim; ++j)
1425 for (
unsigned int l = 0; l < dim; ++l)
1426 jacobian_grads[point][i][j][l] =
second[j][l][i];
1439 template <
int dim,
int spacedim>
1443 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1446 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1452 data.mapping_support_points);
1453 const unsigned int n_q_points = jacobian_pushed_forward_grads.size();
1457 double tmp[spacedim][spacedim][spacedim];
1458 for (
unsigned int point = 0; point < n_q_points; ++point)
1465 renumber_lexicographic_to_hierarchic);
1467 data.output_data->inverse_jacobians[point].
transpose();
1470 for (
unsigned int i = 0; i < spacedim; ++i)
1471 for (
unsigned int j = 0; j < spacedim; ++j)
1472 for (
unsigned int l = 0; l < dim; ++l)
1474 tmp[i][j][l] =
second[0][l][i] * covariant[j][0];
1475 for (
unsigned int jr = 1; jr < dim; ++jr)
1478 second[jr][l][i] * covariant[j][jr];
1483 for (
unsigned int i = 0; i < spacedim; ++i)
1484 for (
unsigned int j = 0; j < spacedim; ++j)
1485 for (
unsigned int l = 0; l < spacedim; ++l)
1487 jacobian_pushed_forward_grads[point][i][j][l] =
1488 tmp[i][j][0] * covariant[l][0];
1489 for (
unsigned int lr = 1; lr < dim; ++lr)
1491 jacobian_pushed_forward_grads[point][i][j][l] +=
1492 tmp[i][j][lr] * covariant[l][lr];
1502 template <
int dim,
int spacedim,
int length_tensor>
1509 for (
unsigned int i = 0; i < spacedim; ++i)
1512 result[i][0][0][0] = compressed[0][i];
1515 for (
unsigned int d = 0; d < 2; ++d)
1516 for (
unsigned int e = 0; e < 2; ++e)
1517 for (
unsigned int f = 0; f < 2; ++f)
1518 result[i][d][e][f] = compressed[d + e + f][i];
1526 for (
unsigned int d = 0; d < 2; ++d)
1527 for (
unsigned int e = 0; e < 2; ++e)
1529 result[i][d][e][2] = compressed[4 + d + e][i];
1530 result[i][d][2][e] = compressed[4 + d + e][i];
1531 result[i][2][d][e] = compressed[4 + d + e][i];
1533 for (
unsigned int d = 0; d < 2; ++d)
1535 result[i][d][2][2] = compressed[7 + d][i];
1536 result[i][2][d][2] = compressed[7 + d][i];
1537 result[i][2][2][d] = compressed[7 + d][i];
1539 result[i][2][2][2] = compressed[9][i];
1554 template <
int dim,
int spacedim>
1558 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1561 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1567 data.mapping_support_points);
1568 const unsigned int n_q_points = jacobian_2nd_derivatives.size();
1572 for (
unsigned int point = 0; point < n_q_points; ++point)
1579 renumber_lexicographic_to_hierarchic));
1594 template <
int dim,
int spacedim>
1598 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1601 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1607 data.mapping_support_points);
1608 const unsigned int n_q_points =
1609 jacobian_pushed_forward_2nd_derivatives.size();
1615 for (
unsigned int point = 0; point < n_q_points; ++point)
1623 renumber_lexicographic_to_hierarchic));
1625 data.output_data->inverse_jacobians[point].
transpose();
1628 for (
unsigned int i = 0; i < spacedim; ++i)
1629 for (
unsigned int j = 0; j < spacedim; ++j)
1630 for (
unsigned int l = 0; l < dim; ++l)
1631 for (
unsigned int m = 0; m < dim; ++m)
1634 third[i][0][l][m] * covariant[j][0];
1635 for (
unsigned int jr = 1; jr < dim; ++jr)
1637 third[i][jr][l][m] * covariant[j][jr];
1641 for (
unsigned int i = 0; i < spacedim; ++i)
1642 for (
unsigned int j = 0; j < spacedim; ++j)
1643 for (
unsigned int l = 0; l < spacedim; ++l)
1644 for (
unsigned int m = 0; m < dim; ++m)
1647 tmp[i][j][0][m] * covariant[l][0];
1648 for (
unsigned int lr = 1; lr < dim; ++lr)
1650 tmp[i][j][lr][m] * covariant[l][lr];
1654 for (
unsigned int i = 0; i < spacedim; ++i)
1655 for (
unsigned int j = 0; j < spacedim; ++j)
1656 for (
unsigned int l = 0; l < spacedim; ++l)
1657 for (
unsigned int m = 0; m < spacedim; ++m)
1659 jacobian_pushed_forward_2nd_derivatives
1660 [point][i][j][l][m] =
1661 tmp2[i][j][l][0] * covariant[m][0];
1662 for (
unsigned int mr = 1; mr < dim; ++mr)
1663 jacobian_pushed_forward_2nd_derivatives[point][i]
1666 tmp2[i][j][l][mr] * covariant[m][mr];
1675 template <
int dim,
int spacedim,
int length_tensor>
1682 for (
unsigned int i = 0; i < spacedim; ++i)
1685 result[i][0][0][0][0] = compressed[0][i];
1688 for (
unsigned int d = 0; d < 2; ++d)
1689 for (
unsigned int e = 0; e < 2; ++e)
1690 for (
unsigned int f = 0; f < 2; ++f)
1691 for (
unsigned int g = 0; g < 2; ++g)
1692 result[i][d][e][f][g] = compressed[d + e + f + g][i];
1700 for (
unsigned int d = 0; d < 2; ++d)
1701 for (
unsigned int e = 0; e < 2; ++e)
1702 for (
unsigned int f = 0; f < 2; ++f)
1704 result[i][d][e][f][2] = compressed[5 + d + e + f][i];
1705 result[i][d][e][2][f] = compressed[5 + d + e + f][i];
1706 result[i][d][2][e][f] = compressed[5 + d + e + f][i];
1707 result[i][2][d][e][f] = compressed[5 + d + e + f][i];
1709 for (
unsigned int d = 0; d < 2; ++d)
1710 for (
unsigned int e = 0; e < 2; ++e)
1712 result[i][d][e][2][2] = compressed[9 + d + e][i];
1713 result[i][d][2][e][2] = compressed[9 + d + e][i];
1714 result[i][d][2][2][e] = compressed[9 + d + e][i];
1715 result[i][2][d][e][2] = compressed[9 + d + e][i];
1716 result[i][2][d][2][e] = compressed[9 + d + e][i];
1717 result[i][2][2][d][e] = compressed[9 + d + e][i];
1719 for (
unsigned int d = 0; d < 2; ++d)
1721 result[i][d][2][2][2] = compressed[12 + d][i];
1722 result[i][2][d][2][2] = compressed[12 + d][i];
1723 result[i][2][2][d][2] = compressed[12 + d][i];
1724 result[i][2][2][2][d] = compressed[12 + d][i];
1726 result[i][2][2][2][2] = compressed[14][i];
1741 template <
int dim,
int spacedim>
1745 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1748 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1754 data.mapping_support_points);
1755 const unsigned int n_q_points = jacobian_3rd_derivatives.size();
1759 for (
unsigned int point = 0; point < n_q_points; ++point)
1766 renumber_lexicographic_to_hierarchic));
1781 template <
int dim,
int spacedim>
1785 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1788 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1794 data.mapping_support_points);
1795 const unsigned int n_q_points =
1796 jacobian_pushed_forward_3rd_derivatives.size();
1801 ndarray<double, spacedim, spacedim, spacedim, spacedim, dim>
1805 for (
unsigned int point = 0; point < n_q_points; ++point)
1813 renumber_lexicographic_to_hierarchic));
1816 data.output_data->inverse_jacobians[point].
transpose();
1819 for (
unsigned int i = 0; i < spacedim; ++i)
1820 for (
unsigned int j = 0; j < spacedim; ++j)
1821 for (
unsigned int l = 0; l < dim; ++l)
1822 for (
unsigned int m = 0; m < dim; ++m)
1823 for (
unsigned int n = 0; n < dim; ++n)
1825 tmp[i][j][l][m][n] =
1826 fourth[i][0][l][m][n] * covariant[j][0];
1827 for (
unsigned int jr = 1; jr < dim; ++jr)
1828 tmp[i][j][l][m][n] +=
1829 fourth[i][jr][l][m][n] * covariant[j][jr];
1833 for (
unsigned int i = 0; i < spacedim; ++i)
1834 for (
unsigned int j = 0; j < spacedim; ++j)
1835 for (
unsigned int l = 0; l < spacedim; ++l)
1836 for (
unsigned int m = 0; m < dim; ++m)
1837 for (
unsigned int n = 0; n < dim; ++n)
1839 tmp2[i][j][l][m][n] =
1840 tmp[i][j][0][m][n] * covariant[l][0];
1841 for (
unsigned int lr = 1; lr < dim; ++lr)
1842 tmp2[i][j][l][m][n] +=
1843 tmp[i][j][lr][m][n] * covariant[l][lr];
1847 for (
unsigned int i = 0; i < spacedim; ++i)
1848 for (
unsigned int j = 0; j < spacedim; ++j)
1849 for (
unsigned int l = 0; l < spacedim; ++l)
1850 for (
unsigned int m = 0; m < spacedim; ++m)
1851 for (
unsigned int n = 0; n < dim; ++n)
1853 tmp[i][j][l][m][n] =
1854 tmp2[i][j][l][0][n] * covariant[m][0];
1855 for (
unsigned int mr = 1; mr < dim; ++mr)
1856 tmp[i][j][l][m][n] +=
1857 tmp2[i][j][l][mr][n] * covariant[m][mr];
1861 for (
unsigned int i = 0; i < spacedim; ++i)
1862 for (
unsigned int j = 0; j < spacedim; ++j)
1863 for (
unsigned int l = 0; l < spacedim; ++l)
1864 for (
unsigned int m = 0; m < spacedim; ++m)
1865 for (
unsigned int n = 0; n < spacedim; ++n)
1867 jacobian_pushed_forward_3rd_derivatives
1868 [point][i][j][l][m][n] =
1869 tmp[i][j][l][m][0] * covariant[n][0];
1870 for (
unsigned int nr = 1; nr < dim; ++nr)
1871 jacobian_pushed_forward_3rd_derivatives[point]
1874 tmp[i][j][l][m][nr] * covariant[n][nr];
1892 template <
int dim,
int spacedim>
1895 const ::MappingQ<dim, spacedim> &mapping,
1896 const typename ::Triangulation<dim, spacedim>::cell_iterator &cell,
1897 const unsigned int face_no,
1898 const unsigned int subface_no,
1899 const unsigned int n_q_points,
1900 const std::vector<double> &weights,
1901 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1905 const UpdateFlags update_flags = data.update_each;
1925 for (
unsigned int d = 0; d != dim - 1; ++d)
1927 const unsigned int vector_index =
1929 Assert(vector_index < data.unit_tangentials.size(),
1931 Assert(data.aux[d].size() <=
1932 data.unit_tangentials[vector_index].size(),
1935 data.unit_tangentials[vector_index]),
1945 if (dim == spacedim)
1947 for (
unsigned int i = 0; i < n_q_points; ++i)
1957 (face_no == 0 ? -1 : +1);
1961 cross_product_2d(data.aux[0][i]);
1965 cross_product_3d(data.aux[0][i], data.aux[1][i]);
1982 for (
unsigned int point = 0; point < n_q_points; ++point)
1985 data.output_data->jacobians[point];
1992 (face_no == 0 ? -1. : +1.) *
2002 cross_product_3d(DX_t[0], DX_t[1]);
2003 cell_normal /= cell_normal.
norm();
2008 cross_product_3d(data.aux[0][point], cell_normal);
2015 for (
unsigned int i = 0; i < output_data.
boundary_forms.size(); ++i)
2023 cell->subface_case(face_no), subface_no);
2029 for (
unsigned int i = 0; i < output_data.
normal_vectors.size(); ++i)
2044 template <
int dim,
int spacedim>
2047 const ::MappingQ<dim, spacedim> &mapping,
2048 const typename ::Triangulation<dim, spacedim>::cell_iterator &cell,
2049 const unsigned int face_no,
2050 const unsigned int subface_no,
2053 const typename ::MappingQ<dim, spacedim>::InternalData &data,
2055 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
2060 &data.quadrature_points[data_set], quadrature.
size());
2061 if (dim > 1 && data.tensor_product_quadrature)
2079 renumber_lexicographic_to_hierarchic,
2088 renumber_lexicographic_to_hierarchic,
2096 renumber_lexicographic_to_hierarchic,
2103 renumber_lexicographic_to_hierarchic,
2110 renumber_lexicographic_to_hierarchic,
2117 renumber_lexicographic_to_hierarchic,
2124 renumber_lexicographic_to_hierarchic,
2142 template <
int dim,
int spacedim,
int rank>
2152 const typename ::MappingQ<dim, spacedim>::InternalData *
>(
2153 &mapping_data) !=
nullptr),
2155 const typename ::MappingQ<dim, spacedim>::InternalData &data =
2157 const typename ::MappingQ<dim, spacedim>::InternalData &
>(
2160 switch (mapping_kind)
2166 "update_contravariant_transformation"));
2168 for (
unsigned int i = 0; i < output.size(); ++i)
2179 "update_contravariant_transformation"));
2182 "update_volume_elements"));
2187 for (
unsigned int i = 0; i < output.size(); ++i)
2192 output[i] /= data.volume_elements[i];
2203 "update_covariant_transformation"));
2205 for (
unsigned int i = 0; i < output.size(); ++i)
2207 data.output_data->inverse_jacobians[i].transpose(), input[i]);
2222 template <
int dim,
int spacedim,
int rank>
2232 const typename ::MappingQ<dim, spacedim>::InternalData *
>(
2233 &mapping_data) !=
nullptr),
2235 const typename ::MappingQ<dim, spacedim>::InternalData &data =
2237 const typename ::MappingQ<dim, spacedim>::InternalData &
>(
2240 switch (mapping_kind)
2246 "update_covariant_transformation"));
2249 "update_contravariant_transformation"));
2252 for (
unsigned int i = 0; i < output.size(); ++i)
2258 data.output_data->inverse_jacobians[i].transpose(),
2269 "update_covariant_transformation"));
2272 for (
unsigned int i = 0; i < output.size(); ++i)
2275 data.output_data->inverse_jacobians[i].
transpose();
2288 "update_covariant_transformation"));
2291 "update_contravariant_transformation"));
2294 "update_volume_elements"));
2297 for (
unsigned int i = 0; i < output.size(); ++i)
2300 data.output_data->inverse_jacobians[i].
transpose();
2308 output[i] /= data.volume_elements[i];
2324 template <
int dim,
int spacedim>
2334 const typename ::MappingQ<dim, spacedim>::InternalData *
>(
2335 &mapping_data) !=
nullptr),
2337 const typename ::MappingQ<dim, spacedim>::InternalData &data =
2339 const typename ::MappingQ<dim, spacedim>::InternalData &
>(
2342 switch (mapping_kind)
2348 "update_covariant_transformation"));
2351 "update_contravariant_transformation"));
2353 for (
unsigned int q = 0; q < output.size(); ++q)
2356 data.output_data->inverse_jacobians[q].
transpose();
2358 data.output_data->jacobians[q];
2360 for (
unsigned int i = 0; i < spacedim; ++i)
2362 double tmp1[dim][dim];
2363 for (
unsigned int J = 0; J < dim; ++J)
2364 for (
unsigned int K = 0; K < dim; ++K)
2367 contravariant[i][0] * input[q][0][J][K];
2368 for (
unsigned int I = 1; I < dim; ++I)
2370 contravariant[i][I] * input[q][I][J][K];
2372 for (
unsigned int j = 0; j < spacedim; ++j)
2375 for (
unsigned int K = 0; K < dim; ++K)
2377 tmp2[K] = covariant[j][0] * tmp1[0][K];
2378 for (
unsigned int J = 1; J < dim; ++J)
2379 tmp2[K] += covariant[j][J] * tmp1[J][K];
2381 for (
unsigned int k = 0; k < spacedim; ++k)
2383 output[q][i][j][k] = covariant[k][0] * tmp2[0];
2384 for (
unsigned int K = 1; K < dim; ++K)
2385 output[q][i][j][k] += covariant[k][K] * tmp2[K];
2397 "update_covariant_transformation"));
2399 for (
unsigned int q = 0; q < output.size(); ++q)
2402 data.output_data->inverse_jacobians[q].
transpose();
2404 for (
unsigned int i = 0; i < spacedim; ++i)
2406 double tmp1[dim][dim];
2407 for (
unsigned int J = 0; J < dim; ++J)
2408 for (
unsigned int K = 0; K < dim; ++K)
2410 tmp1[J][K] = covariant[i][0] * input[q][0][J][K];
2411 for (
unsigned int I = 1; I < dim; ++I)
2412 tmp1[J][K] += covariant[i][I] * input[q][I][J][K];
2414 for (
unsigned int j = 0; j < spacedim; ++j)
2417 for (
unsigned int K = 0; K < dim; ++K)
2419 tmp2[K] = covariant[j][0] * tmp1[0][K];
2420 for (
unsigned int J = 1; J < dim; ++J)
2421 tmp2[K] += covariant[j][J] * tmp1[J][K];
2423 for (
unsigned int k = 0; k < spacedim; ++k)
2425 output[q][i][j][k] = covariant[k][0] * tmp2[0];
2426 for (
unsigned int K = 1; K < dim; ++K)
2427 output[q][i][j][k] += covariant[k][K] * tmp2[K];
2440 "update_covariant_transformation"));
2443 "update_contravariant_transformation"));
2446 "update_volume_elements"));
2448 for (
unsigned int q = 0; q < output.size(); ++q)
2451 data.output_data->inverse_jacobians[q].
transpose();
2453 data.output_data->jacobians[q];
2454 for (
unsigned int i = 0; i < spacedim; ++i)
2457 for (
unsigned int I = 0; I < dim; ++I)
2459 contravariant[i][I] * (1. / data.volume_elements[q]);
2460 double tmp1[dim][dim];
2461 for (
unsigned int J = 0; J < dim; ++J)
2462 for (
unsigned int K = 0; K < dim; ++K)
2464 tmp1[J][K] = factor[0] * input[q][0][J][K];
2465 for (
unsigned int I = 1; I < dim; ++I)
2466 tmp1[J][K] += factor[I] * input[q][I][J][K];
2468 for (
unsigned int j = 0; j < spacedim; ++j)
2471 for (
unsigned int K = 0; K < dim; ++K)
2473 tmp2[K] = covariant[j][0] * tmp1[0][K];
2474 for (
unsigned int J = 1; J < dim; ++J)
2475 tmp2[K] += covariant[j][J] * tmp1[J][K];
2477 for (
unsigned int k = 0; k < spacedim; ++k)
2479 output[q][i][j][k] = covariant[k][0] * tmp2[0];
2480 for (
unsigned int K = 1; K < dim; ++K)
2481 output[q][i][j][k] += covariant[k][K] * tmp2[K];
2501 template <
int dim,
int spacedim,
int rank>
2511 const typename ::MappingQ<dim, spacedim>::InternalData *
>(
2512 &mapping_data) !=
nullptr),
2514 const typename ::MappingQ<dim, spacedim>::InternalData &data =
2516 const typename ::MappingQ<dim, spacedim>::InternalData &
>(
2519 switch (mapping_kind)
2525 "update_covariant_transformation"));
2527 for (
unsigned int i = 0; i < output.size(); ++i)
2529 data.output_data->inverse_jacobians[i].transpose(), input[i]);
ArrayView< std::remove_reference_t< typename std::iterator_traits< Iterator >::reference >, MemorySpaceType > make_array_view(const Iterator begin, const Iterator end)
void set_data_pointers(AlignedVector< Number > *scratch_data, const unsigned int n_components)
const Number * begin_gradients() const
const Number * begin_values() const
const Number * begin_dof_values() const
const Number * begin_hessians() const
Abstract base class for mapping classes.
constexpr numbers::NumberTraits< Number >::real_type distance_square(const Point< dim, Number > &p) const
const std::vector< double > & get_weights() const
unsigned int size() const
numbers::NumberTraits< Number >::real_type norm() const
constexpr numbers::NumberTraits< Number >::real_type norm_square() const
static constexpr std::size_t size()
const double normalization_length
Point< dim, Number > compute(const Point< spacedim, Number > &p) const
InverseQuadraticApproximation(const ArrayView< const Point< spacedim > > &real_support_points, const std::vector< Point< dim > > &unit_support_points)
static constexpr unsigned int n_functions
const Point< spacedim > normalization_shift
std::array< Point< dim >, n_functions > coefficients
InverseQuadraticApproximation(const InverseQuadraticApproximation &)=default
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
#define AssertDimension(dim1, dim2)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
@ update_jacobian_pushed_forward_2nd_derivatives
@ update_volume_elements
Determinant of the Jacobian.
@ update_contravariant_transformation
Contravariant transformation.
@ update_jacobian_pushed_forward_grads
@ update_jacobian_3rd_derivatives
@ update_jacobian_grads
Gradient of volume element.
@ update_normal_vectors
Normal vectors.
@ update_JxW_values
Transformed quadrature weights.
@ update_covariant_transformation
Covariant transformation.
@ update_quadrature_points
Transformed quadrature points.
@ update_jacobian_pushed_forward_3rd_derivatives
@ update_boundary_forms
Outer normal vector, not normalized.
@ update_jacobian_2nd_derivatives
@ mapping_covariant_gradient
@ mapping_contravariant_hessian
@ mapping_covariant_hessian
@ mapping_contravariant_gradient
@ tensor_symmetric_collocation
#define DEAL_II_ASSERT_UNREACHABLE()
#define DEAL_II_NOT_IMPLEMENTED()
EvaluationFlags
The EvaluationFlags enum.
constexpr T fixed_power(const T t)
constexpr T pow(const T base, const int iexp)
Point< 1 > transform_real_to_unit_cell(const std::array< Point< spacedim >, GeometryInfo< 1 >::vertices_per_cell > &vertices, const Point< spacedim > &p)
void maybe_update_jacobian_pushed_forward_2nd_derivatives(const CellSimilarity::Similarity cell_similarity, const typename ::MappingQ< dim, spacedim >::InternalData &data, const ArrayView< const Point< dim > > &unit_points, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber_lexicographic_to_hierarchic, std::vector< Tensor< 4, spacedim > > &jacobian_pushed_forward_2nd_derivatives)
Point< dim, Number > do_transform_real_to_unit_cell_internal(const Point< spacedim, Number > &p, const Point< dim, Number > &initial_p_unit, const ArrayView< const Point< spacedim > > &points, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber, const bool print_iterations_to_deallog=false)
DerivativeForm< 3, dim, spacedim > expand_3rd_derivatives(const Tensor< 1, length_tensor, Tensor< 1, spacedim > > &compressed)
inline ::Table< 2, double > compute_support_point_weights_cell(const unsigned int polynomial_degree)
void transform_differential_forms(const ArrayView< const DerivativeForm< rank, dim, spacedim > > &input, const MappingKind mapping_kind, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_data, const ArrayView< Tensor< rank+1, spacedim > > &output)
void maybe_update_jacobian_grads(const CellSimilarity::Similarity cell_similarity, const typename ::MappingQ< dim, spacedim >::InternalData &data, const ArrayView< const Point< dim > > &unit_points, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber_lexicographic_to_hierarchic, std::vector< DerivativeForm< 2, dim, spacedim > > &jacobian_grads)
void do_fill_fe_face_values(const ::MappingQ< dim, spacedim > &mapping, const typename ::Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int subface_no, const typename QProjector< dim >::DataSetDescriptor data_set, const Quadrature< dim - 1 > &quadrature, const typename ::MappingQ< dim, spacedim >::InternalData &data, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber_lexicographic_to_hierarchic, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data)
inline ::Table< 2, double > compute_support_point_weights_on_hex(const unsigned int polynomial_degree)
void transform_fields(const ArrayView< const Tensor< rank, dim > > &input, const MappingKind mapping_kind, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_data, const ArrayView< Tensor< rank, spacedim > > &output)
void maybe_update_jacobian_3rd_derivatives(const CellSimilarity::Similarity cell_similarity, const typename ::MappingQ< dim, spacedim >::InternalData &data, const ArrayView< const Point< dim > > &unit_points, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber_lexicographic_to_hierarchic, std::vector< DerivativeForm< 4, dim, spacedim > > &jacobian_3rd_derivatives)
void maybe_update_jacobian_pushed_forward_grads(const CellSimilarity::Similarity cell_similarity, const typename ::MappingQ< dim, spacedim >::InternalData &data, const ArrayView< const Point< dim > > &unit_points, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber_lexicographic_to_hierarchic, std::vector< Tensor< 3, spacedim > > &jacobian_pushed_forward_grads)
inline ::Table< 2, double > compute_support_point_weights_on_quad(const unsigned int polynomial_degree)
void maybe_update_q_points_Jacobians_generic(const CellSimilarity::Similarity cell_similarity, const typename ::MappingQ< dim, spacedim >::InternalData &data, const ArrayView< const Point< dim > > &unit_points, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber_lexicographic_to_hierarchic, std::vector< Point< spacedim > > &quadrature_points, std::vector< DerivativeForm< 1, dim, spacedim > > &jacobians, std::vector< DerivativeForm< 1, spacedim, dim > > &inverse_jacobians)
std::vector< Point< dim > > unit_support_points(const std::vector< Point< 1 > > &line_support_points, const std::vector< unsigned int > &renumbering)
void transform_gradients(const ArrayView< const Tensor< rank, dim > > &input, const MappingKind mapping_kind, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_data, const ArrayView< Tensor< rank, spacedim > > &output)
void maybe_update_q_points_Jacobians_and_grads_tensor(const CellSimilarity::Similarity cell_similarity, const typename ::MappingQ< dim, spacedim >::InternalData &data, std::vector< Point< spacedim > > &quadrature_points, std::vector< DerivativeForm< 1, dim, spacedim > > &jacobians, std::vector< DerivativeForm< 1, spacedim, dim > > &inverse_jacobians, std::vector< DerivativeForm< 2, dim, spacedim > > &jacobian_grads)
void transform_hessians(const ArrayView< const Tensor< 3, dim > > &input, const MappingKind mapping_kind, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_data, const ArrayView< Tensor< 3, spacedim > > &output)
void maybe_update_jacobian_pushed_forward_3rd_derivatives(const CellSimilarity::Similarity cell_similarity, const typename ::MappingQ< dim, spacedim >::InternalData &data, const ArrayView< const Point< dim > > &unit_points, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber_lexicographic_to_hierarchic, std::vector< Tensor< 5, spacedim > > &jacobian_pushed_forward_3rd_derivatives)
std::vector<::Table< 2, double > > compute_support_point_weights_perimeter_to_interior(const unsigned int polynomial_degree, const unsigned int dim)
DerivativeForm< 4, dim, spacedim > expand_4th_derivatives(const Tensor< 1, length_tensor, Tensor< 1, spacedim > > &compressed)
Point< spacedim > compute_mapped_location_of_point(const typename ::MappingQ< dim, spacedim >::InternalData &data)
Point< dim > do_transform_real_to_unit_cell_internal_codim1(const Point< dim+1 > &p, const Point< dim > &initial_p_unit, const ArrayView< const Point< dim+1 > > &points, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber)
void maybe_compute_face_data(const ::MappingQ< dim, spacedim > &mapping, const typename ::Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int subface_no, const unsigned int n_q_points, const std::vector< double > &weights, const typename ::MappingQ< dim, spacedim >::InternalData &data, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data)
void maybe_update_jacobian_2nd_derivatives(const CellSimilarity::Similarity cell_similarity, const typename ::MappingQ< dim, spacedim >::InternalData &data, const ArrayView< const Point< dim > > &unit_points, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber_lexicographic_to_hierarchic, std::vector< DerivativeForm< 3, dim, spacedim > > &jacobian_2nd_derivatives)
SymmetricTensor< 2, dim, typename ProductTypeNoPoint< Number, Number2 >::type > evaluate_tensor_product_hessian(const std::vector< Polynomials::Polynomial< double > > &poly, const ArrayView< const Number > &values, const Point< dim, Number2 > &p, const std::vector< unsigned int > &renumber={})
std::pair< typename ProductTypeNoPoint< Number, Number2 >::type, Tensor< 1, dim, typename ProductTypeNoPoint< Number, Number2 >::type > > evaluate_tensor_product_value_and_gradient(const std::vector< Polynomials::Polynomial< double > > &poly, const ArrayView< const Number > &values, const Point< dim, Number2 > &p, const bool d_linear=false, const std::vector< unsigned int > &renumber={})
ProductTypeNoPoint< Number, Number2 >::type evaluate_tensor_product_value(const std::vector< Polynomials::Polynomial< double > > &poly, const ArrayView< const Number > &values, const Point< dim, Number2 > &p, const bool d_linear=false, const std::vector< unsigned int > &renumber={})
Tensor< 1, 1, typename ProductTypeNoPoint< Number, Number2 >::type > evaluate_tensor_product_higher_derivatives(const std::vector< Polynomials::Polynomial< double > > &poly, const ArrayView< const Number > &values, const Point< 1, Number2 > &p, const std::vector< unsigned int > &renumber={})
static const unsigned int invalid_unsigned_int
::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 > sqrt(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)
typename internal::ndarray::HelperArray< T, Ns... >::type ndarray
static double subface_ratio(const internal::SubfaceCase< dim > &subface_case, const unsigned int subface_no)
static Point< dim, Number > project_to_unit_cell(const Point< dim, Number > &p)
static double d_linear_shape_function(const Point< dim > &xi, const unsigned int i)
static std_cxx20::ranges::iota_view< unsigned int, unsigned int > vertex_indices()
static void evaluate(const unsigned int n_components, const EvaluationFlags::EvaluationFlags evaluation_flag, const Number *values_dofs, FEEvaluationData< dim, Number, false > &fe_eval)
DEAL_II_HOST constexpr Number determinant(const SymmetricTensor< 2, dim, Number > &)
DEAL_II_HOST constexpr SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &)
Number compare_and_apply_mask(const Number &left, const Number &right, const Number &true_value, const Number &false_value)