|
SpECTRE
2021.08.02
|
Defines an expression representing a Tensor. More...
Defines an expression representing a Tensor.
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.
| T | the type of Tensor being represented as an expression |
| ArgsList | the tensor indices, e.g. _a and _b in F(_a, _b) |