v0.14.0
Functions
test_T4.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_T4_01 (const Tensor4< double, 1, 2, 3, 4 > &t4_1)
 
void test_T4_02 (const Tensor4< double, 1, 2, 3, 4 > &t4_1, const Tensor2< double, 4, 3 > &t2_4, const Tensor2< double, 3, 4 > &t2_5)
 
void test_T4_04 (const Tensor4< double, 1, 2, 3, 4 > &t4_1)
 
void test_T4_05 (const Tensor4< double, 1, 2, 3, 4 > &t4, const Tensor2< double, 4, 3 > &t2_4, const Tensor2< double, 3, 4 > &t2_5)
 
void test_T4_06 (const Tensor4< double, 1, 2, 3, 4 > &t4, const Tensor3< double, 2, 3, 4 > &t3_2)
 
void test_T4_007 (const Tensor4< double, 1, 2, 3, 4 > &t4, const Tensor3< double, 2, 3, 4 > &t3_2)
 
void test_T4_008 ()
 
void test_T4_iostream ()
 
void test_T4 (const Tensor4< double, 1, 2, 3, 4 > &t4_1, const Tensor2< double, 4, 3 > &t2_4, const Tensor2< double, 3, 4 > &t2_5, const Tensor3< double, 2, 3, 4 > &t3_2)
 

Function Documentation

◆ test_T4()

void test_T4 ( const Tensor4< double, 1, 2, 3, 4 > &  t4_1,
const Tensor2< double, 4, 3 > &  t2_4,
const Tensor2< double, 3, 4 > &  t2_5,
const Tensor3< double, 2, 3, 4 > &  t3_2 
)

Definition at line 26 of file test_T4.cpp.

30 {
31  test_T4_01(t4_1);
32  test_T4_02(t4_1, t2_4, t2_5);
33  test_T4_04(t4_1);
34  test_T4_05(t4_1, t2_4, t2_5);
35  test_T4_06(t4_1, t3_2);
36  test_T4_007(t4_1, t3_2);
37  test_T4_008();
39 }

◆ test_T4_007()

void test_T4_007 ( const Tensor4< double, 1, 2, 3, 4 > &  t4,
const Tensor3< double, 2, 3, 4 > &  t3_2 
)

Definition at line 7 of file test_T4_007.cpp.

8  {
14 
15  Number<0> N0;
16  Number<1> N1;
17  Number<2> N2;
18 
20  t32(j, k, l) = 0.;
21 
22  // Yield tensor 4 setting 4th slot
23  {
25  t_4(j, k, l, N0) = t3_2(j, k, l);
26  t_4(j, k, l, N1) = t32(j, k, l);
27  t_4(j, k, l, N2) = t32(j, k, l);
28  for (int ii = 0; ii != 2; ++ii)
29  for (int jj = 0; jj != 3; ++jj)
30  for (int kk = 0; kk != 4; ++kk) {
31  test_for_zero(t_4(ii, jj, kk, 0) - t3_2(ii, jj, kk),
32  "T4(i,j,k,N0)(" + to_string(ii) + "," + to_string(jj) +
33  "," + to_string(kk) + ")");
34  for (int ll : {1, 2}) {
35  test_for_zero(t_4(ii, jj, kk, ll), "T4(i,j,k,ll)(" + to_string(ii) +
36  "," + to_string(jj) + "," +
37  to_string(kk) + "," +
38  to_string(ll) + ")");
39  }
40  }
41  }
42  {
44  t_4(j, k, l, N0) = t32(j, k, l);
45  t_4(j, k, l, N1) = t3_2(j, k, l);
46  t_4(j, k, l, N2) = t32(j, k, l);
47  for (int ii = 0; ii != 2; ++ii)
48  for (int jj = 0; jj != 3; ++jj)
49  for (int kk = 0; kk != 4; ++kk) {
50  test_for_zero(t_4(ii, jj, kk, 1) - t3_2(ii, jj, kk),
51  "T4(i,j,k,N1)(" + to_string(ii) + "," + to_string(jj) +
52  "," + to_string(kk) + ")");
53  for (int ll : {0, 2}) {
54  test_for_zero(t_4(ii, jj, kk, ll), "T4(i,j,k,ll)(" + to_string(ii) +
55  "," + to_string(jj) + "," +
56  to_string(kk) + "," +
57  to_string(ll) + ")");
58  }
59  }
60  }
61  {
63  t_4(j, k, l, N0) = t32(j, k, l);
64  t_4(j, k, l, N1) = t32(j, k, l);
65  t_4(j, k, l, N2) = t3_2(j, k, l);
66  for (int ii = 0; ii != 2; ++ii)
67  for (int jj = 0; jj != 3; ++jj)
68  for (int kk = 0; kk != 4; ++kk) {
69  test_for_zero(t_4(ii, jj, kk, 2) - t3_2(ii, jj, kk),
70  "T4(i,j,k,N2)(" + to_string(ii) + "," + to_string(jj) +
71  "," + to_string(kk) + ")");
72  for (int ll : {0, 1}) {
73  test_for_zero(t_4(ii, jj, kk, ll), "T4(i,j,k,ll)(" + to_string(ii) +
74  "," + to_string(jj) + "," +
75  to_string(kk) + "," +
76  to_string(ll) + ")");
77  }
78  }
79  }
80 
81  // Yield tensor 4 setting 3th slot
82  {
84  t_4(j, k, N0, l) = t3_2(j, k, l);
85  t_4(j, k, N1, l) = t32(j, k, l);
86  t_4(j, k, N2, l) = t32(j, k, l);
87  for (int ii = 0; ii != 2; ++ii)
88  for (int jj = 0; jj != 3; ++jj)
89  for (int kk = 0; kk != 4; ++kk) {
90  test_for_zero(t_4(ii, jj, 0, kk) - t3_2(ii, jj, kk),
91  "T4(i,j,N0,k)(" + to_string(ii) + "," + to_string(jj) +
92  "," + to_string(kk) + ")");
93  for (int ll : {1, 2}) {
94  test_for_zero(t_4(ii, jj, ll, kk), "T4(i,j,l, k)(" + to_string(ii) +
95  "," + to_string(jj) + "," +
96  to_string(ll) + "," +
97  to_string(kk) + ")");
98  }
99  }
100  }
101  {
103  t_4(j, k, N0, l) = t32(j, k, l);
104  t_4(j, k, N1, l) = t3_2(j, k, l);
105  t_4(j, k, N2, l) = t32(j, k, l);
106  for (int ii = 0; ii != 2; ++ii)
107  for (int jj = 0; jj != 3; ++jj)
108  for (int kk = 0; kk != 4; ++kk) {
109  test_for_zero(t_4(ii, jj, 1, kk) - t3_2(ii, jj, kk),
110  "T4(i,j,N1,k)(" + to_string(ii) + "," + to_string(jj) +
111  "," + to_string(kk) + ")");
112  for (int ll : {0, 2}) {
113  test_for_zero(t_4(ii, jj, ll, kk), "T4(i,j,k,ll)(" + to_string(ii) +
114  "," + to_string(jj) + "," +
115  to_string(ll) + "," +
116  to_string(kk) + ")");
117  }
118  }
119  }
120  {
122  t_4(j, k, N0, l) = t32(j, k, l);
123  t_4(j, k, N1, l) = t32(j, k, l);
124  t_4(j, k, N2, l) = t3_2(j, k, l);
125  for (int ii = 0; ii != 2; ++ii)
126  for (int jj = 0; jj != 3; ++jj)
127  for (int kk = 0; kk != 4; ++kk) {
128  test_for_zero(t_4(ii, jj, 2, kk) - t3_2(ii, jj, kk),
129  "T4(i,j,N2,k)(" + to_string(ii) + "," + to_string(jj) +
130  "," + to_string(kk) + ")");
131  for (int ll : {0, 1}) {
132  test_for_zero(t_4(ii, jj, ll, kk), "T4(i,j,k,ll)(" + to_string(ii) +
133  "," + to_string(jj) + "," +
134  to_string(ll) + "," +
135  to_string(kk) + ")");
136  }
137  }
138  }
139 
140  // Tensor4 to a Tensor4, yielding a Ddg.
141  {
146  Ddg<double, 3, 2> t_ddg;
148  for (int ii = 0; ii != 3; ++ii)
149  for (int jj = 0; jj != 3; ++jj)
150  for (int kk = 0; kk != 2; ++kk)
151  for (int ll = 0; ll != 2; ++ll) {
152  t_4(ii, jj, kk, ll) = 1 + ii + 10. * jj + 100 * kk + 1000 * ll;
153  }
154  t_ddg(i, j, k, l) = t_4(i, j, k, l) || t_4(j, i, l, k);
155  for (int ii = 0; ii != 3; ++ii)
156  for (int jj = 0; jj != 3; ++jj)
157  for (int kk = 0; kk != 2; ++kk)
158  for (int ll = 0; ll != 2; ++ll) {
159  test_for_zero(t_ddg(ii, jj, ll, kk) - t_4(ii, jj, kk, ll) -
160  t_4(jj, ii, ll, kk),
161  "T4(i,j,k,l)||T4(j,i,l,k)(" + to_string(ii) + "," +
162  to_string(jj) + "," + to_string(ll) + "," +
163  to_string(kk) + ")");
164  }
165  }
166 
167  // Tensor4 times tensor 3 yields tensor 3
168  {
170  Tensor2<double, 1, 2> t_2_1;
171  Tensor2<double, 3, 4> t_2_2;
172  for (int ii = 0; ii != 1; ++ii)
173  for (int jj = 0; jj != 2; ++jj) {
174  t_2_1(ii, jj) = 1 + ii + 10. * jj;
175  }
176  for (int kk = 0; kk != 3; ++kk)
177  for (int ll = 0; ll != 4; ++ll) {
178  t_2_2(kk, ll) = 1 + 100 * kk + 1000 * ll;
179  }
180  t_4(i, j, k, l) = t_2_1(i, j) * t_2_2(k, l);
182  for (int kk = 0; kk != 3; ++kk)
183  for (int ll = 0; ll != 4; ++ll)
184  for (int mm = 0; mm != 3; ++mm) {
185  t_3_1(kk, ll, mm) = 1 + 100 * kk + 1000 * ll + 10000 * mm;
186  }
189  t_3_2(i, j, m) = t_4(i, j, k, l) * t_3_1(k, l, m) -
190  t_2_1(i, j) * (t_3_1(k, l, m) * t_2_2(k, l));
191  for (int ii = 0; ii != 1; ++ii)
192  for (int jj = 0; jj != 2; ++jj)
193  for (int mm = 0; mm != 3; ++mm) {
194  test_for_zero(t_3_2(ii, jj, mm),
195  "T4(i,j,k,l)*T3(k,l,m)(" + to_string(ii) + "," +
196  to_string(jj) + "," + to_string(mm) + ")");
197  }
198  }
199 
200  // Tensor4 times tensor 3 yields tensor 3
201  {
203  Tensor2<double, 1, 4> t_2_1;
204  Tensor2<double, 2, 3> t_2_2;
205  for (int ii = 0; ii != 1; ++ii)
206  for (int ll = 0; ll != 4; ++ll) {
207  t_2_1(ii, ll) = 1 + ii + 10. * ll;
208  }
209  for (int jj = 0; jj != 2; ++jj)
210  for (int kk = 0; kk != 3; ++kk) {
211  t_2_2(jj, kk) = 1 + 100 * jj + 1000 * kk;
212  }
213  t_4(i, j, k, l) = t_2_1(i, l) * t_2_2(j, k);
215  for (int mm = 0; mm != 3; ++mm)
216  for (int kk = 0; kk != 3; ++kk)
217  for (int jj = 0; jj != 2; ++jj) {
218  t_3_1(mm, kk, jj) = 1 + 100 * mm + 1000 * kk + 10000 * jj;
219  }
222  t_3_2(i, l, m) = t_4(i, j, k, l) * t_3_1(m, k, j) -
223  t_2_1(i, l) * (t_3_1(m, k, j) * t_2_2(j, k));
224  for (int ii = 0; ii != 1; ++ii)
225  for (int ll = 0; ll != 4; ++ll)
226  for (int mm = 0; mm != 3; ++mm) {
227  test_for_zero(t_3_2(ii, ll, mm),
228  "T4(i,j,k,l)*T3(m,k,j)(" + to_string(ii) + "," +
229  to_string(ll) + "," + to_string(mm) + ")");
230  }
231  }
232 
233 }

◆ test_T4_008()

void test_T4_008 ( )

Definition at line 7 of file test_T4_008.cpp.

7  {
8 
13 
15 
16  for (int ii = 0; ii != 3;++ii)
17  for (int jj = 0; jj != 3;++jj)
18  for (int kk = 0; kk != 3;++kk)
19  for (int ll = 0; ll != 3;++ll)
20  t_4(ii, jj, kk, ll) = 1 + ii + 10 * jj + 100 * kk + 1000 * ll;
21 
24  for (int ii = 0; ii != 3;++ii)
25  for (int jj = ii; jj != 3;++jj) {
26  ts_2(ii, jj) = 1 + ii + 10 * jj;
27  t_2(ii, jj) = 1 + ii + 10 * jj;
28  t_2(jj, ii) = 1 + ii + 10 * jj;
29  }
30 
32  t_2_2(k, l) = t_4(i, j, k, l) * ts_2(i, j);
33  t_2_2(k, l) -= t_4(i, j, k, l) * t_2(i, j);
34  for (int ii = 0; ii != 3; ++ii)
35  for (int jj = 0; jj != 3; ++jj) {
36  test_for_zero(t_2_2(ii, jj), "T4(i,j,k,l)*Ts2(i,j)(" + to_string(ii) +
37  "," + to_string(jj) + ")");
38  }
39 
40 
41 }

◆ test_T4_01()

void test_T4_01 ( const Tensor4< double, 1, 2, 3, 4 > &  t4_1)

Definition at line 8 of file test_T4_01.cpp.

