16#ifndef dealii_mapping_q_internal_h
17#define dealii_mapping_q_internal_h
62 template <
int spacedim>
76 template <
int spacedim>
88 const long double x = p(0);
89 const long double y = p(1);
91 const long double x0 =
vertices[0](0);
92 const long double x1 =
vertices[1](0);
93 const long double x2 =
vertices[2](0);
94 const long double x3 =
vertices[3](0);
96 const long double y0 =
vertices[0](1);
97 const long double y1 =
vertices[1](1);
98 const long double y2 =
vertices[2](1);
99 const long double y3 =
vertices[3](1);
101 const long double a = (x1 - x3) * (y0 - y2) - (x0 - x2) * (y1 - y3);
102 const long double b = -(x0 - x1 - x2 + x3) * y + (x - 2 * x1 + x3) * y0 -
103 (x - 2 * x0 + x2) * y1 - (x - x1) * y2 +
105 const long double c = (x0 - x1) * y - (x - x1) * y0 + (x - x0) * y1;
107 const long double discriminant = b * b - 4 * a * c;
116 const long double sqrt_discriminant =
std::sqrt(discriminant);
119 if (b != 0.0 &&
std::abs(b) == sqrt_discriminant)
130 eta1 = 2 * c / (-b - sqrt_discriminant);
131 eta2 = 2 * c / (-b + sqrt_discriminant);
136 eta1 = (-b - sqrt_discriminant) / (2 * a);
137 eta2 = (-b + sqrt_discriminant) / (2 * a);
140 const long double eta =
147 const long double subexpr0 = -eta * x2 + x0 * (eta - 1);
148 const long double xi_denominator0 = eta * x3 - x1 * (eta - 1) + subexpr0;
152 if (
std::abs(xi_denominator0) > 1e-10 * max_x)
154 const double xi = (x + subexpr0) / xi_denominator0;
155 return {xi,
static_cast<double>(eta)};
159 const long double max_y =
162 const long double subexpr1 = -eta * y2 + y0 * (eta - 1);
163 const long double xi_denominator1 =
164 eta * y3 - y1 * (eta - 1) + subexpr1;
165 if (
std::abs(xi_denominator1) > 1e-10 * max_y)
167 const double xi = (subexpr1 + y) / xi_denominator1;
168 return {xi,
static_cast<double>(eta)};
175 spacedim>::ExcTransformationFailed()));
181 return {std::numeric_limits<double>::quiet_NaN(),
182 std::numeric_limits<double>::quiet_NaN()};
187 template <
int spacedim>
196 return {std::numeric_limits<double>::quiet_NaN(),
197 std::numeric_limits<double>::quiet_NaN(),
198 std::numeric_limits<double>::quiet_NaN()};
209 namespace MappingQImplementation
216 std::vector<Point<dim>>
218 const std::vector<unsigned int> &renumbering)
222 std::vector<Point<dim>> points(renumbering.size());
223 const unsigned int n1 = line_support_points.size();
224 for (
unsigned int q2 = 0, q = 0; q2 < (dim > 2 ? n1 : 1); ++q2)
225 for (
unsigned int q1 = 0; q1 < (dim > 1 ? n1 : 1); ++q1)
226 for (
unsigned int q0 = 0; q0 < n1; ++q0, ++q)
228 points[renumbering[q]][0] = line_support_points[q0][0];
230 points[renumbering[q]][1] = line_support_points[q1][0];
232 points[renumbering[q]][2] = line_support_points[q2][0];
246 inline ::Table<2, double>
253 if (polynomial_degree == 1)
256 const unsigned int M = polynomial_degree - 1;
257 const unsigned int n_inner_2d = M * M;
258 const unsigned int n_outer_2d = 4 + 4 * M;
261 loqvs.reinit(n_inner_2d, n_outer_2d);
263 for (
unsigned int i = 0; i < M; ++i)
264 for (
unsigned int j = 0; j < M; ++j)
267 gl.
point((i + 1) * (polynomial_degree + 1) + (j + 1));
268 const unsigned int index_table = i * M + j;
269 for (
unsigned int v = 0; v < 4; ++v)
270 loqvs(index_table, v) =
272 loqvs(index_table, 4 + i) = 1. - p[0];
273 loqvs(index_table, 4 + i + M) = p[0];
274 loqvs(index_table, 4 + j + 2 * M) = 1. - p[1];
275 loqvs(index_table, 4 + j + 3 * M) = p[1];
280 for (
unsigned int unit_point = 0; unit_point < n_inner_2d; ++unit_point)
281 Assert(std::fabs(std::accumulate(loqvs[unit_point].begin(),
282 loqvs[unit_point].end(),
284 1) < 1e-13 * polynomial_degree,
298 inline ::Table<2, double>
305 if (polynomial_degree == 1)
308 const unsigned int M = polynomial_degree - 1;
310 const unsigned int n_inner = Utilities::fixed_power<3>(M);
311 const unsigned int n_outer = 8 + 12 * M + 6 * M * M;
314 lohvs.reinit(n_inner, n_outer);
316 for (
unsigned int i = 0; i < M; ++i)
317 for (
unsigned int j = 0; j < M; ++j)
318 for (
unsigned int k = 0; k < M; ++k)
321 (j + 1) * (M + 2) + (k + 1));
322 const unsigned int index_table = i * M * M + j * M + k;
325 for (
unsigned int v = 0; v < 8; ++v)
326 lohvs(index_table, v) =
331 constexpr std::array<unsigned int, 4> line_coordinates_y(
334 for (
unsigned int l = 0; l < 4; ++l)
335 lohvs(index_table, 8 + line_coordinates_y[l] * M + j) =
340 constexpr std::array<unsigned int, 4> line_coordinates_x(
343 for (
unsigned int l = 0; l < 4; ++l)
344 lohvs(index_table, 8 + line_coordinates_x[l] * M + k) =
349 constexpr std::array<unsigned int, 4> line_coordinates_z(
352 for (
unsigned int l = 0; l < 4; ++l)
353 lohvs(index_table, 8 + line_coordinates_z[l] * M + i) =
358 lohvs(index_table, 8 + 12 * M + 0 * M * M + i * M + j) =
360 lohvs(index_table, 8 + 12 * M + 1 * M * M + i * M + j) = p[0];
361 lohvs(index_table, 8 + 12 * M + 2 * M * M + k * M + i) =
363 lohvs(index_table, 8 + 12 * M + 3 * M * M + k * M + i) = p[1];
364 lohvs(index_table, 8 + 12 * M + 4 * M * M + j * M + k) =
366 lohvs(index_table, 8 + 12 * M + 5 * M * M + j * M + k) = p[2];
371 for (
unsigned int unit_point = 0; unit_point < n_inner; ++unit_point)
372 Assert(std::fabs(std::accumulate(lohvs[unit_point].begin(),
373 lohvs[unit_point].end(),
375 1) < 1e-13 * polynomial_degree,
387 inline std::vector<::Table<2, double>>
389 const unsigned int polynomial_degree,
390 const unsigned int dim)
393 std::vector<::Table<2, double>> output(dim);
394 if (polynomial_degree <= 1)
399 output[0].reinit(polynomial_degree - 1,
401 for (
unsigned int q = 0; q < polynomial_degree - 1; ++q)
422 inline ::Table<2, double>
426 if (polynomial_degree <= 1)
427 return ::Table<2, double>();
430 const std::vector<unsigned int> h2l =
431 FETools::hierarchic_to_lexicographic_numbering<dim>(polynomial_degree);
436 for (
unsigned int q = 0; q < output.size(0); ++q)
453 template <
int dim,
int spacedim>
456 const typename ::MappingQ<dim, spacedim>::InternalData &data)
459 data.mapping_support_points.size());
463 for (
unsigned int i = 0; i < data.mapping_support_points.size(); ++i)
464 p_real += data.mapping_support_points[i] * data.shape(0, i);
475 template <
int dim,
int spacedim,
typename Number>
482 const std::vector<unsigned int> & renumber,
483 const bool print_iterations_to_deallog =
false)
485 if (print_iterations_to_deallog)
486 deallog <<
"Start MappingQ::do_transform_real_to_unit_cell for real "
487 <<
"point [ " << p <<
" ] " << std::endl;
504 polynomials_1d, points, p_unit, polynomials_1d.size() == 2, renumber);
513 f.
norm_square() - 1e-24 * p_real.second[0].norm_square()) ==
551 const double eps = 1.e-11;
552 const unsigned int newton_iteration_limit = 20;
555 invalid_point[0] = std::numeric_limits<double>::infinity();
556 bool tried_project_to_unit_cell =
false;
558 unsigned int newton_iteration = 0;
559 Number f_weighted_norm_square = 1.;
560 Number last_f_weighted_norm_square = 1.;
564 if (print_iterations_to_deallog)
565 deallog <<
"Newton iteration " << newton_iteration
566 <<
" for unit point guess " << p_unit << std::endl;
570 for (
unsigned int d = 0; d < spacedim; ++d)
571 for (
unsigned int e = 0; e < dim; ++e)
572 df[d][e] = p_real.second[e][d];
576 Number(std::numeric_limits<double>::min())) ==
577 Number(std::numeric_limits<double>::min())))
585 if (tried_project_to_unit_cell ==
false)
592 polynomials_1d.size() == 2,
594 f = p_real.first - p;
595 f_weighted_norm_square = 1.;
596 last_f_weighted_norm_square = 1;
597 tried_project_to_unit_cell =
true;
601 return invalid_point;
609 if (print_iterations_to_deallog)
610 deallog <<
" delta=" << delta << std::endl;
613 double step_length = 1.0;
621 for (
unsigned int i = 0; i < dim; ++i)
622 p_unit_trial[i] -= step_length * delta[i];
625 const auto p_real_trial =
630 polynomials_1d.size() == 2,
633 p_real_trial.first - p;
634 f_weighted_norm_square = (df_inverse * f_trial).norm_square();
636 if (print_iterations_to_deallog)
638 deallog <<
" step_length=" << step_length << std::endl;
639 if (step_length == 1.0)
640 deallog <<
" ||f || =" << f.norm() << std::endl;
641 deallog <<
" ||f*|| =" << f_trial.
norm() << std::endl
643 <<
std::sqrt(f_weighted_norm_square) << std::endl;
663 if (
std::max(f_weighted_norm_square - 1e-6 * 1e-6, Number(0.)) *
668 p_real = p_real_trial;
669 p_unit = p_unit_trial;
673 else if (step_length > 0.05)
684 if (step_length <= 0.05 && tried_project_to_unit_cell ==
false)
691 polynomials_1d.size() == 2,
693 f = p_real.first - p;
694 f_weighted_norm_square = 1.;
695 last_f_weighted_norm_square = 1;
696 tried_project_to_unit_cell =
true;
699 else if (step_length <= 0.05)
700 return invalid_point;
703 if (newton_iteration > newton_iteration_limit)
704 return invalid_point;
712 !(
std::max(f_weighted_norm_square - eps * eps, Number(0.)) *
713 std::max(last_f_weighted_norm_square -
714 std::min(f_weighted_norm_square, Number(1e-6 * 1e-6)) *
719 if (print_iterations_to_deallog)
720 deallog <<
"Iteration converged for p_unit = [ " << p_unit
721 <<
" ] and iteration error "
722 <<
std::sqrt(f_weighted_norm_square) << std::endl;
735 const typename ::Triangulation<dim, dim + 1>::cell_iterator &cell,
738 typename ::MappingQ<dim, dim + 1>::InternalData &mdata)
740 const unsigned int spacedim = dim + 1;
742 const unsigned int n_shapes = mdata.shape_values.size();
746 Assert(mdata.shape_second_derivatives.size() == n_shapes,
749 std::vector<Point<spacedim>> &points = mdata.mapping_support_points;
762 mdata.compute_shape_function_values(std::vector<
Point<dim>>(1, p_unit));
764 for (
unsigned int k = 0; k < mdata.n_shape_functions; ++k)
770 for (
unsigned int j = 0; j < dim; ++j)
772 DF[j] += grad_phi_k[j] * point_k;
773 for (
unsigned int l = 0; l < dim; ++l)
774 D2F[j][l] += hessian_k[j][l] * point_k;
779 p_minus_F -= compute_mapped_location_of_point<dim, spacedim>(mdata);
782 for (
unsigned int j = 0; j < dim; ++j)
783 f[j] = DF[j] * p_minus_F;
785 for (
unsigned int j = 0; j < dim; ++j)
787 f[j] = DF[j] * p_minus_F;
788 for (
unsigned int l = 0; l < dim; ++l)
789 df[j][l] = -DF[j] * DF[l] + D2F[j][l] * p_minus_F;
793 const double eps = 1.e-12 * cell->diameter();
794 const unsigned int loop_limit = 10;
796 unsigned int loop = 0;
798 while (f.
norm() > eps && loop++ < loop_limit)
805 for (
unsigned int j = 0; j < dim; ++j)
808 for (
unsigned int l = 0; l < dim; ++l)
812 mdata.compute_shape_function_values(
815 for (
unsigned int k = 0; k < mdata.n_shape_functions; ++k)
821 for (
unsigned int j = 0; j < dim; ++j)
823 DF[j] += grad_phi_k[j] * point_k;
824 for (
unsigned int l = 0; l < dim; ++l)
825 D2F[j][l] += hessian_k[j][l] * point_k;
832 p_minus_F -= compute_mapped_location_of_point<dim, spacedim>(mdata);
834 for (
unsigned int j = 0; j < dim; ++j)
836 f[j] = DF[j] * p_minus_F;
837 for (
unsigned int l = 0; l < dim; ++l)
838 df[j][l] = -DF[j] * DF[l] + D2F[j][l] * p_minus_F;
872 template <
int dim,
int spacedim>
880 (spacedim == 1 ? 3 : (spacedim == 2 ? 6 : 10));
898 1. / real_support_points[0].distance(real_support_points[1]))
911 Assert(dim == spacedim || real_support_points.size() ==
916 const auto affine = GridTools::affine_cell_approximation<dim>(
919 affine.first.covariant_form().transpose();
926 for (
unsigned int d = 0; d < spacedim; ++d)
927 for (
unsigned int e = 0; e < dim; ++e)
935 std::array<double, n_functions> shape_values;
941 shape_values[0] = 1.;
945 for (
unsigned int d = 0; d < spacedim; ++d)
946 shape_values[1 + d] = p_scaled[d];
947 for (
unsigned int d = 0, c = 0; d < spacedim; ++d)
948 for (
unsigned int e = 0; e <= d; ++e, ++c)
949 shape_values[1 + spacedim + c] = p_scaled[d] * p_scaled[e];
958 matrix[i][j] += shape_values[i] * shape_values[j];
971 for (
unsigned int j = 0; j < i; ++j)
973 double Lik_Ljk_sum = 0;
974 for (
unsigned int k = 0; k < j; ++k)
975 Lik_Ljk_sum += matrix[i][k] * matrix[j][k];
976 matrix[i][j] = matrix[j][j] * (matrix[i][j] - Lik_Ljk_sum);
977 Lij_sum += matrix[i][j] * matrix[i][j];
980 ExcMessage(
"Matrix of normal equations not positive "
986 matrix[i][i] = 1. /
std::sqrt(matrix[i][i] - Lij_sum);
993 for (
unsigned int j = 0; j < i; ++j)
1003 for (
unsigned int j = i + 1; j <
n_functions; ++j)
1011 for (
unsigned int i = dim + 1; i <
n_functions; ++i)
1028 template <
typename Number>
1033 for (
unsigned int d = 0; d < dim; ++d)
1041 for (
unsigned int d = 0; d < spacedim; ++d)
1044 for (
unsigned int d = 0; d < spacedim; ++d)
1050 for (
unsigned int d = 0, c = 0; d < spacedim; ++d)
1051 for (
unsigned int e = 0; e <= d; ++e, ++c)
1053 coefficients[1 + spacedim + c] * (p_scaled[d] * p_scaled[e]);
1064 const Number affine_distance_to_unit_cell =
1067 for (
unsigned int d = 0; d < dim; ++d)
1068 result[d] = compare_and_apply_mask<SIMDComparison::greater_than>(
1069 distance_to_unit_cell,
1070 affine_distance_to_unit_cell + 0.5,
1112 template <
int dim,
int spacedim>
1116 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1120 const UpdateFlags update_flags = data.update_each;
1122 using VectorizedArrayType =
1123 typename ::MappingQ<dim,
1124 spacedim>::InternalData::VectorizedArrayType;
1125 const unsigned int n_shape_values = data.n_shape_functions;
1126 const unsigned int n_q_points = data.shape_info.n_q_points;
1127 constexpr unsigned int n_lanes = VectorizedArrayType::size();
1128 constexpr unsigned int n_comp = 1 + (spacedim - 1) / n_lanes;
1129 constexpr unsigned int n_hessians = (dim * (dim + 1)) / 2;
1146 n_q_points == quadrature_points.size(),
1149 data.n_shape_functions > 0,
1152 n_q_points == data.contravariant.size(),
1155 n_q_points == jacobian_grads.size(),
1161 data.shape_info.element_type ==
1164 for (
unsigned int q = 0; q < n_q_points; ++q)
1165 quadrature_points[q] =
1166 data.mapping_support_points[data.shape_info
1167 .lexicographic_numbering[q]];
1180 for (
unsigned int i = 0; i < n_shape_values * n_comp; ++i)
1183 const std::vector<unsigned int> &renumber_to_lexicographic =
1184 data.shape_info.lexicographic_numbering;
1185 for (
unsigned int i = 0; i < n_shape_values; ++i)
1186 for (
unsigned int d = 0; d < spacedim; ++d)
1188 const unsigned int in_comp = d % n_lanes;
1189 const unsigned int out_comp = d / n_lanes;
1192 data.mapping_support_points[renumber_to_lexicographic[i]][d];
1203 for (
unsigned int out_comp = 0; out_comp < n_comp; ++out_comp)
1204 for (
unsigned int i = 0; i < n_q_points; ++i)
1205 for (
unsigned int in_comp = 0;
1206 in_comp < n_lanes && in_comp < spacedim - out_comp * n_lanes;
1208 quadrature_points[i][out_comp * n_lanes + in_comp] =
1209 eval.
begin_values()[out_comp * n_q_points + i][in_comp];
1214 std::fill(data.contravariant.begin(),
1215 data.contravariant.end(),
1218 for (
unsigned int out_comp = 0; out_comp < n_comp; ++out_comp)
1219 for (
unsigned int point = 0; point < n_q_points; ++point)
1220 for (
unsigned int j = 0; j < dim; ++j)
1221 for (
unsigned int in_comp = 0;
1222 in_comp < n_lanes &&
1223 in_comp < spacedim - out_comp * n_lanes;
1226 const unsigned int total_number = point * dim + j;
1227 const unsigned int new_comp = total_number / n_q_points;
1228 const unsigned int new_point = total_number % n_q_points;
1229 data.contravariant[new_point][out_comp * n_lanes + in_comp]
1238 for (
unsigned int point = 0; point < n_q_points; ++point)
1239 data.covariant[point] =
1240 (data.contravariant[point]).covariant_form();
1244 for (
unsigned int point = 0; point < n_q_points; ++point)
1245 data.volume_elements[point] =
1246 data.contravariant[point].determinant();
1250 constexpr int desymmetrize_3d[6][2] = {
1251 {0, 0}, {1, 1}, {2, 2}, {0, 1}, {0, 2}, {1, 2}};
1252 constexpr int desymmetrize_2d[3][2] = {{0, 0}, {1, 1}, {0, 1}};
1255 for (
unsigned int out_comp = 0; out_comp < n_comp; ++out_comp)
1256 for (
unsigned int point = 0; point < n_q_points; ++point)
1257 for (
unsigned int j = 0; j < n_hessians; ++j)
1258 for (
unsigned int in_comp = 0;
1259 in_comp < n_lanes &&
1260 in_comp < spacedim - out_comp * n_lanes;
1263 const unsigned int total_number = point * n_hessians + j;
1264 const unsigned int new_point = total_number % n_q_points;
1265 const unsigned int new_hessian_comp =
1266 total_number / n_q_points;
1267 const unsigned int new_hessian_comp_i =
1268 dim == 2 ? desymmetrize_2d[new_hessian_comp][0] :
1269 desymmetrize_3d[new_hessian_comp][0];
1270 const unsigned int new_hessian_comp_j =
1271 dim == 2 ? desymmetrize_2d[new_hessian_comp][1] :
1272 desymmetrize_3d[new_hessian_comp][1];
1273 const double value =
1277 jacobian_grads[new_point][out_comp * n_lanes + in_comp]
1278 [new_hessian_comp_i][new_hessian_comp_j] =
1280 jacobian_grads[new_point][out_comp * n_lanes + in_comp]
1281 [new_hessian_comp_j][new_hessian_comp_i] =
1294 template <
int dim,
int spacedim>
1298 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1301 const UpdateFlags update_flags = data.update_each;
1304 for (
unsigned int point = 0; point < quadrature_points.size(); ++point)
1306 const double * shape = &data.shape(point + data_set, 0);
1308 (shape[0] * data.mapping_support_points[0]);
1309 for (
unsigned int k = 1; k < data.n_shape_functions; ++k)
1310 for (
unsigned int i = 0; i < spacedim; ++i)
1311 result[i] += shape[k] * data.mapping_support_points[k][i];
1312 quadrature_points[point] = result;
1326 template <
int dim,
int spacedim>
1330 const typename ::QProjector<dim>::DataSetDescriptor data_set,
1331 const typename ::MappingQ<dim, spacedim>::InternalData &data)
1333 const UpdateFlags update_flags = data.update_each;
1341 const unsigned int n_q_points = data.contravariant.size();
1343 std::fill(data.contravariant.begin(),
1344 data.contravariant.end(),
1349 for (
unsigned int point = 0; point < n_q_points; ++point)
1351 double result[spacedim][dim];
1355 for (
unsigned int i = 0; i < spacedim; ++i)
1356 for (
unsigned int j = 0; j < dim; ++j)
1357 result[i][j] = data.derivative(point + data_set, 0)[j] *
1358 data.mapping_support_points[0][i];
1359 for (
unsigned int k = 1; k < data.n_shape_functions; ++k)
1360 for (
unsigned int i = 0; i < spacedim; ++i)
1361 for (
unsigned int j = 0; j < dim; ++j)
1362 result[i][j] += data.derivative(point + data_set, k)[j] *
1363 data.mapping_support_points[k][i];
1370 for (
unsigned int i = 0; i < spacedim; ++i)
1371 for (
unsigned int j = 0; j < dim; ++j)
1372 data.contravariant[point][i][j] = result[i][j];
1379 const unsigned int n_q_points = data.contravariant.size();
1380 for (
unsigned int point = 0; point < n_q_points; ++point)
1382 data.covariant[point] =
1383 (data.contravariant[point]).covariant_form();
1390 const unsigned int n_q_points = data.contravariant.size();
1391 for (
unsigned int point = 0; point < n_q_points; ++point)
1392 data.volume_elements[point] =
1393 data.contravariant[point].determinant();
1405 template <
int dim,
int spacedim>
1410 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1413 const UpdateFlags update_flags = data.update_each;
1416 const unsigned int n_q_points = jacobian_grads.size();
1419 for (
unsigned int point = 0; point < n_q_points; ++point)
1422 &data.second_derivative(point + data_set, 0);
1423 double result[spacedim][dim][dim];
1424 for (
unsigned int i = 0; i < spacedim; ++i)
1425 for (
unsigned int j = 0; j < dim; ++j)
1426 for (
unsigned int l = 0; l < dim; ++l)
1428 (
second[0][j][l] * data.mapping_support_points[0][i]);
1429 for (
unsigned int k = 1; k < data.n_shape_functions; ++k)
1430 for (
unsigned int i = 0; i < spacedim; ++i)
1431 for (
unsigned int j = 0; j < dim; ++j)
1432 for (
unsigned int l = 0; l < dim; ++l)
1434 (
second[k][j][l] * data.mapping_support_points[k][i]);
1436 for (
unsigned int i = 0; i < spacedim; ++i)
1437 for (
unsigned int j = 0; j < dim; ++j)
1438 for (
unsigned int l = 0; l < dim; ++l)
1439 jacobian_grads[point][i][j][l] = result[i][j][l];
1452 template <
int dim,
int spacedim>
1457 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1460 const UpdateFlags update_flags = data.update_each;
1463 const unsigned int n_q_points = jacobian_pushed_forward_grads.size();
1467 double tmp[spacedim][spacedim][spacedim];
1468 for (
unsigned int point = 0; point < n_q_points; ++point)
1471 &data.second_derivative(point + data_set, 0);
1472 double result[spacedim][dim][dim];
1473 for (
unsigned int i = 0; i < spacedim; ++i)
1474 for (
unsigned int j = 0; j < dim; ++j)
1475 for (
unsigned int l = 0; l < dim; ++l)
1477 (
second[0][j][l] * data.mapping_support_points[0][i]);
1478 for (
unsigned int k = 1; k < data.n_shape_functions; ++k)
1479 for (
unsigned int i = 0; i < spacedim; ++i)
1480 for (
unsigned int j = 0; j < dim; ++j)
1481 for (
unsigned int l = 0; l < dim; ++l)
1484 data.mapping_support_points[k][i]);
1487 for (
unsigned int i = 0; i < spacedim; ++i)
1488 for (
unsigned int j = 0; j < spacedim; ++j)
1489 for (
unsigned int l = 0; l < dim; ++l)
1492 result[i][0][l] * data.covariant[point][j][0];
1493 for (
unsigned int jr = 1; jr < dim; ++jr)
1496 result[i][jr][l] * data.covariant[point][j][jr];
1501 for (
unsigned int i = 0; i < spacedim; ++i)
1502 for (
unsigned int j = 0; j < spacedim; ++j)
1503 for (
unsigned int l = 0; l < spacedim; ++l)
1505 jacobian_pushed_forward_grads[point][i][j][l] =
1506 tmp[i][j][0] * data.covariant[point][l][0];
1507 for (
unsigned int lr = 1; lr < dim; ++lr)
1509 jacobian_pushed_forward_grads[point][i][j][l] +=
1510 tmp[i][j][lr] * data.covariant[point][l][lr];
1526 template <
int dim,
int spacedim>
1531 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1534 const UpdateFlags update_flags = data.update_each;
1537 const unsigned int n_q_points = jacobian_2nd_derivatives.size();
1541 for (
unsigned int point = 0; point < n_q_points; ++point)
1544 &data.third_derivative(point + data_set, 0);
1545 double result[spacedim][dim][dim][dim];
1546 for (
unsigned int i = 0; i < spacedim; ++i)
1547 for (
unsigned int j = 0; j < dim; ++j)
1548 for (
unsigned int l = 0; l < dim; ++l)
1549 for (
unsigned int m = 0; m < dim; ++m)
1550 result[i][j][l][m] =
1551 (third[0][j][l][m] *
1552 data.mapping_support_points[0][i]);
1553 for (
unsigned int k = 1; k < data.n_shape_functions; ++k)
1554 for (
unsigned int i = 0; i < spacedim; ++i)
1555 for (
unsigned int j = 0; j < dim; ++j)
1556 for (
unsigned int l = 0; l < dim; ++l)
1557 for (
unsigned int m = 0; m < dim; ++m)
1558 result[i][j][l][m] +=
1559 (third[k][j][l][m] *
1560 data.mapping_support_points[k][i]);
1562 for (
unsigned int i = 0; i < spacedim; ++i)
1563 for (
unsigned int j = 0; j < dim; ++j)
1564 for (
unsigned int l = 0; l < dim; ++l)
1565 for (
unsigned int m = 0; m < dim; ++m)
1566 jacobian_2nd_derivatives[point][i][j][l][m] =
1582 template <
int dim,
int spacedim>
1587 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1590 const UpdateFlags update_flags = data.update_each;
1593 const unsigned int n_q_points =
1594 jacobian_pushed_forward_2nd_derivatives.size();
1598 double tmp[spacedim][spacedim][spacedim][spacedim];
1599 for (
unsigned int point = 0; point < n_q_points; ++point)
1602 &data.third_derivative(point + data_set, 0);
1603 double result[spacedim][dim][dim][dim];
1604 for (
unsigned int i = 0; i < spacedim; ++i)
1605 for (
unsigned int j = 0; j < dim; ++j)
1606 for (
unsigned int l = 0; l < dim; ++l)
1607 for (
unsigned int m = 0; m < dim; ++m)
1608 result[i][j][l][m] =
1609 (third[0][j][l][m] *
1610 data.mapping_support_points[0][i]);
1611 for (
unsigned int k = 1; k < data.n_shape_functions; ++k)
1612 for (
unsigned int i = 0; i < spacedim; ++i)
1613 for (
unsigned int j = 0; j < dim; ++j)
1614 for (
unsigned int l = 0; l < dim; ++l)
1615 for (
unsigned int m = 0; m < dim; ++m)
1616 result[i][j][l][m] +=
1617 (third[k][j][l][m] *
1618 data.mapping_support_points[k][i]);
1621 for (
unsigned int i = 0; i < spacedim; ++i)
1622 for (
unsigned int j = 0; j < spacedim; ++j)
1623 for (
unsigned int l = 0; l < dim; ++l)
1624 for (
unsigned int m = 0; m < dim; ++m)
1626 jacobian_pushed_forward_2nd_derivatives
1627 [point][i][j][l][m] = result[i][0][l][m] *
1628 data.covariant[point][j][0];
1629 for (
unsigned int jr = 1; jr < dim; ++jr)
1630 jacobian_pushed_forward_2nd_derivatives[point][i]
1633 result[i][jr][l][m] *
1634 data.covariant[point][j][jr];
1638 for (
unsigned int i = 0; i < spacedim; ++i)
1639 for (
unsigned int j = 0; j < spacedim; ++j)
1640 for (
unsigned int l = 0; l < spacedim; ++l)
1641 for (
unsigned int m = 0; m < dim; ++m)
1644 jacobian_pushed_forward_2nd_derivatives[point][i]
1646 data.covariant[point][l][0];
1647 for (
unsigned int lr = 1; lr < dim; ++lr)
1649 jacobian_pushed_forward_2nd_derivatives[point]
1652 data.covariant[point][l][lr];
1656 for (
unsigned int i = 0; i < spacedim; ++i)
1657 for (
unsigned int j = 0; j < spacedim; ++j)
1658 for (
unsigned int l = 0; l < spacedim; ++l)
1659 for (
unsigned int m = 0; m < spacedim; ++m)
1661 jacobian_pushed_forward_2nd_derivatives
1662 [point][i][j][l][m] =
1663 tmp[i][j][l][0] * data.covariant[point][m][0];
1664 for (
unsigned int mr = 1; mr < dim; ++mr)
1665 jacobian_pushed_forward_2nd_derivatives[point][i]
1668 tmp[i][j][l][mr] * data.covariant[point][m][mr];
1683 template <
int dim,
int spacedim>
1688 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1691 const UpdateFlags update_flags = data.update_each;
1694 const unsigned int n_q_points = jacobian_3rd_derivatives.size();
1698 for (
unsigned int point = 0; point < n_q_points; ++point)
1701 &data.fourth_derivative(point + data_set, 0);
1702 double result[spacedim][dim][dim][dim][dim];
1703 for (
unsigned int i = 0; i < spacedim; ++i)
1704 for (
unsigned int j = 0; j < dim; ++j)
1705 for (
unsigned int l = 0; l < dim; ++l)
1706 for (
unsigned int m = 0; m < dim; ++m)
1707 for (
unsigned int n = 0; n < dim; ++n)
1708 result[i][j][l][m][n] =
1709 (fourth[0][j][l][m][n] *
1710 data.mapping_support_points[0][i]);
1711 for (
unsigned int k = 1; k < data.n_shape_functions; ++k)
1712 for (
unsigned int i = 0; i < spacedim; ++i)
1713 for (
unsigned int j = 0; j < dim; ++j)
1714 for (
unsigned int l = 0; l < dim; ++l)
1715 for (
unsigned int m = 0; m < dim; ++m)
1716 for (
unsigned int n = 0; n < dim; ++n)
1717 result[i][j][l][m][n] +=
1718 (fourth[k][j][l][m][n] *
1719 data.mapping_support_points[k][i]);
1721 for (
unsigned int i = 0; i < spacedim; ++i)
1722 for (
unsigned int j = 0; j < dim; ++j)
1723 for (
unsigned int l = 0; l < dim; ++l)
1724 for (
unsigned int m = 0; m < dim; ++m)
1725 for (
unsigned int n = 0; n < dim; ++n)
1726 jacobian_3rd_derivatives[point][i][j][l][m][n] =
1727 result[i][j][l][m][n];
1742 template <
int dim,
int spacedim>
1747 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1750 const UpdateFlags update_flags = data.update_each;
1753 const unsigned int n_q_points =
1754 jacobian_pushed_forward_3rd_derivatives.size();
1758 double tmp[spacedim][spacedim][spacedim][spacedim][spacedim];
1759 for (
unsigned int point = 0; point < n_q_points; ++point)
1762 &data.fourth_derivative(point + data_set, 0);
1763 double result[spacedim][dim][dim][dim][dim];
1764 for (
unsigned int i = 0; i < spacedim; ++i)
1765 for (
unsigned int j = 0; j < dim; ++j)
1766 for (
unsigned int l = 0; l < dim; ++l)
1767 for (
unsigned int m = 0; m < dim; ++m)
1768 for (
unsigned int n = 0; n < dim; ++n)
1769 result[i][j][l][m][n] =
1770 (fourth[0][j][l][m][n] *
1771 data.mapping_support_points[0][i]);
1772 for (
unsigned int k = 1; k < data.n_shape_functions; ++k)
1773 for (
unsigned int i = 0; i < spacedim; ++i)
1774 for (
unsigned int j = 0; j < dim; ++j)
1775 for (
unsigned int l = 0; l < dim; ++l)
1776 for (
unsigned int m = 0; m < dim; ++m)
1777 for (
unsigned int n = 0; n < dim; ++n)
1778 result[i][j][l][m][n] +=
1779 (fourth[k][j][l][m][n] *
1780 data.mapping_support_points[k][i]);
1783 for (
unsigned int i = 0; i < spacedim; ++i)
1784 for (
unsigned int j = 0; j < spacedim; ++j)
1785 for (
unsigned int l = 0; l < dim; ++l)
1786 for (
unsigned int m = 0; m < dim; ++m)
1787 for (
unsigned int n = 0; n < dim; ++n)
1789 tmp[i][j][l][m][n] = result[i][0][l][m][n] *
1790 data.covariant[point][j][0];
1791 for (
unsigned int jr = 1; jr < dim; ++jr)
1792 tmp[i][j][l][m][n] +=
1793 result[i][jr][l][m][n] *
1794 data.covariant[point][j][jr];
1798 for (
unsigned int i = 0; i < spacedim; ++i)
1799 for (
unsigned int j = 0; j < spacedim; ++j)
1800 for (
unsigned int l = 0; l < spacedim; ++l)
1801 for (
unsigned int m = 0; m < dim; ++m)
1802 for (
unsigned int n = 0; n < dim; ++n)
1804 jacobian_pushed_forward_3rd_derivatives
1805 [point][i][j][l][m][n] =
1806 tmp[i][j][0][m][n] *
1807 data.covariant[point][l][0];
1808 for (
unsigned int lr = 1; lr < dim; ++lr)
1809 jacobian_pushed_forward_3rd_derivatives[point]
1812 tmp[i][j][lr][m][n] *
1813 data.covariant[point][l][lr];
1817 for (
unsigned int i = 0; i < spacedim; ++i)
1818 for (
unsigned int j = 0; j < spacedim; ++j)
1819 for (
unsigned int l = 0; l < spacedim; ++l)
1820 for (
unsigned int m = 0; m < spacedim; ++m)
1821 for (
unsigned int n = 0; n < dim; ++n)
1823 tmp[i][j][l][m][n] =
1824 jacobian_pushed_forward_3rd_derivatives[point]
1827 data.covariant[point][m][0];
1828 for (
unsigned int mr = 1; mr < dim; ++mr)
1829 tmp[i][j][l][m][n] +=
1830 jacobian_pushed_forward_3rd_derivatives
1831 [point][i][j][l][mr][n] *
1832 data.covariant[point][m][mr];
1836 for (
unsigned int i = 0; i < spacedim; ++i)
1837 for (
unsigned int j = 0; j < spacedim; ++j)
1838 for (
unsigned int l = 0; l < spacedim; ++l)
1839 for (
unsigned int m = 0; m < spacedim; ++m)
1840 for (
unsigned int n = 0; n < spacedim; ++n)
1842 jacobian_pushed_forward_3rd_derivatives
1843 [point][i][j][l][m][n] =
1844 tmp[i][j][l][m][0] *
1845 data.covariant[point][n][0];
1846 for (
unsigned int nr = 1; nr < dim; ++nr)
1847 jacobian_pushed_forward_3rd_derivatives[point]
1850 tmp[i][j][l][m][nr] *
1851 data.covariant[point][n][nr];
1869 template <
int dim,
int spacedim>
1872 const ::MappingQ<dim, spacedim> &mapping,
1873 const typename ::Triangulation<dim, spacedim>::cell_iterator &cell,
1874 const unsigned int face_no,
1875 const unsigned int subface_no,
1876 const unsigned int n_q_points,
1877 const std::vector<double> & weights,
1878 const typename ::MappingQ<dim, spacedim>::InternalData &data,
1882 const UpdateFlags update_flags = data.update_each;
1903 for (
unsigned int d = 0; d != dim - 1; ++d)
1906 data.unit_tangentials.size(),
1909 data.aux[d].size() <=
1911 .unit_tangentials[face_no +
1918 data.unit_tangentials[face_no +
1929 if (dim == spacedim)
1931 for (
unsigned int i = 0; i < n_q_points; ++i)
1941 (face_no == 0 ? -1 : +1);
1965 for (
unsigned int point = 0; point < n_q_points; ++point)
1971 data.contravariant[point].transpose()[0];
1973 (face_no == 0 ? -1. : +1.) *
1984 cell_normal /= cell_normal.
norm();
1996 for (
unsigned int i = 0; i < output_data.
boundary_forms.size(); ++i)
2004 cell->subface_case(face_no), subface_no);
2010 for (
unsigned int i = 0; i < output_data.
normal_vectors.size(); ++i)
2016 for (
unsigned int point = 0; point < n_q_points; ++point)
2017 output_data.
jacobians[point] = data.contravariant[point];
2020 for (
unsigned int point = 0; point < n_q_points; ++point)
2022 data.covariant[point].transpose();
2033 template <
int dim,
int spacedim>
2036 const ::MappingQ<dim, spacedim> &mapping,
2037 const typename ::Triangulation<dim, spacedim>::cell_iterator &cell,
2038 const unsigned int face_no,
2039 const unsigned int subface_no,
2042 const typename ::MappingQ<dim, spacedim>::InternalData &data,
2046 if (dim > 1 && data.tensor_product_quadrature)
2048 maybe_update_q_points_Jacobians_and_grads_tensor<dim, spacedim>(
2056 maybe_compute_q_points<dim, spacedim>(data_set,
2062 maybe_update_jacobian_grads<dim, spacedim>(
2065 maybe_update_jacobian_pushed_forward_grads<dim, spacedim>(
2070 maybe_update_jacobian_2nd_derivatives<dim, spacedim>(
2075 maybe_update_jacobian_pushed_forward_2nd_derivatives<dim, spacedim>(
2080 maybe_update_jacobian_3rd_derivatives<dim, spacedim>(
2085 maybe_update_jacobian_pushed_forward_3rd_derivatives<dim, spacedim>(
2106 template <
int dim,
int spacedim,
int rank>
2116 const typename ::MappingQ<dim, spacedim>::InternalData *
>(
2117 &mapping_data) !=
nullptr),
2119 const typename ::MappingQ<dim, spacedim>::InternalData &data =
2121 const typename ::MappingQ<dim, spacedim>::InternalData &
>(
2124 switch (mapping_kind)
2130 "update_contravariant_transformation"));
2132 for (
unsigned int i = 0; i < output.size(); ++i)
2143 "update_contravariant_transformation"));
2146 "update_volume_elements"));
2151 for (
unsigned int i = 0; i < output.size(); ++i)
2155 output[i] /= data.volume_elements[i];
2166 "update_covariant_transformation"));
2168 for (
unsigned int i = 0; i < output.size(); ++i)
2184 template <
int dim,
int spacedim,
int rank>
2194 const typename ::MappingQ<dim, spacedim>::InternalData *
>(
2195 &mapping_data) !=
nullptr),
2197 const typename ::MappingQ<dim, spacedim>::InternalData &data =
2199 const typename ::MappingQ<dim, spacedim>::InternalData &
>(
2202 switch (mapping_kind)
2208 "update_covariant_transformation"));
2211 "update_contravariant_transformation"));
2214 for (
unsigned int i = 0; i < output.size(); ++i)
2230 "update_covariant_transformation"));
2233 for (
unsigned int i = 0; i < output.size(); ++i)
2249 "update_covariant_transformation"));
2252 "update_contravariant_transformation"));
2255 "update_volume_elements"));
2258 for (
unsigned int i = 0; i < output.size(); ++i)
2266 output[i] /= data.volume_elements[i];
2282 template <
int dim,
int spacedim>
2292 const typename ::MappingQ<dim, spacedim>::InternalData *
>(
2293 &mapping_data) !=
nullptr),
2295 const typename ::MappingQ<dim, spacedim>::InternalData &data =
2297 const typename ::MappingQ<dim, spacedim>::InternalData &
>(
2300 switch (mapping_kind)
2306 "update_covariant_transformation"));
2309 "update_contravariant_transformation"));
2311 for (
unsigned int q = 0; q < output.size(); ++q)
2312 for (
unsigned int i = 0; i < spacedim; ++i)
2314 double tmp1[dim][dim];
2315 for (
unsigned int J = 0; J < dim; ++J)
2316 for (
unsigned int K = 0; K < dim; ++K)
2319 data.contravariant[q][i][0] * input[q][0][J][K];
2320 for (
unsigned int I = 1; I < dim; ++I)
2322 data.contravariant[q][i][I] * input[q][I][J][K];
2324 for (
unsigned int j = 0; j < spacedim; ++j)
2327 for (
unsigned int K = 0; K < dim; ++K)
2329 tmp2[K] = data.covariant[q][j][0] * tmp1[0][K];
2330 for (
unsigned int J = 1; J < dim; ++J)
2331 tmp2[K] += data.covariant[q][j][J] * tmp1[J][K];
2333 for (
unsigned int k = 0; k < spacedim; ++k)
2335 output[q][i][j][k] =
2336 data.covariant[q][k][0] * tmp2[0];
2337 for (
unsigned int K = 1; K < dim; ++K)
2338 output[q][i][j][k] +=
2339 data.covariant[q][k][K] * tmp2[K];
2350 "update_covariant_transformation"));
2352 for (
unsigned int q = 0; q < output.size(); ++q)
2353 for (
unsigned int i = 0; i < spacedim; ++i)
2355 double tmp1[dim][dim];
2356 for (
unsigned int J = 0; J < dim; ++J)
2357 for (
unsigned int K = 0; K < dim; ++K)
2360 data.covariant[q][i][0] * input[q][0][J][K];
2361 for (
unsigned int I = 1; I < dim; ++I)
2363 data.covariant[q][i][I] * input[q][I][J][K];
2365 for (
unsigned int j = 0; j < spacedim; ++j)
2368 for (
unsigned int K = 0; K < dim; ++K)
2370 tmp2[K] = data.covariant[q][j][0] * tmp1[0][K];
2371 for (
unsigned int J = 1; J < dim; ++J)
2372 tmp2[K] += data.covariant[q][j][J] * tmp1[J][K];
2374 for (
unsigned int k = 0; k < spacedim; ++k)
2376 output[q][i][j][k] =
2377 data.covariant[q][k][0] * tmp2[0];
2378 for (
unsigned int K = 1; K < dim; ++K)
2379 output[q][i][j][k] +=
2380 data.covariant[q][k][K] * tmp2[K];
2392 "update_covariant_transformation"));
2395 "update_contravariant_transformation"));
2398 "update_volume_elements"));
2400 for (
unsigned int q = 0; q < output.size(); ++q)
2401 for (
unsigned int i = 0; i < spacedim; ++i)
2404 for (
unsigned int I = 0; I < dim; ++I)
2406 data.contravariant[q][i][I] / data.volume_elements[q];
2407 double tmp1[dim][dim];
2408 for (
unsigned int J = 0; J < dim; ++J)
2409 for (
unsigned int K = 0; K < dim; ++K)
2411 tmp1[J][K] = factor[0] * input[q][0][J][K];
2412 for (
unsigned int I = 1; I < dim; ++I)
2413 tmp1[J][K] += factor[I] * input[q][I][J][K];
2415 for (
unsigned int j = 0; j < spacedim; ++j)
2418 for (
unsigned int K = 0; K < dim; ++K)
2420 tmp2[K] = data.covariant[q][j][0] * tmp1[0][K];
2421 for (
unsigned int J = 1; J < dim; ++J)
2422 tmp2[K] += data.covariant[q][j][J] * tmp1[J][K];
2424 for (
unsigned int k = 0; k < spacedim; ++k)
2426 output[q][i][j][k] =
2427 data.covariant[q][k][0] * tmp2[0];
2428 for (
unsigned int K = 1; K < dim; ++K)
2429 output[q][i][j][k] +=
2430 data.covariant[q][k][K] * tmp2[K];
2449 template <
int dim,
int spacedim,
int rank>
2459 const typename ::MappingQ<dim, spacedim>::InternalData *
>(
2460 &mapping_data) !=
nullptr),
2462 const typename ::MappingQ<dim, spacedim>::InternalData &data =
2464 const typename ::MappingQ<dim, spacedim>::InternalData &
>(
2467 switch (mapping_kind)
2473 "update_covariant_transformation"));
2475 for (
unsigned int i = 0; i < output.size(); ++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
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_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
@ 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_jacobians
Volume element.
@ update_inverse_jacobians
Volume element.
@ update_quadrature_points
Transformed quadrature points.
@ update_jacobian_pushed_forward_3rd_derivatives
@ update_boundary_forms
Outer normal vector, not normalized.
@ update_jacobian_2nd_derivatives
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)
@ 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_3rd_derivatives(const CellSimilarity::Similarity cell_similarity, const typename QProjector< dim >::DataSetDescriptor data_set, const typename ::MappingQ< dim, spacedim >::InternalData &data, std::vector< Tensor< 5, spacedim > > &jacobian_pushed_forward_3rd_derivatives)
inline ::Table< 2, double > compute_support_point_weights_cell(const unsigned int polynomial_degree)
void maybe_compute_q_points(const typename QProjector< dim >::DataSetDescriptor data_set, const typename ::MappingQ< dim, spacedim >::InternalData &data, std::vector< Point< spacedim > > &quadrature_points)
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_3rd_derivatives(const CellSimilarity::Similarity cell_similarity, const typename QProjector< dim >::DataSetDescriptor data_set, const typename ::MappingQ< dim, spacedim >::InternalData &data, std::vector< DerivativeForm< 4, dim, spacedim > > &jacobian_3rd_derivatives)
void maybe_update_jacobian_pushed_forward_grads(const CellSimilarity::Similarity cell_similarity, const typename QProjector< dim >::DataSetDescriptor data_set, const typename ::MappingQ< dim, spacedim >::InternalData &data, std::vector< Tensor< 3, spacedim > > &jacobian_pushed_forward_grads)
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_Jacobians(const CellSimilarity::Similarity cell_similarity, const typename ::QProjector< dim >::DataSetDescriptor data_set, const typename ::MappingQ< dim, spacedim >::InternalData &data)
inline ::Table< 2, double > compute_support_point_weights_on_quad(const unsigned int polynomial_degree)
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 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 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, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data)
void maybe_update_jacobian_2nd_derivatives(const CellSimilarity::Similarity cell_similarity, const typename QProjector< dim >::DataSetDescriptor data_set, const typename ::MappingQ< dim, spacedim >::InternalData &data, std::vector< DerivativeForm< 3, dim, spacedim > > &jacobian_2nd_derivatives)
void maybe_update_jacobian_grads(const CellSimilarity::Similarity cell_similarity, const typename QProjector< dim >::DataSetDescriptor data_set, const typename ::MappingQ< dim, spacedim >::InternalData &data, std::vector< DerivativeForm< 2, dim, spacedim > > &jacobian_grads)
void maybe_update_jacobian_pushed_forward_2nd_derivatives(const CellSimilarity::Similarity cell_similarity, const typename QProjector< dim >::DataSetDescriptor data_set, const typename ::MappingQ< dim, spacedim >::InternalData &data, std::vector< Tensor< 4, spacedim > > &jacobian_pushed_forward_2nd_derivatives)
std::vector<::Table< 2, double > > compute_support_point_weights_perimeter_to_interior(const unsigned int polynomial_degree, const unsigned int dim)
Point< spacedim > compute_mapped_location_of_point(const typename ::MappingQ< dim, spacedim >::InternalData &data)
Point< dim > do_transform_real_to_unit_cell_internal_codim1(const typename ::Triangulation< dim, dim+1 >::cell_iterator &cell, const Point< dim+1 > &p, const Point< dim > &initial_p_unit, typename ::MappingQ< dim, dim+1 >::InternalData &mdata)
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_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< 2, dim, spacedim > > &jacobian_grads)
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={})
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 > &)
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 void evaluate(const unsigned int n_components, const EvaluationFlags::EvaluationFlags evaluation_flag, const Number *values_dofs, FEEvaluationData< dim, Number, false > &fe_eval)
constexpr Number determinant(const SymmetricTensor< 2, dim, Number > &)
constexpr SymmetricTensor< 2, dim, Number > invert(const SymmetricTensor< 2, dim, Number > &)
constexpr Tensor< 1, dim, Number > cross_product_2d(const Tensor< 1, dim, Number > &src)
constexpr Tensor< 1, dim, typename ProductType< Number1, Number2 >::type > cross_product_3d(const Tensor< 1, dim, Number1 > &src1, const Tensor< 1, dim, Number2 > &src2)