v0.14.0
Functions
test_T3dg_24.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_24 (Tensor1< double, 3 > &t1_1, const Tensor2< double, 3, 3 > &t2_2, const Dg< double, 3, 3 > &t3dg_2)
 

Function Documentation

◆ test_T3dg_24()

void test_T3dg_24 ( Tensor1< double, 3 > &  t1_1,
const Tensor2< double, 3, 3 > &  t2_2,
const Dg< double, 3, 3 > &  t3dg_2 
)

Definition at line 7 of file test_T3dg_24.cpp.

9 {
13 
14  Number<0> N0;
15  Number<1> N1;
16  Number<2> N2;
17 
18  /* Dg tests */
19 
20  t1_1(i) = t3dg_2(j, i, k) * t2_2(j, k);
22  t1_1(0)
23  - (t3dg_2(0, 0, 0) * t2_2(0, 0) + t3dg_2(0, 0, 1) * t2_2(0, 1)
24  + t3dg_2(0, 0, 2) * t2_2(0, 2) + t3dg_2(1, 0, 0) * t2_2(1, 0)
25  + t3dg_2(1, 0, 1) * t2_2(1, 1) + t3dg_2(1, 0, 2) * t2_2(1, 2)
26  + t3dg_2(2, 0, 0) * t2_2(2, 0) + t3dg_2(2, 0, 1) * t2_2(2, 1)
27  + t3dg_2(2, 0, 2) * t2_2(2, 2)),
28  "T3dg(j,i,k)*T2(j,k)(0)");
30  t1_1(1)
31  - (t3dg_2(0, 1, 0) * t2_2(0, 0) + t3dg_2(0, 1, 1) * t2_2(0, 1)
32  + t3dg_2(0, 1, 2) * t2_2(0, 2) + t3dg_2(1, 1, 0) * t2_2(1, 0)
33  + t3dg_2(1, 1, 1) * t2_2(1, 1) + t3dg_2(1, 1, 2) * t2_2(1, 2)
34  + t3dg_2(2, 1, 0) * t2_2(2, 0) + t3dg_2(2, 1, 1) * t2_2(2, 1)
35  + t3dg_2(2, 1, 2) * t2_2(2, 2)),
36  "T3dg(j,i,k)*T2(j,k)(1)");
38  t1_1(2)
39  - (t3dg_2(0, 2, 0) * t2_2(0, 0) + t3dg_2(0, 2, 1) * t2_2(0, 1)
40  + t3dg_2(0, 2, 2) * t2_2(0, 2) + t3dg_2(1, 2, 0) * t2_2(1, 0)
41  + t3dg_2(1, 2, 1) * t2_2(1, 1) + t3dg_2(1, 2, 2) * t2_2(1, 2)
42  + t3dg_2(2, 2, 0) * t2_2(2, 0) + t3dg_2(2, 2, 1) * t2_2(2, 1)
43  + t3dg_2(2, 2, 2) * t2_2(2, 2)),
44  "T3dg(j,i,k)*T2(j,k)(2)");
45 
46  t1_1(i) = t2_2(j, k) * t3dg_2(j, i, k);
48  t1_1(0)
49  - (t3dg_2(0, 0, 0) * t2_2(0, 0) + t3dg_2(0, 0, 1) * t2_2(0, 1)
50  + t3dg_2(0, 0, 2) * t2_2(0, 2) + t3dg_2(1, 0, 0) * t2_2(1, 0)
51  + t3dg_2(1, 0, 1) * t2_2(1, 1) + t3dg_2(1, 0, 2) * t2_2(1, 2)
52  + t3dg_2(2, 0, 0) * t2_2(2, 0) + t3dg_2(2, 0, 1) * t2_2(2, 1)
53  + t3dg_2(2, 0, 2) * t2_2(2, 2)),
54  "T2(j,k)*T3dg(j,i,k)(0)");
56  t1_1(1)
57  - (t3dg_2(0, 1, 0) * t2_2(0, 0) + t3dg_2(0, 1, 1) * t2_2(0, 1)
58  + t3dg_2(0, 1, 2) * t2_2(0, 2) + t3dg_2(1, 1, 0) * t2_2(1, 0)
59  + t3dg_2(1, 1, 1) * t2_2(1, 1) + t3dg_2(1, 1, 2) * t2_2(1, 2)
60  + t3dg_2(2, 1, 0) * t2_2(2, 0) + t3dg_2(2, 1, 1) * t2_2(2, 1)
61  + t3dg_2(2, 1, 2) * t2_2(2, 2)),
62  "T2(j,k)*T3dg(j,i,k)(1)");
64  t1_1(2)
65  - (t3dg_2(0, 2, 0) * t2_2(0, 0) + t3dg_2(0, 2, 1) * t2_2(0, 1)
66  + t3dg_2(0, 2, 2) * t2_2(0, 2) + t3dg_2(1, 2, 0) * t2_2(1, 0)
67  + t3dg_2(1, 2, 1) * t2_2(1, 1) + t3dg_2(1, 2, 2) * t2_2(1, 2)
68  + t3dg_2(2, 2, 0) * t2_2(2, 0) + t3dg_2(2, 2, 1) * t2_2(2, 1)
69  + t3dg_2(2, 2, 2) * t2_2(2, 2)),
70  "T2(j,k)*T3dg(j,i,k)(2)");
71 }
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