Flow123d  JS_before_hm-1804-gf2ad740aa
Enumerations | Functions
update_flags.hh File Reference

Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  UpdateFlags {
  update_default = 0, update_values = 0x0001, update_gradients = 0x0002, update_quadrature_points = 0x0004,
  update_JxW_values = 0x0008, update_normal_vectors = 0x0010, update_jacobians = 0x0020, update_inverse_jacobians = 0x0040,
  update_volume_elements = 0x0080, update_side_JxW_values = 0x0100
}
 Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell. More...
 

Functions

template<class STREAM >
STREAM & operator<< (STREAM &s, UpdateFlags u)
 
UpdateFlags operator| (UpdateFlags f1, UpdateFlags f2)
 
UpdateFlagsoperator|= (UpdateFlags &f1, UpdateFlags f2)
 
UpdateFlags operator& (UpdateFlags f1, UpdateFlags f2)
 
UpdateFlagsoperator&= (UpdateFlags &f1, UpdateFlags f2)
 

Detailed Description

Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell.

 * Copyright (C) 2015 Technical University of Liberec. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. (http://www.gnu.org/licenses/gpl-3.0.en.html)

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Author
Jan Stebel

Definition in file update_flags.hh.

Enumeration Type Documentation

◆ UpdateFlags

Enum type UpdateFlags indicates which quantities are to be recomputed on each finite element cell.

Selecting these flags in a restrictive way is crucial for the efficiency of FEValues::reinit() and FESideValues::reinit(). Therefore, only the flags actually needed should be selected. It is the responsibility of the involved Mapping and FiniteElement to add additional flags according to their own requirements.

By default, all flags are off, i.e. no reinitialization will be done.

You can select more than one flag by concatenation using the bitwise or operator|(UpdateFlags,UpdateFlags).

Generating the actual flags

When given a set of UpdateFlags flags, the FEValues object must determine, which values will have to be computed once only for the reference cell and which values will have to be updated for each cell. Here, it is important to note that in many cases, the FiniteElement will require additional updates from the Mapping. To this end, the following auxiliary functions have been implemented:

FiniteElement::update_each() determine the values required by the FiniteElement on each cell. The same function exists in Mapping.

FEValuesBase::update_each() is used to compute the union of all values to be computed ever. It does this by first adding to the flags set by the user all flags added by the FiniteElement. This new set of flags is then given to the Mapping and all flags required there are added.

This union of all flags is given to Mapping::fill_fe_values() and FiniteElement::fill_fe_values(), where the quantities indicated by the flags are computed.

The flags finally stored in FEValues then are the union of all the flags required by the user, by FiniteElement and by Mapping, for computation once or on each cell.

Enumerator
update_default 

No update.

update_values 

Shape function values.

Compute the values of the shape functions at the quadrature points on the real space cell. For the usual Lagrange elements, these values are equal to the values of the shape functions at the quadrature points on the unit cell, but they are different for more complicated elements, such as Raviart-Thomas elements.

update_gradients 

Shape function gradients.

Compute the gradients of the shape functions in coordinates of the real cell.

update_quadrature_points 

Transformed quadrature points.

Compute the quadrature points transformed into real cell coordinates.

update_JxW_values 

Transformed quadrature weights.

Compute the quadrature weights on the real cell, i.e. the weights of the quadrature rule multiplied with the determinant of the Jacobian of the transformation from reference to real cell.

update_normal_vectors 

Normal vectors.

Compute the normal vectors, either for a face or for a cell of codimension one. Setting this flag for any other object will raise an error.

update_jacobians 

Volume element.

Compute the Jacobian of the transformation from the reference cell to the real cell.

update_inverse_jacobians 

Volume element.

Compute the inverse Jacobian of the transformation from the reference cell to the real cell.

update_volume_elements 

Determinant of the Jacobian.

Compute the volume element in each quadrature point.

update_side_JxW_values 

Transformed quadrature weight for cell sides.

Same as update_JxW_values but for quadratures living on a side of the cell.

Definition at line 67 of file update_flags.hh.

Function Documentation

◆ operator&()

UpdateFlags operator& ( UpdateFlags  f1,
UpdateFlags  f2 
)
inline

Global operator which returns an object in which all bits are set which are set in the first as well as the second argument. This operator exists since if it did not then the result of the bit-and operator & would be an integer which would in turn trigger a compiler warning when we tried to assign it to an object of type UpdateFlags.

UpdateFlags

Definition at line 227 of file update_flags.hh.

◆ operator&=()

UpdateFlags& operator&= ( UpdateFlags f1,
UpdateFlags  f2 
)
inline

Global operator which clears all the bits in the first argument if they are not also set in the second argument.

UpdateFlags

Definition at line 243 of file update_flags.hh.

◆ operator<<()

template<class STREAM >
STREAM& operator<< ( STREAM &  s,
UpdateFlags  u 
)
inline

Output operator which outputs update flags as a set of or'd text values.

UpdateFlags

Definition at line 164 of file update_flags.hh.

◆ operator|()

UpdateFlags operator| ( UpdateFlags  f1,
UpdateFlags  f2 
)
inline

Global operator which returns an object in which all bits are set which are either set in the first or the second argument. This operator exists since if it did not then the result of the bit-or operator | would be an integer which would in turn trigger a compiler warning when we tried to assign it to an object of type UpdateFlags.

UpdateFlags

Definition at line 190 of file update_flags.hh.

◆ operator|=()

UpdateFlags& operator|= ( UpdateFlags f1,
UpdateFlags  f2 
)
inline

Global operator which sets the bits from the second argument also in the first one.

UpdateFlags

Definition at line 208 of file update_flags.hh.