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)
127 else if (std::abs(a) < 1
e-8 * std::abs(
b))
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 =
142 (std::abs(eta1 - 0.5) < std::abs(eta2 - 0.5)) ? eta1 : eta2;
148 const long double subexpr0 = -eta * x2 + x0 * (eta - 1);
149 const long double xi_denominator0 = eta * x3 - x1 * (eta - 1) + subexpr0;
151 std::max(std::abs(x2), std::abs(x3)));
153 if (std::abs(xi_denominator0) > 1
e-10 * max_x)
155 const double xi = (x + subexpr0) / xi_denominator0;
156 return {xi,
static_cast<double>(eta)};
160 const long double max_y =
162 std::max(std::abs(y2), std::abs(y3)));
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) > 1
e-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)
283 loqvs[unit_point].
end(),
285 1) < 1
e-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)
374 lohvs[unit_point].
end(),
376 1) < 1
e-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() - 1
e-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];
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 - 1
e-6 * 1
e-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;
714 std::max(last_f_weighted_norm_square -
715 std::min(f_weighted_norm_square, Number(1
e-6 * 1
e-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)
923 ExcMessage(
"Matrix of normal equations not positive "
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)
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);
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)
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;
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)
1168 for (
unsigned int in_comp = 0;
1169 in_comp < n_lanes && in_comp < spacedim - out_comp * n_lanes;
1171 for (
unsigned int j = 0; j < dim; ++j)
1173 jacobians[
point][out_comp * n_lanes + in_comp][j] =
1183 data.volume_elements[
point] = jacobians[
point].determinant();
1192 inverse_jacobians[
point] =
1193 jacobians[
point].covariant_form().transpose();
1198 constexpr
int desymmetrize_3d[6][2] = {
1199 {0, 0}, {1, 1}, {2, 2}, {0, 1}, {0, 2}, {1, 2}};
1200 constexpr
int desymmetrize_2d[3][2] = {{0, 0}, {1, 1}, {0, 1}};
1203 for (
unsigned int out_comp = 0; out_comp < n_comp; ++out_comp)
1205 for (
unsigned int j = 0; j < n_hessians; ++j)
1206 for (
unsigned int in_comp = 0;
1207 in_comp < n_lanes &&
1208 in_comp < spacedim - out_comp * n_lanes;
1211 const unsigned int total_number =
point * n_hessians + j;
1212 const unsigned int new_point = total_number % n_q_points;
1213 const unsigned int new_hessian_comp =
1214 total_number / n_q_points;
1215 const unsigned int new_hessian_comp_i =
1216 dim == 2 ? desymmetrize_2d[new_hessian_comp][0] :
1217 desymmetrize_3d[new_hessian_comp][0];
1218 const unsigned int new_hessian_comp_j =
1219 dim == 2 ? desymmetrize_2d[new_hessian_comp][1] :
1220 desymmetrize_3d[new_hessian_comp][1];
1221 const double value =
1225 jacobian_grads[new_point][out_comp * n_lanes + in_comp]
1226 [new_hessian_comp_i][new_hessian_comp_j] =
1228 jacobian_grads[new_point][out_comp * n_lanes + in_comp]
1229 [new_hessian_comp_j][new_hessian_comp_i] =
1237 template <
int dim,
int spacedim>
1240 const unsigned int n_points,
1241 const unsigned int cur_index,
1248 if (cur_index + n_lanes <= n_points)
1250 std::array<unsigned int, n_lanes> indices;
1251 for (
unsigned int j = 0; j < n_lanes; ++j)
1252 indices[j] = j * dim * spacedim;
1253 const unsigned int even = (dim * spacedim) / 4 * 4;
1254 double *result_ptr = &result_array[cur_index][0][0];
1257 false, even, derivative_ptr, indices.
data(), result_ptr);
1258 for (
unsigned int d = even;
d < dim * spacedim; ++
d)
1259 for (
unsigned int j = 0; j < n_lanes; ++j)
1260 result_ptr[j * dim * spacedim +
d] = derivative_ptr[
d][j];
1263 for (
unsigned int j = 0; j < n_lanes && cur_index + j < n_points; ++j)
1264 for (
unsigned int d = 0;
d < spacedim; ++
d)
1265 for (
unsigned int e = 0;
e < dim; ++
e)
1266 result_array[cur_index + j][
d][
e] = derivative[
d][
e][j];
1271 template <
int dim,
int spacedim>
1275 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1278 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1283 const UpdateFlags update_flags = data.update_each;
1284 const std::vector<Point<spacedim>> &support_points =
1285 data.mapping_support_points;
1287 const unsigned int n_points = unit_points.size();
1295 jacobians.resize(n_points);
1297 inverse_jacobians.resize(n_points);
1299 const bool is_translation =
1302 const bool needs_gradient =
1310 for (
unsigned int i = 0; i < n_points; i += n_lanes)
1311 if (n_points - i > 1)
1314 for (
unsigned int j = 0; j < n_lanes; ++j)
1315 if (i + j < n_points)
1316 for (
unsigned int d = 0;
d < dim; ++
d)
1317 p_vec[
d][j] = unit_points[i + j][
d];
1319 for (
unsigned int d = 0;
d < dim; ++
d)
1320 p_vec[
d][j] = unit_points[i][
d];
1332 polynomials_1d.size() == 2,
1333 renumber_lexicographic_to_hierarchic);
1335 value = result.first;
1337 for (
unsigned int d = 0;
d < spacedim; ++
d)
1338 for (
unsigned int e = 0;
e < dim; ++
e)
1339 derivative[
d][
e] = result.second[
e][
d];
1346 polynomials_1d.size() == 2,
1347 renumber_lexicographic_to_hierarchic);
1350 for (
unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
1351 for (
unsigned int d = 0;
d < spacedim; ++
d)
1363 for (
unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
1372 covariant.transpose(),
1387 polynomials_1d.size() == 2,
1388 renumber_lexicographic_to_hierarchic);
1390 value = result.first;
1392 for (
unsigned int d = 0;
d < spacedim; ++
d)
1393 for (
unsigned int e = 0;
e < dim; ++
e)
1394 derivative[
d][
e] = result.second[
e][
d];
1401 polynomials_1d.size() == 2,
1402 renumber_lexicographic_to_hierarchic);
1411 data.volume_elements[i] = derivative.
determinant();
1414 jacobians[i] = derivative;
1417 inverse_jacobians[i] = jacobians[i].
covariant_form().transpose();
1429 template <
int dim,
int spacedim>
1433 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1436 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1441 const std::vector<Point<spacedim>> &support_points =
1442 data.mapping_support_points;
1443 const unsigned int n_q_points = jacobian_grads.size();
1453 renumber_lexicographic_to_hierarchic);
1455 for (
unsigned int i = 0; i < spacedim; ++i)
1456 for (
unsigned int j = 0; j < dim; ++j)
1457 for (
unsigned int l = 0;
l < dim; ++
l)
1471 template <
int dim,
int spacedim>
1475 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1478 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1483 const std::vector<Point<spacedim>> &support_points =
1484 data.mapping_support_points;
1485 const unsigned int n_q_points = jacobian_pushed_forward_grads.size();
1489 double tmp[spacedim][spacedim][spacedim];
1497 renumber_lexicographic_to_hierarchic);
1502 for (
unsigned int i = 0; i < spacedim; ++i)
1503 for (
unsigned int j = 0; j < spacedim; ++j)
1504 for (
unsigned int l = 0;
l < dim; ++
l)
1506 tmp[i][j][
l] =
second[0][
l][i] * covariant[j][0];
1507 for (
unsigned int jr = 1; jr < dim; ++jr)
1510 second[jr][
l][i] * covariant[j][jr];
1515 for (
unsigned int i = 0; i < spacedim; ++i)
1516 for (
unsigned int j = 0; j < spacedim; ++j)
1517 for (
unsigned int l = 0;
l < spacedim; ++
l)
1519 jacobian_pushed_forward_grads[
point][i][j][
l] =
1520 tmp[i][j][0] * covariant[
l][0];
1521 for (
unsigned int lr = 1; lr < dim; ++lr)
1523 jacobian_pushed_forward_grads[
point][i][j][
l] +=
1524 tmp[i][j][lr] * covariant[
l][lr];
1534 template <
int dim,
int spacedim,
int length_tensor>
1541 for (
unsigned int i = 0; i < spacedim; ++i)
1544 result[i][0][0][0] = compressed[0][i];
1547 for (
unsigned int d = 0;
d < 2; ++
d)
1548 for (
unsigned int e = 0;
e < 2; ++
e)
1549 for (
unsigned int f = 0; f < 2; ++f)
1550 result[i][
d][
e][f] = compressed[
d +
e + f][i];
1558 for (
unsigned int d = 0;
d < 2; ++
d)
1559 for (
unsigned int e = 0;
e < 2; ++
e)
1561 result[i][
d][
e][2] = compressed[4 +
d +
e][i];
1562 result[i][
d][2][
e] = compressed[4 +
d +
e][i];
1563 result[i][2][
d][
e] = compressed[4 +
d +
e][i];
1565 for (
unsigned int d = 0;
d < 2; ++
d)
1567 result[i][
d][2][2] = compressed[7 +
d][i];
1568 result[i][2][
d][2] = compressed[7 +
d][i];
1569 result[i][2][2][
d] = compressed[7 +
d][i];
1571 result[i][2][2][2] = compressed[9][i];
1586 template <
int dim,
int spacedim>
1590 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1593 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1598 const std::vector<Point<spacedim>> &support_points =
1599 data.mapping_support_points;
1600 const unsigned int n_q_points = jacobian_2nd_derivatives.size();
1606 jacobian_2nd_derivatives[
point] = expand_3rd_derivatives<dim>(
1607 internal::evaluate_tensor_product_higher_derivatives<3>(
1611 renumber_lexicographic_to_hierarchic));
1626 template <
int dim,
int spacedim>
1630 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1633 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1638 const std::vector<Point<spacedim>> &support_points =
1639 data.mapping_support_points;
1640 const unsigned int n_q_points =
1641 jacobian_pushed_forward_2nd_derivatives.size();
1650 expand_3rd_derivatives<dim>(
1651 internal::evaluate_tensor_product_higher_derivatives<3>(
1655 renumber_lexicographic_to_hierarchic));
1660 for (
unsigned int i = 0; i < spacedim; ++i)
1661 for (
unsigned int j = 0; j < spacedim; ++j)
1662 for (
unsigned int l = 0;
l < dim; ++
l)
1663 for (
unsigned int m = 0; m < dim; ++m)
1666 third[i][0][
l][m] * covariant[j][0];
1667 for (
unsigned int jr = 1; jr < dim; ++jr)
1669 third[i][jr][
l][m] * covariant[j][jr];
1673 for (
unsigned int i = 0; i < spacedim; ++i)
1674 for (
unsigned int j = 0; j < spacedim; ++j)
1675 for (
unsigned int l = 0;
l < spacedim; ++
l)
1676 for (
unsigned int m = 0; m < dim; ++m)
1679 tmp[i][j][0][m] * covariant[
l][0];
1680 for (
unsigned int lr = 1; lr < dim; ++lr)
1682 tmp[i][j][lr][m] * covariant[
l][lr];
1686 for (
unsigned int i = 0; i < spacedim; ++i)
1687 for (
unsigned int j = 0; j < spacedim; ++j)
1688 for (
unsigned int l = 0;
l < spacedim; ++
l)
1689 for (
unsigned int m = 0; m < spacedim; ++m)
1691 jacobian_pushed_forward_2nd_derivatives
1693 tmp2[i][j][
l][0] * covariant[m][0];
1694 for (
unsigned int mr = 1; mr < dim; ++mr)
1695 jacobian_pushed_forward_2nd_derivatives[
point][i]
1698 tmp2[i][j][
l][mr] * covariant[m][mr];
1707 template <
int dim,
int spacedim,
int length_tensor>
1714 for (
unsigned int i = 0; i < spacedim; ++i)
1717 result[i][0][0][0][0] = compressed[0][i];
1720 for (
unsigned int d = 0;
d < 2; ++
d)
1721 for (
unsigned int e = 0;
e < 2; ++
e)
1722 for (
unsigned int f = 0; f < 2; ++f)
1723 for (
unsigned int g = 0; g < 2; ++g)
1724 result[i][
d][
e][f][g] = compressed[
d +
e + f + g][i];
1732 for (
unsigned int d = 0;
d < 2; ++
d)
1733 for (
unsigned int e = 0;
e < 2; ++
e)
1734 for (
unsigned int f = 0; f < 2; ++f)
1736 result[i][
d][
e][f][2] = compressed[5 +
d +
e + f][i];
1737 result[i][
d][
e][2][f] = compressed[5 +
d +
e + f][i];
1738 result[i][
d][2][
e][f] = compressed[5 +
d +
e + f][i];
1739 result[i][2][
d][
e][f] = compressed[5 +
d +
e + f][i];
1741 for (
unsigned int d = 0;
d < 2; ++
d)
1742 for (
unsigned int e = 0;
e < 2; ++
e)
1744 result[i][
d][
e][2][2] = compressed[9 +
d +
e][i];
1745 result[i][
d][2][
e][2] = compressed[9 +
d +
e][i];
1746 result[i][
d][2][2][
e] = compressed[9 +
d +
e][i];
1747 result[i][2][
d][
e][2] = compressed[9 +
d +
e][i];
1748 result[i][2][
d][2][
e] = compressed[9 +
d +
e][i];
1749 result[i][2][2][
d][
e] = compressed[9 +
d +
e][i];
1751 for (
unsigned int d = 0;
d < 2; ++
d)
1753 result[i][
d][2][2][2] = compressed[12 +
d][i];
1754 result[i][2][
d][2][2] = compressed[12 +
d][i];
1755 result[i][2][2][
d][2] = compressed[12 +
d][i];
1756 result[i][2][2][2][
d] = compressed[12 +
d][i];
1758 result[i][2][2][2][2] = compressed[14][i];
1773 template <
int dim,
int spacedim>
1777 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1780 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1785 const std::vector<Point<spacedim>> &support_points =
1786 data.mapping_support_points;
1787 const unsigned int n_q_points = jacobian_3rd_derivatives.size();
1793 jacobian_3rd_derivatives[
point] = expand_4th_derivatives<dim>(
1794 internal::evaluate_tensor_product_higher_derivatives<4>(
1798 renumber_lexicographic_to_hierarchic));
1813 template <
int dim,
int spacedim>
1817 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1820 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
1825 const std::vector<Point<spacedim>> &support_points =
1826 data.mapping_support_points;
1827 const unsigned int n_q_points =
1828 jacobian_pushed_forward_3rd_derivatives.size();
1833 ndarray<double, spacedim, spacedim, spacedim, spacedim, dim>
1840 expand_4th_derivatives<dim>(
1841 internal::evaluate_tensor_product_higher_derivatives<4>(
1845 renumber_lexicographic_to_hierarchic));
1851 for (
unsigned int i = 0; i < spacedim; ++i)
1852 for (
unsigned int j = 0; j < spacedim; ++j)
1853 for (
unsigned int l = 0;
l < dim; ++
l)
1854 for (
unsigned int m = 0; m < dim; ++m)
1855 for (
unsigned int n = 0; n < dim; ++n)
1857 tmp[i][j][
l][m][n] =
1858 fourth[i][0][
l][m][n] * covariant[j][0];
1859 for (
unsigned int jr = 1; jr < dim; ++jr)
1860 tmp[i][j][
l][m][n] +=
1861 fourth[i][jr][
l][m][n] * covariant[j][jr];
1865 for (
unsigned int i = 0; i < spacedim; ++i)
1866 for (
unsigned int j = 0; j < spacedim; ++j)
1867 for (
unsigned int l = 0;
l < spacedim; ++
l)
1868 for (
unsigned int m = 0; m < dim; ++m)
1869 for (
unsigned int n = 0; n < dim; ++n)
1871 tmp2[i][j][
l][m][n] =
1872 tmp[i][j][0][m][n] * covariant[
l][0];
1873 for (
unsigned int lr = 1; lr < dim; ++lr)
1874 tmp2[i][j][
l][m][n] +=
1875 tmp[i][j][lr][m][n] * covariant[
l][lr];
1879 for (
unsigned int i = 0; i < spacedim; ++i)
1880 for (
unsigned int j = 0; j < spacedim; ++j)
1881 for (
unsigned int l = 0;
l < spacedim; ++
l)
1882 for (
unsigned int m = 0; m < spacedim; ++m)
1883 for (
unsigned int n = 0; n < dim; ++n)
1885 tmp[i][j][
l][m][n] =
1886 tmp2[i][j][
l][0][n] * covariant[m][0];
1887 for (
unsigned int mr = 1; mr < dim; ++mr)
1888 tmp[i][j][
l][m][n] +=
1889 tmp2[i][j][
l][mr][n] * covariant[m][mr];
1893 for (
unsigned int i = 0; i < spacedim; ++i)
1894 for (
unsigned int j = 0; j < spacedim; ++j)
1895 for (
unsigned int l = 0;
l < spacedim; ++
l)
1896 for (
unsigned int m = 0; m < spacedim; ++m)
1897 for (
unsigned int n = 0; n < spacedim; ++n)
1899 jacobian_pushed_forward_3rd_derivatives
1901 tmp[i][j][
l][m][0] * covariant[n][0];
1902 for (
unsigned int nr = 1; nr < dim; ++nr)
1903 jacobian_pushed_forward_3rd_derivatives[
point]
1906 tmp[i][j][
l][m][nr] * covariant[n][nr];
1924 template <
int dim,
int spacedim>
1927 const ::MappingQ<dim, spacedim> &mapping,
1928 const typename ::Triangulation<dim, spacedim>::cell_iterator &cell,
1929 const unsigned int face_no,
1930 const unsigned int subface_no,
1931 const unsigned int n_q_points,
1932 const std::vector<double> &weights,
1933 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1937 const UpdateFlags update_flags = data.update_each;
1957 for (
unsigned int d = 0;
d != dim - 1; ++
d)
1959 const unsigned int vector_index =
1961 Assert(vector_index < data.unit_tangentials.size(),
1964 data.unit_tangentials[vector_index].size(),
1967 data.unit_tangentials[vector_index]),
1977 if (dim == spacedim)
1979 for (
unsigned int i = 0; i < n_q_points; ++i)
1989 (face_no == 0 ? -1 : +1);
1993 cross_product_2d(data.aux[0][i]);
1997 cross_product_3d(data.aux[0][i], data.aux[1][i]);
2017 data.output_data->jacobians[
point];
2024 (face_no == 0 ? -1. : +1.) *
2034 cross_product_3d(DX_t[0], DX_t[1]);
2035 cell_normal /= cell_normal.
norm();
2040 cross_product_3d(data.aux[0][
point], cell_normal);
2047 for (
unsigned int i = 0; i < output_data.
boundary_forms.size(); ++i)
2055 cell->subface_case(face_no), subface_no);
2061 for (
unsigned int i = 0; i < output_data.
normal_vectors.size(); ++i)
2076 template <
int dim,
int spacedim>
2079 const ::MappingQ<dim, spacedim> &mapping,
2080 const typename ::Triangulation<dim, spacedim>::cell_iterator &cell,
2081 const unsigned int face_no,
2082 const unsigned int subface_no,
2085 const typename ::MappingQ<dim, spacedim>::InternalData &data,
2087 const std::vector<unsigned int> &renumber_lexicographic_to_hierarchic,
2092 &data.quadrature_points[data_set], quadrature.
size());
2093 if (dim > 1 && data.tensor_product_quadrature)
2095 maybe_update_q_points_Jacobians_and_grads_tensor<dim, spacedim>(
2111 renumber_lexicographic_to_hierarchic,
2115 maybe_update_jacobian_grads<dim, spacedim>(
2120 renumber_lexicographic_to_hierarchic,
2123 maybe_update_jacobian_pushed_forward_grads<dim, spacedim>(
2128 renumber_lexicographic_to_hierarchic,
2130 maybe_update_jacobian_2nd_derivatives<dim, spacedim>(
2135 renumber_lexicographic_to_hierarchic,
2137 maybe_update_jacobian_pushed_forward_2nd_derivatives<dim, spacedim>(
2142 renumber_lexicographic_to_hierarchic,
2144 maybe_update_jacobian_3rd_derivatives<dim, spacedim>(
2149 renumber_lexicographic_to_hierarchic,
2151 maybe_update_jacobian_pushed_forward_3rd_derivatives<dim, spacedim>(
2156 renumber_lexicographic_to_hierarchic,
2174 template <
int dim,
int spacedim,
int rank>
2184 const typename ::MappingQ<dim, spacedim>::InternalData *
>(
2185 &mapping_data) !=
nullptr),
2187 const typename ::MappingQ<dim, spacedim>::InternalData &data =
2189 const typename ::MappingQ<dim, spacedim>::InternalData &
>(
2192 switch (mapping_kind)
2198 "update_contravariant_transformation"));
2200 for (
unsigned int i = 0; i < output.size(); ++i)
2211 "update_contravariant_transformation"));
2214 "update_volume_elements"));
2219 for (
unsigned int i = 0; i < output.size(); ++i)
2224 output[i] /= data.volume_elements[i];
2235 "update_covariant_transformation"));
2237 for (
unsigned int i = 0; i < output.size(); ++i)
2239 data.output_data->inverse_jacobians[i].transpose(), input[i]);
2254 template <
int dim,
int spacedim,
int rank>
2264 const typename ::MappingQ<dim, spacedim>::InternalData *
>(
2265 &mapping_data) !=
nullptr),
2267 const typename ::MappingQ<dim, spacedim>::InternalData &data =
2269 const typename ::MappingQ<dim, spacedim>::InternalData &
>(
2272 switch (mapping_kind)
2278 "update_covariant_transformation"));
2281 "update_contravariant_transformation"));
2284 for (
unsigned int i = 0; i < output.size(); ++i)
2290 data.output_data->inverse_jacobians[i].transpose(),
2301 "update_covariant_transformation"));
2304 for (
unsigned int i = 0; i < output.size(); ++i)
2307 data.output_data->inverse_jacobians[i].
transpose();
2320 "update_covariant_transformation"));
2323 "update_contravariant_transformation"));
2326 "update_volume_elements"));
2329 for (
unsigned int i = 0; i < output.size(); ++i)
2332 data.output_data->inverse_jacobians[i].
transpose();
2340 output[i] /= data.volume_elements[i];
2356 template <
int dim,
int spacedim>
2366 const typename ::MappingQ<dim, spacedim>::InternalData *
>(
2367 &mapping_data) !=
nullptr),
2369 const typename ::MappingQ<dim, spacedim>::InternalData &data =
2371 const typename ::MappingQ<dim, spacedim>::InternalData &
>(
2374 switch (mapping_kind)
2380 "update_covariant_transformation"));
2383 "update_contravariant_transformation"));
2385 for (
unsigned int q = 0; q < output.size(); ++q)
2388 data.output_data->inverse_jacobians[q].
transpose();
2390 data.output_data->jacobians[q];
2392 for (
unsigned int i = 0; i < spacedim; ++i)
2394 double tmp1[dim][dim];
2395 for (
unsigned int J = 0; J < dim; ++J)
2396 for (
unsigned int K = 0;
K < dim; ++
K)
2399 contravariant[i][0] * input[q][0][J][
K];
2400 for (
unsigned int I = 1; I < dim; ++I)
2402 contravariant[i][I] * input[q][I][J][
K];
2404 for (
unsigned int j = 0; j < spacedim; ++j)
2407 for (
unsigned int K = 0;
K < dim; ++
K)
2409 tmp2[
K] = covariant[j][0] * tmp1[0][
K];
2410 for (
unsigned int J = 1; J < dim; ++J)
2411 tmp2[
K] += covariant[j][J] * tmp1[J][
K];
2413 for (
unsigned int k = 0; k < spacedim; ++k)
2415 output[q][i][j][k] = covariant[k][0] * tmp2[0];
2416 for (
unsigned int K = 1;
K < dim; ++
K)
2417 output[q][i][j][k] += covariant[k][
K] * tmp2[
K];
2429 "update_covariant_transformation"));
2431 for (
unsigned int q = 0; q < output.size(); ++q)
2434 data.output_data->inverse_jacobians[q].
transpose();
2436 for (
unsigned int i = 0; i < spacedim; ++i)
2438 double tmp1[dim][dim];
2439 for (
unsigned int J = 0; J < dim; ++J)
2440 for (
unsigned int K = 0;
K < dim; ++
K)
2442 tmp1[J][
K] = covariant[i][0] * input[q][0][J][
K];
2443 for (
unsigned int I = 1; I < dim; ++I)
2444 tmp1[J][
K] += covariant[i][I] * input[q][I][J][
K];
2446 for (
unsigned int j = 0; j < spacedim; ++j)
2449 for (
unsigned int K = 0;
K < dim; ++
K)
2451 tmp2[
K] = covariant[j][0] * tmp1[0][
K];
2452 for (
unsigned int J = 1; J < dim; ++J)
2453 tmp2[
K] += covariant[j][J] * tmp1[J][
K];
2455 for (
unsigned int k = 0; k < spacedim; ++k)
2457 output[q][i][j][k] = covariant[k][0] * tmp2[0];
2458 for (
unsigned int K = 1;
K < dim; ++
K)
2459 output[q][i][j][k] += covariant[k][
K] * tmp2[
K];
2472 "update_covariant_transformation"));
2475 "update_contravariant_transformation"));
2478 "update_volume_elements"));
2480 for (
unsigned int q = 0; q < output.size(); ++q)
2483 data.output_data->inverse_jacobians[q].
transpose();
2485 data.output_data->jacobians[q];
2486 for (
unsigned int i = 0; i < spacedim; ++i)
2489 for (
unsigned int I = 0; I < dim; ++I)
2491 contravariant[i][I] * (1. / data.volume_elements[q]);
2492 double tmp1[dim][dim];
2493 for (
unsigned int J = 0; J < dim; ++J)
2494 for (
unsigned int K = 0;
K < dim; ++
K)
2496 tmp1[J][
K] = factor[0] * input[q][0][J][
K];
2497 for (
unsigned int I = 1; I < dim; ++I)
2498 tmp1[J][
K] += factor[I] * input[q][I][J][
K];
2500 for (
unsigned int j = 0; j < spacedim; ++j)
2503 for (
unsigned int K = 0;
K < dim; ++
K)
2505 tmp2[
K] = covariant[j][0] * tmp1[0][
K];
2506 for (
unsigned int J = 1; J < dim; ++J)
2507 tmp2[
K] += covariant[j][J] * tmp1[J][
K];
2509 for (
unsigned int k = 0; k < spacedim; ++k)
2511 output[q][i][j][k] = covariant[k][0] * tmp2[0];
2512 for (
unsigned int K = 1;
K < dim; ++
K)
2513 output[q][i][j][k] += covariant[k][
K] * tmp2[
K];
2533 template <
int dim,
int spacedim,
int rank>
2543 const typename ::MappingQ<dim, spacedim>::InternalData *
>(
2544 &mapping_data) !=
nullptr),
2546 const typename ::MappingQ<dim, spacedim>::InternalData &data =
2548 const typename ::MappingQ<dim, spacedim>::InternalData &
>(
2551 switch (mapping_kind)
2557 "update_covariant_transformation"));
2559 for (
unsigned int i = 0; i < output.size(); ++i)
2561 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_values() const
const Number * begin_hessians() const
const Number * begin_gradients() const
const Number * begin_dof_values() const
Abstract base class for mapping classes.
numbers::NumberTraits< Number >::real_type distance_square(const Point< dim, Number > &p) const
const std::vector< double > & get_weights() const
const Point< dim > & point(const unsigned int i) const
unsigned int size() const
constexpr numbers::NumberTraits< Number >::real_type norm_square() const
numbers::NumberTraits< Number >::real_type norm() const
static constexpr std::size_t size()
const Point< spacedim > normalization_shift
const double normalization_length
Point< dim, Number > compute(const Point< spacedim, Number > &p) const
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)
std::array< Point< dim >, n_functions > coefficients
#define DEAL_II_ALWAYS_INLINE
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
#define Assert(cond, exc)
static ::ExceptionBase & ExcNotImplemented()
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
#define AssertDimension(dim1, dim2)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
void loop(ITERATOR begin, std_cxx20::type_identity_t< ITERATOR > end, DOFINFO &dinfo, INFOBOX &info, const std::function< void(DOFINFO &, typename INFOBOX::CellInfo &)> &cell_worker, const std::function< void(DOFINFO &, typename INFOBOX::CellInfo &)> &boundary_worker, const std::function< void(DOFINFO &, DOFINFO &, typename INFOBOX::CellInfo &, typename INFOBOX::CellInfo &)> &face_worker, ASSEMBLER &assembler, const LoopControl &lctrl=LoopControl())
@ 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
CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt K
Expression fabs(const Expression &x)
EvaluationFlags
The EvaluationFlags enum.
@ matrix
Contents is actually a matrix.
Point< spacedim > point(const gp_Pnt &p, const double tolerance=1e-10)
void quadrature_points(const Triangulation< dim, spacedim > &triangulation, const Quadrature< dim > &quadrature, const std::vector< std::vector< BoundingBox< spacedim >>> &global_bounding_boxes, ParticleHandler< dim, spacedim > &particle_handler, const Mapping< dim, spacedim > &mapping=(ReferenceCells::get_hypercube< dim >() .template get_default_linear_mapping< dim, spacedim >()), const std::vector< std::vector< double >> &properties={})
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
Tensor< 2, dim, Number > l(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
SymmetricTensor< 2, dim, Number > b(const Tensor< 2, dim, Number > &F)
VectorType::value_type * begin(VectorType &V)
VectorType::value_type * end(VectorType &V)
T sum(const T &t, const MPI_Comm mpi_communicator)
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 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 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)
std::vector< Point< dim > > unit_support_points(const std::vector< Point< 1 >> &line_support_points, const std::vector< unsigned int > &renumbering)
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)
inline ::Table< 2, double > compute_support_point_weights_on_hex(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)
Point< spacedim > compute_mapped_location_of_point(const typename ::MappingQ< dim, spacedim >::InternalData &data)
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 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)
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 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)
DerivativeForm< 3, dim, spacedim > expand_3rd_derivatives(const Tensor< 1, length_tensor, Tensor< 1, spacedim >> &compressed)
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 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)
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)
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)
DerivativeForm< 4, dim, spacedim > expand_4th_derivatives(const Tensor< 1, length_tensor, Tensor< 1, spacedim >> &compressed)
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_cell(const unsigned int polynomial_degree)
std::vector<::Table< 2, double > > compute_support_point_weights_perimeter_to_interior(const unsigned int polynomial_degree, const unsigned int dim)
inline ::Table< 2, double > compute_support_point_weights_on_quad(const unsigned int polynomial_degree)
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 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 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)
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={})
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={})
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={})
static const unsigned int invalid_unsigned_int
typename internal::ndarray::HelperArray< T, Ns... >::type ndarray
static double subface_ratio(const internal::SubfaceCase< dim > &subface_case, const unsigned int subface_no)
static double d_linear_shape_function(const Point< dim > &xi, const unsigned int i)
static Point< dim, Number > project_to_unit_cell(const Point< dim, Number > &p)
static void evaluate(const unsigned int n_components, const EvaluationFlags::EvaluationFlags evaluation_flag, const Number *values_dofs, FEEvaluationData< dim, Number, false > &fe_eval)
constexpr DEAL_II_HOST SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &)
constexpr DEAL_II_HOST Number determinant(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)