Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
IndexType.hpp File Reference

Defines classes representing tensor indices. More...

#include <cstddef>
#include <ostream>
#include <string>
#include <type_traits>
#include "Utilities/Literals.hpp"
#include "Utilities/TMPL.hpp"

Go to the source code of this file.

Classes

struct  Frame::FrameIsPhysical
 Marks a Frame as being "physical" in the sense that it is meaningful to evaluate an analytic solution in that frame. More...
 
struct  Frame::Logical
 
struct  Frame::Grid
 
struct  Frame::Inertial
 
struct  Frame::Distorted
 
struct  Frame::NoFrame
 Represents an index that is not in a known frame, e.g. some internal intermediate frame that is irrelevant to the interface. More...
 
struct  Frame::Spherical< CartesianFrame >
 Represents a spherical-coordinate frame that is associated with a Cartesian frame, e.g. \((r,\theta,\phi)\) associated with the Inertial frame, as used on an apparent horizon or a wave-extraction surface. More...
 
struct  tt::is_tensor_index_type< T >
 Inherits from std::true_type if T is a TensorIndexType. More...
 

Namespaces

 Frame
 Indicates the Frame that a TensorIndexType is in.
 
 tt
 A collection of useful type traits.
 

Typedefs

template<typename CheckFrame >
using Frame::is_frame_physical = std::integral_constant< bool, std::is_base_of< FrameIsPhysical, CheckFrame >::value >
 Returns std::true_type if the frame is "physical" in the sense that it is meaningful to evaluate an analytic solution in that frame. More...
 
template<size_t SpatialDim, UpLo Ul, typename Fr >
using SpatialIndex = Tensor_detail::TensorIndexType< SpatialDim, Ul, Fr, IndexType::Spatial >
 A SpatialIndex holds information about the number of spatial dimensions, whether the index is covariant or contravariant (UpLo), and the Frame the index is in. More...
 
template<size_t SpatialDim, UpLo Ul, typename Fr >
using SpacetimeIndex = Tensor_detail::TensorIndexType< SpatialDim, Ul, Fr, IndexType::Spacetime >
 A SpacetimeIndex holds information about the number of spatial dimensions, whether the index is covariant or contravariant (UpLo), and the Frame the index is in. More...
 
template<typename Index >
using change_index_up_lo = Tensor_detail::TensorIndexType< Index::index_type==IndexType::Spatial ? Index::value :Index::value - 1, Index::ul==UpLo::Up ? UpLo::Lo :UpLo::Up, typename Index::Frame, Index::index_type >
 Change the TensorIndexType to be covariant if it's contravariant and vice-versa. More...
 
template<typename... Ts>
using index_list = tmpl::list< Ts... >
 
template<typename T >
using tt::is_tensor_index_type_t = typename is_tensor_index_type< T >::type
 

Enumerations

enum  UpLo { UpLo::Up, UpLo::Lo }
 Whether a TensorIndexType is covariant or contravariant. More...
 
enum  IndexType : char { IndexType::Spatial, IndexType::Spacetime }
 Indicates whether the TensorIndexType is Spatial or Spacetime. More...
 

Functions

template<typename Fr >
std::string Frame::prefix () noexcept
 The frame-dependent prefix used when constructing the string returned by the name function of a tag. More...
 

Variables

template<typename CheckFrame >
constexpr bool Frame::is_frame_physical_v = is_frame_physical<CheckFrame>::value
 Returns true if the frame is "physical" in the sense that it is meaningful to evaluate an analytic solution in that frame. More...
 

Detailed Description

Defines classes representing tensor indices.