1 #include "../../../src/FTensor.hpp"
2 #include "../test_for_zero.hpp"
3 #include "../test_ostream.hpp"
17 for(
int ii = 0; ii < 1; ++ii)
19 for(
int jj = 0; jj < 2; ++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) +
")");
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) +
")");
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) +
")");
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) +
")");
82 for(
int kk = 0; kk < 3; ++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) +
")");
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) +
")");
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) +
")");
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) +
")");
129 for(
int ll = 0; ll < 4; ++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) +
")");
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) +
")");
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) +
")");
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) +
")");
169 for(
int jj = 0; jj < 2; ++jj)
171 for(
int kk = 0; kk < 3; ++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) +
")");
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) +
")");
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) +
")");
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) +
")");
202 for(
int ll = 0; ll < 4; ++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) +
")");
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) +
")");
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) +
")");
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) +
")");
230 for(
int kk = 0; kk < 3; ++kk)
231 for(
int ll = 0; ll < 4; ++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) +
")");
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) +
")");
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) +
")");
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) +
")");