Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
Namespaces | Classes
Functions

Namespaces

 Functions
 

Classes

class  AutoDerivativeFunction< dim >
 
class  Functions::FlowFunction< dim >
 
class  Functions::PoisseuilleFlow< dim >
 
class  Functions::StokesCosine< dim >
 
class  Functions::StokesLSingularity
 
class  Functions::Kovasznay
 
class  Function< dim, RangeNumberType >
 
class  Functions::ConstantFunction< dim, RangeNumberType >
 
class  Functions::ZeroFunction< dim, RangeNumberType >
 
class  ComponentSelectFunction< dim, RangeNumberType >
 
class  ScalarFunctionFromFunctionObject< dim, RangeNumberType >
 
class  VectorFunctionFromScalarFunctionObject< dim, RangeNumberType >
 
class  VectorFunctionFromTensorFunction< dim, RangeNumberType >
 
class  Functions::Bessel1< dim >
 
class  Functions::CSpline< dim >
 
class  FunctionDerivative< dim >
 
class  Functions::SquareFunction< dim >
 
class  Functions::Q1WedgeFunction< dim >
 
class  Functions::PillowFunction< dim >
 
class  Functions::CosineFunction< dim >
 
class  Functions::CosineGradFunction< dim >
 
class  Functions::ExpFunction< dim >
 
class  Functions::LSingularityFunction
 
class  Functions::LSingularityGradFunction
 
class  Functions::SlitSingularityFunction< dim >
 
class  Functions::SlitHyperSingularityFunction
 
class  Functions::JumpFunction< dim >
 
class  Functions::FourierCosineFunction< dim >
 
class  Functions::FourierSineFunction< dim >
 
class  Functions::FourierSineSum< dim >
 
class  Functions::FourierCosineSum< dim >
 
class  Functions::CutOffFunctionBase< dim >
 
class  Functions::CutOffFunctionTensorProduct< dim >
 
class  Functions::CutOffFunctionLinfty< dim >
 
class  Functions::CutOffFunctionW1< dim >
 
class  Functions::CutOffFunctionC1< dim >
 
class  Functions::CutOffFunctionCinfty< dim >
 
class  Functions::Monomial< dim >
 
class  Functions::InterpolatedTensorProductGridData< dim >
 
class  Functions::InterpolatedUniformGridData< dim >
 
class  Functions::Polynomial< dim >
 
class  FunctionParser< dim >
 
class  Functions::Spherical< dim >
 
class  FunctionTime< Number >
 
class  Functions::IncrementalFunction< dim, RangeNumberType >
 
class  Functions::ParsedFunction< dim >
 
class  TensorFunction< rank, dim, Number >
 
class  ConstantTensorFunction< rank, dim, Number >
 
class  ZeroTensorFunction< rank, dim, Number >
 
struct  FunctionMap< dim, Number >
 
class  Functions::FEFieldFunction< dim, DoFHandlerType, VectorType >
 

Detailed Description

Functions are used in various places in deal.II, for example to describe boundary conditions, coefficients in equations, forcing terms, or exact solutions. Since closed form expressions for equations are often hard to pass along as function arguments, deal.II uses the Function base class to describe these objects. Essentially, the interface of this base class requires derived classes to implement the ability to return the value of a function at one or a list of particular locations, and possibly (if needed) of gradients or second derivatives of the function. With this, function objects can then be used by algorithms like VectorTools::interpolate, VectorTools::project_boundary_values, and other functions.

Some functions are needed again and again, and are therefore already provided in deal.II. This includes a function with a constant value; a function that is zero everywhere, or a vector-valued function for which only one vector component has a particular value and all other components are zero. Some more specialized functions are also defined in the Functions namespace.

Time dependent functions

For time dependent computations, boundary conditions and/or right hand side functions may also change with time. Since at a given time step one is usually only interested in the spatial dependence of a function, it would be awkward if one had to pass a value for the time variable to all methods that use function objects. For example, the VectorTools::interpolate_boundary_values function would have to take a time argument which it can use when it wants to query the value of the boundary function at a given time step. However, it would also have to do so if we are considering a stationary problem, for which there is nothing like a time variable.

To circumvent this problem, function objects are always considered spatial functions only. However, the Function class is derived from the FunctionTime base class that stores a value for a time variable, if so necessary. This way, one can define a function object that acts as a spatial function but can do so internally by referencing a particular time. In above example, one would set the time of the function object to the present time step before handing it off to the VectorTools::interpolate_boundary_values method.

Tensor-valued functions

The Function class is the most frequently used, but sometimes one needs a function the values of which are tensors, rather than scalars. The TensorFunction template can do this for you. Apart from the return type, the interface is most the same as that of the Function class.