DUNE-ACFEM (unstable)

Helper constructs in order to inject non-expressions into the expression chain and to interface generated expressions to pre-existing non-expressions. More...

Classes

struct  Dune::ACFem::Expressions::DenseStorage< T, SFINAE >
 A traits class which provides a type suitable to store the values of the given expression T and any expressions of "similar" type. More...
 
struct  Dune::ACFem::Expressions::IsClosure< T, SFINAE >
 An expression closure is a wrapper class which wraps an expression in order to interface to other existing interface. More...
 
struct  Dune::ACFem::Expressions::IsClosure< T, std::enable_if_t<!IsDecay< T >::value > >
 Forward references to the real traits class. More...
 
struct  Dune::ACFem::Expressions::ClosureTraits< T, SFINAE >
 Provide the type ExpressionType for non-closure expressions. More...
 
struct  Dune::ACFem::Expressions::ClosureTraits< T, std::enable_if_t< IsClosure< T >::value > >
 Provide the type ExpressionType for closure expressions. More...
 

Typedefs

template<class T >
using Dune::ACFem::Expressions::EnclosedType = typename ClosureTraits< T >::ExpressionType
 Type alias shortcut to get hold of the type contained in an "expression closure". More...
 

Functions

template<class T , std::enable_if_t<(Expressions::IsClosure< T >::value||(!IsExpression< T >::value &&IsScalar< T >::value)), int > = 0>
constexpr decltype(auto) Dune::ACFem::Expressions::expressionClosure (T &&t)
 Do-nothing default implementation for pathologic cases. More...
 
template<class T , std::enable_if_t<(IsExpression< T >::value &&!IsClosure< T >::value), int > = 0>
constexpr decltype(auto) Dune::ACFem::Expressions::asExpression (T &&t)
 Return a non-closure expression as is. More...
 
template<std::size_t N, class... T, std::enable_if_t<(NthIs< N, IsClosure, T... >::value &&!AnyIs< IsIntegralConstant, T... >::value), int > = 0>
constexpr decltype(auto) Dune::ACFem::Expressions::operandPromotion (T &&... t)
 The purpose of this function is to promote operands to other types, e.g. More...
 

Detailed Description

Helper constructs in order to inject non-expressions into the expression chain and to interface generated expressions to pre-existing non-expressions.

One example is the conversion of a Dune::FieldMatrix into a tensor and wrapping a generated tensor expressions into a class which can be converted back to a Dune::FieldMatrix.

Typedef Documentation

◆ EnclosedType

template<class T >
using Dune::ACFem::Expressions::EnclosedType = typedef typename ClosureTraits<T>::ExpressionType

Type alias shortcut to get hold of the type contained in an "expression closure".

Returns T itself if T is not a closure type.

Function Documentation

◆ asExpression()

template<class T , std::enable_if_t<(IsExpression< T >::value &&!IsClosure< T >::value), int > = 0>
constexpr decltype(auto) Dune::ACFem::Expressions::asExpression ( T &&  t)
constexpr

Return a non-closure expression as is.

Return the enclosed expression if a T is an expression closure.

Referenced by main(), and Dune::ACFem::Expressions::operandPromotion().

◆ expressionClosure()

template<class T , std::enable_if_t<(Expressions::IsClosure< T >::value||(!IsExpression< T >::value &&IsScalar< T >::value)), int > = 0>
constexpr decltype(auto) Dune::ACFem::Expressions::expressionClosure ( T &&  t)
constexpr

◆ operandPromotion()

template<std::size_t N, class... T, std::enable_if_t<(NthIs< N, IsClosure, T... >::value &&!AnyIs< IsIntegralConstant, T... >::value), int > = 0>
constexpr decltype(auto) Dune::ACFem::Expressions::operandPromotion ( T &&...  t)
constexpr

The purpose of this function is to promote operands to other types, e.g.

to promote scalars to vectorial expressions before feeding them into some arithmetic operation. This is used in operandpromotion.hh to define operator function overrides which first to the promotion and then call the operator function for the promoted operands. This function must not instantiate if an operator already exists wihtout type promotion.

References Dune::ACFem::Expressions::asExpression().

Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Apr 18, 22:30, 2024)