Dune-Fufem 2.11-git
Loading...
Searching...
No Matches
Form language (elementary operators)

Description

Elementary operators (test functions, trial functions, coefficients, ...)

Collaboration diagram for Form language (elementary operators):

Classes

class  Dune::Fufem::Forms::Coefficient< F >
 Coefficient function. More...
 
class  Dune::Fufem::Forms::NonAffineFamily
 Tag type to classify non-affine finite element families. More...
 

Functions

template<class Basis >
auto Dune::Fufem::Forms::testFunction (const Basis &basis)
 Create unary identity operator on test function space.
 
template<class Basis >
auto Dune::Fufem::Forms::testFunction (const Basis &basis, NonAffineFamily tag)
 Create unary identity operator on test function space.
 
template<class Basis , class... Args, std::enable_if_t<(sizeof...(Args)>0), int > = 0>
auto Dune::Fufem::Forms::testFunction (const Basis &basis, Args &&... args)
 Create unary identity operator on test function space.
 
template<class Basis >
auto Dune::Fufem::Forms::trialFunction (const Basis &basis)
 Create unary identity operator on trial function space.
 
template<class Basis >
auto Dune::Fufem::Forms::trialFunction (const Basis &basis, NonAffineFamily tag)
 Create unary identity operator on trial function space.
 
template<class Basis , class... Args, std::enable_if_t<(sizeof...(Args)>0), int > = 0>
auto Dune::Fufem::Forms::trialFunction (const Basis &basis, Args &&... args)
 Create unary identity operator on trial function space.
 
template<class Op , std::enable_if_t< isOperatorOrSumOperator_v< Op > and(Op::arity<=1), int > = 0>
auto Dune::Fufem::Forms::outside (const Op &op)
 Construct outside version of a given operator.
 
template<class Op , std::enable_if_t< isOperatorOrSumOperator_v< Op > and(Op::arity<=1), int > = 0>
auto Dune::Fufem::Forms::avg (const Op &op)
 Construct intersection average of a given operator.
 
template<class Op , std::enable_if_t< isOperatorOrSumOperator_v< Op > and(Op::arity<=1), int > = 0>
auto Dune::Fufem::Forms::jump (const Op &op)
 Construct intersection jump of a given operator.
 
template<class GridView >
auto Dune::Fufem::Forms::meshSize (const GridView &gridView)
 Construct mesh size operator.
 
template<class GridView >
auto Dune::Fufem::Forms::meshSize ()
 Construct mesh size operator.
 
template<class GridView >
auto Dune::Fufem::Forms::faceNormal (const GridView &gridView)
 Construct operator representing the face normals.
 
template<class GridView >
auto Dune::Fufem::Forms::faceNormal ()
 Construct operator representing the face normals.
 
template<class Op , class V , std::enable_if_t< isOperatorOrSumOperator_v< Op >, int > = 0>
auto Dune::Fufem::Forms::bindToCoefficients (const Op &op, V &&vector)
 Bind a linear operator to a coefficient vector.
 
template<class Op , class V , std::enable_if_t< isOperatorOrSumOperator_v< Op >, int > = 0, std::enable_if_t< not isOperatorOrSumOperator_v< std::decay_t< V > >, int > = 0>
auto Dune::Fufem::Forms::operator| (const Op &op, V &&v)
 Bind a linear operator to a coefficient vector.
 

Function Documentation

◆ avg()

template<class Op , std::enable_if_t< isOperatorOrSumOperator_v< Op > and(Op::arity<=1), int > = 0>
auto Dune::Fufem::Forms::avg ( const Op &  op)

Construct intersection average of a given operator.

The returned operator evaluates to the arithmetic mean value of the inside and outside value version of the given operator. This is equivalent to 0.5*(op+outside(op)).

Notice that this operation is only supported for unary and nullary operators.

Parameters
opThe operator to average

◆ bindToCoefficients()

template<class Op , class V , std::enable_if_t< isOperatorOrSumOperator_v< Op >, int > = 0>
auto Dune::Fufem::Forms::bindToCoefficients ( const Op &  op,
V &&  vector 
)

Bind a linear operator to a coefficient vector.

Parameters
opThe operator to bind (should be a 1-linear MultilinearOperator or SumOperator)
vectorA suitable coefficient vector

Given a 1-linear operator on discrete function space associated to a basis, this returns the 0-linear operator obtained by application of the operator to the element of the function space represented by the coefficient vector. While a 1-linear operator is an abstract object with one free argument, the latter is bound using this method resulting in a function.

The return value implements both, the Dune::Fufem::Forms interface of a 0-linear operator and the Dune::Functions interface of a GridFunction. Thus it can be used as coefficient in composed Dune::Fufem::Form expressions or in places requiring a GridFunction, e.g., for writing to vtk-files.

◆ faceNormal() [1/2]

template<class GridView >
auto Dune::Fufem::Forms::faceNormal ( )

Construct operator representing the face normals.

This 0-linear operator represents the unit outer normal field on intersections and can thus only be used in forms integrated over the boundary or the skeleton.

Template Parameters
GridViewGridView type the operator is defined on

◆ faceNormal() [2/2]

template<class GridView >
auto Dune::Fufem::Forms::faceNormal ( const GridView gridView)

Construct operator representing the face normals.

This 0-linear operator represents the unit outer normal field on intersections and can thus only be used in forms integrated over the boundary or the skeleton.

Template Parameters
GridViewGridView type the operator is defined on
Parameters
gridViewGridView the operator is defined on

◆ jump()

template<class Op , std::enable_if_t< isOperatorOrSumOperator_v< Op > and(Op::arity<=1), int > = 0>
auto Dune::Fufem::Forms::jump ( const Op &  op)

