v0.14.0
test_T3_02.cpp
Go to the documentation of this file.
1 #include "../../../src/FTensor.hpp"
2 #include "../test_for_zero.hpp"
3 #include <iostream>
4 using namespace FTensor;
5 using namespace std;
6 
7 void test_T3_02(const Tensor1<double, 3> &t1_1, const Tensor1<double, 3> &t1_2,
8  const Tensor2<double, 3, 3> &t2_2,
9  const Tensor2<double, 3, 3> &t2_3)
10 {
14 
15  Number<0> N0;
16  Number<1> N1;
17  Number<2> N2;
18 
19  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, j) * t1_1(k)))(0, 0, 0)
20  - ((t2_2(0, 0) * t1_2(0)) + (t2_3(0, 0) * t1_1(0))),
21  "T3(i,j,k)+T3(i,j,k)(0,0,0)");
22  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, j) * t1_1(k)))(0, 0, 1)
23  - ((t2_2(0, 0) * t1_2(1)) + (t2_3(0, 0) * t1_1(1))),
24  "T3(i,j,k)+T3(i,j,k)(0,0,1)");
25  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, j) * t1_1(k)))(0, 0, 2)
26  - ((t2_2(0, 0) * t1_2(2)) + (t2_3(0, 0) * t1_1(2))),
27  "T3(i,j,k)+T3(i,j,k)(0,0,2)");
28  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, j) * t1_1(k)))(0, 1, 0)
29  - ((t2_2(0, 1) * t1_2(0)) + (t2_3(0, 1) * t1_1(0))),
30  "T3(i,j,k)+T3(i,j,k)(0,1,0)");
31  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, j) * t1_1(k)))(0, 1, 1)
32  - ((t2_2(0, 1) * t1_2(1)) + (t2_3(0, 1) * t1_1(1))),
33  "T3(i,j,k)+T3(i,j,k)(0,1,1)");
34  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, j) * t1_1(k)))(0, 1, 2)
35  - ((t2_2(0, 1) * t1_2(2)) + (t2_3(0, 1) * t1_1(2))),
36  "T3(i,j,k)+T3(i,j,k)(0,1,2)");
37  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, j) * t1_1(k)))(0, 2, 0)
38  - ((t2_2(0, 2) * t1_2(0)) + (t2_3(0, 2) * t1_1(0))),
39  "T3(i,j,k)+T3(i,j,k)(0,2,0)");
40  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, j) * t1_1(k)))(0, 2, 1)
41  - ((t2_2(0, 2) * t1_2(1)) + (t2_3(0, 2) * t1_1(1))),
42  "T3(i,j,k)+T3(i,j,k)(0,2,1)");
43  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, j) * t1_1(k)))(0, 2, 2)
44  - ((t2_2(0, 2) * t1_2(2)) + (t2_3(0, 2) * t1_1(2))),
45  "T3(i,j,k)+T3(i,j,k)(0,2,2)");
46 
47  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, k) * t1_1(j)))(0, 0, 0)
48  - ((t2_2(0, 0) * t1_2(0)) + (t2_3(0, 0) * t1_1(0))),
49  "T3(i,j,k)+T3(i,k,j)(0,0,0)");
50  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, k) * t1_1(j)))(0, 0, 1)
51  - ((t2_2(0, 0) * t1_2(1)) + (t2_3(0, 1) * t1_1(0))),
52  "T3(i,j,k)+T3(i,k,j)(0,0,1)");
53  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, k) * t1_1(j)))(0, 0, 2)
54  - ((t2_2(0, 0) * t1_2(2)) + (t2_3(0, 2) * t1_1(0))),
55  "T3(i,j,k)+T3(i,k,j)(0,0,2)");
56  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, k) * t1_1(j)))(0, 1, 0)
57  - ((t2_2(0, 1) * t1_2(0)) + (t2_3(0, 0) * t1_1(1))),
58  "T3(i,j,k)+T3(i,k,j)(0,1,0)");
59  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, k) * t1_1(j)))(0, 1, 1)
60  - ((t2_2(0, 1) * t1_2(1)) + (t2_3(0, 1) * t1_1(1))),
61  "T3(i,j,k)+T3(i,k,j)(0,1,1)");
62  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, k) * t1_1(j)))(0, 1, 2)
63  - ((t2_2(0, 1) * t1_2(2)) + (t2_3(0, 2) * t1_1(1))),
64  "T3(i,j,k)+T3(i,k,j)(0,1,2)");
65  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, k) * t1_1(j)))(0, 2, 0)
66  - ((t2_2(0, 2) * t1_2(0)) + (t2_3(0, 0) * t1_1(2))),
67  "T3(i,j,k)+T3(i,k,j)(0,2,0)");
68  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, k) * t1_1(j)))(0, 2, 1)
69  - ((t2_2(0, 2) * t1_2(1)) + (t2_3(0, 1) * t1_1(2))),
70  "T3(i,j,k)+T3(i,k,j)(0,2,1)");
71  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(i, k) * t1_1(j)))(0, 2, 2)
72  - ((t2_2(0, 2) * t1_2(2)) + (t2_3(0, 2) * t1_1(2))),
73  "T3(i,j,k)+T3(i,k,j)(0,2,2)");
74 
75  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, i) * t1_1(k)))(0, 0, 0)
76  - ((t2_2(0, 0) * t1_2(0)) + (t2_3(0, 0) * t1_1(0))),
77  "T3(i,j,k)+T3(j,i,k)(0,0,0)");
78  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, i) * t1_1(k)))(0, 0, 1)
79  - ((t2_2(0, 0) * t1_2(1)) + (t2_3(0, 0) * t1_1(1))),
80  "T3(i,j,k)+T3(j,i,k)(0,0,1)");
81  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, i) * t1_1(k)))(0, 0, 2)
82  - ((t2_2(0, 0) * t1_2(2)) + (t2_3(0, 0) * t1_1(2))),
83  "T3(i,j,k)+T3(j,i,k)(0,0,2)");
84  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, i) * t1_1(k)))(0, 1, 0)
85  - ((t2_2(0, 1) * t1_2(0)) + (t2_3(1, 0) * t1_1(0))),
86  "T3(i,j,k)+T3(j,i,k)(0,1,0)");
87  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, i) * t1_1(k)))(0, 1, 1)
88  - ((t2_2(0, 1) * t1_2(1)) + (t2_3(1, 0) * t1_1(1))),
89  "T3(i,j,k)+T3(j,i,k)(0,1,1)");
90  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, i) * t1_1(k)))(0, 1, 2)
91  - ((t2_2(0, 1) * t1_2(2)) + (t2_3(1, 0) * t1_1(2))),
92  "T3(i,j,k)+T3(j,i,k)(0,1,2)");
93  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, i) * t1_1(k)))(0, 2, 0)
94  - ((t2_2(0, 2) * t1_2(0)) + (t2_3(2, 0) * t1_1(0))),
95  "T3(i,j,k)+T3(j,i,k)(0,2,0)");
96  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, i) * t1_1(k)))(0, 2, 1)
97  - ((t2_2(0, 2) * t1_2(1)) + (t2_3(2, 0) * t1_1(1))),
98  "T3(i,j,k)+T3(j,i,k)(0,2,1)");
99  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, i) * t1_1(k)))(0, 2, 2)
100  - ((t2_2(0, 2) * t1_2(2)) + (t2_3(2, 0) * t1_1(2))),
101  "T3(i,j,k)+T3(j,i,k)(0,2,2)");
102 
103  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, k) * t1_1(i)))(0, 0, 0)
104  - ((t2_2(0, 0) * t1_2(0)) + (t2_3(0, 0) * t1_1(0))),
105  "T3(i,j,k)+T3(j,k,i)(0,0,0)");
106  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, k) * t1_1(i)))(0, 0, 1)
107  - ((t2_2(0, 0) * t1_2(1)) + (t2_3(0, 1) * t1_1(0))),
108  "T3(i,j,k)+T3(j,k,i)(0,0,1)");
109  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, k) * t1_1(i)))(0, 0, 2)
110  - ((t2_2(0, 0) * t1_2(2)) + (t2_3(0, 2) * t1_1(0))),
111  "T3(i,j,k)+T3(j,k,i)(0,0,2)");
112  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, k) * t1_1(i)))(0, 1, 0)
113  - ((t2_2(0, 1) * t1_2(0)) + (t2_3(1, 0) * t1_1(0))),
114  "T3(i,j,k)+T3(j,k,i)(0,1,0)");
115  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, k) * t1_1(i)))(0, 1, 1)
116  - ((t2_2(0, 1) * t1_2(1)) + (t2_3(1, 1) * t1_1(0))),
117  "T3(i,j,k)+T3(j,k,i)(0,1,1)");
118  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, k) * t1_1(i)))(0, 1, 2)
119  - ((t2_2(0, 1) * t1_2(2)) + (t2_3(1, 2) * t1_1(0))),
120  "T3(i,j,k)+T3(j,k,i)(0,1,2)");
121  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, k) * t1_1(i)))(0, 2, 0)
122  - ((t2_2(0, 2) * t1_2(0)) + (t2_3(2, 0) * t1_1(0))),
123  "T3(i,j,k)+T3(j,k,i)(0,2,0)");
124  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, k) * t1_1(i)))(0, 2, 1)
125  - ((t2_2(0, 2) * t1_2(1)) + (t2_3(2, 1) * t1_1(0))),
126  "T3(i,j,k)+T3(j,k,i)(0,2,1)");
127  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(j, k) * t1_1(i)))(0, 2, 2)
128  - ((t2_2(0, 2) * t1_2(2)) + (t2_3(2, 2) * t1_1(0))),
129  "T3(i,j,k)+T3(j,k,i)(0,2,2)");
130 
131  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, i) * t1_1(j)))(0, 0, 0)
132  - ((t2_2(0, 0) * t1_2(0)) + (t2_3(0, 0) * t1_1(0))),
133  "T3(i,j,k)+T3(k,i,j)(0,0,0)");
134  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, i) * t1_1(j)))(0, 0, 1)
135  - ((t2_2(0, 0) * t1_2(1)) + (t2_3(1, 0) * t1_1(0))),
136  "T3(i,j,k)+T3(k,i,j)(0,0,1)");
137  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, i) * t1_1(j)))(0, 0, 2)
138  - ((t2_2(0, 0) * t1_2(2)) + (t2_3(2, 0) * t1_1(0))),
139  "T3(i,j,k)+T3(k,i,j)(0,0,2)");
140  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, i) * t1_1(j)))(0, 1, 0)
141  - ((t2_2(0, 1) * t1_2(0)) + (t2_3(0, 0) * t1_1(1))),
142  "T3(i,j,k)+T3(k,i,j)(0,1,0)");
143  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, i) * t1_1(j)))(0, 1, 1)
144  - ((t2_2(0, 1) * t1_2(1)) + (t2_3(1, 0) * t1_1(1))),
145  "T3(i,j,k)+T3(k,i,j)(0,1,1)");
146  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, i) * t1_1(j)))(0, 1, 2)
147  - ((t2_2(0, 1) * t1_2(2)) + (t2_3(2, 0) * t1_1(1))),
148  "T3(i,j,k)+T3(k,i,j)(0,1,2)");
149  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, i) * t1_1(j)))(0, 2, 0)
150  - ((t2_2(0, 2) * t1_2(0)) + (t2_3(0, 0) * t1_1(2))),
151  "T3(i,j,k)+T3(k,i,j)(0,2,0)");
152  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, i) * t1_1(j)))(0, 2, 1)
153  - ((t2_2(0, 2) * t1_2(1)) + (t2_3(1, 0) * t1_1(2))),
154  "T3(i,j,k)+T3(k,i,j)(0,2,1)");
155  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, i) * t1_1(j)))(0, 2, 2)
156  - ((t2_2(0, 2) * t1_2(2)) + (t2_3(2, 0) * t1_1(2))),
157  "T3(i,j,k)+T3(k,i,j)(0,2,2)");
158 
159  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, j) * t1_1(i)))(0, 0, 0)
160  - ((t2_2(0, 0) * t1_2(0)) + (t2_3(0, 0) * t1_1(0))),
161  "T3(i,j,k)+T3(k,j,i)(0,0,0)");
162  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, j) * t1_1(i)))(0, 0, 1)
163  - ((t2_2(0, 0) * t1_2(1)) + (t2_3(1, 0) * t1_1(0))),
164  "T3(i,j,k)+T3(k,j,i)(0,0,1)");
165  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, j) * t1_1(i)))(0, 0, 2)
166  - ((t2_2(0, 0) * t1_2(2)) + (t2_3(2, 0) * t1_1(0))),
167  "T3(i,j,k)+T3(k,j,i)(0,0,2)");
168  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, j) * t1_1(i)))(0, 1, 0)
169  - ((t2_2(0, 1) * t1_2(0)) + (t2_3(0, 1) * t1_1(0))),
170  "T3(i,j,k)+T3(k,j,i)(0,1,0)");
171  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, j) * t1_1(i)))(0, 1, 1)
172  - ((t2_2(0, 1) * t1_2(1)) + (t2_3(1, 1) * t1_1(0))),
173  "T3(i,j,k)+T3(k,j,i)(0,1,1)");
174  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, j) * t1_1(i)))(0, 1, 2)
175  - ((t2_2(0, 1) * t1_2(2)) + (t2_3(2, 1) * t1_1(0))),
176  "T3(i,j,k)+T3(k,j,i)(0,1,2)");
177  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, j) * t1_1(i)))(0, 2, 0)
178  - ((t2_2(0, 2) * t1_2(0)) + (t2_3(0, 2) * t1_1(0))),
179  "T3(i,j,k)+T3(k,j,i)(0,2,0)");
180  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, j) * t1_1(i)))(0, 2, 1)
181  - ((t2_2(0, 2) * t1_2(1)) + (t2_3(1, 2) * t1_1(0))),
182  "T3(i,j,k)+T3(k,j,i)(0,2,1)");
183  test_for_zero(((t2_2(i, j) * t1_2(k)) + (t2_3(k, j) * t1_1(i)))(0, 2, 2)
184  - ((t2_2(0, 2) * t1_2(2)) + (t2_3(2, 2) * t1_1(0))),
185  "T3(i,j,k)+T3(k,j,i)(0,2,2)");
186 
187  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, j) * t1_1(k)))(0, 0, 0)
188  - ((t2_2(0, 0) * t1_2(0)) - (t2_3(0, 0) * t1_1(0))),
189  "T3(i,j,k)-T3(i,j,k)(0,0,0)");
190  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, j) * t1_1(k)))(0, 0, 1)
191  - ((t2_2(0, 0) * t1_2(1)) - (t2_3(0, 0) * t1_1(1))),
192  "T3(i,j,k)-T3(i,j,k)(0,0,1)");
193  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, j) * t1_1(k)))(0, 0, 2)
194  - ((t2_2(0, 0) * t1_2(2)) - (t2_3(0, 0) * t1_1(2))),
195  "T3(i,j,k)-T3(i,j,k)(0,0,2)");
196  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, j) * t1_1(k)))(0, 1, 0)
197  - ((t2_2(0, 1) * t1_2(0)) - (t2_3(0, 1) * t1_1(0))),
198  "T3(i,j,k)-T3(i,j,k)(0,1,0)");
199  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, j) * t1_1(k)))(0, 1, 1)
200  - ((t2_2(0, 1) * t1_2(1)) - (t2_3(0, 1) * t1_1(1))),
201  "T3(i,j,k)-T3(i,j,k)(0,1,1)");
202  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, j) * t1_1(k)))(0, 1, 2)
203  - ((t2_2(0, 1) * t1_2(2)) - (t2_3(0, 1) * t1_1(2))),
204  "T3(i,j,k)-T3(i,j,k)(0,1,2)");
205  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, j) * t1_1(k)))(0, 2, 0)
206  - ((t2_2(0, 2) * t1_2(0)) - (t2_3(0, 2) * t1_1(0))),
207  "T3(i,j,k)-T3(i,j,k)(0,2,0)");
208  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, j) * t1_1(k)))(0, 2, 1)
209  - ((t2_2(0, 2) * t1_2(1)) - (t2_3(0, 2) * t1_1(1))),
210  "T3(i,j,k)-T3(i,j,k)(0,2,1)");
211  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, j) * t1_1(k)))(0, 2, 2)
212  - ((t2_2(0, 2) * t1_2(2)) - (t2_3(0, 2) * t1_1(2))),
213  "T3(i,j,k)-T3(i,j,k)(0,2,2)");
214 
215  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, k) * t1_1(j)))(0, 0, 0)
216  - ((t2_2(0, 0) * t1_2(0)) - (t2_3(0, 0) * t1_1(0))),
217  "T3(i,j,k)-T3(i,k,j)(0,0,0)");
218  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, k) * t1_1(j)))(0, 0, 1)
219  - ((t2_2(0, 0) * t1_2(1)) - (t2_3(0, 1) * t1_1(0))),
220  "T3(i,j,k)-T3(i,k,j)(0,0,1)");
221  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, k) * t1_1(j)))(0, 0, 2)
222  - ((t2_2(0, 0) * t1_2(2)) - (t2_3(0, 2) * t1_1(0))),
223  "T3(i,j,k)-T3(i,k,j)(0,0,2)");
224  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, k) * t1_1(j)))(0, 1, 0)
225  - ((t2_2(0, 1) * t1_2(0)) - (t2_3(0, 0) * t1_1(1))),
226  "T3(i,j,k)-T3(i,k,j)(0,1,0)");
227  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, k) * t1_1(j)))(0, 1, 1)
228  - ((t2_2(0, 1) * t1_2(1)) - (t2_3(0, 1) * t1_1(1))),
229  "T3(i,j,k)-T3(i,k,j)(0,1,1)");
230  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, k) * t1_1(j)))(0, 1, 2)
231  - ((t2_2(0, 1) * t1_2(2)) - (t2_3(0, 2) * t1_1(1))),
232  "T3(i,j,k)-T3(i,k,j)(0,1,2)");
233  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, k) * t1_1(j)))(0, 2, 0)
234  - ((t2_2(0, 2) * t1_2(0)) - (t2_3(0, 0) * t1_1(2))),
235  "T3(i,j,k)-T3(i,k,j)(0,2,0)");
236  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, k) * t1_1(j)))(0, 2, 1)
237  - ((t2_2(0, 2) * t1_2(1)) - (t2_3(0, 1) * t1_1(2))),
238  "T3(i,j,k)-T3(i,k,j)(0,2,1)");
239  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(i, k) * t1_1(j)))(0, 2, 2)
240  - ((t2_2(0, 2) * t1_2(2)) - (t2_3(0, 2) * t1_1(2))),
241  "T3(i,j,k)-T3(i,k,j)(0,2,2)");
242 
243  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, i) * t1_1(k)))(0, 0, 0)
244  - ((t2_2(0, 0) * t1_2(0)) - (t2_3(0, 0) * t1_1(0))),
245  "T3(i,j,k)-T3(j,i,k)(0,0,0)");
246  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, i) * t1_1(k)))(0, 0, 1)
247  - ((t2_2(0, 0) * t1_2(1)) - (t2_3(0, 0) * t1_1(1))),
248  "T3(i,j,k)-T3(j,i,k)(0,0,1)");
249  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, i) * t1_1(k)))(0, 0, 2)
250  - ((t2_2(0, 0) * t1_2(2)) - (t2_3(0, 0) * t1_1(2))),
251  "T3(i,j,k)-T3(j,i,k)(0,0,2)");
252  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, i) * t1_1(k)))(0, 1, 0)
253  - ((t2_2(0, 1) * t1_2(0)) - (t2_3(1, 0) * t1_1(0))),
254  "T3(i,j,k)-T3(j,i,k)(0,1,0)");
255  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, i) * t1_1(k)))(0, 1, 1)
256  - ((t2_2(0, 1) * t1_2(1)) - (t2_3(1, 0) * t1_1(1))),
257  "T3(i,j,k)-T3(j,i,k)(0,1,1)");
258  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, i) * t1_1(k)))(0, 1, 2)
259  - ((t2_2(0, 1) * t1_2(2)) - (t2_3(1, 0) * t1_1(2))),
260  "T3(i,j,k)-T3(j,i,k)(0,1,2)");
261  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, i) * t1_1(k)))(0, 2, 0)
262  - ((t2_2(0, 2) * t1_2(0)) - (t2_3(2, 0) * t1_1(0))),
263  "T3(i,j,k)-T3(j,i,k)(0,2,0)");
264  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, i) * t1_1(k)))(0, 2, 1)
265  - ((t2_2(0, 2) * t1_2(1)) - (t2_3(2, 0) * t1_1(1))),
266  "T3(i,j,k)-T3(j,i,k)(0,2,1)");
267  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, i) * t1_1(k)))(0, 2, 2)
268  - ((t2_2(0, 2) * t1_2(2)) - (t2_3(2, 0) * t1_1(2))),
269  "T3(i,j,k)-T3(j,i,k)(0,2,2)");
270 
271  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, k) * t1_1(i)))(0, 0, 0)
272  - ((t2_2(0, 0) * t1_2(0)) - (t2_3(0, 0) * t1_1(0))),
273  "T3(i,j,k)-T3(j,k,i)(0,0,0)");
274  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, k) * t1_1(i)))(0, 0, 1)
275  - ((t2_2(0, 0) * t1_2(1)) - (t2_3(0, 1) * t1_1(0))),
276  "T3(i,j,k)-T3(j,k,i)(0,0,1)");
277  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, k) * t1_1(i)))(0, 0, 2)
278  - ((t2_2(0, 0) * t1_2(2)) - (t2_3(0, 2) * t1_1(0))),
279  "T3(i,j,k)-T3(j,k,i)(0,0,2)");
280  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, k) * t1_1(i)))(0, 1, 0)
281  - ((t2_2(0, 1) * t1_2(0)) - (t2_3(1, 0) * t1_1(0))),
282  "T3(i,j,k)-T3(j,k,i)(0,1,0)");
283  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, k) * t1_1(i)))(0, 1, 1)
284  - ((t2_2(0, 1) * t1_2(1)) - (t2_3(1, 1) * t1_1(0))),
285  "T3(i,j,k)-T3(j,k,i)(0,1,1)");
286  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, k) * t1_1(i)))(0, 1, 2)
287  - ((t2_2(0, 1) * t1_2(2)) - (t2_3(1, 2) * t1_1(0))),
288  "T3(i,j,k)-T3(j,k,i)(0,1,2)");
289  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, k) * t1_1(i)))(0, 2, 0)
290  - ((t2_2(0, 2) * t1_2(0)) - (t2_3(2, 0) * t1_1(0))),
291  "T3(i,j,k)-T3(j,k,i)(0,2,0)");
292  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, k) * t1_1(i)))(0, 2, 1)
293  - ((t2_2(0, 2) * t1_2(1)) - (t2_3(2, 1) * t1_1(0))),
294  "T3(i,j,k)-T3(j,k,i)(0,2,1)");
295  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(j, k) * t1_1(i)))(0, 2, 2)
296  - ((t2_2(0, 2) * t1_2(2)) - (t2_3(2, 2) * t1_1(0))),
297  "T3(i,j,k)-T3(j,k,i)(0,2,2)");
298 
299  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, i) * t1_1(j)))(0, 0, 0)
300  - ((t2_2(0, 0) * t1_2(0)) - (t2_3(0, 0) * t1_1(0))),
301  "T3(i,j,k)-T3(k,i,j)(0,0,0)");
302  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, i) * t1_1(j)))(0, 0, 1)
303  - ((t2_2(0, 0) * t1_2(1)) - (t2_3(1, 0) * t1_1(0))),
304  "T3(i,j,k)-T3(k,i,j)(0,0,1)");
305  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, i) * t1_1(j)))(0, 0, 2)
306  - ((t2_2(0, 0) * t1_2(2)) - (t2_3(2, 0) * t1_1(0))),
307  "T3(i,j,k)-T3(k,i,j)(0,0,2)");
308  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, i) * t1_1(j)))(0, 1, 0)
309  - ((t2_2(0, 1) * t1_2(0)) - (t2_3(0, 0) * t1_1(1))),
310  "T3(i,j,k)-T3(k,i,j)(0,1,0)");
311  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, i) * t1_1(j)))(0, 1, 1)
312  - ((t2_2(0, 1) * t1_2(1)) - (t2_3(1, 0) * t1_1(1))),
313  "T3(i,j,k)-T3(k,i,j)(0,1,1)");
314  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, i) * t1_1(j)))(0, 1, 2)
315  - ((t2_2(0, 1) * t1_2(2)) - (t2_3(2, 0) * t1_1(1))),
316  "T3(i,j,k)-T3(k,i,j)(0,1,2)");
317  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, i) * t1_1(j)))(0, 2, 0)
318  - ((t2_2(0, 2) * t1_2(0)) - (t2_3(0, 0) * t1_1(2))),
319  "T3(i,j,k)-T3(k,i,j)(0,2,0)");
320  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, i) * t1_1(j)))(0, 2, 1)
321  - ((t2_2(0, 2) * t1_2(1)) - (t2_3(1, 0) * t1_1(2))),
322  "T3(i,j,k)-T3(k,i,j)(0,2,1)");
323  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, i) * t1_1(j)))(0, 2, 2)
324  - ((t2_2(0, 2) * t1_2(2)) - (t2_3(2, 0) * t1_1(2))),
325  "T3(i,j,k)-T3(k,i,j)(0,2,2)");
326 
327  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, j) * t1_1(i)))(0, 0, 0)
328  - ((t2_2(0, 0) * t1_2(0)) - (t2_3(0, 0) * t1_1(0))),
329  "T3(i,j,k)-T3(k,j,i)(0,0,0)");
330  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, j) * t1_1(i)))(0, 0, 1)
331  - ((t2_2(0, 0) * t1_2(1)) - (t2_3(1, 0) * t1_1(0))),
332  "T3(i,j,k)-T3(k,j,i)(0,0,1)");
333  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, j) * t1_1(i)))(0, 0, 2)
334  - ((t2_2(0, 0) * t1_2(2)) - (t2_3(2, 0) * t1_1(0))),
335  "T3(i,j,k)-T3(k,j,i)(0,0,2)");
336  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, j) * t1_1(i)))(0, 1, 0)
337  - ((t2_2(0, 1) * t1_2(0)) - (t2_3(0, 1) * t1_1(0))),
338  "T3(i,j,k)-T3(k,j,i)(0,1,0)");
339  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, j) * t1_1(i)))(0, 1, 1)
340  - ((t2_2(0, 1) * t1_2(1)) - (t2_3(1, 1) * t1_1(0))),
341  "T3(i,j,k)-T3(k,j,i)(0,1,1)");
342  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, j) * t1_1(i)))(0, 1, 2)
343  - ((t2_2(0, 1) * t1_2(2)) - (t2_3(2, 1) * t1_1(0))),
344  "T3(i,j,k)-T3(k,j,i)(0,1,2)");
345  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, j) * t1_1(i)))(0, 2, 0)
346  - ((t2_2(0, 2) * t1_2(0)) - (t2_3(0, 2) * t1_1(0))),
347  "T3(i,j,k)-T3(k,j,i)(0,2,0)");
348  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, j) * t1_1(i)))(0, 2, 1)
349  - ((t2_2(0, 2) * t1_2(1)) - (t2_3(1, 2) * t1_1(0))),
350  "T3(i,j,k)-T3(k,j,i)(0,2,1)");
351  test_for_zero(((t2_2(i, j) * t1_2(k)) - (t2_3(k, j) * t1_1(i)))(0, 2, 2)
352  - ((t2_2(0, 2) * t1_2(2)) - (t2_3(2, 2) * t1_1(0))),
353  "T3(i,j,k)-T3(k,j,i)(0,2,2)");
354 
355  Dg<double, 3, 3> t3dg;
356 
357  t3dg(j, k, i) = (t2_2(i, j) * t1_2(k)) || (t2_2(i, k) * t1_2(j));
358  test_for_zero(t3dg(0, 0, 0) - (t2_2(0, 0) * t1_2(0) + t2_2(0, 0) * t1_2(0)),
359  "T3(i,j,k)||T3(i,k,j)(0,0,0)");
360  test_for_zero(t3dg(0, 1, 0) - (t2_2(0, 0) * t1_2(1) + t2_2(0, 1) * t1_2(0)),
361  "T3(i,j,k)||T3(i,k,j)(0,0,1)");
362  test_for_zero(t3dg(0, 2, 0) - (t2_2(0, 0) * t1_2(2) + t2_2(0, 2) * t1_2(0)),
363  "T3(i,j,k)||T3(i,k,j)(0,0,2)");
364  test_for_zero(t3dg(1, 0, 0) - (t2_2(0, 1) * t1_2(0) + t2_2(0, 0) * t1_2(1)),
365  "T3(i,j,k)||T3(i,k,j)(0,1,0)");
366  test_for_zero(t3dg(1, 1, 0) - (t2_2(0, 1) * t1_2(1) + t2_2(0, 1) * t1_2(1)),
367  "T3(i,j,k)||T3(i,k,j)(0,1,1)");
368  test_for_zero(t3dg(1, 2, 0) - (t2_2(0, 1) * t1_2(2) + t2_2(0, 2) * t1_2(1)),
369  "T3(i,j,k)||T3(i,k,j)(0,1,2)");
370  test_for_zero(t3dg(2, 0, 0) - (t2_2(0, 2) * t1_2(0) + t2_2(0, 0) * t1_2(2)),
371  "T3(i,j,k)||T3(i,k,j)(0,2,0)");
372  test_for_zero(t3dg(2, 1, 0) - (t2_2(0, 2) * t1_2(1) + t2_2(0, 1) * t1_2(2)),
373  "T3(i,j,k)||T3(i,k,j)(0,2,1)");
374  test_for_zero(t3dg(2, 2, 0) - (t2_2(0, 2) * t1_2(2) + t2_2(0, 2) * t1_2(2)),
375  "T3(i,j,k)||T3(i,k,j)(0,2,2)");
376  test_for_zero(t3dg(0, 0, 1) - (t2_2(1, 0) * t1_2(0) + t2_2(1, 0) * t1_2(0)),
377  "T3(i,j,k)||T3(i,k,j)(1,0,0)");
378  test_for_zero(t3dg(0, 1, 1) - (t2_2(1, 0) * t1_2(1) + t2_2(1, 1) * t1_2(0)),
379  "T3(i,j,k)||T3(i,k,j)(1,0,1)");
380  test_for_zero(t3dg(0, 2, 1) - (t2_2(1, 0) * t1_2(2) + t2_2(1, 2) * t1_2(0)),
381  "T3(i,j,k)||T3(i,k,j)(1,0,2)");
382  test_for_zero(t3dg(1, 0, 1) - (t2_2(1, 1) * t1_2(0) + t2_2(1, 0) * t1_2(1)),
383  "T3(i,j,k)||T3(i,k,j)(1,1,0)");
384  test_for_zero(t3dg(1, 1, 1) - (t2_2(1, 1) * t1_2(1) + t2_2(1, 1) * t1_2(1)),
385  "T3(i,j,k)||T3(i,k,j)(1,1,1)");
386  test_for_zero(t3dg(1, 2, 1) - (t2_2(1, 1) * t1_2(2) + t2_2(1, 2) * t1_2(1)),
387  "T3(i,j,k)||T3(i,k,j)(1,1,2)");
388  test_for_zero(t3dg(2, 0, 1) - (t2_2(1, 2) * t1_2(0) + t2_2(1, 0) * t1_2(2)),
389  "T3(i,j,k)||T3(i,k,j)(1,2,0)");
390  test_for_zero(t3dg(2, 1, 1) - (t2_2(1, 2) * t1_2(1) + t2_2(1, 1) * t1_2(2)),
391  "T3(i,j,k)||T3(i,k,j)(1,2,1)");
392  test_for_zero(t3dg(2, 2, 1) - (t2_2(1, 2) * t1_2(2) + t2_2(1, 2) * t1_2(2)),
393  "T3(i,j,k)||T3(i,k,j)(1,2,2)");
394  test_for_zero(t3dg(0, 0, 2) - (t2_2(2, 0) * t1_2(0) + t2_2(2, 0) * t1_2(0)),
395  "T3(i,j,k)||T3(i,k,j)(2,0,0)");
396  test_for_zero(t3dg(0, 1, 2) - (t2_2(2, 0) * t1_2(1) + t2_2(2, 1) * t1_2(0)),
397  "T3(i,j,k)||T3(i,k,j)(2,0,1)");
398  test_for_zero(t3dg(0, 2, 2) - (t2_2(2, 0) * t1_2(2) + t2_2(2, 2) * t1_2(0)),
399  "T3(i,j,k)||T3(i,k,j)(2,0,2)");
400  test_for_zero(t3dg(1, 0, 2) - (t2_2(2, 1) * t1_2(0) + t2_2(2, 0) * t1_2(1)),
401  "T3(i,j,k)||T3(i,k,j)(2,1,0)");
402  test_for_zero(t3dg(1, 1, 2) - (t2_2(2, 1) * t1_2(1) + t2_2(2, 1) * t1_2(1)),
403  "T3(i,j,k)||T3(i,k,j)(2,1,1)");
404  test_for_zero(t3dg(1, 2, 2) - (t2_2(2, 1) * t1_2(2) + t2_2(2, 2) * t1_2(1)),
405  "T3(i,j,k)||T3(i,k,j)(2,1,2)");
406  test_for_zero(t3dg(2, 0, 2) - (t2_2(2, 2) * t1_2(0) + t2_2(2, 0) * t1_2(2)),
407  "T3(i,j,k)||T3(i,k,j)(2,2,0)");
408  test_for_zero(t3dg(2, 1, 2) - (t2_2(2, 2) * t1_2(1) + t2_2(2, 1) * t1_2(2)),
409  "T3(i,j,k)||T3(i,k,j)(2,2,1)");
410  test_for_zero(t3dg(2, 2, 2) - (t2_2(2, 2) * t1_2(2) + t2_2(2, 2) * t1_2(2)),
411  "T3(i,j,k)||T3(i,k,j)(2,2,2)");
412 
413  t3dg(i, k, j) = (t2_2(i, j) * t1_2(k)) || (t2_2(k, j) * t1_2(i));
414  test_for_zero(t3dg(0, 0, 0) - (t2_2(0, 0) * t1_2(0) + t2_2(0, 0) * t1_2(0)),
415  "T3(i,j,k)||T3(k,j,i)(0,0,0)");
416  test_for_zero(t3dg(0, 1, 0) - (t2_2(0, 0) * t1_2(1) + t2_2(1, 0) * t1_2(0)),
417  "T3(i,j,k)||T3(k,j,i)(0,0,1)");
418  test_for_zero(t3dg(0, 2, 0) - (t2_2(0, 0) * t1_2(2) + t2_2(2, 0) * t1_2(0)),
419  "T3(i,j,k)||T3(k,j,i)(0,0,2)");
420  test_for_zero(t3dg(0, 0, 1) - (t2_2(0, 1) * t1_2(0) + t2_2(0, 1) * t1_2(0)),
421  "T3(i,j,k)||T3(k,j,i)(0,1,0)");
422  test_for_zero(t3dg(0, 1, 1) - (t2_2(0, 1) * t1_2(1) + t2_2(1, 1) * t1_2(0)),
423  "T3(i,j,k)||T3(k,j,i)(0,1,1)");
424  test_for_zero(t3dg(0, 2, 1) - (t2_2(0, 1) * t1_2(2) + t2_2(2, 1) * t1_2(0)),
425  "T3(i,j,k)||T3(k,j,i)(0,1,2)");
426  test_for_zero(t3dg(0, 0, 2) - (t2_2(0, 2) * t1_2(0) + t2_2(0, 2) * t1_2(0)),
427  "T3(i,j,k)||T3(k,j,i)(0,2,0)");
428  test_for_zero(t3dg(0, 1, 2) - (t2_2(0, 2) * t1_2(1) + t2_2(1, 2) * t1_2(0)),
429  "T3(i,j,k)||T3(k,j,i)(0,2,1)");
430  test_for_zero(t3dg(0, 2, 2) - (t2_2(0, 2) * t1_2(2) + t2_2(2, 2) * t1_2(0)),
431  "T3(i,j,k)||T3(k,j,i)(0,2,2)");
432  test_for_zero(t3dg(1, 0, 0) - (t2_2(1, 0) * t1_2(0) + t2_2(0, 0) * t1_2(1)),
433  "T3(i,j,k)||T3(k,j,i)(1,0,0)");
434  test_for_zero(t3dg(1, 1, 0) - (t2_2(1, 0) * t1_2(1) + t2_2(1, 0) * t1_2(1)),
435  "T3(i,j,k)||T3(k,j,i)(1,0,1)");
436  test_for_zero(t3dg(1, 2, 0) - (t2_2(1, 0) * t1_2(2) + t2_2(2, 0) * t1_2(1)),
437  "T3(i,j,k)||T3(k,j,i)(1,0,2)");
438  test_for_zero(t3dg(1, 0, 1) - (t2_2(1, 1) * t1_2(0) + t2_2(0, 1) * t1_2(1)),
439  "T3(i,j,k)||T3(k,j,i)(1,1,0)");
440  test_for_zero(t3dg(1, 1, 1) - (t2_2(1, 1) * t1_2(1) + t2_2(1, 1) * t1_2(1)),
441  "T3(i,j,k)||T3(k,j,i)(1,1,1)");
442  test_for_zero(t3dg(1, 2, 1) - (t2_2(1, 1) * t1_2(2) + t2_2(2, 1) * t1_2(1)),
443  "T3(i,j,k)||T3(k,j,i)(1,1,2)");
444  test_for_zero(t3dg(1, 0, 2) - (t2_2(1, 2) * t1_2(0) + t2_2(0, 2) * t1_2(1)),
445  "T3(i,j,k)||T3(k,j,i)(1,2,0)");
446  test_for_zero(t3dg(1, 1, 2) - (t2_2(1, 2) * t1_2(1) + t2_2(1, 2) * t1_2(1)),
447  "T3(i,j,k)||T3(k,j,i)(1,2,1)");
448  test_for_zero(t3dg(1, 2, 2) - (t2_2(1, 2) * t1_2(2) + t2_2(2, 2) * t1_2(1)),
449  "T3(i,j,k)||T3(k,j,i)(1,2,2)");
450  test_for_zero(t3dg(2, 0, 0) - (t2_2(2, 0) * t1_2(0) + t2_2(0, 0) * t1_2(2)),
451  "T3(i,j,k)||T3(k,j,i)(2,0,0)");
452  test_for_zero(t3dg(2, 1, 0) - (t2_2(2, 0) * t1_2(1) + t2_2(1, 0) * t1_2(2)),
453  "T3(i,j,k)||T3(k,j,i)(2,0,1)");
454  test_for_zero(t3dg(2, 2, 0) - (t2_2(2, 0) * t1_2(2) + t2_2(2, 0) * t1_2(2)),
455  "T3(i,j,k)||T3(k,j,i)(2,0,2)");
456  test_for_zero(t3dg(2, 0, 1) - (t2_2(2, 1) * t1_2(0) + t2_2(0, 1) * t1_2(2)),
457  "T3(i,j,k)||T3(k,j,i)(2,1,0)");
458  test_for_zero(t3dg(2, 1, 1) - (t2_2(2, 1) * t1_2(1) + t2_2(1, 1) * t1_2(2)),
459  "T3(i,j,k)||T3(k,j,i)(2,1,1)");
460  test_for_zero(t3dg(2, 2, 1) - (t2_2(2, 1) * t1_2(2) + t2_2(2, 1) * t1_2(2)),
461  "T3(i,j,k)||T3(k,j,i)(2,1,2)");
462  test_for_zero(t3dg(2, 0, 2) - (t2_2(2, 2) * t1_2(0) + t2_2(0, 2) * t1_2(2)),
463  "T3(i,j,k)||T3(k,j,i)(2,2,0)");
464  test_for_zero(t3dg(2, 1, 2) - (t2_2(2, 2) * t1_2(1) + t2_2(1, 2) * t1_2(2)),
465  "T3(i,j,k)||T3(k,j,i)(2,2,1)");
466  test_for_zero(t3dg(2, 2, 2) - (t2_2(2, 2) * t1_2(2) + t2_2(2, 2) * t1_2(2)),
467  "T3(i,j,k)||T3(k,j,i)(2,2,2)");
468 }
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
FTensor::Tensor1< double, 3 >
FTensor::Tensor2< double, 3, 3 >
FTensor::Number< 0 >
test_T3_02
void test_T3_02(const Tensor1< double, 3 > &t1_1, const Tensor1< double, 3 > &t1_2, const Tensor2< double, 3, 3 > &t2_2, const Tensor2< double, 3, 3 > &t2_3)
Definition: test_T3_02.cpp:7
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 >
FTensor::Dg
Definition: Dg_value.hpp:9
std
Definition: enable_if.hpp:5
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20