v0.14.0
Functions
test_T2_29.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_29 (const Tensor2< double, 4, 3 > &t2_4, const Tensor2< double, 3, 4 > &t2_5)
 

Function Documentation

◆ test_T2_29()

void test_T2_29 ( const Tensor2< double, 4, 3 > &  t2_4,
const Tensor2< double, 3, 4 > &  t2_5 
)

Definition at line 7 of file test_T2_29.cpp.

9 {
13 
14  /* Tensor2 tests */
15 
16  /* Tensor2*Tensor2 */
18 
19  t2(j, k) = t2_4(i, j) * t2_5(k, i);
20  test_for_zero(t2(0, 0)
21  - (t2_4(0, 0) * t2_5(0, 0) + t2_4(1, 0) * t2_5(0, 1)
22  + t2_4(2, 0) * t2_5(0, 2) + t2_4(3, 0) * t2_5(0, 3)),
23  "T2(i,j)*T2(k,i)(0,0)");
24  test_for_zero(t2(0, 1)
25  - (t2_4(0, 0) * t2_5(1, 0) + t2_4(1, 0) * t2_5(1, 1)
26  + t2_4(2, 0) * t2_5(1, 2) + t2_4(3, 0) * t2_5(1, 3)),
27  "T2(i,j)*T2(k,i)(0,1)");
28  test_for_zero(t2(0, 2)
29  - (t2_4(0, 0) * t2_5(2, 0) + t2_4(1, 0) * t2_5(2, 1)
30  + t2_4(2, 0) * t2_5(2, 2) + t2_4(3, 0) * t2_5(2, 3)),
31  "T2(i,j)*T2(k,i)(0,2)");
32  test_for_zero(t2(1, 0)
33  - (t2_4(0, 1) * t2_5(0, 0) + t2_4(1, 1) * t2_5(0, 1)
34  + t2_4(2, 1) * t2_5(0, 2) + t2_4(3, 1) * t2_5(0, 3)),
35  "T2(i,j)*T2(k,i)(1,0)");
36  test_for_zero(t2(1, 1)
37  - (t2_4(0, 1) * t2_5(1, 0) + t2_4(1, 1) * t2_5(1, 1)
38  + t2_4(2, 1) * t2_5(1, 2) + t2_4(3, 1) * t2_5(1, 3)),
39  "T2(i,j)*T2(k,i)(1,1)");
40  test_for_zero(t2(1, 2)
41  - (t2_4(0, 1) * t2_5(2, 0) + t2_4(1, 1) * t2_5(2, 1)
42  + t2_4(2, 1) * t2_5(2, 2) + t2_4(3, 1) * t2_5(2, 3)),
43  "T2(i,j)*T2(k,i)(1,2)");
44  test_for_zero(t2(2, 0)
45  - (t2_4(0, 2) * t2_5(0, 0) + t2_4(1, 2) * t2_5(0, 1)
46  + t2_4(2, 2) * t2_5(0, 2) + t2_4(3, 2) * t2_5(0, 3)),
47  "T2(i,j)*T2(k,i)(2,0)");
48  test_for_zero(t2(2, 1)
49  - (t2_4(0, 2) * t2_5(1, 0) + t2_4(1, 2) * t2_5(1, 1)
50  + t2_4(2, 2) * t2_5(1, 2) + t2_4(3, 2) * t2_5(1, 3)),
51  "T2(i,j)*T2(k,i)(2,1)");
52  test_for_zero(t2(2, 2)
53  - (t2_4(0, 2) * t2_5(2, 0) + t2_4(1, 2) * t2_5(2, 1)
54  + t2_4(2, 2) * t2_5(2, 2) + t2_4(3, 2) * t2_5(2, 3)),
55  "T2(i,j)*T2(k,i)(2,2)");
56 }
FTensor::Tensor2< double, 3, 3 >
test_for_zero
void test_for_zero(const T &t, const std::string &s)
Definition: test_for_zero.hpp:7
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::Index
Definition: Index.hpp:23
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20