v0.14.0
Loading...
Searching...
No Matches
test_Levi_Civita_01.cpp
Go to the documentation of this file.
3#include <iostream>
4using namespace FTensor;
5using namespace std;
6
8{
9 Index<'i', 2> i;
10 Index<'j', 2> j;
11
12 Index<'k', 3> k;
13 Index<'l', 3> l;
14 Index<'m', 3> m;
15
16 Index<'n', 4> n;
17 Index<'o', 4> o;
18 Index<'p', 4> p;
19 Index<'q', 4> q;
20
21 Number<0> N0;
22 Number<1> N1;
23 Number<2> N2;
24
25 /* Test Levi_Civita Rank 2 */
26 test_for_zero(levi_civita(i, j)(0, 0), "levi_civita(i,j)(0,0)");
27 test_for_zero(levi_civita(i, j)(0, 1) - 1, "levi_civita(i,j)(0,1)");
28 test_for_zero(levi_civita(i, j)(1, 0) + 1, "levi_civita(i,j)(1,0)");
29 test_for_zero(levi_civita(i, j)(1, 1), "levi_civita(i,j)(1,1)");
30
31 /* Test Levi_Civita Rank 3 */
32 test_for_zero(levi_civita(k, l, m)(0, 0, 0), "levi_civita(k,l,m)(0,0,0)");
33 test_for_zero(levi_civita(k, l, m)(0, 0, 1), "levi_civita(k,l,m)(0,0,1)");
34 test_for_zero(levi_civita(k, l, m)(0, 0, 2), "levi_civita(k,l,m)(0,0,2)");
35 test_for_zero(levi_civita(k, l, m)(0, 1, 0), "levi_civita(k,l,m)(0,1,0)");
36 test_for_zero(levi_civita(k, l, m)(0, 1, 1), "levi_civita(k,l,m)(0,1,1)");
37 test_for_zero(levi_civita(k, l, m)(0, 1, 2) - 1,
38 "levi_civita(k,l,m)(0,1,2)");
39 test_for_zero(levi_civita(k, l, m)(0, 2, 0), "levi_civita(k,l,m)(0,2,0)");
40 test_for_zero(levi_civita(k, l, m)(0, 2, 1) + 1,
41 "levi_civita(k,l,m)(0,2,1)");
42 test_for_zero(levi_civita(k, l, m)(0, 2, 2), "levi_civita(k,l,m)(0,2,2)");
43 test_for_zero(levi_civita(k, l, m)(1, 0, 0), "levi_civita(k,l,m)(1,0,0)");
44 test_for_zero(levi_civita(k, l, m)(1, 0, 1), "levi_civita(k,l,m)(1,0,1)");
45 test_for_zero(levi_civita(k, l, m)(1, 0, 2) + 1,
46 "levi_civita(k,l,m)(1,0,2)");
47 test_for_zero(levi_civita(k, l, m)(1, 1, 0), "levi_civita(k,l,m)(1,1,0)");
48 test_for_zero(levi_civita(k, l, m)(1, 1, 1), "levi_civita(k,l,m)(1,1,1)");
49 test_for_zero(levi_civita(k, l, m)(1, 1, 2), "levi_civita(k,l,m)(1,1,2)");
50 test_for_zero(levi_civita(k, l, m)(1, 2, 0) - 1,
51 "levi_civita(k,l,m)(1,2,0)");
52 test_for_zero(levi_civita(k, l, m)(1, 2, 1), "levi_civita(k,l,m)(1,2,1)");
53 test_for_zero(levi_civita(k, l, m)(1, 2, 2), "levi_civita(k,l,m)(1,2,2)");
54 test_for_zero(levi_civita(k, l, m)(2, 0, 0), "levi_civita(k,l,m)(2,0,0)");
55 test_for_zero(levi_civita(k, l, m)(2, 0, 1) - 1,
56 "levi_civita(k,l,m)(2,0,1)");
57 test_for_zero(levi_civita(k, l, m)(2, 0, 2), "levi_civita(k,l,m)(2,0,2)");
58 test_for_zero(levi_civita(k, l, m)(2, 1, 0) + 1,
59 "levi_civita(k,l,m)(2,1,0)");
60 test_for_zero(levi_civita(k, l, m)(2, 1, 1), "levi_civita(k,l,m)(2,1,1)");
61 test_for_zero(levi_civita(k, l, m)(2, 1, 2), "levi_civita(k,l,m)(2,1,2)");
62 test_for_zero(levi_civita(k, l, m)(2, 2, 0), "levi_civita(k,l,m)(2,2,0)");
63 test_for_zero(levi_civita(k, l, m)(2, 2, 1), "levi_civita(k,l,m)(2,2,1)");
64 test_for_zero(levi_civita(k, l, m)(2, 2, 2), "levi_civita(k,l,m)(2,2,2)");
65
66 /* Test Levi_Civita Rank 4 */
67 test_for_zero(levi_civita(n, o, p, q)(0, 0, 0, 0),
68 "levi_civita(n,o,p,q)(0,0,0,0)");
69 test_for_zero(levi_civita(n, o, p, q)(0, 0, 0, 1),
70 "levi_civita(n,o,p,q)(0,0,0,1)");
71 test_for_zero(levi_civita(n, o, p, q)(0, 0, 0, 2),
72 "levi_civita(n,o,p,q)(0,0,0,2)");
73 test_for_zero(levi_civita(n, o, p, q)(0, 0, 0, 3),
74 "levi_civita(n,o,p,q)(0,0,0,3)");
75 test_for_zero(levi_civita(n, o, p, q)(0, 0, 1, 0),
76 "levi_civita(n,o,p,q)(0,0,1,0)");
77 test_for_zero(levi_civita(n, o, p, q)(0, 0, 1, 1),
78 "levi_civita(n,o,p,q)(0,0,1,1)");
79 test_for_zero(levi_civita(n, o, p, q)(0, 0, 1, 2),
80 "levi_civita(n,o,p,q)(0,0,1,2)");
81 test_for_zero(levi_civita(n, o, p, q)(0, 0, 1, 3),
82 "levi_civita(n,o,p,q)(0,0,1,3)");
83 test_for_zero(levi_civita(n, o, p, q)(0, 0, 2, 0),
84 "levi_civita(n,o,p,q)(0,0,2,0)");
85 test_for_zero(levi_civita(n, o, p, q)(0, 0, 2, 1),
86 "levi_civita(n,o,p,q)(0,0,2,1)");
87 test_for_zero(levi_civita(n, o, p, q)(0, 0, 2, 2),
88 "levi_civita(n,o,p,q)(0,0,2,2)");
89 test_for_zero(levi_civita(n, o, p, q)(0, 0, 2, 3),
90 "levi_civita(n,o,p,q)(0,0,2,3)");
91 test_for_zero(levi_civita(n, o, p, q)(0, 0, 3, 0),
92 "levi_civita(n,o,p,q)(0,0,3,0)");
93 test_for_zero(levi_civita(n, o, p, q)(0, 0, 3, 1),
94 "levi_civita(n,o,p,q)(0,0,3,1)");
95 test_for_zero(levi_civita(n, o, p, q)(0, 0, 3, 2),
96 "levi_civita(n,o,p,q)(0,0,3,2)");
97 test_for_zero(levi_civita(n, o, p, q)(0, 0, 3, 3),
98 "levi_civita(n,o,p,q)(0,0,3,3)");
99 test_for_zero(levi_civita(n, o, p, q)(0, 1, 0, 0),
100 "levi_civita(n,o,p,q)(0,1,0,0)");
101 test_for_zero(levi_civita(n, o, p, q)(0, 1, 0, 1),
102 "levi_civita(n,o,p,q)(0,1,0,1)");
103 test_for_zero(levi_civita(n, o, p, q)(0, 1, 0, 2),
104 "levi_civita(n,o,p,q)(0,1,0,2)");
105 test_for_zero(levi_civita(n, o, p, q)(0, 1, 0, 3),
106 "levi_civita(n,o,p,q)(0,1,0,3)");
107 test_for_zero(levi_civita(n, o, p, q)(0, 1, 1, 0),
108 "levi_civita(n,o,p,q)(0,1,1,0)");
109 test_for_zero(levi_civita(n, o, p, q)(0, 1, 1, 1),
110 "levi_civita(n,o,p,q)(0,1,1,1)");
111 test_for_zero(levi_civita(n, o, p, q)(0, 1, 1, 2),
112 "levi_civita(n,o,p,q)(0,1,1,2)");
113 test_for_zero(levi_civita(n, o, p, q)(0, 1, 1, 3),
114 "levi_civita(n,o,p,q)(0,1,1,3)");
115 test_for_zero(levi_civita(n, o, p, q)(0, 1, 2, 0),
116 "levi_civita(n,o,p,q)(0,1,2,0)");
117 test_for_zero(levi_civita(n, o, p, q)(0, 1, 2, 1),
118 "levi_civita(n,o,p,q)(0,1,2,1)");
119 test_for_zero(levi_civita(n, o, p, q)(0, 1, 2, 2),
120 "levi_civita(n,o,p,q)(0,1,2,2)");
121 test_for_zero(levi_civita(n, o, p, q)(0, 1, 2, 3) - 1,
122 "levi_civita(n,o,p,q)(0,1,2,3)");
123 test_for_zero(levi_civita(n, o, p, q)(0, 1, 3, 0),
124 "levi_civita(n,o,p,q)(0,1,3,0)");
125 test_for_zero(levi_civita(n, o, p, q)(0, 1, 3, 1),
126 "levi_civita(n,o,p,q)(0,1,3,1)");
127 test_for_zero(levi_civita(n, o, p, q)(0, 1, 3, 2) + 1,
128 "levi_civita(n,o,p,q)(0,1,3,2)");
129 test_for_zero(levi_civita(n, o, p, q)(0, 1, 3, 3),
130 "levi_civita(n,o,p,q)(0,1,3,3)");
131 test_for_zero(levi_civita(n, o, p, q)(0, 2, 0, 0),
132 "levi_civita(n,o,p,q)(0,2,0,0)");
133 test_for_zero(levi_civita(n, o, p, q)(0, 2, 0, 1),
134 "levi_civita(n,o,p,q)(0,2,0,1)");
135 test_for_zero(levi_civita(n, o, p, q)(0, 2, 0, 2),
136 "levi_civita(n,o,p,q)(0,2,0,2)");
137 test_for_zero(levi_civita(n, o, p, q)(0, 2, 0, 3),
138 "levi_civita(n,o,p,q)(0,2,0,3)");
139 test_for_zero(levi_civita(n, o, p, q)(0, 2, 1, 0),
140 "levi_civita(n,o,p,q)(0,2,1,0)");
141 test_for_zero(levi_civita(n, o, p, q)(0, 2, 1, 1),
142 "levi_civita(n,o,p,q)(0,2,1,1)");
143 test_for_zero(levi_civita(n, o, p, q)(0, 2, 1, 2),
144 "levi_civita(n,o,p,q)(0,2,1,2)");
145 test_for_zero(levi_civita(n, o, p, q)(0, 2, 1, 3) + 1,
146 "levi_civita(n,o,p,q)(0,2,1,3)");
147 test_for_zero(levi_civita(n, o, p, q)(0, 2, 2, 0),
148 "levi_civita(n,o,p,q)(0,2,2,0)");
149 test_for_zero(levi_civita(n, o, p, q)(0, 2, 2, 1),
150 "levi_civita(n,o,p,q)(0,2,2,1)");
151 test_for_zero(levi_civita(n, o, p, q)(0, 2, 2, 2),
152 "levi_civita(n,o,p,q)(0,2,2,2)");
153 test_for_zero(levi_civita(n, o, p, q)(0, 2, 2, 3),
154 "levi_civita(n,o,p,q)(0,2,2,3)");
155 test_for_zero(levi_civita(n, o, p, q)(0, 2, 3, 0),
156 "levi_civita(n,o,p,q)(0,2,3,0)");
157 test_for_zero(levi_civita(n, o, p, q)(0, 2, 3, 1) - 1,
158 "levi_civita(n,o,p,q)(0,2,3,1)");
159 test_for_zero(levi_civita(n, o, p, q)(0, 2, 3, 2),
160 "levi_civita(n,o,p,q)(0,2,3,2)");
161 test_for_zero(levi_civita(n, o, p, q)(0, 2, 3, 3),
162 "levi_civita(n,o,p,q)(0,2,3,3)");
163 test_for_zero(levi_civita(n, o, p, q)(0, 3, 0, 0),
164 "levi_civita(n,o,p,q)(0,3,0,0)");
165 test_for_zero(levi_civita(n, o, p, q)(0, 3, 0, 1),
166 "levi_civita(n,o,p,q)(0,3,0,1)");
167 test_for_zero(levi_civita(n, o, p, q)(0, 3, 0, 2),
168 "levi_civita(n,o,p,q)(0,3,0,2)");
169 test_for_zero(levi_civita(n, o, p, q)(0, 3, 0, 3),
170 "levi_civita(n,o,p,q)(0,3,0,3)");
171 test_for_zero(levi_civita(n, o, p, q)(0, 3, 1, 0),
172 "levi_civita(n,o,p,q)(0,3,1,0)");
173 test_for_zero(levi_civita(n, o, p, q)(0, 3, 1, 1),
174 "levi_civita(n,o,p,q)(0,3,1,1)");
175 test_for_zero(levi_civita(n, o, p, q)(0, 3, 1, 2) - 1,
176 "levi_civita(n,o,p,q)(0,3,1,2)");
177 test_for_zero(levi_civita(n, o, p, q)(0, 3, 1, 3),
178 "levi_civita(n,o,p,q)(0,3,1,3)");
179 test_for_zero(levi_civita(n, o, p, q)(0, 3, 2, 0),
180 "levi_civita(n,o,p,q)(0,3,2,0)");
181 test_for_zero(levi_civita(n, o, p, q)(0, 3, 2, 1) + 1,
182 "levi_civita(n,o,p,q)(0,3,2,1)");
183 test_for_zero(levi_civita(n, o, p, q)(0, 3, 2, 2),
184 "levi_civita(n,o,p,q)(0,3,2,2)");
185 test_for_zero(levi_civita(n, o, p, q)(0, 3, 2, 3),
186 "levi_civita(n,o,p,q)(0,3,2,3)");
187 test_for_zero(levi_civita(n, o, p, q)(0, 3, 3, 0),
188 "levi_civita(n,o,p,q)(0,3,3,0)");
189 test_for_zero(levi_civita(n, o, p, q)(0, 3, 3, 1),
190 "levi_civita(n,o,p,q)(0,3,3,1)");
191 test_for_zero(levi_civita(n, o, p, q)(0, 3, 3, 2),
192 "levi_civita(n,o,p,q)(0,3,3,2)");
193 test_for_zero(levi_civita(n, o, p, q)(0, 3, 3, 3),
194 "levi_civita(n,o,p,q)(0,3,3,3)");
195
196 test_for_zero(levi_civita(n, o, p, q)(1, 0, 0, 0),
197 "levi_civita(n,o,p,q)(1,0,0,0)");
198 test_for_zero(levi_civita(n, o, p, q)(1, 0, 0, 1),
199 "levi_civita(n,o,p,q)(1,0,0,1)");
200 test_for_zero(levi_civita(n, o, p, q)(1, 0, 0, 2),
201 "levi_civita(n,o,p,q)(1,0,0,2)");
202 test_for_zero(levi_civita(n, o, p, q)(1, 0, 0, 3),
203 "levi_civita(n,o,p,q)(1,0,0,3)");
204 test_for_zero(levi_civita(n, o, p, q)(1, 0, 1, 0),
205 "levi_civita(n,o,p,q)(1,0,1,0)");
206 test_for_zero(levi_civita(n, o, p, q)(1, 0, 1, 1),
207 "levi_civita(n,o,p,q)(1,0,1,1)");
208 test_for_zero(levi_civita(n, o, p, q)(1, 0, 1, 2),
209 "levi_civita(n,o,p,q)(1,0,1,2)");
210 test_for_zero(levi_civita(n, o, p, q)(1, 0, 1, 3),
211 "levi_civita(n,o,p,q)(1,0,1,3)");
212 test_for_zero(levi_civita(n, o, p, q)(1, 0, 2, 0),
213 "levi_civita(n,o,p,q)(1,0,2,0)");
214 test_for_zero(levi_civita(n, o, p, q)(1, 0, 2, 1),
215 "levi_civita(n,o,p,q)(1,0,2,1)");
216 test_for_zero(levi_civita(n, o, p, q)(1, 0, 2, 2),
217 "levi_civita(n,o,p,q)(1,0,2,2)");
218 test_for_zero(levi_civita(n, o, p, q)(1, 0, 2, 3) + 1,
219 "levi_civita(n,o,p,q)(1,0,2,3)");
220 test_for_zero(levi_civita(n, o, p, q)(1, 0, 3, 0),
221 "levi_civita(n,o,p,q)(1,0,3,0)");
222 test_for_zero(levi_civita(n, o, p, q)(1, 0, 3, 1),
223 "levi_civita(n,o,p,q)(1,0,3,1)");
224 test_for_zero(levi_civita(n, o, p, q)(1, 0, 3, 2) - 1,
225 "levi_civita(n,o,p,q)(1,0,3,2)");
226 test_for_zero(levi_civita(n, o, p, q)(1, 0, 3, 3),
227 "levi_civita(n,o,p,q)(1,0,3,3)");
228 test_for_zero(levi_civita(n, o, p, q)(1, 1, 0, 0),
229 "levi_civita(n,o,p,q)(1,1,0,0)");
230 test_for_zero(levi_civita(n, o, p, q)(1, 1, 0, 1),
231 "levi_civita(n,o,p,q)(1,1,0,1)");
232 test_for_zero(levi_civita(n, o, p, q)(1, 1, 0, 2),
233 "levi_civita(n,o,p,q)(1,1,0,2)");
234 test_for_zero(levi_civita(n, o, p, q)(1, 1, 0, 3),
235 "levi_civita(n,o,p,q)(1,1,0,3)");
236 test_for_zero(levi_civita(n, o, p, q)(1, 1, 1, 0),
237 "levi_civita(n,o,p,q)(1,1,1,0)");
238 test_for_zero(levi_civita(n, o, p, q)(1, 1, 1, 1),
239 "levi_civita(n,o,p,q)(1,1,1,1)");
240 test_for_zero(levi_civita(n, o, p, q)(1, 1, 1, 2),
241 "levi_civita(n,o,p,q)(1,1,1,2)");
242 test_for_zero(levi_civita(n, o, p, q)(1, 1, 1, 3),
243 "levi_civita(n,o,p,q)(1,1,1,3)");
244 test_for_zero(levi_civita(n, o, p, q)(1, 1, 2, 0),
245 "levi_civita(n,o,p,q)(1,1,2,0)");
246 test_for_zero(levi_civita(n, o, p, q)(1, 1, 2, 1),
247 "levi_civita(n,o,p,q)(1,1,2,1)");
248 test_for_zero(levi_civita(n, o, p, q)(1, 1, 2, 2),
249 "levi_civita(n,o,p,q)(1,1,2,2)");
250 test_for_zero(levi_civita(n, o, p, q)(1, 1, 2, 3),
251 "levi_civita(n,o,p,q)(1,1,2,3)");
252 test_for_zero(levi_civita(n, o, p, q)(1, 1, 3, 0),
253 "levi_civita(n,o,p,q)(1,1,3,0)");
254 test_for_zero(levi_civita(n, o, p, q)(1, 1, 3, 1),
255 "levi_civita(n,o,p,q)(1,1,3,1)");
256 test_for_zero(levi_civita(n, o, p, q)(1, 1, 3, 2),
257 "levi_civita(n,o,p,q)(1,1,3,2)");
258 test_for_zero(levi_civita(n, o, p, q)(1, 1, 3, 3),
259 "levi_civita(n,o,p,q)(1,1,3,3)");
260 test_for_zero(levi_civita(n, o, p, q)(1, 2, 0, 0),
261 "levi_civita(n,o,p,q)(1,2,0,0)");
262 test_for_zero(levi_civita(n, o, p, q)(1, 2, 0, 1),
263 "levi_civita(n,o,p,q)(1,2,0,1)");
264 test_for_zero(levi_civita(n, o, p, q)(1, 2, 0, 2),
265 "levi_civita(n,o,p,q)(1,2,0,2)");
266 test_for_zero(levi_civita(n, o, p, q)(1, 2, 0, 3) - 1,
267 "levi_civita(n,o,p,q)(1,2,0,3)");
268 test_for_zero(levi_civita(n, o, p, q)(1, 2, 1, 0),
269 "levi_civita(n,o,p,q)(1,2,1,0)");
270 test_for_zero(levi_civita(n, o, p, q)(1, 2, 1, 1),
271 "levi_civita(n,o,p,q)(1,2,1,1)");
272 test_for_zero(levi_civita(n, o, p, q)(1, 2, 1, 2),
273 "levi_civita(n,o,p,q)(1,2,1,2)");
274 test_for_zero(levi_civita(n, o, p, q)(1, 2, 1, 3),
275 "levi_civita(n,o,p,q)(1,2,1,3)");
276 test_for_zero(levi_civita(n, o, p, q)(1, 2, 2, 0),
277 "levi_civita(n,o,p,q)(1,2,2,0)");
278 test_for_zero(levi_civita(n, o, p, q)(1, 2, 2, 1),
279 "levi_civita(n,o,p,q)(1,2,2,1)");
280 test_for_zero(levi_civita(n, o, p, q)(1, 2, 2, 2),
281 "levi_civita(n,o,p,q)(1,2,2,2)");
282 test_for_zero(levi_civita(n, o, p, q)(1, 2, 2, 3),
283 "levi_civita(n,o,p,q)(1,2,2,3)");
284 test_for_zero(levi_civita(n, o, p, q)(1, 2, 3, 0) + 1,
285 "levi_civita(n,o,p,q)(1,2,3,0)");
286 test_for_zero(levi_civita(n, o, p, q)(1, 2, 3, 1),
287 "levi_civita(n,o,p,q)(1,2,3,1)");
288 test_for_zero(levi_civita(n, o, p, q)(1, 2, 3, 2),
289 "levi_civita(n,o,p,q)(1,2,3,2)");
290 test_for_zero(levi_civita(n, o, p, q)(1, 2, 3, 3),
291 "levi_civita(n,o,p,q)(1,2,3,3)");
292 test_for_zero(levi_civita(n, o, p, q)(1, 3, 0, 0),
293 "levi_civita(n,o,p,q)(1,3,0,0)");
294 test_for_zero(levi_civita(n, o, p, q)(1, 3, 0, 1),
295 "levi_civita(n,o,p,q)(1,3,0,1)");
296 test_for_zero(levi_civita(n, o, p, q)(1, 3, 0, 2) + 1,
297 "levi_civita(n,o,p,q)(1,3,0,2)");
298 test_for_zero(levi_civita(n, o, p, q)(1, 3, 0, 3),
299 "levi_civita(n,o,p,q)(1,3,0,3)");
300 test_for_zero(levi_civita(n, o, p, q)(1, 3, 1, 0),
301 "levi_civita(n,o,p,q)(1,3,1,0)");
302 test_for_zero(levi_civita(n, o, p, q)(1, 3, 1, 1),
303 "levi_civita(n,o,p,q)(1,3,1,1)");
304 test_for_zero(levi_civita(n, o, p, q)(1, 3, 1, 2),
305 "levi_civita(n,o,p,q)(1,3,1,2)");
306 test_for_zero(levi_civita(n, o, p, q)(1, 3, 1, 3),
307 "levi_civita(n,o,p,q)(1,3,1,3)");
308 test_for_zero(levi_civita(n, o, p, q)(1, 3, 2, 0) - 1,
309 "levi_civita(n,o,p,q)(1,3,2,0)");
310 test_for_zero(levi_civita(n, o, p, q)(1, 3, 2, 1),
311 "levi_civita(n,o,p,q)(1,3,2,1)");
312 test_for_zero(levi_civita(n, o, p, q)(1, 3, 2, 2),
313 "levi_civita(n,o,p,q)(1,3,2,2)");
314 test_for_zero(levi_civita(n, o, p, q)(1, 3, 2, 3),
315 "levi_civita(n,o,p,q)(1,3,2,3)");
316 test_for_zero(levi_civita(n, o, p, q)(1, 3, 3, 0),
317 "levi_civita(n,o,p,q)(1,3,3,0)");
318 test_for_zero(levi_civita(n, o, p, q)(1, 3, 3, 1),
319 "levi_civita(n,o,p,q)(1,3,3,1)");
320 test_for_zero(levi_civita(n, o, p, q)(1, 3, 3, 2),
321 "levi_civita(n,o,p,q)(1,3,3,2)");
322 test_for_zero(levi_civita(n, o, p, q)(1, 3, 3, 3),
323 "levi_civita(n,o,p,q)(1,3,3,3)");
324
325 test_for_zero(levi_civita(n, o, p, q)(2, 0, 0, 0),
326 "levi_civita(n,o,p,q)(2,0,0,0)");
327 test_for_zero(levi_civita(n, o, p, q)(2, 0, 0, 1),
328 "levi_civita(n,o,p,q)(2,0,0,1)");
329 test_for_zero(levi_civita(n, o, p, q)(2, 0, 0, 2),
330 "levi_civita(n,o,p,q)(2,0,0,2)");
331 test_for_zero(levi_civita(n, o, p, q)(2, 0, 0, 3),
332 "levi_civita(n,o,p,q)(2,0,0,3)");
333 test_for_zero(levi_civita(n, o, p, q)(2, 0, 1, 0),
334 "levi_civita(n,o,p,q)(2,0,1,0)");
335 test_for_zero(levi_civita(n, o, p, q)(2, 0, 1, 1),
336 "levi_civita(n,o,p,q)(2,0,1,1)");
337 test_for_zero(levi_civita(n, o, p, q)(2, 0, 1, 2),
338 "levi_civita(n,o,p,q)(2,0,1,2)");
339 test_for_zero(levi_civita(n, o, p, q)(2, 0, 1, 3) - 1,
340 "levi_civita(n,o,p,q)(2,0,1,3)");
341 test_for_zero(levi_civita(n, o, p, q)(2, 0, 2, 0),
342 "levi_civita(n,o,p,q)(2,0,2,0)");
343 test_for_zero(levi_civita(n, o, p, q)(2, 0, 2, 1),
344 "levi_civita(n,o,p,q)(2,0,2,1)");
345 test_for_zero(levi_civita(n, o, p, q)(2, 0, 2, 2),
346 "levi_civita(n,o,p,q)(2,0,2,2)");
347 test_for_zero(levi_civita(n, o, p, q)(2, 0, 2, 3),
348 "levi_civita(n,o,p,q)(2,0,2,3)");
349 test_for_zero(levi_civita(n, o, p, q)(2, 0, 3, 0),
350 "levi_civita(n,o,p,q)(2,0,3,0)");
351 test_for_zero(levi_civita(n, o, p, q)(2, 0, 3, 1) + 1,
352 "levi_civita(n,o,p,q)(2,0,3,1)");
353 test_for_zero(levi_civita(n, o, p, q)(2, 0, 3, 2),
354 "levi_civita(n,o,p,q)(2,0,3,2)");
355 test_for_zero(levi_civita(n, o, p, q)(2, 0, 3, 3),
356 "levi_civita(n,o,p,q)(2,0,3,3)");
357 test_for_zero(levi_civita(n, o, p, q)(2, 1, 0, 0),
358 "levi_civita(n,o,p,q)(2,1,0,0)");
359 test_for_zero(levi_civita(n, o, p, q)(2, 1, 0, 1),
360 "levi_civita(n,o,p,q)(2,1,0,1)");
361 test_for_zero(levi_civita(n, o, p, q)(2, 1, 0, 2),
362 "levi_civita(n,o,p,q)(2,1,0,2)");
363 test_for_zero(levi_civita(n, o, p, q)(2, 1, 0, 3) + 1,
364 "levi_civita(n,o,p,q)(2,1,0,3)");
365 test_for_zero(levi_civita(n, o, p, q)(2, 1, 1, 0),
366 "levi_civita(n,o,p,q)(2,1,1,0)");
367 test_for_zero(levi_civita(n, o, p, q)(2, 1, 1, 1),
368 "levi_civita(n,o,p,q)(2,1,1,1)");
369 test_for_zero(levi_civita(n, o, p, q)(2, 1, 1, 2),
370 "levi_civita(n,o,p,q)(2,1,1,2)");
371 test_for_zero(levi_civita(n, o, p, q)(2, 1, 1, 3),
372 "levi_civita(n,o,p,q)(2,1,1,3)");
373 test_for_zero(levi_civita(n, o, p, q)(2, 1, 2, 0),
374 "levi_civita(n,o,p,q)(2,1,2,0)");
375 test_for_zero(levi_civita(n, o, p, q)(2, 1, 2, 1),
376 "levi_civita(n,o,p,q)(2,1,2,1)");
377 test_for_zero(levi_civita(n, o, p, q)(2, 1, 2, 2),
378 "levi_civita(n,o,p,q)(2,1,2,2)");
379 test_for_zero(levi_civita(n, o, p, q)(2, 1, 2, 3),
380 "levi_civita(n,o,p,q)(2,1,2,3)");
381 test_for_zero(levi_civita(n, o, p, q)(2, 1, 3, 0) - 1,
382 "levi_civita(n,o,p,q)(2,1,3,0)");
383 test_for_zero(levi_civita(n, o, p, q)(2, 1, 3, 1),
384 "levi_civita(n,o,p,q)(2,1,3,1)");
385 test_for_zero(levi_civita(n, o, p, q)(2, 1, 3, 2),
386 "levi_civita(n,o,p,q)(2,1,3,2)");
387 test_for_zero(levi_civita(n, o, p, q)(2, 1, 3, 3),
388 "levi_civita(n,o,p,q)(2,1,3,3)");
389 test_for_zero(levi_civita(n, o, p, q)(2, 2, 0, 0),
390 "levi_civita(n,o,p,q)(2,2,0,0)");
391 test_for_zero(levi_civita(n, o, p, q)(2, 2, 0, 1),
392 "levi_civita(n,o,p,q)(2,2,0,1)");
393 test_for_zero(levi_civita(n, o, p, q)(2, 2, 0, 2),
394 "levi_civita(n,o,p,q)(2,2,0,2)");
395 test_for_zero(levi_civita(n, o, p, q)(2, 2, 0, 3),
396 "levi_civita(n,o,p,q)(2,2,0,3)");
397 test_for_zero(levi_civita(n, o, p, q)(2, 2, 1, 0),
398 "levi_civita(n,o,p,q)(2,2,1,0)");
399 test_for_zero(levi_civita(n, o, p, q)(2, 2, 1, 1),
400 "levi_civita(n,o,p,q)(2,2,1,1)");
401 test_for_zero(levi_civita(n, o, p, q)(2, 2, 1, 2),
402 "levi_civita(n,o,p,q)(2,2,1,2)");
403 test_for_zero(levi_civita(n, o, p, q)(2, 2, 1, 3),
404 "levi_civita(n,o,p,q)(2,2,1,3)");
405 test_for_zero(levi_civita(n, o, p, q)(2, 2, 2, 0),
406 "levi_civita(n,o,p,q)(2,2,2,0)");
407 test_for_zero(levi_civita(n, o, p, q)(2, 2, 2, 1),
408 "levi_civita(n,o,p,q)(2,2,2,1)");
409 test_for_zero(levi_civita(n, o, p, q)(2, 2, 2, 2),
410 "levi_civita(n,o,p,q)(2,2,2,2)");
411 test_for_zero(levi_civita(n, o, p, q)(2, 2, 2, 3),
412 "levi_civita(n,o,p,q)(2,2,2,3)");
413 test_for_zero(levi_civita(n, o, p, q)(2, 2, 3, 0),
414 "levi_civita(n,o,p,q)(2,2,3,0)");
415 test_for_zero(levi_civita(n, o, p, q)(2, 2, 3, 1),
416 "levi_civita(n,o,p,q)(2,2,3,1)");
417 test_for_zero(levi_civita(n, o, p, q)(2, 2, 3, 2),
418 "levi_civita(n,o,p,q)(2,2,3,2)");
419 test_for_zero(levi_civita(n, o, p, q)(2, 2, 3, 3),
420 "levi_civita(n,o,p,q)(2,2,3,3)");
421 test_for_zero(levi_civita(n, o, p, q)(2, 3, 0, 0),
422 "levi_civita(n,o,p,q)(2,3,0,0)");
423 test_for_zero(levi_civita(n, o, p, q)(2, 3, 0, 1) - 1,
424 "levi_civita(n,o,p,q)(2,3,0,1)");
425 test_for_zero(levi_civita(n, o, p, q)(2, 3, 0, 2),
426 "levi_civita(n,o,p,q)(2,3,0,2)");
427 test_for_zero(levi_civita(n, o, p, q)(2, 3, 0, 3),
428 "levi_civita(n,o,p,q)(2,3,0,3)");
429 test_for_zero(levi_civita(n, o, p, q)(2, 3, 1, 0) + 1,
430 "levi_civita(n,o,p,q)(2,3,1,0)");
431 test_for_zero(levi_civita(n, o, p, q)(2, 3, 1, 1),
432 "levi_civita(n,o,p,q)(2,3,1,1)");
433 test_for_zero(levi_civita(n, o, p, q)(2, 3, 1, 2),
434 "levi_civita(n,o,p,q)(2,3,1,2)");
435 test_for_zero(levi_civita(n, o, p, q)(2, 3, 1, 3),
436 "levi_civita(n,o,p,q)(2,3,1,3)");
437 test_for_zero(levi_civita(n, o, p, q)(2, 3, 2, 0),
438 "levi_civita(n,o,p,q)(2,3,2,0)");
439 test_for_zero(levi_civita(n, o, p, q)(2, 3, 2, 1),
440 "levi_civita(n,o,p,q)(2,3,2,1)");
441 test_for_zero(levi_civita(n, o, p, q)(2, 3, 2, 2),
442 "levi_civita(n,o,p,q)(2,3,2,2)");
443 test_for_zero(levi_civita(n, o, p, q)(2, 3, 2, 3),
444 "levi_civita(n,o,p,q)(2,3,2,3)");
445 test_for_zero(levi_civita(n, o, p, q)(2, 3, 3, 0),
446 "levi_civita(n,o,p,q)(2,3,3,0)");
447 test_for_zero(levi_civita(n, o, p, q)(2, 3, 3, 1),
448 "levi_civita(n,o,p,q)(2,3,3,1)");
449 test_for_zero(levi_civita(n, o, p, q)(2, 3, 3, 2),
450 "levi_civita(n,o,p,q)(2,3,3,2)");
451 test_for_zero(levi_civita(n, o, p, q)(2, 3, 3, 3),
452 "levi_civita(n,o,p,q)(2,3,3,3)");
453
454 test_for_zero(levi_civita(n, o, p, q)(3, 0, 0, 0),
455 "levi_civita(n,o,p,q)(3,0,0,0)");
456 test_for_zero(levi_civita(n, o, p, q)(3, 0, 0, 1),
457 "levi_civita(n,o,p,q)(3,0,0,1)");
458 test_for_zero(levi_civita(n, o, p, q)(3, 0, 0, 2),
459 "levi_civita(n,o,p,q)(3,0,0,2)");
460 test_for_zero(levi_civita(n, o, p, q)(3, 0, 0, 3),
461 "levi_civita(n,o,p,q)(3,0,0,3)");
462 test_for_zero(levi_civita(n, o, p, q)(3, 0, 1, 0),
463 "levi_civita(n,o,p,q)(3,0,1,0)");
464 test_for_zero(levi_civita(n, o, p, q)(3, 0, 1, 1),
465 "levi_civita(n,o,p,q)(3,0,1,1)");
466 test_for_zero(levi_civita(n, o, p, q)(3, 0, 1, 2) + 1,
467 "levi_civita(n,o,p,q)(3,0,1,2)");
468 test_for_zero(levi_civita(n, o, p, q)(3, 0, 1, 3),
469 "levi_civita(n,o,p,q)(3,0,1,3)");
470 test_for_zero(levi_civita(n, o, p, q)(3, 0, 2, 0),
471 "levi_civita(n,o,p,q)(3,0,2,0)");
472 test_for_zero(levi_civita(n, o, p, q)(3, 0, 2, 1) - 1,
473 "levi_civita(n,o,p,q)(3,0,2,1)");
474 test_for_zero(levi_civita(n, o, p, q)(3, 0, 2, 2),
475 "levi_civita(n,o,p,q)(3,0,2,2)");
476 test_for_zero(levi_civita(n, o, p, q)(3, 0, 2, 3),
477 "levi_civita(n,o,p,q)(3,0,2,3)");
478 test_for_zero(levi_civita(n, o, p, q)(3, 0, 3, 0),
479 "levi_civita(n,o,p,q)(3,0,3,0)");
480 test_for_zero(levi_civita(n, o, p, q)(3, 0, 3, 1),
481 "levi_civita(n,o,p,q)(3,0,3,1)");
482 test_for_zero(levi_civita(n, o, p, q)(3, 0, 3, 2),
483 "levi_civita(n,o,p,q)(3,0,3,2)");
484 test_for_zero(levi_civita(n, o, p, q)(3, 0, 3, 3),
485 "levi_civita(n,o,p,q)(3,0,3,3)");
486 test_for_zero(levi_civita(n, o, p, q)(3, 1, 0, 0),
487 "levi_civita(n,o,p,q)(3,1,0,0)");
488 test_for_zero(levi_civita(n, o, p, q)(3, 1, 0, 1),
489 "levi_civita(n,o,p,q)(3,1,0,1)");
490 test_for_zero(levi_civita(n, o, p, q)(3, 1, 0, 2) - 1,
491 "levi_civita(n,o,p,q)(3,1,0,2)");
492 test_for_zero(levi_civita(n, o, p, q)(3, 1, 0, 3),
493 "levi_civita(n,o,p,q)(3,1,0,3)");
494 test_for_zero(levi_civita(n, o, p, q)(3, 1, 1, 0),
495 "levi_civita(n,o,p,q)(3,1,1,0)");
496 test_for_zero(levi_civita(n, o, p, q)(3, 1, 1, 1),
497 "levi_civita(n,o,p,q)(3,1,1,1)");
498 test_for_zero(levi_civita(n, o, p, q)(3, 1, 1, 2),
499 "levi_civita(n,o,p,q)(3,1,1,2)");
500 test_for_zero(levi_civita(n, o, p, q)(3, 1, 1, 3),
501 "levi_civita(n,o,p,q)(3,1,1,3)");
502 test_for_zero(levi_civita(n, o, p, q)(3, 1, 2, 0) + 1,
503 "levi_civita(n,o,p,q)(3,1,2,0)");
504 test_for_zero(levi_civita(n, o, p, q)(3, 1, 2, 1),
505 "levi_civita(n,o,p,q)(3,1,2,1)");
506 test_for_zero(levi_civita(n, o, p, q)(3, 1, 2, 2),
507 "levi_civita(n,o,p,q)(3,1,2,2)");
508 test_for_zero(levi_civita(n, o, p, q)(3, 1, 2, 3),
509 "levi_civita(n,o,p,q)(3,1,2,3)");
510 test_for_zero(levi_civita(n, o, p, q)(3, 1, 3, 0),
511 "levi_civita(n,o,p,q)(3,1,3,0)");
512 test_for_zero(levi_civita(n, o, p, q)(3, 1, 3, 1),
513 "levi_civita(n,o,p,q)(3,1,3,1)");
514 test_for_zero(levi_civita(n, o, p, q)(3, 1, 3, 2),
515 "levi_civita(n,o,p,q)(3,1,3,2)");
516 test_for_zero(levi_civita(n, o, p, q)(3, 1, 3, 3),
517 "levi_civita(n,o,p,q)(3,1,3,3)");
518 test_for_zero(levi_civita(n, o, p, q)(3, 2, 0, 0),
519 "levi_civita(n,o,p,q)(3,2,0,0)");
520 test_for_zero(levi_civita(n, o, p, q)(3, 2, 0, 1) + 1,
521 "levi_civita(n,o,p,q)(3,2,0,1)");
522 test_for_zero(levi_civita(n, o, p, q)(3, 2, 0, 2),
523 "levi_civita(n,o,p,q)(3,2,0,2)");
524 test_for_zero(levi_civita(n, o, p, q)(3, 2, 0, 3),
525 "levi_civita(n,o,p,q)(3,2,0,3)");
526 test_for_zero(levi_civita(n, o, p, q)(3, 2, 1, 0) - 1,
527 "levi_civita(n,o,p,q)(3,2,1,0)");
528 test_for_zero(levi_civita(n, o, p, q)(3, 2, 1, 1),
529 "levi_civita(n,o,p,q)(3,2,1,1)");
530 test_for_zero(levi_civita(n, o, p, q)(3, 2, 1, 2),
531 "levi_civita(n,o,p,q)(3,2,1,2)");
532 test_for_zero(levi_civita(n, o, p, q)(3, 2, 1, 3),
533 "levi_civita(n,o,p,q)(3,2,1,3)");
534 test_for_zero(levi_civita(n, o, p, q)(3, 2, 2, 0),
535 "levi_civita(n,o,p,q)(3,2,2,0)");
536 test_for_zero(levi_civita(n, o, p, q)(3, 2, 2, 1),
537 "levi_civita(n,o,p,q)(3,2,2,1)");
538 test_for_zero(levi_civita(n, o, p, q)(3, 2, 2, 2),
539 "levi_civita(n,o,p,q)(3,2,2,2)");
540 test_for_zero(levi_civita(n, o, p, q)(3, 2, 2, 3),
541 "levi_civita(n,o,p,q)(3,2,2,3)");
542 test_for_zero(levi_civita(n, o, p, q)(3, 2, 3, 0),
543 "levi_civita(n,o,p,q)(3,2,3,0)");
544 test_for_zero(levi_civita(n, o, p, q)(3, 2, 3, 1),
545 "levi_civita(n,o,p,q)(3,2,3,1)");
546 test_for_zero(levi_civita(n, o, p, q)(3, 2, 3, 2),
547 "levi_civita(n,o,p,q)(3,2,3,2)");
548 test_for_zero(levi_civita(n, o, p, q)(3, 2, 3, 3),
549 "levi_civita(n,o,p,q)(3,2,3,3)");
550 test_for_zero(levi_civita(n, o, p, q)(3, 3, 0, 0),
551 "levi_civita(n,o,p,q)(3,3,0,0)");
552 test_for_zero(levi_civita(n, o, p, q)(3, 3, 0, 1),
553 "levi_civita(n,o,p,q)(3,3,0,1)");
554 test_for_zero(levi_civita(n, o, p, q)(3, 3, 0, 2),
555 "levi_civita(n,o,p,q)(3,3,0,2)");
556 test_for_zero(levi_civita(n, o, p, q)(3, 3, 0, 3),
557 "levi_civita(n,o,p,q)(3,3,0,3)");
558 test_for_zero(levi_civita(n, o, p, q)(3, 3, 1, 0),
559 "levi_civita(n,o,p,q)(3,3,1,0)");
560 test_for_zero(levi_civita(n, o, p, q)(3, 3, 1, 1),
561 "levi_civita(n,o,p,q)(3,3,1,1)");
562 test_for_zero(levi_civita(n, o, p, q)(3, 3, 1, 2),
563 "levi_civita(n,o,p,q)(3,3,1,2)");
564 test_for_zero(levi_civita(n, o, p, q)(3, 3, 1, 3),
565 "levi_civita(n,o,p,q)(3,3,1,3)");
566 test_for_zero(levi_civita(n, o, p, q)(3, 3, 2, 0),
567 "levi_civita(n,o,p,q)(3,3,2,0)");
568 test_for_zero(levi_civita(n, o, p, q)(3, 3, 2, 1),
569 "levi_civita(n,o,p,q)(3,3,2,1)");
570 test_for_zero(levi_civita(n, o, p, q)(3, 3, 2, 2),
571 "levi_civita(n,o,p,q)(3,3,2,2)");
572 test_for_zero(levi_civita(n, o, p, q)(3, 3, 2, 3),
573 "levi_civita(n,o,p,q)(3,3,2,3)");
574 test_for_zero(levi_civita(n, o, p, q)(3, 3, 3, 0),
575 "levi_civita(n,o,p,q)(3,3,3,0)");
576 test_for_zero(levi_civita(n, o, p, q)(3, 3, 3, 1),
577 "levi_civita(n,o,p,q)(3,3,3,1)");
578 test_for_zero(levi_civita(n, o, p, q)(3, 3, 3, 2),
579 "levi_civita(n,o,p,q)(3,3,3,2)");
580 test_for_zero(levi_civita(n, o, p, q)(3, 3, 3, 3),
581 "levi_civita(n,o,p,q)(3,3,3,3)");
582}
Tensors class implemented by Walter Landry.
FTensor::Index< 'i', SPACE_DIM > i
const double n
refractive index of diffusive medium
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
Tensors class implemented by Walter Landry.
Definition FTensor.hpp:51
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use
FTensor::Index< 'm', 3 > m
void test_Levi_Civita_01()
void test_for_zero(const T &t, const std::string &s)