Namespaces | Typedefs | Variables
Metafunctions.hpp File Reference

Defines metafunctions used by Tensor. More...

#include "DataStructures/Tensor/IndexType.hpp"
#include "Utilities/TMPL.hpp"

Go to the source code of this file.

Namespaces

 TensorMetafunctions
 Contains all metafunctions related to Tensor manipulations.
 

Typedefs

template<typename Symm , typename... IndexPack>
using TensorMetafunctions::check_index_symmetry = 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 that each of symmetric indices is in the same frame and have the same dimensionality.
 
template<typename Tensor , std::size_t VolumeDim, UpLo Ul, typename Fr = Frame::Grid>
using TensorMetafunctions::prepend_spatial_index = ::Tensor< typename Tensor::type, tmpl::push_front< typename Tensor::symmetry, tmpl::int32_t< 1+tmpl::fold< typename Tensor::symmetry, tmpl::int32_t< 0 >, tmpl::max< tmpl::_state, tmpl::_element > >::value > >, tmpl::push_front< typename Tensor::index_list, SpatialIndex< VolumeDim, Ul, Fr > >>
 Add a spatial index to the front of a Tensor. More...
 
template<typename Tensor , std::size_t VolumeDim, UpLo Ul, typename Fr = Frame::Grid>
using TensorMetafunctions::prepend_spacetime_index = ::Tensor< typename Tensor::type, tmpl::push_front< typename Tensor::symmetry, tmpl::int32_t< 1+tmpl::fold< typename Tensor::symmetry, tmpl::int32_t< 0 >, tmpl::max< tmpl::_state, tmpl::_element > >::value > >, tmpl::push_front< typename Tensor::index_list, SpacetimeIndex< VolumeDim, Ul, Fr > >>
 Add a spacetime index to the front of a Tensor. More...
 
template<typename Tensor >
using TensorMetafunctions::remove_first_index = ::Tensor< typename Tensor::type, tmpl::pop_front< typename Tensor::symmetry >, tmpl::pop_front< typename Tensor::index_list > >
 remove the first index of a tensor More...
 
template<typename NewType , typename Tensor >
using TensorMetafunctions::swap_type = ::Tensor< NewType, typename Tensor::symmetry, typename Tensor::index_list >
 Swap the data type of a tensor for a new type. More...
 

Variables

template<typename Symm , typename... IndexPack>
constexpr bool TensorMetafunctions::check_index_symmetry_v
 

Detailed Description

Defines metafunctions used by Tensor.