9 {
14 
15  // (i,...)
16  {
18  t4(i, j, k, l) = t4_1(i, j, k, l);
19  for(int i1 = 0; i1 < 2; ++i1)
20  for(int i2 = 0; i2 < 3; ++i2)
21  for(int i3 = 0; i3 < 4; ++i3)
22  {
23  test_for_zero(t4_1(0, i1, i2, i3) - t4(0, i1, i2, i3),
24  "T4(i,j,k,l)=T4(i,j,k,l)(0," + std::to_string(i1)
25  + "," + std::to_string(i2) + ","
26  + std::to_string(i3) + ")");
27  test_for_zero((t4_1(i, j, k, l) + t4(i, j, k, l))(0, i1, i2, i3)
28  - 2 * t4_1(0, i1, i2, i3),
29  "T4(i,j,k,l)+T4(i,j,k,l)(0," + std::to_string(i1)
30  + "," + std::to_string(i2) + ","
31  + std::to_string(i3) + ")");
32  test_for_zero((t4_1(i, j, k, l) - t4(i, j, k, l))(0, i1, i2, i3),
33  "T4(i,j,k,l)-T4(i,j,k,l)(0," + std::to_string(i1)
34  + "," + std::to_string(i2) + ","
35  + std::to_string(i3) + ")");
36  }
37  }
38  {
40  t4(i, j, l, k) = t4_1(i, j, k, l);
41  for(int i1 = 0; i1 < 2; ++i1)
42  for(int i2 = 0; i2 < 3; ++i2)
43  for(int i3 = 0; i3 < 4; ++i3)
44  {
45  test_for_zero(t4_1(0, i1, i2, i3) - t4(0, i1, i3, i2),
46  "T4(i,j,k,l)=T4(i,j,l,k)(0," + std::to_string(i1)
47  + "," + std::to_string(i2) + ","
48  + std::to_string(i3) + ")");
49  test_for_zero((t4_1(i, j, k, l) + t4(i, j, l, k))(0, i1, i2, i3)
50  - 2 * t4_1(0, i1, i2, i3),
51  "T4(i,j,k,l)+T4(i,j,l,k)(0," + std::to_string(i1)
52  + "," + std::to_string(i2) + ","
53  + std::to_string(i3) + ")");
54  test_for_zero((t4_1(i, j, k, l) - t4(i, j, l, k))(0, i1, i2, i3),
55  "T4(i,j,k,l)-T4(i,j,l,k)(0," + std::to_string(i1)
56  + "," + std::to_string(i2) + ","
57  + std::to_string(i3) + ")");
58  }
59  }
60  {
62  t4(i, k, j, l) = t4_1(i, j, k, l);
63  for(int i1 = 0; i1 < 2; ++i1)
64  for(int i2 = 0; i2 < 3; ++i2)
65  for(int i3 = 0; i3 < 4; ++i3)
66  {
67  test_for_zero(t4_1(0, i1, i2, i3) - t4(0, i2, i1, i3),
68  "T4(i,j,k,l)=T4(i,k,j,l)(0," + std::to_string(i1)
69  + "," + std::to_string(i2) + ","
70  + std::to_string(i3) + ")");
71  test_for_zero((t4_1(i, j, k, l) + t4(i, k, j, l))(0, i1, i2, i3)
72  - 2 * t4_1(0, i1, i2, i3),
73  "T4(i,j,k,l)+T4(i,k,j,l)(0," + std::to_string(i1)
74  + "," + std::to_string(i2) + ","
75  + std::to_string(i3) + ")");
76  test_for_zero((t4_1(i, j, k, l) - t4(i, k, j, l))(0, i1, i2, i3),
77  "T4(i,j,k,l)-T4(i,k,j,l)(0," + std::to_string(i1)
78  + "," + std::to_string(i2) + ","
79  + std::to_string(i3) + ")");
80  }
81  }
82  {
84  t4(i, k, l, j) = t4_1(i, j, k, l);
85  for(int i1 = 0; i1 < 2; ++i1)
86  for(int i2 = 0; i2 < 3; ++i2)
87  for(int i3 = 0; i3 < 4; ++i3)
88  {
89  test_for_zero(t4_1(0, i1, i2, i3) - t4(0, i2, i3, i1),
90  "T4(i,j,k,l)=T4(i,k,l,j)(0," + std::to_string(i1)
91  + "," + std::to_string(i2) + ","
92  + std::to_string(i3) + ")");
93  test_for_zero((t4_1(i, j, k, l) + t4(i, k, l, j))(0, i1, i2, i3)
94  - 2 * t4_1(0, i1, i2, i3),
95  "T4(i,j,k,l)+T4(i,k,l,j)(0," + std::to_string(i1)
96  + "," + std::to_string(i2) + ","
97  + std::to_string(i3) + ")");
98  test_for_zero((t4_1(i, j, k, l) - t4(i, k, l, j))(0, i1, i2, i3),
99  "T4(i,j,k,l)-T4(i,k,l,j)(0," + std::to_string(i1)
100  + "," + std::to_string(i2) + ","
101  + std::to_string(i3) + ")");
102  }
103  }
104  {
106  t4(i, l, j, k) = t4_1(i, j, k, l);
107  for(int i1 = 0; i1 < 2; ++i1)
108  for(int i2 = 0; i2 < 3; ++i2)
109  for(int i3 = 0; i3 < 4; ++i3)
110  {
111  test_for_zero(t4_1(0, i1, i2, i3) - t4(0, i3, i1, i2),
112  "T4(i,j,k,l)=T4(i,l,j,k)(0," + std::to_string(i1)
113  + "," + std::to_string(i2) + ","
114  + std::to_string(i3) + ")");
115  test_for_zero((t4_1(i, j, k, l) + t4(i, l, j, k))(0, i1, i2, i3)
116  - 2 * t4_1(0, i1, i2, i3),
117  "T4(i,j,k,l)+T4(i,l,j,k)(0," + std::to_string(i1)
118  + "," + std::to_string(i2) + ","
119  + std::to_string(i3) + ")");
120  test_for_zero((t4_1(i, j, k, l) - t4(i, l, j, k))(0, i1, i2, i3),
121  "T4(i,j,k,l)-T4(i,l,j,k)(0," + std::to_string(i1)
122  + "," + std::to_string(i2) + ","
123  + std::to_string(i3) + ")");
124  }
125  }
126  {
128  t4(i, l, k, j) = t4_1(i, j, k, l);
129  for(int i1 = 0; i1 < 2; ++i1)
130  for(int i2 = 0; i2 < 3; ++i2)
131  for(int i3 = 0; i3 < 4; ++i3)
132  {
133  test_for_zero(t4_1(0, i1, i2, i3) - t4(0, i3, i2, i1),
134  "T4(i,j,k,l)=T4(i,l,k,j)(0," + std::to_string(i1)
135  + "," + std::to_string(i2) + ","
136  + std::to_string(i3) + ")");
137  test_for_zero((t4_1(i, j, k, l) + t4(i, l, k, j))(0, i1, i2, i3)
138  - 2 * t4_1(0, i1, i2, i3),
139  "T4(i,j,k,l)+T4(i,l,k,j)(0," + std::to_string(i1)
140  + "," + std::to_string(i2) + ","
141  + std::to_string(i3) + ")");
142  test_for_zero((t4_1(i, j, k, l) - t4(i, l, k, j))(0, i1, i2, i3),
143  "T4(i,j,k,l)-T4(i,l,k,j)(0," + std::to_string(i1)
144  + "," + std::to_string(i2) + ","
145  + std::to_string(i3) + ")");
146  }
147  }
148 
149  // (j,...)
150  {
152  t4(j, i, k, l) = t4_1(i, j, k, l);
153  for(int i1 = 0; i1 < 2; ++i1)
154  for(int i2 = 0; i2 < 3; ++i2)
155  for(int i3 = 0; i3 < 4; ++i3)
156  {
157  test_for_zero(t4_1(0, i1, i2, i3) - t4(i1, 0, i2, i3),
158  "T4(j,i,k,l)=T4(i,j,k,l)(0," + std::to_string(i1)
159  + "," + std::to_string(i2) + ","
160  + std::to_string(i3) + ")");
161  test_for_zero((t4_1(i, j, k, l) + t4(j, i, k, l))(0, i1, i2, i3)
162  - 2 * t4_1(0, i1, i2, i3),
163  "T4(j,i,k,l)+T4(i,j,k,l)(0," + std::to_string(i1)
164  + "," + std::to_string(i2) + ","
165  + std::to_string(i3) + ")");
166  test_for_zero((t4_1(i, j, k, l) - t4(j, i, k, l))(0, i1, i2, i3),
167  "T4(j,i,k,l)-T4(i,j,k,l)(0," + std::to_string(i1)
168  + "," + std::to_string(i2) + ","
169  + std::to_string(i3) + ")");
170  }
171  }
172  {
174  t4(j, i, l, k) = t4_1(i, j, k, l);
175  for(int i1 = 0; i1 < 2; ++i1)
176  for(int i2 = 0; i2 < 3; ++i2)
177  for(int i3 = 0; i3 < 4; ++i3)
178  {
179  test_for_zero(t4_1(0, i1, i2, i3) - t4(i1, 0, i3, i2),
180  "T4(i,j,k,l)=T4(j,i,l,k)(0," + std::to_string(i1)
181  + "," + std::to_string(i2) + ","
182  + std::to_string(i3) + ")");
183  test_for_zero((t4_1(i, j, k, l) + t4(j, i, l, k))(0, i1, i2, i3)
184  - 2 * t4_1(0, i1, i2, i3),
185  "T4(i,j,k,l)+T4(j,i,l,k)(0," + std::to_string(i1)
186  + "," + std::to_string(i2) + ","
187  + std::to_string(i3) + ")");
188  test_for_zero((t4_1(i, j, k, l) - t4(j, i, l, k))(0, i1, i2, i3),
189  "T4(i,j,k,l)-T4(j,i,l,k)(0," + std::to_string(i1)
190  + "," + std::to_string(i2) + ","
191  + std::to_string(i3) + ")");
192  }
193  }
194  {
196  t4(j, k, i, l) = t4_1(i, j, k, l);
197  for(int i1 = 0; i1 < 2; ++i1)
198  for(int i2 = 0; i2 < 3; ++i2)
199  for(int i3 = 0; i3 < 4; ++i3)
200  {
201  test_for_zero(t4_1(0, i1, i2, i3) - t4(i1, i2, 0, i3),
202  "T4(i,j,k,l)=T4(j,k,i,l)(0," + std::to_string(i1)
203  + "," + std::to_string(i2) + ","
204  + std::to_string(i3) + ")");
205  test_for_zero((t4_1(i, j, k, l) + t4(j, k, i, l))(0, i1, i2, i3)
206  - 2 * t4_1(0, i1, i2, i3),
207  "T4(i,j,k,l)+T4(j,k,i,l)(0," + std::to_string(i1)
208  + "," + std::to_string(i2) + ","
209  + std::to_string(i3) + ")");
210  test_for_zero((t4_1(i, j, k, l) - t4(j, k, i, l))(0, i1, i2, i3),
211  "T4(i,j,k,l)-T4(j,k,i,l)(0," + std::to_string(i1)
212  + "," + std::to_string(i2) + ","
213  + std::to_string(i3) + ")");
214  }
215  }
216  {
218  t4(j, k, l, i) = t4_1(i, j, k, l);
219  for(int i1 = 0; i1 < 2; ++i1)
220  for(int i2 = 0; i2 < 3; ++i2)
221  for(int i3 = 0; i3 < 4; ++i3)
222  {
223  test_for_zero(t4_1(0, i1, i2, i3) - t4(i1, i2, i3, 0),
224  "T4(i,j,k,l)=T4(j,k,l,i)(0," + std::to_string(i1)
225  + "," + std::to_string(i2) + ","
226  + std::to_string(i3) + ")");
227  test_for_zero((t4_1(i, j, k, l) + t4(j, k, l, i))(0, i1, i2, i3)
228  - 2 * t4_1(0, i1, i2, i3),
229  "T4(i,j,k,l)+T4(j,k,l,i)(0," + std::to_string(i1)
230  + "," + std::to_string(i2) + ","
231  + std::to_string(i3) + ")");
232  test_for_zero((t4_1(i, j, k, l) - t4(j, k, l, i))(0, i1, i2, i3),
233  "T4(i,j,k,l)-T4(j,k,l,i)(0," + std::to_string(i1)
234  + "," + std::to_string(i2) + ","
235  + std::to_string(i3) + ")");
236  }
237  }
238  {
240  t4(j, l, i, k) = t4_1(i, j, k, l);
241  for(int i1 = 0; i1 < 2; ++i1)
242  for(int i2 = 0; i2 < 3; ++i2)
243  for(int i3 = 0; i3 < 4; ++i3)
244  {
245  test_for_zero(t4_1(0, i1, i2, i3) - t4(i1, i3, 0, i2),
246  "T4(i,j,k,l)=T4(j,l,i,k)(0," + std::to_string(i1)
247  + "," + std::to_string(i2) + ","
248  + std::to_string(i3) + ")");
249  test_for_zero((t4_1(i, j, k, l) + t4(j, l, i, k))(0, i1, i2, i3)
250  - 2 * t4_1(0, i1, i2, i3),
251  "T4(i,j,k,l)+T4(j,l,i,k)(0," + std::to_string(i1)
252  + "," + std::to_string(i2) + ","
253  + std::to_string(i3) + ")");
254  test_for_zero((t4_1(i, j, k, l) - t4(j, l, i, k))(0, i1, i2, i3),
255  "T4(i,j,k,l)-T4(j,l,i,k)(0," + std::to_string(i1)
256  + "," + std::to_string(i2) + ","
257  + std::to_string(i3) + ")");
258  }
259  }
260  {
262  t4(j, l, k, i) = t4_1(i, j, k, l);
263  for(int i1 = 0; i1 < 2; ++i1)
264  for(int i2 = 0; i2 < 3; ++i2)
265  for(int i3 = 0; i3 < 4; ++i3)
266  {
267  test_for_zero(t4_1(0, i1, i2, i3) - t4(i1, i3, i2, 0),
268  "T4(i,j,k,l)=T4(j,l,k,i)(0," + std::to_string(i1)
269  + "," + std::to_string(i2) + ","
270  + std::to_string(i3) + ")");
271  test_for_zero((t4_1(i, j, k, l) + t4(j, l, k, i))(0, i1, i2, i3)
272  - 2 * t4_1(0, i1, i2, i3),
273  "T4(i,j,k,l)+T4(j,l,k,i)(0," + std::to_string(i1)
274  + "," + std::to_string(i2) + ","
275  + std::to_string(i3) + ")");
276  test_for_zero((t4_1(i, j, k, l) - t4(j, l, k, i))(0, i1, i2, i3),
277  "T4(i,j,k,l)-T4(j,l,k,i)(0," + std::to_string(i1)
278  + "," + std::to_string(i2) + ","
279  + std::to_string(i3) + ")");
280  }
281  }
282 
283  // (k,...)
284  {
286  t4(k, j, i, l) = t4_1(i, j, k, l);
287  for(int i1 = 0; i1 < 2; ++i1)
288  for(int i2 = 0; i2 < 3; ++i2)
289  for(int i3 = 0; i3 < 4; ++i3)
290  {
291  test_for_zero(t4_1(0, i1, i2, i3) - t4(i2, i1, 0, i3),
292  "T4(k,j,i,l)=T4(i,j,k,l)(0," + std::to_string(i1)
293  + "," + std::to_string(i2) + ","
294  + std::to_string(i3) + ")");
295  test_for_zero((t4_1(i, j, k, l) + t4(k, j, i, l))(0, i1, i2, i3)
296  - 2 * t4_1(0, i1, i2, i3),
297  "T4(k,j,i,l)+T4(i,j,k,l)(0," + std::to_string(i1)
298  + "," + std::to_string(i2) + ","
299  + std::to_string(i3) + ")");
300  test_for_zero((t4_1(i, j, k, l) - t4(k, j, i, l))(0, i1, i2, i3),
301  "T4(k,j,i,l)-T4(i,j,k,l)(0," + std::to_string(i1)
302  + "," + std::to_string(i2) + ","
303  + std::to_string(i3) + ")");
304  }
305  }
306  {
308  t4(k, j, l, i) = t4_1(i, j, k, l);
309  for(int i1 = 0; i1 < 2; ++i1)
310  for(int i2 = 0; i2 < 3; ++i2)
311  for(int i3 = 0; i3 < 4; ++i3)
312  {
313  test_for_zero(t4_1(0, i1, i2, i3) - t4(i2, i1, i3, 0),
314  "T4(i,j,k,l)=T4(k,j,l,i)(0," + std::to_string(i1)
315  + "," + std::to_string(i2) + ","
316  + std::to_string(i3) + ")");
317  test_for_zero((t4_1(i, j, k, l) + t4(k, j, l, i))(0, i1, i2, i3)
318  - 2 * t4_1(0, i1, i2, i3),
319  "T4(i,j,k,l)+T4(k,j,l,i)(0," + std::to_string(i1)
320  + "," + std::to_string(i2) + ","
321  + std::to_string(i3) + ")");
322  test_for_zero((t4_1(i, j, k, l) - t4(k, j, l, i))(0, i1, i2, i3),
323  "T4(i,j,k,l)-T4(k,j,l,i)(0," + std::to_string(i1)
324  + "," + std::to_string(i2) + ","
325  + std::to_string(i3) + ")");
326  }
327  }
328  {
330  t4(k, i, j, l) = t4_1(i, j, k, l);
331  for(int i1 = 0; i1 < 2; ++i1)
332  for(int i2 = 0; i2 < 3; ++i2)
333  for(int i3 = 0; i3 < 4; ++i3)
334  {
335  test_for_zero(t4_1(0, i1, i2, i3) - t4(i2, 0, i1, i3),
336  "T4(i,j,k,l)=T4(k,i,j,l)(0," + std::to_string(i1)
337  + "," + std::to_string(i2) + ","
338  + std::to_string(i3) + ")");
339  test_for_zero((t4_1(i, j, k, l) + t4(k, i, j, l))(0, i1, i2, i3)
340  - 2 * t4_1(0, i1, i2, i3),
341  "T4(i,j,k,l)+T4(k,i,j,l)(0," + std::to_string(i1)
342  + "," + std::to_string(i2) + ","
343  + std::to_string(i3) + ")");
344  test_for_zero((t4_1(i, j, k, l) - t4(k, i, j, l))(0, i1, i2, i3),
345  "T4(i,j,k,l)-T4(k,i,j,l)(0," + std::to_string(i1)
346  + "," + std::to_string(i2) + ","
347  + std::to_string(i3) + ")");
348  }
349  }
350  {
352  t4(k, i, l, j) = t4_1(i, j, k, l);
353  for(int i1 = 0; i1 < 2; ++i1)
354  for(int i2 = 0; i2 < 3; ++i2)
355  for(int i3 = 0; i3 < 4; ++i3)
356  {
357  test_for_zero(t4_1(0, i1, i2, i3) - t4(i2, 0, i3, i1),
358  "T4(i,j,k,l)=T4(k,i,l,j)(0," + std::to_string(i1)
359  + "," + std::to_string(i2) + ","
360  + std::to_string(i3) + ")");
361  test_for_zero((t4_1(i, j, k, l) + t4(k, i, l, j))(0, i1, i2, i3)
362  - 2 * t4_1(0, i1, i2, i3),
363  "T4(i,j,k,l)+T4(k,i,l,j)(0," + std::to_string(i1)
364  + "," + std::to_string(i2) + ","
365  + std::to_string(i3) + ")");
366  test_for_zero((t4_1(i, j, k, l) - t4(k, i, l, j))(0, i1, i2, i3),
367  "T4(i,j,k,l)-T4(k,i,l,j)(0," + std::to_string(i1)
368  + "," + std::to_string(i2) + ","
369  + std::to_string(i3) + ")");
370  }
371  }
372  {
374  t4(k, l, j, i) = t4_1(i, j, k, l);
375  for(int i1 = 0; i1 < 2; ++i1)
376  for(int i2 = 0; i2 < 3; ++i2)
377  for(int i3 = 0; i3 < 4; ++i3)
378  {
379  test_for_zero(t4_1(0, i1, i2, i3) - t4(i2, i3, i1, 0),
380  "T4(i,j,k,l)=T4(k,l,j,i)(0," + std::to_string(i1)
381  + "," + std::to_string(i2) + ","
382  + std::to_string(i3) + ")");
383  test_for_zero((t4_1(i, j, k, l) + t4(k, l, j, i))(0, i1, i2, i3)
384  - 2 * t4_1(0, i1, i2, i3),
385  "T4(i,j,k,l)+T4(k,l,j,i)(0," + std::to_string(i1)
386  + "," + std::to_string(i2) + ","
387  + std::to_string(i3) + ")");
388  test_for_zero((t4_1(i, j, k, l) - t4(k, l, j, i))(0, i1, i2, i3),
389  "T4(i,j,k,l)-T4(k,l,j,i)(0," + std::to_string(i1)
390  + "," + std::to_string(i2) + ","
391  + std::to_string(i3) + ")");
392  }
393  }
394  {
396  t4(k, l, i, j) = t4_1(i, j, k, l);
397  for(int i1 = 0; i1 < 2; ++i1)
398  for(int i2 = 0; i2 < 3; ++i2)
399  for(int i3 = 0; i3 < 4; ++i3)
400  {
401  test_for_zero(t4_1(0, i1, i2, i3) - t4(i2, i3, 0, i1),
402  "T4(i,j,k,l)=T4(k,l,i,j)(0," + std::to_string(i1)
403  + "," + std::to_string(i2) + ","
404  + std::to_string(i3) + ")");
405  test_for_zero((t4_1(i, j, k, l) + t4(k, l, i, j))(0, i1, i2, i3)
406  - 2 * t4_1(0, i1, i2, i3),
407  "T4(i,j,k,l)+T4(k,l,i,j)(0," + std::to_string(i1)
408  + "," + std::to_string(i2) + ","
409  + std::to_string(i3) + ")");
410  test_for_zero((t4_1(i, j, k, l) - t4(k, l, i, j))(0, i1, i2, i3),
411  "T4(i,j,k,l)-T4(k,l,i,j)(0," + std::to_string(i1)
412  + "," + std::to_string(i2) + ","
413  + std::to_string(i3) + ")");
414  }
415  }
416 
417  // (l,...)
418  {
420  t4(l, j, k, i) = t4_1(i, j, k, l);
421  for(int i1 = 0; i1 < 2; ++i1)
422  for(int i2 = 0; i2 < 3; ++i2)
423  for(int i3 = 0; i3 < 4; ++i3)
424  {
425  test_for_zero(t4_1(0, i1, i2, i3) - t4(i3, i1, i2, 0),
426  "T4(l,j,k,i)=T4(i,j,k,l)(0," + std::to_string(i1)
427  + "," + std::to_string(i2) + ","
428  + std::to_string(i3) + ")");
429  test_for_zero((t4_1(i, j, k, l) + t4(l, j, k, i))(0, i1, i2, i3)
430  - 2 * t4_1(0, i1, i2, i3),
431  "T4(l,j,k,i)+T4(i,j,k,l)(0," + std::to_string(i1)
432  + "," + std::to_string(i2) + ","
433  + std::to_string(i3) + ")");
434  test_for_zero((t4_1(i, j, k, l) - t4(l, j, k, i))(0, i1, i2, i3),
435  "T4(l,j,k,i)-T4(i,j,k,l)(0," + std::to_string(i1)
436  + "," + std::to_string(i2) + ","
437  + std::to_string(i3) + ")");
438  }
439  }
440  {
442  t4(l, j, i, k) = t4_1(i, j, k, l);
443  for(int i1 = 0; i1 < 2; ++i1)
444  for(int i2 = 0; i2 < 3; ++i2)
445  for(int i3 = 0; i3 < 4; ++i3)
446  {
447  test_for_zero(t4_1(0, i1, i2, i3) - t4(i3, i1, 0, i2),
448  "T4(i,j,k,l)=T4(l,j,i,k)(0," + std::to_string(i1)
449  + "," + std::to_string(i2) + ","
450  + std::to_string(i3) + ")");
451  test_for_zero((t4_1(i, j, k, l) + t4(l, j, i, k))(0, i1, i2, i3)
452  - 2 * t4_1(0, i1, i2, i3),
453  "T4(i,j,k,l)+T4(l,j,i,k)(0," + std::to_string(i1)
454  + "," + std::to_string(i2) + ","
455  + std::to_string(i3) + ")");
456  test_for_zero((t4_1(i, j, k, l) - t4(l, j, i, k))(0, i1, i2, i3),
457  "T4(i,j,k,l)-T4(l,j,i,k)(0," + std::to_string(i1)
458  + "," + std::to_string(i2) + ","
459  + std::to_string(i3) + ")");
460  }
461  }
462  {
464  t4(l, k, j, i) = t4_1(i, j, k, l);
465  for(int i1 = 0; i1 < 2; ++i1)
466  for(int i2 = 0; i2 < 3; ++i2)
467  for(int i3 = 0; i3 < 4; ++i3)
468  {
469  test_for_zero(t4_1(0, i1, i2, i3) - t4(i3, i2, i1, 0),
470  "T4(i,j,k,l)=T4(l,k,j,i)(0," + std::to_string(i1)
471  + "," + std::to_string(i2) + ","
472  + std::to_string(i3) + ")");
473  test_for_zero((t4_1(i, j, k, l) + t4(l, k, j, i))(0, i1, i2, i3)
474  - 2 * t4_1(0, i1, i2, i3),
475  "T4(i,j,k,l)+T4(l,k,j,i)(0," + std::to_string(i1)
476  + "," + std::to_string(i2) + ","
477  + std::to_string(i3) + ")");
478  test_for_zero((t4_1(i, j, k, l) - t4(l, k, j, i))(0, i1, i2, i3),
479  "T4(i,j,k,l)-T4(l,k,j,i)(0," + std::to_string(i1)
480  + "," + std::to_string(i2) + ","
481  + std::to_string(i3) + ")");
482  }
483  }
484  {
486  t4(l, k, i, j) = t4_1(i, j, k, l);
487  for(int i1 = 0; i1 < 2; ++i1)
488  for(int i2 = 0; i2 < 3; ++i2)
489  for(int i3 = 0; i3 < 4; ++i3)
490  {
491  test_for_zero(t4_1(0, i1, i2, i3) - t4(i3, i2, 0, i1),
492  "T4(i,j,k,l)=T4(l,k,i,j)(0," + std::to_string(i1)
493  + "," + std::to_string(i2) + ","
494  + std::to_string(i3) + ")");
495  test_for_zero((t4_1(i, j, k, l) + t4(l, k, i, j))(0, i1, i2, i3)
496  - 2 * t4_1(0, i1, i2, i3),
497  "T4(i,j,k,l)+T4(l,k,i,j)(0," + std::to_string(i1)
498  + "," + std::to_string(i2) + ","
499  + std::to_string(i3) + ")");
500  test_for_zero((t4_1(i, j, k, l) - t4(l, k, i, j))(0, i1, i2, i3),
501  "T4(i,j,k,l)-T4(l,k,i,j)(0," + std::to_string(i1)
502  + "," + std::to_string(i2) + ","
503  + std::to_string(i3) + ")");
504  }
505  }
506  {
508  t4(l, i, j, k) = t4_1(i, j, k, l);
509  for(int i1 = 0; i1 < 2; ++i1)
510  for(int i2 = 0; i2 < 3; ++i2)
511  for(int i3 = 0; i3 < 4; ++i3)
512  {
513  test_for_zero(t4_1(0, i1, i2, i3) - t4(i3, 0, i1, i2),
514  "T4(i,j,k,l)=T4(l,i,j,k)(0," + std::to_string(i1)
515  + "," + std::to_string(i2) + ","
516  + std::to_string(i3) + ")");
517  test_for_zero((t4_1(i, j, k, l) + t4(l, i, j, k))(0, i1, i2, i3)
518  - 2 * t4_1(0, i1, i2, i3),
519  "T4(i,j,k,l)+T4(l,i,j,k)(0," + std::to_string(i1)
520  + "," + std::to_string(i2) + ","
521  + std::to_string(i3) + ")");
522  test_for_zero((t4_1(i, j, k, l) - t4(l, i, j, k))(0, i1, i2, i3),
523  "T4(i,j,k,l)-T4(l,i,j,k)(0," + std::to_string(i1)
524  + "," + std::to_string(i2) + ","
525  + std::to_string(i3) + ")");
526  }
527  }
528  {
530  t4(l, i, k, j) = t4_1(i, j, k, l);
531  for(int i1 = 0; i1 < 2; ++i1)
532  for(int i2 = 0; i2 < 3; ++i2)
533  for(int i3 = 0; i3 < 4; ++i3)
534  {
535  test_for_zero(t4_1(0, i1, i2, i3) - t4(i3, 0, i2, i1),
536  "T4(i,j,k,l)=T4(l,i,k,j)(0," + std::to_string(i1)
537  + "," + std::to_string(i2) + ","
538  + std::to_string(i3) + ")");
539  test_for_zero((t4_1(i, j, k, l) + t4(l, i, k, j))(0, i1, i2, i3)
540  - 2 * t4_1(0, i1, i2, i3),
541  "T4(i,j,k,l)+T4(l,i,k,j)(0," + std::to_string(i1)
542  + "," + std::to_string(i2) + ","
543  + std::to_string(i3) + ")");
544  test_for_zero((t4_1(i, j, k, l) - t4(l, i, k, j))(0, i1, i2, i3),
545  "T4(i,j,k,l)-T4(l,i,k,j)(0," + std::to_string(i1)
546  + "," + std::to_string(i2) + ","
547  + std::to_string(i3) + ")");
548  }
549  }
550 }

