SpECTRE  v2024.04.12
tenex::TensorAsExpression< T, ArgsList > Struct Template Reference

Defines an expression representing a Tensor. More...

Detailed Description

template<typename T, typename ArgsList>
struct tenex::TensorAsExpression< T, ArgsList >

Defines an expression representing a Tensor.

Details

In order to represent a tensor as an expression, instead of having Tensor derive off of TensorExpression, a TensorAsExpression derives off of TensorExpression and contains a pointer to a Tensor. The reason having Tensor derive off of TensorExpression is problematic is that the index structure is part of the type of the TensorExpression, so every possible permutation and combination of indices must be derived from. For a rank 3 tensor, this is already over 500 base classes, which the Intel compiler takes too long to compile.

For details on aliases and members defined in this class, as well as general TensorExpression terminology used in its members' documentation, see documentation for TensorExpression.

Template Parameters
Tthe type of Tensor being represented as an expression
ArgsListthe tensor indices, e.g. _a and _b in F(_a, _b)

The documentation for this struct was generated from the following file: