DUNE-ACFEM (unstable)

Modules

 TensorOperationTraits
 

Classes

class  Dune::ACFem::Tensor::EinsteinSummation< LeftTensor, LeftIndices, RightTensor, RightIndices, IdenticalOperands >
 Contraction of two tensor over a selection set of indices. More...
 
class  Dune::ACFem::Tensor::ProductTensor< LeftTensor, LeftIndices, RightTensor, RightIndices >
 Compute the component-wise product ".[i][j]" over selected indices: More...
 
class  Dune::ACFem::Tensor::Reshape< Parent, Seq< Dimensions... > >
 wraps a tensor using the same data but with a different signature More...
 
class  Dune::ACFem::Tensor::Restriction< Tensor, Dims, Indices >
 A meta-tensor restricting a given tensor w.r.t. More...
 
class  Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq< PivotIndices... > >
 Restriction to index sub-space with compile-time constant pivot indices. More...
 
class  Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >
 Restriction to index sub-space with run-time dynamic pivot indices. More...
 
struct  Dune::ACFem::Tensor::IsRestriction< T >
 Traits in order to identify a Restriction class. More...
 
struct  Dune::ACFem::Tensor::IsDynamicRestriction< Restriction< T, Seq< P0, PRest... >, Seq<> > >
 Evaluate to a TrueType if the restriction is runtime dynamic. More...
 
class  Dune::ACFem::Tensor::Transposition< Tensor, Seq< Perm... > >
 A class applying a transposition to the given tensor's indices. More...
 
struct  Dune::ACFem::Tensor::IsTransposition< T >
 Traits in order to identify a TensorView class. More...
 

Typedefs

template<class LDims , class LPos , class RDims , class RPos >
using Dune::ACFem::Tensor::EinsumSignature = typename EinsumOperationTraits< LDims, LPos, RDims, RPos >::Signature
 Compute the signature of the einsum tensor.
 
template<class LDims , class LPos , class RDims , class RPos >
using Dune::ACFem::Tensor::EinsumFunctor = typename EinsumOperationTraits< LDims, LPos, RDims, RPos >::Functor
 Generate an einsum-functor. More...
 
template<class Left , class LPos , class Right , class RPos >
using Dune::ACFem::Tensor::ProductSignature = typename ProductOperationTraits< typename TensorTraits< Left >::TensorType, LPos, typename TensorTraits< Right >::TensorType, RPos >::Signature
 Generate the signature of the ProductTensor when the operands have the given signature and the product is taken over the given inex positions.
 

Functions

template<std::size_t... Indices, std::enable_if_t<(sizeof...(Indices)==rank &&ThisType::template isZero< Indices... >()), int > = 0>
constexpr auto Dune::ACFem::Tensor::EinsteinSummation< LeftTensor, LeftIndices, RightTensor, RightIndices, IdenticalOperands >::operator() (Seq< Indices... >) const
 Constant access from index-sequence.
 
template<class Seq1 , class Seq2 , class T1 , class T2 , std::enable_if_t< AreProperTensors< T1, T2 >::value, int > = 0>
constexpr decltype(auto) Dune::ACFem::Tensor::einsum (T1 &&t1, T2 &&t2)
 Tensor contraction for proper tensors.
 
template<class T1 , class T2 , std::enable_if_t< AreProperTensors< T1, T2 >::value, int > = 0>
constexpr decltype(auto) Dune::ACFem::Tensor::einsum (T1 &&t1, T2 &&t2)
 Greedy tensor contraction for proper tensors, summing over all matching dimensions.
 
template<class Seq0 , class Seq1 , class Dims , class T0 , class T1 >
constexpr auto Dune::ACFem::Tensor::operate (Expressions::DontOptimize, OperationTraits< EinsumOperation< Seq0, Seq1, Dims > >, T0 &&t0, T1 &&t1)
 