◆ test_T4_02()

void test_T4_02 ( const Tensor4< double, 1, 2, 3, 4 > &  t4_1,
const Tensor2< double, 4, 3 > &  t2_4,
const Tensor2< double, 3, 4 > &  t2_5 
)

Definition at line 8 of file test_T4_02.cpp.

11 {
16 
17  for(int ii = 0; ii < 1; ++ii)
18  {
19  for(int jj = 0; jj < 2; ++jj)
20  {
21  test_for_zero((t4_1(i, j, k, l) * t2_5(k, l))(ii, jj)
22  - (t4_1(ii, jj, 0, 0) * t2_5(0, 0)
23  + t4_1(ii, jj, 0, 1) * t2_5(0, 1)
24  + t4_1(ii, jj, 0, 2) * t2_5(0, 2)
25  + t4_1(ii, jj, 0, 3) * t2_5(0, 3)
26  + t4_1(ii, jj, 1, 0) * t2_5(1, 0)
27  + t4_1(ii, jj, 1, 1) * t2_5(1, 1)
28  + t4_1(ii, jj, 1, 2) * t2_5(1, 2)
29  + t4_1(ii, jj, 1, 3) * t2_5(1, 3)
30  + t4_1(ii, jj, 2, 0) * t2_5(2, 0)
31  + t4_1(ii, jj, 2, 1) * t2_5(2, 1)
32  + t4_1(ii, jj, 2, 2) * t2_5(2, 2)
33  + t4_1(ii, jj, 2, 3) * t2_5(2, 3)),
34  "T4(i,j,k,l)*T2(k,l)(" + std::to_string(ii) + ","
35  + std::to_string(jj) + ")");
36  test_for_zero((t2_5(k, l) * t4_1(i, j, k, l))(ii, jj)
37  - (t4_1(ii, jj, 0, 0) * t2_5(0, 0)
38  + t4_1(ii, jj, 0, 1) * t2_5(0, 1)
39  + t4_1(ii, jj, 0, 2) * t2_5(0, 2)
40  + t4_1(ii, jj, 0, 3) * t2_5(0, 3)
41  + t4_1(ii, jj, 1, 0) * t2_5(1, 0)
42  + t4_1(ii, jj, 1, 1) * t2_5(1, 1)
43  + t4_1(ii, jj, 1, 2) * t2_5(1, 2)
44  + t4_1(ii, jj, 1, 3) * t2_5(1, 3)
45  + t4_1(ii, jj, 2, 0) * t2_5(2, 0)
46  + t4_1(ii, jj, 2, 1) * t2_5(2, 1)
47  + t4_1(ii, jj, 2, 2) * t2_5(2, 2)
48  + t4_1(ii, jj, 2, 3) * t2_5(2, 3)),
49  "T2(k,l)*T4(i,j,k,l)(" + std::to_string(ii) + ","
50  + std::to_string(jj) + ")");
51  test_for_zero((t4_1(i, j, k, l) * t2_4(l, k))(ii, jj)
52  - (t4_1(ii, jj, 0, 0) * t2_4(0, 0)
53  + t4_1(ii, jj, 0, 1) * t2_4(1, 0)
54  + t4_1(ii, jj, 0, 2) * t2_4(2, 0)
55  + t4_1(ii, jj, 0, 3) * t2_4(3, 0)
56  + t4_1(ii, jj, 1, 0) * t2_4(0, 1)
57  + t4_1(ii, jj, 1, 1) * t2_4(1, 1)
58  + t4_1(ii, jj, 1, 2) * t2_4(2, 1)
59  + t4_1(ii, jj, 1, 3) * t2_4(3, 1)
60  + t4_1(ii, jj, 2, 0) * t2_4(0, 2)
61  + t4_1(ii, jj, 2, 1) * t2_4(1, 2)
62  + t4_1(ii, jj, 2, 2) * t2_4(2, 2)
63  + t4_1(ii, jj, 2, 3) * t2_4(3, 2)),
64  "T4(i,j,k,l)*T2(l,k)(" + std::to_string(ii) + ","
65  + std::to_string(jj) + ")");
66  test_for_zero((t2_4(l, k) * t4_1(i, j, k, l))(ii, jj)
67  - (t4_1(ii, jj, 0, 0) * t2_4(0, 0)
68  + t4_1(ii, jj, 0, 1) * t2_4(1, 0)
69  + t4_1(ii, jj, 0, 2) * t2_4(2, 0)
70  + t4_1(ii, jj, 0, 3) * t2_4(3, 0)
71  + t4_1(ii, jj, 1, 0) * t2_4(0, 1)
72  + t4_1(ii, jj, 1, 1) * t2_4(1, 1)
73  + t4_1(ii, jj, 1, 2) * t2_4(2, 1)
74  + t4_1(ii, jj, 1, 3) * t2_4(3, 1)
75  + t4_1(ii, jj, 2, 0) * t2_4(0, 2)
76  + t4_1(ii, jj, 2, 1) * t2_4(1, 2)
77  + t4_1(ii, jj, 2, 2) * t2_4(2, 2)
78  + t4_1(ii, jj, 2, 3) * t2_4(3, 2)),
79  "T2(l,k)*T4(i,j,k,l)(" + std::to_string(ii) + ","
80  + std::to_string(jj) + ")");
81  }
82  for(int kk = 0; kk < 3; ++kk)
83  {
84  test_for_zero((t4_1(i, j, k, l) * t2_5(j, l))(ii, kk)
85  - (t4_1(ii, 0, kk, 0) * t2_5(0, 0)
86  + t4_1(ii, 0, kk, 1) * t2_5(0, 1)
87  + t4_1(ii, 0, kk, 2) * t2_5(0, 2)
88  + t4_1(ii, 0, kk, 3) * t2_5(0, 3)
89  + t4_1(ii, 1, kk, 0) * t2_5(1, 0)
90  + t4_1(ii, 1, kk, 1) * t2_5(1, 1)
91  + t4_1(ii, 1, kk, 2) * t2_5(1, 2)
92  + t4_1(ii, 1, kk, 3) * t2_5(1, 3)),
93  "T4(i,j,k,l)*T2(j,l)(" + std::to_string(ii) + ","
94  + std::to_string(kk) + ")");
95  test_for_zero((t2_5(j, l) * t4_1(i, j, k, l))(ii, kk)
96  - (t4_1(ii, 0, kk, 0) * t2_5(0, 0)
97  + t4_1(ii, 0, kk, 1) * t2_5(0, 1)
98  + t4_1(ii, 0, kk, 2) * t2_5(0, 2)
99  + t4_1(ii, 0, kk, 3) * t2_5(0, 3)
100  + t4_1(ii, 1, kk, 0) * t2_5(1, 0)
101  + t4_1(ii, 1, kk, 1) * t2_5(1, 1)
102  + t4_1(ii, 1, kk, 2) * t2_5(1, 2)
103  + t4_1(ii, 1, kk, 3) * t2_5(1, 3)),
104  "T2(j,l)*T4(i,j,k,l)(" + std::to_string(ii) + ","
105  + std::to_string(kk) + ")");
106  test_for_zero((t4_1(i, j, k, l) * t2_4(l, j))(ii, kk)
107  - (t4_1(ii, 0, kk, 0) * t2_4(0, 0)
108  + t4_1(ii, 0, kk, 1) * t2_4(1, 0)
109  + t4_1(ii, 0, kk, 2) * t2_4(2, 0)
110  + t4_1(ii, 0, kk, 3) * t2_4(3, 0)
111  + t4_1(ii, 1, kk, 0) * t2_4(0, 1)
112  + t4_1(ii, 1, kk, 1) * t2_4(1, 1)
113  + t4_1(ii, 1, kk, 2) * t2_4(2, 1)
114  + t4_1(ii, 1, kk, 3) * t2_4(3, 1)),
115  "T4(i,j,k,l)*T2(l,j)(" + std::to_string(ii) + ","
116  + std::to_string(kk) + ")");
117  test_for_zero((t2_4(l, j) * t4_1(i, j, k, l))(ii, kk)
118  - (t4_1(ii, 0, kk, 0) * t2_4(0, 0)
119  + t4_1(ii, 0, kk, 1) * t2_4(1, 0)
120  + t4_1(ii, 0, kk, 2) * t2_4(2, 0)
121  + t4_1(ii, 0, kk, 3) * t2_4(3, 0)
122  + t4_1(ii, 1, kk, 0) * t2_4(0, 1)
123  + t4_1(ii, 1, kk, 1) * t2_4(1, 1)
124  + t4_1(ii, 1, kk, 2) * t2_4(2, 1)
125  + t4_1(ii, 1, kk, 3) * t2_4(3, 1)),
126  "T2(l,j)*T4(i,j,k,l)(" + std::to_string(ii) + ","
127  + std::to_string(kk) + ")");
128  }
129  for(int ll = 0; ll < 4; ++ll)
130  {
131  test_for_zero((t4_1(i, j, k, l) * t2_5(j, k))(ii, ll)
132  - (t4_1(ii, 0, 0, ll) * t2_5(0, 0)
133  + t4_1(ii, 0, 1, ll) * t2_5(0, 1)
134  + t4_1(ii, 0, 2, ll) * t2_5(0, 2)
135  + t4_1(ii, 1, 0, ll) * t2_5(1, 0)
136  + t4_1(ii, 1, 1, ll) * t2_5(1, 1)
137  + t4_1(ii, 1, 2, ll) * t2_5(1, 2)),
138  "T4(i,j,k,l)*T2(j,k)(" + std::to_string(ii) + ","
139  + std::to_string(ll) + ")");
140  test_for_zero((t2_5(j, k) * t4_1(i, j, k, l))(ii, ll)
141  - (t4_1(ii, 0, 0, ll) * t2_5(0, 0)
142  + t4_1(ii, 0, 1, ll) * t2_5(0, 1)
143  + t4_1(ii, 0, 2, ll) * t2_5(0, 2)
144  + t4_1(ii, 1, 0, ll) * t2_5(1, 0)
145  + t4_1(ii, 1, 1, ll) * t2_5(1, 1)
146  + t4_1(ii, 1, 2, ll) * t2_5(1, 2)),
147  "T2(j,k)*T4(i,j,k,l)(" + std::to_string(ii) + ","
148  + std::to_string(ll) + ")");
149  test_for_zero((t4_1(i, j, k, l) * t2_4(k, j))(ii, ll)
150  - (t4_1(ii, 0, 0, ll) * t2_4(0, 0)
151  + t4_1(ii, 0, 1, ll) * t2_4(1, 0)
152  + t4_1(ii, 0, 2, ll) * t2_4(2, 0)
153  + t4_1(ii, 1, 0, ll) * t2_4(0, 1)
154  + t4_1(ii, 1, 1, ll) * t2_4(1, 1)
155  + t4_1(ii, 1, 2, ll) * t2_4(2, 1)),
156  "T4(i,j,k,l)*T2(k,j)(" + std::to_string(ii) + ","
157  + std::to_string(ll) + ")");
158  test_for_zero((t2_4(k, j) * t4_1(i, j, k, l))(ii, ll)
159  - (t4_1(ii, 0, 0, ll) * t2_4(0, 0)
160  + t4_1(ii, 0, 1, ll) * t2_4(1, 0)
161  + t4_1(ii, 0, 2, ll) * t2_4(2, 0)
162  + t4_1(ii, 1, 0, ll) * t2_4(0, 1)
163  + t4_1(ii, 1, 1, ll) * t2_4(1, 1)
164  + t4_1(ii, 1, 2, ll) * t2_4(2, 1)),
165  "T2(k,j)*T4(i,j,k,l)(" + std::to_string(ii) + ","
166  + std::to_string(ll) + ")");
167  }
168  }
169  for(int jj = 0; jj < 2; ++jj)
170  {
171  for(int kk = 0; kk < 3; ++kk)
172  {
173  test_for_zero((t4_1(i, j, k, l) * t2_5(i, l))(jj, kk)
174  - (t4_1(0, jj, kk, 0) * t2_5(0, 0)
175  + t4_1(0, jj, kk, 1) * t2_5(0, 1)
176  + t4_1(0, jj, kk, 2) * t2_5(0, 2)
177  + t4_1(0, jj, kk, 3) * t2_5(0, 3)),
178  "T4(i,j,k,l)*T2(i,l)(" + std::to_string(jj) + ","
179  + std::to_string(kk) + ")");
180  test_for_zero((t2_5(i, l) * t4_1(i, j, k, l))(jj, kk)
181  - (t4_1(0, jj, kk, 0) * t2_5(0, 0)
182  + t4_1(0, jj, kk, 1) * t2_5(0, 1)
183  + t4_1(0, jj, kk, 2) * t2_5(0, 2)
184  + t4_1(0, jj, kk, 3) * t2_5(0, 3)),
185  "T2(i,l)*T4(i,j,k,l)(" + std::to_string(jj) + ","
186  + std::to_string(kk) + ")");
187  test_for_zero((t4_1(i, j, k, l) * t2_4(l, i))(jj, kk)
188  - (t4_1(0, jj, kk, 0) * t2_4(0, 0)
189  + t4_1(0, jj, kk, 1) * t2_4(1, 0)
190  + t4_1(0, jj, kk, 2) * t2_4(2, 0)
191  + t4_1(0, jj, kk, 3) * t2_4(3, 0)),
192  "T4(i,j,k,l)*T2(l,i)(" + std::to_string(jj) + ","
193  + std::to_string(kk) + ")");
194  test_for_zero((t2_4(l, i) * t4_1(i, j, k, l))(jj, kk)
195  - (t4_1(0, jj, kk, 0) * t2_4(0, 0)
196  + t4_1(0, jj, kk, 1) * t2_4(1, 0)
197  + t4_1(0, jj, kk, 2) * t2_4(2, 0)
198  + t4_1(0, jj, kk, 3) * t2_4(3, 0)),
199  "T2(l,i)*T4(i,j,k,l)(" + std::to_string(jj) + ","
200  + std::to_string(kk) + ")");
201  }
202  for(int ll = 0; ll < 4; ++ll)
203  {
204  test_for_zero((t4_1(i, j, k, l) * t2_5(i, k))(jj, ll)
205  - (t4_1(0, jj, 0, ll) * t2_5(0, 0)
206  + t4_1(0, jj, 1, ll) * t2_5(0, 1)
207  + t4_1(0, jj, 2, ll) * t2_5(0, 2)),
208  "T4(i,j,k,l)*T2(i,k)(" + std::to_string(jj) + ","
209  + std::to_string(ll) + ")");
210  test_for_zero((t2_5(i, k) * t4_1(i, j, k, l))(jj, ll)
211  - (t4_1(0, jj, 0, ll) * t2_5(0, 0)
212  + t4_1(0, jj, 1, ll) * t2_5(0, 1)
213  + t4_1(0, jj, 2, ll) * t2_5(0, 2)),
214  "T2(i,k)*T4(i,j,k,l)(" + std::to_string(jj) + ","
215  + std::to_string(ll) + ")");
216  test_for_zero((t4_1(i, j, k, l) * t2_4(k, i))(jj, ll)
217  - (t4_1(0, jj, 0, ll) * t2_4(0, 0)
218  + t4_1(0, jj, 1, ll) * t2_4(1, 0)
219  + t4_1(0, jj, 2, ll) * t2_4(2, 0)),
220  "T4(i,j,k,l)*T2(k,i)(" + std::to_string(jj) + ","
221  + std::to_string(ll) + ")");
222  test_for_zero((t2_4(k, i) * t4_1(i, j, k, l))(jj, ll)
223  - (t4_1(0, jj, 0, ll) * t2_4(0, 0)
224  + t4_1(0, jj, 1, ll) * t2_4(1, 0)
225  + t4_1(0, jj, 2, ll) * t2_4(2, 0)),
226  "T2(k,i)*T4(i,j,k,l)(" + std::to_string(jj) + ","
227  + std::to_string(ll) + ")");
228  }
229  }
230  for(int kk = 0; kk < 3; ++kk)
231  for(int ll = 0; ll < 4; ++ll)
232  {
233  test_for_zero((t4_1(i, j, k, l) * t2_5(i, j))(kk, ll)
234  - (t4_1(0, 0, kk, ll) * t2_5(0, 0)
235  + t4_1(0, 1, kk, ll) * t2_5(0, 1)),
236  "T4(i,j,k,l)*T2(i,j)(" + std::to_string(kk) + ","
237  + std::to_string(ll) + ")");
238  test_for_zero((t2_5(i, j) * t4_1(i, j, k, l))(kk, ll)
239  - (t4_1(0, 0, kk, ll) * t2_5(0, 0)
240  + t4_1(0, 1, kk, ll) * t2_5(0, 1)),
241  "T2(i,j)*T4(i,j,k,l)(" + std::to_string(kk) + ","
242  + std::to_string(ll) + ")");
243  test_for_zero((t4_1(i, j, k, l) * t2_4(j, i))(kk, ll)
244  - (t4_1(0, 0, kk, ll) * t2_4(0, 0)
245  + t4_1(0, 1, kk, ll) * t2_4(1, 0)),
246  "T4(i,j,k,l)*T2(j,i)(" + std::to_string(kk) + ","
247  + std::to_string(ll) + ")");
248  test_for_zero((t2_4(j, i) * t4_1(i, j, k, l))(kk, ll)
249  - (t4_1(0, 0, kk, ll) * t2_4(0, 0)
250  + t4_1(0, 1, kk, ll) * t2_4(1, 0)),
251  "T2(j,i)*T4(i,j,k,l)(" + std::to_string(kk) + ","
252  + std::to_string(ll) + ")");
253  }
254 }

