deal.II version GIT relicensing-6834-g5b78e6bcdf 2026-10-01 11:20:01+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
fe_evaluation_data.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2021 - 2026 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13
14#ifndef dealii_matrix_free_fe_evaluation_data_h
15#define dealii_matrix_free_fe_evaluation_data_h
16
17
18#include <deal.II/base/config.h>
19
28#include <deal.II/base/tensor.h>
30
32
36
37
39
40
41
42namespace internal
43{
45
48 std::string,
49 << "You are requesting information from an FEEvaluation/FEFaceEvaluation "
50 << "object for which this kind of information has not been computed. What "
51 << "information these objects compute is determined by the update_* flags "
52 << "you pass to MatrixFree::reinit() via MatrixFree::AdditionalData. "
53 << "Here, the operation you are attempting requires the <" << arg1
54 << "> flag to be set, but it was apparently not specified "
55 << "upon initialization.");
56} // namespace internal
57
58// forward declarations
59template <int dim,
60 int fe_degree,
61 int n_q_points_1d = fe_degree + 1,
62 int n_components_ = 1,
63 typename Number = double,
64 typename VectorizedArrayType = VectorizedArray<Number>>
65class FEEvaluation;
66
67template <int dim,
68 int n_components_,
69 typename Number,
70 bool = false,
71 typename = VectorizedArray<Number>>
73
74namespace internal
75{
76 namespace MatrixFreeFunctions
77 {
78 template <int, typename>
79 class MappingDataOnTheFly;
80 }
81} // namespace internal
82
83
112template <int dim, typename Number, bool is_face>
114{
117 using MappingInfoStorageType = internal::MatrixFreeFunctions::
118 MappingInfoStorage<(is_face ? dim - 1 : dim), dim, Number>;
120
121public:
122 static constexpr unsigned int dimension = dim;
123
124 using NumberType = Number;
128
129 static constexpr unsigned int n_lanes =
131
140 const bool is_interior_face = true);
141
145 FEEvaluationData(const FEEvaluationData &other) = default;
146
152
156 virtual ~FEEvaluationData() = default;
157
163 void
165 const unsigned int n_components);
166
171 void
174
188
193 Number
194 JxW(const unsigned int q_point) const;
195
201 quadrature_point(const unsigned int q) const;
202
215 inverse_jacobian(const unsigned int q_point) const;
216
230 normal_vector(const unsigned int q_point) const;
231
237 DEAL_II_DEPRECATED_WITH_COMMENT("Use normal_vector() instead.")
238 Tensor<1, dim, Number>
239 get_normal_vector(const unsigned int q_point) const;
240
255 const Number *
257
266 Number *
268
279 const Number *
281
292 Number *
294
306 const Number *
308
320 Number *
322
335 const Number *
337
350 Number *
352
368 unsigned int
370
377 internal::MatrixFreeFunctions::GeometryType
379
383 const ShapeInfoType &
385
389 const internal::MatrixFreeFunctions::DoFInfo &
391
397 const std::vector<unsigned int> &
399
403 unsigned int
405
409 unsigned int
411
416 unsigned int
418
423 unsigned int
425
429 unsigned int
431
444 std::uint8_t
445 get_face_no(const unsigned int v = 0) const;
446
456 unsigned int
458
467 std::uint8_t
468 get_face_orientation(const unsigned int v = 0) const;
469
477 internal::MatrixFreeFunctions::DoFInfo::DoFAccessIndex
479
488 bool
490
495 const std::array<unsigned int, n_lanes> &
497 {
498 // implemented inline to avoid compilation problems on Windows
499 if constexpr (running_in_debug_mode())
500 {
502 }
503 return cell_ids;
504 }
505
510 const std::array<unsigned int, n_lanes> &
512 {
513 // implemented inline to avoid compilation problems on Windows
514 if constexpr (running_in_debug_mode())
515 {
517 }
518 return face_ids;
519 }
520
525 unsigned int
527 {
528 // implemented inline to avoid compilation problems on Windows
529 if constexpr (running_in_debug_mode())
530 {
532 }
533
534 return cell;
535 }
536
541 const std::array<unsigned int, n_lanes> &
543 {
544 // implemented inline to avoid compilation problems on Windows
545 if constexpr (running_in_debug_mode())
546 {
548 }
549
550 if (!is_face || dof_access_index ==
552 return cell_ids;
553 else
554 return face_ids;
555 }
556
564
582 template <typename T>
583 T
584 read_cell_data(const AlignedVector<T> &array) const;
585
608 template <typename T, int D>
609 void
611
618 template <typename T>
619 void
620 set_cell_data(AlignedVector<T> &array, const T &value) const;
621
630 template <typename T>
631 T
632 read_face_data(const AlignedVector<T> &array) const;
633
642 template <typename T>
643 void
644 set_face_data(AlignedVector<T> &array, const T &value) const;
645
661
662protected:
669 FEEvaluationData(const InitializationData &initialization_data,
670 const bool is_interior_face,
671 const unsigned int quadrature_index,
672 const unsigned int first_selected_component);
673
679 const std::shared_ptr<
682 const unsigned int n_fe_components,
683 const unsigned int first_selected_component);
684
692
699
707
713 const unsigned int quadrature_index;
714
719 const unsigned int n_fe_components;
720
725 const unsigned int first_selected_component;
726
730 const unsigned int active_fe_index;
731
736 const unsigned int active_quad_index;
737
744
748 const unsigned int n_quadrature_points;
749
755
769
774 const Tensor<1, dim *(dim + 1) / 2, Tensor<1, dim, Number>>
776
781 const Tensor<1, dim *(dim + 1) / 2, Tensor<1, dim, Number>>
783
790 const Number *J_value;
791
796
801
806
814
825 Number *values_dofs;
826
836 Number *values_quad;
837
851
864
877
888
894
901
908
915
922
929
936
943
948 unsigned int cell;
949
957
963
972 std::array<std::uint8_t, n_lanes> face_numbers;
973
982 std::array<types::geometric_orientation, n_lanes> face_orientations;
983
991 unsigned int subface_index;
992
1000
1005 std::array<unsigned int, n_lanes> cell_ids;
1006
1011 std::array<unsigned int, n_lanes> face_ids;
1012
1018 std::shared_ptr<
1021
1027
1028 // Make FEEvaluation and FEEvaluationBase objects friends for access to
1029 // protected member mapped_geometry.
1030 template <int, int, typename, bool, typename>
1031 friend class FEEvaluationBase;
1032
1033 template <int, int, int, int, typename, typename>
1034 friend class FEEvaluation;
1035};
1036
1037
1042template <int dim,
1043 typename Number,
1044 bool is_face,
1045 typename VectorizedArrayType = VectorizedArray<Number>>
1048
1049
1050/*----------------------- Inline functions ----------------------------------*/
1051
1052#ifndef DOXYGEN
1053
1054template <int dim, typename Number, bool is_face>
1056 const ShapeInfoType &shape_info,
1057 const bool is_interior_face)
1059 InitializationData{&shape_info, nullptr, nullptr, 0, 0, nullptr},
1061 0,
1062 0)
1063{}
1064
1065
1066template <int dim, typename Number, bool is_face>
1068 const InitializationData &initialization_data,
1069 const bool is_interior_face,
1070 const unsigned int quadrature_index,
1071 const unsigned int first_selected_component)
1072 : data(initialization_data.shape_info)
1073 , dof_info(initialization_data.dof_info)
1074 , mapping_data(initialization_data.mapping_data)
1076 , n_fe_components(dof_info != nullptr ? dof_info->start_components.back() : 0)
1078 , active_fe_index(initialization_data.active_fe_index)
1079 , active_quad_index(initialization_data.active_quad_index)
1080 , descriptor(initialization_data.descriptor)
1081 , n_quadrature_points(descriptor == nullptr ?
1082 (is_face ? data->n_q_points_face : data->n_q_points) :
1084 , quadrature_points(nullptr)
1085 , jacobian(nullptr)
1086 , jacobian_gradients(nullptr)
1088 , J_value(nullptr)
1089 , normal_vectors(nullptr)
1090 , normal_x_jacobian(nullptr)
1092 descriptor != nullptr ? descriptor->quadrature_weights.begin() : nullptr)
1093# ifdef DEBUG
1094 , is_reinitialized(false)
1095 , dof_values_initialized(false)
1099 , values_quad_submitted(false)
1102# endif
1106 is_face ?
1108 internal::MatrixFreeFunctions::DoFInfo::dof_access_face_interior :
1109 internal::MatrixFreeFunctions::DoFInfo::dof_access_face_exterior) :
1110 internal::MatrixFreeFunctions::DoFInfo::dof_access_cell)
1111 , subface_index(0)
1112 , cell_type(internal::MatrixFreeFunctions::general)
1114{
1115 Assert(!data->data.empty(), ExcInternalError());
1116}
1117
1118
1119
1120template <int dim, typename Number, bool is_face>
1122 const std::shared_ptr<
1125 const unsigned int n_fe_components,
1126 const unsigned int first_selected_component)
1127 : data(nullptr)
1128 , dof_info(nullptr)
1129 , mapping_data(&mapped_geometry->get_data_storage())
1135 , descriptor(&mapped_geometry->get_data_storage().descriptor[0])
1138 mapped_geometry->get_data_storage().quadrature_points.begin())
1139 , jacobian(mapped_geometry->get_data_storage().jacobians[0].begin())
1141 mapped_geometry->get_data_storage().jacobian_gradients[0].begin())
1144 .begin())
1145 , J_value(mapped_geometry->get_data_storage().JxW_values.begin())
1146 , normal_vectors(nullptr)
1147 , normal_x_jacobian(nullptr)
1149 , cell(0)
1150 , cell_type(internal::MatrixFreeFunctions::general)
1151 , interior_face(true)
1152 , dof_access_index(internal::MatrixFreeFunctions::DoFInfo::dof_access_cell)
1154 , is_reinitialized(false)
1156{}
1157
1158
1159
1160template <int dim, typename Number, bool is_face>
1163{
1170
1171 data = other.data;
1172 dof_info = other.dof_info;
1173 mapping_data = other.mapping_data;
1174 descriptor = other.descriptor;
1175 jacobian = nullptr;
1176 J_value = nullptr;
1177 normal_vectors = nullptr;
1178 normal_x_jacobian = nullptr;
1179 jacobian_gradients = nullptr;
1181 quadrature_points = nullptr;
1183
1184 if constexpr (running_in_debug_mode())
1185 {
1186 is_reinitialized = false;
1187 dof_values_initialized = false;
1192 values_quad_submitted = false;
1194 }
1195
1199 is_face ?
1200 (is_interior_face() ?
1203 internal::MatrixFreeFunctions::DoFInfo::dof_access_cell;
1204 face_numbers[0] = 0;
1206 subface_index = 0;
1209
1210 return *this;
1211}
1212
1213
1214
1215template <int dim, typename Number, bool is_face>
1216inline void
1219 const unsigned int n_components)
1220{
1222 Assert(data != nullptr, ExcInternalError());
1223 Assert(!data->data.empty(), ExcInternalError());
1224
1225
1226 const unsigned int tensor_dofs_per_component =
1227 Utilities::fixed_power<dim>(data->data.front().fe_degree + 1);
1228 const unsigned int dofs_per_component = data->dofs_per_component_on_cell;
1229
1230 const unsigned int size_scratch_data =
1231 std::max(tensor_dofs_per_component + 1, dofs_per_component) * n_components *
1232 4 +
1234 const unsigned int size_data_arrays =
1236 (n_components * ((dim * (dim + 1)) / 2 + 2 * dim + 2) *
1238
1239 // include 12 extra fields to insert some padding between values, gradients
1240 // and hessians, which helps to reduce the probability of cache conflicts
1241 const unsigned int allocated_size = size_scratch_data + size_data_arrays + 12;
1242 if constexpr (running_in_debug_mode())
1243 {
1244 scratch_data_array->resize(allocated_size);
1245 scratch_data_array->fill(Number(numbers::signaling_nan<ScalarNumber>()));
1246 }
1247 else
1248 {
1249 scratch_data_array->resize_fast(allocated_size);
1250 }
1251 scratch_data.reinit(scratch_data_array->begin() + size_data_arrays + 12,
1252 size_scratch_data);
1253
1254 // set the pointers to the correct position in the data array
1256 values_quad =
1259 scratch_data_array->begin() + 6 +
1262 scratch_data_array->begin() + 8 +
1265 scratch_data_array->begin() + 12 +
1268 scratch_data_array->begin() + 12 +
1270}
1271
1272
1273
1274template <int dim, typename Number, bool is_face>
1275inline void
1278{
1279 Assert(is_face == true,
1280 ExcMessage("Faces can only be set if the is_face template parameter "
1281 "is true"));
1282 face_numbers[0] =
1284 subface_index = is_interior_face() == true ?
1286 face.subface_index;
1287
1288 // First check if interior or exterior cell has non-standard orientation
1289 // (i.e. the third bit is one or not). Then set zero if this cell has
1290 // standard-orientation else copy the first three bits
1291 // (which is equivalent to modulo 8). See also the documentation of
1292 // internal::MatrixFreeFunctions::FaceToCellTopology::face_orientation.
1293 face_orientations[0] = (is_interior_face() == (face.face_orientation >= 8)) ?
1294 (face.face_orientation % 8) :
1296
1297 if (is_interior_face())
1298 cell_ids = face.cells_interior;
1299 else
1300 cell_ids = face.cells_exterior;
1301}
1302
1303
1304
1305template <int dim, typename Number, bool is_face>
1308 const unsigned int q_point) const
1309{
1311 Assert(normal_vectors != nullptr,
1313 "update_normal_vectors"));
1315 return normal_vectors[0];
1316 else
1317 return normal_vectors[q_point];
1318}
1319
1320
1321
1322// This function is deprecated.
1323template <int dim, typename Number, bool is_face>
1326 const unsigned int q_point) const
1327{
1328 return normal_vector(q_point);
1329}
1330
1331
1332
1333template <int dim, typename Number, bool is_face>
1335FEEvaluationData<dim, Number, is_face>::JxW(const unsigned int q_point) const
1336{
1338 Assert(J_value != nullptr,
1340 "update_values|update_gradients"));
1342 {
1344 return J_value[0] * quadrature_weights[q_point];
1345 }
1346 else
1347 return J_value[q_point];
1348}
1349
1350
1351
1352template <int dim, typename Number, bool is_face>
1355 const unsigned int q) const
1356{
1358 Assert(this->quadrature_points != nullptr,
1360 "update_quadrature_points"));
1361
1362 // Cartesian/affine mesh: only first vertex of cell is stored, we must
1363 // compute it through the Jacobian (which is stored in non-inverted and
1364 // non-transposed form as index '1' in the jacobian field)
1365 if (is_face == false &&
1367 {
1368 Assert(this->jacobian != nullptr, ExcNotInitialized());
1370
1371 const Tensor<2, dim, Number> &jac = this->jacobian[1];
1373 for (unsigned int d = 0; d < dim; ++d)
1374 point[d] += jac[d][d] * static_cast<typename Number::value_type>(
1375 this->descriptor->quadrature.point(q)[d]);
1376 else
1377 for (unsigned int d = 0; d < dim; ++d)
1378 for (unsigned int e = 0; e < dim; ++e)
1379 point[d] += jac[d][e] * static_cast<typename Number::value_type>(
1380 this->descriptor->quadrature.point(q)[e]);
1381 return point;
1382 }
1383 else
1384 return this->quadrature_points[q];
1385}
1386
1387
1388
1389template <int dim, typename Number, bool is_face>
1392 const unsigned int q_point) const
1393{
1395 Assert(jacobian != nullptr,
1397 "update_gradients"));
1399 return jacobian[0];
1400 else
1401 return jacobian[q_point];
1402}
1403
1404
1405
1406template <int dim, typename Number, bool is_face>
1407inline const Number *
1409{
1410 return values_dofs;
1411}
1412
1413
1414
1415template <int dim, typename Number, bool is_face>
1416inline Number *
1418{
1419 if constexpr (running_in_debug_mode())
1420 {
1422 }
1423 return values_dofs;
1424}
1425
1426
1427
1428template <int dim, typename Number, bool is_face>
1429inline const Number *
1431{
1432 if constexpr (running_in_debug_mode())
1433 {
1436 }
1437 return values_quad;
1438}
1439
1440
1441
1442template <int dim, typename Number, bool is_face>
1443inline Number *
1445{
1446 if constexpr (running_in_debug_mode())
1447 {
1449 values_quad_submitted = true;
1450 }
1451 return values_quad;
1452}
1453
1454
1455
1456template <int dim, typename Number, bool is_face>
1457inline const Number *
1459{
1460 if constexpr (running_in_debug_mode())
1461 {
1464 }
1465 return gradients_quad;
1466}
1467
1468
1469
1470template <int dim, typename Number, bool is_face>
1471inline Number *
1473{
1474 if constexpr (running_in_debug_mode())
1475 {
1478 }
1479 return gradients_quad;
1480}
1481
1482
1483
1484template <int dim, typename Number, bool is_face>
1485inline const Number *
1487{
1488 if constexpr (running_in_debug_mode())
1489 {
1491 }
1492 return hessians_quad;
1493}
1494
1495
1496
1497template <int dim, typename Number, bool is_face>
1498inline Number *
1500{
1501 if constexpr (running_in_debug_mode())
1502 {
1504 }
1505 return hessians_quad;
1506}
1507
1508
1509
1510template <int dim, typename Number, bool is_face>
1511inline unsigned int
1513{
1514 Assert(mapping_data != nullptr, ExcInternalError());
1515
1516 if (dof_info == nullptr)
1517 return 0;
1518 else
1519 {
1522 }
1523}
1524
1525
1526
1527template <int dim, typename Number, bool is_face>
1530{
1531 if constexpr (running_in_debug_mode())
1532 {
1534 }
1535 return cell_type;
1536}
1537
1538
1539
1540template <int dim, typename Number, bool is_face>
1543{
1544 Assert(data != nullptr, ExcInternalError());
1545 return *data;
1546}
1547
1548
1549
1550template <int dim, typename Number, bool is_face>
1553{
1554 Assert(dof_info != nullptr,
1555 ExcMessage(
1556 "FEEvaluation was not initialized with a MatrixFree object!"));
1557 return *dof_info;
1558}
1559
1560
1561
1562template <int dim, typename Number, bool is_face>
1563inline const std::vector<unsigned int> &
1565{
1566 return data->lexicographic_numbering;
1567}
1568
1569
1570
1571template <int dim, typename Number, bool is_face>
1572inline unsigned int
1574{
1575 return quadrature_index;
1576}
1577
1578
1579
1580template <int dim, typename Number, bool is_face>
1581inline unsigned int
1583{
1584 if (is_face && dof_access_index ==
1586 return cell * ReferenceCells::max_n_faces<dim>() + face_numbers[0];
1587 else
1588 return cell;
1589}
1590
1591
1592
1593template <int dim, typename Number, bool is_face>
1594inline unsigned int
1596{
1597 return active_fe_index;
1598}
1599
1600
1601
1602template <int dim, typename Number, bool is_face>
1603inline unsigned int
1605{
1606 return active_quad_index;
1607}
1608
1609
1610
1611template <int dim, typename Number, bool is_face>
1612inline unsigned int
1614{
1616}
1617
1618
1619
1620template <int dim, typename Number, bool is_face>
1621inline ArrayView<Number>
1623{
1624 return scratch_data;
1625}
1626
1627
1628
1629template <int dim, typename Number, bool is_face>
1630inline std::uint8_t
1632{
1633 Assert(is_face, ExcNotInitialized());
1637 is_interior_face() == false),
1638 ExcMessage("All face numbers can only be queried for ECL at exterior "
1639 "faces. Use get_face_no() in other cases."));
1640
1641 return face_numbers[v];
1642}
1643
1644
1645
1646template <int dim, typename Number, bool is_face>
1647inline unsigned int
1649{
1650 return subface_index;
1651}
1652
1653
1654
1655template <int dim, typename Number, bool is_face>
1656inline std::uint8_t
1658 const unsigned int v) const
1659{
1660 Assert(is_face, ExcNotInitialized());
1664 is_interior_face() == false),
1665 ExcMessage("All face numbers can only be queried for ECL at exterior "
1666 "faces. Use get_face_no() in other cases."));
1667
1668 return face_orientations[v];
1669}
1670
1671
1672
1673template <int dim, typename Number, bool is_face>
1676{
1677 return dof_access_index;
1678}
1679
1680
1681
1682template <int dim, typename Number, bool is_face>
1683inline bool
1685{
1686 return interior_face;
1687}
1688
1689
1690
1691template <int dim, typename Number, bool is_face>
1694{
1697}
1698
1699
1700
1701namespace internal
1702{
1703 template <std::size_t N,
1704 typename VectorOfArrayType,
1705 typename ArrayType,
1706 typename FU>
1707 inline void
1708 process_cell_or_face_data(const std::array<unsigned int, N> indices,
1709 VectorOfArrayType &array,
1710 ArrayType &out,
1711 const FU &fu)
1712 {
1713 for (unsigned int i = 0; i < N; ++i)
1714 if (indices[i] != numbers::invalid_unsigned_int)
1715 {
1716 AssertIndexRange(indices[i] / N, array.size());
1717 fu(out[i], array[indices[i] / N][indices[i] % N]);
1718 }
1719 }
1720
1721 template <std::size_t N, typename VectorOfArrayType, typename ArrayType>
1722 inline void
1723 set_valid_element_to_array(const std::array<unsigned int, N> indices,
1724 const VectorOfArrayType &array,
1725 ArrayType &out)
1726 {
1727 AssertDimension(indices.size(), out.size());
1728 AssertDimension(indices.size(), array[0].size());
1729 // set all entries in array to a valid element
1730 std::size_t index = 0;
1731 for (; index < N; ++index)
1732 if (indices[index] != numbers::invalid_unsigned_int)
1733 break;
1734 for (unsigned int i = 0; i < N; ++i)
1735 out[i] = array[indices[index] / N][indices[index] % N];
1736 }
1737} // namespace internal
1738
1739
1740
1741template <int dim, typename Number, bool is_face>
1742template <typename T>
1743inline T
1745 const AlignedVector<T> &array) const
1746{
1747 T out;
1748 internal::set_valid_element_to_array(this->get_cell_ids(), array, out);
1749 internal::process_cell_or_face_data(this->get_cell_ids(),
1750 array,
1751 out,
1752 [](auto &local, const auto &global) {
1753 local = global;
1754 });
1755 return out;
1756}
1757
1758
1759template <int dim, typename Number, bool is_face>
1760template <typename T, int D>
1761void
1763 const Table<D, T> &src,
1764 Table<D - 1, T> &dst) const
1765{
1766 static_assert(D >= 2, "Table dimension must be at least 2");
1767
1768
1769 for (unsigned int d = 0; d < D - 1; ++d)
1770 Assert(dst.size(d) == src.size(d + 1),
1771 ExcMessage("Dimension mismatch between src and dst tables."));
1772
1773 for (unsigned int lane = 0; lane < n_lanes; ++lane)
1774 if (this->get_cell_ids()[lane] != numbers::invalid_unsigned_int)
1775 {
1776 const unsigned int src_index = this->get_cell_ids()[lane] / n_lanes;
1777 const unsigned int array_lane = this->get_cell_ids()[lane] % n_lanes;
1778
1779 AssertIndexRange(src_index, src.size(0));
1780
1781 // Copy data following the pattern:
1782 // dst[i][j][lane] = src[batch][i][j][lane]
1783 auto copy_recursively = [&](auto self,
1784 auto &&dst_slice,
1785 const auto &src_slice,
1786 unsigned int depth) -> void {
1787 if constexpr (std::is_same_v<std::decay_t<decltype(dst_slice)>, T>)
1788 {
1789 // Base case: we've reached the innermost level (the array)
1790 dst_slice[lane] = src_slice[array_lane];
1791 }
1792 else
1793 {
1794 // Recursive case: iterate through this dimension. 'depth'
1795 // corresponds to the dimension index in the original 'src'
1796 // table.
1797 AssertIndexRange(depth, D);
1798 for (unsigned int i = 0; i < src.size(depth); ++i)
1799 self(self, dst_slice[i], src_slice[i], depth + 1);
1800 }
1801 };
1802
1803 copy_recursively(copy_recursively, dst, src[src_index], 1);
1804 }
1805}
1806
1807
1808
1809template <int dim, typename Number, bool is_face>
1810template <typename T>
1811inline void
1813 const T &in) const
1814{
1815 internal::process_cell_or_face_data(this->get_cell_ids(),
1816 array,
1817 in,
1818 [](const auto &local, auto &global) {
1819 global = local;
1820 });
1821}
1822
1823
1824
1825template <int dim, typename Number, bool is_face>
1826template <typename T>
1827inline T
1829 const AlignedVector<T> &array) const
1830{
1831 T out;
1832 internal::set_valid_element_to_array(this->get_cell_ids(), array, out);
1833 internal::process_cell_or_face_data(this->get_face_ids(),
1834 array,
1835 out,
1836 [](auto &local, const auto &global) {
1837 local = global;
1838 });
1839 return out;
1840}
1841
1842
1843
1844template <int dim, typename Number, bool is_face>
1845template <typename T>
1846inline void
1848 const T &in) const
1849{
1850 internal::process_cell_or_face_data(this->get_face_ids(),
1851 array,
1852 in,
1853 [](const auto &local, auto &global) {
1854 global = local;
1855 });
1856}
1857
1858
1859
1860#endif // ifndef DOXYGEN
1861
1862
1864
1865#endif
*  *  iterator begin()
void resize_fast(const size_type new_size)
iterator begin()
size_type size() const
void resize(const size_type new_size)
void reinit(value_type *starting_element, const std::size_t n_elements)
Definition array_view.h:557
const Number * J_value
internal::MatrixFreeFunctions::GeometryType get_cell_type() const
const Tensor< 2, dim, Number > * jacobian
const MappingInfoStorageType::QuadratureDescriptor * descriptor
const unsigned int n_quadrature_points
const MappingInfoStorageType * mapping_data
internal::MatrixFreeFunctions::DoFInfo::DoFAccessIndex dof_access_index
std::uint8_t get_face_no(const unsigned int v=0) const
ArrayView< Number > scratch_data
internal::MatrixFreeFunctions::DoFInfo::DoFAccessIndex get_dof_access_index() const
const Point< dim, Number > * quadrature_points
unsigned int subface_index
const Tensor< 1, dim *(dim+1)/2, Tensor< 1, dim, Number > > * jacobian_gradients_non_inverse
ScalarNumber shape_info_number_type
FEEvaluationData(const FEEvaluationData &other)=default
const ShapeInfoType & get_shape_info() const
void set_face_data(AlignedVector< T > &array, const T &value) const
FEEvaluationData(const InitializationData &initialization_data, const bool is_interior_face, const unsigned int quadrature_index, const unsigned int first_selected_component)
internal::MatrixFreeFunctions::ShapeInfo< typename internal::VectorizedArrayTrait< VectorizedArrayType >::value_type > ShapeInfoType
void reinit_face(const internal::MatrixFreeFunctions::FaceToCellTopology< n_lanes > &face)
Number JxW(const unsigned int q_point) const
const std::array< unsigned int, n_lanes > & get_face_ids() const
unsigned int get_first_selected_component() const
const unsigned int n_fe_components
const ShapeInfoType * data
T read_face_data(const AlignedVector< T > &array) const
Number * gradients_from_hessians_quad
std::shared_ptr< internal::MatrixFreeFunctions::MappingDataOnTheFly< dim, Number > > mapped_geometry
unsigned int get_active_quadrature_index() const
const internal::MatrixFreeFunctions::DoFInfo & get_dof_info() const
const std::array< unsigned int, n_lanes > & get_cell_ids() const
unsigned int get_mapping_data_index_offset() const
void set_data_pointers(AlignedVector< Number > *scratch_data, const unsigned int n_components)
Tensor< 2, dim, Number > inverse_jacobian(const unsigned int q_point) const
std::array< std::uint8_t, n_lanes > face_numbers
const unsigned int active_fe_index
static constexpr unsigned int n_lanes
const Tensor< 1, dim, Number > * normal_vectors
internal::MatrixFreeFunctions::GeometryType cell_type
const Number * begin_gradients() const
const std::array< unsigned int, n_lanes > & get_cell_or_face_ids() const
Tensor< 1, dim, Number > normal_vector(const unsigned int q_point) const
std::array< unsigned int, n_lanes > cell_ids
const DoFInfo * dof_info
unsigned int get_current_cell_index() const
unsigned int get_subface_index() const
Tensor< 1, dim, Number > get_normal_vector(const unsigned int q_point) const
const unsigned int active_quad_index
unsigned int get_active_fe_index() const
Number * values_from_gradients_quad
void set_cell_data(AlignedVector< T > &array, const T &value) const
const unsigned int quadrature_index
unsigned int get_quadrature_index() const
const ScalarNumber * quadrature_weights
const Tensor< 1, dim *(dim+1)/2, Tensor< 1, dim, Number > > * jacobian_gradients
const Tensor< 1, dim, Number > * normal_x_jacobian
bool is_interior_face() const
std_cxx20::ranges::iota_view< unsigned int, unsigned int > quadrature_point_indices() const
const std::vector< unsigned int > & get_internal_dof_numbering() const
FEEvaluationData & operator=(const FEEvaluationData &other)
virtual ~FEEvaluationData()=default
ArrayView< Number > get_scratch_data() const
T read_cell_data(const AlignedVector< T > &array) const
static constexpr unsigned int dimension
FEEvaluationData(const std::shared_ptr< internal::MatrixFreeFunctions::MappingDataOnTheFly< dim, Number > > &mapping_data, const unsigned int n_fe_components, const unsigned int first_selected_component)
FEEvaluationData(const ShapeInfoType &shape_info, const bool is_interior_face=true)
Point< dim, Number > quadrature_point(const unsigned int q) const
std::array< types::geometric_orientation, n_lanes > face_orientations
const Number * begin_values() const
typename internal::VectorizedArrayTrait< Number >::value_type ScalarNumber
std::array< unsigned int, n_lanes > face_ids
void read_cell_data(const Table< D, T > &src, Table< D - 1, T > &dst) const
const Number * begin_dof_values() const
std::uint8_t get_face_orientation(const unsigned int v=0) const
const Number * begin_hessians() const
unsigned int get_cell_or_face_batch_id() const
const unsigned int first_selected_component
const unsigned int dofs_per_component
const unsigned int n_q_points
static constexpr unsigned int n_components
Definition point.h:111
const Point< dim > & point(const unsigned int i) const
#define DEAL_II_ALWAYS_INLINE
Definition config.h:166
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_DEPRECATED_WITH_COMMENT(comment)
Definition config.h:295
constexpr bool running_in_debug_mode()
Definition config.h:76
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
#define DeclException0(Exception0)
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcAccessToUninitializedField()
static ::ExceptionBase & ExcNotInitialized()
#define DeclException1(Exception1, type1, outsequence)
static ::ExceptionBase & ExcMatrixFreeAccessToUninitializedMappingField(std::string arg1)
static ::ExceptionBase & ExcMessage(std::string arg1)
std::vector< index_type > data
Definition mpi.cc:734
@ general
No special properties.
constexpr char N
constexpr char T
Point< spacedim > point(const gp_Pnt &p, const double tolerance=1e-10)
Definition utilities.cc:210
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
*  *  *  RotationFunction< dim, Number >::RotationFunction Number(dim)
constexpr unsigned int invalid_unsigned_int
Definition types.h:228
constexpr types::geometric_orientation default_geometric_orientation
Definition types.h:342
boost::integer_range< IncrementableType > iota_view
Definition iota_view.h:43
STL namespace.
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
const MappingInfoStorageType * mapping_data
const MappingInfoStorageType::QuadratureDescriptor * descriptor
std::array< unsigned int, vectorization_width > cells_interior
Definition face_info.h:58
std::array< unsigned int, vectorization_width > cells_exterior
Definition face_info.h:73
static constexpr std::size_t width()