template<class LeftArg , class RightArg , std::enable_if_t< std::is_constructible< Tensor, LeftArg >::value &&std::is_constructible< TraceTensor, RightArg >::value, int > = 0>
 Dune::ACFem::Tensor::EinsteinSummation< Tensor, Seq< ContractPos... >, BlockEye< BlockRank, Seq< BlockDims... > >, MakeIndexSequence< BlockRank *sizeof...(BlockDims)>, IdenticalOperands >::EinsteinSummation (LeftArg &&left, RightArg &&right)
 Einsum constructor from two arguments.
 
template<class Arg , std::enable_if_t< std::is_constructible< Tensor, Arg >::value, int > = 0>
 Dune::ACFem::Tensor::EinsteinSummation< Tensor, Seq< ContractPos... >, BlockEye< BlockRank, Seq< BlockDims... > >, MakeIndexSequence< BlockRank *sizeof...(BlockDims)>, IdenticalOperands >::EinsteinSummation (Arg &&arg)
 Constructor from a given tensor.
 
template<class... Dummy, std::enable_if_t<(sizeof...(Dummy)==0 &&IsTypedValue< Tensor >::value), int > = 0>
 Dune::ACFem::Tensor::EinsteinSummation< Tensor, Seq< ContractPos... >, BlockEye< BlockRank, Seq< BlockDims... > >, MakeIndexSequence< BlockRank *sizeof...(BlockDims)>, IdenticalOperands >::EinsteinSummation (Dummy &&...)
 Allow default construction if contained types fulfill IsTypedValue.
 
template<class... Dims, std::enable_if_t<(sizeof...(Dims)==rank &&IsIntegralPack< Dims... >::value), int > = 0>
constexpr auto Dune::ACFem::Tensor::EinsteinSummation< Tensor, Seq< ContractPos... >, BlockEye< BlockRank, Seq< BlockDims... > >, MakeIndexSequence< BlockRank *sizeof...(BlockDims)>, IdenticalOperands >::operator() (Dims... indices) const
 Runtime-dynamic element access.
 
template<std::size_t... Indices>
constexpr auto Dune::ACFem::Tensor::EinsteinSummation< Tensor, Seq< ContractPos... >, BlockEye< BlockRank, Seq< BlockDims... > >, MakeIndexSequence< BlockRank *sizeof...(BlockDims)>, IdenticalOperands >::operator() (Seq< Indices... >) const
 Compile-time static element access.
 
template<class LeftArg , class RightArg , std::enable_if_t< std::is_constructible< Tensor, LeftArg >::value &&std::is_constructible< TraceTensor, RightArg >::value, int > = 0>
 Dune::ACFem::Tensor::EinsteinSummation< Tensor, Seq< ContractPos... >, Eye< Seq< EyeDims... > >, MakeIndexSequence< sizeof...(EyeDims)>, IdenticalOperands >::EinsteinSummation (LeftArg &&left, RightArg &&right)
 Einsum constructor from two arguments.
 
template<class Arg , std::enable_if_t< std::is_constructible< Tensor, Arg >::value, int > = 0>
 Dune::ACFem::Tensor::EinsteinSummation< Tensor, Seq< ContractPos... >, Eye< Seq< EyeDims... > >, MakeIndexSequence< sizeof...(EyeDims)>, IdenticalOperands >::EinsteinSummation (Arg &&arg)
 Constructor from a given tensor.
 
template<class... Dummy, std::enable_if_t<(sizeof...(Dummy)==0 &&IsTypedValue< Tensor >::value), int > = 0>
 Dune::ACFem::Tensor::EinsteinSummation< Tensor, Seq< ContractPos... >, Eye< Seq< EyeDims... > >, MakeIndexSequence< sizeof...(EyeDims)>, IdenticalOperands >::EinsteinSummation (Dummy &&...)
 Allow default construction if contained types fulfill IsTypedValue.
 
template<class... Dims, std::enable_if_t<(sizeof...(Dims)==rank &&IsIntegralPack< Dims... >::value), int > = 0>
constexpr auto Dune::ACFem::Tensor::EinsteinSummation< Tensor, Seq< ContractPos... >, Eye< Seq< EyeDims... > >, MakeIndexSequence< sizeof...(EyeDims)>, IdenticalOperands >::operator() (Dims... indices) const
 Runtime-dynamic element access.
 