◆ test_T4_04()

void test_T4_04 ( const Tensor4< double, 1, 2, 3, 4 > &  t4_1)

Definition at line 7 of file test_T4_04.cpp.

8 {
13 
14  {
15  for(int ii = 0; ii < 1; ++ii)
16  {
17  for(int jj = 0; jj < 2; ++jj)
18  {
20  t4(i, j, k, k)(ii, jj)
21  - (t4(ii, jj, 0, 0) + t4(ii, jj, 1, 1) + t4(ii, jj, 2, 2)),
22  "T4(i,j,k,k)(" + std::to_string(ii) + "," + std::to_string(jj)
23  + ")");
24  }
25  for(int kk = 0; kk < 3; ++kk)
26  {
27  test_for_zero(t4(i, j, k, j)(ii, kk)
28  - (t4(ii, 0, kk, 0) + t4(ii, 1, kk, 1)),
29  "T4(i,j,k,j)(" + std::to_string(ii) + ","
30  + std::to_string(kk) + ")");
31  }
32  for(int ll = 0; ll < 3; ++ll)
33  {
34  test_for_zero(t4(i, j, j, l)(ii, ll)
35  - (t4(ii, 0, 0, ll) + t4(ii, 1, 1, ll)),
36  "T4(i,j,j,l)(" + std::to_string(ii) + ","
37  + std::to_string(ll) + ")");
38  }
39  }
40  for(int jj = 0; jj < 2; ++jj)
41  {
42  for(int kk = 0; kk < 3; ++kk)
43  {
44  test_for_zero(t4(i, j, k, i)(jj, kk) - (t4(0, jj, kk, 0)),
45  "T4(i,j,k,i)(" + std::to_string(jj) + ","
46  + std::to_string(kk) + ")");
47  }
48  for(int ll = 0; ll < 3; ++ll)
49  {
50  test_for_zero(t4(i, j, i, l)(jj, ll) - (t4(0, jj, 0, ll)),
51  "T4(i,j,i,l)(" + std::to_string(jj) + ","
52  + std::to_string(ll) + ")");
53  }
54  }
55  for(int kk = 0; kk < 3; ++kk)
56  for(int ll = 0; ll < 3; ++ll)
57  {
58  test_for_zero(t4(i, i, k, l)(kk, ll) - (t4(0, 0, kk, ll)),
59  "T4(i,i,k,l)(" + std::to_string(kk) + ","
60  + std::to_string(ll) + ")");
61  }
62  }
63 }

◆ test_T4_05()

void test_T4_05 ( const Tensor4< double, 1, 2, 3, 4 > &  t4,
const Tensor2< double, 4, 3 > &  t2_4,
const Tensor2< double, 3, 4 > &  t2_5 
)

Definition at line 7 of file test_T4_05.cpp.

