Reference documentation for deal.II version 8.5.0
Namespaces | Classes | Enumerations




class  AutoDerivativeFunction< dim >
class  Functions::FlowFunction< dim >
class  Functions::PoisseuilleFlow< dim >
class  Functions::StokesCosine< dim >
class  Functions::StokesLSingularity
class  Functions::Kovasznay
class  Function< dim, Number >
class  ZeroFunction< dim, Number >
class  ConstantFunction< dim, Number >
class  ComponentSelectFunction< dim, Number >
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::CutOffFunctionLinfty< dim >
class  Functions::CutOffFunctionW1< 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  FunctionTime< Number >
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 >


enum  AutoDerivativeFunction< dim >::DifferenceFormula { AutoDerivativeFunction< dim >::Euler, AutoDerivativeFunction< dim >::UpwindEuler, AutoDerivativeFunction< dim >::FourthOrder }

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.

Enumeration Type Documentation

Names of difference formulas.


The symmetric Euler formula of second order:

\[ u'(t) \approx \frac{u(t+h) - u(t-h)}{2h}. \]


The upwind Euler formula of first order:

\[ u'(t) \approx \frac{u(t) - u(t-h)}{h}. \]


The fourth order scheme

\[ u'(t) \approx \frac{u(t-2h) - 8u(t-h) + 8u(t+h) - u(t+2h)}{12h}. \]

Definition at line 83 of file auto_derivative_function.h.