template<std::size_t... Indices>
constexpr auto Dune::ACFem::Tensor::EinsteinSummation< Tensor, Seq< ContractPos... >, Eye< Seq< EyeDims... > >, MakeIndexSequence< sizeof...(EyeDims)>, IdenticalOperands >::operator() (Seq< Indices... >) const
 Compile-time static element access.
 
template<class... Dummy, std::enable_if_t<(sizeof...(Dummy)==0 &&IsTypedValue< LeftType >::value &&IsTypedValue< RightType >::value), int > = 0>
 Dune::ACFem::Tensor::ProductTensor< LeftTensor, Seq< LeftIndices... >, RightTensor, Seq< RightIndices... > >::ProductTensor (Dummy &&...)
 Allow default construction if contained types fulfill IsTypedValue.
 
template<class... Dims, std::enable_if_t<(sizeof...(Dims)==rank &&IsIntegralPack< Dims... >::value), int > = 0>
auto Dune::ACFem::Tensor::ProductTensor< LeftTensor, Seq< LeftIndices... >, RightTensor, Seq< RightIndices... > >::operator() (Dims... indices) const
 Insert the current view-indices at their proper positions and foward to the underlying "host" tensor.
 
template<std::size_t... Indices, std::enable_if_t<(sizeof...(Indices)==rank &&ThisType::template isZero< Indices... >()), int > = 0>
constexpr auto Dune::ACFem::Tensor::ProductTensor< LeftTensor, Seq< LeftIndices... >, RightTensor, Seq< RightIndices... > >::operator() (Seq< Indices... >) const
 Constant access from index-sequence, zero optimization.
 
template<class Seq1 , class Seq2 , class T1 , class T2 , std::enable_if_t< AreProperTensors< T1, T2 >::value, int > = 0>
constexpr decltype(auto) Dune::ACFem::Tensor::multiply (T1 &&t1, T2 &&t2)
 Tensor contraction for proper tensors.
 
template<class T1 , class T2 , std::enable_if_t< AreProperTensors< T1, T2 >::value, int > = 0>
constexpr decltype(auto) Dune::ACFem::Tensor::multiply (T1 &&t1, T2 &&t2)
 Greedy tensor contraction for proper tensors, multiplying over all matching dimensions.
 
template<class Seq0 , class Seq1 , class Dims , class T0 , class T1 >
constexpr auto Dune::ACFem::Tensor::operate (Expressions::DontOptimize, OperationTraits< TensorProductOperation< Seq0, Seq1, Dims > >, T0 &&t0, T1 &&t1)
 
template<class... Dummy, std::enable_if_t<(sizeof...(Dummy)==0 &&IsTypedValue< ParentType >::value), int > = 0>
 Dune::ACFem::Tensor::Reshape< Parent, Seq< Dimensions... > >::Reshape (Dummy &&...)
 Allow default construction if contained types fulfill IsTypedValue.
 
template<class... Indices, std::enable_if_t<(sizeof...(Indices)==rank &&IsIntegralPack< Indices... >::value), int > = 0>
constexpr decltype(auto) Dune::ACFem::Tensor::Reshape< Parent, Seq< Dimensions... > >::operator() (Indices... indices) const
 Translate the given multi-index positions into a linear index and forward to the underlying storage.
 
template<class... Indices, std::enable_if_t<(sizeof...(Indices)==rank &&IsIntegralPack< Indices... >::value), int > = 0>
constexpr decltype(auto) Dune::ACFem::Tensor::Reshape< Parent, Seq< Dimensions... > >::operator() (Indices... indices)
 Translate the given multi-index positions into a linear index and forward to the underlying storage.
 
template<std::size_t... Indices, std::enable_if_t< sizeof...(Indices)==rank, int > = 0>
decltype(auto) constexpr Dune::ACFem::Tensor::Reshape< Parent, Seq< Dimensions... > >::operator() (Seq< Indices... >) const
 Constant access from index-sequence.
 
