SpECTRE  v2026.04.01
Loading...
Searching...
No Matches
TestHelpers::tenex Namespace Reference

Functions for testing TensorExpressions. More...

Classes

struct  component_placeholder_value
struct  component_placeholder_value< ComplexDataVector >
struct  component_placeholder_value< DataVector >
struct  component_placeholder_value< double >
struct  component_placeholder_value< std::complex< double > >

Functions

template<typename DataType>
void test_evaluate_rank_0 ()
 Test that evaluating a right hand side tensor expression containing a single rank 0 tensor correctly assigns the data to the evaluated left hand side tensor.
template<bool ReturnLhsTensor, typename DataType, typename RhsTensorIndexTypeList, auto & TensorIndex, typename LhsTensorIndexTypeList = RhsTensorIndexTypeList>
void test_evaluate_rank_1_impl ()
 Test that evaluating a right hand side tensor expression containing a single rank 1 tensor correctly assigns the data to the evaluated left hand side tensor.
template<bool ReturnLhsTensor, typename DataType, typename RhsIndexTypeList, auto & TensorIndex, typename Frame, typename LhsIndexTypeList = RhsIndexTypeList>
void test_evaluate_rank_1 ()
 Iterate testing of evaluating single rank 1 Tensors on multiple dimensions.
template<bool ReturnLhsTensor, typename DataType, typename RhsSymmetry, typename RhsTensorIndexTypeList, auto & TensorIndexA, auto & TensorIndexB, typename LhsSymmetry = RhsSymmetry, typename LhsTensorIndexTypeList = RhsTensorIndexTypeList>
void test_evaluate_rank_2_impl ()
 Test that evaluating a right hand side tensor expression containing a single rank 2 tensor correctly assigns the data to the evaluated left hand side tensor.
template<bool ReturnLhsTensor, typename DataType, typename RhsSymmetry, typename RhsIndexTypeList, auto & TensorIndexA, auto & TensorIndexB, typename Frame, typename LhsSymmetry = RhsSymmetry, typename LhsIndexTypeList = RhsIndexTypeList, Requires< std::is_same_v< RhsSymmetry, Symmetry< 2, 1 > > > = nullptr>
void test_evaluate_rank_2 ()
 Iterate testing of evaluating single rank 2 Tensors on multiple dimension combinations.
template<bool ReturnLhsTensor, typename DataType, typename RhsSymmetry, typename RhsIndexTypeList, auto & TensorIndexA, auto & TensorIndexB, typename Frame, typename LhsSymmetry = RhsSymmetry, typename LhsIndexTypeList = RhsIndexTypeList, Requires< std::is_same_v< RhsSymmetry, Symmetry< 1, 1 > > > = nullptr>
void test_evaluate_rank_2 ()
template<bool ReturnLhsTensor, typename DataType, typename RhsSymmetry, typename RhsTensorIndexTypeList, auto & TensorIndexA, auto & TensorIndexB, auto & TensorIndexC, typename LhsSymmetry = RhsSymmetry, typename LhsTensorIndexTypeList = RhsTensorIndexTypeList>
void test_evaluate_rank_3_impl ()
 Test that evaluating a right hand side tensor expression containing a single rank 3 tensor correctly assigns the data to the evaluated left hand side tensor.
template<bool ReturnLhsTensor, typename DataType, typename RhsSymmetry, typename RhsIndexTypeList, auto & TensorIndexA, auto & TensorIndexB, auto & TensorIndexC, typename Frame, typename LhsSymmetry = RhsSymmetry, typename LhsIndexTypeList = RhsIndexTypeList, Requires< std::is_same_v< RhsSymmetry, Symmetry< 3, 2, 1 > > > = nullptr>
void test_evaluate_rank_3 ()
 Iterate testing of evaluating single rank 3 Tensors on multiple dimension combinations.