Construct intersection jump of a given operator.

The returned operator evaluates to the jump of the inside and outside value version of the given operator. This is equivalent to op-outside(op). The intersection norm is canonically oriented from inside to outside such that jump(op)*normal corresponds to the normal op*normal + outside(op*outside).

Notice that this operation is only supported for unary and nullary operators.

Parameters
opThe operator whose jump should be computed

◆ meshSize() [1/2]

template<class GridView >
auto Dune::Fufem::Forms::meshSize ( )

Construct mesh size operator.

This 0-linear operator associates to each element or intersection its average meshsize. The average is computed as the d-th root of the integration element at corresponding reference elements barycenter.

Template Parameters
GridViewGridView type the operator is defined on

◆ meshSize() [2/2]

template<class GridView >
auto Dune::Fufem::Forms::meshSize ( const GridView gridView)

Construct mesh size operator.

This 0-linear operator associates to each element or intersection its average meshsize. The average is computed as the d-th root of the integration element at corresponding reference elements barycenter.

Template Parameters
GridViewGridView type the operator is defined on
Parameters
gridViewGridView the operator is defined on

◆ operator|()

template<class Op , class V , std::enable_if_t< isOperatorOrSumOperator_v< Op >, int > = 0, std::enable_if_t< not isOperatorOrSumOperator_v< std::decay_t< V > >, int > = 0>
auto Dune::Fufem::Forms::operator| ( const Op &  op,
V &&  v 
)

Bind a linear operator to a coefficient vector.

Parameters
opThe operator to bind (should be a 1-linear MultilinearOperator or SumOperator)
vA suitable coefficient vector

This is a short-cut to bindToCoefficients(op, v). The operator can be interpreted as a mathematical restriction: The operator op maps from a discrete functions space represented by coefficient vectors to an L^1 function space. Hence the restriction to a fixed coefficient vector is the corresponding discrete function.

◆ outside()

template<class Op , std::enable_if_t< isOperatorOrSumOperator_v< Op > and(Op::arity<=1), int > = 0>
auto Dune::Fufem::Forms::outside ( const Op &  op)

Construct outside version of a given operator.

For integrands of interiour intersection, operators are by default associated to one side of the intersection. This corresponds to the fact that assemblers traverse the elements and for each element visits its intersections. The element is then referred to as inside and an operator does canonically act on the inside.

The operator returned by outside(op) changes the side and returns an operator defined on the opposite element also denoted as outside in the dune grid interface.

In many cases the terms to assemble on interior intersections are jump or averange terms. For such cases there are also the short cuts jump and avg.

Notice that this operation is only supported for unary and nullary operators.

Parameters
opThe operator to be applied on the outside

◆ testFunction() [1/3]

template<class Basis >
auto Dune::Fufem::Forms::testFunction ( const Basis &  basis)

Create unary identity operator on test function space.

This creates an operator representing the identity on a discrete function space. The arguments of this operator are interpreted as test functions.

Basis function evaluations will be cached across elements with same geometry type.

Parameters
basisGlobal basis of the test function space

◆ testFunction() [2/3]

template<class Basis , class... Args, std::enable_if_t<(sizeof...(Args)>0), int > = 0>
auto Dune::Fufem::Forms::testFunction ( const Basis &  basis,
Args &&...  args 
)

Create unary identity operator on test function space.

This creates an operator representing the identity on a discrete function space. The arguments of this operator are interpreted as test functions.

The additional arguments are interpreted as tree path to identity a subspace. If the last argument is a NonAffineFamily tag, caching of basis functions across elements with same geometry type is disabled.

Parameters
basisGlobal basis of the test function space
argsTree path arguments for subspace basis, optionally followed by NonAffineFamily

◆ testFunction() [3/3]

template<class Basis >
auto Dune::Fufem::Forms::testFunction ( const Basis &  basis,
NonAffineFamily  tag 
)

Create unary identity operator on test function space.

This creates an operator representing the identity on a discrete function space. The arguments of this operator are interpreted as test functions.

By passing an additional NonAffineFamily tag, caching of basis functions across elements with same geometry type is disabled.

Parameters
basisGlobal basis of the test function space
tagTag argument to disable cross-element caching

◆ trialFunction() [1/3]

template<class Basis >
auto Dune::Fufem::Forms::trialFunction ( const Basis &  basis)

Create unary identity operator on trial function space.

This creates an operator representing the identity on a discrete function space. The arguments of this operator are interpreted as trial functions.

Basis function evaluations will be cached across elements with same geometry type.

Parameters
basisGlobal basis of the trial function space

◆ trialFunction() [2/3]

template<class Basis , class... Args, std::enable_if_t<(sizeof...(Args)>0), int > = 0>
auto Dune::Fufem::Forms::trialFunction ( const Basis &  basis,
Args &&...  args 
)

Create unary identity operator on trial function space.

This creates an operator representing the identity on a discrete function space. The arguments of this operator are interpreted as trial functions.

The additional arguments are interpreted as tree path to identity a subspace. If the last argument is a NonAffineFamily tag, caching of basis functions across elements with same geometry type is disabled.

Parameters
basisGlobal basis of the trial function space
argsTree path arguments for subspace basis, optionally followed by NonAffineFamily

◆ trialFunction() [3/3]

template<class Basis >
auto Dune::Fufem::Forms::trialFunction ( const Basis &  basis,
NonAffineFamily  tag 
)

Create unary identity operator on trial function space.

This creates an operator representing the identity on a discrete function space. The arguments of this operator are interpreted as trial functions.

By passing an additional NonAffineFamily tag, caching of basis functions across elements with same geometry type is disabled.

Parameters
basisGlobal basis of the trial function space
tagTag argument to disable cross-element caching