template<std::size_t... Indices, std::enable_if_t< sizeof...(Indices)==rank, int > = 0>
decltype(auto) constexpr Dune::ACFem::Tensor::Reshape< Parent, Seq< Dimensions... > >::operator() (Seq< Indices... >)
 Constant access from index-sequence.
 
template<class Arg , std::enable_if_t< std::is_constructible< ArgType, Arg >::value, int > = 0>
 Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq< PivotIndices... > >::Restriction (Arg &&host, PivotSequence=PivotSequence{})
 Constructor from a given host-tensor, looking at the pivot indices specified by the template argument.
 
template<class... Dummy, std::enable_if_t<(sizeof...(Dummy)==0 &&IsTypedValue< ArgType >::value), int > = 0>
 Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq< PivotIndices... > >::Restriction (Dummy &&...)
 Allow default construction if contained types fulfill IsTypedValue.
 
auto Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq< PivotIndices... > >::operator[] (std::size_t i)
 Implement kind of a nested vector interface via operator[].
 
auto Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq< PivotIndices... > >::operator[] (std::size_t i) const
 Implement kind of a nested vector interface via operator[]. More...
 
template<class... Dims, std::enable_if_t<(sizeof...(Dims)==rank &&IsIntegralPack< Dims... >::value), int > = 0>
decltype(auto) Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq< PivotIndices... > >::operator() (Dims... indices)
 Insert the current view-indices at their proper positions and foward to the underlying "host" tensor.
 
template<class... Dims, std::enable_if_t<(sizeof...(Dims)==rank &&IsIntegralPack< Dims... >::value), int > = 0>
decltype(auto) Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq< PivotIndices... > >::operator() (Dims... indices) const
 Insert the current view-indices at their proper positions and foward to the underlying "host" tensor.
 
template<std::size_t... Indices, std::enable_if_t<(sizeof...(Indices)==rank), int > = 0>
decltype(auto) constexpr Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq< PivotIndices... > >::operator() (Seq< Indices... >)
 Constant access from index-sequence.
 
template<std::size_t... Indices, std::enable_if_t<(sizeof...(Indices)==rank), int > = 0>
decltype(auto) constexpr Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq< PivotIndices... > >::operator() (Seq< Indices... >) const
 Constant access from index-sequence.
 
static constexpr auto Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq< PivotIndices... > >::lookAt ()
 Return the array of indices currently looking at.
 
template<class Arg , class T , std::enable_if_t<(std::is_constructible< ArgType, Arg >::value &&IsTupleLike< T >::value &&size< T >()==sizeof...(IndexPositions) &&IsIntegralTuple< T >::value), int > = 0>
 Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::Restriction (Arg &&host, const T &tuple)
 Constructor from a given tuple-like index collection. More...
 
template<class Arg , class T , std::size_t N, std::enable_if_t<(std::is_constructible< ArgType, Arg >::value &&IsTupleLike< T >::value &&(N==sizeof...(IndexPositions)||N==0) &&std::is_integral< T >::value), int > = 0>
 Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::Restriction (Arg &&host, const T(&t)[N])
 Constructor from a given C-array index collection. More...
 
template<class Arg , class T , std::enable_if_t<(std::is_constructible< ArgType, Arg >::value &&IsTupleLike< T >::value &&size< T >()==0 &&IsIntegralTuple< T >::value), int > = 0>
 Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::Restriction (Arg &&host, T &&tuple)
 Constructor from emtpy tuple like.
 
template<class Arg , class... Indices, std::enable_if_t<(std::is_constructible< ArgType, Arg >::value &&sizeof...(Indices) !=0 &&sizeof...(Indices)==sizeof...(IndexPositions) &&IsIntegralPack< Indices... >::value), int > = 0>
 Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::Restriction (Arg &&host, Indices... indices)
 Constructor from a given index pack of lookAt() indices. More...
 
