19 static constexpr int size_symm = (Dim * (Dim + 1)) / 2;
23 const auto hi = N0 > N1 ? N0 : N1;
24 const auto lo = N0 > N1 ? N1 : N0;
25 const auto packed = hi + (lo * (2 * Dim - lo - 1)) / 2;
29 template <
char i,
char j,
char k,
int Dim01,
int Dim2>
44template <
class T =
int,
int Dim>
49template <
class T =
int,
char i,
char j,
char k,
int Dim01,
int Dim2>
51 (Dim2 == (Dim01 * (Dim01 + 1)) / 2),
Mapping from symmetric tensor indices to packed storage index.
static constexpr int size_symm
typename promote< T, double >::V value_type
constexpr value_type operator()(const int N0, const int N1, const int N2) const
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
Tensors class implemented by Walter Landry.
constexpr auto symm_l_tensor()