10 {
17 
18  for(int ii = 0; ii < 1; ++ii)
19  {
20  for(int jj = 0; jj < 2; ++jj)
21  {
22  for(int kk = 0; kk < 3; ++kk)
23  for(int mm = 0; mm < 3; ++mm)
24  {
25  test_for_zero((t4(i, j, k, l) * t2_4(l, m))(ii, jj, kk, mm)
26  - (t4(ii, jj, kk, 0) * t2_4(0, mm)
27  + t4(ii, jj, kk, 1) * t2_4(1, mm)
28  + t4(ii, jj, kk, 2) * t2_4(2, mm)
29  + t4(ii, jj, kk, 3) * t2_4(3, mm)),
30  "T4(i,j,k,l)*T2(l,m)(" + std::to_string(ii) + ","
31  + std::to_string(jj) + "," + std::to_string(kk)
32  + "," + std::to_string(mm) + ")");
33 
34  test_for_zero((t2_4(l, m) * t4(i, j, k, l))(ii, jj, kk, mm)
35  - (t4(ii, jj, kk, 0) * t2_4(0, mm)
36  + t4(ii, jj, kk, 1) * t2_4(1, mm)
37  + t4(ii, jj, kk, 2) * t2_4(2, mm)
38  + t4(ii, jj, kk, 3) * t2_4(3, mm)),
39  "T2(l,m)*T4(i,j,k,l)(" + std::to_string(ii) + ","
40  + std::to_string(jj) + "," + std::to_string(kk)
41  + "," + std::to_string(mm) + ")");
42 
43  test_for_zero((t4(i, j, k, l) * t2_5(m, l))(ii, jj, kk, mm)
44  - (t4(ii, jj, kk, 0) * t2_5(mm, 0)
45  + t4(ii, jj, kk, 1) * t2_5(mm, 1)
46  + t4(ii, jj, kk, 2) * t2_5(mm, 2)
47  + t4(ii, jj, kk, 3) * t2_5(mm, 3)),
48  "T4(i,j,k,l)*T2(m,l)(" + std::to_string(ii) + ","
49  + std::to_string(jj) + "," + std::to_string(kk)
50  + "," + std::to_string(mm) + ")");
51 
52  test_for_zero((t2_5(m, l) * t4(i, j, k, l))(ii, jj, kk, mm)
53  - (t4(ii, jj, kk, 0) * t2_5(mm, 0)
54  + t4(ii, jj, kk, 1) * t2_5(mm, 1)
55  + t4(ii, jj, kk, 2) * t2_5(mm, 2)
56  + t4(ii, jj, kk, 3) * t2_5(mm, 3)),
57  "T2(m,l)*T4(i,j,k,l)(" + std::to_string(ii) + ","
58  + std::to_string(jj) + "," + std::to_string(kk)
59  + "," + std::to_string(mm) + ")");
60  }
61  for(int ll = 0; ll < 4; ++ll)
62  for(int nn = 0; nn < 3; ++nn)
63  {
64  test_for_zero((t4(i, j, k, l) * t2_5(k, n))(ii, jj, ll, nn)
65  - (t4(ii, jj, 0, ll) * t2_5(0, nn)
66  + t4(ii, jj, 1, ll) * t2_5(1, nn)
67  + t4(ii, jj, 2, ll) * t2_5(2, nn)),
68  "T4(i,j,k,l)*T2(k,n)(" + std::to_string(ii) + ","
69  + std::to_string(jj) + "," + std::to_string(ll)
70  + "," + std::to_string(nn) + ")");
71  test_for_zero((t2_5(k, n) * t4(i, j, k, l))(ii, jj, ll, nn)
72  - (t4(ii, jj, 0, ll) * t2_5(0, nn)
73  + t4(ii, jj, 1, ll) * t2_5(1, nn)
74  + t4(ii, jj, 2, ll) * t2_5(2, nn)),
75  "T2(k,n)*T4(i,j,k,l)(" + std::to_string(ii) + ","
76  + std::to_string(jj) + "," + std::to_string(ll)
77  + "," + std::to_string(nn) + ")");
78  test_for_zero((t4(i, j, k, l) * t2_4(n, k))(ii, jj, ll, nn)
79  - (t4(ii, jj, 0, ll) * t2_4(nn, 0)
80  + t4(ii, jj, 1, ll) * t2_4(nn, 1)
81  + t4(ii, jj, 2, ll) * t2_4(nn, 2)),
82  "T4(i,j,k,l)*T2(n,k)(" + std::to_string(ii) + ","
83  + std::to_string(jj) + "," + std::to_string(ll)
84  + "," + std::to_string(nn) + ")");
85  test_for_zero((t2_4(n, k) * t4(i, j, k, l))(ii, jj, ll, nn)
86  - (t4(ii, jj, 0, ll) * t2_4(nn, 0)
87  + t4(ii, jj, 1, ll) * t2_4(nn, 1)
88  + t4(ii, jj, 2, ll) * t2_4(nn, 2)),
89  "T2(n,k)*T4(i,j,k,l)(" + std::to_string(ii) + ","
90  + std::to_string(jj) + "," + std::to_string(ll)
91  + "," + std::to_string(nn) + ")");
92  }
93  }
94  for(int kk = 0; kk < 3; ++kk)
95  for(int ll = 0; ll < 4; ++ll)
96  for(int mm = 0; mm < 3; ++mm)
97  {
98  test_for_zero((t4(i, j, k, l) * t2_4(j, m))(ii, kk, ll, mm)
99  - (t4(ii, 0, kk, ll) * t2_4(0, mm)
100  + t4(ii, 1, kk, ll) * t2_4(1, mm)),
101  "T4(i,j,k,l)*T2(j,m)(" + std::to_string(ii) + ","
102  + std::to_string(kk) + "," + std::to_string(ll)
103  + "," + std::to_string(mm) + ")");
104  test_for_zero((t2_4(j, m) * t4(i, j, k, l))(ii, kk, ll, mm)
105  - (t4(ii, 0, kk, ll) * t2_4(0, mm)
106  + t4(ii, 1, kk, ll) * t2_4(1, mm)),
107  "T2(j,m)*T4(i,j,k,l)(" + std::to_string(ii) + ","
108  + std::to_string(kk) + "," + std::to_string(ll)
109  + "," + std::to_string(mm) + ")");
110  test_for_zero((t4(i, j, k, l) * t2_4(m, j))(ii, kk, ll, mm)
111  - (t4(ii, 0, kk, ll) * t2_4(mm, 0)
112  + t4(ii, 1, kk, ll) * t2_4(mm, 1)),
113  "T4(i,j,k,l)*T2(m,j)(" + std::to_string(ii) + ","
114  + std::to_string(kk) + "," + std::to_string(ll)
115  + "," + std::to_string(mm) + ")");
116  test_for_zero((t2_4(m, j) * t4(i, j, k, l))(ii, kk, ll, mm)
117  - (t4(ii, 0, kk, ll) * t2_4(mm, 0)
118  + t4(ii, 1, kk, ll) * t2_4(mm, 1)),
119  "T2(m,j)*T4(i,j,k,l)(" + std::to_string(ii) + ","
120  + std::to_string(kk) + "," + std::to_string(ll)
121  + "," + std::to_string(mm) + ")");
122  }
123  }
124  for(int jj = 0; jj < 2; ++jj)
125  for(int kk = 0; kk < 3; ++kk)
126  for(int ll = 0; ll < 4; ++ll)
127  for(int mm = 0; mm < 3; ++mm)
128  {
129  test_for_zero((t4(i, j, k, l) * t2_4(i, m))(jj, kk, ll, mm)
130  - t4(0, jj, kk, ll) * t2_4(0, mm),
131  "T4(i,j,k,l)*T2(i,m)(" + std::to_string(jj) + ","
132  + std::to_string(kk) + "," + std::to_string(ll)
133  + "," + std::to_string(mm) + ")");
134  test_for_zero((t2_4(i, m) * t4(i, j, k, l))(jj, kk, ll, mm)
135  - t4(0, jj, kk, ll) * t2_4(0, mm),
136  "T2(i,m)*T4(i,j,k,l)(" + std::to_string(jj) + ","
137  + std::to_string(kk) + "," + std::to_string(ll)
138  + "," + std::to_string(mm) + ")");
139  test_for_zero((t4(i, j, k, l) * t2_4(m, i))(jj, kk, ll, mm)
140  - t4(0, jj, kk, ll) * t2_4(mm, 0),
141  "T4(i,j,k,l)*T2(m,i)(" + std::to_string(jj) + ","
142  + std::to_string(kk) + "," + std::to_string(ll)
143  + "," + std::to_string(mm) + ")");
144  test_for_zero((t2_4(m, i) * t4(i, j, k, l))(jj, kk, ll, mm)
145  - t4(0, jj, kk, ll) * t2_4(mm, 0),
146  "T2(m,i)*T4(i,j,k,l)(" + std::to_string(jj) + ","
147  + std::to_string(kk) + "," + std::to_string(ll)
148  + "," + std::to_string(mm) + ")");
149  }
150 }

◆ test_T4_06()

void test_T4_06 ( const Tensor4< double, 1, 2, 3, 4 > &  t4,
const Tensor3< double, 2, 3, 4 > &  t3_2 
)

Definition at line 7 of file test_T4_06.cpp.