template<class Arg , std::size_t... Pivots, std::enable_if_t<(std::is_constructible< ArgType, Arg >::value &&sizeof...(Pivots) !=0), int > = 0>
 Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::Restriction (Arg &&host, IndexSequence< Pivots... >)
 Constructor from a given index sequence. More...
 
template<class Arg , std::enable_if_t< std::is_constructible< ArgType, Arg >::value, int > = 0>
 Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::Restriction (ArgType &&host, Seq<>=Seq<>{})
 Constructor from a given host-tensor, looking at the sub-tensor at (0, ...).
 
auto Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::operator[] (std::size_t i)
 Implement kind of a nested vector interface via operator[].
 
auto Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::operator[] (std::size_t i) const
 Implement kind of a nested vector interface via operator[].
 
template<class... Dims, std::enable_if_t<(sizeof...(Dims)==rank &&IsIntegralPack< Dims... >::value), int > = 0>
decltype(auto) Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::operator() (Dims... indices)
 Insert the current view-indices at their proper positions and foward to the underlying "host" tensor.
 
template<class... Dims, std::enable_if_t<(sizeof...(Dims)==rank &&IsIntegralPack< Dims... >::value), int > = 0>
decltype(auto) Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::operator() (Dims... indices) const
 Insert the current view-indices at their proper positions and foward to the underlying "host" tensor.
 
template<std::size_t... Indices, std::enable_if_t<(sizeof...(Indices)==rank), int > = 0>
decltype(auto) constexpr Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::operator() (Seq< Indices... >)
 Constant access from index-sequence.
 
template<std::size_t... Indices, std::enable_if_t<(sizeof...(Indices)==rank), int > = 0>
decltype(auto) constexpr Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::operator() (Seq< Indices... >) const
 Constant access from index-sequence.
 
template<class... Indices, std::enable_if_t<((sizeof...(Indices) > 0) &&IsIntegralPack< Indices... >::value), int > = 0>
void Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::lookAt (Indices... indices)
 "Move" the view to the given index pack. More...
 
template<class T , std::enable_if_t<(IsTupleLike< T >::value), int > = 0>
void Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::lookAt (T &&tuple)
 "Move" the view to the given index tuple. More...
 
const auto & Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::lookAt () const
 Return the array of indices currently looking at.
 
auto & Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::lookAt ()
 Return the array of indices currently looking at.
 
template<std::size_t... IndexPositions, class T , std::size_t... Indices, std::enable_if_t<(IsProperTensor< T >::value &&sizeof...(IndexPositions)==sizeof...(Indices)), int > = 0>
auto Dune::ACFem::Tensor::restriction (T &&t, Seq< Indices... >, Seq< IndexPositions... >=Seq< IndexPositions... >{})
 Generate a compile-time constant restriction.
 
template<std::size_t... IndexPositions, class T , class Indices , std::enable_if_t<(IsTupleLike< Indices >::value &&sizeof(restriction< IndexPositions... >(operandPromotion< 0 >(std::declval< T >()), std::declval< Indices >())) >=0), int > = 0>
auto Dune::ACFem::Tensor::restriction (T &&t, Indices &&indices, Seq< IndexPositions... >=Seq< IndexPositions... >{})
 Generate a compile-time dynamic restriction with position given from a tuple-like object.
 
template<std::size_t... IndexPositions, class T , class I , std::size_t N, std::enable_if_t<(sizeof(restriction< IndexPositions... >(operandPromotion< 0 >(std::declval< T >()), std::declval< const I(&)[N]>())) >=0), int > = 0>
auto Dune::ACFem::Tensor::restriction (T &&t, const I(&l)[N], Seq< IndexPositions... >=Seq< IndexPositions... >{})
 Generate a compile-time dynamic restriction with position given from an initializer list.
 
template<std::size_t... IndexPositions, class T , std::enable_if_t<(sizeof(restriction< IndexPositions... >(operandPromotion< 0 >(std::declval< T >()))) >=0), int > = 0>
auto Dune::ACFem::Tensor::restriction (T &&t)
 Generate a compile-time dynamic restriction without positions.
 