template<bool ReturnLhsTensor, typename DataType, typename RhsSymmetry, typename RhsIndexTypeList, auto & TensorIndexA, auto & TensorIndexB, auto & TensorIndexC, typename Frame, typename LhsSymmetry = RhsSymmetry, typename LhsIndexTypeList = RhsIndexTypeList, Requires< std::is_same_v< RhsSymmetry, Symmetry< 2, 2, 1 > > > = nullptr>
void test_evaluate_rank_3 ()
template<bool ReturnLhsTensor, typename DataType, typename RhsSymmetry, typename RhsIndexTypeList, auto & TensorIndexA, auto & TensorIndexB, auto & TensorIndexC, typename Frame, typename LhsSymmetry = RhsSymmetry, typename LhsIndexTypeList = RhsIndexTypeList, Requires< std::is_same_v< RhsSymmetry, Symmetry< 1, 2, 1 > > > = nullptr>
void test_evaluate_rank_3 ()
template<bool ReturnLhsTensor, typename DataType, typename RhsSymmetry, typename RhsIndexTypeList, auto & TensorIndexA, auto & TensorIndexB, auto & TensorIndexC, typename Frame, typename LhsSymmetry = RhsSymmetry, typename LhsIndexTypeList = RhsIndexTypeList, Requires< std::is_same_v< RhsSymmetry, Symmetry< 2, 1, 1 > > > = nullptr>
void test_evaluate_rank_3 ()
template<bool ReturnLhsTensor, typename DataType, typename RhsSymmetry, typename RhsIndexTypeList, auto & TensorIndexA, auto & TensorIndexB, auto & TensorIndexC, typename Frame, typename LhsSymmetry = RhsSymmetry, typename LhsIndexTypeList = RhsIndexTypeList, Requires< std::is_same_v< RhsSymmetry, Symmetry< 1, 1, 1 > > > = nullptr>
void test_evaluate_rank_3 ()
template<bool ReturnLhsTensor, typename DataType, typename RhsSymmetry, typename RhsTensorIndexTypeList, auto & TensorIndexA, auto & TensorIndexB, auto & TensorIndexC, auto & TensorIndexD, typename LhsSymmetry = RhsSymmetry, typename LhsTensorIndexTypeList = RhsTensorIndexTypeList>
void test_evaluate_rank_4 ()
 Test that evaluating a right hand side tensor expression containing a single rank 4 tensor correctly assigns the data to the evaluated left hand side tensor.
void test_tensor_index_transformation_rank_0 ()
 Test that the transformation between two rank 0 tensors' generic indices and the subsequent transformed multi-index is correctly computed.
template<typename TensorIndex>
void test_tensor_index_transformation_rank_1 (const TensorIndex &)
 Test that the transformation between two rank 1 tensors' generic indices and the subsequent transformed multi-indices are correctly computed.
template<typename TensorIndexA, typename TensorIndexB>
void test_tensor_index_transformation_rank_2 (const TensorIndexA &, const TensorIndexB &)
 Test that the transformation between two rank 2 tensors' generic indices and the subsequent transformed multi-indices are correctly computed.
template<typename TensorIndexA, typename TensorIndexB, typename TensorIndexC>
void test_tensor_index_transformation_rank_3 (const TensorIndexA &, const TensorIndexB &, const TensorIndexC &)
 Test that the transformation between two rank 3 tensors' generic indices and the subsequent transformed multi-indices are correctly computed.
template<typename TensorIndexA, typename TensorIndexB, typename TensorIndexC, typename TensorIndexD>
void test_tensor_index_transformation_rank_4 (const TensorIndexA &, const TensorIndexB &, const TensorIndexC &, const TensorIndexD &)
 Test that the transformation between two rank 4 tensors' generic indices and the subsequent transformed multi-indices are correctly computed.
void test_tensor_index_transformation_with_time_indices ()
 Test that the transformation between two tensors generic indices and the subsequent transformed multi-indices are correctly computed when time indices are used with at least one of the tensors.
template<bool ReturnLhsTensor, auto &... LhsTensorIndices, typename LhsTensor, typename RhsExpression>
void call_evaluate (const gsl::not_null< LhsTensor * > lhs_tensor, const RhsExpression &rhs_expression)
template<typename Index, auto & TensorIndex>
constexpr std::pair< size_t, size_t > get_index_value_range ()

Detailed Description

Functions for testing TensorExpressions.