SpECTRE  v2024.04.12
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< tenex::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< tenex::TensorIndex_detail::max_sentinel)> = nullptr>
constexpr bool TensorIndex< I, >::is_spacetime
staticconstexpr
Initial value:
=
I < tenex::TensorIndex_detail::spatial_sentinel

◆ valence

template<std::size_t I, Requires<(I< tenex::TensorIndex_detail::max_sentinel)> = nullptr>
constexpr UpLo TensorIndex< I, >::valence
staticconstexpr
Initial value:
=
((I < tenex::TensorIndex_detail::upper_sentinel) or
(I >= tenex::TensorIndex_detail::spatial_sentinel and
I < tenex::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: