36#include <boost/container/small_vector.hpp>
49template <
int dim,
int spacedim>
51 const unsigned int polynomial_degree)
52 : polynomial_degree(polynomial_degree)
53 , n_shape_functions(
Utilities::fixed_power<dim>(polynomial_degree + 1))
54 , line_support_points(
QGaussLobatto<1>(polynomial_degree + 1))
55 , tensor_product_quadrature(false)
56 , output_data(nullptr)
61template <
int dim,
int spacedim>
79template <
int dim,
int spacedim>
86 this->update_each = update_flags;
88 const unsigned int n_q_points = quadrature.
size();
91 volume_elements.resize(n_q_points);
98 tensor_product_quadrature =
false;
104 if (tensor_product_quadrature)
106 const std::array<Quadrature<1>, dim> &quad_array =
108 for (
unsigned int i = 1; i < dim && tensor_product_quadrature; ++i)
110 if (quad_array[i - 1].
size() != quad_array[i].
size())
112 tensor_product_quadrature =
false;
117 const std::vector<Point<1>> &points_1 =
118 quad_array[i - 1].get_points();
119 const std::vector<Point<1>> &points_2 =
120 quad_array[i].get_points();
121 const std::vector<double> &weights_1 =
122 quad_array[i - 1].get_weights();
123 const std::vector<double> &weights_2 =
124 quad_array[i].get_weights();
125 for (
unsigned int j = 0; j < quad_array[i].size(); ++j)
127 if (
std::abs(points_1[j][0] - points_2[j][0]) > 1.e-10 ||
128 std::abs(weights_1[j] - weights_2[j]) > 1.e-10)
130 tensor_product_quadrature =
false;
137 if (tensor_product_quadrature)
144 shape_info.lexicographic_numbering =
145 FETools::lexicographic_to_hierarchic_numbering<dim>(
147 shape_info.n_q_points = n_q_points;
148 shape_info.dofs_per_component_on_cell =
157template <
int dim,
int spacedim>
162 const unsigned int n_original_q_points)
164 reinit(update_flags, quadrature);
168 if (dim > 1 && tensor_product_quadrature)
170 constexpr unsigned int facedim = dim - 1;
173 shape_info.lexicographic_numbering =
174 FETools::lexicographic_to_hierarchic_numbering<facedim>(
176 shape_info.n_q_points = n_original_q_points;
177 shape_info.dofs_per_component_on_cell =
183 if (this->update_each &
187 aux[0].resize(n_original_q_points);
189 aux[1].resize(n_original_q_points);
194 unit_tangentials[i].resize(n_original_q_points);
195 std::fill(unit_tangentials[i].begin(),
196 unit_tangentials[i].end(),
201 .resize(n_original_q_points);
216template <
int dim,
int spacedim>
224 FETools::lexicographic_to_hierarchic_numbering<dim>(p))
226 internal::MappingQImplementation::unit_support_points<dim>(
231 compute_support_point_weights_perimeter_to_interior(
235 internal::MappingQImplementation::compute_support_point_weights_cell<dim>(
239 ExcMessage(
"It only makes sense to create polynomial mappings "
240 "with a polynomial degree greater or equal to one."));
245template <
int dim,
int spacedim>
247 : polynomial_degree(mapping.polynomial_degree)
248 , line_support_points(mapping.line_support_points)
249 , polynomials_1d(mapping.polynomials_1d)
250 , renumber_lexicographic_to_hierarchic(
251 mapping.renumber_lexicographic_to_hierarchic)
252 , unit_cell_support_points(mapping.unit_cell_support_points)
253 , support_point_weights_perimeter_to_interior(
254 mapping.support_point_weights_perimeter_to_interior)
255 , support_point_weights_cell(mapping.support_point_weights_cell)
260template <
int dim,
int spacedim>
261std::unique_ptr<Mapping<dim, spacedim>>
264 return std::make_unique<MappingQ<dim, spacedim>>(*this);
269template <
int dim,
int spacedim>
273 return polynomial_degree;
278template <
int dim,
int spacedim>
284 if (polynomial_degree == 1)
286 const auto vertices = this->get_vertices(cell);
295 polynomials_1d.size() == 2,
296 renumber_lexicographic_to_hierarchic));
319template <
int dim,
int spacedim>
338 const Point<1> &initial_p_unit)
const
342 if (polynomial_degree == 1)
344 const auto vertices = this->get_vertices(cell);
345 return internal::MappingQImplementation::
346 do_transform_real_to_unit_cell_internal<1>(
351 renumber_lexicographic_to_hierarchic);
354 return internal::MappingQImplementation::
355 do_transform_real_to_unit_cell_internal<1>(
360 renumber_lexicographic_to_hierarchic);
370 const Point<2> &initial_p_unit)
const
372 if (polynomial_degree == 1)
374 const auto vertices = this->get_vertices(cell);
375 return internal::MappingQImplementation::
376 do_transform_real_to_unit_cell_internal<2>(
381 renumber_lexicographic_to_hierarchic);
384 return internal::MappingQImplementation::
385 do_transform_real_to_unit_cell_internal<2>(
390 renumber_lexicographic_to_hierarchic);
400 const Point<3> &initial_p_unit)
const
402 if (polynomial_degree == 1)
404 const auto vertices = this->get_vertices(cell);
405 return internal::MappingQImplementation::
406 do_transform_real_to_unit_cell_internal<3>(
411 renumber_lexicographic_to_hierarchic);
414 return internal::MappingQImplementation::
415 do_transform_real_to_unit_cell_internal<3>(
420 renumber_lexicographic_to_hierarchic);
430 const Point<1> &initial_p_unit)
const
433 const int spacedim = 2;
440 auto mdata = Utilities::dynamic_unique_cast<InternalData>(
441 get_data(update_flags, point_quadrature));
443 mdata->mapping_support_points = this->compute_mapping_support_points(cell);
447 return internal::MappingQImplementation::
448 do_transform_real_to_unit_cell_internal_codim1<1>(
453 renumber_lexicographic_to_hierarchic);
463 const Point<2> &initial_p_unit)
const
466 const int spacedim = 3;
473 auto mdata = Utilities::dynamic_unique_cast<InternalData>(
474 get_data(update_flags, point_quadrature));
476 mdata->mapping_support_points = this->compute_mapping_support_points(cell);
480 return internal::MappingQImplementation::
481 do_transform_real_to_unit_cell_internal_codim1<2>(
486 renumber_lexicographic_to_hierarchic);
504template <
int dim,
int spacedim>
512 if ((polynomial_degree == 1) &&
513 ((dim == 1) || ((dim == 2) && (dim == spacedim))))
536 const auto vertices_ = this->get_vertices(cell);
540 for (
unsigned int i = 0; i < vertices.size(); ++i)
541 vertices[i] = vertices_[i];
566 const double eps = 1e-15;
567 if (-eps <= point[1] && point[1] <= 1 + eps &&
568 -eps <= point[0] && point[0] <= 1 + eps)
600 if (this->preserves_vertex_locations())
602 initial_p_unit = cell->real_to_unit_cell_affine_approximation(p);
604 if (dim == 1 && polynomial_degree == 1)
605 return initial_p_unit;
610 for (
unsigned int d = 0; d < dim; ++d)
611 initial_p_unit[d] = 0.5;
617 this->transform_real_to_unit_cell_internal(cell, p, initial_p_unit);
618 AssertThrow(p_unit[0] != std::numeric_limits<double>::lowest(),
625template <
int dim,
int spacedim>
643 std::vector<Point<spacedim>> support_points_higher_order;
644 boost::container::small_vector<Point<spacedim>,
647 if (polynomial_degree == 1)
648 vertices = this->get_vertices(cell);
650 support_points_higher_order = this->compute_mapping_support_points(cell);
652 polynomial_degree == 1 ? vertices.data() :
653 support_points_higher_order.
data(),
654 Utilities::pow(polynomial_degree + 1, dim));
659 inverse_approximation(support_points, unit_cell_support_points);
661 const unsigned int n_points = real_points.size();
666 for (
unsigned int i = 0; i < n_points; i += n_lanes)
667 if (n_points - i > 1)
670 for (
unsigned int j = 0; j < n_lanes; ++j)
671 if (i + j < n_points)
672 for (
unsigned int d = 0; d < spacedim; ++d)
673 p_vec[d][j] = real_points[i + j][d];
675 for (
unsigned int d = 0; d < spacedim; ++d)
676 p_vec[d][j] = real_points[i][d];
679 internal::MappingQImplementation::
680 do_transform_real_to_unit_cell_internal<dim, spacedim>(
682 inverse_approximation.compute(p_vec),
685 renumber_lexicographic_to_hierarchic);
692 for (
unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
693 if (unit_point[0][j] != std::numeric_limits<double>::lowest())
694 for (
unsigned int d = 0; d < dim; ++d)
695 unit_points[i + j][d] = unit_point[d][j];
697 unit_points[i + j] = internal::MappingQImplementation::
698 do_transform_real_to_unit_cell_internal<dim, spacedim>(
700 inverse_approximation.compute(real_points[i + j]),
703 renumber_lexicographic_to_hierarchic);
706 unit_points[i] = internal::MappingQImplementation::
707 do_transform_real_to_unit_cell_internal<dim, spacedim>(
709 inverse_approximation.compute(real_points[i]),
712 renumber_lexicographic_to_hierarchic);
717template <
int dim,
int spacedim>
728 for (
unsigned int i = 0; i < 5; ++i)
773template <
int dim,
int spacedim>
774std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
778 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase> data_ptr =
779 std::make_unique<InternalData>(polynomial_degree);
780 data_ptr->reinit(update_flags, q);
786template <
int dim,
int spacedim>
787std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
794 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase> data_ptr =
795 std::make_unique<InternalData>(polynomial_degree);
799 ReferenceCells::get_hypercube<dim>(), quadrature[0]),
800 quadrature[0].
size());
807template <
int dim,
int spacedim>
808std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>
813 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase> data_ptr =
814 std::make_unique<InternalData>(polynomial_degree);
818 ReferenceCells::get_hypercube<dim>(), quadrature),
826template <
int dim,
int spacedim>
842 const unsigned int n_q_points = quadrature.
size();
854 if (polynomial_degree == 1)
857 const auto vertices = this->get_vertices(cell);
858 for (
unsigned int i = 0; i < GeometryInfo<dim>::vertices_per_cell; ++i)
859 data.mapping_support_points[i] = vertices[i];
862 data.mapping_support_points = this->compute_mapping_support_points(cell);
864 data.cell_of_current_support_points = cell;
871 (polynomial_degree == 1 && this->preserves_vertex_locations() ?
875 if (dim > 1 &&
data.tensor_product_quadrature)
877 internal::MappingQImplementation::
878 maybe_update_q_points_Jacobians_and_grads_tensor<dim, spacedim>(
879 computed_cell_similarity,
889 computed_cell_similarity,
893 renumber_lexicographic_to_hierarchic,
900 computed_cell_similarity,
904 renumber_lexicographic_to_hierarchic,
910 spacedim>(computed_cell_similarity,
914 renumber_lexicographic_to_hierarchic,
919 spacedim>(computed_cell_similarity,
923 renumber_lexicographic_to_hierarchic,
926 internal::MappingQImplementation::
927 maybe_update_jacobian_pushed_forward_2nd_derivatives<dim, spacedim>(
928 computed_cell_similarity,
932 renumber_lexicographic_to_hierarchic,
937 spacedim>(computed_cell_similarity,
941 renumber_lexicographic_to_hierarchic,
944 internal::MappingQImplementation::
945 maybe_update_jacobian_pushed_forward_3rd_derivatives<dim, spacedim>(
946 computed_cell_similarity,
950 renumber_lexicographic_to_hierarchic,
954 const std::vector<double> &weights = quadrature.
get_weights();
962 (output_data.
JxW_values.size() == n_q_points),
972 for (
unsigned int point = 0; point < n_q_points; ++point)
976 const double det =
data.volume_elements[point];
984 1e-12 * Utilities::fixed_power<dim>(
985 cell->diameter() /
std::sqrt(
double(dim))),
987 cell->center(), det, point)));
989 output_data.
JxW_values[point] = weights[point] * det;
997 for (
unsigned int i = 0; i < spacedim; ++i)
998 for (
unsigned int j = 0; j < dim; ++j)
999 DX_t[j][i] = output_data.
jacobians[point][i][j];
1002 for (
unsigned int i = 0; i < dim; ++i)
1003 for (
unsigned int j = 0; j < dim; ++j)
1004 G[i][j] = DX_t[i] * DX_t[j];
1010 if (computed_cell_similarity ==
1021 Assert(spacedim == dim + 1,
1023 "There is no (unique) cell normal for " +
1025 "-dimensional cells in " +
1027 "-dimensional space. This only works if the "
1028 "space dimension is one greater than the "
1029 "dimensionality of the mesh cells."));
1033 cross_product_2d(-DX_t[0]);
1036 cross_product_3d(DX_t[0], DX_t[1]);
1041 if (cell->direction_flag() ==
false)
1049 return computed_cell_similarity;
1054template <
int dim,
int spacedim>
1058 const unsigned int face_no,
1076 if ((
data.mapping_support_points.empty()) ||
1077 (&cell->get_triangulation() !=
1078 &
data.cell_of_current_support_points->get_triangulation()) ||
1079 (cell !=
data.cell_of_current_support_points))
1081 if (polynomial_degree == 1)
1083 data.mapping_support_points.resize(
1085 const auto vertices = this->get_vertices(cell);
1086 for (
unsigned int i = 0; i < GeometryInfo<dim>::vertices_per_cell;
1088 data.mapping_support_points[i] = vertices[i];
1091 data.mapping_support_points =
1092 this->compute_mapping_support_points(cell);
1093 data.cell_of_current_support_points = cell;
1102 ReferenceCells::get_hypercube<dim>(),
1104 cell->face_orientation(face_no),
1105 cell->face_flip(face_no),
1106 cell->face_rotation(face_no),
1107 quadrature[0].
size()),
1111 renumber_lexicographic_to_hierarchic,
1117template <
int dim,
int spacedim>
1121 const unsigned int face_no,
1122 const unsigned int subface_no,
1138 if ((
data.mapping_support_points.empty()) ||
1139 (&cell->get_triangulation() !=
1140 &
data.cell_of_current_support_points->get_triangulation()) ||
1141 (cell !=
data.cell_of_current_support_points))
1143 if (polynomial_degree == 1)
1145 data.mapping_support_points.resize(
1147 const auto vertices = this->get_vertices(cell);
1148 for (
unsigned int i = 0; i < GeometryInfo<dim>::vertices_per_cell;
1150 data.mapping_support_points[i] = vertices[i];
1153 data.mapping_support_points =
1154 this->compute_mapping_support_points(cell);
1155 data.cell_of_current_support_points = cell;
1164 ReferenceCells::get_hypercube<dim>(),
1167 cell->combined_face_orientation(face_no),
1169 cell->subface_case(face_no)),
1173 renumber_lexicographic_to_hierarchic,
1179template <
int dim,
int spacedim>
1196 const unsigned int n_q_points = quadrature.size();
1198 if (polynomial_degree == 1)
1201 const auto vertices = this->get_vertices(cell);
1202 for (
unsigned int i = 0; i < GeometryInfo<dim>::vertices_per_cell; ++i)
1203 data.mapping_support_points[i] = vertices[i];
1206 data.mapping_support_points = this->compute_mapping_support_points(cell);
1207 data.cell_of_current_support_points = cell;
1214 renumber_lexicographic_to_hierarchic,
1219 internal::MappingQImplementation::maybe_update_jacobian_grads<dim, spacedim>(
1224 renumber_lexicographic_to_hierarchic,
1233 renumber_lexicographic_to_hierarchic,
1242 renumber_lexicographic_to_hierarchic,
1245 internal::MappingQImplementation::
1246 maybe_update_jacobian_pushed_forward_2nd_derivatives<dim, spacedim>(
1251 renumber_lexicographic_to_hierarchic,
1260 renumber_lexicographic_to_hierarchic,
1263 internal::MappingQImplementation::
1264 maybe_update_jacobian_pushed_forward_3rd_derivatives<dim, spacedim>(
1269 renumber_lexicographic_to_hierarchic,
1273 const std::vector<double> &weights = quadrature.get_weights();
1285 for (
unsigned int point = 0; point < n_q_points; ++point)
1287 const double det =
data.volume_elements[point];
1294 Assert(det > 1e-12 * Utilities::fixed_power<dim>(
1295 cell->diameter() /
std::sqrt(
double(dim))),
1297 cell->center(), det, point)));
1301 for (
unsigned int d = 0; d < spacedim; d++)
1305 output_data.
JxW_values[point] = weights[point] * det * normal.
norm();
1309 normal /= normal.
norm();
1318template <
int dim,
int spacedim>
1335 output_data.
initialize(unit_points.size(), update_flags);
1337 auto internal_data =
1338 this->get_data(update_flags,
1340 unit_points.end())));
1343 if (polynomial_degree == 1)
1346 const auto vertices = this->get_vertices(cell);
1347 for (
unsigned int i = 0; i < GeometryInfo<dim>::vertices_per_cell; ++i)
1348 data.mapping_support_points[i] = vertices[i];
1351 data.mapping_support_points = this->compute_mapping_support_points(cell);
1358 renumber_lexicographic_to_hierarchic,
1366template <
int dim,
int spacedim>
1370 const unsigned int face_no,
1384 if (polynomial_degree == 1)
1387 const auto vertices = this->get_vertices(cell);
1388 for (
unsigned int i = 0; i < GeometryInfo<dim>::vertices_per_cell; ++i)
1389 data.mapping_support_points[i] = vertices[i];
1392 data.mapping_support_points = this->compute_mapping_support_points(cell);
1393 data.output_data = &output_data;
1404 renumber_lexicographic_to_hierarchic,
1410template <
int dim,
int spacedim>
1426template <
int dim,
int spacedim>
1442template <
int dim,
int spacedim>
1450 switch (mapping_kind)
1474template <
int dim,
int spacedim>
1488 switch (mapping_kind)
1494 "update_covariant_transformation"));
1496 for (
unsigned int q = 0; q < output.size(); ++q)
1497 for (
unsigned int i = 0; i < spacedim; ++i)
1498 for (
unsigned int j = 0; j < spacedim; ++j)
1503 for (
unsigned int K = 0; K < dim; ++K)
1505 tmp[K] = covariant[j][0] * input[q][i][0][K];
1506 for (
unsigned int J = 1; J < dim; ++J)
1507 tmp[K] += covariant[j][J] * input[q][i][J][K];
1509 for (
unsigned int k = 0; k < spacedim; ++k)
1511 output[q][i][j][k] = covariant[k][0] * tmp[0];
1512 for (
unsigned int K = 1; K < dim; ++K)
1513 output[q][i][j][k] += covariant[k][K] * tmp[K];
1526template <
int dim,
int spacedim>
1534 switch (mapping_kind)
1551template <
int dim,
int spacedim>
1558 if (this->polynomial_degree == 2)
1560 for (
unsigned int line_no = 0;
1561 line_no < GeometryInfo<dim>::lines_per_cell;
1568 cell->line(line_no));
1573 cell->get_manifold() :
1582 std::vector<Point<spacedim>> tmp_points;
1583 for (
unsigned int line_no = 0;
1584 line_no < GeometryInfo<dim>::lines_per_cell;
1591 cell->line(line_no));
1596 cell->get_manifold() :
1599 const auto reference_cell = ReferenceCells::get_hypercube<dim>();
1600 const std::array<Point<spacedim>, 2> vertices{
1601 {cell->vertex(reference_cell.line_to_cell_vertices(line_no, 0)),
1602 cell->vertex(reference_cell.line_to_cell_vertices(line_no, 1))}};
1604 const std::size_t n_rows =
1605 support_point_weights_perimeter_to_interior[0].size(0);
1606 a.resize(a.size() + n_rows);
1610 support_point_weights_perimeter_to_interior[0],
1627 std::vector<Point<3>> tmp_points;
1630 for (
unsigned int face_no = 0; face_no < faces_per_cell; ++face_no)
1635 const bool face_orientation = cell->face_orientation(face_no),
1636 face_flip = cell->face_flip(face_no),
1637 face_rotation = cell->face_rotation(face_no);
1642 for (
unsigned int i = 0; i < vertices_per_face; ++i)
1643 Assert(face->vertex_index(i) ==
1645 face_no, i, face_orientation, face_flip, face_rotation)),
1650 for (
unsigned int i = 0; i < lines_per_face; ++i)
1653 face_no, i, face_orientation, face_flip, face_rotation)),
1659 boost::container::small_vector<Point<3>, 200> tmp_points(
1664 if (polynomial_degree > 1)
1665 for (
unsigned int line = 0; line < GeometryInfo<2>::lines_per_cell;
1667 for (
unsigned int i = 0; i < polynomial_degree - 1; ++i)
1668 tmp_points[4 + line * (polynomial_degree - 1) + i] =
1670 (polynomial_degree - 1) *
1674 const std::size_t n_rows =
1675 support_point_weights_perimeter_to_interior[1].size(0);
1676 a.resize(a.size() + n_rows);
1678 face->get_manifold().get_new_points(
1680 support_point_weights_perimeter_to_interior[1],
1695 vertices[i] = cell->vertex(i);
1699 for (
unsigned int q = 0, q2 = 0; q2 < polynomial_degree - 1; ++q2)
1700 for (
unsigned int q1 = 0; q1 < polynomial_degree - 1; ++q1, ++q)
1702 Point<2> point(line_support_points[q1 + 1][0],
1703 line_support_points[q2 + 1][0]);
1708 const std::size_t n_rows = weights.size(0);
1709 a.resize(a.size() + n_rows);
1711 cell->get_manifold().get_new_points(
1717template <
int dim,
int spacedim>
1728template <
int dim,
int spacedim>
1729std::vector<Point<spacedim>>
1734 std::vector<Point<spacedim>> a;
1735 a.reserve(Utilities::fixed_power<dim>(polynomial_degree + 1));
1737 a.push_back(cell->vertex(i));
1739 if (this->polynomial_degree > 1)
1746 bool all_manifold_ids_are_equal = (dim == spacedim);
1747 if (all_manifold_ids_are_equal &&
1749 &cell->get_manifold()) ==
nullptr)
1752 if (&cell->face(f)->get_manifold() != &cell->get_manifold())
1753 all_manifold_ids_are_equal =
false;
1756 for (
unsigned int l = 0; l < GeometryInfo<dim>::lines_per_cell; ++l)
1757 if (&cell->line(l)->get_manifold() != &cell->get_manifold())
1758 all_manifold_ids_are_equal =
false;
1761 if (all_manifold_ids_are_equal)
1763 const std::size_t n_rows = support_point_weights_cell.size(0);
1764 a.resize(a.size() + n_rows);
1768 support_point_weights_cell,
1775 add_line_support_points(cell, a);
1780 add_line_support_points(cell, a);
1783 if (dim != spacedim)
1784 add_quad_support_points(cell, a);
1787 const std::size_t n_rows =
1788 support_point_weights_perimeter_to_interior[1].size(0);
1789 a.resize(a.size() + n_rows);
1791 cell->get_manifold().get_new_points(
1793 support_point_weights_perimeter_to_interior[1],
1800 add_line_support_points(cell, a);
1801 add_quad_support_points(cell, a);
1805 const std::size_t n_rows =
1806 support_point_weights_perimeter_to_interior[2].size(0);
1807 a.resize(a.size() + n_rows);
1809 cell->get_manifold().get_new_points(
1811 support_point_weights_perimeter_to_interior[2],
1827template <
int dim,
int spacedim>
1837template <
int dim,
int spacedim>
1842 Assert(dim == reference_cell.get_dimension(),
1843 ExcMessage(
"The dimension of your mapping (" +
1845 ") and the reference cell cell_type (" +
1847 " ) do not agree."));
1849 return reference_cell.is_hyper_cube();
1855#include "mapping_q.inst"
auto make_const_array_view(const Container &container) -> decltype(make_array_view(container))
ArrayView< std::remove_reference_t< typename std::iterator_traits< Iterator >::reference >, MemorySpaceType > make_array_view(const Iterator begin, const Iterator end)
virtual Point< spacedim > get_new_point_on_line(const typename Triangulation< dim, spacedim >::line_iterator &line) const
virtual void get_new_points(const ArrayView< const Point< spacedim > > &surrounding_points, const Table< 2, double > &weights, ArrayView< Point< spacedim > > new_points) const
virtual std::size_t memory_consumption() const override
std::vector< Point< spacedim > > mapping_support_points
virtual void reinit(const UpdateFlags update_flags, const Quadrature< dim > &quadrature) override
internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > * output_data
void initialize_face(const UpdateFlags update_flags, const Quadrature< dim > &quadrature, const unsigned int n_original_q_points)
InternalData(const unsigned int polynomial_degree)
const std::vector< unsigned int > renumber_lexicographic_to_hierarchic
const Table< 2, double > support_point_weights_cell
virtual std::vector< Point< spacedim > > compute_mapping_support_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const
virtual std::unique_ptr< typename Mapping< dim, spacedim >::InternalDataBase > get_data(const UpdateFlags, const Quadrature< dim > &quadrature) const override
void fill_mapping_data_for_face_quadrature(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_number, const Quadrature< dim - 1 > &face_quadrature, const typename Mapping< dim, spacedim >::InternalDataBase &internal_data, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const
virtual BoundingBox< spacedim > get_bounding_box(const typename Triangulation< dim, spacedim >::cell_iterator &cell) const override
virtual std::unique_ptr< typename Mapping< dim, spacedim >::InternalDataBase > get_subface_data(const UpdateFlags flags, const Quadrature< dim - 1 > &quadrature) const override
virtual void fill_fe_subface_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int subface_no, const Quadrature< dim - 1 > &quadrature, const typename Mapping< dim, spacedim >::InternalDataBase &internal_data, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const override
virtual void transform(const ArrayView< const Tensor< 1, dim > > &input, const MappingKind kind, const typename Mapping< dim, spacedim >::InternalDataBase &internal, const ArrayView< Tensor< 1, spacedim > > &output) const override
virtual CellSimilarity::Similarity fill_fe_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< dim > &quadrature, const typename Mapping< dim, spacedim >::InternalDataBase &internal_data, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const override
virtual void fill_fe_immersed_surface_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const NonMatching::ImmersedSurfaceQuadrature< dim > &quadrature, const typename Mapping< dim, spacedim >::InternalDataBase &internal_data, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const override
const unsigned int polynomial_degree
virtual void transform_points_real_to_unit_cell(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const ArrayView< const Point< spacedim > > &real_points, const ArrayView< Point< dim > > &unit_points) const override
virtual std::unique_ptr< typename Mapping< dim, spacedim >::InternalDataBase > get_face_data(const UpdateFlags flags, const hp::QCollection< dim - 1 > &quadrature) const override
Point< dim > transform_real_to_unit_cell_internal(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< spacedim > &p, const Point< dim > &initial_p_unit) const
const std::vector< Table< 2, double > > support_point_weights_perimeter_to_interior
void fill_mapping_data_for_generic_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const ArrayView< const Point< dim > > &unit_points, const UpdateFlags update_flags, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const
const std::vector< Point< 1 > > line_support_points
virtual Point< spacedim > transform_unit_to_real_cell(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< dim > &p) const override
const std::vector< Polynomials::Polynomial< double > > polynomials_1d
virtual std::unique_ptr< Mapping< dim, spacedim > > clone() const override
const std::vector< Point< dim > > unit_cell_support_points
virtual Point< dim > transform_real_to_unit_cell(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const Point< spacedim > &p) const override
MappingQ(const unsigned int polynomial_degree)
virtual void add_line_support_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell, std::vector< Point< spacedim > > &a) const
virtual void add_quad_support_points(const typename Triangulation< dim, spacedim >::cell_iterator &cell, std::vector< Point< spacedim > > &a) const
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const hp::QCollection< dim - 1 > &quadrature, const typename Mapping< dim, spacedim >::InternalDataBase &internal_data, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data) const override
virtual bool is_compatible_with(const ReferenceCell &reference_cell) const override
unsigned int get_degree() const
Abstract base class for mapping classes.
virtual void transform_points_real_to_unit_cell(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const ArrayView< const Point< spacedim > > &real_points, const ArrayView< Point< dim > > &unit_points) const
const Tensor< 1, spacedim > & normal_vector(const unsigned int i) const
bool is_tensor_product() const
const std::vector< double > & get_weights() const
const std::array< Quadrature< 1 >, dim > & get_tensor_basis() const
const std::vector< Point< dim > > & get_points() const
unsigned int size() const
numbers::NumberTraits< Number >::real_type norm() const
static constexpr std::size_t size()
unsigned int size() const
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
#define AssertDimension(dim1, dim2)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
typename IteratorSelector::line_iterator line_iterator
@ 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_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_default
No update.
@ update_jacobian_pushed_forward_3rd_derivatives
@ update_boundary_forms
Outer normal vector, not normalized.
const Manifold< dim, spacedim > & get_manifold(const types::manifold_id number) const
@ mapping_covariant_gradient
@ mapping_contravariant_hessian
@ mapping_covariant_hessian
@ mapping_contravariant_gradient
#define DEAL_II_ASSERT_UNREACHABLE()
#define DEAL_II_NOT_IMPLEMENTED()
std::vector< index_type > data
std::enable_if_t< std::is_fundamental_v< T >, std::size_t > memory_consumption(const T &t)
std::string to_string(const number value, const unsigned int digits=numbers::invalid_unsigned_int)
std::string int_to_string(const unsigned int value, const unsigned int digits=numbers::invalid_unsigned_int)
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 ::MappingQ< dim, spacedim >::InternalData &data, const ArrayView< const Point< dim > > &unit_points, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber_lexicographic_to_hierarchic, std::vector< DerivativeForm< 2, dim, spacedim > > &jacobian_grads)
void do_fill_fe_face_values(const ::MappingQ< dim, spacedim > &mapping, const typename ::Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int subface_no, const typename QProjector< dim >::DataSetDescriptor data_set, const Quadrature< dim - 1 > &quadrature, const typename ::MappingQ< dim, spacedim >::InternalData &data, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber_lexicographic_to_hierarchic, internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &output_data)
void transform_fields(const ArrayView< const Tensor< rank, dim > > &input, const MappingKind mapping_kind, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_data, const ArrayView< Tensor< rank, spacedim > > &output)
void maybe_update_jacobian_3rd_derivatives(const CellSimilarity::Similarity cell_similarity, const typename ::MappingQ< dim, spacedim >::InternalData &data, const ArrayView< const Point< dim > > &unit_points, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber_lexicographic_to_hierarchic, std::vector< DerivativeForm< 4, dim, spacedim > > &jacobian_3rd_derivatives)
void maybe_update_jacobian_pushed_forward_grads(const CellSimilarity::Similarity cell_similarity, const typename ::MappingQ< dim, spacedim >::InternalData &data, const ArrayView< const Point< dim > > &unit_points, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber_lexicographic_to_hierarchic, std::vector< Tensor< 3, spacedim > > &jacobian_pushed_forward_grads)
void maybe_update_q_points_Jacobians_generic(const CellSimilarity::Similarity cell_similarity, const typename ::MappingQ< dim, spacedim >::InternalData &data, const ArrayView< const Point< dim > > &unit_points, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber_lexicographic_to_hierarchic, std::vector< Point< spacedim > > &quadrature_points, std::vector< DerivativeForm< 1, dim, spacedim > > &jacobians, std::vector< DerivativeForm< 1, spacedim, dim > > &inverse_jacobians)
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 maybe_update_jacobian_2nd_derivatives(const CellSimilarity::Similarity cell_similarity, const typename ::MappingQ< dim, spacedim >::InternalData &data, const ArrayView< const Point< dim > > &unit_points, const std::vector< Polynomials::Polynomial< double > > &polynomials_1d, const std::vector< unsigned int > &renumber_lexicographic_to_hierarchic, std::vector< DerivativeForm< 3, dim, spacedim > > &jacobian_2nd_derivatives)
ProductTypeNoPoint< Number, Number2 >::type evaluate_tensor_product_value_linear(const Number *values, const Point< dim, Number2 > &p)
ProductTypeNoPoint< Number, Number2 >::type evaluate_tensor_product_value(const std::vector< Polynomials::Polynomial< double > > &poly, const ArrayView< const Number > &values, const Point< dim, Number2 > &p, const bool d_linear=false, const std::vector< unsigned int > &renumber={})
static const unsigned int invalid_unsigned_int
const types::manifold_id flat_manifold_id
::VectorizedArray< Number, width > sqrt(const ::VectorizedArray< Number, width > &)
::VectorizedArray< Number, width > abs(const ::VectorizedArray< Number, width > &)
static std_cxx20::ranges::iota_view< unsigned int, unsigned int > face_indices()
static double d_linear_shape_function(const Point< dim > &xi, const unsigned int i)
static std_cxx20::ranges::iota_view< unsigned int, unsigned int > vertex_indices()
DEAL_II_HOST constexpr Number determinant(const SymmetricTensor< 2, dim, Number > &)