16#ifndef dealii_mapping_q_internal_h
17#define dealii_mapping_q_internal_h
63 template <
int spacedim>
77 template <
int spacedim>
89 const long double x = p(0);
90 const long double y = p(1);
92 const long double x0 =
vertices[0](0);
93 const long double x1 =
vertices[1](0);
94 const long double x2 =
vertices[2](0);
95 const long double x3 =
vertices[3](0);
97 const long double y0 =
vertices[0](1);
98 const long double y1 =
vertices[1](1);
99 const long double y2 =
vertices[2](1);
100 const long double y3 =
vertices[3](1);
102 const long double a = (x1 - x3) * (y0 - y2) - (x0 - x2) * (y1 - y3);
103 const long double b = -(x0 - x1 - x2 + x3) * y + (x - 2 * x1 + x3) * y0 -
104 (x - 2 * x0 + x2) * y1 - (x - x1) * y2 +
106 const long double c = (x0 - x1) * y - (x - x1) * y0 + (x - x0) * y1;
108 const long double discriminant = b * b - 4 * a * c;
117 const long double sqrt_discriminant =
std::sqrt(discriminant);
120 if (b != 0.0 &&
std::abs(b) == sqrt_discriminant)
131 eta1 = 2 * c / (-b - sqrt_discriminant);
132 eta2 = 2 * c / (-b + sqrt_discriminant);
137 eta1 = (-b - sqrt_discriminant) / (2 * a);
138 eta2 = (-b + sqrt_discriminant) / (2 * a);
141 const long double eta =
148 const long double subexpr0 = -eta * x2 + x0 * (eta - 1);
149 const long double xi_denominator0 = eta * x3 - x1 * (eta - 1) + subexpr0;
153 if (
std::abs(xi_denominator0) > 1e-10 * max_x)
155 const double xi = (x + subexpr0) / xi_denominator0;
156 return {xi,
static_cast<double>(eta)};
160 const long double max_y =
163 const long double subexpr1 = -eta * y2 + y0 * (eta - 1);
164 const long double xi_denominator1 =
165 eta * y3 - y1 * (eta - 1) + subexpr1;
166 if (
std::abs(xi_denominator1) > 1e-10 * max_y)
168 const double xi = (subexpr1 + y) / xi_denominator1;
169 return {xi,
static_cast<double>(eta)};
176 spacedim>::ExcTransformationFailed()));
182 return {std::numeric_limits<double>::quiet_NaN(),
183 std::numeric_limits<double>::quiet_NaN()};
188 template <
int spacedim>
197 return {std::numeric_limits<double>::quiet_NaN(),
198 std::numeric_limits<double>::quiet_NaN(),
199 std::numeric_limits<double>::quiet_NaN()};
210 namespace MappingQImplementation
217 std::vector<Point<dim>>
219 const std::vector<unsigned int> &renumbering)
223 std::vector<Point<dim>> points(renumbering.size());
224 const unsigned int n1 = line_support_points.size();
225 for (
unsigned int q2 = 0, q = 0; q2 < (dim > 2 ? n1 : 1); ++q2)
226 for (
unsigned int q1 = 0; q1 < (dim > 1 ? n1 : 1); ++q1)
227 for (
unsigned int q0 = 0; q0 < n1; ++q0, ++q)
229 points[renumbering[q]][0] = line_support_points[q0][0];
231 points[renumbering[q]][1] = line_support_points[q1][0];
233 points[renumbering[q]][2] = line_support_points[q2][0];
247 inline ::Table<2, double>
254 if (polynomial_degree == 1)
257 const unsigned int M = polynomial_degree - 1;
258 const unsigned int n_inner_2d = M * M;
259 const unsigned int n_outer_2d = 4 + 4 * M;
262 loqvs.reinit(n_inner_2d, n_outer_2d);
264 for (
unsigned int i = 0; i < M; ++i)
265 for (
unsigned int j = 0; j < M; ++j)
268 gl.
point((i + 1) * (polynomial_degree + 1) + (j + 1));
269 const unsigned int index_table = i * M + j;
270 for (
unsigned int v = 0; v < 4; ++v)
271 loqvs(index_table, v) =
273 loqvs(index_table, 4 + i) = 1. - p[0];
274 loqvs(index_table, 4 + i + M) = p[0];
275 loqvs(index_table, 4 + j + 2 * M) = 1. - p[1];
276 loqvs(index_table, 4 + j + 3 * M) = p[1];
281 for (
unsigned int unit_point = 0; unit_point < n_inner_2d; ++unit_point)
282 Assert(std::fabs(std::accumulate(loqvs[unit_point].begin(),
283 loqvs[unit_point].end(),
285 1) < 1e-13 * polynomial_degree,
299 inline ::Table<2, double>
306 if (polynomial_degree == 1)
309 const unsigned int M = polynomial_degree - 1;
311 const unsigned int n_inner = Utilities::fixed_power<3>(M);
312 const unsigned int n_outer = 8 + 12 * M + 6 * M * M;
315 lohvs.reinit(n_inner, n_outer);
317 for (
unsigned int i = 0; i < M; ++i)
318 for (
unsigned int j = 0; j < M; ++j)
319 for (
unsigned int k = 0; k < M; ++k)
322 (j + 1) * (M + 2) + (k + 1));
323 const unsigned int index_table = i * M * M + j * M + k;
326 for (
unsigned int v = 0; v < 8; ++v)
327 lohvs(index_table, v) =
332 constexpr std::array<unsigned int, 4> line_coordinates_y(
335 for (
unsigned int l = 0; l < 4; ++l)
336 lohvs(index_table, 8 + line_coordinates_y[l] * M + j) =
341 constexpr std::array<unsigned int, 4> line_coordinates_x(
344 for (
unsigned int l = 0; l < 4; ++l)
345 lohvs(index_table, 8 + line_coordinates_x[l] * M + k) =
350 constexpr std::array<unsigned int, 4> line_coordinates_z(
353 for (
unsigned int l = 0; l < 4; ++l)
354 lohvs(index_table, 8 + line_coordinates_z[l] * M + i) =
359 lohvs(index_table, 8 + 12 * M + 0 * M * M + i * M + j) =
361 lohvs(index_table, 8 + 12 * M + 1 * M * M + i * M + j) = p[0];
362 lohvs(index_table, 8 + 12 * M + 2 * M * M + k * M + i) =
364 lohvs(index_table, 8 + 12 * M + 3 * M * M + k * M + i) = p[1];
365 lohvs(index_table, 8 + 12 * M + 4 * M * M + j * M + k) =
367 lohvs(index_table, 8 + 12 * M + 5 * M * M + j * M + k) = p[2];
372 for (
unsigned int unit_point = 0; unit_point < n_inner; ++unit_point)
373 Assert(std::fabs(std::accumulate(lohvs[unit_point].begin(),
374 lohvs[unit_point].end(),
376 1) < 1e-13 * polynomial_degree,
388 inline std::vector<::Table<2, double>>
390 const unsigned int polynomial_degree,
391 const unsigned int dim)
394 std::vector<::Table<2, double>> output(dim);
395 if (polynomial_degree <= 1)
400 output[0].reinit(polynomial_degree - 1,
402 for (
unsigned int q = 0; q < polynomial_degree - 1; ++q)
423 inline ::Table<2, double>
427 if (polynomial_degree <= 1)
428 return ::Table<2, double>();
431 const std::vector<unsigned int> h2l =
432 FETools::hierarchic_to_lexicographic_numbering<dim>(polynomial_degree);
437 for (
unsigned int q = 0; q < output.size(0); ++q)
454 template <
int dim,
int spacedim>
457 const typename ::MappingQ<dim, spacedim>::InternalData &data)
460 data.mapping_support_points.size());
464 for (
unsigned int i = 0; i < data.mapping_support_points.size(); ++i)
465 p_real += data.mapping_support_points[i] * data.shape(0, i);
476 template <
int dim,
int spacedim,
typename Number>
483 const std::vector<unsigned int> & renumber,
484 const bool print_iterations_to_deallog =
false)
486 if (print_iterations_to_deallog)
487 deallog <<
"Start MappingQ::do_transform_real_to_unit_cell for real "
488 <<
"point [ " << p <<
" ] " << std::endl;
505 polynomials_1d, points, p_unit, polynomials_1d.size() == 2, renumber);
514 f.
norm_square() - 1e-24 * p_real.second[0].norm_square()) ==
552 const double eps = 1.e-11;
553 const unsigned int newton_iteration_limit = 20;
556 invalid_point[0] = std::numeric_limits<double>::infinity();
557 bool tried_project_to_unit_cell =
false;
559 unsigned int newton_iteration = 0;
560 Number f_weighted_norm_square = 1.;
561 Number last_f_weighted_norm_square = 1.;
565 if (print_iterations_to_deallog)
566 deallog <<
"Newton iteration " << newton_iteration
567 <<
" for unit point guess " << p_unit << std::endl;
571 for (
unsigned int d = 0; d < spacedim; ++d)
572 for (
unsigned int e = 0; e < dim; ++e)
573 df[d][e] = p_real.second[e][d];
577 Number(std::numeric_limits<double>::min())) ==
578 Number(std::numeric_limits<double>::min())))
586 if (tried_project_to_unit_cell ==
false)
593 polynomials_1d.size() == 2,
595 f = p_real.first - p;
596 f_weighted_norm_square = 1.;
597 last_f_weighted_norm_square = 1;
598 tried_project_to_unit_cell =
true;
602 return invalid_point;
610 if (print_iterations_to_deallog)
611 deallog <<
" delta=" << delta << std::endl;
614 double step_length = 1.0;
622 for (
unsigned int i = 0; i < dim; ++i)
623 p_unit_trial[i] -= step_length * delta[i];
626 const auto p_real_trial =
631 polynomials_1d.size() == 2,
634 p_real_trial.first - p;
635 f_weighted_norm_square = (df_inverse * f_trial).norm_square();
637 if (print_iterations_to_deallog)
639 deallog <<
" step_length=" << step_length << std::endl;
640 if (step_length == 1.0)
641 deallog <<
" ||f || =" << f.norm() << std::endl;
642 deallog <<
" ||f*|| =" << f_trial.
norm() << std::endl
644 <<
std::sqrt(f_weighted_norm_square) << std::endl;
664 if (
std::max(f_weighted_norm_square - 1e-6 * 1e-6, Number(0.)) *
669 p_real = p_real_trial;
670 p_unit = p_unit_trial;
674 else if (step_length > 0.05)
685 if (step_length <= 0.05 && tried_project_to_unit_cell ==
false)
692 polynomials_1d.size() == 2,
694 f = p_real.first - p;
695 f_weighted_norm_square = 1.;
696 last_f_weighted_norm_square = 1;
697 tried_project_to_unit_cell =
true;
700 else if (step_length <= 0.05)
701 return invalid_point;
704 if (newton_iteration > newton_iteration_limit)
705 return invalid_point;
713 !(
std::max(f_weighted_norm_square - eps * eps, Number(0.)) *
714 std::max(last_f_weighted_norm_square -
715 std::min(f_weighted_norm_square, Number(1e-6 * 1e-6)) *
720 if (print_iterations_to_deallog)
721 deallog <<
"Iteration converged for p_unit = [ " << p_unit
722 <<
" ] and iteration error "
723 <<
std::sqrt(f_weighted_norm_square) << std::endl;
740 const std::vector<unsigned int> & renumber)
742 const unsigned int spacedim = dim + 1;
749 const double eps = 1.e-12;
750 const unsigned int loop_limit = 10;
752 unsigned int loop = 0;
753 double f_weighted_norm_square = 1.;
755 while (f_weighted_norm_square > eps * eps && loop++ < loop_limit)
762 polynomials_1d.size() == 2,
768 polynomials_1d, points, p_unit, renumber);
771 for (
unsigned int j = 0; j < dim; ++j)
773 f[j] = DF[j] * p_minus_F;
774 for (
unsigned int l = 0; l < dim; ++l)
775 df[j][l] = -DF[j] * DF[l] +
hessian[j][l] * p_minus_F;
781 f_weighted_norm_square = d.norm_square();
815 template <
int dim,
int spacedim>
823 (spacedim == 1 ? 3 : (spacedim == 2 ? 6 : 10));
841 1. / real_support_points[0].distance(real_support_points[1]))
854 Assert(dim == spacedim || real_support_points.size() ==
859 const auto affine = GridTools::affine_cell_approximation<dim>(
862 affine.first.covariant_form().transpose();
869 for (
unsigned int d = 0; d < spacedim; ++d)
870 for (
unsigned int e = 0; e < dim; ++e)
878 std::array<double, n_functions> shape_values;
884 shape_values[0] = 1.;
888 for (
unsigned int d = 0; d < spacedim; ++d)
889 shape_values[1 + d] = p_scaled[d];
890 for (
unsigned int d = 0, c = 0; d < spacedim; ++d)
891 for (
unsigned int e = 0; e <= d; ++e, ++c)
892 shape_values[1 + spacedim + c] = p_scaled[d] * p_scaled[e];
901 matrix[i][j] += shape_values[i] * shape_values[j];
914 for (
unsigned int j = 0; j < i; ++j)
916 double Lik_Ljk_sum = 0;
917 for (
unsigned int k = 0; k < j; ++k)
918 Lik_Ljk_sum += matrix[i][k] * matrix[j][k];
919 matrix[i][j] = matrix[j][j] * (matrix[i][j] - Lik_Ljk_sum);
920 Lij_sum += matrix[i][j] * matrix[i][j];
923 ExcMessage(
"Matrix of normal equations not positive "
929 matrix[i][i] = 1. /
std::sqrt(matrix[i][i] - Lij_sum);
936 for (
unsigned int j = 0; j < i; ++j)
954 for (
unsigned int i = dim + 1; i <
n_functions; ++i)
971 template <
typename Number>
976 for (
unsigned int d = 0; d < dim; ++d)
984 for (
unsigned int d = 0; d < spacedim; ++d)
987 for (
unsigned int d = 0; d < spacedim; ++d)
993 for (
unsigned int d = 0, c = 0; d < spacedim; ++d)
994 for (
unsigned int e = 0; e <= d; ++e, ++c)
996 coefficients[1 + spacedim + c] * (p_scaled[d] * p_scaled[e]);
1007 const Number affine_distance_to_unit_cell =
1010 for (
unsigned int d = 0; d < dim; ++d)
1011 result[d] = compare_and_apply_mask<SIMDComparison::greater_than>(
1012 distance_to_unit_cell,
1013 affine_distance_to_unit_cell + 0.5,
1055 template <
int dim,
int spacedim>
1059 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1065 const UpdateFlags update_flags = data.update_each;
1067 using VectorizedArrayType =
1068 typename ::MappingQ<dim,
1069 spacedim>::InternalData::VectorizedArrayType;
1070 const unsigned int n_shape_values = data.n_shape_functions;
1071 const unsigned int n_q_points = data.shape_info.n_q_points;
1072 constexpr unsigned int n_lanes = VectorizedArrayType::size();
1073 constexpr unsigned int n_comp = 1 + (spacedim - 1) / n_lanes;
1074 constexpr unsigned int n_hessians = (dim * (dim + 1)) / 2;
1081 jacobians.resize(n_q_points);
1083 inverse_jacobians.resize(n_q_points);
1100 n_q_points == quadrature_points.size(),
1103 data.n_shape_functions > 0,
1106 n_q_points == jacobian_grads.size(),
1112 data.shape_info.element_type ==
1115 for (
unsigned int q = 0; q < n_q_points; ++q)
1116 quadrature_points[q] =
1117 data.mapping_support_points[data.shape_info
1118 .lexicographic_numbering[q]];
1131 for (
unsigned int i = 0; i < n_shape_values * n_comp; ++i)
1134 const std::vector<unsigned int> &renumber_to_lexicographic =
1135 data.shape_info.lexicographic_numbering;
1136 for (
unsigned int i = 0; i < n_shape_values; ++i)
1137 for (
unsigned int d = 0; d < spacedim; ++d)
1139 const unsigned int in_comp = d % n_lanes;
1140 const unsigned int out_comp = d / n_lanes;
1143 data.mapping_support_points[renumber_to_lexicographic[i]][d];
1154 for (
unsigned int out_comp = 0; out_comp < n_comp; ++out_comp)
1155 for (
unsigned int i = 0; i < n_q_points; ++i)
1156 for (
unsigned int in_comp = 0;
1157 in_comp < n_lanes && in_comp < spacedim - out_comp * n_lanes;
1159 quadrature_points[i][out_comp * n_lanes + in_comp] =
1160 eval.
begin_values()[out_comp * n_q_points + i][in_comp];
1166 for (
unsigned int out_comp = 0; out_comp < n_comp; ++out_comp)
1167 for (
unsigned int point = 0; point < n_q_points; ++point)
1168 for (
unsigned int j = 0; j < dim; ++j)
1169 for (
unsigned int in_comp = 0;
1170 in_comp < n_lanes &&
1171 in_comp < spacedim - out_comp * n_lanes;
1174 const unsigned int total_number = point * dim + j;
1175 const unsigned int new_comp = total_number / n_q_points;
1176 const unsigned int new_point = total_number % n_q_points;
1177 jacobians[new_point][out_comp * n_lanes +
1178 in_comp][new_comp] =
1187 for (
unsigned int point = 0; point < n_q_points; ++point)
1188 data.volume_elements[point] = jacobians[point].determinant();
1196 for (
unsigned int point = 0; point < n_q_points; ++point)
1197 inverse_jacobians[point] =
1198 jacobians[point].covariant_form().transpose();
1203 constexpr int desymmetrize_3d[6][2] = {
1204 {0, 0}, {1, 1}, {2, 2}, {0, 1}, {0, 2}, {1, 2}};
1205 constexpr int desymmetrize_2d[3][2] = {{0, 0}, {1, 1}, {0, 1}};
1208 for (
unsigned int out_comp = 0; out_comp < n_comp; ++out_comp)
1209 for (
unsigned int point = 0; point < n_q_points; ++point)
1210 for (
unsigned int j = 0; j < n_hessians; ++j)
1211 for (
unsigned int in_comp = 0;
1212 in_comp < n_lanes &&
1213 in_comp < spacedim - out_comp * n_lanes;
1216 const unsigned int total_number = point * n_hessians + j;
1217 const unsigned int new_point = total_number % n_q_points;
1218 const unsigned int new_hessian_comp =
1219 total_number / n_q_points;
1220 const unsigned int new_hessian_comp_i =
1221 dim == 2 ? desymmetrize_2d[new_hessian_comp][0] :
1222 desymmetrize_3d[new_hessian_comp][0];
1223 const unsigned int new_hessian_comp_j =
1224 dim == 2 ? desymmetrize_2d[new_hessian_comp][1] :
1225 desymmetrize_3d[new_hessian_comp][1];
1226 const double value =
1230 jacobian_grads[new_point][out_comp * n_lanes + in_comp]
1231 [new_hessian_comp_i][new_hessian_comp_j] =
1233 jacobian_grads[new_point][out_comp * n_lanes + in_comp]
1234 [new_hessian_comp_j][new_hessian_comp_i] =
1242 template <
int dim,
int spacedim>
1245 const unsigned int n_points,
1246 const unsigned int cur_index,
1253 if (cur_index + n_lanes <= n_points)
1255 std::array<unsigned int, n_lanes> indices;
1256 for (
unsigned int j = 0; j < n_lanes; ++j)
1257 indices[j] = j * dim * spacedim;
1258 const unsigned int even = (dim * spacedim) / 4 * 4;
1259 double * result_ptr = &result_array[cur_index][0][0];
1262 false, even, derivative_ptr, indices.
data(), result_ptr);
1263 for (
unsigned int d = even; d < dim * spacedim; ++d)
1264 for (
unsigned int j = 0; j < n_lanes; ++j)
1265 result_ptr[j * dim * spacedim + d] = derivative_ptr[d][j];
1268 for (
unsigned int j = 0; j < n_lanes && cur_index + j < n_points; ++j)
1269 for (
unsigned int d = 0; d < spacedim; ++d)
1270 for (
unsigned int e = 0; e < dim; ++e)
1271 result_array[cur_index + j][d][e] = derivative[d][e][j];
1276 template <
int dim,
int spacedim>
1280 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1283 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1288 const UpdateFlags update_flags = data.update_each;
1289 const std::vector<Point<spacedim>> &support_points =
1290 data.mapping_support_points;
1292 const unsigned int n_points = unit_points.size();
1300 jacobians.resize(n_points);
1302 inverse_jacobians.resize(n_points);
1304 const bool is_translation =
1307 const bool needs_gradient =
1315 for (
unsigned int i = 0; i < n_points; i += n_lanes)
1316 if (n_points - i > 1)
1319 for (
unsigned int j = 0; j < n_lanes; ++j)
1320 if (i + j < n_points)
1321 for (
unsigned int d = 0; d < dim; ++d)
1322 p_vec[d][j] = unit_points[i + j][d];
1324 for (
unsigned int d = 0; d < dim; ++d)
1325 p_vec[d][j] = unit_points[i][d];
1337 polynomials_1d.size() == 2,
1338 renumber_lexicographic_to_hierarchic);
1340 value = result.first;
1342 for (
unsigned int d = 0; d < spacedim; ++d)
1343 for (
unsigned int e = 0; e < dim; ++e)
1344 derivative[d][e] = result.second[e][d];
1351 polynomials_1d.size() == 2,
1352 renumber_lexicographic_to_hierarchic);
1355 for (
unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
1356 for (
unsigned int d = 0; d < spacedim; ++d)
1357 quadrature_points[i + j][d] =
value[d][j];
1368 for (
unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
1377 covariant.transpose(),
1392 polynomials_1d.size() == 2,
1393 renumber_lexicographic_to_hierarchic);
1395 value = result.first;
1397 for (
unsigned int d = 0; d < spacedim; ++d)
1398 for (
unsigned int e = 0; e < dim; ++e)
1399 derivative[d][e] = result.second[e][d];
1406 polynomials_1d.size() == 2,
1407 renumber_lexicographic_to_hierarchic);
1410 quadrature_points[i] =
value;
1416 data.volume_elements[i] = derivative.
determinant();
1419 jacobians[i] = derivative;
1434 template <
int dim,
int spacedim>
1438 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1441 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1446 const std::vector<Point<spacedim>> &support_points =
1447 data.mapping_support_points;
1448 const unsigned int n_q_points = jacobian_grads.size();
1451 for (
unsigned int point = 0; point < n_q_points; ++point)
1458 renumber_lexicographic_to_hierarchic);
1460 for (
unsigned int i = 0; i < spacedim; ++i)
1461 for (
unsigned int j = 0; j < dim; ++j)
1462 for (
unsigned int l = 0; l < dim; ++l)
1463 jacobian_grads[point][i][j][l] =
second[j][l][i];
1476 template <
int dim,
int spacedim>
1480 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1483 const std::vector<unsigned int> & renumber_lexicographic_to_hierarchic,
1488 const std::vector<Point<spacedim>> &support_points =
1489 data.mapping_support_points;
1490 const unsigned int n_q_points = jacobian_pushed_forward_grads.size();
1494 double tmp[spacedim][spacedim][spacedim];
1495 for (
unsigned int point = 0; point < n_q_points; ++point)
1502 renumber_lexicographic_to_hierarchic);
1504 data.output_data->inverse_jacobians[point].
transpose();
1507 for (
unsigned int i = 0; i < spacedim; ++i)
1508 for (
unsigned int j = 0; j < spacedim; ++j)
1509 for (
unsigned int l = 0; l < dim; ++l)
1511 tmp[i][j][l] =
second[0][l][i] * covariant[j][0];
1512 for (
unsigned int jr = 1; jr < dim; ++jr)
1515 second[jr][l][i] * covariant[j][jr];
1520 for (
unsigned int i = 0; i < spacedim; ++i)
1521 for (
unsigned int j = 0; j < spacedim; ++j)
1522 for (
unsigned int l = 0; l < spacedim; ++l)
1524 jacobian_pushed_forward_grads[point][i][j][l] =
1525 tmp[i][j][0] * covariant[l][0];
1526 for (
unsigned int lr = 1; lr < dim; ++lr)
1528 jacobian_pushed_forward_grads[point][i][j][l] +=
1529 tmp[i][j][lr] * covariant[l][lr];
1539 template <
int dim,
int spacedim,
int length_tensor>
1546 for (
unsigned int i = 0; i < spacedim; ++i)
1549 result[i][0][0][0] = compressed[0][i];
1552 for (
unsigned int d = 0; d < 2; ++d)
1553 for (
unsigned int e = 0; e < 2; ++e)
1554 for (
unsigned int f = 0; f < 2; ++f)
1555 result[i][d][e][f] = compressed[d + e + f][i];
1563 for (
unsigned int d = 0; d < 2; ++d)
1564 for (
unsigned int e = 0; e < 2; ++e)
1566 result[i][d][e][2] = compressed[4 + d + e][i];
1567 result[i][d][2][e] = compressed[4 + d + e][i];
1568 result[i][2][d][e] = compressed[4 + d + e][i];
1570 for (
unsigned int d = 0; d < 2; ++d)
1572 result[i][d][2][2] = compressed[7 + d][i];
1573 result[i][2][d][2] = compressed[7 + d][i];
1574 result[i][2][2][d] = compressed[7 + d][i];
1576 result[i][2][2][2] = compressed[9][i];
1591 template <
int dim,
int spacedim>
1595 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1598 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1603 const std::vector<Point<spacedim>> &support_points =
1604 data.mapping_support_points;
1605 const unsigned int n_q_points = jacobian_2nd_derivatives.size();
1609 for (
unsigned int point = 0; point < n_q_points; ++point)
1611 jacobian_2nd_derivatives[point] = expand_3rd_derivatives<dim>(
1612 internal::evaluate_tensor_product_higher_derivatives<3>(
1616 renumber_lexicographic_to_hierarchic));
1631 template <
int dim,
int spacedim>
1635 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1638 const std::vector<unsigned int> & renumber_lexicographic_to_hierarchic,
1643 const std::vector<Point<spacedim>> &support_points =
1644 data.mapping_support_points;
1645 const unsigned int n_q_points =
1646 jacobian_pushed_forward_2nd_derivatives.size();
1652 for (
unsigned int point = 0; point < n_q_points; ++point)
1655 expand_3rd_derivatives<dim>(
1656 internal::evaluate_tensor_product_higher_derivatives<3>(
1660 renumber_lexicographic_to_hierarchic));
1662 data.output_data->inverse_jacobians[point].
transpose();
1665 for (
unsigned int i = 0; i < spacedim; ++i)
1666 for (
unsigned int j = 0; j < spacedim; ++j)
1667 for (
unsigned int l = 0; l < dim; ++l)
1668 for (
unsigned int m = 0; m < dim; ++m)
1671 third[i][0][l][m] * covariant[j][0];
1672 for (
unsigned int jr = 1; jr < dim; ++jr)
1674 third[i][jr][l][m] * covariant[j][jr];
1678 for (
unsigned int i = 0; i < spacedim; ++i)
1679 for (
unsigned int j = 0; j < spacedim; ++j)
1680 for (
unsigned int l = 0; l < spacedim; ++l)
1681 for (
unsigned int m = 0; m < dim; ++m)
1684 tmp[i][j][0][m] * covariant[l][0];
1685 for (
unsigned int lr = 1; lr < dim; ++lr)
1687 tmp[i][j][lr][m] * covariant[l][lr];
1691 for (
unsigned int i = 0; i < spacedim; ++i)
1692 for (
unsigned int j = 0; j < spacedim; ++j)
1693 for (
unsigned int l = 0; l < spacedim; ++l)
1694 for (
unsigned int m = 0; m < spacedim; ++m)
1696 jacobian_pushed_forward_2nd_derivatives
1697 [point][i][j][l][m] =
1698 tmp2[i][j][l][0] * covariant[m][0];
1699 for (
unsigned int mr = 1; mr < dim; ++mr)
1700 jacobian_pushed_forward_2nd_derivatives[point][i]
1703 tmp2[i][j][l][mr] * covariant[m][mr];
1712 template <
int dim,
int spacedim,
int length_tensor>
1719 for (
unsigned int i = 0; i < spacedim; ++i)
1722 result[i][0][0][0][0] = compressed[0][i];
1725 for (
unsigned int d = 0; d < 2; ++d)
1726 for (
unsigned int e = 0; e < 2; ++e)
1727 for (
unsigned int f = 0; f < 2; ++f)
1728 for (
unsigned int g = 0; g < 2; ++g)
1729 result[i][d][e][f][g] = compressed[d + e + f + g][i];
1737 for (
unsigned int d = 0; d < 2; ++d)
1738 for (
unsigned int e = 0; e < 2; ++e)
1739 for (
unsigned int f = 0; f < 2; ++f)
1741 result[i][d][e][f][2] = compressed[5 + d + e + f][i];
1742 result[i][d][e][2][f] = compressed[5 + d + e + f][i];
1743 result[i][d][2][e][f] = compressed[5 + d + e + f][i];
1744 result[i][2][d][e][f] = compressed[5 + d + e + f][i];
1746 for (
unsigned int d = 0; d < 2; ++d)
1747 for (
unsigned int e = 0; e < 2; ++e)
1749 result[i][d][e][2][2] = compressed[9 + d + e][i];
1750 result[i][d][2][e][2] = compressed[9 + d + e][i];
1751 result[i][d][2][2][e] = compressed[9 + d + e][i];
1752 result[i][2][d][e][2] = compressed[9 + d + e][i];
1753 result[i][2][d][2][e] = compressed[9 + d + e][i];
1754 result[i][2][2][d][e] = compressed[9 + d + e][i];
1756 for (
unsigned int d = 0; d < 2; ++d)
1758 result[i][d][2][2][2] = compressed[12 + d][i];
1759 result[i][2][d][2][2] = compressed[12 + d][i];
1760 result[i][2][2][d][2] = compressed[12 + d][i];
1761 result[i][2][2][2][d] = compressed[12 + d][i];
1763 result[i][2][2][2][2] = compressed[14][i];
1778 template <
int dim,
int spacedim>
1782 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1785 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1790 const std::vector<Point<spacedim>> &support_points =
1791 data.mapping_support_points;
1792 const unsigned int n_q_points = jacobian_3rd_derivatives.size();
1796 for (
unsigned int point = 0; point < n_q_points; ++point)
1798 jacobian_3rd_derivatives[point] = expand_4th_derivatives<dim>(
1799 internal::evaluate_tensor_product_higher_derivatives<4>(
1803 renumber_lexicographic_to_hierarchic));
1818 template <
int dim,
int spacedim>
1822 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1825 const std::vector<unsigned int> & renumber_lexicographic_to_hierarchic,
1830 const std::vector<Point<spacedim>> &support_points =
1831 data.mapping_support_points;
1832 const unsigned int n_q_points =
1833 jacobian_pushed_forward_3rd_derivatives.size();
1838 ndarray<double, spacedim, spacedim, spacedim, spacedim, dim>
1842 for (
unsigned int point = 0; point < n_q_points; ++point)
1845 expand_4th_derivatives<dim>(
1846 internal::evaluate_tensor_product_higher_derivatives<4>(
1850 renumber_lexicographic_to_hierarchic));
1853 data.output_data->inverse_jacobians[point].
transpose();
1856 for (
unsigned int i = 0; i < spacedim; ++i)
1857 for (
unsigned int j = 0; j < spacedim; ++j)
1858 for (
unsigned int l = 0; l < dim; ++l)
1859 for (
unsigned int m = 0; m < dim; ++m)
1860 for (
unsigned int n = 0; n < dim; ++n)
1862 tmp[i][j][l][m][n] =
1863 fourth[i][0][l][m][n] * covariant[j][0];
1864 for (
unsigned int jr = 1; jr < dim; ++jr)
1865 tmp[i][j][l][m][n] +=
1866 fourth[i][jr][l][m][n] * covariant[j][jr];
1870 for (
unsigned int i = 0; i < spacedim; ++i)
1871 for (
unsigned int j = 0; j < spacedim; ++j)
1872 for (
unsigned int l = 0; l < spacedim; ++l)
1873 for (
unsigned int m = 0; m < dim; ++m)
1874 for (
unsigned int n = 0; n < dim; ++n)
1876 tmp2[i][j][l][m][n] =
1877 tmp[i][j][0][m][n] * covariant[l][0];
1878 for (
unsigned int lr = 1; lr < dim; ++lr)
1879 tmp2[i][j][l][m][n] +=
1880 tmp[i][j][lr][m][n] * covariant[l][lr];
1884 for (
unsigned int i = 0; i < spacedim; ++i)
1885 for (
unsigned int j = 0; j < spacedim; ++j)
1886 for (
unsigned int l = 0; l < spacedim; ++l)
1887 for (
unsigned int m = 0; m < spacedim; ++m)
1888 for (
unsigned int n = 0; n < dim; ++n)
1890 tmp[i][j][l][m][n] =
1891 tmp2[i][j][l][0][n] * covariant[m][0];
1892 for (
unsigned int mr = 1; mr < dim; ++mr)
1893 tmp[i][j][l][m][n] +=
1894 tmp2[i][j][l][mr][n] * covariant[m][mr];
1898 for (
unsigned int i = 0; i < spacedim; ++i)
1899 for (
unsigned int j = 0; j < spacedim; ++j)
1900 for (
unsigned int l = 0; l < spacedim; ++l)
1901 for (
unsigned int m = 0; m < spacedim; ++m)
1902 for (
unsigned int n = 0; n < spacedim; ++n)
1904 jacobian_pushed_forward_3rd_derivatives
1905 [point][i][j][l][m][n] =
1906 tmp[i][j][l][m][0] * covariant[n][0];
1907 for (
unsigned int nr = 1; nr < dim; ++nr)
1908 jacobian_pushed_forward_3rd_derivatives[point]
1911 tmp[i][j][l][m][nr] * covariant[n][nr];
1929 template <
int dim,
int spacedim>
1932 const ::MappingQ<dim, spacedim> &mapping,
1933 const typename ::Triangulation<dim, spacedim>::cell_iterator &cell,
1934 const unsigned int face_no,
1935 const unsigned int subface_no,
1936 const unsigned int n_q_points,
1937 const std::vector<double> & weights,
1938 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1942 const UpdateFlags update_flags = data.update_each;
1962 for (
unsigned int d = 0; d != dim - 1; ++d)
1964 const unsigned int vector_index =
1966 Assert(vector_index < data.unit_tangentials.size(),
1968 Assert(data.aux[d].size() <=
1969 data.unit_tangentials[vector_index].size(),
1972 data.unit_tangentials[vector_index]),
1982 if (dim == spacedim)
1984 for (
unsigned int i = 0; i < n_q_points; ++i)
1994 (face_no == 0 ? -1 : +1);
1998 cross_product_2d(data.aux[0][i]);
2002 cross_product_3d(data.aux[0][i], data.aux[1][i]);
2019 for (
unsigned int point = 0; point < n_q_points; ++point)
2022 data.output_data->jacobians[point];
2029 (face_no == 0 ? -1. : +1.) *
2039 cross_product_3d(DX_t[0], DX_t[1]);
2040 cell_normal /= cell_normal.
norm();
2045 cross_product_3d(data.aux[0][point], cell_normal);
2052 for (
unsigned int i = 0; i < output_data.
boundary_forms.size(); ++i)
2060 cell->subface_case(face_no), subface_no);
2066 for (
unsigned int i = 0; i < output_data.
normal_vectors.size(); ++i)
2081 template <
int dim,
int spacedim>
2084 const ::MappingQ<dim, spacedim> &mapping,
2085 const typename ::Triangulation<dim, spacedim>::cell_iterator &cell,
2086 const unsigned int face_no,
2087 const unsigned int subface_no,
2090 const typename ::MappingQ<dim, spacedim>::InternalData &data,
2092 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
2097 &data.quadrature_points[data_set], quadrature.
size());
2098 if (dim > 1 && data.tensor_product_quadrature)
2100 maybe_update_q_points_Jacobians_and_grads_tensor<dim, spacedim>(
2116 renumber_lexicographic_to_hierarchic,
2120 maybe_update_jacobian_grads<dim, spacedim>(
2125 renumber_lexicographic_to_hierarchic,
2128 maybe_update_jacobian_pushed_forward_grads<dim, spacedim>(
2133 renumber_lexicographic_to_hierarchic,
2135 maybe_update_jacobian_2nd_derivatives<dim, spacedim>(
2140 renumber_lexicographic_to_hierarchic,
2142 maybe_update_jacobian_pushed_forward_2nd_derivatives<dim, spacedim>(
2147 renumber_lexicographic_to_hierarchic,
2149 maybe_update_jacobian_3rd_derivatives<dim, spacedim>(
2154 renumber_lexicographic_to_hierarchic,
2156 maybe_update_jacobian_pushed_forward_3rd_derivatives<dim, spacedim>(
2161 renumber_lexicographic_to_hierarchic,
2179 template <
int dim,
int spacedim,
int rank>
2189 const typename ::MappingQ<dim, spacedim>::InternalData *
>(
2190 &mapping_data) !=
nullptr),
2192 const typename ::MappingQ<dim, spacedim>::InternalData &data =
2194 const typename ::MappingQ<dim, spacedim>::InternalData &
>(
2197 switch (mapping_kind)
2203 "update_contravariant_transformation"));
2205 for (
unsigned int i = 0; i < output.size(); ++i)
2216 "update_contravariant_transformation"));
2219 "update_volume_elements"));
2224 for (
unsigned int i = 0; i < output.size(); ++i)
2229 output[i] /= data.volume_elements[i];
2240 "update_covariant_transformation"));
2242 for (
unsigned int i = 0; i < output.size(); ++i)
2244 data.output_data->inverse_jacobians[i].transpose(), input[i]);
2259 template <
int dim,
int spacedim,
int rank>
2269 const typename ::MappingQ<dim, spacedim>::InternalData *
>(
2270 &mapping_data) !=
nullptr),
2272 const typename ::MappingQ<dim, spacedim>::InternalData &data =
2274 const typename ::MappingQ<dim, spacedim>::InternalData &
>(
2277 switch (mapping_kind)
2283 "update_covariant_transformation"));
2286 "update_contravariant_transformation"));
2289 for (
unsigned int i = 0; i < output.size(); ++i)
2295 data.output_data->inverse_jacobians[i].transpose(),
2306 "update_covariant_transformation"));
2309 for (
unsigned int i = 0; i < output.size(); ++i)
2312 data.output_data->inverse_jacobians[i].
transpose();
2325 "update_covariant_transformation"));
2328 "update_contravariant_transformation"));
2331 "update_volume_elements"));
2334 for (
unsigned int i = 0; i < output.size(); ++i)
2337 data.output_data->inverse_jacobians[i].
transpose();
2345 output[i] /= data.volume_elements[i];
2361 template <
int dim,
int spacedim>
2371 const typename ::MappingQ<dim, spacedim>::InternalData *
>(
2372 &mapping_data) !=
nullptr),
2374 const typename ::MappingQ<dim, spacedim>::InternalData &data =
2376 const typename ::MappingQ<dim, spacedim>::InternalData &
>(
2379 switch (mapping_kind)
2385 "update_covariant_transformation"));
2388 "update_contravariant_transformation"));
2390 for (
unsigned int q = 0; q < output.size(); ++q)
2393 data.output_data->inverse_jacobians[q].
transpose();
2395 data.output_data->jacobians[q];
2397 for (
unsigned int i = 0; i < spacedim; ++i)
2399 double tmp1[dim][dim];
2400 for (
unsigned int J = 0; J < dim; ++J)
2401 for (
unsigned int K = 0; K < dim; ++K)
2404 contravariant[i][0] * input[q][0][J][K];
2405 for (
unsigned int I = 1; I < dim; ++I)
2407 contravariant[i][I] * input[q][I][J][K];
2409 for (
unsigned int j = 0; j < spacedim; ++j)
2412 for (
unsigned int K = 0; K < dim; ++K)
2414 tmp2[K] = covariant[j][0] * tmp1[0][K];
2415 for (
unsigned int J = 1; J < dim; ++J)
2416 tmp2[K] += covariant[j][J] * tmp1[J][K];
2418 for (
unsigned int k = 0; k < spacedim; ++k)
2420 output[q][i][j][k] = covariant[k][0] * tmp2[0];
2421 for (
unsigned int K = 1; K < dim; ++K)
2422 output[q][i][j][k] += covariant[k][K] * tmp2[K];
2434 "update_covariant_transformation"));
2436 for (
unsigned int q = 0; q < output.size(); ++q)
2439 data.output_data->inverse_jacobians[q].
transpose();
2441 for (
unsigned int i = 0; i < spacedim; ++i)
2443 double tmp1[dim][dim];
2444 for (
unsigned int J = 0; J < dim; ++J)
2445 for (
unsigned int K = 0; K < dim; ++K)
2447 tmp1[J][K] = covariant[i][0] * input[q][0][J][K];
2448 for (
unsigned int I = 1; I < dim; ++I)
2449 tmp1[J][K] += covariant[i][I] * input[q][I][J][K];
2451 for (
unsigned int j = 0; j < spacedim; ++j)
2454 for (
unsigned int K = 0; K < dim; ++K)
2456 tmp2[K] = covariant[j][0] * tmp1[0][K];
2457 for (
unsigned int J = 1; J < dim; ++J)
2458 tmp2[K] += covariant[j][J] * tmp1[J][K];
2460 for (
unsigned int k = 0; k < spacedim; ++k)
2462 output[q][i][j][k] = covariant[k][0] * tmp2[0];
2463 for (
unsigned int K = 1; K < dim; ++K)
2464 output[q][i][j][k] += covariant[k][K] * tmp2[K];
2477 "update_covariant_transformation"));
2480 "update_contravariant_transformation"));
2483 "update_volume_elements"));
2485 for (
unsigned int q = 0; q < output.size(); ++q)
2488 data.output_data->inverse_jacobians[q].
transpose();
2490 data.output_data->jacobians[q];
2491 for (
unsigned int i = 0; i < spacedim; ++i)
2494 for (
unsigned int I = 0; I < dim; ++I)
2496 contravariant[i][I] * (1. / data.volume_elements[q]);
2497 double tmp1[dim][dim];
2498 for (
unsigned int J = 0; J < dim; ++J)
2499 for (
unsigned int K = 0; K < dim; ++K)
2501 tmp1[J][K] = factor[0] * input[q][0][J][K];
2502 for (
unsigned int I = 1; I < dim; ++I)
2503 tmp1[J][K] += factor[I] * input[q][I][J][K];
2505 for (
unsigned int j = 0; j < spacedim; ++j)
2508 for (
unsigned int K = 0; K < dim; ++K)
2510 tmp2[K] = covariant[j][0] * tmp1[0][K];
2511 for (
unsigned int J = 1; J < dim; ++J)
2512 tmp2[K] += covariant[j][J] * tmp1[J][K];
2514 for (
unsigned int k = 0; k < spacedim; ++k)
2516 output[q][i][j][k] = covariant[k][0] * tmp2[0];
2517 for (
unsigned int K = 1; K < dim; ++K)
2518 output[q][i][j][k] += covariant[k][K] * tmp2[K];
2538 template <
int dim,
int spacedim,
int rank>
2548 const typename ::MappingQ<dim, spacedim>::InternalData *
>(
2549 &mapping_data) !=
nullptr),
2551 const typename ::MappingQ<dim, spacedim>::InternalData &data =
2553 const typename ::MappingQ<dim, spacedim>::InternalData &
>(
2556 switch (mapping_kind)
2562 "update_covariant_transformation"));
2564 for (
unsigned int i = 0; i < output.size(); ++i)
2566 data.output_data->inverse_jacobians[i].transpose(), input[i]);
ArrayView< typename std::remove_reference< typename std::iterator_traits< Iterator >::reference >::type, 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.
numbers::NumberTraits< Number >::real_type distance_square(const Point< dim, Number > &p) const
const Point< dim > & point(const unsigned int i) 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 Point< spacedim > normalization_shift
const double normalization_length
InverseQuadraticApproximation(const InverseQuadraticApproximation &)=default
static constexpr unsigned int n_functions
InverseQuadraticApproximation(const std::vector< Point< spacedim > > &real_support_points, const std::vector< Point< dim > > &unit_support_points)
Point< dim, Number > compute(const Point< spacedim, Number > &p) const
std::array< Point< dim >, n_functions > coefficients
#define DEAL_II_ALWAYS_INLINE
#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
EvaluationFlags
The EvaluationFlags enum.
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)
void store_vectorized_tensor(const unsigned int n_points, const unsigned int cur_index, const DerivativeForm< 1, dim, spacedim, VectorizedArray< double > > &derivative, std::vector< DerivativeForm< 1, dim, spacedim > > &result_array)
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)
Point< dim > do_transform_real_to_unit_cell_internal_codim1(const Point< dim+1 > &p, const Point< dim > &initial_p_unit, const std::vector< Point< dim+1 > > &points, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber)
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)
Point< dim, Number > do_transform_real_to_unit_cell_internal(const Point< spacedim, Number > &p, const Point< dim, Number > &initial_p_unit, const std::vector< Point< spacedim > > &points, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber, const bool print_iterations_to_deallog=false)
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)
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)
ProductTypeNoPoint< Number, Number2 >::type evaluate_tensor_product_value(const std::vector< Polynomials::Polynomial< double > > &poly, const std::vector< Number > &values, const Point< dim, Number2 > &p, const bool d_linear=false, 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 std::vector< Number > &values, const Point< dim, Number2 > &p, const bool d_linear=false, const std::vector< unsigned int > &renumber={})
SymmetricTensor< 2, dim, typename ProductTypeNoPoint< Number, Number2 >::type > evaluate_tensor_product_hessian(const std::vector< Polynomials::Polynomial< double > > &poly, const std::vector< Number > &values, const Point< dim, 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 > &)
void vectorized_transpose_and_store(const bool add_into, const unsigned int n_entries, const VectorizedArray< Number, width > *in, const unsigned int *offsets, Number *out)