9 {
14 
15  for(int ii = 0; ii < 1; ++ii)
16  {
17  test_for_zero((t4(i, j, k, l) * t3_2(j, k, l))(ii)
18  - (t4(ii, 0, 0, 0) * t3_2(0, 0, 0)
19  + t4(ii, 0, 0, 1) * t3_2(0, 0, 1)
20  + t4(ii, 0, 0, 2) * t3_2(0, 0, 2)
21  + t4(ii, 0, 0, 3) * t3_2(0, 0, 3)
22  + t4(ii, 0, 1, 0) * t3_2(0, 1, 0)
23  + t4(ii, 0, 1, 1) * t3_2(0, 1, 1)
24  + t4(ii, 0, 1, 2) * t3_2(0, 1, 2)
25  + t4(ii, 0, 1, 3) * t3_2(0, 1, 3)
26  + t4(ii, 0, 2, 0) * t3_2(0, 2, 0)
27  + t4(ii, 0, 2, 1) * t3_2(0, 2, 1)
28  + t4(ii, 0, 2, 2) * t3_2(0, 2, 2)
29  + t4(ii, 0, 2, 3) * t3_2(0, 2, 3)
30  + t4(ii, 1, 0, 0) * t3_2(1, 0, 0)
31  + t4(ii, 1, 0, 1) * t3_2(1, 0, 1)
32  + t4(ii, 1, 0, 2) * t3_2(1, 0, 2)
33  + t4(ii, 1, 0, 3) * t3_2(1, 0, 3)
34  + t4(ii, 1, 1, 0) * t3_2(1, 1, 0)
35  + t4(ii, 1, 1, 1) * t3_2(1, 1, 1)
36  + t4(ii, 1, 1, 2) * t3_2(1, 1, 2)
37  + t4(ii, 1, 1, 3) * t3_2(1, 1, 3)
38  + t4(ii, 1, 2, 0) * t3_2(1, 2, 0)
39  + t4(ii, 1, 2, 1) * t3_2(1, 2, 1)
40  + t4(ii, 1, 2, 2) * t3_2(1, 2, 2)
41  + t4(ii, 1, 2, 3) * t3_2(1, 2, 3)),
42  "T4(i,j,k,l)*T3(j,k,l)(" + std::to_string(ii) + ")");
43  test_for_zero((t3_2(j, k, l) * t4(i, j, k, l))(ii)
44  - (t4(ii, 0, 0, 0) * t3_2(0, 0, 0)
45  + t4(ii, 0, 0, 1) * t3_2(0, 0, 1)
46  + t4(ii, 0, 0, 2) * t3_2(0, 0, 2)
47  + t4(ii, 0, 0, 3) * t3_2(0, 0, 3)
48  + t4(ii, 0, 1, 0) * t3_2(0, 1, 0)
49  + t4(ii, 0, 1, 1) * t3_2(0, 1, 1)
50  + t4(ii, 0, 1, 2) * t3_2(0, 1, 2)
51  + t4(ii, 0, 1, 3) * t3_2(0, 1, 3)
52  + t4(ii, 0, 2, 0) * t3_2(0, 2, 0)
53  + t4(ii, 0, 2, 1) * t3_2(0, 2, 1)
54  + t4(ii, 0, 2, 2) * t3_2(0, 2, 2)
55  + t4(ii, 0, 2, 3) * t3_2(0, 2, 3)
56  + t4(ii, 1, 0, 0) * t3_2(1, 0, 0)
57  + t4(ii, 1, 0, 1) * t3_2(1, 0, 1)
58  + t4(ii, 1, 0, 2) * t3_2(1, 0, 2)
59  + t4(ii, 1, 0, 3) * t3_2(1, 0, 3)
60  + t4(ii, 1, 1, 0) * t3_2(1, 1, 0)
61  + t4(ii, 1, 1, 1) * t3_2(1, 1, 1)
62  + t4(ii, 1, 1, 2) * t3_2(1, 1, 2)
63  + t4(ii, 1, 1, 3) * t3_2(1, 1, 3)
64  + t4(ii, 1, 2, 0) * t3_2(1, 2, 0)
65  + t4(ii, 1, 2, 1) * t3_2(1, 2, 1)
66  + t4(ii, 1, 2, 2) * t3_2(1, 2, 2)
67  + t4(ii, 1, 2, 3) * t3_2(1, 2, 3)),
68  "T3(j,k,l)*T4(i,j,k,l)(" + std::to_string(ii) + ")");
69  }
70  {
72  t3(j, l, k) = t3_2(j, k, l);
73 
74  for(int ii = 0; ii < 1; ++ii)
75  {
77  (t4(i, j, k, l) * t3(j, l, k))(ii)
78  - (t4(ii, 0, 0, 0) * t3(0, 0, 0) + t4(ii, 0, 0, 1) * t3(0, 1, 0)
79  + t4(ii, 0, 0, 2) * t3(0, 2, 0) + t4(ii, 0, 0, 3) * t3(0, 3, 0)
80  + t4(ii, 0, 1, 0) * t3(0, 0, 1) + t4(ii, 0, 1, 1) * t3(0, 1, 1)
81  + t4(ii, 0, 1, 2) * t3(0, 2, 1) + t4(ii, 0, 1, 3) * t3(0, 3, 1)
82  + t4(ii, 0, 2, 0) * t3(0, 0, 2) + t4(ii, 0, 2, 1) * t3(0, 1, 2)
83  + t4(ii, 0, 2, 2) * t3(0, 2, 2) + t4(ii, 0, 2, 3) * t3(0, 3, 2)
84  + t4(ii, 1, 0, 0) * t3(1, 0, 0) + t4(ii, 1, 0, 1) * t3(1, 1, 0)
85  + t4(ii, 1, 0, 2) * t3(1, 2, 0) + t4(ii, 1, 0, 3) * t3(1, 3, 0)
86  + t4(ii, 1, 1, 0) * t3(1, 0, 1) + t4(ii, 1, 1, 1) * t3(1, 1, 1)
87  + t4(ii, 1, 1, 2) * t3(1, 2, 1) + t4(ii, 1, 1, 3) * t3(1, 3, 1)
88  + t4(ii, 1, 2, 0) * t3(1, 0, 2) + t4(ii, 1, 2, 1) * t3(1, 1, 2)
89  + t4(ii, 1, 2, 2) * t3(1, 2, 2)
90  + t4(ii, 1, 2, 3) * t3(1, 3, 2)),
91  "T4(i,j,k,l)*T3(j,l,k)(" + std::to_string(ii) + ")");
93  (t3(j, l, k) * t4(i, j, k, l))(ii)
94  - (t4(ii, 0, 0, 0) * t3(0, 0, 0) + t4(ii, 0, 0, 1) * t3(0, 1, 0)
95  + t4(ii, 0, 0, 2) * t3(0, 2, 0) + t4(ii, 0, 0, 3) * t3(0, 3, 0)
96  + t4(ii, 0, 1, 0) * t3(0, 0, 1) + t4(ii, 0, 1, 1) * t3(0, 1, 1)
97  + t4(ii, 0, 1, 2) * t3(0, 2, 1) + t4(ii, 0, 1, 3) * t3(0, 3, 1)
98  + t4(ii, 0, 2, 0) * t3(0, 0, 2) + t4(ii, 0, 2, 1) * t3(0, 1, 2)
99  + t4(ii, 0, 2, 2) * t3(0, 2, 2) + t4(ii, 0, 2, 3) * t3(0, 3, 2)
100  + t4(ii, 1, 0, 0) * t3(1, 0, 0) + t4(ii, 1, 0, 1) * t3(1, 1, 0)
101  + t4(ii, 1, 0, 2) * t3(1, 2, 0) + t4(ii, 1, 0, 3) * t3(1, 3, 0)
102  + t4(ii, 1, 1, 0) * t3(1, 0, 1) + t4(ii, 1, 1, 1) * t3(1, 1, 1)
103  + t4(ii, 1, 1, 2) * t3(1, 2, 1) + t4(ii, 1, 1, 3) * t3(1, 3, 1)
104  + t4(ii, 1, 2, 0) * t3(1, 0, 2) + t4(ii, 1, 2, 1) * t3(1, 1, 2)
105  + t4(ii, 1, 2, 2) * t3(1, 2, 2)
106  + t4(ii, 1, 2, 3) * t3(1, 3, 2)),
107  "T3(j,l,k)*T4(i,j,k,l)(" + std::to_string(ii) + ")");
108  }
109  }
110  {
112  t3(k, j, l) = t3_2(j, k, l);
113 
114  for(int ii = 0; ii < 1; ++ii)
115  {
117  (t4(i, j, k, l) * t3(k, j, l))(ii)
118  - (t4(ii, 0, 0, 0) * t3(0, 0, 0) + t4(ii, 0, 0, 1) * t3(0, 0, 1)
119  + t4(ii, 0, 0, 2) * t3(0, 0, 2) + t4(ii, 0, 0, 3) * t3(0, 0, 3)
120  + t4(ii, 0, 1, 0) * t3(1, 0, 0) + t4(ii, 0, 1, 1) * t3(1, 0, 1)
121  + t4(ii, 0, 1, 2) * t3(1, 0, 2) + t4(ii, 0, 1, 3) * t3(1, 0, 3)
122  + t4(ii, 0, 2, 0) * t3(2, 0, 0) + t4(ii, 0, 2, 1) * t3(2, 0, 1)
123  + t4(ii, 0, 2, 2) * t3(2, 0, 2) + t4(ii, 0, 2, 3) * t3(2, 0, 3)
124  + t4(ii, 1, 0, 0) * t3(0, 1, 0) + t4(ii, 1, 0, 1) * t3(0, 1, 1)
125  + t4(ii, 1, 0, 2) * t3(0, 1, 2) + t4(ii, 1, 0, 3) * t3(0, 1, 3)
126  + t4(ii, 1, 1, 0) * t3(1, 1, 0) + t4(ii, 1, 1, 1) * t3(1, 1, 1)
127  + t4(ii, 1, 1, 2) * t3(1, 1, 2) + t4(ii, 1, 1, 3) * t3(1, 1, 3)
128  + t4(ii, 1, 2, 0) * t3(2, 1, 0) + t4(ii, 1, 2, 1) * t3(2, 1, 1)
129  + t4(ii, 1, 2, 2) * t3(2, 1, 2)
130  + t4(ii, 1, 2, 3) * t3(2, 1, 3)),
131  "T4(i,j,k,l)*T3(k,j,l)(" + std::to_string(ii) + ")");
133  (t3(k, j, l) * t4(i, j, k, l))(ii)
134  - (t4(ii, 0, 0, 0) * t3(0, 0, 0) + t4(ii, 0, 0, 1) * t3(0, 0, 1)
135  + t4(ii, 0, 0, 2) * t3(0, 0, 2) + t4(ii, 0, 0, 3) * t3(0, 0, 3)
136  + t4(ii, 0, 1, 0) * t3(1, 0, 0) + t4(ii, 0, 1, 1) * t3(1, 0, 1)
137  + t4(ii, 0, 1, 2) * t3(1, 0, 2) + t4(ii, 0, 1, 3) * t3(1, 0, 3)
138  + t4(ii, 0, 2, 0) * t3(2, 0, 0) + t4(ii, 0, 2, 1) * t3(2, 0, 1)
139  + t4(ii, 0, 2, 2) * t3(2, 0, 2) + t4(ii, 0, 2, 3) * t3(2, 0, 3)
140  + t4(ii, 1, 0, 0) * t3(0, 1, 0) + t4(ii, 1, 0, 1) * t3(0, 1, 1)
141  + t4(ii, 1, 0, 2) * t3(0, 1, 2) + t4(ii, 1, 0, 3) * t3(0, 1, 3)
142  + t4(ii, 1, 1, 0) * t3(1, 1, 0) + t4(ii, 1, 1, 1) * t3(1, 1, 1)
143  + t4(ii, 1, 1, 2) * t3(1, 1, 2) + t4(ii, 1, 1, 3) * t3(1, 1, 3)
144  + t4(ii, 1, 2, 0) * t3(2, 1, 0) + t4(ii, 1, 2, 1) * t3(2, 1, 1)
145  + t4(ii, 1, 2, 2) * t3(2, 1, 2)
146  + t4(ii, 1, 2, 3) * t3(2, 1, 3)),
147  "T3(k,j,l)*T4(i,j,k,l)(" + std::to_string(ii) + ")");
148  }
149  }
150  {
152  t3(k, l, j) = t3_2(j, k, l);
153  for(int ii = 0; ii < 1; ++ii)
154  {
156  (t4(i, j, k, l) * t3(k, l, j))(ii)
157  - (t4(ii, 0, 0, 0) * t3(0, 0, 0) + t4(ii, 0, 0, 1) * t3(0, 1, 0)
158  + t4(ii, 0, 0, 2) * t3(0, 2, 0) + t4(ii, 0, 0, 3) * t3(0, 3, 0)
159  + t4(ii, 0, 1, 0) * t3(1, 0, 0) + t4(ii, 0, 1, 1) * t3(1, 1, 0)
160  + t4(ii, 0, 1, 2) * t3(1, 2, 0) + t4(ii, 0, 1, 3) * t3(1, 3, 0)
161  + t4(ii, 0, 2, 0) * t3(2, 0, 0) + t4(ii, 0, 2, 1) * t3(2, 1, 0)
162  + t4(ii, 0, 2, 2) * t3(2, 2, 0) + t4(ii, 0, 2, 3) * t3(2, 3, 0)
163  + t4(ii, 1, 0, 0) * t3(0, 0, 1) + t4(ii, 1, 0, 1) * t3(0, 1, 1)
164  + t4(ii, 1, 0, 2) * t3(0, 2, 1) + t4(ii, 1, 0, 3) * t3(0, 3, 1)
165  + t4(ii, 1, 1, 0) * t3(1, 0, 1) + t4(ii, 1, 1, 1) * t3(1, 1, 1)
166  + t4(ii, 1, 1, 2) * t3(1, 2, 1) + t4(ii, 1, 1, 3) * t3(1, 3, 1)
167  + t4(ii, 1, 2, 0) * t3(2, 0, 1) + t4(ii, 1, 2, 1) * t3(2, 1, 1)
168  + t4(ii, 1, 2, 2) * t3(2, 2, 1)
169  + t4(ii, 1, 2, 3) * t3(2, 3, 1)),
170  "T4(i,j,k,l)*T3(k,l,j)(" + std::to_string(ii) + ")");
172  (t3(k, l, j) * t4(i, j, k, l))(ii)
173  - (t4(ii, 0, 0, 0) * t3(0, 0, 0) + t4(ii, 0, 0, 1) * t3(0, 1, 0)
174  + t4(ii, 0, 0, 2) * t3(0, 2, 0) + t4(ii, 0, 0, 3) * t3(0, 3, 0)
175  + t4(ii, 0, 1, 0) * t3(1, 0, 0) + t4(ii, 0, 1, 1) * t3(1, 1, 0)
176  + t4(ii, 0, 1, 2) * t3(1, 2, 0) + t4(ii, 0, 1, 3) * t3(1, 3, 0)
177  + t4(ii, 0, 2, 0) * t3(2, 0, 0) + t4(ii, 0, 2, 1) * t3(2, 1, 0)
178  + t4(ii, 0, 2, 2) * t3(2, 2, 0) + t4(ii, 0, 2, 3) * t3(2, 3, 0)
179  + t4(ii, 1, 0, 0) * t3(0, 0, 1) + t4(ii, 1, 0, 1) * t3(0, 1, 1)
180  + t4(ii, 1, 0, 2) * t3(0, 2, 1) + t4(ii, 1, 0, 3) * t3(0, 3, 1)
181  + t4(ii, 1, 1, 0) * t3(1, 0, 1) + t4(ii, 1, 1, 1) * t3(1, 1, 1)
182  + t4(ii, 1, 1, 2) * t3(1, 2, 1) + t4(ii, 1, 1, 3) * t3(1, 3, 1)
183  + t4(ii, 1, 2, 0) * t3(2, 0, 1) + t4(ii, 1, 2, 1) * t3(2, 1, 1)
184  + t4(ii, 1, 2, 2) * t3(2, 2, 1)
185  + t4(ii, 1, 2, 3) * t3(2, 3, 1)),
186  "T3(k,l,j)*T4(i,j,k,l)(" + std::to_string(ii) + ")");
187  }
188  }
189  {
191  t3(l, j, k) = t3_2(j, k, l);
192  for(int ii = 0; ii < 1; ++ii)
193  {
195  (t4(i, j, k, l) * t3(l, j, k))(ii)
196  - (t4(ii, 0, 0, 0) * t3(0, 0, 0) + t4(ii, 0, 0, 1) * t3(1, 0, 0)
197  + t4(ii, 0, 0, 2) * t3(2, 0, 0) + t4(ii, 0, 0, 3) * t3(3, 0, 0)
198  + t4(ii, 0, 1, 0) * t3(0, 0, 1) + t4(ii, 0, 1, 1) * t3(1, 0, 1)
199  + t4(ii, 0, 1, 2) * t3(2, 0, 1) + t4(ii, 0, 1, 3) * t3(3, 0, 1)
200  + t4(ii, 0, 2, 0) * t3(0, 0, 2) + t4(ii, 0, 2, 1) * t3(1, 0, 2)
201  + t4(ii, 0, 2, 2) * t3(2, 0, 2) + t4(ii, 0, 2, 3) * t3(3, 0, 2)
202  + t4(ii, 1, 0, 0) * t3(0, 1, 0) + t4(ii, 1, 0, 1) * t3(1, 1, 0)
203  + t4(ii, 1, 0, 2) * t3(2, 1, 0) + t4(ii, 1, 0, 3) * t3(3, 1, 0)
204  + t4(ii, 1, 1, 0) * t3(0, 1, 1) + t4(ii, 1, 1, 1) * t3(1, 1, 1)
205  + t4(ii, 1, 1, 2) * t3(2, 1, 1) + t4(ii, 1, 1, 3) * t3(3, 1, 1)
206  + t4(ii, 1, 2, 0) * t3(0, 1, 2) + t4(ii, 1, 2, 1) * t3(1, 1, 2)
207  + t4(ii, 1, 2, 2) * t3(2, 1, 2)
208  + t4(ii, 1, 2, 3) * t3(3, 1, 2)),
209  "T4(i,j,k,l)*T3(l,j,k)(" + std::to_string(ii) + ")");
211  (t3(l, j, k) * t4(i, j, k, l))(ii)
212  - (t4(ii, 0, 0, 0) * t3(0, 0, 0) + t4(ii, 0, 0, 1) * t3(1, 0, 0)
213  + t4(ii, 0, 0, 2) * t3(2, 0, 0) + t4(ii, 0, 0, 3) * t3(3, 0, 0)
214  + t4(ii, 0, 1, 0) * t3(0, 0, 1) + t4(ii, 0, 1, 1) * t3(1, 0, 1)
215  + t4(ii, 0, 1, 2) * t3(2, 0, 1) + t4(ii, 0, 1, 3) * t3(3, 0, 1)
216  + t4(ii, 0, 2, 0) * t3(0, 0, 2) + t4(ii, 0, 2, 1) * t3(1, 0, 2)
217  + t4(ii, 0, 2, 2) * t3(2, 0, 2) + t4(ii, 0, 2, 3) * t3(3, 0, 2)
218  + t4(ii, 1, 0, 0) * t3(0, 1, 0) + t4(ii, 1, 0, 1) * t3(1, 1, 0)
219  + t4(ii, 1, 0, 2) * t3(2, 1, 0) + t4(ii, 1, 0, 3) * t3(3, 1, 0)
220  + t4(ii, 1, 1, 0) * t3(0, 1, 1) + t4(ii, 1, 1, 1) * t3(1, 1, 1)
221  + t4(ii, 1, 1, 2) * t3(2, 1, 1) + t4(ii, 1, 1, 3) * t3(3, 1, 1)
222  + t4(ii, 1, 2, 0) * t3(0, 1, 2) + t4(ii, 1, 2, 1) * t3(1, 1, 2)
223  + t4(ii, 1, 2, 2) * t3(2, 1, 2)
224  + t4(ii, 1, 2, 3) * t3(3, 1, 2)),
225  "T3(l,j,k)*T4(i,j,k,l)(" + std::to_string(ii) + ")");
226  }
227  }
228  {
230  t3(l, k, j) = t3_2(j, k, l);
231 
232  for(int ii = 0; ii < 1; ++ii)
233  {
235  (t4(i, j, k, l) * t3(l, k, j))(ii)
236  - (t4(ii, 0, 0, 0) * t3(0, 0, 0) + t4(ii, 0, 0, 1) * t3(1, 0, 0)
237  + t4(ii, 0, 0, 2) * t3(2, 0, 0) + t4(ii, 0, 0, 3) * t3(3, 0, 0)
238  + t4(ii, 0, 1, 0) * t3(0, 1, 0) + t4(ii, 0, 1, 1) * t3(1, 1, 0)
239  + t4(ii, 0, 1, 2) * t3(2, 1, 0) + t4(ii, 0, 1, 3) * t3(3, 1, 0)
240  + t4(ii, 0, 2, 0) * t3(0, 2, 0) + t4(ii, 0, 2, 1) * t3(1, 2, 0)
241  + t4(ii, 0, 2, 2) * t3(2, 2, 0) + t4(ii, 0, 2, 3) * t3(3, 2, 0)
242  + t4(ii, 1, 0, 0) * t3(0, 0, 1) + t4(ii, 1, 0, 1) * t3(1, 0, 1)
243  + t4(ii, 1, 0, 2) * t3(2, 0, 1) + t4(ii, 1, 0, 3) * t3(3, 0, 1)
244  + t4(ii, 1, 1, 0) * t3(0, 1, 1) + t4(ii, 1, 1, 1) * t3(1, 1, 1)
245  + t4(ii, 1, 1, 2) * t3(2, 1, 1) + t4(ii, 1, 1, 3) * t3(3, 1, 1)
246  + t4(ii, 1, 2, 0) * t3(0, 2, 1) + t4(ii, 1, 2, 1) * t3(1, 2, 1)
247  + t4(ii, 1, 2, 2) * t3(2, 2, 1)
248  + t4(ii, 1, 2, 3) * t3(3, 2, 1)),
249  "T4(i,j,k,l)*T3(l,k,j)(" + std::to_string(ii) + ")");
251  (t3(l, k, j) * t4(i, j, k, l))(ii)
252  - (t4(ii, 0, 0, 0) * t3(0, 0, 0) + t4(ii, 0, 0, 1) * t3(1, 0, 0)
253  + t4(ii, 0, 0, 2) * t3(2, 0, 0) + t4(ii, 0, 0, 3) * t3(3, 0, 0)
254  + t4(ii, 0, 1, 0) * t3(0, 1, 0) + t4(ii, 0, 1, 1) * t3(1, 1, 0)
255  + t4(ii, 0, 1, 2) * t3(2, 1, 0) + t4(ii, 0, 1, 3) * t3(3, 1, 0)
256  + t4(ii, 0, 2, 0) * t3(0, 2, 0) + t4(ii, 0, 2, 1) * t3(1, 2, 0)
257  + t4(ii, 0, 2, 2) * t3(2, 2, 0) + t4(ii, 0, 2, 3) * t3(3, 2, 0)
258  + t4(ii, 1, 0, 0) * t3(0, 0, 1) + t4(ii, 1, 0, 1) * t3(1, 0, 1)
259  + t4(ii, 1, 0, 2) * t3(2, 0, 1) + t4(ii, 1, 0, 3) * t3(3, 0, 1)
260  + t4(ii, 1, 1, 0) * t3(0, 1, 1) + t4(ii, 1, 1, 1) * t3(1, 1, 1)
261  + t4(ii, 1, 1, 2) * t3(2, 1, 1) + t4(ii, 1, 1, 3) * t3(3, 1, 1)
262  + t4(ii, 1, 2, 0) * t3(0, 2, 1) + t4(ii, 1, 2, 1) * t3(1, 2, 1)
263  + t4(ii, 1, 2, 2) * t3(2, 2, 1)
264  + t4(ii, 1, 2, 3) * t3(3, 2, 1)),
265  "T3(l,k,j)*T4(i,j,k,l)(" + std::to_string(ii) + ")");
266  }
267  }
268 
269  for(int jj = 0; jj < 2; ++jj)
270  {
271  test_for_zero((t4(i, j, k, l) * t3_2(i, k, l))(jj)
272  - (t4(0, jj, 0, 0) * t3_2(0, 0, 0)
273  + t4(0, jj, 0, 1) * t3_2(0, 0, 1)
274  + t4(0, jj, 0, 2) * t3_2(0, 0, 2)
275  + t4(0, jj, 0, 3) * t3_2(0, 0, 3)
276  + t4(0, jj, 1, 0) * t3_2(0, 1, 0)
277  + t4(0, jj, 1, 1) * t3_2(0, 1, 1)
278  + t4(0, jj, 1, 2) * t3_2(0, 1, 2)
279  + t4(0, jj, 1, 3) * t3_2(0, 1, 3)
280  + t4(0, jj, 2, 0) * t3_2(0, 2, 0)
281  + t4(0, jj, 2, 1) * t3_2(0, 2, 1)
282  + t4(0, jj, 2, 2) * t3_2(0, 2, 2)
283  + t4(0, jj, 2, 3) * t3_2(0, 2, 3)),
284  "T4(i,j,k,l)*T3(i,k,l)(" + std::to_string(jj) + ")");
285  test_for_zero((t3_2(i, k, l) * t4(i, j, k, l))(jj)
286  - (t4(0, jj, 0, 0) * t3_2(0, 0, 0)
287  + t4(0, jj, 0, 1) * t3_2(0, 0, 1)
288  + t4(0, jj, 0, 2) * t3_2(0, 0, 2)
289  + t4(0, jj, 0, 3) * t3_2(0, 0, 3)
290  + t4(0, jj, 1, 0) * t3_2(0, 1, 0)
291  + t4(0, jj, 1, 1) * t3_2(0, 1, 1)
292  + t4(0, jj, 1, 2) * t3_2(0, 1, 2)
293  + t4(0, jj, 1, 3) * t3_2(0, 1, 3)
294  + t4(0, jj, 2, 0) * t3_2(0, 2, 0)
295  + t4(0, jj, 2, 1) * t3_2(0, 2, 1)
296  + t4(0, jj, 2, 2) * t3_2(0, 2, 2)
297  + t4(0, jj, 2, 3) * t3_2(0, 2, 3)),
298  "T3(i,k,l)*T4(i,j,k,l)(" + std::to_string(jj) + ")");
299  }
300  {
302  t3(j, l, k) = t3_2(j, k, l);
303 
304  for(int jj = 0; jj < 2; ++jj)
305  {
307  (t4(i, j, k, l) * t3(i, l, k))(jj)
308  - (t4(0, jj, 0, 0) * t3(0, 0, 0) + t4(0, jj, 0, 1) * t3(0, 1, 0)
309  + t4(0, jj, 0, 2) * t3(0, 2, 0) + t4(0, jj, 0, 3) * t3(0, 3, 0)
310  + t4(0, jj, 1, 0) * t3(0, 0, 1) + t4(0, jj, 1, 1) * t3(0, 1, 1)
311  + t4(0, jj, 1, 2) * t3(0, 2, 1) + t4(0, jj, 1, 3) * t3(0, 3, 1)
312  + t4(0, jj, 2, 0) * t3(0, 0, 2) + t4(0, jj, 2, 1) * t3(0, 1, 2)
313  + t4(0, jj, 2, 2) * t3(0, 2, 2)
314  + t4(0, jj, 2, 3) * t3(0, 3, 2)),
315  "T4(i,j,k,l)*T3(i,l,k)(" + std::to_string(jj) + ")");
317  (t3(i, l, k) * t4(i, j, k, l))(jj)
318  - (t4(0, jj, 0, 0) * t3(0, 0, 0) + t4(0, jj, 0, 1) * t3(0, 1, 0)
319  + t4(0, jj, 0, 2) * t3(0, 2, 0) + t4(0, jj, 0, 3) * t3(0, 3, 0)
320  + t4(0, jj, 1, 0) * t3(0, 0, 1) + t4(0, jj, 1, 1) * t3(0, 1, 1)
321  + t4(0, jj, 1, 2) * t3(0, 2, 1) + t4(0, jj, 1, 3) * t3(0, 3, 1)
322  + t4(0, jj, 2, 0) * t3(0, 0, 2) + t4(0, jj, 2, 1) * t3(0, 1, 2)
323  + t4(0, jj, 2, 2) * t3(0, 2, 2)
324  + t4(0, jj, 2, 3) * t3(0, 3, 2)),
325  "T3(i,l,k)*T4(i,j,k,l)(" + std::to_string(jj) + ")");
326  }
327  }
328  {
330  t3(k, j, l) = t3_2(j, k, l);
331 
332  for(int jj = 0; jj < 2; ++jj)
333  {
335  (t4(i, j, k, l) * t3(k, i, l))(jj)
336  - (t4(0, jj, 0, 0) * t3(0, 0, 0) + t4(0, jj, 0, 1) * t3(0, 0, 1)
337  + t4(0, jj, 0, 2) * t3(0, 0, 2) + t4(0, jj, 0, 3) * t3(0, 0, 3)
338  + t4(0, jj, 1, 0) * t3(1, 0, 0) + t4(0, jj, 1, 1) * t3(1, 0, 1)
339  + t4(0, jj, 1, 2) * t3(1, 0, 2) + t4(0, jj, 1, 3) * t3(1, 0, 3)
340  + t4(0, jj, 2, 0) * t3(2, 0, 0) + t4(0, jj, 2, 1) * t3(2, 0, 1)
341  + t4(0, jj, 2, 2) * t3(2, 0, 2)
342  + t4(0, jj, 2, 3) * t3(2, 0, 3)),
343  "T4(i,j,k,l)*T3(k,i,l)(" + std::to_string(jj) + ")");
345  (t3(k, i, l) * t4(i, j, k, l))(jj)
346  - (t4(0, jj, 0, 0) * t3(0, 0, 0) + t4(0, jj, 0, 1) * t3(0, 0, 1)
347  + t4(0, jj, 0, 2) * t3(0, 0, 2) + t4(0, jj, 0, 3) * t3(0, 0, 3)
348  + t4(0, jj, 1, 0) * t3(1, 0, 0) + t4(0, jj, 1, 1) * t3(1, 0, 1)
349  + t4(0, jj, 1, 2) * t3(1, 0, 2) + t4(0, jj, 1, 3) * t3(1, 0, 3)
350  + t4(0, jj, 2, 0) * t3(2, 0, 0) + t4(0, jj, 2, 1) * t3(2, 0, 1)
351  + t4(0, jj, 2, 2) * t3(2, 0, 2)
352  + t4(0, jj, 2, 3) * t3(2, 0, 3)),
353  "T3(k,i,l)*T4(i,j,k,l)(" + std::to_string(jj) + ")");
354  }
355  }
356  {
358  t3(k, l, j) = t3_2(j, k, l);
359  for(int jj = 0; jj < 2; ++jj)
360  {
362  (t4(i, j, k, l) * t3(k, l, i))(jj)
363  - (t4(0, jj, 0, 0) * t3(0, 0, 0) + t4(0, jj, 0, 1) * t3(0, 1, 0)
364  + t4(0, jj, 0, 2) * t3(0, 2, 0) + t4(0, jj, 0, 3) * t3(0, 3, 0)
365  + t4(0, jj, 1, 0) * t3(1, 0, 0) + t4(0, jj, 1, 1) * t3(1, 1, 0)
366  + t4(0, jj, 1, 2) * t3(1, 2, 0) + t4(0, jj, 1, 3) * t3(1, 3, 0)
367  + t4(0, jj, 2, 0) * t3(2, 0, 0) + t4(0, jj, 2, 1) * t3(2, 1, 0)
368  + t4(0, jj, 2, 2) * t3(2, 2, 0)
369  + t4(0, jj, 2, 3) * t3(2, 3, 0)),
370  "T4(i,j,k,l)*T3(k,l,i)(" + std::to_string(jj) + ")");
372  (t3(k, l, i) * t4(i, j, k, l))(jj)
373  - (t4(0, jj, 0, 0) * t3(0, 0, 0) + t4(0, jj, 0, 1) * t3(0, 1, 0)
374  + t4(0, jj, 0, 2) * t3(0, 2, 0) + t4(0, jj, 0, 3) * t3(0, 3, 0)
375  + t4(0, jj, 1, 0) * t3(1, 0, 0) + t4(0, jj, 1, 1) * t3(1, 1, 0)
376  + t4(0, jj, 1, 2) * t3(1, 2, 0) + t4(0, jj, 1, 3) * t3(1, 3, 0)
377  + t4(0, jj, 2, 0) * t3(2, 0, 0) + t4(0, jj, 2, 1) * t3(2, 1, 0)
378  + t4(0, jj, 2, 2) * t3(2, 2, 0)
379  + t4(0, jj, 2, 3) * t3(2, 3, 0)),
380  "T3(k,l,i)*T4(i,j,k,l)(" + std::to_string(jj) + ")");
381  }
382  }
383  {
385  t3(l, j, k) = t3_2(j, k, l);
386  for(int jj = 0; jj < 2; ++jj)
387  {
389  (t4(i, j, k, l) * t3(l, i, k))(jj)
390  - (t4(0, jj, 0, 0) * t3(0, 0, 0) + t4(0, jj, 0, 1) * t3(1, 0, 0)
391  + t4(0, jj, 0, 2) * t3(2, 0, 0) + t4(0, jj, 0, 3) * t3(3, 0, 0)
392  + t4(0, jj, 1, 0) * t3(0, 0, 1) + t4(0, jj, 1, 1) * t3(1, 0, 1)
393  + t4(0, jj, 1, 2) * t3(2, 0, 1) + t4(0, jj, 1, 3) * t3(3, 0, 1)
394  + t4(0, jj, 2, 0) * t3(0, 0, 2) + t4(0, jj, 2, 1) * t3(1, 0, 2)
395  + t4(0, jj, 2, 2) * t3(2, 0, 2)
396  + t4(0, jj, 2, 3) * t3(3, 0, 2)),
397  "T4(i,j,k,l)*T3(l,i,k)(" + std::to_string(jj) + ")");
399  (t3(l, i, k) * t4(i, j, k, l))(jj)
400  - (t4(0, jj, 0, 0) * t3(0, 0, 0) + t4(0, jj, 0, 1) * t3(1, 0, 0)
401  + t4(0, jj, 0, 2) * t3(2, 0, 0) + t4(0, jj, 0, 3) * t3(3, 0, 0)
402  + t4(0, jj, 1, 0) * t3(0, 0, 1) + t4(0, jj, 1, 1) * t3(1, 0, 1)
403  + t4(0, jj, 1, 2) * t3(2, 0, 1) + t4(0, jj, 1, 3) * t3(3, 0, 1)
404  + t4(0, jj, 2, 0) * t3(0, 0, 2) + t4(0, jj, 2, 1) * t3(1, 0, 2)
405  + t4(0, jj, 2, 2) * t3(2, 0, 2)
406  + t4(0, jj, 2, 3) * t3(3, 0, 2)),
407  "T3(l,i,k)*T4(i,j,k,l)(" + std::to_string(jj) + ")");
408  }
409  }
410  {
412  t3(l, k, j) = t3_2(j, k, l);
413 
414  for(int jj = 0; jj < 2; ++jj)
415  {
417  (t4(i, j, k, l) * t3(l, k, i))(jj)
418  - (t4(0, jj, 0, 0) * t3(0, 0, 0) + t4(0, jj, 0, 1) * t3(1, 0, 0)
419  + t4(0, jj, 0, 2) * t3(2, 0, 0) + t4(0, jj, 0, 3) * t3(3, 0, 0)
420  + t4(0, jj, 1, 0) * t3(0, 1, 0) + t4(0, jj, 1, 1) * t3(1, 1, 0)
421  + t4(0, jj, 1, 2) * t3(2, 1, 0) + t4(0, jj, 1, 3) * t3(3, 1, 0)
422  + t4(0, jj, 2, 0) * t3(0, 2, 0) + t4(0, jj, 2, 1) * t3(1, 2, 0)
423  + t4(0, jj, 2, 2) * t3(2, 2, 0)
424  + t4(0, jj, 2, 3) * t3(3, 2, 0)),
425  "T4(i,j,k,l)*T3(l,k,i)(" + std::to_string(jj) + ")");
427  (t3(l, k, i) * t4(i, j, k, l))(jj)
428  - (t4(0, jj, 0, 0) * t3(0, 0, 0) + t4(0, jj, 0, 1) * t3(1, 0, 0)
429  + t4(0, jj, 0, 2) * t3(2, 0, 0) + t4(0, jj, 0, 3) * t3(3, 0, 0)
430  + t4(0, jj, 1, 0) * t3(0, 1, 0) + t4(0, jj, 1, 1) * t3(1, 1, 0)
431  + t4(0, jj, 1, 2) * t3(2, 1, 0) + t4(0, jj, 1, 3) * t3(3, 1, 0)
432  + t4(0, jj, 2, 0) * t3(0, 2, 0) + t4(0, jj, 2, 1) * t3(1, 2, 0)
433  + t4(0, jj, 2, 2) * t3(2, 2, 0)
434  + t4(0, jj, 2, 3) * t3(3, 2, 0)),
435  "T3(l,k,i)*T4(i,j,k,l)(" + std::to_string(jj) + ")");
436  }
437  }
438 
439  for(int kk = 0; kk < 3; ++kk)
440  {
441  test_for_zero((t4(i, j, k, l) * t3_2(i, j, l))(kk)
442  - (t4(0, 0, kk, 0) * t3_2(0, 0, 0)
443  + t4(0, 0, kk, 1) * t3_2(0, 0, 1)
444  + t4(0, 0, kk, 2) * t3_2(0, 0, 2)
445  + t4(0, 0, kk, 3) * t3_2(0, 0, 3)
446  + t4(0, 1, kk, 0) * t3_2(0, 1, 0)
447  + t4(0, 1, kk, 1) * t3_2(0, 1, 1)
448  + t4(0, 1, kk, 2) * t3_2(0, 1, 2)
449  + t4(0, 1, kk, 3) * t3_2(0, 1, 3)),
450  "T4(i,j,k,l)*T3(i,j,l)(" + std::to_string(kk) + ")");
451  test_for_zero((t3_2(i, j, l) * t4(i, j, k, l))(kk)
452  - (t4(0, 0, kk, 0) * t3_2(0, 0, 0)
453  + t4(0, 0, kk, 1) * t3_2(0, 0, 1)
454  + t4(0, 0, kk, 2) * t3_2(0, 0, 2)
455  + t4(0, 0, kk, 3) * t3_2(0, 0, 3)
456  + t4(0, 1, kk, 0) * t3_2(0, 1, 0)
457  + t4(0, 1, kk, 1) * t3_2(0, 1, 1)
458  + t4(0, 1, kk, 2) * t3_2(0, 1, 2)
459  + t4(0, 1, kk, 3) * t3_2(0, 1, 3)),
460  "T3(i,j,l)*T4(i,j,k,l)(" + std::to_string(kk) + ")");
461  }
462  {
464  t3(j, l, k) = t3_2(j, k, l);
465 
466  for(int kk = 0; kk < 3; ++kk)
467  {
469  (t4(i, j, k, l) * t3(i, l, j))(kk)
470  - (t4(0, 0, kk, 0) * t3(0, 0, 0) + t4(0, 0, kk, 1) * t3(0, 1, 0)
471  + t4(0, 0, kk, 2) * t3(0, 2, 0) + t4(0, 0, kk, 3) * t3(0, 3, 0)
472  + t4(0, 1, kk, 0) * t3(0, 0, 1) + t4(0, 1, kk, 1) * t3(0, 1, 1)
473  + t4(0, 1, kk, 2) * t3(0, 2, 1)
474  + t4(0, 1, kk, 3) * t3(0, 3, 1)),
475  "T4(i,j,k,l)*T3(i,l,j)(" + std::to_string(kk) + ")");
477  (t3(i, l, j) * t4(i, j, k, l))(kk)
478  - (t4(0, 0, kk, 0) * t3(0, 0, 0) + t4(0, 0, kk, 1) * t3(0, 1, 0)
479  + t4(0, 0, kk, 2) * t3(0, 2, 0) + t4(0, 0, kk, 3) * t3(0, 3, 0)
480  + t4(0, 1, kk, 0) * t3(0, 0, 1) + t4(0, 1, kk, 1) * t3(0, 1, 1)
481  + t4(0, 1, kk, 2) * t3(0, 2, 1)
482  + t4(0, 1, kk, 3) * t3(0, 3, 1)),
483  "T3(i,l,j)*T4(i,j,k,l)(" + std::to_string(kk) + ")");
484  }
485  }
486  {
488  t3(k, j, l) = t3_2(j, k, l);
489 
490  for(int kk = 0; kk < 3; ++kk)
491  {
493  (t4(i, j, k, l) * t3(j, i, l))(kk)
494  - (t4(0, 0, kk, 0) * t3(0, 0, 0) + t4(0, 0, kk, 1) * t3(0, 0, 1)
495  + t4(0, 0, kk, 2) * t3(0, 0, 2) + t4(0, 0, kk, 3) * t3(0, 0, 3)
496  + t4(0, 1, kk, 0) * t3(1, 0, 0) + t4(0, 1, kk, 1) * t3(1, 0, 1)
497  + t4(0, 1, kk, 2) * t3(1, 0, 2)
498  + t4(0, 1, kk, 3) * t3(1, 0, 3)),
499  "T4(i,j,k,l)*T3(j,i,l)(" + std::to_string(kk) + ")");
501  (t3(j, i, l) * t4(i, j, k, l))(kk)
502  - (t4(0, 0, kk, 0) * t3(0, 0, 0) + t4(0, 0, kk, 1) * t3(0, 0, 1)
503  + t4(0, 0, kk, 2) * t3(0, 0, 2) + t4(0, 0, kk, 3) * t3(0, 0, 3)
504  + t4(0, 1, kk, 0) * t3(1, 0, 0) + t4(0, 1, kk, 1) * t3(1, 0, 1)
505  + t4(0, 1, kk, 2) * t3(1, 0, 2)
506  + t4(0, 1, kk, 3) * t3(1, 0, 3)),
507  "T3(j,i,l)*T4(i,j,k,l)(" + std::to_string(kk) + ")");
508  }
509  }
510  {
512  t3(k, l, j) = t3_2(j, k, l);
513  for(int kk = 0; kk < 3; ++kk)
514  {
516  (t4(i, j, k, l) * t3(j, l, i))(kk)
517  - (t4(0, 0, kk, 0) * t3(0, 0, 0) + t4(0, 0, kk, 1) * t3(0, 1, 0)
518  + t4(0, 0, kk, 2) * t3(0, 2, 0) + t4(0, 0, kk, 3) * t3(0, 3, 0)
519  + t4(0, 1, kk, 0) * t3(1, 0, 0) + t4(0, 1, kk, 1) * t3(1, 1, 0)
520  + t4(0, 1, kk, 2) * t3(1, 2, 0)
521  + t4(0, 1, kk, 3) * t3(1, 3, 0)),
522  "T4(i,j,k,l)*T3(j,l,i)(" + std::to_string(kk) + ")");
524  (t3(j, l, i) * t4(i, j, k, l))(kk)
525  - (t4(0, 0, kk, 0) * t3(0, 0, 0) + t4(0, 0, kk, 1) * t3(0, 1, 0)
526  + t4(0, 0, kk, 2) * t3(0, 2, 0) + t4(0, 0, kk, 3) * t3(0, 3, 0)
527  + t4(0, 1, kk, 0) * t3(1, 0, 0) + t4(0, 1, kk, 1) * t3(1, 1, 0)
528  + t4(0, 1, kk, 2) * t3(1, 2, 0)
529  + t4(0, 1, kk, 3) * t3(1, 3, 0)),
530  "T3(j,l,i)*T4(i,j,k,l)(" + std::to_string(kk) + ")");
531  }
532  }
533  {
535  t3(l, j, k) = t3_2(j, k, l);
536  for(int kk = 0; kk < 3; ++kk)
537  {
539  (t4(i, j, k, l) * t3(l, i, j))(kk)
540  - (t4(0, 0, kk, 0) * t3(0, 0, 0) + t4(0, 0, kk, 1) * t3(1, 0, 0)
541  + t4(0, 0, kk, 2) * t3(2, 0, 0) + t4(0, 0, kk, 3) * t3(3, 0, 0)
542  + t4(0, 1, kk, 0) * t3(0, 0, 1) + t4(0, 1, kk, 1) * t3(1, 0, 1)
543  + t4(0, 1, kk, 2) * t3(2, 0, 1)
544  + t4(0, 1, kk, 3) * t3(3, 0, 1)),
545  "T4(i,j,k,l)*T3(l,i,j)(" + std::to_string(kk) + ")");
547  (t3(l, i, j) * t4(i, j, k, l))(kk)
548  - (t4(0, 0, kk, 0) * t3(0, 0, 0) + t4(0, 0, kk, 1) * t3(1, 0, 0)
549  + t4(0, 0, kk, 2) * t3(2, 0, 0) + t4(0, 0, kk, 3) * t3(3, 0, 0)
550  + t4(0, 1, kk, 0) * t3(0, 0, 1) + t4(0, 1, kk, 1) * t3(1, 0, 1)
551  + t4(0, 1, kk, 2) * t3(2, 0, 1)
552  + t4(0, 1, kk, 3) * t3(3, 0, 1)),
553  "T3(l,i,j)*T4(i,j,k,l)(" + std::to_string(kk) + ")");
554  }
555  }
556  {
558  t3(l, k, j) = t3_2(j, k, l);
559 
560  for(int kk = 0; kk < 3; ++kk)
561  {
563  (t4(i, j, k, l) * t3(l, j, i))(kk)
564  - (t4(0, 0, kk, 0) * t3(0, 0, 0) + t4(0, 0, kk, 1) * t3(1, 0, 0)
565  + t4(0, 0, kk, 2) * t3(2, 0, 0) + t4(0, 0, kk, 3) * t3(3, 0, 0)
566  + t4(0, 1, kk, 0) * t3(0, 1, 0) + t4(0, 1, kk, 1) * t3(1, 1, 0)
567  + t4(0, 1, kk, 2) * t3(2, 1, 0)
568  + t4(0, 1, kk, 3) * t3(3, 1, 0)),
569  "T4(i,j,k,l)*T3(l,j,i)(" + std::to_string(kk) + ")");
571  (t3(l, j, i) * t4(i, j, k, l))(kk)
572  - (t4(0, 0, kk, 0) * t3(0, 0, 0) + t4(0, 0, kk, 1) * t3(1, 0, 0)
573  + t4(0, 0, kk, 2) * t3(2, 0, 0) + t4(0, 0, kk, 3) * t3(3, 0, 0)
574  + t4(0, 1, kk, 0) * t3(0, 1, 0) + t4(0, 1, kk, 1) * t3(1, 1, 0)
575  + t4(0, 1, kk, 2) * t3(2, 1, 0)
576  + t4(0, 1, kk, 3) * t3(3, 1, 0)),
577  "T3(l,j,i)*T4(i,j,k,l)(" + std::to_string(kk) + ")");
578  }
579  }
580 
581 
582 
583  for(int ll = 0; ll < 4; ++ll)
584  {
585  test_for_zero((t4(i, j, k, l) * t3_2(i, j, k))(ll)
586  - (t4(0, 0, 0, ll) * t3_2(0, 0, 0)
587  + t4(0, 0, 1, ll) * t3_2(0, 0, 1)
588  + t4(0, 0, 2, ll) * t3_2(0, 0, 2)
589  + t4(0, 1, 0, ll) * t3_2(0, 1, 0)
590  + t4(0, 1, 1, ll) * t3_2(0, 1, 1)
591  + t4(0, 1, 2, ll) * t3_2(0, 1, 2)),
592  "T4(i,j,k,l)*T3(i,j,k)(" + std::to_string(ll) + ")");
593  test_for_zero((t3_2(i, j, k) * t4(i, j, k, l))(ll)
594  - (t4(0, 0, 0, ll) * t3_2(0, 0, 0)
595  + t4(0, 0, 1, ll) * t3_2(0, 0, 1)
596  + t4(0, 0, 2, ll) * t3_2(0, 0, 2)
597  + t4(0, 1, 0, ll) * t3_2(0, 1, 0)
598  + t4(0, 1, 1, ll) * t3_2(0, 1, 1)
599  + t4(0, 1, 2, ll) * t3_2(0, 1, 2)),
600  "T3(i,j,k)*T4(i,j,k,l)(" + std::to_string(ll) + ")");
601  }
602  {
604  t3(j, l, k) = t3_2(j, k, l);
605 
606  for(int ll = 0; ll < 4; ++ll)
607  {
609  (t4(i, j, k, l) * t3(i, k, j))(ll)
610  - (t4(0, 0, 0, ll) * t3(0, 0, 0) + t4(0, 0, 1, ll) * t3(0, 1, 0)
611  + t4(0, 0, 2, ll) * t3(0, 2, 0) + t4(0, 1, 0, ll) * t3(0, 0, 1)
612  + t4(0, 1, 1, ll) * t3(0, 1, 1)
613  + t4(0, 1, 2, ll) * t3(0, 2, 1)),
614  "T4(i,j,k,l)*T3(i,k,j)(" + std::to_string(ll) + ")");
616  (t3(i, k, j) * t4(i, j, k, l))(ll)
617  - (t4(0, 0, 0, ll) * t3(0, 0, 0) + t4(0, 0, 1, ll) * t3(0, 1, 0)
618  + t4(0, 0, 2, ll) * t3(0, 2, 0) + t4(0, 1, 0, ll) * t3(0, 0, 1)
619  + t4(0, 1, 1, ll) * t3(0, 1, 1)
620  + t4(0, 1, 2, ll) * t3(0, 2, 1)),
621  "T3(i,k,j)*T4(i,j,k,l)(" + std::to_string(ll) + ")");
622  }
623  }
624  {
626  t3(k, j, l) = t3_2(j, k, l);
627 
628  for(int ll = 0; ll < 4; ++ll)
629  {
631  (t4(i, j, k, l) * t3(j, i, k))(ll)
632  - (t4(0, 0, 0, ll) * t3(0, 0, 0) + t4(0, 0, 1, ll) * t3(0, 0, 1)
633  + t4(0, 0, 2, ll) * t3(0, 0, 2) + t4(0, 1, 0, ll) * t3(1, 0, 0)
634  + t4(0, 1, 1, ll) * t3(1, 0, 1)
635  + t4(0, 1, 2, ll) * t3(1, 0, 2)),
636  "T4(i,j,k,l)*T3(j,i,k)(" + std::to_string(ll) + ")");
638  (t3(j, i, k) * t4(i, j, k, l))(ll)
639  - (t4(0, 0, 0, ll) * t3(0, 0, 0) + t4(0, 0, 1, ll) * t3(0, 0, 1)
640  + t4(0, 0, 2, ll) * t3(0, 0, 2) + t4(0, 1, 0, ll) * t3(1, 0, 0)
641  + t4(0, 1, 1, ll) * t3(1, 0, 1)
642  + t4(0, 1, 2, ll) * t3(1, 0, 2)),
643  "T3(j,i,k)*T4(i,j,k,l)(" + std::to_string(ll) + ")");
644  }
645  }
646  {
648  t3(k, l, j) = t3_2(j, k, l);
649  for(int ll = 0; ll < 4; ++ll)
650  {
652  (t4(i, j, k, l) * t3(j, k, i))(ll)
653  - (t4(0, 0, 0, ll) * t3(0, 0, 0) + t4(0, 0, 1, ll) * t3(0, 1, 0)
654  + t4(0, 0, 2, ll) * t3(0, 2, 0) + t4(0, 1, 0, ll) * t3(1, 0, 0)
655  + t4(0, 1, 1, ll) * t3(1, 1, 0)
656  + t4(0, 1, 2, ll) * t3(1, 2, 0)),
657  "T4(i,j,k,l)*T3(j,k,i)(" + std::to_string(ll) + ")");
659  (t3(j, k, i) * t4(i, j, k, l))(ll)
660  - (t4(0, 0, 0, ll) * t3(0, 0, 0) + t4(0, 0, 1, ll) * t3(0, 1, 0)
661  + t4(0, 0, 2, ll) * t3(0, 2, 0) + t4(0, 1, 0, ll) * t3(1, 0, 0)
662  + t4(0, 1, 1, ll) * t3(1, 1, 0)
663  + t4(0, 1, 2, ll) * t3(1, 2, 0)),
664  "T3(j,k,i)*T4(i,j,k,l)(" + std::to_string(ll) + ")");
665  }
666  }
667  {
669  t3(l, j, k) = t3_2(j, k, l);
670  for(int ll = 0; ll < 4; ++ll)
671  {
673  (t4(i, j, k, l) * t3(k, i, j))(ll)
674  - (t4(0, 0, 0, ll) * t3(0, 0, 0) + t4(0, 0, 1, ll) * t3(1, 0, 0)
675  + t4(0, 0, 2, ll) * t3(2, 0, 0) + t4(0, 1, 0, ll) * t3(0, 0, 1)
676  + t4(0, 1, 1, ll) * t3(1, 0, 1)
677  + t4(0, 1, 2, ll) * t3(2, 0, 1)),
678  "T4(i,j,k,l)*T3(k,i,j)(" + std::to_string(ll) + ")");
680  (t3(k, i, j) * t4(i, j, k, l))(ll)
681  - (t4(0, 0, 0, ll) * t3(0, 0, 0) + t4(0, 0, 1, ll) * t3(1, 0, 0)
682  + t4(0, 0, 2, ll) * t3(2, 0, 0) + t4(0, 1, 0, ll) * t3(0, 0, 1)
683  + t4(0, 1, 1, ll) * t3(1, 0, 1)
684  + t4(0, 1, 2, ll) * t3(2, 0, 1)),
685  "T3(k,i,j)*T4(i,j,k,l)(" + std::to_string(ll) + ")");
686  }
687  }
688  {
690  t3(l, k, j) = t3_2(j, k, l);
691 
692  for(int ll = 0; ll < 4; ++ll)
693  {
695  (t4(i, j, k, l) * t3(k, j, i))(ll)
696  - (t4(0, 0, 0, ll) * t3(0, 0, 0) + t4(0, 0, 1, ll) * t3(1, 0, 0)
697  + t4(0, 0, 2, ll) * t3(2, 0, 0) + t4(0, 1, 0, ll) * t3(0, 1, 0)
698  + t4(0, 1, 1, ll) * t3(1, 1, 0)
699  + t4(0, 1, 2, ll) * t3(2, 1, 0)),
700  "T4(i,j,k,l)*T3(k,j,i)(" + std::to_string(ll) + ")");
702  (t3(k, j, i) * t4(i, j, k, l))(ll)
703  - (t4(0, 0, 0, ll) * t3(0, 0, 0) + t4(0, 0, 1, ll) * t3(1, 0, 0)
704  + t4(0, 0, 2, ll) * t3(2, 0, 0) + t4(0, 1, 0, ll) * t3(0, 1, 0)
705  + t4(0, 1, 1, ll) * t3(1, 1, 0)
706  + t4(0, 1, 2, ll) * t3(2, 1, 0)),
707  "T3(k,j,i)*T4(i,j,k,l)(" + std::to_string(ll) + ")");
708  }
709  }
710 }

