16#ifndef dealii_mapping_q_internal_h
17#define dealii_mapping_q_internal_h
60 template <
int spacedim>
74 template <
int spacedim>
86 const long double x = p(0);
87 const long double y = p(1);
89 const long double x0 =
vertices[0](0);
90 const long double x1 =
vertices[1](0);
91 const long double x2 =
vertices[2](0);
92 const long double x3 =
vertices[3](0);
94 const long double y0 =
vertices[0](1);
95 const long double y1 =
vertices[1](1);
96 const long double y2 =
vertices[2](1);
97 const long double y3 =
vertices[3](1);
99 const long double a = (x1 - x3) * (y0 - y2) - (x0 - x2) * (y1 - y3);
100 const long double b = -(x0 - x1 - x2 + x3) * y + (x - 2 * x1 + x3) * y0 -
101 (x - 2 * x0 + x2) * y1 - (x - x1) * y2 +
103 const long double c = (x0 - x1) * y - (x - x1) * y0 + (x - x0) * y1;
105 const long double discriminant =
b *
b - 4 * a * c;
114 const long double sqrt_discriminant =
std::sqrt(discriminant);
117 if (
b != 0.0 &&
std::abs(
b) == sqrt_discriminant)
128 eta1 = 2 * c / (-
b - sqrt_discriminant);
129 eta2 = 2 * c / (-
b + sqrt_discriminant);
134 eta1 = (-
b - sqrt_discriminant) / (2 * a);
135 eta2 = (-
b + sqrt_discriminant) / (2 * a);
138 const long double eta =
145 const long double subexpr0 = -eta * x2 + x0 * (eta - 1);
146 const long double xi_denominator0 = eta * x3 - x1 * (eta - 1) + subexpr0;
150 if (
std::abs(xi_denominator0) > 1
e-10 * max_x)
152 const double xi = (x + subexpr0) / xi_denominator0;
153 return {xi,
static_cast<double>(eta)};
157 const long double max_y =
160 const long double subexpr1 = -eta * y2 + y0 * (eta - 1);
161 const long double xi_denominator1 =
162 eta * y3 - y1 * (eta - 1) + subexpr1;
163 if (
std::abs(xi_denominator1) > 1
e-10 * max_y)
165 const double xi = (subexpr1 + y) / xi_denominator1;
166 return {xi,
static_cast<double>(eta)};
173 spacedim>::ExcTransformationFailed()));
179 return {std::numeric_limits<double>::quiet_NaN(),
180 std::numeric_limits<double>::quiet_NaN()};
185 template <
int spacedim>
194 return {std::numeric_limits<double>::quiet_NaN(),
195 std::numeric_limits<double>::quiet_NaN(),
196 std::numeric_limits<double>::quiet_NaN()};
207 namespace MappingQGenericImplementation
214 std::vector<Point<dim>>
216 const std::vector<unsigned int> &renumbering)
220 std::vector<Point<dim>> points(renumbering.size());
221 const unsigned int n1 = line_support_points.size();
222 for (
unsigned int q2 = 0, q = 0; q2 < (dim > 2 ? n1 : 1); ++q2)
223 for (
unsigned int q1 = 0; q1 < (dim > 1 ? n1 : 1); ++q1)
224 for (
unsigned int q0 = 0; q0 < n1; ++q0, ++q)
226 points[renumbering[q]][0] = line_support_points[q0][0];
228 points[renumbering[q]][1] = line_support_points[q1][0];
230 points[renumbering[q]][2] = line_support_points[q2][0];
244 inline ::Table<2, double>
251 if (polynomial_degree == 1)
254 const unsigned int M = polynomial_degree - 1;
255 const unsigned int n_inner_2d = M * M;
256 const unsigned int n_outer_2d = 4 + 4 * M;
259 loqvs.reinit(n_inner_2d, n_outer_2d);
261 for (
unsigned int i = 0; i < M; ++i)
262 for (
unsigned int j = 0; j < M; ++j)
265 gl.
point((i + 1) * (polynomial_degree + 1) + (j + 1));
266 const unsigned int index_table = i * M + j;
267 for (
unsigned int v = 0; v < 4; ++v)
268 loqvs(index_table, v) =
270 loqvs(index_table, 4 + i) = 1. - p[0];
271 loqvs(index_table, 4 + i + M) = p[0];
272 loqvs(index_table, 4 + j + 2 * M) = 1. - p[1];
273 loqvs(index_table, 4 + j + 3 * M) = p[1];
278 for (
unsigned int unit_point = 0; unit_point < n_inner_2d; ++unit_point)
280 loqvs[unit_point].
end(),
282 1) < 1
e-13 * polynomial_degree,
296 inline ::Table<2, double>
303 if (polynomial_degree == 1)
306 const unsigned int M = polynomial_degree - 1;
308 const unsigned int n_inner = Utilities::fixed_power<3>(M);
309 const unsigned int n_outer = 8 + 12 * M + 6 * M * M;
312 lohvs.reinit(n_inner, n_outer);
314 for (
unsigned int i = 0; i < M; ++i)
315 for (
unsigned int j = 0; j < M; ++j)
316 for (
unsigned int k = 0; k < M; ++k)
319 (j + 1) * (M + 2) + (k + 1));
320 const unsigned int index_table = i * M * M + j * M + k;
323 for (
unsigned int v = 0; v < 8; ++v)
324 lohvs(index_table, v) =
329 constexpr std::array<unsigned int, 4> line_coordinates_y(
332 for (
unsigned int l = 0;
l < 4; ++
l)
333 lohvs(index_table, 8 + line_coordinates_y[
l] * M + j) =
338 constexpr std::array<unsigned int, 4> line_coordinates_x(
341 for (
unsigned int l = 0;
l < 4; ++
l)
342 lohvs(index_table, 8 + line_coordinates_x[
l] * M + k) =
347 constexpr std::array<unsigned int, 4> line_coordinates_z(
350 for (
unsigned int l = 0;
l < 4; ++
l)
351 lohvs(index_table, 8 + line_coordinates_z[
l] * M + i) =
356 lohvs(index_table, 8 + 12 * M + 0 * M * M + i * M + j) =
358 lohvs(index_table, 8 + 12 * M + 1 * M * M + i * M + j) = p[0];
359 lohvs(index_table, 8 + 12 * M + 2 * M * M + k * M + i) =
361 lohvs(index_table, 8 + 12 * M + 3 * M * M + k * M + i) = p[1];
362 lohvs(index_table, 8 + 12 * M + 4 * M * M + j * M + k) =
364 lohvs(index_table, 8 + 12 * M + 5 * M * M + j * M + k) = p[2];
369 for (
unsigned int unit_point = 0; unit_point < n_inner; ++unit_point)
371 lohvs[unit_point].
end(),
373 1) < 1
e-13 * polynomial_degree,
385 inline std::vector<::Table<2, double>>
387 const unsigned int polynomial_degree,
388 const unsigned int dim)
391 std::vector<::Table<2, double>> output(dim);
392 if (polynomial_degree <= 1)
397 output[0].reinit(polynomial_degree - 1,
399 for (
unsigned int q = 0; q < polynomial_degree - 1; ++q)
420 inline ::Table<2, double>
424 if (polynomial_degree <= 1)
425 return ::Table<2, double>();
428 const std::vector<unsigned int> h2l =
429 FETools::hierarchic_to_lexicographic_numbering<dim>(polynomial_degree);
434 for (
unsigned int q = 0; q < output.size(0); ++q)
451 template <
int dim,
int spacedim>
454 const typename ::MappingQGeneric<dim, spacedim>::InternalData &data)
457 data.mapping_support_points.size());
461 for (
unsigned int i = 0; i < data.mapping_support_points.size(); ++i)
462 p_real += data.mapping_support_points[i] * data.shape(0, i);
473 template <
int dim,
int spacedim,
typename Number>
480 const std::vector<unsigned int> & renumber,
481 const bool print_iterations_to_deallog =
false)
498 polynomials_1d, points, p_unit, polynomials_1d.size() == 2, renumber);
507 f.
norm_square() - 1
e-24 * p_real.second[0].norm_square()) ==
545 const double eps = 1.e-11;
546 const unsigned int newton_iteration_limit = 20;
549 invalid_point[0] = std::numeric_limits<double>::infinity();
550 bool try_project_to_unit_cell =
false;
552 unsigned int newton_iteration = 0;
553 Number f_weighted_norm_square = 1.;
554 Number last_f_weighted_norm_square = 1.;
558 if (print_iterations_to_deallog)
559 deallog <<
"Newton iteration " << newton_iteration
560 <<
" for unit point guess " << p_unit << std::endl;
564 for (
unsigned int d = 0;
d < spacedim; ++
d)
565 for (
unsigned int e = 0;
e < dim; ++
e)
566 df[
d][
e] = p_real.second[
e][
d];
579 if (try_project_to_unit_cell ==
false)
586 polynomials_1d.size() == 2,
588 f = p_real.first - p;
589 f_weighted_norm_square = 1.;
590 last_f_weighted_norm_square = 1;
591 try_project_to_unit_cell =
true;
595 return invalid_point;
603 if (print_iterations_to_deallog)
604 deallog <<
" delta=" << delta << std::endl;
607 double step_length = 1;
615 for (
unsigned int i = 0; i < dim; ++i)
616 p_unit_trial[i] -= step_length * delta[i];
619 const auto p_real_trial =
624 polynomials_1d.size() == 2,
627 p_real_trial.first - p;
628 f_weighted_norm_square = (df_inverse * f_trial).norm_square();
630 if (print_iterations_to_deallog)
631 deallog <<
" step_length=" << step_length << std::endl
632 <<
" ||f || =" << f.norm() << std::endl
633 <<
" ||f*|| =" << f_trial.
norm() << std::endl
635 <<
std::sqrt(f_weighted_norm_square) << std::endl;
654 if (
std::max(f_weighted_norm_square - 1
e-6 * 1
e-6, Number(0.)) *
659 p_real = p_real_trial;
660 p_unit = p_unit_trial;
664 else if (step_length > 0.05)
675 if (step_length <= 0.05 && try_project_to_unit_cell ==
false)
682 polynomials_1d.size() == 2,
684 f = p_real.first - p;
685 f_weighted_norm_square = 1.;
686 last_f_weighted_norm_square = 1;
687 try_project_to_unit_cell =
true;
690 else if (step_length <= 0.05)
691 return invalid_point;
694 if (newton_iteration > newton_iteration_limit)
695 return invalid_point;
704 std::max(last_f_weighted_norm_square -
705 std::min(f_weighted_norm_square, Number(1
e-6 * 1
e-6)) *
710 if (print_iterations_to_deallog)
711 deallog <<
"Iteration converged for p_unit = [ " << p_unit
712 <<
" ] and iteration error "
713 <<
std::sqrt(f_weighted_norm_square) << std::endl;
726 const typename ::Triangulation<dim, dim + 1>::cell_iterator &cell,
729 typename ::MappingQGeneric<dim, dim + 1>::InternalData &mdata)
731 const unsigned int spacedim = dim + 1;
733 const unsigned int n_shapes = mdata.shape_values.size();
737 Assert(mdata.shape_second_derivatives.size() == n_shapes,
740 std::vector<Point<spacedim>> &points = mdata.mapping_support_points;
753 mdata.compute_shape_function_values(std::vector<
Point<dim>>(1, p_unit));
755 for (
unsigned int k = 0; k < mdata.n_shape_functions; ++k)
761 for (
unsigned int j = 0; j < dim; ++j)
763 DF[j] += grad_phi_k[j] * point_k;
764 for (
unsigned int l = 0;
l < dim; ++
l)
765 D2F[j][
l] += hessian_k[j][
l] * point_k;
770 p_minus_F -= compute_mapped_location_of_point<dim, spacedim>(mdata);
773 for (
unsigned int j = 0; j < dim; ++j)
774 f[j] = DF[j] * p_minus_F;
776 for (
unsigned int j = 0; j < dim; ++j)
778 f[j] = DF[j] * p_minus_F;
779 for (
unsigned int l = 0;
l < dim; ++
l)
780 df[j][
l] = -DF[j] * DF[
l] + D2F[j][
l] * p_minus_F;
784 const double eps = 1.e-12 * cell->diameter();
785 const unsigned int loop_limit = 10;
787 unsigned int loop = 0;
796 for (
unsigned int j = 0; j < dim; ++j)
799 for (
unsigned int l = 0;
l < dim; ++
l)
803 mdata.compute_shape_function_values(
806 for (
unsigned int k = 0; k < mdata.n_shape_functions; ++k)
812 for (
unsigned int j = 0; j < dim; ++j)
814 DF[j] += grad_phi_k[j] * point_k;
815 for (
unsigned int l = 0;
l < dim; ++
l)
816 D2F[j][
l] += hessian_k[j][
l] * point_k;
823 p_minus_F -= compute_mapped_location_of_point<dim, spacedim>(mdata);
825 for (
unsigned int j = 0; j < dim; ++j)
827 f[j] = DF[j] * p_minus_F;
828 for (
unsigned int l = 0;
l < dim; ++
l)
829 df[j][
l] = -DF[j] * DF[
l] + D2F[j][
l] * p_minus_F;
863 template <
int dim,
int spacedim>
871 (spacedim == 1 ? 3 : (spacedim == 2 ? 6 : 10));
889 1. / real_support_points[0].distance(real_support_points[1]))
899 if (real_support_points.size() ==
903 const auto affine = GridTools::affine_cell_approximation<dim>(
906 affine.first.covariant_form().transpose();
908 for (
unsigned int d = 0;
d < spacedim; ++
d)
909 for (
unsigned int e = 0;
e < dim; ++
e)
916 std::array<double, n_functions> shape_values;
922 shape_values[0] = 1.;
926 for (
unsigned int d = 0;
d < spacedim; ++
d)
927 shape_values[1 +
d] = p_scaled[
d];
928 for (
unsigned int d = 0, c = 0;
d < spacedim; ++
d)
929 for (
unsigned int e = 0;
e <=
d; ++
e, ++c)
930 shape_values[1 + spacedim + c] = p_scaled[
d] * p_scaled[
e];
939 matrix[i][j] += shape_values[i] * shape_values[j];
952 for (
unsigned int j = 0; j < i; ++j)
954 double Lik_Ljk_sum = 0;
955 for (
unsigned int k = 0; k < j; ++k)
973 for (
unsigned int j = 0; j < i; ++j)
991 for (
unsigned int i = dim + 1; i <
n_functions; ++i)
1008 template <
typename Number>
1013 for (
unsigned int d = 0;
d < dim; ++
d)
1021 for (
unsigned int d = 0;
d < spacedim; ++
d)
1024 for (
unsigned int d = 0;
d < spacedim; ++
d)
1029 for (
unsigned int d = 0, c = 0;
d < spacedim; ++
d)
1030 for (
unsigned int e = 0;
e <=
d; ++
e, ++c)
1072 template <
int dim,
int spacedim>
1076 const typename ::MappingQGeneric<dim, spacedim>::InternalData &data,
1080 const UpdateFlags update_flags = data.update_each;
1082 const unsigned int n_shape_values = data.n_shape_functions;
1083 const unsigned int n_q_points = data.shape_info.n_q_points;
1085 constexpr unsigned int n_comp = 1 + (spacedim - 1) / n_lanes;
1086 constexpr unsigned int n_hessians = (dim * (dim + 1)) / 2;
1106 data.n_shape_functions > 0,
1109 n_q_points == data.contravariant.size(),
1112 n_q_points == jacobian_grads.size(),
1118 data.shape_info.element_type ==
1121 for (
unsigned int q = 0; q < n_q_points; ++q)
1123 data.mapping_support_points[data.shape_info
1124 .lexicographic_numbering[q]];
1131 data.values_dofs.resize(n_comp * n_shape_values);
1132 data.values_quad.resize(n_comp * n_q_points);
1133 data.gradients_quad.resize(n_comp * n_q_points * dim);
1134 data.scratch.resize(2 *
std::max(n_q_points, n_shape_values));
1137 data.hessians_quad.resize(n_comp * n_q_points * n_hessians);
1139 const std::vector<unsigned int> &renumber_to_lexicographic =
1140 data.shape_info.lexicographic_numbering;
1141 for (
unsigned int i = 0; i < n_shape_values; ++i)
1142 for (
unsigned int d = 0;
d < spacedim; ++
d)
1144 const unsigned int in_comp =
d % n_lanes;
1145 const unsigned int out_comp =
d / n_lanes;
1146 data.values_dofs[out_comp * n_shape_values + i][in_comp] =
1147 data.mapping_support_points[renumber_to_lexicographic[i]][
d];
1155 data.values_dofs.begin(),
1156 data.values_quad.begin(),
1157 data.gradients_quad.begin(),
1158 data.hessians_quad.begin(),
1159 data.scratch.begin());
1165 for (
unsigned int out_comp = 0; out_comp < n_comp; ++out_comp)
1166 for (
unsigned int i = 0; i < n_q_points; ++i)
1167 for (
unsigned int in_comp = 0;
1168 in_comp < n_lanes && in_comp < spacedim - out_comp * n_lanes;
1171 data.values_quad[out_comp * n_q_points + i][in_comp];
1176 std::fill(data.contravariant.begin(),
1177 data.contravariant.end(),
1180 for (
unsigned int out_comp = 0; out_comp < n_comp; ++out_comp)
1182 for (
unsigned int j = 0; j < dim; ++j)
1183 for (
unsigned int in_comp = 0;
1184 in_comp < n_lanes &&
1185 in_comp < spacedim - out_comp * n_lanes;
1188 const unsigned int total_number =
point * dim + j;
1189 const unsigned int new_comp = total_number / n_q_points;
1190 const unsigned int new_point = total_number % n_q_points;
1191 data.contravariant[new_point][out_comp * n_lanes + in_comp]
1194 .gradients_quad[(out_comp * n_q_points +
point) * dim +
1201 data.covariant[
point] =
1202 (data.contravariant[
point]).covariant_form();
1207 data.volume_elements[
point] =
1208 data.contravariant[
point].determinant();
1212 constexpr int desymmetrize_3d[6][2] = {
1213 {0, 0}, {1, 1}, {2, 2}, {0, 1}, {0, 2}, {1, 2}};
1214 constexpr int desymmetrize_2d[3][2] = {{0, 0}, {1, 1}, {0, 1}};
1217 for (
unsigned int out_comp = 0; out_comp < n_comp; ++out_comp)
1219 for (
unsigned int j = 0; j < n_hessians; ++j)
1220 for (
unsigned int in_comp = 0;
1221 in_comp < n_lanes &&
1222 in_comp < spacedim - out_comp * n_lanes;
1225 const unsigned int total_number =
point * n_hessians + j;
1226 const unsigned int new_point = total_number % n_q_points;
1227 const unsigned int new_hessian_comp =
1228 total_number / n_q_points;
1229 const unsigned int new_hessian_comp_i =
1230 dim == 2 ? desymmetrize_2d[new_hessian_comp][0] :
1231 desymmetrize_3d[new_hessian_comp][0];
1232 const unsigned int new_hessian_comp_j =
1233 dim == 2 ? desymmetrize_2d[new_hessian_comp][1] :
1234 desymmetrize_3d[new_hessian_comp][1];
1235 const double value =
1236 data.hessians_quad[(out_comp * n_q_points +
point) *
1239 jacobian_grads[new_point][out_comp * n_lanes + in_comp]
1240 [new_hessian_comp_i][new_hessian_comp_j] =
1242 jacobian_grads[new_point][out_comp * n_lanes + in_comp]
1243 [new_hessian_comp_j][new_hessian_comp_i] =
1256 template <
int dim,
int spacedim>
1260 const typename ::MappingQGeneric<dim, spacedim>::InternalData &data,
1263 const UpdateFlags update_flags = data.update_each;
1268 const double * shape = &data.shape(
point + data_set, 0);
1270 (shape[0] * data.mapping_support_points[0]);
1271 for (
unsigned int k = 1; k < data.n_shape_functions; ++k)
1272 for (
unsigned int i = 0; i < spacedim; ++i)
1273 result[i] += shape[k] * data.mapping_support_points[k][i];
1288 template <
int dim,
int spacedim>
1292 const typename ::QProjector<dim>::DataSetDescriptor data_set,
1293 const typename ::MappingQGeneric<dim, spacedim>::InternalData &data)
1295 const UpdateFlags update_flags = data.update_each;
1303 const unsigned int n_q_points = data.contravariant.size();
1305 std::fill(data.contravariant.begin(),
1306 data.contravariant.end(),
1313 double result[spacedim][dim];
1317 for (
unsigned int i = 0; i < spacedim; ++i)
1318 for (
unsigned int j = 0; j < dim; ++j)
1319 result[i][j] = data.derivative(
point + data_set, 0)[j] *
1320 data.mapping_support_points[0][i];
1321 for (
unsigned int k = 1; k < data.n_shape_functions; ++k)
1322 for (
unsigned int i = 0; i < spacedim; ++i)
1323 for (
unsigned int j = 0; j < dim; ++j)
1324 result[i][j] += data.derivative(
point + data_set, k)[j] *
1325 data.mapping_support_points[k][i];
1332 for (
unsigned int i = 0; i < spacedim; ++i)
1333 for (
unsigned int j = 0; j < dim; ++j)
1334 data.contravariant[
point][i][j] = result[i][j];
1341 const unsigned int n_q_points = data.contravariant.size();
1344 data.covariant[
point] =
1345 (data.contravariant[
point]).covariant_form();
1352 const unsigned int n_q_points = data.contravariant.size();
1354 data.volume_elements[
point] =
1355 data.contravariant[
point].determinant();
1367 template <
int dim,
int spacedim>
1372 const typename ::MappingQGeneric<dim, spacedim>::InternalData &data,
1375 const UpdateFlags update_flags = data.update_each;
1378 const unsigned int n_q_points = jacobian_grads.size();
1384 &data.second_derivative(
point + data_set, 0);
1385 double result[spacedim][dim][dim];
1386 for (
unsigned int i = 0; i < spacedim; ++i)
1387 for (
unsigned int j = 0; j < dim; ++j)
1388 for (
unsigned int l = 0;
l < dim; ++
l)
1390 (
second[0][j][
l] * data.mapping_support_points[0][i]);
1391 for (
unsigned int k = 1; k < data.n_shape_functions; ++k)
1392 for (
unsigned int i = 0; i < spacedim; ++i)
1393 for (
unsigned int j = 0; j < dim; ++j)
1394 for (
unsigned int l = 0;
l < dim; ++
l)
1396 (
second[k][j][
l] * data.mapping_support_points[k][i]);
1398 for (
unsigned int i = 0; i < spacedim; ++i)
1399 for (
unsigned int j = 0; j < dim; ++j)
1400 for (
unsigned int l = 0;
l < dim; ++
l)
1401 jacobian_grads[
point][i][j][
l] = result[i][j][
l];
1414 template <
int dim,
int spacedim>
1419 const typename ::MappingQGeneric<dim, spacedim>::InternalData &data,
1422 const UpdateFlags update_flags = data.update_each;
1425 const unsigned int n_q_points = jacobian_pushed_forward_grads.size();
1429 double tmp[spacedim][spacedim][spacedim];
1433 &data.second_derivative(
point + data_set, 0);
1434 double result[spacedim][dim][dim];
1435 for (
unsigned int i = 0; i < spacedim; ++i)
1436 for (
unsigned int j = 0; j < dim; ++j)
1437 for (
unsigned int l = 0;
l < dim; ++
l)
1439 (
second[0][j][
l] * data.mapping_support_points[0][i]);
1440 for (
unsigned int k = 1; k < data.n_shape_functions; ++k)
1441 for (
unsigned int i = 0; i < spacedim; ++i)
1442 for (
unsigned int j = 0; j < dim; ++j)
1443 for (
unsigned int l = 0;
l < dim; ++
l)
1446 data.mapping_support_points[k][i]);
1449 for (
unsigned int i = 0; i < spacedim; ++i)
1450 for (
unsigned int j = 0; j < spacedim; ++j)
1451 for (
unsigned int l = 0;
l < dim; ++
l)
1454 result[i][0][
l] * data.covariant[
point][j][0];
1455 for (
unsigned int jr = 1; jr < dim; ++jr)
1458 result[i][jr][
l] * data.covariant[
point][j][jr];
1463 for (
unsigned int i = 0; i < spacedim; ++i)
1464 for (
unsigned int j = 0; j < spacedim; ++j)
1465 for (
unsigned int l = 0;
l < spacedim; ++
l)
1467 jacobian_pushed_forward_grads[
point][i][j][
l] =
1468 tmp[i][j][0] * data.covariant[
point][
l][0];
1469 for (
unsigned int lr = 1; lr < dim; ++lr)
1471 jacobian_pushed_forward_grads[
point][i][j][
l] +=
1472 tmp[i][j][lr] * data.covariant[
point][
l][lr];
1488 template <
int dim,
int spacedim>
1493 const typename ::MappingQGeneric<dim, spacedim>::InternalData &data,
1496 const UpdateFlags update_flags = data.update_each;
1499 const unsigned int n_q_points = jacobian_2nd_derivatives.size();
1506 &data.third_derivative(
point + data_set, 0);
1507 double result[spacedim][dim][dim][dim];
1508 for (
unsigned int i = 0; i < spacedim; ++i)
1509 for (
unsigned int j = 0; j < dim; ++j)
1510 for (
unsigned int l = 0;
l < dim; ++
l)
1511 for (
unsigned int m = 0; m < dim; ++m)
1512 result[i][j][
l][m] =
1513 (third[0][j][
l][m] *
1514 data.mapping_support_points[0][i]);
1515 for (
unsigned int k = 1; k < data.n_shape_functions; ++k)
1516 for (
unsigned int i = 0; i < spacedim; ++i)
1517 for (
unsigned int j = 0; j < dim; ++j)
1518 for (
unsigned int l = 0;
l < dim; ++
l)
1519 for (
unsigned int m = 0; m < dim; ++m)
1520 result[i][j][
l][m] +=
1521 (third[k][j][
l][m] *
1522 data.mapping_support_points[k][i]);
1524 for (
unsigned int i = 0; i < spacedim; ++i)
1525 for (
unsigned int j = 0; j < dim; ++j)
1526 for (
unsigned int l = 0;
l < dim; ++
l)
1527 for (
unsigned int m = 0; m < dim; ++m)
1528 jacobian_2nd_derivatives[
point][i][j][
l][m] =
1544 template <
int dim,
int spacedim>
1549 const typename ::MappingQGeneric<dim, spacedim>::InternalData &data,
1552 const UpdateFlags update_flags = data.update_each;
1555 const unsigned int n_q_points =
1556 jacobian_pushed_forward_2nd_derivatives.size();
1560 double tmp[spacedim][spacedim][spacedim][spacedim];
1564 &data.third_derivative(
point + data_set, 0);
1565 double result[spacedim][dim][dim][dim];
1566 for (
unsigned int i = 0; i < spacedim; ++i)
1567 for (
unsigned int j = 0; j < dim; ++j)
1568 for (
unsigned int l = 0;
l < dim; ++
l)
1569 for (
unsigned int m = 0; m < dim; ++m)
1570 result[i][j][
l][m] =
1571 (third[0][j][
l][m] *
1572 data.mapping_support_points[0][i]);
1573 for (
unsigned int k = 1; k < data.n_shape_functions; ++k)
1574 for (
unsigned int i = 0; i < spacedim; ++i)
1575 for (
unsigned int j = 0; j < dim; ++j)
1576 for (
unsigned int l = 0;
l < dim; ++
l)
1577 for (
unsigned int m = 0; m < dim; ++m)
1578 result[i][j][
l][m] +=
1579 (third[k][j][
l][m] *
1580 data.mapping_support_points[k][i]);
1583 for (
unsigned int i = 0; i < spacedim; ++i)
1584 for (
unsigned int j = 0; j < spacedim; ++j)
1585 for (
unsigned int l = 0;
l < dim; ++
l)
1586 for (
unsigned int m = 0; m < dim; ++m)
1588 jacobian_pushed_forward_2nd_derivatives
1589 [
point][i][j][
l][m] = result[i][0][
l][m] *
1590 data.covariant[
point][j][0];
1591 for (
unsigned int jr = 1; jr < dim; ++jr)
1592 jacobian_pushed_forward_2nd_derivatives[
point][i]
1595 result[i][jr][
l][m] *
1596 data.covariant[
point][j][jr];
1600 for (
unsigned int i = 0; i < spacedim; ++i)
1601 for (
unsigned int j = 0; j < spacedim; ++j)
1602 for (
unsigned int l = 0;
l < spacedim; ++
l)
1603 for (
unsigned int m = 0; m < dim; ++m)
1606 jacobian_pushed_forward_2nd_derivatives[
point][i]
1608 data.covariant[
point][
l][0];
1609 for (
unsigned int lr = 1; lr < dim; ++lr)
1611 jacobian_pushed_forward_2nd_derivatives[
point]
1614 data.covariant[
point][
l][lr];
1618 for (
unsigned int i = 0; i < spacedim; ++i)
1619 for (
unsigned int j = 0; j < spacedim; ++j)
1620 for (
unsigned int l = 0;
l < spacedim; ++
l)
1621 for (
unsigned int m = 0; m < spacedim; ++m)
1623 jacobian_pushed_forward_2nd_derivatives
1625 tmp[i][j][
l][0] * data.covariant[
point][m][0];
1626 for (
unsigned int mr = 1; mr < dim; ++mr)
1627 jacobian_pushed_forward_2nd_derivatives[
point][i]
1630 tmp[i][j][
l][mr] * data.covariant[
point][m][mr];
1645 template <
int dim,
int spacedim>
1650 const typename ::MappingQGeneric<dim, spacedim>::InternalData &data,
1653 const UpdateFlags update_flags = data.update_each;
1656 const unsigned int n_q_points = jacobian_3rd_derivatives.size();
1663 &data.fourth_derivative(
point + data_set, 0);
1664 double result[spacedim][dim][dim][dim][dim];
1665 for (
unsigned int i = 0; i < spacedim; ++i)
1666 for (
unsigned int j = 0; j < dim; ++j)
1667 for (
unsigned int l = 0;
l < dim; ++
l)
1668 for (
unsigned int m = 0; m < dim; ++m)
1669 for (
unsigned int n = 0; n < dim; ++n)
1670 result[i][j][
l][m][n] =
1671 (fourth[0][j][
l][m][n] *
1672 data.mapping_support_points[0][i]);
1673 for (
unsigned int k = 1; k < data.n_shape_functions; ++k)
1674 for (
unsigned int i = 0; i < spacedim; ++i)
1675 for (
unsigned int j = 0; j < dim; ++j)
1676 for (
unsigned int l = 0;
l < dim; ++
l)
1677 for (
unsigned int m = 0; m < dim; ++m)
1678 for (
unsigned int n = 0; n < dim; ++n)
1679 result[i][j][
l][m][n] +=
1680 (fourth[k][j][
l][m][n] *
1681 data.mapping_support_points[k][i]);
1683 for (
unsigned int i = 0; i < spacedim; ++i)
1684 for (
unsigned int j = 0; j < dim; ++j)
1685 for (
unsigned int l = 0;
l < dim; ++
l)
1686 for (
unsigned int m = 0; m < dim; ++m)
1687 for (
unsigned int n = 0; n < dim; ++n)
1688 jacobian_3rd_derivatives[
point][i][j][
l][m][n] =
1689 result[i][j][
l][m][n];
1704 template <
int dim,
int spacedim>
1709 const typename ::MappingQGeneric<dim, spacedim>::InternalData &data,
1712 const UpdateFlags update_flags = data.update_each;
1715 const unsigned int n_q_points =
1716 jacobian_pushed_forward_3rd_derivatives.size();
1720 double tmp[spacedim][spacedim][spacedim][spacedim][spacedim];
1724 &data.fourth_derivative(
point + data_set, 0);
1725 double result[spacedim][dim][dim][dim][dim];
1726 for (
unsigned int i = 0; i < spacedim; ++i)
1727 for (
unsigned int j = 0; j < dim; ++j)
1728 for (
unsigned int l = 0;
l < dim; ++
l)
1729 for (
unsigned int m = 0; m < dim; ++m)
1730 for (
unsigned int n = 0; n < dim; ++n)
1731 result[i][j][
l][m][n] =
1732 (fourth[0][j][
l][m][n] *
1733 data.mapping_support_points[0][i]);
1734 for (
unsigned int k = 1; k < data.n_shape_functions; ++k)
1735 for (
unsigned int i = 0; i < spacedim; ++i)
1736 for (
unsigned int j = 0; j < dim; ++j)
1737 for (
unsigned int l = 0;
l < dim; ++
l)
1738 for (
unsigned int m = 0; m < dim; ++m)
1739 for (
unsigned int n = 0; n < dim; ++n)
1740 result[i][j][
l][m][n] +=
1741 (fourth[k][j][
l][m][n] *
1742 data.mapping_support_points[k][i]);
1745 for (
unsigned int i = 0; i < spacedim; ++i)
1746 for (
unsigned int j = 0; j < spacedim; ++j)
1747 for (
unsigned int l = 0;
l < dim; ++
l)
1748 for (
unsigned int m = 0; m < dim; ++m)
1749 for (
unsigned int n = 0; n < dim; ++n)
1751 tmp[i][j][
l][m][n] = result[i][0][
l][m][n] *
1752 data.covariant[
point][j][0];
1753 for (
unsigned int jr = 1; jr < dim; ++jr)
1754 tmp[i][j][
l][m][n] +=
1755 result[i][jr][
l][m][n] *
1756 data.covariant[
point][j][jr];
1760 for (
unsigned int i = 0; i < spacedim; ++i)
1761 for (
unsigned int j = 0; j < spacedim; ++j)
1762 for (
unsigned int l = 0;
l < spacedim; ++
l)
1763 for (
unsigned int m = 0; m < dim; ++m)
1764 for (
unsigned int n = 0; n < dim; ++n)
1766 jacobian_pushed_forward_3rd_derivatives
1768 tmp[i][j][0][m][n] *
1769 data.covariant[
point][
l][0];
1770 for (
unsigned int lr = 1; lr < dim; ++lr)
1771 jacobian_pushed_forward_3rd_derivatives[
point]
1774 tmp[i][j][lr][m][n] *
1775 data.covariant[
point][
l][lr];
1779 for (
unsigned int i = 0; i < spacedim; ++i)
1780 for (
unsigned int j = 0; j < spacedim; ++j)
1781 for (
unsigned int l = 0;
l < spacedim; ++
l)
1782 for (
unsigned int m = 0; m < spacedim; ++m)
1783 for (
unsigned int n = 0; n < dim; ++n)
1785 tmp[i][j][
l][m][n] =
1786 jacobian_pushed_forward_3rd_derivatives[
point]
1789 data.covariant[
point][m][0];
1790 for (
unsigned int mr = 1; mr < dim; ++mr)
1791 tmp[i][j][
l][m][n] +=
1792 jacobian_pushed_forward_3rd_derivatives
1793 [
point][i][j][
l][mr][n] *
1794 data.covariant[
point][m][mr];
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 < spacedim; ++m)
1802 for (
unsigned int n = 0; n < spacedim; ++n)
1804 jacobian_pushed_forward_3rd_derivatives
1806 tmp[i][j][
l][m][0] *
1807 data.covariant[
point][n][0];
1808 for (
unsigned int nr = 1; nr < dim; ++nr)
1809 jacobian_pushed_forward_3rd_derivatives[
point]
1812 tmp[i][j][
l][m][nr] *
1813 data.covariant[
point][n][nr];
1831 template <
int dim,
int spacedim>
1834 const ::MappingQGeneric<dim, spacedim> &mapping,
1835 const typename ::Triangulation<dim, spacedim>::cell_iterator &cell,
1836 const unsigned int face_no,
1837 const unsigned int subface_no,
1838 const unsigned int n_q_points,
1839 const std::vector<double> &weights,
1840 const typename ::MappingQGeneric<dim, spacedim>::InternalData &data,
1844 const UpdateFlags update_flags = data.update_each;
1865 for (
unsigned int d = 0;
d != dim - 1; ++
d)
1868 data.unit_tangentials.size(),
1871 data.aux[
d].size() <=
1873 .unit_tangentials[face_no +
1880 data.unit_tangentials[face_no +
1891 if (dim == spacedim)
1893 for (
unsigned int i = 0; i < n_q_points; ++i)
1903 (face_no == 0 ? -1 : +1);
1933 data.contravariant[
point].transpose()[0];
1935 (face_no == 0 ? -1. : +1.) *
1946 cell_normal /= cell_normal.
norm();
1958 for (
unsigned int i = 0; i < output_data.
boundary_forms.size(); ++i)
1966 cell->subface_case(face_no), subface_no);
1972 for (
unsigned int i = 0; i < output_data.
normal_vectors.size(); ++i)
1984 data.covariant[
point].transpose();
1995 template <
int dim,
int spacedim>
1998 const ::MappingQGeneric<dim, spacedim> &mapping,
1999 const typename ::Triangulation<dim, spacedim>::cell_iterator &cell,
2000 const unsigned int face_no,
2001 const unsigned int subface_no,
2004 const typename ::MappingQGeneric<dim, spacedim>::InternalData &data,
2008 if (dim > 1 && data.tensor_product_quadrature)
2010 maybe_update_q_points_Jacobians_and_grads_tensor<dim, spacedim>(
2018 maybe_compute_q_points<dim, spacedim>(data_set,
2024 maybe_update_jacobian_grads<dim, spacedim>(
2027 maybe_update_jacobian_pushed_forward_grads<dim, spacedim>(
2032 maybe_update_jacobian_2nd_derivatives<dim, spacedim>(
2037 maybe_update_jacobian_pushed_forward_2nd_derivatives<dim, spacedim>(
2042 maybe_update_jacobian_3rd_derivatives<dim, spacedim>(
2047 maybe_update_jacobian_pushed_forward_3rd_derivatives<dim, spacedim>(
2068 template <
int dim,
int spacedim,
int rank>
2077 Assert((
dynamic_cast<const typename ::
2078 MappingQGeneric<dim, spacedim>::InternalData *
>(
2079 &mapping_data) !=
nullptr),
2081 const typename ::MappingQGeneric<dim, spacedim>::InternalData
2083 static_cast<const typename ::MappingQGeneric<dim, spacedim>::
2084 InternalData &
>(mapping_data);
2086 switch (mapping_kind)
2092 "update_contravariant_transformation"));
2094 for (
unsigned int i = 0; i < output.size(); ++i)
2105 "update_contravariant_transformation"));
2108 "update_volume_elements"));
2113 for (
unsigned int i = 0; i < output.size(); ++i)
2117 output[i] /= data.volume_elements[i];
2128 "update_covariant_transformation"));
2130 for (
unsigned int i = 0; i < output.size(); ++i)
2146 template <
int dim,
int spacedim,
int rank>
2155 Assert((
dynamic_cast<const typename ::
2156 MappingQGeneric<dim, spacedim>::InternalData *
>(
2157 &mapping_data) !=
nullptr),
2159 const typename ::MappingQGeneric<dim, spacedim>::InternalData
2161 static_cast<const typename ::MappingQGeneric<dim, spacedim>::
2162 InternalData &
>(mapping_data);
2164 switch (mapping_kind)
2170 "update_covariant_transformation"));
2173 "update_contravariant_transformation"));
2176 for (
unsigned int i = 0; i < output.size(); ++i)
2192 "update_covariant_transformation"));
2195 for (
unsigned int i = 0; i < output.size(); ++i)
2211 "update_covariant_transformation"));
2214 "update_contravariant_transformation"));
2217 "update_volume_elements"));
2220 for (
unsigned int i = 0; i < output.size(); ++i)
2228 output[i] /= data.volume_elements[i];
2244 template <
int dim,
int spacedim>
2253 Assert((
dynamic_cast<const typename ::
2254 MappingQGeneric<dim, spacedim>::InternalData *
>(
2255 &mapping_data) !=
nullptr),
2257 const typename ::MappingQGeneric<dim, spacedim>::InternalData
2259 static_cast<const typename ::MappingQGeneric<dim, spacedim>::
2260 InternalData &
>(mapping_data);
2262 switch (mapping_kind)
2268 "update_covariant_transformation"));
2271 "update_contravariant_transformation"));
2273 for (
unsigned int q = 0; q < output.size(); ++q)
2274 for (
unsigned int i = 0; i < spacedim; ++i)
2276 double tmp1[dim][dim];
2277 for (
unsigned int J = 0; J < dim; ++J)
2278 for (
unsigned int K = 0; K < dim; ++K)
2281 data.contravariant[q][i][0] * input[q][0][J][K];
2282 for (
unsigned int I = 1; I < dim; ++I)
2284 data.contravariant[q][i][I] * input[q][I][J][K];
2286 for (
unsigned int j = 0; j < spacedim; ++j)
2289 for (
unsigned int K = 0; K < dim; ++K)
2291 tmp2[K] = data.covariant[q][j][0] * tmp1[0][K];
2292 for (
unsigned int J = 1; J < dim; ++J)
2293 tmp2[K] += data.covariant[q][j][J] * tmp1[J][K];
2295 for (
unsigned int k = 0; k < spacedim; ++k)
2297 output[q][i][j][k] =
2298 data.covariant[q][k][0] * tmp2[0];
2299 for (
unsigned int K = 1; K < dim; ++K)
2300 output[q][i][j][k] +=
2301 data.covariant[q][k][K] * tmp2[K];
2312 "update_covariant_transformation"));
2314 for (
unsigned int q = 0; q < output.size(); ++q)
2315 for (
unsigned int i = 0; i < spacedim; ++i)
2317 double tmp1[dim][dim];
2318 for (
unsigned int J = 0; J < dim; ++J)
2319 for (
unsigned int K = 0; K < dim; ++K)
2322 data.covariant[q][i][0] * input[q][0][J][K];
2323 for (
unsigned int I = 1; I < dim; ++I)
2325 data.covariant[q][i][I] * input[q][I][J][K];
2327 for (
unsigned int j = 0; j < spacedim; ++j)
2330 for (
unsigned int K = 0; K < dim; ++K)
2332 tmp2[K] = data.covariant[q][j][0] * tmp1[0][K];
2333 for (
unsigned int J = 1; J < dim; ++J)
2334 tmp2[K] += data.covariant[q][j][J] * tmp1[J][K];
2336 for (
unsigned int k = 0; k < spacedim; ++k)
2338 output[q][i][j][k] =
2339 data.covariant[q][k][0] * tmp2[0];
2340 for (
unsigned int K = 1; K < dim; ++K)
2341 output[q][i][j][k] +=
2342 data.covariant[q][k][K] * tmp2[K];
2354 "update_covariant_transformation"));
2357 "update_contravariant_transformation"));
2360 "update_volume_elements"));
2362 for (
unsigned int q = 0; q < output.size(); ++q)
2363 for (
unsigned int i = 0; i < spacedim; ++i)
2366 for (
unsigned int I = 0; I < dim; ++I)
2368 data.contravariant[q][i][I] / data.volume_elements[q];
2369 double tmp1[dim][dim];
2370 for (
unsigned int J = 0; J < dim; ++J)
2371 for (
unsigned int K = 0; K < dim; ++K)
2373 tmp1[J][K] = factor[0] * input[q][0][J][K];
2374 for (
unsigned int I = 1; I < dim; ++I)
2375 tmp1[J][K] += factor[I] * input[q][I][J][K];
2377 for (
unsigned int j = 0; j < spacedim; ++j)
2380 for (
unsigned int K = 0; K < dim; ++K)
2382 tmp2[K] = data.covariant[q][j][0] * tmp1[0][K];
2383 for (
unsigned int J = 1; J < dim; ++J)
2384 tmp2[K] += data.covariant[q][j][J] * tmp1[J][K];
2386 for (
unsigned int k = 0; k < spacedim; ++k)
2388 output[q][i][j][k] =
2389 data.covariant[q][k][0] * tmp2[0];
2390 for (
unsigned int K = 1; K < dim; ++K)
2391 output[q][i][j][k] +=
2392 data.covariant[q][k][K] * tmp2[K];
2411 template <
int dim,
int spacedim,
int rank>
2420 Assert((
dynamic_cast<const typename ::
2421 MappingQGeneric<dim, spacedim>::InternalData *
>(
2422 &mapping_data) !=
nullptr),
2424 const typename ::MappingQGeneric<dim, spacedim>::InternalData
2426 static_cast<const typename ::MappingQGeneric<dim, spacedim>::
2427 InternalData &
>(mapping_data);
2429 switch (mapping_kind)
2435 "update_covariant_transformation"));
2437 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)
Abstract base class for mapping classes.
const Point< dim > & point(const unsigned int i) const
const std::vector< double > & get_weights() const
unsigned int size() const
numbers::NumberTraits< Number >::real_type norm() const
constexpr numbers::NumberTraits< Number >::real_type norm_square() const
static constexpr std::size_t size()
static constexpr unsigned int n_functions
std::array< Point< dim >, n_functions > coefficients
const Point< spacedim > normalization_shift
InverseQuadraticApproximation(const std::vector< Point< spacedim > > &real_support_points, const std::vector< Point< dim > > &unit_support_points)
const double normalization_length
Point< dim, Number > compute(const Point< spacedim, Number > &p) const
InverseQuadraticApproximation(const InverseQuadraticApproximation &)=default
#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)
void loop(ITERATOR begin, typename identity< ITERATOR >::type 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())
@ mapping_covariant_gradient
@ mapping_contravariant_hessian
@ mapping_covariant_hessian
@ mapping_contravariant_gradient
@ tensor_symmetric_collocation
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 > 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)
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
VectorType::value_type * end(VectorType &V)
VectorType::value_type * begin(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_differential_forms(const ArrayView< const DerivativeForm< rank, dim, spacedim > > &input, const MappingKind mapping_kind, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_data, const ArrayView< Tensor< rank+1, spacedim > > &output)
void maybe_update_jacobian_grads(const CellSimilarity::Similarity cell_similarity, const typename QProjector< dim >::DataSetDescriptor data_set, const typename ::MappingQGeneric< 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 ::MappingQGeneric< dim, spacedim >::InternalData &data, std::vector< Tensor< 4, spacedim > > &jacobian_pushed_forward_2nd_derivatives)
Point< dim, Number > do_transform_real_to_unit_cell_internal(const Point< spacedim, Number > &p, const Point< dim, Number > &initial_p_unit, const 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)
Point< spacedim > compute_mapped_location_of_point(const typename ::MappingQGeneric< dim, spacedim >::InternalData &data)
std::vector<::Table< 2, double > > compute_support_point_weights_perimeter_to_interior(const unsigned int polynomial_degree, const unsigned int dim)
void transform_hessians(const ArrayView< const Tensor< 3, dim > > &input, const MappingKind mapping_kind, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_data, const ArrayView< Tensor< 3, spacedim > > &output)
void maybe_update_jacobian_3rd_derivatives(const CellSimilarity::Similarity cell_similarity, const typename QProjector< dim >::DataSetDescriptor data_set, const typename ::MappingQGeneric< dim, spacedim >::InternalData &data, std::vector< DerivativeForm< 4, dim, spacedim > > &jacobian_3rd_derivatives)
void maybe_update_jacobian_pushed_forward_3rd_derivatives(const CellSimilarity::Similarity cell_similarity, const typename QProjector< dim >::DataSetDescriptor data_set, const typename ::MappingQGeneric< dim, spacedim >::InternalData &data, std::vector< Tensor< 5, spacedim > > &jacobian_pushed_forward_3rd_derivatives)
void maybe_update_Jacobians(const CellSimilarity::Similarity cell_similarity, const typename ::QProjector< dim >::DataSetDescriptor data_set, const typename ::MappingQGeneric< dim, spacedim >::InternalData &data)
inline ::Table< 2, double > compute_support_point_weights_on_hex(const unsigned int polynomial_degree)
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 ::MappingQGeneric< dim, dim+1 >::InternalData &mdata)
void do_fill_fe_face_values(const ::MappingQGeneric< 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 ::MappingQGeneric< dim, spacedim >::InternalData &data, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data)
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_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_q_points_Jacobians_and_grads_tensor(const CellSimilarity::Similarity cell_similarity, const typename ::MappingQGeneric< dim, spacedim >::InternalData &data, std::vector< Point< spacedim > > &quadrature_points, std::vector< DerivativeForm< 2, dim, spacedim > > &jacobian_grads)
void maybe_compute_face_data(const ::MappingQGeneric< 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 ::MappingQGeneric< dim, spacedim >::InternalData &data, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data)
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 ::MappingQGeneric< dim, spacedim >::InternalData &data, std::vector< Point< spacedim > > &quadrature_points)
void maybe_update_jacobian_2nd_derivatives(const CellSimilarity::Similarity cell_similarity, const typename QProjector< dim >::DataSetDescriptor data_set, const typename ::MappingQGeneric< dim, spacedim >::InternalData &data, std::vector< DerivativeForm< 3, dim, spacedim > > &jacobian_2nd_derivatives)
void maybe_update_jacobian_pushed_forward_grads(const CellSimilarity::Similarity cell_similarity, const typename QProjector< dim >::DataSetDescriptor data_set, const typename ::MappingQGeneric< dim, spacedim >::InternalData &data, std::vector< Tensor< 3, spacedim > > &jacobian_pushed_forward_grads)
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)
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)
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)