deal.II version GIT relicensing-6809-ge913b9bb34 2026-09-25 17: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_update_flags.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) 1998 - 2024 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#ifndef dealii_fe_update_flags_h
14#define dealii_fe_update_flags_h
15
16
17#include <deal.II/base/config.h>
18
19#include <deal.II/base/table.h>
20#include <deal.II/base/tensor.h>
21
22#include <vector>
23
24
26
27// Forward declaration
28#ifndef DOXYGEN
29template <int, int>
30class FiniteElement;
31#endif
32
62{
66
73 update_values = 0x0001,
75
81
87
93
100
127
134
141
147
152
158
165
172
178
184
214 update_rescale = 0x2000000,
216
224 // Direct data
232 // Transformation dependence
235 // Volume data
237 // Hermite needs several DOFs to be rescaled each time
240
241
247template <typename StreamType>
248inline StreamType &
249operator<<(StreamType &s, const UpdateFlags u)
250{
251 s << " UpdateFlags|";
252 if (u & update_values)
253 s << "values|";
254 if (u & update_gradients)
255 s << "gradients|";
256 if (u & update_hessians)
257 s << "hessians|";
259 s << "3rd_derivatives|";
261 s << "quadrature_points|";
262 if (u & update_JxW_values)
263 s << "JxW_values|";
264 if (u & update_normal_vectors)
265 s << "normal_vectors|";
266 if (u & update_jacobians)
267 s << "jacobians|";
269 s << "inverse_jacobians|";
270 if (u & update_jacobian_grads)
271 s << "jacobian_grads|";
273 s << "covariant_transformation|";
275 s << "contravariant_transformation|";
277 s << "transformation_values|";
279 s << "transformation_gradients|";
281 s << "jacobian_pushed_forward_grads|";
283 s << "jacobian_2nd_derivatives|";
285 s << "jacobian_pushed_forward_2nd_derivatives|";
287 s << "jacobian_3rd_derivatives|";
289 s << "jacobian_pushed_forward_3rd_derivatives|";
290
291 // TODO: check that 'u' really only has the flags set that are handled above
292 return s;
293}
294
295
305inline UpdateFlags
307{
308 return static_cast<UpdateFlags>(static_cast<unsigned int>(f1) |
309 static_cast<unsigned int>(f2));
310}
311
312
313
320inline UpdateFlags &
322{
323 f1 = f1 | f2;
324 return f1;
325}
326
327
337inline UpdateFlags
339{
340 return static_cast<UpdateFlags>(static_cast<unsigned int>(f1) &
341 static_cast<unsigned int>(f2));
342}
343
344
351inline UpdateFlags &
353{
354 f1 = f1 & f2;
355 return f1;
356}
357
358
359
393
394
395namespace internal
396{
397 namespace FEValuesImplementation
398 {
407 template <int dim, int spacedim = dim>
521 } // namespace FEValuesImplementation
522} // namespace internal
523
524
530
531#endif
void initialize(const unsigned int n_quadrature_points, const FiniteElement< dim, spacedim > &fe, const UpdateFlags flags)
Definition fe_values.cc:49
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
UpdateFlags & operator&=(UpdateFlags &f1, const UpdateFlags f2)
StreamType & operator<<(StreamType &s, const UpdateFlags u)
UpdateFlags & operator|=(UpdateFlags &f1, const UpdateFlags f2)
UpdateFlags operator|(const UpdateFlags f1, const UpdateFlags f2)
UpdateFlags operator&(const UpdateFlags f1, const UpdateFlags f2)
UpdateFlags
@ update_jacobian_pushed_forward_2nd_derivatives
@ update_volume_elements
Determinant of the Jacobian.
@ update_contravariant_transformation
Contravariant transformation.
@ update_jacobian_pushed_forward_grads
@ update_rescale
@ update_hessians
Second derivatives of shape functions.
@ update_jacobian_3rd_derivatives
@ update_values
Shape function values.
@ update_jacobian_grads
Gradient of volume element.
@ update_normal_vectors
Normal vectors.
@ update_3rd_derivatives
Third derivatives of shape functions.
@ update_JxW_values
Transformed quadrature weights.
@ update_covariant_transformation
Covariant transformation.
@ update_transformation_gradients
Shape function gradients of transformation.
@ update_jacobians
Volume element.
@ update_mapping
@ update_inverse_jacobians
Volume element.
@ update_gradients
Shape function gradients.
@ update_quadrature_points
Transformed quadrature points.
@ update_default
No update.
@ update_jacobian_pushed_forward_3rd_derivatives
@ update_transformation_values
Shape function values of transformation.
@ update_piola
Values needed for Piola transform.
@ update_boundary_forms
Outer normal vector, not normalized.
@ update_jacobian_2nd_derivatives