◆ test_T4_iostream()

void test_T4_iostream ( )

Definition at line 7 of file test_T4_iostream.cpp.

test_T4_007
void test_T4_007(const Tensor4< double, 1, 2, 3, 4 > &t4, const Tensor3< double, 2, 3, 4 > &t3_2)
Definition: test_T4_007.cpp:7
test_T4_02
void test_T4_02(const Tensor4< double, 1, 2, 3, 4 > &t4_1, const Tensor2< double, 4, 3 > &t2_4, const Tensor2< double, 3, 4 > &t2_5)
Definition: test_T4_02.cpp:8
test_T4_06
void test_T4_06(const Tensor4< double, 1, 2, 3, 4 > &t4, const Tensor3< double, 2, 3, 4 > &t3_2)
Definition: test_T4_06.cpp:7
test_T4_01
void test_T4_01(const Tensor4< double, 1, 2, 3, 4 > &t4_1)
Definition: test_T4_01.cpp:8
FTensor::Tensor2_symmetric
Definition: Tensor2_symmetric_value.hpp:13
FTensor::Tensor2
Definition: Tensor2_value.hpp:16
FTensor::Number< 0 >
FTensor::Tensor3
Definition: Tensor3_value.hpp:12
test_T4_008
void test_T4_008()
Definition: test_T4_008.cpp:7
test_for_zero
void test_for_zero(const T &t, const std::string &s)
Definition: test_for_zero.hpp:7
FTensor::Tensor4
Definition: Tensor4_value.hpp:18
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
FTensor::Index
Definition: Index.hpp:23
convert.n
n
Definition: convert.py:82
test_T4_04
void test_T4_04(const Tensor4< double, 1, 2, 3, 4 > &t4_1)
Definition: test_T4_04.cpp:7
j
FTensor::Index< 'j', 3 > j
Definition: matrix_function.cpp:19
FTensor::Ddg
Definition: Ddg_value.hpp:7
m
FTensor::Index< 'm', 3 > m
Definition: shallow_wave.cpp:80
k
FTensor::Index< 'k', 3 > k
Definition: matrix_function.cpp:20
test_T4_iostream
void test_T4_iostream()
Definition: test_T4_iostream.cpp:7
l
FTensor::Index< 'l', 3 > l
Definition: matrix_function.cpp:21
test_T4_05
void test_T4_05(const Tensor4< double, 1, 2, 3, 4 > &t4, const Tensor2< double, 4, 3 > &t2_4, const Tensor2< double, 3, 4 > &t2_5)
Definition: test_T4_05.cpp:7