SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
TensorMetafunctions Namespace Reference

Contains all metafunctions related to Tensor manipulations. More...

Classes

struct  replace_frame_in_tag
 Replaces Tag with an equivalent Tag but in frame NewFrame. More...
struct  replace_frame_in_tag< ::Tags::deriv< Tag< DataType >, tmpl::size_t< Dim >, Frame >, NewFrame >
struct  replace_frame_in_tag< ::Tags::deriv< Tag< DataType, Dim, Frame >, tmpl::size_t< Dim >, Frame >, NewFrame >
struct  replace_frame_in_tag< Tag< DataType >, NewFrame >
struct  replace_frame_in_tag< Tag< DataType, Dim, Frame >, NewFrame >
struct  replace_frame_in_tag< Tag< Dim, SrcFrame, TargetFrame >, NewTargetFrame >

Typedefs

template<typename Symm, typename... IndexPack>
using check_index_symmetry
 Check that each of symmetric indices is in the same frame and have the same dimensionality.
template<typename TheTensor, std::size_t VolumeDim, UpLo Ul, typename Fr>
using prepend_spatial_index
 Add a spatial index to the front of a Tensor.
template<typename TheTensor, std::size_t VolumeDim, UpLo Ul, typename Fr>
using prepend_two_symmetric_spatial_indices
 Add two symmetric spatial indices to the front of a Tensor (e.g. when doing second derivatives)
template<typename TheTensor, std::size_t VolumeDim, UpLo Ul, typename Fr>
using prepend_spacetime_index
 Add a spacetime index to the front of a Tensor.
template<typename TheTensor>
using remove_first_index
 remove the first index of a tensor
template<typename TheTensor>
using change_all_valences
 Swap the valences of all indices on a Tensor.
template<typename NewType, typename TheTensor>
using swap_type
 Swap the data type of a tensor for a new type.
template<typename TheTensor, typename Frame>
using any_index_in_frame
 Return tmpl::true_type if any indices of the Tensor are in the frame Frame.
template<typename Tag, typename NewFrame>
using replace_frame_in_tag_t
 Replaces Tag with an equivalent Tag but in frame NewFrame.
template<typename TagList, typename NewFrame>
using replace_frame_in_taglist
 Replaces every Tag in Taglist with an equivalent Tag but in frame NewFrame.

Variables

template<typename Symm, typename... IndexPack>
constexpr bool check_index_symmetry_v
template<typename TheTensor, typename Frame>
constexpr bool any_index_in_frame_v
 Return true if any indices of the Tensor are in the frame Frame.

Detailed Description

Contains all metafunctions related to Tensor manipulations.

Variable Documentation

◆ check_index_symmetry_v

template<typename Symm, typename... IndexPack>
bool TensorMetafunctions::check_index_symmetry_v
constexpr
Initial value:
=
check_index_symmetry<Symm, IndexPack...>::value
typename detail::check_index_symmetry_impl< tmpl::size< Symm >::value==0 or tmpl::size< Symm >::value==1 ? 0 :2 >:: template f< Symm, tmpl::map<>, IndexPack... > check_index_symmetry
Check that each of symmetric indices is in the same frame and have the same dimensionality.
Definition Metafunctions.hpp:71
constexpr T & value(T &t)
Returns t.value() if t is a std::optional otherwise returns t.
Definition OptionalHelpers.hpp:32