template<class T , class DefectPositions , std::enable_if_t<(sizeof(restriction(operandPromotion< 0 >(std::declval< T >()), DefectPositions{})) >=0), int > = 0>
auto Dune::ACFem::Tensor::restriction (T &&t, DefectPositions)
 Generate a compile-time dynamic restriction without positions.
 
template<class Arg , std::enable_if_t< std::is_constructible< ArgType, Arg >::value, int > = 0>
 Dune::ACFem::Tensor::Transposition< Tensor, Seq< Perm... > >::Transposition (Arg &&host)
 Constructor from a given host-tensor.
 
template<class... Dummy, std::enable_if_t<(sizeof...(Dummy)==0 &&IsTypedValue< ArgType >::value), int > = 0>
 Dune::ACFem::Tensor::Transposition< Tensor, Seq< Perm... > >::Transposition (Dummy &&...)
 Allow default construction if contained types fulfill IsTypedValue.
 
template<class... Dims, std::enable_if_t<(sizeof...(Dims)==rank &&IsIntegralPack< Dims... >::value), int > = 0>
decltype(auto) Dune::ACFem::Tensor::Transposition< Tensor, Seq< Perm... > >::operator() (Dims... indices)
 Insert the current view-indices at their proper positions and foward to the underlying "host" tensor.
 
template<class... Dims, std::enable_if_t<(sizeof...(Dims)==rank &&IsIntegralPack< Dims... >::value), int > = 0>
decltype(auto) Dune::ACFem::Tensor::Transposition< Tensor, Seq< Perm... > >::operator() (Dims... indices) const
 Insert the current view-indices at their proper positions and foward to the underlying "host" tensor.
 
template<std::size_t... Perm, class T , std::enable_if_t<(sizeof(transpose< Perm... >(operandPromotion< 0 >(std::declval< T >()))) >=0), int > = 0>
constexpr decltype(auto) Dune::ACFem::Tensor::transpose (T &&t, Seq< Perm... >=Seq< Perm... >{})
 Promote operands to tensor transposition operation. More...
 
template<class Perm , class T , std::enable_if_t< Perm::size()==TensorTraits< T >::rank, int > = 0>
constexpr auto Dune::ACFem::Tensor::operate (Expressions::DontOptimize, OperationTraits< TransposeOperation< Perm > >, T &&t)
 

Detailed Description

Typedef Documentation

◆ EinsumFunctor

template<class LDims , class LPos , class RDims , class RPos >
using Dune::ACFem::Tensor::EinsumFunctor = typedef typename EinsumOperationTraits<LDims, LPos, RDims, RPos>::Functor

Generate an einsum-functor.

LDims and RDims are either index sequences or tensors. In the latter case the tensor-signature are used for the dimensions.

Function Documentation

◆ lookAt() [1/2]

template<class Tensor , std::size_t... IndexPositions>
template<class... Indices, std::enable_if_t<((sizeof...(Indices) > 0) &&IsIntegralPack< Indices... >::value), int > = 0>
void Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::lookAt ( Indices...  indices)
inline

"Move" the view to the given index pack.

Parameters
[in]indicesThe index of the sub-tensor to look at.

◆ lookAt() [2/2]

template<class Tensor , std::size_t... IndexPositions>
template<class T , std::enable_if_t<(IsTupleLike< T >::value), int > = 0>
void Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::lookAt ( T &&  tuple)
inline

"Move" the view to the given index tuple.

Parameters
[in]tupleA tuple or array of indices, actually everything for which ACFem::IsTupleLike return true.

◆ operate() [1/3]

template<class Seq0 , class Seq1 , class Dims , class T0 , class T1 >
constexpr auto Dune::ACFem::Tensor::operate ( Expressions::DontOptimize  ,
OperationTraits< EinsumOperation< Seq0, Seq1, Dims > >  ,
T0 &&  t0,
T1 &&  t1 
)
constexpr

Return the tensor resulting from Einstein summation over the given index positions.

◆ operate() [2/3]

