DUNE-ACFEM (unstable)

TensorExpressions

Modules

 TensorComparison
 
 TensorMathOperations
 
 TensorExpressionOptimizations
 

Functions

template<class F , class T0 , class T1 , std::enable_if_t< AreProperTensors< T0, T1 >::value &&!FunctorHas< IsTensorOperation, F >::value, int > = 0>
constexpr auto Dune::ACFem::Tensor::operate (Expressions::DontOptimize, F &&f, T0 &&t0, T1 &&t1)
 Generate a binary tensor expression.
 
template<class F , class T , std::enable_if_t< IsTensor< T >::value, int > = 0>
auto Dune::ACFem::Tensor::zero (F &&, T &&)
 Generate the canonical zero for tensors, given operation.
 
template<class T , std::enable_if_t< Tensor::IsTensor< T >::value, int > = 0>
auto Dune::ACFem::Tensor::one (T &&)
 Generate the canonical scalar one for tensors.
 
template<std::size_t N, class T1 , class T2 , std::enable_if_t< AreProperTensors< T1, T2 >::value, int > = 0>
constexpr auto Dune::ACFem::Tensor::contractInner (T1 &&t1, T2 &&t2, IndexConstant< N >=IndexConstant< N >{})
 Contraction over the #N inner dimensions. More...
 
template<class T1 , class T2 , std::enable_if_t< AreProperTensors< T1, T2 >::value, int > = 0>
auto Dune::ACFem::Tensor::contractInner (T1 &&t1, T2 &&t2)
 Inner product w.r.t. More...
 
template<class T1 , class T2 , std::enable_if_t< AreProperTensors< T1, T2 >::value, int > = 0>
auto Dune::ACFem::Tensor::outer (T1 &&t1, T2 &&t2)
 Outer tensor product.
 
template<class T , std::enable_if_t< IsProperTensor< T >::value, int > = 0>
constexpr auto Dune::ACFem::Tensor::trace (T &&t)
 Trace is the contraction over all indices with the eye tensor.
 
template<class T1 , class T2 , std::enable_if_t< AreProperTensors< T1, T2 >::value, int > = 0>
auto Dune::ACFem::Tensor::inner (T1 &&t1, T2 &&t2)
 "scalar product"
 
template<class Arg , std::enable_if_t< IsProperTensor< Arg >::value, int > = 0>
constexpr auto Dune::ACFem::Tensor::frobenius2 (Arg &&arg)
 Square of Frobenius norm.
 
template<class T1 , class T2 , std::enable_if_t<(AreProperTensors< T1, T2 >::value &&TensorTraits< T1 >::rank > 0 &&TensorTraits< T2 >::rank > 0 &&TensorTraits< T1 >::template dim< TensorTraits< T1 >::rank - 1 >()==TensorTraits< T2 >::template dim< 0 >()), int > = 0>
auto Dune::ACFem::Tensor::operator* (T1 &&t1, T2 &&t2)
 Multiplication of non-trivial tensors is Einstein-summation over the inner (right-most of the left and the left-most of the right) index if the dimension matches. More...
 
template<class T1 , class T2 , std::enable_if_t< AreProperTensors< T1, T2 >::value, int > = 0>
auto Dune::ACFem::Tensor::operator& (T1 &&t1, T2 &&t2)
 Greedy contraction over all leading matching dimensions.
 
template<class T1 , class T2 , std::enable_if_t<(AreProperTensors< T1, T2 >::value &&TensorTraits< T2 >::rank==0), int > = 0>
auto Dune::ACFem::Tensor::operator/ (T1 &&t1, T2 &&t2)
 Division is multiplication with inverse.
 
template<class T1 , class T2 , std::enable_if_t<(IsTensorOperand< T1 >::value &&IsTensorOperand< T2 >::value &&(IsTensor< T1 >::value||IsTensor< T2 >::value)), int > = 0>
T1 & Dune::ACFem::Tensor::operator+= (T1 &t1, T2 &&t2)
 operator+=() with generic tensors.
 
template<class T1 , class T2 , std::enable_if_t<(IsTensorOperand< T1 >::value &&IsTensorOperand< T2 >::value &&(IsTensor< T1 >::value||IsTensor< T2 >::value)), int > = 0>
T1 & Dune::ACFem::Tensor::operator-= (T1 &t1, T2 &&t2)
 operator-=() with generic tensors.
 
template<class T1 , class T2 , std::enable_if_t<(IsTensorOperand< T1 >::value &&IsTensorOperand< T2 >::value &&(IsTensor< T1 >::value||IsTensor< T2 >::value) &&TensorTraits< T2 >::rank==0), int > = 0>
T1 & Dune::ACFem::Tensor::operator*= (T1 &t1, T2 &&t2)
 operator*=() with rank-0 tensors.
 
template<class F , class T , std::enable_if_t< IsProperTensor< T >::value &&!FunctorHas< IsTensorOperation, F >::value, int > = 0>
constexpr auto Dune::ACFem::Tensor::operate (Expressions::DontOptimize, F &&f, T &&t)
 Generate a unary tensor expression. More...
 

Detailed Description

Function Documentation

◆ contractInner() [1/2]

template<class T1 , class T2 , std::enable_if_t< AreProperTensors< T1, T2 >::value, int > = 0>
auto Dune::ACFem::Tensor::contractInner ( T1 &&  t1,
T2 &&  t2 
)

Inner product w.r.t.

to just the innermost index position.

◆ contractInner() [2/2]

template<std::size_t N, class T1 , class T2 , std::enable_if_t< AreProperTensors< T1, T2 >::value, int > = 0>
constexpr auto Dune::ACFem::Tensor::contractInner ( T1 &&  t1,
T2 &&  t2,
IndexConstant< N >  = IndexConstant<N>{} 
)
constexpr

◆ operate()

template<class F , class T , std::enable_if_t< IsProperTensor< T >::value &&!FunctorHas< IsTensorOperation, F >::value, int > = 0>
constexpr auto Dune::ACFem::Tensor::operate ( Expressions::DontOptimize  ,
F &&  f,
T &&  t 
)
constexpr

Generate a unary tensor expression.

Parameters
tThe operand.
fThe operation functor.

◆ operator*()

template<class T1 , class T2 , std::enable_if_t<(AreProperTensors< T1, T2 >::value &&TensorTraits< T1 >::rank > 0 &&TensorTraits< T2 >::rank > 0 &&TensorTraits< T1 >::template dim< TensorTraits< T1 >::rank - 1 >()==TensorTraits< T2 >::template dim< 0 >()), int > = 0>
auto Dune::ACFem::Tensor::operator* ( T1 &&  t1,
T2 &&  t2 
)

Multiplication of non-trivial tensors is Einstein-summation over the inner (right-most of the left and the left-most of the right) index if the dimension matches.

Multiplication of resp.

with scalars.

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