v0.14.0
Functions
test_T3dg_19.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_T3dg_19 (const Tensor1< double, 3 > &t1_2, Tensor2< double, 3, 3 > &t2_1, const Dg< double, 3, 3 > &t3dg_2, const Dg< double, 3, 3 > &t3dg_3)
 

Function Documentation

◆ test_T3dg_19()

void test_T3dg_19 ( const Tensor1< double, 3 > &  t1_2,
Tensor2< double, 3, 3 > &  t2_1,
const Dg< double, 3, 3 > &  t3dg_2,
const Dg< double, 3, 3 > &  t3dg_3 
)

Definition at line 7 of file test_T3dg_19.cpp.

10 {
14 
15  Number<0> N0;
16  Number<1> N1;
17  Number<2> N2;
18 
19  /* Dg tests */
20 
21  t2_1(i, j) = t3dg_2(k, i, j) * t1_2(k);
22  test_for_zero(t2_1(0, 0)
23  - (t3dg_2(0, 0, 0) * t1_2(0) + t3dg_2(1, 0, 0) * t1_2(1)
24  + t3dg_2(2, 0, 0) * t1_2(2)),
25  "T3dg(k,i,j)*T1(k)(0,0)");
26  test_for_zero(t2_1(0, 1)
27  - (t3dg_2(0, 0, 1) * t1_2(0) + t3dg_2(1, 0, 1) * t1_2(1)
28  + t3dg_2(2, 0, 1) * t1_2(2)),
29  "T3dg(k,i,j)*T1(k)(0,1)");
30  test_for_zero(t2_1(0, 2)
31  - (t3dg_2(0, 0, 2) * t1_2(0) + t3dg_2(1, 0, 2) * t1_2(1)
32  + t3dg_2(2, 0, 2) * t1_2(2)),
33  "T3dg(k,i,j)*T1(k)(0,2)");
34  test_for_zero(t2_1(1, 0)
35  - (t3dg_2(0, 1, 0) * t1_2(0) + t3dg_2(1, 1, 0) * t1_2(1)
36  + t3dg_2(2, 1, 0) * t1_2(2)),
37  "T3dg(k,i,j)*T1(k)(1,0)");
38  test_for_zero(t2_1(1, 1)
39  - (t3dg_2(0, 1, 1) * t1_2(0) + t3dg_2(1, 1, 1) * t1_2(1)
40  + t3dg_2(2, 1, 1) * t1_2(2)),
41  "T3dg(k,i,j)*T1(k)(1,1)");
42  test_for_zero(t2_1(1, 2)
43  - (t3dg_2(0, 1, 2) * t1_2(0) + t3dg_2(1, 1, 2) * t1_2(1)
44  + t3dg_2(2, 1, 2) * t1_2(2)),
45  "T3dg(k,i,j)*T1(k)(1,2)");
46  test_for_zero(t2_1(2, 0)
47  - (t3dg_2(0, 2, 0) * t1_2(0) + t3dg_2(1, 2, 0) * t1_2(1)
48  + t3dg_2(2, 2, 0) * t1_2(2)),
49  "T3dg(k,i,j)*T1(k)(2,0)");
50  test_for_zero(t2_1(2, 1)
51  - (t3dg_2(0, 2, 1) * t1_2(0) + t3dg_2(1, 2, 1) * t1_2(1)
52  + t3dg_2(2, 2, 1) * t1_2(2)),
53  "T3dg(k,i,j)*T1(k)(2,1)");
54  test_for_zero(t2_1(2, 2)
55  - (t3dg_2(0, 2, 2) * t1_2(0) + t3dg_2(1, 2, 2) * t1_2(1)
56  + t3dg_2(2, 2, 2) * t1_2(2)),
57  "T3dg(k,i,j)*T1(k)(2,2)");
58 
59  t2_1(i, j) = t1_2(k) * t3dg_3(k, i, j);
60  test_for_zero(t2_1(0, 0)
61  - (t3dg_3(0, 0, 0) * t1_2(0) + t3dg_3(1, 0, 0) * t1_2(1)
62  + t3dg_3(2, 0, 0) * t1_2(2)),
63  "T1(k)*T3dg(k,i,j)(0,0)");
64  test_for_zero(t2_1(0, 1)
65  - (t3dg_3(0, 0, 1) * t1_2(0) + t3dg_3(1, 0, 1) * t1_2(1)
66  + t3dg_3(2, 0, 1) * t1_2(2)),
67  "T1(k)*T3dg(k,i,j)(0,1)");
68  test_for_zero(t2_1(0, 2)
69  - (t3dg_3(0, 0, 2) * t1_2(0) + t3dg_3(1, 0, 2) * t1_2(1)
70  + t3dg_3(2, 0, 2) * t1_2(2)),
71  "T1(k)*T3dg(k,i,j)(0,2)");
72  test_for_zero(t2_1(1, 0)
73  - (t3dg_3(0, 1, 0) * t1_2(0) + t3dg_3(1, 1, 0) * t1_2(1)
74  + t3dg_3(2, 1, 0) * t1_2(2)),
75  "T1(k)*T3dg(k,i,j)(1,0)");
76  test_for_zero(t2_1(1, 1)
77  - (t3dg_3(0, 1, 1) * t1_2(0) + t3dg_3(1, 1, 1) * t1_2(1)
78  + t3dg_3(2, 1, 1) * t1_2(2)),
79  "T1(k)*T3dg(k,i,j)(1,1)");
80  test_for_zero(t2_1(1, 2)
81  - (t3dg_3(0, 1, 2) * t1_2(0) + t3dg_3(1, 1, 2) * t1_2(1)
82  + t3dg_3(2, 1, 2) * t1_2(2)),
83  "T1(k)*T3dg(k,i,j)(1,2)");
84  test_for_zero(t2_1(2, 0)
85  - (t3dg_3(0, 2, 0) * t1_2(0) + t3dg_3(1, 2, 0) * t1_2(1)
86  + t3dg_3(2, 2, 0) * t1_2(2)),
87  "T1(k)*T3dg(k,i,j)(2,0)");
88  test_for_zero(t2_1(2, 1)
89  - (t3dg_3(0, 2, 1) * t1_2(0) + t3dg_3(1, 2, 1) * t1_2(1)
90  + t3dg_3(2, 2, 1) * t1_2(2)),
91  "T1(k)*T3dg(k,i,j)(2,1)");
92  test_for_zero(t2_1(2, 2)
93  - (t3dg_3(0, 2, 2) * t1_2(0) + t3dg_3(1, 2, 2) * t1_2(1)
94  + t3dg_3(2, 2, 2) * t1_2(2)),
95  "T1(k)*T3dg(k,i,j)(2,2)");
96 }
FTensor::Number< 0 >
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< 'i', 3 >
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20