Dune-Fufem 2.11-git
Loading...
Searching...
No Matches
Form language (arithmetic operations)

Description

Products, sums, differences, ... of operators and assemblers.

Collaboration diagram for Form language (arithmetic operations):

Functions

template<class L , class R >
auto Dune::Fufem::Forms::operator+ (const L &l, const R &r)
 Create the sum of two operators.
 
template<class Op , std::enable_if_t< isOperatorOrSumOperator_v< Op >, int > = 0>
auto Dune::Fufem::Forms::operator- (const Op &op)
 Negate an operator.
 
template<class L , class R >
auto Dune::Fufem::Forms::operator- (const L &l, const R &r)
 Create the difference of two operators.
 
template<class Op , class L , class R , std::enable_if_t< isOperatorOrSumOperator_v< L > or isOperatorOrSumOperator_v< R >, int > = 0, class = std::void_t<decltype(Impl::productImpl(std::declval<Op>(), std::declval<L>(), std::declval<R>()))>>
auto Dune::Fufem::Forms::product (const Op &op, const L &l, const R &r)
 Generic exterior product of two multilinear operators.
 
template<class L , class R , std::enable_if_t< isOperatorOrSumOperator_v< L > or isOperatorOrSumOperator_v< R >, int > = 0, class = std::void_t<decltype(product(std::declval<LocalOperators::MultOp>(), std::declval<L>(), std::declval<R>()))>>
auto Dune::Fufem::Forms::operator* (const L &l, const R &r)
 Exterior product of two multilinear operators based on pointwise multiplication.
 
template<class L , class R , std::enable_if_t< isOperatorOrSumOperator_v< L > or isOperatorOrSumOperator_v< R >, int > = 0, class = std::void_t<decltype(product(std::declval<LocalOperators::DotOp>(), std::declval<L>(), std::declval<R>()))>>
auto Dune::Fufem::Forms::dot (const L &l, const R &r)
 Exterior product of two multilinear operators based on pointwise dot-product.
 
template<class L , class R , std::enable_if_t< isOperatorOrSumOperator_v< L > or isOperatorOrSumOperator_v< R >, int > = 0, class = std::void_t<decltype(product(std::declval<LocalOperators::MultOp>(), std::declval<L>(), inv(std::declval<R>())))>>
auto Dune::Fufem::Forms::operator/ (const L &l, const R &r)
 Exterior product of a multilinear operator with the pointwise inverse of 0-linear operator.
 

Function Documentation

◆ dot()

template<class L , class R , std::enable_if_t< isOperatorOrSumOperator_v< L > or isOperatorOrSumOperator_v< R >, int > = 0, class = std::void_t<decltype(product(std::declval<LocalOperators::DotOp>(), std::declval<L>(), std::declval<R>()))>>
auto Dune::Fufem::Forms::dot ( const L &  l,
const R &  r 
)

Exterior product of two multilinear operators based on pointwise dot-product.

Parameters
lFirst factor (should be a constant, MultilinearOperator, or SumOperator)
rSecond factor (should be a constant, MultilinearOperator, or SumOperator)

This combines an m-linear and an n-linear operator to an (m+n)-linear operator. At most one of the two factors can be a constant instead of a MultilinearOperator or SumOperator. In this case it is treated like a 0-linear operator which is constant in space. The values in the associated function space range will be combined using the local pointwise dot product.

◆ operator*()

template<class L , class R , std::enable_if_t< isOperatorOrSumOperator_v< L > or isOperatorOrSumOperator_v< R >, int > = 0, class = std::void_t<decltype(product(std::declval<LocalOperators::MultOp>(), std::declval<L>(), std::declval<R>()))>>
auto Dune::Fufem::Forms::operator* ( const L &  l,
const R &  r 
)

Exterior product of two multilinear operators based on pointwise multiplication.

Parameters
lFirst factor (should be a constant, MultilinearOperator, or SumOperator)
rSecond factor (should be a constant, MultilinearOperator, or SumOperator)

This combines an m-linear and an n-linear operator to an (m+n)-linear operator. At most one of the two factors can be a constant instead of a MultilinearOperator or SumOperator. In this case it is treated like a 0-linear operator which is constant in space. The values in the associated function space range will be combined using the local pointwise multiplication (supporting several combinations of matrix/vector/scalar products).

◆ operator+()

template<class L , class R >
auto Dune::Fufem::Forms::operator+ ( const L &  l,
const R &  r 
)

Create the sum of two operators.

Parameters
lFirst summand
rSecond summand

The actual implementation is constrained to a few special cases: Either both summands have the same arity, or exactly one is nullary and the other one is a constant value. In the former case both operators will be combined into a SumOperator. If l, r, or both are SumOperator's then all summands are combined into a large SumOperator.

◆ operator-() [1/2]

template<class L , class R >
auto Dune::Fufem::Forms::operator- ( const L &  l,
const R &  r 
)

Create the difference of two operators.

Parameters
lMinuend
rSubtrahend

The actual implementation is constrained to a few special cases: Either both arguments have the same arity, or exactly one is nullary and the other one is a constant value. This is a shortcut for l+(-r).

◆ operator-() [2/2]

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

Negate an operator.

Parameters
opOperator to negate (should be a MultilinearOperator or SumOperator)

This transform the operator by pointwise negation.

◆ operator/()

template<class L , class R , std::enable_if_t< isOperatorOrSumOperator_v< L > or isOperatorOrSumOperator_v< R >, int > = 0, class = std::void_t<decltype(product(std::declval<LocalOperators::MultOp>(), std::declval<L>(), inv(std::declval<R>())))>>
auto Dune::Fufem::Forms::operator/ ( const L &  l,
const R &  r 
)

Exterior product of a multilinear operator with the pointwise inverse of 0-linear operator.

Parameters
lNominator (should be a constant, MultilinearOperator, or SumOperator)
rDenominator (should be a constant, or 0-linear MultilinearOperator or SumOperator)

This combines an m-linear and an 0-linear operator to an m-linear operator. At most one of the two factors can be a constant instead of a MultilinearOperator or SumOperator. In this case it is treated like a 0-linear operator which is constant in space. The values in the associated function space range will be combined using the local pointwise multiplication of the first factor with the inverse of the second one.

Since this is a nonlinear operation, it is only available if r is 0-linear.

◆ product()

template<class Op , class L , class R , std::enable_if_t< isOperatorOrSumOperator_v< L > or isOperatorOrSumOperator_v< R >, int > = 0, class = std::void_t<decltype(Impl::productImpl(std::declval<Op>(), std::declval<L>(), std::declval<R>()))>>
auto Dune::Fufem::Forms::product ( const Op &  op,
const L &  l,
const R &  r 
)

Generic exterior product of two multilinear operators.

Parameters
opLocal bilinear operator
lFirst factor (should be a constant, MultilinearOperator, or SumOperator)
rSecond factor (should be a constant, MultilinearOperator, or SumOperator)

This combines an m-linear and an n-linear operator to an (m+n)-linear operator. At most one of the two factors can be a constant instead of a MultilinearOperator or SumOperator. In this case it is treated like a 0-linear operator which is constant in space. The values in the associated function space range will be combined using the local pointwise bilinear operator op.