DUNE-ACFEM (unstable)

Modules

 ExpensiveOptimizations
 

Functions

template<class F , class T0 , class T1 , std::enable_if_t< NormalizeSumSignsV< F, T0, T1 >==1, int > = 0>
constexpr decltype(auto) Dune::ACFem::Expressions::Sums::operate (OptimizeNormalize, F &&, T0 &&t0, T1 &&t1)
 -A - B -> -(A+B) More...
 
template<class F , class T , std::enable_if_t< FoldMinusIntoRightDifferenceV< F, T >, int > = 0>
constexpr decltype(auto) Dune::ACFem::Expressions::Sums::operate (OptimizeLast tag, F &&, T &&t)
 
template<class T >
constexpr decltype(auto) Dune::ACFem::Expressions::Sums::operate (OptimizeTerminal3, OperationTraits< IdentityOperation >, T &&t)
 Remove do-nothing operations.
 
template<class T >
constexpr decltype(auto) Dune::ACFem::Expressions::Sums::operate (OptimizeTerminal3, OperationTraits< PlusOperation >, T &&t)
 Remove do-nothing operations.
 

Detailed Description

Function Documentation

◆ operate() [1/2]

template<class F , class T , std::enable_if_t< FoldMinusIntoRightDifferenceV< F, T >, int > = 0>
constexpr decltype(auto) Dune::ACFem::Expressions::Sums::operate ( OptimizeLast  tag,
F &&  ,
T &&  t 
)
constexpr

-(A * (C -B)) -> A * (B - C).

We use "OptimizeLast" here because (C - B) normally should be as "optimizable" as (B - C), so when this pattern should occur it does not make sense to feed (B - C) again into the optimizer.

-((A-B)*C) -> ((B-A)*C).

We use "OptimizeLast" here because (A - B) normally should be as "optimizable" as (B - A), so when this pattern should occur it does not make sense to feed (B - A) again into the optimizer.

References Dune::ACFem::Expressions::Sums::operate().

◆ operate() [2/2]

template<class F , class T0 , class T1 , std::enable_if_t< NormalizeSumSignsV< F, T0, T1 >==1, int > = 0>
constexpr decltype(auto) Dune::ACFem::Expressions::Sums::operate ( OptimizeNormalize  tag,
F &&  ,
T0 &&  t0,
T1 &&  t1 
)
constexpr

-A - B -> -(A+B)

-A - (-B) -> B - A

A - (-B) -> A+B.

Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 28, 23:30, 2024)