v0.14.0
Loading...
Searching...
No Matches
Functions
test_T2_08.cpp File Reference
#include "../../../src/FTensor.hpp"
#include "../test_for_zero.hpp"
#include <iostream>

Go to the source code of this file.

Functions

void test_T2_08 (const Tensor1< double, 3 > &t1_2)
 

Function Documentation

◆ test_T2_08()

void test_T2_08 ( const Tensor1< double, 3 > & t1_2)

Definition at line 7 of file test_T2_08.cpp.

8{
9 Index<'i', 3> i;
10
14
15 /* Tensor2 tests */
17
18 t2(i, N0) = t1_2(i);
19 t2(i, N1) = t1_2(i);
20 t2(i, N2) = t1_2(i);
21 test_for_zero(t2(0, 0) - t1_2(0), "T2(i,N)=T1(i)(0,0)");
22 test_for_zero(t2(0, 1) - t1_2(0), "T2(i,N)=T1(i)(0,1)");
23 test_for_zero(t2(0, 2) - t1_2(0), "T2(i,N)=T1(i)(0,2)");
24 test_for_zero(t2(1, 0) - t1_2(1), "T2(i,N)=T1(i)(1,0)");
25 test_for_zero(t2(1, 1) - t1_2(1), "T2(i,N)=T1(i)(1,1)");
26 test_for_zero(t2(1, 2) - t1_2(1), "T2(i,N)=T1(i)(1,2)");
27 test_for_zero(t2(2, 0) - t1_2(2), "T2(i,N)=T1(i)(2,0)");
28 test_for_zero(t2(2, 1) - t1_2(2), "T2(i,N)=T1(i)(2,1)");
29 test_for_zero(t2(2, 2) - t1_2(2), "T2(i,N)=T1(i)(2,2)");
30}
static Number< 2 > N2
static Number< 1 > N1
static Number< 0 > N0
FTensor::Index< 'i', SPACE_DIM > i
void test_for_zero(const T &t, const std::string &s)