Finite element access/FEValues classes
[Finite elements]

Collaboration diagram for Finite element access/FEValues classes:

Classes

struct  FEValuesExtractors::Scalar
struct  FEValuesExtractors::Vector
class  FEValuesViews::Scalar< dim, spacedim >
class  FEValuesViews::Vector< dim, spacedim >
class  FEValuesData< dim, spacedim >
class  FEValuesBase< dim, spacedim >
class  FEValues< dim, spacedim >
class  FEFaceValuesBase< dim, spacedim >
class  FEFaceValues< dim, spacedim >
class  FESubfaceValues< dim, spacedim >

Namespaces

namespace  CellSimilarity
namespace  FEValuesExtractors
namespace  FEValuesViews

Modules

 Handling vector valued problems

Enumerations

enum  UpdateFlags {
  update_default = 0, update_values = 0x0001, update_gradients = 0x0002, update_hessians = 0x0004,
  update_boundary_forms = 0x0008, update_quadrature_points = 0x0010, update_JxW_values = 0x0020, update_face_normal_vectors = 0x0040,
  update_cell_normal_vectors = 0x20000, update_jacobians = 0x0080, update_jacobian_grads = 0x0100, update_inverse_jacobians = 0x0200,
  update_covariant_transformation = 0x0400, update_contravariant_transformation = 0x0800, update_transformation_values = 0x1000, update_transformation_gradients = 0x2000,
  update_volume_elements = 0x4000, update_support_points = 0x10000, update_support_jacobians = 0x20000, update_support_inverse_jacobians = 0x40000,
  update_q_points = update_quadrature_points, update_second_derivatives = update_hessians, update_normal_vectors = update_face_normal_vectors, update_piola = update_volume_elements | update_contravariant_transformation
}

Functions

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

Detailed Description

The classes in this module are used when one wants to assemble matrices or vectors. They link finite elements, quadrature objects, and mappins: the finite element classes describe a finite element space on a unit cell (i.e. the unit line segment, square, or cube [0,1]^d), the quadrature classes describe where quadrature points are located and what weight they have, and the mapping classes describe how to map a point from the unit cell to a real cell and back. Since integration happens at quadrature points on the real cell, and needs to know their location as well as the values and gradients of finite element shape functions at these points. The FEValues class coordinates getting this information. For integrations on faces (for example for integration on the boundary, or interfaces between cells), the FEFaceValues class offers similar functionality as the FEValues class does for cells. Finally, the FESubfaceValues class offers the possibility to ingrate on parts of faces if the neighboring cell is refined and the present cell shares only a part of its face with the neighboring cell. If vector-valued elements are used, the FEValues and related classes allow access to all vector components; if one wants to pick individual components, there are extractor classes that make this task simpler, as described in the Handling vector valued problems module.

The last member of this group, the UpdateFlags enumeration, is used as an optimization: instead of letting the FEValues class compute every possible piece of data relating to a given finite element on a cell, you have to specify up front which information you are actually interested in. The UpdateFlags enumeration is used to offer symbolic names denoting what you want the FEValues class to compute.

All these classes are used in all tutorial programs from step-3 onward, and are described there in significant detail.

The actual workings of the FEValues class and friends is complicated because it has to be general yet efficient. The page on The interplay of UpdateFlags, Mapping and FiniteElement in FEValues attempts to give an overview of how this works.


Enumeration Type Documentation

The enum type given to the constructors of FEValues, FEFaceValues and FESubfaceValues, telling those objects which data will be needed on each mesh cell.

Selecting these flags in a restrictive way is crucial for the efficiency of FEValues::reinit(), FEFaceValues::reinit() and FESubfaceValues::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. For instance, most finite elements will add update_covariant_transformation if update_gradients is selected.

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, several auxiliary functions have been implemented:

FiniteElement::update_once(flags) and FiniteElement::update_each(flags) determine the values required by the FiniteElement once or on each cell. The same functions exist in Mapping.

Since the FiniteElement does not know if a value required from Mapping should be computed once or for each cell, FEValuesBase::compute_update_flags() 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 (once and each) added by the FiniteElement. This new set of flags is then given to the Mapping and all flags required there are added, again once and each.

This union of all flags is given to Mapping::fill_fe_values() and FiniteElement::fill_fe_values, where it is split again into the information generated only once and the information that must be updated on each cell.

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. Subsequent calls to the functions update_once and update_each should just select among these flags, but should not add new flags.

The mechanism by which all this is accomplished is also discussed on the page on The interplay of UpdateFlags, Mapping and FiniteElement in FEValues.

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 FE_RaviartThomas elements.

update_gradients  Shape function gradients.

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

update_hessians  Second derivatives of shape functions.

Compute the second derivatives of the shape functions in coordinates of the real cell.

update_boundary_forms  Outter normal vector, not normalized.

Vector product of tangential vectors, yielding a normal vector with a length corresponding to the surface element; may be more efficient than computing both.

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 Jacoian of the transformation from reference to realcell.

update_face_normal_vectors  Normal vectors to the faces.

Compute the unit outer normal vector on the face of a cell.

update_cell_normal_vectors  Normal vectors to the cells.

Compute the unit outer normal vector on the cell itself. Only possible if dim=spacedim-1

update_jacobians  Volume element.

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

update_jacobian_grads  Gradient of volume element.

Compute the dervatives of the Jacobian of the transformation.

update_inverse_jacobians  Volume element.

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

update_covariant_transformation  Covariant transformation.

Compute all values the Mapping needs to perform a contravariant transformation of vectors. For special mappings like MappingCartesian this may be simpler than update_inverse_jacobians.

update_contravariant_transformation  Contravariant transformation.

Compute all values the Mapping needs to perform a contravariant transformation of vectors. For special mappings like MappingCartesian this may be simpler than update_jacobians.

update_transformation_values  Shape function values of transformation.

Compute the shape function values of the transformation defined by the Mapping.

update_transformation_gradients  Shape function gradients of transformation.

Compute the shape function gradients of the transformation defined by the Mapping.

update_volume_elements  Determinant of the Jacobian.

Compute the volume element in each quadrature point.

update_support_points  Update the location of the mapped generalized support points of the element.
update_support_jacobians  Update the Jacobian of the mapping in generalized support points.
update_support_inverse_jacobians  Update the inverse Jacobian of the mapping in generalized support points.
update_q_points 
Deprecated:
Update quadrature points
update_second_derivatives 
Deprecated:
Update second derivatives.
update_normal_vectors  Normal vectors.

Deprecated:
Update normal vectors. Use update_face_normal_vectors
update_piola  Values needed for Piola transform.

Combination of the flags needed for Piola transform of Hdiv elements.


Function Documentation

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& operator|= ( UpdateFlags f1,
UpdateFlags  f2 
) [inline]

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

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& 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.


deal.II documentation generated on Sat Aug 15 16:51:36 2009 by doxygen 1.5.9