Debian Codegraph @

include/deal.II/fe/mapping_related_data.h

raw
1 // ------------------------------------------------------------------------
2 //
3 // SPDX-License-Identifier: LGPL-2.1-or-later
4 // Copyright (C) 2022 by the deal.II authors
5 //
6 // This file is part of the deal.II library.
7 //
8 // Part of the source code is dual licensed under Apache-2.0 WITH
9 // LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10 // governing the source code and code contributions can be found in
11 // LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12 //
13 // ------------------------------------------------------------------------
14
15 #ifndef dealii_fe_mapping_related_data_h
16 #define dealii_fe_mapping_related_data_h
17
18 #include <deal.II/base/config.h>
19
20 #include <deal.II/base/derivative_form.h>
21 #include <deal.II/base/point.h>
22 #include <deal.II/base/tensor.h>
23
24 #include <deal.II/fe/fe_update_flags.h>
25
26 #include <vector>
27
28
29 DEAL_II_NAMESPACE_OPEN
30
31 /** @addtogroup feaccess */
32 /** @{ */
33
34 namespace internal
35 {
36 namespace FEValuesImplementation
37 {
38 /**
39 * A class that stores all of the mapping related data used in
40 * dealii::FEValues, dealii::FEFaceValues, and dealii::FESubfaceValues
41 * objects. Objects of this kind will be given as <i>output</i> argument
42 * when dealii::FEValues::reinit() calls Mapping::fill_fe_values() for a
43 * given cell, face, or subface.
44 *
45 * The data herein will then be provided as <i>input</i> argument in the
46 * following call to FiniteElement::fill_fe_values().
47 *
48 * @ingroup feaccess
49 */
50 template <int dim, int spacedim = dim>
51 class MappingRelatedData
52 {
53 public:
54 /**
55 * Initialize all vectors to correct size.
56 */
57 void
58 initialize(const unsigned int n_quadrature_points,
59 const UpdateFlags flags);
60
61 /**
62 * Compute and return an estimate for the memory consumption (in bytes)
63 * of this object.
64 */
65 std::size_t
66 memory_consumption() const;
67
68 /**
69 * Store an array of weights times the Jacobi determinant at the
70 * quadrature points. This function is reset each time reinit() is
71 * called. The Jacobi determinant is actually the reciprocal value of
72 * the Jacobi matrices stored in this class, see the general
73 * documentation of this class for more information.
74 *
75 * However, if this object refers to an FEFaceValues or FESubfaceValues
76 * object, then the JxW_values correspond to the Jacobian of the
77 * transformation of the face, not the cell, i.e. the dimensionality is
78 * that of a surface measure, not of a volume measure. In this case, it
79 * is computed from the boundary forms, rather than the Jacobian matrix.
80 */
81 std::vector<double> JxW_values;
82
83 /**
84 * Array of the Jacobian matrices at the quadrature points.
85 */
86 std::vector<DerivativeForm<1, dim, spacedim>> jacobians;
87
88 /**
89 * Array of the derivatives of the Jacobian matrices at the quadrature
90 * points.
91 */
92 std::vector<DerivativeForm<2, dim, spacedim>> jacobian_grads;
93
94 /**
95 * Array of the inverse Jacobian matrices at the quadrature points.
96 */
97 std::vector<DerivativeForm<1, spacedim, dim>> inverse_jacobians;
98
99 /**
100 * Array of the derivatives of the Jacobian matrices at the quadrature
101 * points, pushed forward to the real cell coordinates.
102 */
103 std::vector<Tensor<3, spacedim>> jacobian_pushed_forward_grads;
104
105 /**
106 * Array of the second derivatives of the Jacobian matrices at the
107 * quadrature points.
108 */
109 std::vector<DerivativeForm<3, dim, spacedim>> jacobian_2nd_derivatives;
110
111 /**
112 * Array of the second derivatives of the Jacobian matrices at the
113 * quadrature points, pushed forward to the real cell coordinates.
114 */
115 std::vector<Tensor<4, spacedim>> jacobian_pushed_forward_2nd_derivatives;
116
117 /**
118 * Array of the third derivatives of the Jacobian matrices at the
119 * quadrature points.
120 */
121 std::vector<DerivativeForm<4, dim, spacedim>> jacobian_3rd_derivatives;
122
123 /**
124 * Array of the third derivatives of the Jacobian matrices at the
125 * quadrature points, pushed forward to the real cell coordinates.
126 */
127 std::vector<Tensor<5, spacedim>> jacobian_pushed_forward_3rd_derivatives;
128
129 /**
130 * Array of quadrature points. This array is set up upon calling
131 * reinit() and contains the quadrature points on the real element,
132 * rather than on the reference element.
133 */
134 std::vector<Point<spacedim>> quadrature_points;
135
136 /**
137 * List of outward normal vectors at the quadrature points.
138 */
139 std::vector<Tensor<1, spacedim>> normal_vectors;
140
141 /**
142 * List of boundary forms at the quadrature points.
143 */
144 std::vector<Tensor<1, spacedim>> boundary_forms;
145 };
146 } // namespace FEValuesImplementation
147 } // namespace internal
148
149
150 /** @} */
151
152
153
154 DEAL_II_NAMESPACE_CLOSE
155
156 #endif