Reference documentation for deal.II version 9.3.3
\(\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\}}\)
fe_update_flags.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 1998 - 2020 by the deal.II authors
4//
5// This file is part of the deal.II library.
6//
7// The deal.II library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.md at
12// the top level directory of deal.II.
13//
14// ---------------------------------------------------------------------
15
16#ifndef dealii_fe_update_flags_h
17#define dealii_fe_update_flags_h
18
19
20#include <deal.II/base/config.h>
21
23#include <deal.II/base/point.h>
24#include <deal.II/base/table.h>
25#include <deal.II/base/tensor.h>
26
27#include <vector>
28
29
31
32// Forward declaration
33#ifndef DOXYGEN
34template <int, int>
35class FiniteElement;
36#endif
37
40
67{
71
78 update_values = 0x0001,
80
86
92
98
105
124
131
138
144
149
155
162
169
175
181
209
217 // Direct data
225 // Transformation dependence
228 // Volume data
231
232
238template <class StreamType>
239inline StreamType &
240operator<<(StreamType &s, const UpdateFlags u)
241{
242 s << " UpdateFlags|";
243 if (u & update_values)
244 s << "values|";
245 if (u & update_gradients)
246 s << "gradients|";
247 if (u & update_hessians)
248 s << "hessians|";
250 s << "3rd_derivatives|";
252 s << "quadrature_points|";
253 if (u & update_JxW_values)
254 s << "JxW_values|";
255 if (u & update_normal_vectors)
256 s << "normal_vectors|";
257 if (u & update_jacobians)
258 s << "jacobians|";
260 s << "inverse_jacobians|";
261 if (u & update_jacobian_grads)
262 s << "jacobian_grads|";
264 s << "covariant_transformation|";
266 s << "contravariant_transformation|";
268 s << "transformation_values|";
270 s << "transformation_gradients|";
272 s << "jacobian_pushed_forward_grads|";
274 s << "jacobian_2nd_derivatives|";
276 s << "jacobian_pushed_forward_2nd_derivatives|";
278 s << "jacobian_3rd_derivatives|";
280 s << "jacobian_pushed_forward_3rd_derivatives|";
281
282 // TODO: check that 'u' really only has the flags set that are handled above
283 return s;
284}
285
286
296inline UpdateFlags
298{
299 return static_cast<UpdateFlags>(static_cast<unsigned int>(f1) |
300 static_cast<unsigned int>(f2));
301}
302
303
304
311inline UpdateFlags &
313{
314 f1 = f1 | f2;
315 return f1;
316}
317
318
329{
330 return static_cast<UpdateFlags>(static_cast<unsigned int>(f1) &
331 static_cast<unsigned int>(f2));
332}
333
334
341inline UpdateFlags &
343{
344 f1 = f1 & f2;
345 return f1;
346}
347
348
349
361{
363 {
381 };
382}
383
384
385namespace internal
386{
387 namespace FEValuesImplementation
388 {
401 template <int dim, int spacedim = dim>
403 {
404 public:
408 void
409 initialize(const unsigned int n_quadrature_points,
410 const UpdateFlags flags);
411
416 std::size_t
417 memory_consumption() const;
418
432 std::vector<double> JxW_values;
433
437 std::vector<DerivativeForm<1, dim, spacedim>> jacobians;
438
443 std::vector<DerivativeForm<2, dim, spacedim>> jacobian_grads;
444
448 std::vector<DerivativeForm<1, spacedim, dim>> inverse_jacobians;
449
454 std::vector<Tensor<3, spacedim>> jacobian_pushed_forward_grads;
455
460 std::vector<DerivativeForm<3, dim, spacedim>> jacobian_2nd_derivatives;
461
466 std::vector<Tensor<4, spacedim>> jacobian_pushed_forward_2nd_derivatives;
467
472 std::vector<DerivativeForm<4, dim, spacedim>> jacobian_3rd_derivatives;
473
478 std::vector<Tensor<5, spacedim>> jacobian_pushed_forward_3rd_derivatives;
479
485 std::vector<Point<spacedim>> quadrature_points;
486
490 std::vector<Tensor<1, spacedim>> normal_vectors;
491
495 std::vector<Tensor<1, spacedim>> boundary_forms;
496 };
497
498
507 template <int dim, int spacedim = dim>
509 {
510 public:
514 void
515 initialize(const unsigned int n_quadrature_points,
517 const UpdateFlags flags);
518
523 std::size_t
524 memory_consumption() const;
525
545
551
556
561
568
575
582
589
619 std::vector<unsigned int> shape_function_to_row_table;
620 };
621 } // namespace FEValuesImplementation
622} // namespace internal
623
624
630
631#endif
OutputOperator< VectorType > & operator<<(OutputOperator< VectorType > &out, unsigned int step)
Definition: operator.h:165
void initialize(const unsigned int n_quadrature_points, const FiniteElement< dim, spacedim > &fe, const UpdateFlags flags)
Definition: fe_values.cc:2955
std::vector< DerivativeForm< 1, spacedim, dim > > inverse_jacobians
void initialize(const unsigned int n_quadrature_points, const UpdateFlags flags)
Definition: fe_values.cc:2871
std::vector< Tensor< 1, spacedim > > normal_vectors
std::vector< Tensor< 5, spacedim > > jacobian_pushed_forward_3rd_derivatives
std::vector< DerivativeForm< 4, dim, spacedim > > jacobian_3rd_derivatives
std::vector< DerivativeForm< 3, dim, spacedim > > jacobian_2nd_derivatives
std::vector< Point< spacedim > > quadrature_points
std::vector< Tensor< 4, spacedim > > jacobian_pushed_forward_2nd_derivatives
std::vector< Tensor< 3, spacedim > > jacobian_pushed_forward_grads
std::vector< DerivativeForm< 2, dim, spacedim > > jacobian_grads
std::vector< Tensor< 1, spacedim > > boundary_forms
std::vector< DerivativeForm< 1, dim, spacedim > > jacobians
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:402
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:403
UpdateFlags & operator&=(UpdateFlags &f1, const UpdateFlags f2)
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_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