Public Types | Static Public Attributes | List of all members
TensorIndex< I, > Struct Template Reference

Represents the geeric indices in a TensorExpression. More...

#include <TensorIndex.hpp>

Public Types

using value_type = std::size_t
 
using type = TensorIndex< I >
 

Static Public Attributes

static constexpr value_type value = I
 
static constexpr UpLo valence
 
static constexpr bool is_spacetime
 

Detailed Description

template<std::size_t I, Requires<(I< TensorExpressions::TensorIndex_detail::max_sentinel)> = nullptr>
struct TensorIndex< I, >

Represents the geeric indices in a TensorExpression.

Details

Used to denote a tensor index in a tensor slot. This allows the following type of expressions to work:

auto T = evaluate<ti_a, ti_b>(F(ti_a, ti_b) + S(ti_b, ti_a));

where decltype(ti_a) == TensorIndex<0> and decltype(ti_b) == TensorIndex<1>. That is, ti_a and ti_b are placeholders for objects of type TensorIndex<0> and TensorIndex<1>, respectively.

Member Data Documentation

◆ is_spacetime

template<std::size_t I, Requires<(I< TensorExpressions::TensorIndex_detail::max_sentinel)> = nullptr>
constexpr bool TensorIndex< I, >::is_spacetime
staticconstexpr
Initial value:
=
I < TensorExpressions::TensorIndex_detail::spatial_sentinel

◆ valence

template<std::size_t I, Requires<(I< TensorExpressions::TensorIndex_detail::max_sentinel)> = nullptr>
constexpr UpLo TensorIndex< I, >::valence
staticconstexpr
Initial value:
=
((I < TensorExpressions::TensorIndex_detail::upper_sentinel) or
(I >= TensorExpressions::TensorIndex_detail::spatial_sentinel and
I < TensorExpressions::TensorIndex_detail::upper_spatial_sentinel))
@ Up
Contravariant, or Upper index.
@ Lo
Covariant, or Lower index.

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