DUNE-ACFEM (unstable)

Perform the following substitutions: More...

Functions

template<class T >
constexpr decltype(auto) Dune::ACFem::Tensor::Optimization::Powers::powExponent (T &&t)
 
template<class F , class T0 , class T1 , std::enable_if_t< IsScalarEinsumSquareV< F, T0, T1 >, int > = 0>
constexpr decltype(auto) Dune::ACFem::Tensor::Optimization::Powers::operate (DefaultTag, F &&, T0 &&t0, T1 &&t1)
 Change (s1*s1) to square(s1). More...
 
template<class F , class T0 , class T1 , std::enable_if_t< IsScalarEinsumWithSameExponentV< F, T0, T1 >, int > = 0>
constexpr decltype(auto) Dune::ACFem::Tensor::Optimization::Powers::operate (PowTag, F &&, T0 &&t0, T1 &&t1)
 
template<class F , class T , std::enable_if_t<(FunctorHas< IsExponentiationOperation, F >::value &&IsExponentiationExpression< T >::value), int > = 0>
constexpr auto Dune::ACFem::Tensor::Optimization::Powers::operate (DefaultTag, F &&f, T &&t)
 Change (s^alpha)^beta to s^(alpha*beta).
 
template<class F , class T0 , class T1 , std::enable_if_t< IsPowOfOnesV< F, T0, T1 >, int > = 0>
constexpr decltype(auto) Dune::ACFem::Tensor::Optimization::Powers::operate (OptimizeTerminal1, F &&, T0 &&t0, T1 &&t1)
 
template<class F , class T , std::enable_if_t<(IsConstantTensorV< T, IntFraction< 1 > > &&FunctorHas< IsExponentiationOperation, F >::value), int > = 0>
constexpr decltype(auto) Dune::ACFem::Tensor::Optimization::Powers::operate (OptimizeTerminal1, F &&, T &&t)
 

Detailed Description

Perform the following substitutions:

  • s1 * s1 to s1^2 is decltype(s1) qualifies for runtime-equal.
  • 1/s1 * 1/s2 to 1/(s1 * s2)
  • s*s^alpha to s^(alhpa+1)
  • s*(s*t)^alpha to s^(alpha+1)*t^alpha
  • s^alpha*s^beta to s^(alhpa+beta)
  • s1^alpha * s2^alpha to (s1*s2)^alpha
  • (s^alpha)^beta to s^(alpha*beta)
  • s^1 to s
  • s^{-1} to 1/s
  • s^{1/2} to sqrt(s)
  • s^2 to sqr(s)
  • s^0 to 1

Function Documentation

◆ operate() [1/4]

template<class F , class T0 , class T1 , std::enable_if_t< IsScalarEinsumSquareV< F, T0, T1 >, int > = 0>
constexpr decltype(auto) Dune::ACFem::Tensor::Optimization::Powers::operate ( DefaultTag  ,
F &&  f,
T0 &&  t0,
T1 &&  t1 
)
constexpr

Change (s1*s1) to square(s1).

Change s*s^alpha to s^(alhpa+1).

Change s^alpha*s to s^(alhpa+1).

Change 1/s1 * 1/s2 to 1/(s1 * s2).

Change s^alpha * s^beta to s^(alpha+beta).

Change s^{-1} to 1/s.

Change s^{1/2} to sqrt(s).

Change s^2 to sqr(s).

References Dune::ACFem::Tensor::Optimization::Powers::operate().

◆ operate() [2/4]

template<class F , class T , std::enable_if_t<(IsConstantTensorV< T, IntFraction< 1 > > &&FunctorHas< IsExponentiationOperation, F >::value), int > = 0>
constexpr decltype(auto) Dune::ACFem::Tensor::Optimization::Powers::operate ( OptimizeTerminal1  ,
F &&  ,
T &&  t 
)
constexpr

◆ operate() [3/4]

template<class F , class T0 , class T1 , std::enable_if_t< IsPowOfOnesV< F, T0, T1 >, int > = 0>
constexpr decltype(auto) Dune::ACFem::Tensor::Optimization::Powers::operate ( OptimizeTerminal1  ,
F &&  ,
T0 &&  t0,
T1 &&  t1 
)
constexpr

Change 1^s to 1.

Change s^1 to s.

Change s^0 to ones.

◆ operate() [4/4]

template<class F , class T0 , class T1 , std::enable_if_t< IsScalarEinsumWithSameExponentV< F, T0, T1 >, int > = 0>
constexpr decltype(auto) Dune::ACFem::Tensor::Optimization::Powers::operate ( PowTag  ,
F &&  ,
T0 &&  t0,
T1 &&  t1 
)
constexpr

Change s1^alpha * s2^alpha to (s1*s2)^alpha.

References Dune::ACFem::Tensor::Optimization::Powers::operate().

◆ powExponent()

template<class T >
constexpr decltype(auto) Dune::ACFem::Tensor::Optimization::Powers::powExponent ( T &&  t)
constexpr

Generate a proper exponent for componentwise pow operation.

References Dune::ACFem::Tensor::Optimization::Powers::operate().

Referenced by Dune::ACFem::Tensor::Optimization::Powers::operate().

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