DUNE-ACFEM (unstable)
Contraction of two tensor over a selection set of indices. More...
Public Member Functions | |
template<std::size_t... Indices, std::enable_if_t<(sizeof...(Indices)==rank &&ThisType::template isZero< Indices... >()), int > = 0> | |
auto constexpr | operator() (Seq< Indices... >) const |
Constant access from index-sequence. | |
template<std::size_t... Indices, std::enable_if_t<(sizeof...(Indices)==rank &&!ThisType::template isZero< Indices... >() &&multiDim(DefectSignature{}) >=0 &&multiDim(DefectSignature{})<=Policy::TemplateForEachLimit::value), int > = 0> | |
auto constexpr | operator() (Seq< Indices... >) const |
Constant access from index-sequence. | |
template<std::size_t... Indices, std::enable_if_t<(sizeof...(Indices)==rank &&!ThisType::template isZero< Indices... >() &&multiDim(DefectSignature{}) > Policy::TemplateForEachLimit::value), int > = 0> | |
auto constexpr | operator() (Seq< Indices... >) const |
Constant access from index-sequence. | |
template<std::size_t I, std::enable_if_t<!emitByValue_< I >, int > = 0> | |
OperandType< I > && | operand (IndexConstant< I >=IndexConstant< I >{}) && |
Return one of the stored operands in an rvalue context. More... | |
template<std::size_t I, std::enable_if_t<!emitByValue_< I >, int > = 0> | |
decltype(auto) | operand (IndexConstant< I >=IndexConstant< I >{}) & |
Return one of the stored operands in a mutable reference context. More... | |
template<std::size_t I, std::enable_if_t<!emitByValue_< I >, int > = 0> | |
decltype(auto) | operand (IndexConstant< I >=IndexConstant< I >{}) const & |
Return one of the stored operands in a const reference context. More... | |
Static Public Attributes | |
template<std::size_t I> | |
static constexpr bool | emitByValue_ = EmitByValueV<OperandType<I> > |
Force some things to always be emitted as non-references. | |
Detailed Description
class Dune::ACFem::Tensor::EinsteinSummation< LeftTensor, LeftIndices, RightTensor, RightIndices, IdenticalOperands >
Contraction of two tensor over a selection set of indices.
The fancy name refers to ommitting the sum symbols in tensor contraction formulas (Einstein convention).
In formulars, compute the component-wise product "*[i][j]" over selected indices:
\[ (A *[i][j] B)_{a0,a1,b0,b1} := \sum_{i} A_{a0,i,a1} B_{b0,i,b1} := A_{a0,i,a1} B_{b0,i,b1} \]
Here all indices are to be understood as (possibly empty) multi-indices. If is empty then the resulting tensor is just the dyadic product of A with B.
- Parameters
-
LeftTensor Left operand. LeftIndices The positions of the contraction indices of the left operand. RightTensor Right operand. RightIndices The positions of the contraction indices of the right operand.
Member Function Documentation
◆ operand() [1/3]
|
inlineinherited |
Return one of the stored operands in a mutable reference context.
In this case we assume that it is safe to return a reference as the storage container should be alive in a real object.
As a special exception operands for which IsTypedValue evaluates to std::true_type are always returned as copy. It is assumed that those do not contain any runtime information.
◆ operand() [2/3]
|
inlineinherited |
Return one of the stored operands in an rvalue context.
In this case exactly the contained type is returned, i.e. a copy for objects or a reference for references.
As a special exception operands for which IsTypedValue evaluates to std::true_type are always returned as copy. It is assumed that those do not contain any runtime information.
◆ operand() [3/3]
|
inlineinherited |
Return one of the stored operands in a const reference context.
In this case we assume that it is safe to return a reference as the storage container should be alive in a real object.
As a special exception operands for which IsTypedValue evaluates to std::true_type are always returned as copy. It is assumed that those do not contain any runtime information.
The documentation for this class was generated from the following file:
- dune/acfem/tensors/operations/einsum.hh