v0.14.0
Functions
test_T3dg_17.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_17 (const Tensor1< double, 3 > &t1_2, Tensor2_symmetric< double, 3 > &t2s_1, const Dg< double, 3, 3 > &t3dg_2, const Dg< double, 3, 3 > &t3dg_3)
 

Function Documentation

◆ test_T3dg_17()

void test_T3dg_17 ( const Tensor1< double, 3 > &  t1_2,
Tensor2_symmetric< double, 3 > &  t2s_1,
const Dg< double, 3, 3 > &  t3dg_2,
const Dg< double, 3, 3 > &  t3dg_3 
)

Definition at line 7 of file test_T3dg_17.cpp.

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