|
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 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...
|
|
template<std::int32_t... T> |
using | Symmetry = typename detail::SymmetryImpl< std::make_index_sequence< sizeof...(T)>, tmpl::integral_list< std::int32_t, T... > >::type |
| Computes the canonical symmetry from the integers T More...
|
|
template<typename T > |
using | Scalar = Tensor< T, Symmetry<>, index_list<> > |
| Scalar type.
|
|
|
template<typename DataType , typename Index > |
Tensor< DataType, Symmetry< 1 >, index_list< Index > > | cross_product (const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector_a, const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector_b) noexcept |
| Compute the Euclidean cross product of two vectors or one forms. More...
|
|
template<typename DataType , typename Index > |
Tensor< DataType, Symmetry< 1 >, index_list< change_index_up_lo< Index > > > | cross_product (const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector_a, const Tensor< DataType, Symmetry< 1 >, index_list< change_index_up_lo< Index >>> &vector_b) noexcept |
| Compute the Euclidean cross product of a vector and a one form. More...
|
|
template<typename DataType , typename Index > |
Tensor< DataType, Symmetry< 1 >, index_list< Index > > | cross_product (const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector_a, const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector_b, const Tensor< DataType, Symmetry< 1, 1 >, index_list< Index, Index >> &metric_or_inverse_metric, const Scalar< DataType > &metric_determinant) noexcept |
| Compute the cross product of two vectors or one forms. More...
|
|
template<typename DataType , typename Index > |
Tensor< DataType, Symmetry< 1 >, index_list< change_index_up_lo< Index > > > | cross_product (const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector_a, const Tensor< DataType, Symmetry< 1 >, index_list< change_index_up_lo< Index >>> &vector_b, const Tensor< DataType, Symmetry< 1, 1 >, index_list< Index, Index >> &metric_or_inverse_metric, const Scalar< DataType > &metric_determinant) noexcept |
| Compute the cross product of a vector and a one form. More...
|
|
template<typename T , typename Symm , typename Index0 , typename Index1 > |
Scalar< T > | determinant (const Tensor< T, Symm, index_list< Index0, Index1 >> &tensor) |
| Computes the determinant of a rank-2 Tensor tensor . More...
|
|
template<typename T , typename Symm , typename Index0 , typename Index1 > |
auto | determinant_and_inverse (const Tensor< T, Symm, tmpl::list< Index0, Index1 >> &tensor) noexcept -> std::pair< Scalar< T >, Tensor< T, Symm, tmpl::list< change_index_up_lo< Index1 >, change_index_up_lo< Index0 >>>> |
| Computes the determinant and inverse of a rank-2 Tensor. More...
|
|
template<typename TensorType > |
TensorType | divide_by (TensorType tensor, const DataVector &divisor) |
| Divides the components of a tensor by a scalar. More...
|
|
template<typename DataType , typename Index > |
Scalar< DataType > | magnitude (const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector) noexcept |
| Compute the Euclidean magnitude of a rank-1 tensor. More...
|
|
template<typename DataType , typename Index > |
Scalar< DataType > | magnitude (const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector, const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index >, change_index_up_lo< Index >>> &metric) noexcept |
| Compute the magnitude of a rank-1 tensor. More...
|
|
template<size_t Dim, typename DataType > |
tnsr::Ij< DataType, Dim, Frame::NoFrame > | identity (const DataType &used_for_type) noexcept |
| returns the Identity matrix
|
|
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...
|
|
template<int I, class... Ts> |
constexpr size_t | index_dim (const Tensor< Ts... > &) noexcept |
| Get dimensionality of i'th tensor index. More...
|
|
|
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...
|
|
template<typename DataType , typename Index > |
void | dot_product (const gsl::not_null< Scalar< DataType > *> dot_product, const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector_a, const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector_b) noexcept |
| Compute the Euclidean dot product of two vectors or one forms. More...
|
|
template<typename DataType , typename Index > |
Scalar< DataType > | dot_product (const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector_a, const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector_b) noexcept |
| Compute the Euclidean dot product of two vectors or one forms. More...
|
|
template<typename DataType , typename Index > |
void | dot_product (const gsl::not_null< Scalar< DataType > *> dot_product, const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector_a, const Tensor< DataType, Symmetry< 1 >, index_list< change_index_up_lo< Index >>> &vector_b) noexcept |
| Compute the dot product of a vector and a one form. More...
|
|
template<typename DataType , typename Index > |
Scalar< DataType > | dot_product (const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector_a, const Tensor< DataType, Symmetry< 1 >, index_list< change_index_up_lo< Index >>> &vector_b) noexcept |
| Compute the dot product of a vector and a one form. More...
|
|
template<typename DataType , typename Index > |
void | dot_product (const gsl::not_null< Scalar< DataType > *> dot_product, const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector_a, const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector_b, const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index >, change_index_up_lo< Index >>> &metric) noexcept |
| Compute the dot_product of two vectors or one forms. More...
|
|
template<typename DataType , typename Index > |
Scalar< DataType > | dot_product (const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector_a, const Tensor< DataType, Symmetry< 1 >, index_list< Index >> &vector_b, const Tensor< DataType, Symmetry< 1, 1 >, index_list< change_index_up_lo< Index >, change_index_up_lo< Index >>> &metric) noexcept |
| Compute the dot_product of two vectors or one forms. More...
|
|
Tensor use documentation.
template<typename DataType , typename Index >
Tensor<DataType, Symmetry<1>, index_list<Index> > cross_product |
( |
const Tensor< DataType, Symmetry< 1 >, index_list< Index >> & |
vector_a, |
|
|
const Tensor< DataType, Symmetry< 1 >, index_list< Index >> & |
vector_b, |
|
|
const Tensor< DataType, Symmetry< 1, 1 >, index_list< Index, Index >> & |
metric_or_inverse_metric, |
|
|
const Scalar< DataType > & |
metric_determinant |
|
) |
| |
|
noexcept |
Compute the cross product of two vectors or one forms.
Details
Returns \(\sqrt{g} g^{li} A^j B^k \epsilon_{ljk}\), where \(A^j\) and \(B^k\) are vectors and \(g^{li}\) and \(g\) are the inverse and determinant, respectively, of the spatial metric (computed via determinant_and_inverse
). In this case, the arguments vector_a
and vector_b
should be vectors, the argument metric_or_inverse_metric
should be the inverse spatial metric \(g^{ij}\), and the argument metric_determinant
should be the determinant of the spatial metric \(\det(g_{ij})\). Or, returns \(\sqrt{g}^{-1} g_{li} A_j B_k \epsilon^{ljk}\), where \(A_j\) and \(B_k\) are one forms and \(g_{li}\) and \(g\) are the spatial metric and its determinant. In this case, the arguments vector_a
and vector_b
should be one forms, the argument metric_or_inverse_metric
should be the spatial metric \(g_{ij}\), and the argument metric_determinant
should be the determinant of the spatial metric \(\det(g_{ij})\).