template<class Seq0 , class Seq1 , class Dims , class T0 , class T1 >
constexpr auto Dune::ACFem::Tensor::operate ( Expressions::DontOptimize  ,
OperationTraits< TensorProductOperation< Seq0, Seq1, Dims > >  ,
T0 &&  t0,
T1 &&  t1 
)
constexpr

Return the tensor resulting from the tensor product operation over the given index positions.

◆ operate() [3/3]

template<class Perm , class T , std::enable_if_t< Perm::size()==TensorTraits< T >::rank, int > = 0>
constexpr auto Dune::ACFem::Tensor::operate ( Expressions::DontOptimize  ,
OperationTraits< TransposeOperation< Perm > >  ,
T &&  t 
)
constexpr

Return the tensor resulting from the given transposition operation.

◆ operator[]()

template<class Tensor , std::size_t... IndexPositions, std::size_t... PivotIndices>
auto Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq< PivotIndices... > >::operator[] ( std::size_t  i) const
inline

Implement kind of a nested vector interface via operator[].

Parameters
iThe index to look at.
Returns
A dynamic restriction tensor which looks at (PivotIndices, i).

◆ Restriction() [1/4]

template<class Tensor , std::size_t... IndexPositions>
template<class Arg , class T , std::enable_if_t<(std::is_constructible< ArgType, Arg >::value &&IsTupleLike< T >::value &&size< T >()==sizeof...(IndexPositions) &&IsIntegralTuple< T >::value), int > = 0>
Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::Restriction ( Arg &&  host,
const T &  tuple 
)
inline

Constructor from a given tuple-like index collection.

Parameters
[in]hostThe host tensor providing the data.
[in]tupleA tuple-like index collection defining the sub-tensor to lookAt(). The size of the tuple must match the number of "defect" indices.

◆ Restriction() [2/4]

template<class Tensor , std::size_t... IndexPositions>
template<class Arg , class T , std::size_t N, std::enable_if_t<(std::is_constructible< ArgType, Arg >::value &&IsTupleLike< T >::value &&(N==sizeof...(IndexPositions)||N==0) &&std::is_integral< T >::value), int > = 0>
Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::Restriction ( Arg &&  host,
const T(&)  t[N] 
)
inline

Constructor from a given C-array index collection.

Parameters
[in]hostThe host tensor providing the data.
[in]tupleA tuple-like index collection defining the sub-tensor to lookAt(). The size of the tuple must match the number of "defect" indices.

◆ Restriction() [3/4]

template<class Tensor , std::size_t... IndexPositions>
template<class Arg , std::size_t... Pivots, std::enable_if_t<(std::is_constructible< ArgType, Arg >::value &&sizeof...(Pivots) !=0), int > = 0>
Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::Restriction ( Arg &&  host,
IndexSequence< Pivots... >   
)
inline

Constructor from a given index sequence.

Parameters
[in]hostThe host tensor providing the data.
[in]pivotsThe pivot index sequence.

◆ Restriction() [4/4]

template<class Tensor , std::size_t... IndexPositions>
template<class Arg , class... Indices, std::enable_if_t<(std::is_constructible< ArgType, Arg >::value &&sizeof...(Indices) !=0 &&sizeof...(Indices)==sizeof...(IndexPositions) &&IsIntegralPack< Indices... >::value), int > = 0>
Dune::ACFem::Tensor::Restriction< Tensor, Seq< IndexPositions... >, Seq<> >::Restriction ( Arg &&  host,
Indices...  indices 
)
inline

Constructor from a given index pack of lookAt() indices.

Parameters
[in]hostThe host tensor providing the data.
[in]indicesA pack of indices defining the current lookAt() sub-tensor.

◆ transpose()

template<std::size_t... Perm, class T , std::enable_if_t<(sizeof(transpose< Perm... >(operandPromotion< 0 >(std::declval< T >()))) >=0), int > = 0>
constexpr decltype(auto) Dune::ACFem::Tensor::transpose ( T &&  t,
Seq< Perm... >  = Seq<Perm...>{} 
)
constexpr

Promote operands to tensor transposition operation.

Generator function for Transposition class.

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