File: test_util_interpolation.py

package info (click to toggle)
python-escript 5.6-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 144,304 kB
  • sloc: python: 592,074; cpp: 136,909; ansic: 18,675; javascript: 9,411; xml: 3,384; sh: 738; makefile: 207
file content (50175 lines) | stat: -rw-r--r-- 5,119,469 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568
19569
19570
19571
19572
19573
19574
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977
19978
19979
19980
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293
20294
20295
20296
20297
20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
20313
20314
20315
20316
20317
20318
20319
20320
20321
20322
20323
20324
20325
20326
20327
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
20373
20374
20375
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511
20512
20513
20514
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528
20529
20530
20531
20532
20533
20534
20535
20536
20537
20538
20539
20540
20541
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
20623
20624
20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692
20693
20694
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724
20725
20726
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
20757
20758
20759
20760
20761
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822
20823
20824
20825
20826
20827
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838
20839
20840
20841
20842
20843
20844
20845
20846
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890
20891
20892
20893
20894
20895
20896
20897
20898
20899
20900
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947
20948
20949
20950
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987
20988
20989
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000
21001
21002
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186
21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21379
21380
21381
21382
21383
21384
21385
21386
21387
21388
21389
21390
21391
21392
21393
21394
21395
21396
21397
21398
21399
21400
21401
21402
21403
21404
21405
21406
21407
21408
21409
21410
21411
21412
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424
21425
21426
21427
21428
21429
21430
21431
21432
21433
21434
21435
21436
21437
21438
21439
21440
21441
21442
21443
21444
21445
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458
21459
21460
21461
21462
21463
21464
21465
21466
21467
21468
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
21553
21554
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564
21565
21566
21567
21568
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801
21802
21803
21804
21805
21806
21807
21808
21809
21810
21811
21812
21813
21814
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895
21896
21897
21898
21899
21900
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471
22472
22473
22474
22475
22476
22477
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616
22617
22618
22619
22620
22621
22622
22623
22624
22625
22626
22627
22628
22629
22630
22631
22632
22633
22634
22635
22636
22637
22638
22639
22640
22641
22642
22643
22644
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683
22684
22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695
22696
22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719
22720
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765
22766
22767
22768
22769
22770
22771
22772
22773
22774
22775
22776
22777
22778
22779
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791
22792
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
22824
22825
22826
22827
22828
22829
22830
22831
22832
22833
22834
22835
22836
22837
22838
22839
22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874
22875
22876
22877
22878
22879
22880
22881
22882
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962
22963
22964
22965
22966
22967
22968
22969
22970
22971
22972
22973
22974
22975
22976
22977
22978
22979
22980
22981
22982
22983
22984
22985
22986
22987
22988
22989
22990
22991
22992
22993
22994
22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040
23041
23042
23043
23044
23045
23046
23047
23048
23049
23050
23051
23052
23053
23054
23055
23056
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102
23103
23104
23105
23106
23107
23108
23109
23110
23111
23112
23113
23114
23115
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163
23164
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
23196
23197
23198
23199
23200
23201
23202
23203
23204
23205
23206
23207
23208
23209
23210
23211
23212
23213
23214
23215
23216
23217
23218
23219
23220
23221
23222
23223
23224
23225
23226
23227
23228
23229
23230
23231
23232
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288
23289
23290
23291
23292
23293
23294
23295
23296
23297
23298
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
23311
23312
23313
23314
23315
23316
23317
23318
23319
23320
23321
23322
23323
23324
23325
23326
23327
23328
23329
23330
23331
23332
23333
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
23351
23352
23353
23354
23355
23356
23357
23358
23359
23360
23361
23362
23363
23364
23365
23366
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
23381
23382
23383
23384
23385
23386
23387
23388
23389
23390
23391
23392
23393
23394
23395
23396
23397
23398
23399
23400
23401
23402
23403
23404
23405
23406
23407
23408
23409
23410
23411
23412
23413
23414
23415
23416
23417
23418
23419
23420
23421
23422
23423
23424
23425
23426
23427
23428
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
23444
23445
23446
23447
23448
23449
23450
23451
23452
23453
23454
23455
23456
23457
23458
23459
23460
23461
23462
23463
23464
23465
23466
23467
23468
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505
23506
23507
23508
23509
23510
23511
23512
23513
23514
23515
23516
23517
23518
23519
23520
23521
23522
23523
23524
23525
23526
23527
23528
23529
23530
23531
23532
23533
23534
23535
23536
23537
23538
23539
23540
23541
23542
23543
23544
23545
23546
23547
23548
23549
23550
23551
23552
23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
23568
23569
23570
23571
23572
23573
23574
23575
23576
23577
23578
23579
23580
23581
23582
23583
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
23599
23600
23601
23602
23603
23604
23605
23606
23607
23608
23609
23610
23611
23612
23613
23614
23615
23616
23617
23618
23619
23620
23621
23622
23623
23624
23625
23626
23627
23628
23629
23630
23631
23632
23633
23634
23635
23636
23637
23638
23639
23640
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662
23663
23664
23665
23666
23667
23668
23669
23670
23671
23672
23673
23674
23675
23676
23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691
23692
23693
23694
23695
23696
23697
23698
23699
23700
23701
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766
23767
23768
23769
23770
23771
23772
23773
23774
23775
23776
23777
23778
23779
23780
23781
23782
23783
23784
23785
23786
23787
23788
23789
23790
23791
23792
23793
23794
23795
23796
23797
23798
23799
23800
23801
23802
23803
23804
23805
23806
23807
23808
23809
23810
23811
23812
23813
23814
23815
23816
23817
23818
23819
23820
23821
23822
23823
23824
23825
23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836
23837
23838
23839
23840
23841
23842
23843
23844
23845
23846
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
23862
23863
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874
23875
23876
23877
23878
23879
23880
23881
23882
23883
23884
23885
23886
23887
23888
23889
23890
23891
23892
23893
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929
23930
23931
23932
23933
23934
23935
23936
23937
23938
23939
23940
23941
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
23981
23982
23983
23984
23985
23986
23987
23988
23989
23990
23991
23992
23993
23994
23995
23996
23997
23998
23999
24000
24001
24002
24003
24004
24005
24006
24007
24008
24009
24010
24011
24012
24013
24014
24015
24016
24017
24018
24019
24020
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034
24035
24036
24037
24038
24039
24040
24041
24042
24043
24044
24045
24046
24047
24048
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089
24090
24091
24092
24093
24094
24095
24096
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160
24161
24162
24163
24164
24165
24166
24167
24168
24169
24170
24171
24172
24173
24174
24175
24176
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186
24187
24188
24189
24190
24191
24192
24193
24194
24195
24196
24197
24198
24199
24200
24201
24202
24203
24204
24205
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320
24321
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
24343
24344
24345
24346
24347
24348
24349
24350
24351
24352
24353
24354
24355
24356
24357
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373
24374
24375
24376
24377
24378
24379
24380
24381
24382
24383
24384
24385
24386
24387
24388
24389
24390
24391
24392
24393
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
24405
24406
24407
24408
24409
24410
24411
24412
24413
24414
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439
24440
24441
24442
24443
24444
24445
24446
24447
24448
24449
24450
24451
24452
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462
24463
24464
24465
24466
24467
24468
24469
24470
24471
24472
24473
24474
24475
24476
24477
24478
24479
24480
24481
24482
24483
24484
24485
24486
24487
24488
24489
24490
24491
24492
24493
24494
24495
24496
24497
24498
24499
24500
24501
24502
24503
24504
24505
24506
24507
24508
24509
24510
24511
24512
24513
24514
24515
24516
24517
24518
24519
24520
24521
24522
24523
24524
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
24560
24561
24562
24563
24564
24565
24566
24567
24568
24569
24570
24571
24572
24573
24574
24575
24576
24577
24578
24579
24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
24591
24592
24593
24594
24595
24596
24597
24598
24599
24600
24601
24602
24603
24604
24605
24606
24607
24608
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
24622
24623
24624
24625
24626
24627
24628
24629
24630
24631
24632
24633
24634
24635
24636
24637
24638
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717
24718
24719
24720
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830
24831
24832
24833
24834
24835
24836
24837
24838
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866
24867
24868
24869
24870
24871
24872
24873
24874
24875
24876
24877
24878
24879
24880
24881
24882
24883
24884
24885
24886
24887
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903
24904
24905
24906
24907
24908
24909
24910
24911
24912
24913
24914
24915
24916
24917
24918
24919
24920
24921
24922
24923
24924
24925
24926
24927
24928
24929
24930
24931
24932
24933
24934
24935
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945
24946
24947
24948
24949
24950
24951
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967
24968
24969
24970
24971
24972
24973
24974
24975
24976
24977
24978
24979
24980
24981
24982
24983
24984
24985
24986
24987
24988
24989
24990
24991
24992
24993
24994
24995
24996
24997
24998
24999
25000
25001
25002
25003
25004
25005
25006
25007
25008
25009
25010
25011
25012
25013
25014
25015
25016
25017
25018
25019
25020
25021
25022
25023
25024
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034
25035
25036
25037
25038
25039
25040
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098
25099
25100
25101
25102
25103
25104
25105
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115
25116
25117
25118
25119
25120
25121
25122
25123
25124
25125
25126
25127
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148
25149
25150
25151
25152
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216
25217
25218
25219
25220
25221
25222
25223
25224
25225
25226
25227
25228
25229
25230
25231
25232
25233
25234
25235
25236
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249
25250
25251
25252
25253
25254
25255
25256
25257
25258
25259
25260
25261
25262
25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
25273
25274
25275
25276
25277
25278
25279
25280
25281
25282
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306
25307
25308
25309
25310
25311
25312
25313
25314
25315
25316
25317
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
25397
25398
25399
25400
25401
25402
25403
25404
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414
25415
25416
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468
25469
25470
25471
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492
25493
25494
25495
25496
25497
25498
25499
25500
25501
25502
25503
25504
25505
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558
25559
25560
25561
25562
25563
25564
25565
25566
25567
25568
25569
25570
25571
25572
25573
25574
25575
25576
25577
25578
25579
25580
25581
25582
25583
25584
25585
25586
25587
25588
25589
25590
25591
25592
25593
25594
25595
25596
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
25614
25615
25616
25617
25618
25619
25620
25621
25622
25623
25624
25625
25626
25627
25628
25629
25630
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643
25644
25645
25646
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658
25659
25660
25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671
25672
25673
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
25738
25739
25740
25741
25742
25743
25744
25745
25746
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783
25784
25785
25786
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801
25802
25803
25804
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827
25828
25829
25830
25831
25832
25833
25834
25835
25836
25837
25838
25839
25840
25841
25842
25843
25844
25845
25846
25847
25848
25849
25850
25851
25852
25853
25854
25855
25856
25857
25858
25859
25860
25861
25862
25863
25864
25865
25866
25867
25868
25869
25870
25871
25872
25873
25874
25875
25876
25877
25878
25879
25880
25881
25882
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898
25899
25900
25901
25902
25903
25904
25905
25906
25907
25908
25909
25910
25911
25912
25913
25914
25915
25916
25917
25918
25919
25920
25921
25922
25923
25924
25925
25926
25927
25928
25929
25930
25931
25932
25933
25934
25935
25936
25937
25938
25939
25940
25941
25942
25943
25944
25945
25946
25947
25948
25949
25950
25951
25952
25953
25954
25955
25956
25957
25958
25959
25960
25961
25962
25963
25964
25965
25966
25967
25968
25969
25970
25971
25972
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995
25996
25997
25998
25999
26000
26001
26002
26003
26004
26005
26006
26007
26008
26009
26010
26011
26012
26013
26014
26015
26016
26017
26018
26019
26020
26021
26022
26023
26024
26025
26026
26027
26028
26029
26030
26031
26032
26033
26034
26035
26036
26037
26038
26039
26040
26041
26042
26043
26044
26045
26046
26047
26048
26049
26050
26051
26052
26053
26054
26055
26056
26057
26058
26059
26060
26061
26062
26063
26064
26065
26066
26067
26068
26069
26070
26071
26072
26073
26074
26075
26076
26077
26078
26079
26080
26081
26082
26083
26084
26085
26086
26087
26088
26089
26090
26091
26092
26093
26094
26095
26096
26097
26098
26099
26100
26101
26102
26103
26104
26105
26106
26107
26108
26109
26110
26111
26112
26113
26114
26115
26116
26117
26118
26119
26120
26121
26122
26123
26124
26125
26126
26127
26128
26129
26130
26131
26132
26133
26134
26135
26136
26137
26138
26139
26140
26141
26142
26143
26144
26145
26146
26147
26148
26149
26150
26151
26152
26153
26154
26155
26156
26157
26158
26159
26160
26161
26162
26163
26164
26165
26166
26167
26168
26169
26170
26171
26172
26173
26174
26175
26176
26177
26178
26179
26180
26181
26182
26183
26184
26185
26186
26187
26188
26189
26190
26191
26192
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202
26203
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223
26224
26225
26226
26227
26228
26229
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239
26240
26241
26242
26243
26244
26245
26246
26247
26248
26249
26250
26251
26252
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266
26267
26268
26269
26270
26271
26272
26273
26274
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298
26299
26300
26301
26302
26303
26304
26305
26306
26307
26308
26309
26310
26311
26312
26313
26314
26315
26316
26317
26318
26319
26320
26321
26322
26323
26324
26325
26326
26327
26328
26329
26330
26331
26332
26333
26334
26335
26336
26337
26338
26339
26340
26341
26342
26343
26344
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354
26355
26356
26357
26358
26359
26360
26361
26362
26363
26364
26365
26366
26367
26368
26369
26370
26371
26372
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383
26384
26385
26386
26387
26388
26389
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423
26424
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26437
26438
26439
26440
26441
26442
26443
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453
26454
26455
26456
26457
26458
26459
26460
26461
26462
26463
26464
26465
26466
26467
26468
26469
26470
26471
26472
26473
26474
26475
26476
26477
26478
26479
26480
26481
26482
26483
26484
26485
26486
26487
26488
26489
26490
26491
26492
26493
26494
26495
26496
26497
26498
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527
26528
26529
26530
26531
26532
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545
26546
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556
26557
26558
26559
26560
26561
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574
26575
26576
26577
26578
26579
26580
26581
26582
26583
26584
26585
26586
26587
26588
26589
26590
26591
26592
26593
26594
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604
26605
26606
26607
26608
26609
26610
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649
26650
26651
26652
26653
26654
26655
26656
26657
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667
26668
26669
26670
26671
26672
26673
26674
26675
26676
26677
26678
26679
26680
26681
26682
26683
26684
26685
26686
26687
26688
26689
26690
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
26703
26704
26705
26706
26707
26708
26709
26710
26711
26712
26713
26714
26715
26716
26717
26718
26719
26720
26721
26722
26723
26724
26725
26726
26727
26728
26729
26730
26731
26732
26733
26734
26735
26736
26737
26738
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752
26753
26754
26755
26756
26757
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767
26768
26769
26770
26771
26772
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782
26783
26784
26785
26786
26787
26788
26789
26790
26791
26792
26793
26794
26795
26796
26797
26798
26799
26800
26801
26802
26803
26804
26805
26806
26807
26808
26809
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829
26830
26831
26832
26833
26834
26835
26836
26837
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852
26853
26854
26855
26856
26857
26858
26859
26860
26861
26862
26863
26864
26865
26866
26867
26868
26869
26870
26871
26872
26873
26874
26875
26876
26877
26878
26879
26880
26881
26882
26883
26884
26885
26886
26887
26888
26889
26890
26891
26892
26893
26894
26895
26896
26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911
26912
26913
26914
26915
26916
26917
26918
26919
26920
26921
26922
26923
26924
26925
26926
26927
26928
26929
26930
26931
26932
26933
26934
26935
26936
26937
26938
26939
26940
26941
26942
26943
26944
26945
26946
26947
26948
26949
26950
26951
26952
26953
26954
26955
26956
26957
26958
26959
26960
26961
26962
26963
26964
26965
26966
26967
26968
26969
26970
26971
26972
26973
26974
26975
26976
26977
26978
26979
26980
26981
26982
26983
26984
26985
26986
26987
26988
26989
26990
26991
26992
26993
26994
26995
26996
26997
26998
26999
27000
27001
27002
27003
27004
27005
27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018
27019
27020
27021
27022
27023
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034
27035
27036
27037
27038
27039
27040
27041
27042
27043
27044
27045
27046
27047
27048
27049
27050
27051
27052
27053
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067
27068
27069
27070
27071
27072
27073
27074
27075
27076
27077
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087
27088
27089
27090
27091
27092
27093
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106
27107
27108
27109
27110
27111
27112
27113
27114
27115
27116
27117
27118
27119
27120
27121
27122
27123
27124
27125
27126
27127
27128
27129
27130
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
27141
27142
27143
27144
27145
27146
27147
27148
27149
27150
27151
27152
27153
27154
27155
27156
27157
27158
27159
27160
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189
27190
27191
27192
27193
27194
27195
27196
27197
27198
27199
27200
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219
27220
27221
27222
27223
27224
27225
27226
27227
27228
27229
27230
27231
27232
27233
27234
27235
27236
27237
27238
27239
27240
27241
27242
27243
27244
27245
27246
27247
27248
27249
27250
27251
27252
27253
27254
27255
27256
27257
27258
27259
27260
27261
27262
27263
27264
27265
27266
27267
27268
27269
27270
27271
27272
27273
27274
27275
27276
27277
27278
27279
27280
27281
27282
27283
27284
27285
27286
27287
27288
27289
27290
27291
27292
27293
27294
27295
27296
27297
27298
27299
27300
27301
27302
27303
27304
27305
27306
27307
27308
27309
27310
27311
27312
27313
27314
27315
27316
27317
27318
27319
27320
27321
27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
27333
27334
27335
27336
27337
27338
27339
27340
27341
27342
27343
27344
27345
27346
27347
27348
27349
27350
27351
27352
27353
27354
27355
27356
27357
27358
27359
27360
27361
27362
27363
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374
27375
27376
27377
27378
27379
27380
27381
27382
27383
27384
27385
27386
27387
27388
27389
27390
27391
27392
27393
27394
27395
27396
27397
27398
27399
27400
27401
27402
27403
27404
27405
27406
27407
27408
27409
27410
27411
27412
27413
27414
27415
27416
27417
27418
27419
27420
27421
27422
27423
27424
27425
27426
27427
27428
27429
27430
27431
27432
27433
27434
27435
27436
27437
27438
27439
27440
27441
27442
27443
27444
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469
27470
27471
27472
27473
27474
27475
27476
27477
27478
27479
27480
27481
27482
27483
27484
27485
27486
27487
27488
27489
27490
27491
27492
27493
27494
27495
27496
27497
27498
27499
27500
27501
27502
27503
27504
27505
27506
27507
27508
27509
27510
27511
27512
27513
27514
27515
27516
27517
27518
27519
27520
27521
27522
27523
27524
27525
27526
27527
27528
27529
27530
27531
27532
27533
27534
27535
27536
27537
27538
27539
27540
27541
27542
27543
27544
27545
27546
27547
27548
27549
27550
27551
27552
27553
27554
27555
27556
27557
27558
27559
27560
27561
27562
27563
27564
27565
27566
27567
27568
27569
27570
27571
27572
27573
27574
27575
27576
27577
27578
27579
27580
27581
27582
27583
27584
27585
27586
27587
27588
27589
27590
27591
27592
27593
27594
27595
27596
27597
27598
27599
27600
27601
27602
27603
27604
27605
27606
27607
27608
27609
27610
27611
27612
27613
27614
27615
27616
27617
27618
27619
27620
27621
27622
27623
27624
27625
27626
27627
27628
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639
27640
27641
27642
27643
27644
27645
27646
27647
27648
27649
27650
27651
27652
27653
27654
27655
27656
27657
27658
27659
27660
27661
27662
27663
27664
27665
27666
27667
27668
27669
27670
27671
27672
27673
27674
27675
27676
27677
27678
27679
27680
27681
27682
27683
27684
27685
27686
27687
27688
27689
27690
27691
27692
27693
27694
27695
27696
27697
27698
27699
27700
27701
27702
27703
27704
27705
27706
27707
27708
27709
27710
27711
27712
27713
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731
27732
27733
27734
27735
27736
27737
27738
27739
27740
27741
27742
27743
27744
27745
27746
27747
27748
27749
27750
27751
27752
27753
27754
27755
27756
27757
27758
27759
27760
27761
27762
27763
27764
27765
27766
27767
27768
27769
27770
27771
27772
27773
27774
27775
27776
27777
27778
27779
27780
27781
27782
27783
27784
27785
27786
27787
27788
27789
27790
27791
27792
27793
27794
27795
27796
27797
27798
27799
27800
27801
27802
27803
27804
27805
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815
27816
27817
27818
27819
27820
27821
27822
27823
27824
27825
27826
27827
27828
27829
27830
27831
27832
27833
27834
27835
27836
27837
27838
27839
27840
27841
27842
27843
27844
27845
27846
27847
27848
27849
27850
27851
27852
27853
27854
27855
27856
27857
27858
27859
27860
27861
27862
27863
27864
27865
27866
27867
27868
27869
27870
27871
27872
27873
27874
27875
27876
27877
27878
27879
27880
27881
27882
27883
27884
27885
27886
27887
27888
27889
27890
27891
27892
27893
27894
27895
27896
27897
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941
27942
27943
27944
27945
27946
27947
27948
27949
27950
27951
27952
27953
27954
27955
27956
27957
27958
27959
27960
27961
27962
27963
27964
27965
27966
27967
27968
27969
27970
27971
27972
27973
27974
27975
27976
27977
27978
27979
27980
27981
27982
27983
27984
27985
27986
27987
27988
27989
27990
27991
27992
27993
27994
27995
27996
27997
27998
27999
28000
28001
28002
28003
28004
28005
28006
28007
28008
28009
28010
28011
28012
28013
28014
28015
28016
28017
28018
28019
28020
28021
28022
28023
28024
28025
28026
28027
28028
28029
28030
28031
28032
28033
28034
28035
28036
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048
28049
28050
28051
28052
28053
28054
28055
28056
28057
28058
28059
28060
28061
28062
28063
28064
28065
28066
28067
28068
28069
28070
28071
28072
28073
28074
28075
28076
28077
28078
28079
28080
28081
28082
28083
28084
28085
28086
28087
28088
28089
28090
28091
28092
28093
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106
28107
28108
28109
28110
28111
28112
28113
28114
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124
28125
28126
28127
28128
28129
28130
28131
28132
28133
28134
28135
28136
28137
28138
28139
28140
28141
28142
28143
28144
28145
28146
28147
28148
28149
28150
28151
28152
28153
28154
28155
28156
28157
28158
28159
28160
28161
28162
28163
28164
28165
28166
28167
28168
28169
28170
28171
28172
28173
28174
28175
28176
28177
28178
28179
28180
28181
28182
28183
28184
28185
28186
28187
28188
28189
28190
28191
28192
28193
28194
28195
28196
28197
28198
28199
28200
28201
28202
28203
28204
28205
28206
28207
28208
28209
28210
28211
28212
28213
28214
28215
28216
28217
28218
28219
28220
28221
28222
28223
28224
28225
28226
28227
28228
28229
28230
28231
28232
28233
28234
28235
28236
28237
28238
28239
28240
28241
28242
28243
28244
28245
28246
28247
28248
28249
28250
28251
28252
28253
28254
28255
28256
28257
28258
28259
28260
28261
28262
28263
28264
28265
28266
28267
28268
28269
28270
28271
28272
28273
28274
28275
28276
28277
28278
28279
28280
28281
28282
28283
28284
28285
28286
28287
28288
28289
28290
28291
28292
28293
28294
28295
28296
28297
28298
28299
28300
28301
28302
28303
28304
28305
28306
28307
28308
28309
28310
28311
28312
28313
28314
28315
28316
28317
28318
28319
28320
28321
28322
28323
28324
28325
28326
28327
28328
28329
28330
28331
28332
28333
28334
28335
28336
28337
28338
28339
28340
28341
28342
28343
28344
28345
28346
28347
28348
28349
28350
28351
28352
28353
28354
28355
28356
28357
28358
28359
28360
28361
28362
28363
28364
28365
28366
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402
28403
28404
28405
28406
28407
28408
28409
28410
28411
28412
28413
28414
28415
28416
28417
28418
28419
28420
28421
28422
28423
28424
28425
28426
28427
28428
28429
28430
28431
28432
28433
28434
28435
28436
28437
28438
28439
28440
28441
28442
28443
28444
28445
28446
28447
28448
28449
28450
28451
28452
28453
28454
28455
28456
28457
28458
28459
28460
28461
28462
28463
28464
28465
28466
28467
28468
28469
28470
28471
28472
28473
28474
28475
28476
28477
28478
28479
28480
28481
28482
28483
28484
28485
28486
28487
28488
28489
28490
28491
28492
28493
28494
28495
28496
28497
28498
28499
28500
28501
28502
28503
28504
28505
28506
28507
28508
28509
28510
28511
28512
28513
28514
28515
28516
28517
28518
28519
28520
28521
28522
28523
28524
28525
28526
28527
28528
28529
28530
28531
28532
28533
28534
28535
28536
28537
28538
28539
28540
28541
28542
28543
28544
28545
28546
28547
28548
28549
28550
28551
28552
28553
28554
28555
28556
28557
28558
28559
28560
28561
28562
28563
28564
28565
28566
28567
28568
28569
28570
28571
28572
28573
28574
28575
28576
28577
28578
28579
28580
28581
28582
28583
28584
28585
28586
28587
28588
28589
28590
28591
28592
28593
28594
28595
28596
28597
28598
28599
28600
28601
28602
28603
28604
28605
28606
28607
28608
28609
28610
28611
28612
28613
28614
28615
28616
28617
28618
28619
28620
28621
28622
28623
28624
28625
28626
28627
28628
28629
28630
28631
28632
28633
28634
28635
28636
28637
28638
28639
28640
28641
28642
28643
28644
28645
28646
28647
28648
28649
28650
28651
28652
28653
28654
28655
28656
28657
28658
28659
28660
28661
28662
28663
28664
28665
28666
28667
28668
28669
28670
28671
28672
28673
28674
28675
28676
28677
28678
28679
28680
28681
28682
28683
28684
28685
28686
28687
28688
28689
28690
28691
28692
28693
28694
28695
28696
28697
28698
28699
28700
28701
28702
28703
28704
28705
28706
28707
28708
28709
28710
28711
28712
28713
28714
28715
28716
28717
28718
28719
28720
28721
28722
28723
28724
28725
28726
28727
28728
28729
28730
28731
28732
28733
28734
28735
28736
28737
28738
28739
28740
28741
28742
28743
28744
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755
28756
28757
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782
28783
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793
28794
28795
28796
28797
28798
28799
28800
28801
28802
28803
28804
28805
28806
28807
28808
28809
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969
28970
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000
29001
29002
29003
29004
29005
29006
29007
29008
29009
29010
29011
29012
29013
29014
29015
29016
29017
29018
29019
29020
29021
29022
29023
29024
29025
29026
29027
29028
29029
29030
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051
29052
29053
29054
29055
29056
29057
29058
29059
29060
29061
29062
29063
29064
29065
29066
29067
29068
29069
29070
29071
29072
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085
29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102
29103
29104
29105
29106
29107
29108
29109
29110
29111
29112
29113
29114
29115
29116
29117
29118
29119
29120
29121
29122
29123
29124
29125
29126
29127
29128
29129
29130
29131
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148
29149
29150
29151
29152
29153
29154
29155
29156
29157
29158
29159
29160
29161
29162
29163
29164
29165
29166
29167
29168
29169
29170
29171
29172
29173
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197
29198
29199
29200
29201
29202
29203
29204
29205
29206
29207
29208
29209
29210
29211
29212
29213
29214
29215
29216
29217
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236
29237
29238
29239
29240
29241
29242
29243
29244
29245
29246
29247
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268
29269
29270
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286
29287
29288
29289
29290
29291
29292
29293
29294
29295
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314
29315
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325
29326
29327
29328
29329
29330
29331
29332
29333
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376
29377
29378
29379
29380
29381
29382
29383
29384
29385
29386
29387
29388
29389
29390
29391
29392
29393
29394
29395
29396
29397
29398
29399
29400
29401
29402
29403
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440
29441
29442
29443
29444
29445
29446
29447
29448
29449
29450
29451
29452
29453
29454
29455
29456
29457
29458
29459
29460
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470
29471
29472
29473
29474
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518
29519
29520
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532
29533
29534
29535
29536
29537
29538
29539
29540
29541
29542
29543
29544
29545
29546
29547
29548
29549
29550
29551
29552
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564
29565
29566
29567
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578
29579
29580
29581
29582
29583
29584
29585
29586
29587
29588
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641
29642
29643
29644
29645
29646
29647
29648
29649
29650
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661
29662
29663
29664
29665
29666
29667
29668
29669
29670
29671
29672
29673
29674
29675
29676
29677
29678
29679
29680
29681
29682
29683
29684
29685
29686
29687
29688
29689
29690
29691
29692
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
29739
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753
29754
29755
29756
29757
29758
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770
29771
29772
29773
29774
29775
29776
29777
29778
29779
29780
29781
29782
29783
29784
29785
29786
29787
29788
29789
29790
29791
29792
29793
29794
29795
29796
29797
29798
29799
29800
29801
29802
29803
29804
29805
29806
29807
29808
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818
29819
29820
29821
29822
29823
29824
29825
29826
29827
29828
29829
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839
29840
29841
29842
29843
29844
29845
29846
29847
29848
29849
29850
29851
29852
29853
29854
29855
29856
29857
29858
29859
29860
29861
29862
29863
29864
29865
29866
29867
29868
29869
29870
29871
29872
29873
29874
29875
29876
29877
29878
29879
29880
29881
29882
29883
29884
29885
29886
29887
29888
29889
29890
29891
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911
29912
29913
29914
29915
29916
29917
29918
29919
29920
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937
29938
29939
29940
29941
29942
29943
29944
29945
29946
29947
29948
29949
29950
29951
29952
29953
29954
29955
29956
29957
29958
29959
29960
29961
29962
29963
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978
29979
29980
29981
29982
29983
29984
29985
29986
29987
29988
29989
29990
29991
29992
29993
29994
29995
29996
29997
29998
29999
30000
30001
30002
30003
30004
30005
30006
30007
30008
30009
30010
30011
30012
30013
30014
30015
30016
30017
30018
30019
30020
30021
30022
30023
30024
30025
30026
30027
30028
30029
30030
30031
30032
30033
30034
30035
30036
30037
30038
30039
30040
30041
30042
30043
30044
30045
30046
30047
30048
30049
30050
30051
30052
30053
30054
30055
30056
30057
30058
30059
30060
30061
30062
30063
30064
30065
30066
30067
30068
30069
30070
30071
30072
30073
30074
30075
30076
30077
30078
30079
30080
30081
30082
30083
30084
30085
30086
30087
30088
30089
30090
30091
30092
30093
30094
30095
30096
30097
30098
30099
30100
30101
30102
30103
30104
30105
30106
30107
30108
30109
30110
30111
30112
30113
30114
30115
30116
30117
30118
30119
30120
30121
30122
30123
30124
30125
30126
30127
30128
30129
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140
30141
30142
30143
30144
30145
30146
30147
30148
30149
30150
30151
30152
30153
30154
30155
30156
30157
30158
30159
30160
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171
30172
30173
30174
30175
30176
30177
30178
30179
30180
30181
30182
30183
30184
30185
30186
30187
30188
30189
30190
30191
30192
30193
30194
30195
30196
30197
30198
30199
30200
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214
30215
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226
30227
30228
30229
30230
30231
30232
30233
30234
30235
30236
30237
30238
30239
30240
30241
30242
30243
30244
30245
30246
30247
30248
30249
30250
30251
30252
30253
30254
30255
30256
30257
30258
30259
30260
30261
30262
30263
30264
30265
30266
30267
30268
30269
30270
30271
30272
30273
30274
30275
30276
30277
30278
30279
30280
30281
30282
30283
30284
30285
30286
30287
30288
30289
30290
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300
30301
30302
30303
30304
30305
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
30325
30326
30327
30328
30329
30330
30331
30332
30333
30334
30335
30336
30337
30338
30339
30340
30341
30342
30343
30344
30345
30346
30347
30348
30349
30350
30351
30352
30353
30354
30355
30356
30357
30358
30359
30360
30361
30362
30363
30364
30365
30366
30367
30368
30369
30370
30371
30372
30373
30374
30375
30376
30377
30378
30379
30380
30381
30382
30383
30384
30385
30386
30387
30388
30389
30390
30391
30392
30393
30394
30395
30396
30397
30398
30399
30400
30401
30402
30403
30404
30405
30406
30407
30408
30409
30410
30411
30412
30413
30414
30415
30416
30417
30418
30419
30420
30421
30422
30423
30424
30425
30426
30427
30428
30429
30430
30431
30432
30433
30434
30435
30436
30437
30438
30439
30440
30441
30442
30443
30444
30445
30446
30447
30448
30449
30450
30451
30452
30453
30454
30455
30456
30457
30458
30459
30460
30461
30462
30463
30464
30465
30466
30467
30468
30469
30470
30471
30472
30473
30474
30475
30476
30477
30478
30479
30480
30481
30482
30483
30484
30485
30486
30487
30488
30489
30490
30491
30492
30493
30494
30495
30496
30497
30498
30499
30500
30501
30502
30503
30504
30505
30506
30507
30508
30509
30510
30511
30512
30513
30514
30515
30516
30517
30518
30519
30520
30521
30522
30523
30524
30525
30526
30527
30528
30529
30530
30531
30532
30533
30534
30535
30536
30537
30538
30539
30540
30541
30542
30543
30544
30545
30546
30547
30548
30549
30550
30551
30552
30553
30554
30555
30556
30557
30558
30559
30560
30561
30562
30563
30564
30565
30566
30567
30568
30569
30570
30571
30572
30573
30574
30575
30576
30577
30578
30579
30580
30581
30582
30583
30584
30585
30586
30587
30588
30589
30590
30591
30592
30593
30594
30595
30596
30597
30598
30599
30600
30601
30602
30603
30604
30605
30606
30607
30608
30609
30610
30611
30612
30613
30614
30615
30616
30617
30618
30619
30620
30621
30622
30623
30624
30625
30626
30627
30628
30629
30630
30631
30632
30633
30634
30635
30636
30637
30638
30639
30640
30641
30642
30643
30644
30645
30646
30647
30648
30649
30650
30651
30652
30653
30654
30655
30656
30657
30658
30659
30660
30661
30662
30663
30664
30665
30666
30667
30668
30669
30670
30671
30672
30673
30674
30675
30676
30677
30678
30679
30680
30681
30682
30683
30684
30685
30686
30687
30688
30689
30690
30691
30692
30693
30694
30695
30696
30697
30698
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719
30720
30721
30722
30723
30724
30725
30726
30727
30728
30729
30730
30731
30732
30733
30734
30735
30736
30737
30738
30739
30740
30741
30742
30743
30744
30745
30746
30747
30748
30749
30750
30751
30752
30753
30754
30755
30756
30757
30758
30759
30760
30761
30762
30763
30764
30765
30766
30767
30768
30769
30770
30771
30772
30773
30774
30775
30776
30777
30778
30779
30780
30781
30782
30783
30784
30785
30786
30787
30788
30789
30790
30791
30792
30793
30794
30795
30796
30797
30798
30799
30800
30801
30802
30803
30804
30805
30806
30807
30808
30809
30810
30811
30812
30813
30814
30815
30816
30817
30818
30819
30820
30821
30822
30823
30824
30825
30826
30827
30828
30829
30830
30831
30832
30833
30834
30835
30836
30837
30838
30839
30840
30841
30842
30843
30844
30845
30846
30847
30848
30849
30850
30851
30852
30853
30854
30855
30856
30857
30858
30859
30860
30861
30862
30863
30864
30865
30866
30867
30868
30869
30870
30871
30872
30873
30874
30875
30876
30877
30878
30879
30880
30881
30882
30883
30884
30885
30886
30887
30888
30889
30890
30891
30892
30893
30894
30895
30896
30897
30898
30899
30900
30901
30902
30903
30904
30905
30906
30907
30908
30909
30910
30911
30912
30913
30914
30915
30916
30917
30918
30919
30920
30921
30922
30923
30924
30925
30926
30927
30928
30929
30930
30931
30932
30933
30934
30935
30936
30937
30938
30939
30940
30941
30942
30943
30944
30945
30946
30947
30948
30949
30950
30951
30952
30953
30954
30955
30956
30957
30958
30959
30960
30961
30962
30963
30964
30965
30966
30967
30968
30969
30970
30971
30972
30973
30974
30975
30976
30977
30978
30979
30980
30981
30982
30983
30984
30985
30986
30987
30988
30989
30990
30991
30992
30993
30994
30995
30996
30997
30998
30999
31000
31001
31002
31003
31004
31005
31006
31007
31008
31009
31010
31011
31012
31013
31014
31015
31016
31017
31018
31019
31020
31021
31022
31023
31024
31025
31026
31027
31028
31029
31030
31031
31032
31033
31034
31035
31036
31037
31038
31039
31040
31041
31042
31043
31044
31045
31046
31047
31048
31049
31050
31051
31052
31053
31054
31055
31056
31057
31058
31059
31060
31061
31062
31063
31064
31065
31066
31067
31068
31069
31070
31071
31072
31073
31074
31075
31076
31077
31078
31079
31080
31081
31082
31083
31084
31085
31086
31087
31088
31089
31090
31091
31092
31093
31094
31095
31096
31097
31098
31099
31100
31101
31102
31103
31104
31105
31106
31107
31108
31109
31110
31111
31112
31113
31114
31115
31116
31117
31118
31119
31120
31121
31122
31123
31124
31125
31126
31127
31128
31129
31130
31131
31132
31133
31134
31135
31136
31137
31138
31139
31140
31141
31142
31143
31144
31145
31146
31147
31148
31149
31150
31151
31152
31153
31154
31155
31156
31157
31158
31159
31160
31161
31162
31163
31164
31165
31166
31167
31168
31169
31170
31171
31172
31173
31174
31175
31176
31177
31178
31179
31180
31181
31182
31183
31184
31185
31186
31187
31188
31189
31190
31191
31192
31193
31194
31195
31196
31197
31198
31199
31200
31201
31202
31203
31204
31205
31206
31207
31208
31209
31210
31211
31212
31213
31214
31215
31216
31217
31218
31219
31220
31221
31222
31223
31224
31225
31226
31227
31228
31229
31230
31231
31232
31233
31234
31235
31236
31237
31238
31239
31240
31241
31242
31243
31244
31245
31246
31247
31248
31249
31250
31251
31252
31253
31254
31255
31256
31257
31258
31259
31260
31261
31262
31263
31264
31265
31266
31267
31268
31269
31270
31271
31272
31273
31274
31275
31276
31277
31278
31279
31280
31281
31282
31283
31284
31285
31286
31287
31288
31289
31290
31291
31292
31293
31294
31295
31296
31297
31298
31299
31300
31301
31302
31303
31304
31305
31306
31307
31308
31309
31310
31311
31312
31313
31314
31315
31316
31317
31318
31319
31320
31321
31322
31323
31324
31325
31326
31327
31328
31329
31330
31331
31332
31333
31334
31335
31336
31337
31338
31339
31340
31341
31342
31343
31344
31345
31346
31347
31348
31349
31350
31351
31352
31353
31354
31355
31356
31357
31358
31359
31360
31361
31362
31363
31364
31365
31366
31367
31368
31369
31370
31371
31372
31373
31374
31375
31376
31377
31378
31379
31380
31381
31382
31383
31384
31385
31386
31387
31388
31389
31390
31391
31392
31393
31394
31395
31396
31397
31398
31399
31400
31401
31402
31403
31404
31405
31406
31407
31408
31409
31410
31411
31412
31413
31414
31415
31416
31417
31418
31419
31420
31421
31422
31423
31424
31425
31426
31427
31428
31429
31430
31431
31432
31433
31434
31435
31436
31437
31438
31439
31440
31441
31442
31443
31444
31445
31446
31447
31448
31449
31450
31451
31452
31453
31454
31455
31456
31457
31458
31459
31460
31461
31462
31463
31464
31465
31466
31467
31468
31469
31470
31471
31472
31473
31474
31475
31476
31477
31478
31479
31480
31481
31482
31483
31484
31485
31486
31487
31488
31489
31490
31491
31492
31493
31494
31495
31496
31497
31498
31499
31500
31501
31502
31503
31504
31505
31506
31507
31508
31509
31510
31511
31512
31513
31514
31515
31516
31517
31518
31519
31520
31521
31522
31523
31524
31525
31526
31527
31528
31529
31530
31531
31532
31533
31534
31535
31536
31537
31538
31539
31540
31541
31542
31543
31544
31545
31546
31547
31548
31549
31550
31551
31552
31553
31554
31555
31556
31557
31558
31559
31560
31561
31562
31563
31564
31565
31566
31567
31568
31569
31570
31571
31572
31573
31574
31575
31576
31577
31578
31579
31580
31581
31582
31583
31584
31585
31586
31587
31588
31589
31590
31591
31592
31593
31594
31595
31596
31597
31598
31599
31600
31601
31602
31603
31604
31605
31606
31607
31608
31609
31610
31611
31612
31613
31614
31615
31616
31617
31618
31619
31620
31621
31622
31623
31624
31625
31626
31627
31628
31629
31630
31631
31632
31633
31634
31635
31636
31637
31638
31639
31640
31641
31642
31643
31644
31645
31646
31647
31648
31649
31650
31651
31652
31653
31654
31655
31656
31657
31658
31659
31660
31661
31662
31663
31664
31665
31666
31667
31668
31669
31670
31671
31672
31673
31674
31675
31676
31677
31678
31679
31680
31681
31682
31683
31684
31685
31686
31687
31688
31689
31690
31691
31692
31693
31694
31695
31696
31697
31698
31699
31700
31701
31702
31703
31704
31705
31706
31707
31708
31709
31710
31711
31712
31713
31714
31715
31716
31717
31718
31719
31720
31721
31722
31723
31724
31725
31726
31727
31728
31729
31730
31731
31732
31733
31734
31735
31736
31737
31738
31739
31740
31741
31742
31743
31744
31745
31746
31747
31748
31749
31750
31751
31752
31753
31754
31755
31756
31757
31758
31759
31760
31761
31762
31763
31764
31765
31766
31767
31768
31769
31770
31771
31772
31773
31774
31775
31776
31777
31778
31779
31780
31781
31782
31783
31784
31785
31786
31787
31788
31789
31790
31791
31792
31793
31794
31795
31796
31797
31798
31799
31800
31801
31802
31803
31804
31805
31806
31807
31808
31809
31810
31811
31812
31813
31814
31815
31816
31817
31818
31819
31820
31821
31822
31823
31824
31825
31826
31827
31828
31829
31830
31831
31832
31833
31834
31835
31836
31837
31838
31839
31840
31841
31842
31843
31844
31845
31846
31847
31848
31849
31850
31851
31852
31853
31854
31855
31856
31857
31858
31859
31860
31861
31862
31863
31864
31865
31866
31867
31868
31869
31870
31871
31872
31873
31874
31875
31876
31877
31878
31879
31880
31881
31882
31883
31884
31885
31886
31887
31888
31889
31890
31891
31892
31893
31894
31895
31896
31897
31898
31899
31900
31901
31902
31903
31904
31905
31906
31907
31908
31909
31910
31911
31912
31913
31914
31915
31916
31917
31918
31919
31920
31921
31922
31923
31924
31925
31926
31927
31928
31929
31930
31931
31932
31933
31934
31935
31936
31937
31938
31939
31940
31941
31942
31943
31944
31945
31946
31947
31948
31949
31950
31951
31952
31953
31954
31955
31956
31957
31958
31959
31960
31961
31962
31963
31964
31965
31966
31967
31968
31969
31970
31971
31972
31973
31974
31975
31976
31977
31978
31979
31980
31981
31982
31983
31984
31985
31986
31987
31988
31989
31990
31991
31992
31993
31994
31995
31996
31997
31998
31999
32000
32001
32002
32003
32004
32005
32006
32007
32008
32009
32010
32011
32012
32013
32014
32015
32016
32017
32018
32019
32020
32021
32022
32023
32024
32025
32026
32027
32028
32029
32030
32031
32032
32033
32034
32035
32036
32037
32038
32039
32040
32041
32042
32043
32044
32045
32046
32047
32048
32049
32050
32051
32052
32053
32054
32055
32056
32057
32058
32059
32060
32061
32062
32063
32064
32065
32066
32067
32068
32069
32070
32071
32072
32073
32074
32075
32076
32077
32078
32079
32080
32081
32082
32083
32084
32085
32086
32087
32088
32089
32090
32091
32092
32093
32094
32095
32096
32097
32098
32099
32100
32101
32102
32103
32104
32105
32106
32107
32108
32109
32110
32111
32112
32113
32114
32115
32116
32117
32118
32119
32120
32121
32122
32123
32124
32125
32126
32127
32128
32129
32130
32131
32132
32133
32134
32135
32136
32137
32138
32139
32140
32141
32142
32143
32144
32145
32146
32147
32148
32149
32150
32151
32152
32153
32154
32155
32156
32157
32158
32159
32160
32161
32162
32163
32164
32165
32166
32167
32168
32169
32170
32171
32172
32173
32174
32175
32176
32177
32178
32179
32180
32181
32182
32183
32184
32185
32186
32187
32188
32189
32190
32191
32192
32193
32194
32195
32196
32197
32198
32199
32200
32201
32202
32203
32204
32205
32206
32207
32208
32209
32210
32211
32212
32213
32214
32215
32216
32217
32218
32219
32220
32221
32222
32223
32224
32225
32226
32227
32228
32229
32230
32231
32232
32233
32234
32235
32236
32237
32238
32239
32240
32241
32242
32243
32244
32245
32246
32247
32248
32249
32250
32251
32252
32253
32254
32255
32256
32257
32258
32259
32260
32261
32262
32263
32264
32265
32266
32267
32268
32269
32270
32271
32272
32273
32274
32275
32276
32277
32278
32279
32280
32281
32282
32283
32284
32285
32286
32287
32288
32289
32290
32291
32292
32293
32294
32295
32296
32297
32298
32299
32300
32301
32302
32303
32304
32305
32306
32307
32308
32309
32310
32311
32312
32313
32314
32315
32316
32317
32318
32319
32320
32321
32322
32323
32324
32325
32326
32327
32328
32329
32330
32331
32332
32333
32334
32335
32336
32337
32338
32339
32340
32341
32342
32343
32344
32345
32346
32347
32348
32349
32350
32351
32352
32353
32354
32355
32356
32357
32358
32359
32360
32361
32362
32363
32364
32365
32366
32367
32368
32369
32370
32371
32372
32373
32374
32375
32376
32377
32378
32379
32380
32381
32382
32383
32384
32385
32386
32387
32388
32389
32390
32391
32392
32393
32394
32395
32396
32397
32398
32399
32400
32401
32402
32403
32404
32405
32406
32407
32408
32409
32410
32411
32412
32413
32414
32415
32416
32417
32418
32419
32420
32421
32422
32423
32424
32425
32426
32427
32428
32429
32430
32431
32432
32433
32434
32435
32436
32437
32438
32439
32440
32441
32442
32443
32444
32445
32446
32447
32448
32449
32450
32451
32452
32453
32454
32455
32456
32457
32458
32459
32460
32461
32462
32463
32464
32465
32466
32467
32468
32469
32470
32471
32472
32473
32474
32475
32476
32477
32478
32479
32480
32481
32482
32483
32484
32485
32486
32487
32488
32489
32490
32491
32492
32493
32494
32495
32496
32497
32498
32499
32500
32501
32502
32503
32504
32505
32506
32507
32508
32509
32510
32511
32512
32513
32514
32515
32516
32517
32518
32519
32520
32521
32522
32523
32524
32525
32526
32527
32528
32529
32530
32531
32532
32533
32534
32535
32536
32537
32538
32539
32540
32541
32542
32543
32544
32545
32546
32547
32548
32549
32550
32551
32552
32553
32554
32555
32556
32557
32558
32559
32560
32561
32562
32563
32564
32565
32566
32567
32568
32569
32570
32571
32572
32573
32574
32575
32576
32577
32578
32579
32580
32581
32582
32583
32584
32585
32586
32587
32588
32589
32590
32591
32592
32593
32594
32595
32596
32597
32598
32599
32600
32601
32602
32603
32604
32605
32606
32607
32608
32609
32610
32611
32612
32613
32614
32615
32616
32617
32618
32619
32620
32621
32622
32623
32624
32625
32626
32627
32628
32629
32630
32631
32632
32633
32634
32635
32636
32637
32638
32639
32640
32641
32642
32643
32644
32645
32646
32647
32648
32649
32650
32651
32652
32653
32654
32655
32656
32657
32658
32659
32660
32661
32662
32663
32664
32665
32666
32667
32668
32669
32670
32671
32672
32673
32674
32675
32676
32677
32678
32679
32680
32681
32682
32683
32684
32685
32686
32687
32688
32689
32690
32691
32692
32693
32694
32695
32696
32697
32698
32699
32700
32701
32702
32703
32704
32705
32706
32707
32708
32709
32710
32711
32712
32713
32714
32715
32716
32717
32718
32719
32720
32721
32722
32723
32724
32725
32726
32727
32728
32729
32730
32731
32732
32733
32734
32735
32736
32737
32738
32739
32740
32741
32742
32743
32744
32745
32746
32747
32748
32749
32750
32751
32752
32753
32754
32755
32756
32757
32758
32759
32760
32761
32762
32763
32764
32765
32766
32767
32768
32769
32770
32771
32772
32773
32774
32775
32776
32777
32778
32779
32780
32781
32782
32783
32784
32785
32786
32787
32788
32789
32790
32791
32792
32793
32794
32795
32796
32797
32798
32799
32800
32801
32802
32803
32804
32805
32806
32807
32808
32809
32810
32811
32812
32813
32814
32815
32816
32817
32818
32819
32820
32821
32822
32823
32824
32825
32826
32827
32828
32829
32830
32831
32832
32833
32834
32835
32836
32837
32838
32839
32840
32841
32842
32843
32844
32845
32846
32847
32848
32849
32850
32851
32852
32853
32854
32855
32856
32857
32858
32859
32860
32861
32862
32863
32864
32865
32866
32867
32868
32869
32870
32871
32872
32873
32874
32875
32876
32877
32878
32879
32880
32881
32882
32883
32884
32885
32886
32887
32888
32889
32890
32891
32892
32893
32894
32895
32896
32897
32898
32899
32900
32901
32902
32903
32904
32905
32906
32907
32908
32909
32910
32911
32912
32913
32914
32915
32916
32917
32918
32919
32920
32921
32922
32923
32924
32925
32926
32927
32928
32929
32930
32931
32932
32933
32934
32935
32936
32937
32938
32939
32940
32941
32942
32943
32944
32945
32946
32947
32948
32949
32950
32951
32952
32953
32954
32955
32956
32957
32958
32959
32960
32961
32962
32963
32964
32965
32966
32967
32968
32969
32970
32971
32972
32973
32974
32975
32976
32977
32978
32979
32980
32981
32982
32983
32984
32985
32986
32987
32988
32989
32990
32991
32992
32993
32994
32995
32996
32997
32998
32999
33000
33001
33002
33003
33004
33005
33006
33007
33008
33009
33010
33011
33012
33013
33014
33015
33016
33017
33018
33019
33020
33021
33022
33023
33024
33025
33026
33027
33028
33029
33030
33031
33032
33033
33034
33035
33036
33037
33038
33039
33040
33041
33042
33043
33044
33045
33046
33047
33048
33049
33050
33051
33052
33053
33054
33055
33056
33057
33058
33059
33060
33061
33062
33063
33064
33065
33066
33067
33068
33069
33070
33071
33072
33073
33074
33075
33076
33077
33078
33079
33080
33081
33082
33083
33084
33085
33086
33087
33088
33089
33090
33091
33092
33093
33094
33095
33096
33097
33098
33099
33100
33101
33102
33103
33104
33105
33106
33107
33108
33109
33110
33111
33112
33113
33114
33115
33116
33117
33118
33119
33120
33121
33122
33123
33124
33125
33126
33127
33128
33129
33130
33131
33132
33133
33134
33135
33136
33137
33138
33139
33140
33141
33142
33143
33144
33145
33146
33147
33148
33149
33150
33151
33152
33153
33154
33155
33156
33157
33158
33159
33160
33161
33162
33163
33164
33165
33166
33167
33168
33169
33170
33171
33172
33173
33174
33175
33176
33177
33178
33179
33180
33181
33182
33183
33184
33185
33186
33187
33188
33189
33190
33191
33192
33193
33194
33195
33196
33197
33198
33199
33200
33201
33202
33203
33204
33205
33206
33207
33208
33209
33210
33211
33212
33213
33214
33215
33216
33217
33218
33219
33220
33221
33222
33223
33224
33225
33226
33227
33228
33229
33230
33231
33232
33233
33234
33235
33236
33237
33238
33239
33240
33241
33242
33243
33244
33245
33246
33247
33248
33249
33250
33251
33252
33253
33254
33255
33256
33257
33258
33259
33260
33261
33262
33263
33264
33265
33266
33267
33268
33269
33270
33271
33272
33273
33274
33275
33276
33277
33278
33279
33280
33281
33282
33283
33284
33285
33286
33287
33288
33289
33290
33291
33292
33293
33294
33295
33296
33297
33298
33299
33300
33301
33302
33303
33304
33305
33306
33307
33308
33309
33310
33311
33312
33313
33314
33315
33316
33317
33318
33319
33320
33321
33322
33323
33324
33325
33326
33327
33328
33329
33330
33331
33332
33333
33334
33335
33336
33337
33338
33339
33340
33341
33342
33343
33344
33345
33346
33347
33348
33349
33350
33351
33352
33353
33354
33355
33356
33357
33358
33359
33360
33361
33362
33363
33364
33365
33366
33367
33368
33369
33370
33371
33372
33373
33374
33375
33376
33377
33378
33379
33380
33381
33382
33383
33384
33385
33386
33387
33388
33389
33390
33391
33392
33393
33394
33395
33396
33397
33398
33399
33400
33401
33402
33403
33404
33405
33406
33407
33408
33409
33410
33411
33412
33413
33414
33415
33416
33417
33418
33419
33420
33421
33422
33423
33424
33425
33426
33427
33428
33429
33430
33431
33432
33433
33434
33435
33436
33437
33438
33439
33440
33441
33442
33443
33444
33445
33446
33447
33448
33449
33450
33451
33452
33453
33454
33455
33456
33457
33458
33459
33460
33461
33462
33463
33464
33465
33466
33467
33468
33469
33470
33471
33472
33473
33474
33475
33476
33477
33478
33479
33480
33481
33482
33483
33484
33485
33486
33487
33488
33489
33490
33491
33492
33493
33494
33495
33496
33497
33498
33499
33500
33501
33502
33503
33504
33505
33506
33507
33508
33509
33510
33511
33512
33513
33514
33515
33516
33517
33518
33519
33520
33521
33522
33523
33524
33525
33526
33527
33528
33529
33530
33531
33532
33533
33534
33535
33536
33537
33538
33539
33540
33541
33542
33543
33544
33545
33546
33547
33548
33549
33550
33551
33552
33553
33554
33555
33556
33557
33558
33559
33560
33561
33562
33563
33564
33565
33566
33567
33568
33569
33570
33571
33572
33573
33574
33575
33576
33577
33578
33579
33580
33581
33582
33583
33584
33585
33586
33587
33588
33589
33590
33591
33592
33593
33594
33595
33596
33597
33598
33599
33600
33601
33602
33603
33604
33605
33606
33607
33608
33609
33610
33611
33612
33613
33614
33615
33616
33617
33618
33619
33620
33621
33622
33623
33624
33625
33626
33627
33628
33629
33630
33631
33632
33633
33634
33635
33636
33637
33638
33639
33640
33641
33642
33643
33644
33645
33646
33647
33648
33649
33650
33651
33652
33653
33654
33655
33656
33657
33658
33659
33660
33661
33662
33663
33664
33665
33666
33667
33668
33669
33670
33671
33672
33673
33674
33675
33676
33677
33678
33679
33680
33681
33682
33683
33684
33685
33686
33687
33688
33689
33690
33691
33692
33693
33694
33695
33696
33697
33698
33699
33700
33701
33702
33703
33704
33705
33706
33707
33708
33709
33710
33711
33712
33713
33714
33715
33716
33717
33718
33719
33720
33721
33722
33723
33724
33725
33726
33727
33728
33729
33730
33731
33732
33733
33734
33735
33736
33737
33738
33739
33740
33741
33742
33743
33744
33745
33746
33747
33748
33749
33750
33751
33752
33753
33754
33755
33756
33757
33758
33759
33760
33761
33762
33763
33764
33765
33766
33767
33768
33769
33770
33771
33772
33773
33774
33775
33776
33777
33778
33779
33780
33781
33782
33783
33784
33785
33786
33787
33788
33789
33790
33791
33792
33793
33794
33795
33796
33797
33798
33799
33800
33801
33802
33803
33804
33805
33806
33807
33808
33809
33810
33811
33812
33813
33814
33815
33816
33817
33818
33819
33820
33821
33822
33823
33824
33825
33826
33827
33828
33829
33830
33831
33832
33833
33834
33835
33836
33837
33838
33839
33840
33841
33842
33843
33844
33845
33846
33847
33848
33849
33850
33851
33852
33853
33854
33855
33856
33857
33858
33859
33860
33861
33862
33863
33864
33865
33866
33867
33868
33869
33870
33871
33872
33873
33874
33875
33876
33877
33878
33879
33880
33881
33882
33883
33884
33885
33886
33887
33888
33889
33890
33891
33892
33893
33894
33895
33896
33897
33898
33899
33900
33901
33902
33903
33904
33905
33906
33907
33908
33909
33910
33911
33912
33913
33914
33915
33916
33917
33918
33919
33920
33921
33922
33923
33924
33925
33926
33927
33928
33929
33930
33931
33932
33933
33934
33935
33936
33937
33938
33939
33940
33941
33942
33943
33944
33945
33946
33947
33948
33949
33950
33951
33952
33953
33954
33955
33956
33957
33958
33959
33960
33961
33962
33963
33964
33965
33966
33967
33968
33969
33970
33971
33972
33973
33974
33975
33976
33977
33978
33979
33980
33981
33982
33983
33984
33985
33986
33987
33988
33989
33990
33991
33992
33993
33994
33995
33996
33997
33998
33999
34000
34001
34002
34003
34004
34005
34006
34007
34008
34009
34010
34011
34012
34013
34014
34015
34016
34017
34018
34019
34020
34021
34022
34023
34024
34025
34026
34027
34028
34029
34030
34031
34032
34033
34034
34035
34036
34037
34038
34039
34040
34041
34042
34043
34044
34045
34046
34047
34048
34049
34050
34051
34052
34053
34054
34055
34056
34057
34058
34059
34060
34061
34062
34063
34064
34065
34066
34067
34068
34069
34070
34071
34072
34073
34074
34075
34076
34077
34078
34079
34080
34081
34082
34083
34084
34085
34086
34087
34088
34089
34090
34091
34092
34093
34094
34095
34096
34097
34098
34099
34100
34101
34102
34103
34104
34105
34106
34107
34108
34109
34110
34111
34112
34113
34114
34115
34116
34117
34118
34119
34120
34121
34122
34123
34124
34125
34126
34127
34128
34129
34130
34131
34132
34133
34134
34135
34136
34137
34138
34139
34140
34141
34142
34143
34144
34145
34146
34147
34148
34149
34150
34151
34152
34153
34154
34155
34156
34157
34158
34159
34160
34161
34162
34163
34164
34165
34166
34167
34168
34169
34170
34171
34172
34173
34174
34175
34176
34177
34178
34179
34180
34181
34182
34183
34184
34185
34186
34187
34188
34189
34190
34191
34192
34193
34194
34195
34196
34197
34198
34199
34200
34201
34202
34203
34204
34205
34206
34207
34208
34209
34210
34211
34212
34213
34214
34215
34216
34217
34218
34219
34220
34221
34222
34223
34224
34225
34226
34227
34228
34229
34230
34231
34232
34233
34234
34235
34236
34237
34238
34239
34240
34241
34242
34243
34244
34245
34246
34247
34248
34249
34250
34251
34252
34253
34254
34255
34256
34257
34258
34259
34260
34261
34262
34263
34264
34265
34266
34267
34268
34269
34270
34271
34272
34273
34274
34275
34276
34277
34278
34279
34280
34281
34282
34283
34284
34285
34286
34287
34288
34289
34290
34291
34292
34293
34294
34295
34296
34297
34298
34299
34300
34301
34302
34303
34304
34305
34306
34307
34308
34309
34310
34311
34312
34313
34314
34315
34316
34317
34318
34319
34320
34321
34322
34323
34324
34325
34326
34327
34328
34329
34330
34331
34332
34333
34334
34335
34336
34337
34338
34339
34340
34341
34342
34343
34344
34345
34346
34347
34348
34349
34350
34351
34352
34353
34354
34355
34356
34357
34358
34359
34360
34361
34362
34363
34364
34365
34366
34367
34368
34369
34370
34371
34372
34373
34374
34375
34376
34377
34378
34379
34380
34381
34382
34383
34384
34385
34386
34387
34388
34389
34390
34391
34392
34393
34394
34395
34396
34397
34398
34399
34400
34401
34402
34403
34404
34405
34406
34407
34408
34409
34410
34411
34412
34413
34414
34415
34416
34417
34418
34419
34420
34421
34422
34423
34424
34425
34426
34427
34428
34429
34430
34431
34432
34433
34434
34435
34436
34437
34438
34439
34440
34441
34442
34443
34444
34445
34446
34447
34448
34449
34450
34451
34452
34453
34454
34455
34456
34457
34458
34459
34460
34461
34462
34463
34464
34465
34466
34467
34468
34469
34470
34471
34472
34473
34474
34475
34476
34477
34478
34479
34480
34481
34482
34483
34484
34485
34486
34487
34488
34489
34490
34491
34492
34493
34494
34495
34496
34497
34498
34499
34500
34501
34502
34503
34504
34505
34506
34507
34508
34509
34510
34511
34512
34513
34514
34515
34516
34517
34518
34519
34520
34521
34522
34523
34524
34525
34526
34527
34528
34529
34530
34531
34532
34533
34534
34535
34536
34537
34538
34539
34540
34541
34542
34543
34544
34545
34546
34547
34548
34549
34550
34551
34552
34553
34554
34555
34556
34557
34558
34559
34560
34561
34562
34563
34564
34565
34566
34567
34568
34569
34570
34571
34572
34573
34574
34575
34576
34577
34578
34579
34580
34581
34582
34583
34584
34585
34586
34587
34588
34589
34590
34591
34592
34593
34594
34595
34596
34597
34598
34599
34600
34601
34602
34603
34604
34605
34606
34607
34608
34609
34610
34611
34612
34613
34614
34615
34616
34617
34618
34619
34620
34621
34622
34623
34624
34625
34626
34627
34628
34629
34630
34631
34632
34633
34634
34635
34636
34637
34638
34639
34640
34641
34642
34643
34644
34645
34646
34647
34648
34649
34650
34651
34652
34653
34654
34655
34656
34657
34658
34659
34660
34661
34662
34663
34664
34665
34666
34667
34668
34669
34670
34671
34672
34673
34674
34675
34676
34677
34678
34679
34680
34681
34682
34683
34684
34685
34686
34687
34688
34689
34690
34691
34692
34693
34694
34695
34696
34697
34698
34699
34700
34701
34702
34703
34704
34705
34706
34707
34708
34709
34710
34711
34712
34713
34714
34715
34716
34717
34718
34719
34720
34721
34722
34723
34724
34725
34726
34727
34728
34729
34730
34731
34732
34733
34734
34735
34736
34737
34738
34739
34740
34741
34742
34743
34744
34745
34746
34747
34748
34749
34750
34751
34752
34753
34754
34755
34756
34757
34758
34759
34760
34761
34762
34763
34764
34765
34766
34767
34768
34769
34770
34771
34772
34773
34774
34775
34776
34777
34778
34779
34780
34781
34782
34783
34784
34785
34786
34787
34788
34789
34790
34791
34792
34793
34794
34795
34796
34797
34798
34799
34800
34801
34802
34803
34804
34805
34806
34807
34808
34809
34810
34811
34812
34813
34814
34815
34816
34817
34818
34819
34820
34821
34822
34823
34824
34825
34826
34827
34828
34829
34830
34831
34832
34833
34834
34835
34836
34837
34838
34839
34840
34841
34842
34843
34844
34845
34846
34847
34848
34849
34850
34851
34852
34853
34854
34855
34856
34857
34858
34859
34860
34861
34862
34863
34864
34865
34866
34867
34868
34869
34870
34871
34872
34873
34874
34875
34876
34877
34878
34879
34880
34881
34882
34883
34884
34885
34886
34887
34888
34889
34890
34891
34892
34893
34894
34895
34896
34897
34898
34899
34900
34901
34902
34903
34904
34905
34906
34907
34908
34909
34910
34911
34912
34913
34914
34915
34916
34917
34918
34919
34920
34921
34922
34923
34924
34925
34926
34927
34928
34929
34930
34931
34932
34933
34934
34935
34936
34937
34938
34939
34940
34941
34942
34943
34944
34945
34946
34947
34948
34949
34950
34951
34952
34953
34954
34955
34956
34957
34958
34959
34960
34961
34962
34963
34964
34965
34966
34967
34968
34969
34970
34971
34972
34973
34974
34975
34976
34977
34978
34979
34980
34981
34982
34983
34984
34985
34986
34987
34988
34989
34990
34991
34992
34993
34994
34995
34996
34997
34998
34999
35000
35001
35002
35003
35004
35005
35006
35007
35008
35009
35010
35011
35012
35013
35014
35015
35016
35017
35018
35019
35020
35021
35022
35023
35024
35025
35026
35027
35028
35029
35030
35031
35032
35033
35034
35035
35036
35037
35038
35039
35040
35041
35042
35043
35044
35045
35046
35047
35048
35049
35050
35051
35052
35053
35054
35055
35056
35057
35058
35059
35060
35061
35062
35063
35064
35065
35066
35067
35068
35069
35070
35071
35072
35073
35074
35075
35076
35077
35078
35079
35080
35081
35082
35083
35084
35085
35086
35087
35088
35089
35090
35091
35092
35093
35094
35095
35096
35097
35098
35099
35100
35101
35102
35103
35104
35105
35106
35107
35108
35109
35110
35111
35112
35113
35114
35115
35116
35117
35118
35119
35120
35121
35122
35123
35124
35125
35126
35127
35128
35129
35130
35131
35132
35133
35134
35135
35136
35137
35138
35139
35140
35141
35142
35143
35144
35145
35146
35147
35148
35149
35150
35151
35152
35153
35154
35155
35156
35157
35158
35159
35160
35161
35162
35163
35164
35165
35166
35167
35168
35169
35170
35171
35172
35173
35174
35175
35176
35177
35178
35179
35180
35181
35182
35183
35184
35185
35186
35187
35188
35189
35190
35191
35192
35193
35194
35195
35196
35197
35198
35199
35200
35201
35202
35203
35204
35205
35206
35207
35208
35209
35210
35211
35212
35213
35214
35215
35216
35217
35218
35219
35220
35221
35222
35223
35224
35225
35226
35227
35228
35229
35230
35231
35232
35233
35234
35235
35236
35237
35238
35239
35240
35241
35242
35243
35244
35245
35246
35247
35248
35249
35250
35251
35252
35253
35254
35255
35256
35257
35258
35259
35260
35261
35262
35263
35264
35265
35266
35267
35268
35269
35270
35271
35272
35273
35274
35275
35276
35277
35278
35279
35280
35281
35282
35283
35284
35285
35286
35287
35288
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338
35339
35340
35341
35342
35343
35344
35345
35346
35347
35348
35349
35350
35351
35352
35353
35354
35355
35356
35357
35358
35359
35360
35361
35362
35363
35364
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379
35380
35381
35382
35383
35384
35385
35386
35387
35388
35389
35390
35391
35392
35393
35394
35395
35396
35397
35398
35399
35400
35401
35402
35403
35404
35405
35406
35407
35408
35409
35410
35411
35412
35413
35414
35415
35416
35417
35418
35419
35420
35421
35422
35423
35424
35425
35426
35427
35428
35429
35430
35431
35432
35433
35434
35435
35436
35437
35438
35439
35440
35441
35442
35443
35444
35445
35446
35447
35448
35449
35450
35451
35452
35453
35454
35455
35456
35457
35458
35459
35460
35461
35462
35463
35464
35465
35466
35467
35468
35469
35470
35471
35472
35473
35474
35475
35476
35477
35478
35479
35480
35481
35482
35483
35484
35485
35486
35487
35488
35489
35490
35491
35492
35493
35494
35495
35496
35497
35498
35499
35500
35501
35502
35503
35504
35505
35506
35507
35508
35509
35510
35511
35512
35513
35514
35515
35516
35517
35518
35519
35520
35521
35522
35523
35524
35525
35526
35527
35528
35529
35530
35531
35532
35533
35534
35535
35536
35537
35538
35539
35540
35541
35542
35543
35544
35545
35546
35547
35548
35549
35550
35551
35552
35553
35554
35555
35556
35557
35558
35559
35560
35561
35562
35563
35564
35565
35566
35567
35568
35569
35570
35571
35572
35573
35574
35575
35576
35577
35578
35579
35580
35581
35582
35583
35584
35585
35586
35587
35588
35589
35590
35591
35592
35593
35594
35595
35596
35597
35598
35599
35600
35601
35602
35603
35604
35605
35606
35607
35608
35609
35610
35611
35612
35613
35614
35615
35616
35617
35618
35619
35620
35621
35622
35623
35624
35625
35626
35627
35628
35629
35630
35631
35632
35633
35634
35635
35636
35637
35638
35639
35640
35641
35642
35643
35644
35645
35646
35647
35648
35649
35650
35651
35652
35653
35654
35655
35656
35657
35658
35659
35660
35661
35662
35663
35664
35665
35666
35667
35668
35669
35670
35671
35672
35673
35674
35675
35676
35677
35678
35679
35680
35681
35682
35683
35684
35685
35686
35687
35688
35689
35690
35691
35692
35693
35694
35695
35696
35697
35698
35699
35700
35701
35702
35703
35704
35705
35706
35707
35708
35709
35710
35711
35712
35713
35714
35715
35716
35717
35718
35719
35720
35721
35722
35723
35724
35725
35726
35727
35728
35729
35730
35731
35732
35733
35734
35735
35736
35737
35738
35739
35740
35741
35742
35743
35744
35745
35746
35747
35748
35749
35750
35751
35752
35753
35754
35755
35756
35757
35758
35759
35760
35761
35762
35763
35764
35765
35766
35767
35768
35769
35770
35771
35772
35773
35774
35775
35776
35777
35778
35779
35780
35781
35782
35783
35784
35785
35786
35787
35788
35789
35790
35791
35792
35793
35794
35795
35796
35797
35798
35799
35800
35801
35802
35803
35804
35805
35806
35807
35808
35809
35810
35811
35812
35813
35814
35815
35816
35817
35818
35819
35820
35821
35822
35823
35824
35825
35826
35827
35828
35829
35830
35831
35832
35833
35834
35835
35836
35837
35838
35839
35840
35841
35842
35843
35844
35845
35846
35847
35848
35849
35850
35851
35852
35853
35854
35855
35856
35857
35858
35859
35860
35861
35862
35863
35864
35865
35866
35867
35868
35869
35870
35871
35872
35873
35874
35875
35876
35877
35878
35879
35880
35881
35882
35883
35884
35885
35886
35887
35888
35889
35890
35891
35892
35893
35894
35895
35896
35897
35898
35899
35900
35901
35902
35903
35904
35905
35906
35907
35908
35909
35910
35911
35912
35913
35914
35915
35916
35917
35918
35919
35920
35921
35922
35923
35924
35925
35926
35927
35928
35929
35930
35931
35932
35933
35934
35935
35936
35937
35938
35939
35940
35941
35942
35943
35944
35945
35946
35947
35948
35949
35950
35951
35952
35953
35954
35955
35956
35957
35958
35959
35960
35961
35962
35963
35964
35965
35966
35967
35968
35969
35970
35971
35972
35973
35974
35975
35976
35977
35978
35979
35980
35981
35982
35983
35984
35985
35986
35987
35988
35989
35990
35991
35992
35993
35994
35995
35996
35997
35998
35999
36000
36001
36002
36003
36004
36005
36006
36007
36008
36009
36010
36011
36012
36013
36014
36015
36016
36017
36018
36019
36020
36021
36022
36023
36024
36025
36026
36027
36028
36029
36030
36031
36032
36033
36034
36035
36036
36037
36038
36039
36040
36041
36042
36043
36044
36045
36046
36047
36048
36049
36050
36051
36052
36053
36054
36055
36056
36057
36058
36059
36060
36061
36062
36063
36064
36065
36066
36067
36068
36069
36070
36071
36072
36073
36074
36075
36076
36077
36078
36079
36080
36081
36082
36083
36084
36085
36086
36087
36088
36089
36090
36091
36092
36093
36094
36095
36096
36097
36098
36099
36100
36101
36102
36103
36104
36105
36106
36107
36108
36109
36110
36111
36112
36113
36114
36115
36116
36117
36118
36119
36120
36121
36122
36123
36124
36125
36126
36127
36128
36129
36130
36131
36132
36133
36134
36135
36136
36137
36138
36139
36140
36141
36142
36143
36144
36145
36146
36147
36148
36149
36150
36151
36152
36153
36154
36155
36156
36157
36158
36159
36160
36161
36162
36163
36164
36165
36166
36167
36168
36169
36170
36171
36172
36173
36174
36175
36176
36177
36178
36179
36180
36181
36182
36183
36184
36185
36186
36187
36188
36189
36190
36191
36192
36193
36194
36195
36196
36197
36198
36199
36200
36201
36202
36203
36204
36205
36206
36207
36208
36209
36210
36211
36212
36213
36214
36215
36216
36217
36218
36219
36220
36221
36222
36223
36224
36225
36226
36227
36228
36229
36230
36231
36232
36233
36234
36235
36236
36237
36238
36239
36240
36241
36242
36243
36244
36245
36246
36247
36248
36249
36250
36251
36252
36253
36254
36255
36256
36257
36258
36259
36260
36261
36262
36263
36264
36265
36266
36267
36268
36269
36270
36271
36272
36273
36274
36275
36276
36277
36278
36279
36280
36281
36282
36283
36284
36285
36286
36287
36288
36289
36290
36291
36292
36293
36294
36295
36296
36297
36298
36299
36300
36301
36302
36303
36304
36305
36306
36307
36308
36309
36310
36311
36312
36313
36314
36315
36316
36317
36318
36319
36320
36321
36322
36323
36324
36325
36326
36327
36328
36329
36330
36331
36332
36333
36334
36335
36336
36337
36338
36339
36340
36341
36342
36343
36344
36345
36346
36347
36348
36349
36350
36351
36352
36353
36354
36355
36356
36357
36358
36359
36360
36361
36362
36363
36364
36365
36366
36367
36368
36369
36370
36371
36372
36373
36374
36375
36376
36377
36378
36379
36380
36381
36382
36383
36384
36385
36386
36387
36388
36389
36390
36391
36392
36393
36394
36395
36396
36397
36398
36399
36400
36401
36402
36403
36404
36405
36406
36407
36408
36409
36410
36411
36412
36413
36414
36415
36416
36417
36418
36419
36420
36421
36422
36423
36424
36425
36426
36427
36428
36429
36430
36431
36432
36433
36434
36435
36436
36437
36438
36439
36440
36441
36442
36443
36444
36445
36446
36447
36448
36449
36450
36451
36452
36453
36454
36455
36456
36457
36458
36459
36460
36461
36462
36463
36464
36465
36466
36467
36468
36469
36470
36471
36472
36473
36474
36475
36476
36477
36478
36479
36480
36481
36482
36483
36484
36485
36486
36487
36488
36489
36490
36491
36492
36493
36494
36495
36496
36497
36498
36499
36500
36501
36502
36503
36504
36505
36506
36507
36508
36509
36510
36511
36512
36513
36514
36515
36516
36517
36518
36519
36520
36521
36522
36523
36524
36525
36526
36527
36528
36529
36530
36531
36532
36533
36534
36535
36536
36537
36538
36539
36540
36541
36542
36543
36544
36545
36546
36547
36548
36549
36550
36551
36552
36553
36554
36555
36556
36557
36558
36559
36560
36561
36562
36563
36564
36565
36566
36567
36568
36569
36570
36571
36572
36573
36574
36575
36576
36577
36578
36579
36580
36581
36582
36583
36584
36585
36586
36587
36588
36589
36590
36591
36592
36593
36594
36595
36596
36597
36598
36599
36600
36601
36602
36603
36604
36605
36606
36607
36608
36609
36610
36611
36612
36613
36614
36615
36616
36617
36618
36619
36620
36621
36622
36623
36624
36625
36626
36627
36628
36629
36630
36631
36632
36633
36634
36635
36636
36637
36638
36639
36640
36641
36642
36643
36644
36645
36646
36647
36648
36649
36650
36651
36652
36653
36654
36655
36656
36657
36658
36659
36660
36661
36662
36663
36664
36665
36666
36667
36668
36669
36670
36671
36672
36673
36674
36675
36676
36677
36678
36679
36680
36681
36682
36683
36684
36685
36686
36687
36688
36689
36690
36691
36692
36693
36694
36695
36696
36697
36698
36699
36700
36701
36702
36703
36704
36705
36706
36707
36708
36709
36710
36711
36712
36713
36714
36715
36716
36717
36718
36719
36720
36721
36722
36723
36724
36725
36726
36727
36728
36729
36730
36731
36732
36733
36734
36735
36736
36737
36738
36739
36740
36741
36742
36743
36744
36745
36746
36747
36748
36749
36750
36751
36752
36753
36754
36755
36756
36757
36758
36759
36760
36761
36762
36763
36764
36765
36766
36767
36768
36769
36770
36771
36772
36773
36774
36775
36776
36777
36778
36779
36780
36781
36782
36783
36784
36785
36786
36787
36788
36789
36790
36791
36792
36793
36794
36795
36796
36797
36798
36799
36800
36801
36802
36803
36804
36805
36806
36807
36808
36809
36810
36811
36812
36813
36814
36815
36816
36817
36818
36819
36820
36821
36822
36823
36824
36825
36826
36827
36828
36829
36830
36831
36832
36833
36834
36835
36836
36837
36838
36839
36840
36841
36842
36843
36844
36845
36846
36847
36848
36849
36850
36851
36852
36853
36854
36855
36856
36857
36858
36859
36860
36861
36862
36863
36864
36865
36866
36867
36868
36869
36870
36871
36872
36873
36874
36875
36876
36877
36878
36879
36880
36881
36882
36883
36884
36885
36886
36887
36888
36889
36890
36891
36892
36893
36894
36895
36896
36897
36898
36899
36900
36901
36902
36903
36904
36905
36906
36907
36908
36909
36910
36911
36912
36913
36914
36915
36916
36917
36918
36919
36920
36921
36922
36923
36924
36925
36926
36927
36928
36929
36930
36931
36932
36933
36934
36935
36936
36937
36938
36939
36940
36941
36942
36943
36944
36945
36946
36947
36948
36949
36950
36951
36952
36953
36954
36955
36956
36957
36958
36959
36960
36961
36962
36963
36964
36965
36966
36967
36968
36969
36970
36971
36972
36973
36974
36975
36976
36977
36978
36979
36980
36981
36982
36983
36984
36985
36986
36987
36988
36989
36990
36991
36992
36993
36994
36995
36996
36997
36998
36999
37000
37001
37002
37003
37004
37005
37006
37007
37008
37009
37010
37011
37012
37013
37014
37015
37016
37017
37018
37019
37020
37021
37022
37023
37024
37025
37026
37027
37028
37029
37030
37031
37032
37033
37034
37035
37036
37037
37038
37039
37040
37041
37042
37043
37044
37045
37046
37047
37048
37049
37050
37051
37052
37053
37054
37055
37056
37057
37058
37059
37060
37061
37062
37063
37064
37065
37066
37067
37068
37069
37070
37071
37072
37073
37074
37075
37076
37077
37078
37079
37080
37081
37082
37083
37084
37085
37086
37087
37088
37089
37090
37091
37092
37093
37094
37095
37096
37097
37098
37099
37100
37101
37102
37103
37104
37105
37106
37107
37108
37109
37110
37111
37112
37113
37114
37115
37116
37117
37118
37119
37120
37121
37122
37123
37124
37125
37126
37127
37128
37129
37130
37131
37132
37133
37134
37135
37136
37137
37138
37139
37140
37141
37142
37143
37144
37145
37146
37147
37148
37149
37150
37151
37152
37153
37154
37155
37156
37157
37158
37159
37160
37161
37162
37163
37164
37165
37166
37167
37168
37169
37170
37171
37172
37173
37174
37175
37176
37177
37178
37179
37180
37181
37182
37183
37184
37185
37186
37187
37188
37189
37190
37191
37192
37193
37194
37195
37196
37197
37198
37199
37200
37201
37202
37203
37204
37205
37206
37207
37208
37209
37210
37211
37212
37213
37214
37215
37216
37217
37218
37219
37220
37221
37222
37223
37224
37225
37226
37227
37228
37229
37230
37231
37232
37233
37234
37235
37236
37237
37238
37239
37240
37241
37242
37243
37244
37245
37246
37247
37248
37249
37250
37251
37252
37253
37254
37255
37256
37257
37258
37259
37260
37261
37262
37263
37264
37265
37266
37267
37268
37269
37270
37271
37272
37273
37274
37275
37276
37277
37278
37279
37280
37281
37282
37283
37284
37285
37286
37287
37288
37289
37290
37291
37292
37293
37294
37295
37296
37297
37298
37299
37300
37301
37302
37303
37304
37305
37306
37307
37308
37309
37310
37311
37312
37313
37314
37315
37316
37317
37318
37319
37320
37321
37322
37323
37324
37325
37326
37327
37328
37329
37330
37331
37332
37333
37334
37335
37336
37337
37338
37339
37340
37341
37342
37343
37344
37345
37346
37347
37348
37349
37350
37351
37352
37353
37354
37355
37356
37357
37358
37359
37360
37361
37362
37363
37364
37365
37366
37367
37368
37369
37370
37371
37372
37373
37374
37375
37376
37377
37378
37379
37380
37381
37382
37383
37384
37385
37386
37387
37388
37389
37390
37391
37392
37393
37394
37395
37396
37397
37398
37399
37400
37401
37402
37403
37404
37405
37406
37407
37408
37409
37410
37411
37412
37413
37414
37415
37416
37417
37418
37419
37420
37421
37422
37423
37424
37425
37426
37427
37428
37429
37430
37431
37432
37433
37434
37435
37436
37437
37438
37439
37440
37441
37442
37443
37444
37445
37446
37447
37448
37449
37450
37451
37452
37453
37454
37455
37456
37457
37458
37459
37460
37461
37462
37463
37464
37465
37466
37467
37468
37469
37470
37471
37472
37473
37474
37475
37476
37477
37478
37479
37480
37481
37482
37483
37484
37485
37486
37487
37488
37489
37490
37491
37492
37493
37494
37495
37496
37497
37498
37499
37500
37501
37502
37503
37504
37505
37506
37507
37508
37509
37510
37511
37512
37513
37514
37515
37516
37517
37518
37519
37520
37521
37522
37523
37524
37525
37526
37527
37528
37529
37530
37531
37532
37533
37534
37535
37536
37537
37538
37539
37540
37541
37542
37543
37544
37545
37546
37547
37548
37549
37550
37551
37552
37553
37554
37555
37556
37557
37558
37559
37560
37561
37562
37563
37564
37565
37566
37567
37568
37569
37570
37571
37572
37573
37574
37575
37576
37577
37578
37579
37580
37581
37582
37583
37584
37585
37586
37587
37588
37589
37590
37591
37592
37593
37594
37595
37596
37597
37598
37599
37600
37601
37602
37603
37604
37605
37606
37607
37608
37609
37610
37611
37612
37613
37614
37615
37616
37617
37618
37619
37620
37621
37622
37623
37624
37625
37626
37627
37628
37629
37630
37631
37632
37633
37634
37635
37636
37637
37638
37639
37640
37641
37642
37643
37644
37645
37646
37647
37648
37649
37650
37651
37652
37653
37654
37655
37656
37657
37658
37659
37660
37661
37662
37663
37664
37665
37666
37667
37668
37669
37670
37671
37672
37673
37674
37675
37676
37677
37678
37679
37680
37681
37682
37683
37684
37685
37686
37687
37688
37689
37690
37691
37692
37693
37694
37695
37696
37697
37698
37699
37700
37701
37702
37703
37704
37705
37706
37707
37708
37709
37710
37711
37712
37713
37714
37715
37716
37717
37718
37719
37720
37721
37722
37723
37724
37725
37726
37727
37728
37729
37730
37731
37732
37733
37734
37735
37736
37737
37738
37739
37740
37741
37742
37743
37744
37745
37746
37747
37748
37749
37750
37751
37752
37753
37754
37755
37756
37757
37758
37759
37760
37761
37762
37763
37764
37765
37766
37767
37768
37769
37770
37771
37772
37773
37774
37775
37776
37777
37778
37779
37780
37781
37782
37783
37784
37785
37786
37787
37788
37789
37790
37791
37792
37793
37794
37795
37796
37797
37798
37799
37800
37801
37802
37803
37804
37805
37806
37807
37808
37809
37810
37811
37812
37813
37814
37815
37816
37817
37818
37819
37820
37821
37822
37823
37824
37825
37826
37827
37828
37829
37830
37831
37832
37833
37834
37835
37836
37837
37838
37839
37840
37841
37842
37843
37844
37845
37846
37847
37848
37849
37850
37851
37852
37853
37854
37855
37856
37857
37858
37859
37860
37861
37862
37863
37864
37865
37866
37867
37868
37869
37870
37871
37872
37873
37874
37875
37876
37877
37878
37879
37880
37881
37882
37883
37884
37885
37886
37887
37888
37889
37890
37891
37892
37893
37894
37895
37896
37897
37898
37899
37900
37901
37902
37903
37904
37905
37906
37907
37908
37909
37910
37911
37912
37913
37914
37915
37916
37917
37918
37919
37920
37921
37922
37923
37924
37925
37926
37927
37928
37929
37930
37931
37932
37933
37934
37935
37936
37937
37938
37939
37940
37941
37942
37943
37944
37945
37946
37947
37948
37949
37950
37951
37952
37953
37954
37955
37956
37957
37958
37959
37960
37961
37962
37963
37964
37965
37966
37967
37968
37969
37970
37971
37972
37973
37974
37975
37976
37977
37978
37979
37980
37981
37982
37983
37984
37985
37986
37987
37988
37989
37990
37991
37992
37993
37994
37995
37996
37997
37998
37999
38000
38001
38002
38003
38004
38005
38006
38007
38008
38009
38010
38011
38012
38013
38014
38015
38016
38017
38018
38019
38020
38021
38022
38023
38024
38025
38026
38027
38028
38029
38030
38031
38032
38033
38034
38035
38036
38037
38038
38039
38040
38041
38042
38043
38044
38045
38046
38047
38048
38049
38050
38051
38052
38053
38054
38055
38056
38057
38058
38059
38060
38061
38062
38063
38064
38065
38066
38067
38068
38069
38070
38071
38072
38073
38074
38075
38076
38077
38078
38079
38080
38081
38082
38083
38084
38085
38086
38087
38088
38089
38090
38091
38092
38093
38094
38095
38096
38097
38098
38099
38100
38101
38102
38103
38104
38105
38106
38107
38108
38109
38110
38111
38112
38113
38114
38115
38116
38117
38118
38119
38120
38121
38122
38123
38124
38125
38126
38127
38128
38129
38130
38131
38132
38133
38134
38135
38136
38137
38138
38139
38140
38141
38142
38143
38144
38145
38146
38147
38148
38149
38150
38151
38152
38153
38154
38155
38156
38157
38158
38159
38160
38161
38162
38163
38164
38165
38166
38167
38168
38169
38170
38171
38172
38173
38174
38175
38176
38177
38178
38179
38180
38181
38182
38183
38184
38185
38186
38187
38188
38189
38190
38191
38192
38193
38194
38195
38196
38197
38198
38199
38200
38201
38202
38203
38204
38205
38206
38207
38208
38209
38210
38211
38212
38213
38214
38215
38216
38217
38218
38219
38220
38221
38222
38223
38224
38225
38226
38227
38228
38229
38230
38231
38232
38233
38234
38235
38236
38237
38238
38239
38240
38241
38242
38243
38244
38245
38246
38247
38248
38249
38250
38251
38252
38253
38254
38255
38256
38257
38258
38259
38260
38261
38262
38263
38264
38265
38266
38267
38268
38269
38270
38271
38272
38273
38274
38275
38276
38277
38278
38279
38280
38281
38282
38283
38284
38285
38286
38287
38288
38289
38290
38291
38292
38293
38294
38295
38296
38297
38298
38299
38300
38301
38302
38303
38304
38305
38306
38307
38308
38309
38310
38311
38312
38313
38314
38315
38316
38317
38318
38319
38320
38321
38322
38323
38324
38325
38326
38327
38328
38329
38330
38331
38332
38333
38334
38335
38336
38337
38338
38339
38340
38341
38342
38343
38344
38345
38346
38347
38348
38349
38350
38351
38352
38353
38354
38355
38356
38357
38358
38359
38360
38361
38362
38363
38364
38365
38366
38367
38368
38369
38370
38371
38372
38373
38374
38375
38376
38377
38378
38379
38380
38381
38382
38383
38384
38385
38386
38387
38388
38389
38390
38391
38392
38393
38394
38395
38396
38397
38398
38399
38400
38401
38402
38403
38404
38405
38406
38407
38408
38409
38410
38411
38412
38413
38414
38415
38416
38417
38418
38419
38420
38421
38422
38423
38424
38425
38426
38427
38428
38429
38430
38431
38432
38433
38434
38435
38436
38437
38438
38439
38440
38441
38442
38443
38444
38445
38446
38447
38448
38449
38450
38451
38452
38453
38454
38455
38456
38457
38458
38459
38460
38461
38462
38463
38464
38465
38466
38467
38468
38469
38470
38471
38472
38473
38474
38475
38476
38477
38478
38479
38480
38481
38482
38483
38484
38485
38486
38487
38488
38489
38490
38491
38492
38493
38494
38495
38496
38497
38498
38499
38500
38501
38502
38503
38504
38505
38506
38507
38508
38509
38510
38511
38512
38513
38514
38515
38516
38517
38518
38519
38520
38521
38522
38523
38524
38525
38526
38527
38528
38529
38530
38531
38532
38533
38534
38535
38536
38537
38538
38539
38540
38541
38542
38543
38544
38545
38546
38547
38548
38549
38550
38551
38552
38553
38554
38555
38556
38557
38558
38559
38560
38561
38562
38563
38564
38565
38566
38567
38568
38569
38570
38571
38572
38573
38574
38575
38576
38577
38578
38579
38580
38581
38582
38583
38584
38585
38586
38587
38588
38589
38590
38591
38592
38593
38594
38595
38596
38597
38598
38599
38600
38601
38602
38603
38604
38605
38606
38607
38608
38609
38610
38611
38612
38613
38614
38615
38616
38617
38618
38619
38620
38621
38622
38623
38624
38625
38626
38627
38628
38629
38630
38631
38632
38633
38634
38635
38636
38637
38638
38639
38640
38641
38642
38643
38644
38645
38646
38647
38648
38649
38650
38651
38652
38653
38654
38655
38656
38657
38658
38659
38660
38661
38662
38663
38664
38665
38666
38667
38668
38669
38670
38671
38672
38673
38674
38675
38676
38677
38678
38679
38680
38681
38682
38683
38684
38685
38686
38687
38688
38689
38690
38691
38692
38693
38694
38695
38696
38697
38698
38699
38700
38701
38702
38703
38704
38705
38706
38707
38708
38709
38710
38711
38712
38713
38714
38715
38716
38717
38718
38719
38720
38721
38722
38723
38724
38725
38726
38727
38728
38729
38730
38731
38732
38733
38734
38735
38736
38737
38738
38739
38740
38741
38742
38743
38744
38745
38746
38747
38748
38749
38750
38751
38752
38753
38754
38755
38756
38757
38758
38759
38760
38761
38762
38763
38764
38765
38766
38767
38768
38769
38770
38771
38772
38773
38774
38775
38776
38777
38778
38779
38780
38781
38782
38783
38784
38785
38786
38787
38788
38789
38790
38791
38792
38793
38794
38795
38796
38797
38798
38799
38800
38801
38802
38803
38804
38805
38806
38807
38808
38809
38810
38811
38812
38813
38814
38815
38816
38817
38818
38819
38820
38821
38822
38823
38824
38825
38826
38827
38828
38829
38830
38831
38832
38833
38834
38835
38836
38837
38838
38839
38840
38841
38842
38843
38844
38845
38846
38847
38848
38849
38850
38851
38852
38853
38854
38855
38856
38857
38858
38859
38860
38861
38862
38863
38864
38865
38866
38867
38868
38869
38870
38871
38872
38873
38874
38875
38876
38877
38878
38879
38880
38881
38882
38883
38884
38885
38886
38887
38888
38889
38890
38891
38892
38893
38894
38895
38896
38897
38898
38899
38900
38901
38902
38903
38904
38905
38906
38907
38908
38909
38910
38911
38912
38913
38914
38915
38916
38917
38918
38919
38920
38921
38922
38923
38924
38925
38926
38927
38928
38929
38930
38931
38932
38933
38934
38935
38936
38937
38938
38939
38940
38941
38942
38943
38944
38945
38946
38947
38948
38949
38950
38951
38952
38953
38954
38955
38956
38957
38958
38959
38960
38961
38962
38963
38964
38965
38966
38967
38968
38969
38970
38971
38972
38973
38974
38975
38976
38977
38978
38979
38980
38981
38982
38983
38984
38985
38986
38987
38988
38989
38990
38991
38992
38993
38994
38995
38996
38997
38998
38999
39000
39001
39002
39003
39004
39005
39006
39007
39008
39009
39010
39011
39012
39013
39014
39015
39016
39017
39018
39019
39020
39021
39022
39023
39024
39025
39026
39027
39028
39029
39030
39031
39032
39033
39034
39035
39036
39037
39038
39039
39040
39041
39042
39043
39044
39045
39046
39047
39048
39049
39050
39051
39052
39053
39054
39055
39056
39057
39058
39059
39060
39061
39062
39063
39064
39065
39066
39067
39068
39069
39070
39071
39072
39073
39074
39075
39076
39077
39078
39079
39080
39081
39082
39083
39084
39085
39086
39087
39088
39089
39090
39091
39092
39093
39094
39095
39096
39097
39098
39099
39100
39101
39102
39103
39104
39105
39106
39107
39108
39109
39110
39111
39112
39113
39114
39115
39116
39117
39118
39119
39120
39121
39122
39123
39124
39125
39126
39127
39128
39129
39130
39131
39132
39133
39134
39135
39136
39137
39138
39139
39140
39141
39142
39143
39144
39145
39146
39147
39148
39149
39150
39151
39152
39153
39154
39155
39156
39157
39158
39159
39160
39161
39162
39163
39164
39165
39166
39167
39168
39169
39170
39171
39172
39173
39174
39175
39176
39177
39178
39179
39180
39181
39182
39183
39184
39185
39186
39187
39188
39189
39190
39191
39192
39193
39194
39195
39196
39197
39198
39199
39200
39201
39202
39203
39204
39205
39206
39207
39208
39209
39210
39211
39212
39213
39214
39215
39216
39217
39218
39219
39220
39221
39222
39223
39224
39225
39226
39227
39228
39229
39230
39231
39232
39233
39234
39235
39236
39237
39238
39239
39240
39241
39242
39243
39244
39245
39246
39247
39248
39249
39250
39251
39252
39253
39254
39255
39256
39257
39258
39259
39260
39261
39262
39263
39264
39265
39266
39267
39268
39269
39270
39271
39272
39273
39274
39275
39276
39277
39278
39279
39280
39281
39282
39283
39284
39285
39286
39287
39288
39289
39290
39291
39292
39293
39294
39295
39296
39297
39298
39299
39300
39301
39302
39303
39304
39305
39306
39307
39308
39309
39310
39311
39312
39313
39314
39315
39316
39317
39318
39319
39320
39321
39322
39323
39324
39325
39326
39327
39328
39329
39330
39331
39332
39333
39334
39335
39336
39337
39338
39339
39340
39341
39342
39343
39344
39345
39346
39347
39348
39349
39350
39351
39352
39353
39354
39355
39356
39357
39358
39359
39360
39361
39362
39363
39364
39365
39366
39367
39368
39369
39370
39371
39372
39373
39374
39375
39376
39377
39378
39379
39380
39381
39382
39383
39384
39385
39386
39387
39388
39389
39390
39391
39392
39393
39394
39395
39396
39397
39398
39399
39400
39401
39402
39403
39404
39405
39406
39407
39408
39409
39410
39411
39412
39413
39414
39415
39416
39417
39418
39419
39420
39421
39422
39423
39424
39425
39426
39427
39428
39429
39430
39431
39432
39433
39434
39435
39436
39437
39438
39439
39440
39441
39442
39443
39444
39445
39446
39447
39448
39449
39450
39451
39452
39453
39454
39455
39456
39457
39458
39459
39460
39461
39462
39463
39464
39465
39466
39467
39468
39469
39470
39471
39472
39473
39474
39475
39476
39477
39478
39479
39480
39481
39482
39483
39484
39485
39486
39487
39488
39489
39490
39491
39492
39493
39494
39495
39496
39497
39498
39499
39500
39501
39502
39503
39504
39505
39506
39507
39508
39509
39510
39511
39512
39513
39514
39515
39516
39517
39518
39519
39520
39521
39522
39523
39524
39525
39526
39527
39528
39529
39530
39531
39532
39533
39534
39535
39536
39537
39538
39539
39540
39541
39542
39543
39544
39545
39546
39547
39548
39549
39550
39551
39552
39553
39554
39555
39556
39557
39558
39559
39560
39561
39562
39563
39564
39565
39566
39567
39568
39569
39570
39571
39572
39573
39574
39575
39576
39577
39578
39579
39580
39581
39582
39583
39584
39585
39586
39587
39588
39589
39590
39591
39592
39593
39594
39595
39596
39597
39598
39599
39600
39601
39602
39603
39604
39605
39606
39607
39608
39609
39610
39611
39612
39613
39614
39615
39616
39617
39618
39619
39620
39621
39622
39623
39624
39625
39626
39627
39628
39629
39630
39631
39632
39633
39634
39635
39636
39637
39638
39639
39640
39641
39642
39643
39644
39645
39646
39647
39648
39649
39650
39651
39652
39653
39654
39655
39656
39657
39658
39659
39660
39661
39662
39663
39664
39665
39666
39667
39668
39669
39670
39671
39672
39673
39674
39675
39676
39677
39678
39679
39680
39681
39682
39683
39684
39685
39686
39687
39688
39689
39690
39691
39692
39693
39694
39695
39696
39697
39698
39699
39700
39701
39702
39703
39704
39705
39706
39707
39708
39709
39710
39711
39712
39713
39714
39715
39716
39717
39718
39719
39720
39721
39722
39723
39724
39725
39726
39727
39728
39729
39730
39731
39732
39733
39734
39735
39736
39737
39738
39739
39740
39741
39742
39743
39744
39745
39746
39747
39748
39749
39750
39751
39752
39753
39754
39755
39756
39757
39758
39759
39760
39761
39762
39763
39764
39765
39766
39767
39768
39769
39770
39771
39772
39773
39774
39775
39776
39777
39778
39779
39780
39781
39782
39783
39784
39785
39786
39787
39788
39789
39790
39791
39792
39793
39794
39795
39796
39797
39798
39799
39800
39801
39802
39803
39804
39805
39806
39807
39808
39809
39810
39811
39812
39813
39814
39815
39816
39817
39818
39819
39820
39821
39822
39823
39824
39825
39826
39827
39828
39829
39830
39831
39832
39833
39834
39835
39836
39837
39838
39839
39840
39841
39842
39843
39844
39845
39846
39847
39848
39849
39850
39851
39852
39853
39854
39855
39856
39857
39858
39859
39860
39861
39862
39863
39864
39865
39866
39867
39868
39869
39870
39871
39872
39873
39874
39875
39876
39877
39878
39879
39880
39881
39882
39883
39884
39885
39886
39887
39888
39889
39890
39891
39892
39893
39894
39895
39896
39897
39898
39899
39900
39901
39902
39903
39904
39905
39906
39907
39908
39909
39910
39911
39912
39913
39914
39915
39916
39917
39918
39919
39920
39921
39922
39923
39924
39925
39926
39927
39928
39929
39930
39931
39932
39933
39934
39935
39936
39937
39938
39939
39940
39941
39942
39943
39944
39945
39946
39947
39948
39949
39950
39951
39952
39953
39954
39955
39956
39957
39958
39959
39960
39961
39962
39963
39964
39965
39966
39967
39968
39969
39970
39971
39972
39973
39974
39975
39976
39977
39978
39979
39980
39981
39982
39983
39984
39985
39986
39987
39988
39989
39990
39991
39992
39993
39994
39995
39996
39997
39998
39999
40000
40001
40002
40003
40004
40005
40006
40007
40008
40009
40010
40011
40012
40013
40014
40015
40016
40017
40018
40019
40020
40021
40022
40023
40024
40025
40026
40027
40028
40029
40030
40031
40032
40033
40034
40035
40036
40037
40038
40039
40040
40041
40042
40043
40044
40045
40046
40047
40048
40049
40050
40051
40052
40053
40054
40055
40056
40057
40058
40059
40060
40061
40062
40063
40064
40065
40066
40067
40068
40069
40070
40071
40072
40073
40074
40075
40076
40077
40078
40079
40080
40081
40082
40083
40084
40085
40086
40087
40088
40089
40090
40091
40092
40093
40094
40095
40096
40097
40098
40099
40100
40101
40102
40103
40104
40105
40106
40107
40108
40109
40110
40111
40112
40113
40114
40115
40116
40117
40118
40119
40120
40121
40122
40123
40124
40125
40126
40127
40128
40129
40130
40131
40132
40133
40134
40135
40136
40137
40138
40139
40140
40141
40142
40143
40144
40145
40146
40147
40148
40149
40150
40151
40152
40153
40154
40155
40156
40157
40158
40159
40160
40161
40162
40163
40164
40165
40166
40167
40168
40169
40170
40171
40172
40173
40174
40175
40176
40177
40178
40179
40180
40181
40182
40183
40184
40185
40186
40187
40188
40189
40190
40191
40192
40193
40194
40195
40196
40197
40198
40199
40200
40201
40202
40203
40204
40205
40206
40207
40208
40209
40210
40211
40212
40213
40214
40215
40216
40217
40218
40219
40220
40221
40222
40223
40224
40225
40226
40227
40228
40229
40230
40231
40232
40233
40234
40235
40236
40237
40238
40239
40240
40241
40242
40243
40244
40245
40246
40247
40248
40249
40250
40251
40252
40253
40254
40255
40256
40257
40258
40259
40260
40261
40262
40263
40264
40265
40266
40267
40268
40269
40270
40271
40272
40273
40274
40275
40276
40277
40278
40279
40280
40281
40282
40283
40284
40285
40286
40287
40288
40289
40290
40291
40292
40293
40294
40295
40296
40297
40298
40299
40300
40301
40302
40303
40304
40305
40306
40307
40308
40309
40310
40311
40312
40313
40314
40315
40316
40317
40318
40319
40320
40321
40322
40323
40324
40325
40326
40327
40328
40329
40330
40331
40332
40333
40334
40335
40336
40337
40338
40339
40340
40341
40342
40343
40344
40345
40346
40347
40348
40349
40350
40351
40352
40353
40354
40355
40356
40357
40358
40359
40360
40361
40362
40363
40364
40365
40366
40367
40368
40369
40370
40371
40372
40373
40374
40375
40376
40377
40378
40379
40380
40381
40382
40383
40384
40385
40386
40387
40388
40389
40390
40391
40392
40393
40394
40395
40396
40397
40398
40399
40400
40401
40402
40403
40404
40405
40406
40407
40408
40409
40410
40411
40412
40413
40414
40415
40416
40417
40418
40419
40420
40421
40422
40423
40424
40425
40426
40427
40428
40429
40430
40431
40432
40433
40434
40435
40436
40437
40438
40439
40440
40441
40442
40443
40444
40445
40446
40447
40448
40449
40450
40451
40452
40453
40454
40455
40456
40457
40458
40459
40460
40461
40462
40463
40464
40465
40466
40467
40468
40469
40470
40471
40472
40473
40474
40475
40476
40477
40478
40479
40480
40481
40482
40483
40484
40485
40486
40487
40488
40489
40490
40491
40492
40493
40494
40495
40496
40497
40498
40499
40500
40501
40502
40503
40504
40505
40506
40507
40508
40509
40510
40511
40512
40513
40514
40515
40516
40517
40518
40519
40520
40521
40522
40523
40524
40525
40526
40527
40528
40529
40530
40531
40532
40533
40534
40535
40536
40537
40538
40539
40540
40541
40542
40543
40544
40545
40546
40547
40548
40549
40550
40551
40552
40553
40554
40555
40556
40557
40558
40559
40560
40561
40562
40563
40564
40565
40566
40567
40568
40569
40570
40571
40572
40573
40574
40575
40576
40577
40578
40579
40580
40581
40582
40583
40584
40585
40586
40587
40588
40589
40590
40591
40592
40593
40594
40595
40596
40597
40598
40599
40600
40601
40602
40603
40604
40605
40606
40607
40608
40609
40610
40611
40612
40613
40614
40615
40616
40617
40618
40619
40620
40621
40622
40623
40624
40625
40626
40627
40628
40629
40630
40631
40632
40633
40634
40635
40636
40637
40638
40639
40640
40641
40642
40643
40644
40645
40646
40647
40648
40649
40650
40651
40652
40653
40654
40655
40656
40657
40658
40659
40660
40661
40662
40663
40664
40665
40666
40667
40668
40669
40670
40671
40672
40673
40674
40675
40676
40677
40678
40679
40680
40681
40682
40683
40684
40685
40686
40687
40688
40689
40690
40691
40692
40693
40694
40695
40696
40697
40698
40699
40700
40701
40702
40703
40704
40705
40706
40707
40708
40709
40710
40711
40712
40713
40714
40715
40716
40717
40718
40719
40720
40721
40722
40723
40724
40725
40726
40727
40728
40729
40730
40731
40732
40733
40734
40735
40736
40737
40738
40739
40740
40741
40742
40743
40744
40745
40746
40747
40748
40749
40750
40751
40752
40753
40754
40755
40756
40757
40758
40759
40760
40761
40762
40763
40764
40765
40766
40767
40768
40769
40770
40771
40772
40773
40774
40775
40776
40777
40778
40779
40780
40781
40782
40783
40784
40785
40786
40787
40788
40789
40790
40791
40792
40793
40794
40795
40796
40797
40798
40799
40800
40801
40802
40803
40804
40805
40806
40807
40808
40809
40810
40811
40812
40813
40814
40815
40816
40817
40818
40819
40820
40821
40822
40823
40824
40825
40826
40827
40828
40829
40830
40831
40832
40833
40834
40835
40836
40837
40838
40839
40840
40841
40842
40843
40844
40845
40846
40847
40848
40849
40850
40851
40852
40853
40854
40855
40856
40857
40858
40859
40860
40861
40862
40863
40864
40865
40866
40867
40868
40869
40870
40871
40872
40873
40874
40875
40876
40877
40878
40879
40880
40881
40882
40883
40884
40885
40886
40887
40888
40889
40890
40891
40892
40893
40894
40895
40896
40897
40898
40899
40900
40901
40902
40903
40904
40905
40906
40907
40908
40909
40910
40911
40912
40913
40914
40915
40916
40917
40918
40919
40920
40921
40922
40923
40924
40925
40926
40927
40928
40929
40930
40931
40932
40933
40934
40935
40936
40937
40938
40939
40940
40941
40942
40943
40944
40945
40946
40947
40948
40949
40950
40951
40952
40953
40954
40955
40956
40957
40958
40959
40960
40961
40962
40963
40964
40965
40966
40967
40968
40969
40970
40971
40972
40973
40974
40975
40976
40977
40978
40979
40980
40981
40982
40983
40984
40985
40986
40987
40988
40989
40990
40991
40992
40993
40994
40995
40996
40997
40998
40999
41000
41001
41002
41003
41004
41005
41006
41007
41008
41009
41010
41011
41012
41013
41014
41015
41016
41017
41018
41019
41020
41021
41022
41023
41024
41025
41026
41027
41028
41029
41030
41031
41032
41033
41034
41035
41036
41037
41038
41039
41040
41041
41042
41043
41044
41045
41046
41047
41048
41049
41050
41051
41052
41053
41054
41055
41056
41057
41058
41059
41060
41061
41062
41063
41064
41065
41066
41067
41068
41069
41070
41071
41072
41073
41074
41075
41076
41077
41078
41079
41080
41081
41082
41083
41084
41085
41086
41087
41088
41089
41090
41091
41092
41093
41094
41095
41096
41097
41098
41099
41100
41101
41102
41103
41104
41105
41106
41107
41108
41109
41110
41111
41112
41113
41114
41115
41116
41117
41118
41119
41120
41121
41122
41123
41124
41125
41126
41127
41128
41129
41130
41131
41132
41133
41134
41135
41136
41137
41138
41139
41140
41141
41142
41143
41144
41145
41146
41147
41148
41149
41150
41151
41152
41153
41154
41155
41156
41157
41158
41159
41160
41161
41162
41163
41164
41165
41166
41167
41168
41169
41170
41171
41172
41173
41174
41175
41176
41177
41178
41179
41180
41181
41182
41183
41184
41185
41186
41187
41188
41189
41190
41191
41192
41193
41194
41195
41196
41197
41198
41199
41200
41201
41202
41203
41204
41205
41206
41207
41208
41209
41210
41211
41212
41213
41214
41215
41216
41217
41218
41219
41220
41221
41222
41223
41224
41225
41226
41227
41228
41229
41230
41231
41232
41233
41234
41235
41236
41237
41238
41239
41240
41241
41242
41243
41244
41245
41246
41247
41248
41249
41250
41251
41252
41253
41254
41255
41256
41257
41258
41259
41260
41261
41262
41263
41264
41265
41266
41267
41268
41269
41270
41271
41272
41273
41274
41275
41276
41277
41278
41279
41280
41281
41282
41283
41284
41285
41286
41287
41288
41289
41290
41291
41292
41293
41294
41295
41296
41297
41298
41299
41300
41301
41302
41303
41304
41305
41306
41307
41308
41309
41310
41311
41312
41313
41314
41315
41316
41317
41318
41319
41320
41321
41322
41323
41324
41325
41326
41327
41328
41329
41330
41331
41332
41333
41334
41335
41336
41337
41338
41339
41340
41341
41342
41343
41344
41345
41346
41347
41348
41349
41350
41351
41352
41353
41354
41355
41356
41357
41358
41359
41360
41361
41362
41363
41364
41365
41366
41367
41368
41369
41370
41371
41372
41373
41374
41375
41376
41377
41378
41379
41380
41381
41382
41383
41384
41385
41386
41387
41388
41389
41390
41391
41392
41393
41394
41395
41396
41397
41398
41399
41400
41401
41402
41403
41404
41405
41406
41407
41408
41409
41410
41411
41412
41413
41414
41415
41416
41417
41418
41419
41420
41421
41422
41423
41424
41425
41426
41427
41428
41429
41430
41431
41432
41433
41434
41435
41436
41437
41438
41439
41440
41441
41442
41443
41444
41445
41446
41447
41448
41449
41450
41451
41452
41453
41454
41455
41456
41457
41458
41459
41460
41461
41462
41463
41464
41465
41466
41467
41468
41469
41470
41471
41472
41473
41474
41475
41476
41477
41478
41479
41480
41481
41482
41483
41484
41485
41486
41487
41488
41489
41490
41491
41492
41493
41494
41495
41496
41497
41498
41499
41500
41501
41502
41503
41504
41505
41506
41507
41508
41509
41510
41511
41512
41513
41514
41515
41516
41517
41518
41519
41520
41521
41522
41523
41524
41525
41526
41527
41528
41529
41530
41531
41532
41533
41534
41535
41536
41537
41538
41539
41540
41541
41542
41543
41544
41545
41546
41547
41548
41549
41550
41551
41552
41553
41554
41555
41556
41557
41558
41559
41560
41561
41562
41563
41564
41565
41566
41567
41568
41569
41570
41571
41572
41573
41574
41575
41576
41577
41578
41579
41580
41581
41582
41583
41584
41585
41586
41587
41588
41589
41590
41591
41592
41593
41594
41595
41596
41597
41598
41599
41600
41601
41602
41603
41604
41605
41606
41607
41608
41609
41610
41611
41612
41613
41614
41615
41616
41617
41618
41619
41620
41621
41622
41623
41624
41625
41626
41627
41628
41629
41630
41631
41632
41633
41634
41635
41636
41637
41638
41639
41640
41641
41642
41643
41644
41645
41646
41647
41648
41649
41650
41651
41652
41653
41654
41655
41656
41657
41658
41659
41660
41661
41662
41663
41664
41665
41666
41667
41668
41669
41670
41671
41672
41673
41674
41675
41676
41677
41678
41679
41680
41681
41682
41683
41684
41685
41686
41687
41688
41689
41690
41691
41692
41693
41694
41695
41696
41697
41698
41699
41700
41701
41702
41703
41704
41705
41706
41707
41708
41709
41710
41711
41712
41713
41714
41715
41716
41717
41718
41719
41720
41721
41722
41723
41724
41725
41726
41727
41728
41729
41730
41731
41732
41733
41734
41735
41736
41737
41738
41739
41740
41741
41742
41743
41744
41745
41746
41747
41748
41749
41750
41751
41752
41753
41754
41755
41756
41757
41758
41759
41760
41761
41762
41763
41764
41765
41766
41767
41768
41769
41770
41771
41772
41773
41774
41775
41776
41777
41778
41779
41780
41781
41782
41783
41784
41785
41786
41787
41788
41789
41790
41791
41792
41793
41794
41795
41796
41797
41798
41799
41800
41801
41802
41803
41804
41805
41806
41807
41808
41809
41810
41811
41812
41813
41814
41815
41816
41817
41818
41819
41820
41821
41822
41823
41824
41825
41826
41827
41828
41829
41830
41831
41832
41833
41834
41835
41836
41837
41838
41839
41840
41841
41842
41843
41844
41845
41846
41847
41848
41849
41850
41851
41852
41853
41854
41855
41856
41857
41858
41859
41860
41861
41862
41863
41864
41865
41866
41867
41868
41869
41870
41871
41872
41873
41874
41875
41876
41877
41878
41879
41880
41881
41882
41883
41884
41885
41886
41887
41888
41889
41890
41891
41892
41893
41894
41895
41896
41897
41898
41899
41900
41901
41902
41903
41904
41905
41906
41907
41908
41909
41910
41911
41912
41913
41914
41915
41916
41917
41918
41919
41920
41921
41922
41923
41924
41925
41926
41927
41928
41929
41930
41931
41932
41933
41934
41935
41936
41937
41938
41939
41940
41941
41942
41943
41944
41945
41946
41947
41948
41949
41950
41951
41952
41953
41954
41955
41956
41957
41958
41959
41960
41961
41962
41963
41964
41965
41966
41967
41968
41969
41970
41971
41972
41973
41974
41975
41976
41977
41978
41979
41980
41981
41982
41983
41984
41985
41986
41987
41988
41989
41990
41991
41992
41993
41994
41995
41996
41997
41998
41999
42000
42001
42002
42003
42004
42005
42006
42007
42008
42009
42010
42011
42012
42013
42014
42015
42016
42017
42018
42019
42020
42021
42022
42023
42024
42025
42026
42027
42028
42029
42030
42031
42032
42033
42034
42035
42036
42037
42038
42039
42040
42041
42042
42043
42044
42045
42046
42047
42048
42049
42050
42051
42052
42053
42054
42055
42056
42057
42058
42059
42060
42061
42062
42063
42064
42065
42066
42067
42068
42069
42070
42071
42072
42073
42074
42075
42076
42077
42078
42079
42080
42081
42082
42083
42084
42085
42086
42087
42088
42089
42090
42091
42092
42093
42094
42095
42096
42097
42098
42099
42100
42101
42102
42103
42104
42105
42106
42107
42108
42109
42110
42111
42112
42113
42114
42115
42116
42117
42118
42119
42120
42121
42122
42123
42124
42125
42126
42127
42128
42129
42130
42131
42132
42133
42134
42135
42136
42137
42138
42139
42140
42141
42142
42143
42144
42145
42146
42147
42148
42149
42150
42151
42152
42153
42154
42155
42156
42157
42158
42159
42160
42161
42162
42163
42164
42165
42166
42167
42168
42169
42170
42171
42172
42173
42174
42175
42176
42177
42178
42179
42180
42181
42182
42183
42184
42185
42186
42187
42188
42189
42190
42191
42192
42193
42194
42195
42196
42197
42198
42199
42200
42201
42202
42203
42204
42205
42206
42207
42208
42209
42210
42211
42212
42213
42214
42215
42216
42217
42218
42219
42220
42221
42222
42223
42224
42225
42226
42227
42228
42229
42230
42231
42232
42233
42234
42235
42236
42237
42238
42239
42240
42241
42242
42243
42244
42245
42246
42247
42248
42249
42250
42251
42252
42253
42254
42255
42256
42257
42258
42259
42260
42261
42262
42263
42264
42265
42266
42267
42268
42269
42270
42271
42272
42273
42274
42275
42276
42277
42278
42279
42280
42281
42282
42283
42284
42285
42286
42287
42288
42289
42290
42291
42292
42293
42294
42295
42296
42297
42298
42299
42300
42301
42302
42303
42304
42305
42306
42307
42308
42309
42310
42311
42312
42313
42314
42315
42316
42317
42318
42319
42320
42321
42322
42323
42324
42325
42326
42327
42328
42329
42330
42331
42332
42333
42334
42335
42336
42337
42338
42339
42340
42341
42342
42343
42344
42345
42346
42347
42348
42349
42350
42351
42352
42353
42354
42355
42356
42357
42358
42359
42360
42361
42362
42363
42364
42365
42366
42367
42368
42369
42370
42371
42372
42373
42374
42375
42376
42377
42378
42379
42380
42381
42382
42383
42384
42385
42386
42387
42388
42389
42390
42391
42392
42393
42394
42395
42396
42397
42398
42399
42400
42401
42402
42403
42404
42405
42406
42407
42408
42409
42410
42411
42412
42413
42414
42415
42416
42417
42418
42419
42420
42421
42422
42423
42424
42425
42426
42427
42428
42429
42430
42431
42432
42433
42434
42435
42436
42437
42438
42439
42440
42441
42442
42443
42444
42445
42446
42447
42448
42449
42450
42451
42452
42453
42454
42455
42456
42457
42458
42459
42460
42461
42462
42463
42464
42465
42466
42467
42468
42469
42470
42471
42472
42473
42474
42475
42476
42477
42478
42479
42480
42481
42482
42483
42484
42485
42486
42487
42488
42489
42490
42491
42492
42493
42494
42495
42496
42497
42498
42499
42500
42501
42502
42503
42504
42505
42506
42507
42508
42509
42510
42511
42512
42513
42514
42515
42516
42517
42518
42519
42520
42521
42522
42523
42524
42525
42526
42527
42528
42529
42530
42531
42532
42533
42534
42535
42536
42537
42538
42539
42540
42541
42542
42543
42544
42545
42546
42547
42548
42549
42550
42551
42552
42553
42554
42555
42556
42557
42558
42559
42560
42561
42562
42563
42564
42565
42566
42567
42568
42569
42570
42571
42572
42573
42574
42575
42576
42577
42578
42579
42580
42581
42582
42583
42584
42585
42586
42587
42588
42589
42590
42591
42592
42593
42594
42595
42596
42597
42598
42599
42600
42601
42602
42603
42604
42605
42606
42607
42608
42609
42610
42611
42612
42613
42614
42615
42616
42617
42618
42619
42620
42621
42622
42623
42624
42625
42626
42627
42628
42629
42630
42631
42632
42633
42634
42635
42636
42637
42638
42639
42640
42641
42642
42643
42644
42645
42646
42647
42648
42649
42650
42651
42652
42653
42654
42655
42656
42657
42658
42659
42660
42661
42662
42663
42664
42665
42666
42667
42668
42669
42670
42671
42672
42673
42674
42675
42676
42677
42678
42679
42680
42681
42682
42683
42684
42685
42686
42687
42688
42689
42690
42691
42692
42693
42694
42695
42696
42697
42698
42699
42700
42701
42702
42703
42704
42705
42706
42707
42708
42709
42710
42711
42712
42713
42714
42715
42716
42717
42718
42719
42720
42721
42722
42723
42724
42725
42726
42727
42728
42729
42730
42731
42732
42733
42734
42735
42736
42737
42738
42739
42740
42741
42742
42743
42744
42745
42746
42747
42748
42749
42750
42751
42752
42753
42754
42755
42756
42757
42758
42759
42760
42761
42762
42763
42764
42765
42766
42767
42768
42769
42770
42771
42772
42773
42774
42775
42776
42777
42778
42779
42780
42781
42782
42783
42784
42785
42786
42787
42788
42789
42790
42791
42792
42793
42794
42795
42796
42797
42798
42799
42800
42801
42802
42803
42804
42805
42806
42807
42808
42809
42810
42811
42812
42813
42814
42815
42816
42817
42818
42819
42820
42821
42822
42823
42824
42825
42826
42827
42828
42829
42830
42831
42832
42833
42834
42835
42836
42837
42838
42839
42840
42841
42842
42843
42844
42845
42846
42847
42848
42849
42850
42851
42852
42853
42854
42855
42856
42857
42858
42859
42860
42861
42862
42863
42864
42865
42866
42867
42868
42869
42870
42871
42872
42873
42874
42875
42876
42877
42878
42879
42880
42881
42882
42883
42884
42885
42886
42887
42888
42889
42890
42891
42892
42893
42894
42895
42896
42897
42898
42899
42900
42901
42902
42903
42904
42905
42906
42907
42908
42909
42910
42911
42912
42913
42914
42915
42916
42917
42918
42919
42920
42921
42922
42923
42924
42925
42926
42927
42928
42929
42930
42931
42932
42933
42934
42935
42936
42937
42938
42939
42940
42941
42942
42943
42944
42945
42946
42947
42948
42949
42950
42951
42952
42953
42954
42955
42956
42957
42958
42959
42960
42961
42962
42963
42964
42965
42966
42967
42968
42969
42970
42971
42972
42973
42974
42975
42976
42977
42978
42979
42980
42981
42982
42983
42984
42985
42986
42987
42988
42989
42990
42991
42992
42993
42994
42995
42996
42997
42998
42999
43000
43001
43002
43003
43004
43005
43006
43007
43008
43009
43010
43011
43012
43013
43014
43015
43016
43017
43018
43019
43020
43021
43022
43023
43024
43025
43026
43027
43028
43029
43030
43031
43032
43033
43034
43035
43036
43037
43038
43039
43040
43041
43042
43043
43044
43045
43046
43047
43048
43049
43050
43051
43052
43053
43054
43055
43056
43057
43058
43059
43060
43061
43062
43063
43064
43065
43066
43067
43068
43069
43070
43071
43072
43073
43074
43075
43076
43077
43078
43079
43080
43081
43082
43083
43084
43085
43086
43087
43088
43089
43090
43091
43092
43093
43094
43095
43096
43097
43098
43099
43100
43101
43102
43103
43104
43105
43106
43107
43108
43109
43110
43111
43112
43113
43114
43115
43116
43117
43118
43119
43120
43121
43122
43123
43124
43125
43126
43127
43128
43129
43130
43131
43132
43133
43134
43135
43136
43137
43138
43139
43140
43141
43142
43143
43144
43145
43146
43147
43148
43149
43150
43151
43152
43153
43154
43155
43156
43157
43158
43159
43160
43161
43162
43163
43164
43165
43166
43167
43168
43169
43170
43171
43172
43173
43174
43175
43176
43177
43178
43179
43180
43181
43182
43183
43184
43185
43186
43187
43188
43189
43190
43191
43192
43193
43194
43195
43196
43197
43198
43199
43200
43201
43202
43203
43204
43205
43206
43207
43208
43209
43210
43211
43212
43213
43214
43215
43216
43217
43218
43219
43220
43221
43222
43223
43224
43225
43226
43227
43228
43229
43230
43231
43232
43233
43234
43235
43236
43237
43238
43239
43240
43241
43242
43243
43244
43245
43246
43247
43248
43249
43250
43251
43252
43253
43254
43255
43256
43257
43258
43259
43260
43261
43262
43263
43264
43265
43266
43267
43268
43269
43270
43271
43272
43273
43274
43275
43276
43277
43278
43279
43280
43281
43282
43283
43284
43285
43286
43287
43288
43289
43290
43291
43292
43293
43294
43295
43296
43297
43298
43299
43300
43301
43302
43303
43304
43305
43306
43307
43308
43309
43310
43311
43312
43313
43314
43315
43316
43317
43318
43319
43320
43321
43322
43323
43324
43325
43326
43327
43328
43329
43330
43331
43332
43333
43334
43335
43336
43337
43338
43339
43340
43341
43342
43343
43344
43345
43346
43347
43348
43349
43350
43351
43352
43353
43354
43355
43356
43357
43358
43359
43360
43361
43362
43363
43364
43365
43366
43367
43368
43369
43370
43371
43372
43373
43374
43375
43376
43377
43378
43379
43380
43381
43382
43383
43384
43385
43386
43387
43388
43389
43390
43391
43392
43393
43394
43395
43396
43397
43398
43399
43400
43401
43402
43403
43404
43405
43406
43407
43408
43409
43410
43411
43412
43413
43414
43415
43416
43417
43418
43419
43420
43421
43422
43423
43424
43425
43426
43427
43428
43429
43430
43431
43432
43433
43434
43435
43436
43437
43438
43439
43440
43441
43442
43443
43444
43445
43446
43447
43448
43449
43450
43451
43452
43453
43454
43455
43456
43457
43458
43459
43460
43461
43462
43463
43464
43465
43466
43467
43468
43469
43470
43471
43472
43473
43474
43475
43476
43477
43478
43479
43480
43481
43482
43483
43484
43485
43486
43487
43488
43489
43490
43491
43492
43493
43494
43495
43496
43497
43498
43499
43500
43501
43502
43503
43504
43505
43506
43507
43508
43509
43510
43511
43512
43513
43514
43515
43516
43517
43518
43519
43520
43521
43522
43523
43524
43525
43526
43527
43528
43529
43530
43531
43532
43533
43534
43535
43536
43537
43538
43539
43540
43541
43542
43543
43544
43545
43546
43547
43548
43549
43550
43551
43552
43553
43554
43555
43556
43557
43558
43559
43560
43561
43562
43563
43564
43565
43566
43567
43568
43569
43570
43571
43572
43573
43574
43575
43576
43577
43578
43579
43580
43581
43582
43583
43584
43585
43586
43587
43588
43589
43590
43591
43592
43593
43594
43595
43596
43597
43598
43599
43600
43601
43602
43603
43604
43605
43606
43607
43608
43609
43610
43611
43612
43613
43614
43615
43616
43617
43618
43619
43620
43621
43622
43623
43624
43625
43626
43627
43628
43629
43630
43631
43632
43633
43634
43635
43636
43637
43638
43639
43640
43641
43642
43643
43644
43645
43646
43647
43648
43649
43650
43651
43652
43653
43654
43655
43656
43657
43658
43659
43660
43661
43662
43663
43664
43665
43666
43667
43668
43669
43670
43671
43672
43673
43674
43675
43676
43677
43678
43679
43680
43681
43682
43683
43684
43685
43686
43687
43688
43689
43690
43691
43692
43693
43694
43695
43696
43697
43698
43699
43700
43701
43702
43703
43704
43705
43706
43707
43708
43709
43710
43711
43712
43713
43714
43715
43716
43717
43718
43719
43720
43721
43722
43723
43724
43725
43726
43727
43728
43729
43730
43731
43732
43733
43734
43735
43736
43737
43738
43739
43740
43741
43742
43743
43744
43745
43746
43747
43748
43749
43750
43751
43752
43753
43754
43755
43756
43757
43758
43759
43760
43761
43762
43763
43764
43765
43766
43767
43768
43769
43770
43771
43772
43773
43774
43775
43776
43777
43778
43779
43780
43781
43782
43783
43784
43785
43786
43787
43788
43789
43790
43791
43792
43793
43794
43795
43796
43797
43798
43799
43800
43801
43802
43803
43804
43805
43806
43807
43808
43809
43810
43811
43812
43813
43814
43815
43816
43817
43818
43819
43820
43821
43822
43823
43824
43825
43826
43827
43828
43829
43830
43831
43832
43833
43834
43835
43836
43837
43838
43839
43840
43841
43842
43843
43844
43845
43846
43847
43848
43849
43850
43851
43852
43853
43854
43855
43856
43857
43858
43859
43860
43861
43862
43863
43864
43865
43866
43867
43868
43869
43870
43871
43872
43873
43874
43875
43876
43877
43878
43879
43880
43881
43882
43883
43884
43885
43886
43887
43888
43889
43890
43891
43892
43893
43894
43895
43896
43897
43898
43899
43900
43901
43902
43903
43904
43905
43906
43907
43908
43909
43910
43911
43912
43913
43914
43915
43916
43917
43918
43919
43920
43921
43922
43923
43924
43925
43926
43927
43928
43929
43930
43931
43932
43933
43934
43935
43936
43937
43938
43939
43940
43941
43942
43943
43944
43945
43946
43947
43948
43949
43950
43951
43952
43953
43954
43955
43956
43957
43958
43959
43960
43961
43962
43963
43964
43965
43966
43967
43968
43969
43970
43971
43972
43973
43974
43975
43976
43977
43978
43979
43980
43981
43982
43983
43984
43985
43986
43987
43988
43989
43990
43991
43992
43993
43994
43995
43996
43997
43998
43999
44000
44001
44002
44003
44004
44005
44006
44007
44008
44009
44010
44011
44012
44013
44014
44015
44016
44017
44018
44019
44020
44021
44022
44023
44024
44025
44026
44027
44028
44029
44030
44031
44032
44033
44034
44035
44036
44037
44038
44039
44040
44041
44042
44043
44044
44045
44046
44047
44048
44049
44050
44051
44052
44053
44054
44055
44056
44057
44058
44059
44060
44061
44062
44063
44064
44065
44066
44067
44068
44069
44070
44071
44072
44073
44074
44075
44076
44077
44078
44079
44080
44081
44082
44083
44084
44085
44086
44087
44088
44089
44090
44091
44092
44093
44094
44095
44096
44097
44098
44099
44100
44101
44102
44103
44104
44105
44106
44107
44108
44109
44110
44111
44112
44113
44114
44115
44116
44117
44118
44119
44120
44121
44122
44123
44124
44125
44126
44127
44128
44129
44130
44131
44132
44133
44134
44135
44136
44137
44138
44139
44140
44141
44142
44143
44144
44145
44146
44147
44148
44149
44150
44151
44152
44153
44154
44155
44156
44157
44158
44159
44160
44161
44162
44163
44164
44165
44166
44167
44168
44169
44170
44171
44172
44173
44174
44175
44176
44177
44178
44179
44180
44181
44182
44183
44184
44185
44186
44187
44188
44189
44190
44191
44192
44193
44194
44195
44196
44197
44198
44199
44200
44201
44202
44203
44204
44205
44206
44207
44208
44209
44210
44211
44212
44213
44214
44215
44216
44217
44218
44219
44220
44221
44222
44223
44224
44225
44226
44227
44228
44229
44230
44231
44232
44233
44234
44235
44236
44237
44238
44239
44240
44241
44242
44243
44244
44245
44246
44247
44248
44249
44250
44251
44252
44253
44254
44255
44256
44257
44258
44259
44260
44261
44262
44263
44264
44265
44266
44267
44268
44269
44270
44271
44272
44273
44274
44275
44276
44277
44278
44279
44280
44281
44282
44283
44284
44285
44286
44287
44288
44289
44290
44291
44292
44293
44294
44295
44296
44297
44298
44299
44300
44301
44302
44303
44304
44305
44306
44307
44308
44309
44310
44311
44312
44313
44314
44315
44316
44317
44318
44319
44320
44321
44322
44323
44324
44325
44326
44327
44328
44329
44330
44331
44332
44333
44334
44335
44336
44337
44338
44339
44340
44341
44342
44343
44344
44345
44346
44347
44348
44349
44350
44351
44352
44353
44354
44355
44356
44357
44358
44359
44360
44361
44362
44363
44364
44365
44366
44367
44368
44369
44370
44371
44372
44373
44374
44375
44376
44377
44378
44379
44380
44381
44382
44383
44384
44385
44386
44387
44388
44389
44390
44391
44392
44393
44394
44395
44396
44397
44398
44399
44400
44401
44402
44403
44404
44405
44406
44407
44408
44409
44410
44411
44412
44413
44414
44415
44416
44417
44418
44419
44420
44421
44422
44423
44424
44425
44426
44427
44428
44429
44430
44431
44432
44433
44434
44435
44436
44437
44438
44439
44440
44441
44442
44443
44444
44445
44446
44447
44448
44449
44450
44451
44452
44453
44454
44455
44456
44457
44458
44459
44460
44461
44462
44463
44464
44465
44466
44467
44468
44469
44470
44471
44472
44473
44474
44475
44476
44477
44478
44479
44480
44481
44482
44483
44484
44485
44486
44487
44488
44489
44490
44491
44492
44493
44494
44495
44496
44497
44498
44499
44500
44501
44502
44503
44504
44505
44506
44507
44508
44509
44510
44511
44512
44513
44514
44515
44516
44517
44518
44519
44520
44521
44522
44523
44524
44525
44526
44527
44528
44529
44530
44531
44532
44533
44534
44535
44536
44537
44538
44539
44540
44541
44542
44543
44544
44545
44546
44547
44548
44549
44550
44551
44552
44553
44554
44555
44556
44557
44558
44559
44560
44561
44562
44563
44564
44565
44566
44567
44568
44569
44570
44571
44572
44573
44574
44575
44576
44577
44578
44579
44580
44581
44582
44583
44584
44585
44586
44587
44588
44589
44590
44591
44592
44593
44594
44595
44596
44597
44598
44599
44600
44601
44602
44603
44604
44605
44606
44607
44608
44609
44610
44611
44612
44613
44614
44615
44616
44617
44618
44619
44620
44621
44622
44623
44624
44625
44626
44627
44628
44629
44630
44631
44632
44633
44634
44635
44636
44637
44638
44639
44640
44641
44642
44643
44644
44645
44646
44647
44648
44649
44650
44651
44652
44653
44654
44655
44656
44657
44658
44659
44660
44661
44662
44663
44664
44665
44666
44667
44668
44669
44670
44671
44672
44673
44674
44675
44676
44677
44678
44679
44680
44681
44682
44683
44684
44685
44686
44687
44688
44689
44690
44691
44692
44693
44694
44695
44696
44697
44698
44699
44700
44701
44702
44703
44704
44705
44706
44707
44708
44709
44710
44711
44712
44713
44714
44715
44716
44717
44718
44719
44720
44721
44722
44723
44724
44725
44726
44727
44728
44729
44730
44731
44732
44733
44734
44735
44736
44737
44738
44739
44740
44741
44742
44743
44744
44745
44746
44747
44748
44749
44750
44751
44752
44753
44754
44755
44756
44757
44758
44759
44760
44761
44762
44763
44764
44765
44766
44767
44768
44769
44770
44771
44772
44773
44774
44775
44776
44777
44778
44779
44780
44781
44782
44783
44784
44785
44786
44787
44788
44789
44790
44791
44792
44793
44794
44795
44796
44797
44798
44799
44800
44801
44802
44803
44804
44805
44806
44807
44808
44809
44810
44811
44812
44813
44814
44815
44816
44817
44818
44819
44820
44821
44822
44823
44824
44825
44826
44827
44828
44829
44830
44831
44832
44833
44834
44835
44836
44837
44838
44839
44840
44841
44842
44843
44844
44845
44846
44847
44848
44849
44850
44851
44852
44853
44854
44855
44856
44857
44858
44859
44860
44861
44862
44863
44864
44865
44866
44867
44868
44869
44870
44871
44872
44873
44874
44875
44876
44877
44878
44879
44880
44881
44882
44883
44884
44885
44886
44887
44888
44889
44890
44891
44892
44893
44894
44895
44896
44897
44898
44899
44900
44901
44902
44903
44904
44905
44906
44907
44908
44909
44910
44911
44912
44913
44914
44915
44916
44917
44918
44919
44920
44921
44922
44923
44924
44925
44926
44927
44928
44929
44930
44931
44932
44933
44934
44935
44936
44937
44938
44939
44940
44941
44942
44943
44944
44945
44946
44947
44948
44949
44950
44951
44952
44953
44954
44955
44956
44957
44958
44959
44960
44961
44962
44963
44964
44965
44966
44967
44968
44969
44970
44971
44972
44973
44974
44975
44976
44977
44978
44979
44980
44981
44982
44983
44984
44985
44986
44987
44988
44989
44990
44991
44992
44993
44994
44995
44996
44997
44998
44999
45000
45001
45002
45003
45004
45005
45006
45007
45008
45009
45010
45011
45012
45013
45014
45015
45016
45017
45018
45019
45020
45021
45022
45023
45024
45025
45026
45027
45028
45029
45030
45031
45032
45033
45034
45035
45036
45037
45038
45039
45040
45041
45042
45043
45044
45045
45046
45047
45048
45049
45050
45051
45052
45053
45054
45055
45056
45057
45058
45059
45060
45061
45062
45063
45064
45065
45066
45067
45068
45069
45070
45071
45072
45073
45074
45075
45076
45077
45078
45079
45080
45081
45082
45083
45084
45085
45086
45087
45088
45089
45090
45091
45092
45093
45094
45095
45096
45097
45098
45099
45100
45101
45102
45103
45104
45105
45106
45107
45108
45109
45110
45111
45112
45113
45114
45115
45116
45117
45118
45119
45120
45121
45122
45123
45124
45125
45126
45127
45128
45129
45130
45131
45132
45133
45134
45135
45136
45137
45138
45139
45140
45141
45142
45143
45144
45145
45146
45147
45148
45149
45150
45151
45152
45153
45154
45155
45156
45157
45158
45159
45160
45161
45162
45163
45164
45165
45166
45167
45168
45169
45170
45171
45172
45173
45174
45175
45176
45177
45178
45179
45180
45181
45182
45183
45184
45185
45186
45187
45188
45189
45190
45191
45192
45193
45194
45195
45196
45197
45198
45199
45200
45201
45202
45203
45204
45205
45206
45207
45208
45209
45210
45211
45212
45213
45214
45215
45216
45217
45218
45219
45220
45221
45222
45223
45224
45225
45226
45227
45228
45229
45230
45231
45232
45233
45234
45235
45236
45237
45238
45239
45240
45241
45242
45243
45244
45245
45246
45247
45248
45249
45250
45251
45252
45253
45254
45255
45256
45257
45258
45259
45260
45261
45262
45263
45264
45265
45266
45267
45268
45269
45270
45271
45272
45273
45274
45275
45276
45277
45278
45279
45280
45281
45282
45283
45284
45285
45286
45287
45288
45289
45290
45291
45292
45293
45294
45295
45296
45297
45298
45299
45300
45301
45302
45303
45304
45305
45306
45307
45308
45309
45310
45311
45312
45313
45314
45315
45316
45317
45318
45319
45320
45321
45322
45323
45324
45325
45326
45327
45328
45329
45330
45331
45332
45333
45334
45335
45336
45337
45338
45339
45340
45341
45342
45343
45344
45345
45346
45347
45348
45349
45350
45351
45352
45353
45354
45355
45356
45357
45358
45359
45360
45361
45362
45363
45364
45365
45366
45367
45368
45369
45370
45371
45372
45373
45374
45375
45376
45377
45378
45379
45380
45381
45382
45383
45384
45385
45386
45387
45388
45389
45390
45391
45392
45393
45394
45395
45396
45397
45398
45399
45400
45401
45402
45403
45404
45405
45406
45407
45408
45409
45410
45411
45412
45413
45414
45415
45416
45417
45418
45419
45420
45421
45422
45423
45424
45425
45426
45427
45428
45429
45430
45431
45432
45433
45434
45435
45436
45437
45438
45439
45440
45441
45442
45443
45444
45445
45446
45447
45448
45449
45450
45451
45452
45453
45454
45455
45456
45457
45458
45459
45460
45461
45462
45463
45464
45465
45466
45467
45468
45469
45470
45471
45472
45473
45474
45475
45476
45477
45478
45479
45480
45481
45482
45483
45484
45485
45486
45487
45488
45489
45490
45491
45492
45493
45494
45495
45496
45497
45498
45499
45500
45501
45502
45503
45504
45505
45506
45507
45508
45509
45510
45511
45512
45513
45514
45515
45516
45517
45518
45519
45520
45521
45522
45523
45524
45525
45526
45527
45528
45529
45530
45531
45532
45533
45534
45535
45536
45537
45538
45539
45540
45541
45542
45543
45544
45545
45546
45547
45548
45549
45550
45551
45552
45553
45554
45555
45556
45557
45558
45559
45560
45561
45562
45563
45564
45565
45566
45567
45568
45569
45570
45571
45572
45573
45574
45575
45576
45577
45578
45579
45580
45581
45582
45583
45584
45585
45586
45587
45588
45589
45590
45591
45592
45593
45594
45595
45596
45597
45598
45599
45600
45601
45602
45603
45604
45605
45606
45607
45608
45609
45610
45611
45612
45613
45614
45615
45616
45617
45618
45619
45620
45621
45622
45623
45624
45625
45626
45627
45628
45629
45630
45631
45632
45633
45634
45635
45636
45637
45638
45639
45640
45641
45642
45643
45644
45645
45646
45647
45648
45649
45650
45651
45652
45653
45654
45655
45656
45657
45658
45659
45660
45661
45662
45663
45664
45665
45666
45667
45668
45669
45670
45671
45672
45673
45674
45675
45676
45677
45678
45679
45680
45681
45682
45683
45684
45685
45686
45687
45688
45689
45690
45691
45692
45693
45694
45695
45696
45697
45698
45699
45700
45701
45702
45703
45704
45705
45706
45707
45708
45709
45710
45711
45712
45713
45714
45715
45716
45717
45718
45719
45720
45721
45722
45723
45724
45725
45726
45727
45728
45729
45730
45731
45732
45733
45734
45735
45736
45737
45738
45739
45740
45741
45742
45743
45744
45745
45746
45747
45748
45749
45750
45751
45752
45753
45754
45755
45756
45757
45758
45759
45760
45761
45762
45763
45764
45765
45766
45767
45768
45769
45770
45771
45772
45773
45774
45775
45776
45777
45778
45779
45780
45781
45782
45783
45784
45785
45786
45787
45788
45789
45790
45791
45792
45793
45794
45795
45796
45797
45798
45799
45800
45801
45802
45803
45804
45805
45806
45807
45808
45809
45810
45811
45812
45813
45814
45815
45816
45817
45818
45819
45820
45821
45822
45823
45824
45825
45826
45827
45828
45829
45830
45831
45832
45833
45834
45835
45836
45837
45838
45839
45840
45841
45842
45843
45844
45845
45846
45847
45848
45849
45850
45851
45852
45853
45854
45855
45856
45857
45858
45859
45860
45861
45862
45863
45864
45865
45866
45867
45868
45869
45870
45871
45872
45873
45874
45875
45876
45877
45878
45879
45880
45881
45882
45883
45884
45885
45886
45887
45888
45889
45890
45891
45892
45893
45894
45895
45896
45897
45898
45899
45900
45901
45902
45903
45904
45905
45906
45907
45908
45909
45910
45911
45912
45913
45914
45915
45916
45917
45918
45919
45920
45921
45922
45923
45924
45925
45926
45927
45928
45929
45930
45931
45932
45933
45934
45935
45936
45937
45938
45939
45940
45941
45942
45943
45944
45945
45946
45947
45948
45949
45950
45951
45952
45953
45954
45955
45956
45957
45958
45959
45960
45961
45962
45963
45964
45965
45966
45967
45968
45969
45970
45971
45972
45973
45974
45975
45976
45977
45978
45979
45980
45981
45982
45983
45984
45985
45986
45987
45988
45989
45990
45991
45992
45993
45994
45995
45996
45997
45998
45999
46000
46001
46002
46003
46004
46005
46006
46007
46008
46009
46010
46011
46012
46013
46014
46015
46016
46017
46018
46019
46020
46021
46022
46023
46024
46025
46026
46027
46028
46029
46030
46031
46032
46033
46034
46035
46036
46037
46038
46039
46040
46041
46042
46043
46044
46045
46046
46047
46048
46049
46050
46051
46052
46053
46054
46055
46056
46057
46058
46059
46060
46061
46062
46063
46064
46065
46066
46067
46068
46069
46070
46071
46072
46073
46074
46075
46076
46077
46078
46079
46080
46081
46082
46083
46084
46085
46086
46087
46088
46089
46090
46091
46092
46093
46094
46095
46096
46097
46098
46099
46100
46101
46102
46103
46104
46105
46106
46107
46108
46109
46110
46111
46112
46113
46114
46115
46116
46117
46118
46119
46120
46121
46122
46123
46124
46125
46126
46127
46128
46129
46130
46131
46132
46133
46134
46135
46136
46137
46138
46139
46140
46141
46142
46143
46144
46145
46146
46147
46148
46149
46150
46151
46152
46153
46154
46155
46156
46157
46158
46159
46160
46161
46162
46163
46164
46165
46166
46167
46168
46169
46170
46171
46172
46173
46174
46175
46176
46177
46178
46179
46180
46181
46182
46183
46184
46185
46186
46187
46188
46189
46190
46191
46192
46193
46194
46195
46196
46197
46198
46199
46200
46201
46202
46203
46204
46205
46206
46207
46208
46209
46210
46211
46212
46213
46214
46215
46216
46217
46218
46219
46220
46221
46222
46223
46224
46225
46226
46227
46228
46229
46230
46231
46232
46233
46234
46235
46236
46237
46238
46239
46240
46241
46242
46243
46244
46245
46246
46247
46248
46249
46250
46251
46252
46253
46254
46255
46256
46257
46258
46259
46260
46261
46262
46263
46264
46265
46266
46267
46268
46269
46270
46271
46272
46273
46274
46275
46276
46277
46278
46279
46280
46281
46282
46283
46284
46285
46286
46287
46288
46289
46290
46291
46292
46293
46294
46295
46296
46297
46298
46299
46300
46301
46302
46303
46304
46305
46306
46307
46308
46309
46310
46311
46312
46313
46314
46315
46316
46317
46318
46319
46320
46321
46322
46323
46324
46325
46326
46327
46328
46329
46330
46331
46332
46333
46334
46335
46336
46337
46338
46339
46340
46341
46342
46343
46344
46345
46346
46347
46348
46349
46350
46351
46352
46353
46354
46355
46356
46357
46358
46359
46360
46361
46362
46363
46364
46365
46366
46367
46368
46369
46370
46371
46372
46373
46374
46375
46376
46377
46378
46379
46380
46381
46382
46383
46384
46385
46386
46387
46388
46389
46390
46391
46392
46393
46394
46395
46396
46397
46398
46399
46400
46401
46402
46403
46404
46405
46406
46407
46408
46409
46410
46411
46412
46413
46414
46415
46416
46417
46418
46419
46420
46421
46422
46423
46424
46425
46426
46427
46428
46429
46430
46431
46432
46433
46434
46435
46436
46437
46438
46439
46440
46441
46442
46443
46444
46445
46446
46447
46448
46449
46450
46451
46452
46453
46454
46455
46456
46457
46458
46459
46460
46461
46462
46463
46464
46465
46466
46467
46468
46469
46470
46471
46472
46473
46474
46475
46476
46477
46478
46479
46480
46481
46482
46483
46484
46485
46486
46487
46488
46489
46490
46491
46492
46493
46494
46495
46496
46497
46498
46499
46500
46501
46502
46503
46504
46505
46506
46507
46508
46509
46510
46511
46512
46513
46514
46515
46516
46517
46518
46519
46520
46521
46522
46523
46524
46525
46526
46527
46528
46529
46530
46531
46532
46533
46534
46535
46536
46537
46538
46539
46540
46541
46542
46543
46544
46545
46546
46547
46548
46549
46550
46551
46552
46553
46554
46555
46556
46557
46558
46559
46560
46561
46562
46563
46564
46565
46566
46567
46568
46569
46570
46571
46572
46573
46574
46575
46576
46577
46578
46579
46580
46581
46582
46583
46584
46585
46586
46587
46588
46589
46590
46591
46592
46593
46594
46595
46596
46597
46598
46599
46600
46601
46602
46603
46604
46605
46606
46607
46608
46609
46610
46611
46612
46613
46614
46615
46616
46617
46618
46619
46620
46621
46622
46623
46624
46625
46626
46627
46628
46629
46630
46631
46632
46633
46634
46635
46636
46637
46638
46639
46640
46641
46642
46643
46644
46645
46646
46647
46648
46649
46650
46651
46652
46653
46654
46655
46656
46657
46658
46659
46660
46661
46662
46663
46664
46665
46666
46667
46668
46669
46670
46671
46672
46673
46674
46675
46676
46677
46678
46679
46680
46681
46682
46683
46684
46685
46686
46687
46688
46689
46690
46691
46692
46693
46694
46695
46696
46697
46698
46699
46700
46701
46702
46703
46704
46705
46706
46707
46708
46709
46710
46711
46712
46713
46714
46715
46716
46717
46718
46719
46720
46721
46722
46723
46724
46725
46726
46727
46728
46729
46730
46731
46732
46733
46734
46735
46736
46737
46738
46739
46740
46741
46742
46743
46744
46745
46746
46747
46748
46749
46750
46751
46752
46753
46754
46755
46756
46757
46758
46759
46760
46761
46762
46763
46764
46765
46766
46767
46768
46769
46770
46771
46772
46773
46774
46775
46776
46777
46778
46779
46780
46781
46782
46783
46784
46785
46786
46787
46788
46789
46790
46791
46792
46793
46794
46795
46796
46797
46798
46799
46800
46801
46802
46803
46804
46805
46806
46807
46808
46809
46810
46811
46812
46813
46814
46815
46816
46817
46818
46819
46820
46821
46822
46823
46824
46825
46826
46827
46828
46829
46830
46831
46832
46833
46834
46835
46836
46837
46838
46839
46840
46841
46842
46843
46844
46845
46846
46847
46848
46849
46850
46851
46852
46853
46854
46855
46856
46857
46858
46859
46860
46861
46862
46863
46864
46865
46866
46867
46868
46869
46870
46871
46872
46873
46874
46875
46876
46877
46878
46879
46880
46881
46882
46883
46884
46885
46886
46887
46888
46889
46890
46891
46892
46893
46894
46895
46896
46897
46898
46899
46900
46901
46902
46903
46904
46905
46906
46907
46908
46909
46910
46911
46912
46913
46914
46915
46916
46917
46918
46919
46920
46921
46922
46923
46924
46925
46926
46927
46928
46929
46930
46931
46932
46933
46934
46935
46936
46937
46938
46939
46940
46941
46942
46943
46944
46945
46946
46947
46948
46949
46950
46951
46952
46953
46954
46955
46956
46957
46958
46959
46960
46961
46962
46963
46964
46965
46966
46967
46968
46969
46970
46971
46972
46973
46974
46975
46976
46977
46978
46979
46980
46981
46982
46983
46984
46985
46986
46987
46988
46989
46990
46991
46992
46993
46994
46995
46996
46997
46998
46999
47000
47001
47002
47003
47004
47005
47006
47007
47008
47009
47010
47011
47012
47013
47014
47015
47016
47017
47018
47019
47020
47021
47022
47023
47024
47025
47026
47027
47028
47029
47030
47031
47032
47033
47034
47035
47036
47037
47038
47039
47040
47041
47042
47043
47044
47045
47046
47047
47048
47049
47050
47051
47052
47053
47054
47055
47056
47057
47058
47059
47060
47061
47062
47063
47064
47065
47066
47067
47068
47069
47070
47071
47072
47073
47074
47075
47076
47077
47078
47079
47080
47081
47082
47083
47084
47085
47086
47087
47088
47089
47090
47091
47092
47093
47094
47095
47096
47097
47098
47099
47100
47101
47102
47103
47104
47105
47106
47107
47108
47109
47110
47111
47112
47113
47114
47115
47116
47117
47118
47119
47120
47121
47122
47123
47124
47125
47126
47127
47128
47129
47130
47131
47132
47133
47134
47135
47136
47137
47138
47139
47140
47141
47142
47143
47144
47145
47146
47147
47148
47149
47150
47151
47152
47153
47154
47155
47156
47157
47158
47159
47160
47161
47162
47163
47164
47165
47166
47167
47168
47169
47170
47171
47172
47173
47174
47175
47176
47177
47178
47179
47180
47181
47182
47183
47184
47185
47186
47187
47188
47189
47190
47191
47192
47193
47194
47195
47196
47197
47198
47199
47200
47201
47202
47203
47204
47205
47206
47207
47208
47209
47210
47211
47212
47213
47214
47215
47216
47217
47218
47219
47220
47221
47222
47223
47224
47225
47226
47227
47228
47229
47230
47231
47232
47233
47234
47235
47236
47237
47238
47239
47240
47241
47242
47243
47244
47245
47246
47247
47248
47249
47250
47251
47252
47253
47254
47255
47256
47257
47258
47259
47260
47261
47262
47263
47264
47265
47266
47267
47268
47269
47270
47271
47272
47273
47274
47275
47276
47277
47278
47279
47280
47281
47282
47283
47284
47285
47286
47287
47288
47289
47290
47291
47292
47293
47294
47295
47296
47297
47298
47299
47300
47301
47302
47303
47304
47305
47306
47307
47308
47309
47310
47311
47312
47313
47314
47315
47316
47317
47318
47319
47320
47321
47322
47323
47324
47325
47326
47327
47328
47329
47330
47331
47332
47333
47334
47335
47336
47337
47338
47339
47340
47341
47342
47343
47344
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458
47459
47460
47461
47462
47463
47464
47465
47466
47467
47468
47469
47470
47471
47472
47473
47474
47475
47476
47477
47478
47479
47480
47481
47482
47483
47484
47485
47486
47487
47488
47489
47490
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553
47554
47555
47556
47557
47558
47559
47560
47561
47562
47563
47564
47565
47566
47567
47568
47569
47570
47571
47572
47573
47574
47575
47576
47577
47578
47579
47580
47581
47582
47583
47584
47585
47586
47587
47588
47589
47590
47591
47592
47593
47594
47595
47596
47597
47598
47599
47600
47601
47602
47603
47604
47605
47606
47607
47608
47609
47610
47611
47612
47613
47614
47615
47616
47617
47618
47619
47620
47621
47622
47623
47624
47625
47626
47627
47628
47629
47630
47631
47632
47633
47634
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682
47683
47684
47685
47686
47687
47688
47689
47690
47691
47692
47693
47694
47695
47696
47697
47698
47699
47700
47701
47702
47703
47704
47705
47706
47707
47708
47709
47710
47711
47712
47713
47714
47715
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726
47727
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787
47788
47789
47790
47791
47792
47793
47794
47795
47796
47797
47798
47799
47800
47801
47802
47803
47804
47805
47806
47807
47808
47809
47810
47811
47812
47813
47814
47815
47816
47817
47818
47819
47820
47821
47822
47823
47824
47825
47826
47827
47828
47829
47830
47831
47832
47833
47834
47835
47836
47837
47838
47839
47840
47841
47842
47843
47844
47845
47846
47847
47848
47849
47850
47851
47852
47853
47854
47855
47856
47857
47858
47859
47860
47861
47862
47863
47864
47865
47866
47867
47868
47869
47870
47871
47872
47873
47874
47875
47876
47877
47878
47879
47880
47881
47882
47883
47884
47885
47886
47887
47888
47889
47890
47891
47892
47893
47894
47895
47896
47897
47898
47899
47900
47901
47902
47903
47904
47905
47906
47907
47908
47909
47910
47911
47912
47913
47914
47915
47916
47917
47918
47919
47920
47921
47922
47923
47924
47925
47926
47927
47928
47929
47930
47931
47932
47933
47934
47935
47936
47937
47938
47939
47940
47941
47942
47943
47944
47945
47946
47947
47948
47949
47950
47951
47952
47953
47954
47955
47956
47957
47958
47959
47960
47961
47962
47963
47964
47965
47966
47967
47968
47969
47970
47971
47972
47973
47974
47975
47976
47977
47978
47979
47980
47981
47982
47983
47984
47985
47986
47987
47988
47989
47990
47991
47992
47993
47994
47995
47996
47997
47998
47999
48000
48001
48002
48003
48004
48005
48006
48007
48008
48009
48010
48011
48012
48013
48014
48015
48016
48017
48018
48019
48020
48021
48022
48023
48024
48025
48026
48027
48028
48029
48030
48031
48032
48033
48034
48035
48036
48037
48038
48039
48040
48041
48042
48043
48044
48045
48046
48047
48048
48049
48050
48051
48052
48053
48054
48055
48056
48057
48058
48059
48060
48061
48062
48063
48064
48065
48066
48067
48068
48069
48070
48071
48072
48073
48074
48075
48076
48077
48078
48079
48080
48081
48082
48083
48084
48085
48086
48087
48088
48089
48090
48091
48092
48093
48094
48095
48096
48097
48098
48099
48100
48101
48102
48103
48104
48105
48106
48107
48108
48109
48110
48111
48112
48113
48114
48115
48116
48117
48118
48119
48120
48121
48122
48123
48124
48125
48126
48127
48128
48129
48130
48131
48132
48133
48134
48135
48136
48137
48138
48139
48140
48141
48142
48143
48144
48145
48146
48147
48148
48149
48150
48151
48152
48153
48154
48155
48156
48157
48158
48159
48160
48161
48162
48163
48164
48165
48166
48167
48168
48169
48170
48171
48172
48173
48174
48175
48176
48177
48178
48179
48180
48181
48182
48183
48184
48185
48186
48187
48188
48189
48190
48191
48192
48193
48194
48195
48196
48197
48198
48199
48200
48201
48202
48203
48204
48205
48206
48207
48208
48209
48210
48211
48212
48213
48214
48215
48216
48217
48218
48219
48220
48221
48222
48223
48224
48225
48226
48227
48228
48229
48230
48231
48232
48233
48234
48235
48236
48237
48238
48239
48240
48241
48242
48243
48244
48245
48246
48247
48248
48249
48250
48251
48252
48253
48254
48255
48256
48257
48258
48259
48260
48261
48262
48263
48264
48265
48266
48267
48268
48269
48270
48271
48272
48273
48274
48275
48276
48277
48278
48279
48280
48281
48282
48283
48284
48285
48286
48287
48288
48289
48290
48291
48292
48293
48294
48295
48296
48297
48298
48299
48300
48301
48302
48303
48304
48305
48306
48307
48308
48309
48310
48311
48312
48313
48314
48315
48316
48317
48318
48319
48320
48321
48322
48323
48324
48325
48326
48327
48328
48329
48330
48331
48332
48333
48334
48335
48336
48337
48338
48339
48340
48341
48342
48343
48344
48345
48346
48347
48348
48349
48350
48351
48352
48353
48354
48355
48356
48357
48358
48359
48360
48361
48362
48363
48364
48365
48366
48367
48368
48369
48370
48371
48372
48373
48374
48375
48376
48377
48378
48379
48380
48381
48382
48383
48384
48385
48386
48387
48388
48389
48390
48391
48392
48393
48394
48395
48396
48397
48398
48399
48400
48401
48402
48403
48404
48405
48406
48407
48408
48409
48410
48411
48412
48413
48414
48415
48416
48417
48418
48419
48420
48421
48422
48423
48424
48425
48426
48427
48428
48429
48430
48431
48432
48433
48434
48435
48436
48437
48438
48439
48440
48441
48442
48443
48444
48445
48446
48447
48448
48449
48450
48451
48452
48453
48454
48455
48456
48457
48458
48459
48460
48461
48462
48463
48464
48465
48466
48467
48468
48469
48470
48471
48472
48473
48474
48475
48476
48477
48478
48479
48480
48481
48482
48483
48484
48485
48486
48487
48488
48489
48490
48491
48492
48493
48494
48495
48496
48497
48498
48499
48500
48501
48502
48503
48504
48505
48506
48507
48508
48509
48510
48511
48512
48513
48514
48515
48516
48517
48518
48519
48520
48521
48522
48523
48524
48525
48526
48527
48528
48529
48530
48531
48532
48533
48534
48535
48536
48537
48538
48539
48540
48541
48542
48543
48544
48545
48546
48547
48548
48549
48550
48551
48552
48553
48554
48555
48556
48557
48558
48559
48560
48561
48562
48563
48564
48565
48566
48567
48568
48569
48570
48571
48572
48573
48574
48575
48576
48577
48578
48579
48580
48581
48582
48583
48584
48585
48586
48587
48588
48589
48590
48591
48592
48593
48594
48595
48596
48597
48598
48599
48600
48601
48602
48603
48604
48605
48606
48607
48608
48609
48610
48611
48612
48613
48614
48615
48616
48617
48618
48619
48620
48621
48622
48623
48624
48625
48626
48627
48628
48629
48630
48631
48632
48633
48634
48635
48636
48637
48638
48639
48640
48641
48642
48643
48644
48645
48646
48647
48648
48649
48650
48651
48652
48653
48654
48655
48656
48657
48658
48659
48660
48661
48662
48663
48664
48665
48666
48667
48668
48669
48670
48671
48672
48673
48674
48675
48676
48677
48678
48679
48680
48681
48682
48683
48684
48685
48686
48687
48688
48689
48690
48691
48692
48693
48694
48695
48696
48697
48698
48699
48700
48701
48702
48703
48704
48705
48706
48707
48708
48709
48710
48711
48712
48713
48714
48715
48716
48717
48718
48719
48720
48721
48722
48723
48724
48725
48726
48727
48728
48729
48730
48731
48732
48733
48734
48735
48736
48737
48738
48739
48740
48741
48742
48743
48744
48745
48746
48747
48748
48749
48750
48751
48752
48753
48754
48755
48756
48757
48758
48759
48760
48761
48762
48763
48764
48765
48766
48767
48768
48769
48770
48771
48772
48773
48774
48775
48776
48777
48778
48779
48780
48781
48782
48783
48784
48785
48786
48787
48788
48789
48790
48791
48792
48793
48794
48795
48796
48797
48798
48799
48800
48801
48802
48803
48804
48805
48806
48807
48808
48809
48810
48811
48812
48813
48814
48815
48816
48817
48818
48819
48820
48821
48822
48823
48824
48825
48826
48827
48828
48829
48830
48831
48832
48833
48834
48835
48836
48837
48838
48839
48840
48841
48842
48843
48844
48845
48846
48847
48848
48849
48850
48851
48852
48853
48854
48855
48856
48857
48858
48859
48860
48861
48862
48863
48864
48865
48866
48867
48868
48869
48870
48871
48872
48873
48874
48875
48876
48877
48878
48879
48880
48881
48882
48883
48884
48885
48886
48887
48888
48889
48890
48891
48892
48893
48894
48895
48896
48897
48898
48899
48900
48901
48902
48903
48904
48905
48906
48907
48908
48909
48910
48911
48912
48913
48914
48915
48916
48917
48918
48919
48920
48921
48922
48923
48924
48925
48926
48927
48928
48929
48930
48931
48932
48933
48934
48935
48936
48937
48938
48939
48940
48941
48942
48943
48944
48945
48946
48947
48948
48949
48950
48951
48952
48953
48954
48955
48956
48957
48958
48959
48960
48961
48962
48963
48964
48965
48966
48967
48968
48969
48970
48971
48972
48973
48974
48975
48976
48977
48978
48979
48980
48981
48982
48983
48984
48985
48986
48987
48988
48989
48990
48991
48992
48993
48994
48995
48996
48997
48998
48999
49000
49001
49002
49003
49004
49005
49006
49007
49008
49009
49010
49011
49012
49013
49014
49015
49016
49017
49018
49019
49020
49021
49022
49023
49024
49025
49026
49027
49028
49029
49030
49031
49032
49033
49034
49035
49036
49037
49038
49039
49040
49041
49042
49043
49044
49045
49046
49047
49048
49049
49050
49051
49052
49053
49054
49055
49056
49057
49058
49059
49060
49061
49062
49063
49064
49065
49066
49067
49068
49069
49070
49071
49072
49073
49074
49075
49076
49077
49078
49079
49080
49081
49082
49083
49084
49085
49086
49087
49088
49089
49090
49091
49092
49093
49094
49095
49096
49097
49098
49099
49100
49101
49102
49103
49104
49105
49106
49107
49108
49109
49110
49111
49112
49113
49114
49115
49116
49117
49118
49119
49120
49121
49122
49123
49124
49125
49126
49127
49128
49129
49130
49131
49132
49133
49134
49135
49136
49137
49138
49139
49140
49141
49142
49143
49144
49145
49146
49147
49148
49149
49150
49151
49152
49153
49154
49155
49156
49157
49158
49159
49160
49161
49162
49163
49164
49165
49166
49167
49168
49169
49170
49171
49172
49173
49174
49175
49176
49177
49178
49179
49180
49181
49182
49183
49184
49185
49186
49187
49188
49189
49190
49191
49192
49193
49194
49195
49196
49197
49198
49199
49200
49201
49202
49203
49204
49205
49206
49207
49208
49209
49210
49211
49212
49213
49214
49215
49216
49217
49218
49219
49220
49221
49222
49223
49224
49225
49226
49227
49228
49229
49230
49231
49232
49233
49234
49235
49236
49237
49238
49239
49240
49241
49242
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343
49344
49345
49346
49347
49348
49349
49350
49351
49352
49353
49354
49355
49356
49357
49358
49359
49360
49361
49362
49363
49364
49365
49366
49367
49368
49369
49370
49371
49372
49373
49374
49375
49376
49377
49378
49379
49380
49381
49382
49383
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444
49445
49446
49447
49448
49449
49450
49451
49452
49453
49454
49455
49456
49457
49458
49459
49460
49461
49462
49463
49464
49465
49466
49467
49468
49469
49470
49471
49472
49473
49474
49475
49476
49477
49478
49479
49480
49481
49482
49483
49484
49485
49486
49487
49488
49489
49490
49491
49492
49493
49494
49495
49496
49497
49498
49499
49500
49501
49502
49503
49504
49505
49506
49507
49508
49509
49510
49511
49512
49513
49514
49515
49516
49517
49518
49519
49520
49521
49522
49523
49524
49525
49526
49527
49528
49529
49530
49531
49532
49533
49534
49535
49536
49537
49538
49539
49540
49541
49542
49543
49544
49545
49546
49547
49548
49549
49550
49551
49552
49553
49554
49555
49556
49557
49558
49559
49560
49561
49562
49563
49564
49565
49566
49567
49568
49569
49570
49571
49572
49573
49574
49575
49576
49577
49578
49579
49580
49581
49582
49583
49584
49585
49586
49587
49588
49589
49590
49591
49592
49593
49594
49595
49596
49597
49598
49599
49600
49601
49602
49603
49604
49605
49606
49607
49608
49609
49610
49611
49612
49613
49614
49615
49616
49617
49618
49619
49620
49621
49622
49623
49624
49625
49626
49627
49628
49629
49630
49631
49632
49633
49634
49635
49636
49637
49638
49639
49640
49641
49642
49643
49644
49645
49646
49647
49648
49649
49650
49651
49652
49653
49654
49655
49656
49657
49658
49659
49660
49661
49662
49663
49664
49665
49666
49667
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697
49698
49699
49700
49701
49702
49703
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744
49745
49746
49747
49748
49749
49750
49751
49752
49753
49754
49755
49756
49757
49758
49759
49760
49761
49762
49763
49764
49765
49766
49767
49768
49769
49770
49771
49772
49773
49774
49775
49776
49777
49778
49779
49780
49781
49782
49783
49784
49785
49786
49787
49788
49789
49790
49791
49792
49793
49794
49795
49796
49797
49798
49799
49800
49801
49802
49803
49804
49805
49806
49807
49808
49809
49810
49811
49812
49813
49814
49815
49816
49817
49818
49819
49820
49821
49822
49823
49824
49825
49826
49827
49828
49829
49830
49831
49832
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914
49915
49916
49917
49918
49919
49920
49921
49922
49923
49924
49925
49926
49927
49928
49929
49930
49931
49932
49933
49934
49935
49936
49937
49938
49939
49940
49941
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959
49960
49961
49962
49963
49964
49965
49966
49967
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981
49982
49983
49984
49985
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002
50003
50004
50005
50006
50007
50008
50009
50010
50011
50012
50013
50014
50015
50016
50017
50018
50019
50020
50021
50022
50023
50024
50025
50026
50027
50028
50029
50030
50031
50032
50033
50034
50035
50036
50037
50038
50039
50040
50041
50042
50043
50044
50045
50046
50047
50048
50049
50050
50051
50052
50053
50054
50055
50056
50057
50058
50059
50060
50061
50062
50063
50064
50065
50066
50067
50068
50069
50070
50071
50072
50073
50074
50075
50076
50077
50078
50079
50080
50081
50082
50083
50084
50085
50086
50087
50088
50089
50090
50091
50092
50093
50094
50095
50096
50097
50098
50099
50100
50101
50102
50103
50104
50105
50106
50107
50108
50109
50110
50111
50112
50113
50114
50115
50116
50117
50118
50119
50120
50121
50122
50123
50124
50125
50126
50127
50128
50129
50130
50131
50132
50133
50134
50135
50136
50137
50138
50139
50140
50141
50142
50143
50144
50145
50146
50147
50148
50149
50150
50151
50152
50153
50154
50155
50156
50157
50158
50159
50160
50161
50162
50163
50164
50165
50166
50167
50168
50169
50170
50171
50172
50173
50174
50175

##############################################################################
#
# Copyright (c) 2003-2018 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Development until 2012 by Earth Systems Science Computational Center (ESSCC)
# Development 2012-2013 by School of Earth Sciences
# Development from 2014 by Centre for Geoscience Computing (GeoComp)
#
##############################################################################

from __future__ import print_function, division

__copyright__="""Copyright (c) 2003-2018 by The University of Queensland
http://www.uq.edu.au
Primary Business: Queensland, Australia"""
__license__="""Licensed under the Apache License, version 2.0
http://www.apache.org/licenses/LICENSE-2.0"""
__url__="https://launchpad.net/escript-finley"

"""
Tests for interpolation on domains in the unit square/cube.

This file was auto-generated.
"""

import esys.escriptcore.utestselect as unittest
from esys.escript import *
import numpy

class Test_Util_Interpolation_noContact(unittest.TestCase):
    RES_TOL=1.e-8

    def test_interpolateC_onFunction_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.189625580297+0.361216087009j)*x[0]**o + ((-0.0476116922474+0.00391800873429j))*x[0] + ((0.98236241877-0.564222937815j))*x[1]**o + ((-0.229349253987-0.664506784588j))*x[1]
        ref=(-0.189625580297+0.361216087009j)*x_ref[0]**o + ((-0.0476116922474+0.00391800873429j))*x_ref[0] + ((0.98236241877-0.564222937815j))*x_ref[1]**o + ((-0.229349253987-0.664506784588j))*x_ref[1]
        if dim==3:
            arg+=((0.599750966654+0.291585131321j))*x[2]**o + ((-0.141763811987-0.816643592976j))*x[2]
            ref+=((0.599750966654+0.291585131321j))*x_ref[2]**o + ((-0.141763811987-0.816643592976j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=(-0.0618446671571-0.726938407432j)*x[0]**o + ((-0.33515760696+0.683097756922j))*x[0] + ((-0.816137994377-0.165179129953j))*x[1]**o + ((-0.932695349229+0.739187942617j))*x[1]
        ref[(0,)]=(-0.0618446671571-0.726938407432j)*x_ref[0]**o + ((-0.33515760696+0.683097756922j))*x_ref[0] + ((-0.816137994377-0.165179129953j))*x_ref[1]**o + ((-0.932695349229+0.739187942617j))*x_ref[1]
        arg[(1,)]=(-0.626967113316-0.796260518314j)*x[0]**o + ((-0.361325667473-0.138264110069j))*x[0] + ((-0.686581069921-0.691962361366j))*x[1]**o + ((-0.957546781819-0.0583443186696j))*x[1]
        ref[(1,)]=(-0.626967113316-0.796260518314j)*x_ref[0]**o + ((-0.361325667473-0.138264110069j))*x_ref[0] + ((-0.686581069921-0.691962361366j))*x_ref[1]**o + ((-0.957546781819-0.0583443186696j))*x_ref[1]
        arg[(2,)]=(0.72648702661-0.365322864969j)*x[0]**o + ((-0.808311225431+0.84045028031j))*x[0] + ((-0.792638592797-0.0639931408925j))*x[1]**o + ((0.954608036457+0.428003995906j))*x[1]
        ref[(2,)]=(0.72648702661-0.365322864969j)*x_ref[0]**o + ((-0.808311225431+0.84045028031j))*x_ref[0] + ((-0.792638592797-0.0639931408925j))*x_ref[1]**o + ((0.954608036457+0.428003995906j))*x_ref[1]
        arg[(3,)]=(0.450634382495-0.112738627314j)*x[0]**o + ((-0.751020647342+0.835887227921j))*x[0] + ((0.926026179724-0.0816511354564j))*x[1]**o + ((-0.155289135548+0.580502757913j))*x[1]
        ref[(3,)]=(0.450634382495-0.112738627314j)*x_ref[0]**o + ((-0.751020647342+0.835887227921j))*x_ref[0] + ((0.926026179724-0.0816511354564j))*x_ref[1]**o + ((-0.155289135548+0.580502757913j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.5325842815+0.401729375286j)*x[2]**o + ((0.0695760042965+0.328054853217j))*x[2]
            ref[(0,)]+=(0.5325842815+0.401729375286j)*x_ref[2]**o + ((0.0695760042965+0.328054853217j))*x_ref[2]
            arg[(1,)]+=(0.0210769773964+0.171108736948j)*x[2]**o + ((0.804228848131-0.303415361013j))*x[2]
            ref[(1,)]+=(0.0210769773964+0.171108736948j)*x_ref[2]**o + ((0.804228848131-0.303415361013j))*x_ref[2]
            arg[(2,)]+=(-0.367863986265+0.184793333699j)*x[2]**o + ((-0.740074861936+0.884197369108j))*x[2]
            ref[(2,)]+=(-0.367863986265+0.184793333699j)*x_ref[2]**o + ((-0.740074861936+0.884197369108j))*x_ref[2]
            arg[(3,)]+=(-0.657740759963+0.220178241986j)*x[2]**o + ((0.42402121892-0.852186509109j))*x[2]
            ref[(3,)]+=(-0.657740759963+0.220178241986j)*x_ref[2]**o + ((0.42402121892-0.852186509109j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref = Data(0,(2, 2),w_ref)
        arg[(0, 0)]=(-0.146866327912+0.313945712066j)*x[0]**o + ((-0.091058870998+0.156598930641j))*x[0] + ((-0.901225760031+0.302870487894j))*x[1]**o + ((-0.638016015001+0.127264707382j))*x[1]
        ref[(0, 0)]=(-0.146866327912+0.313945712066j)*x_ref[0]**o + ((-0.091058870998+0.156598930641j))*x_ref[0] + ((-0.901225760031+0.302870487894j))*x_ref[1]**o + ((-0.638016015001+0.127264707382j))*x_ref[1]
        arg[(0, 1)]=(-0.0435161877487+0.395136573305j)*x[0]**o + ((-0.97715793528+0.699195069328j))*x[0] + ((-0.0867635363436+0.354582345518j))*x[1]**o + ((-0.784568287346+0.515338987561j))*x[1]
        ref[(0, 1)]=(-0.0435161877487+0.395136573305j)*x_ref[0]**o + ((-0.97715793528+0.699195069328j))*x_ref[0] + ((-0.0867635363436+0.354582345518j))*x_ref[1]**o + ((-0.784568287346+0.515338987561j))*x_ref[1]
        arg[(1, 0)]=(-0.99365140645+0.183220895466j)*x[0]**o + ((-0.704722154302-0.737681298478j))*x[0] + ((0.982536994159+0.679722531672j))*x[1]**o + ((0.0836317897012-0.465373954323j))*x[1]
        ref[(1, 0)]=(-0.99365140645+0.183220895466j)*x_ref[0]**o + ((-0.704722154302-0.737681298478j))*x_ref[0] + ((0.982536994159+0.679722531672j))*x_ref[1]**o + ((0.0836317897012-0.465373954323j))*x_ref[1]
        arg[(1, 1)]=(0.0851002140156+0.814499635895j)*x[0]**o + ((-0.86564423205-0.429782764197j))*x[0] + ((-0.75212684569+0.226008321543j))*x[1]**o + ((-0.0858565684374-0.836862400829j))*x[1]
        ref[(1, 1)]=(0.0851002140156+0.814499635895j)*x_ref[0]**o + ((-0.86564423205-0.429782764197j))*x_ref[0] + ((-0.75212684569+0.226008321543j))*x_ref[1]**o + ((-0.0858565684374-0.836862400829j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(-0.405391250101+0.871177811717j)*x[2]**o + ((0.691286183226+0.0796615245385j))*x[2]
            ref[(0, 0)]+=(-0.405391250101+0.871177811717j)*x_ref[2]**o + ((0.691286183226+0.0796615245385j))*x_ref[2]
            arg[(0, 1)]+=(0.691222916568+0.707502072861j)*x[2]**o + ((0.890111189906-0.380861433169j))*x[2]
            ref[(0, 1)]+=(0.691222916568+0.707502072861j)*x_ref[2]**o + ((0.890111189906-0.380861433169j))*x_ref[2]
            arg[(1, 0)]+=(-0.369590578817+0.168582101947j)*x[2]**o + ((0.153582779597-0.929439609675j))*x[2]
            ref[(1, 0)]+=(-0.369590578817+0.168582101947j)*x_ref[2]**o + ((0.153582779597-0.929439609675j))*x_ref[2]
            arg[(1, 1)]+=(-0.597407189272+0.16376498267j)*x[2]**o + ((-0.827690080237-0.737197927469j))*x[2]
            ref[(1, 1)]+=(-0.597407189272+0.16376498267j)*x_ref[2]**o + ((-0.827690080237-0.737197927469j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 4),w)
        ref = Data(0,(4, 2, 4),w_ref)
        arg[(0, 0, 0)]=(-0.356245851858+0.136902609671j)*x[0]**o + ((-0.695978256864-0.392429330318j))*x[0] + ((0.899656038024+0.976485455467j))*x[1]**o + ((-0.372000857991+0.0763618033716j))*x[1]
        ref[(0, 0, 0)]=(-0.356245851858+0.136902609671j)*x_ref[0]**o + ((-0.695978256864-0.392429330318j))*x_ref[0] + ((0.899656038024+0.976485455467j))*x_ref[1]**o + ((-0.372000857991+0.0763618033716j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.143193549733+0.862804094316j)*x[0]**o + ((0.822022159598-0.427599265361j))*x[0] + ((0.642306232533+0.939720812231j))*x[1]**o + ((-0.695962173702-0.317830381106j))*x[1]
        ref[(0, 0, 1)]=(-0.143193549733+0.862804094316j)*x_ref[0]**o + ((0.822022159598-0.427599265361j))*x_ref[0] + ((0.642306232533+0.939720812231j))*x_ref[1]**o + ((-0.695962173702-0.317830381106j))*x_ref[1]
        arg[(0, 0, 2)]=(0.428752467167-0.0500302658491j)*x[0]**o + ((-0.806462208802+0.707029633225j))*x[0] + ((0.312027970374+0.472767557077j))*x[1]**o + ((0.942326621211-0.774407683228j))*x[1]
        ref[(0, 0, 2)]=(0.428752467167-0.0500302658491j)*x_ref[0]**o + ((-0.806462208802+0.707029633225j))*x_ref[0] + ((0.312027970374+0.472767557077j))*x_ref[1]**o + ((0.942326621211-0.774407683228j))*x_ref[1]
        arg[(0, 0, 3)]=(-0.301669467553+0.154001822272j)*x[0]**o + ((0.641018554239+0.6729837662j))*x[0] + ((-0.0771780013081+0.824999143233j))*x[1]**o + ((0.0420634017229-0.106252127035j))*x[1]
        ref[(0, 0, 3)]=(-0.301669467553+0.154001822272j)*x_ref[0]**o + ((0.641018554239+0.6729837662j))*x_ref[0] + ((-0.0771780013081+0.824999143233j))*x_ref[1]**o + ((0.0420634017229-0.106252127035j))*x_ref[1]
        arg[(0, 1, 0)]=(0.72752559449+0.0295024756512j)*x[0]**o + ((-0.448259317096+0.942552075176j))*x[0] + ((-0.684151539336+0.898251232472j))*x[1]**o + ((0.551596015245-0.24652392455j))*x[1]
        ref[(0, 1, 0)]=(0.72752559449+0.0295024756512j)*x_ref[0]**o + ((-0.448259317096+0.942552075176j))*x_ref[0] + ((-0.684151539336+0.898251232472j))*x_ref[1]**o + ((0.551596015245-0.24652392455j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.682456140271-0.800858308271j)*x[0]**o + ((0.0128434868894-0.617545407453j))*x[0] + ((0.65909150227-0.868708698141j))*x[1]**o + ((0.0572287472569-0.269432625082j))*x[1]
        ref[(0, 1, 1)]=(-0.682456140271-0.800858308271j)*x_ref[0]**o + ((0.0128434868894-0.617545407453j))*x_ref[0] + ((0.65909150227-0.868708698141j))*x_ref[1]**o + ((0.0572287472569-0.269432625082j))*x_ref[1]
        arg[(0, 1, 2)]=(0.408162421306+0.220938739503j)*x[0]**o + ((-0.732011977779-0.996086427354j))*x[0] + ((-0.575404056574+0.43201674029j))*x[1]**o + ((0.765675421855-0.296512759574j))*x[1]
        ref[(0, 1, 2)]=(0.408162421306+0.220938739503j)*x_ref[0]**o + ((-0.732011977779-0.996086427354j))*x_ref[0] + ((-0.575404056574+0.43201674029j))*x_ref[1]**o + ((0.765675421855-0.296512759574j))*x_ref[1]
        arg[(0, 1, 3)]=(0.527860881193-0.483894210364j)*x[0]**o + ((0.202497904465-0.257404282256j))*x[0] + ((-0.355139264527-0.974107693632j))*x[1]**o + ((-0.796062156813-0.636338218532j))*x[1]
        ref[(0, 1, 3)]=(0.527860881193-0.483894210364j)*x_ref[0]**o + ((0.202497904465-0.257404282256j))*x_ref[0] + ((-0.355139264527-0.974107693632j))*x_ref[1]**o + ((-0.796062156813-0.636338218532j))*x_ref[1]
        arg[(1, 0, 0)]=(0.691555894021+0.123021807158j)*x[0]**o + ((0.541038753818+0.389888130705j))*x[0] + ((0.422730537402+0.867595145633j))*x[1]**o + ((0.718766169201+0.380520548823j))*x[1]
        ref[(1, 0, 0)]=(0.691555894021+0.123021807158j)*x_ref[0]**o + ((0.541038753818+0.389888130705j))*x_ref[0] + ((0.422730537402+0.867595145633j))*x_ref[1]**o + ((0.718766169201+0.380520548823j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.277987974071-0.484273866838j)*x[0]**o + ((0.395810783266+0.502255387873j))*x[0] + ((0.972789807445-0.783557988924j))*x[1]**o + ((0.648573848772-0.265248263469j))*x[1]
        ref[(1, 0, 1)]=(-0.277987974071-0.484273866838j)*x_ref[0]**o + ((0.395810783266+0.502255387873j))*x_ref[0] + ((0.972789807445-0.783557988924j))*x_ref[1]**o + ((0.648573848772-0.265248263469j))*x_ref[1]
        arg[(1, 0, 2)]=(-0.336301033171-0.379136384682j)*x[0]**o + ((-0.585808617287-0.295202655894j))*x[0] + ((-0.710491962237-0.0715530695281j))*x[1]**o + ((-0.926257401833+0.677671778398j))*x[1]
        ref[(1, 0, 2)]=(-0.336301033171-0.379136384682j)*x_ref[0]**o + ((-0.585808617287-0.295202655894j))*x_ref[0] + ((-0.710491962237-0.0715530695281j))*x_ref[1]**o + ((-0.926257401833+0.677671778398j))*x_ref[1]
        arg[(1, 0, 3)]=(0.850868841162-0.580605618866j)*x[0]**o + ((0.965847210589+0.793471584633j))*x[0] + ((-0.920393993137+0.351752363316j))*x[1]**o + ((-0.0409905406465+0.286097865489j))*x[1]
        ref[(1, 0, 3)]=(0.850868841162-0.580605618866j)*x_ref[0]**o + ((0.965847210589+0.793471584633j))*x_ref[0] + ((-0.920393993137+0.351752363316j))*x_ref[1]**o + ((-0.0409905406465+0.286097865489j))*x_ref[1]
        arg[(1, 1, 0)]=(0.730899406586-0.681874594525j)*x[0]**o + ((-0.297831013113+0.35285774602j))*x[0] + ((0.729635005211-0.124114567274j))*x[1]**o + ((0.125047432869+0.651208738202j))*x[1]
        ref[(1, 1, 0)]=(0.730899406586-0.681874594525j)*x_ref[0]**o + ((-0.297831013113+0.35285774602j))*x_ref[0] + ((0.729635005211-0.124114567274j))*x_ref[1]**o + ((0.125047432869+0.651208738202j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.50055107582-0.3132897016j)*x[0]**o + ((-0.0401470141443-0.789393520521j))*x[0] + ((-0.856191513333+0.63562625875j))*x[1]**o + ((-0.820629352774-0.190745515318j))*x[1]
        ref[(1, 1, 1)]=(-0.50055107582-0.3132897016j)*x_ref[0]**o + ((-0.0401470141443-0.789393520521j))*x_ref[0] + ((-0.856191513333+0.63562625875j))*x_ref[1]**o + ((-0.820629352774-0.190745515318j))*x_ref[1]
        arg[(1, 1, 2)]=(0.271416809213+0.550169460589j)*x[0]**o + ((0.465287208304+0.830585554201j))*x[0] + ((0.296535968019-0.761053252499j))*x[1]**o + ((0.430624373827-0.0133528340901j))*x[1]
        ref[(1, 1, 2)]=(0.271416809213+0.550169460589j)*x_ref[0]**o + ((0.465287208304+0.830585554201j))*x_ref[0] + ((0.296535968019-0.761053252499j))*x_ref[1]**o + ((0.430624373827-0.0133528340901j))*x_ref[1]
        arg[(1, 1, 3)]=(-0.415939766757-0.144938683887j)*x[0]**o + ((-0.16815155821-0.549474648277j))*x[0] + ((0.191845525852-0.93329972791j))*x[1]**o + ((0.359315185031-0.573379260849j))*x[1]
        ref[(1, 1, 3)]=(-0.415939766757-0.144938683887j)*x_ref[0]**o + ((-0.16815155821-0.549474648277j))*x_ref[0] + ((0.191845525852-0.93329972791j))*x_ref[1]**o + ((0.359315185031-0.573379260849j))*x_ref[1]
        arg[(2, 0, 0)]=(0.417250675377-0.536476091711j)*x[0]**o + ((-0.755156602987-0.32417234387j))*x[0] + ((0.413973942323-0.266278194437j))*x[1]**o + ((-0.779980766874-0.659124334983j))*x[1]
        ref[(2, 0, 0)]=(0.417250675377-0.536476091711j)*x_ref[0]**o + ((-0.755156602987-0.32417234387j))*x_ref[0] + ((0.413973942323-0.266278194437j))*x_ref[1]**o + ((-0.779980766874-0.659124334983j))*x_ref[1]
        arg[(2, 0, 1)]=(-0.72203776903+0.408227383373j)*x[0]**o + ((-0.707814918811-0.240375766288j))*x[0] + ((-0.282733408103+0.0427443611231j))*x[1]**o + ((-0.388118170856+0.252348137222j))*x[1]
        ref[(2, 0, 1)]=(-0.72203776903+0.408227383373j)*x_ref[0]**o + ((-0.707814918811-0.240375766288j))*x_ref[0] + ((-0.282733408103+0.0427443611231j))*x_ref[1]**o + ((-0.388118170856+0.252348137222j))*x_ref[1]
        arg[(2, 0, 2)]=(-0.193287465553+0.405278809953j)*x[0]**o + ((-0.882984282394-0.816233940792j))*x[0] + ((0.905708640302+0.86904455945j))*x[1]**o + ((-0.897291622625-0.714664654723j))*x[1]
        ref[(2, 0, 2)]=(-0.193287465553+0.405278809953j)*x_ref[0]**o + ((-0.882984282394-0.816233940792j))*x_ref[0] + ((0.905708640302+0.86904455945j))*x_ref[1]**o + ((-0.897291622625-0.714664654723j))*x_ref[1]
        arg[(2, 0, 3)]=(0.957858374174+0.389824837754j)*x[0]**o + ((0.242785933625-0.0252989644947j))*x[0] + ((0.31977777439+0.538862947234j))*x[1]**o + ((0.946032274234+0.810999548915j))*x[1]
        ref[(2, 0, 3)]=(0.957858374174+0.389824837754j)*x_ref[0]**o + ((0.242785933625-0.0252989644947j))*x_ref[0] + ((0.31977777439+0.538862947234j))*x_ref[1]**o + ((0.946032274234+0.810999548915j))*x_ref[1]
        arg[(2, 1, 0)]=(-0.429976110798-0.572191161042j)*x[0]**o + ((0.489584401724-0.649071694922j))*x[0] + ((0.574255152421+0.0166446113426j))*x[1]**o + ((-0.0814263805689-0.161359682045j))*x[1]
        ref[(2, 1, 0)]=(-0.429976110798-0.572191161042j)*x_ref[0]**o + ((0.489584401724-0.649071694922j))*x_ref[0] + ((0.574255152421+0.0166446113426j))*x_ref[1]**o + ((-0.0814263805689-0.161359682045j))*x_ref[1]
        arg[(2, 1, 1)]=(-0.982898818281-0.854825047241j)*x[0]**o + ((0.951033881993-0.966662924321j))*x[0] + ((-0.606142266183-0.243784350306j))*x[1]**o + ((-0.973845270734-0.37301796735j))*x[1]
        ref[(2, 1, 1)]=(-0.982898818281-0.854825047241j)*x_ref[0]**o + ((0.951033881993-0.966662924321j))*x_ref[0] + ((-0.606142266183-0.243784350306j))*x_ref[1]**o + ((-0.973845270734-0.37301796735j))*x_ref[1]
        arg[(2, 1, 2)]=(-0.0231190535953-0.536419540809j)*x[0]**o + ((0.644955346821+0.569339932436j))*x[0] + ((0.509783151209-0.384623120759j))*x[1]**o + ((0.420119484196+0.0110721910033j))*x[1]
        ref[(2, 1, 2)]=(-0.0231190535953-0.536419540809j)*x_ref[0]**o + ((0.644955346821+0.569339932436j))*x_ref[0] + ((0.509783151209-0.384623120759j))*x_ref[1]**o + ((0.420119484196+0.0110721910033j))*x_ref[1]
        arg[(2, 1, 3)]=(0.248649217589-0.932635999558j)*x[0]**o + ((-0.436959244535+0.784919762159j))*x[0] + ((0.688528759372-0.564962395493j))*x[1]**o + ((-0.0527171258177-0.162698751114j))*x[1]
        ref[(2, 1, 3)]=(0.248649217589-0.932635999558j)*x_ref[0]**o + ((-0.436959244535+0.784919762159j))*x_ref[0] + ((0.688528759372-0.564962395493j))*x_ref[1]**o + ((-0.0527171258177-0.162698751114j))*x_ref[1]
        arg[(3, 0, 0)]=(0.893675341844+0.325161852564j)*x[0]**o + ((0.338143953765+0.0966013375988j))*x[0] + ((-0.312241770923+0.667687842007j))*x[1]**o + ((-0.462479743428+0.986589423929j))*x[1]
        ref[(3, 0, 0)]=(0.893675341844+0.325161852564j)*x_ref[0]**o + ((0.338143953765+0.0966013375988j))*x_ref[0] + ((-0.312241770923+0.667687842007j))*x_ref[1]**o + ((-0.462479743428+0.986589423929j))*x_ref[1]
        arg[(3, 0, 1)]=(0.53710911915+0.544078928707j)*x[0]**o + ((0.222732430627+0.361780506396j))*x[0] + ((-0.176096186969-0.575174940456j))*x[1]**o + ((0.723502384009+0.380698414678j))*x[1]
        ref[(3, 0, 1)]=(0.53710911915+0.544078928707j)*x_ref[0]**o + ((0.222732430627+0.361780506396j))*x_ref[0] + ((-0.176096186969-0.575174940456j))*x_ref[1]**o + ((0.723502384009+0.380698414678j))*x_ref[1]
        arg[(3, 0, 2)]=(0.808537661056+0.158683181014j)*x[0]**o + ((-0.239876935469-0.0649393658006j))*x[0] + ((-0.603669208657-0.0959793148167j))*x[1]**o + ((0.418924724545-0.368636933909j))*x[1]
        ref[(3, 0, 2)]=(0.808537661056+0.158683181014j)*x_ref[0]**o + ((-0.239876935469-0.0649393658006j))*x_ref[0] + ((-0.603669208657-0.0959793148167j))*x_ref[1]**o + ((0.418924724545-0.368636933909j))*x_ref[1]
        arg[(3, 0, 3)]=(-0.000486194723323-0.695544300801j)*x[0]**o + ((-0.0905661036466-0.686603624296j))*x[0] + ((-0.468071017566+0.518956888717j))*x[1]**o + ((-0.456781600632+0.506218524472j))*x[1]
        ref[(3, 0, 3)]=(-0.000486194723323-0.695544300801j)*x_ref[0]**o + ((-0.0905661036466-0.686603624296j))*x_ref[0] + ((-0.468071017566+0.518956888717j))*x_ref[1]**o + ((-0.456781600632+0.506218524472j))*x_ref[1]
        arg[(3, 1, 0)]=(-0.658802334925+0.849162870711j)*x[0]**o + ((0.799056098579+0.400030808999j))*x[0] + ((0.136581443842+0.462612153223j))*x[1]**o + ((-0.820213453718-0.39376942722j))*x[1]
        ref[(3, 1, 0)]=(-0.658802334925+0.849162870711j)*x_ref[0]**o + ((0.799056098579+0.400030808999j))*x_ref[0] + ((0.136581443842+0.462612153223j))*x_ref[1]**o + ((-0.820213453718-0.39376942722j))*x_ref[1]
        arg[(3, 1, 1)]=(0.872084305416+0.591539000792j)*x[0]**o + ((-0.0815085503048+0.356850146417j))*x[0] + ((-0.0785594225142+0.877092610643j))*x[1]**o + ((-0.755354153363+0.693517633706j))*x[1]
        ref[(3, 1, 1)]=(0.872084305416+0.591539000792j)*x_ref[0]**o + ((-0.0815085503048+0.356850146417j))*x_ref[0] + ((-0.0785594225142+0.877092610643j))*x_ref[1]**o + ((-0.755354153363+0.693517633706j))*x_ref[1]
        arg[(3, 1, 2)]=(0.123504494013-0.747186500211j)*x[0]**o + ((0.136435592334-0.522483238565j))*x[0] + ((-0.812901442877+0.712361200993j))*x[1]**o + ((0.230410704059-0.461515038916j))*x[1]
        ref[(3, 1, 2)]=(0.123504494013-0.747186500211j)*x_ref[0]**o + ((0.136435592334-0.522483238565j))*x_ref[0] + ((-0.812901442877+0.712361200993j))*x_ref[1]**o + ((0.230410704059-0.461515038916j))*x_ref[1]
        arg[(3, 1, 3)]=(-0.0523659359198-0.821255250153j)*x[0]**o + ((0.277815911649+0.569993359225j))*x[0] + ((0.775861008416-0.61098679754j))*x[1]**o + ((0.283021386965-0.606476804516j))*x[1]
        ref[(3, 1, 3)]=(-0.0523659359198-0.821255250153j)*x_ref[0]**o + ((0.277815911649+0.569993359225j))*x_ref[0] + ((0.775861008416-0.61098679754j))*x_ref[1]**o + ((0.283021386965-0.606476804516j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.625145040135-0.44312825466j)*x[2]**o + ((-0.736132149101-0.240511449337j))*x[2]
            ref[(0, 0, 0)]+=(-0.625145040135-0.44312825466j)*x_ref[2]**o + ((-0.736132149101-0.240511449337j))*x_ref[2]
            arg[(0, 0, 1)]+=(0.494951833979+0.629192308364j)*x[2]**o + ((0.730334152158-0.82596679165j))*x[2]
            ref[(0, 0, 1)]+=(0.494951833979+0.629192308364j)*x_ref[2]**o + ((0.730334152158-0.82596679165j))*x_ref[2]
            arg[(0, 0, 2)]+=(-0.158767129762-0.765624171447j)*x[2]**o + ((-0.815958919468+0.529122863448j))*x[2]
            ref[(0, 0, 2)]+=(-0.158767129762-0.765624171447j)*x_ref[2]**o + ((-0.815958919468+0.529122863448j))*x_ref[2]
            arg[(0, 0, 3)]+=(-0.469791628308-0.337154846388j)*x[2]**o + ((-0.965721928006+0.310529989768j))*x[2]
            ref[(0, 0, 3)]+=(-0.469791628308-0.337154846388j)*x_ref[2]**o + ((-0.965721928006+0.310529989768j))*x_ref[2]
            arg[(0, 1, 0)]+=(-0.0736346341166+0.544138990209j)*x[2]**o + ((0.095273786179+0.740366736734j))*x[2]
            ref[(0, 1, 0)]+=(-0.0736346341166+0.544138990209j)*x_ref[2]**o + ((0.095273786179+0.740366736734j))*x_ref[2]
            arg[(0, 1, 1)]+=(0.451084117885+0.450956612471j)*x[2]**o + ((0.163434712359-0.156487717798j))*x[2]
            ref[(0, 1, 1)]+=(0.451084117885+0.450956612471j)*x_ref[2]**o + ((0.163434712359-0.156487717798j))*x_ref[2]
            arg[(0, 1, 2)]+=(0.304771717952+0.221620390829j)*x[2]**o + ((0.488659789929-0.230518662473j))*x[2]
            ref[(0, 1, 2)]+=(0.304771717952+0.221620390829j)*x_ref[2]**o + ((0.488659789929-0.230518662473j))*x_ref[2]
            arg[(0, 1, 3)]+=(-0.528909329679+0.271871076555j)*x[2]**o + ((0.234032707295+0.659980256863j))*x[2]
            ref[(0, 1, 3)]+=(-0.528909329679+0.271871076555j)*x_ref[2]**o + ((0.234032707295+0.659980256863j))*x_ref[2]
            arg[(1, 0, 0)]+=(-0.220639026223+0.0311900862058j)*x[2]**o + ((-0.441924303608+0.875931873237j))*x[2]
            ref[(1, 0, 0)]+=(-0.220639026223+0.0311900862058j)*x_ref[2]**o + ((-0.441924303608+0.875931873237j))*x_ref[2]
            arg[(1, 0, 1)]+=(-0.358724855379-0.637057554658j)*x[2]**o + ((-0.78475256462+0.949929171663j))*x[2]
            ref[(1, 0, 1)]+=(-0.358724855379-0.637057554658j)*x_ref[2]**o + ((-0.78475256462+0.949929171663j))*x_ref[2]
            arg[(1, 0, 2)]+=(0.565904372819+0.704679432955j)*x[2]**o + ((-0.458392306139+0.72964405793j))*x[2]
            ref[(1, 0, 2)]+=(0.565904372819+0.704679432955j)*x_ref[2]**o + ((-0.458392306139+0.72964405793j))*x_ref[2]
            arg[(1, 0, 3)]+=(0.143706580149-0.858500580248j)*x[2]**o + ((-0.135949602683-0.824812901942j))*x[2]
            ref[(1, 0, 3)]+=(0.143706580149-0.858500580248j)*x_ref[2]**o + ((-0.135949602683-0.824812901942j))*x_ref[2]
            arg[(1, 1, 0)]+=(0.312162763863+0.0546571116061j)*x[2]**o + ((0.0935365476569-0.292524697047j))*x[2]
            ref[(1, 1, 0)]+=(0.312162763863+0.0546571116061j)*x_ref[2]**o + ((0.0935365476569-0.292524697047j))*x_ref[2]
            arg[(1, 1, 1)]+=(0.176257962579-0.800402207679j)*x[2]**o + ((0.0318200968511-0.591982729239j))*x[2]
            ref[(1, 1, 1)]+=(0.176257962579-0.800402207679j)*x_ref[2]**o + ((0.0318200968511-0.591982729239j))*x_ref[2]
            arg[(1, 1, 2)]+=(-0.272286493724-0.43853575527j)*x[2]**o + ((-0.867244914368-0.249432268267j))*x[2]
            ref[(1, 1, 2)]+=(-0.272286493724-0.43853575527j)*x_ref[2]**o + ((-0.867244914368-0.249432268267j))*x_ref[2]
            arg[(1, 1, 3)]+=(-0.403421216027+0.515692776908j)*x[2]**o + ((-0.575258466528+0.92697690415j))*x[2]
            ref[(1, 1, 3)]+=(-0.403421216027+0.515692776908j)*x_ref[2]**o + ((-0.575258466528+0.92697690415j))*x_ref[2]
            arg[(2, 0, 0)]+=(0.00560935110148-0.648140037588j)*x[2]**o + ((0.454473455946-0.855093919501j))*x[2]
            ref[(2, 0, 0)]+=(0.00560935110148-0.648140037588j)*x_ref[2]**o + ((0.454473455946-0.855093919501j))*x_ref[2]
            arg[(2, 0, 1)]+=(0.991825799504+0.972058164919j)*x[2]**o + ((0.157736350978-0.463460924479j))*x[2]
            ref[(2, 0, 1)]+=(0.991825799504+0.972058164919j)*x_ref[2]**o + ((0.157736350978-0.463460924479j))*x_ref[2]
            arg[(2, 0, 2)]+=(0.382241935531-0.643160609874j)*x[2]**o + ((-0.209628603188+0.126494019659j))*x[2]
            ref[(2, 0, 2)]+=(0.382241935531-0.643160609874j)*x_ref[2]**o + ((-0.209628603188+0.126494019659j))*x_ref[2]
            arg[(2, 0, 3)]+=(0.246565779774-0.783297370118j)*x[2]**o + ((-0.297551799207+0.161615055904j))*x[2]
            ref[(2, 0, 3)]+=(0.246565779774-0.783297370118j)*x_ref[2]**o + ((-0.297551799207+0.161615055904j))*x_ref[2]
            arg[(2, 1, 0)]+=(-0.0546919094336-0.141684719379j)*x[2]**o + ((-0.845996137078-0.538194955448j))*x[2]
            ref[(2, 1, 0)]+=(-0.0546919094336-0.141684719379j)*x_ref[2]**o + ((-0.845996137078-0.538194955448j))*x_ref[2]
            arg[(2, 1, 1)]+=(0.695844880496+0.871251793739j)*x[2]**o + ((0.268574465013-0.933733090412j))*x[2]
            ref[(2, 1, 1)]+=(0.695844880496+0.871251793739j)*x_ref[2]**o + ((0.268574465013-0.933733090412j))*x_ref[2]
            arg[(2, 1, 2)]+=(-0.197846305669-0.395117705101j)*x[2]**o + ((-0.299164764691+0.63485157644j))*x[2]
            ref[(2, 1, 2)]+=(-0.197846305669-0.395117705101j)*x_ref[2]**o + ((-0.299164764691+0.63485157644j))*x_ref[2]
            arg[(2, 1, 3)]+=(-0.814489194322+0.95513149791j)*x[2]**o + ((-0.0267355497747+0.637087538471j))*x[2]
            ref[(2, 1, 3)]+=(-0.814489194322+0.95513149791j)*x_ref[2]**o + ((-0.0267355497747+0.637087538471j))*x_ref[2]
            arg[(3, 0, 0)]+=(-0.385376972885+0.375930436093j)*x[2]**o + ((-0.523848627658+0.557609290311j))*x[2]
            ref[(3, 0, 0)]+=(-0.385376972885+0.375930436093j)*x_ref[2]**o + ((-0.523848627658+0.557609290311j))*x_ref[2]
            arg[(3, 0, 1)]+=(-0.958037615264-0.976863997605j)*x[2]**o + ((0.292745069001-0.321045723284j))*x[2]
            ref[(3, 0, 1)]+=(-0.958037615264-0.976863997605j)*x_ref[2]**o + ((0.292745069001-0.321045723284j))*x_ref[2]
            arg[(3, 0, 2)]+=(-0.744904228289+0.6221780442j)*x[2]**o + ((0.304545181902+0.273333166667j))*x[2]
            ref[(3, 0, 2)]+=(-0.744904228289+0.6221780442j)*x_ref[2]**o + ((0.304545181902+0.273333166667j))*x_ref[2]
            arg[(3, 0, 3)]+=(0.320985007603-0.328758618303j)*x[2]**o + ((0.291427853671-0.306435066353j))*x[2]
            ref[(3, 0, 3)]+=(0.320985007603-0.328758618303j)*x_ref[2]**o + ((0.291427853671-0.306435066353j))*x_ref[2]
            arg[(3, 1, 0)]+=(0.540192513873+0.0561342929962j)*x[2]**o + ((0.0704361833313-0.20292093524j))*x[2]
            ref[(3, 1, 0)]+=(0.540192513873+0.0561342929962j)*x_ref[2]**o + ((0.0704361833313-0.20292093524j))*x_ref[2]
            arg[(3, 1, 1)]+=(-0.637571234274+0.289911795347j)*x[2]**o + ((0.146381368233-0.954590949695j))*x[2]
            ref[(3, 1, 1)]+=(-0.637571234274+0.289911795347j)*x_ref[2]**o + ((0.146381368233-0.954590949695j))*x_ref[2]
            arg[(3, 1, 2)]+=(-0.362681248718+0.948439692186j)*x[2]**o + ((0.598375416358-0.644351012055j))*x[2]
            ref[(3, 1, 2)]+=(-0.362681248718+0.948439692186j)*x_ref[2]**o + ((0.598375416358-0.644351012055j))*x_ref[2]
            arg[(3, 1, 3)]+=(0.423629803506-0.612233105228j)*x[2]**o + ((-0.340619569016+0.89080475264j))*x[2]
            ref[(3, 1, 3)]+=(0.423629803506-0.612233105228j)*x_ref[2]**o + ((-0.340619569016+0.89080475264j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 2, 2),w)
        ref = Data(0,(3, 4, 2, 2),w_ref)
        arg[(0, 0, 0, 0)]=(0.400910094117-0.755603590897j)*x[0]**o + ((-0.749748964106+0.380424167862j))*x[0] + ((-0.856468672854+0.269761796621j))*x[1]**o + ((0.314116293166-0.0609172595618j))*x[1]
        ref[(0, 0, 0, 0)]=(0.400910094117-0.755603590897j)*x_ref[0]**o + ((-0.749748964106+0.380424167862j))*x_ref[0] + ((-0.856468672854+0.269761796621j))*x_ref[1]**o + ((0.314116293166-0.0609172595618j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(0.221969775416+0.652596260602j)*x[0]**o + ((-0.817189511455+0.28214149764j))*x[0] + ((-0.963321809549+0.0604550413082j))*x[1]**o + ((0.724007315464+0.532852524764j))*x[1]
        ref[(0, 0, 0, 1)]=(0.221969775416+0.652596260602j)*x_ref[0]**o + ((-0.817189511455+0.28214149764j))*x_ref[0] + ((-0.963321809549+0.0604550413082j))*x_ref[1]**o + ((0.724007315464+0.532852524764j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.728410848882+0.290360105147j)*x[0]**o + ((-0.739722633666+0.591418583118j))*x[0] + ((0.923155135199-0.455688815128j))*x[1]**o + ((-0.60650836073+0.0621925394518j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.728410848882+0.290360105147j)*x_ref[0]**o + ((-0.739722633666+0.591418583118j))*x_ref[0] + ((0.923155135199-0.455688815128j))*x_ref[1]**o + ((-0.60650836073+0.0621925394518j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.588291314788+0.787743018167j)*x[0]**o + ((-0.141626681622+0.640451593018j))*x[0] + ((-0.779128277872-0.185982257745j))*x[1]**o + ((0.289056266058+0.523039824368j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.588291314788+0.787743018167j)*x_ref[0]**o + ((-0.141626681622+0.640451593018j))*x_ref[0] + ((-0.779128277872-0.185982257745j))*x_ref[1]**o + ((0.289056266058+0.523039824368j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.804186889572+0.0863727034434j)*x[0]**o + ((0.741954277485+0.900401491778j))*x[0] + ((-0.125532610348+0.605459908741j))*x[1]**o + ((-0.386196078583+0.89729734019j))*x[1]
        ref[(0, 1, 0, 0)]=(0.804186889572+0.0863727034434j)*x_ref[0]**o + ((0.741954277485+0.900401491778j))*x_ref[0] + ((-0.125532610348+0.605459908741j))*x_ref[1]**o + ((-0.386196078583+0.89729734019j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.449199917072-0.1802601559j)*x[0]**o + ((-0.0682638278312+0.509543955211j))*x[0] + ((-0.499566399435+0.880125708668j))*x[1]**o + ((0.732987820758-0.465614121226j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.449199917072-0.1802601559j)*x_ref[0]**o + ((-0.0682638278312+0.509543955211j))*x_ref[0] + ((-0.499566399435+0.880125708668j))*x_ref[1]**o + ((0.732987820758-0.465614121226j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.833183980494+0.275102196499j)*x[0]**o + ((-0.309324140387+0.173583031647j))*x[0] + ((-0.1345022837-0.0368535295875j))*x[1]**o + ((0.0416211019992-0.844066342366j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.833183980494+0.275102196499j)*x_ref[0]**o + ((-0.309324140387+0.173583031647j))*x_ref[0] + ((-0.1345022837-0.0368535295875j))*x_ref[1]**o + ((0.0416211019992-0.844066342366j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.822412428623-0.776770548243j)*x[0]**o + ((0.273718525272-0.215586028686j))*x[0] + ((-0.462728270189+0.132881079021j))*x[1]**o + ((0.248126931923-0.077120745774j))*x[1]
        ref[(0, 1, 1, 1)]=(0.822412428623-0.776770548243j)*x_ref[0]**o + ((0.273718525272-0.215586028686j))*x_ref[0] + ((-0.462728270189+0.132881079021j))*x_ref[1]**o + ((0.248126931923-0.077120745774j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(-0.559445128559+0.665975108244j)*x[0]**o + ((0.888523076484-0.775409222369j))*x[0] + ((-0.0689742233539-0.167959530386j))*x[1]**o + ((-0.790281763117+0.429626589238j))*x[1]
        ref[(0, 2, 0, 0)]=(-0.559445128559+0.665975108244j)*x_ref[0]**o + ((0.888523076484-0.775409222369j))*x_ref[0] + ((-0.0689742233539-0.167959530386j))*x_ref[1]**o + ((-0.790281763117+0.429626589238j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(0.699329796832-0.48266106024j)*x[0]**o + ((-0.532830287761+0.785013013824j))*x[0] + ((-0.995889560252-0.643241009778j))*x[1]**o + ((0.197829170041+0.882637297547j))*x[1]
        ref[(0, 2, 0, 1)]=(0.699329796832-0.48266106024j)*x_ref[0]**o + ((-0.532830287761+0.785013013824j))*x_ref[0] + ((-0.995889560252-0.643241009778j))*x_ref[1]**o + ((0.197829170041+0.882637297547j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.447831484988-0.249091401695j)*x[0]**o + ((-0.153146346418-0.406861198016j))*x[0] + ((-0.247520418847-0.535695083613j))*x[1]**o + ((0.709754920098-0.276577440644j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.447831484988-0.249091401695j)*x_ref[0]**o + ((-0.153146346418-0.406861198016j))*x_ref[0] + ((-0.247520418847-0.535695083613j))*x_ref[1]**o + ((0.709754920098-0.276577440644j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(-0.956272411697+0.0635268191803j)*x[0]**o + ((0.726547814057+0.942618169094j))*x[0] + ((0.170981031276-0.751969338546j))*x[1]**o + ((-0.781289031835+0.316151023402j))*x[1]
        ref[(0, 2, 1, 1)]=(-0.956272411697+0.0635268191803j)*x_ref[0]**o + ((0.726547814057+0.942618169094j))*x_ref[0] + ((0.170981031276-0.751969338546j))*x_ref[1]**o + ((-0.781289031835+0.316151023402j))*x_ref[1]
        arg[(0, 3, 0, 0)]=(0.342548312763+0.885005665756j)*x[0]**o + ((0.719249185996+0.120593565903j))*x[0] + ((-0.997147485825+0.197625890995j))*x[1]**o + ((-0.391415811862-0.687006549588j))*x[1]
        ref[(0, 3, 0, 0)]=(0.342548312763+0.885005665756j)*x_ref[0]**o + ((0.719249185996+0.120593565903j))*x_ref[0] + ((-0.997147485825+0.197625890995j))*x_ref[1]**o + ((-0.391415811862-0.687006549588j))*x_ref[1]
        arg[(0, 3, 0, 1)]=(-0.305418059964+0.253077589715j)*x[0]**o + ((-0.474690638456-0.779154037276j))*x[0] + ((0.368175887859-0.822764939084j))*x[1]**o + ((0.043465416009-0.739377165323j))*x[1]
        ref[(0, 3, 0, 1)]=(-0.305418059964+0.253077589715j)*x_ref[0]**o + ((-0.474690638456-0.779154037276j))*x_ref[0] + ((0.368175887859-0.822764939084j))*x_ref[1]**o + ((0.043465416009-0.739377165323j))*x_ref[1]
        arg[(0, 3, 1, 0)]=(0.17618516497+0.969764906706j)*x[0]**o + ((0.0919577289718+0.202331685338j))*x[0] + ((-0.71624960517-0.467281027924j))*x[1]**o + ((0.454587945692+0.923607563261j))*x[1]
        ref[(0, 3, 1, 0)]=(0.17618516497+0.969764906706j)*x_ref[0]**o + ((0.0919577289718+0.202331685338j))*x_ref[0] + ((-0.71624960517-0.467281027924j))*x_ref[1]**o + ((0.454587945692+0.923607563261j))*x_ref[1]
        arg[(0, 3, 1, 1)]=(-0.704304862528+0.226173036172j)*x[0]**o + ((0.902737483067-0.385959636828j))*x[0] + ((0.21871842659+0.371250023918j))*x[1]**o + ((-0.71764414333-0.44542981289j))*x[1]
        ref[(0, 3, 1, 1)]=(-0.704304862528+0.226173036172j)*x_ref[0]**o + ((0.902737483067-0.385959636828j))*x_ref[0] + ((0.21871842659+0.371250023918j))*x_ref[1]**o + ((-0.71764414333-0.44542981289j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.0877547650439-0.341365014575j)*x[0]**o + ((-0.803203709368-0.96447344994j))*x[0] + ((-0.896579365233-0.0728865512422j))*x[1]**o + ((0.87027257873-0.632193642513j))*x[1]
        ref[(1, 0, 0, 0)]=(0.0877547650439-0.341365014575j)*x_ref[0]**o + ((-0.803203709368-0.96447344994j))*x_ref[0] + ((-0.896579365233-0.0728865512422j))*x_ref[1]**o + ((0.87027257873-0.632193642513j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.103183345515+0.716002196958j)*x[0]**o + ((0.290850531792+0.112548000347j))*x[0] + ((-0.723954445749+0.00214307459462j))*x[1]**o + ((0.887368455277+0.555404176589j))*x[1]
        ref[(1, 0, 0, 1)]=(0.103183345515+0.716002196958j)*x_ref[0]**o + ((0.290850531792+0.112548000347j))*x_ref[0] + ((-0.723954445749+0.00214307459462j))*x_ref[1]**o + ((0.887368455277+0.555404176589j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.77492666812+0.405999401901j)*x[0]**o + ((0.218662604932-0.891234458884j))*x[0] + ((-0.6394894636-0.838468113905j))*x[1]**o + ((0.920576810662-0.351716420228j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.77492666812+0.405999401901j)*x_ref[0]**o + ((0.218662604932-0.891234458884j))*x_ref[0] + ((-0.6394894636-0.838468113905j))*x_ref[1]**o + ((0.920576810662-0.351716420228j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.848723231104-0.269754441071j)*x[0]**o + ((0.576311541195+0.451487410665j))*x[0] + ((-0.882648312829-0.154607537394j))*x[1]**o + ((0.312308869053+0.0275948675954j))*x[1]
        ref[(1, 0, 1, 1)]=(0.848723231104-0.269754441071j)*x_ref[0]**o + ((0.576311541195+0.451487410665j))*x_ref[0] + ((-0.882648312829-0.154607537394j))*x_ref[1]**o + ((0.312308869053+0.0275948675954j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.303455969237-0.930929254087j)*x[0]**o + ((-0.0850282772184+0.328535116887j))*x[0] + ((0.0904672487414+0.853814529892j))*x[1]**o + ((0.221367060727+0.644390613059j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.303455969237-0.930929254087j)*x_ref[0]**o + ((-0.0850282772184+0.328535116887j))*x_ref[0] + ((0.0904672487414+0.853814529892j))*x_ref[1]**o + ((0.221367060727+0.644390613059j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.740261834432+0.725828305568j)*x[0]**o + ((0.814632227496-0.727037270726j))*x[0] + ((0.270431026762+0.582176681323j))*x[1]**o + ((-0.947035077221+0.765913140778j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.740261834432+0.725828305568j)*x_ref[0]**o + ((0.814632227496-0.727037270726j))*x_ref[0] + ((0.270431026762+0.582176681323j))*x_ref[1]**o + ((-0.947035077221+0.765913140778j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.851981716793-0.217674760951j)*x[0]**o + ((-0.348765225271-0.673210902943j))*x[0] + ((0.864819861085-0.150696566437j))*x[1]**o + ((0.702276706931-0.431454810992j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.851981716793-0.217674760951j)*x_ref[0]**o + ((-0.348765225271-0.673210902943j))*x_ref[0] + ((0.864819861085-0.150696566437j))*x_ref[1]**o + ((0.702276706931-0.431454810992j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.77170947879-0.920808469895j)*x[0]**o + ((0.26268951482+0.815519407881j))*x[0] + ((0.603778142348-0.9370808498j))*x[1]**o + ((0.863297876064-0.464874519376j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.77170947879-0.920808469895j)*x_ref[0]**o + ((0.26268951482+0.815519407881j))*x_ref[0] + ((0.603778142348-0.9370808498j))*x_ref[1]**o + ((0.863297876064-0.464874519376j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(0.563130853193+0.22486163049j)*x[0]**o + ((-0.800491163004-0.355556915398j))*x[0] + ((0.418426801033-0.0245133279868j))*x[1]**o + ((0.114098442858-0.848242711065j))*x[1]
        ref[(1, 2, 0, 0)]=(0.563130853193+0.22486163049j)*x_ref[0]**o + ((-0.800491163004-0.355556915398j))*x_ref[0] + ((0.418426801033-0.0245133279868j))*x_ref[1]**o + ((0.114098442858-0.848242711065j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(0.312943147169-0.967276593722j)*x[0]**o + ((0.344395730475-0.832076562454j))*x[0] + ((-0.828605169277-0.0925613232536j))*x[1]**o + ((-0.464287808955+0.190330033908j))*x[1]
        ref[(1, 2, 0, 1)]=(0.312943147169-0.967276593722j)*x_ref[0]**o + ((0.344395730475-0.832076562454j))*x_ref[0] + ((-0.828605169277-0.0925613232536j))*x_ref[1]**o + ((-0.464287808955+0.190330033908j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(0.743701785782+0.667339547477j)*x[0]**o + ((-0.924826177095-0.99640149724j))*x[0] + ((0.210266636436+0.270305670366j))*x[1]**o + ((-0.835036427691-0.0281267595902j))*x[1]
        ref[(1, 2, 1, 0)]=(0.743701785782+0.667339547477j)*x_ref[0]**o + ((-0.924826177095-0.99640149724j))*x_ref[0] + ((0.210266636436+0.270305670366j))*x_ref[1]**o + ((-0.835036427691-0.0281267595902j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.965832136838+0.0426760024322j)*x[0]**o + ((-0.775971195026+0.87773447516j))*x[0] + ((0.482217874552+0.0579732695875j))*x[1]**o + ((-0.830451006681+0.194918600841j))*x[1]
        ref[(1, 2, 1, 1)]=(0.965832136838+0.0426760024322j)*x_ref[0]**o + ((-0.775971195026+0.87773447516j))*x_ref[0] + ((0.482217874552+0.0579732695875j))*x_ref[1]**o + ((-0.830451006681+0.194918600841j))*x_ref[1]
        arg[(1, 3, 0, 0)]=(0.616660957287+0.804002417251j)*x[0]**o + ((-0.054416182167-0.239664107582j))*x[0] + ((-0.752069351341+0.585655316016j))*x[1]**o + ((-0.395437864192-0.153527752667j))*x[1]
        ref[(1, 3, 0, 0)]=(0.616660957287+0.804002417251j)*x_ref[0]**o + ((-0.054416182167-0.239664107582j))*x_ref[0] + ((-0.752069351341+0.585655316016j))*x_ref[1]**o + ((-0.395437864192-0.153527752667j))*x_ref[1]
        arg[(1, 3, 0, 1)]=(-0.381185611834-0.178329397887j)*x[0]**o + ((-0.316299612023-0.354621675856j))*x[0] + ((-0.769633262048+0.339207879546j))*x[1]**o + ((-0.613620481024+0.0600544482648j))*x[1]
        ref[(1, 3, 0, 1)]=(-0.381185611834-0.178329397887j)*x_ref[0]**o + ((-0.316299612023-0.354621675856j))*x_ref[0] + ((-0.769633262048+0.339207879546j))*x_ref[1]**o + ((-0.613620481024+0.0600544482648j))*x_ref[1]
        arg[(1, 3, 1, 0)]=(-0.91724889886-0.569766366149j)*x[0]**o + ((-0.11158013131+0.775977181746j))*x[0] + ((0.518357501912+0.507932066287j))*x[1]**o + ((-0.454836974951-0.777732633891j))*x[1]
        ref[(1, 3, 1, 0)]=(-0.91724889886-0.569766366149j)*x_ref[0]**o + ((-0.11158013131+0.775977181746j))*x_ref[0] + ((0.518357501912+0.507932066287j))*x_ref[1]**o + ((-0.454836974951-0.777732633891j))*x_ref[1]
        arg[(1, 3, 1, 1)]=(0.502798779481+0.171215618801j)*x[0]**o + ((-0.473705820209+0.983198399768j))*x[0] + ((0.259923965882+0.907606387454j))*x[1]**o + ((-0.843213674522+0.970645034409j))*x[1]
        ref[(1, 3, 1, 1)]=(0.502798779481+0.171215618801j)*x_ref[0]**o + ((-0.473705820209+0.983198399768j))*x_ref[0] + ((0.259923965882+0.907606387454j))*x_ref[1]**o + ((-0.843213674522+0.970645034409j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.0881031287571+0.0324514816002j)*x[0]**o + ((0.111677260287+0.690320349934j))*x[0] + ((0.202182112529-0.452955966698j))*x[1]**o + ((-0.372841043276+0.570148676542j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.0881031287571+0.0324514816002j)*x_ref[0]**o + ((0.111677260287+0.690320349934j))*x_ref[0] + ((0.202182112529-0.452955966698j))*x_ref[1]**o + ((-0.372841043276+0.570148676542j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(-0.341113755832-0.301057312304j)*x[0]**o + ((0.976486052435-0.798151779111j))*x[0] + ((0.75568032243+0.0719534486252j))*x[1]**o + ((0.470436333183+0.207411712733j))*x[1]
        ref[(2, 0, 0, 1)]=(-0.341113755832-0.301057312304j)*x_ref[0]**o + ((0.976486052435-0.798151779111j))*x_ref[0] + ((0.75568032243+0.0719534486252j))*x_ref[1]**o + ((0.470436333183+0.207411712733j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(-0.214189101513-0.735317928324j)*x[0]**o + ((-0.936463215522-0.227136828502j))*x[0] + ((0.398241616442-0.382362820583j))*x[1]**o + ((-0.950881505718-0.487667022374j))*x[1]
        ref[(2, 0, 1, 0)]=(-0.214189101513-0.735317928324j)*x_ref[0]**o + ((-0.936463215522-0.227136828502j))*x_ref[0] + ((0.398241616442-0.382362820583j))*x_ref[1]**o + ((-0.950881505718-0.487667022374j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(-0.595798467226+0.636682092829j)*x[0]**o + ((-0.862642022036-0.863799215432j))*x[0] + ((-0.891944937204+0.666732524077j))*x[1]**o + ((-0.541149035657-0.651974942853j))*x[1]
        ref[(2, 0, 1, 1)]=(-0.595798467226+0.636682092829j)*x_ref[0]**o + ((-0.862642022036-0.863799215432j))*x_ref[0] + ((-0.891944937204+0.666732524077j))*x_ref[1]**o + ((-0.541149035657-0.651974942853j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(-0.943632619479-0.352278650494j)*x[0]**o + ((0.620749799559+0.474742882493j))*x[0] + ((0.067613261406-0.32057277295j))*x[1]**o + ((-0.345666269127-0.141703777911j))*x[1]
        ref[(2, 1, 0, 0)]=(-0.943632619479-0.352278650494j)*x_ref[0]**o + ((0.620749799559+0.474742882493j))*x_ref[0] + ((0.067613261406-0.32057277295j))*x_ref[1]**o + ((-0.345666269127-0.141703777911j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.0766423627876+0.117813396331j)*x[0]**o + ((-0.665437187661-0.784831124174j))*x[0] + ((-0.0988999936258+0.476681271146j))*x[1]**o + ((0.182018349721-0.493380662226j))*x[1]
        ref[(2, 1, 0, 1)]=(0.0766423627876+0.117813396331j)*x_ref[0]**o + ((-0.665437187661-0.784831124174j))*x_ref[0] + ((-0.0988999936258+0.476681271146j))*x_ref[1]**o + ((0.182018349721-0.493380662226j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(-0.181937863019-0.100556129066j)*x[0]**o + ((0.697003962218-0.537513477782j))*x[0] + ((-0.0243813011192+0.384229482362j))*x[1]**o + ((-0.960967002404+0.537503449508j))*x[1]
        ref[(2, 1, 1, 0)]=(-0.181937863019-0.100556129066j)*x_ref[0]**o + ((0.697003962218-0.537513477782j))*x_ref[0] + ((-0.0243813011192+0.384229482362j))*x_ref[1]**o + ((-0.960967002404+0.537503449508j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(-0.851729159997-0.263906699509j)*x[0]**o + ((-0.573109839211-0.54193742468j))*x[0] + ((-0.0476760505953-0.879832217906j))*x[1]**o + ((0.693544417222-0.424319522653j))*x[1]
        ref[(2, 1, 1, 1)]=(-0.851729159997-0.263906699509j)*x_ref[0]**o + ((-0.573109839211-0.54193742468j))*x_ref[0] + ((-0.0476760505953-0.879832217906j))*x_ref[1]**o + ((0.693544417222-0.424319522653j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(-0.0813247444359+0.84156855759j)*x[0]**o + ((-0.659532288631+0.651009736481j))*x[0] + ((0.770217342712+0.81460437576j))*x[1]**o + ((0.61204734161-0.487676337145j))*x[1]
        ref[(2, 2, 0, 0)]=(-0.0813247444359+0.84156855759j)*x_ref[0]**o + ((-0.659532288631+0.651009736481j))*x_ref[0] + ((0.770217342712+0.81460437576j))*x_ref[1]**o + ((0.61204734161-0.487676337145j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(0.158463030009-0.396807599544j)*x[0]**o + ((0.751698745608-0.775977824853j))*x[0] + ((0.397095616916-0.26807693192j))*x[1]**o + ((-0.35440230517-0.123201908284j))*x[1]
        ref[(2, 2, 0, 1)]=(0.158463030009-0.396807599544j)*x_ref[0]**o + ((0.751698745608-0.775977824853j))*x_ref[0] + ((0.397095616916-0.26807693192j))*x_ref[1]**o + ((-0.35440230517-0.123201908284j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(0.863680723061-0.149366660257j)*x[0]**o + ((-0.367508453982+0.719956715554j))*x[0] + ((0.610656884647-0.0500431929376j))*x[1]**o + ((0.941667806408+0.118553902789j))*x[1]
        ref[(2, 2, 1, 0)]=(0.863680723061-0.149366660257j)*x_ref[0]**o + ((-0.367508453982+0.719956715554j))*x_ref[0] + ((0.610656884647-0.0500431929376j))*x_ref[1]**o + ((0.941667806408+0.118553902789j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(0.529915050458+0.567674844429j)*x[0]**o + ((0.0167152529425+0.319321046883j))*x[0] + ((-0.617076012511+0.814835581266j))*x[1]**o + ((-0.128518803428+0.380579797828j))*x[1]
        ref[(2, 2, 1, 1)]=(0.529915050458+0.567674844429j)*x_ref[0]**o + ((0.0167152529425+0.319321046883j))*x_ref[0] + ((-0.617076012511+0.814835581266j))*x_ref[1]**o + ((-0.128518803428+0.380579797828j))*x_ref[1]
        arg[(2, 3, 0, 0)]=(-0.537924329326+0.101669060412j)*x[0]**o + ((0.85821806028-0.0712615073724j))*x[0] + ((-0.705129079345-0.545836511093j))*x[1]**o + ((0.804662403256-0.652474820867j))*x[1]
        ref[(2, 3, 0, 0)]=(-0.537924329326+0.101669060412j)*x_ref[0]**o + ((0.85821806028-0.0712615073724j))*x_ref[0] + ((-0.705129079345-0.545836511093j))*x_ref[1]**o + ((0.804662403256-0.652474820867j))*x_ref[1]
        arg[(2, 3, 0, 1)]=(-0.668249460687+0.418328265016j)*x[0]**o + ((-0.305542789067+0.733590021787j))*x[0] + ((-0.694290941086-0.263412875645j))*x[1]**o + ((0.402056141846-0.656503149127j))*x[1]
        ref[(2, 3, 0, 1)]=(-0.668249460687+0.418328265016j)*x_ref[0]**o + ((-0.305542789067+0.733590021787j))*x_ref[0] + ((-0.694290941086-0.263412875645j))*x_ref[1]**o + ((0.402056141846-0.656503149127j))*x_ref[1]
        arg[(2, 3, 1, 0)]=(-0.974487968292+0.0239992724819j)*x[0]**o + ((-0.764910185614-0.914340458313j))*x[0] + ((0.733067083421+0.383633837011j))*x[1]**o + ((-0.589581499092+0.141145078502j))*x[1]
        ref[(2, 3, 1, 0)]=(-0.974487968292+0.0239992724819j)*x_ref[0]**o + ((-0.764910185614-0.914340458313j))*x_ref[0] + ((0.733067083421+0.383633837011j))*x_ref[1]**o + ((-0.589581499092+0.141145078502j))*x_ref[1]
        arg[(2, 3, 1, 1)]=(-0.777438178027+0.947300075489j)*x[0]**o + ((0.543424730224+0.586506215521j))*x[0] + ((-0.38745924502-0.740374894176j))*x[1]**o + ((-0.338184656756+0.592440390376j))*x[1]
        ref[(2, 3, 1, 1)]=(-0.777438178027+0.947300075489j)*x_ref[0]**o + ((0.543424730224+0.586506215521j))*x_ref[0] + ((-0.38745924502-0.740374894176j))*x_ref[1]**o + ((-0.338184656756+0.592440390376j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.766458978221-0.515191360758j)*x[2]**o + ((0.967149083187+0.976218303979j))*x[2]
            ref[(0, 0, 0, 0)]+=(-0.766458978221-0.515191360758j)*x_ref[2]**o + ((0.967149083187+0.976218303979j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.0804623459415-0.195795466929j)*x[2]**o + ((-0.384056075524-0.800376040037j))*x[2]
            ref[(0, 0, 0, 1)]+=(-0.0804623459415-0.195795466929j)*x_ref[2]**o + ((-0.384056075524-0.800376040037j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.56862854375+0.899029505724j)*x[2]**o + ((-0.887789327814+0.593079748093j))*x[2]
            ref[(0, 0, 1, 0)]+=(-0.56862854375+0.899029505724j)*x_ref[2]**o + ((-0.887789327814+0.593079748093j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.691044302058-0.273917896746j)*x[2]**o + ((-0.232150922178-0.580517199578j))*x[2]
            ref[(0, 0, 1, 1)]+=(-0.691044302058-0.273917896746j)*x_ref[2]**o + ((-0.232150922178-0.580517199578j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.681435076399+0.347018205131j)*x[2]**o + ((-0.280909387523+0.845738781432j))*x[2]
            ref[(0, 1, 0, 0)]+=(-0.681435076399+0.347018205131j)*x_ref[2]**o + ((-0.280909387523+0.845738781432j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.475420466317-0.712503125108j)*x[2]**o + ((-0.575784250225+0.672801524975j))*x[2]
            ref[(0, 1, 0, 1)]+=(-0.475420466317-0.712503125108j)*x_ref[2]**o + ((-0.575784250225+0.672801524975j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.665541569051+0.231588610233j)*x[2]**o + ((0.738475655477-0.549503591755j))*x[2]
            ref[(0, 1, 1, 0)]+=(-0.665541569051+0.231588610233j)*x_ref[2]**o + ((0.738475655477-0.549503591755j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.999974062004+0.214191668839j)*x[2]**o + ((0.0419350386982+0.883564485678j))*x[2]
            ref[(0, 1, 1, 1)]+=(-0.999974062004+0.214191668839j)*x_ref[2]**o + ((0.0419350386982+0.883564485678j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(-0.968196924139-0.605302502132j)*x[2]**o + ((0.272276513477-0.383019105004j))*x[2]
            ref[(0, 2, 0, 0)]+=(-0.968196924139-0.605302502132j)*x_ref[2]**o + ((0.272276513477-0.383019105004j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(-0.598053762737-0.441721767493j)*x[2]**o + ((0.0934363433702+0.865034069212j))*x[2]
            ref[(0, 2, 0, 1)]+=(-0.598053762737-0.441721767493j)*x_ref[2]**o + ((0.0934363433702+0.865034069212j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(0.261451895622+0.253813738553j)*x[2]**o + ((0.144120687739+0.958662939651j))*x[2]
            ref[(0, 2, 1, 0)]+=(0.261451895622+0.253813738553j)*x_ref[2]**o + ((0.144120687739+0.958662939651j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(0.797188011834+0.314727389877j)*x[2]**o + ((0.735564017676+0.438640612196j))*x[2]
            ref[(0, 2, 1, 1)]+=(0.797188011834+0.314727389877j)*x_ref[2]**o + ((0.735564017676+0.438640612196j))*x_ref[2]
            arg[(0, 3, 0, 0)]+=(-0.390896799582+0.866243684211j)*x[2]**o + ((0.49628756292+0.488025856722j))*x[2]
            ref[(0, 3, 0, 0)]+=(-0.390896799582+0.866243684211j)*x_ref[2]**o + ((0.49628756292+0.488025856722j))*x_ref[2]
            arg[(0, 3, 0, 1)]+=(-0.641066474048-0.709724194666j)*x[2]**o + ((0.274784581644+0.755004202019j))*x[2]
            ref[(0, 3, 0, 1)]+=(-0.641066474048-0.709724194666j)*x_ref[2]**o + ((0.274784581644+0.755004202019j))*x_ref[2]
            arg[(0, 3, 1, 0)]+=(0.188462320355+0.606492276553j)*x[2]**o + ((-0.658206456561-0.991897299399j))*x[2]
            ref[(0, 3, 1, 0)]+=(0.188462320355+0.606492276553j)*x_ref[2]**o + ((-0.658206456561-0.991897299399j))*x_ref[2]
            arg[(0, 3, 1, 1)]+=(0.26833562462+0.198202154303j)*x[2]**o + ((-0.67805549444-0.518078444115j))*x[2]
            ref[(0, 3, 1, 1)]+=(0.26833562462+0.198202154303j)*x_ref[2]**o + ((-0.67805549444-0.518078444115j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.258432290219-0.867161739418j)*x[2]**o + ((-0.608932417176+0.361320427272j))*x[2]
            ref[(1, 0, 0, 0)]+=(-0.258432290219-0.867161739418j)*x_ref[2]**o + ((-0.608932417176+0.361320427272j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(-0.411799223813-0.721551859463j)*x[2]**o + ((0.0499053889867+0.793946046881j))*x[2]
            ref[(1, 0, 0, 1)]+=(-0.411799223813-0.721551859463j)*x_ref[2]**o + ((0.0499053889867+0.793946046881j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.688362139979+0.97216528124j)*x[2]**o + ((-0.696027660406-0.855656320571j))*x[2]
            ref[(1, 0, 1, 0)]+=(-0.688362139979+0.97216528124j)*x_ref[2]**o + ((-0.696027660406-0.855656320571j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.417067173222+0.760264051822j)*x[2]**o + ((-0.354467049091+0.949811591269j))*x[2]
            ref[(1, 0, 1, 1)]+=(0.417067173222+0.760264051822j)*x_ref[2]**o + ((-0.354467049091+0.949811591269j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.502342293007-0.213021058335j)*x[2]**o + ((-0.38029330165+0.400891168344j))*x[2]
            ref[(1, 1, 0, 0)]+=(-0.502342293007-0.213021058335j)*x_ref[2]**o + ((-0.38029330165+0.400891168344j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.520491314061+0.767633981405j)*x[2]**o + ((-0.630210041521+0.731131623646j))*x[2]
            ref[(1, 1, 0, 1)]+=(0.520491314061+0.767633981405j)*x_ref[2]**o + ((-0.630210041521+0.731131623646j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.51228336945+0.986836404454j)*x[2]**o + ((-0.12609572466-0.495568642128j))*x[2]
            ref[(1, 1, 1, 0)]+=(0.51228336945+0.986836404454j)*x_ref[2]**o + ((-0.12609572466-0.495568642128j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.0562732941854+0.416656625744j)*x[2]**o + ((-0.0743926302896-0.598572576038j))*x[2]
            ref[(1, 1, 1, 1)]+=(0.0562732941854+0.416656625744j)*x_ref[2]**o + ((-0.0743926302896-0.598572576038j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.923121415335-0.941678304748j)*x[2]**o + ((0.610339535753-0.382122247858j))*x[2]
            ref[(1, 2, 0, 0)]+=(0.923121415335-0.941678304748j)*x_ref[2]**o + ((0.610339535753-0.382122247858j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(-0.777595961713+0.177009012919j)*x[2]**o + ((0.14769303247+0.476433314358j))*x[2]
            ref[(1, 2, 0, 1)]+=(-0.777595961713+0.177009012919j)*x_ref[2]**o + ((0.14769303247+0.476433314358j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(0.692594996996+0.261597623254j)*x[2]**o + ((-0.874367110935-0.321041048417j))*x[2]
            ref[(1, 2, 1, 0)]+=(0.692594996996+0.261597623254j)*x_ref[2]**o + ((-0.874367110935-0.321041048417j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(-0.986172541459+0.612777665447j)*x[2]**o + ((0.832197461125-0.492721803402j))*x[2]
            ref[(1, 2, 1, 1)]+=(-0.986172541459+0.612777665447j)*x_ref[2]**o + ((0.832197461125-0.492721803402j))*x_ref[2]
            arg[(1, 3, 0, 0)]+=(-0.0925069774129-0.176044848714j)*x[2]**o + ((0.710381963909-0.262837098271j))*x[2]
            ref[(1, 3, 0, 0)]+=(-0.0925069774129-0.176044848714j)*x_ref[2]**o + ((0.710381963909-0.262837098271j))*x_ref[2]
            arg[(1, 3, 0, 1)]+=(0.647781190364-0.631818906683j)*x[2]**o + ((0.573016391199-0.243345844178j))*x[2]
            ref[(1, 3, 0, 1)]+=(0.647781190364-0.631818906683j)*x_ref[2]**o + ((0.573016391199-0.243345844178j))*x_ref[2]
            arg[(1, 3, 1, 0)]+=(0.638512029931+0.833662742434j)*x[2]**o + ((0.797081752477-0.983231581424j))*x[2]
            ref[(1, 3, 1, 0)]+=(0.638512029931+0.833662742434j)*x_ref[2]**o + ((0.797081752477-0.983231581424j))*x_ref[2]
            arg[(1, 3, 1, 1)]+=(0.673714107177-0.875616873405j)*x[2]**o + ((-0.200042441671-0.852669286429j))*x[2]
            ref[(1, 3, 1, 1)]+=(0.673714107177-0.875616873405j)*x_ref[2]**o + ((-0.200042441671-0.852669286429j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(-0.273874811532+0.862892735801j)*x[2]**o + ((0.478328911502+0.79922586656j))*x[2]
            ref[(2, 0, 0, 0)]+=(-0.273874811532+0.862892735801j)*x_ref[2]**o + ((0.478328911502+0.79922586656j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(-0.452106732965-0.549680829468j)*x[2]**o + ((-0.596529211657-0.477324105658j))*x[2]
            ref[(2, 0, 0, 1)]+=(-0.452106732965-0.549680829468j)*x_ref[2]**o + ((-0.596529211657-0.477324105658j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(0.223492426246-0.188237171785j)*x[2]**o + ((-0.264880063369+0.970258285352j))*x[2]
            ref[(2, 0, 1, 0)]+=(0.223492426246-0.188237171785j)*x_ref[2]**o + ((-0.264880063369+0.970258285352j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(-0.856342086625+0.614893249266j)*x[2]**o + ((0.717337553225-0.417802705087j))*x[2]
            ref[(2, 0, 1, 1)]+=(-0.856342086625+0.614893249266j)*x_ref[2]**o + ((0.717337553225-0.417802705087j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(-0.179772922145-0.351263525952j)*x[2]**o + ((-0.480332804489+0.25145842277j))*x[2]
            ref[(2, 1, 0, 0)]+=(-0.179772922145-0.351263525952j)*x_ref[2]**o + ((-0.480332804489+0.25145842277j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(0.277579348071+0.998669102369j)*x[2]**o + ((0.727358339322+0.652026290907j))*x[2]
            ref[(2, 1, 0, 1)]+=(0.277579348071+0.998669102369j)*x_ref[2]**o + ((0.727358339322+0.652026290907j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(0.75976646788+0.330779854979j)*x[2]**o + ((0.798028729114-0.527452580019j))*x[2]
            ref[(2, 1, 1, 0)]+=(0.75976646788+0.330779854979j)*x_ref[2]**o + ((0.798028729114-0.527452580019j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(0.648892616468-0.390752960852j)*x[2]**o + ((-0.673395866481-0.32641878354j))*x[2]
            ref[(2, 1, 1, 1)]+=(0.648892616468-0.390752960852j)*x_ref[2]**o + ((-0.673395866481-0.32641878354j))*x_ref[2]
            arg[(2, 2, 0, 0)]+=(0.0154516276186-0.712173065813j)*x[2]**o + ((0.629187497971+0.899107680254j))*x[2]
            ref[(2, 2, 0, 0)]+=(0.0154516276186-0.712173065813j)*x_ref[2]**o + ((0.629187497971+0.899107680254j))*x_ref[2]
            arg[(2, 2, 0, 1)]+=(-0.0945687684822+0.0887775495187j)*x[2]**o + ((-0.778553934333-0.469910176759j))*x[2]
            ref[(2, 2, 0, 1)]+=(-0.0945687684822+0.0887775495187j)*x_ref[2]**o + ((-0.778553934333-0.469910176759j))*x_ref[2]
            arg[(2, 2, 1, 0)]+=(0.980940048215-0.458388077173j)*x[2]**o + ((0.654782015653+0.0362461990281j))*x[2]
            ref[(2, 2, 1, 0)]+=(0.980940048215-0.458388077173j)*x_ref[2]**o + ((0.654782015653+0.0362461990281j))*x_ref[2]
            arg[(2, 2, 1, 1)]+=(-0.0655889309834-0.792401682413j)*x[2]**o + ((-0.0102761900182+0.182008893989j))*x[2]
            ref[(2, 2, 1, 1)]+=(-0.0655889309834-0.792401682413j)*x_ref[2]**o + ((-0.0102761900182+0.182008893989j))*x_ref[2]
            arg[(2, 3, 0, 0)]+=(0.68601435142+0.129055876411j)*x[2]**o + ((0.73288910109-0.730220116085j))*x[2]
            ref[(2, 3, 0, 0)]+=(0.68601435142+0.129055876411j)*x_ref[2]**o + ((0.73288910109-0.730220116085j))*x_ref[2]
            arg[(2, 3, 0, 1)]+=(-0.134087597711-0.59034357238j)*x[2]**o + ((0.268530959326+0.0279936596314j))*x[2]
            ref[(2, 3, 0, 1)]+=(-0.134087597711-0.59034357238j)*x_ref[2]**o + ((0.268530959326+0.0279936596314j))*x_ref[2]
            arg[(2, 3, 1, 0)]+=(0.997718058883+0.880452708227j)*x[2]**o + ((-0.0792984671025-0.547858741812j))*x[2]
            ref[(2, 3, 1, 0)]+=(0.997718058883+0.880452708227j)*x_ref[2]**o + ((-0.0792984671025-0.547858741812j))*x_ref[2]
            arg[(2, 3, 1, 1)]+=(0.476303118761-0.193075272107j)*x[2]**o + ((-0.0513861491508-0.0190309458388j))*x[2]
            ref[(2, 3, 1, 1)]+=(0.476303118761-0.193075272107j)*x_ref[2]**o + ((-0.0513861491508-0.0190309458388j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.52166128061-0.666122053521j)*x[0]**o + ((0.817622647431-0.152787756076j))*x[0] + ((-0.653077225262+0.0540888071949j))*x[1]**o + ((0.0869028851631+0.418520306248j))*x[1]
        ref=(-0.52166128061-0.666122053521j)*x_ref[0]**o + ((0.817622647431-0.152787756076j))*x_ref[0] + ((-0.653077225262+0.0540888071949j))*x_ref[1]**o + ((0.0869028851631+0.418520306248j))*x_ref[1]
        if dim==3:
            arg+=((0.0771122192234+0.85112062096j))*x[2]**o + ((-0.370850112416-0.306069931246j))*x[2]
            ref+=((0.0771122192234+0.85112062096j))*x_ref[2]**o + ((-0.370850112416-0.306069931246j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=(-0.944282507355-0.81767027796j)*x[0]**o + ((-0.04435023564-0.739402982165j))*x[0] + ((-0.574805380087+0.205993031107j))*x[1]**o + ((-0.887366335216+0.660905898346j))*x[1]
        ref[(0,)]=(-0.944282507355-0.81767027796j)*x_ref[0]**o + ((-0.04435023564-0.739402982165j))*x_ref[0] + ((-0.574805380087+0.205993031107j))*x_ref[1]**o + ((-0.887366335216+0.660905898346j))*x_ref[1]
        arg[(1,)]=(-0.629603087692-0.426559394146j)*x[0]**o + ((0.489345817778-0.00575642866589j))*x[0] + ((0.629647034727+0.651351916557j))*x[1]**o + ((0.934642318839-0.312642249161j))*x[1]
        ref[(1,)]=(-0.629603087692-0.426559394146j)*x_ref[0]**o + ((0.489345817778-0.00575642866589j))*x_ref[0] + ((0.629647034727+0.651351916557j))*x_ref[1]**o + ((0.934642318839-0.312642249161j))*x_ref[1]
        arg[(2,)]=(-0.49407717905-0.0191205941227j)*x[0]**o + ((-0.44317083379+0.5934872624j))*x[0] + ((-0.476929769407-0.763129426009j))*x[1]**o + ((-0.988623525301-0.50335083816j))*x[1]
        ref[(2,)]=(-0.49407717905-0.0191205941227j)*x_ref[0]**o + ((-0.44317083379+0.5934872624j))*x_ref[0] + ((-0.476929769407-0.763129426009j))*x_ref[1]**o + ((-0.988623525301-0.50335083816j))*x_ref[1]
        arg[(3,)]=(-0.852025031196+0.957232689728j)*x[0]**o + ((-0.0994079224085-0.490966928913j))*x[0] + ((-0.880205049883+0.467660557545j))*x[1]**o + ((0.881838369203-0.565811746767j))*x[1]
        ref[(3,)]=(-0.852025031196+0.957232689728j)*x_ref[0]**o + ((-0.0994079224085-0.490966928913j))*x_ref[0] + ((-0.880205049883+0.467660557545j))*x_ref[1]**o + ((0.881838369203-0.565811746767j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.00835125220226-0.32310389024j)*x[2]**o + ((-0.0930098865533-0.181111334013j))*x[2]
            ref[(0,)]+=(-0.00835125220226-0.32310389024j)*x_ref[2]**o + ((-0.0930098865533-0.181111334013j))*x_ref[2]
            arg[(1,)]+=(0.347887461613-0.58371187594j)*x[2]**o + ((0.088035751189-0.0799547887745j))*x[2]
            ref[(1,)]+=(0.347887461613-0.58371187594j)*x_ref[2]**o + ((0.088035751189-0.0799547887745j))*x_ref[2]
            arg[(2,)]+=(0.487097106268-0.397891044027j)*x[2]**o + ((-0.472638752013-0.607096887206j))*x[2]
            ref[(2,)]+=(0.487097106268-0.397891044027j)*x_ref[2]**o + ((-0.472638752013-0.607096887206j))*x_ref[2]
            arg[(3,)]+=(-0.496743615048+0.676813728188j)*x[2]**o + ((0.377556230489+0.782923550638j))*x[2]
            ref[(3,)]+=(-0.496743615048+0.676813728188j)*x_ref[2]**o + ((0.377556230489+0.782923550638j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref = Data(0,(4, 3),w_ref)
        arg[(0, 0)]=(0.633658336971+0.696809306275j)*x[0]**o + ((0.534402413397+0.0357457835443j))*x[0] + ((0.768565580483-0.79991635855j))*x[1]**o + ((-0.822824769061-0.909651096227j))*x[1]
        ref[(0, 0)]=(0.633658336971+0.696809306275j)*x_ref[0]**o + ((0.534402413397+0.0357457835443j))*x_ref[0] + ((0.768565580483-0.79991635855j))*x_ref[1]**o + ((-0.822824769061-0.909651096227j))*x_ref[1]
        arg[(0, 1)]=(-0.737150893479-0.12821068086j)*x[0]**o + ((0.63340536188-0.379004247728j))*x[0] + ((-0.633574975416-0.343559815188j))*x[1]**o + ((-0.770705061152+0.851306055831j))*x[1]
        ref[(0, 1)]=(-0.737150893479-0.12821068086j)*x_ref[0]**o + ((0.63340536188-0.379004247728j))*x_ref[0] + ((-0.633574975416-0.343559815188j))*x_ref[1]**o + ((-0.770705061152+0.851306055831j))*x_ref[1]
        arg[(0, 2)]=(-0.233884560663+0.62442476977j)*x[0]**o + ((0.893070844807+0.828986178303j))*x[0] + ((-0.0602890351747-0.666989104194j))*x[1]**o + ((-0.696352529357+0.778163751838j))*x[1]
        ref[(0, 2)]=(-0.233884560663+0.62442476977j)*x_ref[0]**o + ((0.893070844807+0.828986178303j))*x_ref[0] + ((-0.0602890351747-0.666989104194j))*x_ref[1]**o + ((-0.696352529357+0.778163751838j))*x_ref[1]
        arg[(1, 0)]=(-0.440002493684-0.733564105325j)*x[0]**o + ((-0.317746496044+0.0209352950303j))*x[0] + ((-0.547266633267-0.435646036782j))*x[1]**o + ((-0.900426947127+0.747598574018j))*x[1]
        ref[(1, 0)]=(-0.440002493684-0.733564105325j)*x_ref[0]**o + ((-0.317746496044+0.0209352950303j))*x_ref[0] + ((-0.547266633267-0.435646036782j))*x_ref[1]**o + ((-0.900426947127+0.747598574018j))*x_ref[1]
        arg[(1, 1)]=(-0.0262173212192-0.130854881933j)*x[0]**o + ((-0.446022676536+0.141292366837j))*x[0] + ((0.740041825782+0.866505047656j))*x[1]**o + ((-0.652497223058+0.905405995821j))*x[1]
        ref[(1, 1)]=(-0.0262173212192-0.130854881933j)*x_ref[0]**o + ((-0.446022676536+0.141292366837j))*x_ref[0] + ((0.740041825782+0.866505047656j))*x_ref[1]**o + ((-0.652497223058+0.905405995821j))*x_ref[1]
        arg[(1, 2)]=(-0.306135777172+0.898694675195j)*x[0]**o + ((0.603922789239+0.234767993986j))*x[0] + ((-0.228190495363+0.326514478599j))*x[1]**o + ((-0.594277500924-0.024805760005j))*x[1]
        ref[(1, 2)]=(-0.306135777172+0.898694675195j)*x_ref[0]**o + ((0.603922789239+0.234767993986j))*x_ref[0] + ((-0.228190495363+0.326514478599j))*x_ref[1]**o + ((-0.594277500924-0.024805760005j))*x_ref[1]
        arg[(2, 0)]=(-0.931493537089+0.644195519742j)*x[0]**o + ((-0.252659924647+0.737164575147j))*x[0] + ((0.139310319943+0.144608653594j))*x[1]**o + ((-0.791470354047+0.32806890625j))*x[1]
        ref[(2, 0)]=(-0.931493537089+0.644195519742j)*x_ref[0]**o + ((-0.252659924647+0.737164575147j))*x_ref[0] + ((0.139310319943+0.144608653594j))*x_ref[1]**o + ((-0.791470354047+0.32806890625j))*x_ref[1]
        arg[(2, 1)]=(-0.108636803109+0.0355332623298j)*x[0]**o + ((-0.681349439951-0.738568692799j))*x[0] + ((0.601767506897-0.247336304284j))*x[1]**o + ((-0.655278870613-0.0206477001071j))*x[1]
        ref[(2, 1)]=(-0.108636803109+0.0355332623298j)*x_ref[0]**o + ((-0.681349439951-0.738568692799j))*x_ref[0] + ((0.601767506897-0.247336304284j))*x_ref[1]**o + ((-0.655278870613-0.0206477001071j))*x_ref[1]
        arg[(2, 2)]=(0.37657058979+0.547910854945j)*x[0]**o + ((-0.913324777551-0.325086848398j))*x[0] + ((0.742351258407+0.868123624479j))*x[1]**o + ((0.0777243248037-0.742902513973j))*x[1]
        ref[(2, 2)]=(0.37657058979+0.547910854945j)*x_ref[0]**o + ((-0.913324777551-0.325086848398j))*x_ref[0] + ((0.742351258407+0.868123624479j))*x_ref[1]**o + ((0.0777243248037-0.742902513973j))*x_ref[1]
        arg[(3, 0)]=(0.927961680134-0.270761160255j)*x[0]**o + ((0.0945404642457+0.272147207689j))*x[0] + ((-0.142245885528+0.420883781526j))*x[1]**o + ((0.197568183167-0.325520180653j))*x[1]
        ref[(3, 0)]=(0.927961680134-0.270761160255j)*x_ref[0]**o + ((0.0945404642457+0.272147207689j))*x_ref[0] + ((-0.142245885528+0.420883781526j))*x_ref[1]**o + ((0.197568183167-0.325520180653j))*x_ref[1]
        arg[(3, 1)]=(0.884744845614+0.606194699153j)*x[0]**o + ((-0.254520802555-0.478163667403j))*x[0] + ((-0.566285278876+0.609039713088j))*x[1]**o + ((-0.499268670623+0.702229073636j))*x[1]
        ref[(3, 1)]=(0.884744845614+0.606194699153j)*x_ref[0]**o + ((-0.254520802555-0.478163667403j))*x_ref[0] + ((-0.566285278876+0.609039713088j))*x_ref[1]**o + ((-0.499268670623+0.702229073636j))*x_ref[1]
        arg[(3, 2)]=(0.213528248043-0.604043182624j)*x[0]**o + ((0.0692090487552-0.334008043798j))*x[0] + ((-0.0739631485818-0.0540555613927j))*x[1]**o + ((-0.492922188362+0.812548088164j))*x[1]
        ref[(3, 2)]=(0.213528248043-0.604043182624j)*x_ref[0]**o + ((0.0692090487552-0.334008043798j))*x_ref[0] + ((-0.0739631485818-0.0540555613927j))*x_ref[1]**o + ((-0.492922188362+0.812548088164j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(-0.706270539623+0.0275540030817j)*x[2]**o + ((0.252194791074+0.551279450162j))*x[2]
            ref[(0, 0)]+=(-0.706270539623+0.0275540030817j)*x_ref[2]**o + ((0.252194791074+0.551279450162j))*x_ref[2]
            arg[(0, 1)]+=(0.64806221654-0.545182858379j)*x[2]**o + ((-0.836244106682+0.322544637561j))*x[2]
            ref[(0, 1)]+=(0.64806221654-0.545182858379j)*x_ref[2]**o + ((-0.836244106682+0.322544637561j))*x_ref[2]
            arg[(0, 2)]+=(-0.0676095346381-0.71890244719j)*x[2]**o + ((-0.16966098232+0.428192864243j))*x[2]
            ref[(0, 2)]+=(-0.0676095346381-0.71890244719j)*x_ref[2]**o + ((-0.16966098232+0.428192864243j))*x_ref[2]
            arg[(1, 0)]+=(-0.0681459172025-0.844799144557j)*x[2]**o + ((0.917521854127-0.67715432286j))*x[2]
            ref[(1, 0)]+=(-0.0681459172025-0.844799144557j)*x_ref[2]**o + ((0.917521854127-0.67715432286j))*x_ref[2]
            arg[(1, 1)]+=(-0.872585353212+0.133797404786j)*x[2]**o + ((-0.55288248792-0.136651616704j))*x[2]
            ref[(1, 1)]+=(-0.872585353212+0.133797404786j)*x_ref[2]**o + ((-0.55288248792-0.136651616704j))*x_ref[2]
            arg[(1, 2)]+=(0.0491178409957+0.687906600037j)*x[2]**o + ((0.363442777456+0.546501204814j))*x[2]
            ref[(1, 2)]+=(0.0491178409957+0.687906600037j)*x_ref[2]**o + ((0.363442777456+0.546501204814j))*x_ref[2]
            arg[(2, 0)]+=(0.262073682115-0.480256728331j)*x[2]**o + ((-0.803245213498-0.987393276649j))*x[2]
            ref[(2, 0)]+=(0.262073682115-0.480256728331j)*x_ref[2]**o + ((-0.803245213498-0.987393276649j))*x_ref[2]
            arg[(2, 1)]+=(0.391458464834-0.324751874184j)*x[2]**o + ((-0.0666463677376+0.630326400925j))*x[2]
            ref[(2, 1)]+=(0.391458464834-0.324751874184j)*x_ref[2]**o + ((-0.0666463677376+0.630326400925j))*x_ref[2]
            arg[(2, 2)]+=(0.290088968584+0.208361736108j)*x[2]**o + ((0.372399115731-0.391304995524j))*x[2]
            ref[(2, 2)]+=(0.290088968584+0.208361736108j)*x_ref[2]**o + ((0.372399115731-0.391304995524j))*x_ref[2]
            arg[(3, 0)]+=(-0.343307599136-0.196342454583j)*x[2]**o + ((0.246512239537-0.186076154553j))*x[2]
            ref[(3, 0)]+=(-0.343307599136-0.196342454583j)*x_ref[2]**o + ((0.246512239537-0.186076154553j))*x_ref[2]
            arg[(3, 1)]+=(-0.301412409075-0.117880293911j)*x[2]**o + ((0.241784118559+0.516641917996j))*x[2]
            ref[(3, 1)]+=(-0.301412409075-0.117880293911j)*x_ref[2]**o + ((0.241784118559+0.516641917996j))*x_ref[2]
            arg[(3, 2)]+=(-0.924705107871-0.0410573371669j)*x[2]**o + ((0.246158283098-0.670331040794j))*x[2]
            ref[(3, 2)]+=(-0.924705107871-0.0410573371669j)*x_ref[2]**o + ((0.246158283098-0.670331040794j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 4),w)
        ref = Data(0,(4, 3, 4),w_ref)
        arg[(0, 0, 0)]=(-0.406894136991-0.620820396612j)*x[0]**o + ((0.655237444929-0.00192810883238j))*x[0] + ((0.662157633328-0.218826389545j))*x[1]**o + ((-0.66043361716-0.703754049544j))*x[1]
        ref[(0, 0, 0)]=(-0.406894136991-0.620820396612j)*x_ref[0]**o + ((0.655237444929-0.00192810883238j))*x_ref[0] + ((0.662157633328-0.218826389545j))*x_ref[1]**o + ((-0.66043361716-0.703754049544j))*x_ref[1]
        arg[(0, 0, 1)]=(0.400827159819+0.886557465148j)*x[0]**o + ((-0.56291554093-0.810494866798j))*x[0] + ((-0.229932761918-0.747948244062j))*x[1]**o + ((0.0639391211776-0.834082049258j))*x[1]
        ref[(0, 0, 1)]=(0.400827159819+0.886557465148j)*x_ref[0]**o + ((-0.56291554093-0.810494866798j))*x_ref[0] + ((-0.229932761918-0.747948244062j))*x_ref[1]**o + ((0.0639391211776-0.834082049258j))*x_ref[1]
        arg[(0, 0, 2)]=(0.0871688266878+0.795434670681j)*x[0]**o + ((0.256464798527-0.191531846859j))*x[0] + ((0.829972516105+0.124509414717j))*x[1]**o + ((-0.362185119344+0.622249557826j))*x[1]
        ref[(0, 0, 2)]=(0.0871688266878+0.795434670681j)*x_ref[0]**o + ((0.256464798527-0.191531846859j))*x_ref[0] + ((0.829972516105+0.124509414717j))*x_ref[1]**o + ((-0.362185119344+0.622249557826j))*x_ref[1]
        arg[(0, 0, 3)]=(-0.212737759431-0.173978308917j)*x[0]**o + ((0.994085877958-0.452406679413j))*x[0] + ((0.961643418989-0.92855569147j))*x[1]**o + ((-0.679921838927+0.735361253064j))*x[1]
        ref[(0, 0, 3)]=(-0.212737759431-0.173978308917j)*x_ref[0]**o + ((0.994085877958-0.452406679413j))*x_ref[0] + ((0.961643418989-0.92855569147j))*x_ref[1]**o + ((-0.679921838927+0.735361253064j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.429033368092-0.847504628682j)*x[0]**o + ((-0.975917387206-0.353396161777j))*x[0] + ((0.959177061766+0.24376422556j))*x[1]**o + ((0.963066292557-0.692282025641j))*x[1]
        ref[(0, 1, 0)]=(-0.429033368092-0.847504628682j)*x_ref[0]**o + ((-0.975917387206-0.353396161777j))*x_ref[0] + ((0.959177061766+0.24376422556j))*x_ref[1]**o + ((0.963066292557-0.692282025641j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.350930643993-0.130451475837j)*x[0]**o + ((0.280706020158-0.797659894868j))*x[0] + ((-0.635975954919-0.0309224520881j))*x[1]**o + ((-0.841383111195+0.869165244285j))*x[1]
        ref[(0, 1, 1)]=(-0.350930643993-0.130451475837j)*x_ref[0]**o + ((0.280706020158-0.797659894868j))*x_ref[0] + ((-0.635975954919-0.0309224520881j))*x_ref[1]**o + ((-0.841383111195+0.869165244285j))*x_ref[1]
        arg[(0, 1, 2)]=(-0.777770536476-0.770954257768j)*x[0]**o + ((0.136872667035+0.129143482171j))*x[0] + ((0.00826898905697+0.562983953953j))*x[1]**o + ((-0.422606788127+0.87695023674j))*x[1]
        ref[(0, 1, 2)]=(-0.777770536476-0.770954257768j)*x_ref[0]**o + ((0.136872667035+0.129143482171j))*x_ref[0] + ((0.00826898905697+0.562983953953j))*x_ref[1]**o + ((-0.422606788127+0.87695023674j))*x_ref[1]
        arg[(0, 1, 3)]=(0.918915889921-0.243288940447j)*x[0]**o + ((0.493084508735+0.183959358226j))*x[0] + ((-0.90849574002+0.96627763565j))*x[1]**o + ((0.522677615902-0.254570541654j))*x[1]
        ref[(0, 1, 3)]=(0.918915889921-0.243288940447j)*x_ref[0]**o + ((0.493084508735+0.183959358226j))*x_ref[0] + ((-0.90849574002+0.96627763565j))*x_ref[1]**o + ((0.522677615902-0.254570541654j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.114113521749-0.627141820445j)*x[0]**o + ((-0.912893231227+0.107368811733j))*x[0] + ((-0.151581042108-0.352256631151j))*x[1]**o + ((-0.0281375314334+0.441392748151j))*x[1]
        ref[(0, 2, 0)]=(-0.114113521749-0.627141820445j)*x_ref[0]**o + ((-0.912893231227+0.107368811733j))*x_ref[0] + ((-0.151581042108-0.352256631151j))*x_ref[1]**o + ((-0.0281375314334+0.441392748151j))*x_ref[1]
        arg[(0, 2, 1)]=(-0.2893154002-0.213712808085j)*x[0]**o + ((-0.56553049842+0.243306599538j))*x[0] + ((-0.271056371847-0.792808303568j))*x[1]**o + ((0.297138969446-0.220242348565j))*x[1]
        ref[(0, 2, 1)]=(-0.2893154002-0.213712808085j)*x_ref[0]**o + ((-0.56553049842+0.243306599538j))*x_ref[0] + ((-0.271056371847-0.792808303568j))*x_ref[1]**o + ((0.297138969446-0.220242348565j))*x_ref[1]
        arg[(0, 2, 2)]=(-0.414075415157+0.698775179936j)*x[0]**o + ((0.845288425345+0.213368395631j))*x[0] + ((-0.476413427586-0.887148692724j))*x[1]**o + ((0.0953002029411+0.628947561154j))*x[1]
        ref[(0, 2, 2)]=(-0.414075415157+0.698775179936j)*x_ref[0]**o + ((0.845288425345+0.213368395631j))*x_ref[0] + ((-0.476413427586-0.887148692724j))*x_ref[1]**o + ((0.0953002029411+0.628947561154j))*x_ref[1]
        arg[(0, 2, 3)]=(0.680646261635+0.578468254313j)*x[0]**o + ((0.222532030391-0.802966812388j))*x[0] + ((0.369969758217-0.993546003174j))*x[1]**o + ((-0.488158880908+0.818080233872j))*x[1]
        ref[(0, 2, 3)]=(0.680646261635+0.578468254313j)*x_ref[0]**o + ((0.222532030391-0.802966812388j))*x_ref[0] + ((0.369969758217-0.993546003174j))*x_ref[1]**o + ((-0.488158880908+0.818080233872j))*x_ref[1]
        arg[(1, 0, 0)]=(0.815503362905-0.407215501126j)*x[0]**o + ((-0.318552579876-0.886011757171j))*x[0] + ((0.0610884123537-0.253668160199j))*x[1]**o + ((-0.657956789893+0.237924659503j))*x[1]
        ref[(1, 0, 0)]=(0.815503362905-0.407215501126j)*x_ref[0]**o + ((-0.318552579876-0.886011757171j))*x_ref[0] + ((0.0610884123537-0.253668160199j))*x_ref[1]**o + ((-0.657956789893+0.237924659503j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.479455103177-0.132108552446j)*x[0]**o + ((-0.175690886036+0.446772592299j))*x[0] + ((0.739001982349-0.385441762672j))*x[1]**o + ((0.191664598737-0.0605664869337j))*x[1]
        ref[(1, 0, 1)]=(-0.479455103177-0.132108552446j)*x_ref[0]**o + ((-0.175690886036+0.446772592299j))*x_ref[0] + ((0.739001982349-0.385441762672j))*x_ref[1]**o + ((0.191664598737-0.0605664869337j))*x_ref[1]
        arg[(1, 0, 2)]=(0.666239397084+0.609351492481j)*x[0]**o + ((-0.277769563556-0.411916682218j))*x[0] + ((-0.83787366169+0.391754469731j))*x[1]**o + ((-0.0275107858918+0.380919541126j))*x[1]
        ref[(1, 0, 2)]=(0.666239397084+0.609351492481j)*x_ref[0]**o + ((-0.277769563556-0.411916682218j))*x_ref[0] + ((-0.83787366169+0.391754469731j))*x_ref[1]**o + ((-0.0275107858918+0.380919541126j))*x_ref[1]
        arg[(1, 0, 3)]=(-0.0295178308593+0.932930154727j)*x[0]**o + ((-0.714021267975-0.82010909876j))*x[0] + ((0.379831267571-0.626564013657j))*x[1]**o + ((-0.224135852179-0.00334117952455j))*x[1]
        ref[(1, 0, 3)]=(-0.0295178308593+0.932930154727j)*x_ref[0]**o + ((-0.714021267975-0.82010909876j))*x_ref[0] + ((0.379831267571-0.626564013657j))*x_ref[1]**o + ((-0.224135852179-0.00334117952455j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.576904141004+0.497245986909j)*x[0]**o + ((0.0456304748297-0.138731266431j))*x[0] + ((0.722391052801+0.2568605047j))*x[1]**o + ((0.64294446135-0.464082879797j))*x[1]
        ref[(1, 1, 0)]=(-0.576904141004+0.497245986909j)*x_ref[0]**o + ((0.0456304748297-0.138731266431j))*x_ref[0] + ((0.722391052801+0.2568605047j))*x_ref[1]**o + ((0.64294446135-0.464082879797j))*x_ref[1]
        arg[(1, 1, 1)]=(0.0717768833866-0.642373217782j)*x[0]**o + ((-0.529618744283+0.0230675695259j))*x[0] + ((-0.802401176826-0.214766564777j))*x[1]**o + ((0.82363133706+0.56073088938j))*x[1]
        ref[(1, 1, 1)]=(0.0717768833866-0.642373217782j)*x_ref[0]**o + ((-0.529618744283+0.0230675695259j))*x_ref[0] + ((-0.802401176826-0.214766564777j))*x_ref[1]**o + ((0.82363133706+0.56073088938j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.494006891437+0.516308483794j)*x[0]**o + ((0.366220392896+0.380880968547j))*x[0] + ((0.410137799272-0.408342935703j))*x[1]**o + ((0.211726481918+0.742575470046j))*x[1]
        ref[(1, 1, 2)]=(-0.494006891437+0.516308483794j)*x_ref[0]**o + ((0.366220392896+0.380880968547j))*x_ref[0] + ((0.410137799272-0.408342935703j))*x_ref[1]**o + ((0.211726481918+0.742575470046j))*x_ref[1]
        arg[(1, 1, 3)]=(-0.744172206395+0.414838209472j)*x[0]**o + ((-0.8887493087-0.893116913166j))*x[0] + ((0.557500440671-0.484171055477j))*x[1]**o + ((0.795044345237-0.229269762114j))*x[1]
        ref[(1, 1, 3)]=(-0.744172206395+0.414838209472j)*x_ref[0]**o + ((-0.8887493087-0.893116913166j))*x_ref[0] + ((0.557500440671-0.484171055477j))*x_ref[1]**o + ((0.795044345237-0.229269762114j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.102739797827+0.46217692717j)*x[0]**o + ((-0.860145812945-0.472489324676j))*x[0] + ((-0.205839747265-0.0422646315404j))*x[1]**o + ((0.102821671326-0.0770738290895j))*x[1]
        ref[(1, 2, 0)]=(-0.102739797827+0.46217692717j)*x_ref[0]**o + ((-0.860145812945-0.472489324676j))*x_ref[0] + ((-0.205839747265-0.0422646315404j))*x_ref[1]**o + ((0.102821671326-0.0770738290895j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.568262952399+0.228646811333j)*x[0]**o + ((0.849195128101+0.120495316685j))*x[0] + ((0.153043170175-0.45617207061j))*x[1]**o + ((-0.784751133956-0.249415492717j))*x[1]
        ref[(1, 2, 1)]=(-0.568262952399+0.228646811333j)*x_ref[0]**o + ((0.849195128101+0.120495316685j))*x_ref[0] + ((0.153043170175-0.45617207061j))*x_ref[1]**o + ((-0.784751133956-0.249415492717j))*x_ref[1]
        arg[(1, 2, 2)]=(-0.956173366484-0.940269390181j)*x[0]**o + ((-0.451558656076-0.474484457081j))*x[0] + ((0.727869099735+0.0332366832847j))*x[1]**o + ((-0.240645312638-0.428661080351j))*x[1]
        ref[(1, 2, 2)]=(-0.956173366484-0.940269390181j)*x_ref[0]**o + ((-0.451558656076-0.474484457081j))*x_ref[0] + ((0.727869099735+0.0332366832847j))*x_ref[1]**o + ((-0.240645312638-0.428661080351j))*x_ref[1]
        arg[(1, 2, 3)]=(-0.730004322838+0.123683107736j)*x[0]**o + ((0.393901311117+0.622398215297j))*x[0] + ((-0.585074258105+0.817198236856j))*x[1]**o + ((-0.496386017877-0.13726534368j))*x[1]
        ref[(1, 2, 3)]=(-0.730004322838+0.123683107736j)*x_ref[0]**o + ((0.393901311117+0.622398215297j))*x_ref[0] + ((-0.585074258105+0.817198236856j))*x_ref[1]**o + ((-0.496386017877-0.13726534368j))*x_ref[1]
        arg[(2, 0, 0)]=(0.853913139843-0.826570115787j)*x[0]**o + ((-0.373353582165-0.998978800401j))*x[0] + ((0.227549884188-0.834676334843j))*x[1]**o + ((0.627135365192+0.164786667051j))*x[1]
        ref[(2, 0, 0)]=(0.853913139843-0.826570115787j)*x_ref[0]**o + ((-0.373353582165-0.998978800401j))*x_ref[0] + ((0.227549884188-0.834676334843j))*x_ref[1]**o + ((0.627135365192+0.164786667051j))*x_ref[1]
        arg[(2, 0, 1)]=(0.837499258151+0.268212965116j)*x[0]**o + ((0.568488141871+0.12288922737j))*x[0] + ((-0.467336532173-0.446063443543j))*x[1]**o + ((0.482905504269+0.103111814342j))*x[1]
        ref[(2, 0, 1)]=(0.837499258151+0.268212965116j)*x_ref[0]**o + ((0.568488141871+0.12288922737j))*x_ref[0] + ((-0.467336532173-0.446063443543j))*x_ref[1]**o + ((0.482905504269+0.103111814342j))*x_ref[1]
        arg[(2, 0, 2)]=(-0.966630898134+0.0585255229507j)*x[0]**o + ((-0.60253528927+0.395710370213j))*x[0] + ((-0.106422893153+0.649370700694j))*x[1]**o + ((0.00716266071935+0.483603199652j))*x[1]
        ref[(2, 0, 2)]=(-0.966630898134+0.0585255229507j)*x_ref[0]**o + ((-0.60253528927+0.395710370213j))*x_ref[0] + ((-0.106422893153+0.649370700694j))*x_ref[1]**o + ((0.00716266071935+0.483603199652j))*x_ref[1]
        arg[(2, 0, 3)]=(0.26813568303-0.483896162522j)*x[0]**o + ((-0.489364816139+0.96482127475j))*x[0] + ((-0.900350341-0.505269389064j))*x[1]**o + ((-0.129138910773+0.949404440308j))*x[1]
        ref[(2, 0, 3)]=(0.26813568303-0.483896162522j)*x_ref[0]**o + ((-0.489364816139+0.96482127475j))*x_ref[0] + ((-0.900350341-0.505269389064j))*x_ref[1]**o + ((-0.129138910773+0.949404440308j))*x_ref[1]
        arg[(2, 1, 0)]=(0.761912986708+0.788787682265j)*x[0]**o + ((0.197466170494+0.963367256044j))*x[0] + ((-0.821900712001+0.00992732124259j))*x[1]**o + ((-0.313336347646-0.512962073819j))*x[1]
        ref[(2, 1, 0)]=(0.761912986708+0.788787682265j)*x_ref[0]**o + ((0.197466170494+0.963367256044j))*x_ref[0] + ((-0.821900712001+0.00992732124259j))*x_ref[1]**o + ((-0.313336347646-0.512962073819j))*x_ref[1]
        arg[(2, 1, 1)]=(-0.80720755529+0.254765833502j)*x[0]**o + ((0.524668770682-0.352927027008j))*x[0] + ((0.801988419318+0.122594368537j))*x[1]**o + ((0.107942894557-0.61470559289j))*x[1]
        ref[(2, 1, 1)]=(-0.80720755529+0.254765833502j)*x_ref[0]**o + ((0.524668770682-0.352927027008j))*x_ref[0] + ((0.801988419318+0.122594368537j))*x_ref[1]**o + ((0.107942894557-0.61470559289j))*x_ref[1]
        arg[(2, 1, 2)]=(-0.605728893625+0.137686181924j)*x[0]**o + ((-0.564090210657-0.98722047374j))*x[0] + ((-0.366486861498+0.0264555401797j))*x[1]**o + ((-0.36668188006+0.478264410028j))*x[1]
        ref[(2, 1, 2)]=(-0.605728893625+0.137686181924j)*x_ref[0]**o + ((-0.564090210657-0.98722047374j))*x_ref[0] + ((-0.366486861498+0.0264555401797j))*x_ref[1]**o + ((-0.36668188006+0.478264410028j))*x_ref[1]
        arg[(2, 1, 3)]=(-0.441185219042+0.308783129688j)*x[0]**o + ((-0.242353513119+0.904754419081j))*x[0] + ((-0.547456461329-0.330746334794j))*x[1]**o + ((0.261824803147+0.554262910642j))*x[1]
        ref[(2, 1, 3)]=(-0.441185219042+0.308783129688j)*x_ref[0]**o + ((-0.242353513119+0.904754419081j))*x_ref[0] + ((-0.547456461329-0.330746334794j))*x_ref[1]**o + ((0.261824803147+0.554262910642j))*x_ref[1]
        arg[(2, 2, 0)]=(-0.171399878808+0.224703682323j)*x[0]**o + ((0.200461316211+0.514081470236j))*x[0] + ((0.985374487992+0.123681991755j))*x[1]**o + ((-0.516494255777-0.343085064557j))*x[1]
        ref[(2, 2, 0)]=(-0.171399878808+0.224703682323j)*x_ref[0]**o + ((0.200461316211+0.514081470236j))*x_ref[0] + ((0.985374487992+0.123681991755j))*x_ref[1]**o + ((-0.516494255777-0.343085064557j))*x_ref[1]
        arg[(2, 2, 1)]=(0.303320471752+0.232262803063j)*x[0]**o + ((-0.55826879184+0.317626328382j))*x[0] + ((-0.0429805387236+0.443176198709j))*x[1]**o + ((-0.134932452937+0.116232617323j))*x[1]
        ref[(2, 2, 1)]=(0.303320471752+0.232262803063j)*x_ref[0]**o + ((-0.55826879184+0.317626328382j))*x_ref[0] + ((-0.0429805387236+0.443176198709j))*x_ref[1]**o + ((-0.134932452937+0.116232617323j))*x_ref[1]
        arg[(2, 2, 2)]=(0.846600409576+0.181620902149j)*x[0]**o + ((-0.0442428330798+0.0302248722982j))*x[0] + ((0.236567603964-0.427038379098j))*x[1]**o + ((-0.371785397354+0.250893322915j))*x[1]
        ref[(2, 2, 2)]=(0.846600409576+0.181620902149j)*x_ref[0]**o + ((-0.0442428330798+0.0302248722982j))*x_ref[0] + ((0.236567603964-0.427038379098j))*x_ref[1]**o + ((-0.371785397354+0.250893322915j))*x_ref[1]
        arg[(2, 2, 3)]=(0.968854897449-0.826669903924j)*x[0]**o + ((0.323328756181-0.561890056303j))*x[0] + ((0.842657047911-0.877015213428j))*x[1]**o + ((0.0190299048544-0.353603466749j))*x[1]
        ref[(2, 2, 3)]=(0.968854897449-0.826669903924j)*x_ref[0]**o + ((0.323328756181-0.561890056303j))*x_ref[0] + ((0.842657047911-0.877015213428j))*x_ref[1]**o + ((0.0190299048544-0.353603466749j))*x_ref[1]
        arg[(3, 0, 0)]=(0.888071693862-0.935654156662j)*x[0]**o + ((-0.42122794591-0.650407034956j))*x[0] + ((-0.845190739883+0.0837055793839j))*x[1]**o + ((0.370564114802-0.528157275907j))*x[1]
        ref[(3, 0, 0)]=(0.888071693862-0.935654156662j)*x_ref[0]**o + ((-0.42122794591-0.650407034956j))*x_ref[0] + ((-0.845190739883+0.0837055793839j))*x_ref[1]**o + ((0.370564114802-0.528157275907j))*x_ref[1]
        arg[(3, 0, 1)]=(-0.427767321647+0.803093364888j)*x[0]**o + ((0.508617152808-0.919194801779j))*x[0] + ((-0.276929166324-0.0224997214171j))*x[1]**o + ((0.684975477094+0.705392457659j))*x[1]
        ref[(3, 0, 1)]=(-0.427767321647+0.803093364888j)*x_ref[0]**o + ((0.508617152808-0.919194801779j))*x_ref[0] + ((-0.276929166324-0.0224997214171j))*x_ref[1]**o + ((0.684975477094+0.705392457659j))*x_ref[1]
        arg[(3, 0, 2)]=(-0.0296455601547+0.164516571054j)*x[0]**o + ((0.941865213333+0.45216953173j))*x[0] + ((0.412309482532+0.488106785467j))*x[1]**o + ((0.959490971775+0.535815221075j))*x[1]
        ref[(3, 0, 2)]=(-0.0296455601547+0.164516571054j)*x_ref[0]**o + ((0.941865213333+0.45216953173j))*x_ref[0] + ((0.412309482532+0.488106785467j))*x_ref[1]**o + ((0.959490971775+0.535815221075j))*x_ref[1]
        arg[(3, 0, 3)]=(-0.215401296432-0.0847298142128j)*x[0]**o + ((-0.147272621965-0.935034714248j))*x[0] + ((-0.730294200991-0.611496425185j))*x[1]**o + ((-0.324762812435+0.190139792114j))*x[1]
        ref[(3, 0, 3)]=(-0.215401296432-0.0847298142128j)*x_ref[0]**o + ((-0.147272621965-0.935034714248j))*x_ref[0] + ((-0.730294200991-0.611496425185j))*x_ref[1]**o + ((-0.324762812435+0.190139792114j))*x_ref[1]
        arg[(3, 1, 0)]=(0.702359222466+0.0701532187961j)*x[0]**o + ((0.843530842942+0.536645731843j))*x[0] + ((0.535616106344-0.446729545387j))*x[1]**o + ((0.662690906934+0.99748546846j))*x[1]
        ref[(3, 1, 0)]=(0.702359222466+0.0701532187961j)*x_ref[0]**o + ((0.843530842942+0.536645731843j))*x_ref[0] + ((0.535616106344-0.446729545387j))*x_ref[1]**o + ((0.662690906934+0.99748546846j))*x_ref[1]
        arg[(3, 1, 1)]=(0.839033926301+0.690536448001j)*x[0]**o + ((-0.217288027787+0.715173481557j))*x[0] + ((-0.240973892479+0.247991266323j))*x[1]**o + ((0.707993294353+0.0789635239818j))*x[1]
        ref[(3, 1, 1)]=(0.839033926301+0.690536448001j)*x_ref[0]**o + ((-0.217288027787+0.715173481557j))*x_ref[0] + ((-0.240973892479+0.247991266323j))*x_ref[1]**o + ((0.707993294353+0.0789635239818j))*x_ref[1]
        arg[(3, 1, 2)]=(0.976072393025-0.278211043184j)*x[0]**o + ((0.428506326178-0.250456795629j))*x[0] + ((0.99548954181+0.503235176039j))*x[1]**o + ((0.818935976751-0.705215819768j))*x[1]
        ref[(3, 1, 2)]=(0.976072393025-0.278211043184j)*x_ref[0]**o + ((0.428506326178-0.250456795629j))*x_ref[0] + ((0.99548954181+0.503235176039j))*x_ref[1]**o + ((0.818935976751-0.705215819768j))*x_ref[1]
        arg[(3, 1, 3)]=(-0.941088457523+0.659489407926j)*x[0]**o + ((-0.349351545219+0.0899797403802j))*x[0] + ((0.392849985989-0.0833042858892j))*x[1]**o + ((-0.154894858037+0.705655105867j))*x[1]
        ref[(3, 1, 3)]=(-0.941088457523+0.659489407926j)*x_ref[0]**o + ((-0.349351545219+0.0899797403802j))*x_ref[0] + ((0.392849985989-0.0833042858892j))*x_ref[1]**o + ((-0.154894858037+0.705655105867j))*x_ref[1]
        arg[(3, 2, 0)]=(0.276670996914+0.107983016386j)*x[0]**o + ((-0.895428465168-0.0647599157859j))*x[0] + ((0.165679970766-0.782730049629j))*x[1]**o + ((-0.27502736185+0.482072959426j))*x[1]
        ref[(3, 2, 0)]=(0.276670996914+0.107983016386j)*x_ref[0]**o + ((-0.895428465168-0.0647599157859j))*x_ref[0] + ((0.165679970766-0.782730049629j))*x_ref[1]**o + ((-0.27502736185+0.482072959426j))*x_ref[1]
        arg[(3, 2, 1)]=(0.32144471253-0.66629796217j)*x[0]**o + ((-0.325507634247-0.960940723583j))*x[0] + ((-0.839150488592-0.398402220116j))*x[1]**o + ((-0.568634956988+0.834327863895j))*x[1]
        ref[(3, 2, 1)]=(0.32144471253-0.66629796217j)*x_ref[0]**o + ((-0.325507634247-0.960940723583j))*x_ref[0] + ((-0.839150488592-0.398402220116j))*x_ref[1]**o + ((-0.568634956988+0.834327863895j))*x_ref[1]
        arg[(3, 2, 2)]=(-0.552476602842-0.642888388915j)*x[0]**o + ((-0.77717079441+0.223575330664j))*x[0] + ((-0.678223651264+0.375391298851j))*x[1]**o + ((0.535019512617-0.288171799757j))*x[1]
        ref[(3, 2, 2)]=(-0.552476602842-0.642888388915j)*x_ref[0]**o + ((-0.77717079441+0.223575330664j))*x_ref[0] + ((-0.678223651264+0.375391298851j))*x_ref[1]**o + ((0.535019512617-0.288171799757j))*x_ref[1]
        arg[(3, 2, 3)]=(0.132639112884-0.367758549671j)*x[0]**o + ((-0.531960013434+0.325181380449j))*x[0] + ((-0.307559657173+0.850472740709j))*x[1]**o + ((0.630213950867+0.400175264379j))*x[1]
        ref[(3, 2, 3)]=(0.132639112884-0.367758549671j)*x_ref[0]**o + ((-0.531960013434+0.325181380449j))*x_ref[0] + ((-0.307559657173+0.850472740709j))*x_ref[1]**o + ((0.630213950867+0.400175264379j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.773983448671-0.883723831924j)*x[2]**o + ((0.275771022866+0.587153034525j))*x[2]
            ref[(0, 0, 0)]+=(0.773983448671-0.883723831924j)*x_ref[2]**o + ((0.275771022866+0.587153034525j))*x_ref[2]
            arg[(0, 0, 1)]+=(0.618193429622+0.322374212678j)*x[2]**o + ((-0.0254353857854+0.0975454893281j))*x[2]
            ref[(0, 0, 1)]+=(0.618193429622+0.322374212678j)*x_ref[2]**o + ((-0.0254353857854+0.0975454893281j))*x_ref[2]
            arg[(0, 0, 2)]+=(-0.993129005939-0.636183882495j)*x[2]**o + ((-0.925872320951+0.58225504899j))*x[2]
            ref[(0, 0, 2)]+=(-0.993129005939-0.636183882495j)*x_ref[2]**o + ((-0.925872320951+0.58225504899j))*x_ref[2]
            arg[(0, 0, 3)]+=(-0.0281713282193-0.428779060594j)*x[2]**o + ((-0.498498120661-0.559462665266j))*x[2]
            ref[(0, 0, 3)]+=(-0.0281713282193-0.428779060594j)*x_ref[2]**o + ((-0.498498120661-0.559462665266j))*x_ref[2]
            arg[(0, 1, 0)]+=(0.821259391162-0.756010244044j)*x[2]**o + ((-0.863127798935+0.0294991751895j))*x[2]
            ref[(0, 1, 0)]+=(0.821259391162-0.756010244044j)*x_ref[2]**o + ((-0.863127798935+0.0294991751895j))*x_ref[2]
            arg[(0, 1, 1)]+=(0.762908345076+0.611013877173j)*x[2]**o + ((-0.369576918801-0.00622467138883j))*x[2]
            ref[(0, 1, 1)]+=(0.762908345076+0.611013877173j)*x_ref[2]**o + ((-0.369576918801-0.00622467138883j))*x_ref[2]
            arg[(0, 1, 2)]+=(0.810208020719-0.863879583355j)*x[2]**o + ((-0.837535746869-0.601725176043j))*x[2]
            ref[(0, 1, 2)]+=(0.810208020719-0.863879583355j)*x_ref[2]**o + ((-0.837535746869-0.601725176043j))*x_ref[2]
            arg[(0, 1, 3)]+=(-0.713039318925-0.113520615398j)*x[2]**o + ((-0.509178833766-0.345552406633j))*x[2]
            ref[(0, 1, 3)]+=(-0.713039318925-0.113520615398j)*x_ref[2]**o + ((-0.509178833766-0.345552406633j))*x_ref[2]
            arg[(0, 2, 0)]+=(-0.975058790792+0.31932809718j)*x[2]**o + ((0.173359176035+0.839208872201j))*x[2]
            ref[(0, 2, 0)]+=(-0.975058790792+0.31932809718j)*x_ref[2]**o + ((0.173359176035+0.839208872201j))*x_ref[2]
            arg[(0, 2, 1)]+=(-0.385905742269-0.196316785362j)*x[2]**o + ((-0.413672596336-0.362332937759j))*x[2]
            ref[(0, 2, 1)]+=(-0.385905742269-0.196316785362j)*x_ref[2]**o + ((-0.413672596336-0.362332937759j))*x_ref[2]
            arg[(0, 2, 2)]+=(-0.222269632139+0.230510234517j)*x[2]**o + ((0.981789991558+0.541114808534j))*x[2]
            ref[(0, 2, 2)]+=(-0.222269632139+0.230510234517j)*x_ref[2]**o + ((0.981789991558+0.541114808534j))*x_ref[2]
            arg[(0, 2, 3)]+=(0.788158642075+0.0789563649002j)*x[2]**o + ((0.112739443349+0.444178729002j))*x[2]
            ref[(0, 2, 3)]+=(0.788158642075+0.0789563649002j)*x_ref[2]**o + ((0.112739443349+0.444178729002j))*x_ref[2]
            arg[(1, 0, 0)]+=(-0.0492292230732-0.40228728359j)*x[2]**o + ((-0.514484263716-0.589613256872j))*x[2]
            ref[(1, 0, 0)]+=(-0.0492292230732-0.40228728359j)*x_ref[2]**o + ((-0.514484263716-0.589613256872j))*x_ref[2]
            arg[(1, 0, 1)]+=(0.587820603239-0.0350407886629j)*x[2]**o + ((0.880926039218+0.973284320364j))*x[2]
            ref[(1, 0, 1)]+=(0.587820603239-0.0350407886629j)*x_ref[2]**o + ((0.880926039218+0.973284320364j))*x_ref[2]
            arg[(1, 0, 2)]+=(0.802134600154-0.0343670982955j)*x[2]**o + ((-0.364263689539+0.369753003677j))*x[2]
            ref[(1, 0, 2)]+=(0.802134600154-0.0343670982955j)*x_ref[2]**o + ((-0.364263689539+0.369753003677j))*x_ref[2]
            arg[(1, 0, 3)]+=(-0.287586056143-0.96882832573j)*x[2]**o + ((0.939411227939-0.905948195992j))*x[2]
            ref[(1, 0, 3)]+=(-0.287586056143-0.96882832573j)*x_ref[2]**o + ((0.939411227939-0.905948195992j))*x_ref[2]
            arg[(1, 1, 0)]+=(0.854357206026+0.00972299880944j)*x[2]**o + ((-0.961363478116+0.377852267062j))*x[2]
            ref[(1, 1, 0)]+=(0.854357206026+0.00972299880944j)*x_ref[2]**o + ((-0.961363478116+0.377852267062j))*x_ref[2]
            arg[(1, 1, 1)]+=(-0.337510733135+0.0893241318366j)*x[2]**o + ((0.943743471615+0.290590111462j))*x[2]
            ref[(1, 1, 1)]+=(-0.337510733135+0.0893241318366j)*x_ref[2]**o + ((0.943743471615+0.290590111462j))*x_ref[2]
            arg[(1, 1, 2)]+=(0.784740107849+0.753788985695j)*x[2]**o + ((-0.10478703332-0.842184725413j))*x[2]
            ref[(1, 1, 2)]+=(0.784740107849+0.753788985695j)*x_ref[2]**o + ((-0.10478703332-0.842184725413j))*x_ref[2]
            arg[(1, 1, 3)]+=(0.766668132533+0.0222705162164j)*x[2]**o + ((0.613122705908+0.954359341449j))*x[2]
            ref[(1, 1, 3)]+=(0.766668132533+0.0222705162164j)*x_ref[2]**o + ((0.613122705908+0.954359341449j))*x_ref[2]
            arg[(1, 2, 0)]+=(0.846566928175-0.38177758803j)*x[2]**o + ((-0.745641648461+0.472958805915j))*x[2]
            ref[(1, 2, 0)]+=(0.846566928175-0.38177758803j)*x_ref[2]**o + ((-0.745641648461+0.472958805915j))*x_ref[2]
            arg[(1, 2, 1)]+=(0.754709896867+0.660762939679j)*x[2]**o + ((0.762834946308-0.894452061431j))*x[2]
            ref[(1, 2, 1)]+=(0.754709896867+0.660762939679j)*x_ref[2]**o + ((0.762834946308-0.894452061431j))*x_ref[2]
            arg[(1, 2, 2)]+=(0.246302287018-0.975502479175j)*x[2]**o + ((-0.143967386257-0.185852666777j))*x[2]
            ref[(1, 2, 2)]+=(0.246302287018-0.975502479175j)*x_ref[2]**o + ((-0.143967386257-0.185852666777j))*x_ref[2]
            arg[(1, 2, 3)]+=(-0.881189014418+0.630552775253j)*x[2]**o + ((-0.75323195592+0.86353329102j))*x[2]
            ref[(1, 2, 3)]+=(-0.881189014418+0.630552775253j)*x_ref[2]**o + ((-0.75323195592+0.86353329102j))*x_ref[2]
            arg[(2, 0, 0)]+=(0.277166661762-0.236011752436j)*x[2]**o + ((0.297759958747-0.497339520195j))*x[2]
            ref[(2, 0, 0)]+=(0.277166661762-0.236011752436j)*x_ref[2]**o + ((0.297759958747-0.497339520195j))*x_ref[2]
            arg[(2, 0, 1)]+=(0.217529303748-0.914483705212j)*x[2]**o + ((-0.191091058203-0.347106402584j))*x[2]
            ref[(2, 0, 1)]+=(0.217529303748-0.914483705212j)*x_ref[2]**o + ((-0.191091058203-0.347106402584j))*x_ref[2]
            arg[(2, 0, 2)]+=(-0.219814063641+0.403983387754j)*x[2]**o + ((0.655190352765+0.863015812437j))*x[2]
            ref[(2, 0, 2)]+=(-0.219814063641+0.403983387754j)*x_ref[2]**o + ((0.655190352765+0.863015812437j))*x_ref[2]
            arg[(2, 0, 3)]+=(-0.877481622515+0.970866944946j)*x[2]**o + ((-0.547253812772+0.112362095894j))*x[2]
            ref[(2, 0, 3)]+=(-0.877481622515+0.970866944946j)*x_ref[2]**o + ((-0.547253812772+0.112362095894j))*x_ref[2]
            arg[(2, 1, 0)]+=(-0.733593700729-0.546742805431j)*x[2]**o + ((0.39285443719+0.570521442896j))*x[2]
            ref[(2, 1, 0)]+=(-0.733593700729-0.546742805431j)*x_ref[2]**o + ((0.39285443719+0.570521442896j))*x_ref[2]
            arg[(2, 1, 1)]+=(0.528860812856+0.0703307790549j)*x[2]**o + ((0.0920560343502-0.295616927153j))*x[2]
            ref[(2, 1, 1)]+=(0.528860812856+0.0703307790549j)*x_ref[2]**o + ((0.0920560343502-0.295616927153j))*x_ref[2]
            arg[(2, 1, 2)]+=(0.411671031004-0.9132542844j)*x[2]**o + ((0.742420766145+0.113410376945j))*x[2]
            ref[(2, 1, 2)]+=(0.411671031004-0.9132542844j)*x_ref[2]**o + ((0.742420766145+0.113410376945j))*x_ref[2]
            arg[(2, 1, 3)]+=(-0.644352393979-0.761110600007j)*x[2]**o + ((-0.59247403295-0.625184374865j))*x[2]
            ref[(2, 1, 3)]+=(-0.644352393979-0.761110600007j)*x_ref[2]**o + ((-0.59247403295-0.625184374865j))*x_ref[2]
            arg[(2, 2, 0)]+=(-0.659458523848-0.726622337071j)*x[2]**o + ((0.0452578482987-0.247484190374j))*x[2]
            ref[(2, 2, 0)]+=(-0.659458523848-0.726622337071j)*x_ref[2]**o + ((0.0452578482987-0.247484190374j))*x_ref[2]
            arg[(2, 2, 1)]+=(0.979420225426+0.0883270654905j)*x[2]**o + ((-0.261980877523-0.0842475488393j))*x[2]
            ref[(2, 2, 1)]+=(0.979420225426+0.0883270654905j)*x_ref[2]**o + ((-0.261980877523-0.0842475488393j))*x_ref[2]
            arg[(2, 2, 2)]+=(-0.698654025726-0.00141137551184j)*x[2]**o + ((0.260883003105-0.199260627391j))*x[2]
            ref[(2, 2, 2)]+=(-0.698654025726-0.00141137551184j)*x_ref[2]**o + ((0.260883003105-0.199260627391j))*x_ref[2]
            arg[(2, 2, 3)]+=(-0.408361036491-0.00680521377362j)*x[2]**o + ((0.931847741682-0.584396155039j))*x[2]
            ref[(2, 2, 3)]+=(-0.408361036491-0.00680521377362j)*x_ref[2]**o + ((0.931847741682-0.584396155039j))*x_ref[2]
            arg[(3, 0, 0)]+=(0.417250513284+0.0915293293225j)*x[2]**o + ((0.32325753074+0.941594366711j))*x[2]
            ref[(3, 0, 0)]+=(0.417250513284+0.0915293293225j)*x_ref[2]**o + ((0.32325753074+0.941594366711j))*x_ref[2]
            arg[(3, 0, 1)]+=(0.983573621748-0.11755595747j)*x[2]**o + ((0.392624960594+0.364523749558j))*x[2]
            ref[(3, 0, 1)]+=(0.983573621748-0.11755595747j)*x_ref[2]**o + ((0.392624960594+0.364523749558j))*x_ref[2]
            arg[(3, 0, 2)]+=(0.874577557037+0.742211639405j)*x[2]**o + ((0.900534761398+0.432369096979j))*x[2]
            ref[(3, 0, 2)]+=(0.874577557037+0.742211639405j)*x_ref[2]**o + ((0.900534761398+0.432369096979j))*x_ref[2]
            arg[(3, 0, 3)]+=(0.386318381264-0.711034765769j)*x[2]**o + ((-0.237804939809-0.889745855748j))*x[2]
            ref[(3, 0, 3)]+=(0.386318381264-0.711034765769j)*x_ref[2]**o + ((-0.237804939809-0.889745855748j))*x_ref[2]
            arg[(3, 1, 0)]+=(-0.93969894953-0.415838599923j)*x[2]**o + ((-0.701934229394+0.940384600311j))*x[2]
            ref[(3, 1, 0)]+=(-0.93969894953-0.415838599923j)*x_ref[2]**o + ((-0.701934229394+0.940384600311j))*x_ref[2]
            arg[(3, 1, 1)]+=(0.278184362638+0.740888177223j)*x[2]**o + ((-0.180348528455-0.612499271303j))*x[2]
            ref[(3, 1, 1)]+=(0.278184362638+0.740888177223j)*x_ref[2]**o + ((-0.180348528455-0.612499271303j))*x_ref[2]
            arg[(3, 1, 2)]+=(-0.362215622053-0.146590381652j)*x[2]**o + ((0.259747372036+0.51269389658j))*x[2]
            ref[(3, 1, 2)]+=(-0.362215622053-0.146590381652j)*x_ref[2]**o + ((0.259747372036+0.51269389658j))*x_ref[2]
            arg[(3, 1, 3)]+=(-0.00519288608366+0.0167759111858j)*x[2]**o + ((-0.244261592808+0.883904387347j))*x[2]
            ref[(3, 1, 3)]+=(-0.00519288608366+0.0167759111858j)*x_ref[2]**o + ((-0.244261592808+0.883904387347j))*x_ref[2]
            arg[(3, 2, 0)]+=(-0.452159278964-0.900491701785j)*x[2]**o + ((-0.215485571254+0.0477537686223j))*x[2]
            ref[(3, 2, 0)]+=(-0.452159278964-0.900491701785j)*x_ref[2]**o + ((-0.215485571254+0.0477537686223j))*x_ref[2]
            arg[(3, 2, 1)]+=(0.788880592647+0.734982350113j)*x[2]**o + ((0.137117701999+0.922696915687j))*x[2]
            ref[(3, 2, 1)]+=(0.788880592647+0.734982350113j)*x_ref[2]**o + ((0.137117701999+0.922696915687j))*x_ref[2]
            arg[(3, 2, 2)]+=(-0.836268085445-0.375894355965j)*x[2]**o + ((-0.611777439182+0.311378477709j))*x[2]
            ref[(3, 2, 2)]+=(-0.836268085445-0.375894355965j)*x_ref[2]**o + ((-0.611777439182+0.311378477709j))*x_ref[2]
            arg[(3, 2, 3)]+=(0.46037655089-0.44998579452j)*x[2]**o + ((0.660271363774-0.306066344182j))*x[2]
            ref[(3, 2, 3)]+=(0.46037655089-0.44998579452j)*x_ref[2]**o + ((0.660271363774-0.306066344182j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 3, 2),w)
        ref = Data(0,(2, 4, 3, 2),w_ref)
        arg[(0, 0, 0, 0)]=(0.433587586429-0.0617578297746j)*x[0]**o + ((-0.139736398322-0.550934391781j))*x[0] + ((-0.334640801849+0.377615827507j))*x[1]**o + ((0.661769800665+0.586854741167j))*x[1]
        ref[(0, 0, 0, 0)]=(0.433587586429-0.0617578297746j)*x_ref[0]**o + ((-0.139736398322-0.550934391781j))*x_ref[0] + ((-0.334640801849+0.377615827507j))*x_ref[1]**o + ((0.661769800665+0.586854741167j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.709619774534-0.620352575816j)*x[0]**o + ((-0.842600444951+0.574153718884j))*x[0] + ((-0.48171536393+0.434519306739j))*x[1]**o + ((-0.503375899665+0.567433242927j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.709619774534-0.620352575816j)*x_ref[0]**o + ((-0.842600444951+0.574153718884j))*x_ref[0] + ((-0.48171536393+0.434519306739j))*x_ref[1]**o + ((-0.503375899665+0.567433242927j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.379640873977+0.145301500785j)*x[0]**o + ((0.349215092901+0.398272095008j))*x[0] + ((-0.620468284089-0.599806686466j))*x[1]**o + ((0.433214812403+0.139233291011j))*x[1]
        ref[(0, 0, 1, 0)]=(0.379640873977+0.145301500785j)*x_ref[0]**o + ((0.349215092901+0.398272095008j))*x_ref[0] + ((-0.620468284089-0.599806686466j))*x_ref[1]**o + ((0.433214812403+0.139233291011j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.0804161349762-0.311430139943j)*x[0]**o + ((0.50349136001+0.418578792546j))*x[0] + ((-0.311775336547-0.129871317288j))*x[1]**o + ((0.0427477887677-0.568269908455j))*x[1]
        ref[(0, 0, 1, 1)]=(0.0804161349762-0.311430139943j)*x_ref[0]**o + ((0.50349136001+0.418578792546j))*x_ref[0] + ((-0.311775336547-0.129871317288j))*x_ref[1]**o + ((0.0427477887677-0.568269908455j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(0.78958354902+0.0571339415021j)*x[0]**o + ((0.736555454859+0.763379211766j))*x[0] + ((0.332481921323+0.437427036828j))*x[1]**o + ((-0.82386912652+0.817684610503j))*x[1]
        ref[(0, 0, 2, 0)]=(0.78958354902+0.0571339415021j)*x_ref[0]**o + ((0.736555454859+0.763379211766j))*x_ref[0] + ((0.332481921323+0.437427036828j))*x_ref[1]**o + ((-0.82386912652+0.817684610503j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(0.887451129215-0.92103598534j)*x[0]**o + ((0.268765374005-0.772116346646j))*x[0] + ((0.828186569776+0.0677014249038j))*x[1]**o + ((0.580065109775-0.56516843593j))*x[1]
        ref[(0, 0, 2, 1)]=(0.887451129215-0.92103598534j)*x_ref[0]**o + ((0.268765374005-0.772116346646j))*x_ref[0] + ((0.828186569776+0.0677014249038j))*x_ref[1]**o + ((0.580065109775-0.56516843593j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.994262077997+0.0573301199942j)*x[0]**o + ((0.318844450892+0.882354487138j))*x[0] + ((0.772012625284+0.203919261189j))*x[1]**o + ((0.453698635568+0.416047358508j))*x[1]
        ref[(0, 1, 0, 0)]=(0.994262077997+0.0573301199942j)*x_ref[0]**o + ((0.318844450892+0.882354487138j))*x_ref[0] + ((0.772012625284+0.203919261189j))*x_ref[1]**o + ((0.453698635568+0.416047358508j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.996318701445-0.319207945497j)*x[0]**o + ((0.937916821312-0.499253847379j))*x[0] + ((-0.879010978024-0.36548555273j))*x[1]**o + ((0.818554078963+0.528453131109j))*x[1]
        ref[(0, 1, 0, 1)]=(0.996318701445-0.319207945497j)*x_ref[0]**o + ((0.937916821312-0.499253847379j))*x_ref[0] + ((-0.879010978024-0.36548555273j))*x_ref[1]**o + ((0.818554078963+0.528453131109j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.0761128624888-0.924539006538j)*x[0]**o + ((-0.220179940931-0.986438125349j))*x[0] + ((-0.139127952844-0.221250958734j))*x[1]**o + ((0.156029546987-0.383308724895j))*x[1]
        ref[(0, 1, 1, 0)]=(0.0761128624888-0.924539006538j)*x_ref[0]**o + ((-0.220179940931-0.986438125349j))*x_ref[0] + ((-0.139127952844-0.221250958734j))*x_ref[1]**o + ((0.156029546987-0.383308724895j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.763263122858+0.647524977396j)*x[0]**o + ((0.704666922222+0.459911886619j))*x[0] + ((0.460817916915-0.807279160432j))*x[1]**o + ((0.155399674455-0.0676265505077j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.763263122858+0.647524977396j)*x_ref[0]**o + ((0.704666922222+0.459911886619j))*x_ref[0] + ((0.460817916915-0.807279160432j))*x_ref[1]**o + ((0.155399674455-0.0676265505077j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(0.651926119651+0.594451264865j)*x[0]**o + ((-0.451489644246-0.741844323049j))*x[0] + ((0.186743430443+0.209113134442j))*x[1]**o + ((-0.958551656811-0.64147355446j))*x[1]
        ref[(0, 1, 2, 0)]=(0.651926119651+0.594451264865j)*x_ref[0]**o + ((-0.451489644246-0.741844323049j))*x_ref[0] + ((0.186743430443+0.209113134442j))*x_ref[1]**o + ((-0.958551656811-0.64147355446j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(0.309488731635-0.584062739183j)*x[0]**o + ((-0.692771801491-0.737863499597j))*x[0] + ((0.146988529193+0.951954846763j))*x[1]**o + ((-0.0755441261106-0.328055412652j))*x[1]
        ref[(0, 1, 2, 1)]=(0.309488731635-0.584062739183j)*x_ref[0]**o + ((-0.692771801491-0.737863499597j))*x_ref[0] + ((0.146988529193+0.951954846763j))*x_ref[1]**o + ((-0.0755441261106-0.328055412652j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.958060965262-0.515225264131j)*x[0]**o + ((0.943932415772-0.986453160659j))*x[0] + ((0.479448481692-0.21436680202j))*x[1]**o + ((-0.664616699093-0.428361948135j))*x[1]
        ref[(0, 2, 0, 0)]=(0.958060965262-0.515225264131j)*x_ref[0]**o + ((0.943932415772-0.986453160659j))*x_ref[0] + ((0.479448481692-0.21436680202j))*x_ref[1]**o + ((-0.664616699093-0.428361948135j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(0.313198040166-0.415777899425j)*x[0]**o + ((0.159849905231-0.767304582721j))*x[0] + ((0.699117586066+0.350261200158j))*x[1]**o + ((0.0725015953372+0.98953980165j))*x[1]
        ref[(0, 2, 0, 1)]=(0.313198040166-0.415777899425j)*x_ref[0]**o + ((0.159849905231-0.767304582721j))*x_ref[0] + ((0.699117586066+0.350261200158j))*x_ref[1]**o + ((0.0725015953372+0.98953980165j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(0.954553071422-0.0194870311166j)*x[0]**o + ((-0.00882730255865-0.55563884748j))*x[0] + ((0.521941066674-0.903317973149j))*x[1]**o + ((0.0399340393193+0.335244205806j))*x[1]
        ref[(0, 2, 1, 0)]=(0.954553071422-0.0194870311166j)*x_ref[0]**o + ((-0.00882730255865-0.55563884748j))*x_ref[0] + ((0.521941066674-0.903317973149j))*x_ref[1]**o + ((0.0399340393193+0.335244205806j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(-0.959870753247-0.653143690044j)*x[0]**o + ((-0.865493986867-0.76792578856j))*x[0] + ((0.201291789041+0.201606182453j))*x[1]**o + ((0.454261130909-0.981720396756j))*x[1]
        ref[(0, 2, 1, 1)]=(-0.959870753247-0.653143690044j)*x_ref[0]**o + ((-0.865493986867-0.76792578856j))*x_ref[0] + ((0.201291789041+0.201606182453j))*x_ref[1]**o + ((0.454261130909-0.981720396756j))*x_ref[1]
        arg[(0, 2, 2, 0)]=(-0.115733946107-0.73266894071j)*x[0]**o + ((-0.846886914119+0.560770947569j))*x[0] + ((0.489747238148+0.154464757687j))*x[1]**o + ((-0.0938018880389-0.919078540461j))*x[1]
        ref[(0, 2, 2, 0)]=(-0.115733946107-0.73266894071j)*x_ref[0]**o + ((-0.846886914119+0.560770947569j))*x_ref[0] + ((0.489747238148+0.154464757687j))*x_ref[1]**o + ((-0.0938018880389-0.919078540461j))*x_ref[1]
        arg[(0, 2, 2, 1)]=(-0.935209103341+0.493197647372j)*x[0]**o + ((-0.426679241274-0.981264273962j))*x[0] + ((-0.180290604141-0.8211923846j))*x[1]**o + ((-0.668866136516-0.726854835776j))*x[1]
        ref[(0, 2, 2, 1)]=(-0.935209103341+0.493197647372j)*x_ref[0]**o + ((-0.426679241274-0.981264273962j))*x_ref[0] + ((-0.180290604141-0.8211923846j))*x_ref[1]**o + ((-0.668866136516-0.726854835776j))*x_ref[1]
        arg[(0, 3, 0, 0)]=(-0.21711169363-0.106705753277j)*x[0]**o + ((0.670565810898-0.741292579745j))*x[0] + ((0.549838719463+0.407593983071j))*x[1]**o + ((-0.716480806373+0.962007510796j))*x[1]
        ref[(0, 3, 0, 0)]=(-0.21711169363-0.106705753277j)*x_ref[0]**o + ((0.670565810898-0.741292579745j))*x_ref[0] + ((0.549838719463+0.407593983071j))*x_ref[1]**o + ((-0.716480806373+0.962007510796j))*x_ref[1]
        arg[(0, 3, 0, 1)]=(-0.206572382395+0.695425157051j)*x[0]**o + ((-0.220220184982-0.132458408951j))*x[0] + ((0.0787449129291-0.701084661703j))*x[1]**o + ((0.0228226175551-0.10517401455j))*x[1]
        ref[(0, 3, 0, 1)]=(-0.206572382395+0.695425157051j)*x_ref[0]**o + ((-0.220220184982-0.132458408951j))*x_ref[0] + ((0.0787449129291-0.701084661703j))*x_ref[1]**o + ((0.0228226175551-0.10517401455j))*x_ref[1]
        arg[(0, 3, 1, 0)]=(-0.919310143495+0.938712403338j)*x[0]**o + ((0.400540299124-0.290734486265j))*x[0] + ((0.845230986812-0.385647167282j))*x[1]**o + ((0.027068221337-0.785557692105j))*x[1]
        ref[(0, 3, 1, 0)]=(-0.919310143495+0.938712403338j)*x_ref[0]**o + ((0.400540299124-0.290734486265j))*x_ref[0] + ((0.845230986812-0.385647167282j))*x_ref[1]**o + ((0.027068221337-0.785557692105j))*x_ref[1]
        arg[(0, 3, 1, 1)]=(0.240680617293-0.177634098538j)*x[0]**o + ((0.696975325362+0.890286647412j))*x[0] + ((-0.657298966493+0.772701155339j))*x[1]**o + ((0.429753557006-0.35728389891j))*x[1]
        ref[(0, 3, 1, 1)]=(0.240680617293-0.177634098538j)*x_ref[0]**o + ((0.696975325362+0.890286647412j))*x_ref[0] + ((-0.657298966493+0.772701155339j))*x_ref[1]**o + ((0.429753557006-0.35728389891j))*x_ref[1]
        arg[(0, 3, 2, 0)]=(0.634608291805+0.344064662305j)*x[0]**o + ((-0.925728093441+0.84299737084j))*x[0] + ((0.842689205811+0.0733353239855j))*x[1]**o + ((-0.465134113067-0.25995054383j))*x[1]
        ref[(0, 3, 2, 0)]=(0.634608291805+0.344064662305j)*x_ref[0]**o + ((-0.925728093441+0.84299737084j))*x_ref[0] + ((0.842689205811+0.0733353239855j))*x_ref[1]**o + ((-0.465134113067-0.25995054383j))*x_ref[1]
        arg[(0, 3, 2, 1)]=(0.947865937387+0.158938914861j)*x[0]**o + ((0.716928907283-0.53901457574j))*x[0] + ((-0.415996571465+0.28889926015j))*x[1]**o + ((0.705417341275+0.502382662094j))*x[1]
        ref[(0, 3, 2, 1)]=(0.947865937387+0.158938914861j)*x_ref[0]**o + ((0.716928907283-0.53901457574j))*x_ref[0] + ((-0.415996571465+0.28889926015j))*x_ref[1]**o + ((0.705417341275+0.502382662094j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.850872143893-0.741174160803j)*x[0]**o + ((-0.110846221889-0.200910298046j))*x[0] + ((0.866436914459+0.33123556895j))*x[1]**o + ((-0.357847993222-0.703933719762j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.850872143893-0.741174160803j)*x_ref[0]**o + ((-0.110846221889-0.200910298046j))*x_ref[0] + ((0.866436914459+0.33123556895j))*x_ref[1]**o + ((-0.357847993222-0.703933719762j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.933032350169-0.455793916775j)*x[0]**o + ((0.0587612772948+0.364622262994j))*x[0] + ((0.497485474278-0.586106961051j))*x[1]**o + ((0.482095531483-0.882257001458j))*x[1]
        ref[(1, 0, 0, 1)]=(0.933032350169-0.455793916775j)*x_ref[0]**o + ((0.0587612772948+0.364622262994j))*x_ref[0] + ((0.497485474278-0.586106961051j))*x_ref[1]**o + ((0.482095531483-0.882257001458j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(0.543513731371-0.244767409262j)*x[0]**o + ((0.750977466374+0.864000252129j))*x[0] + ((-0.254050243486-0.227677535054j))*x[1]**o + ((-0.55131273111-0.876509995813j))*x[1]
        ref[(1, 0, 1, 0)]=(0.543513731371-0.244767409262j)*x_ref[0]**o + ((0.750977466374+0.864000252129j))*x_ref[0] + ((-0.254050243486-0.227677535054j))*x_ref[1]**o + ((-0.55131273111-0.876509995813j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.429596101093-0.33010546025j)*x[0]**o + ((0.326979105196-0.4730622492j))*x[0] + ((-0.972546021377-0.384805604481j))*x[1]**o + ((-0.889058898653+0.73753255502j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.429596101093-0.33010546025j)*x_ref[0]**o + ((0.326979105196-0.4730622492j))*x_ref[0] + ((-0.972546021377-0.384805604481j))*x_ref[1]**o + ((-0.889058898653+0.73753255502j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(-0.24199135479-0.284955874771j)*x[0]**o + ((0.593124412123+0.260865527823j))*x[0] + ((-0.806078347878-0.246458438533j))*x[1]**o + ((-0.759001723451+0.747209288255j))*x[1]
        ref[(1, 0, 2, 0)]=(-0.24199135479-0.284955874771j)*x_ref[0]**o + ((0.593124412123+0.260865527823j))*x_ref[0] + ((-0.806078347878-0.246458438533j))*x_ref[1]**o + ((-0.759001723451+0.747209288255j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(0.629977751719+0.343150811553j)*x[0]**o + ((0.571389988851+0.334414667653j))*x[0] + ((0.116508683523+0.194152509132j))*x[1]**o + ((0.890681673757+0.230509637349j))*x[1]
        ref[(1, 0, 2, 1)]=(0.629977751719+0.343150811553j)*x_ref[0]**o + ((0.571389988851+0.334414667653j))*x_ref[0] + ((0.116508683523+0.194152509132j))*x_ref[1]**o + ((0.890681673757+0.230509637349j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.576244255049-0.242826170252j)*x[0]**o + ((-0.195620366511-0.893680286979j))*x[0] + ((-0.969384288997-0.719301447444j))*x[1]**o + ((0.596088410631-0.539032768548j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.576244255049-0.242826170252j)*x_ref[0]**o + ((-0.195620366511-0.893680286979j))*x_ref[0] + ((-0.969384288997-0.719301447444j))*x_ref[1]**o + ((0.596088410631-0.539032768548j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.584133781943+0.563444986679j)*x[0]**o + ((0.448290541432+0.316690552703j))*x[0] + ((0.775009163944-0.99413172108j))*x[1]**o + ((0.763978312065-0.362500341119j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.584133781943+0.563444986679j)*x_ref[0]**o + ((0.448290541432+0.316690552703j))*x_ref[0] + ((0.775009163944-0.99413172108j))*x_ref[1]**o + ((0.763978312065-0.362500341119j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.456440554076+0.960058946359j)*x[0]**o + ((0.547682906857-0.735955592282j))*x[0] + ((-0.278232131934+0.749218887321j))*x[1]**o + ((0.901570231414+0.69366630402j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.456440554076+0.960058946359j)*x_ref[0]**o + ((0.547682906857-0.735955592282j))*x_ref[0] + ((-0.278232131934+0.749218887321j))*x_ref[1]**o + ((0.901570231414+0.69366630402j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.996821926409-0.0350444900503j)*x[0]**o + ((-0.751234138188+0.15140376671j))*x[0] + ((-0.294485387769-0.799235390621j))*x[1]**o + ((-0.0727877979488+0.139471408178j))*x[1]
        ref[(1, 1, 1, 1)]=(0.996821926409-0.0350444900503j)*x_ref[0]**o + ((-0.751234138188+0.15140376671j))*x_ref[0] + ((-0.294485387769-0.799235390621j))*x_ref[1]**o + ((-0.0727877979488+0.139471408178j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(-0.990613572023+0.873775620209j)*x[0]**o + ((0.908095408407+0.891539261948j))*x[0] + ((0.839449909056-0.0493905965441j))*x[1]**o + ((0.385411807512-0.269993647141j))*x[1]
        ref[(1, 1, 2, 0)]=(-0.990613572023+0.873775620209j)*x_ref[0]**o + ((0.908095408407+0.891539261948j))*x_ref[0] + ((0.839449909056-0.0493905965441j))*x_ref[1]**o + ((0.385411807512-0.269993647141j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(-0.358308277127-0.0391937116794j)*x[0]**o + ((0.581134080015+0.321779023772j))*x[0] + ((-0.236317538644+0.284409377702j))*x[1]**o + ((-0.708068704153+0.734200162308j))*x[1]
        ref[(1, 1, 2, 1)]=(-0.358308277127-0.0391937116794j)*x_ref[0]**o + ((0.581134080015+0.321779023772j))*x_ref[0] + ((-0.236317538644+0.284409377702j))*x_ref[1]**o + ((-0.708068704153+0.734200162308j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(0.918498591941-0.281778484401j)*x[0]**o + ((0.556331982079+0.0877099326468j))*x[0] + ((0.00338192322499-0.994643897618j))*x[1]**o + ((-0.301174877777+0.90424643171j))*x[1]
        ref[(1, 2, 0, 0)]=(0.918498591941-0.281778484401j)*x_ref[0]**o + ((0.556331982079+0.0877099326468j))*x_ref[0] + ((0.00338192322499-0.994643897618j))*x_ref[1]**o + ((-0.301174877777+0.90424643171j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(0.260891965984+0.573899368156j)*x[0]**o + ((-0.554529117048+0.25118082707j))*x[0] + ((0.0964766136902+0.393933842759j))*x[1]**o + ((-0.415196472878+0.641461283385j))*x[1]
        ref[(1, 2, 0, 1)]=(0.260891965984+0.573899368156j)*x_ref[0]**o + ((-0.554529117048+0.25118082707j))*x_ref[0] + ((0.0964766136902+0.393933842759j))*x_ref[1]**o + ((-0.415196472878+0.641461283385j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(-0.583034048264-0.706193968115j)*x[0]**o + ((-0.941505664791-0.338502907269j))*x[0] + ((0.0434050218767+0.915056519447j))*x[1]**o + ((0.470893365177+0.612495652752j))*x[1]
        ref[(1, 2, 1, 0)]=(-0.583034048264-0.706193968115j)*x_ref[0]**o + ((-0.941505664791-0.338502907269j))*x_ref[0] + ((0.0434050218767+0.915056519447j))*x_ref[1]**o + ((0.470893365177+0.612495652752j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.0285196444927-0.642394888578j)*x[0]**o + ((-0.972057703216-0.914315414507j))*x[0] + ((-0.189822211415-0.710807487277j))*x[1]**o + ((-0.789094970559-0.0171584790367j))*x[1]
        ref[(1, 2, 1, 1)]=(0.0285196444927-0.642394888578j)*x_ref[0]**o + ((-0.972057703216-0.914315414507j))*x_ref[0] + ((-0.189822211415-0.710807487277j))*x_ref[1]**o + ((-0.789094970559-0.0171584790367j))*x_ref[1]
        arg[(1, 2, 2, 0)]=(0.658389023464+0.635319605323j)*x[0]**o + ((0.0330335565305+0.573981972782j))*x[0] + ((0.173523311967+0.614621673201j))*x[1]**o + ((-0.921255333807-0.851564364088j))*x[1]
        ref[(1, 2, 2, 0)]=(0.658389023464+0.635319605323j)*x_ref[0]**o + ((0.0330335565305+0.573981972782j))*x_ref[0] + ((0.173523311967+0.614621673201j))*x_ref[1]**o + ((-0.921255333807-0.851564364088j))*x_ref[1]
        arg[(1, 2, 2, 1)]=(-0.601292092109+0.747104184594j)*x[0]**o + ((-0.64125898163+0.630714780805j))*x[0] + ((0.410697730567-0.0821069237451j))*x[1]**o + ((-0.585526330171-0.0138340117604j))*x[1]
        ref[(1, 2, 2, 1)]=(-0.601292092109+0.747104184594j)*x_ref[0]**o + ((-0.64125898163+0.630714780805j))*x_ref[0] + ((0.410697730567-0.0821069237451j))*x_ref[1]**o + ((-0.585526330171-0.0138340117604j))*x_ref[1]
        arg[(1, 3, 0, 0)]=(-0.170315721958-0.682879830938j)*x[0]**o + ((0.912587629149+0.812191993914j))*x[0] + ((0.508864463564+0.659242622032j))*x[1]**o + ((0.721980910987+0.272926344296j))*x[1]
        ref[(1, 3, 0, 0)]=(-0.170315721958-0.682879830938j)*x_ref[0]**o + ((0.912587629149+0.812191993914j))*x_ref[0] + ((0.508864463564+0.659242622032j))*x_ref[1]**o + ((0.721980910987+0.272926344296j))*x_ref[1]
        arg[(1, 3, 0, 1)]=(-0.303789187913+0.336024136576j)*x[0]**o + ((-0.120179066739-0.645504034604j))*x[0] + ((0.308122406598+0.718429625891j))*x[1]**o + ((0.326203029094-0.291176757041j))*x[1]
        ref[(1, 3, 0, 1)]=(-0.303789187913+0.336024136576j)*x_ref[0]**o + ((-0.120179066739-0.645504034604j))*x_ref[0] + ((0.308122406598+0.718429625891j))*x_ref[1]**o + ((0.326203029094-0.291176757041j))*x_ref[1]
        arg[(1, 3, 1, 0)]=(-0.241062289677-0.538508178587j)*x[0]**o + ((0.775977361618+0.0745216977405j))*x[0] + ((0.655356633868-0.455964097748j))*x[1]**o + ((0.239766203558-0.213240827201j))*x[1]
        ref[(1, 3, 1, 0)]=(-0.241062289677-0.538508178587j)*x_ref[0]**o + ((0.775977361618+0.0745216977405j))*x_ref[0] + ((0.655356633868-0.455964097748j))*x_ref[1]**o + ((0.239766203558-0.213240827201j))*x_ref[1]
        arg[(1, 3, 1, 1)]=(0.647140929233+0.436437714794j)*x[0]**o + ((0.645908970875+0.936111911792j))*x[0] + ((0.628461523811-0.596400827887j))*x[1]**o + ((0.848547006575+0.00348066694044j))*x[1]
        ref[(1, 3, 1, 1)]=(0.647140929233+0.436437714794j)*x_ref[0]**o + ((0.645908970875+0.936111911792j))*x_ref[0] + ((0.628461523811-0.596400827887j))*x_ref[1]**o + ((0.848547006575+0.00348066694044j))*x_ref[1]
        arg[(1, 3, 2, 0)]=(0.804973918771-0.621473831426j)*x[0]**o + ((-0.155606834176+0.173289328855j))*x[0] + ((0.638239760855-0.909572824946j))*x[1]**o + ((0.0184104444699+0.0900337892725j))*x[1]
        ref[(1, 3, 2, 0)]=(0.804973918771-0.621473831426j)*x_ref[0]**o + ((-0.155606834176+0.173289328855j))*x_ref[0] + ((0.638239760855-0.909572824946j))*x_ref[1]**o + ((0.0184104444699+0.0900337892725j))*x_ref[1]
        arg[(1, 3, 2, 1)]=(-0.718385749463-0.811806506408j)*x[0]**o + ((0.937454599818-0.163875112608j))*x[0] + ((-0.162071290611+0.581098250077j))*x[1]**o + ((0.966946061355-0.774042455403j))*x[1]
        ref[(1, 3, 2, 1)]=(-0.718385749463-0.811806506408j)*x_ref[0]**o + ((0.937454599818-0.163875112608j))*x_ref[0] + ((-0.162071290611+0.581098250077j))*x_ref[1]**o + ((0.966946061355-0.774042455403j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.317365559676+0.509450918212j)*x[2]**o + ((-0.864350668581-0.74804428982j))*x[2]
            ref[(0, 0, 0, 0)]+=(-0.317365559676+0.509450918212j)*x_ref[2]**o + ((-0.864350668581-0.74804428982j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.418583207521+0.839574918739j)*x[2]**o + ((0.846696670669-0.526890313405j))*x[2]
            ref[(0, 0, 0, 1)]+=(-0.418583207521+0.839574918739j)*x_ref[2]**o + ((0.846696670669-0.526890313405j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.484144800981+0.839787940536j)*x[2]**o + ((0.717697869338-0.62741767623j))*x[2]
            ref[(0, 0, 1, 0)]+=(0.484144800981+0.839787940536j)*x_ref[2]**o + ((0.717697869338-0.62741767623j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.877720834384+0.664461945304j)*x[2]**o + ((-0.566287904719+0.274819055532j))*x[2]
            ref[(0, 0, 1, 1)]+=(-0.877720834384+0.664461945304j)*x_ref[2]**o + ((-0.566287904719+0.274819055532j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(-0.712735188929-0.816103763594j)*x[2]**o + ((-0.241503283814-0.47524447512j))*x[2]
            ref[(0, 0, 2, 0)]+=(-0.712735188929-0.816103763594j)*x_ref[2]**o + ((-0.241503283814-0.47524447512j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(0.635884200522-0.454107543212j)*x[2]**o + ((-0.187964967935-0.931673861557j))*x[2]
            ref[(0, 0, 2, 1)]+=(0.635884200522-0.454107543212j)*x_ref[2]**o + ((-0.187964967935-0.931673861557j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.357446752176-0.726559416219j)*x[2]**o + ((0.293566201033+0.456062297936j))*x[2]
            ref[(0, 1, 0, 0)]+=(-0.357446752176-0.726559416219j)*x_ref[2]**o + ((0.293566201033+0.456062297936j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.799076223642+0.540954145207j)*x[2]**o + ((0.727644379489+0.642870400774j))*x[2]
            ref[(0, 1, 0, 1)]+=(0.799076223642+0.540954145207j)*x_ref[2]**o + ((0.727644379489+0.642870400774j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.0285881257684-0.595127122752j)*x[2]**o + ((0.707719771248-0.338270964078j))*x[2]
            ref[(0, 1, 1, 0)]+=(0.0285881257684-0.595127122752j)*x_ref[2]**o + ((0.707719771248-0.338270964078j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.384812326209-0.7012432544j)*x[2]**o + ((-0.0454181347556+0.8806110846j))*x[2]
            ref[(0, 1, 1, 1)]+=(0.384812326209-0.7012432544j)*x_ref[2]**o + ((-0.0454181347556+0.8806110846j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(0.510932890935+0.755509841682j)*x[2]**o + ((0.0493357741462-0.0976686465761j))*x[2]
            ref[(0, 1, 2, 0)]+=(0.510932890935+0.755509841682j)*x_ref[2]**o + ((0.0493357741462-0.0976686465761j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(0.675063918649+0.747222608306j)*x[2]**o + ((0.891557200772+0.764610223617j))*x[2]
            ref[(0, 1, 2, 1)]+=(0.675063918649+0.747222608306j)*x_ref[2]**o + ((0.891557200772+0.764610223617j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(-0.670012928679+0.806508344253j)*x[2]**o + ((-0.218483466503-0.0572005990657j))*x[2]
            ref[(0, 2, 0, 0)]+=(-0.670012928679+0.806508344253j)*x_ref[2]**o + ((-0.218483466503-0.0572005990657j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(0.725818708093-0.429734609139j)*x[2]**o + ((0.612878179023-0.878527028923j))*x[2]
            ref[(0, 2, 0, 1)]+=(0.725818708093-0.429734609139j)*x_ref[2]**o + ((0.612878179023-0.878527028923j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.421415207725-0.268072882652j)*x[2]**o + ((-0.354126017918+0.542191874307j))*x[2]
            ref[(0, 2, 1, 0)]+=(-0.421415207725-0.268072882652j)*x_ref[2]**o + ((-0.354126017918+0.542191874307j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(-0.322599734061-0.182949926373j)*x[2]**o + ((-0.651210799272-0.831215173678j))*x[2]
            ref[(0, 2, 1, 1)]+=(-0.322599734061-0.182949926373j)*x_ref[2]**o + ((-0.651210799272-0.831215173678j))*x_ref[2]
            arg[(0, 2, 2, 0)]+=(0.664402248622-0.94126253661j)*x[2]**o + ((-0.476255563986+0.684293285347j))*x[2]
            ref[(0, 2, 2, 0)]+=(0.664402248622-0.94126253661j)*x_ref[2]**o + ((-0.476255563986+0.684293285347j))*x_ref[2]
            arg[(0, 2, 2, 1)]+=(-0.260526364769+0.506454446735j)*x[2]**o + ((0.990430758339+0.96387853647j))*x[2]
            ref[(0, 2, 2, 1)]+=(-0.260526364769+0.506454446735j)*x_ref[2]**o + ((0.990430758339+0.96387853647j))*x_ref[2]
            arg[(0, 3, 0, 0)]+=(-0.647686342244+0.0637577282518j)*x[2]**o + ((0.862484365747-0.534272643474j))*x[2]
            ref[(0, 3, 0, 0)]+=(-0.647686342244+0.0637577282518j)*x_ref[2]**o + ((0.862484365747-0.534272643474j))*x_ref[2]
            arg[(0, 3, 0, 1)]+=(0.836698590004-0.941451295915j)*x[2]**o + ((0.86483380272-0.446761524723j))*x[2]
            ref[(0, 3, 0, 1)]+=(0.836698590004-0.941451295915j)*x_ref[2]**o + ((0.86483380272-0.446761524723j))*x_ref[2]
            arg[(0, 3, 1, 0)]+=(0.355854851882-0.663213803151j)*x[2]**o + ((-0.0784004372339-0.10012455387j))*x[2]
            ref[(0, 3, 1, 0)]+=(0.355854851882-0.663213803151j)*x_ref[2]**o + ((-0.0784004372339-0.10012455387j))*x_ref[2]
            arg[(0, 3, 1, 1)]+=(-0.0420513100513+0.655633620241j)*x[2]**o + ((-0.539322105591+0.88467633978j))*x[2]
            ref[(0, 3, 1, 1)]+=(-0.0420513100513+0.655633620241j)*x_ref[2]**o + ((-0.539322105591+0.88467633978j))*x_ref[2]
            arg[(0, 3, 2, 0)]+=(-0.181894729494-0.564755240206j)*x[2]**o + ((-0.921179441749-0.221361751128j))*x[2]
            ref[(0, 3, 2, 0)]+=(-0.181894729494-0.564755240206j)*x_ref[2]**o + ((-0.921179441749-0.221361751128j))*x_ref[2]
            arg[(0, 3, 2, 1)]+=(0.858180231922-0.46248185488j)*x[2]**o + ((0.421985636453-0.0515428093653j))*x[2]
            ref[(0, 3, 2, 1)]+=(0.858180231922-0.46248185488j)*x_ref[2]**o + ((0.421985636453-0.0515428093653j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.504634191884-0.159844313285j)*x[2]**o + ((-0.409510075506+0.807987740997j))*x[2]
            ref[(1, 0, 0, 0)]+=(0.504634191884-0.159844313285j)*x_ref[2]**o + ((-0.409510075506+0.807987740997j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.152782218538-0.252647571814j)*x[2]**o + ((-0.594744638223-0.169566314207j))*x[2]
            ref[(1, 0, 0, 1)]+=(0.152782218538-0.252647571814j)*x_ref[2]**o + ((-0.594744638223-0.169566314207j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.033950774788+0.82548750763j)*x[2]**o + ((-0.266585866931-0.604786282411j))*x[2]
            ref[(1, 0, 1, 0)]+=(-0.033950774788+0.82548750763j)*x_ref[2]**o + ((-0.266585866931-0.604786282411j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.0724099306224+0.771740739375j)*x[2]**o + ((0.773093064432+0.412932461533j))*x[2]
            ref[(1, 0, 1, 1)]+=(0.0724099306224+0.771740739375j)*x_ref[2]**o + ((0.773093064432+0.412932461533j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(-0.0372295177639-0.256613092088j)*x[2]**o + ((-0.978072389863+0.825932419906j))*x[2]
            ref[(1, 0, 2, 0)]+=(-0.0372295177639-0.256613092088j)*x_ref[2]**o + ((-0.978072389863+0.825932419906j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(-0.445732014723-0.0332618971149j)*x[2]**o + ((0.752696997516+0.515190525139j))*x[2]
            ref[(1, 0, 2, 1)]+=(-0.445732014723-0.0332618971149j)*x_ref[2]**o + ((0.752696997516+0.515190525139j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.174714226665+0.5408799383j)*x[2]**o + ((-0.875919505205+0.656198681723j))*x[2]
            ref[(1, 1, 0, 0)]+=(0.174714226665+0.5408799383j)*x_ref[2]**o + ((-0.875919505205+0.656198681723j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.579853147485-0.62501378133j)*x[2]**o + ((0.31846361007-0.262562923523j))*x[2]
            ref[(1, 1, 0, 1)]+=(-0.579853147485-0.62501378133j)*x_ref[2]**o + ((0.31846361007-0.262562923523j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.427137898027-0.652375893602j)*x[2]**o + ((-0.359883430992+0.791898196632j))*x[2]
            ref[(1, 1, 1, 0)]+=(0.427137898027-0.652375893602j)*x_ref[2]**o + ((-0.359883430992+0.791898196632j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.198529671583-0.955016541738j)*x[2]**o + ((-0.660648588595-0.167323019284j))*x[2]
            ref[(1, 1, 1, 1)]+=(-0.198529671583-0.955016541738j)*x_ref[2]**o + ((-0.660648588595-0.167323019284j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(-0.105080666085+0.639149194487j)*x[2]**o + ((0.790382519265+0.134406049626j))*x[2]
            ref[(1, 1, 2, 0)]+=(-0.105080666085+0.639149194487j)*x_ref[2]**o + ((0.790382519265+0.134406049626j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(-0.162806811177-0.523741495971j)*x[2]**o + ((0.94303861716-0.973262153965j))*x[2]
            ref[(1, 1, 2, 1)]+=(-0.162806811177-0.523741495971j)*x_ref[2]**o + ((0.94303861716-0.973262153965j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.635977618201+0.493282357854j)*x[2]**o + ((-0.229636798325-0.700174993683j))*x[2]
            ref[(1, 2, 0, 0)]+=(0.635977618201+0.493282357854j)*x_ref[2]**o + ((-0.229636798325-0.700174993683j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(0.275464481064-0.370553374108j)*x[2]**o + ((-0.594734313451-0.31805152509j))*x[2]
            ref[(1, 2, 0, 1)]+=(0.275464481064-0.370553374108j)*x_ref[2]**o + ((-0.594734313451-0.31805152509j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(-0.427622483748-0.800042187677j)*x[2]**o + ((-0.125829140947-0.579124441863j))*x[2]
            ref[(1, 2, 1, 0)]+=(-0.427622483748-0.800042187677j)*x_ref[2]**o + ((-0.125829140947-0.579124441863j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(0.722378284332-0.0737673231555j)*x[2]**o + ((-0.25116467064-0.727772506035j))*x[2]
            ref[(1, 2, 1, 1)]+=(0.722378284332-0.0737673231555j)*x_ref[2]**o + ((-0.25116467064-0.727772506035j))*x_ref[2]
            arg[(1, 2, 2, 0)]+=(0.516779848805-0.388748984318j)*x[2]**o + ((-0.847883977926+0.279141484371j))*x[2]
            ref[(1, 2, 2, 0)]+=(0.516779848805-0.388748984318j)*x_ref[2]**o + ((-0.847883977926+0.279141484371j))*x_ref[2]
            arg[(1, 2, 2, 1)]+=(0.765616102346-0.391114782254j)*x[2]**o + ((0.900671778731+0.673321879475j))*x[2]
            ref[(1, 2, 2, 1)]+=(0.765616102346-0.391114782254j)*x_ref[2]**o + ((0.900671778731+0.673321879475j))*x_ref[2]
            arg[(1, 3, 0, 0)]+=(0.3758553099+0.0145588839943j)*x[2]**o + ((0.708984228076-0.985796823608j))*x[2]
            ref[(1, 3, 0, 0)]+=(0.3758553099+0.0145588839943j)*x_ref[2]**o + ((0.708984228076-0.985796823608j))*x_ref[2]
            arg[(1, 3, 0, 1)]+=(0.0453428065583-0.545746773092j)*x[2]**o + ((-0.52470593748-0.747841031272j))*x[2]
            ref[(1, 3, 0, 1)]+=(0.0453428065583-0.545746773092j)*x_ref[2]**o + ((-0.52470593748-0.747841031272j))*x_ref[2]
            arg[(1, 3, 1, 0)]+=(-0.952438209126+0.795953820108j)*x[2]**o + ((-0.830401005927-0.0706726740441j))*x[2]
            ref[(1, 3, 1, 0)]+=(-0.952438209126+0.795953820108j)*x_ref[2]**o + ((-0.830401005927-0.0706726740441j))*x_ref[2]
            arg[(1, 3, 1, 1)]+=(-0.314533997617+0.158069568278j)*x[2]**o + ((0.843446209234-0.433802418861j))*x[2]
            ref[(1, 3, 1, 1)]+=(-0.314533997617+0.158069568278j)*x_ref[2]**o + ((0.843446209234-0.433802418861j))*x_ref[2]
            arg[(1, 3, 2, 0)]+=(0.862445365534+0.622755444812j)*x[2]**o + ((-0.584319135973-0.756523305413j))*x[2]
            ref[(1, 3, 2, 0)]+=(0.862445365534+0.622755444812j)*x_ref[2]**o + ((-0.584319135973-0.756523305413j))*x_ref[2]
            arg[(1, 3, 2, 1)]+=(0.92072421511+0.841680466324j)*x[2]**o + ((-0.0247619733422-0.528592858047j))*x[2]
            ref[(1, 3, 2, 1)]+=(0.92072421511+0.841680466324j)*x_ref[2]**o + ((-0.0247619733422-0.528592858047j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_ReducedSolution_rank0(self):
        """
        tests interpolation of rank 0 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.438850259538+0.271938348589j)*x[0] + ((-0.54318957348+0.73599491086j))*x[1]
        ref=(0.438850259538+0.271938348589j)*x_ref[0] + ((-0.54318957348+0.73599491086j))*x_ref[1]
        if dim==3:
            arg+=((0.655827311755-0.0407121842584j))*x[2]
            ref+=((0.655827311755-0.0407121842584j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_ReducedSolution_rank1(self):
        """
        tests interpolation of rank 1 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=(-0.66200232529+0.837750820678j)*x[0] + ((-0.227696244674-0.32118174033j))*x[1]
        ref[(0,)]=(-0.66200232529+0.837750820678j)*x_ref[0] + ((-0.227696244674-0.32118174033j))*x_ref[1]
        arg[(1,)]=(0.579274343307+0.793363511379j)*x[0] + ((0.699877695632-0.654353655504j))*x[1]
        ref[(1,)]=(0.579274343307+0.793363511379j)*x_ref[0] + ((0.699877695632-0.654353655504j))*x_ref[1]
        arg[(2,)]=(0.944280240843+0.266288560163j)*x[0] + ((0.55749903564-0.952010517544j))*x[1]
        ref[(2,)]=(0.944280240843+0.266288560163j)*x_ref[0] + ((0.55749903564-0.952010517544j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.246834500892-0.726290329095j)*x[2]
            ref[(0,)]+=(-0.246834500892-0.726290329095j)*x_ref[2]
            arg[(1,)]+=(-0.533141565217-0.178124390405j)*x[2]
            ref[(1,)]+=(-0.533141565217-0.178124390405j)*x_ref[2]
            arg[(2,)]+=(-0.0100433160098+0.63065425183j)*x[2]
            ref[(2,)]+=(-0.0100433160098+0.63065425183j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_ReducedSolution_rank2(self):
        """
        tests interpolation of rank 2 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref = Data(0,(2, 2),w_ref)
        arg[(0, 0)]=(-0.61506537007+0.373411884659j)*x[0] + ((0.881390473769+0.613868273933j))*x[1]
        ref[(0, 0)]=(-0.61506537007+0.373411884659j)*x_ref[0] + ((0.881390473769+0.613868273933j))*x_ref[1]
        arg[(0, 1)]=(-0.426574832973+0.994313238009j)*x[0] + ((-0.0161653251759+0.634314028344j))*x[1]
        ref[(0, 1)]=(-0.426574832973+0.994313238009j)*x_ref[0] + ((-0.0161653251759+0.634314028344j))*x_ref[1]
        arg[(1, 0)]=(0.580219178358-0.0973164626485j)*x[0] + ((0.188189356451+0.482888579143j))*x[1]
        ref[(1, 0)]=(0.580219178358-0.0973164626485j)*x_ref[0] + ((0.188189356451+0.482888579143j))*x_ref[1]
        arg[(1, 1)]=(0.672985057874-0.918221907369j)*x[0] + ((0.0880487759826-0.175527358938j))*x[1]
        ref[(1, 1)]=(0.672985057874-0.918221907369j)*x_ref[0] + ((0.0880487759826-0.175527358938j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.461825943602-0.486928791497j)*x[2]
            ref[(0, 0)]+=(0.461825943602-0.486928791497j)*x_ref[2]
            arg[(0, 1)]+=(-0.518355081925-0.889581366677j)*x[2]
            ref[(0, 1)]+=(-0.518355081925-0.889581366677j)*x_ref[2]
            arg[(1, 0)]+=(-0.903478113139-0.174542019331j)*x[2]
            ref[(1, 0)]+=(-0.903478113139-0.174542019331j)*x_ref[2]
            arg[(1, 1)]+=(0.264679072593-0.0325214419041j)*x[2]
            ref[(1, 1)]+=(0.264679072593-0.0325214419041j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_ReducedSolution_rank3(self):
        """
        tests interpolation of rank 3 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 4),w)
        ref = Data(0,(4, 3, 4),w_ref)
        arg[(0, 0, 0)]=(-0.201117437878-0.525640262642j)*x[0] + ((-0.698328992611+0.483089407053j))*x[1]
        ref[(0, 0, 0)]=(-0.201117437878-0.525640262642j)*x_ref[0] + ((-0.698328992611+0.483089407053j))*x_ref[1]
        arg[(0, 0, 1)]=(0.900658305126-0.359030553763j)*x[0] + ((-0.465331375535+0.433996472429j))*x[1]
        ref[(0, 0, 1)]=(0.900658305126-0.359030553763j)*x_ref[0] + ((-0.465331375535+0.433996472429j))*x_ref[1]
        arg[(0, 0, 2)]=(0.956550937322-0.0080481260797j)*x[0] + ((-0.289264087273-0.773315720708j))*x[1]
        ref[(0, 0, 2)]=(0.956550937322-0.0080481260797j)*x_ref[0] + ((-0.289264087273-0.773315720708j))*x_ref[1]
        arg[(0, 0, 3)]=(0.3014623331-0.155442401912j)*x[0] + ((0.26961227099-0.379808396274j))*x[1]
        ref[(0, 0, 3)]=(0.3014623331-0.155442401912j)*x_ref[0] + ((0.26961227099-0.379808396274j))*x_ref[1]
        arg[(0, 1, 0)]=(0.558232962364+0.815491631689j)*x[0] + ((-0.481403903706-0.56880386468j))*x[1]
        ref[(0, 1, 0)]=(0.558232962364+0.815491631689j)*x_ref[0] + ((-0.481403903706-0.56880386468j))*x_ref[1]
        arg[(0, 1, 1)]=(0.227811582644-0.0507980549015j)*x[0] + ((0.809472842011+0.83523879853j))*x[1]
        ref[(0, 1, 1)]=(0.227811582644-0.0507980549015j)*x_ref[0] + ((0.809472842011+0.83523879853j))*x_ref[1]
        arg[(0, 1, 2)]=(0.692905690535+0.0244929956142j)*x[0] + ((-0.845113697699+0.111806951315j))*x[1]
        ref[(0, 1, 2)]=(0.692905690535+0.0244929956142j)*x_ref[0] + ((-0.845113697699+0.111806951315j))*x_ref[1]
        arg[(0, 1, 3)]=(-0.877153235157-0.118294035411j)*x[0] + ((-0.761851604868-0.427805394787j))*x[1]
        ref[(0, 1, 3)]=(-0.877153235157-0.118294035411j)*x_ref[0] + ((-0.761851604868-0.427805394787j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.486082282782-0.57927127139j)*x[0] + ((-0.51797313149+0.994641346208j))*x[1]
        ref[(0, 2, 0)]=(-0.486082282782-0.57927127139j)*x_ref[0] + ((-0.51797313149+0.994641346208j))*x_ref[1]
        arg[(0, 2, 1)]=(0.971962538338-0.400876437541j)*x[0] + ((-0.382883121394-0.857711418594j))*x[1]
        ref[(0, 2, 1)]=(0.971962538338-0.400876437541j)*x_ref[0] + ((-0.382883121394-0.857711418594j))*x_ref[1]
        arg[(0, 2, 2)]=(-0.354369323397+0.520919026423j)*x[0] + ((-0.836886009467-0.0159536288955j))*x[1]
        ref[(0, 2, 2)]=(-0.354369323397+0.520919026423j)*x_ref[0] + ((-0.836886009467-0.0159536288955j))*x_ref[1]
        arg[(0, 2, 3)]=(0.32400349137+0.404061669333j)*x[0] + ((0.940421212902-0.42695104245j))*x[1]
        ref[(0, 2, 3)]=(0.32400349137+0.404061669333j)*x_ref[0] + ((0.940421212902-0.42695104245j))*x_ref[1]
        arg[(1, 0, 0)]=(0.847563481614-0.900740375368j)*x[0] + ((0.257426107773+0.439593477019j))*x[1]
        ref[(1, 0, 0)]=(0.847563481614-0.900740375368j)*x_ref[0] + ((0.257426107773+0.439593477019j))*x_ref[1]
        arg[(1, 0, 1)]=(0.38867675237+0.311708999467j)*x[0] + ((-0.80590283936-0.9082348666j))*x[1]
        ref[(1, 0, 1)]=(0.38867675237+0.311708999467j)*x_ref[0] + ((-0.80590283936-0.9082348666j))*x_ref[1]
        arg[(1, 0, 2)]=(0.444523332819+0.112466389861j)*x[0] + ((-0.77104876514-0.129109648248j))*x[1]
        ref[(1, 0, 2)]=(0.444523332819+0.112466389861j)*x_ref[0] + ((-0.77104876514-0.129109648248j))*x_ref[1]
        arg[(1, 0, 3)]=(0.130606479363-0.0687778272659j)*x[0] + ((-0.599721462279-0.739005599749j))*x[1]
        ref[(1, 0, 3)]=(0.130606479363-0.0687778272659j)*x_ref[0] + ((-0.599721462279-0.739005599749j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.022079819182-0.939516710548j)*x[0] + ((-0.689215629496+0.52235600102j))*x[1]
        ref[(1, 1, 0)]=(-0.022079819182-0.939516710548j)*x_ref[0] + ((-0.689215629496+0.52235600102j))*x_ref[1]
        arg[(1, 1, 1)]=(0.803618062118-0.447719594924j)*x[0] + ((0.150221768828+0.745554596851j))*x[1]
        ref[(1, 1, 1)]=(0.803618062118-0.447719594924j)*x_ref[0] + ((0.150221768828+0.745554596851j))*x_ref[1]
        arg[(1, 1, 2)]=(0.00351199113841+0.916800438674j)*x[0] + ((0.222856407385+0.456511274836j))*x[1]
        ref[(1, 1, 2)]=(0.00351199113841+0.916800438674j)*x_ref[0] + ((0.222856407385+0.456511274836j))*x_ref[1]
        arg[(1, 1, 3)]=(0.379391566923-0.186801033837j)*x[0] + ((0.81977529917+0.755548606364j))*x[1]
        ref[(1, 1, 3)]=(0.379391566923-0.186801033837j)*x_ref[0] + ((0.81977529917+0.755548606364j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.604381364862+0.36845285769j)*x[0] + ((-0.777630709188-0.278380801029j))*x[1]
        ref[(1, 2, 0)]=(-0.604381364862+0.36845285769j)*x_ref[0] + ((-0.777630709188-0.278380801029j))*x_ref[1]
        arg[(1, 2, 1)]=(0.175412583375-0.761247678537j)*x[0] + ((0.594079746168-0.515267947708j))*x[1]
        ref[(1, 2, 1)]=(0.175412583375-0.761247678537j)*x_ref[0] + ((0.594079746168-0.515267947708j))*x_ref[1]
        arg[(1, 2, 2)]=(0.023759997814-0.411749845799j)*x[0] + ((0.924871877104-0.753085378925j))*x[1]
        ref[(1, 2, 2)]=(0.023759997814-0.411749845799j)*x_ref[0] + ((0.924871877104-0.753085378925j))*x_ref[1]
        arg[(1, 2, 3)]=(-0.731705620368+0.632812981367j)*x[0] + ((-0.175340151594+0.913915266074j))*x[1]
        ref[(1, 2, 3)]=(-0.731705620368+0.632812981367j)*x_ref[0] + ((-0.175340151594+0.913915266074j))*x_ref[1]
        arg[(2, 0, 0)]=(0.155544623574-0.539917908747j)*x[0] + ((-0.134690676783+0.76499635553j))*x[1]
        ref[(2, 0, 0)]=(0.155544623574-0.539917908747j)*x_ref[0] + ((-0.134690676783+0.76499635553j))*x_ref[1]
        arg[(2, 0, 1)]=(-0.652519009556-0.184985433409j)*x[0] + ((0.667281617647+0.888565708698j))*x[1]
        ref[(2, 0, 1)]=(-0.652519009556-0.184985433409j)*x_ref[0] + ((0.667281617647+0.888565708698j))*x_ref[1]
        arg[(2, 0, 2)]=(0.691856472418+0.761700560617j)*x[0] + ((-0.391922092339-0.407374604027j))*x[1]
        ref[(2, 0, 2)]=(0.691856472418+0.761700560617j)*x_ref[0] + ((-0.391922092339-0.407374604027j))*x_ref[1]
        arg[(2, 0, 3)]=(0.0868436731063-0.0125656699377j)*x[0] + ((0.0941226974972-0.16261336441j))*x[1]
        ref[(2, 0, 3)]=(0.0868436731063-0.0125656699377j)*x_ref[0] + ((0.0941226974972-0.16261336441j))*x_ref[1]
        arg[(2, 1, 0)]=(-0.722795141635+0.330793135491j)*x[0] + ((-0.362507765237+0.797184090653j))*x[1]
        ref[(2, 1, 0)]=(-0.722795141635+0.330793135491j)*x_ref[0] + ((-0.362507765237+0.797184090653j))*x_ref[1]
        arg[(2, 1, 1)]=(0.874748448314-0.0866805338178j)*x[0] + ((-0.543090090143+0.398214088355j))*x[1]
        ref[(2, 1, 1)]=(0.874748448314-0.0866805338178j)*x_ref[0] + ((-0.543090090143+0.398214088355j))*x_ref[1]
        arg[(2, 1, 2)]=(0.773121985967+0.786540975537j)*x[0] + ((-0.358584016874+0.242891319787j))*x[1]
        ref[(2, 1, 2)]=(0.773121985967+0.786540975537j)*x_ref[0] + ((-0.358584016874+0.242891319787j))*x_ref[1]
        arg[(2, 1, 3)]=(0.346764990858-0.926099824469j)*x[0] + ((-0.874661786027-0.211864945935j))*x[1]
        ref[(2, 1, 3)]=(0.346764990858-0.926099824469j)*x_ref[0] + ((-0.874661786027-0.211864945935j))*x_ref[1]
        arg[(2, 2, 0)]=(-0.667809441392-0.888615229883j)*x[0] + ((0.850987873461-0.576499753624j))*x[1]
        ref[(2, 2, 0)]=(-0.667809441392-0.888615229883j)*x_ref[0] + ((0.850987873461-0.576499753624j))*x_ref[1]
        arg[(2, 2, 1)]=(0.411525811916+0.460769484297j)*x[0] + ((-0.307884728267+0.612407762625j))*x[1]
        ref[(2, 2, 1)]=(0.411525811916+0.460769484297j)*x_ref[0] + ((-0.307884728267+0.612407762625j))*x_ref[1]
        arg[(2, 2, 2)]=(0.643452198013-0.664578972087j)*x[0] + ((-0.663506788374+0.149975035065j))*x[1]
        ref[(2, 2, 2)]=(0.643452198013-0.664578972087j)*x_ref[0] + ((-0.663506788374+0.149975035065j))*x_ref[1]
        arg[(2, 2, 3)]=(-0.47421468164-0.436403884625j)*x[0] + ((0.293012627103-0.755420885345j))*x[1]
        ref[(2, 2, 3)]=(-0.47421468164-0.436403884625j)*x_ref[0] + ((0.293012627103-0.755420885345j))*x_ref[1]
        arg[(3, 0, 0)]=(-0.140374960003+0.556764015108j)*x[0] + ((0.036524363336-0.156370785876j))*x[1]
        ref[(3, 0, 0)]=(-0.140374960003+0.556764015108j)*x_ref[0] + ((0.036524363336-0.156370785876j))*x_ref[1]
        arg[(3, 0, 1)]=(-0.94394720643+0.040887288489j)*x[0] + ((0.54237504512+0.401204168437j))*x[1]
        ref[(3, 0, 1)]=(-0.94394720643+0.040887288489j)*x_ref[0] + ((0.54237504512+0.401204168437j))*x_ref[1]
        arg[(3, 0, 2)]=(-0.474464771417+0.842841769058j)*x[0] + ((0.374382236584+0.139023584278j))*x[1]
        ref[(3, 0, 2)]=(-0.474464771417+0.842841769058j)*x_ref[0] + ((0.374382236584+0.139023584278j))*x_ref[1]
        arg[(3, 0, 3)]=(-0.880144391468-0.442689696592j)*x[0] + ((-0.330516516652-0.74263285876j))*x[1]
        ref[(3, 0, 3)]=(-0.880144391468-0.442689696592j)*x_ref[0] + ((-0.330516516652-0.74263285876j))*x_ref[1]
        arg[(3, 1, 0)]=(-0.922182873126-0.732214481822j)*x[0] + ((0.19862157964-0.125426522556j))*x[1]
        ref[(3, 1, 0)]=(-0.922182873126-0.732214481822j)*x_ref[0] + ((0.19862157964-0.125426522556j))*x_ref[1]
        arg[(3, 1, 1)]=(0.440552417896+0.575960994875j)*x[0] + ((0.288928575303-0.919146594346j))*x[1]
        ref[(3, 1, 1)]=(0.440552417896+0.575960994875j)*x_ref[0] + ((0.288928575303-0.919146594346j))*x_ref[1]
        arg[(3, 1, 2)]=(-0.175610287898+0.725673307029j)*x[0] + ((0.84052731212-0.361912851341j))*x[1]
        ref[(3, 1, 2)]=(-0.175610287898+0.725673307029j)*x_ref[0] + ((0.84052731212-0.361912851341j))*x_ref[1]
        arg[(3, 1, 3)]=(0.0328029619129+0.537478772224j)*x[0] + ((-0.331165655058-0.381699899502j))*x[1]
        ref[(3, 1, 3)]=(0.0328029619129+0.537478772224j)*x_ref[0] + ((-0.331165655058-0.381699899502j))*x_ref[1]
        arg[(3, 2, 0)]=(0.835681549987+0.609090847269j)*x[0] + ((0.417460858906+0.727547479803j))*x[1]
        ref[(3, 2, 0)]=(0.835681549987+0.609090847269j)*x_ref[0] + ((0.417460858906+0.727547479803j))*x_ref[1]
        arg[(3, 2, 1)]=(0.757358824718+0.0452590174467j)*x[0] + ((0.620393733928+0.777033571385j))*x[1]
        ref[(3, 2, 1)]=(0.757358824718+0.0452590174467j)*x_ref[0] + ((0.620393733928+0.777033571385j))*x_ref[1]
        arg[(3, 2, 2)]=(0.131240595305-0.391048012534j)*x[0] + ((-0.0383323323861-0.757745435014j))*x[1]
        ref[(3, 2, 2)]=(0.131240595305-0.391048012534j)*x_ref[0] + ((-0.0383323323861-0.757745435014j))*x_ref[1]
        arg[(3, 2, 3)]=(0.691194456564-0.00789224555926j)*x[0] + ((-0.709103863715-0.813829353464j))*x[1]
        ref[(3, 2, 3)]=(0.691194456564-0.00789224555926j)*x_ref[0] + ((-0.709103863715-0.813829353464j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.894073230389+0.347494291185j)*x[2]
            ref[(0, 0, 0)]+=(-0.894073230389+0.347494291185j)*x_ref[2]
            arg[(0, 0, 1)]+=(0.994543088163-0.626692537241j)*x[2]
            ref[(0, 0, 1)]+=(0.994543088163-0.626692537241j)*x_ref[2]
            arg[(0, 0, 2)]+=(-0.230833900367-0.30361839933j)*x[2]
            ref[(0, 0, 2)]+=(-0.230833900367-0.30361839933j)*x_ref[2]
            arg[(0, 0, 3)]+=(-0.227193925999-0.806095050177j)*x[2]
            ref[(0, 0, 3)]+=(-0.227193925999-0.806095050177j)*x_ref[2]
            arg[(0, 1, 0)]+=(-0.423636633996+0.845031452635j)*x[2]
            ref[(0, 1, 0)]+=(-0.423636633996+0.845031452635j)*x_ref[2]
            arg[(0, 1, 1)]+=(0.779608183422-0.874469229721j)*x[2]
            ref[(0, 1, 1)]+=(0.779608183422-0.874469229721j)*x_ref[2]
            arg[(0, 1, 2)]+=(0.863157219858+0.86523117163j)*x[2]
            ref[(0, 1, 2)]+=(0.863157219858+0.86523117163j)*x_ref[2]
            arg[(0, 1, 3)]+=(0.473254188713+0.909601776315j)*x[2]
            ref[(0, 1, 3)]+=(0.473254188713+0.909601776315j)*x_ref[2]
            arg[(0, 2, 0)]+=(0.780754934488+0.733247756266j)*x[2]
            ref[(0, 2, 0)]+=(0.780754934488+0.733247756266j)*x_ref[2]
            arg[(0, 2, 1)]+=(0.298915004403+0.664228128127j)*x[2]
            ref[(0, 2, 1)]+=(0.298915004403+0.664228128127j)*x_ref[2]
            arg[(0, 2, 2)]+=(-0.480451691163+0.606084557576j)*x[2]
            ref[(0, 2, 2)]+=(-0.480451691163+0.606084557576j)*x_ref[2]
            arg[(0, 2, 3)]+=(-0.172076186611+0.15885114841j)*x[2]
            ref[(0, 2, 3)]+=(-0.172076186611+0.15885114841j)*x_ref[2]
            arg[(1, 0, 0)]+=(-0.907293101823+0.582351061667j)*x[2]
            ref[(1, 0, 0)]+=(-0.907293101823+0.582351061667j)*x_ref[2]
            arg[(1, 0, 1)]+=(0.464129036589-0.993270709123j)*x[2]
            ref[(1, 0, 1)]+=(0.464129036589-0.993270709123j)*x_ref[2]
            arg[(1, 0, 2)]+=(0.681667612787+0.660462422182j)*x[2]
            ref[(1, 0, 2)]+=(0.681667612787+0.660462422182j)*x_ref[2]
            arg[(1, 0, 3)]+=(-0.334975042756+0.21459179635j)*x[2]
            ref[(1, 0, 3)]+=(-0.334975042756+0.21459179635j)*x_ref[2]
            arg[(1, 1, 0)]+=(-0.759700771377-0.550598017419j)*x[2]
            ref[(1, 1, 0)]+=(-0.759700771377-0.550598017419j)*x_ref[2]
            arg[(1, 1, 1)]+=(0.26429598458+0.806782356528j)*x[2]
            ref[(1, 1, 1)]+=(0.26429598458+0.806782356528j)*x_ref[2]
            arg[(1, 1, 2)]+=(0.751492880991-0.169931053241j)*x[2]
            ref[(1, 1, 2)]+=(0.751492880991-0.169931053241j)*x_ref[2]
            arg[(1, 1, 3)]+=(-0.741024425437+0.976809600265j)*x[2]
            ref[(1, 1, 3)]+=(-0.741024425437+0.976809600265j)*x_ref[2]
            arg[(1, 2, 0)]+=(-0.967805540917+0.782385860474j)*x[2]
            ref[(1, 2, 0)]+=(-0.967805540917+0.782385860474j)*x_ref[2]
            arg[(1, 2, 1)]+=(-0.542146388523+0.420274320153j)*x[2]
            ref[(1, 2, 1)]+=(-0.542146388523+0.420274320153j)*x_ref[2]
            arg[(1, 2, 2)]+=(0.889551808615+0.199947340565j)*x[2]
            ref[(1, 2, 2)]+=(0.889551808615+0.199947340565j)*x_ref[2]
            arg[(1, 2, 3)]+=(-0.972895808658+0.318497177187j)*x[2]
            ref[(1, 2, 3)]+=(-0.972895808658+0.318497177187j)*x_ref[2]
            arg[(2, 0, 0)]+=(-0.751614831024+0.348225736616j)*x[2]
            ref[(2, 0, 0)]+=(-0.751614831024+0.348225736616j)*x_ref[2]
            arg[(2, 0, 1)]+=(-0.182943744241+0.176653147776j)*x[2]
            ref[(2, 0, 1)]+=(-0.182943744241+0.176653147776j)*x_ref[2]
            arg[(2, 0, 2)]+=(0.0190220404152+0.25229102775j)*x[2]
            ref[(2, 0, 2)]+=(0.0190220404152+0.25229102775j)*x_ref[2]
            arg[(2, 0, 3)]+=(0.151896223556-0.0378981083643j)*x[2]
            ref[(2, 0, 3)]+=(0.151896223556-0.0378981083643j)*x_ref[2]
            arg[(2, 1, 0)]+=(0.719940715911+0.0263520714957j)*x[2]
            ref[(2, 1, 0)]+=(0.719940715911+0.0263520714957j)*x_ref[2]
            arg[(2, 1, 1)]+=(-0.876977492243+0.594955454631j)*x[2]
            ref[(2, 1, 1)]+=(-0.876977492243+0.594955454631j)*x_ref[2]
            arg[(2, 1, 2)]+=(-0.355827616493+0.591593969601j)*x[2]
            ref[(2, 1, 2)]+=(-0.355827616493+0.591593969601j)*x_ref[2]
            arg[(2, 1, 3)]+=(-0.60462530033-0.332386782862j)*x[2]
            ref[(2, 1, 3)]+=(-0.60462530033-0.332386782862j)*x_ref[2]
            arg[(2, 2, 0)]+=(0.00608544215604+0.606369487317j)*x[2]
            ref[(2, 2, 0)]+=(0.00608544215604+0.606369487317j)*x_ref[2]
            arg[(2, 2, 1)]+=(0.190378453272-0.687688778835j)*x[2]
            ref[(2, 2, 1)]+=(0.190378453272-0.687688778835j)*x_ref[2]
            arg[(2, 2, 2)]+=(-0.347413430172-0.47884653967j)*x[2]
            ref[(2, 2, 2)]+=(-0.347413430172-0.47884653967j)*x_ref[2]
            arg[(2, 2, 3)]+=(-0.708733584537-0.688720802763j)*x[2]
            ref[(2, 2, 3)]+=(-0.708733584537-0.688720802763j)*x_ref[2]
            arg[(3, 0, 0)]+=(0.868303696285+0.835302111266j)*x[2]
            ref[(3, 0, 0)]+=(0.868303696285+0.835302111266j)*x_ref[2]
            arg[(3, 0, 1)]+=(0.820367550937-0.0825205449279j)*x[2]
            ref[(3, 0, 1)]+=(0.820367550937-0.0825205449279j)*x_ref[2]
            arg[(3, 0, 2)]+=(0.191945737407-0.124996837387j)*x[2]
            ref[(3, 0, 2)]+=(0.191945737407-0.124996837387j)*x_ref[2]
            arg[(3, 0, 3)]+=(-0.877620105967-0.424985633685j)*x[2]
            ref[(3, 0, 3)]+=(-0.877620105967-0.424985633685j)*x_ref[2]
            arg[(3, 1, 0)]+=(-0.936664542866-0.351581348584j)*x[2]
            ref[(3, 1, 0)]+=(-0.936664542866-0.351581348584j)*x_ref[2]
            arg[(3, 1, 1)]+=(-0.216714569184+0.873637044367j)*x[2]
            ref[(3, 1, 1)]+=(-0.216714569184+0.873637044367j)*x_ref[2]
            arg[(3, 1, 2)]+=(0.466497283064-0.719190629822j)*x[2]
            ref[(3, 1, 2)]+=(0.466497283064-0.719190629822j)*x_ref[2]
            arg[(3, 1, 3)]+=(0.533755326363+0.781408698991j)*x[2]
            ref[(3, 1, 3)]+=(0.533755326363+0.781408698991j)*x_ref[2]
            arg[(3, 2, 0)]+=(-0.954039764947+0.718406570014j)*x[2]
            ref[(3, 2, 0)]+=(-0.954039764947+0.718406570014j)*x_ref[2]
            arg[(3, 2, 1)]+=(0.177434180919+0.175886193639j)*x[2]
            ref[(3, 2, 1)]+=(0.177434180919+0.175886193639j)*x_ref[2]
            arg[(3, 2, 2)]+=(0.0412376341343-0.753423056306j)*x[2]
            ref[(3, 2, 2)]+=(0.0412376341343-0.753423056306j)*x_ref[2]
            arg[(3, 2, 3)]+=(0.917717393151+0.683611621993j)*x[2]
            ref[(3, 2, 3)]+=(0.917717393151+0.683611621993j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_ReducedSolution_rank4(self):
        """
        tests interpolation of rank 4 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 4, 4),w)
        ref = Data(0,(3, 3, 4, 4),w_ref)
        arg[(0, 0, 0, 0)]=(-0.890015522304-0.617427061869j)*x[0] + ((-0.712433750539+0.393943083991j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.890015522304-0.617427061869j)*x_ref[0] + ((-0.712433750539+0.393943083991j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(0.891966884729-0.482574034175j)*x[0] + ((0.499318626612-0.980847510708j))*x[1]
        ref[(0, 0, 0, 1)]=(0.891966884729-0.482574034175j)*x_ref[0] + ((0.499318626612-0.980847510708j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(-0.443269251391-0.118643960038j)*x[0] + ((-0.908985029407-0.218828461012j))*x[1]
        ref[(0, 0, 0, 2)]=(-0.443269251391-0.118643960038j)*x_ref[0] + ((-0.908985029407-0.218828461012j))*x_ref[1]
        arg[(0, 0, 0, 3)]=(0.272623043968+0.373041253396j)*x[0] + ((-0.100547241465-0.170630682953j))*x[1]
        ref[(0, 0, 0, 3)]=(0.272623043968+0.373041253396j)*x_ref[0] + ((-0.100547241465-0.170630682953j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.0820083342215-0.525886609783j)*x[0] + ((0.965763377589+0.444392321691j))*x[1]
        ref[(0, 0, 1, 0)]=(0.0820083342215-0.525886609783j)*x_ref[0] + ((0.965763377589+0.444392321691j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.484752243259+0.946028552866j)*x[0] + ((-0.79657787747+0.0177008612294j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.484752243259+0.946028552866j)*x_ref[0] + ((-0.79657787747+0.0177008612294j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(-0.940269517498+0.227260055861j)*x[0] + ((0.687511393172+0.902614609679j))*x[1]
        ref[(0, 0, 1, 2)]=(-0.940269517498+0.227260055861j)*x_ref[0] + ((0.687511393172+0.902614609679j))*x_ref[1]
        arg[(0, 0, 1, 3)]=(-0.266336662322+0.451197553553j)*x[0] + ((0.00867652309578+0.158962114255j))*x[1]
        ref[(0, 0, 1, 3)]=(-0.266336662322+0.451197553553j)*x_ref[0] + ((0.00867652309578+0.158962114255j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(-0.0750427469302-0.422969320771j)*x[0] + ((-0.104795643565+0.829535545327j))*x[1]
        ref[(0, 0, 2, 0)]=(-0.0750427469302-0.422969320771j)*x_ref[0] + ((-0.104795643565+0.829535545327j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(-0.273397339695+0.494430088398j)*x[0] + ((0.828151450018+0.845740103018j))*x[1]
        ref[(0, 0, 2, 1)]=(-0.273397339695+0.494430088398j)*x_ref[0] + ((0.828151450018+0.845740103018j))*x_ref[1]
        arg[(0, 0, 2, 2)]=(0.692564672984+0.35833629249j)*x[0] + ((0.473297372771+0.142671962675j))*x[1]
        ref[(0, 0, 2, 2)]=(0.692564672984+0.35833629249j)*x_ref[0] + ((0.473297372771+0.142671962675j))*x_ref[1]
        arg[(0, 0, 2, 3)]=(0.323603841366-0.932991177808j)*x[0] + ((0.563587988372+0.0626559181029j))*x[1]
        ref[(0, 0, 2, 3)]=(0.323603841366-0.932991177808j)*x_ref[0] + ((0.563587988372+0.0626559181029j))*x_ref[1]
        arg[(0, 0, 3, 0)]=(-0.914828758856+0.845993987228j)*x[0] + ((-0.254922798934+0.820962066227j))*x[1]
        ref[(0, 0, 3, 0)]=(-0.914828758856+0.845993987228j)*x_ref[0] + ((-0.254922798934+0.820962066227j))*x_ref[1]
        arg[(0, 0, 3, 1)]=(-0.88796417872-0.249820002731j)*x[0] + ((0.523572790713+0.539132500055j))*x[1]
        ref[(0, 0, 3, 1)]=(-0.88796417872-0.249820002731j)*x_ref[0] + ((0.523572790713+0.539132500055j))*x_ref[1]
        arg[(0, 0, 3, 2)]=(-0.962060113744+0.688822839222j)*x[0] + ((0.514985844514+0.124800939727j))*x[1]
        ref[(0, 0, 3, 2)]=(-0.962060113744+0.688822839222j)*x_ref[0] + ((0.514985844514+0.124800939727j))*x_ref[1]
        arg[(0, 0, 3, 3)]=(-0.617202691931+0.848401153062j)*x[0] + ((0.500067734292+0.50111474973j))*x[1]
        ref[(0, 0, 3, 3)]=(-0.617202691931+0.848401153062j)*x_ref[0] + ((0.500067734292+0.50111474973j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.404588275527-0.736338835043j)*x[0] + ((-0.456809342921+0.207522957222j))*x[1]
        ref[(0, 1, 0, 0)]=(0.404588275527-0.736338835043j)*x_ref[0] + ((-0.456809342921+0.207522957222j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.445404653117-0.729037144184j)*x[0] + ((0.553401169135+0.0272260494943j))*x[1]
        ref[(0, 1, 0, 1)]=(0.445404653117-0.729037144184j)*x_ref[0] + ((0.553401169135+0.0272260494943j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(0.0973360418107+0.431664861397j)*x[0] + ((0.167111176542-0.341786138702j))*x[1]
        ref[(0, 1, 0, 2)]=(0.0973360418107+0.431664861397j)*x_ref[0] + ((0.167111176542-0.341786138702j))*x_ref[1]
        arg[(0, 1, 0, 3)]=(-0.559880419181+0.0730743253642j)*x[0] + ((0.260887273919-0.50919006712j))*x[1]
        ref[(0, 1, 0, 3)]=(-0.559880419181+0.0730743253642j)*x_ref[0] + ((0.260887273919-0.50919006712j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.656598401632-0.894614766825j)*x[0] + ((-0.308271278131-0.70816542918j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.656598401632-0.894614766825j)*x_ref[0] + ((-0.308271278131-0.70816542918j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.333992428511-0.381502448261j)*x[0] + ((0.961350966944+0.160019735294j))*x[1]
        ref[(0, 1, 1, 1)]=(0.333992428511-0.381502448261j)*x_ref[0] + ((0.961350966944+0.160019735294j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(-0.333568947236-0.539485819812j)*x[0] + ((-0.767468214396+0.376131033017j))*x[1]
        ref[(0, 1, 1, 2)]=(-0.333568947236-0.539485819812j)*x_ref[0] + ((-0.767468214396+0.376131033017j))*x_ref[1]
        arg[(0, 1, 1, 3)]=(0.886848447741-0.572364936164j)*x[0] + ((0.204681965246+0.183131655076j))*x[1]
        ref[(0, 1, 1, 3)]=(0.886848447741-0.572364936164j)*x_ref[0] + ((0.204681965246+0.183131655076j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(-0.410797539008-0.00913697211464j)*x[0] + ((0.554084661557+0.35147963735j))*x[1]
        ref[(0, 1, 2, 0)]=(-0.410797539008-0.00913697211464j)*x_ref[0] + ((0.554084661557+0.35147963735j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(-0.889094556197-0.292993397226j)*x[0] + ((0.930796258751+0.111814575704j))*x[1]
        ref[(0, 1, 2, 1)]=(-0.889094556197-0.292993397226j)*x_ref[0] + ((0.930796258751+0.111814575704j))*x_ref[1]
        arg[(0, 1, 2, 2)]=(-0.595987707658-0.282257408332j)*x[0] + ((-0.453579348188+0.994165204444j))*x[1]
        ref[(0, 1, 2, 2)]=(-0.595987707658-0.282257408332j)*x_ref[0] + ((-0.453579348188+0.994165204444j))*x_ref[1]
        arg[(0, 1, 2, 3)]=(0.748091676442-0.838398747241j)*x[0] + ((0.890276454035+0.912277026749j))*x[1]
        ref[(0, 1, 2, 3)]=(0.748091676442-0.838398747241j)*x_ref[0] + ((0.890276454035+0.912277026749j))*x_ref[1]
        arg[(0, 1, 3, 0)]=(-0.892794806281-0.140374077126j)*x[0] + ((-0.460405604549-0.0650866991359j))*x[1]
        ref[(0, 1, 3, 0)]=(-0.892794806281-0.140374077126j)*x_ref[0] + ((-0.460405604549-0.0650866991359j))*x_ref[1]
        arg[(0, 1, 3, 1)]=(0.905857384247+0.521710138164j)*x[0] + ((0.142945139003+0.275263724164j))*x[1]
        ref[(0, 1, 3, 1)]=(0.905857384247+0.521710138164j)*x_ref[0] + ((0.142945139003+0.275263724164j))*x_ref[1]
        arg[(0, 1, 3, 2)]=(-0.909313970645-0.318616336541j)*x[0] + ((-0.690144286759-0.19693307506j))*x[1]
        ref[(0, 1, 3, 2)]=(-0.909313970645-0.318616336541j)*x_ref[0] + ((-0.690144286759-0.19693307506j))*x_ref[1]
        arg[(0, 1, 3, 3)]=(0.928876965734-0.319349374802j)*x[0] + ((-0.600014996495+0.802990242194j))*x[1]
        ref[(0, 1, 3, 3)]=(0.928876965734-0.319349374802j)*x_ref[0] + ((-0.600014996495+0.802990242194j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(-0.88537382296+0.67984103142j)*x[0] + ((0.114916903294-0.509380299778j))*x[1]
        ref[(0, 2, 0, 0)]=(-0.88537382296+0.67984103142j)*x_ref[0] + ((0.114916903294-0.509380299778j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(-0.37358965353-0.544319460269j)*x[0] + ((-0.0676553699972-0.933792067723j))*x[1]
        ref[(0, 2, 0, 1)]=(-0.37358965353-0.544319460269j)*x_ref[0] + ((-0.0676553699972-0.933792067723j))*x_ref[1]
        arg[(0, 2, 0, 2)]=(0.12880136542-0.292396716663j)*x[0] + ((-0.842870847053+0.426433653519j))*x[1]
        ref[(0, 2, 0, 2)]=(0.12880136542-0.292396716663j)*x_ref[0] + ((-0.842870847053+0.426433653519j))*x_ref[1]
        arg[(0, 2, 0, 3)]=(-0.460237750488-0.169111734852j)*x[0] + ((0.719668213572+0.541285430987j))*x[1]
        ref[(0, 2, 0, 3)]=(-0.460237750488-0.169111734852j)*x_ref[0] + ((0.719668213572+0.541285430987j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.814781371892+0.621313155203j)*x[0] + ((0.0995538153298-0.83382200184j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.814781371892+0.621313155203j)*x_ref[0] + ((0.0995538153298-0.83382200184j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(0.909181820684+0.444597535406j)*x[0] + ((0.902276804721-0.6052999974j))*x[1]
        ref[(0, 2, 1, 1)]=(0.909181820684+0.444597535406j)*x_ref[0] + ((0.902276804721-0.6052999974j))*x_ref[1]
        arg[(0, 2, 1, 2)]=(0.974532058365-0.317614618898j)*x[0] + ((-0.442837987314+0.66883253685j))*x[1]
        ref[(0, 2, 1, 2)]=(0.974532058365-0.317614618898j)*x_ref[0] + ((-0.442837987314+0.66883253685j))*x_ref[1]
        arg[(0, 2, 1, 3)]=(0.730165105164+0.463459529572j)*x[0] + ((-0.62330979064+0.136894591022j))*x[1]
        ref[(0, 2, 1, 3)]=(0.730165105164+0.463459529572j)*x_ref[0] + ((-0.62330979064+0.136894591022j))*x_ref[1]
        arg[(0, 2, 2, 0)]=(-0.0153522590439+0.721895584318j)*x[0] + ((-0.687514278719-0.564249087578j))*x[1]
        ref[(0, 2, 2, 0)]=(-0.0153522590439+0.721895584318j)*x_ref[0] + ((-0.687514278719-0.564249087578j))*x_ref[1]
        arg[(0, 2, 2, 1)]=(-0.215365331322+0.41645089822j)*x[0] + ((0.382134034898-0.0419457251491j))*x[1]
        ref[(0, 2, 2, 1)]=(-0.215365331322+0.41645089822j)*x_ref[0] + ((0.382134034898-0.0419457251491j))*x_ref[1]
        arg[(0, 2, 2, 2)]=(-0.959083784071-0.32677701701j)*x[0] + ((-0.365713398281-0.783772596732j))*x[1]
        ref[(0, 2, 2, 2)]=(-0.959083784071-0.32677701701j)*x_ref[0] + ((-0.365713398281-0.783772596732j))*x_ref[1]
        arg[(0, 2, 2, 3)]=(0.158921028888+0.890114042945j)*x[0] + ((-0.103581662378-0.070037650996j))*x[1]
        ref[(0, 2, 2, 3)]=(0.158921028888+0.890114042945j)*x_ref[0] + ((-0.103581662378-0.070037650996j))*x_ref[1]
        arg[(0, 2, 3, 0)]=(0.815085929007+0.690774727106j)*x[0] + ((-0.109458382471+0.860513551593j))*x[1]
        ref[(0, 2, 3, 0)]=(0.815085929007+0.690774727106j)*x_ref[0] + ((-0.109458382471+0.860513551593j))*x_ref[1]
        arg[(0, 2, 3, 1)]=(0.891404619999+0.472288554375j)*x[0] + ((0.72296751007+0.763219429713j))*x[1]
        ref[(0, 2, 3, 1)]=(0.891404619999+0.472288554375j)*x_ref[0] + ((0.72296751007+0.763219429713j))*x_ref[1]
        arg[(0, 2, 3, 2)]=(-0.206975237227+0.881393477316j)*x[0] + ((0.195862305237-0.151559889784j))*x[1]
        ref[(0, 2, 3, 2)]=(-0.206975237227+0.881393477316j)*x_ref[0] + ((0.195862305237-0.151559889784j))*x_ref[1]
        arg[(0, 2, 3, 3)]=(-0.18484336868+0.908265862389j)*x[0] + ((-0.379960227072-0.943279460909j))*x[1]
        ref[(0, 2, 3, 3)]=(-0.18484336868+0.908265862389j)*x_ref[0] + ((-0.379960227072-0.943279460909j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.799272153332+0.262094021913j)*x[0] + ((0.730140642712-0.948998592822j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.799272153332+0.262094021913j)*x_ref[0] + ((0.730140642712-0.948998592822j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.254866769606-0.315484974347j)*x[0] + ((-0.519268122785-0.944887970617j))*x[1]
        ref[(1, 0, 0, 1)]=(0.254866769606-0.315484974347j)*x_ref[0] + ((-0.519268122785-0.944887970617j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(0.289894411649+0.167333610533j)*x[0] + ((-0.672259928831+0.0200470203575j))*x[1]
        ref[(1, 0, 0, 2)]=(0.289894411649+0.167333610533j)*x_ref[0] + ((-0.672259928831+0.0200470203575j))*x_ref[1]
        arg[(1, 0, 0, 3)]=(-0.206387586245+0.707921717594j)*x[0] + ((-0.855724186215+0.599673161791j))*x[1]
        ref[(1, 0, 0, 3)]=(-0.206387586245+0.707921717594j)*x_ref[0] + ((-0.855724186215+0.599673161791j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.458331887841-0.572315983541j)*x[0] + ((-0.433109719452-0.176553445894j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.458331887841-0.572315983541j)*x_ref[0] + ((-0.433109719452-0.176553445894j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.227137141768-0.381679870857j)*x[0] + ((0.845596661208+0.388802418463j))*x[1]
        ref[(1, 0, 1, 1)]=(0.227137141768-0.381679870857j)*x_ref[0] + ((0.845596661208+0.388802418463j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(-0.057005519234+0.610960348251j)*x[0] + ((0.686467926482+0.159612602357j))*x[1]
        ref[(1, 0, 1, 2)]=(-0.057005519234+0.610960348251j)*x_ref[0] + ((0.686467926482+0.159612602357j))*x_ref[1]
        arg[(1, 0, 1, 3)]=(0.770467283545-0.290551401376j)*x[0] + ((-0.880529351495+0.836894496799j))*x[1]
        ref[(1, 0, 1, 3)]=(0.770467283545-0.290551401376j)*x_ref[0] + ((-0.880529351495+0.836894496799j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(0.813813722086-0.138567605127j)*x[0] + ((0.76761137152-0.605782601267j))*x[1]
        ref[(1, 0, 2, 0)]=(0.813813722086-0.138567605127j)*x_ref[0] + ((0.76761137152-0.605782601267j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(0.0325525659166+0.46400763509j)*x[0] + ((-0.698211747245-0.754961382155j))*x[1]
        ref[(1, 0, 2, 1)]=(0.0325525659166+0.46400763509j)*x_ref[0] + ((-0.698211747245-0.754961382155j))*x_ref[1]
        arg[(1, 0, 2, 2)]=(0.863176724816+0.407877262745j)*x[0] + ((0.9351733353-0.00317999702669j))*x[1]
        ref[(1, 0, 2, 2)]=(0.863176724816+0.407877262745j)*x_ref[0] + ((0.9351733353-0.00317999702669j))*x_ref[1]
        arg[(1, 0, 2, 3)]=(0.0364958582067+0.536965943077j)*x[0] + ((-0.811309048736+0.927575478093j))*x[1]
        ref[(1, 0, 2, 3)]=(0.0364958582067+0.536965943077j)*x_ref[0] + ((-0.811309048736+0.927575478093j))*x_ref[1]
        arg[(1, 0, 3, 0)]=(-0.897020640839-0.317920846559j)*x[0] + ((-0.373458307153-0.804676567557j))*x[1]
        ref[(1, 0, 3, 0)]=(-0.897020640839-0.317920846559j)*x_ref[0] + ((-0.373458307153-0.804676567557j))*x_ref[1]
        arg[(1, 0, 3, 1)]=(0.428492872267+0.200640909199j)*x[0] + ((0.953649026397+0.444676558884j))*x[1]
        ref[(1, 0, 3, 1)]=(0.428492872267+0.200640909199j)*x_ref[0] + ((0.953649026397+0.444676558884j))*x_ref[1]
        arg[(1, 0, 3, 2)]=(-0.287479028391-0.625428409947j)*x[0] + ((-0.907936309919-0.00798646010879j))*x[1]
        ref[(1, 0, 3, 2)]=(-0.287479028391-0.625428409947j)*x_ref[0] + ((-0.907936309919-0.00798646010879j))*x_ref[1]
        arg[(1, 0, 3, 3)]=(0.764710447975+0.954111601611j)*x[0] + ((0.822455070628-0.455851098887j))*x[1]
        ref[(1, 0, 3, 3)]=(0.764710447975+0.954111601611j)*x_ref[0] + ((0.822455070628-0.455851098887j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.569301013891+0.183838668993j)*x[0] + ((0.2063738691+0.0127520959793j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.569301013891+0.183838668993j)*x_ref[0] + ((0.2063738691+0.0127520959793j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.709510247795+0.510195720342j)*x[0] + ((-0.0736234427527+0.497438871084j))*x[1]
        ref[(1, 1, 0, 1)]=(0.709510247795+0.510195720342j)*x_ref[0] + ((-0.0736234427527+0.497438871084j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(0.0122623626754-0.379771969208j)*x[0] + ((-0.708275799859+0.72999242485j))*x[1]
        ref[(1, 1, 0, 2)]=(0.0122623626754-0.379771969208j)*x_ref[0] + ((-0.708275799859+0.72999242485j))*x_ref[1]
        arg[(1, 1, 0, 3)]=(0.598450631871-0.814035202562j)*x[0] + ((0.034187294819+0.0245102680466j))*x[1]
        ref[(1, 1, 0, 3)]=(0.598450631871-0.814035202562j)*x_ref[0] + ((0.034187294819+0.0245102680466j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.025335725084-0.0123202694237j)*x[0] + ((0.697512243564-0.905190748668j))*x[1]
        ref[(1, 1, 1, 0)]=(0.025335725084-0.0123202694237j)*x_ref[0] + ((0.697512243564-0.905190748668j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.791593680776-0.276755285782j)*x[0] + ((0.48585039998+0.187604252672j))*x[1]
        ref[(1, 1, 1, 1)]=(0.791593680776-0.276755285782j)*x_ref[0] + ((0.48585039998+0.187604252672j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(0.104053941681+0.491272246935j)*x[0] + ((-0.548255467495+0.832724573371j))*x[1]
        ref[(1, 1, 1, 2)]=(0.104053941681+0.491272246935j)*x_ref[0] + ((-0.548255467495+0.832724573371j))*x_ref[1]
        arg[(1, 1, 1, 3)]=(-0.922144478476-0.902737675299j)*x[0] + ((0.062161215744-0.81949073255j))*x[1]
        ref[(1, 1, 1, 3)]=(-0.922144478476-0.902737675299j)*x_ref[0] + ((0.062161215744-0.81949073255j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(-0.23790615432+0.181568478168j)*x[0] + ((0.783862815764+0.330962033422j))*x[1]
        ref[(1, 1, 2, 0)]=(-0.23790615432+0.181568478168j)*x_ref[0] + ((0.783862815764+0.330962033422j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(0.89124113109+0.250213719951j)*x[0] + ((-0.985768738609+0.162158142469j))*x[1]
        ref[(1, 1, 2, 1)]=(0.89124113109+0.250213719951j)*x_ref[0] + ((-0.985768738609+0.162158142469j))*x_ref[1]
        arg[(1, 1, 2, 2)]=(-0.963410029993+0.252323774734j)*x[0] + ((0.824336328656+0.303552968738j))*x[1]
        ref[(1, 1, 2, 2)]=(-0.963410029993+0.252323774734j)*x_ref[0] + ((0.824336328656+0.303552968738j))*x_ref[1]
        arg[(1, 1, 2, 3)]=(0.759890786939+0.272818361164j)*x[0] + ((-0.558978566311+0.343911198816j))*x[1]
        ref[(1, 1, 2, 3)]=(0.759890786939+0.272818361164j)*x_ref[0] + ((-0.558978566311+0.343911198816j))*x_ref[1]
        arg[(1, 1, 3, 0)]=(0.703866854473-0.0459433492647j)*x[0] + ((0.672637583524+0.54493001903j))*x[1]
        ref[(1, 1, 3, 0)]=(0.703866854473-0.0459433492647j)*x_ref[0] + ((0.672637583524+0.54493001903j))*x_ref[1]
        arg[(1, 1, 3, 1)]=(0.61423626411+0.0983613486092j)*x[0] + ((0.698688879283+0.602569828329j))*x[1]
        ref[(1, 1, 3, 1)]=(0.61423626411+0.0983613486092j)*x_ref[0] + ((0.698688879283+0.602569828329j))*x_ref[1]
        arg[(1, 1, 3, 2)]=(0.15688665455-0.823583274309j)*x[0] + ((0.933154153205-0.901521457118j))*x[1]
        ref[(1, 1, 3, 2)]=(0.15688665455-0.823583274309j)*x_ref[0] + ((0.933154153205-0.901521457118j))*x_ref[1]
        arg[(1, 1, 3, 3)]=(0.511540583433-0.328291088461j)*x[0] + ((-0.736116831806+0.417225318913j))*x[1]
        ref[(1, 1, 3, 3)]=(0.511540583433-0.328291088461j)*x_ref[0] + ((-0.736116831806+0.417225318913j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(0.373932184784-0.269129093299j)*x[0] + ((0.238837675903-0.877387557108j))*x[1]
        ref[(1, 2, 0, 0)]=(0.373932184784-0.269129093299j)*x_ref[0] + ((0.238837675903-0.877387557108j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(0.593526317187-0.0240630857317j)*x[0] + ((0.573907210605-0.189558519618j))*x[1]
        ref[(1, 2, 0, 1)]=(0.593526317187-0.0240630857317j)*x_ref[0] + ((0.573907210605-0.189558519618j))*x_ref[1]
        arg[(1, 2, 0, 2)]=(0.505469653859-0.950817241589j)*x[0] + ((-0.0434582084242+0.807674276059j))*x[1]
        ref[(1, 2, 0, 2)]=(0.505469653859-0.950817241589j)*x_ref[0] + ((-0.0434582084242+0.807674276059j))*x_ref[1]
        arg[(1, 2, 0, 3)]=(-0.48547984723-0.85800738835j)*x[0] + ((-0.02435641287-0.314256224594j))*x[1]
        ref[(1, 2, 0, 3)]=(-0.48547984723-0.85800738835j)*x_ref[0] + ((-0.02435641287-0.314256224594j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(0.818937457705+0.943534714046j)*x[0] + ((0.205809629842-0.711639831726j))*x[1]
        ref[(1, 2, 1, 0)]=(0.818937457705+0.943534714046j)*x_ref[0] + ((0.205809629842-0.711639831726j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(-0.987136055347-0.0212247849042j)*x[0] + ((0.529196297653+0.33770496929j))*x[1]
        ref[(1, 2, 1, 1)]=(-0.987136055347-0.0212247849042j)*x_ref[0] + ((0.529196297653+0.33770496929j))*x_ref[1]
        arg[(1, 2, 1, 2)]=(0.0630048552348+0.264723537738j)*x[0] + ((0.0855290124628+0.836424290276j))*x[1]
        ref[(1, 2, 1, 2)]=(0.0630048552348+0.264723537738j)*x_ref[0] + ((0.0855290124628+0.836424290276j))*x_ref[1]
        arg[(1, 2, 1, 3)]=(-0.49738033635-0.63492183915j)*x[0] + ((0.982142153542-0.585170449274j))*x[1]
        ref[(1, 2, 1, 3)]=(-0.49738033635-0.63492183915j)*x_ref[0] + ((0.982142153542-0.585170449274j))*x_ref[1]
        arg[(1, 2, 2, 0)]=(0.418112845142+0.383555105099j)*x[0] + ((0.971311424648+0.750244032449j))*x[1]
        ref[(1, 2, 2, 0)]=(0.418112845142+0.383555105099j)*x_ref[0] + ((0.971311424648+0.750244032449j))*x_ref[1]
        arg[(1, 2, 2, 1)]=(-0.133479124607-0.923087242631j)*x[0] + ((-0.275309408266+0.0395507379918j))*x[1]
        ref[(1, 2, 2, 1)]=(-0.133479124607-0.923087242631j)*x_ref[0] + ((-0.275309408266+0.0395507379918j))*x_ref[1]
        arg[(1, 2, 2, 2)]=(-0.319033927438-0.128740116505j)*x[0] + ((-0.264292232014+0.0588550981287j))*x[1]
        ref[(1, 2, 2, 2)]=(-0.319033927438-0.128740116505j)*x_ref[0] + ((-0.264292232014+0.0588550981287j))*x_ref[1]
        arg[(1, 2, 2, 3)]=(-0.419451930328+0.920552641782j)*x[0] + ((-0.668472702852-0.257593229651j))*x[1]
        ref[(1, 2, 2, 3)]=(-0.419451930328+0.920552641782j)*x_ref[0] + ((-0.668472702852-0.257593229651j))*x_ref[1]
        arg[(1, 2, 3, 0)]=(0.0381335836439-0.497156485128j)*x[0] + ((-0.929039843392+0.171470762583j))*x[1]
        ref[(1, 2, 3, 0)]=(0.0381335836439-0.497156485128j)*x_ref[0] + ((-0.929039843392+0.171470762583j))*x_ref[1]
        arg[(1, 2, 3, 1)]=(0.410042397298-0.105627587517j)*x[0] + ((0.411274467312+0.502159919713j))*x[1]
        ref[(1, 2, 3, 1)]=(0.410042397298-0.105627587517j)*x_ref[0] + ((0.411274467312+0.502159919713j))*x_ref[1]
        arg[(1, 2, 3, 2)]=(-0.881309332638-0.958620853317j)*x[0] + ((0.965088173348+0.503109712726j))*x[1]
        ref[(1, 2, 3, 2)]=(-0.881309332638-0.958620853317j)*x_ref[0] + ((0.965088173348+0.503109712726j))*x_ref[1]
        arg[(1, 2, 3, 3)]=(0.325676112212-0.447260066467j)*x[0] + ((0.766601810897-0.0345880587188j))*x[1]
        ref[(1, 2, 3, 3)]=(0.325676112212-0.447260066467j)*x_ref[0] + ((0.766601810897-0.0345880587188j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.735474404597-0.627640649938j)*x[0] + ((-0.60355947123+0.103276018301j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.735474404597-0.627640649938j)*x_ref[0] + ((-0.60355947123+0.103276018301j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(-0.98285902162+0.382831352941j)*x[0] + ((0.239280999106+0.0368077104788j))*x[1]
        ref[(2, 0, 0, 1)]=(-0.98285902162+0.382831352941j)*x_ref[0] + ((0.239280999106+0.0368077104788j))*x_ref[1]
        arg[(2, 0, 0, 2)]=(-0.885283429353+0.903101005056j)*x[0] + ((-8.18529433413e-05-0.248635489729j))*x[1]
        ref[(2, 0, 0, 2)]=(-0.885283429353+0.903101005056j)*x_ref[0] + ((-8.18529433413e-05-0.248635489729j))*x_ref[1]
        arg[(2, 0, 0, 3)]=(-0.0673468995256-0.977169547577j)*x[0] + ((-0.662423284387+0.550090598821j))*x[1]
        ref[(2, 0, 0, 3)]=(-0.0673468995256-0.977169547577j)*x_ref[0] + ((-0.662423284387+0.550090598821j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(0.946778322469+0.402540516609j)*x[0] + ((-0.19237256003-0.0273649534586j))*x[1]
        ref[(2, 0, 1, 0)]=(0.946778322469+0.402540516609j)*x_ref[0] + ((-0.19237256003-0.0273649534586j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(-0.17050498153+0.754046703236j)*x[0] + ((-0.503338738911-0.436278917781j))*x[1]
        ref[(2, 0, 1, 1)]=(-0.17050498153+0.754046703236j)*x_ref[0] + ((-0.503338738911-0.436278917781j))*x_ref[1]
        arg[(2, 0, 1, 2)]=(0.294897790892+0.490383837004j)*x[0] + ((-0.156201705548-0.984315462887j))*x[1]
        ref[(2, 0, 1, 2)]=(0.294897790892+0.490383837004j)*x_ref[0] + ((-0.156201705548-0.984315462887j))*x_ref[1]
        arg[(2, 0, 1, 3)]=(0.0544066420349+0.951193491229j)*x[0] + ((0.349334979013+0.97612649816j))*x[1]
        ref[(2, 0, 1, 3)]=(0.0544066420349+0.951193491229j)*x_ref[0] + ((0.349334979013+0.97612649816j))*x_ref[1]
        arg[(2, 0, 2, 0)]=(0.606504597607+0.76751426138j)*x[0] + ((0.00464227825875+0.166535837612j))*x[1]
        ref[(2, 0, 2, 0)]=(0.606504597607+0.76751426138j)*x_ref[0] + ((0.00464227825875+0.166535837612j))*x_ref[1]
        arg[(2, 0, 2, 1)]=(0.273662270481+0.740854179316j)*x[0] + ((-0.558517822737-0.554222958987j))*x[1]
        ref[(2, 0, 2, 1)]=(0.273662270481+0.740854179316j)*x_ref[0] + ((-0.558517822737-0.554222958987j))*x_ref[1]
        arg[(2, 0, 2, 2)]=(0.93941629074-0.620913828581j)*x[0] + ((-0.935712467673-0.311250862183j))*x[1]
        ref[(2, 0, 2, 2)]=(0.93941629074-0.620913828581j)*x_ref[0] + ((-0.935712467673-0.311250862183j))*x_ref[1]
        arg[(2, 0, 2, 3)]=(-0.588533934225-0.508424901542j)*x[0] + ((-0.424007049548-0.18669388246j))*x[1]
        ref[(2, 0, 2, 3)]=(-0.588533934225-0.508424901542j)*x_ref[0] + ((-0.424007049548-0.18669388246j))*x_ref[1]
        arg[(2, 0, 3, 0)]=(0.408685593951+0.517036278245j)*x[0] + ((0.151503500874-0.731122726207j))*x[1]
        ref[(2, 0, 3, 0)]=(0.408685593951+0.517036278245j)*x_ref[0] + ((0.151503500874-0.731122726207j))*x_ref[1]
        arg[(2, 0, 3, 1)]=(0.999514529399-0.128843664134j)*x[0] + ((0.28550650218-0.681887238765j))*x[1]
        ref[(2, 0, 3, 1)]=(0.999514529399-0.128843664134j)*x_ref[0] + ((0.28550650218-0.681887238765j))*x_ref[1]
        arg[(2, 0, 3, 2)]=(-0.31653397804-0.716752452693j)*x[0] + ((0.547449396454+0.364767904069j))*x[1]
        ref[(2, 0, 3, 2)]=(-0.31653397804-0.716752452693j)*x_ref[0] + ((0.547449396454+0.364767904069j))*x_ref[1]
        arg[(2, 0, 3, 3)]=(-0.871449402207+0.263645811061j)*x[0] + ((-0.865829502819+0.871238084257j))*x[1]
        ref[(2, 0, 3, 3)]=(-0.871449402207+0.263645811061j)*x_ref[0] + ((-0.865829502819+0.871238084257j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(0.980343745813+0.727833805059j)*x[0] + ((0.356222678105+0.92577102264j))*x[1]
        ref[(2, 1, 0, 0)]=(0.980343745813+0.727833805059j)*x_ref[0] + ((0.356222678105+0.92577102264j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(-0.339011542219-0.901208320509j)*x[0] + ((-0.669770043416+0.344584086262j))*x[1]
        ref[(2, 1, 0, 1)]=(-0.339011542219-0.901208320509j)*x_ref[0] + ((-0.669770043416+0.344584086262j))*x_ref[1]
        arg[(2, 1, 0, 2)]=(-0.719664578621+0.208266951948j)*x[0] + ((0.774556148163-0.251590350409j))*x[1]
        ref[(2, 1, 0, 2)]=(-0.719664578621+0.208266951948j)*x_ref[0] + ((0.774556148163-0.251590350409j))*x_ref[1]
        arg[(2, 1, 0, 3)]=(-0.0962773550774+0.5350323185j)*x[0] + ((-0.427709957449-0.364221434632j))*x[1]
        ref[(2, 1, 0, 3)]=(-0.0962773550774+0.5350323185j)*x_ref[0] + ((-0.427709957449-0.364221434632j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(-0.470050646539-0.838215356692j)*x[0] + ((0.541896086051-0.120158957837j))*x[1]
        ref[(2, 1, 1, 0)]=(-0.470050646539-0.838215356692j)*x_ref[0] + ((0.541896086051-0.120158957837j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(-0.551339976303-0.848835426897j)*x[0] + ((0.196106410852-0.360385086049j))*x[1]
        ref[(2, 1, 1, 1)]=(-0.551339976303-0.848835426897j)*x_ref[0] + ((0.196106410852-0.360385086049j))*x_ref[1]
        arg[(2, 1, 1, 2)]=(-0.251423492417+0.815353672561j)*x[0] + ((-0.635991865786-0.758822982164j))*x[1]
        ref[(2, 1, 1, 2)]=(-0.251423492417+0.815353672561j)*x_ref[0] + ((-0.635991865786-0.758822982164j))*x_ref[1]
        arg[(2, 1, 1, 3)]=(0.479707229485-0.88330000536j)*x[0] + ((0.00017921229431-0.663425699985j))*x[1]
        ref[(2, 1, 1, 3)]=(0.479707229485-0.88330000536j)*x_ref[0] + ((0.00017921229431-0.663425699985j))*x_ref[1]
        arg[(2, 1, 2, 0)]=(0.592026691834-0.323985876488j)*x[0] + ((-0.185321047742+0.38901855475j))*x[1]
        ref[(2, 1, 2, 0)]=(0.592026691834-0.323985876488j)*x_ref[0] + ((-0.185321047742+0.38901855475j))*x_ref[1]
        arg[(2, 1, 2, 1)]=(0.34847474333+0.940908713299j)*x[0] + ((0.1248524293-0.887498446192j))*x[1]
        ref[(2, 1, 2, 1)]=(0.34847474333+0.940908713299j)*x_ref[0] + ((0.1248524293-0.887498446192j))*x_ref[1]
        arg[(2, 1, 2, 2)]=(-0.537257612257-0.709806003453j)*x[0] + ((-0.0823623293892+0.0122632208208j))*x[1]
        ref[(2, 1, 2, 2)]=(-0.537257612257-0.709806003453j)*x_ref[0] + ((-0.0823623293892+0.0122632208208j))*x_ref[1]
        arg[(2, 1, 2, 3)]=(-0.220773061393+0.957244020551j)*x[0] + ((0.51134687851-0.0670734506203j))*x[1]
        ref[(2, 1, 2, 3)]=(-0.220773061393+0.957244020551j)*x_ref[0] + ((0.51134687851-0.0670734506203j))*x_ref[1]
        arg[(2, 1, 3, 0)]=(0.0951107043888+0.539891221352j)*x[0] + ((0.827673226794-0.206065986249j))*x[1]
        ref[(2, 1, 3, 0)]=(0.0951107043888+0.539891221352j)*x_ref[0] + ((0.827673226794-0.206065986249j))*x_ref[1]
        arg[(2, 1, 3, 1)]=(-0.822585994588+0.909367506589j)*x[0] + ((-0.881149145277-0.785831318914j))*x[1]
        ref[(2, 1, 3, 1)]=(-0.822585994588+0.909367506589j)*x_ref[0] + ((-0.881149145277-0.785831318914j))*x_ref[1]
        arg[(2, 1, 3, 2)]=(0.972481085599+0.269225019762j)*x[0] + ((-0.323458184462+0.510988460759j))*x[1]
        ref[(2, 1, 3, 2)]=(0.972481085599+0.269225019762j)*x_ref[0] + ((-0.323458184462+0.510988460759j))*x_ref[1]
        arg[(2, 1, 3, 3)]=(-0.49700542416+0.0934627919805j)*x[0] + ((-0.216661636791+0.217509916585j))*x[1]
        ref[(2, 1, 3, 3)]=(-0.49700542416+0.0934627919805j)*x_ref[0] + ((-0.216661636791+0.217509916585j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(-0.997645731976+0.251047443627j)*x[0] + ((0.661593651216+0.129986742414j))*x[1]
        ref[(2, 2, 0, 0)]=(-0.997645731976+0.251047443627j)*x_ref[0] + ((0.661593651216+0.129986742414j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(-0.0946725986346-0.0808654079043j)*x[0] + ((-0.840454879167-0.456063796456j))*x[1]
        ref[(2, 2, 0, 1)]=(-0.0946725986346-0.0808654079043j)*x_ref[0] + ((-0.840454879167-0.456063796456j))*x_ref[1]
        arg[(2, 2, 0, 2)]=(0.856252085172+0.452811165664j)*x[0] + ((-0.938081966749+0.855157873435j))*x[1]
        ref[(2, 2, 0, 2)]=(0.856252085172+0.452811165664j)*x_ref[0] + ((-0.938081966749+0.855157873435j))*x_ref[1]
        arg[(2, 2, 0, 3)]=(-0.278785997818+0.695340385278j)*x[0] + ((-0.55116946632-0.389251346924j))*x[1]
        ref[(2, 2, 0, 3)]=(-0.278785997818+0.695340385278j)*x_ref[0] + ((-0.55116946632-0.389251346924j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(-0.654313924646-0.109993625358j)*x[0] + ((-0.023033071988+0.39749121838j))*x[1]
        ref[(2, 2, 1, 0)]=(-0.654313924646-0.109993625358j)*x_ref[0] + ((-0.023033071988+0.39749121838j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(0.396379688061+0.835899769589j)*x[0] + ((0.422830246359+0.995815749625j))*x[1]
        ref[(2, 2, 1, 1)]=(0.396379688061+0.835899769589j)*x_ref[0] + ((0.422830246359+0.995815749625j))*x_ref[1]
        arg[(2, 2, 1, 2)]=(-0.262726261265-0.763907545309j)*x[0] + ((-0.98668559088+0.494038587804j))*x[1]
        ref[(2, 2, 1, 2)]=(-0.262726261265-0.763907545309j)*x_ref[0] + ((-0.98668559088+0.494038587804j))*x_ref[1]
        arg[(2, 2, 1, 3)]=(0.731993270734+0.347473946685j)*x[0] + ((0.561472240334+0.246096105641j))*x[1]
        ref[(2, 2, 1, 3)]=(0.731993270734+0.347473946685j)*x_ref[0] + ((0.561472240334+0.246096105641j))*x_ref[1]
        arg[(2, 2, 2, 0)]=(0.348748493441-0.92380462857j)*x[0] + ((0.811378842335+0.149013965165j))*x[1]
        ref[(2, 2, 2, 0)]=(0.348748493441-0.92380462857j)*x_ref[0] + ((0.811378842335+0.149013965165j))*x_ref[1]
        arg[(2, 2, 2, 1)]=(-0.280660518557+0.892577187348j)*x[0] + ((0.801013751239+0.798435210112j))*x[1]
        ref[(2, 2, 2, 1)]=(-0.280660518557+0.892577187348j)*x_ref[0] + ((0.801013751239+0.798435210112j))*x_ref[1]
        arg[(2, 2, 2, 2)]=(-0.460719706527+0.927587337043j)*x[0] + ((0.458534893225-0.335556831893j))*x[1]
        ref[(2, 2, 2, 2)]=(-0.460719706527+0.927587337043j)*x_ref[0] + ((0.458534893225-0.335556831893j))*x_ref[1]
        arg[(2, 2, 2, 3)]=(-0.156479115209-0.236164004708j)*x[0] + ((-0.808898414235-0.751628485309j))*x[1]
        ref[(2, 2, 2, 3)]=(-0.156479115209-0.236164004708j)*x_ref[0] + ((-0.808898414235-0.751628485309j))*x_ref[1]
        arg[(2, 2, 3, 0)]=(-0.0731770046143+0.15444069855j)*x[0] + ((0.924041126287+0.479834908712j))*x[1]
        ref[(2, 2, 3, 0)]=(-0.0731770046143+0.15444069855j)*x_ref[0] + ((0.924041126287+0.479834908712j))*x_ref[1]
        arg[(2, 2, 3, 1)]=(0.758161487044-0.594641526428j)*x[0] + ((0.0890721658528-0.529305243802j))*x[1]
        ref[(2, 2, 3, 1)]=(0.758161487044-0.594641526428j)*x_ref[0] + ((0.0890721658528-0.529305243802j))*x_ref[1]
        arg[(2, 2, 3, 2)]=(-0.931955464664-0.547843767513j)*x[0] + ((0.254616010899+0.762205305109j))*x[1]
        ref[(2, 2, 3, 2)]=(-0.931955464664-0.547843767513j)*x_ref[0] + ((0.254616010899+0.762205305109j))*x_ref[1]
        arg[(2, 2, 3, 3)]=(0.238418738588+0.797653465701j)*x[0] + ((0.709876405878-0.0900054803859j))*x[1]
        ref[(2, 2, 3, 3)]=(0.238418738588+0.797653465701j)*x_ref[0] + ((0.709876405878-0.0900054803859j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.470642599779-0.0659889627355j)*x[2]
            ref[(0, 0, 0, 0)]+=(0.470642599779-0.0659889627355j)*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.571887828428+0.844920938646j)*x[2]
            ref[(0, 0, 0, 1)]+=(-0.571887828428+0.844920938646j)*x_ref[2]
            arg[(0, 0, 0, 2)]+=(0.939567753148+0.0312213243843j)*x[2]
            ref[(0, 0, 0, 2)]+=(0.939567753148+0.0312213243843j)*x_ref[2]
            arg[(0, 0, 0, 3)]+=(-0.396775015264-0.530750182523j)*x[2]
            ref[(0, 0, 0, 3)]+=(-0.396775015264-0.530750182523j)*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.303946916594-0.0768252984491j)*x[2]
            ref[(0, 0, 1, 0)]+=(-0.303946916594-0.0768252984491j)*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.534994164019-0.156084045567j)*x[2]
            ref[(0, 0, 1, 1)]+=(0.534994164019-0.156084045567j)*x_ref[2]
            arg[(0, 0, 1, 2)]+=(-0.251722333739+0.794307212376j)*x[2]
            ref[(0, 0, 1, 2)]+=(-0.251722333739+0.794307212376j)*x_ref[2]
            arg[(0, 0, 1, 3)]+=(-0.05983759996+0.579098032013j)*x[2]
            ref[(0, 0, 1, 3)]+=(-0.05983759996+0.579098032013j)*x_ref[2]
            arg[(0, 0, 2, 0)]+=(0.82089014936+0.644024865359j)*x[2]
            ref[(0, 0, 2, 0)]+=(0.82089014936+0.644024865359j)*x_ref[2]
            arg[(0, 0, 2, 1)]+=(-0.0611864218439+0.51127677276j)*x[2]
            ref[(0, 0, 2, 1)]+=(-0.0611864218439+0.51127677276j)*x_ref[2]
            arg[(0, 0, 2, 2)]+=(0.871576310982-0.0353451062158j)*x[2]
            ref[(0, 0, 2, 2)]+=(0.871576310982-0.0353451062158j)*x_ref[2]
            arg[(0, 0, 2, 3)]+=(0.477731913848+0.582105376886j)*x[2]
            ref[(0, 0, 2, 3)]+=(0.477731913848+0.582105376886j)*x_ref[2]
            arg[(0, 0, 3, 0)]+=(-0.503315972548+0.869153746948j)*x[2]
            ref[(0, 0, 3, 0)]+=(-0.503315972548+0.869153746948j)*x_ref[2]
            arg[(0, 0, 3, 1)]+=(0.918727058328-0.190067142695j)*x[2]
            ref[(0, 0, 3, 1)]+=(0.918727058328-0.190067142695j)*x_ref[2]
            arg[(0, 0, 3, 2)]+=(0.906247649404+0.449557182549j)*x[2]
            ref[(0, 0, 3, 2)]+=(0.906247649404+0.449557182549j)*x_ref[2]
            arg[(0, 0, 3, 3)]+=(-0.943836046033+0.767515530667j)*x[2]
            ref[(0, 0, 3, 3)]+=(-0.943836046033+0.767515530667j)*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.860634680747+0.146848800239j)*x[2]
            ref[(0, 1, 0, 0)]+=(-0.860634680747+0.146848800239j)*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.126844361951+0.215962785234j)*x[2]
            ref[(0, 1, 0, 1)]+=(-0.126844361951+0.215962785234j)*x_ref[2]
            arg[(0, 1, 0, 2)]+=(0.424917682775+0.920981086791j)*x[2]
            ref[(0, 1, 0, 2)]+=(0.424917682775+0.920981086791j)*x_ref[2]
            arg[(0, 1, 0, 3)]+=(-0.952687309351-0.694311438117j)*x[2]
            ref[(0, 1, 0, 3)]+=(-0.952687309351-0.694311438117j)*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.0994963640464-0.857954963399j)*x[2]
            ref[(0, 1, 1, 0)]+=(-0.0994963640464-0.857954963399j)*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.278333070739-0.746440880404j)*x[2]
            ref[(0, 1, 1, 1)]+=(-0.278333070739-0.746440880404j)*x_ref[2]
            arg[(0, 1, 1, 2)]+=(0.0968309548139+0.743084064028j)*x[2]
            ref[(0, 1, 1, 2)]+=(0.0968309548139+0.743084064028j)*x_ref[2]
            arg[(0, 1, 1, 3)]+=(-0.652415415736+0.410558062845j)*x[2]
            ref[(0, 1, 1, 3)]+=(-0.652415415736+0.410558062845j)*x_ref[2]
            arg[(0, 1, 2, 0)]+=(-0.25996627249+0.251920103253j)*x[2]
            ref[(0, 1, 2, 0)]+=(-0.25996627249+0.251920103253j)*x_ref[2]
            arg[(0, 1, 2, 1)]+=(-0.925887225406+0.0325631166924j)*x[2]
            ref[(0, 1, 2, 1)]+=(-0.925887225406+0.0325631166924j)*x_ref[2]
            arg[(0, 1, 2, 2)]+=(0.949792291023+0.826372064499j)*x[2]
            ref[(0, 1, 2, 2)]+=(0.949792291023+0.826372064499j)*x_ref[2]
            arg[(0, 1, 2, 3)]+=(-0.517208316673-0.626658249836j)*x[2]
            ref[(0, 1, 2, 3)]+=(-0.517208316673-0.626658249836j)*x_ref[2]
            arg[(0, 1, 3, 0)]+=(-0.736740575588-0.970593307655j)*x[2]
            ref[(0, 1, 3, 0)]+=(-0.736740575588-0.970593307655j)*x_ref[2]
            arg[(0, 1, 3, 1)]+=(-0.195157740807+0.908561131604j)*x[2]
            ref[(0, 1, 3, 1)]+=(-0.195157740807+0.908561131604j)*x_ref[2]
            arg[(0, 1, 3, 2)]+=(0.331728629656-0.694875378672j)*x[2]
            ref[(0, 1, 3, 2)]+=(0.331728629656-0.694875378672j)*x_ref[2]
            arg[(0, 1, 3, 3)]+=(0.721061588711-0.930983642067j)*x[2]
            ref[(0, 1, 3, 3)]+=(0.721061588711-0.930983642067j)*x_ref[2]
            arg[(0, 2, 0, 0)]+=(0.0949018671343+0.310095294379j)*x[2]
            ref[(0, 2, 0, 0)]+=(0.0949018671343+0.310095294379j)*x_ref[2]
            arg[(0, 2, 0, 1)]+=(-0.0854217974543+0.234636943416j)*x[2]
            ref[(0, 2, 0, 1)]+=(-0.0854217974543+0.234636943416j)*x_ref[2]
            arg[(0, 2, 0, 2)]+=(0.145585515301+0.313192680718j)*x[2]
            ref[(0, 2, 0, 2)]+=(0.145585515301+0.313192680718j)*x_ref[2]
            arg[(0, 2, 0, 3)]+=(0.0143769538201+0.902570440876j)*x[2]
            ref[(0, 2, 0, 3)]+=(0.0143769538201+0.902570440876j)*x_ref[2]
            arg[(0, 2, 1, 0)]+=(0.0387093359588+0.868877971497j)*x[2]
            ref[(0, 2, 1, 0)]+=(0.0387093359588+0.868877971497j)*x_ref[2]
            arg[(0, 2, 1, 1)]+=(-0.469204912333+0.891177503428j)*x[2]
            ref[(0, 2, 1, 1)]+=(-0.469204912333+0.891177503428j)*x_ref[2]
            arg[(0, 2, 1, 2)]+=(0.267614710388-0.443086248665j)*x[2]
            ref[(0, 2, 1, 2)]+=(0.267614710388-0.443086248665j)*x_ref[2]
            arg[(0, 2, 1, 3)]+=(0.988377496413-0.19364716585j)*x[2]
            ref[(0, 2, 1, 3)]+=(0.988377496413-0.19364716585j)*x_ref[2]
            arg[(0, 2, 2, 0)]+=(0.132776443782+0.947644604589j)*x[2]
            ref[(0, 2, 2, 0)]+=(0.132776443782+0.947644604589j)*x_ref[2]
            arg[(0, 2, 2, 1)]+=(-0.890237809924-0.698537244542j)*x[2]
            ref[(0, 2, 2, 1)]+=(-0.890237809924-0.698537244542j)*x_ref[2]
            arg[(0, 2, 2, 2)]+=(-0.364432239398-0.392327428696j)*x[2]
            ref[(0, 2, 2, 2)]+=(-0.364432239398-0.392327428696j)*x_ref[2]
            arg[(0, 2, 2, 3)]+=(-0.954195528903+0.598846200262j)*x[2]
            ref[(0, 2, 2, 3)]+=(-0.954195528903+0.598846200262j)*x_ref[2]
            arg[(0, 2, 3, 0)]+=(-0.177366971864-0.312467358791j)*x[2]
            ref[(0, 2, 3, 0)]+=(-0.177366971864-0.312467358791j)*x_ref[2]
            arg[(0, 2, 3, 1)]+=(0.542471603591-0.5231881612j)*x[2]
            ref[(0, 2, 3, 1)]+=(0.542471603591-0.5231881612j)*x_ref[2]
            arg[(0, 2, 3, 2)]+=(0.0203038898932+0.421119435822j)*x[2]
            ref[(0, 2, 3, 2)]+=(0.0203038898932+0.421119435822j)*x_ref[2]
            arg[(0, 2, 3, 3)]+=(-0.595784960208+0.915194965013j)*x[2]
            ref[(0, 2, 3, 3)]+=(-0.595784960208+0.915194965013j)*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.222632270764-0.563467834128j)*x[2]
            ref[(1, 0, 0, 0)]+=(0.222632270764-0.563467834128j)*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.909494400291-0.742117771591j)*x[2]
            ref[(1, 0, 0, 1)]+=(0.909494400291-0.742117771591j)*x_ref[2]
            arg[(1, 0, 0, 2)]+=(-0.308431396216-0.938764300284j)*x[2]
            ref[(1, 0, 0, 2)]+=(-0.308431396216-0.938764300284j)*x_ref[2]
            arg[(1, 0, 0, 3)]+=(0.659276946085-0.139300621501j)*x[2]
            ref[(1, 0, 0, 3)]+=(0.659276946085-0.139300621501j)*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.980909337027+0.262063039865j)*x[2]
            ref[(1, 0, 1, 0)]+=(-0.980909337027+0.262063039865j)*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.882197826511+0.739784974972j)*x[2]
            ref[(1, 0, 1, 1)]+=(-0.882197826511+0.739784974972j)*x_ref[2]
            arg[(1, 0, 1, 2)]+=(-0.426919975697+0.79790971166j)*x[2]
            ref[(1, 0, 1, 2)]+=(-0.426919975697+0.79790971166j)*x_ref[2]
            arg[(1, 0, 1, 3)]+=(0.658756365173+0.64066929361j)*x[2]
            ref[(1, 0, 1, 3)]+=(0.658756365173+0.64066929361j)*x_ref[2]
            arg[(1, 0, 2, 0)]+=(0.0996215885307+0.938498609512j)*x[2]
            ref[(1, 0, 2, 0)]+=(0.0996215885307+0.938498609512j)*x_ref[2]
            arg[(1, 0, 2, 1)]+=(0.287976133213-0.719307877039j)*x[2]
            ref[(1, 0, 2, 1)]+=(0.287976133213-0.719307877039j)*x_ref[2]
            arg[(1, 0, 2, 2)]+=(-0.84043776452-0.0632307134j)*x[2]
            ref[(1, 0, 2, 2)]+=(-0.84043776452-0.0632307134j)*x_ref[2]
            arg[(1, 0, 2, 3)]+=(-0.828080578764+0.881264074127j)*x[2]
            ref[(1, 0, 2, 3)]+=(-0.828080578764+0.881264074127j)*x_ref[2]
            arg[(1, 0, 3, 0)]+=(-0.787546417849+0.224842996281j)*x[2]
            ref[(1, 0, 3, 0)]+=(-0.787546417849+0.224842996281j)*x_ref[2]
            arg[(1, 0, 3, 1)]+=(0.909495935982+0.466454072695j)*x[2]
            ref[(1, 0, 3, 1)]+=(0.909495935982+0.466454072695j)*x_ref[2]
            arg[(1, 0, 3, 2)]+=(0.238831859984-0.981159373348j)*x[2]
            ref[(1, 0, 3, 2)]+=(0.238831859984-0.981159373348j)*x_ref[2]
            arg[(1, 0, 3, 3)]+=(0.353540387447+0.16926251322j)*x[2]
            ref[(1, 0, 3, 3)]+=(0.353540387447+0.16926251322j)*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.743621474829+0.6476504688j)*x[2]
            ref[(1, 1, 0, 0)]+=(-0.743621474829+0.6476504688j)*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.374105966749-0.245763062j)*x[2]
            ref[(1, 1, 0, 1)]+=(0.374105966749-0.245763062j)*x_ref[2]
            arg[(1, 1, 0, 2)]+=(0.962808165853+0.567518321707j)*x[2]
            ref[(1, 1, 0, 2)]+=(0.962808165853+0.567518321707j)*x_ref[2]
            arg[(1, 1, 0, 3)]+=(0.98258881665-0.744670210851j)*x[2]
            ref[(1, 1, 0, 3)]+=(0.98258881665-0.744670210851j)*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.332828568947-0.740172304206j)*x[2]
            ref[(1, 1, 1, 0)]+=(0.332828568947-0.740172304206j)*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.752318040224-0.24702881403j)*x[2]
            ref[(1, 1, 1, 1)]+=(-0.752318040224-0.24702881403j)*x_ref[2]
            arg[(1, 1, 1, 2)]+=(-0.701076837388-0.312398064557j)*x[2]
            ref[(1, 1, 1, 2)]+=(-0.701076837388-0.312398064557j)*x_ref[2]
            arg[(1, 1, 1, 3)]+=(0.0706338875798+0.714541206435j)*x[2]
            ref[(1, 1, 1, 3)]+=(0.0706338875798+0.714541206435j)*x_ref[2]
            arg[(1, 1, 2, 0)]+=(0.447102537981+0.850417833175j)*x[2]
            ref[(1, 1, 2, 0)]+=(0.447102537981+0.850417833175j)*x_ref[2]
            arg[(1, 1, 2, 1)]+=(0.385783654628+0.274503501708j)*x[2]
            ref[(1, 1, 2, 1)]+=(0.385783654628+0.274503501708j)*x_ref[2]
            arg[(1, 1, 2, 2)]+=(0.103750898168-0.992276606136j)*x[2]
            ref[(1, 1, 2, 2)]+=(0.103750898168-0.992276606136j)*x_ref[2]
            arg[(1, 1, 2, 3)]+=(0.00201527794632+0.22272648764j)*x[2]
            ref[(1, 1, 2, 3)]+=(0.00201527794632+0.22272648764j)*x_ref[2]
            arg[(1, 1, 3, 0)]+=(-0.48469951814+0.305104651582j)*x[2]
            ref[(1, 1, 3, 0)]+=(-0.48469951814+0.305104651582j)*x_ref[2]
            arg[(1, 1, 3, 1)]+=(-0.760786257454-0.719517774775j)*x[2]
            ref[(1, 1, 3, 1)]+=(-0.760786257454-0.719517774775j)*x_ref[2]
            arg[(1, 1, 3, 2)]+=(0.781851772208-0.490289050732j)*x[2]
            ref[(1, 1, 3, 2)]+=(0.781851772208-0.490289050732j)*x_ref[2]
            arg[(1, 1, 3, 3)]+=(0.664654350393+0.087911706329j)*x[2]
            ref[(1, 1, 3, 3)]+=(0.664654350393+0.087911706329j)*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.501586783326+0.614840202998j)*x[2]
            ref[(1, 2, 0, 0)]+=(0.501586783326+0.614840202998j)*x_ref[2]
            arg[(1, 2, 0, 1)]+=(-0.115126844046+0.596155797426j)*x[2]
            ref[(1, 2, 0, 1)]+=(-0.115126844046+0.596155797426j)*x_ref[2]
            arg[(1, 2, 0, 2)]+=(0.705673503555-0.700691917276j)*x[2]
            ref[(1, 2, 0, 2)]+=(0.705673503555-0.700691917276j)*x_ref[2]
            arg[(1, 2, 0, 3)]+=(-0.464704395203-0.942050807519j)*x[2]
            ref[(1, 2, 0, 3)]+=(-0.464704395203-0.942050807519j)*x_ref[2]
            arg[(1, 2, 1, 0)]+=(-0.513373155787-0.507486736444j)*x[2]
            ref[(1, 2, 1, 0)]+=(-0.513373155787-0.507486736444j)*x_ref[2]
            arg[(1, 2, 1, 1)]+=(-0.958869679942+0.269386914234j)*x[2]
            ref[(1, 2, 1, 1)]+=(-0.958869679942+0.269386914234j)*x_ref[2]
            arg[(1, 2, 1, 2)]+=(-0.0883313572046-0.198150300047j)*x[2]
            ref[(1, 2, 1, 2)]+=(-0.0883313572046-0.198150300047j)*x_ref[2]
            arg[(1, 2, 1, 3)]+=(0.555176097099-0.017987711124j)*x[2]
            ref[(1, 2, 1, 3)]+=(0.555176097099-0.017987711124j)*x_ref[2]
            arg[(1, 2, 2, 0)]+=(-0.708697465398+0.942784483886j)*x[2]
            ref[(1, 2, 2, 0)]+=(-0.708697465398+0.942784483886j)*x_ref[2]
            arg[(1, 2, 2, 1)]+=(-0.365139598127+0.452352667292j)*x[2]
            ref[(1, 2, 2, 1)]+=(-0.365139598127+0.452352667292j)*x_ref[2]
            arg[(1, 2, 2, 2)]+=(0.54893882003-0.904503847607j)*x[2]
            ref[(1, 2, 2, 2)]+=(0.54893882003-0.904503847607j)*x_ref[2]
            arg[(1, 2, 2, 3)]+=(0.737477625279+0.22682937281j)*x[2]
            ref[(1, 2, 2, 3)]+=(0.737477625279+0.22682937281j)*x_ref[2]
            arg[(1, 2, 3, 0)]+=(-0.869757993024-0.521641883872j)*x[2]
            ref[(1, 2, 3, 0)]+=(-0.869757993024-0.521641883872j)*x_ref[2]
            arg[(1, 2, 3, 1)]+=(-0.524285086952+0.812928461143j)*x[2]
            ref[(1, 2, 3, 1)]+=(-0.524285086952+0.812928461143j)*x_ref[2]
            arg[(1, 2, 3, 2)]+=(0.552379730657+0.100293619405j)*x[2]
            ref[(1, 2, 3, 2)]+=(0.552379730657+0.100293619405j)*x_ref[2]
            arg[(1, 2, 3, 3)]+=(-0.718095853524-0.66994935933j)*x[2]
            ref[(1, 2, 3, 3)]+=(-0.718095853524-0.66994935933j)*x_ref[2]
            arg[(2, 0, 0, 0)]+=(-0.866826670601-0.329334559252j)*x[2]
            ref[(2, 0, 0, 0)]+=(-0.866826670601-0.329334559252j)*x_ref[2]
            arg[(2, 0, 0, 1)]+=(-0.880290140914-0.42052742391j)*x[2]
            ref[(2, 0, 0, 1)]+=(-0.880290140914-0.42052742391j)*x_ref[2]
            arg[(2, 0, 0, 2)]+=(0.463412506784+0.944845733058j)*x[2]
            ref[(2, 0, 0, 2)]+=(0.463412506784+0.944845733058j)*x_ref[2]
            arg[(2, 0, 0, 3)]+=(-0.865309236354-0.541388707336j)*x[2]
            ref[(2, 0, 0, 3)]+=(-0.865309236354-0.541388707336j)*x_ref[2]
            arg[(2, 0, 1, 0)]+=(0.936893411439+0.791143311597j)*x[2]
            ref[(2, 0, 1, 0)]+=(0.936893411439+0.791143311597j)*x_ref[2]
            arg[(2, 0, 1, 1)]+=(0.103943038232-0.0744164048341j)*x[2]
            ref[(2, 0, 1, 1)]+=(0.103943038232-0.0744164048341j)*x_ref[2]
            arg[(2, 0, 1, 2)]+=(0.604832726428+0.225458179288j)*x[2]
            ref[(2, 0, 1, 2)]+=(0.604832726428+0.225458179288j)*x_ref[2]
            arg[(2, 0, 1, 3)]+=(-0.576819865951-0.0452254742107j)*x[2]
            ref[(2, 0, 1, 3)]+=(-0.576819865951-0.0452254742107j)*x_ref[2]
            arg[(2, 0, 2, 0)]+=(-0.289671376368+0.274945843729j)*x[2]
            ref[(2, 0, 2, 0)]+=(-0.289671376368+0.274945843729j)*x_ref[2]
            arg[(2, 0, 2, 1)]+=(-0.353595627734+0.515152756614j)*x[2]
            ref[(2, 0, 2, 1)]+=(-0.353595627734+0.515152756614j)*x_ref[2]
            arg[(2, 0, 2, 2)]+=(-0.224961765455-0.416350648193j)*x[2]
            ref[(2, 0, 2, 2)]+=(-0.224961765455-0.416350648193j)*x_ref[2]
            arg[(2, 0, 2, 3)]+=(-0.005712160621-0.0255149001203j)*x[2]
            ref[(2, 0, 2, 3)]+=(-0.005712160621-0.0255149001203j)*x_ref[2]
            arg[(2, 0, 3, 0)]+=(-0.671636671066+0.205439133064j)*x[2]
            ref[(2, 0, 3, 0)]+=(-0.671636671066+0.205439133064j)*x_ref[2]
            arg[(2, 0, 3, 1)]+=(0.967476704176+0.876372674045j)*x[2]
            ref[(2, 0, 3, 1)]+=(0.967476704176+0.876372674045j)*x_ref[2]
            arg[(2, 0, 3, 2)]+=(0.782632430003-0.845063132132j)*x[2]
            ref[(2, 0, 3, 2)]+=(0.782632430003-0.845063132132j)*x_ref[2]
            arg[(2, 0, 3, 3)]+=(0.945433896934-0.0178902631483j)*x[2]
            ref[(2, 0, 3, 3)]+=(0.945433896934-0.0178902631483j)*x_ref[2]
            arg[(2, 1, 0, 0)]+=(-0.584305069564+0.266698333609j)*x[2]
            ref[(2, 1, 0, 0)]+=(-0.584305069564+0.266698333609j)*x_ref[2]
            arg[(2, 1, 0, 1)]+=(-0.631504850342+0.74092587259j)*x[2]
            ref[(2, 1, 0, 1)]+=(-0.631504850342+0.74092587259j)*x_ref[2]
            arg[(2, 1, 0, 2)]+=(0.181687725207-0.2773039321j)*x[2]
            ref[(2, 1, 0, 2)]+=(0.181687725207-0.2773039321j)*x_ref[2]
            arg[(2, 1, 0, 3)]+=(-0.126153635475-0.892852809033j)*x[2]
            ref[(2, 1, 0, 3)]+=(-0.126153635475-0.892852809033j)*x_ref[2]
            arg[(2, 1, 1, 0)]+=(0.899519772134+0.791523904342j)*x[2]
            ref[(2, 1, 1, 0)]+=(0.899519772134+0.791523904342j)*x_ref[2]
            arg[(2, 1, 1, 1)]+=(-0.329504595315+0.762503292013j)*x[2]
            ref[(2, 1, 1, 1)]+=(-0.329504595315+0.762503292013j)*x_ref[2]
            arg[(2, 1, 1, 2)]+=(-0.576358606852+0.328946703388j)*x[2]
            ref[(2, 1, 1, 2)]+=(-0.576358606852+0.328946703388j)*x_ref[2]
            arg[(2, 1, 1, 3)]+=(-0.480622825248+0.74244278639j)*x[2]
            ref[(2, 1, 1, 3)]+=(-0.480622825248+0.74244278639j)*x_ref[2]
            arg[(2, 1, 2, 0)]+=(-0.654602956736-0.158372643238j)*x[2]
            ref[(2, 1, 2, 0)]+=(-0.654602956736-0.158372643238j)*x_ref[2]
            arg[(2, 1, 2, 1)]+=(0.788791425048-0.0484743096931j)*x[2]
            ref[(2, 1, 2, 1)]+=(0.788791425048-0.0484743096931j)*x_ref[2]
            arg[(2, 1, 2, 2)]+=(-0.155402716217-0.536334434154j)*x[2]
            ref[(2, 1, 2, 2)]+=(-0.155402716217-0.536334434154j)*x_ref[2]
            arg[(2, 1, 2, 3)]+=(-0.240936800921+0.0195977776438j)*x[2]
            ref[(2, 1, 2, 3)]+=(-0.240936800921+0.0195977776438j)*x_ref[2]
            arg[(2, 1, 3, 0)]+=(-0.172544858562-0.548972749649j)*x[2]
            ref[(2, 1, 3, 0)]+=(-0.172544858562-0.548972749649j)*x_ref[2]
            arg[(2, 1, 3, 1)]+=(-0.956491060803-0.148931984153j)*x[2]
            ref[(2, 1, 3, 1)]+=(-0.956491060803-0.148931984153j)*x_ref[2]
            arg[(2, 1, 3, 2)]+=(0.13062255458-0.778412192811j)*x[2]
            ref[(2, 1, 3, 2)]+=(0.13062255458-0.778412192811j)*x_ref[2]
            arg[(2, 1, 3, 3)]+=(0.824713641361+0.368551240628j)*x[2]
            ref[(2, 1, 3, 3)]+=(0.824713641361+0.368551240628j)*x_ref[2]
            arg[(2, 2, 0, 0)]+=(0.600798900105+0.406146410335j)*x[2]
            ref[(2, 2, 0, 0)]+=(0.600798900105+0.406146410335j)*x_ref[2]
            arg[(2, 2, 0, 1)]+=(-0.247219446697+0.0420449507j)*x[2]
            ref[(2, 2, 0, 1)]+=(-0.247219446697+0.0420449507j)*x_ref[2]
            arg[(2, 2, 0, 2)]+=(-0.813369723412+0.866662091775j)*x[2]
            ref[(2, 2, 0, 2)]+=(-0.813369723412+0.866662091775j)*x_ref[2]
            arg[(2, 2, 0, 3)]+=(0.155537379001+0.918260342754j)*x[2]
            ref[(2, 2, 0, 3)]+=(0.155537379001+0.918260342754j)*x_ref[2]
            arg[(2, 2, 1, 0)]+=(-0.195288462921-0.189366498194j)*x[2]
            ref[(2, 2, 1, 0)]+=(-0.195288462921-0.189366498194j)*x_ref[2]
            arg[(2, 2, 1, 1)]+=(-0.4708229981+0.0195626557346j)*x[2]
            ref[(2, 2, 1, 1)]+=(-0.4708229981+0.0195626557346j)*x_ref[2]
            arg[(2, 2, 1, 2)]+=(-0.359132119442-0.113155272402j)*x[2]
            ref[(2, 2, 1, 2)]+=(-0.359132119442-0.113155272402j)*x_ref[2]
            arg[(2, 2, 1, 3)]+=(-0.564012399465+0.927818693393j)*x[2]
            ref[(2, 2, 1, 3)]+=(-0.564012399465+0.927818693393j)*x_ref[2]
            arg[(2, 2, 2, 0)]+=(-0.661575133014+0.215663832156j)*x[2]
            ref[(2, 2, 2, 0)]+=(-0.661575133014+0.215663832156j)*x_ref[2]
            arg[(2, 2, 2, 1)]+=(-0.298110035679-0.298451768574j)*x[2]
            ref[(2, 2, 2, 1)]+=(-0.298110035679-0.298451768574j)*x_ref[2]
            arg[(2, 2, 2, 2)]+=(0.79247636569-0.0836147377465j)*x[2]
            ref[(2, 2, 2, 2)]+=(0.79247636569-0.0836147377465j)*x_ref[2]
            arg[(2, 2, 2, 3)]+=(0.606402430362-0.873313898169j)*x[2]
            ref[(2, 2, 2, 3)]+=(0.606402430362-0.873313898169j)*x_ref[2]
            arg[(2, 2, 3, 0)]+=(0.367822916683-0.768977690587j)*x[2]
            ref[(2, 2, 3, 0)]+=(0.367822916683-0.768977690587j)*x_ref[2]
            arg[(2, 2, 3, 1)]+=(-0.919596343336+0.167728399067j)*x[2]
            ref[(2, 2, 3, 1)]+=(-0.919596343336+0.167728399067j)*x_ref[2]
            arg[(2, 2, 3, 2)]+=(-0.324158394456-0.0345522278457j)*x[2]
            ref[(2, 2, 3, 2)]+=(-0.324158394456-0.0345522278457j)*x_ref[2]
            arg[(2, 2, 3, 3)]+=(-0.690979437362+0.341321118865j)*x[2]
            ref[(2, 2, 3, 3)]+=(-0.690979437362+0.341321118865j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.795883870454+0.452628709205j)*x[0] + ((0.328137296043+0.115669612606j))*x[1]
        ref=(-0.795883870454+0.452628709205j)*x_ref[0] + ((0.328137296043+0.115669612606j))*x_ref[1]
        if dim==3:
            arg+=((0.595624998921-0.510298575735j))*x[2]
            ref+=((0.595624998921-0.510298575735j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=(0.456612180793-0.444688880635j)*x[0] + ((-0.939204666686+0.110827276344j))*x[1]
        ref[(0,)]=(0.456612180793-0.444688880635j)*x_ref[0] + ((-0.939204666686+0.110827276344j))*x_ref[1]
        arg[(1,)]=(-0.958690337768-0.852206801482j)*x[0] + ((-0.00752454112142+0.330448082906j))*x[1]
        ref[(1,)]=(-0.958690337768-0.852206801482j)*x_ref[0] + ((-0.00752454112142+0.330448082906j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.0183028517792-0.0661922692878j)*x[2]
            ref[(0,)]+=(-0.0183028517792-0.0661922692878j)*x_ref[2]
            arg[(1,)]+=(-0.901969856681+0.437345813412j)*x[2]
            ref[(1,)]+=(-0.901969856681+0.437345813412j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3),w)
        ref = Data(0,(3, 3),w_ref)
        arg[(0, 0)]=(0.370685789206+0.37845139266j)*x[0] + ((0.327084918505-0.24750665582j))*x[1]
        ref[(0, 0)]=(0.370685789206+0.37845139266j)*x_ref[0] + ((0.327084918505-0.24750665582j))*x_ref[1]
        arg[(0, 1)]=(-0.278174341343+0.371481494743j)*x[0] + ((-0.143398547819+0.996836080842j))*x[1]
        ref[(0, 1)]=(-0.278174341343+0.371481494743j)*x_ref[0] + ((-0.143398547819+0.996836080842j))*x_ref[1]
        arg[(0, 2)]=(0.883687906965+0.449014438575j)*x[0] + ((-0.501750429249-0.446886685484j))*x[1]
        ref[(0, 2)]=(0.883687906965+0.449014438575j)*x_ref[0] + ((-0.501750429249-0.446886685484j))*x_ref[1]
        arg[(1, 0)]=(-0.828362528192-0.495066732496j)*x[0] + ((0.244641406808+0.196154122795j))*x[1]
        ref[(1, 0)]=(-0.828362528192-0.495066732496j)*x_ref[0] + ((0.244641406808+0.196154122795j))*x_ref[1]
        arg[(1, 1)]=(-0.141312019783+0.513754368965j)*x[0] + ((0.392387852823-0.203658898097j))*x[1]
        ref[(1, 1)]=(-0.141312019783+0.513754368965j)*x_ref[0] + ((0.392387852823-0.203658898097j))*x_ref[1]
        arg[(1, 2)]=(-0.882723824934-0.410675076709j)*x[0] + ((-0.982583526906+0.235964866764j))*x[1]
        ref[(1, 2)]=(-0.882723824934-0.410675076709j)*x_ref[0] + ((-0.982583526906+0.235964866764j))*x_ref[1]
        arg[(2, 0)]=(-0.225180635869+0.861936854971j)*x[0] + ((0.517543453491+0.383939255663j))*x[1]
        ref[(2, 0)]=(-0.225180635869+0.861936854971j)*x_ref[0] + ((0.517543453491+0.383939255663j))*x_ref[1]
        arg[(2, 1)]=(0.807374582257-0.97768570388j)*x[0] + ((0.361761213864-0.993703079041j))*x[1]
        ref[(2, 1)]=(0.807374582257-0.97768570388j)*x_ref[0] + ((0.361761213864-0.993703079041j))*x_ref[1]
        arg[(2, 2)]=(-0.367089989715+0.665146592781j)*x[0] + ((0.743060787819+0.312073093982j))*x[1]
        ref[(2, 2)]=(-0.367089989715+0.665146592781j)*x_ref[0] + ((0.743060787819+0.312073093982j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.115797500607+0.526693885781j)*x[2]
            ref[(0, 0)]+=(0.115797500607+0.526693885781j)*x_ref[2]
            arg[(0, 1)]+=(-0.771143366695+0.456391541418j)*x[2]
            ref[(0, 1)]+=(-0.771143366695+0.456391541418j)*x_ref[2]
            arg[(0, 2)]+=(-0.0364636557826+0.841392987704j)*x[2]
            ref[(0, 2)]+=(-0.0364636557826+0.841392987704j)*x_ref[2]
            arg[(1, 0)]+=(0.322742379622-0.64438148516j)*x[2]
            ref[(1, 0)]+=(0.322742379622-0.64438148516j)*x_ref[2]
            arg[(1, 1)]+=(0.4065000133-0.797538461014j)*x[2]
            ref[(1, 1)]+=(0.4065000133-0.797538461014j)*x_ref[2]
            arg[(1, 2)]+=(0.944928964143-0.561239709477j)*x[2]
            ref[(1, 2)]+=(0.944928964143-0.561239709477j)*x_ref[2]
            arg[(2, 0)]+=(0.520038663207+0.195517531274j)*x[2]
            ref[(2, 0)]+=(0.520038663207+0.195517531274j)*x_ref[2]
            arg[(2, 1)]+=(0.290825285266-0.954471067848j)*x[2]
            ref[(2, 1)]+=(0.290825285266-0.954471067848j)*x_ref[2]
            arg[(2, 2)]+=(0.134768772744+0.914672898339j)*x[2]
            ref[(2, 2)]+=(0.134768772744+0.914672898339j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 3),w)
        ref = Data(0,(2, 4, 3),w_ref)
        arg[(0, 0, 0)]=(-0.800885000513-0.723467008889j)*x[0] + ((0.63001606392+0.140240455371j))*x[1]
        ref[(0, 0, 0)]=(-0.800885000513-0.723467008889j)*x_ref[0] + ((0.63001606392+0.140240455371j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.749357501776+0.0132566546659j)*x[0] + ((-0.260462033196-0.837875392457j))*x[1]
        ref[(0, 0, 1)]=(-0.749357501776+0.0132566546659j)*x_ref[0] + ((-0.260462033196-0.837875392457j))*x_ref[1]
        arg[(0, 0, 2)]=(-0.102521511045-0.64759347722j)*x[0] + ((-0.279286003437+0.471559727983j))*x[1]
        ref[(0, 0, 2)]=(-0.102521511045-0.64759347722j)*x_ref[0] + ((-0.279286003437+0.471559727983j))*x_ref[1]
        arg[(0, 1, 0)]=(0.891187643916+0.783891509462j)*x[0] + ((-0.890488819635+0.473257631096j))*x[1]
        ref[(0, 1, 0)]=(0.891187643916+0.783891509462j)*x_ref[0] + ((-0.890488819635+0.473257631096j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.525781136808+0.00984582818403j)*x[0] + ((-0.072356511506+0.404754063855j))*x[1]
        ref[(0, 1, 1)]=(-0.525781136808+0.00984582818403j)*x_ref[0] + ((-0.072356511506+0.404754063855j))*x_ref[1]
        arg[(0, 1, 2)]=(0.180519179664-0.251260642191j)*x[0] + ((0.237551366383+0.139892863665j))*x[1]
        ref[(0, 1, 2)]=(0.180519179664-0.251260642191j)*x_ref[0] + ((0.237551366383+0.139892863665j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.459328562632+0.135923416067j)*x[0] + ((0.768496402282-0.516999571456j))*x[1]
        ref[(0, 2, 0)]=(-0.459328562632+0.135923416067j)*x_ref[0] + ((0.768496402282-0.516999571456j))*x_ref[1]
        arg[(0, 2, 1)]=(0.511386519054+0.742969361662j)*x[0] + ((-0.400480410784-0.156560045139j))*x[1]
        ref[(0, 2, 1)]=(0.511386519054+0.742969361662j)*x_ref[0] + ((-0.400480410784-0.156560045139j))*x_ref[1]
        arg[(0, 2, 2)]=(-0.320739877027-0.927002694343j)*x[0] + ((0.308253316432+0.513834338062j))*x[1]
        ref[(0, 2, 2)]=(-0.320739877027-0.927002694343j)*x_ref[0] + ((0.308253316432+0.513834338062j))*x_ref[1]
        arg[(0, 3, 0)]=(0.194130105552+0.971550743664j)*x[0] + ((0.496913952252+0.602685198747j))*x[1]
        ref[(0, 3, 0)]=(0.194130105552+0.971550743664j)*x_ref[0] + ((0.496913952252+0.602685198747j))*x_ref[1]
        arg[(0, 3, 1)]=(0.0943485394212+0.0721394722683j)*x[0] + ((0.772591063618-0.393838984291j))*x[1]
        ref[(0, 3, 1)]=(0.0943485394212+0.0721394722683j)*x_ref[0] + ((0.772591063618-0.393838984291j))*x_ref[1]
        arg[(0, 3, 2)]=(0.543817013456+0.614275919352j)*x[0] + ((0.0920277943552+0.315104677922j))*x[1]
        ref[(0, 3, 2)]=(0.543817013456+0.614275919352j)*x_ref[0] + ((0.0920277943552+0.315104677922j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.626949482653-0.676481002891j)*x[0] + ((0.337318644333+0.278278437488j))*x[1]
        ref[(1, 0, 0)]=(-0.626949482653-0.676481002891j)*x_ref[0] + ((0.337318644333+0.278278437488j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.288525082679-0.787037682491j)*x[0] + ((-0.541370508022+0.982049660904j))*x[1]
        ref[(1, 0, 1)]=(-0.288525082679-0.787037682491j)*x_ref[0] + ((-0.541370508022+0.982049660904j))*x_ref[1]
        arg[(1, 0, 2)]=(0.582142256218+0.0599773725086j)*x[0] + ((0.73051792889-0.745498073563j))*x[1]
        ref[(1, 0, 2)]=(0.582142256218+0.0599773725086j)*x_ref[0] + ((0.73051792889-0.745498073563j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.641819606018+0.359942545368j)*x[0] + ((-0.456546662904-0.886637380399j))*x[1]
        ref[(1, 1, 0)]=(-0.641819606018+0.359942545368j)*x_ref[0] + ((-0.456546662904-0.886637380399j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.456001881901+0.533244950906j)*x[0] + ((-0.93372951835-0.0671452303059j))*x[1]
        ref[(1, 1, 1)]=(-0.456001881901+0.533244950906j)*x_ref[0] + ((-0.93372951835-0.0671452303059j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.393594373029-0.346842777665j)*x[0] + ((-0.848745797795-0.106879678186j))*x[1]
        ref[(1, 1, 2)]=(-0.393594373029-0.346842777665j)*x_ref[0] + ((-0.848745797795-0.106879678186j))*x_ref[1]
        arg[(1, 2, 0)]=(0.294457504965-0.780538561582j)*x[0] + ((-0.487438042537-0.894464136075j))*x[1]
        ref[(1, 2, 0)]=(0.294457504965-0.780538561582j)*x_ref[0] + ((-0.487438042537-0.894464136075j))*x_ref[1]
        arg[(1, 2, 1)]=(0.255386391587-0.183741948147j)*x[0] + ((-0.858623029843+0.86663645082j))*x[1]
        ref[(1, 2, 1)]=(0.255386391587-0.183741948147j)*x_ref[0] + ((-0.858623029843+0.86663645082j))*x_ref[1]
        arg[(1, 2, 2)]=(0.514739780265-0.973201099651j)*x[0] + ((-0.929944118712+0.388193907912j))*x[1]
        ref[(1, 2, 2)]=(0.514739780265-0.973201099651j)*x_ref[0] + ((-0.929944118712+0.388193907912j))*x_ref[1]
        arg[(1, 3, 0)]=(-0.147519825777+0.063234437118j)*x[0] + ((0.59239279603+0.330635480214j))*x[1]
        ref[(1, 3, 0)]=(-0.147519825777+0.063234437118j)*x_ref[0] + ((0.59239279603+0.330635480214j))*x_ref[1]
        arg[(1, 3, 1)]=(0.95698418029+0.835721396574j)*x[0] + ((0.647845690304+0.842246543389j))*x[1]
        ref[(1, 3, 1)]=(0.95698418029+0.835721396574j)*x_ref[0] + ((0.647845690304+0.842246543389j))*x_ref[1]
        arg[(1, 3, 2)]=(0.658447279545+0.447728602371j)*x[0] + ((0.599737672218-0.295980198243j))*x[1]
        ref[(1, 3, 2)]=(0.658447279545+0.447728602371j)*x_ref[0] + ((0.599737672218-0.295980198243j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.602322860437+0.569699583898j)*x[2]
            ref[(0, 0, 0)]+=(-0.602322860437+0.569699583898j)*x_ref[2]
            arg[(0, 0, 1)]+=(0.595044445335-0.315246646735j)*x[2]
            ref[(0, 0, 1)]+=(0.595044445335-0.315246646735j)*x_ref[2]
            arg[(0, 0, 2)]+=(-0.607142697527-0.958397194717j)*x[2]
            ref[(0, 0, 2)]+=(-0.607142697527-0.958397194717j)*x_ref[2]
            arg[(0, 1, 0)]+=(0.29514650053+0.514321906554j)*x[2]
            ref[(0, 1, 0)]+=(0.29514650053+0.514321906554j)*x_ref[2]
            arg[(0, 1, 1)]+=(0.358727103733-0.305163963167j)*x[2]
            ref[(0, 1, 1)]+=(0.358727103733-0.305163963167j)*x_ref[2]
            arg[(0, 1, 2)]+=(0.131967612556-0.401870306666j)*x[2]
            ref[(0, 1, 2)]+=(0.131967612556-0.401870306666j)*x_ref[2]
            arg[(0, 2, 0)]+=(0.0949277519034-0.121174117544j)*x[2]
            ref[(0, 2, 0)]+=(0.0949277519034-0.121174117544j)*x_ref[2]
            arg[(0, 2, 1)]+=(0.361720648541+0.86494341954j)*x[2]
            ref[(0, 2, 1)]+=(0.361720648541+0.86494341954j)*x_ref[2]
            arg[(0, 2, 2)]+=(0.710023861657+0.449150603433j)*x[2]
            ref[(0, 2, 2)]+=(0.710023861657+0.449150603433j)*x_ref[2]
            arg[(0, 3, 0)]+=(-0.259456663319-0.944134095986j)*x[2]
            ref[(0, 3, 0)]+=(-0.259456663319-0.944134095986j)*x_ref[2]
            arg[(0, 3, 1)]+=(-0.0684534629832+0.673846633658j)*x[2]
            ref[(0, 3, 1)]+=(-0.0684534629832+0.673846633658j)*x_ref[2]
            arg[(0, 3, 2)]+=(0.548594650945+0.603667094716j)*x[2]
            ref[(0, 3, 2)]+=(0.548594650945+0.603667094716j)*x_ref[2]
            arg[(1, 0, 0)]+=(0.851918913807-0.871339130352j)*x[2]
            ref[(1, 0, 0)]+=(0.851918913807-0.871339130352j)*x_ref[2]
            arg[(1, 0, 1)]+=(-0.348234252973-0.514311255915j)*x[2]
            ref[(1, 0, 1)]+=(-0.348234252973-0.514311255915j)*x_ref[2]
            arg[(1, 0, 2)]+=(0.91695157493+0.861921442561j)*x[2]
            ref[(1, 0, 2)]+=(0.91695157493+0.861921442561j)*x_ref[2]
            arg[(1, 1, 0)]+=(-0.3702100668+0.811341867767j)*x[2]
            ref[(1, 1, 0)]+=(-0.3702100668+0.811341867767j)*x_ref[2]
            arg[(1, 1, 1)]+=(-0.208023821436-0.216686525369j)*x[2]
            ref[(1, 1, 1)]+=(-0.208023821436-0.216686525369j)*x_ref[2]
            arg[(1, 1, 2)]+=(0.800827466366-0.396180395779j)*x[2]
            ref[(1, 1, 2)]+=(0.800827466366-0.396180395779j)*x_ref[2]
            arg[(1, 2, 0)]+=(0.0594460359847-0.528280681813j)*x[2]
            ref[(1, 2, 0)]+=(0.0594460359847-0.528280681813j)*x_ref[2]
            arg[(1, 2, 1)]+=(-0.548580549417+0.0451163129415j)*x[2]
            ref[(1, 2, 1)]+=(-0.548580549417+0.0451163129415j)*x_ref[2]
            arg[(1, 2, 2)]+=(0.97585679895+0.906931599457j)*x[2]
            ref[(1, 2, 2)]+=(0.97585679895+0.906931599457j)*x_ref[2]
            arg[(1, 3, 0)]+=(-0.94014547208-0.350121664412j)*x[2]
            ref[(1, 3, 0)]+=(-0.94014547208-0.350121664412j)*x_ref[2]
            arg[(1, 3, 1)]+=(-0.468947055145+0.188938751084j)*x[2]
            ref[(1, 3, 1)]+=(-0.468947055145+0.188938751084j)*x_ref[2]
            arg[(1, 3, 2)]+=(0.340177268025-0.517085614531j)*x[2]
            ref[(1, 3, 2)]+=(0.340177268025-0.517085614531j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 3, 2),w)
        ref = Data(0,(4, 2, 3, 2),w_ref)
        arg[(0, 0, 0, 0)]=(0.560233793409-0.347435293874j)*x[0] + ((-0.738586297773+0.48299530183j))*x[1]
        ref[(0, 0, 0, 0)]=(0.560233793409-0.347435293874j)*x_ref[0] + ((-0.738586297773+0.48299530183j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.347689902753+0.844511464424j)*x[0] + ((0.637913619591-0.838057257811j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.347689902753+0.844511464424j)*x_ref[0] + ((0.637913619591-0.838057257811j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.633953500656-0.135054923747j)*x[0] + ((-0.3549152977+0.731492774206j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.633953500656-0.135054923747j)*x_ref[0] + ((-0.3549152977+0.731492774206j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.535203449113-0.674494553773j)*x[0] + ((0.738217558667-0.653562030005j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.535203449113-0.674494553773j)*x_ref[0] + ((0.738217558667-0.653562030005j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(0.942465830139+0.00170581061263j)*x[0] + ((0.0759383593326-0.616989278511j))*x[1]
        ref[(0, 0, 2, 0)]=(0.942465830139+0.00170581061263j)*x_ref[0] + ((0.0759383593326-0.616989278511j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(-0.60270307062-0.180903560333j)*x[0] + ((-0.311169826178-0.594489636895j))*x[1]
        ref[(0, 0, 2, 1)]=(-0.60270307062-0.180903560333j)*x_ref[0] + ((-0.311169826178-0.594489636895j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.650685412819+0.727198710504j)*x[0] + ((-0.666015702862+0.314144124628j))*x[1]
        ref[(0, 1, 0, 0)]=(0.650685412819+0.727198710504j)*x_ref[0] + ((-0.666015702862+0.314144124628j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.404788647539-0.190429635652j)*x[0] + ((-0.688681828202-0.540279134582j))*x[1]
        ref[(0, 1, 0, 1)]=(0.404788647539-0.190429635652j)*x_ref[0] + ((-0.688681828202-0.540279134582j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.404655814324-0.828356448668j)*x[0] + ((-0.216502268406+0.514470453286j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.404655814324-0.828356448668j)*x_ref[0] + ((-0.216502268406+0.514470453286j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.94118336971-0.241755758914j)*x[0] + ((0.469690022388+0.711978231758j))*x[1]
        ref[(0, 1, 1, 1)]=(0.94118336971-0.241755758914j)*x_ref[0] + ((0.469690022388+0.711978231758j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(0.542627683703+0.819126126477j)*x[0] + ((0.354974736285+0.0768657137585j))*x[1]
        ref[(0, 1, 2, 0)]=(0.542627683703+0.819126126477j)*x_ref[0] + ((0.354974736285+0.0768657137585j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(-0.591256868537-0.81651487962j)*x[0] + ((0.701160314017-0.437053521797j))*x[1]
        ref[(0, 1, 2, 1)]=(-0.591256868537-0.81651487962j)*x_ref[0] + ((0.701160314017-0.437053521797j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.767176149659-0.141606997871j)*x[0] + ((-0.0774018056996-0.96234045492j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.767176149659-0.141606997871j)*x_ref[0] + ((-0.0774018056996-0.96234045492j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(-0.687602199463-0.606191991415j)*x[0] + ((-0.907201329003+0.891790149193j))*x[1]
        ref[(1, 0, 0, 1)]=(-0.687602199463-0.606191991415j)*x_ref[0] + ((-0.907201329003+0.891790149193j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(0.647906505901+0.266237053688j)*x[0] + ((-0.337449578635-0.483545689972j))*x[1]
        ref[(1, 0, 1, 0)]=(0.647906505901+0.266237053688j)*x_ref[0] + ((-0.337449578635-0.483545689972j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.945071427607+0.51940179808j)*x[0] + ((-0.0138885727184-0.947990673409j))*x[1]
        ref[(1, 0, 1, 1)]=(0.945071427607+0.51940179808j)*x_ref[0] + ((-0.0138885727184-0.947990673409j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(-0.665532497029+0.15976735083j)*x[0] + ((0.400808809832-0.321836053992j))*x[1]
        ref[(1, 0, 2, 0)]=(-0.665532497029+0.15976735083j)*x_ref[0] + ((0.400808809832-0.321836053992j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(-0.0709409426766-0.257172756436j)*x[0] + ((0.752009870138-0.491410175672j))*x[1]
        ref[(1, 0, 2, 1)]=(-0.0709409426766-0.257172756436j)*x_ref[0] + ((0.752009870138-0.491410175672j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.85846339039-0.0681910557308j)*x[0] + ((-0.471159148254+0.2933280627j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.85846339039-0.0681910557308j)*x_ref[0] + ((-0.471159148254+0.2933280627j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.195507775938+0.640722855402j)*x[0] + ((0.236602852526+0.610931477707j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.195507775938+0.640722855402j)*x_ref[0] + ((0.236602852526+0.610931477707j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.0594250120379+0.962153544837j)*x[0] + ((0.436703067978-0.390255254816j))*x[1]
        ref[(1, 1, 1, 0)]=(0.0594250120379+0.962153544837j)*x_ref[0] + ((0.436703067978-0.390255254816j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.912156458215-0.166981400412j)*x[0] + ((-0.577282069472-0.0398892772684j))*x[1]
        ref[(1, 1, 1, 1)]=(0.912156458215-0.166981400412j)*x_ref[0] + ((-0.577282069472-0.0398892772684j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(0.763099902799-0.712722745773j)*x[0] + ((0.120451926665-0.448119725071j))*x[1]
        ref[(1, 1, 2, 0)]=(0.763099902799-0.712722745773j)*x_ref[0] + ((0.120451926665-0.448119725071j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(-0.979498081379+0.6882626998j)*x[0] + ((0.389371527692-0.0239423675216j))*x[1]
        ref[(1, 1, 2, 1)]=(-0.979498081379+0.6882626998j)*x_ref[0] + ((0.389371527692-0.0239423675216j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.223302705079+0.0464655434707j)*x[0] + ((0.522614752849-0.231259834696j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.223302705079+0.0464655434707j)*x_ref[0] + ((0.522614752849-0.231259834696j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(0.822041628409+0.77257991287j)*x[0] + ((-0.750002614071-0.827180686633j))*x[1]
        ref[(2, 0, 0, 1)]=(0.822041628409+0.77257991287j)*x_ref[0] + ((-0.750002614071-0.827180686633j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(-0.323364625636+0.953559178139j)*x[0] + ((-0.709017479755-0.44168022443j))*x[1]
        ref[(2, 0, 1, 0)]=(-0.323364625636+0.953559178139j)*x_ref[0] + ((-0.709017479755-0.44168022443j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(-0.353101994466+0.366021504628j)*x[0] + ((-0.777732787184+0.607382951334j))*x[1]
        ref[(2, 0, 1, 1)]=(-0.353101994466+0.366021504628j)*x_ref[0] + ((-0.777732787184+0.607382951334j))*x_ref[1]
        arg[(2, 0, 2, 0)]=(0.917392340946-0.916199560261j)*x[0] + ((0.423957785087+0.708489667334j))*x[1]
        ref[(2, 0, 2, 0)]=(0.917392340946-0.916199560261j)*x_ref[0] + ((0.423957785087+0.708489667334j))*x_ref[1]
        arg[(2, 0, 2, 1)]=(0.704240199391+0.305173030818j)*x[0] + ((0.931192842428+0.550955767082j))*x[1]
        ref[(2, 0, 2, 1)]=(0.704240199391+0.305173030818j)*x_ref[0] + ((0.931192842428+0.550955767082j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(0.915238951479+0.4726519275j)*x[0] + ((-0.668111065291+0.918734731952j))*x[1]
        ref[(2, 1, 0, 0)]=(0.915238951479+0.4726519275j)*x_ref[0] + ((-0.668111065291+0.918734731952j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.457391904691-0.789696324265j)*x[0] + ((-0.348344320113-0.785572881437j))*x[1]
        ref[(2, 1, 0, 1)]=(0.457391904691-0.789696324265j)*x_ref[0] + ((-0.348344320113-0.785572881437j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(-0.696741458553-0.525704315942j)*x[0] + ((0.673348780674-0.580887830265j))*x[1]
        ref[(2, 1, 1, 0)]=(-0.696741458553-0.525704315942j)*x_ref[0] + ((0.673348780674-0.580887830265j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(0.678068187523+0.802065267019j)*x[0] + ((-0.215006361474+0.74082903649j))*x[1]
        ref[(2, 1, 1, 1)]=(0.678068187523+0.802065267019j)*x_ref[0] + ((-0.215006361474+0.74082903649j))*x_ref[1]
        arg[(2, 1, 2, 0)]=(-0.0663838070778+0.557161579478j)*x[0] + ((0.966935153883+0.827231931333j))*x[1]
        ref[(2, 1, 2, 0)]=(-0.0663838070778+0.557161579478j)*x_ref[0] + ((0.966935153883+0.827231931333j))*x_ref[1]
        arg[(2, 1, 2, 1)]=(-0.528170207938+0.715267459948j)*x[0] + ((-0.919028219914-0.839105021728j))*x[1]
        ref[(2, 1, 2, 1)]=(-0.528170207938+0.715267459948j)*x_ref[0] + ((-0.919028219914-0.839105021728j))*x_ref[1]
        arg[(3, 0, 0, 0)]=(0.216589934028-0.270573094081j)*x[0] + ((0.795910921072+0.238373215056j))*x[1]
        ref[(3, 0, 0, 0)]=(0.216589934028-0.270573094081j)*x_ref[0] + ((0.795910921072+0.238373215056j))*x_ref[1]
        arg[(3, 0, 0, 1)]=(-0.649309538731+0.303773394579j)*x[0] + ((0.533497673384-0.372224174803j))*x[1]
        ref[(3, 0, 0, 1)]=(-0.649309538731+0.303773394579j)*x_ref[0] + ((0.533497673384-0.372224174803j))*x_ref[1]
        arg[(3, 0, 1, 0)]=(0.9398963185+0.861587594762j)*x[0] + ((0.317766453043-0.344106846124j))*x[1]
        ref[(3, 0, 1, 0)]=(0.9398963185+0.861587594762j)*x_ref[0] + ((0.317766453043-0.344106846124j))*x_ref[1]
        arg[(3, 0, 1, 1)]=(-0.967202679609-0.336386407542j)*x[0] + ((0.0105355981404-0.969173346677j))*x[1]
        ref[(3, 0, 1, 1)]=(-0.967202679609-0.336386407542j)*x_ref[0] + ((0.0105355981404-0.969173346677j))*x_ref[1]
        arg[(3, 0, 2, 0)]=(-0.0955853159691+0.756602373974j)*x[0] + ((-0.189460895151-0.871095076823j))*x[1]
        ref[(3, 0, 2, 0)]=(-0.0955853159691+0.756602373974j)*x_ref[0] + ((-0.189460895151-0.871095076823j))*x_ref[1]
        arg[(3, 0, 2, 1)]=(-0.844539666978-0.516168496716j)*x[0] + ((-0.325544754153+0.998935732416j))*x[1]
        ref[(3, 0, 2, 1)]=(-0.844539666978-0.516168496716j)*x_ref[0] + ((-0.325544754153+0.998935732416j))*x_ref[1]
        arg[(3, 1, 0, 0)]=(0.0955394280374+0.663423843183j)*x[0] + ((-0.300415577295-0.883432072144j))*x[1]
        ref[(3, 1, 0, 0)]=(0.0955394280374+0.663423843183j)*x_ref[0] + ((-0.300415577295-0.883432072144j))*x_ref[1]
        arg[(3, 1, 0, 1)]=(0.6413590348-0.0762084386113j)*x[0] + ((-0.131962739342+0.194569092544j))*x[1]
        ref[(3, 1, 0, 1)]=(0.6413590348-0.0762084386113j)*x_ref[0] + ((-0.131962739342+0.194569092544j))*x_ref[1]
        arg[(3, 1, 1, 0)]=(-0.585267760975+0.317943877729j)*x[0] + ((-0.622663134336+0.663720673501j))*x[1]
        ref[(3, 1, 1, 0)]=(-0.585267760975+0.317943877729j)*x_ref[0] + ((-0.622663134336+0.663720673501j))*x_ref[1]
        arg[(3, 1, 1, 1)]=(0.693598923314+0.418310083407j)*x[0] + ((-0.83561511298+0.107573095258j))*x[1]
        ref[(3, 1, 1, 1)]=(0.693598923314+0.418310083407j)*x_ref[0] + ((-0.83561511298+0.107573095258j))*x_ref[1]
        arg[(3, 1, 2, 0)]=(-0.475128013356-0.624179896002j)*x[0] + ((0.985032233287-0.987814106592j))*x[1]
        ref[(3, 1, 2, 0)]=(-0.475128013356-0.624179896002j)*x_ref[0] + ((0.985032233287-0.987814106592j))*x_ref[1]
        arg[(3, 1, 2, 1)]=(0.049073444857-0.680132897642j)*x[0] + ((0.386125491977-0.409665810704j))*x[1]
        ref[(3, 1, 2, 1)]=(0.049073444857-0.680132897642j)*x_ref[0] + ((0.386125491977-0.409665810704j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.453444706697-0.673603299714j)*x[2]
            ref[(0, 0, 0, 0)]+=(-0.453444706697-0.673603299714j)*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.0878578917045+0.839505238049j)*x[2]
            ref[(0, 0, 0, 1)]+=(-0.0878578917045+0.839505238049j)*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.881608240786-0.0453393971996j)*x[2]
            ref[(0, 0, 1, 0)]+=(-0.881608240786-0.0453393971996j)*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.782992328966+0.0547413497002j)*x[2]
            ref[(0, 0, 1, 1)]+=(0.782992328966+0.0547413497002j)*x_ref[2]
            arg[(0, 0, 2, 0)]+=(-0.823607126718+0.825114494573j)*x[2]
            ref[(0, 0, 2, 0)]+=(-0.823607126718+0.825114494573j)*x_ref[2]
            arg[(0, 0, 2, 1)]+=(-0.225702122752+0.291336071004j)*x[2]
            ref[(0, 0, 2, 1)]+=(-0.225702122752+0.291336071004j)*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.710268884237-0.333446280132j)*x[2]
            ref[(0, 1, 0, 0)]+=(0.710268884237-0.333446280132j)*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.331589597829+0.262792468498j)*x[2]
            ref[(0, 1, 0, 1)]+=(0.331589597829+0.262792468498j)*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.924896517991-0.524471196605j)*x[2]
            ref[(0, 1, 1, 0)]+=(0.924896517991-0.524471196605j)*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.240907771486-0.5837829947j)*x[2]
            ref[(0, 1, 1, 1)]+=(-0.240907771486-0.5837829947j)*x_ref[2]
            arg[(0, 1, 2, 0)]+=(-0.198261889232-0.87039585262j)*x[2]
            ref[(0, 1, 2, 0)]+=(-0.198261889232-0.87039585262j)*x_ref[2]
            arg[(0, 1, 2, 1)]+=(-0.143458780357-0.737711946336j)*x[2]
            ref[(0, 1, 2, 1)]+=(-0.143458780357-0.737711946336j)*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.513243181731-0.960964248275j)*x[2]
            ref[(1, 0, 0, 0)]+=(-0.513243181731-0.960964248275j)*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.152361429395+0.967697647258j)*x[2]
            ref[(1, 0, 0, 1)]+=(0.152361429395+0.967697647258j)*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.0888235491749+0.273555094834j)*x[2]
            ref[(1, 0, 1, 0)]+=(0.0888235491749+0.273555094834j)*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.692091740019+0.653595122294j)*x[2]
            ref[(1, 0, 1, 1)]+=(-0.692091740019+0.653595122294j)*x_ref[2]
            arg[(1, 0, 2, 0)]+=(0.828975139207+0.349995433781j)*x[2]
            ref[(1, 0, 2, 0)]+=(0.828975139207+0.349995433781j)*x_ref[2]
            arg[(1, 0, 2, 1)]+=(-0.937602384367-0.0227693096503j)*x[2]
            ref[(1, 0, 2, 1)]+=(-0.937602384367-0.0227693096503j)*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.99304330085-0.684293380824j)*x[2]
            ref[(1, 1, 0, 0)]+=(0.99304330085-0.684293380824j)*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.564511052637+0.0455742244642j)*x[2]
            ref[(1, 1, 0, 1)]+=(-0.564511052637+0.0455742244642j)*x_ref[2]
            arg[(1, 1, 1, 0)]+=(-0.180695878518+0.0346566825016j)*x[2]
            ref[(1, 1, 1, 0)]+=(-0.180695878518+0.0346566825016j)*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.891326510721-0.934972228956j)*x[2]
            ref[(1, 1, 1, 1)]+=(-0.891326510721-0.934972228956j)*x_ref[2]
            arg[(1, 1, 2, 0)]+=(-0.625105157341+0.856116885824j)*x[2]
            ref[(1, 1, 2, 0)]+=(-0.625105157341+0.856116885824j)*x_ref[2]
            arg[(1, 1, 2, 1)]+=(-0.264398534345+0.336721661648j)*x[2]
            ref[(1, 1, 2, 1)]+=(-0.264398534345+0.336721661648j)*x_ref[2]
            arg[(2, 0, 0, 0)]+=(-0.834016289187+0.935874577227j)*x[2]
            ref[(2, 0, 0, 0)]+=(-0.834016289187+0.935874577227j)*x_ref[2]
            arg[(2, 0, 0, 1)]+=(-0.834192734829+0.669631006587j)*x[2]
            ref[(2, 0, 0, 1)]+=(-0.834192734829+0.669631006587j)*x_ref[2]
            arg[(2, 0, 1, 0)]+=(-0.951153750177-0.617112534255j)*x[2]
            ref[(2, 0, 1, 0)]+=(-0.951153750177-0.617112534255j)*x_ref[2]
            arg[(2, 0, 1, 1)]+=(0.468396288735-0.228858501731j)*x[2]
            ref[(2, 0, 1, 1)]+=(0.468396288735-0.228858501731j)*x_ref[2]
            arg[(2, 0, 2, 0)]+=(-0.259080721748+0.460412677927j)*x[2]
            ref[(2, 0, 2, 0)]+=(-0.259080721748+0.460412677927j)*x_ref[2]
            arg[(2, 0, 2, 1)]+=(-0.0524326671337+0.0622307139215j)*x[2]
            ref[(2, 0, 2, 1)]+=(-0.0524326671337+0.0622307139215j)*x_ref[2]
            arg[(2, 1, 0, 0)]+=(-0.754914323028+0.887147014362j)*x[2]
            ref[(2, 1, 0, 0)]+=(-0.754914323028+0.887147014362j)*x_ref[2]
            arg[(2, 1, 0, 1)]+=(-0.13425710837+0.453048728793j)*x[2]
            ref[(2, 1, 0, 1)]+=(-0.13425710837+0.453048728793j)*x_ref[2]
            arg[(2, 1, 1, 0)]+=(0.650395471302+0.355360789908j)*x[2]
            ref[(2, 1, 1, 0)]+=(0.650395471302+0.355360789908j)*x_ref[2]
            arg[(2, 1, 1, 1)]+=(0.814603055349+0.0432585217325j)*x[2]
            ref[(2, 1, 1, 1)]+=(0.814603055349+0.0432585217325j)*x_ref[2]
            arg[(2, 1, 2, 0)]+=(-0.391012771009-0.388937334819j)*x[2]
            ref[(2, 1, 2, 0)]+=(-0.391012771009-0.388937334819j)*x_ref[2]
            arg[(2, 1, 2, 1)]+=(0.919526666734-0.435358382297j)*x[2]
            ref[(2, 1, 2, 1)]+=(0.919526666734-0.435358382297j)*x_ref[2]
            arg[(3, 0, 0, 0)]+=(-0.147403210503-0.684387005009j)*x[2]
            ref[(3, 0, 0, 0)]+=(-0.147403210503-0.684387005009j)*x_ref[2]
            arg[(3, 0, 0, 1)]+=(-0.969571112908-0.439491652075j)*x[2]
            ref[(3, 0, 0, 1)]+=(-0.969571112908-0.439491652075j)*x_ref[2]
            arg[(3, 0, 1, 0)]+=(-0.368194862706+0.862572035557j)*x[2]
            ref[(3, 0, 1, 0)]+=(-0.368194862706+0.862572035557j)*x_ref[2]
            arg[(3, 0, 1, 1)]+=(-0.529673295417-0.153221145546j)*x[2]
            ref[(3, 0, 1, 1)]+=(-0.529673295417-0.153221145546j)*x_ref[2]
            arg[(3, 0, 2, 0)]+=(-0.819194509095+0.799206289059j)*x[2]
            ref[(3, 0, 2, 0)]+=(-0.819194509095+0.799206289059j)*x_ref[2]
            arg[(3, 0, 2, 1)]+=(-0.0719582654344+0.37211771946j)*x[2]
            ref[(3, 0, 2, 1)]+=(-0.0719582654344+0.37211771946j)*x_ref[2]
            arg[(3, 1, 0, 0)]+=(0.0301825906886-0.511273782012j)*x[2]
            ref[(3, 1, 0, 0)]+=(0.0301825906886-0.511273782012j)*x_ref[2]
            arg[(3, 1, 0, 1)]+=(-0.81627105051-0.911452191365j)*x[2]
            ref[(3, 1, 0, 1)]+=(-0.81627105051-0.911452191365j)*x_ref[2]
            arg[(3, 1, 1, 0)]+=(-0.92178447552-0.219150799166j)*x[2]
            ref[(3, 1, 1, 0)]+=(-0.92178447552-0.219150799166j)*x_ref[2]
            arg[(3, 1, 1, 1)]+=(-0.998099582242-0.760046301779j)*x[2]
            ref[(3, 1, 1, 1)]+=(-0.998099582242-0.760046301779j)*x_ref[2]
            arg[(3, 1, 2, 0)]+=(-0.23137510604+0.516613295652j)*x[2]
            ref[(3, 1, 2, 0)]+=(-0.23137510604+0.516613295652j)*x_ref[2]
            arg[(3, 1, 2, 1)]+=(-0.594071416649-0.65306573985j)*x[2]
            ref[(3, 1, 2, 1)]+=(-0.594071416649-0.65306573985j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_Function_rank0(self):
        """
        tests interpolation of rank 0 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports interpolation from Function to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.472089537524+0.292931355344j)*x[0]**o + ((-0.904025322418-0.03457164945j))*x[0] + ((0.362872316398-0.29385678346j))*x[1]**o + ((-0.695675133554-0.934190272636j))*x[1]
        ref=(-0.472089537524+0.292931355344j)*x_ref[0]**o + ((-0.904025322418-0.03457164945j))*x_ref[0] + ((0.362872316398-0.29385678346j))*x_ref[1]**o + ((-0.695675133554-0.934190272636j))*x_ref[1]
        if dim==3:
            arg+=((0.582500893114+0.840367664457j))*x[2]**o + ((0.0417675695754-0.254876208537j))*x[2]
            ref+=((0.582500893114+0.840367664457j))*x_ref[2]**o + ((0.0417675695754-0.254876208537j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_Function_rank1(self):
        """
        tests interpolation of rank 1 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports interpolation from Function to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=(-0.896830355839+0.564002647023j)*x[0]**o + ((-0.842590934976-0.0555537119182j))*x[0] + ((-0.657587764228+0.326573630087j))*x[1]**o + ((-0.470908886329+0.465596706428j))*x[1]
        ref[(0,)]=(-0.896830355839+0.564002647023j)*x_ref[0]**o + ((-0.842590934976-0.0555537119182j))*x_ref[0] + ((-0.657587764228+0.326573630087j))*x_ref[1]**o + ((-0.470908886329+0.465596706428j))*x_ref[1]
        arg[(1,)]=(-0.22491021224+0.100376772045j)*x[0]**o + ((-0.434398811362-0.621898619665j))*x[0] + ((0.996230316444-0.479605351564j))*x[1]**o + ((0.9377274879-0.778385327552j))*x[1]
        ref[(1,)]=(-0.22491021224+0.100376772045j)*x_ref[0]**o + ((-0.434398811362-0.621898619665j))*x_ref[0] + ((0.996230316444-0.479605351564j))*x_ref[1]**o + ((0.9377274879-0.778385327552j))*x_ref[1]
        arg[(2,)]=(-0.268798954983+0.587481507534j)*x[0]**o + ((0.598273417428+0.59543182134j))*x[0] + ((-0.891753842523+0.7069739431j))*x[1]**o + ((0.141910587477+0.761576420638j))*x[1]
        ref[(2,)]=(-0.268798954983+0.587481507534j)*x_ref[0]**o + ((0.598273417428+0.59543182134j))*x_ref[0] + ((-0.891753842523+0.7069739431j))*x_ref[1]**o + ((0.141910587477+0.761576420638j))*x_ref[1]
        arg[(3,)]=(0.746517039323+0.760741509966j)*x[0]**o + ((0.297908948889-0.668636035844j))*x[0] + ((0.843097484814-0.71718250873j))*x[1]**o + ((-0.149763159457+0.944726506867j))*x[1]
        ref[(3,)]=(0.746517039323+0.760741509966j)*x_ref[0]**o + ((0.297908948889-0.668636035844j))*x_ref[0] + ((0.843097484814-0.71718250873j))*x_ref[1]**o + ((-0.149763159457+0.944726506867j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.673710986481-0.0378910898241j)*x[2]**o + ((-0.480640903085-0.0979187484268j))*x[2]
            ref[(0,)]+=(0.673710986481-0.0378910898241j)*x_ref[2]**o + ((-0.480640903085-0.0979187484268j))*x_ref[2]
            arg[(1,)]+=(-0.740303569015-0.347774023835j)*x[2]**o + ((-0.897570083549+0.127925605023j))*x[2]
            ref[(1,)]+=(-0.740303569015-0.347774023835j)*x_ref[2]**o + ((-0.897570083549+0.127925605023j))*x_ref[2]
            arg[(2,)]+=(0.250163347777-0.914918872349j)*x[2]**o + ((0.626927498737+0.350088638373j))*x[2]
            ref[(2,)]+=(0.250163347777-0.914918872349j)*x_ref[2]**o + ((0.626927498737+0.350088638373j))*x_ref[2]
            arg[(3,)]+=(0.352557553189-0.739619715748j)*x[2]**o + ((0.192353808365-0.989291080622j))*x[2]
            ref[(3,)]+=(0.352557553189-0.739619715748j)*x_ref[2]**o + ((0.192353808365-0.989291080622j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_Function_rank2(self):
        """
        tests interpolation of rank 2 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports interpolation from Function to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref = Data(0,(2, 2),w_ref)
        arg[(0, 0)]=(0.25676677318+0.035359888882j)*x[0]**o + ((-0.276060935631-0.624334326852j))*x[0] + ((0.921634848601-0.748371620623j))*x[1]**o + ((0.395521521613+0.066575294628j))*x[1]
        ref[(0, 0)]=(0.25676677318+0.035359888882j)*x_ref[0]**o + ((-0.276060935631-0.624334326852j))*x_ref[0] + ((0.921634848601-0.748371620623j))*x_ref[1]**o + ((0.395521521613+0.066575294628j))*x_ref[1]
        arg[(0, 1)]=(0.296108857086+0.362409536217j)*x[0]**o + ((-0.731420091134-0.056581167705j))*x[0] + ((-0.147080436495+0.586622851619j))*x[1]**o + ((0.704167507455+0.570662574181j))*x[1]
        ref[(0, 1)]=(0.296108857086+0.362409536217j)*x_ref[0]**o + ((-0.731420091134-0.056581167705j))*x_ref[0] + ((-0.147080436495+0.586622851619j))*x_ref[1]**o + ((0.704167507455+0.570662574181j))*x_ref[1]
        arg[(1, 0)]=(0.00489203221104+0.989905265955j)*x[0]**o + ((-0.528316434304-0.129769244997j))*x[0] + ((-0.93928452216-0.441637765956j))*x[1]**o + ((0.735177517205-0.583852570633j))*x[1]
        ref[(1, 0)]=(0.00489203221104+0.989905265955j)*x_ref[0]**o + ((-0.528316434304-0.129769244997j))*x_ref[0] + ((-0.93928452216-0.441637765956j))*x_ref[1]**o + ((0.735177517205-0.583852570633j))*x_ref[1]
        arg[(1, 1)]=(0.195185036932-0.0751540215507j)*x[0]**o + ((0.0787061375057-0.520426282003j))*x[0] + ((-0.120054715555-0.177431217137j))*x[1]**o + ((0.273010831644-0.581930822429j))*x[1]
        ref[(1, 1)]=(0.195185036932-0.0751540215507j)*x_ref[0]**o + ((0.0787061375057-0.520426282003j))*x_ref[0] + ((-0.120054715555-0.177431217137j))*x_ref[1]**o + ((0.273010831644-0.581930822429j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.0285991114692+0.031596714126j)*x[2]**o + ((-0.0886039807723-0.242871227684j))*x[2]
            ref[(0, 0)]+=(0.0285991114692+0.031596714126j)*x_ref[2]**o + ((-0.0886039807723-0.242871227684j))*x_ref[2]
            arg[(0, 1)]+=(-0.993728267283+0.880951257516j)*x[2]**o + ((0.220654487345-0.0942601002435j))*x[2]
            ref[(0, 1)]+=(-0.993728267283+0.880951257516j)*x_ref[2]**o + ((0.220654487345-0.0942601002435j))*x_ref[2]
            arg[(1, 0)]+=(-0.576049591181+0.0271496235762j)*x[2]**o + ((0.823306185288-0.251475599308j))*x[2]
            ref[(1, 0)]+=(-0.576049591181+0.0271496235762j)*x_ref[2]**o + ((0.823306185288-0.251475599308j))*x_ref[2]
            arg[(1, 1)]+=(0.688435354234-0.853338898012j)*x[2]**o + ((0.0430724766966+0.597527593355j))*x[2]
            ref[(1, 1)]+=(0.688435354234-0.853338898012j)*x_ref[2]**o + ((0.0430724766966+0.597527593355j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_Function_rank3(self):
        """
        tests interpolation of rank 3 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports interpolation from Function to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 3),w)
        ref = Data(0,(4, 2, 3),w_ref)
        arg[(0, 0, 0)]=(-0.162997383394+0.0993245569141j)*x[0]**o + ((0.268515098926-0.976572562712j))*x[0] + ((-0.517849801008+0.7425411274j))*x[1]**o + ((-0.258121149579-0.208076169145j))*x[1]
        ref[(0, 0, 0)]=(-0.162997383394+0.0993245569141j)*x_ref[0]**o + ((0.268515098926-0.976572562712j))*x_ref[0] + ((-0.517849801008+0.7425411274j))*x_ref[1]**o + ((-0.258121149579-0.208076169145j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.374147900186+0.983711515901j)*x[0]**o + ((-0.313680306032-0.43293613732j))*x[0] + ((-0.382688776834-0.962072417689j))*x[1]**o + ((-0.709214142697-0.182315750117j))*x[1]
        ref[(0, 0, 1)]=(-0.374147900186+0.983711515901j)*x_ref[0]**o + ((-0.313680306032-0.43293613732j))*x_ref[0] + ((-0.382688776834-0.962072417689j))*x_ref[1]**o + ((-0.709214142697-0.182315750117j))*x_ref[1]
        arg[(0, 0, 2)]=(0.952146468539-0.62140927921j)*x[0]**o + ((0.691600333013-0.21031162281j))*x[0] + ((0.589443334046-0.265049642237j))*x[1]**o + ((-0.19854569552-0.0497521071673j))*x[1]
        ref[(0, 0, 2)]=(0.952146468539-0.62140927921j)*x_ref[0]**o + ((0.691600333013-0.21031162281j))*x_ref[0] + ((0.589443334046-0.265049642237j))*x_ref[1]**o + ((-0.19854569552-0.0497521071673j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.61402048691+0.661990595283j)*x[0]**o + ((0.604184211118-0.521673192364j))*x[0] + ((0.782983023738-0.0274138416037j))*x[1]**o + ((0.941805804952-0.524563071071j))*x[1]
        ref[(0, 1, 0)]=(-0.61402048691+0.661990595283j)*x_ref[0]**o + ((0.604184211118-0.521673192364j))*x_ref[0] + ((0.782983023738-0.0274138416037j))*x_ref[1]**o + ((0.941805804952-0.524563071071j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.685848766332-0.821964033264j)*x[0]**o + ((0.1411957359+0.513972101516j))*x[0] + ((-0.764769637632-0.701107935657j))*x[1]**o + ((-0.449609664724+0.79238311645j))*x[1]
        ref[(0, 1, 1)]=(-0.685848766332-0.821964033264j)*x_ref[0]**o + ((0.1411957359+0.513972101516j))*x_ref[0] + ((-0.764769637632-0.701107935657j))*x_ref[1]**o + ((-0.449609664724+0.79238311645j))*x_ref[1]
        arg[(0, 1, 2)]=(0.790972510071-0.865833171714j)*x[0]**o + ((0.376087575796-0.791127152857j))*x[0] + ((0.2990774312-0.499929806646j))*x[1]**o + ((0.745023898599+0.868399076946j))*x[1]
        ref[(0, 1, 2)]=(0.790972510071-0.865833171714j)*x_ref[0]**o + ((0.376087575796-0.791127152857j))*x_ref[0] + ((0.2990774312-0.499929806646j))*x_ref[1]**o + ((0.745023898599+0.868399076946j))*x_ref[1]
        arg[(1, 0, 0)]=(0.848498747415+0.329672873351j)*x[0]**o + ((-0.00418837783003+0.333494381074j))*x[0] + ((-0.703305128841-0.738867942143j))*x[1]**o + ((-0.932836324087-0.878257614744j))*x[1]
        ref[(1, 0, 0)]=(0.848498747415+0.329672873351j)*x_ref[0]**o + ((-0.00418837783003+0.333494381074j))*x_ref[0] + ((-0.703305128841-0.738867942143j))*x_ref[1]**o + ((-0.932836324087-0.878257614744j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.813598481069+0.680790747542j)*x[0]**o + ((-0.875899905224+0.572841879962j))*x[0] + ((-0.943709225838-0.146039982359j))*x[1]**o + ((-0.455910919685+0.108720872672j))*x[1]
        ref[(1, 0, 1)]=(-0.813598481069+0.680790747542j)*x_ref[0]**o + ((-0.875899905224+0.572841879962j))*x_ref[0] + ((-0.943709225838-0.146039982359j))*x_ref[1]**o + ((-0.455910919685+0.108720872672j))*x_ref[1]
        arg[(1, 0, 2)]=(0.748848032496+0.673910974757j)*x[0]**o + ((-0.486893179083-0.0512225042936j))*x[0] + ((-0.168814914296+0.530756528611j))*x[1]**o + ((-0.0508389532113-0.901165392049j))*x[1]
        ref[(1, 0, 2)]=(0.748848032496+0.673910974757j)*x_ref[0]**o + ((-0.486893179083-0.0512225042936j))*x_ref[0] + ((-0.168814914296+0.530756528611j))*x_ref[1]**o + ((-0.0508389532113-0.901165392049j))*x_ref[1]
        arg[(1, 1, 0)]=(0.910207011353-0.0314743188652j)*x[0]**o + ((-0.107665601952+0.847549599405j))*x[0] + ((-0.268044170762-0.274362602391j))*x[1]**o + ((-0.696622851897-0.91765918462j))*x[1]
        ref[(1, 1, 0)]=(0.910207011353-0.0314743188652j)*x_ref[0]**o + ((-0.107665601952+0.847549599405j))*x_ref[0] + ((-0.268044170762-0.274362602391j))*x_ref[1]**o + ((-0.696622851897-0.91765918462j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.293622749328+0.827617472513j)*x[0]**o + ((-0.0754794115619+0.33801117384j))*x[0] + ((-0.688852939437-0.88250540131j))*x[1]**o + ((0.881235468525+0.258218889194j))*x[1]
        ref[(1, 1, 1)]=(-0.293622749328+0.827617472513j)*x_ref[0]**o + ((-0.0754794115619+0.33801117384j))*x_ref[0] + ((-0.688852939437-0.88250540131j))*x_ref[1]**o + ((0.881235468525+0.258218889194j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.91607817384+0.192237536375j)*x[0]**o + ((0.427853517709-0.915817219521j))*x[0] + ((-0.0411388625227-0.684988799846j))*x[1]**o + ((-0.956586253245+0.187624495245j))*x[1]
        ref[(1, 1, 2)]=(-0.91607817384+0.192237536375j)*x_ref[0]**o + ((0.427853517709-0.915817219521j))*x_ref[0] + ((-0.0411388625227-0.684988799846j))*x_ref[1]**o + ((-0.956586253245+0.187624495245j))*x_ref[1]
        arg[(2, 0, 0)]=(-0.646366268918+0.592611672754j)*x[0]**o + ((0.843416479954-0.396607236429j))*x[0] + ((-0.989564260952+0.419677893597j))*x[1]**o + ((-0.433072807208-0.637919607697j))*x[1]
        ref[(2, 0, 0)]=(-0.646366268918+0.592611672754j)*x_ref[0]**o + ((0.843416479954-0.396607236429j))*x_ref[0] + ((-0.989564260952+0.419677893597j))*x_ref[1]**o + ((-0.433072807208-0.637919607697j))*x_ref[1]
        arg[(2, 0, 1)]=(0.152478003857+0.727728892841j)*x[0]**o + ((0.078366141188-0.994132421823j))*x[0] + ((-0.67289459082-0.911010012864j))*x[1]**o + ((0.13449533171-0.120123950382j))*x[1]
        ref[(2, 0, 1)]=(0.152478003857+0.727728892841j)*x_ref[0]**o + ((0.078366141188-0.994132421823j))*x_ref[0] + ((-0.67289459082-0.911010012864j))*x_ref[1]**o + ((0.13449533171-0.120123950382j))*x_ref[1]
        arg[(2, 0, 2)]=(0.208969201256-0.692499676187j)*x[0]**o + ((-0.679431575754-0.796299017955j))*x[0] + ((0.2304237933+0.0972866623544j))*x[1]**o + ((0.73383274041-0.0201938957334j))*x[1]
        ref[(2, 0, 2)]=(0.208969201256-0.692499676187j)*x_ref[0]**o + ((-0.679431575754-0.796299017955j))*x_ref[0] + ((0.2304237933+0.0972866623544j))*x_ref[1]**o + ((0.73383274041-0.0201938957334j))*x_ref[1]
        arg[(2, 1, 0)]=(0.274563782771-0.69417117282j)*x[0]**o + ((0.638534147242-0.680109969638j))*x[0] + ((-0.333059619717+0.687756738994j))*x[1]**o + ((-0.724218713771+0.557644671366j))*x[1]
        ref[(2, 1, 0)]=(0.274563782771-0.69417117282j)*x_ref[0]**o + ((0.638534147242-0.680109969638j))*x_ref[0] + ((-0.333059619717+0.687756738994j))*x_ref[1]**o + ((-0.724218713771+0.557644671366j))*x_ref[1]
        arg[(2, 1, 1)]=(0.810482811446-0.221714568357j)*x[0]**o + ((-0.0908602823615-0.1182838411j))*x[0] + ((0.358868676153-0.533114332467j))*x[1]**o + ((0.751057206451+0.616956231562j))*x[1]
        ref[(2, 1, 1)]=(0.810482811446-0.221714568357j)*x_ref[0]**o + ((-0.0908602823615-0.1182838411j))*x_ref[0] + ((0.358868676153-0.533114332467j))*x_ref[1]**o + ((0.751057206451+0.616956231562j))*x_ref[1]
        arg[(2, 1, 2)]=(-0.955866701435-0.493674615981j)*x[0]**o + ((0.708987305614+0.789123463659j))*x[0] + ((0.973062215002+0.78148131142j))*x[1]**o + ((-0.609438840713-0.437501317435j))*x[1]
        ref[(2, 1, 2)]=(-0.955866701435-0.493674615981j)*x_ref[0]**o + ((0.708987305614+0.789123463659j))*x_ref[0] + ((0.973062215002+0.78148131142j))*x_ref[1]**o + ((-0.609438840713-0.437501317435j))*x_ref[1]
        arg[(3, 0, 0)]=(-0.601988853485-0.272024489896j)*x[0]**o + ((-0.436993209938-0.804708008952j))*x[0] + ((-0.713463155879-0.904950883229j))*x[1]**o + ((0.0818924608476-0.238357904917j))*x[1]
        ref[(3, 0, 0)]=(-0.601988853485-0.272024489896j)*x_ref[0]**o + ((-0.436993209938-0.804708008952j))*x_ref[0] + ((-0.713463155879-0.904950883229j))*x_ref[1]**o + ((0.0818924608476-0.238357904917j))*x_ref[1]
        arg[(3, 0, 1)]=(0.0638121156946+0.985367359491j)*x[0]**o + ((-0.237540227648-0.945953938747j))*x[0] + ((0.0188071527727+0.114786147002j))*x[1]**o + ((-0.657052625026-0.975770573546j))*x[1]
        ref[(3, 0, 1)]=(0.0638121156946+0.985367359491j)*x_ref[0]**o + ((-0.237540227648-0.945953938747j))*x_ref[0] + ((0.0188071527727+0.114786147002j))*x_ref[1]**o + ((-0.657052625026-0.975770573546j))*x_ref[1]
        arg[(3, 0, 2)]=(0.274322393782-0.57303001624j)*x[0]**o + ((-0.542790224866+0.532090757322j))*x[0] + ((-0.0804823058632-0.0960290659851j))*x[1]**o + ((-0.654790422321-0.135634649891j))*x[1]
        ref[(3, 0, 2)]=(0.274322393782-0.57303001624j)*x_ref[0]**o + ((-0.542790224866+0.532090757322j))*x_ref[0] + ((-0.0804823058632-0.0960290659851j))*x_ref[1]**o + ((-0.654790422321-0.135634649891j))*x_ref[1]
        arg[(3, 1, 0)]=(-0.564644459429-0.651580633065j)*x[0]**o + ((-0.693471989089+0.867352666387j))*x[0] + ((0.587672202288+0.884861405861j))*x[1]**o + ((0.128451647085+0.714713681103j))*x[1]
        ref[(3, 1, 0)]=(-0.564644459429-0.651580633065j)*x_ref[0]**o + ((-0.693471989089+0.867352666387j))*x_ref[0] + ((0.587672202288+0.884861405861j))*x_ref[1]**o + ((0.128451647085+0.714713681103j))*x_ref[1]
        arg[(3, 1, 1)]=(-0.765808221574-0.6765343734j)*x[0]**o + ((-0.535542382395+0.202669958368j))*x[0] + ((-0.334543565843+0.431999551531j))*x[1]**o + ((0.37934849797-0.767563035893j))*x[1]
        ref[(3, 1, 1)]=(-0.765808221574-0.6765343734j)*x_ref[0]**o + ((-0.535542382395+0.202669958368j))*x_ref[0] + ((-0.334543565843+0.431999551531j))*x_ref[1]**o + ((0.37934849797-0.767563035893j))*x_ref[1]
        arg[(3, 1, 2)]=(0.694116977841-0.204557055584j)*x[0]**o + ((0.653370369678+0.297614926334j))*x[0] + ((0.310357450886-0.335354743358j))*x[1]**o + ((-0.861201842455+0.624425576717j))*x[1]
        ref[(3, 1, 2)]=(0.694116977841-0.204557055584j)*x_ref[0]**o + ((0.653370369678+0.297614926334j))*x_ref[0] + ((0.310357450886-0.335354743358j))*x_ref[1]**o + ((-0.861201842455+0.624425576717j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.890031816344-0.482167995098j)*x[2]**o + ((-0.141732860804-0.889426823313j))*x[2]
            ref[(0, 0, 0)]+=(0.890031816344-0.482167995098j)*x_ref[2]**o + ((-0.141732860804-0.889426823313j))*x_ref[2]
            arg[(0, 0, 1)]+=(-0.784222772881-0.767257494518j)*x[2]**o + ((0.962106580861-0.267371828003j))*x[2]
            ref[(0, 0, 1)]+=(-0.784222772881-0.767257494518j)*x_ref[2]**o + ((0.962106580861-0.267371828003j))*x_ref[2]
            arg[(0, 0, 2)]+=(-0.288785285616-0.726038195602j)*x[2]**o + ((-0.204828463332+0.536986101695j))*x[2]
            ref[(0, 0, 2)]+=(-0.288785285616-0.726038195602j)*x_ref[2]**o + ((-0.204828463332+0.536986101695j))*x_ref[2]
            arg[(0, 1, 0)]+=(0.0738236977175-0.595465692231j)*x[2]**o + ((0.264513516717-0.853862751525j))*x[2]
            ref[(0, 1, 0)]+=(0.0738236977175-0.595465692231j)*x_ref[2]**o + ((0.264513516717-0.853862751525j))*x_ref[2]
            arg[(0, 1, 1)]+=(-0.446026429722+0.730634940385j)*x[2]**o + ((-0.698595670585+0.477818290585j))*x[2]
            ref[(0, 1, 1)]+=(-0.446026429722+0.730634940385j)*x_ref[2]**o + ((-0.698595670585+0.477818290585j))*x_ref[2]
            arg[(0, 1, 2)]+=(0.584663437383-0.477597543842j)*x[2]**o + ((-0.981194923069+0.570026811397j))*x[2]
            ref[(0, 1, 2)]+=(0.584663437383-0.477597543842j)*x_ref[2]**o + ((-0.981194923069+0.570026811397j))*x_ref[2]
            arg[(1, 0, 0)]+=(0.136640466319+0.139324413395j)*x[2]**o + ((0.802607350954-0.273498316487j))*x[2]
            ref[(1, 0, 0)]+=(0.136640466319+0.139324413395j)*x_ref[2]**o + ((0.802607350954-0.273498316487j))*x_ref[2]
            arg[(1, 0, 1)]+=(-0.723777440902+0.626356241762j)*x[2]**o + ((0.0588152546395-0.929731400425j))*x[2]
            ref[(1, 0, 1)]+=(-0.723777440902+0.626356241762j)*x_ref[2]**o + ((0.0588152546395-0.929731400425j))*x_ref[2]
            arg[(1, 0, 2)]+=(-0.934240682904-0.980025014198j)*x[2]**o + ((-0.705553686109+0.7744658202j))*x[2]
            ref[(1, 0, 2)]+=(-0.934240682904-0.980025014198j)*x_ref[2]**o + ((-0.705553686109+0.7744658202j))*x_ref[2]
            arg[(1, 1, 0)]+=(-0.0743007958336-0.891918988303j)*x[2]**o + ((-0.150422306968-0.783695572292j))*x[2]
            ref[(1, 1, 0)]+=(-0.0743007958336-0.891918988303j)*x_ref[2]**o + ((-0.150422306968-0.783695572292j))*x_ref[2]
            arg[(1, 1, 1)]+=(-0.890992725787-0.116001897695j)*x[2]**o + ((0.243629991238-0.428160724769j))*x[2]
            ref[(1, 1, 1)]+=(-0.890992725787-0.116001897695j)*x_ref[2]**o + ((0.243629991238-0.428160724769j))*x_ref[2]
            arg[(1, 1, 2)]+=(0.914762414172+0.147876172866j)*x[2]**o + ((-0.987564513217-0.484011554944j))*x[2]
            ref[(1, 1, 2)]+=(0.914762414172+0.147876172866j)*x_ref[2]**o + ((-0.987564513217-0.484011554944j))*x_ref[2]
            arg[(2, 0, 0)]+=(0.487013296082-0.908538126886j)*x[2]**o + ((0.946468098931+0.664602132181j))*x[2]
            ref[(2, 0, 0)]+=(0.487013296082-0.908538126886j)*x_ref[2]**o + ((0.946468098931+0.664602132181j))*x_ref[2]
            arg[(2, 0, 1)]+=(-0.82086017344+0.192655455227j)*x[2]**o + ((0.234434476027-0.0483495624563j))*x[2]
            ref[(2, 0, 1)]+=(-0.82086017344+0.192655455227j)*x_ref[2]**o + ((0.234434476027-0.0483495624563j))*x_ref[2]
            arg[(2, 0, 2)]+=(0.653444596159-0.518508173434j)*x[2]**o + ((-0.980721938897+0.0329789671362j))*x[2]
            ref[(2, 0, 2)]+=(0.653444596159-0.518508173434j)*x_ref[2]**o + ((-0.980721938897+0.0329789671362j))*x_ref[2]
            arg[(2, 1, 0)]+=(-0.466948232379+0.875635742007j)*x[2]**o + ((-0.67467479833-0.668580471969j))*x[2]
            ref[(2, 1, 0)]+=(-0.466948232379+0.875635742007j)*x_ref[2]**o + ((-0.67467479833-0.668580471969j))*x_ref[2]
            arg[(2, 1, 1)]+=(0.257474281959-0.573133600379j)*x[2]**o + ((0.115794115176+0.0846082777003j))*x[2]
            ref[(2, 1, 1)]+=(0.257474281959-0.573133600379j)*x_ref[2]**o + ((0.115794115176+0.0846082777003j))*x_ref[2]
            arg[(2, 1, 2)]+=(-0.599863263253+0.714050043553j)*x[2]**o + ((-0.120204722675-0.265609756137j))*x[2]
            ref[(2, 1, 2)]+=(-0.599863263253+0.714050043553j)*x_ref[2]**o + ((-0.120204722675-0.265609756137j))*x_ref[2]
            arg[(3, 0, 0)]+=(0.436052943656-0.04861147262j)*x[2]**o + ((0.970918633399+0.502476538454j))*x[2]
            ref[(3, 0, 0)]+=(0.436052943656-0.04861147262j)*x_ref[2]**o + ((0.970918633399+0.502476538454j))*x_ref[2]
            arg[(3, 0, 1)]+=(-0.242032678499+0.189318029754j)*x[2]**o + ((0.834562256509+0.0049898181356j))*x[2]
            ref[(3, 0, 1)]+=(-0.242032678499+0.189318029754j)*x_ref[2]**o + ((0.834562256509+0.0049898181356j))*x_ref[2]
            arg[(3, 0, 2)]+=(0.469711452717+0.442032960572j)*x[2]**o + ((0.415674609279+0.249723603128j))*x[2]
            ref[(3, 0, 2)]+=(0.469711452717+0.442032960572j)*x_ref[2]**o + ((0.415674609279+0.249723603128j))*x_ref[2]
            arg[(3, 1, 0)]+=(0.497817545199-0.439053854403j)*x[2]**o + ((-0.431831576327+0.352837425929j))*x[2]
            ref[(3, 1, 0)]+=(0.497817545199-0.439053854403j)*x_ref[2]**o + ((-0.431831576327+0.352837425929j))*x_ref[2]
            arg[(3, 1, 1)]+=(0.089433911351+0.202632664039j)*x[2]**o + ((-0.276849822362-0.152858013744j))*x[2]
            ref[(3, 1, 1)]+=(0.089433911351+0.202632664039j)*x_ref[2]**o + ((-0.276849822362-0.152858013744j))*x_ref[2]
            arg[(3, 1, 2)]+=(0.840389985065+0.253397710079j)*x[2]**o + ((-0.69142579962+0.135915640806j))*x[2]
            ref[(3, 1, 2)]+=(0.840389985065+0.253397710079j)*x_ref[2]**o + ((-0.69142579962+0.135915640806j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunction_fromData_Function_rank4(self):
        """
        tests interpolation of rank 4 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports interpolation from Function to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 3, 3),w)
        ref = Data(0,(4, 3, 3, 3),w_ref)
        arg[(0, 0, 0, 0)]=(-0.477409028512+0.161429757217j)*x[0]**o + ((-0.500708098344+0.8289277756j))*x[0] + ((-0.932234608826-0.561028582779j))*x[1]**o + ((0.00831685744855+0.953912696383j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.477409028512+0.161429757217j)*x_ref[0]**o + ((-0.500708098344+0.8289277756j))*x_ref[0] + ((-0.932234608826-0.561028582779j))*x_ref[1]**o + ((0.00831685744855+0.953912696383j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(0.705453900501+0.208190569869j)*x[0]**o + ((0.416884132708-0.883805507744j))*x[0] + ((0.14551091452+0.446779465092j))*x[1]**o + ((-0.424799896945+0.541804955265j))*x[1]
        ref[(0, 0, 0, 1)]=(0.705453900501+0.208190569869j)*x_ref[0]**o + ((0.416884132708-0.883805507744j))*x_ref[0] + ((0.14551091452+0.446779465092j))*x_ref[1]**o + ((-0.424799896945+0.541804955265j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.572508265952+0.514564926735j)*x[0]**o + ((0.446071800792-0.243332733656j))*x[0] + ((0.420018272214-0.158758810892j))*x[1]**o + ((0.103228931929+0.603877694073j))*x[1]
        ref[(0, 0, 0, 2)]=(0.572508265952+0.514564926735j)*x_ref[0]**o + ((0.446071800792-0.243332733656j))*x_ref[0] + ((0.420018272214-0.158758810892j))*x_ref[1]**o + ((0.103228931929+0.603877694073j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.397194469873+0.369532156802j)*x[0]**o + ((0.300475563808-0.127300844917j))*x[0] + ((-0.725974373353+0.663229335871j))*x[1]**o + ((0.997276090695-0.592403989356j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.397194469873+0.369532156802j)*x_ref[0]**o + ((0.300475563808-0.127300844917j))*x_ref[0] + ((-0.725974373353+0.663229335871j))*x_ref[1]**o + ((0.997276090695-0.592403989356j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.055597854028+0.392616611016j)*x[0]**o + ((0.107382334393+0.714870059539j))*x[0] + ((0.0499670219276-0.385783249414j))*x[1]**o + ((0.75133070042+0.783963292577j))*x[1]
        ref[(0, 0, 1, 1)]=(0.055597854028+0.392616611016j)*x_ref[0]**o + ((0.107382334393+0.714870059539j))*x_ref[0] + ((0.0499670219276-0.385783249414j))*x_ref[1]**o + ((0.75133070042+0.783963292577j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(0.429278319917-0.453255599169j)*x[0]**o + ((-0.468869878977-0.139830943696j))*x[0] + ((-0.691282525305-0.294763280858j))*x[1]**o + ((-0.70244122457+0.221979467023j))*x[1]
        ref[(0, 0, 1, 2)]=(0.429278319917-0.453255599169j)*x_ref[0]**o + ((-0.468869878977-0.139830943696j))*x_ref[0] + ((-0.691282525305-0.294763280858j))*x_ref[1]**o + ((-0.70244122457+0.221979467023j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(-0.453033393005+0.323459617155j)*x[0]**o + ((0.745896721398-0.415203015668j))*x[0] + ((0.908493847812+0.240689104108j))*x[1]**o + ((0.183582900085+0.829242456037j))*x[1]
        ref[(0, 0, 2, 0)]=(-0.453033393005+0.323459617155j)*x_ref[0]**o + ((0.745896721398-0.415203015668j))*x_ref[0] + ((0.908493847812+0.240689104108j))*x_ref[1]**o + ((0.183582900085+0.829242456037j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(0.838106748423-0.188119092551j)*x[0]**o + ((-0.240038762513+0.697104869727j))*x[0] + ((-0.864789940816-0.18231415347j))*x[1]**o + ((-0.275652236506-0.75000317555j))*x[1]
        ref[(0, 0, 2, 1)]=(0.838106748423-0.188119092551j)*x_ref[0]**o + ((-0.240038762513+0.697104869727j))*x_ref[0] + ((-0.864789940816-0.18231415347j))*x_ref[1]**o + ((-0.275652236506-0.75000317555j))*x_ref[1]
        arg[(0, 0, 2, 2)]=(0.81835377964+0.672346999143j)*x[0]**o + ((0.161384511864+0.186872033905j))*x[0] + ((-0.470022446128-0.0307301620768j))*x[1]**o + ((0.887089783767+0.857774172777j))*x[1]
        ref[(0, 0, 2, 2)]=(0.81835377964+0.672346999143j)*x_ref[0]**o + ((0.161384511864+0.186872033905j))*x_ref[0] + ((-0.470022446128-0.0307301620768j))*x_ref[1]**o + ((0.887089783767+0.857774172777j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(-0.642505189988-0.359774800198j)*x[0]**o + ((0.983052432909+0.219508437378j))*x[0] + ((-0.936607514743-0.188135878307j))*x[1]**o + ((-0.600824007311-0.265191989524j))*x[1]
        ref[(0, 1, 0, 0)]=(-0.642505189988-0.359774800198j)*x_ref[0]**o + ((0.983052432909+0.219508437378j))*x_ref[0] + ((-0.936607514743-0.188135878307j))*x_ref[1]**o + ((-0.600824007311-0.265191989524j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.990015450885-0.776588182428j)*x[0]**o + ((-0.534457541141+0.601179528733j))*x[0] + ((-0.197017227119-0.683835368872j))*x[1]**o + ((-0.648633600533+0.440111393045j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.990015450885-0.776588182428j)*x_ref[0]**o + ((-0.534457541141+0.601179528733j))*x_ref[0] + ((-0.197017227119-0.683835368872j))*x_ref[1]**o + ((-0.648633600533+0.440111393045j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(-0.0253833350483+0.979649264819j)*x[0]**o + ((0.0490845865689+0.818692534367j))*x[0] + ((-0.697400937856-0.0922981313929j))*x[1]**o + ((-0.618569025842+0.76149817828j))*x[1]
        ref[(0, 1, 0, 2)]=(-0.0253833350483+0.979649264819j)*x_ref[0]**o + ((0.0490845865689+0.818692534367j))*x_ref[0] + ((-0.697400937856-0.0922981313929j))*x_ref[1]**o + ((-0.618569025842+0.76149817828j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.250732370132-0.00536560952489j)*x[0]**o + ((-0.0397659877456-0.79704118366j))*x[0] + ((0.214453808496-0.00238646220594j))*x[1]**o + ((-0.545392759693-0.158332895063j))*x[1]
        ref[(0, 1, 1, 0)]=(0.250732370132-0.00536560952489j)*x_ref[0]**o + ((-0.0397659877456-0.79704118366j))*x_ref[0] + ((0.214453808496-0.00238646220594j))*x_ref[1]**o + ((-0.545392759693-0.158332895063j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.700896085557-0.167077481295j)*x[0]**o + ((-0.721957303751-0.169727325559j))*x[0] + ((-0.609298937896-0.404741741018j))*x[1]**o + ((-0.246563483747-0.802217414483j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.700896085557-0.167077481295j)*x_ref[0]**o + ((-0.721957303751-0.169727325559j))*x_ref[0] + ((-0.609298937896-0.404741741018j))*x_ref[1]**o + ((-0.246563483747-0.802217414483j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(0.638384918363-0.598438273277j)*x[0]**o + ((0.0213765185135+0.616589541373j))*x[0] + ((-0.0572159752229-0.286125786807j))*x[1]**o + ((0.36996978136-0.563121775786j))*x[1]
        ref[(0, 1, 1, 2)]=(0.638384918363-0.598438273277j)*x_ref[0]**o + ((0.0213765185135+0.616589541373j))*x_ref[0] + ((-0.0572159752229-0.286125786807j))*x_ref[1]**o + ((0.36996978136-0.563121775786j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(-0.168323444824-0.033874467092j)*x[0]**o + ((0.855351236665-0.762235120832j))*x[0] + ((0.618776433379+0.357835747789j))*x[1]**o + ((-0.92729622683+0.549081715225j))*x[1]
        ref[(0, 1, 2, 0)]=(-0.168323444824-0.033874467092j)*x_ref[0]**o + ((0.855351236665-0.762235120832j))*x_ref[0] + ((0.618776433379+0.357835747789j))*x_ref[1]**o + ((-0.92729622683+0.549081715225j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(0.861164841049-0.306929519548j)*x[0]**o + ((-0.164123341515+0.514787797026j))*x[0] + ((-0.530431156998-0.54952695844j))*x[1]**o + ((-0.287256582449-0.329809797267j))*x[1]
        ref[(0, 1, 2, 1)]=(0.861164841049-0.306929519548j)*x_ref[0]**o + ((-0.164123341515+0.514787797026j))*x_ref[0] + ((-0.530431156998-0.54952695844j))*x_ref[1]**o + ((-0.287256582449-0.329809797267j))*x_ref[1]
        arg[(0, 1, 2, 2)]=(-0.641857696261-0.353489421406j)*x[0]**o + ((0.760218936018+0.895760152942j))*x[0] + ((0.607597565616-0.0582571816108j))*x[1]**o + ((0.999234607605+0.154277664891j))*x[1]
        ref[(0, 1, 2, 2)]=(-0.641857696261-0.353489421406j)*x_ref[0]**o + ((0.760218936018+0.895760152942j))*x_ref[0] + ((0.607597565616-0.0582571816108j))*x_ref[1]**o + ((0.999234607605+0.154277664891j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.87342816967+0.269252455368j)*x[0]**o + ((0.262977652317-0.0679374676236j))*x[0] + ((0.774855028146+0.583172040759j))*x[1]**o + ((0.356667977044+0.466652727859j))*x[1]
        ref[(0, 2, 0, 0)]=(0.87342816967+0.269252455368j)*x_ref[0]**o + ((0.262977652317-0.0679374676236j))*x_ref[0] + ((0.774855028146+0.583172040759j))*x_ref[1]**o + ((0.356667977044+0.466652727859j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(-0.583903991611+0.81161794499j)*x[0]**o + ((-0.1610085059+0.260663993474j))*x[0] + ((-0.711933904577-0.42282325877j))*x[1]**o + ((-0.102009061726-0.424227804554j))*x[1]
        ref[(0, 2, 0, 1)]=(-0.583903991611+0.81161794499j)*x_ref[0]**o + ((-0.1610085059+0.260663993474j))*x_ref[0] + ((-0.711933904577-0.42282325877j))*x_ref[1]**o + ((-0.102009061726-0.424227804554j))*x_ref[1]
        arg[(0, 2, 0, 2)]=(-0.610129696311+0.871419119437j)*x[0]**o + ((0.378448730698-0.998334592723j))*x[0] + ((0.332967262715+0.692255273852j))*x[1]**o + ((0.348268711044+0.0445349849115j))*x[1]
        ref[(0, 2, 0, 2)]=(-0.610129696311+0.871419119437j)*x_ref[0]**o + ((0.378448730698-0.998334592723j))*x_ref[0] + ((0.332967262715+0.692255273852j))*x_ref[1]**o + ((0.348268711044+0.0445349849115j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(0.781559630397-0.284006562521j)*x[0]**o + ((-0.695045146323+0.123681677003j))*x[0] + ((0.318468976161-0.37841233625j))*x[1]**o + ((0.641124122573+0.136091344307j))*x[1]
        ref[(0, 2, 1, 0)]=(0.781559630397-0.284006562521j)*x_ref[0]**o + ((-0.695045146323+0.123681677003j))*x_ref[0] + ((0.318468976161-0.37841233625j))*x_ref[1]**o + ((0.641124122573+0.136091344307j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(-0.936951688787+0.90360034771j)*x[0]**o + ((-0.943649173375-0.66606369104j))*x[0] + ((0.367793643796-0.366560174828j))*x[1]**o + ((0.209794946947-0.210998254263j))*x[1]
        ref[(0, 2, 1, 1)]=(-0.936951688787+0.90360034771j)*x_ref[0]**o + ((-0.943649173375-0.66606369104j))*x_ref[0] + ((0.367793643796-0.366560174828j))*x_ref[1]**o + ((0.209794946947-0.210998254263j))*x_ref[1]
        arg[(0, 2, 1, 2)]=(-0.527503503844+0.453337074072j)*x[0]**o + ((-0.466460268001+0.0978569567023j))*x[0] + ((-0.558984432295+0.915698764493j))*x[1]**o + ((-0.216035424894+0.529372842836j))*x[1]
        ref[(0, 2, 1, 2)]=(-0.527503503844+0.453337074072j)*x_ref[0]**o + ((-0.466460268001+0.0978569567023j))*x_ref[0] + ((-0.558984432295+0.915698764493j))*x_ref[1]**o + ((-0.216035424894+0.529372842836j))*x_ref[1]
        arg[(0, 2, 2, 0)]=(0.807529271879+0.0284495575221j)*x[0]**o + ((-0.681747162814-0.775301129129j))*x[0] + ((-0.988924199478-0.957723122063j))*x[1]**o + ((-0.931616830393+0.492273319141j))*x[1]
        ref[(0, 2, 2, 0)]=(0.807529271879+0.0284495575221j)*x_ref[0]**o + ((-0.681747162814-0.775301129129j))*x_ref[0] + ((-0.988924199478-0.957723122063j))*x_ref[1]**o + ((-0.931616830393+0.492273319141j))*x_ref[1]
        arg[(0, 2, 2, 1)]=(0.205422949863-0.667367357166j)*x[0]**o + ((0.944186321996+0.116747628871j))*x[0] + ((-0.502470951503+0.0158840889942j))*x[1]**o + ((-0.127244145439-0.307030191734j))*x[1]
        ref[(0, 2, 2, 1)]=(0.205422949863-0.667367357166j)*x_ref[0]**o + ((0.944186321996+0.116747628871j))*x_ref[0] + ((-0.502470951503+0.0158840889942j))*x_ref[1]**o + ((-0.127244145439-0.307030191734j))*x_ref[1]
        arg[(0, 2, 2, 2)]=(0.194990224499+0.18063083046j)*x[0]**o + ((-0.514918146362-0.58020414648j))*x[0] + ((-0.756170482939+0.949760049091j))*x[1]**o + ((0.164787325605+0.103616278887j))*x[1]
        ref[(0, 2, 2, 2)]=(0.194990224499+0.18063083046j)*x_ref[0]**o + ((-0.514918146362-0.58020414648j))*x_ref[0] + ((-0.756170482939+0.949760049091j))*x_ref[1]**o + ((0.164787325605+0.103616278887j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.898476904944+0.715810511234j)*x[0]**o + ((-0.635923568567-0.275698233353j))*x[0] + ((-0.52426451189+0.102053240303j))*x[1]**o + ((0.707865966699-0.739030450015j))*x[1]
        ref[(1, 0, 0, 0)]=(0.898476904944+0.715810511234j)*x_ref[0]**o + ((-0.635923568567-0.275698233353j))*x_ref[0] + ((-0.52426451189+0.102053240303j))*x_ref[1]**o + ((0.707865966699-0.739030450015j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.831245095501-0.733718218924j)*x[0]**o + ((-0.23513252882-0.134081972543j))*x[0] + ((-0.440238108902+0.506144458572j))*x[1]**o + ((-0.81919835715-0.343825081344j))*x[1]
        ref[(1, 0, 0, 1)]=(0.831245095501-0.733718218924j)*x_ref[0]**o + ((-0.23513252882-0.134081972543j))*x_ref[0] + ((-0.440238108902+0.506144458572j))*x_ref[1]**o + ((-0.81919835715-0.343825081344j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(0.842390138947-0.37068595119j)*x[0]**o + ((-0.442453140411+0.315301488813j))*x[0] + ((0.898976018267+0.130191618281j))*x[1]**o + ((-0.720741637821+0.881295764539j))*x[1]
        ref[(1, 0, 0, 2)]=(0.842390138947-0.37068595119j)*x_ref[0]**o + ((-0.442453140411+0.315301488813j))*x_ref[0] + ((0.898976018267+0.130191618281j))*x_ref[1]**o + ((-0.720741637821+0.881295764539j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.236165793749+0.950934286436j)*x[0]**o + ((0.339640196459-0.12746281235j))*x[0] + ((-0.453860694267-0.940392725856j))*x[1]**o + ((-0.851858885396-0.945941882234j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.236165793749+0.950934286436j)*x_ref[0]**o + ((0.339640196459-0.12746281235j))*x_ref[0] + ((-0.453860694267-0.940392725856j))*x_ref[1]**o + ((-0.851858885396-0.945941882234j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.0791747612221-0.895922282907j)*x[0]**o + ((0.926402970381-0.674356234313j))*x[0] + ((-0.969149643169-0.138912239366j))*x[1]**o + ((0.404449610156-0.709687626639j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.0791747612221-0.895922282907j)*x_ref[0]**o + ((0.926402970381-0.674356234313j))*x_ref[0] + ((-0.969149643169-0.138912239366j))*x_ref[1]**o + ((0.404449610156-0.709687626639j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(0.961238789826-0.362837861451j)*x[0]**o + ((-0.370163035732-0.67986542325j))*x[0] + ((0.619510817188+0.741311061352j))*x[1]**o + ((0.245133059781+0.30242378274j))*x[1]
        ref[(1, 0, 1, 2)]=(0.961238789826-0.362837861451j)*x_ref[0]**o + ((-0.370163035732-0.67986542325j))*x_ref[0] + ((0.619510817188+0.741311061352j))*x_ref[1]**o + ((0.245133059781+0.30242378274j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(0.709498986444-0.795764639887j)*x[0]**o + ((-0.234195005471+0.0073956404799j))*x[0] + ((-0.914985912459+0.996408304677j))*x[1]**o + ((0.726017048333+0.53913234935j))*x[1]
        ref[(1, 0, 2, 0)]=(0.709498986444-0.795764639887j)*x_ref[0]**o + ((-0.234195005471+0.0073956404799j))*x_ref[0] + ((-0.914985912459+0.996408304677j))*x_ref[1]**o + ((0.726017048333+0.53913234935j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(-0.478683506095-0.860913627688j)*x[0]**o + ((0.798153185258+0.747082181118j))*x[0] + ((-0.587930534527-0.185672886389j))*x[1]**o + ((-0.38841366029-0.398816975052j))*x[1]
        ref[(1, 0, 2, 1)]=(-0.478683506095-0.860913627688j)*x_ref[0]**o + ((0.798153185258+0.747082181118j))*x_ref[0] + ((-0.587930534527-0.185672886389j))*x_ref[1]**o + ((-0.38841366029-0.398816975052j))*x_ref[1]
        arg[(1, 0, 2, 2)]=(0.746631342335+0.719902170746j)*x[0]**o + ((0.681185783551-0.885861847613j))*x[0] + ((0.0447028728609-0.147119202792j))*x[1]**o + ((-0.724974715238-0.147737342739j))*x[1]
        ref[(1, 0, 2, 2)]=(0.746631342335+0.719902170746j)*x_ref[0]**o + ((0.681185783551-0.885861847613j))*x_ref[0] + ((0.0447028728609-0.147119202792j))*x_ref[1]**o + ((-0.724974715238-0.147737342739j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.172187261241+0.790584525332j)*x[0]**o + ((0.461196261617+0.32341541967j))*x[0] + ((0.248250415555+0.518973181876j))*x[1]**o + ((-0.299079824784-0.0575843368022j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.172187261241+0.790584525332j)*x_ref[0]**o + ((0.461196261617+0.32341541967j))*x_ref[0] + ((0.248250415555+0.518973181876j))*x_ref[1]**o + ((-0.299079824784-0.0575843368022j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.798041138658+0.133619357837j)*x[0]**o + ((-0.105026409315+0.254994019992j))*x[0] + ((-0.502797745146-0.517638073483j))*x[1]**o + ((-0.588381174936+0.466134293012j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.798041138658+0.133619357837j)*x_ref[0]**o + ((-0.105026409315+0.254994019992j))*x_ref[0] + ((-0.502797745146-0.517638073483j))*x_ref[1]**o + ((-0.588381174936+0.466134293012j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(0.72637705708-0.535286448182j)*x[0]**o + ((-0.710062719373+0.207409227941j))*x[0] + ((0.90716228444+0.643171956084j))*x[1]**o + ((-0.257602865436-0.841866304983j))*x[1]
        ref[(1, 1, 0, 2)]=(0.72637705708-0.535286448182j)*x_ref[0]**o + ((-0.710062719373+0.207409227941j))*x_ref[0] + ((0.90716228444+0.643171956084j))*x_ref[1]**o + ((-0.257602865436-0.841866304983j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.550922821715+0.0177966024768j)*x[0]**o + ((-0.595801488735+0.17591712356j))*x[0] + ((-0.263275645676+0.369602272266j))*x[1]**o + ((-0.240417465803-0.69014661237j))*x[1]
        ref[(1, 1, 1, 0)]=(0.550922821715+0.0177966024768j)*x_ref[0]**o + ((-0.595801488735+0.17591712356j))*x_ref[0] + ((-0.263275645676+0.369602272266j))*x_ref[1]**o + ((-0.240417465803-0.69014661237j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.633632854523+0.964300530142j)*x[0]**o + ((0.963632854274+0.492594474153j))*x[0] + ((-0.745718630941+0.0319427326294j))*x[1]**o + ((-0.93918443234+0.635157960269j))*x[1]
        ref[(1, 1, 1, 1)]=(0.633632854523+0.964300530142j)*x_ref[0]**o + ((0.963632854274+0.492594474153j))*x_ref[0] + ((-0.745718630941+0.0319427326294j))*x_ref[1]**o + ((-0.93918443234+0.635157960269j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(0.381804361556+0.831778260322j)*x[0]**o + ((-0.539996817403-0.678552707741j))*x[0] + ((-0.108275172294-0.992170259777j))*x[1]**o + ((0.880579417501+0.138561245853j))*x[1]
        ref[(1, 1, 1, 2)]=(0.381804361556+0.831778260322j)*x_ref[0]**o + ((-0.539996817403-0.678552707741j))*x_ref[0] + ((-0.108275172294-0.992170259777j))*x_ref[1]**o + ((0.880579417501+0.138561245853j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(0.609365499934-0.15212538089j)*x[0]**o + ((0.951596405855-0.086369493036j))*x[0] + ((0.00574270400004-0.477554134561j))*x[1]**o + ((-0.499231411225-0.110811603921j))*x[1]
        ref[(1, 1, 2, 0)]=(0.609365499934-0.15212538089j)*x_ref[0]**o + ((0.951596405855-0.086369493036j))*x_ref[0] + ((0.00574270400004-0.477554134561j))*x_ref[1]**o + ((-0.499231411225-0.110811603921j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(0.720144443767+0.441601996289j)*x[0]**o + ((-0.461166341839-0.165631551592j))*x[0] + ((-0.308006976004+0.360257906652j))*x[1]**o + ((-0.960587923529-0.510960294129j))*x[1]
        ref[(1, 1, 2, 1)]=(0.720144443767+0.441601996289j)*x_ref[0]**o + ((-0.461166341839-0.165631551592j))*x_ref[0] + ((-0.308006976004+0.360257906652j))*x_ref[1]**o + ((-0.960587923529-0.510960294129j))*x_ref[1]
        arg[(1, 1, 2, 2)]=(0.135640188052-0.952987018969j)*x[0]**o + ((0.927543638538+0.677711754746j))*x[0] + ((-0.140853405044-0.717469729225j))*x[1]**o + ((-0.820571013679-0.489291676156j))*x[1]
        ref[(1, 1, 2, 2)]=(0.135640188052-0.952987018969j)*x_ref[0]**o + ((0.927543638538+0.677711754746j))*x_ref[0] + ((-0.140853405044-0.717469729225j))*x_ref[1]**o + ((-0.820571013679-0.489291676156j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(0.684810500571+0.105478761377j)*x[0]**o + ((-0.659094899019+0.698299775421j))*x[0] + ((-0.708971578983+0.444287121541j))*x[1]**o + ((0.909352492878+0.968239167625j))*x[1]
        ref[(1, 2, 0, 0)]=(0.684810500571+0.105478761377j)*x_ref[0]**o + ((-0.659094899019+0.698299775421j))*x_ref[0] + ((-0.708971578983+0.444287121541j))*x_ref[1]**o + ((0.909352492878+0.968239167625j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.506839832408-0.371130825106j)*x[0]**o + ((0.646802292781-0.1672065664j))*x[0] + ((0.592171296921+0.102635589084j))*x[1]**o + ((-0.342632889232-0.871365287612j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.506839832408-0.371130825106j)*x_ref[0]**o + ((0.646802292781-0.1672065664j))*x_ref[0] + ((0.592171296921+0.102635589084j))*x_ref[1]**o + ((-0.342632889232-0.871365287612j))*x_ref[1]
        arg[(1, 2, 0, 2)]=(-0.392506495307-0.313856786184j)*x[0]**o + ((-0.551662501913-0.146160321224j))*x[0] + ((-0.794819726634+0.974146484655j))*x[1]**o + ((0.533220435397+0.372662412716j))*x[1]
        ref[(1, 2, 0, 2)]=(-0.392506495307-0.313856786184j)*x_ref[0]**o + ((-0.551662501913-0.146160321224j))*x_ref[0] + ((-0.794819726634+0.974146484655j))*x_ref[1]**o + ((0.533220435397+0.372662412716j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(-0.269978190445+0.859759193601j)*x[0]**o + ((0.16243269435+0.194980960228j))*x[0] + ((0.886695422699-0.177604535339j))*x[1]**o + ((0.913073860872+0.121813527113j))*x[1]
        ref[(1, 2, 1, 0)]=(-0.269978190445+0.859759193601j)*x_ref[0]**o + ((0.16243269435+0.194980960228j))*x_ref[0] + ((0.886695422699-0.177604535339j))*x_ref[1]**o + ((0.913073860872+0.121813527113j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.145276024054-0.104400584325j)*x[0]**o + ((0.397252376284-0.732120703523j))*x[0] + ((-0.811490797747+0.0363740849427j))*x[1]**o + ((0.613369421527-0.868945810769j))*x[1]
        ref[(1, 2, 1, 1)]=(0.145276024054-0.104400584325j)*x_ref[0]**o + ((0.397252376284-0.732120703523j))*x_ref[0] + ((-0.811490797747+0.0363740849427j))*x_ref[1]**o + ((0.613369421527-0.868945810769j))*x_ref[1]
        arg[(1, 2, 1, 2)]=(-0.0149583280119-0.288463343826j)*x[0]**o + ((-0.409637991566+0.0191039514848j))*x[0] + ((0.124489405528-0.246757030415j))*x[1]**o + ((-0.906775232637+0.0236280883647j))*x[1]
        ref[(1, 2, 1, 2)]=(-0.0149583280119-0.288463343826j)*x_ref[0]**o + ((-0.409637991566+0.0191039514848j))*x_ref[0] + ((0.124489405528-0.246757030415j))*x_ref[1]**o + ((-0.906775232637+0.0236280883647j))*x_ref[1]
        arg[(1, 2, 2, 0)]=(0.474009460155+0.0948810973702j)*x[0]**o + ((-0.397024374418-0.234216143436j))*x[0] + ((0.593703365552-0.823306613424j))*x[1]**o + ((-0.93931529251+0.390173631644j))*x[1]
        ref[(1, 2, 2, 0)]=(0.474009460155+0.0948810973702j)*x_ref[0]**o + ((-0.397024374418-0.234216143436j))*x_ref[0] + ((0.593703365552-0.823306613424j))*x_ref[1]**o + ((-0.93931529251+0.390173631644j))*x_ref[1]
        arg[(1, 2, 2, 1)]=(-0.863580864084+0.15573914845j)*x[0]**o + ((-0.281780613623-0.755401126274j))*x[0] + ((0.440014295331+0.205370413269j))*x[1]**o + ((0.457412644711+0.169836227829j))*x[1]
        ref[(1, 2, 2, 1)]=(-0.863580864084+0.15573914845j)*x_ref[0]**o + ((-0.281780613623-0.755401126274j))*x_ref[0] + ((0.440014295331+0.205370413269j))*x_ref[1]**o + ((0.457412644711+0.169836227829j))*x_ref[1]
        arg[(1, 2, 2, 2)]=(-0.658935071085+0.362450352165j)*x[0]**o + ((-0.94047640887-0.380927900895j))*x[0] + ((-0.374698841743-0.419756650222j))*x[1]**o + ((-0.629169930763-0.868220648023j))*x[1]
        ref[(1, 2, 2, 2)]=(-0.658935071085+0.362450352165j)*x_ref[0]**o + ((-0.94047640887-0.380927900895j))*x_ref[0] + ((-0.374698841743-0.419756650222j))*x_ref[1]**o + ((-0.629169930763-0.868220648023j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.94460742599-0.674288461354j)*x[0]**o + ((-0.611470484793-0.794247992932j))*x[0] + ((-0.137634186514-0.56885367593j))*x[1]**o + ((0.459410951401+0.341133750379j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.94460742599-0.674288461354j)*x_ref[0]**o + ((-0.611470484793-0.794247992932j))*x_ref[0] + ((-0.137634186514-0.56885367593j))*x_ref[1]**o + ((0.459410951401+0.341133750379j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(0.989964307578+0.218254432761j)*x[0]**o + ((-0.548016183373+0.936606879675j))*x[0] + ((-0.726765674008+0.43534822522j))*x[1]**o + ((-0.559928318227-0.969861335503j))*x[1]
        ref[(2, 0, 0, 1)]=(0.989964307578+0.218254432761j)*x_ref[0]**o + ((-0.548016183373+0.936606879675j))*x_ref[0] + ((-0.726765674008+0.43534822522j))*x_ref[1]**o + ((-0.559928318227-0.969861335503j))*x_ref[1]
        arg[(2, 0, 0, 2)]=(-0.0166775721056-0.634973256725j)*x[0]**o + ((-0.0970410700065+0.560746166995j))*x[0] + ((0.179135369161-0.161448819008j))*x[1]**o + ((-0.796572240854+0.5306671016j))*x[1]
        ref[(2, 0, 0, 2)]=(-0.0166775721056-0.634973256725j)*x_ref[0]**o + ((-0.0970410700065+0.560746166995j))*x_ref[0] + ((0.179135369161-0.161448819008j))*x_ref[1]**o + ((-0.796572240854+0.5306671016j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(-0.1595247266-0.206123883619j)*x[0]**o + ((0.840836891872-0.96810466262j))*x[0] + ((-0.857577625909+0.975362717651j))*x[1]**o + ((0.760659610373+0.277578251439j))*x[1]
        ref[(2, 0, 1, 0)]=(-0.1595247266-0.206123883619j)*x_ref[0]**o + ((0.840836891872-0.96810466262j))*x_ref[0] + ((-0.857577625909+0.975362717651j))*x_ref[1]**o + ((0.760659610373+0.277578251439j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.903319849966+0.337493059016j)*x[0]**o + ((-0.445274969973-0.605106909323j))*x[0] + ((-0.735905940037+0.206653255766j))*x[1]**o + ((-0.805673070834+0.828469658551j))*x[1]
        ref[(2, 0, 1, 1)]=(0.903319849966+0.337493059016j)*x_ref[0]**o + ((-0.445274969973-0.605106909323j))*x_ref[0] + ((-0.735905940037+0.206653255766j))*x_ref[1]**o + ((-0.805673070834+0.828469658551j))*x_ref[1]
        arg[(2, 0, 1, 2)]=(-0.0151868032948-0.368843809928j)*x[0]**o + ((-0.180923264156-0.990881492762j))*x[0] + ((-0.500368597781-0.302609401306j))*x[1]**o + ((0.319736367336+0.756320935598j))*x[1]
        ref[(2, 0, 1, 2)]=(-0.0151868032948-0.368843809928j)*x_ref[0]**o + ((-0.180923264156-0.990881492762j))*x_ref[0] + ((-0.500368597781-0.302609401306j))*x_ref[1]**o + ((0.319736367336+0.756320935598j))*x_ref[1]
        arg[(2, 0, 2, 0)]=(0.618981257789+0.659592059846j)*x[0]**o + ((-0.540934383969+0.501678145551j))*x[0] + ((-0.124163100895-0.260050668786j))*x[1]**o + ((-0.42979918326+0.312848967018j))*x[1]
        ref[(2, 0, 2, 0)]=(0.618981257789+0.659592059846j)*x_ref[0]**o + ((-0.540934383969+0.501678145551j))*x_ref[0] + ((-0.124163100895-0.260050668786j))*x_ref[1]**o + ((-0.42979918326+0.312848967018j))*x_ref[1]
        arg[(2, 0, 2, 1)]=(0.333305692825+0.760046717912j)*x[0]**o + ((-0.654814137665+0.561184020617j))*x[0] + ((-0.682967286341+0.980550290494j))*x[1]**o + ((0.752652999698-0.12644100558j))*x[1]
        ref[(2, 0, 2, 1)]=(0.333305692825+0.760046717912j)*x_ref[0]**o + ((-0.654814137665+0.561184020617j))*x_ref[0] + ((-0.682967286341+0.980550290494j))*x_ref[1]**o + ((0.752652999698-0.12644100558j))*x_ref[1]
        arg[(2, 0, 2, 2)]=(-0.261185283336+0.866829048867j)*x[0]**o + ((0.806530601551+0.0247859433332j))*x[0] + ((0.393231630786-0.502668196726j))*x[1]**o + ((-0.241772331351-0.207251570556j))*x[1]
        ref[(2, 0, 2, 2)]=(-0.261185283336+0.866829048867j)*x_ref[0]**o + ((0.806530601551+0.0247859433332j))*x_ref[0] + ((0.393231630786-0.502668196726j))*x_ref[1]**o + ((-0.241772331351-0.207251570556j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(0.185293379108+0.649141464961j)*x[0]**o + ((-0.535564385609+0.348294635913j))*x[0] + ((0.290146692787-0.652435601919j))*x[1]**o + ((0.204891916136-0.961219149848j))*x[1]
        ref[(2, 1, 0, 0)]=(0.185293379108+0.649141464961j)*x_ref[0]**o + ((-0.535564385609+0.348294635913j))*x_ref[0] + ((0.290146692787-0.652435601919j))*x_ref[1]**o + ((0.204891916136-0.961219149848j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(-0.606031905674+0.28059986212j)*x[0]**o + ((-0.112223777167-0.546061572988j))*x[0] + ((0.220484631912-0.289660797034j))*x[1]**o + ((-0.427776515532+0.744028790402j))*x[1]
        ref[(2, 1, 0, 1)]=(-0.606031905674+0.28059986212j)*x_ref[0]**o + ((-0.112223777167-0.546061572988j))*x_ref[0] + ((0.220484631912-0.289660797034j))*x_ref[1]**o + ((-0.427776515532+0.744028790402j))*x_ref[1]
        arg[(2, 1, 0, 2)]=(0.849601421931+0.0798848633512j)*x[0]**o + ((0.514365058968+0.935273817723j))*x[0] + ((0.0202307066661+0.99051428205j))*x[1]**o + ((0.119705092577-0.988473300918j))*x[1]
        ref[(2, 1, 0, 2)]=(0.849601421931+0.0798848633512j)*x_ref[0]**o + ((0.514365058968+0.935273817723j))*x_ref[0] + ((0.0202307066661+0.99051428205j))*x_ref[1]**o + ((0.119705092577-0.988473300918j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(0.281711049671+0.328431904497j)*x[0]**o + ((-0.0593856205843+0.352462690458j))*x[0] + ((-0.952501981335+0.880227373503j))*x[1]**o + ((-0.749344101095+0.797444196229j))*x[1]
        ref[(2, 1, 1, 0)]=(0.281711049671+0.328431904497j)*x_ref[0]**o + ((-0.0593856205843+0.352462690458j))*x_ref[0] + ((-0.952501981335+0.880227373503j))*x_ref[1]**o + ((-0.749344101095+0.797444196229j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(-0.774613190813-0.80410383806j)*x[0]**o + ((0.704467281691+0.927209617074j))*x[0] + ((0.343487597353-0.518775074099j))*x[1]**o + ((-0.186261558223-0.509654215231j))*x[1]
        ref[(2, 1, 1, 1)]=(-0.774613190813-0.80410383806j)*x_ref[0]**o + ((0.704467281691+0.927209617074j))*x_ref[0] + ((0.343487597353-0.518775074099j))*x_ref[1]**o + ((-0.186261558223-0.509654215231j))*x_ref[1]
        arg[(2, 1, 1, 2)]=(0.483771868833+0.959968268925j)*x[0]**o + ((0.406724040954-0.906811106546j))*x[0] + ((0.475857912395-0.278137031312j))*x[1]**o + ((-0.741364444162-0.805518697316j))*x[1]
        ref[(2, 1, 1, 2)]=(0.483771868833+0.959968268925j)*x_ref[0]**o + ((0.406724040954-0.906811106546j))*x_ref[0] + ((0.475857912395-0.278137031312j))*x_ref[1]**o + ((-0.741364444162-0.805518697316j))*x_ref[1]
        arg[(2, 1, 2, 0)]=(-0.47290464112-0.587621040078j)*x[0]**o + ((0.706976556076+0.29368759195j))*x[0] + ((-0.773890577631-0.530322819478j))*x[1]**o + ((-0.683796945878+0.466236271351j))*x[1]
        ref[(2, 1, 2, 0)]=(-0.47290464112-0.587621040078j)*x_ref[0]**o + ((0.706976556076+0.29368759195j))*x_ref[0] + ((-0.773890577631-0.530322819478j))*x_ref[1]**o + ((-0.683796945878+0.466236271351j))*x_ref[1]
        arg[(2, 1, 2, 1)]=(0.64974367663+0.775753084406j)*x[0]**o + ((0.877652064006+0.737811787771j))*x[0] + ((0.772602230957-0.308126809545j))*x[1]**o + ((0.278304928772+0.159387074968j))*x[1]
        ref[(2, 1, 2, 1)]=(0.64974367663+0.775753084406j)*x_ref[0]**o + ((0.877652064006+0.737811787771j))*x_ref[0] + ((0.772602230957-0.308126809545j))*x_ref[1]**o + ((0.278304928772+0.159387074968j))*x_ref[1]
        arg[(2, 1, 2, 2)]=(0.844774443019+0.929634715801j)*x[0]**o + ((-0.341079659949+0.692374772551j))*x[0] + ((0.0183077986093-0.902381906294j))*x[1]**o + ((-0.156921514459-0.966493029757j))*x[1]
        ref[(2, 1, 2, 2)]=(0.844774443019+0.929634715801j)*x_ref[0]**o + ((-0.341079659949+0.692374772551j))*x_ref[0] + ((0.0183077986093-0.902381906294j))*x_ref[1]**o + ((-0.156921514459-0.966493029757j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(0.728381538206+0.449950254565j)*x[0]**o + ((-0.405015677314-0.139586299041j))*x[0] + ((0.448662850649+0.289932749478j))*x[1]**o + ((-0.422492447509+0.84068290559j))*x[1]
        ref[(2, 2, 0, 0)]=(0.728381538206+0.449950254565j)*x_ref[0]**o + ((-0.405015677314-0.139586299041j))*x_ref[0] + ((0.448662850649+0.289932749478j))*x_ref[1]**o + ((-0.422492447509+0.84068290559j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(-0.270271116846+0.633018339944j)*x[0]**o + ((0.400725388829-0.481640297645j))*x[0] + ((0.865112148539+0.294714866248j))*x[1]**o + ((-0.410849785744-0.400288797676j))*x[1]
        ref[(2, 2, 0, 1)]=(-0.270271116846+0.633018339944j)*x_ref[0]**o + ((0.400725388829-0.481640297645j))*x_ref[0] + ((0.865112148539+0.294714866248j))*x_ref[1]**o + ((-0.410849785744-0.400288797676j))*x_ref[1]
        arg[(2, 2, 0, 2)]=(0.0558472153169-0.0535418805384j)*x[0]**o + ((0.855523078066+0.410089804372j))*x[0] + ((0.43827525166-0.315459011764j))*x[1]**o + ((0.441315855007-0.515102154001j))*x[1]
        ref[(2, 2, 0, 2)]=(0.0558472153169-0.0535418805384j)*x_ref[0]**o + ((0.855523078066+0.410089804372j))*x_ref[0] + ((0.43827525166-0.315459011764j))*x_ref[1]**o + ((0.441315855007-0.515102154001j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(-0.138636334186-0.339211514686j)*x[0]**o + ((-0.154794127445-0.362894097109j))*x[0] + ((0.833750625031+0.222636844459j))*x[1]**o + ((0.326263547841+0.210623717585j))*x[1]
        ref[(2, 2, 1, 0)]=(-0.138636334186-0.339211514686j)*x_ref[0]**o + ((-0.154794127445-0.362894097109j))*x_ref[0] + ((0.833750625031+0.222636844459j))*x_ref[1]**o + ((0.326263547841+0.210623717585j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(-0.690102771708-0.131842788483j)*x[0]**o + ((-0.656077658934-0.675936349527j))*x[0] + ((0.443775820471+0.328944102735j))*x[1]**o + ((0.738759024311-0.540520900611j))*x[1]
        ref[(2, 2, 1, 1)]=(-0.690102771708-0.131842788483j)*x_ref[0]**o + ((-0.656077658934-0.675936349527j))*x_ref[0] + ((0.443775820471+0.328944102735j))*x_ref[1]**o + ((0.738759024311-0.540520900611j))*x_ref[1]
        arg[(2, 2, 1, 2)]=(0.0728911648158-0.65931022005j)*x[0]**o + ((-0.196232959029-0.84144428115j))*x[0] + ((0.775688324524-0.625734866231j))*x[1]**o + ((0.562976971543-0.62422770679j))*x[1]
        ref[(2, 2, 1, 2)]=(0.0728911648158-0.65931022005j)*x_ref[0]**o + ((-0.196232959029-0.84144428115j))*x_ref[0] + ((0.775688324524-0.625734866231j))*x_ref[1]**o + ((0.562976971543-0.62422770679j))*x_ref[1]
        arg[(2, 2, 2, 0)]=(0.30027845402+0.615108229151j)*x[0]**o + ((-0.736338413656-0.18113730295j))*x[0] + ((0.983690331629-0.375179471685j))*x[1]**o + ((-0.70679025265+0.271454031909j))*x[1]
        ref[(2, 2, 2, 0)]=(0.30027845402+0.615108229151j)*x_ref[0]**o + ((-0.736338413656-0.18113730295j))*x_ref[0] + ((0.983690331629-0.375179471685j))*x_ref[1]**o + ((-0.70679025265+0.271454031909j))*x_ref[1]
        arg[(2, 2, 2, 1)]=(0.294251932932-0.204700916472j)*x[0]**o + ((-0.438238083386+0.206279290254j))*x[0] + ((0.77965009264-0.884336065573j))*x[1]**o + ((0.640752319748+0.865999032572j))*x[1]
        ref[(2, 2, 2, 1)]=(0.294251932932-0.204700916472j)*x_ref[0]**o + ((-0.438238083386+0.206279290254j))*x_ref[0] + ((0.77965009264-0.884336065573j))*x_ref[1]**o + ((0.640752319748+0.865999032572j))*x_ref[1]
        arg[(2, 2, 2, 2)]=(-0.60682740367+0.0860762883271j)*x[0]**o + ((0.0209850123249-0.941040375583j))*x[0] + ((0.565639770754-0.839967204851j))*x[1]**o + ((0.387544510367+0.501399136286j))*x[1]
        ref[(2, 2, 2, 2)]=(-0.60682740367+0.0860762883271j)*x_ref[0]**o + ((0.0209850123249-0.941040375583j))*x_ref[0] + ((0.565639770754-0.839967204851j))*x_ref[1]**o + ((0.387544510367+0.501399136286j))*x_ref[1]
        arg[(3, 0, 0, 0)]=(-0.63600748059-0.891693248684j)*x[0]**o + ((0.717402137615+0.342490677703j))*x[0] + ((-0.636654032686-0.458708410275j))*x[1]**o + ((0.946731495087+0.68193099948j))*x[1]
        ref[(3, 0, 0, 0)]=(-0.63600748059-0.891693248684j)*x_ref[0]**o + ((0.717402137615+0.342490677703j))*x_ref[0] + ((-0.636654032686-0.458708410275j))*x_ref[1]**o + ((0.946731495087+0.68193099948j))*x_ref[1]
        arg[(3, 0, 0, 1)]=(0.134195335958-0.0414603077563j)*x[0]**o + ((0.56007113598+0.332281595683j))*x[0] + ((0.298131112502+0.875245827918j))*x[1]**o + ((0.537942638023-0.100207622843j))*x[1]
        ref[(3, 0, 0, 1)]=(0.134195335958-0.0414603077563j)*x_ref[0]**o + ((0.56007113598+0.332281595683j))*x_ref[0] + ((0.298131112502+0.875245827918j))*x_ref[1]**o + ((0.537942638023-0.100207622843j))*x_ref[1]
        arg[(3, 0, 0, 2)]=(-0.724236893998+0.806350220505j)*x[0]**o + ((-0.538292284203-0.977627332263j))*x[0] + ((-0.18227603301-0.933117670903j))*x[1]**o + ((-0.584496831887+0.578611623032j))*x[1]
        ref[(3, 0, 0, 2)]=(-0.724236893998+0.806350220505j)*x_ref[0]**o + ((-0.538292284203-0.977627332263j))*x_ref[0] + ((-0.18227603301-0.933117670903j))*x_ref[1]**o + ((-0.584496831887+0.578611623032j))*x_ref[1]
        arg[(3, 0, 1, 0)]=(-0.922351900993-0.227442359567j)*x[0]**o + ((0.00484746901732+0.740304968245j))*x[0] + ((0.66025239115-0.0614752939566j))*x[1]**o + ((0.726606546723+0.539602883351j))*x[1]
        ref[(3, 0, 1, 0)]=(-0.922351900993-0.227442359567j)*x_ref[0]**o + ((0.00484746901732+0.740304968245j))*x_ref[0] + ((0.66025239115-0.0614752939566j))*x_ref[1]**o + ((0.726606546723+0.539602883351j))*x_ref[1]
        arg[(3, 0, 1, 1)]=(-0.587384631535+0.691224408311j)*x[0]**o + ((0.576769344496+0.429752648181j))*x[0] + ((0.264095764881+0.625529273368j))*x[1]**o + ((0.713249125971+0.784452389952j))*x[1]
        ref[(3, 0, 1, 1)]=(-0.587384631535+0.691224408311j)*x_ref[0]**o + ((0.576769344496+0.429752648181j))*x_ref[0] + ((0.264095764881+0.625529273368j))*x_ref[1]**o + ((0.713249125971+0.784452389952j))*x_ref[1]
        arg[(3, 0, 1, 2)]=(0.743033713991-0.91098389533j)*x[0]**o + ((-0.72945068046-0.315472715298j))*x[0] + ((0.583492793882+0.628686469423j))*x[1]**o + ((-0.234688472379+0.252865248601j))*x[1]
        ref[(3, 0, 1, 2)]=(0.743033713991-0.91098389533j)*x_ref[0]**o + ((-0.72945068046-0.315472715298j))*x_ref[0] + ((0.583492793882+0.628686469423j))*x_ref[1]**o + ((-0.234688472379+0.252865248601j))*x_ref[1]
        arg[(3, 0, 2, 0)]=(0.765080176215+0.75054040309j)*x[0]**o + ((0.165005455421-0.597815783655j))*x[0] + ((-0.418823627936-0.300504088066j))*x[1]**o + ((0.585736451036-0.890880360503j))*x[1]
        ref[(3, 0, 2, 0)]=(0.765080176215+0.75054040309j)*x_ref[0]**o + ((0.165005455421-0.597815783655j))*x_ref[0] + ((-0.418823627936-0.300504088066j))*x_ref[1]**o + ((0.585736451036-0.890880360503j))*x_ref[1]
        arg[(3, 0, 2, 1)]=(0.397148928381+0.552091018367j)*x[0]**o + ((0.346439336415-0.158875076351j))*x[0] + ((-0.288850616781-0.809988841915j))*x[1]**o + ((-0.676264428783+0.143855848447j))*x[1]
        ref[(3, 0, 2, 1)]=(0.397148928381+0.552091018367j)*x_ref[0]**o + ((0.346439336415-0.158875076351j))*x_ref[0] + ((-0.288850616781-0.809988841915j))*x_ref[1]**o + ((-0.676264428783+0.143855848447j))*x_ref[1]
        arg[(3, 0, 2, 2)]=(-0.74522544408+0.153355242222j)*x[0]**o + ((0.390968822473+0.379996411697j))*x[0] + ((-0.564683361115+0.76565775961j))*x[1]**o + ((0.523447291717+0.830139551324j))*x[1]
        ref[(3, 0, 2, 2)]=(-0.74522544408+0.153355242222j)*x_ref[0]**o + ((0.390968822473+0.379996411697j))*x_ref[0] + ((-0.564683361115+0.76565775961j))*x_ref[1]**o + ((0.523447291717+0.830139551324j))*x_ref[1]
        arg[(3, 1, 0, 0)]=(-0.166273012517+0.680850412272j)*x[0]**o + ((-0.0120702335245+0.849457419879j))*x[0] + ((0.219077974224-0.162461145709j))*x[1]**o + ((0.267382187742-0.705959844237j))*x[1]
        ref[(3, 1, 0, 0)]=(-0.166273012517+0.680850412272j)*x_ref[0]**o + ((-0.0120702335245+0.849457419879j))*x_ref[0] + ((0.219077974224-0.162461145709j))*x_ref[1]**o + ((0.267382187742-0.705959844237j))*x_ref[1]
        arg[(3, 1, 0, 1)]=(0.893011391637+0.825677749396j)*x[0]**o + ((-0.0238304966309-0.827885783038j))*x[0] + ((0.178584909959+0.95727247503j))*x[1]**o + ((0.0246529431075-0.986861195166j))*x[1]
        ref[(3, 1, 0, 1)]=(0.893011391637+0.825677749396j)*x_ref[0]**o + ((-0.0238304966309-0.827885783038j))*x_ref[0] + ((0.178584909959+0.95727247503j))*x_ref[1]**o + ((0.0246529431075-0.986861195166j))*x_ref[1]
        arg[(3, 1, 0, 2)]=(-0.194818960382-0.164105381639j)*x[0]**o + ((0.124348925454-0.738590953328j))*x[0] + ((0.945020315618-0.276995091468j))*x[1]**o + ((-0.970158174021-0.599625918456j))*x[1]
        ref[(3, 1, 0, 2)]=(-0.194818960382-0.164105381639j)*x_ref[0]**o + ((0.124348925454-0.738590953328j))*x_ref[0] + ((0.945020315618-0.276995091468j))*x_ref[1]**o + ((-0.970158174021-0.599625918456j))*x_ref[1]
        arg[(3, 1, 1, 0)]=(-0.515964300584-0.102683717306j)*x[0]**o + ((0.895007117781-0.434848948595j))*x[0] + ((0.494331734098-0.959380516379j))*x[1]**o + ((-0.810298376313-0.147545517012j))*x[1]
        ref[(3, 1, 1, 0)]=(-0.515964300584-0.102683717306j)*x_ref[0]**o + ((0.895007117781-0.434848948595j))*x_ref[0] + ((0.494331734098-0.959380516379j))*x_ref[1]**o + ((-0.810298376313-0.147545517012j))*x_ref[1]
        arg[(3, 1, 1, 1)]=(0.0495697693277+0.296478147198j)*x[0]**o + ((0.850750563783+0.955092124033j))*x[0] + ((0.325060069141+0.590023136741j))*x[1]**o + ((0.0781053793921+0.480405465036j))*x[1]
        ref[(3, 1, 1, 1)]=(0.0495697693277+0.296478147198j)*x_ref[0]**o + ((0.850750563783+0.955092124033j))*x_ref[0] + ((0.325060069141+0.590023136741j))*x_ref[1]**o + ((0.0781053793921+0.480405465036j))*x_ref[1]
        arg[(3, 1, 1, 2)]=(-0.942380665233+0.149540652715j)*x[0]**o + ((-0.83680533919-0.876449355218j))*x[0] + ((0.938622530665-0.503093259413j))*x[1]**o + ((0.745858743088-0.0182722607795j))*x[1]
        ref[(3, 1, 1, 2)]=(-0.942380665233+0.149540652715j)*x_ref[0]**o + ((-0.83680533919-0.876449355218j))*x_ref[0] + ((0.938622530665-0.503093259413j))*x_ref[1]**o + ((0.745858743088-0.0182722607795j))*x_ref[1]
        arg[(3, 1, 2, 0)]=(-0.105913656863+0.626316180947j)*x[0]**o + ((-0.850353423494-0.472480217477j))*x[0] + ((-0.173460175043-0.69359808763j))*x[1]**o + ((0.856054564607+0.798973471584j))*x[1]
        ref[(3, 1, 2, 0)]=(-0.105913656863+0.626316180947j)*x_ref[0]**o + ((-0.850353423494-0.472480217477j))*x_ref[0] + ((-0.173460175043-0.69359808763j))*x_ref[1]**o + ((0.856054564607+0.798973471584j))*x_ref[1]
        arg[(3, 1, 2, 1)]=(-0.901790712784+0.575944649964j)*x[0]**o + ((0.498977507312-0.22707875922j))*x[0] + ((0.262065136786+0.566730731149j))*x[1]**o + ((-0.487517082381-0.692499554385j))*x[1]
        ref[(3, 1, 2, 1)]=(-0.901790712784+0.575944649964j)*x_ref[0]**o + ((0.498977507312-0.22707875922j))*x_ref[0] + ((0.262065136786+0.566730731149j))*x_ref[1]**o + ((-0.487517082381-0.692499554385j))*x_ref[1]
        arg[(3, 1, 2, 2)]=(0.374340258227-0.365476937683j)*x[0]**o + ((-0.812782931259-0.370513661442j))*x[0] + ((0.0758838221474-0.51486712322j))*x[1]**o + ((-0.668313549017+0.462041977677j))*x[1]
        ref[(3, 1, 2, 2)]=(0.374340258227-0.365476937683j)*x_ref[0]**o + ((-0.812782931259-0.370513661442j))*x_ref[0] + ((0.0758838221474-0.51486712322j))*x_ref[1]**o + ((-0.668313549017+0.462041977677j))*x_ref[1]
        arg[(3, 2, 0, 0)]=(-0.517374482626-0.864167346669j)*x[0]**o + ((-0.83660748202+0.754315441345j))*x[0] + ((0.500658266329+0.692587541036j))*x[1]**o + ((0.980061035301+0.882385922317j))*x[1]
        ref[(3, 2, 0, 0)]=(-0.517374482626-0.864167346669j)*x_ref[0]**o + ((-0.83660748202+0.754315441345j))*x_ref[0] + ((0.500658266329+0.692587541036j))*x_ref[1]**o + ((0.980061035301+0.882385922317j))*x_ref[1]
        arg[(3, 2, 0, 1)]=(0.312152727908+0.900214082787j)*x[0]**o + ((0.975977360527+0.831184199741j))*x[0] + ((0.283517696121-0.836987553175j))*x[1]**o + ((-0.44917164541+0.263046133993j))*x[1]
        ref[(3, 2, 0, 1)]=(0.312152727908+0.900214082787j)*x_ref[0]**o + ((0.975977360527+0.831184199741j))*x_ref[0] + ((0.283517696121-0.836987553175j))*x_ref[1]**o + ((-0.44917164541+0.263046133993j))*x_ref[1]
        arg[(3, 2, 0, 2)]=(0.476528581893+0.769230799304j)*x[0]**o + ((0.237887787711-0.16330441602j))*x[0] + ((0.403269389241-0.558582151766j))*x[1]**o + ((-0.437466524692+0.186505022473j))*x[1]
        ref[(3, 2, 0, 2)]=(0.476528581893+0.769230799304j)*x_ref[0]**o + ((0.237887787711-0.16330441602j))*x_ref[0] + ((0.403269389241-0.558582151766j))*x_ref[1]**o + ((-0.437466524692+0.186505022473j))*x_ref[1]
        arg[(3, 2, 1, 0)]=(0.727774588308-0.980386088056j)*x[0]**o + ((-0.543535817468+0.0688694190941j))*x[0] + ((-0.044759504862-0.261662478406j))*x[1]**o + ((0.87387533582+0.816077783178j))*x[1]
        ref[(3, 2, 1, 0)]=(0.727774588308-0.980386088056j)*x_ref[0]**o + ((-0.543535817468+0.0688694190941j))*x_ref[0] + ((-0.044759504862-0.261662478406j))*x_ref[1]**o + ((0.87387533582+0.816077783178j))*x_ref[1]
        arg[(3, 2, 1, 1)]=(-0.499795195496+0.381778106607j)*x[0]**o + ((0.888769505957-0.10828451644j))*x[0] + ((0.644213327918+0.580880262982j))*x[1]**o + ((0.0936772835273+0.461854484017j))*x[1]
        ref[(3, 2, 1, 1)]=(-0.499795195496+0.381778106607j)*x_ref[0]**o + ((0.888769505957-0.10828451644j))*x_ref[0] + ((0.644213327918+0.580880262982j))*x_ref[1]**o + ((0.0936772835273+0.461854484017j))*x_ref[1]
        arg[(3, 2, 1, 2)]=(-0.700049931248+0.282670489574j)*x[0]**o + ((-0.818712604051-0.877104147048j))*x[0] + ((-0.209177841087-0.638591948585j))*x[1]**o + ((-0.816012824357+0.249958806924j))*x[1]
        ref[(3, 2, 1, 2)]=(-0.700049931248+0.282670489574j)*x_ref[0]**o + ((-0.818712604051-0.877104147048j))*x_ref[0] + ((-0.209177841087-0.638591948585j))*x_ref[1]**o + ((-0.816012824357+0.249958806924j))*x_ref[1]
        arg[(3, 2, 2, 0)]=(-0.616764832686-0.994739587859j)*x[0]**o + ((0.548933638739+0.0990305932699j))*x[0] + ((0.0750603452356+0.161495728769j))*x[1]**o + ((0.00454607017837-0.604714001401j))*x[1]
        ref[(3, 2, 2, 0)]=(-0.616764832686-0.994739587859j)*x_ref[0]**o + ((0.548933638739+0.0990305932699j))*x_ref[0] + ((0.0750603452356+0.161495728769j))*x_ref[1]**o + ((0.00454607017837-0.604714001401j))*x_ref[1]
        arg[(3, 2, 2, 1)]=(0.351277812698+0.807996962825j)*x[0]**o + ((0.293432753647-0.639101570296j))*x[0] + ((0.847610485875-0.184249420854j))*x[1]**o + ((0.735243327467+0.970542964153j))*x[1]
        ref[(3, 2, 2, 1)]=(0.351277812698+0.807996962825j)*x_ref[0]**o + ((0.293432753647-0.639101570296j))*x_ref[0] + ((0.847610485875-0.184249420854j))*x_ref[1]**o + ((0.735243327467+0.970542964153j))*x_ref[1]
        arg[(3, 2, 2, 2)]=(0.808685254354-0.566069273307j)*x[0]**o + ((-0.985073147507-0.150059858681j))*x[0] + ((-0.88583283125-0.922387257846j))*x[1]**o + ((-0.153658633927+0.994335011676j))*x[1]
        ref[(3, 2, 2, 2)]=(0.808685254354-0.566069273307j)*x_ref[0]**o + ((-0.985073147507-0.150059858681j))*x_ref[0] + ((-0.88583283125-0.922387257846j))*x_ref[1]**o + ((-0.153658633927+0.994335011676j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.670285049563+0.25282711999j)*x[2]**o + ((-0.970956125525-0.818411004394j))*x[2]
            ref[(0, 0, 0, 0)]+=(-0.670285049563+0.25282711999j)*x_ref[2]**o + ((-0.970956125525-0.818411004394j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.968988498784+0.825955575929j)*x[2]**o + ((0.691338407111-0.68599161857j))*x[2]
            ref[(0, 0, 0, 1)]+=(0.968988498784+0.825955575929j)*x_ref[2]**o + ((0.691338407111-0.68599161857j))*x_ref[2]
            arg[(0, 0, 0, 2)]+=(0.450485713846-0.653496204237j)*x[2]**o + ((-0.847785835606-0.369722343057j))*x[2]
            ref[(0, 0, 0, 2)]+=(0.450485713846-0.653496204237j)*x_ref[2]**o + ((-0.847785835606-0.369722343057j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.127634766279+0.434413652547j)*x[2]**o + ((-0.412880855381-0.0519884422404j))*x[2]
            ref[(0, 0, 1, 0)]+=(-0.127634766279+0.434413652547j)*x_ref[2]**o + ((-0.412880855381-0.0519884422404j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.534258568626-0.66468591408j)*x[2]**o + ((-0.105904436598+0.721482688879j))*x[2]
            ref[(0, 0, 1, 1)]+=(0.534258568626-0.66468591408j)*x_ref[2]**o + ((-0.105904436598+0.721482688879j))*x_ref[2]
            arg[(0, 0, 1, 2)]+=(0.168031997745+0.876672317353j)*x[2]**o + ((-0.370622784969-0.204035166477j))*x[2]
            ref[(0, 0, 1, 2)]+=(0.168031997745+0.876672317353j)*x_ref[2]**o + ((-0.370622784969-0.204035166477j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(-0.490762007628+0.0274109903295j)*x[2]**o + ((0.471338325981-0.51692901139j))*x[2]
            ref[(0, 0, 2, 0)]+=(-0.490762007628+0.0274109903295j)*x_ref[2]**o + ((0.471338325981-0.51692901139j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(0.516639201589+0.217438649785j)*x[2]**o + ((0.247321514047+0.503479990639j))*x[2]
            ref[(0, 0, 2, 1)]+=(0.516639201589+0.217438649785j)*x_ref[2]**o + ((0.247321514047+0.503479990639j))*x_ref[2]
            arg[(0, 0, 2, 2)]+=(0.609603998615+0.282872022261j)*x[2]**o + ((0.899067617491-0.26621499008j))*x[2]
            ref[(0, 0, 2, 2)]+=(0.609603998615+0.282872022261j)*x_ref[2]**o + ((0.899067617491-0.26621499008j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.0554941597603+0.550601641964j)*x[2]**o + ((0.243526656105+0.957735070453j))*x[2]
            ref[(0, 1, 0, 0)]+=(-0.0554941597603+0.550601641964j)*x_ref[2]**o + ((0.243526656105+0.957735070453j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.502810542177+0.282940958222j)*x[2]**o + ((0.152960208+0.4217078156j))*x[2]
            ref[(0, 1, 0, 1)]+=(-0.502810542177+0.282940958222j)*x_ref[2]**o + ((0.152960208+0.4217078156j))*x_ref[2]
            arg[(0, 1, 0, 2)]+=(0.24910928249+0.247154780464j)*x[2]**o + ((0.0318604335598+0.025339184192j))*x[2]
            ref[(0, 1, 0, 2)]+=(0.24910928249+0.247154780464j)*x_ref[2]**o + ((0.0318604335598+0.025339184192j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.398723825595+0.126186647495j)*x[2]**o + ((-0.219834650843-0.769869560267j))*x[2]
            ref[(0, 1, 1, 0)]+=(-0.398723825595+0.126186647495j)*x_ref[2]**o + ((-0.219834650843-0.769869560267j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.478720520751-0.0365175004477j)*x[2]**o + ((0.761890428422-0.461228190745j))*x[2]
            ref[(0, 1, 1, 1)]+=(-0.478720520751-0.0365175004477j)*x_ref[2]**o + ((0.761890428422-0.461228190745j))*x_ref[2]
            arg[(0, 1, 1, 2)]+=(-0.928269223498+0.141007467213j)*x[2]**o + ((-0.502268648429+0.416943602654j))*x[2]
            ref[(0, 1, 1, 2)]+=(-0.928269223498+0.141007467213j)*x_ref[2]**o + ((-0.502268648429+0.416943602654j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(-0.0245426545392+0.999781088275j)*x[2]**o + ((-0.478193336544-0.275296093256j))*x[2]
            ref[(0, 1, 2, 0)]+=(-0.0245426545392+0.999781088275j)*x_ref[2]**o + ((-0.478193336544-0.275296093256j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(0.0606339767294+0.507403478691j)*x[2]**o + ((-0.249611165395+0.71739182533j))*x[2]
            ref[(0, 1, 2, 1)]+=(0.0606339767294+0.507403478691j)*x_ref[2]**o + ((-0.249611165395+0.71739182533j))*x_ref[2]
            arg[(0, 1, 2, 2)]+=(-0.499740220888+0.718648947479j)*x[2]**o + ((-0.656927590995+0.909688408249j))*x[2]
            ref[(0, 1, 2, 2)]+=(-0.499740220888+0.718648947479j)*x_ref[2]**o + ((-0.656927590995+0.909688408249j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(-0.869016529628+0.982619414404j)*x[2]**o + ((0.304164555666-0.870374237351j))*x[2]
            ref[(0, 2, 0, 0)]+=(-0.869016529628+0.982619414404j)*x_ref[2]**o + ((0.304164555666-0.870374237351j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(0.990262999635+0.152176588846j)*x[2]**o + ((-0.980772944736-0.684162516457j))*x[2]
            ref[(0, 2, 0, 1)]+=(0.990262999635+0.152176588846j)*x_ref[2]**o + ((-0.980772944736-0.684162516457j))*x_ref[2]
            arg[(0, 2, 0, 2)]+=(0.596069666131+0.734636003863j)*x[2]**o + ((0.493770350363+0.242553479596j))*x[2]
            ref[(0, 2, 0, 2)]+=(0.596069666131+0.734636003863j)*x_ref[2]**o + ((0.493770350363+0.242553479596j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.0364576283237+0.182828193474j)*x[2]**o + ((0.667363431456+0.8781394357j))*x[2]
            ref[(0, 2, 1, 0)]+=(-0.0364576283237+0.182828193474j)*x_ref[2]**o + ((0.667363431456+0.8781394357j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(-0.295438081906+0.80194213629j)*x[2]**o + ((0.265156689634+0.44457724579j))*x[2]
            ref[(0, 2, 1, 1)]+=(-0.295438081906+0.80194213629j)*x_ref[2]**o + ((0.265156689634+0.44457724579j))*x_ref[2]
            arg[(0, 2, 1, 2)]+=(0.384528847176-0.244164481076j)*x[2]**o + ((-0.0483225887312+0.0448129937726j))*x[2]
            ref[(0, 2, 1, 2)]+=(0.384528847176-0.244164481076j)*x_ref[2]**o + ((-0.0483225887312+0.0448129937726j))*x_ref[2]
            arg[(0, 2, 2, 0)]+=(0.193288319402-0.999144933996j)*x[2]**o + ((0.0310137757819-0.252817420448j))*x[2]
            ref[(0, 2, 2, 0)]+=(0.193288319402-0.999144933996j)*x_ref[2]**o + ((0.0310137757819-0.252817420448j))*x_ref[2]
            arg[(0, 2, 2, 1)]+=(-0.753992223313-0.0960828229152j)*x[2]**o + ((0.532449832331-0.535456978057j))*x[2]
            ref[(0, 2, 2, 1)]+=(-0.753992223313-0.0960828229152j)*x_ref[2]**o + ((0.532449832331-0.535456978057j))*x_ref[2]
            arg[(0, 2, 2, 2)]+=(-0.699204139255-0.680185783003j)*x[2]**o + ((0.911167755183+0.517711159008j))*x[2]
            ref[(0, 2, 2, 2)]+=(-0.699204139255-0.680185783003j)*x_ref[2]**o + ((0.911167755183+0.517711159008j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.643005391264+0.0225769657121j)*x[2]**o + ((-0.809275962778+0.753507158469j))*x[2]
            ref[(1, 0, 0, 0)]+=(0.643005391264+0.0225769657121j)*x_ref[2]**o + ((-0.809275962778+0.753507158469j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(-0.191614849156-0.556937735695j)*x[2]**o + ((0.671907619761-0.458646054946j))*x[2]
            ref[(1, 0, 0, 1)]+=(-0.191614849156-0.556937735695j)*x_ref[2]**o + ((0.671907619761-0.458646054946j))*x_ref[2]
            arg[(1, 0, 0, 2)]+=(-0.374626616181-0.386605492005j)*x[2]**o + ((-0.423553503401-0.325103730045j))*x[2]
            ref[(1, 0, 0, 2)]+=(-0.374626616181-0.386605492005j)*x_ref[2]**o + ((-0.423553503401-0.325103730045j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.663695703723-0.749128593817j)*x[2]**o + ((0.443307686224-0.524190780752j))*x[2]
            ref[(1, 0, 1, 0)]+=(0.663695703723-0.749128593817j)*x_ref[2]**o + ((0.443307686224-0.524190780752j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.364353454636-0.475831317645j)*x[2]**o + ((-0.0756045826433+0.177174602216j))*x[2]
            ref[(1, 0, 1, 1)]+=(0.364353454636-0.475831317645j)*x_ref[2]**o + ((-0.0756045826433+0.177174602216j))*x_ref[2]
            arg[(1, 0, 1, 2)]+=(-0.47824504395+0.819015580613j)*x[2]**o + ((-0.634918873694-0.982798708136j))*x[2]
            ref[(1, 0, 1, 2)]+=(-0.47824504395+0.819015580613j)*x_ref[2]**o + ((-0.634918873694-0.982798708136j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(0.291219146291-0.925783513426j)*x[2]**o + ((-0.404464269929-0.734763880583j))*x[2]
            ref[(1, 0, 2, 0)]+=(0.291219146291-0.925783513426j)*x_ref[2]**o + ((-0.404464269929-0.734763880583j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(-0.992336930017+0.096099065036j)*x[2]**o + ((-0.3776439325-0.561591145794j))*x[2]
            ref[(1, 0, 2, 1)]+=(-0.992336930017+0.096099065036j)*x_ref[2]**o + ((-0.3776439325-0.561591145794j))*x_ref[2]
            arg[(1, 0, 2, 2)]+=(-0.150107442176+0.858171970998j)*x[2]**o + ((-0.664869429383-0.485956087316j))*x[2]
            ref[(1, 0, 2, 2)]+=(-0.150107442176+0.858171970998j)*x_ref[2]**o + ((-0.664869429383-0.485956087316j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.108995263466+0.0526992490772j)*x[2]**o + ((-0.897303272985-0.553219209142j))*x[2]
            ref[(1, 1, 0, 0)]+=(0.108995263466+0.0526992490772j)*x_ref[2]**o + ((-0.897303272985-0.553219209142j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.649487992578+0.530438656156j)*x[2]**o + ((-0.609582990999-0.329783804121j))*x[2]
            ref[(1, 1, 0, 1)]+=(-0.649487992578+0.530438656156j)*x_ref[2]**o + ((-0.609582990999-0.329783804121j))*x_ref[2]
            arg[(1, 1, 0, 2)]+=(0.746396156132-0.623063365842j)*x[2]**o + ((-0.439990725297+0.811176189254j))*x[2]
            ref[(1, 1, 0, 2)]+=(0.746396156132-0.623063365842j)*x_ref[2]**o + ((-0.439990725297+0.811176189254j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(-0.269971078669-0.810784880063j)*x[2]**o + ((0.799293052231-0.080968308673j))*x[2]
            ref[(1, 1, 1, 0)]+=(-0.269971078669-0.810784880063j)*x_ref[2]**o + ((0.799293052231-0.080968308673j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.880722552069+0.615840287665j)*x[2]**o + ((0.793715664241+0.643304589234j))*x[2]
            ref[(1, 1, 1, 1)]+=(-0.880722552069+0.615840287665j)*x_ref[2]**o + ((0.793715664241+0.643304589234j))*x_ref[2]
            arg[(1, 1, 1, 2)]+=(0.0255095785616-0.257612755841j)*x[2]**o + ((0.921452579326-0.600679764138j))*x[2]
            ref[(1, 1, 1, 2)]+=(0.0255095785616-0.257612755841j)*x_ref[2]**o + ((0.921452579326-0.600679764138j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(0.521124489595+0.741918094052j)*x[2]**o + ((0.480902174082+0.624988992321j))*x[2]
            ref[(1, 1, 2, 0)]+=(0.521124489595+0.741918094052j)*x_ref[2]**o + ((0.480902174082+0.624988992321j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(0.997102389284-0.668157096598j)*x[2]**o + ((0.00371286970162+0.912912076815j))*x[2]
            ref[(1, 1, 2, 1)]+=(0.997102389284-0.668157096598j)*x_ref[2]**o + ((0.00371286970162+0.912912076815j))*x_ref[2]
            arg[(1, 1, 2, 2)]+=(0.788645645212-0.652177931922j)*x[2]**o + ((-0.0361230669798-0.10125408631j))*x[2]
            ref[(1, 1, 2, 2)]+=(0.788645645212-0.652177931922j)*x_ref[2]**o + ((-0.0361230669798-0.10125408631j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(-0.324002230031-0.938395690453j)*x[2]**o + ((-0.0708818679636+0.591520729316j))*x[2]
            ref[(1, 2, 0, 0)]+=(-0.324002230031-0.938395690453j)*x_ref[2]**o + ((-0.0708818679636+0.591520729316j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(0.674303996456-0.718588682985j)*x[2]**o + ((0.703852149083+0.789183400395j))*x[2]
            ref[(1, 2, 0, 1)]+=(0.674303996456-0.718588682985j)*x_ref[2]**o + ((0.703852149083+0.789183400395j))*x_ref[2]
            arg[(1, 2, 0, 2)]+=(-0.227006746502-0.677289585788j)*x[2]**o + ((-0.526497763988+0.75948694298j))*x[2]
            ref[(1, 2, 0, 2)]+=(-0.227006746502-0.677289585788j)*x_ref[2]**o + ((-0.526497763988+0.75948694298j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(-0.268081376878+0.144279548007j)*x[2]**o + ((-0.432620738708+0.781988952814j))*x[2]
            ref[(1, 2, 1, 0)]+=(-0.268081376878+0.144279548007j)*x_ref[2]**o + ((-0.432620738708+0.781988952814j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(0.72102819997+0.530615895873j)*x[2]**o + ((-0.676693030273+0.448791831671j))*x[2]
            ref[(1, 2, 1, 1)]+=(0.72102819997+0.530615895873j)*x_ref[2]**o + ((-0.676693030273+0.448791831671j))*x_ref[2]
            arg[(1, 2, 1, 2)]+=(0.484446292123-0.722783466008j)*x[2]**o + ((-0.663920296386+0.175755089385j))*x[2]
            ref[(1, 2, 1, 2)]+=(0.484446292123-0.722783466008j)*x_ref[2]**o + ((-0.663920296386+0.175755089385j))*x_ref[2]
            arg[(1, 2, 2, 0)]+=(0.490280013041+0.083211476092j)*x[2]**o + ((0.237592789368-0.567677771157j))*x[2]
            ref[(1, 2, 2, 0)]+=(0.490280013041+0.083211476092j)*x_ref[2]**o + ((0.237592789368-0.567677771157j))*x_ref[2]
            arg[(1, 2, 2, 1)]+=(-0.908721758581-0.871611321522j)*x[2]**o + ((0.881718745922+0.30895412436j))*x[2]
            ref[(1, 2, 2, 1)]+=(-0.908721758581-0.871611321522j)*x_ref[2]**o + ((0.881718745922+0.30895412436j))*x_ref[2]
            arg[(1, 2, 2, 2)]+=(-0.0425373643036+0.198008095195j)*x[2]**o + ((-0.0107942920785+0.488722303988j))*x[2]
            ref[(1, 2, 2, 2)]+=(-0.0425373643036+0.198008095195j)*x_ref[2]**o + ((-0.0107942920785+0.488722303988j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(0.207666064979+0.523401606627j)*x[2]**o + ((-0.513919563348-0.597374166756j))*x[2]
            ref[(2, 0, 0, 0)]+=(0.207666064979+0.523401606627j)*x_ref[2]**o + ((-0.513919563348-0.597374166756j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(-0.733567791664+0.272176797959j)*x[2]**o + ((0.23026383113+0.198556126676j))*x[2]
            ref[(2, 0, 0, 1)]+=(-0.733567791664+0.272176797959j)*x_ref[2]**o + ((0.23026383113+0.198556126676j))*x_ref[2]
            arg[(2, 0, 0, 2)]+=(0.91937974494+0.319063207824j)*x[2]**o + ((0.416250875083-0.0999484454546j))*x[2]
            ref[(2, 0, 0, 2)]+=(0.91937974494+0.319063207824j)*x_ref[2]**o + ((0.416250875083-0.0999484454546j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(-0.262497147848-0.888389509878j)*x[2]**o + ((-0.114934450889-0.720689022438j))*x[2]
            ref[(2, 0, 1, 0)]+=(-0.262497147848-0.888389509878j)*x_ref[2]**o + ((-0.114934450889-0.720689022438j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(-0.350398903224-0.659093583866j)*x[2]**o + ((-0.0424387275662-0.0531216779511j))*x[2]
            ref[(2, 0, 1, 1)]+=(-0.350398903224-0.659093583866j)*x_ref[2]**o + ((-0.0424387275662-0.0531216779511j))*x_ref[2]
            arg[(2, 0, 1, 2)]+=(0.930788292712-0.114972472033j)*x[2]**o + ((-0.60856768709-0.974943426452j))*x[2]
            ref[(2, 0, 1, 2)]+=(0.930788292712-0.114972472033j)*x_ref[2]**o + ((-0.60856768709-0.974943426452j))*x_ref[2]
            arg[(2, 0, 2, 0)]+=(-0.963042143946-0.369977318065j)*x[2]**o + ((0.589361029177-0.70907611368j))*x[2]
            ref[(2, 0, 2, 0)]+=(-0.963042143946-0.369977318065j)*x_ref[2]**o + ((0.589361029177-0.70907611368j))*x_ref[2]
            arg[(2, 0, 2, 1)]+=(0.861811571029-0.16171385505j)*x[2]**o + ((-0.702166950408+0.49425149166j))*x[2]
            ref[(2, 0, 2, 1)]+=(0.861811571029-0.16171385505j)*x_ref[2]**o + ((-0.702166950408+0.49425149166j))*x_ref[2]
            arg[(2, 0, 2, 2)]+=(-0.267687877374-0.527255751557j)*x[2]**o + ((-0.920918147166-0.720039045966j))*x[2]
            ref[(2, 0, 2, 2)]+=(-0.267687877374-0.527255751557j)*x_ref[2]**o + ((-0.920918147166-0.720039045966j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(-0.0654836192184+0.648213228392j)*x[2]**o + ((-0.145366177023-0.171354252747j))*x[2]
            ref[(2, 1, 0, 0)]+=(-0.0654836192184+0.648213228392j)*x_ref[2]**o + ((-0.145366177023-0.171354252747j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(0.923630051733-0.0651548769877j)*x[2]**o + ((0.0927761521714-0.0013748785198j))*x[2]
            ref[(2, 1, 0, 1)]+=(0.923630051733-0.0651548769877j)*x_ref[2]**o + ((0.0927761521714-0.0013748785198j))*x_ref[2]
            arg[(2, 1, 0, 2)]+=(-0.638977826763+0.819215441846j)*x[2]**o + ((-0.34820199375-0.2394104193j))*x[2]
            ref[(2, 1, 0, 2)]+=(-0.638977826763+0.819215441846j)*x_ref[2]**o + ((-0.34820199375-0.2394104193j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(0.823268508888-0.0302814914981j)*x[2]**o + ((0.347861538993+0.74093401698j))*x[2]
            ref[(2, 1, 1, 0)]+=(0.823268508888-0.0302814914981j)*x_ref[2]**o + ((0.347861538993+0.74093401698j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(0.882194920188+0.323677160476j)*x[2]**o + ((0.984501762912+0.0356056363017j))*x[2]
            ref[(2, 1, 1, 1)]+=(0.882194920188+0.323677160476j)*x_ref[2]**o + ((0.984501762912+0.0356056363017j))*x_ref[2]
            arg[(2, 1, 1, 2)]+=(0.82401874056+0.639655166104j)*x[2]**o + ((0.626959985451+0.46957454641j))*x[2]
            ref[(2, 1, 1, 2)]+=(0.82401874056+0.639655166104j)*x_ref[2]**o + ((0.626959985451+0.46957454641j))*x_ref[2]
            arg[(2, 1, 2, 0)]+=(-0.474180132913-0.0620794518784j)*x[2]**o + ((0.107348044717+0.541115494835j))*x[2]
            ref[(2, 1, 2, 0)]+=(-0.474180132913-0.0620794518784j)*x_ref[2]**o + ((0.107348044717+0.541115494835j))*x_ref[2]
            arg[(2, 1, 2, 1)]+=(0.1624969548-0.319848432576j)*x[2]**o + ((-0.54886632025+0.35102707581j))*x[2]
            ref[(2, 1, 2, 1)]+=(0.1624969548-0.319848432576j)*x_ref[2]**o + ((-0.54886632025+0.35102707581j))*x_ref[2]
            arg[(2, 1, 2, 2)]+=(0.327217382061+0.960931596899j)*x[2]**o + ((-0.521288529061+0.52591403662j))*x[2]
            ref[(2, 1, 2, 2)]+=(0.327217382061+0.960931596899j)*x_ref[2]**o + ((-0.521288529061+0.52591403662j))*x_ref[2]
            arg[(2, 2, 0, 0)]+=(0.911784584234+0.234830955623j)*x[2]**o + ((0.113263858623+0.198746428209j))*x[2]
            ref[(2, 2, 0, 0)]+=(0.911784584234+0.234830955623j)*x_ref[2]**o + ((0.113263858623+0.198746428209j))*x_ref[2]
            arg[(2, 2, 0, 1)]+=(-0.426826730638+0.420619448485j)*x[2]**o + ((-0.243616205775-0.835707428763j))*x[2]
            ref[(2, 2, 0, 1)]+=(-0.426826730638+0.420619448485j)*x_ref[2]**o + ((-0.243616205775-0.835707428763j))*x_ref[2]
            arg[(2, 2, 0, 2)]+=(-0.506299000445-0.227923834821j)*x[2]**o + ((-0.087587791637+0.74742874032j))*x[2]
            ref[(2, 2, 0, 2)]+=(-0.506299000445-0.227923834821j)*x_ref[2]**o + ((-0.087587791637+0.74742874032j))*x_ref[2]
            arg[(2, 2, 1, 0)]+=(0.908533286664+0.992581176385j)*x[2]**o + ((0.484116552133+0.86325053016j))*x[2]
            ref[(2, 2, 1, 0)]+=(0.908533286664+0.992581176385j)*x_ref[2]**o + ((0.484116552133+0.86325053016j))*x_ref[2]
            arg[(2, 2, 1, 1)]+=(0.510056669342+0.470370381283j)*x[2]**o + ((-0.0112477851649+0.166043359152j))*x[2]
            ref[(2, 2, 1, 1)]+=(0.510056669342+0.470370381283j)*x_ref[2]**o + ((-0.0112477851649+0.166043359152j))*x_ref[2]
            arg[(2, 2, 1, 2)]+=(0.535006227747+0.253468066055j)*x[2]**o + ((0.457491079753-0.303826276193j))*x[2]
            ref[(2, 2, 1, 2)]+=(0.535006227747+0.253468066055j)*x_ref[2]**o + ((0.457491079753-0.303826276193j))*x_ref[2]
            arg[(2, 2, 2, 0)]+=(0.903820033453-0.128324484046j)*x[2]**o + ((0.0910931322368-0.551290377988j))*x[2]
            ref[(2, 2, 2, 0)]+=(0.903820033453-0.128324484046j)*x_ref[2]**o + ((0.0910931322368-0.551290377988j))*x_ref[2]
            arg[(2, 2, 2, 1)]+=(0.267425972106+0.135212443943j)*x[2]**o + ((-0.37996814581-0.577622752547j))*x[2]
            ref[(2, 2, 2, 1)]+=(0.267425972106+0.135212443943j)*x_ref[2]**o + ((-0.37996814581-0.577622752547j))*x_ref[2]
            arg[(2, 2, 2, 2)]+=(-0.218665986582+0.140328422362j)*x[2]**o + ((0.0696037318567+0.872078799477j))*x[2]
            ref[(2, 2, 2, 2)]+=(-0.218665986582+0.140328422362j)*x_ref[2]**o + ((0.0696037318567+0.872078799477j))*x_ref[2]
            arg[(3, 0, 0, 0)]+=(-0.383488529829-0.560570344736j)*x[2]**o + ((0.660742890959+0.193455291241j))*x[2]
            ref[(3, 0, 0, 0)]+=(-0.383488529829-0.560570344736j)*x_ref[2]**o + ((0.660742890959+0.193455291241j))*x_ref[2]
            arg[(3, 0, 0, 1)]+=(0.942228676562+0.738058217624j)*x[2]**o + ((0.525699634306+0.769590977876j))*x[2]
            ref[(3, 0, 0, 1)]+=(0.942228676562+0.738058217624j)*x_ref[2]**o + ((0.525699634306+0.769590977876j))*x_ref[2]
            arg[(3, 0, 0, 2)]+=(-0.554309880133+0.312020771101j)*x[2]**o + ((-0.269697573118-0.848393038327j))*x[2]
            ref[(3, 0, 0, 2)]+=(-0.554309880133+0.312020771101j)*x_ref[2]**o + ((-0.269697573118-0.848393038327j))*x_ref[2]
            arg[(3, 0, 1, 0)]+=(0.837207995053+0.503449070629j)*x[2]**o + ((-0.397596429937-0.98332150567j))*x[2]
            ref[(3, 0, 1, 0)]+=(0.837207995053+0.503449070629j)*x_ref[2]**o + ((-0.397596429937-0.98332150567j))*x_ref[2]
            arg[(3, 0, 1, 1)]+=(0.425325591978-0.893720402511j)*x[2]**o + ((-0.611721694719-0.823101617982j))*x[2]
            ref[(3, 0, 1, 1)]+=(0.425325591978-0.893720402511j)*x_ref[2]**o + ((-0.611721694719-0.823101617982j))*x_ref[2]
            arg[(3, 0, 1, 2)]+=(-0.0193617118246+0.831998574802j)*x[2]**o + ((-0.333759189853-0.719406715928j))*x[2]
            ref[(3, 0, 1, 2)]+=(-0.0193617118246+0.831998574802j)*x_ref[2]**o + ((-0.333759189853-0.719406715928j))*x_ref[2]
            arg[(3, 0, 2, 0)]+=(-0.735045591286-0.333954991639j)*x[2]**o + ((-0.280813326288+0.686079656707j))*x[2]
            ref[(3, 0, 2, 0)]+=(-0.735045591286-0.333954991639j)*x_ref[2]**o + ((-0.280813326288+0.686079656707j))*x_ref[2]
            arg[(3, 0, 2, 1)]+=(-0.354984939224+0.795289530555j)*x[2]**o + ((0.309542451801-0.458424438603j))*x[2]
            ref[(3, 0, 2, 1)]+=(-0.354984939224+0.795289530555j)*x_ref[2]**o + ((0.309542451801-0.458424438603j))*x_ref[2]
            arg[(3, 0, 2, 2)]+=(0.0756848216177-0.154031796896j)*x[2]**o + ((0.914162373032+0.415761671233j))*x[2]
            ref[(3, 0, 2, 2)]+=(0.0756848216177-0.154031796896j)*x_ref[2]**o + ((0.914162373032+0.415761671233j))*x_ref[2]
            arg[(3, 1, 0, 0)]+=(0.429883013068-0.537035447607j)*x[2]**o + ((0.818405947214+0.0875308096098j))*x[2]
            ref[(3, 1, 0, 0)]+=(0.429883013068-0.537035447607j)*x_ref[2]**o + ((0.818405947214+0.0875308096098j))*x_ref[2]
            arg[(3, 1, 0, 1)]+=(0.757743815805+0.856048504991j)*x[2]**o + ((-0.543343345172-0.303032295272j))*x[2]
            ref[(3, 1, 0, 1)]+=(0.757743815805+0.856048504991j)*x_ref[2]**o + ((-0.543343345172-0.303032295272j))*x_ref[2]
            arg[(3, 1, 0, 2)]+=(-0.378864656579+0.731059145425j)*x[2]**o + ((0.188816602533+0.00772482525756j))*x[2]
            ref[(3, 1, 0, 2)]+=(-0.378864656579+0.731059145425j)*x_ref[2]**o + ((0.188816602533+0.00772482525756j))*x_ref[2]
            arg[(3, 1, 1, 0)]+=(0.191969513463+0.46594633578j)*x[2]**o + ((0.760403382555+0.419422247328j))*x[2]
            ref[(3, 1, 1, 0)]+=(0.191969513463+0.46594633578j)*x_ref[2]**o + ((0.760403382555+0.419422247328j))*x_ref[2]
            arg[(3, 1, 1, 1)]+=(0.404243692852+0.15664548668j)*x[2]**o + ((-0.290404242702+0.0160603421058j))*x[2]
            ref[(3, 1, 1, 1)]+=(0.404243692852+0.15664548668j)*x_ref[2]**o + ((-0.290404242702+0.0160603421058j))*x_ref[2]
            arg[(3, 1, 1, 2)]+=(-0.0324088774525-0.135075267378j)*x[2]**o + ((-0.601075383927+0.11939330733j))*x[2]
            ref[(3, 1, 1, 2)]+=(-0.0324088774525-0.135075267378j)*x_ref[2]**o + ((-0.601075383927+0.11939330733j))*x_ref[2]
            arg[(3, 1, 2, 0)]+=(-0.897824611024-0.125819994468j)*x[2]**o + ((0.0883149219254+0.745771677769j))*x[2]
            ref[(3, 1, 2, 0)]+=(-0.897824611024-0.125819994468j)*x_ref[2]**o + ((0.0883149219254+0.745771677769j))*x_ref[2]
            arg[(3, 1, 2, 1)]+=(-0.282547264587+0.241044066897j)*x[2]**o + ((-0.163310450439-0.614392484717j))*x[2]
            ref[(3, 1, 2, 1)]+=(-0.282547264587+0.241044066897j)*x_ref[2]**o + ((-0.163310450439-0.614392484717j))*x_ref[2]
            arg[(3, 1, 2, 2)]+=(-0.387951053527+0.809228396636j)*x[2]**o + ((-0.862582792237+0.415437418747j))*x[2]
            ref[(3, 1, 2, 2)]+=(-0.387951053527+0.809228396636j)*x_ref[2]**o + ((-0.862582792237+0.415437418747j))*x_ref[2]
            arg[(3, 2, 0, 0)]+=(0.0661666708646+0.494449742172j)*x[2]**o + ((-0.849815106082+0.945214706856j))*x[2]
            ref[(3, 2, 0, 0)]+=(0.0661666708646+0.494449742172j)*x_ref[2]**o + ((-0.849815106082+0.945214706856j))*x_ref[2]
            arg[(3, 2, 0, 1)]+=(0.875086064809+0.447380582963j)*x[2]**o + ((-0.78024061437+0.382686889192j))*x[2]
            ref[(3, 2, 0, 1)]+=(0.875086064809+0.447380582963j)*x_ref[2]**o + ((-0.78024061437+0.382686889192j))*x_ref[2]
            arg[(3, 2, 0, 2)]+=(0.190740721306+0.605314824669j)*x[2]**o + ((0.794298397109-0.759658599863j))*x[2]
            ref[(3, 2, 0, 2)]+=(0.190740721306+0.605314824669j)*x_ref[2]**o + ((0.794298397109-0.759658599863j))*x_ref[2]
            arg[(3, 2, 1, 0)]+=(-0.315046410125+0.17515741064j)*x[2]**o + ((0.200456399816+0.778314054372j))*x[2]
            ref[(3, 2, 1, 0)]+=(-0.315046410125+0.17515741064j)*x_ref[2]**o + ((0.200456399816+0.778314054372j))*x_ref[2]
            arg[(3, 2, 1, 1)]+=(0.709584126457-0.0822550886876j)*x[2]**o + ((-0.399790738427+0.692460947767j))*x[2]
            ref[(3, 2, 1, 1)]+=(0.709584126457-0.0822550886876j)*x_ref[2]**o + ((-0.399790738427+0.692460947767j))*x_ref[2]
            arg[(3, 2, 1, 2)]+=(-0.632087359308+0.857408467842j)*x[2]**o + ((0.67414371329-0.553715551222j))*x[2]
            ref[(3, 2, 1, 2)]+=(-0.632087359308+0.857408467842j)*x_ref[2]**o + ((0.67414371329-0.553715551222j))*x_ref[2]
            arg[(3, 2, 2, 0)]+=(0.6631556733-0.662483564872j)*x[2]**o + ((-0.18284389108-0.300032305427j))*x[2]
            ref[(3, 2, 2, 0)]+=(0.6631556733-0.662483564872j)*x_ref[2]**o + ((-0.18284389108-0.300032305427j))*x_ref[2]
            arg[(3, 2, 2, 1)]+=(0.480817494631-0.947194123146j)*x[2]**o + ((0.685916885248+0.359126589244j))*x[2]
            ref[(3, 2, 2, 1)]+=(0.480817494631-0.947194123146j)*x_ref[2]**o + ((0.685916885248+0.359126589244j))*x_ref[2]
            arg[(3, 2, 2, 2)]+=(0.269260162948-0.274621051646j)*x[2]**o + ((0.972924971752-0.681385951287j))*x[2]
            ref[(3, 2, 2, 2)]+=(0.269260162948-0.274621051646j)*x_ref[2]**o + ((0.972924971752-0.681385951287j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.817235632077-0.532113653868j)*x[0]**o + ((0.764419074553+0.704228525794j))*x[0] + ((-0.804499995277-0.0301574436062j))*x[1]**o + ((-0.0391448633172+0.747608205218j))*x[1]
        ref=(0.817235632077-0.532113653868j)*x_ref[0]**o + ((0.764419074553+0.704228525794j))*x_ref[0] + ((-0.804499995277-0.0301574436062j))*x_ref[1]**o + ((-0.0391448633172+0.747608205218j))*x_ref[1]
        if dim==3:
            arg+=((-0.573105080146-0.738213208121j))*x[2]**o + ((-0.952948825623+0.557485859702j))*x[2]
            ref+=((-0.573105080146-0.738213208121j))*x_ref[2]**o + ((-0.952948825623+0.557485859702j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=(0.92877651718+0.262625835396j)*x[0]**o + ((-0.151335231812+0.484474444543j))*x[0] + ((0.183373901825-0.279287695125j))*x[1]**o + ((0.876984494581+0.201872366911j))*x[1]
        ref[(0,)]=(0.92877651718+0.262625835396j)*x_ref[0]**o + ((-0.151335231812+0.484474444543j))*x_ref[0] + ((0.183373901825-0.279287695125j))*x_ref[1]**o + ((0.876984494581+0.201872366911j))*x_ref[1]
        arg[(1,)]=(-0.520234786413-0.580756930442j)*x[0]**o + ((-0.197777966939+0.36971637714j))*x[0] + ((-0.142968729725+0.740370488132j))*x[1]**o + ((-0.947041473575+0.798696456769j))*x[1]
        ref[(1,)]=(-0.520234786413-0.580756930442j)*x_ref[0]**o + ((-0.197777966939+0.36971637714j))*x_ref[0] + ((-0.142968729725+0.740370488132j))*x_ref[1]**o + ((-0.947041473575+0.798696456769j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.162283114199-0.451030020809j)*x[2]**o + ((-0.109595157417-0.5761033316j))*x[2]
            ref[(0,)]+=(-0.162283114199-0.451030020809j)*x_ref[2]**o + ((-0.109595157417-0.5761033316j))*x_ref[2]
            arg[(1,)]+=(0.0109892286808-0.75036630282j)*x[2]**o + ((0.240511738222+0.815198152284j))*x[2]
            ref[(1,)]+=(0.0109892286808-0.75036630282j)*x_ref[2]**o + ((0.240511738222+0.815198152284j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref = Data(0,(4, 4),w_ref)
        arg[(0, 0)]=(0.351280447079+0.730837543053j)*x[0]**o + ((0.441323797464-0.515033081961j))*x[0] + ((0.172418844582-0.210643154801j))*x[1]**o + ((0.186996289825+0.573209711449j))*x[1]
        ref[(0, 0)]=(0.351280447079+0.730837543053j)*x_ref[0]**o + ((0.441323797464-0.515033081961j))*x_ref[0] + ((0.172418844582-0.210643154801j))*x_ref[1]**o + ((0.186996289825+0.573209711449j))*x_ref[1]
        arg[(0, 1)]=(0.126066130907+0.411724546321j)*x[0]**o + ((-0.265756238339-0.0591405721722j))*x[0] + ((-0.292869332576+0.402943797635j))*x[1]**o + ((0.299865367978+0.123299626686j))*x[1]
        ref[(0, 1)]=(0.126066130907+0.411724546321j)*x_ref[0]**o + ((-0.265756238339-0.0591405721722j))*x_ref[0] + ((-0.292869332576+0.402943797635j))*x_ref[1]**o + ((0.299865367978+0.123299626686j))*x_ref[1]
        arg[(0, 2)]=(-0.463342184611+0.487449318218j)*x[0]**o + ((-0.848805657421+0.535125083096j))*x[0] + ((0.68437000068+0.355810391567j))*x[1]**o + ((-0.350832055454-0.703898470131j))*x[1]
        ref[(0, 2)]=(-0.463342184611+0.487449318218j)*x_ref[0]**o + ((-0.848805657421+0.535125083096j))*x_ref[0] + ((0.68437000068+0.355810391567j))*x_ref[1]**o + ((-0.350832055454-0.703898470131j))*x_ref[1]
        arg[(0, 3)]=(-0.604767140621-0.860135133721j)*x[0]**o + ((-0.316745297392+0.927286336346j))*x[0] + ((0.29073861697-0.583907012394j))*x[1]**o + ((-0.229274273364-0.888665299865j))*x[1]
        ref[(0, 3)]=(-0.604767140621-0.860135133721j)*x_ref[0]**o + ((-0.316745297392+0.927286336346j))*x_ref[0] + ((0.29073861697-0.583907012394j))*x_ref[1]**o + ((-0.229274273364-0.888665299865j))*x_ref[1]
        arg[(1, 0)]=(0.418696405359-0.74971544437j)*x[0]**o + ((-0.0057422252615-0.760861457753j))*x[0] + ((0.991620077383+0.935815186014j))*x[1]**o + ((0.0384767230899-0.716659040883j))*x[1]
        ref[(1, 0)]=(0.418696405359-0.74971544437j)*x_ref[0]**o + ((-0.0057422252615-0.760861457753j))*x_ref[0] + ((0.991620077383+0.935815186014j))*x_ref[1]**o + ((0.0384767230899-0.716659040883j))*x_ref[1]
        arg[(1, 1)]=(-0.360811965986-0.240574314173j)*x[0]**o + ((-0.766907245989-0.93090471591j))*x[0] + ((-0.685986226902-0.924759569246j))*x[1]**o + ((0.270695179298-0.42570466724j))*x[1]
        ref[(1, 1)]=(-0.360811965986-0.240574314173j)*x_ref[0]**o + ((-0.766907245989-0.93090471591j))*x_ref[0] + ((-0.685986226902-0.924759569246j))*x_ref[1]**o + ((0.270695179298-0.42570466724j))*x_ref[1]
        arg[(1, 2)]=(-0.230056970056+0.789599184441j)*x[0]**o + ((0.0223919511599-0.444863874323j))*x[0] + ((0.578379570127+0.871060849907j))*x[1]**o + ((-0.296952152303+0.868765174861j))*x[1]
        ref[(1, 2)]=(-0.230056970056+0.789599184441j)*x_ref[0]**o + ((0.0223919511599-0.444863874323j))*x_ref[0] + ((0.578379570127+0.871060849907j))*x_ref[1]**o + ((-0.296952152303+0.868765174861j))*x_ref[1]
        arg[(1, 3)]=(0.402207308455+0.9417548216j)*x[0]**o + ((0.506232867384+0.0373492809515j))*x[0] + ((0.110370351448-0.40286315007j))*x[1]**o + ((-0.200769404179+0.447437064038j))*x[1]
        ref[(1, 3)]=(0.402207308455+0.9417548216j)*x_ref[0]**o + ((0.506232867384+0.0373492809515j))*x_ref[0] + ((0.110370351448-0.40286315007j))*x_ref[1]**o + ((-0.200769404179+0.447437064038j))*x_ref[1]
        arg[(2, 0)]=(-0.6286777138-0.573627119201j)*x[0]**o + ((0.00128221564329+0.496171840306j))*x[0] + ((0.895838753163+0.752222544649j))*x[1]**o + ((0.933356796816+0.331783822549j))*x[1]
        ref[(2, 0)]=(-0.6286777138-0.573627119201j)*x_ref[0]**o + ((0.00128221564329+0.496171840306j))*x_ref[0] + ((0.895838753163+0.752222544649j))*x_ref[1]**o + ((0.933356796816+0.331783822549j))*x_ref[1]
        arg[(2, 1)]=(0.169205313189-0.849331487038j)*x[0]**o + ((-0.875205481969-0.828197180912j))*x[0] + ((-0.557632732032+0.897611985355j))*x[1]**o + ((-0.423039022213+0.548287062101j))*x[1]
        ref[(2, 1)]=(0.169205313189-0.849331487038j)*x_ref[0]**o + ((-0.875205481969-0.828197180912j))*x_ref[0] + ((-0.557632732032+0.897611985355j))*x_ref[1]**o + ((-0.423039022213+0.548287062101j))*x_ref[1]
        arg[(2, 2)]=(0.0275973375457+0.858288766512j)*x[0]**o + ((0.205182037699+0.770939298695j))*x[0] + ((-0.949821925185+0.0208305960572j))*x[1]**o + ((-0.164643585235+0.451612423642j))*x[1]
        ref[(2, 2)]=(0.0275973375457+0.858288766512j)*x_ref[0]**o + ((0.205182037699+0.770939298695j))*x_ref[0] + ((-0.949821925185+0.0208305960572j))*x_ref[1]**o + ((-0.164643585235+0.451612423642j))*x_ref[1]
        arg[(2, 3)]=(0.627162614275+0.254159432562j)*x[0]**o + ((0.875687691198-0.0970897942673j))*x[0] + ((-0.150754316096+0.529171195639j))*x[1]**o + ((0.370784742543-0.897010163531j))*x[1]
        ref[(2, 3)]=(0.627162614275+0.254159432562j)*x_ref[0]**o + ((0.875687691198-0.0970897942673j))*x_ref[0] + ((-0.150754316096+0.529171195639j))*x_ref[1]**o + ((0.370784742543-0.897010163531j))*x_ref[1]
        arg[(3, 0)]=(-0.0750415958677-0.383750203528j)*x[0]**o + ((0.417623467277+0.267428961489j))*x[0] + ((0.527661237109-0.287076250577j))*x[1]**o + ((0.418246138568+0.553719421591j))*x[1]
        ref[(3, 0)]=(-0.0750415958677-0.383750203528j)*x_ref[0]**o + ((0.417623467277+0.267428961489j))*x_ref[0] + ((0.527661237109-0.287076250577j))*x_ref[1]**o + ((0.418246138568+0.553719421591j))*x_ref[1]
        arg[(3, 1)]=(-0.332627651459-0.349325184866j)*x[0]**o + ((-0.275524638875+0.679422635592j))*x[0] + ((-0.674786962439-0.118139279292j))*x[1]**o + ((-0.733187508555-0.273670454497j))*x[1]
        ref[(3, 1)]=(-0.332627651459-0.349325184866j)*x_ref[0]**o + ((-0.275524638875+0.679422635592j))*x_ref[0] + ((-0.674786962439-0.118139279292j))*x_ref[1]**o + ((-0.733187508555-0.273670454497j))*x_ref[1]
        arg[(3, 2)]=(-0.679693996055-0.673088322217j)*x[0]**o + ((-0.52400411527+0.604378071819j))*x[0] + ((-0.291024618102+0.445321020095j))*x[1]**o + ((0.141392146404-0.635380952539j))*x[1]
        ref[(3, 2)]=(-0.679693996055-0.673088322217j)*x_ref[0]**o + ((-0.52400411527+0.604378071819j))*x_ref[0] + ((-0.291024618102+0.445321020095j))*x_ref[1]**o + ((0.141392146404-0.635380952539j))*x_ref[1]
        arg[(3, 3)]=(-0.87542297899+0.0605243172401j)*x[0]**o + ((0.395540049718+0.956741679299j))*x[0] + ((-0.467622397233-0.398083891199j))*x[1]**o + ((-0.287926473924+0.371392218651j))*x[1]
        ref[(3, 3)]=(-0.87542297899+0.0605243172401j)*x_ref[0]**o + ((0.395540049718+0.956741679299j))*x_ref[0] + ((-0.467622397233-0.398083891199j))*x_ref[1]**o + ((-0.287926473924+0.371392218651j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.977554561297-0.65395764548j)*x[2]**o + ((-0.407949223494-0.293272848403j))*x[2]
            ref[(0, 0)]+=(0.977554561297-0.65395764548j)*x_ref[2]**o + ((-0.407949223494-0.293272848403j))*x_ref[2]
            arg[(0, 1)]+=(0.166616593131+0.0374559401949j)*x[2]**o + ((-0.604212404988+0.9068969144j))*x[2]
            ref[(0, 1)]+=(0.166616593131+0.0374559401949j)*x_ref[2]**o + ((-0.604212404988+0.9068969144j))*x_ref[2]
            arg[(0, 2)]+=(-0.600984763343-0.742247064784j)*x[2]**o + ((0.744249526987-0.0128370251435j))*x[2]
            ref[(0, 2)]+=(-0.600984763343-0.742247064784j)*x_ref[2]**o + ((0.744249526987-0.0128370251435j))*x_ref[2]
            arg[(0, 3)]+=(0.559494934017-0.664280660874j)*x[2]**o + ((0.196766415974+0.276978670466j))*x[2]
            ref[(0, 3)]+=(0.559494934017-0.664280660874j)*x_ref[2]**o + ((0.196766415974+0.276978670466j))*x_ref[2]
            arg[(1, 0)]+=(0.301579931271+0.605875219068j)*x[2]**o + ((0.589585719738-0.295153842004j))*x[2]
            ref[(1, 0)]+=(0.301579931271+0.605875219068j)*x_ref[2]**o + ((0.589585719738-0.295153842004j))*x_ref[2]
            arg[(1, 1)]+=(-0.457662344671-0.88836146922j)*x[2]**o + ((0.0550057090438+0.142326933913j))*x[2]
            ref[(1, 1)]+=(-0.457662344671-0.88836146922j)*x_ref[2]**o + ((0.0550057090438+0.142326933913j))*x_ref[2]
            arg[(1, 2)]+=(-0.196546858232-0.634219033837j)*x[2]**o + ((0.284823473126-0.135986351819j))*x[2]
            ref[(1, 2)]+=(-0.196546858232-0.634219033837j)*x_ref[2]**o + ((0.284823473126-0.135986351819j))*x_ref[2]
            arg[(1, 3)]+=(0.480573195096+0.530483573509j)*x[2]**o + ((0.699260368299+0.175114563872j))*x[2]
            ref[(1, 3)]+=(0.480573195096+0.530483573509j)*x_ref[2]**o + ((0.699260368299+0.175114563872j))*x_ref[2]
            arg[(2, 0)]+=(0.901543057379+0.621579976195j)*x[2]**o + ((0.713613437681-0.080544917966j))*x[2]
            ref[(2, 0)]+=(0.901543057379+0.621579976195j)*x_ref[2]**o + ((0.713613437681-0.080544917966j))*x_ref[2]
            arg[(2, 1)]+=(0.321361315255+0.309300776374j)*x[2]**o + ((-0.654051970843+0.44688649948j))*x[2]
            ref[(2, 1)]+=(0.321361315255+0.309300776374j)*x_ref[2]**o + ((-0.654051970843+0.44688649948j))*x_ref[2]
            arg[(2, 2)]+=(0.991203932549+0.736907521413j)*x[2]**o + ((0.845801965484+0.841289664228j))*x[2]
            ref[(2, 2)]+=(0.991203932549+0.736907521413j)*x_ref[2]**o + ((0.845801965484+0.841289664228j))*x_ref[2]
            arg[(2, 3)]+=(0.71966263602-0.219900870153j)*x[2]**o + ((0.992167837937+0.490551067059j))*x[2]
            ref[(2, 3)]+=(0.71966263602-0.219900870153j)*x_ref[2]**o + ((0.992167837937+0.490551067059j))*x_ref[2]
            arg[(3, 0)]+=(-0.852497371355-0.650765604365j)*x[2]**o + ((-0.644511566836-0.643123764954j))*x[2]
            ref[(3, 0)]+=(-0.852497371355-0.650765604365j)*x_ref[2]**o + ((-0.644511566836-0.643123764954j))*x_ref[2]
            arg[(3, 1)]+=(0.280857630015-0.332607617548j)*x[2]**o + ((-0.357912328147-0.354173670349j))*x[2]
            ref[(3, 1)]+=(0.280857630015-0.332607617548j)*x_ref[2]**o + ((-0.357912328147-0.354173670349j))*x_ref[2]
            arg[(3, 2)]+=(-0.670676656381-0.13454498668j)*x[2]**o + ((-0.730002522221+0.621408319618j))*x[2]
            ref[(3, 2)]+=(-0.670676656381-0.13454498668j)*x_ref[2]**o + ((-0.730002522221+0.621408319618j))*x_ref[2]
            arg[(3, 3)]+=(-0.870430343586+0.10002293054j)*x[2]**o + ((-0.599785227974-0.739774346871j))*x[2]
            ref[(3, 3)]+=(-0.870430343586+0.10002293054j)*x_ref[2]**o + ((-0.599785227974-0.739774346871j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 4),w)
        ref = Data(0,(4, 3, 4),w_ref)
        arg[(0, 0, 0)]=(0.916984983412+0.0346199769783j)*x[0]**o + ((-0.896720096012-0.688421174299j))*x[0] + ((-0.395223138331-0.512473936616j))*x[1]**o + ((-0.971255203255+0.242033893324j))*x[1]
        ref[(0, 0, 0)]=(0.916984983412+0.0346199769783j)*x_ref[0]**o + ((-0.896720096012-0.688421174299j))*x_ref[0] + ((-0.395223138331-0.512473936616j))*x_ref[1]**o + ((-0.971255203255+0.242033893324j))*x_ref[1]
        arg[(0, 0, 1)]=(0.283161120475+0.990365256932j)*x[0]**o + ((-0.713640247064+0.499980611317j))*x[0] + ((-0.101443746734-0.657520341168j))*x[1]**o + ((-0.751820046672-0.638232807718j))*x[1]
        ref[(0, 0, 1)]=(0.283161120475+0.990365256932j)*x_ref[0]**o + ((-0.713640247064+0.499980611317j))*x_ref[0] + ((-0.101443746734-0.657520341168j))*x_ref[1]**o + ((-0.751820046672-0.638232807718j))*x_ref[1]
        arg[(0, 0, 2)]=(-0.117424837666+0.455220842459j)*x[0]**o + ((-0.772016564082+0.608851472335j))*x[0] + ((-0.910345354975+0.756351420496j))*x[1]**o + ((-0.976381925823-0.678237774734j))*x[1]
        ref[(0, 0, 2)]=(-0.117424837666+0.455220842459j)*x_ref[0]**o + ((-0.772016564082+0.608851472335j))*x_ref[0] + ((-0.910345354975+0.756351420496j))*x_ref[1]**o + ((-0.976381925823-0.678237774734j))*x_ref[1]
        arg[(0, 0, 3)]=(-0.688827252907+0.977421690308j)*x[0]**o + ((0.909393123049+0.422407561413j))*x[0] + ((0.477317205137+0.722637368044j))*x[1]**o + ((0.0460355589854+0.20115876023j))*x[1]
        ref[(0, 0, 3)]=(-0.688827252907+0.977421690308j)*x_ref[0]**o + ((0.909393123049+0.422407561413j))*x_ref[0] + ((0.477317205137+0.722637368044j))*x_ref[1]**o + ((0.0460355589854+0.20115876023j))*x_ref[1]
        arg[(0, 1, 0)]=(0.155393617415+0.596602241709j)*x[0]**o + ((-0.674931753145+0.515954624306j))*x[0] + ((0.553826184848+0.202804703653j))*x[1]**o + ((0.977495355532-0.589021011951j))*x[1]
        ref[(0, 1, 0)]=(0.155393617415+0.596602241709j)*x_ref[0]**o + ((-0.674931753145+0.515954624306j))*x_ref[0] + ((0.553826184848+0.202804703653j))*x_ref[1]**o + ((0.977495355532-0.589021011951j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.28125240243-0.547147405954j)*x[0]**o + ((0.56075108927-0.875518526205j))*x[0] + ((0.63286846724-0.669590775854j))*x[1]**o + ((-0.565725756084-0.609874996265j))*x[1]
        ref[(0, 1, 1)]=(-0.28125240243-0.547147405954j)*x_ref[0]**o + ((0.56075108927-0.875518526205j))*x_ref[0] + ((0.63286846724-0.669590775854j))*x_ref[1]**o + ((-0.565725756084-0.609874996265j))*x_ref[1]
        arg[(0, 1, 2)]=(0.201667481746+0.815198490664j)*x[0]**o + ((0.95952333118+0.448036705319j))*x[0] + ((0.0260923190774+0.835245736398j))*x[1]**o + ((0.201205945882+0.930803592046j))*x[1]
        ref[(0, 1, 2)]=(0.201667481746+0.815198490664j)*x_ref[0]**o + ((0.95952333118+0.448036705319j))*x_ref[0] + ((0.0260923190774+0.835245736398j))*x_ref[1]**o + ((0.201205945882+0.930803592046j))*x_ref[1]
        arg[(0, 1, 3)]=(-0.956470494931-0.422041795601j)*x[0]**o + ((0.0741407721994-0.984729730103j))*x[0] + ((-0.448163758001-0.523160319712j))*x[1]**o + ((-0.796452417648+0.228365932228j))*x[1]
        ref[(0, 1, 3)]=(-0.956470494931-0.422041795601j)*x_ref[0]**o + ((0.0741407721994-0.984729730103j))*x_ref[0] + ((-0.448163758001-0.523160319712j))*x_ref[1]**o + ((-0.796452417648+0.228365932228j))*x_ref[1]
        arg[(0, 2, 0)]=(0.768366893393+0.126447069938j)*x[0]**o + ((0.843041515007-0.627174823897j))*x[0] + ((-0.270921814351+0.808183373659j))*x[1]**o + ((0.791866292347-0.135908124562j))*x[1]
        ref[(0, 2, 0)]=(0.768366893393+0.126447069938j)*x_ref[0]**o + ((0.843041515007-0.627174823897j))*x_ref[0] + ((-0.270921814351+0.808183373659j))*x_ref[1]**o + ((0.791866292347-0.135908124562j))*x_ref[1]
        arg[(0, 2, 1)]=(0.766519730162-0.906864923034j)*x[0]**o + ((0.184820587169-0.593597833352j))*x[0] + ((0.568104415794+0.351796898126j))*x[1]**o + ((-0.541575256076-0.830999686831j))*x[1]
        ref[(0, 2, 1)]=(0.766519730162-0.906864923034j)*x_ref[0]**o + ((0.184820587169-0.593597833352j))*x_ref[0] + ((0.568104415794+0.351796898126j))*x_ref[1]**o + ((-0.541575256076-0.830999686831j))*x_ref[1]
        arg[(0, 2, 2)]=(-0.828562036466+0.19213945265j)*x[0]**o + ((-0.388469282637+0.670568345682j))*x[0] + ((0.897419210091+0.0521553933848j))*x[1]**o + ((0.508389554262+0.500497032024j))*x[1]
        ref[(0, 2, 2)]=(-0.828562036466+0.19213945265j)*x_ref[0]**o + ((-0.388469282637+0.670568345682j))*x_ref[0] + ((0.897419210091+0.0521553933848j))*x_ref[1]**o + ((0.508389554262+0.500497032024j))*x_ref[1]
        arg[(0, 2, 3)]=(-0.751493261226+0.577944900917j)*x[0]**o + ((0.0750835541266+0.680812841627j))*x[0] + ((-0.795107916992-0.81868258918j))*x[1]**o + ((0.0469790683512+0.644319478627j))*x[1]
        ref[(0, 2, 3)]=(-0.751493261226+0.577944900917j)*x_ref[0]**o + ((0.0750835541266+0.680812841627j))*x_ref[0] + ((-0.795107916992-0.81868258918j))*x_ref[1]**o + ((0.0469790683512+0.644319478627j))*x_ref[1]
        arg[(1, 0, 0)]=(0.595386886236-0.970636739313j)*x[0]**o + ((0.536037948998-0.0285304977303j))*x[0] + ((0.0693086101981+0.16720987169j))*x[1]**o + ((-0.979723536591+0.862058701933j))*x[1]
        ref[(1, 0, 0)]=(0.595386886236-0.970636739313j)*x_ref[0]**o + ((0.536037948998-0.0285304977303j))*x_ref[0] + ((0.0693086101981+0.16720987169j))*x_ref[1]**o + ((-0.979723536591+0.862058701933j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.841823222388+0.282143181546j)*x[0]**o + ((-0.897650845211-0.145610685965j))*x[0] + ((-0.952810189022+0.33744419299j))*x[1]**o + ((0.0347434223902-0.501182758475j))*x[1]
        ref[(1, 0, 1)]=(-0.841823222388+0.282143181546j)*x_ref[0]**o + ((-0.897650845211-0.145610685965j))*x_ref[0] + ((-0.952810189022+0.33744419299j))*x_ref[1]**o + ((0.0347434223902-0.501182758475j))*x_ref[1]
        arg[(1, 0, 2)]=(0.0543502033131-0.123917602869j)*x[0]**o + ((0.913898955567-0.871550548457j))*x[0] + ((-0.452361399015-0.608010311172j))*x[1]**o + ((-0.19154102915-0.011044548981j))*x[1]
        ref[(1, 0, 2)]=(0.0543502033131-0.123917602869j)*x_ref[0]**o + ((0.913898955567-0.871550548457j))*x_ref[0] + ((-0.452361399015-0.608010311172j))*x_ref[1]**o + ((-0.19154102915-0.011044548981j))*x_ref[1]
        arg[(1, 0, 3)]=(-0.0994928143233+0.400532732558j)*x[0]**o + ((0.0940522792329-0.494983706995j))*x[0] + ((-0.573588915996+0.197400999866j))*x[1]**o + ((0.795329804189+0.737943588485j))*x[1]
        ref[(1, 0, 3)]=(-0.0994928143233+0.400532732558j)*x_ref[0]**o + ((0.0940522792329-0.494983706995j))*x_ref[0] + ((-0.573588915996+0.197400999866j))*x_ref[1]**o + ((0.795329804189+0.737943588485j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.611849680466+0.354428335799j)*x[0]**o + ((0.427774269352-0.0436290813412j))*x[0] + ((0.105665590947+0.730291107778j))*x[1]**o + ((0.404244929018-0.291786267267j))*x[1]
        ref[(1, 1, 0)]=(-0.611849680466+0.354428335799j)*x_ref[0]**o + ((0.427774269352-0.0436290813412j))*x_ref[0] + ((0.105665590947+0.730291107778j))*x_ref[1]**o + ((0.404244929018-0.291786267267j))*x_ref[1]
        arg[(1, 1, 1)]=(0.870577668796-0.863936024185j)*x[0]**o + ((0.321878350827-0.846353420617j))*x[0] + ((0.824655083161-0.194215869933j))*x[1]**o + ((0.837930106057+0.821039458358j))*x[1]
        ref[(1, 1, 1)]=(0.870577668796-0.863936024185j)*x_ref[0]**o + ((0.321878350827-0.846353420617j))*x_ref[0] + ((0.824655083161-0.194215869933j))*x_ref[1]**o + ((0.837930106057+0.821039458358j))*x_ref[1]
        arg[(1, 1, 2)]=(0.337137203959-0.645150803971j)*x[0]**o + ((0.508266521432+0.725865604182j))*x[0] + ((0.33890988941+0.211179902392j))*x[1]**o + ((-0.853670354255+0.514240031478j))*x[1]
        ref[(1, 1, 2)]=(0.337137203959-0.645150803971j)*x_ref[0]**o + ((0.508266521432+0.725865604182j))*x_ref[0] + ((0.33890988941+0.211179902392j))*x_ref[1]**o + ((-0.853670354255+0.514240031478j))*x_ref[1]
        arg[(1, 1, 3)]=(0.399058382696-0.590192484774j)*x[0]**o + ((0.749544643957+0.891115402585j))*x[0] + ((0.345070129308-0.252972677879j))*x[1]**o + ((-0.14292588523+0.578693396656j))*x[1]
        ref[(1, 1, 3)]=(0.399058382696-0.590192484774j)*x_ref[0]**o + ((0.749544643957+0.891115402585j))*x_ref[0] + ((0.345070129308-0.252972677879j))*x_ref[1]**o + ((-0.14292588523+0.578693396656j))*x_ref[1]
        arg[(1, 2, 0)]=(0.938608939563+0.138852492269j)*x[0]**o + ((-0.704187261126-0.542974030412j))*x[0] + ((-0.927908080796-0.830752267042j))*x[1]**o + ((-0.00904149946063-0.746640345358j))*x[1]
        ref[(1, 2, 0)]=(0.938608939563+0.138852492269j)*x_ref[0]**o + ((-0.704187261126-0.542974030412j))*x_ref[0] + ((-0.927908080796-0.830752267042j))*x_ref[1]**o + ((-0.00904149946063-0.746640345358j))*x_ref[1]
        arg[(1, 2, 1)]=(0.35834956462-0.665061842029j)*x[0]**o + ((0.425454691387-0.720870879205j))*x[0] + ((-0.723388672471-0.399560204666j))*x[1]**o + ((-0.30445936557+0.766105007618j))*x[1]
        ref[(1, 2, 1)]=(0.35834956462-0.665061842029j)*x_ref[0]**o + ((0.425454691387-0.720870879205j))*x_ref[0] + ((-0.723388672471-0.399560204666j))*x_ref[1]**o + ((-0.30445936557+0.766105007618j))*x_ref[1]
        arg[(1, 2, 2)]=(0.935048318386+0.0108118312623j)*x[0]**o + ((-0.755796764705-0.42695081048j))*x[0] + ((-0.423237290305+0.359010693331j))*x[1]**o + ((-0.343946671615+0.439076407411j))*x[1]
        ref[(1, 2, 2)]=(0.935048318386+0.0108118312623j)*x_ref[0]**o + ((-0.755796764705-0.42695081048j))*x_ref[0] + ((-0.423237290305+0.359010693331j))*x_ref[1]**o + ((-0.343946671615+0.439076407411j))*x_ref[1]
        arg[(1, 2, 3)]=(0.480377959179-0.817156633578j)*x[0]**o + ((-0.485603762155-0.430411329463j))*x[0] + ((0.994771785915-0.144727666892j))*x[1]**o + ((0.956852177338-0.847737645219j))*x[1]
        ref[(1, 2, 3)]=(0.480377959179-0.817156633578j)*x_ref[0]**o + ((-0.485603762155-0.430411329463j))*x_ref[0] + ((0.994771785915-0.144727666892j))*x_ref[1]**o + ((0.956852177338-0.847737645219j))*x_ref[1]
        arg[(2, 0, 0)]=(-0.210403551866-0.134068769922j)*x[0]**o + ((0.129427114824-0.596344596116j))*x[0] + ((-0.761576257022+0.857868412026j))*x[1]**o + ((0.653138947936+0.467288197068j))*x[1]
        ref[(2, 0, 0)]=(-0.210403551866-0.134068769922j)*x_ref[0]**o + ((0.129427114824-0.596344596116j))*x_ref[0] + ((-0.761576257022+0.857868412026j))*x_ref[1]**o + ((0.653138947936+0.467288197068j))*x_ref[1]
        arg[(2, 0, 1)]=(-0.36179885763-0.335098580255j)*x[0]**o + ((0.496918897097+0.126080122898j))*x[0] + ((-0.641160367306-0.772320133749j))*x[1]**o + ((-0.984798469057+0.284870663434j))*x[1]
        ref[(2, 0, 1)]=(-0.36179885763-0.335098580255j)*x_ref[0]**o + ((0.496918897097+0.126080122898j))*x_ref[0] + ((-0.641160367306-0.772320133749j))*x_ref[1]**o + ((-0.984798469057+0.284870663434j))*x_ref[1]
        arg[(2, 0, 2)]=(-0.917636195053-0.0516310868189j)*x[0]**o + ((-0.0978977591081-0.764839532453j))*x[0] + ((0.605001453971+0.946382368036j))*x[1]**o + ((-0.572679303701+0.0982537589457j))*x[1]
        ref[(2, 0, 2)]=(-0.917636195053-0.0516310868189j)*x_ref[0]**o + ((-0.0978977591081-0.764839532453j))*x_ref[0] + ((0.605001453971+0.946382368036j))*x_ref[1]**o + ((-0.572679303701+0.0982537589457j))*x_ref[1]
        arg[(2, 0, 3)]=(-0.835892141961-0.513174808944j)*x[0]**o + ((-0.100058999254+0.952448409546j))*x[0] + ((-0.663328070227+0.311011824012j))*x[1]**o + ((0.843525079776-0.457065555228j))*x[1]
        ref[(2, 0, 3)]=(-0.835892141961-0.513174808944j)*x_ref[0]**o + ((-0.100058999254+0.952448409546j))*x_ref[0] + ((-0.663328070227+0.311011824012j))*x_ref[1]**o + ((0.843525079776-0.457065555228j))*x_ref[1]
        arg[(2, 1, 0)]=(-0.917458723439-0.415697548695j)*x[0]**o + ((0.95902759945-0.0473202425806j))*x[0] + ((-0.89851526603+0.972867466423j))*x[1]**o + ((0.906530389968+0.818709998446j))*x[1]
        ref[(2, 1, 0)]=(-0.917458723439-0.415697548695j)*x_ref[0]**o + ((0.95902759945-0.0473202425806j))*x_ref[0] + ((-0.89851526603+0.972867466423j))*x_ref[1]**o + ((0.906530389968+0.818709998446j))*x_ref[1]
        arg[(2, 1, 1)]=(-0.418149361233+0.961793786806j)*x[0]**o + ((-0.680216245227-0.471904896862j))*x[0] + ((-0.421840285633+0.0747110068092j))*x[1]**o + ((0.758264205124+0.0290885633801j))*x[1]
        ref[(2, 1, 1)]=(-0.418149361233+0.961793786806j)*x_ref[0]**o + ((-0.680216245227-0.471904896862j))*x_ref[0] + ((-0.421840285633+0.0747110068092j))*x_ref[1]**o + ((0.758264205124+0.0290885633801j))*x_ref[1]
        arg[(2, 1, 2)]=(0.285664977511-0.404783046905j)*x[0]**o + ((0.607274109051+0.157496430834j))*x[0] + ((-0.78878613036+0.574773492559j))*x[1]**o + ((-0.414594112091-0.76372972904j))*x[1]
        ref[(2, 1, 2)]=(0.285664977511-0.404783046905j)*x_ref[0]**o + ((0.607274109051+0.157496430834j))*x_ref[0] + ((-0.78878613036+0.574773492559j))*x_ref[1]**o + ((-0.414594112091-0.76372972904j))*x_ref[1]
        arg[(2, 1, 3)]=(0.750951722162-0.434966372715j)*x[0]**o + ((-0.300118450543+0.841694900694j))*x[0] + ((0.24901037618-0.119355128937j))*x[1]**o + ((-0.0511544479816-0.697717051617j))*x[1]
        ref[(2, 1, 3)]=(0.750951722162-0.434966372715j)*x_ref[0]**o + ((-0.300118450543+0.841694900694j))*x_ref[0] + ((0.24901037618-0.119355128937j))*x_ref[1]**o + ((-0.0511544479816-0.697717051617j))*x_ref[1]
        arg[(2, 2, 0)]=(-0.960826758807+0.647021899697j)*x[0]**o + ((0.162672230849+0.757379855817j))*x[0] + ((0.157770417508-0.671091093747j))*x[1]**o + ((-0.680215240634+0.799744244119j))*x[1]
        ref[(2, 2, 0)]=(-0.960826758807+0.647021899697j)*x_ref[0]**o + ((0.162672230849+0.757379855817j))*x_ref[0] + ((0.157770417508-0.671091093747j))*x_ref[1]**o + ((-0.680215240634+0.799744244119j))*x_ref[1]
        arg[(2, 2, 1)]=(0.231961332903+0.837604513549j)*x[0]**o + ((-0.973317113468+0.0624427460043j))*x[0] + ((0.57678181385+0.548535125025j))*x[1]**o + ((-0.782668263085+0.815993421538j))*x[1]
        ref[(2, 2, 1)]=(0.231961332903+0.837604513549j)*x_ref[0]**o + ((-0.973317113468+0.0624427460043j))*x_ref[0] + ((0.57678181385+0.548535125025j))*x_ref[1]**o + ((-0.782668263085+0.815993421538j))*x_ref[1]
        arg[(2, 2, 2)]=(-0.555807703392-0.0995783868432j)*x[0]**o + ((-0.0672004850314+0.449208190541j))*x[0] + ((0.580397751189-0.583332056146j))*x[1]**o + ((0.529315134687+0.656220255969j))*x[1]
        ref[(2, 2, 2)]=(-0.555807703392-0.0995783868432j)*x_ref[0]**o + ((-0.0672004850314+0.449208190541j))*x_ref[0] + ((0.580397751189-0.583332056146j))*x_ref[1]**o + ((0.529315134687+0.656220255969j))*x_ref[1]
        arg[(2, 2, 3)]=(0.566188016492+0.664053036197j)*x[0]**o + ((0.585153974635-0.439602901812j))*x[0] + ((0.742155037561+0.993226457932j))*x[1]**o + ((0.2879467595-0.321233649115j))*x[1]
        ref[(2, 2, 3)]=(0.566188016492+0.664053036197j)*x_ref[0]**o + ((0.585153974635-0.439602901812j))*x_ref[0] + ((0.742155037561+0.993226457932j))*x_ref[1]**o + ((0.2879467595-0.321233649115j))*x_ref[1]
        arg[(3, 0, 0)]=(-0.703005064943+0.647862894418j)*x[0]**o + ((0.61261141105+0.429417645514j))*x[0] + ((0.615207529071-0.341511484457j))*x[1]**o + ((-0.018771410044+0.801236431161j))*x[1]
        ref[(3, 0, 0)]=(-0.703005064943+0.647862894418j)*x_ref[0]**o + ((0.61261141105+0.429417645514j))*x_ref[0] + ((0.615207529071-0.341511484457j))*x_ref[1]**o + ((-0.018771410044+0.801236431161j))*x_ref[1]
        arg[(3, 0, 1)]=(-0.911992210035-0.299113094019j)*x[0]**o + ((0.0303516193729+0.194276293334j))*x[0] + ((-0.9787554046-0.698442552301j))*x[1]**o + ((-0.486760260182-0.0692898131093j))*x[1]
        ref[(3, 0, 1)]=(-0.911992210035-0.299113094019j)*x_ref[0]**o + ((0.0303516193729+0.194276293334j))*x_ref[0] + ((-0.9787554046-0.698442552301j))*x_ref[1]**o + ((-0.486760260182-0.0692898131093j))*x_ref[1]
        arg[(3, 0, 2)]=(0.243001393101-0.310730121822j)*x[0]**o + ((-0.173045087182+0.549700711306j))*x[0] + ((-0.758988835387+0.594840621861j))*x[1]**o + ((-0.713553663973-0.671010061783j))*x[1]
        ref[(3, 0, 2)]=(0.243001393101-0.310730121822j)*x_ref[0]**o + ((-0.173045087182+0.549700711306j))*x_ref[0] + ((-0.758988835387+0.594840621861j))*x_ref[1]**o + ((-0.713553663973-0.671010061783j))*x_ref[1]
        arg[(3, 0, 3)]=(-0.524471237514+0.879469413257j)*x[0]**o + ((-0.828823366401-0.3838956179j))*x[0] + ((-0.206244895661-0.549593825527j))*x[1]**o + ((0.695782174273+0.21322340813j))*x[1]
        ref[(3, 0, 3)]=(-0.524471237514+0.879469413257j)*x_ref[0]**o + ((-0.828823366401-0.3838956179j))*x_ref[0] + ((-0.206244895661-0.549593825527j))*x_ref[1]**o + ((0.695782174273+0.21322340813j))*x_ref[1]
        arg[(3, 1, 0)]=(-0.202272148696+0.0685980889476j)*x[0]**o + ((0.579990778523+0.403117974257j))*x[0] + ((-0.293161989933+0.427678142333j))*x[1]**o + ((0.536542180268-0.590435008615j))*x[1]
        ref[(3, 1, 0)]=(-0.202272148696+0.0685980889476j)*x_ref[0]**o + ((0.579990778523+0.403117974257j))*x_ref[0] + ((-0.293161989933+0.427678142333j))*x_ref[1]**o + ((0.536542180268-0.590435008615j))*x_ref[1]
        arg[(3, 1, 1)]=(-0.943050455775-0.241335675104j)*x[0]**o + ((-0.8451048949+0.62834658312j))*x[0] + ((-0.618954648919-0.516323548466j))*x[1]**o + ((-0.629118678792+0.133969045059j))*x[1]
        ref[(3, 1, 1)]=(-0.943050455775-0.241335675104j)*x_ref[0]**o + ((-0.8451048949+0.62834658312j))*x_ref[0] + ((-0.618954648919-0.516323548466j))*x_ref[1]**o + ((-0.629118678792+0.133969045059j))*x_ref[1]
        arg[(3, 1, 2)]=(-0.705721628275-0.25614849338j)*x[0]**o + ((0.602978339544+0.0955814207574j))*x[0] + ((-0.215492639331-0.135709608813j))*x[1]**o + ((0.749876663777+0.040828583398j))*x[1]
        ref[(3, 1, 2)]=(-0.705721628275-0.25614849338j)*x_ref[0]**o + ((0.602978339544+0.0955814207574j))*x_ref[0] + ((-0.215492639331-0.135709608813j))*x_ref[1]**o + ((0.749876663777+0.040828583398j))*x_ref[1]
        arg[(3, 1, 3)]=(0.432640908672+0.292570560871j)*x[0]**o + ((-0.590411965513+0.747216762216j))*x[0] + ((-0.984492875542+0.368171770239j))*x[1]**o + ((-0.208008045065-0.289885027581j))*x[1]
        ref[(3, 1, 3)]=(0.432640908672+0.292570560871j)*x_ref[0]**o + ((-0.590411965513+0.747216762216j))*x_ref[0] + ((-0.984492875542+0.368171770239j))*x_ref[1]**o + ((-0.208008045065-0.289885027581j))*x_ref[1]
        arg[(3, 2, 0)]=(0.97715440536+0.0730675412581j)*x[0]**o + ((-0.668494386119-0.716486657094j))*x[0] + ((-0.715250402993-0.197669761375j))*x[1]**o + ((0.146607555752-0.874279283916j))*x[1]
        ref[(3, 2, 0)]=(0.97715440536+0.0730675412581j)*x_ref[0]**o + ((-0.668494386119-0.716486657094j))*x_ref[0] + ((-0.715250402993-0.197669761375j))*x_ref[1]**o + ((0.146607555752-0.874279283916j))*x_ref[1]
        arg[(3, 2, 1)]=(-0.0320292824046-0.894396978918j)*x[0]**o + ((0.666012038996-0.782604813188j))*x[0] + ((0.212495262253+0.129025403181j))*x[1]**o + ((-0.239943374808-0.909008201613j))*x[1]
        ref[(3, 2, 1)]=(-0.0320292824046-0.894396978918j)*x_ref[0]**o + ((0.666012038996-0.782604813188j))*x_ref[0] + ((0.212495262253+0.129025403181j))*x_ref[1]**o + ((-0.239943374808-0.909008201613j))*x_ref[1]
        arg[(3, 2, 2)]=(0.142513301503-0.138608355956j)*x[0]**o + ((-0.4599653058-0.0584792344805j))*x[0] + ((0.0794133499838-0.563713900825j))*x[1]**o + ((-0.650505893482+0.990698118907j))*x[1]
        ref[(3, 2, 2)]=(0.142513301503-0.138608355956j)*x_ref[0]**o + ((-0.4599653058-0.0584792344805j))*x_ref[0] + ((0.0794133499838-0.563713900825j))*x_ref[1]**o + ((-0.650505893482+0.990698118907j))*x_ref[1]
        arg[(3, 2, 3)]=(0.82004056335+0.220851479281j)*x[0]**o + ((-0.999915875935-0.135800377927j))*x[0] + ((-0.172844877787+0.265185492401j))*x[1]**o + ((0.367471210768+0.786911177279j))*x[1]
        ref[(3, 2, 3)]=(0.82004056335+0.220851479281j)*x_ref[0]**o + ((-0.999915875935-0.135800377927j))*x_ref[0] + ((-0.172844877787+0.265185492401j))*x_ref[1]**o + ((0.367471210768+0.786911177279j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.363517965862-0.503880033245j)*x[2]**o + ((-0.588703984556+0.176122107212j))*x[2]
            ref[(0, 0, 0)]+=(-0.363517965862-0.503880033245j)*x_ref[2]**o + ((-0.588703984556+0.176122107212j))*x_ref[2]
            arg[(0, 0, 1)]+=(0.728519462577-0.474338294743j)*x[2]**o + ((0.543907293301-0.564886026436j))*x[2]
            ref[(0, 0, 1)]+=(0.728519462577-0.474338294743j)*x_ref[2]**o + ((0.543907293301-0.564886026436j))*x_ref[2]
            arg[(0, 0, 2)]+=(0.990014913962-0.378161325001j)*x[2]**o + ((0.632501715704+0.165824513339j))*x[2]
            ref[(0, 0, 2)]+=(0.990014913962-0.378161325001j)*x_ref[2]**o + ((0.632501715704+0.165824513339j))*x_ref[2]
            arg[(0, 0, 3)]+=(-0.801040945936-0.649819218206j)*x[2]**o + ((0.313346137564-0.182723001409j))*x[2]
            ref[(0, 0, 3)]+=(-0.801040945936-0.649819218206j)*x_ref[2]**o + ((0.313346137564-0.182723001409j))*x_ref[2]
            arg[(0, 1, 0)]+=(0.506115287372-0.620758725491j)*x[2]**o + ((0.203540959709+0.675515589938j))*x[2]
            ref[(0, 1, 0)]+=(0.506115287372-0.620758725491j)*x_ref[2]**o + ((0.203540959709+0.675515589938j))*x_ref[2]
            arg[(0, 1, 1)]+=(0.29380268692+0.845358175225j)*x[2]**o + ((0.93302581858+0.854429798006j))*x[2]
            ref[(0, 1, 1)]+=(0.29380268692+0.845358175225j)*x_ref[2]**o + ((0.93302581858+0.854429798006j))*x_ref[2]
            arg[(0, 1, 2)]+=(-0.327256992887+0.251923671207j)*x[2]**o + ((0.965188198412+0.80926292053j))*x[2]
            ref[(0, 1, 2)]+=(-0.327256992887+0.251923671207j)*x_ref[2]**o + ((0.965188198412+0.80926292053j))*x_ref[2]
            arg[(0, 1, 3)]+=(0.201350131494-0.833882456495j)*x[2]**o + ((0.453702931206-0.659194395395j))*x[2]
            ref[(0, 1, 3)]+=(0.201350131494-0.833882456495j)*x_ref[2]**o + ((0.453702931206-0.659194395395j))*x_ref[2]
            arg[(0, 2, 0)]+=(-0.141738393314+0.730851844247j)*x[2]**o + ((0.877333447582+0.675512605712j))*x[2]
            ref[(0, 2, 0)]+=(-0.141738393314+0.730851844247j)*x_ref[2]**o + ((0.877333447582+0.675512605712j))*x_ref[2]
            arg[(0, 2, 1)]+=(0.344956480459+0.50606005056j)*x[2]**o + ((0.713701978265+0.288641616323j))*x[2]
            ref[(0, 2, 1)]+=(0.344956480459+0.50606005056j)*x_ref[2]**o + ((0.713701978265+0.288641616323j))*x_ref[2]
            arg[(0, 2, 2)]+=(0.561332461085-0.258095360447j)*x[2]**o + ((0.779713782417-0.0469436302566j))*x[2]
            ref[(0, 2, 2)]+=(0.561332461085-0.258095360447j)*x_ref[2]**o + ((0.779713782417-0.0469436302566j))*x_ref[2]
            arg[(0, 2, 3)]+=(0.520773817405-0.658311600452j)*x[2]**o + ((0.618557497507-0.103243209357j))*x[2]
            ref[(0, 2, 3)]+=(0.520773817405-0.658311600452j)*x_ref[2]**o + ((0.618557497507-0.103243209357j))*x_ref[2]
            arg[(1, 0, 0)]+=(0.401277746335+0.84719314972j)*x[2]**o + ((-0.650205288711-0.0124646690295j))*x[2]
            ref[(1, 0, 0)]+=(0.401277746335+0.84719314972j)*x_ref[2]**o + ((-0.650205288711-0.0124646690295j))*x_ref[2]
            arg[(1, 0, 1)]+=(-0.0612928306798-0.26276357034j)*x[2]**o + ((-0.305052403691+0.856924048576j))*x[2]
            ref[(1, 0, 1)]+=(-0.0612928306798-0.26276357034j)*x_ref[2]**o + ((-0.305052403691+0.856924048576j))*x_ref[2]
            arg[(1, 0, 2)]+=(-0.330200463072+0.821990576436j)*x[2]**o + ((0.338245989633-0.853327837698j))*x[2]
            ref[(1, 0, 2)]+=(-0.330200463072+0.821990576436j)*x_ref[2]**o + ((0.338245989633-0.853327837698j))*x_ref[2]
            arg[(1, 0, 3)]+=(0.434973690758-0.929156691773j)*x[2]**o + ((0.284843662616+0.547876013501j))*x[2]
            ref[(1, 0, 3)]+=(0.434973690758-0.929156691773j)*x_ref[2]**o + ((0.284843662616+0.547876013501j))*x_ref[2]
            arg[(1, 1, 0)]+=(0.499859151878+0.0181485905011j)*x[2]**o + ((0.215901548364-0.469099079464j))*x[2]
            ref[(1, 1, 0)]+=(0.499859151878+0.0181485905011j)*x_ref[2]**o + ((0.215901548364-0.469099079464j))*x_ref[2]
            arg[(1, 1, 1)]+=(-0.385985821574-0.994300289538j)*x[2]**o + ((0.89881680075+0.559311221688j))*x[2]
            ref[(1, 1, 1)]+=(-0.385985821574-0.994300289538j)*x_ref[2]**o + ((0.89881680075+0.559311221688j))*x_ref[2]
            arg[(1, 1, 2)]+=(0.644563060082+0.948709750517j)*x[2]**o + ((-0.361850913569-0.0759400951993j))*x[2]
            ref[(1, 1, 2)]+=(0.644563060082+0.948709750517j)*x_ref[2]**o + ((-0.361850913569-0.0759400951993j))*x_ref[2]
            arg[(1, 1, 3)]+=(-0.0103141745223-0.409548137533j)*x[2]**o + ((0.873605822745-0.683572768386j))*x[2]
            ref[(1, 1, 3)]+=(-0.0103141745223-0.409548137533j)*x_ref[2]**o + ((0.873605822745-0.683572768386j))*x_ref[2]
            arg[(1, 2, 0)]+=(-0.145290875656+0.785780158727j)*x[2]**o + ((0.962289140694+0.235200047448j))*x[2]
            ref[(1, 2, 0)]+=(-0.145290875656+0.785780158727j)*x_ref[2]**o + ((0.962289140694+0.235200047448j))*x_ref[2]
            arg[(1, 2, 1)]+=(0.121658900464+0.310081953527j)*x[2]**o + ((-0.624015351179-0.562748618404j))*x[2]
            ref[(1, 2, 1)]+=(0.121658900464+0.310081953527j)*x_ref[2]**o + ((-0.624015351179-0.562748618404j))*x_ref[2]
            arg[(1, 2, 2)]+=(0.0927826507997-0.520444355626j)*x[2]**o + ((0.0694629730444+0.576196609808j))*x[2]
            ref[(1, 2, 2)]+=(0.0927826507997-0.520444355626j)*x_ref[2]**o + ((0.0694629730444+0.576196609808j))*x_ref[2]
            arg[(1, 2, 3)]+=(0.599677704437+0.201308533436j)*x[2]**o + ((-0.445811025212-0.426246548101j))*x[2]
            ref[(1, 2, 3)]+=(0.599677704437+0.201308533436j)*x_ref[2]**o + ((-0.445811025212-0.426246548101j))*x_ref[2]
            arg[(2, 0, 0)]+=(0.506709163198+0.500972719922j)*x[2]**o + ((0.972758017097-0.117652158747j))*x[2]
            ref[(2, 0, 0)]+=(0.506709163198+0.500972719922j)*x_ref[2]**o + ((0.972758017097-0.117652158747j))*x_ref[2]
            arg[(2, 0, 1)]+=(0.938384705848-0.244801808583j)*x[2]**o + ((-0.219925087122-0.0765578160614j))*x[2]
            ref[(2, 0, 1)]+=(0.938384705848-0.244801808583j)*x_ref[2]**o + ((-0.219925087122-0.0765578160614j))*x_ref[2]
            arg[(2, 0, 2)]+=(-0.273795340274+0.502659303209j)*x[2]**o + ((-0.092311307117+0.384483712154j))*x[2]
            ref[(2, 0, 2)]+=(-0.273795340274+0.502659303209j)*x_ref[2]**o + ((-0.092311307117+0.384483712154j))*x_ref[2]
            arg[(2, 0, 3)]+=(0.562351114354+0.177655611964j)*x[2]**o + ((-0.308344010442-0.383408983035j))*x[2]
            ref[(2, 0, 3)]+=(0.562351114354+0.177655611964j)*x_ref[2]**o + ((-0.308344010442-0.383408983035j))*x_ref[2]
            arg[(2, 1, 0)]+=(-0.150673852071+0.262345244569j)*x[2]**o + ((-0.473089872354+0.256356035285j))*x[2]
            ref[(2, 1, 0)]+=(-0.150673852071+0.262345244569j)*x_ref[2]**o + ((-0.473089872354+0.256356035285j))*x_ref[2]
            arg[(2, 1, 1)]+=(-0.346248524883-0.775750862842j)*x[2]**o + ((0.26685294591+0.477022746216j))*x[2]
            ref[(2, 1, 1)]+=(-0.346248524883-0.775750862842j)*x_ref[2]**o + ((0.26685294591+0.477022746216j))*x_ref[2]
            arg[(2, 1, 2)]+=(-0.130974046963+0.870566373033j)*x[2]**o + ((0.704564635522+0.414246062945j))*x[2]
            ref[(2, 1, 2)]+=(-0.130974046963+0.870566373033j)*x_ref[2]**o + ((0.704564635522+0.414246062945j))*x_ref[2]
            arg[(2, 1, 3)]+=(0.770245844358-0.70691849228j)*x[2]**o + ((-0.970020956875+0.808315901588j))*x[2]
            ref[(2, 1, 3)]+=(0.770245844358-0.70691849228j)*x_ref[2]**o + ((-0.970020956875+0.808315901588j))*x_ref[2]
            arg[(2, 2, 0)]+=(0.414848556542-0.868577877784j)*x[2]**o + ((0.635614529595+0.68329020886j))*x[2]
            ref[(2, 2, 0)]+=(0.414848556542-0.868577877784j)*x_ref[2]**o + ((0.635614529595+0.68329020886j))*x_ref[2]
            arg[(2, 2, 1)]+=(0.125071105887+0.831859248866j)*x[2]**o + ((0.661151621049+0.743626621471j))*x[2]
            ref[(2, 2, 1)]+=(0.125071105887+0.831859248866j)*x_ref[2]**o + ((0.661151621049+0.743626621471j))*x_ref[2]
            arg[(2, 2, 2)]+=(-0.0282266492791+0.787398514862j)*x[2]**o + ((-0.326310001863+0.470826456557j))*x[2]
            ref[(2, 2, 2)]+=(-0.0282266492791+0.787398514862j)*x_ref[2]**o + ((-0.326310001863+0.470826456557j))*x_ref[2]
            arg[(2, 2, 3)]+=(0.00448178822433+0.675120753242j)*x[2]**o + ((-0.191687089221+0.641740818207j))*x[2]
            ref[(2, 2, 3)]+=(0.00448178822433+0.675120753242j)*x_ref[2]**o + ((-0.191687089221+0.641740818207j))*x_ref[2]
            arg[(3, 0, 0)]+=(0.486674875617-0.660833752285j)*x[2]**o + ((-0.432500907335-0.512778489132j))*x[2]
            ref[(3, 0, 0)]+=(0.486674875617-0.660833752285j)*x_ref[2]**o + ((-0.432500907335-0.512778489132j))*x_ref[2]
            arg[(3, 0, 1)]+=(-0.542001632835+0.752930640567j)*x[2]**o + ((0.988723013514-0.652644696755j))*x[2]
            ref[(3, 0, 1)]+=(-0.542001632835+0.752930640567j)*x_ref[2]**o + ((0.988723013514-0.652644696755j))*x_ref[2]
            arg[(3, 0, 2)]+=(0.161361908694-0.60852863231j)*x[2]**o + ((0.359446313103-0.521524004329j))*x[2]
            ref[(3, 0, 2)]+=(0.161361908694-0.60852863231j)*x_ref[2]**o + ((0.359446313103-0.521524004329j))*x_ref[2]
            arg[(3, 0, 3)]+=(-0.181666985859-0.766431538621j)*x[2]**o + ((-0.757552773105-0.00635410769266j))*x[2]
            ref[(3, 0, 3)]+=(-0.181666985859-0.766431538621j)*x_ref[2]**o + ((-0.757552773105-0.00635410769266j))*x_ref[2]
            arg[(3, 1, 0)]+=(-0.892514526688+0.475400744762j)*x[2]**o + ((-0.243443169557+0.839476023345j))*x[2]
            ref[(3, 1, 0)]+=(-0.892514526688+0.475400744762j)*x_ref[2]**o + ((-0.243443169557+0.839476023345j))*x_ref[2]
            arg[(3, 1, 1)]+=(-0.159723518291-0.153707381434j)*x[2]**o + ((0.720390592794+0.738692885089j))*x[2]
            ref[(3, 1, 1)]+=(-0.159723518291-0.153707381434j)*x_ref[2]**o + ((0.720390592794+0.738692885089j))*x_ref[2]
            arg[(3, 1, 2)]+=(0.827433029121-0.934601905526j)*x[2]**o + ((-0.175225837127+0.063846509378j))*x[2]
            ref[(3, 1, 2)]+=(0.827433029121-0.934601905526j)*x_ref[2]**o + ((-0.175225837127+0.063846509378j))*x_ref[2]
            arg[(3, 1, 3)]+=(0.0372146563435+0.268020518191j)*x[2]**o + ((-0.580594190988+0.387939041704j))*x[2]
            ref[(3, 1, 3)]+=(0.0372146563435+0.268020518191j)*x_ref[2]**o + ((-0.580594190988+0.387939041704j))*x_ref[2]
            arg[(3, 2, 0)]+=(0.0175264109833+0.923957238757j)*x[2]**o + ((0.43251530824+0.780220072576j))*x[2]
            ref[(3, 2, 0)]+=(0.0175264109833+0.923957238757j)*x_ref[2]**o + ((0.43251530824+0.780220072576j))*x_ref[2]
            arg[(3, 2, 1)]+=(-0.429408618032-0.763127914348j)*x[2]**o + ((-0.305769703493+0.0278473081306j))*x[2]
            ref[(3, 2, 1)]+=(-0.429408618032-0.763127914348j)*x_ref[2]**o + ((-0.305769703493+0.0278473081306j))*x_ref[2]
            arg[(3, 2, 2)]+=(0.951210241502+0.117402602585j)*x[2]**o + ((-0.90112846813+0.349763205042j))*x[2]
            ref[(3, 2, 2)]+=(0.951210241502+0.117402602585j)*x_ref[2]**o + ((-0.90112846813+0.349763205042j))*x_ref[2]
            arg[(3, 2, 3)]+=(0.495656900465+0.964677113013j)*x[2]**o + ((-0.874370734659-0.191804547764j))*x[2]
            ref[(3, 2, 3)]+=(0.495656900465+0.964677113013j)*x_ref[2]**o + ((-0.874370734659-0.191804547764j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 3, 2),w)
        ref = Data(0,(2, 4, 3, 2),w_ref)
        arg[(0, 0, 0, 0)]=(-0.644123477877+0.0608688204549j)*x[0]**o + ((-0.179401253253-0.225263450917j))*x[0] + ((0.0747808036155+0.589657976182j))*x[1]**o + ((-0.555317844078+0.492457943486j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.644123477877+0.0608688204549j)*x_ref[0]**o + ((-0.179401253253-0.225263450917j))*x_ref[0] + ((0.0747808036155+0.589657976182j))*x_ref[1]**o + ((-0.555317844078+0.492457943486j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.0845071717346+0.675676171502j)*x[0]**o + ((0.862826816302+0.415738168719j))*x[0] + ((0.964080173425-0.329207005779j))*x[1]**o + ((0.800978048647-0.347430481383j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.0845071717346+0.675676171502j)*x_ref[0]**o + ((0.862826816302+0.415738168719j))*x_ref[0] + ((0.964080173425-0.329207005779j))*x_ref[1]**o + ((0.800978048647-0.347430481383j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.104218645501-0.87221097551j)*x[0]**o + ((-0.1585228613-0.969274951538j))*x[0] + ((-0.208043190023-0.987452422047j))*x[1]**o + ((0.401684009011+0.615397259108j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.104218645501-0.87221097551j)*x_ref[0]**o + ((-0.1585228613-0.969274951538j))*x_ref[0] + ((-0.208043190023-0.987452422047j))*x_ref[1]**o + ((0.401684009011+0.615397259108j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.876779582383+0.562218963356j)*x[0]**o + ((0.00190792654355-0.83463416087j))*x[0] + ((-0.929191882613+0.817750605604j))*x[1]**o + ((-0.140287373194+0.743227776747j))*x[1]
        ref[(0, 0, 1, 1)]=(0.876779582383+0.562218963356j)*x_ref[0]**o + ((0.00190792654355-0.83463416087j))*x_ref[0] + ((-0.929191882613+0.817750605604j))*x_ref[1]**o + ((-0.140287373194+0.743227776747j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(0.443884297835-0.469984334827j)*x[0]**o + ((0.936431195171-0.38724478288j))*x[0] + ((0.878254088142-0.580311646696j))*x[1]**o + ((0.233304834268+0.895211527656j))*x[1]
        ref[(0, 0, 2, 0)]=(0.443884297835-0.469984334827j)*x_ref[0]**o + ((0.936431195171-0.38724478288j))*x_ref[0] + ((0.878254088142-0.580311646696j))*x_ref[1]**o + ((0.233304834268+0.895211527656j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(-0.98464944487-0.80626284338j)*x[0]**o + ((0.63036972628-0.405224467279j))*x[0] + ((0.495765946063-0.11598599408j))*x[1]**o + ((0.731874735131+0.160360341367j))*x[1]
        ref[(0, 0, 2, 1)]=(-0.98464944487-0.80626284338j)*x_ref[0]**o + ((0.63036972628-0.405224467279j))*x_ref[0] + ((0.495765946063-0.11598599408j))*x_ref[1]**o + ((0.731874735131+0.160360341367j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.991374194546+0.705346392799j)*x[0]**o + ((0.601811979751+0.931127593453j))*x[0] + ((-0.127698091664+0.479644605867j))*x[1]**o + ((0.839108352875-0.822826466469j))*x[1]
        ref[(0, 1, 0, 0)]=(0.991374194546+0.705346392799j)*x_ref[0]**o + ((0.601811979751+0.931127593453j))*x_ref[0] + ((-0.127698091664+0.479644605867j))*x_ref[1]**o + ((0.839108352875-0.822826466469j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.509874535405+0.269333404521j)*x[0]**o + ((-0.816273189153-0.881335822604j))*x[0] + ((-0.984530515549-0.962593254376j))*x[1]**o + ((-0.00207843202236+0.990207396526j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.509874535405+0.269333404521j)*x_ref[0]**o + ((-0.816273189153-0.881335822604j))*x_ref[0] + ((-0.984530515549-0.962593254376j))*x_ref[1]**o + ((-0.00207843202236+0.990207396526j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.805942138674-0.70365194251j)*x[0]**o + ((0.483301248919-0.818279688726j))*x[0] + ((-0.550516723448+0.841138100732j))*x[1]**o + ((0.0224744865298-0.973375962018j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.805942138674-0.70365194251j)*x_ref[0]**o + ((0.483301248919-0.818279688726j))*x_ref[0] + ((-0.550516723448+0.841138100732j))*x_ref[1]**o + ((0.0224744865298-0.973375962018j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.407351034396-0.613997851964j)*x[0]**o + ((-0.515093429962+0.81060241045j))*x[0] + ((-0.94235475661+0.725291376114j))*x[1]**o + ((0.132156322035-0.0406179491871j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.407351034396-0.613997851964j)*x_ref[0]**o + ((-0.515093429962+0.81060241045j))*x_ref[0] + ((-0.94235475661+0.725291376114j))*x_ref[1]**o + ((0.132156322035-0.0406179491871j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(-0.0846091128832+0.00727961627364j)*x[0]**o + ((-0.77571266559+0.329186578106j))*x[0] + ((-0.31222323373+0.401645381042j))*x[1]**o + ((0.586315652873+0.29484481478j))*x[1]
        ref[(0, 1, 2, 0)]=(-0.0846091128832+0.00727961627364j)*x_ref[0]**o + ((-0.77571266559+0.329186578106j))*x_ref[0] + ((-0.31222323373+0.401645381042j))*x_ref[1]**o + ((0.586315652873+0.29484481478j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(0.807526925366+0.176772077642j)*x[0]**o + ((-0.124249563997-0.203840043555j))*x[0] + ((0.373231642428-0.926068575269j))*x[1]**o + ((0.811183569102-0.43599199156j))*x[1]
        ref[(0, 1, 2, 1)]=(0.807526925366+0.176772077642j)*x_ref[0]**o + ((-0.124249563997-0.203840043555j))*x_ref[0] + ((0.373231642428-0.926068575269j))*x_ref[1]**o + ((0.811183569102-0.43599199156j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.695060253845+0.222942878016j)*x[0]**o + ((0.392886177738+0.165493534403j))*x[0] + ((0.832513443542+0.731152513043j))*x[1]**o + ((0.702533385921+0.769843588937j))*x[1]
        ref[(0, 2, 0, 0)]=(0.695060253845+0.222942878016j)*x_ref[0]**o + ((0.392886177738+0.165493534403j))*x_ref[0] + ((0.832513443542+0.731152513043j))*x_ref[1]**o + ((0.702533385921+0.769843588937j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(0.594316185385+0.233996236897j)*x[0]**o + ((-0.773696476318-0.551859183454j))*x[0] + ((0.952927387533+0.733577961433j))*x[1]**o + ((-0.451948894969-0.832440157651j))*x[1]
        ref[(0, 2, 0, 1)]=(0.594316185385+0.233996236897j)*x_ref[0]**o + ((-0.773696476318-0.551859183454j))*x_ref[0] + ((0.952927387533+0.733577961433j))*x_ref[1]**o + ((-0.451948894969-0.832440157651j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.469255733011-0.130226066767j)*x[0]**o + ((-0.73559359757-0.281748866299j))*x[0] + ((0.947315519155+0.646878328514j))*x[1]**o + ((0.956049481699+0.664053066233j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.469255733011-0.130226066767j)*x_ref[0]**o + ((-0.73559359757-0.281748866299j))*x_ref[0] + ((0.947315519155+0.646878328514j))*x_ref[1]**o + ((0.956049481699+0.664053066233j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(0.405665122731+0.541374839659j)*x[0]**o + ((-0.180632013243+0.83519810275j))*x[0] + ((-0.046599836383+0.0450341928138j))*x[1]**o + ((0.742824745691-0.98120609467j))*x[1]
        ref[(0, 2, 1, 1)]=(0.405665122731+0.541374839659j)*x_ref[0]**o + ((-0.180632013243+0.83519810275j))*x_ref[0] + ((-0.046599836383+0.0450341928138j))*x_ref[1]**o + ((0.742824745691-0.98120609467j))*x_ref[1]
        arg[(0, 2, 2, 0)]=(0.797638953857+0.434233108879j)*x[0]**o + ((0.181350162744-0.446851083648j))*x[0] + ((0.301243230151-0.235468064458j))*x[1]**o + ((-0.888444636478+0.414325686465j))*x[1]
        ref[(0, 2, 2, 0)]=(0.797638953857+0.434233108879j)*x_ref[0]**o + ((0.181350162744-0.446851083648j))*x_ref[0] + ((0.301243230151-0.235468064458j))*x_ref[1]**o + ((-0.888444636478+0.414325686465j))*x_ref[1]
        arg[(0, 2, 2, 1)]=(0.351889447695-0.236307813912j)*x[0]**o + ((0.216301836598+0.280040750806j))*x[0] + ((0.869330904279-0.258682025326j))*x[1]**o + ((-0.807053627885-0.71946102318j))*x[1]
        ref[(0, 2, 2, 1)]=(0.351889447695-0.236307813912j)*x_ref[0]**o + ((0.216301836598+0.280040750806j))*x_ref[0] + ((0.869330904279-0.258682025326j))*x_ref[1]**o + ((-0.807053627885-0.71946102318j))*x_ref[1]
        arg[(0, 3, 0, 0)]=(0.271348455611-0.141582993975j)*x[0]**o + ((0.876182009972+0.89973717575j))*x[0] + ((0.365627079429-0.865145106053j))*x[1]**o + ((-0.0161112852385+0.989022993047j))*x[1]
        ref[(0, 3, 0, 0)]=(0.271348455611-0.141582993975j)*x_ref[0]**o + ((0.876182009972+0.89973717575j))*x_ref[0] + ((0.365627079429-0.865145106053j))*x_ref[1]**o + ((-0.0161112852385+0.989022993047j))*x_ref[1]
        arg[(0, 3, 0, 1)]=(0.758282939322+0.817418654639j)*x[0]**o + ((-0.803355260508-0.478768339807j))*x[0] + ((-0.734788433788+0.99366158892j))*x[1]**o + ((0.424664039959+0.476685568981j))*x[1]
        ref[(0, 3, 0, 1)]=(0.758282939322+0.817418654639j)*x_ref[0]**o + ((-0.803355260508-0.478768339807j))*x_ref[0] + ((-0.734788433788+0.99366158892j))*x_ref[1]**o + ((0.424664039959+0.476685568981j))*x_ref[1]
        arg[(0, 3, 1, 0)]=(0.773511551566-0.502050928502j)*x[0]**o + ((0.75341210355-0.51328730786j))*x[0] + ((0.0707676791602+0.915509240479j))*x[1]**o + ((0.482671726125+0.758791184059j))*x[1]
        ref[(0, 3, 1, 0)]=(0.773511551566-0.502050928502j)*x_ref[0]**o + ((0.75341210355-0.51328730786j))*x_ref[0] + ((0.0707676791602+0.915509240479j))*x_ref[1]**o + ((0.482671726125+0.758791184059j))*x_ref[1]
        arg[(0, 3, 1, 1)]=(0.814048444681-0.00336613351092j)*x[0]**o + ((0.223836827597+0.741187200597j))*x[0] + ((0.598777097358-0.27754705029j))*x[1]**o + ((-0.496417398456-0.90592961578j))*x[1]
        ref[(0, 3, 1, 1)]=(0.814048444681-0.00336613351092j)*x_ref[0]**o + ((0.223836827597+0.741187200597j))*x_ref[0] + ((0.598777097358-0.27754705029j))*x_ref[1]**o + ((-0.496417398456-0.90592961578j))*x_ref[1]
        arg[(0, 3, 2, 0)]=(0.260273840164+0.240894784916j)*x[0]**o + ((-0.636760148527-0.808275210286j))*x[0] + ((-0.652479302111+0.981032143947j))*x[1]**o + ((-0.390722529005-0.292772321639j))*x[1]
        ref[(0, 3, 2, 0)]=(0.260273840164+0.240894784916j)*x_ref[0]**o + ((-0.636760148527-0.808275210286j))*x_ref[0] + ((-0.652479302111+0.981032143947j))*x_ref[1]**o + ((-0.390722529005-0.292772321639j))*x_ref[1]
        arg[(0, 3, 2, 1)]=(0.827671639586-0.294998672046j)*x[0]**o + ((0.874487106674+0.402223521219j))*x[0] + ((-0.600106632414+0.103730009676j))*x[1]**o + ((0.505431354928+0.305951616596j))*x[1]
        ref[(0, 3, 2, 1)]=(0.827671639586-0.294998672046j)*x_ref[0]**o + ((0.874487106674+0.402223521219j))*x_ref[0] + ((-0.600106632414+0.103730009676j))*x_ref[1]**o + ((0.505431354928+0.305951616596j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.177896526017+0.16285152594j)*x[0]**o + ((-0.663505957967+0.570137148108j))*x[0] + ((-0.268243798839-0.565315504914j))*x[1]**o + ((0.58961168828+0.817017188219j))*x[1]
        ref[(1, 0, 0, 0)]=(0.177896526017+0.16285152594j)*x_ref[0]**o + ((-0.663505957967+0.570137148108j))*x_ref[0] + ((-0.268243798839-0.565315504914j))*x_ref[1]**o + ((0.58961168828+0.817017188219j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.415366255782+0.0667089421275j)*x[0]**o + ((-0.261458877541-0.293822471862j))*x[0] + ((0.26412995968-0.773189977679j))*x[1]**o + ((-0.62786184962+0.589922630255j))*x[1]
        ref[(1, 0, 0, 1)]=(0.415366255782+0.0667089421275j)*x_ref[0]**o + ((-0.261458877541-0.293822471862j))*x_ref[0] + ((0.26412995968-0.773189977679j))*x_ref[1]**o + ((-0.62786184962+0.589922630255j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.12798324223+0.967400652606j)*x[0]**o + ((0.375343854274-0.405587974137j))*x[0] + ((-0.9098731405-0.415868023022j))*x[1]**o + ((0.891781823757+0.974469142462j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.12798324223+0.967400652606j)*x_ref[0]**o + ((0.375343854274-0.405587974137j))*x_ref[0] + ((-0.9098731405-0.415868023022j))*x_ref[1]**o + ((0.891781823757+0.974469142462j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.156198468907-0.808357007541j)*x[0]**o + ((-0.010831487083+0.478874741939j))*x[0] + ((-0.404505285535+0.602810852557j))*x[1]**o + ((0.755803544604+0.144152349297j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.156198468907-0.808357007541j)*x_ref[0]**o + ((-0.010831487083+0.478874741939j))*x_ref[0] + ((-0.404505285535+0.602810852557j))*x_ref[1]**o + ((0.755803544604+0.144152349297j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(-0.344438492318-0.236580930719j)*x[0]**o + ((0.13648812873+0.480053916466j))*x[0] + ((-0.775470232774+0.42370298035j))*x[1]**o + ((0.570859570391-0.726038509775j))*x[1]
        ref[(1, 0, 2, 0)]=(-0.344438492318-0.236580930719j)*x_ref[0]**o + ((0.13648812873+0.480053916466j))*x_ref[0] + ((-0.775470232774+0.42370298035j))*x_ref[1]**o + ((0.570859570391-0.726038509775j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(0.711938531089+0.475326484824j)*x[0]**o + ((-0.357574807713-0.908775017651j))*x[0] + ((0.195194392844-0.314065988029j))*x[1]**o + ((-0.060000743426+0.167833419569j))*x[1]
        ref[(1, 0, 2, 1)]=(0.711938531089+0.475326484824j)*x_ref[0]**o + ((-0.357574807713-0.908775017651j))*x_ref[0] + ((0.195194392844-0.314065988029j))*x_ref[1]**o + ((-0.060000743426+0.167833419569j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.910157230534+0.957709309634j)*x[0]**o + ((-0.327333996437+0.829700946848j))*x[0] + ((0.27921531971+0.142126339055j))*x[1]**o + ((-0.840535281348-0.85347586027j))*x[1]
        ref[(1, 1, 0, 0)]=(0.910157230534+0.957709309634j)*x_ref[0]**o + ((-0.327333996437+0.829700946848j))*x_ref[0] + ((0.27921531971+0.142126339055j))*x_ref[1]**o + ((-0.840535281348-0.85347586027j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.893507469453+0.0906644823733j)*x[0]**o + ((0.396900839459-0.189626930037j))*x[0] + ((0.785486088832+0.03363941272j))*x[1]**o + ((0.164516569302+0.331623315546j))*x[1]
        ref[(1, 1, 0, 1)]=(0.893507469453+0.0906644823733j)*x_ref[0]**o + ((0.396900839459-0.189626930037j))*x_ref[0] + ((0.785486088832+0.03363941272j))*x_ref[1]**o + ((0.164516569302+0.331623315546j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.0434115918077+0.615194493384j)*x[0]**o + ((-0.872181387866+0.346669561233j))*x[0] + ((0.272727551462+0.497693459749j))*x[1]**o + ((0.780358075227-0.531172247849j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.0434115918077+0.615194493384j)*x_ref[0]**o + ((-0.872181387866+0.346669561233j))*x_ref[0] + ((0.272727551462+0.497693459749j))*x_ref[1]**o + ((0.780358075227-0.531172247849j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.730215436415-0.0794540530848j)*x[0]**o + ((0.562702489484+0.564914311994j))*x[0] + ((-0.210413158328-0.323277363825j))*x[1]**o + ((-0.801153936061+0.611827316473j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.730215436415-0.0794540530848j)*x_ref[0]**o + ((0.562702489484+0.564914311994j))*x_ref[0] + ((-0.210413158328-0.323277363825j))*x_ref[1]**o + ((-0.801153936061+0.611827316473j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(0.442431106933+0.411294400425j)*x[0]**o + ((-0.299682025837+0.774040755914j))*x[0] + ((0.736827838282+0.44507018968j))*x[1]**o + ((0.762781101515+0.748069060946j))*x[1]
        ref[(1, 1, 2, 0)]=(0.442431106933+0.411294400425j)*x_ref[0]**o + ((-0.299682025837+0.774040755914j))*x_ref[0] + ((0.736827838282+0.44507018968j))*x_ref[1]**o + ((0.762781101515+0.748069060946j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(0.472836135658-0.345292395992j)*x[0]**o + ((0.515134179149+0.305236552218j))*x[0] + ((-0.54001213165+0.193334260661j))*x[1]**o + ((-0.594487674071-0.665941651862j))*x[1]
        ref[(1, 1, 2, 1)]=(0.472836135658-0.345292395992j)*x_ref[0]**o + ((0.515134179149+0.305236552218j))*x_ref[0] + ((-0.54001213165+0.193334260661j))*x_ref[1]**o + ((-0.594487674071-0.665941651862j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(-0.806015194479-0.792265488986j)*x[0]**o + ((0.840343300942+0.466966194932j))*x[0] + ((0.739771706831-0.416097231993j))*x[1]**o + ((-0.867372593695-0.934279191936j))*x[1]
        ref[(1, 2, 0, 0)]=(-0.806015194479-0.792265488986j)*x_ref[0]**o + ((0.840343300942+0.466966194932j))*x_ref[0] + ((0.739771706831-0.416097231993j))*x_ref[1]**o + ((-0.867372593695-0.934279191936j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(0.733234085605-0.31656061952j)*x[0]**o + ((-0.385463404775-0.695884579299j))*x[0] + ((-0.5771343714-0.0732122163233j))*x[1]**o + ((0.72370890036+0.539382667983j))*x[1]
        ref[(1, 2, 0, 1)]=(0.733234085605-0.31656061952j)*x_ref[0]**o + ((-0.385463404775-0.695884579299j))*x_ref[0] + ((-0.5771343714-0.0732122163233j))*x_ref[1]**o + ((0.72370890036+0.539382667983j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(0.328498086109-0.261638220916j)*x[0]**o + ((-0.196209798868+0.922015422761j))*x[0] + ((0.696767467335-0.0521728767706j))*x[1]**o + ((0.123050164122+0.564888731403j))*x[1]
        ref[(1, 2, 1, 0)]=(0.328498086109-0.261638220916j)*x_ref[0]**o + ((-0.196209798868+0.922015422761j))*x_ref[0] + ((0.696767467335-0.0521728767706j))*x_ref[1]**o + ((0.123050164122+0.564888731403j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.777589091963-0.730853491179j)*x[0]**o + ((0.946232661503+0.0568039920123j))*x[0] + ((0.562840730921-0.769685219174j))*x[1]**o + ((-0.764603347229+0.814737917885j))*x[1]
        ref[(1, 2, 1, 1)]=(0.777589091963-0.730853491179j)*x_ref[0]**o + ((0.946232661503+0.0568039920123j))*x_ref[0] + ((0.562840730921-0.769685219174j))*x_ref[1]**o + ((-0.764603347229+0.814737917885j))*x_ref[1]
        arg[(1, 2, 2, 0)]=(-0.707311188492-0.690650027815j)*x[0]**o + ((-0.637169093645+0.00297643995807j))*x[0] + ((0.0454729615656+0.254196762837j))*x[1]**o + ((0.347457760515+0.931266500431j))*x[1]
        ref[(1, 2, 2, 0)]=(-0.707311188492-0.690650027815j)*x_ref[0]**o + ((-0.637169093645+0.00297643995807j))*x_ref[0] + ((0.0454729615656+0.254196762837j))*x_ref[1]**o + ((0.347457760515+0.931266500431j))*x_ref[1]
        arg[(1, 2, 2, 1)]=(-0.388365011382+0.250198405217j)*x[0]**o + ((-0.57961413687-0.815915238169j))*x[0] + ((-0.509858225751-0.357970695601j))*x[1]**o + ((-0.575470945077+0.813393753002j))*x[1]
        ref[(1, 2, 2, 1)]=(-0.388365011382+0.250198405217j)*x_ref[0]**o + ((-0.57961413687-0.815915238169j))*x_ref[0] + ((-0.509858225751-0.357970695601j))*x_ref[1]**o + ((-0.575470945077+0.813393753002j))*x_ref[1]
        arg[(1, 3, 0, 0)]=(-0.624410447556-0.602633308928j)*x[0]**o + ((0.669170287454+0.979056248602j))*x[0] + ((0.940211882329+0.21976648088j))*x[1]**o + ((0.985413318299-0.115276717802j))*x[1]
        ref[(1, 3, 0, 0)]=(-0.624410447556-0.602633308928j)*x_ref[0]**o + ((0.669170287454+0.979056248602j))*x_ref[0] + ((0.940211882329+0.21976648088j))*x_ref[1]**o + ((0.985413318299-0.115276717802j))*x_ref[1]
        arg[(1, 3, 0, 1)]=(-0.532924868626+0.541295053249j)*x[0]**o + ((-0.0760822219208+0.88696772708j))*x[0] + ((-0.827857465315-0.160576837571j))*x[1]**o + ((-0.249203954802+0.218196956549j))*x[1]
        ref[(1, 3, 0, 1)]=(-0.532924868626+0.541295053249j)*x_ref[0]**o + ((-0.0760822219208+0.88696772708j))*x_ref[0] + ((-0.827857465315-0.160576837571j))*x_ref[1]**o + ((-0.249203954802+0.218196956549j))*x_ref[1]
        arg[(1, 3, 1, 0)]=(-0.0315959928789-0.849865587208j)*x[0]**o + ((-0.258375266734+0.304093554927j))*x[0] + ((0.483191751953+0.97598108832j))*x[1]**o + ((0.692184671402-0.17265607021j))*x[1]
        ref[(1, 3, 1, 0)]=(-0.0315959928789-0.849865587208j)*x_ref[0]**o + ((-0.258375266734+0.304093554927j))*x_ref[0] + ((0.483191751953+0.97598108832j))*x_ref[1]**o + ((0.692184671402-0.17265607021j))*x_ref[1]
        arg[(1, 3, 1, 1)]=(-0.555685165253+0.794770153525j)*x[0]**o + ((0.260902401217+0.742823099318j))*x[0] + ((0.579838559324-0.0773654366123j))*x[1]**o + ((0.274503852097+0.773949729754j))*x[1]
        ref[(1, 3, 1, 1)]=(-0.555685165253+0.794770153525j)*x_ref[0]**o + ((0.260902401217+0.742823099318j))*x_ref[0] + ((0.579838559324-0.0773654366123j))*x_ref[1]**o + ((0.274503852097+0.773949729754j))*x_ref[1]
        arg[(1, 3, 2, 0)]=(0.801258102323-0.601326199183j)*x[0]**o + ((0.227721441833-0.976695138858j))*x[0] + ((0.50519878772+0.184601677617j))*x[1]**o + ((0.382886431349+0.00299905525254j))*x[1]
        ref[(1, 3, 2, 0)]=(0.801258102323-0.601326199183j)*x_ref[0]**o + ((0.227721441833-0.976695138858j))*x_ref[0] + ((0.50519878772+0.184601677617j))*x_ref[1]**o + ((0.382886431349+0.00299905525254j))*x_ref[1]
        arg[(1, 3, 2, 1)]=(0.854576288572-0.239721755878j)*x[0]**o + ((-0.899663130071+0.206294149985j))*x[0] + ((-0.93972019538-0.399317320065j))*x[1]**o + ((-0.273338856687-0.811894684019j))*x[1]
        ref[(1, 3, 2, 1)]=(0.854576288572-0.239721755878j)*x_ref[0]**o + ((-0.899663130071+0.206294149985j))*x_ref[0] + ((-0.93972019538-0.399317320065j))*x_ref[1]**o + ((-0.273338856687-0.811894684019j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.451638681993-0.0223795464056j)*x[2]**o + ((-0.89311727934-0.777862850457j))*x[2]
            ref[(0, 0, 0, 0)]+=(-0.451638681993-0.0223795464056j)*x_ref[2]**o + ((-0.89311727934-0.777862850457j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.457140180831-0.261637063605j)*x[2]**o + ((-0.977997015851+0.195425385407j))*x[2]
            ref[(0, 0, 0, 1)]+=(0.457140180831-0.261637063605j)*x_ref[2]**o + ((-0.977997015851+0.195425385407j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.382450181833+0.126123661476j)*x[2]**o + ((0.521622239162-0.627606558058j))*x[2]
            ref[(0, 0, 1, 0)]+=(-0.382450181833+0.126123661476j)*x_ref[2]**o + ((0.521622239162-0.627606558058j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.242877523592-0.0917763984262j)*x[2]**o + ((-0.83206657695-0.530419316093j))*x[2]
            ref[(0, 0, 1, 1)]+=(-0.242877523592-0.0917763984262j)*x_ref[2]**o + ((-0.83206657695-0.530419316093j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(-0.951425910532-0.534690953826j)*x[2]**o + ((-0.561314408776-0.689322789728j))*x[2]
            ref[(0, 0, 2, 0)]+=(-0.951425910532-0.534690953826j)*x_ref[2]**o + ((-0.561314408776-0.689322789728j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(-0.516652776689-0.509261753763j)*x[2]**o + ((-0.347791197761-0.835698949775j))*x[2]
            ref[(0, 0, 2, 1)]+=(-0.516652776689-0.509261753763j)*x_ref[2]**o + ((-0.347791197761-0.835698949775j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.250420328449+0.26749481178j)*x[2]**o + ((-0.688606149132-0.684670946281j))*x[2]
            ref[(0, 1, 0, 0)]+=(-0.250420328449+0.26749481178j)*x_ref[2]**o + ((-0.688606149132-0.684670946281j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.280946251796+0.399185573056j)*x[2]**o + ((-0.51209857185+0.185784881742j))*x[2]
            ref[(0, 1, 0, 1)]+=(0.280946251796+0.399185573056j)*x_ref[2]**o + ((-0.51209857185+0.185784881742j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.927112010646+0.97740881354j)*x[2]**o + ((-0.51753093474+0.294894270844j))*x[2]
            ref[(0, 1, 1, 0)]+=(-0.927112010646+0.97740881354j)*x_ref[2]**o + ((-0.51753093474+0.294894270844j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.0377393694036+0.94117526284j)*x[2]**o + ((-0.995179743149+0.506243511361j))*x[2]
            ref[(0, 1, 1, 1)]+=(0.0377393694036+0.94117526284j)*x_ref[2]**o + ((-0.995179743149+0.506243511361j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(-0.765234397005+0.00938285704084j)*x[2]**o + ((0.104682827896-0.616954962914j))*x[2]
            ref[(0, 1, 2, 0)]+=(-0.765234397005+0.00938285704084j)*x_ref[2]**o + ((0.104682827896-0.616954962914j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(0.525622022373-0.0248479564643j)*x[2]**o + ((0.73278542092+0.837412705974j))*x[2]
            ref[(0, 1, 2, 1)]+=(0.525622022373-0.0248479564643j)*x_ref[2]**o + ((0.73278542092+0.837412705974j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(0.762528277992-0.80944631096j)*x[2]**o + ((-0.661275209861-0.247366346504j))*x[2]
            ref[(0, 2, 0, 0)]+=(0.762528277992-0.80944631096j)*x_ref[2]**o + ((-0.661275209861-0.247366346504j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(-0.591409504186+0.310973602356j)*x[2]**o + ((0.798046870411+0.534748717412j))*x[2]
            ref[(0, 2, 0, 1)]+=(-0.591409504186+0.310973602356j)*x_ref[2]**o + ((0.798046870411+0.534748717412j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.340418531548+0.599634151932j)*x[2]**o + ((-0.210108964792-0.406197879741j))*x[2]
            ref[(0, 2, 1, 0)]+=(-0.340418531548+0.599634151932j)*x_ref[2]**o + ((-0.210108964792-0.406197879741j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(0.609993619833-0.668444216222j)*x[2]**o + ((0.0911050167271-0.998460727087j))*x[2]
            ref[(0, 2, 1, 1)]+=(0.609993619833-0.668444216222j)*x_ref[2]**o + ((0.0911050167271-0.998460727087j))*x_ref[2]
            arg[(0, 2, 2, 0)]+=(0.166078749885+0.156277074163j)*x[2]**o + ((-0.360091690205-0.429826938476j))*x[2]
            ref[(0, 2, 2, 0)]+=(0.166078749885+0.156277074163j)*x_ref[2]**o + ((-0.360091690205-0.429826938476j))*x_ref[2]
            arg[(0, 2, 2, 1)]+=(0.809899217804+0.98238302372j)*x[2]**o + ((-0.166590586059-0.700894366393j))*x[2]
            ref[(0, 2, 2, 1)]+=(0.809899217804+0.98238302372j)*x_ref[2]**o + ((-0.166590586059-0.700894366393j))*x_ref[2]
            arg[(0, 3, 0, 0)]+=(-0.450627673748+0.471721292864j)*x[2]**o + ((0.334576638228+0.0130904599171j))*x[2]
            ref[(0, 3, 0, 0)]+=(-0.450627673748+0.471721292864j)*x_ref[2]**o + ((0.334576638228+0.0130904599171j))*x_ref[2]
            arg[(0, 3, 0, 1)]+=(0.272760947945-0.448854148658j)*x[2]**o + ((0.0736353176036+0.244325735025j))*x[2]
            ref[(0, 3, 0, 1)]+=(0.272760947945-0.448854148658j)*x_ref[2]**o + ((0.0736353176036+0.244325735025j))*x_ref[2]
            arg[(0, 3, 1, 0)]+=(0.0452699323397-0.200049582771j)*x[2]**o + ((-0.0224919789922+0.385924323907j))*x[2]
            ref[(0, 3, 1, 0)]+=(0.0452699323397-0.200049582771j)*x_ref[2]**o + ((-0.0224919789922+0.385924323907j))*x_ref[2]
            arg[(0, 3, 1, 1)]+=(0.862811539973-0.984915171895j)*x[2]**o + ((0.493630029738-0.887272425206j))*x[2]
            ref[(0, 3, 1, 1)]+=(0.862811539973-0.984915171895j)*x_ref[2]**o + ((0.493630029738-0.887272425206j))*x_ref[2]
            arg[(0, 3, 2, 0)]+=(-0.726417147786+0.118693931067j)*x[2]**o + ((-0.785914389641+0.763012352518j))*x[2]
            ref[(0, 3, 2, 0)]+=(-0.726417147786+0.118693931067j)*x_ref[2]**o + ((-0.785914389641+0.763012352518j))*x_ref[2]
            arg[(0, 3, 2, 1)]+=(0.832451643472+0.970732147639j)*x[2]**o + ((-0.635050118262+0.33790252316j))*x[2]
            ref[(0, 3, 2, 1)]+=(0.832451643472+0.970732147639j)*x_ref[2]**o + ((-0.635050118262+0.33790252316j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.737202518583-0.666103513481j)*x[2]**o + ((-0.722040886211+0.0313152420588j))*x[2]
            ref[(1, 0, 0, 0)]+=(0.737202518583-0.666103513481j)*x_ref[2]**o + ((-0.722040886211+0.0313152420588j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.139193618912+0.490961593492j)*x[2]**o + ((-0.850166002331+0.496334755985j))*x[2]
            ref[(1, 0, 0, 1)]+=(0.139193618912+0.490961593492j)*x_ref[2]**o + ((-0.850166002331+0.496334755985j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.344463514862-0.278943896236j)*x[2]**o + ((0.408762219624+0.8352182738j))*x[2]
            ref[(1, 0, 1, 0)]+=(0.344463514862-0.278943896236j)*x_ref[2]**o + ((0.408762219624+0.8352182738j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.176382710715-0.897369540654j)*x[2]**o + ((-0.312056277885-0.950366238809j))*x[2]
            ref[(1, 0, 1, 1)]+=(0.176382710715-0.897369540654j)*x_ref[2]**o + ((-0.312056277885-0.950366238809j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(0.529930494801-0.1372205418j)*x[2]**o + ((-0.395734868267+0.527117022694j))*x[2]
            ref[(1, 0, 2, 0)]+=(0.529930494801-0.1372205418j)*x_ref[2]**o + ((-0.395734868267+0.527117022694j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(0.0162540473575-0.0125216060196j)*x[2]**o + ((-0.29409666504+0.429460074031j))*x[2]
            ref[(1, 0, 2, 1)]+=(0.0162540473575-0.0125216060196j)*x_ref[2]**o + ((-0.29409666504+0.429460074031j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.3357001142-0.617404909703j)*x[2]**o + ((0.834879691034-0.232191837732j))*x[2]
            ref[(1, 1, 0, 0)]+=(0.3357001142-0.617404909703j)*x_ref[2]**o + ((0.834879691034-0.232191837732j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.128626849803+0.84670765251j)*x[2]**o + ((-0.573590962962-0.614729956425j))*x[2]
            ref[(1, 1, 0, 1)]+=(-0.128626849803+0.84670765251j)*x_ref[2]**o + ((-0.573590962962-0.614729956425j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.677425223634+0.0574851238555j)*x[2]**o + ((-0.408360911722+0.534343603017j))*x[2]
            ref[(1, 1, 1, 0)]+=(0.677425223634+0.0574851238555j)*x_ref[2]**o + ((-0.408360911722+0.534343603017j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.400913930667-0.822977479842j)*x[2]**o + ((0.875782366419-0.830042886985j))*x[2]
            ref[(1, 1, 1, 1)]+=(-0.400913930667-0.822977479842j)*x_ref[2]**o + ((0.875782366419-0.830042886985j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(-0.170948850062+0.617603565317j)*x[2]**o + ((-0.150912463527+0.584888524509j))*x[2]
            ref[(1, 1, 2, 0)]+=(-0.170948850062+0.617603565317j)*x_ref[2]**o + ((-0.150912463527+0.584888524509j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(-0.435216082044-0.357019236051j)*x[2]**o + ((0.637352980043-0.57848222817j))*x[2]
            ref[(1, 1, 2, 1)]+=(-0.435216082044-0.357019236051j)*x_ref[2]**o + ((0.637352980043-0.57848222817j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.727671346631-0.75494231493j)*x[2]**o + ((0.725781437667-0.605665195956j))*x[2]
            ref[(1, 2, 0, 0)]+=(0.727671346631-0.75494231493j)*x_ref[2]**o + ((0.725781437667-0.605665195956j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(-0.695443525664+0.201481435808j)*x[2]**o + ((-0.0171553934495+0.214293149689j))*x[2]
            ref[(1, 2, 0, 1)]+=(-0.695443525664+0.201481435808j)*x_ref[2]**o + ((-0.0171553934495+0.214293149689j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(-0.439194662066-0.504549405744j)*x[2]**o + ((-0.988628254212+0.166935943019j))*x[2]
            ref[(1, 2, 1, 0)]+=(-0.439194662066-0.504549405744j)*x_ref[2]**o + ((-0.988628254212+0.166935943019j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(0.477095053157+0.679947266334j)*x[2]**o + ((-0.0822070320794+0.60580419546j))*x[2]
            ref[(1, 2, 1, 1)]+=(0.477095053157+0.679947266334j)*x_ref[2]**o + ((-0.0822070320794+0.60580419546j))*x_ref[2]
            arg[(1, 2, 2, 0)]+=(-0.950761502829+0.3239829221j)*x[2]**o + ((0.0405136574224-0.95879912487j))*x[2]
            ref[(1, 2, 2, 0)]+=(-0.950761502829+0.3239829221j)*x_ref[2]**o + ((0.0405136574224-0.95879912487j))*x_ref[2]
            arg[(1, 2, 2, 1)]+=(0.720309464442+0.301126354656j)*x[2]**o + ((-0.744425691555-0.689439312254j))*x[2]
            ref[(1, 2, 2, 1)]+=(0.720309464442+0.301126354656j)*x_ref[2]**o + ((-0.744425691555-0.689439312254j))*x_ref[2]
            arg[(1, 3, 0, 0)]+=(-0.546398741359+0.265110563831j)*x[2]**o + ((-0.779474102935-0.721413238977j))*x[2]
            ref[(1, 3, 0, 0)]+=(-0.546398741359+0.265110563831j)*x_ref[2]**o + ((-0.779474102935-0.721413238977j))*x_ref[2]
            arg[(1, 3, 0, 1)]+=(0.152573985423-0.417447972902j)*x[2]**o + ((0.855946228028-0.531542724213j))*x[2]
            ref[(1, 3, 0, 1)]+=(0.152573985423-0.417447972902j)*x_ref[2]**o + ((0.855946228028-0.531542724213j))*x_ref[2]
            arg[(1, 3, 1, 0)]+=(-0.24254262696-0.343092571681j)*x[2]**o + ((0.729273632949+0.630309749393j))*x[2]
            ref[(1, 3, 1, 0)]+=(-0.24254262696-0.343092571681j)*x_ref[2]**o + ((0.729273632949+0.630309749393j))*x_ref[2]
            arg[(1, 3, 1, 1)]+=(-0.347217430949+0.336619581496j)*x[2]**o + ((0.226956604918+0.692291194063j))*x[2]
            ref[(1, 3, 1, 1)]+=(-0.347217430949+0.336619581496j)*x_ref[2]**o + ((0.226956604918+0.692291194063j))*x_ref[2]
            arg[(1, 3, 2, 0)]+=(-0.648097774431+0.00699509247675j)*x[2]**o + ((-0.797685627071-0.844702923154j))*x[2]
            ref[(1, 3, 2, 0)]+=(-0.648097774431+0.00699509247675j)*x_ref[2]**o + ((-0.797685627071-0.844702923154j))*x_ref[2]
            arg[(1, 3, 2, 1)]+=(0.42943659607+0.579955607591j)*x[2]**o + ((0.0665099138078+0.534723699396j))*x[2]
            ref[(1, 3, 2, 1)]+=(0.42943659607+0.579955607591j)*x_ref[2]**o + ((0.0665099138078+0.534723699396j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.481567518754-0.666348860481j)*x[0]**o + ((-0.486112158242-0.826087577058j))*x[0] + ((0.518885182537-0.0956098640677j))*x[1]**o + ((0.817509093632-0.053631067811j))*x[1]
        ref=(0.481567518754-0.666348860481j)*x_ref[0]**o + ((-0.486112158242-0.826087577058j))*x_ref[0] + ((0.518885182537-0.0956098640677j))*x_ref[1]**o + ((0.817509093632-0.053631067811j))*x_ref[1]
        if dim==3:
            arg+=((-0.199274562612-0.262821806409j))*x[2]**o + ((-0.47740168199+0.115905418197j))*x[2]
            ref+=((-0.199274562612-0.262821806409j))*x_ref[2]**o + ((-0.47740168199+0.115905418197j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=(0.217814587118+0.45151286531j)*x[0]**o + ((-0.075544217573+0.188385628414j))*x[0] + ((0.576685948498-0.687197503967j))*x[1]**o + ((-0.920598494307+0.527648704069j))*x[1]
        ref[(0,)]=(0.217814587118+0.45151286531j)*x_ref[0]**o + ((-0.075544217573+0.188385628414j))*x_ref[0] + ((0.576685948498-0.687197503967j))*x_ref[1]**o + ((-0.920598494307+0.527648704069j))*x_ref[1]
        arg[(1,)]=(-0.992932320755-0.879573127242j)*x[0]**o + ((-0.693851171229-0.919587191954j))*x[0] + ((0.337226164151-0.214857936459j))*x[1]**o + ((-0.721727295489-0.298977798185j))*x[1]
        ref[(1,)]=(-0.992932320755-0.879573127242j)*x_ref[0]**o + ((-0.693851171229-0.919587191954j))*x_ref[0] + ((0.337226164151-0.214857936459j))*x_ref[1]**o + ((-0.721727295489-0.298977798185j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.933315060836+0.912151032971j)*x[2]**o + ((0.287097121473-0.804518252342j))*x[2]
            ref[(0,)]+=(-0.933315060836+0.912151032971j)*x_ref[2]**o + ((0.287097121473-0.804518252342j))*x_ref[2]
            arg[(1,)]+=(0.059165865926+0.174892346267j)*x[2]**o + ((0.560802083537-0.0523244511601j))*x[2]
            ref[(1,)]+=(0.059165865926+0.174892346267j)*x_ref[2]**o + ((0.560802083537-0.0523244511601j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref = Data(0,(2, 2),w_ref)
        arg[(0, 0)]=(0.480076347512+0.103049683245j)*x[0]**o + ((0.192631671522+0.628213789888j))*x[0] + ((-0.108543882832-0.0280209277122j))*x[1]**o + ((-0.643864564326-0.942976269986j))*x[1]
        ref[(0, 0)]=(0.480076347512+0.103049683245j)*x_ref[0]**o + ((0.192631671522+0.628213789888j))*x_ref[0] + ((-0.108543882832-0.0280209277122j))*x_ref[1]**o + ((-0.643864564326-0.942976269986j))*x_ref[1]
        arg[(0, 1)]=(-0.220819537763-0.651555458812j)*x[0]**o + ((0.488010592629+0.0706154929941j))*x[0] + ((0.494348837495+0.941747477146j))*x[1]**o + ((-0.409552222855-0.186091133083j))*x[1]
        ref[(0, 1)]=(-0.220819537763-0.651555458812j)*x_ref[0]**o + ((0.488010592629+0.0706154929941j))*x_ref[0] + ((0.494348837495+0.941747477146j))*x_ref[1]**o + ((-0.409552222855-0.186091133083j))*x_ref[1]
        arg[(1, 0)]=(-0.213029268899-0.992172931852j)*x[0]**o + ((0.0478656692343+0.355827440687j))*x[0] + ((-0.951368916814+0.698284819082j))*x[1]**o + ((0.761151814634+0.548225564967j))*x[1]
        ref[(1, 0)]=(-0.213029268899-0.992172931852j)*x_ref[0]**o + ((0.0478656692343+0.355827440687j))*x_ref[0] + ((-0.951368916814+0.698284819082j))*x_ref[1]**o + ((0.761151814634+0.548225564967j))*x_ref[1]
        arg[(1, 1)]=(0.497587035096+0.943758407348j)*x[0]**o + ((-0.677285117096-0.845580308793j))*x[0] + ((-0.410923474223-0.520680784509j))*x[1]**o + ((-0.397808377098-0.687417248331j))*x[1]
        ref[(1, 1)]=(0.497587035096+0.943758407348j)*x_ref[0]**o + ((-0.677285117096-0.845580308793j))*x_ref[0] + ((-0.410923474223-0.520680784509j))*x_ref[1]**o + ((-0.397808377098-0.687417248331j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(-0.537405632616-0.464509940732j)*x[2]**o + ((0.995155229979+0.139845831561j))*x[2]
            ref[(0, 0)]+=(-0.537405632616-0.464509940732j)*x_ref[2]**o + ((0.995155229979+0.139845831561j))*x_ref[2]
            arg[(0, 1)]+=(0.517439423599-0.237928811494j)*x[2]**o + ((-0.361090962135+0.00990157167598j))*x[2]
            ref[(0, 1)]+=(0.517439423599-0.237928811494j)*x_ref[2]**o + ((-0.361090962135+0.00990157167598j))*x_ref[2]
            arg[(1, 0)]+=(-0.547692099488-0.607910541123j)*x[2]**o + ((0.935648176424+0.328123141637j))*x[2]
            ref[(1, 0)]+=(-0.547692099488-0.607910541123j)*x_ref[2]**o + ((0.935648176424+0.328123141637j))*x_ref[2]
            arg[(1, 1)]+=(0.380187009517-0.693898777917j)*x[2]**o + ((0.716430885645-0.662582287881j))*x[2]
            ref[(1, 1)]+=(0.380187009517-0.693898777917j)*x_ref[2]**o + ((0.716430885645-0.662582287881j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 2),w)
        ref = Data(0,(2, 2, 2),w_ref)
        arg[(0, 0, 0)]=(0.496528750963-0.687127481781j)*x[0]**o + ((0.943224231232-0.847895462981j))*x[0] + ((-0.552732806691-0.537752485613j))*x[1]**o + ((-0.359130136814+0.00271800260808j))*x[1]
        ref[(0, 0, 0)]=(0.496528750963-0.687127481781j)*x_ref[0]**o + ((0.943224231232-0.847895462981j))*x_ref[0] + ((-0.552732806691-0.537752485613j))*x_ref[1]**o + ((-0.359130136814+0.00271800260808j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.961656561274+0.463001689256j)*x[0]**o + ((0.460353824457-0.910938015902j))*x[0] + ((-0.487889957083-0.811303502146j))*x[1]**o + ((0.030894073547-0.72801323377j))*x[1]
        ref[(0, 0, 1)]=(-0.961656561274+0.463001689256j)*x_ref[0]**o + ((0.460353824457-0.910938015902j))*x_ref[0] + ((-0.487889957083-0.811303502146j))*x_ref[1]**o + ((0.030894073547-0.72801323377j))*x_ref[1]
        arg[(0, 1, 0)]=(0.340489933066+0.477708094626j)*x[0]**o + ((0.352872767213+0.300501775545j))*x[0] + ((-0.155888497807+0.00598631000325j))*x[1]**o + ((-0.385372299455+0.581744506419j))*x[1]
        ref[(0, 1, 0)]=(0.340489933066+0.477708094626j)*x_ref[0]**o + ((0.352872767213+0.300501775545j))*x_ref[0] + ((-0.155888497807+0.00598631000325j))*x_ref[1]**o + ((-0.385372299455+0.581744506419j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.28993130269+0.036857739371j)*x[0]**o + ((-0.273146789226-0.161499117997j))*x[0] + ((0.689016831346+0.729087601647j))*x[1]**o + ((-0.195453495241-0.746750998849j))*x[1]
        ref[(0, 1, 1)]=(-0.28993130269+0.036857739371j)*x_ref[0]**o + ((-0.273146789226-0.161499117997j))*x_ref[0] + ((0.689016831346+0.729087601647j))*x_ref[1]**o + ((-0.195453495241-0.746750998849j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.712558229506-0.825906097798j)*x[0]**o + ((-0.302978835663+0.245365084883j))*x[0] + ((-0.678448386146+0.441082456775j))*x[1]**o + ((-0.434175734882+0.0186846104569j))*x[1]
        ref[(1, 0, 0)]=(-0.712558229506-0.825906097798j)*x_ref[0]**o + ((-0.302978835663+0.245365084883j))*x_ref[0] + ((-0.678448386146+0.441082456775j))*x_ref[1]**o + ((-0.434175734882+0.0186846104569j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.172289415656-0.13575383443j)*x[0]**o + ((0.737653725525-0.722840995865j))*x[0] + ((-0.405241630525-0.398576787498j))*x[1]**o + ((0.135967194497-0.42468474682j))*x[1]
        ref[(1, 0, 1)]=(-0.172289415656-0.13575383443j)*x_ref[0]**o + ((0.737653725525-0.722840995865j))*x_ref[0] + ((-0.405241630525-0.398576787498j))*x_ref[1]**o + ((0.135967194497-0.42468474682j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.017856432854+0.788777912429j)*x[0]**o + ((-0.728836294302-0.894896302638j))*x[0] + ((0.24330796518-0.582132153151j))*x[1]**o + ((-0.140351457403-0.412435854694j))*x[1]
        ref[(1, 1, 0)]=(-0.017856432854+0.788777912429j)*x_ref[0]**o + ((-0.728836294302-0.894896302638j))*x_ref[0] + ((0.24330796518-0.582132153151j))*x_ref[1]**o + ((-0.140351457403-0.412435854694j))*x_ref[1]
        arg[(1, 1, 1)]=(0.303608483866-0.701727833873j)*x[0]**o + ((0.451232200232-0.975137739963j))*x[0] + ((-0.726282824206+0.587401503279j))*x[1]**o + ((0.584120202887+0.994629169422j))*x[1]
        ref[(1, 1, 1)]=(0.303608483866-0.701727833873j)*x_ref[0]**o + ((0.451232200232-0.975137739963j))*x_ref[0] + ((-0.726282824206+0.587401503279j))*x_ref[1]**o + ((0.584120202887+0.994629169422j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.462652677613-0.961382691204j)*x[2]**o + ((0.223127498969-0.612851641937j))*x[2]
            ref[(0, 0, 0)]+=(-0.462652677613-0.961382691204j)*x_ref[2]**o + ((0.223127498969-0.612851641937j))*x_ref[2]
            arg[(0, 0, 1)]+=(-0.874788259794+0.436350625354j)*x[2]**o + ((0.526545895523-0.938199072239j))*x[2]
            ref[(0, 0, 1)]+=(-0.874788259794+0.436350625354j)*x_ref[2]**o + ((0.526545895523-0.938199072239j))*x_ref[2]
            arg[(0, 1, 0)]+=(0.317546248478+0.775738186549j)*x[2]**o + ((-0.993432370522-0.191765307522j))*x[2]
            ref[(0, 1, 0)]+=(0.317546248478+0.775738186549j)*x_ref[2]**o + ((-0.993432370522-0.191765307522j))*x_ref[2]
            arg[(0, 1, 1)]+=(-0.549223241917+0.697021849104j)*x[2]**o + ((-0.0459201820855+0.289227051462j))*x[2]
            ref[(0, 1, 1)]+=(-0.549223241917+0.697021849104j)*x_ref[2]**o + ((-0.0459201820855+0.289227051462j))*x_ref[2]
            arg[(1, 0, 0)]+=(-0.296453429594-0.771031301212j)*x[2]**o + ((0.678516311454-0.674552525985j))*x[2]
            ref[(1, 0, 0)]+=(-0.296453429594-0.771031301212j)*x_ref[2]**o + ((0.678516311454-0.674552525985j))*x_ref[2]
            arg[(1, 0, 1)]+=(0.570282092139+0.0590335523947j)*x[2]**o + ((-0.876736068107-0.511317582346j))*x[2]
            ref[(1, 0, 1)]+=(0.570282092139+0.0590335523947j)*x_ref[2]**o + ((-0.876736068107-0.511317582346j))*x_ref[2]
            arg[(1, 1, 0)]+=(-0.00249675692396-0.404748647928j)*x[2]**o + ((-0.12851502305+0.0870264143735j))*x[2]
            ref[(1, 1, 0)]+=(-0.00249675692396-0.404748647928j)*x_ref[2]**o + ((-0.12851502305+0.0870264143735j))*x_ref[2]
            arg[(1, 1, 1)]+=(-0.268724927703+0.711890427808j)*x[2]**o + ((0.142853265745+0.719124506672j))*x[2]
            ref[(1, 1, 1)]+=(-0.268724927703+0.711890427808j)*x_ref[2]**o + ((0.142853265745+0.719124506672j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 3, 2),w)
        ref = Data(0,(3, 3, 3, 2),w_ref)
        arg[(0, 0, 0, 0)]=(0.782653866315+0.802461541325j)*x[0]**o + ((-0.565434741665+0.0679541975213j))*x[0] + ((0.855088077574-0.47100592463j))*x[1]**o + ((0.0569908290042-0.192795521487j))*x[1]
        ref[(0, 0, 0, 0)]=(0.782653866315+0.802461541325j)*x_ref[0]**o + ((-0.565434741665+0.0679541975213j))*x_ref[0] + ((0.855088077574-0.47100592463j))*x_ref[1]**o + ((0.0569908290042-0.192795521487j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.87953166534-0.507495443642j)*x[0]**o + ((-0.735361978397+0.165885309916j))*x[0] + ((-0.558837198454-0.343555638331j))*x[1]**o + ((0.970136568855-0.48166867918j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.87953166534-0.507495443642j)*x_ref[0]**o + ((-0.735361978397+0.165885309916j))*x_ref[0] + ((-0.558837198454-0.343555638331j))*x_ref[1]**o + ((0.970136568855-0.48166867918j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.301568023329-0.175516597417j)*x[0]**o + ((0.554657176105+0.9617102119j))*x[0] + ((-0.0734155082242-0.399286078985j))*x[1]**o + ((0.300115187192-0.300675250869j))*x[1]
        ref[(0, 0, 1, 0)]=(0.301568023329-0.175516597417j)*x_ref[0]**o + ((0.554657176105+0.9617102119j))*x_ref[0] + ((-0.0734155082242-0.399286078985j))*x_ref[1]**o + ((0.300115187192-0.300675250869j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.124111395325+0.829267225131j)*x[0]**o + ((-0.981925931658+0.00965434647981j))*x[0] + ((0.207859353604-0.657874932827j))*x[1]**o + ((0.738868651421+0.400019779818j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.124111395325+0.829267225131j)*x_ref[0]**o + ((-0.981925931658+0.00965434647981j))*x_ref[0] + ((0.207859353604-0.657874932827j))*x_ref[1]**o + ((0.738868651421+0.400019779818j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(-0.769940158363-0.086790343484j)*x[0]**o + ((-0.301942187893+0.0659652273942j))*x[0] + ((-0.179566968449+0.828971057251j))*x[1]**o + ((0.673514699108-0.11675419586j))*x[1]
        ref[(0, 0, 2, 0)]=(-0.769940158363-0.086790343484j)*x_ref[0]**o + ((-0.301942187893+0.0659652273942j))*x_ref[0] + ((-0.179566968449+0.828971057251j))*x_ref[1]**o + ((0.673514699108-0.11675419586j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(-0.957831947724-0.614452284509j)*x[0]**o + ((-0.327892506852+0.609953360077j))*x[0] + ((0.771909948645-0.261229062119j))*x[1]**o + ((0.281339528067-0.147820126179j))*x[1]
        ref[(0, 0, 2, 1)]=(-0.957831947724-0.614452284509j)*x_ref[0]**o + ((-0.327892506852+0.609953360077j))*x_ref[0] + ((0.771909948645-0.261229062119j))*x_ref[1]**o + ((0.281339528067-0.147820126179j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(-0.544700218916+0.866070511404j)*x[0]**o + ((0.326333348856+0.343579522069j))*x[0] + ((0.167914696095+0.319268426503j))*x[1]**o + ((0.466979933272+0.900287374969j))*x[1]
        ref[(0, 1, 0, 0)]=(-0.544700218916+0.866070511404j)*x_ref[0]**o + ((0.326333348856+0.343579522069j))*x_ref[0] + ((0.167914696095+0.319268426503j))*x_ref[1]**o + ((0.466979933272+0.900287374969j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.866039701621+0.554309146513j)*x[0]**o + ((0.32025934525+0.0308433132112j))*x[0] + ((0.835777701653+0.176074410514j))*x[1]**o + ((-0.983604081013+0.685895029288j))*x[1]
        ref[(0, 1, 0, 1)]=(0.866039701621+0.554309146513j)*x_ref[0]**o + ((0.32025934525+0.0308433132112j))*x_ref[0] + ((0.835777701653+0.176074410514j))*x_ref[1]**o + ((-0.983604081013+0.685895029288j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.535938702081+0.505606460579j)*x[0]**o + ((0.701017734897-0.233789627274j))*x[0] + ((0.760540220489+0.865658430614j))*x[1]**o + ((-0.374210327307+0.854926354524j))*x[1]
        ref[(0, 1, 1, 0)]=(0.535938702081+0.505606460579j)*x_ref[0]**o + ((0.701017734897-0.233789627274j))*x_ref[0] + ((0.760540220489+0.865658430614j))*x_ref[1]**o + ((-0.374210327307+0.854926354524j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.728945435717+0.0561180221486j)*x[0]**o + ((0.325324501145+0.225677729111j))*x[0] + ((-0.967021400028-0.117848998309j))*x[1]**o + ((-0.316432899976-0.553454403429j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.728945435717+0.0561180221486j)*x_ref[0]**o + ((0.325324501145+0.225677729111j))*x_ref[0] + ((-0.967021400028-0.117848998309j))*x_ref[1]**o + ((-0.316432899976-0.553454403429j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(0.5282570939-0.579372413845j)*x[0]**o + ((0.978761181003+0.804692905944j))*x[0] + ((-0.42916447231-0.402676670002j))*x[1]**o + ((-0.307352924312-0.0503798259165j))*x[1]
        ref[(0, 1, 2, 0)]=(0.5282570939-0.579372413845j)*x_ref[0]**o + ((0.978761181003+0.804692905944j))*x_ref[0] + ((-0.42916447231-0.402676670002j))*x_ref[1]**o + ((-0.307352924312-0.0503798259165j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(0.288338594266+0.952561323236j)*x[0]**o + ((-0.682486105887-0.0744381732108j))*x[0] + ((0.402101876072+0.107246416209j))*x[1]**o + ((0.956828728177+0.0189737430935j))*x[1]
        ref[(0, 1, 2, 1)]=(0.288338594266+0.952561323236j)*x_ref[0]**o + ((-0.682486105887-0.0744381732108j))*x_ref[0] + ((0.402101876072+0.107246416209j))*x_ref[1]**o + ((0.956828728177+0.0189737430935j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.00968261502967-0.737164748834j)*x[0]**o + ((-0.438734712508-0.567259047059j))*x[0] + ((-0.208323022449+0.644036182013j))*x[1]**o + ((-0.80741416164+0.499824045048j))*x[1]
        ref[(0, 2, 0, 0)]=(0.00968261502967-0.737164748834j)*x_ref[0]**o + ((-0.438734712508-0.567259047059j))*x_ref[0] + ((-0.208323022449+0.644036182013j))*x_ref[1]**o + ((-0.80741416164+0.499824045048j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(-0.780989070193-0.464857130718j)*x[0]**o + ((-0.893051520703-0.31153671019j))*x[0] + ((-0.432357314366+0.999288401944j))*x[1]**o + ((0.535656920927+0.738098195888j))*x[1]
        ref[(0, 2, 0, 1)]=(-0.780989070193-0.464857130718j)*x_ref[0]**o + ((-0.893051520703-0.31153671019j))*x_ref[0] + ((-0.432357314366+0.999288401944j))*x_ref[1]**o + ((0.535656920927+0.738098195888j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.727387509021+0.173375001999j)*x[0]**o + ((0.105066391253+0.618863135277j))*x[0] + ((-0.403350119506-0.106810456239j))*x[1]**o + ((-0.441690573604-0.655069788805j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.727387509021+0.173375001999j)*x_ref[0]**o + ((0.105066391253+0.618863135277j))*x_ref[0] + ((-0.403350119506-0.106810456239j))*x_ref[1]**o + ((-0.441690573604-0.655069788805j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(0.796434385436+0.256727875379j)*x[0]**o + ((0.940522490654-0.741091913528j))*x[0] + ((0.45499663364-0.272182499042j))*x[1]**o + ((-0.232168824858-0.510268060424j))*x[1]
        ref[(0, 2, 1, 1)]=(0.796434385436+0.256727875379j)*x_ref[0]**o + ((0.940522490654-0.741091913528j))*x_ref[0] + ((0.45499663364-0.272182499042j))*x_ref[1]**o + ((-0.232168824858-0.510268060424j))*x_ref[1]
        arg[(0, 2, 2, 0)]=(0.114426714208+0.692633767102j)*x[0]**o + ((-0.163339006607-0.358855168212j))*x[0] + ((-0.268583806776-0.363226808728j))*x[1]**o + ((0.703952182601-0.513517392326j))*x[1]
        ref[(0, 2, 2, 0)]=(0.114426714208+0.692633767102j)*x_ref[0]**o + ((-0.163339006607-0.358855168212j))*x_ref[0] + ((-0.268583806776-0.363226808728j))*x_ref[1]**o + ((0.703952182601-0.513517392326j))*x_ref[1]
        arg[(0, 2, 2, 1)]=(0.72461999427+0.655715336215j)*x[0]**o + ((-0.500681101826+0.842723157027j))*x[0] + ((0.556898969748-0.588660802134j))*x[1]**o + ((-0.0233938956563+0.237589382099j))*x[1]
        ref[(0, 2, 2, 1)]=(0.72461999427+0.655715336215j)*x_ref[0]**o + ((-0.500681101826+0.842723157027j))*x_ref[0] + ((0.556898969748-0.588660802134j))*x_ref[1]**o + ((-0.0233938956563+0.237589382099j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.336504553693-0.878691115084j)*x[0]**o + ((-0.838357236172-0.504028074723j))*x[0] + ((-0.135425183152+0.387255407799j))*x[1]**o + ((-0.850268566635+0.753777896148j))*x[1]
        ref[(1, 0, 0, 0)]=(0.336504553693-0.878691115084j)*x_ref[0]**o + ((-0.838357236172-0.504028074723j))*x_ref[0] + ((-0.135425183152+0.387255407799j))*x_ref[1]**o + ((-0.850268566635+0.753777896148j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.00292102525097+0.485550005076j)*x[0]**o + ((-0.892829363873-0.874691362864j))*x[0] + ((-0.208198424043+0.862804316451j))*x[1]**o + ((-0.910841790475-0.845650205439j))*x[1]
        ref[(1, 0, 0, 1)]=(0.00292102525097+0.485550005076j)*x_ref[0]**o + ((-0.892829363873-0.874691362864j))*x_ref[0] + ((-0.208198424043+0.862804316451j))*x_ref[1]**o + ((-0.910841790475-0.845650205439j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(0.0855821705136-0.547518231054j)*x[0]**o + ((0.0636577147602-0.825076992425j))*x[0] + ((-0.408801746191-0.497413089256j))*x[1]**o + ((0.392244788559-0.150607058965j))*x[1]
        ref[(1, 0, 1, 0)]=(0.0855821705136-0.547518231054j)*x_ref[0]**o + ((0.0636577147602-0.825076992425j))*x_ref[0] + ((-0.408801746191-0.497413089256j))*x_ref[1]**o + ((0.392244788559-0.150607058965j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.867911681239+0.962843047023j)*x[0]**o + ((-0.289536378564-0.799236945737j))*x[0] + ((-0.724452111513-0.940925842253j))*x[1]**o + ((0.204305021539-0.305878181618j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.867911681239+0.962843047023j)*x_ref[0]**o + ((-0.289536378564-0.799236945737j))*x_ref[0] + ((-0.724452111513-0.940925842253j))*x_ref[1]**o + ((0.204305021539-0.305878181618j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(-0.0266155075822-0.547940308731j)*x[0]**o + ((0.448306274911-0.516704863217j))*x[0] + ((0.422483089807+0.569719090157j))*x[1]**o + ((-0.62684159448+0.296157437813j))*x[1]
        ref[(1, 0, 2, 0)]=(-0.0266155075822-0.547940308731j)*x_ref[0]**o + ((0.448306274911-0.516704863217j))*x_ref[0] + ((0.422483089807+0.569719090157j))*x_ref[1]**o + ((-0.62684159448+0.296157437813j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(0.0762257161134+0.994414231657j)*x[0]**o + ((-0.790974466866+0.529140399519j))*x[0] + ((0.89538572186-0.58758589519j))*x[1]**o + ((0.192116928349+0.143425599644j))*x[1]
        ref[(1, 0, 2, 1)]=(0.0762257161134+0.994414231657j)*x_ref[0]**o + ((-0.790974466866+0.529140399519j))*x_ref[0] + ((0.89538572186-0.58758589519j))*x_ref[1]**o + ((0.192116928349+0.143425599644j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.357257594057-0.578856983926j)*x[0]**o + ((-0.873483978354+0.418068282226j))*x[0] + ((0.424031850744-0.127676773643j))*x[1]**o + ((0.304159361634+0.627139700346j))*x[1]
        ref[(1, 1, 0, 0)]=(0.357257594057-0.578856983926j)*x_ref[0]**o + ((-0.873483978354+0.418068282226j))*x_ref[0] + ((0.424031850744-0.127676773643j))*x_ref[1]**o + ((0.304159361634+0.627139700346j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.502770576746+0.459918855574j)*x[0]**o + ((0.830497831954-0.0106835885418j))*x[0] + ((0.553461865006-0.859246120887j))*x[1]**o + ((0.74935601954-0.723492250961j))*x[1]
        ref[(1, 1, 0, 1)]=(0.502770576746+0.459918855574j)*x_ref[0]**o + ((0.830497831954-0.0106835885418j))*x_ref[0] + ((0.553461865006-0.859246120887j))*x_ref[1]**o + ((0.74935601954-0.723492250961j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.430245878545-0.576048551873j)*x[0]**o + ((0.753436220466-0.462439125102j))*x[0] + ((0.200578886396-0.887855401323j))*x[1]**o + ((0.60989344782-0.42641409892j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.430245878545-0.576048551873j)*x_ref[0]**o + ((0.753436220466-0.462439125102j))*x_ref[0] + ((0.200578886396-0.887855401323j))*x_ref[1]**o + ((0.60989344782-0.42641409892j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.600771770204-0.565199116222j)*x[0]**o + ((-0.00324791804974+0.293565752031j))*x[0] + ((0.216691404732+0.367944394075j))*x[1]**o + ((0.428158112931+0.541927232838j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.600771770204-0.565199116222j)*x_ref[0]**o + ((-0.00324791804974+0.293565752031j))*x_ref[0] + ((0.216691404732+0.367944394075j))*x_ref[1]**o + ((0.428158112931+0.541927232838j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(-0.725322738258-0.00420540187405j)*x[0]**o + ((0.617934117613+0.494938020708j))*x[0] + ((0.876929621629-0.751636877162j))*x[1]**o + ((0.620924501496-0.241648138725j))*x[1]
        ref[(1, 1, 2, 0)]=(-0.725322738258-0.00420540187405j)*x_ref[0]**o + ((0.617934117613+0.494938020708j))*x_ref[0] + ((0.876929621629-0.751636877162j))*x_ref[1]**o + ((0.620924501496-0.241648138725j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(-0.318448127936-0.0446648437523j)*x[0]**o + ((0.515014370847-0.533961868648j))*x[0] + ((-0.992345597302-0.651910660207j))*x[1]**o + ((0.145261524466+0.888676856554j))*x[1]
        ref[(1, 1, 2, 1)]=(-0.318448127936-0.0446648437523j)*x_ref[0]**o + ((0.515014370847-0.533961868648j))*x_ref[0] + ((-0.992345597302-0.651910660207j))*x_ref[1]**o + ((0.145261524466+0.888676856554j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(0.549014375845-0.531169725821j)*x[0]**o + ((0.887815355316-0.419756917266j))*x[0] + ((0.398139659303-0.438239975839j))*x[1]**o + ((0.545071982339+0.633769951072j))*x[1]
        ref[(1, 2, 0, 0)]=(0.549014375845-0.531169725821j)*x_ref[0]**o + ((0.887815355316-0.419756917266j))*x_ref[0] + ((0.398139659303-0.438239975839j))*x_ref[1]**o + ((0.545071982339+0.633769951072j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.313512759004-0.905328021302j)*x[0]**o + ((-0.116360829106+0.00155808019573j))*x[0] + ((0.340342426374+0.295917535034j))*x[1]**o + ((0.313427534453-0.563028232693j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.313512759004-0.905328021302j)*x_ref[0]**o + ((-0.116360829106+0.00155808019573j))*x_ref[0] + ((0.340342426374+0.295917535034j))*x_ref[1]**o + ((0.313427534453-0.563028232693j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(0.397917190721-0.269968374677j)*x[0]**o + ((-0.0786517783292+0.0950860761964j))*x[0] + ((-0.0940757383756-0.201564758184j))*x[1]**o + ((-0.771367699023-0.572475581956j))*x[1]
        ref[(1, 2, 1, 0)]=(0.397917190721-0.269968374677j)*x_ref[0]**o + ((-0.0786517783292+0.0950860761964j))*x_ref[0] + ((-0.0940757383756-0.201564758184j))*x_ref[1]**o + ((-0.771367699023-0.572475581956j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.96536451958+0.561360862891j)*x[0]**o + ((-0.937837861123+0.394508847297j))*x[0] + ((-0.440230594075+0.834119529179j))*x[1]**o + ((-0.565493378549-0.569664247843j))*x[1]
        ref[(1, 2, 1, 1)]=(0.96536451958+0.561360862891j)*x_ref[0]**o + ((-0.937837861123+0.394508847297j))*x_ref[0] + ((-0.440230594075+0.834119529179j))*x_ref[1]**o + ((-0.565493378549-0.569664247843j))*x_ref[1]
        arg[(1, 2, 2, 0)]=(0.0189214516978+0.990858709989j)*x[0]**o + ((-0.281806820762-0.128922150459j))*x[0] + ((0.9914083505-0.51139662159j))*x[1]**o + ((0.215298658727+0.770289501263j))*x[1]
        ref[(1, 2, 2, 0)]=(0.0189214516978+0.990858709989j)*x_ref[0]**o + ((-0.281806820762-0.128922150459j))*x_ref[0] + ((0.9914083505-0.51139662159j))*x_ref[1]**o + ((0.215298658727+0.770289501263j))*x_ref[1]
        arg[(1, 2, 2, 1)]=(-0.837498810891-0.0523102247673j)*x[0]**o + ((-0.489654788074-0.707899250559j))*x[0] + ((-0.594716053614-0.201016744064j))*x[1]**o + ((0.302751642841-0.721273176701j))*x[1]
        ref[(1, 2, 2, 1)]=(-0.837498810891-0.0523102247673j)*x_ref[0]**o + ((-0.489654788074-0.707899250559j))*x_ref[0] + ((-0.594716053614-0.201016744064j))*x_ref[1]**o + ((0.302751642841-0.721273176701j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(0.670632303943-0.613098685221j)*x[0]**o + ((-0.22818491389-0.771717814324j))*x[0] + ((-0.50303562811-0.288835076225j))*x[1]**o + ((0.77548927345+0.532676513353j))*x[1]
        ref[(2, 0, 0, 0)]=(0.670632303943-0.613098685221j)*x_ref[0]**o + ((-0.22818491389-0.771717814324j))*x_ref[0] + ((-0.50303562811-0.288835076225j))*x_ref[1]**o + ((0.77548927345+0.532676513353j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(0.46683514709+0.979961041776j)*x[0]**o + ((0.757340784911+0.0760592578341j))*x[0] + ((-0.750072337737+0.839934374131j))*x[1]**o + ((0.0662620791138+0.504662238189j))*x[1]
        ref[(2, 0, 0, 1)]=(0.46683514709+0.979961041776j)*x_ref[0]**o + ((0.757340784911+0.0760592578341j))*x_ref[0] + ((-0.750072337737+0.839934374131j))*x_ref[1]**o + ((0.0662620791138+0.504662238189j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(-0.152347969807-0.147408778714j)*x[0]**o + ((-0.922734102883-0.559441544353j))*x[0] + ((0.520024710661-0.606076843898j))*x[1]**o + ((-0.0879473102494+0.952462945827j))*x[1]
        ref[(2, 0, 1, 0)]=(-0.152347969807-0.147408778714j)*x_ref[0]**o + ((-0.922734102883-0.559441544353j))*x_ref[0] + ((0.520024710661-0.606076843898j))*x_ref[1]**o + ((-0.0879473102494+0.952462945827j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.891331679303+0.783962309606j)*x[0]**o + ((0.260200915711-0.770134482376j))*x[0] + ((0.579389740142+0.147767945262j))*x[1]**o + ((0.00170189642353+0.119307603725j))*x[1]
        ref[(2, 0, 1, 1)]=(0.891331679303+0.783962309606j)*x_ref[0]**o + ((0.260200915711-0.770134482376j))*x_ref[0] + ((0.579389740142+0.147767945262j))*x_ref[1]**o + ((0.00170189642353+0.119307603725j))*x_ref[1]
        arg[(2, 0, 2, 0)]=(-0.858338844997-0.861313478782j)*x[0]**o + ((0.990717139796+0.468380843547j))*x[0] + ((0.822503312305+0.690949455336j))*x[1]**o + ((0.202918297391-0.218623615147j))*x[1]
        ref[(2, 0, 2, 0)]=(-0.858338844997-0.861313478782j)*x_ref[0]**o + ((0.990717139796+0.468380843547j))*x_ref[0] + ((0.822503312305+0.690949455336j))*x_ref[1]**o + ((0.202918297391-0.218623615147j))*x_ref[1]
        arg[(2, 0, 2, 1)]=(-0.533209923798-0.447232346461j)*x[0]**o + ((-0.883893902653-0.99054439545j))*x[0] + ((-0.659635978817-0.825298458288j))*x[1]**o + ((-0.0152997813664-0.575877717723j))*x[1]
        ref[(2, 0, 2, 1)]=(-0.533209923798-0.447232346461j)*x_ref[0]**o + ((-0.883893902653-0.99054439545j))*x_ref[0] + ((-0.659635978817-0.825298458288j))*x_ref[1]**o + ((-0.0152997813664-0.575877717723j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(-0.35214696082+0.0224033076598j)*x[0]**o + ((-0.977564387269-0.639245819194j))*x[0] + ((-0.827534000192+0.990908853552j))*x[1]**o + ((0.818498058335-0.73213535927j))*x[1]
        ref[(2, 1, 0, 0)]=(-0.35214696082+0.0224033076598j)*x_ref[0]**o + ((-0.977564387269-0.639245819194j))*x_ref[0] + ((-0.827534000192+0.990908853552j))*x_ref[1]**o + ((0.818498058335-0.73213535927j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(-0.22753310475-0.589478732526j)*x[0]**o + ((-0.778181261233-0.17908807084j))*x[0] + ((0.979999725106+0.678329233364j))*x[1]**o + ((0.370876461849+0.477460068945j))*x[1]
        ref[(2, 1, 0, 1)]=(-0.22753310475-0.589478732526j)*x_ref[0]**o + ((-0.778181261233-0.17908807084j))*x_ref[0] + ((0.979999725106+0.678329233364j))*x_ref[1]**o + ((0.370876461849+0.477460068945j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(-0.640499639273+0.258800065864j)*x[0]**o + ((-0.844613771204-0.557599539841j))*x[0] + ((0.257495259319-0.807631869506j))*x[1]**o + ((0.520624320345-0.351424870718j))*x[1]
        ref[(2, 1, 1, 0)]=(-0.640499639273+0.258800065864j)*x_ref[0]**o + ((-0.844613771204-0.557599539841j))*x_ref[0] + ((0.257495259319-0.807631869506j))*x_ref[1]**o + ((0.520624320345-0.351424870718j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(-0.123492578757-0.0823246488971j)*x[0]**o + ((-0.774554666588+0.158632306879j))*x[0] + ((0.973945864685-0.921375124186j))*x[1]**o + ((-0.132781750837-0.0921129266247j))*x[1]
        ref[(2, 1, 1, 1)]=(-0.123492578757-0.0823246488971j)*x_ref[0]**o + ((-0.774554666588+0.158632306879j))*x_ref[0] + ((0.973945864685-0.921375124186j))*x_ref[1]**o + ((-0.132781750837-0.0921129266247j))*x_ref[1]
        arg[(2, 1, 2, 0)]=(-0.4254254622-0.283088056849j)*x[0]**o + ((-0.72778036269+0.605328751125j))*x[0] + ((0.901144360974+0.397954485258j))*x[1]**o + ((-0.372963050466+0.147558941348j))*x[1]
        ref[(2, 1, 2, 0)]=(-0.4254254622-0.283088056849j)*x_ref[0]**o + ((-0.72778036269+0.605328751125j))*x_ref[0] + ((0.901144360974+0.397954485258j))*x_ref[1]**o + ((-0.372963050466+0.147558941348j))*x_ref[1]
        arg[(2, 1, 2, 1)]=(0.789057010554-0.682435045609j)*x[0]**o + ((-0.237609511358-0.943300973601j))*x[0] + ((0.0233587226282-0.657374728278j))*x[1]**o + ((-0.806730316681+0.148974707397j))*x[1]
        ref[(2, 1, 2, 1)]=(0.789057010554-0.682435045609j)*x_ref[0]**o + ((-0.237609511358-0.943300973601j))*x_ref[0] + ((0.0233587226282-0.657374728278j))*x_ref[1]**o + ((-0.806730316681+0.148974707397j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(0.473762618762-0.165603024211j)*x[0]**o + ((-0.610270623658+0.85334948677j))*x[0] + ((0.97359242005-0.539353404449j))*x[1]**o + ((0.240748324283+0.176800951008j))*x[1]
        ref[(2, 2, 0, 0)]=(0.473762618762-0.165603024211j)*x_ref[0]**o + ((-0.610270623658+0.85334948677j))*x_ref[0] + ((0.97359242005-0.539353404449j))*x_ref[1]**o + ((0.240748324283+0.176800951008j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(-0.687577929156-0.804643659235j)*x[0]**o + ((-0.373456934763+0.247774753025j))*x[0] + ((0.214802281873-0.857592690231j))*x[1]**o + ((-0.159312591794-0.659152551952j))*x[1]
        ref[(2, 2, 0, 1)]=(-0.687577929156-0.804643659235j)*x_ref[0]**o + ((-0.373456934763+0.247774753025j))*x_ref[0] + ((0.214802281873-0.857592690231j))*x_ref[1]**o + ((-0.159312591794-0.659152551952j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(0.518903068986+0.331374319006j)*x[0]**o + ((0.237747776103+0.900401192054j))*x[0] + ((0.0580199423257-0.706338167j))*x[1]**o + ((0.411717411986+0.890055648818j))*x[1]
        ref[(2, 2, 1, 0)]=(0.518903068986+0.331374319006j)*x_ref[0]**o + ((0.237747776103+0.900401192054j))*x_ref[0] + ((0.0580199423257-0.706338167j))*x_ref[1]**o + ((0.411717411986+0.890055648818j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(-0.473274240306-0.428100258466j)*x[0]**o + ((-0.195546004055+0.322594290442j))*x[0] + ((0.418040885053-0.480716165213j))*x[1]**o + ((0.770494153877-0.64579218225j))*x[1]
        ref[(2, 2, 1, 1)]=(-0.473274240306-0.428100258466j)*x_ref[0]**o + ((-0.195546004055+0.322594290442j))*x_ref[0] + ((0.418040885053-0.480716165213j))*x_ref[1]**o + ((0.770494153877-0.64579218225j))*x_ref[1]
        arg[(2, 2, 2, 0)]=(-0.652290920498+0.346102837083j)*x[0]**o + ((0.392567316676-0.0264184724083j))*x[0] + ((-0.611131571313-0.823708039889j))*x[1]**o + ((0.600990701055-0.649620660866j))*x[1]
        ref[(2, 2, 2, 0)]=(-0.652290920498+0.346102837083j)*x_ref[0]**o + ((0.392567316676-0.0264184724083j))*x_ref[0] + ((-0.611131571313-0.823708039889j))*x_ref[1]**o + ((0.600990701055-0.649620660866j))*x_ref[1]
        arg[(2, 2, 2, 1)]=(0.128641521759-0.497131147371j)*x[0]**o + ((-0.693003336576+0.974786847037j))*x[0] + ((0.459883518421+0.250982525393j))*x[1]**o + ((0.403928963546-0.651199590831j))*x[1]
        ref[(2, 2, 2, 1)]=(0.128641521759-0.497131147371j)*x_ref[0]**o + ((-0.693003336576+0.974786847037j))*x_ref[0] + ((0.459883518421+0.250982525393j))*x_ref[1]**o + ((0.403928963546-0.651199590831j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.65951372781-0.489828713063j)*x[2]**o + ((0.247084086789-0.0282775181289j))*x[2]
            ref[(0, 0, 0, 0)]+=(0.65951372781-0.489828713063j)*x_ref[2]**o + ((0.247084086789-0.0282775181289j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.471595809412+0.754409053897j)*x[2]**o + ((-0.108754371969-0.0470357460948j))*x[2]
            ref[(0, 0, 0, 1)]+=(-0.471595809412+0.754409053897j)*x_ref[2]**o + ((-0.108754371969-0.0470357460948j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.0556262260635+0.520176504223j)*x[2]**o + ((-0.366518407109-0.277149990455j))*x[2]
            ref[(0, 0, 1, 0)]+=(-0.0556262260635+0.520176504223j)*x_ref[2]**o + ((-0.366518407109-0.277149990455j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.647607737804+0.992315802361j)*x[2]**o + ((-0.0601740805355+0.150203296593j))*x[2]
            ref[(0, 0, 1, 1)]+=(-0.647607737804+0.992315802361j)*x_ref[2]**o + ((-0.0601740805355+0.150203296593j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(-0.759373849292+0.525511283321j)*x[2]**o + ((0.023060230996+0.792918048848j))*x[2]
            ref[(0, 0, 2, 0)]+=(-0.759373849292+0.525511283321j)*x_ref[2]**o + ((0.023060230996+0.792918048848j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(-0.752431544046+0.103030288265j)*x[2]**o + ((0.383027429869-0.207191062117j))*x[2]
            ref[(0, 0, 2, 1)]+=(-0.752431544046+0.103030288265j)*x_ref[2]**o + ((0.383027429869-0.207191062117j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.398500350194+0.498924397061j)*x[2]**o + ((-0.267710357534-0.316047942157j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.398500350194+0.498924397061j)*x_ref[2]**o + ((-0.267710357534-0.316047942157j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.506984308917+0.760045871405j)*x[2]**o + ((-0.0862536503082-0.288518475913j))*x[2]
            ref[(0, 1, 0, 1)]+=(0.506984308917+0.760045871405j)*x_ref[2]**o + ((-0.0862536503082-0.288518475913j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.516935703039+0.719788307726j)*x[2]**o + ((0.796023868531+0.5671750357j))*x[2]
            ref[(0, 1, 1, 0)]+=(-0.516935703039+0.719788307726j)*x_ref[2]**o + ((0.796023868531+0.5671750357j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.504555591598+0.420607514667j)*x[2]**o + ((0.391512404159-0.307567463045j))*x[2]
            ref[(0, 1, 1, 1)]+=(0.504555591598+0.420607514667j)*x_ref[2]**o + ((0.391512404159-0.307567463045j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(-0.897976119909-0.909266376351j)*x[2]**o + ((-0.791619324509+0.966231864701j))*x[2]
            ref[(0, 1, 2, 0)]+=(-0.897976119909-0.909266376351j)*x_ref[2]**o + ((-0.791619324509+0.966231864701j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(0.189859332772-0.404427320221j)*x[2]**o + ((0.368667189872-0.104435603748j))*x[2]
            ref[(0, 1, 2, 1)]+=(0.189859332772-0.404427320221j)*x_ref[2]**o + ((0.368667189872-0.104435603748j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(-0.18537699589-0.974924346874j)*x[2]**o + ((0.67870450448-0.481295363347j))*x[2]
            ref[(0, 2, 0, 0)]+=(-0.18537699589-0.974924346874j)*x_ref[2]**o + ((0.67870450448-0.481295363347j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(-0.264570891927-0.0317770761043j)*x[2]**o + ((-0.970801797941-0.174229491657j))*x[2]
            ref[(0, 2, 0, 1)]+=(-0.264570891927-0.0317770761043j)*x_ref[2]**o + ((-0.970801797941-0.174229491657j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.137811726199+0.772327979954j)*x[2]**o + ((0.122138691759+0.607551120558j))*x[2]
            ref[(0, 2, 1, 0)]+=(-0.137811726199+0.772327979954j)*x_ref[2]**o + ((0.122138691759+0.607551120558j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(0.517322026519+0.7396880609j)*x[2]**o + ((-0.219612177839+0.210889375382j))*x[2]
            ref[(0, 2, 1, 1)]+=(0.517322026519+0.7396880609j)*x_ref[2]**o + ((-0.219612177839+0.210889375382j))*x_ref[2]
            arg[(0, 2, 2, 0)]+=(-0.150636374113+0.264687470465j)*x[2]**o + ((-0.108945095455-0.108333491307j))*x[2]
            ref[(0, 2, 2, 0)]+=(-0.150636374113+0.264687470465j)*x_ref[2]**o + ((-0.108945095455-0.108333491307j))*x_ref[2]
            arg[(0, 2, 2, 1)]+=(0.449930676579-0.26385976226j)*x[2]**o + ((-0.916381682669+0.458772948827j))*x[2]
            ref[(0, 2, 2, 1)]+=(0.449930676579-0.26385976226j)*x_ref[2]**o + ((-0.916381682669+0.458772948827j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.40153975444+0.257654554506j)*x[2]**o + ((-0.530694366772+0.593680669169j))*x[2]
            ref[(1, 0, 0, 0)]+=(0.40153975444+0.257654554506j)*x_ref[2]**o + ((-0.530694366772+0.593680669169j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(-0.0552633734213+0.520857633944j)*x[2]**o + ((-0.319147605619-0.537466267893j))*x[2]
            ref[(1, 0, 0, 1)]+=(-0.0552633734213+0.520857633944j)*x_ref[2]**o + ((-0.319147605619-0.537466267893j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.184361079694-0.78786447717j)*x[2]**o + ((0.529226549568-0.883078544248j))*x[2]
            ref[(1, 0, 1, 0)]+=(-0.184361079694-0.78786447717j)*x_ref[2]**o + ((0.529226549568-0.883078544248j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.755523189727+0.807499167726j)*x[2]**o + ((0.39457517705-0.269137363001j))*x[2]
            ref[(1, 0, 1, 1)]+=(0.755523189727+0.807499167726j)*x_ref[2]**o + ((0.39457517705-0.269137363001j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(0.60091069507+0.727333019583j)*x[2]**o + ((-0.447451556542-0.82219726446j))*x[2]
            ref[(1, 0, 2, 0)]+=(0.60091069507+0.727333019583j)*x_ref[2]**o + ((-0.447451556542-0.82219726446j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(0.99382998814-0.942129203275j)*x[2]**o + ((0.49702556101-0.850945504163j))*x[2]
            ref[(1, 0, 2, 1)]+=(0.99382998814-0.942129203275j)*x_ref[2]**o + ((0.49702556101-0.850945504163j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.148577134272-0.0923161379281j)*x[2]**o + ((-0.638392103606+0.296293683246j))*x[2]
            ref[(1, 1, 0, 0)]+=(0.148577134272-0.0923161379281j)*x_ref[2]**o + ((-0.638392103606+0.296293683246j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.639044338474-0.0460698596674j)*x[2]**o + ((0.740654036971-0.434183590227j))*x[2]
            ref[(1, 1, 0, 1)]+=(0.639044338474-0.0460698596674j)*x_ref[2]**o + ((0.740654036971-0.434183590227j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.52384810363-0.766390197166j)*x[2]**o + ((-0.977525012054-0.0857812165641j))*x[2]
            ref[(1, 1, 1, 0)]+=(0.52384810363-0.766390197166j)*x_ref[2]**o + ((-0.977525012054-0.0857812165641j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.349136708829+0.236724580044j)*x[2]**o + ((0.169134182539-0.978317610438j))*x[2]
            ref[(1, 1, 1, 1)]+=(-0.349136708829+0.236724580044j)*x_ref[2]**o + ((0.169134182539-0.978317610438j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(-0.0540427110008+0.186137656845j)*x[2]**o + ((0.970973151526+0.0228803434771j))*x[2]
            ref[(1, 1, 2, 0)]+=(-0.0540427110008+0.186137656845j)*x_ref[2]**o + ((0.970973151526+0.0228803434771j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(0.824125578784-0.997244681432j)*x[2]**o + ((-0.723712697899+0.604854627912j))*x[2]
            ref[(1, 1, 2, 1)]+=(0.824125578784-0.997244681432j)*x_ref[2]**o + ((-0.723712697899+0.604854627912j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.263097377236+0.107839531857j)*x[2]**o + ((-0.0664843325364-0.919703361071j))*x[2]
            ref[(1, 2, 0, 0)]+=(0.263097377236+0.107839531857j)*x_ref[2]**o + ((-0.0664843325364-0.919703361071j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(0.282510298252+0.496666461069j)*x[2]**o + ((-0.129646091974+0.372353171998j))*x[2]
            ref[(1, 2, 0, 1)]+=(0.282510298252+0.496666461069j)*x_ref[2]**o + ((-0.129646091974+0.372353171998j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(-0.125136237347-0.67766262188j)*x[2]**o + ((-0.584909864337+0.36628654674j))*x[2]
            ref[(1, 2, 1, 0)]+=(-0.125136237347-0.67766262188j)*x_ref[2]**o + ((-0.584909864337+0.36628654674j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(-0.55595042103+0.441880449178j)*x[2]**o + ((0.0935870493938-0.981688427684j))*x[2]
            ref[(1, 2, 1, 1)]+=(-0.55595042103+0.441880449178j)*x_ref[2]**o + ((0.0935870493938-0.981688427684j))*x_ref[2]
            arg[(1, 2, 2, 0)]+=(0.0118119025528+0.861686872161j)*x[2]**o + ((0.157292370093+0.505574378395j))*x[2]
            ref[(1, 2, 2, 0)]+=(0.0118119025528+0.861686872161j)*x_ref[2]**o + ((0.157292370093+0.505574378395j))*x_ref[2]
            arg[(1, 2, 2, 1)]+=(-0.996526331878-0.919164814722j)*x[2]**o + ((0.181917098762+0.452804920097j))*x[2]
            ref[(1, 2, 2, 1)]+=(-0.996526331878-0.919164814722j)*x_ref[2]**o + ((0.181917098762+0.452804920097j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(0.0680271809231+0.66671081208j)*x[2]**o + ((-0.168250335315+0.191392850375j))*x[2]
            ref[(2, 0, 0, 0)]+=(0.0680271809231+0.66671081208j)*x_ref[2]**o + ((-0.168250335315+0.191392850375j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(-0.534061792147+0.127822547331j)*x[2]**o + ((0.94359004341+0.468470825652j))*x[2]
            ref[(2, 0, 0, 1)]+=(-0.534061792147+0.127822547331j)*x_ref[2]**o + ((0.94359004341+0.468470825652j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(-0.955844104655-0.117165794905j)*x[2]**o + ((-0.0359338723135+0.726040308666j))*x[2]
            ref[(2, 0, 1, 0)]+=(-0.955844104655-0.117165794905j)*x_ref[2]**o + ((-0.0359338723135+0.726040308666j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(-0.165575987416+0.874521741791j)*x[2]**o + ((-0.876673883262-0.143154947358j))*x[2]
            ref[(2, 0, 1, 1)]+=(-0.165575987416+0.874521741791j)*x_ref[2]**o + ((-0.876673883262-0.143154947358j))*x_ref[2]
            arg[(2, 0, 2, 0)]+=(-0.963076598466+0.0132843284215j)*x[2]**o + ((0.821480653951-0.553184778632j))*x[2]
            ref[(2, 0, 2, 0)]+=(-0.963076598466+0.0132843284215j)*x_ref[2]**o + ((0.821480653951-0.553184778632j))*x_ref[2]
            arg[(2, 0, 2, 1)]+=(0.468359395697-0.567853778505j)*x[2]**o + ((0.561420471981+0.101561859568j))*x[2]
            ref[(2, 0, 2, 1)]+=(0.468359395697-0.567853778505j)*x_ref[2]**o + ((0.561420471981+0.101561859568j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(0.428249410514-0.77343050087j)*x[2]**o + ((0.37987928735-0.662833183861j))*x[2]
            ref[(2, 1, 0, 0)]+=(0.428249410514-0.77343050087j)*x_ref[2]**o + ((0.37987928735-0.662833183861j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(-0.341840555537-0.346176364296j)*x[2]**o + ((-0.403986531062+0.805286910878j))*x[2]
            ref[(2, 1, 0, 1)]+=(-0.341840555537-0.346176364296j)*x_ref[2]**o + ((-0.403986531062+0.805286910878j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(0.40357425662+0.357365789203j)*x[2]**o + ((-0.236284436938+0.313266706137j))*x[2]
            ref[(2, 1, 1, 0)]+=(0.40357425662+0.357365789203j)*x_ref[2]**o + ((-0.236284436938+0.313266706137j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(-0.42058187268-0.411001058308j)*x[2]**o + ((0.821865188766-0.113058973758j))*x[2]
            ref[(2, 1, 1, 1)]+=(-0.42058187268-0.411001058308j)*x_ref[2]**o + ((0.821865188766-0.113058973758j))*x_ref[2]
            arg[(2, 1, 2, 0)]+=(-0.283289073081+0.0452603387343j)*x[2]**o + ((-0.0747954603814-0.246291612848j))*x[2]
            ref[(2, 1, 2, 0)]+=(-0.283289073081+0.0452603387343j)*x_ref[2]**o + ((-0.0747954603814-0.246291612848j))*x_ref[2]
            arg[(2, 1, 2, 1)]+=(0.0781864491586-0.499941484631j)*x[2]**o + ((0.977299571856-0.0766514729035j))*x[2]
            ref[(2, 1, 2, 1)]+=(0.0781864491586-0.499941484631j)*x_ref[2]**o + ((0.977299571856-0.0766514729035j))*x_ref[2]
            arg[(2, 2, 0, 0)]+=(0.909204483252+0.736554396695j)*x[2]**o + ((0.251470676285+0.756561648847j))*x[2]
            ref[(2, 2, 0, 0)]+=(0.909204483252+0.736554396695j)*x_ref[2]**o + ((0.251470676285+0.756561648847j))*x_ref[2]
            arg[(2, 2, 0, 1)]+=(0.221036536322+0.679660207503j)*x[2]**o + ((0.499461673776-0.555732981117j))*x[2]
            ref[(2, 2, 0, 1)]+=(0.221036536322+0.679660207503j)*x_ref[2]**o + ((0.499461673776-0.555732981117j))*x_ref[2]
            arg[(2, 2, 1, 0)]+=(-0.579643434941+0.496905181104j)*x[2]**o + ((-0.213416929607+0.750511606144j))*x[2]
            ref[(2, 2, 1, 0)]+=(-0.579643434941+0.496905181104j)*x_ref[2]**o + ((-0.213416929607+0.750511606144j))*x_ref[2]
            arg[(2, 2, 1, 1)]+=(0.175183539815+0.193043882757j)*x[2]**o + ((0.834036881509-0.0113423533545j))*x[2]
            ref[(2, 2, 1, 1)]+=(0.175183539815+0.193043882757j)*x_ref[2]**o + ((0.834036881509-0.0113423533545j))*x_ref[2]
            arg[(2, 2, 2, 0)]+=(-0.191029648484-0.575420120666j)*x[2]**o + ((0.759609062314+0.244881181781j))*x[2]
            ref[(2, 2, 2, 0)]+=(-0.191029648484-0.575420120666j)*x_ref[2]**o + ((0.759609062314+0.244881181781j))*x_ref[2]
            arg[(2, 2, 2, 1)]+=(-0.668809634783+0.776440701303j)*x[2]**o + ((-0.657676193915+0.124126411939j))*x[2]
            ref[(2, 2, 2, 1)]+=(-0.668809634783+0.776440701303j)*x_ref[2]**o + ((-0.657676193915+0.124126411939j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ReducedSolution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.276788116886-0.916008699501j)*x[0] + ((-0.511011502141+0.0935316671727j))*x[1]
        ref=(0.276788116886-0.916008699501j)*x_ref[0] + ((-0.511011502141+0.0935316671727j))*x_ref[1]
        if dim==3:
            arg+=((0.924475417998+0.164628558327j))*x[2]
            ref+=((0.924475417998+0.164628558327j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ReducedSolution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=(0.400041234683-0.566912434483j)*x[0] + ((-0.127916994502+0.809874932187j))*x[1]
        ref[(0,)]=(0.400041234683-0.566912434483j)*x_ref[0] + ((-0.127916994502+0.809874932187j))*x_ref[1]
        arg[(1,)]=(0.143065674676+0.192138174765j)*x[0] + ((-0.811717586622-0.43176498046j))*x[1]
        ref[(1,)]=(0.143065674676+0.192138174765j)*x_ref[0] + ((-0.811717586622-0.43176498046j))*x_ref[1]
        arg[(2,)]=(0.37191906992-0.758121992576j)*x[0] + ((-0.208130336067+0.518441517954j))*x[1]
        ref[(2,)]=(0.37191906992-0.758121992576j)*x_ref[0] + ((-0.208130336067+0.518441517954j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.532407558618+0.896706647495j)*x[2]
            ref[(0,)]+=(0.532407558618+0.896706647495j)*x_ref[2]
            arg[(1,)]+=(-0.823537403763+0.772735578063j)*x[2]
            ref[(1,)]+=(-0.823537403763+0.772735578063j)*x_ref[2]
            arg[(2,)]+=(-0.766956374096-0.0290016618175j)*x[2]
            ref[(2,)]+=(-0.766956374096-0.0290016618175j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ReducedSolution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref = Data(0,(2, 4),w_ref)
        arg[(0, 0)]=(-0.811038244296+0.273340585585j)*x[0] + ((-0.534689443607+0.60200700471j))*x[1]
        ref[(0, 0)]=(-0.811038244296+0.273340585585j)*x_ref[0] + ((-0.534689443607+0.60200700471j))*x_ref[1]
        arg[(0, 1)]=(0.927687463747-0.497469851741j)*x[0] + ((0.833943132579+0.164365583777j))*x[1]
        ref[(0, 1)]=(0.927687463747-0.497469851741j)*x_ref[0] + ((0.833943132579+0.164365583777j))*x_ref[1]
        arg[(0, 2)]=(0.383729662149-0.562366770182j)*x[0] + ((-0.552584721337+0.0847304557927j))*x[1]
        ref[(0, 2)]=(0.383729662149-0.562366770182j)*x_ref[0] + ((-0.552584721337+0.0847304557927j))*x_ref[1]
        arg[(0, 3)]=(-0.804204213021-0.593551013718j)*x[0] + ((0.146748290157+0.809999775082j))*x[1]
        ref[(0, 3)]=(-0.804204213021-0.593551013718j)*x_ref[0] + ((0.146748290157+0.809999775082j))*x_ref[1]
        arg[(1, 0)]=(0.722277894048-0.8011229921j)*x[0] + ((-0.986019804104-0.385838051098j))*x[1]
        ref[(1, 0)]=(0.722277894048-0.8011229921j)*x_ref[0] + ((-0.986019804104-0.385838051098j))*x_ref[1]
        arg[(1, 1)]=(0.0175146574346-0.654745776855j)*x[0] + ((0.784210209382+0.323806394417j))*x[1]
        ref[(1, 1)]=(0.0175146574346-0.654745776855j)*x_ref[0] + ((0.784210209382+0.323806394417j))*x_ref[1]
        arg[(1, 2)]=(-0.573743676867-0.770972941221j)*x[0] + ((-0.672078290552-0.885067743292j))*x[1]
        ref[(1, 2)]=(-0.573743676867-0.770972941221j)*x_ref[0] + ((-0.672078290552-0.885067743292j))*x_ref[1]
        arg[(1, 3)]=(-0.282359439587-0.67399986943j)*x[0] + ((-0.293142782773-0.815348510483j))*x[1]
        ref[(1, 3)]=(-0.282359439587-0.67399986943j)*x_ref[0] + ((-0.293142782773-0.815348510483j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(-0.156852897129-0.523884284923j)*x[2]
            ref[(0, 0)]+=(-0.156852897129-0.523884284923j)*x_ref[2]
            arg[(0, 1)]+=(0.745897787046-0.291765775477j)*x[2]
            ref[(0, 1)]+=(0.745897787046-0.291765775477j)*x_ref[2]
            arg[(0, 2)]+=(0.665575171811+0.116671273587j)*x[2]
            ref[(0, 2)]+=(0.665575171811+0.116671273587j)*x_ref[2]
            arg[(0, 3)]+=(0.605641035302+0.947591202909j)*x[2]
            ref[(0, 3)]+=(0.605641035302+0.947591202909j)*x_ref[2]
            arg[(1, 0)]+=(0.918523225592+0.350654023408j)*x[2]
            ref[(1, 0)]+=(0.918523225592+0.350654023408j)*x_ref[2]
            arg[(1, 1)]+=(0.492242232824-0.94460912257j)*x[2]
            ref[(1, 1)]+=(0.492242232824-0.94460912257j)*x_ref[2]
            arg[(1, 2)]+=(0.87591890879+0.722650218361j)*x[2]
            ref[(1, 2)]+=(0.87591890879+0.722650218361j)*x_ref[2]
            arg[(1, 3)]+=(0.224265316679-0.082110854283j)*x[2]
            ref[(1, 3)]+=(0.224265316679-0.082110854283j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ReducedSolution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 4),w)
        ref = Data(0,(2, 2, 4),w_ref)
        arg[(0, 0, 0)]=(0.0369724156863+0.536225320526j)*x[0] + ((0.725598190982-0.764546966604j))*x[1]
        ref[(0, 0, 0)]=(0.0369724156863+0.536225320526j)*x_ref[0] + ((0.725598190982-0.764546966604j))*x_ref[1]
        arg[(0, 0, 1)]=(0.889224090582+0.572589058909j)*x[0] + ((-0.420012024602-0.591230809238j))*x[1]
        ref[(0, 0, 1)]=(0.889224090582+0.572589058909j)*x_ref[0] + ((-0.420012024602-0.591230809238j))*x_ref[1]
        arg[(0, 0, 2)]=(-0.486452588344+0.910488425702j)*x[0] + ((-0.0759409634363+0.511175053009j))*x[1]
        ref[(0, 0, 2)]=(-0.486452588344+0.910488425702j)*x_ref[0] + ((-0.0759409634363+0.511175053009j))*x_ref[1]
        arg[(0, 0, 3)]=(0.409662181663-0.957787228281j)*x[0] + ((0.179336805164+0.68869784088j))*x[1]
        ref[(0, 0, 3)]=(0.409662181663-0.957787228281j)*x_ref[0] + ((0.179336805164+0.68869784088j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.195880403815+0.14795882198j)*x[0] + ((-0.987727453348+0.143825622116j))*x[1]
        ref[(0, 1, 0)]=(-0.195880403815+0.14795882198j)*x_ref[0] + ((-0.987727453348+0.143825622116j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.698946795262+0.904312985586j)*x[0] + ((-0.171387580518-0.54985613642j))*x[1]
        ref[(0, 1, 1)]=(-0.698946795262+0.904312985586j)*x_ref[0] + ((-0.171387580518-0.54985613642j))*x_ref[1]
        arg[(0, 1, 2)]=(0.362582194967+0.0479017097943j)*x[0] + ((-0.738004297257+0.0164580380333j))*x[1]
        ref[(0, 1, 2)]=(0.362582194967+0.0479017097943j)*x_ref[0] + ((-0.738004297257+0.0164580380333j))*x_ref[1]
        arg[(0, 1, 3)]=(0.843679292272-0.472958253698j)*x[0] + ((-0.463180899942+0.694976668326j))*x[1]
        ref[(0, 1, 3)]=(0.843679292272-0.472958253698j)*x_ref[0] + ((-0.463180899942+0.694976668326j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.299952071691-0.14182920432j)*x[0] + ((-0.420729553172+0.463354139794j))*x[1]
        ref[(1, 0, 0)]=(-0.299952071691-0.14182920432j)*x_ref[0] + ((-0.420729553172+0.463354139794j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.660202231927-0.103828054199j)*x[0] + ((0.405901780116-0.54843910177j))*x[1]
        ref[(1, 0, 1)]=(-0.660202231927-0.103828054199j)*x_ref[0] + ((0.405901780116-0.54843910177j))*x_ref[1]
        arg[(1, 0, 2)]=(-0.0796321961523-0.975613777924j)*x[0] + ((-0.410605998237-0.764753259402j))*x[1]
        ref[(1, 0, 2)]=(-0.0796321961523-0.975613777924j)*x_ref[0] + ((-0.410605998237-0.764753259402j))*x_ref[1]
        arg[(1, 0, 3)]=(-0.741914648241+0.774551934192j)*x[0] + ((-0.630828669893+0.847538285578j))*x[1]
        ref[(1, 0, 3)]=(-0.741914648241+0.774551934192j)*x_ref[0] + ((-0.630828669893+0.847538285578j))*x_ref[1]
        arg[(1, 1, 0)]=(0.401112683433-0.83512643221j)*x[0] + ((-0.0653772615193+0.202573104713j))*x[1]
        ref[(1, 1, 0)]=(0.401112683433-0.83512643221j)*x_ref[0] + ((-0.0653772615193+0.202573104713j))*x_ref[1]
        arg[(1, 1, 1)]=(0.429893948401-0.671658074196j)*x[0] + ((-0.0690337797711+0.823353771886j))*x[1]
        ref[(1, 1, 1)]=(0.429893948401-0.671658074196j)*x_ref[0] + ((-0.0690337797711+0.823353771886j))*x_ref[1]
        arg[(1, 1, 2)]=(0.80092450324+0.131931683095j)*x[0] + ((-0.824818225499+0.923382947599j))*x[1]
        ref[(1, 1, 2)]=(0.80092450324+0.131931683095j)*x_ref[0] + ((-0.824818225499+0.923382947599j))*x_ref[1]
        arg[(1, 1, 3)]=(0.729533172752+0.849675011859j)*x[0] + ((-0.232260192925-0.473090341319j))*x[1]
        ref[(1, 1, 3)]=(0.729533172752+0.849675011859j)*x_ref[0] + ((-0.232260192925-0.473090341319j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.965489661481-0.60697265263j)*x[2]
            ref[(0, 0, 0)]+=(0.965489661481-0.60697265263j)*x_ref[2]
            arg[(0, 0, 1)]+=(0.406361604089+0.559895968424j)*x[2]
            ref[(0, 0, 1)]+=(0.406361604089+0.559895968424j)*x_ref[2]
            arg[(0, 0, 2)]+=(-0.152581719741+0.601123785503j)*x[2]
            ref[(0, 0, 2)]+=(-0.152581719741+0.601123785503j)*x_ref[2]
            arg[(0, 0, 3)]+=(0.765110880163+0.273343438827j)*x[2]
            ref[(0, 0, 3)]+=(0.765110880163+0.273343438827j)*x_ref[2]
            arg[(0, 1, 0)]+=(-0.850532052936+0.490078501284j)*x[2]
            ref[(0, 1, 0)]+=(-0.850532052936+0.490078501284j)*x_ref[2]
            arg[(0, 1, 1)]+=(0.219259378239-0.259602350797j)*x[2]
            ref[(0, 1, 1)]+=(0.219259378239-0.259602350797j)*x_ref[2]
            arg[(0, 1, 2)]+=(-0.0451370181153-0.0468212305031j)*x[2]
            ref[(0, 1, 2)]+=(-0.0451370181153-0.0468212305031j)*x_ref[2]
            arg[(0, 1, 3)]+=(0.890840775998+0.78886541686j)*x[2]
            ref[(0, 1, 3)]+=(0.890840775998+0.78886541686j)*x_ref[2]
            arg[(1, 0, 0)]+=(-0.151482541702+0.289199377194j)*x[2]
            ref[(1, 0, 0)]+=(-0.151482541702+0.289199377194j)*x_ref[2]
            arg[(1, 0, 1)]+=(0.901258388401+0.0123205307477j)*x[2]
            ref[(1, 0, 1)]+=(0.901258388401+0.0123205307477j)*x_ref[2]
            arg[(1, 0, 2)]+=(0.482090549618+0.882527353416j)*x[2]
            ref[(1, 0, 2)]+=(0.482090549618+0.882527353416j)*x_ref[2]
            arg[(1, 0, 3)]+=(0.143215853221-0.299441925361j)*x[2]
            ref[(1, 0, 3)]+=(0.143215853221-0.299441925361j)*x_ref[2]
            arg[(1, 1, 0)]+=(0.544451534238+0.137361600371j)*x[2]
            ref[(1, 1, 0)]+=(0.544451534238+0.137361600371j)*x_ref[2]
            arg[(1, 1, 1)]+=(-0.937531811704+0.894142042998j)*x[2]
            ref[(1, 1, 1)]+=(-0.937531811704+0.894142042998j)*x_ref[2]
            arg[(1, 1, 2)]+=(0.873904487415+0.775245064296j)*x[2]
            ref[(1, 1, 2)]+=(0.873904487415+0.775245064296j)*x_ref[2]
            arg[(1, 1, 3)]+=(-0.58161043286-0.250611497482j)*x[2]
            ref[(1, 1, 3)]+=(-0.58161043286-0.250611497482j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ReducedSolution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 2, 2),w)
        ref = Data(0,(4, 4, 2, 2),w_ref)
        arg[(0, 0, 0, 0)]=(0.987432290757-0.499888677865j)*x[0] + ((-0.384347996799+0.71435159715j))*x[1]
        ref[(0, 0, 0, 0)]=(0.987432290757-0.499888677865j)*x_ref[0] + ((-0.384347996799+0.71435159715j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.243748219654-0.852417670751j)*x[0] + ((0.0614073831739+0.394339729319j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.243748219654-0.852417670751j)*x_ref[0] + ((0.0614073831739+0.394339729319j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.191526654339-0.453865373388j)*x[0] + ((-0.887006406822-0.296115594593j))*x[1]
        ref[(0, 0, 1, 0)]=(0.191526654339-0.453865373388j)*x_ref[0] + ((-0.887006406822-0.296115594593j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.682974729695+0.169935656185j)*x[0] + ((-0.451924330983+0.247486791102j))*x[1]
        ref[(0, 0, 1, 1)]=(0.682974729695+0.169935656185j)*x_ref[0] + ((-0.451924330983+0.247486791102j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.122316917214+0.79079085685j)*x[0] + ((0.703032327623-0.608432723178j))*x[1]
        ref[(0, 1, 0, 0)]=(0.122316917214+0.79079085685j)*x_ref[0] + ((0.703032327623-0.608432723178j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.889125859671+0.981479420951j)*x[0] + ((0.0277181322552-0.122896947035j))*x[1]
        ref[(0, 1, 0, 1)]=(0.889125859671+0.981479420951j)*x_ref[0] + ((0.0277181322552-0.122896947035j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.163899095999-0.127268479368j)*x[0] + ((0.567626225475+0.157557583084j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.163899095999-0.127268479368j)*x_ref[0] + ((0.567626225475+0.157557583084j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.130505599142+0.549615487779j)*x[0] + ((0.865213761968+0.441838898363j))*x[1]
        ref[(0, 1, 1, 1)]=(0.130505599142+0.549615487779j)*x_ref[0] + ((0.865213761968+0.441838898363j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(-0.698809106576+0.311659211459j)*x[0] + ((0.258546224609+0.118355119065j))*x[1]
        ref[(0, 2, 0, 0)]=(-0.698809106576+0.311659211459j)*x_ref[0] + ((0.258546224609+0.118355119065j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(-0.337680265746+0.88235073218j)*x[0] + ((-0.116777187374+0.97570933088j))*x[1]
        ref[(0, 2, 0, 1)]=(-0.337680265746+0.88235073218j)*x_ref[0] + ((-0.116777187374+0.97570933088j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(0.682479793701+0.214906300408j)*x[0] + ((-0.789251064836-0.260215342855j))*x[1]
        ref[(0, 2, 1, 0)]=(0.682479793701+0.214906300408j)*x_ref[0] + ((-0.789251064836-0.260215342855j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(-0.354936945331-0.806981091087j)*x[0] + ((-0.392832537113-0.419001192291j))*x[1]
        ref[(0, 2, 1, 1)]=(-0.354936945331-0.806981091087j)*x_ref[0] + ((-0.392832537113-0.419001192291j))*x_ref[1]
        arg[(0, 3, 0, 0)]=(0.0188415103237-0.878618405219j)*x[0] + ((-0.267258107439-0.567562108529j))*x[1]
        ref[(0, 3, 0, 0)]=(0.0188415103237-0.878618405219j)*x_ref[0] + ((-0.267258107439-0.567562108529j))*x_ref[1]
        arg[(0, 3, 0, 1)]=(-0.619091519279-0.0345365022896j)*x[0] + ((0.740050507598-0.151139165182j))*x[1]
        ref[(0, 3, 0, 1)]=(-0.619091519279-0.0345365022896j)*x_ref[0] + ((0.740050507598-0.151139165182j))*x_ref[1]
        arg[(0, 3, 1, 0)]=(-0.713937963427-0.727121766755j)*x[0] + ((0.321373243856-0.129450748234j))*x[1]
        ref[(0, 3, 1, 0)]=(-0.713937963427-0.727121766755j)*x_ref[0] + ((0.321373243856-0.129450748234j))*x_ref[1]
        arg[(0, 3, 1, 1)]=(0.969615144894+0.523151143577j)*x[0] + ((-0.972408613482-0.730915661909j))*x[1]
        ref[(0, 3, 1, 1)]=(0.969615144894+0.523151143577j)*x_ref[0] + ((-0.972408613482-0.730915661909j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.177837925198+0.202018082616j)*x[0] + ((-0.595244951957+0.876329932497j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.177837925198+0.202018082616j)*x_ref[0] + ((-0.595244951957+0.876329932497j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(-0.0338146571976-0.749807569366j)*x[0] + ((0.569898900741-0.3359891576j))*x[1]
        ref[(1, 0, 0, 1)]=(-0.0338146571976-0.749807569366j)*x_ref[0] + ((0.569898900741-0.3359891576j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(0.0846138276292+0.754158351518j)*x[0] + ((-0.362406813201+0.207329109205j))*x[1]
        ref[(1, 0, 1, 0)]=(0.0846138276292+0.754158351518j)*x_ref[0] + ((-0.362406813201+0.207329109205j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.0243435497579-0.760858222152j)*x[0] + ((-0.585034507127+0.611612559064j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.0243435497579-0.760858222152j)*x_ref[0] + ((-0.585034507127+0.611612559064j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.40416096975-0.676092677627j)*x[0] + ((-0.199558503945+0.149533231978j))*x[1]
        ref[(1, 1, 0, 0)]=(0.40416096975-0.676092677627j)*x_ref[0] + ((-0.199558503945+0.149533231978j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.620402205652+0.354416255692j)*x[0] + ((-0.741841240504+0.0878952871453j))*x[1]
        ref[(1, 1, 0, 1)]=(0.620402205652+0.354416255692j)*x_ref[0] + ((-0.741841240504+0.0878952871453j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.940458068982-0.572563591621j)*x[0] + ((-0.619534064628+0.905036611062j))*x[1]
        ref[(1, 1, 1, 0)]=(0.940458068982-0.572563591621j)*x_ref[0] + ((-0.619534064628+0.905036611062j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.088268114331-0.728523331605j)*x[0] + ((-0.269569805417+0.859396294684j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.088268114331-0.728523331605j)*x_ref[0] + ((-0.269569805417+0.859396294684j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(0.0959475788227+0.364612780152j)*x[0] + ((-0.970267600703+0.851804511227j))*x[1]
        ref[(1, 2, 0, 0)]=(0.0959475788227+0.364612780152j)*x_ref[0] + ((-0.970267600703+0.851804511227j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.545741688944-0.153673809193j)*x[0] + ((0.403454015738+0.656005052953j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.545741688944-0.153673809193j)*x_ref[0] + ((0.403454015738+0.656005052953j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(-0.397439136915-0.617047983568j)*x[0] + ((-0.654454078936+0.644110753377j))*x[1]
        ref[(1, 2, 1, 0)]=(-0.397439136915-0.617047983568j)*x_ref[0] + ((-0.654454078936+0.644110753377j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(-0.592973414593+0.810517786873j)*x[0] + ((0.526665110192-0.242746911984j))*x[1]
        ref[(1, 2, 1, 1)]=(-0.592973414593+0.810517786873j)*x_ref[0] + ((0.526665110192-0.242746911984j))*x_ref[1]
        arg[(1, 3, 0, 0)]=(0.533104686286-0.961568239935j)*x[0] + ((-0.374578911726+0.795333702819j))*x[1]
        ref[(1, 3, 0, 0)]=(0.533104686286-0.961568239935j)*x_ref[0] + ((-0.374578911726+0.795333702819j))*x_ref[1]
        arg[(1, 3, 0, 1)]=(-0.969370201117-0.106356252083j)*x[0] + ((-0.750799756405-0.366314949324j))*x[1]
        ref[(1, 3, 0, 1)]=(-0.969370201117-0.106356252083j)*x_ref[0] + ((-0.750799756405-0.366314949324j))*x_ref[1]
        arg[(1, 3, 1, 0)]=(-0.47062461508+0.973613706827j)*x[0] + ((0.460403660941-0.0185957870334j))*x[1]
        ref[(1, 3, 1, 0)]=(-0.47062461508+0.973613706827j)*x_ref[0] + ((0.460403660941-0.0185957870334j))*x_ref[1]
        arg[(1, 3, 1, 1)]=(-0.470876165962+0.619157701644j)*x[0] + ((0.493184860663+0.401337676124j))*x[1]
        ref[(1, 3, 1, 1)]=(-0.470876165962+0.619157701644j)*x_ref[0] + ((0.493184860663+0.401337676124j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(0.321194630343-0.706274275602j)*x[0] + ((0.188036344784-0.574316560039j))*x[1]
        ref[(2, 0, 0, 0)]=(0.321194630343-0.706274275602j)*x_ref[0] + ((0.188036344784-0.574316560039j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(0.755086323892-0.740594838389j)*x[0] + ((-0.709840164227-0.0917569006991j))*x[1]
        ref[(2, 0, 0, 1)]=(0.755086323892-0.740594838389j)*x_ref[0] + ((-0.709840164227-0.0917569006991j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(-0.0131229919853+0.747288541303j)*x[0] + ((0.91412459944+0.984906195966j))*x[1]
        ref[(2, 0, 1, 0)]=(-0.0131229919853+0.747288541303j)*x_ref[0] + ((0.91412459944+0.984906195966j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.368303013965+0.19456474529j)*x[0] + ((-0.233374975421-0.494874220549j))*x[1]
        ref[(2, 0, 1, 1)]=(0.368303013965+0.19456474529j)*x_ref[0] + ((-0.233374975421-0.494874220549j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(0.0790994395974-0.275764749739j)*x[0] + ((0.0598609332422-0.570687412764j))*x[1]
        ref[(2, 1, 0, 0)]=(0.0790994395974-0.275764749739j)*x_ref[0] + ((0.0598609332422-0.570687412764j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(-0.788854215458+0.163527128928j)*x[0] + ((-0.993126667422+0.313596960676j))*x[1]
        ref[(2, 1, 0, 1)]=(-0.788854215458+0.163527128928j)*x_ref[0] + ((-0.993126667422+0.313596960676j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(-0.954073201278-0.641929763006j)*x[0] + ((0.153605020064-0.00694861506179j))*x[1]
        ref[(2, 1, 1, 0)]=(-0.954073201278-0.641929763006j)*x_ref[0] + ((0.153605020064-0.00694861506179j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(-0.586099696835-0.524521205901j)*x[0] + ((0.435929103135-0.733496272616j))*x[1]
        ref[(2, 1, 1, 1)]=(-0.586099696835-0.524521205901j)*x_ref[0] + ((0.435929103135-0.733496272616j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(0.220482851361-0.894330462077j)*x[0] + ((0.493243182832+0.0976021805711j))*x[1]
        ref[(2, 2, 0, 0)]=(0.220482851361-0.894330462077j)*x_ref[0] + ((0.493243182832+0.0976021805711j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(-0.787865552817+0.103219128182j)*x[0] + ((0.836035518554+0.661634145426j))*x[1]
        ref[(2, 2, 0, 1)]=(-0.787865552817+0.103219128182j)*x_ref[0] + ((0.836035518554+0.661634145426j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(0.541475028096+0.377641907916j)*x[0] + ((-0.905226046641+0.269618731698j))*x[1]
        ref[(2, 2, 1, 0)]=(0.541475028096+0.377641907916j)*x_ref[0] + ((-0.905226046641+0.269618731698j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(-0.524514225222-0.818821173495j)*x[0] + ((-0.536207361196+0.630901693834j))*x[1]
        ref[(2, 2, 1, 1)]=(-0.524514225222-0.818821173495j)*x_ref[0] + ((-0.536207361196+0.630901693834j))*x_ref[1]
        arg[(2, 3, 0, 0)]=(0.917564512714+0.665700772193j)*x[0] + ((0.288415842136-0.475997904964j))*x[1]
        ref[(2, 3, 0, 0)]=(0.917564512714+0.665700772193j)*x_ref[0] + ((0.288415842136-0.475997904964j))*x_ref[1]
        arg[(2, 3, 0, 1)]=(0.348448151076+0.518523733379j)*x[0] + ((-0.530278386862+0.973163651401j))*x[1]
        ref[(2, 3, 0, 1)]=(0.348448151076+0.518523733379j)*x_ref[0] + ((-0.530278386862+0.973163651401j))*x_ref[1]
        arg[(2, 3, 1, 0)]=(-0.898066792403-0.266545265333j)*x[0] + ((-0.741386663678-0.686308028262j))*x[1]
        ref[(2, 3, 1, 0)]=(-0.898066792403-0.266545265333j)*x_ref[0] + ((-0.741386663678-0.686308028262j))*x_ref[1]
        arg[(2, 3, 1, 1)]=(-0.0346416359945-0.450801197602j)*x[0] + ((-0.189823129973+0.261933734459j))*x[1]
        ref[(2, 3, 1, 1)]=(-0.0346416359945-0.450801197602j)*x_ref[0] + ((-0.189823129973+0.261933734459j))*x_ref[1]
        arg[(3, 0, 0, 0)]=(0.0792902673099+0.444524024316j)*x[0] + ((0.978428973446-0.603825700112j))*x[1]
        ref[(3, 0, 0, 0)]=(0.0792902673099+0.444524024316j)*x_ref[0] + ((0.978428973446-0.603825700112j))*x_ref[1]
        arg[(3, 0, 0, 1)]=(0.88327246967+0.873728920403j)*x[0] + ((-0.517050561489-0.0451087952361j))*x[1]
        ref[(3, 0, 0, 1)]=(0.88327246967+0.873728920403j)*x_ref[0] + ((-0.517050561489-0.0451087952361j))*x_ref[1]
        arg[(3, 0, 1, 0)]=(0.39685182877-0.520447573571j)*x[0] + ((0.743650787681+0.914412226146j))*x[1]
        ref[(3, 0, 1, 0)]=(0.39685182877-0.520447573571j)*x_ref[0] + ((0.743650787681+0.914412226146j))*x_ref[1]
        arg[(3, 0, 1, 1)]=(0.838738729792+0.866573750868j)*x[0] + ((-0.433695532669-0.513943546129j))*x[1]
        ref[(3, 0, 1, 1)]=(0.838738729792+0.866573750868j)*x_ref[0] + ((-0.433695532669-0.513943546129j))*x_ref[1]
        arg[(3, 1, 0, 0)]=(-0.461292134633+0.826886521876j)*x[0] + ((-0.891765114996-0.651253933629j))*x[1]
        ref[(3, 1, 0, 0)]=(-0.461292134633+0.826886521876j)*x_ref[0] + ((-0.891765114996-0.651253933629j))*x_ref[1]
        arg[(3, 1, 0, 1)]=(-0.000760949112875+0.298964660421j)*x[0] + ((0.518603457398-0.806258789407j))*x[1]
        ref[(3, 1, 0, 1)]=(-0.000760949112875+0.298964660421j)*x_ref[0] + ((0.518603457398-0.806258789407j))*x_ref[1]
        arg[(3, 1, 1, 0)]=(-0.723784646391-0.919899167138j)*x[0] + ((0.613956169435-0.620037761562j))*x[1]
        ref[(3, 1, 1, 0)]=(-0.723784646391-0.919899167138j)*x_ref[0] + ((0.613956169435-0.620037761562j))*x_ref[1]
        arg[(3, 1, 1, 1)]=(0.309968126717+0.434051255487j)*x[0] + ((-0.839582761055+0.808262163988j))*x[1]
        ref[(3, 1, 1, 1)]=(0.309968126717+0.434051255487j)*x_ref[0] + ((-0.839582761055+0.808262163988j))*x_ref[1]
        arg[(3, 2, 0, 0)]=(-0.642642491979-0.747809918558j)*x[0] + ((0.697836583681-0.291510279186j))*x[1]
        ref[(3, 2, 0, 0)]=(-0.642642491979-0.747809918558j)*x_ref[0] + ((0.697836583681-0.291510279186j))*x_ref[1]
        arg[(3, 2, 0, 1)]=(-0.141645823761+0.807946733157j)*x[0] + ((-0.572015363496-0.0271347412295j))*x[1]
        ref[(3, 2, 0, 1)]=(-0.141645823761+0.807946733157j)*x_ref[0] + ((-0.572015363496-0.0271347412295j))*x_ref[1]
        arg[(3, 2, 1, 0)]=(0.648034231772+0.801685984977j)*x[0] + ((-0.842871266472-0.174679829348j))*x[1]
        ref[(3, 2, 1, 0)]=(0.648034231772+0.801685984977j)*x_ref[0] + ((-0.842871266472-0.174679829348j))*x_ref[1]
        arg[(3, 2, 1, 1)]=(-0.755458271089-0.700941207229j)*x[0] + ((-0.835332902458+0.146145268585j))*x[1]
        ref[(3, 2, 1, 1)]=(-0.755458271089-0.700941207229j)*x_ref[0] + ((-0.835332902458+0.146145268585j))*x_ref[1]
        arg[(3, 3, 0, 0)]=(-0.18975231827+0.529814551948j)*x[0] + ((-0.212964807735+0.934242986342j))*x[1]
        ref[(3, 3, 0, 0)]=(-0.18975231827+0.529814551948j)*x_ref[0] + ((-0.212964807735+0.934242986342j))*x_ref[1]
        arg[(3, 3, 0, 1)]=(0.80358275417-0.596733386873j)*x[0] + ((-0.994101892659+0.143272925423j))*x[1]
        ref[(3, 3, 0, 1)]=(0.80358275417-0.596733386873j)*x_ref[0] + ((-0.994101892659+0.143272925423j))*x_ref[1]
        arg[(3, 3, 1, 0)]=(-0.985371326665+0.963287382827j)*x[0] + ((0.22031718328+0.440560506071j))*x[1]
        ref[(3, 3, 1, 0)]=(-0.985371326665+0.963287382827j)*x_ref[0] + ((0.22031718328+0.440560506071j))*x_ref[1]
        arg[(3, 3, 1, 1)]=(-0.174378795308-0.627520751925j)*x[0] + ((-0.102002056329+0.337227865243j))*x[1]
        ref[(3, 3, 1, 1)]=(-0.174378795308-0.627520751925j)*x_ref[0] + ((-0.102002056329+0.337227865243j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.499400721948-0.213328461205j)*x[2]
            ref[(0, 0, 0, 0)]+=(-0.499400721948-0.213328461205j)*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.625064718439+0.208489975289j)*x[2]
            ref[(0, 0, 0, 1)]+=(-0.625064718439+0.208489975289j)*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.305490348848-0.380960961197j)*x[2]
            ref[(0, 0, 1, 0)]+=(-0.305490348848-0.380960961197j)*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.113337497729-0.47398967188j)*x[2]
            ref[(0, 0, 1, 1)]+=(0.113337497729-0.47398967188j)*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.831106900302-0.278320288758j)*x[2]
            ref[(0, 1, 0, 0)]+=(0.831106900302-0.278320288758j)*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.738770602504-0.369222735715j)*x[2]
            ref[(0, 1, 0, 1)]+=(0.738770602504-0.369222735715j)*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.030337632602+0.933766463408j)*x[2]
            ref[(0, 1, 1, 0)]+=(-0.030337632602+0.933766463408j)*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.530882994946-0.178865413204j)*x[2]
            ref[(0, 1, 1, 1)]+=(-0.530882994946-0.178865413204j)*x_ref[2]
            arg[(0, 2, 0, 0)]+=(0.294835606629-0.670100417131j)*x[2]
            ref[(0, 2, 0, 0)]+=(0.294835606629-0.670100417131j)*x_ref[2]
            arg[(0, 2, 0, 1)]+=(0.423454981963-0.801066456951j)*x[2]
            ref[(0, 2, 0, 1)]+=(0.423454981963-0.801066456951j)*x_ref[2]
            arg[(0, 2, 1, 0)]+=(0.916387087602+0.726771545729j)*x[2]
            ref[(0, 2, 1, 0)]+=(0.916387087602+0.726771545729j)*x_ref[2]
            arg[(0, 2, 1, 1)]+=(-0.820880509147-0.252159513704j)*x[2]
            ref[(0, 2, 1, 1)]+=(-0.820880509147-0.252159513704j)*x_ref[2]
            arg[(0, 3, 0, 0)]+=(0.374887585709-0.724915844018j)*x[2]
            ref[(0, 3, 0, 0)]+=(0.374887585709-0.724915844018j)*x_ref[2]
            arg[(0, 3, 0, 1)]+=(0.416787004641+0.570322268165j)*x[2]
            ref[(0, 3, 0, 1)]+=(0.416787004641+0.570322268165j)*x_ref[2]
            arg[(0, 3, 1, 0)]+=(0.0532375261124-0.686105164733j)*x[2]
            ref[(0, 3, 1, 0)]+=(0.0532375261124-0.686105164733j)*x_ref[2]
            arg[(0, 3, 1, 1)]+=(-0.528994699708+0.873517519892j)*x[2]
            ref[(0, 3, 1, 1)]+=(-0.528994699708+0.873517519892j)*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.35430324071+0.550472656053j)*x[2]
            ref[(1, 0, 0, 0)]+=(-0.35430324071+0.550472656053j)*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.547555100114+0.126991897071j)*x[2]
            ref[(1, 0, 0, 1)]+=(0.547555100114+0.126991897071j)*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.446165822793-0.861464979516j)*x[2]
            ref[(1, 0, 1, 0)]+=(-0.446165822793-0.861464979516j)*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.673607592318+0.874508302632j)*x[2]
            ref[(1, 0, 1, 1)]+=(0.673607592318+0.874508302632j)*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.505978299517+0.789199689134j)*x[2]
            ref[(1, 1, 0, 0)]+=(0.505978299517+0.789199689134j)*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.394836491811-0.0234705775244j)*x[2]
            ref[(1, 1, 0, 1)]+=(-0.394836491811-0.0234705775244j)*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.893239920062-0.169961946669j)*x[2]
            ref[(1, 1, 1, 0)]+=(0.893239920062-0.169961946669j)*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.43673424837+0.655668742961j)*x[2]
            ref[(1, 1, 1, 1)]+=(-0.43673424837+0.655668742961j)*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.413453534405+0.406328065391j)*x[2]
            ref[(1, 2, 0, 0)]+=(0.413453534405+0.406328065391j)*x_ref[2]
            arg[(1, 2, 0, 1)]+=(0.166043559938+0.813801420854j)*x[2]
            ref[(1, 2, 0, 1)]+=(0.166043559938+0.813801420854j)*x_ref[2]
            arg[(1, 2, 1, 0)]+=(0.628379873124-0.320745203949j)*x[2]
            ref[(1, 2, 1, 0)]+=(0.628379873124-0.320745203949j)*x_ref[2]
            arg[(1, 2, 1, 1)]+=(-0.372781118101-0.349652727467j)*x[2]
            ref[(1, 2, 1, 1)]+=(-0.372781118101-0.349652727467j)*x_ref[2]
            arg[(1, 3, 0, 0)]+=(-0.907395837667+0.241817585482j)*x[2]
            ref[(1, 3, 0, 0)]+=(-0.907395837667+0.241817585482j)*x_ref[2]
            arg[(1, 3, 0, 1)]+=(0.934052715215-0.401698058293j)*x[2]
            ref[(1, 3, 0, 1)]+=(0.934052715215-0.401698058293j)*x_ref[2]
            arg[(1, 3, 1, 0)]+=(0.278977830945-0.857371620498j)*x[2]
            ref[(1, 3, 1, 0)]+=(0.278977830945-0.857371620498j)*x_ref[2]
            arg[(1, 3, 1, 1)]+=(0.273521501252+0.132186446777j)*x[2]
            ref[(1, 3, 1, 1)]+=(0.273521501252+0.132186446777j)*x_ref[2]
            arg[(2, 0, 0, 0)]+=(-0.523817287835+0.57424631311j)*x[2]
            ref[(2, 0, 0, 0)]+=(-0.523817287835+0.57424631311j)*x_ref[2]
            arg[(2, 0, 0, 1)]+=(-0.0333929313067-0.0780535013863j)*x[2]
            ref[(2, 0, 0, 1)]+=(-0.0333929313067-0.0780535013863j)*x_ref[2]
            arg[(2, 0, 1, 0)]+=(0.941471006279+0.360745976292j)*x[2]
            ref[(2, 0, 1, 0)]+=(0.941471006279+0.360745976292j)*x_ref[2]
            arg[(2, 0, 1, 1)]+=(0.163065174707+0.705951256441j)*x[2]
            ref[(2, 0, 1, 1)]+=(0.163065174707+0.705951256441j)*x_ref[2]
            arg[(2, 1, 0, 0)]+=(-0.680533024592+0.0723974090894j)*x[2]
            ref[(2, 1, 0, 0)]+=(-0.680533024592+0.0723974090894j)*x_ref[2]
            arg[(2, 1, 0, 1)]+=(0.570708099082+0.738676951119j)*x[2]
            ref[(2, 1, 0, 1)]+=(0.570708099082+0.738676951119j)*x_ref[2]
            arg[(2, 1, 1, 0)]+=(0.0215314785302-0.820282442532j)*x[2]
            ref[(2, 1, 1, 0)]+=(0.0215314785302-0.820282442532j)*x_ref[2]
            arg[(2, 1, 1, 1)]+=(-0.662270635564+0.089855236186j)*x[2]
            ref[(2, 1, 1, 1)]+=(-0.662270635564+0.089855236186j)*x_ref[2]
            arg[(2, 2, 0, 0)]+=(0.328562529691-0.30316074499j)*x[2]
            ref[(2, 2, 0, 0)]+=(0.328562529691-0.30316074499j)*x_ref[2]
            arg[(2, 2, 0, 1)]+=(0.285015350875+0.86990200552j)*x[2]
            ref[(2, 2, 0, 1)]+=(0.285015350875+0.86990200552j)*x_ref[2]
            arg[(2, 2, 1, 0)]+=(0.914129012399+0.325233132766j)*x[2]
            ref[(2, 2, 1, 0)]+=(0.914129012399+0.325233132766j)*x_ref[2]
            arg[(2, 2, 1, 1)]+=(0.0804180516059-0.848717371878j)*x[2]
            ref[(2, 2, 1, 1)]+=(0.0804180516059-0.848717371878j)*x_ref[2]
            arg[(2, 3, 0, 0)]+=(0.0113965713715-0.160530969763j)*x[2]
            ref[(2, 3, 0, 0)]+=(0.0113965713715-0.160530969763j)*x_ref[2]
            arg[(2, 3, 0, 1)]+=(0.677862927483+0.343225997631j)*x[2]
            ref[(2, 3, 0, 1)]+=(0.677862927483+0.343225997631j)*x_ref[2]
            arg[(2, 3, 1, 0)]+=(0.59873722774+0.534210986486j)*x[2]
            ref[(2, 3, 1, 0)]+=(0.59873722774+0.534210986486j)*x_ref[2]
            arg[(2, 3, 1, 1)]+=(-0.730013831883-0.226040556866j)*x[2]
            ref[(2, 3, 1, 1)]+=(-0.730013831883-0.226040556866j)*x_ref[2]
            arg[(3, 0, 0, 0)]+=(-0.562737663929+0.22314349568j)*x[2]
            ref[(3, 0, 0, 0)]+=(-0.562737663929+0.22314349568j)*x_ref[2]
            arg[(3, 0, 0, 1)]+=(-0.2398522475-0.545882983867j)*x[2]
            ref[(3, 0, 0, 1)]+=(-0.2398522475-0.545882983867j)*x_ref[2]
            arg[(3, 0, 1, 0)]+=(-0.246264986916-0.98849971453j)*x[2]
            ref[(3, 0, 1, 0)]+=(-0.246264986916-0.98849971453j)*x_ref[2]
            arg[(3, 0, 1, 1)]+=(-0.867149052116+0.23526757427j)*x[2]
            ref[(3, 0, 1, 1)]+=(-0.867149052116+0.23526757427j)*x_ref[2]
            arg[(3, 1, 0, 0)]+=(0.227792217011+0.0665501273033j)*x[2]
            ref[(3, 1, 0, 0)]+=(0.227792217011+0.0665501273033j)*x_ref[2]
            arg[(3, 1, 0, 1)]+=(0.187623347917+0.240308094624j)*x[2]
            ref[(3, 1, 0, 1)]+=(0.187623347917+0.240308094624j)*x_ref[2]
            arg[(3, 1, 1, 0)]+=(-0.326930338605-0.305266099301j)*x[2]
            ref[(3, 1, 1, 0)]+=(-0.326930338605-0.305266099301j)*x_ref[2]
            arg[(3, 1, 1, 1)]+=(0.109689397681+0.604053449829j)*x[2]
            ref[(3, 1, 1, 1)]+=(0.109689397681+0.604053449829j)*x_ref[2]
            arg[(3, 2, 0, 0)]+=(0.537962135188-0.209055274935j)*x[2]
            ref[(3, 2, 0, 0)]+=(0.537962135188-0.209055274935j)*x_ref[2]
            arg[(3, 2, 0, 1)]+=(-0.2368555746+0.679951229892j)*x[2]
            ref[(3, 2, 0, 1)]+=(-0.2368555746+0.679951229892j)*x_ref[2]
            arg[(3, 2, 1, 0)]+=(-0.255912389905-0.959954347932j)*x[2]
            ref[(3, 2, 1, 0)]+=(-0.255912389905-0.959954347932j)*x_ref[2]
            arg[(3, 2, 1, 1)]+=(0.999004267177-0.847960462579j)*x[2]
            ref[(3, 2, 1, 1)]+=(0.999004267177-0.847960462579j)*x_ref[2]
            arg[(3, 3, 0, 0)]+=(-0.947804405971-0.916208234003j)*x[2]
            ref[(3, 3, 0, 0)]+=(-0.947804405971-0.916208234003j)*x_ref[2]
            arg[(3, 3, 0, 1)]+=(0.391840787139+0.013730490611j)*x[2]
            ref[(3, 3, 0, 1)]+=(0.391840787139+0.013730490611j)*x_ref[2]
            arg[(3, 3, 1, 0)]+=(-0.0556289973755-0.906923781994j)*x[2]
            ref[(3, 3, 1, 0)]+=(-0.0556289973755-0.906923781994j)*x_ref[2]
            arg[(3, 3, 1, 1)]+=(-0.75631579751-0.370090518879j)*x[2]
            ref[(3, 3, 1, 1)]+=(-0.75631579751-0.370090518879j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.956135688969-0.888649396514j)*x[0] + ((0.53304939954-0.293041111034j))*x[1]
        ref=(0.956135688969-0.888649396514j)*x_ref[0] + ((0.53304939954-0.293041111034j))*x_ref[1]
        if dim==3:
            arg+=((0.932641106868+0.328218798334j))*x[2]
            ref+=((0.932641106868+0.328218798334j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=(-0.676365473391+0.026964439562j)*x[0] + ((0.738081555972+0.410408638293j))*x[1]
        ref[(0,)]=(-0.676365473391+0.026964439562j)*x_ref[0] + ((0.738081555972+0.410408638293j))*x_ref[1]
        arg[(1,)]=(-0.740195418762+0.256123096937j)*x[0] + ((0.960467453305-0.804164360479j))*x[1]
        ref[(1,)]=(-0.740195418762+0.256123096937j)*x_ref[0] + ((0.960467453305-0.804164360479j))*x_ref[1]
        arg[(2,)]=(-0.195654772705+0.578198584178j)*x[0] + ((0.866284703311+0.0322813865483j))*x[1]
        ref[(2,)]=(-0.195654772705+0.578198584178j)*x_ref[0] + ((0.866284703311+0.0322813865483j))*x_ref[1]
        arg[(3,)]=(-0.256342398747-0.557054414163j)*x[0] + ((0.719712751949+0.907363101608j))*x[1]
        ref[(3,)]=(-0.256342398747-0.557054414163j)*x_ref[0] + ((0.719712751949+0.907363101608j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.960506507628-0.568212037665j)*x[2]
            ref[(0,)]+=(-0.960506507628-0.568212037665j)*x_ref[2]
            arg[(1,)]+=(0.56575193406-0.0893103781036j)*x[2]
            ref[(1,)]+=(0.56575193406-0.0893103781036j)*x_ref[2]
            arg[(2,)]+=(-0.217835806634-0.165302160825j)*x[2]
            ref[(2,)]+=(-0.217835806634-0.165302160825j)*x_ref[2]
            arg[(3,)]+=(0.699723858116-0.661578730153j)*x[2]
            ref[(3,)]+=(0.699723858116-0.661578730153j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref = Data(0,(4, 4),w_ref)
        arg[(0, 0)]=(-0.240814301918-0.887048322781j)*x[0] + ((-0.94427004856+0.733628508615j))*x[1]
        ref[(0, 0)]=(-0.240814301918-0.887048322781j)*x_ref[0] + ((-0.94427004856+0.733628508615j))*x_ref[1]
        arg[(0, 1)]=(0.951750236869-0.198282416579j)*x[0] + ((-0.565111450398-0.53776480686j))*x[1]
        ref[(0, 1)]=(0.951750236869-0.198282416579j)*x_ref[0] + ((-0.565111450398-0.53776480686j))*x_ref[1]
        arg[(0, 2)]=(-0.730679847433+0.73129906158j)*x[0] + ((-0.234023738555-0.577077014762j))*x[1]
        ref[(0, 2)]=(-0.730679847433+0.73129906158j)*x_ref[0] + ((-0.234023738555-0.577077014762j))*x_ref[1]
        arg[(0, 3)]=(-0.901316318034+0.0104211731045j)*x[0] + ((0.815947050202+0.388281301358j))*x[1]
        ref[(0, 3)]=(-0.901316318034+0.0104211731045j)*x_ref[0] + ((0.815947050202+0.388281301358j))*x_ref[1]
        arg[(1, 0)]=(-0.952994123338+0.562259045344j)*x[0] + ((-0.12672422522+0.759397064752j))*x[1]
        ref[(1, 0)]=(-0.952994123338+0.562259045344j)*x_ref[0] + ((-0.12672422522+0.759397064752j))*x_ref[1]
        arg[(1, 1)]=(-0.0876028285468+0.0962299659881j)*x[0] + ((-0.453954817625+0.531446963363j))*x[1]
        ref[(1, 1)]=(-0.0876028285468+0.0962299659881j)*x_ref[0] + ((-0.453954817625+0.531446963363j))*x_ref[1]
        arg[(1, 2)]=(-0.714238899701-0.258108459031j)*x[0] + ((0.413260215386-0.501445856003j))*x[1]
        ref[(1, 2)]=(-0.714238899701-0.258108459031j)*x_ref[0] + ((0.413260215386-0.501445856003j))*x_ref[1]
        arg[(1, 3)]=(0.334140526046+0.720690598314j)*x[0] + ((0.0649585175003+0.385287340639j))*x[1]
        ref[(1, 3)]=(0.334140526046+0.720690598314j)*x_ref[0] + ((0.0649585175003+0.385287340639j))*x_ref[1]
        arg[(2, 0)]=(-0.105268261113-0.0413867431832j)*x[0] + ((0.120272690539+0.795458235225j))*x[1]
        ref[(2, 0)]=(-0.105268261113-0.0413867431832j)*x_ref[0] + ((0.120272690539+0.795458235225j))*x_ref[1]
        arg[(2, 1)]=(-0.0677382511323+0.714048551423j)*x[0] + ((-0.817966815779-0.211792032305j))*x[1]
        ref[(2, 1)]=(-0.0677382511323+0.714048551423j)*x_ref[0] + ((-0.817966815779-0.211792032305j))*x_ref[1]
        arg[(2, 2)]=(0.622366928452+0.873320752694j)*x[0] + ((0.803727816121+0.848889258707j))*x[1]
        ref[(2, 2)]=(0.622366928452+0.873320752694j)*x_ref[0] + ((0.803727816121+0.848889258707j))*x_ref[1]
        arg[(2, 3)]=(0.0054662692769-0.312635145554j)*x[0] + ((0.49876567853-0.475582064542j))*x[1]
        ref[(2, 3)]=(0.0054662692769-0.312635145554j)*x_ref[0] + ((0.49876567853-0.475582064542j))*x_ref[1]
        arg[(3, 0)]=(0.486375167179+0.887687109909j)*x[0] + ((-0.79938352603+0.203798243441j))*x[1]
        ref[(3, 0)]=(0.486375167179+0.887687109909j)*x_ref[0] + ((-0.79938352603+0.203798243441j))*x_ref[1]
        arg[(3, 1)]=(0.0942996746761-0.737976343541j)*x[0] + ((-0.682086475874+0.469234521125j))*x[1]
        ref[(3, 1)]=(0.0942996746761-0.737976343541j)*x_ref[0] + ((-0.682086475874+0.469234521125j))*x_ref[1]
        arg[(3, 2)]=(-0.104611226434+0.433052142302j)*x[0] + ((-0.620801318245+0.581906629262j))*x[1]
        ref[(3, 2)]=(-0.104611226434+0.433052142302j)*x_ref[0] + ((-0.620801318245+0.581906629262j))*x_ref[1]
        arg[(3, 3)]=(-0.0381487687319+0.528562401891j)*x[0] + ((0.267413230144-0.481841205959j))*x[1]
        ref[(3, 3)]=(-0.0381487687319+0.528562401891j)*x_ref[0] + ((0.267413230144-0.481841205959j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.185982183399-0.305705949308j)*x[2]
            ref[(0, 0)]+=(0.185982183399-0.305705949308j)*x_ref[2]
            arg[(0, 1)]+=(-0.141436503698+0.193619656302j)*x[2]
            ref[(0, 1)]+=(-0.141436503698+0.193619656302j)*x_ref[2]
            arg[(0, 2)]+=(-0.216326852087+0.965855929256j)*x[2]
            ref[(0, 2)]+=(-0.216326852087+0.965855929256j)*x_ref[2]
            arg[(0, 3)]+=(0.810814289151-0.74914860825j)*x[2]
            ref[(0, 3)]+=(0.810814289151-0.74914860825j)*x_ref[2]
            arg[(1, 0)]+=(0.564396313381+0.238500666079j)*x[2]
            ref[(1, 0)]+=(0.564396313381+0.238500666079j)*x_ref[2]
            arg[(1, 1)]+=(0.309539600916+0.806779176839j)*x[2]
            ref[(1, 1)]+=(0.309539600916+0.806779176839j)*x_ref[2]
            arg[(1, 2)]+=(0.859245563127-0.182915908656j)*x[2]
            ref[(1, 2)]+=(0.859245563127-0.182915908656j)*x_ref[2]
            arg[(1, 3)]+=(-0.404597139967-0.709465688144j)*x[2]
            ref[(1, 3)]+=(-0.404597139967-0.709465688144j)*x_ref[2]
            arg[(2, 0)]+=(0.0574126757898-0.812974401469j)*x[2]
            ref[(2, 0)]+=(0.0574126757898-0.812974401469j)*x_ref[2]
            arg[(2, 1)]+=(-0.372680946595+0.525574883425j)*x[2]
            ref[(2, 1)]+=(-0.372680946595+0.525574883425j)*x_ref[2]
            arg[(2, 2)]+=(0.780479796466+0.356093736067j)*x[2]
            ref[(2, 2)]+=(0.780479796466+0.356093736067j)*x_ref[2]
            arg[(2, 3)]+=(0.693713947316-0.564220680676j)*x[2]
            ref[(2, 3)]+=(0.693713947316-0.564220680676j)*x_ref[2]
            arg[(3, 0)]+=(-0.540930445245-0.0860915987224j)*x[2]
            ref[(3, 0)]+=(-0.540930445245-0.0860915987224j)*x_ref[2]
            arg[(3, 1)]+=(0.862068251052-0.0586224025383j)*x[2]
            ref[(3, 1)]+=(0.862068251052-0.0586224025383j)*x_ref[2]
            arg[(3, 2)]+=(0.225903422934-0.352563992518j)*x[2]
            ref[(3, 2)]+=(0.225903422934-0.352563992518j)*x_ref[2]
            arg[(3, 3)]+=(-0.29630855462+0.720657827833j)*x[2]
            ref[(3, 3)]+=(-0.29630855462+0.720657827833j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 4),w)
        ref = Data(0,(4, 4, 4),w_ref)
        arg[(0, 0, 0)]=(-0.517019132757+0.0411478432118j)*x[0] + ((-0.67360762307+0.279125203116j))*x[1]
        ref[(0, 0, 0)]=(-0.517019132757+0.0411478432118j)*x_ref[0] + ((-0.67360762307+0.279125203116j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.124589846605+0.557248664247j)*x[0] + ((0.532621424649+0.763613872005j))*x[1]
        ref[(0, 0, 1)]=(-0.124589846605+0.557248664247j)*x_ref[0] + ((0.532621424649+0.763613872005j))*x_ref[1]
        arg[(0, 0, 2)]=(0.732576259178+0.113168427138j)*x[0] + ((0.72102378097+0.0209588283052j))*x[1]
        ref[(0, 0, 2)]=(0.732576259178+0.113168427138j)*x_ref[0] + ((0.72102378097+0.0209588283052j))*x_ref[1]
        arg[(0, 0, 3)]=(0.579825992545-0.785635343373j)*x[0] + ((0.712491553075+0.996233996998j))*x[1]
        ref[(0, 0, 3)]=(0.579825992545-0.785635343373j)*x_ref[0] + ((0.712491553075+0.996233996998j))*x_ref[1]
        arg[(0, 1, 0)]=(0.800836795034-0.634897823962j)*x[0] + ((0.972067870477-0.844485611173j))*x[1]
        ref[(0, 1, 0)]=(0.800836795034-0.634897823962j)*x_ref[0] + ((0.972067870477-0.844485611173j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.453682298889-0.693767806482j)*x[0] + ((-0.568890106316+0.694978038622j))*x[1]
        ref[(0, 1, 1)]=(-0.453682298889-0.693767806482j)*x_ref[0] + ((-0.568890106316+0.694978038622j))*x_ref[1]
        arg[(0, 1, 2)]=(0.210710503482-0.851549757764j)*x[0] + ((-0.744577614128-0.210047292554j))*x[1]
        ref[(0, 1, 2)]=(0.210710503482-0.851549757764j)*x_ref[0] + ((-0.744577614128-0.210047292554j))*x_ref[1]
        arg[(0, 1, 3)]=(0.797940193748-0.771551044584j)*x[0] + ((0.674095648515+0.68423625466j))*x[1]
        ref[(0, 1, 3)]=(0.797940193748-0.771551044584j)*x_ref[0] + ((0.674095648515+0.68423625466j))*x_ref[1]
        arg[(0, 2, 0)]=(0.555465149174+0.618636665679j)*x[0] + ((0.63989710783-0.0151563088024j))*x[1]
        ref[(0, 2, 0)]=(0.555465149174+0.618636665679j)*x_ref[0] + ((0.63989710783-0.0151563088024j))*x_ref[1]
        arg[(0, 2, 1)]=(-0.605659267636+0.181966640686j)*x[0] + ((0.123965761776-0.928558222444j))*x[1]
        ref[(0, 2, 1)]=(-0.605659267636+0.181966640686j)*x_ref[0] + ((0.123965761776-0.928558222444j))*x_ref[1]
        arg[(0, 2, 2)]=(0.788152198497+0.355851460002j)*x[0] + ((-0.520529800821+0.219118481826j))*x[1]
        ref[(0, 2, 2)]=(0.788152198497+0.355851460002j)*x_ref[0] + ((-0.520529800821+0.219118481826j))*x_ref[1]
        arg[(0, 2, 3)]=(-0.00507640578008-0.32311437668j)*x[0] + ((0.824218631132-0.343211895061j))*x[1]
        ref[(0, 2, 3)]=(-0.00507640578008-0.32311437668j)*x_ref[0] + ((0.824218631132-0.343211895061j))*x_ref[1]
        arg[(0, 3, 0)]=(0.678522856904+0.840780763344j)*x[0] + ((0.888945936183+0.327696608344j))*x[1]
        ref[(0, 3, 0)]=(0.678522856904+0.840780763344j)*x_ref[0] + ((0.888945936183+0.327696608344j))*x_ref[1]
        arg[(0, 3, 1)]=(0.105188395535+0.176806147053j)*x[0] + ((0.919683612001+0.0627413902262j))*x[1]
        ref[(0, 3, 1)]=(0.105188395535+0.176806147053j)*x_ref[0] + ((0.919683612001+0.0627413902262j))*x_ref[1]
        arg[(0, 3, 2)]=(-0.413231823874-0.50126060347j)*x[0] + ((0.70387905974-0.243636923591j))*x[1]
        ref[(0, 3, 2)]=(-0.413231823874-0.50126060347j)*x_ref[0] + ((0.70387905974-0.243636923591j))*x_ref[1]
        arg[(0, 3, 3)]=(-0.759564236541-0.0766084890227j)*x[0] + ((0.56728416833-0.907809352761j))*x[1]
        ref[(0, 3, 3)]=(-0.759564236541-0.0766084890227j)*x_ref[0] + ((0.56728416833-0.907809352761j))*x_ref[1]
        arg[(1, 0, 0)]=(0.389544046393-0.536570286414j)*x[0] + ((-0.632664844328-0.334709633548j))*x[1]
        ref[(1, 0, 0)]=(0.389544046393-0.536570286414j)*x_ref[0] + ((-0.632664844328-0.334709633548j))*x_ref[1]
        arg[(1, 0, 1)]=(0.763297700707-0.943017886296j)*x[0] + ((0.790761128449+0.488199059519j))*x[1]
        ref[(1, 0, 1)]=(0.763297700707-0.943017886296j)*x_ref[0] + ((0.790761128449+0.488199059519j))*x_ref[1]
        arg[(1, 0, 2)]=(-0.103192883821-0.0525844618309j)*x[0] + ((0.131983458869+0.386639645954j))*x[1]
        ref[(1, 0, 2)]=(-0.103192883821-0.0525844618309j)*x_ref[0] + ((0.131983458869+0.386639645954j))*x_ref[1]
        arg[(1, 0, 3)]=(0.0826075576447+0.00983939500647j)*x[0] + ((0.176616321969+0.759316257626j))*x[1]
        ref[(1, 0, 3)]=(0.0826075576447+0.00983939500647j)*x_ref[0] + ((0.176616321969+0.759316257626j))*x_ref[1]
        arg[(1, 1, 0)]=(0.34116921179+0.516326245453j)*x[0] + ((-0.00927082801101+0.117162811554j))*x[1]
        ref[(1, 1, 0)]=(0.34116921179+0.516326245453j)*x_ref[0] + ((-0.00927082801101+0.117162811554j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.67039457395+0.55587089765j)*x[0] + ((0.883048106926+0.316339567934j))*x[1]
        ref[(1, 1, 1)]=(-0.67039457395+0.55587089765j)*x_ref[0] + ((0.883048106926+0.316339567934j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.109251046627-0.162394844203j)*x[0] + ((-0.487548952731+0.108205735108j))*x[1]
        ref[(1, 1, 2)]=(-0.109251046627-0.162394844203j)*x_ref[0] + ((-0.487548952731+0.108205735108j))*x_ref[1]
        arg[(1, 1, 3)]=(0.287220039771+0.614387975755j)*x[0] + ((-0.174688763891+0.0072761637379j))*x[1]
        ref[(1, 1, 3)]=(0.287220039771+0.614387975755j)*x_ref[0] + ((-0.174688763891+0.0072761637379j))*x_ref[1]
        arg[(1, 2, 0)]=(0.896841001825-0.865425921332j)*x[0] + ((-0.961175659376-0.368184128575j))*x[1]
        ref[(1, 2, 0)]=(0.896841001825-0.865425921332j)*x_ref[0] + ((-0.961175659376-0.368184128575j))*x_ref[1]
        arg[(1, 2, 1)]=(0.755680515772-0.507197687065j)*x[0] + ((-0.709344806516-0.920845573965j))*x[1]
        ref[(1, 2, 1)]=(0.755680515772-0.507197687065j)*x_ref[0] + ((-0.709344806516-0.920845573965j))*x_ref[1]
        arg[(1, 2, 2)]=(0.0415026038872+0.745319393807j)*x[0] + ((0.52471972023-0.77451954985j))*x[1]
        ref[(1, 2, 2)]=(0.0415026038872+0.745319393807j)*x_ref[0] + ((0.52471972023-0.77451954985j))*x_ref[1]
        arg[(1, 2, 3)]=(0.102667784221-0.79465854439j)*x[0] + ((-0.0374534414289-0.776878196505j))*x[1]
        ref[(1, 2, 3)]=(0.102667784221-0.79465854439j)*x_ref[0] + ((-0.0374534414289-0.776878196505j))*x_ref[1]
        arg[(1, 3, 0)]=(-0.891244055516-0.686348645643j)*x[0] + ((-0.0905027881223+0.29571242476j))*x[1]
        ref[(1, 3, 0)]=(-0.891244055516-0.686348645643j)*x_ref[0] + ((-0.0905027881223+0.29571242476j))*x_ref[1]
        arg[(1, 3, 1)]=(0.0862546492442+0.279187742231j)*x[0] + ((0.0389829739671+0.624044228486j))*x[1]
        ref[(1, 3, 1)]=(0.0862546492442+0.279187742231j)*x_ref[0] + ((0.0389829739671+0.624044228486j))*x_ref[1]
        arg[(1, 3, 2)]=(0.299542311793-0.125307879713j)*x[0] + ((-0.320696461928-0.650360617696j))*x[1]
        ref[(1, 3, 2)]=(0.299542311793-0.125307879713j)*x_ref[0] + ((-0.320696461928-0.650360617696j))*x_ref[1]
        arg[(1, 3, 3)]=(-0.105536808495+0.171119047394j)*x[0] + ((0.00341297340795+0.66820604292j))*x[1]
        ref[(1, 3, 3)]=(-0.105536808495+0.171119047394j)*x_ref[0] + ((0.00341297340795+0.66820604292j))*x_ref[1]
        arg[(2, 0, 0)]=(0.964296450656+0.559579037774j)*x[0] + ((0.885144817158+0.888746182718j))*x[1]
        ref[(2, 0, 0)]=(0.964296450656+0.559579037774j)*x_ref[0] + ((0.885144817158+0.888746182718j))*x_ref[1]
        arg[(2, 0, 1)]=(-0.0403137184293+0.930216003666j)*x[0] + ((0.441838342351-0.993260198587j))*x[1]
        ref[(2, 0, 1)]=(-0.0403137184293+0.930216003666j)*x_ref[0] + ((0.441838342351-0.993260198587j))*x_ref[1]
        arg[(2, 0, 2)]=(-0.219263151914-0.22575897916j)*x[0] + ((0.771168322513-0.659136292791j))*x[1]
        ref[(2, 0, 2)]=(-0.219263151914-0.22575897916j)*x_ref[0] + ((0.771168322513-0.659136292791j))*x_ref[1]
        arg[(2, 0, 3)]=(-0.340394463537+0.262828508228j)*x[0] + ((-0.597562252566+0.959722728957j))*x[1]
        ref[(2, 0, 3)]=(-0.340394463537+0.262828508228j)*x_ref[0] + ((-0.597562252566+0.959722728957j))*x_ref[1]
        arg[(2, 1, 0)]=(0.320898906492+0.471008787333j)*x[0] + ((-0.513041382336+0.27994583967j))*x[1]
        ref[(2, 1, 0)]=(0.320898906492+0.471008787333j)*x_ref[0] + ((-0.513041382336+0.27994583967j))*x_ref[1]
        arg[(2, 1, 1)]=(0.965948093145-0.59421473828j)*x[0] + ((0.0104125801151-0.0716953285501j))*x[1]
        ref[(2, 1, 1)]=(0.965948093145-0.59421473828j)*x_ref[0] + ((0.0104125801151-0.0716953285501j))*x_ref[1]
        arg[(2, 1, 2)]=(0.875626416269-0.483029743794j)*x[0] + ((0.5294927119-0.222066452463j))*x[1]
        ref[(2, 1, 2)]=(0.875626416269-0.483029743794j)*x_ref[0] + ((0.5294927119-0.222066452463j))*x_ref[1]
        arg[(2, 1, 3)]=(0.0999124353419-0.333161943223j)*x[0] + ((-0.992822998466+0.950251870679j))*x[1]
        ref[(2, 1, 3)]=(0.0999124353419-0.333161943223j)*x_ref[0] + ((-0.992822998466+0.950251870679j))*x_ref[1]
        arg[(2, 2, 0)]=(0.54392028184+0.98979407967j)*x[0] + ((-0.319235825891-0.62872511411j))*x[1]
        ref[(2, 2, 0)]=(0.54392028184+0.98979407967j)*x_ref[0] + ((-0.319235825891-0.62872511411j))*x_ref[1]
        arg[(2, 2, 1)]=(0.69517462555-0.0142696334722j)*x[0] + ((0.102170683997+0.0668800373628j))*x[1]
        ref[(2, 2, 1)]=(0.69517462555-0.0142696334722j)*x_ref[0] + ((0.102170683997+0.0668800373628j))*x_ref[1]
        arg[(2, 2, 2)]=(0.060970161035+0.595451555144j)*x[0] + ((-0.557705846639-0.811235387541j))*x[1]
        ref[(2, 2, 2)]=(0.060970161035+0.595451555144j)*x_ref[0] + ((-0.557705846639-0.811235387541j))*x_ref[1]
        arg[(2, 2, 3)]=(0.992225454778+0.19026241092j)*x[0] + ((-0.093126990454+0.526403844525j))*x[1]
        ref[(2, 2, 3)]=(0.992225454778+0.19026241092j)*x_ref[0] + ((-0.093126990454+0.526403844525j))*x_ref[1]
        arg[(2, 3, 0)]=(0.970175960753+0.786676051734j)*x[0] + ((-0.364782340243+0.47904073928j))*x[1]
        ref[(2, 3, 0)]=(0.970175960753+0.786676051734j)*x_ref[0] + ((-0.364782340243+0.47904073928j))*x_ref[1]
        arg[(2, 3, 1)]=(0.137976997314-0.610962136233j)*x[0] + ((-0.622601278281-0.985515566683j))*x[1]
        ref[(2, 3, 1)]=(0.137976997314-0.610962136233j)*x_ref[0] + ((-0.622601278281-0.985515566683j))*x_ref[1]
        arg[(2, 3, 2)]=(0.392708640903-0.316446592408j)*x[0] + ((-0.129882846053-0.508264027898j))*x[1]
        ref[(2, 3, 2)]=(0.392708640903-0.316446592408j)*x_ref[0] + ((-0.129882846053-0.508264027898j))*x_ref[1]
        arg[(2, 3, 3)]=(-0.337155484352-0.818811951512j)*x[0] + ((0.0202008790186+0.832201857322j))*x[1]
        ref[(2, 3, 3)]=(-0.337155484352-0.818811951512j)*x_ref[0] + ((0.0202008790186+0.832201857322j))*x_ref[1]
        arg[(3, 0, 0)]=(0.407402681834+0.685970554947j)*x[0] + ((-0.80606791349-0.932695515827j))*x[1]
        ref[(3, 0, 0)]=(0.407402681834+0.685970554947j)*x_ref[0] + ((-0.80606791349-0.932695515827j))*x_ref[1]
        arg[(3, 0, 1)]=(0.685715978096-0.427598273017j)*x[0] + ((0.798732489652-0.275089186832j))*x[1]
        ref[(3, 0, 1)]=(0.685715978096-0.427598273017j)*x_ref[0] + ((0.798732489652-0.275089186832j))*x_ref[1]
        arg[(3, 0, 2)]=(-0.33057119352+0.44918408477j)*x[0] + ((-0.343302470351-0.584948373425j))*x[1]
        ref[(3, 0, 2)]=(-0.33057119352+0.44918408477j)*x_ref[0] + ((-0.343302470351-0.584948373425j))*x_ref[1]
        arg[(3, 0, 3)]=(-0.519828556865+0.738132301546j)*x[0] + ((0.837388539874+0.302159115772j))*x[1]
        ref[(3, 0, 3)]=(-0.519828556865+0.738132301546j)*x_ref[0] + ((0.837388539874+0.302159115772j))*x_ref[1]
        arg[(3, 1, 0)]=(-0.26008058546-0.414309167102j)*x[0] + ((0.198110560517+0.909722810027j))*x[1]
        ref[(3, 1, 0)]=(-0.26008058546-0.414309167102j)*x_ref[0] + ((0.198110560517+0.909722810027j))*x_ref[1]
        arg[(3, 1, 1)]=(-0.163033344173-0.591969668704j)*x[0] + ((0.440480608581-0.489887683155j))*x[1]
        ref[(3, 1, 1)]=(-0.163033344173-0.591969668704j)*x_ref[0] + ((0.440480608581-0.489887683155j))*x_ref[1]
        arg[(3, 1, 2)]=(-0.501495782934+0.111908752543j)*x[0] + ((0.431023764569-0.00172648928322j))*x[1]
        ref[(3, 1, 2)]=(-0.501495782934+0.111908752543j)*x_ref[0] + ((0.431023764569-0.00172648928322j))*x_ref[1]
        arg[(3, 1, 3)]=(0.745573961774+0.53552447765j)*x[0] + ((0.740753502699-0.0223767525527j))*x[1]
        ref[(3, 1, 3)]=(0.745573961774+0.53552447765j)*x_ref[0] + ((0.740753502699-0.0223767525527j))*x_ref[1]
        arg[(3, 2, 0)]=(0.419343798909+0.745113849314j)*x[0] + ((0.603728913355+0.0375624029137j))*x[1]
        ref[(3, 2, 0)]=(0.419343798909+0.745113849314j)*x_ref[0] + ((0.603728913355+0.0375624029137j))*x_ref[1]
        arg[(3, 2, 1)]=(-0.556756908899+0.909868478186j)*x[0] + ((0.769430023616-0.0209516928675j))*x[1]
        ref[(3, 2, 1)]=(-0.556756908899+0.909868478186j)*x_ref[0] + ((0.769430023616-0.0209516928675j))*x_ref[1]
        arg[(3, 2, 2)]=(-0.218539909726-0.975193729328j)*x[0] + ((0.264192636771+0.561920230991j))*x[1]
        ref[(3, 2, 2)]=(-0.218539909726-0.975193729328j)*x_ref[0] + ((0.264192636771+0.561920230991j))*x_ref[1]
        arg[(3, 2, 3)]=(-0.598705429851+0.731330184238j)*x[0] + ((0.354975442866+0.700725374263j))*x[1]
        ref[(3, 2, 3)]=(-0.598705429851+0.731330184238j)*x_ref[0] + ((0.354975442866+0.700725374263j))*x_ref[1]
        arg[(3, 3, 0)]=(-0.196301450151-0.973357795606j)*x[0] + ((0.00248994110462-0.628259880656j))*x[1]
        ref[(3, 3, 0)]=(-0.196301450151-0.973357795606j)*x_ref[0] + ((0.00248994110462-0.628259880656j))*x_ref[1]
        arg[(3, 3, 1)]=(-0.592629613065-0.97899396468j)*x[0] + ((0.468375316816-0.385966373649j))*x[1]
        ref[(3, 3, 1)]=(-0.592629613065-0.97899396468j)*x_ref[0] + ((0.468375316816-0.385966373649j))*x_ref[1]
        arg[(3, 3, 2)]=(-0.84776944341+0.940660143578j)*x[0] + ((-0.650517654443-0.647058928178j))*x[1]
        ref[(3, 3, 2)]=(-0.84776944341+0.940660143578j)*x_ref[0] + ((-0.650517654443-0.647058928178j))*x_ref[1]
        arg[(3, 3, 3)]=(-0.460172866295+0.470159947583j)*x[0] + ((-0.0875053819816+0.431674703563j))*x[1]
        ref[(3, 3, 3)]=(-0.460172866295+0.470159947583j)*x_ref[0] + ((-0.0875053819816+0.431674703563j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.319288548595+0.376000644077j)*x[2]
            ref[(0, 0, 0)]+=(0.319288548595+0.376000644077j)*x_ref[2]
            arg[(0, 0, 1)]+=(-0.775024215675-0.200319765257j)*x[2]
            ref[(0, 0, 1)]+=(-0.775024215675-0.200319765257j)*x_ref[2]
            arg[(0, 0, 2)]+=(0.19134749591-0.466768002647j)*x[2]
            ref[(0, 0, 2)]+=(0.19134749591-0.466768002647j)*x_ref[2]
            arg[(0, 0, 3)]+=(0.638524573508+0.138066798366j)*x[2]
            ref[(0, 0, 3)]+=(0.638524573508+0.138066798366j)*x_ref[2]
            arg[(0, 1, 0)]+=(0.677828848532-0.963440374989j)*x[2]
            ref[(0, 1, 0)]+=(0.677828848532-0.963440374989j)*x_ref[2]
            arg[(0, 1, 1)]+=(0.643850785618+0.844406079708j)*x[2]
            ref[(0, 1, 1)]+=(0.643850785618+0.844406079708j)*x_ref[2]
            arg[(0, 1, 2)]+=(-0.913896840369-0.500088012242j)*x[2]
            ref[(0, 1, 2)]+=(-0.913896840369-0.500088012242j)*x_ref[2]
            arg[(0, 1, 3)]+=(-0.52448050739-0.910092824305j)*x[2]
            ref[(0, 1, 3)]+=(-0.52448050739-0.910092824305j)*x_ref[2]
            arg[(0, 2, 0)]+=(0.779930856009-0.78899907694j)*x[2]
            ref[(0, 2, 0)]+=(0.779930856009-0.78899907694j)*x_ref[2]
            arg[(0, 2, 1)]+=(-0.221443895408+0.887783386826j)*x[2]
            ref[(0, 2, 1)]+=(-0.221443895408+0.887783386826j)*x_ref[2]
            arg[(0, 2, 2)]+=(-0.424363440054-0.664115256745j)*x[2]
            ref[(0, 2, 2)]+=(-0.424363440054-0.664115256745j)*x_ref[2]
            arg[(0, 2, 3)]+=(0.710490830773+0.224297414627j)*x[2]
            ref[(0, 2, 3)]+=(0.710490830773+0.224297414627j)*x_ref[2]
            arg[(0, 3, 0)]+=(-0.34238634217+0.947842610206j)*x[2]
            ref[(0, 3, 0)]+=(-0.34238634217+0.947842610206j)*x_ref[2]
            arg[(0, 3, 1)]+=(0.835456458957-0.348655017j)*x[2]
            ref[(0, 3, 1)]+=(0.835456458957-0.348655017j)*x_ref[2]
            arg[(0, 3, 2)]+=(-0.465250271495-0.556031229495j)*x[2]
            ref[(0, 3, 2)]+=(-0.465250271495-0.556031229495j)*x_ref[2]
            arg[(0, 3, 3)]+=(-0.57282111878-0.424317744709j)*x[2]
            ref[(0, 3, 3)]+=(-0.57282111878-0.424317744709j)*x_ref[2]
            arg[(1, 0, 0)]+=(0.0958370406222+0.760034972259j)*x[2]
            ref[(1, 0, 0)]+=(0.0958370406222+0.760034972259j)*x_ref[2]
            arg[(1, 0, 1)]+=(-0.598636353977+0.774319392737j)*x[2]
            ref[(1, 0, 1)]+=(-0.598636353977+0.774319392737j)*x_ref[2]
            arg[(1, 0, 2)]+=(0.697919082029+0.867390934847j)*x[2]
            ref[(1, 0, 2)]+=(0.697919082029+0.867390934847j)*x_ref[2]
            arg[(1, 0, 3)]+=(-0.756751754361+0.35510043052j)*x[2]
            ref[(1, 0, 3)]+=(-0.756751754361+0.35510043052j)*x_ref[2]
            arg[(1, 1, 0)]+=(0.303458283188+0.253024255045j)*x[2]
            ref[(1, 1, 0)]+=(0.303458283188+0.253024255045j)*x_ref[2]
            arg[(1, 1, 1)]+=(0.950509874111+0.660676996916j)*x[2]
            ref[(1, 1, 1)]+=(0.950509874111+0.660676996916j)*x_ref[2]
            arg[(1, 1, 2)]+=(-0.186854085601-0.664355755808j)*x[2]
            ref[(1, 1, 2)]+=(-0.186854085601-0.664355755808j)*x_ref[2]
            arg[(1, 1, 3)]+=(0.28591539777-0.658624071423j)*x[2]
            ref[(1, 1, 3)]+=(0.28591539777-0.658624071423j)*x_ref[2]
            arg[(1, 2, 0)]+=(0.860576391568+0.220896098166j)*x[2]
            ref[(1, 2, 0)]+=(0.860576391568+0.220896098166j)*x_ref[2]
            arg[(1, 2, 1)]+=(0.88321894618-0.934742600827j)*x[2]
            ref[(1, 2, 1)]+=(0.88321894618-0.934742600827j)*x_ref[2]
            arg[(1, 2, 2)]+=(-0.885917028573-0.701862901649j)*x[2]
            ref[(1, 2, 2)]+=(-0.885917028573-0.701862901649j)*x_ref[2]
            arg[(1, 2, 3)]+=(-0.489901586142-0.430962714786j)*x[2]
            ref[(1, 2, 3)]+=(-0.489901586142-0.430962714786j)*x_ref[2]
            arg[(1, 3, 0)]+=(0.83564240702+0.0093959075119j)*x[2]
            ref[(1, 3, 0)]+=(0.83564240702+0.0093959075119j)*x_ref[2]
            arg[(1, 3, 1)]+=(0.760631764934+0.466220578841j)*x[2]
            ref[(1, 3, 1)]+=(0.760631764934+0.466220578841j)*x_ref[2]
            arg[(1, 3, 2)]+=(-0.99765643139-0.151591399439j)*x[2]
            ref[(1, 3, 2)]+=(-0.99765643139-0.151591399439j)*x_ref[2]
            arg[(1, 3, 3)]+=(-0.0970464397322+0.752917425188j)*x[2]
            ref[(1, 3, 3)]+=(-0.0970464397322+0.752917425188j)*x_ref[2]
            arg[(2, 0, 0)]+=(0.340946191331-0.528625226127j)*x[2]
            ref[(2, 0, 0)]+=(0.340946191331-0.528625226127j)*x_ref[2]
            arg[(2, 0, 1)]+=(-0.631991008454-0.695108480886j)*x[2]
            ref[(2, 0, 1)]+=(-0.631991008454-0.695108480886j)*x_ref[2]
            arg[(2, 0, 2)]+=(-0.218700908626-0.270344822141j)*x[2]
            ref[(2, 0, 2)]+=(-0.218700908626-0.270344822141j)*x_ref[2]
            arg[(2, 0, 3)]+=(0.26708344971-0.501144710072j)*x[2]
            ref[(2, 0, 3)]+=(0.26708344971-0.501144710072j)*x_ref[2]
            arg[(2, 1, 0)]+=(-0.587089128393+0.17602470657j)*x[2]
            ref[(2, 1, 0)]+=(-0.587089128393+0.17602470657j)*x_ref[2]
            arg[(2, 1, 1)]+=(-0.424388632356+0.0806871542138j)*x[2]
            ref[(2, 1, 1)]+=(-0.424388632356+0.0806871542138j)*x_ref[2]
            arg[(2, 1, 2)]+=(-0.815835943557+0.227059858739j)*x[2]
            ref[(2, 1, 2)]+=(-0.815835943557+0.227059858739j)*x_ref[2]
            arg[(2, 1, 3)]+=(0.748188608707-0.970608144862j)*x[2]
            ref[(2, 1, 3)]+=(0.748188608707-0.970608144862j)*x_ref[2]
            arg[(2, 2, 0)]+=(0.724354658657-0.703579971126j)*x[2]
            ref[(2, 2, 0)]+=(0.724354658657-0.703579971126j)*x_ref[2]
            arg[(2, 2, 1)]+=(0.479266622879-0.595241141127j)*x[2]
            ref[(2, 2, 1)]+=(0.479266622879-0.595241141127j)*x_ref[2]
            arg[(2, 2, 2)]+=(-0.644332613063-0.184788371627j)*x[2]
            ref[(2, 2, 2)]+=(-0.644332613063-0.184788371627j)*x_ref[2]
            arg[(2, 2, 3)]+=(0.629840378422+0.448614406674j)*x[2]
            ref[(2, 2, 3)]+=(0.629840378422+0.448614406674j)*x_ref[2]
            arg[(2, 3, 0)]+=(0.275308346343-0.388896802638j)*x[2]
            ref[(2, 3, 0)]+=(0.275308346343-0.388896802638j)*x_ref[2]
            arg[(2, 3, 1)]+=(0.547683374312-0.802978452141j)*x[2]
            ref[(2, 3, 1)]+=(0.547683374312-0.802978452141j)*x_ref[2]
            arg[(2, 3, 2)]+=(0.776922529994-0.68128923166j)*x[2]
            ref[(2, 3, 2)]+=(0.776922529994-0.68128923166j)*x_ref[2]
            arg[(2, 3, 3)]+=(0.0124469071206+0.262948107362j)*x[2]
            ref[(2, 3, 3)]+=(0.0124469071206+0.262948107362j)*x_ref[2]
            arg[(3, 0, 0)]+=(0.197526582884-0.387015909395j)*x[2]
            ref[(3, 0, 0)]+=(0.197526582884-0.387015909395j)*x_ref[2]
            arg[(3, 0, 1)]+=(-0.688996225086+0.471510748271j)*x[2]
            ref[(3, 0, 1)]+=(-0.688996225086+0.471510748271j)*x_ref[2]
            arg[(3, 0, 2)]+=(-0.180998162336+0.74715169785j)*x[2]
            ref[(3, 0, 2)]+=(-0.180998162336+0.74715169785j)*x_ref[2]
            arg[(3, 0, 3)]+=(0.502260253214-0.443133185562j)*x[2]
            ref[(3, 0, 3)]+=(0.502260253214-0.443133185562j)*x_ref[2]
            arg[(3, 1, 0)]+=(-0.279891811021+0.612207234573j)*x[2]
            ref[(3, 1, 0)]+=(-0.279891811021+0.612207234573j)*x_ref[2]
            arg[(3, 1, 1)]+=(0.513141660993+0.242853542448j)*x[2]
            ref[(3, 1, 1)]+=(0.513141660993+0.242853542448j)*x_ref[2]
            arg[(3, 1, 2)]+=(0.841180433655-0.117680879196j)*x[2]
            ref[(3, 1, 2)]+=(0.841180433655-0.117680879196j)*x_ref[2]
            arg[(3, 1, 3)]+=(0.258984868929-0.576810609777j)*x[2]
            ref[(3, 1, 3)]+=(0.258984868929-0.576810609777j)*x_ref[2]
            arg[(3, 2, 0)]+=(0.230376010348-0.748076905017j)*x[2]
            ref[(3, 2, 0)]+=(0.230376010348-0.748076905017j)*x_ref[2]
            arg[(3, 2, 1)]+=(0.504471492047+0.852561168691j)*x[2]
            ref[(3, 2, 1)]+=(0.504471492047+0.852561168691j)*x_ref[2]
            arg[(3, 2, 2)]+=(-0.143739510294+0.489877774134j)*x[2]
            ref[(3, 2, 2)]+=(-0.143739510294+0.489877774134j)*x_ref[2]
            arg[(3, 2, 3)]+=(0.563099000864-0.32337637509j)*x[2]
            ref[(3, 2, 3)]+=(0.563099000864-0.32337637509j)*x_ref[2]
            arg[(3, 3, 0)]+=(0.341476149338+0.394989240017j)*x[2]
            ref[(3, 3, 0)]+=(0.341476149338+0.394989240017j)*x_ref[2]
            arg[(3, 3, 1)]+=(-0.45518153863-0.353844743387j)*x[2]
            ref[(3, 3, 1)]+=(-0.45518153863-0.353844743387j)*x_ref[2]
            arg[(3, 3, 2)]+=(0.0593971057081-0.0634767231609j)*x[2]
            ref[(3, 3, 2)]+=(0.0593971057081-0.0634767231609j)*x_ref[2]
            arg[(3, 3, 3)]+=(0.158841179464-0.890197125947j)*x[2]
            ref[(3, 3, 3)]+=(0.158841179464-0.890197125947j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 3, 4),w)
        ref = Data(0,(2, 2, 3, 4),w_ref)
        arg[(0, 0, 0, 0)]=(-0.641078084577+0.918973768016j)*x[0] + ((0.261234555848+0.949787092528j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.641078084577+0.918973768016j)*x_ref[0] + ((0.261234555848+0.949787092528j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.655634800965-0.350233430487j)*x[0] + ((-0.627308521836+0.82274947731j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.655634800965-0.350233430487j)*x_ref[0] + ((-0.627308521836+0.82274947731j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.950918526529+0.495323278508j)*x[0] + ((0.00562881910014-0.90132379158j))*x[1]
        ref[(0, 0, 0, 2)]=(0.950918526529+0.495323278508j)*x_ref[0] + ((0.00562881910014-0.90132379158j))*x_ref[1]
        arg[(0, 0, 0, 3)]=(0.870632465315+0.994199033594j)*x[0] + ((-0.61981175361+0.0669988772929j))*x[1]
        ref[(0, 0, 0, 3)]=(0.870632465315+0.994199033594j)*x_ref[0] + ((-0.61981175361+0.0669988772929j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.307030774362-0.907836925571j)*x[0] + ((-0.686838445883+0.74426107891j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.307030774362-0.907836925571j)*x_ref[0] + ((-0.686838445883+0.74426107891j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.556424250196-0.0619590775142j)*x[0] + ((-0.293656512577+0.587354856627j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.556424250196-0.0619590775142j)*x_ref[0] + ((-0.293656512577+0.587354856627j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(-0.0498112021853-0.130750670572j)*x[0] + ((-0.984434605573+0.86596901977j))*x[1]
        ref[(0, 0, 1, 2)]=(-0.0498112021853-0.130750670572j)*x_ref[0] + ((-0.984434605573+0.86596901977j))*x_ref[1]
        arg[(0, 0, 1, 3)]=(-0.947149784395+0.302882254002j)*x[0] + ((-0.720959826189+0.609881081339j))*x[1]
        ref[(0, 0, 1, 3)]=(-0.947149784395+0.302882254002j)*x_ref[0] + ((-0.720959826189+0.609881081339j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(-0.116363002458-0.117321102515j)*x[0] + ((0.827406067396+0.913576959643j))*x[1]
        ref[(0, 0, 2, 0)]=(-0.116363002458-0.117321102515j)*x_ref[0] + ((0.827406067396+0.913576959643j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(0.108216710332-0.609801740634j)*x[0] + ((0.722114781225+0.489616180569j))*x[1]
        ref[(0, 0, 2, 1)]=(0.108216710332-0.609801740634j)*x_ref[0] + ((0.722114781225+0.489616180569j))*x_ref[1]
        arg[(0, 0, 2, 2)]=(-0.620270437657+0.705080299055j)*x[0] + ((-0.979914126853+0.00325851625408j))*x[1]
        ref[(0, 0, 2, 2)]=(-0.620270437657+0.705080299055j)*x_ref[0] + ((-0.979914126853+0.00325851625408j))*x_ref[1]
        arg[(0, 0, 2, 3)]=(-0.901042076607-0.319411369224j)*x[0] + ((0.0724991958606+0.969491643698j))*x[1]
        ref[(0, 0, 2, 3)]=(-0.901042076607-0.319411369224j)*x_ref[0] + ((0.0724991958606+0.969491643698j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.627088244737+0.975909048715j)*x[0] + ((-0.00714104438544-0.903725341462j))*x[1]
        ref[(0, 1, 0, 0)]=(0.627088244737+0.975909048715j)*x_ref[0] + ((-0.00714104438544-0.903725341462j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.507015393336+0.643411790727j)*x[0] + ((-0.772767400794-0.0179515241632j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.507015393336+0.643411790727j)*x_ref[0] + ((-0.772767400794-0.0179515241632j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(0.805833106938-0.547377285752j)*x[0] + ((0.694870188547-0.411058024673j))*x[1]
        ref[(0, 1, 0, 2)]=(0.805833106938-0.547377285752j)*x_ref[0] + ((0.694870188547-0.411058024673j))*x_ref[1]
        arg[(0, 1, 0, 3)]=(0.713509869016+0.17148991422j)*x[0] + ((-0.179192051485+0.502636284024j))*x[1]
        ref[(0, 1, 0, 3)]=(0.713509869016+0.17148991422j)*x_ref[0] + ((-0.179192051485+0.502636284024j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.671285218399+0.0479087959237j)*x[0] + ((0.312772965235+0.539926896128j))*x[1]
        ref[(0, 1, 1, 0)]=(0.671285218399+0.0479087959237j)*x_ref[0] + ((0.312772965235+0.539926896128j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.679331853982-0.61329069829j)*x[0] + ((-0.572026178356+0.89108686495j))*x[1]
        ref[(0, 1, 1, 1)]=(0.679331853982-0.61329069829j)*x_ref[0] + ((-0.572026178356+0.89108686495j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(0.104125378634-0.828442874868j)*x[0] + ((-0.773267848083+0.473750215909j))*x[1]
        ref[(0, 1, 1, 2)]=(0.104125378634-0.828442874868j)*x_ref[0] + ((-0.773267848083+0.473750215909j))*x_ref[1]
        arg[(0, 1, 1, 3)]=(0.711011697083+0.101471094001j)*x[0] + ((0.816952776155-0.626958300746j))*x[1]
        ref[(0, 1, 1, 3)]=(0.711011697083+0.101471094001j)*x_ref[0] + ((0.816952776155-0.626958300746j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(0.420305392433-0.29750811172j)*x[0] + ((0.489913850409-0.729170687449j))*x[1]
        ref[(0, 1, 2, 0)]=(0.420305392433-0.29750811172j)*x_ref[0] + ((0.489913850409-0.729170687449j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(0.370341576663-0.820792916501j)*x[0] + ((0.446688537465-0.477658358203j))*x[1]
        ref[(0, 1, 2, 1)]=(0.370341576663-0.820792916501j)*x_ref[0] + ((0.446688537465-0.477658358203j))*x_ref[1]
        arg[(0, 1, 2, 2)]=(-0.368564924376-0.294431300425j)*x[0] + ((-0.240222178324+0.590467051906j))*x[1]
        ref[(0, 1, 2, 2)]=(-0.368564924376-0.294431300425j)*x_ref[0] + ((-0.240222178324+0.590467051906j))*x_ref[1]
        arg[(0, 1, 2, 3)]=(0.643312744479+0.976958653078j)*x[0] + ((-0.581549246641+0.739319241966j))*x[1]
        ref[(0, 1, 2, 3)]=(0.643312744479+0.976958653078j)*x_ref[0] + ((-0.581549246641+0.739319241966j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.477517020381+0.765210388481j)*x[0] + ((0.746728909363+0.684781965999j))*x[1]
        ref[(1, 0, 0, 0)]=(0.477517020381+0.765210388481j)*x_ref[0] + ((0.746728909363+0.684781965999j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.473155374784-0.348762993871j)*x[0] + ((0.0452049808265-0.204383949893j))*x[1]
        ref[(1, 0, 0, 1)]=(0.473155374784-0.348762993871j)*x_ref[0] + ((0.0452049808265-0.204383949893j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(0.431509917676-0.477805405064j)*x[0] + ((-0.120112591927+0.678442256651j))*x[1]
        ref[(1, 0, 0, 2)]=(0.431509917676-0.477805405064j)*x_ref[0] + ((-0.120112591927+0.678442256651j))*x_ref[1]
        arg[(1, 0, 0, 3)]=(0.522704671993+0.380369574887j)*x[0] + ((0.960021996752-0.90630862976j))*x[1]
        ref[(1, 0, 0, 3)]=(0.522704671993+0.380369574887j)*x_ref[0] + ((0.960021996752-0.90630862976j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.978349945482+0.980715349701j)*x[0] + ((-0.358357772094-0.615804135046j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.978349945482+0.980715349701j)*x_ref[0] + ((-0.358357772094-0.615804135046j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.967145523071+0.427932120873j)*x[0] + ((0.404373509335-0.31964167579j))*x[1]
        ref[(1, 0, 1, 1)]=(0.967145523071+0.427932120873j)*x_ref[0] + ((0.404373509335-0.31964167579j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(-0.15970753477+0.857192147963j)*x[0] + ((-0.0260330418234-0.528722920613j))*x[1]
        ref[(1, 0, 1, 2)]=(-0.15970753477+0.857192147963j)*x_ref[0] + ((-0.0260330418234-0.528722920613j))*x_ref[1]
        arg[(1, 0, 1, 3)]=(0.114476525532-0.914466126402j)*x[0] + ((-0.737993453338-0.764446705376j))*x[1]
        ref[(1, 0, 1, 3)]=(0.114476525532-0.914466126402j)*x_ref[0] + ((-0.737993453338-0.764446705376j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(0.787701998056+0.285362161516j)*x[0] + ((-0.522316983514+0.276632007109j))*x[1]
        ref[(1, 0, 2, 0)]=(0.787701998056+0.285362161516j)*x_ref[0] + ((-0.522316983514+0.276632007109j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(-0.984952868941+0.15238863145j)*x[0] + ((-0.293006472917-0.154824722937j))*x[1]
        ref[(1, 0, 2, 1)]=(-0.984952868941+0.15238863145j)*x_ref[0] + ((-0.293006472917-0.154824722937j))*x_ref[1]
        arg[(1, 0, 2, 2)]=(0.72932666836-0.334644033448j)*x[0] + ((0.698148640153+0.392538087596j))*x[1]
        ref[(1, 0, 2, 2)]=(0.72932666836-0.334644033448j)*x_ref[0] + ((0.698148640153+0.392538087596j))*x_ref[1]
        arg[(1, 0, 2, 3)]=(0.39069537336-0.18833832893j)*x[0] + ((-0.283463656149+0.346617330371j))*x[1]
        ref[(1, 0, 2, 3)]=(0.39069537336-0.18833832893j)*x_ref[0] + ((-0.283463656149+0.346617330371j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.284007903642+0.945474280574j)*x[0] + ((0.327167670116-0.199474263381j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.284007903642+0.945474280574j)*x_ref[0] + ((0.327167670116-0.199474263381j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.908583517053+0.94373788368j)*x[0] + ((0.276031957787+0.451388594533j))*x[1]
        ref[(1, 1, 0, 1)]=(0.908583517053+0.94373788368j)*x_ref[0] + ((0.276031957787+0.451388594533j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(-0.721870551988+0.983488442205j)*x[0] + ((0.889989269934-0.708654792272j))*x[1]
        ref[(1, 1, 0, 2)]=(-0.721870551988+0.983488442205j)*x_ref[0] + ((0.889989269934-0.708654792272j))*x_ref[1]
        arg[(1, 1, 0, 3)]=(-0.953606025775-0.582089580548j)*x[0] + ((-0.614555685534-0.317962856482j))*x[1]
        ref[(1, 1, 0, 3)]=(-0.953606025775-0.582089580548j)*x_ref[0] + ((-0.614555685534-0.317962856482j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.503053335266+0.876307826923j)*x[0] + ((-0.1831383887-0.16337798398j))*x[1]
        ref[(1, 1, 1, 0)]=(0.503053335266+0.876307826923j)*x_ref[0] + ((-0.1831383887-0.16337798398j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.429139708432+0.9696071421j)*x[0] + ((-0.689599144951+0.870257827666j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.429139708432+0.9696071421j)*x_ref[0] + ((-0.689599144951+0.870257827666j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(-0.0220926906768-0.416245020071j)*x[0] + ((0.401916144618-0.364877815011j))*x[1]
        ref[(1, 1, 1, 2)]=(-0.0220926906768-0.416245020071j)*x_ref[0] + ((0.401916144618-0.364877815011j))*x_ref[1]
        arg[(1, 1, 1, 3)]=(-0.18636773578-0.40934914147j)*x[0] + ((-0.470630514762-0.524198840988j))*x[1]
        ref[(1, 1, 1, 3)]=(-0.18636773578-0.40934914147j)*x_ref[0] + ((-0.470630514762-0.524198840988j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(-0.0138207304835-0.50026072036j)*x[0] + ((-0.679326389476-0.982319532354j))*x[1]
        ref[(1, 1, 2, 0)]=(-0.0138207304835-0.50026072036j)*x_ref[0] + ((-0.679326389476-0.982319532354j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(-0.996973098193-0.495402667751j)*x[0] + ((-0.929019039473+0.821400580667j))*x[1]
        ref[(1, 1, 2, 1)]=(-0.996973098193-0.495402667751j)*x_ref[0] + ((-0.929019039473+0.821400580667j))*x_ref[1]
        arg[(1, 1, 2, 2)]=(-0.78826278975-0.0617158034381j)*x[0] + ((0.708153176864+0.57109641831j))*x[1]
        ref[(1, 1, 2, 2)]=(-0.78826278975-0.0617158034381j)*x_ref[0] + ((0.708153176864+0.57109641831j))*x_ref[1]
        arg[(1, 1, 2, 3)]=(0.165954097174-0.545005480716j)*x[0] + ((0.49666732685-0.80864919339j))*x[1]
        ref[(1, 1, 2, 3)]=(0.165954097174-0.545005480716j)*x_ref[0] + ((0.49666732685-0.80864919339j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.0112225144704+0.573238537809j)*x[2]
            ref[(0, 0, 0, 0)]+=(-0.0112225144704+0.573238537809j)*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.637225518365+0.725652205538j)*x[2]
            ref[(0, 0, 0, 1)]+=(0.637225518365+0.725652205538j)*x_ref[2]
            arg[(0, 0, 0, 2)]+=(-0.283279997422-0.756386332558j)*x[2]
            ref[(0, 0, 0, 2)]+=(-0.283279997422-0.756386332558j)*x_ref[2]
            arg[(0, 0, 0, 3)]+=(-0.610354063444-0.915931012437j)*x[2]
            ref[(0, 0, 0, 3)]+=(-0.610354063444-0.915931012437j)*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.49481365273+0.197257543888j)*x[2]
            ref[(0, 0, 1, 0)]+=(-0.49481365273+0.197257543888j)*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.319823485907+0.176520075089j)*x[2]
            ref[(0, 0, 1, 1)]+=(-0.319823485907+0.176520075089j)*x_ref[2]
            arg[(0, 0, 1, 2)]+=(-0.696544974611+0.342437260206j)*x[2]
            ref[(0, 0, 1, 2)]+=(-0.696544974611+0.342437260206j)*x_ref[2]
            arg[(0, 0, 1, 3)]+=(0.00721202252053-0.0038891438462j)*x[2]
            ref[(0, 0, 1, 3)]+=(0.00721202252053-0.0038891438462j)*x_ref[2]
            arg[(0, 0, 2, 0)]+=(0.643674686781-0.405969029861j)*x[2]
            ref[(0, 0, 2, 0)]+=(0.643674686781-0.405969029861j)*x_ref[2]
            arg[(0, 0, 2, 1)]+=(-0.822386662106+0.678921946502j)*x[2]
            ref[(0, 0, 2, 1)]+=(-0.822386662106+0.678921946502j)*x_ref[2]
            arg[(0, 0, 2, 2)]+=(0.544938206004-0.655782840153j)*x[2]
            ref[(0, 0, 2, 2)]+=(0.544938206004-0.655782840153j)*x_ref[2]
            arg[(0, 0, 2, 3)]+=(-0.364130860525+0.0311202652392j)*x[2]
            ref[(0, 0, 2, 3)]+=(-0.364130860525+0.0311202652392j)*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.430632091916+0.0906710734783j)*x[2]
            ref[(0, 1, 0, 0)]+=(-0.430632091916+0.0906710734783j)*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.83603426921+0.132475785794j)*x[2]
            ref[(0, 1, 0, 1)]+=(-0.83603426921+0.132475785794j)*x_ref[2]
            arg[(0, 1, 0, 2)]+=(-0.000692664457461+0.60725840828j)*x[2]
            ref[(0, 1, 0, 2)]+=(-0.000692664457461+0.60725840828j)*x_ref[2]
            arg[(0, 1, 0, 3)]+=(0.871158683182-0.41725924786j)*x[2]
            ref[(0, 1, 0, 3)]+=(0.871158683182-0.41725924786j)*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.110477097231-0.150531391215j)*x[2]
            ref[(0, 1, 1, 0)]+=(-0.110477097231-0.150531391215j)*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.709961079659+0.12716850581j)*x[2]
            ref[(0, 1, 1, 1)]+=(0.709961079659+0.12716850581j)*x_ref[2]
            arg[(0, 1, 1, 2)]+=(-0.199869826166-0.116895174163j)*x[2]
            ref[(0, 1, 1, 2)]+=(-0.199869826166-0.116895174163j)*x_ref[2]
            arg[(0, 1, 1, 3)]+=(0.0219999972418+0.940973425616j)*x[2]
            ref[(0, 1, 1, 3)]+=(0.0219999972418+0.940973425616j)*x_ref[2]
            arg[(0, 1, 2, 0)]+=(0.43837912863+0.578778692145j)*x[2]
            ref[(0, 1, 2, 0)]+=(0.43837912863+0.578778692145j)*x_ref[2]
            arg[(0, 1, 2, 1)]+=(-0.874079566839+0.719867011038j)*x[2]
            ref[(0, 1, 2, 1)]+=(-0.874079566839+0.719867011038j)*x_ref[2]
            arg[(0, 1, 2, 2)]+=(0.375453436308-0.695984898092j)*x[2]
            ref[(0, 1, 2, 2)]+=(0.375453436308-0.695984898092j)*x_ref[2]
            arg[(0, 1, 2, 3)]+=(0.900793459345+0.902700946159j)*x[2]
            ref[(0, 1, 2, 3)]+=(0.900793459345+0.902700946159j)*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.874270415385+0.012541785285j)*x[2]
            ref[(1, 0, 0, 0)]+=(0.874270415385+0.012541785285j)*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.387960796699+0.242348643159j)*x[2]
            ref[(1, 0, 0, 1)]+=(0.387960796699+0.242348643159j)*x_ref[2]
            arg[(1, 0, 0, 2)]+=(0.223247116196+0.342930709548j)*x[2]
            ref[(1, 0, 0, 2)]+=(0.223247116196+0.342930709548j)*x_ref[2]
            arg[(1, 0, 0, 3)]+=(-0.769609265424+0.837232455138j)*x[2]
            ref[(1, 0, 0, 3)]+=(-0.769609265424+0.837232455138j)*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.159442149831+0.15886066558j)*x[2]
            ref[(1, 0, 1, 0)]+=(0.159442149831+0.15886066558j)*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.838327896951-0.853137025181j)*x[2]
            ref[(1, 0, 1, 1)]+=(-0.838327896951-0.853137025181j)*x_ref[2]
            arg[(1, 0, 1, 2)]+=(0.0371050704522+0.339700831852j)*x[2]
            ref[(1, 0, 1, 2)]+=(0.0371050704522+0.339700831852j)*x_ref[2]
            arg[(1, 0, 1, 3)]+=(-0.243469128175-0.302700906181j)*x[2]
            ref[(1, 0, 1, 3)]+=(-0.243469128175-0.302700906181j)*x_ref[2]
            arg[(1, 0, 2, 0)]+=(-0.374861425893-0.687306020459j)*x[2]
            ref[(1, 0, 2, 0)]+=(-0.374861425893-0.687306020459j)*x_ref[2]
            arg[(1, 0, 2, 1)]+=(-0.368609270117+0.317636888602j)*x[2]
            ref[(1, 0, 2, 1)]+=(-0.368609270117+0.317636888602j)*x_ref[2]
            arg[(1, 0, 2, 2)]+=(0.394237664947-0.402264651351j)*x[2]
            ref[(1, 0, 2, 2)]+=(0.394237664947-0.402264651351j)*x_ref[2]
            arg[(1, 0, 2, 3)]+=(0.743149846034-0.748283577651j)*x[2]
            ref[(1, 0, 2, 3)]+=(0.743149846034-0.748283577651j)*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.20396107528-0.741842439343j)*x[2]
            ref[(1, 1, 0, 0)]+=(-0.20396107528-0.741842439343j)*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.855740724352+0.589675423646j)*x[2]
            ref[(1, 1, 0, 1)]+=(0.855740724352+0.589675423646j)*x_ref[2]
            arg[(1, 1, 0, 2)]+=(0.806272090926-0.0905730047449j)*x[2]
            ref[(1, 1, 0, 2)]+=(0.806272090926-0.0905730047449j)*x_ref[2]
            arg[(1, 1, 0, 3)]+=(-0.471453658684-0.550670424795j)*x[2]
            ref[(1, 1, 0, 3)]+=(-0.471453658684-0.550670424795j)*x_ref[2]
            arg[(1, 1, 1, 0)]+=(-0.603225095573-0.604960485496j)*x[2]
            ref[(1, 1, 1, 0)]+=(-0.603225095573-0.604960485496j)*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.733219671746-0.441894396534j)*x[2]
            ref[(1, 1, 1, 1)]+=(-0.733219671746-0.441894396534j)*x_ref[2]
            arg[(1, 1, 1, 2)]+=(-0.840732092689-0.0101208260114j)*x[2]
            ref[(1, 1, 1, 2)]+=(-0.840732092689-0.0101208260114j)*x_ref[2]
            arg[(1, 1, 1, 3)]+=(-0.465188251037-0.441787815693j)*x[2]
            ref[(1, 1, 1, 3)]+=(-0.465188251037-0.441787815693j)*x_ref[2]
            arg[(1, 1, 2, 0)]+=(0.659025348823-0.210096371184j)*x[2]
            ref[(1, 1, 2, 0)]+=(0.659025348823-0.210096371184j)*x_ref[2]
            arg[(1, 1, 2, 1)]+=(-0.0687891231289+0.864180909895j)*x[2]
            ref[(1, 1, 2, 1)]+=(-0.0687891231289+0.864180909895j)*x_ref[2]
            arg[(1, 1, 2, 2)]+=(0.573567215772+0.49354282868j)*x[2]
            ref[(1, 1, 2, 2)]+=(0.573567215772+0.49354282868j)*x_ref[2]
            arg[(1, 1, 2, 3)]+=(0.460545956806+0.606184935705j)*x[2]
            ref[(1, 1, 2, 3)]+=(0.460545956806+0.606184935705j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ReducedFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports interpolation from ReducedFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.898558125797+0.0543560692468j)*x[0]**o + ((-0.645347625979-0.557630832597j))*x[0] + ((0.516002337343+0.946596329766j))*x[1]**o + ((-0.93509732237-0.218849785834j))*x[1]
        ref=(-0.898558125797+0.0543560692468j)*x_ref[0]**o + ((-0.645347625979-0.557630832597j))*x_ref[0] + ((0.516002337343+0.946596329766j))*x_ref[1]**o + ((-0.93509732237-0.218849785834j))*x_ref[1]
        if dim==3:
            arg+=((-0.0546192050155-0.0237677777274j))*x[2]**o + ((-0.197688052679+0.53842743488j))*x[2]
            ref+=((-0.0546192050155-0.0237677777274j))*x_ref[2]**o + ((-0.197688052679+0.53842743488j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ReducedFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports interpolation from ReducedFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=(0.684130070327+0.35429164125j)*x[0]**o + ((0.597552808874-0.057308501021j))*x[0] + ((0.718822088787-0.899270381586j))*x[1]**o + ((-0.555812380239-0.474314657352j))*x[1]
        ref[(0,)]=(0.684130070327+0.35429164125j)*x_ref[0]**o + ((0.597552808874-0.057308501021j))*x_ref[0] + ((0.718822088787-0.899270381586j))*x_ref[1]**o + ((-0.555812380239-0.474314657352j))*x_ref[1]
        arg[(1,)]=(-0.530982584516+0.324371235171j)*x[0]**o + ((0.91669675204-0.825755293026j))*x[0] + ((-0.0952207981039+0.299052635581j))*x[1]**o + ((-0.634075962397+0.915623137436j))*x[1]
        ref[(1,)]=(-0.530982584516+0.324371235171j)*x_ref[0]**o + ((0.91669675204-0.825755293026j))*x_ref[0] + ((-0.0952207981039+0.299052635581j))*x_ref[1]**o + ((-0.634075962397+0.915623137436j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.821338681701-0.999656559713j)*x[2]**o + ((0.150888806043+0.678559762343j))*x[2]
            ref[(0,)]+=(0.821338681701-0.999656559713j)*x_ref[2]**o + ((0.150888806043+0.678559762343j))*x_ref[2]
            arg[(1,)]+=(0.355700702807+0.0802834699484j)*x[2]**o + ((0.871561236434+0.860447330139j))*x[2]
            ref[(1,)]+=(0.355700702807+0.0802834699484j)*x_ref[2]**o + ((0.871561236434+0.860447330139j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ReducedFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports interpolation from ReducedFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref = Data(0,(4, 3),w_ref)
        arg[(0, 0)]=(0.212980192858+0.638272890605j)*x[0]**o + ((-0.791546520064+0.93701573862j))*x[0] + ((0.354025203829+0.613294080035j))*x[1]**o + ((-0.679631666733-0.832148911041j))*x[1]
        ref[(0, 0)]=(0.212980192858+0.638272890605j)*x_ref[0]**o + ((-0.791546520064+0.93701573862j))*x_ref[0] + ((0.354025203829+0.613294080035j))*x_ref[1]**o + ((-0.679631666733-0.832148911041j))*x_ref[1]
        arg[(0, 1)]=(0.567196778184-0.103933012878j)*x[0]**o + ((0.567175356188+0.973331543011j))*x[0] + ((0.00488814412918+0.109990551308j))*x[1]**o + ((-0.750657172394+0.70101689702j))*x[1]
        ref[(0, 1)]=(0.567196778184-0.103933012878j)*x_ref[0]**o + ((0.567175356188+0.973331543011j))*x_ref[0] + ((0.00488814412918+0.109990551308j))*x_ref[1]**o + ((-0.750657172394+0.70101689702j))*x_ref[1]
        arg[(0, 2)]=(0.0899735474916-0.900916385281j)*x[0]**o + ((0.348990095732-0.129798610284j))*x[0] + ((0.345472221971+0.018341947227j))*x[1]**o + ((0.391384074609+0.0475435423605j))*x[1]
        ref[(0, 2)]=(0.0899735474916-0.900916385281j)*x_ref[0]**o + ((0.348990095732-0.129798610284j))*x_ref[0] + ((0.345472221971+0.018341947227j))*x_ref[1]**o + ((0.391384074609+0.0475435423605j))*x_ref[1]
        arg[(1, 0)]=(0.315320967953+0.502788792564j)*x[0]**o + ((0.425496254728+0.338572182199j))*x[0] + ((-0.791938858556-0.096021945661j))*x[1]**o + ((0.539994243701+0.905299856539j))*x[1]
        ref[(1, 0)]=(0.315320967953+0.502788792564j)*x_ref[0]**o + ((0.425496254728+0.338572182199j))*x_ref[0] + ((-0.791938858556-0.096021945661j))*x_ref[1]**o + ((0.539994243701+0.905299856539j))*x_ref[1]
        arg[(1, 1)]=(-0.0974274226435-0.976092687507j)*x[0]**o + ((-0.767053394916-0.402879809569j))*x[0] + ((-0.34353136656-0.0217068518001j))*x[1]**o + ((0.660127238737+0.725036895188j))*x[1]
        ref[(1, 1)]=(-0.0974274226435-0.976092687507j)*x_ref[0]**o + ((-0.767053394916-0.402879809569j))*x_ref[0] + ((-0.34353136656-0.0217068518001j))*x_ref[1]**o + ((0.660127238737+0.725036895188j))*x_ref[1]
        arg[(1, 2)]=(-0.230492456918-0.874278842903j)*x[0]**o + ((0.193046331434+0.0317192140991j))*x[0] + ((-0.204271009349-0.897717080387j))*x[1]**o + ((-0.743947694599-0.725372739301j))*x[1]
        ref[(1, 2)]=(-0.230492456918-0.874278842903j)*x_ref[0]**o + ((0.193046331434+0.0317192140991j))*x_ref[0] + ((-0.204271009349-0.897717080387j))*x_ref[1]**o + ((-0.743947694599-0.725372739301j))*x_ref[1]
        arg[(2, 0)]=(-0.967918209289+0.377736862071j)*x[0]**o + ((-0.371454204923+0.483922111403j))*x[0] + ((0.873970818229-0.403363470205j))*x[1]**o + ((0.373408175826-0.853125829863j))*x[1]
        ref[(2, 0)]=(-0.967918209289+0.377736862071j)*x_ref[0]**o + ((-0.371454204923+0.483922111403j))*x_ref[0] + ((0.873970818229-0.403363470205j))*x_ref[1]**o + ((0.373408175826-0.853125829863j))*x_ref[1]
        arg[(2, 1)]=(0.395590104863+0.386695076412j)*x[0]**o + ((0.206827147658-0.28639827477j))*x[0] + ((-0.897993010648+0.523870210247j))*x[1]**o + ((0.5695535881+0.440820339875j))*x[1]
        ref[(2, 1)]=(0.395590104863+0.386695076412j)*x_ref[0]**o + ((0.206827147658-0.28639827477j))*x_ref[0] + ((-0.897993010648+0.523870210247j))*x_ref[1]**o + ((0.5695535881+0.440820339875j))*x_ref[1]
        arg[(2, 2)]=(-0.257881903956-0.770311753036j)*x[0]**o + ((-0.210331241142+0.286867212023j))*x[0] + ((-0.667337917161+0.152721789735j))*x[1]**o + ((0.532052894893+0.638428790951j))*x[1]
        ref[(2, 2)]=(-0.257881903956-0.770311753036j)*x_ref[0]**o + ((-0.210331241142+0.286867212023j))*x_ref[0] + ((-0.667337917161+0.152721789735j))*x_ref[1]**o + ((0.532052894893+0.638428790951j))*x_ref[1]
        arg[(3, 0)]=(0.734904441366+0.340105831218j)*x[0]**o + ((-0.567776061327+0.649707791206j))*x[0] + ((-0.572411758588+0.702902582462j))*x[1]**o + ((-0.649083329261+0.145003995874j))*x[1]
        ref[(3, 0)]=(0.734904441366+0.340105831218j)*x_ref[0]**o + ((-0.567776061327+0.649707791206j))*x_ref[0] + ((-0.572411758588+0.702902582462j))*x_ref[1]**o + ((-0.649083329261+0.145003995874j))*x_ref[1]
        arg[(3, 1)]=(-0.429751841942+0.709953981749j)*x[0]**o + ((-0.99627951218-0.295885447663j))*x[0] + ((0.218091111863+0.925204872822j))*x[1]**o + ((-0.406759781468+0.132169537874j))*x[1]
        ref[(3, 1)]=(-0.429751841942+0.709953981749j)*x_ref[0]**o + ((-0.99627951218-0.295885447663j))*x_ref[0] + ((0.218091111863+0.925204872822j))*x_ref[1]**o + ((-0.406759781468+0.132169537874j))*x_ref[1]
        arg[(3, 2)]=(-0.692462081073-0.72135852222j)*x[0]**o + ((0.618427158078+0.228187150303j))*x[0] + ((-0.0573508207357-0.4334934129j))*x[1]**o + ((0.902895044085+0.426410554851j))*x[1]
        ref[(3, 2)]=(-0.692462081073-0.72135852222j)*x_ref[0]**o + ((0.618427158078+0.228187150303j))*x_ref[0] + ((-0.0573508207357-0.4334934129j))*x_ref[1]**o + ((0.902895044085+0.426410554851j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.262935380329-0.300127878419j)*x[2]**o + ((-0.486163566593-0.0587435373668j))*x[2]
            ref[(0, 0)]+=(0.262935380329-0.300127878419j)*x_ref[2]**o + ((-0.486163566593-0.0587435373668j))*x_ref[2]
            arg[(0, 1)]+=(-0.249069944584+0.0575276568509j)*x[2]**o + ((0.0127256645697-0.104853970803j))*x[2]
            ref[(0, 1)]+=(-0.249069944584+0.0575276568509j)*x_ref[2]**o + ((0.0127256645697-0.104853970803j))*x_ref[2]
            arg[(0, 2)]+=(0.754425243751-0.468276849509j)*x[2]**o + ((0.269057325199-0.566529879258j))*x[2]
            ref[(0, 2)]+=(0.754425243751-0.468276849509j)*x_ref[2]**o + ((0.269057325199-0.566529879258j))*x_ref[2]
            arg[(1, 0)]+=(-0.653175569185+0.079139591838j)*x[2]**o + ((-0.8828979845-0.13622047647j))*x[2]
            ref[(1, 0)]+=(-0.653175569185+0.079139591838j)*x_ref[2]**o + ((-0.8828979845-0.13622047647j))*x_ref[2]
            arg[(1, 1)]+=(-0.307541161328+0.419373260526j)*x[2]**o + ((-0.465201065397-0.0324334831961j))*x[2]
            ref[(1, 1)]+=(-0.307541161328+0.419373260526j)*x_ref[2]**o + ((-0.465201065397-0.0324334831961j))*x_ref[2]
            arg[(1, 2)]+=(0.473724598634-0.510921239046j)*x[2]**o + ((-0.822427576567-0.320121682356j))*x[2]
            ref[(1, 2)]+=(0.473724598634-0.510921239046j)*x_ref[2]**o + ((-0.822427576567-0.320121682356j))*x_ref[2]
            arg[(2, 0)]+=(-0.478476307697-0.650076519392j)*x[2]**o + ((0.447385154992-0.8073565259j))*x[2]
            ref[(2, 0)]+=(-0.478476307697-0.650076519392j)*x_ref[2]**o + ((0.447385154992-0.8073565259j))*x_ref[2]
            arg[(2, 1)]+=(0.764594049348-0.19675658005j)*x[2]**o + ((0.10851254959-0.462754191918j))*x[2]
            ref[(2, 1)]+=(0.764594049348-0.19675658005j)*x_ref[2]**o + ((0.10851254959-0.462754191918j))*x_ref[2]
            arg[(2, 2)]+=(-0.361953029038-0.0911930886968j)*x[2]**o + ((-0.0126545765333-0.166218143023j))*x[2]
            ref[(2, 2)]+=(-0.361953029038-0.0911930886968j)*x_ref[2]**o + ((-0.0126545765333-0.166218143023j))*x_ref[2]
            arg[(3, 0)]+=(0.841614200238-0.110643437709j)*x[2]**o + ((0.546470320319+0.0795978669632j))*x[2]
            ref[(3, 0)]+=(0.841614200238-0.110643437709j)*x_ref[2]**o + ((0.546470320319+0.0795978669632j))*x_ref[2]
            arg[(3, 1)]+=(-0.752407156367+0.420338277394j)*x[2]**o + ((-0.356022387196-0.222883955668j))*x[2]
            ref[(3, 1)]+=(-0.752407156367+0.420338277394j)*x_ref[2]**o + ((-0.356022387196-0.222883955668j))*x_ref[2]
            arg[(3, 2)]+=(-0.453528694111-0.217310241864j)*x[2]**o + ((-0.674963756091-0.793417782287j))*x[2]
            ref[(3, 2)]+=(-0.453528694111-0.217310241864j)*x_ref[2]**o + ((-0.674963756091-0.793417782287j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ReducedFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports interpolation from ReducedFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 3),w)
        ref = Data(0,(2, 4, 3),w_ref)
        arg[(0, 0, 0)]=(0.192207883479+0.444277569069j)*x[0]**o + ((-0.346803869883+0.949445389544j))*x[0] + ((0.440357634215-0.97627574168j))*x[1]**o + ((0.192926190585+0.919589806506j))*x[1]
        ref[(0, 0, 0)]=(0.192207883479+0.444277569069j)*x_ref[0]**o + ((-0.346803869883+0.949445389544j))*x_ref[0] + ((0.440357634215-0.97627574168j))*x_ref[1]**o + ((0.192926190585+0.919589806506j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.579194718328-0.618730572326j)*x[0]**o + ((0.707598482015+0.192570000375j))*x[0] + ((0.632121145175-0.738536346735j))*x[1]**o + ((0.692596705094-0.266363239293j))*x[1]
        ref[(0, 0, 1)]=(-0.579194718328-0.618730572326j)*x_ref[0]**o + ((0.707598482015+0.192570000375j))*x_ref[0] + ((0.632121145175-0.738536346735j))*x_ref[1]**o + ((0.692596705094-0.266363239293j))*x_ref[1]
        arg[(0, 0, 2)]=(0.726912364289-0.133510442278j)*x[0]**o + ((-0.715181847224+0.0447372620866j))*x[0] + ((0.107275264902+0.627768277256j))*x[1]**o + ((0.0565525231585-0.981852948934j))*x[1]
        ref[(0, 0, 2)]=(0.726912364289-0.133510442278j)*x_ref[0]**o + ((-0.715181847224+0.0447372620866j))*x_ref[0] + ((0.107275264902+0.627768277256j))*x_ref[1]**o + ((0.0565525231585-0.981852948934j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.605939667922+0.916136314735j)*x[0]**o + ((-0.010526162073-0.39855687064j))*x[0] + ((0.67012531904-0.779130844563j))*x[1]**o + ((0.751141102408-0.0190293237935j))*x[1]
        ref[(0, 1, 0)]=(-0.605939667922+0.916136314735j)*x_ref[0]**o + ((-0.010526162073-0.39855687064j))*x_ref[0] + ((0.67012531904-0.779130844563j))*x_ref[1]**o + ((0.751141102408-0.0190293237935j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.799561597845-0.608986979214j)*x[0]**o + ((-0.906304094374+0.742935439872j))*x[0] + ((0.263714774223+0.0977844386533j))*x[1]**o + ((-0.980351537523+0.850823984447j))*x[1]
        ref[(0, 1, 1)]=(-0.799561597845-0.608986979214j)*x_ref[0]**o + ((-0.906304094374+0.742935439872j))*x_ref[0] + ((0.263714774223+0.0977844386533j))*x_ref[1]**o + ((-0.980351537523+0.850823984447j))*x_ref[1]
        arg[(0, 1, 2)]=(-0.040668781815+0.0624817612524j)*x[0]**o + ((0.0184237154992+0.412454616404j))*x[0] + ((0.0605649605352-0.413394698334j))*x[1]**o + ((0.855223162562+0.506034991204j))*x[1]
        ref[(0, 1, 2)]=(-0.040668781815+0.0624817612524j)*x_ref[0]**o + ((0.0184237154992+0.412454616404j))*x_ref[0] + ((0.0605649605352-0.413394698334j))*x_ref[1]**o + ((0.855223162562+0.506034991204j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.459147141222+0.38226792908j)*x[0]**o + ((0.847344852776-0.282609776642j))*x[0] + ((-0.42234031642-0.799095839296j))*x[1]**o + ((-0.823128544163+0.484515516071j))*x[1]
        ref[(0, 2, 0)]=(-0.459147141222+0.38226792908j)*x_ref[0]**o + ((0.847344852776-0.282609776642j))*x_ref[0] + ((-0.42234031642-0.799095839296j))*x_ref[1]**o + ((-0.823128544163+0.484515516071j))*x_ref[1]
        arg[(0, 2, 1)]=(0.432290931401+0.375970524488j)*x[0]**o + ((0.511640111545+0.264728390411j))*x[0] + ((0.466102244601-0.733537991237j))*x[1]**o + ((-0.800484686699-0.107155528332j))*x[1]
        ref[(0, 2, 1)]=(0.432290931401+0.375970524488j)*x_ref[0]**o + ((0.511640111545+0.264728390411j))*x_ref[0] + ((0.466102244601-0.733537991237j))*x_ref[1]**o + ((-0.800484686699-0.107155528332j))*x_ref[1]
        arg[(0, 2, 2)]=(0.958706421521-0.315286874104j)*x[0]**o + ((0.783195885465+0.325482793917j))*x[0] + ((0.255895191349-0.829630454156j))*x[1]**o + ((-0.39250086062-0.568149899334j))*x[1]
        ref[(0, 2, 2)]=(0.958706421521-0.315286874104j)*x_ref[0]**o + ((0.783195885465+0.325482793917j))*x_ref[0] + ((0.255895191349-0.829630454156j))*x_ref[1]**o + ((-0.39250086062-0.568149899334j))*x_ref[1]
        arg[(0, 3, 0)]=(-0.42462010417-0.395632133126j)*x[0]**o + ((0.00970522056718+0.248673152197j))*x[0] + ((0.845114274369-0.903251931248j))*x[1]**o + ((-0.802728632244-0.38996270013j))*x[1]
        ref[(0, 3, 0)]=(-0.42462010417-0.395632133126j)*x_ref[0]**o + ((0.00970522056718+0.248673152197j))*x_ref[0] + ((0.845114274369-0.903251931248j))*x_ref[1]**o + ((-0.802728632244-0.38996270013j))*x_ref[1]
        arg[(0, 3, 1)]=(-0.599097588592+0.043400140804j)*x[0]**o + ((-0.125584514643-0.361768012521j))*x[0] + ((0.744814166206-0.970166035388j))*x[1]**o + ((-0.249615583225-0.249086645961j))*x[1]
        ref[(0, 3, 1)]=(-0.599097588592+0.043400140804j)*x_ref[0]**o + ((-0.125584514643-0.361768012521j))*x_ref[0] + ((0.744814166206-0.970166035388j))*x_ref[1]**o + ((-0.249615583225-0.249086645961j))*x_ref[1]
        arg[(0, 3, 2)]=(-0.394561188715+0.956203562308j)*x[0]**o + ((-0.141500616157+0.425327815169j))*x[0] + ((-0.704416351234+0.654057476774j))*x[1]**o + ((-0.249963684453-0.89241860522j))*x[1]
        ref[(0, 3, 2)]=(-0.394561188715+0.956203562308j)*x_ref[0]**o + ((-0.141500616157+0.425327815169j))*x_ref[0] + ((-0.704416351234+0.654057476774j))*x_ref[1]**o + ((-0.249963684453-0.89241860522j))*x_ref[1]
        arg[(1, 0, 0)]=(0.883938937775-0.173127610716j)*x[0]**o + ((-0.190475771546-0.90213267271j))*x[0] + ((0.342521088808-0.831685672545j))*x[1]**o + ((0.722232260735-0.407354946012j))*x[1]
        ref[(1, 0, 0)]=(0.883938937775-0.173127610716j)*x_ref[0]**o + ((-0.190475771546-0.90213267271j))*x_ref[0] + ((0.342521088808-0.831685672545j))*x_ref[1]**o + ((0.722232260735-0.407354946012j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.262568217133+0.968355986638j)*x[0]**o + ((0.0323670133571+0.271944273375j))*x[0] + ((-0.662848247399+0.670483278897j))*x[1]**o + ((-0.78793002497-0.171536662895j))*x[1]
        ref[(1, 0, 1)]=(-0.262568217133+0.968355986638j)*x_ref[0]**o + ((0.0323670133571+0.271944273375j))*x_ref[0] + ((-0.662848247399+0.670483278897j))*x_ref[1]**o + ((-0.78793002497-0.171536662895j))*x_ref[1]
        arg[(1, 0, 2)]=(0.252361471404-0.456345510378j)*x[0]**o + ((0.682774489813+0.378756233933j))*x[0] + ((0.795424602086-0.500634824167j))*x[1]**o + ((-0.768681257812-0.260210295042j))*x[1]
        ref[(1, 0, 2)]=(0.252361471404-0.456345510378j)*x_ref[0]**o + ((0.682774489813+0.378756233933j))*x_ref[0] + ((0.795424602086-0.500634824167j))*x_ref[1]**o + ((-0.768681257812-0.260210295042j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.772983425758+0.0480711364048j)*x[0]**o + ((-0.86740426485-0.508601191057j))*x[0] + ((-0.568387739181-0.666028009956j))*x[1]**o + ((0.946264412637+0.75103554442j))*x[1]
        ref[(1, 1, 0)]=(-0.772983425758+0.0480711364048j)*x_ref[0]**o + ((-0.86740426485-0.508601191057j))*x_ref[0] + ((-0.568387739181-0.666028009956j))*x_ref[1]**o + ((0.946264412637+0.75103554442j))*x_ref[1]
        arg[(1, 1, 1)]=(0.867142091513+0.398974104139j)*x[0]**o + ((-0.876965934366+0.760622119733j))*x[0] + ((-0.440723964394+0.185665062604j))*x[1]**o + ((0.418739561034-0.0925290957658j))*x[1]
        ref[(1, 1, 1)]=(0.867142091513+0.398974104139j)*x_ref[0]**o + ((-0.876965934366+0.760622119733j))*x_ref[0] + ((-0.440723964394+0.185665062604j))*x_ref[1]**o + ((0.418739561034-0.0925290957658j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.207607630737+0.356760127772j)*x[0]**o + ((0.429625463623+0.883498284218j))*x[0] + ((0.696543721725+0.778266597124j))*x[1]**o + ((0.304978596042+0.021041493304j))*x[1]
        ref[(1, 1, 2)]=(-0.207607630737+0.356760127772j)*x_ref[0]**o + ((0.429625463623+0.883498284218j))*x_ref[0] + ((0.696543721725+0.778266597124j))*x_ref[1]**o + ((0.304978596042+0.021041493304j))*x_ref[1]
        arg[(1, 2, 0)]=(0.847522172703+0.448382939503j)*x[0]**o + ((0.398591239452+0.219424599464j))*x[0] + ((0.174806929385-0.0196088190939j))*x[1]**o + ((0.164224858203-0.721584990314j))*x[1]
        ref[(1, 2, 0)]=(0.847522172703+0.448382939503j)*x_ref[0]**o + ((0.398591239452+0.219424599464j))*x_ref[0] + ((0.174806929385-0.0196088190939j))*x_ref[1]**o + ((0.164224858203-0.721584990314j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.25393899438+0.297084881177j)*x[0]**o + ((0.708595939261+0.73089143175j))*x[0] + ((0.224426348345-0.130703202979j))*x[1]**o + ((-0.998007823098+0.385306912995j))*x[1]
        ref[(1, 2, 1)]=(-0.25393899438+0.297084881177j)*x_ref[0]**o + ((0.708595939261+0.73089143175j))*x_ref[0] + ((0.224426348345-0.130703202979j))*x_ref[1]**o + ((-0.998007823098+0.385306912995j))*x_ref[1]
        arg[(1, 2, 2)]=(-0.169816845707+0.0625567259455j)*x[0]**o + ((0.585786596595-0.407470580339j))*x[0] + ((0.533401356683+0.273046499296j))*x[1]**o + ((-0.0179921510531+0.120761096979j))*x[1]
        ref[(1, 2, 2)]=(-0.169816845707+0.0625567259455j)*x_ref[0]**o + ((0.585786596595-0.407470580339j))*x_ref[0] + ((0.533401356683+0.273046499296j))*x_ref[1]**o + ((-0.0179921510531+0.120761096979j))*x_ref[1]
        arg[(1, 3, 0)]=(0.723542842963+0.349859986591j)*x[0]**o + ((0.279417793438-0.969162332056j))*x[0] + ((-0.590546958026+0.372525086j))*x[1]**o + ((-0.175211545823+0.674041485018j))*x[1]
        ref[(1, 3, 0)]=(0.723542842963+0.349859986591j)*x_ref[0]**o + ((0.279417793438-0.969162332056j))*x_ref[0] + ((-0.590546958026+0.372525086j))*x_ref[1]**o + ((-0.175211545823+0.674041485018j))*x_ref[1]
        arg[(1, 3, 1)]=(-0.724336432051+0.906837638492j)*x[0]**o + ((-0.638921615656+0.11146967229j))*x[0] + ((0.00847551158182-0.871279215367j))*x[1]**o + ((0.0426949520876+0.00977819872344j))*x[1]
        ref[(1, 3, 1)]=(-0.724336432051+0.906837638492j)*x_ref[0]**o + ((-0.638921615656+0.11146967229j))*x_ref[0] + ((0.00847551158182-0.871279215367j))*x_ref[1]**o + ((0.0426949520876+0.00977819872344j))*x_ref[1]
        arg[(1, 3, 2)]=(-0.696544210804+0.725939742156j)*x[0]**o + ((-0.43201308931-0.973699474944j))*x[0] + ((0.474693477857-0.763573218716j))*x[1]**o + ((-0.800318585344-0.775976807731j))*x[1]
        ref[(1, 3, 2)]=(-0.696544210804+0.725939742156j)*x_ref[0]**o + ((-0.43201308931-0.973699474944j))*x_ref[0] + ((0.474693477857-0.763573218716j))*x_ref[1]**o + ((-0.800318585344-0.775976807731j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.483127009699-0.527278358079j)*x[2]**o + ((-0.54713707029+0.573714264362j))*x[2]
            ref[(0, 0, 0)]+=(-0.483127009699-0.527278358079j)*x_ref[2]**o + ((-0.54713707029+0.573714264362j))*x_ref[2]
            arg[(0, 0, 1)]+=(0.239542515828-0.458206378015j)*x[2]**o + ((0.0505770626939+0.609275714255j))*x[2]
            ref[(0, 0, 1)]+=(0.239542515828-0.458206378015j)*x_ref[2]**o + ((0.0505770626939+0.609275714255j))*x_ref[2]
            arg[(0, 0, 2)]+=(0.69023473775-0.209869986124j)*x[2]**o + ((-0.953271437001-0.848472199774j))*x[2]
            ref[(0, 0, 2)]+=(0.69023473775-0.209869986124j)*x_ref[2]**o + ((-0.953271437001-0.848472199774j))*x_ref[2]
            arg[(0, 1, 0)]+=(-0.356191800225+0.271829931988j)*x[2]**o + ((-0.563938273184-0.530587794968j))*x[2]
            ref[(0, 1, 0)]+=(-0.356191800225+0.271829931988j)*x_ref[2]**o + ((-0.563938273184-0.530587794968j))*x_ref[2]
            arg[(0, 1, 1)]+=(0.838310614902+0.0409224153025j)*x[2]**o + ((0.926192480265-0.583494864427j))*x[2]
            ref[(0, 1, 1)]+=(0.838310614902+0.0409224153025j)*x_ref[2]**o + ((0.926192480265-0.583494864427j))*x_ref[2]
            arg[(0, 1, 2)]+=(0.281855582316-0.465564383703j)*x[2]**o + ((-0.210486204792+0.819365674963j))*x[2]
            ref[(0, 1, 2)]+=(0.281855582316-0.465564383703j)*x_ref[2]**o + ((-0.210486204792+0.819365674963j))*x_ref[2]
            arg[(0, 2, 0)]+=(0.250001205067+0.243637152502j)*x[2]**o + ((0.959919865834-0.684198518899j))*x[2]
            ref[(0, 2, 0)]+=(0.250001205067+0.243637152502j)*x_ref[2]**o + ((0.959919865834-0.684198518899j))*x_ref[2]
            arg[(0, 2, 1)]+=(-0.663470221508+0.695986133186j)*x[2]**o + ((-0.133805379013+0.258882594073j))*x[2]
            ref[(0, 2, 1)]+=(-0.663470221508+0.695986133186j)*x_ref[2]**o + ((-0.133805379013+0.258882594073j))*x_ref[2]
            arg[(0, 2, 2)]+=(0.769718191503-0.338310593864j)*x[2]**o + ((0.316688814103-0.7598848433j))*x[2]
            ref[(0, 2, 2)]+=(0.769718191503-0.338310593864j)*x_ref[2]**o + ((0.316688814103-0.7598848433j))*x_ref[2]
            arg[(0, 3, 0)]+=(-0.293229743348-0.534905211994j)*x[2]**o + ((0.11089476592+0.687410078055j))*x[2]
            ref[(0, 3, 0)]+=(-0.293229743348-0.534905211994j)*x_ref[2]**o + ((0.11089476592+0.687410078055j))*x_ref[2]
            arg[(0, 3, 1)]+=(-0.585440599658-0.564292621162j)*x[2]**o + ((-0.175330184579+0.366649193489j))*x[2]
            ref[(0, 3, 1)]+=(-0.585440599658-0.564292621162j)*x_ref[2]**o + ((-0.175330184579+0.366649193489j))*x_ref[2]
            arg[(0, 3, 2)]+=(0.85303116721+0.218640081406j)*x[2]**o + ((-0.842344760974+0.410775576165j))*x[2]
            ref[(0, 3, 2)]+=(0.85303116721+0.218640081406j)*x_ref[2]**o + ((-0.842344760974+0.410775576165j))*x_ref[2]
            arg[(1, 0, 0)]+=(0.533882140998+0.416301751363j)*x[2]**o + ((-0.4834351174+0.164999981349j))*x[2]
            ref[(1, 0, 0)]+=(0.533882140998+0.416301751363j)*x_ref[2]**o + ((-0.4834351174+0.164999981349j))*x_ref[2]
            arg[(1, 0, 1)]+=(0.961743041992+0.243362699002j)*x[2]**o + ((-0.650174126965-0.359380568449j))*x[2]
            ref[(1, 0, 1)]+=(0.961743041992+0.243362699002j)*x_ref[2]**o + ((-0.650174126965-0.359380568449j))*x_ref[2]
            arg[(1, 0, 2)]+=(0.595856442948-0.195468316465j)*x[2]**o + ((0.936502223619-0.876869720381j))*x[2]
            ref[(1, 0, 2)]+=(0.595856442948-0.195468316465j)*x_ref[2]**o + ((0.936502223619-0.876869720381j))*x_ref[2]
            arg[(1, 1, 0)]+=(0.31307717106-0.067298716493j)*x[2]**o + ((0.599634191886-0.143630119761j))*x[2]
            ref[(1, 1, 0)]+=(0.31307717106-0.067298716493j)*x_ref[2]**o + ((0.599634191886-0.143630119761j))*x_ref[2]
            arg[(1, 1, 1)]+=(0.620382785726-0.934327333041j)*x[2]**o + ((-0.0649152357829+0.334613808339j))*x[2]
            ref[(1, 1, 1)]+=(0.620382785726-0.934327333041j)*x_ref[2]**o + ((-0.0649152357829+0.334613808339j))*x_ref[2]
            arg[(1, 1, 2)]+=(0.647489862639+0.444075357926j)*x[2]**o + ((0.159666607699+0.58187236385j))*x[2]
            ref[(1, 1, 2)]+=(0.647489862639+0.444075357926j)*x_ref[2]**o + ((0.159666607699+0.58187236385j))*x_ref[2]
            arg[(1, 2, 0)]+=(0.521005888098+0.868378410567j)*x[2]**o + ((0.22680066413-0.414733639365j))*x[2]
            ref[(1, 2, 0)]+=(0.521005888098+0.868378410567j)*x_ref[2]**o + ((0.22680066413-0.414733639365j))*x_ref[2]
            arg[(1, 2, 1)]+=(0.084128032176+0.436200358081j)*x[2]**o + ((0.0637149717713-0.603917684987j))*x[2]
            ref[(1, 2, 1)]+=(0.084128032176+0.436200358081j)*x_ref[2]**o + ((0.0637149717713-0.603917684987j))*x_ref[2]
            arg[(1, 2, 2)]+=(-0.961355937362-0.763448977571j)*x[2]**o + ((0.123782299848+0.0843756922102j))*x[2]
            ref[(1, 2, 2)]+=(-0.961355937362-0.763448977571j)*x_ref[2]**o + ((0.123782299848+0.0843756922102j))*x_ref[2]
            arg[(1, 3, 0)]+=(0.0260256718717-0.0568542476141j)*x[2]**o + ((0.266642677757+0.76172985523j))*x[2]
            ref[(1, 3, 0)]+=(0.0260256718717-0.0568542476141j)*x_ref[2]**o + ((0.266642677757+0.76172985523j))*x_ref[2]
            arg[(1, 3, 1)]+=(-0.826959483+0.62810383741j)*x[2]**o + ((-0.226015009679-0.125611554069j))*x[2]
            ref[(1, 3, 1)]+=(-0.826959483+0.62810383741j)*x_ref[2]**o + ((-0.226015009679-0.125611554069j))*x_ref[2]
            arg[(1, 3, 2)]+=(-0.3323255712+0.380605080901j)*x[2]**o + ((-0.35022709987+0.0125220239329j))*x[2]
            ref[(1, 3, 2)]+=(-0.3323255712+0.380605080901j)*x_ref[2]**o + ((-0.35022709987+0.0125220239329j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunction_fromData_ReducedFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports interpolation from ReducedFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 4, 3),w)
        ref = Data(0,(4, 4, 4, 3),w_ref)
        arg[(0, 0, 0, 0)]=(0.43465391275+0.983742483132j)*x[0]**o + ((0.273794553189-0.619114440889j))*x[0] + ((-0.813997133562-0.408645297277j))*x[1]**o + ((-0.778279951529-0.649255144171j))*x[1]
        ref[(0, 0, 0, 0)]=(0.43465391275+0.983742483132j)*x_ref[0]**o + ((0.273794553189-0.619114440889j))*x_ref[0] + ((-0.813997133562-0.408645297277j))*x_ref[1]**o + ((-0.778279951529-0.649255144171j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(0.934972712595-0.888898920484j)*x[0]**o + ((-0.0897579693991+0.638920078261j))*x[0] + ((0.534939808979-0.998857746637j))*x[1]**o + ((0.330343901899-0.1799529906j))*x[1]
        ref[(0, 0, 0, 1)]=(0.934972712595-0.888898920484j)*x_ref[0]**o + ((-0.0897579693991+0.638920078261j))*x_ref[0] + ((0.534939808979-0.998857746637j))*x_ref[1]**o + ((0.330343901899-0.1799529906j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.387191341697-0.986771748702j)*x[0]**o + ((0.237419512177+0.735836312016j))*x[0] + ((-0.0936412958505+0.788341973012j))*x[1]**o + ((0.676147164977-0.968381180991j))*x[1]
        ref[(0, 0, 0, 2)]=(0.387191341697-0.986771748702j)*x_ref[0]**o + ((0.237419512177+0.735836312016j))*x_ref[0] + ((-0.0936412958505+0.788341973012j))*x_ref[1]**o + ((0.676147164977-0.968381180991j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.291699869162+0.839213166507j)*x[0]**o + ((-0.113104752522-0.943859419254j))*x[0] + ((-0.249618737707+0.378239943416j))*x[1]**o + ((0.312953013192+0.276460392263j))*x[1]
        ref[(0, 0, 1, 0)]=(0.291699869162+0.839213166507j)*x_ref[0]**o + ((-0.113104752522-0.943859419254j))*x_ref[0] + ((-0.249618737707+0.378239943416j))*x_ref[1]**o + ((0.312953013192+0.276460392263j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.0613746985789+0.844580420267j)*x[0]**o + ((-0.620001187117-0.984614831617j))*x[0] + ((-0.834675145598+0.150856727384j))*x[1]**o + ((-0.764245315875+0.68349607043j))*x[1]
        ref[(0, 0, 1, 1)]=(0.0613746985789+0.844580420267j)*x_ref[0]**o + ((-0.620001187117-0.984614831617j))*x_ref[0] + ((-0.834675145598+0.150856727384j))*x_ref[1]**o + ((-0.764245315875+0.68349607043j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(0.18191359689+0.372537191744j)*x[0]**o + ((0.771863115814-0.160507443956j))*x[0] + ((0.126276291758-0.0474644401311j))*x[1]**o + ((0.0931005129511-0.0629547996277j))*x[1]
        ref[(0, 0, 1, 2)]=(0.18191359689+0.372537191744j)*x_ref[0]**o + ((0.771863115814-0.160507443956j))*x_ref[0] + ((0.126276291758-0.0474644401311j))*x_ref[1]**o + ((0.0931005129511-0.0629547996277j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(-0.871016019504+0.0176185401021j)*x[0]**o + ((0.69320264875+0.0228475225632j))*x[0] + ((-0.233474175575+0.096308496694j))*x[1]**o + ((-0.227657538897+0.994855192042j))*x[1]
        ref[(0, 0, 2, 0)]=(-0.871016019504+0.0176185401021j)*x_ref[0]**o + ((0.69320264875+0.0228475225632j))*x_ref[0] + ((-0.233474175575+0.096308496694j))*x_ref[1]**o + ((-0.227657538897+0.994855192042j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(-0.256070709022+0.03917321248j)*x[0]**o + ((-0.0353279209778-0.251538532915j))*x[0] + ((0.99030244473-0.581332101232j))*x[1]**o + ((-0.554217394763+0.373636121413j))*x[1]
        ref[(0, 0, 2, 1)]=(-0.256070709022+0.03917321248j)*x_ref[0]**o + ((-0.0353279209778-0.251538532915j))*x_ref[0] + ((0.99030244473-0.581332101232j))*x_ref[1]**o + ((-0.554217394763+0.373636121413j))*x_ref[1]
        arg[(0, 0, 2, 2)]=(0.645556409603-0.809363326378j)*x[0]**o + ((0.403138970163-0.682132459883j))*x[0] + ((0.0450949352313-0.697165953754j))*x[1]**o + ((0.519406653357-0.83077285013j))*x[1]
        ref[(0, 0, 2, 2)]=(0.645556409603-0.809363326378j)*x_ref[0]**o + ((0.403138970163-0.682132459883j))*x_ref[0] + ((0.0450949352313-0.697165953754j))*x_ref[1]**o + ((0.519406653357-0.83077285013j))*x_ref[1]
        arg[(0, 0, 3, 0)]=(0.995331853731-0.980888652713j)*x[0]**o + ((-0.7910879854-0.813856128979j))*x[0] + ((0.464696440535+0.827994407565j))*x[1]**o + ((0.519050100718-0.939499211683j))*x[1]
        ref[(0, 0, 3, 0)]=(0.995331853731-0.980888652713j)*x_ref[0]**o + ((-0.7910879854-0.813856128979j))*x_ref[0] + ((0.464696440535+0.827994407565j))*x_ref[1]**o + ((0.519050100718-0.939499211683j))*x_ref[1]
        arg[(0, 0, 3, 1)]=(0.15811490488-0.348493246106j)*x[0]**o + ((-0.268592070881-0.904593503206j))*x[0] + ((-0.776322367441-0.377008909124j))*x[1]**o + ((0.676744015278+0.285531996675j))*x[1]
        ref[(0, 0, 3, 1)]=(0.15811490488-0.348493246106j)*x_ref[0]**o + ((-0.268592070881-0.904593503206j))*x_ref[0] + ((-0.776322367441-0.377008909124j))*x_ref[1]**o + ((0.676744015278+0.285531996675j))*x_ref[1]
        arg[(0, 0, 3, 2)]=(0.856528139159+0.611318788216j)*x[0]**o + ((0.0123188378482-0.688484405623j))*x[0] + ((-0.864464366334-0.916402203326j))*x[1]**o + ((-0.345756548932-0.765197637434j))*x[1]
        ref[(0, 0, 3, 2)]=(0.856528139159+0.611318788216j)*x_ref[0]**o + ((0.0123188378482-0.688484405623j))*x_ref[0] + ((-0.864464366334-0.916402203326j))*x_ref[1]**o + ((-0.345756548932-0.765197637434j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(-0.475402914303-0.145637517991j)*x[0]**o + ((-0.267002785894+0.486544463672j))*x[0] + ((-0.477363542863+0.748736853957j))*x[1]**o + ((0.275973069567+0.945624855669j))*x[1]
        ref[(0, 1, 0, 0)]=(-0.475402914303-0.145637517991j)*x_ref[0]**o + ((-0.267002785894+0.486544463672j))*x_ref[0] + ((-0.477363542863+0.748736853957j))*x_ref[1]**o + ((0.275973069567+0.945624855669j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.493582566226+0.592242877142j)*x[0]**o + ((-0.862965235025+0.579528431288j))*x[0] + ((0.0539613471988+0.71061360596j))*x[1]**o + ((-0.0173485100212-0.171020640756j))*x[1]
        ref[(0, 1, 0, 1)]=(0.493582566226+0.592242877142j)*x_ref[0]**o + ((-0.862965235025+0.579528431288j))*x_ref[0] + ((0.0539613471988+0.71061360596j))*x_ref[1]**o + ((-0.0173485100212-0.171020640756j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(0.305816212653+0.665920091929j)*x[0]**o + ((-0.576424059252+0.190346652606j))*x[0] + ((0.666297086141-0.142551780973j))*x[1]**o + ((-0.762908542283-0.381039762848j))*x[1]
        ref[(0, 1, 0, 2)]=(0.305816212653+0.665920091929j)*x_ref[0]**o + ((-0.576424059252+0.190346652606j))*x_ref[0] + ((0.666297086141-0.142551780973j))*x_ref[1]**o + ((-0.762908542283-0.381039762848j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.131721597261+0.0696817183982j)*x[0]**o + ((-0.84833753749+0.126630992473j))*x[0] + ((-0.373986452326-0.955728729467j))*x[1]**o + ((-0.166145050446-0.699772414466j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.131721597261+0.0696817183982j)*x_ref[0]**o + ((-0.84833753749+0.126630992473j))*x_ref[0] + ((-0.373986452326-0.955728729467j))*x_ref[1]**o + ((-0.166145050446-0.699772414466j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.343150589227+0.876650383465j)*x[0]**o + ((-0.703444318786-0.093253487365j))*x[0] + ((0.731039449596+0.367312356797j))*x[1]**o + ((0.356272970632+0.998388421934j))*x[1]
        ref[(0, 1, 1, 1)]=(0.343150589227+0.876650383465j)*x_ref[0]**o + ((-0.703444318786-0.093253487365j))*x_ref[0] + ((0.731039449596+0.367312356797j))*x_ref[1]**o + ((0.356272970632+0.998388421934j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(-0.45219525791+0.20342159498j)*x[0]**o + ((0.543539297853-0.864044965259j))*x[0] + ((0.795465939617-0.177456266103j))*x[1]**o + ((0.230098843695-0.552170481044j))*x[1]
        ref[(0, 1, 1, 2)]=(-0.45219525791+0.20342159498j)*x_ref[0]**o + ((0.543539297853-0.864044965259j))*x_ref[0] + ((0.795465939617-0.177456266103j))*x_ref[1]**o + ((0.230098843695-0.552170481044j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(0.0742334001083-0.0430141065569j)*x[0]**o + ((-0.363445592239+0.377138175834j))*x[0] + ((-0.667906192821-0.823966771519j))*x[1]**o + ((-0.619085216266+0.636900738205j))*x[1]
        ref[(0, 1, 2, 0)]=(0.0742334001083-0.0430141065569j)*x_ref[0]**o + ((-0.363445592239+0.377138175834j))*x_ref[0] + ((-0.667906192821-0.823966771519j))*x_ref[1]**o + ((-0.619085216266+0.636900738205j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(-0.60702274405+0.674673263278j)*x[0]**o + ((-0.347398750818+0.0484166099494j))*x[0] + ((-0.399728893299+0.610287598723j))*x[1]**o + ((0.972187347309-0.0881955260301j))*x[1]
        ref[(0, 1, 2, 1)]=(-0.60702274405+0.674673263278j)*x_ref[0]**o + ((-0.347398750818+0.0484166099494j))*x_ref[0] + ((-0.399728893299+0.610287598723j))*x_ref[1]**o + ((0.972187347309-0.0881955260301j))*x_ref[1]
        arg[(0, 1, 2, 2)]=(0.654021567992-0.59429936938j)*x[0]**o + ((-0.37093775144-0.88219856455j))*x[0] + ((0.822823846672-0.0915745034228j))*x[1]**o + ((0.602161760727+0.366699361807j))*x[1]
        ref[(0, 1, 2, 2)]=(0.654021567992-0.59429936938j)*x_ref[0]**o + ((-0.37093775144-0.88219856455j))*x_ref[0] + ((0.822823846672-0.0915745034228j))*x_ref[1]**o + ((0.602161760727+0.366699361807j))*x_ref[1]
        arg[(0, 1, 3, 0)]=(0.566746554539+0.235820693459j)*x[0]**o + ((0.65185422085+0.0102735416633j))*x[0] + ((-0.182428240433-0.551397972913j))*x[1]**o + ((0.294979827195-0.844983506441j))*x[1]
        ref[(0, 1, 3, 0)]=(0.566746554539+0.235820693459j)*x_ref[0]**o + ((0.65185422085+0.0102735416633j))*x_ref[0] + ((-0.182428240433-0.551397972913j))*x_ref[1]**o + ((0.294979827195-0.844983506441j))*x_ref[1]
        arg[(0, 1, 3, 1)]=(-0.547087353537+0.900089634532j)*x[0]**o + ((0.353502888848-0.296204042138j))*x[0] + ((0.139674350062+0.29515659568j))*x[1]**o + ((-0.243913738606+0.646458817887j))*x[1]
        ref[(0, 1, 3, 1)]=(-0.547087353537+0.900089634532j)*x_ref[0]**o + ((0.353502888848-0.296204042138j))*x_ref[0] + ((0.139674350062+0.29515659568j))*x_ref[1]**o + ((-0.243913738606+0.646458817887j))*x_ref[1]
        arg[(0, 1, 3, 2)]=(-0.465239543759-0.170545389277j)*x[0]**o + ((-0.317557434519-0.638226758156j))*x[0] + ((-0.281846184634+0.136383667679j))*x[1]**o + ((-0.0999920162444+0.727657898328j))*x[1]
        ref[(0, 1, 3, 2)]=(-0.465239543759-0.170545389277j)*x_ref[0]**o + ((-0.317557434519-0.638226758156j))*x_ref[0] + ((-0.281846184634+0.136383667679j))*x_ref[1]**o + ((-0.0999920162444+0.727657898328j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(-0.647184191167-0.0287159904208j)*x[0]**o + ((-0.922054433049-0.0613469208742j))*x[0] + ((0.218465293174+0.386822468642j))*x[1]**o + ((0.448824290626-0.912039055037j))*x[1]
        ref[(0, 2, 0, 0)]=(-0.647184191167-0.0287159904208j)*x_ref[0]**o + ((-0.922054433049-0.0613469208742j))*x_ref[0] + ((0.218465293174+0.386822468642j))*x_ref[1]**o + ((0.448824290626-0.912039055037j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(0.270396670431-0.391361329295j)*x[0]**o + ((-0.96242738243-0.619844582639j))*x[0] + ((-0.537452560633-0.0455632796212j))*x[1]**o + ((0.0616393490316+0.830394255799j))*x[1]
        ref[(0, 2, 0, 1)]=(0.270396670431-0.391361329295j)*x_ref[0]**o + ((-0.96242738243-0.619844582639j))*x_ref[0] + ((-0.537452560633-0.0455632796212j))*x_ref[1]**o + ((0.0616393490316+0.830394255799j))*x_ref[1]
        arg[(0, 2, 0, 2)]=(-0.470426435601-0.591454299633j)*x[0]**o + ((0.0875242132041-0.262172137737j))*x[0] + ((0.725321071149+0.320556332487j))*x[1]**o + ((-0.0750398966355-0.567524443587j))*x[1]
        ref[(0, 2, 0, 2)]=(-0.470426435601-0.591454299633j)*x_ref[0]**o + ((0.0875242132041-0.262172137737j))*x_ref[0] + ((0.725321071149+0.320556332487j))*x_ref[1]**o + ((-0.0750398966355-0.567524443587j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.0677544281211-0.964022843596j)*x[0]**o + ((-0.497169598015+0.665777486527j))*x[0] + ((0.58920080322+0.931526604582j))*x[1]**o + ((-0.197502607223+0.11677582448j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.0677544281211-0.964022843596j)*x_ref[0]**o + ((-0.497169598015+0.665777486527j))*x_ref[0] + ((0.58920080322+0.931526604582j))*x_ref[1]**o + ((-0.197502607223+0.11677582448j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(-0.68533264779-0.654874580102j)*x[0]**o + ((-0.136973220585-0.188374154761j))*x[0] + ((-0.307109622185+0.677759259537j))*x[1]**o + ((0.00353622772658+0.805532465942j))*x[1]
        ref[(0, 2, 1, 1)]=(-0.68533264779-0.654874580102j)*x_ref[0]**o + ((-0.136973220585-0.188374154761j))*x_ref[0] + ((-0.307109622185+0.677759259537j))*x_ref[1]**o + ((0.00353622772658+0.805532465942j))*x_ref[1]
        arg[(0, 2, 1, 2)]=(0.253118620845+0.115136897875j)*x[0]**o + ((0.17944558458+0.211149972594j))*x[0] + ((-0.709051162162-0.330940280398j))*x[1]**o + ((-0.0273215150566-0.97876003102j))*x[1]
        ref[(0, 2, 1, 2)]=(0.253118620845+0.115136897875j)*x_ref[0]**o + ((0.17944558458+0.211149972594j))*x_ref[0] + ((-0.709051162162-0.330940280398j))*x_ref[1]**o + ((-0.0273215150566-0.97876003102j))*x_ref[1]
        arg[(0, 2, 2, 0)]=(-0.790699874121-0.941091988658j)*x[0]**o + ((0.635204683485+0.365935589932j))*x[0] + ((0.0851489688401-0.460998604067j))*x[1]**o + ((-0.427482436305+0.897982559265j))*x[1]
        ref[(0, 2, 2, 0)]=(-0.790699874121-0.941091988658j)*x_ref[0]**o + ((0.635204683485+0.365935589932j))*x_ref[0] + ((0.0851489688401-0.460998604067j))*x_ref[1]**o + ((-0.427482436305+0.897982559265j))*x_ref[1]
        arg[(0, 2, 2, 1)]=(0.516612015186-0.986036863636j)*x[0]**o + ((-0.472955090809-0.555951175394j))*x[0] + ((-0.185629654808+0.733023085419j))*x[1]**o + ((-0.381095093494+0.588531553541j))*x[1]
        ref[(0, 2, 2, 1)]=(0.516612015186-0.986036863636j)*x_ref[0]**o + ((-0.472955090809-0.555951175394j))*x_ref[0] + ((-0.185629654808+0.733023085419j))*x_ref[1]**o + ((-0.381095093494+0.588531553541j))*x_ref[1]
        arg[(0, 2, 2, 2)]=(0.640693535148-0.879001876375j)*x[0]**o + ((0.820559554537+0.892465122465j))*x[0] + ((-0.110715613222-0.435029741026j))*x[1]**o + ((0.319212525544-0.113867425424j))*x[1]
        ref[(0, 2, 2, 2)]=(0.640693535148-0.879001876375j)*x_ref[0]**o + ((0.820559554537+0.892465122465j))*x_ref[0] + ((-0.110715613222-0.435029741026j))*x_ref[1]**o + ((0.319212525544-0.113867425424j))*x_ref[1]
        arg[(0, 2, 3, 0)]=(-0.579604538559+0.936361449491j)*x[0]**o + ((-0.109722318476+0.959636960919j))*x[0] + ((0.156999955446-0.447309173741j))*x[1]**o + ((-0.58480395158+0.444310660831j))*x[1]
        ref[(0, 2, 3, 0)]=(-0.579604538559+0.936361449491j)*x_ref[0]**o + ((-0.109722318476+0.959636960919j))*x_ref[0] + ((0.156999955446-0.447309173741j))*x_ref[1]**o + ((-0.58480395158+0.444310660831j))*x_ref[1]
        arg[(0, 2, 3, 1)]=(0.432864738924-0.335831655379j)*x[0]**o + ((-0.279216670046+0.576804714337j))*x[0] + ((0.31037571952-0.555053922406j))*x[1]**o + ((-0.177456716214+0.560938516825j))*x[1]
        ref[(0, 2, 3, 1)]=(0.432864738924-0.335831655379j)*x_ref[0]**o + ((-0.279216670046+0.576804714337j))*x_ref[0] + ((0.31037571952-0.555053922406j))*x_ref[1]**o + ((-0.177456716214+0.560938516825j))*x_ref[1]
        arg[(0, 2, 3, 2)]=(-0.443418503388+0.378462995548j)*x[0]**o + ((0.641674936037-0.536108921935j))*x[0] + ((0.555563177608-0.544957331024j))*x[1]**o + ((0.42550982012+0.344265196819j))*x[1]
        ref[(0, 2, 3, 2)]=(-0.443418503388+0.378462995548j)*x_ref[0]**o + ((0.641674936037-0.536108921935j))*x_ref[0] + ((0.555563177608-0.544957331024j))*x_ref[1]**o + ((0.42550982012+0.344265196819j))*x_ref[1]
        arg[(0, 3, 0, 0)]=(0.0275214656406-0.194492863148j)*x[0]**o + ((-0.542529016697+0.628812168446j))*x[0] + ((0.242084307955+0.325320241066j))*x[1]**o + ((-0.00448725478467-0.152248968547j))*x[1]
        ref[(0, 3, 0, 0)]=(0.0275214656406-0.194492863148j)*x_ref[0]**o + ((-0.542529016697+0.628812168446j))*x_ref[0] + ((0.242084307955+0.325320241066j))*x_ref[1]**o + ((-0.00448725478467-0.152248968547j))*x_ref[1]
        arg[(0, 3, 0, 1)]=(-0.474317448783+0.928174831001j)*x[0]**o + ((-0.685045142674+0.853357397305j))*x[0] + ((0.587564484107+0.502580970235j))*x[1]**o + ((-0.0183034640522+0.788212225896j))*x[1]
        ref[(0, 3, 0, 1)]=(-0.474317448783+0.928174831001j)*x_ref[0]**o + ((-0.685045142674+0.853357397305j))*x_ref[0] + ((0.587564484107+0.502580970235j))*x_ref[1]**o + ((-0.0183034640522+0.788212225896j))*x_ref[1]
        arg[(0, 3, 0, 2)]=(0.376354621532+0.0719825559729j)*x[0]**o + ((-0.450758522635+0.735609486129j))*x[0] + ((0.144308928599+0.929232783483j))*x[1]**o + ((0.780398703852+0.0084250055326j))*x[1]
        ref[(0, 3, 0, 2)]=(0.376354621532+0.0719825559729j)*x_ref[0]**o + ((-0.450758522635+0.735609486129j))*x_ref[0] + ((0.144308928599+0.929232783483j))*x_ref[1]**o + ((0.780398703852+0.0084250055326j))*x_ref[1]
        arg[(0, 3, 1, 0)]=(0.265684145367+0.604080059482j)*x[0]**o + ((-0.820413245061+0.0616437251241j))*x[0] + ((0.104651490742+0.0111457963155j))*x[1]**o + ((0.268179033756-0.423418417065j))*x[1]
        ref[(0, 3, 1, 0)]=(0.265684145367+0.604080059482j)*x_ref[0]**o + ((-0.820413245061+0.0616437251241j))*x_ref[0] + ((0.104651490742+0.0111457963155j))*x_ref[1]**o + ((0.268179033756-0.423418417065j))*x_ref[1]
        arg[(0, 3, 1, 1)]=(-0.344512422319+0.572125926781j)*x[0]**o + ((-0.516587704202+0.362562049498j))*x[0] + ((-0.541172247771-0.596938698074j))*x[1]**o + ((-0.864097312204+0.924153264565j))*x[1]
        ref[(0, 3, 1, 1)]=(-0.344512422319+0.572125926781j)*x_ref[0]**o + ((-0.516587704202+0.362562049498j))*x_ref[0] + ((-0.541172247771-0.596938698074j))*x_ref[1]**o + ((-0.864097312204+0.924153264565j))*x_ref[1]
        arg[(0, 3, 1, 2)]=(0.191660489129-0.632172817138j)*x[0]**o + ((-0.356985814892+0.517331449031j))*x[0] + ((-0.459597867245-0.914109197181j))*x[1]**o + ((0.611831338294+0.363487726237j))*x[1]
        ref[(0, 3, 1, 2)]=(0.191660489129-0.632172817138j)*x_ref[0]**o + ((-0.356985814892+0.517331449031j))*x_ref[0] + ((-0.459597867245-0.914109197181j))*x_ref[1]**o + ((0.611831338294+0.363487726237j))*x_ref[1]
        arg[(0, 3, 2, 0)]=(0.880874363325-0.438838152036j)*x[0]**o + ((-0.16960219645-0.77048694254j))*x[0] + ((-0.445092353874+0.664051250905j))*x[1]**o + ((-0.630296654685-0.0537556317347j))*x[1]
        ref[(0, 3, 2, 0)]=(0.880874363325-0.438838152036j)*x_ref[0]**o + ((-0.16960219645-0.77048694254j))*x_ref[0] + ((-0.445092353874+0.664051250905j))*x_ref[1]**o + ((-0.630296654685-0.0537556317347j))*x_ref[1]
        arg[(0, 3, 2, 1)]=(-0.740122764589+0.196134280911j)*x[0]**o + ((0.618655035308-0.762591432001j))*x[0] + ((-0.943172439835+0.826650643527j))*x[1]**o + ((0.813577296263-0.110954835266j))*x[1]
        ref[(0, 3, 2, 1)]=(-0.740122764589+0.196134280911j)*x_ref[0]**o + ((0.618655035308-0.762591432001j))*x_ref[0] + ((-0.943172439835+0.826650643527j))*x_ref[1]**o + ((0.813577296263-0.110954835266j))*x_ref[1]
        arg[(0, 3, 2, 2)]=(0.105274271573+0.765804360039j)*x[0]**o + ((0.343483874863+0.390790537898j))*x[0] + ((0.49411412425+0.936604247336j))*x[1]**o + ((0.993344680134-0.804156478088j))*x[1]
        ref[(0, 3, 2, 2)]=(0.105274271573+0.765804360039j)*x_ref[0]**o + ((0.343483874863+0.390790537898j))*x_ref[0] + ((0.49411412425+0.936604247336j))*x_ref[1]**o + ((0.993344680134-0.804156478088j))*x_ref[1]
        arg[(0, 3, 3, 0)]=(-0.279053878827+0.382775327372j)*x[0]**o + ((-0.219586526736-0.124088387367j))*x[0] + ((-0.20291414951+0.631641810653j))*x[1]**o + ((0.0630478172149+0.923311665567j))*x[1]
        ref[(0, 3, 3, 0)]=(-0.279053878827+0.382775327372j)*x_ref[0]**o + ((-0.219586526736-0.124088387367j))*x_ref[0] + ((-0.20291414951+0.631641810653j))*x_ref[1]**o + ((0.0630478172149+0.923311665567j))*x_ref[1]
        arg[(0, 3, 3, 1)]=(0.490278932561-0.0404821142323j)*x[0]**o + ((0.815915071007-0.487188654511j))*x[0] + ((-0.399497475495+0.601984449412j))*x[1]**o + ((-0.868576291018+0.441560196452j))*x[1]
        ref[(0, 3, 3, 1)]=(0.490278932561-0.0404821142323j)*x_ref[0]**o + ((0.815915071007-0.487188654511j))*x_ref[0] + ((-0.399497475495+0.601984449412j))*x_ref[1]**o + ((-0.868576291018+0.441560196452j))*x_ref[1]
        arg[(0, 3, 3, 2)]=(0.0257370479029-0.447352280402j)*x[0]**o + ((-0.231332600385-0.930795822447j))*x[0] + ((-0.468581730788+0.215252637795j))*x[1]**o + ((-0.352632618219+0.974486314621j))*x[1]
        ref[(0, 3, 3, 2)]=(0.0257370479029-0.447352280402j)*x_ref[0]**o + ((-0.231332600385-0.930795822447j))*x_ref[0] + ((-0.468581730788+0.215252637795j))*x_ref[1]**o + ((-0.352632618219+0.974486314621j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.246068150219+0.384911314052j)*x[0]**o + ((0.718707569584+0.551839344178j))*x[0] + ((0.978749834713+0.162474517131j))*x[1]**o + ((-0.0162970603532-0.579400443449j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.246068150219+0.384911314052j)*x_ref[0]**o + ((0.718707569584+0.551839344178j))*x_ref[0] + ((0.978749834713+0.162474517131j))*x_ref[1]**o + ((-0.0162970603532-0.579400443449j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(-0.949338380698+0.357262114227j)*x[0]**o + ((0.722937650386-0.520821730139j))*x[0] + ((-0.326637187199-0.948343863579j))*x[1]**o + ((0.518986481186+0.556856781809j))*x[1]
        ref[(1, 0, 0, 1)]=(-0.949338380698+0.357262114227j)*x_ref[0]**o + ((0.722937650386-0.520821730139j))*x_ref[0] + ((-0.326637187199-0.948343863579j))*x_ref[1]**o + ((0.518986481186+0.556856781809j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(0.374345081882+0.663469456913j)*x[0]**o + ((-0.367121902301+0.752263568876j))*x[0] + ((-0.514405481033+0.508264915653j))*x[1]**o + ((0.359023739535-0.362591151674j))*x[1]
        ref[(1, 0, 0, 2)]=(0.374345081882+0.663469456913j)*x_ref[0]**o + ((-0.367121902301+0.752263568876j))*x_ref[0] + ((-0.514405481033+0.508264915653j))*x_ref[1]**o + ((0.359023739535-0.362591151674j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.558865958216-0.329857594664j)*x[0]**o + ((0.900956386609+0.887957504594j))*x[0] + ((0.772275166309-0.0848877930913j))*x[1]**o + ((-0.247360239804+0.210223104195j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.558865958216-0.329857594664j)*x_ref[0]**o + ((0.900956386609+0.887957504594j))*x_ref[0] + ((0.772275166309-0.0848877930913j))*x_ref[1]**o + ((-0.247360239804+0.210223104195j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.696516444045-0.398824863236j)*x[0]**o + ((0.161235411346-0.904296164145j))*x[0] + ((0.71320599321+0.905782575586j))*x[1]**o + ((-0.272855858141+0.695763641455j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.696516444045-0.398824863236j)*x_ref[0]**o + ((0.161235411346-0.904296164145j))*x_ref[0] + ((0.71320599321+0.905782575586j))*x_ref[1]**o + ((-0.272855858141+0.695763641455j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(0.200141620561-0.10592979308j)*x[0]**o + ((-0.985485577537+0.250065190853j))*x[0] + ((0.219568703135-0.218943089962j))*x[1]**o + ((-0.111989897111-0.948451023185j))*x[1]
        ref[(1, 0, 1, 2)]=(0.200141620561-0.10592979308j)*x_ref[0]**o + ((-0.985485577537+0.250065190853j))*x_ref[0] + ((0.219568703135-0.218943089962j))*x_ref[1]**o + ((-0.111989897111-0.948451023185j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(0.352564576071-0.206819504487j)*x[0]**o + ((0.41579213493-0.75532448407j))*x[0] + ((0.419503215951-0.581957776164j))*x[1]**o + ((-0.460320057142+0.313925071494j))*x[1]
        ref[(1, 0, 2, 0)]=(0.352564576071-0.206819504487j)*x_ref[0]**o + ((0.41579213493-0.75532448407j))*x_ref[0] + ((0.419503215951-0.581957776164j))*x_ref[1]**o + ((-0.460320057142+0.313925071494j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(0.768490119896-0.261892368739j)*x[0]**o + ((0.462690186127-0.300152056244j))*x[0] + ((-0.096729040885-0.452203209454j))*x[1]**o + ((-0.110168408225+0.903426891027j))*x[1]
        ref[(1, 0, 2, 1)]=(0.768490119896-0.261892368739j)*x_ref[0]**o + ((0.462690186127-0.300152056244j))*x_ref[0] + ((-0.096729040885-0.452203209454j))*x_ref[1]**o + ((-0.110168408225+0.903426891027j))*x_ref[1]
        arg[(1, 0, 2, 2)]=(-0.635881553631+0.175428092853j)*x[0]**o + ((-0.380876979071-0.54287013432j))*x[0] + ((-0.573462824151+0.4706236907j))*x[1]**o + ((-0.339866135673-0.123261171076j))*x[1]
        ref[(1, 0, 2, 2)]=(-0.635881553631+0.175428092853j)*x_ref[0]**o + ((-0.380876979071-0.54287013432j))*x_ref[0] + ((-0.573462824151+0.4706236907j))*x_ref[1]**o + ((-0.339866135673-0.123261171076j))*x_ref[1]
        arg[(1, 0, 3, 0)]=(-0.845076747849+0.902410689411j)*x[0]**o + ((0.191897033262-0.298694537051j))*x[0] + ((-0.318618762818-0.973767981166j))*x[1]**o + ((-0.464629090777-0.619275343404j))*x[1]
        ref[(1, 0, 3, 0)]=(-0.845076747849+0.902410689411j)*x_ref[0]**o + ((0.191897033262-0.298694537051j))*x_ref[0] + ((-0.318618762818-0.973767981166j))*x_ref[1]**o + ((-0.464629090777-0.619275343404j))*x_ref[1]
        arg[(1, 0, 3, 1)]=(-0.380118358411+0.40471785283j)*x[0]**o + ((0.430101314905-0.345587303383j))*x[0] + ((-0.735737642239+0.854914193828j))*x[1]**o + ((-0.523953629472+0.20060588858j))*x[1]
        ref[(1, 0, 3, 1)]=(-0.380118358411+0.40471785283j)*x_ref[0]**o + ((0.430101314905-0.345587303383j))*x_ref[0] + ((-0.735737642239+0.854914193828j))*x_ref[1]**o + ((-0.523953629472+0.20060588858j))*x_ref[1]
        arg[(1, 0, 3, 2)]=(-0.0768219768181+0.842660700972j)*x[0]**o + ((0.486781854825+0.9699401333j))*x[0] + ((0.464989837155-0.0413989899967j))*x[1]**o + ((0.236080893173+0.330997910728j))*x[1]
        ref[(1, 0, 3, 2)]=(-0.0768219768181+0.842660700972j)*x_ref[0]**o + ((0.486781854825+0.9699401333j))*x_ref[0] + ((0.464989837155-0.0413989899967j))*x_ref[1]**o + ((0.236080893173+0.330997910728j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.102666902861-0.982390295724j)*x[0]**o + ((-0.495370820854+0.90571044337j))*x[0] + ((-0.728996623637+0.474070043217j))*x[1]**o + ((-0.686263663966-0.696385108017j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.102666902861-0.982390295724j)*x_ref[0]**o + ((-0.495370820854+0.90571044337j))*x_ref[0] + ((-0.728996623637+0.474070043217j))*x_ref[1]**o + ((-0.686263663966-0.696385108017j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.268136367576+0.943219257018j)*x[0]**o + ((0.910807705294+0.990415542978j))*x[0] + ((-0.549517974491+0.084232478061j))*x[1]**o + ((0.671093462662+0.381380460695j))*x[1]
        ref[(1, 1, 0, 1)]=(0.268136367576+0.943219257018j)*x_ref[0]**o + ((0.910807705294+0.990415542978j))*x_ref[0] + ((-0.549517974491+0.084232478061j))*x_ref[1]**o + ((0.671093462662+0.381380460695j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(-0.0228956328575+0.757516478233j)*x[0]**o + ((0.132169291728+0.108141195466j))*x[0] + ((-0.148051149936+0.417128536427j))*x[1]**o + ((-0.406727349327+0.898806314059j))*x[1]
        ref[(1, 1, 0, 2)]=(-0.0228956328575+0.757516478233j)*x_ref[0]**o + ((0.132169291728+0.108141195466j))*x_ref[0] + ((-0.148051149936+0.417128536427j))*x_ref[1]**o + ((-0.406727349327+0.898806314059j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.978683372551-0.00709096339911j)*x[0]**o + ((0.914329248435+0.948747956318j))*x[0] + ((0.91228114846-0.437967583988j))*x[1]**o + ((-0.576629837922+0.904162218139j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.978683372551-0.00709096339911j)*x_ref[0]**o + ((0.914329248435+0.948747956318j))*x_ref[0] + ((0.91228114846-0.437967583988j))*x_ref[1]**o + ((-0.576629837922+0.904162218139j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.716448412567-0.309236177685j)*x[0]**o + ((-0.628936159619+0.501768281472j))*x[0] + ((0.661667776885-0.8537801951j))*x[1]**o + ((-0.580286967414-0.670569604138j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.716448412567-0.309236177685j)*x_ref[0]**o + ((-0.628936159619+0.501768281472j))*x_ref[0] + ((0.661667776885-0.8537801951j))*x_ref[1]**o + ((-0.580286967414-0.670569604138j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(0.718805536208-0.0181305814978j)*x[0]**o + ((-0.648104027079-0.953109800266j))*x[0] + ((0.371197486781-0.958443433837j))*x[1]**o + ((0.401757774089-0.038369215353j))*x[1]
        ref[(1, 1, 1, 2)]=(0.718805536208-0.0181305814978j)*x_ref[0]**o + ((-0.648104027079-0.953109800266j))*x_ref[0] + ((0.371197486781-0.958443433837j))*x_ref[1]**o + ((0.401757774089-0.038369215353j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(-0.127716747515+0.456101514214j)*x[0]**o + ((-0.190409038584-0.8368844837j))*x[0] + ((-0.946549532972+0.913465694902j))*x[1]**o + ((0.91554259088+0.365408834273j))*x[1]
        ref[(1, 1, 2, 0)]=(-0.127716747515+0.456101514214j)*x_ref[0]**o + ((-0.190409038584-0.8368844837j))*x_ref[0] + ((-0.946549532972+0.913465694902j))*x_ref[1]**o + ((0.91554259088+0.365408834273j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(-0.524659034817+0.370557227345j)*x[0]**o + ((0.292448000946-0.44437784173j))*x[0] + ((-0.1100403797-0.735222401083j))*x[1]**o + ((-0.875858614953+0.788324487438j))*x[1]
        ref[(1, 1, 2, 1)]=(-0.524659034817+0.370557227345j)*x_ref[0]**o + ((0.292448000946-0.44437784173j))*x_ref[0] + ((-0.1100403797-0.735222401083j))*x_ref[1]**o + ((-0.875858614953+0.788324487438j))*x_ref[1]
        arg[(1, 1, 2, 2)]=(0.955617876681+0.982158625456j)*x[0]**o + ((-0.127995776692-0.03382792832j))*x[0] + ((0.363193182631+0.0808315730093j))*x[1]**o + ((0.507870659112+0.53181997967j))*x[1]
        ref[(1, 1, 2, 2)]=(0.955617876681+0.982158625456j)*x_ref[0]**o + ((-0.127995776692-0.03382792832j))*x_ref[0] + ((0.363193182631+0.0808315730093j))*x_ref[1]**o + ((0.507870659112+0.53181997967j))*x_ref[1]
        arg[(1, 1, 3, 0)]=(-0.613486472515-0.521361286172j)*x[0]**o + ((-0.576367214519-0.0188769014266j))*x[0] + ((-0.402484305563+0.817585662689j))*x[1]**o + ((0.075453027846+0.94138444315j))*x[1]
        ref[(1, 1, 3, 0)]=(-0.613486472515-0.521361286172j)*x_ref[0]**o + ((-0.576367214519-0.0188769014266j))*x_ref[0] + ((-0.402484305563+0.817585662689j))*x_ref[1]**o + ((0.075453027846+0.94138444315j))*x_ref[1]
        arg[(1, 1, 3, 1)]=(0.0415818390118+0.115763255809j)*x[0]**o + ((0.29194748271-0.611739052134j))*x[0] + ((0.624872695544-0.925947456163j))*x[1]**o + ((0.0767546024374-0.622104630592j))*x[1]
        ref[(1, 1, 3, 1)]=(0.0415818390118+0.115763255809j)*x_ref[0]**o + ((0.29194748271-0.611739052134j))*x_ref[0] + ((0.624872695544-0.925947456163j))*x_ref[1]**o + ((0.0767546024374-0.622104630592j))*x_ref[1]
        arg[(1, 1, 3, 2)]=(0.558132636535-0.4839276621j)*x[0]**o + ((-0.769278615762+0.324005875691j))*x[0] + ((-0.39706230076-0.533491997774j))*x[1]**o + ((-0.721836784336-0.520319332198j))*x[1]
        ref[(1, 1, 3, 2)]=(0.558132636535-0.4839276621j)*x_ref[0]**o + ((-0.769278615762+0.324005875691j))*x_ref[0] + ((-0.39706230076-0.533491997774j))*x_ref[1]**o + ((-0.721836784336-0.520319332198j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(-0.940621349738+0.626420071789j)*x[0]**o + ((0.0462383416947-0.225217291014j))*x[0] + ((0.00945661489073+0.640247244634j))*x[1]**o + ((0.475108483747+0.715829911556j))*x[1]
        ref[(1, 2, 0, 0)]=(-0.940621349738+0.626420071789j)*x_ref[0]**o + ((0.0462383416947-0.225217291014j))*x_ref[0] + ((0.00945661489073+0.640247244634j))*x_ref[1]**o + ((0.475108483747+0.715829911556j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(0.0142366741261-0.66846623248j)*x[0]**o + ((0.497204609301-0.654087413411j))*x[0] + ((-0.363761438568+0.278167779569j))*x[1]**o + ((-0.438964865863-0.487113162704j))*x[1]
        ref[(1, 2, 0, 1)]=(0.0142366741261-0.66846623248j)*x_ref[0]**o + ((0.497204609301-0.654087413411j))*x_ref[0] + ((-0.363761438568+0.278167779569j))*x_ref[1]**o + ((-0.438964865863-0.487113162704j))*x_ref[1]
        arg[(1, 2, 0, 2)]=(0.987012326588+0.429874009239j)*x[0]**o + ((0.0551589198002+0.869559125087j))*x[0] + ((-0.275996286023+0.604792804338j))*x[1]**o + ((-0.690283747714-0.495629324908j))*x[1]
        ref[(1, 2, 0, 2)]=(0.987012326588+0.429874009239j)*x_ref[0]**o + ((0.0551589198002+0.869559125087j))*x_ref[0] + ((-0.275996286023+0.604792804338j))*x_ref[1]**o + ((-0.690283747714-0.495629324908j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(0.0336081599906-0.703467809667j)*x[0]**o + ((0.666143619212+0.582804555374j))*x[0] + ((0.427636268179+0.818932898913j))*x[1]**o + ((-0.692059114472+0.196121404035j))*x[1]
        ref[(1, 2, 1, 0)]=(0.0336081599906-0.703467809667j)*x_ref[0]**o + ((0.666143619212+0.582804555374j))*x_ref[0] + ((0.427636268179+0.818932898913j))*x_ref[1]**o + ((-0.692059114472+0.196121404035j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.316013363697+0.460862186184j)*x[0]**o + ((0.491612692313+0.392691773101j))*x[0] + ((-0.118024176153-0.342780133952j))*x[1]**o + ((0.867541263102-0.719961696556j))*x[1]
        ref[(1, 2, 1, 1)]=(0.316013363697+0.460862186184j)*x_ref[0]**o + ((0.491612692313+0.392691773101j))*x_ref[0] + ((-0.118024176153-0.342780133952j))*x_ref[1]**o + ((0.867541263102-0.719961696556j))*x_ref[1]
        arg[(1, 2, 1, 2)]=(-0.927447474437-0.329276458382j)*x[0]**o + ((0.311419136407+0.0828004756135j))*x[0] + ((0.544482832546-0.0482906492604j))*x[1]**o + ((-0.756077471876+0.318018509146j))*x[1]
        ref[(1, 2, 1, 2)]=(-0.927447474437-0.329276458382j)*x_ref[0]**o + ((0.311419136407+0.0828004756135j))*x_ref[0] + ((0.544482832546-0.0482906492604j))*x_ref[1]**o + ((-0.756077471876+0.318018509146j))*x_ref[1]
        arg[(1, 2, 2, 0)]=(0.580628505319+0.198372045622j)*x[0]**o + ((0.458096146954-0.628514760695j))*x[0] + ((0.000266288838007+0.443352436935j))*x[1]**o + ((0.431234328666+0.146927168473j))*x[1]
        ref[(1, 2, 2, 0)]=(0.580628505319+0.198372045622j)*x_ref[0]**o + ((0.458096146954-0.628514760695j))*x_ref[0] + ((0.000266288838007+0.443352436935j))*x_ref[1]**o + ((0.431234328666+0.146927168473j))*x_ref[1]
        arg[(1, 2, 2, 1)]=(0.515995686247+0.80828354638j)*x[0]**o + ((0.310514520699+0.227298711383j))*x[0] + ((0.071184719684-0.730176238652j))*x[1]**o + ((-0.0211647517596-0.290524992343j))*x[1]
        ref[(1, 2, 2, 1)]=(0.515995686247+0.80828354638j)*x_ref[0]**o + ((0.310514520699+0.227298711383j))*x_ref[0] + ((0.071184719684-0.730176238652j))*x_ref[1]**o + ((-0.0211647517596-0.290524992343j))*x_ref[1]
        arg[(1, 2, 2, 2)]=(0.124733888114-0.172651183945j)*x[0]**o + ((-0.0330173194462+0.0587264928262j))*x[0] + ((-0.292723194018+0.544417839922j))*x[1]**o + ((0.245534143683-0.83201723901j))*x[1]
        ref[(1, 2, 2, 2)]=(0.124733888114-0.172651183945j)*x_ref[0]**o + ((-0.0330173194462+0.0587264928262j))*x_ref[0] + ((-0.292723194018+0.544417839922j))*x_ref[1]**o + ((0.245534143683-0.83201723901j))*x_ref[1]
        arg[(1, 2, 3, 0)]=(0.6846981502-0.682434374542j)*x[0]**o + ((-0.49732758796-0.0464921351734j))*x[0] + ((-0.00891898453217+0.963549719715j))*x[1]**o + ((-0.582234832618+0.258104373234j))*x[1]
        ref[(1, 2, 3, 0)]=(0.6846981502-0.682434374542j)*x_ref[0]**o + ((-0.49732758796-0.0464921351734j))*x_ref[0] + ((-0.00891898453217+0.963549719715j))*x_ref[1]**o + ((-0.582234832618+0.258104373234j))*x_ref[1]
        arg[(1, 2, 3, 1)]=(-0.829765636522-0.327217299853j)*x[0]**o + ((0.520427407632+0.82059707944j))*x[0] + ((0.268656528446+0.813483527279j))*x[1]**o + ((0.00982737088116+0.405149725508j))*x[1]
        ref[(1, 2, 3, 1)]=(-0.829765636522-0.327217299853j)*x_ref[0]**o + ((0.520427407632+0.82059707944j))*x_ref[0] + ((0.268656528446+0.813483527279j))*x_ref[1]**o + ((0.00982737088116+0.405149725508j))*x_ref[1]
        arg[(1, 2, 3, 2)]=(-0.104714328555-0.197886411518j)*x[0]**o + ((0.849285521304-0.891595424955j))*x[0] + ((0.195588340214-0.288253847526j))*x[1]**o + ((-0.660987636333-0.147252895002j))*x[1]
        ref[(1, 2, 3, 2)]=(-0.104714328555-0.197886411518j)*x_ref[0]**o + ((0.849285521304-0.891595424955j))*x_ref[0] + ((0.195588340214-0.288253847526j))*x_ref[1]**o + ((-0.660987636333-0.147252895002j))*x_ref[1]
        arg[(1, 3, 0, 0)]=(-0.178659769463-0.65962582195j)*x[0]**o + ((-0.76017795524+0.707480465189j))*x[0] + ((-0.787104319603-0.206172077973j))*x[1]**o + ((0.0679717396675-0.588208684877j))*x[1]
        ref[(1, 3, 0, 0)]=(-0.178659769463-0.65962582195j)*x_ref[0]**o + ((-0.76017795524+0.707480465189j))*x_ref[0] + ((-0.787104319603-0.206172077973j))*x_ref[1]**o + ((0.0679717396675-0.588208684877j))*x_ref[1]
        arg[(1, 3, 0, 1)]=(-0.135058637312-0.113247007519j)*x[0]**o + ((-0.0794880341143-0.942075225138j))*x[0] + ((-0.70727065653+0.832117333249j))*x[1]**o + ((-0.305850814988+0.593943752817j))*x[1]
        ref[(1, 3, 0, 1)]=(-0.135058637312-0.113247007519j)*x_ref[0]**o + ((-0.0794880341143-0.942075225138j))*x_ref[0] + ((-0.70727065653+0.832117333249j))*x_ref[1]**o + ((-0.305850814988+0.593943752817j))*x_ref[1]
        arg[(1, 3, 0, 2)]=(0.727754574622+0.218145960091j)*x[0]**o + ((-0.752207984971-0.161418735491j))*x[0] + ((0.501489712345+0.97614015773j))*x[1]**o + ((0.677802735222+0.0578201741502j))*x[1]
        ref[(1, 3, 0, 2)]=(0.727754574622+0.218145960091j)*x_ref[0]**o + ((-0.752207984971-0.161418735491j))*x_ref[0] + ((0.501489712345+0.97614015773j))*x_ref[1]**o + ((0.677802735222+0.0578201741502j))*x_ref[1]
        arg[(1, 3, 1, 0)]=(-0.89922563317+0.559366187758j)*x[0]**o + ((-0.105829674908-0.264240155688j))*x[0] + ((-0.178359652402+0.881831004772j))*x[1]**o + ((0.981839819483+0.409882086259j))*x[1]
        ref[(1, 3, 1, 0)]=(-0.89922563317+0.559366187758j)*x_ref[0]**o + ((-0.105829674908-0.264240155688j))*x_ref[0] + ((-0.178359652402+0.881831004772j))*x_ref[1]**o + ((0.981839819483+0.409882086259j))*x_ref[1]
        arg[(1, 3, 1, 1)]=(-0.59457386844-0.510829837911j)*x[0]**o + ((0.202107799175+0.922505138394j))*x[0] + ((0.504390950551+0.666624885278j))*x[1]**o + ((-0.229799745301+0.00232458366443j))*x[1]
        ref[(1, 3, 1, 1)]=(-0.59457386844-0.510829837911j)*x_ref[0]**o + ((0.202107799175+0.922505138394j))*x_ref[0] + ((0.504390950551+0.666624885278j))*x_ref[1]**o + ((-0.229799745301+0.00232458366443j))*x_ref[1]
        arg[(1, 3, 1, 2)]=(0.517200886609+0.327150309023j)*x[0]**o + ((0.723230827528+0.195351826366j))*x[0] + ((0.372578388016+0.20155694918j))*x[1]**o + ((0.321418239401-0.00261376789582j))*x[1]
        ref[(1, 3, 1, 2)]=(0.517200886609+0.327150309023j)*x_ref[0]**o + ((0.723230827528+0.195351826366j))*x_ref[0] + ((0.372578388016+0.20155694918j))*x_ref[1]**o + ((0.321418239401-0.00261376789582j))*x_ref[1]
        arg[(1, 3, 2, 0)]=(-0.0170144658291+0.69302605741j)*x[0]**o + ((0.0589239275917-0.817264123461j))*x[0] + ((-0.798588689956+0.0487030156603j))*x[1]**o + ((-0.105950399536+0.522666540482j))*x[1]
        ref[(1, 3, 2, 0)]=(-0.0170144658291+0.69302605741j)*x_ref[0]**o + ((0.0589239275917-0.817264123461j))*x_ref[0] + ((-0.798588689956+0.0487030156603j))*x_ref[1]**o + ((-0.105950399536+0.522666540482j))*x_ref[1]
        arg[(1, 3, 2, 1)]=(0.67331788976+0.391065773699j)*x[0]**o + ((-0.33350859032-0.590191091035j))*x[0] + ((0.932778755193-0.817719379765j))*x[1]**o + ((0.887463755279+0.341227429471j))*x[1]
        ref[(1, 3, 2, 1)]=(0.67331788976+0.391065773699j)*x_ref[0]**o + ((-0.33350859032-0.590191091035j))*x_ref[0] + ((0.932778755193-0.817719379765j))*x_ref[1]**o + ((0.887463755279+0.341227429471j))*x_ref[1]
        arg[(1, 3, 2, 2)]=(-0.1946096274+0.271964148735j)*x[0]**o + ((-0.617587021402+0.732088975111j))*x[0] + ((0.429775363062-0.906277801101j))*x[1]**o + ((-0.00681072892559+0.0708520014752j))*x[1]
        ref[(1, 3, 2, 2)]=(-0.1946096274+0.271964148735j)*x_ref[0]**o + ((-0.617587021402+0.732088975111j))*x_ref[0] + ((0.429775363062-0.906277801101j))*x_ref[1]**o + ((-0.00681072892559+0.0708520014752j))*x_ref[1]
        arg[(1, 3, 3, 0)]=(0.459333242828+0.847891731782j)*x[0]**o + ((-0.864287586741+0.345988824468j))*x[0] + ((-0.434516646434-0.310711266254j))*x[1]**o + ((0.344870444236-0.0719724582478j))*x[1]
        ref[(1, 3, 3, 0)]=(0.459333242828+0.847891731782j)*x_ref[0]**o + ((-0.864287586741+0.345988824468j))*x_ref[0] + ((-0.434516646434-0.310711266254j))*x_ref[1]**o + ((0.344870444236-0.0719724582478j))*x_ref[1]
        arg[(1, 3, 3, 1)]=(0.0460318558592+0.0824030222714j)*x[0]**o + ((-0.247271615525+0.996474899413j))*x[0] + ((-0.941127176498+0.40873063651j))*x[1]**o + ((-0.0112614922525+0.52920762109j))*x[1]
        ref[(1, 3, 3, 1)]=(0.0460318558592+0.0824030222714j)*x_ref[0]**o + ((-0.247271615525+0.996474899413j))*x_ref[0] + ((-0.941127176498+0.40873063651j))*x_ref[1]**o + ((-0.0112614922525+0.52920762109j))*x_ref[1]
        arg[(1, 3, 3, 2)]=(-0.908235190237+0.570377318543j)*x[0]**o + ((-0.221935183519-0.301465218721j))*x[0] + ((0.331974534636-0.309985960839j))*x[1]**o + ((-0.775706625225+0.874560605984j))*x[1]
        ref[(1, 3, 3, 2)]=(-0.908235190237+0.570377318543j)*x_ref[0]**o + ((-0.221935183519-0.301465218721j))*x_ref[0] + ((0.331974534636-0.309985960839j))*x_ref[1]**o + ((-0.775706625225+0.874560605984j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.360801548503-0.620217933616j)*x[0]**o + ((0.0436741832722+0.244330589879j))*x[0] + ((-0.322191098896+0.477877930337j))*x[1]**o + ((-0.723033730849-0.0290304442839j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.360801548503-0.620217933616j)*x_ref[0]**o + ((0.0436741832722+0.244330589879j))*x_ref[0] + ((-0.322191098896+0.477877930337j))*x_ref[1]**o + ((-0.723033730849-0.0290304442839j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(-0.537302931203+0.402700412326j)*x[0]**o + ((0.678413799076-0.937446726627j))*x[0] + ((0.123531183062+0.380220547738j))*x[1]**o + ((-0.940691661942+0.994956079857j))*x[1]
        ref[(2, 0, 0, 1)]=(-0.537302931203+0.402700412326j)*x_ref[0]**o + ((0.678413799076-0.937446726627j))*x_ref[0] + ((0.123531183062+0.380220547738j))*x_ref[1]**o + ((-0.940691661942+0.994956079857j))*x_ref[1]
        arg[(2, 0, 0, 2)]=(0.188393294662-0.498382263466j)*x[0]**o + ((0.73707016795-0.440386091641j))*x[0] + ((-0.739260810371-0.551755852167j))*x[1]**o + ((0.400877535474+0.238877632901j))*x[1]
        ref[(2, 0, 0, 2)]=(0.188393294662-0.498382263466j)*x_ref[0]**o + ((0.73707016795-0.440386091641j))*x_ref[0] + ((-0.739260810371-0.551755852167j))*x_ref[1]**o + ((0.400877535474+0.238877632901j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(-0.517980417741+0.579007926491j)*x[0]**o + ((0.797514522181+0.307865773889j))*x[0] + ((0.189848767467-0.859062718904j))*x[1]**o + ((0.220397044142-0.331579233901j))*x[1]
        ref[(2, 0, 1, 0)]=(-0.517980417741+0.579007926491j)*x_ref[0]**o + ((0.797514522181+0.307865773889j))*x_ref[0] + ((0.189848767467-0.859062718904j))*x_ref[1]**o + ((0.220397044142-0.331579233901j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(-0.803707320713+0.98975405495j)*x[0]**o + ((-0.909971440477+0.761450088765j))*x[0] + ((0.316877723454-0.336301666211j))*x[1]**o + ((-0.384930619892+0.901161776594j))*x[1]
        ref[(2, 0, 1, 1)]=(-0.803707320713+0.98975405495j)*x_ref[0]**o + ((-0.909971440477+0.761450088765j))*x_ref[0] + ((0.316877723454-0.336301666211j))*x_ref[1]**o + ((-0.384930619892+0.901161776594j))*x_ref[1]
        arg[(2, 0, 1, 2)]=(0.373587911785+0.885018512122j)*x[0]**o + ((0.858333618106-0.833070584006j))*x[0] + ((-0.663804364788+0.428793059693j))*x[1]**o + ((-0.0688201431327+0.0729185388087j))*x[1]
        ref[(2, 0, 1, 2)]=(0.373587911785+0.885018512122j)*x_ref[0]**o + ((0.858333618106-0.833070584006j))*x_ref[0] + ((-0.663804364788+0.428793059693j))*x_ref[1]**o + ((-0.0688201431327+0.0729185388087j))*x_ref[1]
        arg[(2, 0, 2, 0)]=(-0.835792602155-0.600291623362j)*x[0]**o + ((-0.280182499691-0.221299580605j))*x[0] + ((0.88073936844-0.42765496703j))*x[1]**o + ((0.370166803788-0.0972239302233j))*x[1]
        ref[(2, 0, 2, 0)]=(-0.835792602155-0.600291623362j)*x_ref[0]**o + ((-0.280182499691-0.221299580605j))*x_ref[0] + ((0.88073936844-0.42765496703j))*x_ref[1]**o + ((0.370166803788-0.0972239302233j))*x_ref[1]
        arg[(2, 0, 2, 1)]=(-0.172704141881-0.0689139234205j)*x[0]**o + ((-0.244528840353-0.210072902408j))*x[0] + ((-0.703943070254-0.756013960945j))*x[1]**o + ((0.104854278463-0.0193580423088j))*x[1]
        ref[(2, 0, 2, 1)]=(-0.172704141881-0.0689139234205j)*x_ref[0]**o + ((-0.244528840353-0.210072902408j))*x_ref[0] + ((-0.703943070254-0.756013960945j))*x_ref[1]**o + ((0.104854278463-0.0193580423088j))*x_ref[1]
        arg[(2, 0, 2, 2)]=(0.0456701186039-0.498894319772j)*x[0]**o + ((0.618868641466+0.385815471477j))*x[0] + ((-0.415937847371-0.630994187204j))*x[1]**o + ((0.334034593326-0.231522350458j))*x[1]
        ref[(2, 0, 2, 2)]=(0.0456701186039-0.498894319772j)*x_ref[0]**o + ((0.618868641466+0.385815471477j))*x_ref[0] + ((-0.415937847371-0.630994187204j))*x_ref[1]**o + ((0.334034593326-0.231522350458j))*x_ref[1]
        arg[(2, 0, 3, 0)]=(0.945343139708-0.340299539926j)*x[0]**o + ((0.234669885513+0.0163326852514j))*x[0] + ((0.86497276496-0.117113593121j))*x[1]**o + ((0.180877980614-0.151566138865j))*x[1]
        ref[(2, 0, 3, 0)]=(0.945343139708-0.340299539926j)*x_ref[0]**o + ((0.234669885513+0.0163326852514j))*x_ref[0] + ((0.86497276496-0.117113593121j))*x_ref[1]**o + ((0.180877980614-0.151566138865j))*x_ref[1]
        arg[(2, 0, 3, 1)]=(0.734502221033-0.426302218161j)*x[0]**o + ((-0.752510461649+0.479329909158j))*x[0] + ((-0.417541344514-0.217049317018j))*x[1]**o + ((0.974559120323+0.429313540295j))*x[1]
        ref[(2, 0, 3, 1)]=(0.734502221033-0.426302218161j)*x_ref[0]**o + ((-0.752510461649+0.479329909158j))*x_ref[0] + ((-0.417541344514-0.217049317018j))*x_ref[1]**o + ((0.974559120323+0.429313540295j))*x_ref[1]
        arg[(2, 0, 3, 2)]=(-0.714706010479-0.697629643027j)*x[0]**o + ((-0.81541899086-0.88376040692j))*x[0] + ((0.0465603493769-0.288287107399j))*x[1]**o + ((0.166120319906+0.685823117328j))*x[1]
        ref[(2, 0, 3, 2)]=(-0.714706010479-0.697629643027j)*x_ref[0]**o + ((-0.81541899086-0.88376040692j))*x_ref[0] + ((0.0465603493769-0.288287107399j))*x_ref[1]**o + ((0.166120319906+0.685823117328j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(0.138831999349+0.109737344492j)*x[0]**o + ((-0.306192385176-0.323230211403j))*x[0] + ((-0.436166011086-0.124294938599j))*x[1]**o + ((-0.409822838285+0.963161662596j))*x[1]
        ref[(2, 1, 0, 0)]=(0.138831999349+0.109737344492j)*x_ref[0]**o + ((-0.306192385176-0.323230211403j))*x_ref[0] + ((-0.436166011086-0.124294938599j))*x_ref[1]**o + ((-0.409822838285+0.963161662596j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.561670792659-0.230481970412j)*x[0]**o + ((-0.405791439373+0.312887885283j))*x[0] + ((0.635703332394-0.034941681292j))*x[1]**o + ((-0.622250423358-0.63410453892j))*x[1]
        ref[(2, 1, 0, 1)]=(0.561670792659-0.230481970412j)*x_ref[0]**o + ((-0.405791439373+0.312887885283j))*x_ref[0] + ((0.635703332394-0.034941681292j))*x_ref[1]**o + ((-0.622250423358-0.63410453892j))*x_ref[1]
        arg[(2, 1, 0, 2)]=(-0.233984920995+0.136923912608j)*x[0]**o + ((0.183383133098-0.924600888537j))*x[0] + ((0.497158855342+0.912542790981j))*x[1]**o + ((0.489170576447-0.263441906404j))*x[1]
        ref[(2, 1, 0, 2)]=(-0.233984920995+0.136923912608j)*x_ref[0]**o + ((0.183383133098-0.924600888537j))*x_ref[0] + ((0.497158855342+0.912542790981j))*x_ref[1]**o + ((0.489170576447-0.263441906404j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(0.816995506402-0.897413005347j)*x[0]**o + ((-0.96669404458-0.718024760586j))*x[0] + ((-0.534574093872-0.187931096456j))*x[1]**o + ((0.711794245515-0.651559693003j))*x[1]
        ref[(2, 1, 1, 0)]=(0.816995506402-0.897413005347j)*x_ref[0]**o + ((-0.96669404458-0.718024760586j))*x_ref[0] + ((-0.534574093872-0.187931096456j))*x_ref[1]**o + ((0.711794245515-0.651559693003j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(0.808824788796-0.722705643884j)*x[0]**o + ((0.687877411689-0.119126591947j))*x[0] + ((0.124143301587+0.479655039439j))*x[1]**o + ((-0.111549509076+0.819779514162j))*x[1]
        ref[(2, 1, 1, 1)]=(0.808824788796-0.722705643884j)*x_ref[0]**o + ((0.687877411689-0.119126591947j))*x_ref[0] + ((0.124143301587+0.479655039439j))*x_ref[1]**o + ((-0.111549509076+0.819779514162j))*x_ref[1]
        arg[(2, 1, 1, 2)]=(-0.00796709796962+0.850479185909j)*x[0]**o + ((0.869798589954+0.817290938838j))*x[0] + ((-0.64132990087-0.454907277553j))*x[1]**o + ((0.643159151289-0.24723617401j))*x[1]
        ref[(2, 1, 1, 2)]=(-0.00796709796962+0.850479185909j)*x_ref[0]**o + ((0.869798589954+0.817290938838j))*x_ref[0] + ((-0.64132990087-0.454907277553j))*x_ref[1]**o + ((0.643159151289-0.24723617401j))*x_ref[1]
        arg[(2, 1, 2, 0)]=(0.782668462213-0.0260042395535j)*x[0]**o + ((0.342100643298+0.564597619263j))*x[0] + ((0.950148917426-0.957221839874j))*x[1]**o + ((-0.740534679107+0.0704767672017j))*x[1]
        ref[(2, 1, 2, 0)]=(0.782668462213-0.0260042395535j)*x_ref[0]**o + ((0.342100643298+0.564597619263j))*x_ref[0] + ((0.950148917426-0.957221839874j))*x_ref[1]**o + ((-0.740534679107+0.0704767672017j))*x_ref[1]
        arg[(2, 1, 2, 1)]=(-0.31972186106+0.204129227778j)*x[0]**o + ((0.898257438137+0.585030703619j))*x[0] + ((-0.295789838606+0.769770400712j))*x[1]**o + ((-0.0101179434408-0.876072196074j))*x[1]
        ref[(2, 1, 2, 1)]=(-0.31972186106+0.204129227778j)*x_ref[0]**o + ((0.898257438137+0.585030703619j))*x_ref[0] + ((-0.295789838606+0.769770400712j))*x_ref[1]**o + ((-0.0101179434408-0.876072196074j))*x_ref[1]
        arg[(2, 1, 2, 2)]=(-0.635709317918-0.0309167315334j)*x[0]**o + ((-0.731615726769-0.921097252094j))*x[0] + ((-0.802379558558-0.519513798781j))*x[1]**o + ((0.375708685378-0.5805156767j))*x[1]
        ref[(2, 1, 2, 2)]=(-0.635709317918-0.0309167315334j)*x_ref[0]**o + ((-0.731615726769-0.921097252094j))*x_ref[0] + ((-0.802379558558-0.519513798781j))*x_ref[1]**o + ((0.375708685378-0.5805156767j))*x_ref[1]
        arg[(2, 1, 3, 0)]=(0.380851498453-0.559141567589j)*x[0]**o + ((0.759819199312+0.70144599821j))*x[0] + ((-0.692469743647-0.86653791446j))*x[1]**o + ((0.295854097992+0.419393769736j))*x[1]
        ref[(2, 1, 3, 0)]=(0.380851498453-0.559141567589j)*x_ref[0]**o + ((0.759819199312+0.70144599821j))*x_ref[0] + ((-0.692469743647-0.86653791446j))*x_ref[1]**o + ((0.295854097992+0.419393769736j))*x_ref[1]
        arg[(2, 1, 3, 1)]=(-0.891260564267+0.131070105978j)*x[0]**o + ((0.355007664467+0.801617154442j))*x[0] + ((-0.16764478446-0.32991109866j))*x[1]**o + ((-0.743338908314-0.44635675983j))*x[1]
        ref[(2, 1, 3, 1)]=(-0.891260564267+0.131070105978j)*x_ref[0]**o + ((0.355007664467+0.801617154442j))*x_ref[0] + ((-0.16764478446-0.32991109866j))*x_ref[1]**o + ((-0.743338908314-0.44635675983j))*x_ref[1]
        arg[(2, 1, 3, 2)]=(-0.948998003127+0.986427658888j)*x[0]**o + ((0.038315210403+0.454711211573j))*x[0] + ((-0.953091354727-0.287123479159j))*x[1]**o + ((0.527404974896-0.0893491126723j))*x[1]
        ref[(2, 1, 3, 2)]=(-0.948998003127+0.986427658888j)*x_ref[0]**o + ((0.038315210403+0.454711211573j))*x_ref[0] + ((-0.953091354727-0.287123479159j))*x_ref[1]**o + ((0.527404974896-0.0893491126723j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(0.573428160166+0.892789167817j)*x[0]**o + ((-0.0870338427023-0.222927807885j))*x[0] + ((0.34133366267+0.142693601166j))*x[1]**o + ((0.714225724137+0.277062910601j))*x[1]
        ref[(2, 2, 0, 0)]=(0.573428160166+0.892789167817j)*x_ref[0]**o + ((-0.0870338427023-0.222927807885j))*x_ref[0] + ((0.34133366267+0.142693601166j))*x_ref[1]**o + ((0.714225724137+0.277062910601j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(0.701129575268-0.715969837851j)*x[0]**o + ((0.91830887453-0.889220015456j))*x[0] + ((-0.989124278875-0.0323409671023j))*x[1]**o + ((-0.969255434807-0.179330425575j))*x[1]
        ref[(2, 2, 0, 1)]=(0.701129575268-0.715969837851j)*x_ref[0]**o + ((0.91830887453-0.889220015456j))*x_ref[0] + ((-0.989124278875-0.0323409671023j))*x_ref[1]**o + ((-0.969255434807-0.179330425575j))*x_ref[1]
        arg[(2, 2, 0, 2)]=(0.165756614084+0.184903725609j)*x[0]**o + ((0.959341111441+0.432495883329j))*x[0] + ((-0.260231175735-0.765805080451j))*x[1]**o + ((-0.685253353576-0.0197266324423j))*x[1]
        ref[(2, 2, 0, 2)]=(0.165756614084+0.184903725609j)*x_ref[0]**o + ((0.959341111441+0.432495883329j))*x_ref[0] + ((-0.260231175735-0.765805080451j))*x_ref[1]**o + ((-0.685253353576-0.0197266324423j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(0.929953949716-0.120069671561j)*x[0]**o + ((0.796925126118+0.817756057513j))*x[0] + ((0.373099704321-0.797438633147j))*x[1]**o + ((0.498632684526+0.472052113526j))*x[1]
        ref[(2, 2, 1, 0)]=(0.929953949716-0.120069671561j)*x_ref[0]**o + ((0.796925126118+0.817756057513j))*x_ref[0] + ((0.373099704321-0.797438633147j))*x_ref[1]**o + ((0.498632684526+0.472052113526j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(-0.235704719811+0.549628737586j)*x[0]**o + ((0.162129156584-0.566662535017j))*x[0] + ((0.959034410229+0.447489932844j))*x[1]**o + ((0.865066043598-0.820025916505j))*x[1]
        ref[(2, 2, 1, 1)]=(-0.235704719811+0.549628737586j)*x_ref[0]**o + ((0.162129156584-0.566662535017j))*x_ref[0] + ((0.959034410229+0.447489932844j))*x_ref[1]**o + ((0.865066043598-0.820025916505j))*x_ref[1]
        arg[(2, 2, 1, 2)]=(0.852679226107-0.238790636341j)*x[0]**o + ((0.798766483269-0.102202604495j))*x[0] + ((-0.368900641044+0.920447158152j))*x[1]**o + ((-0.31088982997+0.498869999575j))*x[1]
        ref[(2, 2, 1, 2)]=(0.852679226107-0.238790636341j)*x_ref[0]**o + ((0.798766483269-0.102202604495j))*x_ref[0] + ((-0.368900641044+0.920447158152j))*x_ref[1]**o + ((-0.31088982997+0.498869999575j))*x_ref[1]
        arg[(2, 2, 2, 0)]=(-0.28795550916-0.57054713598j)*x[0]**o + ((0.342645749419-0.971019782166j))*x[0] + ((0.324648449778+0.801564386189j))*x[1]**o + ((0.400896111494+0.850769583166j))*x[1]
        ref[(2, 2, 2, 0)]=(-0.28795550916-0.57054713598j)*x_ref[0]**o + ((0.342645749419-0.971019782166j))*x_ref[0] + ((0.324648449778+0.801564386189j))*x_ref[1]**o + ((0.400896111494+0.850769583166j))*x_ref[1]
        arg[(2, 2, 2, 1)]=(-0.526598675601-0.685849945484j)*x[0]**o + ((-0.575537001733+0.382875612443j))*x[0] + ((0.296276074396+0.179670921072j))*x[1]**o + ((-0.177245051749-0.0197168285068j))*x[1]
        ref[(2, 2, 2, 1)]=(-0.526598675601-0.685849945484j)*x_ref[0]**o + ((-0.575537001733+0.382875612443j))*x_ref[0] + ((0.296276074396+0.179670921072j))*x_ref[1]**o + ((-0.177245051749-0.0197168285068j))*x_ref[1]
        arg[(2, 2, 2, 2)]=(-0.0808451090791-0.099388037665j)*x[0]**o + ((-0.504642864485-0.795070424251j))*x[0] + ((-0.620624800328+0.0442331087476j))*x[1]**o + ((-0.216919096866-0.718618582028j))*x[1]
        ref[(2, 2, 2, 2)]=(-0.0808451090791-0.099388037665j)*x_ref[0]**o + ((-0.504642864485-0.795070424251j))*x_ref[0] + ((-0.620624800328+0.0442331087476j))*x_ref[1]**o + ((-0.216919096866-0.718618582028j))*x_ref[1]
        arg[(2, 2, 3, 0)]=(-0.829572233357+0.528192344641j)*x[0]**o + ((0.490155177989+0.353564216276j))*x[0] + ((-0.789783347616+0.191487720269j))*x[1]**o + ((0.0175287771469-0.452648863488j))*x[1]
        ref[(2, 2, 3, 0)]=(-0.829572233357+0.528192344641j)*x_ref[0]**o + ((0.490155177989+0.353564216276j))*x_ref[0] + ((-0.789783347616+0.191487720269j))*x_ref[1]**o + ((0.0175287771469-0.452648863488j))*x_ref[1]
        arg[(2, 2, 3, 1)]=(-0.516927580815-0.238290464318j)*x[0]**o + ((-0.409642329771-0.044131443193j))*x[0] + ((0.7396150398-0.924730141519j))*x[1]**o + ((0.000424516065639-0.0279782302118j))*x[1]
        ref[(2, 2, 3, 1)]=(-0.516927580815-0.238290464318j)*x_ref[0]**o + ((-0.409642329771-0.044131443193j))*x_ref[0] + ((0.7396150398-0.924730141519j))*x_ref[1]**o + ((0.000424516065639-0.0279782302118j))*x_ref[1]
        arg[(2, 2, 3, 2)]=(-0.448082425433+0.452495041671j)*x[0]**o + ((0.562586015349-0.582039176515j))*x[0] + ((0.432190624003-0.254224152988j))*x[1]**o + ((0.0804059083782+0.914914797845j))*x[1]
        ref[(2, 2, 3, 2)]=(-0.448082425433+0.452495041671j)*x_ref[0]**o + ((0.562586015349-0.582039176515j))*x_ref[0] + ((0.432190624003-0.254224152988j))*x_ref[1]**o + ((0.0804059083782+0.914914797845j))*x_ref[1]
        arg[(2, 3, 0, 0)]=(0.813682182973+0.152362825703j)*x[0]**o + ((-0.139601960761-0.667986060586j))*x[0] + ((0.108865757724-0.769549090456j))*x[1]**o + ((0.364311697017-0.252329719997j))*x[1]
        ref[(2, 3, 0, 0)]=(0.813682182973+0.152362825703j)*x_ref[0]**o + ((-0.139601960761-0.667986060586j))*x_ref[0] + ((0.108865757724-0.769549090456j))*x_ref[1]**o + ((0.364311697017-0.252329719997j))*x_ref[1]
        arg[(2, 3, 0, 1)]=(0.394614901498-0.30385516101j)*x[0]**o + ((-0.176412645758-0.979248606847j))*x[0] + ((-0.600967286993-0.203917617665j))*x[1]**o + ((-0.765936787791+0.0192857699164j))*x[1]
        ref[(2, 3, 0, 1)]=(0.394614901498-0.30385516101j)*x_ref[0]**o + ((-0.176412645758-0.979248606847j))*x_ref[0] + ((-0.600967286993-0.203917617665j))*x_ref[1]**o + ((-0.765936787791+0.0192857699164j))*x_ref[1]
        arg[(2, 3, 0, 2)]=(-0.289339685907+0.795282214433j)*x[0]**o + ((-0.415804977834+0.0508881419819j))*x[0] + ((0.0982378806406-0.092775945986j))*x[1]**o + ((-0.319696694663-0.602754181059j))*x[1]
        ref[(2, 3, 0, 2)]=(-0.289339685907+0.795282214433j)*x_ref[0]**o + ((-0.415804977834+0.0508881419819j))*x_ref[0] + ((0.0982378806406-0.092775945986j))*x_ref[1]**o + ((-0.319696694663-0.602754181059j))*x_ref[1]
        arg[(2, 3, 1, 0)]=(-0.481105101387-0.542146303513j)*x[0]**o + ((0.626819867071+0.507981661783j))*x[0] + ((0.413606000867+0.0936549972457j))*x[1]**o + ((-0.273876751239+0.26450112843j))*x[1]
        ref[(2, 3, 1, 0)]=(-0.481105101387-0.542146303513j)*x_ref[0]**o + ((0.626819867071+0.507981661783j))*x_ref[0] + ((0.413606000867+0.0936549972457j))*x_ref[1]**o + ((-0.273876751239+0.26450112843j))*x_ref[1]
        arg[(2, 3, 1, 1)]=(-0.767187395255-0.203530243527j)*x[0]**o + ((-0.245071396612+0.577611097695j))*x[0] + ((-0.0541656611106-0.706637795252j))*x[1]**o + ((-0.50497769715+0.36790289256j))*x[1]
        ref[(2, 3, 1, 1)]=(-0.767187395255-0.203530243527j)*x_ref[0]**o + ((-0.245071396612+0.577611097695j))*x_ref[0] + ((-0.0541656611106-0.706637795252j))*x_ref[1]**o + ((-0.50497769715+0.36790289256j))*x_ref[1]
        arg[(2, 3, 1, 2)]=(0.696280452468+0.541112038738j)*x[0]**o + ((-0.525872159663-0.629409351477j))*x[0] + ((0.225173058299-0.712998502197j))*x[1]**o + ((-0.297056914069-0.431854393818j))*x[1]
        ref[(2, 3, 1, 2)]=(0.696280452468+0.541112038738j)*x_ref[0]**o + ((-0.525872159663-0.629409351477j))*x_ref[0] + ((0.225173058299-0.712998502197j))*x_ref[1]**o + ((-0.297056914069-0.431854393818j))*x_ref[1]
        arg[(2, 3, 2, 0)]=(-0.425299887441+0.772960355546j)*x[0]**o + ((0.214088969966+0.781796205506j))*x[0] + ((-0.468809039368+0.196196652396j))*x[1]**o + ((0.39166159046+0.30389207044j))*x[1]
        ref[(2, 3, 2, 0)]=(-0.425299887441+0.772960355546j)*x_ref[0]**o + ((0.214088969966+0.781796205506j))*x_ref[0] + ((-0.468809039368+0.196196652396j))*x_ref[1]**o + ((0.39166159046+0.30389207044j))*x_ref[1]
        arg[(2, 3, 2, 1)]=(-0.386646686583+0.181202203304j)*x[0]**o + ((-0.644600719283-0.69948109206j))*x[0] + ((-0.332128330395+0.212607465726j))*x[1]**o + ((0.945814684466-0.49344735906j))*x[1]
        ref[(2, 3, 2, 1)]=(-0.386646686583+0.181202203304j)*x_ref[0]**o + ((-0.644600719283-0.69948109206j))*x_ref[0] + ((-0.332128330395+0.212607465726j))*x_ref[1]**o + ((0.945814684466-0.49344735906j))*x_ref[1]
        arg[(2, 3, 2, 2)]=(0.351285410344+0.43563498248j)*x[0]**o + ((0.360166954821-0.828163114726j))*x[0] + ((0.367868410856+0.988382616296j))*x[1]**o + ((0.473116406136-0.343865521897j))*x[1]
        ref[(2, 3, 2, 2)]=(0.351285410344+0.43563498248j)*x_ref[0]**o + ((0.360166954821-0.828163114726j))*x_ref[0] + ((0.367868410856+0.988382616296j))*x_ref[1]**o + ((0.473116406136-0.343865521897j))*x_ref[1]
        arg[(2, 3, 3, 0)]=(-0.21579555841+0.093519947566j)*x[0]**o + ((0.289395608818+0.848044714853j))*x[0] + ((0.319242481683-0.178586816467j))*x[1]**o + ((-0.00752447638719+0.854051273647j))*x[1]
        ref[(2, 3, 3, 0)]=(-0.21579555841+0.093519947566j)*x_ref[0]**o + ((0.289395608818+0.848044714853j))*x_ref[0] + ((0.319242481683-0.178586816467j))*x_ref[1]**o + ((-0.00752447638719+0.854051273647j))*x_ref[1]
        arg[(2, 3, 3, 1)]=(0.721193450089+0.757897589077j)*x[0]**o + ((0.403970578783+0.710742334543j))*x[0] + ((-0.413859539978-0.290045172398j))*x[1]**o + ((-0.958613015528+0.323951743311j))*x[1]
        ref[(2, 3, 3, 1)]=(0.721193450089+0.757897589077j)*x_ref[0]**o + ((0.403970578783+0.710742334543j))*x_ref[0] + ((-0.413859539978-0.290045172398j))*x_ref[1]**o + ((-0.958613015528+0.323951743311j))*x_ref[1]
        arg[(2, 3, 3, 2)]=(0.859278078077+0.507079657976j)*x[0]**o + ((0.405960019001-0.843513275244j))*x[0] + ((-0.85096168307+0.121960183154j))*x[1]**o + ((0.0944488875487-0.953073600314j))*x[1]
        ref[(2, 3, 3, 2)]=(0.859278078077+0.507079657976j)*x_ref[0]**o + ((0.405960019001-0.843513275244j))*x_ref[0] + ((-0.85096168307+0.121960183154j))*x_ref[1]**o + ((0.0944488875487-0.953073600314j))*x_ref[1]
        arg[(3, 0, 0, 0)]=(0.127791758149-0.0928252421482j)*x[0]**o + ((0.905625142132-0.778843712792j))*x[0] + ((0.882950087409+0.637116317991j))*x[1]**o + ((-0.966160333222+0.310050602913j))*x[1]
        ref[(3, 0, 0, 0)]=(0.127791758149-0.0928252421482j)*x_ref[0]**o + ((0.905625142132-0.778843712792j))*x_ref[0] + ((0.882950087409+0.637116317991j))*x_ref[1]**o + ((-0.966160333222+0.310050602913j))*x_ref[1]
        arg[(3, 0, 0, 1)]=(-0.597533838822+0.890809955558j)*x[0]**o + ((0.586925708447-0.38311714547j))*x[0] + ((0.0520852266657-0.530476938506j))*x[1]**o + ((-0.930817860921-0.599173699931j))*x[1]
        ref[(3, 0, 0, 1)]=(-0.597533838822+0.890809955558j)*x_ref[0]**o + ((0.586925708447-0.38311714547j))*x_ref[0] + ((0.0520852266657-0.530476938506j))*x_ref[1]**o + ((-0.930817860921-0.599173699931j))*x_ref[1]
        arg[(3, 0, 0, 2)]=(0.913244323918-0.555084205846j)*x[0]**o + ((0.638629386651-0.251407273154j))*x[0] + ((-0.747903925128+0.590492817331j))*x[1]**o + ((-0.991661570546+0.10205604318j))*x[1]
        ref[(3, 0, 0, 2)]=(0.913244323918-0.555084205846j)*x_ref[0]**o + ((0.638629386651-0.251407273154j))*x_ref[0] + ((-0.747903925128+0.590492817331j))*x_ref[1]**o + ((-0.991661570546+0.10205604318j))*x_ref[1]
        arg[(3, 0, 1, 0)]=(0.634576625821-0.890808306642j)*x[0]**o + ((0.366987517626-0.276438844269j))*x[0] + ((0.447859619622-0.657488879399j))*x[1]**o + ((0.507497315279+0.122592904374j))*x[1]
        ref[(3, 0, 1, 0)]=(0.634576625821-0.890808306642j)*x_ref[0]**o + ((0.366987517626-0.276438844269j))*x_ref[0] + ((0.447859619622-0.657488879399j))*x_ref[1]**o + ((0.507497315279+0.122592904374j))*x_ref[1]
        arg[(3, 0, 1, 1)]=(0.0761470075399-0.351012785868j)*x[0]**o + ((-0.173191480842+0.104916832907j))*x[0] + ((0.319909391989+0.314839789783j))*x[1]**o + ((-0.833583191372-0.53563445211j))*x[1]
        ref[(3, 0, 1, 1)]=(0.0761470075399-0.351012785868j)*x_ref[0]**o + ((-0.173191480842+0.104916832907j))*x_ref[0] + ((0.319909391989+0.314839789783j))*x_ref[1]**o + ((-0.833583191372-0.53563445211j))*x_ref[1]
        arg[(3, 0, 1, 2)]=(0.313132921825-0.84582290368j)*x[0]**o + ((-0.702647630703-0.500976603038j))*x[0] + ((-0.0944753182265-0.9012994005j))*x[1]**o + ((-0.902801042432-0.959701328354j))*x[1]
        ref[(3, 0, 1, 2)]=(0.313132921825-0.84582290368j)*x_ref[0]**o + ((-0.702647630703-0.500976603038j))*x_ref[0] + ((-0.0944753182265-0.9012994005j))*x_ref[1]**o + ((-0.902801042432-0.959701328354j))*x_ref[1]
        arg[(3, 0, 2, 0)]=(0.461665909193+0.507235070214j)*x[0]**o + ((0.302836154294+0.704572368986j))*x[0] + ((0.80113363353+0.672980794979j))*x[1]**o + ((-0.376703705319-0.344359901253j))*x[1]
        ref[(3, 0, 2, 0)]=(0.461665909193+0.507235070214j)*x_ref[0]**o + ((0.302836154294+0.704572368986j))*x_ref[0] + ((0.80113363353+0.672980794979j))*x_ref[1]**o + ((-0.376703705319-0.344359901253j))*x_ref[1]
        arg[(3, 0, 2, 1)]=(-0.8854473329+0.769950496771j)*x[0]**o + ((0.916687149734+0.867878592272j))*x[0] + ((-0.977668648118-0.538569249269j))*x[1]**o + ((0.989422631572-0.0709990857991j))*x[1]
        ref[(3, 0, 2, 1)]=(-0.8854473329+0.769950496771j)*x_ref[0]**o + ((0.916687149734+0.867878592272j))*x_ref[0] + ((-0.977668648118-0.538569249269j))*x_ref[1]**o + ((0.989422631572-0.0709990857991j))*x_ref[1]
        arg[(3, 0, 2, 2)]=(-0.259846811278+0.619650940424j)*x[0]**o + ((-0.0907761891575-0.562370847151j))*x[0] + ((-0.0348313578218-0.761585189338j))*x[1]**o + ((0.410824342266-0.997519178896j))*x[1]
        ref[(3, 0, 2, 2)]=(-0.259846811278+0.619650940424j)*x_ref[0]**o + ((-0.0907761891575-0.562370847151j))*x_ref[0] + ((-0.0348313578218-0.761585189338j))*x_ref[1]**o + ((0.410824342266-0.997519178896j))*x_ref[1]
        arg[(3, 0, 3, 0)]=(0.420181096516+0.734952464725j)*x[0]**o + ((0.39480858136+0.631216754439j))*x[0] + ((0.755396118892+0.754998405931j))*x[1]**o + ((0.957917895083-0.389173832773j))*x[1]
        ref[(3, 0, 3, 0)]=(0.420181096516+0.734952464725j)*x_ref[0]**o + ((0.39480858136+0.631216754439j))*x_ref[0] + ((0.755396118892+0.754998405931j))*x_ref[1]**o + ((0.957917895083-0.389173832773j))*x_ref[1]
        arg[(3, 0, 3, 1)]=(-0.775581437466-0.156056375529j)*x[0]**o + ((0.566584487475+0.259111239661j))*x[0] + ((0.0556032708102-0.487560787456j))*x[1]**o + ((-0.457706574636-0.334307699155j))*x[1]
        ref[(3, 0, 3, 1)]=(-0.775581437466-0.156056375529j)*x_ref[0]**o + ((0.566584487475+0.259111239661j))*x_ref[0] + ((0.0556032708102-0.487560787456j))*x_ref[1]**o + ((-0.457706574636-0.334307699155j))*x_ref[1]
        arg[(3, 0, 3, 2)]=(0.881652181601-0.306807788471j)*x[0]**o + ((0.524966794786-0.867812446342j))*x[0] + ((0.6404128572-0.0328540230554j))*x[1]**o + ((-0.137624828044-0.797969037414j))*x[1]
        ref[(3, 0, 3, 2)]=(0.881652181601-0.306807788471j)*x_ref[0]**o + ((0.524966794786-0.867812446342j))*x_ref[0] + ((0.6404128572-0.0328540230554j))*x_ref[1]**o + ((-0.137624828044-0.797969037414j))*x_ref[1]
        arg[(3, 1, 0, 0)]=(0.402081835527+0.740511625774j)*x[0]**o + ((0.380660478736-0.191126742891j))*x[0] + ((0.518472405817-0.455814252267j))*x[1]**o + ((-0.463422489448+0.877287084533j))*x[1]
        ref[(3, 1, 0, 0)]=(0.402081835527+0.740511625774j)*x_ref[0]**o + ((0.380660478736-0.191126742891j))*x_ref[0] + ((0.518472405817-0.455814252267j))*x_ref[1]**o + ((-0.463422489448+0.877287084533j))*x_ref[1]
        arg[(3, 1, 0, 1)]=(-0.720024141156+0.708843874393j)*x[0]**o + ((-0.892080887163+0.651271199436j))*x[0] + ((-0.499877143332-0.648945744008j))*x[1]**o + ((-0.660698423079+0.481766310449j))*x[1]
        ref[(3, 1, 0, 1)]=(-0.720024141156+0.708843874393j)*x_ref[0]**o + ((-0.892080887163+0.651271199436j))*x_ref[0] + ((-0.499877143332-0.648945744008j))*x_ref[1]**o + ((-0.660698423079+0.481766310449j))*x_ref[1]
        arg[(3, 1, 0, 2)]=(-0.727091851065+0.257871132058j)*x[0]**o + ((0.320829802316-0.915364194817j))*x[0] + ((0.0989640294682+0.161529812162j))*x[1]**o + ((0.807773330501+0.948620830585j))*x[1]
        ref[(3, 1, 0, 2)]=(-0.727091851065+0.257871132058j)*x_ref[0]**o + ((0.320829802316-0.915364194817j))*x_ref[0] + ((0.0989640294682+0.161529812162j))*x_ref[1]**o + ((0.807773330501+0.948620830585j))*x_ref[1]
        arg[(3, 1, 1, 0)]=(0.742000892629-0.078095799245j)*x[0]**o + ((0.267021131659-0.114591841676j))*x[0] + ((0.299206203934+0.737289463559j))*x[1]**o + ((-0.899807122045-0.609848335475j))*x[1]
        ref[(3, 1, 1, 0)]=(0.742000892629-0.078095799245j)*x_ref[0]**o + ((0.267021131659-0.114591841676j))*x_ref[0] + ((0.299206203934+0.737289463559j))*x_ref[1]**o + ((-0.899807122045-0.609848335475j))*x_ref[1]
        arg[(3, 1, 1, 1)]=(-0.00505908381461+0.55528962989j)*x[0]**o + ((0.714810088842-0.235249167875j))*x[0] + ((-0.853940990752+0.955319590129j))*x[1]**o + ((-0.000790306633422+0.893714550875j))*x[1]
        ref[(3, 1, 1, 1)]=(-0.00505908381461+0.55528962989j)*x_ref[0]**o + ((0.714810088842-0.235249167875j))*x_ref[0] + ((-0.853940990752+0.955319590129j))*x_ref[1]**o + ((-0.000790306633422+0.893714550875j))*x_ref[1]
        arg[(3, 1, 1, 2)]=(0.201336528417-0.0606554970023j)*x[0]**o + ((0.743920620485+0.652823480347j))*x[0] + ((-0.331832088243+0.390053511118j))*x[1]**o + ((0.347884372463+0.93373211684j))*x[1]
        ref[(3, 1, 1, 2)]=(0.201336528417-0.0606554970023j)*x_ref[0]**o + ((0.743920620485+0.652823480347j))*x_ref[0] + ((-0.331832088243+0.390053511118j))*x_ref[1]**o + ((0.347884372463+0.93373211684j))*x_ref[1]
        arg[(3, 1, 2, 0)]=(0.17339117305-0.463459890792j)*x[0]**o + ((0.0249817073071-0.940425652492j))*x[0] + ((0.626658583454-0.00442755071317j))*x[1]**o + ((0.29248704358+0.446747406229j))*x[1]
        ref[(3, 1, 2, 0)]=(0.17339117305-0.463459890792j)*x_ref[0]**o + ((0.0249817073071-0.940425652492j))*x_ref[0] + ((0.626658583454-0.00442755071317j))*x_ref[1]**o + ((0.29248704358+0.446747406229j))*x_ref[1]
        arg[(3, 1, 2, 1)]=(0.896492853686+0.241839444973j)*x[0]**o + ((-0.444490110655-0.846139996209j))*x[0] + ((0.344053914049-0.057161668409j))*x[1]**o + ((-0.0942945685929-0.376465505193j))*x[1]
        ref[(3, 1, 2, 1)]=(0.896492853686+0.241839444973j)*x_ref[0]**o + ((-0.444490110655-0.846139996209j))*x_ref[0] + ((0.344053914049-0.057161668409j))*x_ref[1]**o + ((-0.0942945685929-0.376465505193j))*x_ref[1]
        arg[(3, 1, 2, 2)]=(0.382147276598+0.292299830177j)*x[0]**o + ((-0.610323951508+0.402024122601j))*x[0] + ((-0.995837633656-0.711813713997j))*x[1]**o + ((0.0112458604345-0.716703252043j))*x[1]
        ref[(3, 1, 2, 2)]=(0.382147276598+0.292299830177j)*x_ref[0]**o + ((-0.610323951508+0.402024122601j))*x_ref[0] + ((-0.995837633656-0.711813713997j))*x_ref[1]**o + ((0.0112458604345-0.716703252043j))*x_ref[1]
        arg[(3, 1, 3, 0)]=(-0.517678779484-0.534973463803j)*x[0]**o + ((0.924055094929+0.204231641379j))*x[0] + ((-0.287600040007-0.483625323527j))*x[1]**o + ((0.23021404604-0.607891356254j))*x[1]
        ref[(3, 1, 3, 0)]=(-0.517678779484-0.534973463803j)*x_ref[0]**o + ((0.924055094929+0.204231641379j))*x_ref[0] + ((-0.287600040007-0.483625323527j))*x_ref[1]**o + ((0.23021404604-0.607891356254j))*x_ref[1]
        arg[(3, 1, 3, 1)]=(-0.92322650687-0.512103553572j)*x[0]**o + ((0.483518704976+0.467799358317j))*x[0] + ((-0.917828550478-0.172901622887j))*x[1]**o + ((0.150007809343-0.528063590845j))*x[1]
        ref[(3, 1, 3, 1)]=(-0.92322650687-0.512103553572j)*x_ref[0]**o + ((0.483518704976+0.467799358317j))*x_ref[0] + ((-0.917828550478-0.172901622887j))*x_ref[1]**o + ((0.150007809343-0.528063590845j))*x_ref[1]
        arg[(3, 1, 3, 2)]=(0.103824720656+0.593384758256j)*x[0]**o + ((-0.948964946509-0.0384003412334j))*x[0] + ((-0.949305587676-0.295624326639j))*x[1]**o + ((0.839540484505-0.0361771138759j))*x[1]
        ref[(3, 1, 3, 2)]=(0.103824720656+0.593384758256j)*x_ref[0]**o + ((-0.948964946509-0.0384003412334j))*x_ref[0] + ((-0.949305587676-0.295624326639j))*x_ref[1]**o + ((0.839540484505-0.0361771138759j))*x_ref[1]
        arg[(3, 2, 0, 0)]=(0.483304623617-0.698899893911j)*x[0]**o + ((0.974715705881+0.581764783279j))*x[0] + ((0.369758922451-0.321509115224j))*x[1]**o + ((0.398944692107+0.512192637765j))*x[1]
        ref[(3, 2, 0, 0)]=(0.483304623617-0.698899893911j)*x_ref[0]**o + ((0.974715705881+0.581764783279j))*x_ref[0] + ((0.369758922451-0.321509115224j))*x_ref[1]**o + ((0.398944692107+0.512192637765j))*x_ref[1]
        arg[(3, 2, 0, 1)]=(0.368142435241-0.843085731859j)*x[0]**o + ((0.590435301254-0.222759331604j))*x[0] + ((-0.533510698506+0.0773764455431j))*x[1]**o + ((0.669128041183+0.124218627056j))*x[1]
        ref[(3, 2, 0, 1)]=(0.368142435241-0.843085731859j)*x_ref[0]**o + ((0.590435301254-0.222759331604j))*x_ref[0] + ((-0.533510698506+0.0773764455431j))*x_ref[1]**o + ((0.669128041183+0.124218627056j))*x_ref[1]
        arg[(3, 2, 0, 2)]=(0.0699405028001+0.13425286866j)*x[0]**o + ((-0.596390191254+0.323269791659j))*x[0] + ((-0.770845066687+0.382962054956j))*x[1]**o + ((0.674910907255-0.689064769541j))*x[1]
        ref[(3, 2, 0, 2)]=(0.0699405028001+0.13425286866j)*x_ref[0]**o + ((-0.596390191254+0.323269791659j))*x_ref[0] + ((-0.770845066687+0.382962054956j))*x_ref[1]**o + ((0.674910907255-0.689064769541j))*x_ref[1]
        arg[(3, 2, 1, 0)]=(-0.256511395694+0.375054518006j)*x[0]**o + ((-0.645997602972-0.703023052342j))*x[0] + ((-0.64657131507-0.128909860135j))*x[1]**o + ((-0.60845200464-0.908991499583j))*x[1]
        ref[(3, 2, 1, 0)]=(-0.256511395694+0.375054518006j)*x_ref[0]**o + ((-0.645997602972-0.703023052342j))*x_ref[0] + ((-0.64657131507-0.128909860135j))*x_ref[1]**o + ((-0.60845200464-0.908991499583j))*x_ref[1]
        arg[(3, 2, 1, 1)]=(0.448933918669+0.627867954818j)*x[0]**o + ((-0.714037324834+0.60494189631j))*x[0] + ((-0.393872423204-0.649183239407j))*x[1]**o + ((-0.949399208243-0.848257727241j))*x[1]
        ref[(3, 2, 1, 1)]=(0.448933918669+0.627867954818j)*x_ref[0]**o + ((-0.714037324834+0.60494189631j))*x_ref[0] + ((-0.393872423204-0.649183239407j))*x_ref[1]**o + ((-0.949399208243-0.848257727241j))*x_ref[1]
        arg[(3, 2, 1, 2)]=(-0.753085356058+0.760127488704j)*x[0]**o + ((-0.101166161148+0.000518315732045j))*x[0] + ((0.762011541566+0.829506092463j))*x[1]**o + ((0.0310601733585-0.221539353854j))*x[1]
        ref[(3, 2, 1, 2)]=(-0.753085356058+0.760127488704j)*x_ref[0]**o + ((-0.101166161148+0.000518315732045j))*x_ref[0] + ((0.762011541566+0.829506092463j))*x_ref[1]**o + ((0.0310601733585-0.221539353854j))*x_ref[1]
        arg[(3, 2, 2, 0)]=(0.282830365075-0.893052310719j)*x[0]**o + ((-0.0540980547152-0.421346615027j))*x[0] + ((0.859569790125+0.0363983831425j))*x[1]**o + ((-0.249134465648-0.623183762169j))*x[1]
        ref[(3, 2, 2, 0)]=(0.282830365075-0.893052310719j)*x_ref[0]**o + ((-0.0540980547152-0.421346615027j))*x_ref[0] + ((0.859569790125+0.0363983831425j))*x_ref[1]**o + ((-0.249134465648-0.623183762169j))*x_ref[1]
        arg[(3, 2, 2, 1)]=(0.0979761236537-0.452287743791j)*x[0]**o + ((0.174190295834-0.0911238474736j))*x[0] + ((0.76055276605-0.953961062713j))*x[1]**o + ((-0.825222703509-0.933956918029j))*x[1]
        ref[(3, 2, 2, 1)]=(0.0979761236537-0.452287743791j)*x_ref[0]**o + ((0.174190295834-0.0911238474736j))*x_ref[0] + ((0.76055276605-0.953961062713j))*x_ref[1]**o + ((-0.825222703509-0.933956918029j))*x_ref[1]
        arg[(3, 2, 2, 2)]=(0.908296375871-0.32746052669j)*x[0]**o + ((-0.635020053947-0.185280341661j))*x[0] + ((0.342672313577+0.0250859833543j))*x[1]**o + ((0.0202892965586-0.292508235512j))*x[1]
        ref[(3, 2, 2, 2)]=(0.908296375871-0.32746052669j)*x_ref[0]**o + ((-0.635020053947-0.185280341661j))*x_ref[0] + ((0.342672313577+0.0250859833543j))*x_ref[1]**o + ((0.0202892965586-0.292508235512j))*x_ref[1]
        arg[(3, 2, 3, 0)]=(0.315849826189-0.590185744477j)*x[0]**o + ((0.68128770738-0.258234496988j))*x[0] + ((-0.0516572130598+0.0206566342075j))*x[1]**o + ((0.302779023484+0.341487871362j))*x[1]
        ref[(3, 2, 3, 0)]=(0.315849826189-0.590185744477j)*x_ref[0]**o + ((0.68128770738-0.258234496988j))*x_ref[0] + ((-0.0516572130598+0.0206566342075j))*x_ref[1]**o + ((0.302779023484+0.341487871362j))*x_ref[1]
        arg[(3, 2, 3, 1)]=(0.837823203772+0.401640638149j)*x[0]**o + ((-0.401073487931+0.0873737891999j))*x[0] + ((-0.593345715862+0.680105373826j))*x[1]**o + ((-0.649778501418-0.819357178785j))*x[1]
        ref[(3, 2, 3, 1)]=(0.837823203772+0.401640638149j)*x_ref[0]**o + ((-0.401073487931+0.0873737891999j))*x_ref[0] + ((-0.593345715862+0.680105373826j))*x_ref[1]**o + ((-0.649778501418-0.819357178785j))*x_ref[1]
        arg[(3, 2, 3, 2)]=(0.345167448669-0.886847024609j)*x[0]**o + ((0.686013417848-0.306656379146j))*x[0] + ((-0.675621483941+0.170079288217j))*x[1]**o + ((-0.647657341778+0.432197835517j))*x[1]
        ref[(3, 2, 3, 2)]=(0.345167448669-0.886847024609j)*x_ref[0]**o + ((0.686013417848-0.306656379146j))*x_ref[0] + ((-0.675621483941+0.170079288217j))*x_ref[1]**o + ((-0.647657341778+0.432197835517j))*x_ref[1]
        arg[(3, 3, 0, 0)]=(-0.968954366826-0.962070288884j)*x[0]**o + ((0.205120153329-0.496197319386j))*x[0] + ((0.24499066012+0.503766382864j))*x[1]**o + ((0.667238082854-0.0352473724474j))*x[1]
        ref[(3, 3, 0, 0)]=(-0.968954366826-0.962070288884j)*x_ref[0]**o + ((0.205120153329-0.496197319386j))*x_ref[0] + ((0.24499066012+0.503766382864j))*x_ref[1]**o + ((0.667238082854-0.0352473724474j))*x_ref[1]
        arg[(3, 3, 0, 1)]=(-0.581632902817+0.331770549938j)*x[0]**o + ((0.26676788981-0.896122260344j))*x[0] + ((0.766602010626+0.4369121728j))*x[1]**o + ((0.892565085875-0.819599429095j))*x[1]
        ref[(3, 3, 0, 1)]=(-0.581632902817+0.331770549938j)*x_ref[0]**o + ((0.26676788981-0.896122260344j))*x_ref[0] + ((0.766602010626+0.4369121728j))*x_ref[1]**o + ((0.892565085875-0.819599429095j))*x_ref[1]
        arg[(3, 3, 0, 2)]=(0.244706622112-0.820221001951j)*x[0]**o + ((0.310974055646+0.0807644592743j))*x[0] + ((0.770844747955-0.655754052974j))*x[1]**o + ((-0.0282908820222+0.896874407467j))*x[1]
        ref[(3, 3, 0, 2)]=(0.244706622112-0.820221001951j)*x_ref[0]**o + ((0.310974055646+0.0807644592743j))*x_ref[0] + ((0.770844747955-0.655754052974j))*x_ref[1]**o + ((-0.0282908820222+0.896874407467j))*x_ref[1]
        arg[(3, 3, 1, 0)]=(-0.803397847582+0.350527217168j)*x[0]**o + ((-0.716021438345-0.833661262695j))*x[0] + ((0.556516778739-0.995387072541j))*x[1]**o + ((-0.452437557524+0.378899504269j))*x[1]
        ref[(3, 3, 1, 0)]=(-0.803397847582+0.350527217168j)*x_ref[0]**o + ((-0.716021438345-0.833661262695j))*x_ref[0] + ((0.556516778739-0.995387072541j))*x_ref[1]**o + ((-0.452437557524+0.378899504269j))*x_ref[1]
        arg[(3, 3, 1, 1)]=(-0.850082302007-0.219956575632j)*x[0]**o + ((0.412000382693-0.349753926097j))*x[0] + ((0.755933875248-0.675220816254j))*x[1]**o + ((-0.124296142023-0.626455693551j))*x[1]
        ref[(3, 3, 1, 1)]=(-0.850082302007-0.219956575632j)*x_ref[0]**o + ((0.412000382693-0.349753926097j))*x_ref[0] + ((0.755933875248-0.675220816254j))*x_ref[1]**o + ((-0.124296142023-0.626455693551j))*x_ref[1]
        arg[(3, 3, 1, 2)]=(0.547664548168+0.12457979489j)*x[0]**o + ((-0.695145457502-0.378545839638j))*x[0] + ((0.303870802866+0.416411022613j))*x[1]**o + ((-0.34970306565-0.569029355682j))*x[1]
        ref[(3, 3, 1, 2)]=(0.547664548168+0.12457979489j)*x_ref[0]**o + ((-0.695145457502-0.378545839638j))*x_ref[0] + ((0.303870802866+0.416411022613j))*x_ref[1]**o + ((-0.34970306565-0.569029355682j))*x_ref[1]
        arg[(3, 3, 2, 0)]=(-0.742556312621+0.338920577426j)*x[0]**o + ((-0.462364389773+0.00513448465991j))*x[0] + ((0.541778430071+0.963699408185j))*x[1]**o + ((0.516130553931-0.818731100794j))*x[1]
        ref[(3, 3, 2, 0)]=(-0.742556312621+0.338920577426j)*x_ref[0]**o + ((-0.462364389773+0.00513448465991j))*x_ref[0] + ((0.541778430071+0.963699408185j))*x_ref[1]**o + ((0.516130553931-0.818731100794j))*x_ref[1]
        arg[(3, 3, 2, 1)]=(0.828472903962-0.145862369916j)*x[0]**o + ((-0.715554311374-0.386934230215j))*x[0] + ((-0.60471556262-0.907935167681j))*x[1]**o + ((0.139041840785+0.980570692428j))*x[1]
        ref[(3, 3, 2, 1)]=(0.828472903962-0.145862369916j)*x_ref[0]**o + ((-0.715554311374-0.386934230215j))*x_ref[0] + ((-0.60471556262-0.907935167681j))*x_ref[1]**o + ((0.139041840785+0.980570692428j))*x_ref[1]
        arg[(3, 3, 2, 2)]=(-0.842366193618+0.867055207833j)*x[0]**o + ((-0.370155165438+0.962185467985j))*x[0] + ((0.613265368621+0.541663115655j))*x[1]**o + ((0.268961464241+0.338684070232j))*x[1]
        ref[(3, 3, 2, 2)]=(-0.842366193618+0.867055207833j)*x_ref[0]**o + ((-0.370155165438+0.962185467985j))*x_ref[0] + ((0.613265368621+0.541663115655j))*x_ref[1]**o + ((0.268961464241+0.338684070232j))*x_ref[1]
        arg[(3, 3, 3, 0)]=(0.469841905774+0.164923856151j)*x[0]**o + ((-0.246545686915-0.951825627997j))*x[0] + ((0.9186458116+0.118051485411j))*x[1]**o + ((0.7906214985+0.384463242815j))*x[1]
        ref[(3, 3, 3, 0)]=(0.469841905774+0.164923856151j)*x_ref[0]**o + ((-0.246545686915-0.951825627997j))*x_ref[0] + ((0.9186458116+0.118051485411j))*x_ref[1]**o + ((0.7906214985+0.384463242815j))*x_ref[1]
        arg[(3, 3, 3, 1)]=(-0.77295265422+0.970962041647j)*x[0]**o + ((-0.888475467203+0.120332485311j))*x[0] + ((0.426441399906-0.881873322373j))*x[1]**o + ((0.77200728193-0.679794197008j))*x[1]
        ref[(3, 3, 3, 1)]=(-0.77295265422+0.970962041647j)*x_ref[0]**o + ((-0.888475467203+0.120332485311j))*x_ref[0] + ((0.426441399906-0.881873322373j))*x_ref[1]**o + ((0.77200728193-0.679794197008j))*x_ref[1]
        arg[(3, 3, 3, 2)]=(0.320953349686-0.177042718888j)*x[0]**o + ((-0.389685719712-0.92477091507j))*x[0] + ((-0.0283951243763-0.921626927168j))*x[1]**o + ((-0.190368162993-0.603346288014j))*x[1]
        ref[(3, 3, 3, 2)]=(0.320953349686-0.177042718888j)*x_ref[0]**o + ((-0.389685719712-0.92477091507j))*x_ref[0] + ((-0.0283951243763-0.921626927168j))*x_ref[1]**o + ((-0.190368162993-0.603346288014j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.793454924223-0.061124725031j)*x[2]**o + ((0.459455833733-0.337048092481j))*x[2]
            ref[(0, 0, 0, 0)]+=(-0.793454924223-0.061124725031j)*x_ref[2]**o + ((0.459455833733-0.337048092481j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.296070659043-0.647384883412j)*x[2]**o + ((0.063617089243-0.452823141372j))*x[2]
            ref[(0, 0, 0, 1)]+=(-0.296070659043-0.647384883412j)*x_ref[2]**o + ((0.063617089243-0.452823141372j))*x_ref[2]
            arg[(0, 0, 0, 2)]+=(-0.037202882434-0.15255303366j)*x[2]**o + ((0.147719855823-0.761870538706j))*x[2]
            ref[(0, 0, 0, 2)]+=(-0.037202882434-0.15255303366j)*x_ref[2]**o + ((0.147719855823-0.761870538706j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.416053719766+0.658841472464j)*x[2]**o + ((-0.845151084596+0.484958637706j))*x[2]
            ref[(0, 0, 1, 0)]+=(-0.416053719766+0.658841472464j)*x_ref[2]**o + ((-0.845151084596+0.484958637706j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.00724123181422-0.848914558172j)*x[2]**o + ((-0.465062725024+0.424206988158j))*x[2]
            ref[(0, 0, 1, 1)]+=(0.00724123181422-0.848914558172j)*x_ref[2]**o + ((-0.465062725024+0.424206988158j))*x_ref[2]
            arg[(0, 0, 1, 2)]+=(-0.264631608201+0.712629865029j)*x[2]**o + ((-0.481274206705-0.522493905675j))*x[2]
            ref[(0, 0, 1, 2)]+=(-0.264631608201+0.712629865029j)*x_ref[2]**o + ((-0.481274206705-0.522493905675j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(-0.769063241253-0.048164752186j)*x[2]**o + ((-0.999394372225-0.508281933154j))*x[2]
            ref[(0, 0, 2, 0)]+=(-0.769063241253-0.048164752186j)*x_ref[2]**o + ((-0.999394372225-0.508281933154j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(-0.971474047819-0.361520233383j)*x[2]**o + ((0.246535101978+0.9843907443j))*x[2]
            ref[(0, 0, 2, 1)]+=(-0.971474047819-0.361520233383j)*x_ref[2]**o + ((0.246535101978+0.9843907443j))*x_ref[2]
            arg[(0, 0, 2, 2)]+=(-0.13535217688-0.369544775273j)*x[2]**o + ((0.0637329773071+0.392283073359j))*x[2]
            ref[(0, 0, 2, 2)]+=(-0.13535217688-0.369544775273j)*x_ref[2]**o + ((0.0637329773071+0.392283073359j))*x_ref[2]
            arg[(0, 0, 3, 0)]+=(-0.113778991129-0.764052293334j)*x[2]**o + ((0.6439431237+0.0353415876511j))*x[2]
            ref[(0, 0, 3, 0)]+=(-0.113778991129-0.764052293334j)*x_ref[2]**o + ((0.6439431237+0.0353415876511j))*x_ref[2]
            arg[(0, 0, 3, 1)]+=(-0.58166354852-0.490256659874j)*x[2]**o + ((-0.583340806266+0.67528664064j))*x[2]
            ref[(0, 0, 3, 1)]+=(-0.58166354852-0.490256659874j)*x_ref[2]**o + ((-0.583340806266+0.67528664064j))*x_ref[2]
            arg[(0, 0, 3, 2)]+=(0.758556112741+0.736973931496j)*x[2]**o + ((-0.106411375504-0.966470199678j))*x[2]
            ref[(0, 0, 3, 2)]+=(0.758556112741+0.736973931496j)*x_ref[2]**o + ((-0.106411375504-0.966470199678j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.245079658655-0.893462317064j)*x[2]**o + ((-0.91134446839+0.0656252674845j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.245079658655-0.893462317064j)*x_ref[2]**o + ((-0.91134446839+0.0656252674845j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.854350233521-0.352430197642j)*x[2]**o + ((0.177172100064+0.734235879051j))*x[2]
            ref[(0, 1, 0, 1)]+=(-0.854350233521-0.352430197642j)*x_ref[2]**o + ((0.177172100064+0.734235879051j))*x_ref[2]
            arg[(0, 1, 0, 2)]+=(0.963873169225+0.210134160182j)*x[2]**o + ((-0.994654359811-0.566600758492j))*x[2]
            ref[(0, 1, 0, 2)]+=(0.963873169225+0.210134160182j)*x_ref[2]**o + ((-0.994654359811-0.566600758492j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.949450722704+0.228790570061j)*x[2]**o + ((-0.939903772331-0.264013978922j))*x[2]
            ref[(0, 1, 1, 0)]+=(-0.949450722704+0.228790570061j)*x_ref[2]**o + ((-0.939903772331-0.264013978922j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.00398769651065-0.494900667681j)*x[2]**o + ((-0.388163885731-0.554698857386j))*x[2]
            ref[(0, 1, 1, 1)]+=(-0.00398769651065-0.494900667681j)*x_ref[2]**o + ((-0.388163885731-0.554698857386j))*x_ref[2]
            arg[(0, 1, 1, 2)]+=(0.317867351522+0.567222521752j)*x[2]**o + ((0.392901220954-0.423737862483j))*x[2]
            ref[(0, 1, 1, 2)]+=(0.317867351522+0.567222521752j)*x_ref[2]**o + ((0.392901220954-0.423737862483j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(0.191363445282+0.926203574094j)*x[2]**o + ((-0.815733967639+0.163878448974j))*x[2]
            ref[(0, 1, 2, 0)]+=(0.191363445282+0.926203574094j)*x_ref[2]**o + ((-0.815733967639+0.163878448974j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(-0.924214774376+0.485779959674j)*x[2]**o + ((-0.153601452145-0.250581356299j))*x[2]
            ref[(0, 1, 2, 1)]+=(-0.924214774376+0.485779959674j)*x_ref[2]**o + ((-0.153601452145-0.250581356299j))*x_ref[2]
            arg[(0, 1, 2, 2)]+=(-0.396242751336-0.971953660493j)*x[2]**o + ((-0.57740352856-0.197852236772j))*x[2]
            ref[(0, 1, 2, 2)]+=(-0.396242751336-0.971953660493j)*x_ref[2]**o + ((-0.57740352856-0.197852236772j))*x_ref[2]
            arg[(0, 1, 3, 0)]+=(-0.849703144701-0.0862498500923j)*x[2]**o + ((0.347373859559+0.175257758761j))*x[2]
            ref[(0, 1, 3, 0)]+=(-0.849703144701-0.0862498500923j)*x_ref[2]**o + ((0.347373859559+0.175257758761j))*x_ref[2]
            arg[(0, 1, 3, 1)]+=(-0.301374936822-0.531680670958j)*x[2]**o + ((0.191259172964+0.0348980696689j))*x[2]
            ref[(0, 1, 3, 1)]+=(-0.301374936822-0.531680670958j)*x_ref[2]**o + ((0.191259172964+0.0348980696689j))*x_ref[2]
            arg[(0, 1, 3, 2)]+=(0.838403164671-0.0170479791346j)*x[2]**o + ((0.711907226868-0.0154423998197j))*x[2]
            ref[(0, 1, 3, 2)]+=(0.838403164671-0.0170479791346j)*x_ref[2]**o + ((0.711907226868-0.0154423998197j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(-0.0997223520284-0.679146260961j)*x[2]**o + ((-0.745095042909+0.688838819122j))*x[2]
            ref[(0, 2, 0, 0)]+=(-0.0997223520284-0.679146260961j)*x_ref[2]**o + ((-0.745095042909+0.688838819122j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(-0.218668269472-0.910102677832j)*x[2]**o + ((-0.654513060425-0.303595921072j))*x[2]
            ref[(0, 2, 0, 1)]+=(-0.218668269472-0.910102677832j)*x_ref[2]**o + ((-0.654513060425-0.303595921072j))*x_ref[2]
            arg[(0, 2, 0, 2)]+=(0.897873423526-0.0913971214044j)*x[2]**o + ((0.471616424119-0.115754330585j))*x[2]
            ref[(0, 2, 0, 2)]+=(0.897873423526-0.0913971214044j)*x_ref[2]**o + ((0.471616424119-0.115754330585j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.789564226591+0.830044561117j)*x[2]**o + ((0.262473422254+0.87709817258j))*x[2]
            ref[(0, 2, 1, 0)]+=(-0.789564226591+0.830044561117j)*x_ref[2]**o + ((0.262473422254+0.87709817258j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(0.10868765663-0.796661971586j)*x[2]**o + ((0.292465418976-0.611407750889j))*x[2]
            ref[(0, 2, 1, 1)]+=(0.10868765663-0.796661971586j)*x_ref[2]**o + ((0.292465418976-0.611407750889j))*x_ref[2]
            arg[(0, 2, 1, 2)]+=(-0.323764996979+0.285318838914j)*x[2]**o + ((-0.319269482986+0.567945802708j))*x[2]
            ref[(0, 2, 1, 2)]+=(-0.323764996979+0.285318838914j)*x_ref[2]**o + ((-0.319269482986+0.567945802708j))*x_ref[2]
            arg[(0, 2, 2, 0)]+=(-0.953898938035-0.159993117646j)*x[2]**o + ((-0.317111417884-0.639433612694j))*x[2]
            ref[(0, 2, 2, 0)]+=(-0.953898938035-0.159993117646j)*x_ref[2]**o + ((-0.317111417884-0.639433612694j))*x_ref[2]
            arg[(0, 2, 2, 1)]+=(0.553011674507+0.515633831476j)*x[2]**o + ((-0.00793363006999-0.202753423812j))*x[2]
            ref[(0, 2, 2, 1)]+=(0.553011674507+0.515633831476j)*x_ref[2]**o + ((-0.00793363006999-0.202753423812j))*x_ref[2]
            arg[(0, 2, 2, 2)]+=(-0.290651925625+0.997736936092j)*x[2]**o + ((0.683829997125-0.0447417068291j))*x[2]
            ref[(0, 2, 2, 2)]+=(-0.290651925625+0.997736936092j)*x_ref[2]**o + ((0.683829997125-0.0447417068291j))*x_ref[2]
            arg[(0, 2, 3, 0)]+=(-0.97117141017+0.9619619165j)*x[2]**o + ((-0.740920486908+0.309856151718j))*x[2]
            ref[(0, 2, 3, 0)]+=(-0.97117141017+0.9619619165j)*x_ref[2]**o + ((-0.740920486908+0.309856151718j))*x_ref[2]
            arg[(0, 2, 3, 1)]+=(-0.835767171235+0.877950743679j)*x[2]**o + ((-0.960138053884+0.904951705653j))*x[2]
            ref[(0, 2, 3, 1)]+=(-0.835767171235+0.877950743679j)*x_ref[2]**o + ((-0.960138053884+0.904951705653j))*x_ref[2]
            arg[(0, 2, 3, 2)]+=(0.658366845439-0.891701053788j)*x[2]**o + ((0.664407747327+0.264485414509j))*x[2]
            ref[(0, 2, 3, 2)]+=(0.658366845439-0.891701053788j)*x_ref[2]**o + ((0.664407747327+0.264485414509j))*x_ref[2]
            arg[(0, 3, 0, 0)]+=(0.785503207472-0.0158063166194j)*x[2]**o + ((-0.324155904346-0.4155064848j))*x[2]
            ref[(0, 3, 0, 0)]+=(0.785503207472-0.0158063166194j)*x_ref[2]**o + ((-0.324155904346-0.4155064848j))*x_ref[2]
            arg[(0, 3, 0, 1)]+=(0.869087346276-0.627809314093j)*x[2]**o + ((0.911433627681+0.967854905454j))*x[2]
            ref[(0, 3, 0, 1)]+=(0.869087346276-0.627809314093j)*x_ref[2]**o + ((0.911433627681+0.967854905454j))*x_ref[2]
            arg[(0, 3, 0, 2)]+=(0.766859478235+0.956726319957j)*x[2]**o + ((-0.379193739448-0.542421085142j))*x[2]
            ref[(0, 3, 0, 2)]+=(0.766859478235+0.956726319957j)*x_ref[2]**o + ((-0.379193739448-0.542421085142j))*x_ref[2]
            arg[(0, 3, 1, 0)]+=(-0.404122590774+0.0784910958939j)*x[2]**o + ((-0.361106876569-0.206132532695j))*x[2]
            ref[(0, 3, 1, 0)]+=(-0.404122590774+0.0784910958939j)*x_ref[2]**o + ((-0.361106876569-0.206132532695j))*x_ref[2]
            arg[(0, 3, 1, 1)]+=(0.57712536274-0.997492396062j)*x[2]**o + ((0.963139621376+0.45126150135j))*x[2]
            ref[(0, 3, 1, 1)]+=(0.57712536274-0.997492396062j)*x_ref[2]**o + ((0.963139621376+0.45126150135j))*x_ref[2]
            arg[(0, 3, 1, 2)]+=(-0.419286204831+0.0171714046419j)*x[2]**o + ((-0.346651928268-0.819334036146j))*x[2]
            ref[(0, 3, 1, 2)]+=(-0.419286204831+0.0171714046419j)*x_ref[2]**o + ((-0.346651928268-0.819334036146j))*x_ref[2]
            arg[(0, 3, 2, 0)]+=(0.530030960942+0.0706105390142j)*x[2]**o + ((-0.704942121573+0.313402955537j))*x[2]
            ref[(0, 3, 2, 0)]+=(0.530030960942+0.0706105390142j)*x_ref[2]**o + ((-0.704942121573+0.313402955537j))*x_ref[2]
            arg[(0, 3, 2, 1)]+=(0.795055082964+0.248595163796j)*x[2]**o + ((0.730428937272+0.502092985057j))*x[2]
            ref[(0, 3, 2, 1)]+=(0.795055082964+0.248595163796j)*x_ref[2]**o + ((0.730428937272+0.502092985057j))*x_ref[2]
            arg[(0, 3, 2, 2)]+=(0.956118420077+0.623785954815j)*x[2]**o + ((-0.396826461529+0.29006309223j))*x[2]
            ref[(0, 3, 2, 2)]+=(0.956118420077+0.623785954815j)*x_ref[2]**o + ((-0.396826461529+0.29006309223j))*x_ref[2]
            arg[(0, 3, 3, 0)]+=(0.751198072933-0.855258975182j)*x[2]**o + ((-0.955389018054-0.275383480493j))*x[2]
            ref[(0, 3, 3, 0)]+=(0.751198072933-0.855258975182j)*x_ref[2]**o + ((-0.955389018054-0.275383480493j))*x_ref[2]
            arg[(0, 3, 3, 1)]+=(0.289467703992+0.309619497537j)*x[2]**o + ((-0.962403385175+0.115651551346j))*x[2]
            ref[(0, 3, 3, 1)]+=(0.289467703992+0.309619497537j)*x_ref[2]**o + ((-0.962403385175+0.115651551346j))*x_ref[2]
            arg[(0, 3, 3, 2)]+=(-0.642223267903-0.636973568978j)*x[2]**o + ((-0.425864568023-0.773245476575j))*x[2]
            ref[(0, 3, 3, 2)]+=(-0.642223267903-0.636973568978j)*x_ref[2]**o + ((-0.425864568023-0.773245476575j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.623709253736-0.60435723878j)*x[2]**o + ((-0.996076241279-0.252424098883j))*x[2]
            ref[(1, 0, 0, 0)]+=(-0.623709253736-0.60435723878j)*x_ref[2]**o + ((-0.996076241279-0.252424098883j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.605308807437+0.805085676027j)*x[2]**o + ((-0.655565696006+0.552883697016j))*x[2]
            ref[(1, 0, 0, 1)]+=(0.605308807437+0.805085676027j)*x_ref[2]**o + ((-0.655565696006+0.552883697016j))*x_ref[2]
            arg[(1, 0, 0, 2)]+=(-0.167564665222+0.895429586344j)*x[2]**o + ((-0.958409650089+0.534008890155j))*x[2]
            ref[(1, 0, 0, 2)]+=(-0.167564665222+0.895429586344j)*x_ref[2]**o + ((-0.958409650089+0.534008890155j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.283188894579-0.331872235034j)*x[2]**o + ((0.208565758372+0.188973159079j))*x[2]
            ref[(1, 0, 1, 0)]+=(0.283188894579-0.331872235034j)*x_ref[2]**o + ((0.208565758372+0.188973159079j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.201414831682+0.0903527797068j)*x[2]**o + ((-0.870360972626+0.389977797016j))*x[2]
            ref[(1, 0, 1, 1)]+=(0.201414831682+0.0903527797068j)*x_ref[2]**o + ((-0.870360972626+0.389977797016j))*x_ref[2]
            arg[(1, 0, 1, 2)]+=(0.381225125458-0.252945707226j)*x[2]**o + ((0.497277142312-0.203989342024j))*x[2]
            ref[(1, 0, 1, 2)]+=(0.381225125458-0.252945707226j)*x_ref[2]**o + ((0.497277142312-0.203989342024j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(-0.711484918625+0.131202899329j)*x[2]**o + ((0.616382023558+0.930178084544j))*x[2]
            ref[(1, 0, 2, 0)]+=(-0.711484918625+0.131202899329j)*x_ref[2]**o + ((0.616382023558+0.930178084544j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(-0.772151745455-0.103710646438j)*x[2]**o + ((0.823121766357+0.503911255174j))*x[2]
            ref[(1, 0, 2, 1)]+=(-0.772151745455-0.103710646438j)*x_ref[2]**o + ((0.823121766357+0.503911255174j))*x_ref[2]
            arg[(1, 0, 2, 2)]+=(0.21242463113-0.94472394819j)*x[2]**o + ((0.372782949429-0.472415295013j))*x[2]
            ref[(1, 0, 2, 2)]+=(0.21242463113-0.94472394819j)*x_ref[2]**o + ((0.372782949429-0.472415295013j))*x_ref[2]
            arg[(1, 0, 3, 0)]+=(0.288988238606-0.0675418245876j)*x[2]**o + ((-0.618980177647+0.0940021090895j))*x[2]
            ref[(1, 0, 3, 0)]+=(0.288988238606-0.0675418245876j)*x_ref[2]**o + ((-0.618980177647+0.0940021090895j))*x_ref[2]
            arg[(1, 0, 3, 1)]+=(-0.915556726507+0.703103545853j)*x[2]**o + ((-0.49986705428+0.990193898897j))*x[2]
            ref[(1, 0, 3, 1)]+=(-0.915556726507+0.703103545853j)*x_ref[2]**o + ((-0.49986705428+0.990193898897j))*x_ref[2]
            arg[(1, 0, 3, 2)]+=(-0.755336046517-0.25825852584j)*x[2]**o + ((-0.0166356919586-0.818219201425j))*x[2]
            ref[(1, 0, 3, 2)]+=(-0.755336046517-0.25825852584j)*x_ref[2]**o + ((-0.0166356919586-0.818219201425j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.138762043822+0.133042894611j)*x[2]**o + ((0.262709539595-0.649360242882j))*x[2]
            ref[(1, 1, 0, 0)]+=(-0.138762043822+0.133042894611j)*x_ref[2]**o + ((0.262709539595-0.649360242882j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.47396021992-0.856844447182j)*x[2]**o + ((0.624193311065-0.0188350479541j))*x[2]
            ref[(1, 1, 0, 1)]+=(-0.47396021992-0.856844447182j)*x_ref[2]**o + ((0.624193311065-0.0188350479541j))*x_ref[2]
            arg[(1, 1, 0, 2)]+=(0.0986597700445-0.292385348008j)*x[2]**o + ((0.357164551011+0.397195526591j))*x[2]
            ref[(1, 1, 0, 2)]+=(0.0986597700445-0.292385348008j)*x_ref[2]**o + ((0.357164551011+0.397195526591j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(-0.601922335655+0.909828362657j)*x[2]**o + ((-0.456509023733+0.4926093111j))*x[2]
            ref[(1, 1, 1, 0)]+=(-0.601922335655+0.909828362657j)*x_ref[2]**o + ((-0.456509023733+0.4926093111j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.994111193956-0.579514604225j)*x[2]**o + ((0.184157701238-0.588464104088j))*x[2]
            ref[(1, 1, 1, 1)]+=(0.994111193956-0.579514604225j)*x_ref[2]**o + ((0.184157701238-0.588464104088j))*x_ref[2]
            arg[(1, 1, 1, 2)]+=(0.861617809285-0.858647421154j)*x[2]**o + ((0.807525913288+0.512007652445j))*x[2]
            ref[(1, 1, 1, 2)]+=(0.861617809285-0.858647421154j)*x_ref[2]**o + ((0.807525913288+0.512007652445j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(0.0586262850943-0.736461964375j)*x[2]**o + ((-0.402692811505-0.551327625417j))*x[2]
            ref[(1, 1, 2, 0)]+=(0.0586262850943-0.736461964375j)*x_ref[2]**o + ((-0.402692811505-0.551327625417j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(0.259900009802-0.4070979516j)*x[2]**o + ((-0.471599502394+0.237505798268j))*x[2]
            ref[(1, 1, 2, 1)]+=(0.259900009802-0.4070979516j)*x_ref[2]**o + ((-0.471599502394+0.237505798268j))*x_ref[2]
            arg[(1, 1, 2, 2)]+=(0.406690466379+0.663605718947j)*x[2]**o + ((-0.622959459875-0.985440470395j))*x[2]
            ref[(1, 1, 2, 2)]+=(0.406690466379+0.663605718947j)*x_ref[2]**o + ((-0.622959459875-0.985440470395j))*x_ref[2]
            arg[(1, 1, 3, 0)]+=(-0.479051741189-0.766751814256j)*x[2]**o + ((0.605435897639-0.995206383118j))*x[2]
            ref[(1, 1, 3, 0)]+=(-0.479051741189-0.766751814256j)*x_ref[2]**o + ((0.605435897639-0.995206383118j))*x_ref[2]
            arg[(1, 1, 3, 1)]+=(-0.939344502373-0.180524716887j)*x[2]**o + ((0.940628732249+0.0857741434537j))*x[2]
            ref[(1, 1, 3, 1)]+=(-0.939344502373-0.180524716887j)*x_ref[2]**o + ((0.940628732249+0.0857741434537j))*x_ref[2]
            arg[(1, 1, 3, 2)]+=(-0.410728119226-0.758144097256j)*x[2]**o + ((0.343151627652+0.931904473045j))*x[2]
            ref[(1, 1, 3, 2)]+=(-0.410728119226-0.758144097256j)*x_ref[2]**o + ((0.343151627652+0.931904473045j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.338274310298+0.93012276724j)*x[2]**o + ((0.667037606248-0.205102844638j))*x[2]
            ref[(1, 2, 0, 0)]+=(0.338274310298+0.93012276724j)*x_ref[2]**o + ((0.667037606248-0.205102844638j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(-0.607924337766-0.547258532999j)*x[2]**o + ((-0.261874122455+0.0185045354024j))*x[2]
            ref[(1, 2, 0, 1)]+=(-0.607924337766-0.547258532999j)*x_ref[2]**o + ((-0.261874122455+0.0185045354024j))*x_ref[2]
            arg[(1, 2, 0, 2)]+=(0.109836052972-0.033142280883j)*x[2]**o + ((-0.923248108259+0.891889961013j))*x[2]
            ref[(1, 2, 0, 2)]+=(0.109836052972-0.033142280883j)*x_ref[2]**o + ((-0.923248108259+0.891889961013j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(0.371462331333+0.395559067562j)*x[2]**o + ((0.128075326985-0.977072403016j))*x[2]
            ref[(1, 2, 1, 0)]+=(0.371462331333+0.395559067562j)*x_ref[2]**o + ((0.128075326985-0.977072403016j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(0.698638703271+0.327292891363j)*x[2]**o + ((0.715814015822+0.610893022058j))*x[2]
            ref[(1, 2, 1, 1)]+=(0.698638703271+0.327292891363j)*x_ref[2]**o + ((0.715814015822+0.610893022058j))*x_ref[2]
            arg[(1, 2, 1, 2)]+=(-0.327617967634-0.572247397412j)*x[2]**o + ((-0.742041672297-0.217630374059j))*x[2]
            ref[(1, 2, 1, 2)]+=(-0.327617967634-0.572247397412j)*x_ref[2]**o + ((-0.742041672297-0.217630374059j))*x_ref[2]
            arg[(1, 2, 2, 0)]+=(-0.900027250192+0.062360431719j)*x[2]**o + ((0.184795664229+0.255981609123j))*x[2]
            ref[(1, 2, 2, 0)]+=(-0.900027250192+0.062360431719j)*x_ref[2]**o + ((0.184795664229+0.255981609123j))*x_ref[2]
            arg[(1, 2, 2, 1)]+=(0.215925069874-0.00162346751587j)*x[2]**o + ((0.835134254569-0.111134930391j))*x[2]
            ref[(1, 2, 2, 1)]+=(0.215925069874-0.00162346751587j)*x_ref[2]**o + ((0.835134254569-0.111134930391j))*x_ref[2]
            arg[(1, 2, 2, 2)]+=(0.427329687288-0.202078938488j)*x[2]**o + ((0.635847811337-0.35063602398j))*x[2]
            ref[(1, 2, 2, 2)]+=(0.427329687288-0.202078938488j)*x_ref[2]**o + ((0.635847811337-0.35063602398j))*x_ref[2]
            arg[(1, 2, 3, 0)]+=(0.30606810557+0.381224366834j)*x[2]**o + ((-0.941507775143-0.787101513883j))*x[2]
            ref[(1, 2, 3, 0)]+=(0.30606810557+0.381224366834j)*x_ref[2]**o + ((-0.941507775143-0.787101513883j))*x_ref[2]
            arg[(1, 2, 3, 1)]+=(-0.768450064372-0.989802781947j)*x[2]**o + ((-0.176530659503-0.278519469771j))*x[2]
            ref[(1, 2, 3, 1)]+=(-0.768450064372-0.989802781947j)*x_ref[2]**o + ((-0.176530659503-0.278519469771j))*x_ref[2]
            arg[(1, 2, 3, 2)]+=(0.543662164714+0.474958182624j)*x[2]**o + ((0.956766504315-0.0616218878473j))*x[2]
            ref[(1, 2, 3, 2)]+=(0.543662164714+0.474958182624j)*x_ref[2]**o + ((0.956766504315-0.0616218878473j))*x_ref[2]
            arg[(1, 3, 0, 0)]+=(0.708502371488-0.720273241134j)*x[2]**o + ((-0.172472644134+0.811047459164j))*x[2]
            ref[(1, 3, 0, 0)]+=(0.708502371488-0.720273241134j)*x_ref[2]**o + ((-0.172472644134+0.811047459164j))*x_ref[2]
            arg[(1, 3, 0, 1)]+=(0.56474260808+0.756161774814j)*x[2]**o + ((-0.79015973136+0.412625574665j))*x[2]
            ref[(1, 3, 0, 1)]+=(0.56474260808+0.756161774814j)*x_ref[2]**o + ((-0.79015973136+0.412625574665j))*x_ref[2]
            arg[(1, 3, 0, 2)]+=(0.221361261313+0.339763127726j)*x[2]**o + ((-0.556667274657-0.774666343031j))*x[2]
            ref[(1, 3, 0, 2)]+=(0.221361261313+0.339763127726j)*x_ref[2]**o + ((-0.556667274657-0.774666343031j))*x_ref[2]
            arg[(1, 3, 1, 0)]+=(-0.988957738121-0.211993448266j)*x[2]**o + ((0.270906986674-0.535011096263j))*x[2]
            ref[(1, 3, 1, 0)]+=(-0.988957738121-0.211993448266j)*x_ref[2]**o + ((0.270906986674-0.535011096263j))*x_ref[2]
            arg[(1, 3, 1, 1)]+=(0.718823552964-0.854944871798j)*x[2]**o + ((0.793115278708+0.607626125119j))*x[2]
            ref[(1, 3, 1, 1)]+=(0.718823552964-0.854944871798j)*x_ref[2]**o + ((0.793115278708+0.607626125119j))*x_ref[2]
            arg[(1, 3, 1, 2)]+=(0.968331702629+0.726889824013j)*x[2]**o + ((-0.103038119544-0.669857899612j))*x[2]
            ref[(1, 3, 1, 2)]+=(0.968331702629+0.726889824013j)*x_ref[2]**o + ((-0.103038119544-0.669857899612j))*x_ref[2]
            arg[(1, 3, 2, 0)]+=(-0.944897770303-0.902971985628j)*x[2]**o + ((0.932602052116-0.585302675373j))*x[2]
            ref[(1, 3, 2, 0)]+=(-0.944897770303-0.902971985628j)*x_ref[2]**o + ((0.932602052116-0.585302675373j))*x_ref[2]
            arg[(1, 3, 2, 1)]+=(0.241853799713-0.984711733825j)*x[2]**o + ((0.832694218956+0.186441469082j))*x[2]
            ref[(1, 3, 2, 1)]+=(0.241853799713-0.984711733825j)*x_ref[2]**o + ((0.832694218956+0.186441469082j))*x_ref[2]
            arg[(1, 3, 2, 2)]+=(0.971303718847+0.676893524823j)*x[2]**o + ((-0.927992556556-0.484361027729j))*x[2]
            ref[(1, 3, 2, 2)]+=(0.971303718847+0.676893524823j)*x_ref[2]**o + ((-0.927992556556-0.484361027729j))*x_ref[2]
            arg[(1, 3, 3, 0)]+=(0.661995880732-0.850064913551j)*x[2]**o + ((-0.697496736465+0.216308638394j))*x[2]
            ref[(1, 3, 3, 0)]+=(0.661995880732-0.850064913551j)*x_ref[2]**o + ((-0.697496736465+0.216308638394j))*x_ref[2]
            arg[(1, 3, 3, 1)]+=(-0.993715499992+0.59621908731j)*x[2]**o + ((0.0214105874935+0.418955801312j))*x[2]
            ref[(1, 3, 3, 1)]+=(-0.993715499992+0.59621908731j)*x_ref[2]**o + ((0.0214105874935+0.418955801312j))*x_ref[2]
            arg[(1, 3, 3, 2)]+=(-0.842011536683+0.298704009497j)*x[2]**o + ((0.683433265245-0.372397816836j))*x[2]
            ref[(1, 3, 3, 2)]+=(-0.842011536683+0.298704009497j)*x_ref[2]**o + ((0.683433265245-0.372397816836j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(-0.608647266067+0.428037953376j)*x[2]**o + ((0.621280547536-0.364904440595j))*x[2]
            ref[(2, 0, 0, 0)]+=(-0.608647266067+0.428037953376j)*x_ref[2]**o + ((0.621280547536-0.364904440595j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(0.125202798593+0.0296752770665j)*x[2]**o + ((-0.459493754684-0.925489892688j))*x[2]
            ref[(2, 0, 0, 1)]+=(0.125202798593+0.0296752770665j)*x_ref[2]**o + ((-0.459493754684-0.925489892688j))*x_ref[2]
            arg[(2, 0, 0, 2)]+=(0.906192722548-0.211867680594j)*x[2]**o + ((0.905687531485+0.45012653782j))*x[2]
            ref[(2, 0, 0, 2)]+=(0.906192722548-0.211867680594j)*x_ref[2]**o + ((0.905687531485+0.45012653782j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(0.475277276192-0.919604350383j)*x[2]**o + ((0.839439041534-0.185104986298j))*x[2]
            ref[(2, 0, 1, 0)]+=(0.475277276192-0.919604350383j)*x_ref[2]**o + ((0.839439041534-0.185104986298j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(0.0214461561049+0.0376668529921j)*x[2]**o + ((-0.391218826736-0.668567360958j))*x[2]
            ref[(2, 0, 1, 1)]+=(0.0214461561049+0.0376668529921j)*x_ref[2]**o + ((-0.391218826736-0.668567360958j))*x_ref[2]
            arg[(2, 0, 1, 2)]+=(0.106764898713-0.725330307202j)*x[2]**o + ((-0.532989566316-0.953428668852j))*x[2]
            ref[(2, 0, 1, 2)]+=(0.106764898713-0.725330307202j)*x_ref[2]**o + ((-0.532989566316-0.953428668852j))*x_ref[2]
            arg[(2, 0, 2, 0)]+=(0.736369830716+0.613872901644j)*x[2]**o + ((-0.522364077515+0.159572927591j))*x[2]
            ref[(2, 0, 2, 0)]+=(0.736369830716+0.613872901644j)*x_ref[2]**o + ((-0.522364077515+0.159572927591j))*x_ref[2]
            arg[(2, 0, 2, 1)]+=(0.791052577127-0.769742964431j)*x[2]**o + ((-0.246088443023-0.105931693754j))*x[2]
            ref[(2, 0, 2, 1)]+=(0.791052577127-0.769742964431j)*x_ref[2]**o + ((-0.246088443023-0.105931693754j))*x_ref[2]
            arg[(2, 0, 2, 2)]+=(0.402900939538+0.855950907755j)*x[2]**o + ((-0.300913485724+0.490930385375j))*x[2]
            ref[(2, 0, 2, 2)]+=(0.402900939538+0.855950907755j)*x_ref[2]**o + ((-0.300913485724+0.490930385375j))*x_ref[2]
            arg[(2, 0, 3, 0)]+=(0.405010212863+0.475193651268j)*x[2]**o + ((-0.634747343953-0.0355085240485j))*x[2]
            ref[(2, 0, 3, 0)]+=(0.405010212863+0.475193651268j)*x_ref[2]**o + ((-0.634747343953-0.0355085240485j))*x_ref[2]
            arg[(2, 0, 3, 1)]+=(0.801203847376+0.128405128707j)*x[2]**o + ((-0.334213600164+0.487734724966j))*x[2]
            ref[(2, 0, 3, 1)]+=(0.801203847376+0.128405128707j)*x_ref[2]**o + ((-0.334213600164+0.487734724966j))*x_ref[2]
            arg[(2, 0, 3, 2)]+=(0.394479847683+0.303066375302j)*x[2]**o + ((-0.0965611957855+0.542075342355j))*x[2]
            ref[(2, 0, 3, 2)]+=(0.394479847683+0.303066375302j)*x_ref[2]**o + ((-0.0965611957855+0.542075342355j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(0.23074651096-0.362481799375j)*x[2]**o + ((0.252946696833-0.856327658667j))*x[2]
            ref[(2, 1, 0, 0)]+=(0.23074651096-0.362481799375j)*x_ref[2]**o + ((0.252946696833-0.856327658667j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(0.898653231415-0.621981162501j)*x[2]**o + ((0.629020368994-0.145132680558j))*x[2]
            ref[(2, 1, 0, 1)]+=(0.898653231415-0.621981162501j)*x_ref[2]**o + ((0.629020368994-0.145132680558j))*x_ref[2]
            arg[(2, 1, 0, 2)]+=(0.73003239962+0.893329110585j)*x[2]**o + ((0.457152423128-0.275187284621j))*x[2]
            ref[(2, 1, 0, 2)]+=(0.73003239962+0.893329110585j)*x_ref[2]**o + ((0.457152423128-0.275187284621j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(0.808930503021-0.94770805631j)*x[2]**o + ((0.737453208045-0.496533587227j))*x[2]
            ref[(2, 1, 1, 0)]+=(0.808930503021-0.94770805631j)*x_ref[2]**o + ((0.737453208045-0.496533587227j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(-0.000961169664982+0.724933464385j)*x[2]**o + ((-0.583109697585-0.00101498509366j))*x[2]
            ref[(2, 1, 1, 1)]+=(-0.000961169664982+0.724933464385j)*x_ref[2]**o + ((-0.583109697585-0.00101498509366j))*x_ref[2]
            arg[(2, 1, 1, 2)]+=(0.933086194438+0.255051468926j)*x[2]**o + ((-0.940818471931+0.290937623331j))*x[2]
            ref[(2, 1, 1, 2)]+=(0.933086194438+0.255051468926j)*x_ref[2]**o + ((-0.940818471931+0.290937623331j))*x_ref[2]
            arg[(2, 1, 2, 0)]+=(0.294000079154+0.305176114395j)*x[2]**o + ((-0.930054860628-0.735320367428j))*x[2]
            ref[(2, 1, 2, 0)]+=(0.294000079154+0.305176114395j)*x_ref[2]**o + ((-0.930054860628-0.735320367428j))*x_ref[2]
            arg[(2, 1, 2, 1)]+=(-0.481842021011-0.0863925095882j)*x[2]**o + ((0.40270641855-0.974667304678j))*x[2]
            ref[(2, 1, 2, 1)]+=(-0.481842021011-0.0863925095882j)*x_ref[2]**o + ((0.40270641855-0.974667304678j))*x_ref[2]
            arg[(2, 1, 2, 2)]+=(-0.161360279388+0.794885808755j)*x[2]**o + ((-0.897494156068-0.945047307638j))*x[2]
            ref[(2, 1, 2, 2)]+=(-0.161360279388+0.794885808755j)*x_ref[2]**o + ((-0.897494156068-0.945047307638j))*x_ref[2]
            arg[(2, 1, 3, 0)]+=(0.470998366641+0.822951168184j)*x[2]**o + ((0.672825310476-0.955333247336j))*x[2]
            ref[(2, 1, 3, 0)]+=(0.470998366641+0.822951168184j)*x_ref[2]**o + ((0.672825310476-0.955333247336j))*x_ref[2]
            arg[(2, 1, 3, 1)]+=(0.626043105143-0.19419822695j)*x[2]**o + ((-0.345239097325+0.591569622j))*x[2]
            ref[(2, 1, 3, 1)]+=(0.626043105143-0.19419822695j)*x_ref[2]**o + ((-0.345239097325+0.591569622j))*x_ref[2]
            arg[(2, 1, 3, 2)]+=(-0.983405897563-0.399466571686j)*x[2]**o + ((-0.0770867883118-0.427213366552j))*x[2]
            ref[(2, 1, 3, 2)]+=(-0.983405897563-0.399466571686j)*x_ref[2]**o + ((-0.0770867883118-0.427213366552j))*x_ref[2]
            arg[(2, 2, 0, 0)]+=(-0.0785296708395+0.585776674156j)*x[2]**o + ((-0.05036939902+0.228836641361j))*x[2]
            ref[(2, 2, 0, 0)]+=(-0.0785296708395+0.585776674156j)*x_ref[2]**o + ((-0.05036939902+0.228836641361j))*x_ref[2]
            arg[(2, 2, 0, 1)]+=(-0.524167789281+0.784330126364j)*x[2]**o + ((0.602714481934+0.298528239423j))*x[2]
            ref[(2, 2, 0, 1)]+=(-0.524167789281+0.784330126364j)*x_ref[2]**o + ((0.602714481934+0.298528239423j))*x_ref[2]
            arg[(2, 2, 0, 2)]+=(-0.183264062972-0.26744027334j)*x[2]**o + ((-0.70440339141+0.12119224913j))*x[2]
            ref[(2, 2, 0, 2)]+=(-0.183264062972-0.26744027334j)*x_ref[2]**o + ((-0.70440339141+0.12119224913j))*x_ref[2]
            arg[(2, 2, 1, 0)]+=(0.0892952040166+0.756299578996j)*x[2]**o + ((-0.818661644461+0.754577023441j))*x[2]
            ref[(2, 2, 1, 0)]+=(0.0892952040166+0.756299578996j)*x_ref[2]**o + ((-0.818661644461+0.754577023441j))*x_ref[2]
            arg[(2, 2, 1, 1)]+=(-0.907142004396+0.890470967184j)*x[2]**o + ((-0.0449586010627-0.755716073593j))*x[2]
            ref[(2, 2, 1, 1)]+=(-0.907142004396+0.890470967184j)*x_ref[2]**o + ((-0.0449586010627-0.755716073593j))*x_ref[2]
            arg[(2, 2, 1, 2)]+=(0.20637733281+0.572847379502j)*x[2]**o + ((0.211079719236+0.834119256574j))*x[2]
            ref[(2, 2, 1, 2)]+=(0.20637733281+0.572847379502j)*x_ref[2]**o + ((0.211079719236+0.834119256574j))*x_ref[2]
            arg[(2, 2, 2, 0)]+=(0.912797479332-0.790524608428j)*x[2]**o + ((-0.0802811843637-0.642476934809j))*x[2]
            ref[(2, 2, 2, 0)]+=(0.912797479332-0.790524608428j)*x_ref[2]**o + ((-0.0802811843637-0.642476934809j))*x_ref[2]
            arg[(2, 2, 2, 1)]+=(-0.995224476255-0.689286963808j)*x[2]**o + ((0.603816907129+0.408663544058j))*x[2]
            ref[(2, 2, 2, 1)]+=(-0.995224476255-0.689286963808j)*x_ref[2]**o + ((0.603816907129+0.408663544058j))*x_ref[2]
            arg[(2, 2, 2, 2)]+=(-0.965880519383+0.363442842831j)*x[2]**o + ((-0.809079999514-0.270655146293j))*x[2]
            ref[(2, 2, 2, 2)]+=(-0.965880519383+0.363442842831j)*x_ref[2]**o + ((-0.809079999514-0.270655146293j))*x_ref[2]
            arg[(2, 2, 3, 0)]+=(-0.218497024658-0.801504440425j)*x[2]**o + ((0.0175021482437-0.101791169741j))*x[2]
            ref[(2, 2, 3, 0)]+=(-0.218497024658-0.801504440425j)*x_ref[2]**o + ((0.0175021482437-0.101791169741j))*x_ref[2]
            arg[(2, 2, 3, 1)]+=(-0.21169815366+0.063333117134j)*x[2]**o + ((0.21695286086+0.135195231351j))*x[2]
            ref[(2, 2, 3, 1)]+=(-0.21169815366+0.063333117134j)*x_ref[2]**o + ((0.21695286086+0.135195231351j))*x_ref[2]
            arg[(2, 2, 3, 2)]+=(-0.846680051492+0.0429571308549j)*x[2]**o + ((0.179656770936-0.74908535894j))*x[2]
            ref[(2, 2, 3, 2)]+=(-0.846680051492+0.0429571308549j)*x_ref[2]**o + ((0.179656770936-0.74908535894j))*x_ref[2]
            arg[(2, 3, 0, 0)]+=(0.223201308631-0.762155616674j)*x[2]**o + ((-0.982025482474-0.588196505296j))*x[2]
            ref[(2, 3, 0, 0)]+=(0.223201308631-0.762155616674j)*x_ref[2]**o + ((-0.982025482474-0.588196505296j))*x_ref[2]
            arg[(2, 3, 0, 1)]+=(0.0398239169033+0.249956956833j)*x[2]**o + ((0.839323410716+0.694096768268j))*x[2]
            ref[(2, 3, 0, 1)]+=(0.0398239169033+0.249956956833j)*x_ref[2]**o + ((0.839323410716+0.694096768268j))*x_ref[2]
            arg[(2, 3, 0, 2)]+=(0.413738633818-0.861373388534j)*x[2]**o + ((-0.109100332033-0.789201008611j))*x[2]
            ref[(2, 3, 0, 2)]+=(0.413738633818-0.861373388534j)*x_ref[2]**o + ((-0.109100332033-0.789201008611j))*x_ref[2]
            arg[(2, 3, 1, 0)]+=(0.642662760149+0.978815487215j)*x[2]**o + ((-0.698022134312-0.049402940783j))*x[2]
            ref[(2, 3, 1, 0)]+=(0.642662760149+0.978815487215j)*x_ref[2]**o + ((-0.698022134312-0.049402940783j))*x_ref[2]
            arg[(2, 3, 1, 1)]+=(0.614518104589-0.52669866441j)*x[2]**o + ((-0.533286490547+0.853460441669j))*x[2]
            ref[(2, 3, 1, 1)]+=(0.614518104589-0.52669866441j)*x_ref[2]**o + ((-0.533286490547+0.853460441669j))*x_ref[2]
            arg[(2, 3, 1, 2)]+=(-0.242481800948-0.83606127136j)*x[2]**o + ((0.931817656904-0.985221279838j))*x[2]
            ref[(2, 3, 1, 2)]+=(-0.242481800948-0.83606127136j)*x_ref[2]**o + ((0.931817656904-0.985221279838j))*x_ref[2]
            arg[(2, 3, 2, 0)]+=(-0.796421057547-0.303818654128j)*x[2]**o + ((0.348926273327-0.155058343596j))*x[2]
            ref[(2, 3, 2, 0)]+=(-0.796421057547-0.303818654128j)*x_ref[2]**o + ((0.348926273327-0.155058343596j))*x_ref[2]
            arg[(2, 3, 2, 1)]+=(-0.824754676905+0.21111048801j)*x[2]**o + ((0.242429889905+0.104859163432j))*x[2]
            ref[(2, 3, 2, 1)]+=(-0.824754676905+0.21111048801j)*x_ref[2]**o + ((0.242429889905+0.104859163432j))*x_ref[2]
            arg[(2, 3, 2, 2)]+=(-0.493007686156-0.395257087597j)*x[2]**o + ((0.34951535504+0.687377718002j))*x[2]
            ref[(2, 3, 2, 2)]+=(-0.493007686156-0.395257087597j)*x_ref[2]**o + ((0.34951535504+0.687377718002j))*x_ref[2]
            arg[(2, 3, 3, 0)]+=(0.588255979279+0.431023450674j)*x[2]**o + ((0.446981309557+0.523982757128j))*x[2]
            ref[(2, 3, 3, 0)]+=(0.588255979279+0.431023450674j)*x_ref[2]**o + ((0.446981309557+0.523982757128j))*x_ref[2]
            arg[(2, 3, 3, 1)]+=(-0.129193182887+0.0406995321761j)*x[2]**o + ((-0.830307748266-0.957102358896j))*x[2]
            ref[(2, 3, 3, 1)]+=(-0.129193182887+0.0406995321761j)*x_ref[2]**o + ((-0.830307748266-0.957102358896j))*x_ref[2]
            arg[(2, 3, 3, 2)]+=(-0.769513245311-0.424864283248j)*x[2]**o + ((0.115617023805-0.949472626581j))*x[2]
            ref[(2, 3, 3, 2)]+=(-0.769513245311-0.424864283248j)*x_ref[2]**o + ((0.115617023805-0.949472626581j))*x_ref[2]
            arg[(3, 0, 0, 0)]+=(-0.946212387714+0.523798275311j)*x[2]**o + ((0.0350617460758+0.407992184187j))*x[2]
            ref[(3, 0, 0, 0)]+=(-0.946212387714+0.523798275311j)*x_ref[2]**o + ((0.0350617460758+0.407992184187j))*x_ref[2]
            arg[(3, 0, 0, 1)]+=(0.0780541040077-0.772947391338j)*x[2]**o + ((-0.747529665621-0.902977691749j))*x[2]
            ref[(3, 0, 0, 1)]+=(0.0780541040077-0.772947391338j)*x_ref[2]**o + ((-0.747529665621-0.902977691749j))*x_ref[2]
            arg[(3, 0, 0, 2)]+=(0.968303731486+0.696401169141j)*x[2]**o + ((-0.264351096201-0.764459776411j))*x[2]
            ref[(3, 0, 0, 2)]+=(0.968303731486+0.696401169141j)*x_ref[2]**o + ((-0.264351096201-0.764459776411j))*x_ref[2]
            arg[(3, 0, 1, 0)]+=(0.102621030623-0.957344200208j)*x[2]**o + ((-0.744915186474+0.11872896206j))*x[2]
            ref[(3, 0, 1, 0)]+=(0.102621030623-0.957344200208j)*x_ref[2]**o + ((-0.744915186474+0.11872896206j))*x_ref[2]
            arg[(3, 0, 1, 1)]+=(0.678137258388+0.0632884037931j)*x[2]**o + ((0.701780826025-0.838527967921j))*x[2]
            ref[(3, 0, 1, 1)]+=(0.678137258388+0.0632884037931j)*x_ref[2]**o + ((0.701780826025-0.838527967921j))*x_ref[2]
            arg[(3, 0, 1, 2)]+=(0.0352675049219+0.504574458707j)*x[2]**o + ((0.224636512301-0.972373007993j))*x[2]
            ref[(3, 0, 1, 2)]+=(0.0352675049219+0.504574458707j)*x_ref[2]**o + ((0.224636512301-0.972373007993j))*x_ref[2]
            arg[(3, 0, 2, 0)]+=(0.801586673892-0.30221608967j)*x[2]**o + ((-0.86218821108-0.222025427209j))*x[2]
            ref[(3, 0, 2, 0)]+=(0.801586673892-0.30221608967j)*x_ref[2]**o + ((-0.86218821108-0.222025427209j))*x_ref[2]
            arg[(3, 0, 2, 1)]+=(-0.5982818305+0.0786604130505j)*x[2]**o + ((-0.837260357025-0.281195389358j))*x[2]
            ref[(3, 0, 2, 1)]+=(-0.5982818305+0.0786604130505j)*x_ref[2]**o + ((-0.837260357025-0.281195389358j))*x_ref[2]
            arg[(3, 0, 2, 2)]+=(-0.201809689083+0.279020039145j)*x[2]**o + ((-0.306232979972-0.480363620903j))*x[2]
            ref[(3, 0, 2, 2)]+=(-0.201809689083+0.279020039145j)*x_ref[2]**o + ((-0.306232979972-0.480363620903j))*x_ref[2]
            arg[(3, 0, 3, 0)]+=(0.455630681025+0.262950322248j)*x[2]**o + ((0.192607439485+0.136339455657j))*x[2]
            ref[(3, 0, 3, 0)]+=(0.455630681025+0.262950322248j)*x_ref[2]**o + ((0.192607439485+0.136339455657j))*x_ref[2]
            arg[(3, 0, 3, 1)]+=(0.443697331918-0.85508317865j)*x[2]**o + ((-0.860526803324+0.219312205584j))*x[2]
            ref[(3, 0, 3, 1)]+=(0.443697331918-0.85508317865j)*x_ref[2]**o + ((-0.860526803324+0.219312205584j))*x_ref[2]
            arg[(3, 0, 3, 2)]+=(-0.271794601367-0.560221469016j)*x[2]**o + ((-0.47078166488-0.033553874218j))*x[2]
            ref[(3, 0, 3, 2)]+=(-0.271794601367-0.560221469016j)*x_ref[2]**o + ((-0.47078166488-0.033553874218j))*x_ref[2]
            arg[(3, 1, 0, 0)]+=(-0.0257653492577+0.306447545895j)*x[2]**o + ((-0.263333463087+0.13277101896j))*x[2]
            ref[(3, 1, 0, 0)]+=(-0.0257653492577+0.306447545895j)*x_ref[2]**o + ((-0.263333463087+0.13277101896j))*x_ref[2]
            arg[(3, 1, 0, 1)]+=(0.720573582683-0.102030580206j)*x[2]**o + ((0.354672875369-0.364762834688j))*x[2]
            ref[(3, 1, 0, 1)]+=(0.720573582683-0.102030580206j)*x_ref[2]**o + ((0.354672875369-0.364762834688j))*x_ref[2]
            arg[(3, 1, 0, 2)]+=(-0.0200368839926-0.57538868869j)*x[2]**o + ((-0.188488618901-0.806309999798j))*x[2]
            ref[(3, 1, 0, 2)]+=(-0.0200368839926-0.57538868869j)*x_ref[2]**o + ((-0.188488618901-0.806309999798j))*x_ref[2]
            arg[(3, 1, 1, 0)]+=(0.971634223532-0.727991360945j)*x[2]**o + ((-0.946773971353+0.208530986434j))*x[2]
            ref[(3, 1, 1, 0)]+=(0.971634223532-0.727991360945j)*x_ref[2]**o + ((-0.946773971353+0.208530986434j))*x_ref[2]
            arg[(3, 1, 1, 1)]+=(-0.77742109403+0.339842565036j)*x[2]**o + ((-0.126418826052+0.444541772092j))*x[2]
            ref[(3, 1, 1, 1)]+=(-0.77742109403+0.339842565036j)*x_ref[2]**o + ((-0.126418826052+0.444541772092j))*x_ref[2]
            arg[(3, 1, 1, 2)]+=(0.483872556029-0.396658375576j)*x[2]**o + ((0.0223839998417+0.850784946668j))*x[2]
            ref[(3, 1, 1, 2)]+=(0.483872556029-0.396658375576j)*x_ref[2]**o + ((0.0223839998417+0.850784946668j))*x_ref[2]
            arg[(3, 1, 2, 0)]+=(0.257585898266-0.982766977387j)*x[2]**o + ((-0.0213051368254-0.246609417563j))*x[2]
            ref[(3, 1, 2, 0)]+=(0.257585898266-0.982766977387j)*x_ref[2]**o + ((-0.0213051368254-0.246609417563j))*x_ref[2]
            arg[(3, 1, 2, 1)]+=(0.695159335118+0.207382606338j)*x[2]**o + ((-0.608029831068-0.429089520762j))*x[2]
            ref[(3, 1, 2, 1)]+=(0.695159335118+0.207382606338j)*x_ref[2]**o + ((-0.608029831068-0.429089520762j))*x_ref[2]
            arg[(3, 1, 2, 2)]+=(-0.574138152813-0.940026080796j)*x[2]**o + ((-0.635494306902+0.635990525458j))*x[2]
            ref[(3, 1, 2, 2)]+=(-0.574138152813-0.940026080796j)*x_ref[2]**o + ((-0.635494306902+0.635990525458j))*x_ref[2]
            arg[(3, 1, 3, 0)]+=(-0.0804440519541+0.781536690467j)*x[2]**o + ((0.503058065228-0.149966792129j))*x[2]
            ref[(3, 1, 3, 0)]+=(-0.0804440519541+0.781536690467j)*x_ref[2]**o + ((0.503058065228-0.149966792129j))*x_ref[2]
            arg[(3, 1, 3, 1)]+=(0.425022013089+0.113446962102j)*x[2]**o + ((-0.593025730439+0.252735605128j))*x[2]
            ref[(3, 1, 3, 1)]+=(0.425022013089+0.113446962102j)*x_ref[2]**o + ((-0.593025730439+0.252735605128j))*x_ref[2]
            arg[(3, 1, 3, 2)]+=(0.302682283043+0.389067186635j)*x[2]**o + ((-0.630818763386+0.0653381307074j))*x[2]
            ref[(3, 1, 3, 2)]+=(0.302682283043+0.389067186635j)*x_ref[2]**o + ((-0.630818763386+0.0653381307074j))*x_ref[2]
            arg[(3, 2, 0, 0)]+=(0.149313209572+0.107814311954j)*x[2]**o + ((0.94435114775-0.543895342949j))*x[2]
            ref[(3, 2, 0, 0)]+=(0.149313209572+0.107814311954j)*x_ref[2]**o + ((0.94435114775-0.543895342949j))*x_ref[2]
            arg[(3, 2, 0, 1)]+=(-0.688871439756+0.701591238513j)*x[2]**o + ((-0.878092333724-0.432420649164j))*x[2]
            ref[(3, 2, 0, 1)]+=(-0.688871439756+0.701591238513j)*x_ref[2]**o + ((-0.878092333724-0.432420649164j))*x_ref[2]
            arg[(3, 2, 0, 2)]+=(-0.173886201912+0.0959546245644j)*x[2]**o + ((-0.617082421286-0.847267623637j))*x[2]
            ref[(3, 2, 0, 2)]+=(-0.173886201912+0.0959546245644j)*x_ref[2]**o + ((-0.617082421286-0.847267623637j))*x_ref[2]
            arg[(3, 2, 1, 0)]+=(-0.481730614197-0.507059474408j)*x[2]**o + ((-0.770530709887-0.0518177187411j))*x[2]
            ref[(3, 2, 1, 0)]+=(-0.481730614197-0.507059474408j)*x_ref[2]**o + ((-0.770530709887-0.0518177187411j))*x_ref[2]
            arg[(3, 2, 1, 1)]+=(-0.375738415888+0.18016109269j)*x[2]**o + ((-0.371812454253-0.39326762195j))*x[2]
            ref[(3, 2, 1, 1)]+=(-0.375738415888+0.18016109269j)*x_ref[2]**o + ((-0.371812454253-0.39326762195j))*x_ref[2]
            arg[(3, 2, 1, 2)]+=(0.0341244544144+0.611415906846j)*x[2]**o + ((-0.109359456366+0.432597125627j))*x[2]
            ref[(3, 2, 1, 2)]+=(0.0341244544144+0.611415906846j)*x_ref[2]**o + ((-0.109359456366+0.432597125627j))*x_ref[2]
            arg[(3, 2, 2, 0)]+=(0.29196238231-0.535085004483j)*x[2]**o + ((-0.961102320969-0.57184427694j))*x[2]
            ref[(3, 2, 2, 0)]+=(0.29196238231-0.535085004483j)*x_ref[2]**o + ((-0.961102320969-0.57184427694j))*x_ref[2]
            arg[(3, 2, 2, 1)]+=(0.433247797883+0.494299898883j)*x[2]**o + ((0.234160873342+0.835275122272j))*x[2]
            ref[(3, 2, 2, 1)]+=(0.433247797883+0.494299898883j)*x_ref[2]**o + ((0.234160873342+0.835275122272j))*x_ref[2]
            arg[(3, 2, 2, 2)]+=(0.32981865579+0.340905723982j)*x[2]**o + ((-0.517360228915+0.48658654118j))*x[2]
            ref[(3, 2, 2, 2)]+=(0.32981865579+0.340905723982j)*x_ref[2]**o + ((-0.517360228915+0.48658654118j))*x_ref[2]
            arg[(3, 2, 3, 0)]+=(0.381737738397+0.180715417497j)*x[2]**o + ((0.839025662897+0.412780871312j))*x[2]
            ref[(3, 2, 3, 0)]+=(0.381737738397+0.180715417497j)*x_ref[2]**o + ((0.839025662897+0.412780871312j))*x_ref[2]
            arg[(3, 2, 3, 1)]+=(0.519312346594-0.753437465877j)*x[2]**o + ((-0.679436123053-0.163124255249j))*x[2]
            ref[(3, 2, 3, 1)]+=(0.519312346594-0.753437465877j)*x_ref[2]**o + ((-0.679436123053-0.163124255249j))*x_ref[2]
            arg[(3, 2, 3, 2)]+=(-0.476165216247+0.25777462975j)*x[2]**o + ((-0.790369684063+0.268617562596j))*x[2]
            ref[(3, 2, 3, 2)]+=(-0.476165216247+0.25777462975j)*x_ref[2]**o + ((-0.790369684063+0.268617562596j))*x_ref[2]
            arg[(3, 3, 0, 0)]+=(-0.699542306729+0.694070015748j)*x[2]**o + ((0.625648537944+0.409647344382j))*x[2]
            ref[(3, 3, 0, 0)]+=(-0.699542306729+0.694070015748j)*x_ref[2]**o + ((0.625648537944+0.409647344382j))*x_ref[2]
            arg[(3, 3, 0, 1)]+=(0.659022819886-0.763605988398j)*x[2]**o + ((0.41657898761-0.720564697036j))*x[2]
            ref[(3, 3, 0, 1)]+=(0.659022819886-0.763605988398j)*x_ref[2]**o + ((0.41657898761-0.720564697036j))*x_ref[2]
            arg[(3, 3, 0, 2)]+=(-0.769348282794-0.332527582636j)*x[2]**o + ((-0.0619621110651+0.948256882124j))*x[2]
            ref[(3, 3, 0, 2)]+=(-0.769348282794-0.332527582636j)*x_ref[2]**o + ((-0.0619621110651+0.948256882124j))*x_ref[2]
            arg[(3, 3, 1, 0)]+=(-0.240533752108+0.924259178036j)*x[2]**o + ((-0.497788459913+0.132747638719j))*x[2]
            ref[(3, 3, 1, 0)]+=(-0.240533752108+0.924259178036j)*x_ref[2]**o + ((-0.497788459913+0.132747638719j))*x_ref[2]
            arg[(3, 3, 1, 1)]+=(-0.175808308662-0.639004491071j)*x[2]**o + ((-0.58398775364-0.852816582065j))*x[2]
            ref[(3, 3, 1, 1)]+=(-0.175808308662-0.639004491071j)*x_ref[2]**o + ((-0.58398775364-0.852816582065j))*x_ref[2]
            arg[(3, 3, 1, 2)]+=(0.752390119059-0.256023919369j)*x[2]**o + ((-0.170306263561+0.997751366798j))*x[2]
            ref[(3, 3, 1, 2)]+=(0.752390119059-0.256023919369j)*x_ref[2]**o + ((-0.170306263561+0.997751366798j))*x_ref[2]
            arg[(3, 3, 2, 0)]+=(-0.958554447335-0.783032329752j)*x[2]**o + ((0.254095056056-0.411261867382j))*x[2]
            ref[(3, 3, 2, 0)]+=(-0.958554447335-0.783032329752j)*x_ref[2]**o + ((0.254095056056-0.411261867382j))*x_ref[2]
            arg[(3, 3, 2, 1)]+=(-0.337619169632-0.259981777701j)*x[2]**o + ((0.0132295173849-0.435177920186j))*x[2]
            ref[(3, 3, 2, 1)]+=(-0.337619169632-0.259981777701j)*x_ref[2]**o + ((0.0132295173849-0.435177920186j))*x_ref[2]
            arg[(3, 3, 2, 2)]+=(0.711468638439+0.02049301113j)*x[2]**o + ((-0.792006441198-0.120033021124j))*x[2]
            ref[(3, 3, 2, 2)]+=(0.711468638439+0.02049301113j)*x_ref[2]**o + ((-0.792006441198-0.120033021124j))*x_ref[2]
            arg[(3, 3, 3, 0)]+=(0.106708803888+0.514553124808j)*x[2]**o + ((0.0981468886747-0.429278553106j))*x[2]
            ref[(3, 3, 3, 0)]+=(0.106708803888+0.514553124808j)*x_ref[2]**o + ((0.0981468886747-0.429278553106j))*x_ref[2]
            arg[(3, 3, 3, 1)]+=(0.853581174234+0.698437755938j)*x[2]**o + ((0.555424665254-0.847014829075j))*x[2]
            ref[(3, 3, 3, 1)]+=(0.853581174234+0.698437755938j)*x_ref[2]**o + ((0.555424665254-0.847014829075j))*x_ref[2]
            arg[(3, 3, 3, 2)]+=(0.438700845343-0.345457056326j)*x[2]**o + ((0.0545497793905-0.120545145325j))*x[2]
            ref[(3, 3, 3, 2)]+=(0.438700845343-0.345457056326j)*x_ref[2]**o + ((0.0545497793905-0.120545145325j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.797228160776-0.920215164001j)*x[0]**o + ((0.461330640959+0.258142429462j))*x[0] + ((0.570387460239+0.195643787475j))*x[1]**o + ((-0.470088235996+0.650572229349j))*x[1]
        ref=(-0.797228160776-0.920215164001j)*x_ref[0]**o + ((0.461330640959+0.258142429462j))*x_ref[0] + ((0.570387460239+0.195643787475j))*x_ref[1]**o + ((-0.470088235996+0.650572229349j))*x_ref[1]
        if dim==3:
            arg+=((0.317261863965-0.984206029504j))*x[2]**o + ((-0.753770728819+0.796816068739j))*x[2]
            ref+=((0.317261863965-0.984206029504j))*x_ref[2]**o + ((-0.753770728819+0.796816068739j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=(0.548416293908-0.987851078266j)*x[0]**o + ((-0.98888005338-0.789990571977j))*x[0] + ((0.430876063775-0.147681768087j))*x[1]**o + ((-0.459574102353-0.85668645874j))*x[1]
        ref[(0,)]=(0.548416293908-0.987851078266j)*x_ref[0]**o + ((-0.98888005338-0.789990571977j))*x_ref[0] + ((0.430876063775-0.147681768087j))*x_ref[1]**o + ((-0.459574102353-0.85668645874j))*x_ref[1]
        arg[(1,)]=(0.265739870052+0.674564986511j)*x[0]**o + ((-0.589925458023-0.955862615754j))*x[0] + ((-0.37228939519+0.428784924513j))*x[1]**o + ((0.913602149178-0.0376290600724j))*x[1]
        ref[(1,)]=(0.265739870052+0.674564986511j)*x_ref[0]**o + ((-0.589925458023-0.955862615754j))*x_ref[0] + ((-0.37228939519+0.428784924513j))*x_ref[1]**o + ((0.913602149178-0.0376290600724j))*x_ref[1]
        arg[(2,)]=(0.574277594879+0.473791925843j)*x[0]**o + ((0.385189347524-0.757879527241j))*x[0] + ((0.712392317456+0.930897952639j))*x[1]**o + ((0.488470496576+0.905317471807j))*x[1]
        ref[(2,)]=(0.574277594879+0.473791925843j)*x_ref[0]**o + ((0.385189347524-0.757879527241j))*x_ref[0] + ((0.712392317456+0.930897952639j))*x_ref[1]**o + ((0.488470496576+0.905317471807j))*x_ref[1]
        arg[(3,)]=(-0.0628596171317+0.426730896758j)*x[0]**o + ((-0.462058343127+0.964968219675j))*x[0] + ((0.0637587070778-0.306281729474j))*x[1]**o + ((-0.205491191507+0.375145632452j))*x[1]
        ref[(3,)]=(-0.0628596171317+0.426730896758j)*x_ref[0]**o + ((-0.462058343127+0.964968219675j))*x_ref[0] + ((0.0637587070778-0.306281729474j))*x_ref[1]**o + ((-0.205491191507+0.375145632452j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.425723940025+0.740466426302j)*x[2]**o + ((-0.0229336899829+0.589755274535j))*x[2]
            ref[(0,)]+=(-0.425723940025+0.740466426302j)*x_ref[2]**o + ((-0.0229336899829+0.589755274535j))*x_ref[2]
            arg[(1,)]+=(0.149882365097-0.354177766177j)*x[2]**o + ((-0.167259806701+0.182168280863j))*x[2]
            ref[(1,)]+=(0.149882365097-0.354177766177j)*x_ref[2]**o + ((-0.167259806701+0.182168280863j))*x_ref[2]
            arg[(2,)]+=(0.488547538948+0.0218281670123j)*x[2]**o + ((0.963941738343-0.206563193552j))*x[2]
            ref[(2,)]+=(0.488547538948+0.0218281670123j)*x_ref[2]**o + ((0.963941738343-0.206563193552j))*x_ref[2]
            arg[(3,)]+=(0.516464494437-0.979436825574j)*x[2]**o + ((-0.46554585419-0.129213139141j))*x[2]
            ref[(3,)]+=(0.516464494437-0.979436825574j)*x_ref[2]**o + ((-0.46554585419-0.129213139141j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref = Data(0,(2, 3),w_ref)
        arg[(0, 0)]=(-0.299081821452-0.798034307793j)*x[0]**o + ((-0.631434030476+0.0936299601035j))*x[0] + ((0.302310545302-0.80624147386j))*x[1]**o + ((0.0391115261146+0.155859149809j))*x[1]
        ref[(0, 0)]=(-0.299081821452-0.798034307793j)*x_ref[0]**o + ((-0.631434030476+0.0936299601035j))*x_ref[0] + ((0.302310545302-0.80624147386j))*x_ref[1]**o + ((0.0391115261146+0.155859149809j))*x_ref[1]
        arg[(0, 1)]=(0.0300383834531-0.290453580515j)*x[0]**o + ((-0.16699101239-0.524757459192j))*x[0] + ((0.844802955319-0.0133422530254j))*x[1]**o + ((-0.232947381937+0.505253501515j))*x[1]
        ref[(0, 1)]=(0.0300383834531-0.290453580515j)*x_ref[0]**o + ((-0.16699101239-0.524757459192j))*x_ref[0] + ((0.844802955319-0.0133422530254j))*x_ref[1]**o + ((-0.232947381937+0.505253501515j))*x_ref[1]
        arg[(0, 2)]=(0.148668000266+0.0636063569579j)*x[0]**o + ((-0.801119774229-0.680049099107j))*x[0] + ((-0.254756990894+0.268740227435j))*x[1]**o + ((-0.891757975665-0.122274024184j))*x[1]
        ref[(0, 2)]=(0.148668000266+0.0636063569579j)*x_ref[0]**o + ((-0.801119774229-0.680049099107j))*x_ref[0] + ((-0.254756990894+0.268740227435j))*x_ref[1]**o + ((-0.891757975665-0.122274024184j))*x_ref[1]
        arg[(1, 0)]=(-0.847604463218-0.955131960818j)*x[0]**o + ((-0.812618806559-0.588170060449j))*x[0] + ((-0.118479999773-0.80737574958j))*x[1]**o + ((-0.71174218851-0.78275628441j))*x[1]
        ref[(1, 0)]=(-0.847604463218-0.955131960818j)*x_ref[0]**o + ((-0.812618806559-0.588170060449j))*x_ref[0] + ((-0.118479999773-0.80737574958j))*x_ref[1]**o + ((-0.71174218851-0.78275628441j))*x_ref[1]
        arg[(1, 1)]=(0.545641090086+0.705158364453j)*x[0]**o + ((0.368964562821-0.277275452489j))*x[0] + ((0.173309540684+0.763008918537j))*x[1]**o + ((0.46931819603+0.411149531646j))*x[1]
        ref[(1, 1)]=(0.545641090086+0.705158364453j)*x_ref[0]**o + ((0.368964562821-0.277275452489j))*x_ref[0] + ((0.173309540684+0.763008918537j))*x_ref[1]**o + ((0.46931819603+0.411149531646j))*x_ref[1]
        arg[(1, 2)]=(-0.612675919849+0.807995855993j)*x[0]**o + ((-0.8680573534-0.376259948242j))*x[0] + ((-0.382823003657-0.921257697648j))*x[1]**o + ((0.560232321862+0.480953187297j))*x[1]
        ref[(1, 2)]=(-0.612675919849+0.807995855993j)*x_ref[0]**o + ((-0.8680573534-0.376259948242j))*x_ref[0] + ((-0.382823003657-0.921257697648j))*x_ref[1]**o + ((0.560232321862+0.480953187297j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.315466079501-0.436669873645j)*x[2]**o + ((0.0917732434472+0.0801985984225j))*x[2]
            ref[(0, 0)]+=(0.315466079501-0.436669873645j)*x_ref[2]**o + ((0.0917732434472+0.0801985984225j))*x_ref[2]
            arg[(0, 1)]+=(-0.559130069165-0.098624695989j)*x[2]**o + ((0.264929206636+0.209570798601j))*x[2]
            ref[(0, 1)]+=(-0.559130069165-0.098624695989j)*x_ref[2]**o + ((0.264929206636+0.209570798601j))*x_ref[2]
            arg[(0, 2)]+=(0.341162580748+0.795740038207j)*x[2]**o + ((0.457741233391+0.971247619333j))*x[2]
            ref[(0, 2)]+=(0.341162580748+0.795740038207j)*x_ref[2]**o + ((0.457741233391+0.971247619333j))*x_ref[2]
            arg[(1, 0)]+=(0.194337354193+0.252875012575j)*x[2]**o + ((-0.765180399508+0.151965599801j))*x[2]
            ref[(1, 0)]+=(0.194337354193+0.252875012575j)*x_ref[2]**o + ((-0.765180399508+0.151965599801j))*x_ref[2]
            arg[(1, 1)]+=(0.925821038621+0.364109666175j)*x[2]**o + ((0.360278531742+0.108304553951j))*x[2]
            ref[(1, 1)]+=(0.925821038621+0.364109666175j)*x_ref[2]**o + ((0.360278531742+0.108304553951j))*x_ref[2]
            arg[(1, 2)]+=(0.924413415784+0.701539253253j)*x[2]**o + ((-0.212259615625-0.387566633931j))*x[2]
            ref[(1, 2)]+=(0.924413415784+0.701539253253j)*x_ref[2]**o + ((-0.212259615625-0.387566633931j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 2),w)
        ref = Data(0,(4, 2, 2),w_ref)
        arg[(0, 0, 0)]=(0.666593298939+0.816280729793j)*x[0]**o + ((0.150036605645-0.361597231033j))*x[0] + ((0.956114966053-0.921346673668j))*x[1]**o + ((0.375839947545-0.49292808529j))*x[1]
        ref[(0, 0, 0)]=(0.666593298939+0.816280729793j)*x_ref[0]**o + ((0.150036605645-0.361597231033j))*x_ref[0] + ((0.956114966053-0.921346673668j))*x_ref[1]**o + ((0.375839947545-0.49292808529j))*x_ref[1]
        arg[(0, 0, 1)]=(0.5813274165-0.669976281607j)*x[0]**o + ((0.907091434541+0.651638103445j))*x[0] + ((0.213180945624+0.976042624244j))*x[1]**o + ((-0.389849039362+0.922194761755j))*x[1]
        ref[(0, 0, 1)]=(0.5813274165-0.669976281607j)*x_ref[0]**o + ((0.907091434541+0.651638103445j))*x_ref[0] + ((0.213180945624+0.976042624244j))*x_ref[1]**o + ((-0.389849039362+0.922194761755j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.602470518704+0.959824315044j)*x[0]**o + ((-0.731294452709-0.00361138469734j))*x[0] + ((0.167273937612+0.723861940512j))*x[1]**o + ((-0.756142380089-0.129311848942j))*x[1]
        ref[(0, 1, 0)]=(-0.602470518704+0.959824315044j)*x_ref[0]**o + ((-0.731294452709-0.00361138469734j))*x_ref[0] + ((0.167273937612+0.723861940512j))*x_ref[1]**o + ((-0.756142380089-0.129311848942j))*x_ref[1]
        arg[(0, 1, 1)]=(0.403900104221-0.706965517753j)*x[0]**o + ((0.508915649677-0.162580390508j))*x[0] + ((0.440332845838-0.888403948713j))*x[1]**o + ((0.76478987772+0.522115089563j))*x[1]
        ref[(0, 1, 1)]=(0.403900104221-0.706965517753j)*x_ref[0]**o + ((0.508915649677-0.162580390508j))*x_ref[0] + ((0.440332845838-0.888403948713j))*x_ref[1]**o + ((0.76478987772+0.522115089563j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.59247751756+0.88659838174j)*x[0]**o + ((0.748804842823-0.109951594524j))*x[0] + ((0.945694627814+0.0424978946458j))*x[1]**o + ((-0.153384615717-0.547935786088j))*x[1]
        ref[(1, 0, 0)]=(-0.59247751756+0.88659838174j)*x_ref[0]**o + ((0.748804842823-0.109951594524j))*x_ref[0] + ((0.945694627814+0.0424978946458j))*x_ref[1]**o + ((-0.153384615717-0.547935786088j))*x_ref[1]
        arg[(1, 0, 1)]=(0.044015721411-0.517862839911j)*x[0]**o + ((0.456289637443+0.820683702348j))*x[0] + ((0.41736767008-0.390453076834j))*x[1]**o + ((-0.596063590611-0.563427985067j))*x[1]
        ref[(1, 0, 1)]=(0.044015721411-0.517862839911j)*x_ref[0]**o + ((0.456289637443+0.820683702348j))*x_ref[0] + ((0.41736767008-0.390453076834j))*x_ref[1]**o + ((-0.596063590611-0.563427985067j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.963819607583-0.825603560319j)*x[0]**o + ((-0.683451868813+0.087968941632j))*x[0] + ((-0.329857047487+0.539896992339j))*x[1]**o + ((0.167574880096-0.623485113186j))*x[1]
        ref[(1, 1, 0)]=(-0.963819607583-0.825603560319j)*x_ref[0]**o + ((-0.683451868813+0.087968941632j))*x_ref[0] + ((-0.329857047487+0.539896992339j))*x_ref[1]**o + ((0.167574880096-0.623485113186j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.253304160428-0.150596452572j)*x[0]**o + ((-0.827477192906+0.0613252867354j))*x[0] + ((0.465352071181-0.0434010970026j))*x[1]**o + ((0.878669186469+0.0771488589676j))*x[1]
        ref[(1, 1, 1)]=(-0.253304160428-0.150596452572j)*x_ref[0]**o + ((-0.827477192906+0.0613252867354j))*x_ref[0] + ((0.465352071181-0.0434010970026j))*x_ref[1]**o + ((0.878669186469+0.0771488589676j))*x_ref[1]
        arg[(2, 0, 0)]=(0.0012117286439-0.423914803835j)*x[0]**o + ((-0.56793179097+0.52431276903j))*x[0] + ((-0.131829847788-0.198077467121j))*x[1]**o + ((0.39878339163-0.0470931663003j))*x[1]
        ref[(2, 0, 0)]=(0.0012117286439-0.423914803835j)*x_ref[0]**o + ((-0.56793179097+0.52431276903j))*x_ref[0] + ((-0.131829847788-0.198077467121j))*x_ref[1]**o + ((0.39878339163-0.0470931663003j))*x_ref[1]
        arg[(2, 0, 1)]=(0.933222821787+0.271476666948j)*x[0]**o + ((0.0674506608304+0.262329863653j))*x[0] + ((-0.656239024994-0.875849502015j))*x[1]**o + ((-0.27406954869+0.5563028092j))*x[1]
        ref[(2, 0, 1)]=(0.933222821787+0.271476666948j)*x_ref[0]**o + ((0.0674506608304+0.262329863653j))*x_ref[0] + ((-0.656239024994-0.875849502015j))*x_ref[1]**o + ((-0.27406954869+0.5563028092j))*x_ref[1]
        arg[(2, 1, 0)]=(0.177184255626+0.508383977876j)*x[0]**o + ((0.973718084764-0.54883039458j))*x[0] + ((-0.380714246473+0.608967000499j))*x[1]**o + ((-0.615186804066+0.319552489765j))*x[1]
        ref[(2, 1, 0)]=(0.177184255626+0.508383977876j)*x_ref[0]**o + ((0.973718084764-0.54883039458j))*x_ref[0] + ((-0.380714246473+0.608967000499j))*x_ref[1]**o + ((-0.615186804066+0.319552489765j))*x_ref[1]
        arg[(2, 1, 1)]=(0.0162756976429+0.143807872639j)*x[0]**o + ((0.0718341067285-0.922903106423j))*x[0] + ((0.798983744265-0.759355791447j))*x[1]**o + ((-0.0369917348111+0.45123828384j))*x[1]
        ref[(2, 1, 1)]=(0.0162756976429+0.143807872639j)*x_ref[0]**o + ((0.0718341067285-0.922903106423j))*x_ref[0] + ((0.798983744265-0.759355791447j))*x_ref[1]**o + ((-0.0369917348111+0.45123828384j))*x_ref[1]
        arg[(3, 0, 0)]=(0.517415230616-0.744725180992j)*x[0]**o + ((0.564698357312-0.890227921509j))*x[0] + ((0.104761511086-0.402003557192j))*x[1]**o + ((0.0701268478186-0.609295006272j))*x[1]
        ref[(3, 0, 0)]=(0.517415230616-0.744725180992j)*x_ref[0]**o + ((0.564698357312-0.890227921509j))*x_ref[0] + ((0.104761511086-0.402003557192j))*x_ref[1]**o + ((0.0701268478186-0.609295006272j))*x_ref[1]
        arg[(3, 0, 1)]=(-0.337631172377+0.236567333711j)*x[0]**o + ((0.273755055316+0.701155915561j))*x[0] + ((-0.0538391843042+0.536422431951j))*x[1]**o + ((0.685176989-0.319170331011j))*x[1]
        ref[(3, 0, 1)]=(-0.337631172377+0.236567333711j)*x_ref[0]**o + ((0.273755055316+0.701155915561j))*x_ref[0] + ((-0.0538391843042+0.536422431951j))*x_ref[1]**o + ((0.685176989-0.319170331011j))*x_ref[1]
        arg[(3, 1, 0)]=(-0.404710648215+0.442514285696j)*x[0]**o + ((-0.162924934625+0.862633071804j))*x[0] + ((-0.624731083782-0.794447700845j))*x[1]**o + ((-0.808492081299+0.28389266216j))*x[1]
        ref[(3, 1, 0)]=(-0.404710648215+0.442514285696j)*x_ref[0]**o + ((-0.162924934625+0.862633071804j))*x_ref[0] + ((-0.624731083782-0.794447700845j))*x_ref[1]**o + ((-0.808492081299+0.28389266216j))*x_ref[1]
        arg[(3, 1, 1)]=(0.236417859139+0.6238597133j)*x[0]**o + ((-0.960638660808+0.397951288511j))*x[0] + ((0.062162759184+0.0749424056657j))*x[1]**o + ((0.0370191106982-0.758799226008j))*x[1]
        ref[(3, 1, 1)]=(0.236417859139+0.6238597133j)*x_ref[0]**o + ((-0.960638660808+0.397951288511j))*x_ref[0] + ((0.062162759184+0.0749424056657j))*x_ref[1]**o + ((0.0370191106982-0.758799226008j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.461342720187-0.231370889571j)*x[2]**o + ((0.412793967058-0.948187292888j))*x[2]
            ref[(0, 0, 0)]+=(0.461342720187-0.231370889571j)*x_ref[2]**o + ((0.412793967058-0.948187292888j))*x_ref[2]
            arg[(0, 0, 1)]+=(0.976515516709-0.275347628476j)*x[2]**o + ((0.836889193332-0.291014036655j))*x[2]
            ref[(0, 0, 1)]+=(0.976515516709-0.275347628476j)*x_ref[2]**o + ((0.836889193332-0.291014036655j))*x_ref[2]
            arg[(0, 1, 0)]+=(-0.348060705433-0.317582196345j)*x[2]**o + ((-0.275164888185-0.266366699993j))*x[2]
            ref[(0, 1, 0)]+=(-0.348060705433-0.317582196345j)*x_ref[2]**o + ((-0.275164888185-0.266366699993j))*x_ref[2]
            arg[(0, 1, 1)]+=(0.968204389127-0.0539209143901j)*x[2]**o + ((-0.229553795006-0.638140954211j))*x[2]
            ref[(0, 1, 1)]+=(0.968204389127-0.0539209143901j)*x_ref[2]**o + ((-0.229553795006-0.638140954211j))*x_ref[2]
            arg[(1, 0, 0)]+=(-0.587880457541-0.766346483535j)*x[2]**o + ((0.828907127467+0.385317520358j))*x[2]
            ref[(1, 0, 0)]+=(-0.587880457541-0.766346483535j)*x_ref[2]**o + ((0.828907127467+0.385317520358j))*x_ref[2]
            arg[(1, 0, 1)]+=(-0.463665071185+0.827067905077j)*x[2]**o + ((-0.387059354313-0.444226865122j))*x[2]
            ref[(1, 0, 1)]+=(-0.463665071185+0.827067905077j)*x_ref[2]**o + ((-0.387059354313-0.444226865122j))*x_ref[2]
            arg[(1, 1, 0)]+=(0.718679935975+0.380721198622j)*x[2]**o + ((0.976452937237+0.328764928583j))*x[2]
            ref[(1, 1, 0)]+=(0.718679935975+0.380721198622j)*x_ref[2]**o + ((0.976452937237+0.328764928583j))*x_ref[2]
            arg[(1, 1, 1)]+=(0.144869271227-0.43757737201j)*x[2]**o + ((0.319517086082-0.0857576518654j))*x[2]
            ref[(1, 1, 1)]+=(0.144869271227-0.43757737201j)*x_ref[2]**o + ((0.319517086082-0.0857576518654j))*x_ref[2]
            arg[(2, 0, 0)]+=(0.908909632348-0.0564231149278j)*x[2]**o + ((0.803569535948-0.59657680996j))*x[2]
            ref[(2, 0, 0)]+=(0.908909632348-0.0564231149278j)*x_ref[2]**o + ((0.803569535948-0.59657680996j))*x_ref[2]
            arg[(2, 0, 1)]+=(-0.0524727769444-0.763964919036j)*x[2]**o + ((0.489999476084-0.891298807316j))*x[2]
            ref[(2, 0, 1)]+=(-0.0524727769444-0.763964919036j)*x_ref[2]**o + ((0.489999476084-0.891298807316j))*x_ref[2]
            arg[(2, 1, 0)]+=(-0.527259428697-0.0423761540832j)*x[2]**o + ((-0.280997098312+0.867928459467j))*x[2]
            ref[(2, 1, 0)]+=(-0.527259428697-0.0423761540832j)*x_ref[2]**o + ((-0.280997098312+0.867928459467j))*x_ref[2]
            arg[(2, 1, 1)]+=(0.728399527865-0.881407772965j)*x[2]**o + ((0.399349380633-0.192573843665j))*x[2]
            ref[(2, 1, 1)]+=(0.728399527865-0.881407772965j)*x_ref[2]**o + ((0.399349380633-0.192573843665j))*x_ref[2]
            arg[(3, 0, 0)]+=(0.509515866271-0.855937196023j)*x[2]**o + ((0.165435112292-0.380273205397j))*x[2]
            ref[(3, 0, 0)]+=(0.509515866271-0.855937196023j)*x_ref[2]**o + ((0.165435112292-0.380273205397j))*x_ref[2]
            arg[(3, 0, 1)]+=(0.987338239529+0.608306339281j)*x[2]**o + ((-0.265479294265+0.912679840088j))*x[2]
            ref[(3, 0, 1)]+=(0.987338239529+0.608306339281j)*x_ref[2]**o + ((-0.265479294265+0.912679840088j))*x_ref[2]
            arg[(3, 1, 0)]+=(0.257397317017-0.386896682134j)*x[2]**o + ((-0.849898455089-0.919739833881j))*x[2]
            ref[(3, 1, 0)]+=(0.257397317017-0.386896682134j)*x_ref[2]**o + ((-0.849898455089-0.919739833881j))*x_ref[2]
            arg[(3, 1, 1)]+=(-0.300056174132+0.584564842503j)*x[2]**o + ((-0.77887488445-0.231341654803j))*x[2]
            ref[(3, 1, 1)]+=(-0.300056174132+0.584564842503j)*x_ref[2]**o + ((-0.77887488445-0.231341654803j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 3, 3),w)
        ref = Data(0,(2, 2, 3, 3),w_ref)
        arg[(0, 0, 0, 0)]=(0.735313759227+0.700550985529j)*x[0]**o + ((-0.210321469336+0.00822802542784j))*x[0] + ((-0.583277378525+0.565498633905j))*x[1]**o + ((-0.97590780103-0.0408054456745j))*x[1]
        ref[(0, 0, 0, 0)]=(0.735313759227+0.700550985529j)*x_ref[0]**o + ((-0.210321469336+0.00822802542784j))*x_ref[0] + ((-0.583277378525+0.565498633905j))*x_ref[1]**o + ((-0.97590780103-0.0408054456745j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(0.12285142651+0.878427864332j)*x[0]**o + ((-0.132853937659-0.0525040813171j))*x[0] + ((-0.543927108514-0.312149125459j))*x[1]**o + ((-0.345192975118-0.0620041551198j))*x[1]
        ref[(0, 0, 0, 1)]=(0.12285142651+0.878427864332j)*x_ref[0]**o + ((-0.132853937659-0.0525040813171j))*x_ref[0] + ((-0.543927108514-0.312149125459j))*x_ref[1]**o + ((-0.345192975118-0.0620041551198j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.0934216602183-0.401162850023j)*x[0]**o + ((0.862886877084+0.137175854797j))*x[0] + ((0.921001603286-0.907639691226j))*x[1]**o + ((0.5966576197-0.0590624021685j))*x[1]
        ref[(0, 0, 0, 2)]=(0.0934216602183-0.401162850023j)*x_ref[0]**o + ((0.862886877084+0.137175854797j))*x_ref[0] + ((0.921001603286-0.907639691226j))*x_ref[1]**o + ((0.5966576197-0.0590624021685j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.569912116913+0.78938267611j)*x[0]**o + ((0.555383447461+0.94714572737j))*x[0] + ((-0.566958105552-0.606432415798j))*x[1]**o + ((-0.0412040624194+0.954150815466j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.569912116913+0.78938267611j)*x_ref[0]**o + ((0.555383447461+0.94714572737j))*x_ref[0] + ((-0.566958105552-0.606432415798j))*x_ref[1]**o + ((-0.0412040624194+0.954150815466j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.97117585845+0.203481872264j)*x[0]**o + ((0.362931428377+0.521062220389j))*x[0] + ((0.799262066945+0.475106334826j))*x[1]**o + ((-0.78451567729-0.939644376714j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.97117585845+0.203481872264j)*x_ref[0]**o + ((0.362931428377+0.521062220389j))*x_ref[0] + ((0.799262066945+0.475106334826j))*x_ref[1]**o + ((-0.78451567729-0.939644376714j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(0.18437769808-0.157565795422j)*x[0]**o + ((-0.736013084351-0.736389802742j))*x[0] + ((0.681228565185-0.857099375647j))*x[1]**o + ((0.125024559536-0.490164158846j))*x[1]
        ref[(0, 0, 1, 2)]=(0.18437769808-0.157565795422j)*x_ref[0]**o + ((-0.736013084351-0.736389802742j))*x_ref[0] + ((0.681228565185-0.857099375647j))*x_ref[1]**o + ((0.125024559536-0.490164158846j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(-0.923687108924+0.400571248365j)*x[0]**o + ((0.41775220265-0.842750699824j))*x[0] + ((0.304084127728-0.146909248499j))*x[1]**o + ((0.175114468899+0.605004730779j))*x[1]
        ref[(0, 0, 2, 0)]=(-0.923687108924+0.400571248365j)*x_ref[0]**o + ((0.41775220265-0.842750699824j))*x_ref[0] + ((0.304084127728-0.146909248499j))*x_ref[1]**o + ((0.175114468899+0.605004730779j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(0.831851702786+0.681585546774j)*x[0]**o + ((-0.105197672233-0.426676296076j))*x[0] + ((-0.00765932348139-0.697106296074j))*x[1]**o + ((0.0021471560653+0.818391985387j))*x[1]
        ref[(0, 0, 2, 1)]=(0.831851702786+0.681585546774j)*x_ref[0]**o + ((-0.105197672233-0.426676296076j))*x_ref[0] + ((-0.00765932348139-0.697106296074j))*x_ref[1]**o + ((0.0021471560653+0.818391985387j))*x_ref[1]
        arg[(0, 0, 2, 2)]=(0.534403836506-0.504269941409j)*x[0]**o + ((-0.105941100075+0.762155653714j))*x[0] + ((0.520792501967-0.73469810387j))*x[1]**o + ((-0.45883843889-0.857685692432j))*x[1]
        ref[(0, 0, 2, 2)]=(0.534403836506-0.504269941409j)*x_ref[0]**o + ((-0.105941100075+0.762155653714j))*x_ref[0] + ((0.520792501967-0.73469810387j))*x_ref[1]**o + ((-0.45883843889-0.857685692432j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.359246166528+0.0278888628067j)*x[0]**o + ((-0.309264422043+0.355626217211j))*x[0] + ((0.211670741562-0.81238700063j))*x[1]**o + ((0.529556930307+0.0111186820819j))*x[1]
        ref[(0, 1, 0, 0)]=(0.359246166528+0.0278888628067j)*x_ref[0]**o + ((-0.309264422043+0.355626217211j))*x_ref[0] + ((0.211670741562-0.81238700063j))*x_ref[1]**o + ((0.529556930307+0.0111186820819j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.316799563335+0.806495821435j)*x[0]**o + ((0.132538783863+0.306370431783j))*x[0] + ((-0.473051976693+0.509521120603j))*x[1]**o + ((0.0483364918784-0.360655129445j))*x[1]
        ref[(0, 1, 0, 1)]=(0.316799563335+0.806495821435j)*x_ref[0]**o + ((0.132538783863+0.306370431783j))*x_ref[0] + ((-0.473051976693+0.509521120603j))*x_ref[1]**o + ((0.0483364918784-0.360655129445j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(0.706850971729+0.244910452897j)*x[0]**o + ((0.50860430397+0.95854797676j))*x[0] + ((-0.0362573106741-0.185297118401j))*x[1]**o + ((-0.355606514071+0.586816548471j))*x[1]
        ref[(0, 1, 0, 2)]=(0.706850971729+0.244910452897j)*x_ref[0]**o + ((0.50860430397+0.95854797676j))*x_ref[0] + ((-0.0362573106741-0.185297118401j))*x_ref[1]**o + ((-0.355606514071+0.586816548471j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.171154433801+0.933610145362j)*x[0]**o + ((-0.138194168359-0.86561975605j))*x[0] + ((-0.381600851134+0.637089072949j))*x[1]**o + ((-0.983938966334+0.816059498374j))*x[1]
        ref[(0, 1, 1, 0)]=(0.171154433801+0.933610145362j)*x_ref[0]**o + ((-0.138194168359-0.86561975605j))*x_ref[0] + ((-0.381600851134+0.637089072949j))*x_ref[1]**o + ((-0.983938966334+0.816059498374j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.222044365895-0.24703734865j)*x[0]**o + ((0.779942698144+0.344927892443j))*x[0] + ((-0.812358096515-0.69177374869j))*x[1]**o + ((-0.991442234099-0.681552041896j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.222044365895-0.24703734865j)*x_ref[0]**o + ((0.779942698144+0.344927892443j))*x_ref[0] + ((-0.812358096515-0.69177374869j))*x_ref[1]**o + ((-0.991442234099-0.681552041896j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(0.54573193693-0.834169314732j)*x[0]**o + ((0.869648944117-0.391540770903j))*x[0] + ((0.374921033977-0.919145032939j))*x[1]**o + ((0.377738795319-0.757452776871j))*x[1]
        ref[(0, 1, 1, 2)]=(0.54573193693-0.834169314732j)*x_ref[0]**o + ((0.869648944117-0.391540770903j))*x_ref[0] + ((0.374921033977-0.919145032939j))*x_ref[1]**o + ((0.377738795319-0.757452776871j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(-0.139999609905-0.953468544589j)*x[0]**o + ((0.695297546862-0.594395364041j))*x[0] + ((0.881347145595+0.450020426539j))*x[1]**o + ((-0.659051962453+0.348709139414j))*x[1]
        ref[(0, 1, 2, 0)]=(-0.139999609905-0.953468544589j)*x_ref[0]**o + ((0.695297546862-0.594395364041j))*x_ref[0] + ((0.881347145595+0.450020426539j))*x_ref[1]**o + ((-0.659051962453+0.348709139414j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(-0.392029542333-0.871013066144j)*x[0]**o + ((0.872803246753-0.498382961431j))*x[0] + ((-0.981891179865-0.618391900563j))*x[1]**o + ((0.514500670773+0.778760046912j))*x[1]
        ref[(0, 1, 2, 1)]=(-0.392029542333-0.871013066144j)*x_ref[0]**o + ((0.872803246753-0.498382961431j))*x_ref[0] + ((-0.981891179865-0.618391900563j))*x_ref[1]**o + ((0.514500670773+0.778760046912j))*x_ref[1]
        arg[(0, 1, 2, 2)]=(-0.0348495281494-0.696338783098j)*x[0]**o + ((0.331672776743+0.703719081108j))*x[0] + ((0.916065463804-0.759616376551j))*x[1]**o + ((0.232443745717+0.647897726335j))*x[1]
        ref[(0, 1, 2, 2)]=(-0.0348495281494-0.696338783098j)*x_ref[0]**o + ((0.331672776743+0.703719081108j))*x_ref[0] + ((0.916065463804-0.759616376551j))*x_ref[1]**o + ((0.232443745717+0.647897726335j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.375204436097+0.833933816869j)*x[0]**o + ((-0.155522139393-0.501996326241j))*x[0] + ((0.417503388183+0.530793651059j))*x[1]**o + ((-0.830068707411+0.0365759333383j))*x[1]
        ref[(1, 0, 0, 0)]=(0.375204436097+0.833933816869j)*x_ref[0]**o + ((-0.155522139393-0.501996326241j))*x_ref[0] + ((0.417503388183+0.530793651059j))*x_ref[1]**o + ((-0.830068707411+0.0365759333383j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.413136740025+0.220951644843j)*x[0]**o + ((-0.291044601072+0.758164446856j))*x[0] + ((-0.179063802082-0.483993119116j))*x[1]**o + ((-0.0582157957895-0.477953637798j))*x[1]
        ref[(1, 0, 0, 1)]=(0.413136740025+0.220951644843j)*x_ref[0]**o + ((-0.291044601072+0.758164446856j))*x_ref[0] + ((-0.179063802082-0.483993119116j))*x_ref[1]**o + ((-0.0582157957895-0.477953637798j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(0.846248609598-0.94562432562j)*x[0]**o + ((0.0337848191522-0.0841245608397j))*x[0] + ((0.815114640675-0.896164264831j))*x[1]**o + ((-0.705144741154-0.891212699765j))*x[1]
        ref[(1, 0, 0, 2)]=(0.846248609598-0.94562432562j)*x_ref[0]**o + ((0.0337848191522-0.0841245608397j))*x_ref[0] + ((0.815114640675-0.896164264831j))*x_ref[1]**o + ((-0.705144741154-0.891212699765j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.260122326743-0.368148113559j)*x[0]**o + ((0.848937593689-0.114232148658j))*x[0] + ((0.0684195175406+0.842053438754j))*x[1]**o + ((-0.671264477463-0.336270846702j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.260122326743-0.368148113559j)*x_ref[0]**o + ((0.848937593689-0.114232148658j))*x_ref[0] + ((0.0684195175406+0.842053438754j))*x_ref[1]**o + ((-0.671264477463-0.336270846702j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.733751376648+0.958391838127j)*x[0]**o + ((0.513309059548+0.60557335028j))*x[0] + ((-0.0108733346472-0.860378502457j))*x[1]**o + ((-0.732517623419+0.917997768115j))*x[1]
        ref[(1, 0, 1, 1)]=(0.733751376648+0.958391838127j)*x_ref[0]**o + ((0.513309059548+0.60557335028j))*x_ref[0] + ((-0.0108733346472-0.860378502457j))*x_ref[1]**o + ((-0.732517623419+0.917997768115j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(-0.0169839591453+0.372329242425j)*x[0]**o + ((-0.485280807457-0.736562398928j))*x[0] + ((-0.182898979627-0.289319835683j))*x[1]**o + ((-0.866475767944-0.477278804519j))*x[1]
        ref[(1, 0, 1, 2)]=(-0.0169839591453+0.372329242425j)*x_ref[0]**o + ((-0.485280807457-0.736562398928j))*x_ref[0] + ((-0.182898979627-0.289319835683j))*x_ref[1]**o + ((-0.866475767944-0.477278804519j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(-0.189910141339-0.495207576473j)*x[0]**o + ((-0.917435291199+0.557829412232j))*x[0] + ((0.637432888828-0.0949187366145j))*x[1]**o + ((0.627530249401+0.807283650241j))*x[1]
        ref[(1, 0, 2, 0)]=(-0.189910141339-0.495207576473j)*x_ref[0]**o + ((-0.917435291199+0.557829412232j))*x_ref[0] + ((0.637432888828-0.0949187366145j))*x_ref[1]**o + ((0.627530249401+0.807283650241j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(-0.364083005575-0.273917101142j)*x[0]**o + ((-0.675286929657-0.993461515497j))*x[0] + ((0.726655041208-0.221735390695j))*x[1]**o + ((0.113103629503-0.0153840353635j))*x[1]
        ref[(1, 0, 2, 1)]=(-0.364083005575-0.273917101142j)*x_ref[0]**o + ((-0.675286929657-0.993461515497j))*x_ref[0] + ((0.726655041208-0.221735390695j))*x_ref[1]**o + ((0.113103629503-0.0153840353635j))*x_ref[1]
        arg[(1, 0, 2, 2)]=(-0.57789104412-0.0886037451338j)*x[0]**o + ((-0.418166530406-0.655113981416j))*x[0] + ((0.00615636466568-0.172536996279j))*x[1]**o + ((-0.555621888137-0.46476325382j))*x[1]
        ref[(1, 0, 2, 2)]=(-0.57789104412-0.0886037451338j)*x_ref[0]**o + ((-0.418166530406-0.655113981416j))*x_ref[0] + ((0.00615636466568-0.172536996279j))*x_ref[1]**o + ((-0.555621888137-0.46476325382j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.147059685401+0.450965459499j)*x[0]**o + ((0.715515590573+0.600488270794j))*x[0] + ((0.704496801592+0.631312325701j))*x[1]**o + ((0.731576860948-0.921415513691j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.147059685401+0.450965459499j)*x_ref[0]**o + ((0.715515590573+0.600488270794j))*x_ref[0] + ((0.704496801592+0.631312325701j))*x_ref[1]**o + ((0.731576860948-0.921415513691j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.0410011997471-0.466090148104j)*x[0]**o + ((0.310905084248-0.786676766956j))*x[0] + ((0.0382599332516-0.983000125741j))*x[1]**o + ((0.790137833587-0.509904712364j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.0410011997471-0.466090148104j)*x_ref[0]**o + ((0.310905084248-0.786676766956j))*x_ref[0] + ((0.0382599332516-0.983000125741j))*x_ref[1]**o + ((0.790137833587-0.509904712364j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(0.0500517620109-0.47956621553j)*x[0]**o + ((-0.343234351333-0.845047068579j))*x[0] + ((0.483945309126-0.210778498409j))*x[1]**o + ((-0.034602027357-0.274410453255j))*x[1]
        ref[(1, 1, 0, 2)]=(0.0500517620109-0.47956621553j)*x_ref[0]**o + ((-0.343234351333-0.845047068579j))*x_ref[0] + ((0.483945309126-0.210778498409j))*x_ref[1]**o + ((-0.034602027357-0.274410453255j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.0460057024476-0.87302717194j)*x[0]**o + ((-0.237078925591-0.802146305704j))*x[0] + ((-0.590478790866-0.618793828742j))*x[1]**o + ((-0.111189944304-0.262272292668j))*x[1]
        ref[(1, 1, 1, 0)]=(0.0460057024476-0.87302717194j)*x_ref[0]**o + ((-0.237078925591-0.802146305704j))*x_ref[0] + ((-0.590478790866-0.618793828742j))*x_ref[1]**o + ((-0.111189944304-0.262272292668j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.181324773426-0.813146662102j)*x[0]**o + ((0.468373695277+0.762558954129j))*x[0] + ((-0.978833398603-0.415483467685j))*x[1]**o + ((-0.100930388695-0.85706423965j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.181324773426-0.813146662102j)*x_ref[0]**o + ((0.468373695277+0.762558954129j))*x_ref[0] + ((-0.978833398603-0.415483467685j))*x_ref[1]**o + ((-0.100930388695-0.85706423965j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(-0.502040979377-0.205367664424j)*x[0]**o + ((0.179794781625-0.860870442825j))*x[0] + ((0.45413373188+0.0192415594231j))*x[1]**o + ((-0.552307731968-0.612517721606j))*x[1]
        ref[(1, 1, 1, 2)]=(-0.502040979377-0.205367664424j)*x_ref[0]**o + ((0.179794781625-0.860870442825j))*x_ref[0] + ((0.45413373188+0.0192415594231j))*x_ref[1]**o + ((-0.552307731968-0.612517721606j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(-0.730640098511-0.475580535568j)*x[0]**o + ((0.355535315087-0.576850502993j))*x[0] + ((-0.963775277858+0.693193522372j))*x[1]**o + ((-0.460066912008+0.753791955957j))*x[1]
        ref[(1, 1, 2, 0)]=(-0.730640098511-0.475580535568j)*x_ref[0]**o + ((0.355535315087-0.576850502993j))*x_ref[0] + ((-0.963775277858+0.693193522372j))*x_ref[1]**o + ((-0.460066912008+0.753791955957j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(-0.550793540625-0.620774936651j)*x[0]**o + ((-0.933872124559-0.294731149386j))*x[0] + ((-0.110370561248-0.810466537225j))*x[1]**o + ((-0.870891690283-0.0342786529528j))*x[1]
        ref[(1, 1, 2, 1)]=(-0.550793540625-0.620774936651j)*x_ref[0]**o + ((-0.933872124559-0.294731149386j))*x_ref[0] + ((-0.110370561248-0.810466537225j))*x_ref[1]**o + ((-0.870891690283-0.0342786529528j))*x_ref[1]
        arg[(1, 1, 2, 2)]=(-0.740751218986+0.933202406711j)*x[0]**o + ((0.493736330595+0.696137939626j))*x[0] + ((0.495384057755+0.0763932318108j))*x[1]**o + ((-0.184227888094+0.17184198156j))*x[1]
        ref[(1, 1, 2, 2)]=(-0.740751218986+0.933202406711j)*x_ref[0]**o + ((0.493736330595+0.696137939626j))*x_ref[0] + ((0.495384057755+0.0763932318108j))*x_ref[1]**o + ((-0.184227888094+0.17184198156j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.200613631118-0.154590169264j)*x[2]**o + ((-0.0575050316414+0.658698438416j))*x[2]
            ref[(0, 0, 0, 0)]+=(0.200613631118-0.154590169264j)*x_ref[2]**o + ((-0.0575050316414+0.658698438416j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.0456265357873-0.819823871924j)*x[2]**o + ((-0.202001984681+0.796365088084j))*x[2]
            ref[(0, 0, 0, 1)]+=(0.0456265357873-0.819823871924j)*x_ref[2]**o + ((-0.202001984681+0.796365088084j))*x_ref[2]
            arg[(0, 0, 0, 2)]+=(0.410679811106+0.358852639358j)*x[2]**o + ((0.236587912319-0.609873443214j))*x[2]
            ref[(0, 0, 0, 2)]+=(0.410679811106+0.358852639358j)*x_ref[2]**o + ((0.236587912319-0.609873443214j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.846202261735-0.159252976867j)*x[2]**o + ((0.446527274156+0.807689639706j))*x[2]
            ref[(0, 0, 1, 0)]+=(-0.846202261735-0.159252976867j)*x_ref[2]**o + ((0.446527274156+0.807689639706j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.443818621309-0.398693953547j)*x[2]**o + ((-0.709378911329-0.32100230966j))*x[2]
            ref[(0, 0, 1, 1)]+=(-0.443818621309-0.398693953547j)*x_ref[2]**o + ((-0.709378911329-0.32100230966j))*x_ref[2]
            arg[(0, 0, 1, 2)]+=(0.775915711834-0.305610866737j)*x[2]**o + ((-0.630008065385+0.377697981204j))*x[2]
            ref[(0, 0, 1, 2)]+=(0.775915711834-0.305610866737j)*x_ref[2]**o + ((-0.630008065385+0.377697981204j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(-0.750240371154+0.602477046924j)*x[2]**o + ((0.785030267094+0.953547128739j))*x[2]
            ref[(0, 0, 2, 0)]+=(-0.750240371154+0.602477046924j)*x_ref[2]**o + ((0.785030267094+0.953547128739j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(0.770333053552+0.83449594461j)*x[2]**o + ((-0.626391431294-0.195358280865j))*x[2]
            ref[(0, 0, 2, 1)]+=(0.770333053552+0.83449594461j)*x_ref[2]**o + ((-0.626391431294-0.195358280865j))*x_ref[2]
            arg[(0, 0, 2, 2)]+=(-0.729995404826-0.747532272757j)*x[2]**o + ((0.976096707256-0.496339347287j))*x[2]
            ref[(0, 0, 2, 2)]+=(-0.729995404826-0.747532272757j)*x_ref[2]**o + ((0.976096707256-0.496339347287j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.572535071994+0.09524844185j)*x[2]**o + ((0.00597828681314+0.566383574513j))*x[2]
            ref[(0, 1, 0, 0)]+=(-0.572535071994+0.09524844185j)*x_ref[2]**o + ((0.00597828681314+0.566383574513j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.399474586566+0.762592342541j)*x[2]**o + ((-0.73022177962-0.157151403285j))*x[2]
            ref[(0, 1, 0, 1)]+=(-0.399474586566+0.762592342541j)*x_ref[2]**o + ((-0.73022177962-0.157151403285j))*x_ref[2]
            arg[(0, 1, 0, 2)]+=(0.424640802074-0.769867767498j)*x[2]**o + ((-0.573391673697-0.435063407979j))*x[2]
            ref[(0, 1, 0, 2)]+=(0.424640802074-0.769867767498j)*x_ref[2]**o + ((-0.573391673697-0.435063407979j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.989071507471-0.0950725640431j)*x[2]**o + ((-0.497299693941+0.660952860029j))*x[2]
            ref[(0, 1, 1, 0)]+=(0.989071507471-0.0950725640431j)*x_ref[2]**o + ((-0.497299693941+0.660952860029j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.461579093655-0.730367073252j)*x[2]**o + ((0.442281782205-0.530425570354j))*x[2]
            ref[(0, 1, 1, 1)]+=(0.461579093655-0.730367073252j)*x_ref[2]**o + ((0.442281782205-0.530425570354j))*x_ref[2]
            arg[(0, 1, 1, 2)]+=(0.209971329944-0.17296553144j)*x[2]**o + ((-0.390251176426-0.733176950584j))*x[2]
            ref[(0, 1, 1, 2)]+=(0.209971329944-0.17296553144j)*x_ref[2]**o + ((-0.390251176426-0.733176950584j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(0.721761141282-0.202354204342j)*x[2]**o + ((-0.208543507666-0.679301981487j))*x[2]
            ref[(0, 1, 2, 0)]+=(0.721761141282-0.202354204342j)*x_ref[2]**o + ((-0.208543507666-0.679301981487j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(-0.619016279157+0.777263298905j)*x[2]**o + ((-0.869073867521-0.15379341003j))*x[2]
            ref[(0, 1, 2, 1)]+=(-0.619016279157+0.777263298905j)*x_ref[2]**o + ((-0.869073867521-0.15379341003j))*x_ref[2]
            arg[(0, 1, 2, 2)]+=(0.965021413061+0.840501358546j)*x[2]**o + ((-0.341252669941-0.461977139862j))*x[2]
            ref[(0, 1, 2, 2)]+=(0.965021413061+0.840501358546j)*x_ref[2]**o + ((-0.341252669941-0.461977139862j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.527340374959-0.0655185724166j)*x[2]**o + ((0.775176102508+0.958770824514j))*x[2]
            ref[(1, 0, 0, 0)]+=(-0.527340374959-0.0655185724166j)*x_ref[2]**o + ((0.775176102508+0.958770824514j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(-0.610307004697+0.74363664937j)*x[2]**o + ((0.231736156653+0.353337359453j))*x[2]
            ref[(1, 0, 0, 1)]+=(-0.610307004697+0.74363664937j)*x_ref[2]**o + ((0.231736156653+0.353337359453j))*x_ref[2]
            arg[(1, 0, 0, 2)]+=(-0.502819646101+0.604811582224j)*x[2]**o + ((0.579686728614+0.608685196354j))*x[2]
            ref[(1, 0, 0, 2)]+=(-0.502819646101+0.604811582224j)*x_ref[2]**o + ((0.579686728614+0.608685196354j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.97629779203+0.714948311242j)*x[2]**o + ((-0.537583181344-0.313082434651j))*x[2]
            ref[(1, 0, 1, 0)]+=(0.97629779203+0.714948311242j)*x_ref[2]**o + ((-0.537583181344-0.313082434651j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.660892905432+0.573775508653j)*x[2]**o + ((-0.423897091277-0.852608785475j))*x[2]
            ref[(1, 0, 1, 1)]+=(-0.660892905432+0.573775508653j)*x_ref[2]**o + ((-0.423897091277-0.852608785475j))*x_ref[2]
            arg[(1, 0, 1, 2)]+=(-0.564049390409-0.321190650955j)*x[2]**o + ((0.153944068378-0.87475304909j))*x[2]
            ref[(1, 0, 1, 2)]+=(-0.564049390409-0.321190650955j)*x_ref[2]**o + ((0.153944068378-0.87475304909j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(0.700686155926-0.612309016594j)*x[2]**o + ((0.220537946626+0.902620765466j))*x[2]
            ref[(1, 0, 2, 0)]+=(0.700686155926-0.612309016594j)*x_ref[2]**o + ((0.220537946626+0.902620765466j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(-0.524192673996+0.462609486658j)*x[2]**o + ((0.0199867387977+0.617602463997j))*x[2]
            ref[(1, 0, 2, 1)]+=(-0.524192673996+0.462609486658j)*x_ref[2]**o + ((0.0199867387977+0.617602463997j))*x_ref[2]
            arg[(1, 0, 2, 2)]+=(-0.0392277459672+0.997006005746j)*x[2]**o + ((-0.489289887827+0.574030769938j))*x[2]
            ref[(1, 0, 2, 2)]+=(-0.0392277459672+0.997006005746j)*x_ref[2]**o + ((-0.489289887827+0.574030769938j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.144724902228-0.761344605793j)*x[2]**o + ((-0.137132464855-0.117837305761j))*x[2]
            ref[(1, 1, 0, 0)]+=(-0.144724902228-0.761344605793j)*x_ref[2]**o + ((-0.137132464855-0.117837305761j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.472538214647+0.190069427633j)*x[2]**o + ((0.882534565548+0.692655009996j))*x[2]
            ref[(1, 1, 0, 1)]+=(0.472538214647+0.190069427633j)*x_ref[2]**o + ((0.882534565548+0.692655009996j))*x_ref[2]
            arg[(1, 1, 0, 2)]+=(-0.905435426255+0.0518203866585j)*x[2]**o + ((0.813109412221-0.747018301069j))*x[2]
            ref[(1, 1, 0, 2)]+=(-0.905435426255+0.0518203866585j)*x_ref[2]**o + ((0.813109412221-0.747018301069j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.576946729578+0.123569402989j)*x[2]**o + ((0.939832770961-0.116283922625j))*x[2]
            ref[(1, 1, 1, 0)]+=(0.576946729578+0.123569402989j)*x_ref[2]**o + ((0.939832770961-0.116283922625j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.653073048432-0.936056824466j)*x[2]**o + ((-0.606753061333+0.71971352117j))*x[2]
            ref[(1, 1, 1, 1)]+=(0.653073048432-0.936056824466j)*x_ref[2]**o + ((-0.606753061333+0.71971352117j))*x_ref[2]
            arg[(1, 1, 1, 2)]+=(-0.892568106518+0.254955821541j)*x[2]**o + ((0.858468579792+0.512300913431j))*x[2]
            ref[(1, 1, 1, 2)]+=(-0.892568106518+0.254955821541j)*x_ref[2]**o + ((0.858468579792+0.512300913431j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(0.402539477715+0.0257186963274j)*x[2]**o + ((-0.407892578895+0.0615149800941j))*x[2]
            ref[(1, 1, 2, 0)]+=(0.402539477715+0.0257186963274j)*x_ref[2]**o + ((-0.407892578895+0.0615149800941j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(-0.411334680389+0.395985469034j)*x[2]**o + ((-0.984362080156-0.899548586032j))*x[2]
            ref[(1, 1, 2, 1)]+=(-0.411334680389+0.395985469034j)*x_ref[2]**o + ((-0.984362080156-0.899548586032j))*x_ref[2]
            arg[(1, 1, 2, 2)]+=(-0.844791076572-0.689075395442j)*x[2]**o + ((-0.638434790381+0.38495540163j))*x[2]
            ref[(1, 1, 2, 2)]+=(-0.844791076572-0.689075395442j)*x_ref[2]**o + ((-0.638434790381+0.38495540163j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.345942137186-0.925636369653j)*x[0]**o + ((-0.765447824093+0.813108750318j))*x[0] + ((0.604808236449+0.158890170744j))*x[1]**o + ((0.213896539416+0.266047775978j))*x[1]
        ref=(-0.345942137186-0.925636369653j)*x_ref[0]**o + ((-0.765447824093+0.813108750318j))*x_ref[0] + ((0.604808236449+0.158890170744j))*x_ref[1]**o + ((0.213896539416+0.266047775978j))*x_ref[1]
        if dim==3:
            arg+=((0.23133255061-0.488457456537j))*x[2]**o + ((-0.967926806957+0.522561691972j))*x[2]
            ref+=((0.23133255061-0.488457456537j))*x_ref[2]**o + ((-0.967926806957+0.522561691972j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=(-0.534026548325+0.823628161058j)*x[0]**o + ((-0.681453718989-0.107405600086j))*x[0] + ((0.15115309767+0.660583985491j))*x[1]**o + ((-0.533330559391+0.722435922992j))*x[1]
        ref[(0,)]=(-0.534026548325+0.823628161058j)*x_ref[0]**o + ((-0.681453718989-0.107405600086j))*x_ref[0] + ((0.15115309767+0.660583985491j))*x_ref[1]**o + ((-0.533330559391+0.722435922992j))*x_ref[1]
        arg[(1,)]=(0.876204861477+0.391609052829j)*x[0]**o + ((0.856477420313+0.0502331446209j))*x[0] + ((0.339226258451-0.46256156301j))*x[1]**o + ((0.341094620948-0.912185277361j))*x[1]
        ref[(1,)]=(0.876204861477+0.391609052829j)*x_ref[0]**o + ((0.856477420313+0.0502331446209j))*x_ref[0] + ((0.339226258451-0.46256156301j))*x_ref[1]**o + ((0.341094620948-0.912185277361j))*x_ref[1]
        arg[(2,)]=(-0.585418147612-0.698847765909j)*x[0]**o + ((0.367324855894+0.830845266384j))*x[0] + ((-0.468856428895+0.0207415507074j))*x[1]**o + ((0.681010703731-0.0920458616691j))*x[1]
        ref[(2,)]=(-0.585418147612-0.698847765909j)*x_ref[0]**o + ((0.367324855894+0.830845266384j))*x_ref[0] + ((-0.468856428895+0.0207415507074j))*x_ref[1]**o + ((0.681010703731-0.0920458616691j))*x_ref[1]
        arg[(3,)]=(-0.597096528178+0.462102098158j)*x[0]**o + ((-0.0241706514501+0.842377507026j))*x[0] + ((-0.0289682158012+0.392741657713j))*x[1]**o + ((0.350862616652-0.465759620796j))*x[1]
        ref[(3,)]=(-0.597096528178+0.462102098158j)*x_ref[0]**o + ((-0.0241706514501+0.842377507026j))*x_ref[0] + ((-0.0289682158012+0.392741657713j))*x_ref[1]**o + ((0.350862616652-0.465759620796j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.579356681097-0.292960012958j)*x[2]**o + ((0.106619221359-0.17584296177j))*x[2]
            ref[(0,)]+=(-0.579356681097-0.292960012958j)*x_ref[2]**o + ((0.106619221359-0.17584296177j))*x_ref[2]
            arg[(1,)]+=(-0.870316254897-0.881748779215j)*x[2]**o + ((-0.711677772531-0.147680589558j))*x[2]
            ref[(1,)]+=(-0.870316254897-0.881748779215j)*x_ref[2]**o + ((-0.711677772531-0.147680589558j))*x_ref[2]
            arg[(2,)]+=(0.858918356378-0.212719031215j)*x[2]**o + ((0.736051262116-0.954922037555j))*x[2]
            ref[(2,)]+=(0.858918356378-0.212719031215j)*x_ref[2]**o + ((0.736051262116-0.954922037555j))*x_ref[2]
            arg[(3,)]+=(0.743751824306+0.93420375479j)*x[2]**o + ((-0.539852921789-0.859866857256j))*x[2]
            ref[(3,)]+=(0.743751824306+0.93420375479j)*x_ref[2]**o + ((-0.539852921789-0.859866857256j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref = Data(0,(4, 3),w_ref)
        arg[(0, 0)]=(0.101818937056+0.830278008122j)*x[0]**o + ((-0.273444552373+0.326084339812j))*x[0] + ((-0.198305170572-0.301357794034j))*x[1]**o + ((0.587862609402-0.737017426736j))*x[1]
        ref[(0, 0)]=(0.101818937056+0.830278008122j)*x_ref[0]**o + ((-0.273444552373+0.326084339812j))*x_ref[0] + ((-0.198305170572-0.301357794034j))*x_ref[1]**o + ((0.587862609402-0.737017426736j))*x_ref[1]
        arg[(0, 1)]=(-0.917184531766-0.781085376875j)*x[0]**o + ((0.176083921396-0.043999216278j))*x[0] + ((-0.403781322768+0.647980776382j))*x[1]**o + ((-0.747486795102-0.728606614514j))*x[1]
        ref[(0, 1)]=(-0.917184531766-0.781085376875j)*x_ref[0]**o + ((0.176083921396-0.043999216278j))*x_ref[0] + ((-0.403781322768+0.647980776382j))*x_ref[1]**o + ((-0.747486795102-0.728606614514j))*x_ref[1]
        arg[(0, 2)]=(-0.0280690436103-0.390171868454j)*x[0]**o + ((0.675803627791-0.876975878922j))*x[0] + ((-0.429251444254-0.591402119599j))*x[1]**o + ((-0.60168308884-0.412098862671j))*x[1]
        ref[(0, 2)]=(-0.0280690436103-0.390171868454j)*x_ref[0]**o + ((0.675803627791-0.876975878922j))*x_ref[0] + ((-0.429251444254-0.591402119599j))*x_ref[1]**o + ((-0.60168308884-0.412098862671j))*x_ref[1]
        arg[(1, 0)]=(0.733248224233+0.678596053865j)*x[0]**o + ((0.454575315721-0.196534931708j))*x[0] + ((-0.526131771649-0.463822414295j))*x[1]**o + ((0.670548163418+0.725505513549j))*x[1]
        ref[(1, 0)]=(0.733248224233+0.678596053865j)*x_ref[0]**o + ((0.454575315721-0.196534931708j))*x_ref[0] + ((-0.526131771649-0.463822414295j))*x_ref[1]**o + ((0.670548163418+0.725505513549j))*x_ref[1]
        arg[(1, 1)]=(-0.563193367651+0.756018459509j)*x[0]**o + ((-0.0513825088844+0.0172110313046j))*x[0] + ((-0.907134193283+0.280627978105j))*x[1]**o + ((-0.481396822479+0.686998849487j))*x[1]
        ref[(1, 1)]=(-0.563193367651+0.756018459509j)*x_ref[0]**o + ((-0.0513825088844+0.0172110313046j))*x_ref[0] + ((-0.907134193283+0.280627978105j))*x_ref[1]**o + ((-0.481396822479+0.686998849487j))*x_ref[1]
        arg[(1, 2)]=(0.420168996367-0.912966175575j)*x[0]**o + ((0.382902716726+0.897351422989j))*x[0] + ((-0.0907048399739-0.708172756524j))*x[1]**o + ((0.718600774601-0.426906674812j))*x[1]
        ref[(1, 2)]=(0.420168996367-0.912966175575j)*x_ref[0]**o + ((0.382902716726+0.897351422989j))*x_ref[0] + ((-0.0907048399739-0.708172756524j))*x_ref[1]**o + ((0.718600774601-0.426906674812j))*x_ref[1]
        arg[(2, 0)]=(-0.296995359227-0.296185376108j)*x[0]**o + ((-0.664223000995-0.209822211365j))*x[0] + ((-0.844339568205+0.149208206576j))*x[1]**o + ((-0.419344257155-0.620087985377j))*x[1]
        ref[(2, 0)]=(-0.296995359227-0.296185376108j)*x_ref[0]**o + ((-0.664223000995-0.209822211365j))*x_ref[0] + ((-0.844339568205+0.149208206576j))*x_ref[1]**o + ((-0.419344257155-0.620087985377j))*x_ref[1]
        arg[(2, 1)]=(-0.921561432374+0.104987921404j)*x[0]**o + ((0.124875627611-0.659445984487j))*x[0] + ((-0.703520424357-0.688999302901j))*x[1]**o + ((-0.81870952423-0.570730856769j))*x[1]
        ref[(2, 1)]=(-0.921561432374+0.104987921404j)*x_ref[0]**o + ((0.124875627611-0.659445984487j))*x_ref[0] + ((-0.703520424357-0.688999302901j))*x_ref[1]**o + ((-0.81870952423-0.570730856769j))*x_ref[1]
        arg[(2, 2)]=(-0.287588962766-0.630190818851j)*x[0]**o + ((0.569212619822-0.992429853973j))*x[0] + ((-0.8564414261-0.985741678393j))*x[1]**o + ((-0.732554888758+0.966185673186j))*x[1]
        ref[(2, 2)]=(-0.287588962766-0.630190818851j)*x_ref[0]**o + ((0.569212619822-0.992429853973j))*x_ref[0] + ((-0.8564414261-0.985741678393j))*x_ref[1]**o + ((-0.732554888758+0.966185673186j))*x_ref[1]
        arg[(3, 0)]=(-0.75346528047-0.0766371721969j)*x[0]**o + ((-0.511262658866-0.448469948506j))*x[0] + ((0.087794970596+0.789519471766j))*x[1]**o + ((0.200062160314-0.559377554808j))*x[1]
        ref[(3, 0)]=(-0.75346528047-0.0766371721969j)*x_ref[0]**o + ((-0.511262658866-0.448469948506j))*x_ref[0] + ((0.087794970596+0.789519471766j))*x_ref[1]**o + ((0.200062160314-0.559377554808j))*x_ref[1]
        arg[(3, 1)]=(0.92535567273-0.983932331733j)*x[0]**o + ((0.979011533335-0.0173084647605j))*x[0] + ((-0.00810472627548-0.416367886969j))*x[1]**o + ((0.644374342612+0.774975611522j))*x[1]
        ref[(3, 1)]=(0.92535567273-0.983932331733j)*x_ref[0]**o + ((0.979011533335-0.0173084647605j))*x_ref[0] + ((-0.00810472627548-0.416367886969j))*x_ref[1]**o + ((0.644374342612+0.774975611522j))*x_ref[1]
        arg[(3, 2)]=(-0.786028905027-0.911189769152j)*x[0]**o + ((0.866205457142-0.8763553932j))*x[0] + ((0.90548522563-0.482047583482j))*x[1]**o + ((-0.704641918594+0.974879388156j))*x[1]
        ref[(3, 2)]=(-0.786028905027-0.911189769152j)*x_ref[0]**o + ((0.866205457142-0.8763553932j))*x_ref[0] + ((0.90548522563-0.482047583482j))*x_ref[1]**o + ((-0.704641918594+0.974879388156j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(-0.572682727765+0.0378493854313j)*x[2]**o + ((-0.543221093903-0.859964978735j))*x[2]
            ref[(0, 0)]+=(-0.572682727765+0.0378493854313j)*x_ref[2]**o + ((-0.543221093903-0.859964978735j))*x_ref[2]
            arg[(0, 1)]+=(0.329933383568+0.0305466878015j)*x[2]**o + ((-0.550014593377+0.590391838121j))*x[2]
            ref[(0, 1)]+=(0.329933383568+0.0305466878015j)*x_ref[2]**o + ((-0.550014593377+0.590391838121j))*x_ref[2]
            arg[(0, 2)]+=(0.275491781358-0.197469728417j)*x[2]**o + ((0.801527370793-0.59207890324j))*x[2]
            ref[(0, 2)]+=(0.275491781358-0.197469728417j)*x_ref[2]**o + ((0.801527370793-0.59207890324j))*x_ref[2]
            arg[(1, 0)]+=(-0.495422659535+0.735002325217j)*x[2]**o + ((0.898466518732+0.309525873761j))*x[2]
            ref[(1, 0)]+=(-0.495422659535+0.735002325217j)*x_ref[2]**o + ((0.898466518732+0.309525873761j))*x_ref[2]
            arg[(1, 1)]+=(-0.825265098264-0.343357510368j)*x[2]**o + ((-0.577339997764+0.774941474873j))*x[2]
            ref[(1, 1)]+=(-0.825265098264-0.343357510368j)*x_ref[2]**o + ((-0.577339997764+0.774941474873j))*x_ref[2]
            arg[(1, 2)]+=(-0.544589516719+0.504689333295j)*x[2]**o + ((-0.390898073265+0.133855798253j))*x[2]
            ref[(1, 2)]+=(-0.544589516719+0.504689333295j)*x_ref[2]**o + ((-0.390898073265+0.133855798253j))*x_ref[2]
            arg[(2, 0)]+=(0.815475468541+0.662553071506j)*x[2]**o + ((0.876175700341-0.120773539904j))*x[2]
            ref[(2, 0)]+=(0.815475468541+0.662553071506j)*x_ref[2]**o + ((0.876175700341-0.120773539904j))*x_ref[2]
            arg[(2, 1)]+=(0.483089788729+0.984225772717j)*x[2]**o + ((-0.133577118013+0.0679531438476j))*x[2]
            ref[(2, 1)]+=(0.483089788729+0.984225772717j)*x_ref[2]**o + ((-0.133577118013+0.0679531438476j))*x_ref[2]
            arg[(2, 2)]+=(0.520774443374+0.921642066675j)*x[2]**o + ((0.273257304511-0.773559391832j))*x[2]
            ref[(2, 2)]+=(0.520774443374+0.921642066675j)*x_ref[2]**o + ((0.273257304511-0.773559391832j))*x_ref[2]
            arg[(3, 0)]+=(-0.22499466035-0.224477634709j)*x[2]**o + ((-0.0117002599906-0.067306771452j))*x[2]
            ref[(3, 0)]+=(-0.22499466035-0.224477634709j)*x_ref[2]**o + ((-0.0117002599906-0.067306771452j))*x_ref[2]
            arg[(3, 1)]+=(-0.638961786699+0.496202376714j)*x[2]**o + ((0.458474744926-0.254751573298j))*x[2]
            ref[(3, 1)]+=(-0.638961786699+0.496202376714j)*x_ref[2]**o + ((0.458474744926-0.254751573298j))*x_ref[2]
            arg[(3, 2)]+=(0.214272885947-0.393952650381j)*x[2]**o + ((0.999100024871+0.297215674366j))*x[2]
            ref[(3, 2)]+=(0.214272885947-0.393952650381j)*x_ref[2]**o + ((0.999100024871+0.297215674366j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 3),w)
        ref = Data(0,(4, 4, 3),w_ref)
        arg[(0, 0, 0)]=(0.200941956423+0.901434203848j)*x[0]**o + ((0.373838164227-0.596766344559j))*x[0] + ((0.678174807341-0.874410449342j))*x[1]**o + ((0.894289553448-0.0881008899774j))*x[1]
        ref[(0, 0, 0)]=(0.200941956423+0.901434203848j)*x_ref[0]**o + ((0.373838164227-0.596766344559j))*x_ref[0] + ((0.678174807341-0.874410449342j))*x_ref[1]**o + ((0.894289553448-0.0881008899774j))*x_ref[1]
        arg[(0, 0, 1)]=(0.00978550663074-0.83915415062j)*x[0]**o + ((0.466026272941-0.977980739618j))*x[0] + ((-0.242609882683-0.0527037117978j))*x[1]**o + ((-0.000194554862066+0.0993894639842j))*x[1]
        ref[(0, 0, 1)]=(0.00978550663074-0.83915415062j)*x_ref[0]**o + ((0.466026272941-0.977980739618j))*x_ref[0] + ((-0.242609882683-0.0527037117978j))*x_ref[1]**o + ((-0.000194554862066+0.0993894639842j))*x_ref[1]
        arg[(0, 0, 2)]=(0.0739414763915+0.24774201703j)*x[0]**o + ((-0.281288419056+0.164035740406j))*x[0] + ((0.587502976926+0.846968969624j))*x[1]**o + ((-0.682050413709+0.225310088646j))*x[1]
        ref[(0, 0, 2)]=(0.0739414763915+0.24774201703j)*x_ref[0]**o + ((-0.281288419056+0.164035740406j))*x_ref[0] + ((0.587502976926+0.846968969624j))*x_ref[1]**o + ((-0.682050413709+0.225310088646j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.485538724892-0.0159022563711j)*x[0]**o + ((0.290893242534+0.8333803406j))*x[0] + ((0.406488720299+0.214187275793j))*x[1]**o + ((-0.825066086994-0.538094507729j))*x[1]
        ref[(0, 1, 0)]=(-0.485538724892-0.0159022563711j)*x_ref[0]**o + ((0.290893242534+0.8333803406j))*x_ref[0] + ((0.406488720299+0.214187275793j))*x_ref[1]**o + ((-0.825066086994-0.538094507729j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.717141967204-0.850644449008j)*x[0]**o + ((0.300267534437+0.652634823012j))*x[0] + ((-0.235346094369-0.0259247052604j))*x[1]**o + ((-0.944835778459+0.989656751335j))*x[1]
        ref[(0, 1, 1)]=(-0.717141967204-0.850644449008j)*x_ref[0]**o + ((0.300267534437+0.652634823012j))*x_ref[0] + ((-0.235346094369-0.0259247052604j))*x_ref[1]**o + ((-0.944835778459+0.989656751335j))*x_ref[1]
        arg[(0, 1, 2)]=(-0.541601524187+0.146205868177j)*x[0]**o + ((0.834551815591+0.123853179359j))*x[0] + ((0.870747853272-0.521567959376j))*x[1]**o + ((-0.0168664397366+0.613364319341j))*x[1]
        ref[(0, 1, 2)]=(-0.541601524187+0.146205868177j)*x_ref[0]**o + ((0.834551815591+0.123853179359j))*x_ref[0] + ((0.870747853272-0.521567959376j))*x_ref[1]**o + ((-0.0168664397366+0.613364319341j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.436616199417+0.0267403930595j)*x[0]**o + ((0.595356278707-0.544412154466j))*x[0] + ((-0.409240836883+0.878320617494j))*x[1]**o + ((0.111749811866+0.699255468768j))*x[1]
        ref[(0, 2, 0)]=(-0.436616199417+0.0267403930595j)*x_ref[0]**o + ((0.595356278707-0.544412154466j))*x_ref[0] + ((-0.409240836883+0.878320617494j))*x_ref[1]**o + ((0.111749811866+0.699255468768j))*x_ref[1]
        arg[(0, 2, 1)]=(0.250216647826-0.375160277823j)*x[0]**o + ((0.652862707445-0.753376031111j))*x[0] + ((0.956521709784-0.237654619247j))*x[1]**o + ((0.805680681752+0.527882635475j))*x[1]
        ref[(0, 2, 1)]=(0.250216647826-0.375160277823j)*x_ref[0]**o + ((0.652862707445-0.753376031111j))*x_ref[0] + ((0.956521709784-0.237654619247j))*x_ref[1]**o + ((0.805680681752+0.527882635475j))*x_ref[1]
        arg[(0, 2, 2)]=(-0.921285628972-0.7827109155j)*x[0]**o + ((-0.203506215104+0.484696261674j))*x[0] + ((0.495914164888-0.712706001722j))*x[1]**o + ((0.29343032465-0.470360043847j))*x[1]
        ref[(0, 2, 2)]=(-0.921285628972-0.7827109155j)*x_ref[0]**o + ((-0.203506215104+0.484696261674j))*x_ref[0] + ((0.495914164888-0.712706001722j))*x_ref[1]**o + ((0.29343032465-0.470360043847j))*x_ref[1]
        arg[(0, 3, 0)]=(0.49614197334+0.331276450485j)*x[0]**o + ((0.469034815444-0.25774375702j))*x[0] + ((0.0932560032293+0.0731914669812j))*x[1]**o + ((-0.496349209508-0.182469990199j))*x[1]
        ref[(0, 3, 0)]=(0.49614197334+0.331276450485j)*x_ref[0]**o + ((0.469034815444-0.25774375702j))*x_ref[0] + ((0.0932560032293+0.0731914669812j))*x_ref[1]**o + ((-0.496349209508-0.182469990199j))*x_ref[1]
        arg[(0, 3, 1)]=(0.783874255102-0.833065542931j)*x[0]**o + ((-0.973393422909+0.451055419337j))*x[0] + ((0.06712340345+0.894964985464j))*x[1]**o + ((-0.652230104767+0.143494031478j))*x[1]
        ref[(0, 3, 1)]=(0.783874255102-0.833065542931j)*x_ref[0]**o + ((-0.973393422909+0.451055419337j))*x_ref[0] + ((0.06712340345+0.894964985464j))*x_ref[1]**o + ((-0.652230104767+0.143494031478j))*x_ref[1]
        arg[(0, 3, 2)]=(0.181500984212-0.83026884682j)*x[0]**o + ((0.93710623942-0.294154569495j))*x[0] + ((0.742598695887+0.153830992719j))*x[1]**o + ((-0.164621421395-0.465333170717j))*x[1]
        ref[(0, 3, 2)]=(0.181500984212-0.83026884682j)*x_ref[0]**o + ((0.93710623942-0.294154569495j))*x_ref[0] + ((0.742598695887+0.153830992719j))*x_ref[1]**o + ((-0.164621421395-0.465333170717j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.370223296806-0.531385755126j)*x[0]**o + ((0.243009535044-0.113376265706j))*x[0] + ((0.501893673545-0.170807969827j))*x[1]**o + ((-0.606836669365+0.295672887852j))*x[1]
        ref[(1, 0, 0)]=(-0.370223296806-0.531385755126j)*x_ref[0]**o + ((0.243009535044-0.113376265706j))*x_ref[0] + ((0.501893673545-0.170807969827j))*x_ref[1]**o + ((-0.606836669365+0.295672887852j))*x_ref[1]
        arg[(1, 0, 1)]=(0.371176521683+0.739008710226j)*x[0]**o + ((0.833772714901-0.782594659894j))*x[0] + ((0.438147020312+0.656553735944j))*x[1]**o + ((-0.275372964538+0.925486505357j))*x[1]
        ref[(1, 0, 1)]=(0.371176521683+0.739008710226j)*x_ref[0]**o + ((0.833772714901-0.782594659894j))*x_ref[0] + ((0.438147020312+0.656553735944j))*x_ref[1]**o + ((-0.275372964538+0.925486505357j))*x_ref[1]
        arg[(1, 0, 2)]=(0.939103634861+0.791442121517j)*x[0]**o + ((0.183886500362+0.596029851551j))*x[0] + ((0.951888442622-0.400012701685j))*x[1]**o + ((-0.242476276941+0.0717713096668j))*x[1]
        ref[(1, 0, 2)]=(0.939103634861+0.791442121517j)*x_ref[0]**o + ((0.183886500362+0.596029851551j))*x_ref[0] + ((0.951888442622-0.400012701685j))*x_ref[1]**o + ((-0.242476276941+0.0717713096668j))*x_ref[1]
        arg[(1, 1, 0)]=(0.135997026891-0.545043088948j)*x[0]**o + ((-0.965790999669+0.81019931186j))*x[0] + ((0.583891347447+0.164133541759j))*x[1]**o + ((0.439630523362-0.181358401654j))*x[1]
        ref[(1, 1, 0)]=(0.135997026891-0.545043088948j)*x_ref[0]**o + ((-0.965790999669+0.81019931186j))*x_ref[0] + ((0.583891347447+0.164133541759j))*x_ref[1]**o + ((0.439630523362-0.181358401654j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.870140582936+0.518281243825j)*x[0]**o + ((0.867090083484+0.278767357805j))*x[0] + ((-0.154401276835-0.771558159791j))*x[1]**o + ((-0.948854426198+0.110048352469j))*x[1]
        ref[(1, 1, 1)]=(-0.870140582936+0.518281243825j)*x_ref[0]**o + ((0.867090083484+0.278767357805j))*x_ref[0] + ((-0.154401276835-0.771558159791j))*x_ref[1]**o + ((-0.948854426198+0.110048352469j))*x_ref[1]
        arg[(1, 1, 2)]=(0.771699013918-0.404929125308j)*x[0]**o + ((-0.429772470433-0.150900502645j))*x[0] + ((0.0516967471824-0.366456394089j))*x[1]**o + ((0.704446220775-0.333065876212j))*x[1]
        ref[(1, 1, 2)]=(0.771699013918-0.404929125308j)*x_ref[0]**o + ((-0.429772470433-0.150900502645j))*x_ref[0] + ((0.0516967471824-0.366456394089j))*x_ref[1]**o + ((0.704446220775-0.333065876212j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.861464969274+0.212294756825j)*x[0]**o + ((0.690428904999+0.336579674973j))*x[0] + ((-0.432944806214-0.467905769445j))*x[1]**o + ((-0.30459391089+0.482407004476j))*x[1]
        ref[(1, 2, 0)]=(-0.861464969274+0.212294756825j)*x_ref[0]**o + ((0.690428904999+0.336579674973j))*x_ref[0] + ((-0.432944806214-0.467905769445j))*x_ref[1]**o + ((-0.30459391089+0.482407004476j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.838773091401-0.372149699902j)*x[0]**o + ((0.374735627606+0.317306112586j))*x[0] + ((-0.815180267445+0.469689771829j))*x[1]**o + ((0.539643598661-0.259414262225j))*x[1]
        ref[(1, 2, 1)]=(-0.838773091401-0.372149699902j)*x_ref[0]**o + ((0.374735627606+0.317306112586j))*x_ref[0] + ((-0.815180267445+0.469689771829j))*x_ref[1]**o + ((0.539643598661-0.259414262225j))*x_ref[1]
        arg[(1, 2, 2)]=(-0.415027354188-0.497354790159j)*x[0]**o + ((-0.299880381887+0.477532320229j))*x[0] + ((0.0230021270268-0.762225741344j))*x[1]**o + ((0.921151152104-0.904037152887j))*x[1]
        ref[(1, 2, 2)]=(-0.415027354188-0.497354790159j)*x_ref[0]**o + ((-0.299880381887+0.477532320229j))*x_ref[0] + ((0.0230021270268-0.762225741344j))*x_ref[1]**o + ((0.921151152104-0.904037152887j))*x_ref[1]
        arg[(1, 3, 0)]=(-0.429695229136-0.598869046469j)*x[0]**o + ((0.36209035488-0.858060406146j))*x[0] + ((-0.640702280399-0.374447537085j))*x[1]**o + ((0.705670406209+0.654979189107j))*x[1]
        ref[(1, 3, 0)]=(-0.429695229136-0.598869046469j)*x_ref[0]**o + ((0.36209035488-0.858060406146j))*x_ref[0] + ((-0.640702280399-0.374447537085j))*x_ref[1]**o + ((0.705670406209+0.654979189107j))*x_ref[1]
        arg[(1, 3, 1)]=(-0.222918412432+0.864476252632j)*x[0]**o + ((-0.733542960489-0.615826484692j))*x[0] + ((0.249193448384+0.584596624538j))*x[1]**o + ((-0.926772133435-0.250766930409j))*x[1]
        ref[(1, 3, 1)]=(-0.222918412432+0.864476252632j)*x_ref[0]**o + ((-0.733542960489-0.615826484692j))*x_ref[0] + ((0.249193448384+0.584596624538j))*x_ref[1]**o + ((-0.926772133435-0.250766930409j))*x_ref[1]
        arg[(1, 3, 2)]=(-0.112122892932-0.531959156025j)*x[0]**o + ((0.826977598956-0.292562901516j))*x[0] + ((-0.697979729456+0.107907186445j))*x[1]**o + ((0.27331653158-0.0830431414505j))*x[1]
        ref[(1, 3, 2)]=(-0.112122892932-0.531959156025j)*x_ref[0]**o + ((0.826977598956-0.292562901516j))*x_ref[0] + ((-0.697979729456+0.107907186445j))*x_ref[1]**o + ((0.27331653158-0.0830431414505j))*x_ref[1]
        arg[(2, 0, 0)]=(-0.126307371631+0.431749098887j)*x[0]**o + ((-0.516946308555+0.936801216411j))*x[0] + ((-0.862501269697-0.673307349514j))*x[1]**o + ((-0.589193786818-0.259159211349j))*x[1]
        ref[(2, 0, 0)]=(-0.126307371631+0.431749098887j)*x_ref[0]**o + ((-0.516946308555+0.936801216411j))*x_ref[0] + ((-0.862501269697-0.673307349514j))*x_ref[1]**o + ((-0.589193786818-0.259159211349j))*x_ref[1]
        arg[(2, 0, 1)]=(-0.894519995594+0.471410639269j)*x[0]**o + ((0.118819122348+0.212634544404j))*x[0] + ((0.684577283733-0.191608025898j))*x[1]**o + ((0.783115160578-0.0280471096537j))*x[1]
        ref[(2, 0, 1)]=(-0.894519995594+0.471410639269j)*x_ref[0]**o + ((0.118819122348+0.212634544404j))*x_ref[0] + ((0.684577283733-0.191608025898j))*x_ref[1]**o + ((0.783115160578-0.0280471096537j))*x_ref[1]
        arg[(2, 0, 2)]=(0.317297513718+0.670628719559j)*x[0]**o + ((0.0319251072587+0.0515338450489j))*x[0] + ((0.570972960997-0.746624609411j))*x[1]**o + ((-0.367296062865-0.302779147166j))*x[1]
        ref[(2, 0, 2)]=(0.317297513718+0.670628719559j)*x_ref[0]**o + ((0.0319251072587+0.0515338450489j))*x_ref[0] + ((0.570972960997-0.746624609411j))*x_ref[1]**o + ((-0.367296062865-0.302779147166j))*x_ref[1]
        arg[(2, 1, 0)]=(0.824095470651-0.000317827218j)*x[0]**o + ((0.890063349981+0.639784675812j))*x[0] + ((0.033755237755-0.150877403689j))*x[1]**o + ((0.65412054537-0.428249936598j))*x[1]
        ref[(2, 1, 0)]=(0.824095470651-0.000317827218j)*x_ref[0]**o + ((0.890063349981+0.639784675812j))*x_ref[0] + ((0.033755237755-0.150877403689j))*x_ref[1]**o + ((0.65412054537-0.428249936598j))*x_ref[1]
        arg[(2, 1, 1)]=(-0.722142439758+0.172342714473j)*x[0]**o + ((0.0592071337863-0.942696255912j))*x[0] + ((0.400684171261-0.866574811663j))*x[1]**o + ((-0.31980592899+0.372537939628j))*x[1]
        ref[(2, 1, 1)]=(-0.722142439758+0.172342714473j)*x_ref[0]**o + ((0.0592071337863-0.942696255912j))*x_ref[0] + ((0.400684171261-0.866574811663j))*x_ref[1]**o + ((-0.31980592899+0.372537939628j))*x_ref[1]
        arg[(2, 1, 2)]=(-0.59150305214-0.21894034977j)*x[0]**o + ((-0.580441498141+0.838907030792j))*x[0] + ((-0.717171204638+0.66134514366j))*x[1]**o + ((-0.528802248087+0.63725043045j))*x[1]
        ref[(2, 1, 2)]=(-0.59150305214-0.21894034977j)*x_ref[0]**o + ((-0.580441498141+0.838907030792j))*x_ref[0] + ((-0.717171204638+0.66134514366j))*x_ref[1]**o + ((-0.528802248087+0.63725043045j))*x_ref[1]
        arg[(2, 2, 0)]=(-0.012590201617+0.749463371388j)*x[0]**o + ((0.306928141288-0.650248399472j))*x[0] + ((-0.345721270173+0.971910099408j))*x[1]**o + ((-0.975680915195+0.989260348307j))*x[1]
        ref[(2, 2, 0)]=(-0.012590201617+0.749463371388j)*x_ref[0]**o + ((0.306928141288-0.650248399472j))*x_ref[0] + ((-0.345721270173+0.971910099408j))*x_ref[1]**o + ((-0.975680915195+0.989260348307j))*x_ref[1]
        arg[(2, 2, 1)]=(-0.726274547899+0.492148483791j)*x[0]**o + ((0.283494163197+0.721055300813j))*x[0] + ((-0.464083145862-0.547305200538j))*x[1]**o + ((-0.828122450232+0.717526260027j))*x[1]
        ref[(2, 2, 1)]=(-0.726274547899+0.492148483791j)*x_ref[0]**o + ((0.283494163197+0.721055300813j))*x_ref[0] + ((-0.464083145862-0.547305200538j))*x_ref[1]**o + ((-0.828122450232+0.717526260027j))*x_ref[1]
        arg[(2, 2, 2)]=(0.888449219672-0.969079827769j)*x[0]**o + ((-0.26792796714+0.153302809825j))*x[0] + ((-0.703891401141-0.0861105129101j))*x[1]**o + ((0.599756541892+0.821760156989j))*x[1]
        ref[(2, 2, 2)]=(0.888449219672-0.969079827769j)*x_ref[0]**o + ((-0.26792796714+0.153302809825j))*x_ref[0] + ((-0.703891401141-0.0861105129101j))*x_ref[1]**o + ((0.599756541892+0.821760156989j))*x_ref[1]
        arg[(2, 3, 0)]=(-0.844726932821-0.985721464539j)*x[0]**o + ((0.391329480674+0.173313383683j))*x[0] + ((-0.193676259782+0.731320723712j))*x[1]**o + ((0.0154640628665-0.267160109222j))*x[1]
        ref[(2, 3, 0)]=(-0.844726932821-0.985721464539j)*x_ref[0]**o + ((0.391329480674+0.173313383683j))*x_ref[0] + ((-0.193676259782+0.731320723712j))*x_ref[1]**o + ((0.0154640628665-0.267160109222j))*x_ref[1]
        arg[(2, 3, 1)]=(0.78642988096+0.524457308012j)*x[0]**o + ((-0.945644823961+0.410938790365j))*x[0] + ((0.755522030785-0.240375547561j))*x[1]**o + ((0.927535550722+0.943195600822j))*x[1]
        ref[(2, 3, 1)]=(0.78642988096+0.524457308012j)*x_ref[0]**o + ((-0.945644823961+0.410938790365j))*x_ref[0] + ((0.755522030785-0.240375547561j))*x_ref[1]**o + ((0.927535550722+0.943195600822j))*x_ref[1]
        arg[(2, 3, 2)]=(-0.551533852516-0.842985798261j)*x[0]**o + ((-0.516618118103-0.214942454099j))*x[0] + ((-0.487452048592+0.59022242562j))*x[1]**o + ((0.791146897797-0.785395697078j))*x[1]
        ref[(2, 3, 2)]=(-0.551533852516-0.842985798261j)*x_ref[0]**o + ((-0.516618118103-0.214942454099j))*x_ref[0] + ((-0.487452048592+0.59022242562j))*x_ref[1]**o + ((0.791146897797-0.785395697078j))*x_ref[1]
        arg[(3, 0, 0)]=(-0.251532025974+0.157846258244j)*x[0]**o + ((-0.199412642313+0.0713841978393j))*x[0] + ((-0.201190931154+0.554561667383j))*x[1]**o + ((-0.0762014481081-0.779942853598j))*x[1]
        ref[(3, 0, 0)]=(-0.251532025974+0.157846258244j)*x_ref[0]**o + ((-0.199412642313+0.0713841978393j))*x_ref[0] + ((-0.201190931154+0.554561667383j))*x_ref[1]**o + ((-0.0762014481081-0.779942853598j))*x_ref[1]
        arg[(3, 0, 1)]=(0.0752357893894+0.781061272629j)*x[0]**o + ((0.390554865349+0.58643453351j))*x[0] + ((0.822793499074+0.138732777002j))*x[1]**o + ((-0.243782825344-0.0255859507384j))*x[1]
        ref[(3, 0, 1)]=(0.0752357893894+0.781061272629j)*x_ref[0]**o + ((0.390554865349+0.58643453351j))*x_ref[0] + ((0.822793499074+0.138732777002j))*x_ref[1]**o + ((-0.243782825344-0.0255859507384j))*x_ref[1]
        arg[(3, 0, 2)]=(0.255078625567-0.01012740377j)*x[0]**o + ((-0.987555725197+0.390406938624j))*x[0] + ((0.11735410247-0.532484868979j))*x[1]**o + ((-0.274024974701-0.455159959231j))*x[1]
        ref[(3, 0, 2)]=(0.255078625567-0.01012740377j)*x_ref[0]**o + ((-0.987555725197+0.390406938624j))*x_ref[0] + ((0.11735410247-0.532484868979j))*x_ref[1]**o + ((-0.274024974701-0.455159959231j))*x_ref[1]
        arg[(3, 1, 0)]=(-0.196509727464-0.344501809871j)*x[0]**o + ((0.660697265497-0.874632656356j))*x[0] + ((0.218974775957-0.301802347582j))*x[1]**o + ((0.444722250508-0.701330719978j))*x[1]
        ref[(3, 1, 0)]=(-0.196509727464-0.344501809871j)*x_ref[0]**o + ((0.660697265497-0.874632656356j))*x_ref[0] + ((0.218974775957-0.301802347582j))*x_ref[1]**o + ((0.444722250508-0.701330719978j))*x_ref[1]
        arg[(3, 1, 1)]=(-0.459212462492-0.589411793398j)*x[0]**o + ((0.6992909805+0.441909979247j))*x[0] + ((-0.234616395001+0.298262002229j))*x[1]**o + ((-0.314096257596-0.402323385572j))*x[1]
        ref[(3, 1, 1)]=(-0.459212462492-0.589411793398j)*x_ref[0]**o + ((0.6992909805+0.441909979247j))*x_ref[0] + ((-0.234616395001+0.298262002229j))*x_ref[1]**o + ((-0.314096257596-0.402323385572j))*x_ref[1]
        arg[(3, 1, 2)]=(0.681863906859+0.973014202821j)*x[0]**o + ((-0.484920073203+0.586522991673j))*x[0] + ((-0.516188821642-0.415957638674j))*x[1]**o + ((-0.610736508056-0.994985390338j))*x[1]
        ref[(3, 1, 2)]=(0.681863906859+0.973014202821j)*x_ref[0]**o + ((-0.484920073203+0.586522991673j))*x_ref[0] + ((-0.516188821642-0.415957638674j))*x_ref[1]**o + ((-0.610736508056-0.994985390338j))*x_ref[1]
        arg[(3, 2, 0)]=(-0.794866671218+0.17125175007j)*x[0]**o + ((0.0599179852878-0.567372511165j))*x[0] + ((0.800853524974+0.526025944687j))*x[1]**o + ((0.0020117409797+0.70340752312j))*x[1]
        ref[(3, 2, 0)]=(-0.794866671218+0.17125175007j)*x_ref[0]**o + ((0.0599179852878-0.567372511165j))*x_ref[0] + ((0.800853524974+0.526025944687j))*x_ref[1]**o + ((0.0020117409797+0.70340752312j))*x_ref[1]
        arg[(3, 2, 1)]=(0.509211221391+0.572163517378j)*x[0]**o + ((0.805362557513-0.489011289014j))*x[0] + ((0.630720597783-0.0595139640392j))*x[1]**o + ((0.481692529832-0.707020688884j))*x[1]
        ref[(3, 2, 1)]=(0.509211221391+0.572163517378j)*x_ref[0]**o + ((0.805362557513-0.489011289014j))*x_ref[0] + ((0.630720597783-0.0595139640392j))*x_ref[1]**o + ((0.481692529832-0.707020688884j))*x_ref[1]
        arg[(3, 2, 2)]=(0.355004282431-0.0169378217647j)*x[0]**o + ((0.848743179876+0.71576239842j))*x[0] + ((0.201338683675+0.6396016667j))*x[1]**o + ((0.778423886197-0.106194756866j))*x[1]
        ref[(3, 2, 2)]=(0.355004282431-0.0169378217647j)*x_ref[0]**o + ((0.848743179876+0.71576239842j))*x_ref[0] + ((0.201338683675+0.6396016667j))*x_ref[1]**o + ((0.778423886197-0.106194756866j))*x_ref[1]
        arg[(3, 3, 0)]=(-0.0799341707689-0.306231879951j)*x[0]**o + ((0.810966617383-0.696190620014j))*x[0] + ((-0.863479610776-0.0580699244758j))*x[1]**o + ((0.763757003573+0.779282892505j))*x[1]
        ref[(3, 3, 0)]=(-0.0799341707689-0.306231879951j)*x_ref[0]**o + ((0.810966617383-0.696190620014j))*x_ref[0] + ((-0.863479610776-0.0580699244758j))*x_ref[1]**o + ((0.763757003573+0.779282892505j))*x_ref[1]
        arg[(3, 3, 1)]=(0.347465905458+0.140854505464j)*x[0]**o + ((0.446052895596+0.380814281236j))*x[0] + ((0.324303254577+0.201440074318j))*x[1]**o + ((-0.971876383082-0.872933331208j))*x[1]
        ref[(3, 3, 1)]=(0.347465905458+0.140854505464j)*x_ref[0]**o + ((0.446052895596+0.380814281236j))*x_ref[0] + ((0.324303254577+0.201440074318j))*x_ref[1]**o + ((-0.971876383082-0.872933331208j))*x_ref[1]
        arg[(3, 3, 2)]=(-0.978681832676-0.868920715117j)*x[0]**o + ((-0.235238757251-0.704479783498j))*x[0] + ((-0.411350631915+0.688541104238j))*x[1]**o + ((-0.797154520044+0.897352848581j))*x[1]
        ref[(3, 3, 2)]=(-0.978681832676-0.868920715117j)*x_ref[0]**o + ((-0.235238757251-0.704479783498j))*x_ref[0] + ((-0.411350631915+0.688541104238j))*x_ref[1]**o + ((-0.797154520044+0.897352848581j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.741789208941-0.877911304942j)*x[2]**o + ((-0.995123761637-0.729474852646j))*x[2]
            ref[(0, 0, 0)]+=(-0.741789208941-0.877911304942j)*x_ref[2]**o + ((-0.995123761637-0.729474852646j))*x_ref[2]
            arg[(0, 0, 1)]+=(-0.664121949604+0.845405473865j)*x[2]**o + ((-0.390962655165-0.0178502105199j))*x[2]
            ref[(0, 0, 1)]+=(-0.664121949604+0.845405473865j)*x_ref[2]**o + ((-0.390962655165-0.0178502105199j))*x_ref[2]
            arg[(0, 0, 2)]+=(-0.0700427259447+0.077701596966j)*x[2]**o + ((0.167736115371-0.106551141553j))*x[2]
            ref[(0, 0, 2)]+=(-0.0700427259447+0.077701596966j)*x_ref[2]**o + ((0.167736115371-0.106551141553j))*x_ref[2]
            arg[(0, 1, 0)]+=(-0.831101659348-0.288138517486j)*x[2]**o + ((-0.160987242031+0.531764590493j))*x[2]
            ref[(0, 1, 0)]+=(-0.831101659348-0.288138517486j)*x_ref[2]**o + ((-0.160987242031+0.531764590493j))*x_ref[2]
            arg[(0, 1, 1)]+=(-0.610663858267+0.644520277094j)*x[2]**o + ((0.723082432816-0.419887095057j))*x[2]
            ref[(0, 1, 1)]+=(-0.610663858267+0.644520277094j)*x_ref[2]**o + ((0.723082432816-0.419887095057j))*x_ref[2]
            arg[(0, 1, 2)]+=(0.937343293525-0.0320725486197j)*x[2]**o + ((-0.0543916930807+0.599825298789j))*x[2]
            ref[(0, 1, 2)]+=(0.937343293525-0.0320725486197j)*x_ref[2]**o + ((-0.0543916930807+0.599825298789j))*x_ref[2]
            arg[(0, 2, 0)]+=(-0.372685058942+0.952661490055j)*x[2]**o + ((-0.24477788024-0.598042913627j))*x[2]
            ref[(0, 2, 0)]+=(-0.372685058942+0.952661490055j)*x_ref[2]**o + ((-0.24477788024-0.598042913627j))*x_ref[2]
            arg[(0, 2, 1)]+=(-0.695014505332-0.905585502914j)*x[2]**o + ((0.435213944932+0.89751547609j))*x[2]
            ref[(0, 2, 1)]+=(-0.695014505332-0.905585502914j)*x_ref[2]**o + ((0.435213944932+0.89751547609j))*x_ref[2]
            arg[(0, 2, 2)]+=(-0.818313711139+0.516258906966j)*x[2]**o + ((-0.413042740628+0.726277691512j))*x[2]
            ref[(0, 2, 2)]+=(-0.818313711139+0.516258906966j)*x_ref[2]**o + ((-0.413042740628+0.726277691512j))*x_ref[2]
            arg[(0, 3, 0)]+=(-0.636473084691-0.970559154878j)*x[2]**o + ((0.861915744299+0.799775628654j))*x[2]
            ref[(0, 3, 0)]+=(-0.636473084691-0.970559154878j)*x_ref[2]**o + ((0.861915744299+0.799775628654j))*x_ref[2]
            arg[(0, 3, 1)]+=(0.555667904298-0.390485906904j)*x[2]**o + ((0.957218176022+0.905396245041j))*x[2]
            ref[(0, 3, 1)]+=(0.555667904298-0.390485906904j)*x_ref[2]**o + ((0.957218176022+0.905396245041j))*x_ref[2]
            arg[(0, 3, 2)]+=(0.399251421297-0.57955347437j)*x[2]**o + ((-0.425915679145-0.306118916637j))*x[2]
            ref[(0, 3, 2)]+=(0.399251421297-0.57955347437j)*x_ref[2]**o + ((-0.425915679145-0.306118916637j))*x_ref[2]
            arg[(1, 0, 0)]+=(-0.925872433444+0.288663988353j)*x[2]**o + ((0.664522592362+0.246541317037j))*x[2]
            ref[(1, 0, 0)]+=(-0.925872433444+0.288663988353j)*x_ref[2]**o + ((0.664522592362+0.246541317037j))*x_ref[2]
            arg[(1, 0, 1)]+=(-0.203757349044+0.0832138180927j)*x[2]**o + ((-0.552073648454+0.791262989455j))*x[2]
            ref[(1, 0, 1)]+=(-0.203757349044+0.0832138180927j)*x_ref[2]**o + ((-0.552073648454+0.791262989455j))*x_ref[2]
            arg[(1, 0, 2)]+=(0.935389625099+0.451193042337j)*x[2]**o + ((0.122382723627+0.0772981221257j))*x[2]
            ref[(1, 0, 2)]+=(0.935389625099+0.451193042337j)*x_ref[2]**o + ((0.122382723627+0.0772981221257j))*x_ref[2]
            arg[(1, 1, 0)]+=(0.0262401431196+0.0536896612609j)*x[2]**o + ((0.567035067997+0.963378640106j))*x[2]
            ref[(1, 1, 0)]+=(0.0262401431196+0.0536896612609j)*x_ref[2]**o + ((0.567035067997+0.963378640106j))*x_ref[2]
            arg[(1, 1, 1)]+=(0.777599534061-0.280657701564j)*x[2]**o + ((-0.337691641584-0.876394218443j))*x[2]
            ref[(1, 1, 1)]+=(0.777599534061-0.280657701564j)*x_ref[2]**o + ((-0.337691641584-0.876394218443j))*x_ref[2]
            arg[(1, 1, 2)]+=(-0.141493209713+0.733903454484j)*x[2]**o + ((-0.193295013924+0.732797190924j))*x[2]
            ref[(1, 1, 2)]+=(-0.141493209713+0.733903454484j)*x_ref[2]**o + ((-0.193295013924+0.732797190924j))*x_ref[2]
            arg[(1, 2, 0)]+=(0.784277472118-0.963913671574j)*x[2]**o + ((-0.79613199347-0.384249503047j))*x[2]
            ref[(1, 2, 0)]+=(0.784277472118-0.963913671574j)*x_ref[2]**o + ((-0.79613199347-0.384249503047j))*x_ref[2]
            arg[(1, 2, 1)]+=(0.469164076376-0.610979202148j)*x[2]**o + ((0.944498834536+0.00570519680225j))*x[2]
            ref[(1, 2, 1)]+=(0.469164076376-0.610979202148j)*x_ref[2]**o + ((0.944498834536+0.00570519680225j))*x_ref[2]
            arg[(1, 2, 2)]+=(0.463952981337+0.67150522751j)*x[2]**o + ((0.591649251812+0.169357256559j))*x[2]
            ref[(1, 2, 2)]+=(0.463952981337+0.67150522751j)*x_ref[2]**o + ((0.591649251812+0.169357256559j))*x_ref[2]
            arg[(1, 3, 0)]+=(-0.513298346652-0.759876907384j)*x[2]**o + ((0.0694894241099-0.457662536198j))*x[2]
            ref[(1, 3, 0)]+=(-0.513298346652-0.759876907384j)*x_ref[2]**o + ((0.0694894241099-0.457662536198j))*x_ref[2]
            arg[(1, 3, 1)]+=(0.827647458442-0.589340173281j)*x[2]**o + ((0.939236407789-0.430735515614j))*x[2]
            ref[(1, 3, 1)]+=(0.827647458442-0.589340173281j)*x_ref[2]**o + ((0.939236407789-0.430735515614j))*x_ref[2]
            arg[(1, 3, 2)]+=(-0.518712910999-0.727767291873j)*x[2]**o + ((0.0214231331001-0.781549561501j))*x[2]
            ref[(1, 3, 2)]+=(-0.518712910999-0.727767291873j)*x_ref[2]**o + ((0.0214231331001-0.781549561501j))*x_ref[2]
            arg[(2, 0, 0)]+=(0.191642569983+0.115150048447j)*x[2]**o + ((-0.388777673502+0.908262014758j))*x[2]
            ref[(2, 0, 0)]+=(0.191642569983+0.115150048447j)*x_ref[2]**o + ((-0.388777673502+0.908262014758j))*x_ref[2]
            arg[(2, 0, 1)]+=(-0.637593704091+0.779576038657j)*x[2]**o + ((-0.776255565463+0.255678184455j))*x[2]
            ref[(2, 0, 1)]+=(-0.637593704091+0.779576038657j)*x_ref[2]**o + ((-0.776255565463+0.255678184455j))*x_ref[2]
            arg[(2, 0, 2)]+=(-0.456393586822-0.809291215355j)*x[2]**o + ((0.840702416315-0.684823607063j))*x[2]
            ref[(2, 0, 2)]+=(-0.456393586822-0.809291215355j)*x_ref[2]**o + ((0.840702416315-0.684823607063j))*x_ref[2]
            arg[(2, 1, 0)]+=(0.74580445951-0.73343414319j)*x[2]**o + ((0.768975069917-0.988311347755j))*x[2]
            ref[(2, 1, 0)]+=(0.74580445951-0.73343414319j)*x_ref[2]**o + ((0.768975069917-0.988311347755j))*x_ref[2]
            arg[(2, 1, 1)]+=(0.070228486202+0.582568884077j)*x[2]**o + ((0.484050736321+0.679195997706j))*x[2]
            ref[(2, 1, 1)]+=(0.070228486202+0.582568884077j)*x_ref[2]**o + ((0.484050736321+0.679195997706j))*x_ref[2]
            arg[(2, 1, 2)]+=(0.0158665749142-0.124279924932j)*x[2]**o + ((0.560730972226+0.283465221394j))*x[2]
            ref[(2, 1, 2)]+=(0.0158665749142-0.124279924932j)*x_ref[2]**o + ((0.560730972226+0.283465221394j))*x_ref[2]
            arg[(2, 2, 0)]+=(-0.60718852624-0.262312347081j)*x[2]**o + ((-0.119095521907+0.616230559284j))*x[2]
            ref[(2, 2, 0)]+=(-0.60718852624-0.262312347081j)*x_ref[2]**o + ((-0.119095521907+0.616230559284j))*x_ref[2]
            arg[(2, 2, 1)]+=(-0.959670483056+0.441454629867j)*x[2]**o + ((-0.60253095043+0.571744391616j))*x[2]
            ref[(2, 2, 1)]+=(-0.959670483056+0.441454629867j)*x_ref[2]**o + ((-0.60253095043+0.571744391616j))*x_ref[2]
            arg[(2, 2, 2)]+=(-0.085005991849-0.320365432534j)*x[2]**o + ((0.143661315674+0.960359129976j))*x[2]
            ref[(2, 2, 2)]+=(-0.085005991849-0.320365432534j)*x_ref[2]**o + ((0.143661315674+0.960359129976j))*x_ref[2]
            arg[(2, 3, 0)]+=(0.0333334521284-0.0909696046937j)*x[2]**o + ((0.772511186677+0.0473558660806j))*x[2]
            ref[(2, 3, 0)]+=(0.0333334521284-0.0909696046937j)*x_ref[2]**o + ((0.772511186677+0.0473558660806j))*x_ref[2]
            arg[(2, 3, 1)]+=(-0.235917889226-0.635185809626j)*x[2]**o + ((-0.692623146889-0.236735009092j))*x[2]
            ref[(2, 3, 1)]+=(-0.235917889226-0.635185809626j)*x_ref[2]**o + ((-0.692623146889-0.236735009092j))*x_ref[2]
            arg[(2, 3, 2)]+=(-0.590852201939-0.367533295361j)*x[2]**o + ((-0.252621596971+0.813734189263j))*x[2]
            ref[(2, 3, 2)]+=(-0.590852201939-0.367533295361j)*x_ref[2]**o + ((-0.252621596971+0.813734189263j))*x_ref[2]
            arg[(3, 0, 0)]+=(0.419922558762-0.287301411157j)*x[2]**o + ((0.928087409821+0.735802596806j))*x[2]
            ref[(3, 0, 0)]+=(0.419922558762-0.287301411157j)*x_ref[2]**o + ((0.928087409821+0.735802596806j))*x_ref[2]
            arg[(3, 0, 1)]+=(0.88915410037+0.829343658088j)*x[2]**o + ((-0.604725300463+0.706853058719j))*x[2]
            ref[(3, 0, 1)]+=(0.88915410037+0.829343658088j)*x_ref[2]**o + ((-0.604725300463+0.706853058719j))*x_ref[2]
            arg[(3, 0, 2)]+=(0.584158898631-0.0771075502207j)*x[2]**o + ((-0.226825672783+0.543311694111j))*x[2]
            ref[(3, 0, 2)]+=(0.584158898631-0.0771075502207j)*x_ref[2]**o + ((-0.226825672783+0.543311694111j))*x_ref[2]
            arg[(3, 1, 0)]+=(-0.0305616113179-0.199166127244j)*x[2]**o + ((-0.114899172054+0.841034046787j))*x[2]
            ref[(3, 1, 0)]+=(-0.0305616113179-0.199166127244j)*x_ref[2]**o + ((-0.114899172054+0.841034046787j))*x_ref[2]
            arg[(3, 1, 1)]+=(0.0789681402367-0.930404085717j)*x[2]**o + ((-0.0817272255707+0.781419978919j))*x[2]
            ref[(3, 1, 1)]+=(0.0789681402367-0.930404085717j)*x_ref[2]**o + ((-0.0817272255707+0.781419978919j))*x_ref[2]
            arg[(3, 1, 2)]+=(-0.088730113265-0.219649431832j)*x[2]**o + ((0.313733610812+0.292894304713j))*x[2]
            ref[(3, 1, 2)]+=(-0.088730113265-0.219649431832j)*x_ref[2]**o + ((0.313733610812+0.292894304713j))*x_ref[2]
            arg[(3, 2, 0)]+=(0.227053340964-0.788823885532j)*x[2]**o + ((0.806204582845+0.810303470055j))*x[2]
            ref[(3, 2, 0)]+=(0.227053340964-0.788823885532j)*x_ref[2]**o + ((0.806204582845+0.810303470055j))*x_ref[2]
            arg[(3, 2, 1)]+=(0.668217842834-0.566899788999j)*x[2]**o + ((-0.142186918602+0.457910071011j))*x[2]
            ref[(3, 2, 1)]+=(0.668217842834-0.566899788999j)*x_ref[2]**o + ((-0.142186918602+0.457910071011j))*x_ref[2]
            arg[(3, 2, 2)]+=(0.714798836518+0.178276730664j)*x[2]**o + ((-0.541191570673-0.217540744799j))*x[2]
            ref[(3, 2, 2)]+=(0.714798836518+0.178276730664j)*x_ref[2]**o + ((-0.541191570673-0.217540744799j))*x_ref[2]
            arg[(3, 3, 0)]+=(-0.379349109304-0.945111557477j)*x[2]**o + ((-0.753581516314-0.174093517437j))*x[2]
            ref[(3, 3, 0)]+=(-0.379349109304-0.945111557477j)*x_ref[2]**o + ((-0.753581516314-0.174093517437j))*x_ref[2]
            arg[(3, 3, 1)]+=(0.357939280295+0.150671612968j)*x[2]**o + ((-0.921112226469+0.0979741620534j))*x[2]
            ref[(3, 3, 1)]+=(0.357939280295+0.150671612968j)*x_ref[2]**o + ((-0.921112226469+0.0979741620534j))*x_ref[2]
            arg[(3, 3, 2)]+=(0.236332602441+0.890521993871j)*x[2]**o + ((-0.434501672604+0.639254812355j))*x[2]
            ref[(3, 3, 2)]+=(0.236332602441+0.890521993871j)*x_ref[2]**o + ((-0.434501672604+0.639254812355j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 4, 2),w)
        ref = Data(0,(4, 3, 4, 2),w_ref)
        arg[(0, 0, 0, 0)]=(0.688531661721-0.0549094656197j)*x[0]**o + ((0.986674063841-0.855346715123j))*x[0] + ((-0.739265862011-0.461786273975j))*x[1]**o + ((-0.725942444165+0.845762836151j))*x[1]
        ref[(0, 0, 0, 0)]=(0.688531661721-0.0549094656197j)*x_ref[0]**o + ((0.986674063841-0.855346715123j))*x_ref[0] + ((-0.739265862011-0.461786273975j))*x_ref[1]**o + ((-0.725942444165+0.845762836151j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(0.577388869362-0.327022781742j)*x[0]**o + ((0.41757702651-0.953098915913j))*x[0] + ((0.767164206396-0.991805880855j))*x[1]**o + ((-0.12218031107+0.369776626237j))*x[1]
        ref[(0, 0, 0, 1)]=(0.577388869362-0.327022781742j)*x_ref[0]**o + ((0.41757702651-0.953098915913j))*x_ref[0] + ((0.767164206396-0.991805880855j))*x_ref[1]**o + ((-0.12218031107+0.369776626237j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.389258577547+0.900526160072j)*x[0]**o + ((-0.52447297424+0.262904938286j))*x[0] + ((-0.510123366669+0.924152451207j))*x[1]**o + ((0.221754877184-0.722026419803j))*x[1]
        ref[(0, 0, 1, 0)]=(0.389258577547+0.900526160072j)*x_ref[0]**o + ((-0.52447297424+0.262904938286j))*x_ref[0] + ((-0.510123366669+0.924152451207j))*x_ref[1]**o + ((0.221754877184-0.722026419803j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.985983715223+0.817538821165j)*x[0]**o + ((0.740866109871-0.182113546834j))*x[0] + ((-0.640727095497+0.383512411094j))*x[1]**o + ((0.995621140753-0.329306349763j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.985983715223+0.817538821165j)*x_ref[0]**o + ((0.740866109871-0.182113546834j))*x_ref[0] + ((-0.640727095497+0.383512411094j))*x_ref[1]**o + ((0.995621140753-0.329306349763j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(0.62484956238+0.5248806332j)*x[0]**o + ((-0.778228006839+0.467450453893j))*x[0] + ((-0.752178818401+0.91334170372j))*x[1]**o + ((0.57547766486+0.511716584288j))*x[1]
        ref[(0, 0, 2, 0)]=(0.62484956238+0.5248806332j)*x_ref[0]**o + ((-0.778228006839+0.467450453893j))*x_ref[0] + ((-0.752178818401+0.91334170372j))*x_ref[1]**o + ((0.57547766486+0.511716584288j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(0.934127699823+0.932269667427j)*x[0]**o + ((-0.934555714083-0.863610236601j))*x[0] + ((-0.0211608832076+0.920062620771j))*x[1]**o + ((0.729251528712-0.18131186167j))*x[1]
        ref[(0, 0, 2, 1)]=(0.934127699823+0.932269667427j)*x_ref[0]**o + ((-0.934555714083-0.863610236601j))*x_ref[0] + ((-0.0211608832076+0.920062620771j))*x_ref[1]**o + ((0.729251528712-0.18131186167j))*x_ref[1]
        arg[(0, 0, 3, 0)]=(-0.402906269002-0.0923964175788j)*x[0]**o + ((-0.0836423031732+0.730597950416j))*x[0] + ((-0.713326059662-0.555966959822j))*x[1]**o + ((-0.519100907569-0.535718933859j))*x[1]
        ref[(0, 0, 3, 0)]=(-0.402906269002-0.0923964175788j)*x_ref[0]**o + ((-0.0836423031732+0.730597950416j))*x_ref[0] + ((-0.713326059662-0.555966959822j))*x_ref[1]**o + ((-0.519100907569-0.535718933859j))*x_ref[1]
        arg[(0, 0, 3, 1)]=(0.989373654884+0.874344940749j)*x[0]**o + ((-0.402179125803-0.791072322147j))*x[0] + ((0.423994867476+0.789715389825j))*x[1]**o + ((0.00024431145031+0.12504768225j))*x[1]
        ref[(0, 0, 3, 1)]=(0.989373654884+0.874344940749j)*x_ref[0]**o + ((-0.402179125803-0.791072322147j))*x_ref[0] + ((0.423994867476+0.789715389825j))*x_ref[1]**o + ((0.00024431145031+0.12504768225j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(-0.18668396538-0.196117655341j)*x[0]**o + ((-0.218493179256-0.59977917304j))*x[0] + ((-0.561514778015+0.167775458651j))*x[1]**o + ((0.320109872461-0.812350560618j))*x[1]
        ref[(0, 1, 0, 0)]=(-0.18668396538-0.196117655341j)*x_ref[0]**o + ((-0.218493179256-0.59977917304j))*x_ref[0] + ((-0.561514778015+0.167775458651j))*x_ref[1]**o + ((0.320109872461-0.812350560618j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.27731258986-0.621580750584j)*x[0]**o + ((0.975712656543-0.392044878497j))*x[0] + ((-0.371140182989-0.688894686429j))*x[1]**o + ((-0.703036644225+0.590909425863j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.27731258986-0.621580750584j)*x_ref[0]**o + ((0.975712656543-0.392044878497j))*x_ref[0] + ((-0.371140182989-0.688894686429j))*x_ref[1]**o + ((-0.703036644225+0.590909425863j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.474530936003-0.856061856693j)*x[0]**o + ((-0.204917268866-0.821489127757j))*x[0] + ((0.968772235221-0.256454125044j))*x[1]**o + ((-0.697045748967+0.0888025395023j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.474530936003-0.856061856693j)*x_ref[0]**o + ((-0.204917268866-0.821489127757j))*x_ref[0] + ((0.968772235221-0.256454125044j))*x_ref[1]**o + ((-0.697045748967+0.0888025395023j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.322788928182+0.750217594808j)*x[0]**o + ((-0.580353129694+0.511548434465j))*x[0] + ((0.339343510909+0.943349913057j))*x[1]**o + ((-0.0110349406772+0.84037781623j))*x[1]
        ref[(0, 1, 1, 1)]=(0.322788928182+0.750217594808j)*x_ref[0]**o + ((-0.580353129694+0.511548434465j))*x_ref[0] + ((0.339343510909+0.943349913057j))*x_ref[1]**o + ((-0.0110349406772+0.84037781623j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(0.182202475998+0.552135240138j)*x[0]**o + ((0.647831934807+0.907696467796j))*x[0] + ((-0.314122831231+0.554991025387j))*x[1]**o + ((-0.146241609603-0.278089056643j))*x[1]
        ref[(0, 1, 2, 0)]=(0.182202475998+0.552135240138j)*x_ref[0]**o + ((0.647831934807+0.907696467796j))*x_ref[0] + ((-0.314122831231+0.554991025387j))*x_ref[1]**o + ((-0.146241609603-0.278089056643j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(-0.397887826288+0.506373014315j)*x[0]**o + ((-0.666500781825+0.862450218339j))*x[0] + ((-0.600404297306+0.468589033336j))*x[1]**o + ((-0.411272743259-0.542030974104j))*x[1]
        ref[(0, 1, 2, 1)]=(-0.397887826288+0.506373014315j)*x_ref[0]**o + ((-0.666500781825+0.862450218339j))*x_ref[0] + ((-0.600404297306+0.468589033336j))*x_ref[1]**o + ((-0.411272743259-0.542030974104j))*x_ref[1]
        arg[(0, 1, 3, 0)]=(-0.800855248865-0.507392424816j)*x[0]**o + ((-0.925963156005-0.757245138692j))*x[0] + ((0.409085663923-0.0208147625776j))*x[1]**o + ((0.473440115641-0.836851282244j))*x[1]
        ref[(0, 1, 3, 0)]=(-0.800855248865-0.507392424816j)*x_ref[0]**o + ((-0.925963156005-0.757245138692j))*x_ref[0] + ((0.409085663923-0.0208147625776j))*x_ref[1]**o + ((0.473440115641-0.836851282244j))*x_ref[1]
        arg[(0, 1, 3, 1)]=(-0.911864535586+0.978488616676j)*x[0]**o + ((0.245381866265-0.0636853131904j))*x[0] + ((-0.046531254095+0.686366806529j))*x[1]**o + ((0.17764449141+0.1294539913j))*x[1]
        ref[(0, 1, 3, 1)]=(-0.911864535586+0.978488616676j)*x_ref[0]**o + ((0.245381866265-0.0636853131904j))*x_ref[0] + ((-0.046531254095+0.686366806529j))*x_ref[1]**o + ((0.17764449141+0.1294539913j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.0863415388194-0.0349305759757j)*x[0]**o + ((-0.768781423422+0.308454660949j))*x[0] + ((0.839485400104-0.870644878275j))*x[1]**o + ((-0.521271495572-0.289796776786j))*x[1]
        ref[(0, 2, 0, 0)]=(0.0863415388194-0.0349305759757j)*x_ref[0]**o + ((-0.768781423422+0.308454660949j))*x_ref[0] + ((0.839485400104-0.870644878275j))*x_ref[1]**o + ((-0.521271495572-0.289796776786j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(-0.17153852938+0.717966937602j)*x[0]**o + ((-0.880246242967-0.160237276299j))*x[0] + ((0.746767061663-0.596664412694j))*x[1]**o + ((0.367022142081-0.884114999451j))*x[1]
        ref[(0, 2, 0, 1)]=(-0.17153852938+0.717966937602j)*x_ref[0]**o + ((-0.880246242967-0.160237276299j))*x_ref[0] + ((0.746767061663-0.596664412694j))*x_ref[1]**o + ((0.367022142081-0.884114999451j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.293562350452-0.0192209448084j)*x[0]**o + ((-0.555384622014-0.134693089657j))*x[0] + ((-0.968974051829+0.199279810713j))*x[1]**o + ((-0.540257359979+0.523209440849j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.293562350452-0.0192209448084j)*x_ref[0]**o + ((-0.555384622014-0.134693089657j))*x_ref[0] + ((-0.968974051829+0.199279810713j))*x_ref[1]**o + ((-0.540257359979+0.523209440849j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(-0.650101787794+0.788381592781j)*x[0]**o + ((-0.308013760861-0.0743748495112j))*x[0] + ((0.160475389858+0.570289761858j))*x[1]**o + ((-0.98468890355+0.0373213055685j))*x[1]
        ref[(0, 2, 1, 1)]=(-0.650101787794+0.788381592781j)*x_ref[0]**o + ((-0.308013760861-0.0743748495112j))*x_ref[0] + ((0.160475389858+0.570289761858j))*x_ref[1]**o + ((-0.98468890355+0.0373213055685j))*x_ref[1]
        arg[(0, 2, 2, 0)]=(0.358440553459+0.974711589804j)*x[0]**o + ((0.266202576314+0.591754759744j))*x[0] + ((0.499633483112+0.649546368039j))*x[1]**o + ((-0.738659672232+0.794432743694j))*x[1]
        ref[(0, 2, 2, 0)]=(0.358440553459+0.974711589804j)*x_ref[0]**o + ((0.266202576314+0.591754759744j))*x_ref[0] + ((0.499633483112+0.649546368039j))*x_ref[1]**o + ((-0.738659672232+0.794432743694j))*x_ref[1]
        arg[(0, 2, 2, 1)]=(0.731211647867-0.3612855581j)*x[0]**o + ((0.178780277104-0.737428619778j))*x[0] + ((-0.0505989963506-0.502006760039j))*x[1]**o + ((0.432672006889-0.0775420459315j))*x[1]
        ref[(0, 2, 2, 1)]=(0.731211647867-0.3612855581j)*x_ref[0]**o + ((0.178780277104-0.737428619778j))*x_ref[0] + ((-0.0505989963506-0.502006760039j))*x_ref[1]**o + ((0.432672006889-0.0775420459315j))*x_ref[1]
        arg[(0, 2, 3, 0)]=(0.372778707824-0.343268146344j)*x[0]**o + ((-0.199569753945+0.412026715526j))*x[0] + ((0.426609224674-0.868490111232j))*x[1]**o + ((0.826299732929+0.651347823751j))*x[1]
        ref[(0, 2, 3, 0)]=(0.372778707824-0.343268146344j)*x_ref[0]**o + ((-0.199569753945+0.412026715526j))*x_ref[0] + ((0.426609224674-0.868490111232j))*x_ref[1]**o + ((0.826299732929+0.651347823751j))*x_ref[1]
        arg[(0, 2, 3, 1)]=(-0.973541721185+0.0627704039352j)*x[0]**o + ((-0.520544149649+0.0118263655649j))*x[0] + ((0.200929923992+0.82087494814j))*x[1]**o + ((-0.720413689076-0.423170687335j))*x[1]
        ref[(0, 2, 3, 1)]=(-0.973541721185+0.0627704039352j)*x_ref[0]**o + ((-0.520544149649+0.0118263655649j))*x_ref[0] + ((0.200929923992+0.82087494814j))*x_ref[1]**o + ((-0.720413689076-0.423170687335j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.525958190753-0.847246400727j)*x[0]**o + ((0.597043404962-0.536402864376j))*x[0] + ((0.44193833572-0.246731310338j))*x[1]**o + ((0.657600918352+0.884827505424j))*x[1]
        ref[(1, 0, 0, 0)]=(0.525958190753-0.847246400727j)*x_ref[0]**o + ((0.597043404962-0.536402864376j))*x_ref[0] + ((0.44193833572-0.246731310338j))*x_ref[1]**o + ((0.657600918352+0.884827505424j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.442301406201+0.572285723194j)*x[0]**o + ((-0.62217531899-0.896824859285j))*x[0] + ((0.791245476214-0.893312759502j))*x[1]**o + ((0.0310354764587+0.457998256393j))*x[1]
        ref[(1, 0, 0, 1)]=(0.442301406201+0.572285723194j)*x_ref[0]**o + ((-0.62217531899-0.896824859285j))*x_ref[0] + ((0.791245476214-0.893312759502j))*x_ref[1]**o + ((0.0310354764587+0.457998256393j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.39054429038-0.186089428185j)*x[0]**o + ((0.439057244788+0.442936559462j))*x[0] + ((0.176451218555-0.141853046354j))*x[1]**o + ((-0.271514253848-0.920805190163j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.39054429038-0.186089428185j)*x_ref[0]**o + ((0.439057244788+0.442936559462j))*x_ref[0] + ((0.176451218555-0.141853046354j))*x_ref[1]**o + ((-0.271514253848-0.920805190163j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.465611676061-0.250137509927j)*x[0]**o + ((-0.427289230481+0.325117057512j))*x[0] + ((0.05306339104+0.574176091515j))*x[1]**o + ((0.518049857448-0.434998811561j))*x[1]
        ref[(1, 0, 1, 1)]=(0.465611676061-0.250137509927j)*x_ref[0]**o + ((-0.427289230481+0.325117057512j))*x_ref[0] + ((0.05306339104+0.574176091515j))*x_ref[1]**o + ((0.518049857448-0.434998811561j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(0.00733842167095-0.173592638452j)*x[0]**o + ((0.231433768891+0.636167262029j))*x[0] + ((0.79760637692+0.574160740319j))*x[1]**o + ((0.132211834616-0.934003449346j))*x[1]
        ref[(1, 0, 2, 0)]=(0.00733842167095-0.173592638452j)*x_ref[0]**o + ((0.231433768891+0.636167262029j))*x_ref[0] + ((0.79760637692+0.574160740319j))*x_ref[1]**o + ((0.132211834616-0.934003449346j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(-0.613172767334-0.148626193388j)*x[0]**o + ((0.52361460732-0.451835336002j))*x[0] + ((-0.187793309564+0.50919629652j))*x[1]**o + ((0.714108158112-0.32422779373j))*x[1]
        ref[(1, 0, 2, 1)]=(-0.613172767334-0.148626193388j)*x_ref[0]**o + ((0.52361460732-0.451835336002j))*x_ref[0] + ((-0.187793309564+0.50919629652j))*x_ref[1]**o + ((0.714108158112-0.32422779373j))*x_ref[1]
        arg[(1, 0, 3, 0)]=(-0.199308208696+0.282442838378j)*x[0]**o + ((0.219319003729-0.156011962089j))*x[0] + ((-0.894164804106-0.611057359859j))*x[1]**o + ((0.738165936186-0.472396433519j))*x[1]
        ref[(1, 0, 3, 0)]=(-0.199308208696+0.282442838378j)*x_ref[0]**o + ((0.219319003729-0.156011962089j))*x_ref[0] + ((-0.894164804106-0.611057359859j))*x_ref[1]**o + ((0.738165936186-0.472396433519j))*x_ref[1]
        arg[(1, 0, 3, 1)]=(0.0763311445176+0.155654619117j)*x[0]**o + ((-0.820866505655-0.773360186464j))*x[0] + ((0.979882666682+0.234160164467j))*x[1]**o + ((-0.780535510174-0.148649989196j))*x[1]
        ref[(1, 0, 3, 1)]=(0.0763311445176+0.155654619117j)*x_ref[0]**o + ((-0.820866505655-0.773360186464j))*x_ref[0] + ((0.979882666682+0.234160164467j))*x_ref[1]**o + ((-0.780535510174-0.148649989196j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.357972835469+0.0354650241516j)*x[0]**o + ((0.165833148732+0.141454274208j))*x[0] + ((-0.354680198256+0.954971637247j))*x[1]**o + ((0.715529917339+0.419987482794j))*x[1]
        ref[(1, 1, 0, 0)]=(0.357972835469+0.0354650241516j)*x_ref[0]**o + ((0.165833148732+0.141454274208j))*x_ref[0] + ((-0.354680198256+0.954971637247j))*x_ref[1]**o + ((0.715529917339+0.419987482794j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.954137879094-0.362573517219j)*x[0]**o + ((-0.701238098324+0.873825337679j))*x[0] + ((-0.503741185359-0.597659789651j))*x[1]**o + ((-0.0348100716196+0.0375386134666j))*x[1]
        ref[(1, 1, 0, 1)]=(0.954137879094-0.362573517219j)*x_ref[0]**o + ((-0.701238098324+0.873825337679j))*x_ref[0] + ((-0.503741185359-0.597659789651j))*x_ref[1]**o + ((-0.0348100716196+0.0375386134666j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.334635423208+0.155691915381j)*x[0]**o + ((-0.692320793719+0.755037580934j))*x[0] + ((-0.236659221754+0.803674582734j))*x[1]**o + ((0.471464288287+0.435583485501j))*x[1]
        ref[(1, 1, 1, 0)]=(0.334635423208+0.155691915381j)*x_ref[0]**o + ((-0.692320793719+0.755037580934j))*x_ref[0] + ((-0.236659221754+0.803674582734j))*x_ref[1]**o + ((0.471464288287+0.435583485501j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.344431210508+0.941998270782j)*x[0]**o + ((-0.730566754636+0.84468352311j))*x[0] + ((0.687577670972-0.074839030391j))*x[1]**o + ((-0.944622162449-0.491055880027j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.344431210508+0.941998270782j)*x_ref[0]**o + ((-0.730566754636+0.84468352311j))*x_ref[0] + ((0.687577670972-0.074839030391j))*x_ref[1]**o + ((-0.944622162449-0.491055880027j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(-0.505096829158-0.636891931613j)*x[0]**o + ((0.154259409629+0.615428129755j))*x[0] + ((0.576389238789+0.10964101267j))*x[1]**o + ((0.353698342923+0.711336949377j))*x[1]
        ref[(1, 1, 2, 0)]=(-0.505096829158-0.636891931613j)*x_ref[0]**o + ((0.154259409629+0.615428129755j))*x_ref[0] + ((0.576389238789+0.10964101267j))*x_ref[1]**o + ((0.353698342923+0.711336949377j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(-0.956849346026-0.788231689431j)*x[0]**o + ((0.263653280731-0.279382440465j))*x[0] + ((-0.573264186774-0.856767926201j))*x[1]**o + ((-0.530518449627+0.820241637556j))*x[1]
        ref[(1, 1, 2, 1)]=(-0.956849346026-0.788231689431j)*x_ref[0]**o + ((0.263653280731-0.279382440465j))*x_ref[0] + ((-0.573264186774-0.856767926201j))*x_ref[1]**o + ((-0.530518449627+0.820241637556j))*x_ref[1]
        arg[(1, 1, 3, 0)]=(0.199170546226-0.70470849452j)*x[0]**o + ((-0.315991846092-0.185852065205j))*x[0] + ((-0.39180038773-0.543547743721j))*x[1]**o + ((0.0800806684154+0.0780967159141j))*x[1]
        ref[(1, 1, 3, 0)]=(0.199170546226-0.70470849452j)*x_ref[0]**o + ((-0.315991846092-0.185852065205j))*x_ref[0] + ((-0.39180038773-0.543547743721j))*x_ref[1]**o + ((0.0800806684154+0.0780967159141j))*x_ref[1]
        arg[(1, 1, 3, 1)]=(0.849024521815+0.626074712747j)*x[0]**o + ((-0.400826435455+0.72953076645j))*x[0] + ((-0.368888606659-0.655145439106j))*x[1]**o + ((0.745951351002-0.834613882834j))*x[1]
        ref[(1, 1, 3, 1)]=(0.849024521815+0.626074712747j)*x_ref[0]**o + ((-0.400826435455+0.72953076645j))*x_ref[0] + ((-0.368888606659-0.655145439106j))*x_ref[1]**o + ((0.745951351002-0.834613882834j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(-0.994146922749+0.184434732991j)*x[0]**o + ((0.597667860537+0.521702390816j))*x[0] + ((0.976244142329+0.722027096325j))*x[1]**o + ((-0.276895535517+0.427046104066j))*x[1]
        ref[(1, 2, 0, 0)]=(-0.994146922749+0.184434732991j)*x_ref[0]**o + ((0.597667860537+0.521702390816j))*x_ref[0] + ((0.976244142329+0.722027096325j))*x_ref[1]**o + ((-0.276895535517+0.427046104066j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.968382050248+0.949884342748j)*x[0]**o + ((0.0998973537416-0.837747598563j))*x[0] + ((0.0713359697901+0.562723114977j))*x[1]**o + ((-0.647289166115+0.419854937672j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.968382050248+0.949884342748j)*x_ref[0]**o + ((0.0998973537416-0.837747598563j))*x_ref[0] + ((0.0713359697901+0.562723114977j))*x_ref[1]**o + ((-0.647289166115+0.419854937672j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(0.975574141493+0.839883232708j)*x[0]**o + ((0.82220102841+0.81689884088j))*x[0] + ((0.820840511419+0.101954529844j))*x[1]**o + ((-0.893875050603-0.493733999542j))*x[1]
        ref[(1, 2, 1, 0)]=(0.975574141493+0.839883232708j)*x_ref[0]**o + ((0.82220102841+0.81689884088j))*x_ref[0] + ((0.820840511419+0.101954529844j))*x_ref[1]**o + ((-0.893875050603-0.493733999542j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(-0.970403979217-0.937507696439j)*x[0]**o + ((0.596896413936-0.794272093328j))*x[0] + ((-0.774354637826-0.441650442965j))*x[1]**o + ((-0.473623623285+0.278883478304j))*x[1]
        ref[(1, 2, 1, 1)]=(-0.970403979217-0.937507696439j)*x_ref[0]**o + ((0.596896413936-0.794272093328j))*x_ref[0] + ((-0.774354637826-0.441650442965j))*x_ref[1]**o + ((-0.473623623285+0.278883478304j))*x_ref[1]
        arg[(1, 2, 2, 0)]=(-0.593413290835+0.704184734834j)*x[0]**o + ((-0.207181545943-0.93187102772j))*x[0] + ((-0.864261571916-0.759058836111j))*x[1]**o + ((-0.782825887597+0.960741965767j))*x[1]
        ref[(1, 2, 2, 0)]=(-0.593413290835+0.704184734834j)*x_ref[0]**o + ((-0.207181545943-0.93187102772j))*x_ref[0] + ((-0.864261571916-0.759058836111j))*x_ref[1]**o + ((-0.782825887597+0.960741965767j))*x_ref[1]
        arg[(1, 2, 2, 1)]=(-0.275502124603+0.600468947774j)*x[0]**o + ((0.54310606908-0.832230016977j))*x[0] + ((-0.623621477853+0.381191412936j))*x[1]**o + ((-0.50863196992+0.0683980166776j))*x[1]
        ref[(1, 2, 2, 1)]=(-0.275502124603+0.600468947774j)*x_ref[0]**o + ((0.54310606908-0.832230016977j))*x_ref[0] + ((-0.623621477853+0.381191412936j))*x_ref[1]**o + ((-0.50863196992+0.0683980166776j))*x_ref[1]
        arg[(1, 2, 3, 0)]=(-0.347836801742+0.935888686636j)*x[0]**o + ((-0.0372564475431-0.885502421528j))*x[0] + ((0.456847507344-0.345980587701j))*x[1]**o + ((0.974023703496-0.627065855473j))*x[1]
        ref[(1, 2, 3, 0)]=(-0.347836801742+0.935888686636j)*x_ref[0]**o + ((-0.0372564475431-0.885502421528j))*x_ref[0] + ((0.456847507344-0.345980587701j))*x_ref[1]**o + ((0.974023703496-0.627065855473j))*x_ref[1]
        arg[(1, 2, 3, 1)]=(-0.0831810928935+0.0454538578023j)*x[0]**o + ((0.408752865791+0.113462112557j))*x[0] + ((0.989237376223+0.341376488866j))*x[1]**o + ((-0.115959999331-0.509359220463j))*x[1]
        ref[(1, 2, 3, 1)]=(-0.0831810928935+0.0454538578023j)*x_ref[0]**o + ((0.408752865791+0.113462112557j))*x_ref[0] + ((0.989237376223+0.341376488866j))*x_ref[1]**o + ((-0.115959999331-0.509359220463j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(0.453747456575+0.488369501765j)*x[0]**o + ((-0.561802930614-0.73365146233j))*x[0] + ((-0.426526745648+0.0750570187214j))*x[1]**o + ((-0.410411033798-0.498656081878j))*x[1]
        ref[(2, 0, 0, 0)]=(0.453747456575+0.488369501765j)*x_ref[0]**o + ((-0.561802930614-0.73365146233j))*x_ref[0] + ((-0.426526745648+0.0750570187214j))*x_ref[1]**o + ((-0.410411033798-0.498656081878j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(-0.301670176177-0.433852696436j)*x[0]**o + ((0.962371405458-0.00277567179045j))*x[0] + ((0.496304535972+0.545421748178j))*x[1]**o + ((-0.818492570709-0.316722143975j))*x[1]
        ref[(2, 0, 0, 1)]=(-0.301670176177-0.433852696436j)*x_ref[0]**o + ((0.962371405458-0.00277567179045j))*x_ref[0] + ((0.496304535972+0.545421748178j))*x_ref[1]**o + ((-0.818492570709-0.316722143975j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(0.571061564971+0.957109958497j)*x[0]**o + ((-0.396918066948+0.346024666533j))*x[0] + ((0.0673585923817+0.707533529128j))*x[1]**o + ((-0.716431455071-0.142236981985j))*x[1]
        ref[(2, 0, 1, 0)]=(0.571061564971+0.957109958497j)*x_ref[0]**o + ((-0.396918066948+0.346024666533j))*x_ref[0] + ((0.0673585923817+0.707533529128j))*x_ref[1]**o + ((-0.716431455071-0.142236981985j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(-0.310834036516+0.945153525831j)*x[0]**o + ((0.174170375926+0.145153446411j))*x[0] + ((0.989666479313+0.0514580804747j))*x[1]**o + ((-0.398131050987-0.218139427324j))*x[1]
        ref[(2, 0, 1, 1)]=(-0.310834036516+0.945153525831j)*x_ref[0]**o + ((0.174170375926+0.145153446411j))*x_ref[0] + ((0.989666479313+0.0514580804747j))*x_ref[1]**o + ((-0.398131050987-0.218139427324j))*x_ref[1]
        arg[(2, 0, 2, 0)]=(0.781341665764+0.336447620477j)*x[0]**o + ((-0.377359367308+0.580083780454j))*x[0] + ((0.0248754947086-0.483079164987j))*x[1]**o + ((-0.945800555139-0.170153875453j))*x[1]
        ref[(2, 0, 2, 0)]=(0.781341665764+0.336447620477j)*x_ref[0]**o + ((-0.377359367308+0.580083780454j))*x_ref[0] + ((0.0248754947086-0.483079164987j))*x_ref[1]**o + ((-0.945800555139-0.170153875453j))*x_ref[1]
        arg[(2, 0, 2, 1)]=(0.768567133831-0.814375121928j)*x[0]**o + ((-0.588922210582+0.489512479366j))*x[0] + ((0.600024671948-0.713999106039j))*x[1]**o + ((0.974894292926+0.845994056554j))*x[1]
        ref[(2, 0, 2, 1)]=(0.768567133831-0.814375121928j)*x_ref[0]**o + ((-0.588922210582+0.489512479366j))*x_ref[0] + ((0.600024671948-0.713999106039j))*x_ref[1]**o + ((0.974894292926+0.845994056554j))*x_ref[1]
        arg[(2, 0, 3, 0)]=(0.666290351712+0.687081533253j)*x[0]**o + ((0.495260805833+0.12636359055j))*x[0] + ((0.374253203669+0.657265059087j))*x[1]**o + ((0.56273098466-0.646427364409j))*x[1]
        ref[(2, 0, 3, 0)]=(0.666290351712+0.687081533253j)*x_ref[0]**o + ((0.495260805833+0.12636359055j))*x_ref[0] + ((0.374253203669+0.657265059087j))*x_ref[1]**o + ((0.56273098466-0.646427364409j))*x_ref[1]
        arg[(2, 0, 3, 1)]=(-0.451155320886+0.272256785781j)*x[0]**o + ((0.419594096999-0.452561867619j))*x[0] + ((0.0452105778753+0.00671398933924j))*x[1]**o + ((-0.943868446369-0.72009729792j))*x[1]
        ref[(2, 0, 3, 1)]=(-0.451155320886+0.272256785781j)*x_ref[0]**o + ((0.419594096999-0.452561867619j))*x_ref[0] + ((0.0452105778753+0.00671398933924j))*x_ref[1]**o + ((-0.943868446369-0.72009729792j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(0.215142714494+0.476692565064j)*x[0]**o + ((0.97937063044-0.231729411267j))*x[0] + ((-0.96467371791+0.912629004003j))*x[1]**o + ((-0.990501001672+0.239932254656j))*x[1]
        ref[(2, 1, 0, 0)]=(0.215142714494+0.476692565064j)*x_ref[0]**o + ((0.97937063044-0.231729411267j))*x_ref[0] + ((-0.96467371791+0.912629004003j))*x_ref[1]**o + ((-0.990501001672+0.239932254656j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.0682593959508-0.0234097170654j)*x[0]**o + ((-0.0705418100022+0.921253511696j))*x[0] + ((0.746612994691+0.268901419411j))*x[1]**o + ((-0.234238631401-0.892883798169j))*x[1]
        ref[(2, 1, 0, 1)]=(0.0682593959508-0.0234097170654j)*x_ref[0]**o + ((-0.0705418100022+0.921253511696j))*x_ref[0] + ((0.746612994691+0.268901419411j))*x_ref[1]**o + ((-0.234238631401-0.892883798169j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(0.80281682488-0.2783413611j)*x[0]**o + ((0.724192847185+0.63937906935j))*x[0] + ((-0.893682594571-0.463249093039j))*x[1]**o + ((-0.461501072906+0.30199550783j))*x[1]
        ref[(2, 1, 1, 0)]=(0.80281682488-0.2783413611j)*x_ref[0]**o + ((0.724192847185+0.63937906935j))*x_ref[0] + ((-0.893682594571-0.463249093039j))*x_ref[1]**o + ((-0.461501072906+0.30199550783j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(0.523352303037+0.359314950904j)*x[0]**o + ((-0.109992756246+0.632719750702j))*x[0] + ((-0.369456932168-0.374531765206j))*x[1]**o + ((0.059511108485+0.731042741206j))*x[1]
        ref[(2, 1, 1, 1)]=(0.523352303037+0.359314950904j)*x_ref[0]**o + ((-0.109992756246+0.632719750702j))*x_ref[0] + ((-0.369456932168-0.374531765206j))*x_ref[1]**o + ((0.059511108485+0.731042741206j))*x_ref[1]
        arg[(2, 1, 2, 0)]=(-0.424050714813+0.291670569248j)*x[0]**o + ((-0.0242453627047-0.300487659017j))*x[0] + ((0.796750812242-0.64910976844j))*x[1]**o + ((0.286127297301-0.491479365402j))*x[1]
        ref[(2, 1, 2, 0)]=(-0.424050714813+0.291670569248j)*x_ref[0]**o + ((-0.0242453627047-0.300487659017j))*x_ref[0] + ((0.796750812242-0.64910976844j))*x_ref[1]**o + ((0.286127297301-0.491479365402j))*x_ref[1]
        arg[(2, 1, 2, 1)]=(-0.991038501883+0.0488849213801j)*x[0]**o + ((0.969903382704-0.7785773473j))*x[0] + ((-0.798744314975+0.259280689301j))*x[1]**o + ((0.0864732212394+0.859999379204j))*x[1]
        ref[(2, 1, 2, 1)]=(-0.991038501883+0.0488849213801j)*x_ref[0]**o + ((0.969903382704-0.7785773473j))*x_ref[0] + ((-0.798744314975+0.259280689301j))*x_ref[1]**o + ((0.0864732212394+0.859999379204j))*x_ref[1]
        arg[(2, 1, 3, 0)]=(-0.217092859548-0.418182021847j)*x[0]**o + ((-0.718515266749+0.157022331318j))*x[0] + ((0.0799784282891-0.546949856638j))*x[1]**o + ((-0.733373167753-0.901740290989j))*x[1]
        ref[(2, 1, 3, 0)]=(-0.217092859548-0.418182021847j)*x_ref[0]**o + ((-0.718515266749+0.157022331318j))*x_ref[0] + ((0.0799784282891-0.546949856638j))*x_ref[1]**o + ((-0.733373167753-0.901740290989j))*x_ref[1]
        arg[(2, 1, 3, 1)]=(0.204767264923+0.544860352131j)*x[0]**o + ((-0.804177656531-0.617665296525j))*x[0] + ((0.0652620180119+0.673611970287j))*x[1]**o + ((0.336807946862-0.432824459538j))*x[1]
        ref[(2, 1, 3, 1)]=(0.204767264923+0.544860352131j)*x_ref[0]**o + ((-0.804177656531-0.617665296525j))*x_ref[0] + ((0.0652620180119+0.673611970287j))*x_ref[1]**o + ((0.336807946862-0.432824459538j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(-0.758006580109-0.496245829401j)*x[0]**o + ((0.845395990168+0.203142891983j))*x[0] + ((0.873376451956+0.762732902454j))*x[1]**o + ((-0.287008078231+0.978195121759j))*x[1]
        ref[(2, 2, 0, 0)]=(-0.758006580109-0.496245829401j)*x_ref[0]**o + ((0.845395990168+0.203142891983j))*x_ref[0] + ((0.873376451956+0.762732902454j))*x_ref[1]**o + ((-0.287008078231+0.978195121759j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(-0.915111385272-0.700411458792j)*x[0]**o + ((0.21495207418+0.9480278085j))*x[0] + ((0.00536490227546+0.233721638694j))*x[1]**o + ((0.64608599743+0.327932317685j))*x[1]
        ref[(2, 2, 0, 1)]=(-0.915111385272-0.700411458792j)*x_ref[0]**o + ((0.21495207418+0.9480278085j))*x_ref[0] + ((0.00536490227546+0.233721638694j))*x_ref[1]**o + ((0.64608599743+0.327932317685j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(0.0608087026109-0.632055489254j)*x[0]**o + ((-0.345814854944+0.909210261625j))*x[0] + ((0.237896021301-0.225971334708j))*x[1]**o + ((0.901053543954-0.401632098334j))*x[1]
        ref[(2, 2, 1, 0)]=(0.0608087026109-0.632055489254j)*x_ref[0]**o + ((-0.345814854944+0.909210261625j))*x_ref[0] + ((0.237896021301-0.225971334708j))*x_ref[1]**o + ((0.901053543954-0.401632098334j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(-0.602488716689-0.769780115453j)*x[0]**o + ((0.990182585354+0.237663577812j))*x[0] + ((-0.0955740197606-0.58497968523j))*x[1]**o + ((0.614570443657+0.676189145997j))*x[1]
        ref[(2, 2, 1, 1)]=(-0.602488716689-0.769780115453j)*x_ref[0]**o + ((0.990182585354+0.237663577812j))*x_ref[0] + ((-0.0955740197606-0.58497968523j))*x_ref[1]**o + ((0.614570443657+0.676189145997j))*x_ref[1]
        arg[(2, 2, 2, 0)]=(0.77157236042-0.0905717987229j)*x[0]**o + ((0.0249818023642-0.175804958357j))*x[0] + ((-0.900075139304-0.814137414995j))*x[1]**o + ((0.598282066511-0.920951484648j))*x[1]
        ref[(2, 2, 2, 0)]=(0.77157236042-0.0905717987229j)*x_ref[0]**o + ((0.0249818023642-0.175804958357j))*x_ref[0] + ((-0.900075139304-0.814137414995j))*x_ref[1]**o + ((0.598282066511-0.920951484648j))*x_ref[1]
        arg[(2, 2, 2, 1)]=(0.13619428649+0.508898801369j)*x[0]**o + ((-0.172876127279+0.00639435803819j))*x[0] + ((-0.32293890825-0.564910800764j))*x[1]**o + ((-0.999215835192+0.711923906496j))*x[1]
        ref[(2, 2, 2, 1)]=(0.13619428649+0.508898801369j)*x_ref[0]**o + ((-0.172876127279+0.00639435803819j))*x_ref[0] + ((-0.32293890825-0.564910800764j))*x_ref[1]**o + ((-0.999215835192+0.711923906496j))*x_ref[1]
        arg[(2, 2, 3, 0)]=(-0.89473972806-0.67321699415j)*x[0]**o + ((-0.468054518769+0.430491826403j))*x[0] + ((0.461587045031-0.36456213109j))*x[1]**o + ((0.715905007197-0.340178484305j))*x[1]
        ref[(2, 2, 3, 0)]=(-0.89473972806-0.67321699415j)*x_ref[0]**o + ((-0.468054518769+0.430491826403j))*x_ref[0] + ((0.461587045031-0.36456213109j))*x_ref[1]**o + ((0.715905007197-0.340178484305j))*x_ref[1]
        arg[(2, 2, 3, 1)]=(0.724905540215+0.851355516056j)*x[0]**o + ((0.581211363328-0.512663714688j))*x[0] + ((-0.0425164480093-0.365910611765j))*x[1]**o + ((0.0471504399045+0.030293269042j))*x[1]
        ref[(2, 2, 3, 1)]=(0.724905540215+0.851355516056j)*x_ref[0]**o + ((0.581211363328-0.512663714688j))*x_ref[0] + ((-0.0425164480093-0.365910611765j))*x_ref[1]**o + ((0.0471504399045+0.030293269042j))*x_ref[1]
        arg[(3, 0, 0, 0)]=(0.641051366901+0.0515897479095j)*x[0]**o + ((-0.225064027487+0.765628643953j))*x[0] + ((0.819150020775-0.832862328892j))*x[1]**o + ((0.12289763122-0.464445876354j))*x[1]
        ref[(3, 0, 0, 0)]=(0.641051366901+0.0515897479095j)*x_ref[0]**o + ((-0.225064027487+0.765628643953j))*x_ref[0] + ((0.819150020775-0.832862328892j))*x_ref[1]**o + ((0.12289763122-0.464445876354j))*x_ref[1]
        arg[(3, 0, 0, 1)]=(-0.907162024316-0.774530909347j)*x[0]**o + ((-0.869174649622-0.681900264126j))*x[0] + ((-0.130150671782+0.172671965637j))*x[1]**o + ((-0.859976142263-0.883683824459j))*x[1]
        ref[(3, 0, 0, 1)]=(-0.907162024316-0.774530909347j)*x_ref[0]**o + ((-0.869174649622-0.681900264126j))*x_ref[0] + ((-0.130150671782+0.172671965637j))*x_ref[1]**o + ((-0.859976142263-0.883683824459j))*x_ref[1]
        arg[(3, 0, 1, 0)]=(0.266512683658+0.379992455791j)*x[0]**o + ((-0.922108469687+0.562651002241j))*x[0] + ((0.638033849901+0.59515015797j))*x[1]**o + ((0.946111743576+0.682937504615j))*x[1]
        ref[(3, 0, 1, 0)]=(0.266512683658+0.379992455791j)*x_ref[0]**o + ((-0.922108469687+0.562651002241j))*x_ref[0] + ((0.638033849901+0.59515015797j))*x_ref[1]**o + ((0.946111743576+0.682937504615j))*x_ref[1]
        arg[(3, 0, 1, 1)]=(-0.940092071724+0.730139911018j)*x[0]**o + ((-0.361491457161-0.783937228551j))*x[0] + ((0.87858656067-0.2067069143j))*x[1]**o + ((0.361130666395-0.371621735303j))*x[1]
        ref[(3, 0, 1, 1)]=(-0.940092071724+0.730139911018j)*x_ref[0]**o + ((-0.361491457161-0.783937228551j))*x_ref[0] + ((0.87858656067-0.2067069143j))*x_ref[1]**o + ((0.361130666395-0.371621735303j))*x_ref[1]
        arg[(3, 0, 2, 0)]=(-0.0335488781055+0.412435191403j)*x[0]**o + ((-0.62840706777-0.669702016536j))*x[0] + ((0.414633345727+0.571070552011j))*x[1]**o + ((-0.14416623211+0.193402650396j))*x[1]
        ref[(3, 0, 2, 0)]=(-0.0335488781055+0.412435191403j)*x_ref[0]**o + ((-0.62840706777-0.669702016536j))*x_ref[0] + ((0.414633345727+0.571070552011j))*x_ref[1]**o + ((-0.14416623211+0.193402650396j))*x_ref[1]
        arg[(3, 0, 2, 1)]=(0.443749084561-0.14469175035j)*x[0]**o + ((0.32994754103-0.326353395335j))*x[0] + ((-0.536289282949-0.168605490323j))*x[1]**o + ((-0.568164297615+0.473925204993j))*x[1]
        ref[(3, 0, 2, 1)]=(0.443749084561-0.14469175035j)*x_ref[0]**o + ((0.32994754103-0.326353395335j))*x_ref[0] + ((-0.536289282949-0.168605490323j))*x_ref[1]**o + ((-0.568164297615+0.473925204993j))*x_ref[1]
        arg[(3, 0, 3, 0)]=(0.3809221492+0.545167757843j)*x[0]**o + ((0.444409910525+0.737720661163j))*x[0] + ((-0.744255659189-0.515563933042j))*x[1]**o + ((0.0963560120575+0.285350703719j))*x[1]
        ref[(3, 0, 3, 0)]=(0.3809221492+0.545167757843j)*x_ref[0]**o + ((0.444409910525+0.737720661163j))*x_ref[0] + ((-0.744255659189-0.515563933042j))*x_ref[1]**o + ((0.0963560120575+0.285350703719j))*x_ref[1]
        arg[(3, 0, 3, 1)]=(0.85225581986+0.16261611211j)*x[0]**o + ((0.434116759916+0.567449024972j))*x[0] + ((-0.442122064114-0.390584606767j))*x[1]**o + ((-0.829722313948+0.639142109243j))*x[1]
        ref[(3, 0, 3, 1)]=(0.85225581986+0.16261611211j)*x_ref[0]**o + ((0.434116759916+0.567449024972j))*x_ref[0] + ((-0.442122064114-0.390584606767j))*x_ref[1]**o + ((-0.829722313948+0.639142109243j))*x_ref[1]
        arg[(3, 1, 0, 0)]=(0.0943041157891+0.837431297904j)*x[0]**o + ((0.646503137132-0.133509855609j))*x[0] + ((-0.498527541448+0.231104236922j))*x[1]**o + ((-0.448770173229+0.330933184465j))*x[1]
        ref[(3, 1, 0, 0)]=(0.0943041157891+0.837431297904j)*x_ref[0]**o + ((0.646503137132-0.133509855609j))*x_ref[0] + ((-0.498527541448+0.231104236922j))*x_ref[1]**o + ((-0.448770173229+0.330933184465j))*x_ref[1]
        arg[(3, 1, 0, 1)]=(0.495585294829+0.686281865919j)*x[0]**o + ((-0.536024464999-0.330325831229j))*x[0] + ((-0.309557143358+0.2302072951j))*x[1]**o + ((0.238626700459-0.530885186333j))*x[1]
        ref[(3, 1, 0, 1)]=(0.495585294829+0.686281865919j)*x_ref[0]**o + ((-0.536024464999-0.330325831229j))*x_ref[0] + ((-0.309557143358+0.2302072951j))*x_ref[1]**o + ((0.238626700459-0.530885186333j))*x_ref[1]
        arg[(3, 1, 1, 0)]=(0.496231383089-0.277300815797j)*x[0]**o + ((0.943192168392+0.98801824354j))*x[0] + ((-0.755296765989+0.340000388214j))*x[1]**o + ((-0.780549116942-0.604052795229j))*x[1]
        ref[(3, 1, 1, 0)]=(0.496231383089-0.277300815797j)*x_ref[0]**o + ((0.943192168392+0.98801824354j))*x_ref[0] + ((-0.755296765989+0.340000388214j))*x_ref[1]**o + ((-0.780549116942-0.604052795229j))*x_ref[1]
        arg[(3, 1, 1, 1)]=(0.521330472125+0.948571738125j)*x[0]**o + ((0.201444693312-0.923661046742j))*x[0] + ((-0.373007193166+0.0707889801408j))*x[1]**o + ((-0.143850591739-0.832591290867j))*x[1]
        ref[(3, 1, 1, 1)]=(0.521330472125+0.948571738125j)*x_ref[0]**o + ((0.201444693312-0.923661046742j))*x_ref[0] + ((-0.373007193166+0.0707889801408j))*x_ref[1]**o + ((-0.143850591739-0.832591290867j))*x_ref[1]
        arg[(3, 1, 2, 0)]=(0.535273795608+0.716901748302j)*x[0]**o + ((-0.906233536713+0.0817470076078j))*x[0] + ((-0.52750399371-0.859857830472j))*x[1]**o + ((0.00899346343056+0.0397753019148j))*x[1]
        ref[(3, 1, 2, 0)]=(0.535273795608+0.716901748302j)*x_ref[0]**o + ((-0.906233536713+0.0817470076078j))*x_ref[0] + ((-0.52750399371-0.859857830472j))*x_ref[1]**o + ((0.00899346343056+0.0397753019148j))*x_ref[1]
        arg[(3, 1, 2, 1)]=(-0.153530786702+0.74520717532j)*x[0]**o + ((-0.47160378297-0.697713455986j))*x[0] + ((-0.985254312083+0.438691498284j))*x[1]**o + ((0.478434959764+0.804684421264j))*x[1]
        ref[(3, 1, 2, 1)]=(-0.153530786702+0.74520717532j)*x_ref[0]**o + ((-0.47160378297-0.697713455986j))*x_ref[0] + ((-0.985254312083+0.438691498284j))*x_ref[1]**o + ((0.478434959764+0.804684421264j))*x_ref[1]
        arg[(3, 1, 3, 0)]=(-0.564549353412-0.917498134234j)*x[0]**o + ((0.597679626159-0.0035149885684j))*x[0] + ((-0.458908239157-0.146424901671j))*x[1]**o + ((0.955231255267+0.867887521497j))*x[1]
        ref[(3, 1, 3, 0)]=(-0.564549353412-0.917498134234j)*x_ref[0]**o + ((0.597679626159-0.0035149885684j))*x_ref[0] + ((-0.458908239157-0.146424901671j))*x_ref[1]**o + ((0.955231255267+0.867887521497j))*x_ref[1]
        arg[(3, 1, 3, 1)]=(0.114935372927-0.795887640589j)*x[0]**o + ((-0.0800654736489+0.940433678987j))*x[0] + ((0.367615021026+0.998202299415j))*x[1]**o + ((-0.0705438775198-0.143178050498j))*x[1]
        ref[(3, 1, 3, 1)]=(0.114935372927-0.795887640589j)*x_ref[0]**o + ((-0.0800654736489+0.940433678987j))*x_ref[0] + ((0.367615021026+0.998202299415j))*x_ref[1]**o + ((-0.0705438775198-0.143178050498j))*x_ref[1]
        arg[(3, 2, 0, 0)]=(-0.821946259282+0.20014305211j)*x[0]**o + ((-0.975311313363-0.467068374411j))*x[0] + ((0.320552678992-0.165089290177j))*x[1]**o + ((0.134522184556+0.732265937071j))*x[1]
        ref[(3, 2, 0, 0)]=(-0.821946259282+0.20014305211j)*x_ref[0]**o + ((-0.975311313363-0.467068374411j))*x_ref[0] + ((0.320552678992-0.165089290177j))*x_ref[1]**o + ((0.134522184556+0.732265937071j))*x_ref[1]
        arg[(3, 2, 0, 1)]=(0.735002383342+0.592740980483j)*x[0]**o + ((0.164054946619-0.0484588561467j))*x[0] + ((0.642553692806+0.104227309723j))*x[1]**o + ((-0.649949873515-0.967796428418j))*x[1]
        ref[(3, 2, 0, 1)]=(0.735002383342+0.592740980483j)*x_ref[0]**o + ((0.164054946619-0.0484588561467j))*x_ref[0] + ((0.642553692806+0.104227309723j))*x_ref[1]**o + ((-0.649949873515-0.967796428418j))*x_ref[1]
        arg[(3, 2, 1, 0)]=(0.778224091045+0.634225026582j)*x[0]**o + ((0.234440366647-0.891345194591j))*x[0] + ((0.404589357761-0.424480768626j))*x[1]**o + ((0.569684924756+0.309613739372j))*x[1]
        ref[(3, 2, 1, 0)]=(0.778224091045+0.634225026582j)*x_ref[0]**o + ((0.234440366647-0.891345194591j))*x_ref[0] + ((0.404589357761-0.424480768626j))*x_ref[1]**o + ((0.569684924756+0.309613739372j))*x_ref[1]
        arg[(3, 2, 1, 1)]=(0.336435385957-0.356596601262j)*x[0]**o + ((0.752618471041+0.0940750518898j))*x[0] + ((0.884812712005+0.317172681778j))*x[1]**o + ((0.729340019533-0.794377705309j))*x[1]
        ref[(3, 2, 1, 1)]=(0.336435385957-0.356596601262j)*x_ref[0]**o + ((0.752618471041+0.0940750518898j))*x_ref[0] + ((0.884812712005+0.317172681778j))*x_ref[1]**o + ((0.729340019533-0.794377705309j))*x_ref[1]
        arg[(3, 2, 2, 0)]=(-0.401718457622+0.810877551039j)*x[0]**o + ((-0.0905449836774-0.906210402026j))*x[0] + ((0.513131070374+0.896251618385j))*x[1]**o + ((-0.997142302062-0.169528518103j))*x[1]
        ref[(3, 2, 2, 0)]=(-0.401718457622+0.810877551039j)*x_ref[0]**o + ((-0.0905449836774-0.906210402026j))*x_ref[0] + ((0.513131070374+0.896251618385j))*x_ref[1]**o + ((-0.997142302062-0.169528518103j))*x_ref[1]
        arg[(3, 2, 2, 1)]=(0.810310105976+0.769501734805j)*x[0]**o + ((-0.585019186948-0.78879880804j))*x[0] + ((-0.288632150957-0.386467038018j))*x[1]**o + ((-0.930873024493-0.241091988368j))*x[1]
        ref[(3, 2, 2, 1)]=(0.810310105976+0.769501734805j)*x_ref[0]**o + ((-0.585019186948-0.78879880804j))*x_ref[0] + ((-0.288632150957-0.386467038018j))*x_ref[1]**o + ((-0.930873024493-0.241091988368j))*x_ref[1]
        arg[(3, 2, 3, 0)]=(0.912346460508-0.442698148397j)*x[0]**o + ((0.718763416949+0.199684325594j))*x[0] + ((-0.531730665732-0.895991506013j))*x[1]**o + ((0.799107256242+0.506788362626j))*x[1]
        ref[(3, 2, 3, 0)]=(0.912346460508-0.442698148397j)*x_ref[0]**o + ((0.718763416949+0.199684325594j))*x_ref[0] + ((-0.531730665732-0.895991506013j))*x_ref[1]**o + ((0.799107256242+0.506788362626j))*x_ref[1]
        arg[(3, 2, 3, 1)]=(-0.372160831315+0.642209686208j)*x[0]**o + ((-0.388464414275+0.117042963684j))*x[0] + ((0.976799295049-0.882475855592j))*x[1]**o + ((-0.281138395587-0.0491399944191j))*x[1]
        ref[(3, 2, 3, 1)]=(-0.372160831315+0.642209686208j)*x_ref[0]**o + ((-0.388464414275+0.117042963684j))*x_ref[0] + ((0.976799295049-0.882475855592j))*x_ref[1]**o + ((-0.281138395587-0.0491399944191j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.512772949936+0.521498878376j)*x[2]**o + ((0.393136504134+0.642991269746j))*x[2]
            ref[(0, 0, 0, 0)]+=(-0.512772949936+0.521498878376j)*x_ref[2]**o + ((0.393136504134+0.642991269746j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.974228335691+0.799048116771j)*x[2]**o + ((-0.174282895338+0.194080785214j))*x[2]
            ref[(0, 0, 0, 1)]+=(0.974228335691+0.799048116771j)*x_ref[2]**o + ((-0.174282895338+0.194080785214j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.922381726229-0.269679659102j)*x[2]**o + ((0.476000238007-0.965363383574j))*x[2]
            ref[(0, 0, 1, 0)]+=(0.922381726229-0.269679659102j)*x_ref[2]**o + ((0.476000238007-0.965363383574j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.969567437184-0.913237822149j)*x[2]**o + ((-0.0126615720289-0.00169690924979j))*x[2]
            ref[(0, 0, 1, 1)]+=(0.969567437184-0.913237822149j)*x_ref[2]**o + ((-0.0126615720289-0.00169690924979j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(-0.0828081671482+0.548002690871j)*x[2]**o + ((-0.373067147347-0.48578364413j))*x[2]
            ref[(0, 0, 2, 0)]+=(-0.0828081671482+0.548002690871j)*x_ref[2]**o + ((-0.373067147347-0.48578364413j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(-0.597577470791+0.884172042688j)*x[2]**o + ((-0.102223032374-0.893975741973j))*x[2]
            ref[(0, 0, 2, 1)]+=(-0.597577470791+0.884172042688j)*x_ref[2]**o + ((-0.102223032374-0.893975741973j))*x_ref[2]
            arg[(0, 0, 3, 0)]+=(-0.926679931513+0.472940776251j)*x[2]**o + ((0.217517735596-0.616840152j))*x[2]
            ref[(0, 0, 3, 0)]+=(-0.926679931513+0.472940776251j)*x_ref[2]**o + ((0.217517735596-0.616840152j))*x_ref[2]
            arg[(0, 0, 3, 1)]+=(0.153860264446-0.75239667131j)*x[2]**o + ((0.766058121932-0.744695115136j))*x[2]
            ref[(0, 0, 3, 1)]+=(0.153860264446-0.75239667131j)*x_ref[2]**o + ((0.766058121932-0.744695115136j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.20893181213-0.114573961146j)*x[2]**o + ((-0.216170382353-0.846736955689j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.20893181213-0.114573961146j)*x_ref[2]**o + ((-0.216170382353-0.846736955689j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.61473710329+0.654560313702j)*x[2]**o + ((0.317103204042+0.719378748592j))*x[2]
            ref[(0, 1, 0, 1)]+=(0.61473710329+0.654560313702j)*x_ref[2]**o + ((0.317103204042+0.719378748592j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.975099465576-0.544461066424j)*x[2]**o + ((-0.151804684748-0.23866959026j))*x[2]
            ref[(0, 1, 1, 0)]+=(0.975099465576-0.544461066424j)*x_ref[2]**o + ((-0.151804684748-0.23866959026j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.206392757676-0.874809459204j)*x[2]**o + ((0.799030871025-0.54825219518j))*x[2]
            ref[(0, 1, 1, 1)]+=(0.206392757676-0.874809459204j)*x_ref[2]**o + ((0.799030871025-0.54825219518j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(-0.118380285189-0.457858920531j)*x[2]**o + ((0.873611867855+0.876450416413j))*x[2]
            ref[(0, 1, 2, 0)]+=(-0.118380285189-0.457858920531j)*x_ref[2]**o + ((0.873611867855+0.876450416413j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(-0.695315481351+0.353483942685j)*x[2]**o + ((-0.184950155231+0.480623506837j))*x[2]
            ref[(0, 1, 2, 1)]+=(-0.695315481351+0.353483942685j)*x_ref[2]**o + ((-0.184950155231+0.480623506837j))*x_ref[2]
            arg[(0, 1, 3, 0)]+=(0.160823507153-0.763246243044j)*x[2]**o + ((-0.591331569358+0.570533916511j))*x[2]
            ref[(0, 1, 3, 0)]+=(0.160823507153-0.763246243044j)*x_ref[2]**o + ((-0.591331569358+0.570533916511j))*x_ref[2]
            arg[(0, 1, 3, 1)]+=(0.00979927687653-0.60884747182j)*x[2]**o + ((-0.978116394744+0.217160332206j))*x[2]
            ref[(0, 1, 3, 1)]+=(0.00979927687653-0.60884747182j)*x_ref[2]**o + ((-0.978116394744+0.217160332206j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(0.936502064714-0.312761234868j)*x[2]**o + ((-0.551341018302+0.00527116996548j))*x[2]
            ref[(0, 2, 0, 0)]+=(0.936502064714-0.312761234868j)*x_ref[2]**o + ((-0.551341018302+0.00527116996548j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(-0.32933868352-0.782370420229j)*x[2]**o + ((-0.498232259793-0.732082592697j))*x[2]
            ref[(0, 2, 0, 1)]+=(-0.32933868352-0.782370420229j)*x_ref[2]**o + ((-0.498232259793-0.732082592697j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.950190094373-0.722904244259j)*x[2]**o + ((-0.697071985987+0.868194228635j))*x[2]
            ref[(0, 2, 1, 0)]+=(-0.950190094373-0.722904244259j)*x_ref[2]**o + ((-0.697071985987+0.868194228635j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(0.705022363733-0.884213315258j)*x[2]**o + ((-0.417559221525-0.417068273024j))*x[2]
            ref[(0, 2, 1, 1)]+=(0.705022363733-0.884213315258j)*x_ref[2]**o + ((-0.417559221525-0.417068273024j))*x_ref[2]
            arg[(0, 2, 2, 0)]+=(0.313208754472-0.358937856955j)*x[2]**o + ((-0.923596855684-0.819433563813j))*x[2]
            ref[(0, 2, 2, 0)]+=(0.313208754472-0.358937856955j)*x_ref[2]**o + ((-0.923596855684-0.819433563813j))*x_ref[2]
            arg[(0, 2, 2, 1)]+=(0.681741285497+0.16857545805j)*x[2]**o + ((0.682243980874+0.926772391826j))*x[2]
            ref[(0, 2, 2, 1)]+=(0.681741285497+0.16857545805j)*x_ref[2]**o + ((0.682243980874+0.926772391826j))*x_ref[2]
            arg[(0, 2, 3, 0)]+=(-0.374694931911-0.938309809422j)*x[2]**o + ((0.640895111173+0.33234039544j))*x[2]
            ref[(0, 2, 3, 0)]+=(-0.374694931911-0.938309809422j)*x_ref[2]**o + ((0.640895111173+0.33234039544j))*x_ref[2]
            arg[(0, 2, 3, 1)]+=(-0.736360588789+0.285753300111j)*x[2]**o + ((0.785129354668+0.913657724219j))*x[2]
            ref[(0, 2, 3, 1)]+=(-0.736360588789+0.285753300111j)*x_ref[2]**o + ((0.785129354668+0.913657724219j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.42514686536-0.992864037731j)*x[2]**o + ((0.776338925159-0.686979500122j))*x[2]
            ref[(1, 0, 0, 0)]+=(-0.42514686536-0.992864037731j)*x_ref[2]**o + ((0.776338925159-0.686979500122j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.24729468777-0.251048420405j)*x[2]**o + ((0.191740509959-0.79181112438j))*x[2]
            ref[(1, 0, 0, 1)]+=(0.24729468777-0.251048420405j)*x_ref[2]**o + ((0.191740509959-0.79181112438j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.625246750647-0.208969012008j)*x[2]**o + ((0.78755740158-0.589750069553j))*x[2]
            ref[(1, 0, 1, 0)]+=(0.625246750647-0.208969012008j)*x_ref[2]**o + ((0.78755740158-0.589750069553j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.186108158782+0.0686091132548j)*x[2]**o + ((0.978357269239+0.0450307917834j))*x[2]
            ref[(1, 0, 1, 1)]+=(-0.186108158782+0.0686091132548j)*x_ref[2]**o + ((0.978357269239+0.0450307917834j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(-0.44327256909-0.481781757068j)*x[2]**o + ((-0.563951576317+0.354864060187j))*x[2]
            ref[(1, 0, 2, 0)]+=(-0.44327256909-0.481781757068j)*x_ref[2]**o + ((-0.563951576317+0.354864060187j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(-0.582587395728-0.676242792095j)*x[2]**o + ((-0.540778095127-0.967203869319j))*x[2]
            ref[(1, 0, 2, 1)]+=(-0.582587395728-0.676242792095j)*x_ref[2]**o + ((-0.540778095127-0.967203869319j))*x_ref[2]
            arg[(1, 0, 3, 0)]+=(0.252659928211+0.991520335834j)*x[2]**o + ((0.0338116049659-0.422040075519j))*x[2]
            ref[(1, 0, 3, 0)]+=(0.252659928211+0.991520335834j)*x_ref[2]**o + ((0.0338116049659-0.422040075519j))*x_ref[2]
            arg[(1, 0, 3, 1)]+=(0.560927427125-0.559584971986j)*x[2]**o + ((0.174675859112+0.226714460279j))*x[2]
            ref[(1, 0, 3, 1)]+=(0.560927427125-0.559584971986j)*x_ref[2]**o + ((0.174675859112+0.226714460279j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.64938985274+0.164814993211j)*x[2]**o + ((0.4435077986-0.774126270764j))*x[2]
            ref[(1, 1, 0, 0)]+=(-0.64938985274+0.164814993211j)*x_ref[2]**o + ((0.4435077986-0.774126270764j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.754204282633+0.29997545639j)*x[2]**o + ((-0.345836824514+0.841474049454j))*x[2]
            ref[(1, 1, 0, 1)]+=(0.754204282633+0.29997545639j)*x_ref[2]**o + ((-0.345836824514+0.841474049454j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.802095422816+0.0582918665554j)*x[2]**o + ((0.0867838955068+0.392764493018j))*x[2]
            ref[(1, 1, 1, 0)]+=(0.802095422816+0.0582918665554j)*x_ref[2]**o + ((0.0867838955068+0.392764493018j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.335472554459+0.988933724119j)*x[2]**o + ((0.992489716722-0.788772126881j))*x[2]
            ref[(1, 1, 1, 1)]+=(0.335472554459+0.988933724119j)*x_ref[2]**o + ((0.992489716722-0.788772126881j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(0.835460660518+0.835699674597j)*x[2]**o + ((-0.788945250446+0.154851778792j))*x[2]
            ref[(1, 1, 2, 0)]+=(0.835460660518+0.835699674597j)*x_ref[2]**o + ((-0.788945250446+0.154851778792j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(0.332052419734-0.449995813236j)*x[2]**o + ((-0.818677395473+0.150669150733j))*x[2]
            ref[(1, 1, 2, 1)]+=(0.332052419734-0.449995813236j)*x_ref[2]**o + ((-0.818677395473+0.150669150733j))*x_ref[2]
            arg[(1, 1, 3, 0)]+=(0.915581201466-0.536584648032j)*x[2]**o + ((0.0788460064092-0.77787688066j))*x[2]
            ref[(1, 1, 3, 0)]+=(0.915581201466-0.536584648032j)*x_ref[2]**o + ((0.0788460064092-0.77787688066j))*x_ref[2]
            arg[(1, 1, 3, 1)]+=(-0.961956177616+0.620505312642j)*x[2]**o + ((-0.587701000478+0.504852818841j))*x[2]
            ref[(1, 1, 3, 1)]+=(-0.961956177616+0.620505312642j)*x_ref[2]**o + ((-0.587701000478+0.504852818841j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(-0.68689131437+0.512419196087j)*x[2]**o + ((0.439956844336-0.829616353237j))*x[2]
            ref[(1, 2, 0, 0)]+=(-0.68689131437+0.512419196087j)*x_ref[2]**o + ((0.439956844336-0.829616353237j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(-0.547746734498+0.13183754321j)*x[2]**o + ((0.85975472629-0.288459510046j))*x[2]
            ref[(1, 2, 0, 1)]+=(-0.547746734498+0.13183754321j)*x_ref[2]**o + ((0.85975472629-0.288459510046j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(0.830066982439-0.911093926275j)*x[2]**o + ((-0.11714139932+0.936922314626j))*x[2]
            ref[(1, 2, 1, 0)]+=(0.830066982439-0.911093926275j)*x_ref[2]**o + ((-0.11714139932+0.936922314626j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(-0.0999830115504+0.755641918165j)*x[2]**o + ((-0.281246345124-0.461029467779j))*x[2]
            ref[(1, 2, 1, 1)]+=(-0.0999830115504+0.755641918165j)*x_ref[2]**o + ((-0.281246345124-0.461029467779j))*x_ref[2]
            arg[(1, 2, 2, 0)]+=(0.459859472258-0.136392764404j)*x[2]**o + ((-0.927674011811+0.426052814777j))*x[2]
            ref[(1, 2, 2, 0)]+=(0.459859472258-0.136392764404j)*x_ref[2]**o + ((-0.927674011811+0.426052814777j))*x_ref[2]
            arg[(1, 2, 2, 1)]+=(0.959832960504+0.290718644333j)*x[2]**o + ((0.575709668295-0.635156490962j))*x[2]
            ref[(1, 2, 2, 1)]+=(0.959832960504+0.290718644333j)*x_ref[2]**o + ((0.575709668295-0.635156490962j))*x_ref[2]
            arg[(1, 2, 3, 0)]+=(-0.791451200378-0.715032468956j)*x[2]**o + ((0.470475762976-0.894560548585j))*x[2]
            ref[(1, 2, 3, 0)]+=(-0.791451200378-0.715032468956j)*x_ref[2]**o + ((0.470475762976-0.894560548585j))*x_ref[2]
            arg[(1, 2, 3, 1)]+=(0.281025822403+0.809898199925j)*x[2]**o + ((0.904688987253+0.203458402738j))*x[2]
            ref[(1, 2, 3, 1)]+=(0.281025822403+0.809898199925j)*x_ref[2]**o + ((0.904688987253+0.203458402738j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(0.00463956656638-0.0853569041892j)*x[2]**o + ((0.641181067414+0.215278989148j))*x[2]
            ref[(2, 0, 0, 0)]+=(0.00463956656638-0.0853569041892j)*x_ref[2]**o + ((0.641181067414+0.215278989148j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(-0.655525060846+0.679713480864j)*x[2]**o + ((-0.915799867131-0.671231197926j))*x[2]
            ref[(2, 0, 0, 1)]+=(-0.655525060846+0.679713480864j)*x_ref[2]**o + ((-0.915799867131-0.671231197926j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(-0.636435342913-0.920556184828j)*x[2]**o + ((-0.951250702184-0.481888221417j))*x[2]
            ref[(2, 0, 1, 0)]+=(-0.636435342913-0.920556184828j)*x_ref[2]**o + ((-0.951250702184-0.481888221417j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(0.92674643755-0.920773435047j)*x[2]**o + ((0.396952480911-0.920399809281j))*x[2]
            ref[(2, 0, 1, 1)]+=(0.92674643755-0.920773435047j)*x_ref[2]**o + ((0.396952480911-0.920399809281j))*x_ref[2]
            arg[(2, 0, 2, 0)]+=(0.190671186452+0.535670409383j)*x[2]**o + ((-0.999825227149-0.156491252169j))*x[2]
            ref[(2, 0, 2, 0)]+=(0.190671186452+0.535670409383j)*x_ref[2]**o + ((-0.999825227149-0.156491252169j))*x_ref[2]
            arg[(2, 0, 2, 1)]+=(0.164813411388+0.860654303125j)*x[2]**o + ((-0.0588739274788+0.451121665895j))*x[2]
            ref[(2, 0, 2, 1)]+=(0.164813411388+0.860654303125j)*x_ref[2]**o + ((-0.0588739274788+0.451121665895j))*x_ref[2]
            arg[(2, 0, 3, 0)]+=(0.547242013424-0.869732289983j)*x[2]**o + ((-0.15017462271+0.752943604802j))*x[2]
            ref[(2, 0, 3, 0)]+=(0.547242013424-0.869732289983j)*x_ref[2]**o + ((-0.15017462271+0.752943604802j))*x_ref[2]
            arg[(2, 0, 3, 1)]+=(0.719606400953+0.482189654808j)*x[2]**o + ((-0.88890273991-0.754799413741j))*x[2]
            ref[(2, 0, 3, 1)]+=(0.719606400953+0.482189654808j)*x_ref[2]**o + ((-0.88890273991-0.754799413741j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(0.452847276441-0.0961997988272j)*x[2]**o + ((-0.927196232317+0.390501515998j))*x[2]
            ref[(2, 1, 0, 0)]+=(0.452847276441-0.0961997988272j)*x_ref[2]**o + ((-0.927196232317+0.390501515998j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(-0.697817472916+0.0701443818484j)*x[2]**o + ((-0.685129017868-0.711359760466j))*x[2]
            ref[(2, 1, 0, 1)]+=(-0.697817472916+0.0701443818484j)*x_ref[2]**o + ((-0.685129017868-0.711359760466j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(0.0012890277993-0.233847543194j)*x[2]**o + ((-0.0708940913532+0.638748666782j))*x[2]
            ref[(2, 1, 1, 0)]+=(0.0012890277993-0.233847543194j)*x_ref[2]**o + ((-0.0708940913532+0.638748666782j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(-0.128611688005-0.362987113772j)*x[2]**o + ((-0.790628073732-0.782021949052j))*x[2]
            ref[(2, 1, 1, 1)]+=(-0.128611688005-0.362987113772j)*x_ref[2]**o + ((-0.790628073732-0.782021949052j))*x_ref[2]
            arg[(2, 1, 2, 0)]+=(0.0272631122983+0.0720557204073j)*x[2]**o + ((-0.688115986694+0.292169942244j))*x[2]
            ref[(2, 1, 2, 0)]+=(0.0272631122983+0.0720557204073j)*x_ref[2]**o + ((-0.688115986694+0.292169942244j))*x_ref[2]
            arg[(2, 1, 2, 1)]+=(0.837721597229-0.981881011185j)*x[2]**o + ((-0.105833679759+0.683702710898j))*x[2]
            ref[(2, 1, 2, 1)]+=(0.837721597229-0.981881011185j)*x_ref[2]**o + ((-0.105833679759+0.683702710898j))*x_ref[2]
            arg[(2, 1, 3, 0)]+=(0.29051945691-0.578591183943j)*x[2]**o + ((-0.968805343584-0.258074595228j))*x[2]
            ref[(2, 1, 3, 0)]+=(0.29051945691-0.578591183943j)*x_ref[2]**o + ((-0.968805343584-0.258074595228j))*x_ref[2]
            arg[(2, 1, 3, 1)]+=(0.0677296744482+0.0539776218098j)*x[2]**o + ((-0.779692297097-0.624339978505j))*x[2]
            ref[(2, 1, 3, 1)]+=(0.0677296744482+0.0539776218098j)*x_ref[2]**o + ((-0.779692297097-0.624339978505j))*x_ref[2]
            arg[(2, 2, 0, 0)]+=(0.314840556491-0.0858936665436j)*x[2]**o + ((-0.594139941085+0.943949643492j))*x[2]
            ref[(2, 2, 0, 0)]+=(0.314840556491-0.0858936665436j)*x_ref[2]**o + ((-0.594139941085+0.943949643492j))*x_ref[2]
            arg[(2, 2, 0, 1)]+=(0.102549183414-0.613122109473j)*x[2]**o + ((-0.0225359753269+0.206278942279j))*x[2]
            ref[(2, 2, 0, 1)]+=(0.102549183414-0.613122109473j)*x_ref[2]**o + ((-0.0225359753269+0.206278942279j))*x_ref[2]
            arg[(2, 2, 1, 0)]+=(0.944702179131+0.685844607873j)*x[2]**o + ((0.568153756921-0.586985902461j))*x[2]
            ref[(2, 2, 1, 0)]+=(0.944702179131+0.685844607873j)*x_ref[2]**o + ((0.568153756921-0.586985902461j))*x_ref[2]
            arg[(2, 2, 1, 1)]+=(0.925620903394+0.721536497387j)*x[2]**o + ((0.399649489368+0.0449703850484j))*x[2]
            ref[(2, 2, 1, 1)]+=(0.925620903394+0.721536497387j)*x_ref[2]**o + ((0.399649489368+0.0449703850484j))*x_ref[2]
            arg[(2, 2, 2, 0)]+=(0.869221743938-0.363267213393j)*x[2]**o + ((0.496898797215-0.128626248935j))*x[2]
            ref[(2, 2, 2, 0)]+=(0.869221743938-0.363267213393j)*x_ref[2]**o + ((0.496898797215-0.128626248935j))*x_ref[2]
            arg[(2, 2, 2, 1)]+=(-0.0218746125444-0.124809560454j)*x[2]**o + ((-0.452358031111+0.514712849284j))*x[2]
            ref[(2, 2, 2, 1)]+=(-0.0218746125444-0.124809560454j)*x_ref[2]**o + ((-0.452358031111+0.514712849284j))*x_ref[2]
            arg[(2, 2, 3, 0)]+=(0.223304906994-0.0523278391377j)*x[2]**o + ((-0.211907722163+0.944759820925j))*x[2]
            ref[(2, 2, 3, 0)]+=(0.223304906994-0.0523278391377j)*x_ref[2]**o + ((-0.211907722163+0.944759820925j))*x_ref[2]
            arg[(2, 2, 3, 1)]+=(0.874890753085-0.268389438443j)*x[2]**o + ((-0.433929398675+0.764734965871j))*x[2]
            ref[(2, 2, 3, 1)]+=(0.874890753085-0.268389438443j)*x_ref[2]**o + ((-0.433929398675+0.764734965871j))*x_ref[2]
            arg[(3, 0, 0, 0)]+=(-0.806387990133-0.284036500784j)*x[2]**o + ((-0.0554431555938+0.441159907827j))*x[2]
            ref[(3, 0, 0, 0)]+=(-0.806387990133-0.284036500784j)*x_ref[2]**o + ((-0.0554431555938+0.441159907827j))*x_ref[2]
            arg[(3, 0, 0, 1)]+=(0.795648379505-0.48093077512j)*x[2]**o + ((-0.0172578808049-0.316786423354j))*x[2]
            ref[(3, 0, 0, 1)]+=(0.795648379505-0.48093077512j)*x_ref[2]**o + ((-0.0172578808049-0.316786423354j))*x_ref[2]
            arg[(3, 0, 1, 0)]+=(0.838253188019+0.169985675633j)*x[2]**o + ((0.581930411005+0.106378620249j))*x[2]
            ref[(3, 0, 1, 0)]+=(0.838253188019+0.169985675633j)*x_ref[2]**o + ((0.581930411005+0.106378620249j))*x_ref[2]
            arg[(3, 0, 1, 1)]+=(-0.57034230689+0.519536927246j)*x[2]**o + ((0.741090098244+0.893762809721j))*x[2]
            ref[(3, 0, 1, 1)]+=(-0.57034230689+0.519536927246j)*x_ref[2]**o + ((0.741090098244+0.893762809721j))*x_ref[2]
            arg[(3, 0, 2, 0)]+=(0.23486153609-0.658386489092j)*x[2]**o + ((-0.846918742921-0.0177257256734j))*x[2]
            ref[(3, 0, 2, 0)]+=(0.23486153609-0.658386489092j)*x_ref[2]**o + ((-0.846918742921-0.0177257256734j))*x_ref[2]
            arg[(3, 0, 2, 1)]+=(-0.107741886821+0.960339042222j)*x[2]**o + ((-0.0624592370668-0.438100040383j))*x[2]
            ref[(3, 0, 2, 1)]+=(-0.107741886821+0.960339042222j)*x_ref[2]**o + ((-0.0624592370668-0.438100040383j))*x_ref[2]
            arg[(3, 0, 3, 0)]+=(0.717637715272-0.683937770472j)*x[2]**o + ((-0.459091438363-0.109866654721j))*x[2]
            ref[(3, 0, 3, 0)]+=(0.717637715272-0.683937770472j)*x_ref[2]**o + ((-0.459091438363-0.109866654721j))*x_ref[2]
            arg[(3, 0, 3, 1)]+=(0.811167116952-0.749109009947j)*x[2]**o + ((0.530220648483-0.156537866544j))*x[2]
            ref[(3, 0, 3, 1)]+=(0.811167116952-0.749109009947j)*x_ref[2]**o + ((0.530220648483-0.156537866544j))*x_ref[2]
            arg[(3, 1, 0, 0)]+=(0.777298309832-0.68517437081j)*x[2]**o + ((-0.208440709002-0.857952027103j))*x[2]
            ref[(3, 1, 0, 0)]+=(0.777298309832-0.68517437081j)*x_ref[2]**o + ((-0.208440709002-0.857952027103j))*x_ref[2]
            arg[(3, 1, 0, 1)]+=(-0.0119061277981+0.587925606734j)*x[2]**o + ((-0.292694483741-0.56870306766j))*x[2]
            ref[(3, 1, 0, 1)]+=(-0.0119061277981+0.587925606734j)*x_ref[2]**o + ((-0.292694483741-0.56870306766j))*x_ref[2]
            arg[(3, 1, 1, 0)]+=(-0.20456826337+0.163201298617j)*x[2]**o + ((0.946346910055+0.342373550418j))*x[2]
            ref[(3, 1, 1, 0)]+=(-0.20456826337+0.163201298617j)*x_ref[2]**o + ((0.946346910055+0.342373550418j))*x_ref[2]
            arg[(3, 1, 1, 1)]+=(0.108243367996+0.281684198506j)*x[2]**o + ((0.949127676176+0.419628106403j))*x[2]
            ref[(3, 1, 1, 1)]+=(0.108243367996+0.281684198506j)*x_ref[2]**o + ((0.949127676176+0.419628106403j))*x_ref[2]
            arg[(3, 1, 2, 0)]+=(-0.703845987023-0.882360601152j)*x[2]**o + ((0.248846661578+0.486476667823j))*x[2]
            ref[(3, 1, 2, 0)]+=(-0.703845987023-0.882360601152j)*x_ref[2]**o + ((0.248846661578+0.486476667823j))*x_ref[2]
            arg[(3, 1, 2, 1)]+=(0.232397518142-0.12644753743j)*x[2]**o + ((0.988470269173+0.0384933470595j))*x[2]
            ref[(3, 1, 2, 1)]+=(0.232397518142-0.12644753743j)*x_ref[2]**o + ((0.988470269173+0.0384933470595j))*x_ref[2]
            arg[(3, 1, 3, 0)]+=(-0.574758827068+0.0933320051357j)*x[2]**o + ((-0.367614373256+0.204164509406j))*x[2]
            ref[(3, 1, 3, 0)]+=(-0.574758827068+0.0933320051357j)*x_ref[2]**o + ((-0.367614373256+0.204164509406j))*x_ref[2]
            arg[(3, 1, 3, 1)]+=(0.360959894132+0.985451900847j)*x[2]**o + ((0.336942007691+0.468839972962j))*x[2]
            ref[(3, 1, 3, 1)]+=(0.360959894132+0.985451900847j)*x_ref[2]**o + ((0.336942007691+0.468839972962j))*x_ref[2]
            arg[(3, 2, 0, 0)]+=(0.263907971871-0.834598781696j)*x[2]**o + ((0.767567437597+0.656108407015j))*x[2]
            ref[(3, 2, 0, 0)]+=(0.263907971871-0.834598781696j)*x_ref[2]**o + ((0.767567437597+0.656108407015j))*x_ref[2]
            arg[(3, 2, 0, 1)]+=(0.13979542763+0.836484978134j)*x[2]**o + ((-0.903981165025-0.438361279857j))*x[2]
            ref[(3, 2, 0, 1)]+=(0.13979542763+0.836484978134j)*x_ref[2]**o + ((-0.903981165025-0.438361279857j))*x_ref[2]
            arg[(3, 2, 1, 0)]+=(-0.200087011575+0.328501507388j)*x[2]**o + ((-0.704266610077-0.86418777642j))*x[2]
            ref[(3, 2, 1, 0)]+=(-0.200087011575+0.328501507388j)*x_ref[2]**o + ((-0.704266610077-0.86418777642j))*x_ref[2]
            arg[(3, 2, 1, 1)]+=(0.634670636821-0.949372334442j)*x[2]**o + ((0.438965361955+0.799827069357j))*x[2]
            ref[(3, 2, 1, 1)]+=(0.634670636821-0.949372334442j)*x_ref[2]**o + ((0.438965361955+0.799827069357j))*x_ref[2]
            arg[(3, 2, 2, 0)]+=(0.295407473457-0.504383063381j)*x[2]**o + ((0.208099388841-0.0980739345922j))*x[2]
            ref[(3, 2, 2, 0)]+=(0.295407473457-0.504383063381j)*x_ref[2]**o + ((0.208099388841-0.0980739345922j))*x_ref[2]
            arg[(3, 2, 2, 1)]+=(0.813895228968+0.639578436754j)*x[2]**o + ((0.837597355674-0.53664698257j))*x[2]
            ref[(3, 2, 2, 1)]+=(0.813895228968+0.639578436754j)*x_ref[2]**o + ((0.837597355674-0.53664698257j))*x_ref[2]
            arg[(3, 2, 3, 0)]+=(0.752559176624-0.378459300794j)*x[2]**o + ((-0.859546133678-0.163961057087j))*x[2]
            ref[(3, 2, 3, 0)]+=(0.752559176624-0.378459300794j)*x_ref[2]**o + ((-0.859546133678-0.163961057087j))*x_ref[2]
            arg[(3, 2, 3, 1)]+=(-0.66642609243+0.114784820509j)*x[2]**o + ((-0.453997367001-0.131526393578j))*x[2]
            ref[(3, 2, 3, 1)]+=(-0.66642609243+0.114784820509j)*x_ref[2]**o + ((-0.453997367001-0.131526393578j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
        """
        tests interpolation of rank 0 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.16835891081-0.929141179073j)*x[0] + ((0.776579311889+0.0439262723291j))*x[1]
        ref=(-0.16835891081-0.929141179073j)*x_ref[0] + ((0.776579311889+0.0439262723291j))*x_ref[1]
        if dim==3:
            arg+=((-0.229169794019+0.698866519728j))*x[2]
            ref+=((-0.229169794019+0.698866519728j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
        """
        tests interpolation of rank 1 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=(0.811721758484-0.904742893686j)*x[0] + ((0.083484228548+0.492737305224j))*x[1]
        ref[(0,)]=(0.811721758484-0.904742893686j)*x_ref[0] + ((0.083484228548+0.492737305224j))*x_ref[1]
        arg[(1,)]=(0.11170132314+0.612280097033j)*x[0] + ((-0.584252402599+0.476368606705j))*x[1]
        ref[(1,)]=(0.11170132314+0.612280097033j)*x_ref[0] + ((-0.584252402599+0.476368606705j))*x_ref[1]
        arg[(2,)]=(-0.634238528994-0.212424421364j)*x[0] + ((0.00809976721191-0.551823542801j))*x[1]
        ref[(2,)]=(-0.634238528994-0.212424421364j)*x_ref[0] + ((0.00809976721191-0.551823542801j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.450990902346+0.51159107014j)*x[2]
            ref[(0,)]+=(0.450990902346+0.51159107014j)*x_ref[2]
            arg[(1,)]+=(-0.0305338815329-0.712081800001j)*x[2]
            ref[(1,)]+=(-0.0305338815329-0.712081800001j)*x_ref[2]
            arg[(2,)]+=(-0.182552160453-0.741566004281j)*x[2]
            ref[(2,)]+=(-0.182552160453-0.741566004281j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
        """
        tests interpolation of rank 2 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref = Data(0,(4, 3),w_ref)
        arg[(0, 0)]=(0.923867632172+0.644111100592j)*x[0] + ((-0.5957283087-0.253637558035j))*x[1]
        ref[(0, 0)]=(0.923867632172+0.644111100592j)*x_ref[0] + ((-0.5957283087-0.253637558035j))*x_ref[1]
        arg[(0, 1)]=(-0.998400586364+0.21565734616j)*x[0] + ((0.545847687395+0.404879903144j))*x[1]
        ref[(0, 1)]=(-0.998400586364+0.21565734616j)*x_ref[0] + ((0.545847687395+0.404879903144j))*x_ref[1]
        arg[(0, 2)]=(0.544156110837-0.639913652868j)*x[0] + ((-0.909419433229+0.368152926259j))*x[1]
        ref[(0, 2)]=(0.544156110837-0.639913652868j)*x_ref[0] + ((-0.909419433229+0.368152926259j))*x_ref[1]
        arg[(1, 0)]=(0.940742516485+0.305803100519j)*x[0] + ((0.799894572992-0.836087932264j))*x[1]
        ref[(1, 0)]=(0.940742516485+0.305803100519j)*x_ref[0] + ((0.799894572992-0.836087932264j))*x_ref[1]
        arg[(1, 1)]=(0.954854745204+0.0605755543341j)*x[0] + ((-0.200244892335-0.656738035093j))*x[1]
        ref[(1, 1)]=(0.954854745204+0.0605755543341j)*x_ref[0] + ((-0.200244892335-0.656738035093j))*x_ref[1]
        arg[(1, 2)]=(0.813911466637+0.774875065783j)*x[0] + ((-0.110850181936+0.40380853445j))*x[1]
        ref[(1, 2)]=(0.813911466637+0.774875065783j)*x_ref[0] + ((-0.110850181936+0.40380853445j))*x_ref[1]
        arg[(2, 0)]=(0.0577906125001-0.474994322359j)*x[0] + ((0.607113474437-0.481388439895j))*x[1]
        ref[(2, 0)]=(0.0577906125001-0.474994322359j)*x_ref[0] + ((0.607113474437-0.481388439895j))*x_ref[1]
        arg[(2, 1)]=(0.73281757115-0.593340734457j)*x[0] + ((-0.200268494436-0.408193670096j))*x[1]
        ref[(2, 1)]=(0.73281757115-0.593340734457j)*x_ref[0] + ((-0.200268494436-0.408193670096j))*x_ref[1]
        arg[(2, 2)]=(-0.716078455992+0.0719876359267j)*x[0] + ((0.367447670484+0.457538231174j))*x[1]
        ref[(2, 2)]=(-0.716078455992+0.0719876359267j)*x_ref[0] + ((0.367447670484+0.457538231174j))*x_ref[1]
        arg[(3, 0)]=(0.23109547493-0.566494463316j)*x[0] + ((0.0823313245089+0.0862201999787j))*x[1]
        ref[(3, 0)]=(0.23109547493-0.566494463316j)*x_ref[0] + ((0.0823313245089+0.0862201999787j))*x_ref[1]
        arg[(3, 1)]=(0.362716606157+0.868738589049j)*x[0] + ((0.106649410181+0.711617609751j))*x[1]
        ref[(3, 1)]=(0.362716606157+0.868738589049j)*x_ref[0] + ((0.106649410181+0.711617609751j))*x_ref[1]
        arg[(3, 2)]=(-0.53199740054-0.40177621375j)*x[0] + ((0.924539116346-0.269863575912j))*x[1]
        ref[(3, 2)]=(-0.53199740054-0.40177621375j)*x_ref[0] + ((0.924539116346-0.269863575912j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(-0.843258788363-0.289088319123j)*x[2]
            ref[(0, 0)]+=(-0.843258788363-0.289088319123j)*x_ref[2]
            arg[(0, 1)]+=(-0.0505803281308+0.578344122227j)*x[2]
            ref[(0, 1)]+=(-0.0505803281308+0.578344122227j)*x_ref[2]
            arg[(0, 2)]+=(-0.316965586588-0.546775031494j)*x[2]
            ref[(0, 2)]+=(-0.316965586588-0.546775031494j)*x_ref[2]
            arg[(1, 0)]+=(0.785138350808-0.813539046359j)*x[2]
            ref[(1, 0)]+=(0.785138350808-0.813539046359j)*x_ref[2]
            arg[(1, 1)]+=(-0.390716499954+0.23079365548j)*x[2]
            ref[(1, 1)]+=(-0.390716499954+0.23079365548j)*x_ref[2]
            arg[(1, 2)]+=(0.831965410793-0.161377860575j)*x[2]
            ref[(1, 2)]+=(0.831965410793-0.161377860575j)*x_ref[2]
            arg[(2, 0)]+=(0.175892234385-0.759442522694j)*x[2]
            ref[(2, 0)]+=(0.175892234385-0.759442522694j)*x_ref[2]
            arg[(2, 1)]+=(-0.190160531148+0.820603004346j)*x[2]
            ref[(2, 1)]+=(-0.190160531148+0.820603004346j)*x_ref[2]
            arg[(2, 2)]+=(0.711536514003+0.0610730294241j)*x[2]
            ref[(2, 2)]+=(0.711536514003+0.0610730294241j)*x_ref[2]
            arg[(3, 0)]+=(-0.430544922656+0.466189106584j)*x[2]
            ref[(3, 0)]+=(-0.430544922656+0.466189106584j)*x_ref[2]
            arg[(3, 1)]+=(0.975368613548+0.451586516875j)*x[2]
            ref[(3, 1)]+=(0.975368613548+0.451586516875j)*x_ref[2]
            arg[(3, 2)]+=(0.908729123953+0.763357179314j)*x[2]
            ref[(3, 2)]+=(0.908729123953+0.763357179314j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
        """
        tests interpolation of rank 3 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 4),w)
        ref = Data(0,(3, 4, 4),w_ref)
        arg[(0, 0, 0)]=(0.142757062311+0.554643288674j)*x[0] + ((-0.427848912073-0.840891715186j))*x[1]
        ref[(0, 0, 0)]=(0.142757062311+0.554643288674j)*x_ref[0] + ((-0.427848912073-0.840891715186j))*x_ref[1]
        arg[(0, 0, 1)]=(0.897484814773+0.115287086877j)*x[0] + ((-0.627058140992-0.828788584934j))*x[1]
        ref[(0, 0, 1)]=(0.897484814773+0.115287086877j)*x_ref[0] + ((-0.627058140992-0.828788584934j))*x_ref[1]
        arg[(0, 0, 2)]=(0.493020084765-0.971646048017j)*x[0] + ((-0.998226839783+0.466181515586j))*x[1]
        ref[(0, 0, 2)]=(0.493020084765-0.971646048017j)*x_ref[0] + ((-0.998226839783+0.466181515586j))*x_ref[1]
        arg[(0, 0, 3)]=(0.7833433277+0.556635058622j)*x[0] + ((0.00248011832903-0.123324314524j))*x[1]
        ref[(0, 0, 3)]=(0.7833433277+0.556635058622j)*x_ref[0] + ((0.00248011832903-0.123324314524j))*x_ref[1]
        arg[(0, 1, 0)]=(0.205605212147+0.836628220315j)*x[0] + ((0.651418699941-0.808344560056j))*x[1]
        ref[(0, 1, 0)]=(0.205605212147+0.836628220315j)*x_ref[0] + ((0.651418699941-0.808344560056j))*x_ref[1]
        arg[(0, 1, 1)]=(0.0630894676135-0.184422399026j)*x[0] + ((-0.607352002291-0.970128984283j))*x[1]
        ref[(0, 1, 1)]=(0.0630894676135-0.184422399026j)*x_ref[0] + ((-0.607352002291-0.970128984283j))*x_ref[1]
        arg[(0, 1, 2)]=(0.763842562882-0.157497551617j)*x[0] + ((-0.439975459814-0.00796777402488j))*x[1]
        ref[(0, 1, 2)]=(0.763842562882-0.157497551617j)*x_ref[0] + ((-0.439975459814-0.00796777402488j))*x_ref[1]
        arg[(0, 1, 3)]=(0.44466273656+0.597770907171j)*x[0] + ((-0.744347063919-0.594476732021j))*x[1]
        ref[(0, 1, 3)]=(0.44466273656+0.597770907171j)*x_ref[0] + ((-0.744347063919-0.594476732021j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.163155003845-0.839226463976j)*x[0] + ((-0.922572312562-0.484623899889j))*x[1]
        ref[(0, 2, 0)]=(-0.163155003845-0.839226463976j)*x_ref[0] + ((-0.922572312562-0.484623899889j))*x_ref[1]
        arg[(0, 2, 1)]=(0.530158117888+0.822690220287j)*x[0] + ((-0.639619086473-0.190812256428j))*x[1]
        ref[(0, 2, 1)]=(0.530158117888+0.822690220287j)*x_ref[0] + ((-0.639619086473-0.190812256428j))*x_ref[1]
        arg[(0, 2, 2)]=(0.94700521919-0.847479969163j)*x[0] + ((-0.287134454938-0.712246261697j))*x[1]
        ref[(0, 2, 2)]=(0.94700521919-0.847479969163j)*x_ref[0] + ((-0.287134454938-0.712246261697j))*x_ref[1]
        arg[(0, 2, 3)]=(-0.916472038766+0.897171083775j)*x[0] + ((0.489996014754-0.294072281137j))*x[1]
        ref[(0, 2, 3)]=(-0.916472038766+0.897171083775j)*x_ref[0] + ((0.489996014754-0.294072281137j))*x_ref[1]
        arg[(0, 3, 0)]=(0.579383373893-0.827761487141j)*x[0] + ((0.0758592199662-0.303023594747j))*x[1]
        ref[(0, 3, 0)]=(0.579383373893-0.827761487141j)*x_ref[0] + ((0.0758592199662-0.303023594747j))*x_ref[1]
        arg[(0, 3, 1)]=(0.922742005422-0.411972228647j)*x[0] + ((-0.713746833377-0.275268047204j))*x[1]
        ref[(0, 3, 1)]=(0.922742005422-0.411972228647j)*x_ref[0] + ((-0.713746833377-0.275268047204j))*x_ref[1]
        arg[(0, 3, 2)]=(0.851032696849+0.33473780813j)*x[0] + ((-0.503988818382+0.896527305715j))*x[1]
        ref[(0, 3, 2)]=(0.851032696849+0.33473780813j)*x_ref[0] + ((-0.503988818382+0.896527305715j))*x_ref[1]
        arg[(0, 3, 3)]=(-0.391423427537+0.708292307183j)*x[0] + ((0.831699878804-0.108091159756j))*x[1]
        ref[(0, 3, 3)]=(-0.391423427537+0.708292307183j)*x_ref[0] + ((0.831699878804-0.108091159756j))*x_ref[1]
        arg[(1, 0, 0)]=(0.147449932414-0.901195941338j)*x[0] + ((-0.386608595229-0.583118096871j))*x[1]
        ref[(1, 0, 0)]=(0.147449932414-0.901195941338j)*x_ref[0] + ((-0.386608595229-0.583118096871j))*x_ref[1]
        arg[(1, 0, 1)]=(0.258228223648+0.0238385566345j)*x[0] + ((-0.863859102542+0.759657928052j))*x[1]
        ref[(1, 0, 1)]=(0.258228223648+0.0238385566345j)*x_ref[0] + ((-0.863859102542+0.759657928052j))*x_ref[1]
        arg[(1, 0, 2)]=(-0.774308789833+0.956021169257j)*x[0] + ((-0.00721080667872-0.406043986051j))*x[1]
        ref[(1, 0, 2)]=(-0.774308789833+0.956021169257j)*x_ref[0] + ((-0.00721080667872-0.406043986051j))*x_ref[1]
        arg[(1, 0, 3)]=(0.481214450805-0.0253781088296j)*x[0] + ((-0.152474472057+0.554798214997j))*x[1]
        ref[(1, 0, 3)]=(0.481214450805-0.0253781088296j)*x_ref[0] + ((-0.152474472057+0.554798214997j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.58007971273-0.280212670325j)*x[0] + ((-0.212946750003-0.130922717633j))*x[1]
        ref[(1, 1, 0)]=(-0.58007971273-0.280212670325j)*x_ref[0] + ((-0.212946750003-0.130922717633j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.588258844265+0.166742574279j)*x[0] + ((0.971017736185-0.212961385767j))*x[1]
        ref[(1, 1, 1)]=(-0.588258844265+0.166742574279j)*x_ref[0] + ((0.971017736185-0.212961385767j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.758333797625-0.524994702302j)*x[0] + ((-0.63935805921-0.0838992542059j))*x[1]
        ref[(1, 1, 2)]=(-0.758333797625-0.524994702302j)*x_ref[0] + ((-0.63935805921-0.0838992542059j))*x_ref[1]
        arg[(1, 1, 3)]=(-0.227192044955+0.522752843675j)*x[0] + ((0.943312483626-0.55609698604j))*x[1]
        ref[(1, 1, 3)]=(-0.227192044955+0.522752843675j)*x_ref[0] + ((0.943312483626-0.55609698604j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.273049213193+0.66869599735j)*x[0] + ((-0.726349823583-0.495357140289j))*x[1]
        ref[(1, 2, 0)]=(-0.273049213193+0.66869599735j)*x_ref[0] + ((-0.726349823583-0.495357140289j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.363853776996+0.158406018085j)*x[0] + ((0.854293745986+0.408169940045j))*x[1]
        ref[(1, 2, 1)]=(-0.363853776996+0.158406018085j)*x_ref[0] + ((0.854293745986+0.408169940045j))*x_ref[1]
        arg[(1, 2, 2)]=(-0.958318428077+0.198358634954j)*x[0] + ((0.361712035956-0.975864482014j))*x[1]
        ref[(1, 2, 2)]=(-0.958318428077+0.198358634954j)*x_ref[0] + ((0.361712035956-0.975864482014j))*x_ref[1]
        arg[(1, 2, 3)]=(-0.962838621333-0.0723468307431j)*x[0] + ((-0.0403357050154-0.270970651982j))*x[1]
        ref[(1, 2, 3)]=(-0.962838621333-0.0723468307431j)*x_ref[0] + ((-0.0403357050154-0.270970651982j))*x_ref[1]
        arg[(1, 3, 0)]=(-0.0343278188962+0.496054976855j)*x[0] + ((0.255439835371+0.386568786581j))*x[1]
        ref[(1, 3, 0)]=(-0.0343278188962+0.496054976855j)*x_ref[0] + ((0.255439835371+0.386568786581j))*x_ref[1]
        arg[(1, 3, 1)]=(-0.731579883294+0.857086262509j)*x[0] + ((-0.263221371619+0.872124479733j))*x[1]
        ref[(1, 3, 1)]=(-0.731579883294+0.857086262509j)*x_ref[0] + ((-0.263221371619+0.872124479733j))*x_ref[1]
        arg[(1, 3, 2)]=(-0.974638253181-0.541323661534j)*x[0] + ((0.726193921982-0.961152668279j))*x[1]
        ref[(1, 3, 2)]=(-0.974638253181-0.541323661534j)*x_ref[0] + ((0.726193921982-0.961152668279j))*x_ref[1]
        arg[(1, 3, 3)]=(-0.294818486802-0.590031733029j)*x[0] + ((0.359932983254-0.80768815744j))*x[1]
        ref[(1, 3, 3)]=(-0.294818486802-0.590031733029j)*x_ref[0] + ((0.359932983254-0.80768815744j))*x_ref[1]
        arg[(2, 0, 0)]=(0.287246886578+0.833765637907j)*x[0] + ((0.654080373054-0.792774082085j))*x[1]
        ref[(2, 0, 0)]=(0.287246886578+0.833765637907j)*x_ref[0] + ((0.654080373054-0.792774082085j))*x_ref[1]
        arg[(2, 0, 1)]=(-0.53018142234+0.99442542231j)*x[0] + ((0.412310290314+0.474871595179j))*x[1]
        ref[(2, 0, 1)]=(-0.53018142234+0.99442542231j)*x_ref[0] + ((0.412310290314+0.474871595179j))*x_ref[1]
        arg[(2, 0, 2)]=(-0.688345986974-0.945885654227j)*x[0] + ((-0.576708964986+0.272823142859j))*x[1]
        ref[(2, 0, 2)]=(-0.688345986974-0.945885654227j)*x_ref[0] + ((-0.576708964986+0.272823142859j))*x_ref[1]
        arg[(2, 0, 3)]=(-0.0296138875289-0.212931197359j)*x[0] + ((0.222378789366-0.793672341065j))*x[1]
        ref[(2, 0, 3)]=(-0.0296138875289-0.212931197359j)*x_ref[0] + ((0.222378789366-0.793672341065j))*x_ref[1]
        arg[(2, 1, 0)]=(0.249571755777-0.870663116038j)*x[0] + ((-0.915665926117-0.714694696229j))*x[1]
        ref[(2, 1, 0)]=(0.249571755777-0.870663116038j)*x_ref[0] + ((-0.915665926117-0.714694696229j))*x_ref[1]
        arg[(2, 1, 1)]=(0.93006509708-0.0739008065225j)*x[0] + ((-0.113927183992+0.393879489113j))*x[1]
        ref[(2, 1, 1)]=(0.93006509708-0.0739008065225j)*x_ref[0] + ((-0.113927183992+0.393879489113j))*x_ref[1]
        arg[(2, 1, 2)]=(0.658122805581+0.163321573393j)*x[0] + ((0.63629229977-0.813137697831j))*x[1]
        ref[(2, 1, 2)]=(0.658122805581+0.163321573393j)*x_ref[0] + ((0.63629229977-0.813137697831j))*x_ref[1]
        arg[(2, 1, 3)]=(-0.377746799375-0.354941453645j)*x[0] + ((0.844324255747+0.801013080788j))*x[1]
        ref[(2, 1, 3)]=(-0.377746799375-0.354941453645j)*x_ref[0] + ((0.844324255747+0.801013080788j))*x_ref[1]
        arg[(2, 2, 0)]=(0.391865720899-0.894424336477j)*x[0] + ((0.809209465444+0.203627545669j))*x[1]
        ref[(2, 2, 0)]=(0.391865720899-0.894424336477j)*x_ref[0] + ((0.809209465444+0.203627545669j))*x_ref[1]
        arg[(2, 2, 1)]=(0.916917354581+0.0332834814886j)*x[0] + ((0.799290634819-0.683703452284j))*x[1]
        ref[(2, 2, 1)]=(0.916917354581+0.0332834814886j)*x_ref[0] + ((0.799290634819-0.683703452284j))*x_ref[1]
        arg[(2, 2, 2)]=(-0.441772862702+0.663854034275j)*x[0] + ((-0.0718650410145+0.495244923901j))*x[1]
        ref[(2, 2, 2)]=(-0.441772862702+0.663854034275j)*x_ref[0] + ((-0.0718650410145+0.495244923901j))*x_ref[1]
        arg[(2, 2, 3)]=(-0.692642475529+0.958936991228j)*x[0] + ((-0.0148719672074-0.813841775693j))*x[1]
        ref[(2, 2, 3)]=(-0.692642475529+0.958936991228j)*x_ref[0] + ((-0.0148719672074-0.813841775693j))*x_ref[1]
        arg[(2, 3, 0)]=(0.476246559489-0.292698418632j)*x[0] + ((0.24955083342+0.773629826618j))*x[1]
        ref[(2, 3, 0)]=(0.476246559489-0.292698418632j)*x_ref[0] + ((0.24955083342+0.773629826618j))*x_ref[1]
        arg[(2, 3, 1)]=(0.520658786183-0.0971428559807j)*x[0] + ((-0.319840276291-0.960056689935j))*x[1]
        ref[(2, 3, 1)]=(0.520658786183-0.0971428559807j)*x_ref[0] + ((-0.319840276291-0.960056689935j))*x_ref[1]
        arg[(2, 3, 2)]=(0.332688109833+0.917482767024j)*x[0] + ((0.916771124658-0.160653678233j))*x[1]
        ref[(2, 3, 2)]=(0.332688109833+0.917482767024j)*x_ref[0] + ((0.916771124658-0.160653678233j))*x_ref[1]
        arg[(2, 3, 3)]=(-0.203918032465+0.716192320761j)*x[0] + ((-0.566318689113+0.831005225712j))*x[1]
        ref[(2, 3, 3)]=(-0.203918032465+0.716192320761j)*x_ref[0] + ((-0.566318689113+0.831005225712j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.0441266511011-0.67068627517j)*x[2]
            ref[(0, 0, 0)]+=(-0.0441266511011-0.67068627517j)*x_ref[2]
            arg[(0, 0, 1)]+=(-0.24116664129+0.430753678171j)*x[2]
            ref[(0, 0, 1)]+=(-0.24116664129+0.430753678171j)*x_ref[2]
            arg[(0, 0, 2)]+=(0.795536327659-0.355390546904j)*x[2]
            ref[(0, 0, 2)]+=(0.795536327659-0.355390546904j)*x_ref[2]
            arg[(0, 0, 3)]+=(-0.539204249843+0.310502775595j)*x[2]
            ref[(0, 0, 3)]+=(-0.539204249843+0.310502775595j)*x_ref[2]
            arg[(0, 1, 0)]+=(-0.266550612337+0.802975269246j)*x[2]
            ref[(0, 1, 0)]+=(-0.266550612337+0.802975269246j)*x_ref[2]
            arg[(0, 1, 1)]+=(-0.729463937279+0.308828563577j)*x[2]
            ref[(0, 1, 1)]+=(-0.729463937279+0.308828563577j)*x_ref[2]
            arg[(0, 1, 2)]+=(0.627556473443-0.52737416941j)*x[2]
            ref[(0, 1, 2)]+=(0.627556473443-0.52737416941j)*x_ref[2]
            arg[(0, 1, 3)]+=(0.126944175863-0.168684727444j)*x[2]
            ref[(0, 1, 3)]+=(0.126944175863-0.168684727444j)*x_ref[2]
            arg[(0, 2, 0)]+=(-0.55756669041+0.219196176492j)*x[2]
            ref[(0, 2, 0)]+=(-0.55756669041+0.219196176492j)*x_ref[2]
            arg[(0, 2, 1)]+=(0.263352394666-0.508820360181j)*x[2]
            ref[(0, 2, 1)]+=(0.263352394666-0.508820360181j)*x_ref[2]
            arg[(0, 2, 2)]+=(0.790816604011+0.802141984991j)*x[2]
            ref[(0, 2, 2)]+=(0.790816604011+0.802141984991j)*x_ref[2]
            arg[(0, 2, 3)]+=(-0.133094978652+0.791730582794j)*x[2]
            ref[(0, 2, 3)]+=(-0.133094978652+0.791730582794j)*x_ref[2]
            arg[(0, 3, 0)]+=(-0.402420672842+0.848834439718j)*x[2]
            ref[(0, 3, 0)]+=(-0.402420672842+0.848834439718j)*x_ref[2]
            arg[(0, 3, 1)]+=(-0.196771271952-0.32534978469j)*x[2]
            ref[(0, 3, 1)]+=(-0.196771271952-0.32534978469j)*x_ref[2]
            arg[(0, 3, 2)]+=(0.458194844092+0.360603590802j)*x[2]
            ref[(0, 3, 2)]+=(0.458194844092+0.360603590802j)*x_ref[2]
            arg[(0, 3, 3)]+=(-0.952512062691-0.231292352107j)*x[2]
            ref[(0, 3, 3)]+=(-0.952512062691-0.231292352107j)*x_ref[2]
            arg[(1, 0, 0)]+=(-0.988206481388+0.0998590551517j)*x[2]
            ref[(1, 0, 0)]+=(-0.988206481388+0.0998590551517j)*x_ref[2]
            arg[(1, 0, 1)]+=(0.440962972534+0.775728565917j)*x[2]
            ref[(1, 0, 1)]+=(0.440962972534+0.775728565917j)*x_ref[2]
            arg[(1, 0, 2)]+=(-0.948279343694+0.214486938468j)*x[2]
            ref[(1, 0, 2)]+=(-0.948279343694+0.214486938468j)*x_ref[2]
            arg[(1, 0, 3)]+=(0.5554576098+0.975868297546j)*x[2]
            ref[(1, 0, 3)]+=(0.5554576098+0.975868297546j)*x_ref[2]
            arg[(1, 1, 0)]+=(-0.603692368198+0.0738022272492j)*x[2]
            ref[(1, 1, 0)]+=(-0.603692368198+0.0738022272492j)*x_ref[2]
            arg[(1, 1, 1)]+=(0.314450096685-0.46314742797j)*x[2]
            ref[(1, 1, 1)]+=(0.314450096685-0.46314742797j)*x_ref[2]
            arg[(1, 1, 2)]+=(0.0172145530719-0.988509274921j)*x[2]
            ref[(1, 1, 2)]+=(0.0172145530719-0.988509274921j)*x_ref[2]
            arg[(1, 1, 3)]+=(0.0582303741338-0.715639492127j)*x[2]
            ref[(1, 1, 3)]+=(0.0582303741338-0.715639492127j)*x_ref[2]
            arg[(1, 2, 0)]+=(0.492130991956+0.0946540616289j)*x[2]
            ref[(1, 2, 0)]+=(0.492130991956+0.0946540616289j)*x_ref[2]
            arg[(1, 2, 1)]+=(-0.475534838048-0.286652272266j)*x[2]
            ref[(1, 2, 1)]+=(-0.475534838048-0.286652272266j)*x_ref[2]
            arg[(1, 2, 2)]+=(0.370762807692+0.49928568465j)*x[2]
            ref[(1, 2, 2)]+=(0.370762807692+0.49928568465j)*x_ref[2]
            arg[(1, 2, 3)]+=(0.303400167486-0.132350917206j)*x[2]
            ref[(1, 2, 3)]+=(0.303400167486-0.132350917206j)*x_ref[2]
            arg[(1, 3, 0)]+=(-0.80728208341-0.943308335067j)*x[2]
            ref[(1, 3, 0)]+=(-0.80728208341-0.943308335067j)*x_ref[2]
            arg[(1, 3, 1)]+=(-0.970700752951+0.856558512042j)*x[2]
            ref[(1, 3, 1)]+=(-0.970700752951+0.856558512042j)*x_ref[2]
            arg[(1, 3, 2)]+=(0.301842050427-0.0426587843971j)*x[2]
            ref[(1, 3, 2)]+=(0.301842050427-0.0426587843971j)*x_ref[2]
            arg[(1, 3, 3)]+=(-0.0204599944027-0.854350005741j)*x[2]
            ref[(1, 3, 3)]+=(-0.0204599944027-0.854350005741j)*x_ref[2]
            arg[(2, 0, 0)]+=(-0.189689049255-0.704230041532j)*x[2]
            ref[(2, 0, 0)]+=(-0.189689049255-0.704230041532j)*x_ref[2]
            arg[(2, 0, 1)]+=(-0.534631715052-0.623732056547j)*x[2]
            ref[(2, 0, 1)]+=(-0.534631715052-0.623732056547j)*x_ref[2]
            arg[(2, 0, 2)]+=(-0.843821811722-0.360040662796j)*x[2]
            ref[(2, 0, 2)]+=(-0.843821811722-0.360040662796j)*x_ref[2]
            arg[(2, 0, 3)]+=(-0.100037487391+0.792379396685j)*x[2]
            ref[(2, 0, 3)]+=(-0.100037487391+0.792379396685j)*x_ref[2]
            arg[(2, 1, 0)]+=(0.544479530337+0.672452917315j)*x[2]
            ref[(2, 1, 0)]+=(0.544479530337+0.672452917315j)*x_ref[2]
            arg[(2, 1, 1)]+=(-0.273199135082+0.754830812805j)*x[2]
            ref[(2, 1, 1)]+=(-0.273199135082+0.754830812805j)*x_ref[2]
            arg[(2, 1, 2)]+=(-0.302853242425+0.798270545713j)*x[2]
            ref[(2, 1, 2)]+=(-0.302853242425+0.798270545713j)*x_ref[2]
            arg[(2, 1, 3)]+=(0.152922074402+0.522591328355j)*x[2]
            ref[(2, 1, 3)]+=(0.152922074402+0.522591328355j)*x_ref[2]
            arg[(2, 2, 0)]+=(-0.329341046491-0.976297759342j)*x[2]
            ref[(2, 2, 0)]+=(-0.329341046491-0.976297759342j)*x_ref[2]
            arg[(2, 2, 1)]+=(-0.457808914654-0.982116349196j)*x[2]
            ref[(2, 2, 1)]+=(-0.457808914654-0.982116349196j)*x_ref[2]
            arg[(2, 2, 2)]+=(0.923591727113-0.378123716444j)*x[2]
            ref[(2, 2, 2)]+=(0.923591727113-0.378123716444j)*x_ref[2]
            arg[(2, 2, 3)]+=(0.163399364925-0.46060454295j)*x[2]
            ref[(2, 2, 3)]+=(0.163399364925-0.46060454295j)*x_ref[2]
            arg[(2, 3, 0)]+=(-0.0663410641181-0.354686969363j)*x[2]
            ref[(2, 3, 0)]+=(-0.0663410641181-0.354686969363j)*x_ref[2]
            arg[(2, 3, 1)]+=(0.399462476713-0.637754233315j)*x[2]
            ref[(2, 3, 1)]+=(0.399462476713-0.637754233315j)*x_ref[2]
            arg[(2, 3, 2)]+=(0.601790498313+0.474204832586j)*x[2]
            ref[(2, 3, 2)]+=(0.601790498313+0.474204832586j)*x_ref[2]
            arg[(2, 3, 3)]+=(-0.250838119752-0.670022417138j)*x[2]
            ref[(2, 3, 3)]+=(-0.250838119752-0.670022417138j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedSolution_rank4(self):
        """
        tests interpolation of rank 4 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 3, 2),w)
        ref = Data(0,(2, 2, 3, 2),w_ref)
        arg[(0, 0, 0, 0)]=(-0.195310996678-0.151312294886j)*x[0] + ((0.897006445645-0.629919943588j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.195310996678-0.151312294886j)*x_ref[0] + ((0.897006445645-0.629919943588j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.0719436704666-0.0342862469521j)*x[0] + ((-0.943823509649+0.156847054359j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.0719436704666-0.0342862469521j)*x_ref[0] + ((-0.943823509649+0.156847054359j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.473523194395-0.160048730252j)*x[0] + ((-0.762232998017+0.527640905835j))*x[1]
        ref[(0, 0, 1, 0)]=(0.473523194395-0.160048730252j)*x_ref[0] + ((-0.762232998017+0.527640905835j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.383331177392-0.69061791904j)*x[0] + ((0.741736376527-0.249089981423j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.383331177392-0.69061791904j)*x_ref[0] + ((0.741736376527-0.249089981423j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(-0.223114844931+0.304048125018j)*x[0] + ((0.784363724415+0.774350704034j))*x[1]
        ref[(0, 0, 2, 0)]=(-0.223114844931+0.304048125018j)*x_ref[0] + ((0.784363724415+0.774350704034j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(-0.576720296816-0.776657330869j)*x[0] + ((-0.718766553874-0.717496593463j))*x[1]
        ref[(0, 0, 2, 1)]=(-0.576720296816-0.776657330869j)*x_ref[0] + ((-0.718766553874-0.717496593463j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.466630067906+0.356977921484j)*x[0] + ((-0.782904934214+0.406340877506j))*x[1]
        ref[(0, 1, 0, 0)]=(0.466630067906+0.356977921484j)*x_ref[0] + ((-0.782904934214+0.406340877506j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.461359321127+0.138220114969j)*x[0] + ((-0.013852792459-0.376869319765j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.461359321127+0.138220114969j)*x_ref[0] + ((-0.013852792459-0.376869319765j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.0625799082294+0.0464945158128j)*x[0] + ((-0.463622899018-0.483456071141j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.0625799082294+0.0464945158128j)*x_ref[0] + ((-0.463622899018-0.483456071141j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.587525138584+0.945814180214j)*x[0] + ((0.291429647694+0.463207968484j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.587525138584+0.945814180214j)*x_ref[0] + ((0.291429647694+0.463207968484j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(-0.143106338987+0.520109111406j)*x[0] + ((-0.970463594093+0.762914888478j))*x[1]
        ref[(0, 1, 2, 0)]=(-0.143106338987+0.520109111406j)*x_ref[0] + ((-0.970463594093+0.762914888478j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(-0.341547900279-0.925948498526j)*x[0] + ((-0.513525007399-0.815494280945j))*x[1]
        ref[(0, 1, 2, 1)]=(-0.341547900279-0.925948498526j)*x_ref[0] + ((-0.513525007399-0.815494280945j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.826055626468+0.929467577986j)*x[0] + ((0.246687737288+0.57057407462j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.826055626468+0.929467577986j)*x_ref[0] + ((0.246687737288+0.57057407462j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.501253431709-0.797274416179j)*x[0] + ((0.739313204754-0.929476466716j))*x[1]
        ref[(1, 0, 0, 1)]=(0.501253431709-0.797274416179j)*x_ref[0] + ((0.739313204754-0.929476466716j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(0.812460292348+0.760725508015j)*x[0] + ((-0.295636049654-0.326357805524j))*x[1]
        ref[(1, 0, 1, 0)]=(0.812460292348+0.760725508015j)*x_ref[0] + ((-0.295636049654-0.326357805524j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.559326011032-0.596236577551j)*x[0] + ((0.461390687724+0.73495232348j))*x[1]
        ref[(1, 0, 1, 1)]=(0.559326011032-0.596236577551j)*x_ref[0] + ((0.461390687724+0.73495232348j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(0.959816676813-0.56585333977j)*x[0] + ((0.382886481569+0.711184548778j))*x[1]
        ref[(1, 0, 2, 0)]=(0.959816676813-0.56585333977j)*x_ref[0] + ((0.382886481569+0.711184548778j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(0.78517304736+0.528597683226j)*x[0] + ((0.929966575865+0.978848914366j))*x[1]
        ref[(1, 0, 2, 1)]=(0.78517304736+0.528597683226j)*x_ref[0] + ((0.929966575865+0.978848914366j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.845386062226+0.185238375731j)*x[0] + ((-0.330228933501-0.928017858174j))*x[1]
        ref[(1, 1, 0, 0)]=(0.845386062226+0.185238375731j)*x_ref[0] + ((-0.330228933501-0.928017858174j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.977787909157+0.03747816188j)*x[0] + ((-0.470623477222+0.716050284114j))*x[1]
        ref[(1, 1, 0, 1)]=(0.977787909157+0.03747816188j)*x_ref[0] + ((-0.470623477222+0.716050284114j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.803070541898-0.323924957494j)*x[0] + ((-0.042765498562+0.0821647982096j))*x[1]
        ref[(1, 1, 1, 0)]=(0.803070541898-0.323924957494j)*x_ref[0] + ((-0.042765498562+0.0821647982096j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.41110843076-0.489598985813j)*x[0] + ((0.522011890304+0.722049078554j))*x[1]
        ref[(1, 1, 1, 1)]=(0.41110843076-0.489598985813j)*x_ref[0] + ((0.522011890304+0.722049078554j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(-0.0452256976551-0.0958857393711j)*x[0] + ((-0.219100368541+0.717673964214j))*x[1]
        ref[(1, 1, 2, 0)]=(-0.0452256976551-0.0958857393711j)*x_ref[0] + ((-0.219100368541+0.717673964214j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(-0.133165029569+0.168795274432j)*x[0] + ((0.985778241416-0.208352389993j))*x[1]
        ref[(1, 1, 2, 1)]=(-0.133165029569+0.168795274432j)*x_ref[0] + ((0.985778241416-0.208352389993j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.192015655446-0.334634124619j)*x[2]
            ref[(0, 0, 0, 0)]+=(0.192015655446-0.334634124619j)*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.164969695663+0.539565048917j)*x[2]
            ref[(0, 0, 0, 1)]+=(-0.164969695663+0.539565048917j)*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.442276351626+0.97919721534j)*x[2]
            ref[(0, 0, 1, 0)]+=(-0.442276351626+0.97919721534j)*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.217403596737-0.614660815407j)*x[2]
            ref[(0, 0, 1, 1)]+=(0.217403596737-0.614660815407j)*x_ref[2]
            arg[(0, 0, 2, 0)]+=(0.262005663026+0.880751947891j)*x[2]
            ref[(0, 0, 2, 0)]+=(0.262005663026+0.880751947891j)*x_ref[2]
            arg[(0, 0, 2, 1)]+=(-0.23894820938+0.81017231138j)*x[2]
            ref[(0, 0, 2, 1)]+=(-0.23894820938+0.81017231138j)*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.757113942306+0.161561028905j)*x[2]
            ref[(0, 1, 0, 0)]+=(-0.757113942306+0.161561028905j)*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.0612412983361+0.976666670569j)*x[2]
            ref[(0, 1, 0, 1)]+=(0.0612412983361+0.976666670569j)*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.612086334767-0.553290578591j)*x[2]
            ref[(0, 1, 1, 0)]+=(-0.612086334767-0.553290578591j)*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.237303721868-0.395907384545j)*x[2]
            ref[(0, 1, 1, 1)]+=(0.237303721868-0.395907384545j)*x_ref[2]
            arg[(0, 1, 2, 0)]+=(0.0575807675738-0.916184435064j)*x[2]
            ref[(0, 1, 2, 0)]+=(0.0575807675738-0.916184435064j)*x_ref[2]
            arg[(0, 1, 2, 1)]+=(0.530522291039+0.925065252377j)*x[2]
            ref[(0, 1, 2, 1)]+=(0.530522291039+0.925065252377j)*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.740190577229+0.129239224905j)*x[2]
            ref[(1, 0, 0, 0)]+=(-0.740190577229+0.129239224905j)*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.701596217027+0.879291047148j)*x[2]
            ref[(1, 0, 0, 1)]+=(0.701596217027+0.879291047148j)*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.41442054012-0.257576336009j)*x[2]
            ref[(1, 0, 1, 0)]+=(-0.41442054012-0.257576336009j)*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.900302749209+0.918779810764j)*x[2]
            ref[(1, 0, 1, 1)]+=(0.900302749209+0.918779810764j)*x_ref[2]
            arg[(1, 0, 2, 0)]+=(-0.54000046329+0.998220479079j)*x[2]
            ref[(1, 0, 2, 0)]+=(-0.54000046329+0.998220479079j)*x_ref[2]
            arg[(1, 0, 2, 1)]+=(-0.373806607235-0.128837947059j)*x[2]
            ref[(1, 0, 2, 1)]+=(-0.373806607235-0.128837947059j)*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.852775624824+0.471829348808j)*x[2]
            ref[(1, 1, 0, 0)]+=(-0.852775624824+0.471829348808j)*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.938459914812+0.617950606996j)*x[2]
            ref[(1, 1, 0, 1)]+=(-0.938459914812+0.617950606996j)*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.174570089758-0.0852807725577j)*x[2]
            ref[(1, 1, 1, 0)]+=(0.174570089758-0.0852807725577j)*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.603589564694-0.473741510776j)*x[2]
            ref[(1, 1, 1, 1)]+=(-0.603589564694-0.473741510776j)*x_ref[2]
            arg[(1, 1, 2, 0)]+=(-0.128233330561+0.395059068231j)*x[2]
            ref[(1, 1, 2, 0)]+=(-0.128233330561+0.395059068231j)*x_ref[2]
            arg[(1, 1, 2, 1)]+=(-0.255876321512+0.644601425588j)*x[2]
            ref[(1, 1, 2, 1)]+=(-0.255876321512+0.644601425588j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.453237802057+0.0495428370345j)*x[0] + ((-0.149648569235-0.871478461315j))*x[1]
        ref=(0.453237802057+0.0495428370345j)*x_ref[0] + ((-0.149648569235-0.871478461315j))*x_ref[1]
        if dim==3:
            arg+=((-0.632745813471+0.448784476028j))*x[2]
            ref+=((-0.632745813471+0.448784476028j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=(-0.707188711253-0.265701292917j)*x[0] + ((0.743624179223+0.0460964903483j))*x[1]
        ref[(0,)]=(-0.707188711253-0.265701292917j)*x_ref[0] + ((0.743624179223+0.0460964903483j))*x_ref[1]
        arg[(1,)]=(-0.729698710766+0.438352147154j)*x[0] + ((-0.0972213739885+0.313042222293j))*x[1]
        ref[(1,)]=(-0.729698710766+0.438352147154j)*x_ref[0] + ((-0.0972213739885+0.313042222293j))*x_ref[1]
        arg[(2,)]=(-0.949391639257-0.831409289648j)*x[0] + ((0.855758045591-0.613986207377j))*x[1]
        ref[(2,)]=(-0.949391639257-0.831409289648j)*x_ref[0] + ((0.855758045591-0.613986207377j))*x_ref[1]
        arg[(3,)]=(0.3313078969-0.815483228424j)*x[0] + ((0.689509252082+0.00558994941987j))*x[1]
        ref[(3,)]=(0.3313078969-0.815483228424j)*x_ref[0] + ((0.689509252082+0.00558994941987j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.198334628459-0.664433865188j)*x[2]
            ref[(0,)]+=(0.198334628459-0.664433865188j)*x_ref[2]
            arg[(1,)]+=(0.0460478854808-0.740887330866j)*x[2]
            ref[(1,)]+=(0.0460478854808-0.740887330866j)*x_ref[2]
            arg[(2,)]+=(-0.188331735836-0.0248168127729j)*x[2]
            ref[(2,)]+=(-0.188331735836-0.0248168127729j)*x_ref[2]
            arg[(3,)]+=(-0.957143998804-0.974260641204j)*x[2]
            ref[(3,)]+=(-0.957143998804-0.974260641204j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref = Data(0,(2, 2),w_ref)
        arg[(0, 0)]=(-0.400087854119+0.428824074356j)*x[0] + ((-0.659651946695-0.347777419927j))*x[1]
        ref[(0, 0)]=(-0.400087854119+0.428824074356j)*x_ref[0] + ((-0.659651946695-0.347777419927j))*x_ref[1]
        arg[(0, 1)]=(-0.478915423099-0.859242116728j)*x[0] + ((-0.103939198868+0.780393790479j))*x[1]
        ref[(0, 1)]=(-0.478915423099-0.859242116728j)*x_ref[0] + ((-0.103939198868+0.780393790479j))*x_ref[1]
        arg[(1, 0)]=(0.344237277367+0.684348188387j)*x[0] + ((-0.510527659104-0.284669174296j))*x[1]
        ref[(1, 0)]=(0.344237277367+0.684348188387j)*x_ref[0] + ((-0.510527659104-0.284669174296j))*x_ref[1]
        arg[(1, 1)]=(-0.748808168948-0.171619397931j)*x[0] + ((-0.561150521925-0.115832807805j))*x[1]
        ref[(1, 1)]=(-0.748808168948-0.171619397931j)*x_ref[0] + ((-0.561150521925-0.115832807805j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.719132012836-0.855306180539j)*x[2]
            ref[(0, 0)]+=(0.719132012836-0.855306180539j)*x_ref[2]
            arg[(0, 1)]+=(0.563066838592+0.740234337337j)*x[2]
            ref[(0, 1)]+=(0.563066838592+0.740234337337j)*x_ref[2]
            arg[(1, 0)]+=(-0.0164663732209+0.400861360906j)*x[2]
            ref[(1, 0)]+=(-0.0164663732209+0.400861360906j)*x_ref[2]
            arg[(1, 1)]+=(0.89995085266-0.589729937869j)*x[2]
            ref[(1, 1)]+=(0.89995085266-0.589729937869j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 4),w)
        ref = Data(0,(3, 3, 4),w_ref)
        arg[(0, 0, 0)]=(-0.496783880056-0.731110923177j)*x[0] + ((-0.548083894273-0.503614927877j))*x[1]
        ref[(0, 0, 0)]=(-0.496783880056-0.731110923177j)*x_ref[0] + ((-0.548083894273-0.503614927877j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.317797091897-0.110547930594j)*x[0] + ((-0.908238187924+0.335846697578j))*x[1]
        ref[(0, 0, 1)]=(-0.317797091897-0.110547930594j)*x_ref[0] + ((-0.908238187924+0.335846697578j))*x_ref[1]
        arg[(0, 0, 2)]=(0.111671580169-0.899491944464j)*x[0] + ((-0.99069999717-0.807033862641j))*x[1]
        ref[(0, 0, 2)]=(0.111671580169-0.899491944464j)*x_ref[0] + ((-0.99069999717-0.807033862641j))*x_ref[1]
        arg[(0, 0, 3)]=(0.459236850084+0.152474527166j)*x[0] + ((0.573423829402-0.517809492174j))*x[1]
        ref[(0, 0, 3)]=(0.459236850084+0.152474527166j)*x_ref[0] + ((0.573423829402-0.517809492174j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.403468427753+0.769289267781j)*x[0] + ((-0.574572572673+0.257495793974j))*x[1]
        ref[(0, 1, 0)]=(-0.403468427753+0.769289267781j)*x_ref[0] + ((-0.574572572673+0.257495793974j))*x_ref[1]
        arg[(0, 1, 1)]=(0.628375752508+0.492040095315j)*x[0] + ((-0.409855139174+0.942020068146j))*x[1]
        ref[(0, 1, 1)]=(0.628375752508+0.492040095315j)*x_ref[0] + ((-0.409855139174+0.942020068146j))*x_ref[1]
        arg[(0, 1, 2)]=(0.0935017773455-0.698889576835j)*x[0] + ((-0.203969736084+0.512364535888j))*x[1]
        ref[(0, 1, 2)]=(0.0935017773455-0.698889576835j)*x_ref[0] + ((-0.203969736084+0.512364535888j))*x_ref[1]
        arg[(0, 1, 3)]=(-0.249213095442-0.274480511609j)*x[0] + ((-0.501220638035+0.898551995584j))*x[1]
        ref[(0, 1, 3)]=(-0.249213095442-0.274480511609j)*x_ref[0] + ((-0.501220638035+0.898551995584j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.0457136933687+0.490473627032j)*x[0] + ((0.691759561728+0.650207164728j))*x[1]
        ref[(0, 2, 0)]=(-0.0457136933687+0.490473627032j)*x_ref[0] + ((0.691759561728+0.650207164728j))*x_ref[1]
        arg[(0, 2, 1)]=(-0.585955439865+0.954260062834j)*x[0] + ((0.750263572473-0.358772302815j))*x[1]
        ref[(0, 2, 1)]=(-0.585955439865+0.954260062834j)*x_ref[0] + ((0.750263572473-0.358772302815j))*x_ref[1]
        arg[(0, 2, 2)]=(-0.726058400868+0.161638573213j)*x[0] + ((-0.817989398345+0.178021253496j))*x[1]
        ref[(0, 2, 2)]=(-0.726058400868+0.161638573213j)*x_ref[0] + ((-0.817989398345+0.178021253496j))*x_ref[1]
        arg[(0, 2, 3)]=(0.945108586778-0.160193967942j)*x[0] + ((-0.675764345176+0.366543833974j))*x[1]
        ref[(0, 2, 3)]=(0.945108586778-0.160193967942j)*x_ref[0] + ((-0.675764345176+0.366543833974j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.954316515733+0.0514245976377j)*x[0] + ((-0.449703530164+0.316963991604j))*x[1]
        ref[(1, 0, 0)]=(-0.954316515733+0.0514245976377j)*x_ref[0] + ((-0.449703530164+0.316963991604j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.553048673742-0.784651190034j)*x[0] + ((0.801539627838+0.331547857347j))*x[1]
        ref[(1, 0, 1)]=(-0.553048673742-0.784651190034j)*x_ref[0] + ((0.801539627838+0.331547857347j))*x_ref[1]
        arg[(1, 0, 2)]=(-0.853353988991-0.183462198705j)*x[0] + ((0.713377714733-0.537244353237j))*x[1]
        ref[(1, 0, 2)]=(-0.853353988991-0.183462198705j)*x_ref[0] + ((0.713377714733-0.537244353237j))*x_ref[1]
        arg[(1, 0, 3)]=(0.632167492128-0.705419111544j)*x[0] + ((-0.755725687867+0.969112362456j))*x[1]
        ref[(1, 0, 3)]=(0.632167492128-0.705419111544j)*x_ref[0] + ((-0.755725687867+0.969112362456j))*x_ref[1]
        arg[(1, 1, 0)]=(0.53349357888+0.410302135813j)*x[0] + ((0.321546200317+0.974583846018j))*x[1]
        ref[(1, 1, 0)]=(0.53349357888+0.410302135813j)*x_ref[0] + ((0.321546200317+0.974583846018j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.736071352248-0.677909059035j)*x[0] + ((0.313535614987+0.319032020404j))*x[1]
        ref[(1, 1, 1)]=(-0.736071352248-0.677909059035j)*x_ref[0] + ((0.313535614987+0.319032020404j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.889329896036+0.804290286904j)*x[0] + ((-0.996707329524+0.768035574032j))*x[1]
        ref[(1, 1, 2)]=(-0.889329896036+0.804290286904j)*x_ref[0] + ((-0.996707329524+0.768035574032j))*x_ref[1]
        arg[(1, 1, 3)]=(-0.681799051201-0.399532391457j)*x[0] + ((-0.459206399668+0.74940405327j))*x[1]
        ref[(1, 1, 3)]=(-0.681799051201-0.399532391457j)*x_ref[0] + ((-0.459206399668+0.74940405327j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.210522604397-0.182170213801j)*x[0] + ((-0.599255993582+0.473335875323j))*x[1]
        ref[(1, 2, 0)]=(-0.210522604397-0.182170213801j)*x_ref[0] + ((-0.599255993582+0.473335875323j))*x_ref[1]
        arg[(1, 2, 1)]=(0.564930213545+0.835282165106j)*x[0] + ((0.302293832777+0.242518809922j))*x[1]
        ref[(1, 2, 1)]=(0.564930213545+0.835282165106j)*x_ref[0] + ((0.302293832777+0.242518809922j))*x_ref[1]
        arg[(1, 2, 2)]=(0.706049399528-0.524639317438j)*x[0] + ((-0.404809619536-0.603660566735j))*x[1]
        ref[(1, 2, 2)]=(0.706049399528-0.524639317438j)*x_ref[0] + ((-0.404809619536-0.603660566735j))*x_ref[1]
        arg[(1, 2, 3)]=(-0.737474740975+0.692115433407j)*x[0] + ((-0.0250631663978-0.831026889681j))*x[1]
        ref[(1, 2, 3)]=(-0.737474740975+0.692115433407j)*x_ref[0] + ((-0.0250631663978-0.831026889681j))*x_ref[1]
        arg[(2, 0, 0)]=(0.246190728156-0.0258075551096j)*x[0] + ((-0.395393940455-0.0047113958945j))*x[1]
        ref[(2, 0, 0)]=(0.246190728156-0.0258075551096j)*x_ref[0] + ((-0.395393940455-0.0047113958945j))*x_ref[1]
        arg[(2, 0, 1)]=(-0.493738054992-0.892096727494j)*x[0] + ((0.970898514872+0.709780925996j))*x[1]
        ref[(2, 0, 1)]=(-0.493738054992-0.892096727494j)*x_ref[0] + ((0.970898514872+0.709780925996j))*x_ref[1]
        arg[(2, 0, 2)]=(-0.21476511421-0.756680040784j)*x[0] + ((0.779516849053+0.193464464844j))*x[1]
        ref[(2, 0, 2)]=(-0.21476511421-0.756680040784j)*x_ref[0] + ((0.779516849053+0.193464464844j))*x_ref[1]
        arg[(2, 0, 3)]=(-0.74824781229-0.727589996217j)*x[0] + ((-0.610068793995+0.362949363323j))*x[1]
        ref[(2, 0, 3)]=(-0.74824781229-0.727589996217j)*x_ref[0] + ((-0.610068793995+0.362949363323j))*x_ref[1]
        arg[(2, 1, 0)]=(-0.166995476182+0.269518089384j)*x[0] + ((-0.730126254544+0.425618908894j))*x[1]
        ref[(2, 1, 0)]=(-0.166995476182+0.269518089384j)*x_ref[0] + ((-0.730126254544+0.425618908894j))*x_ref[1]
        arg[(2, 1, 1)]=(-0.252343617765-0.817938420978j)*x[0] + ((0.370335454139-0.66874765844j))*x[1]
        ref[(2, 1, 1)]=(-0.252343617765-0.817938420978j)*x_ref[0] + ((0.370335454139-0.66874765844j))*x_ref[1]
        arg[(2, 1, 2)]=(0.784580893563+0.0689217059091j)*x[0] + ((0.359971526227-0.797499001745j))*x[1]
        ref[(2, 1, 2)]=(0.784580893563+0.0689217059091j)*x_ref[0] + ((0.359971526227-0.797499001745j))*x_ref[1]
        arg[(2, 1, 3)]=(-0.950232789998+0.369349786086j)*x[0] + ((-0.206367542107+0.920227972932j))*x[1]
        ref[(2, 1, 3)]=(-0.950232789998+0.369349786086j)*x_ref[0] + ((-0.206367542107+0.920227972932j))*x_ref[1]
        arg[(2, 2, 0)]=(0.276517561357-0.318768534126j)*x[0] + ((0.981686135858-0.29733611842j))*x[1]
        ref[(2, 2, 0)]=(0.276517561357-0.318768534126j)*x_ref[0] + ((0.981686135858-0.29733611842j))*x_ref[1]
        arg[(2, 2, 1)]=(0.324978320689-0.402614805811j)*x[0] + ((-0.511153868896+0.430376188391j))*x[1]
        ref[(2, 2, 1)]=(0.324978320689-0.402614805811j)*x_ref[0] + ((-0.511153868896+0.430376188391j))*x_ref[1]
        arg[(2, 2, 2)]=(0.0726012628997+0.369435966454j)*x[0] + ((-0.867692111055+0.293889074817j))*x[1]
        ref[(2, 2, 2)]=(0.0726012628997+0.369435966454j)*x_ref[0] + ((-0.867692111055+0.293889074817j))*x_ref[1]
        arg[(2, 2, 3)]=(0.547336733798-0.162418058042j)*x[0] + ((0.592723715147+0.734663078683j))*x[1]
        ref[(2, 2, 3)]=(0.547336733798-0.162418058042j)*x_ref[0] + ((0.592723715147+0.734663078683j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.759563306973+0.544212871263j)*x[2]
            ref[(0, 0, 0)]+=(-0.759563306973+0.544212871263j)*x_ref[2]
            arg[(0, 0, 1)]+=(0.827989666195-0.795950363474j)*x[2]
            ref[(0, 0, 1)]+=(0.827989666195-0.795950363474j)*x_ref[2]
            arg[(0, 0, 2)]+=(-0.502632313855+0.00773467009413j)*x[2]
            ref[(0, 0, 2)]+=(-0.502632313855+0.00773467009413j)*x_ref[2]
            arg[(0, 0, 3)]+=(-0.292041332006+0.385545489063j)*x[2]
            ref[(0, 0, 3)]+=(-0.292041332006+0.385545489063j)*x_ref[2]
            arg[(0, 1, 0)]+=(0.390445359594-0.263502064442j)*x[2]
            ref[(0, 1, 0)]+=(0.390445359594-0.263502064442j)*x_ref[2]
            arg[(0, 1, 1)]+=(-0.655540707536+0.231254051852j)*x[2]
            ref[(0, 1, 1)]+=(-0.655540707536+0.231254051852j)*x_ref[2]
            arg[(0, 1, 2)]+=(0.815094971227+0.430873233823j)*x[2]
            ref[(0, 1, 2)]+=(0.815094971227+0.430873233823j)*x_ref[2]
            arg[(0, 1, 3)]+=(-0.427908889017+0.0175316207874j)*x[2]
            ref[(0, 1, 3)]+=(-0.427908889017+0.0175316207874j)*x_ref[2]
            arg[(0, 2, 0)]+=(-0.80165280133+0.262756458426j)*x[2]
            ref[(0, 2, 0)]+=(-0.80165280133+0.262756458426j)*x_ref[2]
            arg[(0, 2, 1)]+=(0.879730463436-0.646303347298j)*x[2]
            ref[(0, 2, 1)]+=(0.879730463436-0.646303347298j)*x_ref[2]
            arg[(0, 2, 2)]+=(0.616679070107+0.512601795726j)*x[2]
            ref[(0, 2, 2)]+=(0.616679070107+0.512601795726j)*x_ref[2]
            arg[(0, 2, 3)]+=(-0.993811967068-0.386787435483j)*x[2]
            ref[(0, 2, 3)]+=(-0.993811967068-0.386787435483j)*x_ref[2]
            arg[(1, 0, 0)]+=(0.918886803823-0.225279048382j)*x[2]
            ref[(1, 0, 0)]+=(0.918886803823-0.225279048382j)*x_ref[2]
            arg[(1, 0, 1)]+=(-0.31346115806+0.699606587282j)*x[2]
            ref[(1, 0, 1)]+=(-0.31346115806+0.699606587282j)*x_ref[2]
            arg[(1, 0, 2)]+=(-0.587105736654-0.346954465843j)*x[2]
            ref[(1, 0, 2)]+=(-0.587105736654-0.346954465843j)*x_ref[2]
            arg[(1, 0, 3)]+=(-0.322343241796+0.532319887045j)*x[2]
            ref[(1, 0, 3)]+=(-0.322343241796+0.532319887045j)*x_ref[2]
            arg[(1, 1, 0)]+=(0.0166637589902-0.77126692011j)*x[2]
            ref[(1, 1, 0)]+=(0.0166637589902-0.77126692011j)*x_ref[2]
            arg[(1, 1, 1)]+=(-0.70906005922-0.648163774032j)*x[2]
            ref[(1, 1, 1)]+=(-0.70906005922-0.648163774032j)*x_ref[2]
            arg[(1, 1, 2)]+=(0.80707263714+0.871060621606j)*x[2]
            ref[(1, 1, 2)]+=(0.80707263714+0.871060621606j)*x_ref[2]
            arg[(1, 1, 3)]+=(0.739062483095+0.415235795786j)*x[2]
            ref[(1, 1, 3)]+=(0.739062483095+0.415235795786j)*x_ref[2]
            arg[(1, 2, 0)]+=(-0.122267368678+0.0803617115429j)*x[2]
            ref[(1, 2, 0)]+=(-0.122267368678+0.0803617115429j)*x_ref[2]
            arg[(1, 2, 1)]+=(-0.228682188018-0.786401941415j)*x[2]
            ref[(1, 2, 1)]+=(-0.228682188018-0.786401941415j)*x_ref[2]
            arg[(1, 2, 2)]+=(0.296205603152+0.0380514849227j)*x[2]
            ref[(1, 2, 2)]+=(0.296205603152+0.0380514849227j)*x_ref[2]
            arg[(1, 2, 3)]+=(-0.291107348897-0.738936407009j)*x[2]
            ref[(1, 2, 3)]+=(-0.291107348897-0.738936407009j)*x_ref[2]
            arg[(2, 0, 0)]+=(-0.354747539112-0.231241469053j)*x[2]
            ref[(2, 0, 0)]+=(-0.354747539112-0.231241469053j)*x_ref[2]
            arg[(2, 0, 1)]+=(0.731659118851-0.414610140228j)*x[2]
            ref[(2, 0, 1)]+=(0.731659118851-0.414610140228j)*x_ref[2]
            arg[(2, 0, 2)]+=(-0.870643539408-0.6781498581j)*x[2]
            ref[(2, 0, 2)]+=(-0.870643539408-0.6781498581j)*x_ref[2]
            arg[(2, 0, 3)]+=(0.727767491561+0.199033255258j)*x[2]
            ref[(2, 0, 3)]+=(0.727767491561+0.199033255258j)*x_ref[2]
            arg[(2, 1, 0)]+=(0.147824821519-0.386351336011j)*x[2]
            ref[(2, 1, 0)]+=(0.147824821519-0.386351336011j)*x_ref[2]
            arg[(2, 1, 1)]+=(0.833602976748-0.429265568771j)*x[2]
            ref[(2, 1, 1)]+=(0.833602976748-0.429265568771j)*x_ref[2]
            arg[(2, 1, 2)]+=(-0.671259581338+0.506576842481j)*x[2]
            ref[(2, 1, 2)]+=(-0.671259581338+0.506576842481j)*x_ref[2]
            arg[(2, 1, 3)]+=(-0.0502957208924+0.948508134767j)*x[2]
            ref[(2, 1, 3)]+=(-0.0502957208924+0.948508134767j)*x_ref[2]
            arg[(2, 2, 0)]+=(-0.197911620799+0.858212443084j)*x[2]
            ref[(2, 2, 0)]+=(-0.197911620799+0.858212443084j)*x_ref[2]
            arg[(2, 2, 1)]+=(0.0577126950944-0.028222483296j)*x[2]
            ref[(2, 2, 1)]+=(0.0577126950944-0.028222483296j)*x_ref[2]
            arg[(2, 2, 2)]+=(-0.880746649032-0.190227693109j)*x[2]
            ref[(2, 2, 2)]+=(-0.880746649032-0.190227693109j)*x_ref[2]
            arg[(2, 2, 3)]+=(0.770734244653-0.641087282609j)*x[2]
            ref[(2, 2, 3)]+=(0.770734244653-0.641087282609j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 2, 2),w)
        ref = Data(0,(2, 4, 2, 2),w_ref)
        arg[(0, 0, 0, 0)]=(0.254938625975-0.750108738674j)*x[0] + ((0.9795068829+0.170212222208j))*x[1]
        ref[(0, 0, 0, 0)]=(0.254938625975-0.750108738674j)*x_ref[0] + ((0.9795068829+0.170212222208j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.589527202396-0.281887511167j)*x[0] + ((-0.381535286593+0.841955461542j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.589527202396-0.281887511167j)*x_ref[0] + ((-0.381535286593+0.841955461542j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.23869745458+0.535385236554j)*x[0] + ((-0.317579036443-0.114456142113j))*x[1]
        ref[(0, 0, 1, 0)]=(0.23869745458+0.535385236554j)*x_ref[0] + ((-0.317579036443-0.114456142113j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.148164777467-0.350948666764j)*x[0] + ((-0.261701997046-0.504439625479j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.148164777467-0.350948666764j)*x_ref[0] + ((-0.261701997046-0.504439625479j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(-0.898104832716+0.0475920664056j)*x[0] + ((-0.105609309168-0.700297536166j))*x[1]
        ref[(0, 1, 0, 0)]=(-0.898104832716+0.0475920664056j)*x_ref[0] + ((-0.105609309168-0.700297536166j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.0568611868973-0.78672033292j)*x[0] + ((0.2948578872-0.168525415997j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.0568611868973-0.78672033292j)*x_ref[0] + ((0.2948578872-0.168525415997j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.14668799596+0.49022399426j)*x[0] + ((0.921575136862-0.0136692299811j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.14668799596+0.49022399426j)*x_ref[0] + ((0.921575136862-0.0136692299811j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.417182294264-0.128883768255j)*x[0] + ((-0.0618785496068+0.0193098489501j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.417182294264-0.128883768255j)*x_ref[0] + ((-0.0618785496068+0.0193098489501j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.0241522681524+0.112350424275j)*x[0] + ((-0.382880194747+0.308128779215j))*x[1]
        ref[(0, 2, 0, 0)]=(0.0241522681524+0.112350424275j)*x_ref[0] + ((-0.382880194747+0.308128779215j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(0.115138780236-0.715013109513j)*x[0] + ((0.230132218563+0.893341512267j))*x[1]
        ref[(0, 2, 0, 1)]=(0.115138780236-0.715013109513j)*x_ref[0] + ((0.230132218563+0.893341512267j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.299944122443+0.701815715203j)*x[0] + ((-0.818307724124+0.0960362427325j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.299944122443+0.701815715203j)*x_ref[0] + ((-0.818307724124+0.0960362427325j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(-0.842706330523-0.429394074305j)*x[0] + ((-0.98928112798-0.246867016j))*x[1]
        ref[(0, 2, 1, 1)]=(-0.842706330523-0.429394074305j)*x_ref[0] + ((-0.98928112798-0.246867016j))*x_ref[1]
        arg[(0, 3, 0, 0)]=(-0.105494518838+0.849007009288j)*x[0] + ((-0.578528446191+0.698991837825j))*x[1]
        ref[(0, 3, 0, 0)]=(-0.105494518838+0.849007009288j)*x_ref[0] + ((-0.578528446191+0.698991837825j))*x_ref[1]
        arg[(0, 3, 0, 1)]=(0.356424680024+0.246118721365j)*x[0] + ((-0.35535611253-0.575107426319j))*x[1]
        ref[(0, 3, 0, 1)]=(0.356424680024+0.246118721365j)*x_ref[0] + ((-0.35535611253-0.575107426319j))*x_ref[1]
        arg[(0, 3, 1, 0)]=(-0.913384464353+0.944725594079j)*x[0] + ((-0.974713775288+0.345234878172j))*x[1]
        ref[(0, 3, 1, 0)]=(-0.913384464353+0.944725594079j)*x_ref[0] + ((-0.974713775288+0.345234878172j))*x_ref[1]
        arg[(0, 3, 1, 1)]=(0.728358519746+0.870732666567j)*x[0] + ((0.961164610739+0.581348224686j))*x[1]
        ref[(0, 3, 1, 1)]=(0.728358519746+0.870732666567j)*x_ref[0] + ((0.961164610739+0.581348224686j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.642721471139+0.965474797101j)*x[0] + ((-0.485711477349+0.201992687474j))*x[1]
        ref[(1, 0, 0, 0)]=(0.642721471139+0.965474797101j)*x_ref[0] + ((-0.485711477349+0.201992687474j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.975768397435-0.0244275201027j)*x[0] + ((0.184120712292+0.300369461319j))*x[1]
        ref[(1, 0, 0, 1)]=(0.975768397435-0.0244275201027j)*x_ref[0] + ((0.184120712292+0.300369461319j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.0756504675704+0.470505329689j)*x[0] + ((-0.795651246759+0.466457054446j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.0756504675704+0.470505329689j)*x_ref[0] + ((-0.795651246759+0.466457054446j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.209224665295-0.262748768139j)*x[0] + ((-0.238796150597-0.222305248506j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.209224665295-0.262748768139j)*x_ref[0] + ((-0.238796150597-0.222305248506j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.541767578754+0.232135861856j)*x[0] + ((-0.419400395955+0.797278053305j))*x[1]
        ref[(1, 1, 0, 0)]=(0.541767578754+0.232135861856j)*x_ref[0] + ((-0.419400395955+0.797278053305j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.206125749948+0.477899082304j)*x[0] + ((-0.108538776189+0.970079034851j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.206125749948+0.477899082304j)*x_ref[0] + ((-0.108538776189+0.970079034851j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.0865485921308-0.813972196279j)*x[0] + ((-0.47966356149+0.642111522674j))*x[1]
        ref[(1, 1, 1, 0)]=(0.0865485921308-0.813972196279j)*x_ref[0] + ((-0.47966356149+0.642111522674j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.321842232639+0.758204747755j)*x[0] + ((-0.468932867203+0.656069115608j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.321842232639+0.758204747755j)*x_ref[0] + ((-0.468932867203+0.656069115608j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(0.284971949969+0.0481135418398j)*x[0] + ((-0.0487798642777+0.25294019997j))*x[1]
        ref[(1, 2, 0, 0)]=(0.284971949969+0.0481135418398j)*x_ref[0] + ((-0.0487798642777+0.25294019997j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.843657746205-0.47960424643j)*x[0] + ((-0.693624103633+0.321053333196j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.843657746205-0.47960424643j)*x_ref[0] + ((-0.693624103633+0.321053333196j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(-0.701483238619+0.0354087304193j)*x[0] + ((0.940980130807+0.454058856624j))*x[1]
        ref[(1, 2, 1, 0)]=(-0.701483238619+0.0354087304193j)*x_ref[0] + ((0.940980130807+0.454058856624j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.982304635057+0.880900983434j)*x[0] + ((0.585673222632+0.0524405421206j))*x[1]
        ref[(1, 2, 1, 1)]=(0.982304635057+0.880900983434j)*x_ref[0] + ((0.585673222632+0.0524405421206j))*x_ref[1]
        arg[(1, 3, 0, 0)]=(-0.0535438828716+0.93575208527j)*x[0] + ((-0.7230105588-0.902577177639j))*x[1]
        ref[(1, 3, 0, 0)]=(-0.0535438828716+0.93575208527j)*x_ref[0] + ((-0.7230105588-0.902577177639j))*x_ref[1]
        arg[(1, 3, 0, 1)]=(0.656016260432+0.371197022592j)*x[0] + ((0.509875872665-0.39627158072j))*x[1]
        ref[(1, 3, 0, 1)]=(0.656016260432+0.371197022592j)*x_ref[0] + ((0.509875872665-0.39627158072j))*x_ref[1]
        arg[(1, 3, 1, 0)]=(-0.722890460009-0.919116527928j)*x[0] + ((-0.997883506206-0.399200595309j))*x[1]
        ref[(1, 3, 1, 0)]=(-0.722890460009-0.919116527928j)*x_ref[0] + ((-0.997883506206-0.399200595309j))*x_ref[1]
        arg[(1, 3, 1, 1)]=(0.917156148469-0.279245499457j)*x[0] + ((-0.263140116055-0.650049203683j))*x[1]
        ref[(1, 3, 1, 1)]=(0.917156148469-0.279245499457j)*x_ref[0] + ((-0.263140116055-0.650049203683j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.162945569303+0.184586019098j)*x[2]
            ref[(0, 0, 0, 0)]+=(0.162945569303+0.184586019098j)*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.441522817839-0.921055314031j)*x[2]
            ref[(0, 0, 0, 1)]+=(0.441522817839-0.921055314031j)*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.848912331901-0.721789007952j)*x[2]
            ref[(0, 0, 1, 0)]+=(-0.848912331901-0.721789007952j)*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.448042061892-0.931249360022j)*x[2]
            ref[(0, 0, 1, 1)]+=(0.448042061892-0.931249360022j)*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.0183334774856-0.799467345043j)*x[2]
            ref[(0, 1, 0, 0)]+=(-0.0183334774856-0.799467345043j)*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.250132563666-0.440418031708j)*x[2]
            ref[(0, 1, 0, 1)]+=(0.250132563666-0.440418031708j)*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.0279232999094+0.799011740309j)*x[2]
            ref[(0, 1, 1, 0)]+=(-0.0279232999094+0.799011740309j)*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.794916649805-0.41223023969j)*x[2]
            ref[(0, 1, 1, 1)]+=(0.794916649805-0.41223023969j)*x_ref[2]
            arg[(0, 2, 0, 0)]+=(-0.638886121262-0.835534411994j)*x[2]
            ref[(0, 2, 0, 0)]+=(-0.638886121262-0.835534411994j)*x_ref[2]
            arg[(0, 2, 0, 1)]+=(0.0616169467268-0.160966298338j)*x[2]
            ref[(0, 2, 0, 1)]+=(0.0616169467268-0.160966298338j)*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.46272761447+0.193092916889j)*x[2]
            ref[(0, 2, 1, 0)]+=(-0.46272761447+0.193092916889j)*x_ref[2]
            arg[(0, 2, 1, 1)]+=(-0.633300071109+0.506219138044j)*x[2]
            ref[(0, 2, 1, 1)]+=(-0.633300071109+0.506219138044j)*x_ref[2]
            arg[(0, 3, 0, 0)]+=(0.197651709996+0.620650910411j)*x[2]
            ref[(0, 3, 0, 0)]+=(0.197651709996+0.620650910411j)*x_ref[2]
            arg[(0, 3, 0, 1)]+=(-0.650731496939+0.874835165632j)*x[2]
            ref[(0, 3, 0, 1)]+=(-0.650731496939+0.874835165632j)*x_ref[2]
            arg[(0, 3, 1, 0)]+=(-0.726852289117-0.236088490269j)*x[2]
            ref[(0, 3, 1, 0)]+=(-0.726852289117-0.236088490269j)*x_ref[2]
            arg[(0, 3, 1, 1)]+=(-0.156175302736-0.0109204595885j)*x[2]
            ref[(0, 3, 1, 1)]+=(-0.156175302736-0.0109204595885j)*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.487047078215-0.783625739242j)*x[2]
            ref[(1, 0, 0, 0)]+=(-0.487047078215-0.783625739242j)*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.82473661688+0.237114766138j)*x[2]
            ref[(1, 0, 0, 1)]+=(0.82473661688+0.237114766138j)*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.0928591496955-0.652664887047j)*x[2]
            ref[(1, 0, 1, 0)]+=(0.0928591496955-0.652664887047j)*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.837840937445-0.448735574214j)*x[2]
            ref[(1, 0, 1, 1)]+=(0.837840937445-0.448735574214j)*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.161044729944-0.653859011039j)*x[2]
            ref[(1, 1, 0, 0)]+=(0.161044729944-0.653859011039j)*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.115711736022+0.847842834063j)*x[2]
            ref[(1, 1, 0, 1)]+=(-0.115711736022+0.847842834063j)*x_ref[2]
            arg[(1, 1, 1, 0)]+=(-0.241416665023-0.462073689892j)*x[2]
            ref[(1, 1, 1, 0)]+=(-0.241416665023-0.462073689892j)*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.587428742967-0.518732664909j)*x[2]
            ref[(1, 1, 1, 1)]+=(-0.587428742967-0.518732664909j)*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.350139277308+0.780526808108j)*x[2]
            ref[(1, 2, 0, 0)]+=(0.350139277308+0.780526808108j)*x_ref[2]
            arg[(1, 2, 0, 1)]+=(0.371868251942-0.358288011251j)*x[2]
            ref[(1, 2, 0, 1)]+=(0.371868251942-0.358288011251j)*x_ref[2]
            arg[(1, 2, 1, 0)]+=(0.0509869380993+0.0436791692515j)*x[2]
            ref[(1, 2, 1, 0)]+=(0.0509869380993+0.0436791692515j)*x_ref[2]
            arg[(1, 2, 1, 1)]+=(-0.92590019674+0.445717407658j)*x[2]
            ref[(1, 2, 1, 1)]+=(-0.92590019674+0.445717407658j)*x_ref[2]
            arg[(1, 3, 0, 0)]+=(-0.518108956344-0.978141208991j)*x[2]
            ref[(1, 3, 0, 0)]+=(-0.518108956344-0.978141208991j)*x_ref[2]
            arg[(1, 3, 0, 1)]+=(0.598746210059+0.639033657136j)*x[2]
            ref[(1, 3, 0, 1)]+=(0.598746210059+0.639033657136j)*x_ref[2]
            arg[(1, 3, 1, 0)]+=(-0.217568570422-0.0736084170811j)*x[2]
            ref[(1, 3, 1, 0)]+=(-0.217568570422-0.0736084170811j)*x_ref[2]
            arg[(1, 3, 1, 1)]+=(-0.614497416177-0.372983618578j)*x[2]
            ref[(1, 3, 1, 1)]+=(-0.614497416177-0.372983618578j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank0(self):
        """
        tests interpolation of rank 0 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.00167353632305+0.937199962674j)*x[0]**o + ((-0.699180037159-0.77918932974j))*x[0] + ((-0.803131285077-0.891719518309j))*x[1]**o + ((-0.380050024856+0.298803911604j))*x[1]
        ref=(-0.00167353632305+0.937199962674j)*x_ref[0]**o + ((-0.699180037159-0.77918932974j))*x_ref[0] + ((-0.803131285077-0.891719518309j))*x_ref[1]**o + ((-0.380050024856+0.298803911604j))*x_ref[1]
        if dim==3:
            arg+=((0.503219099289-0.19414902301j))*x[2]**o + ((-0.0054066573979-0.342360954916j))*x[2]
            ref+=((0.503219099289-0.19414902301j))*x_ref[2]**o + ((-0.0054066573979-0.342360954916j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank1(self):
        """
        tests interpolation of rank 1 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=(0.409038231695+0.738542446534j)*x[0]**o + ((-0.620995441609-0.0425117529506j))*x[0] + ((-0.970382704845+0.341289630625j))*x[1]**o + ((-0.244410597482-0.0116346455175j))*x[1]
        ref[(0,)]=(0.409038231695+0.738542446534j)*x_ref[0]**o + ((-0.620995441609-0.0425117529506j))*x_ref[0] + ((-0.970382704845+0.341289630625j))*x_ref[1]**o + ((-0.244410597482-0.0116346455175j))*x_ref[1]
        arg[(1,)]=(-0.930016265696+0.417037062078j)*x[0]**o + ((0.143870896766+0.606053747679j))*x[0] + ((-0.736070436415-0.678009868579j))*x[1]**o + ((0.221047267545+0.519390840598j))*x[1]
        ref[(1,)]=(-0.930016265696+0.417037062078j)*x_ref[0]**o + ((0.143870896766+0.606053747679j))*x_ref[0] + ((-0.736070436415-0.678009868579j))*x_ref[1]**o + ((0.221047267545+0.519390840598j))*x_ref[1]
        arg[(2,)]=(-0.48034333085+0.116969238332j)*x[0]**o + ((0.721343522417+0.943347971454j))*x[0] + ((-0.609557516546+0.682363679043j))*x[1]**o + ((-0.810293049323-0.57790264555j))*x[1]
        ref[(2,)]=(-0.48034333085+0.116969238332j)*x_ref[0]**o + ((0.721343522417+0.943347971454j))*x_ref[0] + ((-0.609557516546+0.682363679043j))*x_ref[1]**o + ((-0.810293049323-0.57790264555j))*x_ref[1]
        arg[(3,)]=(0.398460609539-0.472742903165j)*x[0]**o + ((-0.337508011655+0.138644960467j))*x[0] + ((-0.946340678033-0.913759183023j))*x[1]**o + ((-0.436360366604+0.836377294034j))*x[1]
        ref[(3,)]=(0.398460609539-0.472742903165j)*x_ref[0]**o + ((-0.337508011655+0.138644960467j))*x_ref[0] + ((-0.946340678033-0.913759183023j))*x_ref[1]**o + ((-0.436360366604+0.836377294034j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.510525633978-0.818529352262j)*x[2]**o + ((0.226104758184+0.436588640899j))*x[2]
            ref[(0,)]+=(-0.510525633978-0.818529352262j)*x_ref[2]**o + ((0.226104758184+0.436588640899j))*x_ref[2]
            arg[(1,)]+=(-0.263323736856-0.30333365549j)*x[2]**o + ((0.444712699611-0.702467571926j))*x[2]
            ref[(1,)]+=(-0.263323736856-0.30333365549j)*x_ref[2]**o + ((0.444712699611-0.702467571926j))*x_ref[2]
            arg[(2,)]+=(0.79239116744-0.103147565959j)*x[2]**o + ((0.366301328854+0.0989548719217j))*x[2]
            ref[(2,)]+=(0.79239116744-0.103147565959j)*x_ref[2]**o + ((0.366301328854+0.0989548719217j))*x_ref[2]
            arg[(3,)]+=(0.96981652896+0.523449526446j)*x[2]**o + ((-0.664958627706+0.823041882365j))*x[2]
            ref[(3,)]+=(0.96981652896+0.523449526446j)*x_ref[2]**o + ((-0.664958627706+0.823041882365j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank2(self):
        """
        tests interpolation of rank 2 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2),w)
        ref = Data(0,(4, 2),w_ref)
        arg[(0, 0)]=(0.244205688636-0.771246655387j)*x[0]**o + ((-0.0681853757641+0.39217288985j))*x[0] + ((0.930678951928+0.50822840032j))*x[1]**o + ((0.213616694534+0.612168681696j))*x[1]
        ref[(0, 0)]=(0.244205688636-0.771246655387j)*x_ref[0]**o + ((-0.0681853757641+0.39217288985j))*x_ref[0] + ((0.930678951928+0.50822840032j))*x_ref[1]**o + ((0.213616694534+0.612168681696j))*x_ref[1]
        arg[(0, 1)]=(-0.463468904588+0.541604057159j)*x[0]**o + ((0.457054341561+0.569627625409j))*x[0] + ((-0.420760038419-0.54995767469j))*x[1]**o + ((0.630796195875-0.848972794982j))*x[1]
        ref[(0, 1)]=(-0.463468904588+0.541604057159j)*x_ref[0]**o + ((0.457054341561+0.569627625409j))*x_ref[0] + ((-0.420760038419-0.54995767469j))*x_ref[1]**o + ((0.630796195875-0.848972794982j))*x_ref[1]
        arg[(1, 0)]=(-0.392909751565+0.274775627125j)*x[0]**o + ((0.316088247235-0.682742039159j))*x[0] + ((0.484396109358+0.728924606327j))*x[1]**o + ((0.685978112776+0.333866720782j))*x[1]
        ref[(1, 0)]=(-0.392909751565+0.274775627125j)*x_ref[0]**o + ((0.316088247235-0.682742039159j))*x_ref[0] + ((0.484396109358+0.728924606327j))*x_ref[1]**o + ((0.685978112776+0.333866720782j))*x_ref[1]
        arg[(1, 1)]=(0.675052847128-0.140182959093j)*x[0]**o + ((-0.176483649826+0.111433984829j))*x[0] + ((-0.71725026241+0.45356775968j))*x[1]**o + ((-0.244291664107+0.268703997569j))*x[1]
        ref[(1, 1)]=(0.675052847128-0.140182959093j)*x_ref[0]**o + ((-0.176483649826+0.111433984829j))*x_ref[0] + ((-0.71725026241+0.45356775968j))*x_ref[1]**o + ((-0.244291664107+0.268703997569j))*x_ref[1]
        arg[(2, 0)]=(0.088680332801+0.71398064968j)*x[0]**o + ((0.624731379064-0.698634396874j))*x[0] + ((0.606600717956+0.0737233353049j))*x[1]**o + ((-0.37533604942-0.802048967896j))*x[1]
        ref[(2, 0)]=(0.088680332801+0.71398064968j)*x_ref[0]**o + ((0.624731379064-0.698634396874j))*x_ref[0] + ((0.606600717956+0.0737233353049j))*x_ref[1]**o + ((-0.37533604942-0.802048967896j))*x_ref[1]
        arg[(2, 1)]=(-0.714871140255-0.90438916663j)*x[0]**o + ((0.0742649824858-0.996126278246j))*x[0] + ((-0.167477562871+0.0751063517327j))*x[1]**o + ((-0.156622653966+0.330367702269j))*x[1]
        ref[(2, 1)]=(-0.714871140255-0.90438916663j)*x_ref[0]**o + ((0.0742649824858-0.996126278246j))*x_ref[0] + ((-0.167477562871+0.0751063517327j))*x_ref[1]**o + ((-0.156622653966+0.330367702269j))*x_ref[1]
        arg[(3, 0)]=(-0.427505055412+0.988213375094j)*x[0]**o + ((0.222052333078-0.761492866124j))*x[0] + ((-0.439130316713-0.514891216888j))*x[1]**o + ((-0.31733833116+0.840671043038j))*x[1]
        ref[(3, 0)]=(-0.427505055412+0.988213375094j)*x_ref[0]**o + ((0.222052333078-0.761492866124j))*x_ref[0] + ((-0.439130316713-0.514891216888j))*x_ref[1]**o + ((-0.31733833116+0.840671043038j))*x_ref[1]
        arg[(3, 1)]=(0.167442571617+0.482332708781j)*x[0]**o + ((0.66623900933-0.161250019408j))*x[0] + ((-0.973521191516-0.189877222403j))*x[1]**o + ((0.0388848037279+0.0950165618157j))*x[1]
        ref[(3, 1)]=(0.167442571617+0.482332708781j)*x_ref[0]**o + ((0.66623900933-0.161250019408j))*x_ref[0] + ((-0.973521191516-0.189877222403j))*x_ref[1]**o + ((0.0388848037279+0.0950165618157j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(-0.168228391082+0.643081133273j)*x[2]**o + ((0.914156337976-0.757654911871j))*x[2]
            ref[(0, 0)]+=(-0.168228391082+0.643081133273j)*x_ref[2]**o + ((0.914156337976-0.757654911871j))*x_ref[2]
            arg[(0, 1)]+=(-0.934831097471-0.52152381166j)*x[2]**o + ((-0.0845129881942+0.0373136422947j))*x[2]
            ref[(0, 1)]+=(-0.934831097471-0.52152381166j)*x_ref[2]**o + ((-0.0845129881942+0.0373136422947j))*x_ref[2]
            arg[(1, 0)]+=(-0.783568077086+0.888416650464j)*x[2]**o + ((0.479331337067-0.559187942253j))*x[2]
            ref[(1, 0)]+=(-0.783568077086+0.888416650464j)*x_ref[2]**o + ((0.479331337067-0.559187942253j))*x_ref[2]
            arg[(1, 1)]+=(-0.715075312453+0.46720711745j)*x[2]**o + ((0.661985283977-0.652253559447j))*x[2]
            ref[(1, 1)]+=(-0.715075312453+0.46720711745j)*x_ref[2]**o + ((0.661985283977-0.652253559447j))*x_ref[2]
            arg[(2, 0)]+=(0.628414511086+0.514256104126j)*x[2]**o + ((0.490899063709+0.0284083173152j))*x[2]
            ref[(2, 0)]+=(0.628414511086+0.514256104126j)*x_ref[2]**o + ((0.490899063709+0.0284083173152j))*x_ref[2]
            arg[(2, 1)]+=(0.0595738821725+0.873171937811j)*x[2]**o + ((0.883995952324-0.219508977064j))*x[2]
            ref[(2, 1)]+=(0.0595738821725+0.873171937811j)*x_ref[2]**o + ((0.883995952324-0.219508977064j))*x_ref[2]
            arg[(3, 0)]+=(0.405645690828+0.997121403911j)*x[2]**o + ((-0.00793426905046+0.530391655859j))*x[2]
            ref[(3, 0)]+=(0.405645690828+0.997121403911j)*x_ref[2]**o + ((-0.00793426905046+0.530391655859j))*x_ref[2]
            arg[(3, 1)]+=(0.240168982137-0.544043204666j)*x[2]**o + ((0.901122701512-0.254058040698j))*x[2]
            ref[(3, 1)]+=(0.240168982137-0.544043204666j)*x_ref[2]**o + ((0.901122701512-0.254058040698j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank3(self):
        """
        tests interpolation of rank 3 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 4),w)
        ref = Data(0,(4, 3, 4),w_ref)
        arg[(0, 0, 0)]=(-0.415990018833-0.474126466314j)*x[0]**o + ((0.838686956529+0.914695926042j))*x[0] + ((-0.529873989519-0.373579739403j))*x[1]**o + ((0.192070957086-0.831758558607j))*x[1]
        ref[(0, 0, 0)]=(-0.415990018833-0.474126466314j)*x_ref[0]**o + ((0.838686956529+0.914695926042j))*x_ref[0] + ((-0.529873989519-0.373579739403j))*x_ref[1]**o + ((0.192070957086-0.831758558607j))*x_ref[1]
        arg[(0, 0, 1)]=(0.200562193317-0.309525922422j)*x[0]**o + ((0.418352506417+0.964583643201j))*x[0] + ((-0.439019085282-0.234679941901j))*x[1]**o + ((-0.977979985189+0.330367648618j))*x[1]
        ref[(0, 0, 1)]=(0.200562193317-0.309525922422j)*x_ref[0]**o + ((0.418352506417+0.964583643201j))*x_ref[0] + ((-0.439019085282-0.234679941901j))*x_ref[1]**o + ((-0.977979985189+0.330367648618j))*x_ref[1]
        arg[(0, 0, 2)]=(-0.484335916373+0.324262478303j)*x[0]**o + ((-0.143669725904+0.945847647278j))*x[0] + ((0.990396664818-0.107930475347j))*x[1]**o + ((-0.763918788316-0.248069852845j))*x[1]
        ref[(0, 0, 2)]=(-0.484335916373+0.324262478303j)*x_ref[0]**o + ((-0.143669725904+0.945847647278j))*x_ref[0] + ((0.990396664818-0.107930475347j))*x_ref[1]**o + ((-0.763918788316-0.248069852845j))*x_ref[1]
        arg[(0, 0, 3)]=(-0.0609206032408+0.571275882505j)*x[0]**o + ((0.848100115482-0.0249586625677j))*x[0] + ((0.120828298124-0.675162961554j))*x[1]**o + ((0.979466104994-0.283258790948j))*x[1]
        ref[(0, 0, 3)]=(-0.0609206032408+0.571275882505j)*x_ref[0]**o + ((0.848100115482-0.0249586625677j))*x_ref[0] + ((0.120828298124-0.675162961554j))*x_ref[1]**o + ((0.979466104994-0.283258790948j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.458549535358+0.326097944648j)*x[0]**o + ((-0.290354611557-0.739103763294j))*x[0] + ((0.307330922386+0.0839823421934j))*x[1]**o + ((0.257941060973+0.570950597507j))*x[1]
        ref[(0, 1, 0)]=(-0.458549535358+0.326097944648j)*x_ref[0]**o + ((-0.290354611557-0.739103763294j))*x_ref[0] + ((0.307330922386+0.0839823421934j))*x_ref[1]**o + ((0.257941060973+0.570950597507j))*x_ref[1]
        arg[(0, 1, 1)]=(0.155330477851+0.218240476682j)*x[0]**o + ((-0.228526438792-0.481043864661j))*x[0] + ((0.957408887872-0.714393489962j))*x[1]**o + ((-0.462806309911+0.119471737785j))*x[1]
        ref[(0, 1, 1)]=(0.155330477851+0.218240476682j)*x_ref[0]**o + ((-0.228526438792-0.481043864661j))*x_ref[0] + ((0.957408887872-0.714393489962j))*x_ref[1]**o + ((-0.462806309911+0.119471737785j))*x_ref[1]
        arg[(0, 1, 2)]=(0.591116035531-0.488772657666j)*x[0]**o + ((-0.372942024845-0.128050443434j))*x[0] + ((-0.913322773466-0.891014330705j))*x[1]**o + ((-0.739894210837+0.455919249701j))*x[1]
        ref[(0, 1, 2)]=(0.591116035531-0.488772657666j)*x_ref[0]**o + ((-0.372942024845-0.128050443434j))*x_ref[0] + ((-0.913322773466-0.891014330705j))*x_ref[1]**o + ((-0.739894210837+0.455919249701j))*x_ref[1]
        arg[(0, 1, 3)]=(-0.796454292341+0.0229739052315j)*x[0]**o + ((0.488807015631+0.572401819537j))*x[0] + ((-0.664222231696-0.289456626949j))*x[1]**o + ((0.129433269875-0.118570384811j))*x[1]
        ref[(0, 1, 3)]=(-0.796454292341+0.0229739052315j)*x_ref[0]**o + ((0.488807015631+0.572401819537j))*x_ref[0] + ((-0.664222231696-0.289456626949j))*x_ref[1]**o + ((0.129433269875-0.118570384811j))*x_ref[1]
        arg[(0, 2, 0)]=(0.98836335815-0.400398275487j)*x[0]**o + ((-0.23168038264-0.483058043748j))*x[0] + ((0.0556962081364+0.537324104311j))*x[1]**o + ((0.374387360017+0.509365957073j))*x[1]
        ref[(0, 2, 0)]=(0.98836335815-0.400398275487j)*x_ref[0]**o + ((-0.23168038264-0.483058043748j))*x_ref[0] + ((0.0556962081364+0.537324104311j))*x_ref[1]**o + ((0.374387360017+0.509365957073j))*x_ref[1]
        arg[(0, 2, 1)]=(-0.426088442222+0.056458134772j)*x[0]**o + ((0.111446073359+0.650320356184j))*x[0] + ((-0.475068219-0.184659475052j))*x[1]**o + ((-0.178392275847+0.584508793655j))*x[1]
        ref[(0, 2, 1)]=(-0.426088442222+0.056458134772j)*x_ref[0]**o + ((0.111446073359+0.650320356184j))*x_ref[0] + ((-0.475068219-0.184659475052j))*x_ref[1]**o + ((-0.178392275847+0.584508793655j))*x_ref[1]
        arg[(0, 2, 2)]=(-0.817656251717-0.324846619301j)*x[0]**o + ((-0.194180767901-0.0965879726096j))*x[0] + ((0.256177866621+0.0510464751j))*x[1]**o + ((0.58753328973-0.111061485277j))*x[1]
        ref[(0, 2, 2)]=(-0.817656251717-0.324846619301j)*x_ref[0]**o + ((-0.194180767901-0.0965879726096j))*x_ref[0] + ((0.256177866621+0.0510464751j))*x_ref[1]**o + ((0.58753328973-0.111061485277j))*x_ref[1]
        arg[(0, 2, 3)]=(-0.785045686773-0.679811836523j)*x[0]**o + ((-0.169528568036+0.893546568868j))*x[0] + ((-0.865165807222-0.894144405582j))*x[1]**o + ((0.413546984076+0.274999859844j))*x[1]
        ref[(0, 2, 3)]=(-0.785045686773-0.679811836523j)*x_ref[0]**o + ((-0.169528568036+0.893546568868j))*x_ref[0] + ((-0.865165807222-0.894144405582j))*x_ref[1]**o + ((0.413546984076+0.274999859844j))*x_ref[1]
        arg[(1, 0, 0)]=(0.494407404324-0.849365767763j)*x[0]**o + ((-0.423891009934+0.154396708802j))*x[0] + ((0.943756135964+0.135356657005j))*x[1]**o + ((0.450144866503-0.942308764646j))*x[1]
        ref[(1, 0, 0)]=(0.494407404324-0.849365767763j)*x_ref[0]**o + ((-0.423891009934+0.154396708802j))*x_ref[0] + ((0.943756135964+0.135356657005j))*x_ref[1]**o + ((0.450144866503-0.942308764646j))*x_ref[1]
        arg[(1, 0, 1)]=(0.558607668883+0.185347833341j)*x[0]**o + ((-0.335617850733+0.381140092966j))*x[0] + ((0.896667294953-0.713077196557j))*x[1]**o + ((-0.592129907811-0.546620293577j))*x[1]
        ref[(1, 0, 1)]=(0.558607668883+0.185347833341j)*x_ref[0]**o + ((-0.335617850733+0.381140092966j))*x_ref[0] + ((0.896667294953-0.713077196557j))*x_ref[1]**o + ((-0.592129907811-0.546620293577j))*x_ref[1]
        arg[(1, 0, 2)]=(0.691155831012-0.209180646733j)*x[0]**o + ((0.112265733142-0.0462588947369j))*x[0] + ((-0.944110033215-0.275591107053j))*x[1]**o + ((0.657249262463+0.100246622763j))*x[1]
        ref[(1, 0, 2)]=(0.691155831012-0.209180646733j)*x_ref[0]**o + ((0.112265733142-0.0462588947369j))*x_ref[0] + ((-0.944110033215-0.275591107053j))*x_ref[1]**o + ((0.657249262463+0.100246622763j))*x_ref[1]
        arg[(1, 0, 3)]=(-0.213917149386-0.51678087585j)*x[0]**o + ((-0.429782375801-0.375085036138j))*x[0] + ((0.577015991351+0.725889432785j))*x[1]**o + ((-0.183965129315-0.911836092898j))*x[1]
        ref[(1, 0, 3)]=(-0.213917149386-0.51678087585j)*x_ref[0]**o + ((-0.429782375801-0.375085036138j))*x_ref[0] + ((0.577015991351+0.725889432785j))*x_ref[1]**o + ((-0.183965129315-0.911836092898j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.112201616862-0.770672796518j)*x[0]**o + ((-0.0260482784155+0.975857353837j))*x[0] + ((-0.188339093411-0.929766965495j))*x[1]**o + ((0.160694183663-0.139968930787j))*x[1]
        ref[(1, 1, 0)]=(-0.112201616862-0.770672796518j)*x_ref[0]**o + ((-0.0260482784155+0.975857353837j))*x_ref[0] + ((-0.188339093411-0.929766965495j))*x_ref[1]**o + ((0.160694183663-0.139968930787j))*x_ref[1]
        arg[(1, 1, 1)]=(0.760445247177+0.177963569299j)*x[0]**o + ((-0.995222838632+0.538384243365j))*x[0] + ((-0.718194302972+0.628952415283j))*x[1]**o + ((0.246510958082-0.810682297228j))*x[1]
        ref[(1, 1, 1)]=(0.760445247177+0.177963569299j)*x_ref[0]**o + ((-0.995222838632+0.538384243365j))*x_ref[0] + ((-0.718194302972+0.628952415283j))*x_ref[1]**o + ((0.246510958082-0.810682297228j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.872711916146+0.559865614271j)*x[0]**o + ((-0.984533219995+0.130458085506j))*x[0] + ((0.144007831082+0.782061451394j))*x[1]**o + ((-0.861768048275+0.865363679959j))*x[1]
        ref[(1, 1, 2)]=(-0.872711916146+0.559865614271j)*x_ref[0]**o + ((-0.984533219995+0.130458085506j))*x_ref[0] + ((0.144007831082+0.782061451394j))*x_ref[1]**o + ((-0.861768048275+0.865363679959j))*x_ref[1]
        arg[(1, 1, 3)]=(0.145476651147+0.0820818133107j)*x[0]**o + ((-0.612061693799-0.653084159011j))*x[0] + ((-0.649253047629-0.0387136506882j))*x[1]**o + ((-0.538990133844-0.534078887876j))*x[1]
        ref[(1, 1, 3)]=(0.145476651147+0.0820818133107j)*x_ref[0]**o + ((-0.612061693799-0.653084159011j))*x_ref[0] + ((-0.649253047629-0.0387136506882j))*x_ref[1]**o + ((-0.538990133844-0.534078887876j))*x_ref[1]
        arg[(1, 2, 0)]=(0.575992934419+0.629731692417j)*x[0]**o + ((-0.540385016924-0.847583101651j))*x[0] + ((0.0965739067882-0.864687218408j))*x[1]**o + ((0.720427634575-0.588511733579j))*x[1]
        ref[(1, 2, 0)]=(0.575992934419+0.629731692417j)*x_ref[0]**o + ((-0.540385016924-0.847583101651j))*x_ref[0] + ((0.0965739067882-0.864687218408j))*x_ref[1]**o + ((0.720427634575-0.588511733579j))*x_ref[1]
        arg[(1, 2, 1)]=(0.761553200476-0.702934700449j)*x[0]**o + ((0.0508541971948-0.903926864259j))*x[0] + ((0.26923805159+0.130640473792j))*x[1]**o + ((0.476821061188-0.490189775076j))*x[1]
        ref[(1, 2, 1)]=(0.761553200476-0.702934700449j)*x_ref[0]**o + ((0.0508541971948-0.903926864259j))*x_ref[0] + ((0.26923805159+0.130640473792j))*x_ref[1]**o + ((0.476821061188-0.490189775076j))*x_ref[1]
        arg[(1, 2, 2)]=(0.72099328353-0.366550464907j)*x[0]**o + ((0.230622172284+0.112507451483j))*x[0] + ((0.292516008557+0.991429115676j))*x[1]**o + ((0.798115788396+0.336721252553j))*x[1]
        ref[(1, 2, 2)]=(0.72099328353-0.366550464907j)*x_ref[0]**o + ((0.230622172284+0.112507451483j))*x_ref[0] + ((0.292516008557+0.991429115676j))*x_ref[1]**o + ((0.798115788396+0.336721252553j))*x_ref[1]
        arg[(1, 2, 3)]=(-0.344400038238-0.350164062022j)*x[0]**o + ((0.858840824825-0.771875020809j))*x[0] + ((0.340103764123+0.0756263985967j))*x[1]**o + ((0.0334938276092+0.365714879923j))*x[1]
        ref[(1, 2, 3)]=(-0.344400038238-0.350164062022j)*x_ref[0]**o + ((0.858840824825-0.771875020809j))*x_ref[0] + ((0.340103764123+0.0756263985967j))*x_ref[1]**o + ((0.0334938276092+0.365714879923j))*x_ref[1]
        arg[(2, 0, 0)]=(0.513628158949-0.684235479819j)*x[0]**o + ((0.0213846405233+0.559490884689j))*x[0] + ((0.853093109926-0.147854772149j))*x[1]**o + ((-0.0676222314164-0.86799900014j))*x[1]
        ref[(2, 0, 0)]=(0.513628158949-0.684235479819j)*x_ref[0]**o + ((0.0213846405233+0.559490884689j))*x_ref[0] + ((0.853093109926-0.147854772149j))*x_ref[1]**o + ((-0.0676222314164-0.86799900014j))*x_ref[1]
        arg[(2, 0, 1)]=(-0.46180107505+0.323950113274j)*x[0]**o + ((-0.782542959587+0.824843941282j))*x[0] + ((-0.63919478121-0.206384395116j))*x[1]**o + ((-0.0586356061177+0.710309583722j))*x[1]
        ref[(2, 0, 1)]=(-0.46180107505+0.323950113274j)*x_ref[0]**o + ((-0.782542959587+0.824843941282j))*x_ref[0] + ((-0.63919478121-0.206384395116j))*x_ref[1]**o + ((-0.0586356061177+0.710309583722j))*x_ref[1]
        arg[(2, 0, 2)]=(0.828610292396-0.48059677622j)*x[0]**o + ((-0.477437739088-0.0141386899334j))*x[0] + ((0.280914329515+0.760137682756j))*x[1]**o + ((0.25465954071+0.85679944003j))*x[1]
        ref[(2, 0, 2)]=(0.828610292396-0.48059677622j)*x_ref[0]**o + ((-0.477437739088-0.0141386899334j))*x_ref[0] + ((0.280914329515+0.760137682756j))*x_ref[1]**o + ((0.25465954071+0.85679944003j))*x_ref[1]
        arg[(2, 0, 3)]=(0.231520446959+0.912627104148j)*x[0]**o + ((0.436060702628+0.341092050201j))*x[0] + ((0.25982806327+0.602858071185j))*x[1]**o + ((-0.143740762413+0.499621765167j))*x[1]
        ref[(2, 0, 3)]=(0.231520446959+0.912627104148j)*x_ref[0]**o + ((0.436060702628+0.341092050201j))*x_ref[0] + ((0.25982806327+0.602858071185j))*x_ref[1]**o + ((-0.143740762413+0.499621765167j))*x_ref[1]
        arg[(2, 1, 0)]=(-0.974546697999-0.920829318483j)*x[0]**o + ((-0.561441512877+0.121216031164j))*x[0] + ((0.802795358121+0.709962769609j))*x[1]**o + ((0.346771845282-0.179626406157j))*x[1]
        ref[(2, 1, 0)]=(-0.974546697999-0.920829318483j)*x_ref[0]**o + ((-0.561441512877+0.121216031164j))*x_ref[0] + ((0.802795358121+0.709962769609j))*x_ref[1]**o + ((0.346771845282-0.179626406157j))*x_ref[1]
        arg[(2, 1, 1)]=(-0.540270179915-0.708229500578j)*x[0]**o + ((-0.247319356943+0.67445459341j))*x[0] + ((0.974225924313-0.179861387928j))*x[1]**o + ((-0.807802238701-0.443884627768j))*x[1]
        ref[(2, 1, 1)]=(-0.540270179915-0.708229500578j)*x_ref[0]**o + ((-0.247319356943+0.67445459341j))*x_ref[0] + ((0.974225924313-0.179861387928j))*x_ref[1]**o + ((-0.807802238701-0.443884627768j))*x_ref[1]
        arg[(2, 1, 2)]=(0.712875233768-0.141418342161j)*x[0]**o + ((-0.284313888061+0.0299408794749j))*x[0] + ((0.190271449197-0.0328652933142j))*x[1]**o + ((0.922460818071+0.928253129128j))*x[1]
        ref[(2, 1, 2)]=(0.712875233768-0.141418342161j)*x_ref[0]**o + ((-0.284313888061+0.0299408794749j))*x_ref[0] + ((0.190271449197-0.0328652933142j))*x_ref[1]**o + ((0.922460818071+0.928253129128j))*x_ref[1]
        arg[(2, 1, 3)]=(0.843620645198-0.743210593557j)*x[0]**o + ((0.649642845871-0.999464090994j))*x[0] + ((0.263929048728+0.236794771994j))*x[1]**o + ((-0.934157212482-0.688345647444j))*x[1]
        ref[(2, 1, 3)]=(0.843620645198-0.743210593557j)*x_ref[0]**o + ((0.649642845871-0.999464090994j))*x_ref[0] + ((0.263929048728+0.236794771994j))*x_ref[1]**o + ((-0.934157212482-0.688345647444j))*x_ref[1]
        arg[(2, 2, 0)]=(-0.000927570635815+0.599583098615j)*x[0]**o + ((0.926145716191+0.995065001668j))*x[0] + ((-0.112037675702-0.221372969803j))*x[1]**o + ((-0.312637785256-0.886511039955j))*x[1]
        ref[(2, 2, 0)]=(-0.000927570635815+0.599583098615j)*x_ref[0]**o + ((0.926145716191+0.995065001668j))*x_ref[0] + ((-0.112037675702-0.221372969803j))*x_ref[1]**o + ((-0.312637785256-0.886511039955j))*x_ref[1]
        arg[(2, 2, 1)]=(0.0780245230763-0.248991386369j)*x[0]**o + ((-0.306082378513+0.163569050705j))*x[0] + ((0.804723903841+0.516027112849j))*x[1]**o + ((0.891995138884-0.616256239607j))*x[1]
        ref[(2, 2, 1)]=(0.0780245230763-0.248991386369j)*x_ref[0]**o + ((-0.306082378513+0.163569050705j))*x_ref[0] + ((0.804723903841+0.516027112849j))*x_ref[1]**o + ((0.891995138884-0.616256239607j))*x_ref[1]
        arg[(2, 2, 2)]=(-0.715792697703+0.256829799126j)*x[0]**o + ((0.612208351967-0.181393087082j))*x[0] + ((0.758712511332+0.0224776828061j))*x[1]**o + ((-0.231106859672-0.0187601208512j))*x[1]
        ref[(2, 2, 2)]=(-0.715792697703+0.256829799126j)*x_ref[0]**o + ((0.612208351967-0.181393087082j))*x_ref[0] + ((0.758712511332+0.0224776828061j))*x_ref[1]**o + ((-0.231106859672-0.0187601208512j))*x_ref[1]
        arg[(2, 2, 3)]=(0.697480271746+0.730522576942j)*x[0]**o + ((0.787707097181-0.0109528935609j))*x[0] + ((-0.383814237152+0.448389419056j))*x[1]**o + ((-0.665958991563-0.920504093463j))*x[1]
        ref[(2, 2, 3)]=(0.697480271746+0.730522576942j)*x_ref[0]**o + ((0.787707097181-0.0109528935609j))*x_ref[0] + ((-0.383814237152+0.448389419056j))*x_ref[1]**o + ((-0.665958991563-0.920504093463j))*x_ref[1]
        arg[(3, 0, 0)]=(-0.823312747446+0.592439691877j)*x[0]**o + ((0.776716337852+0.835818105991j))*x[0] + ((0.605690885517-0.352153874693j))*x[1]**o + ((-0.182526452746+0.030898054531j))*x[1]
        ref[(3, 0, 0)]=(-0.823312747446+0.592439691877j)*x_ref[0]**o + ((0.776716337852+0.835818105991j))*x_ref[0] + ((0.605690885517-0.352153874693j))*x_ref[1]**o + ((-0.182526452746+0.030898054531j))*x_ref[1]
        arg[(3, 0, 1)]=(-0.0687950795354+0.533698206895j)*x[0]**o + ((0.712989498642+0.999953389151j))*x[0] + ((-0.427747061402-0.996994137913j))*x[1]**o + ((0.629235159946+0.708997387617j))*x[1]
        ref[(3, 0, 1)]=(-0.0687950795354+0.533698206895j)*x_ref[0]**o + ((0.712989498642+0.999953389151j))*x_ref[0] + ((-0.427747061402-0.996994137913j))*x_ref[1]**o + ((0.629235159946+0.708997387617j))*x_ref[1]
        arg[(3, 0, 2)]=(0.709911497462+0.218576253782j)*x[0]**o + ((-0.667159599307+0.179656269516j))*x[0] + ((0.846297472979-0.134223853525j))*x[1]**o + ((-0.382689203353-0.360174937636j))*x[1]
        ref[(3, 0, 2)]=(0.709911497462+0.218576253782j)*x_ref[0]**o + ((-0.667159599307+0.179656269516j))*x_ref[0] + ((0.846297472979-0.134223853525j))*x_ref[1]**o + ((-0.382689203353-0.360174937636j))*x_ref[1]
        arg[(3, 0, 3)]=(0.0126847432047+0.117849399289j)*x[0]**o + ((0.782445891554-0.591871928119j))*x[0] + ((-0.397763841263+0.127938516306j))*x[1]**o + ((-0.835370446214-0.0789892566219j))*x[1]
        ref[(3, 0, 3)]=(0.0126847432047+0.117849399289j)*x_ref[0]**o + ((0.782445891554-0.591871928119j))*x_ref[0] + ((-0.397763841263+0.127938516306j))*x_ref[1]**o + ((-0.835370446214-0.0789892566219j))*x_ref[1]
        arg[(3, 1, 0)]=(-0.762411602332-0.227242813405j)*x[0]**o + ((-0.992473522629+0.134064639222j))*x[0] + ((0.169196775656+0.55929148266j))*x[1]**o + ((-0.244917135066-0.079635701942j))*x[1]
        ref[(3, 1, 0)]=(-0.762411602332-0.227242813405j)*x_ref[0]**o + ((-0.992473522629+0.134064639222j))*x_ref[0] + ((0.169196775656+0.55929148266j))*x_ref[1]**o + ((-0.244917135066-0.079635701942j))*x_ref[1]
        arg[(3, 1, 1)]=(-0.788466274471+0.420925111584j)*x[0]**o + ((0.460281378312-0.242574135218j))*x[0] + ((0.135768355627-0.00662498685588j))*x[1]**o + ((-0.907259299261+0.0894286279658j))*x[1]
        ref[(3, 1, 1)]=(-0.788466274471+0.420925111584j)*x_ref[0]**o + ((0.460281378312-0.242574135218j))*x_ref[0] + ((0.135768355627-0.00662498685588j))*x_ref[1]**o + ((-0.907259299261+0.0894286279658j))*x_ref[1]
        arg[(3, 1, 2)]=(0.0387260584448+0.464394428501j)*x[0]**o + ((-0.724261589341-0.110495379739j))*x[0] + ((0.438585573014+0.294031522785j))*x[1]**o + ((0.915420632694-0.740131919177j))*x[1]
        ref[(3, 1, 2)]=(0.0387260584448+0.464394428501j)*x_ref[0]**o + ((-0.724261589341-0.110495379739j))*x_ref[0] + ((0.438585573014+0.294031522785j))*x_ref[1]**o + ((0.915420632694-0.740131919177j))*x_ref[1]
        arg[(3, 1, 3)]=(0.0292238886489-0.826028514606j)*x[0]**o + ((0.181898659326-0.410619932911j))*x[0] + ((-0.927850292056-0.407280960329j))*x[1]**o + ((0.945911176196+0.390470680443j))*x[1]
        ref[(3, 1, 3)]=(0.0292238886489-0.826028514606j)*x_ref[0]**o + ((0.181898659326-0.410619932911j))*x_ref[0] + ((-0.927850292056-0.407280960329j))*x_ref[1]**o + ((0.945911176196+0.390470680443j))*x_ref[1]
        arg[(3, 2, 0)]=(-0.934088384368-0.294020755275j)*x[0]**o + ((0.778051813033-0.0185394757687j))*x[0] + ((0.732321526445-0.148230501242j))*x[1]**o + ((0.823476296216+0.208158189412j))*x[1]
        ref[(3, 2, 0)]=(-0.934088384368-0.294020755275j)*x_ref[0]**o + ((0.778051813033-0.0185394757687j))*x_ref[0] + ((0.732321526445-0.148230501242j))*x_ref[1]**o + ((0.823476296216+0.208158189412j))*x_ref[1]
        arg[(3, 2, 1)]=(0.964282435447-0.862534124307j)*x[0]**o + ((0.835572260896-0.921261132705j))*x[0] + ((0.0924149646836-0.928288771507j))*x[1]**o + ((-0.240854453843+0.927091019527j))*x[1]
        ref[(3, 2, 1)]=(0.964282435447-0.862534124307j)*x_ref[0]**o + ((0.835572260896-0.921261132705j))*x_ref[0] + ((0.0924149646836-0.928288771507j))*x_ref[1]**o + ((-0.240854453843+0.927091019527j))*x_ref[1]
        arg[(3, 2, 2)]=(-0.61702157407-0.707932116709j)*x[0]**o + ((0.234650107628+0.916178248132j))*x[0] + ((-0.616537681418-0.231969721801j))*x[1]**o + ((-0.112721015636+0.252053682011j))*x[1]
        ref[(3, 2, 2)]=(-0.61702157407-0.707932116709j)*x_ref[0]**o + ((0.234650107628+0.916178248132j))*x_ref[0] + ((-0.616537681418-0.231969721801j))*x_ref[1]**o + ((-0.112721015636+0.252053682011j))*x_ref[1]
        arg[(3, 2, 3)]=(-0.774401597635-0.705067434598j)*x[0]**o + ((0.786414486086-0.975475618726j))*x[0] + ((-0.631721971498-0.074665943739j))*x[1]**o + ((0.519641896137-0.0143600507066j))*x[1]
        ref[(3, 2, 3)]=(-0.774401597635-0.705067434598j)*x_ref[0]**o + ((0.786414486086-0.975475618726j))*x_ref[0] + ((-0.631721971498-0.074665943739j))*x_ref[1]**o + ((0.519641896137-0.0143600507066j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.628891272714-0.273169431348j)*x[2]**o + ((0.954790517826-0.801707960114j))*x[2]
            ref[(0, 0, 0)]+=(0.628891272714-0.273169431348j)*x_ref[2]**o + ((0.954790517826-0.801707960114j))*x_ref[2]
            arg[(0, 0, 1)]+=(0.644605032235+0.322785669518j)*x[2]**o + ((0.644081067683+0.655059695443j))*x[2]
            ref[(0, 0, 1)]+=(0.644605032235+0.322785669518j)*x_ref[2]**o + ((0.644081067683+0.655059695443j))*x_ref[2]
            arg[(0, 0, 2)]+=(8.33378638272e-05+0.44848979828j)*x[2]**o + ((0.757956529801+0.0589622891041j))*x[2]
            ref[(0, 0, 2)]+=(8.33378638272e-05+0.44848979828j)*x_ref[2]**o + ((0.757956529801+0.0589622891041j))*x_ref[2]
            arg[(0, 0, 3)]+=(-0.45329607169+0.853880392747j)*x[2]**o + ((0.758976374147-0.373205496488j))*x[2]
            ref[(0, 0, 3)]+=(-0.45329607169+0.853880392747j)*x_ref[2]**o + ((0.758976374147-0.373205496488j))*x_ref[2]
            arg[(0, 1, 0)]+=(-0.240715489644-0.387440142662j)*x[2]**o + ((0.715374697655-0.0402040796753j))*x[2]
            ref[(0, 1, 0)]+=(-0.240715489644-0.387440142662j)*x_ref[2]**o + ((0.715374697655-0.0402040796753j))*x_ref[2]
            arg[(0, 1, 1)]+=(-0.19565108149+0.683142768249j)*x[2]**o + ((0.121381780381+0.815653489596j))*x[2]
            ref[(0, 1, 1)]+=(-0.19565108149+0.683142768249j)*x_ref[2]**o + ((0.121381780381+0.815653489596j))*x_ref[2]
            arg[(0, 1, 2)]+=(-0.666059809613-0.573275490745j)*x[2]**o + ((-0.477735356292-0.675655175921j))*x[2]
            ref[(0, 1, 2)]+=(-0.666059809613-0.573275490745j)*x_ref[2]**o + ((-0.477735356292-0.675655175921j))*x_ref[2]
            arg[(0, 1, 3)]+=(-0.668963744615+0.721306143489j)*x[2]**o + ((0.426685019318-0.766464557871j))*x[2]
            ref[(0, 1, 3)]+=(-0.668963744615+0.721306143489j)*x_ref[2]**o + ((0.426685019318-0.766464557871j))*x_ref[2]
            arg[(0, 2, 0)]+=(-0.874981106247-0.663514713342j)*x[2]**o + ((0.415874347948+0.194030835306j))*x[2]
            ref[(0, 2, 0)]+=(-0.874981106247-0.663514713342j)*x_ref[2]**o + ((0.415874347948+0.194030835306j))*x_ref[2]
            arg[(0, 2, 1)]+=(-0.726342731991-0.239137520921j)*x[2]**o + ((0.848607363558-0.0996838400009j))*x[2]
            ref[(0, 2, 1)]+=(-0.726342731991-0.239137520921j)*x_ref[2]**o + ((0.848607363558-0.0996838400009j))*x_ref[2]
            arg[(0, 2, 2)]+=(-0.62644211976+0.103143211583j)*x[2]**o + ((0.227852081585-0.150331491472j))*x[2]
            ref[(0, 2, 2)]+=(-0.62644211976+0.103143211583j)*x_ref[2]**o + ((0.227852081585-0.150331491472j))*x_ref[2]
            arg[(0, 2, 3)]+=(-0.390454524886+0.709320411928j)*x[2]**o + ((-0.630217183148-0.75523881545j))*x[2]
            ref[(0, 2, 3)]+=(-0.390454524886+0.709320411928j)*x_ref[2]**o + ((-0.630217183148-0.75523881545j))*x_ref[2]
            arg[(1, 0, 0)]+=(-0.942874471397-0.319768414397j)*x[2]**o + ((0.996583529735-0.231084225913j))*x[2]
            ref[(1, 0, 0)]+=(-0.942874471397-0.319768414397j)*x_ref[2]**o + ((0.996583529735-0.231084225913j))*x_ref[2]
            arg[(1, 0, 1)]+=(0.415889734465-0.0708295001514j)*x[2]**o + ((-0.904548587439-0.639164244676j))*x[2]
            ref[(1, 0, 1)]+=(0.415889734465-0.0708295001514j)*x_ref[2]**o + ((-0.904548587439-0.639164244676j))*x_ref[2]
            arg[(1, 0, 2)]+=(0.096417382201-0.207168475098j)*x[2]**o + ((0.559975270721+0.164014823711j))*x[2]
            ref[(1, 0, 2)]+=(0.096417382201-0.207168475098j)*x_ref[2]**o + ((0.559975270721+0.164014823711j))*x_ref[2]
            arg[(1, 0, 3)]+=(0.109219275125+0.438104863245j)*x[2]**o + ((0.87337460635+0.663647530521j))*x[2]
            ref[(1, 0, 3)]+=(0.109219275125+0.438104863245j)*x_ref[2]**o + ((0.87337460635+0.663647530521j))*x_ref[2]
            arg[(1, 1, 0)]+=(0.838149301645-0.436644837966j)*x[2]**o + ((-0.742119360486-0.634844397444j))*x[2]
            ref[(1, 1, 0)]+=(0.838149301645-0.436644837966j)*x_ref[2]**o + ((-0.742119360486-0.634844397444j))*x_ref[2]
            arg[(1, 1, 1)]+=(0.762521281967-0.669330813713j)*x[2]**o + ((0.685756013737-0.147128608595j))*x[2]
            ref[(1, 1, 1)]+=(0.762521281967-0.669330813713j)*x_ref[2]**o + ((0.685756013737-0.147128608595j))*x_ref[2]
            arg[(1, 1, 2)]+=(-0.711508357982-0.742088253579j)*x[2]**o + ((0.538832808895-0.473069270728j))*x[2]
            ref[(1, 1, 2)]+=(-0.711508357982-0.742088253579j)*x_ref[2]**o + ((0.538832808895-0.473069270728j))*x_ref[2]
            arg[(1, 1, 3)]+=(-0.328369970671-0.885749481202j)*x[2]**o + ((-0.558640233362+0.387548240367j))*x[2]
            ref[(1, 1, 3)]+=(-0.328369970671-0.885749481202j)*x_ref[2]**o + ((-0.558640233362+0.387548240367j))*x_ref[2]
            arg[(1, 2, 0)]+=(0.448115093368-0.900511107576j)*x[2]**o + ((0.731404489529-0.0032375193189j))*x[2]
            ref[(1, 2, 0)]+=(0.448115093368-0.900511107576j)*x_ref[2]**o + ((0.731404489529-0.0032375193189j))*x_ref[2]
            arg[(1, 2, 1)]+=(0.172138295506-0.960715050633j)*x[2]**o + ((-0.0139621042174+0.958027055885j))*x[2]
            ref[(1, 2, 1)]+=(0.172138295506-0.960715050633j)*x_ref[2]**o + ((-0.0139621042174+0.958027055885j))*x_ref[2]
            arg[(1, 2, 2)]+=(0.342232189169-0.65261579548j)*x[2]**o + ((-0.66145796969+0.588384948387j))*x[2]
            ref[(1, 2, 2)]+=(0.342232189169-0.65261579548j)*x_ref[2]**o + ((-0.66145796969+0.588384948387j))*x_ref[2]
            arg[(1, 2, 3)]+=(-0.171159345721+0.227884824584j)*x[2]**o + ((-0.0952040066524-0.703450868724j))*x[2]
            ref[(1, 2, 3)]+=(-0.171159345721+0.227884824584j)*x_ref[2]**o + ((-0.0952040066524-0.703450868724j))*x_ref[2]
            arg[(2, 0, 0)]+=(0.468593041285+0.684938534155j)*x[2]**o + ((-0.960472098384-0.842468236904j))*x[2]
            ref[(2, 0, 0)]+=(0.468593041285+0.684938534155j)*x_ref[2]**o + ((-0.960472098384-0.842468236904j))*x_ref[2]
            arg[(2, 0, 1)]+=(0.503257592574-0.816099264532j)*x[2]**o + ((0.401352822512+0.497547688125j))*x[2]
            ref[(2, 0, 1)]+=(0.503257592574-0.816099264532j)*x_ref[2]**o + ((0.401352822512+0.497547688125j))*x_ref[2]
            arg[(2, 0, 2)]+=(0.886975741526+0.737595128553j)*x[2]**o + ((0.273350639371-0.931687928138j))*x[2]
            ref[(2, 0, 2)]+=(0.886975741526+0.737595128553j)*x_ref[2]**o + ((0.273350639371-0.931687928138j))*x_ref[2]
            arg[(2, 0, 3)]+=(-0.976327592756+0.282160213653j)*x[2]**o + ((0.126803768003-0.494068096762j))*x[2]
            ref[(2, 0, 3)]+=(-0.976327592756+0.282160213653j)*x_ref[2]**o + ((0.126803768003-0.494068096762j))*x_ref[2]
            arg[(2, 1, 0)]+=(-0.942279834517-0.345119839066j)*x[2]**o + ((0.297205419634+0.277796244245j))*x[2]
            ref[(2, 1, 0)]+=(-0.942279834517-0.345119839066j)*x_ref[2]**o + ((0.297205419634+0.277796244245j))*x_ref[2]
            arg[(2, 1, 1)]+=(0.111463396619-0.308833475896j)*x[2]**o + ((-0.467038799032+0.243610358188j))*x[2]
            ref[(2, 1, 1)]+=(0.111463396619-0.308833475896j)*x_ref[2]**o + ((-0.467038799032+0.243610358188j))*x_ref[2]
            arg[(2, 1, 2)]+=(0.0780599018412-0.988479387173j)*x[2]**o + ((-0.316443231395+0.219041786618j))*x[2]
            ref[(2, 1, 2)]+=(0.0780599018412-0.988479387173j)*x_ref[2]**o + ((-0.316443231395+0.219041786618j))*x_ref[2]
            arg[(2, 1, 3)]+=(0.838151131961-0.0117496339768j)*x[2]**o + ((-0.272634588035+0.611886393425j))*x[2]
            ref[(2, 1, 3)]+=(0.838151131961-0.0117496339768j)*x_ref[2]**o + ((-0.272634588035+0.611886393425j))*x_ref[2]
            arg[(2, 2, 0)]+=(0.688217251834-0.760018312481j)*x[2]**o + ((0.278596195391+0.19192530753j))*x[2]
            ref[(2, 2, 0)]+=(0.688217251834-0.760018312481j)*x_ref[2]**o + ((0.278596195391+0.19192530753j))*x_ref[2]
            arg[(2, 2, 1)]+=(0.668568077279+0.15139112824j)*x[2]**o + ((0.0594914072045-0.769450260752j))*x[2]
            ref[(2, 2, 1)]+=(0.668568077279+0.15139112824j)*x_ref[2]**o + ((0.0594914072045-0.769450260752j))*x_ref[2]
            arg[(2, 2, 2)]+=(0.334049040017+0.513881416731j)*x[2]**o + ((-0.899867921304+0.697421728621j))*x[2]
            ref[(2, 2, 2)]+=(0.334049040017+0.513881416731j)*x_ref[2]**o + ((-0.899867921304+0.697421728621j))*x_ref[2]
            arg[(2, 2, 3)]+=(-0.878538804265-0.913881732487j)*x[2]**o + ((-0.29090175603-0.173776012492j))*x[2]
            ref[(2, 2, 3)]+=(-0.878538804265-0.913881732487j)*x_ref[2]**o + ((-0.29090175603-0.173776012492j))*x_ref[2]
            arg[(3, 0, 0)]+=(0.847040111546-0.72932292965j)*x[2]**o + ((-0.267479728957-0.506959918165j))*x[2]
            ref[(3, 0, 0)]+=(0.847040111546-0.72932292965j)*x_ref[2]**o + ((-0.267479728957-0.506959918165j))*x_ref[2]
            arg[(3, 0, 1)]+=(0.783313125524-0.217526838407j)*x[2]**o + ((-0.074189488077-0.265106884999j))*x[2]
            ref[(3, 0, 1)]+=(0.783313125524-0.217526838407j)*x_ref[2]**o + ((-0.074189488077-0.265106884999j))*x_ref[2]
            arg[(3, 0, 2)]+=(-0.823151993741+0.160562364599j)*x[2]**o + ((-0.51788516759+0.175775467266j))*x[2]
            ref[(3, 0, 2)]+=(-0.823151993741+0.160562364599j)*x_ref[2]**o + ((-0.51788516759+0.175775467266j))*x_ref[2]
            arg[(3, 0, 3)]+=(0.242870798793+0.710015341798j)*x[2]**o + ((0.258041697124+0.42348800293j))*x[2]
            ref[(3, 0, 3)]+=(0.242870798793+0.710015341798j)*x_ref[2]**o + ((0.258041697124+0.42348800293j))*x_ref[2]
            arg[(3, 1, 0)]+=(-0.0527158523902+0.427686759531j)*x[2]**o + ((-0.129192111002+0.00413158371936j))*x[2]
            ref[(3, 1, 0)]+=(-0.0527158523902+0.427686759531j)*x_ref[2]**o + ((-0.129192111002+0.00413158371936j))*x_ref[2]
            arg[(3, 1, 1)]+=(0.263673361032-0.220439827915j)*x[2]**o + ((-0.873434059054-0.941159494735j))*x[2]
            ref[(3, 1, 1)]+=(0.263673361032-0.220439827915j)*x_ref[2]**o + ((-0.873434059054-0.941159494735j))*x_ref[2]
            arg[(3, 1, 2)]+=(-0.613824724876-0.851952489928j)*x[2]**o + ((0.0645621357539-0.913612415095j))*x[2]
            ref[(3, 1, 2)]+=(-0.613824724876-0.851952489928j)*x_ref[2]**o + ((0.0645621357539-0.913612415095j))*x_ref[2]
            arg[(3, 1, 3)]+=(-0.14482872368+0.711005151507j)*x[2]**o + ((-0.702313997095-0.37771164889j))*x[2]
            ref[(3, 1, 3)]+=(-0.14482872368+0.711005151507j)*x_ref[2]**o + ((-0.702313997095-0.37771164889j))*x_ref[2]
            arg[(3, 2, 0)]+=(0.379701099896+0.832737335409j)*x[2]**o + ((-0.986078876796-0.843055666632j))*x[2]
            ref[(3, 2, 0)]+=(0.379701099896+0.832737335409j)*x_ref[2]**o + ((-0.986078876796-0.843055666632j))*x_ref[2]
            arg[(3, 2, 1)]+=(-0.926508351459-0.762967517669j)*x[2]**o + ((-0.0922556034784-0.153264855573j))*x[2]
            ref[(3, 2, 1)]+=(-0.926508351459-0.762967517669j)*x_ref[2]**o + ((-0.0922556034784-0.153264855573j))*x_ref[2]
            arg[(3, 2, 2)]+=(-0.705324722449+0.226159778665j)*x[2]**o + ((0.0454596776717-0.942935600738j))*x[2]
            ref[(3, 2, 2)]+=(-0.705324722449+0.226159778665j)*x_ref[2]**o + ((0.0454596776717-0.942935600738j))*x_ref[2]
            arg[(3, 2, 3)]+=(0.508167403948+0.226029121242j)*x[2]**o + ((-0.0962348489666-0.583550982382j))*x[2]
            ref[(3, 2, 3)]+=(0.508167403948+0.226029121242j)*x_ref[2]**o + ((-0.0962348489666-0.583550982382j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank4(self):
        """
        tests interpolation of rank 4 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 2, 4),w)
        ref = Data(0,(3, 2, 2, 4),w_ref)
        arg[(0, 0, 0, 0)]=(0.932932556965-0.156399099421j)*x[0]**o + ((0.177522896692+0.905949152271j))*x[0] + ((0.446596910044-0.713583453876j))*x[1]**o + ((-0.991377640891-0.843107033381j))*x[1]
        ref[(0, 0, 0, 0)]=(0.932932556965-0.156399099421j)*x_ref[0]**o + ((0.177522896692+0.905949152271j))*x_ref[0] + ((0.446596910044-0.713583453876j))*x_ref[1]**o + ((-0.991377640891-0.843107033381j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.613778670032+0.260232332906j)*x[0]**o + ((-0.436178193308-0.935961289036j))*x[0] + ((0.0321857400082+0.805356842058j))*x[1]**o + ((-0.602663285054+0.0839825174588j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.613778670032+0.260232332906j)*x_ref[0]**o + ((-0.436178193308-0.935961289036j))*x_ref[0] + ((0.0321857400082+0.805356842058j))*x_ref[1]**o + ((-0.602663285054+0.0839825174588j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(-0.157516694328+0.878933826392j)*x[0]**o + ((0.978810371626+0.762109983702j))*x[0] + ((-0.429443118339+0.538382325594j))*x[1]**o + ((0.182995939102-0.632056800568j))*x[1]
        ref[(0, 0, 0, 2)]=(-0.157516694328+0.878933826392j)*x_ref[0]**o + ((0.978810371626+0.762109983702j))*x_ref[0] + ((-0.429443118339+0.538382325594j))*x_ref[1]**o + ((0.182995939102-0.632056800568j))*x_ref[1]
        arg[(0, 0, 0, 3)]=(0.00220866856706+0.224219039658j)*x[0]**o + ((0.191751017375-0.219000999065j))*x[0] + ((0.269469291869+0.106482788084j))*x[1]**o + ((0.865796200313+0.428207624754j))*x[1]
        ref[(0, 0, 0, 3)]=(0.00220866856706+0.224219039658j)*x_ref[0]**o + ((0.191751017375-0.219000999065j))*x_ref[0] + ((0.269469291869+0.106482788084j))*x_ref[1]**o + ((0.865796200313+0.428207624754j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.0700748890642+0.633529236977j)*x[0]**o + ((-0.652384609338-0.283662739153j))*x[0] + ((-0.960857712678-0.951904926361j))*x[1]**o + ((0.100406128787-0.356169998835j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.0700748890642+0.633529236977j)*x_ref[0]**o + ((-0.652384609338-0.283662739153j))*x_ref[0] + ((-0.960857712678-0.951904926361j))*x_ref[1]**o + ((0.100406128787-0.356169998835j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.419899887803-0.304049149331j)*x[0]**o + ((0.356571814954+0.462903320585j))*x[0] + ((0.7432053687+0.226735613361j))*x[1]**o + ((0.67969636484+0.676179808441j))*x[1]
        ref[(0, 0, 1, 1)]=(0.419899887803-0.304049149331j)*x_ref[0]**o + ((0.356571814954+0.462903320585j))*x_ref[0] + ((0.7432053687+0.226735613361j))*x_ref[1]**o + ((0.67969636484+0.676179808441j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(-0.58728300581+0.765725265132j)*x[0]**o + ((-0.186816317559-0.575470962069j))*x[0] + ((0.430272579294-0.0297176633095j))*x[1]**o + ((0.665315844017-0.89974211895j))*x[1]
        ref[(0, 0, 1, 2)]=(-0.58728300581+0.765725265132j)*x_ref[0]**o + ((-0.186816317559-0.575470962069j))*x_ref[0] + ((0.430272579294-0.0297176633095j))*x_ref[1]**o + ((0.665315844017-0.89974211895j))*x_ref[1]
        arg[(0, 0, 1, 3)]=(-0.899761144419+0.384645093029j)*x[0]**o + ((-0.157478764439+0.616731684958j))*x[0] + ((-0.66272097941+0.0549116728702j))*x[1]**o + ((0.282455205547-0.95451106318j))*x[1]
        ref[(0, 0, 1, 3)]=(-0.899761144419+0.384645093029j)*x_ref[0]**o + ((-0.157478764439+0.616731684958j))*x_ref[0] + ((-0.66272097941+0.0549116728702j))*x_ref[1]**o + ((0.282455205547-0.95451106318j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(-0.518389523964-0.886244965444j)*x[0]**o + ((-0.563678680959-0.944394478464j))*x[0] + ((-0.862797115916+0.928248856141j))*x[1]**o + ((0.558094485215+0.588753687631j))*x[1]
        ref[(0, 1, 0, 0)]=(-0.518389523964-0.886244965444j)*x_ref[0]**o + ((-0.563678680959-0.944394478464j))*x_ref[0] + ((-0.862797115916+0.928248856141j))*x_ref[1]**o + ((0.558094485215+0.588753687631j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.775177153467+0.653483675785j)*x[0]**o + ((0.593096935615+0.53677197567j))*x[0] + ((0.373654604215-0.143642375178j))*x[1]**o + ((-0.78995240821+0.245605350968j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.775177153467+0.653483675785j)*x_ref[0]**o + ((0.593096935615+0.53677197567j))*x_ref[0] + ((0.373654604215-0.143642375178j))*x_ref[1]**o + ((-0.78995240821+0.245605350968j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(-0.0645839189099+0.85399183776j)*x[0]**o + ((-0.878268944404+0.120459884292j))*x[0] + ((-0.73045092168-0.626857043697j))*x[1]**o + ((-0.554340956029-0.821705643831j))*x[1]
        ref[(0, 1, 0, 2)]=(-0.0645839189099+0.85399183776j)*x_ref[0]**o + ((-0.878268944404+0.120459884292j))*x_ref[0] + ((-0.73045092168-0.626857043697j))*x_ref[1]**o + ((-0.554340956029-0.821705643831j))*x_ref[1]
        arg[(0, 1, 0, 3)]=(-0.40235502957-0.24379584555j)*x[0]**o + ((-0.0851445832479-0.0120167949217j))*x[0] + ((-0.319256692723-0.657179451849j))*x[1]**o + ((0.117072452947-0.147254602014j))*x[1]
        ref[(0, 1, 0, 3)]=(-0.40235502957-0.24379584555j)*x_ref[0]**o + ((-0.0851445832479-0.0120167949217j))*x_ref[0] + ((-0.319256692723-0.657179451849j))*x_ref[1]**o + ((0.117072452947-0.147254602014j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.711529201359+0.220798206318j)*x[0]**o + ((-0.409169068349+0.91863054075j))*x[0] + ((0.225464865141-0.072465133928j))*x[1]**o + ((0.850708700705+0.934367580095j))*x[1]
        ref[(0, 1, 1, 0)]=(0.711529201359+0.220798206318j)*x_ref[0]**o + ((-0.409169068349+0.91863054075j))*x_ref[0] + ((0.225464865141-0.072465133928j))*x_ref[1]**o + ((0.850708700705+0.934367580095j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.559856783725+0.257657586537j)*x[0]**o + ((0.395978999145+0.718383130089j))*x[0] + ((-0.392899915269+0.775195464828j))*x[1]**o + ((-0.191433469754+0.951005560821j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.559856783725+0.257657586537j)*x_ref[0]**o + ((0.395978999145+0.718383130089j))*x_ref[0] + ((-0.392899915269+0.775195464828j))*x_ref[1]**o + ((-0.191433469754+0.951005560821j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(-0.0395497647875-0.162835136512j)*x[0]**o + ((0.32000489721+0.089493206321j))*x[0] + ((-0.835508308434+0.678814805456j))*x[1]**o + ((0.469217460263+0.356609753715j))*x[1]
        ref[(0, 1, 1, 2)]=(-0.0395497647875-0.162835136512j)*x_ref[0]**o + ((0.32000489721+0.089493206321j))*x_ref[0] + ((-0.835508308434+0.678814805456j))*x_ref[1]**o + ((0.469217460263+0.356609753715j))*x_ref[1]
        arg[(0, 1, 1, 3)]=(-0.55335891425+0.0437376376568j)*x[0]**o + ((0.0342618779942+0.732944176552j))*x[0] + ((0.102572044742-0.838445033939j))*x[1]**o + ((0.387974830133+0.314491363813j))*x[1]
        ref[(0, 1, 1, 3)]=(-0.55335891425+0.0437376376568j)*x_ref[0]**o + ((0.0342618779942+0.732944176552j))*x_ref[0] + ((0.102572044742-0.838445033939j))*x_ref[1]**o + ((0.387974830133+0.314491363813j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.189360043531+0.308758110104j)*x[0]**o + ((-0.0657606445038-0.235911495295j))*x[0] + ((0.997316999253-0.401455277106j))*x[1]**o + ((-0.425957589633+0.654537213831j))*x[1]
        ref[(1, 0, 0, 0)]=(0.189360043531+0.308758110104j)*x_ref[0]**o + ((-0.0657606445038-0.235911495295j))*x_ref[0] + ((0.997316999253-0.401455277106j))*x_ref[1]**o + ((-0.425957589633+0.654537213831j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(-0.698485531456-0.735938106722j)*x[0]**o + ((-0.166970516885+0.61842866682j))*x[0] + ((-0.426611289073+0.511664136269j))*x[1]**o + ((-0.00419977778225-0.256368388334j))*x[1]
        ref[(1, 0, 0, 1)]=(-0.698485531456-0.735938106722j)*x_ref[0]**o + ((-0.166970516885+0.61842866682j))*x_ref[0] + ((-0.426611289073+0.511664136269j))*x_ref[1]**o + ((-0.00419977778225-0.256368388334j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(-0.73563025132-0.103007838025j)*x[0]**o + ((0.44695305555+0.265265644674j))*x[0] + ((-0.605066983859+0.0803820781983j))*x[1]**o + ((0.19300257081-0.638540845129j))*x[1]
        ref[(1, 0, 0, 2)]=(-0.73563025132-0.103007838025j)*x_ref[0]**o + ((0.44695305555+0.265265644674j))*x_ref[0] + ((-0.605066983859+0.0803820781983j))*x_ref[1]**o + ((0.19300257081-0.638540845129j))*x_ref[1]
        arg[(1, 0, 0, 3)]=(-0.0701784413298+0.564962525669j)*x[0]**o + ((-0.675197469912+0.573614488631j))*x[0] + ((-0.700267960124+0.108234392919j))*x[1]**o + ((0.954577136355-0.881287370239j))*x[1]
        ref[(1, 0, 0, 3)]=(-0.0701784413298+0.564962525669j)*x_ref[0]**o + ((-0.675197469912+0.573614488631j))*x_ref[0] + ((-0.700267960124+0.108234392919j))*x_ref[1]**o + ((0.954577136355-0.881287370239j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.639834274933-0.897473777555j)*x[0]**o + ((0.728496903506+0.525732570653j))*x[0] + ((-0.369592606538+0.739502421513j))*x[1]**o + ((0.500892717527+0.45810379473j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.639834274933-0.897473777555j)*x_ref[0]**o + ((0.728496903506+0.525732570653j))*x_ref[0] + ((-0.369592606538+0.739502421513j))*x_ref[1]**o + ((0.500892717527+0.45810379473j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.176032272158+0.74726698089j)*x[0]**o + ((0.336379677937+0.120740599762j))*x[0] + ((-0.0486648621572+0.371064215143j))*x[1]**o + ((-0.479299427144-0.658467635609j))*x[1]
        ref[(1, 0, 1, 1)]=(0.176032272158+0.74726698089j)*x_ref[0]**o + ((0.336379677937+0.120740599762j))*x_ref[0] + ((-0.0486648621572+0.371064215143j))*x_ref[1]**o + ((-0.479299427144-0.658467635609j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(-0.336890917599-0.189587994952j)*x[0]**o + ((-0.306491544027+0.227571202019j))*x[0] + ((-0.0521627488798-0.0738521507507j))*x[1]**o + ((0.404644498032+0.384294910427j))*x[1]
        ref[(1, 0, 1, 2)]=(-0.336890917599-0.189587994952j)*x_ref[0]**o + ((-0.306491544027+0.227571202019j))*x_ref[0] + ((-0.0521627488798-0.0738521507507j))*x_ref[1]**o + ((0.404644498032+0.384294910427j))*x_ref[1]
        arg[(1, 0, 1, 3)]=(-0.911375749226+0.0363359943137j)*x[0]**o + ((0.704169991001-0.246011999548j))*x[0] + ((0.310232294963+0.528570075269j))*x[1]**o + ((0.0989582618956-0.219231747968j))*x[1]
        ref[(1, 0, 1, 3)]=(-0.911375749226+0.0363359943137j)*x_ref[0]**o + ((0.704169991001-0.246011999548j))*x_ref[0] + ((0.310232294963+0.528570075269j))*x_ref[1]**o + ((0.0989582618956-0.219231747968j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.502335285861+0.871053198092j)*x[0]**o + ((-0.423552892301+0.196903431156j))*x[0] + ((-0.076727758663+0.951014493931j))*x[1]**o + ((0.353838168404+0.285806952955j))*x[1]
        ref[(1, 1, 0, 0)]=(0.502335285861+0.871053198092j)*x_ref[0]**o + ((-0.423552892301+0.196903431156j))*x_ref[0] + ((-0.076727758663+0.951014493931j))*x_ref[1]**o + ((0.353838168404+0.285806952955j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.0352953086941+0.031563953457j)*x[0]**o + ((0.00518985983552-0.715437289509j))*x[0] + ((-0.973659993913-0.0758609968819j))*x[1]**o + ((0.883396086593+0.912869887709j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.0352953086941+0.031563953457j)*x_ref[0]**o + ((0.00518985983552-0.715437289509j))*x_ref[0] + ((-0.973659993913-0.0758609968819j))*x_ref[1]**o + ((0.883396086593+0.912869887709j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(-0.0662717504651-0.206947030282j)*x[0]**o + ((-0.831698038677-0.713546325812j))*x[0] + ((0.6156680741+0.464904880109j))*x[1]**o + ((-0.337086850609+0.410280547429j))*x[1]
        ref[(1, 1, 0, 2)]=(-0.0662717504651-0.206947030282j)*x_ref[0]**o + ((-0.831698038677-0.713546325812j))*x_ref[0] + ((0.6156680741+0.464904880109j))*x_ref[1]**o + ((-0.337086850609+0.410280547429j))*x_ref[1]
        arg[(1, 1, 0, 3)]=(-0.692089369234+0.904336567384j)*x[0]**o + ((0.985034803808-0.747867542039j))*x[0] + ((0.221126810987+0.517704353386j))*x[1]**o + ((0.535625876668-0.246578326384j))*x[1]
        ref[(1, 1, 0, 3)]=(-0.692089369234+0.904336567384j)*x_ref[0]**o + ((0.985034803808-0.747867542039j))*x_ref[0] + ((0.221126810987+0.517704353386j))*x_ref[1]**o + ((0.535625876668-0.246578326384j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.197200253425+0.631105253647j)*x[0]**o + ((0.18216082029+0.17885280529j))*x[0] + ((0.40949495584-0.62452192106j))*x[1]**o + ((0.326298892792+0.329795165146j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.197200253425+0.631105253647j)*x_ref[0]**o + ((0.18216082029+0.17885280529j))*x_ref[0] + ((0.40949495584-0.62452192106j))*x_ref[1]**o + ((0.326298892792+0.329795165146j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.399839826048-0.756831118351j)*x[0]**o + ((0.950831864494-0.603111121786j))*x[0] + ((-0.253828872273-0.0960929300692j))*x[1]**o + ((-0.635935213577-0.113783578354j))*x[1]
        ref[(1, 1, 1, 1)]=(0.399839826048-0.756831118351j)*x_ref[0]**o + ((0.950831864494-0.603111121786j))*x_ref[0] + ((-0.253828872273-0.0960929300692j))*x_ref[1]**o + ((-0.635935213577-0.113783578354j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(0.636862392746-0.758918853901j)*x[0]**o + ((-0.282683735258-0.454931824972j))*x[0] + ((-0.023396386239-0.00777656635258j))*x[1]**o + ((-0.393389292753+0.392602000123j))*x[1]
        ref[(1, 1, 1, 2)]=(0.636862392746-0.758918853901j)*x_ref[0]**o + ((-0.282683735258-0.454931824972j))*x_ref[0] + ((-0.023396386239-0.00777656635258j))*x_ref[1]**o + ((-0.393389292753+0.392602000123j))*x_ref[1]
        arg[(1, 1, 1, 3)]=(-0.710134324746+0.502650856445j)*x[0]**o + ((0.0346114434446+0.879401355762j))*x[0] + ((0.485299416822-0.96194795026j))*x[1]**o + ((0.923036602608-0.480376257878j))*x[1]
        ref[(1, 1, 1, 3)]=(-0.710134324746+0.502650856445j)*x_ref[0]**o + ((0.0346114434446+0.879401355762j))*x_ref[0] + ((0.485299416822-0.96194795026j))*x_ref[1]**o + ((0.923036602608-0.480376257878j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.404767665041-0.890346010961j)*x[0]**o + ((0.380605007541-0.611935847064j))*x[0] + ((0.472595440517+0.825476024701j))*x[1]**o + ((-0.0370093962557+0.983876540487j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.404767665041-0.890346010961j)*x_ref[0]**o + ((0.380605007541-0.611935847064j))*x_ref[0] + ((0.472595440517+0.825476024701j))*x_ref[1]**o + ((-0.0370093962557+0.983876540487j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(-0.49792565272+0.0830662854312j)*x[0]**o + ((-0.000613786361687-0.933535507167j))*x[0] + ((-0.635051073026+0.550225883948j))*x[1]**o + ((0.674696591696-0.389089772232j))*x[1]
        ref[(2, 0, 0, 1)]=(-0.49792565272+0.0830662854312j)*x_ref[0]**o + ((-0.000613786361687-0.933535507167j))*x_ref[0] + ((-0.635051073026+0.550225883948j))*x_ref[1]**o + ((0.674696591696-0.389089772232j))*x_ref[1]
        arg[(2, 0, 0, 2)]=(0.66261748896+0.67159300171j)*x[0]**o + ((0.903200981904+0.0570463288985j))*x[0] + ((-0.491338078931-0.769423559348j))*x[1]**o + ((0.336079717395+0.251211200427j))*x[1]
        ref[(2, 0, 0, 2)]=(0.66261748896+0.67159300171j)*x_ref[0]**o + ((0.903200981904+0.0570463288985j))*x_ref[0] + ((-0.491338078931-0.769423559348j))*x_ref[1]**o + ((0.336079717395+0.251211200427j))*x_ref[1]
        arg[(2, 0, 0, 3)]=(0.392540463736+0.0669402858652j)*x[0]**o + ((0.574829867161-0.938181899475j))*x[0] + ((-0.333900852198-0.899488232006j))*x[1]**o + ((-0.695261579602-0.958082337781j))*x[1]
        ref[(2, 0, 0, 3)]=(0.392540463736+0.0669402858652j)*x_ref[0]**o + ((0.574829867161-0.938181899475j))*x_ref[0] + ((-0.333900852198-0.899488232006j))*x_ref[1]**o + ((-0.695261579602-0.958082337781j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(0.080492786115+0.483586815619j)*x[0]**o + ((-0.853401971148-0.0670602806839j))*x[0] + ((-0.0442559250325-0.496112820543j))*x[1]**o + ((0.817515153816-0.609386730135j))*x[1]
        ref[(2, 0, 1, 0)]=(0.080492786115+0.483586815619j)*x_ref[0]**o + ((-0.853401971148-0.0670602806839j))*x_ref[0] + ((-0.0442559250325-0.496112820543j))*x_ref[1]**o + ((0.817515153816-0.609386730135j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(-0.0752498053757-0.390971817641j)*x[0]**o + ((-0.279231126642-0.0110514673122j))*x[0] + ((-0.714571219685-0.0375589502681j))*x[1]**o + ((0.601225380838+0.0840236584079j))*x[1]
        ref[(2, 0, 1, 1)]=(-0.0752498053757-0.390971817641j)*x_ref[0]**o + ((-0.279231126642-0.0110514673122j))*x_ref[0] + ((-0.714571219685-0.0375589502681j))*x_ref[1]**o + ((0.601225380838+0.0840236584079j))*x_ref[1]
        arg[(2, 0, 1, 2)]=(-0.786020682988+0.597747103685j)*x[0]**o + ((0.99633357742-0.116527795194j))*x[0] + ((-0.693848477378+0.090570191081j))*x[1]**o + ((0.0350505855978-0.897406571608j))*x[1]
        ref[(2, 0, 1, 2)]=(-0.786020682988+0.597747103685j)*x_ref[0]**o + ((0.99633357742-0.116527795194j))*x_ref[0] + ((-0.693848477378+0.090570191081j))*x_ref[1]**o + ((0.0350505855978-0.897406571608j))*x_ref[1]
        arg[(2, 0, 1, 3)]=(0.0543844818793-0.287578500304j)*x[0]**o + ((0.622638058315-0.865598959197j))*x[0] + ((0.624268189009+0.197730343835j))*x[1]**o + ((0.729554354162+0.912681060422j))*x[1]
        ref[(2, 0, 1, 3)]=(0.0543844818793-0.287578500304j)*x_ref[0]**o + ((0.622638058315-0.865598959197j))*x_ref[0] + ((0.624268189009+0.197730343835j))*x_ref[1]**o + ((0.729554354162+0.912681060422j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(0.413605864709-0.766218819144j)*x[0]**o + ((0.518842980745+0.929913822379j))*x[0] + ((0.452274968488-0.0946212680859j))*x[1]**o + ((0.290335714253-0.793252892322j))*x[1]
        ref[(2, 1, 0, 0)]=(0.413605864709-0.766218819144j)*x_ref[0]**o + ((0.518842980745+0.929913822379j))*x_ref[0] + ((0.452274968488-0.0946212680859j))*x_ref[1]**o + ((0.290335714253-0.793252892322j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.0894461714738+0.899747557447j)*x[0]**o + ((0.131557719304-0.476426166767j))*x[0] + ((-0.511526126588+0.439840850218j))*x[1]**o + ((-0.930288891089-0.161583568968j))*x[1]
        ref[(2, 1, 0, 1)]=(0.0894461714738+0.899747557447j)*x_ref[0]**o + ((0.131557719304-0.476426166767j))*x_ref[0] + ((-0.511526126588+0.439840850218j))*x_ref[1]**o + ((-0.930288891089-0.161583568968j))*x_ref[1]
        arg[(2, 1, 0, 2)]=(-0.231681499324-0.652429134467j)*x[0]**o + ((-0.564065645831+0.0476237513446j))*x[0] + ((0.828234675366+0.113890671305j))*x[1]**o + ((0.711085833188+0.186855042592j))*x[1]
        ref[(2, 1, 0, 2)]=(-0.231681499324-0.652429134467j)*x_ref[0]**o + ((-0.564065645831+0.0476237513446j))*x_ref[0] + ((0.828234675366+0.113890671305j))*x_ref[1]**o + ((0.711085833188+0.186855042592j))*x_ref[1]
        arg[(2, 1, 0, 3)]=(-0.32013673986-0.0200264380613j)*x[0]**o + ((0.254752211152-0.930471014493j))*x[0] + ((0.776092507599-0.440622753098j))*x[1]**o + ((-0.591376710147-0.387714318222j))*x[1]
        ref[(2, 1, 0, 3)]=(-0.32013673986-0.0200264380613j)*x_ref[0]**o + ((0.254752211152-0.930471014493j))*x_ref[0] + ((0.776092507599-0.440622753098j))*x_ref[1]**o + ((-0.591376710147-0.387714318222j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(0.161914030565-0.28827403925j)*x[0]**o + ((0.933325530444+0.912547647968j))*x[0] + ((-0.36029183648-0.201678358271j))*x[1]**o + ((-0.337085932669+0.663682436784j))*x[1]
        ref[(2, 1, 1, 0)]=(0.161914030565-0.28827403925j)*x_ref[0]**o + ((0.933325530444+0.912547647968j))*x_ref[0] + ((-0.36029183648-0.201678358271j))*x_ref[1]**o + ((-0.337085932669+0.663682436784j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(0.495886442321+0.442251884574j)*x[0]**o + ((-0.0639269189836-0.813901258894j))*x[0] + ((-0.645334260344+0.898428737324j))*x[1]**o + ((0.813621150431+0.478857521154j))*x[1]
        ref[(2, 1, 1, 1)]=(0.495886442321+0.442251884574j)*x_ref[0]**o + ((-0.0639269189836-0.813901258894j))*x_ref[0] + ((-0.645334260344+0.898428737324j))*x_ref[1]**o + ((0.813621150431+0.478857521154j))*x_ref[1]
        arg[(2, 1, 1, 2)]=(-0.784958567212-0.475905035563j)*x[0]**o + ((-0.785522409494+0.460047437877j))*x[0] + ((0.538479430851+0.934233886674j))*x[1]**o + ((0.662406001814-0.684757262612j))*x[1]
        ref[(2, 1, 1, 2)]=(-0.784958567212-0.475905035563j)*x_ref[0]**o + ((-0.785522409494+0.460047437877j))*x_ref[0] + ((0.538479430851+0.934233886674j))*x_ref[1]**o + ((0.662406001814-0.684757262612j))*x_ref[1]
        arg[(2, 1, 1, 3)]=(-0.500468149858-0.0660705117934j)*x[0]**o + ((-0.186229941629-0.612144452459j))*x[0] + ((0.184370434933-0.83330661264j))*x[1]**o + ((-0.902638348762+0.451151529003j))*x[1]
        ref[(2, 1, 1, 3)]=(-0.500468149858-0.0660705117934j)*x_ref[0]**o + ((-0.186229941629-0.612144452459j))*x_ref[0] + ((0.184370434933-0.83330661264j))*x_ref[1]**o + ((-0.902638348762+0.451151529003j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.794913450926-0.368704796068j)*x[2]**o + ((-0.0368068772233-0.521667459545j))*x[2]
            ref[(0, 0, 0, 0)]+=(0.794913450926-0.368704796068j)*x_ref[2]**o + ((-0.0368068772233-0.521667459545j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.535220684508-0.206000867792j)*x[2]**o + ((0.55693858173-0.848694398845j))*x[2]
            ref[(0, 0, 0, 1)]+=(-0.535220684508-0.206000867792j)*x_ref[2]**o + ((0.55693858173-0.848694398845j))*x_ref[2]
            arg[(0, 0, 0, 2)]+=(0.229844592605-0.931866219984j)*x[2]**o + ((0.101512908158+0.260242055676j))*x[2]
            ref[(0, 0, 0, 2)]+=(0.229844592605-0.931866219984j)*x_ref[2]**o + ((0.101512908158+0.260242055676j))*x_ref[2]
            arg[(0, 0, 0, 3)]+=(0.619553607584-0.860044348368j)*x[2]**o + ((0.101820832398+0.0292597848621j))*x[2]
            ref[(0, 0, 0, 3)]+=(0.619553607584-0.860044348368j)*x_ref[2]**o + ((0.101820832398+0.0292597848621j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.883305716427+0.805544304471j)*x[2]**o + ((-0.656488093123-0.630579175345j))*x[2]
            ref[(0, 0, 1, 0)]+=(0.883305716427+0.805544304471j)*x_ref[2]**o + ((-0.656488093123-0.630579175345j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.95729488564-0.842422831796j)*x[2]**o + ((-0.00148312865879+0.793079070336j))*x[2]
            ref[(0, 0, 1, 1)]+=(0.95729488564-0.842422831796j)*x_ref[2]**o + ((-0.00148312865879+0.793079070336j))*x_ref[2]
            arg[(0, 0, 1, 2)]+=(-0.839723822401-0.292498577245j)*x[2]**o + ((-0.45464016263+0.746281492009j))*x[2]
            ref[(0, 0, 1, 2)]+=(-0.839723822401-0.292498577245j)*x_ref[2]**o + ((-0.45464016263+0.746281492009j))*x_ref[2]
            arg[(0, 0, 1, 3)]+=(-0.94730048767+0.22297342627j)*x[2]**o + ((-0.264474067094-0.77654769101j))*x[2]
            ref[(0, 0, 1, 3)]+=(-0.94730048767+0.22297342627j)*x_ref[2]**o + ((-0.264474067094-0.77654769101j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.559434233797-0.511106663721j)*x[2]**o + ((0.213654618121-0.766960591171j))*x[2]
            ref[(0, 1, 0, 0)]+=(-0.559434233797-0.511106663721j)*x_ref[2]**o + ((0.213654618121-0.766960591171j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.0724562005263+0.278721903058j)*x[2]**o + ((0.669961475842-0.909729978558j))*x[2]
            ref[(0, 1, 0, 1)]+=(-0.0724562005263+0.278721903058j)*x_ref[2]**o + ((0.669961475842-0.909729978558j))*x_ref[2]
            arg[(0, 1, 0, 2)]+=(0.494203186546-0.908727465238j)*x[2]**o + ((-0.351549458642+0.6270814j))*x[2]
            ref[(0, 1, 0, 2)]+=(0.494203186546-0.908727465238j)*x_ref[2]**o + ((-0.351549458642+0.6270814j))*x_ref[2]
            arg[(0, 1, 0, 3)]+=(-0.503279639297+0.588268332003j)*x[2]**o + ((-0.964440187434+0.702604142206j))*x[2]
            ref[(0, 1, 0, 3)]+=(-0.503279639297+0.588268332003j)*x_ref[2]**o + ((-0.964440187434+0.702604142206j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.923791108334-0.958337078744j)*x[2]**o + ((0.393349739491+0.6758190663j))*x[2]
            ref[(0, 1, 1, 0)]+=(-0.923791108334-0.958337078744j)*x_ref[2]**o + ((0.393349739491+0.6758190663j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.601910432499+0.976812363184j)*x[2]**o + ((0.909290428665+0.197502096897j))*x[2]
            ref[(0, 1, 1, 1)]+=(-0.601910432499+0.976812363184j)*x_ref[2]**o + ((0.909290428665+0.197502096897j))*x_ref[2]
            arg[(0, 1, 1, 2)]+=(-0.166227005655+0.438269085596j)*x[2]**o + ((-0.0186813950542-0.0593489043256j))*x[2]
            ref[(0, 1, 1, 2)]+=(-0.166227005655+0.438269085596j)*x_ref[2]**o + ((-0.0186813950542-0.0593489043256j))*x_ref[2]
            arg[(0, 1, 1, 3)]+=(0.229137340538-0.862793148606j)*x[2]**o + ((0.764547407082+0.623834684359j))*x[2]
            ref[(0, 1, 1, 3)]+=(0.229137340538-0.862793148606j)*x_ref[2]**o + ((0.764547407082+0.623834684359j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.147635057517+0.123005456552j)*x[2]**o + ((0.976126518149-0.89348388479j))*x[2]
            ref[(1, 0, 0, 0)]+=(-0.147635057517+0.123005456552j)*x_ref[2]**o + ((0.976126518149-0.89348388479j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.881428782019+0.66948646206j)*x[2]**o + ((0.380581547315+0.0726731941139j))*x[2]
            ref[(1, 0, 0, 1)]+=(0.881428782019+0.66948646206j)*x_ref[2]**o + ((0.380581547315+0.0726731941139j))*x_ref[2]
            arg[(1, 0, 0, 2)]+=(0.643795015766+0.372951360513j)*x[2]**o + ((0.127347033801+0.0473255714448j))*x[2]
            ref[(1, 0, 0, 2)]+=(0.643795015766+0.372951360513j)*x_ref[2]**o + ((0.127347033801+0.0473255714448j))*x_ref[2]
            arg[(1, 0, 0, 3)]+=(0.235196654695+0.130387435457j)*x[2]**o + ((-0.767629023477-0.231366716701j))*x[2]
            ref[(1, 0, 0, 3)]+=(0.235196654695+0.130387435457j)*x_ref[2]**o + ((-0.767629023477-0.231366716701j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.0489475035719+0.264428002594j)*x[2]**o + ((0.560135278804+0.0156201433503j))*x[2]
            ref[(1, 0, 1, 0)]+=(-0.0489475035719+0.264428002594j)*x_ref[2]**o + ((0.560135278804+0.0156201433503j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.799001626368-0.884963309617j)*x[2]**o + ((-0.558299630393-0.0260405174892j))*x[2]
            ref[(1, 0, 1, 1)]+=(-0.799001626368-0.884963309617j)*x_ref[2]**o + ((-0.558299630393-0.0260405174892j))*x_ref[2]
            arg[(1, 0, 1, 2)]+=(0.0781491131532-0.490762264158j)*x[2]**o + ((-0.215426454259-0.798416398732j))*x[2]
            ref[(1, 0, 1, 2)]+=(0.0781491131532-0.490762264158j)*x_ref[2]**o + ((-0.215426454259-0.798416398732j))*x_ref[2]
            arg[(1, 0, 1, 3)]+=(-0.500914264353-0.307606194194j)*x[2]**o + ((-0.576729970339-0.932255664858j))*x[2]
            ref[(1, 0, 1, 3)]+=(-0.500914264353-0.307606194194j)*x_ref[2]**o + ((-0.576729970339-0.932255664858j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.321159708878+0.607139026016j)*x[2]**o + ((0.549563982158-0.0994997005043j))*x[2]
            ref[(1, 1, 0, 0)]+=(-0.321159708878+0.607139026016j)*x_ref[2]**o + ((0.549563982158-0.0994997005043j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.666465085848-0.975751120819j)*x[2]**o + ((0.264875546835-0.446987910132j))*x[2]
            ref[(1, 1, 0, 1)]+=(-0.666465085848-0.975751120819j)*x_ref[2]**o + ((0.264875546835-0.446987910132j))*x_ref[2]
            arg[(1, 1, 0, 2)]+=(-0.0747836200618-0.283394637876j)*x[2]**o + ((-0.0931758270801+0.52407289113j))*x[2]
            ref[(1, 1, 0, 2)]+=(-0.0747836200618-0.283394637876j)*x_ref[2]**o + ((-0.0931758270801+0.52407289113j))*x_ref[2]
            arg[(1, 1, 0, 3)]+=(-0.469054368376+0.637795684077j)*x[2]**o + ((-0.797266477662-0.237788006548j))*x[2]
            ref[(1, 1, 0, 3)]+=(-0.469054368376+0.637795684077j)*x_ref[2]**o + ((-0.797266477662-0.237788006548j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.865656175888+0.597797161133j)*x[2]**o + ((-0.314570969826+0.239926811906j))*x[2]
            ref[(1, 1, 1, 0)]+=(0.865656175888+0.597797161133j)*x_ref[2]**o + ((-0.314570969826+0.239926811906j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.380966847364+0.554233303649j)*x[2]**o + ((-0.497834001329-0.456391323359j))*x[2]
            ref[(1, 1, 1, 1)]+=(-0.380966847364+0.554233303649j)*x_ref[2]**o + ((-0.497834001329-0.456391323359j))*x_ref[2]
            arg[(1, 1, 1, 2)]+=(0.896037287433-0.131298434107j)*x[2]**o + ((-0.290570422671-0.238197245323j))*x[2]
            ref[(1, 1, 1, 2)]+=(0.896037287433-0.131298434107j)*x_ref[2]**o + ((-0.290570422671-0.238197245323j))*x_ref[2]
            arg[(1, 1, 1, 3)]+=(-0.733253289822-0.627012478469j)*x[2]**o + ((-0.203503898745-0.67096535537j))*x[2]
            ref[(1, 1, 1, 3)]+=(-0.733253289822-0.627012478469j)*x_ref[2]**o + ((-0.203503898745-0.67096535537j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(-0.189337056853+0.937259235011j)*x[2]**o + ((0.770638825551+0.686754802305j))*x[2]
            ref[(2, 0, 0, 0)]+=(-0.189337056853+0.937259235011j)*x_ref[2]**o + ((0.770638825551+0.686754802305j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(0.888686500591-0.253482309431j)*x[2]**o + ((0.388014346698+0.749259321627j))*x[2]
            ref[(2, 0, 0, 1)]+=(0.888686500591-0.253482309431j)*x_ref[2]**o + ((0.388014346698+0.749259321627j))*x_ref[2]
            arg[(2, 0, 0, 2)]+=(0.435424829072-0.91524529388j)*x[2]**o + ((0.654402001037-0.888135366384j))*x[2]
            ref[(2, 0, 0, 2)]+=(0.435424829072-0.91524529388j)*x_ref[2]**o + ((0.654402001037-0.888135366384j))*x_ref[2]
            arg[(2, 0, 0, 3)]+=(0.233338027499-0.180217714763j)*x[2]**o + ((-0.669004056591-0.759908838801j))*x[2]
            ref[(2, 0, 0, 3)]+=(0.233338027499-0.180217714763j)*x_ref[2]**o + ((-0.669004056591-0.759908838801j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(-0.768606913654-0.0309372678892j)*x[2]**o + ((-0.0796951738582+0.134997167601j))*x[2]
            ref[(2, 0, 1, 0)]+=(-0.768606913654-0.0309372678892j)*x_ref[2]**o + ((-0.0796951738582+0.134997167601j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(0.250735716497+0.61396346518j)*x[2]**o + ((0.159125456427-0.314314636922j))*x[2]
            ref[(2, 0, 1, 1)]+=(0.250735716497+0.61396346518j)*x_ref[2]**o + ((0.159125456427-0.314314636922j))*x_ref[2]
            arg[(2, 0, 1, 2)]+=(-0.376539474918-0.899950886412j)*x[2]**o + ((-0.242551138898+0.407769051093j))*x[2]
            ref[(2, 0, 1, 2)]+=(-0.376539474918-0.899950886412j)*x_ref[2]**o + ((-0.242551138898+0.407769051093j))*x_ref[2]
            arg[(2, 0, 1, 3)]+=(0.330568372399+0.858481879842j)*x[2]**o + ((-0.345682330335+0.093125564858j))*x[2]
            ref[(2, 0, 1, 3)]+=(0.330568372399+0.858481879842j)*x_ref[2]**o + ((-0.345682330335+0.093125564858j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(-0.384557987516-0.852860054465j)*x[2]**o + ((-0.190553634267-0.508442684643j))*x[2]
            ref[(2, 1, 0, 0)]+=(-0.384557987516-0.852860054465j)*x_ref[2]**o + ((-0.190553634267-0.508442684643j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(0.501496668773-0.319864675062j)*x[2]**o + ((0.855998614457+0.696986696998j))*x[2]
            ref[(2, 1, 0, 1)]+=(0.501496668773-0.319864675062j)*x_ref[2]**o + ((0.855998614457+0.696986696998j))*x_ref[2]
            arg[(2, 1, 0, 2)]+=(-0.0309948792045-0.083785830764j)*x[2]**o + ((-0.613169545304-0.522898128452j))*x[2]
            ref[(2, 1, 0, 2)]+=(-0.0309948792045-0.083785830764j)*x_ref[2]**o + ((-0.613169545304-0.522898128452j))*x_ref[2]
            arg[(2, 1, 0, 3)]+=(-0.881904782302-0.24597648745j)*x[2]**o + ((-0.92595270454+0.293786592488j))*x[2]
            ref[(2, 1, 0, 3)]+=(-0.881904782302-0.24597648745j)*x_ref[2]**o + ((-0.92595270454+0.293786592488j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(0.718195926787-0.982482830347j)*x[2]**o + ((0.674908856524+0.0517619758403j))*x[2]
            ref[(2, 1, 1, 0)]+=(0.718195926787-0.982482830347j)*x_ref[2]**o + ((0.674908856524+0.0517619758403j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(0.57027254389-0.574153528464j)*x[2]**o + ((-0.642160913196-0.796426625463j))*x[2]
            ref[(2, 1, 1, 1)]+=(0.57027254389-0.574153528464j)*x_ref[2]**o + ((-0.642160913196-0.796426625463j))*x_ref[2]
            arg[(2, 1, 1, 2)]+=(-0.635162491139+0.194554078515j)*x[2]**o + ((0.332250527643-0.835275164889j))*x[2]
            ref[(2, 1, 1, 2)]+=(-0.635162491139+0.194554078515j)*x_ref[2]**o + ((0.332250527643-0.835275164889j))*x_ref[2]
            arg[(2, 1, 1, 3)]+=(0.0034031105971-0.839026375345j)*x[2]**o + ((0.868800997884-0.747065259798j))*x[2]
            ref[(2, 1, 1, 3)]+=(0.0034031105971-0.839026375345j)*x_ref[2]**o + ((0.868800997884-0.747065259798j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.697076973267-0.787601454718j)*x[0]**o + ((0.575079863082+0.239629838803j))*x[0] + ((0.0954949140182+0.166108028685j))*x[1]**o + ((0.766872607102-0.6251319807j))*x[1]
        ref=(-0.697076973267-0.787601454718j)*x_ref[0]**o + ((0.575079863082+0.239629838803j))*x_ref[0] + ((0.0954949140182+0.166108028685j))*x_ref[1]**o + ((0.766872607102-0.6251319807j))*x_ref[1]
        if dim==3:
            arg+=((0.170979280096-0.70598854479j))*x[2]**o + ((0.95859996379+0.684474344501j))*x[2]
            ref+=((0.170979280096-0.70598854479j))*x_ref[2]**o + ((0.95859996379+0.684474344501j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=(-0.409301073485-0.452619243224j)*x[0]**o + ((0.0277814920532+0.0568932355263j))*x[0] + ((-0.630482409299-0.0716154066209j))*x[1]**o + ((-0.8891006231+0.197676140988j))*x[1]
        ref[(0,)]=(-0.409301073485-0.452619243224j)*x_ref[0]**o + ((0.0277814920532+0.0568932355263j))*x_ref[0] + ((-0.630482409299-0.0716154066209j))*x_ref[1]**o + ((-0.8891006231+0.197676140988j))*x_ref[1]
        arg[(1,)]=(0.262988350193+0.0308831021971j)*x[0]**o + ((-0.899403119063+0.33724152139j))*x[0] + ((-0.97785468245-0.948035914457j))*x[1]**o + ((-0.691606237371-0.550518867857j))*x[1]
        ref[(1,)]=(0.262988350193+0.0308831021971j)*x_ref[0]**o + ((-0.899403119063+0.33724152139j))*x_ref[0] + ((-0.97785468245-0.948035914457j))*x_ref[1]**o + ((-0.691606237371-0.550518867857j))*x_ref[1]
        arg[(2,)]=(-0.0210318799556+0.600467024197j)*x[0]**o + ((0.411946746161+0.0763955875702j))*x[0] + ((0.890587831897+0.241606687906j))*x[1]**o + ((-0.590663798094+0.421242259043j))*x[1]
        ref[(2,)]=(-0.0210318799556+0.600467024197j)*x_ref[0]**o + ((0.411946746161+0.0763955875702j))*x_ref[0] + ((0.890587831897+0.241606687906j))*x_ref[1]**o + ((-0.590663798094+0.421242259043j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.121509895433-0.337784351168j)*x[2]**o + ((-0.406429992894+0.053041818549j))*x[2]
            ref[(0,)]+=(-0.121509895433-0.337784351168j)*x_ref[2]**o + ((-0.406429992894+0.053041818549j))*x_ref[2]
            arg[(1,)]+=(0.0802670517162-0.239085198958j)*x[2]**o + ((-0.832440357102-0.982360927743j))*x[2]
            ref[(1,)]+=(0.0802670517162-0.239085198958j)*x_ref[2]**o + ((-0.832440357102-0.982360927743j))*x_ref[2]
            arg[(2,)]+=(0.895856651309+0.487794806542j)*x[2]**o + ((-0.209611144386-0.678526997338j))*x[2]
            ref[(2,)]+=(0.895856651309+0.487794806542j)*x_ref[2]**o + ((-0.209611144386-0.678526997338j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref = Data(0,(2, 2),w_ref)
        arg[(0, 0)]=(-0.991177696928-0.909389038206j)*x[0]**o + ((-0.957923449301+0.253853885047j))*x[0] + ((-0.758036069263+0.795631799883j))*x[1]**o + ((0.857461369735-0.525788861414j))*x[1]
        ref[(0, 0)]=(-0.991177696928-0.909389038206j)*x_ref[0]**o + ((-0.957923449301+0.253853885047j))*x_ref[0] + ((-0.758036069263+0.795631799883j))*x_ref[1]**o + ((0.857461369735-0.525788861414j))*x_ref[1]
        arg[(0, 1)]=(0.841611169131+0.041998383144j)*x[0]**o + ((0.854694360397+0.654863415463j))*x[0] + ((-0.166198563874-0.874689044179j))*x[1]**o + ((-0.791119917101+0.696762571785j))*x[1]
        ref[(0, 1)]=(0.841611169131+0.041998383144j)*x_ref[0]**o + ((0.854694360397+0.654863415463j))*x_ref[0] + ((-0.166198563874-0.874689044179j))*x_ref[1]**o + ((-0.791119917101+0.696762571785j))*x_ref[1]
        arg[(1, 0)]=(-0.63839938785+0.818261710406j)*x[0]**o + ((-0.507257245787+0.566840441964j))*x[0] + ((-0.702406441814+0.74096427026j))*x[1]**o + ((-0.6951318758+0.411505384937j))*x[1]
        ref[(1, 0)]=(-0.63839938785+0.818261710406j)*x_ref[0]**o + ((-0.507257245787+0.566840441964j))*x_ref[0] + ((-0.702406441814+0.74096427026j))*x_ref[1]**o + ((-0.6951318758+0.411505384937j))*x_ref[1]
        arg[(1, 1)]=(0.790365151419+0.176319709583j)*x[0]**o + ((0.198700607438-0.157809531699j))*x[0] + ((-0.255371263406-0.687824709273j))*x[1]**o + ((0.166929789958+0.484568659007j))*x[1]
        ref[(1, 1)]=(0.790365151419+0.176319709583j)*x_ref[0]**o + ((0.198700607438-0.157809531699j))*x_ref[0] + ((-0.255371263406-0.687824709273j))*x_ref[1]**o + ((0.166929789958+0.484568659007j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(-0.190716213758-0.454487660595j)*x[2]**o + ((-0.451203136427-0.826932830757j))*x[2]
            ref[(0, 0)]+=(-0.190716213758-0.454487660595j)*x_ref[2]**o + ((-0.451203136427-0.826932830757j))*x_ref[2]
            arg[(0, 1)]+=(0.510052664421-0.133555733023j)*x[2]**o + ((-0.586345919636-0.355114162853j))*x[2]
            ref[(0, 1)]+=(0.510052664421-0.133555733023j)*x_ref[2]**o + ((-0.586345919636-0.355114162853j))*x_ref[2]
            arg[(1, 0)]+=(0.432820625566+0.513942044906j)*x[2]**o + ((-0.332685619379-0.840879653116j))*x[2]
            ref[(1, 0)]+=(0.432820625566+0.513942044906j)*x_ref[2]**o + ((-0.332685619379-0.840879653116j))*x_ref[2]
            arg[(1, 1)]+=(-0.783756608476-0.078235152393j)*x[2]**o + ((-0.0721352878354+0.549414661255j))*x[2]
            ref[(1, 1)]+=(-0.783756608476-0.078235152393j)*x_ref[2]**o + ((-0.0721352878354+0.549414661255j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 3),w)
        ref = Data(0,(3, 3, 3),w_ref)
        arg[(0, 0, 0)]=(-0.765302581178-0.82718103995j)*x[0]**o + ((0.67528349511+0.84931502293j))*x[0] + ((-0.0311594481066-0.612701802617j))*x[1]**o + ((0.0728843846812-0.417708699959j))*x[1]
        ref[(0, 0, 0)]=(-0.765302581178-0.82718103995j)*x_ref[0]**o + ((0.67528349511+0.84931502293j))*x_ref[0] + ((-0.0311594481066-0.612701802617j))*x_ref[1]**o + ((0.0728843846812-0.417708699959j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.591536481519+0.244419231208j)*x[0]**o + ((0.661810851195+0.503836230826j))*x[0] + ((-0.388037404047-0.152359087317j))*x[1]**o + ((-0.398519351562-0.868285242282j))*x[1]
        ref[(0, 0, 1)]=(-0.591536481519+0.244419231208j)*x_ref[0]**o + ((0.661810851195+0.503836230826j))*x_ref[0] + ((-0.388037404047-0.152359087317j))*x_ref[1]**o + ((-0.398519351562-0.868285242282j))*x_ref[1]
        arg[(0, 0, 2)]=(0.422487440888+0.910601629517j)*x[0]**o + ((0.797894016255+0.852873253747j))*x[0] + ((0.0504188774895+0.404378598997j))*x[1]**o + ((0.280252772802+0.412123172919j))*x[1]
        ref[(0, 0, 2)]=(0.422487440888+0.910601629517j)*x_ref[0]**o + ((0.797894016255+0.852873253747j))*x_ref[0] + ((0.0504188774895+0.404378598997j))*x_ref[1]**o + ((0.280252772802+0.412123172919j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.365675006095-0.408357150575j)*x[0]**o + ((-0.724176113392-0.412252383975j))*x[0] + ((0.0986910650211-0.87146382395j))*x[1]**o + ((0.747321046663+0.947215736254j))*x[1]
        ref[(0, 1, 0)]=(-0.365675006095-0.408357150575j)*x_ref[0]**o + ((-0.724176113392-0.412252383975j))*x_ref[0] + ((0.0986910650211-0.87146382395j))*x_ref[1]**o + ((0.747321046663+0.947215736254j))*x_ref[1]
        arg[(0, 1, 1)]=(0.78325486536-0.19990146361j)*x[0]**o + ((-0.943168351071-0.917865463613j))*x[0] + ((-0.848746549453+0.0302956535223j))*x[1]**o + ((-0.26544782568-0.971798012426j))*x[1]
        ref[(0, 1, 1)]=(0.78325486536-0.19990146361j)*x_ref[0]**o + ((-0.943168351071-0.917865463613j))*x_ref[0] + ((-0.848746549453+0.0302956535223j))*x_ref[1]**o + ((-0.26544782568-0.971798012426j))*x_ref[1]
        arg[(0, 1, 2)]=(-0.866819959066+0.940434832588j)*x[0]**o + ((-0.655641877217+0.18801319946j))*x[0] + ((0.0729027167834+0.949692738031j))*x[1]**o + ((-0.750047544025+0.548930860291j))*x[1]
        ref[(0, 1, 2)]=(-0.866819959066+0.940434832588j)*x_ref[0]**o + ((-0.655641877217+0.18801319946j))*x_ref[0] + ((0.0729027167834+0.949692738031j))*x_ref[1]**o + ((-0.750047544025+0.548930860291j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.80343394502+0.43131646814j)*x[0]**o + ((-0.204795121305+0.729845410847j))*x[0] + ((-0.630522970714+0.832230121855j))*x[1]**o + ((0.71393083418-0.394559397669j))*x[1]
        ref[(0, 2, 0)]=(-0.80343394502+0.43131646814j)*x_ref[0]**o + ((-0.204795121305+0.729845410847j))*x_ref[0] + ((-0.630522970714+0.832230121855j))*x_ref[1]**o + ((0.71393083418-0.394559397669j))*x_ref[1]
        arg[(0, 2, 1)]=(-0.583446291109+0.056517562162j)*x[0]**o + ((-0.984853012398-0.771503089909j))*x[0] + ((-0.338472707223+0.18108270323j))*x[1]**o + ((-0.678332197632+0.825204818642j))*x[1]
        ref[(0, 2, 1)]=(-0.583446291109+0.056517562162j)*x_ref[0]**o + ((-0.984853012398-0.771503089909j))*x_ref[0] + ((-0.338472707223+0.18108270323j))*x_ref[1]**o + ((-0.678332197632+0.825204818642j))*x_ref[1]
        arg[(0, 2, 2)]=(0.605884041+0.0545278695442j)*x[0]**o + ((0.496263274422-0.564254954081j))*x[0] + ((0.60300873093+0.649211208472j))*x[1]**o + ((-0.638145420589+0.0290371244374j))*x[1]
        ref[(0, 2, 2)]=(0.605884041+0.0545278695442j)*x_ref[0]**o + ((0.496263274422-0.564254954081j))*x_ref[0] + ((0.60300873093+0.649211208472j))*x_ref[1]**o + ((-0.638145420589+0.0290371244374j))*x_ref[1]
        arg[(1, 0, 0)]=(0.708364293752+0.44504489264j)*x[0]**o + ((0.54114839413+0.2071809763j))*x[0] + ((-0.943828068088+0.753476196657j))*x[1]**o + ((0.442423723968-0.262122795628j))*x[1]
        ref[(1, 0, 0)]=(0.708364293752+0.44504489264j)*x_ref[0]**o + ((0.54114839413+0.2071809763j))*x_ref[0] + ((-0.943828068088+0.753476196657j))*x_ref[1]**o + ((0.442423723968-0.262122795628j))*x_ref[1]
        arg[(1, 0, 1)]=(0.0324093063161-0.411296420987j)*x[0]**o + ((0.566474541492-0.540482368704j))*x[0] + ((-0.0932722739424-0.887298940835j))*x[1]**o + ((-0.111759100732+0.114189039181j))*x[1]
        ref[(1, 0, 1)]=(0.0324093063161-0.411296420987j)*x_ref[0]**o + ((0.566474541492-0.540482368704j))*x_ref[0] + ((-0.0932722739424-0.887298940835j))*x_ref[1]**o + ((-0.111759100732+0.114189039181j))*x_ref[1]
        arg[(1, 0, 2)]=(0.283073979982-0.351804894585j)*x[0]**o + ((-0.163286651925-0.0638927690361j))*x[0] + ((0.760966076771+0.509022727763j))*x[1]**o + ((-0.187900848907-0.795624965329j))*x[1]
        ref[(1, 0, 2)]=(0.283073979982-0.351804894585j)*x_ref[0]**o + ((-0.163286651925-0.0638927690361j))*x_ref[0] + ((0.760966076771+0.509022727763j))*x_ref[1]**o + ((-0.187900848907-0.795624965329j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.862258521606+0.929811014897j)*x[0]**o + ((-0.368850324859-0.509561846864j))*x[0] + ((0.424914875936-0.29041454086j))*x[1]**o + ((0.338732543539-0.550778779988j))*x[1]
        ref[(1, 1, 0)]=(-0.862258521606+0.929811014897j)*x_ref[0]**o + ((-0.368850324859-0.509561846864j))*x_ref[0] + ((0.424914875936-0.29041454086j))*x_ref[1]**o + ((0.338732543539-0.550778779988j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.905608330501-0.759548744806j)*x[0]**o + ((0.502001925499+0.746012593523j))*x[0] + ((-0.331072636306+0.907104512368j))*x[1]**o + ((0.491284975762+0.845600436459j))*x[1]
        ref[(1, 1, 1)]=(-0.905608330501-0.759548744806j)*x_ref[0]**o + ((0.502001925499+0.746012593523j))*x_ref[0] + ((-0.331072636306+0.907104512368j))*x_ref[1]**o + ((0.491284975762+0.845600436459j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.712263876792-0.0530087614826j)*x[0]**o + ((0.331596844771-0.284485421839j))*x[0] + ((0.430634608464+0.579547239868j))*x[1]**o + ((-0.0343674105188+0.413861951978j))*x[1]
        ref[(1, 1, 2)]=(-0.712263876792-0.0530087614826j)*x_ref[0]**o + ((0.331596844771-0.284485421839j))*x_ref[0] + ((0.430634608464+0.579547239868j))*x_ref[1]**o + ((-0.0343674105188+0.413861951978j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.670136042077+0.104177013242j)*x[0]**o + ((-0.0430924304952+0.192229837831j))*x[0] + ((-0.338601654066-0.395102217883j))*x[1]**o + ((-0.49095921329+0.586401152367j))*x[1]
        ref[(1, 2, 0)]=(-0.670136042077+0.104177013242j)*x_ref[0]**o + ((-0.0430924304952+0.192229837831j))*x_ref[0] + ((-0.338601654066-0.395102217883j))*x_ref[1]**o + ((-0.49095921329+0.586401152367j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.0819807137608+0.853453175086j)*x[0]**o + ((0.713733743628+0.731200179964j))*x[0] + ((-0.859829630421+0.820749363994j))*x[1]**o + ((-0.982927013149+0.813395888015j))*x[1]
        ref[(1, 2, 1)]=(-0.0819807137608+0.853453175086j)*x_ref[0]**o + ((0.713733743628+0.731200179964j))*x_ref[0] + ((-0.859829630421+0.820749363994j))*x_ref[1]**o + ((-0.982927013149+0.813395888015j))*x_ref[1]
        arg[(1, 2, 2)]=(-0.389893459149+0.775886601652j)*x[0]**o + ((0.8714155645+0.260640726996j))*x[0] + ((-0.795939754013-0.760267504863j))*x[1]**o + ((0.410547486974-0.347267395286j))*x[1]
        ref[(1, 2, 2)]=(-0.389893459149+0.775886601652j)*x_ref[0]**o + ((0.8714155645+0.260640726996j))*x_ref[0] + ((-0.795939754013-0.760267504863j))*x_ref[1]**o + ((0.410547486974-0.347267395286j))*x_ref[1]
        arg[(2, 0, 0)]=(-0.953171767205-0.121840370437j)*x[0]**o + ((-0.141772170266-0.916806990664j))*x[0] + ((-0.519578030199-0.911885176447j))*x[1]**o + ((-0.845561791519-0.928244299061j))*x[1]
        ref[(2, 0, 0)]=(-0.953171767205-0.121840370437j)*x_ref[0]**o + ((-0.141772170266-0.916806990664j))*x_ref[0] + ((-0.519578030199-0.911885176447j))*x_ref[1]**o + ((-0.845561791519-0.928244299061j))*x_ref[1]
        arg[(2, 0, 1)]=(-0.471548022233-0.569898408261j)*x[0]**o + ((0.87170681639-0.356138086369j))*x[0] + ((0.659303131355+0.999368970482j))*x[1]**o + ((-0.162300473583+0.422779508965j))*x[1]
        ref[(2, 0, 1)]=(-0.471548022233-0.569898408261j)*x_ref[0]**o + ((0.87170681639-0.356138086369j))*x_ref[0] + ((0.659303131355+0.999368970482j))*x_ref[1]**o + ((-0.162300473583+0.422779508965j))*x_ref[1]
        arg[(2, 0, 2)]=(0.336090721443+0.488676858196j)*x[0]**o + ((0.67123154459+0.817677377672j))*x[0] + ((0.998361244316+0.818294789653j))*x[1]**o + ((0.173795181851+0.141006733831j))*x[1]
        ref[(2, 0, 2)]=(0.336090721443+0.488676858196j)*x_ref[0]**o + ((0.67123154459+0.817677377672j))*x_ref[0] + ((0.998361244316+0.818294789653j))*x_ref[1]**o + ((0.173795181851+0.141006733831j))*x_ref[1]
        arg[(2, 1, 0)]=(-0.154707904906+0.502543419808j)*x[0]**o + ((0.401845269672-0.332926874389j))*x[0] + ((-0.843343478894-0.121647979968j))*x[1]**o + ((-0.225145923279-0.312341854906j))*x[1]
        ref[(2, 1, 0)]=(-0.154707904906+0.502543419808j)*x_ref[0]**o + ((0.401845269672-0.332926874389j))*x_ref[0] + ((-0.843343478894-0.121647979968j))*x_ref[1]**o + ((-0.225145923279-0.312341854906j))*x_ref[1]
        arg[(2, 1, 1)]=(-0.578529366616-0.189801222027j)*x[0]**o + ((0.253263175905-0.252301053694j))*x[0] + ((0.148300657584-0.785992469434j))*x[1]**o + ((0.918115804419+0.0083911337371j))*x[1]
        ref[(2, 1, 1)]=(-0.578529366616-0.189801222027j)*x_ref[0]**o + ((0.253263175905-0.252301053694j))*x_ref[0] + ((0.148300657584-0.785992469434j))*x_ref[1]**o + ((0.918115804419+0.0083911337371j))*x_ref[1]
        arg[(2, 1, 2)]=(0.371288120995-0.942276122939j)*x[0]**o + ((0.431478523218-0.489665478851j))*x[0] + ((-0.682062984326+0.358627602031j))*x[1]**o + ((0.683415324278+0.246286544147j))*x[1]
        ref[(2, 1, 2)]=(0.371288120995-0.942276122939j)*x_ref[0]**o + ((0.431478523218-0.489665478851j))*x_ref[0] + ((-0.682062984326+0.358627602031j))*x_ref[1]**o + ((0.683415324278+0.246286544147j))*x_ref[1]
        arg[(2, 2, 0)]=(-0.0729871852585+0.134477812595j)*x[0]**o + ((0.0537464848486+0.925299918942j))*x[0] + ((-0.777492797846+0.480832071562j))*x[1]**o + ((0.495693656812-0.835377900465j))*x[1]
        ref[(2, 2, 0)]=(-0.0729871852585+0.134477812595j)*x_ref[0]**o + ((0.0537464848486+0.925299918942j))*x_ref[0] + ((-0.777492797846+0.480832071562j))*x_ref[1]**o + ((0.495693656812-0.835377900465j))*x_ref[1]
        arg[(2, 2, 1)]=(-0.339515108524+0.630714829668j)*x[0]**o + ((-0.521341827556+0.546080402939j))*x[0] + ((-0.723589991701-0.384840251111j))*x[1]**o + ((-0.566234699018-0.0682694549491j))*x[1]
        ref[(2, 2, 1)]=(-0.339515108524+0.630714829668j)*x_ref[0]**o + ((-0.521341827556+0.546080402939j))*x_ref[0] + ((-0.723589991701-0.384840251111j))*x_ref[1]**o + ((-0.566234699018-0.0682694549491j))*x_ref[1]
        arg[(2, 2, 2)]=(0.43693105657+0.709374834004j)*x[0]**o + ((0.0387415069136-0.426659416953j))*x[0] + ((-0.365960480452+0.0828996825673j))*x[1]**o + ((-0.366264879373+0.764746938987j))*x[1]
        ref[(2, 2, 2)]=(0.43693105657+0.709374834004j)*x_ref[0]**o + ((0.0387415069136-0.426659416953j))*x_ref[0] + ((-0.365960480452+0.0828996825673j))*x_ref[1]**o + ((-0.366264879373+0.764746938987j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.953876634577-0.159596659399j)*x[2]**o + ((0.033685083789-0.454952313522j))*x[2]
            ref[(0, 0, 0)]+=(-0.953876634577-0.159596659399j)*x_ref[2]**o + ((0.033685083789-0.454952313522j))*x_ref[2]
            arg[(0, 0, 1)]+=(-0.759436634073-0.728812524704j)*x[2]**o + ((0.87063786001+0.993159312451j))*x[2]
            ref[(0, 0, 1)]+=(-0.759436634073-0.728812524704j)*x_ref[2]**o + ((0.87063786001+0.993159312451j))*x_ref[2]
            arg[(0, 0, 2)]+=(-0.561669734417-0.336479798769j)*x[2]**o + ((-0.686957457251+0.00739851857162j))*x[2]
            ref[(0, 0, 2)]+=(-0.561669734417-0.336479798769j)*x_ref[2]**o + ((-0.686957457251+0.00739851857162j))*x_ref[2]
            arg[(0, 1, 0)]+=(-0.75648907765-0.219682756908j)*x[2]**o + ((-0.59741924525+0.39202830415j))*x[2]
            ref[(0, 1, 0)]+=(-0.75648907765-0.219682756908j)*x_ref[2]**o + ((-0.59741924525+0.39202830415j))*x_ref[2]
            arg[(0, 1, 1)]+=(-0.404080732481-0.25626001162j)*x[2]**o + ((-0.0641061633388-0.75419682007j))*x[2]
            ref[(0, 1, 1)]+=(-0.404080732481-0.25626001162j)*x_ref[2]**o + ((-0.0641061633388-0.75419682007j))*x_ref[2]
            arg[(0, 1, 2)]+=(-0.966752826593-0.479989519429j)*x[2]**o + ((-0.515492549305-0.252509801239j))*x[2]
            ref[(0, 1, 2)]+=(-0.966752826593-0.479989519429j)*x_ref[2]**o + ((-0.515492549305-0.252509801239j))*x_ref[2]
            arg[(0, 2, 0)]+=(-0.350034815021+0.630743293529j)*x[2]**o + ((0.590868034715-0.244226122332j))*x[2]
            ref[(0, 2, 0)]+=(-0.350034815021+0.630743293529j)*x_ref[2]**o + ((0.590868034715-0.244226122332j))*x_ref[2]
            arg[(0, 2, 1)]+=(0.57546985723-0.0428352254769j)*x[2]**o + ((-0.122901729745-0.161889632371j))*x[2]
            ref[(0, 2, 1)]+=(0.57546985723-0.0428352254769j)*x_ref[2]**o + ((-0.122901729745-0.161889632371j))*x_ref[2]
            arg[(0, 2, 2)]+=(0.0205283499976+0.976881779266j)*x[2]**o + ((0.105423346536+0.888979080568j))*x[2]
            ref[(0, 2, 2)]+=(0.0205283499976+0.976881779266j)*x_ref[2]**o + ((0.105423346536+0.888979080568j))*x_ref[2]
            arg[(1, 0, 0)]+=(0.497242447923+0.925383823759j)*x[2]**o + ((-0.462829822031+0.735499029225j))*x[2]
            ref[(1, 0, 0)]+=(0.497242447923+0.925383823759j)*x_ref[2]**o + ((-0.462829822031+0.735499029225j))*x_ref[2]
            arg[(1, 0, 1)]+=(0.321291854597-0.275008715866j)*x[2]**o + ((-0.223212741246-0.988785513363j))*x[2]
            ref[(1, 0, 1)]+=(0.321291854597-0.275008715866j)*x_ref[2]**o + ((-0.223212741246-0.988785513363j))*x_ref[2]
            arg[(1, 0, 2)]+=(-0.771670388022+0.461477073578j)*x[2]**o + ((0.78575982402-0.0948403947333j))*x[2]
            ref[(1, 0, 2)]+=(-0.771670388022+0.461477073578j)*x_ref[2]**o + ((0.78575982402-0.0948403947333j))*x_ref[2]
            arg[(1, 1, 0)]+=(-0.774264577939-0.648498359947j)*x[2]**o + ((-0.629402923463-0.00334004851666j))*x[2]
            ref[(1, 1, 0)]+=(-0.774264577939-0.648498359947j)*x_ref[2]**o + ((-0.629402923463-0.00334004851666j))*x_ref[2]
            arg[(1, 1, 1)]+=(0.589367804183-0.83109395074j)*x[2]**o + ((-0.96327424835-0.986511588983j))*x[2]
            ref[(1, 1, 1)]+=(0.589367804183-0.83109395074j)*x_ref[2]**o + ((-0.96327424835-0.986511588983j))*x_ref[2]
            arg[(1, 1, 2)]+=(-0.606490954772+0.268910745102j)*x[2]**o + ((0.246258280958+0.595825333401j))*x[2]
            ref[(1, 1, 2)]+=(-0.606490954772+0.268910745102j)*x_ref[2]**o + ((0.246258280958+0.595825333401j))*x_ref[2]
            arg[(1, 2, 0)]+=(-0.35083757372+0.000622145659437j)*x[2]**o + ((-0.110167030484+0.263448339139j))*x[2]
            ref[(1, 2, 0)]+=(-0.35083757372+0.000622145659437j)*x_ref[2]**o + ((-0.110167030484+0.263448339139j))*x_ref[2]
            arg[(1, 2, 1)]+=(0.214746721476-0.393737900002j)*x[2]**o + ((-0.953305588219+0.890691110727j))*x[2]
            ref[(1, 2, 1)]+=(0.214746721476-0.393737900002j)*x_ref[2]**o + ((-0.953305588219+0.890691110727j))*x_ref[2]
            arg[(1, 2, 2)]+=(-0.785089885885+0.732399606025j)*x[2]**o + ((0.704945651925+0.00324904624667j))*x[2]
            ref[(1, 2, 2)]+=(-0.785089885885+0.732399606025j)*x_ref[2]**o + ((0.704945651925+0.00324904624667j))*x_ref[2]
            arg[(2, 0, 0)]+=(0.993752612665+0.860549012048j)*x[2]**o + ((-0.0463326264676-0.770916126337j))*x[2]
            ref[(2, 0, 0)]+=(0.993752612665+0.860549012048j)*x_ref[2]**o + ((-0.0463326264676-0.770916126337j))*x_ref[2]
            arg[(2, 0, 1)]+=(-0.65329799573+0.676083937521j)*x[2]**o + ((0.266902939554-0.0128344579518j))*x[2]
            ref[(2, 0, 1)]+=(-0.65329799573+0.676083937521j)*x_ref[2]**o + ((0.266902939554-0.0128344579518j))*x_ref[2]
            arg[(2, 0, 2)]+=(0.248499812011+0.598566612633j)*x[2]**o + ((-0.59100452547+0.579711779858j))*x[2]
            ref[(2, 0, 2)]+=(0.248499812011+0.598566612633j)*x_ref[2]**o + ((-0.59100452547+0.579711779858j))*x_ref[2]
            arg[(2, 1, 0)]+=(0.755515010887+0.684629466509j)*x[2]**o + ((0.386067265184-0.732500600492j))*x[2]
            ref[(2, 1, 0)]+=(0.755515010887+0.684629466509j)*x_ref[2]**o + ((0.386067265184-0.732500600492j))*x_ref[2]
            arg[(2, 1, 1)]+=(0.186088889928+0.0631339562491j)*x[2]**o + ((0.631723713647-0.213932700445j))*x[2]
            ref[(2, 1, 1)]+=(0.186088889928+0.0631339562491j)*x_ref[2]**o + ((0.631723713647-0.213932700445j))*x_ref[2]
            arg[(2, 1, 2)]+=(-0.721430325934-0.325922902969j)*x[2]**o + ((0.535977036106-0.0986932353936j))*x[2]
            ref[(2, 1, 2)]+=(-0.721430325934-0.325922902969j)*x_ref[2]**o + ((0.535977036106-0.0986932353936j))*x_ref[2]
            arg[(2, 2, 0)]+=(0.27365458921-0.883331940347j)*x[2]**o + ((-0.334618948394-0.263573757503j))*x[2]
            ref[(2, 2, 0)]+=(0.27365458921-0.883331940347j)*x_ref[2]**o + ((-0.334618948394-0.263573757503j))*x_ref[2]
            arg[(2, 2, 1)]+=(0.457955238859+0.361150945981j)*x[2]**o + ((-0.0973851670866+0.575977998618j))*x[2]
            ref[(2, 2, 1)]+=(0.457955238859+0.361150945981j)*x_ref[2]**o + ((-0.0973851670866+0.575977998618j))*x_ref[2]
            arg[(2, 2, 2)]+=(0.567592169602-0.68670142424j)*x[2]**o + ((-0.591669354506+0.0379582956551j))*x[2]
            ref[(2, 2, 2)]+=(0.567592169602-0.68670142424j)*x_ref[2]**o + ((-0.591669354506+0.0379582956551j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 2, 4),w)
        ref = Data(0,(4, 4, 2, 4),w_ref)
        arg[(0, 0, 0, 0)]=(-0.930544317407+0.860478675754j)*x[0]**o + ((-0.826400135329+0.783029290282j))*x[0] + ((-0.444120423965-0.851940722075j))*x[1]**o + ((0.221935877061+0.0909563414142j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.930544317407+0.860478675754j)*x_ref[0]**o + ((-0.826400135329+0.783029290282j))*x_ref[0] + ((-0.444120423965-0.851940722075j))*x_ref[1]**o + ((0.221935877061+0.0909563414142j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.819526178895-0.0791114847466j)*x[0]**o + ((0.911331626747+0.165565011048j))*x[0] + ((0.493540212911+0.309063406433j))*x[1]**o + ((-0.897926471762+0.123131337606j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.819526178895-0.0791114847466j)*x_ref[0]**o + ((0.911331626747+0.165565011048j))*x_ref[0] + ((0.493540212911+0.309063406433j))*x_ref[1]**o + ((-0.897926471762+0.123131337606j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.674719204179+0.579495329018j)*x[0]**o + ((-0.469456212287-0.243432576178j))*x[0] + ((-0.144377322502+0.582480031345j))*x[1]**o + ((0.47253903809+0.775088435335j))*x[1]
        ref[(0, 0, 0, 2)]=(0.674719204179+0.579495329018j)*x_ref[0]**o + ((-0.469456212287-0.243432576178j))*x_ref[0] + ((-0.144377322502+0.582480031345j))*x_ref[1]**o + ((0.47253903809+0.775088435335j))*x_ref[1]
        arg[(0, 0, 0, 3)]=(-0.125229274268-0.910427993715j)*x[0]**o + ((-0.996253160992-0.412386286456j))*x[0] + ((-0.214572957202+0.19696875772j))*x[1]**o + ((0.575109986325-0.718826584172j))*x[1]
        ref[(0, 0, 0, 3)]=(-0.125229274268-0.910427993715j)*x_ref[0]**o + ((-0.996253160992-0.412386286456j))*x_ref[0] + ((-0.214572957202+0.19696875772j))*x_ref[1]**o + ((0.575109986325-0.718826584172j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.406816985904-0.733400342821j)*x[0]**o + ((0.714145097622+0.231339513591j))*x[0] + ((-0.585237799964-0.776466197143j))*x[1]**o + ((-0.0483061235448-0.0195552469733j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.406816985904-0.733400342821j)*x_ref[0]**o + ((0.714145097622+0.231339513591j))*x_ref[0] + ((-0.585237799964-0.776466197143j))*x_ref[1]**o + ((-0.0483061235448-0.0195552469733j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.568459827104+0.951638074554j)*x[0]**o + ((0.00488748800172+0.687013843291j))*x[0] + ((-0.313008495601-0.0214291622839j))*x[1]**o + ((0.201239972257+0.344376111899j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.568459827104+0.951638074554j)*x_ref[0]**o + ((0.00488748800172+0.687013843291j))*x_ref[0] + ((-0.313008495601-0.0214291622839j))*x_ref[1]**o + ((0.201239972257+0.344376111899j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(0.19835784937-0.284601814525j)*x[0]**o + ((-0.880492594662+0.995252124122j))*x[0] + ((0.710828917157-0.137287580502j))*x[1]**o + ((0.773321207984-0.42744990754j))*x[1]
        ref[(0, 0, 1, 2)]=(0.19835784937-0.284601814525j)*x_ref[0]**o + ((-0.880492594662+0.995252124122j))*x_ref[0] + ((0.710828917157-0.137287580502j))*x_ref[1]**o + ((0.773321207984-0.42744990754j))*x_ref[1]
        arg[(0, 0, 1, 3)]=(0.276869619738+0.0488212780209j)*x[0]**o + ((0.274863528821+0.350544029853j))*x[0] + ((0.981222572989-0.549108821386j))*x[1]**o + ((0.930559293004-0.155301912004j))*x[1]
        ref[(0, 0, 1, 3)]=(0.276869619738+0.0488212780209j)*x_ref[0]**o + ((0.274863528821+0.350544029853j))*x_ref[0] + ((0.981222572989-0.549108821386j))*x_ref[1]**o + ((0.930559293004-0.155301912004j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.459719789164-0.916279362571j)*x[0]**o + ((-0.951839903408-0.203538786183j))*x[0] + ((-0.984790029665+0.432284599599j))*x[1]**o + ((0.806677106254-0.667841082475j))*x[1]
        ref[(0, 1, 0, 0)]=(0.459719789164-0.916279362571j)*x_ref[0]**o + ((-0.951839903408-0.203538786183j))*x_ref[0] + ((-0.984790029665+0.432284599599j))*x_ref[1]**o + ((0.806677106254-0.667841082475j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.175788745395+0.728362705779j)*x[0]**o + ((0.00685098016539-0.931553795209j))*x[0] + ((-0.0674075402936-0.755305542999j))*x[1]**o + ((0.185723977632+0.525203243631j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.175788745395+0.728362705779j)*x_ref[0]**o + ((0.00685098016539-0.931553795209j))*x_ref[0] + ((-0.0674075402936-0.755305542999j))*x_ref[1]**o + ((0.185723977632+0.525203243631j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(0.516909490397+0.376800749734j)*x[0]**o + ((-0.667228898664+0.83317447771j))*x[0] + ((-0.194860542584+0.160819297627j))*x[1]**o + ((-0.464225190687-0.172512501405j))*x[1]
        ref[(0, 1, 0, 2)]=(0.516909490397+0.376800749734j)*x_ref[0]**o + ((-0.667228898664+0.83317447771j))*x_ref[0] + ((-0.194860542584+0.160819297627j))*x_ref[1]**o + ((-0.464225190687-0.172512501405j))*x_ref[1]
        arg[(0, 1, 0, 3)]=(0.797214814998-0.426445495288j)*x[0]**o + ((-0.0507491201419-0.968026312294j))*x[0] + ((0.402004028716+0.510738787413j))*x[1]**o + ((-0.158184914719+0.300622296614j))*x[1]
        ref[(0, 1, 0, 3)]=(0.797214814998-0.426445495288j)*x_ref[0]**o + ((-0.0507491201419-0.968026312294j))*x_ref[0] + ((0.402004028716+0.510738787413j))*x_ref[1]**o + ((-0.158184914719+0.300622296614j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.575195539195-0.738011342906j)*x[0]**o + ((0.453439972461-0.514042953209j))*x[0] + ((0.695850637414-0.917053902505j))*x[1]**o + ((0.734971852559+0.482796143464j))*x[1]
        ref[(0, 1, 1, 0)]=(0.575195539195-0.738011342906j)*x_ref[0]**o + ((0.453439972461-0.514042953209j))*x_ref[0] + ((0.695850637414-0.917053902505j))*x_ref[1]**o + ((0.734971852559+0.482796143464j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.303992145389-0.969084592681j)*x[0]**o + ((-0.00694233645541+0.205199009257j))*x[0] + ((-0.888440776866-0.66990407152j))*x[1]**o + ((-0.417909419523+0.181816394285j))*x[1]
        ref[(0, 1, 1, 1)]=(0.303992145389-0.969084592681j)*x_ref[0]**o + ((-0.00694233645541+0.205199009257j))*x_ref[0] + ((-0.888440776866-0.66990407152j))*x_ref[1]**o + ((-0.417909419523+0.181816394285j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(0.527218379871+0.789303108698j)*x[0]**o + ((0.774866416525-0.910627941978j))*x[0] + ((0.124924524664-0.327929193143j))*x[1]**o + ((0.627064378055+0.883355248882j))*x[1]
        ref[(0, 1, 1, 2)]=(0.527218379871+0.789303108698j)*x_ref[0]**o + ((0.774866416525-0.910627941978j))*x_ref[0] + ((0.124924524664-0.327929193143j))*x_ref[1]**o + ((0.627064378055+0.883355248882j))*x_ref[1]
        arg[(0, 1, 1, 3)]=(-0.504404410439-0.617638250379j)*x[0]**o + ((-0.952513852714-0.727399551024j))*x[0] + ((0.794776378802-0.0143368788043j))*x[1]**o + ((-0.00980295428673-0.210724366565j))*x[1]
        ref[(0, 1, 1, 3)]=(-0.504404410439-0.617638250379j)*x_ref[0]**o + ((-0.952513852714-0.727399551024j))*x_ref[0] + ((0.794776378802-0.0143368788043j))*x_ref[1]**o + ((-0.00980295428673-0.210724366565j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(-0.282065309633+0.4815859891j)*x[0]**o + ((0.0733943516501-0.444965787806j))*x[0] + ((-0.0749314116901-0.760586800965j))*x[1]**o + ((-0.668273022086-0.469142789102j))*x[1]
        ref[(0, 2, 0, 0)]=(-0.282065309633+0.4815859891j)*x_ref[0]**o + ((0.0733943516501-0.444965787806j))*x_ref[0] + ((-0.0749314116901-0.760586800965j))*x_ref[1]**o + ((-0.668273022086-0.469142789102j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(0.825138728398-0.520527168184j)*x[0]**o + ((0.612317472301-0.123372072229j))*x[0] + ((-0.719078260237+0.149087647208j))*x[1]**o + ((0.152683559822-0.408536271998j))*x[1]
        ref[(0, 2, 0, 1)]=(0.825138728398-0.520527168184j)*x_ref[0]**o + ((0.612317472301-0.123372072229j))*x_ref[0] + ((-0.719078260237+0.149087647208j))*x_ref[1]**o + ((0.152683559822-0.408536271998j))*x_ref[1]
        arg[(0, 2, 0, 2)]=(0.709007345887+0.0722327716286j)*x[0]**o + ((0.126216449372+0.200427382333j))*x[0] + ((-0.251747269305+0.496124540579j))*x[1]**o + ((-0.208544220027-0.840932032755j))*x[1]
        ref[(0, 2, 0, 2)]=(0.709007345887+0.0722327716286j)*x_ref[0]**o + ((0.126216449372+0.200427382333j))*x_ref[0] + ((-0.251747269305+0.496124540579j))*x_ref[1]**o + ((-0.208544220027-0.840932032755j))*x_ref[1]
        arg[(0, 2, 0, 3)]=(-0.120234160598+0.465603747804j)*x[0]**o + ((0.774362210558+0.929759316028j))*x[0] + ((-0.462420339983+0.837079800697j))*x[1]**o + ((0.743452738445+0.569851838613j))*x[1]
        ref[(0, 2, 0, 3)]=(-0.120234160598+0.465603747804j)*x_ref[0]**o + ((0.774362210558+0.929759316028j))*x_ref[0] + ((-0.462420339983+0.837079800697j))*x_ref[1]**o + ((0.743452738445+0.569851838613j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(0.75605889577+0.789840385135j)*x[0]**o + ((0.0861255393576-0.508847703087j))*x[0] + ((-0.283949839733+0.583366488671j))*x[1]**o + ((0.109993752701-0.0406623070807j))*x[1]
        ref[(0, 2, 1, 0)]=(0.75605889577+0.789840385135j)*x_ref[0]**o + ((0.0861255393576-0.508847703087j))*x_ref[0] + ((-0.283949839733+0.583366488671j))*x_ref[1]**o + ((0.109993752701-0.0406623070807j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(0.618651179403+0.656276502137j)*x[0]**o + ((0.0679771485392+0.370797766758j))*x[0] + ((0.723946917702+0.82452410591j))*x[1]**o + ((-0.680783842121-0.312146581173j))*x[1]
        ref[(0, 2, 1, 1)]=(0.618651179403+0.656276502137j)*x_ref[0]**o + ((0.0679771485392+0.370797766758j))*x_ref[0] + ((0.723946917702+0.82452410591j))*x_ref[1]**o + ((-0.680783842121-0.312146581173j))*x_ref[1]
        arg[(0, 2, 1, 2)]=(-0.895540630968+0.730226399001j)*x[0]**o + ((-0.803372534356-0.976192471252j))*x[0] + ((0.313278995524-0.583306243383j))*x[1]**o + ((0.309491816254-0.414371816553j))*x[1]
        ref[(0, 2, 1, 2)]=(-0.895540630968+0.730226399001j)*x_ref[0]**o + ((-0.803372534356-0.976192471252j))*x_ref[0] + ((0.313278995524-0.583306243383j))*x_ref[1]**o + ((0.309491816254-0.414371816553j))*x_ref[1]
        arg[(0, 2, 1, 3)]=(0.399541202353-0.721688952121j)*x[0]**o + ((-0.310002772157+0.806450219745j))*x[0] + ((-0.17939233603+0.607026849413j))*x[1]**o + ((0.700945147918-0.151739853369j))*x[1]
        ref[(0, 2, 1, 3)]=(0.399541202353-0.721688952121j)*x_ref[0]**o + ((-0.310002772157+0.806450219745j))*x_ref[0] + ((-0.17939233603+0.607026849413j))*x_ref[1]**o + ((0.700945147918-0.151739853369j))*x_ref[1]
        arg[(0, 3, 0, 0)]=(-0.595051670345+0.9379713378j)*x[0]**o + ((-0.00697236021842-0.445389354769j))*x[0] + ((-0.66057761475-0.0813753903206j))*x[1]**o + ((-0.228435595113+0.310001190088j))*x[1]
        ref[(0, 3, 0, 0)]=(-0.595051670345+0.9379713378j)*x_ref[0]**o + ((-0.00697236021842-0.445389354769j))*x_ref[0] + ((-0.66057761475-0.0813753903206j))*x_ref[1]**o + ((-0.228435595113+0.310001190088j))*x_ref[1]
        arg[(0, 3, 0, 1)]=(0.810121423525+0.575976754275j)*x[0]**o + ((-0.452095952144+0.557640146306j))*x[0] + ((0.626461680624-0.503839594655j))*x[1]**o + ((-0.086987169561+0.868062780862j))*x[1]
        ref[(0, 3, 0, 1)]=(0.810121423525+0.575976754275j)*x_ref[0]**o + ((-0.452095952144+0.557640146306j))*x_ref[0] + ((0.626461680624-0.503839594655j))*x_ref[1]**o + ((-0.086987169561+0.868062780862j))*x_ref[1]
        arg[(0, 3, 0, 2)]=(0.580057224821+0.203269610868j)*x[0]**o + ((0.396710957496-0.689666921995j))*x[0] + ((-0.433242763618-0.280390207562j))*x[1]**o + ((0.0689768183353+0.0508473190791j))*x[1]
        ref[(0, 3, 0, 2)]=(0.580057224821+0.203269610868j)*x_ref[0]**o + ((0.396710957496-0.689666921995j))*x_ref[0] + ((-0.433242763618-0.280390207562j))*x_ref[1]**o + ((0.0689768183353+0.0508473190791j))*x_ref[1]
        arg[(0, 3, 0, 3)]=(-0.2777861484-0.571678151041j)*x[0]**o + ((0.910287669733+0.662794249125j))*x[0] + ((0.823319541234-0.135283702177j))*x[1]**o + ((0.0876762256701+0.682384425361j))*x[1]
        ref[(0, 3, 0, 3)]=(-0.2777861484-0.571678151041j)*x_ref[0]**o + ((0.910287669733+0.662794249125j))*x_ref[0] + ((0.823319541234-0.135283702177j))*x_ref[1]**o + ((0.0876762256701+0.682384425361j))*x_ref[1]
        arg[(0, 3, 1, 0)]=(-0.174660395448-0.222155135436j)*x[0]**o + ((0.389509025984-0.51736446861j))*x[0] + ((0.927166480473-0.147534609115j))*x[1]**o + ((-0.306709523761+0.08002937284j))*x[1]
        ref[(0, 3, 1, 0)]=(-0.174660395448-0.222155135436j)*x_ref[0]**o + ((0.389509025984-0.51736446861j))*x_ref[0] + ((0.927166480473-0.147534609115j))*x_ref[1]**o + ((-0.306709523761+0.08002937284j))*x_ref[1]
        arg[(0, 3, 1, 1)]=(-0.318830069309-0.357816138573j)*x[0]**o + ((0.782018844218+0.0885559266451j))*x[0] + ((0.749271751475+0.630026345327j))*x[1]**o + ((-0.367748735071-0.820276796384j))*x[1]
        ref[(0, 3, 1, 1)]=(-0.318830069309-0.357816138573j)*x_ref[0]**o + ((0.782018844218+0.0885559266451j))*x_ref[0] + ((0.749271751475+0.630026345327j))*x_ref[1]**o + ((-0.367748735071-0.820276796384j))*x_ref[1]
        arg[(0, 3, 1, 2)]=(-0.890203081785+0.602626084751j)*x[0]**o + ((0.830963883819+0.805073756443j))*x[0] + ((0.523062750188+0.226132725992j))*x[1]**o + ((0.58711687305-0.450939778818j))*x[1]
        ref[(0, 3, 1, 2)]=(-0.890203081785+0.602626084751j)*x_ref[0]**o + ((0.830963883819+0.805073756443j))*x_ref[0] + ((0.523062750188+0.226132725992j))*x_ref[1]**o + ((0.58711687305-0.450939778818j))*x_ref[1]
        arg[(0, 3, 1, 3)]=(-0.577212885805-0.712001924428j)*x[0]**o + ((-0.287521674343+0.732848329557j))*x[0] + ((-0.745364062957-0.750806713506j))*x[1]**o + ((-0.782955339614+0.434054451845j))*x[1]
        ref[(0, 3, 1, 3)]=(-0.577212885805-0.712001924428j)*x_ref[0]**o + ((-0.287521674343+0.732848329557j))*x_ref[0] + ((-0.745364062957-0.750806713506j))*x_ref[1]**o + ((-0.782955339614+0.434054451845j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.895304754393-0.60232444086j)*x[0]**o + ((-0.0406696977565-0.145215245692j))*x[0] + ((0.6252048176+0.663510769141j))*x[1]**o + ((-0.579324867919+0.430262446343j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.895304754393-0.60232444086j)*x_ref[0]**o + ((-0.0406696977565-0.145215245692j))*x_ref[0] + ((0.6252048176+0.663510769141j))*x_ref[1]**o + ((-0.579324867919+0.430262446343j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(-0.797585731535+0.887041718945j)*x[0]**o + ((0.687390685391-0.127014209749j))*x[0] + ((-0.631199779976-0.185884141457j))*x[1]**o + ((-0.247408148673+0.658861459917j))*x[1]
        ref[(1, 0, 0, 1)]=(-0.797585731535+0.887041718945j)*x_ref[0]**o + ((0.687390685391-0.127014209749j))*x_ref[0] + ((-0.631199779976-0.185884141457j))*x_ref[1]**o + ((-0.247408148673+0.658861459917j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(-0.0220189193881-0.106030861009j)*x[0]**o + ((-0.618896466448-0.0248343048135j))*x[0] + ((0.981719126202+0.00346908037143j))*x[1]**o + ((-0.97984657187+0.368703019172j))*x[1]
        ref[(1, 0, 0, 2)]=(-0.0220189193881-0.106030861009j)*x_ref[0]**o + ((-0.618896466448-0.0248343048135j))*x_ref[0] + ((0.981719126202+0.00346908037143j))*x_ref[1]**o + ((-0.97984657187+0.368703019172j))*x_ref[1]
        arg[(1, 0, 0, 3)]=(0.0908951579695-0.526734991708j)*x[0]**o + ((0.0586127165127-0.542551795859j))*x[0] + ((0.726150312646+0.781487397639j))*x[1]**o + ((0.969628378533-0.304165962497j))*x[1]
        ref[(1, 0, 0, 3)]=(0.0908951579695-0.526734991708j)*x_ref[0]**o + ((0.0586127165127-0.542551795859j))*x_ref[0] + ((0.726150312646+0.781487397639j))*x_ref[1]**o + ((0.969628378533-0.304165962497j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.473610311604-0.306727856174j)*x[0]**o + ((0.783714291817-0.480279670985j))*x[0] + ((-0.330551738608+0.617179627131j))*x[1]**o + ((-0.58658018888-0.202496249127j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.473610311604-0.306727856174j)*x_ref[0]**o + ((0.783714291817-0.480279670985j))*x_ref[0] + ((-0.330551738608+0.617179627131j))*x_ref[1]**o + ((-0.58658018888-0.202496249127j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.408766852764-0.987109502482j)*x[0]**o + ((-0.0385012888271-0.658770495366j))*x[0] + ((-0.462175368376-0.50977744271j))*x[1]**o + ((-0.0212871405144+0.683674218064j))*x[1]
        ref[(1, 0, 1, 1)]=(0.408766852764-0.987109502482j)*x_ref[0]**o + ((-0.0385012888271-0.658770495366j))*x_ref[0] + ((-0.462175368376-0.50977744271j))*x_ref[1]**o + ((-0.0212871405144+0.683674218064j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(-0.477229180456+0.191400500411j)*x[0]**o + ((0.788915414555-0.347289424426j))*x[0] + ((0.958664517867+0.55105876466j))*x[1]**o + ((-0.467068157859+0.827223790883j))*x[1]
        ref[(1, 0, 1, 2)]=(-0.477229180456+0.191400500411j)*x_ref[0]**o + ((0.788915414555-0.347289424426j))*x_ref[0] + ((0.958664517867+0.55105876466j))*x_ref[1]**o + ((-0.467068157859+0.827223790883j))*x_ref[1]
        arg[(1, 0, 1, 3)]=(0.803004448556+0.205007031539j)*x[0]**o + ((-0.0287733634561-0.61968740622j))*x[0] + ((0.0276761902274-0.0786480247288j))*x[1]**o + ((0.449877573988-0.814757739381j))*x[1]
        ref[(1, 0, 1, 3)]=(0.803004448556+0.205007031539j)*x_ref[0]**o + ((-0.0287733634561-0.61968740622j))*x_ref[0] + ((0.0276761902274-0.0786480247288j))*x_ref[1]**o + ((0.449877573988-0.814757739381j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.455386661274-0.951040362491j)*x[0]**o + ((0.986489892217-0.60272815607j))*x[0] + ((-0.551242308518+0.13365938055j))*x[1]**o + ((0.466047804895+0.176491530926j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.455386661274-0.951040362491j)*x_ref[0]**o + ((0.986489892217-0.60272815607j))*x_ref[0] + ((-0.551242308518+0.13365938055j))*x_ref[1]**o + ((0.466047804895+0.176491530926j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.037755760859+0.587809858493j)*x[0]**o + ((0.550357657375-0.232238306893j))*x[0] + ((0.981929384855-0.984910791962j))*x[1]**o + ((0.329473668147-0.485395906142j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.037755760859+0.587809858493j)*x_ref[0]**o + ((0.550357657375-0.232238306893j))*x_ref[0] + ((0.981929384855-0.984910791962j))*x_ref[1]**o + ((0.329473668147-0.485395906142j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(-0.903419443653-0.608075485254j)*x[0]**o + ((-0.653347147845-0.498340315721j))*x[0] + ((0.78394625101-0.357333844692j))*x[1]**o + ((0.856254557286-0.6160605985j))*x[1]
        ref[(1, 1, 0, 2)]=(-0.903419443653-0.608075485254j)*x_ref[0]**o + ((-0.653347147845-0.498340315721j))*x_ref[0] + ((0.78394625101-0.357333844692j))*x_ref[1]**o + ((0.856254557286-0.6160605985j))*x_ref[1]
        arg[(1, 1, 0, 3)]=(0.823709358924-0.284817109762j)*x[0]**o + ((0.0419754095075-0.225236031837j))*x[0] + ((0.195958295629+0.855855872664j))*x[1]**o + ((0.853459955177+0.783371603927j))*x[1]
        ref[(1, 1, 0, 3)]=(0.823709358924-0.284817109762j)*x_ref[0]**o + ((0.0419754095075-0.225236031837j))*x_ref[0] + ((0.195958295629+0.855855872664j))*x_ref[1]**o + ((0.853459955177+0.783371603927j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.322676279398+0.460638043854j)*x[0]**o + ((0.457000903919+0.383433748782j))*x[0] + ((-0.564549849484+0.649655814563j))*x[1]**o + ((-0.659841614295+0.898571398032j))*x[1]
        ref[(1, 1, 1, 0)]=(0.322676279398+0.460638043854j)*x_ref[0]**o + ((0.457000903919+0.383433748782j))*x_ref[0] + ((-0.564549849484+0.649655814563j))*x_ref[1]**o + ((-0.659841614295+0.898571398032j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.958253717291+0.0291681473858j)*x[0]**o + ((-0.657600732409-0.903670698541j))*x[0] + ((0.30896680698-0.598197025754j))*x[1]**o + ((0.794712736986-0.273174509484j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.958253717291+0.0291681473858j)*x_ref[0]**o + ((-0.657600732409-0.903670698541j))*x_ref[0] + ((0.30896680698-0.598197025754j))*x_ref[1]**o + ((0.794712736986-0.273174509484j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(0.423225871442-0.26900895394j)*x[0]**o + ((0.26576435369+0.341159926339j))*x[0] + ((0.119456507018+0.491243514965j))*x[1]**o + ((-0.0096813011193-0.35479605544j))*x[1]
        ref[(1, 1, 1, 2)]=(0.423225871442-0.26900895394j)*x_ref[0]**o + ((0.26576435369+0.341159926339j))*x_ref[0] + ((0.119456507018+0.491243514965j))*x_ref[1]**o + ((-0.0096813011193-0.35479605544j))*x_ref[1]
        arg[(1, 1, 1, 3)]=(-0.0583475235012-0.839714405241j)*x[0]**o + ((0.525693952893-0.780608465775j))*x[0] + ((0.0952392731938+0.378994683908j))*x[1]**o + ((0.042280119201-0.201240527991j))*x[1]
        ref[(1, 1, 1, 3)]=(-0.0583475235012-0.839714405241j)*x_ref[0]**o + ((0.525693952893-0.780608465775j))*x_ref[0] + ((0.0952392731938+0.378994683908j))*x_ref[1]**o + ((0.042280119201-0.201240527991j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(0.0380536485391-0.161368839908j)*x[0]**o + ((0.46236170837+0.589227620505j))*x[0] + ((0.285730579251-0.0789673336992j))*x[1]**o + ((-0.957870824311+0.34184525371j))*x[1]
        ref[(1, 2, 0, 0)]=(0.0380536485391-0.161368839908j)*x_ref[0]**o + ((0.46236170837+0.589227620505j))*x_ref[0] + ((0.285730579251-0.0789673336992j))*x_ref[1]**o + ((-0.957870824311+0.34184525371j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.638093031546-0.971457961143j)*x[0]**o + ((0.380166399666-0.804187611641j))*x[0] + ((-0.0394113835225-0.721093782439j))*x[1]**o + ((0.278163648771+0.00928089879967j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.638093031546-0.971457961143j)*x_ref[0]**o + ((0.380166399666-0.804187611641j))*x_ref[0] + ((-0.0394113835225-0.721093782439j))*x_ref[1]**o + ((0.278163648771+0.00928089879967j))*x_ref[1]
        arg[(1, 2, 0, 2)]=(0.0347996342927+0.617686245794j)*x[0]**o + ((-0.422644501306-0.0829274552125j))*x[0] + ((-0.606743373136-0.306896691012j))*x[1]**o + ((-0.0685394487701+0.200363115443j))*x[1]
        ref[(1, 2, 0, 2)]=(0.0347996342927+0.617686245794j)*x_ref[0]**o + ((-0.422644501306-0.0829274552125j))*x_ref[0] + ((-0.606743373136-0.306896691012j))*x_ref[1]**o + ((-0.0685394487701+0.200363115443j))*x_ref[1]
        arg[(1, 2, 0, 3)]=(0.896522620063+0.200975989775j)*x[0]**o + ((0.770594229586+0.607769926892j))*x[0] + ((0.958019337307-0.937564346158j))*x[1]**o + ((-0.798211146778-0.0776947637379j))*x[1]
        ref[(1, 2, 0, 3)]=(0.896522620063+0.200975989775j)*x_ref[0]**o + ((0.770594229586+0.607769926892j))*x_ref[0] + ((0.958019337307-0.937564346158j))*x_ref[1]**o + ((-0.798211146778-0.0776947637379j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(0.711438025877+0.415952197071j)*x[0]**o + ((-0.0120870358764-0.940745410938j))*x[0] + ((0.901961873032+0.595366345387j))*x[1]**o + ((0.902099694308-0.488370516102j))*x[1]
        ref[(1, 2, 1, 0)]=(0.711438025877+0.415952197071j)*x_ref[0]**o + ((-0.0120870358764-0.940745410938j))*x_ref[0] + ((0.901961873032+0.595366345387j))*x_ref[1]**o + ((0.902099694308-0.488370516102j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.422070973976+0.632011789491j)*x[0]**o + ((0.217574439158+0.723686736127j))*x[0] + ((-0.790773561304+0.811716971125j))*x[1]**o + ((0.417520530883+0.216593878299j))*x[1]
        ref[(1, 2, 1, 1)]=(0.422070973976+0.632011789491j)*x_ref[0]**o + ((0.217574439158+0.723686736127j))*x_ref[0] + ((-0.790773561304+0.811716971125j))*x_ref[1]**o + ((0.417520530883+0.216593878299j))*x_ref[1]
        arg[(1, 2, 1, 2)]=(-0.313273464302-0.584680249567j)*x[0]**o + ((0.363419590136+0.517063468219j))*x[0] + ((0.721964466884-0.317559931673j))*x[1]**o + ((-0.202381209919+0.953526915636j))*x[1]
        ref[(1, 2, 1, 2)]=(-0.313273464302-0.584680249567j)*x_ref[0]**o + ((0.363419590136+0.517063468219j))*x_ref[0] + ((0.721964466884-0.317559931673j))*x_ref[1]**o + ((-0.202381209919+0.953526915636j))*x_ref[1]
        arg[(1, 2, 1, 3)]=(0.829465926853-0.889296449958j)*x[0]**o + ((0.0146701192768+0.613295180135j))*x[0] + ((0.549603364458+0.898542484377j))*x[1]**o + ((0.320799220522+0.484813026702j))*x[1]
        ref[(1, 2, 1, 3)]=(0.829465926853-0.889296449958j)*x_ref[0]**o + ((0.0146701192768+0.613295180135j))*x_ref[0] + ((0.549603364458+0.898542484377j))*x_ref[1]**o + ((0.320799220522+0.484813026702j))*x_ref[1]
        arg[(1, 3, 0, 0)]=(0.173930767464+0.0958708823221j)*x[0]**o + ((0.926713669273+0.73340164562j))*x[0] + ((-0.61973128526+0.267671162181j))*x[1]**o + ((-0.5256892482+0.967795819659j))*x[1]
        ref[(1, 3, 0, 0)]=(0.173930767464+0.0958708823221j)*x_ref[0]**o + ((0.926713669273+0.73340164562j))*x_ref[0] + ((-0.61973128526+0.267671162181j))*x_ref[1]**o + ((-0.5256892482+0.967795819659j))*x_ref[1]
        arg[(1, 3, 0, 1)]=(-0.898119358282-0.831847745381j)*x[0]**o + ((-0.720733988635+0.477095452144j))*x[0] + ((0.579933714448-0.818469267589j))*x[1]**o + ((-0.845687476668+0.520831260822j))*x[1]
        ref[(1, 3, 0, 1)]=(-0.898119358282-0.831847745381j)*x_ref[0]**o + ((-0.720733988635+0.477095452144j))*x_ref[0] + ((0.579933714448-0.818469267589j))*x_ref[1]**o + ((-0.845687476668+0.520831260822j))*x_ref[1]
        arg[(1, 3, 0, 2)]=(-0.826011119002-0.351815979974j)*x[0]**o + ((0.265799035566+0.742277481915j))*x[0] + ((-0.461812515252-0.611786578086j))*x[1]**o + ((0.947829279807+0.106003671331j))*x[1]
        ref[(1, 3, 0, 2)]=(-0.826011119002-0.351815979974j)*x_ref[0]**o + ((0.265799035566+0.742277481915j))*x_ref[0] + ((-0.461812515252-0.611786578086j))*x_ref[1]**o + ((0.947829279807+0.106003671331j))*x_ref[1]
        arg[(1, 3, 0, 3)]=(-0.698283566812-0.278414762598j)*x[0]**o + ((0.715622891131+0.626851344676j))*x[0] + ((0.450516849404-0.578435483855j))*x[1]**o + ((-0.397384949559+0.115893938896j))*x[1]
        ref[(1, 3, 0, 3)]=(-0.698283566812-0.278414762598j)*x_ref[0]**o + ((0.715622891131+0.626851344676j))*x_ref[0] + ((0.450516849404-0.578435483855j))*x_ref[1]**o + ((-0.397384949559+0.115893938896j))*x_ref[1]
        arg[(1, 3, 1, 0)]=(-0.767166007738-0.529680243601j)*x[0]**o + ((0.810843212952+0.452133653071j))*x[0] + ((0.210366206816-0.0656576839157j))*x[1]**o + ((0.822684988678-0.658811918708j))*x[1]
        ref[(1, 3, 1, 0)]=(-0.767166007738-0.529680243601j)*x_ref[0]**o + ((0.810843212952+0.452133653071j))*x_ref[0] + ((0.210366206816-0.0656576839157j))*x_ref[1]**o + ((0.822684988678-0.658811918708j))*x_ref[1]
        arg[(1, 3, 1, 1)]=(0.789348342683-0.367410139429j)*x[0]**o + ((0.30009532312+0.698626708725j))*x[0] + ((0.352630471725+0.451913483612j))*x[1]**o + ((0.274493096902+0.944269811034j))*x[1]
        ref[(1, 3, 1, 1)]=(0.789348342683-0.367410139429j)*x_ref[0]**o + ((0.30009532312+0.698626708725j))*x_ref[0] + ((0.352630471725+0.451913483612j))*x_ref[1]**o + ((0.274493096902+0.944269811034j))*x_ref[1]
        arg[(1, 3, 1, 2)]=(-0.263171846941-0.254110193224j)*x[0]**o + ((0.806228151658-0.210662973098j))*x[0] + ((-0.470523032978-0.6137164789j))*x[1]**o + ((0.956274855125+0.218450022718j))*x[1]
        ref[(1, 3, 1, 2)]=(-0.263171846941-0.254110193224j)*x_ref[0]**o + ((0.806228151658-0.210662973098j))*x_ref[0] + ((-0.470523032978-0.6137164789j))*x_ref[1]**o + ((0.956274855125+0.218450022718j))*x_ref[1]
        arg[(1, 3, 1, 3)]=(-0.690456196498-0.0184264572518j)*x[0]**o + ((-0.536612116678+0.601035638784j))*x[0] + ((-0.34645322197+0.570084238239j))*x[1]**o + ((0.991206173482-0.98389322678j))*x[1]
        ref[(1, 3, 1, 3)]=(-0.690456196498-0.0184264572518j)*x_ref[0]**o + ((-0.536612116678+0.601035638784j))*x_ref[0] + ((-0.34645322197+0.570084238239j))*x_ref[1]**o + ((0.991206173482-0.98389322678j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(0.466859363476+0.689296754585j)*x[0]**o + ((0.0839372640509-0.395880175594j))*x[0] + ((0.737719364744+0.658306608813j))*x[1]**o + ((0.654981443264-0.908456836393j))*x[1]
        ref[(2, 0, 0, 0)]=(0.466859363476+0.689296754585j)*x_ref[0]**o + ((0.0839372640509-0.395880175594j))*x_ref[0] + ((0.737719364744+0.658306608813j))*x_ref[1]**o + ((0.654981443264-0.908456836393j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(0.014692512818+0.552480114036j)*x[0]**o + ((-0.8458830752-0.147992543395j))*x[0] + ((-0.218874372813-0.240688800971j))*x[1]**o + ((-0.4383078472+0.965104059941j))*x[1]
        ref[(2, 0, 0, 1)]=(0.014692512818+0.552480114036j)*x_ref[0]**o + ((-0.8458830752-0.147992543395j))*x_ref[0] + ((-0.218874372813-0.240688800971j))*x_ref[1]**o + ((-0.4383078472+0.965104059941j))*x_ref[1]
        arg[(2, 0, 0, 2)]=(0.685838272494+0.0700334396838j)*x[0]**o + ((0.624877130428-0.265901442597j))*x[0] + ((0.9850373005+0.80086163553j))*x[1]**o + ((-0.306680232714+0.134845108466j))*x[1]
        ref[(2, 0, 0, 2)]=(0.685838272494+0.0700334396838j)*x_ref[0]**o + ((0.624877130428-0.265901442597j))*x_ref[0] + ((0.9850373005+0.80086163553j))*x_ref[1]**o + ((-0.306680232714+0.134845108466j))*x_ref[1]
        arg[(2, 0, 0, 3)]=(-0.492151581194+0.249237087484j)*x[0]**o + ((0.369129427142-0.00695469587447j))*x[0] + ((-0.0272887203346-0.788596328717j))*x[1]**o + ((-0.00263025630286+0.632103449261j))*x[1]
        ref[(2, 0, 0, 3)]=(-0.492151581194+0.249237087484j)*x_ref[0]**o + ((0.369129427142-0.00695469587447j))*x_ref[0] + ((-0.0272887203346-0.788596328717j))*x_ref[1]**o + ((-0.00263025630286+0.632103449261j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(0.205458167322+0.248539145139j)*x[0]**o + ((0.266020819236-0.335516537713j))*x[0] + ((0.189850284272-0.181156409832j))*x[1]**o + ((0.224091054437-0.724085134786j))*x[1]
        ref[(2, 0, 1, 0)]=(0.205458167322+0.248539145139j)*x_ref[0]**o + ((0.266020819236-0.335516537713j))*x_ref[0] + ((0.189850284272-0.181156409832j))*x_ref[1]**o + ((0.224091054437-0.724085134786j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.26826286961-0.0836795888519j)*x[0]**o + ((0.699382495044+0.56039765958j))*x[0] + ((0.217818211467+0.555769565196j))*x[1]**o + ((-0.516522214835+0.514365830023j))*x[1]
        ref[(2, 0, 1, 1)]=(0.26826286961-0.0836795888519j)*x_ref[0]**o + ((0.699382495044+0.56039765958j))*x_ref[0] + ((0.217818211467+0.555769565196j))*x_ref[1]**o + ((-0.516522214835+0.514365830023j))*x_ref[1]
        arg[(2, 0, 1, 2)]=(0.411889005762-0.444871450629j)*x[0]**o + ((0.952858640032+0.102285334689j))*x[0] + ((0.326989171786+0.173238819714j))*x[1]**o + ((0.169502188993-0.139042722019j))*x[1]
        ref[(2, 0, 1, 2)]=(0.411889005762-0.444871450629j)*x_ref[0]**o + ((0.952858640032+0.102285334689j))*x_ref[0] + ((0.326989171786+0.173238819714j))*x_ref[1]**o + ((0.169502188993-0.139042722019j))*x_ref[1]
        arg[(2, 0, 1, 3)]=(-0.521084842656-0.298185763852j)*x[0]**o + ((0.371669409889+0.606648308114j))*x[0] + ((-0.126637793874-0.267666775615j))*x[1]**o + ((-0.755688014623-0.355340863584j))*x[1]
        ref[(2, 0, 1, 3)]=(-0.521084842656-0.298185763852j)*x_ref[0]**o + ((0.371669409889+0.606648308114j))*x_ref[0] + ((-0.126637793874-0.267666775615j))*x_ref[1]**o + ((-0.755688014623-0.355340863584j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(-0.469194372339+0.345648513758j)*x[0]**o + ((0.187572344386-0.512585560339j))*x[0] + ((0.536612828312-0.0401507654521j))*x[1]**o + ((0.660807215492+0.193052094908j))*x[1]
        ref[(2, 1, 0, 0)]=(-0.469194372339+0.345648513758j)*x_ref[0]**o + ((0.187572344386-0.512585560339j))*x_ref[0] + ((0.536612828312-0.0401507654521j))*x_ref[1]**o + ((0.660807215492+0.193052094908j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.371404924972+0.822258540574j)*x[0]**o + ((0.648852187866-0.57415569934j))*x[0] + ((0.716000864227+0.497167001324j))*x[1]**o + ((-0.812703594963+0.0758225661661j))*x[1]
        ref[(2, 1, 0, 1)]=(0.371404924972+0.822258540574j)*x_ref[0]**o + ((0.648852187866-0.57415569934j))*x_ref[0] + ((0.716000864227+0.497167001324j))*x_ref[1]**o + ((-0.812703594963+0.0758225661661j))*x_ref[1]
        arg[(2, 1, 0, 2)]=(-0.757929109002-0.122636477924j)*x[0]**o + ((-0.448329410786-0.518523944416j))*x[0] + ((-0.157564272771-0.213171086168j))*x[1]**o + ((-0.38387108913+0.624157705452j))*x[1]
        ref[(2, 1, 0, 2)]=(-0.757929109002-0.122636477924j)*x_ref[0]**o + ((-0.448329410786-0.518523944416j))*x_ref[0] + ((-0.157564272771-0.213171086168j))*x_ref[1]**o + ((-0.38387108913+0.624157705452j))*x_ref[1]
        arg[(2, 1, 0, 3)]=(-0.830563925368+0.480505226413j)*x[0]**o + ((-0.060845905211-0.622671661579j))*x[0] + ((-0.517937539467-0.135837248787j))*x[1]**o + ((0.683485270207+0.725947092762j))*x[1]
        ref[(2, 1, 0, 3)]=(-0.830563925368+0.480505226413j)*x_ref[0]**o + ((-0.060845905211-0.622671661579j))*x_ref[0] + ((-0.517937539467-0.135837248787j))*x_ref[1]**o + ((0.683485270207+0.725947092762j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(-0.919358346648-0.346480620584j)*x[0]**o + ((0.585256165197+0.796966341692j))*x[0] + ((-0.0553651092083+0.829905762474j))*x[1]**o + ((-0.52629552428-0.315901111876j))*x[1]
        ref[(2, 1, 1, 0)]=(-0.919358346648-0.346480620584j)*x_ref[0]**o + ((0.585256165197+0.796966341692j))*x_ref[0] + ((-0.0553651092083+0.829905762474j))*x_ref[1]**o + ((-0.52629552428-0.315901111876j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(-0.909835816983-0.102028166572j)*x[0]**o + ((0.263586131247-0.679859768413j))*x[0] + ((-0.85402949433-0.175855120853j))*x[1]**o + ((0.732297889177-0.0786157775962j))*x[1]
        ref[(2, 1, 1, 1)]=(-0.909835816983-0.102028166572j)*x_ref[0]**o + ((0.263586131247-0.679859768413j))*x_ref[0] + ((-0.85402949433-0.175855120853j))*x_ref[1]**o + ((0.732297889177-0.0786157775962j))*x_ref[1]
        arg[(2, 1, 1, 2)]=(0.540110209194-0.192539852619j)*x[0]**o + ((-0.436676135857-0.87875730643j))*x[0] + ((0.516689785605+0.476743207646j))*x[1]**o + ((0.756335881182-0.232793644036j))*x[1]
        ref[(2, 1, 1, 2)]=(0.540110209194-0.192539852619j)*x_ref[0]**o + ((-0.436676135857-0.87875730643j))*x_ref[0] + ((0.516689785605+0.476743207646j))*x_ref[1]**o + ((0.756335881182-0.232793644036j))*x_ref[1]
        arg[(2, 1, 1, 3)]=(0.855668855522+0.779596434464j)*x[0]**o + ((-0.563649941936+0.8655490573j))*x[0] + ((0.261712346908+0.840735648237j))*x[1]**o + ((0.0656436315366-0.416015177799j))*x[1]
        ref[(2, 1, 1, 3)]=(0.855668855522+0.779596434464j)*x_ref[0]**o + ((-0.563649941936+0.8655490573j))*x_ref[0] + ((0.261712346908+0.840735648237j))*x_ref[1]**o + ((0.0656436315366-0.416015177799j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(-0.481747829531+0.917983926072j)*x[0]**o + ((0.653859842371-0.671599066718j))*x[0] + ((0.52888656479+0.555305616202j))*x[1]**o + ((0.995067177706-0.700789342956j))*x[1]
        ref[(2, 2, 0, 0)]=(-0.481747829531+0.917983926072j)*x_ref[0]**o + ((0.653859842371-0.671599066718j))*x_ref[0] + ((0.52888656479+0.555305616202j))*x_ref[1]**o + ((0.995067177706-0.700789342956j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(0.393894612354+0.241454746376j)*x[0]**o + ((0.977610954123-0.270135294095j))*x[0] + ((0.644655130527+0.967609791175j))*x[1]**o + ((-0.744936629305+0.0152078892099j))*x[1]
        ref[(2, 2, 0, 1)]=(0.393894612354+0.241454746376j)*x_ref[0]**o + ((0.977610954123-0.270135294095j))*x_ref[0] + ((0.644655130527+0.967609791175j))*x_ref[1]**o + ((-0.744936629305+0.0152078892099j))*x_ref[1]
        arg[(2, 2, 0, 2)]=(-0.114675886944+0.900117369814j)*x[0]**o + ((-0.363180178355-0.253438685826j))*x[0] + ((0.885152821976+0.191323334662j))*x[1]**o + ((-0.658971357244-0.638096263909j))*x[1]
        ref[(2, 2, 0, 2)]=(-0.114675886944+0.900117369814j)*x_ref[0]**o + ((-0.363180178355-0.253438685826j))*x_ref[0] + ((0.885152821976+0.191323334662j))*x_ref[1]**o + ((-0.658971357244-0.638096263909j))*x_ref[1]
        arg[(2, 2, 0, 3)]=(-0.301125712463+0.271407061767j)*x[0]**o + ((0.365347874793+0.987426717284j))*x[0] + ((-0.602341032089+0.339667447849j))*x[1]**o + ((-0.267075730019+0.951470501977j))*x[1]
        ref[(2, 2, 0, 3)]=(-0.301125712463+0.271407061767j)*x_ref[0]**o + ((0.365347874793+0.987426717284j))*x_ref[0] + ((-0.602341032089+0.339667447849j))*x_ref[1]**o + ((-0.267075730019+0.951470501977j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(-0.323774666042-0.673824709199j)*x[0]**o + ((-0.357964185853-0.9520969128j))*x[0] + ((0.439305927458-0.305870417261j))*x[1]**o + ((0.0573613037323-0.827350286745j))*x[1]
        ref[(2, 2, 1, 0)]=(-0.323774666042-0.673824709199j)*x_ref[0]**o + ((-0.357964185853-0.9520969128j))*x_ref[0] + ((0.439305927458-0.305870417261j))*x_ref[1]**o + ((0.0573613037323-0.827350286745j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(-0.205784130804-0.817822563014j)*x[0]**o + ((-0.666307770628-0.697866400549j))*x[0] + ((0.401934466176-0.755895703379j))*x[1]**o + ((-0.236389130507-0.187747952087j))*x[1]
        ref[(2, 2, 1, 1)]=(-0.205784130804-0.817822563014j)*x_ref[0]**o + ((-0.666307770628-0.697866400549j))*x_ref[0] + ((0.401934466176-0.755895703379j))*x_ref[1]**o + ((-0.236389130507-0.187747952087j))*x_ref[1]
        arg[(2, 2, 1, 2)]=(0.406150898611+0.874663376184j)*x[0]**o + ((-0.976954783685-0.9036328201j))*x[0] + ((-0.816188632647+0.0801916417438j))*x[1]**o + ((0.791333855436-0.583232442493j))*x[1]
        ref[(2, 2, 1, 2)]=(0.406150898611+0.874663376184j)*x_ref[0]**o + ((-0.976954783685-0.9036328201j))*x_ref[0] + ((-0.816188632647+0.0801916417438j))*x_ref[1]**o + ((0.791333855436-0.583232442493j))*x_ref[1]
        arg[(2, 2, 1, 3)]=(-0.0928877373701+0.208499959794j)*x[0]**o + ((0.304806207699-0.0401172715919j))*x[0] + ((0.384019437217-0.597350487164j))*x[1]**o + ((-0.490700264482-0.668795160418j))*x[1]
        ref[(2, 2, 1, 3)]=(-0.0928877373701+0.208499959794j)*x_ref[0]**o + ((0.304806207699-0.0401172715919j))*x_ref[0] + ((0.384019437217-0.597350487164j))*x_ref[1]**o + ((-0.490700264482-0.668795160418j))*x_ref[1]
        arg[(2, 3, 0, 0)]=(0.270637490058+0.0587948000237j)*x[0]**o + ((-0.570787731713-0.483933539514j))*x[0] + ((0.660239530635+0.452725976817j))*x[1]**o + ((0.465930352387-0.820168024837j))*x[1]
        ref[(2, 3, 0, 0)]=(0.270637490058+0.0587948000237j)*x_ref[0]**o + ((-0.570787731713-0.483933539514j))*x_ref[0] + ((0.660239530635+0.452725976817j))*x_ref[1]**o + ((0.465930352387-0.820168024837j))*x_ref[1]
        arg[(2, 3, 0, 1)]=(0.383312742646+0.212452618613j)*x[0]**o + ((-0.0337635869887-0.245480733122j))*x[0] + ((-0.589070780112+0.875578190044j))*x[1]**o + ((-0.255202782288+0.147335906848j))*x[1]
        ref[(2, 3, 0, 1)]=(0.383312742646+0.212452618613j)*x_ref[0]**o + ((-0.0337635869887-0.245480733122j))*x_ref[0] + ((-0.589070780112+0.875578190044j))*x_ref[1]**o + ((-0.255202782288+0.147335906848j))*x_ref[1]
        arg[(2, 3, 0, 2)]=(0.412807646612+0.955339556002j)*x[0]**o + ((0.106605431687+0.545935408691j))*x[0] + ((-0.85406512284-0.326523681421j))*x[1]**o + ((-0.465142022494+0.266487211584j))*x[1]
        ref[(2, 3, 0, 2)]=(0.412807646612+0.955339556002j)*x_ref[0]**o + ((0.106605431687+0.545935408691j))*x_ref[0] + ((-0.85406512284-0.326523681421j))*x_ref[1]**o + ((-0.465142022494+0.266487211584j))*x_ref[1]
        arg[(2, 3, 0, 3)]=(0.100029758519+0.454895352907j)*x[0]**o + ((-0.859247732043-0.651081112256j))*x[0] + ((0.642875378499+0.057001120895j))*x[1]**o + ((0.606827375369-0.411451710654j))*x[1]
        ref[(2, 3, 0, 3)]=(0.100029758519+0.454895352907j)*x_ref[0]**o + ((-0.859247732043-0.651081112256j))*x_ref[0] + ((0.642875378499+0.057001120895j))*x_ref[1]**o + ((0.606827375369-0.411451710654j))*x_ref[1]
        arg[(2, 3, 1, 0)]=(-0.417774579692+0.181507471839j)*x[0]**o + ((0.811975519883+0.558402109368j))*x[0] + ((0.0186051927908-0.174049596869j))*x[1]**o + ((-0.341815782001-0.459793070039j))*x[1]
        ref[(2, 3, 1, 0)]=(-0.417774579692+0.181507471839j)*x_ref[0]**o + ((0.811975519883+0.558402109368j))*x_ref[0] + ((0.0186051927908-0.174049596869j))*x_ref[1]**o + ((-0.341815782001-0.459793070039j))*x_ref[1]
        arg[(2, 3, 1, 1)]=(0.870399081065+0.73944774356j)*x[0]**o + ((0.54742339967-0.0928801496166j))*x[0] + ((-0.524565944909+0.508928178213j))*x[1]**o + ((0.565231949968+0.647972122887j))*x[1]
        ref[(2, 3, 1, 1)]=(0.870399081065+0.73944774356j)*x_ref[0]**o + ((0.54742339967-0.0928801496166j))*x_ref[0] + ((-0.524565944909+0.508928178213j))*x_ref[1]**o + ((0.565231949968+0.647972122887j))*x_ref[1]
        arg[(2, 3, 1, 2)]=(-0.460565361097-0.223177345414j)*x[0]**o + ((0.153146476504-0.107663771241j))*x[0] + ((0.599261443525+0.294827943201j))*x[1]**o + ((0.662468958218-0.977583643994j))*x[1]
        ref[(2, 3, 1, 2)]=(-0.460565361097-0.223177345414j)*x_ref[0]**o + ((0.153146476504-0.107663771241j))*x_ref[0] + ((0.599261443525+0.294827943201j))*x_ref[1]**o + ((0.662468958218-0.977583643994j))*x_ref[1]
        arg[(2, 3, 1, 3)]=(0.119528329885+0.658440720741j)*x[0]**o + ((-0.418762320873+0.741527181834j))*x[0] + ((-0.676400199012-0.747854377744j))*x[1]**o + ((-0.51875982881-0.524148285897j))*x[1]
        ref[(2, 3, 1, 3)]=(0.119528329885+0.658440720741j)*x_ref[0]**o + ((-0.418762320873+0.741527181834j))*x_ref[0] + ((-0.676400199012-0.747854377744j))*x_ref[1]**o + ((-0.51875982881-0.524148285897j))*x_ref[1]
        arg[(3, 0, 0, 0)]=(-0.831531069533+0.610367697145j)*x[0]**o + ((-0.505925674452+0.119539054653j))*x[0] + ((0.448658195145-0.517515389264j))*x[1]**o + ((0.279761414055+0.73687819406j))*x[1]
        ref[(3, 0, 0, 0)]=(-0.831531069533+0.610367697145j)*x_ref[0]**o + ((-0.505925674452+0.119539054653j))*x_ref[0] + ((0.448658195145-0.517515389264j))*x_ref[1]**o + ((0.279761414055+0.73687819406j))*x_ref[1]
        arg[(3, 0, 0, 1)]=(-0.271706435751+0.293434174427j)*x[0]**o + ((0.69806723671-0.591045634016j))*x[0] + ((0.719209358811+0.861666816421j))*x[1]**o + ((0.266553235246-0.935816721442j))*x[1]
        ref[(3, 0, 0, 1)]=(-0.271706435751+0.293434174427j)*x_ref[0]**o + ((0.69806723671-0.591045634016j))*x_ref[0] + ((0.719209358811+0.861666816421j))*x_ref[1]**o + ((0.266553235246-0.935816721442j))*x_ref[1]
        arg[(3, 0, 0, 2)]=(0.557554519932-0.693824288629j)*x[0]**o + ((0.32025063043+0.879882486064j))*x[0] + ((0.878971187085+0.459704563001j))*x[1]**o + ((-0.912851771901-0.0651669516222j))*x[1]
        ref[(3, 0, 0, 2)]=(0.557554519932-0.693824288629j)*x_ref[0]**o + ((0.32025063043+0.879882486064j))*x_ref[0] + ((0.878971187085+0.459704563001j))*x_ref[1]**o + ((-0.912851771901-0.0651669516222j))*x_ref[1]
        arg[(3, 0, 0, 3)]=(0.272533129349-0.300617873414j)*x[0]**o + ((0.024273296757-0.978580490684j))*x[0] + ((-0.161626831339-0.657768765245j))*x[1]**o + ((-0.731895604083-0.111610507647j))*x[1]
        ref[(3, 0, 0, 3)]=(0.272533129349-0.300617873414j)*x_ref[0]**o + ((0.024273296757-0.978580490684j))*x_ref[0] + ((-0.161626831339-0.657768765245j))*x_ref[1]**o + ((-0.731895604083-0.111610507647j))*x_ref[1]
        arg[(3, 0, 1, 0)]=(0.496837774041-0.359549068554j)*x[0]**o + ((-0.506295153521+0.563024376065j))*x[0] + ((0.848759435609+0.0293895185113j))*x[1]**o + ((0.494462034523-0.147214488873j))*x[1]
        ref[(3, 0, 1, 0)]=(0.496837774041-0.359549068554j)*x_ref[0]**o + ((-0.506295153521+0.563024376065j))*x_ref[0] + ((0.848759435609+0.0293895185113j))*x_ref[1]**o + ((0.494462034523-0.147214488873j))*x_ref[1]
        arg[(3, 0, 1, 1)]=(0.304237823821-0.523009694047j)*x[0]**o + ((-0.443476762542-0.0128282088374j))*x[0] + ((-0.952853622724+0.776541196892j))*x[1]**o + ((-0.053528424019+0.435049281699j))*x[1]
        ref[(3, 0, 1, 1)]=(0.304237823821-0.523009694047j)*x_ref[0]**o + ((-0.443476762542-0.0128282088374j))*x_ref[0] + ((-0.952853622724+0.776541196892j))*x_ref[1]**o + ((-0.053528424019+0.435049281699j))*x_ref[1]
        arg[(3, 0, 1, 2)]=(0.973486415999-0.50036967497j)*x[0]**o + ((0.331676451261-0.0475325276397j))*x[0] + ((-0.402941445164-0.117911734797j))*x[1]**o + ((-0.192114259088-0.351685339863j))*x[1]
        ref[(3, 0, 1, 2)]=(0.973486415999-0.50036967497j)*x_ref[0]**o + ((0.331676451261-0.0475325276397j))*x_ref[0] + ((-0.402941445164-0.117911734797j))*x_ref[1]**o + ((-0.192114259088-0.351685339863j))*x_ref[1]
        arg[(3, 0, 1, 3)]=(-0.247172707638+0.816299882736j)*x[0]**o + ((0.352990759881+0.0087391610091j))*x[0] + ((-0.365179387187+0.320432947054j))*x[1]**o + ((0.71781163792+0.399530371245j))*x[1]
        ref[(3, 0, 1, 3)]=(-0.247172707638+0.816299882736j)*x_ref[0]**o + ((0.352990759881+0.0087391610091j))*x_ref[0] + ((-0.365179387187+0.320432947054j))*x_ref[1]**o + ((0.71781163792+0.399530371245j))*x_ref[1]
        arg[(3, 1, 0, 0)]=(-0.536533529019+0.969487005058j)*x[0]**o + ((0.220258496184-0.447148576381j))*x[0] + ((-0.317037474373+0.053340915011j))*x[1]**o + ((-0.633260107743-0.6474539898j))*x[1]
        ref[(3, 1, 0, 0)]=(-0.536533529019+0.969487005058j)*x_ref[0]**o + ((0.220258496184-0.447148576381j))*x_ref[0] + ((-0.317037474373+0.053340915011j))*x_ref[1]**o + ((-0.633260107743-0.6474539898j))*x_ref[1]
        arg[(3, 1, 0, 1)]=(-0.538615185253-0.763767954373j)*x[0]**o + ((0.306158921312-0.493766354312j))*x[0] + ((-0.0317015521747-0.100695769849j))*x[1]**o + ((-0.961605530412+0.926518931735j))*x[1]
        ref[(3, 1, 0, 1)]=(-0.538615185253-0.763767954373j)*x_ref[0]**o + ((0.306158921312-0.493766354312j))*x_ref[0] + ((-0.0317015521747-0.100695769849j))*x_ref[1]**o + ((-0.961605530412+0.926518931735j))*x_ref[1]
        arg[(3, 1, 0, 2)]=(0.568838050578+0.232822748225j)*x[0]**o + ((0.0773268056333-0.882327151983j))*x[0] + ((-0.699763135174-0.768630584149j))*x[1]**o + ((-0.849023967188-0.245965129742j))*x[1]
        ref[(3, 1, 0, 2)]=(0.568838050578+0.232822748225j)*x_ref[0]**o + ((0.0773268056333-0.882327151983j))*x_ref[0] + ((-0.699763135174-0.768630584149j))*x_ref[1]**o + ((-0.849023967188-0.245965129742j))*x_ref[1]
        arg[(3, 1, 0, 3)]=(0.0873688952828-0.404971662226j)*x[0]**o + ((0.282190112575+0.868233812888j))*x[0] + ((-0.0672658866859-0.163821501569j))*x[1]**o + ((-0.334297338904+0.96522270606j))*x[1]
        ref[(3, 1, 0, 3)]=(0.0873688952828-0.404971662226j)*x_ref[0]**o + ((0.282190112575+0.868233812888j))*x_ref[0] + ((-0.0672658866859-0.163821501569j))*x_ref[1]**o + ((-0.334297338904+0.96522270606j))*x_ref[1]
        arg[(3, 1, 1, 0)]=(-0.0453668143094-0.633859603847j)*x[0]**o + ((0.28911041099-0.637370611955j))*x[0] + ((0.74197609547-0.932216139257j))*x[1]**o + ((0.655260802083-0.889097778258j))*x[1]
        ref[(3, 1, 1, 0)]=(-0.0453668143094-0.633859603847j)*x_ref[0]**o + ((0.28911041099-0.637370611955j))*x_ref[0] + ((0.74197609547-0.932216139257j))*x_ref[1]**o + ((0.655260802083-0.889097778258j))*x_ref[1]
        arg[(3, 1, 1, 1)]=(-0.604288462488-0.854019176142j)*x[0]**o + ((-0.7708599985-0.821536144425j))*x[0] + ((-0.73645975766+0.187876107486j))*x[1]**o + ((0.876978384989-0.934987588679j))*x[1]
        ref[(3, 1, 1, 1)]=(-0.604288462488-0.854019176142j)*x_ref[0]**o + ((-0.7708599985-0.821536144425j))*x_ref[0] + ((-0.73645975766+0.187876107486j))*x_ref[1]**o + ((0.876978384989-0.934987588679j))*x_ref[1]
        arg[(3, 1, 1, 2)]=(-0.95259481851-0.855707515387j)*x[0]**o + ((0.60237645167+0.582041473139j))*x[0] + ((0.769164088839+0.171496599027j))*x[1]**o + ((-0.384097567323+0.228097247285j))*x[1]
        ref[(3, 1, 1, 2)]=(-0.95259481851-0.855707515387j)*x_ref[0]**o + ((0.60237645167+0.582041473139j))*x_ref[0] + ((0.769164088839+0.171496599027j))*x_ref[1]**o + ((-0.384097567323+0.228097247285j))*x_ref[1]
        arg[(3, 1, 1, 3)]=(-0.862446459769+0.0969529422345j)*x[0]**o + ((0.174447120127+0.695644582626j))*x[0] + ((-0.439332988047-0.318201476738j))*x[1]**o + ((-0.923471037023-0.24225012599j))*x[1]
        ref[(3, 1, 1, 3)]=(-0.862446459769+0.0969529422345j)*x_ref[0]**o + ((0.174447120127+0.695644582626j))*x_ref[0] + ((-0.439332988047-0.318201476738j))*x_ref[1]**o + ((-0.923471037023-0.24225012599j))*x_ref[1]
        arg[(3, 2, 0, 0)]=(0.384431965369+0.0998872471814j)*x[0]**o + ((-0.0060139548344-0.407770162911j))*x[0] + ((-0.51062865483+0.302767120103j))*x[1]**o + ((0.349652808472-0.960751456233j))*x[1]
        ref[(3, 2, 0, 0)]=(0.384431965369+0.0998872471814j)*x_ref[0]**o + ((-0.0060139548344-0.407770162911j))*x_ref[0] + ((-0.51062865483+0.302767120103j))*x_ref[1]**o + ((0.349652808472-0.960751456233j))*x_ref[1]
        arg[(3, 2, 0, 1)]=(-0.933210818563-0.0805024845311j)*x[0]**o + ((0.597648204618+0.799826908711j))*x[0] + ((0.9655238786-0.0950995873016j))*x[1]**o + ((-0.997869879336+0.716053908891j))*x[1]
        ref[(3, 2, 0, 1)]=(-0.933210818563-0.0805024845311j)*x_ref[0]**o + ((0.597648204618+0.799826908711j))*x_ref[0] + ((0.9655238786-0.0950995873016j))*x_ref[1]**o + ((-0.997869879336+0.716053908891j))*x_ref[1]
        arg[(3, 2, 0, 2)]=(0.293407664027-0.32970773027j)*x[0]**o + ((-0.390193824017-0.865694833808j))*x[0] + ((-0.897737908804-0.756237454598j))*x[1]**o + ((0.963311151191+0.568599094159j))*x[1]
        ref[(3, 2, 0, 2)]=(0.293407664027-0.32970773027j)*x_ref[0]**o + ((-0.390193824017-0.865694833808j))*x_ref[0] + ((-0.897737908804-0.756237454598j))*x_ref[1]**o + ((0.963311151191+0.568599094159j))*x_ref[1]
        arg[(3, 2, 0, 3)]=(0.128743456536-0.683491424822j)*x[0]**o + ((0.163142780705-0.409849360218j))*x[0] + ((0.725772350761+0.320713266151j))*x[1]**o + ((-0.730284845387-0.207566559625j))*x[1]
        ref[(3, 2, 0, 3)]=(0.128743456536-0.683491424822j)*x_ref[0]**o + ((0.163142780705-0.409849360218j))*x_ref[0] + ((0.725772350761+0.320713266151j))*x_ref[1]**o + ((-0.730284845387-0.207566559625j))*x_ref[1]
        arg[(3, 2, 1, 0)]=(0.602289711032+0.172021388394j)*x[0]**o + ((0.0981230692793-0.246392539376j))*x[0] + ((0.266626326525+0.417764661411j))*x[1]**o + ((0.204537135416-0.0388139646965j))*x[1]
        ref[(3, 2, 1, 0)]=(0.602289711032+0.172021388394j)*x_ref[0]**o + ((0.0981230692793-0.246392539376j))*x_ref[0] + ((0.266626326525+0.417764661411j))*x_ref[1]**o + ((0.204537135416-0.0388139646965j))*x_ref[1]
        arg[(3, 2, 1, 1)]=(-0.730166439522+0.054085199093j)*x[0]**o + ((0.74730198984-0.636520721577j))*x[0] + ((-0.0646002384013+0.536558764074j))*x[1]**o + ((-0.701298180379+0.118587324042j))*x[1]
        ref[(3, 2, 1, 1)]=(-0.730166439522+0.054085199093j)*x_ref[0]**o + ((0.74730198984-0.636520721577j))*x_ref[0] + ((-0.0646002384013+0.536558764074j))*x_ref[1]**o + ((-0.701298180379+0.118587324042j))*x_ref[1]
        arg[(3, 2, 1, 2)]=(0.338367720131+0.256682561166j)*x[0]**o + ((-0.0101097705928+0.46862308334j))*x[0] + ((-0.673491698761-0.0382750054339j))*x[1]**o + ((0.87357801012+0.349789034149j))*x[1]
        ref[(3, 2, 1, 2)]=(0.338367720131+0.256682561166j)*x_ref[0]**o + ((-0.0101097705928+0.46862308334j))*x_ref[0] + ((-0.673491698761-0.0382750054339j))*x_ref[1]**o + ((0.87357801012+0.349789034149j))*x_ref[1]
        arg[(3, 2, 1, 3)]=(0.421770762548+0.665843355872j)*x[0]**o + ((0.188103203631+0.829884053235j))*x[0] + ((-0.686852498228-0.986437376778j))*x[1]**o + ((0.931414233566+0.963764067241j))*x[1]
        ref[(3, 2, 1, 3)]=(0.421770762548+0.665843355872j)*x_ref[0]**o + ((0.188103203631+0.829884053235j))*x_ref[0] + ((-0.686852498228-0.986437376778j))*x_ref[1]**o + ((0.931414233566+0.963764067241j))*x_ref[1]
        arg[(3, 3, 0, 0)]=(0.700583172188+0.860972909288j)*x[0]**o + ((-0.804935654842+0.830733725601j))*x[0] + ((-0.179437914708-0.0655271301289j))*x[1]**o + ((0.907532148321-0.968755196671j))*x[1]
        ref[(3, 3, 0, 0)]=(0.700583172188+0.860972909288j)*x_ref[0]**o + ((-0.804935654842+0.830733725601j))*x_ref[0] + ((-0.179437914708-0.0655271301289j))*x_ref[1]**o + ((0.907532148321-0.968755196671j))*x_ref[1]
        arg[(3, 3, 0, 1)]=(0.667145722261-0.967088900272j)*x[0]**o + ((0.706212435636+0.0142336411564j))*x[0] + ((-0.295213228513-0.964787224535j))*x[1]**o + ((0.876367187478+0.0776111349817j))*x[1]
        ref[(3, 3, 0, 1)]=(0.667145722261-0.967088900272j)*x_ref[0]**o + ((0.706212435636+0.0142336411564j))*x_ref[0] + ((-0.295213228513-0.964787224535j))*x_ref[1]**o + ((0.876367187478+0.0776111349817j))*x_ref[1]
        arg[(3, 3, 0, 2)]=(0.212220832673+0.635461303712j)*x[0]**o + ((0.820878989036+0.717788178638j))*x[0] + ((-0.685810237111-0.0868683398815j))*x[1]**o + ((-0.350468677591+0.318296899469j))*x[1]
        ref[(3, 3, 0, 2)]=(0.212220832673+0.635461303712j)*x_ref[0]**o + ((0.820878989036+0.717788178638j))*x_ref[0] + ((-0.685810237111-0.0868683398815j))*x_ref[1]**o + ((-0.350468677591+0.318296899469j))*x_ref[1]
        arg[(3, 3, 0, 3)]=(0.16084538538-0.325323970937j)*x[0]**o + ((-0.303500143244+0.00634743420467j))*x[0] + ((-0.78997848146+0.936813597878j))*x[1]**o + ((-0.349889604382-0.753305616977j))*x[1]
        ref[(3, 3, 0, 3)]=(0.16084538538-0.325323970937j)*x_ref[0]**o + ((-0.303500143244+0.00634743420467j))*x_ref[0] + ((-0.78997848146+0.936813597878j))*x_ref[1]**o + ((-0.349889604382-0.753305616977j))*x_ref[1]
        arg[(3, 3, 1, 0)]=(-0.794270905862+0.532807904411j)*x[0]**o + ((-0.548134798894+0.0395907348452j))*x[0] + ((0.158630922167-0.789017369506j))*x[1]**o + ((-0.18625030161+0.723257741517j))*x[1]
        ref[(3, 3, 1, 0)]=(-0.794270905862+0.532807904411j)*x_ref[0]**o + ((-0.548134798894+0.0395907348452j))*x_ref[0] + ((0.158630922167-0.789017369506j))*x_ref[1]**o + ((-0.18625030161+0.723257741517j))*x_ref[1]
        arg[(3, 3, 1, 1)]=(0.182606263612-0.441218241374j)*x[0]**o + ((0.594461174488-0.919135647354j))*x[0] + ((0.336056331488+0.134883662105j))*x[1]**o + ((-0.267738779008+0.823619881296j))*x[1]
        ref[(3, 3, 1, 1)]=(0.182606263612-0.441218241374j)*x_ref[0]**o + ((0.594461174488-0.919135647354j))*x_ref[0] + ((0.336056331488+0.134883662105j))*x_ref[1]**o + ((-0.267738779008+0.823619881296j))*x_ref[1]
        arg[(3, 3, 1, 2)]=(0.357979786353+0.985239073059j)*x[0]**o + ((0.85215387976-0.00692964030142j))*x[0] + ((0.831625050639+0.715559872239j))*x[1]**o + ((-0.978402285205+0.71692659443j))*x[1]
        ref[(3, 3, 1, 2)]=(0.357979786353+0.985239073059j)*x_ref[0]**o + ((0.85215387976-0.00692964030142j))*x_ref[0] + ((0.831625050639+0.715559872239j))*x_ref[1]**o + ((-0.978402285205+0.71692659443j))*x_ref[1]
        arg[(3, 3, 1, 3)]=(-0.708537822608+0.713778503144j)*x[0]**o + ((-0.188091292698-0.667922424814j))*x[0] + ((-0.265942375008-0.220216510102j))*x[1]**o + ((0.944663046999-0.593067445777j))*x[1]
        ref[(3, 3, 1, 3)]=(-0.708537822608+0.713778503144j)*x_ref[0]**o + ((-0.188091292698-0.667922424814j))*x_ref[0] + ((-0.265942375008-0.220216510102j))*x_ref[1]**o + ((0.944663046999-0.593067445777j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.758751667924+0.116583620689j)*x[2]**o + ((0.753201994106+0.608785768725j))*x[2]
            ref[(0, 0, 0, 0)]+=(0.758751667924+0.116583620689j)*x_ref[2]**o + ((0.753201994106+0.608785768725j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.304331354732-0.350931539315j)*x[2]**o + ((-0.728329321713+0.900427025347j))*x[2]
            ref[(0, 0, 0, 1)]+=(-0.304331354732-0.350931539315j)*x_ref[2]**o + ((-0.728329321713+0.900427025347j))*x_ref[2]
            arg[(0, 0, 0, 2)]+=(-0.360126888008+0.732952853254j)*x[2]**o + ((0.165532845255-0.576767226857j))*x[2]
            ref[(0, 0, 0, 2)]+=(-0.360126888008+0.732952853254j)*x_ref[2]**o + ((0.165532845255-0.576767226857j))*x_ref[2]
            arg[(0, 0, 0, 3)]+=(0.866494321358+0.46879130264j)*x[2]**o + ((-0.671411248636+0.429904845007j))*x[2]
            ref[(0, 0, 0, 3)]+=(0.866494321358+0.46879130264j)*x_ref[2]**o + ((-0.671411248636+0.429904845007j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.414676092556-0.0709895093424j)*x[2]**o + ((0.410308886911+0.588057276896j))*x[2]
            ref[(0, 0, 1, 0)]+=(-0.414676092556-0.0709895093424j)*x_ref[2]**o + ((0.410308886911+0.588057276896j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.270642892537+0.267106048965j)*x[2]**o + ((-0.0752890627069+0.536181876167j))*x[2]
            ref[(0, 0, 1, 1)]+=(0.270642892537+0.267106048965j)*x_ref[2]**o + ((-0.0752890627069+0.536181876167j))*x_ref[2]
            arg[(0, 0, 1, 2)]+=(-0.469238986474-0.00906295233858j)*x[2]**o + ((-0.0851424117227+0.61057046895j))*x[2]
            ref[(0, 0, 1, 2)]+=(-0.469238986474-0.00906295233858j)*x_ref[2]**o + ((-0.0851424117227+0.61057046895j))*x_ref[2]
            arg[(0, 0, 1, 3)]+=(-0.467165714088+0.486993700803j)*x[2]**o + ((-0.100824047354-0.577836426495j))*x[2]
            ref[(0, 0, 1, 3)]+=(-0.467165714088+0.486993700803j)*x_ref[2]**o + ((-0.100824047354-0.577836426495j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.982968769941-0.398893775678j)*x[2]**o + ((0.270960400204+0.946173307776j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.982968769941-0.398893775678j)*x_ref[2]**o + ((0.270960400204+0.946173307776j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.753156818686-0.116682958231j)*x[2]**o + ((0.39236071653-0.270462984656j))*x[2]
            ref[(0, 1, 0, 1)]+=(-0.753156818686-0.116682958231j)*x_ref[2]**o + ((0.39236071653-0.270462984656j))*x_ref[2]
            arg[(0, 1, 0, 2)]+=(-0.48868049832+0.958595905902j)*x[2]**o + ((0.205562418761-0.85479044891j))*x[2]
            ref[(0, 1, 0, 2)]+=(-0.48868049832+0.958595905902j)*x_ref[2]**o + ((0.205562418761-0.85479044891j))*x_ref[2]
            arg[(0, 1, 0, 3)]+=(0.481801785082-0.385767443162j)*x[2]**o + ((0.59518953412+0.0371628427105j))*x[2]
            ref[(0, 1, 0, 3)]+=(0.481801785082-0.385767443162j)*x_ref[2]**o + ((0.59518953412+0.0371628427105j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.0242935029797-0.999163702594j)*x[2]**o + ((0.541509000356-0.365154208787j))*x[2]
            ref[(0, 1, 1, 0)]+=(-0.0242935029797-0.999163702594j)*x_ref[2]**o + ((0.541509000356-0.365154208787j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.33553903696+0.898644221147j)*x[2]**o + ((0.425964135299-0.201853140705j))*x[2]
            ref[(0, 1, 1, 1)]+=(0.33553903696+0.898644221147j)*x_ref[2]**o + ((0.425964135299-0.201853140705j))*x_ref[2]
            arg[(0, 1, 1, 2)]+=(-0.818982220699-0.986188026125j)*x[2]**o + ((-0.332513195768-0.507702947911j))*x[2]
            ref[(0, 1, 1, 2)]+=(-0.818982220699-0.986188026125j)*x_ref[2]**o + ((-0.332513195768-0.507702947911j))*x_ref[2]
            arg[(0, 1, 1, 3)]+=(-0.0628380114978-0.636273244787j)*x[2]**o + ((-0.192791744407-0.828909603704j))*x[2]
            ref[(0, 1, 1, 3)]+=(-0.0628380114978-0.636273244787j)*x_ref[2]**o + ((-0.192791744407-0.828909603704j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(0.0067269705542-0.059752255283j)*x[2]**o + ((0.426369242015-0.764969602065j))*x[2]
            ref[(0, 2, 0, 0)]+=(0.0067269705542-0.059752255283j)*x_ref[2]**o + ((0.426369242015-0.764969602065j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(-0.249190492806+0.837276263957j)*x[2]**o + ((0.838207527144-0.00655296107135j))*x[2]
            ref[(0, 2, 0, 1)]+=(-0.249190492806+0.837276263957j)*x_ref[2]**o + ((0.838207527144-0.00655296107135j))*x_ref[2]
            arg[(0, 2, 0, 2)]+=(-0.825338219647-0.681563125778j)*x[2]**o + ((0.109117398704-0.8195263303j))*x[2]
            ref[(0, 2, 0, 2)]+=(-0.825338219647-0.681563125778j)*x_ref[2]**o + ((0.109117398704-0.8195263303j))*x_ref[2]
            arg[(0, 2, 0, 3)]+=(-0.161056124111+0.593650989402j)*x[2]**o + ((-0.163961633204-0.620337528261j))*x[2]
            ref[(0, 2, 0, 3)]+=(-0.161056124111+0.593650989402j)*x_ref[2]**o + ((-0.163961633204-0.620337528261j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.456719093477+0.0320643181571j)*x[2]**o + ((-0.114654850389+0.812725575066j))*x[2]
            ref[(0, 2, 1, 0)]+=(-0.456719093477+0.0320643181571j)*x_ref[2]**o + ((-0.114654850389+0.812725575066j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(0.497800512495+0.686479298077j)*x[2]**o + ((-0.895899783939+0.140983470428j))*x[2]
            ref[(0, 2, 1, 1)]+=(0.497800512495+0.686479298077j)*x_ref[2]**o + ((-0.895899783939+0.140983470428j))*x_ref[2]
            arg[(0, 2, 1, 2)]+=(0.0900714401264-0.811322464839j)*x[2]**o + ((-0.165432065655+0.898515408953j))*x[2]
            ref[(0, 2, 1, 2)]+=(0.0900714401264-0.811322464839j)*x_ref[2]**o + ((-0.165432065655+0.898515408953j))*x_ref[2]
            arg[(0, 2, 1, 3)]+=(0.392911770706-0.92016304769j)*x[2]**o + ((-0.559677960627-0.0826062851345j))*x[2]
            ref[(0, 2, 1, 3)]+=(0.392911770706-0.92016304769j)*x_ref[2]**o + ((-0.559677960627-0.0826062851345j))*x_ref[2]
            arg[(0, 3, 0, 0)]+=(0.975566183062+0.402421762549j)*x[2]**o + ((0.0908019401101-0.608665111865j))*x[2]
            ref[(0, 3, 0, 0)]+=(0.975566183062+0.402421762549j)*x_ref[2]**o + ((0.0908019401101-0.608665111865j))*x_ref[2]
            arg[(0, 3, 0, 1)]+=(0.134960967567+0.151237854782j)*x[2]**o + ((0.559121925732+0.508950909742j))*x[2]
            ref[(0, 3, 0, 1)]+=(0.134960967567+0.151237854782j)*x_ref[2]**o + ((0.559121925732+0.508950909742j))*x_ref[2]
            arg[(0, 3, 0, 2)]+=(-0.263537266479-0.612232985255j)*x[2]**o + ((0.0845901417044+0.193471836424j))*x[2]
            ref[(0, 3, 0, 2)]+=(-0.263537266479-0.612232985255j)*x_ref[2]**o + ((0.0845901417044+0.193471836424j))*x_ref[2]
            arg[(0, 3, 0, 3)]+=(-0.43773114671-0.716876302458j)*x[2]**o + ((-0.133280487672-0.0327780847648j))*x[2]
            ref[(0, 3, 0, 3)]+=(-0.43773114671-0.716876302458j)*x_ref[2]**o + ((-0.133280487672-0.0327780847648j))*x_ref[2]
            arg[(0, 3, 1, 0)]+=(0.891237287385-0.611066983754j)*x[2]**o + ((0.437790416655+0.990871227098j))*x[2]
            ref[(0, 3, 1, 0)]+=(0.891237287385-0.611066983754j)*x_ref[2]**o + ((0.437790416655+0.990871227098j))*x_ref[2]
            arg[(0, 3, 1, 1)]+=(-0.689117707879-0.217041266234j)*x[2]**o + ((0.490364030452-0.891666400594j))*x[2]
            ref[(0, 3, 1, 1)]+=(-0.689117707879-0.217041266234j)*x_ref[2]**o + ((0.490364030452-0.891666400594j))*x_ref[2]
            arg[(0, 3, 1, 2)]+=(-0.706613576019-0.218147622917j)*x[2]**o + ((0.712554567121-0.944284258803j))*x[2]
            ref[(0, 3, 1, 2)]+=(-0.706613576019-0.218147622917j)*x_ref[2]**o + ((0.712554567121-0.944284258803j))*x_ref[2]
            arg[(0, 3, 1, 3)]+=(0.41159630954+0.751187124646j)*x[2]**o + ((0.756104688762+0.0535416762886j))*x[2]
            ref[(0, 3, 1, 3)]+=(0.41159630954+0.751187124646j)*x_ref[2]**o + ((0.756104688762+0.0535416762886j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.124163175389-0.930948984124j)*x[2]**o + ((-0.267880415813-0.0126782725505j))*x[2]
            ref[(1, 0, 0, 0)]+=(-0.124163175389-0.930948984124j)*x_ref[2]**o + ((-0.267880415813-0.0126782725505j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.423545816624-0.710234190084j)*x[2]**o + ((-0.120474948164+0.973414885743j))*x[2]
            ref[(1, 0, 0, 1)]+=(0.423545816624-0.710234190084j)*x_ref[2]**o + ((-0.120474948164+0.973414885743j))*x_ref[2]
            arg[(1, 0, 0, 2)]+=(-0.568741281724+0.501385509364j)*x[2]**o + ((0.951028217447+0.33538042935j))*x[2]
            ref[(1, 0, 0, 2)]+=(-0.568741281724+0.501385509364j)*x_ref[2]**o + ((0.951028217447+0.33538042935j))*x_ref[2]
            arg[(1, 0, 0, 3)]+=(0.488069552972-0.783545823269j)*x[2]**o + ((0.654006512495+0.579177906001j))*x[2]
            ref[(1, 0, 0, 3)]+=(0.488069552972-0.783545823269j)*x_ref[2]**o + ((0.654006512495+0.579177906001j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.42006418152+0.319229884767j)*x[2]**o + ((0.883480180352+0.688794653625j))*x[2]
            ref[(1, 0, 1, 0)]+=(0.42006418152+0.319229884767j)*x_ref[2]**o + ((0.883480180352+0.688794653625j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.865898471614+0.970658742129j)*x[2]**o + ((0.397241936563-0.443319856323j))*x[2]
            ref[(1, 0, 1, 1)]+=(0.865898471614+0.970658742129j)*x_ref[2]**o + ((0.397241936563-0.443319856323j))*x_ref[2]
            arg[(1, 0, 1, 2)]+=(0.472138623591+0.0837310023005j)*x[2]**o + ((-0.850811209988+0.251717933346j))*x[2]
            ref[(1, 0, 1, 2)]+=(0.472138623591+0.0837310023005j)*x_ref[2]**o + ((-0.850811209988+0.251717933346j))*x_ref[2]
            arg[(1, 0, 1, 3)]+=(0.0949637234891+0.39503309262j)*x[2]**o + ((0.963601653711+0.952191847266j))*x[2]
            ref[(1, 0, 1, 3)]+=(0.0949637234891+0.39503309262j)*x_ref[2]**o + ((0.963601653711+0.952191847266j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.885408989932+0.629084182884j)*x[2]**o + ((-0.230048721339-0.986217373327j))*x[2]
            ref[(1, 1, 0, 0)]+=(0.885408989932+0.629084182884j)*x_ref[2]**o + ((-0.230048721339-0.986217373327j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.91025246493-0.581969266814j)*x[2]**o + ((-0.0810735861732-0.270968299712j))*x[2]
            ref[(1, 1, 0, 1)]+=(-0.91025246493-0.581969266814j)*x_ref[2]**o + ((-0.0810735861732-0.270968299712j))*x_ref[2]
            arg[(1, 1, 0, 2)]+=(-0.849692110048+0.403998738358j)*x[2]**o + ((0.150368017297-0.788661361453j))*x[2]
            ref[(1, 1, 0, 2)]+=(-0.849692110048+0.403998738358j)*x_ref[2]**o + ((0.150368017297-0.788661361453j))*x_ref[2]
            arg[(1, 1, 0, 3)]+=(-0.918857372674+0.818718372719j)*x[2]**o + ((0.759452024452-0.201060263848j))*x[2]
            ref[(1, 1, 0, 3)]+=(-0.918857372674+0.818718372719j)*x_ref[2]**o + ((0.759452024452-0.201060263848j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.264380071906+0.54634199432j)*x[2]**o + ((0.33381716555+0.0677461423364j))*x[2]
            ref[(1, 1, 1, 0)]+=(0.264380071906+0.54634199432j)*x_ref[2]**o + ((0.33381716555+0.0677461423364j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.638734657042+0.14364892419j)*x[2]**o + ((0.795426789424-0.384449626112j))*x[2]
            ref[(1, 1, 1, 1)]+=(-0.638734657042+0.14364892419j)*x_ref[2]**o + ((0.795426789424-0.384449626112j))*x_ref[2]
            arg[(1, 1, 1, 2)]+=(0.623328296126+0.40252769509j)*x[2]**o + ((-0.705212731558-0.02892903789j))*x[2]
            ref[(1, 1, 1, 2)]+=(0.623328296126+0.40252769509j)*x_ref[2]**o + ((-0.705212731558-0.02892903789j))*x_ref[2]
            arg[(1, 1, 1, 3)]+=(0.745686468187-0.258517735941j)*x[2]**o + ((-0.559677734213-0.482445327187j))*x[2]
            ref[(1, 1, 1, 3)]+=(0.745686468187-0.258517735941j)*x_ref[2]**o + ((-0.559677734213-0.482445327187j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(-0.409989533989-0.608693946402j)*x[2]**o + ((0.184527588629+0.60876698998j))*x[2]
            ref[(1, 2, 0, 0)]+=(-0.409989533989-0.608693946402j)*x_ref[2]**o + ((0.184527588629+0.60876698998j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(0.789089818913-0.412147975451j)*x[2]**o + ((0.324471375625-0.54527466513j))*x[2]
            ref[(1, 2, 0, 1)]+=(0.789089818913-0.412147975451j)*x_ref[2]**o + ((0.324471375625-0.54527466513j))*x_ref[2]
            arg[(1, 2, 0, 2)]+=(-0.685580228762-0.594303102187j)*x[2]**o + ((-0.514433662168+0.909451163671j))*x[2]
            ref[(1, 2, 0, 2)]+=(-0.685580228762-0.594303102187j)*x_ref[2]**o + ((-0.514433662168+0.909451163671j))*x_ref[2]
            arg[(1, 2, 0, 3)]+=(-0.868313812386+0.884998319092j)*x[2]**o + ((0.478425968178+0.796684070232j))*x[2]
            ref[(1, 2, 0, 3)]+=(-0.868313812386+0.884998319092j)*x_ref[2]**o + ((0.478425968178+0.796684070232j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(0.0857223275933+0.554745283385j)*x[2]**o + ((-0.194964725076+0.767575928156j))*x[2]
            ref[(1, 2, 1, 0)]+=(0.0857223275933+0.554745283385j)*x_ref[2]**o + ((-0.194964725076+0.767575928156j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(-0.11136958609-0.823728155003j)*x[2]**o + ((-0.253065536631-0.34953127658j))*x[2]
            ref[(1, 2, 1, 1)]+=(-0.11136958609-0.823728155003j)*x_ref[2]**o + ((-0.253065536631-0.34953127658j))*x_ref[2]
            arg[(1, 2, 1, 2)]+=(0.525080272536-0.874055234298j)*x[2]**o + ((-0.975162132425-0.574845192841j))*x[2]
            ref[(1, 2, 1, 2)]+=(0.525080272536-0.874055234298j)*x_ref[2]**o + ((-0.975162132425-0.574845192841j))*x_ref[2]
            arg[(1, 2, 1, 3)]+=(0.961041727751-0.989959839327j)*x[2]**o + ((-0.990077191082-0.124731708838j))*x[2]
            ref[(1, 2, 1, 3)]+=(0.961041727751-0.989959839327j)*x_ref[2]**o + ((-0.990077191082-0.124731708838j))*x_ref[2]
            arg[(1, 3, 0, 0)]+=(-0.15996378966-0.814888864681j)*x[2]**o + ((-0.706377415468-0.0627790234236j))*x[2]
            ref[(1, 3, 0, 0)]+=(-0.15996378966-0.814888864681j)*x_ref[2]**o + ((-0.706377415468-0.0627790234236j))*x_ref[2]
            arg[(1, 3, 0, 1)]+=(-0.0257224930979-0.486802158483j)*x[2]**o + ((0.511743164392-0.499608425866j))*x[2]
            ref[(1, 3, 0, 1)]+=(-0.0257224930979-0.486802158483j)*x_ref[2]**o + ((0.511743164392-0.499608425866j))*x_ref[2]
            arg[(1, 3, 0, 2)]+=(-0.278503131915-0.366423498396j)*x[2]**o + ((0.331258703226-0.808322899983j))*x[2]
            ref[(1, 3, 0, 2)]+=(-0.278503131915-0.366423498396j)*x_ref[2]**o + ((0.331258703226-0.808322899983j))*x_ref[2]
            arg[(1, 3, 0, 3)]+=(-0.287047050101-0.344884076333j)*x[2]**o + ((0.675028440134+0.23095114513j))*x[2]
            ref[(1, 3, 0, 3)]+=(-0.287047050101-0.344884076333j)*x_ref[2]**o + ((0.675028440134+0.23095114513j))*x_ref[2]
            arg[(1, 3, 1, 0)]+=(0.406664278744+0.935316728378j)*x[2]**o + ((0.452502797101-0.412021961658j))*x[2]
            ref[(1, 3, 1, 0)]+=(0.406664278744+0.935316728378j)*x_ref[2]**o + ((0.452502797101-0.412021961658j))*x_ref[2]
            arg[(1, 3, 1, 1)]+=(-0.676871908647+0.0249635182177j)*x[2]**o + ((0.614038128726-0.250524202009j))*x[2]
            ref[(1, 3, 1, 1)]+=(-0.676871908647+0.0249635182177j)*x_ref[2]**o + ((0.614038128726-0.250524202009j))*x_ref[2]
            arg[(1, 3, 1, 2)]+=(-0.454152906535-0.35346473429j)*x[2]**o + ((0.271569362699+0.254901342418j))*x[2]
            ref[(1, 3, 1, 2)]+=(-0.454152906535-0.35346473429j)*x_ref[2]**o + ((0.271569362699+0.254901342418j))*x_ref[2]
            arg[(1, 3, 1, 3)]+=(0.0986882647761-0.0874950552129j)*x[2]**o + ((-0.759375385384-0.239769569962j))*x[2]
            ref[(1, 3, 1, 3)]+=(0.0986882647761-0.0874950552129j)*x_ref[2]**o + ((-0.759375385384-0.239769569962j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(-0.387513868498+0.663592680508j)*x[2]**o + ((0.609080681017-0.701585675526j))*x[2]
            ref[(2, 0, 0, 0)]+=(-0.387513868498+0.663592680508j)*x_ref[2]**o + ((0.609080681017-0.701585675526j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(-0.756338405393-0.053700679441j)*x[2]**o + ((0.520035077471+0.432825620952j))*x[2]
            ref[(2, 0, 0, 1)]+=(-0.756338405393-0.053700679441j)*x_ref[2]**o + ((0.520035077471+0.432825620952j))*x_ref[2]
            arg[(2, 0, 0, 2)]+=(0.652738450851-0.813144660783j)*x[2]**o + ((-0.99496235273-0.563003626392j))*x[2]
            ref[(2, 0, 0, 2)]+=(0.652738450851-0.813144660783j)*x_ref[2]**o + ((-0.99496235273-0.563003626392j))*x_ref[2]
            arg[(2, 0, 0, 3)]+=(0.0243413184005-0.301704922528j)*x[2]**o + ((-0.163289188536+0.993632227582j))*x[2]
            ref[(2, 0, 0, 3)]+=(0.0243413184005-0.301704922528j)*x_ref[2]**o + ((-0.163289188536+0.993632227582j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(0.841227353243+0.693778629934j)*x[2]**o + ((0.183921494642-0.290368125676j))*x[2]
            ref[(2, 0, 1, 0)]+=(0.841227353243+0.693778629934j)*x_ref[2]**o + ((0.183921494642-0.290368125676j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(-0.500574511959+0.652904004237j)*x[2]**o + ((-0.0179141688215+0.752556513862j))*x[2]
            ref[(2, 0, 1, 1)]+=(-0.500574511959+0.652904004237j)*x_ref[2]**o + ((-0.0179141688215+0.752556513862j))*x_ref[2]
            arg[(2, 0, 1, 2)]+=(-0.215644073019+0.0625071544711j)*x[2]**o + ((-0.692681813296-0.751702533008j))*x[2]
            ref[(2, 0, 1, 2)]+=(-0.215644073019+0.0625071544711j)*x_ref[2]**o + ((-0.692681813296-0.751702533008j))*x_ref[2]
            arg[(2, 0, 1, 3)]+=(-0.273577381332+0.212527435396j)*x[2]**o + ((0.82972821474+0.387931688733j))*x[2]
            ref[(2, 0, 1, 3)]+=(-0.273577381332+0.212527435396j)*x_ref[2]**o + ((0.82972821474+0.387931688733j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(0.0208845149724-0.0370145628266j)*x[2]**o + ((0.442185491239-0.343099146085j))*x[2]
            ref[(2, 1, 0, 0)]+=(0.0208845149724-0.0370145628266j)*x_ref[2]**o + ((0.442185491239-0.343099146085j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(0.860071420942+0.657540247942j)*x[2]**o + ((-0.500622914827+0.454681017885j))*x[2]
            ref[(2, 1, 0, 1)]+=(0.860071420942+0.657540247942j)*x_ref[2]**o + ((-0.500622914827+0.454681017885j))*x_ref[2]
            arg[(2, 1, 0, 2)]+=(0.437105321482+0.394005732736j)*x[2]**o + ((0.834564062575+0.268999602888j))*x[2]
            ref[(2, 1, 0, 2)]+=(0.437105321482+0.394005732736j)*x_ref[2]**o + ((0.834564062575+0.268999602888j))*x_ref[2]
            arg[(2, 1, 0, 3)]+=(0.908245897938-0.0700728565349j)*x[2]**o + ((-0.662258042204-0.0294546991518j))*x[2]
            ref[(2, 1, 0, 3)]+=(0.908245897938-0.0700728565349j)*x_ref[2]**o + ((-0.662258042204-0.0294546991518j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(-0.0403947559843+0.912228609159j)*x[2]**o + ((0.219045235261-0.321806670085j))*x[2]
            ref[(2, 1, 1, 0)]+=(-0.0403947559843+0.912228609159j)*x_ref[2]**o + ((0.219045235261-0.321806670085j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(0.356294500458-0.0244564109896j)*x[2]**o + ((0.441463208293-0.661824360758j))*x[2]
            ref[(2, 1, 1, 1)]+=(0.356294500458-0.0244564109896j)*x_ref[2]**o + ((0.441463208293-0.661824360758j))*x_ref[2]
            arg[(2, 1, 1, 2)]+=(-0.577313541173+0.314711430526j)*x[2]**o + ((-0.476963306999+0.508099557758j))*x[2]
            ref[(2, 1, 1, 2)]+=(-0.577313541173+0.314711430526j)*x_ref[2]**o + ((-0.476963306999+0.508099557758j))*x_ref[2]
            arg[(2, 1, 1, 3)]+=(0.179927619951+0.731257820948j)*x[2]**o + ((0.78148299319-0.983490194633j))*x[2]
            ref[(2, 1, 1, 3)]+=(0.179927619951+0.731257820948j)*x_ref[2]**o + ((0.78148299319-0.983490194633j))*x_ref[2]
            arg[(2, 2, 0, 0)]+=(-0.873224562347-0.61285675077j)*x[2]**o + ((0.642672079893-0.421223036225j))*x[2]
            ref[(2, 2, 0, 0)]+=(-0.873224562347-0.61285675077j)*x_ref[2]**o + ((0.642672079893-0.421223036225j))*x_ref[2]
            arg[(2, 2, 0, 1)]+=(0.113176126742-0.0568453106824j)*x[2]**o + ((-0.554877800504+0.835693377959j))*x[2]
            ref[(2, 2, 0, 1)]+=(0.113176126742-0.0568453106824j)*x_ref[2]**o + ((-0.554877800504+0.835693377959j))*x_ref[2]
            arg[(2, 2, 0, 2)]+=(-0.041315849998+0.325280610205j)*x[2]**o + ((0.423554110062-0.976047611807j))*x[2]
            ref[(2, 2, 0, 2)]+=(-0.041315849998+0.325280610205j)*x_ref[2]**o + ((0.423554110062-0.976047611807j))*x_ref[2]
            arg[(2, 2, 0, 3)]+=(0.665179989914-0.996916274889j)*x[2]**o + ((-0.912613585809-0.012481764707j))*x[2]
            ref[(2, 2, 0, 3)]+=(0.665179989914-0.996916274889j)*x_ref[2]**o + ((-0.912613585809-0.012481764707j))*x_ref[2]
            arg[(2, 2, 1, 0)]+=(0.500798514073-0.475814483426j)*x[2]**o + ((-0.901068423709-0.494611632107j))*x[2]
            ref[(2, 2, 1, 0)]+=(0.500798514073-0.475814483426j)*x_ref[2]**o + ((-0.901068423709-0.494611632107j))*x_ref[2]
            arg[(2, 2, 1, 1)]+=(0.184326589188+0.116618108189j)*x[2]**o + ((0.388157403254+0.464068046257j))*x[2]
            ref[(2, 2, 1, 1)]+=(0.184326589188+0.116618108189j)*x_ref[2]**o + ((0.388157403254+0.464068046257j))*x_ref[2]
            arg[(2, 2, 1, 2)]+=(0.139399463279-0.795862740375j)*x[2]**o + ((-0.955266576177-0.766587138796j))*x[2]
            ref[(2, 2, 1, 2)]+=(0.139399463279-0.795862740375j)*x_ref[2]**o + ((-0.955266576177-0.766587138796j))*x_ref[2]
            arg[(2, 2, 1, 3)]+=(0.175701586902-0.515625238659j)*x[2]**o + ((0.0859337210267-0.56905964996j))*x[2]
            ref[(2, 2, 1, 3)]+=(0.175701586902-0.515625238659j)*x_ref[2]**o + ((0.0859337210267-0.56905964996j))*x_ref[2]
            arg[(2, 3, 0, 0)]+=(-0.215915363082-0.300150550185j)*x[2]**o + ((0.769843554257-0.759389370399j))*x[2]
            ref[(2, 3, 0, 0)]+=(-0.215915363082-0.300150550185j)*x_ref[2]**o + ((0.769843554257-0.759389370399j))*x_ref[2]
            arg[(2, 3, 0, 1)]+=(-0.31470218547+0.367106216026j)*x[2]**o + ((-0.475038803732+0.138528112952j))*x[2]
            ref[(2, 3, 0, 1)]+=(-0.31470218547+0.367106216026j)*x_ref[2]**o + ((-0.475038803732+0.138528112952j))*x_ref[2]
            arg[(2, 3, 0, 2)]+=(0.933382758157-0.728959810464j)*x[2]**o + ((-0.519661331994+0.54922113519j))*x[2]
            ref[(2, 3, 0, 2)]+=(0.933382758157-0.728959810464j)*x_ref[2]**o + ((-0.519661331994+0.54922113519j))*x_ref[2]
            arg[(2, 3, 0, 3)]+=(0.607541857426-0.491465072235j)*x[2]**o + ((-0.314262939479+0.243829307077j))*x[2]
            ref[(2, 3, 0, 3)]+=(0.607541857426-0.491465072235j)*x_ref[2]**o + ((-0.314262939479+0.243829307077j))*x_ref[2]
            arg[(2, 3, 1, 0)]+=(0.920205292968-0.906573333441j)*x[2]**o + ((-0.195550164889+0.0419792433478j))*x[2]
            ref[(2, 3, 1, 0)]+=(0.920205292968-0.906573333441j)*x_ref[2]**o + ((-0.195550164889+0.0419792433478j))*x_ref[2]
            arg[(2, 3, 1, 1)]+=(0.381678400776+0.746611978357j)*x[2]**o + ((-0.731779822277+0.337581738526j))*x[2]
            ref[(2, 3, 1, 1)]+=(0.381678400776+0.746611978357j)*x_ref[2]**o + ((-0.731779822277+0.337581738526j))*x_ref[2]
            arg[(2, 3, 1, 2)]+=(0.665710726985-0.875839849154j)*x[2]**o + ((-0.549715659717-0.343218425103j))*x[2]
            ref[(2, 3, 1, 2)]+=(0.665710726985-0.875839849154j)*x_ref[2]**o + ((-0.549715659717-0.343218425103j))*x_ref[2]
            arg[(2, 3, 1, 3)]+=(0.114699081265+0.969259986524j)*x[2]**o + ((0.537654106344-0.00377456032808j))*x[2]
            ref[(2, 3, 1, 3)]+=(0.114699081265+0.969259986524j)*x_ref[2]**o + ((0.537654106344-0.00377456032808j))*x_ref[2]
            arg[(3, 0, 0, 0)]+=(0.616114042463+0.167929615837j)*x[2]**o + ((-0.174248935832+0.335680305636j))*x[2]
            ref[(3, 0, 0, 0)]+=(0.616114042463+0.167929615837j)*x_ref[2]**o + ((-0.174248935832+0.335680305636j))*x_ref[2]
            arg[(3, 0, 0, 1)]+=(0.398428518639-0.306750375627j)*x[2]**o + ((-0.559538019089+0.886335176432j))*x[2]
            ref[(3, 0, 0, 1)]+=(0.398428518639-0.306750375627j)*x_ref[2]**o + ((-0.559538019089+0.886335176432j))*x_ref[2]
            arg[(3, 0, 0, 2)]+=(-0.487842852319-0.380394093056j)*x[2]**o + ((0.626340246048+0.256165940581j))*x[2]
            ref[(3, 0, 0, 2)]+=(-0.487842852319-0.380394093056j)*x_ref[2]**o + ((0.626340246048+0.256165940581j))*x_ref[2]
            arg[(3, 0, 0, 3)]+=(-0.662558903653-0.374985198029j)*x[2]**o + ((-0.664259096335+0.468720393432j))*x[2]
            ref[(3, 0, 0, 3)]+=(-0.662558903653-0.374985198029j)*x_ref[2]**o + ((-0.664259096335+0.468720393432j))*x_ref[2]
            arg[(3, 0, 1, 0)]+=(-0.745538368736-0.260865335952j)*x[2]**o + ((0.953867154205+0.00313464810116j))*x[2]
            ref[(3, 0, 1, 0)]+=(-0.745538368736-0.260865335952j)*x_ref[2]**o + ((0.953867154205+0.00313464810116j))*x_ref[2]
            arg[(3, 0, 1, 1)]+=(-0.759819655078-0.506446322362j)*x[2]**o + ((-0.934652888388+0.30053311802j))*x[2]
            ref[(3, 0, 1, 1)]+=(-0.759819655078-0.506446322362j)*x_ref[2]**o + ((-0.934652888388+0.30053311802j))*x_ref[2]
            arg[(3, 0, 1, 2)]+=(0.783746227793-0.735691025887j)*x[2]**o + ((-0.199730347003-0.051575414715j))*x[2]
            ref[(3, 0, 1, 2)]+=(0.783746227793-0.735691025887j)*x_ref[2]**o + ((-0.199730347003-0.051575414715j))*x_ref[2]
            arg[(3, 0, 1, 3)]+=(0.937503984345+0.536583135285j)*x[2]**o + ((0.916314338011-0.541981192092j))*x[2]
            ref[(3, 0, 1, 3)]+=(0.937503984345+0.536583135285j)*x_ref[2]**o + ((0.916314338011-0.541981192092j))*x_ref[2]
            arg[(3, 1, 0, 0)]+=(0.416502234611+0.856676208641j)*x[2]**o + ((-0.78715610175-0.740709134464j))*x[2]
            ref[(3, 1, 0, 0)]+=(0.416502234611+0.856676208641j)*x_ref[2]**o + ((-0.78715610175-0.740709134464j))*x_ref[2]
            arg[(3, 1, 0, 1)]+=(-0.505942542836+0.550876662905j)*x[2]**o + ((-0.52709914015-0.15328997566j))*x[2]
            ref[(3, 1, 0, 1)]+=(-0.505942542836+0.550876662905j)*x_ref[2]**o + ((-0.52709914015-0.15328997566j))*x_ref[2]
            arg[(3, 1, 0, 2)]+=(-0.185530066564+0.844497027189j)*x[2]**o + ((-0.32688981851-0.666182092058j))*x[2]
            ref[(3, 1, 0, 2)]+=(-0.185530066564+0.844497027189j)*x_ref[2]**o + ((-0.32688981851-0.666182092058j))*x_ref[2]
            arg[(3, 1, 0, 3)]+=(-0.352035310903-0.949499213619j)*x[2]**o + ((0.525997020628-0.502413900364j))*x[2]
            ref[(3, 1, 0, 3)]+=(-0.352035310903-0.949499213619j)*x_ref[2]**o + ((0.525997020628-0.502413900364j))*x_ref[2]
            arg[(3, 1, 1, 0)]+=(-0.187700818789-0.095363529981j)*x[2]**o + ((-0.446650128187-0.559056221449j))*x[2]
            ref[(3, 1, 1, 0)]+=(-0.187700818789-0.095363529981j)*x_ref[2]**o + ((-0.446650128187-0.559056221449j))*x_ref[2]
            arg[(3, 1, 1, 1)]+=(-0.873691549238-0.994540369244j)*x[2]**o + ((-0.0237239962889-0.778408853219j))*x[2]
            ref[(3, 1, 1, 1)]+=(-0.873691549238-0.994540369244j)*x_ref[2]**o + ((-0.0237239962889-0.778408853219j))*x_ref[2]
            arg[(3, 1, 1, 2)]+=(-0.238703045336-0.187521536269j)*x[2]**o + ((0.802075908934+0.376093579125j))*x[2]
            ref[(3, 1, 1, 2)]+=(-0.238703045336-0.187521536269j)*x_ref[2]**o + ((0.802075908934+0.376093579125j))*x_ref[2]
            arg[(3, 1, 1, 3)]+=(-0.158380646611+0.907418953445j)*x[2]**o + ((-0.735439133048-0.863534032845j))*x[2]
            ref[(3, 1, 1, 3)]+=(-0.158380646611+0.907418953445j)*x_ref[2]**o + ((-0.735439133048-0.863534032845j))*x_ref[2]
            arg[(3, 2, 0, 0)]+=(-0.550974875491-0.382856232087j)*x[2]**o + ((-0.087845183307+0.197073627581j))*x[2]
            ref[(3, 2, 0, 0)]+=(-0.550974875491-0.382856232087j)*x_ref[2]**o + ((-0.087845183307+0.197073627581j))*x_ref[2]
            arg[(3, 2, 0, 1)]+=(0.144225323657-0.364663250866j)*x[2]**o + ((-0.17696354192-0.149673453135j))*x[2]
            ref[(3, 2, 0, 1)]+=(0.144225323657-0.364663250866j)*x_ref[2]**o + ((-0.17696354192-0.149673453135j))*x_ref[2]
            arg[(3, 2, 0, 2)]+=(-0.0271968133354-0.372356661998j)*x[2]**o + ((-0.893170512021-0.404023264686j))*x[2]
            ref[(3, 2, 0, 2)]+=(-0.0271968133354-0.372356661998j)*x_ref[2]**o + ((-0.893170512021-0.404023264686j))*x_ref[2]
            arg[(3, 2, 0, 3)]+=(0.390129417134+0.413795609809j)*x[2]**o + ((0.56625621884+0.607246366589j))*x[2]
            ref[(3, 2, 0, 3)]+=(0.390129417134+0.413795609809j)*x_ref[2]**o + ((0.56625621884+0.607246366589j))*x_ref[2]
            arg[(3, 2, 1, 0)]+=(0.621059094387+0.0605304800557j)*x[2]**o + ((0.618124266043-0.822963158781j))*x[2]
            ref[(3, 2, 1, 0)]+=(0.621059094387+0.0605304800557j)*x_ref[2]**o + ((0.618124266043-0.822963158781j))*x_ref[2]
            arg[(3, 2, 1, 1)]+=(0.48949347844-0.87335109438j)*x[2]**o + ((0.0203682317986+0.740283078919j))*x[2]
            ref[(3, 2, 1, 1)]+=(0.48949347844-0.87335109438j)*x_ref[2]**o + ((0.0203682317986+0.740283078919j))*x_ref[2]
            arg[(3, 2, 1, 2)]+=(-0.190722589168-0.881096704703j)*x[2]**o + ((-0.727715271298-0.822992522447j))*x[2]
            ref[(3, 2, 1, 2)]+=(-0.190722589168-0.881096704703j)*x_ref[2]**o + ((-0.727715271298-0.822992522447j))*x_ref[2]
            arg[(3, 2, 1, 3)]+=(-0.544930360733+0.961128187541j)*x[2]**o + ((0.614817744909-0.552520786466j))*x[2]
            ref[(3, 2, 1, 3)]+=(-0.544930360733+0.961128187541j)*x_ref[2]**o + ((0.614817744909-0.552520786466j))*x_ref[2]
            arg[(3, 3, 0, 0)]+=(-0.439432852071-0.175372346354j)*x[2]**o + ((-0.178880023875+0.259978651414j))*x[2]
            ref[(3, 3, 0, 0)]+=(-0.439432852071-0.175372346354j)*x_ref[2]**o + ((-0.178880023875+0.259978651414j))*x_ref[2]
            arg[(3, 3, 0, 1)]+=(-0.600987798198-0.074085539024j)*x[2]**o + ((-0.817469601465+0.0356032855822j))*x[2]
            ref[(3, 3, 0, 1)]+=(-0.600987798198-0.074085539024j)*x_ref[2]**o + ((-0.817469601465+0.0356032855822j))*x_ref[2]
            arg[(3, 3, 0, 2)]+=(0.858742756829-0.698694389957j)*x[2]**o + ((0.153667932256+0.389893463507j))*x[2]
            ref[(3, 3, 0, 2)]+=(0.858742756829-0.698694389957j)*x_ref[2]**o + ((0.153667932256+0.389893463507j))*x_ref[2]
            arg[(3, 3, 0, 3)]+=(-0.501963686635-0.751366201958j)*x[2]**o + ((0.562587856427-0.197197368573j))*x[2]
            ref[(3, 3, 0, 3)]+=(-0.501963686635-0.751366201958j)*x_ref[2]**o + ((0.562587856427-0.197197368573j))*x_ref[2]
            arg[(3, 3, 1, 0)]+=(0.961368487491-0.623216467888j)*x[2]**o + ((0.790615036061-0.274571471203j))*x[2]
            ref[(3, 3, 1, 0)]+=(0.961368487491-0.623216467888j)*x_ref[2]**o + ((0.790615036061-0.274571471203j))*x_ref[2]
            arg[(3, 3, 1, 1)]+=(0.275638729523-0.669439393766j)*x[2]**o + ((-0.266990941741-0.273053326339j))*x[2]
            ref[(3, 3, 1, 1)]+=(0.275638729523-0.669439393766j)*x_ref[2]**o + ((-0.266990941741-0.273053326339j))*x_ref[2]
            arg[(3, 3, 1, 2)]+=(0.891887479336-0.929020739161j)*x[2]**o + ((-0.725509525478-0.131437514063j))*x[2]
            ref[(3, 3, 1, 2)]+=(0.891887479336-0.929020739161j)*x_ref[2]**o + ((-0.725509525478-0.131437514063j))*x_ref[2]
            arg[(3, 3, 1, 3)]+=(0.295336688653-0.679624701851j)*x[2]**o + ((0.0242835146683-0.902871331136j))*x[2]
            ref[(3, 3, 1, 3)]+=(0.295336688653-0.679624701851j)*x_ref[2]**o + ((0.0242835146683-0.902871331136j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.176104380754+0.643761266285j)*x[0]**o + ((0.564020787719-0.865751797521j))*x[0] + ((0.927552106433-0.830121608682j))*x[1]**o + ((-0.698350377575+0.633117232188j))*x[1]
        ref=(0.176104380754+0.643761266285j)*x_ref[0]**o + ((0.564020787719-0.865751797521j))*x_ref[0] + ((0.927552106433-0.830121608682j))*x_ref[1]**o + ((-0.698350377575+0.633117232188j))*x_ref[1]
        if dim==3:
            arg+=((0.617433354435+0.631348522785j))*x[2]**o + ((-0.919059427211-0.912773655827j))*x[2]
            ref+=((0.617433354435+0.631348522785j))*x_ref[2]**o + ((-0.919059427211-0.912773655827j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=(0.396214777975+0.101815394958j)*x[0]**o + ((-0.0341823475244-0.734109203906j))*x[0] + ((0.406654936363-0.594083023403j))*x[1]**o + ((0.892174223613+0.212003048498j))*x[1]
        ref[(0,)]=(0.396214777975+0.101815394958j)*x_ref[0]**o + ((-0.0341823475244-0.734109203906j))*x_ref[0] + ((0.406654936363-0.594083023403j))*x_ref[1]**o + ((0.892174223613+0.212003048498j))*x_ref[1]
        arg[(1,)]=(0.590239819454-0.176732610658j)*x[0]**o + ((0.834149635774+0.037494744351j))*x[0] + ((0.197453734625+0.0607585873882j))*x[1]**o + ((0.310803790063-0.482560775135j))*x[1]
        ref[(1,)]=(0.590239819454-0.176732610658j)*x_ref[0]**o + ((0.834149635774+0.037494744351j))*x_ref[0] + ((0.197453734625+0.0607585873882j))*x_ref[1]**o + ((0.310803790063-0.482560775135j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.763964716692-0.551249506494j)*x[2]**o + ((-0.181347793846-0.140304479615j))*x[2]
            ref[(0,)]+=(0.763964716692-0.551249506494j)*x_ref[2]**o + ((-0.181347793846-0.140304479615j))*x_ref[2]
            arg[(1,)]+=(0.610506789969-0.763732182242j)*x[2]**o + ((0.275859054611+0.901160331221j))*x[2]
            ref[(1,)]+=(0.610506789969-0.763732182242j)*x_ref[2]**o + ((0.275859054611+0.901160331221j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref = Data(0,(4, 4),w_ref)
        arg[(0, 0)]=(-0.507435775186+0.0672754476058j)*x[0]**o + ((0.932862084627-0.660069848641j))*x[0] + ((0.366289606738-0.220123983928j))*x[1]**o + ((-0.422171450817-0.0538639081807j))*x[1]
        ref[(0, 0)]=(-0.507435775186+0.0672754476058j)*x_ref[0]**o + ((0.932862084627-0.660069848641j))*x_ref[0] + ((0.366289606738-0.220123983928j))*x_ref[1]**o + ((-0.422171450817-0.0538639081807j))*x_ref[1]
        arg[(0, 1)]=(0.960905790488+0.997075031234j)*x[0]**o + ((0.775374216462+0.990961890904j))*x[0] + ((0.308956687654-0.402384161577j))*x[1]**o + ((0.62529473549-0.549784080364j))*x[1]
        ref[(0, 1)]=(0.960905790488+0.997075031234j)*x_ref[0]**o + ((0.775374216462+0.990961890904j))*x_ref[0] + ((0.308956687654-0.402384161577j))*x_ref[1]**o + ((0.62529473549-0.549784080364j))*x_ref[1]
        arg[(0, 2)]=(-0.0603418046011-0.772188143767j)*x[0]**o + ((-0.642743909854-0.0105446568188j))*x[0] + ((0.359643729374+0.669483537704j))*x[1]**o + ((-0.794383250445+0.0726635877287j))*x[1]
        ref[(0, 2)]=(-0.0603418046011-0.772188143767j)*x_ref[0]**o + ((-0.642743909854-0.0105446568188j))*x_ref[0] + ((0.359643729374+0.669483537704j))*x_ref[1]**o + ((-0.794383250445+0.0726635877287j))*x_ref[1]
        arg[(0, 3)]=(-0.141577192257+0.634230323617j)*x[0]**o + ((0.942749285214-0.602270867288j))*x[0] + ((-0.296334544421+0.86260455322j))*x[1]**o + ((-0.856195571088+0.669312314931j))*x[1]
        ref[(0, 3)]=(-0.141577192257+0.634230323617j)*x_ref[0]**o + ((0.942749285214-0.602270867288j))*x_ref[0] + ((-0.296334544421+0.86260455322j))*x_ref[1]**o + ((-0.856195571088+0.669312314931j))*x_ref[1]
        arg[(1, 0)]=(0.819590238595-0.167385232117j)*x[0]**o + ((-0.46810054744+0.769232528561j))*x[0] + ((-0.657080173973-0.090491764471j))*x[1]**o + ((0.981084107326+0.963390015604j))*x[1]
        ref[(1, 0)]=(0.819590238595-0.167385232117j)*x_ref[0]**o + ((-0.46810054744+0.769232528561j))*x_ref[0] + ((-0.657080173973-0.090491764471j))*x_ref[1]**o + ((0.981084107326+0.963390015604j))*x_ref[1]
        arg[(1, 1)]=(-0.488682517128-0.836365375283j)*x[0]**o + ((-0.106551471347-0.266787957206j))*x[0] + ((-0.250396985133-0.172249698245j))*x[1]**o + ((-0.449003160718-0.809217765618j))*x[1]
        ref[(1, 1)]=(-0.488682517128-0.836365375283j)*x_ref[0]**o + ((-0.106551471347-0.266787957206j))*x_ref[0] + ((-0.250396985133-0.172249698245j))*x_ref[1]**o + ((-0.449003160718-0.809217765618j))*x_ref[1]
        arg[(1, 2)]=(0.0775972364897-0.608328050086j)*x[0]**o + ((-0.737667774145-0.875016030263j))*x[0] + ((-0.842466451945+0.401273065138j))*x[1]**o + ((0.451591001964-0.0169410088736j))*x[1]
        ref[(1, 2)]=(0.0775972364897-0.608328050086j)*x_ref[0]**o + ((-0.737667774145-0.875016030263j))*x_ref[0] + ((-0.842466451945+0.401273065138j))*x_ref[1]**o + ((0.451591001964-0.0169410088736j))*x_ref[1]
        arg[(1, 3)]=(-0.340406807994+0.698582374914j)*x[0]**o + ((-0.95791150964-0.672158339132j))*x[0] + ((-0.665625377041-0.435231726164j))*x[1]**o + ((0.717322390981-0.682076512008j))*x[1]
        ref[(1, 3)]=(-0.340406807994+0.698582374914j)*x_ref[0]**o + ((-0.95791150964-0.672158339132j))*x_ref[0] + ((-0.665625377041-0.435231726164j))*x_ref[1]**o + ((0.717322390981-0.682076512008j))*x_ref[1]
        arg[(2, 0)]=(-0.872719700719-0.404573421472j)*x[0]**o + ((-0.567948128434-0.744737647548j))*x[0] + ((0.578774646583-0.897567708461j))*x[1]**o + ((-0.965974805448+0.952568590291j))*x[1]
        ref[(2, 0)]=(-0.872719700719-0.404573421472j)*x_ref[0]**o + ((-0.567948128434-0.744737647548j))*x_ref[0] + ((0.578774646583-0.897567708461j))*x_ref[1]**o + ((-0.965974805448+0.952568590291j))*x_ref[1]
        arg[(2, 1)]=(0.203158550576+0.175820704256j)*x[0]**o + ((-0.328569127405+0.211722431015j))*x[0] + ((0.50172152881+0.549848969025j))*x[1]**o + ((-0.159815470527-0.436072462618j))*x[1]
        ref[(2, 1)]=(0.203158550576+0.175820704256j)*x_ref[0]**o + ((-0.328569127405+0.211722431015j))*x_ref[0] + ((0.50172152881+0.549848969025j))*x_ref[1]**o + ((-0.159815470527-0.436072462618j))*x_ref[1]
        arg[(2, 2)]=(0.0362579965653-0.972754843192j)*x[0]**o + ((0.0366208280804-0.114944958522j))*x[0] + ((-0.626406939953-0.997577641377j))*x[1]**o + ((0.0347998283876-0.188446204532j))*x[1]
        ref[(2, 2)]=(0.0362579965653-0.972754843192j)*x_ref[0]**o + ((0.0366208280804-0.114944958522j))*x_ref[0] + ((-0.626406939953-0.997577641377j))*x_ref[1]**o + ((0.0347998283876-0.188446204532j))*x_ref[1]
        arg[(2, 3)]=(-0.550331724873-0.287808340953j)*x[0]**o + ((0.198474374683+0.865385571917j))*x[0] + ((-0.12766700233+0.301992783062j))*x[1]**o + ((-0.189588862394+0.804336486472j))*x[1]
        ref[(2, 3)]=(-0.550331724873-0.287808340953j)*x_ref[0]**o + ((0.198474374683+0.865385571917j))*x_ref[0] + ((-0.12766700233+0.301992783062j))*x_ref[1]**o + ((-0.189588862394+0.804336486472j))*x_ref[1]
        arg[(3, 0)]=(-0.918389972389+0.209065906233j)*x[0]**o + ((-0.113273509677-0.475855527747j))*x[0] + ((-0.0175100370507+0.592141005136j))*x[1]**o + ((-0.904818853204-0.653022525667j))*x[1]
        ref[(3, 0)]=(-0.918389972389+0.209065906233j)*x_ref[0]**o + ((-0.113273509677-0.475855527747j))*x_ref[0] + ((-0.0175100370507+0.592141005136j))*x_ref[1]**o + ((-0.904818853204-0.653022525667j))*x_ref[1]
        arg[(3, 1)]=(0.376071343487+0.756718451922j)*x[0]**o + ((0.372969962126+0.38946653538j))*x[0] + ((-0.598853117479+0.797575904068j))*x[1]**o + ((0.380271586513-0.423139137135j))*x[1]
        ref[(3, 1)]=(0.376071343487+0.756718451922j)*x_ref[0]**o + ((0.372969962126+0.38946653538j))*x_ref[0] + ((-0.598853117479+0.797575904068j))*x_ref[1]**o + ((0.380271586513-0.423139137135j))*x_ref[1]
        arg[(3, 2)]=(-0.0662119802872-0.0858870553891j)*x[0]**o + ((-0.775452824885-0.279599703665j))*x[0] + ((-0.501164272434-0.217985152972j))*x[1]**o + ((-0.807789820558-0.28362708407j))*x[1]
        ref[(3, 2)]=(-0.0662119802872-0.0858870553891j)*x_ref[0]**o + ((-0.775452824885-0.279599703665j))*x_ref[0] + ((-0.501164272434-0.217985152972j))*x_ref[1]**o + ((-0.807789820558-0.28362708407j))*x_ref[1]
        arg[(3, 3)]=(0.766562843901-0.0539330304207j)*x[0]**o + ((0.270389399509-0.700573810466j))*x[0] + ((0.537871077718+0.412715621394j))*x[1]**o + ((-0.712004753296-0.475025118162j))*x[1]
        ref[(3, 3)]=(0.766562843901-0.0539330304207j)*x_ref[0]**o + ((0.270389399509-0.700573810466j))*x_ref[0] + ((0.537871077718+0.412715621394j))*x_ref[1]**o + ((-0.712004753296-0.475025118162j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(-0.632363866532-0.819607878468j)*x[2]**o + ((-0.428723779467-0.976893518896j))*x[2]
            ref[(0, 0)]+=(-0.632363866532-0.819607878468j)*x_ref[2]**o + ((-0.428723779467-0.976893518896j))*x_ref[2]
            arg[(0, 1)]+=(-0.544189536584-0.898819916517j)*x[2]**o + ((0.367061532674-0.734759406919j))*x[2]
            ref[(0, 1)]+=(-0.544189536584-0.898819916517j)*x_ref[2]**o + ((0.367061532674-0.734759406919j))*x_ref[2]
            arg[(0, 2)]+=(0.176852483905+0.692005134801j)*x[2]**o + ((-0.128695607249+0.423833214381j))*x[2]
            ref[(0, 2)]+=(0.176852483905+0.692005134801j)*x_ref[2]**o + ((-0.128695607249+0.423833214381j))*x_ref[2]
            arg[(0, 3)]+=(-0.428677147245-0.794014171193j)*x[2]**o + ((0.364492864716+0.892342166315j))*x[2]
            ref[(0, 3)]+=(-0.428677147245-0.794014171193j)*x_ref[2]**o + ((0.364492864716+0.892342166315j))*x_ref[2]
            arg[(1, 0)]+=(0.229896179197+0.182084547984j)*x[2]**o + ((-0.916625996893+0.9465324258j))*x[2]
            ref[(1, 0)]+=(0.229896179197+0.182084547984j)*x_ref[2]**o + ((-0.916625996893+0.9465324258j))*x_ref[2]
            arg[(1, 1)]+=(0.219593717306-0.888838946099j)*x[2]**o + ((0.367099108256-0.293812409093j))*x[2]
            ref[(1, 1)]+=(0.219593717306-0.888838946099j)*x_ref[2]**o + ((0.367099108256-0.293812409093j))*x_ref[2]
            arg[(1, 2)]+=(-0.98043361001+0.880557956494j)*x[2]**o + ((-0.478811272164+0.0303201297661j))*x[2]
            ref[(1, 2)]+=(-0.98043361001+0.880557956494j)*x_ref[2]**o + ((-0.478811272164+0.0303201297661j))*x_ref[2]
            arg[(1, 3)]+=(-0.547773891876-0.824551603438j)*x[2]**o + ((-0.350329821771-0.405749761572j))*x[2]
            ref[(1, 3)]+=(-0.547773891876-0.824551603438j)*x_ref[2]**o + ((-0.350329821771-0.405749761572j))*x_ref[2]
            arg[(2, 0)]+=(-0.429500768275-0.808818453177j)*x[2]**o + ((0.638964976426+0.0214803874009j))*x[2]
            ref[(2, 0)]+=(-0.429500768275-0.808818453177j)*x_ref[2]**o + ((0.638964976426+0.0214803874009j))*x_ref[2]
            arg[(2, 1)]+=(-0.201864684134-0.0253472526833j)*x[2]**o + ((0.968044725736+0.0902646925437j))*x[2]
            ref[(2, 1)]+=(-0.201864684134-0.0253472526833j)*x_ref[2]**o + ((0.968044725736+0.0902646925437j))*x_ref[2]
            arg[(2, 2)]+=(-0.868266878782-0.757712117457j)*x[2]**o + ((-0.646032013498-0.67947684607j))*x[2]
            ref[(2, 2)]+=(-0.868266878782-0.757712117457j)*x_ref[2]**o + ((-0.646032013498-0.67947684607j))*x_ref[2]
            arg[(2, 3)]+=(-0.742287669306-0.898154087072j)*x[2]**o + ((-0.427360983063-0.38715352456j))*x[2]
            ref[(2, 3)]+=(-0.742287669306-0.898154087072j)*x_ref[2]**o + ((-0.427360983063-0.38715352456j))*x_ref[2]
            arg[(3, 0)]+=(-0.16256686876+0.945967739217j)*x[2]**o + ((0.457861445699+0.732874901883j))*x[2]
            ref[(3, 0)]+=(-0.16256686876+0.945967739217j)*x_ref[2]**o + ((0.457861445699+0.732874901883j))*x_ref[2]
            arg[(3, 1)]+=(0.41017375689-0.632329902322j)*x[2]**o + ((0.625949475034+0.246646248969j))*x[2]
            ref[(3, 1)]+=(0.41017375689-0.632329902322j)*x_ref[2]**o + ((0.625949475034+0.246646248969j))*x_ref[2]
            arg[(3, 2)]+=(-0.813638560934+0.544176618842j)*x[2]**o + ((0.439227883034+0.262737905796j))*x[2]
            ref[(3, 2)]+=(-0.813638560934+0.544176618842j)*x_ref[2]**o + ((0.439227883034+0.262737905796j))*x_ref[2]
            arg[(3, 3)]+=(-0.5687861695+0.865238855015j)*x[2]**o + ((0.993271404161+0.905625019585j))*x[2]
            ref[(3, 3)]+=(-0.5687861695+0.865238855015j)*x_ref[2]**o + ((0.993271404161+0.905625019585j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 3),w)
        ref = Data(0,(2, 4, 3),w_ref)
        arg[(0, 0, 0)]=(-0.96092991622+0.950059192423j)*x[0]**o + ((0.475286001346+0.650893518724j))*x[0] + ((0.819659003237+0.43903520764j))*x[1]**o + ((-0.307436170312+0.0185123790877j))*x[1]
        ref[(0, 0, 0)]=(-0.96092991622+0.950059192423j)*x_ref[0]**o + ((0.475286001346+0.650893518724j))*x_ref[0] + ((0.819659003237+0.43903520764j))*x_ref[1]**o + ((-0.307436170312+0.0185123790877j))*x_ref[1]
        arg[(0, 0, 1)]=(0.312854872331+0.5623137704j)*x[0]**o + ((0.149065529304-0.331799351332j))*x[0] + ((-0.43917576648+0.567153335799j))*x[1]**o + ((0.99148949354-0.177831833663j))*x[1]
        ref[(0, 0, 1)]=(0.312854872331+0.5623137704j)*x_ref[0]**o + ((0.149065529304-0.331799351332j))*x_ref[0] + ((-0.43917576648+0.567153335799j))*x_ref[1]**o + ((0.99148949354-0.177831833663j))*x_ref[1]
        arg[(0, 0, 2)]=(0.317195760361-0.687742808349j)*x[0]**o + ((0.508493212866-0.924022752283j))*x[0] + ((0.570941462599+0.157353636572j))*x[1]**o + ((0.23452411886-0.706206960383j))*x[1]
        ref[(0, 0, 2)]=(0.317195760361-0.687742808349j)*x_ref[0]**o + ((0.508493212866-0.924022752283j))*x_ref[0] + ((0.570941462599+0.157353636572j))*x_ref[1]**o + ((0.23452411886-0.706206960383j))*x_ref[1]
        arg[(0, 1, 0)]=(0.290830992336+0.156717181206j)*x[0]**o + ((-0.623578669344-0.438858780239j))*x[0] + ((0.254962359194+0.450855347616j))*x[1]**o + ((-0.515522216496-0.0677709606513j))*x[1]
        ref[(0, 1, 0)]=(0.290830992336+0.156717181206j)*x_ref[0]**o + ((-0.623578669344-0.438858780239j))*x_ref[0] + ((0.254962359194+0.450855347616j))*x_ref[1]**o + ((-0.515522216496-0.0677709606513j))*x_ref[1]
        arg[(0, 1, 1)]=(0.00800975053579+0.750078971178j)*x[0]**o + ((0.78001708468+0.490186479158j))*x[0] + ((-0.682830925166+0.470688444954j))*x[1]**o + ((-0.156252146352-0.523330217584j))*x[1]
        ref[(0, 1, 1)]=(0.00800975053579+0.750078971178j)*x_ref[0]**o + ((0.78001708468+0.490186479158j))*x_ref[0] + ((-0.682830925166+0.470688444954j))*x_ref[1]**o + ((-0.156252146352-0.523330217584j))*x_ref[1]
        arg[(0, 1, 2)]=(-0.0479458704371+0.0190520770805j)*x[0]**o + ((-0.684674932238+0.124316243347j))*x[0] + ((0.867959286228+0.788230907454j))*x[1]**o + ((0.641522913532+0.435251009023j))*x[1]
        ref[(0, 1, 2)]=(-0.0479458704371+0.0190520770805j)*x_ref[0]**o + ((-0.684674932238+0.124316243347j))*x_ref[0] + ((0.867959286228+0.788230907454j))*x_ref[1]**o + ((0.641522913532+0.435251009023j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.514324154053+0.856459741121j)*x[0]**o + ((0.617266501745+0.264684265146j))*x[0] + ((-0.35604000398-0.121039971708j))*x[1]**o + ((-0.245788340693+0.809026511706j))*x[1]
        ref[(0, 2, 0)]=(-0.514324154053+0.856459741121j)*x_ref[0]**o + ((0.617266501745+0.264684265146j))*x_ref[0] + ((-0.35604000398-0.121039971708j))*x_ref[1]**o + ((-0.245788340693+0.809026511706j))*x_ref[1]
        arg[(0, 2, 1)]=(-0.651225689087-0.76326206642j)*x[0]**o + ((0.624238713681-0.898142396644j))*x[0] + ((0.990870548664-0.161807332983j))*x[1]**o + ((-0.820590358693+0.310116531517j))*x[1]
        ref[(0, 2, 1)]=(-0.651225689087-0.76326206642j)*x_ref[0]**o + ((0.624238713681-0.898142396644j))*x_ref[0] + ((0.990870548664-0.161807332983j))*x_ref[1]**o + ((-0.820590358693+0.310116531517j))*x_ref[1]
        arg[(0, 2, 2)]=(-0.070886132291-0.831049732231j)*x[0]**o + ((0.806465740533-0.339651806338j))*x[0] + ((0.262305650699+0.352421497739j))*x[1]**o + ((-0.635336715894-0.719419183613j))*x[1]
        ref[(0, 2, 2)]=(-0.070886132291-0.831049732231j)*x_ref[0]**o + ((0.806465740533-0.339651806338j))*x_ref[0] + ((0.262305650699+0.352421497739j))*x_ref[1]**o + ((-0.635336715894-0.719419183613j))*x_ref[1]
        arg[(0, 3, 0)]=(-0.7674310648-0.26986325267j)*x[0]**o + ((0.458275463188-0.856531149632j))*x[0] + ((-0.855874644264+0.162002212365j))*x[1]**o + ((0.13179155287-0.09821904156j))*x[1]
        ref[(0, 3, 0)]=(-0.7674310648-0.26986325267j)*x_ref[0]**o + ((0.458275463188-0.856531149632j))*x_ref[0] + ((-0.855874644264+0.162002212365j))*x_ref[1]**o + ((0.13179155287-0.09821904156j))*x_ref[1]
        arg[(0, 3, 1)]=(-0.423037408187+0.65823209845j)*x[0]**o + ((-0.698143420373-0.0870290851201j))*x[0] + ((-0.0656748713925-0.471980782736j))*x[1]**o + ((-0.0980926126117-0.400011642173j))*x[1]
        ref[(0, 3, 1)]=(-0.423037408187+0.65823209845j)*x_ref[0]**o + ((-0.698143420373-0.0870290851201j))*x_ref[0] + ((-0.0656748713925-0.471980782736j))*x_ref[1]**o + ((-0.0980926126117-0.400011642173j))*x_ref[1]
        arg[(0, 3, 2)]=(0.630448878336+0.983042713204j)*x[0]**o + ((0.758065706471-0.258885231958j))*x[0] + ((-0.491287935382-0.169472337351j))*x[1]**o + ((0.23038729416+0.000988660700606j))*x[1]
        ref[(0, 3, 2)]=(0.630448878336+0.983042713204j)*x_ref[0]**o + ((0.758065706471-0.258885231958j))*x_ref[0] + ((-0.491287935382-0.169472337351j))*x_ref[1]**o + ((0.23038729416+0.000988660700606j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.0613559884989+0.262597097673j)*x[0]**o + ((0.445829575185+0.29635965059j))*x[0] + ((0.665945585763-0.110556609613j))*x[1]**o + ((-0.677586473156-0.456958238432j))*x[1]
        ref[(1, 0, 0)]=(-0.0613559884989+0.262597097673j)*x_ref[0]**o + ((0.445829575185+0.29635965059j))*x_ref[0] + ((0.665945585763-0.110556609613j))*x_ref[1]**o + ((-0.677586473156-0.456958238432j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.48910152588+0.913613768799j)*x[0]**o + ((0.371316541322+0.188256265943j))*x[0] + ((0.351718035889+0.12546418407j))*x[1]**o + ((-0.137520351749+0.0559939593837j))*x[1]
        ref[(1, 0, 1)]=(-0.48910152588+0.913613768799j)*x_ref[0]**o + ((0.371316541322+0.188256265943j))*x_ref[0] + ((0.351718035889+0.12546418407j))*x_ref[1]**o + ((-0.137520351749+0.0559939593837j))*x_ref[1]
        arg[(1, 0, 2)]=(-0.225250169026+0.193519448365j)*x[0]**o + ((-0.960632884283+0.0528729102591j))*x[0] + ((0.127209780847+0.720798890071j))*x[1]**o + ((0.809784057354+0.568363437721j))*x[1]
        ref[(1, 0, 2)]=(-0.225250169026+0.193519448365j)*x_ref[0]**o + ((-0.960632884283+0.0528729102591j))*x_ref[0] + ((0.127209780847+0.720798890071j))*x_ref[1]**o + ((0.809784057354+0.568363437721j))*x_ref[1]
        arg[(1, 1, 0)]=(0.662910095999+0.603492188714j)*x[0]**o + ((0.525043204925+0.325517589474j))*x[0] + ((0.258339226515+0.107999072093j))*x[1]**o + ((0.96399759882-0.296946758537j))*x[1]
        ref[(1, 1, 0)]=(0.662910095999+0.603492188714j)*x_ref[0]**o + ((0.525043204925+0.325517589474j))*x_ref[0] + ((0.258339226515+0.107999072093j))*x_ref[1]**o + ((0.96399759882-0.296946758537j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.323430810539+0.483788416897j)*x[0]**o + ((-0.384578503217-0.180188666591j))*x[0] + ((-0.26581167634-0.697470486588j))*x[1]**o + ((-0.365499786797-0.987592411363j))*x[1]
        ref[(1, 1, 1)]=(-0.323430810539+0.483788416897j)*x_ref[0]**o + ((-0.384578503217-0.180188666591j))*x_ref[0] + ((-0.26581167634-0.697470486588j))*x_ref[1]**o + ((-0.365499786797-0.987592411363j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.621180058905+0.248367108281j)*x[0]**o + ((0.114394059576-0.630490190055j))*x[0] + ((-0.758042958768-0.351969228662j))*x[1]**o + ((0.213753137109-0.841781216959j))*x[1]
        ref[(1, 1, 2)]=(-0.621180058905+0.248367108281j)*x_ref[0]**o + ((0.114394059576-0.630490190055j))*x_ref[0] + ((-0.758042958768-0.351969228662j))*x_ref[1]**o + ((0.213753137109-0.841781216959j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.384519773609+0.849170891882j)*x[0]**o + ((-0.888069026626+0.553708542483j))*x[0] + ((-0.150320117953-0.418332052777j))*x[1]**o + ((-0.134013084041+0.567934738817j))*x[1]
        ref[(1, 2, 0)]=(-0.384519773609+0.849170891882j)*x_ref[0]**o + ((-0.888069026626+0.553708542483j))*x_ref[0] + ((-0.150320117953-0.418332052777j))*x_ref[1]**o + ((-0.134013084041+0.567934738817j))*x_ref[1]
        arg[(1, 2, 1)]=(0.74039908406-0.966182256185j)*x[0]**o + ((-0.668772344616-0.204964147846j))*x[0] + ((0.532486712431+0.506887020325j))*x[1]**o + ((0.225735074988-0.53547195448j))*x[1]
        ref[(1, 2, 1)]=(0.74039908406-0.966182256185j)*x_ref[0]**o + ((-0.668772344616-0.204964147846j))*x_ref[0] + ((0.532486712431+0.506887020325j))*x_ref[1]**o + ((0.225735074988-0.53547195448j))*x_ref[1]
        arg[(1, 2, 2)]=(0.602028432024+0.699637018013j)*x[0]**o + ((-0.620990979671+0.877288170295j))*x[0] + ((-0.752631140491+0.84131066523j))*x[1]**o + ((0.462007177107-0.491192830761j))*x[1]
        ref[(1, 2, 2)]=(0.602028432024+0.699637018013j)*x_ref[0]**o + ((-0.620990979671+0.877288170295j))*x_ref[0] + ((-0.752631140491+0.84131066523j))*x_ref[1]**o + ((0.462007177107-0.491192830761j))*x_ref[1]
        arg[(1, 3, 0)]=(-0.575090753743+0.0627949628863j)*x[0]**o + ((-0.456538350905-0.755602568397j))*x[0] + ((-0.418994702764+0.790025659085j))*x[1]**o + ((-0.889781808246+0.477415204943j))*x[1]
        ref[(1, 3, 0)]=(-0.575090753743+0.0627949628863j)*x_ref[0]**o + ((-0.456538350905-0.755602568397j))*x_ref[0] + ((-0.418994702764+0.790025659085j))*x_ref[1]**o + ((-0.889781808246+0.477415204943j))*x_ref[1]
        arg[(1, 3, 1)]=(0.468553305895-0.510614448915j)*x[0]**o + ((-0.238883897262-0.584622374839j))*x[0] + ((-0.534692523496+0.731915980968j))*x[1]**o + ((-0.374449848943-0.162921881126j))*x[1]
        ref[(1, 3, 1)]=(0.468553305895-0.510614448915j)*x_ref[0]**o + ((-0.238883897262-0.584622374839j))*x_ref[0] + ((-0.534692523496+0.731915980968j))*x_ref[1]**o + ((-0.374449848943-0.162921881126j))*x_ref[1]
        arg[(1, 3, 2)]=(0.418299831693+0.886988461361j)*x[0]**o + ((0.417366937704-0.841857395401j))*x[0] + ((-0.0364060152108+0.708864693688j))*x[1]**o + ((-0.31203717124+0.47513574295j))*x[1]
        ref[(1, 3, 2)]=(0.418299831693+0.886988461361j)*x_ref[0]**o + ((0.417366937704-0.841857395401j))*x_ref[0] + ((-0.0364060152108+0.708864693688j))*x_ref[1]**o + ((-0.31203717124+0.47513574295j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.772305985722+0.116049737206j)*x[2]**o + ((-0.506864855371+0.0374744528847j))*x[2]
            ref[(0, 0, 0)]+=(0.772305985722+0.116049737206j)*x_ref[2]**o + ((-0.506864855371+0.0374744528847j))*x_ref[2]
            arg[(0, 0, 1)]+=(-0.484170148567+0.586169074653j)*x[2]**o + ((0.53855933917+0.739405329613j))*x[2]
            ref[(0, 0, 1)]+=(-0.484170148567+0.586169074653j)*x_ref[2]**o + ((0.53855933917+0.739405329613j))*x_ref[2]
            arg[(0, 0, 2)]+=(0.298792155245+0.244166800479j)*x[2]**o + ((0.850393866417+0.164486232378j))*x[2]
            ref[(0, 0, 2)]+=(0.298792155245+0.244166800479j)*x_ref[2]**o + ((0.850393866417+0.164486232378j))*x_ref[2]
            arg[(0, 1, 0)]+=(0.82698923171-0.622572792369j)*x[2]**o + ((0.743720073061+0.929303557671j))*x[2]
            ref[(0, 1, 0)]+=(0.82698923171-0.622572792369j)*x_ref[2]**o + ((0.743720073061+0.929303557671j))*x_ref[2]
            arg[(0, 1, 1)]+=(0.956966329793+0.152413167317j)*x[2]**o + ((0.904540858991+0.929597812328j))*x[2]
            ref[(0, 1, 1)]+=(0.956966329793+0.152413167317j)*x_ref[2]**o + ((0.904540858991+0.929597812328j))*x_ref[2]
            arg[(0, 1, 2)]+=(-0.454383384782+0.306349931574j)*x[2]**o + ((-0.574643003844+0.601371298928j))*x[2]
            ref[(0, 1, 2)]+=(-0.454383384782+0.306349931574j)*x_ref[2]**o + ((-0.574643003844+0.601371298928j))*x_ref[2]
            arg[(0, 2, 0)]+=(0.672849645168-0.101159763696j)*x[2]**o + ((-0.0156890653693+0.726955478634j))*x[2]
            ref[(0, 2, 0)]+=(0.672849645168-0.101159763696j)*x_ref[2]**o + ((-0.0156890653693+0.726955478634j))*x_ref[2]
            arg[(0, 2, 1)]+=(0.0383305203607+0.842013321811j)*x[2]**o + ((-0.712085458682-0.362133582976j))*x[2]
            ref[(0, 2, 1)]+=(0.0383305203607+0.842013321811j)*x_ref[2]**o + ((-0.712085458682-0.362133582976j))*x_ref[2]
            arg[(0, 2, 2)]+=(0.406592517856-0.589814063059j)*x[2]**o + ((-0.381249216518-0.24205503546j))*x[2]
            ref[(0, 2, 2)]+=(0.406592517856-0.589814063059j)*x_ref[2]**o + ((-0.381249216518-0.24205503546j))*x_ref[2]
            arg[(0, 3, 0)]+=(-0.129540225778+0.517319862816j)*x[2]**o + ((0.612688181319-0.611896092109j))*x[2]
            ref[(0, 3, 0)]+=(-0.129540225778+0.517319862816j)*x_ref[2]**o + ((0.612688181319-0.611896092109j))*x_ref[2]
            arg[(0, 3, 1)]+=(-0.250430669756-0.544723033512j)*x[2]**o + ((0.864871433676-0.748483527134j))*x[2]
            ref[(0, 3, 1)]+=(-0.250430669756-0.544723033512j)*x_ref[2]**o + ((0.864871433676-0.748483527134j))*x_ref[2]
            arg[(0, 3, 2)]+=(0.911825268363-0.724536195552j)*x[2]**o + ((-0.203251066567+0.366389488219j))*x[2]
            ref[(0, 3, 2)]+=(0.911825268363-0.724536195552j)*x_ref[2]**o + ((-0.203251066567+0.366389488219j))*x_ref[2]
            arg[(1, 0, 0)]+=(0.829637711188-0.623367482217j)*x[2]**o + ((0.360170673448+0.898668056508j))*x[2]
            ref[(1, 0, 0)]+=(0.829637711188-0.623367482217j)*x_ref[2]**o + ((0.360170673448+0.898668056508j))*x_ref[2]
            arg[(1, 0, 1)]+=(0.667788887307+0.0117721789424j)*x[2]**o + ((-0.95490215686+0.071541938651j))*x[2]
            ref[(1, 0, 1)]+=(0.667788887307+0.0117721789424j)*x_ref[2]**o + ((-0.95490215686+0.071541938651j))*x_ref[2]
            arg[(1, 0, 2)]+=(-0.171334168643+0.766695881515j)*x[2]**o + ((-0.0503620783726-0.435566030935j))*x[2]
            ref[(1, 0, 2)]+=(-0.171334168643+0.766695881515j)*x_ref[2]**o + ((-0.0503620783726-0.435566030935j))*x_ref[2]
            arg[(1, 1, 0)]+=(-0.102850867558+0.674305513509j)*x[2]**o + ((-0.324304805946+0.220203631248j))*x[2]
            ref[(1, 1, 0)]+=(-0.102850867558+0.674305513509j)*x_ref[2]**o + ((-0.324304805946+0.220203631248j))*x_ref[2]
            arg[(1, 1, 1)]+=(-0.587813320407-0.391156282484j)*x[2]**o + ((0.610315572985+0.315035187802j))*x[2]
            ref[(1, 1, 1)]+=(-0.587813320407-0.391156282484j)*x_ref[2]**o + ((0.610315572985+0.315035187802j))*x_ref[2]
            arg[(1, 1, 2)]+=(-0.255739764702+0.39824545052j)*x[2]**o + ((0.345536849959-0.696437450289j))*x[2]
            ref[(1, 1, 2)]+=(-0.255739764702+0.39824545052j)*x_ref[2]**o + ((0.345536849959-0.696437450289j))*x_ref[2]
            arg[(1, 2, 0)]+=(-0.131705128664+0.173824649711j)*x[2]**o + ((0.825376787673+0.319405887934j))*x[2]
            ref[(1, 2, 0)]+=(-0.131705128664+0.173824649711j)*x_ref[2]**o + ((0.825376787673+0.319405887934j))*x_ref[2]
            arg[(1, 2, 1)]+=(0.16147681477-0.0819142531357j)*x[2]**o + ((0.722855443585+0.730168023432j))*x[2]
            ref[(1, 2, 1)]+=(0.16147681477-0.0819142531357j)*x_ref[2]**o + ((0.722855443585+0.730168023432j))*x_ref[2]
            arg[(1, 2, 2)]+=(0.651345673414+0.310863582381j)*x[2]**o + ((-0.188782461255-0.000486006734926j))*x[2]
            ref[(1, 2, 2)]+=(0.651345673414+0.310863582381j)*x_ref[2]**o + ((-0.188782461255-0.000486006734926j))*x_ref[2]
            arg[(1, 3, 0)]+=(0.171950810943+0.482193672415j)*x[2]**o + ((-0.21147187841-0.784704634594j))*x[2]
            ref[(1, 3, 0)]+=(0.171950810943+0.482193672415j)*x_ref[2]**o + ((-0.21147187841-0.784704634594j))*x_ref[2]
            arg[(1, 3, 1)]+=(0.0256219784672-0.291082548435j)*x[2]**o + ((-0.504860305968-0.635493697301j))*x[2]
            ref[(1, 3, 1)]+=(0.0256219784672-0.291082548435j)*x_ref[2]**o + ((-0.504860305968-0.635493697301j))*x_ref[2]
            arg[(1, 3, 2)]+=(0.0306618993753+0.494719746492j)*x[2]**o + ((0.887839782453+0.60301406431j))*x[2]
            ref[(1, 3, 2)]+=(0.0306618993753+0.494719746492j)*x_ref[2]**o + ((0.887839782453+0.60301406431j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 4, 4),w)
        ref = Data(0,(4, 4, 4, 4),w_ref)
        arg[(0, 0, 0, 0)]=(0.94739752394+0.536597199096j)*x[0]**o + ((-0.101801483653+0.327468651101j))*x[0] + ((0.933507587584+0.784423809545j))*x[1]**o + ((-0.71069314264+0.3601806926j))*x[1]
        ref[(0, 0, 0, 0)]=(0.94739752394+0.536597199096j)*x_ref[0]**o + ((-0.101801483653+0.327468651101j))*x_ref[0] + ((0.933507587584+0.784423809545j))*x_ref[1]**o + ((-0.71069314264+0.3601806926j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(0.881373612095+0.660183295109j)*x[0]**o + ((0.146858850416+0.418878116141j))*x[0] + ((-0.921997895909+0.73457306603j))*x[1]**o + ((0.486999825143-0.726537467146j))*x[1]
        ref[(0, 0, 0, 1)]=(0.881373612095+0.660183295109j)*x_ref[0]**o + ((0.146858850416+0.418878116141j))*x_ref[0] + ((-0.921997895909+0.73457306603j))*x_ref[1]**o + ((0.486999825143-0.726537467146j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(-0.821596200468+0.596713128328j)*x[0]**o + ((-0.887962469039-0.167535497727j))*x[0] + ((0.507086852334-0.439757502862j))*x[1]**o + ((-0.0474689452546+0.944007593891j))*x[1]
        ref[(0, 0, 0, 2)]=(-0.821596200468+0.596713128328j)*x_ref[0]**o + ((-0.887962469039-0.167535497727j))*x_ref[0] + ((0.507086852334-0.439757502862j))*x_ref[1]**o + ((-0.0474689452546+0.944007593891j))*x_ref[1]
        arg[(0, 0, 0, 3)]=(-0.623973595282+0.11720313265j)*x[0]**o + ((0.375784440046-0.91026456793j))*x[0] + ((-0.127132519007-0.368594070373j))*x[1]**o + ((0.0870342180254-0.967364736993j))*x[1]
        ref[(0, 0, 0, 3)]=(-0.623973595282+0.11720313265j)*x_ref[0]**o + ((0.375784440046-0.91026456793j))*x_ref[0] + ((-0.127132519007-0.368594070373j))*x_ref[1]**o + ((0.0870342180254-0.967364736993j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.559141630645-0.882518523058j)*x[0]**o + ((-0.410628263249-0.873966572623j))*x[0] + ((0.380646782868+0.772052647538j))*x[1]**o + ((-0.780355704342-0.361722243804j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.559141630645-0.882518523058j)*x_ref[0]**o + ((-0.410628263249-0.873966572623j))*x_ref[0] + ((0.380646782868+0.772052647538j))*x_ref[1]**o + ((-0.780355704342-0.361722243804j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.419117518535+0.680807077214j)*x[0]**o + ((0.0817392914457+0.815754084698j))*x[0] + ((0.990992113541-0.231231308773j))*x[1]**o + ((0.837100176677+0.412542600421j))*x[1]
        ref[(0, 0, 1, 1)]=(0.419117518535+0.680807077214j)*x_ref[0]**o + ((0.0817392914457+0.815754084698j))*x_ref[0] + ((0.990992113541-0.231231308773j))*x_ref[1]**o + ((0.837100176677+0.412542600421j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(-0.663039644552+0.255978779321j)*x[0]**o + ((0.923875380398+0.144699994452j))*x[0] + ((-0.233641381894-0.0212859645466j))*x[1]**o + ((-0.831535313444-0.752659048623j))*x[1]
        ref[(0, 0, 1, 2)]=(-0.663039644552+0.255978779321j)*x_ref[0]**o + ((0.923875380398+0.144699994452j))*x_ref[0] + ((-0.233641381894-0.0212859645466j))*x_ref[1]**o + ((-0.831535313444-0.752659048623j))*x_ref[1]
        arg[(0, 0, 1, 3)]=(-0.553772569448-0.0568107749766j)*x[0]**o + ((0.74358489627+0.296876449057j))*x[0] + ((-0.763143095748-0.298100883392j))*x[1]**o + ((0.141199910301-0.793820124241j))*x[1]
        ref[(0, 0, 1, 3)]=(-0.553772569448-0.0568107749766j)*x_ref[0]**o + ((0.74358489627+0.296876449057j))*x_ref[0] + ((-0.763143095748-0.298100883392j))*x_ref[1]**o + ((0.141199910301-0.793820124241j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(-0.0708291467712-0.159964654329j)*x[0]**o + ((-0.445049531575+0.0593294081209j))*x[0] + ((-0.50404444544+0.360894134748j))*x[1]**o + ((-0.960759102998+0.29196396819j))*x[1]
        ref[(0, 0, 2, 0)]=(-0.0708291467712-0.159964654329j)*x_ref[0]**o + ((-0.445049531575+0.0593294081209j))*x_ref[0] + ((-0.50404444544+0.360894134748j))*x_ref[1]**o + ((-0.960759102998+0.29196396819j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(0.090014517734-0.723463311737j)*x[0]**o + ((0.0149603623365-0.561556939781j))*x[0] + ((-0.152496794016-0.953430015086j))*x[1]**o + ((-0.985013851781-0.453174142j))*x[1]
        ref[(0, 0, 2, 1)]=(0.090014517734-0.723463311737j)*x_ref[0]**o + ((0.0149603623365-0.561556939781j))*x_ref[0] + ((-0.152496794016-0.953430015086j))*x_ref[1]**o + ((-0.985013851781-0.453174142j))*x_ref[1]
        arg[(0, 0, 2, 2)]=(0.0484357106641-0.324293847502j)*x[0]**o + ((-0.0198486490022+0.832895931141j))*x[0] + ((0.994759202466-0.101976799096j))*x[1]**o + ((0.21996760064-0.791556598261j))*x[1]
        ref[(0, 0, 2, 2)]=(0.0484357106641-0.324293847502j)*x_ref[0]**o + ((-0.0198486490022+0.832895931141j))*x_ref[0] + ((0.994759202466-0.101976799096j))*x_ref[1]**o + ((0.21996760064-0.791556598261j))*x_ref[1]
        arg[(0, 0, 2, 3)]=(0.515568689825-0.502344504579j)*x[0]**o + ((0.241077719538-0.300373934797j))*x[0] + ((-0.303707608347+0.373735168571j))*x[1]**o + ((-0.27990753354+0.995527177625j))*x[1]
        ref[(0, 0, 2, 3)]=(0.515568689825-0.502344504579j)*x_ref[0]**o + ((0.241077719538-0.300373934797j))*x_ref[0] + ((-0.303707608347+0.373735168571j))*x_ref[1]**o + ((-0.27990753354+0.995527177625j))*x_ref[1]
        arg[(0, 0, 3, 0)]=(-0.607608532205-0.497812636958j)*x[0]**o + ((0.0160083074848-0.339189888912j))*x[0] + ((-0.84938949809+0.200013280326j))*x[1]**o + ((0.0590287222028+0.367190446276j))*x[1]
        ref[(0, 0, 3, 0)]=(-0.607608532205-0.497812636958j)*x_ref[0]**o + ((0.0160083074848-0.339189888912j))*x_ref[0] + ((-0.84938949809+0.200013280326j))*x_ref[1]**o + ((0.0590287222028+0.367190446276j))*x_ref[1]
        arg[(0, 0, 3, 1)]=(-0.106554573282+0.163598164083j)*x[0]**o + ((-0.714890980167+0.269883591546j))*x[0] + ((-0.928285638615-0.116479347756j))*x[1]**o + ((0.37595803394+0.773721230119j))*x[1]
        ref[(0, 0, 3, 1)]=(-0.106554573282+0.163598164083j)*x_ref[0]**o + ((-0.714890980167+0.269883591546j))*x_ref[0] + ((-0.928285638615-0.116479347756j))*x_ref[1]**o + ((0.37595803394+0.773721230119j))*x_ref[1]
        arg[(0, 0, 3, 2)]=(-0.847332706627+0.0979488752247j)*x[0]**o + ((0.784964338377-0.264854938021j))*x[0] + ((-0.949981858176-0.871249113684j))*x[1]**o + ((0.158948751496-0.937811904587j))*x[1]
        ref[(0, 0, 3, 2)]=(-0.847332706627+0.0979488752247j)*x_ref[0]**o + ((0.784964338377-0.264854938021j))*x_ref[0] + ((-0.949981858176-0.871249113684j))*x_ref[1]**o + ((0.158948751496-0.937811904587j))*x_ref[1]
        arg[(0, 0, 3, 3)]=(0.990303331711+0.717741355631j)*x[0]**o + ((0.452198325838+0.352127629798j))*x[0] + ((0.299327077085+0.387383347094j))*x[1]**o + ((0.0124313973319-0.868660988403j))*x[1]
        ref[(0, 0, 3, 3)]=(0.990303331711+0.717741355631j)*x_ref[0]**o + ((0.452198325838+0.352127629798j))*x_ref[0] + ((0.299327077085+0.387383347094j))*x_ref[1]**o + ((0.0124313973319-0.868660988403j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.947495649344-0.532824851508j)*x[0]**o + ((0.139142889543-0.998651276715j))*x[0] + ((-0.436958613498-0.576487613521j))*x[1]**o + ((-0.439950926732+0.677030562056j))*x[1]
        ref[(0, 1, 0, 0)]=(0.947495649344-0.532824851508j)*x_ref[0]**o + ((0.139142889543-0.998651276715j))*x_ref[0] + ((-0.436958613498-0.576487613521j))*x_ref[1]**o + ((-0.439950926732+0.677030562056j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.680734041258+0.069942766105j)*x[0]**o + ((-0.516402676544-0.79881103425j))*x[0] + ((-0.892138944404+0.491412093272j))*x[1]**o + ((0.163679272877-0.498501157459j))*x[1]
        ref[(0, 1, 0, 1)]=(0.680734041258+0.069942766105j)*x_ref[0]**o + ((-0.516402676544-0.79881103425j))*x_ref[0] + ((-0.892138944404+0.491412093272j))*x_ref[1]**o + ((0.163679272877-0.498501157459j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(0.873526039175-0.0527265135878j)*x[0]**o + ((-0.736932396116-0.73584814307j))*x[0] + ((-0.783386357179-0.457245108393j))*x[1]**o + ((0.573054469855+0.833697919939j))*x[1]
        ref[(0, 1, 0, 2)]=(0.873526039175-0.0527265135878j)*x_ref[0]**o + ((-0.736932396116-0.73584814307j))*x_ref[0] + ((-0.783386357179-0.457245108393j))*x_ref[1]**o + ((0.573054469855+0.833697919939j))*x_ref[1]
        arg[(0, 1, 0, 3)]=(-0.609448944214-0.505179289066j)*x[0]**o + ((-0.336703625826-0.280785278229j))*x[0] + ((0.172225476661+0.665639742806j))*x[1]**o + ((-0.717416063106-0.706661958619j))*x[1]
        ref[(0, 1, 0, 3)]=(-0.609448944214-0.505179289066j)*x_ref[0]**o + ((-0.336703625826-0.280785278229j))*x_ref[0] + ((0.172225476661+0.665639742806j))*x_ref[1]**o + ((-0.717416063106-0.706661958619j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.322507901962+0.0607102682191j)*x[0]**o + ((-0.628751351957-0.533451370616j))*x[0] + ((0.430630546777-0.995998938178j))*x[1]**o + ((0.27880391725+0.47130917884j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.322507901962+0.0607102682191j)*x_ref[0]**o + ((-0.628751351957-0.533451370616j))*x_ref[0] + ((0.430630546777-0.995998938178j))*x_ref[1]**o + ((0.27880391725+0.47130917884j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.844640058128-0.448687478636j)*x[0]**o + ((-0.477043529506+0.0786425239674j))*x[0] + ((0.890624149008+0.835816198792j))*x[1]**o + ((-0.634018147347-0.298486248784j))*x[1]
        ref[(0, 1, 1, 1)]=(0.844640058128-0.448687478636j)*x_ref[0]**o + ((-0.477043529506+0.0786425239674j))*x_ref[0] + ((0.890624149008+0.835816198792j))*x_ref[1]**o + ((-0.634018147347-0.298486248784j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(-0.948615975338+0.470311623326j)*x[0]**o + ((-0.14732183546+0.702323693374j))*x[0] + ((-0.27467093548-0.97509364109j))*x[1]**o + ((-0.629633176675+0.00505738426585j))*x[1]
        ref[(0, 1, 1, 2)]=(-0.948615975338+0.470311623326j)*x_ref[0]**o + ((-0.14732183546+0.702323693374j))*x_ref[0] + ((-0.27467093548-0.97509364109j))*x_ref[1]**o + ((-0.629633176675+0.00505738426585j))*x_ref[1]
        arg[(0, 1, 1, 3)]=(-0.290289652725-0.946940859373j)*x[0]**o + ((0.325238841817-0.1650378519j))*x[0] + ((0.827915844327-0.599577858848j))*x[1]**o + ((-0.19332978095+0.971721560289j))*x[1]
        ref[(0, 1, 1, 3)]=(-0.290289652725-0.946940859373j)*x_ref[0]**o + ((0.325238841817-0.1650378519j))*x_ref[0] + ((0.827915844327-0.599577858848j))*x_ref[1]**o + ((-0.19332978095+0.971721560289j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(-0.0603746603179+0.655673863002j)*x[0]**o + ((-0.100167082049+0.381986787389j))*x[0] + ((-0.461670811986-0.112938238971j))*x[1]**o + ((-0.557505175025+0.545352193097j))*x[1]
        ref[(0, 1, 2, 0)]=(-0.0603746603179+0.655673863002j)*x_ref[0]**o + ((-0.100167082049+0.381986787389j))*x_ref[0] + ((-0.461670811986-0.112938238971j))*x_ref[1]**o + ((-0.557505175025+0.545352193097j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(0.268130421927-0.21879105701j)*x[0]**o + ((-0.89066619337-0.386698795184j))*x[0] + ((0.829937448714-0.548537413378j))*x[1]**o + ((-0.183686028349+0.29340859744j))*x[1]
        ref[(0, 1, 2, 1)]=(0.268130421927-0.21879105701j)*x_ref[0]**o + ((-0.89066619337-0.386698795184j))*x_ref[0] + ((0.829937448714-0.548537413378j))*x_ref[1]**o + ((-0.183686028349+0.29340859744j))*x_ref[1]
        arg[(0, 1, 2, 2)]=(-0.0264708256253+0.72876776948j)*x[0]**o + ((0.0462245532087+0.619936080556j))*x[0] + ((-0.955774274623-0.162410313705j))*x[1]**o + ((-0.590436902822-0.660518676857j))*x[1]
        ref[(0, 1, 2, 2)]=(-0.0264708256253+0.72876776948j)*x_ref[0]**o + ((0.0462245532087+0.619936080556j))*x_ref[0] + ((-0.955774274623-0.162410313705j))*x_ref[1]**o + ((-0.590436902822-0.660518676857j))*x_ref[1]
        arg[(0, 1, 2, 3)]=(0.532484117117-0.738638474731j)*x[0]**o + ((0.811240296735+0.0873909505557j))*x[0] + ((-0.534976636287-0.0267483526985j))*x[1]**o + ((0.154879667826-0.893119947019j))*x[1]
        ref[(0, 1, 2, 3)]=(0.532484117117-0.738638474731j)*x_ref[0]**o + ((0.811240296735+0.0873909505557j))*x_ref[0] + ((-0.534976636287-0.0267483526985j))*x_ref[1]**o + ((0.154879667826-0.893119947019j))*x_ref[1]
        arg[(0, 1, 3, 0)]=(0.997466035724-0.147417895385j)*x[0]**o + ((-0.220972222329-0.932860181723j))*x[0] + ((-0.457100576058-0.825864899401j))*x[1]**o + ((-0.243800406266+0.0598200804202j))*x[1]
        ref[(0, 1, 3, 0)]=(0.997466035724-0.147417895385j)*x_ref[0]**o + ((-0.220972222329-0.932860181723j))*x_ref[0] + ((-0.457100576058-0.825864899401j))*x_ref[1]**o + ((-0.243800406266+0.0598200804202j))*x_ref[1]
        arg[(0, 1, 3, 1)]=(-0.898756771023+0.74280894347j)*x[0]**o + ((0.663901612907+0.719118312717j))*x[0] + ((-0.823547285958-0.695109919706j))*x[1]**o + ((-0.696348057067-0.11143456828j))*x[1]
        ref[(0, 1, 3, 1)]=(-0.898756771023+0.74280894347j)*x_ref[0]**o + ((0.663901612907+0.719118312717j))*x_ref[0] + ((-0.823547285958-0.695109919706j))*x_ref[1]**o + ((-0.696348057067-0.11143456828j))*x_ref[1]
        arg[(0, 1, 3, 2)]=(0.311032983032-0.474030747559j)*x[0]**o + ((-0.171568010502-0.752038691918j))*x[0] + ((-0.341572642306-0.0330271252846j))*x[1]**o + ((-0.814337317137+0.542193749107j))*x[1]
        ref[(0, 1, 3, 2)]=(0.311032983032-0.474030747559j)*x_ref[0]**o + ((-0.171568010502-0.752038691918j))*x_ref[0] + ((-0.341572642306-0.0330271252846j))*x_ref[1]**o + ((-0.814337317137+0.542193749107j))*x_ref[1]
        arg[(0, 1, 3, 3)]=(-0.912418572142+0.343318466032j)*x[0]**o + ((-0.184593319337-0.424194761504j))*x[0] + ((0.22427368127+0.502044259205j))*x[1]**o + ((-0.0179081076603-0.704021977699j))*x[1]
        ref[(0, 1, 3, 3)]=(-0.912418572142+0.343318466032j)*x_ref[0]**o + ((-0.184593319337-0.424194761504j))*x_ref[0] + ((0.22427368127+0.502044259205j))*x_ref[1]**o + ((-0.0179081076603-0.704021977699j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.0166088041765+0.633113555803j)*x[0]**o + ((0.786095333684+0.264674462251j))*x[0] + ((0.022246933698+0.283961100863j))*x[1]**o + ((0.0585703092788+0.65806123672j))*x[1]
        ref[(0, 2, 0, 0)]=(0.0166088041765+0.633113555803j)*x_ref[0]**o + ((0.786095333684+0.264674462251j))*x_ref[0] + ((0.022246933698+0.283961100863j))*x_ref[1]**o + ((0.0585703092788+0.65806123672j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(0.615156732719+0.335830601339j)*x[0]**o + ((-0.0812762455728+0.0669390543367j))*x[0] + ((-0.00760256224611-0.733352443588j))*x[1]**o + ((0.754334199425-0.768258418812j))*x[1]
        ref[(0, 2, 0, 1)]=(0.615156732719+0.335830601339j)*x_ref[0]**o + ((-0.0812762455728+0.0669390543367j))*x_ref[0] + ((-0.00760256224611-0.733352443588j))*x_ref[1]**o + ((0.754334199425-0.768258418812j))*x_ref[1]
        arg[(0, 2, 0, 2)]=(-0.165212992136-0.0543284985244j)*x[0]**o + ((-0.0358610813649+0.705036311795j))*x[0] + ((0.767867372063-0.691305417986j))*x[1]**o + ((0.22177813048+0.528799505253j))*x[1]
        ref[(0, 2, 0, 2)]=(-0.165212992136-0.0543284985244j)*x_ref[0]**o + ((-0.0358610813649+0.705036311795j))*x_ref[0] + ((0.767867372063-0.691305417986j))*x_ref[1]**o + ((0.22177813048+0.528799505253j))*x_ref[1]
        arg[(0, 2, 0, 3)]=(0.414806720263-0.326226376642j)*x[0]**o + ((0.320428444413+0.312254472888j))*x[0] + ((-0.508168910005+0.989379258087j))*x[1]**o + ((0.187706156541+0.256269348129j))*x[1]
        ref[(0, 2, 0, 3)]=(0.414806720263-0.326226376642j)*x_ref[0]**o + ((0.320428444413+0.312254472888j))*x_ref[0] + ((-0.508168910005+0.989379258087j))*x_ref[1]**o + ((0.187706156541+0.256269348129j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(0.649648927757+0.735324046028j)*x[0]**o + ((0.314803317109-0.888687609079j))*x[0] + ((-0.888994014047+0.609297988797j))*x[1]**o + ((-0.708221935439-0.740174691941j))*x[1]
        ref[(0, 2, 1, 0)]=(0.649648927757+0.735324046028j)*x_ref[0]**o + ((0.314803317109-0.888687609079j))*x_ref[0] + ((-0.888994014047+0.609297988797j))*x_ref[1]**o + ((-0.708221935439-0.740174691941j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(0.720316986942+0.429727668431j)*x[0]**o + ((0.169843212514-0.392270129467j))*x[0] + ((-0.529822086445+0.659962367877j))*x[1]**o + ((-0.00276618928874-0.109023951121j))*x[1]
        ref[(0, 2, 1, 1)]=(0.720316986942+0.429727668431j)*x_ref[0]**o + ((0.169843212514-0.392270129467j))*x_ref[0] + ((-0.529822086445+0.659962367877j))*x_ref[1]**o + ((-0.00276618928874-0.109023951121j))*x_ref[1]
        arg[(0, 2, 1, 2)]=(-0.404962895042+0.759244672173j)*x[0]**o + ((-0.363971919026-0.0672630524279j))*x[0] + ((-0.181131040428+0.454001671509j))*x[1]**o + ((-0.384067092907-0.0538550396685j))*x[1]
        ref[(0, 2, 1, 2)]=(-0.404962895042+0.759244672173j)*x_ref[0]**o + ((-0.363971919026-0.0672630524279j))*x_ref[0] + ((-0.181131040428+0.454001671509j))*x_ref[1]**o + ((-0.384067092907-0.0538550396685j))*x_ref[1]
        arg[(0, 2, 1, 3)]=(0.219719567277+0.35734210119j)*x[0]**o + ((-0.842717566016+0.61531144024j))*x[0] + ((0.160915901694-0.727571864974j))*x[1]**o + ((0.477805914317-0.275891552352j))*x[1]
        ref[(0, 2, 1, 3)]=(0.219719567277+0.35734210119j)*x_ref[0]**o + ((-0.842717566016+0.61531144024j))*x_ref[0] + ((0.160915901694-0.727571864974j))*x_ref[1]**o + ((0.477805914317-0.275891552352j))*x_ref[1]
        arg[(0, 2, 2, 0)]=(-0.390896385997-0.0487713439745j)*x[0]**o + ((-0.61027076497-0.789432084454j))*x[0] + ((0.911805855806-0.784930815686j))*x[1]**o + ((0.55688941162-0.740485675053j))*x[1]
        ref[(0, 2, 2, 0)]=(-0.390896385997-0.0487713439745j)*x_ref[0]**o + ((-0.61027076497-0.789432084454j))*x_ref[0] + ((0.911805855806-0.784930815686j))*x_ref[1]**o + ((0.55688941162-0.740485675053j))*x_ref[1]
        arg[(0, 2, 2, 1)]=(0.0357476231527-0.49350110159j)*x[0]**o + ((-0.861270819133+0.543483302916j))*x[0] + ((-0.145896740377+0.0599468435332j))*x[1]**o + ((0.439156448632+0.239989701832j))*x[1]
        ref[(0, 2, 2, 1)]=(0.0357476231527-0.49350110159j)*x_ref[0]**o + ((-0.861270819133+0.543483302916j))*x_ref[0] + ((-0.145896740377+0.0599468435332j))*x_ref[1]**o + ((0.439156448632+0.239989701832j))*x_ref[1]
        arg[(0, 2, 2, 2)]=(-0.952769285234+0.220917458636j)*x[0]**o + ((-0.501362564624+0.531878419832j))*x[0] + ((-0.846862153055-0.496165462402j))*x[1]**o + ((0.0800082996464+0.736909198424j))*x[1]
        ref[(0, 2, 2, 2)]=(-0.952769285234+0.220917458636j)*x_ref[0]**o + ((-0.501362564624+0.531878419832j))*x_ref[0] + ((-0.846862153055-0.496165462402j))*x_ref[1]**o + ((0.0800082996464+0.736909198424j))*x_ref[1]
        arg[(0, 2, 2, 3)]=(-0.249160879226-0.274724400382j)*x[0]**o + ((-0.337809348484-0.796271412296j))*x[0] + ((-0.503875043345-0.409733707669j))*x[1]**o + ((-0.984084181373-0.472944170376j))*x[1]
        ref[(0, 2, 2, 3)]=(-0.249160879226-0.274724400382j)*x_ref[0]**o + ((-0.337809348484-0.796271412296j))*x_ref[0] + ((-0.503875043345-0.409733707669j))*x_ref[1]**o + ((-0.984084181373-0.472944170376j))*x_ref[1]
        arg[(0, 2, 3, 0)]=(0.0183369566425+0.528293731223j)*x[0]**o + ((-0.144091688255+0.0188105088446j))*x[0] + ((-0.940827988793+0.20816109213j))*x[1]**o + ((-0.591776798237-0.865604861566j))*x[1]
        ref[(0, 2, 3, 0)]=(0.0183369566425+0.528293731223j)*x_ref[0]**o + ((-0.144091688255+0.0188105088446j))*x_ref[0] + ((-0.940827988793+0.20816109213j))*x_ref[1]**o + ((-0.591776798237-0.865604861566j))*x_ref[1]
        arg[(0, 2, 3, 1)]=(0.928915737155+0.386516069179j)*x[0]**o + ((0.499456372977+0.998719741312j))*x[0] + ((-0.541780348461+0.295123965881j))*x[1]**o + ((-0.469290840071-0.129895604163j))*x[1]
        ref[(0, 2, 3, 1)]=(0.928915737155+0.386516069179j)*x_ref[0]**o + ((0.499456372977+0.998719741312j))*x_ref[0] + ((-0.541780348461+0.295123965881j))*x_ref[1]**o + ((-0.469290840071-0.129895604163j))*x_ref[1]
        arg[(0, 2, 3, 2)]=(-0.542288856068+0.881342488543j)*x[0]**o + ((0.396759234319-0.649820153952j))*x[0] + ((-0.793820270451+0.830304312108j))*x[1]**o + ((0.34547085583-0.285959170889j))*x[1]
        ref[(0, 2, 3, 2)]=(-0.542288856068+0.881342488543j)*x_ref[0]**o + ((0.396759234319-0.649820153952j))*x_ref[0] + ((-0.793820270451+0.830304312108j))*x_ref[1]**o + ((0.34547085583-0.285959170889j))*x_ref[1]
        arg[(0, 2, 3, 3)]=(-0.26395192311-0.577875795555j)*x[0]**o + ((-0.608704045268-0.395921564681j))*x[0] + ((0.582509232976+0.769764245808j))*x[1]**o + ((0.25332995366+0.959494086183j))*x[1]
        ref[(0, 2, 3, 3)]=(-0.26395192311-0.577875795555j)*x_ref[0]**o + ((-0.608704045268-0.395921564681j))*x_ref[0] + ((0.582509232976+0.769764245808j))*x_ref[1]**o + ((0.25332995366+0.959494086183j))*x_ref[1]
        arg[(0, 3, 0, 0)]=(0.0296508968399+0.121195765096j)*x[0]**o + ((0.410137379327+0.534660635848j))*x[0] + ((0.892694563335-0.757407365803j))*x[1]**o + ((0.706634921593+0.143556433299j))*x[1]
        ref[(0, 3, 0, 0)]=(0.0296508968399+0.121195765096j)*x_ref[0]**o + ((0.410137379327+0.534660635848j))*x_ref[0] + ((0.892694563335-0.757407365803j))*x_ref[1]**o + ((0.706634921593+0.143556433299j))*x_ref[1]
        arg[(0, 3, 0, 1)]=(-0.422677009389+0.244834138202j)*x[0]**o + ((-0.882397167407+0.88183557624j))*x[0] + ((0.492546701108+0.577723700346j))*x[1]**o + ((0.748755320319+0.489805710867j))*x[1]
        ref[(0, 3, 0, 1)]=(-0.422677009389+0.244834138202j)*x_ref[0]**o + ((-0.882397167407+0.88183557624j))*x_ref[0] + ((0.492546701108+0.577723700346j))*x_ref[1]**o + ((0.748755320319+0.489805710867j))*x_ref[1]
        arg[(0, 3, 0, 2)]=(0.578524495073+0.73146948916j)*x[0]**o + ((0.512789051383+0.748231650062j))*x[0] + ((0.301151473317+0.76408702224j))*x[1]**o + ((0.0613092941278-0.510857521992j))*x[1]
        ref[(0, 3, 0, 2)]=(0.578524495073+0.73146948916j)*x_ref[0]**o + ((0.512789051383+0.748231650062j))*x_ref[0] + ((0.301151473317+0.76408702224j))*x_ref[1]**o + ((0.0613092941278-0.510857521992j))*x_ref[1]
        arg[(0, 3, 0, 3)]=(-0.657862305749-0.777952785378j)*x[0]**o + ((0.494209930631-0.826004407215j))*x[0] + ((-0.13025491898+0.218509968179j))*x[1]**o + ((0.679763039675-0.511712693265j))*x[1]
        ref[(0, 3, 0, 3)]=(-0.657862305749-0.777952785378j)*x_ref[0]**o + ((0.494209930631-0.826004407215j))*x_ref[0] + ((-0.13025491898+0.218509968179j))*x_ref[1]**o + ((0.679763039675-0.511712693265j))*x_ref[1]
        arg[(0, 3, 1, 0)]=(0.469283812572-0.385701365193j)*x[0]**o + ((-0.603793116428+0.973011880516j))*x[0] + ((0.539041191541-0.668832686527j))*x[1]**o + ((-0.711670260373+0.564279264073j))*x[1]
        ref[(0, 3, 1, 0)]=(0.469283812572-0.385701365193j)*x_ref[0]**o + ((-0.603793116428+0.973011880516j))*x_ref[0] + ((0.539041191541-0.668832686527j))*x_ref[1]**o + ((-0.711670260373+0.564279264073j))*x_ref[1]
        arg[(0, 3, 1, 1)]=(0.815864167733-0.325404824411j)*x[0]**o + ((-0.0800631821831-0.885791033863j))*x[0] + ((0.152754759744-0.176382011152j))*x[1]**o + ((0.0489123972393+0.276390754223j))*x[1]
        ref[(0, 3, 1, 1)]=(0.815864167733-0.325404824411j)*x_ref[0]**o + ((-0.0800631821831-0.885791033863j))*x_ref[0] + ((0.152754759744-0.176382011152j))*x_ref[1]**o + ((0.0489123972393+0.276390754223j))*x_ref[1]
        arg[(0, 3, 1, 2)]=(0.0551117725922-0.321774214585j)*x[0]**o + ((-0.412437217172+0.132232142104j))*x[0] + ((-0.0760359398511+0.658002807234j))*x[1]**o + ((0.708708388488+0.847162680319j))*x[1]
        ref[(0, 3, 1, 2)]=(0.0551117725922-0.321774214585j)*x_ref[0]**o + ((-0.412437217172+0.132232142104j))*x_ref[0] + ((-0.0760359398511+0.658002807234j))*x_ref[1]**o + ((0.708708388488+0.847162680319j))*x_ref[1]
        arg[(0, 3, 1, 3)]=(0.565040648675-0.93425059472j)*x[0]**o + ((0.687007087393-0.52625068746j))*x[0] + ((0.141440682846-0.142336428572j))*x[1]**o + ((-0.00935578291845+0.492365064946j))*x[1]
        ref[(0, 3, 1, 3)]=(0.565040648675-0.93425059472j)*x_ref[0]**o + ((0.687007087393-0.52625068746j))*x_ref[0] + ((0.141440682846-0.142336428572j))*x_ref[1]**o + ((-0.00935578291845+0.492365064946j))*x_ref[1]
        arg[(0, 3, 2, 0)]=(-0.222599784486-0.0976507687673j)*x[0]**o + ((0.198648853548-0.655197123051j))*x[0] + ((-0.780953480357-0.0822341876102j))*x[1]**o + ((0.606754079226+0.699930505972j))*x[1]
        ref[(0, 3, 2, 0)]=(-0.222599784486-0.0976507687673j)*x_ref[0]**o + ((0.198648853548-0.655197123051j))*x_ref[0] + ((-0.780953480357-0.0822341876102j))*x_ref[1]**o + ((0.606754079226+0.699930505972j))*x_ref[1]
        arg[(0, 3, 2, 1)]=(-0.35545463592-0.519443157036j)*x[0]**o + ((0.717622491357-0.989945620662j))*x[0] + ((0.561155287555-0.238553260274j))*x[1]**o + ((0.355414617887-0.744372605798j))*x[1]
        ref[(0, 3, 2, 1)]=(-0.35545463592-0.519443157036j)*x_ref[0]**o + ((0.717622491357-0.989945620662j))*x_ref[0] + ((0.561155287555-0.238553260274j))*x_ref[1]**o + ((0.355414617887-0.744372605798j))*x_ref[1]
        arg[(0, 3, 2, 2)]=(-0.635666284604+0.845014219245j)*x[0]**o + ((0.392335611675+0.273984939057j))*x[0] + ((0.539627222803+0.349103935302j))*x[1]**o + ((0.354736523748-0.0234654485963j))*x[1]
        ref[(0, 3, 2, 2)]=(-0.635666284604+0.845014219245j)*x_ref[0]**o + ((0.392335611675+0.273984939057j))*x_ref[0] + ((0.539627222803+0.349103935302j))*x_ref[1]**o + ((0.354736523748-0.0234654485963j))*x_ref[1]
        arg[(0, 3, 2, 3)]=(0.108446951287-0.484051150251j)*x[0]**o + ((0.951711478561+0.445974261605j))*x[0] + ((-0.989521200754-0.77782228672j))*x[1]**o + ((0.678168049803-0.0376038604201j))*x[1]
        ref[(0, 3, 2, 3)]=(0.108446951287-0.484051150251j)*x_ref[0]**o + ((0.951711478561+0.445974261605j))*x_ref[0] + ((-0.989521200754-0.77782228672j))*x_ref[1]**o + ((0.678168049803-0.0376038604201j))*x_ref[1]
        arg[(0, 3, 3, 0)]=(-0.832891289897+0.443448371512j)*x[0]**o + ((0.27640994489-0.346503233946j))*x[0] + ((-0.323922491006-0.104353762993j))*x[1]**o + ((-0.262283285376-0.925689894305j))*x[1]
        ref[(0, 3, 3, 0)]=(-0.832891289897+0.443448371512j)*x_ref[0]**o + ((0.27640994489-0.346503233946j))*x_ref[0] + ((-0.323922491006-0.104353762993j))*x_ref[1]**o + ((-0.262283285376-0.925689894305j))*x_ref[1]
        arg[(0, 3, 3, 1)]=(0.589024191655-0.926561097097j)*x[0]**o + ((-0.333914630503-0.460767357857j))*x[0] + ((0.636752461447-0.893891334807j))*x[1]**o + ((0.463085101011-0.243360901354j))*x[1]
        ref[(0, 3, 3, 1)]=(0.589024191655-0.926561097097j)*x_ref[0]**o + ((-0.333914630503-0.460767357857j))*x_ref[0] + ((0.636752461447-0.893891334807j))*x_ref[1]**o + ((0.463085101011-0.243360901354j))*x_ref[1]
        arg[(0, 3, 3, 2)]=(0.175717254817+0.672683776634j)*x[0]**o + ((0.00467512048037-0.0562783694317j))*x[0] + ((0.330507124103+0.49828589j))*x[1]**o + ((-0.102321649089+0.122947683069j))*x[1]
        ref[(0, 3, 3, 2)]=(0.175717254817+0.672683776634j)*x_ref[0]**o + ((0.00467512048037-0.0562783694317j))*x_ref[0] + ((0.330507124103+0.49828589j))*x_ref[1]**o + ((-0.102321649089+0.122947683069j))*x_ref[1]
        arg[(0, 3, 3, 3)]=(0.290947427986+0.994281386263j)*x[0]**o + ((0.737781022883+0.200945881422j))*x[0] + ((-0.935594139337+0.118157299473j))*x[1]**o + ((-0.703619984576+0.154883483339j))*x[1]
        ref[(0, 3, 3, 3)]=(0.290947427986+0.994281386263j)*x_ref[0]**o + ((0.737781022883+0.200945881422j))*x_ref[0] + ((-0.935594139337+0.118157299473j))*x_ref[1]**o + ((-0.703619984576+0.154883483339j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.181288279178-0.491562324836j)*x[0]**o + ((-0.654921668325+0.964099756673j))*x[0] + ((-0.329351428013-0.534398714243j))*x[1]**o + ((0.947776976564+0.0688096242432j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.181288279178-0.491562324836j)*x_ref[0]**o + ((-0.654921668325+0.964099756673j))*x_ref[0] + ((-0.329351428013-0.534398714243j))*x_ref[1]**o + ((0.947776976564+0.0688096242432j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.497905897834+0.0745109714893j)*x[0]**o + ((0.412676446376-0.0595616709705j))*x[0] + ((-0.968365960256+0.360174895163j))*x[1]**o + ((-0.332232535739-0.127651086768j))*x[1]
        ref[(1, 0, 0, 1)]=(0.497905897834+0.0745109714893j)*x_ref[0]**o + ((0.412676446376-0.0595616709705j))*x_ref[0] + ((-0.968365960256+0.360174895163j))*x_ref[1]**o + ((-0.332232535739-0.127651086768j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(0.315669900792+0.938591428203j)*x[0]**o + ((0.15178933968+0.386150378287j))*x[0] + ((-0.489130292709+0.969751286224j))*x[1]**o + ((-0.49465872235+0.718810547555j))*x[1]
        ref[(1, 0, 0, 2)]=(0.315669900792+0.938591428203j)*x_ref[0]**o + ((0.15178933968+0.386150378287j))*x_ref[0] + ((-0.489130292709+0.969751286224j))*x_ref[1]**o + ((-0.49465872235+0.718810547555j))*x_ref[1]
        arg[(1, 0, 0, 3)]=(-0.974023981823+0.726343577564j)*x[0]**o + ((0.178464108898-0.783003495126j))*x[0] + ((-0.841389868607-0.208133391727j))*x[1]**o + ((0.674052554404+0.0585581355101j))*x[1]
        ref[(1, 0, 0, 3)]=(-0.974023981823+0.726343577564j)*x_ref[0]**o + ((0.178464108898-0.783003495126j))*x_ref[0] + ((-0.841389868607-0.208133391727j))*x_ref[1]**o + ((0.674052554404+0.0585581355101j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(0.717668990737+0.108115201109j)*x[0]**o + ((0.668535755684+0.580728078057j))*x[0] + ((0.150745486723-0.202297790017j))*x[1]**o + ((0.78336844994+0.505678604779j))*x[1]
        ref[(1, 0, 1, 0)]=(0.717668990737+0.108115201109j)*x_ref[0]**o + ((0.668535755684+0.580728078057j))*x_ref[0] + ((0.150745486723-0.202297790017j))*x_ref[1]**o + ((0.78336844994+0.505678604779j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.823091169756-0.456394250681j)*x[0]**o + ((-0.497437205947-0.434851154288j))*x[0] + ((-0.857977588686+0.542308467595j))*x[1]**o + ((0.679027209114-0.24537573015j))*x[1]
        ref[(1, 0, 1, 1)]=(0.823091169756-0.456394250681j)*x_ref[0]**o + ((-0.497437205947-0.434851154288j))*x_ref[0] + ((-0.857977588686+0.542308467595j))*x_ref[1]**o + ((0.679027209114-0.24537573015j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(0.336700245618+0.770550111962j)*x[0]**o + ((-0.0398100921183+0.569928047958j))*x[0] + ((-0.727315776443+0.265369556597j))*x[1]**o + ((0.866773070059+0.0886029382764j))*x[1]
        ref[(1, 0, 1, 2)]=(0.336700245618+0.770550111962j)*x_ref[0]**o + ((-0.0398100921183+0.569928047958j))*x_ref[0] + ((-0.727315776443+0.265369556597j))*x_ref[1]**o + ((0.866773070059+0.0886029382764j))*x_ref[1]
        arg[(1, 0, 1, 3)]=(-0.626314089415-0.893234425384j)*x[0]**o + ((-0.941481104056-0.774824759471j))*x[0] + ((-0.258337896894-0.899140987222j))*x[1]**o + ((0.253885273575+0.0468286423849j))*x[1]
        ref[(1, 0, 1, 3)]=(-0.626314089415-0.893234425384j)*x_ref[0]**o + ((-0.941481104056-0.774824759471j))*x_ref[0] + ((-0.258337896894-0.899140987222j))*x_ref[1]**o + ((0.253885273575+0.0468286423849j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(-0.657047110614+0.965616265212j)*x[0]**o + ((0.134327781763-0.636783712429j))*x[0] + ((0.4842293205+0.32018864537j))*x[1]**o + ((-0.978422829179+0.97347189997j))*x[1]
        ref[(1, 0, 2, 0)]=(-0.657047110614+0.965616265212j)*x_ref[0]**o + ((0.134327781763-0.636783712429j))*x_ref[0] + ((0.4842293205+0.32018864537j))*x_ref[1]**o + ((-0.978422829179+0.97347189997j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(0.52030723779-0.322810440672j)*x[0]**o + ((-0.872172148921-0.696510876189j))*x[0] + ((-0.360562615559+0.30928264563j))*x[1]**o + ((0.576584154786+0.472966735422j))*x[1]
        ref[(1, 0, 2, 1)]=(0.52030723779-0.322810440672j)*x_ref[0]**o + ((-0.872172148921-0.696510876189j))*x_ref[0] + ((-0.360562615559+0.30928264563j))*x_ref[1]**o + ((0.576584154786+0.472966735422j))*x_ref[1]
        arg[(1, 0, 2, 2)]=(-0.228627885737+0.749032448552j)*x[0]**o + ((-0.578534690407-0.603003677511j))*x[0] + ((0.608383110422-0.825674063353j))*x[1]**o + ((-0.676719732376+0.770435818642j))*x[1]
        ref[(1, 0, 2, 2)]=(-0.228627885737+0.749032448552j)*x_ref[0]**o + ((-0.578534690407-0.603003677511j))*x_ref[0] + ((0.608383110422-0.825674063353j))*x_ref[1]**o + ((-0.676719732376+0.770435818642j))*x_ref[1]
        arg[(1, 0, 2, 3)]=(-0.17614102329+0.699970030469j)*x[0]**o + ((0.273950801936+0.623844970732j))*x[0] + ((0.681483350142-0.242834670737j))*x[1]**o + ((-0.244339779548+0.333190553618j))*x[1]
        ref[(1, 0, 2, 3)]=(-0.17614102329+0.699970030469j)*x_ref[0]**o + ((0.273950801936+0.623844970732j))*x_ref[0] + ((0.681483350142-0.242834670737j))*x_ref[1]**o + ((-0.244339779548+0.333190553618j))*x_ref[1]
        arg[(1, 0, 3, 0)]=(-0.528886664902+0.71309066406j)*x[0]**o + ((-0.836685668472-0.746748649664j))*x[0] + ((0.993328585254+0.927974689114j))*x[1]**o + ((-0.700197714818-0.985119225843j))*x[1]
        ref[(1, 0, 3, 0)]=(-0.528886664902+0.71309066406j)*x_ref[0]**o + ((-0.836685668472-0.746748649664j))*x_ref[0] + ((0.993328585254+0.927974689114j))*x_ref[1]**o + ((-0.700197714818-0.985119225843j))*x_ref[1]
        arg[(1, 0, 3, 1)]=(0.10248875059+0.717823255915j)*x[0]**o + ((0.566899550766-0.70490698711j))*x[0] + ((0.661239853957+0.896106367494j))*x[1]**o + ((0.568204153918+0.321815784967j))*x[1]
        ref[(1, 0, 3, 1)]=(0.10248875059+0.717823255915j)*x_ref[0]**o + ((0.566899550766-0.70490698711j))*x_ref[0] + ((0.661239853957+0.896106367494j))*x_ref[1]**o + ((0.568204153918+0.321815784967j))*x_ref[1]
        arg[(1, 0, 3, 2)]=(-0.468562661052-0.757709581374j)*x[0]**o + ((0.684133194163-0.618889996618j))*x[0] + ((-0.887122736334-0.754701550263j))*x[1]**o + ((-0.200090046139-0.605607808297j))*x[1]
        ref[(1, 0, 3, 2)]=(-0.468562661052-0.757709581374j)*x_ref[0]**o + ((0.684133194163-0.618889996618j))*x_ref[0] + ((-0.887122736334-0.754701550263j))*x_ref[1]**o + ((-0.200090046139-0.605607808297j))*x_ref[1]
        arg[(1, 0, 3, 3)]=(-0.642600104735-0.700323858281j)*x[0]**o + ((-0.205273865456+0.903205388773j))*x[0] + ((0.202176642741-0.135101993656j))*x[1]**o + ((0.290823118707-0.996804352657j))*x[1]
        ref[(1, 0, 3, 3)]=(-0.642600104735-0.700323858281j)*x_ref[0]**o + ((-0.205273865456+0.903205388773j))*x_ref[0] + ((0.202176642741-0.135101993656j))*x_ref[1]**o + ((0.290823118707-0.996804352657j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.227302231985+0.887166152929j)*x[0]**o + ((0.269831111685+0.550001768809j))*x[0] + ((-0.776920568481+0.233337139157j))*x[1]**o + ((0.509206255439+0.194166410294j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.227302231985+0.887166152929j)*x_ref[0]**o + ((0.269831111685+0.550001768809j))*x_ref[0] + ((-0.776920568481+0.233337139157j))*x_ref[1]**o + ((0.509206255439+0.194166410294j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.877463585474+0.205191330766j)*x[0]**o + ((0.267596984689+0.07680199544j))*x[0] + ((-0.216054683055-0.847462815022j))*x[1]**o + ((0.964434957704+0.879773819461j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.877463585474+0.205191330766j)*x_ref[0]**o + ((0.267596984689+0.07680199544j))*x_ref[0] + ((-0.216054683055-0.847462815022j))*x_ref[1]**o + ((0.964434957704+0.879773819461j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(-0.549347600195-0.771788097296j)*x[0]**o + ((-0.984222368785+0.879781827988j))*x[0] + ((-0.729205802724+0.550916797738j))*x[1]**o + ((0.389792932306+0.268332592259j))*x[1]
        ref[(1, 1, 0, 2)]=(-0.549347600195-0.771788097296j)*x_ref[0]**o + ((-0.984222368785+0.879781827988j))*x_ref[0] + ((-0.729205802724+0.550916797738j))*x_ref[1]**o + ((0.389792932306+0.268332592259j))*x_ref[1]
        arg[(1, 1, 0, 3)]=(-0.670650256486-0.676069568545j)*x[0]**o + ((-0.0121907976778+0.760473381939j))*x[0] + ((-0.514969082357-0.375862665361j))*x[1]**o + ((-0.219426506281+0.264696973637j))*x[1]
        ref[(1, 1, 0, 3)]=(-0.670650256486-0.676069568545j)*x_ref[0]**o + ((-0.0121907976778+0.760473381939j))*x_ref[0] + ((-0.514969082357-0.375862665361j))*x_ref[1]**o + ((-0.219426506281+0.264696973637j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.658224064598-0.776731771578j)*x[0]**o + ((-0.387542001002-0.0908400036163j))*x[0] + ((0.0327747873459-0.249147195285j))*x[1]**o + ((0.641542793394+0.826833465959j))*x[1]
        ref[(1, 1, 1, 0)]=(0.658224064598-0.776731771578j)*x_ref[0]**o + ((-0.387542001002-0.0908400036163j))*x_ref[0] + ((0.0327747873459-0.249147195285j))*x_ref[1]**o + ((0.641542793394+0.826833465959j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.115787752968-0.437437345246j)*x[0]**o + ((-0.641398676385-0.99505989367j))*x[0] + ((-0.345710246745-0.102460195303j))*x[1]**o + ((0.47538853896-0.0400738822603j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.115787752968-0.437437345246j)*x_ref[0]**o + ((-0.641398676385-0.99505989367j))*x_ref[0] + ((-0.345710246745-0.102460195303j))*x_ref[1]**o + ((0.47538853896-0.0400738822603j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(0.933003158676+0.179766996879j)*x[0]**o + ((0.753710633272-0.998772059913j))*x[0] + ((0.700874628413-0.793691177011j))*x[1]**o + ((0.503224139304+0.939925145651j))*x[1]
        ref[(1, 1, 1, 2)]=(0.933003158676+0.179766996879j)*x_ref[0]**o + ((0.753710633272-0.998772059913j))*x_ref[0] + ((0.700874628413-0.793691177011j))*x_ref[1]**o + ((0.503224139304+0.939925145651j))*x_ref[1]
        arg[(1, 1, 1, 3)]=(0.354195931812-0.0612438738565j)*x[0]**o + ((-0.577508742735+0.267774785434j))*x[0] + ((0.9784301957+0.929013124118j))*x[1]**o + ((-0.459759398528-0.714011791303j))*x[1]
        ref[(1, 1, 1, 3)]=(0.354195931812-0.0612438738565j)*x_ref[0]**o + ((-0.577508742735+0.267774785434j))*x_ref[0] + ((0.9784301957+0.929013124118j))*x_ref[1]**o + ((-0.459759398528-0.714011791303j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(0.829941862455+0.924759703202j)*x[0]**o + ((0.078825775566+0.148062986467j))*x[0] + ((-0.487072026695-0.474274584534j))*x[1]**o + ((0.592581084817+0.965471011151j))*x[1]
        ref[(1, 1, 2, 0)]=(0.829941862455+0.924759703202j)*x_ref[0]**o + ((0.078825775566+0.148062986467j))*x_ref[0] + ((-0.487072026695-0.474274584534j))*x_ref[1]**o + ((0.592581084817+0.965471011151j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(0.216289931879+0.617256693536j)*x[0]**o + ((0.722986099593-0.537823691292j))*x[0] + ((-0.351422034647+0.323105243959j))*x[1]**o + ((-0.497519171411-0.300550465603j))*x[1]
        ref[(1, 1, 2, 1)]=(0.216289931879+0.617256693536j)*x_ref[0]**o + ((0.722986099593-0.537823691292j))*x_ref[0] + ((-0.351422034647+0.323105243959j))*x_ref[1]**o + ((-0.497519171411-0.300550465603j))*x_ref[1]
        arg[(1, 1, 2, 2)]=(0.598471094643+0.391408454284j)*x[0]**o + ((0.786002655337+0.682593378305j))*x[0] + ((-0.424472561795+0.237453662743j))*x[1]**o + ((0.548271146536+0.0072433866688j))*x[1]
        ref[(1, 1, 2, 2)]=(0.598471094643+0.391408454284j)*x_ref[0]**o + ((0.786002655337+0.682593378305j))*x_ref[0] + ((-0.424472561795+0.237453662743j))*x_ref[1]**o + ((0.548271146536+0.0072433866688j))*x_ref[1]
        arg[(1, 1, 2, 3)]=(-0.435491248237+0.938503379067j)*x[0]**o + ((-0.43545716107+0.140575525523j))*x[0] + ((-0.791275875519-0.774880376356j))*x[1]**o + ((0.391383353782-0.497066628336j))*x[1]
        ref[(1, 1, 2, 3)]=(-0.435491248237+0.938503379067j)*x_ref[0]**o + ((-0.43545716107+0.140575525523j))*x_ref[0] + ((-0.791275875519-0.774880376356j))*x_ref[1]**o + ((0.391383353782-0.497066628336j))*x_ref[1]
        arg[(1, 1, 3, 0)]=(-0.879889780472+0.684212130446j)*x[0]**o + ((0.194752269045-0.752479923233j))*x[0] + ((-0.436354327937-0.264447769647j))*x[1]**o + ((-0.588360222672-0.340511637538j))*x[1]
        ref[(1, 1, 3, 0)]=(-0.879889780472+0.684212130446j)*x_ref[0]**o + ((0.194752269045-0.752479923233j))*x_ref[0] + ((-0.436354327937-0.264447769647j))*x_ref[1]**o + ((-0.588360222672-0.340511637538j))*x_ref[1]
        arg[(1, 1, 3, 1)]=(0.0619675553892-0.541907228256j)*x[0]**o + ((0.894820460787+0.195653812095j))*x[0] + ((-0.14476707031+0.726777003426j))*x[1]**o + ((0.251511975765+0.959069104862j))*x[1]
        ref[(1, 1, 3, 1)]=(0.0619675553892-0.541907228256j)*x_ref[0]**o + ((0.894820460787+0.195653812095j))*x_ref[0] + ((-0.14476707031+0.726777003426j))*x_ref[1]**o + ((0.251511975765+0.959069104862j))*x_ref[1]
        arg[(1, 1, 3, 2)]=(-0.749464239102-0.952149490328j)*x[0]**o + ((0.343865741551+0.0202544657583j))*x[0] + ((0.384977120739-0.0420294537585j))*x[1]**o + ((-0.507973554532+0.979020093369j))*x[1]
        ref[(1, 1, 3, 2)]=(-0.749464239102-0.952149490328j)*x_ref[0]**o + ((0.343865741551+0.0202544657583j))*x_ref[0] + ((0.384977120739-0.0420294537585j))*x_ref[1]**o + ((-0.507973554532+0.979020093369j))*x_ref[1]
        arg[(1, 1, 3, 3)]=(0.159916550626-0.183490426332j)*x[0]**o + ((0.70150941745+0.600696132628j))*x[0] + ((-0.677724274485-0.573371635323j))*x[1]**o + ((0.280865963414+0.766183218483j))*x[1]
        ref[(1, 1, 3, 3)]=(0.159916550626-0.183490426332j)*x_ref[0]**o + ((0.70150941745+0.600696132628j))*x_ref[0] + ((-0.677724274485-0.573371635323j))*x_ref[1]**o + ((0.280865963414+0.766183218483j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(0.636873840941+0.260410291394j)*x[0]**o + ((-0.272674249307-0.705860259852j))*x[0] + ((0.152698466562-0.604568339047j))*x[1]**o + ((-0.622144918039-0.0751970023182j))*x[1]
        ref[(1, 2, 0, 0)]=(0.636873840941+0.260410291394j)*x_ref[0]**o + ((-0.272674249307-0.705860259852j))*x_ref[0] + ((0.152698466562-0.604568339047j))*x_ref[1]**o + ((-0.622144918039-0.0751970023182j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(0.848401062195+0.304757559276j)*x[0]**o + ((0.469163100743+0.359897589577j))*x[0] + ((-0.492516797137-0.906461386576j))*x[1]**o + ((0.971053954795-0.6138576277j))*x[1]
        ref[(1, 2, 0, 1)]=(0.848401062195+0.304757559276j)*x_ref[0]**o + ((0.469163100743+0.359897589577j))*x_ref[0] + ((-0.492516797137-0.906461386576j))*x_ref[1]**o + ((0.971053954795-0.6138576277j))*x_ref[1]
        arg[(1, 2, 0, 2)]=(-0.182848870674-0.795501911914j)*x[0]**o + ((-0.439347664189-0.281794690718j))*x[0] + ((-0.551970769825-0.935594041395j))*x[1]**o + ((0.627574800119-0.628461865618j))*x[1]
        ref[(1, 2, 0, 2)]=(-0.182848870674-0.795501911914j)*x_ref[0]**o + ((-0.439347664189-0.281794690718j))*x_ref[0] + ((-0.551970769825-0.935594041395j))*x_ref[1]**o + ((0.627574800119-0.628461865618j))*x_ref[1]
        arg[(1, 2, 0, 3)]=(-0.649931753463-0.0432195393203j)*x[0]**o + ((0.477123680281+0.115661585785j))*x[0] + ((0.237007527857-0.167020344346j))*x[1]**o + ((0.135855621355-0.706202600729j))*x[1]
        ref[(1, 2, 0, 3)]=(-0.649931753463-0.0432195393203j)*x_ref[0]**o + ((0.477123680281+0.115661585785j))*x_ref[0] + ((0.237007527857-0.167020344346j))*x_ref[1]**o + ((0.135855621355-0.706202600729j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(-0.905298161938-0.184804787113j)*x[0]**o + ((-0.542955755304+0.104781995428j))*x[0] + ((-0.570033233092+0.116078559672j))*x[1]**o + ((-0.874817473807+0.884087177379j))*x[1]
        ref[(1, 2, 1, 0)]=(-0.905298161938-0.184804787113j)*x_ref[0]**o + ((-0.542955755304+0.104781995428j))*x_ref[0] + ((-0.570033233092+0.116078559672j))*x_ref[1]**o + ((-0.874817473807+0.884087177379j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.0208289284309-0.675375616734j)*x[0]**o + ((-0.3980677224+0.855962623095j))*x[0] + ((0.495178857221+0.816984671801j))*x[1]**o + ((-0.364817819817+0.746627965811j))*x[1]
        ref[(1, 2, 1, 1)]=(0.0208289284309-0.675375616734j)*x_ref[0]**o + ((-0.3980677224+0.855962623095j))*x_ref[0] + ((0.495178857221+0.816984671801j))*x_ref[1]**o + ((-0.364817819817+0.746627965811j))*x_ref[1]
        arg[(1, 2, 1, 2)]=(-0.575289776197-0.83942037929j)*x[0]**o + ((-0.928118173152-0.521196993171j))*x[0] + ((0.221657330251-0.47738695111j))*x[1]**o + ((-0.851737195677+0.926350487173j))*x[1]
        ref[(1, 2, 1, 2)]=(-0.575289776197-0.83942037929j)*x_ref[0]**o + ((-0.928118173152-0.521196993171j))*x_ref[0] + ((0.221657330251-0.47738695111j))*x_ref[1]**o + ((-0.851737195677+0.926350487173j))*x_ref[1]
        arg[(1, 2, 1, 3)]=(0.665192864595-0.618536864399j)*x[0]**o + ((0.0243259532596+0.498461762676j))*x[0] + ((-0.150298215331-0.747626503991j))*x[1]**o + ((-0.508497864241+0.400802044149j))*x[1]
        ref[(1, 2, 1, 3)]=(0.665192864595-0.618536864399j)*x_ref[0]**o + ((0.0243259532596+0.498461762676j))*x_ref[0] + ((-0.150298215331-0.747626503991j))*x_ref[1]**o + ((-0.508497864241+0.400802044149j))*x_ref[1]
        arg[(1, 2, 2, 0)]=(-0.204754487297-0.235645949028j)*x[0]**o + ((-0.219885904028-0.812334113355j))*x[0] + ((0.435798953514+0.156883181455j))*x[1]**o + ((-0.663624443433+0.320670079323j))*x[1]
        ref[(1, 2, 2, 0)]=(-0.204754487297-0.235645949028j)*x_ref[0]**o + ((-0.219885904028-0.812334113355j))*x_ref[0] + ((0.435798953514+0.156883181455j))*x_ref[1]**o + ((-0.663624443433+0.320670079323j))*x_ref[1]
        arg[(1, 2, 2, 1)]=(0.25441781303+0.264654588331j)*x[0]**o + ((0.245796446763-0.525303722005j))*x[0] + ((-0.034349851435+0.603070728598j))*x[1]**o + ((0.630920163989+0.0864072011867j))*x[1]
        ref[(1, 2, 2, 1)]=(0.25441781303+0.264654588331j)*x_ref[0]**o + ((0.245796446763-0.525303722005j))*x_ref[0] + ((-0.034349851435+0.603070728598j))*x_ref[1]**o + ((0.630920163989+0.0864072011867j))*x_ref[1]
        arg[(1, 2, 2, 2)]=(-0.904353513813-0.68974724635j)*x[0]**o + ((-0.0402380264213+0.793249663623j))*x[0] + ((-0.205541974352+0.913230524082j))*x[1]**o + ((-0.685991062879-0.579852590401j))*x[1]
        ref[(1, 2, 2, 2)]=(-0.904353513813-0.68974724635j)*x_ref[0]**o + ((-0.0402380264213+0.793249663623j))*x_ref[0] + ((-0.205541974352+0.913230524082j))*x_ref[1]**o + ((-0.685991062879-0.579852590401j))*x_ref[1]
        arg[(1, 2, 2, 3)]=(-0.0172732968687+0.577925942491j)*x[0]**o + ((0.566699575355+0.881026872555j))*x[0] + ((-0.855165936131+0.753348940692j))*x[1]**o + ((0.47316144008+0.195908351105j))*x[1]
        ref[(1, 2, 2, 3)]=(-0.0172732968687+0.577925942491j)*x_ref[0]**o + ((0.566699575355+0.881026872555j))*x_ref[0] + ((-0.855165936131+0.753348940692j))*x_ref[1]**o + ((0.47316144008+0.195908351105j))*x_ref[1]
        arg[(1, 2, 3, 0)]=(-0.916081583649-0.805670108441j)*x[0]**o + ((0.92975077576+0.00312513977995j))*x[0] + ((-0.907044192604-0.0297593029665j))*x[1]**o + ((0.315012245332-0.488349946863j))*x[1]
        ref[(1, 2, 3, 0)]=(-0.916081583649-0.805670108441j)*x_ref[0]**o + ((0.92975077576+0.00312513977995j))*x_ref[0] + ((-0.907044192604-0.0297593029665j))*x_ref[1]**o + ((0.315012245332-0.488349946863j))*x_ref[1]
        arg[(1, 2, 3, 1)]=(0.859528877963+0.985549360931j)*x[0]**o + ((-0.100380161218-0.733872212439j))*x[0] + ((0.903908493331+0.973085744057j))*x[1]**o + ((-0.261406763888-0.00941417243069j))*x[1]
        ref[(1, 2, 3, 1)]=(0.859528877963+0.985549360931j)*x_ref[0]**o + ((-0.100380161218-0.733872212439j))*x_ref[0] + ((0.903908493331+0.973085744057j))*x_ref[1]**o + ((-0.261406763888-0.00941417243069j))*x_ref[1]
        arg[(1, 2, 3, 2)]=(0.972247328181-0.35104827231j)*x[0]**o + ((0.411277782273+0.141598427134j))*x[0] + ((-0.243271605745+0.290059815315j))*x[1]**o + ((-0.66881198429-0.605424331487j))*x[1]
        ref[(1, 2, 3, 2)]=(0.972247328181-0.35104827231j)*x_ref[0]**o + ((0.411277782273+0.141598427134j))*x_ref[0] + ((-0.243271605745+0.290059815315j))*x_ref[1]**o + ((-0.66881198429-0.605424331487j))*x_ref[1]
        arg[(1, 2, 3, 3)]=(-0.884442392461-0.122262817478j)*x[0]**o + ((0.692555280167+0.644605635143j))*x[0] + ((0.485805226916+0.112578791348j))*x[1]**o + ((0.549494298747-0.984819156093j))*x[1]
        ref[(1, 2, 3, 3)]=(-0.884442392461-0.122262817478j)*x_ref[0]**o + ((0.692555280167+0.644605635143j))*x_ref[0] + ((0.485805226916+0.112578791348j))*x_ref[1]**o + ((0.549494298747-0.984819156093j))*x_ref[1]
        arg[(1, 3, 0, 0)]=(-0.22130355095-0.519043232623j)*x[0]**o + ((0.796957653735+0.148024909553j))*x[0] + ((0.214879056474+0.684492431409j))*x[1]**o + ((0.613543657475+0.601111593491j))*x[1]
        ref[(1, 3, 0, 0)]=(-0.22130355095-0.519043232623j)*x_ref[0]**o + ((0.796957653735+0.148024909553j))*x_ref[0] + ((0.214879056474+0.684492431409j))*x_ref[1]**o + ((0.613543657475+0.601111593491j))*x_ref[1]
        arg[(1, 3, 0, 1)]=(-0.974076151433+0.0021409818072j)*x[0]**o + ((0.401217458575+0.772022700148j))*x[0] + ((0.804971675808-0.582272697764j))*x[1]**o + ((0.535911612768+0.708469065946j))*x[1]
        ref[(1, 3, 0, 1)]=(-0.974076151433+0.0021409818072j)*x_ref[0]**o + ((0.401217458575+0.772022700148j))*x_ref[0] + ((0.804971675808-0.582272697764j))*x_ref[1]**o + ((0.535911612768+0.708469065946j))*x_ref[1]
        arg[(1, 3, 0, 2)]=(0.632185961289+0.530993575142j)*x[0]**o + ((0.80377122806-0.0699965522673j))*x[0] + ((0.904405878944-0.754117429996j))*x[1]**o + ((0.952214129384+0.377276878743j))*x[1]
        ref[(1, 3, 0, 2)]=(0.632185961289+0.530993575142j)*x_ref[0]**o + ((0.80377122806-0.0699965522673j))*x_ref[0] + ((0.904405878944-0.754117429996j))*x_ref[1]**o + ((0.952214129384+0.377276878743j))*x_ref[1]
        arg[(1, 3, 0, 3)]=(0.529590973529+0.943936956897j)*x[0]**o + ((-0.706098871726-0.266271477872j))*x[0] + ((0.714293957867-0.233208293829j))*x[1]**o + ((0.17186131837+0.161253424809j))*x[1]
        ref[(1, 3, 0, 3)]=(0.529590973529+0.943936956897j)*x_ref[0]**o + ((-0.706098871726-0.266271477872j))*x_ref[0] + ((0.714293957867-0.233208293829j))*x_ref[1]**o + ((0.17186131837+0.161253424809j))*x_ref[1]
        arg[(1, 3, 1, 0)]=(-0.692828554845+0.981030350029j)*x[0]**o + ((0.388084772494+0.923675083273j))*x[0] + ((-0.721281397848-0.391724721977j))*x[1]**o + ((0.542287648611+0.0926747199474j))*x[1]
        ref[(1, 3, 1, 0)]=(-0.692828554845+0.981030350029j)*x_ref[0]**o + ((0.388084772494+0.923675083273j))*x_ref[0] + ((-0.721281397848-0.391724721977j))*x_ref[1]**o + ((0.542287648611+0.0926747199474j))*x_ref[1]
        arg[(1, 3, 1, 1)]=(-0.72399403529-0.691307163202j)*x[0]**o + ((0.266616255231+0.184261279714j))*x[0] + ((-0.174100284547+0.705618128167j))*x[1]**o + ((-0.0418641261751-0.0351932588028j))*x[1]
        ref[(1, 3, 1, 1)]=(-0.72399403529-0.691307163202j)*x_ref[0]**o + ((0.266616255231+0.184261279714j))*x_ref[0] + ((-0.174100284547+0.705618128167j))*x_ref[1]**o + ((-0.0418641261751-0.0351932588028j))*x_ref[1]
        arg[(1, 3, 1, 2)]=(0.496359722414-0.0236903395777j)*x[0]**o + ((0.545472297866+0.134345691081j))*x[0] + ((0.473708019536-0.823713804311j))*x[1]**o + ((-0.587808453515-0.768298058272j))*x[1]
        ref[(1, 3, 1, 2)]=(0.496359722414-0.0236903395777j)*x_ref[0]**o + ((0.545472297866+0.134345691081j))*x_ref[0] + ((0.473708019536-0.823713804311j))*x_ref[1]**o + ((-0.587808453515-0.768298058272j))*x_ref[1]
        arg[(1, 3, 1, 3)]=(-0.647111948192-0.221613301787j)*x[0]**o + ((-0.056868215165+0.0478632355361j))*x[0] + ((-0.948492398238+0.885158477721j))*x[1]**o + ((-0.660058039971-0.838543377988j))*x[1]
        ref[(1, 3, 1, 3)]=(-0.647111948192-0.221613301787j)*x_ref[0]**o + ((-0.056868215165+0.0478632355361j))*x_ref[0] + ((-0.948492398238+0.885158477721j))*x_ref[1]**o + ((-0.660058039971-0.838543377988j))*x_ref[1]
        arg[(1, 3, 2, 0)]=(0.960870195722+0.30311716111j)*x[0]**o + ((0.372575465706-0.501171388939j))*x[0] + ((-0.475078757307+0.999064232991j))*x[1]**o + ((-0.955493637382+0.941098579371j))*x[1]
        ref[(1, 3, 2, 0)]=(0.960870195722+0.30311716111j)*x_ref[0]**o + ((0.372575465706-0.501171388939j))*x_ref[0] + ((-0.475078757307+0.999064232991j))*x_ref[1]**o + ((-0.955493637382+0.941098579371j))*x_ref[1]
        arg[(1, 3, 2, 1)]=(-0.507332326318-0.465257016495j)*x[0]**o + ((0.016633732761+0.196763349767j))*x[0] + ((0.181359195324+0.318858155109j))*x[1]**o + ((-0.926394517083-0.549098700906j))*x[1]
        ref[(1, 3, 2, 1)]=(-0.507332326318-0.465257016495j)*x_ref[0]**o + ((0.016633732761+0.196763349767j))*x_ref[0] + ((0.181359195324+0.318858155109j))*x_ref[1]**o + ((-0.926394517083-0.549098700906j))*x_ref[1]
        arg[(1, 3, 2, 2)]=(-0.0288803610833+0.888674420747j)*x[0]**o + ((0.556277730967+0.577240641735j))*x[0] + ((0.75188534214+0.344351802371j))*x[1]**o + ((-0.335047273205-0.246346305738j))*x[1]
        ref[(1, 3, 2, 2)]=(-0.0288803610833+0.888674420747j)*x_ref[0]**o + ((0.556277730967+0.577240641735j))*x_ref[0] + ((0.75188534214+0.344351802371j))*x_ref[1]**o + ((-0.335047273205-0.246346305738j))*x_ref[1]
        arg[(1, 3, 2, 3)]=(0.993399308952+0.594109344007j)*x[0]**o + ((-0.711207799299-0.440218413022j))*x[0] + ((0.821288068378+0.604874440985j))*x[1]**o + ((0.0569344599184-0.605282966425j))*x[1]
        ref[(1, 3, 2, 3)]=(0.993399308952+0.594109344007j)*x_ref[0]**o + ((-0.711207799299-0.440218413022j))*x_ref[0] + ((0.821288068378+0.604874440985j))*x_ref[1]**o + ((0.0569344599184-0.605282966425j))*x_ref[1]
        arg[(1, 3, 3, 0)]=(0.0884423802631-0.943952350266j)*x[0]**o + ((0.97753696291+0.960655620069j))*x[0] + ((-0.112963283812-0.301497165067j))*x[1]**o + ((0.907441704979-0.798232689894j))*x[1]
        ref[(1, 3, 3, 0)]=(0.0884423802631-0.943952350266j)*x_ref[0]**o + ((0.97753696291+0.960655620069j))*x_ref[0] + ((-0.112963283812-0.301497165067j))*x_ref[1]**o + ((0.907441704979-0.798232689894j))*x_ref[1]
        arg[(1, 3, 3, 1)]=(0.229360410114+0.561731081056j)*x[0]**o + ((-0.379715098842-0.415414777189j))*x[0] + ((-0.735714796396-0.96144261529j))*x[1]**o + ((0.159713573416-0.197338225796j))*x[1]
        ref[(1, 3, 3, 1)]=(0.229360410114+0.561731081056j)*x_ref[0]**o + ((-0.379715098842-0.415414777189j))*x_ref[0] + ((-0.735714796396-0.96144261529j))*x_ref[1]**o + ((0.159713573416-0.197338225796j))*x_ref[1]
        arg[(1, 3, 3, 2)]=(-0.230145322979+0.0964353536371j)*x[0]**o + ((-0.820991915317+0.148024594153j))*x[0] + ((0.357905645199-0.71959781632j))*x[1]**o + ((-0.563592969034-0.529308102981j))*x[1]
        ref[(1, 3, 3, 2)]=(-0.230145322979+0.0964353536371j)*x_ref[0]**o + ((-0.820991915317+0.148024594153j))*x_ref[0] + ((0.357905645199-0.71959781632j))*x_ref[1]**o + ((-0.563592969034-0.529308102981j))*x_ref[1]
        arg[(1, 3, 3, 3)]=(0.365751980906+0.755767195392j)*x[0]**o + ((0.416992381125+0.243103838428j))*x[0] + ((0.756152244164+0.987029988534j))*x[1]**o + ((-0.0452205671977-0.370006558733j))*x[1]
        ref[(1, 3, 3, 3)]=(0.365751980906+0.755767195392j)*x_ref[0]**o + ((0.416992381125+0.243103838428j))*x_ref[0] + ((0.756152244164+0.987029988534j))*x_ref[1]**o + ((-0.0452205671977-0.370006558733j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.74885119743+0.636862742055j)*x[0]**o + ((-0.0694046241919-0.163615228641j))*x[0] + ((-0.407824742607+0.408202435913j))*x[1]**o + ((-0.737278469101-0.794831921707j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.74885119743+0.636862742055j)*x_ref[0]**o + ((-0.0694046241919-0.163615228641j))*x_ref[0] + ((-0.407824742607+0.408202435913j))*x_ref[1]**o + ((-0.737278469101-0.794831921707j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(0.784634947619-0.25949287143j)*x[0]**o + ((-0.816065233966-0.594916781879j))*x[0] + ((0.718930858083+0.768087421065j))*x[1]**o + ((0.730864862498+0.998932229506j))*x[1]
        ref[(2, 0, 0, 1)]=(0.784634947619-0.25949287143j)*x_ref[0]**o + ((-0.816065233966-0.594916781879j))*x_ref[0] + ((0.718930858083+0.768087421065j))*x_ref[1]**o + ((0.730864862498+0.998932229506j))*x_ref[1]
        arg[(2, 0, 0, 2)]=(-0.108138816871+0.107495056478j)*x[0]**o + ((0.954563447757-0.526080967365j))*x[0] + ((-0.728889773982-0.573491782352j))*x[1]**o + ((-0.614740429896-0.231491762597j))*x[1]
        ref[(2, 0, 0, 2)]=(-0.108138816871+0.107495056478j)*x_ref[0]**o + ((0.954563447757-0.526080967365j))*x_ref[0] + ((-0.728889773982-0.573491782352j))*x_ref[1]**o + ((-0.614740429896-0.231491762597j))*x_ref[1]
        arg[(2, 0, 0, 3)]=(-0.795076185233-0.102207482555j)*x[0]**o + ((-0.465282745489+0.162355011846j))*x[0] + ((0.521954381913+0.410694654867j))*x[1]**o + ((-0.958961461674-0.407975687386j))*x[1]
        ref[(2, 0, 0, 3)]=(-0.795076185233-0.102207482555j)*x_ref[0]**o + ((-0.465282745489+0.162355011846j))*x_ref[0] + ((0.521954381913+0.410694654867j))*x_ref[1]**o + ((-0.958961461674-0.407975687386j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(-0.82569753816+0.293799188319j)*x[0]**o + ((0.471675084594-0.17956251451j))*x[0] + ((-0.51420273712-0.606575920619j))*x[1]**o + ((0.326971697465-0.940217706248j))*x[1]
        ref[(2, 0, 1, 0)]=(-0.82569753816+0.293799188319j)*x_ref[0]**o + ((0.471675084594-0.17956251451j))*x_ref[0] + ((-0.51420273712-0.606575920619j))*x_ref[1]**o + ((0.326971697465-0.940217706248j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.72290800756+0.795547993606j)*x[0]**o + ((-0.30302576457-0.794462879554j))*x[0] + ((-0.843936785013+0.211060545004j))*x[1]**o + ((0.305809222315+0.577206254071j))*x[1]
        ref[(2, 0, 1, 1)]=(0.72290800756+0.795547993606j)*x_ref[0]**o + ((-0.30302576457-0.794462879554j))*x_ref[0] + ((-0.843936785013+0.211060545004j))*x_ref[1]**o + ((0.305809222315+0.577206254071j))*x_ref[1]
        arg[(2, 0, 1, 2)]=(-0.133313058554+0.828908822892j)*x[0]**o + ((-0.712586653399+0.00723711223294j))*x[0] + ((0.528518081081+0.0749527630033j))*x[1]**o + ((0.0650392835786+0.0677478194905j))*x[1]
        ref[(2, 0, 1, 2)]=(-0.133313058554+0.828908822892j)*x_ref[0]**o + ((-0.712586653399+0.00723711223294j))*x_ref[0] + ((0.528518081081+0.0749527630033j))*x_ref[1]**o + ((0.0650392835786+0.0677478194905j))*x_ref[1]
        arg[(2, 0, 1, 3)]=(-0.219925459085-0.660287690763j)*x[0]**o + ((0.0278280125276-0.69164944933j))*x[0] + ((-0.793927247828-0.205744424681j))*x[1]**o + ((0.913664328505-0.694422631961j))*x[1]
        ref[(2, 0, 1, 3)]=(-0.219925459085-0.660287690763j)*x_ref[0]**o + ((0.0278280125276-0.69164944933j))*x_ref[0] + ((-0.793927247828-0.205744424681j))*x_ref[1]**o + ((0.913664328505-0.694422631961j))*x_ref[1]
        arg[(2, 0, 2, 0)]=(-0.539020571847+0.306472951119j)*x[0]**o + ((0.0812978395126-0.17721622874j))*x[0] + ((0.176609503428+0.312340138027j))*x[1]**o + ((-0.144057425899-0.307499679697j))*x[1]
        ref[(2, 0, 2, 0)]=(-0.539020571847+0.306472951119j)*x_ref[0]**o + ((0.0812978395126-0.17721622874j))*x_ref[0] + ((0.176609503428+0.312340138027j))*x_ref[1]**o + ((-0.144057425899-0.307499679697j))*x_ref[1]
        arg[(2, 0, 2, 1)]=(0.050249119734+0.861578442319j)*x[0]**o + ((-0.855185799029+0.422638757954j))*x[0] + ((-0.96695635963-0.0361863309799j))*x[1]**o + ((-0.441306608074+0.65969732827j))*x[1]
        ref[(2, 0, 2, 1)]=(0.050249119734+0.861578442319j)*x_ref[0]**o + ((-0.855185799029+0.422638757954j))*x_ref[0] + ((-0.96695635963-0.0361863309799j))*x_ref[1]**o + ((-0.441306608074+0.65969732827j))*x_ref[1]
        arg[(2, 0, 2, 2)]=(-0.347226624858-0.706772451888j)*x[0]**o + ((-0.952333778392-0.786521322029j))*x[0] + ((-0.179695425314+0.446027164734j))*x[1]**o + ((-0.869400591299+0.941789564534j))*x[1]
        ref[(2, 0, 2, 2)]=(-0.347226624858-0.706772451888j)*x_ref[0]**o + ((-0.952333778392-0.786521322029j))*x_ref[0] + ((-0.179695425314+0.446027164734j))*x_ref[1]**o + ((-0.869400591299+0.941789564534j))*x_ref[1]
        arg[(2, 0, 2, 3)]=(-0.37483204586+0.678243232405j)*x[0]**o + ((0.563267250094+0.273107297133j))*x[0] + ((-0.516132549871-0.691936665435j))*x[1]**o + ((0.143403973951+0.154218177864j))*x[1]
        ref[(2, 0, 2, 3)]=(-0.37483204586+0.678243232405j)*x_ref[0]**o + ((0.563267250094+0.273107297133j))*x_ref[0] + ((-0.516132549871-0.691936665435j))*x_ref[1]**o + ((0.143403973951+0.154218177864j))*x_ref[1]
        arg[(2, 0, 3, 0)]=(0.768473904902-0.0742978688829j)*x[0]**o + ((-0.50807765068+0.789959200002j))*x[0] + ((0.677189026949+0.348974624493j))*x[1]**o + ((0.0636850471442-0.319207319786j))*x[1]
        ref[(2, 0, 3, 0)]=(0.768473904902-0.0742978688829j)*x_ref[0]**o + ((-0.50807765068+0.789959200002j))*x_ref[0] + ((0.677189026949+0.348974624493j))*x_ref[1]**o + ((0.0636850471442-0.319207319786j))*x_ref[1]
        arg[(2, 0, 3, 1)]=(-0.258180937636+0.254698216305j)*x[0]**o + ((-0.818314597667-0.23548299298j))*x[0] + ((0.515640353927+0.49504535891j))*x[1]**o + ((-0.198263107521+0.923514566675j))*x[1]
        ref[(2, 0, 3, 1)]=(-0.258180937636+0.254698216305j)*x_ref[0]**o + ((-0.818314597667-0.23548299298j))*x_ref[0] + ((0.515640353927+0.49504535891j))*x_ref[1]**o + ((-0.198263107521+0.923514566675j))*x_ref[1]
        arg[(2, 0, 3, 2)]=(-0.721761604989-0.528479291915j)*x[0]**o + ((-0.688308159007+0.798156740914j))*x[0] + ((0.839667816521+0.00852307469338j))*x[1]**o + ((0.637948314279+0.947535183809j))*x[1]
        ref[(2, 0, 3, 2)]=(-0.721761604989-0.528479291915j)*x_ref[0]**o + ((-0.688308159007+0.798156740914j))*x_ref[0] + ((0.839667816521+0.00852307469338j))*x_ref[1]**o + ((0.637948314279+0.947535183809j))*x_ref[1]
        arg[(2, 0, 3, 3)]=(0.346361988079-0.984224391922j)*x[0]**o + ((0.977013997378-0.294139691894j))*x[0] + ((-0.652904828164+0.0417851572768j))*x[1]**o + ((0.286200205942-0.940127957298j))*x[1]
        ref[(2, 0, 3, 3)]=(0.346361988079-0.984224391922j)*x_ref[0]**o + ((0.977013997378-0.294139691894j))*x_ref[0] + ((-0.652904828164+0.0417851572768j))*x_ref[1]**o + ((0.286200205942-0.940127957298j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(0.117605291382-0.171684116769j)*x[0]**o + ((0.862554899076+0.719050743762j))*x[0] + ((-0.0950705389502+0.0709468579907j))*x[1]**o + ((0.0182347706223+0.930671475503j))*x[1]
        ref[(2, 1, 0, 0)]=(0.117605291382-0.171684116769j)*x_ref[0]**o + ((0.862554899076+0.719050743762j))*x_ref[0] + ((-0.0950705389502+0.0709468579907j))*x_ref[1]**o + ((0.0182347706223+0.930671475503j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.309073801246+0.724595984318j)*x[0]**o + ((-0.237072540376-0.50096502803j))*x[0] + ((-0.702596097854+0.611243308258j))*x[1]**o + ((0.990522101029-0.493975039583j))*x[1]
        ref[(2, 1, 0, 1)]=(0.309073801246+0.724595984318j)*x_ref[0]**o + ((-0.237072540376-0.50096502803j))*x_ref[0] + ((-0.702596097854+0.611243308258j))*x_ref[1]**o + ((0.990522101029-0.493975039583j))*x_ref[1]
        arg[(2, 1, 0, 2)]=(0.979111982504-0.733611746307j)*x[0]**o + ((0.637960568317+0.724945098254j))*x[0] + ((-0.610833933017-0.346512827401j))*x[1]**o + ((-0.636436383258+0.524816952658j))*x[1]
        ref[(2, 1, 0, 2)]=(0.979111982504-0.733611746307j)*x_ref[0]**o + ((0.637960568317+0.724945098254j))*x_ref[0] + ((-0.610833933017-0.346512827401j))*x_ref[1]**o + ((-0.636436383258+0.524816952658j))*x_ref[1]
        arg[(2, 1, 0, 3)]=(-0.14736466705-0.250188455663j)*x[0]**o + ((0.663054327233+0.329374729815j))*x[0] + ((-0.0374542631466-0.72727861568j))*x[1]**o + ((0.570559481464-0.319291152909j))*x[1]
        ref[(2, 1, 0, 3)]=(-0.14736466705-0.250188455663j)*x_ref[0]**o + ((0.663054327233+0.329374729815j))*x_ref[0] + ((-0.0374542631466-0.72727861568j))*x_ref[1]**o + ((0.570559481464-0.319291152909j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(0.722992025534-0.19216740136j)*x[0]**o + ((0.139105312108-0.155038231958j))*x[0] + ((0.128704782099-0.374078511401j))*x[1]**o + ((-0.913252125072+0.641876828287j))*x[1]
        ref[(2, 1, 1, 0)]=(0.722992025534-0.19216740136j)*x_ref[0]**o + ((0.139105312108-0.155038231958j))*x_ref[0] + ((0.128704782099-0.374078511401j))*x_ref[1]**o + ((-0.913252125072+0.641876828287j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(0.670550355298+0.548612818015j)*x[0]**o + ((0.430925341862+0.580463905326j))*x[0] + ((0.844060505115-0.248368913804j))*x[1]**o + ((0.700462656264+0.601156335211j))*x[1]
        ref[(2, 1, 1, 1)]=(0.670550355298+0.548612818015j)*x_ref[0]**o + ((0.430925341862+0.580463905326j))*x_ref[0] + ((0.844060505115-0.248368913804j))*x_ref[1]**o + ((0.700462656264+0.601156335211j))*x_ref[1]
        arg[(2, 1, 1, 2)]=(0.822496635596-0.661763426754j)*x[0]**o + ((-0.036070800432+0.213739134939j))*x[0] + ((-0.0408994227474-0.147013839787j))*x[1]**o + ((-0.491733932559+0.459359016559j))*x[1]
        ref[(2, 1, 1, 2)]=(0.822496635596-0.661763426754j)*x_ref[0]**o + ((-0.036070800432+0.213739134939j))*x_ref[0] + ((-0.0408994227474-0.147013839787j))*x_ref[1]**o + ((-0.491733932559+0.459359016559j))*x_ref[1]
        arg[(2, 1, 1, 3)]=(-0.844396594114+0.894284644525j)*x[0]**o + ((-0.33749213926+0.1493523566j))*x[0] + ((0.594634992668-0.2182059253j))*x[1]**o + ((0.459369456775-0.627454201948j))*x[1]
        ref[(2, 1, 1, 3)]=(-0.844396594114+0.894284644525j)*x_ref[0]**o + ((-0.33749213926+0.1493523566j))*x_ref[0] + ((0.594634992668-0.2182059253j))*x_ref[1]**o + ((0.459369456775-0.627454201948j))*x_ref[1]
        arg[(2, 1, 2, 0)]=(-0.440682266089-0.796564388182j)*x[0]**o + ((0.359857355609-0.0218289542962j))*x[0] + ((0.424091762719-0.0815252735619j))*x[1]**o + ((0.844982380438+0.264597453228j))*x[1]
        ref[(2, 1, 2, 0)]=(-0.440682266089-0.796564388182j)*x_ref[0]**o + ((0.359857355609-0.0218289542962j))*x_ref[0] + ((0.424091762719-0.0815252735619j))*x_ref[1]**o + ((0.844982380438+0.264597453228j))*x_ref[1]
        arg[(2, 1, 2, 1)]=(-0.14141205341+0.0465890453846j)*x[0]**o + ((0.454998358292-0.664116844579j))*x[0] + ((0.23048808852+0.340516421761j))*x[1]**o + ((-0.763236438924-0.555830395028j))*x[1]
        ref[(2, 1, 2, 1)]=(-0.14141205341+0.0465890453846j)*x_ref[0]**o + ((0.454998358292-0.664116844579j))*x_ref[0] + ((0.23048808852+0.340516421761j))*x_ref[1]**o + ((-0.763236438924-0.555830395028j))*x_ref[1]
        arg[(2, 1, 2, 2)]=(-0.19989723251+0.536894586443j)*x[0]**o + ((0.904571627297+0.252769145507j))*x[0] + ((0.48262151982+0.745498179472j))*x[1]**o + ((-0.653831900422+0.540604166213j))*x[1]
        ref[(2, 1, 2, 2)]=(-0.19989723251+0.536894586443j)*x_ref[0]**o + ((0.904571627297+0.252769145507j))*x_ref[0] + ((0.48262151982+0.745498179472j))*x_ref[1]**o + ((-0.653831900422+0.540604166213j))*x_ref[1]
        arg[(2, 1, 2, 3)]=(-0.174092323395+0.82357160075j)*x[0]**o + ((-0.161739684476-0.356392260773j))*x[0] + ((0.778367146919-0.220258913004j))*x[1]**o + ((-0.605729381112+0.549050655704j))*x[1]
        ref[(2, 1, 2, 3)]=(-0.174092323395+0.82357160075j)*x_ref[0]**o + ((-0.161739684476-0.356392260773j))*x_ref[0] + ((0.778367146919-0.220258913004j))*x_ref[1]**o + ((-0.605729381112+0.549050655704j))*x_ref[1]
        arg[(2, 1, 3, 0)]=(0.874755109722-0.714725950428j)*x[0]**o + ((-0.752732896947-0.663380302443j))*x[0] + ((-0.512087806204-0.843644965246j))*x[1]**o + ((-0.639999547286+0.455613167037j))*x[1]
        ref[(2, 1, 3, 0)]=(0.874755109722-0.714725950428j)*x_ref[0]**o + ((-0.752732896947-0.663380302443j))*x_ref[0] + ((-0.512087806204-0.843644965246j))*x_ref[1]**o + ((-0.639999547286+0.455613167037j))*x_ref[1]
        arg[(2, 1, 3, 1)]=(-0.947822882103+0.418877990231j)*x[0]**o + ((-0.705935539194-0.974383868773j))*x[0] + ((-0.542478287132-0.0655482951906j))*x[1]**o + ((-0.492633445529-0.357157065824j))*x[1]
        ref[(2, 1, 3, 1)]=(-0.947822882103+0.418877990231j)*x_ref[0]**o + ((-0.705935539194-0.974383868773j))*x_ref[0] + ((-0.542478287132-0.0655482951906j))*x_ref[1]**o + ((-0.492633445529-0.357157065824j))*x_ref[1]
        arg[(2, 1, 3, 2)]=(-0.135172012889+0.181122167738j)*x[0]**o + ((0.389764650845-0.769640361022j))*x[0] + ((0.424538702619-0.189609515725j))*x[1]**o + ((0.228600465704+0.164683442078j))*x[1]
        ref[(2, 1, 3, 2)]=(-0.135172012889+0.181122167738j)*x_ref[0]**o + ((0.389764650845-0.769640361022j))*x_ref[0] + ((0.424538702619-0.189609515725j))*x_ref[1]**o + ((0.228600465704+0.164683442078j))*x_ref[1]
        arg[(2, 1, 3, 3)]=(0.810121073175+0.174125269563j)*x[0]**o + ((-0.317754162378-0.464334615111j))*x[0] + ((-0.271810819253+0.706012638451j))*x[1]**o + ((0.695315955943+0.347911105733j))*x[1]
        ref[(2, 1, 3, 3)]=(0.810121073175+0.174125269563j)*x_ref[0]**o + ((-0.317754162378-0.464334615111j))*x_ref[0] + ((-0.271810819253+0.706012638451j))*x_ref[1]**o + ((0.695315955943+0.347911105733j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(0.758611107666-0.0767655764729j)*x[0]**o + ((0.939292807166-0.947325197795j))*x[0] + ((0.156165715711-0.301635015353j))*x[1]**o + ((-0.505998485699-0.493062219299j))*x[1]
        ref[(2, 2, 0, 0)]=(0.758611107666-0.0767655764729j)*x_ref[0]**o + ((0.939292807166-0.947325197795j))*x_ref[0] + ((0.156165715711-0.301635015353j))*x_ref[1]**o + ((-0.505998485699-0.493062219299j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(-0.903599321506+0.872416291772j)*x[0]**o + ((0.458092860839+0.573913465104j))*x[0] + ((0.176413004738-0.408025731213j))*x[1]**o + ((-0.868066502987+0.404004769271j))*x[1]
        ref[(2, 2, 0, 1)]=(-0.903599321506+0.872416291772j)*x_ref[0]**o + ((0.458092860839+0.573913465104j))*x_ref[0] + ((0.176413004738-0.408025731213j))*x_ref[1]**o + ((-0.868066502987+0.404004769271j))*x_ref[1]
        arg[(2, 2, 0, 2)]=(0.517345045102+0.253120904605j)*x[0]**o + ((-0.0500841784983+0.758669849981j))*x[0] + ((0.442622332589+0.412149985795j))*x[1]**o + ((-0.90024141112-0.652237050174j))*x[1]
        ref[(2, 2, 0, 2)]=(0.517345045102+0.253120904605j)*x_ref[0]**o + ((-0.0500841784983+0.758669849981j))*x_ref[0] + ((0.442622332589+0.412149985795j))*x_ref[1]**o + ((-0.90024141112-0.652237050174j))*x_ref[1]
        arg[(2, 2, 0, 3)]=(0.720666003522-0.690599719491j)*x[0]**o + ((-0.713206417226+0.980572823959j))*x[0] + ((-0.160835004742-0.595890798958j))*x[1]**o + ((0.730365437485-0.48797095542j))*x[1]
        ref[(2, 2, 0, 3)]=(0.720666003522-0.690599719491j)*x_ref[0]**o + ((-0.713206417226+0.980572823959j))*x_ref[0] + ((-0.160835004742-0.595890798958j))*x_ref[1]**o + ((0.730365437485-0.48797095542j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(0.043426318253-0.0559245738154j)*x[0]**o + ((0.839067116946+0.0655813391195j))*x[0] + ((0.552429666179-0.969941686691j))*x[1]**o + ((-0.0614429569648-0.138149328442j))*x[1]
        ref[(2, 2, 1, 0)]=(0.043426318253-0.0559245738154j)*x_ref[0]**o + ((0.839067116946+0.0655813391195j))*x_ref[0] + ((0.552429666179-0.969941686691j))*x_ref[1]**o + ((-0.0614429569648-0.138149328442j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(0.643707876113-0.971594711986j)*x[0]**o + ((0.597631814013+0.746391823457j))*x[0] + ((0.167077839483-0.162514674964j))*x[1]**o + ((0.0887478539273-0.575075780517j))*x[1]
        ref[(2, 2, 1, 1)]=(0.643707876113-0.971594711986j)*x_ref[0]**o + ((0.597631814013+0.746391823457j))*x_ref[0] + ((0.167077839483-0.162514674964j))*x_ref[1]**o + ((0.0887478539273-0.575075780517j))*x_ref[1]
        arg[(2, 2, 1, 2)]=(0.926589863573-0.106121016766j)*x[0]**o + ((0.107697513407+0.515030009946j))*x[0] + ((-0.262762986575-0.817488396911j))*x[1]**o + ((0.819652000945-0.0599750643224j))*x[1]
        ref[(2, 2, 1, 2)]=(0.926589863573-0.106121016766j)*x_ref[0]**o + ((0.107697513407+0.515030009946j))*x_ref[0] + ((-0.262762986575-0.817488396911j))*x_ref[1]**o + ((0.819652000945-0.0599750643224j))*x_ref[1]
        arg[(2, 2, 1, 3)]=(-0.571187350515+0.959125997266j)*x[0]**o + ((-0.897587305312+0.975274137351j))*x[0] + ((0.154398627163+0.0403127247868j))*x[1]**o + ((0.817848584447-0.820565099424j))*x[1]
        ref[(2, 2, 1, 3)]=(-0.571187350515+0.959125997266j)*x_ref[0]**o + ((-0.897587305312+0.975274137351j))*x_ref[0] + ((0.154398627163+0.0403127247868j))*x_ref[1]**o + ((0.817848584447-0.820565099424j))*x_ref[1]
        arg[(2, 2, 2, 0)]=(0.879822900021-0.720625153847j)*x[0]**o + ((-0.381613501186+0.584967757656j))*x[0] + ((-0.35657901531-0.545228169051j))*x[1]**o + ((0.78804479755+0.877124045432j))*x[1]
        ref[(2, 2, 2, 0)]=(0.879822900021-0.720625153847j)*x_ref[0]**o + ((-0.381613501186+0.584967757656j))*x_ref[0] + ((-0.35657901531-0.545228169051j))*x_ref[1]**o + ((0.78804479755+0.877124045432j))*x_ref[1]
        arg[(2, 2, 2, 1)]=(0.116175377246+0.11733129744j)*x[0]**o + ((0.25514995917-0.86790607057j))*x[0] + ((-0.269511700919+0.266118174535j))*x[1]**o + ((-0.341937385322-0.750006910581j))*x[1]
        ref[(2, 2, 2, 1)]=(0.116175377246+0.11733129744j)*x_ref[0]**o + ((0.25514995917-0.86790607057j))*x_ref[0] + ((-0.269511700919+0.266118174535j))*x_ref[1]**o + ((-0.341937385322-0.750006910581j))*x_ref[1]
        arg[(2, 2, 2, 2)]=(-0.864042226607+0.924415742261j)*x[0]**o + ((-0.262560602129-0.344927858663j))*x[0] + ((0.323131018853-0.886294455705j))*x[1]**o + ((0.962563192523-0.810977054659j))*x[1]
        ref[(2, 2, 2, 2)]=(-0.864042226607+0.924415742261j)*x_ref[0]**o + ((-0.262560602129-0.344927858663j))*x_ref[0] + ((0.323131018853-0.886294455705j))*x_ref[1]**o + ((0.962563192523-0.810977054659j))*x_ref[1]
        arg[(2, 2, 2, 3)]=(0.365156274204+0.860489184076j)*x[0]**o + ((0.125888265356+0.342280124626j))*x[0] + ((-0.584558637802+0.604156007565j))*x[1]**o + ((-0.596044142768+0.905359496133j))*x[1]
        ref[(2, 2, 2, 3)]=(0.365156274204+0.860489184076j)*x_ref[0]**o + ((0.125888265356+0.342280124626j))*x_ref[0] + ((-0.584558637802+0.604156007565j))*x_ref[1]**o + ((-0.596044142768+0.905359496133j))*x_ref[1]
        arg[(2, 2, 3, 0)]=(0.736420253642+0.552676154206j)*x[0]**o + ((-0.539135032557-0.714485437153j))*x[0] + ((-0.0854520987469-0.781490042083j))*x[1]**o + ((0.908599476296-0.437920541798j))*x[1]
        ref[(2, 2, 3, 0)]=(0.736420253642+0.552676154206j)*x_ref[0]**o + ((-0.539135032557-0.714485437153j))*x_ref[0] + ((-0.0854520987469-0.781490042083j))*x_ref[1]**o + ((0.908599476296-0.437920541798j))*x_ref[1]
        arg[(2, 2, 3, 1)]=(0.364273603006+0.171670550018j)*x[0]**o + ((-0.4842628362+0.178290294436j))*x[0] + ((0.113339877471-0.488736188897j))*x[1]**o + ((-0.208612065175-0.837043139463j))*x[1]
        ref[(2, 2, 3, 1)]=(0.364273603006+0.171670550018j)*x_ref[0]**o + ((-0.4842628362+0.178290294436j))*x_ref[0] + ((0.113339877471-0.488736188897j))*x_ref[1]**o + ((-0.208612065175-0.837043139463j))*x_ref[1]
        arg[(2, 2, 3, 2)]=(0.112699652932-0.142239528265j)*x[0]**o + ((-0.262231592869+0.845455549423j))*x[0] + ((0.916406489678+0.776978253392j))*x[1]**o + ((-0.710837280428+0.840618090569j))*x[1]
        ref[(2, 2, 3, 2)]=(0.112699652932-0.142239528265j)*x_ref[0]**o + ((-0.262231592869+0.845455549423j))*x_ref[0] + ((0.916406489678+0.776978253392j))*x_ref[1]**o + ((-0.710837280428+0.840618090569j))*x_ref[1]
        arg[(2, 2, 3, 3)]=(0.459413253333+0.886780641027j)*x[0]**o + ((0.668569251052+0.283045191225j))*x[0] + ((0.796932521464-0.961597780188j))*x[1]**o + ((-0.0473006706112-0.492441400723j))*x[1]
        ref[(2, 2, 3, 3)]=(0.459413253333+0.886780641027j)*x_ref[0]**o + ((0.668569251052+0.283045191225j))*x_ref[0] + ((0.796932521464-0.961597780188j))*x_ref[1]**o + ((-0.0473006706112-0.492441400723j))*x_ref[1]
        arg[(2, 3, 0, 0)]=(0.773827684686-0.126933027165j)*x[0]**o + ((-0.948169654017-0.783676602646j))*x[0] + ((0.727430391827-0.944158069149j))*x[1]**o + ((0.447790634721+0.524686999504j))*x[1]
        ref[(2, 3, 0, 0)]=(0.773827684686-0.126933027165j)*x_ref[0]**o + ((-0.948169654017-0.783676602646j))*x_ref[0] + ((0.727430391827-0.944158069149j))*x_ref[1]**o + ((0.447790634721+0.524686999504j))*x_ref[1]
        arg[(2, 3, 0, 1)]=(-0.482419998677+0.610701362308j)*x[0]**o + ((0.194335396268+0.663653578325j))*x[0] + ((-0.207029695122+0.937011016355j))*x[1]**o + ((0.337691580067+0.406904748204j))*x[1]
        ref[(2, 3, 0, 1)]=(-0.482419998677+0.610701362308j)*x_ref[0]**o + ((0.194335396268+0.663653578325j))*x_ref[0] + ((-0.207029695122+0.937011016355j))*x_ref[1]**o + ((0.337691580067+0.406904748204j))*x_ref[1]
        arg[(2, 3, 0, 2)]=(0.954850593713-0.00518297929231j)*x[0]**o + ((0.977180357025-0.0875706349262j))*x[0] + ((-0.801522421131-0.206497561864j))*x[1]**o + ((0.713080671007+0.0880005232547j))*x[1]
        ref[(2, 3, 0, 2)]=(0.954850593713-0.00518297929231j)*x_ref[0]**o + ((0.977180357025-0.0875706349262j))*x_ref[0] + ((-0.801522421131-0.206497561864j))*x_ref[1]**o + ((0.713080671007+0.0880005232547j))*x_ref[1]
        arg[(2, 3, 0, 3)]=(-0.241829870265+0.794310662624j)*x[0]**o + ((-0.663226294425-0.72863430499j))*x[0] + ((0.878184069198+0.551966047796j))*x[1]**o + ((-0.859818345553-0.954448285966j))*x[1]
        ref[(2, 3, 0, 3)]=(-0.241829870265+0.794310662624j)*x_ref[0]**o + ((-0.663226294425-0.72863430499j))*x_ref[0] + ((0.878184069198+0.551966047796j))*x_ref[1]**o + ((-0.859818345553-0.954448285966j))*x_ref[1]
        arg[(2, 3, 1, 0)]=(-0.746478022786-0.539698842637j)*x[0]**o + ((0.340687189419-0.987727402466j))*x[0] + ((-0.375892402953-0.113764504169j))*x[1]**o + ((0.113576787491+0.400647786497j))*x[1]
        ref[(2, 3, 1, 0)]=(-0.746478022786-0.539698842637j)*x_ref[0]**o + ((0.340687189419-0.987727402466j))*x_ref[0] + ((-0.375892402953-0.113764504169j))*x_ref[1]**o + ((0.113576787491+0.400647786497j))*x_ref[1]
        arg[(2, 3, 1, 1)]=(0.508281368201+0.366406398227j)*x[0]**o + ((-0.49795385909-0.409191019204j))*x[0] + ((-0.865808565302-0.934304488745j))*x[1]**o + ((0.824480497903-0.127168445278j))*x[1]
        ref[(2, 3, 1, 1)]=(0.508281368201+0.366406398227j)*x_ref[0]**o + ((-0.49795385909-0.409191019204j))*x_ref[0] + ((-0.865808565302-0.934304488745j))*x_ref[1]**o + ((0.824480497903-0.127168445278j))*x_ref[1]
        arg[(2, 3, 1, 2)]=(0.965309609498-0.872903587825j)*x[0]**o + ((0.201726063038-0.280112452869j))*x[0] + ((0.214211275747+0.22760280135j))*x[1]**o + ((0.518893658807-0.977431736234j))*x[1]
        ref[(2, 3, 1, 2)]=(0.965309609498-0.872903587825j)*x_ref[0]**o + ((0.201726063038-0.280112452869j))*x_ref[0] + ((0.214211275747+0.22760280135j))*x_ref[1]**o + ((0.518893658807-0.977431736234j))*x_ref[1]
        arg[(2, 3, 1, 3)]=(0.314146844562-0.438592612968j)*x[0]**o + ((0.0401754119262+0.734541013238j))*x[0] + ((-0.412621201248-0.864258239469j))*x[1]**o + ((-0.0205340027096+0.507286599276j))*x[1]
        ref[(2, 3, 1, 3)]=(0.314146844562-0.438592612968j)*x_ref[0]**o + ((0.0401754119262+0.734541013238j))*x_ref[0] + ((-0.412621201248-0.864258239469j))*x_ref[1]**o + ((-0.0205340027096+0.507286599276j))*x_ref[1]
        arg[(2, 3, 2, 0)]=(0.0734704048507-0.325914702997j)*x[0]**o + ((0.237514231468-0.355622439783j))*x[0] + ((-0.900384391623+0.369837862467j))*x[1]**o + ((0.426632799104-0.564574284666j))*x[1]
        ref[(2, 3, 2, 0)]=(0.0734704048507-0.325914702997j)*x_ref[0]**o + ((0.237514231468-0.355622439783j))*x_ref[0] + ((-0.900384391623+0.369837862467j))*x_ref[1]**o + ((0.426632799104-0.564574284666j))*x_ref[1]
        arg[(2, 3, 2, 1)]=(-0.440262616573+0.11688824106j)*x[0]**o + ((0.914871744163+0.58644675563j))*x[0] + ((-0.30002490748+0.00379160146506j))*x[1]**o + ((-0.851468279796-0.995028817324j))*x[1]
        ref[(2, 3, 2, 1)]=(-0.440262616573+0.11688824106j)*x_ref[0]**o + ((0.914871744163+0.58644675563j))*x_ref[0] + ((-0.30002490748+0.00379160146506j))*x_ref[1]**o + ((-0.851468279796-0.995028817324j))*x_ref[1]
        arg[(2, 3, 2, 2)]=(0.912841863952+0.891992077866j)*x[0]**o + ((0.555023446617-0.157492860492j))*x[0] + ((0.028813953093+0.890579315521j))*x[1]**o + ((0.408207265862+0.799004526354j))*x[1]
        ref[(2, 3, 2, 2)]=(0.912841863952+0.891992077866j)*x_ref[0]**o + ((0.555023446617-0.157492860492j))*x_ref[0] + ((0.028813953093+0.890579315521j))*x_ref[1]**o + ((0.408207265862+0.799004526354j))*x_ref[1]
        arg[(2, 3, 2, 3)]=(-0.889979485155-0.233020961432j)*x[0]**o + ((-0.6245761751+0.242828498671j))*x[0] + ((-0.533735259444-0.690534950527j))*x[1]**o + ((0.837460012539-0.161647063124j))*x[1]
        ref[(2, 3, 2, 3)]=(-0.889979485155-0.233020961432j)*x_ref[0]**o + ((-0.6245761751+0.242828498671j))*x_ref[0] + ((-0.533735259444-0.690534950527j))*x_ref[1]**o + ((0.837460012539-0.161647063124j))*x_ref[1]
        arg[(2, 3, 3, 0)]=(-0.0652674336462-0.49858569167j)*x[0]**o + ((-0.363613921526+0.967497466135j))*x[0] + ((-0.250924007164+0.64217013294j))*x[1]**o + ((-0.738912845943+0.662606369755j))*x[1]
        ref[(2, 3, 3, 0)]=(-0.0652674336462-0.49858569167j)*x_ref[0]**o + ((-0.363613921526+0.967497466135j))*x_ref[0] + ((-0.250924007164+0.64217013294j))*x_ref[1]**o + ((-0.738912845943+0.662606369755j))*x_ref[1]
        arg[(2, 3, 3, 1)]=(-0.629969472397-0.792005182171j)*x[0]**o + ((0.586431239766-0.925477718625j))*x[0] + ((0.0544871517771-0.392514579068j))*x[1]**o + ((0.108914348185+0.772511093773j))*x[1]
        ref[(2, 3, 3, 1)]=(-0.629969472397-0.792005182171j)*x_ref[0]**o + ((0.586431239766-0.925477718625j))*x_ref[0] + ((0.0544871517771-0.392514579068j))*x_ref[1]**o + ((0.108914348185+0.772511093773j))*x_ref[1]
        arg[(2, 3, 3, 2)]=(0.318918746329-0.087003407111j)*x[0]**o + ((0.653281150025+0.528108664986j))*x[0] + ((-0.424075825063-0.700030073152j))*x[1]**o + ((0.48539914217-0.0851750962142j))*x[1]
        ref[(2, 3, 3, 2)]=(0.318918746329-0.087003407111j)*x_ref[0]**o + ((0.653281150025+0.528108664986j))*x_ref[0] + ((-0.424075825063-0.700030073152j))*x_ref[1]**o + ((0.48539914217-0.0851750962142j))*x_ref[1]
        arg[(2, 3, 3, 3)]=(-0.791308102725-0.705744537912j)*x[0]**o + ((0.388891223618+0.00863687562089j))*x[0] + ((0.553887299367+0.772070044576j))*x[1]**o + ((-0.94928371405+0.549457756709j))*x[1]
        ref[(2, 3, 3, 3)]=(-0.791308102725-0.705744537912j)*x_ref[0]**o + ((0.388891223618+0.00863687562089j))*x_ref[0] + ((0.553887299367+0.772070044576j))*x_ref[1]**o + ((-0.94928371405+0.549457756709j))*x_ref[1]
        arg[(3, 0, 0, 0)]=(-0.925524951362-0.0744301225687j)*x[0]**o + ((-0.466052589889-0.306499293309j))*x[0] + ((-0.434822500812-0.190300342538j))*x[1]**o + ((-0.994080666678-0.0623134475223j))*x[1]
        ref[(3, 0, 0, 0)]=(-0.925524951362-0.0744301225687j)*x_ref[0]**o + ((-0.466052589889-0.306499293309j))*x_ref[0] + ((-0.434822500812-0.190300342538j))*x_ref[1]**o + ((-0.994080666678-0.0623134475223j))*x_ref[1]
        arg[(3, 0, 0, 1)]=(0.229101827522+0.607075214353j)*x[0]**o + ((-0.606339681053-0.371870068081j))*x[0] + ((0.799720224523-0.280465769417j))*x[1]**o + ((0.845784218028+0.519233836853j))*x[1]
        ref[(3, 0, 0, 1)]=(0.229101827522+0.607075214353j)*x_ref[0]**o + ((-0.606339681053-0.371870068081j))*x_ref[0] + ((0.799720224523-0.280465769417j))*x_ref[1]**o + ((0.845784218028+0.519233836853j))*x_ref[1]
        arg[(3, 0, 0, 2)]=(0.774324203028+0.677707761213j)*x[0]**o + ((0.76352582168+0.077849254966j))*x[0] + ((-0.352507126116+0.557408575116j))*x[1]**o + ((0.970511175985+0.106535769219j))*x[1]
        ref[(3, 0, 0, 2)]=(0.774324203028+0.677707761213j)*x_ref[0]**o + ((0.76352582168+0.077849254966j))*x_ref[0] + ((-0.352507126116+0.557408575116j))*x_ref[1]**o + ((0.970511175985+0.106535769219j))*x_ref[1]
        arg[(3, 0, 0, 3)]=(0.195898425867+0.801979129058j)*x[0]**o + ((-0.747756560931-0.568478828691j))*x[0] + ((0.517336135819-0.119473226314j))*x[1]**o + ((0.326521168278-0.88151517487j))*x[1]
        ref[(3, 0, 0, 3)]=(0.195898425867+0.801979129058j)*x_ref[0]**o + ((-0.747756560931-0.568478828691j))*x_ref[0] + ((0.517336135819-0.119473226314j))*x_ref[1]**o + ((0.326521168278-0.88151517487j))*x_ref[1]
        arg[(3, 0, 1, 0)]=(0.624384910888-0.308281961175j)*x[0]**o + ((0.709193251353+0.428949990814j))*x[0] + ((-0.966621696818+0.159434997728j))*x[1]**o + ((0.289554831574+0.0826492112442j))*x[1]
        ref[(3, 0, 1, 0)]=(0.624384910888-0.308281961175j)*x_ref[0]**o + ((0.709193251353+0.428949990814j))*x_ref[0] + ((-0.966621696818+0.159434997728j))*x_ref[1]**o + ((0.289554831574+0.0826492112442j))*x_ref[1]
        arg[(3, 0, 1, 1)]=(0.146210724283+0.376139620843j)*x[0]**o + ((0.592325624027-0.505184326263j))*x[0] + ((0.458801370585-0.870148806407j))*x[1]**o + ((0.760207056458+0.132986593957j))*x[1]
        ref[(3, 0, 1, 1)]=(0.146210724283+0.376139620843j)*x_ref[0]**o + ((0.592325624027-0.505184326263j))*x_ref[0] + ((0.458801370585-0.870148806407j))*x_ref[1]**o + ((0.760207056458+0.132986593957j))*x_ref[1]
        arg[(3, 0, 1, 2)]=(-0.660258889393+0.18916763011j)*x[0]**o + ((-0.253764107804-0.0742127935159j))*x[0] + ((-0.323153795249+0.766138345335j))*x[1]**o + ((0.228315017734+0.182155995329j))*x[1]
        ref[(3, 0, 1, 2)]=(-0.660258889393+0.18916763011j)*x_ref[0]**o + ((-0.253764107804-0.0742127935159j))*x_ref[0] + ((-0.323153795249+0.766138345335j))*x_ref[1]**o + ((0.228315017734+0.182155995329j))*x_ref[1]
        arg[(3, 0, 1, 3)]=(0.871317160114+0.413209380691j)*x[0]**o + ((-0.310987259327+0.631135585365j))*x[0] + ((0.711511794172-0.653874222035j))*x[1]**o + ((-0.570880594372-0.454527463649j))*x[1]
        ref[(3, 0, 1, 3)]=(0.871317160114+0.413209380691j)*x_ref[0]**o + ((-0.310987259327+0.631135585365j))*x_ref[0] + ((0.711511794172-0.653874222035j))*x_ref[1]**o + ((-0.570880594372-0.454527463649j))*x_ref[1]
        arg[(3, 0, 2, 0)]=(-0.224065968909-0.216909873747j)*x[0]**o + ((-0.102265864236+0.790273447356j))*x[0] + ((0.421096301215-0.213749354305j))*x[1]**o + ((0.150143021016-0.654109992081j))*x[1]
        ref[(3, 0, 2, 0)]=(-0.224065968909-0.216909873747j)*x_ref[0]**o + ((-0.102265864236+0.790273447356j))*x_ref[0] + ((0.421096301215-0.213749354305j))*x_ref[1]**o + ((0.150143021016-0.654109992081j))*x_ref[1]
        arg[(3, 0, 2, 1)]=(-0.924290452085+0.716908056375j)*x[0]**o + ((0.335441245338-0.213422557825j))*x[0] + ((-0.562145263114+0.167067261734j))*x[1]**o + ((-0.196012883167-0.159969790421j))*x[1]
        ref[(3, 0, 2, 1)]=(-0.924290452085+0.716908056375j)*x_ref[0]**o + ((0.335441245338-0.213422557825j))*x_ref[0] + ((-0.562145263114+0.167067261734j))*x_ref[1]**o + ((-0.196012883167-0.159969790421j))*x_ref[1]
        arg[(3, 0, 2, 2)]=(0.909725184455+0.970821527002j)*x[0]**o + ((-0.224443213697+0.0983086561825j))*x[0] + ((-0.809160621666-0.764009510255j))*x[1]**o + ((0.576738564765+0.579633566175j))*x[1]
        ref[(3, 0, 2, 2)]=(0.909725184455+0.970821527002j)*x_ref[0]**o + ((-0.224443213697+0.0983086561825j))*x_ref[0] + ((-0.809160621666-0.764009510255j))*x_ref[1]**o + ((0.576738564765+0.579633566175j))*x_ref[1]
        arg[(3, 0, 2, 3)]=(0.254722389451+0.879125934384j)*x[0]**o + ((0.717498065664-0.00595286980314j))*x[0] + ((0.408594415153+0.222976395182j))*x[1]**o + ((0.666350840697-0.733621259018j))*x[1]
        ref[(3, 0, 2, 3)]=(0.254722389451+0.879125934384j)*x_ref[0]**o + ((0.717498065664-0.00595286980314j))*x_ref[0] + ((0.408594415153+0.222976395182j))*x_ref[1]**o + ((0.666350840697-0.733621259018j))*x_ref[1]
        arg[(3, 0, 3, 0)]=(0.432787398843+0.284394959262j)*x[0]**o + ((-0.569575455547-0.868635014748j))*x[0] + ((-0.432114338849-0.132411126993j))*x[1]**o + ((-0.342840059197+0.552424114101j))*x[1]
        ref[(3, 0, 3, 0)]=(0.432787398843+0.284394959262j)*x_ref[0]**o + ((-0.569575455547-0.868635014748j))*x_ref[0] + ((-0.432114338849-0.132411126993j))*x_ref[1]**o + ((-0.342840059197+0.552424114101j))*x_ref[1]
        arg[(3, 0, 3, 1)]=(-0.592011987294+0.59183370426j)*x[0]**o + ((0.815925552831+0.999117163605j))*x[0] + ((-0.907449861366+0.0646273483052j))*x[1]**o + ((-0.0136391496106+0.62335219675j))*x[1]
        ref[(3, 0, 3, 1)]=(-0.592011987294+0.59183370426j)*x_ref[0]**o + ((0.815925552831+0.999117163605j))*x_ref[0] + ((-0.907449861366+0.0646273483052j))*x_ref[1]**o + ((-0.0136391496106+0.62335219675j))*x_ref[1]
        arg[(3, 0, 3, 2)]=(-0.964533619425-0.0428329774432j)*x[0]**o + ((-0.910637875134+0.528681701819j))*x[0] + ((0.915768445604-0.81969011214j))*x[1]**o + ((0.875311376781+0.205641618204j))*x[1]
        ref[(3, 0, 3, 2)]=(-0.964533619425-0.0428329774432j)*x_ref[0]**o + ((-0.910637875134+0.528681701819j))*x_ref[0] + ((0.915768445604-0.81969011214j))*x_ref[1]**o + ((0.875311376781+0.205641618204j))*x_ref[1]
        arg[(3, 0, 3, 3)]=(0.188712118135+0.239536425683j)*x[0]**o + ((0.490063797007-0.811611486116j))*x[0] + ((0.376773117799+0.261862322337j))*x[1]**o + ((-0.100193195416-0.92632793776j))*x[1]
        ref[(3, 0, 3, 3)]=(0.188712118135+0.239536425683j)*x_ref[0]**o + ((0.490063797007-0.811611486116j))*x_ref[0] + ((0.376773117799+0.261862322337j))*x_ref[1]**o + ((-0.100193195416-0.92632793776j))*x_ref[1]
        arg[(3, 1, 0, 0)]=(0.836604752431+0.885240997189j)*x[0]**o + ((0.547182171214+0.325117244077j))*x[0] + ((0.929793024938+0.582145270931j))*x[1]**o + ((0.0355463805253+0.616623719839j))*x[1]
        ref[(3, 1, 0, 0)]=(0.836604752431+0.885240997189j)*x_ref[0]**o + ((0.547182171214+0.325117244077j))*x_ref[0] + ((0.929793024938+0.582145270931j))*x_ref[1]**o + ((0.0355463805253+0.616623719839j))*x_ref[1]
        arg[(3, 1, 0, 1)]=(-0.772587595088-0.490356579913j)*x[0]**o + ((0.677749526552+0.571259917948j))*x[0] + ((-0.15926733573-0.607011897007j))*x[1]**o + ((0.117699169121+0.511763919602j))*x[1]
        ref[(3, 1, 0, 1)]=(-0.772587595088-0.490356579913j)*x_ref[0]**o + ((0.677749526552+0.571259917948j))*x_ref[0] + ((-0.15926733573-0.607011897007j))*x_ref[1]**o + ((0.117699169121+0.511763919602j))*x_ref[1]
        arg[(3, 1, 0, 2)]=(0.300026208927+0.523511191436j)*x[0]**o + ((0.633484618685-0.376957305579j))*x[0] + ((-0.17178028468-0.310520592823j))*x[1]**o + ((-0.239282943723+0.628541868116j))*x[1]
        ref[(3, 1, 0, 2)]=(0.300026208927+0.523511191436j)*x_ref[0]**o + ((0.633484618685-0.376957305579j))*x_ref[0] + ((-0.17178028468-0.310520592823j))*x_ref[1]**o + ((-0.239282943723+0.628541868116j))*x_ref[1]
        arg[(3, 1, 0, 3)]=(0.0102140288684+0.368957832878j)*x[0]**o + ((-0.795172099046-0.258059062j))*x[0] + ((-0.566889714633-0.798456069498j))*x[1]**o + ((0.659951208978-0.664296280838j))*x[1]
        ref[(3, 1, 0, 3)]=(0.0102140288684+0.368957832878j)*x_ref[0]**o + ((-0.795172099046-0.258059062j))*x_ref[0] + ((-0.566889714633-0.798456069498j))*x_ref[1]**o + ((0.659951208978-0.664296280838j))*x_ref[1]
        arg[(3, 1, 1, 0)]=(0.468482745348-0.0882642338667j)*x[0]**o + ((-0.899422874607+0.3664998079j))*x[0] + ((-0.684961620951+0.311273171917j))*x[1]**o + ((0.569457708544-0.285553536727j))*x[1]
        ref[(3, 1, 1, 0)]=(0.468482745348-0.0882642338667j)*x_ref[0]**o + ((-0.899422874607+0.3664998079j))*x_ref[0] + ((-0.684961620951+0.311273171917j))*x_ref[1]**o + ((0.569457708544-0.285553536727j))*x_ref[1]
        arg[(3, 1, 1, 1)]=(-0.516239258335-0.461115724047j)*x[0]**o + ((-0.127188992985-0.423888413608j))*x[0] + ((-0.987775416885+0.132102472834j))*x[1]**o + ((-0.375510091873-0.781231424591j))*x[1]
        ref[(3, 1, 1, 1)]=(-0.516239258335-0.461115724047j)*x_ref[0]**o + ((-0.127188992985-0.423888413608j))*x_ref[0] + ((-0.987775416885+0.132102472834j))*x_ref[1]**o + ((-0.375510091873-0.781231424591j))*x_ref[1]
        arg[(3, 1, 1, 2)]=(0.642036909588+0.801110283029j)*x[0]**o + ((-0.563648314418+0.445442932879j))*x[0] + ((0.0077495067977-0.539648137111j))*x[1]**o + ((-0.00144227418349+0.56228009234j))*x[1]
        ref[(3, 1, 1, 2)]=(0.642036909588+0.801110283029j)*x_ref[0]**o + ((-0.563648314418+0.445442932879j))*x_ref[0] + ((0.0077495067977-0.539648137111j))*x_ref[1]**o + ((-0.00144227418349+0.56228009234j))*x_ref[1]
        arg[(3, 1, 1, 3)]=(-0.267677484599-0.123855247055j)*x[0]**o + ((-0.951180023331-0.141705620468j))*x[0] + ((-0.360723885756+0.371933508789j))*x[1]**o + ((0.535285931926-0.583278673931j))*x[1]
        ref[(3, 1, 1, 3)]=(-0.267677484599-0.123855247055j)*x_ref[0]**o + ((-0.951180023331-0.141705620468j))*x_ref[0] + ((-0.360723885756+0.371933508789j))*x_ref[1]**o + ((0.535285931926-0.583278673931j))*x_ref[1]
        arg[(3, 1, 2, 0)]=(-0.952110218197-0.66631638396j)*x[0]**o + ((0.200549895191+0.95746155629j))*x[0] + ((-0.445659916037+0.186110258775j))*x[1]**o + ((-0.625812500921+0.654937599234j))*x[1]
        ref[(3, 1, 2, 0)]=(-0.952110218197-0.66631638396j)*x_ref[0]**o + ((0.200549895191+0.95746155629j))*x_ref[0] + ((-0.445659916037+0.186110258775j))*x_ref[1]**o + ((-0.625812500921+0.654937599234j))*x_ref[1]
        arg[(3, 1, 2, 1)]=(0.0240515608852-0.665386444543j)*x[0]**o + ((-0.839708567704-0.57173256684j))*x[0] + ((-0.997123939974-0.421003338967j))*x[1]**o + ((0.328592645094-0.939968918951j))*x[1]
        ref[(3, 1, 2, 1)]=(0.0240515608852-0.665386444543j)*x_ref[0]**o + ((-0.839708567704-0.57173256684j))*x_ref[0] + ((-0.997123939974-0.421003338967j))*x_ref[1]**o + ((0.328592645094-0.939968918951j))*x_ref[1]
        arg[(3, 1, 2, 2)]=(0.725119762986-0.279064861001j)*x[0]**o + ((0.929371009471+0.717605713704j))*x[0] + ((0.156714897804-0.15130628468j))*x[1]**o + ((0.0614342199902+0.721378337427j))*x[1]
        ref[(3, 1, 2, 2)]=(0.725119762986-0.279064861001j)*x_ref[0]**o + ((0.929371009471+0.717605713704j))*x_ref[0] + ((0.156714897804-0.15130628468j))*x_ref[1]**o + ((0.0614342199902+0.721378337427j))*x_ref[1]
        arg[(3, 1, 2, 3)]=(-0.732725100109+0.92727976168j)*x[0]**o + ((0.642994382215+0.289334169699j))*x[0] + ((-0.531164487037+0.626867094807j))*x[1]**o + ((0.407584468472-0.47012346136j))*x[1]
        ref[(3, 1, 2, 3)]=(-0.732725100109+0.92727976168j)*x_ref[0]**o + ((0.642994382215+0.289334169699j))*x_ref[0] + ((-0.531164487037+0.626867094807j))*x_ref[1]**o + ((0.407584468472-0.47012346136j))*x_ref[1]
        arg[(3, 1, 3, 0)]=(-0.05013528269-0.642601586985j)*x[0]**o + ((-0.515654868348-0.889033050641j))*x[0] + ((0.949467683491-0.744197361759j))*x[1]**o + ((-0.158574398409+0.25661969642j))*x[1]
        ref[(3, 1, 3, 0)]=(-0.05013528269-0.642601586985j)*x_ref[0]**o + ((-0.515654868348-0.889033050641j))*x_ref[0] + ((0.949467683491-0.744197361759j))*x_ref[1]**o + ((-0.158574398409+0.25661969642j))*x_ref[1]
        arg[(3, 1, 3, 1)]=(0.373021629343+0.412679751486j)*x[0]**o + ((0.928284522839+0.914742148069j))*x[0] + ((0.27587115249-0.627695257824j))*x[1]**o + ((0.270946226033+0.0341115163173j))*x[1]
        ref[(3, 1, 3, 1)]=(0.373021629343+0.412679751486j)*x_ref[0]**o + ((0.928284522839+0.914742148069j))*x_ref[0] + ((0.27587115249-0.627695257824j))*x_ref[1]**o + ((0.270946226033+0.0341115163173j))*x_ref[1]
        arg[(3, 1, 3, 2)]=(-0.489473622571+0.367985018556j)*x[0]**o + ((-0.524108075823+0.412236418251j))*x[0] + ((-0.398180489734+0.403054527309j))*x[1]**o + ((0.0940159871168+0.670634716598j))*x[1]
        ref[(3, 1, 3, 2)]=(-0.489473622571+0.367985018556j)*x_ref[0]**o + ((-0.524108075823+0.412236418251j))*x_ref[0] + ((-0.398180489734+0.403054527309j))*x_ref[1]**o + ((0.0940159871168+0.670634716598j))*x_ref[1]
        arg[(3, 1, 3, 3)]=(-0.259761422044-0.640290516088j)*x[0]**o + ((-0.908498813752+0.810367597542j))*x[0] + ((-0.699716535027-0.440450899631j))*x[1]**o + ((-0.156806310797+0.705944380238j))*x[1]
        ref[(3, 1, 3, 3)]=(-0.259761422044-0.640290516088j)*x_ref[0]**o + ((-0.908498813752+0.810367597542j))*x_ref[0] + ((-0.699716535027-0.440450899631j))*x_ref[1]**o + ((-0.156806310797+0.705944380238j))*x_ref[1]
        arg[(3, 2, 0, 0)]=(0.958660251166+0.81378482741j)*x[0]**o + ((-0.835119758196-0.240008783479j))*x[0] + ((0.901353214973-0.12735142993j))*x[1]**o + ((0.903374648355+0.42837582241j))*x[1]
        ref[(3, 2, 0, 0)]=(0.958660251166+0.81378482741j)*x_ref[0]**o + ((-0.835119758196-0.240008783479j))*x_ref[0] + ((0.901353214973-0.12735142993j))*x_ref[1]**o + ((0.903374648355+0.42837582241j))*x_ref[1]
        arg[(3, 2, 0, 1)]=(0.743893986223-0.220126671038j)*x[0]**o + ((-0.645450316679-0.793121160561j))*x[0] + ((-0.0932531369163-0.500199862482j))*x[1]**o + ((-0.369665915998+0.00125424632195j))*x[1]
        ref[(3, 2, 0, 1)]=(0.743893986223-0.220126671038j)*x_ref[0]**o + ((-0.645450316679-0.793121160561j))*x_ref[0] + ((-0.0932531369163-0.500199862482j))*x_ref[1]**o + ((-0.369665915998+0.00125424632195j))*x_ref[1]
        arg[(3, 2, 0, 2)]=(0.418406889822+0.756863794077j)*x[0]**o + ((-0.50259501223-0.983247935095j))*x[0] + ((0.383214155608+0.546828306145j))*x[1]**o + ((-0.505045198889-0.225468866421j))*x[1]
        ref[(3, 2, 0, 2)]=(0.418406889822+0.756863794077j)*x_ref[0]**o + ((-0.50259501223-0.983247935095j))*x_ref[0] + ((0.383214155608+0.546828306145j))*x_ref[1]**o + ((-0.505045198889-0.225468866421j))*x_ref[1]
        arg[(3, 2, 0, 3)]=(0.754665491312+0.543625863012j)*x[0]**o + ((0.34001516214+0.684016019392j))*x[0] + ((-0.976794548592+0.694041458658j))*x[1]**o + ((-0.389090913446+0.966003408435j))*x[1]
        ref[(3, 2, 0, 3)]=(0.754665491312+0.543625863012j)*x_ref[0]**o + ((0.34001516214+0.684016019392j))*x_ref[0] + ((-0.976794548592+0.694041458658j))*x_ref[1]**o + ((-0.389090913446+0.966003408435j))*x_ref[1]
        arg[(3, 2, 1, 0)]=(0.721305714668-0.600771763815j)*x[0]**o + ((0.922654531049-0.628052095687j))*x[0] + ((0.857034385332+0.711851152578j))*x[1]**o + ((0.656040227476+0.683925279804j))*x[1]
        ref[(3, 2, 1, 0)]=(0.721305714668-0.600771763815j)*x_ref[0]**o + ((0.922654531049-0.628052095687j))*x_ref[0] + ((0.857034385332+0.711851152578j))*x_ref[1]**o + ((0.656040227476+0.683925279804j))*x_ref[1]
        arg[(3, 2, 1, 1)]=(-0.262683005758-0.267127886634j)*x[0]**o + ((0.436297078655+0.535476696304j))*x[0] + ((0.736010805168+0.455635222199j))*x[1]**o + ((-0.457261590968+0.518204702622j))*x[1]
        ref[(3, 2, 1, 1)]=(-0.262683005758-0.267127886634j)*x_ref[0]**o + ((0.436297078655+0.535476696304j))*x_ref[0] + ((0.736010805168+0.455635222199j))*x_ref[1]**o + ((-0.457261590968+0.518204702622j))*x_ref[1]
        arg[(3, 2, 1, 2)]=(0.299024692979+0.250873554673j)*x[0]**o + ((-0.022540513136-0.286343201043j))*x[0] + ((0.679117576402-0.866425277003j))*x[1]**o + ((0.466840001202-0.684891045453j))*x[1]
        ref[(3, 2, 1, 2)]=(0.299024692979+0.250873554673j)*x_ref[0]**o + ((-0.022540513136-0.286343201043j))*x_ref[0] + ((0.679117576402-0.866425277003j))*x_ref[1]**o + ((0.466840001202-0.684891045453j))*x_ref[1]
        arg[(3, 2, 1, 3)]=(-0.372814407083+0.500560186694j)*x[0]**o + ((-0.356826136622-0.0656000579446j))*x[0] + ((0.402000003563-0.283481874751j))*x[1]**o + ((-0.0716230409897+0.0746891866135j))*x[1]
        ref[(3, 2, 1, 3)]=(-0.372814407083+0.500560186694j)*x_ref[0]**o + ((-0.356826136622-0.0656000579446j))*x_ref[0] + ((0.402000003563-0.283481874751j))*x_ref[1]**o + ((-0.0716230409897+0.0746891866135j))*x_ref[1]
        arg[(3, 2, 2, 0)]=(-0.240486182782+0.417852895385j)*x[0]**o + ((-0.285617864051+0.674642495254j))*x[0] + ((-0.957637331471+0.49509804139j))*x[1]**o + ((0.473755045982+0.773034842626j))*x[1]
        ref[(3, 2, 2, 0)]=(-0.240486182782+0.417852895385j)*x_ref[0]**o + ((-0.285617864051+0.674642495254j))*x_ref[0] + ((-0.957637331471+0.49509804139j))*x_ref[1]**o + ((0.473755045982+0.773034842626j))*x_ref[1]
        arg[(3, 2, 2, 1)]=(-0.0302804051136-0.959790728866j)*x[0]**o + ((-0.152127145192+0.32002934467j))*x[0] + ((0.822046006827-0.463919711835j))*x[1]**o + ((-0.642487655467-0.538824037786j))*x[1]
        ref[(3, 2, 2, 1)]=(-0.0302804051136-0.959790728866j)*x_ref[0]**o + ((-0.152127145192+0.32002934467j))*x_ref[0] + ((0.822046006827-0.463919711835j))*x_ref[1]**o + ((-0.642487655467-0.538824037786j))*x_ref[1]
        arg[(3, 2, 2, 2)]=(-0.416178728552+0.472042749177j)*x[0]**o + ((-0.0595876565228+0.0774512177461j))*x[0] + ((0.455254201737+0.0714193117443j))*x[1]**o + ((-0.203350636712-0.0214784773216j))*x[1]
        ref[(3, 2, 2, 2)]=(-0.416178728552+0.472042749177j)*x_ref[0]**o + ((-0.0595876565228+0.0774512177461j))*x_ref[0] + ((0.455254201737+0.0714193117443j))*x_ref[1]**o + ((-0.203350636712-0.0214784773216j))*x_ref[1]
        arg[(3, 2, 2, 3)]=(-0.560613698278+0.302675789542j)*x[0]**o + ((0.560668394199+0.894546285516j))*x[0] + ((0.305981015924+0.000167282210509j))*x[1]**o + ((0.436830345875+0.519558850881j))*x[1]
        ref[(3, 2, 2, 3)]=(-0.560613698278+0.302675789542j)*x_ref[0]**o + ((0.560668394199+0.894546285516j))*x_ref[0] + ((0.305981015924+0.000167282210509j))*x_ref[1]**o + ((0.436830345875+0.519558850881j))*x_ref[1]
        arg[(3, 2, 3, 0)]=(0.637954156635+0.0348603367347j)*x[0]**o + ((0.0612631074694-0.0534750874856j))*x[0] + ((-0.427556451682+0.666394745327j))*x[1]**o + ((-0.140639170554-0.759343348175j))*x[1]
        ref[(3, 2, 3, 0)]=(0.637954156635+0.0348603367347j)*x_ref[0]**o + ((0.0612631074694-0.0534750874856j))*x_ref[0] + ((-0.427556451682+0.666394745327j))*x_ref[1]**o + ((-0.140639170554-0.759343348175j))*x_ref[1]
        arg[(3, 2, 3, 1)]=(0.307251133237+0.0317057029969j)*x[0]**o + ((-0.748258354661-0.743018949537j))*x[0] + ((0.407926926928-0.846571507951j))*x[1]**o + ((0.0387059736933+0.50772247829j))*x[1]
        ref[(3, 2, 3, 1)]=(0.307251133237+0.0317057029969j)*x_ref[0]**o + ((-0.748258354661-0.743018949537j))*x_ref[0] + ((0.407926926928-0.846571507951j))*x_ref[1]**o + ((0.0387059736933+0.50772247829j))*x_ref[1]
        arg[(3, 2, 3, 2)]=(-0.265447289357-0.854618816568j)*x[0]**o + ((-0.328725564902+0.720401265203j))*x[0] + ((-0.230214938186-0.384844513574j))*x[1]**o + ((-0.52853785251+0.484721609522j))*x[1]
        ref[(3, 2, 3, 2)]=(-0.265447289357-0.854618816568j)*x_ref[0]**o + ((-0.328725564902+0.720401265203j))*x_ref[0] + ((-0.230214938186-0.384844513574j))*x_ref[1]**o + ((-0.52853785251+0.484721609522j))*x_ref[1]
        arg[(3, 2, 3, 3)]=(-0.920202188974-0.422918971937j)*x[0]**o + ((-0.358800764929+0.552094107755j))*x[0] + ((-0.445121215011-0.766699052244j))*x[1]**o + ((-0.375498664891-0.793855742073j))*x[1]
        ref[(3, 2, 3, 3)]=(-0.920202188974-0.422918971937j)*x_ref[0]**o + ((-0.358800764929+0.552094107755j))*x_ref[0] + ((-0.445121215011-0.766699052244j))*x_ref[1]**o + ((-0.375498664891-0.793855742073j))*x_ref[1]
        arg[(3, 3, 0, 0)]=(0.724205088784+0.232121095084j)*x[0]**o + ((0.903228402961+0.264412553308j))*x[0] + ((-0.198965383303+0.620719887487j))*x[1]**o + ((-0.581853245584-0.137831137651j))*x[1]
        ref[(3, 3, 0, 0)]=(0.724205088784+0.232121095084j)*x_ref[0]**o + ((0.903228402961+0.264412553308j))*x_ref[0] + ((-0.198965383303+0.620719887487j))*x_ref[1]**o + ((-0.581853245584-0.137831137651j))*x_ref[1]
        arg[(3, 3, 0, 1)]=(0.690957361817-0.0127877965178j)*x[0]**o + ((0.868601503762-0.0721596624765j))*x[0] + ((-0.248631354146-0.482913307522j))*x[1]**o + ((-0.00903851307229+0.58327812232j))*x[1]
        ref[(3, 3, 0, 1)]=(0.690957361817-0.0127877965178j)*x_ref[0]**o + ((0.868601503762-0.0721596624765j))*x_ref[0] + ((-0.248631354146-0.482913307522j))*x_ref[1]**o + ((-0.00903851307229+0.58327812232j))*x_ref[1]
        arg[(3, 3, 0, 2)]=(-0.947309484556+0.127953628611j)*x[0]**o + ((0.218814028062+0.83845000653j))*x[0] + ((-0.384954181995-0.677949073695j))*x[1]**o + ((0.491823512474+0.703520877966j))*x[1]
        ref[(3, 3, 0, 2)]=(-0.947309484556+0.127953628611j)*x_ref[0]**o + ((0.218814028062+0.83845000653j))*x_ref[0] + ((-0.384954181995-0.677949073695j))*x_ref[1]**o + ((0.491823512474+0.703520877966j))*x_ref[1]
        arg[(3, 3, 0, 3)]=(0.705300006594+0.0216021399951j)*x[0]**o + ((-0.654051131389-0.278670652856j))*x[0] + ((-0.417605241712+0.578403146677j))*x[1]**o + ((-0.154207402513-0.109091153999j))*x[1]
        ref[(3, 3, 0, 3)]=(0.705300006594+0.0216021399951j)*x_ref[0]**o + ((-0.654051131389-0.278670652856j))*x_ref[0] + ((-0.417605241712+0.578403146677j))*x_ref[1]**o + ((-0.154207402513-0.109091153999j))*x_ref[1]
        arg[(3, 3, 1, 0)]=(-0.773129988948+0.379376356361j)*x[0]**o + ((0.709023297273+0.680057024354j))*x[0] + ((-0.103346882531+0.832931651212j))*x[1]**o + ((-0.602154403254+0.249595279237j))*x[1]
        ref[(3, 3, 1, 0)]=(-0.773129988948+0.379376356361j)*x_ref[0]**o + ((0.709023297273+0.680057024354j))*x_ref[0] + ((-0.103346882531+0.832931651212j))*x_ref[1]**o + ((-0.602154403254+0.249595279237j))*x_ref[1]
        arg[(3, 3, 1, 1)]=(-0.178994305312+0.603865859121j)*x[0]**o + ((0.347291176513+0.590845257163j))*x[0] + ((-0.353143170242-0.630618136877j))*x[1]**o + ((0.123249476506-0.502413954964j))*x[1]
        ref[(3, 3, 1, 1)]=(-0.178994305312+0.603865859121j)*x_ref[0]**o + ((0.347291176513+0.590845257163j))*x_ref[0] + ((-0.353143170242-0.630618136877j))*x_ref[1]**o + ((0.123249476506-0.502413954964j))*x_ref[1]
        arg[(3, 3, 1, 2)]=(-0.812441631121-0.191867556111j)*x[0]**o + ((0.0923219310294-0.534592517273j))*x[0] + ((0.00209184725283-0.302843550509j))*x[1]**o + ((0.275342771782+0.0618923664141j))*x[1]
        ref[(3, 3, 1, 2)]=(-0.812441631121-0.191867556111j)*x_ref[0]**o + ((0.0923219310294-0.534592517273j))*x_ref[0] + ((0.00209184725283-0.302843550509j))*x_ref[1]**o + ((0.275342771782+0.0618923664141j))*x_ref[1]
        arg[(3, 3, 1, 3)]=(-0.0240686946421-0.719665452308j)*x[0]**o + ((-0.00123283024612-0.779948105837j))*x[0] + ((0.0333793770645-0.538092612785j))*x[1]**o + ((0.921257095765-0.658012020284j))*x[1]
        ref[(3, 3, 1, 3)]=(-0.0240686946421-0.719665452308j)*x_ref[0]**o + ((-0.00123283024612-0.779948105837j))*x_ref[0] + ((0.0333793770645-0.538092612785j))*x_ref[1]**o + ((0.921257095765-0.658012020284j))*x_ref[1]
        arg[(3, 3, 2, 0)]=(-0.622951737587+0.814094134441j)*x[0]**o + ((-0.138590982658-0.681382040987j))*x[0] + ((0.79687988877-0.523276990098j))*x[1]**o + ((0.620868711297-0.412269096735j))*x[1]
        ref[(3, 3, 2, 0)]=(-0.622951737587+0.814094134441j)*x_ref[0]**o + ((-0.138590982658-0.681382040987j))*x_ref[0] + ((0.79687988877-0.523276990098j))*x_ref[1]**o + ((0.620868711297-0.412269096735j))*x_ref[1]
        arg[(3, 3, 2, 1)]=(-0.145750359942-0.311994991018j)*x[0]**o + ((-0.355348399898+0.0133735194255j))*x[0] + ((0.659881624006-0.996739694915j))*x[1]**o + ((-0.366132756363-0.570045433838j))*x[1]
        ref[(3, 3, 2, 1)]=(-0.145750359942-0.311994991018j)*x_ref[0]**o + ((-0.355348399898+0.0133735194255j))*x_ref[0] + ((0.659881624006-0.996739694915j))*x_ref[1]**o + ((-0.366132756363-0.570045433838j))*x_ref[1]
        arg[(3, 3, 2, 2)]=(0.403901883184+0.900374222478j)*x[0]**o + ((-0.506963295527-0.764708359472j))*x[0] + ((-0.0313684899691-0.968658969615j))*x[1]**o + ((0.278694025397-0.0118231665699j))*x[1]
        ref[(3, 3, 2, 2)]=(0.403901883184+0.900374222478j)*x_ref[0]**o + ((-0.506963295527-0.764708359472j))*x_ref[0] + ((-0.0313684899691-0.968658969615j))*x_ref[1]**o + ((0.278694025397-0.0118231665699j))*x_ref[1]
        arg[(3, 3, 2, 3)]=(-0.341264599173+0.437301727071j)*x[0]**o + ((-0.729828585302+0.811421680966j))*x[0] + ((0.814842901158+0.259497754406j))*x[1]**o + ((0.0987561863156-0.623565378489j))*x[1]
        ref[(3, 3, 2, 3)]=(-0.341264599173+0.437301727071j)*x_ref[0]**o + ((-0.729828585302+0.811421680966j))*x_ref[0] + ((0.814842901158+0.259497754406j))*x_ref[1]**o + ((0.0987561863156-0.623565378489j))*x_ref[1]
        arg[(3, 3, 3, 0)]=(0.624633148338-0.161854443332j)*x[0]**o + ((0.320618369154+0.30352890163j))*x[0] + ((0.135849773842+0.755917502817j))*x[1]**o + ((0.191752498846-0.591684235299j))*x[1]
        ref[(3, 3, 3, 0)]=(0.624633148338-0.161854443332j)*x_ref[0]**o + ((0.320618369154+0.30352890163j))*x_ref[0] + ((0.135849773842+0.755917502817j))*x_ref[1]**o + ((0.191752498846-0.591684235299j))*x_ref[1]
        arg[(3, 3, 3, 1)]=(-0.100818184911-0.742772433079j)*x[0]**o + ((-0.897710133105-0.230554135153j))*x[0] + ((0.746124314295-0.0188395561888j))*x[1]**o + ((0.710648955908+0.709834768141j))*x[1]
        ref[(3, 3, 3, 1)]=(-0.100818184911-0.742772433079j)*x_ref[0]**o + ((-0.897710133105-0.230554135153j))*x_ref[0] + ((0.746124314295-0.0188395561888j))*x_ref[1]**o + ((0.710648955908+0.709834768141j))*x_ref[1]
        arg[(3, 3, 3, 2)]=(0.518170997611-0.228398823421j)*x[0]**o + ((0.799860335376-0.374674427924j))*x[0] + ((0.601084343406+0.999682446924j))*x[1]**o + ((0.644963609748+0.52161383619j))*x[1]
        ref[(3, 3, 3, 2)]=(0.518170997611-0.228398823421j)*x_ref[0]**o + ((0.799860335376-0.374674427924j))*x_ref[0] + ((0.601084343406+0.999682446924j))*x_ref[1]**o + ((0.644963609748+0.52161383619j))*x_ref[1]
        arg[(3, 3, 3, 3)]=(-0.417546973071+0.979374831924j)*x[0]**o + ((0.667115612879-0.923946420052j))*x[0] + ((0.399442944765+0.580049932345j))*x[1]**o + ((0.0686445171862+0.106124486115j))*x[1]
        ref[(3, 3, 3, 3)]=(-0.417546973071+0.979374831924j)*x_ref[0]**o + ((0.667115612879-0.923946420052j))*x_ref[0] + ((0.399442944765+0.580049932345j))*x_ref[1]**o + ((0.0686445171862+0.106124486115j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.582416398421-0.407223079987j)*x[2]**o + ((-0.88483872235+0.860131207412j))*x[2]
            ref[(0, 0, 0, 0)]+=(0.582416398421-0.407223079987j)*x_ref[2]**o + ((-0.88483872235+0.860131207412j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.738092658932-0.795753509388j)*x[2]**o + ((-0.786612204518-0.704182676158j))*x[2]
            ref[(0, 0, 0, 1)]+=(-0.738092658932-0.795753509388j)*x_ref[2]**o + ((-0.786612204518-0.704182676158j))*x_ref[2]
            arg[(0, 0, 0, 2)]+=(0.746531958695-0.716611759551j)*x[2]**o + ((-0.998109827866+0.67811182173j))*x[2]
            ref[(0, 0, 0, 2)]+=(0.746531958695-0.716611759551j)*x_ref[2]**o + ((-0.998109827866+0.67811182173j))*x_ref[2]
            arg[(0, 0, 0, 3)]+=(-0.517245878315+0.791690779513j)*x[2]**o + ((-0.873816148597-0.0204714482304j))*x[2]
            ref[(0, 0, 0, 3)]+=(-0.517245878315+0.791690779513j)*x_ref[2]**o + ((-0.873816148597-0.0204714482304j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.776187639276-0.883146661444j)*x[2]**o + ((0.163675926876-0.522545537187j))*x[2]
            ref[(0, 0, 1, 0)]+=(-0.776187639276-0.883146661444j)*x_ref[2]**o + ((0.163675926876-0.522545537187j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.815081898936-0.173032254055j)*x[2]**o + ((-0.219184226617-0.347314492869j))*x[2]
            ref[(0, 0, 1, 1)]+=(-0.815081898936-0.173032254055j)*x_ref[2]**o + ((-0.219184226617-0.347314492869j))*x_ref[2]
            arg[(0, 0, 1, 2)]+=(0.221306462752-0.0494296498417j)*x[2]**o + ((0.777495059193-0.21675563831j))*x[2]
            ref[(0, 0, 1, 2)]+=(0.221306462752-0.0494296498417j)*x_ref[2]**o + ((0.777495059193-0.21675563831j))*x_ref[2]
            arg[(0, 0, 1, 3)]+=(0.304624377731-0.579972518725j)*x[2]**o + ((0.914169229727+0.643858643089j))*x[2]
            ref[(0, 0, 1, 3)]+=(0.304624377731-0.579972518725j)*x_ref[2]**o + ((0.914169229727+0.643858643089j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(0.218485954893+0.528934796378j)*x[2]**o + ((0.37122220882+0.2993342062j))*x[2]
            ref[(0, 0, 2, 0)]+=(0.218485954893+0.528934796378j)*x_ref[2]**o + ((0.37122220882+0.2993342062j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(0.334281749465+0.533210306126j)*x[2]**o + ((-0.433510108854-0.330510132682j))*x[2]
            ref[(0, 0, 2, 1)]+=(0.334281749465+0.533210306126j)*x_ref[2]**o + ((-0.433510108854-0.330510132682j))*x_ref[2]
            arg[(0, 0, 2, 2)]+=(-0.813096744324-0.667503502746j)*x[2]**o + ((0.759738859048-0.983335347279j))*x[2]
            ref[(0, 0, 2, 2)]+=(-0.813096744324-0.667503502746j)*x_ref[2]**o + ((0.759738859048-0.983335347279j))*x_ref[2]
            arg[(0, 0, 2, 3)]+=(-0.490191389698-0.424938366579j)*x[2]**o + ((-0.414140641686-0.223613632961j))*x[2]
            ref[(0, 0, 2, 3)]+=(-0.490191389698-0.424938366579j)*x_ref[2]**o + ((-0.414140641686-0.223613632961j))*x_ref[2]
            arg[(0, 0, 3, 0)]+=(0.0794645971564-0.821478887689j)*x[2]**o + ((0.86355731864+0.514710532574j))*x[2]
            ref[(0, 0, 3, 0)]+=(0.0794645971564-0.821478887689j)*x_ref[2]**o + ((0.86355731864+0.514710532574j))*x_ref[2]
            arg[(0, 0, 3, 1)]+=(-0.730341838402-0.296818772379j)*x[2]**o + ((-0.896636017909-0.358805878611j))*x[2]
            ref[(0, 0, 3, 1)]+=(-0.730341838402-0.296818772379j)*x_ref[2]**o + ((-0.896636017909-0.358805878611j))*x_ref[2]
            arg[(0, 0, 3, 2)]+=(0.868616961614-0.757829385544j)*x[2]**o + ((0.593944615054-0.247903969964j))*x[2]
            ref[(0, 0, 3, 2)]+=(0.868616961614-0.757829385544j)*x_ref[2]**o + ((0.593944615054-0.247903969964j))*x_ref[2]
            arg[(0, 0, 3, 3)]+=(-0.141459957519-0.617841073602j)*x[2]**o + ((-0.228305409327+0.0553562669343j))*x[2]
            ref[(0, 0, 3, 3)]+=(-0.141459957519-0.617841073602j)*x_ref[2]**o + ((-0.228305409327+0.0553562669343j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.694665985099-0.546074762214j)*x[2]**o + ((-0.127647278221-0.440039976647j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.694665985099-0.546074762214j)*x_ref[2]**o + ((-0.127647278221-0.440039976647j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.492986495104-0.0384638242892j)*x[2]**o + ((0.443295998922+0.231451408675j))*x[2]
            ref[(0, 1, 0, 1)]+=(0.492986495104-0.0384638242892j)*x_ref[2]**o + ((0.443295998922+0.231451408675j))*x_ref[2]
            arg[(0, 1, 0, 2)]+=(0.736599959697-0.735779750786j)*x[2]**o + ((-0.403171876967-0.213681692646j))*x[2]
            ref[(0, 1, 0, 2)]+=(0.736599959697-0.735779750786j)*x_ref[2]**o + ((-0.403171876967-0.213681692646j))*x_ref[2]
            arg[(0, 1, 0, 3)]+=(0.245500797143+0.528634206658j)*x[2]**o + ((-0.254873937323+0.666072931688j))*x[2]
            ref[(0, 1, 0, 3)]+=(0.245500797143+0.528634206658j)*x_ref[2]**o + ((-0.254873937323+0.666072931688j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.471457977143-0.829209133294j)*x[2]**o + ((-0.114149813666-0.868631230779j))*x[2]
            ref[(0, 1, 1, 0)]+=(0.471457977143-0.829209133294j)*x_ref[2]**o + ((-0.114149813666-0.868631230779j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.761285417479+0.0667781785817j)*x[2]**o + ((0.827644961503+0.157820033369j))*x[2]
            ref[(0, 1, 1, 1)]+=(-0.761285417479+0.0667781785817j)*x_ref[2]**o + ((0.827644961503+0.157820033369j))*x_ref[2]
            arg[(0, 1, 1, 2)]+=(0.165426195591+0.552793019807j)*x[2]**o + ((-0.300388638762-0.280744988358j))*x[2]
            ref[(0, 1, 1, 2)]+=(0.165426195591+0.552793019807j)*x_ref[2]**o + ((-0.300388638762-0.280744988358j))*x_ref[2]
            arg[(0, 1, 1, 3)]+=(-0.0491006998548-0.356606009443j)*x[2]**o + ((-0.600768477752+0.903020733294j))*x[2]
            ref[(0, 1, 1, 3)]+=(-0.0491006998548-0.356606009443j)*x_ref[2]**o + ((-0.600768477752+0.903020733294j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(-0.479606159119-0.499059675232j)*x[2]**o + ((-0.445414996379-0.155631008621j))*x[2]
            ref[(0, 1, 2, 0)]+=(-0.479606159119-0.499059675232j)*x_ref[2]**o + ((-0.445414996379-0.155631008621j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(0.765468608463-0.259095813268j)*x[2]**o + ((0.449918339807+0.152754044827j))*x[2]
            ref[(0, 1, 2, 1)]+=(0.765468608463-0.259095813268j)*x_ref[2]**o + ((0.449918339807+0.152754044827j))*x_ref[2]
            arg[(0, 1, 2, 2)]+=(0.282080801411-0.960201381764j)*x[2]**o + ((0.440344079913+0.898840138817j))*x[2]
            ref[(0, 1, 2, 2)]+=(0.282080801411-0.960201381764j)*x_ref[2]**o + ((0.440344079913+0.898840138817j))*x_ref[2]
            arg[(0, 1, 2, 3)]+=(0.439477285964-0.520452934622j)*x[2]**o + ((-0.982342753613-0.665289555429j))*x[2]
            ref[(0, 1, 2, 3)]+=(0.439477285964-0.520452934622j)*x_ref[2]**o + ((-0.982342753613-0.665289555429j))*x_ref[2]
            arg[(0, 1, 3, 0)]+=(-0.539018092104+0.926017227931j)*x[2]**o + ((0.845829845041+0.375580242693j))*x[2]
            ref[(0, 1, 3, 0)]+=(-0.539018092104+0.926017227931j)*x_ref[2]**o + ((0.845829845041+0.375580242693j))*x_ref[2]
            arg[(0, 1, 3, 1)]+=(0.377442691934+0.0544260174269j)*x[2]**o + ((-0.797479555541+0.44194760002j))*x[2]
            ref[(0, 1, 3, 1)]+=(0.377442691934+0.0544260174269j)*x_ref[2]**o + ((-0.797479555541+0.44194760002j))*x_ref[2]
            arg[(0, 1, 3, 2)]+=(0.330967720186+0.18725928132j)*x[2]**o + ((0.112367045404-0.716396246951j))*x[2]
            ref[(0, 1, 3, 2)]+=(0.330967720186+0.18725928132j)*x_ref[2]**o + ((0.112367045404-0.716396246951j))*x_ref[2]
            arg[(0, 1, 3, 3)]+=(0.246870755059+0.215564330764j)*x[2]**o + ((0.487880807581+0.308641557766j))*x[2]
            ref[(0, 1, 3, 3)]+=(0.246870755059+0.215564330764j)*x_ref[2]**o + ((0.487880807581+0.308641557766j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(-0.231888228156-0.874713124173j)*x[2]**o + ((0.577136082246+0.79483537389j))*x[2]
            ref[(0, 2, 0, 0)]+=(-0.231888228156-0.874713124173j)*x_ref[2]**o + ((0.577136082246+0.79483537389j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(0.425831295393+0.991095412163j)*x[2]**o + ((0.851111497242-0.0510617814266j))*x[2]
            ref[(0, 2, 0, 1)]+=(0.425831295393+0.991095412163j)*x_ref[2]**o + ((0.851111497242-0.0510617814266j))*x_ref[2]
            arg[(0, 2, 0, 2)]+=(-0.899148741684-0.819819011212j)*x[2]**o + ((-0.114437735796+0.429025929145j))*x[2]
            ref[(0, 2, 0, 2)]+=(-0.899148741684-0.819819011212j)*x_ref[2]**o + ((-0.114437735796+0.429025929145j))*x_ref[2]
            arg[(0, 2, 0, 3)]+=(-0.787390092349+0.29488500634j)*x[2]**o + ((-0.892531922659-0.332028432376j))*x[2]
            ref[(0, 2, 0, 3)]+=(-0.787390092349+0.29488500634j)*x_ref[2]**o + ((-0.892531922659-0.332028432376j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.305331128336+0.270259591738j)*x[2]**o + ((-0.656179286962+0.172826140557j))*x[2]
            ref[(0, 2, 1, 0)]+=(-0.305331128336+0.270259591738j)*x_ref[2]**o + ((-0.656179286962+0.172826140557j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(0.481654840034-0.18433875978j)*x[2]**o + ((0.250444308939-0.963411780811j))*x[2]
            ref[(0, 2, 1, 1)]+=(0.481654840034-0.18433875978j)*x_ref[2]**o + ((0.250444308939-0.963411780811j))*x_ref[2]
            arg[(0, 2, 1, 2)]+=(-0.18650858388-0.17731270443j)*x[2]**o + ((0.346047887781+0.489181434669j))*x[2]
            ref[(0, 2, 1, 2)]+=(-0.18650858388-0.17731270443j)*x_ref[2]**o + ((0.346047887781+0.489181434669j))*x_ref[2]
            arg[(0, 2, 1, 3)]+=(-0.893616712675-0.941831680509j)*x[2]**o + ((-0.353864416218-0.415777748963j))*x[2]
            ref[(0, 2, 1, 3)]+=(-0.893616712675-0.941831680509j)*x_ref[2]**o + ((-0.353864416218-0.415777748963j))*x_ref[2]
            arg[(0, 2, 2, 0)]+=(-0.714496407822-0.239936126423j)*x[2]**o + ((-0.690169311007-0.432620061621j))*x[2]
            ref[(0, 2, 2, 0)]+=(-0.714496407822-0.239936126423j)*x_ref[2]**o + ((-0.690169311007-0.432620061621j))*x_ref[2]
            arg[(0, 2, 2, 1)]+=(0.889192554685+0.61148165434j)*x[2]**o + ((0.460013240917-0.109677492216j))*x[2]
            ref[(0, 2, 2, 1)]+=(0.889192554685+0.61148165434j)*x_ref[2]**o + ((0.460013240917-0.109677492216j))*x_ref[2]
            arg[(0, 2, 2, 2)]+=(0.744826884778+0.642787625335j)*x[2]**o + ((-0.354039328312+0.307833111067j))*x[2]
            ref[(0, 2, 2, 2)]+=(0.744826884778+0.642787625335j)*x_ref[2]**o + ((-0.354039328312+0.307833111067j))*x_ref[2]
            arg[(0, 2, 2, 3)]+=(-0.581537360792+0.500648666839j)*x[2]**o + ((0.136679299755-0.749851499253j))*x[2]
            ref[(0, 2, 2, 3)]+=(-0.581537360792+0.500648666839j)*x_ref[2]**o + ((0.136679299755-0.749851499253j))*x_ref[2]
            arg[(0, 2, 3, 0)]+=(-0.341094568347+0.619403732211j)*x[2]**o + ((-0.912622288035+0.340358641536j))*x[2]
            ref[(0, 2, 3, 0)]+=(-0.341094568347+0.619403732211j)*x_ref[2]**o + ((-0.912622288035+0.340358641536j))*x_ref[2]
            arg[(0, 2, 3, 1)]+=(0.0441537000283-0.816317847359j)*x[2]**o + ((-0.872389081474-0.731300651576j))*x[2]
            ref[(0, 2, 3, 1)]+=(0.0441537000283-0.816317847359j)*x_ref[2]**o + ((-0.872389081474-0.731300651576j))*x_ref[2]
            arg[(0, 2, 3, 2)]+=(-0.76376326185-0.775002506483j)*x[2]**o + ((-0.413811271784-0.571829204195j))*x[2]
            ref[(0, 2, 3, 2)]+=(-0.76376326185-0.775002506483j)*x_ref[2]**o + ((-0.413811271784-0.571829204195j))*x_ref[2]
            arg[(0, 2, 3, 3)]+=(-0.32731004688-0.405329315003j)*x[2]**o + ((-0.0061233599427+0.438435386228j))*x[2]
            ref[(0, 2, 3, 3)]+=(-0.32731004688-0.405329315003j)*x_ref[2]**o + ((-0.0061233599427+0.438435386228j))*x_ref[2]
            arg[(0, 3, 0, 0)]+=(0.527750587725-0.905367700004j)*x[2]**o + ((-0.305670318153+0.430807423344j))*x[2]
            ref[(0, 3, 0, 0)]+=(0.527750587725-0.905367700004j)*x_ref[2]**o + ((-0.305670318153+0.430807423344j))*x_ref[2]
            arg[(0, 3, 0, 1)]+=(-0.958383989115-0.93353959176j)*x[2]**o + ((-0.184456809017-0.295805574926j))*x[2]
            ref[(0, 3, 0, 1)]+=(-0.958383989115-0.93353959176j)*x_ref[2]**o + ((-0.184456809017-0.295805574926j))*x_ref[2]
            arg[(0, 3, 0, 2)]+=(0.294591748118+0.104955301777j)*x[2]**o + ((0.691611030275+0.648694972219j))*x[2]
            ref[(0, 3, 0, 2)]+=(0.294591748118+0.104955301777j)*x_ref[2]**o + ((0.691611030275+0.648694972219j))*x_ref[2]
            arg[(0, 3, 0, 3)]+=(-0.954921897238-0.347170957871j)*x[2]**o + ((-0.439426904851+0.131246643656j))*x[2]
            ref[(0, 3, 0, 3)]+=(-0.954921897238-0.347170957871j)*x_ref[2]**o + ((-0.439426904851+0.131246643656j))*x_ref[2]
            arg[(0, 3, 1, 0)]+=(0.406823380545-0.781898767621j)*x[2]**o + ((0.749617360681-0.776326451876j))*x[2]
            ref[(0, 3, 1, 0)]+=(0.406823380545-0.781898767621j)*x_ref[2]**o + ((0.749617360681-0.776326451876j))*x_ref[2]
            arg[(0, 3, 1, 1)]+=(-0.0645116083682-0.961433215613j)*x[2]**o + ((-0.121930525149+0.206123101218j))*x[2]
            ref[(0, 3, 1, 1)]+=(-0.0645116083682-0.961433215613j)*x_ref[2]**o + ((-0.121930525149+0.206123101218j))*x_ref[2]
            arg[(0, 3, 1, 2)]+=(-0.377124684418+0.964858304284j)*x[2]**o + ((-0.271315513278-0.450297840443j))*x[2]
            ref[(0, 3, 1, 2)]+=(-0.377124684418+0.964858304284j)*x_ref[2]**o + ((-0.271315513278-0.450297840443j))*x_ref[2]
            arg[(0, 3, 1, 3)]+=(0.349253721193+0.822533797009j)*x[2]**o + ((0.861105341346-0.41322274267j))*x[2]
            ref[(0, 3, 1, 3)]+=(0.349253721193+0.822533797009j)*x_ref[2]**o + ((0.861105341346-0.41322274267j))*x_ref[2]
            arg[(0, 3, 2, 0)]+=(-0.251610332794+0.0919824673916j)*x[2]**o + ((0.822200335157+0.0255488265888j))*x[2]
            ref[(0, 3, 2, 0)]+=(-0.251610332794+0.0919824673916j)*x_ref[2]**o + ((0.822200335157+0.0255488265888j))*x_ref[2]
            arg[(0, 3, 2, 1)]+=(-0.267310621082-0.646129778497j)*x[2]**o + ((0.194049163745+0.161366529686j))*x[2]
            ref[(0, 3, 2, 1)]+=(-0.267310621082-0.646129778497j)*x_ref[2]**o + ((0.194049163745+0.161366529686j))*x_ref[2]
            arg[(0, 3, 2, 2)]+=(0.542824857459-0.583317027441j)*x[2]**o + ((0.909797648749+0.56627849657j))*x[2]
            ref[(0, 3, 2, 2)]+=(0.542824857459-0.583317027441j)*x_ref[2]**o + ((0.909797648749+0.56627849657j))*x_ref[2]
            arg[(0, 3, 2, 3)]+=(-0.652239198181+0.313451488727j)*x[2]**o + ((-0.773752184949+0.565342631473j))*x[2]
            ref[(0, 3, 2, 3)]+=(-0.652239198181+0.313451488727j)*x_ref[2]**o + ((-0.773752184949+0.565342631473j))*x_ref[2]
            arg[(0, 3, 3, 0)]+=(0.808887680247+0.617156352754j)*x[2]**o + ((0.332604085208+0.928810600974j))*x[2]
            ref[(0, 3, 3, 0)]+=(0.808887680247+0.617156352754j)*x_ref[2]**o + ((0.332604085208+0.928810600974j))*x_ref[2]
            arg[(0, 3, 3, 1)]+=(0.388046710964-0.901014883441j)*x[2]**o + ((-0.151647704316+0.66347307146j))*x[2]
            ref[(0, 3, 3, 1)]+=(0.388046710964-0.901014883441j)*x_ref[2]**o + ((-0.151647704316+0.66347307146j))*x_ref[2]
            arg[(0, 3, 3, 2)]+=(-0.803019652535-0.191870089817j)*x[2]**o + ((-0.465615296185-0.169467526068j))*x[2]
            ref[(0, 3, 3, 2)]+=(-0.803019652535-0.191870089817j)*x_ref[2]**o + ((-0.465615296185-0.169467526068j))*x_ref[2]
            arg[(0, 3, 3, 3)]+=(-0.0344582810864-0.915041194336j)*x[2]**o + ((-0.155752978479+0.751272601189j))*x[2]
            ref[(0, 3, 3, 3)]+=(-0.0344582810864-0.915041194336j)*x_ref[2]**o + ((-0.155752978479+0.751272601189j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.185785296404+0.527824335577j)*x[2]**o + ((0.181116069907+0.758530580288j))*x[2]
            ref[(1, 0, 0, 0)]+=(-0.185785296404+0.527824335577j)*x_ref[2]**o + ((0.181116069907+0.758530580288j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(-0.813685342259+0.147940655727j)*x[2]**o + ((-0.094745586223-0.982423566509j))*x[2]
            ref[(1, 0, 0, 1)]+=(-0.813685342259+0.147940655727j)*x_ref[2]**o + ((-0.094745586223-0.982423566509j))*x_ref[2]
            arg[(1, 0, 0, 2)]+=(0.978664495057-0.452445839647j)*x[2]**o + ((0.565643366075-0.429308062549j))*x[2]
            ref[(1, 0, 0, 2)]+=(0.978664495057-0.452445839647j)*x_ref[2]**o + ((0.565643366075-0.429308062549j))*x_ref[2]
            arg[(1, 0, 0, 3)]+=(0.758652061723+0.603549780762j)*x[2]**o + ((0.10493224283-0.804520167899j))*x[2]
            ref[(1, 0, 0, 3)]+=(0.758652061723+0.603549780762j)*x_ref[2]**o + ((0.10493224283-0.804520167899j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.032763571924-0.402593284548j)*x[2]**o + ((-0.474107570222-0.989936592749j))*x[2]
            ref[(1, 0, 1, 0)]+=(-0.032763571924-0.402593284548j)*x_ref[2]**o + ((-0.474107570222-0.989936592749j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.0107600274104+0.0456229484668j)*x[2]**o + ((0.165138167898+0.240261781374j))*x[2]
            ref[(1, 0, 1, 1)]+=(-0.0107600274104+0.0456229484668j)*x_ref[2]**o + ((0.165138167898+0.240261781374j))*x_ref[2]
            arg[(1, 0, 1, 2)]+=(-0.65004642757-0.575270202743j)*x[2]**o + ((0.0999250454034+0.949376881408j))*x[2]
            ref[(1, 0, 1, 2)]+=(-0.65004642757-0.575270202743j)*x_ref[2]**o + ((0.0999250454034+0.949376881408j))*x_ref[2]
            arg[(1, 0, 1, 3)]+=(0.583644935606-0.383474661986j)*x[2]**o + ((-0.296103790041-0.67651475828j))*x[2]
            ref[(1, 0, 1, 3)]+=(0.583644935606-0.383474661986j)*x_ref[2]**o + ((-0.296103790041-0.67651475828j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(-0.633568526548+0.267152985456j)*x[2]**o + ((-0.151854299419-0.634433871062j))*x[2]
            ref[(1, 0, 2, 0)]+=(-0.633568526548+0.267152985456j)*x_ref[2]**o + ((-0.151854299419-0.634433871062j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(0.504736680464-0.316971265843j)*x[2]**o + ((-0.132090593393-0.674211594523j))*x[2]
            ref[(1, 0, 2, 1)]+=(0.504736680464-0.316971265843j)*x_ref[2]**o + ((-0.132090593393-0.674211594523j))*x_ref[2]
            arg[(1, 0, 2, 2)]+=(-0.962313551878+0.833886708232j)*x[2]**o + ((-0.357178865149-0.82723331282j))*x[2]
            ref[(1, 0, 2, 2)]+=(-0.962313551878+0.833886708232j)*x_ref[2]**o + ((-0.357178865149-0.82723331282j))*x_ref[2]
            arg[(1, 0, 2, 3)]+=(-0.0916100430982+0.960957418578j)*x[2]**o + ((0.872373073113-0.36845400326j))*x[2]
            ref[(1, 0, 2, 3)]+=(-0.0916100430982+0.960957418578j)*x_ref[2]**o + ((0.872373073113-0.36845400326j))*x_ref[2]
            arg[(1, 0, 3, 0)]+=(-0.298731706174+0.772339549772j)*x[2]**o + ((0.629607952548-0.0293664336317j))*x[2]
            ref[(1, 0, 3, 0)]+=(-0.298731706174+0.772339549772j)*x_ref[2]**o + ((0.629607952548-0.0293664336317j))*x_ref[2]
            arg[(1, 0, 3, 1)]+=(0.424454413002-0.283039615352j)*x[2]**o + ((-0.124379379257-0.718233634554j))*x[2]
            ref[(1, 0, 3, 1)]+=(0.424454413002-0.283039615352j)*x_ref[2]**o + ((-0.124379379257-0.718233634554j))*x_ref[2]
            arg[(1, 0, 3, 2)]+=(0.978181446637-0.669948174699j)*x[2]**o + ((-0.023612903443-0.792057842524j))*x[2]
            ref[(1, 0, 3, 2)]+=(0.978181446637-0.669948174699j)*x_ref[2]**o + ((-0.023612903443-0.792057842524j))*x_ref[2]
            arg[(1, 0, 3, 3)]+=(0.377932946221+0.933950435239j)*x[2]**o + ((0.745701579222+0.287308410408j))*x[2]
            ref[(1, 0, 3, 3)]+=(0.377932946221+0.933950435239j)*x_ref[2]**o + ((0.745701579222+0.287308410408j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.825292417128+0.648545848877j)*x[2]**o + ((0.0745554976745-0.165936767783j))*x[2]
            ref[(1, 1, 0, 0)]+=(0.825292417128+0.648545848877j)*x_ref[2]**o + ((0.0745554976745-0.165936767783j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.727295344184+0.946762976099j)*x[2]**o + ((-0.00921538570458-0.198879577291j))*x[2]
            ref[(1, 1, 0, 1)]+=(0.727295344184+0.946762976099j)*x_ref[2]**o + ((-0.00921538570458-0.198879577291j))*x_ref[2]
            arg[(1, 1, 0, 2)]+=(-0.321763085283+0.00622608055984j)*x[2]**o + ((-0.643181330856-0.257226100342j))*x[2]
            ref[(1, 1, 0, 2)]+=(-0.321763085283+0.00622608055984j)*x_ref[2]**o + ((-0.643181330856-0.257226100342j))*x_ref[2]
            arg[(1, 1, 0, 3)]+=(0.321743832433+0.413758983302j)*x[2]**o + ((-0.0711978406024+0.270814602582j))*x[2]
            ref[(1, 1, 0, 3)]+=(0.321743832433+0.413758983302j)*x_ref[2]**o + ((-0.0711978406024+0.270814602582j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.515113408306-0.346020505544j)*x[2]**o + ((-0.641049819225+0.124962981429j))*x[2]
            ref[(1, 1, 1, 0)]+=(0.515113408306-0.346020505544j)*x_ref[2]**o + ((-0.641049819225+0.124962981429j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.314895603725+0.532543172031j)*x[2]**o + ((0.424313965144-0.633937450224j))*x[2]
            ref[(1, 1, 1, 1)]+=(0.314895603725+0.532543172031j)*x_ref[2]**o + ((0.424313965144-0.633937450224j))*x_ref[2]
            arg[(1, 1, 1, 2)]+=(-0.695085860571-0.888916531509j)*x[2]**o + ((-0.526136690491-0.0144205284667j))*x[2]
            ref[(1, 1, 1, 2)]+=(-0.695085860571-0.888916531509j)*x_ref[2]**o + ((-0.526136690491-0.0144205284667j))*x_ref[2]
            arg[(1, 1, 1, 3)]+=(-0.404438631836-0.438311786195j)*x[2]**o + ((-0.162206199331+0.151416393356j))*x[2]
            ref[(1, 1, 1, 3)]+=(-0.404438631836-0.438311786195j)*x_ref[2]**o + ((-0.162206199331+0.151416393356j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(-0.664979511793+0.0919231739309j)*x[2]**o + ((0.785829241914-0.309296610107j))*x[2]
            ref[(1, 1, 2, 0)]+=(-0.664979511793+0.0919231739309j)*x_ref[2]**o + ((0.785829241914-0.309296610107j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(0.302262735552+0.735904740029j)*x[2]**o + ((-0.48276984507+0.913161926035j))*x[2]
            ref[(1, 1, 2, 1)]+=(0.302262735552+0.735904740029j)*x_ref[2]**o + ((-0.48276984507+0.913161926035j))*x_ref[2]
            arg[(1, 1, 2, 2)]+=(0.255814085158+0.930777958505j)*x[2]**o + ((-0.609815985553+0.293370893175j))*x[2]
            ref[(1, 1, 2, 2)]+=(0.255814085158+0.930777958505j)*x_ref[2]**o + ((-0.609815985553+0.293370893175j))*x_ref[2]
            arg[(1, 1, 2, 3)]+=(-0.405161433434+0.45567386118j)*x[2]**o + ((-0.0874334125191-0.661892907984j))*x[2]
            ref[(1, 1, 2, 3)]+=(-0.405161433434+0.45567386118j)*x_ref[2]**o + ((-0.0874334125191-0.661892907984j))*x_ref[2]
            arg[(1, 1, 3, 0)]+=(0.310974465376+0.856568298233j)*x[2]**o + ((-0.459173490003-0.0344068231307j))*x[2]
            ref[(1, 1, 3, 0)]+=(0.310974465376+0.856568298233j)*x_ref[2]**o + ((-0.459173490003-0.0344068231307j))*x_ref[2]
            arg[(1, 1, 3, 1)]+=(0.907256786161+0.494713486471j)*x[2]**o + ((-0.12637101893-0.622168306383j))*x[2]
            ref[(1, 1, 3, 1)]+=(0.907256786161+0.494713486471j)*x_ref[2]**o + ((-0.12637101893-0.622168306383j))*x_ref[2]
            arg[(1, 1, 3, 2)]+=(-0.583558863394-0.444731146244j)*x[2]**o + ((0.162447101137+0.790401121531j))*x[2]
            ref[(1, 1, 3, 2)]+=(-0.583558863394-0.444731146244j)*x_ref[2]**o + ((0.162447101137+0.790401121531j))*x_ref[2]
            arg[(1, 1, 3, 3)]+=(-0.129340990066+0.242344135795j)*x[2]**o + ((-0.165442920723+0.838176382607j))*x[2]
            ref[(1, 1, 3, 3)]+=(-0.129340990066+0.242344135795j)*x_ref[2]**o + ((-0.165442920723+0.838176382607j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(-0.378000054011+0.112092668484j)*x[2]**o + ((0.954315802226-0.527316213637j))*x[2]
            ref[(1, 2, 0, 0)]+=(-0.378000054011+0.112092668484j)*x_ref[2]**o + ((0.954315802226-0.527316213637j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(-0.490934353615-0.825227124973j)*x[2]**o + ((-0.0978301814335+0.951987084449j))*x[2]
            ref[(1, 2, 0, 1)]+=(-0.490934353615-0.825227124973j)*x_ref[2]**o + ((-0.0978301814335+0.951987084449j))*x_ref[2]
            arg[(1, 2, 0, 2)]+=(0.812720752879+0.996056304148j)*x[2]**o + ((-0.062281116552+0.0571182872012j))*x[2]
            ref[(1, 2, 0, 2)]+=(0.812720752879+0.996056304148j)*x_ref[2]**o + ((-0.062281116552+0.0571182872012j))*x_ref[2]
            arg[(1, 2, 0, 3)]+=(-0.22458161031-0.177909804606j)*x[2]**o + ((-0.597028441499+0.761249858252j))*x[2]
            ref[(1, 2, 0, 3)]+=(-0.22458161031-0.177909804606j)*x_ref[2]**o + ((-0.597028441499+0.761249858252j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(0.0610098651786+0.894783072685j)*x[2]**o + ((0.535716427899-0.119871496274j))*x[2]
            ref[(1, 2, 1, 0)]+=(0.0610098651786+0.894783072685j)*x_ref[2]**o + ((0.535716427899-0.119871496274j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(0.44444718893-0.106906331112j)*x[2]**o + ((0.850287468445+0.850147120133j))*x[2]
            ref[(1, 2, 1, 1)]+=(0.44444718893-0.106906331112j)*x_ref[2]**o + ((0.850287468445+0.850147120133j))*x_ref[2]
            arg[(1, 2, 1, 2)]+=(0.132008599572-0.00702274640247j)*x[2]**o + ((0.442130317817-0.522676673993j))*x[2]
            ref[(1, 2, 1, 2)]+=(0.132008599572-0.00702274640247j)*x_ref[2]**o + ((0.442130317817-0.522676673993j))*x_ref[2]
            arg[(1, 2, 1, 3)]+=(0.536509884485+0.302523152648j)*x[2]**o + ((-0.123751335014-0.197969891647j))*x[2]
            ref[(1, 2, 1, 3)]+=(0.536509884485+0.302523152648j)*x_ref[2]**o + ((-0.123751335014-0.197969891647j))*x_ref[2]
            arg[(1, 2, 2, 0)]+=(-0.41261991717+0.597038267926j)*x[2]**o + ((-0.0599721862671-0.522868572502j))*x[2]
            ref[(1, 2, 2, 0)]+=(-0.41261991717+0.597038267926j)*x_ref[2]**o + ((-0.0599721862671-0.522868572502j))*x_ref[2]
            arg[(1, 2, 2, 1)]+=(-0.556860164193-0.736447874252j)*x[2]**o + ((0.95247383333+0.0734841782148j))*x[2]
            ref[(1, 2, 2, 1)]+=(-0.556860164193-0.736447874252j)*x_ref[2]**o + ((0.95247383333+0.0734841782148j))*x_ref[2]
            arg[(1, 2, 2, 2)]+=(0.873061972041-0.985747134277j)*x[2]**o + ((0.284490066371+0.0354400112943j))*x[2]
            ref[(1, 2, 2, 2)]+=(0.873061972041-0.985747134277j)*x_ref[2]**o + ((0.284490066371+0.0354400112943j))*x_ref[2]
            arg[(1, 2, 2, 3)]+=(-0.0657447391301-0.950095590631j)*x[2]**o + ((-0.787536331429+0.644343420875j))*x[2]
            ref[(1, 2, 2, 3)]+=(-0.0657447391301-0.950095590631j)*x_ref[2]**o + ((-0.787536331429+0.644343420875j))*x_ref[2]
            arg[(1, 2, 3, 0)]+=(0.285683242704-0.204813285091j)*x[2]**o + ((-0.891955831364+0.88842878976j))*x[2]
            ref[(1, 2, 3, 0)]+=(0.285683242704-0.204813285091j)*x_ref[2]**o + ((-0.891955831364+0.88842878976j))*x_ref[2]
            arg[(1, 2, 3, 1)]+=(-0.640720056328+0.759358518894j)*x[2]**o + ((-0.554146856318-0.823177065847j))*x[2]
            ref[(1, 2, 3, 1)]+=(-0.640720056328+0.759358518894j)*x_ref[2]**o + ((-0.554146856318-0.823177065847j))*x_ref[2]
            arg[(1, 2, 3, 2)]+=(-0.484340213175-0.455542071704j)*x[2]**o + ((0.352325781165+0.966802600964j))*x[2]
            ref[(1, 2, 3, 2)]+=(-0.484340213175-0.455542071704j)*x_ref[2]**o + ((0.352325781165+0.966802600964j))*x_ref[2]
            arg[(1, 2, 3, 3)]+=(-0.442747329945-0.0207851455691j)*x[2]**o + ((0.128391363703+0.827079568074j))*x[2]
            ref[(1, 2, 3, 3)]+=(-0.442747329945-0.0207851455691j)*x_ref[2]**o + ((0.128391363703+0.827079568074j))*x_ref[2]
            arg[(1, 3, 0, 0)]+=(-0.595433307218-0.654066588238j)*x[2]**o + ((-0.807033318738+0.88402404918j))*x[2]
            ref[(1, 3, 0, 0)]+=(-0.595433307218-0.654066588238j)*x_ref[2]**o + ((-0.807033318738+0.88402404918j))*x_ref[2]
            arg[(1, 3, 0, 1)]+=(-0.532792437634+0.51060112407j)*x[2]**o + ((0.914931669238-0.139994618108j))*x[2]
            ref[(1, 3, 0, 1)]+=(-0.532792437634+0.51060112407j)*x_ref[2]**o + ((0.914931669238-0.139994618108j))*x_ref[2]
            arg[(1, 3, 0, 2)]+=(-0.442060264969-0.936956533884j)*x[2]**o + ((-0.378842169745-0.699854093071j))*x[2]
            ref[(1, 3, 0, 2)]+=(-0.442060264969-0.936956533884j)*x_ref[2]**o + ((-0.378842169745-0.699854093071j))*x_ref[2]
            arg[(1, 3, 0, 3)]+=(-0.217246128715-0.909224827505j)*x[2]**o + ((-0.326886266434+0.276116640386j))*x[2]
            ref[(1, 3, 0, 3)]+=(-0.217246128715-0.909224827505j)*x_ref[2]**o + ((-0.326886266434+0.276116640386j))*x_ref[2]
            arg[(1, 3, 1, 0)]+=(0.410420271699+0.705010899592j)*x[2]**o + ((0.695755889347+0.456949250889j))*x[2]
            ref[(1, 3, 1, 0)]+=(0.410420271699+0.705010899592j)*x_ref[2]**o + ((0.695755889347+0.456949250889j))*x_ref[2]
            arg[(1, 3, 1, 1)]+=(-0.201140663284-0.240573940774j)*x[2]**o + ((0.747664287951-0.234545355977j))*x[2]
            ref[(1, 3, 1, 1)]+=(-0.201140663284-0.240573940774j)*x_ref[2]**o + ((0.747664287951-0.234545355977j))*x_ref[2]
            arg[(1, 3, 1, 2)]+=(0.759364489967-0.286068019348j)*x[2]**o + ((-0.241297424379+0.687810486599j))*x[2]
            ref[(1, 3, 1, 2)]+=(0.759364489967-0.286068019348j)*x_ref[2]**o + ((-0.241297424379+0.687810486599j))*x_ref[2]
            arg[(1, 3, 1, 3)]+=(-0.985606784773+0.23692696844j)*x[2]**o + ((-0.655147065245-0.316026221541j))*x[2]
            ref[(1, 3, 1, 3)]+=(-0.985606784773+0.23692696844j)*x_ref[2]**o + ((-0.655147065245-0.316026221541j))*x_ref[2]
            arg[(1, 3, 2, 0)]+=(0.221455228252+0.640027889061j)*x[2]**o + ((0.945851317822-0.0621832294305j))*x[2]
            ref[(1, 3, 2, 0)]+=(0.221455228252+0.640027889061j)*x_ref[2]**o + ((0.945851317822-0.0621832294305j))*x_ref[2]
            arg[(1, 3, 2, 1)]+=(0.0336224427327+0.445327706818j)*x[2]**o + ((0.338381156792-0.310459902966j))*x[2]
            ref[(1, 3, 2, 1)]+=(0.0336224427327+0.445327706818j)*x_ref[2]**o + ((0.338381156792-0.310459902966j))*x_ref[2]
            arg[(1, 3, 2, 2)]+=(0.771890150874+0.929409884394j)*x[2]**o + ((-0.336985710541-0.470097822843j))*x[2]
            ref[(1, 3, 2, 2)]+=(0.771890150874+0.929409884394j)*x_ref[2]**o + ((-0.336985710541-0.470097822843j))*x_ref[2]
            arg[(1, 3, 2, 3)]+=(-0.784983988802+0.781005568329j)*x[2]**o + ((-0.361334939136-0.186286386021j))*x[2]
            ref[(1, 3, 2, 3)]+=(-0.784983988802+0.781005568329j)*x_ref[2]**o + ((-0.361334939136-0.186286386021j))*x_ref[2]
            arg[(1, 3, 3, 0)]+=(-0.735354612016+0.125208249891j)*x[2]**o + ((0.288505684729+0.540353277546j))*x[2]
            ref[(1, 3, 3, 0)]+=(-0.735354612016+0.125208249891j)*x_ref[2]**o + ((0.288505684729+0.540353277546j))*x_ref[2]
            arg[(1, 3, 3, 1)]+=(0.248682199385-0.837492948653j)*x[2]**o + ((-0.124131047675-0.54910435435j))*x[2]
            ref[(1, 3, 3, 1)]+=(0.248682199385-0.837492948653j)*x_ref[2]**o + ((-0.124131047675-0.54910435435j))*x_ref[2]
            arg[(1, 3, 3, 2)]+=(-0.730319292579-0.628675270348j)*x[2]**o + ((-0.841543003227-0.659661133219j))*x[2]
            ref[(1, 3, 3, 2)]+=(-0.730319292579-0.628675270348j)*x_ref[2]**o + ((-0.841543003227-0.659661133219j))*x_ref[2]
            arg[(1, 3, 3, 3)]+=(0.452517857337-0.133803743197j)*x[2]**o + ((-0.464174640354-0.341759601832j))*x[2]
            ref[(1, 3, 3, 3)]+=(0.452517857337-0.133803743197j)*x_ref[2]**o + ((-0.464174640354-0.341759601832j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(0.509346343208+0.769644221905j)*x[2]**o + ((-0.843636396019-0.0474604378625j))*x[2]
            ref[(2, 0, 0, 0)]+=(0.509346343208+0.769644221905j)*x_ref[2]**o + ((-0.843636396019-0.0474604378625j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(0.153530355765+0.845107732789j)*x[2]**o + ((-0.897392455756+0.721144878104j))*x[2]
            ref[(2, 0, 0, 1)]+=(0.153530355765+0.845107732789j)*x_ref[2]**o + ((-0.897392455756+0.721144878104j))*x_ref[2]
            arg[(2, 0, 0, 2)]+=(0.864889999068+0.594958231318j)*x[2]**o + ((0.455608832737+0.658910693001j))*x[2]
            ref[(2, 0, 0, 2)]+=(0.864889999068+0.594958231318j)*x_ref[2]**o + ((0.455608832737+0.658910693001j))*x_ref[2]
            arg[(2, 0, 0, 3)]+=(0.786583642178-0.935065422186j)*x[2]**o + ((0.321801794113+0.758199139115j))*x[2]
            ref[(2, 0, 0, 3)]+=(0.786583642178-0.935065422186j)*x_ref[2]**o + ((0.321801794113+0.758199139115j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(-0.741994989172-0.0327494075163j)*x[2]**o + ((-0.244403518769-0.727454237658j))*x[2]
            ref[(2, 0, 1, 0)]+=(-0.741994989172-0.0327494075163j)*x_ref[2]**o + ((-0.244403518769-0.727454237658j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(-0.0158734618771-0.377428596636j)*x[2]**o + ((-0.00327064596172-0.103420417726j))*x[2]
            ref[(2, 0, 1, 1)]+=(-0.0158734618771-0.377428596636j)*x_ref[2]**o + ((-0.00327064596172-0.103420417726j))*x_ref[2]
            arg[(2, 0, 1, 2)]+=(-0.655966254702+0.701811548331j)*x[2]**o + ((0.615437739794-0.519907438761j))*x[2]
            ref[(2, 0, 1, 2)]+=(-0.655966254702+0.701811548331j)*x_ref[2]**o + ((0.615437739794-0.519907438761j))*x_ref[2]
            arg[(2, 0, 1, 3)]+=(-0.528865936957-0.421924422404j)*x[2]**o + ((-0.421746563479+0.755130987541j))*x[2]
            ref[(2, 0, 1, 3)]+=(-0.528865936957-0.421924422404j)*x_ref[2]**o + ((-0.421746563479+0.755130987541j))*x_ref[2]
            arg[(2, 0, 2, 0)]+=(-0.151933567631+0.376005058561j)*x[2]**o + ((-0.0621043631773+0.935540958806j))*x[2]
            ref[(2, 0, 2, 0)]+=(-0.151933567631+0.376005058561j)*x_ref[2]**o + ((-0.0621043631773+0.935540958806j))*x_ref[2]
            arg[(2, 0, 2, 1)]+=(-0.516655369248-0.0577027443674j)*x[2]**o + ((-0.728925621331-0.251565500632j))*x[2]
            ref[(2, 0, 2, 1)]+=(-0.516655369248-0.0577027443674j)*x_ref[2]**o + ((-0.728925621331-0.251565500632j))*x_ref[2]
            arg[(2, 0, 2, 2)]+=(0.655525478413+0.152034484549j)*x[2]**o + ((0.120089731935-0.570341389766j))*x[2]
            ref[(2, 0, 2, 2)]+=(0.655525478413+0.152034484549j)*x_ref[2]**o + ((0.120089731935-0.570341389766j))*x_ref[2]
            arg[(2, 0, 2, 3)]+=(0.158063962148+0.785338269623j)*x[2]**o + ((-0.831368458812+0.327674236279j))*x[2]
            ref[(2, 0, 2, 3)]+=(0.158063962148+0.785338269623j)*x_ref[2]**o + ((-0.831368458812+0.327674236279j))*x_ref[2]
            arg[(2, 0, 3, 0)]+=(0.251175924768+0.0467823097661j)*x[2]**o + ((-0.287728278769-0.828550525839j))*x[2]
            ref[(2, 0, 3, 0)]+=(0.251175924768+0.0467823097661j)*x_ref[2]**o + ((-0.287728278769-0.828550525839j))*x_ref[2]
            arg[(2, 0, 3, 1)]+=(-0.436574361281+0.0519970567738j)*x[2]**o + ((-0.951939040696+0.974287696703j))*x[2]
            ref[(2, 0, 3, 1)]+=(-0.436574361281+0.0519970567738j)*x_ref[2]**o + ((-0.951939040696+0.974287696703j))*x_ref[2]
            arg[(2, 0, 3, 2)]+=(0.991042539683-0.314967068138j)*x[2]**o + ((-0.572878028657-0.900598239727j))*x[2]
            ref[(2, 0, 3, 2)]+=(0.991042539683-0.314967068138j)*x_ref[2]**o + ((-0.572878028657-0.900598239727j))*x_ref[2]
            arg[(2, 0, 3, 3)]+=(0.77453401921-0.240260272803j)*x[2]**o + ((0.0333763879155+0.608700325297j))*x[2]
            ref[(2, 0, 3, 3)]+=(0.77453401921-0.240260272803j)*x_ref[2]**o + ((0.0333763879155+0.608700325297j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(0.634560693166-0.347132589295j)*x[2]**o + ((0.735910083493+0.971399582114j))*x[2]
            ref[(2, 1, 0, 0)]+=(0.634560693166-0.347132589295j)*x_ref[2]**o + ((0.735910083493+0.971399582114j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(0.404099467951+0.20166175262j)*x[2]**o + ((-0.747755977524+0.189914478814j))*x[2]
            ref[(2, 1, 0, 1)]+=(0.404099467951+0.20166175262j)*x_ref[2]**o + ((-0.747755977524+0.189914478814j))*x_ref[2]
            arg[(2, 1, 0, 2)]+=(-0.175669811768-0.511758085079j)*x[2]**o + ((-0.99552416305+0.490009970668j))*x[2]
            ref[(2, 1, 0, 2)]+=(-0.175669811768-0.511758085079j)*x_ref[2]**o + ((-0.99552416305+0.490009970668j))*x_ref[2]
            arg[(2, 1, 0, 3)]+=(0.418928007398-0.542934671896j)*x[2]**o + ((-0.570637186882+0.748059439697j))*x[2]
            ref[(2, 1, 0, 3)]+=(0.418928007398-0.542934671896j)*x_ref[2]**o + ((-0.570637186882+0.748059439697j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(-0.603539110622+0.95034855675j)*x[2]**o + ((0.90151681079-0.283315022084j))*x[2]
            ref[(2, 1, 1, 0)]+=(-0.603539110622+0.95034855675j)*x_ref[2]**o + ((0.90151681079-0.283315022084j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(-0.75408168866-0.954534709381j)*x[2]**o + ((0.427422932358-0.960188693223j))*x[2]
            ref[(2, 1, 1, 1)]+=(-0.75408168866-0.954534709381j)*x_ref[2]**o + ((0.427422932358-0.960188693223j))*x_ref[2]
            arg[(2, 1, 1, 2)]+=(0.116627270735+0.359260593113j)*x[2]**o + ((0.359143708745-0.126176622401j))*x[2]
            ref[(2, 1, 1, 2)]+=(0.116627270735+0.359260593113j)*x_ref[2]**o + ((0.359143708745-0.126176622401j))*x_ref[2]
            arg[(2, 1, 1, 3)]+=(0.670397056956-0.56067506777j)*x[2]**o + ((0.818981959976-0.104468421894j))*x[2]
            ref[(2, 1, 1, 3)]+=(0.670397056956-0.56067506777j)*x_ref[2]**o + ((0.818981959976-0.104468421894j))*x_ref[2]
            arg[(2, 1, 2, 0)]+=(0.290330048843+0.2140993291j)*x[2]**o + ((0.743309007723-0.466705333858j))*x[2]
            ref[(2, 1, 2, 0)]+=(0.290330048843+0.2140993291j)*x_ref[2]**o + ((0.743309007723-0.466705333858j))*x_ref[2]
            arg[(2, 1, 2, 1)]+=(-0.780958347067-0.962122752406j)*x[2]**o + ((-0.453510147296-0.00531107813758j))*x[2]
            ref[(2, 1, 2, 1)]+=(-0.780958347067-0.962122752406j)*x_ref[2]**o + ((-0.453510147296-0.00531107813758j))*x_ref[2]
            arg[(2, 1, 2, 2)]+=(-0.382235836769+0.861716980981j)*x[2]**o + ((-0.376326461222-0.525485931821j))*x[2]
            ref[(2, 1, 2, 2)]+=(-0.382235836769+0.861716980981j)*x_ref[2]**o + ((-0.376326461222-0.525485931821j))*x_ref[2]
            arg[(2, 1, 2, 3)]+=(0.499934858243+0.216073353828j)*x[2]**o + ((0.624828356584+0.410352461691j))*x[2]
            ref[(2, 1, 2, 3)]+=(0.499934858243+0.216073353828j)*x_ref[2]**o + ((0.624828356584+0.410352461691j))*x_ref[2]
            arg[(2, 1, 3, 0)]+=(0.78919746815-0.268212228447j)*x[2]**o + ((0.0652121371406+0.0458506717211j))*x[2]
            ref[(2, 1, 3, 0)]+=(0.78919746815-0.268212228447j)*x_ref[2]**o + ((0.0652121371406+0.0458506717211j))*x_ref[2]
            arg[(2, 1, 3, 1)]+=(-0.614178061779-0.150910040836j)*x[2]**o + ((-0.121343862877-0.990253699937j))*x[2]
            ref[(2, 1, 3, 1)]+=(-0.614178061779-0.150910040836j)*x_ref[2]**o + ((-0.121343862877-0.990253699937j))*x_ref[2]
            arg[(2, 1, 3, 2)]+=(0.885133709932+0.94883827439j)*x[2]**o + ((0.979179422511-0.315524738239j))*x[2]
            ref[(2, 1, 3, 2)]+=(0.885133709932+0.94883827439j)*x_ref[2]**o + ((0.979179422511-0.315524738239j))*x_ref[2]
            arg[(2, 1, 3, 3)]+=(-0.264322686578-0.752222527356j)*x[2]**o + ((-0.835991503094+0.905691892497j))*x[2]
            ref[(2, 1, 3, 3)]+=(-0.264322686578-0.752222527356j)*x_ref[2]**o + ((-0.835991503094+0.905691892497j))*x_ref[2]
            arg[(2, 2, 0, 0)]+=(-0.631731465796+0.832566602677j)*x[2]**o + ((0.501728002269+0.1755498753j))*x[2]
            ref[(2, 2, 0, 0)]+=(-0.631731465796+0.832566602677j)*x_ref[2]**o + ((0.501728002269+0.1755498753j))*x_ref[2]
            arg[(2, 2, 0, 1)]+=(-0.0983624197153-0.606684474112j)*x[2]**o + ((0.0570400796962+0.956780535104j))*x[2]
            ref[(2, 2, 0, 1)]+=(-0.0983624197153-0.606684474112j)*x_ref[2]**o + ((0.0570400796962+0.956780535104j))*x_ref[2]
            arg[(2, 2, 0, 2)]+=(0.58869145749-0.196839839817j)*x[2]**o + ((-0.610144477602-0.388003023282j))*x[2]
            ref[(2, 2, 0, 2)]+=(0.58869145749-0.196839839817j)*x_ref[2]**o + ((-0.610144477602-0.388003023282j))*x_ref[2]
            arg[(2, 2, 0, 3)]+=(-0.696218023394+0.0288694328799j)*x[2]**o + ((-0.0599437888188+0.674667520491j))*x[2]
            ref[(2, 2, 0, 3)]+=(-0.696218023394+0.0288694328799j)*x_ref[2]**o + ((-0.0599437888188+0.674667520491j))*x_ref[2]
            arg[(2, 2, 1, 0)]+=(-0.993023823678-0.486670417283j)*x[2]**o + ((0.155645767588-0.952910288384j))*x[2]
            ref[(2, 2, 1, 0)]+=(-0.993023823678-0.486670417283j)*x_ref[2]**o + ((0.155645767588-0.952910288384j))*x_ref[2]
            arg[(2, 2, 1, 1)]+=(-0.573190873565-0.196919553131j)*x[2]**o + ((-0.0677384052221+0.427194228031j))*x[2]
            ref[(2, 2, 1, 1)]+=(-0.573190873565-0.196919553131j)*x_ref[2]**o + ((-0.0677384052221+0.427194228031j))*x_ref[2]
            arg[(2, 2, 1, 2)]+=(-0.966527670964-0.14344319495j)*x[2]**o + ((-0.12998265319+0.93274909371j))*x[2]
            ref[(2, 2, 1, 2)]+=(-0.966527670964-0.14344319495j)*x_ref[2]**o + ((-0.12998265319+0.93274909371j))*x_ref[2]
            arg[(2, 2, 1, 3)]+=(0.775110716177+0.461907703136j)*x[2]**o + ((-0.242783750105-0.108538866686j))*x[2]
            ref[(2, 2, 1, 3)]+=(0.775110716177+0.461907703136j)*x_ref[2]**o + ((-0.242783750105-0.108538866686j))*x_ref[2]
            arg[(2, 2, 2, 0)]+=(0.853079285322-0.748158510249j)*x[2]**o + ((-0.172903827365+0.0910091977227j))*x[2]
            ref[(2, 2, 2, 0)]+=(0.853079285322-0.748158510249j)*x_ref[2]**o + ((-0.172903827365+0.0910091977227j))*x_ref[2]
            arg[(2, 2, 2, 1)]+=(-0.710420773751-0.882074310786j)*x[2]**o + ((0.217380138159+0.553165930282j))*x[2]
            ref[(2, 2, 2, 1)]+=(-0.710420773751-0.882074310786j)*x_ref[2]**o + ((0.217380138159+0.553165930282j))*x_ref[2]
            arg[(2, 2, 2, 2)]+=(0.743207586978-0.990371154067j)*x[2]**o + ((-0.450223954755-0.552722674539j))*x[2]
            ref[(2, 2, 2, 2)]+=(0.743207586978-0.990371154067j)*x_ref[2]**o + ((-0.450223954755-0.552722674539j))*x_ref[2]
            arg[(2, 2, 2, 3)]+=(-0.271041875231-0.270928418488j)*x[2]**o + ((0.345588352466+0.844904103366j))*x[2]
            ref[(2, 2, 2, 3)]+=(-0.271041875231-0.270928418488j)*x_ref[2]**o + ((0.345588352466+0.844904103366j))*x_ref[2]
            arg[(2, 2, 3, 0)]+=(0.3071408199-0.159980412352j)*x[2]**o + ((0.997098262521+0.467023105132j))*x[2]
            ref[(2, 2, 3, 0)]+=(0.3071408199-0.159980412352j)*x_ref[2]**o + ((0.997098262521+0.467023105132j))*x_ref[2]
            arg[(2, 2, 3, 1)]+=(0.0444856278246-0.874709163936j)*x[2]**o + ((-0.672891525647-0.114091064817j))*x[2]
            ref[(2, 2, 3, 1)]+=(0.0444856278246-0.874709163936j)*x_ref[2]**o + ((-0.672891525647-0.114091064817j))*x_ref[2]
            arg[(2, 2, 3, 2)]+=(0.309732804399-0.128367583055j)*x[2]**o + ((0.558725312291+0.984379974647j))*x[2]
            ref[(2, 2, 3, 2)]+=(0.309732804399-0.128367583055j)*x_ref[2]**o + ((0.558725312291+0.984379974647j))*x_ref[2]
            arg[(2, 2, 3, 3)]+=(0.939885097111-0.0288173101327j)*x[2]**o + ((0.177460291468+0.0410990755521j))*x[2]
            ref[(2, 2, 3, 3)]+=(0.939885097111-0.0288173101327j)*x_ref[2]**o + ((0.177460291468+0.0410990755521j))*x_ref[2]
            arg[(2, 3, 0, 0)]+=(-0.347526599956+0.58274701997j)*x[2]**o + ((0.8151762998+0.720426482144j))*x[2]
            ref[(2, 3, 0, 0)]+=(-0.347526599956+0.58274701997j)*x_ref[2]**o + ((0.8151762998+0.720426482144j))*x_ref[2]
            arg[(2, 3, 0, 1)]+=(-0.246838648301-0.325499809176j)*x[2]**o + ((0.610481604841+0.270823592528j))*x[2]
            ref[(2, 3, 0, 1)]+=(-0.246838648301-0.325499809176j)*x_ref[2]**o + ((0.610481604841+0.270823592528j))*x_ref[2]
            arg[(2, 3, 0, 2)]+=(-0.53763113948-0.140875638032j)*x[2]**o + ((-0.92634068369-0.501841961906j))*x[2]
            ref[(2, 3, 0, 2)]+=(-0.53763113948-0.140875638032j)*x_ref[2]**o + ((-0.92634068369-0.501841961906j))*x_ref[2]
            arg[(2, 3, 0, 3)]+=(0.649042582155+0.537592594991j)*x[2]**o + ((0.436023795324+0.572266277233j))*x[2]
            ref[(2, 3, 0, 3)]+=(0.649042582155+0.537592594991j)*x_ref[2]**o + ((0.436023795324+0.572266277233j))*x_ref[2]
            arg[(2, 3, 1, 0)]+=(0.514186485906+0.0665685426027j)*x[2]**o + ((0.210811901639+0.395590631421j))*x[2]
            ref[(2, 3, 1, 0)]+=(0.514186485906+0.0665685426027j)*x_ref[2]**o + ((0.210811901639+0.395590631421j))*x_ref[2]
            arg[(2, 3, 1, 1)]+=(-0.688245513757+0.458022546985j)*x[2]**o + ((-0.209940163604+0.337091333995j))*x[2]
            ref[(2, 3, 1, 1)]+=(-0.688245513757+0.458022546985j)*x_ref[2]**o + ((-0.209940163604+0.337091333995j))*x_ref[2]
            arg[(2, 3, 1, 2)]+=(0.600231176716-0.401567374537j)*x[2]**o + ((0.842996656827-0.812261198517j))*x[2]
            ref[(2, 3, 1, 2)]+=(0.600231176716-0.401567374537j)*x_ref[2]**o + ((0.842996656827-0.812261198517j))*x_ref[2]
            arg[(2, 3, 1, 3)]+=(-0.350374128191-0.523544492894j)*x[2]**o + ((0.376758580389-0.60897390055j))*x[2]
            ref[(2, 3, 1, 3)]+=(-0.350374128191-0.523544492894j)*x_ref[2]**o + ((0.376758580389-0.60897390055j))*x_ref[2]
            arg[(2, 3, 2, 0)]+=(0.902118193163+0.186623440081j)*x[2]**o + ((0.829430223467-0.62709977991j))*x[2]
            ref[(2, 3, 2, 0)]+=(0.902118193163+0.186623440081j)*x_ref[2]**o + ((0.829430223467-0.62709977991j))*x_ref[2]
            arg[(2, 3, 2, 1)]+=(0.825954875235-0.769893496191j)*x[2]**o + ((0.762887472826-0.763419686854j))*x[2]
            ref[(2, 3, 2, 1)]+=(0.825954875235-0.769893496191j)*x_ref[2]**o + ((0.762887472826-0.763419686854j))*x_ref[2]
            arg[(2, 3, 2, 2)]+=(-0.69849081765+0.0824904878622j)*x[2]**o + ((-0.26077222258+0.747968541893j))*x[2]
            ref[(2, 3, 2, 2)]+=(-0.69849081765+0.0824904878622j)*x_ref[2]**o + ((-0.26077222258+0.747968541893j))*x_ref[2]
            arg[(2, 3, 2, 3)]+=(-0.934302120801+0.760735808397j)*x[2]**o + ((-0.611245056801+0.821474088964j))*x[2]
            ref[(2, 3, 2, 3)]+=(-0.934302120801+0.760735808397j)*x_ref[2]**o + ((-0.611245056801+0.821474088964j))*x_ref[2]
            arg[(2, 3, 3, 0)]+=(-0.648397837978+0.162351865166j)*x[2]**o + ((0.955137325558-0.814638205368j))*x[2]
            ref[(2, 3, 3, 0)]+=(-0.648397837978+0.162351865166j)*x_ref[2]**o + ((0.955137325558-0.814638205368j))*x_ref[2]
            arg[(2, 3, 3, 1)]+=(-0.0789392772945+0.279457908656j)*x[2]**o + ((-0.420695236737-0.761994445116j))*x[2]
            ref[(2, 3, 3, 1)]+=(-0.0789392772945+0.279457908656j)*x_ref[2]**o + ((-0.420695236737-0.761994445116j))*x_ref[2]
            arg[(2, 3, 3, 2)]+=(0.895633081195-0.234724496031j)*x[2]**o + ((0.78690844455-0.782715240756j))*x[2]
            ref[(2, 3, 3, 2)]+=(0.895633081195-0.234724496031j)*x_ref[2]**o + ((0.78690844455-0.782715240756j))*x_ref[2]
            arg[(2, 3, 3, 3)]+=(0.126718968725+0.107546925791j)*x[2]**o + ((0.336887245064-0.360696252126j))*x[2]
            ref[(2, 3, 3, 3)]+=(0.126718968725+0.107546925791j)*x_ref[2]**o + ((0.336887245064-0.360696252126j))*x_ref[2]
            arg[(3, 0, 0, 0)]+=(-0.433279613204-0.284211759821j)*x[2]**o + ((0.672308481732-0.632087174441j))*x[2]
            ref[(3, 0, 0, 0)]+=(-0.433279613204-0.284211759821j)*x_ref[2]**o + ((0.672308481732-0.632087174441j))*x_ref[2]
            arg[(3, 0, 0, 1)]+=(-0.344811447822-0.870093793131j)*x[2]**o + ((0.447659506107+0.875831733313j))*x[2]
            ref[(3, 0, 0, 1)]+=(-0.344811447822-0.870093793131j)*x_ref[2]**o + ((0.447659506107+0.875831733313j))*x_ref[2]
            arg[(3, 0, 0, 2)]+=(0.864432909989+0.579624668195j)*x[2]**o + ((-0.16507196664+0.00537106809456j))*x[2]
            ref[(3, 0, 0, 2)]+=(0.864432909989+0.579624668195j)*x_ref[2]**o + ((-0.16507196664+0.00537106809456j))*x_ref[2]
            arg[(3, 0, 0, 3)]+=(-0.371118546702+0.15655186084j)*x[2]**o + ((0.881349024771-0.703932778965j))*x[2]
            ref[(3, 0, 0, 3)]+=(-0.371118546702+0.15655186084j)*x_ref[2]**o + ((0.881349024771-0.703932778965j))*x_ref[2]
            arg[(3, 0, 1, 0)]+=(0.558442087982-0.0430600817801j)*x[2]**o + ((-0.737887630602+0.994402109065j))*x[2]
            ref[(3, 0, 1, 0)]+=(0.558442087982-0.0430600817801j)*x_ref[2]**o + ((-0.737887630602+0.994402109065j))*x_ref[2]
            arg[(3, 0, 1, 1)]+=(-0.292715366813-0.0267166509524j)*x[2]**o + ((0.204939577978-0.753292270454j))*x[2]
            ref[(3, 0, 1, 1)]+=(-0.292715366813-0.0267166509524j)*x_ref[2]**o + ((0.204939577978-0.753292270454j))*x_ref[2]
            arg[(3, 0, 1, 2)]+=(-0.642821203732-0.0993592356263j)*x[2]**o + ((-0.888311161779-0.209195604833j))*x[2]
            ref[(3, 0, 1, 2)]+=(-0.642821203732-0.0993592356263j)*x_ref[2]**o + ((-0.888311161779-0.209195604833j))*x_ref[2]
            arg[(3, 0, 1, 3)]+=(-0.0828936984944+0.983176524642j)*x[2]**o + ((0.105900454942-0.198810596478j))*x[2]
            ref[(3, 0, 1, 3)]+=(-0.0828936984944+0.983176524642j)*x_ref[2]**o + ((0.105900454942-0.198810596478j))*x_ref[2]
            arg[(3, 0, 2, 0)]+=(-0.806194517616-0.21441486215j)*x[2]**o + ((-0.974558936225-0.789800398421j))*x[2]
            ref[(3, 0, 2, 0)]+=(-0.806194517616-0.21441486215j)*x_ref[2]**o + ((-0.974558936225-0.789800398421j))*x_ref[2]
            arg[(3, 0, 2, 1)]+=(-0.904242193785+0.773824652089j)*x[2]**o + ((-0.0514262410679+0.235499758975j))*x[2]
            ref[(3, 0, 2, 1)]+=(-0.904242193785+0.773824652089j)*x_ref[2]**o + ((-0.0514262410679+0.235499758975j))*x_ref[2]
            arg[(3, 0, 2, 2)]+=(-0.0344998758979+0.0884764565054j)*x[2]**o + ((0.446956507958-0.146316503371j))*x[2]
            ref[(3, 0, 2, 2)]+=(-0.0344998758979+0.0884764565054j)*x_ref[2]**o + ((0.446956507958-0.146316503371j))*x_ref[2]
            arg[(3, 0, 2, 3)]+=(0.410509593935-0.726265083206j)*x[2]**o + ((-0.866595891692+0.121373653721j))*x[2]
            ref[(3, 0, 2, 3)]+=(0.410509593935-0.726265083206j)*x_ref[2]**o + ((-0.866595891692+0.121373653721j))*x_ref[2]
            arg[(3, 0, 3, 0)]+=(-0.89049037386+0.431421484118j)*x[2]**o + ((0.397944076365-0.469772293751j))*x[2]
            ref[(3, 0, 3, 0)]+=(-0.89049037386+0.431421484118j)*x_ref[2]**o + ((0.397944076365-0.469772293751j))*x_ref[2]
            arg[(3, 0, 3, 1)]+=(-0.236525670657-0.374377565654j)*x[2]**o + ((0.93490481271+0.0221085198574j))*x[2]
            ref[(3, 0, 3, 1)]+=(-0.236525670657-0.374377565654j)*x_ref[2]**o + ((0.93490481271+0.0221085198574j))*x_ref[2]
            arg[(3, 0, 3, 2)]+=(0.181486505149-0.052695919166j)*x[2]**o + ((0.953267916838-0.614422668353j))*x[2]
            ref[(3, 0, 3, 2)]+=(0.181486505149-0.052695919166j)*x_ref[2]**o + ((0.953267916838-0.614422668353j))*x_ref[2]
            arg[(3, 0, 3, 3)]+=(0.474433371129-0.872018825664j)*x[2]**o + ((-0.582532033669+0.77491717665j))*x[2]
            ref[(3, 0, 3, 3)]+=(0.474433371129-0.872018825664j)*x_ref[2]**o + ((-0.582532033669+0.77491717665j))*x_ref[2]
            arg[(3, 1, 0, 0)]+=(0.199069670282+0.278799224114j)*x[2]**o + ((-0.150609215792-0.977908709121j))*x[2]
            ref[(3, 1, 0, 0)]+=(0.199069670282+0.278799224114j)*x_ref[2]**o + ((-0.150609215792-0.977908709121j))*x_ref[2]
            arg[(3, 1, 0, 1)]+=(0.763355554942+0.652764092828j)*x[2]**o + ((0.251002001184-0.923596485601j))*x[2]
            ref[(3, 1, 0, 1)]+=(0.763355554942+0.652764092828j)*x_ref[2]**o + ((0.251002001184-0.923596485601j))*x_ref[2]
            arg[(3, 1, 0, 2)]+=(-0.268596570298+0.318700806234j)*x[2]**o + ((-0.365186289223-0.373498443858j))*x[2]
            ref[(3, 1, 0, 2)]+=(-0.268596570298+0.318700806234j)*x_ref[2]**o + ((-0.365186289223-0.373498443858j))*x_ref[2]
            arg[(3, 1, 0, 3)]+=(-0.839671205002-0.0862378214785j)*x[2]**o + ((0.329984328638+0.921357036941j))*x[2]
            ref[(3, 1, 0, 3)]+=(-0.839671205002-0.0862378214785j)*x_ref[2]**o + ((0.329984328638+0.921357036941j))*x_ref[2]
            arg[(3, 1, 1, 0)]+=(0.240373744202-0.021289789031j)*x[2]**o + ((-0.263913024921+0.178134584607j))*x[2]
            ref[(3, 1, 1, 0)]+=(0.240373744202-0.021289789031j)*x_ref[2]**o + ((-0.263913024921+0.178134584607j))*x_ref[2]
            arg[(3, 1, 1, 1)]+=(-0.905753457584-0.0385509319539j)*x[2]**o + ((0.298563188674+0.396491363092j))*x[2]
            ref[(3, 1, 1, 1)]+=(-0.905753457584-0.0385509319539j)*x_ref[2]**o + ((0.298563188674+0.396491363092j))*x_ref[2]
            arg[(3, 1, 1, 2)]+=(0.888897523905+0.59141190566j)*x[2]**o + ((-0.0705425462509-0.61737312602j))*x[2]
            ref[(3, 1, 1, 2)]+=(0.888897523905+0.59141190566j)*x_ref[2]**o + ((-0.0705425462509-0.61737312602j))*x_ref[2]
            arg[(3, 1, 1, 3)]+=(0.101008406254+0.504012352263j)*x[2]**o + ((0.425667514879+0.778538446951j))*x[2]
            ref[(3, 1, 1, 3)]+=(0.101008406254+0.504012352263j)*x_ref[2]**o + ((0.425667514879+0.778538446951j))*x_ref[2]
            arg[(3, 1, 2, 0)]+=(0.854161910429+0.953841112171j)*x[2]**o + ((0.669492615426+0.956616545571j))*x[2]
            ref[(3, 1, 2, 0)]+=(0.854161910429+0.953841112171j)*x_ref[2]**o + ((0.669492615426+0.956616545571j))*x_ref[2]
            arg[(3, 1, 2, 1)]+=(0.898543815332+0.791060721917j)*x[2]**o + ((-0.551371115739+0.841509224431j))*x[2]
            ref[(3, 1, 2, 1)]+=(0.898543815332+0.791060721917j)*x_ref[2]**o + ((-0.551371115739+0.841509224431j))*x_ref[2]
            arg[(3, 1, 2, 2)]+=(0.55583729222-0.554821487855j)*x[2]**o + ((-0.236418279018-0.891436561344j))*x[2]
            ref[(3, 1, 2, 2)]+=(0.55583729222-0.554821487855j)*x_ref[2]**o + ((-0.236418279018-0.891436561344j))*x_ref[2]
            arg[(3, 1, 2, 3)]+=(-0.696151687318+0.322384043117j)*x[2]**o + ((-0.643322202525-0.772182602939j))*x[2]
            ref[(3, 1, 2, 3)]+=(-0.696151687318+0.322384043117j)*x_ref[2]**o + ((-0.643322202525-0.772182602939j))*x_ref[2]
            arg[(3, 1, 3, 0)]+=(-0.133514860466-0.64380111773j)*x[2]**o + ((0.537175550811-0.335904831428j))*x[2]
            ref[(3, 1, 3, 0)]+=(-0.133514860466-0.64380111773j)*x_ref[2]**o + ((0.537175550811-0.335904831428j))*x_ref[2]
            arg[(3, 1, 3, 1)]+=(-0.744508158112+0.27105609254j)*x[2]**o + ((-0.716553102102-0.358433751246j))*x[2]
            ref[(3, 1, 3, 1)]+=(-0.744508158112+0.27105609254j)*x_ref[2]**o + ((-0.716553102102-0.358433751246j))*x_ref[2]
            arg[(3, 1, 3, 2)]+=(-0.552060491127+0.673619712925j)*x[2]**o + ((-0.654733131543+0.702289188647j))*x[2]
            ref[(3, 1, 3, 2)]+=(-0.552060491127+0.673619712925j)*x_ref[2]**o + ((-0.654733131543+0.702289188647j))*x_ref[2]
            arg[(3, 1, 3, 3)]+=(-0.168703451139-0.796321702196j)*x[2]**o + ((-0.850376047475-0.972260465916j))*x[2]
            ref[(3, 1, 3, 3)]+=(-0.168703451139-0.796321702196j)*x_ref[2]**o + ((-0.850376047475-0.972260465916j))*x_ref[2]
            arg[(3, 2, 0, 0)]+=(-0.0896877731524-0.721522781153j)*x[2]**o + ((-0.895034094901+0.195730319374j))*x[2]
            ref[(3, 2, 0, 0)]+=(-0.0896877731524-0.721522781153j)*x_ref[2]**o + ((-0.895034094901+0.195730319374j))*x_ref[2]
            arg[(3, 2, 0, 1)]+=(-0.339944471283-0.649855654434j)*x[2]**o + ((-0.0123233569139+0.923859748839j))*x[2]
            ref[(3, 2, 0, 1)]+=(-0.339944471283-0.649855654434j)*x_ref[2]**o + ((-0.0123233569139+0.923859748839j))*x_ref[2]
            arg[(3, 2, 0, 2)]+=(-0.692555750284-0.920305856615j)*x[2]**o + ((0.00375096119715+0.628824810795j))*x[2]
            ref[(3, 2, 0, 2)]+=(-0.692555750284-0.920305856615j)*x_ref[2]**o + ((0.00375096119715+0.628824810795j))*x_ref[2]
            arg[(3, 2, 0, 3)]+=(0.0536636057549+0.373142610152j)*x[2]**o + ((-0.690144121433+0.865036776401j))*x[2]
            ref[(3, 2, 0, 3)]+=(0.0536636057549+0.373142610152j)*x_ref[2]**o + ((-0.690144121433+0.865036776401j))*x_ref[2]
            arg[(3, 2, 1, 0)]+=(-0.476639247012+0.686140312163j)*x[2]**o + ((0.487867800415-0.796810699795j))*x[2]
            ref[(3, 2, 1, 0)]+=(-0.476639247012+0.686140312163j)*x_ref[2]**o + ((0.487867800415-0.796810699795j))*x_ref[2]
            arg[(3, 2, 1, 1)]+=(0.831539269517-0.349459121493j)*x[2]**o + ((0.39666475039+0.655764783336j))*x[2]
            ref[(3, 2, 1, 1)]+=(0.831539269517-0.349459121493j)*x_ref[2]**o + ((0.39666475039+0.655764783336j))*x_ref[2]
            arg[(3, 2, 1, 2)]+=(-0.926292490384-0.461889238289j)*x[2]**o + ((0.610124435082-0.646446276329j))*x[2]
            ref[(3, 2, 1, 2)]+=(-0.926292490384-0.461889238289j)*x_ref[2]**o + ((0.610124435082-0.646446276329j))*x_ref[2]
            arg[(3, 2, 1, 3)]+=(0.0572575923539-0.722883558616j)*x[2]**o + ((-0.322339314736+0.750663094269j))*x[2]
            ref[(3, 2, 1, 3)]+=(0.0572575923539-0.722883558616j)*x_ref[2]**o + ((-0.322339314736+0.750663094269j))*x_ref[2]
            arg[(3, 2, 2, 0)]+=(-0.36503915286+0.249190775416j)*x[2]**o + ((-0.0565591304683-0.790616688424j))*x[2]
            ref[(3, 2, 2, 0)]+=(-0.36503915286+0.249190775416j)*x_ref[2]**o + ((-0.0565591304683-0.790616688424j))*x_ref[2]
            arg[(3, 2, 2, 1)]+=(-0.0869129243941+0.351986866877j)*x[2]**o + ((0.419474713834+0.999318264162j))*x[2]
            ref[(3, 2, 2, 1)]+=(-0.0869129243941+0.351986866877j)*x_ref[2]**o + ((0.419474713834+0.999318264162j))*x_ref[2]
            arg[(3, 2, 2, 2)]+=(-0.473226511184+0.571823194398j)*x[2]**o + ((0.468443341523+0.588389271559j))*x[2]
            ref[(3, 2, 2, 2)]+=(-0.473226511184+0.571823194398j)*x_ref[2]**o + ((0.468443341523+0.588389271559j))*x_ref[2]
            arg[(3, 2, 2, 3)]+=(-0.149927699656-0.395431835655j)*x[2]**o + ((0.933013760403-0.862971374243j))*x[2]
            ref[(3, 2, 2, 3)]+=(-0.149927699656-0.395431835655j)*x_ref[2]**o + ((0.933013760403-0.862971374243j))*x_ref[2]
            arg[(3, 2, 3, 0)]+=(0.494832367139-0.928718009008j)*x[2]**o + ((0.839552759954-0.0584412117553j))*x[2]
            ref[(3, 2, 3, 0)]+=(0.494832367139-0.928718009008j)*x_ref[2]**o + ((0.839552759954-0.0584412117553j))*x_ref[2]
            arg[(3, 2, 3, 1)]+=(0.927959508958+0.532744918901j)*x[2]**o + ((0.1833647218+0.435797905392j))*x[2]
            ref[(3, 2, 3, 1)]+=(0.927959508958+0.532744918901j)*x_ref[2]**o + ((0.1833647218+0.435797905392j))*x_ref[2]
            arg[(3, 2, 3, 2)]+=(0.553456991599-0.600724477419j)*x[2]**o + ((-0.104821980536-0.792842061157j))*x[2]
            ref[(3, 2, 3, 2)]+=(0.553456991599-0.600724477419j)*x_ref[2]**o + ((-0.104821980536-0.792842061157j))*x_ref[2]
            arg[(3, 2, 3, 3)]+=(-0.0948278272241-0.685872418154j)*x[2]**o + ((-0.665237124478-0.965570412251j))*x[2]
            ref[(3, 2, 3, 3)]+=(-0.0948278272241-0.685872418154j)*x_ref[2]**o + ((-0.665237124478-0.965570412251j))*x_ref[2]
            arg[(3, 3, 0, 0)]+=(-0.762730880642+0.662594339728j)*x[2]**o + ((-0.184981561274+0.144676410104j))*x[2]
            ref[(3, 3, 0, 0)]+=(-0.762730880642+0.662594339728j)*x_ref[2]**o + ((-0.184981561274+0.144676410104j))*x_ref[2]
            arg[(3, 3, 0, 1)]+=(-0.416178463896-0.484868542582j)*x[2]**o + ((0.428391138684+0.825206801683j))*x[2]
            ref[(3, 3, 0, 1)]+=(-0.416178463896-0.484868542582j)*x_ref[2]**o + ((0.428391138684+0.825206801683j))*x_ref[2]
            arg[(3, 3, 0, 2)]+=(0.683033397324-0.971097720463j)*x[2]**o + ((0.461646603147-0.361500689635j))*x[2]
            ref[(3, 3, 0, 2)]+=(0.683033397324-0.971097720463j)*x_ref[2]**o + ((0.461646603147-0.361500689635j))*x_ref[2]
            arg[(3, 3, 0, 3)]+=(0.76426791146-0.522179504308j)*x[2]**o + ((-0.192185519755-0.738108188962j))*x[2]
            ref[(3, 3, 0, 3)]+=(0.76426791146-0.522179504308j)*x_ref[2]**o + ((-0.192185519755-0.738108188962j))*x_ref[2]
            arg[(3, 3, 1, 0)]+=(0.774407805456+0.0390335090295j)*x[2]**o + ((0.758453147148-0.557069169109j))*x[2]
            ref[(3, 3, 1, 0)]+=(0.774407805456+0.0390335090295j)*x_ref[2]**o + ((0.758453147148-0.557069169109j))*x_ref[2]
            arg[(3, 3, 1, 1)]+=(-0.0607587255644+0.244393020558j)*x[2]**o + ((-0.818039369853-0.957071925111j))*x[2]
            ref[(3, 3, 1, 1)]+=(-0.0607587255644+0.244393020558j)*x_ref[2]**o + ((-0.818039369853-0.957071925111j))*x_ref[2]
            arg[(3, 3, 1, 2)]+=(0.297836294413+0.488822106804j)*x[2]**o + ((0.277140748864-0.942374584284j))*x[2]
            ref[(3, 3, 1, 2)]+=(0.297836294413+0.488822106804j)*x_ref[2]**o + ((0.277140748864-0.942374584284j))*x_ref[2]
            arg[(3, 3, 1, 3)]+=(0.566095174089+0.113007538838j)*x[2]**o + ((-0.0994885463239-0.0806083187863j))*x[2]
            ref[(3, 3, 1, 3)]+=(0.566095174089+0.113007538838j)*x_ref[2]**o + ((-0.0994885463239-0.0806083187863j))*x_ref[2]
            arg[(3, 3, 2, 0)]+=(-0.837631464254-0.515014531498j)*x[2]**o + ((0.926062557215-0.396754916169j))*x[2]
            ref[(3, 3, 2, 0)]+=(-0.837631464254-0.515014531498j)*x_ref[2]**o + ((0.926062557215-0.396754916169j))*x_ref[2]
            arg[(3, 3, 2, 1)]+=(0.417953047863+0.0358034028136j)*x[2]**o + ((-0.99555537816+0.803944316604j))*x[2]
            ref[(3, 3, 2, 1)]+=(0.417953047863+0.0358034028136j)*x_ref[2]**o + ((-0.99555537816+0.803944316604j))*x_ref[2]
            arg[(3, 3, 2, 2)]+=(0.855198915487-0.532987254027j)*x[2]**o + ((0.0302946244813-0.269831276525j))*x[2]
            ref[(3, 3, 2, 2)]+=(0.855198915487-0.532987254027j)*x_ref[2]**o + ((0.0302946244813-0.269831276525j))*x_ref[2]
            arg[(3, 3, 2, 3)]+=(-0.680904505983-0.102645550781j)*x[2]**o + ((0.380828794447-0.0445171143739j))*x[2]
            ref[(3, 3, 2, 3)]+=(-0.680904505983-0.102645550781j)*x_ref[2]**o + ((0.380828794447-0.0445171143739j))*x_ref[2]
            arg[(3, 3, 3, 0)]+=(0.610152200807-0.850131187966j)*x[2]**o + ((0.403137671202-0.648980648351j))*x[2]
            ref[(3, 3, 3, 0)]+=(0.610152200807-0.850131187966j)*x_ref[2]**o + ((0.403137671202-0.648980648351j))*x_ref[2]
            arg[(3, 3, 3, 1)]+=(-0.574715409652-0.352731935437j)*x[2]**o + ((-0.332586557817+0.778501040651j))*x[2]
            ref[(3, 3, 3, 1)]+=(-0.574715409652-0.352731935437j)*x_ref[2]**o + ((-0.332586557817+0.778501040651j))*x_ref[2]
            arg[(3, 3, 3, 2)]+=(0.476997679358-0.294796335883j)*x[2]**o + ((-0.600221700993+0.575494381738j))*x[2]
            ref[(3, 3, 3, 2)]+=(0.476997679358-0.294796335883j)*x_ref[2]**o + ((-0.600221700993+0.575494381738j))*x_ref[2]
            arg[(3, 3, 3, 3)]+=(0.338007322427+0.433000477634j)*x[2]**o + ((-0.888956749111+0.432948118148j))*x[2]
            ref[(3, 3, 3, 3)]+=(0.338007322427+0.433000477634j)*x_ref[2]**o + ((-0.888956749111+0.432948118148j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.0575476757578-0.873449568379j)*x[0] + ((0.483468414775-0.433299978168j))*x[1]
        ref=(-0.0575476757578-0.873449568379j)*x_ref[0] + ((0.483468414775-0.433299978168j))*x_ref[1]
        if dim==3:
            arg+=((-0.991615349214+0.0689248874033j))*x[2]
            ref+=((-0.991615349214+0.0689248874033j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=(-0.550510941078-0.645914261274j)*x[0] + ((0.27171086114-0.407640905638j))*x[1]
        ref[(0,)]=(-0.550510941078-0.645914261274j)*x_ref[0] + ((0.27171086114-0.407640905638j))*x_ref[1]
        arg[(1,)]=(0.0181486022923-0.283738114049j)*x[0] + ((-0.493634568165+0.0164396958551j))*x[1]
        ref[(1,)]=(0.0181486022923-0.283738114049j)*x_ref[0] + ((-0.493634568165+0.0164396958551j))*x_ref[1]
        arg[(2,)]=(-0.844221297163+0.101700015382j)*x[0] + ((0.944195425602-0.761878767443j))*x[1]
        ref[(2,)]=(-0.844221297163+0.101700015382j)*x_ref[0] + ((0.944195425602-0.761878767443j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.21497301663+0.136845109755j)*x[2]
            ref[(0,)]+=(0.21497301663+0.136845109755j)*x_ref[2]
            arg[(1,)]+=(-0.718606404178+0.71458028967j)*x[2]
            ref[(1,)]+=(-0.718606404178+0.71458028967j)*x_ref[2]
            arg[(2,)]+=(-0.39615561196-0.665249227408j)*x[2]
            ref[(2,)]+=(-0.39615561196-0.665249227408j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref = Data(0,(3, 4),w_ref)
        arg[(0, 0)]=(0.0815618783508-0.862552184486j)*x[0] + ((-0.546104463247+0.774523554071j))*x[1]
        ref[(0, 0)]=(0.0815618783508-0.862552184486j)*x_ref[0] + ((-0.546104463247+0.774523554071j))*x_ref[1]
        arg[(0, 1)]=(0.0862416241384-0.433755181053j)*x[0] + ((-0.519042897687-0.402598430856j))*x[1]
        ref[(0, 1)]=(0.0862416241384-0.433755181053j)*x_ref[0] + ((-0.519042897687-0.402598430856j))*x_ref[1]
        arg[(0, 2)]=(0.444778336782-0.326409138287j)*x[0] + ((-0.573540092902+0.624662726815j))*x[1]
        ref[(0, 2)]=(0.444778336782-0.326409138287j)*x_ref[0] + ((-0.573540092902+0.624662726815j))*x_ref[1]
        arg[(0, 3)]=(-0.0175948548872-0.680734037115j)*x[0] + ((0.281480657719-0.618459358686j))*x[1]
        ref[(0, 3)]=(-0.0175948548872-0.680734037115j)*x_ref[0] + ((0.281480657719-0.618459358686j))*x_ref[1]
        arg[(1, 0)]=(0.85743518667-0.988459717691j)*x[0] + ((0.377259755121-0.731934584196j))*x[1]
        ref[(1, 0)]=(0.85743518667-0.988459717691j)*x_ref[0] + ((0.377259755121-0.731934584196j))*x_ref[1]
        arg[(1, 1)]=(-0.549936111183+0.382151927456j)*x[0] + ((-0.176786844972+0.266827959412j))*x[1]
        ref[(1, 1)]=(-0.549936111183+0.382151927456j)*x_ref[0] + ((-0.176786844972+0.266827959412j))*x_ref[1]
        arg[(1, 2)]=(0.908328320754-0.436959876867j)*x[0] + ((0.152373085702+0.561038357355j))*x[1]
        ref[(1, 2)]=(0.908328320754-0.436959876867j)*x_ref[0] + ((0.152373085702+0.561038357355j))*x_ref[1]
        arg[(1, 3)]=(0.297362285444+0.911674144632j)*x[0] + ((-0.971905543689+0.691117568594j))*x[1]
        ref[(1, 3)]=(0.297362285444+0.911674144632j)*x_ref[0] + ((-0.971905543689+0.691117568594j))*x_ref[1]
        arg[(2, 0)]=(-0.343878480238+0.319037951448j)*x[0] + ((-0.467692518869+0.0819443984618j))*x[1]
        ref[(2, 0)]=(-0.343878480238+0.319037951448j)*x_ref[0] + ((-0.467692518869+0.0819443984618j))*x_ref[1]
        arg[(2, 1)]=(-0.77477213954-0.402513544337j)*x[0] + ((-0.969402424259-0.945247490231j))*x[1]
        ref[(2, 1)]=(-0.77477213954-0.402513544337j)*x_ref[0] + ((-0.969402424259-0.945247490231j))*x_ref[1]
        arg[(2, 2)]=(0.175511457372+0.815558190171j)*x[0] + ((-0.0820372796843-0.577372592257j))*x[1]
        ref[(2, 2)]=(0.175511457372+0.815558190171j)*x_ref[0] + ((-0.0820372796843-0.577372592257j))*x_ref[1]
        arg[(2, 3)]=(0.807218013654-0.918198240604j)*x[0] + ((0.245667973887-0.754010610073j))*x[1]
        ref[(2, 3)]=(0.807218013654-0.918198240604j)*x_ref[0] + ((0.245667973887-0.754010610073j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.462105791999-0.549413235131j)*x[2]
            ref[(0, 0)]+=(0.462105791999-0.549413235131j)*x_ref[2]
            arg[(0, 1)]+=(-0.712035069172+0.0370690819004j)*x[2]
            ref[(0, 1)]+=(-0.712035069172+0.0370690819004j)*x_ref[2]
            arg[(0, 2)]+=(-0.778899512002-0.723229620109j)*x[2]
            ref[(0, 2)]+=(-0.778899512002-0.723229620109j)*x_ref[2]
            arg[(0, 3)]+=(0.713702542511+0.159332368983j)*x[2]
            ref[(0, 3)]+=(0.713702542511+0.159332368983j)*x_ref[2]
            arg[(1, 0)]+=(-0.824913797164+0.181504569718j)*x[2]
            ref[(1, 0)]+=(-0.824913797164+0.181504569718j)*x_ref[2]
            arg[(1, 1)]+=(-0.38966841757+0.901160935221j)*x[2]
            ref[(1, 1)]+=(-0.38966841757+0.901160935221j)*x_ref[2]
            arg[(1, 2)]+=(0.521510342652-0.468216224435j)*x[2]
            ref[(1, 2)]+=(0.521510342652-0.468216224435j)*x_ref[2]
            arg[(1, 3)]+=(0.496880088108-0.135525773136j)*x[2]
            ref[(1, 3)]+=(0.496880088108-0.135525773136j)*x_ref[2]
            arg[(2, 0)]+=(0.15670306325+0.186868073693j)*x[2]
            ref[(2, 0)]+=(0.15670306325+0.186868073693j)*x_ref[2]
            arg[(2, 1)]+=(0.659283164022-0.599179906315j)*x[2]
            ref[(2, 1)]+=(0.659283164022-0.599179906315j)*x_ref[2]
            arg[(2, 2)]+=(0.927073187879-0.71240682119j)*x[2]
            ref[(2, 2)]+=(0.927073187879-0.71240682119j)*x_ref[2]
            arg[(2, 3)]+=(-0.121137047472+0.182773156221j)*x[2]
            ref[(2, 3)]+=(-0.121137047472+0.182773156221j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 3),w)
        ref = Data(0,(2, 4, 3),w_ref)
        arg[(0, 0, 0)]=(-0.245932655527-0.979593236303j)*x[0] + ((0.481612766906+0.487068308429j))*x[1]
        ref[(0, 0, 0)]=(-0.245932655527-0.979593236303j)*x_ref[0] + ((0.481612766906+0.487068308429j))*x_ref[1]
        arg[(0, 0, 1)]=(0.718777575568-0.684206290293j)*x[0] + ((-0.2967315953-0.292361302716j))*x[1]
        ref[(0, 0, 1)]=(0.718777575568-0.684206290293j)*x_ref[0] + ((-0.2967315953-0.292361302716j))*x_ref[1]
        arg[(0, 0, 2)]=(-0.960654757679-0.294066677206j)*x[0] + ((-0.654954753788+0.767661646538j))*x[1]
        ref[(0, 0, 2)]=(-0.960654757679-0.294066677206j)*x_ref[0] + ((-0.654954753788+0.767661646538j))*x_ref[1]
        arg[(0, 1, 0)]=(0.483345479038-0.721499612489j)*x[0] + ((-0.603088418068-0.259257410303j))*x[1]
        ref[(0, 1, 0)]=(0.483345479038-0.721499612489j)*x_ref[0] + ((-0.603088418068-0.259257410303j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.329608556637-0.421236354605j)*x[0] + ((-0.7701534474-0.607464226161j))*x[1]
        ref[(0, 1, 1)]=(-0.329608556637-0.421236354605j)*x_ref[0] + ((-0.7701534474-0.607464226161j))*x_ref[1]
        arg[(0, 1, 2)]=(-0.0552311363495+0.284369639614j)*x[0] + ((0.441247430718-0.327515110444j))*x[1]
        ref[(0, 1, 2)]=(-0.0552311363495+0.284369639614j)*x_ref[0] + ((0.441247430718-0.327515110444j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.0475017361043+0.888057338914j)*x[0] + ((0.840494481444+0.720675952743j))*x[1]
        ref[(0, 2, 0)]=(-0.0475017361043+0.888057338914j)*x_ref[0] + ((0.840494481444+0.720675952743j))*x_ref[1]
        arg[(0, 2, 1)]=(-0.798862799295+0.178276491371j)*x[0] + ((0.09703001296+0.729431576402j))*x[1]
        ref[(0, 2, 1)]=(-0.798862799295+0.178276491371j)*x_ref[0] + ((0.09703001296+0.729431576402j))*x_ref[1]
        arg[(0, 2, 2)]=(-0.602286832531+0.857900623294j)*x[0] + ((0.961880258949-0.667917603539j))*x[1]
        ref[(0, 2, 2)]=(-0.602286832531+0.857900623294j)*x_ref[0] + ((0.961880258949-0.667917603539j))*x_ref[1]
        arg[(0, 3, 0)]=(-0.171425760303-0.48761579661j)*x[0] + ((0.0705104802631-0.396212817283j))*x[1]
        ref[(0, 3, 0)]=(-0.171425760303-0.48761579661j)*x_ref[0] + ((0.0705104802631-0.396212817283j))*x_ref[1]
        arg[(0, 3, 1)]=(-0.543244737898-0.873081046554j)*x[0] + ((0.30560561445+0.0790285662758j))*x[1]
        ref[(0, 3, 1)]=(-0.543244737898-0.873081046554j)*x_ref[0] + ((0.30560561445+0.0790285662758j))*x_ref[1]
        arg[(0, 3, 2)]=(0.704683008086+0.109452738993j)*x[0] + ((0.0145553236587+0.739102061216j))*x[1]
        ref[(0, 3, 2)]=(0.704683008086+0.109452738993j)*x_ref[0] + ((0.0145553236587+0.739102061216j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.50817757236-0.979402513712j)*x[0] + ((-0.400596958222+0.794865566757j))*x[1]
        ref[(1, 0, 0)]=(-0.50817757236-0.979402513712j)*x_ref[0] + ((-0.400596958222+0.794865566757j))*x_ref[1]
        arg[(1, 0, 1)]=(0.0820204697313-0.0597176797077j)*x[0] + ((-0.256864266459-0.738969859552j))*x[1]
        ref[(1, 0, 1)]=(0.0820204697313-0.0597176797077j)*x_ref[0] + ((-0.256864266459-0.738969859552j))*x_ref[1]
        arg[(1, 0, 2)]=(0.878363474921-0.688207996304j)*x[0] + ((-0.5201929897-0.135947099169j))*x[1]
        ref[(1, 0, 2)]=(0.878363474921-0.688207996304j)*x_ref[0] + ((-0.5201929897-0.135947099169j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.314967164565-0.195867783226j)*x[0] + ((0.466997617873-0.789689052664j))*x[1]
        ref[(1, 1, 0)]=(-0.314967164565-0.195867783226j)*x_ref[0] + ((0.466997617873-0.789689052664j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.149077316931-0.367038688113j)*x[0] + ((0.916141029352-0.975911749287j))*x[1]
        ref[(1, 1, 1)]=(-0.149077316931-0.367038688113j)*x_ref[0] + ((0.916141029352-0.975911749287j))*x_ref[1]
        arg[(1, 1, 2)]=(0.884719740934+0.97140532852j)*x[0] + ((0.709926677708-0.969158461453j))*x[1]
        ref[(1, 1, 2)]=(0.884719740934+0.97140532852j)*x_ref[0] + ((0.709926677708-0.969158461453j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.311489821022+0.508701258468j)*x[0] + ((-0.338731843613+0.574875630496j))*x[1]
        ref[(1, 2, 0)]=(-0.311489821022+0.508701258468j)*x_ref[0] + ((-0.338731843613+0.574875630496j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.974637546679-0.0359893219103j)*x[0] + ((0.145945159589-0.719742726748j))*x[1]
        ref[(1, 2, 1)]=(-0.974637546679-0.0359893219103j)*x_ref[0] + ((0.145945159589-0.719742726748j))*x_ref[1]
        arg[(1, 2, 2)]=(0.690721538263+0.997900730943j)*x[0] + ((-0.505547328495-0.934319742839j))*x[1]
        ref[(1, 2, 2)]=(0.690721538263+0.997900730943j)*x_ref[0] + ((-0.505547328495-0.934319742839j))*x_ref[1]
        arg[(1, 3, 0)]=(0.627909337997-0.801774547393j)*x[0] + ((-0.761718020112+0.507893911973j))*x[1]
        ref[(1, 3, 0)]=(0.627909337997-0.801774547393j)*x_ref[0] + ((-0.761718020112+0.507893911973j))*x_ref[1]
        arg[(1, 3, 1)]=(0.478176361272+0.877437186909j)*x[0] + ((0.911400660058-0.400185687694j))*x[1]
        ref[(1, 3, 1)]=(0.478176361272+0.877437186909j)*x_ref[0] + ((0.911400660058-0.400185687694j))*x_ref[1]
        arg[(1, 3, 2)]=(-0.388102052366+0.395611343518j)*x[0] + ((-0.957331251555-0.257319519485j))*x[1]
        ref[(1, 3, 2)]=(-0.388102052366+0.395611343518j)*x_ref[0] + ((-0.957331251555-0.257319519485j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.889298791947-0.677549057491j)*x[2]
            ref[(0, 0, 0)]+=(-0.889298791947-0.677549057491j)*x_ref[2]
            arg[(0, 0, 1)]+=(0.38836794298-0.535946831494j)*x[2]
            ref[(0, 0, 1)]+=(0.38836794298-0.535946831494j)*x_ref[2]
            arg[(0, 0, 2)]+=(0.798716412941-0.253867512382j)*x[2]
            ref[(0, 0, 2)]+=(0.798716412941-0.253867512382j)*x_ref[2]
            arg[(0, 1, 0)]+=(-0.0193522559883-0.765949183482j)*x[2]
            ref[(0, 1, 0)]+=(-0.0193522559883-0.765949183482j)*x_ref[2]
            arg[(0, 1, 1)]+=(0.61108010086+0.227957866745j)*x[2]
            ref[(0, 1, 1)]+=(0.61108010086+0.227957866745j)*x_ref[2]
            arg[(0, 1, 2)]+=(0.18130013369+0.31094772414j)*x[2]
            ref[(0, 1, 2)]+=(0.18130013369+0.31094772414j)*x_ref[2]
            arg[(0, 2, 0)]+=(-0.313635056038-0.708255048229j)*x[2]
            ref[(0, 2, 0)]+=(-0.313635056038-0.708255048229j)*x_ref[2]
            arg[(0, 2, 1)]+=(0.0674736791868-0.623358342143j)*x[2]
            ref[(0, 2, 1)]+=(0.0674736791868-0.623358342143j)*x_ref[2]
            arg[(0, 2, 2)]+=(0.888941296814+0.0834657049755j)*x[2]
            ref[(0, 2, 2)]+=(0.888941296814+0.0834657049755j)*x_ref[2]
            arg[(0, 3, 0)]+=(0.219517131099-0.848610031675j)*x[2]
            ref[(0, 3, 0)]+=(0.219517131099-0.848610031675j)*x_ref[2]
            arg[(0, 3, 1)]+=(-0.456688184182-0.115074222357j)*x[2]
            ref[(0, 3, 1)]+=(-0.456688184182-0.115074222357j)*x_ref[2]
            arg[(0, 3, 2)]+=(-0.0870476529715-0.895939853963j)*x[2]
            ref[(0, 3, 2)]+=(-0.0870476529715-0.895939853963j)*x_ref[2]
            arg[(1, 0, 0)]+=(-0.88017398121-0.702835478824j)*x[2]
            ref[(1, 0, 0)]+=(-0.88017398121-0.702835478824j)*x_ref[2]
            arg[(1, 0, 1)]+=(0.78106828571+0.936995734788j)*x[2]
            ref[(1, 0, 1)]+=(0.78106828571+0.936995734788j)*x_ref[2]
            arg[(1, 0, 2)]+=(-0.784813626628+0.986931418535j)*x[2]
            ref[(1, 0, 2)]+=(-0.784813626628+0.986931418535j)*x_ref[2]
            arg[(1, 1, 0)]+=(0.935252916202+0.196626114355j)*x[2]
            ref[(1, 1, 0)]+=(0.935252916202+0.196626114355j)*x_ref[2]
            arg[(1, 1, 1)]+=(0.737137031529+0.363335376767j)*x[2]
            ref[(1, 1, 1)]+=(0.737137031529+0.363335376767j)*x_ref[2]
            arg[(1, 1, 2)]+=(0.0514813788304+0.204907233706j)*x[2]
            ref[(1, 1, 2)]+=(0.0514813788304+0.204907233706j)*x_ref[2]
            arg[(1, 2, 0)]+=(0.671591758318-0.418675585097j)*x[2]
            ref[(1, 2, 0)]+=(0.671591758318-0.418675585097j)*x_ref[2]
            arg[(1, 2, 1)]+=(-0.14706192489-0.102042113504j)*x[2]
            ref[(1, 2, 1)]+=(-0.14706192489-0.102042113504j)*x_ref[2]
            arg[(1, 2, 2)]+=(-0.901043873791+0.0855967119458j)*x[2]
            ref[(1, 2, 2)]+=(-0.901043873791+0.0855967119458j)*x_ref[2]
            arg[(1, 3, 0)]+=(-0.574235005766-0.0881786183322j)*x[2]
            ref[(1, 3, 0)]+=(-0.574235005766-0.0881786183322j)*x_ref[2]
            arg[(1, 3, 1)]+=(0.971991239956-0.168318295051j)*x[2]
            ref[(1, 3, 1)]+=(0.971991239956-0.168318295051j)*x_ref[2]
            arg[(1, 3, 2)]+=(-0.283476930483+0.98811496195j)*x[2]
            ref[(1, 3, 2)]+=(-0.283476930483+0.98811496195j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 4, 2),w)
        ref = Data(0,(2, 2, 4, 2),w_ref)
        arg[(0, 0, 0, 0)]=(0.00940191111371-0.528831886122j)*x[0] + ((0.560071399985+0.409011304686j))*x[1]
        ref[(0, 0, 0, 0)]=(0.00940191111371-0.528831886122j)*x_ref[0] + ((0.560071399985+0.409011304686j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.486785889-0.896999244707j)*x[0] + ((-0.664172479157+0.63378837293j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.486785889-0.896999244707j)*x_ref[0] + ((-0.664172479157+0.63378837293j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.691431116453+0.127611149645j)*x[0] + ((0.359608532377+0.672374257657j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.691431116453+0.127611149645j)*x_ref[0] + ((0.359608532377+0.672374257657j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.5899003764+0.509366982194j)*x[0] + ((-0.760962080717-0.431551357867j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.5899003764+0.509366982194j)*x_ref[0] + ((-0.760962080717-0.431551357867j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(-0.345138893092-0.386720253964j)*x[0] + ((-0.419221899795+0.720158597001j))*x[1]
        ref[(0, 0, 2, 0)]=(-0.345138893092-0.386720253964j)*x_ref[0] + ((-0.419221899795+0.720158597001j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(-0.948953467971+0.0408012342179j)*x[0] + ((0.538062914538+0.401590488103j))*x[1]
        ref[(0, 0, 2, 1)]=(-0.948953467971+0.0408012342179j)*x_ref[0] + ((0.538062914538+0.401590488103j))*x_ref[1]
        arg[(0, 0, 3, 0)]=(0.203876673164-0.320369510998j)*x[0] + ((-0.083784044724+0.0655495836853j))*x[1]
        ref[(0, 0, 3, 0)]=(0.203876673164-0.320369510998j)*x_ref[0] + ((-0.083784044724+0.0655495836853j))*x_ref[1]
        arg[(0, 0, 3, 1)]=(0.711290879932-0.510319525413j)*x[0] + ((-0.614886816375+0.0492580448532j))*x[1]
        ref[(0, 0, 3, 1)]=(0.711290879932-0.510319525413j)*x_ref[0] + ((-0.614886816375+0.0492580448532j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.232026951287-0.892359396079j)*x[0] + ((0.994628224078+0.803899036751j))*x[1]
        ref[(0, 1, 0, 0)]=(0.232026951287-0.892359396079j)*x_ref[0] + ((0.994628224078+0.803899036751j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.430152688298+0.240307604401j)*x[0] + ((-0.678810047326-0.0510786982557j))*x[1]
        ref[(0, 1, 0, 1)]=(0.430152688298+0.240307604401j)*x_ref[0] + ((-0.678810047326-0.0510786982557j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.0201197753722+0.476730430691j)*x[0] + ((0.721913448125+0.498256999794j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.0201197753722+0.476730430691j)*x_ref[0] + ((0.721913448125+0.498256999794j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.303798793009+0.834734613458j)*x[0] + ((-0.738324988104+0.921268482358j))*x[1]
        ref[(0, 1, 1, 1)]=(0.303798793009+0.834734613458j)*x_ref[0] + ((-0.738324988104+0.921268482358j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(-0.507154851287+0.0639010460406j)*x[0] + ((0.997671381342+0.987447922796j))*x[1]
        ref[(0, 1, 2, 0)]=(-0.507154851287+0.0639010460406j)*x_ref[0] + ((0.997671381342+0.987447922796j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(-0.0878403600773-0.108475017528j)*x[0] + ((-0.618272591228+0.828777723782j))*x[1]
        ref[(0, 1, 2, 1)]=(-0.0878403600773-0.108475017528j)*x_ref[0] + ((-0.618272591228+0.828777723782j))*x_ref[1]
        arg[(0, 1, 3, 0)]=(0.103510512277+0.525805440739j)*x[0] + ((-0.975512460263-0.115387104134j))*x[1]
        ref[(0, 1, 3, 0)]=(0.103510512277+0.525805440739j)*x_ref[0] + ((-0.975512460263-0.115387104134j))*x_ref[1]
        arg[(0, 1, 3, 1)]=(0.4060487381-0.108810944196j)*x[0] + ((-0.341170324231-0.485160491674j))*x[1]
        ref[(0, 1, 3, 1)]=(0.4060487381-0.108810944196j)*x_ref[0] + ((-0.341170324231-0.485160491674j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.986502403982-0.438023687415j)*x[0] + ((-0.555082514185+0.168991245638j))*x[1]
        ref[(1, 0, 0, 0)]=(0.986502403982-0.438023687415j)*x_ref[0] + ((-0.555082514185+0.168991245638j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.436026536607-0.408526404349j)*x[0] + ((0.988336539205+0.934518001065j))*x[1]
        ref[(1, 0, 0, 1)]=(0.436026536607-0.408526404349j)*x_ref[0] + ((0.988336539205+0.934518001065j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.293570667289-0.717177599992j)*x[0] + ((-0.9125491524+0.27498433722j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.293570667289-0.717177599992j)*x_ref[0] + ((-0.9125491524+0.27498433722j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.534428318169-0.533328753956j)*x[0] + ((0.349379588693-0.601968788495j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.534428318169-0.533328753956j)*x_ref[0] + ((0.349379588693-0.601968788495j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(0.0434949115612+0.146232686331j)*x[0] + ((-0.643294812973-0.872502298084j))*x[1]
        ref[(1, 0, 2, 0)]=(0.0434949115612+0.146232686331j)*x_ref[0] + ((-0.643294812973-0.872502298084j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(-0.978515711356+0.565635097724j)*x[0] + ((-0.688390855858+0.554588273157j))*x[1]
        ref[(1, 0, 2, 1)]=(-0.978515711356+0.565635097724j)*x_ref[0] + ((-0.688390855858+0.554588273157j))*x_ref[1]
        arg[(1, 0, 3, 0)]=(-0.259478547812+0.0473345490078j)*x[0] + ((-0.322080538271-0.590554698733j))*x[1]
        ref[(1, 0, 3, 0)]=(-0.259478547812+0.0473345490078j)*x_ref[0] + ((-0.322080538271-0.590554698733j))*x_ref[1]
        arg[(1, 0, 3, 1)]=(0.146398245705-0.00949606713303j)*x[0] + ((0.578188107623-0.936855783934j))*x[1]
        ref[(1, 0, 3, 1)]=(0.146398245705-0.00949606713303j)*x_ref[0] + ((0.578188107623-0.936855783934j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.340856108282+0.162329472263j)*x[0] + ((-0.639498288854-0.557460084195j))*x[1]
        ref[(1, 1, 0, 0)]=(0.340856108282+0.162329472263j)*x_ref[0] + ((-0.639498288854-0.557460084195j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.349345196619-0.530103338965j)*x[0] + ((-0.949023631152+0.736801515603j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.349345196619-0.530103338965j)*x_ref[0] + ((-0.949023631152+0.736801515603j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.734294247972+0.805939143124j)*x[0] + ((-0.158374523034+0.928177513917j))*x[1]
        ref[(1, 1, 1, 0)]=(0.734294247972+0.805939143124j)*x_ref[0] + ((-0.158374523034+0.928177513917j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.66688223002-0.761372008894j)*x[0] + ((0.342075500676-0.754832056072j))*x[1]
        ref[(1, 1, 1, 1)]=(0.66688223002-0.761372008894j)*x_ref[0] + ((0.342075500676-0.754832056072j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(0.566491297264+0.372062228542j)*x[0] + ((-0.82803366197+0.538937521777j))*x[1]
        ref[(1, 1, 2, 0)]=(0.566491297264+0.372062228542j)*x_ref[0] + ((-0.82803366197+0.538937521777j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(-0.590360585551+0.0101626680011j)*x[0] + ((-0.964307295321+0.377162388926j))*x[1]
        ref[(1, 1, 2, 1)]=(-0.590360585551+0.0101626680011j)*x_ref[0] + ((-0.964307295321+0.377162388926j))*x_ref[1]
        arg[(1, 1, 3, 0)]=(-0.929886355461-0.360910528575j)*x[0] + ((-0.419758068471-0.829033948661j))*x[1]
        ref[(1, 1, 3, 0)]=(-0.929886355461-0.360910528575j)*x_ref[0] + ((-0.419758068471-0.829033948661j))*x_ref[1]
        arg[(1, 1, 3, 1)]=(-0.708432640709-0.293484918801j)*x[0] + ((0.947450416802+0.199583299732j))*x[1]
        ref[(1, 1, 3, 1)]=(-0.708432640709-0.293484918801j)*x_ref[0] + ((0.947450416802+0.199583299732j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.449499990204+0.635429835999j)*x[2]
            ref[(0, 0, 0, 0)]+=(-0.449499990204+0.635429835999j)*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.576880556088-0.851759751806j)*x[2]
            ref[(0, 0, 0, 1)]+=(0.576880556088-0.851759751806j)*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.66529746364-0.62963907829j)*x[2]
            ref[(0, 0, 1, 0)]+=(0.66529746364-0.62963907829j)*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.130148327685-0.0821881475071j)*x[2]
            ref[(0, 0, 1, 1)]+=(0.130148327685-0.0821881475071j)*x_ref[2]
            arg[(0, 0, 2, 0)]+=(0.125186565563+0.564387257844j)*x[2]
            ref[(0, 0, 2, 0)]+=(0.125186565563+0.564387257844j)*x_ref[2]
            arg[(0, 0, 2, 1)]+=(-0.339563901151+0.903975950743j)*x[2]
            ref[(0, 0, 2, 1)]+=(-0.339563901151+0.903975950743j)*x_ref[2]
            arg[(0, 0, 3, 0)]+=(-0.763147168603-0.93464399511j)*x[2]
            ref[(0, 0, 3, 0)]+=(-0.763147168603-0.93464399511j)*x_ref[2]
            arg[(0, 0, 3, 1)]+=(-0.376178672326+0.00329502170286j)*x[2]
            ref[(0, 0, 3, 1)]+=(-0.376178672326+0.00329502170286j)*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.162327748126-0.370149495247j)*x[2]
            ref[(0, 1, 0, 0)]+=(0.162327748126-0.370149495247j)*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.199677560223-0.65680351763j)*x[2]
            ref[(0, 1, 0, 1)]+=(0.199677560223-0.65680351763j)*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.230082554327-0.626017825046j)*x[2]
            ref[(0, 1, 1, 0)]+=(-0.230082554327-0.626017825046j)*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.938713859528-0.343031773175j)*x[2]
            ref[(0, 1, 1, 1)]+=(-0.938713859528-0.343031773175j)*x_ref[2]
            arg[(0, 1, 2, 0)]+=(-0.37197149701+0.781023176858j)*x[2]
            ref[(0, 1, 2, 0)]+=(-0.37197149701+0.781023176858j)*x_ref[2]
            arg[(0, 1, 2, 1)]+=(-0.780628555337+0.00620120751062j)*x[2]
            ref[(0, 1, 2, 1)]+=(-0.780628555337+0.00620120751062j)*x_ref[2]
            arg[(0, 1, 3, 0)]+=(0.247847185375-0.317038644459j)*x[2]
            ref[(0, 1, 3, 0)]+=(0.247847185375-0.317038644459j)*x_ref[2]
            arg[(0, 1, 3, 1)]+=(0.120765939959-0.760122401157j)*x[2]
            ref[(0, 1, 3, 1)]+=(0.120765939959-0.760122401157j)*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.169724349836+0.418741711006j)*x[2]
            ref[(1, 0, 0, 0)]+=(-0.169724349836+0.418741711006j)*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.790895424714+0.623860676129j)*x[2]
            ref[(1, 0, 0, 1)]+=(0.790895424714+0.623860676129j)*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.98889820327+0.35568616168j)*x[2]
            ref[(1, 0, 1, 0)]+=(-0.98889820327+0.35568616168j)*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.914989388591-0.896705696987j)*x[2]
            ref[(1, 0, 1, 1)]+=(0.914989388591-0.896705696987j)*x_ref[2]
            arg[(1, 0, 2, 0)]+=(-0.913201417147+0.382976719505j)*x[2]
            ref[(1, 0, 2, 0)]+=(-0.913201417147+0.382976719505j)*x_ref[2]
            arg[(1, 0, 2, 1)]+=(0.00602016469425+0.956921620821j)*x[2]
            ref[(1, 0, 2, 1)]+=(0.00602016469425+0.956921620821j)*x_ref[2]
            arg[(1, 0, 3, 0)]+=(0.779440757447-0.748386468066j)*x[2]
            ref[(1, 0, 3, 0)]+=(0.779440757447-0.748386468066j)*x_ref[2]
            arg[(1, 0, 3, 1)]+=(-0.470555167905-0.031470010702j)*x[2]
            ref[(1, 0, 3, 1)]+=(-0.470555167905-0.031470010702j)*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.0616052924009-0.696102647497j)*x[2]
            ref[(1, 1, 0, 0)]+=(0.0616052924009-0.696102647497j)*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.213612225447+0.562585674805j)*x[2]
            ref[(1, 1, 0, 1)]+=(0.213612225447+0.562585674805j)*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.166659790368-0.985091209287j)*x[2]
            ref[(1, 1, 1, 0)]+=(0.166659790368-0.985091209287j)*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.156349858823-0.562092343255j)*x[2]
            ref[(1, 1, 1, 1)]+=(-0.156349858823-0.562092343255j)*x_ref[2]
            arg[(1, 1, 2, 0)]+=(-0.684978234991+0.245786384909j)*x[2]
            ref[(1, 1, 2, 0)]+=(-0.684978234991+0.245786384909j)*x_ref[2]
            arg[(1, 1, 2, 1)]+=(0.714958311319+0.972901009248j)*x[2]
            ref[(1, 1, 2, 1)]+=(0.714958311319+0.972901009248j)*x_ref[2]
            arg[(1, 1, 3, 0)]+=(-0.722021254006-0.636266311804j)*x[2]
            ref[(1, 1, 3, 0)]+=(-0.722021254006-0.636266311804j)*x_ref[2]
            arg[(1, 1, 3, 1)]+=(0.260427094411-0.262243900707j)*x[2]
            ref[(1, 1, 3, 1)]+=(0.260427094411-0.262243900707j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.824298671984-0.918090527906j)*x[0] + ((-0.197751601724+0.225428886033j))*x[1]
        ref=(0.824298671984-0.918090527906j)*x_ref[0] + ((-0.197751601724+0.225428886033j))*x_ref[1]
        if dim==3:
            arg+=((0.507544988658+0.646671520605j))*x[2]
            ref+=((0.507544988658+0.646671520605j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=(0.483647297308+0.586033975367j)*x[0] + ((0.255698941092-0.587702936859j))*x[1]
        ref[(0,)]=(0.483647297308+0.586033975367j)*x_ref[0] + ((0.255698941092-0.587702936859j))*x_ref[1]
        arg[(1,)]=(-0.267513106677-0.16921699514j)*x[0] + ((-0.497128026893-0.456259583089j))*x[1]
        ref[(1,)]=(-0.267513106677-0.16921699514j)*x_ref[0] + ((-0.497128026893-0.456259583089j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.734978020674-0.929689935232j)*x[2]
            ref[(0,)]+=(-0.734978020674-0.929689935232j)*x_ref[2]
            arg[(1,)]+=(0.661131371553-0.261957522345j)*x[2]
            ref[(1,)]+=(0.661131371553-0.261957522345j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref = Data(0,(4, 4),w_ref)
        arg[(0, 0)]=(0.399962420748+0.0406923132585j)*x[0] + ((-0.0534986903657+0.614543898009j))*x[1]
        ref[(0, 0)]=(0.399962420748+0.0406923132585j)*x_ref[0] + ((-0.0534986903657+0.614543898009j))*x_ref[1]
        arg[(0, 1)]=(-0.199113197561-0.297905253295j)*x[0] + ((-0.83093924128+0.610688052958j))*x[1]
        ref[(0, 1)]=(-0.199113197561-0.297905253295j)*x_ref[0] + ((-0.83093924128+0.610688052958j))*x_ref[1]
        arg[(0, 2)]=(0.0185958225324-0.867342862444j)*x[0] + ((0.603484257648+0.0839483762674j))*x[1]
        ref[(0, 2)]=(0.0185958225324-0.867342862444j)*x_ref[0] + ((0.603484257648+0.0839483762674j))*x_ref[1]
        arg[(0, 3)]=(-0.910551786984-0.534265561901j)*x[0] + ((-0.151360722338+0.791955697466j))*x[1]
        ref[(0, 3)]=(-0.910551786984-0.534265561901j)*x_ref[0] + ((-0.151360722338+0.791955697466j))*x_ref[1]
        arg[(1, 0)]=(-0.961401460301-0.429540048769j)*x[0] + ((0.871235301804-0.751066527138j))*x[1]
        ref[(1, 0)]=(-0.961401460301-0.429540048769j)*x_ref[0] + ((0.871235301804-0.751066527138j))*x_ref[1]
        arg[(1, 1)]=(0.953086274173+0.603211397139j)*x[0] + ((0.2190431742+0.224840536226j))*x[1]
        ref[(1, 1)]=(0.953086274173+0.603211397139j)*x_ref[0] + ((0.2190431742+0.224840536226j))*x_ref[1]
        arg[(1, 2)]=(0.846972393814+0.583508090853j)*x[0] + ((-0.636510102844+0.518355182456j))*x[1]
        ref[(1, 2)]=(0.846972393814+0.583508090853j)*x_ref[0] + ((-0.636510102844+0.518355182456j))*x_ref[1]
        arg[(1, 3)]=(0.977678730206-0.563953305587j)*x[0] + ((0.18741892846-0.923746778417j))*x[1]
        ref[(1, 3)]=(0.977678730206-0.563953305587j)*x_ref[0] + ((0.18741892846-0.923746778417j))*x_ref[1]
        arg[(2, 0)]=(0.614155954877-0.346721379533j)*x[0] + ((-0.847976974696-0.608955719328j))*x[1]
        ref[(2, 0)]=(0.614155954877-0.346721379533j)*x_ref[0] + ((-0.847976974696-0.608955719328j))*x_ref[1]
        arg[(2, 1)]=(-0.0317475599883-0.603116768714j)*x[0] + ((0.843869059431+0.747758471365j))*x[1]
        ref[(2, 1)]=(-0.0317475599883-0.603116768714j)*x_ref[0] + ((0.843869059431+0.747758471365j))*x_ref[1]
        arg[(2, 2)]=(0.147432098859-0.430755211959j)*x[0] + ((-0.260873864772-0.195343692924j))*x[1]
        ref[(2, 2)]=(0.147432098859-0.430755211959j)*x_ref[0] + ((-0.260873864772-0.195343692924j))*x_ref[1]
        arg[(2, 3)]=(-0.129195929991+0.782713415041j)*x[0] + ((-0.370169605692-0.340594938152j))*x[1]
        ref[(2, 3)]=(-0.129195929991+0.782713415041j)*x_ref[0] + ((-0.370169605692-0.340594938152j))*x_ref[1]
        arg[(3, 0)]=(-0.420832586251+0.797834577955j)*x[0] + ((0.984400545154+0.988084386781j))*x[1]
        ref[(3, 0)]=(-0.420832586251+0.797834577955j)*x_ref[0] + ((0.984400545154+0.988084386781j))*x_ref[1]
        arg[(3, 1)]=(0.235740076487+0.473659282094j)*x[0] + ((-0.750431745324-0.407228738011j))*x[1]
        ref[(3, 1)]=(0.235740076487+0.473659282094j)*x_ref[0] + ((-0.750431745324-0.407228738011j))*x_ref[1]
        arg[(3, 2)]=(-0.746687273371-0.492300414949j)*x[0] + ((0.669274568327-0.80594583286j))*x[1]
        ref[(3, 2)]=(-0.746687273371-0.492300414949j)*x_ref[0] + ((0.669274568327-0.80594583286j))*x_ref[1]
        arg[(3, 3)]=(0.472808177081+0.321060353589j)*x[0] + ((0.744933693682-0.575440426696j))*x[1]
        ref[(3, 3)]=(0.472808177081+0.321060353589j)*x_ref[0] + ((0.744933693682-0.575440426696j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.22492798824-0.512568285255j)*x[2]
            ref[(0, 0)]+=(0.22492798824-0.512568285255j)*x_ref[2]
            arg[(0, 1)]+=(-0.615275462629+0.0542486643093j)*x[2]
            ref[(0, 1)]+=(-0.615275462629+0.0542486643093j)*x_ref[2]
            arg[(0, 2)]+=(-0.365350095405+0.359119459051j)*x[2]
            ref[(0, 2)]+=(-0.365350095405+0.359119459051j)*x_ref[2]
            arg[(0, 3)]+=(0.719455478718+0.386297313608j)*x[2]
            ref[(0, 3)]+=(0.719455478718+0.386297313608j)*x_ref[2]
            arg[(1, 0)]+=(-0.430615201372-0.66413264208j)*x[2]
            ref[(1, 0)]+=(-0.430615201372-0.66413264208j)*x_ref[2]
            arg[(1, 1)]+=(0.804799128517-0.306865908866j)*x[2]
            ref[(1, 1)]+=(0.804799128517-0.306865908866j)*x_ref[2]
            arg[(1, 2)]+=(0.834408861664-0.205137783296j)*x[2]
            ref[(1, 2)]+=(0.834408861664-0.205137783296j)*x_ref[2]
            arg[(1, 3)]+=(-0.049964096195+0.598885625997j)*x[2]
            ref[(1, 3)]+=(-0.049964096195+0.598885625997j)*x_ref[2]
            arg[(2, 0)]+=(0.103743961629-0.962031881248j)*x[2]
            ref[(2, 0)]+=(0.103743961629-0.962031881248j)*x_ref[2]
            arg[(2, 1)]+=(-0.227909129731+0.905779503951j)*x[2]
            ref[(2, 1)]+=(-0.227909129731+0.905779503951j)*x_ref[2]
            arg[(2, 2)]+=(-0.99873954288+0.1656029428j)*x[2]
            ref[(2, 2)]+=(-0.99873954288+0.1656029428j)*x_ref[2]
            arg[(2, 3)]+=(0.0353440165742+0.421320699535j)*x[2]
            ref[(2, 3)]+=(0.0353440165742+0.421320699535j)*x_ref[2]
            arg[(3, 0)]+=(-0.748581306208+0.239114801511j)*x[2]
            ref[(3, 0)]+=(-0.748581306208+0.239114801511j)*x_ref[2]
            arg[(3, 1)]+=(0.660822583375-0.205377223728j)*x[2]
            ref[(3, 1)]+=(0.660822583375-0.205377223728j)*x_ref[2]
            arg[(3, 2)]+=(-0.0244969566411+0.911415151565j)*x[2]
            ref[(3, 2)]+=(-0.0244969566411+0.911415151565j)*x_ref[2]
            arg[(3, 3)]+=(0.159194399616-0.709509913349j)*x[2]
            ref[(3, 3)]+=(0.159194399616-0.709509913349j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 2),w)
        ref = Data(0,(4, 3, 2),w_ref)
        arg[(0, 0, 0)]=(-0.0974437753787-0.554582238205j)*x[0] + ((-0.200263069642-0.045900581484j))*x[1]
        ref[(0, 0, 0)]=(-0.0974437753787-0.554582238205j)*x_ref[0] + ((-0.200263069642-0.045900581484j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.116539787177+0.738098838551j)*x[0] + ((0.755137973664-0.281618236717j))*x[1]
        ref[(0, 0, 1)]=(-0.116539787177+0.738098838551j)*x_ref[0] + ((0.755137973664-0.281618236717j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.808095814086-0.494618271773j)*x[0] + ((0.89627662031+0.600581886981j))*x[1]
        ref[(0, 1, 0)]=(-0.808095814086-0.494618271773j)*x_ref[0] + ((0.89627662031+0.600581886981j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.357306667526+0.0370680325852j)*x[0] + ((-0.305441316862+0.239535560269j))*x[1]
        ref[(0, 1, 1)]=(-0.357306667526+0.0370680325852j)*x_ref[0] + ((-0.305441316862+0.239535560269j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.958261465948+0.848092856204j)*x[0] + ((0.605368399288+0.224115374522j))*x[1]
        ref[(0, 2, 0)]=(-0.958261465948+0.848092856204j)*x_ref[0] + ((0.605368399288+0.224115374522j))*x_ref[1]
        arg[(0, 2, 1)]=(0.094176358455+0.294364543724j)*x[0] + ((-0.994491444462+0.443515929771j))*x[1]
        ref[(0, 2, 1)]=(0.094176358455+0.294364543724j)*x_ref[0] + ((-0.994491444462+0.443515929771j))*x_ref[1]
        arg[(1, 0, 0)]=(0.0561169897943+0.972141122621j)*x[0] + ((-0.762677682318-0.728291410735j))*x[1]
        ref[(1, 0, 0)]=(0.0561169897943+0.972141122621j)*x_ref[0] + ((-0.762677682318-0.728291410735j))*x_ref[1]
        arg[(1, 0, 1)]=(0.305174675708+0.835066873798j)*x[0] + ((-0.306419456136+0.383765804573j))*x[1]
        ref[(1, 0, 1)]=(0.305174675708+0.835066873798j)*x_ref[0] + ((-0.306419456136+0.383765804573j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.44116217335-0.870116760301j)*x[0] + ((-0.0740465609219-0.421109781799j))*x[1]
        ref[(1, 1, 0)]=(-0.44116217335-0.870116760301j)*x_ref[0] + ((-0.0740465609219-0.421109781799j))*x_ref[1]
        arg[(1, 1, 1)]=(0.918051489487+0.815884894912j)*x[0] + ((-0.485319056426-0.173121024752j))*x[1]
        ref[(1, 1, 1)]=(0.918051489487+0.815884894912j)*x_ref[0] + ((-0.485319056426-0.173121024752j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.241680679687+0.794618082608j)*x[0] + ((0.689578406405-0.765022616795j))*x[1]
        ref[(1, 2, 0)]=(-0.241680679687+0.794618082608j)*x_ref[0] + ((0.689578406405-0.765022616795j))*x_ref[1]
        arg[(1, 2, 1)]=(0.435311285559+0.954329598742j)*x[0] + ((0.186155619801+0.722281040254j))*x[1]
        ref[(1, 2, 1)]=(0.435311285559+0.954329598742j)*x_ref[0] + ((0.186155619801+0.722281040254j))*x_ref[1]
        arg[(2, 0, 0)]=(-0.0971949050709-0.410367074841j)*x[0] + ((-0.956415087026+0.753819458606j))*x[1]
        ref[(2, 0, 0)]=(-0.0971949050709-0.410367074841j)*x_ref[0] + ((-0.956415087026+0.753819458606j))*x_ref[1]
        arg[(2, 0, 1)]=(-0.672870683455-0.346879700315j)*x[0] + ((-0.784134205678-0.480712311282j))*x[1]
        ref[(2, 0, 1)]=(-0.672870683455-0.346879700315j)*x_ref[0] + ((-0.784134205678-0.480712311282j))*x_ref[1]
        arg[(2, 1, 0)]=(-0.134442742326-0.268208625502j)*x[0] + ((-0.988732062333+0.571659164472j))*x[1]
        ref[(2, 1, 0)]=(-0.134442742326-0.268208625502j)*x_ref[0] + ((-0.988732062333+0.571659164472j))*x_ref[1]
        arg[(2, 1, 1)]=(0.139646793581-0.327947825322j)*x[0] + ((-0.340027052568+0.319519390491j))*x[1]
        ref[(2, 1, 1)]=(0.139646793581-0.327947825322j)*x_ref[0] + ((-0.340027052568+0.319519390491j))*x_ref[1]
        arg[(2, 2, 0)]=(-0.87644246252-0.0417560886689j)*x[0] + ((0.482059210162-0.808186812685j))*x[1]
        ref[(2, 2, 0)]=(-0.87644246252-0.0417560886689j)*x_ref[0] + ((0.482059210162-0.808186812685j))*x_ref[1]
        arg[(2, 2, 1)]=(-0.947480126782-0.903643271216j)*x[0] + ((-0.261598856642-0.638204308202j))*x[1]
        ref[(2, 2, 1)]=(-0.947480126782-0.903643271216j)*x_ref[0] + ((-0.261598856642-0.638204308202j))*x_ref[1]
        arg[(3, 0, 0)]=(-0.924657836272+0.50197212673j)*x[0] + ((0.154450213111+0.52557046244j))*x[1]
        ref[(3, 0, 0)]=(-0.924657836272+0.50197212673j)*x_ref[0] + ((0.154450213111+0.52557046244j))*x_ref[1]
        arg[(3, 0, 1)]=(0.814957382603-0.779448255575j)*x[0] + ((-0.288744920856+0.0681267906339j))*x[1]
        ref[(3, 0, 1)]=(0.814957382603-0.779448255575j)*x_ref[0] + ((-0.288744920856+0.0681267906339j))*x_ref[1]
        arg[(3, 1, 0)]=(0.732664824802+0.510581466165j)*x[0] + ((-0.633491467257+0.390696654817j))*x[1]
        ref[(3, 1, 0)]=(0.732664824802+0.510581466165j)*x_ref[0] + ((-0.633491467257+0.390696654817j))*x_ref[1]
        arg[(3, 1, 1)]=(-0.817974661499-0.824380984194j)*x[0] + ((-0.302627264243+0.405511689529j))*x[1]
        ref[(3, 1, 1)]=(-0.817974661499-0.824380984194j)*x_ref[0] + ((-0.302627264243+0.405511689529j))*x_ref[1]
        arg[(3, 2, 0)]=(0.331409178421+0.488261381237j)*x[0] + ((0.103987557363+0.021669086406j))*x[1]
        ref[(3, 2, 0)]=(0.331409178421+0.488261381237j)*x_ref[0] + ((0.103987557363+0.021669086406j))*x_ref[1]
        arg[(3, 2, 1)]=(0.755652606671-0.247861386742j)*x[0] + ((0.0923564292615-0.502163274124j))*x[1]
        ref[(3, 2, 1)]=(0.755652606671-0.247861386742j)*x_ref[0] + ((0.0923564292615-0.502163274124j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.103550560204-0.982395534811j)*x[2]
            ref[(0, 0, 0)]+=(0.103550560204-0.982395534811j)*x_ref[2]
            arg[(0, 0, 1)]+=(0.117285835281+0.853398953628j)*x[2]
            ref[(0, 0, 1)]+=(0.117285835281+0.853398953628j)*x_ref[2]
            arg[(0, 1, 0)]+=(-0.0195141186762+0.353537961167j)*x[2]
            ref[(0, 1, 0)]+=(-0.0195141186762+0.353537961167j)*x_ref[2]
            arg[(0, 1, 1)]+=(0.304346465412+0.0973274195889j)*x[2]
            ref[(0, 1, 1)]+=(0.304346465412+0.0973274195889j)*x_ref[2]
            arg[(0, 2, 0)]+=(0.776702164994+0.119680507107j)*x[2]
            ref[(0, 2, 0)]+=(0.776702164994+0.119680507107j)*x_ref[2]
            arg[(0, 2, 1)]+=(0.655366854563-0.925385557075j)*x[2]
            ref[(0, 2, 1)]+=(0.655366854563-0.925385557075j)*x_ref[2]
            arg[(1, 0, 0)]+=(0.49331689304+0.834825184211j)*x[2]
            ref[(1, 0, 0)]+=(0.49331689304+0.834825184211j)*x_ref[2]
            arg[(1, 0, 1)]+=(-0.651822342076+0.345819645396j)*x[2]
            ref[(1, 0, 1)]+=(-0.651822342076+0.345819645396j)*x_ref[2]
            arg[(1, 1, 0)]+=(-0.152505197154-0.89594592423j)*x[2]
            ref[(1, 1, 0)]+=(-0.152505197154-0.89594592423j)*x_ref[2]
            arg[(1, 1, 1)]+=(-0.476579641761-0.818470459477j)*x[2]
            ref[(1, 1, 1)]+=(-0.476579641761-0.818470459477j)*x_ref[2]
            arg[(1, 2, 0)]+=(-0.943520496058+0.503064720504j)*x[2]
            ref[(1, 2, 0)]+=(-0.943520496058+0.503064720504j)*x_ref[2]
            arg[(1, 2, 1)]+=(-0.156786539166+0.399446921961j)*x[2]
            ref[(1, 2, 1)]+=(-0.156786539166+0.399446921961j)*x_ref[2]
            arg[(2, 0, 0)]+=(-0.0211387289529+0.258189715436j)*x[2]
            ref[(2, 0, 0)]+=(-0.0211387289529+0.258189715436j)*x_ref[2]
            arg[(2, 0, 1)]+=(-0.390516711383-0.921374421805j)*x[2]
            ref[(2, 0, 1)]+=(-0.390516711383-0.921374421805j)*x_ref[2]
            arg[(2, 1, 0)]+=(0.551471166603+0.861548900105j)*x[2]
            ref[(2, 1, 0)]+=(0.551471166603+0.861548900105j)*x_ref[2]
            arg[(2, 1, 1)]+=(0.332023925125+0.527131677775j)*x[2]
            ref[(2, 1, 1)]+=(0.332023925125+0.527131677775j)*x_ref[2]
            arg[(2, 2, 0)]+=(-0.547609117132-0.206995874264j)*x[2]
            ref[(2, 2, 0)]+=(-0.547609117132-0.206995874264j)*x_ref[2]
            arg[(2, 2, 1)]+=(0.99960028291-0.893588299506j)*x[2]
            ref[(2, 2, 1)]+=(0.99960028291-0.893588299506j)*x_ref[2]
            arg[(3, 0, 0)]+=(-0.740417586744-0.641211424365j)*x[2]
            ref[(3, 0, 0)]+=(-0.740417586744-0.641211424365j)*x_ref[2]
            arg[(3, 0, 1)]+=(-0.374498925553+0.522229972804j)*x[2]
            ref[(3, 0, 1)]+=(-0.374498925553+0.522229972804j)*x_ref[2]
            arg[(3, 1, 0)]+=(0.177473742898-0.319919652302j)*x[2]
            ref[(3, 1, 0)]+=(0.177473742898-0.319919652302j)*x_ref[2]
            arg[(3, 1, 1)]+=(0.394345492822-0.0929923819968j)*x[2]
            ref[(3, 1, 1)]+=(0.394345492822-0.0929923819968j)*x_ref[2]
            arg[(3, 2, 0)]+=(0.24792639543+0.836636549447j)*x[2]
            ref[(3, 2, 0)]+=(0.24792639543+0.836636549447j)*x_ref[2]
            arg[(3, 2, 1)]+=(-0.826961946588+0.910965345195j)*x[2]
            ref[(3, 2, 1)]+=(-0.826961946588+0.910965345195j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 2, 4),w)
        ref = Data(0,(4, 2, 2, 4),w_ref)
        arg[(0, 0, 0, 0)]=(0.0383159322456+0.246587857562j)*x[0] + ((0.879245337451-0.475800210461j))*x[1]
        ref[(0, 0, 0, 0)]=(0.0383159322456+0.246587857562j)*x_ref[0] + ((0.879245337451-0.475800210461j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.834954352353-0.75008905425j)*x[0] + ((-0.185192856949-0.876465995868j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.834954352353-0.75008905425j)*x_ref[0] + ((-0.185192856949-0.876465995868j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.999295285816-0.750926681081j)*x[0] + ((-0.831410467518-0.14570046282j))*x[1]
        ref[(0, 0, 0, 2)]=(0.999295285816-0.750926681081j)*x_ref[0] + ((-0.831410467518-0.14570046282j))*x_ref[1]
        arg[(0, 0, 0, 3)]=(0.924804577726-0.334276094646j)*x[0] + ((-0.572774279101-0.459563961756j))*x[1]
        ref[(0, 0, 0, 3)]=(0.924804577726-0.334276094646j)*x_ref[0] + ((-0.572774279101-0.459563961756j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.604399149682+0.668322153356j)*x[0] + ((0.667365236561-0.325697062796j))*x[1]
        ref[(0, 0, 1, 0)]=(0.604399149682+0.668322153356j)*x_ref[0] + ((0.667365236561-0.325697062796j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.963325063015+0.975210807196j)*x[0] + ((-0.121954993654+0.637803924464j))*x[1]
        ref[(0, 0, 1, 1)]=(0.963325063015+0.975210807196j)*x_ref[0] + ((-0.121954993654+0.637803924464j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(0.104837291355+0.390377287448j)*x[0] + ((-0.73215405723-0.358473913035j))*x[1]
        ref[(0, 0, 1, 2)]=(0.104837291355+0.390377287448j)*x_ref[0] + ((-0.73215405723-0.358473913035j))*x_ref[1]
        arg[(0, 0, 1, 3)]=(0.874089985549+0.612075694041j)*x[0] + ((0.520933679203+0.845698893251j))*x[1]
        ref[(0, 0, 1, 3)]=(0.874089985549+0.612075694041j)*x_ref[0] + ((0.520933679203+0.845698893251j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.976200655288+0.114535705752j)*x[0] + ((-0.67919865755+0.681816933319j))*x[1]
        ref[(0, 1, 0, 0)]=(0.976200655288+0.114535705752j)*x_ref[0] + ((-0.67919865755+0.681816933319j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.529714054639+0.101802624544j)*x[0] + ((-0.441874445313-0.694718524274j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.529714054639+0.101802624544j)*x_ref[0] + ((-0.441874445313-0.694718524274j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(0.853854084892+0.162401156696j)*x[0] + ((-0.260752602586+0.470893135816j))*x[1]
        ref[(0, 1, 0, 2)]=(0.853854084892+0.162401156696j)*x_ref[0] + ((-0.260752602586+0.470893135816j))*x_ref[1]
        arg[(0, 1, 0, 3)]=(-0.141446545702-0.4965275791j)*x[0] + ((0.366379445676-0.647954379206j))*x[1]
        ref[(0, 1, 0, 3)]=(-0.141446545702-0.4965275791j)*x_ref[0] + ((0.366379445676-0.647954379206j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.0112623984521+0.373213177292j)*x[0] + ((0.592051527223-0.829000579962j))*x[1]
        ref[(0, 1, 1, 0)]=(0.0112623984521+0.373213177292j)*x_ref[0] + ((0.592051527223-0.829000579962j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.989698707796+0.438941094883j)*x[0] + ((0.912496129914+0.838475889233j))*x[1]
        ref[(0, 1, 1, 1)]=(0.989698707796+0.438941094883j)*x_ref[0] + ((0.912496129914+0.838475889233j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(0.683703786553-0.430851729618j)*x[0] + ((0.174827110109-0.876766446513j))*x[1]
        ref[(0, 1, 1, 2)]=(0.683703786553-0.430851729618j)*x_ref[0] + ((0.174827110109-0.876766446513j))*x_ref[1]
        arg[(0, 1, 1, 3)]=(-0.464590052807-0.149208672698j)*x[0] + ((-0.288309216372-0.131291840932j))*x[1]
        ref[(0, 1, 1, 3)]=(-0.464590052807-0.149208672698j)*x_ref[0] + ((-0.288309216372-0.131291840932j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.602821803751-0.944475136562j)*x[0] + ((-0.278460817225-0.503529514221j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.602821803751-0.944475136562j)*x_ref[0] + ((-0.278460817225-0.503529514221j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.315743298322-0.175359166887j)*x[0] + ((-0.365101467762-0.0468157876294j))*x[1]
        ref[(1, 0, 0, 1)]=(0.315743298322-0.175359166887j)*x_ref[0] + ((-0.365101467762-0.0468157876294j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(0.918702034851+0.677776883517j)*x[0] + ((-0.661676906318-0.125336325029j))*x[1]
        ref[(1, 0, 0, 2)]=(0.918702034851+0.677776883517j)*x_ref[0] + ((-0.661676906318-0.125336325029j))*x_ref[1]
        arg[(1, 0, 0, 3)]=(-0.787820301267+0.481784993354j)*x[0] + ((-0.389593526572-0.256023011417j))*x[1]
        ref[(1, 0, 0, 3)]=(-0.787820301267+0.481784993354j)*x_ref[0] + ((-0.389593526572-0.256023011417j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.813476915645+0.211184440789j)*x[0] + ((0.872332069033+0.428715502626j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.813476915645+0.211184440789j)*x_ref[0] + ((0.872332069033+0.428715502626j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.41230458444+0.325321592717j)*x[0] + ((-0.56918686184+0.263536026109j))*x[1]
        ref[(1, 0, 1, 1)]=(0.41230458444+0.325321592717j)*x_ref[0] + ((-0.56918686184+0.263536026109j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(0.832643479137-0.0456368657699j)*x[0] + ((0.638289978449+0.794672417474j))*x[1]
        ref[(1, 0, 1, 2)]=(0.832643479137-0.0456368657699j)*x_ref[0] + ((0.638289978449+0.794672417474j))*x_ref[1]
        arg[(1, 0, 1, 3)]=(-0.241081237039-0.528232091236j)*x[0] + ((-0.343107294695-0.192064404711j))*x[1]
        ref[(1, 0, 1, 3)]=(-0.241081237039-0.528232091236j)*x_ref[0] + ((-0.343107294695-0.192064404711j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.847989876696+0.248881559981j)*x[0] + ((0.580194319297+0.663364160486j))*x[1]
        ref[(1, 1, 0, 0)]=(0.847989876696+0.248881559981j)*x_ref[0] + ((0.580194319297+0.663364160486j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.13514868153-0.706152926377j)*x[0] + ((0.0147229632177-0.610183155666j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.13514868153-0.706152926377j)*x_ref[0] + ((0.0147229632177-0.610183155666j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(0.886209858145-0.0659778561189j)*x[0] + ((-0.441832767602+0.681484150409j))*x[1]
        ref[(1, 1, 0, 2)]=(0.886209858145-0.0659778561189j)*x_ref[0] + ((-0.441832767602+0.681484150409j))*x_ref[1]
        arg[(1, 1, 0, 3)]=(0.706841428614-0.728282400978j)*x[0] + ((-0.772080215893-0.0563462997086j))*x[1]
        ref[(1, 1, 0, 3)]=(0.706841428614-0.728282400978j)*x_ref[0] + ((-0.772080215893-0.0563462997086j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.514303321408+0.572289855899j)*x[0] + ((0.270835755676-0.581545434588j))*x[1]
        ref[(1, 1, 1, 0)]=(0.514303321408+0.572289855899j)*x_ref[0] + ((0.270835755676-0.581545434588j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.52608506654-0.719422185723j)*x[0] + ((-0.595903992575+0.171304847504j))*x[1]
        ref[(1, 1, 1, 1)]=(0.52608506654-0.719422185723j)*x_ref[0] + ((-0.595903992575+0.171304847504j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(-0.421575037322+0.404015738816j)*x[0] + ((0.41677592096-0.335804035558j))*x[1]
        ref[(1, 1, 1, 2)]=(-0.421575037322+0.404015738816j)*x_ref[0] + ((0.41677592096-0.335804035558j))*x_ref[1]
        arg[(1, 1, 1, 3)]=(-0.103832466605-0.384073260183j)*x[0] + ((-0.150085363176-0.848063410606j))*x[1]
        ref[(1, 1, 1, 3)]=(-0.103832466605-0.384073260183j)*x_ref[0] + ((-0.150085363176-0.848063410606j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(0.485535813884+0.266395735643j)*x[0] + ((-0.818046484284-0.262365183535j))*x[1]
        ref[(2, 0, 0, 0)]=(0.485535813884+0.266395735643j)*x_ref[0] + ((-0.818046484284-0.262365183535j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(-0.676840602897+0.86028351224j)*x[0] + ((-0.060110667346+0.939466267749j))*x[1]
        ref[(2, 0, 0, 1)]=(-0.676840602897+0.86028351224j)*x_ref[0] + ((-0.060110667346+0.939466267749j))*x_ref[1]
        arg[(2, 0, 0, 2)]=(0.504113261025+0.106314792638j)*x[0] + ((0.523416084656-0.762141916345j))*x[1]
        ref[(2, 0, 0, 2)]=(0.504113261025+0.106314792638j)*x_ref[0] + ((0.523416084656-0.762141916345j))*x_ref[1]
        arg[(2, 0, 0, 3)]=(-0.907705868291-0.992509235772j)*x[0] + ((0.252930494335-0.862775555534j))*x[1]
        ref[(2, 0, 0, 3)]=(-0.907705868291-0.992509235772j)*x_ref[0] + ((0.252930494335-0.862775555534j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(-0.390399181663-0.603872883246j)*x[0] + ((0.280498341207-0.438115008876j))*x[1]
        ref[(2, 0, 1, 0)]=(-0.390399181663-0.603872883246j)*x_ref[0] + ((0.280498341207-0.438115008876j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.193058820459-0.457076066583j)*x[0] + ((-0.241689137961+0.24651988562j))*x[1]
        ref[(2, 0, 1, 1)]=(0.193058820459-0.457076066583j)*x_ref[0] + ((-0.241689137961+0.24651988562j))*x_ref[1]
        arg[(2, 0, 1, 2)]=(0.556339497538+0.0910927415772j)*x[0] + ((0.0721671740501+0.320179877373j))*x[1]
        ref[(2, 0, 1, 2)]=(0.556339497538+0.0910927415772j)*x_ref[0] + ((0.0721671740501+0.320179877373j))*x_ref[1]
        arg[(2, 0, 1, 3)]=(0.603983509118-0.504568099819j)*x[0] + ((-0.478659476593-0.912078163254j))*x[1]
        ref[(2, 0, 1, 3)]=(0.603983509118-0.504568099819j)*x_ref[0] + ((-0.478659476593-0.912078163254j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(0.864242409224+0.686629158017j)*x[0] + ((0.437814903897+0.263407802149j))*x[1]
        ref[(2, 1, 0, 0)]=(0.864242409224+0.686629158017j)*x_ref[0] + ((0.437814903897+0.263407802149j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.0467849259365+0.59260326262j)*x[0] + ((0.456985321244+0.630023266801j))*x[1]
        ref[(2, 1, 0, 1)]=(0.0467849259365+0.59260326262j)*x_ref[0] + ((0.456985321244+0.630023266801j))*x_ref[1]
        arg[(2, 1, 0, 2)]=(0.125831819806+0.573948568105j)*x[0] + ((0.861013786558-0.554906765972j))*x[1]
        ref[(2, 1, 0, 2)]=(0.125831819806+0.573948568105j)*x_ref[0] + ((0.861013786558-0.554906765972j))*x_ref[1]
        arg[(2, 1, 0, 3)]=(-0.584290340921+0.39558990514j)*x[0] + ((0.96094032386+0.485768401083j))*x[1]
        ref[(2, 1, 0, 3)]=(-0.584290340921+0.39558990514j)*x_ref[0] + ((0.96094032386+0.485768401083j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(-0.450892777205+0.0106920909874j)*x[0] + ((0.213993083947-0.118496458962j))*x[1]
        ref[(2, 1, 1, 0)]=(-0.450892777205+0.0106920909874j)*x_ref[0] + ((0.213993083947-0.118496458962j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(0.314871085893-0.350377570797j)*x[0] + ((0.53613844425-0.20628750215j))*x[1]
        ref[(2, 1, 1, 1)]=(0.314871085893-0.350377570797j)*x_ref[0] + ((0.53613844425-0.20628750215j))*x_ref[1]
        arg[(2, 1, 1, 2)]=(0.925620096054-0.387342214917j)*x[0] + ((0.805521653316+0.0600889443465j))*x[1]
        ref[(2, 1, 1, 2)]=(0.925620096054-0.387342214917j)*x_ref[0] + ((0.805521653316+0.0600889443465j))*x_ref[1]
        arg[(2, 1, 1, 3)]=(-0.423738361772+0.299273972373j)*x[0] + ((-0.92333084325+0.8175758967j))*x[1]
        ref[(2, 1, 1, 3)]=(-0.423738361772+0.299273972373j)*x_ref[0] + ((-0.92333084325+0.8175758967j))*x_ref[1]
        arg[(3, 0, 0, 0)]=(0.631709464769+0.156129024827j)*x[0] + ((-0.0598225482031+0.549810156951j))*x[1]
        ref[(3, 0, 0, 0)]=(0.631709464769+0.156129024827j)*x_ref[0] + ((-0.0598225482031+0.549810156951j))*x_ref[1]
        arg[(3, 0, 0, 1)]=(0.170712542389-0.859262661694j)*x[0] + ((0.744299375087+0.945175728064j))*x[1]
        ref[(3, 0, 0, 1)]=(0.170712542389-0.859262661694j)*x_ref[0] + ((0.744299375087+0.945175728064j))*x_ref[1]
        arg[(3, 0, 0, 2)]=(0.0996815739445+0.156061186646j)*x[0] + ((0.0897765219917-0.8474221906j))*x[1]
        ref[(3, 0, 0, 2)]=(0.0996815739445+0.156061186646j)*x_ref[0] + ((0.0897765219917-0.8474221906j))*x_ref[1]
        arg[(3, 0, 0, 3)]=(0.547111589848-0.757085413287j)*x[0] + ((0.466631132372-0.234643063168j))*x[1]
        ref[(3, 0, 0, 3)]=(0.547111589848-0.757085413287j)*x_ref[0] + ((0.466631132372-0.234643063168j))*x_ref[1]
        arg[(3, 0, 1, 0)]=(0.715512917189+0.535558641274j)*x[0] + ((0.744341603597+0.647530201499j))*x[1]
        ref[(3, 0, 1, 0)]=(0.715512917189+0.535558641274j)*x_ref[0] + ((0.744341603597+0.647530201499j))*x_ref[1]
        arg[(3, 0, 1, 1)]=(0.74286502435-0.773191695108j)*x[0] + ((-0.256383213535+0.979245903492j))*x[1]
        ref[(3, 0, 1, 1)]=(0.74286502435-0.773191695108j)*x_ref[0] + ((-0.256383213535+0.979245903492j))*x_ref[1]
        arg[(3, 0, 1, 2)]=(-0.743559754135-0.0969632950017j)*x[0] + ((0.689167024768-0.333900499546j))*x[1]
        ref[(3, 0, 1, 2)]=(-0.743559754135-0.0969632950017j)*x_ref[0] + ((0.689167024768-0.333900499546j))*x_ref[1]
        arg[(3, 0, 1, 3)]=(0.597794459763-0.940897281433j)*x[0] + ((0.695825823133+0.541030166223j))*x[1]
        ref[(3, 0, 1, 3)]=(0.597794459763-0.940897281433j)*x_ref[0] + ((0.695825823133+0.541030166223j))*x_ref[1]
        arg[(3, 1, 0, 0)]=(0.767322308272-0.851976380318j)*x[0] + ((0.63074899792-0.987777554374j))*x[1]
        ref[(3, 1, 0, 0)]=(0.767322308272-0.851976380318j)*x_ref[0] + ((0.63074899792-0.987777554374j))*x_ref[1]
        arg[(3, 1, 0, 1)]=(0.115633518754+0.332540547488j)*x[0] + ((-0.551556660556-0.303426993419j))*x[1]
        ref[(3, 1, 0, 1)]=(0.115633518754+0.332540547488j)*x_ref[0] + ((-0.551556660556-0.303426993419j))*x_ref[1]
        arg[(3, 1, 0, 2)]=(-0.502411999333-0.0605013630362j)*x[0] + ((0.0232657995745+0.540640265812j))*x[1]
        ref[(3, 1, 0, 2)]=(-0.502411999333-0.0605013630362j)*x_ref[0] + ((0.0232657995745+0.540640265812j))*x_ref[1]
        arg[(3, 1, 0, 3)]=(-0.334972548112+0.184255465635j)*x[0] + ((0.677036546822+0.587764492464j))*x[1]
        ref[(3, 1, 0, 3)]=(-0.334972548112+0.184255465635j)*x_ref[0] + ((0.677036546822+0.587764492464j))*x_ref[1]
        arg[(3, 1, 1, 0)]=(0.0425629984301+0.528144720046j)*x[0] + ((-0.847870871674-0.639254650899j))*x[1]
        ref[(3, 1, 1, 0)]=(0.0425629984301+0.528144720046j)*x_ref[0] + ((-0.847870871674-0.639254650899j))*x_ref[1]
        arg[(3, 1, 1, 1)]=(0.516369671496-0.125822420374j)*x[0] + ((-0.192197335212+0.0423934078522j))*x[1]
        ref[(3, 1, 1, 1)]=(0.516369671496-0.125822420374j)*x_ref[0] + ((-0.192197335212+0.0423934078522j))*x_ref[1]
        arg[(3, 1, 1, 2)]=(0.355381637778+0.83560354035j)*x[0] + ((0.493736859594+0.803580115488j))*x[1]
        ref[(3, 1, 1, 2)]=(0.355381637778+0.83560354035j)*x_ref[0] + ((0.493736859594+0.803580115488j))*x_ref[1]
        arg[(3, 1, 1, 3)]=(0.784742512544-0.714288255073j)*x[0] + ((-0.598551528482+0.669981391891j))*x[1]
        ref[(3, 1, 1, 3)]=(0.784742512544-0.714288255073j)*x_ref[0] + ((-0.598551528482+0.669981391891j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.468890432953+0.234155882245j)*x[2]
            ref[(0, 0, 0, 0)]+=(-0.468890432953+0.234155882245j)*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.311001353615+0.636927040901j)*x[2]
            ref[(0, 0, 0, 1)]+=(-0.311001353615+0.636927040901j)*x_ref[2]
            arg[(0, 0, 0, 2)]+=(0.381481596005-0.227553341316j)*x[2]
            ref[(0, 0, 0, 2)]+=(0.381481596005-0.227553341316j)*x_ref[2]
            arg[(0, 0, 0, 3)]+=(0.402466800298+0.014899806777j)*x[2]
            ref[(0, 0, 0, 3)]+=(0.402466800298+0.014899806777j)*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.110836110805-0.75043665602j)*x[2]
            ref[(0, 0, 1, 0)]+=(0.110836110805-0.75043665602j)*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.601123937178+0.459502952863j)*x[2]
            ref[(0, 0, 1, 1)]+=(-0.601123937178+0.459502952863j)*x_ref[2]
            arg[(0, 0, 1, 2)]+=(0.879873176483-0.668040407276j)*x[2]
            ref[(0, 0, 1, 2)]+=(0.879873176483-0.668040407276j)*x_ref[2]
            arg[(0, 0, 1, 3)]+=(0.673608441922+0.117599045406j)*x[2]
            ref[(0, 0, 1, 3)]+=(0.673608441922+0.117599045406j)*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.582969483619+0.267702718813j)*x[2]
            ref[(0, 1, 0, 0)]+=(-0.582969483619+0.267702718813j)*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.831541878991+0.138326167034j)*x[2]
            ref[(0, 1, 0, 1)]+=(0.831541878991+0.138326167034j)*x_ref[2]
            arg[(0, 1, 0, 2)]+=(-0.736536077855-0.302995677914j)*x[2]
            ref[(0, 1, 0, 2)]+=(-0.736536077855-0.302995677914j)*x_ref[2]
            arg[(0, 1, 0, 3)]+=(-0.0827009265252+0.420944961858j)*x[2]
            ref[(0, 1, 0, 3)]+=(-0.0827009265252+0.420944961858j)*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.141229606115+0.338244109156j)*x[2]
            ref[(0, 1, 1, 0)]+=(-0.141229606115+0.338244109156j)*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.393464502762-0.0635902671705j)*x[2]
            ref[(0, 1, 1, 1)]+=(0.393464502762-0.0635902671705j)*x_ref[2]
            arg[(0, 1, 1, 2)]+=(0.18824722998-0.825060291086j)*x[2]
            ref[(0, 1, 1, 2)]+=(0.18824722998-0.825060291086j)*x_ref[2]
            arg[(0, 1, 1, 3)]+=(-0.635586922113+0.408516159901j)*x[2]
            ref[(0, 1, 1, 3)]+=(-0.635586922113+0.408516159901j)*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.390147120968-0.844625851053j)*x[2]
            ref[(1, 0, 0, 0)]+=(0.390147120968-0.844625851053j)*x_ref[2]
            arg[(1, 0, 0, 1)]+=(-0.263775220674-0.0355094536131j)*x[2]
            ref[(1, 0, 0, 1)]+=(-0.263775220674-0.0355094536131j)*x_ref[2]
            arg[(1, 0, 0, 2)]+=(-0.474260796705+0.940089182428j)*x[2]
            ref[(1, 0, 0, 2)]+=(-0.474260796705+0.940089182428j)*x_ref[2]
            arg[(1, 0, 0, 3)]+=(0.816898763458+0.701638556814j)*x[2]
            ref[(1, 0, 0, 3)]+=(0.816898763458+0.701638556814j)*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.976537065451-0.935405725225j)*x[2]
            ref[(1, 0, 1, 0)]+=(0.976537065451-0.935405725225j)*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.758133542447+0.458050352614j)*x[2]
            ref[(1, 0, 1, 1)]+=(0.758133542447+0.458050352614j)*x_ref[2]
            arg[(1, 0, 1, 2)]+=(0.896016168906-0.350469141027j)*x[2]
            ref[(1, 0, 1, 2)]+=(0.896016168906-0.350469141027j)*x_ref[2]
            arg[(1, 0, 1, 3)]+=(-0.165034768975+0.594647959652j)*x[2]
            ref[(1, 0, 1, 3)]+=(-0.165034768975+0.594647959652j)*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.96741253172+0.657077763197j)*x[2]
            ref[(1, 1, 0, 0)]+=(0.96741253172+0.657077763197j)*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.265154242077+0.629879359094j)*x[2]
            ref[(1, 1, 0, 1)]+=(-0.265154242077+0.629879359094j)*x_ref[2]
            arg[(1, 1, 0, 2)]+=(0.0864550840941+0.245159420926j)*x[2]
            ref[(1, 1, 0, 2)]+=(0.0864550840941+0.245159420926j)*x_ref[2]
            arg[(1, 1, 0, 3)]+=(0.462430685284-0.90290439878j)*x[2]
            ref[(1, 1, 0, 3)]+=(0.462430685284-0.90290439878j)*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.758087610872+0.211586843525j)*x[2]
            ref[(1, 1, 1, 0)]+=(0.758087610872+0.211586843525j)*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.410610857155+0.379333851084j)*x[2]
            ref[(1, 1, 1, 1)]+=(-0.410610857155+0.379333851084j)*x_ref[2]
            arg[(1, 1, 1, 2)]+=(-0.0736183305802-0.447386160174j)*x[2]
            ref[(1, 1, 1, 2)]+=(-0.0736183305802-0.447386160174j)*x_ref[2]
            arg[(1, 1, 1, 3)]+=(0.627723818219-0.670873115975j)*x[2]
            ref[(1, 1, 1, 3)]+=(0.627723818219-0.670873115975j)*x_ref[2]
            arg[(2, 0, 0, 0)]+=(0.257702048414+0.497946580207j)*x[2]
            ref[(2, 0, 0, 0)]+=(0.257702048414+0.497946580207j)*x_ref[2]
            arg[(2, 0, 0, 1)]+=(-0.0434306587303+0.63484908486j)*x[2]
            ref[(2, 0, 0, 1)]+=(-0.0434306587303+0.63484908486j)*x_ref[2]
            arg[(2, 0, 0, 2)]+=(-0.287235272176-0.134741647892j)*x[2]
            ref[(2, 0, 0, 2)]+=(-0.287235272176-0.134741647892j)*x_ref[2]
            arg[(2, 0, 0, 3)]+=(0.141232608172-0.284113918471j)*x[2]
            ref[(2, 0, 0, 3)]+=(0.141232608172-0.284113918471j)*x_ref[2]
            arg[(2, 0, 1, 0)]+=(0.209542100454-0.522206769619j)*x[2]
            ref[(2, 0, 1, 0)]+=(0.209542100454-0.522206769619j)*x_ref[2]
            arg[(2, 0, 1, 1)]+=(-0.0282097542499-0.530797336267j)*x[2]
            ref[(2, 0, 1, 1)]+=(-0.0282097542499-0.530797336267j)*x_ref[2]
            arg[(2, 0, 1, 2)]+=(0.936631537568-0.274808204035j)*x[2]
            ref[(2, 0, 1, 2)]+=(0.936631537568-0.274808204035j)*x_ref[2]
            arg[(2, 0, 1, 3)]+=(0.322058101763+0.630326230655j)*x[2]
            ref[(2, 0, 1, 3)]+=(0.322058101763+0.630326230655j)*x_ref[2]
            arg[(2, 1, 0, 0)]+=(-0.446205903179-0.181698392399j)*x[2]
            ref[(2, 1, 0, 0)]+=(-0.446205903179-0.181698392399j)*x_ref[2]
            arg[(2, 1, 0, 1)]+=(-0.600961116366-0.339743501246j)*x[2]
            ref[(2, 1, 0, 1)]+=(-0.600961116366-0.339743501246j)*x_ref[2]
            arg[(2, 1, 0, 2)]+=(0.0324250654179-0.430607760734j)*x[2]
            ref[(2, 1, 0, 2)]+=(0.0324250654179-0.430607760734j)*x_ref[2]
            arg[(2, 1, 0, 3)]+=(0.689635055761-0.0323086319241j)*x[2]
            ref[(2, 1, 0, 3)]+=(0.689635055761-0.0323086319241j)*x_ref[2]
            arg[(2, 1, 1, 0)]+=(-0.889941392664+0.968246939923j)*x[2]
            ref[(2, 1, 1, 0)]+=(-0.889941392664+0.968246939923j)*x_ref[2]
            arg[(2, 1, 1, 1)]+=(-0.91921523068-0.282241927043j)*x[2]
            ref[(2, 1, 1, 1)]+=(-0.91921523068-0.282241927043j)*x_ref[2]
            arg[(2, 1, 1, 2)]+=(-0.124437745086+0.809327093498j)*x[2]
            ref[(2, 1, 1, 2)]+=(-0.124437745086+0.809327093498j)*x_ref[2]
            arg[(2, 1, 1, 3)]+=(0.0784590441714-0.758405132662j)*x[2]
            ref[(2, 1, 1, 3)]+=(0.0784590441714-0.758405132662j)*x_ref[2]
            arg[(3, 0, 0, 0)]+=(0.230893789772-0.796694610936j)*x[2]
            ref[(3, 0, 0, 0)]+=(0.230893789772-0.796694610936j)*x_ref[2]
            arg[(3, 0, 0, 1)]+=(-0.983481090233-0.263964347741j)*x[2]
            ref[(3, 0, 0, 1)]+=(-0.983481090233-0.263964347741j)*x_ref[2]
            arg[(3, 0, 0, 2)]+=(0.0747865571723-0.260780794613j)*x[2]
            ref[(3, 0, 0, 2)]+=(0.0747865571723-0.260780794613j)*x_ref[2]
            arg[(3, 0, 0, 3)]+=(-0.217343863241-0.888799045869j)*x[2]
            ref[(3, 0, 0, 3)]+=(-0.217343863241-0.888799045869j)*x_ref[2]
            arg[(3, 0, 1, 0)]+=(-0.985615812209+0.0799918954867j)*x[2]
            ref[(3, 0, 1, 0)]+=(-0.985615812209+0.0799918954867j)*x_ref[2]
            arg[(3, 0, 1, 1)]+=(-0.762313424345-0.095186812161j)*x[2]
            ref[(3, 0, 1, 1)]+=(-0.762313424345-0.095186812161j)*x_ref[2]
            arg[(3, 0, 1, 2)]+=(-0.600705330774-0.755130000133j)*x[2]
            ref[(3, 0, 1, 2)]+=(-0.600705330774-0.755130000133j)*x_ref[2]
            arg[(3, 0, 1, 3)]+=(-0.473703590643-0.625029645679j)*x[2]
            ref[(3, 0, 1, 3)]+=(-0.473703590643-0.625029645679j)*x_ref[2]
            arg[(3, 1, 0, 0)]+=(0.364675521061+0.842027438114j)*x[2]
            ref[(3, 1, 0, 0)]+=(0.364675521061+0.842027438114j)*x_ref[2]
            arg[(3, 1, 0, 1)]+=(0.489967629037-0.330969116073j)*x[2]
            ref[(3, 1, 0, 1)]+=(0.489967629037-0.330969116073j)*x_ref[2]
            arg[(3, 1, 0, 2)]+=(0.320048682023+0.365563435869j)*x[2]
            ref[(3, 1, 0, 2)]+=(0.320048682023+0.365563435869j)*x_ref[2]
            arg[(3, 1, 0, 3)]+=(0.245502452229+0.868587649514j)*x[2]
            ref[(3, 1, 0, 3)]+=(0.245502452229+0.868587649514j)*x_ref[2]
            arg[(3, 1, 1, 0)]+=(0.240729425114-0.469890179284j)*x[2]
            ref[(3, 1, 1, 0)]+=(0.240729425114-0.469890179284j)*x_ref[2]
            arg[(3, 1, 1, 1)]+=(0.783030994924-0.0584834319948j)*x[2]
            ref[(3, 1, 1, 1)]+=(0.783030994924-0.0584834319948j)*x_ref[2]
            arg[(3, 1, 1, 2)]+=(0.388643179938+0.360871297887j)*x[2]
            ref[(3, 1, 1, 2)]+=(0.388643179938+0.360871297887j)*x_ref[2]
            arg[(3, 1, 1, 3)]+=(-0.884522388653-0.653491905901j)*x[2]
            ref[(3, 1, 1, 3)]+=(-0.884522388653-0.653491905901j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.84342983103+0.145290422318j)*x[0]**o + ((-0.955119069341+0.20698329002j))*x[0] + ((0.0988289518763-0.00996851718991j))*x[1]**o + ((-0.63932457333+0.568826149165j))*x[1]
        ref=(0.84342983103+0.145290422318j)*x_ref[0]**o + ((-0.955119069341+0.20698329002j))*x_ref[0] + ((0.0988289518763-0.00996851718991j))*x_ref[1]**o + ((-0.63932457333+0.568826149165j))*x_ref[1]
        if dim==3:
            arg+=((0.818468332861+0.0952880455475j))*x[2]**o + ((0.33941702462-0.261254521144j))*x[2]
            ref+=((0.818468332861+0.0952880455475j))*x_ref[2]**o + ((0.33941702462-0.261254521144j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=(0.486628356889-0.165085256994j)*x[0]**o + ((-0.651902281017+0.617034196684j))*x[0] + ((0.938587843012+0.479039933722j))*x[1]**o + ((0.973165841517+0.898504999294j))*x[1]
        ref[(0,)]=(0.486628356889-0.165085256994j)*x_ref[0]**o + ((-0.651902281017+0.617034196684j))*x_ref[0] + ((0.938587843012+0.479039933722j))*x_ref[1]**o + ((0.973165841517+0.898504999294j))*x_ref[1]
        arg[(1,)]=(-0.438101167503-0.604128764464j)*x[0]**o + ((-0.0471124086135+0.589383039113j))*x[0] + ((-0.464283737557+0.501845170997j))*x[1]**o + ((0.386126383191+0.983735619358j))*x[1]
        ref[(1,)]=(-0.438101167503-0.604128764464j)*x_ref[0]**o + ((-0.0471124086135+0.589383039113j))*x_ref[0] + ((-0.464283737557+0.501845170997j))*x_ref[1]**o + ((0.386126383191+0.983735619358j))*x_ref[1]
        arg[(2,)]=(0.660961597345-0.474294176079j)*x[0]**o + ((0.919606329937+0.623615972515j))*x[0] + ((0.906299000039-0.123122028934j))*x[1]**o + ((-0.14407419894-0.331959639376j))*x[1]
        ref[(2,)]=(0.660961597345-0.474294176079j)*x_ref[0]**o + ((0.919606329937+0.623615972515j))*x_ref[0] + ((0.906299000039-0.123122028934j))*x_ref[1]**o + ((-0.14407419894-0.331959639376j))*x_ref[1]
        arg[(3,)]=(0.899241878129+0.789714735243j)*x[0]**o + ((-0.335678998649-0.452441285643j))*x[0] + ((0.177237774755+0.834576701685j))*x[1]**o + ((-0.519543926224-0.0364041459067j))*x[1]
        ref[(3,)]=(0.899241878129+0.789714735243j)*x_ref[0]**o + ((-0.335678998649-0.452441285643j))*x_ref[0] + ((0.177237774755+0.834576701685j))*x_ref[1]**o + ((-0.519543926224-0.0364041459067j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.519613694165-0.986807812552j)*x[2]**o + ((-0.627401451846+0.153405477824j))*x[2]
            ref[(0,)]+=(0.519613694165-0.986807812552j)*x_ref[2]**o + ((-0.627401451846+0.153405477824j))*x_ref[2]
            arg[(1,)]+=(0.643516989827+0.192944085105j)*x[2]**o + ((0.522390689761-0.215512651469j))*x[2]
            ref[(1,)]+=(0.643516989827+0.192944085105j)*x_ref[2]**o + ((0.522390689761-0.215512651469j))*x_ref[2]
            arg[(2,)]+=(-0.330380576498+0.54022176559j)*x[2]**o + ((0.626882237222+0.258481584164j))*x[2]
            ref[(2,)]+=(-0.330380576498+0.54022176559j)*x_ref[2]**o + ((0.626882237222+0.258481584164j))*x_ref[2]
            arg[(3,)]+=(-0.186459483354-0.879069878218j)*x[2]**o + ((0.785088586881+0.953750177635j))*x[2]
            ref[(3,)]+=(-0.186459483354-0.879069878218j)*x_ref[2]**o + ((0.785088586881+0.953750177635j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref = Data(0,(4, 4),w_ref)
        arg[(0, 0)]=(0.697468011565+0.102778636354j)*x[0]**o + ((0.40495455217-0.0346574249787j))*x[0] + ((0.160002115595-0.651835355496j))*x[1]**o + ((0.390496025255-0.380498926634j))*x[1]
        ref[(0, 0)]=(0.697468011565+0.102778636354j)*x_ref[0]**o + ((0.40495455217-0.0346574249787j))*x_ref[0] + ((0.160002115595-0.651835355496j))*x_ref[1]**o + ((0.390496025255-0.380498926634j))*x_ref[1]
        arg[(0, 1)]=(-0.674973040042+0.701559924581j)*x[0]**o + ((0.051618275511-0.200063318154j))*x[0] + ((-0.344196429198-0.865266121388j))*x[1]**o + ((0.696953740695+0.560307400764j))*x[1]
        ref[(0, 1)]=(-0.674973040042+0.701559924581j)*x_ref[0]**o + ((0.051618275511-0.200063318154j))*x_ref[0] + ((-0.344196429198-0.865266121388j))*x_ref[1]**o + ((0.696953740695+0.560307400764j))*x_ref[1]
        arg[(0, 2)]=(-0.702013966166-0.0264301450004j)*x[0]**o + ((0.168862905962+0.0016350296644j))*x[0] + ((0.859686620595-0.518354133234j))*x[1]**o + ((-0.433553767514+0.234994017006j))*x[1]
        ref[(0, 2)]=(-0.702013966166-0.0264301450004j)*x_ref[0]**o + ((0.168862905962+0.0016350296644j))*x_ref[0] + ((0.859686620595-0.518354133234j))*x_ref[1]**o + ((-0.433553767514+0.234994017006j))*x_ref[1]
        arg[(0, 3)]=(-0.0624089919138+0.476476312143j)*x[0]**o + ((-0.454272741259-0.839353728467j))*x[0] + ((-0.526278928652+0.487672894681j))*x[1]**o + ((0.383930397798+0.482148211021j))*x[1]
        ref[(0, 3)]=(-0.0624089919138+0.476476312143j)*x_ref[0]**o + ((-0.454272741259-0.839353728467j))*x_ref[0] + ((-0.526278928652+0.487672894681j))*x_ref[1]**o + ((0.383930397798+0.482148211021j))*x_ref[1]
        arg[(1, 0)]=(-0.192120301834+0.482055192449j)*x[0]**o + ((0.682544970812+0.34295264267j))*x[0] + ((-0.566331887691-0.146679166708j))*x[1]**o + ((0.518892089-0.907479024216j))*x[1]
        ref[(1, 0)]=(-0.192120301834+0.482055192449j)*x_ref[0]**o + ((0.682544970812+0.34295264267j))*x_ref[0] + ((-0.566331887691-0.146679166708j))*x_ref[1]**o + ((0.518892089-0.907479024216j))*x_ref[1]
        arg[(1, 1)]=(0.990881727146+0.0497888082723j)*x[0]**o + ((0.388145396577-0.423258654458j))*x[0] + ((0.452280015415+0.59649172961j))*x[1]**o + ((-0.279928133364+0.701946560033j))*x[1]
        ref[(1, 1)]=(0.990881727146+0.0497888082723j)*x_ref[0]**o + ((0.388145396577-0.423258654458j))*x_ref[0] + ((0.452280015415+0.59649172961j))*x_ref[1]**o + ((-0.279928133364+0.701946560033j))*x_ref[1]
        arg[(1, 2)]=(-0.323888741739-0.12411357111j)*x[0]**o + ((-0.755866584267+0.191268659254j))*x[0] + ((0.436676988664-0.401475970977j))*x[1]**o + ((0.166887586777+0.945555024658j))*x[1]
        ref[(1, 2)]=(-0.323888741739-0.12411357111j)*x_ref[0]**o + ((-0.755866584267+0.191268659254j))*x_ref[0] + ((0.436676988664-0.401475970977j))*x_ref[1]**o + ((0.166887586777+0.945555024658j))*x_ref[1]
        arg[(1, 3)]=(0.122749161189+0.59998273804j)*x[0]**o + ((0.606783052798+0.708049837563j))*x[0] + ((-0.447087732126+0.128608494717j))*x[1]**o + ((-0.582674984325-0.549672971941j))*x[1]
        ref[(1, 3)]=(0.122749161189+0.59998273804j)*x_ref[0]**o + ((0.606783052798+0.708049837563j))*x_ref[0] + ((-0.447087732126+0.128608494717j))*x_ref[1]**o + ((-0.582674984325-0.549672971941j))*x_ref[1]
        arg[(2, 0)]=(0.294795069519+0.112590508837j)*x[0]**o + ((0.722579557036+0.893002967951j))*x[0] + ((0.988671997936-0.178952003881j))*x[1]**o + ((-0.423506162145-0.947549569743j))*x[1]
        ref[(2, 0)]=(0.294795069519+0.112590508837j)*x_ref[0]**o + ((0.722579557036+0.893002967951j))*x_ref[0] + ((0.988671997936-0.178952003881j))*x_ref[1]**o + ((-0.423506162145-0.947549569743j))*x_ref[1]
        arg[(2, 1)]=(-0.65710365161-0.648292808436j)*x[0]**o + ((-0.615037028884-0.885285454174j))*x[0] + ((-0.483146103716-0.789910475542j))*x[1]**o + ((-0.670585157911+0.667432760226j))*x[1]
        ref[(2, 1)]=(-0.65710365161-0.648292808436j)*x_ref[0]**o + ((-0.615037028884-0.885285454174j))*x_ref[0] + ((-0.483146103716-0.789910475542j))*x_ref[1]**o + ((-0.670585157911+0.667432760226j))*x_ref[1]
        arg[(2, 2)]=(0.32818612122-0.556664546084j)*x[0]**o + ((-0.640475078253-0.641502162984j))*x[0] + ((-0.393735186074-0.865972901397j))*x[1]**o + ((0.474487065154-0.897305357503j))*x[1]
        ref[(2, 2)]=(0.32818612122-0.556664546084j)*x_ref[0]**o + ((-0.640475078253-0.641502162984j))*x_ref[0] + ((-0.393735186074-0.865972901397j))*x_ref[1]**o + ((0.474487065154-0.897305357503j))*x_ref[1]
        arg[(2, 3)]=(-0.275969253518-0.929609886008j)*x[0]**o + ((0.782947631343-0.877002456336j))*x[0] + ((-0.340561471523+0.679737008583j))*x[1]**o + ((-0.0812812839289+0.24917273788j))*x[1]
        ref[(2, 3)]=(-0.275969253518-0.929609886008j)*x_ref[0]**o + ((0.782947631343-0.877002456336j))*x_ref[0] + ((-0.340561471523+0.679737008583j))*x_ref[1]**o + ((-0.0812812839289+0.24917273788j))*x_ref[1]
        arg[(3, 0)]=(0.531630351985+0.958536640031j)*x[0]**o + ((0.0267543918944+0.707331125873j))*x[0] + ((0.497621575343+0.999913498222j))*x[1]**o + ((-0.76168703634-0.830249964704j))*x[1]
        ref[(3, 0)]=(0.531630351985+0.958536640031j)*x_ref[0]**o + ((0.0267543918944+0.707331125873j))*x_ref[0] + ((0.497621575343+0.999913498222j))*x_ref[1]**o + ((-0.76168703634-0.830249964704j))*x_ref[1]
        arg[(3, 1)]=(0.630941612219-0.0427940159312j)*x[0]**o + ((0.472902559756+0.975811887144j))*x[0] + ((0.892263553914-0.332630080813j))*x[1]**o + ((0.432394092889-0.530095192574j))*x[1]
        ref[(3, 1)]=(0.630941612219-0.0427940159312j)*x_ref[0]**o + ((0.472902559756+0.975811887144j))*x_ref[0] + ((0.892263553914-0.332630080813j))*x_ref[1]**o + ((0.432394092889-0.530095192574j))*x_ref[1]
        arg[(3, 2)]=(-0.414820135503+0.0145803694146j)*x[0]**o + ((0.361021054779+0.0875817310063j))*x[0] + ((0.0689906033981+0.566133992405j))*x[1]**o + ((0.764198766218+0.591629705254j))*x[1]
        ref[(3, 2)]=(-0.414820135503+0.0145803694146j)*x_ref[0]**o + ((0.361021054779+0.0875817310063j))*x_ref[0] + ((0.0689906033981+0.566133992405j))*x_ref[1]**o + ((0.764198766218+0.591629705254j))*x_ref[1]
        arg[(3, 3)]=(-0.938334990664+0.658359286897j)*x[0]**o + ((-0.821106242341-0.0350852501883j))*x[0] + ((0.788838231397-0.962820470008j))*x[1]**o + ((0.793521089146-0.365766209931j))*x[1]
        ref[(3, 3)]=(-0.938334990664+0.658359286897j)*x_ref[0]**o + ((-0.821106242341-0.0350852501883j))*x_ref[0] + ((0.788838231397-0.962820470008j))*x_ref[1]**o + ((0.793521089146-0.365766209931j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.207992778857-0.654408916784j)*x[2]**o + ((-0.653240570397-0.987446676038j))*x[2]
            ref[(0, 0)]+=(0.207992778857-0.654408916784j)*x_ref[2]**o + ((-0.653240570397-0.987446676038j))*x_ref[2]
            arg[(0, 1)]+=(0.378567104363-0.905471391169j)*x[2]**o + ((0.20064648887+0.965769104201j))*x[2]
            ref[(0, 1)]+=(0.378567104363-0.905471391169j)*x_ref[2]**o + ((0.20064648887+0.965769104201j))*x_ref[2]
            arg[(0, 2)]+=(-0.151825173996+0.412528666818j)*x[2]**o + ((0.818247109365-0.988861555232j))*x[2]
            ref[(0, 2)]+=(-0.151825173996+0.412528666818j)*x_ref[2]**o + ((0.818247109365-0.988861555232j))*x_ref[2]
            arg[(0, 3)]+=(-0.0666917737544-0.558571176472j)*x[2]**o + ((0.348000647756+0.363588236144j))*x[2]
            ref[(0, 3)]+=(-0.0666917737544-0.558571176472j)*x_ref[2]**o + ((0.348000647756+0.363588236144j))*x_ref[2]
            arg[(1, 0)]+=(-0.172771561765+0.613953172921j)*x[2]**o + ((0.687741886691-0.756638385603j))*x[2]
            ref[(1, 0)]+=(-0.172771561765+0.613953172921j)*x_ref[2]**o + ((0.687741886691-0.756638385603j))*x_ref[2]
            arg[(1, 1)]+=(-0.956371510422-0.0132776670842j)*x[2]**o + ((0.317636629041+0.59996885668j))*x[2]
            ref[(1, 1)]+=(-0.956371510422-0.0132776670842j)*x_ref[2]**o + ((0.317636629041+0.59996885668j))*x_ref[2]
            arg[(1, 2)]+=(0.445961813366+0.939410703755j)*x[2]**o + ((-0.755092826045-0.0169595940249j))*x[2]
            ref[(1, 2)]+=(0.445961813366+0.939410703755j)*x_ref[2]**o + ((-0.755092826045-0.0169595940249j))*x_ref[2]
            arg[(1, 3)]+=(-0.212860469998-0.254352898788j)*x[2]**o + ((0.458165915475-0.569861506634j))*x[2]
            ref[(1, 3)]+=(-0.212860469998-0.254352898788j)*x_ref[2]**o + ((0.458165915475-0.569861506634j))*x_ref[2]
            arg[(2, 0)]+=(0.433069132705+0.144818093717j)*x[2]**o + ((-0.998517580073+0.59947476226j))*x[2]
            ref[(2, 0)]+=(0.433069132705+0.144818093717j)*x_ref[2]**o + ((-0.998517580073+0.59947476226j))*x_ref[2]
            arg[(2, 1)]+=(-0.222993290899-0.457214876859j)*x[2]**o + ((0.148322241053+0.304160184893j))*x[2]
            ref[(2, 1)]+=(-0.222993290899-0.457214876859j)*x_ref[2]**o + ((0.148322241053+0.304160184893j))*x_ref[2]
            arg[(2, 2)]+=(0.538598347352-0.676561472239j)*x[2]**o + ((0.910622786109-0.736443585812j))*x[2]
            ref[(2, 2)]+=(0.538598347352-0.676561472239j)*x_ref[2]**o + ((0.910622786109-0.736443585812j))*x_ref[2]
            arg[(2, 3)]+=(-0.922786251864+0.498097694902j)*x[2]**o + ((-0.621451420547+0.367298970651j))*x[2]
            ref[(2, 3)]+=(-0.922786251864+0.498097694902j)*x_ref[2]**o + ((-0.621451420547+0.367298970651j))*x_ref[2]
            arg[(3, 0)]+=(0.0724221283894-0.55925314254j)*x[2]**o + ((0.70419363291+0.83710032068j))*x[2]
            ref[(3, 0)]+=(0.0724221283894-0.55925314254j)*x_ref[2]**o + ((0.70419363291+0.83710032068j))*x_ref[2]
            arg[(3, 1)]+=(0.634730362925-0.753537403681j)*x[2]**o + ((-0.26154659192+0.98386667372j))*x[2]
            ref[(3, 1)]+=(0.634730362925-0.753537403681j)*x_ref[2]**o + ((-0.26154659192+0.98386667372j))*x_ref[2]
            arg[(3, 2)]+=(-0.535533757779-0.0462671752892j)*x[2]**o + ((-0.479773719758-0.91407622634j))*x[2]
            ref[(3, 2)]+=(-0.535533757779-0.0462671752892j)*x_ref[2]**o + ((-0.479773719758-0.91407622634j))*x_ref[2]
            arg[(3, 3)]+=(-0.916348025301+0.0237676581291j)*x[2]**o + ((0.598305563858+0.451805848439j))*x[2]
            ref[(3, 3)]+=(-0.916348025301+0.0237676581291j)*x_ref[2]**o + ((0.598305563858+0.451805848439j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 4),w)
        ref = Data(0,(2, 2, 4),w_ref)
        arg[(0, 0, 0)]=(-0.638122193436+0.4559966108j)*x[0]**o + ((0.604084541921+0.275860794777j))*x[0] + ((0.0456218122388+0.503974999332j))*x[1]**o + ((0.113766688628+0.595970639242j))*x[1]
        ref[(0, 0, 0)]=(-0.638122193436+0.4559966108j)*x_ref[0]**o + ((0.604084541921+0.275860794777j))*x_ref[0] + ((0.0456218122388+0.503974999332j))*x_ref[1]**o + ((0.113766688628+0.595970639242j))*x_ref[1]
        arg[(0, 0, 1)]=(0.905124177964-0.283635587992j)*x[0]**o + ((-0.499511079899+0.458466027706j))*x[0] + ((0.42291247891-0.181109620211j))*x[1]**o + ((-0.87717071386-0.957071953102j))*x[1]
        ref[(0, 0, 1)]=(0.905124177964-0.283635587992j)*x_ref[0]**o + ((-0.499511079899+0.458466027706j))*x_ref[0] + ((0.42291247891-0.181109620211j))*x_ref[1]**o + ((-0.87717071386-0.957071953102j))*x_ref[1]
        arg[(0, 0, 2)]=(-0.521886456087+0.0587360042089j)*x[0]**o + ((0.530906682361-0.248011472395j))*x[0] + ((0.958112090321-0.693891491491j))*x[1]**o + ((0.491559828455-0.244836518483j))*x[1]
        ref[(0, 0, 2)]=(-0.521886456087+0.0587360042089j)*x_ref[0]**o + ((0.530906682361-0.248011472395j))*x_ref[0] + ((0.958112090321-0.693891491491j))*x_ref[1]**o + ((0.491559828455-0.244836518483j))*x_ref[1]
        arg[(0, 0, 3)]=(-0.588584457381+0.449487239237j)*x[0]**o + ((0.0482485040605-0.735944711861j))*x[0] + ((0.0531791949915+0.541830268297j))*x[1]**o + ((-0.946672324435-0.406941376553j))*x[1]
        ref[(0, 0, 3)]=(-0.588584457381+0.449487239237j)*x_ref[0]**o + ((0.0482485040605-0.735944711861j))*x_ref[0] + ((0.0531791949915+0.541830268297j))*x_ref[1]**o + ((-0.946672324435-0.406941376553j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.283776766981+0.593832930542j)*x[0]**o + ((0.565916548545+0.393764765694j))*x[0] + ((-0.691797745835-0.990833810095j))*x[1]**o + ((-0.822338557795-0.890260817778j))*x[1]
        ref[(0, 1, 0)]=(-0.283776766981+0.593832930542j)*x_ref[0]**o + ((0.565916548545+0.393764765694j))*x_ref[0] + ((-0.691797745835-0.990833810095j))*x_ref[1]**o + ((-0.822338557795-0.890260817778j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.536991329624+0.811358206883j)*x[0]**o + ((-0.406086614352+0.356570466625j))*x[0] + ((-0.801703412888+0.644948822192j))*x[1]**o + ((0.168437716173+0.733942197804j))*x[1]
        ref[(0, 1, 1)]=(-0.536991329624+0.811358206883j)*x_ref[0]**o + ((-0.406086614352+0.356570466625j))*x_ref[0] + ((-0.801703412888+0.644948822192j))*x_ref[1]**o + ((0.168437716173+0.733942197804j))*x_ref[1]
        arg[(0, 1, 2)]=(0.622078243972-0.292269465142j)*x[0]**o + ((0.0584164312649+0.363868526934j))*x[0] + ((0.63139139782-0.213317222054j))*x[1]**o + ((-0.357941245107-0.431887667175j))*x[1]
        ref[(0, 1, 2)]=(0.622078243972-0.292269465142j)*x_ref[0]**o + ((0.0584164312649+0.363868526934j))*x_ref[0] + ((0.63139139782-0.213317222054j))*x_ref[1]**o + ((-0.357941245107-0.431887667175j))*x_ref[1]
        arg[(0, 1, 3)]=(-0.899332947967-0.70454463184j)*x[0]**o + ((0.615587497967+0.233806390617j))*x[0] + ((-0.347338228787+0.0509485270606j))*x[1]**o + ((-0.737455157947+0.540608403669j))*x[1]
        ref[(0, 1, 3)]=(-0.899332947967-0.70454463184j)*x_ref[0]**o + ((0.615587497967+0.233806390617j))*x_ref[0] + ((-0.347338228787+0.0509485270606j))*x_ref[1]**o + ((-0.737455157947+0.540608403669j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.834199727082-0.392668414293j)*x[0]**o + ((-0.411936505754-0.849390031345j))*x[0] + ((0.00979128725167+0.930819934147j))*x[1]**o + ((-0.829777559937-0.313424824168j))*x[1]
        ref[(1, 0, 0)]=(-0.834199727082-0.392668414293j)*x_ref[0]**o + ((-0.411936505754-0.849390031345j))*x_ref[0] + ((0.00979128725167+0.930819934147j))*x_ref[1]**o + ((-0.829777559937-0.313424824168j))*x_ref[1]
        arg[(1, 0, 1)]=(0.178004035337+0.253864498936j)*x[0]**o + ((-0.534525582361-0.238746831566j))*x[0] + ((0.136371603632+0.0247690580718j))*x[1]**o + ((0.19775159925-0.610403080891j))*x[1]
        ref[(1, 0, 1)]=(0.178004035337+0.253864498936j)*x_ref[0]**o + ((-0.534525582361-0.238746831566j))*x_ref[0] + ((0.136371603632+0.0247690580718j))*x_ref[1]**o + ((0.19775159925-0.610403080891j))*x_ref[1]
        arg[(1, 0, 2)]=(-0.769048557965-0.252449159215j)*x[0]**o + ((0.818522994335-0.0181845014453j))*x[0] + ((0.363133045321-0.512911995394j))*x[1]**o + ((-0.967338566284+0.81208856242j))*x[1]
        ref[(1, 0, 2)]=(-0.769048557965-0.252449159215j)*x_ref[0]**o + ((0.818522994335-0.0181845014453j))*x_ref[0] + ((0.363133045321-0.512911995394j))*x_ref[1]**o + ((-0.967338566284+0.81208856242j))*x_ref[1]
        arg[(1, 0, 3)]=(-0.0851506322943-0.0596668326283j)*x[0]**o + ((-0.906017125105+0.985664582452j))*x[0] + ((0.744860017844+0.376233865448j))*x[1]**o + ((-0.0831639721713-0.370137654157j))*x[1]
        ref[(1, 0, 3)]=(-0.0851506322943-0.0596668326283j)*x_ref[0]**o + ((-0.906017125105+0.985664582452j))*x_ref[0] + ((0.744860017844+0.376233865448j))*x_ref[1]**o + ((-0.0831639721713-0.370137654157j))*x_ref[1]
        arg[(1, 1, 0)]=(0.490756162346+0.279744652788j)*x[0]**o + ((-0.713365697748+0.288571111659j))*x[0] + ((0.380379099756-0.250645071575j))*x[1]**o + ((-0.996817913622+0.138241340762j))*x[1]
        ref[(1, 1, 0)]=(0.490756162346+0.279744652788j)*x_ref[0]**o + ((-0.713365697748+0.288571111659j))*x_ref[0] + ((0.380379099756-0.250645071575j))*x_ref[1]**o + ((-0.996817913622+0.138241340762j))*x_ref[1]
        arg[(1, 1, 1)]=(0.212086598651-0.641828858371j)*x[0]**o + ((-0.35043885451+0.264636886008j))*x[0] + ((-0.115373373528+0.465201610832j))*x[1]**o + ((0.115216596664-0.341574950088j))*x[1]
        ref[(1, 1, 1)]=(0.212086598651-0.641828858371j)*x_ref[0]**o + ((-0.35043885451+0.264636886008j))*x_ref[0] + ((-0.115373373528+0.465201610832j))*x_ref[1]**o + ((0.115216596664-0.341574950088j))*x_ref[1]
        arg[(1, 1, 2)]=(0.582458483225-0.507067108809j)*x[0]**o + ((-0.294147957375-0.211301460587j))*x[0] + ((-0.893616186748+0.322203442063j))*x[1]**o + ((-0.0453520192928-0.77772989411j))*x[1]
        ref[(1, 1, 2)]=(0.582458483225-0.507067108809j)*x_ref[0]**o + ((-0.294147957375-0.211301460587j))*x_ref[0] + ((-0.893616186748+0.322203442063j))*x_ref[1]**o + ((-0.0453520192928-0.77772989411j))*x_ref[1]
        arg[(1, 1, 3)]=(-0.0480525495742-0.973612396289j)*x[0]**o + ((-0.385655612018-0.261452148564j))*x[0] + ((0.491159882622+0.0780807043448j))*x[1]**o + ((0.0704370459561+0.978006130998j))*x[1]
        ref[(1, 1, 3)]=(-0.0480525495742-0.973612396289j)*x_ref[0]**o + ((-0.385655612018-0.261452148564j))*x_ref[0] + ((0.491159882622+0.0780807043448j))*x_ref[1]**o + ((0.0704370459561+0.978006130998j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.73510031539-0.191575025386j)*x[2]**o + ((0.747105057395-0.602427747201j))*x[2]
            ref[(0, 0, 0)]+=(-0.73510031539-0.191575025386j)*x_ref[2]**o + ((0.747105057395-0.602427747201j))*x_ref[2]
            arg[(0, 0, 1)]+=(-0.398230014039+0.913139831447j)*x[2]**o + ((0.539485870994-0.991067417228j))*x[2]
            ref[(0, 0, 1)]+=(-0.398230014039+0.913139831447j)*x_ref[2]**o + ((0.539485870994-0.991067417228j))*x_ref[2]
            arg[(0, 0, 2)]+=(-0.214997300947-0.521952913081j)*x[2]**o + ((-0.477392571394-0.672371704703j))*x[2]
            ref[(0, 0, 2)]+=(-0.214997300947-0.521952913081j)*x_ref[2]**o + ((-0.477392571394-0.672371704703j))*x_ref[2]
            arg[(0, 0, 3)]+=(-0.850744000187+0.913861463786j)*x[2]**o + ((0.150636189004+0.884038775964j))*x[2]
            ref[(0, 0, 3)]+=(-0.850744000187+0.913861463786j)*x_ref[2]**o + ((0.150636189004+0.884038775964j))*x_ref[2]
            arg[(0, 1, 0)]+=(-0.650498608383+0.714403718513j)*x[2]**o + ((0.919644874828+0.146220467879j))*x[2]
            ref[(0, 1, 0)]+=(-0.650498608383+0.714403718513j)*x_ref[2]**o + ((0.919644874828+0.146220467879j))*x_ref[2]
            arg[(0, 1, 1)]+=(0.323175898741-0.233158882278j)*x[2]**o + ((0.961300157467-0.676271900709j))*x[2]
            ref[(0, 1, 1)]+=(0.323175898741-0.233158882278j)*x_ref[2]**o + ((0.961300157467-0.676271900709j))*x_ref[2]
            arg[(0, 1, 2)]+=(0.348175824568-0.376792835197j)*x[2]**o + ((0.0942448004971+0.460522551635j))*x[2]
            ref[(0, 1, 2)]+=(0.348175824568-0.376792835197j)*x_ref[2]**o + ((0.0942448004971+0.460522551635j))*x_ref[2]
            arg[(0, 1, 3)]+=(-0.169350553164-0.230353961794j)*x[2]**o + ((0.219486047244+0.190620239984j))*x[2]
            ref[(0, 1, 3)]+=(-0.169350553164-0.230353961794j)*x_ref[2]**o + ((0.219486047244+0.190620239984j))*x_ref[2]
            arg[(1, 0, 0)]+=(-0.389569454164-0.748485789946j)*x[2]**o + ((0.271754114814-0.987247753411j))*x[2]
            ref[(1, 0, 0)]+=(-0.389569454164-0.748485789946j)*x_ref[2]**o + ((0.271754114814-0.987247753411j))*x_ref[2]
            arg[(1, 0, 1)]+=(0.389850840994+0.331904468519j)*x[2]**o + ((0.889601704497-0.235985992379j))*x[2]
            ref[(1, 0, 1)]+=(0.389850840994+0.331904468519j)*x_ref[2]**o + ((0.889601704497-0.235985992379j))*x_ref[2]
            arg[(1, 0, 2)]+=(0.32989544868-0.239519689646j)*x[2]**o + ((0.0422715885457-0.482690395998j))*x[2]
            ref[(1, 0, 2)]+=(0.32989544868-0.239519689646j)*x_ref[2]**o + ((0.0422715885457-0.482690395998j))*x_ref[2]
            arg[(1, 0, 3)]+=(0.533489062607+0.473522015266j)*x[2]**o + ((-0.867437796573-0.147807827098j))*x[2]
            ref[(1, 0, 3)]+=(0.533489062607+0.473522015266j)*x_ref[2]**o + ((-0.867437796573-0.147807827098j))*x_ref[2]
            arg[(1, 1, 0)]+=(0.0793881103061+0.0447983510271j)*x[2]**o + ((-0.0696955403506-0.575514669299j))*x[2]
            ref[(1, 1, 0)]+=(0.0793881103061+0.0447983510271j)*x_ref[2]**o + ((-0.0696955403506-0.575514669299j))*x_ref[2]
            arg[(1, 1, 1)]+=(0.576771911286+0.0762329329842j)*x[2]**o + ((0.858826710634-0.437502250524j))*x[2]
            ref[(1, 1, 1)]+=(0.576771911286+0.0762329329842j)*x_ref[2]**o + ((0.858826710634-0.437502250524j))*x_ref[2]
            arg[(1, 1, 2)]+=(-0.533797085468-0.421088297873j)*x[2]**o + ((-0.158065904248-0.39144621753j))*x[2]
            ref[(1, 1, 2)]+=(-0.533797085468-0.421088297873j)*x_ref[2]**o + ((-0.158065904248-0.39144621753j))*x_ref[2]
            arg[(1, 1, 3)]+=(0.978494049611-0.996348285687j)*x[2]**o + ((-0.120928631157-0.591261016085j))*x[2]
            ref[(1, 1, 3)]+=(0.978494049611-0.996348285687j)*x_ref[2]**o + ((-0.120928631157-0.591261016085j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 4, 4),w)
        ref = Data(0,(2, 4, 4, 4),w_ref)
        arg[(0, 0, 0, 0)]=(-0.809052018132-0.323700865063j)*x[0]**o + ((-0.382899229274-0.889557570457j))*x[0] + ((0.414763933635+0.0565405380203j))*x[1]**o + ((0.808237518115-0.865131303842j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.809052018132-0.323700865063j)*x_ref[0]**o + ((-0.382899229274-0.889557570457j))*x_ref[0] + ((0.414763933635+0.0565405380203j))*x_ref[1]**o + ((0.808237518115-0.865131303842j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(0.957344707895-0.750926782179j)*x[0]**o + ((0.266263961538+0.110273508862j))*x[0] + ((-0.822279382425-0.376183093205j))*x[1]**o + ((-0.870612813949-0.130632093144j))*x[1]
        ref[(0, 0, 0, 1)]=(0.957344707895-0.750926782179j)*x_ref[0]**o + ((0.266263961538+0.110273508862j))*x_ref[0] + ((-0.822279382425-0.376183093205j))*x_ref[1]**o + ((-0.870612813949-0.130632093144j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(-0.143491941033-0.645019083953j)*x[0]**o + ((-0.834917305616+0.450208159665j))*x[0] + ((0.0690695574225-0.243249121783j))*x[1]**o + ((-0.182765017051+0.97881600187j))*x[1]
        ref[(0, 0, 0, 2)]=(-0.143491941033-0.645019083953j)*x_ref[0]**o + ((-0.834917305616+0.450208159665j))*x_ref[0] + ((0.0690695574225-0.243249121783j))*x_ref[1]**o + ((-0.182765017051+0.97881600187j))*x_ref[1]
        arg[(0, 0, 0, 3)]=(0.563212515853-0.308479017528j)*x[0]**o + ((0.117980767789+0.231616024019j))*x[0] + ((-0.0745257680965-0.676665701912j))*x[1]**o + ((-0.837635228171-0.505912025478j))*x[1]
        ref[(0, 0, 0, 3)]=(0.563212515853-0.308479017528j)*x_ref[0]**o + ((0.117980767789+0.231616024019j))*x_ref[0] + ((-0.0745257680965-0.676665701912j))*x_ref[1]**o + ((-0.837635228171-0.505912025478j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.415772307646+0.712554032572j)*x[0]**o + ((-0.113554929969+0.126062632776j))*x[0] + ((0.854258644074+0.464685614742j))*x[1]**o + ((-0.663455992064+0.27121320424j))*x[1]
        ref[(0, 0, 1, 0)]=(0.415772307646+0.712554032572j)*x_ref[0]**o + ((-0.113554929969+0.126062632776j))*x_ref[0] + ((0.854258644074+0.464685614742j))*x_ref[1]**o + ((-0.663455992064+0.27121320424j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.155991178603-0.765504515344j)*x[0]**o + ((0.0771469295549+0.407095435513j))*x[0] + ((0.36536870765-0.688882211835j))*x[1]**o + ((-0.631140755434-0.788833710162j))*x[1]
        ref[(0, 0, 1, 1)]=(0.155991178603-0.765504515344j)*x_ref[0]**o + ((0.0771469295549+0.407095435513j))*x_ref[0] + ((0.36536870765-0.688882211835j))*x_ref[1]**o + ((-0.631140755434-0.788833710162j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(0.168086478882+0.205850688075j)*x[0]**o + ((-0.62507565238-0.361346561262j))*x[0] + ((0.0561907851885-0.620138628955j))*x[1]**o + ((0.679431852705-0.524615303465j))*x[1]
        ref[(0, 0, 1, 2)]=(0.168086478882+0.205850688075j)*x_ref[0]**o + ((-0.62507565238-0.361346561262j))*x_ref[0] + ((0.0561907851885-0.620138628955j))*x_ref[1]**o + ((0.679431852705-0.524615303465j))*x_ref[1]
        arg[(0, 0, 1, 3)]=(0.161736233121-0.303006501082j)*x[0]**o + ((-0.0890223214431-0.545283743413j))*x[0] + ((0.513128415491-0.549571951307j))*x[1]**o + ((-0.0760361078758+0.699116908281j))*x[1]
        ref[(0, 0, 1, 3)]=(0.161736233121-0.303006501082j)*x_ref[0]**o + ((-0.0890223214431-0.545283743413j))*x_ref[0] + ((0.513128415491-0.549571951307j))*x_ref[1]**o + ((-0.0760361078758+0.699116908281j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(0.32713474918-0.338394254682j)*x[0]**o + ((-0.876185369006+0.231071338913j))*x[0] + ((0.260831973577+0.150647875523j))*x[1]**o + ((-0.500696992655+0.273704323143j))*x[1]
        ref[(0, 0, 2, 0)]=(0.32713474918-0.338394254682j)*x_ref[0]**o + ((-0.876185369006+0.231071338913j))*x_ref[0] + ((0.260831973577+0.150647875523j))*x_ref[1]**o + ((-0.500696992655+0.273704323143j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(-0.885708720708+0.289027704009j)*x[0]**o + ((-0.861699975267+0.236491063669j))*x[0] + ((0.418522012961-0.220774016917j))*x[1]**o + ((0.660064427168+0.334675148728j))*x[1]
        ref[(0, 0, 2, 1)]=(-0.885708720708+0.289027704009j)*x_ref[0]**o + ((-0.861699975267+0.236491063669j))*x_ref[0] + ((0.418522012961-0.220774016917j))*x_ref[1]**o + ((0.660064427168+0.334675148728j))*x_ref[1]
        arg[(0, 0, 2, 2)]=(-0.0264440247802+0.170056588765j)*x[0]**o + ((-0.615414180004+0.712197368717j))*x[0] + ((-0.538864747925-0.969851808269j))*x[1]**o + ((-0.579148373799+0.72175228438j))*x[1]
        ref[(0, 0, 2, 2)]=(-0.0264440247802+0.170056588765j)*x_ref[0]**o + ((-0.615414180004+0.712197368717j))*x_ref[0] + ((-0.538864747925-0.969851808269j))*x_ref[1]**o + ((-0.579148373799+0.72175228438j))*x_ref[1]
        arg[(0, 0, 2, 3)]=(0.668313488683+0.389143295018j)*x[0]**o + ((-0.45514710331-0.552856632787j))*x[0] + ((-0.807535774812+0.898252513919j))*x[1]**o + ((0.682887489906-0.105927646055j))*x[1]
        ref[(0, 0, 2, 3)]=(0.668313488683+0.389143295018j)*x_ref[0]**o + ((-0.45514710331-0.552856632787j))*x_ref[0] + ((-0.807535774812+0.898252513919j))*x_ref[1]**o + ((0.682887489906-0.105927646055j))*x_ref[1]
        arg[(0, 0, 3, 0)]=(0.548885870175+0.62352359751j)*x[0]**o + ((0.568177022794+0.404892795054j))*x[0] + ((0.0504080053969-0.0725514112534j))*x[1]**o + ((0.365259850446-0.39660463431j))*x[1]
        ref[(0, 0, 3, 0)]=(0.548885870175+0.62352359751j)*x_ref[0]**o + ((0.568177022794+0.404892795054j))*x_ref[0] + ((0.0504080053969-0.0725514112534j))*x_ref[1]**o + ((0.365259850446-0.39660463431j))*x_ref[1]
        arg[(0, 0, 3, 1)]=(-0.294658496257-0.262070427386j)*x[0]**o + ((-0.297075598143+0.679427825996j))*x[0] + ((-0.644884044983-0.427091753542j))*x[1]**o + ((-0.680943221031+0.0397157756952j))*x[1]
        ref[(0, 0, 3, 1)]=(-0.294658496257-0.262070427386j)*x_ref[0]**o + ((-0.297075598143+0.679427825996j))*x_ref[0] + ((-0.644884044983-0.427091753542j))*x_ref[1]**o + ((-0.680943221031+0.0397157756952j))*x_ref[1]
        arg[(0, 0, 3, 2)]=(-0.00369518163939+0.0248022059215j)*x[0]**o + ((-0.784499396478-0.45557700652j))*x[0] + ((0.101148560605+0.675785647574j))*x[1]**o + ((-0.461937618224-0.954092389052j))*x[1]
        ref[(0, 0, 3, 2)]=(-0.00369518163939+0.0248022059215j)*x_ref[0]**o + ((-0.784499396478-0.45557700652j))*x_ref[0] + ((0.101148560605+0.675785647574j))*x_ref[1]**o + ((-0.461937618224-0.954092389052j))*x_ref[1]
        arg[(0, 0, 3, 3)]=(0.0345954632483-0.33797855534j)*x[0]**o + ((-0.753476651916-0.874612888748j))*x[0] + ((-0.586522440405-0.277677179883j))*x[1]**o + ((0.533156194526+0.957618522589j))*x[1]
        ref[(0, 0, 3, 3)]=(0.0345954632483-0.33797855534j)*x_ref[0]**o + ((-0.753476651916-0.874612888748j))*x_ref[0] + ((-0.586522440405-0.277677179883j))*x_ref[1]**o + ((0.533156194526+0.957618522589j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(-0.147438561312+0.802898539964j)*x[0]**o + ((0.52684970484-0.813440400111j))*x[0] + ((-0.509509530896-0.514609027442j))*x[1]**o + ((0.0443852570059-0.525157552207j))*x[1]
        ref[(0, 1, 0, 0)]=(-0.147438561312+0.802898539964j)*x_ref[0]**o + ((0.52684970484-0.813440400111j))*x_ref[0] + ((-0.509509530896-0.514609027442j))*x_ref[1]**o + ((0.0443852570059-0.525157552207j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.661109874432-0.642104536898j)*x[0]**o + ((0.361251545549-0.490912000274j))*x[0] + ((0.506891349044-0.293071008525j))*x[1]**o + ((0.254941606028-0.842681235317j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.661109874432-0.642104536898j)*x_ref[0]**o + ((0.361251545549-0.490912000274j))*x_ref[0] + ((0.506891349044-0.293071008525j))*x_ref[1]**o + ((0.254941606028-0.842681235317j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(-0.479468760152+0.339770207884j)*x[0]**o + ((-0.599949593223-0.917534872399j))*x[0] + ((0.846886953391-0.345404933641j))*x[1]**o + ((0.268728852189+0.942343106811j))*x[1]
        ref[(0, 1, 0, 2)]=(-0.479468760152+0.339770207884j)*x_ref[0]**o + ((-0.599949593223-0.917534872399j))*x_ref[0] + ((0.846886953391-0.345404933641j))*x_ref[1]**o + ((0.268728852189+0.942343106811j))*x_ref[1]
        arg[(0, 1, 0, 3)]=(0.540648300856+0.271428520599j)*x[0]**o + ((0.803001350295+0.155709258528j))*x[0] + ((0.828640421742-0.105441511614j))*x[1]**o + ((0.22535148124+0.167961293728j))*x[1]
        ref[(0, 1, 0, 3)]=(0.540648300856+0.271428520599j)*x_ref[0]**o + ((0.803001350295+0.155709258528j))*x_ref[0] + ((0.828640421742-0.105441511614j))*x_ref[1]**o + ((0.22535148124+0.167961293728j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.107214451288-0.277363857724j)*x[0]**o + ((-0.343336183344+0.0177588833733j))*x[0] + ((-0.309234634728+0.223854929245j))*x[1]**o + ((0.469060143351+0.0744216535616j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.107214451288-0.277363857724j)*x_ref[0]**o + ((-0.343336183344+0.0177588833733j))*x_ref[0] + ((-0.309234634728+0.223854929245j))*x_ref[1]**o + ((0.469060143351+0.0744216535616j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.708084657986-0.285998498344j)*x[0]**o + ((0.797835548582+0.316752377768j))*x[0] + ((-0.687452746115+0.29424558656j))*x[1]**o + ((-0.704512494206+0.516553198893j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.708084657986-0.285998498344j)*x_ref[0]**o + ((0.797835548582+0.316752377768j))*x_ref[0] + ((-0.687452746115+0.29424558656j))*x_ref[1]**o + ((-0.704512494206+0.516553198893j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(0.899591146202-0.306847174408j)*x[0]**o + ((0.689515894437-0.757350845583j))*x[0] + ((-0.450146879873+0.59341785271j))*x[1]**o + ((0.879056176355-0.0327333892531j))*x[1]
        ref[(0, 1, 1, 2)]=(0.899591146202-0.306847174408j)*x_ref[0]**o + ((0.689515894437-0.757350845583j))*x_ref[0] + ((-0.450146879873+0.59341785271j))*x_ref[1]**o + ((0.879056176355-0.0327333892531j))*x_ref[1]
        arg[(0, 1, 1, 3)]=(0.421299362619-0.843369364799j)*x[0]**o + ((0.240280783348-0.958039345332j))*x[0] + ((0.266596166038+0.892220956249j))*x[1]**o + ((0.71995194694+0.805954790765j))*x[1]
        ref[(0, 1, 1, 3)]=(0.421299362619-0.843369364799j)*x_ref[0]**o + ((0.240280783348-0.958039345332j))*x_ref[0] + ((0.266596166038+0.892220956249j))*x_ref[1]**o + ((0.71995194694+0.805954790765j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(-0.203960891178-0.859296065935j)*x[0]**o + ((-0.410552050493+0.766850421281j))*x[0] + ((0.18628350503+0.946280444945j))*x[1]**o + ((0.41915903928+0.50021417597j))*x[1]
        ref[(0, 1, 2, 0)]=(-0.203960891178-0.859296065935j)*x_ref[0]**o + ((-0.410552050493+0.766850421281j))*x_ref[0] + ((0.18628350503+0.946280444945j))*x_ref[1]**o + ((0.41915903928+0.50021417597j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(0.0120813035509-0.694133236981j)*x[0]**o + ((-0.329954829775+0.568845470516j))*x[0] + ((-0.152935448255+0.348654059899j))*x[1]**o + ((0.223107358901-0.625247974592j))*x[1]
        ref[(0, 1, 2, 1)]=(0.0120813035509-0.694133236981j)*x_ref[0]**o + ((-0.329954829775+0.568845470516j))*x_ref[0] + ((-0.152935448255+0.348654059899j))*x_ref[1]**o + ((0.223107358901-0.625247974592j))*x_ref[1]
        arg[(0, 1, 2, 2)]=(0.0341770455966-0.313928065538j)*x[0]**o + ((0.156998753217-0.0948479041598j))*x[0] + ((0.579944974387-0.432785694294j))*x[1]**o + ((-0.446454123049-0.395054073054j))*x[1]
        ref[(0, 1, 2, 2)]=(0.0341770455966-0.313928065538j)*x_ref[0]**o + ((0.156998753217-0.0948479041598j))*x_ref[0] + ((0.579944974387-0.432785694294j))*x_ref[1]**o + ((-0.446454123049-0.395054073054j))*x_ref[1]
        arg[(0, 1, 2, 3)]=(-0.763351396383-0.311474076708j)*x[0]**o + ((-0.673709086674+0.349550867433j))*x[0] + ((-0.258403805163+0.807411573293j))*x[1]**o + ((-0.876731845285+0.614871959706j))*x[1]
        ref[(0, 1, 2, 3)]=(-0.763351396383-0.311474076708j)*x_ref[0]**o + ((-0.673709086674+0.349550867433j))*x_ref[0] + ((-0.258403805163+0.807411573293j))*x_ref[1]**o + ((-0.876731845285+0.614871959706j))*x_ref[1]
        arg[(0, 1, 3, 0)]=(-0.342361521416-0.494134135188j)*x[0]**o + ((-0.360097654241-0.318121347417j))*x[0] + ((-0.0127380729421+0.00165928582355j))*x[1]**o + ((0.14433782119+0.991305560498j))*x[1]
        ref[(0, 1, 3, 0)]=(-0.342361521416-0.494134135188j)*x_ref[0]**o + ((-0.360097654241-0.318121347417j))*x_ref[0] + ((-0.0127380729421+0.00165928582355j))*x_ref[1]**o + ((0.14433782119+0.991305560498j))*x_ref[1]
        arg[(0, 1, 3, 1)]=(0.169555887876+0.306417774326j)*x[0]**o + ((0.826542229915-0.245803961804j))*x[0] + ((-0.710388153604+0.319017746189j))*x[1]**o + ((-0.322282657266-0.520113868157j))*x[1]
        ref[(0, 1, 3, 1)]=(0.169555887876+0.306417774326j)*x_ref[0]**o + ((0.826542229915-0.245803961804j))*x_ref[0] + ((-0.710388153604+0.319017746189j))*x_ref[1]**o + ((-0.322282657266-0.520113868157j))*x_ref[1]
        arg[(0, 1, 3, 2)]=(-0.421496705805+0.259079091952j)*x[0]**o + ((-0.376564043222+0.362990428645j))*x[0] + ((-0.99894466129-0.748708661762j))*x[1]**o + ((-0.259471678381+0.694885694227j))*x[1]
        ref[(0, 1, 3, 2)]=(-0.421496705805+0.259079091952j)*x_ref[0]**o + ((-0.376564043222+0.362990428645j))*x_ref[0] + ((-0.99894466129-0.748708661762j))*x_ref[1]**o + ((-0.259471678381+0.694885694227j))*x_ref[1]
        arg[(0, 1, 3, 3)]=(0.582680958192+0.527912783047j)*x[0]**o + ((0.56874992047+0.229986085678j))*x[0] + ((-0.499754830677+0.136467615837j))*x[1]**o + ((-0.609843018756-0.44279024919j))*x[1]
        ref[(0, 1, 3, 3)]=(0.582680958192+0.527912783047j)*x_ref[0]**o + ((0.56874992047+0.229986085678j))*x_ref[0] + ((-0.499754830677+0.136467615837j))*x_ref[1]**o + ((-0.609843018756-0.44279024919j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(-0.844721369331+0.214323249269j)*x[0]**o + ((0.490087273548+0.761330527904j))*x[0] + ((0.500842761993-0.272572080051j))*x[1]**o + ((0.614308626811-0.787842401008j))*x[1]
        ref[(0, 2, 0, 0)]=(-0.844721369331+0.214323249269j)*x_ref[0]**o + ((0.490087273548+0.761330527904j))*x_ref[0] + ((0.500842761993-0.272572080051j))*x_ref[1]**o + ((0.614308626811-0.787842401008j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(-0.281147349889-0.172411325754j)*x[0]**o + ((-0.623081442631-0.607092910071j))*x[0] + ((0.728357279557+0.392457185589j))*x[1]**o + ((-0.497455792966+0.36952337566j))*x[1]
        ref[(0, 2, 0, 1)]=(-0.281147349889-0.172411325754j)*x_ref[0]**o + ((-0.623081442631-0.607092910071j))*x_ref[0] + ((0.728357279557+0.392457185589j))*x_ref[1]**o + ((-0.497455792966+0.36952337566j))*x_ref[1]
        arg[(0, 2, 0, 2)]=(-0.499614354202-0.38388767985j)*x[0]**o + ((-0.342650447608+0.443877710697j))*x[0] + ((-0.586925211002+0.516052983772j))*x[1]**o + ((0.203380435021-0.475959837059j))*x[1]
        ref[(0, 2, 0, 2)]=(-0.499614354202-0.38388767985j)*x_ref[0]**o + ((-0.342650447608+0.443877710697j))*x_ref[0] + ((-0.586925211002+0.516052983772j))*x_ref[1]**o + ((0.203380435021-0.475959837059j))*x_ref[1]
        arg[(0, 2, 0, 3)]=(0.0271411025595-0.873858212228j)*x[0]**o + ((-0.8144206369+0.794450434164j))*x[0] + ((0.0831953551032+0.110812722328j))*x[1]**o + ((0.223469156093-0.881419014052j))*x[1]
        ref[(0, 2, 0, 3)]=(0.0271411025595-0.873858212228j)*x_ref[0]**o + ((-0.8144206369+0.794450434164j))*x_ref[0] + ((0.0831953551032+0.110812722328j))*x_ref[1]**o + ((0.223469156093-0.881419014052j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.0281993977748-0.878017183994j)*x[0]**o + ((-0.00238662148964+0.126094023642j))*x[0] + ((-0.862265614964+0.257060875672j))*x[1]**o + ((0.0350297530697-0.400343569038j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.0281993977748-0.878017183994j)*x_ref[0]**o + ((-0.00238662148964+0.126094023642j))*x_ref[0] + ((-0.862265614964+0.257060875672j))*x_ref[1]**o + ((0.0350297530697-0.400343569038j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(0.322655306326-0.138520418193j)*x[0]**o + ((0.469680676246-0.962665160108j))*x[0] + ((0.241170537208-0.387205956412j))*x[1]**o + ((-0.15408848518-0.876804317427j))*x[1]
        ref[(0, 2, 1, 1)]=(0.322655306326-0.138520418193j)*x_ref[0]**o + ((0.469680676246-0.962665160108j))*x_ref[0] + ((0.241170537208-0.387205956412j))*x_ref[1]**o + ((-0.15408848518-0.876804317427j))*x_ref[1]
        arg[(0, 2, 1, 2)]=(-0.574968674929-0.530421534264j)*x[0]**o + ((-0.205372585212+0.890640023695j))*x[0] + ((0.710811889344-0.57838878349j))*x[1]**o + ((0.0441995400565-0.364299706195j))*x[1]
        ref[(0, 2, 1, 2)]=(-0.574968674929-0.530421534264j)*x_ref[0]**o + ((-0.205372585212+0.890640023695j))*x_ref[0] + ((0.710811889344-0.57838878349j))*x_ref[1]**o + ((0.0441995400565-0.364299706195j))*x_ref[1]
        arg[(0, 2, 1, 3)]=(0.594547045359-0.305840294847j)*x[0]**o + ((0.699060008625+0.888195029851j))*x[0] + ((0.555019401043+0.475949632064j))*x[1]**o + ((-0.977033454145+0.497073683824j))*x[1]
        ref[(0, 2, 1, 3)]=(0.594547045359-0.305840294847j)*x_ref[0]**o + ((0.699060008625+0.888195029851j))*x_ref[0] + ((0.555019401043+0.475949632064j))*x_ref[1]**o + ((-0.977033454145+0.497073683824j))*x_ref[1]
        arg[(0, 2, 2, 0)]=(-0.963346358956+0.336897169641j)*x[0]**o + ((-0.711737836557+0.165318057317j))*x[0] + ((0.600899906484-0.20985051438j))*x[1]**o + ((0.568267298509-0.624091705916j))*x[1]
        ref[(0, 2, 2, 0)]=(-0.963346358956+0.336897169641j)*x_ref[0]**o + ((-0.711737836557+0.165318057317j))*x_ref[0] + ((0.600899906484-0.20985051438j))*x_ref[1]**o + ((0.568267298509-0.624091705916j))*x_ref[1]
        arg[(0, 2, 2, 1)]=(-0.238686309868+0.580622462997j)*x[0]**o + ((-0.302827949109-0.30625899579j))*x[0] + ((-0.265192410975+0.211023187487j))*x[1]**o + ((-0.477728295146+0.522784775795j))*x[1]
        ref[(0, 2, 2, 1)]=(-0.238686309868+0.580622462997j)*x_ref[0]**o + ((-0.302827949109-0.30625899579j))*x_ref[0] + ((-0.265192410975+0.211023187487j))*x_ref[1]**o + ((-0.477728295146+0.522784775795j))*x_ref[1]
        arg[(0, 2, 2, 2)]=(-0.853433802576-0.944476626209j)*x[0]**o + ((0.629139824546+0.202953200753j))*x[0] + ((0.630638412599+0.255988145517j))*x[1]**o + ((-0.305632170638+0.64638017184j))*x[1]
        ref[(0, 2, 2, 2)]=(-0.853433802576-0.944476626209j)*x_ref[0]**o + ((0.629139824546+0.202953200753j))*x_ref[0] + ((0.630638412599+0.255988145517j))*x_ref[1]**o + ((-0.305632170638+0.64638017184j))*x_ref[1]
        arg[(0, 2, 2, 3)]=(0.579616758024+0.716076705056j)*x[0]**o + ((0.000572524141032-0.906715011352j))*x[0] + ((-0.816765476418+0.797797993082j))*x[1]**o + ((0.838914555404+0.341584257401j))*x[1]
        ref[(0, 2, 2, 3)]=(0.579616758024+0.716076705056j)*x_ref[0]**o + ((0.000572524141032-0.906715011352j))*x_ref[0] + ((-0.816765476418+0.797797993082j))*x_ref[1]**o + ((0.838914555404+0.341584257401j))*x_ref[1]
        arg[(0, 2, 3, 0)]=(0.887155671173-0.866698137222j)*x[0]**o + ((0.0651639158373+0.0750003425926j))*x[0] + ((-0.823725160308-0.198197781453j))*x[1]**o + ((-0.766296613495-0.653135542815j))*x[1]
        ref[(0, 2, 3, 0)]=(0.887155671173-0.866698137222j)*x_ref[0]**o + ((0.0651639158373+0.0750003425926j))*x_ref[0] + ((-0.823725160308-0.198197781453j))*x_ref[1]**o + ((-0.766296613495-0.653135542815j))*x_ref[1]
        arg[(0, 2, 3, 1)]=(0.620285721254-0.52635825266j)*x[0]**o + ((0.186879648659+0.661954251696j))*x[0] + ((-0.341723492956-0.70972599561j))*x[1]**o + ((-0.168285241808+0.994249619702j))*x[1]
        ref[(0, 2, 3, 1)]=(0.620285721254-0.52635825266j)*x_ref[0]**o + ((0.186879648659+0.661954251696j))*x_ref[0] + ((-0.341723492956-0.70972599561j))*x_ref[1]**o + ((-0.168285241808+0.994249619702j))*x_ref[1]
        arg[(0, 2, 3, 2)]=(-0.0636657704284+0.736811660477j)*x[0]**o + ((-0.778151920877-0.458939914146j))*x[0] + ((-0.978717956134+0.185663639025j))*x[1]**o + ((-0.86401545772+0.0460839655263j))*x[1]
        ref[(0, 2, 3, 2)]=(-0.0636657704284+0.736811660477j)*x_ref[0]**o + ((-0.778151920877-0.458939914146j))*x_ref[0] + ((-0.978717956134+0.185663639025j))*x_ref[1]**o + ((-0.86401545772+0.0460839655263j))*x_ref[1]
        arg[(0, 2, 3, 3)]=(-0.365509456708-0.28929077787j)*x[0]**o + ((-0.381960512299+0.418692913634j))*x[0] + ((0.364570619186-0.860812201982j))*x[1]**o + ((-0.452197671695+0.719385272246j))*x[1]
        ref[(0, 2, 3, 3)]=(-0.365509456708-0.28929077787j)*x_ref[0]**o + ((-0.381960512299+0.418692913634j))*x_ref[0] + ((0.364570619186-0.860812201982j))*x_ref[1]**o + ((-0.452197671695+0.719385272246j))*x_ref[1]
        arg[(0, 3, 0, 0)]=(0.819650235198+0.384610187673j)*x[0]**o + ((0.782824805062-0.389502290492j))*x[0] + ((0.860819455804+0.509883920907j))*x[1]**o + ((-0.887542265946-0.932967841008j))*x[1]
        ref[(0, 3, 0, 0)]=(0.819650235198+0.384610187673j)*x_ref[0]**o + ((0.782824805062-0.389502290492j))*x_ref[0] + ((0.860819455804+0.509883920907j))*x_ref[1]**o + ((-0.887542265946-0.932967841008j))*x_ref[1]
        arg[(0, 3, 0, 1)]=(-0.039075712084-0.206358281647j)*x[0]**o + ((-0.372322780432+0.393431941942j))*x[0] + ((0.947873825445-0.715937560405j))*x[1]**o + ((0.131478732827+0.779443591585j))*x[1]
        ref[(0, 3, 0, 1)]=(-0.039075712084-0.206358281647j)*x_ref[0]**o + ((-0.372322780432+0.393431941942j))*x_ref[0] + ((0.947873825445-0.715937560405j))*x_ref[1]**o + ((0.131478732827+0.779443591585j))*x_ref[1]
        arg[(0, 3, 0, 2)]=(-0.33486136474-0.327123848136j)*x[0]**o + ((-0.26955830993-0.232614451716j))*x[0] + ((-0.499011956198-0.726286654867j))*x[1]**o + ((0.216751827418-0.334292238676j))*x[1]
        ref[(0, 3, 0, 2)]=(-0.33486136474-0.327123848136j)*x_ref[0]**o + ((-0.26955830993-0.232614451716j))*x_ref[0] + ((-0.499011956198-0.726286654867j))*x_ref[1]**o + ((0.216751827418-0.334292238676j))*x_ref[1]
        arg[(0, 3, 0, 3)]=(-0.816192833204-0.259671133764j)*x[0]**o + ((-0.995401746506-0.476880317741j))*x[0] + ((-0.103237691252+0.882476848073j))*x[1]**o + ((-0.880538473285+0.898736076137j))*x[1]
        ref[(0, 3, 0, 3)]=(-0.816192833204-0.259671133764j)*x_ref[0]**o + ((-0.995401746506-0.476880317741j))*x_ref[0] + ((-0.103237691252+0.882476848073j))*x_ref[1]**o + ((-0.880538473285+0.898736076137j))*x_ref[1]
        arg[(0, 3, 1, 0)]=(0.759846960726+0.838509217429j)*x[0]**o + ((0.439208784314+0.813057802703j))*x[0] + ((0.351468531666+0.657556869744j))*x[1]**o + ((0.292088332643-0.572808858804j))*x[1]
        ref[(0, 3, 1, 0)]=(0.759846960726+0.838509217429j)*x_ref[0]**o + ((0.439208784314+0.813057802703j))*x_ref[0] + ((0.351468531666+0.657556869744j))*x_ref[1]**o + ((0.292088332643-0.572808858804j))*x_ref[1]
        arg[(0, 3, 1, 1)]=(0.364861343778+0.63686256309j)*x[0]**o + ((-0.222122155483+0.067748282918j))*x[0] + ((-0.271210222594+0.402484143686j))*x[1]**o + ((0.711439962611-0.230767283137j))*x[1]
        ref[(0, 3, 1, 1)]=(0.364861343778+0.63686256309j)*x_ref[0]**o + ((-0.222122155483+0.067748282918j))*x_ref[0] + ((-0.271210222594+0.402484143686j))*x_ref[1]**o + ((0.711439962611-0.230767283137j))*x_ref[1]
        arg[(0, 3, 1, 2)]=(-0.00372163241949+0.302603636153j)*x[0]**o + ((-0.615092445402-0.823917701963j))*x[0] + ((-0.420552177928-0.89825004954j))*x[1]**o + ((-0.276501133658-0.246552993885j))*x[1]
        ref[(0, 3, 1, 2)]=(-0.00372163241949+0.302603636153j)*x_ref[0]**o + ((-0.615092445402-0.823917701963j))*x_ref[0] + ((-0.420552177928-0.89825004954j))*x_ref[1]**o + ((-0.276501133658-0.246552993885j))*x_ref[1]
        arg[(0, 3, 1, 3)]=(0.856913552972-0.430574754431j)*x[0]**o + ((0.579240432944-0.0228505276806j))*x[0] + ((0.365336399034+0.986708234323j))*x[1]**o + ((0.661685807487+0.12080108345j))*x[1]
        ref[(0, 3, 1, 3)]=(0.856913552972-0.430574754431j)*x_ref[0]**o + ((0.579240432944-0.0228505276806j))*x_ref[0] + ((0.365336399034+0.986708234323j))*x_ref[1]**o + ((0.661685807487+0.12080108345j))*x_ref[1]
        arg[(0, 3, 2, 0)]=(0.98223754739+0.895583431179j)*x[0]**o + ((-0.0249800092828+0.497116497134j))*x[0] + ((0.165578458594-0.914535079641j))*x[1]**o + ((0.89728845067-0.961441387553j))*x[1]
        ref[(0, 3, 2, 0)]=(0.98223754739+0.895583431179j)*x_ref[0]**o + ((-0.0249800092828+0.497116497134j))*x_ref[0] + ((0.165578458594-0.914535079641j))*x_ref[1]**o + ((0.89728845067-0.961441387553j))*x_ref[1]
        arg[(0, 3, 2, 1)]=(0.193716956058+0.810116527311j)*x[0]**o + ((0.266374825741+0.769075226616j))*x[0] + ((0.345178755791-0.778237180876j))*x[1]**o + ((-0.198406964583+0.774894046039j))*x[1]
        ref[(0, 3, 2, 1)]=(0.193716956058+0.810116527311j)*x_ref[0]**o + ((0.266374825741+0.769075226616j))*x_ref[0] + ((0.345178755791-0.778237180876j))*x_ref[1]**o + ((-0.198406964583+0.774894046039j))*x_ref[1]
        arg[(0, 3, 2, 2)]=(-0.632936246953+0.155035429798j)*x[0]**o + ((0.46026446018+0.658483288643j))*x[0] + ((0.684332407407-0.251823427696j))*x[1]**o + ((-0.688598180512-0.965662502412j))*x[1]
        ref[(0, 3, 2, 2)]=(-0.632936246953+0.155035429798j)*x_ref[0]**o + ((0.46026446018+0.658483288643j))*x_ref[0] + ((0.684332407407-0.251823427696j))*x_ref[1]**o + ((-0.688598180512-0.965662502412j))*x_ref[1]
        arg[(0, 3, 2, 3)]=(-0.58860933316-0.190500059262j)*x[0]**o + ((0.791249951076+0.699846711726j))*x[0] + ((-0.786066482865-0.429255759698j))*x[1]**o + ((-0.302334754346-0.448909937806j))*x[1]
        ref[(0, 3, 2, 3)]=(-0.58860933316-0.190500059262j)*x_ref[0]**o + ((0.791249951076+0.699846711726j))*x_ref[0] + ((-0.786066482865-0.429255759698j))*x_ref[1]**o + ((-0.302334754346-0.448909937806j))*x_ref[1]
        arg[(0, 3, 3, 0)]=(-0.743068384489+0.675541455655j)*x[0]**o + ((0.388266032514+0.185598354717j))*x[0] + ((0.825743046026+0.0235554397975j))*x[1]**o + ((0.861567832189+0.839020520225j))*x[1]
        ref[(0, 3, 3, 0)]=(-0.743068384489+0.675541455655j)*x_ref[0]**o + ((0.388266032514+0.185598354717j))*x_ref[0] + ((0.825743046026+0.0235554397975j))*x_ref[1]**o + ((0.861567832189+0.839020520225j))*x_ref[1]
        arg[(0, 3, 3, 1)]=(-0.957710053253-0.844663028565j)*x[0]**o + ((0.876927103073+0.839982621501j))*x[0] + ((0.0921635946221+0.927554179652j))*x[1]**o + ((-0.0817781807552-0.623716015201j))*x[1]
        ref[(0, 3, 3, 1)]=(-0.957710053253-0.844663028565j)*x_ref[0]**o + ((0.876927103073+0.839982621501j))*x_ref[0] + ((0.0921635946221+0.927554179652j))*x_ref[1]**o + ((-0.0817781807552-0.623716015201j))*x_ref[1]
        arg[(0, 3, 3, 2)]=(0.390001013188-0.147324105618j)*x[0]**o + ((0.0854008454748+0.626270437094j))*x[0] + ((-0.462311070098+0.092821927279j))*x[1]**o + ((0.0107284208294-0.605650413672j))*x[1]
        ref[(0, 3, 3, 2)]=(0.390001013188-0.147324105618j)*x_ref[0]**o + ((0.0854008454748+0.626270437094j))*x_ref[0] + ((-0.462311070098+0.092821927279j))*x_ref[1]**o + ((0.0107284208294-0.605650413672j))*x_ref[1]
        arg[(0, 3, 3, 3)]=(-0.950711435617-0.184446250518j)*x[0]**o + ((-0.104250244194-0.0456309784907j))*x[0] + ((0.936740909499-0.555653424602j))*x[1]**o + ((-0.868891240669+0.20493707587j))*x[1]
        ref[(0, 3, 3, 3)]=(-0.950711435617-0.184446250518j)*x_ref[0]**o + ((-0.104250244194-0.0456309784907j))*x_ref[0] + ((0.936740909499-0.555653424602j))*x_ref[1]**o + ((-0.868891240669+0.20493707587j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.976088169264-0.909229621815j)*x[0]**o + ((-0.108038410321-0.379110363373j))*x[0] + ((0.409123626836-0.676111646883j))*x[1]**o + ((-0.63475196734-0.0642097366475j))*x[1]
        ref[(1, 0, 0, 0)]=(0.976088169264-0.909229621815j)*x_ref[0]**o + ((-0.108038410321-0.379110363373j))*x_ref[0] + ((0.409123626836-0.676111646883j))*x_ref[1]**o + ((-0.63475196734-0.0642097366475j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(-0.599663038445+0.575972901153j)*x[0]**o + ((-0.372092147531+0.33176483089j))*x[0] + ((-0.946066190127-0.0331470719551j))*x[1]**o + ((0.64739079731+0.388592586981j))*x[1]
        ref[(1, 0, 0, 1)]=(-0.599663038445+0.575972901153j)*x_ref[0]**o + ((-0.372092147531+0.33176483089j))*x_ref[0] + ((-0.946066190127-0.0331470719551j))*x_ref[1]**o + ((0.64739079731+0.388592586981j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(-0.956926235659+0.135334244301j)*x[0]**o + ((-0.423576139521+0.809042762131j))*x[0] + ((0.0494352607653+0.361680513797j))*x[1]**o + ((0.213120239809+0.521367484876j))*x[1]
        ref[(1, 0, 0, 2)]=(-0.956926235659+0.135334244301j)*x_ref[0]**o + ((-0.423576139521+0.809042762131j))*x_ref[0] + ((0.0494352607653+0.361680513797j))*x_ref[1]**o + ((0.213120239809+0.521367484876j))*x_ref[1]
        arg[(1, 0, 0, 3)]=(0.888919204187+0.508127912074j)*x[0]**o + ((-0.240677507066-0.582969142681j))*x[0] + ((-0.00456275342816+0.641985256383j))*x[1]**o + ((0.38880189662-0.397683758862j))*x[1]
        ref[(1, 0, 0, 3)]=(0.888919204187+0.508127912074j)*x_ref[0]**o + ((-0.240677507066-0.582969142681j))*x_ref[0] + ((-0.00456275342816+0.641985256383j))*x_ref[1]**o + ((0.38880189662-0.397683758862j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.993791239215-0.960521537152j)*x[0]**o + ((0.365351448476+0.547307144667j))*x[0] + ((0.863909028815+0.867953794761j))*x[1]**o + ((0.49682998139-0.94813789972j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.993791239215-0.960521537152j)*x_ref[0]**o + ((0.365351448476+0.547307144667j))*x_ref[0] + ((0.863909028815+0.867953794761j))*x_ref[1]**o + ((0.49682998139-0.94813789972j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.402544641124-0.443090530845j)*x[0]**o + ((-0.793379025346+0.642840112354j))*x[0] + ((-0.205272002703+0.150810520068j))*x[1]**o + ((-0.151420738852-0.705268282206j))*x[1]
        ref[(1, 0, 1, 1)]=(0.402544641124-0.443090530845j)*x_ref[0]**o + ((-0.793379025346+0.642840112354j))*x_ref[0] + ((-0.205272002703+0.150810520068j))*x_ref[1]**o + ((-0.151420738852-0.705268282206j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(0.794264843846+0.52588838465j)*x[0]**o + ((-0.667120656184+0.192418661824j))*x[0] + ((-0.173224737885-0.177803495618j))*x[1]**o + ((0.335438392418-0.408963902903j))*x[1]
        ref[(1, 0, 1, 2)]=(0.794264843846+0.52588838465j)*x_ref[0]**o + ((-0.667120656184+0.192418661824j))*x_ref[0] + ((-0.173224737885-0.177803495618j))*x_ref[1]**o + ((0.335438392418-0.408963902903j))*x_ref[1]
        arg[(1, 0, 1, 3)]=(0.842839015747+0.468176609966j)*x[0]**o + ((0.938158907367+0.798796609045j))*x[0] + ((0.82744771221+0.376341507764j))*x[1]**o + ((0.913257640383+0.764075027494j))*x[1]
        ref[(1, 0, 1, 3)]=(0.842839015747+0.468176609966j)*x_ref[0]**o + ((0.938158907367+0.798796609045j))*x_ref[0] + ((0.82744771221+0.376341507764j))*x_ref[1]**o + ((0.913257640383+0.764075027494j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(0.713768326572-0.0729347931854j)*x[0]**o + ((-0.521260560606-0.390541893709j))*x[0] + ((0.118498969776+0.88692587609j))*x[1]**o + ((-0.292810716138+0.654539870665j))*x[1]
        ref[(1, 0, 2, 0)]=(0.713768326572-0.0729347931854j)*x_ref[0]**o + ((-0.521260560606-0.390541893709j))*x_ref[0] + ((0.118498969776+0.88692587609j))*x_ref[1]**o + ((-0.292810716138+0.654539870665j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(0.211193867038-0.150925879012j)*x[0]**o + ((0.945379391683-0.228530599924j))*x[0] + ((0.0293124595174-0.0967050112012j))*x[1]**o + ((0.895187380895+0.351569242196j))*x[1]
        ref[(1, 0, 2, 1)]=(0.211193867038-0.150925879012j)*x_ref[0]**o + ((0.945379391683-0.228530599924j))*x_ref[0] + ((0.0293124595174-0.0967050112012j))*x_ref[1]**o + ((0.895187380895+0.351569242196j))*x_ref[1]
        arg[(1, 0, 2, 2)]=(0.779904796646+0.0899053971725j)*x[0]**o + ((0.53340927634-0.626105248954j))*x[0] + ((-0.483392918226+0.230915581797j))*x[1]**o + ((-0.587434047759+0.799740616714j))*x[1]
        ref[(1, 0, 2, 2)]=(0.779904796646+0.0899053971725j)*x_ref[0]**o + ((0.53340927634-0.626105248954j))*x_ref[0] + ((-0.483392918226+0.230915581797j))*x_ref[1]**o + ((-0.587434047759+0.799740616714j))*x_ref[1]
        arg[(1, 0, 2, 3)]=(0.0626179632548+0.0130293832662j)*x[0]**o + ((0.228881719062+0.972032563563j))*x[0] + ((-0.369966377774+0.231782823708j))*x[1]**o + ((0.664254692215+0.300551917371j))*x[1]
        ref[(1, 0, 2, 3)]=(0.0626179632548+0.0130293832662j)*x_ref[0]**o + ((0.228881719062+0.972032563563j))*x_ref[0] + ((-0.369966377774+0.231782823708j))*x_ref[1]**o + ((0.664254692215+0.300551917371j))*x_ref[1]
        arg[(1, 0, 3, 0)]=(-0.628762124982+0.555756069457j)*x[0]**o + ((0.0867684867119+0.251218229387j))*x[0] + ((0.827584672032-0.795364669464j))*x[1]**o + ((0.247151610429+0.151796269713j))*x[1]
        ref[(1, 0, 3, 0)]=(-0.628762124982+0.555756069457j)*x_ref[0]**o + ((0.0867684867119+0.251218229387j))*x_ref[0] + ((0.827584672032-0.795364669464j))*x_ref[1]**o + ((0.247151610429+0.151796269713j))*x_ref[1]
        arg[(1, 0, 3, 1)]=(0.356956980223-0.401386804187j)*x[0]**o + ((0.966205471507+0.139770552332j))*x[0] + ((-0.100973914269+0.112351269754j))*x[1]**o + ((-0.72221622371-0.194003881997j))*x[1]
        ref[(1, 0, 3, 1)]=(0.356956980223-0.401386804187j)*x_ref[0]**o + ((0.966205471507+0.139770552332j))*x_ref[0] + ((-0.100973914269+0.112351269754j))*x_ref[1]**o + ((-0.72221622371-0.194003881997j))*x_ref[1]
        arg[(1, 0, 3, 2)]=(0.361578291208+0.291750183312j)*x[0]**o + ((-0.646629167622-0.485537838278j))*x[0] + ((-0.694161296953+0.662694027705j))*x[1]**o + ((-0.451622795951+0.180605136926j))*x[1]
        ref[(1, 0, 3, 2)]=(0.361578291208+0.291750183312j)*x_ref[0]**o + ((-0.646629167622-0.485537838278j))*x_ref[0] + ((-0.694161296953+0.662694027705j))*x_ref[1]**o + ((-0.451622795951+0.180605136926j))*x_ref[1]
        arg[(1, 0, 3, 3)]=(-0.399559537218+0.120475695425j)*x[0]**o + ((0.772118123011-0.749556535764j))*x[0] + ((-0.739430308079-0.503508929441j))*x[1]**o + ((-0.21754407684-0.1795547187j))*x[1]
        ref[(1, 0, 3, 3)]=(-0.399559537218+0.120475695425j)*x_ref[0]**o + ((0.772118123011-0.749556535764j))*x_ref[0] + ((-0.739430308079-0.503508929441j))*x_ref[1]**o + ((-0.21754407684-0.1795547187j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.728379092189+0.463301421986j)*x[0]**o + ((0.364700324762-0.684765562292j))*x[0] + ((-0.347123413613+0.144186755616j))*x[1]**o + ((-0.778081131221-0.0718371467996j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.728379092189+0.463301421986j)*x_ref[0]**o + ((0.364700324762-0.684765562292j))*x_ref[0] + ((-0.347123413613+0.144186755616j))*x_ref[1]**o + ((-0.778081131221-0.0718371467996j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.527823554375+0.154421304274j)*x[0]**o + ((-0.493896072177+0.978857120723j))*x[0] + ((0.45350524858+0.585339193215j))*x[1]**o + ((-0.950763901531+0.416313732618j))*x[1]
        ref[(1, 1, 0, 1)]=(0.527823554375+0.154421304274j)*x_ref[0]**o + ((-0.493896072177+0.978857120723j))*x_ref[0] + ((0.45350524858+0.585339193215j))*x_ref[1]**o + ((-0.950763901531+0.416313732618j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(0.251423054322-0.684347503537j)*x[0]**o + ((0.644413727972+0.108120835092j))*x[0] + ((-0.131282671311-0.202535465974j))*x[1]**o + ((-0.658904066651+0.984590654166j))*x[1]
        ref[(1, 1, 0, 2)]=(0.251423054322-0.684347503537j)*x_ref[0]**o + ((0.644413727972+0.108120835092j))*x_ref[0] + ((-0.131282671311-0.202535465974j))*x_ref[1]**o + ((-0.658904066651+0.984590654166j))*x_ref[1]
        arg[(1, 1, 0, 3)]=(0.590092962475-0.246086255818j)*x[0]**o + ((-0.416195350774-0.122583586832j))*x[0] + ((0.9518655778-0.567207143427j))*x[1]**o + ((0.201836702343+0.0483847271136j))*x[1]
        ref[(1, 1, 0, 3)]=(0.590092962475-0.246086255818j)*x_ref[0]**o + ((-0.416195350774-0.122583586832j))*x_ref[0] + ((0.9518655778-0.567207143427j))*x_ref[1]**o + ((0.201836702343+0.0483847271136j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.353927361397+0.28076050434j)*x[0]**o + ((0.478428124582+0.188285062356j))*x[0] + ((-0.92827323397-0.61450650596j))*x[1]**o + ((-0.690216362863-0.2045013449j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.353927361397+0.28076050434j)*x_ref[0]**o + ((0.478428124582+0.188285062356j))*x_ref[0] + ((-0.92827323397-0.61450650596j))*x_ref[1]**o + ((-0.690216362863-0.2045013449j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.578694769711-0.407695915663j)*x[0]**o + ((-0.990357780574-0.319669318442j))*x[0] + ((0.894890374931+0.43808771674j))*x[1]**o + ((0.346716792091-0.0490084848823j))*x[1]
        ref[(1, 1, 1, 1)]=(0.578694769711-0.407695915663j)*x_ref[0]**o + ((-0.990357780574-0.319669318442j))*x_ref[0] + ((0.894890374931+0.43808771674j))*x_ref[1]**o + ((0.346716792091-0.0490084848823j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(-0.979685447053+0.311187255938j)*x[0]**o + ((0.486208261045+0.611556835094j))*x[0] + ((-0.664953656675+0.964660605794j))*x[1]**o + ((-0.99949649387-0.625545981465j))*x[1]
        ref[(1, 1, 1, 2)]=(-0.979685447053+0.311187255938j)*x_ref[0]**o + ((0.486208261045+0.611556835094j))*x_ref[0] + ((-0.664953656675+0.964660605794j))*x_ref[1]**o + ((-0.99949649387-0.625545981465j))*x_ref[1]
        arg[(1, 1, 1, 3)]=(0.359043811604+0.93410760995j)*x[0]**o + ((0.458758597706+0.611329741767j))*x[0] + ((-0.498029843311+0.446892639937j))*x[1]**o + ((0.281249331753-0.149692053736j))*x[1]
        ref[(1, 1, 1, 3)]=(0.359043811604+0.93410760995j)*x_ref[0]**o + ((0.458758597706+0.611329741767j))*x_ref[0] + ((-0.498029843311+0.446892639937j))*x_ref[1]**o + ((0.281249331753-0.149692053736j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(-0.51052391321+0.383848645803j)*x[0]**o + ((0.382148466359+0.842036190771j))*x[0] + ((0.489579516837+0.808101951461j))*x[1]**o + ((-0.376067674279+0.205067236766j))*x[1]
        ref[(1, 1, 2, 0)]=(-0.51052391321+0.383848645803j)*x_ref[0]**o + ((0.382148466359+0.842036190771j))*x_ref[0] + ((0.489579516837+0.808101951461j))*x_ref[1]**o + ((-0.376067674279+0.205067236766j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(0.454563053678+0.0269135530378j)*x[0]**o + ((0.824735623264+0.0828640597783j))*x[0] + ((0.931374852481-0.611612523979j))*x[1]**o + ((0.401601528144-0.747480440258j))*x[1]
        ref[(1, 1, 2, 1)]=(0.454563053678+0.0269135530378j)*x_ref[0]**o + ((0.824735623264+0.0828640597783j))*x_ref[0] + ((0.931374852481-0.611612523979j))*x_ref[1]**o + ((0.401601528144-0.747480440258j))*x_ref[1]
        arg[(1, 1, 2, 2)]=(-0.24227643056-0.835593331761j)*x[0]**o + ((-0.313927354251+0.284649590119j))*x[0] + ((0.304035996033+0.900752969157j))*x[1]**o + ((0.738980666345+0.143340613387j))*x[1]
        ref[(1, 1, 2, 2)]=(-0.24227643056-0.835593331761j)*x_ref[0]**o + ((-0.313927354251+0.284649590119j))*x_ref[0] + ((0.304035996033+0.900752969157j))*x_ref[1]**o + ((0.738980666345+0.143340613387j))*x_ref[1]
        arg[(1, 1, 2, 3)]=(0.326241885717-0.444635589719j)*x[0]**o + ((-0.219089727932-0.953541148142j))*x[0] + ((-0.266120901221-0.0969662806427j))*x[1]**o + ((-0.654087110843-0.9464972242j))*x[1]
        ref[(1, 1, 2, 3)]=(0.326241885717-0.444635589719j)*x_ref[0]**o + ((-0.219089727932-0.953541148142j))*x_ref[0] + ((-0.266120901221-0.0969662806427j))*x_ref[1]**o + ((-0.654087110843-0.9464972242j))*x_ref[1]
        arg[(1, 1, 3, 0)]=(-0.803423009302+0.942937043429j)*x[0]**o + ((-0.131196969172+0.935606064013j))*x[0] + ((0.966529790167-0.932044683333j))*x[1]**o + ((-0.626346775818+0.20638608839j))*x[1]
        ref[(1, 1, 3, 0)]=(-0.803423009302+0.942937043429j)*x_ref[0]**o + ((-0.131196969172+0.935606064013j))*x_ref[0] + ((0.966529790167-0.932044683333j))*x_ref[1]**o + ((-0.626346775818+0.20638608839j))*x_ref[1]
        arg[(1, 1, 3, 1)]=(0.743097433562-0.97461214768j)*x[0]**o + ((-0.681120511672-0.395690667253j))*x[0] + ((-0.393063482723+0.844860115621j))*x[1]**o + ((0.62224179081+0.20411944163j))*x[1]
        ref[(1, 1, 3, 1)]=(0.743097433562-0.97461214768j)*x_ref[0]**o + ((-0.681120511672-0.395690667253j))*x_ref[0] + ((-0.393063482723+0.844860115621j))*x_ref[1]**o + ((0.62224179081+0.20411944163j))*x_ref[1]
        arg[(1, 1, 3, 2)]=(0.144668033684-0.908916369231j)*x[0]**o + ((0.463222661662+0.659922093303j))*x[0] + ((-0.385924424297+0.455550496304j))*x[1]**o + ((0.0379110954735+0.730319446651j))*x[1]
        ref[(1, 1, 3, 2)]=(0.144668033684-0.908916369231j)*x_ref[0]**o + ((0.463222661662+0.659922093303j))*x_ref[0] + ((-0.385924424297+0.455550496304j))*x_ref[1]**o + ((0.0379110954735+0.730319446651j))*x_ref[1]
        arg[(1, 1, 3, 3)]=(-0.129278682178-0.647584839142j)*x[0]**o + ((-0.46418933678+0.0313030410619j))*x[0] + ((-0.287145149687-0.450894776656j))*x[1]**o + ((0.671025108549-0.628704319695j))*x[1]
        ref[(1, 1, 3, 3)]=(-0.129278682178-0.647584839142j)*x_ref[0]**o + ((-0.46418933678+0.0313030410619j))*x_ref[0] + ((-0.287145149687-0.450894776656j))*x_ref[1]**o + ((0.671025108549-0.628704319695j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(0.20549669358+0.0476447168079j)*x[0]**o + ((-0.170930228702-0.758787727826j))*x[0] + ((-0.245625553084-0.0138162173927j))*x[1]**o + ((0.151207536098-0.33350229242j))*x[1]
        ref[(1, 2, 0, 0)]=(0.20549669358+0.0476447168079j)*x_ref[0]**o + ((-0.170930228702-0.758787727826j))*x_ref[0] + ((-0.245625553084-0.0138162173927j))*x_ref[1]**o + ((0.151207536098-0.33350229242j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.936233521479-0.639393541925j)*x[0]**o + ((-0.87468790665+0.375829235947j))*x[0] + ((-0.934136677919-0.0248073193098j))*x[1]**o + ((-0.603123410796-0.158596122648j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.936233521479-0.639393541925j)*x_ref[0]**o + ((-0.87468790665+0.375829235947j))*x_ref[0] + ((-0.934136677919-0.0248073193098j))*x_ref[1]**o + ((-0.603123410796-0.158596122648j))*x_ref[1]
        arg[(1, 2, 0, 2)]=(-0.879242957539-0.85247591628j)*x[0]**o + ((-0.838046870739+0.0710082464286j))*x[0] + ((0.668474339675+0.895482491151j))*x[1]**o + ((-0.295779488398-0.870596535227j))*x[1]
        ref[(1, 2, 0, 2)]=(-0.879242957539-0.85247591628j)*x_ref[0]**o + ((-0.838046870739+0.0710082464286j))*x_ref[0] + ((0.668474339675+0.895482491151j))*x_ref[1]**o + ((-0.295779488398-0.870596535227j))*x_ref[1]
        arg[(1, 2, 0, 3)]=(-0.67786725428-0.375213504995j)*x[0]**o + ((0.145651402744+0.167274583388j))*x[0] + ((-0.120034374073-0.439628588457j))*x[1]**o + ((-0.807407529079+0.308690693249j))*x[1]
        ref[(1, 2, 0, 3)]=(-0.67786725428-0.375213504995j)*x_ref[0]**o + ((0.145651402744+0.167274583388j))*x_ref[0] + ((-0.120034374073-0.439628588457j))*x_ref[1]**o + ((-0.807407529079+0.308690693249j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(0.531574616171+0.946898746769j)*x[0]**o + ((-0.923299620018+0.13323671283j))*x[0] + ((0.664250373795+0.195040174619j))*x[1]**o + ((0.754212856663+0.538184799644j))*x[1]
        ref[(1, 2, 1, 0)]=(0.531574616171+0.946898746769j)*x_ref[0]**o + ((-0.923299620018+0.13323671283j))*x_ref[0] + ((0.664250373795+0.195040174619j))*x_ref[1]**o + ((0.754212856663+0.538184799644j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.394037680005+0.561041720674j)*x[0]**o + ((-0.821931984192+0.467540443004j))*x[0] + ((-0.561892346768+0.392316754671j))*x[1]**o + ((-0.238223808106-0.190747160995j))*x[1]
        ref[(1, 2, 1, 1)]=(0.394037680005+0.561041720674j)*x_ref[0]**o + ((-0.821931984192+0.467540443004j))*x_ref[0] + ((-0.561892346768+0.392316754671j))*x_ref[1]**o + ((-0.238223808106-0.190747160995j))*x_ref[1]
        arg[(1, 2, 1, 2)]=(-0.866401200879-0.749461457176j)*x[0]**o + ((0.53747544441-0.887282724305j))*x[0] + ((0.985889541637+0.514200637592j))*x[1]**o + ((0.396750677852-0.92797049454j))*x[1]
        ref[(1, 2, 1, 2)]=(-0.866401200879-0.749461457176j)*x_ref[0]**o + ((0.53747544441-0.887282724305j))*x_ref[0] + ((0.985889541637+0.514200637592j))*x_ref[1]**o + ((0.396750677852-0.92797049454j))*x_ref[1]
        arg[(1, 2, 1, 3)]=(0.949807756439+0.603144585762j)*x[0]**o + ((-0.295542476357+0.509914844722j))*x[0] + ((0.499362185407-0.140343639345j))*x[1]**o + ((0.482976517959-0.702701847858j))*x[1]
        ref[(1, 2, 1, 3)]=(0.949807756439+0.603144585762j)*x_ref[0]**o + ((-0.295542476357+0.509914844722j))*x_ref[0] + ((0.499362185407-0.140343639345j))*x_ref[1]**o + ((0.482976517959-0.702701847858j))*x_ref[1]
        arg[(1, 2, 2, 0)]=(-0.305329013213-0.0363208029516j)*x[0]**o + ((-0.859321236927+0.567784558047j))*x[0] + ((-0.809678029103+0.698137894404j))*x[1]**o + ((-0.495888819222+0.128874945491j))*x[1]
        ref[(1, 2, 2, 0)]=(-0.305329013213-0.0363208029516j)*x_ref[0]**o + ((-0.859321236927+0.567784558047j))*x_ref[0] + ((-0.809678029103+0.698137894404j))*x_ref[1]**o + ((-0.495888819222+0.128874945491j))*x_ref[1]
        arg[(1, 2, 2, 1)]=(-0.44237430371+0.909623518428j)*x[0]**o + ((0.580508058799-0.34438282338j))*x[0] + ((0.826412216282+0.229600486684j))*x[1]**o + ((0.660640143975-0.952420310518j))*x[1]
        ref[(1, 2, 2, 1)]=(-0.44237430371+0.909623518428j)*x_ref[0]**o + ((0.580508058799-0.34438282338j))*x_ref[0] + ((0.826412216282+0.229600486684j))*x_ref[1]**o + ((0.660640143975-0.952420310518j))*x_ref[1]
        arg[(1, 2, 2, 2)]=(-0.024337854736-0.405350809233j)*x[0]**o + ((-0.00328698382532-0.0167861471408j))*x[0] + ((-0.573434805006-0.135851738033j))*x[1]**o + ((-0.482309797199-0.975312299685j))*x[1]
        ref[(1, 2, 2, 2)]=(-0.024337854736-0.405350809233j)*x_ref[0]**o + ((-0.00328698382532-0.0167861471408j))*x_ref[0] + ((-0.573434805006-0.135851738033j))*x_ref[1]**o + ((-0.482309797199-0.975312299685j))*x_ref[1]
        arg[(1, 2, 2, 3)]=(0.457551938511+0.184024370662j)*x[0]**o + ((0.351479572203-0.356753750107j))*x[0] + ((-0.31091464247-0.181183247218j))*x[1]**o + ((0.921388843895-0.921857257856j))*x[1]
        ref[(1, 2, 2, 3)]=(0.457551938511+0.184024370662j)*x_ref[0]**o + ((0.351479572203-0.356753750107j))*x_ref[0] + ((-0.31091464247-0.181183247218j))*x_ref[1]**o + ((0.921388843895-0.921857257856j))*x_ref[1]
        arg[(1, 2, 3, 0)]=(-0.370842626605+0.963456372714j)*x[0]**o + ((0.876355456054+0.286390347423j))*x[0] + ((0.00331513593021-0.628692455112j))*x[1]**o + ((0.447813163574-0.512644376819j))*x[1]
        ref[(1, 2, 3, 0)]=(-0.370842626605+0.963456372714j)*x_ref[0]**o + ((0.876355456054+0.286390347423j))*x_ref[0] + ((0.00331513593021-0.628692455112j))*x_ref[1]**o + ((0.447813163574-0.512644376819j))*x_ref[1]
        arg[(1, 2, 3, 1)]=(0.478798197889-0.556382467002j)*x[0]**o + ((0.716536857884-0.986248728751j))*x[0] + ((-0.441046363893+0.953156194463j))*x[1]**o + ((-0.120431457151-0.644438059261j))*x[1]
        ref[(1, 2, 3, 1)]=(0.478798197889-0.556382467002j)*x_ref[0]**o + ((0.716536857884-0.986248728751j))*x_ref[0] + ((-0.441046363893+0.953156194463j))*x_ref[1]**o + ((-0.120431457151-0.644438059261j))*x_ref[1]
        arg[(1, 2, 3, 2)]=(-0.485452510469+0.452503882274j)*x[0]**o + ((0.898103752881-0.764831985126j))*x[0] + ((0.139615129903+0.77718359407j))*x[1]**o + ((0.546077628923+0.227334626447j))*x[1]
        ref[(1, 2, 3, 2)]=(-0.485452510469+0.452503882274j)*x_ref[0]**o + ((0.898103752881-0.764831985126j))*x_ref[0] + ((0.139615129903+0.77718359407j))*x_ref[1]**o + ((0.546077628923+0.227334626447j))*x_ref[1]
        arg[(1, 2, 3, 3)]=(-0.854453503515-0.613953215151j)*x[0]**o + ((0.995967925989-0.451326486778j))*x[0] + ((0.0733980766333+0.908405468695j))*x[1]**o + ((0.354649088954-0.602441376491j))*x[1]
        ref[(1, 2, 3, 3)]=(-0.854453503515-0.613953215151j)*x_ref[0]**o + ((0.995967925989-0.451326486778j))*x_ref[0] + ((0.0733980766333+0.908405468695j))*x_ref[1]**o + ((0.354649088954-0.602441376491j))*x_ref[1]
        arg[(1, 3, 0, 0)]=(0.540454833289-0.0139168442153j)*x[0]**o + ((0.548256628384+0.715763073337j))*x[0] + ((-0.0325443139088-0.494664314652j))*x[1]**o + ((-0.832962078701+0.87850099784j))*x[1]
        ref[(1, 3, 0, 0)]=(0.540454833289-0.0139168442153j)*x_ref[0]**o + ((0.548256628384+0.715763073337j))*x_ref[0] + ((-0.0325443139088-0.494664314652j))*x_ref[1]**o + ((-0.832962078701+0.87850099784j))*x_ref[1]
        arg[(1, 3, 0, 1)]=(-0.860395128242+0.658212750349j)*x[0]**o + ((0.990919648295+0.290189190043j))*x[0] + ((-0.159185592054+0.763274088807j))*x[1]**o + ((0.424760474674-0.203300145272j))*x[1]
        ref[(1, 3, 0, 1)]=(-0.860395128242+0.658212750349j)*x_ref[0]**o + ((0.990919648295+0.290189190043j))*x_ref[0] + ((-0.159185592054+0.763274088807j))*x_ref[1]**o + ((0.424760474674-0.203300145272j))*x_ref[1]
        arg[(1, 3, 0, 2)]=(0.123917832485+0.375431001309j)*x[0]**o + ((-0.442315745974+0.341226851436j))*x[0] + ((-0.0461327858037-0.810935038547j))*x[1]**o + ((0.924578823565+0.887955097049j))*x[1]
        ref[(1, 3, 0, 2)]=(0.123917832485+0.375431001309j)*x_ref[0]**o + ((-0.442315745974+0.341226851436j))*x_ref[0] + ((-0.0461327858037-0.810935038547j))*x_ref[1]**o + ((0.924578823565+0.887955097049j))*x_ref[1]
        arg[(1, 3, 0, 3)]=(-0.847886993419-0.317896579364j)*x[0]**o + ((0.903196277226+0.641947404188j))*x[0] + ((-0.808334521044-0.406140399079j))*x[1]**o + ((-0.968840169712+0.35754254469j))*x[1]
        ref[(1, 3, 0, 3)]=(-0.847886993419-0.317896579364j)*x_ref[0]**o + ((0.903196277226+0.641947404188j))*x_ref[0] + ((-0.808334521044-0.406140399079j))*x_ref[1]**o + ((-0.968840169712+0.35754254469j))*x_ref[1]
        arg[(1, 3, 1, 0)]=(0.191635726242+0.718718995931j)*x[0]**o + ((-0.0604646583246+0.36150167715j))*x[0] + ((-0.554235935376+0.224309191648j))*x[1]**o + ((0.423557680291-0.546542654299j))*x[1]
        ref[(1, 3, 1, 0)]=(0.191635726242+0.718718995931j)*x_ref[0]**o + ((-0.0604646583246+0.36150167715j))*x_ref[0] + ((-0.554235935376+0.224309191648j))*x_ref[1]**o + ((0.423557680291-0.546542654299j))*x_ref[1]
        arg[(1, 3, 1, 1)]=(-0.152828549183-0.770592115629j)*x[0]**o + ((-0.142315469843-0.475812403595j))*x[0] + ((-0.939388250443+0.712787493426j))*x[1]**o + ((0.427437698486-0.0366399186564j))*x[1]
        ref[(1, 3, 1, 1)]=(-0.152828549183-0.770592115629j)*x_ref[0]**o + ((-0.142315469843-0.475812403595j))*x_ref[0] + ((-0.939388250443+0.712787493426j))*x_ref[1]**o + ((0.427437698486-0.0366399186564j))*x_ref[1]
        arg[(1, 3, 1, 2)]=(0.415466369653-0.702591504475j)*x[0]**o + ((-0.0781475928842+0.72881905117j))*x[0] + ((0.425705381363+0.497365449306j))*x[1]**o + ((-0.581291572166-0.788599064805j))*x[1]
        ref[(1, 3, 1, 2)]=(0.415466369653-0.702591504475j)*x_ref[0]**o + ((-0.0781475928842+0.72881905117j))*x_ref[0] + ((0.425705381363+0.497365449306j))*x_ref[1]**o + ((-0.581291572166-0.788599064805j))*x_ref[1]
        arg[(1, 3, 1, 3)]=(0.401389082117-0.0789134773273j)*x[0]**o + ((-0.773959790169-0.838211098448j))*x[0] + ((0.136664529843+0.437653065255j))*x[1]**o + ((0.31043459159-0.474712293043j))*x[1]
        ref[(1, 3, 1, 3)]=(0.401389082117-0.0789134773273j)*x_ref[0]**o + ((-0.773959790169-0.838211098448j))*x_ref[0] + ((0.136664529843+0.437653065255j))*x_ref[1]**o + ((0.31043459159-0.474712293043j))*x_ref[1]
        arg[(1, 3, 2, 0)]=(-0.333417768638+0.430292388328j)*x[0]**o + ((-0.647950211708-0.590291252383j))*x[0] + ((-0.647025738986+0.811854586501j))*x[1]**o + ((0.579913168718+0.334918502523j))*x[1]
        ref[(1, 3, 2, 0)]=(-0.333417768638+0.430292388328j)*x_ref[0]**o + ((-0.647950211708-0.590291252383j))*x_ref[0] + ((-0.647025738986+0.811854586501j))*x_ref[1]**o + ((0.579913168718+0.334918502523j))*x_ref[1]
        arg[(1, 3, 2, 1)]=(-0.836689349752-0.340495722901j)*x[0]**o + ((0.374394045546+0.235130555306j))*x[0] + ((0.892631585634-0.18320039191j))*x[1]**o + ((0.0232075369387+0.861813256686j))*x[1]
        ref[(1, 3, 2, 1)]=(-0.836689349752-0.340495722901j)*x_ref[0]**o + ((0.374394045546+0.235130555306j))*x_ref[0] + ((0.892631585634-0.18320039191j))*x_ref[1]**o + ((0.0232075369387+0.861813256686j))*x_ref[1]
        arg[(1, 3, 2, 2)]=(-0.533972260648-0.88623927051j)*x[0]**o + ((0.956470770158-0.659285292874j))*x[0] + ((0.894981966116+0.0418409418672j))*x[1]**o + ((0.762826242998+0.0346405950439j))*x[1]
        ref[(1, 3, 2, 2)]=(-0.533972260648-0.88623927051j)*x_ref[0]**o + ((0.956470770158-0.659285292874j))*x_ref[0] + ((0.894981966116+0.0418409418672j))*x_ref[1]**o + ((0.762826242998+0.0346405950439j))*x_ref[1]
        arg[(1, 3, 2, 3)]=(-0.224440355673+0.882468343548j)*x[0]**o + ((-0.928761612792+0.715770787827j))*x[0] + ((0.596984847196-0.278576677969j))*x[1]**o + ((-0.261645900501+0.800507099289j))*x[1]
        ref[(1, 3, 2, 3)]=(-0.224440355673+0.882468343548j)*x_ref[0]**o + ((-0.928761612792+0.715770787827j))*x_ref[0] + ((0.596984847196-0.278576677969j))*x_ref[1]**o + ((-0.261645900501+0.800507099289j))*x_ref[1]
        arg[(1, 3, 3, 0)]=(0.632829128097+0.0748709410437j)*x[0]**o + ((0.0881326983363+0.653095803038j))*x[0] + ((0.809558512635+0.233036352024j))*x[1]**o + ((-0.400954655374+0.196167536538j))*x[1]
        ref[(1, 3, 3, 0)]=(0.632829128097+0.0748709410437j)*x_ref[0]**o + ((0.0881326983363+0.653095803038j))*x_ref[0] + ((0.809558512635+0.233036352024j))*x_ref[1]**o + ((-0.400954655374+0.196167536538j))*x_ref[1]
        arg[(1, 3, 3, 1)]=(0.256206021389-0.0534574072414j)*x[0]**o + ((0.979754161982+0.380981999786j))*x[0] + ((-0.770197382914-0.428871629568j))*x[1]**o + ((0.628687675542+0.518928937424j))*x[1]
        ref[(1, 3, 3, 1)]=(0.256206021389-0.0534574072414j)*x_ref[0]**o + ((0.979754161982+0.380981999786j))*x_ref[0] + ((-0.770197382914-0.428871629568j))*x_ref[1]**o + ((0.628687675542+0.518928937424j))*x_ref[1]
        arg[(1, 3, 3, 2)]=(0.480759870407+0.822617181066j)*x[0]**o + ((-0.68360220233-0.291788372121j))*x[0] + ((-0.753914338367-0.959193162261j))*x[1]**o + ((0.735998136701-0.978407661108j))*x[1]
        ref[(1, 3, 3, 2)]=(0.480759870407+0.822617181066j)*x_ref[0]**o + ((-0.68360220233-0.291788372121j))*x_ref[0] + ((-0.753914338367-0.959193162261j))*x_ref[1]**o + ((0.735998136701-0.978407661108j))*x_ref[1]
        arg[(1, 3, 3, 3)]=(0.701972663906+0.865439197535j)*x[0]**o + ((-0.0837276317284+0.0901095391097j))*x[0] + ((-0.687725415642+0.083869586343j))*x[1]**o + ((-0.209370428112+0.289339935837j))*x[1]
        ref[(1, 3, 3, 3)]=(0.701972663906+0.865439197535j)*x_ref[0]**o + ((-0.0837276317284+0.0901095391097j))*x_ref[0] + ((-0.687725415642+0.083869586343j))*x_ref[1]**o + ((-0.209370428112+0.289339935837j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.754845904565-0.286763006425j)*x[2]**o + ((-0.817439243072-0.593490234973j))*x[2]
            ref[(0, 0, 0, 0)]+=(0.754845904565-0.286763006425j)*x_ref[2]**o + ((-0.817439243072-0.593490234973j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.715070910949-0.507899763972j)*x[2]**o + ((0.073152561804+0.177132187953j))*x[2]
            ref[(0, 0, 0, 1)]+=(-0.715070910949-0.507899763972j)*x_ref[2]**o + ((0.073152561804+0.177132187953j))*x_ref[2]
            arg[(0, 0, 0, 2)]+=(-0.224168931733+0.384266388835j)*x[2]**o + ((-0.910516252869-0.41498688029j))*x[2]
            ref[(0, 0, 0, 2)]+=(-0.224168931733+0.384266388835j)*x_ref[2]**o + ((-0.910516252869-0.41498688029j))*x_ref[2]
            arg[(0, 0, 0, 3)]+=(0.252178535514-0.852058232687j)*x[2]**o + ((0.934186379411+0.557163760493j))*x[2]
            ref[(0, 0, 0, 3)]+=(0.252178535514-0.852058232687j)*x_ref[2]**o + ((0.934186379411+0.557163760493j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.250003981637+0.27530482107j)*x[2]**o + ((-0.383839828307+0.195817232414j))*x[2]
            ref[(0, 0, 1, 0)]+=(0.250003981637+0.27530482107j)*x_ref[2]**o + ((-0.383839828307+0.195817232414j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.701484081197+0.689864300507j)*x[2]**o + ((-0.546012326225+0.80335613718j))*x[2]
            ref[(0, 0, 1, 1)]+=(0.701484081197+0.689864300507j)*x_ref[2]**o + ((-0.546012326225+0.80335613718j))*x_ref[2]
            arg[(0, 0, 1, 2)]+=(0.112585985688+0.752839502189j)*x[2]**o + ((-0.352394872214-0.256847698483j))*x[2]
            ref[(0, 0, 1, 2)]+=(0.112585985688+0.752839502189j)*x_ref[2]**o + ((-0.352394872214-0.256847698483j))*x_ref[2]
            arg[(0, 0, 1, 3)]+=(0.382656968901-0.36545758097j)*x[2]**o + ((-0.694479803718-0.749744007413j))*x[2]
            ref[(0, 0, 1, 3)]+=(0.382656968901-0.36545758097j)*x_ref[2]**o + ((-0.694479803718-0.749744007413j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(-0.674978445183-0.203524352118j)*x[2]**o + ((0.665439099242-0.874216281907j))*x[2]
            ref[(0, 0, 2, 0)]+=(-0.674978445183-0.203524352118j)*x_ref[2]**o + ((0.665439099242-0.874216281907j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(-0.430929786274+0.608210974792j)*x[2]**o + ((0.646868502014-0.503801866086j))*x[2]
            ref[(0, 0, 2, 1)]+=(-0.430929786274+0.608210974792j)*x_ref[2]**o + ((0.646868502014-0.503801866086j))*x_ref[2]
            arg[(0, 0, 2, 2)]+=(-0.905287514211+0.23006061311j)*x[2]**o + ((0.963592403203+0.340245818635j))*x[2]
            ref[(0, 0, 2, 2)]+=(-0.905287514211+0.23006061311j)*x_ref[2]**o + ((0.963592403203+0.340245818635j))*x_ref[2]
            arg[(0, 0, 2, 3)]+=(-0.682597938206-0.837092305207j)*x[2]**o + ((-0.859983478681+0.449791493501j))*x[2]
            ref[(0, 0, 2, 3)]+=(-0.682597938206-0.837092305207j)*x_ref[2]**o + ((-0.859983478681+0.449791493501j))*x_ref[2]
            arg[(0, 0, 3, 0)]+=(0.191368867642-0.695335458504j)*x[2]**o + ((-0.707544758083-0.927725218913j))*x[2]
            ref[(0, 0, 3, 0)]+=(0.191368867642-0.695335458504j)*x_ref[2]**o + ((-0.707544758083-0.927725218913j))*x_ref[2]
            arg[(0, 0, 3, 1)]+=(0.0874302164253+0.786725954336j)*x[2]**o + ((-0.788242046458+0.207067830665j))*x[2]
            ref[(0, 0, 3, 1)]+=(0.0874302164253+0.786725954336j)*x_ref[2]**o + ((-0.788242046458+0.207067830665j))*x_ref[2]
            arg[(0, 0, 3, 2)]+=(0.39045539158-0.107678052334j)*x[2]**o + ((-0.130555556857-0.491697486722j))*x[2]
            ref[(0, 0, 3, 2)]+=(0.39045539158-0.107678052334j)*x_ref[2]**o + ((-0.130555556857-0.491697486722j))*x_ref[2]
            arg[(0, 0, 3, 3)]+=(0.0992866553659+0.391294237622j)*x[2]**o + ((-0.647672002287-0.529020345228j))*x[2]
            ref[(0, 0, 3, 3)]+=(0.0992866553659+0.391294237622j)*x_ref[2]**o + ((-0.647672002287-0.529020345228j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.0832473543081+0.502982843346j)*x[2]**o + ((0.0512907701357+0.586452024604j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.0832473543081+0.502982843346j)*x_ref[2]**o + ((0.0512907701357+0.586452024604j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.84063821294+0.199406478971j)*x[2]**o + ((0.544196530748-0.806492343495j))*x[2]
            ref[(0, 1, 0, 1)]+=(0.84063821294+0.199406478971j)*x_ref[2]**o + ((0.544196530748-0.806492343495j))*x_ref[2]
            arg[(0, 1, 0, 2)]+=(-0.113197353115-0.908777251977j)*x[2]**o + ((0.314542061277-0.539765971119j))*x[2]
            ref[(0, 1, 0, 2)]+=(-0.113197353115-0.908777251977j)*x_ref[2]**o + ((0.314542061277-0.539765971119j))*x_ref[2]
            arg[(0, 1, 0, 3)]+=(0.151994909952-0.208851816961j)*x[2]**o + ((0.407689721931-0.00460546622756j))*x[2]
            ref[(0, 1, 0, 3)]+=(0.151994909952-0.208851816961j)*x_ref[2]**o + ((0.407689721931-0.00460546622756j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.191444710557-0.0500335377167j)*x[2]**o + ((-0.0377057643462+0.415425167786j))*x[2]
            ref[(0, 1, 1, 0)]+=(0.191444710557-0.0500335377167j)*x_ref[2]**o + ((-0.0377057643462+0.415425167786j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.13156251014+0.711622216899j)*x[2]**o + ((0.256523755611+0.207339278251j))*x[2]
            ref[(0, 1, 1, 1)]+=(0.13156251014+0.711622216899j)*x_ref[2]**o + ((0.256523755611+0.207339278251j))*x_ref[2]
            arg[(0, 1, 1, 2)]+=(0.00949295147092-0.31035033943j)*x[2]**o + ((0.224066578039+0.789274543947j))*x[2]
            ref[(0, 1, 1, 2)]+=(0.00949295147092-0.31035033943j)*x_ref[2]**o + ((0.224066578039+0.789274543947j))*x_ref[2]
            arg[(0, 1, 1, 3)]+=(-0.556358634084-0.890508556335j)*x[2]**o + ((0.769610564495+0.36320370974j))*x[2]
            ref[(0, 1, 1, 3)]+=(-0.556358634084-0.890508556335j)*x_ref[2]**o + ((0.769610564495+0.36320370974j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(-0.769276819063-0.99047640971j)*x[2]**o + ((0.225339913138-0.577977135454j))*x[2]
            ref[(0, 1, 2, 0)]+=(-0.769276819063-0.99047640971j)*x_ref[2]**o + ((0.225339913138-0.577977135454j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(0.408416559325-0.632908787538j)*x[2]**o + ((-0.418817034479+0.363243085064j))*x[2]
            ref[(0, 1, 2, 1)]+=(0.408416559325-0.632908787538j)*x_ref[2]**o + ((-0.418817034479+0.363243085064j))*x_ref[2]
            arg[(0, 1, 2, 2)]+=(-0.985571423046-0.771079898062j)*x[2]**o + ((-0.340693161843-0.325781618876j))*x[2]
            ref[(0, 1, 2, 2)]+=(-0.985571423046-0.771079898062j)*x_ref[2]**o + ((-0.340693161843-0.325781618876j))*x_ref[2]
            arg[(0, 1, 2, 3)]+=(0.187051711767-0.0412130952811j)*x[2]**o + ((0.0422108245105+0.914831860734j))*x[2]
            ref[(0, 1, 2, 3)]+=(0.187051711767-0.0412130952811j)*x_ref[2]**o + ((0.0422108245105+0.914831860734j))*x_ref[2]
            arg[(0, 1, 3, 0)]+=(-0.642286886933-0.347591920402j)*x[2]**o + ((-0.696531251398-0.968134781436j))*x[2]
            ref[(0, 1, 3, 0)]+=(-0.642286886933-0.347591920402j)*x_ref[2]**o + ((-0.696531251398-0.968134781436j))*x_ref[2]
            arg[(0, 1, 3, 1)]+=(0.125779137053+0.263361861079j)*x[2]**o + ((-0.53237656498-0.246578939232j))*x[2]
            ref[(0, 1, 3, 1)]+=(0.125779137053+0.263361861079j)*x_ref[2]**o + ((-0.53237656498-0.246578939232j))*x_ref[2]
            arg[(0, 1, 3, 2)]+=(-0.369696764895-0.546785250875j)*x[2]**o + ((0.179621503829+0.36373398123j))*x[2]
            ref[(0, 1, 3, 2)]+=(-0.369696764895-0.546785250875j)*x_ref[2]**o + ((0.179621503829+0.36373398123j))*x_ref[2]
            arg[(0, 1, 3, 3)]+=(-0.18321731425+0.951395538949j)*x[2]**o + ((0.0116979285485-0.0881123727142j))*x[2]
            ref[(0, 1, 3, 3)]+=(-0.18321731425+0.951395538949j)*x_ref[2]**o + ((0.0116979285485-0.0881123727142j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(-0.829454550863-0.139325698418j)*x[2]**o + ((-0.284477535583-0.582350381372j))*x[2]
            ref[(0, 2, 0, 0)]+=(-0.829454550863-0.139325698418j)*x_ref[2]**o + ((-0.284477535583-0.582350381372j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(0.666833211873+0.884656497548j)*x[2]**o + ((0.112378791435+0.377288311829j))*x[2]
            ref[(0, 2, 0, 1)]+=(0.666833211873+0.884656497548j)*x_ref[2]**o + ((0.112378791435+0.377288311829j))*x_ref[2]
            arg[(0, 2, 0, 2)]+=(-0.830603459507-0.718570790952j)*x[2]**o + ((0.864810749258+0.90698105152j))*x[2]
            ref[(0, 2, 0, 2)]+=(-0.830603459507-0.718570790952j)*x_ref[2]**o + ((0.864810749258+0.90698105152j))*x_ref[2]
            arg[(0, 2, 0, 3)]+=(0.695137011084-0.09229210595j)*x[2]**o + ((0.00674442977345+0.576111150679j))*x[2]
            ref[(0, 2, 0, 3)]+=(0.695137011084-0.09229210595j)*x_ref[2]**o + ((0.00674442977345+0.576111150679j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.333770391547-0.826071931286j)*x[2]**o + ((0.698318738838+0.162803091294j))*x[2]
            ref[(0, 2, 1, 0)]+=(-0.333770391547-0.826071931286j)*x_ref[2]**o + ((0.698318738838+0.162803091294j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(0.527390953994+0.346671112277j)*x[2]**o + ((-0.811298850591-0.973632378943j))*x[2]
            ref[(0, 2, 1, 1)]+=(0.527390953994+0.346671112277j)*x_ref[2]**o + ((-0.811298850591-0.973632378943j))*x_ref[2]
            arg[(0, 2, 1, 2)]+=(-0.712357744655+0.249213316761j)*x[2]**o + ((0.769439063351+0.787974085343j))*x[2]
            ref[(0, 2, 1, 2)]+=(-0.712357744655+0.249213316761j)*x_ref[2]**o + ((0.769439063351+0.787974085343j))*x_ref[2]
            arg[(0, 2, 1, 3)]+=(-0.512906448174+0.074174823151j)*x[2]**o + ((-0.725414995906-0.431098012495j))*x[2]
            ref[(0, 2, 1, 3)]+=(-0.512906448174+0.074174823151j)*x_ref[2]**o + ((-0.725414995906-0.431098012495j))*x_ref[2]
            arg[(0, 2, 2, 0)]+=(-0.144100049392+0.766676122403j)*x[2]**o + ((-0.310203656788+0.701976437793j))*x[2]
            ref[(0, 2, 2, 0)]+=(-0.144100049392+0.766676122403j)*x_ref[2]**o + ((-0.310203656788+0.701976437793j))*x_ref[2]
            arg[(0, 2, 2, 1)]+=(-0.0382593290514-0.0962672522636j)*x[2]**o + ((0.497389665432-0.0481637872865j))*x[2]
            ref[(0, 2, 2, 1)]+=(-0.0382593290514-0.0962672522636j)*x_ref[2]**o + ((0.497389665432-0.0481637872865j))*x_ref[2]
            arg[(0, 2, 2, 2)]+=(-0.555437663061-0.154034818892j)*x[2]**o + ((0.79293508669+0.769496507781j))*x[2]
            ref[(0, 2, 2, 2)]+=(-0.555437663061-0.154034818892j)*x_ref[2]**o + ((0.79293508669+0.769496507781j))*x_ref[2]
            arg[(0, 2, 2, 3)]+=(-0.550717700906-0.638733496105j)*x[2]**o + ((0.797791310826+0.0440196066382j))*x[2]
            ref[(0, 2, 2, 3)]+=(-0.550717700906-0.638733496105j)*x_ref[2]**o + ((0.797791310826+0.0440196066382j))*x_ref[2]
            arg[(0, 2, 3, 0)]+=(0.656366043016+0.497639017365j)*x[2]**o + ((-0.460292222897-0.499222090117j))*x[2]
            ref[(0, 2, 3, 0)]+=(0.656366043016+0.497639017365j)*x_ref[2]**o + ((-0.460292222897-0.499222090117j))*x_ref[2]
            arg[(0, 2, 3, 1)]+=(-0.979360381761+0.676687694672j)*x[2]**o + ((0.251269312378+0.616801191758j))*x[2]
            ref[(0, 2, 3, 1)]+=(-0.979360381761+0.676687694672j)*x_ref[2]**o + ((0.251269312378+0.616801191758j))*x_ref[2]
            arg[(0, 2, 3, 2)]+=(0.0214931680705-0.830284937778j)*x[2]**o + ((-0.821563527777+0.906502983899j))*x[2]
            ref[(0, 2, 3, 2)]+=(0.0214931680705-0.830284937778j)*x_ref[2]**o + ((-0.821563527777+0.906502983899j))*x_ref[2]
            arg[(0, 2, 3, 3)]+=(-0.3760957618-0.787616063639j)*x[2]**o + ((0.152968615556-0.0849556952838j))*x[2]
            ref[(0, 2, 3, 3)]+=(-0.3760957618-0.787616063639j)*x_ref[2]**o + ((0.152968615556-0.0849556952838j))*x_ref[2]
            arg[(0, 3, 0, 0)]+=(-0.565130045163-0.605877066318j)*x[2]**o + ((-0.546073831838-0.605127994511j))*x[2]
            ref[(0, 3, 0, 0)]+=(-0.565130045163-0.605877066318j)*x_ref[2]**o + ((-0.546073831838-0.605127994511j))*x_ref[2]
            arg[(0, 3, 0, 1)]+=(-0.504301861314-0.997706536224j)*x[2]**o + ((0.00317743597253-0.392455052149j))*x[2]
            ref[(0, 3, 0, 1)]+=(-0.504301861314-0.997706536224j)*x_ref[2]**o + ((0.00317743597253-0.392455052149j))*x_ref[2]
            arg[(0, 3, 0, 2)]+=(-0.475221045656+0.0742978541144j)*x[2]**o + ((-0.84011822165+0.715710906199j))*x[2]
            ref[(0, 3, 0, 2)]+=(-0.475221045656+0.0742978541144j)*x_ref[2]**o + ((-0.84011822165+0.715710906199j))*x_ref[2]
            arg[(0, 3, 0, 3)]+=(0.339871708081-0.721766099714j)*x[2]**o + ((0.659134800497-0.235258075476j))*x[2]
            ref[(0, 3, 0, 3)]+=(0.339871708081-0.721766099714j)*x_ref[2]**o + ((0.659134800497-0.235258075476j))*x_ref[2]
            arg[(0, 3, 1, 0)]+=(0.0254302642562-0.130465408963j)*x[2]**o + ((-0.0803822240782+0.0885575806158j))*x[2]
            ref[(0, 3, 1, 0)]+=(0.0254302642562-0.130465408963j)*x_ref[2]**o + ((-0.0803822240782+0.0885575806158j))*x_ref[2]
            arg[(0, 3, 1, 1)]+=(0.547532019885+0.629103041441j)*x[2]**o + ((-0.909868223656-0.687712320466j))*x[2]
            ref[(0, 3, 1, 1)]+=(0.547532019885+0.629103041441j)*x_ref[2]**o + ((-0.909868223656-0.687712320466j))*x_ref[2]
            arg[(0, 3, 1, 2)]+=(-0.993571875982-0.0454899904595j)*x[2]**o + ((0.753163983179+0.00179113585861j))*x[2]
            ref[(0, 3, 1, 2)]+=(-0.993571875982-0.0454899904595j)*x_ref[2]**o + ((0.753163983179+0.00179113585861j))*x_ref[2]
            arg[(0, 3, 1, 3)]+=(-0.741266648814+0.164620456363j)*x[2]**o + ((0.38401920857+0.369794750167j))*x[2]
            ref[(0, 3, 1, 3)]+=(-0.741266648814+0.164620456363j)*x_ref[2]**o + ((0.38401920857+0.369794750167j))*x_ref[2]
            arg[(0, 3, 2, 0)]+=(0.793935899947-0.602246965509j)*x[2]**o + ((0.134885156222-0.181881073961j))*x[2]
            ref[(0, 3, 2, 0)]+=(0.793935899947-0.602246965509j)*x_ref[2]**o + ((0.134885156222-0.181881073961j))*x_ref[2]
            arg[(0, 3, 2, 1)]+=(-0.7654416538-0.565760239149j)*x[2]**o + ((-0.184751707192+0.537625147581j))*x[2]
            ref[(0, 3, 2, 1)]+=(-0.7654416538-0.565760239149j)*x_ref[2]**o + ((-0.184751707192+0.537625147581j))*x_ref[2]
            arg[(0, 3, 2, 2)]+=(0.568157639969-0.181347754491j)*x[2]**o + ((0.61559052892-0.622292777032j))*x[2]
            ref[(0, 3, 2, 2)]+=(0.568157639969-0.181347754491j)*x_ref[2]**o + ((0.61559052892-0.622292777032j))*x_ref[2]
            arg[(0, 3, 2, 3)]+=(-0.783963255062+0.571356500945j)*x[2]**o + ((-0.654490937519+0.0967766395878j))*x[2]
            ref[(0, 3, 2, 3)]+=(-0.783963255062+0.571356500945j)*x_ref[2]**o + ((-0.654490937519+0.0967766395878j))*x_ref[2]
            arg[(0, 3, 3, 0)]+=(-0.519268073247-0.78251863465j)*x[2]**o + ((-0.394723108529-0.0719579133039j))*x[2]
            ref[(0, 3, 3, 0)]+=(-0.519268073247-0.78251863465j)*x_ref[2]**o + ((-0.394723108529-0.0719579133039j))*x_ref[2]
            arg[(0, 3, 3, 1)]+=(0.909775054396+0.250018471525j)*x[2]**o + ((-0.714122700051-0.651260462054j))*x[2]
            ref[(0, 3, 3, 1)]+=(0.909775054396+0.250018471525j)*x_ref[2]**o + ((-0.714122700051-0.651260462054j))*x_ref[2]
            arg[(0, 3, 3, 2)]+=(-0.838245612363-0.0215875956263j)*x[2]**o + ((-0.931033378501+0.658339360075j))*x[2]
            ref[(0, 3, 3, 2)]+=(-0.838245612363-0.0215875956263j)*x_ref[2]**o + ((-0.931033378501+0.658339360075j))*x_ref[2]
            arg[(0, 3, 3, 3)]+=(0.684343512333+0.311815513658j)*x[2]**o + ((-0.432199667071+0.556741655408j))*x[2]
            ref[(0, 3, 3, 3)]+=(0.684343512333+0.311815513658j)*x_ref[2]**o + ((-0.432199667071+0.556741655408j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.730218067886+0.830479807496j)*x[2]**o + ((-0.929928372638-0.687536505047j))*x[2]
            ref[(1, 0, 0, 0)]+=(0.730218067886+0.830479807496j)*x_ref[2]**o + ((-0.929928372638-0.687536505047j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(-0.923150108192+0.202388302175j)*x[2]**o + ((-0.448984676722-0.618679247251j))*x[2]
            ref[(1, 0, 0, 1)]+=(-0.923150108192+0.202388302175j)*x_ref[2]**o + ((-0.448984676722-0.618679247251j))*x_ref[2]
            arg[(1, 0, 0, 2)]+=(0.923783693877+0.291169120591j)*x[2]**o + ((-0.170129611149+0.562930300211j))*x[2]
            ref[(1, 0, 0, 2)]+=(0.923783693877+0.291169120591j)*x_ref[2]**o + ((-0.170129611149+0.562930300211j))*x_ref[2]
            arg[(1, 0, 0, 3)]+=(-0.184220455762+0.239070786824j)*x[2]**o + ((0.024250850011+0.825598971697j))*x[2]
            ref[(1, 0, 0, 3)]+=(-0.184220455762+0.239070786824j)*x_ref[2]**o + ((0.024250850011+0.825598971697j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.537161272184-0.877547732469j)*x[2]**o + ((-0.0829381323002-0.276780204709j))*x[2]
            ref[(1, 0, 1, 0)]+=(0.537161272184-0.877547732469j)*x_ref[2]**o + ((-0.0829381323002-0.276780204709j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.854283890535-0.965893717473j)*x[2]**o + ((-0.660221061105-0.484926157031j))*x[2]
            ref[(1, 0, 1, 1)]+=(-0.854283890535-0.965893717473j)*x_ref[2]**o + ((-0.660221061105-0.484926157031j))*x_ref[2]
            arg[(1, 0, 1, 2)]+=(-0.522250999611-0.754149173053j)*x[2]**o + ((-0.787962979875-0.0679946910568j))*x[2]
            ref[(1, 0, 1, 2)]+=(-0.522250999611-0.754149173053j)*x_ref[2]**o + ((-0.787962979875-0.0679946910568j))*x_ref[2]
            arg[(1, 0, 1, 3)]+=(0.99494569732+0.184924480816j)*x[2]**o + ((0.280730343577-0.829056803363j))*x[2]
            ref[(1, 0, 1, 3)]+=(0.99494569732+0.184924480816j)*x_ref[2]**o + ((0.280730343577-0.829056803363j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(0.862895145678+0.407844221858j)*x[2]**o + ((-0.846021798556-0.486080989408j))*x[2]
            ref[(1, 0, 2, 0)]+=(0.862895145678+0.407844221858j)*x_ref[2]**o + ((-0.846021798556-0.486080989408j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(0.912040794248+0.56021640585j)*x[2]**o + ((0.0211065075864+0.893098419593j))*x[2]
            ref[(1, 0, 2, 1)]+=(0.912040794248+0.56021640585j)*x_ref[2]**o + ((0.0211065075864+0.893098419593j))*x_ref[2]
            arg[(1, 0, 2, 2)]+=(-0.852534505772+0.262666496231j)*x[2]**o + ((0.980734879841-0.614248197329j))*x[2]
            ref[(1, 0, 2, 2)]+=(-0.852534505772+0.262666496231j)*x_ref[2]**o + ((0.980734879841-0.614248197329j))*x_ref[2]
            arg[(1, 0, 2, 3)]+=(-0.31057476586+0.970459838708j)*x[2]**o + ((0.0343387066057+0.751442701665j))*x[2]
            ref[(1, 0, 2, 3)]+=(-0.31057476586+0.970459838708j)*x_ref[2]**o + ((0.0343387066057+0.751442701665j))*x_ref[2]
            arg[(1, 0, 3, 0)]+=(0.703234864444-0.557425132055j)*x[2]**o + ((-0.940132321653-0.722350580517j))*x[2]
            ref[(1, 0, 3, 0)]+=(0.703234864444-0.557425132055j)*x_ref[2]**o + ((-0.940132321653-0.722350580517j))*x_ref[2]
            arg[(1, 0, 3, 1)]+=(0.454362392274-0.181405037564j)*x[2]**o + ((-0.792198682329+0.97648829442j))*x[2]
            ref[(1, 0, 3, 1)]+=(0.454362392274-0.181405037564j)*x_ref[2]**o + ((-0.792198682329+0.97648829442j))*x_ref[2]
            arg[(1, 0, 3, 2)]+=(0.699127964177+0.536428530224j)*x[2]**o + ((-0.221178853+0.415446177531j))*x[2]
            ref[(1, 0, 3, 2)]+=(0.699127964177+0.536428530224j)*x_ref[2]**o + ((-0.221178853+0.415446177531j))*x_ref[2]
            arg[(1, 0, 3, 3)]+=(0.320020837108-0.0196174715119j)*x[2]**o + ((0.627519839384-0.056717565022j))*x[2]
            ref[(1, 0, 3, 3)]+=(0.320020837108-0.0196174715119j)*x_ref[2]**o + ((0.627519839384-0.056717565022j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.129467952353+0.864945269728j)*x[2]**o + ((-0.231526430009+0.899467676845j))*x[2]
            ref[(1, 1, 0, 0)]+=(-0.129467952353+0.864945269728j)*x_ref[2]**o + ((-0.231526430009+0.899467676845j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.386850621673-0.709551647079j)*x[2]**o + ((-0.0141466991555-0.678465037645j))*x[2]
            ref[(1, 1, 0, 1)]+=(-0.386850621673-0.709551647079j)*x_ref[2]**o + ((-0.0141466991555-0.678465037645j))*x_ref[2]
            arg[(1, 1, 0, 2)]+=(-0.962856506385-0.162574355631j)*x[2]**o + ((0.880268770538+0.084442769083j))*x[2]
            ref[(1, 1, 0, 2)]+=(-0.962856506385-0.162574355631j)*x_ref[2]**o + ((0.880268770538+0.084442769083j))*x_ref[2]
            arg[(1, 1, 0, 3)]+=(-0.404480471623-0.669582846191j)*x[2]**o + ((-0.319989235477+0.290988052499j))*x[2]
            ref[(1, 1, 0, 3)]+=(-0.404480471623-0.669582846191j)*x_ref[2]**o + ((-0.319989235477+0.290988052499j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.199316739057-0.381502523305j)*x[2]**o + ((-0.161378905862-0.0845149219787j))*x[2]
            ref[(1, 1, 1, 0)]+=(0.199316739057-0.381502523305j)*x_ref[2]**o + ((-0.161378905862-0.0845149219787j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.496583163226+0.26504727783j)*x[2]**o + ((-0.919714360231+0.477766537254j))*x[2]
            ref[(1, 1, 1, 1)]+=(0.496583163226+0.26504727783j)*x_ref[2]**o + ((-0.919714360231+0.477766537254j))*x_ref[2]
            arg[(1, 1, 1, 2)]+=(0.0677692395185+0.748205792484j)*x[2]**o + ((-0.432524030682-0.18003747549j))*x[2]
            ref[(1, 1, 1, 2)]+=(0.0677692395185+0.748205792484j)*x_ref[2]**o + ((-0.432524030682-0.18003747549j))*x_ref[2]
            arg[(1, 1, 1, 3)]+=(-0.0808805436519+0.798497996691j)*x[2]**o + ((-0.18226509572-0.538734372217j))*x[2]
            ref[(1, 1, 1, 3)]+=(-0.0808805436519+0.798497996691j)*x_ref[2]**o + ((-0.18226509572-0.538734372217j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(-0.750525931906-0.609923932611j)*x[2]**o + ((0.727817215626-0.302478421633j))*x[2]
            ref[(1, 1, 2, 0)]+=(-0.750525931906-0.609923932611j)*x_ref[2]**o + ((0.727817215626-0.302478421633j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(0.600324494374+0.0129490806082j)*x[2]**o + ((0.265174630624+0.0827145827363j))*x[2]
            ref[(1, 1, 2, 1)]+=(0.600324494374+0.0129490806082j)*x_ref[2]**o + ((0.265174630624+0.0827145827363j))*x_ref[2]
            arg[(1, 1, 2, 2)]+=(-0.915142055491-0.465839750945j)*x[2]**o + ((-0.0287573700542+0.994669742482j))*x[2]
            ref[(1, 1, 2, 2)]+=(-0.915142055491-0.465839750945j)*x_ref[2]**o + ((-0.0287573700542+0.994669742482j))*x_ref[2]
            arg[(1, 1, 2, 3)]+=(-0.0119392594554+0.717622545694j)*x[2]**o + ((0.206902688479+0.0400803944676j))*x[2]
            ref[(1, 1, 2, 3)]+=(-0.0119392594554+0.717622545694j)*x_ref[2]**o + ((0.206902688479+0.0400803944676j))*x_ref[2]
            arg[(1, 1, 3, 0)]+=(0.233907457941+0.627058793667j)*x[2]**o + ((0.0384633940096+0.456168828069j))*x[2]
            ref[(1, 1, 3, 0)]+=(0.233907457941+0.627058793667j)*x_ref[2]**o + ((0.0384633940096+0.456168828069j))*x_ref[2]
            arg[(1, 1, 3, 1)]+=(0.22800151598+0.561352299674j)*x[2]**o + ((0.357735074908+0.480448232985j))*x[2]
            ref[(1, 1, 3, 1)]+=(0.22800151598+0.561352299674j)*x_ref[2]**o + ((0.357735074908+0.480448232985j))*x_ref[2]
            arg[(1, 1, 3, 2)]+=(0.959347039461-0.0594925545165j)*x[2]**o + ((0.0997051302998+0.326197527602j))*x[2]
            ref[(1, 1, 3, 2)]+=(0.959347039461-0.0594925545165j)*x_ref[2]**o + ((0.0997051302998+0.326197527602j))*x_ref[2]
            arg[(1, 1, 3, 3)]+=(0.498007112555-0.166345012247j)*x[2]**o + ((0.387118754292-0.164469830265j))*x[2]
            ref[(1, 1, 3, 3)]+=(0.498007112555-0.166345012247j)*x_ref[2]**o + ((0.387118754292-0.164469830265j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.454767394442+0.00029852512105j)*x[2]**o + ((0.26962503556-0.216139935516j))*x[2]
            ref[(1, 2, 0, 0)]+=(0.454767394442+0.00029852512105j)*x_ref[2]**o + ((0.26962503556-0.216139935516j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(-0.811147339755+0.340079921807j)*x[2]**o + ((-0.701875392733+0.820405288381j))*x[2]
            ref[(1, 2, 0, 1)]+=(-0.811147339755+0.340079921807j)*x_ref[2]**o + ((-0.701875392733+0.820405288381j))*x_ref[2]
            arg[(1, 2, 0, 2)]+=(0.63602066368-0.796707914802j)*x[2]**o + ((0.327130757985-0.572874121105j))*x[2]
            ref[(1, 2, 0, 2)]+=(0.63602066368-0.796707914802j)*x_ref[2]**o + ((0.327130757985-0.572874121105j))*x_ref[2]
            arg[(1, 2, 0, 3)]+=(-0.181554140042-0.836269222068j)*x[2]**o + ((0.899775594701+0.0282832789009j))*x[2]
            ref[(1, 2, 0, 3)]+=(-0.181554140042-0.836269222068j)*x_ref[2]**o + ((0.899775594701+0.0282832789009j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(-0.97006959284+0.583064119289j)*x[2]**o + ((-0.475276646877-0.925193840409j))*x[2]
            ref[(1, 2, 1, 0)]+=(-0.97006959284+0.583064119289j)*x_ref[2]**o + ((-0.475276646877-0.925193840409j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(-0.760939885093-0.672280807675j)*x[2]**o + ((0.434130454906-0.692848578495j))*x[2]
            ref[(1, 2, 1, 1)]+=(-0.760939885093-0.672280807675j)*x_ref[2]**o + ((0.434130454906-0.692848578495j))*x_ref[2]
            arg[(1, 2, 1, 2)]+=(-0.126943513233+0.274642050551j)*x[2]**o + ((0.374109367509-0.171820267566j))*x[2]
            ref[(1, 2, 1, 2)]+=(-0.126943513233+0.274642050551j)*x_ref[2]**o + ((0.374109367509-0.171820267566j))*x_ref[2]
            arg[(1, 2, 1, 3)]+=(-0.224397955064-0.596543703972j)*x[2]**o + ((-0.539883156149-0.454080276214j))*x[2]
            ref[(1, 2, 1, 3)]+=(-0.224397955064-0.596543703972j)*x_ref[2]**o + ((-0.539883156149-0.454080276214j))*x_ref[2]
            arg[(1, 2, 2, 0)]+=(0.195005065147-0.892535923507j)*x[2]**o + ((0.973205140704+0.120425493816j))*x[2]
            ref[(1, 2, 2, 0)]+=(0.195005065147-0.892535923507j)*x_ref[2]**o + ((0.973205140704+0.120425493816j))*x_ref[2]
            arg[(1, 2, 2, 1)]+=(0.759732389548-0.86742747234j)*x[2]**o + ((0.701083019752-0.743526859776j))*x[2]
            ref[(1, 2, 2, 1)]+=(0.759732389548-0.86742747234j)*x_ref[2]**o + ((0.701083019752-0.743526859776j))*x_ref[2]
            arg[(1, 2, 2, 2)]+=(-0.544269688071-0.366941167028j)*x[2]**o + ((-0.77145571558-0.0880903436344j))*x[2]
            ref[(1, 2, 2, 2)]+=(-0.544269688071-0.366941167028j)*x_ref[2]**o + ((-0.77145571558-0.0880903436344j))*x_ref[2]
            arg[(1, 2, 2, 3)]+=(0.921380853287+0.548092321367j)*x[2]**o + ((-0.72370208944-0.0523607851734j))*x[2]
            ref[(1, 2, 2, 3)]+=(0.921380853287+0.548092321367j)*x_ref[2]**o + ((-0.72370208944-0.0523607851734j))*x_ref[2]
            arg[(1, 2, 3, 0)]+=(-0.0324918821502-0.455495768412j)*x[2]**o + ((-0.549214805137+0.828668035858j))*x[2]
            ref[(1, 2, 3, 0)]+=(-0.0324918821502-0.455495768412j)*x_ref[2]**o + ((-0.549214805137+0.828668035858j))*x_ref[2]
            arg[(1, 2, 3, 1)]+=(-0.933224759276-0.915605479484j)*x[2]**o + ((0.284473934005-0.931237320554j))*x[2]
            ref[(1, 2, 3, 1)]+=(-0.933224759276-0.915605479484j)*x_ref[2]**o + ((0.284473934005-0.931237320554j))*x_ref[2]
            arg[(1, 2, 3, 2)]+=(0.364740301255+0.591232967853j)*x[2]**o + ((0.677680200799+0.844336972192j))*x[2]
            ref[(1, 2, 3, 2)]+=(0.364740301255+0.591232967853j)*x_ref[2]**o + ((0.677680200799+0.844336972192j))*x_ref[2]
            arg[(1, 2, 3, 3)]+=(0.0825035761607-0.617142283176j)*x[2]**o + ((-0.586980838886+0.560037400658j))*x[2]
            ref[(1, 2, 3, 3)]+=(0.0825035761607-0.617142283176j)*x_ref[2]**o + ((-0.586980838886+0.560037400658j))*x_ref[2]
            arg[(1, 3, 0, 0)]+=(0.187715814712+0.655954504166j)*x[2]**o + ((-0.145128829891+0.317299087838j))*x[2]
            ref[(1, 3, 0, 0)]+=(0.187715814712+0.655954504166j)*x_ref[2]**o + ((-0.145128829891+0.317299087838j))*x_ref[2]
            arg[(1, 3, 0, 1)]+=(-0.144354299499+0.593384658418j)*x[2]**o + ((0.792117537339+0.895765479697j))*x[2]
            ref[(1, 3, 0, 1)]+=(-0.144354299499+0.593384658418j)*x_ref[2]**o + ((0.792117537339+0.895765479697j))*x_ref[2]
            arg[(1, 3, 0, 2)]+=(-0.00290137235936-0.066596369656j)*x[2]**o + ((-0.639606468857+0.784630928195j))*x[2]
            ref[(1, 3, 0, 2)]+=(-0.00290137235936-0.066596369656j)*x_ref[2]**o + ((-0.639606468857+0.784630928195j))*x_ref[2]
            arg[(1, 3, 0, 3)]+=(-0.145837948387+0.785246121439j)*x[2]**o + ((-0.973697716672-0.322385222879j))*x[2]
            ref[(1, 3, 0, 3)]+=(-0.145837948387+0.785246121439j)*x_ref[2]**o + ((-0.973697716672-0.322385222879j))*x_ref[2]
            arg[(1, 3, 1, 0)]+=(-0.27639780179-0.335061540262j)*x[2]**o + ((0.46283371892-0.366302944513j))*x[2]
            ref[(1, 3, 1, 0)]+=(-0.27639780179-0.335061540262j)*x_ref[2]**o + ((0.46283371892-0.366302944513j))*x_ref[2]
            arg[(1, 3, 1, 1)]+=(-0.90384165531+0.40187580538j)*x[2]**o + ((0.10164968508+0.95170866571j))*x[2]
            ref[(1, 3, 1, 1)]+=(-0.90384165531+0.40187580538j)*x_ref[2]**o + ((0.10164968508+0.95170866571j))*x_ref[2]
            arg[(1, 3, 1, 2)]+=(0.585152422507+0.466804889814j)*x[2]**o + ((-0.74515977447-0.861429056446j))*x[2]
            ref[(1, 3, 1, 2)]+=(0.585152422507+0.466804889814j)*x_ref[2]**o + ((-0.74515977447-0.861429056446j))*x_ref[2]
            arg[(1, 3, 1, 3)]+=(0.922696223146+0.335202043201j)*x[2]**o + ((0.0204813412659+0.192785396111j))*x[2]
            ref[(1, 3, 1, 3)]+=(0.922696223146+0.335202043201j)*x_ref[2]**o + ((0.0204813412659+0.192785396111j))*x_ref[2]
            arg[(1, 3, 2, 0)]+=(-0.938940454978+0.561890329267j)*x[2]**o + ((-0.868140098779-0.262898337812j))*x[2]
            ref[(1, 3, 2, 0)]+=(-0.938940454978+0.561890329267j)*x_ref[2]**o + ((-0.868140098779-0.262898337812j))*x_ref[2]
            arg[(1, 3, 2, 1)]+=(-0.327646514521-0.664543368259j)*x[2]**o + ((0.946668429289+0.480348999374j))*x[2]
            ref[(1, 3, 2, 1)]+=(-0.327646514521-0.664543368259j)*x_ref[2]**o + ((0.946668429289+0.480348999374j))*x_ref[2]
            arg[(1, 3, 2, 2)]+=(-0.440093752878-0.400892214549j)*x[2]**o + ((0.0346225866254+0.241242699576j))*x[2]
            ref[(1, 3, 2, 2)]+=(-0.440093752878-0.400892214549j)*x_ref[2]**o + ((0.0346225866254+0.241242699576j))*x_ref[2]
            arg[(1, 3, 2, 3)]+=(-0.992551661115+0.689491974318j)*x[2]**o + ((0.213746552962+0.465847616372j))*x[2]
            ref[(1, 3, 2, 3)]+=(-0.992551661115+0.689491974318j)*x_ref[2]**o + ((0.213746552962+0.465847616372j))*x_ref[2]
            arg[(1, 3, 3, 0)]+=(-0.706206695789-0.564824475033j)*x[2]**o + ((0.951543402179+0.408068268286j))*x[2]
            ref[(1, 3, 3, 0)]+=(-0.706206695789-0.564824475033j)*x_ref[2]**o + ((0.951543402179+0.408068268286j))*x_ref[2]
            arg[(1, 3, 3, 1)]+=(0.173363833026-0.12723180872j)*x[2]**o + ((-0.536627230061+0.868912583325j))*x[2]
            ref[(1, 3, 3, 1)]+=(0.173363833026-0.12723180872j)*x_ref[2]**o + ((-0.536627230061+0.868912583325j))*x_ref[2]
            arg[(1, 3, 3, 2)]+=(-0.293601919969+0.815737610255j)*x[2]**o + ((-0.518230782334+0.075176353891j))*x[2]
            ref[(1, 3, 3, 2)]+=(-0.293601919969+0.815737610255j)*x_ref[2]**o + ((-0.518230782334+0.075176353891j))*x_ref[2]
            arg[(1, 3, 3, 3)]+=(0.671410846536+0.513847619061j)*x[2]**o + ((-0.654290773216+0.113840970533j))*x[2]
            ref[(1, 3, 3, 3)]+=(0.671410846536+0.513847619061j)*x_ref[2]**o + ((-0.654290773216+0.113840970533j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onSolution_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on Solution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.0261023074615-0.919003204336j)*x[0]**o + ((0.802370854989-0.755457326211j))*x[0] + ((0.0957253973588-0.2319958079j))*x[1]**o + ((-0.345703125405-0.598702463386j))*x[1]
        ref=(0.0261023074615-0.919003204336j)*x_ref[0]**o + ((0.802370854989-0.755457326211j))*x_ref[0] + ((0.0957253973588-0.2319958079j))*x_ref[1]**o + ((-0.345703125405-0.598702463386j))*x_ref[1]
        if dim==3:
            arg+=((-0.224805932502-0.895758262262j))*x[2]**o + ((-0.796480194799+0.0699242748321j))*x[2]
            ref+=((-0.224805932502-0.895758262262j))*x_ref[2]**o + ((-0.796480194799+0.0699242748321j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onSolution_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on Solution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=(0.397459475002+0.947540664232j)*x[0]**o + ((0.640930865263+0.613897960754j))*x[0] + ((0.739366573484-0.187383395827j))*x[1]**o + ((0.481000408949-0.462018281662j))*x[1]
        ref[(0,)]=(0.397459475002+0.947540664232j)*x_ref[0]**o + ((0.640930865263+0.613897960754j))*x_ref[0] + ((0.739366573484-0.187383395827j))*x_ref[1]**o + ((0.481000408949-0.462018281662j))*x_ref[1]
        arg[(1,)]=(0.254419929198-0.81660769659j)*x[0]**o + ((0.838448496798-0.556598599512j))*x[0] + ((-0.684140638542+0.435919828988j))*x[1]**o + ((-0.018577935006+0.282448131131j))*x[1]
        ref[(1,)]=(0.254419929198-0.81660769659j)*x_ref[0]**o + ((0.838448496798-0.556598599512j))*x_ref[0] + ((-0.684140638542+0.435919828988j))*x_ref[1]**o + ((-0.018577935006+0.282448131131j))*x_ref[1]
        arg[(2,)]=(0.406441455987-0.634416959115j)*x[0]**o + ((0.438946338369+0.761431887759j))*x[0] + ((-0.0557972783953-0.432760067149j))*x[1]**o + ((-0.723566288133+0.248457801405j))*x[1]
        ref[(2,)]=(0.406441455987-0.634416959115j)*x_ref[0]**o + ((0.438946338369+0.761431887759j))*x_ref[0] + ((-0.0557972783953-0.432760067149j))*x_ref[1]**o + ((-0.723566288133+0.248457801405j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.215644654414+0.543315843807j)*x[2]**o + ((0.876751912652+0.146095899353j))*x[2]
            ref[(0,)]+=(-0.215644654414+0.543315843807j)*x_ref[2]**o + ((0.876751912652+0.146095899353j))*x_ref[2]
            arg[(1,)]+=(0.423933510948+0.643271379023j)*x[2]**o + ((-0.485126675695+0.28982476403j))*x[2]
            ref[(1,)]+=(0.423933510948+0.643271379023j)*x_ref[2]**o + ((-0.485126675695+0.28982476403j))*x_ref[2]
            arg[(2,)]+=(0.17643643394-0.321318260623j)*x[2]**o + ((0.69895694124-0.567102449648j))*x[2]
            ref[(2,)]+=(0.17643643394-0.321318260623j)*x_ref[2]**o + ((0.69895694124-0.567102449648j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onSolution_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on Solution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2),w)
        ref = Data(0,(4, 2),w_ref)
        arg[(0, 0)]=(-0.0905597600843-0.00201378610292j)*x[0]**o + ((-0.480345093623+0.477565055075j))*x[0] + ((0.701784222541+0.126958982034j))*x[1]**o + ((0.855978843149+0.364616879955j))*x[1]
        ref[(0, 0)]=(-0.0905597600843-0.00201378610292j)*x_ref[0]**o + ((-0.480345093623+0.477565055075j))*x_ref[0] + ((0.701784222541+0.126958982034j))*x_ref[1]**o + ((0.855978843149+0.364616879955j))*x_ref[1]
        arg[(0, 1)]=(0.95580654274+0.480355623145j)*x[0]**o + ((-0.404012959398-0.13920905968j))*x[0] + ((0.897267163981-0.529802355728j))*x[1]**o + ((-0.297281703171-0.543063667404j))*x[1]
        ref[(0, 1)]=(0.95580654274+0.480355623145j)*x_ref[0]**o + ((-0.404012959398-0.13920905968j))*x_ref[0] + ((0.897267163981-0.529802355728j))*x_ref[1]**o + ((-0.297281703171-0.543063667404j))*x_ref[1]
        arg[(1, 0)]=(-0.979456955189+0.737203991832j)*x[0]**o + ((-0.912285592994+0.256624546465j))*x[0] + ((-0.945451173314-0.474662772886j))*x[1]**o + ((0.316412278261+0.906712010131j))*x[1]
        ref[(1, 0)]=(-0.979456955189+0.737203991832j)*x_ref[0]**o + ((-0.912285592994+0.256624546465j))*x_ref[0] + ((-0.945451173314-0.474662772886j))*x_ref[1]**o + ((0.316412278261+0.906712010131j))*x_ref[1]
        arg[(1, 1)]=(0.597439013661-0.60484548827j)*x[0]**o + ((0.106308139612+0.33697537553j))*x[0] + ((-0.671333697558-0.811745804068j))*x[1]**o + ((0.514013107917-0.934675847305j))*x[1]
        ref[(1, 1)]=(0.597439013661-0.60484548827j)*x_ref[0]**o + ((0.106308139612+0.33697537553j))*x_ref[0] + ((-0.671333697558-0.811745804068j))*x_ref[1]**o + ((0.514013107917-0.934675847305j))*x_ref[1]
        arg[(2, 0)]=(0.3769335597+0.130225882034j)*x[0]**o + ((0.417388375534-0.0645821666092j))*x[0] + ((0.0797102424963-0.12495820734j))*x[1]**o + ((0.733189049556+0.457467955656j))*x[1]
        ref[(2, 0)]=(0.3769335597+0.130225882034j)*x_ref[0]**o + ((0.417388375534-0.0645821666092j))*x_ref[0] + ((0.0797102424963-0.12495820734j))*x_ref[1]**o + ((0.733189049556+0.457467955656j))*x_ref[1]
        arg[(2, 1)]=(0.468228935246+0.797700632328j)*x[0]**o + ((0.0211107417529-0.604526091528j))*x[0] + ((0.495341015753-0.307354965909j))*x[1]**o + ((0.127921700215-0.184789591107j))*x[1]
        ref[(2, 1)]=(0.468228935246+0.797700632328j)*x_ref[0]**o + ((0.0211107417529-0.604526091528j))*x_ref[0] + ((0.495341015753-0.307354965909j))*x_ref[1]**o + ((0.127921700215-0.184789591107j))*x_ref[1]
        arg[(3, 0)]=(0.961737534824+0.000200759866342j)*x[0]**o + ((-0.325685212653-0.727959555462j))*x[0] + ((-0.318806931247+0.291416146195j))*x[1]**o + ((0.0464194958124-0.260380549061j))*x[1]
        ref[(3, 0)]=(0.961737534824+0.000200759866342j)*x_ref[0]**o + ((-0.325685212653-0.727959555462j))*x_ref[0] + ((-0.318806931247+0.291416146195j))*x_ref[1]**o + ((0.0464194958124-0.260380549061j))*x_ref[1]
        arg[(3, 1)]=(0.714997000546-0.430621224193j)*x[0]**o + ((-0.791768141518-0.249511376621j))*x[0] + ((-0.186005053902-0.792750144679j))*x[1]**o + ((-0.927934112451-0.240963354821j))*x[1]
        ref[(3, 1)]=(0.714997000546-0.430621224193j)*x_ref[0]**o + ((-0.791768141518-0.249511376621j))*x_ref[0] + ((-0.186005053902-0.792750144679j))*x_ref[1]**o + ((-0.927934112451-0.240963354821j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.957605393435+0.239761985607j)*x[2]**o + ((0.920976519919-0.995814738043j))*x[2]
            ref[(0, 0)]+=(0.957605393435+0.239761985607j)*x_ref[2]**o + ((0.920976519919-0.995814738043j))*x_ref[2]
            arg[(0, 1)]+=(-0.661725123016+0.386388665297j)*x[2]**o + ((-0.3458411328-0.923560220709j))*x[2]
            ref[(0, 1)]+=(-0.661725123016+0.386388665297j)*x_ref[2]**o + ((-0.3458411328-0.923560220709j))*x_ref[2]
            arg[(1, 0)]+=(-0.47135053103-0.395770173391j)*x[2]**o + ((0.358310590104-0.850631083774j))*x[2]
            ref[(1, 0)]+=(-0.47135053103-0.395770173391j)*x_ref[2]**o + ((0.358310590104-0.850631083774j))*x_ref[2]
            arg[(1, 1)]+=(0.955309200547+0.389620185062j)*x[2]**o + ((-0.831510793455+0.628250107008j))*x[2]
            ref[(1, 1)]+=(0.955309200547+0.389620185062j)*x_ref[2]**o + ((-0.831510793455+0.628250107008j))*x_ref[2]
            arg[(2, 0)]+=(0.95409293904+0.803689123445j)*x[2]**o + ((0.419766222721-0.403611875684j))*x[2]
            ref[(2, 0)]+=(0.95409293904+0.803689123445j)*x_ref[2]**o + ((0.419766222721-0.403611875684j))*x_ref[2]
            arg[(2, 1)]+=(0.832174168002+0.651370762857j)*x[2]**o + ((-0.869000735399+0.562870019485j))*x[2]
            ref[(2, 1)]+=(0.832174168002+0.651370762857j)*x_ref[2]**o + ((-0.869000735399+0.562870019485j))*x_ref[2]
            arg[(3, 0)]+=(-0.355621858505-0.388680298593j)*x[2]**o + ((0.488908919255-0.424861536677j))*x[2]
            ref[(3, 0)]+=(-0.355621858505-0.388680298593j)*x_ref[2]**o + ((0.488908919255-0.424861536677j))*x_ref[2]
            arg[(3, 1)]+=(0.852806227139-0.767435976858j)*x[2]**o + ((-0.493258828851+0.610411708933j))*x[2]
            ref[(3, 1)]+=(0.852806227139-0.767435976858j)*x_ref[2]**o + ((-0.493258828851+0.610411708933j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onSolution_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on Solution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 2),w)
        ref = Data(0,(4, 2, 2),w_ref)
        arg[(0, 0, 0)]=(-0.908824010066-0.386446482662j)*x[0]**o + ((0.230956225235-0.2564928675j))*x[0] + ((0.346620067773+0.835712525413j))*x[1]**o + ((-0.651337738305-0.405173222115j))*x[1]
        ref[(0, 0, 0)]=(-0.908824010066-0.386446482662j)*x_ref[0]**o + ((0.230956225235-0.2564928675j))*x_ref[0] + ((0.346620067773+0.835712525413j))*x_ref[1]**o + ((-0.651337738305-0.405173222115j))*x_ref[1]
        arg[(0, 0, 1)]=(0.903841255911+0.353732666127j)*x[0]**o + ((0.415698226144+0.993880364976j))*x[0] + ((-0.990128899389-0.061047368036j))*x[1]**o + ((-0.0935757734301+0.337279187629j))*x[1]
        ref[(0, 0, 1)]=(0.903841255911+0.353732666127j)*x_ref[0]**o + ((0.415698226144+0.993880364976j))*x_ref[0] + ((-0.990128899389-0.061047368036j))*x_ref[1]**o + ((-0.0935757734301+0.337279187629j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.532504623628+0.63486879254j)*x[0]**o + ((0.726024668822-0.403316584057j))*x[0] + ((0.594440659344-0.607674861095j))*x[1]**o + ((0.0491647359353+0.801935115524j))*x[1]
        ref[(0, 1, 0)]=(-0.532504623628+0.63486879254j)*x_ref[0]**o + ((0.726024668822-0.403316584057j))*x_ref[0] + ((0.594440659344-0.607674861095j))*x_ref[1]**o + ((0.0491647359353+0.801935115524j))*x_ref[1]
        arg[(0, 1, 1)]=(0.864290364612-0.392660606487j)*x[0]**o + ((-0.870920217343+0.190880456495j))*x[0] + ((0.735459952523+0.952571140032j))*x[1]**o + ((0.593225794957+0.00722914313464j))*x[1]
        ref[(0, 1, 1)]=(0.864290364612-0.392660606487j)*x_ref[0]**o + ((-0.870920217343+0.190880456495j))*x_ref[0] + ((0.735459952523+0.952571140032j))*x_ref[1]**o + ((0.593225794957+0.00722914313464j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.941458801476-0.566372422443j)*x[0]**o + ((0.620230013742-0.291205847655j))*x[0] + ((-0.0146396154072-0.49044584786j))*x[1]**o + ((0.698215396766-0.109252822117j))*x[1]
        ref[(1, 0, 0)]=(-0.941458801476-0.566372422443j)*x_ref[0]**o + ((0.620230013742-0.291205847655j))*x_ref[0] + ((-0.0146396154072-0.49044584786j))*x_ref[1]**o + ((0.698215396766-0.109252822117j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.357063979443-0.394115919245j)*x[0]**o + ((-0.314255183775-0.985157872616j))*x[0] + ((0.731990276043-0.688709816749j))*x[1]**o + ((0.304757585158+0.972980148306j))*x[1]
        ref[(1, 0, 1)]=(-0.357063979443-0.394115919245j)*x_ref[0]**o + ((-0.314255183775-0.985157872616j))*x_ref[0] + ((0.731990276043-0.688709816749j))*x_ref[1]**o + ((0.304757585158+0.972980148306j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.555135147302+0.049934578802j)*x[0]**o + ((0.548845307242+0.601857245964j))*x[0] + ((0.072477175792+0.597997453714j))*x[1]**o + ((-0.865382231331-0.236509270355j))*x[1]
        ref[(1, 1, 0)]=(-0.555135147302+0.049934578802j)*x_ref[0]**o + ((0.548845307242+0.601857245964j))*x_ref[0] + ((0.072477175792+0.597997453714j))*x_ref[1]**o + ((-0.865382231331-0.236509270355j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.750232047362-0.775914640508j)*x[0]**o + ((0.975841265863+0.200018865532j))*x[0] + ((-0.495044455017+0.245942328349j))*x[1]**o + ((0.338443395449+0.582478871548j))*x[1]
        ref[(1, 1, 1)]=(-0.750232047362-0.775914640508j)*x_ref[0]**o + ((0.975841265863+0.200018865532j))*x_ref[0] + ((-0.495044455017+0.245942328349j))*x_ref[1]**o + ((0.338443395449+0.582478871548j))*x_ref[1]
        arg[(2, 0, 0)]=(-0.2875634367-0.748067084199j)*x[0]**o + ((0.229268272295+0.995473900676j))*x[0] + ((-0.941381218528-0.934522922005j))*x[1]**o + ((-0.683651729282+0.760671877059j))*x[1]
        ref[(2, 0, 0)]=(-0.2875634367-0.748067084199j)*x_ref[0]**o + ((0.229268272295+0.995473900676j))*x_ref[0] + ((-0.941381218528-0.934522922005j))*x_ref[1]**o + ((-0.683651729282+0.760671877059j))*x_ref[1]
        arg[(2, 0, 1)]=(-0.504423561509-0.846356171374j)*x[0]**o + ((0.611215322815+0.525819737363j))*x[0] + ((0.412499474641-0.594955002867j))*x[1]**o + ((0.839891831563-0.228502242395j))*x[1]
        ref[(2, 0, 1)]=(-0.504423561509-0.846356171374j)*x_ref[0]**o + ((0.611215322815+0.525819737363j))*x_ref[0] + ((0.412499474641-0.594955002867j))*x_ref[1]**o + ((0.839891831563-0.228502242395j))*x_ref[1]
        arg[(2, 1, 0)]=(-0.908562099637-0.581531139716j)*x[0]**o + ((0.551542857233+0.99138317603j))*x[0] + ((-0.272703968313+0.578658224564j))*x[1]**o + ((0.625715322211-0.243257997744j))*x[1]
        ref[(2, 1, 0)]=(-0.908562099637-0.581531139716j)*x_ref[0]**o + ((0.551542857233+0.99138317603j))*x_ref[0] + ((-0.272703968313+0.578658224564j))*x_ref[1]**o + ((0.625715322211-0.243257997744j))*x_ref[1]
        arg[(2, 1, 1)]=(0.455326245276+0.546552244463j)*x[0]**o + ((0.164439257304-0.503542395406j))*x[0] + ((0.231588251845+0.0924556690172j))*x[1]**o + ((-0.597566543217-0.228558445381j))*x[1]
        ref[(2, 1, 1)]=(0.455326245276+0.546552244463j)*x_ref[0]**o + ((0.164439257304-0.503542395406j))*x_ref[0] + ((0.231588251845+0.0924556690172j))*x_ref[1]**o + ((-0.597566543217-0.228558445381j))*x_ref[1]
        arg[(3, 0, 0)]=(0.0903279787758-0.29543417702j)*x[0]**o + ((0.196005604688-0.195947284033j))*x[0] + ((-0.43861272057+0.100901377371j))*x[1]**o + ((0.845414242211+0.818175875071j))*x[1]
        ref[(3, 0, 0)]=(0.0903279787758-0.29543417702j)*x_ref[0]**o + ((0.196005604688-0.195947284033j))*x_ref[0] + ((-0.43861272057+0.100901377371j))*x_ref[1]**o + ((0.845414242211+0.818175875071j))*x_ref[1]
        arg[(3, 0, 1)]=(0.376205504894+0.272873895313j)*x[0]**o + ((-0.748797282066+0.704122586088j))*x[0] + ((0.563837147669-0.243306500462j))*x[1]**o + ((-0.27635709201-0.0982415391403j))*x[1]
        ref[(3, 0, 1)]=(0.376205504894+0.272873895313j)*x_ref[0]**o + ((-0.748797282066+0.704122586088j))*x_ref[0] + ((0.563837147669-0.243306500462j))*x_ref[1]**o + ((-0.27635709201-0.0982415391403j))*x_ref[1]
        arg[(3, 1, 0)]=(0.785416762826-0.547909438462j)*x[0]**o + ((-0.383207454859-0.733640075251j))*x[0] + ((0.248860595897-0.802118713567j))*x[1]**o + ((-0.899582219514-0.992991206015j))*x[1]
        ref[(3, 1, 0)]=(0.785416762826-0.547909438462j)*x_ref[0]**o + ((-0.383207454859-0.733640075251j))*x_ref[0] + ((0.248860595897-0.802118713567j))*x_ref[1]**o + ((-0.899582219514-0.992991206015j))*x_ref[1]
        arg[(3, 1, 1)]=(0.993660941913-0.370986331448j)*x[0]**o + ((-0.177772071499-0.952423073543j))*x[0] + ((0.708790616803-0.430529073087j))*x[1]**o + ((0.1001731839+0.519305059616j))*x[1]
        ref[(3, 1, 1)]=(0.993660941913-0.370986331448j)*x_ref[0]**o + ((-0.177772071499-0.952423073543j))*x_ref[0] + ((0.708790616803-0.430529073087j))*x_ref[1]**o + ((0.1001731839+0.519305059616j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.652162339279-0.231749250436j)*x[2]**o + ((0.0805152268086-0.0650829517748j))*x[2]
            ref[(0, 0, 0)]+=(-0.652162339279-0.231749250436j)*x_ref[2]**o + ((0.0805152268086-0.0650829517748j))*x_ref[2]
            arg[(0, 0, 1)]+=(0.0319643905735+0.994260562418j)*x[2]**o + ((0.189859184289+0.246018661929j))*x[2]
            ref[(0, 0, 1)]+=(0.0319643905735+0.994260562418j)*x_ref[2]**o + ((0.189859184289+0.246018661929j))*x_ref[2]
            arg[(0, 1, 0)]+=(0.0858482103709+0.303924481432j)*x[2]**o + ((0.131912499305-0.459354121675j))*x[2]
            ref[(0, 1, 0)]+=(0.0858482103709+0.303924481432j)*x_ref[2]**o + ((0.131912499305-0.459354121675j))*x_ref[2]
            arg[(0, 1, 1)]+=(-0.300656650958-0.720086624307j)*x[2]**o + ((-0.137100192011-0.247334577062j))*x[2]
            ref[(0, 1, 1)]+=(-0.300656650958-0.720086624307j)*x_ref[2]**o + ((-0.137100192011-0.247334577062j))*x_ref[2]
            arg[(1, 0, 0)]+=(0.220270070492-0.89174512919j)*x[2]**o + ((-0.19626702572-0.00638607186612j))*x[2]
            ref[(1, 0, 0)]+=(0.220270070492-0.89174512919j)*x_ref[2]**o + ((-0.19626702572-0.00638607186612j))*x_ref[2]
            arg[(1, 0, 1)]+=(-0.659610483578+0.0713852648007j)*x[2]**o + ((0.542846525437-0.596264034039j))*x[2]
            ref[(1, 0, 1)]+=(-0.659610483578+0.0713852648007j)*x_ref[2]**o + ((0.542846525437-0.596264034039j))*x_ref[2]
            arg[(1, 1, 0)]+=(-0.0311627476475-0.247563176267j)*x[2]**o + ((-0.28706927634-0.973297726509j))*x[2]
            ref[(1, 1, 0)]+=(-0.0311627476475-0.247563176267j)*x_ref[2]**o + ((-0.28706927634-0.973297726509j))*x_ref[2]
            arg[(1, 1, 1)]+=(0.96006306644+0.834964500853j)*x[2]**o + ((-0.763968542022+0.717411824716j))*x[2]
            ref[(1, 1, 1)]+=(0.96006306644+0.834964500853j)*x_ref[2]**o + ((-0.763968542022+0.717411824716j))*x_ref[2]
            arg[(2, 0, 0)]+=(0.662980395963+0.915207656666j)*x[2]**o + ((-0.612201415751+0.110518252377j))*x[2]
            ref[(2, 0, 0)]+=(0.662980395963+0.915207656666j)*x_ref[2]**o + ((-0.612201415751+0.110518252377j))*x_ref[2]
            arg[(2, 0, 1)]+=(-0.7656463824+0.00565421430677j)*x[2]**o + ((0.966221315844-0.587295245816j))*x[2]
            ref[(2, 0, 1)]+=(-0.7656463824+0.00565421430677j)*x_ref[2]**o + ((0.966221315844-0.587295245816j))*x_ref[2]
            arg[(2, 1, 0)]+=(0.248885885608+0.584290039792j)*x[2]**o + ((0.125258920058+0.480179366003j))*x[2]
            ref[(2, 1, 0)]+=(0.248885885608+0.584290039792j)*x_ref[2]**o + ((0.125258920058+0.480179366003j))*x_ref[2]
            arg[(2, 1, 1)]+=(0.23252003245+0.598634920098j)*x[2]**o + ((-0.468954230127+0.673270614861j))*x[2]
            ref[(2, 1, 1)]+=(0.23252003245+0.598634920098j)*x_ref[2]**o + ((-0.468954230127+0.673270614861j))*x_ref[2]
            arg[(3, 0, 0)]+=(-0.699589982716-0.499806327319j)*x[2]**o + ((0.246454327986-0.64752084775j))*x[2]
            ref[(3, 0, 0)]+=(-0.699589982716-0.499806327319j)*x_ref[2]**o + ((0.246454327986-0.64752084775j))*x_ref[2]
            arg[(3, 0, 1)]+=(0.0784856066962+0.27133344706j)*x[2]**o + ((0.40516734346+0.380992877073j))*x[2]
            ref[(3, 0, 1)]+=(0.0784856066962+0.27133344706j)*x_ref[2]**o + ((0.40516734346+0.380992877073j))*x_ref[2]
            arg[(3, 1, 0)]+=(-0.357233166525-0.929771047292j)*x[2]**o + ((0.821190307373+0.338976605377j))*x[2]
            ref[(3, 1, 0)]+=(-0.357233166525-0.929771047292j)*x_ref[2]**o + ((0.821190307373+0.338976605377j))*x_ref[2]
            arg[(3, 1, 1)]+=(-0.0959637168603-0.7861179481j)*x[2]**o + ((-0.250780777142-0.366331553542j))*x[2]
            ref[(3, 1, 1)]+=(-0.0959637168603-0.7861179481j)*x_ref[2]**o + ((-0.250780777142-0.366331553542j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onSolution_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on Solution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 2, 4),w)
        ref = Data(0,(3, 4, 2, 4),w_ref)
        arg[(0, 0, 0, 0)]=(0.285339379183-0.321325217122j)*x[0]**o + ((0.450373747502+0.00805825288939j))*x[0] + ((0.685660592693+0.625790832573j))*x[1]**o + ((-0.513986746436-0.770252211837j))*x[1]
        ref[(0, 0, 0, 0)]=(0.285339379183-0.321325217122j)*x_ref[0]**o + ((0.450373747502+0.00805825288939j))*x_ref[0] + ((0.685660592693+0.625790832573j))*x_ref[1]**o + ((-0.513986746436-0.770252211837j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.313385604377-0.943975959246j)*x[0]**o + ((0.461749980121+0.732529113159j))*x[0] + ((0.458075057742+0.752505940102j))*x[1]**o + ((-0.314295666177+0.973625090493j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.313385604377-0.943975959246j)*x_ref[0]**o + ((0.461749980121+0.732529113159j))*x_ref[0] + ((0.458075057742+0.752505940102j))*x_ref[1]**o + ((-0.314295666177+0.973625090493j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.63939635245+0.895895136735j)*x[0]**o + ((0.646434364248+0.0389155599165j))*x[0] + ((-0.83636545792-0.694236128919j))*x[1]**o + ((0.521179931657+0.783593797937j))*x[1]
        ref[(0, 0, 0, 2)]=(0.63939635245+0.895895136735j)*x_ref[0]**o + ((0.646434364248+0.0389155599165j))*x_ref[0] + ((-0.83636545792-0.694236128919j))*x_ref[1]**o + ((0.521179931657+0.783593797937j))*x_ref[1]
        arg[(0, 0, 0, 3)]=(-0.881162361139+0.943576610362j)*x[0]**o + ((-0.618390587493+0.991557132786j))*x[0] + ((-0.361805448706-0.992115535691j))*x[1]**o + ((0.7905505033-0.881143991736j))*x[1]
        ref[(0, 0, 0, 3)]=(-0.881162361139+0.943576610362j)*x_ref[0]**o + ((-0.618390587493+0.991557132786j))*x_ref[0] + ((-0.361805448706-0.992115535691j))*x_ref[1]**o + ((0.7905505033-0.881143991736j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.761338169861+0.0158614034959j)*x[0]**o + ((-0.431334056582-0.487041634778j))*x[0] + ((0.958288265993-0.589338964778j))*x[1]**o + ((-0.844169790567-0.71086426063j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.761338169861+0.0158614034959j)*x_ref[0]**o + ((-0.431334056582-0.487041634778j))*x_ref[0] + ((0.958288265993-0.589338964778j))*x_ref[1]**o + ((-0.844169790567-0.71086426063j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.182427123709+0.433585341571j)*x[0]**o + ((0.13800122921-0.526023488521j))*x[0] + ((-0.142524945546+0.140571094616j))*x[1]**o + ((-0.74546015024+0.965770684787j))*x[1]
        ref[(0, 0, 1, 1)]=(0.182427123709+0.433585341571j)*x_ref[0]**o + ((0.13800122921-0.526023488521j))*x_ref[0] + ((-0.142524945546+0.140571094616j))*x_ref[1]**o + ((-0.74546015024+0.965770684787j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(0.0483964056652-0.539418096698j)*x[0]**o + ((0.981842649989+0.936075792064j))*x[0] + ((-0.379830574668-0.0339469393501j))*x[1]**o + ((0.181427288436-0.925519854975j))*x[1]
        ref[(0, 0, 1, 2)]=(0.0483964056652-0.539418096698j)*x_ref[0]**o + ((0.981842649989+0.936075792064j))*x_ref[0] + ((-0.379830574668-0.0339469393501j))*x_ref[1]**o + ((0.181427288436-0.925519854975j))*x_ref[1]
        arg[(0, 0, 1, 3)]=(0.407583618924-0.813925647465j)*x[0]**o + ((0.989527744908+0.338064343295j))*x[0] + ((-0.14009259314-0.464243106404j))*x[1]**o + ((0.5096565196-0.927790708442j))*x[1]
        ref[(0, 0, 1, 3)]=(0.407583618924-0.813925647465j)*x_ref[0]**o + ((0.989527744908+0.338064343295j))*x_ref[0] + ((-0.14009259314-0.464243106404j))*x_ref[1]**o + ((0.5096565196-0.927790708442j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(-0.0348854291747+0.735418076058j)*x[0]**o + ((0.306639196877+0.254667256947j))*x[0] + ((0.768590319473-0.582587813633j))*x[1]**o + ((0.693442587654+0.171163609207j))*x[1]
        ref[(0, 1, 0, 0)]=(-0.0348854291747+0.735418076058j)*x_ref[0]**o + ((0.306639196877+0.254667256947j))*x_ref[0] + ((0.768590319473-0.582587813633j))*x_ref[1]**o + ((0.693442587654+0.171163609207j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.517056774909+0.982884336575j)*x[0]**o + ((0.424508012105+0.47513762546j))*x[0] + ((-0.534341113186-0.954997550608j))*x[1]**o + ((0.890510325503-0.661024275173j))*x[1]
        ref[(0, 1, 0, 1)]=(0.517056774909+0.982884336575j)*x_ref[0]**o + ((0.424508012105+0.47513762546j))*x_ref[0] + ((-0.534341113186-0.954997550608j))*x_ref[1]**o + ((0.890510325503-0.661024275173j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(0.342889379049-0.0542984641708j)*x[0]**o + ((-0.00396639724299-0.996324068327j))*x[0] + ((-0.890964907085-0.0916878501895j))*x[1]**o + ((-0.319011097254+0.0621802761192j))*x[1]
        ref[(0, 1, 0, 2)]=(0.342889379049-0.0542984641708j)*x_ref[0]**o + ((-0.00396639724299-0.996324068327j))*x_ref[0] + ((-0.890964907085-0.0916878501895j))*x_ref[1]**o + ((-0.319011097254+0.0621802761192j))*x_ref[1]
        arg[(0, 1, 0, 3)]=(0.53632692902-0.363731272322j)*x[0]**o + ((-0.873091139681+0.654009066883j))*x[0] + ((-0.944346984047+0.806986321527j))*x[1]**o + ((0.956773838026+0.713058556636j))*x[1]
        ref[(0, 1, 0, 3)]=(0.53632692902-0.363731272322j)*x_ref[0]**o + ((-0.873091139681+0.654009066883j))*x_ref[0] + ((-0.944346984047+0.806986321527j))*x_ref[1]**o + ((0.956773838026+0.713058556636j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.225920156291-0.1371084321j)*x[0]**o + ((0.597617625391-0.306650858098j))*x[0] + ((0.50129383876+0.298100371028j))*x[1]**o + ((-0.599678721139-0.41520026353j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.225920156291-0.1371084321j)*x_ref[0]**o + ((0.597617625391-0.306650858098j))*x_ref[0] + ((0.50129383876+0.298100371028j))*x_ref[1]**o + ((-0.599678721139-0.41520026353j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.213075603043+0.282754917117j)*x[0]**o + ((0.584284934199-0.381896132185j))*x[0] + ((0.0953868002483-0.167937317042j))*x[1]**o + ((0.204704441683+0.809991568652j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.213075603043+0.282754917117j)*x_ref[0]**o + ((0.584284934199-0.381896132185j))*x_ref[0] + ((0.0953868002483-0.167937317042j))*x_ref[1]**o + ((0.204704441683+0.809991568652j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(0.962795424941+0.69597886108j)*x[0]**o + ((0.338690982009+0.244225116308j))*x[0] + ((0.081110731445+0.525081213674j))*x[1]**o + ((-0.500039153728+0.174421221959j))*x[1]
        ref[(0, 1, 1, 2)]=(0.962795424941+0.69597886108j)*x_ref[0]**o + ((0.338690982009+0.244225116308j))*x_ref[0] + ((0.081110731445+0.525081213674j))*x_ref[1]**o + ((-0.500039153728+0.174421221959j))*x_ref[1]
        arg[(0, 1, 1, 3)]=(0.115467219802+0.961696056772j)*x[0]**o + ((0.273066218556+0.881110952314j))*x[0] + ((0.0769972601457+0.604306464469j))*x[1]**o + ((0.0028431330779+0.195876192913j))*x[1]
        ref[(0, 1, 1, 3)]=(0.115467219802+0.961696056772j)*x_ref[0]**o + ((0.273066218556+0.881110952314j))*x_ref[0] + ((0.0769972601457+0.604306464469j))*x_ref[1]**o + ((0.0028431330779+0.195876192913j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.295192514126+0.998102933883j)*x[0]**o + ((0.475258716096+0.136300344488j))*x[0] + ((-0.883682464188+0.926116450489j))*x[1]**o + ((0.610844748188-0.779298034424j))*x[1]
        ref[(0, 2, 0, 0)]=(0.295192514126+0.998102933883j)*x_ref[0]**o + ((0.475258716096+0.136300344488j))*x_ref[0] + ((-0.883682464188+0.926116450489j))*x_ref[1]**o + ((0.610844748188-0.779298034424j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(0.175757126629-0.549942726763j)*x[0]**o + ((-0.571645549935+0.999874102097j))*x[0] + ((0.184803446329-0.44990098311j))*x[1]**o + ((-0.657189619926+0.0459247431704j))*x[1]
        ref[(0, 2, 0, 1)]=(0.175757126629-0.549942726763j)*x_ref[0]**o + ((-0.571645549935+0.999874102097j))*x_ref[0] + ((0.184803446329-0.44990098311j))*x_ref[1]**o + ((-0.657189619926+0.0459247431704j))*x_ref[1]
        arg[(0, 2, 0, 2)]=(0.371368452283-0.966928787903j)*x[0]**o + ((-0.585638307583-0.931158245592j))*x[0] + ((-0.634716940758+0.392215810297j))*x[1]**o + ((0.618947663435+0.440856934399j))*x[1]
        ref[(0, 2, 0, 2)]=(0.371368452283-0.966928787903j)*x_ref[0]**o + ((-0.585638307583-0.931158245592j))*x_ref[0] + ((-0.634716940758+0.392215810297j))*x_ref[1]**o + ((0.618947663435+0.440856934399j))*x_ref[1]
        arg[(0, 2, 0, 3)]=(-0.170807990385+0.80861445525j)*x[0]**o + ((0.656304567696-0.289752659154j))*x[0] + ((-0.327899099323+0.387097381251j))*x[1]**o + ((0.333023920276+0.237098878752j))*x[1]
        ref[(0, 2, 0, 3)]=(-0.170807990385+0.80861445525j)*x_ref[0]**o + ((0.656304567696-0.289752659154j))*x_ref[0] + ((-0.327899099323+0.387097381251j))*x_ref[1]**o + ((0.333023920276+0.237098878752j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.503058877243-0.923087774812j)*x[0]**o + ((0.394734545879+0.313983406807j))*x[0] + ((0.464135393568-0.463912453934j))*x[1]**o + ((0.791502823863-0.211481015415j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.503058877243-0.923087774812j)*x_ref[0]**o + ((0.394734545879+0.313983406807j))*x_ref[0] + ((0.464135393568-0.463912453934j))*x_ref[1]**o + ((0.791502823863-0.211481015415j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(-0.833776998546+0.379308753318j)*x[0]**o + ((0.483999630093-0.138795116306j))*x[0] + ((0.715566453808-0.98281494554j))*x[1]**o + ((0.604246467044+0.611564609789j))*x[1]
        ref[(0, 2, 1, 1)]=(-0.833776998546+0.379308753318j)*x_ref[0]**o + ((0.483999630093-0.138795116306j))*x_ref[0] + ((0.715566453808-0.98281494554j))*x_ref[1]**o + ((0.604246467044+0.611564609789j))*x_ref[1]
        arg[(0, 2, 1, 2)]=(0.786691097923+0.817761744777j)*x[0]**o + ((0.0556952128896+0.314639613504j))*x[0] + ((-0.821566986572-0.440705114697j))*x[1]**o + ((0.0499390760739+0.828926221145j))*x[1]
        ref[(0, 2, 1, 2)]=(0.786691097923+0.817761744777j)*x_ref[0]**o + ((0.0556952128896+0.314639613504j))*x_ref[0] + ((-0.821566986572-0.440705114697j))*x_ref[1]**o + ((0.0499390760739+0.828926221145j))*x_ref[1]
        arg[(0, 2, 1, 3)]=(0.819060620448-0.763705846465j)*x[0]**o + ((0.127031995539+0.0685503176545j))*x[0] + ((0.170197130339+0.786670733027j))*x[1]**o + ((0.341556887036-0.289975303475j))*x[1]
        ref[(0, 2, 1, 3)]=(0.819060620448-0.763705846465j)*x_ref[0]**o + ((0.127031995539+0.0685503176545j))*x_ref[0] + ((0.170197130339+0.786670733027j))*x_ref[1]**o + ((0.341556887036-0.289975303475j))*x_ref[1]
        arg[(0, 3, 0, 0)]=(0.188729639304+0.472808594245j)*x[0]**o + ((-0.387339578777-0.659685537237j))*x[0] + ((0.0898235098131-0.0679839836373j))*x[1]**o + ((-0.133441991254-0.983854655294j))*x[1]
        ref[(0, 3, 0, 0)]=(0.188729639304+0.472808594245j)*x_ref[0]**o + ((-0.387339578777-0.659685537237j))*x_ref[0] + ((0.0898235098131-0.0679839836373j))*x_ref[1]**o + ((-0.133441991254-0.983854655294j))*x_ref[1]
        arg[(0, 3, 0, 1)]=(0.497924785717-0.563452056212j)*x[0]**o + ((-0.311739074767-0.810854250321j))*x[0] + ((0.516246610103-0.790346496704j))*x[1]**o + ((-0.418053029012+0.7445218447j))*x[1]
        ref[(0, 3, 0, 1)]=(0.497924785717-0.563452056212j)*x_ref[0]**o + ((-0.311739074767-0.810854250321j))*x_ref[0] + ((0.516246610103-0.790346496704j))*x_ref[1]**o + ((-0.418053029012+0.7445218447j))*x_ref[1]
        arg[(0, 3, 0, 2)]=(0.364309826385-0.543468421925j)*x[0]**o + ((-0.884710905255-0.461630679057j))*x[0] + ((-0.205316623975+0.861696593713j))*x[1]**o + ((0.771753670661-0.758775878699j))*x[1]
        ref[(0, 3, 0, 2)]=(0.364309826385-0.543468421925j)*x_ref[0]**o + ((-0.884710905255-0.461630679057j))*x_ref[0] + ((-0.205316623975+0.861696593713j))*x_ref[1]**o + ((0.771753670661-0.758775878699j))*x_ref[1]
        arg[(0, 3, 0, 3)]=(-0.0725999043691-0.807529515432j)*x[0]**o + ((-0.503451782149-0.58195838284j))*x[0] + ((0.668123474851-0.236149513993j))*x[1]**o + ((-0.461619013741+0.120520822703j))*x[1]
        ref[(0, 3, 0, 3)]=(-0.0725999043691-0.807529515432j)*x_ref[0]**o + ((-0.503451782149-0.58195838284j))*x_ref[0] + ((0.668123474851-0.236149513993j))*x_ref[1]**o + ((-0.461619013741+0.120520822703j))*x_ref[1]
        arg[(0, 3, 1, 0)]=(-0.272275772681+0.515768996853j)*x[0]**o + ((0.387354195101-0.663182495193j))*x[0] + ((0.761402704657+0.392339294244j))*x[1]**o + ((0.0699752479341-0.76447827167j))*x[1]
        ref[(0, 3, 1, 0)]=(-0.272275772681+0.515768996853j)*x_ref[0]**o + ((0.387354195101-0.663182495193j))*x_ref[0] + ((0.761402704657+0.392339294244j))*x_ref[1]**o + ((0.0699752479341-0.76447827167j))*x_ref[1]
        arg[(0, 3, 1, 1)]=(-0.937379653051-0.302091933296j)*x[0]**o + ((0.363157076618-0.237074524611j))*x[0] + ((0.959160335079+0.515817938432j))*x[1]**o + ((0.566126126664+0.951896949229j))*x[1]
        ref[(0, 3, 1, 1)]=(-0.937379653051-0.302091933296j)*x_ref[0]**o + ((0.363157076618-0.237074524611j))*x_ref[0] + ((0.959160335079+0.515817938432j))*x_ref[1]**o + ((0.566126126664+0.951896949229j))*x_ref[1]
        arg[(0, 3, 1, 2)]=(0.351866372337+0.316497161248j)*x[0]**o + ((-0.758661690706+0.183370192772j))*x[0] + ((0.379383606219+0.433582555927j))*x[1]**o + ((-0.344817780802-0.325276685016j))*x[1]
        ref[(0, 3, 1, 2)]=(0.351866372337+0.316497161248j)*x_ref[0]**o + ((-0.758661690706+0.183370192772j))*x_ref[0] + ((0.379383606219+0.433582555927j))*x_ref[1]**o + ((-0.344817780802-0.325276685016j))*x_ref[1]
        arg[(0, 3, 1, 3)]=(-0.161563956712-0.976882594054j)*x[0]**o + ((-0.0554533912409+0.0812970827792j))*x[0] + ((-0.265941410454+0.81949258224j))*x[1]**o + ((0.223777243973-0.356559845581j))*x[1]
        ref[(0, 3, 1, 3)]=(-0.161563956712-0.976882594054j)*x_ref[0]**o + ((-0.0554533912409+0.0812970827792j))*x_ref[0] + ((-0.265941410454+0.81949258224j))*x_ref[1]**o + ((0.223777243973-0.356559845581j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.983091210521-0.611445624485j)*x[0]**o + ((0.652375605992+0.457148795466j))*x[0] + ((0.119174229744+0.663428490402j))*x[1]**o + ((-0.20814612557-0.13801523486j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.983091210521-0.611445624485j)*x_ref[0]**o + ((0.652375605992+0.457148795466j))*x_ref[0] + ((0.119174229744+0.663428490402j))*x_ref[1]**o + ((-0.20814612557-0.13801523486j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.401553778675-0.856825784605j)*x[0]**o + ((-0.53371058419+0.208568593201j))*x[0] + ((0.922359330783+0.875079826571j))*x[1]**o + ((0.216384221177-0.0500774369381j))*x[1]
        ref[(1, 0, 0, 1)]=(0.401553778675-0.856825784605j)*x_ref[0]**o + ((-0.53371058419+0.208568593201j))*x_ref[0] + ((0.922359330783+0.875079826571j))*x_ref[1]**o + ((0.216384221177-0.0500774369381j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(-0.434124214779-0.656741160493j)*x[0]**o + ((0.444142054805+0.457926484866j))*x[0] + ((-0.441227644267-0.792552545495j))*x[1]**o + ((-0.926525020117-0.873713130755j))*x[1]
        ref[(1, 0, 0, 2)]=(-0.434124214779-0.656741160493j)*x_ref[0]**o + ((0.444142054805+0.457926484866j))*x_ref[0] + ((-0.441227644267-0.792552545495j))*x_ref[1]**o + ((-0.926525020117-0.873713130755j))*x_ref[1]
        arg[(1, 0, 0, 3)]=(0.248233454582-0.878667193652j)*x[0]**o + ((-0.294970323418-0.850144046669j))*x[0] + ((-0.0916217606209+0.0992164688337j))*x[1]**o + ((0.183572566334-0.0945022751308j))*x[1]
        ref[(1, 0, 0, 3)]=(0.248233454582-0.878667193652j)*x_ref[0]**o + ((-0.294970323418-0.850144046669j))*x_ref[0] + ((-0.0916217606209+0.0992164688337j))*x_ref[1]**o + ((0.183572566334-0.0945022751308j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.178382930202+0.680179305074j)*x[0]**o + ((0.741485422281+0.483020911076j))*x[0] + ((-0.246551192562-0.636456494529j))*x[1]**o + ((-0.164994287081+0.605890302635j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.178382930202+0.680179305074j)*x_ref[0]**o + ((0.741485422281+0.483020911076j))*x_ref[0] + ((-0.246551192562-0.636456494529j))*x_ref[1]**o + ((-0.164994287081+0.605890302635j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.511701253986+0.610789959128j)*x[0]**o + ((0.63041782683-0.33946846667j))*x[0] + ((0.81088855727+0.144599992915j))*x[1]**o + ((-0.961306174042+0.494615981919j))*x[1]
        ref[(1, 0, 1, 1)]=(0.511701253986+0.610789959128j)*x_ref[0]**o + ((0.63041782683-0.33946846667j))*x_ref[0] + ((0.81088855727+0.144599992915j))*x_ref[1]**o + ((-0.961306174042+0.494615981919j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(0.168566341135-0.742727204495j)*x[0]**o + ((-0.568938212798-0.903694558957j))*x[0] + ((-0.459710286444+0.716149657403j))*x[1]**o + ((-0.274839034036+0.233113340102j))*x[1]
        ref[(1, 0, 1, 2)]=(0.168566341135-0.742727204495j)*x_ref[0]**o + ((-0.568938212798-0.903694558957j))*x_ref[0] + ((-0.459710286444+0.716149657403j))*x_ref[1]**o + ((-0.274839034036+0.233113340102j))*x_ref[1]
        arg[(1, 0, 1, 3)]=(-0.228849050336+0.756149883349j)*x[0]**o + ((0.167189814463+0.647882966023j))*x[0] + ((0.630141621176+0.0427245132671j))*x[1]**o + ((0.656709142767+0.86063942033j))*x[1]
        ref[(1, 0, 1, 3)]=(-0.228849050336+0.756149883349j)*x_ref[0]**o + ((0.167189814463+0.647882966023j))*x_ref[0] + ((0.630141621176+0.0427245132671j))*x_ref[1]**o + ((0.656709142767+0.86063942033j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.584862709422+0.371098074074j)*x[0]**o + ((0.873453785729-0.0360713899029j))*x[0] + ((0.113900743009-0.177448867903j))*x[1]**o + ((0.773369914816-0.445957269109j))*x[1]
        ref[(1, 1, 0, 0)]=(0.584862709422+0.371098074074j)*x_ref[0]**o + ((0.873453785729-0.0360713899029j))*x_ref[0] + ((0.113900743009-0.177448867903j))*x_ref[1]**o + ((0.773369914816-0.445957269109j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.127466025315+0.92975038142j)*x[0]**o + ((-0.899491779573-0.907353548024j))*x[0] + ((-0.707446808261+0.15587717197j))*x[1]**o + ((0.619416052536-0.962007761592j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.127466025315+0.92975038142j)*x_ref[0]**o + ((-0.899491779573-0.907353548024j))*x_ref[0] + ((-0.707446808261+0.15587717197j))*x_ref[1]**o + ((0.619416052536-0.962007761592j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(0.272698951483-0.74742204457j)*x[0]**o + ((-0.629283077632-0.489401511884j))*x[0] + ((0.885434627779+0.821470663886j))*x[1]**o + ((-0.479842196482+0.113866362429j))*x[1]
        ref[(1, 1, 0, 2)]=(0.272698951483-0.74742204457j)*x_ref[0]**o + ((-0.629283077632-0.489401511884j))*x_ref[0] + ((0.885434627779+0.821470663886j))*x_ref[1]**o + ((-0.479842196482+0.113866362429j))*x_ref[1]
        arg[(1, 1, 0, 3)]=(-0.971926978469-0.251378480967j)*x[0]**o + ((0.054279985056-0.0825868161934j))*x[0] + ((0.628205961434-0.69144554643j))*x[1]**o + ((0.694576984972-0.279946319296j))*x[1]
        ref[(1, 1, 0, 3)]=(-0.971926978469-0.251378480967j)*x_ref[0]**o + ((0.054279985056-0.0825868161934j))*x_ref[0] + ((0.628205961434-0.69144554643j))*x_ref[1]**o + ((0.694576984972-0.279946319296j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.14108510857+0.817028800149j)*x[0]**o + ((0.278543488622-0.557365698945j))*x[0] + ((0.0619779567874-0.485921108212j))*x[1]**o + ((0.22111763387-0.714950107939j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.14108510857+0.817028800149j)*x_ref[0]**o + ((0.278543488622-0.557365698945j))*x_ref[0] + ((0.0619779567874-0.485921108212j))*x_ref[1]**o + ((0.22111763387-0.714950107939j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.73475568017+0.730267048863j)*x[0]**o + ((-0.894252861849-0.320076077738j))*x[0] + ((0.311535568247-0.479473582364j))*x[1]**o + ((0.9656906159-0.0824580973551j))*x[1]
        ref[(1, 1, 1, 1)]=(0.73475568017+0.730267048863j)*x_ref[0]**o + ((-0.894252861849-0.320076077738j))*x_ref[0] + ((0.311535568247-0.479473582364j))*x_ref[1]**o + ((0.9656906159-0.0824580973551j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(0.70450570105+0.638916657911j)*x[0]**o + ((0.854436226048+0.363797743377j))*x[0] + ((-0.976312255744+0.993038072177j))*x[1]**o + ((-0.0399793495763-0.445275836644j))*x[1]
        ref[(1, 1, 1, 2)]=(0.70450570105+0.638916657911j)*x_ref[0]**o + ((0.854436226048+0.363797743377j))*x_ref[0] + ((-0.976312255744+0.993038072177j))*x_ref[1]**o + ((-0.0399793495763-0.445275836644j))*x_ref[1]
        arg[(1, 1, 1, 3)]=(0.0671224787281-0.963404898184j)*x[0]**o + ((0.895115477353+0.269725429651j))*x[0] + ((-0.86299575167-0.226768626974j))*x[1]**o + ((0.547687292946+0.0400840426759j))*x[1]
        ref[(1, 1, 1, 3)]=(0.0671224787281-0.963404898184j)*x_ref[0]**o + ((0.895115477353+0.269725429651j))*x_ref[0] + ((-0.86299575167-0.226768626974j))*x_ref[1]**o + ((0.547687292946+0.0400840426759j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(-0.730979678382+0.888262681209j)*x[0]**o + ((0.388672589645+0.185124084873j))*x[0] + ((-0.39450334077-0.361106792763j))*x[1]**o + ((-0.106193884356-0.920382653947j))*x[1]
        ref[(1, 2, 0, 0)]=(-0.730979678382+0.888262681209j)*x_ref[0]**o + ((0.388672589645+0.185124084873j))*x_ref[0] + ((-0.39450334077-0.361106792763j))*x_ref[1]**o + ((-0.106193884356-0.920382653947j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.135059334134+0.320237765488j)*x[0]**o + ((0.0909626859985-0.108067890536j))*x[0] + ((-0.544634304154-0.909827281532j))*x[1]**o + ((0.996074509951-0.210618778791j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.135059334134+0.320237765488j)*x_ref[0]**o + ((0.0909626859985-0.108067890536j))*x_ref[0] + ((-0.544634304154-0.909827281532j))*x_ref[1]**o + ((0.996074509951-0.210618778791j))*x_ref[1]
        arg[(1, 2, 0, 2)]=(0.829576949763-0.134108070944j)*x[0]**o + ((0.286297654351-0.359602853487j))*x[0] + ((0.76606023707-0.456459612109j))*x[1]**o + ((0.105728444839+0.155259699288j))*x[1]
        ref[(1, 2, 0, 2)]=(0.829576949763-0.134108070944j)*x_ref[0]**o + ((0.286297654351-0.359602853487j))*x_ref[0] + ((0.76606023707-0.456459612109j))*x_ref[1]**o + ((0.105728444839+0.155259699288j))*x_ref[1]
        arg[(1, 2, 0, 3)]=(-0.706998080641-0.650952840849j)*x[0]**o + ((-0.340300618597+0.500311254499j))*x[0] + ((-0.735624800324+0.472300266779j))*x[1]**o + ((-0.887244105886+0.0325962750509j))*x[1]
        ref[(1, 2, 0, 3)]=(-0.706998080641-0.650952840849j)*x_ref[0]**o + ((-0.340300618597+0.500311254499j))*x_ref[0] + ((-0.735624800324+0.472300266779j))*x_ref[1]**o + ((-0.887244105886+0.0325962750509j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(0.511623066929+0.0218357000079j)*x[0]**o + ((-0.511833718061-0.344765321884j))*x[0] + ((0.567987656064-0.363677496604j))*x[1]**o + ((-0.258666616441-0.699096419048j))*x[1]
        ref[(1, 2, 1, 0)]=(0.511623066929+0.0218357000079j)*x_ref[0]**o + ((-0.511833718061-0.344765321884j))*x_ref[0] + ((0.567987656064-0.363677496604j))*x_ref[1]**o + ((-0.258666616441-0.699096419048j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(-0.147239437557-0.583251658447j)*x[0]**o + ((-0.305642612435-0.359070337823j))*x[0] + ((-0.74302116754+0.512196967245j))*x[1]**o + ((-0.091509403171+0.130082660455j))*x[1]
        ref[(1, 2, 1, 1)]=(-0.147239437557-0.583251658447j)*x_ref[0]**o + ((-0.305642612435-0.359070337823j))*x_ref[0] + ((-0.74302116754+0.512196967245j))*x_ref[1]**o + ((-0.091509403171+0.130082660455j))*x_ref[1]
        arg[(1, 2, 1, 2)]=(-0.617513145541-0.9922091652j)*x[0]**o + ((0.58320271305+0.868671507097j))*x[0] + ((0.210932125001+0.579013066199j))*x[1]**o + ((0.15610413506-0.966273175323j))*x[1]
        ref[(1, 2, 1, 2)]=(-0.617513145541-0.9922091652j)*x_ref[0]**o + ((0.58320271305+0.868671507097j))*x_ref[0] + ((0.210932125001+0.579013066199j))*x_ref[1]**o + ((0.15610413506-0.966273175323j))*x_ref[1]
        arg[(1, 2, 1, 3)]=(-0.46927370461-0.812445517695j)*x[0]**o + ((-0.502231661278+0.836907889017j))*x[0] + ((0.859794045457-0.545578444996j))*x[1]**o + ((-0.621820726587+0.225247287595j))*x[1]
        ref[(1, 2, 1, 3)]=(-0.46927370461-0.812445517695j)*x_ref[0]**o + ((-0.502231661278+0.836907889017j))*x_ref[0] + ((0.859794045457-0.545578444996j))*x_ref[1]**o + ((-0.621820726587+0.225247287595j))*x_ref[1]
        arg[(1, 3, 0, 0)]=(0.639283831639+0.642610699176j)*x[0]**o + ((-0.738831444451+0.744709215026j))*x[0] + ((-0.903500075062+0.14939840331j))*x[1]**o + ((0.20892593451+0.627535282409j))*x[1]
        ref[(1, 3, 0, 0)]=(0.639283831639+0.642610699176j)*x_ref[0]**o + ((-0.738831444451+0.744709215026j))*x_ref[0] + ((-0.903500075062+0.14939840331j))*x_ref[1]**o + ((0.20892593451+0.627535282409j))*x_ref[1]
        arg[(1, 3, 0, 1)]=(-0.977273245183-0.603442506979j)*x[0]**o + ((0.608508310021+0.16581868772j))*x[0] + ((-0.990287252867+0.770539684275j))*x[1]**o + ((0.18907193687-0.555026666065j))*x[1]
        ref[(1, 3, 0, 1)]=(-0.977273245183-0.603442506979j)*x_ref[0]**o + ((0.608508310021+0.16581868772j))*x_ref[0] + ((-0.990287252867+0.770539684275j))*x_ref[1]**o + ((0.18907193687-0.555026666065j))*x_ref[1]
        arg[(1, 3, 0, 2)]=(-0.615885236967-0.760155617451j)*x[0]**o + ((0.991524956372+0.937213476543j))*x[0] + ((0.866479273448-0.413811380717j))*x[1]**o + ((-0.522144589971+0.704942146304j))*x[1]
        ref[(1, 3, 0, 2)]=(-0.615885236967-0.760155617451j)*x_ref[0]**o + ((0.991524956372+0.937213476543j))*x_ref[0] + ((0.866479273448-0.413811380717j))*x_ref[1]**o + ((-0.522144589971+0.704942146304j))*x_ref[1]
        arg[(1, 3, 0, 3)]=(-0.179115038716-0.26479803014j)*x[0]**o + ((0.42978002573+0.599768575111j))*x[0] + ((0.373349355166+0.348735882253j))*x[1]**o + ((-0.913681695559+0.911535115179j))*x[1]
        ref[(1, 3, 0, 3)]=(-0.179115038716-0.26479803014j)*x_ref[0]**o + ((0.42978002573+0.599768575111j))*x_ref[0] + ((0.373349355166+0.348735882253j))*x_ref[1]**o + ((-0.913681695559+0.911535115179j))*x_ref[1]
        arg[(1, 3, 1, 0)]=(0.03374971283-0.0513575806254j)*x[0]**o + ((-0.768792613796-0.391889787278j))*x[0] + ((-0.478605477802-0.519433525979j))*x[1]**o + ((0.0625772032995+0.587336121762j))*x[1]
        ref[(1, 3, 1, 0)]=(0.03374971283-0.0513575806254j)*x_ref[0]**o + ((-0.768792613796-0.391889787278j))*x_ref[0] + ((-0.478605477802-0.519433525979j))*x_ref[1]**o + ((0.0625772032995+0.587336121762j))*x_ref[1]
        arg[(1, 3, 1, 1)]=(-0.696014401378+0.213510607379j)*x[0]**o + ((-0.731257897067+0.489167199535j))*x[0] + ((0.700148553699+0.413720500299j))*x[1]**o + ((-0.213043272824+0.851111669012j))*x[1]
        ref[(1, 3, 1, 1)]=(-0.696014401378+0.213510607379j)*x_ref[0]**o + ((-0.731257897067+0.489167199535j))*x_ref[0] + ((0.700148553699+0.413720500299j))*x_ref[1]**o + ((-0.213043272824+0.851111669012j))*x_ref[1]
        arg[(1, 3, 1, 2)]=(-0.680152323045+0.474895610946j)*x[0]**o + ((0.29557895733+0.82289815953j))*x[0] + ((0.464123315474+0.101217018385j))*x[1]**o + ((0.313265224491-0.0988410562645j))*x[1]
        ref[(1, 3, 1, 2)]=(-0.680152323045+0.474895610946j)*x_ref[0]**o + ((0.29557895733+0.82289815953j))*x_ref[0] + ((0.464123315474+0.101217018385j))*x_ref[1]**o + ((0.313265224491-0.0988410562645j))*x_ref[1]
        arg[(1, 3, 1, 3)]=(0.603406736899+0.131011312684j)*x[0]**o + ((-0.232463705227-0.414683724115j))*x[0] + ((0.889066065497-0.225417631235j))*x[1]**o + ((0.360656715893-0.70660613385j))*x[1]
        ref[(1, 3, 1, 3)]=(0.603406736899+0.131011312684j)*x_ref[0]**o + ((-0.232463705227-0.414683724115j))*x_ref[0] + ((0.889066065497-0.225417631235j))*x_ref[1]**o + ((0.360656715893-0.70660613385j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.540364750508-0.186127260442j)*x[0]**o + ((0.745598301801-0.597536686864j))*x[0] + ((0.485542865079-0.11819884828j))*x[1]**o + ((-0.581162775815+0.768242130495j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.540364750508-0.186127260442j)*x_ref[0]**o + ((0.745598301801-0.597536686864j))*x_ref[0] + ((0.485542865079-0.11819884828j))*x_ref[1]**o + ((-0.581162775815+0.768242130495j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(-0.618464463221-0.0200115710179j)*x[0]**o + ((-0.895666406371-0.381578383334j))*x[0] + ((-0.658938944521-0.539977698346j))*x[1]**o + ((-0.29979358805-0.806962587278j))*x[1]
        ref[(2, 0, 0, 1)]=(-0.618464463221-0.0200115710179j)*x_ref[0]**o + ((-0.895666406371-0.381578383334j))*x_ref[0] + ((-0.658938944521-0.539977698346j))*x_ref[1]**o + ((-0.29979358805-0.806962587278j))*x_ref[1]
        arg[(2, 0, 0, 2)]=(0.473574191933-0.83086083879j)*x[0]**o + ((-0.913290128503-0.494948313259j))*x[0] + ((0.395212234803-0.887302835011j))*x[1]**o + ((-0.273520864443+0.908277995345j))*x[1]
        ref[(2, 0, 0, 2)]=(0.473574191933-0.83086083879j)*x_ref[0]**o + ((-0.913290128503-0.494948313259j))*x_ref[0] + ((0.395212234803-0.887302835011j))*x_ref[1]**o + ((-0.273520864443+0.908277995345j))*x_ref[1]
        arg[(2, 0, 0, 3)]=(0.0943240051506-0.561788833582j)*x[0]**o + ((-0.921687091405-0.751224474394j))*x[0] + ((0.483645026184+0.316946264769j))*x[1]**o + ((-0.452248128896+0.523720769565j))*x[1]
        ref[(2, 0, 0, 3)]=(0.0943240051506-0.561788833582j)*x_ref[0]**o + ((-0.921687091405-0.751224474394j))*x_ref[0] + ((0.483645026184+0.316946264769j))*x_ref[1]**o + ((-0.452248128896+0.523720769565j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(-0.746173985315-0.848626909325j)*x[0]**o + ((-0.479790707301-0.115282120979j))*x[0] + ((-0.637332503259+0.992691039306j))*x[1]**o + ((-0.293613668574+0.752018844598j))*x[1]
        ref[(2, 0, 1, 0)]=(-0.746173985315-0.848626909325j)*x_ref[0]**o + ((-0.479790707301-0.115282120979j))*x_ref[0] + ((-0.637332503259+0.992691039306j))*x_ref[1]**o + ((-0.293613668574+0.752018844598j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.766471574739+0.651178715139j)*x[0]**o + ((0.35530257863+0.604026523466j))*x[0] + ((-0.812698548215+0.0296946626018j))*x[1]**o + ((0.575199282839-0.744525398476j))*x[1]
        ref[(2, 0, 1, 1)]=(0.766471574739+0.651178715139j)*x_ref[0]**o + ((0.35530257863+0.604026523466j))*x_ref[0] + ((-0.812698548215+0.0296946626018j))*x_ref[1]**o + ((0.575199282839-0.744525398476j))*x_ref[1]
        arg[(2, 0, 1, 2)]=(0.32310217586-0.789711199683j)*x[0]**o + ((-0.45339796432+0.287141524301j))*x[0] + ((-0.815946973765+0.521506211522j))*x[1]**o + ((0.358772749597-0.0595472927785j))*x[1]
        ref[(2, 0, 1, 2)]=(0.32310217586-0.789711199683j)*x_ref[0]**o + ((-0.45339796432+0.287141524301j))*x_ref[0] + ((-0.815946973765+0.521506211522j))*x_ref[1]**o + ((0.358772749597-0.0595472927785j))*x_ref[1]
        arg[(2, 0, 1, 3)]=(-0.370070747807+0.00200745987747j)*x[0]**o + ((0.653007341117-0.405975251049j))*x[0] + ((0.860861167116+0.52368227939j))*x[1]**o + ((-0.5017573349+0.13050551168j))*x[1]
        ref[(2, 0, 1, 3)]=(-0.370070747807+0.00200745987747j)*x_ref[0]**o + ((0.653007341117-0.405975251049j))*x_ref[0] + ((0.860861167116+0.52368227939j))*x_ref[1]**o + ((-0.5017573349+0.13050551168j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(-0.341180798125-0.885722841644j)*x[0]**o + ((0.330038585938-0.876560437618j))*x[0] + ((0.0932313734648-0.875094638928j))*x[1]**o + ((-0.954457439272+0.204183143313j))*x[1]
        ref[(2, 1, 0, 0)]=(-0.341180798125-0.885722841644j)*x_ref[0]**o + ((0.330038585938-0.876560437618j))*x_ref[0] + ((0.0932313734648-0.875094638928j))*x_ref[1]**o + ((-0.954457439272+0.204183143313j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(-0.655973127172+0.339272068242j)*x[0]**o + ((0.598690514384+0.555260260127j))*x[0] + ((0.498355481048-0.840786898545j))*x[1]**o + ((0.606286848934+0.940100390642j))*x[1]
        ref[(2, 1, 0, 1)]=(-0.655973127172+0.339272068242j)*x_ref[0]**o + ((0.598690514384+0.555260260127j))*x_ref[0] + ((0.498355481048-0.840786898545j))*x_ref[1]**o + ((0.606286848934+0.940100390642j))*x_ref[1]
        arg[(2, 1, 0, 2)]=(0.484145204592-0.760477845831j)*x[0]**o + ((0.548334789563-0.487362533756j))*x[0] + ((0.348368777502+0.864141822455j))*x[1]**o + ((-0.10961461873-0.223308500393j))*x[1]
        ref[(2, 1, 0, 2)]=(0.484145204592-0.760477845831j)*x_ref[0]**o + ((0.548334789563-0.487362533756j))*x_ref[0] + ((0.348368777502+0.864141822455j))*x_ref[1]**o + ((-0.10961461873-0.223308500393j))*x_ref[1]
        arg[(2, 1, 0, 3)]=(-0.864092102043-0.618182041936j)*x[0]**o + ((-0.386998726166+0.53212970607j))*x[0] + ((-0.0492121483595-0.545547790492j))*x[1]**o + ((-0.890359369963-0.44700129075j))*x[1]
        ref[(2, 1, 0, 3)]=(-0.864092102043-0.618182041936j)*x_ref[0]**o + ((-0.386998726166+0.53212970607j))*x_ref[0] + ((-0.0492121483595-0.545547790492j))*x_ref[1]**o + ((-0.890359369963-0.44700129075j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(-0.399711946643+0.142987848118j)*x[0]**o + ((-0.643339334505-0.776509378305j))*x[0] + ((-0.312166396889+0.784787889316j))*x[1]**o + ((-0.919376090622+0.345363421516j))*x[1]
        ref[(2, 1, 1, 0)]=(-0.399711946643+0.142987848118j)*x_ref[0]**o + ((-0.643339334505-0.776509378305j))*x_ref[0] + ((-0.312166396889+0.784787889316j))*x_ref[1]**o + ((-0.919376090622+0.345363421516j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(-0.764149901191-0.735329793605j)*x[0]**o + ((0.0541104003283-0.403619724485j))*x[0] + ((-0.123462109921+0.0440688401718j))*x[1]**o + ((-0.943219198371-0.824845438167j))*x[1]
        ref[(2, 1, 1, 1)]=(-0.764149901191-0.735329793605j)*x_ref[0]**o + ((0.0541104003283-0.403619724485j))*x_ref[0] + ((-0.123462109921+0.0440688401718j))*x_ref[1]**o + ((-0.943219198371-0.824845438167j))*x_ref[1]
        arg[(2, 1, 1, 2)]=(0.7121903015-0.473134001508j)*x[0]**o + ((0.0579707681076+0.430519029204j))*x[0] + ((-0.389957189688+0.318407925841j))*x[1]**o + ((-0.639355845207+0.683896563027j))*x[1]
        ref[(2, 1, 1, 2)]=(0.7121903015-0.473134001508j)*x_ref[0]**o + ((0.0579707681076+0.430519029204j))*x_ref[0] + ((-0.389957189688+0.318407925841j))*x_ref[1]**o + ((-0.639355845207+0.683896563027j))*x_ref[1]
        arg[(2, 1, 1, 3)]=(0.620338127421+0.244824295648j)*x[0]**o + ((-0.290968904028+0.350987148462j))*x[0] + ((0.362926819698+0.8525464967j))*x[1]**o + ((-0.691790736804-0.66565886962j))*x[1]
        ref[(2, 1, 1, 3)]=(0.620338127421+0.244824295648j)*x_ref[0]**o + ((-0.290968904028+0.350987148462j))*x_ref[0] + ((0.362926819698+0.8525464967j))*x_ref[1]**o + ((-0.691790736804-0.66565886962j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(0.51719622316+0.245520592825j)*x[0]**o + ((0.205864256839+0.255820084101j))*x[0] + ((0.0279474901926+0.611843027439j))*x[1]**o + ((0.397640997695+0.419969059887j))*x[1]
        ref[(2, 2, 0, 0)]=(0.51719622316+0.245520592825j)*x_ref[0]**o + ((0.205864256839+0.255820084101j))*x_ref[0] + ((0.0279474901926+0.611843027439j))*x_ref[1]**o + ((0.397640997695+0.419969059887j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(0.827138736721+0.968616006592j)*x[0]**o + ((-0.307517137521+0.898352272679j))*x[0] + ((0.177274128156+0.308057087853j))*x[1]**o + ((-0.241186876961+0.220299743619j))*x[1]
        ref[(2, 2, 0, 1)]=(0.827138736721+0.968616006592j)*x_ref[0]**o + ((-0.307517137521+0.898352272679j))*x_ref[0] + ((0.177274128156+0.308057087853j))*x_ref[1]**o + ((-0.241186876961+0.220299743619j))*x_ref[1]
        arg[(2, 2, 0, 2)]=(-0.141098057814+0.302169956861j)*x[0]**o + ((0.17221012392-0.238873739245j))*x[0] + ((0.215441294556+0.0870117580907j))*x[1]**o + ((-0.563703760752+0.967427231107j))*x[1]
        ref[(2, 2, 0, 2)]=(-0.141098057814+0.302169956861j)*x_ref[0]**o + ((0.17221012392-0.238873739245j))*x_ref[0] + ((0.215441294556+0.0870117580907j))*x_ref[1]**o + ((-0.563703760752+0.967427231107j))*x_ref[1]
        arg[(2, 2, 0, 3)]=(0.659705162692+0.555424305853j)*x[0]**o + ((0.546311236285-0.235642775187j))*x[0] + ((0.491538961778+0.994623325862j))*x[1]**o + ((-0.817698193411+0.791908993125j))*x[1]
        ref[(2, 2, 0, 3)]=(0.659705162692+0.555424305853j)*x_ref[0]**o + ((0.546311236285-0.235642775187j))*x_ref[0] + ((0.491538961778+0.994623325862j))*x_ref[1]**o + ((-0.817698193411+0.791908993125j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(-0.905375397209-0.0104613628932j)*x[0]**o + ((-0.910725527751-0.721038536468j))*x[0] + ((-0.26232701787-0.239969262109j))*x[1]**o + ((0.120995211397-0.639605826244j))*x[1]
        ref[(2, 2, 1, 0)]=(-0.905375397209-0.0104613628932j)*x_ref[0]**o + ((-0.910725527751-0.721038536468j))*x_ref[0] + ((-0.26232701787-0.239969262109j))*x_ref[1]**o + ((0.120995211397-0.639605826244j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(-0.231456859891-0.98258633465j)*x[0]**o + ((-0.989004203615+0.523097591355j))*x[0] + ((-0.280622974963+0.652047180889j))*x[1]**o + ((-0.20725542851-0.338669894814j))*x[1]
        ref[(2, 2, 1, 1)]=(-0.231456859891-0.98258633465j)*x_ref[0]**o + ((-0.989004203615+0.523097591355j))*x_ref[0] + ((-0.280622974963+0.652047180889j))*x_ref[1]**o + ((-0.20725542851-0.338669894814j))*x_ref[1]
        arg[(2, 2, 1, 2)]=(0.163446839477-0.98974228138j)*x[0]**o + ((-0.658117756788+0.706538779755j))*x[0] + ((0.910118005234+0.236660512787j))*x[1]**o + ((-0.416669090882-0.413625844005j))*x[1]
        ref[(2, 2, 1, 2)]=(0.163446839477-0.98974228138j)*x_ref[0]**o + ((-0.658117756788+0.706538779755j))*x_ref[0] + ((0.910118005234+0.236660512787j))*x_ref[1]**o + ((-0.416669090882-0.413625844005j))*x_ref[1]
        arg[(2, 2, 1, 3)]=(0.0778607012342-0.314063278826j)*x[0]**o + ((0.0813910283826-0.888667782882j))*x[0] + ((-0.48520241622-0.130586260068j))*x[1]**o + ((-0.927858174733-0.902553084238j))*x[1]
        ref[(2, 2, 1, 3)]=(0.0778607012342-0.314063278826j)*x_ref[0]**o + ((0.0813910283826-0.888667782882j))*x_ref[0] + ((-0.48520241622-0.130586260068j))*x_ref[1]**o + ((-0.927858174733-0.902553084238j))*x_ref[1]
        arg[(2, 3, 0, 0)]=(-0.847392435006+0.675988564745j)*x[0]**o + ((-0.188177440527+0.629410848671j))*x[0] + ((0.73799171301-0.895008283892j))*x[1]**o + ((0.223511467015+0.599109759239j))*x[1]
        ref[(2, 3, 0, 0)]=(-0.847392435006+0.675988564745j)*x_ref[0]**o + ((-0.188177440527+0.629410848671j))*x_ref[0] + ((0.73799171301-0.895008283892j))*x_ref[1]**o + ((0.223511467015+0.599109759239j))*x_ref[1]
        arg[(2, 3, 0, 1)]=(0.916895908083-0.93515565355j)*x[0]**o + ((-0.40105071404+0.196236540598j))*x[0] + ((0.626550419674+0.946326247059j))*x[1]**o + ((-0.138975835352+0.160094249169j))*x[1]
        ref[(2, 3, 0, 1)]=(0.916895908083-0.93515565355j)*x_ref[0]**o + ((-0.40105071404+0.196236540598j))*x_ref[0] + ((0.626550419674+0.946326247059j))*x_ref[1]**o + ((-0.138975835352+0.160094249169j))*x_ref[1]
        arg[(2, 3, 0, 2)]=(-0.359224702361+0.752720659807j)*x[0]**o + ((0.0256500737848+0.712582101795j))*x[0] + ((0.225316247499-0.0681141698269j))*x[1]**o + ((-0.74289764608-0.381060074923j))*x[1]
        ref[(2, 3, 0, 2)]=(-0.359224702361+0.752720659807j)*x_ref[0]**o + ((0.0256500737848+0.712582101795j))*x_ref[0] + ((0.225316247499-0.0681141698269j))*x_ref[1]**o + ((-0.74289764608-0.381060074923j))*x_ref[1]
        arg[(2, 3, 0, 3)]=(-0.391140986392+0.114994080465j)*x[0]**o + ((-0.868579299631+0.56917088522j))*x[0] + ((0.8742867893-0.628522815621j))*x[1]**o + ((-0.640630087228-0.995300787611j))*x[1]
        ref[(2, 3, 0, 3)]=(-0.391140986392+0.114994080465j)*x_ref[0]**o + ((-0.868579299631+0.56917088522j))*x_ref[0] + ((0.8742867893-0.628522815621j))*x_ref[1]**o + ((-0.640630087228-0.995300787611j))*x_ref[1]
        arg[(2, 3, 1, 0)]=(0.714373235024-0.954985669465j)*x[0]**o + ((-0.626020603941-0.184044545618j))*x[0] + ((0.440466987626-0.509114551666j))*x[1]**o + ((-0.376101261243-0.0281725002253j))*x[1]
        ref[(2, 3, 1, 0)]=(0.714373235024-0.954985669465j)*x_ref[0]**o + ((-0.626020603941-0.184044545618j))*x_ref[0] + ((0.440466987626-0.509114551666j))*x_ref[1]**o + ((-0.376101261243-0.0281725002253j))*x_ref[1]
        arg[(2, 3, 1, 1)]=(0.998887086733-0.884006734287j)*x[0]**o + ((0.976327933996+0.65975504474j))*x[0] + ((-0.73783952906-0.463628383419j))*x[1]**o + ((0.977947220818-0.542083371799j))*x[1]
        ref[(2, 3, 1, 1)]=(0.998887086733-0.884006734287j)*x_ref[0]**o + ((0.976327933996+0.65975504474j))*x_ref[0] + ((-0.73783952906-0.463628383419j))*x_ref[1]**o + ((0.977947220818-0.542083371799j))*x_ref[1]
        arg[(2, 3, 1, 2)]=(0.3867296326-0.185820283529j)*x[0]**o + ((0.825752581191+0.496026501152j))*x[0] + ((0.822405665771+0.904387188032j))*x[1]**o + ((0.26114818412+0.73365955266j))*x[1]
        ref[(2, 3, 1, 2)]=(0.3867296326-0.185820283529j)*x_ref[0]**o + ((0.825752581191+0.496026501152j))*x_ref[0] + ((0.822405665771+0.904387188032j))*x_ref[1]**o + ((0.26114818412+0.73365955266j))*x_ref[1]
        arg[(2, 3, 1, 3)]=(0.422324008924-0.13178174431j)*x[0]**o + ((0.288043267334-0.684798653191j))*x[0] + ((0.0587619483382-0.679116542995j))*x[1]**o + ((-0.870046452059-0.795983371448j))*x[1]
        ref[(2, 3, 1, 3)]=(0.422324008924-0.13178174431j)*x_ref[0]**o + ((0.288043267334-0.684798653191j))*x_ref[0] + ((0.0587619483382-0.679116542995j))*x_ref[1]**o + ((-0.870046452059-0.795983371448j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.540461824121+0.153663619773j)*x[2]**o + ((-0.92978440684-0.70565141695j))*x[2]
            ref[(0, 0, 0, 0)]+=(-0.540461824121+0.153663619773j)*x_ref[2]**o + ((-0.92978440684-0.70565141695j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.222078608601-0.367591415887j)*x[2]**o + ((-0.818954777176+0.460888997837j))*x[2]
            ref[(0, 0, 0, 1)]+=(0.222078608601-0.367591415887j)*x_ref[2]**o + ((-0.818954777176+0.460888997837j))*x_ref[2]
            arg[(0, 0, 0, 2)]+=(0.194476047186-0.683512355148j)*x[2]**o + ((-0.620055693-0.442778454253j))*x[2]
            ref[(0, 0, 0, 2)]+=(0.194476047186-0.683512355148j)*x_ref[2]**o + ((-0.620055693-0.442778454253j))*x_ref[2]
            arg[(0, 0, 0, 3)]+=(0.907413061405+0.0396389913391j)*x[2]**o + ((0.285222017966-0.773582123061j))*x[2]
            ref[(0, 0, 0, 3)]+=(0.907413061405+0.0396389913391j)*x_ref[2]**o + ((0.285222017966-0.773582123061j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.857417000047+0.517793352161j)*x[2]**o + ((0.54238649039-0.629549023562j))*x[2]
            ref[(0, 0, 1, 0)]+=(0.857417000047+0.517793352161j)*x_ref[2]**o + ((0.54238649039-0.629549023562j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.0526707591496+0.691363764144j)*x[2]**o + ((-0.798357883717+0.276620007581j))*x[2]
            ref[(0, 0, 1, 1)]+=(0.0526707591496+0.691363764144j)*x_ref[2]**o + ((-0.798357883717+0.276620007581j))*x_ref[2]
            arg[(0, 0, 1, 2)]+=(0.791784135946-0.858135423806j)*x[2]**o + ((0.568087132762-0.177812598806j))*x[2]
            ref[(0, 0, 1, 2)]+=(0.791784135946-0.858135423806j)*x_ref[2]**o + ((0.568087132762-0.177812598806j))*x_ref[2]
            arg[(0, 0, 1, 3)]+=(0.699855044384-0.219086499676j)*x[2]**o + ((-0.69531305133-0.984403922213j))*x[2]
            ref[(0, 0, 1, 3)]+=(0.699855044384-0.219086499676j)*x_ref[2]**o + ((-0.69531305133-0.984403922213j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.247278591111-0.562930763482j)*x[2]**o + ((0.596624558329-0.919544590667j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.247278591111-0.562930763482j)*x_ref[2]**o + ((0.596624558329-0.919544590667j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.970974787602-0.59073386079j)*x[2]**o + ((-0.617978049041+0.492911990996j))*x[2]
            ref[(0, 1, 0, 1)]+=(0.970974787602-0.59073386079j)*x_ref[2]**o + ((-0.617978049041+0.492911990996j))*x_ref[2]
            arg[(0, 1, 0, 2)]+=(0.595511871258-0.210213403165j)*x[2]**o + ((-0.278098445003+0.580496484432j))*x[2]
            ref[(0, 1, 0, 2)]+=(0.595511871258-0.210213403165j)*x_ref[2]**o + ((-0.278098445003+0.580496484432j))*x_ref[2]
            arg[(0, 1, 0, 3)]+=(-0.752342019348-0.159245408869j)*x[2]**o + ((-0.602875892722-0.880584888494j))*x[2]
            ref[(0, 1, 0, 3)]+=(-0.752342019348-0.159245408869j)*x_ref[2]**o + ((-0.602875892722-0.880584888494j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.642235589637+0.538114396695j)*x[2]**o + ((-0.0181652553852+0.298933722446j))*x[2]
            ref[(0, 1, 1, 0)]+=(0.642235589637+0.538114396695j)*x_ref[2]**o + ((-0.0181652553852+0.298933722446j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.193298946996-0.816561980851j)*x[2]**o + ((0.687681211655-0.250522940395j))*x[2]
            ref[(0, 1, 1, 1)]+=(-0.193298946996-0.816561980851j)*x_ref[2]**o + ((0.687681211655-0.250522940395j))*x_ref[2]
            arg[(0, 1, 1, 2)]+=(-0.619166862787+0.760505518865j)*x[2]**o + ((-0.836690805082+0.369697923261j))*x[2]
            ref[(0, 1, 1, 2)]+=(-0.619166862787+0.760505518865j)*x_ref[2]**o + ((-0.836690805082+0.369697923261j))*x_ref[2]
            arg[(0, 1, 1, 3)]+=(0.964849440096+0.877059427307j)*x[2]**o + ((0.255518871118-0.120556535708j))*x[2]
            ref[(0, 1, 1, 3)]+=(0.964849440096+0.877059427307j)*x_ref[2]**o + ((0.255518871118-0.120556535708j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(-0.715376658177+0.67452705209j)*x[2]**o + ((0.591591589696-0.195717789461j))*x[2]
            ref[(0, 2, 0, 0)]+=(-0.715376658177+0.67452705209j)*x_ref[2]**o + ((0.591591589696-0.195717789461j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(0.911129614399-0.240142979498j)*x[2]**o + ((-0.684926267798+0.844667637515j))*x[2]
            ref[(0, 2, 0, 1)]+=(0.911129614399-0.240142979498j)*x_ref[2]**o + ((-0.684926267798+0.844667637515j))*x_ref[2]
            arg[(0, 2, 0, 2)]+=(-0.0775100180688+0.478888085463j)*x[2]**o + ((-0.0882443112645-0.427016337762j))*x[2]
            ref[(0, 2, 0, 2)]+=(-0.0775100180688+0.478888085463j)*x_ref[2]**o + ((-0.0882443112645-0.427016337762j))*x_ref[2]
            arg[(0, 2, 0, 3)]+=(-0.081183087913-0.746710947747j)*x[2]**o + ((-0.975551124154-0.0611742595007j))*x[2]
            ref[(0, 2, 0, 3)]+=(-0.081183087913-0.746710947747j)*x_ref[2]**o + ((-0.975551124154-0.0611742595007j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(0.917111403899-0.898233045401j)*x[2]**o + ((-0.781225222503+0.63499174011j))*x[2]
            ref[(0, 2, 1, 0)]+=(0.917111403899-0.898233045401j)*x_ref[2]**o + ((-0.781225222503+0.63499174011j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(-0.819294925844+0.446987176989j)*x[2]**o + ((0.677264025782-0.211607061558j))*x[2]
            ref[(0, 2, 1, 1)]+=(-0.819294925844+0.446987176989j)*x_ref[2]**o + ((0.677264025782-0.211607061558j))*x_ref[2]
            arg[(0, 2, 1, 2)]+=(0.995507597518+0.515892840579j)*x[2]**o + ((0.222978133089-0.831919133323j))*x[2]
            ref[(0, 2, 1, 2)]+=(0.995507597518+0.515892840579j)*x_ref[2]**o + ((0.222978133089-0.831919133323j))*x_ref[2]
            arg[(0, 2, 1, 3)]+=(0.47415840289+0.322603759844j)*x[2]**o + ((-0.479127257306-0.593034508228j))*x[2]
            ref[(0, 2, 1, 3)]+=(0.47415840289+0.322603759844j)*x_ref[2]**o + ((-0.479127257306-0.593034508228j))*x_ref[2]
            arg[(0, 3, 0, 0)]+=(-0.368128338997-0.493547881806j)*x[2]**o + ((-0.211387336599+0.638857381578j))*x[2]
            ref[(0, 3, 0, 0)]+=(-0.368128338997-0.493547881806j)*x_ref[2]**o + ((-0.211387336599+0.638857381578j))*x_ref[2]
            arg[(0, 3, 0, 1)]+=(-0.0895012671471-0.911134225499j)*x[2]**o + ((-0.391584210602-0.992856060574j))*x[2]
            ref[(0, 3, 0, 1)]+=(-0.0895012671471-0.911134225499j)*x_ref[2]**o + ((-0.391584210602-0.992856060574j))*x_ref[2]
            arg[(0, 3, 0, 2)]+=(-0.717335024175-0.0823771032469j)*x[2]**o + ((-0.393865063047+0.699723869505j))*x[2]
            ref[(0, 3, 0, 2)]+=(-0.717335024175-0.0823771032469j)*x_ref[2]**o + ((-0.393865063047+0.699723869505j))*x_ref[2]
            arg[(0, 3, 0, 3)]+=(0.22108827049+0.175561084558j)*x[2]**o + ((0.388518068319-0.863441336161j))*x[2]
            ref[(0, 3, 0, 3)]+=(0.22108827049+0.175561084558j)*x_ref[2]**o + ((0.388518068319-0.863441336161j))*x_ref[2]
            arg[(0, 3, 1, 0)]+=(-0.48380094662-0.482113642651j)*x[2]**o + ((0.99818301623-0.30765806007j))*x[2]
            ref[(0, 3, 1, 0)]+=(-0.48380094662-0.482113642651j)*x_ref[2]**o + ((0.99818301623-0.30765806007j))*x_ref[2]
            arg[(0, 3, 1, 1)]+=(0.941208198711+0.14716136794j)*x[2]**o + ((0.449466701965-0.482538625623j))*x[2]
            ref[(0, 3, 1, 1)]+=(0.941208198711+0.14716136794j)*x_ref[2]**o + ((0.449466701965-0.482538625623j))*x_ref[2]
            arg[(0, 3, 1, 2)]+=(-0.476014155377-0.364158154529j)*x[2]**o + ((-0.479267710008-0.651828148961j))*x[2]
            ref[(0, 3, 1, 2)]+=(-0.476014155377-0.364158154529j)*x_ref[2]**o + ((-0.479267710008-0.651828148961j))*x_ref[2]
            arg[(0, 3, 1, 3)]+=(-0.686554805047+0.47344359688j)*x[2]**o + ((0.595314880359+0.589083504221j))*x[2]
            ref[(0, 3, 1, 3)]+=(-0.686554805047+0.47344359688j)*x_ref[2]**o + ((0.595314880359+0.589083504221j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.175061461576-0.918379075688j)*x[2]**o + ((-0.359062702646+0.95978264722j))*x[2]
            ref[(1, 0, 0, 0)]+=(-0.175061461576-0.918379075688j)*x_ref[2]**o + ((-0.359062702646+0.95978264722j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.288076093382-0.719010527903j)*x[2]**o + ((0.648214120343+0.436041092746j))*x[2]
            ref[(1, 0, 0, 1)]+=(0.288076093382-0.719010527903j)*x_ref[2]**o + ((0.648214120343+0.436041092746j))*x_ref[2]
            arg[(1, 0, 0, 2)]+=(0.414435412396-0.118029249513j)*x[2]**o + ((-0.624078532878-0.486231457185j))*x[2]
            ref[(1, 0, 0, 2)]+=(0.414435412396-0.118029249513j)*x_ref[2]**o + ((-0.624078532878-0.486231457185j))*x_ref[2]
            arg[(1, 0, 0, 3)]+=(-0.692502268268+0.178181841201j)*x[2]**o + ((0.254211436908+0.830523348144j))*x[2]
            ref[(1, 0, 0, 3)]+=(-0.692502268268+0.178181841201j)*x_ref[2]**o + ((0.254211436908+0.830523348144j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.995189458747+0.138603014514j)*x[2]**o + ((-0.359830158013-0.841030046912j))*x[2]
            ref[(1, 0, 1, 0)]+=(0.995189458747+0.138603014514j)*x_ref[2]**o + ((-0.359830158013-0.841030046912j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.616975213672+0.691151820721j)*x[2]**o + ((0.780273341999-0.758626486462j))*x[2]
            ref[(1, 0, 1, 1)]+=(0.616975213672+0.691151820721j)*x_ref[2]**o + ((0.780273341999-0.758626486462j))*x_ref[2]
            arg[(1, 0, 1, 2)]+=(-0.175781000345+0.0193135752801j)*x[2]**o + ((-0.508365962653-0.118471691789j))*x[2]
            ref[(1, 0, 1, 2)]+=(-0.175781000345+0.0193135752801j)*x_ref[2]**o + ((-0.508365962653-0.118471691789j))*x_ref[2]
            arg[(1, 0, 1, 3)]+=(0.561820299901-0.953571669069j)*x[2]**o + ((0.76579961639-0.23686874463j))*x[2]
            ref[(1, 0, 1, 3)]+=(0.561820299901-0.953571669069j)*x_ref[2]**o + ((0.76579961639-0.23686874463j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.602060148189-0.770272473233j)*x[2]**o + ((0.679189426321+0.509867541251j))*x[2]
            ref[(1, 1, 0, 0)]+=(-0.602060148189-0.770272473233j)*x_ref[2]**o + ((0.679189426321+0.509867541251j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.993931603018-0.667011347199j)*x[2]**o + ((0.434529144436-0.100776936181j))*x[2]
            ref[(1, 1, 0, 1)]+=(-0.993931603018-0.667011347199j)*x_ref[2]**o + ((0.434529144436-0.100776936181j))*x_ref[2]
            arg[(1, 1, 0, 2)]+=(0.888330397643+0.447978192217j)*x[2]**o + ((0.0575110528281+0.743280009909j))*x[2]
            ref[(1, 1, 0, 2)]+=(0.888330397643+0.447978192217j)*x_ref[2]**o + ((0.0575110528281+0.743280009909j))*x_ref[2]
            arg[(1, 1, 0, 3)]+=(0.0755409495525-0.861621868971j)*x[2]**o + ((-0.824290129819+0.249296088218j))*x[2]
            ref[(1, 1, 0, 3)]+=(0.0755409495525-0.861621868971j)*x_ref[2]**o + ((-0.824290129819+0.249296088218j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.208577750694-0.707244585327j)*x[2]**o + ((-0.456838295065-0.094355750169j))*x[2]
            ref[(1, 1, 1, 0)]+=(0.208577750694-0.707244585327j)*x_ref[2]**o + ((-0.456838295065-0.094355750169j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.200940205912+0.648048185159j)*x[2]**o + ((0.338716444852+0.506359491842j))*x[2]
            ref[(1, 1, 1, 1)]+=(-0.200940205912+0.648048185159j)*x_ref[2]**o + ((0.338716444852+0.506359491842j))*x_ref[2]
            arg[(1, 1, 1, 2)]+=(0.530844033668+0.427958123887j)*x[2]**o + ((0.983092358374-0.756924276772j))*x[2]
            ref[(1, 1, 1, 2)]+=(0.530844033668+0.427958123887j)*x_ref[2]**o + ((0.983092358374-0.756924276772j))*x_ref[2]
            arg[(1, 1, 1, 3)]+=(-0.17992737184-0.826585325792j)*x[2]**o + ((0.088436636584+0.0876237410775j))*x[2]
            ref[(1, 1, 1, 3)]+=(-0.17992737184-0.826585325792j)*x_ref[2]**o + ((0.088436636584+0.0876237410775j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(-0.0229262713613+0.855822185211j)*x[2]**o + ((0.674491898236+0.44567795353j))*x[2]
            ref[(1, 2, 0, 0)]+=(-0.0229262713613+0.855822185211j)*x_ref[2]**o + ((0.674491898236+0.44567795353j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(-0.511368613803-0.851076099925j)*x[2]**o + ((0.29233002977+0.382455595357j))*x[2]
            ref[(1, 2, 0, 1)]+=(-0.511368613803-0.851076099925j)*x_ref[2]**o + ((0.29233002977+0.382455595357j))*x_ref[2]
            arg[(1, 2, 0, 2)]+=(-0.031710030792+0.496978077204j)*x[2]**o + ((0.12299563254+0.489755383426j))*x[2]
            ref[(1, 2, 0, 2)]+=(-0.031710030792+0.496978077204j)*x_ref[2]**o + ((0.12299563254+0.489755383426j))*x_ref[2]
            arg[(1, 2, 0, 3)]+=(-0.51254514942-0.516911069905j)*x[2]**o + ((0.226683569839+0.263572608751j))*x[2]
            ref[(1, 2, 0, 3)]+=(-0.51254514942-0.516911069905j)*x_ref[2]**o + ((0.226683569839+0.263572608751j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(0.152928300963+0.186571029612j)*x[2]**o + ((0.0572652768537+0.648594482597j))*x[2]
            ref[(1, 2, 1, 0)]+=(0.152928300963+0.186571029612j)*x_ref[2]**o + ((0.0572652768537+0.648594482597j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(0.494831271904-0.392049633917j)*x[2]**o + ((0.262457384229+0.318542622859j))*x[2]
            ref[(1, 2, 1, 1)]+=(0.494831271904-0.392049633917j)*x_ref[2]**o + ((0.262457384229+0.318542622859j))*x_ref[2]
            arg[(1, 2, 1, 2)]+=(0.511097348349-0.564278847289j)*x[2]**o + ((0.369169012607+0.551487265887j))*x[2]
            ref[(1, 2, 1, 2)]+=(0.511097348349-0.564278847289j)*x_ref[2]**o + ((0.369169012607+0.551487265887j))*x_ref[2]
            arg[(1, 2, 1, 3)]+=(-0.858826409769-0.63992080046j)*x[2]**o + ((-0.757703922497-0.949769144687j))*x[2]
            ref[(1, 2, 1, 3)]+=(-0.858826409769-0.63992080046j)*x_ref[2]**o + ((-0.757703922497-0.949769144687j))*x_ref[2]
            arg[(1, 3, 0, 0)]+=(0.87466487719+0.439582353617j)*x[2]**o + ((-0.302543190582-0.307983714238j))*x[2]
            ref[(1, 3, 0, 0)]+=(0.87466487719+0.439582353617j)*x_ref[2]**o + ((-0.302543190582-0.307983714238j))*x_ref[2]
            arg[(1, 3, 0, 1)]+=(-0.071769771875-0.95941201128j)*x[2]**o + ((0.633171236322-0.0947587832139j))*x[2]
            ref[(1, 3, 0, 1)]+=(-0.071769771875-0.95941201128j)*x_ref[2]**o + ((0.633171236322-0.0947587832139j))*x_ref[2]
            arg[(1, 3, 0, 2)]+=(0.574263242667+0.976565483201j)*x[2]**o + ((-0.439496789424-0.254618843295j))*x[2]
            ref[(1, 3, 0, 2)]+=(0.574263242667+0.976565483201j)*x_ref[2]**o + ((-0.439496789424-0.254618843295j))*x_ref[2]
            arg[(1, 3, 0, 3)]+=(-0.159555358901+0.389717685832j)*x[2]**o + ((0.232457053708+0.531129432168j))*x[2]
            ref[(1, 3, 0, 3)]+=(-0.159555358901+0.389717685832j)*x_ref[2]**o + ((0.232457053708+0.531129432168j))*x_ref[2]
            arg[(1, 3, 1, 0)]+=(0.657457680604-0.348064600528j)*x[2]**o + ((0.555029420831-0.118160911992j))*x[2]
            ref[(1, 3, 1, 0)]+=(0.657457680604-0.348064600528j)*x_ref[2]**o + ((0.555029420831-0.118160911992j))*x_ref[2]
            arg[(1, 3, 1, 1)]+=(0.547981327119+0.857449764269j)*x[2]**o + ((0.488722646899+0.436957596594j))*x[2]
            ref[(1, 3, 1, 1)]+=(0.547981327119+0.857449764269j)*x_ref[2]**o + ((0.488722646899+0.436957596594j))*x_ref[2]
            arg[(1, 3, 1, 2)]+=(0.686474655893-0.105725946095j)*x[2]**o + ((0.88638248961-0.66439724088j))*x[2]
            ref[(1, 3, 1, 2)]+=(0.686474655893-0.105725946095j)*x_ref[2]**o + ((0.88638248961-0.66439724088j))*x_ref[2]
            arg[(1, 3, 1, 3)]+=(0.750283634039+0.324632253502j)*x[2]**o + ((-0.446664509213+0.948630138303j))*x[2]
            ref[(1, 3, 1, 3)]+=(0.750283634039+0.324632253502j)*x_ref[2]**o + ((-0.446664509213+0.948630138303j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(-0.563215846768+0.558626267351j)*x[2]**o + ((0.0734029805571-0.966705632999j))*x[2]
            ref[(2, 0, 0, 0)]+=(-0.563215846768+0.558626267351j)*x_ref[2]**o + ((0.0734029805571-0.966705632999j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(0.785918721578+0.758991126788j)*x[2]**o + ((-0.787903283387-0.883215567333j))*x[2]
            ref[(2, 0, 0, 1)]+=(0.785918721578+0.758991126788j)*x_ref[2]**o + ((-0.787903283387-0.883215567333j))*x_ref[2]
            arg[(2, 0, 0, 2)]+=(-0.101817889757+0.0492919031355j)*x[2]**o + ((0.722653711467-0.271361191633j))*x[2]
            ref[(2, 0, 0, 2)]+=(-0.101817889757+0.0492919031355j)*x_ref[2]**o + ((0.722653711467-0.271361191633j))*x_ref[2]
            arg[(2, 0, 0, 3)]+=(0.314012311743-0.433123997208j)*x[2]**o + ((-0.628898359293+0.039081255951j))*x[2]
            ref[(2, 0, 0, 3)]+=(0.314012311743-0.433123997208j)*x_ref[2]**o + ((-0.628898359293+0.039081255951j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(0.752315184123+0.927941473079j)*x[2]**o + ((-0.864584649914+0.74639108306j))*x[2]
            ref[(2, 0, 1, 0)]+=(0.752315184123+0.927941473079j)*x_ref[2]**o + ((-0.864584649914+0.74639108306j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(-0.706725535703+0.736669429785j)*x[2]**o + ((-0.193767589162+0.893367480644j))*x[2]
            ref[(2, 0, 1, 1)]+=(-0.706725535703+0.736669429785j)*x_ref[2]**o + ((-0.193767589162+0.893367480644j))*x_ref[2]
            arg[(2, 0, 1, 2)]+=(-0.750033043674+0.252680199302j)*x[2]**o + ((-0.872086188088+0.975180788599j))*x[2]
            ref[(2, 0, 1, 2)]+=(-0.750033043674+0.252680199302j)*x_ref[2]**o + ((-0.872086188088+0.975180788599j))*x_ref[2]
            arg[(2, 0, 1, 3)]+=(0.0658111648714-0.750495655187j)*x[2]**o + ((0.4123421529+0.432713280814j))*x[2]
            ref[(2, 0, 1, 3)]+=(0.0658111648714-0.750495655187j)*x_ref[2]**o + ((0.4123421529+0.432713280814j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(0.585769576273+0.446503914608j)*x[2]**o + ((-0.850557309709+0.599222024209j))*x[2]
            ref[(2, 1, 0, 0)]+=(0.585769576273+0.446503914608j)*x_ref[2]**o + ((-0.850557309709+0.599222024209j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(-0.345068153079-0.267051727619j)*x[2]**o + ((0.154220931043-0.100990899722j))*x[2]
            ref[(2, 1, 0, 1)]+=(-0.345068153079-0.267051727619j)*x_ref[2]**o + ((0.154220931043-0.100990899722j))*x_ref[2]
            arg[(2, 1, 0, 2)]+=(-0.952969722492+0.148410200535j)*x[2]**o + ((-0.816634451734+0.0865160231591j))*x[2]
            ref[(2, 1, 0, 2)]+=(-0.952969722492+0.148410200535j)*x_ref[2]**o + ((-0.816634451734+0.0865160231591j))*x_ref[2]
            arg[(2, 1, 0, 3)]+=(0.535404301687+0.392085596098j)*x[2]**o + ((0.459504016144-0.410002333002j))*x[2]
            ref[(2, 1, 0, 3)]+=(0.535404301687+0.392085596098j)*x_ref[2]**o + ((0.459504016144-0.410002333002j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(-0.706015049974+0.765439515163j)*x[2]**o + ((-0.366614553822-0.427845593181j))*x[2]
            ref[(2, 1, 1, 0)]+=(-0.706015049974+0.765439515163j)*x_ref[2]**o + ((-0.366614553822-0.427845593181j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(-0.831453496149+0.477804369688j)*x[2]**o + ((0.262150798607-0.343416783755j))*x[2]
            ref[(2, 1, 1, 1)]+=(-0.831453496149+0.477804369688j)*x_ref[2]**o + ((0.262150798607-0.343416783755j))*x_ref[2]
            arg[(2, 1, 1, 2)]+=(-0.828206857857+0.78968534078j)*x[2]**o + ((-0.958735256212-0.272409032501j))*x[2]
            ref[(2, 1, 1, 2)]+=(-0.828206857857+0.78968534078j)*x_ref[2]**o + ((-0.958735256212-0.272409032501j))*x_ref[2]
            arg[(2, 1, 1, 3)]+=(-0.902834313179-0.396452475465j)*x[2]**o + ((-0.769110164241+0.959344492805j))*x[2]
            ref[(2, 1, 1, 3)]+=(-0.902834313179-0.396452475465j)*x_ref[2]**o + ((-0.769110164241+0.959344492805j))*x_ref[2]
            arg[(2, 2, 0, 0)]+=(0.604896726333-0.805527015765j)*x[2]**o + ((-0.542454689995+0.570663002992j))*x[2]
            ref[(2, 2, 0, 0)]+=(0.604896726333-0.805527015765j)*x_ref[2]**o + ((-0.542454689995+0.570663002992j))*x_ref[2]
            arg[(2, 2, 0, 1)]+=(-0.401003607847+0.29798570985j)*x[2]**o + ((-0.898793358821+0.938597336625j))*x[2]
            ref[(2, 2, 0, 1)]+=(-0.401003607847+0.29798570985j)*x_ref[2]**o + ((-0.898793358821+0.938597336625j))*x_ref[2]
            arg[(2, 2, 0, 2)]+=(0.828074631313-0.692059967693j)*x[2]**o + ((0.882817076033-0.331474669579j))*x[2]
            ref[(2, 2, 0, 2)]+=(0.828074631313-0.692059967693j)*x_ref[2]**o + ((0.882817076033-0.331474669579j))*x_ref[2]
            arg[(2, 2, 0, 3)]+=(-0.101524859673-0.0595987484813j)*x[2]**o + ((0.149233550597+0.441670827223j))*x[2]
            ref[(2, 2, 0, 3)]+=(-0.101524859673-0.0595987484813j)*x_ref[2]**o + ((0.149233550597+0.441670827223j))*x_ref[2]
            arg[(2, 2, 1, 0)]+=(-0.582545860312-0.83830829626j)*x[2]**o + ((0.228702368312+0.570676086953j))*x[2]
            ref[(2, 2, 1, 0)]+=(-0.582545860312-0.83830829626j)*x_ref[2]**o + ((0.228702368312+0.570676086953j))*x_ref[2]
            arg[(2, 2, 1, 1)]+=(-0.664848072226+0.167816751266j)*x[2]**o + ((-0.425083820532-0.386688819501j))*x[2]
            ref[(2, 2, 1, 1)]+=(-0.664848072226+0.167816751266j)*x_ref[2]**o + ((-0.425083820532-0.386688819501j))*x_ref[2]
            arg[(2, 2, 1, 2)]+=(-0.0114659433317+0.118921848778j)*x[2]**o + ((-0.207596521303-0.453150425439j))*x[2]
            ref[(2, 2, 1, 2)]+=(-0.0114659433317+0.118921848778j)*x_ref[2]**o + ((-0.207596521303-0.453150425439j))*x_ref[2]
            arg[(2, 2, 1, 3)]+=(-0.322703901887-0.297790816928j)*x[2]**o + ((-0.810327209785+0.454574060687j))*x[2]
            ref[(2, 2, 1, 3)]+=(-0.322703901887-0.297790816928j)*x_ref[2]**o + ((-0.810327209785+0.454574060687j))*x_ref[2]
            arg[(2, 3, 0, 0)]+=(-0.406845672646-0.740406810808j)*x[2]**o + ((0.1219328959+0.63460245615j))*x[2]
            ref[(2, 3, 0, 0)]+=(-0.406845672646-0.740406810808j)*x_ref[2]**o + ((0.1219328959+0.63460245615j))*x_ref[2]
            arg[(2, 3, 0, 1)]+=(0.139687071064+0.581109297408j)*x[2]**o + ((0.633557901548+0.326511443587j))*x[2]
            ref[(2, 3, 0, 1)]+=(0.139687071064+0.581109297408j)*x_ref[2]**o + ((0.633557901548+0.326511443587j))*x_ref[2]
            arg[(2, 3, 0, 2)]+=(-0.231565186986-0.00511963375614j)*x[2]**o + ((-0.89737187806+0.1558400865j))*x[2]
            ref[(2, 3, 0, 2)]+=(-0.231565186986-0.00511963375614j)*x_ref[2]**o + ((-0.89737187806+0.1558400865j))*x_ref[2]
            arg[(2, 3, 0, 3)]+=(-0.428337046968+0.64002715994j)*x[2]**o + ((0.723639068291-0.480079649599j))*x[2]
            ref[(2, 3, 0, 3)]+=(-0.428337046968+0.64002715994j)*x_ref[2]**o + ((0.723639068291-0.480079649599j))*x_ref[2]
            arg[(2, 3, 1, 0)]+=(-0.577424350795-0.374715972257j)*x[2]**o + ((-0.560003459033-0.544017704064j))*x[2]
            ref[(2, 3, 1, 0)]+=(-0.577424350795-0.374715972257j)*x_ref[2]**o + ((-0.560003459033-0.544017704064j))*x_ref[2]
            arg[(2, 3, 1, 1)]+=(-0.052933596699-0.882076347433j)*x[2]**o + ((0.251975958543+0.031093452755j))*x[2]
            ref[(2, 3, 1, 1)]+=(-0.052933596699-0.882076347433j)*x_ref[2]**o + ((0.251975958543+0.031093452755j))*x_ref[2]
            arg[(2, 3, 1, 2)]+=(-0.869389771609-0.0746630308739j)*x[2]**o + ((0.952473892083+0.988223976737j))*x[2]
            ref[(2, 3, 1, 2)]+=(-0.869389771609-0.0746630308739j)*x_ref[2]**o + ((0.952473892083+0.988223976737j))*x_ref[2]
            arg[(2, 3, 1, 3)]+=(0.12628189062-0.575507942497j)*x[2]**o + ((0.383700916484+0.157858491473j))*x[2]
            ref[(2, 3, 1, 3)]+=(0.12628189062-0.575507942497j)*x_ref[2]**o + ((0.383700916484+0.157858491473j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onSolution_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on Solution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.735798994642+0.955808247938j)*x[0]**o + ((0.519974896354+0.642261017771j))*x[0] + ((0.53976066592-0.0586209191561j))*x[1]**o + ((0.537700304841+0.631273776912j))*x[1]
        ref=(0.735798994642+0.955808247938j)*x_ref[0]**o + ((0.519974896354+0.642261017771j))*x_ref[0] + ((0.53976066592-0.0586209191561j))*x_ref[1]**o + ((0.537700304841+0.631273776912j))*x_ref[1]
        if dim==3:
            arg+=((0.703283625669+0.0623145791446j))*x[2]**o + ((0.278211092798+0.968673850623j))*x[2]
            ref+=((0.703283625669+0.0623145791446j))*x_ref[2]**o + ((0.278211092798+0.968673850623j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onSolution_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on Solution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=(0.958213558985+0.446770620332j)*x[0]**o + ((-0.942077917784-0.182255972476j))*x[0] + ((-0.283976821998-0.834761429711j))*x[1]**o + ((-0.49835258636+0.775464698955j))*x[1]
        ref[(0,)]=(0.958213558985+0.446770620332j)*x_ref[0]**o + ((-0.942077917784-0.182255972476j))*x_ref[0] + ((-0.283976821998-0.834761429711j))*x_ref[1]**o + ((-0.49835258636+0.775464698955j))*x_ref[1]
        arg[(1,)]=(0.938166818282+0.926445249392j)*x[0]**o + ((0.19475750386-0.690828614902j))*x[0] + ((0.165824873033+0.755533584642j))*x[1]**o + ((0.958013364918-0.580073183741j))*x[1]
        ref[(1,)]=(0.938166818282+0.926445249392j)*x_ref[0]**o + ((0.19475750386-0.690828614902j))*x_ref[0] + ((0.165824873033+0.755533584642j))*x_ref[1]**o + ((0.958013364918-0.580073183741j))*x_ref[1]
        arg[(2,)]=(0.889028063693+0.203581667341j)*x[0]**o + ((0.0477223534959-0.123524082365j))*x[0] + ((0.865003549311+0.849864648001j))*x[1]**o + ((0.27767111774+0.822485460294j))*x[1]
        ref[(2,)]=(0.889028063693+0.203581667341j)*x_ref[0]**o + ((0.0477223534959-0.123524082365j))*x_ref[0] + ((0.865003549311+0.849864648001j))*x_ref[1]**o + ((0.27767111774+0.822485460294j))*x_ref[1]
        arg[(3,)]=(0.652354215287-0.340434613159j)*x[0]**o + ((0.0966840415579+0.851157267091j))*x[0] + ((-0.902464195074+0.711961885531j))*x[1]**o + ((0.0165158407156-0.064403788017j))*x[1]
        ref[(3,)]=(0.652354215287-0.340434613159j)*x_ref[0]**o + ((0.0966840415579+0.851157267091j))*x_ref[0] + ((-0.902464195074+0.711961885531j))*x_ref[1]**o + ((0.0165158407156-0.064403788017j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.00158032142199-0.88792447913j)*x[2]**o + ((-0.371226962904+0.777710853251j))*x[2]
            ref[(0,)]+=(0.00158032142199-0.88792447913j)*x_ref[2]**o + ((-0.371226962904+0.777710853251j))*x_ref[2]
            arg[(1,)]+=(-0.182076618636-0.153924113922j)*x[2]**o + ((0.336370089179-0.305066965851j))*x[2]
            ref[(1,)]+=(-0.182076618636-0.153924113922j)*x_ref[2]**o + ((0.336370089179-0.305066965851j))*x_ref[2]
            arg[(2,)]+=(-0.996105905117-0.327943755939j)*x[2]**o + ((-0.567410982314+0.297582138546j))*x[2]
            ref[(2,)]+=(-0.996105905117-0.327943755939j)*x_ref[2]**o + ((-0.567410982314+0.297582138546j))*x_ref[2]
            arg[(3,)]+=(0.939799689783-0.717809573779j)*x[2]**o + ((-0.311329290017+0.360079508068j))*x[2]
            ref[(3,)]+=(0.939799689783-0.717809573779j)*x_ref[2]**o + ((-0.311329290017+0.360079508068j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onSolution_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on Solution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2),w)
        ref = Data(0,(3, 2),w_ref)
        arg[(0, 0)]=(0.402535135032-0.0333640737596j)*x[0]**o + ((0.0380512083417-0.672290157543j))*x[0] + ((0.325450839238+0.223592376862j))*x[1]**o + ((0.520757869641-0.730712835329j))*x[1]
        ref[(0, 0)]=(0.402535135032-0.0333640737596j)*x_ref[0]**o + ((0.0380512083417-0.672290157543j))*x_ref[0] + ((0.325450839238+0.223592376862j))*x_ref[1]**o + ((0.520757869641-0.730712835329j))*x_ref[1]
        arg[(0, 1)]=(-0.0143692203982-0.55124958256j)*x[0]**o + ((-0.906348190632+0.230939945679j))*x[0] + ((-0.0778712525068+0.868141216009j))*x[1]**o + ((-0.902223626395+0.412945614989j))*x[1]
        ref[(0, 1)]=(-0.0143692203982-0.55124958256j)*x_ref[0]**o + ((-0.906348190632+0.230939945679j))*x_ref[0] + ((-0.0778712525068+0.868141216009j))*x_ref[1]**o + ((-0.902223626395+0.412945614989j))*x_ref[1]
        arg[(1, 0)]=(-0.773629820187+0.743960535069j)*x[0]**o + ((-0.292288020482-0.346964921702j))*x[0] + ((0.402822465426+0.222252087687j))*x[1]**o + ((0.82585381078+0.230830721092j))*x[1]
        ref[(1, 0)]=(-0.773629820187+0.743960535069j)*x_ref[0]**o + ((-0.292288020482-0.346964921702j))*x_ref[0] + ((0.402822465426+0.222252087687j))*x_ref[1]**o + ((0.82585381078+0.230830721092j))*x_ref[1]
        arg[(1, 1)]=(0.286583410075+0.00619590183564j)*x[0]**o + ((0.432613482206-0.997900757948j))*x[0] + ((0.745932383911+0.395048612077j))*x[1]**o + ((-0.178505476283-0.429044902351j))*x[1]
        ref[(1, 1)]=(0.286583410075+0.00619590183564j)*x_ref[0]**o + ((0.432613482206-0.997900757948j))*x_ref[0] + ((0.745932383911+0.395048612077j))*x_ref[1]**o + ((-0.178505476283-0.429044902351j))*x_ref[1]
        arg[(2, 0)]=(-0.88002044543-0.532046918528j)*x[0]**o + ((0.8073490877-0.00296575635998j))*x[0] + ((0.107203427895+0.591267680235j))*x[1]**o + ((-0.413283124186-0.653439061705j))*x[1]
        ref[(2, 0)]=(-0.88002044543-0.532046918528j)*x_ref[0]**o + ((0.8073490877-0.00296575635998j))*x_ref[0] + ((0.107203427895+0.591267680235j))*x_ref[1]**o + ((-0.413283124186-0.653439061705j))*x_ref[1]
        arg[(2, 1)]=(0.0991118871423-0.996735757637j)*x[0]**o + ((-0.129614608449-0.659773157659j))*x[0] + ((0.443078983942-0.0675884607821j))*x[1]**o + ((0.638500970844-0.234988513883j))*x[1]
        ref[(2, 1)]=(0.0991118871423-0.996735757637j)*x_ref[0]**o + ((-0.129614608449-0.659773157659j))*x_ref[0] + ((0.443078983942-0.0675884607821j))*x_ref[1]**o + ((0.638500970844-0.234988513883j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(-0.393602117366-0.0387058620655j)*x[2]**o + ((-0.39229022677+0.840869935696j))*x[2]
            ref[(0, 0)]+=(-0.393602117366-0.0387058620655j)*x_ref[2]**o + ((-0.39229022677+0.840869935696j))*x_ref[2]
            arg[(0, 1)]+=(-0.19895091923+0.569279980016j)*x[2]**o + ((0.952792552704-0.820056116654j))*x[2]
            ref[(0, 1)]+=(-0.19895091923+0.569279980016j)*x_ref[2]**o + ((0.952792552704-0.820056116654j))*x_ref[2]
            arg[(1, 0)]+=(0.697269380643+0.292238229747j)*x[2]**o + ((0.879689823015-0.104258091079j))*x[2]
            ref[(1, 0)]+=(0.697269380643+0.292238229747j)*x_ref[2]**o + ((0.879689823015-0.104258091079j))*x_ref[2]
            arg[(1, 1)]+=(0.909545213604+0.278445173528j)*x[2]**o + ((0.0344747980961+0.552765334541j))*x[2]
            ref[(1, 1)]+=(0.909545213604+0.278445173528j)*x_ref[2]**o + ((0.0344747980961+0.552765334541j))*x_ref[2]
            arg[(2, 0)]+=(0.54593116848-0.747645087177j)*x[2]**o + ((-0.824046044739+0.11844855798j))*x[2]
            ref[(2, 0)]+=(0.54593116848-0.747645087177j)*x_ref[2]**o + ((-0.824046044739+0.11844855798j))*x_ref[2]
            arg[(2, 1)]+=(-0.159259643335-0.581195749015j)*x[2]**o + ((-0.105854296861-0.0774827232597j))*x[2]
            ref[(2, 1)]+=(-0.159259643335-0.581195749015j)*x_ref[2]**o + ((-0.105854296861-0.0774827232597j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onSolution_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on Solution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 2),w)
        ref = Data(0,(2, 3, 2),w_ref)
        arg[(0, 0, 0)]=(-0.250079386346+0.208176115861j)*x[0]**o + ((0.447241103437+0.590151640373j))*x[0] + ((0.902053271896+0.85793610962j))*x[1]**o + ((0.731828283188+0.332720885363j))*x[1]
        ref[(0, 0, 0)]=(-0.250079386346+0.208176115861j)*x_ref[0]**o + ((0.447241103437+0.590151640373j))*x_ref[0] + ((0.902053271896+0.85793610962j))*x_ref[1]**o + ((0.731828283188+0.332720885363j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.552748084877-0.894773325555j)*x[0]**o + ((0.188006949667-0.0426748765611j))*x[0] + ((-0.870437309854-0.121024911796j))*x[1]**o + ((-0.228580080113-0.0530227860758j))*x[1]
        ref[(0, 0, 1)]=(-0.552748084877-0.894773325555j)*x_ref[0]**o + ((0.188006949667-0.0426748765611j))*x_ref[0] + ((-0.870437309854-0.121024911796j))*x_ref[1]**o + ((-0.228580080113-0.0530227860758j))*x_ref[1]
        arg[(0, 1, 0)]=(0.833587593129-0.530067790265j)*x[0]**o + ((0.0647578001834-0.0601409320828j))*x[0] + ((0.689645139828-0.744252050834j))*x[1]**o + ((-0.538817391965+0.0962932253136j))*x[1]
        ref[(0, 1, 0)]=(0.833587593129-0.530067790265j)*x_ref[0]**o + ((0.0647578001834-0.0601409320828j))*x_ref[0] + ((0.689645139828-0.744252050834j))*x_ref[1]**o + ((-0.538817391965+0.0962932253136j))*x_ref[1]
        arg[(0, 1, 1)]=(0.628470993374-0.916333934454j)*x[0]**o + ((0.457325792464-0.0148270656632j))*x[0] + ((0.24045525816+0.196503012521j))*x[1]**o + ((-0.797060727881-0.989111651072j))*x[1]
        ref[(0, 1, 1)]=(0.628470993374-0.916333934454j)*x_ref[0]**o + ((0.457325792464-0.0148270656632j))*x_ref[0] + ((0.24045525816+0.196503012521j))*x_ref[1]**o + ((-0.797060727881-0.989111651072j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.917670739543-0.460927188566j)*x[0]**o + ((-0.853776089553-0.919107179923j))*x[0] + ((0.616585536684+0.0787027685046j))*x[1]**o + ((-0.744690544761+0.666249056559j))*x[1]
        ref[(0, 2, 0)]=(-0.917670739543-0.460927188566j)*x_ref[0]**o + ((-0.853776089553-0.919107179923j))*x_ref[0] + ((0.616585536684+0.0787027685046j))*x_ref[1]**o + ((-0.744690544761+0.666249056559j))*x_ref[1]
        arg[(0, 2, 1)]=(-0.198488941991-0.870639963764j)*x[0]**o + ((-0.682378315474-0.729975175475j))*x[0] + ((0.276002460448+0.0606465682119j))*x[1]**o + ((-0.148304656853-0.351179512601j))*x[1]
        ref[(0, 2, 1)]=(-0.198488941991-0.870639963764j)*x_ref[0]**o + ((-0.682378315474-0.729975175475j))*x_ref[0] + ((0.276002460448+0.0606465682119j))*x_ref[1]**o + ((-0.148304656853-0.351179512601j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.00467918752573+0.793496591839j)*x[0]**o + ((-0.186479879355-0.985408143923j))*x[0] + ((0.819785217234-0.645154244685j))*x[1]**o + ((0.0167033964616-0.643515087556j))*x[1]
        ref[(1, 0, 0)]=(-0.00467918752573+0.793496591839j)*x_ref[0]**o + ((-0.186479879355-0.985408143923j))*x_ref[0] + ((0.819785217234-0.645154244685j))*x_ref[1]**o + ((0.0167033964616-0.643515087556j))*x_ref[1]
        arg[(1, 0, 1)]=(0.83829501811+0.261652621581j)*x[0]**o + ((0.251034313373+0.969874421241j))*x[0] + ((-0.701215701613-0.903345245458j))*x[1]**o + ((0.547548662103-0.308423024271j))*x[1]
        ref[(1, 0, 1)]=(0.83829501811+0.261652621581j)*x_ref[0]**o + ((0.251034313373+0.969874421241j))*x_ref[0] + ((-0.701215701613-0.903345245458j))*x_ref[1]**o + ((0.547548662103-0.308423024271j))*x_ref[1]
        arg[(1, 1, 0)]=(0.992257242617-0.277504870173j)*x[0]**o + ((-0.32365349615+0.432751213022j))*x[0] + ((-0.18030422922+0.977832467621j))*x[1]**o + ((0.741950840474-0.182651178899j))*x[1]
        ref[(1, 1, 0)]=(0.992257242617-0.277504870173j)*x_ref[0]**o + ((-0.32365349615+0.432751213022j))*x_ref[0] + ((-0.18030422922+0.977832467621j))*x_ref[1]**o + ((0.741950840474-0.182651178899j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.686362285499+0.303149280683j)*x[0]**o + ((-0.290731788115+0.707652919606j))*x[0] + ((0.635731753167+0.138540841091j))*x[1]**o + ((-0.0335255915864-0.918784935834j))*x[1]
        ref[(1, 1, 1)]=(-0.686362285499+0.303149280683j)*x_ref[0]**o + ((-0.290731788115+0.707652919606j))*x_ref[0] + ((0.635731753167+0.138540841091j))*x_ref[1]**o + ((-0.0335255915864-0.918784935834j))*x_ref[1]
        arg[(1, 2, 0)]=(0.520504126491+0.0529826051104j)*x[0]**o + ((0.0220764255183-0.613935624211j))*x[0] + ((0.211228208288-0.727844637052j))*x[1]**o + ((0.337467209444+0.367052326723j))*x[1]
        ref[(1, 2, 0)]=(0.520504126491+0.0529826051104j)*x_ref[0]**o + ((0.0220764255183-0.613935624211j))*x_ref[0] + ((0.211228208288-0.727844637052j))*x_ref[1]**o + ((0.337467209444+0.367052326723j))*x_ref[1]
        arg[(1, 2, 1)]=(0.51372829249-0.109995526231j)*x[0]**o + ((-0.703219585163-0.211137190208j))*x[0] + ((-0.982892045617-0.904298185113j))*x[1]**o + ((-0.96909456487-0.821829863891j))*x[1]
        ref[(1, 2, 1)]=(0.51372829249-0.109995526231j)*x_ref[0]**o + ((-0.703219585163-0.211137190208j))*x_ref[0] + ((-0.982892045617-0.904298185113j))*x_ref[1]**o + ((-0.96909456487-0.821829863891j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.0715784417284+0.131363792035j)*x[2]**o + ((0.196816481061+0.983837672125j))*x[2]
            ref[(0, 0, 0)]+=(0.0715784417284+0.131363792035j)*x_ref[2]**o + ((0.196816481061+0.983837672125j))*x_ref[2]
            arg[(0, 0, 1)]+=(0.136828825476+0.356442649803j)*x[2]**o + ((-0.288968871212-0.542560863175j))*x[2]
            ref[(0, 0, 1)]+=(0.136828825476+0.356442649803j)*x_ref[2]**o + ((-0.288968871212-0.542560863175j))*x_ref[2]
            arg[(0, 1, 0)]+=(0.270167610619+0.645108960308j)*x[2]**o + ((-0.77108463253+0.702717612843j))*x[2]
            ref[(0, 1, 0)]+=(0.270167610619+0.645108960308j)*x_ref[2]**o + ((-0.77108463253+0.702717612843j))*x_ref[2]
            arg[(0, 1, 1)]+=(-0.821260987854-0.725426126679j)*x[2]**o + ((-0.95704356629+0.892077458633j))*x[2]
            ref[(0, 1, 1)]+=(-0.821260987854-0.725426126679j)*x_ref[2]**o + ((-0.95704356629+0.892077458633j))*x_ref[2]
            arg[(0, 2, 0)]+=(0.36932702824+0.161357559434j)*x[2]**o + ((-0.870212234957+0.63285420469j))*x[2]
            ref[(0, 2, 0)]+=(0.36932702824+0.161357559434j)*x_ref[2]**o + ((-0.870212234957+0.63285420469j))*x_ref[2]
            arg[(0, 2, 1)]+=(-0.464331846684+0.391232368873j)*x[2]**o + ((0.0936344462043+0.787758907113j))*x[2]
            ref[(0, 2, 1)]+=(-0.464331846684+0.391232368873j)*x_ref[2]**o + ((0.0936344462043+0.787758907113j))*x_ref[2]
            arg[(1, 0, 0)]+=(0.642088953036-0.838105121715j)*x[2]**o + ((-0.957536636992-0.467235531945j))*x[2]
            ref[(1, 0, 0)]+=(0.642088953036-0.838105121715j)*x_ref[2]**o + ((-0.957536636992-0.467235531945j))*x_ref[2]
            arg[(1, 0, 1)]+=(-0.0220079242485+0.550098883403j)*x[2]**o + ((0.119931016134+0.87276689251j))*x[2]
            ref[(1, 0, 1)]+=(-0.0220079242485+0.550098883403j)*x_ref[2]**o + ((0.119931016134+0.87276689251j))*x_ref[2]
            arg[(1, 1, 0)]+=(0.927084234017-0.538407298345j)*x[2]**o + ((-0.0523559992338-0.920918781635j))*x[2]
            ref[(1, 1, 0)]+=(0.927084234017-0.538407298345j)*x_ref[2]**o + ((-0.0523559992338-0.920918781635j))*x_ref[2]
            arg[(1, 1, 1)]+=(-0.851783419593+0.555850355762j)*x[2]**o + ((0.0394868238854-0.784462769938j))*x[2]
            ref[(1, 1, 1)]+=(-0.851783419593+0.555850355762j)*x_ref[2]**o + ((0.0394868238854-0.784462769938j))*x_ref[2]
            arg[(1, 2, 0)]+=(0.211375835688+0.478843246915j)*x[2]**o + ((0.78011128934-0.950992010498j))*x[2]
            ref[(1, 2, 0)]+=(0.211375835688+0.478843246915j)*x_ref[2]**o + ((0.78011128934-0.950992010498j))*x_ref[2]
            arg[(1, 2, 1)]+=(-0.246805210927-0.886736649131j)*x[2]**o + ((-0.257960508024+0.608065957021j))*x[2]
            ref[(1, 2, 1)]+=(-0.246805210927-0.886736649131j)*x_ref[2]**o + ((-0.257960508024+0.608065957021j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onSolution_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on Solution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 3, 4),w)
        ref = Data(0,(3, 2, 3, 4),w_ref)
        arg[(0, 0, 0, 0)]=(-0.187424578829-0.897483524829j)*x[0]**o + ((-0.732647173119-0.433533869097j))*x[0] + ((-0.344157054504-0.332508468326j))*x[1]**o + ((-0.543577088872-0.381261168851j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.187424578829-0.897483524829j)*x_ref[0]**o + ((-0.732647173119-0.433533869097j))*x_ref[0] + ((-0.344157054504-0.332508468326j))*x_ref[1]**o + ((-0.543577088872-0.381261168851j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(0.53980641783+0.740247536382j)*x[0]**o + ((0.192646804245-0.778875736889j))*x[0] + ((-0.360199675965+0.732813798679j))*x[1]**o + ((-0.031012198892-0.874725880548j))*x[1]
        ref[(0, 0, 0, 1)]=(0.53980641783+0.740247536382j)*x_ref[0]**o + ((0.192646804245-0.778875736889j))*x_ref[0] + ((-0.360199675965+0.732813798679j))*x_ref[1]**o + ((-0.031012198892-0.874725880548j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.895249060362+0.39929835778j)*x[0]**o + ((0.362622313805+0.76031370277j))*x[0] + ((0.562915854988-0.532134883433j))*x[1]**o + ((0.653277361504-0.320978778281j))*x[1]
        ref[(0, 0, 0, 2)]=(0.895249060362+0.39929835778j)*x_ref[0]**o + ((0.362622313805+0.76031370277j))*x_ref[0] + ((0.562915854988-0.532134883433j))*x_ref[1]**o + ((0.653277361504-0.320978778281j))*x_ref[1]
        arg[(0, 0, 0, 3)]=(0.72576752224+0.845149735524j)*x[0]**o + ((0.783935918682+0.154673715058j))*x[0] + ((-0.726301920823-0.437514915197j))*x[1]**o + ((0.585924041229-0.321090537942j))*x[1]
        ref[(0, 0, 0, 3)]=(0.72576752224+0.845149735524j)*x_ref[0]**o + ((0.783935918682+0.154673715058j))*x_ref[0] + ((-0.726301920823-0.437514915197j))*x_ref[1]**o + ((0.585924041229-0.321090537942j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.168469399824-0.552805781457j)*x[0]**o + ((-0.283749564397-0.572208077173j))*x[0] + ((-0.788170977733-0.0204255048911j))*x[1]**o + ((0.251984025713+0.0875867694317j))*x[1]
        ref[(0, 0, 1, 0)]=(0.168469399824-0.552805781457j)*x_ref[0]**o + ((-0.283749564397-0.572208077173j))*x_ref[0] + ((-0.788170977733-0.0204255048911j))*x_ref[1]**o + ((0.251984025713+0.0875867694317j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.825578799376-0.445140744607j)*x[0]**o + ((0.869034490261-0.00598952279023j))*x[0] + ((-0.87966289018-0.990465860708j))*x[1]**o + ((0.89085285132-0.0546209899284j))*x[1]
        ref[(0, 0, 1, 1)]=(0.825578799376-0.445140744607j)*x_ref[0]**o + ((0.869034490261-0.00598952279023j))*x_ref[0] + ((-0.87966289018-0.990465860708j))*x_ref[1]**o + ((0.89085285132-0.0546209899284j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(0.249336342819-0.525900779191j)*x[0]**o + ((0.716915373217+0.141145499491j))*x[0] + ((-0.79398710402+0.8877052069j))*x[1]**o + ((0.223789920527+0.0280700581076j))*x[1]
        ref[(0, 0, 1, 2)]=(0.249336342819-0.525900779191j)*x_ref[0]**o + ((0.716915373217+0.141145499491j))*x_ref[0] + ((-0.79398710402+0.8877052069j))*x_ref[1]**o + ((0.223789920527+0.0280700581076j))*x_ref[1]
        arg[(0, 0, 1, 3)]=(0.446944497053-0.315695285238j)*x[0]**o + ((-0.976598524826-0.895939058953j))*x[0] + ((-0.980620356362+0.768567284193j))*x[1]**o + ((0.448632471004+0.217175493337j))*x[1]
        ref[(0, 0, 1, 3)]=(0.446944497053-0.315695285238j)*x_ref[0]**o + ((-0.976598524826-0.895939058953j))*x_ref[0] + ((-0.980620356362+0.768567284193j))*x_ref[1]**o + ((0.448632471004+0.217175493337j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(-0.208809709428+0.638763080929j)*x[0]**o + ((-0.397610594605+0.982753544891j))*x[0] + ((0.541149801664+0.6413636699j))*x[1]**o + ((0.863777318999-0.324092130032j))*x[1]
        ref[(0, 0, 2, 0)]=(-0.208809709428+0.638763080929j)*x_ref[0]**o + ((-0.397610594605+0.982753544891j))*x_ref[0] + ((0.541149801664+0.6413636699j))*x_ref[1]**o + ((0.863777318999-0.324092130032j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(0.767741474852-0.980680549365j)*x[0]**o + ((-0.176297102784-0.58724927399j))*x[0] + ((0.329646988038+0.880858477767j))*x[1]**o + ((0.728380341094+0.919101482623j))*x[1]
        ref[(0, 0, 2, 1)]=(0.767741474852-0.980680549365j)*x_ref[0]**o + ((-0.176297102784-0.58724927399j))*x_ref[0] + ((0.329646988038+0.880858477767j))*x_ref[1]**o + ((0.728380341094+0.919101482623j))*x_ref[1]
        arg[(0, 0, 2, 2)]=(-0.538796802173-0.454575711755j)*x[0]**o + ((0.280790103262-0.816465213372j))*x[0] + ((0.258433208417+0.203701570192j))*x[1]**o + ((0.973977550624+0.16532301886j))*x[1]
        ref[(0, 0, 2, 2)]=(-0.538796802173-0.454575711755j)*x_ref[0]**o + ((0.280790103262-0.816465213372j))*x_ref[0] + ((0.258433208417+0.203701570192j))*x_ref[1]**o + ((0.973977550624+0.16532301886j))*x_ref[1]
        arg[(0, 0, 2, 3)]=(0.01323639516+0.255625358746j)*x[0]**o + ((-0.141884938007-0.777744822702j))*x[0] + ((-0.919349187878-0.463739532659j))*x[1]**o + ((-0.579089246789+0.154233956715j))*x[1]
        ref[(0, 0, 2, 3)]=(0.01323639516+0.255625358746j)*x_ref[0]**o + ((-0.141884938007-0.777744822702j))*x_ref[0] + ((-0.919349187878-0.463739532659j))*x_ref[1]**o + ((-0.579089246789+0.154233956715j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.212646104873+0.18823732716j)*x[0]**o + ((-0.285828480989-0.419899987481j))*x[0] + ((-0.150914500126-0.709081761952j))*x[1]**o + ((-0.732244718061-0.757019288471j))*x[1]
        ref[(0, 1, 0, 0)]=(0.212646104873+0.18823732716j)*x_ref[0]**o + ((-0.285828480989-0.419899987481j))*x_ref[0] + ((-0.150914500126-0.709081761952j))*x_ref[1]**o + ((-0.732244718061-0.757019288471j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.583775004394-0.639777032146j)*x[0]**o + ((0.597501559757-0.906566432753j))*x[0] + ((-0.961751145255+0.0160592094523j))*x[1]**o + ((-0.00320906183781-0.0187625016664j))*x[1]
        ref[(0, 1, 0, 1)]=(0.583775004394-0.639777032146j)*x_ref[0]**o + ((0.597501559757-0.906566432753j))*x_ref[0] + ((-0.961751145255+0.0160592094523j))*x_ref[1]**o + ((-0.00320906183781-0.0187625016664j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(-0.4945449714+0.370664225213j)*x[0]**o + ((0.997686349426+0.856612903477j))*x[0] + ((0.498653486817-0.304708156075j))*x[1]**o + ((0.920559241359+0.80589736055j))*x[1]
        ref[(0, 1, 0, 2)]=(-0.4945449714+0.370664225213j)*x_ref[0]**o + ((0.997686349426+0.856612903477j))*x_ref[0] + ((0.498653486817-0.304708156075j))*x_ref[1]**o + ((0.920559241359+0.80589736055j))*x_ref[1]
        arg[(0, 1, 0, 3)]=(-0.838013234539-0.797349321388j)*x[0]**o + ((0.146648121955-0.952183572362j))*x[0] + ((-0.0827448608438+0.366438618906j))*x[1]**o + ((-0.982350318025+0.0656626508027j))*x[1]
        ref[(0, 1, 0, 3)]=(-0.838013234539-0.797349321388j)*x_ref[0]**o + ((0.146648121955-0.952183572362j))*x_ref[0] + ((-0.0827448608438+0.366438618906j))*x_ref[1]**o + ((-0.982350318025+0.0656626508027j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.0487117369423-0.315900028316j)*x[0]**o + ((0.599169891782+0.909741903382j))*x[0] + ((0.899608662356+0.158696110213j))*x[1]**o + ((0.911063007729+0.403473716917j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.0487117369423-0.315900028316j)*x_ref[0]**o + ((0.599169891782+0.909741903382j))*x_ref[0] + ((0.899608662356+0.158696110213j))*x_ref[1]**o + ((0.911063007729+0.403473716917j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.237701758844-0.45473719378j)*x[0]**o + ((-0.938088723147-0.476090312332j))*x[0] + ((-0.69982365646+0.754112448442j))*x[1]**o + ((0.711353942147-0.621349789893j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.237701758844-0.45473719378j)*x_ref[0]**o + ((-0.938088723147-0.476090312332j))*x_ref[0] + ((-0.69982365646+0.754112448442j))*x_ref[1]**o + ((0.711353942147-0.621349789893j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(-0.237062717123-0.590751920544j)*x[0]**o + ((0.123171662553+0.764193680666j))*x[0] + ((0.012844437374+0.348141320819j))*x[1]**o + ((-0.624593716022-0.220227310524j))*x[1]
        ref[(0, 1, 1, 2)]=(-0.237062717123-0.590751920544j)*x_ref[0]**o + ((0.123171662553+0.764193680666j))*x_ref[0] + ((0.012844437374+0.348141320819j))*x_ref[1]**o + ((-0.624593716022-0.220227310524j))*x_ref[1]
        arg[(0, 1, 1, 3)]=(-0.121095127734-0.375092736369j)*x[0]**o + ((0.638310181862+0.0613698793167j))*x[0] + ((0.655721938198-0.103835965592j))*x[1]**o + ((-0.2991345178-0.224642727711j))*x[1]
        ref[(0, 1, 1, 3)]=(-0.121095127734-0.375092736369j)*x_ref[0]**o + ((0.638310181862+0.0613698793167j))*x_ref[0] + ((0.655721938198-0.103835965592j))*x_ref[1]**o + ((-0.2991345178-0.224642727711j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(-0.951387974736-0.24038358168j)*x[0]**o + ((-0.122858447154-0.8422422331j))*x[0] + ((0.185107100864+0.718143168828j))*x[1]**o + ((0.733026972165-0.00841668486932j))*x[1]
        ref[(0, 1, 2, 0)]=(-0.951387974736-0.24038358168j)*x_ref[0]**o + ((-0.122858447154-0.8422422331j))*x_ref[0] + ((0.185107100864+0.718143168828j))*x_ref[1]**o + ((0.733026972165-0.00841668486932j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(-0.350024002025+0.524145995861j)*x[0]**o + ((-0.501457139684+0.103488627146j))*x[0] + ((0.404430168113+0.265285904382j))*x[1]**o + ((0.593878803655-0.135356785866j))*x[1]
        ref[(0, 1, 2, 1)]=(-0.350024002025+0.524145995861j)*x_ref[0]**o + ((-0.501457139684+0.103488627146j))*x_ref[0] + ((0.404430168113+0.265285904382j))*x_ref[1]**o + ((0.593878803655-0.135356785866j))*x_ref[1]
        arg[(0, 1, 2, 2)]=(-0.521009223082-0.155002347334j)*x[0]**o + ((0.785443537524+0.826854419891j))*x[0] + ((-0.0972240838315+0.197966053877j))*x[1]**o + ((0.162660050959+0.896130887998j))*x[1]
        ref[(0, 1, 2, 2)]=(-0.521009223082-0.155002347334j)*x_ref[0]**o + ((0.785443537524+0.826854419891j))*x_ref[0] + ((-0.0972240838315+0.197966053877j))*x_ref[1]**o + ((0.162660050959+0.896130887998j))*x_ref[1]
        arg[(0, 1, 2, 3)]=(-0.360231466298+0.671575536918j)*x[0]**o + ((0.767208217461-0.531469781774j))*x[0] + ((-0.366857601247-0.97155285251j))*x[1]**o + ((-0.910118170205-0.377748827079j))*x[1]
        ref[(0, 1, 2, 3)]=(-0.360231466298+0.671575536918j)*x_ref[0]**o + ((0.767208217461-0.531469781774j))*x_ref[0] + ((-0.366857601247-0.97155285251j))*x_ref[1]**o + ((-0.910118170205-0.377748827079j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.205850838369-0.59573194824j)*x[0]**o + ((0.965353716882-0.150152398288j))*x[0] + ((-0.573887031983+0.834783989775j))*x[1]**o + ((0.248649006239+0.27134378132j))*x[1]
        ref[(1, 0, 0, 0)]=(0.205850838369-0.59573194824j)*x_ref[0]**o + ((0.965353716882-0.150152398288j))*x_ref[0] + ((-0.573887031983+0.834783989775j))*x_ref[1]**o + ((0.248649006239+0.27134378132j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(-0.990059733855+0.757027785014j)*x[0]**o + ((-0.878240209616+0.130153202321j))*x[0] + ((0.979747881586+0.277272257068j))*x[1]**o + ((0.827208913514-0.518014811941j))*x[1]
        ref[(1, 0, 0, 1)]=(-0.990059733855+0.757027785014j)*x_ref[0]**o + ((-0.878240209616+0.130153202321j))*x_ref[0] + ((0.979747881586+0.277272257068j))*x_ref[1]**o + ((0.827208913514-0.518014811941j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(0.702216426664+0.910293226823j)*x[0]**o + ((0.29208035023-0.639332671138j))*x[0] + ((-0.254104417359-0.912011188866j))*x[1]**o + ((-0.553449930169-0.955245489433j))*x[1]
        ref[(1, 0, 0, 2)]=(0.702216426664+0.910293226823j)*x_ref[0]**o + ((0.29208035023-0.639332671138j))*x_ref[0] + ((-0.254104417359-0.912011188866j))*x_ref[1]**o + ((-0.553449930169-0.955245489433j))*x_ref[1]
        arg[(1, 0, 0, 3)]=(-0.48941206269-0.0401258025323j)*x[0]**o + ((0.427873384474+0.626356912553j))*x[0] + ((-0.837808351108-0.0223377799654j))*x[1]**o + ((-0.803912275184+0.0226618784864j))*x[1]
        ref[(1, 0, 0, 3)]=(-0.48941206269-0.0401258025323j)*x_ref[0]**o + ((0.427873384474+0.626356912553j))*x_ref[0] + ((-0.837808351108-0.0223377799654j))*x_ref[1]**o + ((-0.803912275184+0.0226618784864j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(0.970927069172+0.640343115001j)*x[0]**o + ((-0.153150685275+0.549502540484j))*x[0] + ((-0.266701304166-0.479186264116j))*x[1]**o + ((0.502460227274+0.733990715127j))*x[1]
        ref[(1, 0, 1, 0)]=(0.970927069172+0.640343115001j)*x_ref[0]**o + ((-0.153150685275+0.549502540484j))*x_ref[0] + ((-0.266701304166-0.479186264116j))*x_ref[1]**o + ((0.502460227274+0.733990715127j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.483955891159+0.187921248204j)*x[0]**o + ((0.562647028504+0.802587994796j))*x[0] + ((0.62191227909+0.0223180586541j))*x[1]**o + ((0.919435919549-0.174490380596j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.483955891159+0.187921248204j)*x_ref[0]**o + ((0.562647028504+0.802587994796j))*x_ref[0] + ((0.62191227909+0.0223180586541j))*x_ref[1]**o + ((0.919435919549-0.174490380596j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(0.512780266738+0.680279267489j)*x[0]**o + ((-0.23740762194+0.618321988247j))*x[0] + ((0.360570592903+0.16752755394j))*x[1]**o + ((-0.0464385633685+0.129777375332j))*x[1]
        ref[(1, 0, 1, 2)]=(0.512780266738+0.680279267489j)*x_ref[0]**o + ((-0.23740762194+0.618321988247j))*x_ref[0] + ((0.360570592903+0.16752755394j))*x_ref[1]**o + ((-0.0464385633685+0.129777375332j))*x_ref[1]
        arg[(1, 0, 1, 3)]=(0.588725233954+0.521386972279j)*x[0]**o + ((-0.320993415895-0.693666710856j))*x[0] + ((-0.984816465256+0.516543455526j))*x[1]**o + ((0.528829602803+0.379498585272j))*x[1]
        ref[(1, 0, 1, 3)]=(0.588725233954+0.521386972279j)*x_ref[0]**o + ((-0.320993415895-0.693666710856j))*x_ref[0] + ((-0.984816465256+0.516543455526j))*x_ref[1]**o + ((0.528829602803+0.379498585272j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(-0.804631813351+0.335063644811j)*x[0]**o + ((0.968041593306-0.655114680988j))*x[0] + ((0.443988071552+0.251857423585j))*x[1]**o + ((-0.546834776745-0.274966019077j))*x[1]
        ref[(1, 0, 2, 0)]=(-0.804631813351+0.335063644811j)*x_ref[0]**o + ((0.968041593306-0.655114680988j))*x_ref[0] + ((0.443988071552+0.251857423585j))*x_ref[1]**o + ((-0.546834776745-0.274966019077j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(0.0297924209796+0.512011909208j)*x[0]**o + ((-0.179446483487-0.819735077128j))*x[0] + ((0.497768485328+0.426917706444j))*x[1]**o + ((0.319024899253+0.702290685673j))*x[1]
        ref[(1, 0, 2, 1)]=(0.0297924209796+0.512011909208j)*x_ref[0]**o + ((-0.179446483487-0.819735077128j))*x_ref[0] + ((0.497768485328+0.426917706444j))*x_ref[1]**o + ((0.319024899253+0.702290685673j))*x_ref[1]
        arg[(1, 0, 2, 2)]=(0.18279863611-0.488040952897j)*x[0]**o + ((0.966218393405-0.21652628189j))*x[0] + ((-0.90916286328+0.0408041265707j))*x[1]**o + ((0.827737575299-0.718637720483j))*x[1]
        ref[(1, 0, 2, 2)]=(0.18279863611-0.488040952897j)*x_ref[0]**o + ((0.966218393405-0.21652628189j))*x_ref[0] + ((-0.90916286328+0.0408041265707j))*x_ref[1]**o + ((0.827737575299-0.718637720483j))*x_ref[1]
        arg[(1, 0, 2, 3)]=(-0.634351976387+0.600172135475j)*x[0]**o + ((0.876179135743+0.211135093552j))*x[0] + ((-0.108853069168-0.917190216201j))*x[1]**o + ((-0.346721725812-0.0815015389157j))*x[1]
        ref[(1, 0, 2, 3)]=(-0.634351976387+0.600172135475j)*x_ref[0]**o + ((0.876179135743+0.211135093552j))*x_ref[0] + ((-0.108853069168-0.917190216201j))*x_ref[1]**o + ((-0.346721725812-0.0815015389157j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.483881300846+0.690918438888j)*x[0]**o + ((-0.269445563538+0.181680695359j))*x[0] + ((-0.32898242474-0.177732586077j))*x[1]**o + ((-0.136628799962-0.09258341888j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.483881300846+0.690918438888j)*x_ref[0]**o + ((-0.269445563538+0.181680695359j))*x_ref[0] + ((-0.32898242474-0.177732586077j))*x_ref[1]**o + ((-0.136628799962-0.09258341888j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.824641220973-0.63962803066j)*x[0]**o + ((0.390959861101+0.307390686844j))*x[0] + ((0.0849663289787-0.933246521973j))*x[1]**o + ((-0.101029644188+0.655563657921j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.824641220973-0.63962803066j)*x_ref[0]**o + ((0.390959861101+0.307390686844j))*x_ref[0] + ((0.0849663289787-0.933246521973j))*x_ref[1]**o + ((-0.101029644188+0.655563657921j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(0.584823069063-0.0926296215726j)*x[0]**o + ((0.950531582826+0.297554689173j))*x[0] + ((-0.43725971317+0.244358273895j))*x[1]**o + ((0.169855845762-0.795594478032j))*x[1]
        ref[(1, 1, 0, 2)]=(0.584823069063-0.0926296215726j)*x_ref[0]**o + ((0.950531582826+0.297554689173j))*x_ref[0] + ((-0.43725971317+0.244358273895j))*x_ref[1]**o + ((0.169855845762-0.795594478032j))*x_ref[1]
        arg[(1, 1, 0, 3)]=(-0.734716155331+0.809815954668j)*x[0]**o + ((-0.891261881981+0.312851696576j))*x[0] + ((-0.648244208864-0.744705371771j))*x[1]**o + ((-0.47749046067-0.0472487359224j))*x[1]
        ref[(1, 1, 0, 3)]=(-0.734716155331+0.809815954668j)*x_ref[0]**o + ((-0.891261881981+0.312851696576j))*x_ref[0] + ((-0.648244208864-0.744705371771j))*x_ref[1]**o + ((-0.47749046067-0.0472487359224j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.311963620284-0.472716476727j)*x[0]**o + ((-0.911956589453+0.696321721371j))*x[0] + ((-0.102952287706-0.582025575689j))*x[1]**o + ((0.70053408977-0.00728188154036j))*x[1]
        ref[(1, 1, 1, 0)]=(0.311963620284-0.472716476727j)*x_ref[0]**o + ((-0.911956589453+0.696321721371j))*x_ref[0] + ((-0.102952287706-0.582025575689j))*x_ref[1]**o + ((0.70053408977-0.00728188154036j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.616502961683+0.204055882032j)*x[0]**o + ((-0.215164989966+0.0476151681892j))*x[0] + ((0.285902680829-0.55094128312j))*x[1]**o + ((-0.625661252118-0.772046766388j))*x[1]
        ref[(1, 1, 1, 1)]=(0.616502961683+0.204055882032j)*x_ref[0]**o + ((-0.215164989966+0.0476151681892j))*x_ref[0] + ((0.285902680829-0.55094128312j))*x_ref[1]**o + ((-0.625661252118-0.772046766388j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(-0.639834974667+0.663186768867j)*x[0]**o + ((0.298603622791+0.794662980161j))*x[0] + ((-0.481980948705+0.49783377592j))*x[1]**o + ((0.726094597634+0.343641427034j))*x[1]
        ref[(1, 1, 1, 2)]=(-0.639834974667+0.663186768867j)*x_ref[0]**o + ((0.298603622791+0.794662980161j))*x_ref[0] + ((-0.481980948705+0.49783377592j))*x_ref[1]**o + ((0.726094597634+0.343641427034j))*x_ref[1]
        arg[(1, 1, 1, 3)]=(-0.795372070399-0.440609951071j)*x[0]**o + ((0.938203873758-0.205821905559j))*x[0] + ((-0.33828505311+0.198209998922j))*x[1]**o + ((0.81893946898+0.826226712972j))*x[1]
        ref[(1, 1, 1, 3)]=(-0.795372070399-0.440609951071j)*x_ref[0]**o + ((0.938203873758-0.205821905559j))*x_ref[0] + ((-0.33828505311+0.198209998922j))*x_ref[1]**o + ((0.81893946898+0.826226712972j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(-0.642234867584+0.562342230959j)*x[0]**o + ((0.867242561206+0.453379487804j))*x[0] + ((0.929589671706+0.50863805821j))*x[1]**o + ((0.509265265114+0.14016305051j))*x[1]
        ref[(1, 1, 2, 0)]=(-0.642234867584+0.562342230959j)*x_ref[0]**o + ((0.867242561206+0.453379487804j))*x_ref[0] + ((0.929589671706+0.50863805821j))*x_ref[1]**o + ((0.509265265114+0.14016305051j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(0.494417442778+0.984904054174j)*x[0]**o + ((0.823834909317-0.0317342878482j))*x[0] + ((0.373483387253-0.100963295829j))*x[1]**o + ((-0.84316166016+0.343434877518j))*x[1]
        ref[(1, 1, 2, 1)]=(0.494417442778+0.984904054174j)*x_ref[0]**o + ((0.823834909317-0.0317342878482j))*x_ref[0] + ((0.373483387253-0.100963295829j))*x_ref[1]**o + ((-0.84316166016+0.343434877518j))*x_ref[1]
        arg[(1, 1, 2, 2)]=(-0.916150006687-0.396735067939j)*x[0]**o + ((0.81095607283+0.438661404126j))*x[0] + ((0.625827923684-0.941071173617j))*x[1]**o + ((0.419740217835-0.102488538374j))*x[1]
        ref[(1, 1, 2, 2)]=(-0.916150006687-0.396735067939j)*x_ref[0]**o + ((0.81095607283+0.438661404126j))*x_ref[0] + ((0.625827923684-0.941071173617j))*x_ref[1]**o + ((0.419740217835-0.102488538374j))*x_ref[1]
        arg[(1, 1, 2, 3)]=(-0.781760075705+0.0175118162815j)*x[0]**o + ((-0.807804291643+0.334150654367j))*x[0] + ((0.106270255607-0.204058189521j))*x[1]**o + ((-0.267162008371-0.215787359393j))*x[1]
        ref[(1, 1, 2, 3)]=(-0.781760075705+0.0175118162815j)*x_ref[0]**o + ((-0.807804291643+0.334150654367j))*x_ref[0] + ((0.106270255607-0.204058189521j))*x_ref[1]**o + ((-0.267162008371-0.215787359393j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.839173688833+0.072566016195j)*x[0]**o + ((-0.597387327397+0.576937024346j))*x[0] + ((-0.836644295886+0.281516084716j))*x[1]**o + ((-0.0872187636624+0.371268678663j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.839173688833+0.072566016195j)*x_ref[0]**o + ((-0.597387327397+0.576937024346j))*x_ref[0] + ((-0.836644295886+0.281516084716j))*x_ref[1]**o + ((-0.0872187636624+0.371268678663j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(-0.0294749522138+0.566523870262j)*x[0]**o + ((-0.699022136419+0.335858984663j))*x[0] + ((0.768348209528-0.923353659981j))*x[1]**o + ((-0.209026794332+0.218184396803j))*x[1]
        ref[(2, 0, 0, 1)]=(-0.0294749522138+0.566523870262j)*x_ref[0]**o + ((-0.699022136419+0.335858984663j))*x_ref[0] + ((0.768348209528-0.923353659981j))*x_ref[1]**o + ((-0.209026794332+0.218184396803j))*x_ref[1]
        arg[(2, 0, 0, 2)]=(-0.707631090313+0.467677364516j)*x[0]**o + ((0.448644079726-0.195181752765j))*x[0] + ((0.627330512122+0.52757531751j))*x[1]**o + ((-0.0306784310796+0.230776056048j))*x[1]
        ref[(2, 0, 0, 2)]=(-0.707631090313+0.467677364516j)*x_ref[0]**o + ((0.448644079726-0.195181752765j))*x_ref[0] + ((0.627330512122+0.52757531751j))*x_ref[1]**o + ((-0.0306784310796+0.230776056048j))*x_ref[1]
        arg[(2, 0, 0, 3)]=(-0.208241732617-0.366086558032j)*x[0]**o + ((-0.65396168735-0.703768705746j))*x[0] + ((0.947851865536-0.974277660833j))*x[1]**o + ((0.668436901492+0.536817259566j))*x[1]
        ref[(2, 0, 0, 3)]=(-0.208241732617-0.366086558032j)*x_ref[0]**o + ((-0.65396168735-0.703768705746j))*x_ref[0] + ((0.947851865536-0.974277660833j))*x_ref[1]**o + ((0.668436901492+0.536817259566j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(0.646873333053-0.402933992439j)*x[0]**o + ((0.0477155970689-0.089835333886j))*x[0] + ((-0.876117598198-0.380328848008j))*x[1]**o + ((-0.606303336873-0.0353881810546j))*x[1]
        ref[(2, 0, 1, 0)]=(0.646873333053-0.402933992439j)*x_ref[0]**o + ((0.0477155970689-0.089835333886j))*x_ref[0] + ((-0.876117598198-0.380328848008j))*x_ref[1]**o + ((-0.606303336873-0.0353881810546j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.667841399769+0.111279978395j)*x[0]**o + ((0.781673153063+0.036389447498j))*x[0] + ((-0.165127168375+0.831384922244j))*x[1]**o + ((-0.0182570547966+0.350095832376j))*x[1]
        ref[(2, 0, 1, 1)]=(0.667841399769+0.111279978395j)*x_ref[0]**o + ((0.781673153063+0.036389447498j))*x_ref[0] + ((-0.165127168375+0.831384922244j))*x_ref[1]**o + ((-0.0182570547966+0.350095832376j))*x_ref[1]
        arg[(2, 0, 1, 2)]=(-0.442472721332-0.162303816973j)*x[0]**o + ((-0.77009713717-0.176913279564j))*x[0] + ((0.442162617649+0.14666876328j))*x[1]**o + ((-0.496255768548+0.567862177107j))*x[1]
        ref[(2, 0, 1, 2)]=(-0.442472721332-0.162303816973j)*x_ref[0]**o + ((-0.77009713717-0.176913279564j))*x_ref[0] + ((0.442162617649+0.14666876328j))*x_ref[1]**o + ((-0.496255768548+0.567862177107j))*x_ref[1]
        arg[(2, 0, 1, 3)]=(-0.627653414539-0.00830955709972j)*x[0]**o + ((-0.190394017953-0.959715092889j))*x[0] + ((0.130680919868-0.908806555561j))*x[1]**o + ((0.405673996673-0.164992494008j))*x[1]
        ref[(2, 0, 1, 3)]=(-0.627653414539-0.00830955709972j)*x_ref[0]**o + ((-0.190394017953-0.959715092889j))*x_ref[0] + ((0.130680919868-0.908806555561j))*x_ref[1]**o + ((0.405673996673-0.164992494008j))*x_ref[1]
        arg[(2, 0, 2, 0)]=(-0.323727707514-0.780933706193j)*x[0]**o + ((-0.428935928843+0.171086045702j))*x[0] + ((-0.022674035049-0.178304387503j))*x[1]**o + ((0.856043384118+0.141907241414j))*x[1]
        ref[(2, 0, 2, 0)]=(-0.323727707514-0.780933706193j)*x_ref[0]**o + ((-0.428935928843+0.171086045702j))*x_ref[0] + ((-0.022674035049-0.178304387503j))*x_ref[1]**o + ((0.856043384118+0.141907241414j))*x_ref[1]
        arg[(2, 0, 2, 1)]=(0.955595906733+0.897875601864j)*x[0]**o + ((-0.430247426113-0.664976555659j))*x[0] + ((0.564390605115-0.107971581124j))*x[1]**o + ((0.154062520057+0.477419382884j))*x[1]
        ref[(2, 0, 2, 1)]=(0.955595906733+0.897875601864j)*x_ref[0]**o + ((-0.430247426113-0.664976555659j))*x_ref[0] + ((0.564390605115-0.107971581124j))*x_ref[1]**o + ((0.154062520057+0.477419382884j))*x_ref[1]
        arg[(2, 0, 2, 2)]=(-0.568711526404+0.587847718022j)*x[0]**o + ((-0.777184046909+0.433870758665j))*x[0] + ((-0.0306359859868-0.557926156415j))*x[1]**o + ((-0.683753192928-0.916120708804j))*x[1]
        ref[(2, 0, 2, 2)]=(-0.568711526404+0.587847718022j)*x_ref[0]**o + ((-0.777184046909+0.433870758665j))*x_ref[0] + ((-0.0306359859868-0.557926156415j))*x_ref[1]**o + ((-0.683753192928-0.916120708804j))*x_ref[1]
        arg[(2, 0, 2, 3)]=(-0.501184923232+0.595885240042j)*x[0]**o + ((-0.526889373519+0.738090641043j))*x[0] + ((0.660010793991+0.209995022125j))*x[1]**o + ((0.751527777519+0.360311594037j))*x[1]
        ref[(2, 0, 2, 3)]=(-0.501184923232+0.595885240042j)*x_ref[0]**o + ((-0.526889373519+0.738090641043j))*x_ref[0] + ((0.660010793991+0.209995022125j))*x_ref[1]**o + ((0.751527777519+0.360311594037j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(0.217504330056-0.144395992392j)*x[0]**o + ((0.210479979889+0.565028687331j))*x[0] + ((0.976821943559-0.800725606938j))*x[1]**o + ((0.415335246634-0.146522102201j))*x[1]
        ref[(2, 1, 0, 0)]=(0.217504330056-0.144395992392j)*x_ref[0]**o + ((0.210479979889+0.565028687331j))*x_ref[0] + ((0.976821943559-0.800725606938j))*x_ref[1]**o + ((0.415335246634-0.146522102201j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.810633327745+0.523769294879j)*x[0]**o + ((-0.52161981135-0.585557429353j))*x[0] + ((-0.251699181394-0.632491813449j))*x[1]**o + ((0.878093383358+0.150450708594j))*x[1]
        ref[(2, 1, 0, 1)]=(0.810633327745+0.523769294879j)*x_ref[0]**o + ((-0.52161981135-0.585557429353j))*x_ref[0] + ((-0.251699181394-0.632491813449j))*x_ref[1]**o + ((0.878093383358+0.150450708594j))*x_ref[1]
        arg[(2, 1, 0, 2)]=(-0.560315795828-0.332031283197j)*x[0]**o + ((0.546529904179-0.627076777504j))*x[0] + ((0.666207308302-0.118902041426j))*x[1]**o + ((-0.980704743571-0.486526044319j))*x[1]
        ref[(2, 1, 0, 2)]=(-0.560315795828-0.332031283197j)*x_ref[0]**o + ((0.546529904179-0.627076777504j))*x_ref[0] + ((0.666207308302-0.118902041426j))*x_ref[1]**o + ((-0.980704743571-0.486526044319j))*x_ref[1]
        arg[(2, 1, 0, 3)]=(-0.612758553343-0.763675721811j)*x[0]**o + ((-0.306068246674+0.0581972011258j))*x[0] + ((0.569175216042+0.486044502205j))*x[1]**o + ((0.875544571279+0.786014618852j))*x[1]
        ref[(2, 1, 0, 3)]=(-0.612758553343-0.763675721811j)*x_ref[0]**o + ((-0.306068246674+0.0581972011258j))*x_ref[0] + ((0.569175216042+0.486044502205j))*x_ref[1]**o + ((0.875544571279+0.786014618852j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(0.212663449951+0.395927463672j)*x[0]**o + ((-0.0736641932202+0.250433444447j))*x[0] + ((0.623959534649-0.873680528407j))*x[1]**o + ((-0.544525513512+0.0446490124551j))*x[1]
        ref[(2, 1, 1, 0)]=(0.212663449951+0.395927463672j)*x_ref[0]**o + ((-0.0736641932202+0.250433444447j))*x_ref[0] + ((0.623959534649-0.873680528407j))*x_ref[1]**o + ((-0.544525513512+0.0446490124551j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(0.400145490383+0.282350943481j)*x[0]**o + ((0.336834743381-0.174094824207j))*x[0] + ((-0.321243421329+0.189885891577j))*x[1]**o + ((-0.155038404049-0.90753227011j))*x[1]
        ref[(2, 1, 1, 1)]=(0.400145490383+0.282350943481j)*x_ref[0]**o + ((0.336834743381-0.174094824207j))*x_ref[0] + ((-0.321243421329+0.189885891577j))*x_ref[1]**o + ((-0.155038404049-0.90753227011j))*x_ref[1]
        arg[(2, 1, 1, 2)]=(-0.823773011919-0.464182606363j)*x[0]**o + ((0.297435222165+0.365240142451j))*x[0] + ((0.391491103718-0.955686420899j))*x[1]**o + ((-0.941388056505-0.636169943132j))*x[1]
        ref[(2, 1, 1, 2)]=(-0.823773011919-0.464182606363j)*x_ref[0]**o + ((0.297435222165+0.365240142451j))*x_ref[0] + ((0.391491103718-0.955686420899j))*x_ref[1]**o + ((-0.941388056505-0.636169943132j))*x_ref[1]
        arg[(2, 1, 1, 3)]=(0.0928484684199+0.416766311266j)*x[0]**o + ((-0.894209709952+0.186802045722j))*x[0] + ((0.984867114114+0.538909395355j))*x[1]**o + ((-0.381931161389+0.846321976966j))*x[1]
        ref[(2, 1, 1, 3)]=(0.0928484684199+0.416766311266j)*x_ref[0]**o + ((-0.894209709952+0.186802045722j))*x_ref[0] + ((0.984867114114+0.538909395355j))*x_ref[1]**o + ((-0.381931161389+0.846321976966j))*x_ref[1]
        arg[(2, 1, 2, 0)]=(-0.609561943449-0.714790000206j)*x[0]**o + ((0.101692545102+0.33610347523j))*x[0] + ((-0.203981810753+0.0416628895155j))*x[1]**o + ((0.68768413111-0.0193468800328j))*x[1]
        ref[(2, 1, 2, 0)]=(-0.609561943449-0.714790000206j)*x_ref[0]**o + ((0.101692545102+0.33610347523j))*x_ref[0] + ((-0.203981810753+0.0416628895155j))*x_ref[1]**o + ((0.68768413111-0.0193468800328j))*x_ref[1]
        arg[(2, 1, 2, 1)]=(-0.037124521415-0.836442288713j)*x[0]**o + ((0.576801110286+0.535003485995j))*x[0] + ((0.706948635887-0.594866913407j))*x[1]**o + ((0.455579682948-0.172547152355j))*x[1]
        ref[(2, 1, 2, 1)]=(-0.037124521415-0.836442288713j)*x_ref[0]**o + ((0.576801110286+0.535003485995j))*x_ref[0] + ((0.706948635887-0.594866913407j))*x_ref[1]**o + ((0.455579682948-0.172547152355j))*x_ref[1]
        arg[(2, 1, 2, 2)]=(-0.484391356188+0.612905247615j)*x[0]**o + ((0.0010914292028-0.265645652855j))*x[0] + ((0.0743843277722-0.797181896644j))*x[1]**o + ((-0.263147294283-0.243099255393j))*x[1]
        ref[(2, 1, 2, 2)]=(-0.484391356188+0.612905247615j)*x_ref[0]**o + ((0.0010914292028-0.265645652855j))*x_ref[0] + ((0.0743843277722-0.797181896644j))*x_ref[1]**o + ((-0.263147294283-0.243099255393j))*x_ref[1]
        arg[(2, 1, 2, 3)]=(-0.879034160456-0.0196006705994j)*x[0]**o + ((-0.966625425614+0.316231432771j))*x[0] + ((0.0532332922167+0.447169471815j))*x[1]**o + ((0.543756722697-0.21614247231j))*x[1]
        ref[(2, 1, 2, 3)]=(-0.879034160456-0.0196006705994j)*x_ref[0]**o + ((-0.966625425614+0.316231432771j))*x_ref[0] + ((0.0532332922167+0.447169471815j))*x_ref[1]**o + ((0.543756722697-0.21614247231j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.309168700005+0.234132790413j)*x[2]**o + ((-0.300240485341-0.341527685643j))*x[2]
            ref[(0, 0, 0, 0)]+=(-0.309168700005+0.234132790413j)*x_ref[2]**o + ((-0.300240485341-0.341527685643j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.981459193775+0.503471579867j)*x[2]**o + ((-0.916690850322-0.532760312545j))*x[2]
            ref[(0, 0, 0, 1)]+=(0.981459193775+0.503471579867j)*x_ref[2]**o + ((-0.916690850322-0.532760312545j))*x_ref[2]
            arg[(0, 0, 0, 2)]+=(0.644532590607-0.301846802444j)*x[2]**o + ((-0.16739315712-0.700701094857j))*x[2]
            ref[(0, 0, 0, 2)]+=(0.644532590607-0.301846802444j)*x_ref[2]**o + ((-0.16739315712-0.700701094857j))*x_ref[2]
            arg[(0, 0, 0, 3)]+=(0.375291574835+0.27346122444j)*x[2]**o + ((0.855172628588+0.154189227625j))*x[2]
            ref[(0, 0, 0, 3)]+=(0.375291574835+0.27346122444j)*x_ref[2]**o + ((0.855172628588+0.154189227625j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.425869070468+0.647369186611j)*x[2]**o + ((-0.330434238521+0.12165949896j))*x[2]
            ref[(0, 0, 1, 0)]+=(-0.425869070468+0.647369186611j)*x_ref[2]**o + ((-0.330434238521+0.12165949896j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.314212251103+0.176159942324j)*x[2]**o + ((0.875884930515+0.0897834505659j))*x[2]
            ref[(0, 0, 1, 1)]+=(0.314212251103+0.176159942324j)*x_ref[2]**o + ((0.875884930515+0.0897834505659j))*x_ref[2]
            arg[(0, 0, 1, 2)]+=(-0.123837487891-0.135517256958j)*x[2]**o + ((0.220945372974-0.788118219327j))*x[2]
            ref[(0, 0, 1, 2)]+=(-0.123837487891-0.135517256958j)*x_ref[2]**o + ((0.220945372974-0.788118219327j))*x_ref[2]
            arg[(0, 0, 1, 3)]+=(0.227474064013+0.87329097221j)*x[2]**o + ((-0.108739707155+0.969440669851j))*x[2]
            ref[(0, 0, 1, 3)]+=(0.227474064013+0.87329097221j)*x_ref[2]**o + ((-0.108739707155+0.969440669851j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(-0.760965975345+0.0959853563757j)*x[2]**o + ((0.0540494226581+0.665948418791j))*x[2]
            ref[(0, 0, 2, 0)]+=(-0.760965975345+0.0959853563757j)*x_ref[2]**o + ((0.0540494226581+0.665948418791j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(0.0855773454112-0.134302840683j)*x[2]**o + ((-0.743132423012-0.815775202579j))*x[2]
            ref[(0, 0, 2, 1)]+=(0.0855773454112-0.134302840683j)*x_ref[2]**o + ((-0.743132423012-0.815775202579j))*x_ref[2]
            arg[(0, 0, 2, 2)]+=(0.149695644452-0.211150097373j)*x[2]**o + ((0.755858267437+0.797947151969j))*x[2]
            ref[(0, 0, 2, 2)]+=(0.149695644452-0.211150097373j)*x_ref[2]**o + ((0.755858267437+0.797947151969j))*x_ref[2]
            arg[(0, 0, 2, 3)]+=(-0.448637163424+0.261666151823j)*x[2]**o + ((-0.803803354148+0.887839955518j))*x[2]
            ref[(0, 0, 2, 3)]+=(-0.448637163424+0.261666151823j)*x_ref[2]**o + ((-0.803803354148+0.887839955518j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.890570820106+0.823785770487j)*x[2]**o + ((0.931152348732+0.451823931774j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.890570820106+0.823785770487j)*x_ref[2]**o + ((0.931152348732+0.451823931774j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.947230804923+0.989799400988j)*x[2]**o + ((0.725296496941+0.854249388226j))*x[2]
            ref[(0, 1, 0, 1)]+=(0.947230804923+0.989799400988j)*x_ref[2]**o + ((0.725296496941+0.854249388226j))*x_ref[2]
            arg[(0, 1, 0, 2)]+=(-0.579849439843+0.147930156993j)*x[2]**o + ((-0.704220373671-0.942612267674j))*x[2]
            ref[(0, 1, 0, 2)]+=(-0.579849439843+0.147930156993j)*x_ref[2]**o + ((-0.704220373671-0.942612267674j))*x_ref[2]
            arg[(0, 1, 0, 3)]+=(0.978250501697-0.782447520599j)*x[2]**o + ((-0.240218175666-0.00656183926078j))*x[2]
            ref[(0, 1, 0, 3)]+=(0.978250501697-0.782447520599j)*x_ref[2]**o + ((-0.240218175666-0.00656183926078j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.128517047005-0.840045465842j)*x[2]**o + ((-0.215426958267+0.366983537489j))*x[2]
            ref[(0, 1, 1, 0)]+=(0.128517047005-0.840045465842j)*x_ref[2]**o + ((-0.215426958267+0.366983537489j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.55405617787+0.988362531723j)*x[2]**o + ((0.599372575879+0.870716979655j))*x[2]
            ref[(0, 1, 1, 1)]+=(0.55405617787+0.988362531723j)*x_ref[2]**o + ((0.599372575879+0.870716979655j))*x_ref[2]
            arg[(0, 1, 1, 2)]+=(0.0638020289981+0.236734017907j)*x[2]**o + ((-0.0371866060889+0.808751470026j))*x[2]
            ref[(0, 1, 1, 2)]+=(0.0638020289981+0.236734017907j)*x_ref[2]**o + ((-0.0371866060889+0.808751470026j))*x_ref[2]
            arg[(0, 1, 1, 3)]+=(-0.28659332104-0.288137003449j)*x[2]**o + ((0.112831207529-0.338584669722j))*x[2]
            ref[(0, 1, 1, 3)]+=(-0.28659332104-0.288137003449j)*x_ref[2]**o + ((0.112831207529-0.338584669722j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(-0.543355171404+0.59786893333j)*x[2]**o + ((-0.444186473656-0.938513738288j))*x[2]
            ref[(0, 1, 2, 0)]+=(-0.543355171404+0.59786893333j)*x_ref[2]**o + ((-0.444186473656-0.938513738288j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(0.701351643898-0.1418692141j)*x[2]**o + ((-0.615730919433+0.0910774108169j))*x[2]
            ref[(0, 1, 2, 1)]+=(0.701351643898-0.1418692141j)*x_ref[2]**o + ((-0.615730919433+0.0910774108169j))*x_ref[2]
            arg[(0, 1, 2, 2)]+=(-0.771490935537+0.904380587134j)*x[2]**o + ((0.530518816472+0.0882233209632j))*x[2]
            ref[(0, 1, 2, 2)]+=(-0.771490935537+0.904380587134j)*x_ref[2]**o + ((0.530518816472+0.0882233209632j))*x_ref[2]
            arg[(0, 1, 2, 3)]+=(0.767490233523+0.0555753904606j)*x[2]**o + ((0.973799047816+0.999363448578j))*x[2]
            ref[(0, 1, 2, 3)]+=(0.767490233523+0.0555753904606j)*x_ref[2]**o + ((0.973799047816+0.999363448578j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.391854245358-0.461580772083j)*x[2]**o + ((-0.74841219765-0.430597777477j))*x[2]
            ref[(1, 0, 0, 0)]+=(-0.391854245358-0.461580772083j)*x_ref[2]**o + ((-0.74841219765-0.430597777477j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.511090536102+0.577783415055j)*x[2]**o + ((0.599239339134-0.587063575587j))*x[2]
            ref[(1, 0, 0, 1)]+=(0.511090536102+0.577783415055j)*x_ref[2]**o + ((0.599239339134-0.587063575587j))*x_ref[2]
            arg[(1, 0, 0, 2)]+=(-0.814582770685+0.175144811195j)*x[2]**o + ((-0.287124488645+0.723187092055j))*x[2]
            ref[(1, 0, 0, 2)]+=(-0.814582770685+0.175144811195j)*x_ref[2]**o + ((-0.287124488645+0.723187092055j))*x_ref[2]
            arg[(1, 0, 0, 3)]+=(0.142120833442-0.450771607326j)*x[2]**o + ((-0.977989126513-0.187364373846j))*x[2]
            ref[(1, 0, 0, 3)]+=(0.142120833442-0.450771607326j)*x_ref[2]**o + ((-0.977989126513-0.187364373846j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.205655710275-0.490533456684j)*x[2]**o + ((0.511565793088-0.226609622629j))*x[2]
            ref[(1, 0, 1, 0)]+=(0.205655710275-0.490533456684j)*x_ref[2]**o + ((0.511565793088-0.226609622629j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.121903672997-0.228234753879j)*x[2]**o + ((-0.4125905588-0.710013082575j))*x[2]
            ref[(1, 0, 1, 1)]+=(-0.121903672997-0.228234753879j)*x_ref[2]**o + ((-0.4125905588-0.710013082575j))*x_ref[2]
            arg[(1, 0, 1, 2)]+=(0.409440666462+0.851787782752j)*x[2]**o + ((0.177441201787-0.753582904135j))*x[2]
            ref[(1, 0, 1, 2)]+=(0.409440666462+0.851787782752j)*x_ref[2]**o + ((0.177441201787-0.753582904135j))*x_ref[2]
            arg[(1, 0, 1, 3)]+=(-0.821177381025+0.530773353227j)*x[2]**o + ((-0.023064931896+0.137048196304j))*x[2]
            ref[(1, 0, 1, 3)]+=(-0.821177381025+0.530773353227j)*x_ref[2]**o + ((-0.023064931896+0.137048196304j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(-0.84813079605+0.159666037484j)*x[2]**o + ((-0.853239431613+0.276013643992j))*x[2]
            ref[(1, 0, 2, 0)]+=(-0.84813079605+0.159666037484j)*x_ref[2]**o + ((-0.853239431613+0.276013643992j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(-0.303587568323-0.973116382037j)*x[2]**o + ((-0.709724752895-0.935446034321j))*x[2]
            ref[(1, 0, 2, 1)]+=(-0.303587568323-0.973116382037j)*x_ref[2]**o + ((-0.709724752895-0.935446034321j))*x_ref[2]
            arg[(1, 0, 2, 2)]+=(0.339389834778-0.981887863978j)*x[2]**o + ((0.81166093901-0.391689866353j))*x[2]
            ref[(1, 0, 2, 2)]+=(0.339389834778-0.981887863978j)*x_ref[2]**o + ((0.81166093901-0.391689866353j))*x_ref[2]
            arg[(1, 0, 2, 3)]+=(-0.464557167101+0.655803723136j)*x[2]**o + ((-0.543385468778+0.419610412414j))*x[2]
            ref[(1, 0, 2, 3)]+=(-0.464557167101+0.655803723136j)*x_ref[2]**o + ((-0.543385468778+0.419610412414j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.265578451608-0.747946748729j)*x[2]**o + ((0.435892801461+0.523835039474j))*x[2]
            ref[(1, 1, 0, 0)]+=(-0.265578451608-0.747946748729j)*x_ref[2]**o + ((0.435892801461+0.523835039474j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.628135105255+0.73403528421j)*x[2]**o + ((-0.999547514178-0.241090813177j))*x[2]
            ref[(1, 1, 0, 1)]+=(0.628135105255+0.73403528421j)*x_ref[2]**o + ((-0.999547514178-0.241090813177j))*x_ref[2]
            arg[(1, 1, 0, 2)]+=(-0.21681513811+0.508761353832j)*x[2]**o + ((0.732530277139-0.113467405558j))*x[2]
            ref[(1, 1, 0, 2)]+=(-0.21681513811+0.508761353832j)*x_ref[2]**o + ((0.732530277139-0.113467405558j))*x_ref[2]
            arg[(1, 1, 0, 3)]+=(-0.432762008224-0.0311894968876j)*x[2]**o + ((0.392846017797+0.99683688432j))*x[2]
            ref[(1, 1, 0, 3)]+=(-0.432762008224-0.0311894968876j)*x_ref[2]**o + ((0.392846017797+0.99683688432j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.465950531382-0.197068445884j)*x[2]**o + ((-0.970244314156-0.634343994636j))*x[2]
            ref[(1, 1, 1, 0)]+=(0.465950531382-0.197068445884j)*x_ref[2]**o + ((-0.970244314156-0.634343994636j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.100162262942+0.298942477742j)*x[2]**o + ((0.0331991706953+0.8542351622j))*x[2]
            ref[(1, 1, 1, 1)]+=(-0.100162262942+0.298942477742j)*x_ref[2]**o + ((0.0331991706953+0.8542351622j))*x_ref[2]
            arg[(1, 1, 1, 2)]+=(0.452767501133-0.0677515115172j)*x[2]**o + ((-0.0426599772701+0.993022836733j))*x[2]
            ref[(1, 1, 1, 2)]+=(0.452767501133-0.0677515115172j)*x_ref[2]**o + ((-0.0426599772701+0.993022836733j))*x_ref[2]
            arg[(1, 1, 1, 3)]+=(0.57061232776-0.118094215032j)*x[2]**o + ((0.649813244289+0.545797623989j))*x[2]
            ref[(1, 1, 1, 3)]+=(0.57061232776-0.118094215032j)*x_ref[2]**o + ((0.649813244289+0.545797623989j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(0.854526432003+0.272152424735j)*x[2]**o + ((-0.646149090755-0.188664975767j))*x[2]
            ref[(1, 1, 2, 0)]+=(0.854526432003+0.272152424735j)*x_ref[2]**o + ((-0.646149090755-0.188664975767j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(0.377891641509+0.109304724784j)*x[2]**o + ((0.597303377892-0.452997037j))*x[2]
            ref[(1, 1, 2, 1)]+=(0.377891641509+0.109304724784j)*x_ref[2]**o + ((0.597303377892-0.452997037j))*x_ref[2]
            arg[(1, 1, 2, 2)]+=(0.264135051502+0.0296266526787j)*x[2]**o + ((-0.454942007678+0.861317305341j))*x[2]
            ref[(1, 1, 2, 2)]+=(0.264135051502+0.0296266526787j)*x_ref[2]**o + ((-0.454942007678+0.861317305341j))*x_ref[2]
            arg[(1, 1, 2, 3)]+=(-0.111837540065-0.0967270085112j)*x[2]**o + ((0.040942356626-0.537721843079j))*x[2]
            ref[(1, 1, 2, 3)]+=(-0.111837540065-0.0967270085112j)*x_ref[2]**o + ((0.040942356626-0.537721843079j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(0.847221216819-0.78448686946j)*x[2]**o + ((0.205094742504-0.81127930059j))*x[2]
            ref[(2, 0, 0, 0)]+=(0.847221216819-0.78448686946j)*x_ref[2]**o + ((0.205094742504-0.81127930059j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(-0.383691786308+0.000979011318326j)*x[2]**o + ((0.725204696299+0.302535715788j))*x[2]
            ref[(2, 0, 0, 1)]+=(-0.383691786308+0.000979011318326j)*x_ref[2]**o + ((0.725204696299+0.302535715788j))*x_ref[2]
            arg[(2, 0, 0, 2)]+=(-0.256417654444+0.767260972892j)*x[2]**o + ((0.645432973825+0.0857170775436j))*x[2]
            ref[(2, 0, 0, 2)]+=(-0.256417654444+0.767260972892j)*x_ref[2]**o + ((0.645432973825+0.0857170775436j))*x_ref[2]
            arg[(2, 0, 0, 3)]+=(0.136715602604-0.996693630007j)*x[2]**o + ((-0.0277488509531-0.0423479119376j))*x[2]
            ref[(2, 0, 0, 3)]+=(0.136715602604-0.996693630007j)*x_ref[2]**o + ((-0.0277488509531-0.0423479119376j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(0.599467568595+0.451567275558j)*x[2]**o + ((0.98852907174-0.100004508646j))*x[2]
            ref[(2, 0, 1, 0)]+=(0.599467568595+0.451567275558j)*x_ref[2]**o + ((0.98852907174-0.100004508646j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(-0.128196597704-0.130331404122j)*x[2]**o + ((0.214209046245+0.372191796071j))*x[2]
            ref[(2, 0, 1, 1)]+=(-0.128196597704-0.130331404122j)*x_ref[2]**o + ((0.214209046245+0.372191796071j))*x_ref[2]
            arg[(2, 0, 1, 2)]+=(-0.855227434809-0.989398738953j)*x[2]**o + ((0.0964861065285-0.893367931884j))*x[2]
            ref[(2, 0, 1, 2)]+=(-0.855227434809-0.989398738953j)*x_ref[2]**o + ((0.0964861065285-0.893367931884j))*x_ref[2]
            arg[(2, 0, 1, 3)]+=(0.657148207409+0.195975069783j)*x[2]**o + ((0.0620766286646-0.725104978766j))*x[2]
            ref[(2, 0, 1, 3)]+=(0.657148207409+0.195975069783j)*x_ref[2]**o + ((0.0620766286646-0.725104978766j))*x_ref[2]
            arg[(2, 0, 2, 0)]+=(0.280094472491+0.250018789362j)*x[2]**o + ((-0.530319398607+0.345317089405j))*x[2]
            ref[(2, 0, 2, 0)]+=(0.280094472491+0.250018789362j)*x_ref[2]**o + ((-0.530319398607+0.345317089405j))*x_ref[2]
            arg[(2, 0, 2, 1)]+=(0.483144446691-0.97451022418j)*x[2]**o + ((0.963042087053-0.66456021312j))*x[2]
            ref[(2, 0, 2, 1)]+=(0.483144446691-0.97451022418j)*x_ref[2]**o + ((0.963042087053-0.66456021312j))*x_ref[2]
            arg[(2, 0, 2, 2)]+=(-0.97498534406+0.98997026022j)*x[2]**o + ((0.349456868192+0.523823195688j))*x[2]
            ref[(2, 0, 2, 2)]+=(-0.97498534406+0.98997026022j)*x_ref[2]**o + ((0.349456868192+0.523823195688j))*x_ref[2]
            arg[(2, 0, 2, 3)]+=(-0.811544418826-0.21286674646j)*x[2]**o + ((0.809812473522+0.174211117654j))*x[2]
            ref[(2, 0, 2, 3)]+=(-0.811544418826-0.21286674646j)*x_ref[2]**o + ((0.809812473522+0.174211117654j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(-0.131684298716+0.496145265846j)*x[2]**o + ((-0.117678094727-0.584015892707j))*x[2]
            ref[(2, 1, 0, 0)]+=(-0.131684298716+0.496145265846j)*x_ref[2]**o + ((-0.117678094727-0.584015892707j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(0.233229706832-0.869609359691j)*x[2]**o + ((-0.66556872426+0.225386773127j))*x[2]
            ref[(2, 1, 0, 1)]+=(0.233229706832-0.869609359691j)*x_ref[2]**o + ((-0.66556872426+0.225386773127j))*x_ref[2]
            arg[(2, 1, 0, 2)]+=(0.718962093182+0.556420569772j)*x[2]**o + ((-0.618812358506+0.285656269781j))*x[2]
            ref[(2, 1, 0, 2)]+=(0.718962093182+0.556420569772j)*x_ref[2]**o + ((-0.618812358506+0.285656269781j))*x_ref[2]
            arg[(2, 1, 0, 3)]+=(0.131999219052+0.795068813913j)*x[2]**o + ((-0.126690724036+0.851176133758j))*x[2]
            ref[(2, 1, 0, 3)]+=(0.131999219052+0.795068813913j)*x_ref[2]**o + ((-0.126690724036+0.851176133758j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(0.727101994239+0.409465516688j)*x[2]**o + ((-0.799427968758-0.402639635147j))*x[2]
            ref[(2, 1, 1, 0)]+=(0.727101994239+0.409465516688j)*x_ref[2]**o + ((-0.799427968758-0.402639635147j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(0.898367474404-0.902990602371j)*x[2]**o + ((-0.552700769193+0.783311022013j))*x[2]
            ref[(2, 1, 1, 1)]+=(0.898367474404-0.902990602371j)*x_ref[2]**o + ((-0.552700769193+0.783311022013j))*x_ref[2]
            arg[(2, 1, 1, 2)]+=(-0.551974759665+0.219019588974j)*x[2]**o + ((0.120186317367+0.383043403427j))*x[2]
            ref[(2, 1, 1, 2)]+=(-0.551974759665+0.219019588974j)*x_ref[2]**o + ((0.120186317367+0.383043403427j))*x_ref[2]
            arg[(2, 1, 1, 3)]+=(0.21737421708+0.376723749484j)*x[2]**o + ((0.542459872549-0.352314178042j))*x[2]
            ref[(2, 1, 1, 3)]+=(0.21737421708+0.376723749484j)*x_ref[2]**o + ((0.542459872549-0.352314178042j))*x_ref[2]
            arg[(2, 1, 2, 0)]+=(-0.157210278585-0.480924278623j)*x[2]**o + ((-0.451939256889+0.105470602284j))*x[2]
            ref[(2, 1, 2, 0)]+=(-0.157210278585-0.480924278623j)*x_ref[2]**o + ((-0.451939256889+0.105470602284j))*x_ref[2]
            arg[(2, 1, 2, 1)]+=(0.000368492627722-0.464916667496j)*x[2]**o + ((0.741700115191-0.821201720652j))*x[2]
            ref[(2, 1, 2, 1)]+=(0.000368492627722-0.464916667496j)*x_ref[2]**o + ((0.741700115191-0.821201720652j))*x_ref[2]
            arg[(2, 1, 2, 2)]+=(0.627199972606+0.87817826991j)*x[2]**o + ((0.00362469836327-0.297347087533j))*x[2]
            ref[(2, 1, 2, 2)]+=(0.627199972606+0.87817826991j)*x_ref[2]**o + ((0.00362469836327-0.297347087533j))*x_ref[2]
            arg[(2, 1, 2, 3)]+=(-0.65838281762+0.523809850593j)*x[2]**o + ((0.994876522078+0.794118778229j))*x[2]
            ref[(2, 1, 2, 3)]+=(-0.65838281762+0.523809850593j)*x_ref[2]**o + ((0.994876522078+0.794118778229j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedSolution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.388832048689+0.395318021161j)*x[0]**o + ((0.803477202118+0.0689295273874j))*x[0] + ((0.653293732491+0.77324093256j))*x[1]**o + ((0.581999608098-0.806108257857j))*x[1]
        ref=(0.388832048689+0.395318021161j)*x_ref[0]**o + ((0.803477202118+0.0689295273874j))*x_ref[0] + ((0.653293732491+0.77324093256j))*x_ref[1]**o + ((0.581999608098-0.806108257857j))*x_ref[1]
        if dim==3:
            arg+=((-0.576288223263+0.655368770866j))*x[2]**o + ((-0.329400686467+0.339043013948j))*x[2]
            ref+=((-0.576288223263+0.655368770866j))*x_ref[2]**o + ((-0.329400686467+0.339043013948j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedSolution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=(-0.509227869764-0.336134305422j)*x[0]**o + ((0.982114410121+0.947623975723j))*x[0] + ((-0.997420491203+0.17365713504j))*x[1]**o + ((0.521050058484-0.233125694123j))*x[1]
        ref[(0,)]=(-0.509227869764-0.336134305422j)*x_ref[0]**o + ((0.982114410121+0.947623975723j))*x_ref[0] + ((-0.997420491203+0.17365713504j))*x_ref[1]**o + ((0.521050058484-0.233125694123j))*x_ref[1]
        arg[(1,)]=(-0.657725741667+0.413833937342j)*x[0]**o + ((-0.723929822995-0.647663971868j))*x[0] + ((-0.700329393142+0.700515816816j))*x[1]**o + ((-0.486658317517+0.525068016129j))*x[1]
        ref[(1,)]=(-0.657725741667+0.413833937342j)*x_ref[0]**o + ((-0.723929822995-0.647663971868j))*x_ref[0] + ((-0.700329393142+0.700515816816j))*x_ref[1]**o + ((-0.486658317517+0.525068016129j))*x_ref[1]
        arg[(2,)]=(0.920591747972+0.795512642532j)*x[0]**o + ((0.305408814197+0.830235877928j))*x[0] + ((0.625247995494+0.597192364763j))*x[1]**o + ((0.654395724414-0.661392543364j))*x[1]
        ref[(2,)]=(0.920591747972+0.795512642532j)*x_ref[0]**o + ((0.305408814197+0.830235877928j))*x_ref[0] + ((0.625247995494+0.597192364763j))*x_ref[1]**o + ((0.654395724414-0.661392543364j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.755352728359+0.778454095897j)*x[2]**o + ((-0.22667270968+0.270776858733j))*x[2]
            ref[(0,)]+=(-0.755352728359+0.778454095897j)*x_ref[2]**o + ((-0.22667270968+0.270776858733j))*x_ref[2]
            arg[(1,)]+=(-0.0823272789056+0.311239260593j)*x[2]**o + ((0.00527178890821-0.1072343693j))*x[2]
            ref[(1,)]+=(-0.0823272789056+0.311239260593j)*x_ref[2]**o + ((0.00527178890821-0.1072343693j))*x_ref[2]
            arg[(2,)]+=(0.371637760422-0.0449106453835j)*x[2]**o + ((-0.80127852411-0.028455282436j))*x[2]
            ref[(2,)]+=(0.371637760422-0.0449106453835j)*x_ref[2]**o + ((-0.80127852411-0.028455282436j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedSolution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2),w)
        ref = Data(0,(4, 2),w_ref)
        arg[(0, 0)]=(-0.228166980925+0.806046264871j)*x[0]**o + ((0.630358541157-0.0986260452877j))*x[0] + ((-0.983890401086-0.585333588465j))*x[1]**o + ((-0.666563339869-0.893639517816j))*x[1]
        ref[(0, 0)]=(-0.228166980925+0.806046264871j)*x_ref[0]**o + ((0.630358541157-0.0986260452877j))*x_ref[0] + ((-0.983890401086-0.585333588465j))*x_ref[1]**o + ((-0.666563339869-0.893639517816j))*x_ref[1]
        arg[(0, 1)]=(-0.177109806967+0.649145936277j)*x[0]**o + ((-0.0307124079264-0.688789984694j))*x[0] + ((0.940980511793-0.46361074956j))*x[1]**o + ((-0.495898748125-0.254448790409j))*x[1]
        ref[(0, 1)]=(-0.177109806967+0.649145936277j)*x_ref[0]**o + ((-0.0307124079264-0.688789984694j))*x_ref[0] + ((0.940980511793-0.46361074956j))*x_ref[1]**o + ((-0.495898748125-0.254448790409j))*x_ref[1]
        arg[(1, 0)]=(0.857884307028+0.74666555204j)*x[0]**o + ((-0.715515310057-0.458330392022j))*x[0] + ((0.960725590283-0.258958836224j))*x[1]**o + ((0.761735244212+0.654572838538j))*x[1]
        ref[(1, 0)]=(0.857884307028+0.74666555204j)*x_ref[0]**o + ((-0.715515310057-0.458330392022j))*x_ref[0] + ((0.960725590283-0.258958836224j))*x_ref[1]**o + ((0.761735244212+0.654572838538j))*x_ref[1]
        arg[(1, 1)]=(0.742237740971-0.183686607151j)*x[0]**o + ((0.369023736893-0.890513003515j))*x[0] + ((0.216914175263+0.355503398295j))*x[1]**o + ((-0.492995487879+0.993593351711j))*x[1]
        ref[(1, 1)]=(0.742237740971-0.183686607151j)*x_ref[0]**o + ((0.369023736893-0.890513003515j))*x_ref[0] + ((0.216914175263+0.355503398295j))*x_ref[1]**o + ((-0.492995487879+0.993593351711j))*x_ref[1]
        arg[(2, 0)]=(-0.0984008375514+0.421780950117j)*x[0]**o + ((-0.654625432371-0.933406054833j))*x[0] + ((-0.421167389011+0.0663414857186j))*x[1]**o + ((0.172484141861+0.145983080351j))*x[1]
        ref[(2, 0)]=(-0.0984008375514+0.421780950117j)*x_ref[0]**o + ((-0.654625432371-0.933406054833j))*x_ref[0] + ((-0.421167389011+0.0663414857186j))*x_ref[1]**o + ((0.172484141861+0.145983080351j))*x_ref[1]
        arg[(2, 1)]=(0.326043854379-0.178814936537j)*x[0]**o + ((0.447031698114-0.60752631693j))*x[0] + ((-0.305481429821-0.524065077603j))*x[1]**o + ((0.687572966199-0.626745560348j))*x[1]
        ref[(2, 1)]=(0.326043854379-0.178814936537j)*x_ref[0]**o + ((0.447031698114-0.60752631693j))*x_ref[0] + ((-0.305481429821-0.524065077603j))*x_ref[1]**o + ((0.687572966199-0.626745560348j))*x_ref[1]
        arg[(3, 0)]=(-0.805591167825-0.521266030127j)*x[0]**o + ((-0.765727089951-0.776416780842j))*x[0] + ((0.621010111365-0.956792842902j))*x[1]**o + ((-0.881127332634-0.187201845848j))*x[1]
        ref[(3, 0)]=(-0.805591167825-0.521266030127j)*x_ref[0]**o + ((-0.765727089951-0.776416780842j))*x_ref[0] + ((0.621010111365-0.956792842902j))*x_ref[1]**o + ((-0.881127332634-0.187201845848j))*x_ref[1]
        arg[(3, 1)]=(-0.511866522853+0.098669934807j)*x[0]**o + ((0.544118927831-0.352825311649j))*x[0] + ((0.957521905498-0.235072905919j))*x[1]**o + ((0.22701949413+0.828716938099j))*x[1]
        ref[(3, 1)]=(-0.511866522853+0.098669934807j)*x_ref[0]**o + ((0.544118927831-0.352825311649j))*x_ref[0] + ((0.957521905498-0.235072905919j))*x_ref[1]**o + ((0.22701949413+0.828716938099j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.675268763794+0.467792838762j)*x[2]**o + ((0.502447928244-0.708392486562j))*x[2]
            ref[(0, 0)]+=(0.675268763794+0.467792838762j)*x_ref[2]**o + ((0.502447928244-0.708392486562j))*x_ref[2]
            arg[(0, 1)]+=(0.617876207977-0.645057423524j)*x[2]**o + ((0.559324261467-0.74717110533j))*x[2]
            ref[(0, 1)]+=(0.617876207977-0.645057423524j)*x_ref[2]**o + ((0.559324261467-0.74717110533j))*x_ref[2]
            arg[(1, 0)]+=(-0.0743177945877+0.984716558685j)*x[2]**o + ((-0.0587158859951-0.660653260769j))*x[2]
            ref[(1, 0)]+=(-0.0743177945877+0.984716558685j)*x_ref[2]**o + ((-0.0587158859951-0.660653260769j))*x_ref[2]
            arg[(1, 1)]+=(-0.872041408395+0.0668476739942j)*x[2]**o + ((0.132844341254+0.776749190266j))*x[2]
            ref[(1, 1)]+=(-0.872041408395+0.0668476739942j)*x_ref[2]**o + ((0.132844341254+0.776749190266j))*x_ref[2]
            arg[(2, 0)]+=(0.13717390247+0.341595538854j)*x[2]**o + ((-0.611947888506+0.775511819341j))*x[2]
            ref[(2, 0)]+=(0.13717390247+0.341595538854j)*x_ref[2]**o + ((-0.611947888506+0.775511819341j))*x_ref[2]
            arg[(2, 1)]+=(-0.358774102741+0.276455352376j)*x[2]**o + ((-0.553182074512-0.420910214572j))*x[2]
            ref[(2, 1)]+=(-0.358774102741+0.276455352376j)*x_ref[2]**o + ((-0.553182074512-0.420910214572j))*x_ref[2]
            arg[(3, 0)]+=(0.188707417484-0.638810377875j)*x[2]**o + ((-0.0921921806162+0.62449894925j))*x[2]
            ref[(3, 0)]+=(0.188707417484-0.638810377875j)*x_ref[2]**o + ((-0.0921921806162+0.62449894925j))*x_ref[2]
            arg[(3, 1)]+=(-0.639642732723+0.280510106428j)*x[2]**o + ((0.489446396605+0.994727808014j))*x[2]
            ref[(3, 1)]+=(-0.639642732723+0.280510106428j)*x_ref[2]**o + ((0.489446396605+0.994727808014j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedSolution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 3),w)
        ref = Data(0,(4, 2, 3),w_ref)
        arg[(0, 0, 0)]=(0.332826913312-0.696364613296j)*x[0]**o + ((0.882050986597+0.0914900779486j))*x[0] + ((-0.0198798336813+0.115260472634j))*x[1]**o + ((-0.611800791024-0.56574257325j))*x[1]
        ref[(0, 0, 0)]=(0.332826913312-0.696364613296j)*x_ref[0]**o + ((0.882050986597+0.0914900779486j))*x_ref[0] + ((-0.0198798336813+0.115260472634j))*x_ref[1]**o + ((-0.611800791024-0.56574257325j))*x_ref[1]
        arg[(0, 0, 1)]=(0.378537425205+0.71647411466j)*x[0]**o + ((0.630381978255-0.130903408214j))*x[0] + ((0.0932206115835+0.48175563087j))*x[1]**o + ((0.632192844486+0.937231128989j))*x[1]
        ref[(0, 0, 1)]=(0.378537425205+0.71647411466j)*x_ref[0]**o + ((0.630381978255-0.130903408214j))*x_ref[0] + ((0.0932206115835+0.48175563087j))*x_ref[1]**o + ((0.632192844486+0.937231128989j))*x_ref[1]
        arg[(0, 0, 2)]=(0.893043716555+0.721121245583j)*x[0]**o + ((0.440250306208+0.741068673824j))*x[0] + ((-0.713589027935+0.0868023830281j))*x[1]**o + ((0.478467142709+0.0709774018796j))*x[1]
        ref[(0, 0, 2)]=(0.893043716555+0.721121245583j)*x_ref[0]**o + ((0.440250306208+0.741068673824j))*x_ref[0] + ((-0.713589027935+0.0868023830281j))*x_ref[1]**o + ((0.478467142709+0.0709774018796j))*x_ref[1]
        arg[(0, 1, 0)]=(0.649784811806-0.263048126615j)*x[0]**o + ((0.904628106618-0.201150656233j))*x[0] + ((0.309206885201-0.220073490639j))*x[1]**o + ((0.217007430248+0.216084908384j))*x[1]
        ref[(0, 1, 0)]=(0.649784811806-0.263048126615j)*x_ref[0]**o + ((0.904628106618-0.201150656233j))*x_ref[0] + ((0.309206885201-0.220073490639j))*x_ref[1]**o + ((0.217007430248+0.216084908384j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.147814825399+0.486054519682j)*x[0]**o + ((-0.933175443735-0.626113246545j))*x[0] + ((-0.612899730223-0.942122119213j))*x[1]**o + ((-0.100150075075-0.437426686801j))*x[1]
        ref[(0, 1, 1)]=(-0.147814825399+0.486054519682j)*x_ref[0]**o + ((-0.933175443735-0.626113246545j))*x_ref[0] + ((-0.612899730223-0.942122119213j))*x_ref[1]**o + ((-0.100150075075-0.437426686801j))*x_ref[1]
        arg[(0, 1, 2)]=(-0.710579839734+0.370896409498j)*x[0]**o + ((-0.935260943595-0.273421000812j))*x[0] + ((-0.591940957568-0.477023514741j))*x[1]**o + ((-0.184986089022+0.252481574479j))*x[1]
        ref[(0, 1, 2)]=(-0.710579839734+0.370896409498j)*x_ref[0]**o + ((-0.935260943595-0.273421000812j))*x_ref[0] + ((-0.591940957568-0.477023514741j))*x_ref[1]**o + ((-0.184986089022+0.252481574479j))*x_ref[1]
        arg[(1, 0, 0)]=(0.624949231679+0.927886309082j)*x[0]**o + ((-0.201922434546-0.221327272472j))*x[0] + ((-0.339485630921+0.793328130231j))*x[1]**o + ((-0.523323344387-0.67896581541j))*x[1]
        ref[(1, 0, 0)]=(0.624949231679+0.927886309082j)*x_ref[0]**o + ((-0.201922434546-0.221327272472j))*x_ref[0] + ((-0.339485630921+0.793328130231j))*x_ref[1]**o + ((-0.523323344387-0.67896581541j))*x_ref[1]
        arg[(1, 0, 1)]=(0.221975580619-0.121747794313j)*x[0]**o + ((0.929649334452-0.934582803318j))*x[0] + ((-0.201803963949-0.773634916598j))*x[1]**o + ((0.516721368114-0.666863265658j))*x[1]
        ref[(1, 0, 1)]=(0.221975580619-0.121747794313j)*x_ref[0]**o + ((0.929649334452-0.934582803318j))*x_ref[0] + ((-0.201803963949-0.773634916598j))*x_ref[1]**o + ((0.516721368114-0.666863265658j))*x_ref[1]
        arg[(1, 0, 2)]=(0.26039274383+0.197288271853j)*x[0]**o + ((-0.22944126504+0.595357789287j))*x[0] + ((0.0634884104614-0.855216616677j))*x[1]**o + ((0.275147332127-0.290758485405j))*x[1]
        ref[(1, 0, 2)]=(0.26039274383+0.197288271853j)*x_ref[0]**o + ((-0.22944126504+0.595357789287j))*x_ref[0] + ((0.0634884104614-0.855216616677j))*x_ref[1]**o + ((0.275147332127-0.290758485405j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.292660039376-0.959082224586j)*x[0]**o + ((0.169197214486+0.285629985255j))*x[0] + ((0.0231757185896-0.837331840601j))*x[1]**o + ((-0.236271052578+0.644833720784j))*x[1]
        ref[(1, 1, 0)]=(-0.292660039376-0.959082224586j)*x_ref[0]**o + ((0.169197214486+0.285629985255j))*x_ref[0] + ((0.0231757185896-0.837331840601j))*x_ref[1]**o + ((-0.236271052578+0.644833720784j))*x_ref[1]
        arg[(1, 1, 1)]=(0.24306578213+0.454030308394j)*x[0]**o + ((-0.214351930007-0.649233002846j))*x[0] + ((0.7991328569-0.497385492137j))*x[1]**o + ((-0.482394782718+0.672908417219j))*x[1]
        ref[(1, 1, 1)]=(0.24306578213+0.454030308394j)*x_ref[0]**o + ((-0.214351930007-0.649233002846j))*x_ref[0] + ((0.7991328569-0.497385492137j))*x_ref[1]**o + ((-0.482394782718+0.672908417219j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.0567134041499+0.883517867168j)*x[0]**o + ((0.182243035287-0.244200680286j))*x[0] + ((0.58683281266+0.942058211676j))*x[1]**o + ((-0.918566676589+0.348335738184j))*x[1]
        ref[(1, 1, 2)]=(-0.0567134041499+0.883517867168j)*x_ref[0]**o + ((0.182243035287-0.244200680286j))*x_ref[0] + ((0.58683281266+0.942058211676j))*x_ref[1]**o + ((-0.918566676589+0.348335738184j))*x_ref[1]
        arg[(2, 0, 0)]=(0.0529776026158-0.506588528638j)*x[0]**o + ((-0.32143843946+0.251098312943j))*x[0] + ((0.0371474563213+0.259971365391j))*x[1]**o + ((0.492777337483+0.0307572167156j))*x[1]
        ref[(2, 0, 0)]=(0.0529776026158-0.506588528638j)*x_ref[0]**o + ((-0.32143843946+0.251098312943j))*x_ref[0] + ((0.0371474563213+0.259971365391j))*x_ref[1]**o + ((0.492777337483+0.0307572167156j))*x_ref[1]
        arg[(2, 0, 1)]=(0.658828527339-0.122691622084j)*x[0]**o + ((0.934442826141+0.0056369945678j))*x[0] + ((-0.251435129864-0.0341401905343j))*x[1]**o + ((0.66105019486-0.126199885944j))*x[1]
        ref[(2, 0, 1)]=(0.658828527339-0.122691622084j)*x_ref[0]**o + ((0.934442826141+0.0056369945678j))*x_ref[0] + ((-0.251435129864-0.0341401905343j))*x_ref[1]**o + ((0.66105019486-0.126199885944j))*x_ref[1]
        arg[(2, 0, 2)]=(0.983140424586+0.474908933267j)*x[0]**o + ((-0.0826604370666-0.118950260186j))*x[0] + ((-0.812523541497+0.951718802617j))*x[1]**o + ((0.201135005253-0.891086141885j))*x[1]
        ref[(2, 0, 2)]=(0.983140424586+0.474908933267j)*x_ref[0]**o + ((-0.0826604370666-0.118950260186j))*x_ref[0] + ((-0.812523541497+0.951718802617j))*x_ref[1]**o + ((0.201135005253-0.891086141885j))*x_ref[1]
        arg[(2, 1, 0)]=(-0.150929711168-0.871998458239j)*x[0]**o + ((-0.882522529214-0.908436343304j))*x[0] + ((-0.654567137217-0.261162746673j))*x[1]**o + ((-0.543697152194-0.578955228231j))*x[1]
        ref[(2, 1, 0)]=(-0.150929711168-0.871998458239j)*x_ref[0]**o + ((-0.882522529214-0.908436343304j))*x_ref[0] + ((-0.654567137217-0.261162746673j))*x_ref[1]**o + ((-0.543697152194-0.578955228231j))*x_ref[1]
        arg[(2, 1, 1)]=(-0.380901224229+0.149402774599j)*x[0]**o + ((0.191698295944+0.0115084586009j))*x[0] + ((-0.719218542661-0.182593782288j))*x[1]**o + ((0.282141220986-0.875493913428j))*x[1]
        ref[(2, 1, 1)]=(-0.380901224229+0.149402774599j)*x_ref[0]**o + ((0.191698295944+0.0115084586009j))*x_ref[0] + ((-0.719218542661-0.182593782288j))*x_ref[1]**o + ((0.282141220986-0.875493913428j))*x_ref[1]
        arg[(2, 1, 2)]=(0.865142671438+0.706445950155j)*x[0]**o + ((-0.996773477839-0.211641509057j))*x[0] + ((-0.574265124299-0.425609556178j))*x[1]**o + ((-0.620670306323-0.390189867482j))*x[1]
        ref[(2, 1, 2)]=(0.865142671438+0.706445950155j)*x_ref[0]**o + ((-0.996773477839-0.211641509057j))*x_ref[0] + ((-0.574265124299-0.425609556178j))*x_ref[1]**o + ((-0.620670306323-0.390189867482j))*x_ref[1]
        arg[(3, 0, 0)]=(0.714411863529+0.202816028357j)*x[0]**o + ((-0.146315042419-0.197593061284j))*x[0] + ((-0.876253727918-0.234834356233j))*x[1]**o + ((-0.904530657165-0.218610782262j))*x[1]
        ref[(3, 0, 0)]=(0.714411863529+0.202816028357j)*x_ref[0]**o + ((-0.146315042419-0.197593061284j))*x_ref[0] + ((-0.876253727918-0.234834356233j))*x_ref[1]**o + ((-0.904530657165-0.218610782262j))*x_ref[1]
        arg[(3, 0, 1)]=(-0.115871609973+0.822356217023j)*x[0]**o + ((0.044452386868-0.111650731628j))*x[0] + ((-0.305108715815+0.253177366171j))*x[1]**o + ((0.774465919384-0.534801109239j))*x[1]
        ref[(3, 0, 1)]=(-0.115871609973+0.822356217023j)*x_ref[0]**o + ((0.044452386868-0.111650731628j))*x_ref[0] + ((-0.305108715815+0.253177366171j))*x_ref[1]**o + ((0.774465919384-0.534801109239j))*x_ref[1]
        arg[(3, 0, 2)]=(-0.4961528311+0.518886421031j)*x[0]**o + ((0.799866108524-0.637395687461j))*x[0] + ((0.0510751815311-0.622968598753j))*x[1]**o + ((0.00816078135757+0.861674973442j))*x[1]
        ref[(3, 0, 2)]=(-0.4961528311+0.518886421031j)*x_ref[0]**o + ((0.799866108524-0.637395687461j))*x_ref[0] + ((0.0510751815311-0.622968598753j))*x_ref[1]**o + ((0.00816078135757+0.861674973442j))*x_ref[1]
        arg[(3, 1, 0)]=(-0.942783788904-0.627432901511j)*x[0]**o + ((-0.866202956716-0.0387379311776j))*x[0] + ((0.15037001542+0.778847825878j))*x[1]**o + ((0.358529042119-0.767238725373j))*x[1]
        ref[(3, 1, 0)]=(-0.942783788904-0.627432901511j)*x_ref[0]**o + ((-0.866202956716-0.0387379311776j))*x_ref[0] + ((0.15037001542+0.778847825878j))*x_ref[1]**o + ((0.358529042119-0.767238725373j))*x_ref[1]
        arg[(3, 1, 1)]=(-0.205073584792-0.60271132391j)*x[0]**o + ((0.58607254914+0.870759051694j))*x[0] + ((-0.405083787607+0.897618912626j))*x[1]**o + ((0.730572226298-0.898263921276j))*x[1]
        ref[(3, 1, 1)]=(-0.205073584792-0.60271132391j)*x_ref[0]**o + ((0.58607254914+0.870759051694j))*x_ref[0] + ((-0.405083787607+0.897618912626j))*x_ref[1]**o + ((0.730572226298-0.898263921276j))*x_ref[1]
        arg[(3, 1, 2)]=(-0.288894726105-0.747191595439j)*x[0]**o + ((-0.900480298309-0.730951117846j))*x[0] + ((-0.519736439292+0.764163604932j))*x[1]**o + ((0.158891906192+0.441338475346j))*x[1]
        ref[(3, 1, 2)]=(-0.288894726105-0.747191595439j)*x_ref[0]**o + ((-0.900480298309-0.730951117846j))*x_ref[0] + ((-0.519736439292+0.764163604932j))*x_ref[1]**o + ((0.158891906192+0.441338475346j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.867309623981-0.47585169936j)*x[2]**o + ((0.179639743529+0.159316510104j))*x[2]
            ref[(0, 0, 0)]+=(-0.867309623981-0.47585169936j)*x_ref[2]**o + ((0.179639743529+0.159316510104j))*x_ref[2]
            arg[(0, 0, 1)]+=(0.452621881858-0.57610663815j)*x[2]**o + ((-0.556648666086+0.302131830888j))*x[2]
            ref[(0, 0, 1)]+=(0.452621881858-0.57610663815j)*x_ref[2]**o + ((-0.556648666086+0.302131830888j))*x_ref[2]
            arg[(0, 0, 2)]+=(0.0448819573447-0.432431779451j)*x[2]**o + ((0.867185774449-0.911049747246j))*x[2]
            ref[(0, 0, 2)]+=(0.0448819573447-0.432431779451j)*x_ref[2]**o + ((0.867185774449-0.911049747246j))*x_ref[2]
            arg[(0, 1, 0)]+=(0.917189754544-0.589842261776j)*x[2]**o + ((0.119096921822+0.277264738321j))*x[2]
            ref[(0, 1, 0)]+=(0.917189754544-0.589842261776j)*x_ref[2]**o + ((0.119096921822+0.277264738321j))*x_ref[2]
            arg[(0, 1, 1)]+=(-0.122753935374+0.33926356125j)*x[2]**o + ((-0.338158892566-0.428759828997j))*x[2]
            ref[(0, 1, 1)]+=(-0.122753935374+0.33926356125j)*x_ref[2]**o + ((-0.338158892566-0.428759828997j))*x_ref[2]
            arg[(0, 1, 2)]+=(-0.282994648701-0.134897283961j)*x[2]**o + ((-0.370294245625+0.195518533187j))*x[2]
            ref[(0, 1, 2)]+=(-0.282994648701-0.134897283961j)*x_ref[2]**o + ((-0.370294245625+0.195518533187j))*x_ref[2]
            arg[(1, 0, 0)]+=(0.56185026228+0.485203209598j)*x[2]**o + ((0.321440479046+0.966935934051j))*x[2]
            ref[(1, 0, 0)]+=(0.56185026228+0.485203209598j)*x_ref[2]**o + ((0.321440479046+0.966935934051j))*x_ref[2]
            arg[(1, 0, 1)]+=(0.97798602826+0.0148088194159j)*x[2]**o + ((-0.538213169748-0.532156236089j))*x[2]
            ref[(1, 0, 1)]+=(0.97798602826+0.0148088194159j)*x_ref[2]**o + ((-0.538213169748-0.532156236089j))*x_ref[2]
            arg[(1, 0, 2)]+=(-0.242717360926-0.226525336061j)*x[2]**o + ((0.633712965716-0.771131535872j))*x[2]
            ref[(1, 0, 2)]+=(-0.242717360926-0.226525336061j)*x_ref[2]**o + ((0.633712965716-0.771131535872j))*x_ref[2]
            arg[(1, 1, 0)]+=(0.0117766015855+0.307983426844j)*x[2]**o + ((-0.246435159344-0.744751924692j))*x[2]
            ref[(1, 1, 0)]+=(0.0117766015855+0.307983426844j)*x_ref[2]**o + ((-0.246435159344-0.744751924692j))*x_ref[2]
            arg[(1, 1, 1)]+=(-0.452917859617-0.629004809767j)*x[2]**o + ((0.41536498192-0.600292518375j))*x[2]
            ref[(1, 1, 1)]+=(-0.452917859617-0.629004809767j)*x_ref[2]**o + ((0.41536498192-0.600292518375j))*x_ref[2]
            arg[(1, 1, 2)]+=(0.346859452314-0.28944240934j)*x[2]**o + ((0.707110671496-0.962901559833j))*x[2]
            ref[(1, 1, 2)]+=(0.346859452314-0.28944240934j)*x_ref[2]**o + ((0.707110671496-0.962901559833j))*x_ref[2]
            arg[(2, 0, 0)]+=(-0.673085001755-0.387343859268j)*x[2]**o + ((0.56030042649-0.0379959224285j))*x[2]
            ref[(2, 0, 0)]+=(-0.673085001755-0.387343859268j)*x_ref[2]**o + ((0.56030042649-0.0379959224285j))*x_ref[2]
            arg[(2, 0, 1)]+=(0.513317956806+0.822374188146j)*x[2]**o + ((-0.24976283189+0.0165794344625j))*x[2]
            ref[(2, 0, 1)]+=(0.513317956806+0.822374188146j)*x_ref[2]**o + ((-0.24976283189+0.0165794344625j))*x_ref[2]
            arg[(2, 0, 2)]+=(-0.0667763060926+0.229047071305j)*x[2]**o + ((-0.168055415775-0.512614753952j))*x[2]
            ref[(2, 0, 2)]+=(-0.0667763060926+0.229047071305j)*x_ref[2]**o + ((-0.168055415775-0.512614753952j))*x_ref[2]
            arg[(2, 1, 0)]+=(0.970032801736-0.303996108346j)*x[2]**o + ((0.0611001954091-0.15907599028j))*x[2]
            ref[(2, 1, 0)]+=(0.970032801736-0.303996108346j)*x_ref[2]**o + ((0.0611001954091-0.15907599028j))*x_ref[2]
            arg[(2, 1, 1)]+=(0.135915306615-0.898364927951j)*x[2]**o + ((-0.205457942681-0.312411153623j))*x[2]
            ref[(2, 1, 1)]+=(0.135915306615-0.898364927951j)*x_ref[2]**o + ((-0.205457942681-0.312411153623j))*x_ref[2]
            arg[(2, 1, 2)]+=(0.0133085206343+0.964901094535j)*x[2]**o + ((0.336751560644+0.925137153965j))*x[2]
            ref[(2, 1, 2)]+=(0.0133085206343+0.964901094535j)*x_ref[2]**o + ((0.336751560644+0.925137153965j))*x_ref[2]
            arg[(3, 0, 0)]+=(-0.376111131185-0.987622420544j)*x[2]**o + ((0.884612058764-0.536336235857j))*x[2]
            ref[(3, 0, 0)]+=(-0.376111131185-0.987622420544j)*x_ref[2]**o + ((0.884612058764-0.536336235857j))*x_ref[2]
            arg[(3, 0, 1)]+=(0.549833991534-0.681290702172j)*x[2]**o + ((0.955845633354-0.9996061521j))*x[2]
            ref[(3, 0, 1)]+=(0.549833991534-0.681290702172j)*x_ref[2]**o + ((0.955845633354-0.9996061521j))*x_ref[2]
            arg[(3, 0, 2)]+=(0.612605301755-0.74212627755j)*x[2]**o + ((-0.0527871844718-0.120639788137j))*x[2]
            ref[(3, 0, 2)]+=(0.612605301755-0.74212627755j)*x_ref[2]**o + ((-0.0527871844718-0.120639788137j))*x_ref[2]
            arg[(3, 1, 0)]+=(-0.0985444413513+0.052516452829j)*x[2]**o + ((0.4784917297+0.0802080731806j))*x[2]
            ref[(3, 1, 0)]+=(-0.0985444413513+0.052516452829j)*x_ref[2]**o + ((0.4784917297+0.0802080731806j))*x_ref[2]
            arg[(3, 1, 1)]+=(0.208110657713+0.367362536712j)*x[2]**o + ((0.481319973252+0.947975010738j))*x[2]
            ref[(3, 1, 1)]+=(0.208110657713+0.367362536712j)*x_ref[2]**o + ((0.481319973252+0.947975010738j))*x_ref[2]
            arg[(3, 1, 2)]+=(-0.75728521373-0.917668536319j)*x[2]**o + ((-0.969642925606-0.985926629933j))*x[2]
            ref[(3, 1, 2)]+=(-0.75728521373-0.917668536319j)*x_ref[2]**o + ((-0.969642925606-0.985926629933j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedSolution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 3, 2),w)
        ref = Data(0,(4, 2, 3, 2),w_ref)
        arg[(0, 0, 0, 0)]=(-0.553402580285-0.113006957524j)*x[0]**o + ((0.615002051784-0.899413326536j))*x[0] + ((0.884433998355-0.977848084335j))*x[1]**o + ((-0.520301913053-0.447597009599j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.553402580285-0.113006957524j)*x_ref[0]**o + ((0.615002051784-0.899413326536j))*x_ref[0] + ((0.884433998355-0.977848084335j))*x_ref[1]**o + ((-0.520301913053-0.447597009599j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.0547255545444+0.0182285497293j)*x[0]**o + ((0.930604491391-0.47115934356j))*x[0] + ((-0.442244248992-0.875507000594j))*x[1]**o + ((0.956127469648-0.051080156728j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.0547255545444+0.0182285497293j)*x_ref[0]**o + ((0.930604491391-0.47115934356j))*x_ref[0] + ((-0.442244248992-0.875507000594j))*x_ref[1]**o + ((0.956127469648-0.051080156728j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.2533377926-0.272118498383j)*x[0]**o + ((-0.0998555068364-0.193813899218j))*x[0] + ((-0.027953953831-0.416430370827j))*x[1]**o + ((0.560620673591-0.252349625091j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.2533377926-0.272118498383j)*x_ref[0]**o + ((-0.0998555068364-0.193813899218j))*x_ref[0] + ((-0.027953953831-0.416430370827j))*x_ref[1]**o + ((0.560620673591-0.252349625091j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.282519457034-0.85781615624j)*x[0]**o + ((0.674355424141-0.153904059136j))*x[0] + ((0.916232460034-0.276743498784j))*x[1]**o + ((0.394664128113-0.21785336741j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.282519457034-0.85781615624j)*x_ref[0]**o + ((0.674355424141-0.153904059136j))*x_ref[0] + ((0.916232460034-0.276743498784j))*x_ref[1]**o + ((0.394664128113-0.21785336741j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(0.153921285921-0.447646894978j)*x[0]**o + ((0.270611861197-0.647289820152j))*x[0] + ((-0.616654609661+0.00104912920874j))*x[1]**o + ((-0.984665255965-0.53744994769j))*x[1]
        ref[(0, 0, 2, 0)]=(0.153921285921-0.447646894978j)*x_ref[0]**o + ((0.270611861197-0.647289820152j))*x_ref[0] + ((-0.616654609661+0.00104912920874j))*x_ref[1]**o + ((-0.984665255965-0.53744994769j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(0.967735873154-0.871311201793j)*x[0]**o + ((-0.593980277035+0.84663199211j))*x[0] + ((0.0885108018062-0.0747481084147j))*x[1]**o + ((0.792186386869-0.47808706905j))*x[1]
        ref[(0, 0, 2, 1)]=(0.967735873154-0.871311201793j)*x_ref[0]**o + ((-0.593980277035+0.84663199211j))*x_ref[0] + ((0.0885108018062-0.0747481084147j))*x_ref[1]**o + ((0.792186386869-0.47808706905j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.00212642825781-0.458519792174j)*x[0]**o + ((-0.176465175665+0.997062121457j))*x[0] + ((0.873198675094-0.914797057563j))*x[1]**o + ((-0.636665802298-0.408713187086j))*x[1]
        ref[(0, 1, 0, 0)]=(0.00212642825781-0.458519792174j)*x_ref[0]**o + ((-0.176465175665+0.997062121457j))*x_ref[0] + ((0.873198675094-0.914797057563j))*x_ref[1]**o + ((-0.636665802298-0.408713187086j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.798561789243+0.630890808056j)*x[0]**o + ((0.350993573334-0.726104614797j))*x[0] + ((0.145102830413+0.263138994881j))*x[1]**o + ((-0.0416873432365+0.348831627381j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.798561789243+0.630890808056j)*x_ref[0]**o + ((0.350993573334-0.726104614797j))*x_ref[0] + ((0.145102830413+0.263138994881j))*x_ref[1]**o + ((-0.0416873432365+0.348831627381j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.278502690345+0.413801085351j)*x[0]**o + ((0.31178503599+0.351028543597j))*x[0] + ((-0.549449363513+0.825016363242j))*x[1]**o + ((0.747635189548+0.23672582688j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.278502690345+0.413801085351j)*x_ref[0]**o + ((0.31178503599+0.351028543597j))*x_ref[0] + ((-0.549449363513+0.825016363242j))*x_ref[1]**o + ((0.747635189548+0.23672582688j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.25400296726-0.248358088742j)*x[0]**o + ((0.27363379208-0.444613408104j))*x[0] + ((-0.667926089128+0.378776586667j))*x[1]**o + ((0.34117160706+0.0040592592691j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.25400296726-0.248358088742j)*x_ref[0]**o + ((0.27363379208-0.444613408104j))*x_ref[0] + ((-0.667926089128+0.378776586667j))*x_ref[1]**o + ((0.34117160706+0.0040592592691j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(0.699595036328+0.0652508330058j)*x[0]**o + ((-0.617911076408-0.700690962731j))*x[0] + ((-0.0751241950318-0.881442654714j))*x[1]**o + ((-0.974444994488+0.39693544716j))*x[1]
        ref[(0, 1, 2, 0)]=(0.699595036328+0.0652508330058j)*x_ref[0]**o + ((-0.617911076408-0.700690962731j))*x_ref[0] + ((-0.0751241950318-0.881442654714j))*x_ref[1]**o + ((-0.974444994488+0.39693544716j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(0.952308795164+0.424380501441j)*x[0]**o + ((-0.193704582949+0.822911680286j))*x[0] + ((0.0434584968017+0.38308973364j))*x[1]**o + ((0.792179768618-0.293595096665j))*x[1]
        ref[(0, 1, 2, 1)]=(0.952308795164+0.424380501441j)*x_ref[0]**o + ((-0.193704582949+0.822911680286j))*x_ref[0] + ((0.0434584968017+0.38308973364j))*x_ref[1]**o + ((0.792179768618-0.293595096665j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.165458290966-0.251088659057j)*x[0]**o + ((0.495208148376-0.158877061473j))*x[0] + ((-0.687033917098+0.118916299604j))*x[1]**o + ((0.744916058419+0.690243099654j))*x[1]
        ref[(1, 0, 0, 0)]=(0.165458290966-0.251088659057j)*x_ref[0]**o + ((0.495208148376-0.158877061473j))*x_ref[0] + ((-0.687033917098+0.118916299604j))*x_ref[1]**o + ((0.744916058419+0.690243099654j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.326453488574-0.0677534597234j)*x[0]**o + ((-0.498003387053-0.394349095566j))*x[0] + ((0.0372385993141-0.24239195189j))*x[1]**o + ((0.86448292721-0.856366431793j))*x[1]
        ref[(1, 0, 0, 1)]=(0.326453488574-0.0677534597234j)*x_ref[0]**o + ((-0.498003387053-0.394349095566j))*x_ref[0] + ((0.0372385993141-0.24239195189j))*x_ref[1]**o + ((0.86448292721-0.856366431793j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(0.977025911584-0.0369185937075j)*x[0]**o + ((-0.752950502244-0.0503475175633j))*x[0] + ((0.359597280642-0.622899716612j))*x[1]**o + ((0.175039036807+0.774415867464j))*x[1]
        ref[(1, 0, 1, 0)]=(0.977025911584-0.0369185937075j)*x_ref[0]**o + ((-0.752950502244-0.0503475175633j))*x_ref[0] + ((0.359597280642-0.622899716612j))*x_ref[1]**o + ((0.175039036807+0.774415867464j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.010955433693-0.324350527983j)*x[0]**o + ((-0.985680432295+0.216228130573j))*x[0] + ((0.693273862896+0.868374769463j))*x[1]**o + ((0.575198544261-0.667337689049j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.010955433693-0.324350527983j)*x_ref[0]**o + ((-0.985680432295+0.216228130573j))*x_ref[0] + ((0.693273862896+0.868374769463j))*x_ref[1]**o + ((0.575198544261-0.667337689049j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(0.963053790624-0.609664606399j)*x[0]**o + ((-0.583366608249-0.320182534981j))*x[0] + ((-0.998868499838+0.414044598504j))*x[1]**o + ((-0.369361662238+0.452060203999j))*x[1]
        ref[(1, 0, 2, 0)]=(0.963053790624-0.609664606399j)*x_ref[0]**o + ((-0.583366608249-0.320182534981j))*x_ref[0] + ((-0.998868499838+0.414044598504j))*x_ref[1]**o + ((-0.369361662238+0.452060203999j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(-0.0033347667723-0.882155550178j)*x[0]**o + ((-0.365416579224+0.827601482477j))*x[0] + ((-0.0652610471413-0.319061249609j))*x[1]**o + ((0.720757616554+0.180260361532j))*x[1]
        ref[(1, 0, 2, 1)]=(-0.0033347667723-0.882155550178j)*x_ref[0]**o + ((-0.365416579224+0.827601482477j))*x_ref[0] + ((-0.0652610471413-0.319061249609j))*x_ref[1]**o + ((0.720757616554+0.180260361532j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.738782946726+0.831361044679j)*x[0]**o + ((0.737517338306+0.76195528257j))*x[0] + ((-0.684206498152+0.226951557245j))*x[1]**o + ((0.869029003193-0.860159108j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.738782946726+0.831361044679j)*x_ref[0]**o + ((0.737517338306+0.76195528257j))*x_ref[0] + ((-0.684206498152+0.226951557245j))*x_ref[1]**o + ((0.869029003193-0.860159108j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.861995938089+0.031404733018j)*x[0]**o + ((0.145193460697+0.518819485446j))*x[0] + ((-0.497242426345-0.111574170322j))*x[1]**o + ((0.32248867105+0.834816371604j))*x[1]
        ref[(1, 1, 0, 1)]=(0.861995938089+0.031404733018j)*x_ref[0]**o + ((0.145193460697+0.518819485446j))*x_ref[0] + ((-0.497242426345-0.111574170322j))*x_ref[1]**o + ((0.32248867105+0.834816371604j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.182418362452+0.50938203188j)*x[0]**o + ((0.87496657697-0.0216291203238j))*x[0] + ((0.0551074073761+0.400856425146j))*x[1]**o + ((-0.0316633316623-0.902649089588j))*x[1]
        ref[(1, 1, 1, 0)]=(0.182418362452+0.50938203188j)*x_ref[0]**o + ((0.87496657697-0.0216291203238j))*x_ref[0] + ((0.0551074073761+0.400856425146j))*x_ref[1]**o + ((-0.0316633316623-0.902649089588j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.08252552047-0.463790365269j)*x[0]**o + ((0.104287434503-0.0396320920707j))*x[0] + ((-0.199860760943-0.0833761503243j))*x[1]**o + ((0.752177506163-0.323184436033j))*x[1]
        ref[(1, 1, 1, 1)]=(0.08252552047-0.463790365269j)*x_ref[0]**o + ((0.104287434503-0.0396320920707j))*x_ref[0] + ((-0.199860760943-0.0833761503243j))*x_ref[1]**o + ((0.752177506163-0.323184436033j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(-0.614381783691-0.462825925128j)*x[0]**o + ((0.250749857743+0.551856426611j))*x[0] + ((-0.365757122145+0.355694864263j))*x[1]**o + ((0.76779652241+0.311592052188j))*x[1]
        ref[(1, 1, 2, 0)]=(-0.614381783691-0.462825925128j)*x_ref[0]**o + ((0.250749857743+0.551856426611j))*x_ref[0] + ((-0.365757122145+0.355694864263j))*x_ref[1]**o + ((0.76779652241+0.311592052188j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(0.201043263292-0.91708734209j)*x[0]**o + ((-0.863773444647+0.585063957868j))*x[0] + ((-0.695185633919-0.368069393637j))*x[1]**o + ((0.656230208057-0.975570280555j))*x[1]
        ref[(1, 1, 2, 1)]=(0.201043263292-0.91708734209j)*x_ref[0]**o + ((-0.863773444647+0.585063957868j))*x_ref[0] + ((-0.695185633919-0.368069393637j))*x_ref[1]**o + ((0.656230208057-0.975570280555j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(0.00987879446941+0.399086443593j)*x[0]**o + ((-0.662441583074+0.965863875348j))*x[0] + ((0.505334767683+0.107722938215j))*x[1]**o + ((0.890984756052-0.344412003732j))*x[1]
        ref[(2, 0, 0, 0)]=(0.00987879446941+0.399086443593j)*x_ref[0]**o + ((-0.662441583074+0.965863875348j))*x_ref[0] + ((0.505334767683+0.107722938215j))*x_ref[1]**o + ((0.890984756052-0.344412003732j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(-0.321525872757-0.605455790999j)*x[0]**o + ((0.52140997478-0.690889959887j))*x[0] + ((-0.203087806987+0.335288578292j))*x[1]**o + ((0.506499858907+0.632764250136j))*x[1]
        ref[(2, 0, 0, 1)]=(-0.321525872757-0.605455790999j)*x_ref[0]**o + ((0.52140997478-0.690889959887j))*x_ref[0] + ((-0.203087806987+0.335288578292j))*x_ref[1]**o + ((0.506499858907+0.632764250136j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(-0.552787100563-0.995719479479j)*x[0]**o + ((-0.951314335858-0.9386007345j))*x[0] + ((0.573750843507-0.107810593791j))*x[1]**o + ((-0.711922412275+0.136518368201j))*x[1]
        ref[(2, 0, 1, 0)]=(-0.552787100563-0.995719479479j)*x_ref[0]**o + ((-0.951314335858-0.9386007345j))*x_ref[0] + ((0.573750843507-0.107810593791j))*x_ref[1]**o + ((-0.711922412275+0.136518368201j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.293546811379-0.793880569291j)*x[0]**o + ((0.98114818136-0.0361316681114j))*x[0] + ((-0.838841453203+0.366606012543j))*x[1]**o + ((0.331347513822+0.230194925105j))*x[1]
        ref[(2, 0, 1, 1)]=(0.293546811379-0.793880569291j)*x_ref[0]**o + ((0.98114818136-0.0361316681114j))*x_ref[0] + ((-0.838841453203+0.366606012543j))*x_ref[1]**o + ((0.331347513822+0.230194925105j))*x_ref[1]
        arg[(2, 0, 2, 0)]=(-0.617690412349-0.781711241227j)*x[0]**o + ((-0.797000442744+0.231038836502j))*x[0] + ((-0.520811085723-0.312417650176j))*x[1]**o + ((0.261839989121-0.727624199882j))*x[1]
        ref[(2, 0, 2, 0)]=(-0.617690412349-0.781711241227j)*x_ref[0]**o + ((-0.797000442744+0.231038836502j))*x_ref[0] + ((-0.520811085723-0.312417650176j))*x_ref[1]**o + ((0.261839989121-0.727624199882j))*x_ref[1]
        arg[(2, 0, 2, 1)]=(0.701786408017+0.926214989926j)*x[0]**o + ((0.00963331421598+0.17631517753j))*x[0] + ((0.872098058766+0.237141919686j))*x[1]**o + ((0.504317182884-0.278729661656j))*x[1]
        ref[(2, 0, 2, 1)]=(0.701786408017+0.926214989926j)*x_ref[0]**o + ((0.00963331421598+0.17631517753j))*x_ref[0] + ((0.872098058766+0.237141919686j))*x_ref[1]**o + ((0.504317182884-0.278729661656j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(-0.132129594761+0.183546990251j)*x[0]**o + ((-0.233702837923+0.316594299163j))*x[0] + ((-0.958748343833+0.391220404194j))*x[1]**o + ((0.737637966558+0.89724484658j))*x[1]
        ref[(2, 1, 0, 0)]=(-0.132129594761+0.183546990251j)*x_ref[0]**o + ((-0.233702837923+0.316594299163j))*x_ref[0] + ((-0.958748343833+0.391220404194j))*x_ref[1]**o + ((0.737637966558+0.89724484658j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(-0.924598805022+0.306000959802j)*x[0]**o + ((0.434123735596-0.131908102056j))*x[0] + ((-0.459698410573+0.468200940863j))*x[1]**o + ((-0.374728504875+0.73212510974j))*x[1]
        ref[(2, 1, 0, 1)]=(-0.924598805022+0.306000959802j)*x_ref[0]**o + ((0.434123735596-0.131908102056j))*x_ref[0] + ((-0.459698410573+0.468200940863j))*x_ref[1]**o + ((-0.374728504875+0.73212510974j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(0.174252359612+0.473784283894j)*x[0]**o + ((-0.789522010203-0.595164757226j))*x[0] + ((-0.299495598366+0.242345876417j))*x[1]**o + ((-0.362610678807+0.0187999614402j))*x[1]
        ref[(2, 1, 1, 0)]=(0.174252359612+0.473784283894j)*x_ref[0]**o + ((-0.789522010203-0.595164757226j))*x_ref[0] + ((-0.299495598366+0.242345876417j))*x_ref[1]**o + ((-0.362610678807+0.0187999614402j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(-0.372431149744-0.775710303405j)*x[0]**o + ((-0.291904967106-0.458588292661j))*x[0] + ((0.37559131692+0.562290208107j))*x[1]**o + ((-0.546021859922-0.621990246801j))*x[1]
        ref[(2, 1, 1, 1)]=(-0.372431149744-0.775710303405j)*x_ref[0]**o + ((-0.291904967106-0.458588292661j))*x_ref[0] + ((0.37559131692+0.562290208107j))*x_ref[1]**o + ((-0.546021859922-0.621990246801j))*x_ref[1]
        arg[(2, 1, 2, 0)]=(-0.458408690997+0.0791294754544j)*x[0]**o + ((-0.395500107833+0.171603325314j))*x[0] + ((0.286390935246+0.785183077857j))*x[1]**o + ((0.095303772595-0.783687281929j))*x[1]
        ref[(2, 1, 2, 0)]=(-0.458408690997+0.0791294754544j)*x_ref[0]**o + ((-0.395500107833+0.171603325314j))*x_ref[0] + ((0.286390935246+0.785183077857j))*x_ref[1]**o + ((0.095303772595-0.783687281929j))*x_ref[1]
        arg[(2, 1, 2, 1)]=(-0.993166419154+0.238046320038j)*x[0]**o + ((-0.0893408145695-0.0405739116028j))*x[0] + ((-0.638108940976-0.458235453962j))*x[1]**o + ((-0.0324292333572+0.599480085735j))*x[1]
        ref[(2, 1, 2, 1)]=(-0.993166419154+0.238046320038j)*x_ref[0]**o + ((-0.0893408145695-0.0405739116028j))*x_ref[0] + ((-0.638108940976-0.458235453962j))*x_ref[1]**o + ((-0.0324292333572+0.599480085735j))*x_ref[1]
        arg[(3, 0, 0, 0)]=(-0.48068468061+0.820518973899j)*x[0]**o + ((0.648298693782+0.977333348773j))*x[0] + ((-0.314962876344-0.0408580960667j))*x[1]**o + ((0.685261923291-0.378070554192j))*x[1]
        ref[(3, 0, 0, 0)]=(-0.48068468061+0.820518973899j)*x_ref[0]**o + ((0.648298693782+0.977333348773j))*x_ref[0] + ((-0.314962876344-0.0408580960667j))*x_ref[1]**o + ((0.685261923291-0.378070554192j))*x_ref[1]
        arg[(3, 0, 0, 1)]=(0.0333244546998-0.197303609494j)*x[0]**o + ((-0.147035772804+0.808400898732j))*x[0] + ((0.5639358586+0.711129826494j))*x[1]**o + ((-0.11538594826+0.688300012597j))*x[1]
        ref[(3, 0, 0, 1)]=(0.0333244546998-0.197303609494j)*x_ref[0]**o + ((-0.147035772804+0.808400898732j))*x_ref[0] + ((0.5639358586+0.711129826494j))*x_ref[1]**o + ((-0.11538594826+0.688300012597j))*x_ref[1]
        arg[(3, 0, 1, 0)]=(0.454901552918-0.772676608666j)*x[0]**o + ((0.380658885261-0.910390956551j))*x[0] + ((0.632828981985-0.170148699689j))*x[1]**o + ((-0.0758631515236+0.535133632976j))*x[1]
        ref[(3, 0, 1, 0)]=(0.454901552918-0.772676608666j)*x_ref[0]**o + ((0.380658885261-0.910390956551j))*x_ref[0] + ((0.632828981985-0.170148699689j))*x_ref[1]**o + ((-0.0758631515236+0.535133632976j))*x_ref[1]
        arg[(3, 0, 1, 1)]=(-0.119582915971+0.446404735772j)*x[0]**o + ((-0.135318796754+0.231274735937j))*x[0] + ((-0.127683576311-0.728406713502j))*x[1]**o + ((-0.281768231925+0.223852532013j))*x[1]
        ref[(3, 0, 1, 1)]=(-0.119582915971+0.446404735772j)*x_ref[0]**o + ((-0.135318796754+0.231274735937j))*x_ref[0] + ((-0.127683576311-0.728406713502j))*x_ref[1]**o + ((-0.281768231925+0.223852532013j))*x_ref[1]
        arg[(3, 0, 2, 0)]=(-0.586691115737-0.879613019199j)*x[0]**o + ((0.392694478973+0.73826972011j))*x[0] + ((-0.414678158914+0.27095388562j))*x[1]**o + ((0.373834174603-0.275395118983j))*x[1]
        ref[(3, 0, 2, 0)]=(-0.586691115737-0.879613019199j)*x_ref[0]**o + ((0.392694478973+0.73826972011j))*x_ref[0] + ((-0.414678158914+0.27095388562j))*x_ref[1]**o + ((0.373834174603-0.275395118983j))*x_ref[1]
        arg[(3, 0, 2, 1)]=(0.756643883221-0.0767601476479j)*x[0]**o + ((-0.545594544043-0.66997494645j))*x[0] + ((0.319262408242+0.73064000667j))*x[1]**o + ((0.748092387102+0.0745883317513j))*x[1]
        ref[(3, 0, 2, 1)]=(0.756643883221-0.0767601476479j)*x_ref[0]**o + ((-0.545594544043-0.66997494645j))*x_ref[0] + ((0.319262408242+0.73064000667j))*x_ref[1]**o + ((0.748092387102+0.0745883317513j))*x_ref[1]
        arg[(3, 1, 0, 0)]=(-0.240466290321-0.645837756942j)*x[0]**o + ((0.120133778602+0.406364805498j))*x[0] + ((0.900931104328+0.850187823018j))*x[1]**o + ((-0.468268688608-0.452422315132j))*x[1]
        ref[(3, 1, 0, 0)]=(-0.240466290321-0.645837756942j)*x_ref[0]**o + ((0.120133778602+0.406364805498j))*x_ref[0] + ((0.900931104328+0.850187823018j))*x_ref[1]**o + ((-0.468268688608-0.452422315132j))*x_ref[1]
        arg[(3, 1, 0, 1)]=(-0.163975183116-0.1781619834j)*x[0]**o + ((-0.166614110058+0.747449743864j))*x[0] + ((-0.0232537416629-0.91909871566j))*x[1]**o + ((-0.982628489436+0.748084530779j))*x[1]
        ref[(3, 1, 0, 1)]=(-0.163975183116-0.1781619834j)*x_ref[0]**o + ((-0.166614110058+0.747449743864j))*x_ref[0] + ((-0.0232537416629-0.91909871566j))*x_ref[1]**o + ((-0.982628489436+0.748084530779j))*x_ref[1]
        arg[(3, 1, 1, 0)]=(-0.398230659368-0.251354151662j)*x[0]**o + ((-0.0215515908357-0.297531951242j))*x[0] + ((-0.375845624996-0.244809999133j))*x[1]**o + ((-0.930261339368+0.573330267569j))*x[1]
        ref[(3, 1, 1, 0)]=(-0.398230659368-0.251354151662j)*x_ref[0]**o + ((-0.0215515908357-0.297531951242j))*x_ref[0] + ((-0.375845624996-0.244809999133j))*x_ref[1]**o + ((-0.930261339368+0.573330267569j))*x_ref[1]
        arg[(3, 1, 1, 1)]=(-0.818299684953-0.818565871722j)*x[0]**o + ((0.164517381077-0.554271680654j))*x[0] + ((-0.814496661975+0.449669505304j))*x[1]**o + ((0.031432304291+0.75372492813j))*x[1]
        ref[(3, 1, 1, 1)]=(-0.818299684953-0.818565871722j)*x_ref[0]**o + ((0.164517381077-0.554271680654j))*x_ref[0] + ((-0.814496661975+0.449669505304j))*x_ref[1]**o + ((0.031432304291+0.75372492813j))*x_ref[1]
        arg[(3, 1, 2, 0)]=(-0.487116718976-0.67192903173j)*x[0]**o + ((0.320391540755+0.402208556903j))*x[0] + ((0.842551315277+0.938818044095j))*x[1]**o + ((0.394041379653+0.193049904491j))*x[1]
        ref[(3, 1, 2, 0)]=(-0.487116718976-0.67192903173j)*x_ref[0]**o + ((0.320391540755+0.402208556903j))*x_ref[0] + ((0.842551315277+0.938818044095j))*x_ref[1]**o + ((0.394041379653+0.193049904491j))*x_ref[1]
        arg[(3, 1, 2, 1)]=(-0.219162320583+0.0320392128722j)*x[0]**o + ((0.503621405516-0.535245063663j))*x[0] + ((0.24527481732+0.139057271468j))*x[1]**o + ((0.603752741648-0.759309836095j))*x[1]
        ref[(3, 1, 2, 1)]=(-0.219162320583+0.0320392128722j)*x_ref[0]**o + ((0.503621405516-0.535245063663j))*x_ref[0] + ((0.24527481732+0.139057271468j))*x_ref[1]**o + ((0.603752741648-0.759309836095j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.590414907393-0.542469066363j)*x[2]**o + ((0.13750841433-0.0239721039751j))*x[2]
            ref[(0, 0, 0, 0)]+=(0.590414907393-0.542469066363j)*x_ref[2]**o + ((0.13750841433-0.0239721039751j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.375124354756+0.307342938704j)*x[2]**o + ((0.622668893712-0.254756512409j))*x[2]
            ref[(0, 0, 0, 1)]+=(0.375124354756+0.307342938704j)*x_ref[2]**o + ((0.622668893712-0.254756512409j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.643963202741+0.0248334279995j)*x[2]**o + ((0.634386356545-0.122249045802j))*x[2]
            ref[(0, 0, 1, 0)]+=(0.643963202741+0.0248334279995j)*x_ref[2]**o + ((0.634386356545-0.122249045802j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.516993198163-0.680624274991j)*x[2]**o + ((-0.998215302402-0.375079767969j))*x[2]
            ref[(0, 0, 1, 1)]+=(-0.516993198163-0.680624274991j)*x_ref[2]**o + ((-0.998215302402-0.375079767969j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(-0.516114697588+0.103554260085j)*x[2]**o + ((0.76111856559+0.530779782838j))*x[2]
            ref[(0, 0, 2, 0)]+=(-0.516114697588+0.103554260085j)*x_ref[2]**o + ((0.76111856559+0.530779782838j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(0.672280750188+0.16983880977j)*x[2]**o + ((-0.2752235985+0.275433746921j))*x[2]
            ref[(0, 0, 2, 1)]+=(0.672280750188+0.16983880977j)*x_ref[2]**o + ((-0.2752235985+0.275433746921j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.175650323653+0.545411002152j)*x[2]**o + ((0.832598764369-0.896908990017j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.175650323653+0.545411002152j)*x_ref[2]**o + ((0.832598764369-0.896908990017j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.217907851208-0.643108412661j)*x[2]**o + ((-0.383278871616-0.539710055278j))*x[2]
            ref[(0, 1, 0, 1)]+=(0.217907851208-0.643108412661j)*x_ref[2]**o + ((-0.383278871616-0.539710055278j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.956742503179+0.777981761196j)*x[2]**o + ((0.822831765746+0.353783522185j))*x[2]
            ref[(0, 1, 1, 0)]+=(-0.956742503179+0.777981761196j)*x_ref[2]**o + ((0.822831765746+0.353783522185j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.279650995691+0.521692882362j)*x[2]**o + ((0.369009109824-0.269716869266j))*x[2]
            ref[(0, 1, 1, 1)]+=(0.279650995691+0.521692882362j)*x_ref[2]**o + ((0.369009109824-0.269716869266j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(0.585754732275-0.117823343707j)*x[2]**o + ((0.97875696339-0.731863282797j))*x[2]
            ref[(0, 1, 2, 0)]+=(0.585754732275-0.117823343707j)*x_ref[2]**o + ((0.97875696339-0.731863282797j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(0.420754607202+0.445398661975j)*x[2]**o + ((0.832548020435+0.498772514001j))*x[2]
            ref[(0, 1, 2, 1)]+=(0.420754607202+0.445398661975j)*x_ref[2]**o + ((0.832548020435+0.498772514001j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.691056397292+0.68575033141j)*x[2]**o + ((0.631822241198+0.319248951272j))*x[2]
            ref[(1, 0, 0, 0)]+=(0.691056397292+0.68575033141j)*x_ref[2]**o + ((0.631822241198+0.319248951272j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(-0.784004555081+0.427942927323j)*x[2]**o + ((-0.4273451882+0.949886235173j))*x[2]
            ref[(1, 0, 0, 1)]+=(-0.784004555081+0.427942927323j)*x_ref[2]**o + ((-0.4273451882+0.949886235173j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.0412185457962+0.284738716577j)*x[2]**o + ((-0.133196615448+0.299256530245j))*x[2]
            ref[(1, 0, 1, 0)]+=(-0.0412185457962+0.284738716577j)*x_ref[2]**o + ((-0.133196615448+0.299256530245j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.453783036333+0.264375767313j)*x[2]**o + ((0.17430030664+0.0411501215933j))*x[2]
            ref[(1, 0, 1, 1)]+=(-0.453783036333+0.264375767313j)*x_ref[2]**o + ((0.17430030664+0.0411501215933j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(-0.972269295444+0.519146039386j)*x[2]**o + ((-0.552816863053-0.0625039359135j))*x[2]
            ref[(1, 0, 2, 0)]+=(-0.972269295444+0.519146039386j)*x_ref[2]**o + ((-0.552816863053-0.0625039359135j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(-0.538501063071-0.35320168994j)*x[2]**o + ((0.77270996854+0.845838589654j))*x[2]
            ref[(1, 0, 2, 1)]+=(-0.538501063071-0.35320168994j)*x_ref[2]**o + ((0.77270996854+0.845838589654j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.540596980209+0.174442876994j)*x[2]**o + ((-0.123793653614+0.676783718828j))*x[2]
            ref[(1, 1, 0, 0)]+=(-0.540596980209+0.174442876994j)*x_ref[2]**o + ((-0.123793653614+0.676783718828j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.695840866247-0.762474561135j)*x[2]**o + ((-0.964154634537+0.780276030651j))*x[2]
            ref[(1, 1, 0, 1)]+=(-0.695840866247-0.762474561135j)*x_ref[2]**o + ((-0.964154634537+0.780276030651j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(-0.0035805879798-0.535870731444j)*x[2]**o + ((-0.223627553765-0.0300643906809j))*x[2]
            ref[(1, 1, 1, 0)]+=(-0.0035805879798-0.535870731444j)*x_ref[2]**o + ((-0.223627553765-0.0300643906809j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.884402391351+0.514596745797j)*x[2]**o + ((0.320032043089+0.0678273661885j))*x[2]
            ref[(1, 1, 1, 1)]+=(-0.884402391351+0.514596745797j)*x_ref[2]**o + ((0.320032043089+0.0678273661885j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(0.757808971479+0.0991689499648j)*x[2]**o + ((0.731642457615-0.029243185921j))*x[2]
            ref[(1, 1, 2, 0)]+=(0.757808971479+0.0991689499648j)*x_ref[2]**o + ((0.731642457615-0.029243185921j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(-0.42136821364-0.0433416578393j)*x[2]**o + ((-0.180254265437-0.275874366057j))*x[2]
            ref[(1, 1, 2, 1)]+=(-0.42136821364-0.0433416578393j)*x_ref[2]**o + ((-0.180254265437-0.275874366057j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(0.795034309343+0.397945379189j)*x[2]**o + ((-0.550437714913+0.588972500169j))*x[2]
            ref[(2, 0, 0, 0)]+=(0.795034309343+0.397945379189j)*x_ref[2]**o + ((-0.550437714913+0.588972500169j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(-0.440395238521+0.875149698314j)*x[2]**o + ((0.458497572192-0.779933658476j))*x[2]
            ref[(2, 0, 0, 1)]+=(-0.440395238521+0.875149698314j)*x_ref[2]**o + ((0.458497572192-0.779933658476j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(-0.195088120207-0.246748402071j)*x[2]**o + ((-0.158109805768-0.578217168677j))*x[2]
            ref[(2, 0, 1, 0)]+=(-0.195088120207-0.246748402071j)*x_ref[2]**o + ((-0.158109805768-0.578217168677j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(0.417124475616-0.523716451077j)*x[2]**o + ((-0.984770359593+0.890305753185j))*x[2]
            ref[(2, 0, 1, 1)]+=(0.417124475616-0.523716451077j)*x_ref[2]**o + ((-0.984770359593+0.890305753185j))*x_ref[2]
            arg[(2, 0, 2, 0)]+=(-0.489144818+0.97260604309j)*x[2]**o + ((-0.687847827342-0.79963934135j))*x[2]
            ref[(2, 0, 2, 0)]+=(-0.489144818+0.97260604309j)*x_ref[2]**o + ((-0.687847827342-0.79963934135j))*x_ref[2]
            arg[(2, 0, 2, 1)]+=(0.511901810828-0.46235542665j)*x[2]**o + ((-0.249004720316-0.505147260036j))*x[2]
            ref[(2, 0, 2, 1)]+=(0.511901810828-0.46235542665j)*x_ref[2]**o + ((-0.249004720316-0.505147260036j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(0.67236807258-0.905982408694j)*x[2]**o + ((-0.962662389587-0.091385141175j))*x[2]
            ref[(2, 1, 0, 0)]+=(0.67236807258-0.905982408694j)*x_ref[2]**o + ((-0.962662389587-0.091385141175j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(0.397171916058+0.811066928329j)*x[2]**o + ((-0.401590407823+0.463610137549j))*x[2]
            ref[(2, 1, 0, 1)]+=(0.397171916058+0.811066928329j)*x_ref[2]**o + ((-0.401590407823+0.463610137549j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(-0.806973052071-0.600317660585j)*x[2]**o + ((-0.916195375383-0.182289543475j))*x[2]
            ref[(2, 1, 1, 0)]+=(-0.806973052071-0.600317660585j)*x_ref[2]**o + ((-0.916195375383-0.182289543475j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(-0.266853338377+0.864684788042j)*x[2]**o + ((-0.370150447949+0.919621397769j))*x[2]
            ref[(2, 1, 1, 1)]+=(-0.266853338377+0.864684788042j)*x_ref[2]**o + ((-0.370150447949+0.919621397769j))*x_ref[2]
            arg[(2, 1, 2, 0)]+=(-0.65851183614+0.288790746475j)*x[2]**o + ((-0.887677825978-0.107272713886j))*x[2]
            ref[(2, 1, 2, 0)]+=(-0.65851183614+0.288790746475j)*x_ref[2]**o + ((-0.887677825978-0.107272713886j))*x_ref[2]
            arg[(2, 1, 2, 1)]+=(-0.83901089901-0.959277086494j)*x[2]**o + ((-0.812208657064+0.599133755553j))*x[2]
            ref[(2, 1, 2, 1)]+=(-0.83901089901-0.959277086494j)*x_ref[2]**o + ((-0.812208657064+0.599133755553j))*x_ref[2]
            arg[(3, 0, 0, 0)]+=(-0.14585922925+0.371700184027j)*x[2]**o + ((0.39128789451+0.0470976297128j))*x[2]
            ref[(3, 0, 0, 0)]+=(-0.14585922925+0.371700184027j)*x_ref[2]**o + ((0.39128789451+0.0470976297128j))*x_ref[2]
            arg[(3, 0, 0, 1)]+=(-0.910302781228+0.204028315372j)*x[2]**o + ((0.335552161896-0.510660645354j))*x[2]
            ref[(3, 0, 0, 1)]+=(-0.910302781228+0.204028315372j)*x_ref[2]**o + ((0.335552161896-0.510660645354j))*x_ref[2]
            arg[(3, 0, 1, 0)]+=(-0.277188992426-0.13009762096j)*x[2]**o + ((-0.542161433849-0.537532208672j))*x[2]
            ref[(3, 0, 1, 0)]+=(-0.277188992426-0.13009762096j)*x_ref[2]**o + ((-0.542161433849-0.537532208672j))*x_ref[2]
            arg[(3, 0, 1, 1)]+=(-0.174292790015-0.958394338876j)*x[2]**o + ((-0.408650754461+0.130631111223j))*x[2]
            ref[(3, 0, 1, 1)]+=(-0.174292790015-0.958394338876j)*x_ref[2]**o + ((-0.408650754461+0.130631111223j))*x_ref[2]
            arg[(3, 0, 2, 0)]+=(0.0377276348988-0.841244024482j)*x[2]**o + ((-0.117648364947-0.354165068525j))*x[2]
            ref[(3, 0, 2, 0)]+=(0.0377276348988-0.841244024482j)*x_ref[2]**o + ((-0.117648364947-0.354165068525j))*x_ref[2]
            arg[(3, 0, 2, 1)]+=(-0.941251252844+0.904994978583j)*x[2]**o + ((-0.845762303878+0.491135522013j))*x[2]
            ref[(3, 0, 2, 1)]+=(-0.941251252844+0.904994978583j)*x_ref[2]**o + ((-0.845762303878+0.491135522013j))*x_ref[2]
            arg[(3, 1, 0, 0)]+=(-0.666153150703+0.684325718287j)*x[2]**o + ((-0.54580461077-0.713830603676j))*x[2]
            ref[(3, 1, 0, 0)]+=(-0.666153150703+0.684325718287j)*x_ref[2]**o + ((-0.54580461077-0.713830603676j))*x_ref[2]
            arg[(3, 1, 0, 1)]+=(-0.45527166933-0.997228717962j)*x[2]**o + ((-0.951118762111+0.768581572189j))*x[2]
            ref[(3, 1, 0, 1)]+=(-0.45527166933-0.997228717962j)*x_ref[2]**o + ((-0.951118762111+0.768581572189j))*x_ref[2]
            arg[(3, 1, 1, 0)]+=(-0.259807186261-0.518746454568j)*x[2]**o + ((-0.539359683823+0.99848849043j))*x[2]
            ref[(3, 1, 1, 0)]+=(-0.259807186261-0.518746454568j)*x_ref[2]**o + ((-0.539359683823+0.99848849043j))*x_ref[2]
            arg[(3, 1, 1, 1)]+=(0.82845010864+0.54708024303j)*x[2]**o + ((0.337904913491+0.402423071989j))*x[2]
            ref[(3, 1, 1, 1)]+=(0.82845010864+0.54708024303j)*x_ref[2]**o + ((0.337904913491+0.402423071989j))*x_ref[2]
            arg[(3, 1, 2, 0)]+=(-0.15166731309-0.455979283667j)*x[2]**o + ((0.663750697681+0.9693826473j))*x[2]
            ref[(3, 1, 2, 0)]+=(-0.15166731309-0.455979283667j)*x_ref[2]**o + ((0.663750697681+0.9693826473j))*x_ref[2]
            arg[(3, 1, 2, 1)]+=(-0.706694877902+0.643392145797j)*x[2]**o + ((0.821223287165-0.657039908157j))*x[2]
            ref[(3, 1, 2, 1)]+=(-0.706694877902+0.643392145797j)*x_ref[2]**o + ((0.821223287165-0.657039908157j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedSolution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.288625746929-0.567329051223j)*x[0]**o + ((-0.341842350968+0.860881614027j))*x[0] + ((-0.973465186257+0.604963813451j))*x[1]**o + ((0.362288251793+0.401732213413j))*x[1]
        ref=(-0.288625746929-0.567329051223j)*x_ref[0]**o + ((-0.341842350968+0.860881614027j))*x_ref[0] + ((-0.973465186257+0.604963813451j))*x_ref[1]**o + ((0.362288251793+0.401732213413j))*x_ref[1]
        if dim==3:
            arg+=((-0.549937139572+0.927370931787j))*x[2]**o + ((-0.821799176585-0.114208770016j))*x[2]
            ref+=((-0.549937139572+0.927370931787j))*x_ref[2]**o + ((-0.821799176585-0.114208770016j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedSolution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=(-0.942721806638-0.625752034705j)*x[0]**o + ((0.440520277622-0.206029824506j))*x[0] + ((0.547755841412+0.122899871112j))*x[1]**o + ((-0.832698957494-0.972372477516j))*x[1]
        ref[(0,)]=(-0.942721806638-0.625752034705j)*x_ref[0]**o + ((0.440520277622-0.206029824506j))*x_ref[0] + ((0.547755841412+0.122899871112j))*x_ref[1]**o + ((-0.832698957494-0.972372477516j))*x_ref[1]
        arg[(1,)]=(0.764965357204-0.476321700907j)*x[0]**o + ((-0.482402325653+0.709530643962j))*x[0] + ((-0.0842347207226-0.592534804504j))*x[1]**o + ((0.899397591962+0.610919090915j))*x[1]
        ref[(1,)]=(0.764965357204-0.476321700907j)*x_ref[0]**o + ((-0.482402325653+0.709530643962j))*x_ref[0] + ((-0.0842347207226-0.592534804504j))*x_ref[1]**o + ((0.899397591962+0.610919090915j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.568158158346-0.972679373473j)*x[2]**o + ((0.276604158588-0.826121519411j))*x[2]
            ref[(0,)]+=(-0.568158158346-0.972679373473j)*x_ref[2]**o + ((0.276604158588-0.826121519411j))*x_ref[2]
            arg[(1,)]+=(0.422159240793+0.305536197097j)*x[2]**o + ((-0.310551854486+0.277155103296j))*x[2]
            ref[(1,)]+=(0.422159240793+0.305536197097j)*x_ref[2]**o + ((-0.310551854486+0.277155103296j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedSolution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref = Data(0,(2, 3),w_ref)
        arg[(0, 0)]=(0.200159135385-0.1019958801j)*x[0]**o + ((0.572768954596+0.762476022633j))*x[0] + ((-0.540803564409+0.924519990018j))*x[1]**o + ((-0.383769926637+0.914744684352j))*x[1]
        ref[(0, 0)]=(0.200159135385-0.1019958801j)*x_ref[0]**o + ((0.572768954596+0.762476022633j))*x_ref[0] + ((-0.540803564409+0.924519990018j))*x_ref[1]**o + ((-0.383769926637+0.914744684352j))*x_ref[1]
        arg[(0, 1)]=(-0.999489835588-0.975129887361j)*x[0]**o + ((0.316536798991+0.958598455103j))*x[0] + ((-0.765877945919+0.100097197264j))*x[1]**o + ((-0.399352160867+0.0522622001287j))*x[1]
        ref[(0, 1)]=(-0.999489835588-0.975129887361j)*x_ref[0]**o + ((0.316536798991+0.958598455103j))*x_ref[0] + ((-0.765877945919+0.100097197264j))*x_ref[1]**o + ((-0.399352160867+0.0522622001287j))*x_ref[1]
        arg[(0, 2)]=(0.837080174236+0.656175884131j)*x[0]**o + ((-0.468483335059+0.461486552377j))*x[0] + ((0.448320882941-0.413653485072j))*x[1]**o + ((0.0611805578944+0.376615742704j))*x[1]
        ref[(0, 2)]=(0.837080174236+0.656175884131j)*x_ref[0]**o + ((-0.468483335059+0.461486552377j))*x_ref[0] + ((0.448320882941-0.413653485072j))*x_ref[1]**o + ((0.0611805578944+0.376615742704j))*x_ref[1]
        arg[(1, 0)]=(0.0134767941583-0.0565399354866j)*x[0]**o + ((-0.941778281498+0.144812846791j))*x[0] + ((-0.600085401815-0.978918326955j))*x[1]**o + ((0.421875113885-0.825630979027j))*x[1]
        ref[(1, 0)]=(0.0134767941583-0.0565399354866j)*x_ref[0]**o + ((-0.941778281498+0.144812846791j))*x_ref[0] + ((-0.600085401815-0.978918326955j))*x_ref[1]**o + ((0.421875113885-0.825630979027j))*x_ref[1]
        arg[(1, 1)]=(-0.320221448548+0.998575313104j)*x[0]**o + ((0.942069245618+0.7557337163j))*x[0] + ((0.439456108339+0.536282783341j))*x[1]**o + ((-0.0452419027908-0.0556831954405j))*x[1]
        ref[(1, 1)]=(-0.320221448548+0.998575313104j)*x_ref[0]**o + ((0.942069245618+0.7557337163j))*x_ref[0] + ((0.439456108339+0.536282783341j))*x_ref[1]**o + ((-0.0452419027908-0.0556831954405j))*x_ref[1]
        arg[(1, 2)]=(-0.41599163811-0.0841890228351j)*x[0]**o + ((0.851004120809+0.00641501034609j))*x[0] + ((-0.149323678815+0.260229379919j))*x[1]**o + ((-0.999322514775-0.894519363181j))*x[1]
        ref[(1, 2)]=(-0.41599163811-0.0841890228351j)*x_ref[0]**o + ((0.851004120809+0.00641501034609j))*x_ref[0] + ((-0.149323678815+0.260229379919j))*x_ref[1]**o + ((-0.999322514775-0.894519363181j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.136083201581-0.12069559269j)*x[2]**o + ((0.397495540461+0.492410248348j))*x[2]
            ref[(0, 0)]+=(0.136083201581-0.12069559269j)*x_ref[2]**o + ((0.397495540461+0.492410248348j))*x_ref[2]
            arg[(0, 1)]+=(-0.258016834724-0.172232090655j)*x[2]**o + ((0.0104150273875-0.586883562985j))*x[2]
            ref[(0, 1)]+=(-0.258016834724-0.172232090655j)*x_ref[2]**o + ((0.0104150273875-0.586883562985j))*x_ref[2]
            arg[(0, 2)]+=(0.286406387693-0.475992611119j)*x[2]**o + ((-0.973139652202+0.911051424215j))*x[2]
            ref[(0, 2)]+=(0.286406387693-0.475992611119j)*x_ref[2]**o + ((-0.973139652202+0.911051424215j))*x_ref[2]
            arg[(1, 0)]+=(0.974631513311+0.74047294132j)*x[2]**o + ((0.611774093612-0.85872564766j))*x[2]
            ref[(1, 0)]+=(0.974631513311+0.74047294132j)*x_ref[2]**o + ((0.611774093612-0.85872564766j))*x_ref[2]
            arg[(1, 1)]+=(-0.341398878523-0.452102454786j)*x[2]**o + ((-0.864377846948+0.450085321614j))*x[2]
            ref[(1, 1)]+=(-0.341398878523-0.452102454786j)*x_ref[2]**o + ((-0.864377846948+0.450085321614j))*x_ref[2]
            arg[(1, 2)]+=(-0.301680255776+0.519035386517j)*x[2]**o + ((0.406099844929+0.0879422872129j))*x[2]
            ref[(1, 2)]+=(-0.301680255776+0.519035386517j)*x_ref[2]**o + ((0.406099844929+0.0879422872129j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedSolution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 3),w)
        ref = Data(0,(4, 3, 3),w_ref)
        arg[(0, 0, 0)]=(-0.270047702197+0.77758624797j)*x[0]**o + ((0.743764942221-0.0541447088089j))*x[0] + ((-0.127843056962-0.895370095278j))*x[1]**o + ((0.709571836353+0.543842228896j))*x[1]
        ref[(0, 0, 0)]=(-0.270047702197+0.77758624797j)*x_ref[0]**o + ((0.743764942221-0.0541447088089j))*x_ref[0] + ((-0.127843056962-0.895370095278j))*x_ref[1]**o + ((0.709571836353+0.543842228896j))*x_ref[1]
        arg[(0, 0, 1)]=(0.354627098337+0.0933753864003j)*x[0]**o + ((-0.761396539679+0.823899102273j))*x[0] + ((-0.670507980346-0.4862485423j))*x[1]**o + ((-0.0937022623533+0.52842250806j))*x[1]
        ref[(0, 0, 1)]=(0.354627098337+0.0933753864003j)*x_ref[0]**o + ((-0.761396539679+0.823899102273j))*x_ref[0] + ((-0.670507980346-0.4862485423j))*x_ref[1]**o + ((-0.0937022623533+0.52842250806j))*x_ref[1]
        arg[(0, 0, 2)]=(0.1243731162-0.256507211311j)*x[0]**o + ((0.356131643173-0.913754429502j))*x[0] + ((0.781434650363-0.609757020865j))*x[1]**o + ((-0.174499383652+0.178466119074j))*x[1]
        ref[(0, 0, 2)]=(0.1243731162-0.256507211311j)*x_ref[0]**o + ((0.356131643173-0.913754429502j))*x_ref[0] + ((0.781434650363-0.609757020865j))*x_ref[1]**o + ((-0.174499383652+0.178466119074j))*x_ref[1]
        arg[(0, 1, 0)]=(0.910454367781-0.715573269732j)*x[0]**o + ((0.342002683574+0.895911020433j))*x[0] + ((0.79093949937+0.559070816626j))*x[1]**o + ((0.588741707505-0.248666473919j))*x[1]
        ref[(0, 1, 0)]=(0.910454367781-0.715573269732j)*x_ref[0]**o + ((0.342002683574+0.895911020433j))*x_ref[0] + ((0.79093949937+0.559070816626j))*x_ref[1]**o + ((0.588741707505-0.248666473919j))*x_ref[1]
        arg[(0, 1, 1)]=(0.16231181259+0.569704663455j)*x[0]**o + ((0.166126345425+0.0783080172379j))*x[0] + ((-0.776145371687-0.649198616463j))*x[1]**o + ((0.393657458584-0.385001520735j))*x[1]
        ref[(0, 1, 1)]=(0.16231181259+0.569704663455j)*x_ref[0]**o + ((0.166126345425+0.0783080172379j))*x_ref[0] + ((-0.776145371687-0.649198616463j))*x_ref[1]**o + ((0.393657458584-0.385001520735j))*x_ref[1]
        arg[(0, 1, 2)]=(-0.190408921405-0.456180715974j)*x[0]**o + ((-0.483993286519-0.675463233495j))*x[0] + ((0.26606377389-0.431770443627j))*x[1]**o + ((0.691957684204-0.636919277186j))*x[1]
        ref[(0, 1, 2)]=(-0.190408921405-0.456180715974j)*x_ref[0]**o + ((-0.483993286519-0.675463233495j))*x_ref[0] + ((0.26606377389-0.431770443627j))*x_ref[1]**o + ((0.691957684204-0.636919277186j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.620525153971-0.196723104579j)*x[0]**o + ((0.799745976123-0.40349652464j))*x[0] + ((-0.569978702968+0.556230781113j))*x[1]**o + ((-0.590258624453+0.953280072846j))*x[1]
        ref[(0, 2, 0)]=(-0.620525153971-0.196723104579j)*x_ref[0]**o + ((0.799745976123-0.40349652464j))*x_ref[0] + ((-0.569978702968+0.556230781113j))*x_ref[1]**o + ((-0.590258624453+0.953280072846j))*x_ref[1]
        arg[(0, 2, 1)]=(0.456251341379-0.0576715468275j)*x[0]**o + ((0.583693493993-0.306332863042j))*x[0] + ((0.66391547728+0.558959699553j))*x[1]**o + ((0.887793858613-0.86419475j))*x[1]
        ref[(0, 2, 1)]=(0.456251341379-0.0576715468275j)*x_ref[0]**o + ((0.583693493993-0.306332863042j))*x_ref[0] + ((0.66391547728+0.558959699553j))*x_ref[1]**o + ((0.887793858613-0.86419475j))*x_ref[1]
        arg[(0, 2, 2)]=(0.752173277858+0.367778313754j)*x[0]**o + ((0.37972376267-0.694595502818j))*x[0] + ((0.375679845236-0.858578204902j))*x[1]**o + ((0.0403351216781-0.466472390655j))*x[1]
        ref[(0, 2, 2)]=(0.752173277858+0.367778313754j)*x_ref[0]**o + ((0.37972376267-0.694595502818j))*x_ref[0] + ((0.375679845236-0.858578204902j))*x_ref[1]**o + ((0.0403351216781-0.466472390655j))*x_ref[1]
        arg[(1, 0, 0)]=(0.392650937751+0.611176281379j)*x[0]**o + ((0.267677431305-0.406516571911j))*x[0] + ((0.15559786378+0.827561372359j))*x[1]**o + ((0.976492084562-0.504266947435j))*x[1]
        ref[(1, 0, 0)]=(0.392650937751+0.611176281379j)*x_ref[0]**o + ((0.267677431305-0.406516571911j))*x_ref[0] + ((0.15559786378+0.827561372359j))*x_ref[1]**o + ((0.976492084562-0.504266947435j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.850233476873+0.160474111286j)*x[0]**o + ((0.0792932315006-0.319270675533j))*x[0] + ((-0.882278573675-0.540689922947j))*x[1]**o + ((0.999074586294-0.931612074375j))*x[1]
        ref[(1, 0, 1)]=(-0.850233476873+0.160474111286j)*x_ref[0]**o + ((0.0792932315006-0.319270675533j))*x_ref[0] + ((-0.882278573675-0.540689922947j))*x_ref[1]**o + ((0.999074586294-0.931612074375j))*x_ref[1]
        arg[(1, 0, 2)]=(-0.0817303292193-0.339769953415j)*x[0]**o + ((-0.179072175784+0.0634383208018j))*x[0] + ((0.798479267596-0.849848560385j))*x[1]**o + ((-0.607800951264+0.845847914896j))*x[1]
        ref[(1, 0, 2)]=(-0.0817303292193-0.339769953415j)*x_ref[0]**o + ((-0.179072175784+0.0634383208018j))*x_ref[0] + ((0.798479267596-0.849848560385j))*x_ref[1]**o + ((-0.607800951264+0.845847914896j))*x_ref[1]
        arg[(1, 1, 0)]=(0.64704812827+0.904629709245j)*x[0]**o + ((0.203424834911+0.54476652535j))*x[0] + ((0.490542356584-0.150060765355j))*x[1]**o + ((-0.806842105969+0.435255103209j))*x[1]
        ref[(1, 1, 0)]=(0.64704812827+0.904629709245j)*x_ref[0]**o + ((0.203424834911+0.54476652535j))*x_ref[0] + ((0.490542356584-0.150060765355j))*x_ref[1]**o + ((-0.806842105969+0.435255103209j))*x_ref[1]
        arg[(1, 1, 1)]=(0.214312288927-0.914852225105j)*x[0]**o + ((0.928297214757+0.988786462204j))*x[0] + ((-0.670069979539-0.344050501663j))*x[1]**o + ((-0.975605603069-0.924346656806j))*x[1]
        ref[(1, 1, 1)]=(0.214312288927-0.914852225105j)*x_ref[0]**o + ((0.928297214757+0.988786462204j))*x_ref[0] + ((-0.670069979539-0.344050501663j))*x_ref[1]**o + ((-0.975605603069-0.924346656806j))*x_ref[1]
        arg[(1, 1, 2)]=(0.477026624499+0.393440867622j)*x[0]**o + ((-0.32845875442-0.822036461029j))*x[0] + ((0.736765475315+0.815129430995j))*x[1]**o + ((0.77703312061+0.555148200813j))*x[1]
        ref[(1, 1, 2)]=(0.477026624499+0.393440867622j)*x_ref[0]**o + ((-0.32845875442-0.822036461029j))*x_ref[0] + ((0.736765475315+0.815129430995j))*x_ref[1]**o + ((0.77703312061+0.555148200813j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.384122569578+0.347061848611j)*x[0]**o + ((-0.464891753139+0.825140778732j))*x[0] + ((0.773621856992-0.468167944936j))*x[1]**o + ((-0.977456891817-0.502094778662j))*x[1]
        ref[(1, 2, 0)]=(-0.384122569578+0.347061848611j)*x_ref[0]**o + ((-0.464891753139+0.825140778732j))*x_ref[0] + ((0.773621856992-0.468167944936j))*x_ref[1]**o + ((-0.977456891817-0.502094778662j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.126157185811-0.540444477014j)*x[0]**o + ((0.212088620704-0.424409001504j))*x[0] + ((-0.440381834545-0.00590334864568j))*x[1]**o + ((0.0249080310592+0.709828127629j))*x[1]
        ref[(1, 2, 1)]=(-0.126157185811-0.540444477014j)*x_ref[0]**o + ((0.212088620704-0.424409001504j))*x_ref[0] + ((-0.440381834545-0.00590334864568j))*x_ref[1]**o + ((0.0249080310592+0.709828127629j))*x_ref[1]
        arg[(1, 2, 2)]=(0.559514770207-0.797820056749j)*x[0]**o + ((-0.737878892992+0.984149712881j))*x[0] + ((0.644077997096-0.714958533562j))*x[1]**o + ((0.292279975061+0.339258924074j))*x[1]
        ref[(1, 2, 2)]=(0.559514770207-0.797820056749j)*x_ref[0]**o + ((-0.737878892992+0.984149712881j))*x_ref[0] + ((0.644077997096-0.714958533562j))*x_ref[1]**o + ((0.292279975061+0.339258924074j))*x_ref[1]
        arg[(2, 0, 0)]=(-0.830908012907-0.67686152653j)*x[0]**o + ((-0.832162195302-0.891072848747j))*x[0] + ((0.523757214065-0.563116543474j))*x[1]**o + ((-0.174835469824+0.673709104085j))*x[1]
        ref[(2, 0, 0)]=(-0.830908012907-0.67686152653j)*x_ref[0]**o + ((-0.832162195302-0.891072848747j))*x_ref[0] + ((0.523757214065-0.563116543474j))*x_ref[1]**o + ((-0.174835469824+0.673709104085j))*x_ref[1]
        arg[(2, 0, 1)]=(0.996248739405+0.488747723022j)*x[0]**o + ((-0.0978016578363+0.458920598291j))*x[0] + ((0.365451523066+0.269989540263j))*x[1]**o + ((-0.0562284632164+0.460377610797j))*x[1]
        ref[(2, 0, 1)]=(0.996248739405+0.488747723022j)*x_ref[0]**o + ((-0.0978016578363+0.458920598291j))*x_ref[0] + ((0.365451523066+0.269989540263j))*x_ref[1]**o + ((-0.0562284632164+0.460377610797j))*x_ref[1]
        arg[(2, 0, 2)]=(-0.165890686223-0.136468631875j)*x[0]**o + ((-0.733732502727-0.941526973111j))*x[0] + ((-0.0466572615891-0.136472045318j))*x[1]**o + ((0.970670166672+0.126540284768j))*x[1]
        ref[(2, 0, 2)]=(-0.165890686223-0.136468631875j)*x_ref[0]**o + ((-0.733732502727-0.941526973111j))*x_ref[0] + ((-0.0466572615891-0.136472045318j))*x_ref[1]**o + ((0.970670166672+0.126540284768j))*x_ref[1]
        arg[(2, 1, 0)]=(0.186353559955-0.551052313354j)*x[0]**o + ((0.34426110064-0.659437061712j))*x[0] + ((-0.492383602664-0.551912788443j))*x[1]**o + ((-0.351846843868+0.374884074207j))*x[1]
        ref[(2, 1, 0)]=(0.186353559955-0.551052313354j)*x_ref[0]**o + ((0.34426110064-0.659437061712j))*x_ref[0] + ((-0.492383602664-0.551912788443j))*x_ref[1]**o + ((-0.351846843868+0.374884074207j))*x_ref[1]
        arg[(2, 1, 1)]=(-0.619983515728+0.398944417533j)*x[0]**o + ((-0.198771151742-0.977320703482j))*x[0] + ((-0.809768295913+0.116221160602j))*x[1]**o + ((-0.232607852615-0.904579995888j))*x[1]
        ref[(2, 1, 1)]=(-0.619983515728+0.398944417533j)*x_ref[0]**o + ((-0.198771151742-0.977320703482j))*x_ref[0] + ((-0.809768295913+0.116221160602j))*x_ref[1]**o + ((-0.232607852615-0.904579995888j))*x_ref[1]
        arg[(2, 1, 2)]=(0.420546932782-0.66746918171j)*x[0]**o + ((-0.439937797678+0.127807677955j))*x[0] + ((0.284785459385-0.0973363293931j))*x[1]**o + ((0.851922155655+0.646877012257j))*x[1]
        ref[(2, 1, 2)]=(0.420546932782-0.66746918171j)*x_ref[0]**o + ((-0.439937797678+0.127807677955j))*x_ref[0] + ((0.284785459385-0.0973363293931j))*x_ref[1]**o + ((0.851922155655+0.646877012257j))*x_ref[1]
        arg[(2, 2, 0)]=(-0.242075458308+0.954406598616j)*x[0]**o + ((-0.49944847352+0.299678695742j))*x[0] + ((-0.165949746047-0.337629328112j))*x[1]**o + ((-0.13377766353+0.593161775105j))*x[1]
        ref[(2, 2, 0)]=(-0.242075458308+0.954406598616j)*x_ref[0]**o + ((-0.49944847352+0.299678695742j))*x_ref[0] + ((-0.165949746047-0.337629328112j))*x_ref[1]**o + ((-0.13377766353+0.593161775105j))*x_ref[1]
        arg[(2, 2, 1)]=(-0.288278253753+0.237728407665j)*x[0]**o + ((-0.294394211291+0.730323784854j))*x[0] + ((0.844910760133+0.765816406869j))*x[1]**o + ((0.0104256786356-0.57776921743j))*x[1]
        ref[(2, 2, 1)]=(-0.288278253753+0.237728407665j)*x_ref[0]**o + ((-0.294394211291+0.730323784854j))*x_ref[0] + ((0.844910760133+0.765816406869j))*x_ref[1]**o + ((0.0104256786356-0.57776921743j))*x_ref[1]
        arg[(2, 2, 2)]=(-0.741094844689-0.038088035641j)*x[0]**o + ((-0.49578529674-0.68612550779j))*x[0] + ((0.905151119753+0.660924041881j))*x[1]**o + ((-0.0909349545528-0.260116175125j))*x[1]
        ref[(2, 2, 2)]=(-0.741094844689-0.038088035641j)*x_ref[0]**o + ((-0.49578529674-0.68612550779j))*x_ref[0] + ((0.905151119753+0.660924041881j))*x_ref[1]**o + ((-0.0909349545528-0.260116175125j))*x_ref[1]
        arg[(3, 0, 0)]=(0.623358691047+0.239584216762j)*x[0]**o + ((-0.0928379238539-0.422697881751j))*x[0] + ((0.323380539937+0.150433259293j))*x[1]**o + ((-0.0275007287157-0.140484881995j))*x[1]
        ref[(3, 0, 0)]=(0.623358691047+0.239584216762j)*x_ref[0]**o + ((-0.0928379238539-0.422697881751j))*x_ref[0] + ((0.323380539937+0.150433259293j))*x_ref[1]**o + ((-0.0275007287157-0.140484881995j))*x_ref[1]
        arg[(3, 0, 1)]=(0.44550372271-0.394777886693j)*x[0]**o + ((-0.482447962883+0.874382490824j))*x[0] + ((-0.963416698211-0.369028062475j))*x[1]**o + ((0.591112355278-0.979319937475j))*x[1]
        ref[(3, 0, 1)]=(0.44550372271-0.394777886693j)*x_ref[0]**o + ((-0.482447962883+0.874382490824j))*x_ref[0] + ((-0.963416698211-0.369028062475j))*x_ref[1]**o + ((0.591112355278-0.979319937475j))*x_ref[1]
        arg[(3, 0, 2)]=(-0.399750315079-0.203815751106j)*x[0]**o + ((-0.628566274492+0.292301322195j))*x[0] + ((-0.929181376936+0.428043825266j))*x[1]**o + ((0.0316972295074+0.36024372926j))*x[1]
        ref[(3, 0, 2)]=(-0.399750315079-0.203815751106j)*x_ref[0]**o + ((-0.628566274492+0.292301322195j))*x_ref[0] + ((-0.929181376936+0.428043825266j))*x_ref[1]**o + ((0.0316972295074+0.36024372926j))*x_ref[1]
        arg[(3, 1, 0)]=(0.62490059247+0.883182116553j)*x[0]**o + ((-0.145191481623-0.00926757606405j))*x[0] + ((0.113285248062+0.622094050632j))*x[1]**o + ((0.381022154337-0.509291494425j))*x[1]
        ref[(3, 1, 0)]=(0.62490059247+0.883182116553j)*x_ref[0]**o + ((-0.145191481623-0.00926757606405j))*x_ref[0] + ((0.113285248062+0.622094050632j))*x_ref[1]**o + ((0.381022154337-0.509291494425j))*x_ref[1]
        arg[(3, 1, 1)]=(-0.207339378287+0.399466434614j)*x[0]**o + ((-0.722368767368+0.993049695949j))*x[0] + ((0.423156237812+0.668205094355j))*x[1]**o + ((-0.213473570231+0.526793894161j))*x[1]
        ref[(3, 1, 1)]=(-0.207339378287+0.399466434614j)*x_ref[0]**o + ((-0.722368767368+0.993049695949j))*x_ref[0] + ((0.423156237812+0.668205094355j))*x_ref[1]**o + ((-0.213473570231+0.526793894161j))*x_ref[1]
        arg[(3, 1, 2)]=(-0.560932124267+0.602425853656j)*x[0]**o + ((0.694646960974-0.903060918663j))*x[0] + ((0.31977530947+0.380539434599j))*x[1]**o + ((-0.5914937841+0.25226128041j))*x[1]
        ref[(3, 1, 2)]=(-0.560932124267+0.602425853656j)*x_ref[0]**o + ((0.694646960974-0.903060918663j))*x_ref[0] + ((0.31977530947+0.380539434599j))*x_ref[1]**o + ((-0.5914937841+0.25226128041j))*x_ref[1]
        arg[(3, 2, 0)]=(-0.748851983639+0.483848117421j)*x[0]**o + ((-0.513939216583+0.109146743799j))*x[0] + ((-0.402042790513+0.670501146376j))*x[1]**o + ((-0.806917084948-0.879061056369j))*x[1]
        ref[(3, 2, 0)]=(-0.748851983639+0.483848117421j)*x_ref[0]**o + ((-0.513939216583+0.109146743799j))*x_ref[0] + ((-0.402042790513+0.670501146376j))*x_ref[1]**o + ((-0.806917084948-0.879061056369j))*x_ref[1]
        arg[(3, 2, 1)]=(-0.341155940981-0.15989347546j)*x[0]**o + ((-0.132481626175-0.0555032838259j))*x[0] + ((0.205273910283-0.751341490799j))*x[1]**o + ((0.899311074519+0.353791463495j))*x[1]
        ref[(3, 2, 1)]=(-0.341155940981-0.15989347546j)*x_ref[0]**o + ((-0.132481626175-0.0555032838259j))*x_ref[0] + ((0.205273910283-0.751341490799j))*x_ref[1]**o + ((0.899311074519+0.353791463495j))*x_ref[1]
        arg[(3, 2, 2)]=(0.614519327078+0.843493406819j)*x[0]**o + ((-0.962147696759-0.202503519632j))*x[0] + ((0.855158327876+0.921883024049j))*x[1]**o + ((-0.588336913814+0.353302601851j))*x[1]
        ref[(3, 2, 2)]=(0.614519327078+0.843493406819j)*x_ref[0]**o + ((-0.962147696759-0.202503519632j))*x_ref[0] + ((0.855158327876+0.921883024049j))*x_ref[1]**o + ((-0.588336913814+0.353302601851j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.733969849351+0.731213735632j)*x[2]**o + ((-0.384381819686+0.509040499906j))*x[2]
            ref[(0, 0, 0)]+=(0.733969849351+0.731213735632j)*x_ref[2]**o + ((-0.384381819686+0.509040499906j))*x_ref[2]
            arg[(0, 0, 1)]+=(0.926893323746+0.52111526552j)*x[2]**o + ((-0.715967987674+0.819648094007j))*x[2]
            ref[(0, 0, 1)]+=(0.926893323746+0.52111526552j)*x_ref[2]**o + ((-0.715967987674+0.819648094007j))*x_ref[2]
            arg[(0, 0, 2)]+=(0.898506209766-0.566036089878j)*x[2]**o + ((0.794593572252-0.944062029446j))*x[2]
            ref[(0, 0, 2)]+=(0.898506209766-0.566036089878j)*x_ref[2]**o + ((0.794593572252-0.944062029446j))*x_ref[2]
            arg[(0, 1, 0)]+=(0.161019077312-0.136841275101j)*x[2]**o + ((0.146129894696+0.305361565365j))*x[2]
            ref[(0, 1, 0)]+=(0.161019077312-0.136841275101j)*x_ref[2]**o + ((0.146129894696+0.305361565365j))*x_ref[2]
            arg[(0, 1, 1)]+=(0.624858874346+0.100038164702j)*x[2]**o + ((-0.0625930664684+0.227976346674j))*x[2]
            ref[(0, 1, 1)]+=(0.624858874346+0.100038164702j)*x_ref[2]**o + ((-0.0625930664684+0.227976346674j))*x_ref[2]
            arg[(0, 1, 2)]+=(-0.848475973363+0.116845584226j)*x[2]**o + ((-0.367095195988-0.684027384114j))*x[2]
            ref[(0, 1, 2)]+=(-0.848475973363+0.116845584226j)*x_ref[2]**o + ((-0.367095195988-0.684027384114j))*x_ref[2]
            arg[(0, 2, 0)]+=(-0.00420459306689+0.924671376454j)*x[2]**o + ((-0.0969429137723-0.742066112586j))*x[2]
            ref[(0, 2, 0)]+=(-0.00420459306689+0.924671376454j)*x_ref[2]**o + ((-0.0969429137723-0.742066112586j))*x_ref[2]
            arg[(0, 2, 1)]+=(-0.423237469893+0.79046478482j)*x[2]**o + ((-0.0095669598993-0.459105215412j))*x[2]
            ref[(0, 2, 1)]+=(-0.423237469893+0.79046478482j)*x_ref[2]**o + ((-0.0095669598993-0.459105215412j))*x_ref[2]
            arg[(0, 2, 2)]+=(-0.414301601146+0.831770438489j)*x[2]**o + ((0.268711638458+0.877839598879j))*x[2]
            ref[(0, 2, 2)]+=(-0.414301601146+0.831770438489j)*x_ref[2]**o + ((0.268711638458+0.877839598879j))*x_ref[2]
            arg[(1, 0, 0)]+=(-0.706639809181-0.969772914865j)*x[2]**o + ((-0.453439874594+0.549779502256j))*x[2]
            ref[(1, 0, 0)]+=(-0.706639809181-0.969772914865j)*x_ref[2]**o + ((-0.453439874594+0.549779502256j))*x_ref[2]
            arg[(1, 0, 1)]+=(0.405393247674-0.864488621402j)*x[2]**o + ((-0.977172452398-0.355797897242j))*x[2]
            ref[(1, 0, 1)]+=(0.405393247674-0.864488621402j)*x_ref[2]**o + ((-0.977172452398-0.355797897242j))*x_ref[2]
            arg[(1, 0, 2)]+=(0.682547129668+0.539470150379j)*x[2]**o + ((-0.281427008991-0.866664139368j))*x[2]
            ref[(1, 0, 2)]+=(0.682547129668+0.539470150379j)*x_ref[2]**o + ((-0.281427008991-0.866664139368j))*x_ref[2]
            arg[(1, 1, 0)]+=(-0.0268821902478+0.57719043527j)*x[2]**o + ((-0.255391380539-0.605786703608j))*x[2]
            ref[(1, 1, 0)]+=(-0.0268821902478+0.57719043527j)*x_ref[2]**o + ((-0.255391380539-0.605786703608j))*x_ref[2]
            arg[(1, 1, 1)]+=(-0.298149834399+0.33333056653j)*x[2]**o + ((0.973562089373-0.56099503057j))*x[2]
            ref[(1, 1, 1)]+=(-0.298149834399+0.33333056653j)*x_ref[2]**o + ((0.973562089373-0.56099503057j))*x_ref[2]
            arg[(1, 1, 2)]+=(0.524618448763+0.81933627443j)*x[2]**o + ((-0.50645948122-0.607974257559j))*x[2]
            ref[(1, 1, 2)]+=(0.524618448763+0.81933627443j)*x_ref[2]**o + ((-0.50645948122-0.607974257559j))*x_ref[2]
            arg[(1, 2, 0)]+=(0.987143975817-0.985362891687j)*x[2]**o + ((0.996295909057+0.351943198859j))*x[2]
            ref[(1, 2, 0)]+=(0.987143975817-0.985362891687j)*x_ref[2]**o + ((0.996295909057+0.351943198859j))*x_ref[2]
            arg[(1, 2, 1)]+=(-0.327669241575+0.047505032021j)*x[2]**o + ((-0.546067193007-0.774043739795j))*x[2]
            ref[(1, 2, 1)]+=(-0.327669241575+0.047505032021j)*x_ref[2]**o + ((-0.546067193007-0.774043739795j))*x_ref[2]
            arg[(1, 2, 2)]+=(0.0868192956389+0.34393869459j)*x[2]**o + ((0.142998052899-0.414727737626j))*x[2]
            ref[(1, 2, 2)]+=(0.0868192956389+0.34393869459j)*x_ref[2]**o + ((0.142998052899-0.414727737626j))*x_ref[2]
            arg[(2, 0, 0)]+=(-0.675573853812+0.368718599375j)*x[2]**o + ((-0.103805863332-0.788438094704j))*x[2]
            ref[(2, 0, 0)]+=(-0.675573853812+0.368718599375j)*x_ref[2]**o + ((-0.103805863332-0.788438094704j))*x_ref[2]
            arg[(2, 0, 1)]+=(-0.871020226426+0.780743151899j)*x[2]**o + ((0.382306533855+0.478792472205j))*x[2]
            ref[(2, 0, 1)]+=(-0.871020226426+0.780743151899j)*x_ref[2]**o + ((0.382306533855+0.478792472205j))*x_ref[2]
            arg[(2, 0, 2)]+=(-0.909264176375+0.234933497295j)*x[2]**o + ((0.276670548659-0.401370639477j))*x[2]
            ref[(2, 0, 2)]+=(-0.909264176375+0.234933497295j)*x_ref[2]**o + ((0.276670548659-0.401370639477j))*x_ref[2]
            arg[(2, 1, 0)]+=(-0.286935727897+0.17970485184j)*x[2]**o + ((0.169807128699-0.938939273982j))*x[2]
            ref[(2, 1, 0)]+=(-0.286935727897+0.17970485184j)*x_ref[2]**o + ((0.169807128699-0.938939273982j))*x_ref[2]
            arg[(2, 1, 1)]+=(0.895360677152-0.647936625205j)*x[2]**o + ((0.565255379377-0.0204033465059j))*x[2]
            ref[(2, 1, 1)]+=(0.895360677152-0.647936625205j)*x_ref[2]**o + ((0.565255379377-0.0204033465059j))*x_ref[2]
            arg[(2, 1, 2)]+=(-0.306215601623+0.746444300987j)*x[2]**o + ((0.506046611011-0.97621193595j))*x[2]
            ref[(2, 1, 2)]+=(-0.306215601623+0.746444300987j)*x_ref[2]**o + ((0.506046611011-0.97621193595j))*x_ref[2]
            arg[(2, 2, 0)]+=(-0.285930785321-0.993679371166j)*x[2]**o + ((-0.620250934098+0.0718511414398j))*x[2]
            ref[(2, 2, 0)]+=(-0.285930785321-0.993679371166j)*x_ref[2]**o + ((-0.620250934098+0.0718511414398j))*x_ref[2]
            arg[(2, 2, 1)]+=(-0.344406606259-0.135081700772j)*x[2]**o + ((-0.53104341501-0.0849065564429j))*x[2]
            ref[(2, 2, 1)]+=(-0.344406606259-0.135081700772j)*x_ref[2]**o + ((-0.53104341501-0.0849065564429j))*x_ref[2]
            arg[(2, 2, 2)]+=(-0.575511539121+0.971130512998j)*x[2]**o + ((-0.954276213785+0.0634942795349j))*x[2]
            ref[(2, 2, 2)]+=(-0.575511539121+0.971130512998j)*x_ref[2]**o + ((-0.954276213785+0.0634942795349j))*x_ref[2]
            arg[(3, 0, 0)]+=(-0.187275416441+0.429224827842j)*x[2]**o + ((-0.136545073827+0.556012213189j))*x[2]
            ref[(3, 0, 0)]+=(-0.187275416441+0.429224827842j)*x_ref[2]**o + ((-0.136545073827+0.556012213189j))*x_ref[2]
            arg[(3, 0, 1)]+=(0.718039514569+0.579182574808j)*x[2]**o + ((0.531470056182+0.758314911767j))*x[2]
            ref[(3, 0, 1)]+=(0.718039514569+0.579182574808j)*x_ref[2]**o + ((0.531470056182+0.758314911767j))*x_ref[2]
            arg[(3, 0, 2)]+=(0.239264187483-0.63049780946j)*x[2]**o + ((0.221210731718-0.313377216486j))*x[2]
            ref[(3, 0, 2)]+=(0.239264187483-0.63049780946j)*x_ref[2]**o + ((0.221210731718-0.313377216486j))*x_ref[2]
            arg[(3, 1, 0)]+=(-0.977116613777-0.241605510128j)*x[2]**o + ((-0.052428155246-0.589567971991j))*x[2]
            ref[(3, 1, 0)]+=(-0.977116613777-0.241605510128j)*x_ref[2]**o + ((-0.052428155246-0.589567971991j))*x_ref[2]
            arg[(3, 1, 1)]+=(0.755995529931-0.845330577085j)*x[2]**o + ((0.00607699781568+0.0166886132773j))*x[2]
            ref[(3, 1, 1)]+=(0.755995529931-0.845330577085j)*x_ref[2]**o + ((0.00607699781568+0.0166886132773j))*x_ref[2]
            arg[(3, 1, 2)]+=(0.125200410302+0.233874733407j)*x[2]**o + ((0.31043863761+0.414750877287j))*x[2]
            ref[(3, 1, 2)]+=(0.125200410302+0.233874733407j)*x_ref[2]**o + ((0.31043863761+0.414750877287j))*x_ref[2]
            arg[(3, 2, 0)]+=(-0.0629651869437+0.786497201917j)*x[2]**o + ((-0.7011229806+0.356357499176j))*x[2]
            ref[(3, 2, 0)]+=(-0.0629651869437+0.786497201917j)*x_ref[2]**o + ((-0.7011229806+0.356357499176j))*x_ref[2]
            arg[(3, 2, 1)]+=(0.129488631305-0.77477805543j)*x[2]**o + ((0.550005798383-0.629326678523j))*x[2]
            ref[(3, 2, 1)]+=(0.129488631305-0.77477805543j)*x_ref[2]**o + ((0.550005798383-0.629326678523j))*x_ref[2]
            arg[(3, 2, 2)]+=(-0.125122314875-0.866763329122j)*x[2]**o + ((0.168570483042-0.595550064896j))*x[2]
            ref[(3, 2, 2)]+=(-0.125122314875-0.866763329122j)*x_ref[2]**o + ((0.168570483042-0.595550064896j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedSolution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 4, 2),w)
        ref = Data(0,(3, 4, 4, 2),w_ref)
        arg[(0, 0, 0, 0)]=(-0.705330727826-0.0820124408269j)*x[0]**o + ((-0.306505117457-0.647262122097j))*x[0] + ((0.148862593762-0.18822339447j))*x[1]**o + ((0.0635416240815-0.234622321386j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.705330727826-0.0820124408269j)*x_ref[0]**o + ((-0.306505117457-0.647262122097j))*x_ref[0] + ((0.148862593762-0.18822339447j))*x_ref[1]**o + ((0.0635416240815-0.234622321386j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.762851149767-0.138612813836j)*x[0]**o + ((0.695026396431+0.616488606j))*x[0] + ((0.848046429959-0.184075578333j))*x[1]**o + ((0.593681577238-0.452259153714j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.762851149767-0.138612813836j)*x_ref[0]**o + ((0.695026396431+0.616488606j))*x_ref[0] + ((0.848046429959-0.184075578333j))*x_ref[1]**o + ((0.593681577238-0.452259153714j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.220194391998+0.197903553324j)*x[0]**o + ((-0.404434244105-0.134117241869j))*x[0] + ((-0.105619072344-0.566659505812j))*x[1]**o + ((0.265892254193-0.774800250893j))*x[1]
        ref[(0, 0, 1, 0)]=(0.220194391998+0.197903553324j)*x_ref[0]**o + ((-0.404434244105-0.134117241869j))*x_ref[0] + ((-0.105619072344-0.566659505812j))*x_ref[1]**o + ((0.265892254193-0.774800250893j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.916052465448-0.120967833456j)*x[0]**o + ((0.0134915204308+0.352906811181j))*x[0] + ((0.570805918846+0.903644590537j))*x[1]**o + ((0.863092459686-0.117278788899j))*x[1]
        ref[(0, 0, 1, 1)]=(0.916052465448-0.120967833456j)*x_ref[0]**o + ((0.0134915204308+0.352906811181j))*x_ref[0] + ((0.570805918846+0.903644590537j))*x_ref[1]**o + ((0.863092459686-0.117278788899j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(0.699673680318+0.765218910489j)*x[0]**o + ((-0.192384121592-0.710461335019j))*x[0] + ((0.243934650126-0.575346061551j))*x[1]**o + ((0.0263366129316+0.530206088408j))*x[1]
        ref[(0, 0, 2, 0)]=(0.699673680318+0.765218910489j)*x_ref[0]**o + ((-0.192384121592-0.710461335019j))*x_ref[0] + ((0.243934650126-0.575346061551j))*x_ref[1]**o + ((0.0263366129316+0.530206088408j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(-0.54518377174+0.0985747154357j)*x[0]**o + ((-0.73133894597+0.0221409965082j))*x[0] + ((-0.92517919053+0.103485477386j))*x[1]**o + ((0.548340276535-0.255959455764j))*x[1]
        ref[(0, 0, 2, 1)]=(-0.54518377174+0.0985747154357j)*x_ref[0]**o + ((-0.73133894597+0.0221409965082j))*x_ref[0] + ((-0.92517919053+0.103485477386j))*x_ref[1]**o + ((0.548340276535-0.255959455764j))*x_ref[1]
        arg[(0, 0, 3, 0)]=(-0.00775581131346+0.608015482798j)*x[0]**o + ((-0.0190880656188+0.98976783413j))*x[0] + ((0.381837975239-0.322887978459j))*x[1]**o + ((-0.166050845089+0.766702572991j))*x[1]
        ref[(0, 0, 3, 0)]=(-0.00775581131346+0.608015482798j)*x_ref[0]**o + ((-0.0190880656188+0.98976783413j))*x_ref[0] + ((0.381837975239-0.322887978459j))*x_ref[1]**o + ((-0.166050845089+0.766702572991j))*x_ref[1]
        arg[(0, 0, 3, 1)]=(-0.183719054267-0.200698198607j)*x[0]**o + ((0.247168763286-0.00427859416801j))*x[0] + ((0.191214121753+0.627798308431j))*x[1]**o + ((-0.886793363731-0.223332282322j))*x[1]
        ref[(0, 0, 3, 1)]=(-0.183719054267-0.200698198607j)*x_ref[0]**o + ((0.247168763286-0.00427859416801j))*x_ref[0] + ((0.191214121753+0.627798308431j))*x_ref[1]**o + ((-0.886793363731-0.223332282322j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.257838238041-0.351147786389j)*x[0]**o + ((-0.954266517065+0.343011398596j))*x[0] + ((-0.602005803097+0.948949601556j))*x[1]**o + ((0.73373392544-0.477117075184j))*x[1]
        ref[(0, 1, 0, 0)]=(0.257838238041-0.351147786389j)*x_ref[0]**o + ((-0.954266517065+0.343011398596j))*x_ref[0] + ((-0.602005803097+0.948949601556j))*x_ref[1]**o + ((0.73373392544-0.477117075184j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.101067321972-0.774074898975j)*x[0]**o + ((-0.0254164175899+0.844692495091j))*x[0] + ((0.928248434347-0.868393926812j))*x[1]**o + ((-0.310031397269+0.75577930702j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.101067321972-0.774074898975j)*x_ref[0]**o + ((-0.0254164175899+0.844692495091j))*x_ref[0] + ((0.928248434347-0.868393926812j))*x_ref[1]**o + ((-0.310031397269+0.75577930702j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.706475294187-0.67029619426j)*x[0]**o + ((-0.724012838858-0.713688666782j))*x[0] + ((0.813430843715+0.764097564401j))*x[1]**o + ((-0.338298511689-0.675426377055j))*x[1]
        ref[(0, 1, 1, 0)]=(0.706475294187-0.67029619426j)*x_ref[0]**o + ((-0.724012838858-0.713688666782j))*x_ref[0] + ((0.813430843715+0.764097564401j))*x_ref[1]**o + ((-0.338298511689-0.675426377055j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.937765215829+0.749598423657j)*x[0]**o + ((0.89748903945-0.0842973105498j))*x[0] + ((-0.495631449056-0.613286978645j))*x[1]**o + ((0.593264915041+0.293382044321j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.937765215829+0.749598423657j)*x_ref[0]**o + ((0.89748903945-0.0842973105498j))*x_ref[0] + ((-0.495631449056-0.613286978645j))*x_ref[1]**o + ((0.593264915041+0.293382044321j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(-0.111523107789-0.979705701851j)*x[0]**o + ((-0.0336758152865-0.439678737425j))*x[0] + ((0.789813108004+0.794311945233j))*x[1]**o + ((0.226580789145-0.973597853201j))*x[1]
        ref[(0, 1, 2, 0)]=(-0.111523107789-0.979705701851j)*x_ref[0]**o + ((-0.0336758152865-0.439678737425j))*x_ref[0] + ((0.789813108004+0.794311945233j))*x_ref[1]**o + ((0.226580789145-0.973597853201j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(-0.650836912616-0.0673918444492j)*x[0]**o + ((-0.666559903682-0.542529194832j))*x[0] + ((0.209893656928-0.278710782531j))*x[1]**o + ((-0.697730820931-0.205239237942j))*x[1]
        ref[(0, 1, 2, 1)]=(-0.650836912616-0.0673918444492j)*x_ref[0]**o + ((-0.666559903682-0.542529194832j))*x_ref[0] + ((0.209893656928-0.278710782531j))*x_ref[1]**o + ((-0.697730820931-0.205239237942j))*x_ref[1]
        arg[(0, 1, 3, 0)]=(0.228053562339-0.342020493497j)*x[0]**o + ((0.687357920158-0.214899218613j))*x[0] + ((-0.71867108307-0.97163848929j))*x[1]**o + ((-0.820557126172+0.669699498347j))*x[1]
        ref[(0, 1, 3, 0)]=(0.228053562339-0.342020493497j)*x_ref[0]**o + ((0.687357920158-0.214899218613j))*x_ref[0] + ((-0.71867108307-0.97163848929j))*x_ref[1]**o + ((-0.820557126172+0.669699498347j))*x_ref[1]
        arg[(0, 1, 3, 1)]=(-0.737388293813-0.192322047242j)*x[0]**o + ((-0.192880715798-0.967381582975j))*x[0] + ((0.0295382461872+0.539112132761j))*x[1]**o + ((0.00157397045371-0.145281978747j))*x[1]
        ref[(0, 1, 3, 1)]=(-0.737388293813-0.192322047242j)*x_ref[0]**o + ((-0.192880715798-0.967381582975j))*x_ref[0] + ((0.0295382461872+0.539112132761j))*x_ref[1]**o + ((0.00157397045371-0.145281978747j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(-0.362167133948-0.857791704346j)*x[0]**o + ((-0.0889366561477-0.415981449293j))*x[0] + ((-0.953098970823-0.850270776771j))*x[1]**o + ((-0.675225248299+0.984386082566j))*x[1]
        ref[(0, 2, 0, 0)]=(-0.362167133948-0.857791704346j)*x_ref[0]**o + ((-0.0889366561477-0.415981449293j))*x_ref[0] + ((-0.953098970823-0.850270776771j))*x_ref[1]**o + ((-0.675225248299+0.984386082566j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(0.183369758858+0.417080381313j)*x[0]**o + ((0.745640040935-0.280502116726j))*x[0] + ((0.918123495368+0.680212356437j))*x[1]**o + ((0.66356427056-0.289136248234j))*x[1]
        ref[(0, 2, 0, 1)]=(0.183369758858+0.417080381313j)*x_ref[0]**o + ((0.745640040935-0.280502116726j))*x_ref[0] + ((0.918123495368+0.680212356437j))*x_ref[1]**o + ((0.66356427056-0.289136248234j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.190753122725-0.627757209118j)*x[0]**o + ((-0.54695686728-0.0735966464242j))*x[0] + ((0.0442426464297+0.572263627437j))*x[1]**o + ((-0.284369180263-0.621822504979j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.190753122725-0.627757209118j)*x_ref[0]**o + ((-0.54695686728-0.0735966464242j))*x_ref[0] + ((0.0442426464297+0.572263627437j))*x_ref[1]**o + ((-0.284369180263-0.621822504979j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(0.352051410736+0.425973838015j)*x[0]**o + ((0.955207341412+0.782397751528j))*x[0] + ((-0.964271616653+0.408780702573j))*x[1]**o + ((-0.332063578695+0.412394205783j))*x[1]
        ref[(0, 2, 1, 1)]=(0.352051410736+0.425973838015j)*x_ref[0]**o + ((0.955207341412+0.782397751528j))*x_ref[0] + ((-0.964271616653+0.408780702573j))*x_ref[1]**o + ((-0.332063578695+0.412394205783j))*x_ref[1]
        arg[(0, 2, 2, 0)]=(-0.955734411556-0.600088977497j)*x[0]**o + ((-0.877761988242-0.781350161555j))*x[0] + ((-0.962410963812-0.197842172886j))*x[1]**o + ((0.632427395914+0.746051242001j))*x[1]
        ref[(0, 2, 2, 0)]=(-0.955734411556-0.600088977497j)*x_ref[0]**o + ((-0.877761988242-0.781350161555j))*x_ref[0] + ((-0.962410963812-0.197842172886j))*x_ref[1]**o + ((0.632427395914+0.746051242001j))*x_ref[1]
        arg[(0, 2, 2, 1)]=(0.550397050336-0.620611595105j)*x[0]**o + ((0.678431438866+0.347412676567j))*x[0] + ((0.541153128361-0.0659570845596j))*x[1]**o + ((0.468542877258+0.542622670663j))*x[1]
        ref[(0, 2, 2, 1)]=(0.550397050336-0.620611595105j)*x_ref[0]**o + ((0.678431438866+0.347412676567j))*x_ref[0] + ((0.541153128361-0.0659570845596j))*x_ref[1]**o + ((0.468542877258+0.542622670663j))*x_ref[1]
        arg[(0, 2, 3, 0)]=(-0.0361689166685-0.128772580869j)*x[0]**o + ((-0.678068652633+0.536708189583j))*x[0] + ((0.359037551267-0.447412236241j))*x[1]**o + ((0.386692341676+0.589948488212j))*x[1]
        ref[(0, 2, 3, 0)]=(-0.0361689166685-0.128772580869j)*x_ref[0]**o + ((-0.678068652633+0.536708189583j))*x_ref[0] + ((0.359037551267-0.447412236241j))*x_ref[1]**o + ((0.386692341676+0.589948488212j))*x_ref[1]
        arg[(0, 2, 3, 1)]=(-0.48603826021-0.946380047165j)*x[0]**o + ((0.465736519442+0.489553023652j))*x[0] + ((-0.724178936719+0.993329595632j))*x[1]**o + ((-0.513451552212-0.835582370666j))*x[1]
        ref[(0, 2, 3, 1)]=(-0.48603826021-0.946380047165j)*x_ref[0]**o + ((0.465736519442+0.489553023652j))*x_ref[0] + ((-0.724178936719+0.993329595632j))*x_ref[1]**o + ((-0.513451552212-0.835582370666j))*x_ref[1]
        arg[(0, 3, 0, 0)]=(-0.136386870756-0.558844362784j)*x[0]**o + ((0.596026896135+0.635931934959j))*x[0] + ((-0.85277802495-0.11594489491j))*x[1]**o + ((0.242191012439+0.283091538437j))*x[1]
        ref[(0, 3, 0, 0)]=(-0.136386870756-0.558844362784j)*x_ref[0]**o + ((0.596026896135+0.635931934959j))*x_ref[0] + ((-0.85277802495-0.11594489491j))*x_ref[1]**o + ((0.242191012439+0.283091538437j))*x_ref[1]
        arg[(0, 3, 0, 1)]=(-0.704189186488-0.785339746549j)*x[0]**o + ((-0.679959646813-0.672199563218j))*x[0] + ((-0.0789944041235+0.872094488515j))*x[1]**o + ((0.903803672152+0.861680556223j))*x[1]
        ref[(0, 3, 0, 1)]=(-0.704189186488-0.785339746549j)*x_ref[0]**o + ((-0.679959646813-0.672199563218j))*x_ref[0] + ((-0.0789944041235+0.872094488515j))*x_ref[1]**o + ((0.903803672152+0.861680556223j))*x_ref[1]
        arg[(0, 3, 1, 0)]=(0.00997412163358-0.304769616154j)*x[0]**o + ((0.0545107949912-0.314400935948j))*x[0] + ((-0.360379026894-0.59402702458j))*x[1]**o + ((0.146258918625-0.750080982177j))*x[1]
        ref[(0, 3, 1, 0)]=(0.00997412163358-0.304769616154j)*x_ref[0]**o + ((0.0545107949912-0.314400935948j))*x_ref[0] + ((-0.360379026894-0.59402702458j))*x_ref[1]**o + ((0.146258918625-0.750080982177j))*x_ref[1]
        arg[(0, 3, 1, 1)]=(0.644556315218-0.597205416957j)*x[0]**o + ((0.0601465007428+0.313038047613j))*x[0] + ((-0.383205064218+0.667872925711j))*x[1]**o + ((-0.483902130696+0.165378365354j))*x[1]
        ref[(0, 3, 1, 1)]=(0.644556315218-0.597205416957j)*x_ref[0]**o + ((0.0601465007428+0.313038047613j))*x_ref[0] + ((-0.383205064218+0.667872925711j))*x_ref[1]**o + ((-0.483902130696+0.165378365354j))*x_ref[1]
        arg[(0, 3, 2, 0)]=(0.509973245603+0.650008943956j)*x[0]**o + ((-0.638520448727+0.0361401482364j))*x[0] + ((-0.785187888369+0.375547178159j))*x[1]**o + ((-0.877042505657+0.984578077139j))*x[1]
        ref[(0, 3, 2, 0)]=(0.509973245603+0.650008943956j)*x_ref[0]**o + ((-0.638520448727+0.0361401482364j))*x_ref[0] + ((-0.785187888369+0.375547178159j))*x_ref[1]**o + ((-0.877042505657+0.984578077139j))*x_ref[1]
        arg[(0, 3, 2, 1)]=(0.798182781397+0.864376658901j)*x[0]**o + ((0.538346935355+0.396267945694j))*x[0] + ((0.932051001625-0.299755050079j))*x[1]**o + ((0.215289984558+0.608303901658j))*x[1]
        ref[(0, 3, 2, 1)]=(0.798182781397+0.864376658901j)*x_ref[0]**o + ((0.538346935355+0.396267945694j))*x_ref[0] + ((0.932051001625-0.299755050079j))*x_ref[1]**o + ((0.215289984558+0.608303901658j))*x_ref[1]
        arg[(0, 3, 3, 0)]=(0.86112937319+0.714143268676j)*x[0]**o + ((0.278586701321+0.636050987516j))*x[0] + ((-0.919516854458+0.0275443206654j))*x[1]**o + ((-0.0217092232875+0.0396318485302j))*x[1]
        ref[(0, 3, 3, 0)]=(0.86112937319+0.714143268676j)*x_ref[0]**o + ((0.278586701321+0.636050987516j))*x_ref[0] + ((-0.919516854458+0.0275443206654j))*x_ref[1]**o + ((-0.0217092232875+0.0396318485302j))*x_ref[1]
        arg[(0, 3, 3, 1)]=(0.222905139606+0.479859369196j)*x[0]**o + ((-0.488928619552+0.4048742835j))*x[0] + ((-0.00460959150732+0.64687744683j))*x[1]**o + ((0.891078732553-0.125625519374j))*x[1]
        ref[(0, 3, 3, 1)]=(0.222905139606+0.479859369196j)*x_ref[0]**o + ((-0.488928619552+0.4048742835j))*x_ref[0] + ((-0.00460959150732+0.64687744683j))*x_ref[1]**o + ((0.891078732553-0.125625519374j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.305051830222+0.0670235415311j)*x[0]**o + ((-0.166641376598+0.776663844467j))*x[0] + ((0.102856285054-0.253230875471j))*x[1]**o + ((-0.552756288079+0.330580567633j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.305051830222+0.0670235415311j)*x_ref[0]**o + ((-0.166641376598+0.776663844467j))*x_ref[0] + ((0.102856285054-0.253230875471j))*x_ref[1]**o + ((-0.552756288079+0.330580567633j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.446937785587-0.14258847615j)*x[0]**o + ((0.243983066838-0.415334103212j))*x[0] + ((0.685045257051-0.879283811295j))*x[1]**o + ((0.967051385513-0.722412972957j))*x[1]
        ref[(1, 0, 0, 1)]=(0.446937785587-0.14258847615j)*x_ref[0]**o + ((0.243983066838-0.415334103212j))*x_ref[0] + ((0.685045257051-0.879283811295j))*x_ref[1]**o + ((0.967051385513-0.722412972957j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(0.696737549457-0.0257935884513j)*x[0]**o + ((-0.643958174258+0.595446026729j))*x[0] + ((0.93200446434-0.0518016185142j))*x[1]**o + ((-0.755213467082-0.20632136997j))*x[1]
        ref[(1, 0, 1, 0)]=(0.696737549457-0.0257935884513j)*x_ref[0]**o + ((-0.643958174258+0.595446026729j))*x_ref[0] + ((0.93200446434-0.0518016185142j))*x_ref[1]**o + ((-0.755213467082-0.20632136997j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.464359858152-0.807350765819j)*x[0]**o + ((-0.797736153511+0.75520347078j))*x[0] + ((0.218110707788+0.590053212123j))*x[1]**o + ((0.86398530158-0.388616934984j))*x[1]
        ref[(1, 0, 1, 1)]=(0.464359858152-0.807350765819j)*x_ref[0]**o + ((-0.797736153511+0.75520347078j))*x_ref[0] + ((0.218110707788+0.590053212123j))*x_ref[1]**o + ((0.86398530158-0.388616934984j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(-0.0176092397497+0.801886105547j)*x[0]**o + ((-0.468051971672+0.626127255141j))*x[0] + ((0.920203225143+0.0820284683317j))*x[1]**o + ((0.913212175231+0.885209780242j))*x[1]
        ref[(1, 0, 2, 0)]=(-0.0176092397497+0.801886105547j)*x_ref[0]**o + ((-0.468051971672+0.626127255141j))*x_ref[0] + ((0.920203225143+0.0820284683317j))*x_ref[1]**o + ((0.913212175231+0.885209780242j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(0.866909651034+0.809448108918j)*x[0]**o + ((-0.657393676778-0.311739389926j))*x[0] + ((0.776531628245+0.304017494574j))*x[1]**o + ((0.276566183902+0.272166639746j))*x[1]
        ref[(1, 0, 2, 1)]=(0.866909651034+0.809448108918j)*x_ref[0]**o + ((-0.657393676778-0.311739389926j))*x_ref[0] + ((0.776531628245+0.304017494574j))*x_ref[1]**o + ((0.276566183902+0.272166639746j))*x_ref[1]
        arg[(1, 0, 3, 0)]=(0.875330426714-0.686062827575j)*x[0]**o + ((-0.487644833726+0.159158338453j))*x[0] + ((-0.134748480362-0.201490428566j))*x[1]**o + ((0.794531011137-0.300616913301j))*x[1]
        ref[(1, 0, 3, 0)]=(0.875330426714-0.686062827575j)*x_ref[0]**o + ((-0.487644833726+0.159158338453j))*x_ref[0] + ((-0.134748480362-0.201490428566j))*x_ref[1]**o + ((0.794531011137-0.300616913301j))*x_ref[1]
        arg[(1, 0, 3, 1)]=(0.130062573456-0.254429499234j)*x[0]**o + ((0.8602772079+0.813984310826j))*x[0] + ((-0.233549396492-0.323077011134j))*x[1]**o + ((-0.675663470456-0.227088919542j))*x[1]
        ref[(1, 0, 3, 1)]=(0.130062573456-0.254429499234j)*x_ref[0]**o + ((0.8602772079+0.813984310826j))*x_ref[0] + ((-0.233549396492-0.323077011134j))*x_ref[1]**o + ((-0.675663470456-0.227088919542j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.838664707559+0.693116090507j)*x[0]**o + ((0.424122500925+0.12016750628j))*x[0] + ((-0.474006138482+0.172499114394j))*x[1]**o + ((0.515961973831+0.165689046172j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.838664707559+0.693116090507j)*x_ref[0]**o + ((0.424122500925+0.12016750628j))*x_ref[0] + ((-0.474006138482+0.172499114394j))*x_ref[1]**o + ((0.515961973831+0.165689046172j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.77393601756+0.435587577242j)*x[0]**o + ((-0.731678415958+0.470427224085j))*x[0] + ((-0.263707088072-0.0623224051769j))*x[1]**o + ((-0.222018574026-0.0323720665961j))*x[1]
        ref[(1, 1, 0, 1)]=(0.77393601756+0.435587577242j)*x_ref[0]**o + ((-0.731678415958+0.470427224085j))*x_ref[0] + ((-0.263707088072-0.0623224051769j))*x_ref[1]**o + ((-0.222018574026-0.0323720665961j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.746312140082+0.983070520325j)*x[0]**o + ((-0.352748121949-0.114708269302j))*x[0] + ((0.80506917304-0.674974618039j))*x[1]**o + ((-0.87479360219-0.813504293817j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.746312140082+0.983070520325j)*x_ref[0]**o + ((-0.352748121949-0.114708269302j))*x_ref[0] + ((0.80506917304-0.674974618039j))*x_ref[1]**o + ((-0.87479360219-0.813504293817j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.597789931875-0.420994005859j)*x[0]**o + ((0.122851679468-0.879187385447j))*x[0] + ((-0.338066673204-0.718797361255j))*x[1]**o + ((-0.30885817567+0.972045196883j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.597789931875-0.420994005859j)*x_ref[0]**o + ((0.122851679468-0.879187385447j))*x_ref[0] + ((-0.338066673204-0.718797361255j))*x_ref[1]**o + ((-0.30885817567+0.972045196883j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(0.610530878717+0.987882583323j)*x[0]**o + ((-0.695705326953+0.218647317094j))*x[0] + ((0.574046702386-0.0781159828001j))*x[1]**o + ((0.481035539082-0.12000280403j))*x[1]
        ref[(1, 1, 2, 0)]=(0.610530878717+0.987882583323j)*x_ref[0]**o + ((-0.695705326953+0.218647317094j))*x_ref[0] + ((0.574046702386-0.0781159828001j))*x_ref[1]**o + ((0.481035539082-0.12000280403j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(-0.709215801539+0.346510943088j)*x[0]**o + ((0.111252542477+0.782675860513j))*x[0] + ((-0.939792219197-0.327340563686j))*x[1]**o + ((0.590618401586+0.552777516316j))*x[1]
        ref[(1, 1, 2, 1)]=(-0.709215801539+0.346510943088j)*x_ref[0]**o + ((0.111252542477+0.782675860513j))*x_ref[0] + ((-0.939792219197-0.327340563686j))*x_ref[1]**o + ((0.590618401586+0.552777516316j))*x_ref[1]
        arg[(1, 1, 3, 0)]=(-0.594200129486+0.613557486588j)*x[0]**o + ((-0.91128644168-0.165077485222j))*x[0] + ((-0.642814652656+0.0284804491566j))*x[1]**o + ((-0.331378762922+0.535683400884j))*x[1]
        ref[(1, 1, 3, 0)]=(-0.594200129486+0.613557486588j)*x_ref[0]**o + ((-0.91128644168-0.165077485222j))*x_ref[0] + ((-0.642814652656+0.0284804491566j))*x_ref[1]**o + ((-0.331378762922+0.535683400884j))*x_ref[1]
        arg[(1, 1, 3, 1)]=(0.329253360801+0.880534664508j)*x[0]**o + ((-0.0500281799586-0.199498552311j))*x[0] + ((0.69377861054+0.790008394072j))*x[1]**o + ((-0.454471882408-0.69686466192j))*x[1]
        ref[(1, 1, 3, 1)]=(0.329253360801+0.880534664508j)*x_ref[0]**o + ((-0.0500281799586-0.199498552311j))*x_ref[0] + ((0.69377861054+0.790008394072j))*x_ref[1]**o + ((-0.454471882408-0.69686466192j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(-0.794458434205+0.0955690330336j)*x[0]**o + ((-0.764121427966+0.261962848409j))*x[0] + ((-0.885501549216+0.292611944475j))*x[1]**o + ((0.139704803794+0.994492145269j))*x[1]
        ref[(1, 2, 0, 0)]=(-0.794458434205+0.0955690330336j)*x_ref[0]**o + ((-0.764121427966+0.261962848409j))*x_ref[0] + ((-0.885501549216+0.292611944475j))*x_ref[1]**o + ((0.139704803794+0.994492145269j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.126754087709+0.691737162126j)*x[0]**o + ((-0.897290955595+0.446282388109j))*x[0] + ((0.13175967684+0.766482560594j))*x[1]**o + ((0.526286732352+0.807468577572j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.126754087709+0.691737162126j)*x_ref[0]**o + ((-0.897290955595+0.446282388109j))*x_ref[0] + ((0.13175967684+0.766482560594j))*x_ref[1]**o + ((0.526286732352+0.807468577572j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(-0.185578551292-0.97001574764j)*x[0]**o + ((0.730691174481-0.337768296413j))*x[0] + ((0.87338868151+0.304582525931j))*x[1]**o + ((0.505815597161+0.321359347006j))*x[1]
        ref[(1, 2, 1, 0)]=(-0.185578551292-0.97001574764j)*x_ref[0]**o + ((0.730691174481-0.337768296413j))*x_ref[0] + ((0.87338868151+0.304582525931j))*x_ref[1]**o + ((0.505815597161+0.321359347006j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(-0.2062945365+0.622996771191j)*x[0]**o + ((-0.318191905806-0.374490012585j))*x[0] + ((0.631813146537+0.135086892005j))*x[1]**o + ((0.894830693166-0.955919593633j))*x[1]
        ref[(1, 2, 1, 1)]=(-0.2062945365+0.622996771191j)*x_ref[0]**o + ((-0.318191905806-0.374490012585j))*x_ref[0] + ((0.631813146537+0.135086892005j))*x_ref[1]**o + ((0.894830693166-0.955919593633j))*x_ref[1]
        arg[(1, 2, 2, 0)]=(-0.227570530378-0.268522973277j)*x[0]**o + ((-0.140044747456-0.146008683325j))*x[0] + ((-0.128539801435-0.905381367659j))*x[1]**o + ((-0.613477751408-0.703358983192j))*x[1]
        ref[(1, 2, 2, 0)]=(-0.227570530378-0.268522973277j)*x_ref[0]**o + ((-0.140044747456-0.146008683325j))*x_ref[0] + ((-0.128539801435-0.905381367659j))*x_ref[1]**o + ((-0.613477751408-0.703358983192j))*x_ref[1]
        arg[(1, 2, 2, 1)]=(0.457498854034-0.196754033916j)*x[0]**o + ((0.954940810473+0.264614304114j))*x[0] + ((-0.912629998236+0.901265452432j))*x[1]**o + ((-0.094189788712-0.772527930185j))*x[1]
        ref[(1, 2, 2, 1)]=(0.457498854034-0.196754033916j)*x_ref[0]**o + ((0.954940810473+0.264614304114j))*x_ref[0] + ((-0.912629998236+0.901265452432j))*x_ref[1]**o + ((-0.094189788712-0.772527930185j))*x_ref[1]
        arg[(1, 2, 3, 0)]=(-0.876614506343+0.068405209858j)*x[0]**o + ((-0.715773868615-0.437588472556j))*x[0] + ((-0.276140947694+0.408453649181j))*x[1]**o + ((0.53595763001-0.425027752218j))*x[1]
        ref[(1, 2, 3, 0)]=(-0.876614506343+0.068405209858j)*x_ref[0]**o + ((-0.715773868615-0.437588472556j))*x_ref[0] + ((-0.276140947694+0.408453649181j))*x_ref[1]**o + ((0.53595763001-0.425027752218j))*x_ref[1]
        arg[(1, 2, 3, 1)]=(0.246174791861-0.0619718527763j)*x[0]**o + ((0.63389748368-0.989594981622j))*x[0] + ((0.313406214044-0.310140886112j))*x[1]**o + ((0.828633893854-0.245433392358j))*x[1]
        ref[(1, 2, 3, 1)]=(0.246174791861-0.0619718527763j)*x_ref[0]**o + ((0.63389748368-0.989594981622j))*x_ref[0] + ((0.313406214044-0.310140886112j))*x_ref[1]**o + ((0.828633893854-0.245433392358j))*x_ref[1]
        arg[(1, 3, 0, 0)]=(0.263890228291+0.113356406029j)*x[0]**o + ((0.270166527324+0.188941528031j))*x[0] + ((-0.203813027513-0.338815427008j))*x[1]**o + ((-0.849559238982-0.842609470402j))*x[1]
        ref[(1, 3, 0, 0)]=(0.263890228291+0.113356406029j)*x_ref[0]**o + ((0.270166527324+0.188941528031j))*x_ref[0] + ((-0.203813027513-0.338815427008j))*x_ref[1]**o + ((-0.849559238982-0.842609470402j))*x_ref[1]
        arg[(1, 3, 0, 1)]=(0.885383645958+0.190036423042j)*x[0]**o + ((-0.829179450035+0.966500895015j))*x[0] + ((-0.518061229389-0.909094270642j))*x[1]**o + ((-0.521915671127-0.0896068180203j))*x[1]
        ref[(1, 3, 0, 1)]=(0.885383645958+0.190036423042j)*x_ref[0]**o + ((-0.829179450035+0.966500895015j))*x_ref[0] + ((-0.518061229389-0.909094270642j))*x_ref[1]**o + ((-0.521915671127-0.0896068180203j))*x_ref[1]
        arg[(1, 3, 1, 0)]=(0.157938037429+0.944019750407j)*x[0]**o + ((-0.299679147382-0.732110919197j))*x[0] + ((0.249623339374+0.42428267564j))*x[1]**o + ((-0.0221496646266+0.696834457917j))*x[1]
        ref[(1, 3, 1, 0)]=(0.157938037429+0.944019750407j)*x_ref[0]**o + ((-0.299679147382-0.732110919197j))*x_ref[0] + ((0.249623339374+0.42428267564j))*x_ref[1]**o + ((-0.0221496646266+0.696834457917j))*x_ref[1]
        arg[(1, 3, 1, 1)]=(-0.932178084032-0.355608863339j)*x[0]**o + ((-0.922042420142+0.247224905049j))*x[0] + ((0.224749437109-0.0111343023373j))*x[1]**o + ((-0.0977141997639-0.309649728073j))*x[1]
        ref[(1, 3, 1, 1)]=(-0.932178084032-0.355608863339j)*x_ref[0]**o + ((-0.922042420142+0.247224905049j))*x_ref[0] + ((0.224749437109-0.0111343023373j))*x_ref[1]**o + ((-0.0977141997639-0.309649728073j))*x_ref[1]
        arg[(1, 3, 2, 0)]=(0.365876088086-0.880839734565j)*x[0]**o + ((-0.781698174361-0.92761620064j))*x[0] + ((0.224058994611+0.149691219209j))*x[1]**o + ((0.324893422184+0.176650399876j))*x[1]
        ref[(1, 3, 2, 0)]=(0.365876088086-0.880839734565j)*x_ref[0]**o + ((-0.781698174361-0.92761620064j))*x_ref[0] + ((0.224058994611+0.149691219209j))*x_ref[1]**o + ((0.324893422184+0.176650399876j))*x_ref[1]
        arg[(1, 3, 2, 1)]=(0.306159674798-0.9821218932j)*x[0]**o + ((-0.694462902557-0.398881705968j))*x[0] + ((0.363824364164-0.708328208727j))*x[1]**o + ((-0.693892484249-0.337609321895j))*x[1]
        ref[(1, 3, 2, 1)]=(0.306159674798-0.9821218932j)*x_ref[0]**o + ((-0.694462902557-0.398881705968j))*x_ref[0] + ((0.363824364164-0.708328208727j))*x_ref[1]**o + ((-0.693892484249-0.337609321895j))*x_ref[1]
        arg[(1, 3, 3, 0)]=(0.224485838916-0.385368684093j)*x[0]**o + ((0.357907167586-0.0353312060739j))*x[0] + ((-0.254471121295-0.103873807489j))*x[1]**o + ((-0.616483378013-0.146901474167j))*x[1]
        ref[(1, 3, 3, 0)]=(0.224485838916-0.385368684093j)*x_ref[0]**o + ((0.357907167586-0.0353312060739j))*x_ref[0] + ((-0.254471121295-0.103873807489j))*x_ref[1]**o + ((-0.616483378013-0.146901474167j))*x_ref[1]
        arg[(1, 3, 3, 1)]=(0.866258925715-0.195682647847j)*x[0]**o + ((0.517179125792-0.500020717902j))*x[0] + ((0.763826868763+0.199217192633j))*x[1]**o + ((0.821479934276-0.036361612125j))*x[1]
        ref[(1, 3, 3, 1)]=(0.866258925715-0.195682647847j)*x_ref[0]**o + ((0.517179125792-0.500020717902j))*x_ref[0] + ((0.763826868763+0.199217192633j))*x_ref[1]**o + ((0.821479934276-0.036361612125j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.403176075699-0.179836477458j)*x[0]**o + ((0.459201927364-0.791698716119j))*x[0] + ((-0.337669083579-0.0445397718725j))*x[1]**o + ((0.629927280477-0.780495827882j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.403176075699-0.179836477458j)*x_ref[0]**o + ((0.459201927364-0.791698716119j))*x_ref[0] + ((-0.337669083579-0.0445397718725j))*x_ref[1]**o + ((0.629927280477-0.780495827882j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(-0.819044525064-0.468441188833j)*x[0]**o + ((-0.0633728614383+0.43716898306j))*x[0] + ((-0.358800830367-0.370954441723j))*x[1]**o + ((-0.625966365834+0.356169653929j))*x[1]
        ref[(2, 0, 0, 1)]=(-0.819044525064-0.468441188833j)*x_ref[0]**o + ((-0.0633728614383+0.43716898306j))*x_ref[0] + ((-0.358800830367-0.370954441723j))*x_ref[1]**o + ((-0.625966365834+0.356169653929j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(-0.112646711495-0.721801494795j)*x[0]**o + ((-0.268883140535+0.158536352419j))*x[0] + ((0.942920847201+0.0807722745252j))*x[1]**o + ((-0.0364757639846+0.890053467756j))*x[1]
        ref[(2, 0, 1, 0)]=(-0.112646711495-0.721801494795j)*x_ref[0]**o + ((-0.268883140535+0.158536352419j))*x_ref[0] + ((0.942920847201+0.0807722745252j))*x_ref[1]**o + ((-0.0364757639846+0.890053467756j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.241250578652+0.239803219139j)*x[0]**o + ((0.752313274425-0.195146891715j))*x[0] + ((-0.284676897257-0.109378129837j))*x[1]**o + ((0.519805227035-0.360809436201j))*x[1]
        ref[(2, 0, 1, 1)]=(0.241250578652+0.239803219139j)*x_ref[0]**o + ((0.752313274425-0.195146891715j))*x_ref[0] + ((-0.284676897257-0.109378129837j))*x_ref[1]**o + ((0.519805227035-0.360809436201j))*x_ref[1]
        arg[(2, 0, 2, 0)]=(0.248292782745-0.590022936532j)*x[0]**o + ((-0.522948699316-0.276991215667j))*x[0] + ((0.365412259157-0.497077734384j))*x[1]**o + ((-0.494620485457+0.54073080076j))*x[1]
        ref[(2, 0, 2, 0)]=(0.248292782745-0.590022936532j)*x_ref[0]**o + ((-0.522948699316-0.276991215667j))*x_ref[0] + ((0.365412259157-0.497077734384j))*x_ref[1]**o + ((-0.494620485457+0.54073080076j))*x_ref[1]
        arg[(2, 0, 2, 1)]=(-0.7914773726+0.362442054157j)*x[0]**o + ((-0.280441644824+0.168832246768j))*x[0] + ((0.794222574605+0.651575782093j))*x[1]**o + ((-0.348269697964-0.861209776399j))*x[1]
        ref[(2, 0, 2, 1)]=(-0.7914773726+0.362442054157j)*x_ref[0]**o + ((-0.280441644824+0.168832246768j))*x_ref[0] + ((0.794222574605+0.651575782093j))*x_ref[1]**o + ((-0.348269697964-0.861209776399j))*x_ref[1]
        arg[(2, 0, 3, 0)]=(0.103965821891+0.157143382691j)*x[0]**o + ((0.35603237522-0.961842422806j))*x[0] + ((0.193473932176-0.923564689964j))*x[1]**o + ((0.155540919702-0.0943127771702j))*x[1]
        ref[(2, 0, 3, 0)]=(0.103965821891+0.157143382691j)*x_ref[0]**o + ((0.35603237522-0.961842422806j))*x_ref[0] + ((0.193473932176-0.923564689964j))*x_ref[1]**o + ((0.155540919702-0.0943127771702j))*x_ref[1]
        arg[(2, 0, 3, 1)]=(0.989153080808+0.373555025746j)*x[0]**o + ((-0.344802648727-0.187500250214j))*x[0] + ((0.975394275785+0.00973471662663j))*x[1]**o + ((0.794943359772+0.401910695263j))*x[1]
        ref[(2, 0, 3, 1)]=(0.989153080808+0.373555025746j)*x_ref[0]**o + ((-0.344802648727-0.187500250214j))*x_ref[0] + ((0.975394275785+0.00973471662663j))*x_ref[1]**o + ((0.794943359772+0.401910695263j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(0.124669611845-0.284770160159j)*x[0]**o + ((0.505020553791-0.419281259008j))*x[0] + ((-0.429311259125-0.259479430793j))*x[1]**o + ((-0.259798973946-0.406969403393j))*x[1]
        ref[(2, 1, 0, 0)]=(0.124669611845-0.284770160159j)*x_ref[0]**o + ((0.505020553791-0.419281259008j))*x_ref[0] + ((-0.429311259125-0.259479430793j))*x_ref[1]**o + ((-0.259798973946-0.406969403393j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.263224760418-0.143330196935j)*x[0]**o + ((0.73209425493-0.602811955433j))*x[0] + ((-0.791109020748-0.684609036685j))*x[1]**o + ((0.820668165586+0.279022272663j))*x[1]
        ref[(2, 1, 0, 1)]=(0.263224760418-0.143330196935j)*x_ref[0]**o + ((0.73209425493-0.602811955433j))*x_ref[0] + ((-0.791109020748-0.684609036685j))*x_ref[1]**o + ((0.820668165586+0.279022272663j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(0.434812165789+0.969444538153j)*x[0]**o + ((0.811551603912-0.420625650171j))*x[0] + ((0.389719278436+0.913981408947j))*x[1]**o + ((0.102647038088-0.597682062604j))*x[1]
        ref[(2, 1, 1, 0)]=(0.434812165789+0.969444538153j)*x_ref[0]**o + ((0.811551603912-0.420625650171j))*x_ref[0] + ((0.389719278436+0.913981408947j))*x_ref[1]**o + ((0.102647038088-0.597682062604j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(-0.771789460052+0.417712228347j)*x[0]**o + ((-0.229751057959+0.871537001593j))*x[0] + ((-0.488692034635+0.00874545400657j))*x[1]**o + ((0.709679185728+0.665416356206j))*x[1]
        ref[(2, 1, 1, 1)]=(-0.771789460052+0.417712228347j)*x_ref[0]**o + ((-0.229751057959+0.871537001593j))*x_ref[0] + ((-0.488692034635+0.00874545400657j))*x_ref[1]**o + ((0.709679185728+0.665416356206j))*x_ref[1]
        arg[(2, 1, 2, 0)]=(0.454805291213-0.181810985983j)*x[0]**o + ((0.718224539818+0.451547856168j))*x[0] + ((-0.855370581641+0.0336004924084j))*x[1]**o + ((-0.653936338846+0.264721599543j))*x[1]
        ref[(2, 1, 2, 0)]=(0.454805291213-0.181810985983j)*x_ref[0]**o + ((0.718224539818+0.451547856168j))*x_ref[0] + ((-0.855370581641+0.0336004924084j))*x_ref[1]**o + ((-0.653936338846+0.264721599543j))*x_ref[1]
        arg[(2, 1, 2, 1)]=(-0.919760231039+0.503941241399j)*x[0]**o + ((-0.284302712964+0.520953134903j))*x[0] + ((0.435899425618-0.61725435579j))*x[1]**o + ((0.403094500772-0.542995904229j))*x[1]
        ref[(2, 1, 2, 1)]=(-0.919760231039+0.503941241399j)*x_ref[0]**o + ((-0.284302712964+0.520953134903j))*x_ref[0] + ((0.435899425618-0.61725435579j))*x_ref[1]**o + ((0.403094500772-0.542995904229j))*x_ref[1]
        arg[(2, 1, 3, 0)]=(0.0740040834857+0.208038997572j)*x[0]**o + ((-0.338677481366+0.175932647064j))*x[0] + ((-0.765754426393+0.702556164744j))*x[1]**o + ((-0.819718448639+0.771081203679j))*x[1]
        ref[(2, 1, 3, 0)]=(0.0740040834857+0.208038997572j)*x_ref[0]**o + ((-0.338677481366+0.175932647064j))*x_ref[0] + ((-0.765754426393+0.702556164744j))*x_ref[1]**o + ((-0.819718448639+0.771081203679j))*x_ref[1]
        arg[(2, 1, 3, 1)]=(0.645557614147+0.736501902329j)*x[0]**o + ((-0.617265084253+0.488989781925j))*x[0] + ((0.492556136569+0.774885795633j))*x[1]**o + ((0.331276173068+0.526034584075j))*x[1]
        ref[(2, 1, 3, 1)]=(0.645557614147+0.736501902329j)*x_ref[0]**o + ((-0.617265084253+0.488989781925j))*x_ref[0] + ((0.492556136569+0.774885795633j))*x_ref[1]**o + ((0.331276173068+0.526034584075j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(0.280538494234+0.376009365718j)*x[0]**o + ((-0.173686295543-0.141884434901j))*x[0] + ((0.658251252391+0.26928089658j))*x[1]**o + ((0.786777830133-0.035208965271j))*x[1]
        ref[(2, 2, 0, 0)]=(0.280538494234+0.376009365718j)*x_ref[0]**o + ((-0.173686295543-0.141884434901j))*x_ref[0] + ((0.658251252391+0.26928089658j))*x_ref[1]**o + ((0.786777830133-0.035208965271j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(0.508485936113-0.321655112756j)*x[0]**o + ((-0.143020453149+0.21334913981j))*x[0] + ((-0.358103565306+0.232755503586j))*x[1]**o + ((0.518005106913-0.938932254588j))*x[1]
        ref[(2, 2, 0, 1)]=(0.508485936113-0.321655112756j)*x_ref[0]**o + ((-0.143020453149+0.21334913981j))*x_ref[0] + ((-0.358103565306+0.232755503586j))*x_ref[1]**o + ((0.518005106913-0.938932254588j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(-0.158252425558-0.019022304468j)*x[0]**o + ((-0.582184426256+0.323346076596j))*x[0] + ((0.723529253832-0.123957175494j))*x[1]**o + ((-0.498245569367+0.595530107674j))*x[1]
        ref[(2, 2, 1, 0)]=(-0.158252425558-0.019022304468j)*x_ref[0]**o + ((-0.582184426256+0.323346076596j))*x_ref[0] + ((0.723529253832-0.123957175494j))*x_ref[1]**o + ((-0.498245569367+0.595530107674j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(-0.728461076003-0.350321185364j)*x[0]**o + ((-0.917273253266-0.284145218839j))*x[0] + ((0.22835531495+0.057864141299j))*x[1]**o + ((0.556564173398+0.939708030131j))*x[1]
        ref[(2, 2, 1, 1)]=(-0.728461076003-0.350321185364j)*x_ref[0]**o + ((-0.917273253266-0.284145218839j))*x_ref[0] + ((0.22835531495+0.057864141299j))*x_ref[1]**o + ((0.556564173398+0.939708030131j))*x_ref[1]
        arg[(2, 2, 2, 0)]=(0.724632220834+0.189904809606j)*x[0]**o + ((-0.0441110260416-0.739409232317j))*x[0] + ((0.395388817335+0.746784697415j))*x[1]**o + ((0.297329263674-0.422840929449j))*x[1]
        ref[(2, 2, 2, 0)]=(0.724632220834+0.189904809606j)*x_ref[0]**o + ((-0.0441110260416-0.739409232317j))*x_ref[0] + ((0.395388817335+0.746784697415j))*x_ref[1]**o + ((0.297329263674-0.422840929449j))*x_ref[1]
        arg[(2, 2, 2, 1)]=(0.976798926339+0.218522853945j)*x[0]**o + ((-0.539796056255-0.593765137753j))*x[0] + ((0.617734393618+0.839100099431j))*x[1]**o + ((0.053450682806-0.775885699736j))*x[1]
        ref[(2, 2, 2, 1)]=(0.976798926339+0.218522853945j)*x_ref[0]**o + ((-0.539796056255-0.593765137753j))*x_ref[0] + ((0.617734393618+0.839100099431j))*x_ref[1]**o + ((0.053450682806-0.775885699736j))*x_ref[1]
        arg[(2, 2, 3, 0)]=(-0.169556799217+0.193039463155j)*x[0]**o + ((0.000505849401474+0.0440529383951j))*x[0] + ((0.392437026969-0.0754322438314j))*x[1]**o + ((-0.588773562185+0.861684228199j))*x[1]
        ref[(2, 2, 3, 0)]=(-0.169556799217+0.193039463155j)*x_ref[0]**o + ((0.000505849401474+0.0440529383951j))*x_ref[0] + ((0.392437026969-0.0754322438314j))*x_ref[1]**o + ((-0.588773562185+0.861684228199j))*x_ref[1]
        arg[(2, 2, 3, 1)]=(0.344708327134+0.311984656914j)*x[0]**o + ((-0.0376264591039-0.0176522603388j))*x[0] + ((-0.414828391658-0.284526083029j))*x[1]**o + ((-0.8730163784-0.504561949535j))*x[1]
        ref[(2, 2, 3, 1)]=(0.344708327134+0.311984656914j)*x_ref[0]**o + ((-0.0376264591039-0.0176522603388j))*x_ref[0] + ((-0.414828391658-0.284526083029j))*x_ref[1]**o + ((-0.8730163784-0.504561949535j))*x_ref[1]
        arg[(2, 3, 0, 0)]=(0.687156020441-0.314082426937j)*x[0]**o + ((-0.473792637936-0.278179935966j))*x[0] + ((-0.598205498104+0.765626827194j))*x[1]**o + ((-0.369959227466+0.41795285294j))*x[1]
        ref[(2, 3, 0, 0)]=(0.687156020441-0.314082426937j)*x_ref[0]**o + ((-0.473792637936-0.278179935966j))*x_ref[0] + ((-0.598205498104+0.765626827194j))*x_ref[1]**o + ((-0.369959227466+0.41795285294j))*x_ref[1]
        arg[(2, 3, 0, 1)]=(-0.30388533315+0.646423120435j)*x[0]**o + ((0.963397512985+0.470923618519j))*x[0] + ((0.0725789515375+0.342926000138j))*x[1]**o + ((0.733852968491+0.34293045907j))*x[1]
        ref[(2, 3, 0, 1)]=(-0.30388533315+0.646423120435j)*x_ref[0]**o + ((0.963397512985+0.470923618519j))*x_ref[0] + ((0.0725789515375+0.342926000138j))*x_ref[1]**o + ((0.733852968491+0.34293045907j))*x_ref[1]
        arg[(2, 3, 1, 0)]=(0.648365786429-0.735551212402j)*x[0]**o + ((-0.161170582311+0.832489537493j))*x[0] + ((0.661319084056-0.539849599446j))*x[1]**o + ((-0.360227131614-0.652680613207j))*x[1]
        ref[(2, 3, 1, 0)]=(0.648365786429-0.735551212402j)*x_ref[0]**o + ((-0.161170582311+0.832489537493j))*x_ref[0] + ((0.661319084056-0.539849599446j))*x_ref[1]**o + ((-0.360227131614-0.652680613207j))*x_ref[1]
        arg[(2, 3, 1, 1)]=(-0.426135072361-0.952726654527j)*x[0]**o + ((0.163884073584+0.318425788503j))*x[0] + ((-0.618620385614+0.10225821695j))*x[1]**o + ((-0.0889452236251-0.978331621234j))*x[1]
        ref[(2, 3, 1, 1)]=(-0.426135072361-0.952726654527j)*x_ref[0]**o + ((0.163884073584+0.318425788503j))*x_ref[0] + ((-0.618620385614+0.10225821695j))*x_ref[1]**o + ((-0.0889452236251-0.978331621234j))*x_ref[1]
        arg[(2, 3, 2, 0)]=(-0.914501101498-0.257607827692j)*x[0]**o + ((-0.618323393932-0.544209734068j))*x[0] + ((-0.153487075931+0.410724636746j))*x[1]**o + ((0.116487296883-0.276869939089j))*x[1]
        ref[(2, 3, 2, 0)]=(-0.914501101498-0.257607827692j)*x_ref[0]**o + ((-0.618323393932-0.544209734068j))*x_ref[0] + ((-0.153487075931+0.410724636746j))*x_ref[1]**o + ((0.116487296883-0.276869939089j))*x_ref[1]
        arg[(2, 3, 2, 1)]=(0.985896877051+0.687953062199j)*x[0]**o + ((-0.926970643239-0.783584864547j))*x[0] + ((0.343743959608+0.878301127395j))*x[1]**o + ((0.889150885555+0.210102053229j))*x[1]
        ref[(2, 3, 2, 1)]=(0.985896877051+0.687953062199j)*x_ref[0]**o + ((-0.926970643239-0.783584864547j))*x_ref[0] + ((0.343743959608+0.878301127395j))*x_ref[1]**o + ((0.889150885555+0.210102053229j))*x_ref[1]
        arg[(2, 3, 3, 0)]=(0.429704929062+0.113121230034j)*x[0]**o + ((-0.0244570228801+0.473109189703j))*x[0] + ((0.818532434016-0.485796103857j))*x[1]**o + ((-0.257412717546-0.885951386694j))*x[1]
        ref[(2, 3, 3, 0)]=(0.429704929062+0.113121230034j)*x_ref[0]**o + ((-0.0244570228801+0.473109189703j))*x_ref[0] + ((0.818532434016-0.485796103857j))*x_ref[1]**o + ((-0.257412717546-0.885951386694j))*x_ref[1]
        arg[(2, 3, 3, 1)]=(-0.598895649264-0.236004997315j)*x[0]**o + ((0.769940549003-0.0166802435084j))*x[0] + ((-0.0284503012402+0.217360616602j))*x[1]**o + ((-0.0618356919666-0.507202585055j))*x[1]
        ref[(2, 3, 3, 1)]=(-0.598895649264-0.236004997315j)*x_ref[0]**o + ((0.769940549003-0.0166802435084j))*x_ref[0] + ((-0.0284503012402+0.217360616602j))*x_ref[1]**o + ((-0.0618356919666-0.507202585055j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.408559310452-0.221729503131j)*x[2]**o + ((0.592514684524-0.83125254703j))*x[2]
            ref[(0, 0, 0, 0)]+=(0.408559310452-0.221729503131j)*x_ref[2]**o + ((0.592514684524-0.83125254703j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.00664165936726-0.462419617762j)*x[2]**o + ((-0.409329128209+0.941338147603j))*x[2]
            ref[(0, 0, 0, 1)]+=(0.00664165936726-0.462419617762j)*x_ref[2]**o + ((-0.409329128209+0.941338147603j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.771499405243+0.0605684649068j)*x[2]**o + ((0.979044698029+0.938256563278j))*x[2]
            ref[(0, 0, 1, 0)]+=(0.771499405243+0.0605684649068j)*x_ref[2]**o + ((0.979044698029+0.938256563278j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.194081195634+0.13487950868j)*x[2]**o + ((0.754120929084-0.846431496775j))*x[2]
            ref[(0, 0, 1, 1)]+=(0.194081195634+0.13487950868j)*x_ref[2]**o + ((0.754120929084-0.846431496775j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(-0.301539501531-0.869630771739j)*x[2]**o + ((-0.818028293558+0.82060125004j))*x[2]
            ref[(0, 0, 2, 0)]+=(-0.301539501531-0.869630771739j)*x_ref[2]**o + ((-0.818028293558+0.82060125004j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(-0.529565037023-0.787132043206j)*x[2]**o + ((-0.968493450646-0.831063125689j))*x[2]
            ref[(0, 0, 2, 1)]+=(-0.529565037023-0.787132043206j)*x_ref[2]**o + ((-0.968493450646-0.831063125689j))*x_ref[2]
            arg[(0, 0, 3, 0)]+=(0.109189163223+0.23522713976j)*x[2]**o + ((0.579572968385-0.319334039434j))*x[2]
            ref[(0, 0, 3, 0)]+=(0.109189163223+0.23522713976j)*x_ref[2]**o + ((0.579572968385-0.319334039434j))*x_ref[2]
            arg[(0, 0, 3, 1)]+=(0.813546382511-0.980047115402j)*x[2]**o + ((-0.875623921143+0.209194056874j))*x[2]
            ref[(0, 0, 3, 1)]+=(0.813546382511-0.980047115402j)*x_ref[2]**o + ((-0.875623921143+0.209194056874j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.973286774115-0.879867280941j)*x[2]**o + ((0.689535936308+0.382662814135j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.973286774115-0.879867280941j)*x_ref[2]**o + ((0.689535936308+0.382662814135j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.468179685578-0.472102863783j)*x[2]**o + ((-0.90046278109+0.975043334221j))*x[2]
            ref[(0, 1, 0, 1)]+=(-0.468179685578-0.472102863783j)*x_ref[2]**o + ((-0.90046278109+0.975043334221j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.879625434967-0.74324881209j)*x[2]**o + ((0.810903747546-0.46636207636j))*x[2]
            ref[(0, 1, 1, 0)]+=(0.879625434967-0.74324881209j)*x_ref[2]**o + ((0.810903747546-0.46636207636j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.0498186397197+0.0572055871072j)*x[2]**o + ((0.768151481477-0.279014097972j))*x[2]
            ref[(0, 1, 1, 1)]+=(0.0498186397197+0.0572055871072j)*x_ref[2]**o + ((0.768151481477-0.279014097972j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(-0.707410530944+0.162774053504j)*x[2]**o + ((-0.529115647789+0.0855025181201j))*x[2]
            ref[(0, 1, 2, 0)]+=(-0.707410530944+0.162774053504j)*x_ref[2]**o + ((-0.529115647789+0.0855025181201j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(0.0951982549488+0.325040302441j)*x[2]**o + ((0.595231577859-0.283860045696j))*x[2]
            ref[(0, 1, 2, 1)]+=(0.0951982549488+0.325040302441j)*x_ref[2]**o + ((0.595231577859-0.283860045696j))*x_ref[2]
            arg[(0, 1, 3, 0)]+=(-0.574338385479-0.153527697666j)*x[2]**o + ((-0.323817138294-0.63252283962j))*x[2]
            ref[(0, 1, 3, 0)]+=(-0.574338385479-0.153527697666j)*x_ref[2]**o + ((-0.323817138294-0.63252283962j))*x_ref[2]
            arg[(0, 1, 3, 1)]+=(0.291471361149-0.468387226514j)*x[2]**o + ((-0.337859578604+0.877723776257j))*x[2]
            ref[(0, 1, 3, 1)]+=(0.291471361149-0.468387226514j)*x_ref[2]**o + ((-0.337859578604+0.877723776257j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(-0.200235100274+0.544045393899j)*x[2]**o + ((-0.934956152572+0.576906666672j))*x[2]
            ref[(0, 2, 0, 0)]+=(-0.200235100274+0.544045393899j)*x_ref[2]**o + ((-0.934956152572+0.576906666672j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(-0.470089553651+0.555235546956j)*x[2]**o + ((-0.126549096377+0.329631896091j))*x[2]
            ref[(0, 2, 0, 1)]+=(-0.470089553651+0.555235546956j)*x_ref[2]**o + ((-0.126549096377+0.329631896091j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.306350706057+0.224101306029j)*x[2]**o + ((-0.345842420847+0.650944829267j))*x[2]
            ref[(0, 2, 1, 0)]+=(-0.306350706057+0.224101306029j)*x_ref[2]**o + ((-0.345842420847+0.650944829267j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(0.989862722216-0.110086011765j)*x[2]**o + ((-0.143008373337-0.697103774889j))*x[2]
            ref[(0, 2, 1, 1)]+=(0.989862722216-0.110086011765j)*x_ref[2]**o + ((-0.143008373337-0.697103774889j))*x_ref[2]
            arg[(0, 2, 2, 0)]+=(-0.860610649261+0.474598449974j)*x[2]**o + ((0.765775563819+0.158510996763j))*x[2]
            ref[(0, 2, 2, 0)]+=(-0.860610649261+0.474598449974j)*x_ref[2]**o + ((0.765775563819+0.158510996763j))*x_ref[2]
            arg[(0, 2, 2, 1)]+=(0.958728858078+0.560684510001j)*x[2]**o + ((0.441454961943+0.847156420395j))*x[2]
            ref[(0, 2, 2, 1)]+=(0.958728858078+0.560684510001j)*x_ref[2]**o + ((0.441454961943+0.847156420395j))*x_ref[2]
            arg[(0, 2, 3, 0)]+=(0.0712330137071-0.33021166924j)*x[2]**o + ((-0.468358840913-0.461051842377j))*x[2]
            ref[(0, 2, 3, 0)]+=(0.0712330137071-0.33021166924j)*x_ref[2]**o + ((-0.468358840913-0.461051842377j))*x_ref[2]
            arg[(0, 2, 3, 1)]+=(0.9351225934+0.0911930231444j)*x[2]**o + ((0.491709851872-0.643769324947j))*x[2]
            ref[(0, 2, 3, 1)]+=(0.9351225934+0.0911930231444j)*x_ref[2]**o + ((0.491709851872-0.643769324947j))*x_ref[2]
            arg[(0, 3, 0, 0)]+=(-0.151412689544+0.701757415934j)*x[2]**o + ((0.0103177611782-0.526855048856j))*x[2]
            ref[(0, 3, 0, 0)]+=(-0.151412689544+0.701757415934j)*x_ref[2]**o + ((0.0103177611782-0.526855048856j))*x_ref[2]
            arg[(0, 3, 0, 1)]+=(-0.109914291645+0.850133327284j)*x[2]**o + ((-0.131199502664+0.622812784185j))*x[2]
            ref[(0, 3, 0, 1)]+=(-0.109914291645+0.850133327284j)*x_ref[2]**o + ((-0.131199502664+0.622812784185j))*x_ref[2]
            arg[(0, 3, 1, 0)]+=(0.839503985249-0.438761466719j)*x[2]**o + ((0.902260230753+0.0498775468819j))*x[2]
            ref[(0, 3, 1, 0)]+=(0.839503985249-0.438761466719j)*x_ref[2]**o + ((0.902260230753+0.0498775468819j))*x_ref[2]
            arg[(0, 3, 1, 1)]+=(0.436281141907-0.322345683275j)*x[2]**o + ((0.475492563809-0.689265196589j))*x[2]
            ref[(0, 3, 1, 1)]+=(0.436281141907-0.322345683275j)*x_ref[2]**o + ((0.475492563809-0.689265196589j))*x_ref[2]
            arg[(0, 3, 2, 0)]+=(0.685148042852+0.106549853422j)*x[2]**o + ((0.441384429172-0.0741508941117j))*x[2]
            ref[(0, 3, 2, 0)]+=(0.685148042852+0.106549853422j)*x_ref[2]**o + ((0.441384429172-0.0741508941117j))*x_ref[2]
            arg[(0, 3, 2, 1)]+=(-0.610086338577-0.275484781008j)*x[2]**o + ((0.180890402261+0.575443048709j))*x[2]
            ref[(0, 3, 2, 1)]+=(-0.610086338577-0.275484781008j)*x_ref[2]**o + ((0.180890402261+0.575443048709j))*x_ref[2]
            arg[(0, 3, 3, 0)]+=(-0.597854157788+0.350933258913j)*x[2]**o + ((-0.553146950952-0.866143177757j))*x[2]
            ref[(0, 3, 3, 0)]+=(-0.597854157788+0.350933258913j)*x_ref[2]**o + ((-0.553146950952-0.866143177757j))*x_ref[2]
            arg[(0, 3, 3, 1)]+=(0.958867844761-0.593870980519j)*x[2]**o + ((-0.573005032011+0.256298036156j))*x[2]
            ref[(0, 3, 3, 1)]+=(0.958867844761-0.593870980519j)*x_ref[2]**o + ((-0.573005032011+0.256298036156j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.891319256648+0.164247431737j)*x[2]**o + ((0.468871188601-0.207756470968j))*x[2]
            ref[(1, 0, 0, 0)]+=(0.891319256648+0.164247431737j)*x_ref[2]**o + ((0.468871188601-0.207756470968j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(-0.588451694358-0.86033465628j)*x[2]**o + ((0.602353530679+0.892861782363j))*x[2]
            ref[(1, 0, 0, 1)]+=(-0.588451694358-0.86033465628j)*x_ref[2]**o + ((0.602353530679+0.892861782363j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.591425529597+0.574898936453j)*x[2]**o + ((0.681842382595+0.485813895695j))*x[2]
            ref[(1, 0, 1, 0)]+=(-0.591425529597+0.574898936453j)*x_ref[2]**o + ((0.681842382595+0.485813895695j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.627401683324+0.408478972437j)*x[2]**o + ((-0.357826843154-0.414048910614j))*x[2]
            ref[(1, 0, 1, 1)]+=(-0.627401683324+0.408478972437j)*x_ref[2]**o + ((-0.357826843154-0.414048910614j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(0.794302854192+0.494585075548j)*x[2]**o + ((0.225893736263+0.287133476133j))*x[2]
            ref[(1, 0, 2, 0)]+=(0.794302854192+0.494585075548j)*x_ref[2]**o + ((0.225893736263+0.287133476133j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(-0.263693475-0.226311680281j)*x[2]**o + ((0.976782500767+0.627207776896j))*x[2]
            ref[(1, 0, 2, 1)]+=(-0.263693475-0.226311680281j)*x_ref[2]**o + ((0.976782500767+0.627207776896j))*x_ref[2]
            arg[(1, 0, 3, 0)]+=(-0.980014905804+0.195636160161j)*x[2]**o + ((-0.835419051419-0.784933747673j))*x[2]
            ref[(1, 0, 3, 0)]+=(-0.980014905804+0.195636160161j)*x_ref[2]**o + ((-0.835419051419-0.784933747673j))*x_ref[2]
            arg[(1, 0, 3, 1)]+=(0.936401755738+0.425951514201j)*x[2]**o + ((-0.392095753436+0.0381892727387j))*x[2]
            ref[(1, 0, 3, 1)]+=(0.936401755738+0.425951514201j)*x_ref[2]**o + ((-0.392095753436+0.0381892727387j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.42434739782+0.830693501106j)*x[2]**o + ((0.324375943813+0.958735530439j))*x[2]
            ref[(1, 1, 0, 0)]+=(-0.42434739782+0.830693501106j)*x_ref[2]**o + ((0.324375943813+0.958735530439j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.729526589954+0.924976549783j)*x[2]**o + ((-0.323711517683-0.0807976216509j))*x[2]
            ref[(1, 1, 0, 1)]+=(0.729526589954+0.924976549783j)*x_ref[2]**o + ((-0.323711517683-0.0807976216509j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(-0.0530514868463-0.791908008778j)*x[2]**o + ((-0.0698709379927-0.316716305921j))*x[2]
            ref[(1, 1, 1, 0)]+=(-0.0530514868463-0.791908008778j)*x_ref[2]**o + ((-0.0698709379927-0.316716305921j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.57340206509-0.907844425863j)*x[2]**o + ((0.989968698075+0.363355773412j))*x[2]
            ref[(1, 1, 1, 1)]+=(-0.57340206509-0.907844425863j)*x_ref[2]**o + ((0.989968698075+0.363355773412j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(0.998069676893-0.75392987828j)*x[2]**o + ((-0.318552346857-0.138255098332j))*x[2]
            ref[(1, 1, 2, 0)]+=(0.998069676893-0.75392987828j)*x_ref[2]**o + ((-0.318552346857-0.138255098332j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(-0.16881042485-0.756093789448j)*x[2]**o + ((0.445329180364-0.953407867104j))*x[2]
            ref[(1, 1, 2, 1)]+=(-0.16881042485-0.756093789448j)*x_ref[2]**o + ((0.445329180364-0.953407867104j))*x_ref[2]
            arg[(1, 1, 3, 0)]+=(-0.519912848702-0.824399348472j)*x[2]**o + ((-0.548473689517+0.51990921855j))*x[2]
            ref[(1, 1, 3, 0)]+=(-0.519912848702-0.824399348472j)*x_ref[2]**o + ((-0.548473689517+0.51990921855j))*x_ref[2]
            arg[(1, 1, 3, 1)]+=(-0.408074097604+0.181839349773j)*x[2]**o + ((0.37357844919+0.722490264859j))*x[2]
            ref[(1, 1, 3, 1)]+=(-0.408074097604+0.181839349773j)*x_ref[2]**o + ((0.37357844919+0.722490264859j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(-0.858676906887-0.64940937025j)*x[2]**o + ((-0.20616672558-0.0506555049431j))*x[2]
            ref[(1, 2, 0, 0)]+=(-0.858676906887-0.64940937025j)*x_ref[2]**o + ((-0.20616672558-0.0506555049431j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(0.584520609626-0.65887758803j)*x[2]**o + ((0.936963986582+0.759738169884j))*x[2]
            ref[(1, 2, 0, 1)]+=(0.584520609626-0.65887758803j)*x_ref[2]**o + ((0.936963986582+0.759738169884j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(0.937889097057+0.753729352031j)*x[2]**o + ((-0.461214920733-0.190261931482j))*x[2]
            ref[(1, 2, 1, 0)]+=(0.937889097057+0.753729352031j)*x_ref[2]**o + ((-0.461214920733-0.190261931482j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(0.165519961113-0.820987795718j)*x[2]**o + ((0.173423159842+0.633793500017j))*x[2]
            ref[(1, 2, 1, 1)]+=(0.165519961113-0.820987795718j)*x_ref[2]**o + ((0.173423159842+0.633793500017j))*x_ref[2]
            arg[(1, 2, 2, 0)]+=(-0.838298224612-0.897016401237j)*x[2]**o + ((0.899098224742-0.226089868769j))*x[2]
            ref[(1, 2, 2, 0)]+=(-0.838298224612-0.897016401237j)*x_ref[2]**o + ((0.899098224742-0.226089868769j))*x_ref[2]
            arg[(1, 2, 2, 1)]+=(0.151360957619-0.185417315473j)*x[2]**o + ((-0.72067748882+0.212430778865j))*x[2]
            ref[(1, 2, 2, 1)]+=(0.151360957619-0.185417315473j)*x_ref[2]**o + ((-0.72067748882+0.212430778865j))*x_ref[2]
            arg[(1, 2, 3, 0)]+=(-0.633126555497-0.0863591829845j)*x[2]**o + ((-0.735778447718+0.51751550719j))*x[2]
            ref[(1, 2, 3, 0)]+=(-0.633126555497-0.0863591829845j)*x_ref[2]**o + ((-0.735778447718+0.51751550719j))*x_ref[2]
            arg[(1, 2, 3, 1)]+=(0.465669071806-0.378209454081j)*x[2]**o + ((-0.366068241894+0.230468827835j))*x[2]
            ref[(1, 2, 3, 1)]+=(0.465669071806-0.378209454081j)*x_ref[2]**o + ((-0.366068241894+0.230468827835j))*x_ref[2]
            arg[(1, 3, 0, 0)]+=(-0.122580017846-0.518823234259j)*x[2]**o + ((-0.744251504897+0.761274784589j))*x[2]
            ref[(1, 3, 0, 0)]+=(-0.122580017846-0.518823234259j)*x_ref[2]**o + ((-0.744251504897+0.761274784589j))*x_ref[2]
            arg[(1, 3, 0, 1)]+=(-0.415861911311+0.423074198789j)*x[2]**o + ((-0.480703707868-0.558649421462j))*x[2]
            ref[(1, 3, 0, 1)]+=(-0.415861911311+0.423074198789j)*x_ref[2]**o + ((-0.480703707868-0.558649421462j))*x_ref[2]
            arg[(1, 3, 1, 0)]+=(-0.872498583+0.0164956870932j)*x[2]**o + ((-0.139220160885-0.0800023836341j))*x[2]
            ref[(1, 3, 1, 0)]+=(-0.872498583+0.0164956870932j)*x_ref[2]**o + ((-0.139220160885-0.0800023836341j))*x_ref[2]
            arg[(1, 3, 1, 1)]+=(-0.863330546156-0.377286514909j)*x[2]**o + ((-0.435327641359-0.439007577418j))*x[2]
            ref[(1, 3, 1, 1)]+=(-0.863330546156-0.377286514909j)*x_ref[2]**o + ((-0.435327641359-0.439007577418j))*x_ref[2]
            arg[(1, 3, 2, 0)]+=(0.955871836147-0.156296929174j)*x[2]**o + ((-0.940687034619-0.592062859245j))*x[2]
            ref[(1, 3, 2, 0)]+=(0.955871836147-0.156296929174j)*x_ref[2]**o + ((-0.940687034619-0.592062859245j))*x_ref[2]
            arg[(1, 3, 2, 1)]+=(-0.887574577461+0.433793961499j)*x[2]**o + ((-0.508286849641-0.589947052684j))*x[2]
            ref[(1, 3, 2, 1)]+=(-0.887574577461+0.433793961499j)*x_ref[2]**o + ((-0.508286849641-0.589947052684j))*x_ref[2]
            arg[(1, 3, 3, 0)]+=(0.337639064119-0.787306385033j)*x[2]**o + ((0.104301253169+0.0234712721252j))*x[2]
            ref[(1, 3, 3, 0)]+=(0.337639064119-0.787306385033j)*x_ref[2]**o + ((0.104301253169+0.0234712721252j))*x_ref[2]
            arg[(1, 3, 3, 1)]+=(-0.909115884014-0.935417002928j)*x[2]**o + ((0.824703731638-0.995085507982j))*x[2]
            ref[(1, 3, 3, 1)]+=(-0.909115884014-0.935417002928j)*x_ref[2]**o + ((0.824703731638-0.995085507982j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(-0.706805901669+0.986347371498j)*x[2]**o + ((0.0243030167257+0.65308784199j))*x[2]
            ref[(2, 0, 0, 0)]+=(-0.706805901669+0.986347371498j)*x_ref[2]**o + ((0.0243030167257+0.65308784199j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(0.748994053421-0.271257352285j)*x[2]**o + ((-0.77152580539+0.746836746208j))*x[2]
            ref[(2, 0, 0, 1)]+=(0.748994053421-0.271257352285j)*x_ref[2]**o + ((-0.77152580539+0.746836746208j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(0.808420559053+0.262697537357j)*x[2]**o + ((-0.787066202483+0.105599019791j))*x[2]
            ref[(2, 0, 1, 0)]+=(0.808420559053+0.262697537357j)*x_ref[2]**o + ((-0.787066202483+0.105599019791j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(-0.415798255805+0.619624916906j)*x[2]**o + ((-0.413187726415-0.470902944661j))*x[2]
            ref[(2, 0, 1, 1)]+=(-0.415798255805+0.619624916906j)*x_ref[2]**o + ((-0.413187726415-0.470902944661j))*x_ref[2]
            arg[(2, 0, 2, 0)]+=(-0.0920419055212-0.239917295386j)*x[2]**o + ((0.614204522975+0.117705998779j))*x[2]
            ref[(2, 0, 2, 0)]+=(-0.0920419055212-0.239917295386j)*x_ref[2]**o + ((0.614204522975+0.117705998779j))*x_ref[2]
            arg[(2, 0, 2, 1)]+=(-0.428553037907-0.936796956339j)*x[2]**o + ((-0.945533208442+0.0693101058177j))*x[2]
            ref[(2, 0, 2, 1)]+=(-0.428553037907-0.936796956339j)*x_ref[2]**o + ((-0.945533208442+0.0693101058177j))*x_ref[2]
            arg[(2, 0, 3, 0)]+=(-0.00775297304775-0.426686256503j)*x[2]**o + ((-0.744664212102-0.784800043817j))*x[2]
            ref[(2, 0, 3, 0)]+=(-0.00775297304775-0.426686256503j)*x_ref[2]**o + ((-0.744664212102-0.784800043817j))*x_ref[2]
            arg[(2, 0, 3, 1)]+=(-0.5927864626-0.953330462316j)*x[2]**o + ((-0.159885703467+0.591543378714j))*x[2]
            ref[(2, 0, 3, 1)]+=(-0.5927864626-0.953330462316j)*x_ref[2]**o + ((-0.159885703467+0.591543378714j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(-0.911343298037-0.396202829253j)*x[2]**o + ((0.238620174737+0.069749463802j))*x[2]
            ref[(2, 1, 0, 0)]+=(-0.911343298037-0.396202829253j)*x_ref[2]**o + ((0.238620174737+0.069749463802j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(0.102945409324+0.509815402875j)*x[2]**o + ((0.622640451557+0.79348853352j))*x[2]
            ref[(2, 1, 0, 1)]+=(0.102945409324+0.509815402875j)*x_ref[2]**o + ((0.622640451557+0.79348853352j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(-0.963858738007-0.567634057582j)*x[2]**o + ((0.816355399508-0.0596714231954j))*x[2]
            ref[(2, 1, 1, 0)]+=(-0.963858738007-0.567634057582j)*x_ref[2]**o + ((0.816355399508-0.0596714231954j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(-0.294650353107+0.217731577802j)*x[2]**o + ((0.722229738454-0.353664010367j))*x[2]
            ref[(2, 1, 1, 1)]+=(-0.294650353107+0.217731577802j)*x_ref[2]**o + ((0.722229738454-0.353664010367j))*x_ref[2]
            arg[(2, 1, 2, 0)]+=(-0.761993741625-0.539976307136j)*x[2]**o + ((0.290066831639+0.0395400795491j))*x[2]
            ref[(2, 1, 2, 0)]+=(-0.761993741625-0.539976307136j)*x_ref[2]**o + ((0.290066831639+0.0395400795491j))*x_ref[2]
            arg[(2, 1, 2, 1)]+=(-0.978280504114+0.536212307348j)*x[2]**o + ((-0.868973271676-0.849836030911j))*x[2]
            ref[(2, 1, 2, 1)]+=(-0.978280504114+0.536212307348j)*x_ref[2]**o + ((-0.868973271676-0.849836030911j))*x_ref[2]
            arg[(2, 1, 3, 0)]+=(0.736962454555+0.216822177911j)*x[2]**o + ((0.234080977698+0.381575396585j))*x[2]
            ref[(2, 1, 3, 0)]+=(0.736962454555+0.216822177911j)*x_ref[2]**o + ((0.234080977698+0.381575396585j))*x_ref[2]
            arg[(2, 1, 3, 1)]+=(0.899178222699-0.105647200714j)*x[2]**o + ((-0.667468607904-0.21310027395j))*x[2]
            ref[(2, 1, 3, 1)]+=(0.899178222699-0.105647200714j)*x_ref[2]**o + ((-0.667468607904-0.21310027395j))*x_ref[2]
            arg[(2, 2, 0, 0)]+=(-0.027736349026-0.56800947405j)*x[2]**o + ((-0.234429996406-0.943131568971j))*x[2]
            ref[(2, 2, 0, 0)]+=(-0.027736349026-0.56800947405j)*x_ref[2]**o + ((-0.234429996406-0.943131568971j))*x_ref[2]
            arg[(2, 2, 0, 1)]+=(-0.458390129526+0.241783588481j)*x[2]**o + ((-0.43098771893+0.150647658078j))*x[2]
            ref[(2, 2, 0, 1)]+=(-0.458390129526+0.241783588481j)*x_ref[2]**o + ((-0.43098771893+0.150647658078j))*x_ref[2]
            arg[(2, 2, 1, 0)]+=(0.405307877422-0.262850143567j)*x[2]**o + ((0.172221621948-0.453076427694j))*x[2]
            ref[(2, 2, 1, 0)]+=(0.405307877422-0.262850143567j)*x_ref[2]**o + ((0.172221621948-0.453076427694j))*x_ref[2]
            arg[(2, 2, 1, 1)]+=(0.796275574493+0.0875111297685j)*x[2]**o + ((0.0605513417936+0.138903943584j))*x[2]
            ref[(2, 2, 1, 1)]+=(0.796275574493+0.0875111297685j)*x_ref[2]**o + ((0.0605513417936+0.138903943584j))*x_ref[2]
            arg[(2, 2, 2, 0)]+=(-0.979856986172-0.0991591642737j)*x[2]**o + ((-0.856434243478-0.40913640307j))*x[2]
            ref[(2, 2, 2, 0)]+=(-0.979856986172-0.0991591642737j)*x_ref[2]**o + ((-0.856434243478-0.40913640307j))*x_ref[2]
            arg[(2, 2, 2, 1)]+=(0.100905708678-0.980705441503j)*x[2]**o + ((-0.615150541186-0.393387138809j))*x[2]
            ref[(2, 2, 2, 1)]+=(0.100905708678-0.980705441503j)*x_ref[2]**o + ((-0.615150541186-0.393387138809j))*x_ref[2]
            arg[(2, 2, 3, 0)]+=(-0.56422203185+0.694703898954j)*x[2]**o + ((-0.650248751673+0.544000646001j))*x[2]
            ref[(2, 2, 3, 0)]+=(-0.56422203185+0.694703898954j)*x_ref[2]**o + ((-0.650248751673+0.544000646001j))*x_ref[2]
            arg[(2, 2, 3, 1)]+=(-0.0830038859898+0.492651900867j)*x[2]**o + ((0.115947209767+0.148844929754j))*x[2]
            ref[(2, 2, 3, 1)]+=(-0.0830038859898+0.492651900867j)*x_ref[2]**o + ((0.115947209767+0.148844929754j))*x_ref[2]
            arg[(2, 3, 0, 0)]+=(-0.52431946881+0.68456580751j)*x[2]**o + ((0.218972017644-0.0940454689541j))*x[2]
            ref[(2, 3, 0, 0)]+=(-0.52431946881+0.68456580751j)*x_ref[2]**o + ((0.218972017644-0.0940454689541j))*x_ref[2]
            arg[(2, 3, 0, 1)]+=(0.727959417493-0.986080308827j)*x[2]**o + ((0.689746052457-0.850860731478j))*x[2]
            ref[(2, 3, 0, 1)]+=(0.727959417493-0.986080308827j)*x_ref[2]**o + ((0.689746052457-0.850860731478j))*x_ref[2]
            arg[(2, 3, 1, 0)]+=(-0.175599409028+0.129883343756j)*x[2]**o + ((-0.0434955096114+0.91558976269j))*x[2]
            ref[(2, 3, 1, 0)]+=(-0.175599409028+0.129883343756j)*x_ref[2]**o + ((-0.0434955096114+0.91558976269j))*x_ref[2]
            arg[(2, 3, 1, 1)]+=(0.201696540934+0.528849002879j)*x[2]**o + ((-0.713548275962+0.646647145962j))*x[2]
            ref[(2, 3, 1, 1)]+=(0.201696540934+0.528849002879j)*x_ref[2]**o + ((-0.713548275962+0.646647145962j))*x_ref[2]
            arg[(2, 3, 2, 0)]+=(-0.87571230919+0.960595023825j)*x[2]**o + ((-0.941762764498+0.800283296163j))*x[2]
            ref[(2, 3, 2, 0)]+=(-0.87571230919+0.960595023825j)*x_ref[2]**o + ((-0.941762764498+0.800283296163j))*x_ref[2]
            arg[(2, 3, 2, 1)]+=(-0.963864041962+0.899331449658j)*x[2]**o + ((0.207600403466+0.735216435197j))*x[2]
            ref[(2, 3, 2, 1)]+=(-0.963864041962+0.899331449658j)*x_ref[2]**o + ((0.207600403466+0.735216435197j))*x_ref[2]
            arg[(2, 3, 3, 0)]+=(0.730377454324+0.734328328983j)*x[2]**o + ((-0.866462745793-0.104998676833j))*x[2]
            ref[(2, 3, 3, 0)]+=(0.730377454324+0.734328328983j)*x_ref[2]**o + ((-0.866462745793-0.104998676833j))*x_ref[2]
            arg[(2, 3, 3, 1)]+=(-0.291614803044-0.231301515854j)*x[2]**o + ((-0.250208102366-0.544249158933j))*x[2]
            ref[(2, 3, 3, 1)]+=(-0.291614803044-0.231301515854j)*x_ref[2]**o + ((-0.250208102366-0.544249158933j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_ReducedSolution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedSolution

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.252594481228-0.330268790107j)*x[0] + ((-0.898835061938-0.378161800429j))*x[1]
        ref=(-0.252594481228-0.330268790107j)*x_ref[0] + ((-0.898835061938-0.378161800429j))*x_ref[1]
        if dim==3:
            arg+=((0.748979106704+0.942271747849j))*x[2]
            ref+=((0.748979106704+0.942271747849j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_ReducedSolution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedSolution

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=(-0.869757995526+0.220825764247j)*x[0] + ((-0.055216825879-0.94268314416j))*x[1]
        ref[(0,)]=(-0.869757995526+0.220825764247j)*x_ref[0] + ((-0.055216825879-0.94268314416j))*x_ref[1]
        arg[(1,)]=(-0.439561836947+0.339910884019j)*x[0] + ((-0.873360236832-0.0337938334476j))*x[1]
        ref[(1,)]=(-0.439561836947+0.339910884019j)*x_ref[0] + ((-0.873360236832-0.0337938334476j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.0678465885803-0.251986567959j)*x[2]
            ref[(0,)]+=(0.0678465885803-0.251986567959j)*x_ref[2]
            arg[(1,)]+=(-0.637547112335-0.0398986072175j)*x[2]
            ref[(1,)]+=(-0.637547112335-0.0398986072175j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_ReducedSolution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedSolution

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref = Data(0,(2, 3),w_ref)
        arg[(0, 0)]=(-0.460278561756+0.962835705913j)*x[0] + ((-0.76674655381+0.961124210073j))*x[1]
        ref[(0, 0)]=(-0.460278561756+0.962835705913j)*x_ref[0] + ((-0.76674655381+0.961124210073j))*x_ref[1]
        arg[(0, 1)]=(0.050240702506+0.53855508394j)*x[0] + ((-0.691742580541+0.892148482701j))*x[1]
        ref[(0, 1)]=(0.050240702506+0.53855508394j)*x_ref[0] + ((-0.691742580541+0.892148482701j))*x_ref[1]
        arg[(0, 2)]=(-0.266040173899+0.0227831277489j)*x[0] + ((-0.410505924723+0.382894595299j))*x[1]
        ref[(0, 2)]=(-0.266040173899+0.0227831277489j)*x_ref[0] + ((-0.410505924723+0.382894595299j))*x_ref[1]
        arg[(1, 0)]=(0.226071305135-0.595803340974j)*x[0] + ((0.256469623116-0.062572414581j))*x[1]
        ref[(1, 0)]=(0.226071305135-0.595803340974j)*x_ref[0] + ((0.256469623116-0.062572414581j))*x_ref[1]
        arg[(1, 1)]=(-0.932348437525+0.628432922197j)*x[0] + ((0.502592283961-0.33891678006j))*x[1]
        ref[(1, 1)]=(-0.932348437525+0.628432922197j)*x_ref[0] + ((0.502592283961-0.33891678006j))*x_ref[1]
        arg[(1, 2)]=(0.754931004184-0.166530877137j)*x[0] + ((-0.683037775277-0.303950717851j))*x[1]
        ref[(1, 2)]=(0.754931004184-0.166530877137j)*x_ref[0] + ((-0.683037775277-0.303950717851j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(-0.00141526908888+0.634408828542j)*x[2]
            ref[(0, 0)]+=(-0.00141526908888+0.634408828542j)*x_ref[2]
            arg[(0, 1)]+=(0.322526847518+0.0841300788134j)*x[2]
            ref[(0, 1)]+=(0.322526847518+0.0841300788134j)*x_ref[2]
            arg[(0, 2)]+=(0.812552022652+0.769708096254j)*x[2]
            ref[(0, 2)]+=(0.812552022652+0.769708096254j)*x_ref[2]
            arg[(1, 0)]+=(0.567835100156-0.201698387377j)*x[2]
            ref[(1, 0)]+=(0.567835100156-0.201698387377j)*x_ref[2]
            arg[(1, 1)]+=(0.750551598102+0.448365286387j)*x[2]
            ref[(1, 1)]+=(0.750551598102+0.448365286387j)*x_ref[2]
            arg[(1, 2)]+=(-0.649498093429-0.977006014932j)*x[2]
            ref[(1, 2)]+=(-0.649498093429-0.977006014932j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_ReducedSolution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedSolution

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 4),w)
        ref = Data(0,(3, 4, 4),w_ref)
        arg[(0, 0, 0)]=(-0.316977965054+0.374349028992j)*x[0] + ((-0.167654859387+0.879497284149j))*x[1]
        ref[(0, 0, 0)]=(-0.316977965054+0.374349028992j)*x_ref[0] + ((-0.167654859387+0.879497284149j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.378196192327+0.915746947366j)*x[0] + ((0.427690495771+0.583798343697j))*x[1]
        ref[(0, 0, 1)]=(-0.378196192327+0.915746947366j)*x_ref[0] + ((0.427690495771+0.583798343697j))*x_ref[1]
        arg[(0, 0, 2)]=(-0.696530566519-0.793176039937j)*x[0] + ((-0.039881918339-0.806098015115j))*x[1]
        ref[(0, 0, 2)]=(-0.696530566519-0.793176039937j)*x_ref[0] + ((-0.039881918339-0.806098015115j))*x_ref[1]
        arg[(0, 0, 3)]=(0.488541784894+0.377207660172j)*x[0] + ((-0.164553336285-0.852650281686j))*x[1]
        ref[(0, 0, 3)]=(0.488541784894+0.377207660172j)*x_ref[0] + ((-0.164553336285-0.852650281686j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.567110408994+0.167688567138j)*x[0] + ((0.760875748289+0.595740934589j))*x[1]
        ref[(0, 1, 0)]=(-0.567110408994+0.167688567138j)*x_ref[0] + ((0.760875748289+0.595740934589j))*x_ref[1]
        arg[(0, 1, 1)]=(0.435983241092-0.712591381577j)*x[0] + ((0.905946668376-0.444258812817j))*x[1]
        ref[(0, 1, 1)]=(0.435983241092-0.712591381577j)*x_ref[0] + ((0.905946668376-0.444258812817j))*x_ref[1]
        arg[(0, 1, 2)]=(0.479923980436+0.742366107807j)*x[0] + ((0.82368211267-0.423868666974j))*x[1]
        ref[(0, 1, 2)]=(0.479923980436+0.742366107807j)*x_ref[0] + ((0.82368211267-0.423868666974j))*x_ref[1]
        arg[(0, 1, 3)]=(-0.461930490998+0.906519851746j)*x[0] + ((0.376871491693-0.266926657706j))*x[1]
        ref[(0, 1, 3)]=(-0.461930490998+0.906519851746j)*x_ref[0] + ((0.376871491693-0.266926657706j))*x_ref[1]
        arg[(0, 2, 0)]=(0.076162418047+0.552242399421j)*x[0] + ((0.879968668334-0.397338009669j))*x[1]
        ref[(0, 2, 0)]=(0.076162418047+0.552242399421j)*x_ref[0] + ((0.879968668334-0.397338009669j))*x_ref[1]
        arg[(0, 2, 1)]=(0.0186027355651+0.450864961158j)*x[0] + ((0.169511248825-0.976180896489j))*x[1]
        ref[(0, 2, 1)]=(0.0186027355651+0.450864961158j)*x_ref[0] + ((0.169511248825-0.976180896489j))*x_ref[1]
        arg[(0, 2, 2)]=(0.128495750289-0.787656920119j)*x[0] + ((0.400432240221+0.0283157503655j))*x[1]
        ref[(0, 2, 2)]=(0.128495750289-0.787656920119j)*x_ref[0] + ((0.400432240221+0.0283157503655j))*x_ref[1]
        arg[(0, 2, 3)]=(0.416384544316-0.264133157305j)*x[0] + ((-0.803338946107+0.868874758267j))*x[1]
        ref[(0, 2, 3)]=(0.416384544316-0.264133157305j)*x_ref[0] + ((-0.803338946107+0.868874758267j))*x_ref[1]
        arg[(0, 3, 0)]=(-0.438838255295-0.615796460808j)*x[0] + ((-0.426982719838-0.412822062359j))*x[1]
        ref[(0, 3, 0)]=(-0.438838255295-0.615796460808j)*x_ref[0] + ((-0.426982719838-0.412822062359j))*x_ref[1]
        arg[(0, 3, 1)]=(-0.532266838395+0.509434232561j)*x[0] + ((0.315055810531-0.792026357168j))*x[1]
        ref[(0, 3, 1)]=(-0.532266838395+0.509434232561j)*x_ref[0] + ((0.315055810531-0.792026357168j))*x_ref[1]
        arg[(0, 3, 2)]=(0.447389133714+0.120816140315j)*x[0] + ((0.729406984847-0.066818452983j))*x[1]
        ref[(0, 3, 2)]=(0.447389133714+0.120816140315j)*x_ref[0] + ((0.729406984847-0.066818452983j))*x_ref[1]
        arg[(0, 3, 3)]=(0.207563946741-0.568386349121j)*x[0] + ((-0.096013100426+0.0626568387124j))*x[1]
        ref[(0, 3, 3)]=(0.207563946741-0.568386349121j)*x_ref[0] + ((-0.096013100426+0.0626568387124j))*x_ref[1]
        arg[(1, 0, 0)]=(0.886278081117-0.00888256993116j)*x[0] + ((0.905798376982-0.99848162284j))*x[1]
        ref[(1, 0, 0)]=(0.886278081117-0.00888256993116j)*x_ref[0] + ((0.905798376982-0.99848162284j))*x_ref[1]
        arg[(1, 0, 1)]=(0.613161255707-0.651150720028j)*x[0] + ((-0.806505656275+0.466065166755j))*x[1]
        ref[(1, 0, 1)]=(0.613161255707-0.651150720028j)*x_ref[0] + ((-0.806505656275+0.466065166755j))*x_ref[1]
        arg[(1, 0, 2)]=(0.107244441968+0.057289836157j)*x[0] + ((0.567743142878-0.5977635561j))*x[1]
        ref[(1, 0, 2)]=(0.107244441968+0.057289836157j)*x_ref[0] + ((0.567743142878-0.5977635561j))*x_ref[1]
        arg[(1, 0, 3)]=(0.373298389401+0.526868349096j)*x[0] + ((-0.600538957257+0.483280728352j))*x[1]
        ref[(1, 0, 3)]=(0.373298389401+0.526868349096j)*x_ref[0] + ((-0.600538957257+0.483280728352j))*x_ref[1]
        arg[(1, 1, 0)]=(0.0821241273131-0.567372911903j)*x[0] + ((-0.340395980848+0.538453624418j))*x[1]
        ref[(1, 1, 0)]=(0.0821241273131-0.567372911903j)*x_ref[0] + ((-0.340395980848+0.538453624418j))*x_ref[1]
        arg[(1, 1, 1)]=(0.739817892146-0.720644590983j)*x[0] + ((-0.48782275414+0.563584051727j))*x[1]
        ref[(1, 1, 1)]=(0.739817892146-0.720644590983j)*x_ref[0] + ((-0.48782275414+0.563584051727j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.603823678838-0.173601176385j)*x[0] + ((0.963140517396-0.173198420788j))*x[1]
        ref[(1, 1, 2)]=(-0.603823678838-0.173601176385j)*x_ref[0] + ((0.963140517396-0.173198420788j))*x_ref[1]
        arg[(1, 1, 3)]=(0.0491621893505+0.721543977935j)*x[0] + ((0.255146479975-0.631273762289j))*x[1]
        ref[(1, 1, 3)]=(0.0491621893505+0.721543977935j)*x_ref[0] + ((0.255146479975-0.631273762289j))*x_ref[1]
        arg[(1, 2, 0)]=(0.407296194652-0.97493515093j)*x[0] + ((-0.991288562396-0.696964528703j))*x[1]
        ref[(1, 2, 0)]=(0.407296194652-0.97493515093j)*x_ref[0] + ((-0.991288562396-0.696964528703j))*x_ref[1]
        arg[(1, 2, 1)]=(0.844736669898+0.883581959061j)*x[0] + ((0.597182185294-0.669805007693j))*x[1]
        ref[(1, 2, 1)]=(0.844736669898+0.883581959061j)*x_ref[0] + ((0.597182185294-0.669805007693j))*x_ref[1]
        arg[(1, 2, 2)]=(0.604912787752+0.358384357073j)*x[0] + ((0.0379185682513+0.89532360261j))*x[1]
        ref[(1, 2, 2)]=(0.604912787752+0.358384357073j)*x_ref[0] + ((0.0379185682513+0.89532360261j))*x_ref[1]
        arg[(1, 2, 3)]=(-0.568090784078+0.315208198783j)*x[0] + ((0.274906959391+0.604008594212j))*x[1]
        ref[(1, 2, 3)]=(-0.568090784078+0.315208198783j)*x_ref[0] + ((0.274906959391+0.604008594212j))*x_ref[1]
        arg[(1, 3, 0)]=(0.776934604574+0.0763509588061j)*x[0] + ((0.654829891063-0.347375079605j))*x[1]
        ref[(1, 3, 0)]=(0.776934604574+0.0763509588061j)*x_ref[0] + ((0.654829891063-0.347375079605j))*x_ref[1]
        arg[(1, 3, 1)]=(-0.158969040078-0.132559353939j)*x[0] + ((0.724569344723+0.129720844131j))*x[1]
        ref[(1, 3, 1)]=(-0.158969040078-0.132559353939j)*x_ref[0] + ((0.724569344723+0.129720844131j))*x_ref[1]
        arg[(1, 3, 2)]=(-0.834134577346+0.0792600303027j)*x[0] + ((-0.805664099846+0.164907141332j))*x[1]
        ref[(1, 3, 2)]=(-0.834134577346+0.0792600303027j)*x_ref[0] + ((-0.805664099846+0.164907141332j))*x_ref[1]
        arg[(1, 3, 3)]=(-0.276837159401+0.540757500354j)*x[0] + ((0.267364950838-0.507136755008j))*x[1]
        ref[(1, 3, 3)]=(-0.276837159401+0.540757500354j)*x_ref[0] + ((0.267364950838-0.507136755008j))*x_ref[1]
        arg[(2, 0, 0)]=(-0.605969277377-0.724951814125j)*x[0] + ((-0.946037417905+0.649852207639j))*x[1]
        ref[(2, 0, 0)]=(-0.605969277377-0.724951814125j)*x_ref[0] + ((-0.946037417905+0.649852207639j))*x_ref[1]
        arg[(2, 0, 1)]=(0.245680251738+0.948553906774j)*x[0] + ((0.300032416046-0.613719903511j))*x[1]
        ref[(2, 0, 1)]=(0.245680251738+0.948553906774j)*x_ref[0] + ((0.300032416046-0.613719903511j))*x_ref[1]
        arg[(2, 0, 2)]=(0.143137283628-0.178343362021j)*x[0] + ((0.727853337459-0.253902901637j))*x[1]
        ref[(2, 0, 2)]=(0.143137283628-0.178343362021j)*x_ref[0] + ((0.727853337459-0.253902901637j))*x_ref[1]
        arg[(2, 0, 3)]=(-0.424867117406-0.362818563612j)*x[0] + ((-0.666277923039+0.621758542968j))*x[1]
        ref[(2, 0, 3)]=(-0.424867117406-0.362818563612j)*x_ref[0] + ((-0.666277923039+0.621758542968j))*x_ref[1]
        arg[(2, 1, 0)]=(-0.207078151614+0.716613888569j)*x[0] + ((-0.236762906802+0.766808915996j))*x[1]
        ref[(2, 1, 0)]=(-0.207078151614+0.716613888569j)*x_ref[0] + ((-0.236762906802+0.766808915996j))*x_ref[1]
        arg[(2, 1, 1)]=(-0.90869927965-0.188166696874j)*x[0] + ((0.329306950034+0.0880387254135j))*x[1]
        ref[(2, 1, 1)]=(-0.90869927965-0.188166696874j)*x_ref[0] + ((0.329306950034+0.0880387254135j))*x_ref[1]
        arg[(2, 1, 2)]=(0.778175775247-0.763599425086j)*x[0] + ((0.111780327356-0.752725116428j))*x[1]
        ref[(2, 1, 2)]=(0.778175775247-0.763599425086j)*x_ref[0] + ((0.111780327356-0.752725116428j))*x_ref[1]
        arg[(2, 1, 3)]=(-0.202486091909-0.974378070962j)*x[0] + ((0.237156830238+0.115791573398j))*x[1]
        ref[(2, 1, 3)]=(-0.202486091909-0.974378070962j)*x_ref[0] + ((0.237156830238+0.115791573398j))*x_ref[1]
        arg[(2, 2, 0)]=(0.142337017713-0.739283365202j)*x[0] + ((-0.562817084151-0.416224740151j))*x[1]
        ref[(2, 2, 0)]=(0.142337017713-0.739283365202j)*x_ref[0] + ((-0.562817084151-0.416224740151j))*x_ref[1]
        arg[(2, 2, 1)]=(0.586731771211-0.0595565431356j)*x[0] + ((0.703405473111-0.908813998563j))*x[1]
        ref[(2, 2, 1)]=(0.586731771211-0.0595565431356j)*x_ref[0] + ((0.703405473111-0.908813998563j))*x_ref[1]
        arg[(2, 2, 2)]=(-0.219210969184-0.662286381218j)*x[0] + ((0.466792127918+0.344620163571j))*x[1]
        ref[(2, 2, 2)]=(-0.219210969184-0.662286381218j)*x_ref[0] + ((0.466792127918+0.344620163571j))*x_ref[1]
        arg[(2, 2, 3)]=(0.334463067528-0.677860973827j)*x[0] + ((0.548507272912+0.898179112409j))*x[1]
        ref[(2, 2, 3)]=(0.334463067528-0.677860973827j)*x_ref[0] + ((0.548507272912+0.898179112409j))*x_ref[1]
        arg[(2, 3, 0)]=(-0.0620087175528+0.0435310357772j)*x[0] + ((-0.428691354366-0.756557912898j))*x[1]
        ref[(2, 3, 0)]=(-0.0620087175528+0.0435310357772j)*x_ref[0] + ((-0.428691354366-0.756557912898j))*x_ref[1]
        arg[(2, 3, 1)]=(-0.764051357043-0.184269110411j)*x[0] + ((-0.664020486623-0.492751153366j))*x[1]
        ref[(2, 3, 1)]=(-0.764051357043-0.184269110411j)*x_ref[0] + ((-0.664020486623-0.492751153366j))*x_ref[1]
        arg[(2, 3, 2)]=(-0.818941973005-0.893112871161j)*x[0] + ((-0.911420282009+0.217547871572j))*x[1]
        ref[(2, 3, 2)]=(-0.818941973005-0.893112871161j)*x_ref[0] + ((-0.911420282009+0.217547871572j))*x_ref[1]
        arg[(2, 3, 3)]=(0.0851317965802-0.00877327592109j)*x[0] + ((0.15996409972-0.337148059661j))*x[1]
        ref[(2, 3, 3)]=(0.0851317965802-0.00877327592109j)*x_ref[0] + ((0.15996409972-0.337148059661j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.717271929637+0.131551131422j)*x[2]
            ref[(0, 0, 0)]+=(-0.717271929637+0.131551131422j)*x_ref[2]
            arg[(0, 0, 1)]+=(-0.506376610095-0.686600821409j)*x[2]
            ref[(0, 0, 1)]+=(-0.506376610095-0.686600821409j)*x_ref[2]
            arg[(0, 0, 2)]+=(0.295467350248-0.422072535545j)*x[2]
            ref[(0, 0, 2)]+=(0.295467350248-0.422072535545j)*x_ref[2]
            arg[(0, 0, 3)]+=(-0.144233985082-0.114240989976j)*x[2]
            ref[(0, 0, 3)]+=(-0.144233985082-0.114240989976j)*x_ref[2]
            arg[(0, 1, 0)]+=(0.169785035638-0.812658940105j)*x[2]
            ref[(0, 1, 0)]+=(0.169785035638-0.812658940105j)*x_ref[2]
            arg[(0, 1, 1)]+=(-0.447596693855-0.580020769299j)*x[2]
            ref[(0, 1, 1)]+=(-0.447596693855-0.580020769299j)*x_ref[2]
            arg[(0, 1, 2)]+=(0.466557099823-0.178531344304j)*x[2]
            ref[(0, 1, 2)]+=(0.466557099823-0.178531344304j)*x_ref[2]
            arg[(0, 1, 3)]+=(0.863325997282-0.464413240113j)*x[2]
            ref[(0, 1, 3)]+=(0.863325997282-0.464413240113j)*x_ref[2]
            arg[(0, 2, 0)]+=(-0.362126343353-0.114254092438j)*x[2]
            ref[(0, 2, 0)]+=(-0.362126343353-0.114254092438j)*x_ref[2]
            arg[(0, 2, 1)]+=(0.350006748531-0.0010304280899j)*x[2]
            ref[(0, 2, 1)]+=(0.350006748531-0.0010304280899j)*x_ref[2]
            arg[(0, 2, 2)]+=(-0.558755455629+0.988458073461j)*x[2]
            ref[(0, 2, 2)]+=(-0.558755455629+0.988458073461j)*x_ref[2]
            arg[(0, 2, 3)]+=(0.133550544042+0.313477255626j)*x[2]
            ref[(0, 2, 3)]+=(0.133550544042+0.313477255626j)*x_ref[2]
            arg[(0, 3, 0)]+=(-0.641869049125-0.403809801697j)*x[2]
            ref[(0, 3, 0)]+=(-0.641869049125-0.403809801697j)*x_ref[2]
            arg[(0, 3, 1)]+=(-0.473093010054+0.411760877124j)*x[2]
            ref[(0, 3, 1)]+=(-0.473093010054+0.411760877124j)*x_ref[2]
            arg[(0, 3, 2)]+=(-0.347907977179-0.175664352424j)*x[2]
            ref[(0, 3, 2)]+=(-0.347907977179-0.175664352424j)*x_ref[2]
            arg[(0, 3, 3)]+=(-0.853852483637-0.8985179583j)*x[2]
            ref[(0, 3, 3)]+=(-0.853852483637-0.8985179583j)*x_ref[2]
            arg[(1, 0, 0)]+=(-0.30755343668+0.298442032002j)*x[2]
            ref[(1, 0, 0)]+=(-0.30755343668+0.298442032002j)*x_ref[2]
            arg[(1, 0, 1)]+=(0.171759473846-0.345174535421j)*x[2]
            ref[(1, 0, 1)]+=(0.171759473846-0.345174535421j)*x_ref[2]
            arg[(1, 0, 2)]+=(-0.887047984438-0.261377993684j)*x[2]
            ref[(1, 0, 2)]+=(-0.887047984438-0.261377993684j)*x_ref[2]
            arg[(1, 0, 3)]+=(0.107184736436+0.913343087174j)*x[2]
            ref[(1, 0, 3)]+=(0.107184736436+0.913343087174j)*x_ref[2]
            arg[(1, 1, 0)]+=(0.479197650616-0.6169450424j)*x[2]
            ref[(1, 1, 0)]+=(0.479197650616-0.6169450424j)*x_ref[2]
            arg[(1, 1, 1)]+=(0.0822732907185+0.366566017776j)*x[2]
            ref[(1, 1, 1)]+=(0.0822732907185+0.366566017776j)*x_ref[2]
            arg[(1, 1, 2)]+=(0.0684236373282+0.492810636253j)*x[2]
            ref[(1, 1, 2)]+=(0.0684236373282+0.492810636253j)*x_ref[2]
            arg[(1, 1, 3)]+=(0.836780033022-0.623283734452j)*x[2]
            ref[(1, 1, 3)]+=(0.836780033022-0.623283734452j)*x_ref[2]
            arg[(1, 2, 0)]+=(-0.223218184356-0.650712473136j)*x[2]
            ref[(1, 2, 0)]+=(-0.223218184356-0.650712473136j)*x_ref[2]
            arg[(1, 2, 1)]+=(0.832854812888+0.768187937718j)*x[2]
            ref[(1, 2, 1)]+=(0.832854812888+0.768187937718j)*x_ref[2]
            arg[(1, 2, 2)]+=(0.929056122863+0.22291473301j)*x[2]
            ref[(1, 2, 2)]+=(0.929056122863+0.22291473301j)*x_ref[2]
            arg[(1, 2, 3)]+=(-0.69168260396+0.987957387191j)*x[2]
            ref[(1, 2, 3)]+=(-0.69168260396+0.987957387191j)*x_ref[2]
            arg[(1, 3, 0)]+=(0.73044141378-0.762479721834j)*x[2]
            ref[(1, 3, 0)]+=(0.73044141378-0.762479721834j)*x_ref[2]
            arg[(1, 3, 1)]+=(0.856306818867+0.155981065525j)*x[2]
            ref[(1, 3, 1)]+=(0.856306818867+0.155981065525j)*x_ref[2]
            arg[(1, 3, 2)]+=(0.399846371667+0.449740978434j)*x[2]
            ref[(1, 3, 2)]+=(0.399846371667+0.449740978434j)*x_ref[2]
            arg[(1, 3, 3)]+=(0.783096893413-0.523090951015j)*x[2]
            ref[(1, 3, 3)]+=(0.783096893413-0.523090951015j)*x_ref[2]
            arg[(2, 0, 0)]+=(0.404352772562+0.670641496954j)*x[2]
            ref[(2, 0, 0)]+=(0.404352772562+0.670641496954j)*x_ref[2]
            arg[(2, 0, 1)]+=(-0.969232246865-0.365667286592j)*x[2]
            ref[(2, 0, 1)]+=(-0.969232246865-0.365667286592j)*x_ref[2]
            arg[(2, 0, 2)]+=(0.958394643998+0.719958323906j)*x[2]
            ref[(2, 0, 2)]+=(0.958394643998+0.719958323906j)*x_ref[2]
            arg[(2, 0, 3)]+=(0.103428199632-0.128575620349j)*x[2]
            ref[(2, 0, 3)]+=(0.103428199632-0.128575620349j)*x_ref[2]
            arg[(2, 1, 0)]+=(-0.512524429902+0.241991545357j)*x[2]
            ref[(2, 1, 0)]+=(-0.512524429902+0.241991545357j)*x_ref[2]
            arg[(2, 1, 1)]+=(0.585504642634-0.630943180724j)*x[2]
            ref[(2, 1, 1)]+=(0.585504642634-0.630943180724j)*x_ref[2]
            arg[(2, 1, 2)]+=(0.942740327506+0.347183319141j)*x[2]
            ref[(2, 1, 2)]+=(0.942740327506+0.347183319141j)*x_ref[2]
            arg[(2, 1, 3)]+=(-0.945734678709-0.377352260297j)*x[2]
            ref[(2, 1, 3)]+=(-0.945734678709-0.377352260297j)*x_ref[2]
            arg[(2, 2, 0)]+=(0.0405636539626+0.276068409987j)*x[2]
            ref[(2, 2, 0)]+=(0.0405636539626+0.276068409987j)*x_ref[2]
            arg[(2, 2, 1)]+=(-0.25335682348+0.213728925469j)*x[2]
            ref[(2, 2, 1)]+=(-0.25335682348+0.213728925469j)*x_ref[2]
            arg[(2, 2, 2)]+=(0.156908473329+0.0761527814034j)*x[2]
            ref[(2, 2, 2)]+=(0.156908473329+0.0761527814034j)*x_ref[2]
            arg[(2, 2, 3)]+=(0.866533316901+0.968646774819j)*x[2]
            ref[(2, 2, 3)]+=(0.866533316901+0.968646774819j)*x_ref[2]
            arg[(2, 3, 0)]+=(-0.697749979246+0.551621830945j)*x[2]
            ref[(2, 3, 0)]+=(-0.697749979246+0.551621830945j)*x_ref[2]
            arg[(2, 3, 1)]+=(0.697483534421-0.301666123978j)*x[2]
            ref[(2, 3, 1)]+=(0.697483534421-0.301666123978j)*x_ref[2]
            arg[(2, 3, 2)]+=(0.217431749083+0.749680888287j)*x[2]
            ref[(2, 3, 2)]+=(0.217431749083+0.749680888287j)*x_ref[2]
            arg[(2, 3, 3)]+=(0.0602529893643-0.821663641405j)*x[2]
            ref[(2, 3, 3)]+=(0.0602529893643-0.821663641405j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_ReducedSolution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedSolution

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 2, 4),w)
        ref = Data(0,(2, 3, 2, 4),w_ref)
        arg[(0, 0, 0, 0)]=(0.276995581362+0.708807036218j)*x[0] + ((-0.43737083317+0.974959650864j))*x[1]
        ref[(0, 0, 0, 0)]=(0.276995581362+0.708807036218j)*x_ref[0] + ((-0.43737083317+0.974959650864j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.617686906193-0.301556932689j)*x[0] + ((-0.453161767761-0.585221212687j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.617686906193-0.301556932689j)*x_ref[0] + ((-0.453161767761-0.585221212687j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.834743868957-0.310892920961j)*x[0] + ((-0.266348459146+0.11531076194j))*x[1]
        ref[(0, 0, 0, 2)]=(0.834743868957-0.310892920961j)*x_ref[0] + ((-0.266348459146+0.11531076194j))*x_ref[1]
        arg[(0, 0, 0, 3)]=(0.132129139298+0.686674609669j)*x[0] + ((-0.0142894869542-0.489666409423j))*x[1]
        ref[(0, 0, 0, 3)]=(0.132129139298+0.686674609669j)*x_ref[0] + ((-0.0142894869542-0.489666409423j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.522180977811+0.950426778752j)*x[0] + ((0.76832716042-0.311069087175j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.522180977811+0.950426778752j)*x_ref[0] + ((0.76832716042-0.311069087175j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.865189555918+0.191033045054j)*x[0] + ((0.0403389190149-0.585209987749j))*x[1]
        ref[(0, 0, 1, 1)]=(0.865189555918+0.191033045054j)*x_ref[0] + ((0.0403389190149-0.585209987749j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(-0.687972401539-0.852506485399j)*x[0] + ((0.794026261176-0.578103712319j))*x[1]
        ref[(0, 0, 1, 2)]=(-0.687972401539-0.852506485399j)*x_ref[0] + ((0.794026261176-0.578103712319j))*x_ref[1]
        arg[(0, 0, 1, 3)]=(-0.865573590653-0.477343988037j)*x[0] + ((-0.256086555571-0.210599593307j))*x[1]
        ref[(0, 0, 1, 3)]=(-0.865573590653-0.477343988037j)*x_ref[0] + ((-0.256086555571-0.210599593307j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(-0.519400344475+0.700697175042j)*x[0] + ((-0.682863415052-0.424701507768j))*x[1]
        ref[(0, 1, 0, 0)]=(-0.519400344475+0.700697175042j)*x_ref[0] + ((-0.682863415052-0.424701507768j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.961468111883-0.35147207151j)*x[0] + ((-0.668543182658-0.231258114285j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.961468111883-0.35147207151j)*x_ref[0] + ((-0.668543182658-0.231258114285j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(0.658295990605-0.897631598997j)*x[0] + ((0.829666163436-0.754509742215j))*x[1]
        ref[(0, 1, 0, 2)]=(0.658295990605-0.897631598997j)*x_ref[0] + ((0.829666163436-0.754509742215j))*x_ref[1]
        arg[(0, 1, 0, 3)]=(-0.849267553983+0.963963313146j)*x[0] + ((-0.0121362418546-0.483001175773j))*x[1]
        ref[(0, 1, 0, 3)]=(-0.849267553983+0.963963313146j)*x_ref[0] + ((-0.0121362418546-0.483001175773j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.32610230884+0.241900753844j)*x[0] + ((0.619798206997+0.22573287995j))*x[1]
        ref[(0, 1, 1, 0)]=(0.32610230884+0.241900753844j)*x_ref[0] + ((0.619798206997+0.22573287995j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.474262832566+0.559688510912j)*x[0] + ((-0.531421888452+0.523511598433j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.474262832566+0.559688510912j)*x_ref[0] + ((-0.531421888452+0.523511598433j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(-0.636742075492+0.311487545449j)*x[0] + ((-0.633268038409-0.494191270168j))*x[1]
        ref[(0, 1, 1, 2)]=(-0.636742075492+0.311487545449j)*x_ref[0] + ((-0.633268038409-0.494191270168j))*x_ref[1]
        arg[(0, 1, 1, 3)]=(-0.269505203048-0.242874168348j)*x[0] + ((-0.125038507958-0.645646561543j))*x[1]
        ref[(0, 1, 1, 3)]=(-0.269505203048-0.242874168348j)*x_ref[0] + ((-0.125038507958-0.645646561543j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(-0.831843826955+0.906040509075j)*x[0] + ((-0.0926393817656-0.705345482285j))*x[1]
        ref[(0, 2, 0, 0)]=(-0.831843826955+0.906040509075j)*x_ref[0] + ((-0.0926393817656-0.705345482285j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(0.962456652399+0.852495794414j)*x[0] + ((-0.312139131165+0.948640429598j))*x[1]
        ref[(0, 2, 0, 1)]=(0.962456652399+0.852495794414j)*x_ref[0] + ((-0.312139131165+0.948640429598j))*x_ref[1]
        arg[(0, 2, 0, 2)]=(0.165680235449-0.0894661398778j)*x[0] + ((-0.939648107286-0.390674163637j))*x[1]
        ref[(0, 2, 0, 2)]=(0.165680235449-0.0894661398778j)*x_ref[0] + ((-0.939648107286-0.390674163637j))*x_ref[1]
        arg[(0, 2, 0, 3)]=(-0.412392869323+0.30573192126j)*x[0] + ((0.818869510055-0.0644476830576j))*x[1]
        ref[(0, 2, 0, 3)]=(-0.412392869323+0.30573192126j)*x_ref[0] + ((0.818869510055-0.0644476830576j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(0.935899956092+0.0913893882623j)*x[0] + ((0.00195517332024-0.504185102919j))*x[1]
        ref[(0, 2, 1, 0)]=(0.935899956092+0.0913893882623j)*x_ref[0] + ((0.00195517332024-0.504185102919j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(0.925074594932-0.783297854864j)*x[0] + ((-0.772009778681-0.306502205959j))*x[1]
        ref[(0, 2, 1, 1)]=(0.925074594932-0.783297854864j)*x_ref[0] + ((-0.772009778681-0.306502205959j))*x_ref[1]
        arg[(0, 2, 1, 2)]=(0.753185640136-0.590598970519j)*x[0] + ((0.819353391026+0.883327757892j))*x[1]
        ref[(0, 2, 1, 2)]=(0.753185640136-0.590598970519j)*x_ref[0] + ((0.819353391026+0.883327757892j))*x_ref[1]
        arg[(0, 2, 1, 3)]=(-0.850911177701+0.864101742447j)*x[0] + ((-0.465104641728-0.0570299439766j))*x[1]
        ref[(0, 2, 1, 3)]=(-0.850911177701+0.864101742447j)*x_ref[0] + ((-0.465104641728-0.0570299439766j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.417766930072-0.879393928881j)*x[0] + ((0.0554662138347-0.351320002862j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.417766930072-0.879393928881j)*x_ref[0] + ((0.0554662138347-0.351320002862j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.403509432041+0.885365450946j)*x[0] + ((0.545548391452-0.348603796499j))*x[1]
        ref[(1, 0, 0, 1)]=(0.403509432041+0.885365450946j)*x_ref[0] + ((0.545548391452-0.348603796499j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(0.587386147169+0.732687827072j)*x[0] + ((0.436446464342+0.74805829739j))*x[1]
        ref[(1, 0, 0, 2)]=(0.587386147169+0.732687827072j)*x_ref[0] + ((0.436446464342+0.74805829739j))*x_ref[1]
        arg[(1, 0, 0, 3)]=(-0.497994953356+0.644067754923j)*x[0] + ((0.732400431642-0.623852561343j))*x[1]
        ref[(1, 0, 0, 3)]=(-0.497994953356+0.644067754923j)*x_ref[0] + ((0.732400431642-0.623852561343j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(0.659742901866-0.226252882975j)*x[0] + ((-0.531250074521+0.989684244234j))*x[1]
        ref[(1, 0, 1, 0)]=(0.659742901866-0.226252882975j)*x_ref[0] + ((-0.531250074521+0.989684244234j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.38796702411-0.970980468044j)*x[0] + ((-0.0535778282809-0.668333267457j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.38796702411-0.970980468044j)*x_ref[0] + ((-0.0535778282809-0.668333267457j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(-0.329838794748-0.139019609778j)*x[0] + ((-0.365542608735+0.66577522688j))*x[1]
        ref[(1, 0, 1, 2)]=(-0.329838794748-0.139019609778j)*x_ref[0] + ((-0.365542608735+0.66577522688j))*x_ref[1]
        arg[(1, 0, 1, 3)]=(-0.636870005306-0.676217035632j)*x[0] + ((-0.00831711292599+0.0800146547825j))*x[1]
        ref[(1, 0, 1, 3)]=(-0.636870005306-0.676217035632j)*x_ref[0] + ((-0.00831711292599+0.0800146547825j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.998703175271+0.677051951529j)*x[0] + ((0.348571543149-0.060839393636j))*x[1]
        ref[(1, 1, 0, 0)]=(0.998703175271+0.677051951529j)*x_ref[0] + ((0.348571543149-0.060839393636j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.458184423653-0.990632998589j)*x[0] + ((0.397901770738-0.827387060157j))*x[1]
        ref[(1, 1, 0, 1)]=(0.458184423653-0.990632998589j)*x_ref[0] + ((0.397901770738-0.827387060157j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(0.622426676739-0.0659499349138j)*x[0] + ((-0.891212033691+0.933176484102j))*x[1]
        ref[(1, 1, 0, 2)]=(0.622426676739-0.0659499349138j)*x_ref[0] + ((-0.891212033691+0.933176484102j))*x_ref[1]
        arg[(1, 1, 0, 3)]=(-0.290104666294-0.193210765988j)*x[0] + ((0.270700202343+0.603340159559j))*x[1]
        ref[(1, 1, 0, 3)]=(-0.290104666294-0.193210765988j)*x_ref[0] + ((0.270700202343+0.603340159559j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.15281960583+0.584331169061j)*x[0] + ((-0.19288892302-0.410422192949j))*x[1]
        ref[(1, 1, 1, 0)]=(0.15281960583+0.584331169061j)*x_ref[0] + ((-0.19288892302-0.410422192949j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.410281617168-0.59423285932j)*x[0] + ((-0.359481117535-0.714333550151j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.410281617168-0.59423285932j)*x_ref[0] + ((-0.359481117535-0.714333550151j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(0.637896867413-0.3488798103j)*x[0] + ((0.937448026537+0.485845813521j))*x[1]
        ref[(1, 1, 1, 2)]=(0.637896867413-0.3488798103j)*x_ref[0] + ((0.937448026537+0.485845813521j))*x_ref[1]
        arg[(1, 1, 1, 3)]=(0.357060303853-0.0543587588402j)*x[0] + ((0.135161470064-0.867256016272j))*x[1]
        ref[(1, 1, 1, 3)]=(0.357060303853-0.0543587588402j)*x_ref[0] + ((0.135161470064-0.867256016272j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(-0.719465891249+0.43178648131j)*x[0] + ((-0.170106882102-0.037961026655j))*x[1]
        ref[(1, 2, 0, 0)]=(-0.719465891249+0.43178648131j)*x_ref[0] + ((-0.170106882102-0.037961026655j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.279891291915-0.27880647382j)*x[0] + ((-0.767924304977-0.0415689943591j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.279891291915-0.27880647382j)*x_ref[0] + ((-0.767924304977-0.0415689943591j))*x_ref[1]
        arg[(1, 2, 0, 2)]=(0.399111454663+0.745710941015j)*x[0] + ((-0.666351408247+0.502343631778j))*x[1]
        ref[(1, 2, 0, 2)]=(0.399111454663+0.745710941015j)*x_ref[0] + ((-0.666351408247+0.502343631778j))*x_ref[1]
        arg[(1, 2, 0, 3)]=(-0.395485394632-0.166562680103j)*x[0] + ((0.418130879182-0.889075961943j))*x[1]
        ref[(1, 2, 0, 3)]=(-0.395485394632-0.166562680103j)*x_ref[0] + ((0.418130879182-0.889075961943j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(-0.104184275488+0.275292811861j)*x[0] + ((-0.939716069724+0.0824733069949j))*x[1]
        ref[(1, 2, 1, 0)]=(-0.104184275488+0.275292811861j)*x_ref[0] + ((-0.939716069724+0.0824733069949j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.515338814004+0.527407129397j)*x[0] + ((0.819399188742-0.406220289625j))*x[1]
        ref[(1, 2, 1, 1)]=(0.515338814004+0.527407129397j)*x_ref[0] + ((0.819399188742-0.406220289625j))*x_ref[1]
        arg[(1, 2, 1, 2)]=(-0.142482250153-0.750821257128j)*x[0] + ((-0.492451005158+0.770562185765j))*x[1]
        ref[(1, 2, 1, 2)]=(-0.142482250153-0.750821257128j)*x_ref[0] + ((-0.492451005158+0.770562185765j))*x_ref[1]
        arg[(1, 2, 1, 3)]=(0.0023642518218-0.201017270309j)*x[0] + ((0.0654585418316-0.80892808347j))*x[1]
        ref[(1, 2, 1, 3)]=(0.0023642518218-0.201017270309j)*x_ref[0] + ((0.0654585418316-0.80892808347j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.676423787919+0.990455197816j)*x[2]
            ref[(0, 0, 0, 0)]+=(0.676423787919+0.990455197816j)*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.10683560572+0.111018551638j)*x[2]
            ref[(0, 0, 0, 1)]+=(0.10683560572+0.111018551638j)*x_ref[2]
            arg[(0, 0, 0, 2)]+=(-0.170394298254-0.45901552909j)*x[2]
            ref[(0, 0, 0, 2)]+=(-0.170394298254-0.45901552909j)*x_ref[2]
            arg[(0, 0, 0, 3)]+=(0.3586515203-0.245301613971j)*x[2]
            ref[(0, 0, 0, 3)]+=(0.3586515203-0.245301613971j)*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.0409159265455+0.792145564948j)*x[2]
            ref[(0, 0, 1, 0)]+=(0.0409159265455+0.792145564948j)*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.305502766405-0.167993347123j)*x[2]
            ref[(0, 0, 1, 1)]+=(-0.305502766405-0.167993347123j)*x_ref[2]
            arg[(0, 0, 1, 2)]+=(0.33383149774+0.426387361576j)*x[2]
            ref[(0, 0, 1, 2)]+=(0.33383149774+0.426387361576j)*x_ref[2]
            arg[(0, 0, 1, 3)]+=(0.0374664390904-0.729774127741j)*x[2]
            ref[(0, 0, 1, 3)]+=(0.0374664390904-0.729774127741j)*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.429866050479-0.766314872556j)*x[2]
            ref[(0, 1, 0, 0)]+=(-0.429866050479-0.766314872556j)*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.0933735244959+0.573407232443j)*x[2]
            ref[(0, 1, 0, 1)]+=(0.0933735244959+0.573407232443j)*x_ref[2]
            arg[(0, 1, 0, 2)]+=(0.608962781001-0.714604669068j)*x[2]
            ref[(0, 1, 0, 2)]+=(0.608962781001-0.714604669068j)*x_ref[2]
            arg[(0, 1, 0, 3)]+=(0.0300505169563-0.491579214118j)*x[2]
            ref[(0, 1, 0, 3)]+=(0.0300505169563-0.491579214118j)*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.343782306665+0.625927541077j)*x[2]
            ref[(0, 1, 1, 0)]+=(0.343782306665+0.625927541077j)*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.0927571506113-0.112860992183j)*x[2]
            ref[(0, 1, 1, 1)]+=(-0.0927571506113-0.112860992183j)*x_ref[2]
            arg[(0, 1, 1, 2)]+=(-0.908099783377-0.0884554586574j)*x[2]
            ref[(0, 1, 1, 2)]+=(-0.908099783377-0.0884554586574j)*x_ref[2]
            arg[(0, 1, 1, 3)]+=(0.66266002605+0.779870768577j)*x[2]
            ref[(0, 1, 1, 3)]+=(0.66266002605+0.779870768577j)*x_ref[2]
            arg[(0, 2, 0, 0)]+=(0.759019431204+0.415388650109j)*x[2]
            ref[(0, 2, 0, 0)]+=(0.759019431204+0.415388650109j)*x_ref[2]
            arg[(0, 2, 0, 1)]+=(-0.994066633288+0.242976766638j)*x[2]
            ref[(0, 2, 0, 1)]+=(-0.994066633288+0.242976766638j)*x_ref[2]
            arg[(0, 2, 0, 2)]+=(-0.690045665295-0.298165595379j)*x[2]
            ref[(0, 2, 0, 2)]+=(-0.690045665295-0.298165595379j)*x_ref[2]
            arg[(0, 2, 0, 3)]+=(-0.680069074048-0.150305098501j)*x[2]
            ref[(0, 2, 0, 3)]+=(-0.680069074048-0.150305098501j)*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.90252666283-0.783103669318j)*x[2]
            ref[(0, 2, 1, 0)]+=(-0.90252666283-0.783103669318j)*x_ref[2]
            arg[(0, 2, 1, 1)]+=(-0.990220956791+0.932176471436j)*x[2]
            ref[(0, 2, 1, 1)]+=(-0.990220956791+0.932176471436j)*x_ref[2]
            arg[(0, 2, 1, 2)]+=(-0.328099961861+0.883183684427j)*x[2]
            ref[(0, 2, 1, 2)]+=(-0.328099961861+0.883183684427j)*x_ref[2]
            arg[(0, 2, 1, 3)]+=(0.602471411724+0.572473095819j)*x[2]
            ref[(0, 2, 1, 3)]+=(0.602471411724+0.572473095819j)*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.822249358808-0.793449000542j)*x[2]
            ref[(1, 0, 0, 0)]+=(0.822249358808-0.793449000542j)*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.108774855106+0.148311096641j)*x[2]
            ref[(1, 0, 0, 1)]+=(0.108774855106+0.148311096641j)*x_ref[2]
            arg[(1, 0, 0, 2)]+=(0.123025131817-0.499198948436j)*x[2]
            ref[(1, 0, 0, 2)]+=(0.123025131817-0.499198948436j)*x_ref[2]
            arg[(1, 0, 0, 3)]+=(0.0323088378207+0.0527871232233j)*x[2]
            ref[(1, 0, 0, 3)]+=(0.0323088378207+0.0527871232233j)*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.670227886228+0.0998773430857j)*x[2]
            ref[(1, 0, 1, 0)]+=(0.670227886228+0.0998773430857j)*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.953683589078+0.0631687545j)*x[2]
            ref[(1, 0, 1, 1)]+=(-0.953683589078+0.0631687545j)*x_ref[2]
            arg[(1, 0, 1, 2)]+=(-0.294779503839+0.152225139289j)*x[2]
            ref[(1, 0, 1, 2)]+=(-0.294779503839+0.152225139289j)*x_ref[2]
            arg[(1, 0, 1, 3)]+=(-0.0528539312943+0.272779153212j)*x[2]
            ref[(1, 0, 1, 3)]+=(-0.0528539312943+0.272779153212j)*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.309133219914-0.634670777536j)*x[2]
            ref[(1, 1, 0, 0)]+=(-0.309133219914-0.634670777536j)*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.542313580381-0.571710054715j)*x[2]
            ref[(1, 1, 0, 1)]+=(-0.542313580381-0.571710054715j)*x_ref[2]
            arg[(1, 1, 0, 2)]+=(0.151514098964-0.45385156179j)*x[2]
            ref[(1, 1, 0, 2)]+=(0.151514098964-0.45385156179j)*x_ref[2]
            arg[(1, 1, 0, 3)]+=(-0.749773346783+0.586370620132j)*x[2]
            ref[(1, 1, 0, 3)]+=(-0.749773346783+0.586370620132j)*x_ref[2]
            arg[(1, 1, 1, 0)]+=(-0.0218878108634+0.890728345745j)*x[2]
            ref[(1, 1, 1, 0)]+=(-0.0218878108634+0.890728345745j)*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.100099050424-0.439168971968j)*x[2]
            ref[(1, 1, 1, 1)]+=(0.100099050424-0.439168971968j)*x_ref[2]
            arg[(1, 1, 1, 2)]+=(0.863937471858-0.699196582046j)*x[2]
            ref[(1, 1, 1, 2)]+=(0.863937471858-0.699196582046j)*x_ref[2]
            arg[(1, 1, 1, 3)]+=(-0.810908736968-0.406518490403j)*x[2]
            ref[(1, 1, 1, 3)]+=(-0.810908736968-0.406518490403j)*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.11210502273+0.109184911773j)*x[2]
            ref[(1, 2, 0, 0)]+=(0.11210502273+0.109184911773j)*x_ref[2]
            arg[(1, 2, 0, 1)]+=(-0.652009014628+0.856634139872j)*x[2]
            ref[(1, 2, 0, 1)]+=(-0.652009014628+0.856634139872j)*x_ref[2]
            arg[(1, 2, 0, 2)]+=(-0.434074953675+0.455458782725j)*x[2]
            ref[(1, 2, 0, 2)]+=(-0.434074953675+0.455458782725j)*x_ref[2]
            arg[(1, 2, 0, 3)]+=(-0.0792331270655+0.745324525914j)*x[2]
            ref[(1, 2, 0, 3)]+=(-0.0792331270655+0.745324525914j)*x_ref[2]
            arg[(1, 2, 1, 0)]+=(-0.590306727805+0.358182810381j)*x[2]
            ref[(1, 2, 1, 0)]+=(-0.590306727805+0.358182810381j)*x_ref[2]
            arg[(1, 2, 1, 1)]+=(0.589740017871-0.866215541208j)*x[2]
            ref[(1, 2, 1, 1)]+=(0.589740017871-0.866215541208j)*x_ref[2]
            arg[(1, 2, 1, 2)]+=(0.406271571248+0.534945734069j)*x[2]
            ref[(1, 2, 1, 2)]+=(0.406271571248+0.534945734069j)*x_ref[2]
            arg[(1, 2, 1, 3)]+=(0.431658000822+0.510035096966j)*x[2]
            ref[(1, 2, 1, 3)]+=(0.431658000822+0.510035096966j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedSolution

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.525906756601+0.725390392227j)*x[0] + ((0.927173907344-0.27123451583j))*x[1]
        ref=(0.525906756601+0.725390392227j)*x_ref[0] + ((0.927173907344-0.27123451583j))*x_ref[1]
        if dim==3:
            arg+=((-0.402678599016-0.474609431737j))*x[2]
            ref+=((-0.402678599016-0.474609431737j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedSolution

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=(0.00973272670413-0.932506077668j)*x[0] + ((0.0992510393058+0.199084883465j))*x[1]
        ref[(0,)]=(0.00973272670413-0.932506077668j)*x_ref[0] + ((0.0992510393058+0.199084883465j))*x_ref[1]
        arg[(1,)]=(-0.423054710464-0.099704034238j)*x[0] + ((-0.926452273711+0.814126617861j))*x[1]
        ref[(1,)]=(-0.423054710464-0.099704034238j)*x_ref[0] + ((-0.926452273711+0.814126617861j))*x_ref[1]
        arg[(2,)]=(-0.190607999145-0.496514971692j)*x[0] + ((0.160657149961+0.194522825042j))*x[1]
        ref[(2,)]=(-0.190607999145-0.496514971692j)*x_ref[0] + ((0.160657149961+0.194522825042j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.856934777917+0.4932041237j)*x[2]
            ref[(0,)]+=(-0.856934777917+0.4932041237j)*x_ref[2]
            arg[(1,)]+=(0.930226179398-0.8806079437j)*x[2]
            ref[(1,)]+=(0.930226179398-0.8806079437j)*x_ref[2]
            arg[(2,)]+=(-0.536649255224+0.408768865666j)*x[2]
            ref[(2,)]+=(-0.536649255224+0.408768865666j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedSolution

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2),w)
        ref = Data(0,(3, 2),w_ref)
        arg[(0, 0)]=(-0.141409649812+0.343692552332j)*x[0] + ((-0.575164419185+0.423000374272j))*x[1]
        ref[(0, 0)]=(-0.141409649812+0.343692552332j)*x_ref[0] + ((-0.575164419185+0.423000374272j))*x_ref[1]
        arg[(0, 1)]=(-0.470066236871-0.725636398148j)*x[0] + ((0.00555559405348-0.759094712364j))*x[1]
        ref[(0, 1)]=(-0.470066236871-0.725636398148j)*x_ref[0] + ((0.00555559405348-0.759094712364j))*x_ref[1]
        arg[(1, 0)]=(0.130270360697+0.790901857474j)*x[0] + ((-0.170559670074-0.971945456523j))*x[1]
        ref[(1, 0)]=(0.130270360697+0.790901857474j)*x_ref[0] + ((-0.170559670074-0.971945456523j))*x_ref[1]
        arg[(1, 1)]=(-0.706173324312-0.675494932471j)*x[0] + ((0.64842013195-0.765128766173j))*x[1]
        ref[(1, 1)]=(-0.706173324312-0.675494932471j)*x_ref[0] + ((0.64842013195-0.765128766173j))*x_ref[1]
        arg[(2, 0)]=(0.292186436946-0.930421194354j)*x[0] + ((0.192370763487+0.0401016612686j))*x[1]
        ref[(2, 0)]=(0.292186436946-0.930421194354j)*x_ref[0] + ((0.192370763487+0.0401016612686j))*x_ref[1]
        arg[(2, 1)]=(0.299590734522+0.14814090766j)*x[0] + ((-0.469557893592+0.791282971936j))*x[1]
        ref[(2, 1)]=(0.299590734522+0.14814090766j)*x_ref[0] + ((-0.469557893592+0.791282971936j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.511751020417+0.0722074692015j)*x[2]
            ref[(0, 0)]+=(0.511751020417+0.0722074692015j)*x_ref[2]
            arg[(0, 1)]+=(0.394207888769+0.615137083144j)*x[2]
            ref[(0, 1)]+=(0.394207888769+0.615137083144j)*x_ref[2]
            arg[(1, 0)]+=(0.243477527065-0.0233841842747j)*x[2]
            ref[(1, 0)]+=(0.243477527065-0.0233841842747j)*x_ref[2]
            arg[(1, 1)]+=(0.0082486144859-0.274681907189j)*x[2]
            ref[(1, 1)]+=(0.0082486144859-0.274681907189j)*x_ref[2]
            arg[(2, 0)]+=(0.823455917928-0.618395675813j)*x[2]
            ref[(2, 0)]+=(0.823455917928-0.618395675813j)*x_ref[2]
            arg[(2, 1)]+=(0.10193050092+0.975176448884j)*x[2]
            ref[(2, 1)]+=(0.10193050092+0.975176448884j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedSolution

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 4),w)
        ref = Data(0,(2, 4, 4),w_ref)
        arg[(0, 0, 0)]=(0.758245945625-0.17323860051j)*x[0] + ((0.639259391224+0.731849067969j))*x[1]
        ref[(0, 0, 0)]=(0.758245945625-0.17323860051j)*x_ref[0] + ((0.639259391224+0.731849067969j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.118797361437-0.177130235148j)*x[0] + ((0.748455519001-0.367582446837j))*x[1]
        ref[(0, 0, 1)]=(-0.118797361437-0.177130235148j)*x_ref[0] + ((0.748455519001-0.367582446837j))*x_ref[1]
        arg[(0, 0, 2)]=(-0.645943424553-0.122417314131j)*x[0] + ((0.626110372471+0.797616355502j))*x[1]
        ref[(0, 0, 2)]=(-0.645943424553-0.122417314131j)*x_ref[0] + ((0.626110372471+0.797616355502j))*x_ref[1]
        arg[(0, 0, 3)]=(0.238865630944+0.975446512183j)*x[0] + ((-0.94787910221-0.12264091257j))*x[1]
        ref[(0, 0, 3)]=(0.238865630944+0.975446512183j)*x_ref[0] + ((-0.94787910221-0.12264091257j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.465580210759+0.718885416248j)*x[0] + ((-0.421287488307-0.0507367754931j))*x[1]
        ref[(0, 1, 0)]=(-0.465580210759+0.718885416248j)*x_ref[0] + ((-0.421287488307-0.0507367754931j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.432438262529+0.42771875269j)*x[0] + ((-0.424995429129-0.217685007208j))*x[1]
        ref[(0, 1, 1)]=(-0.432438262529+0.42771875269j)*x_ref[0] + ((-0.424995429129-0.217685007208j))*x_ref[1]
        arg[(0, 1, 2)]=(-0.137733058226+0.102455202214j)*x[0] + ((-0.305747188117-0.496590980172j))*x[1]
        ref[(0, 1, 2)]=(-0.137733058226+0.102455202214j)*x_ref[0] + ((-0.305747188117-0.496590980172j))*x_ref[1]
        arg[(0, 1, 3)]=(0.179331541476+0.354194528022j)*x[0] + ((-0.826636338074-0.647693091503j))*x[1]
        ref[(0, 1, 3)]=(0.179331541476+0.354194528022j)*x_ref[0] + ((-0.826636338074-0.647693091503j))*x_ref[1]
        arg[(0, 2, 0)]=(0.791483846725-0.845900380379j)*x[0] + ((0.240788864271-0.0726191955602j))*x[1]
        ref[(0, 2, 0)]=(0.791483846725-0.845900380379j)*x_ref[0] + ((0.240788864271-0.0726191955602j))*x_ref[1]
        arg[(0, 2, 1)]=(0.681303066467-0.619589987539j)*x[0] + ((-0.962911672454+0.506860707951j))*x[1]
        ref[(0, 2, 1)]=(0.681303066467-0.619589987539j)*x_ref[0] + ((-0.962911672454+0.506860707951j))*x_ref[1]
        arg[(0, 2, 2)]=(0.304990843349+0.569693355139j)*x[0] + ((-0.638969732857-0.0745496280078j))*x[1]
        ref[(0, 2, 2)]=(0.304990843349+0.569693355139j)*x_ref[0] + ((-0.638969732857-0.0745496280078j))*x_ref[1]
        arg[(0, 2, 3)]=(-0.534003878807-0.501374729275j)*x[0] + ((0.156574543153+0.377053261311j))*x[1]
        ref[(0, 2, 3)]=(-0.534003878807-0.501374729275j)*x_ref[0] + ((0.156574543153+0.377053261311j))*x_ref[1]
        arg[(0, 3, 0)]=(-0.611611626857-0.984303878551j)*x[0] + ((-0.812293002178-0.589404521874j))*x[1]
        ref[(0, 3, 0)]=(-0.611611626857-0.984303878551j)*x_ref[0] + ((-0.812293002178-0.589404521874j))*x_ref[1]
        arg[(0, 3, 1)]=(0.41521578301-0.740897970768j)*x[0] + ((0.780302612005+0.673000688327j))*x[1]
        ref[(0, 3, 1)]=(0.41521578301-0.740897970768j)*x_ref[0] + ((0.780302612005+0.673000688327j))*x_ref[1]
        arg[(0, 3, 2)]=(0.192366863029+0.485069993122j)*x[0] + ((-0.14269721588-0.26376417801j))*x[1]
        ref[(0, 3, 2)]=(0.192366863029+0.485069993122j)*x_ref[0] + ((-0.14269721588-0.26376417801j))*x_ref[1]
        arg[(0, 3, 3)]=(-0.163280105648+0.0883629313479j)*x[0] + ((-0.521652549049-0.113482777435j))*x[1]
        ref[(0, 3, 3)]=(-0.163280105648+0.0883629313479j)*x_ref[0] + ((-0.521652549049-0.113482777435j))*x_ref[1]
        arg[(1, 0, 0)]=(0.167230673213+0.011639479621j)*x[0] + ((-0.45454732174+0.310435930856j))*x[1]
        ref[(1, 0, 0)]=(0.167230673213+0.011639479621j)*x_ref[0] + ((-0.45454732174+0.310435930856j))*x_ref[1]
        arg[(1, 0, 1)]=(0.0791014059876+0.074675360503j)*x[0] + ((-0.430613620987+0.842781200357j))*x[1]
        ref[(1, 0, 1)]=(0.0791014059876+0.074675360503j)*x_ref[0] + ((-0.430613620987+0.842781200357j))*x_ref[1]
        arg[(1, 0, 2)]=(0.712870629843-0.425540190336j)*x[0] + ((0.220972654751-0.40257898048j))*x[1]
        ref[(1, 0, 2)]=(0.712870629843-0.425540190336j)*x_ref[0] + ((0.220972654751-0.40257898048j))*x_ref[1]
        arg[(1, 0, 3)]=(0.187875952429+0.699861385863j)*x[0] + ((0.361493019928-0.515262679028j))*x[1]
        ref[(1, 0, 3)]=(0.187875952429+0.699861385863j)*x_ref[0] + ((0.361493019928-0.515262679028j))*x_ref[1]
        arg[(1, 1, 0)]=(0.816522513639-0.147233482088j)*x[0] + ((0.239254405835-0.806080714872j))*x[1]
        ref[(1, 1, 0)]=(0.816522513639-0.147233482088j)*x_ref[0] + ((0.239254405835-0.806080714872j))*x_ref[1]
        arg[(1, 1, 1)]=(0.367608692135-0.150871490359j)*x[0] + ((0.989814980369+0.588536915709j))*x[1]
        ref[(1, 1, 1)]=(0.367608692135-0.150871490359j)*x_ref[0] + ((0.989814980369+0.588536915709j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.984883349144+0.659398189595j)*x[0] + ((-0.957320171701-0.939752506814j))*x[1]
        ref[(1, 1, 2)]=(-0.984883349144+0.659398189595j)*x_ref[0] + ((-0.957320171701-0.939752506814j))*x_ref[1]
        arg[(1, 1, 3)]=(-0.843771806245-0.100149912824j)*x[0] + ((-0.55572946251-0.994370322517j))*x[1]
        ref[(1, 1, 3)]=(-0.843771806245-0.100149912824j)*x_ref[0] + ((-0.55572946251-0.994370322517j))*x_ref[1]
        arg[(1, 2, 0)]=(0.556816339104+0.855664334007j)*x[0] + ((-0.30931463153+0.189185334821j))*x[1]
        ref[(1, 2, 0)]=(0.556816339104+0.855664334007j)*x_ref[0] + ((-0.30931463153+0.189185334821j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.0552777034733+0.54278098886j)*x[0] + ((0.187208915298+0.612354768529j))*x[1]
        ref[(1, 2, 1)]=(-0.0552777034733+0.54278098886j)*x_ref[0] + ((0.187208915298+0.612354768529j))*x_ref[1]
        arg[(1, 2, 2)]=(-0.952578176778-0.300542286766j)*x[0] + ((-0.432205351515-0.790398031877j))*x[1]
        ref[(1, 2, 2)]=(-0.952578176778-0.300542286766j)*x_ref[0] + ((-0.432205351515-0.790398031877j))*x_ref[1]
        arg[(1, 2, 3)]=(0.825541109555-0.734030407692j)*x[0] + ((-0.263936085364-0.956885179932j))*x[1]
        ref[(1, 2, 3)]=(0.825541109555-0.734030407692j)*x_ref[0] + ((-0.263936085364-0.956885179932j))*x_ref[1]
        arg[(1, 3, 0)]=(0.855485065803-0.0997068490729j)*x[0] + ((-0.940358287564-0.849309974396j))*x[1]
        ref[(1, 3, 0)]=(0.855485065803-0.0997068490729j)*x_ref[0] + ((-0.940358287564-0.849309974396j))*x_ref[1]
        arg[(1, 3, 1)]=(0.706014040839+0.00876287288901j)*x[0] + ((0.696619121915+0.412264010472j))*x[1]
        ref[(1, 3, 1)]=(0.706014040839+0.00876287288901j)*x_ref[0] + ((0.696619121915+0.412264010472j))*x_ref[1]
        arg[(1, 3, 2)]=(-0.275101007347-0.917945647599j)*x[0] + ((-0.0700765973847+0.460586250747j))*x[1]
        ref[(1, 3, 2)]=(-0.275101007347-0.917945647599j)*x_ref[0] + ((-0.0700765973847+0.460586250747j))*x_ref[1]
        arg[(1, 3, 3)]=(-0.565118108694-0.631396863514j)*x[0] + ((0.241683637993+0.103441987132j))*x[1]
        ref[(1, 3, 3)]=(-0.565118108694-0.631396863514j)*x_ref[0] + ((0.241683637993+0.103441987132j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.272019020944-0.0188365589362j)*x[2]
            ref[(0, 0, 0)]+=(-0.272019020944-0.0188365589362j)*x_ref[2]
            arg[(0, 0, 1)]+=(-0.364588706352+0.0640384070446j)*x[2]
            ref[(0, 0, 1)]+=(-0.364588706352+0.0640384070446j)*x_ref[2]
            arg[(0, 0, 2)]+=(-0.807646467439+0.341751041667j)*x[2]
            ref[(0, 0, 2)]+=(-0.807646467439+0.341751041667j)*x_ref[2]
            arg[(0, 0, 3)]+=(0.679957649031-0.130835180055j)*x[2]
            ref[(0, 0, 3)]+=(0.679957649031-0.130835180055j)*x_ref[2]
            arg[(0, 1, 0)]+=(0.0716614178461+0.474661522559j)*x[2]
            ref[(0, 1, 0)]+=(0.0716614178461+0.474661522559j)*x_ref[2]
            arg[(0, 1, 1)]+=(-0.114233385106-0.599729846601j)*x[2]
            ref[(0, 1, 1)]+=(-0.114233385106-0.599729846601j)*x_ref[2]
            arg[(0, 1, 2)]+=(-0.806740518284-0.706414074341j)*x[2]
            ref[(0, 1, 2)]+=(-0.806740518284-0.706414074341j)*x_ref[2]
            arg[(0, 1, 3)]+=(-0.208149105736-0.323392148639j)*x[2]
            ref[(0, 1, 3)]+=(-0.208149105736-0.323392148639j)*x_ref[2]
            arg[(0, 2, 0)]+=(0.603510289884+0.514907733206j)*x[2]
            ref[(0, 2, 0)]+=(0.603510289884+0.514907733206j)*x_ref[2]
            arg[(0, 2, 1)]+=(0.962020551928+0.774601445297j)*x[2]
            ref[(0, 2, 1)]+=(0.962020551928+0.774601445297j)*x_ref[2]
            arg[(0, 2, 2)]+=(-0.917717243273-0.168150146063j)*x[2]
            ref[(0, 2, 2)]+=(-0.917717243273-0.168150146063j)*x_ref[2]
            arg[(0, 2, 3)]+=(-0.296175145027+0.881152450049j)*x[2]
            ref[(0, 2, 3)]+=(-0.296175145027+0.881152450049j)*x_ref[2]
            arg[(0, 3, 0)]+=(-0.53531747545-0.781376107041j)*x[2]
            ref[(0, 3, 0)]+=(-0.53531747545-0.781376107041j)*x_ref[2]
            arg[(0, 3, 1)]+=(0.00437354915569-0.529640005362j)*x[2]
            ref[(0, 3, 1)]+=(0.00437354915569-0.529640005362j)*x_ref[2]
            arg[(0, 3, 2)]+=(-0.481304063089-0.876238684161j)*x[2]
            ref[(0, 3, 2)]+=(-0.481304063089-0.876238684161j)*x_ref[2]
            arg[(0, 3, 3)]+=(0.728380972008+0.0594223101381j)*x[2]
            ref[(0, 3, 3)]+=(0.728380972008+0.0594223101381j)*x_ref[2]
            arg[(1, 0, 0)]+=(-0.336173408364+0.114265050505j)*x[2]
            ref[(1, 0, 0)]+=(-0.336173408364+0.114265050505j)*x_ref[2]
            arg[(1, 0, 1)]+=(0.414157053248+0.0564263403194j)*x[2]
            ref[(1, 0, 1)]+=(0.414157053248+0.0564263403194j)*x_ref[2]
            arg[(1, 0, 2)]+=(0.241079688283-0.60255219676j)*x[2]
            ref[(1, 0, 2)]+=(0.241079688283-0.60255219676j)*x_ref[2]
            arg[(1, 0, 3)]+=(-0.585669967372+0.584557007512j)*x[2]
            ref[(1, 0, 3)]+=(-0.585669967372+0.584557007512j)*x_ref[2]
            arg[(1, 1, 0)]+=(0.997215833296+0.630222924374j)*x[2]
            ref[(1, 1, 0)]+=(0.997215833296+0.630222924374j)*x_ref[2]
            arg[(1, 1, 1)]+=(0.771115785603-0.919381429131j)*x[2]
            ref[(1, 1, 1)]+=(0.771115785603-0.919381429131j)*x_ref[2]
            arg[(1, 1, 2)]+=(-0.615792878278+0.436938947781j)*x[2]
            ref[(1, 1, 2)]+=(-0.615792878278+0.436938947781j)*x_ref[2]
            arg[(1, 1, 3)]+=(0.365020802543+0.989102735028j)*x[2]
            ref[(1, 1, 3)]+=(0.365020802543+0.989102735028j)*x_ref[2]
            arg[(1, 2, 0)]+=(-0.873201269409+0.293533670377j)*x[2]
            ref[(1, 2, 0)]+=(-0.873201269409+0.293533670377j)*x_ref[2]
            arg[(1, 2, 1)]+=(0.67064217663-0.862012031425j)*x[2]
            ref[(1, 2, 1)]+=(0.67064217663-0.862012031425j)*x_ref[2]
            arg[(1, 2, 2)]+=(0.198016268847+0.421316463362j)*x[2]
            ref[(1, 2, 2)]+=(0.198016268847+0.421316463362j)*x_ref[2]
            arg[(1, 2, 3)]+=(0.00951781801413-0.946511133709j)*x[2]
            ref[(1, 2, 3)]+=(0.00951781801413-0.946511133709j)*x_ref[2]
            arg[(1, 3, 0)]+=(0.46578733893-0.437430410992j)*x[2]
            ref[(1, 3, 0)]+=(0.46578733893-0.437430410992j)*x_ref[2]
            arg[(1, 3, 1)]+=(-0.569886178203-0.400363557606j)*x[2]
            ref[(1, 3, 1)]+=(-0.569886178203-0.400363557606j)*x_ref[2]
            arg[(1, 3, 2)]+=(0.741695322141-0.225117073882j)*x[2]
            ref[(1, 3, 2)]+=(0.741695322141-0.225117073882j)*x_ref[2]
            arg[(1, 3, 3)]+=(-0.614709140211-0.869053674686j)*x[2]
            ref[(1, 3, 3)]+=(-0.614709140211-0.869053674686j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedSolution_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedSolution

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 2, 2),w)
        ref = Data(0,(3, 4, 2, 2),w_ref)
        arg[(0, 0, 0, 0)]=(0.506767491672-0.173750989151j)*x[0] + ((0.934481549731+0.219743080871j))*x[1]
        ref[(0, 0, 0, 0)]=(0.506767491672-0.173750989151j)*x_ref[0] + ((0.934481549731+0.219743080871j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(0.923471607274+0.280072224056j)*x[0] + ((-0.998672965868+0.0248113258886j))*x[1]
        ref[(0, 0, 0, 1)]=(0.923471607274+0.280072224056j)*x_ref[0] + ((-0.998672965868+0.0248113258886j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.0459430487976+0.360527547525j)*x[0] + ((-0.693792953377+0.122878420801j))*x[1]
        ref[(0, 0, 1, 0)]=(0.0459430487976+0.360527547525j)*x_ref[0] + ((-0.693792953377+0.122878420801j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.279508320856+0.257027819259j)*x[0] + ((-0.12226845571+0.873593194021j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.279508320856+0.257027819259j)*x_ref[0] + ((-0.12226845571+0.873593194021j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(-0.129403804016+0.191788007446j)*x[0] + ((-0.339588091465-0.000560387555343j))*x[1]
        ref[(0, 1, 0, 0)]=(-0.129403804016+0.191788007446j)*x_ref[0] + ((-0.339588091465-0.000560387555343j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.351702627163-0.616945379635j)*x[0] + ((-0.555747350232+0.749239158322j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.351702627163-0.616945379635j)*x_ref[0] + ((-0.555747350232+0.749239158322j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.0838072576141-0.690355726598j)*x[0] + ((0.37122475254-0.0861001291287j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.0838072576141-0.690355726598j)*x_ref[0] + ((0.37122475254-0.0861001291287j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.662307647146-0.11823351395j)*x[0] + ((-0.410282829361-0.171404574595j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.662307647146-0.11823351395j)*x_ref[0] + ((-0.410282829361-0.171404574595j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(-0.0888338623382+0.262600121932j)*x[0] + ((-0.999785229611+0.792097421995j))*x[1]
        ref[(0, 2, 0, 0)]=(-0.0888338623382+0.262600121932j)*x_ref[0] + ((-0.999785229611+0.792097421995j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(-0.82705774732-0.655542077212j)*x[0] + ((-0.106254968069-0.790443606371j))*x[1]
        ref[(0, 2, 0, 1)]=(-0.82705774732-0.655542077212j)*x_ref[0] + ((-0.106254968069-0.790443606371j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(0.719833768398-0.307047566997j)*x[0] + ((-0.448247694748-0.697485041074j))*x[1]
        ref[(0, 2, 1, 0)]=(0.719833768398-0.307047566997j)*x_ref[0] + ((-0.448247694748-0.697485041074j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(-0.361025644656+0.579977785979j)*x[0] + ((-0.909261325691-0.96430674191j))*x[1]
        ref[(0, 2, 1, 1)]=(-0.361025644656+0.579977785979j)*x_ref[0] + ((-0.909261325691-0.96430674191j))*x_ref[1]
        arg[(0, 3, 0, 0)]=(-0.966517980224-0.901148011721j)*x[0] + ((-0.20038874157-0.495006472801j))*x[1]
        ref[(0, 3, 0, 0)]=(-0.966517980224-0.901148011721j)*x_ref[0] + ((-0.20038874157-0.495006472801j))*x_ref[1]
        arg[(0, 3, 0, 1)]=(0.930964250364+0.289535362763j)*x[0] + ((-0.986196116599-0.676122322486j))*x[1]
        ref[(0, 3, 0, 1)]=(0.930964250364+0.289535362763j)*x_ref[0] + ((-0.986196116599-0.676122322486j))*x_ref[1]
        arg[(0, 3, 1, 0)]=(0.74485588376-0.436732623735j)*x[0] + ((-0.681095685531+0.0972880497273j))*x[1]
        ref[(0, 3, 1, 0)]=(0.74485588376-0.436732623735j)*x_ref[0] + ((-0.681095685531+0.0972880497273j))*x_ref[1]
        arg[(0, 3, 1, 1)]=(0.677413967867-0.835291106615j)*x[0] + ((0.283069418709+0.99337577561j))*x[1]
        ref[(0, 3, 1, 1)]=(0.677413967867-0.835291106615j)*x_ref[0] + ((0.283069418709+0.99337577561j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.379843985733-0.647404490302j)*x[0] + ((-0.317190342649+0.710884840663j))*x[1]
        ref[(1, 0, 0, 0)]=(0.379843985733-0.647404490302j)*x_ref[0] + ((-0.317190342649+0.710884840663j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(-0.806285691658+0.880796799377j)*x[0] + ((-0.474876286289+0.7607646427j))*x[1]
        ref[(1, 0, 0, 1)]=(-0.806285691658+0.880796799377j)*x_ref[0] + ((-0.474876286289+0.7607646427j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.585144875395-0.857830057793j)*x[0] + ((0.619117113114+0.401012054346j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.585144875395-0.857830057793j)*x_ref[0] + ((0.619117113114+0.401012054346j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.0813591907627-0.213687324361j)*x[0] + ((0.166634548139+0.47573690137j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.0813591907627-0.213687324361j)*x_ref[0] + ((0.166634548139+0.47573690137j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.0475550634099-0.897671186341j)*x[0] + ((0.668055571375+0.421567022622j))*x[1]
        ref[(1, 1, 0, 0)]=(0.0475550634099-0.897671186341j)*x_ref[0] + ((0.668055571375+0.421567022622j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.620213061164+0.909064971944j)*x[0] + ((-0.219288599461+0.00199311128778j))*x[1]
        ref[(1, 1, 0, 1)]=(0.620213061164+0.909064971944j)*x_ref[0] + ((-0.219288599461+0.00199311128778j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.244994176815-0.314974803973j)*x[0] + ((-0.0148767188078+0.362410768698j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.244994176815-0.314974803973j)*x_ref[0] + ((-0.0148767188078+0.362410768698j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.974953642775+0.819612609617j)*x[0] + ((-0.50712057838+0.211886915654j))*x[1]
        ref[(1, 1, 1, 1)]=(0.974953642775+0.819612609617j)*x_ref[0] + ((-0.50712057838+0.211886915654j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(0.835439863057+0.619307624825j)*x[0] + ((0.691182495618+0.127899296927j))*x[1]
        ref[(1, 2, 0, 0)]=(0.835439863057+0.619307624825j)*x_ref[0] + ((0.691182495618+0.127899296927j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.922651958661-0.621727131747j)*x[0] + ((-0.792848164199+0.518738106646j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.922651958661-0.621727131747j)*x_ref[0] + ((-0.792848164199+0.518738106646j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(0.547174348194-0.921411468703j)*x[0] + ((0.651735502399+0.149730825112j))*x[1]
        ref[(1, 2, 1, 0)]=(0.547174348194-0.921411468703j)*x_ref[0] + ((0.651735502399+0.149730825112j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(-0.395514613847+0.0193946971294j)*x[0] + ((0.712961993114+0.763750252915j))*x[1]
        ref[(1, 2, 1, 1)]=(-0.395514613847+0.0193946971294j)*x_ref[0] + ((0.712961993114+0.763750252915j))*x_ref[1]
        arg[(1, 3, 0, 0)]=(-0.12612228343-0.437483264397j)*x[0] + ((0.934786945014-0.776911005114j))*x[1]
        ref[(1, 3, 0, 0)]=(-0.12612228343-0.437483264397j)*x_ref[0] + ((0.934786945014-0.776911005114j))*x_ref[1]
        arg[(1, 3, 0, 1)]=(0.361355619092+0.50192389587j)*x[0] + ((-0.64183558592-0.00240201024533j))*x[1]
        ref[(1, 3, 0, 1)]=(0.361355619092+0.50192389587j)*x_ref[0] + ((-0.64183558592-0.00240201024533j))*x_ref[1]
        arg[(1, 3, 1, 0)]=(0.801034347776+0.774092734464j)*x[0] + ((0.347630135849+0.465291966151j))*x[1]
        ref[(1, 3, 1, 0)]=(0.801034347776+0.774092734464j)*x_ref[0] + ((0.347630135849+0.465291966151j))*x_ref[1]
        arg[(1, 3, 1, 1)]=(-0.0661754693855-0.887261569541j)*x[0] + ((0.314748970621-0.909092792193j))*x[1]
        ref[(1, 3, 1, 1)]=(-0.0661754693855-0.887261569541j)*x_ref[0] + ((0.314748970621-0.909092792193j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(0.00846033703995+0.558055697676j)*x[0] + ((-0.432048795583-0.175403822487j))*x[1]
        ref[(2, 0, 0, 0)]=(0.00846033703995+0.558055697676j)*x_ref[0] + ((-0.432048795583-0.175403822487j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(0.212861949665-0.324418969711j)*x[0] + ((0.372696436739-0.242628258806j))*x[1]
        ref[(2, 0, 0, 1)]=(0.212861949665-0.324418969711j)*x_ref[0] + ((0.372696436739-0.242628258806j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(-0.463792032259+0.817516936074j)*x[0] + ((-0.17731742797-0.240841908654j))*x[1]
        ref[(2, 0, 1, 0)]=(-0.463792032259+0.817516936074j)*x_ref[0] + ((-0.17731742797-0.240841908654j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(-0.884116425537+0.288911460252j)*x[0] + ((0.684093023616+0.156579686344j))*x[1]
        ref[(2, 0, 1, 1)]=(-0.884116425537+0.288911460252j)*x_ref[0] + ((0.684093023616+0.156579686344j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(0.830413196776-0.0665546820234j)*x[0] + ((0.508071827934-0.0872560108818j))*x[1]
        ref[(2, 1, 0, 0)]=(0.830413196776-0.0665546820234j)*x_ref[0] + ((0.508071827934-0.0872560108818j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.118186501379+0.1069658103j)*x[0] + ((-0.0712194814044-0.481180746155j))*x[1]
        ref[(2, 1, 0, 1)]=(0.118186501379+0.1069658103j)*x_ref[0] + ((-0.0712194814044-0.481180746155j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(0.426601403603+0.844267366113j)*x[0] + ((0.479571204981+0.138060085399j))*x[1]
        ref[(2, 1, 1, 0)]=(0.426601403603+0.844267366113j)*x_ref[0] + ((0.479571204981+0.138060085399j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(-0.226886540736-0.283257293396j)*x[0] + ((-0.661289129682+0.398926504761j))*x[1]
        ref[(2, 1, 1, 1)]=(-0.226886540736-0.283257293396j)*x_ref[0] + ((-0.661289129682+0.398926504761j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(-0.13689174809-0.338740569739j)*x[0] + ((-0.40556290891+0.774601740718j))*x[1]
        ref[(2, 2, 0, 0)]=(-0.13689174809-0.338740569739j)*x_ref[0] + ((-0.40556290891+0.774601740718j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(0.00263317551114+0.724600210016j)*x[0] + ((0.542378828047+0.258480235963j))*x[1]
        ref[(2, 2, 0, 1)]=(0.00263317551114+0.724600210016j)*x_ref[0] + ((0.542378828047+0.258480235963j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(0.85875638809-0.335938029619j)*x[0] + ((0.886363396914+0.880963452698j))*x[1]
        ref[(2, 2, 1, 0)]=(0.85875638809-0.335938029619j)*x_ref[0] + ((0.886363396914+0.880963452698j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(0.770715558217-0.651112786116j)*x[0] + ((-0.831815737402+0.980465083147j))*x[1]
        ref[(2, 2, 1, 1)]=(0.770715558217-0.651112786116j)*x_ref[0] + ((-0.831815737402+0.980465083147j))*x_ref[1]
        arg[(2, 3, 0, 0)]=(-0.795664300823-0.39095581676j)*x[0] + ((-0.682507461356-0.0605951552173j))*x[1]
        ref[(2, 3, 0, 0)]=(-0.795664300823-0.39095581676j)*x_ref[0] + ((-0.682507461356-0.0605951552173j))*x_ref[1]
        arg[(2, 3, 0, 1)]=(0.439471303851+0.899862371132j)*x[0] + ((-0.832304382687-0.50382354797j))*x[1]
        ref[(2, 3, 0, 1)]=(0.439471303851+0.899862371132j)*x_ref[0] + ((-0.832304382687-0.50382354797j))*x_ref[1]
        arg[(2, 3, 1, 0)]=(-0.0732568924981+0.206468857482j)*x[0] + ((0.921830393059-0.872780826034j))*x[1]
        ref[(2, 3, 1, 0)]=(-0.0732568924981+0.206468857482j)*x_ref[0] + ((0.921830393059-0.872780826034j))*x_ref[1]
        arg[(2, 3, 1, 1)]=(-0.569131887501-0.784459783824j)*x[0] + ((-0.563207737183+0.111304743162j))*x[1]
        ref[(2, 3, 1, 1)]=(-0.569131887501-0.784459783824j)*x_ref[0] + ((-0.563207737183+0.111304743162j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.508481398937-0.196338457571j)*x[2]
            ref[(0, 0, 0, 0)]+=(0.508481398937-0.196338457571j)*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.388089863021-0.459214071409j)*x[2]
            ref[(0, 0, 0, 1)]+=(-0.388089863021-0.459214071409j)*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.887223130383+0.743692505097j)*x[2]
            ref[(0, 0, 1, 0)]+=(-0.887223130383+0.743692505097j)*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.986560193399-0.409455282422j)*x[2]
            ref[(0, 0, 1, 1)]+=(-0.986560193399-0.409455282422j)*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.372948386894+0.434228264715j)*x[2]
            ref[(0, 1, 0, 0)]+=(-0.372948386894+0.434228264715j)*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.354688190022+0.100881618371j)*x[2]
            ref[(0, 1, 0, 1)]+=(0.354688190022+0.100881618371j)*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.988124244869-0.979839317055j)*x[2]
            ref[(0, 1, 1, 0)]+=(-0.988124244869-0.979839317055j)*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.888025134804+0.918255626005j)*x[2]
            ref[(0, 1, 1, 1)]+=(-0.888025134804+0.918255626005j)*x_ref[2]
            arg[(0, 2, 0, 0)]+=(-0.484190472615-0.0988899582956j)*x[2]
            ref[(0, 2, 0, 0)]+=(-0.484190472615-0.0988899582956j)*x_ref[2]
            arg[(0, 2, 0, 1)]+=(-0.641559482559+0.686158518857j)*x[2]
            ref[(0, 2, 0, 1)]+=(-0.641559482559+0.686158518857j)*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.490231229673+0.467852156342j)*x[2]
            ref[(0, 2, 1, 0)]+=(-0.490231229673+0.467852156342j)*x_ref[2]
            arg[(0, 2, 1, 1)]+=(0.52527464851+0.652063706738j)*x[2]
            ref[(0, 2, 1, 1)]+=(0.52527464851+0.652063706738j)*x_ref[2]
            arg[(0, 3, 0, 0)]+=(0.289753252959+0.454229405204j)*x[2]
            ref[(0, 3, 0, 0)]+=(0.289753252959+0.454229405204j)*x_ref[2]
            arg[(0, 3, 0, 1)]+=(0.897757102547-0.406518316878j)*x[2]
            ref[(0, 3, 0, 1)]+=(0.897757102547-0.406518316878j)*x_ref[2]
            arg[(0, 3, 1, 0)]+=(-0.509594731231-0.107065753681j)*x[2]
            ref[(0, 3, 1, 0)]+=(-0.509594731231-0.107065753681j)*x_ref[2]
            arg[(0, 3, 1, 1)]+=(-0.269762527313+0.360362918175j)*x[2]
            ref[(0, 3, 1, 1)]+=(-0.269762527313+0.360362918175j)*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.685373048544-0.353671673166j)*x[2]
            ref[(1, 0, 0, 0)]+=(-0.685373048544-0.353671673166j)*x_ref[2]
            arg[(1, 0, 0, 1)]+=(-0.855156132212+0.0219065531225j)*x[2]
            ref[(1, 0, 0, 1)]+=(-0.855156132212+0.0219065531225j)*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.982126952056-0.39657838487j)*x[2]
            ref[(1, 0, 1, 0)]+=(0.982126952056-0.39657838487j)*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.679886266689-0.0749480183272j)*x[2]
            ref[(1, 0, 1, 1)]+=(-0.679886266689-0.0749480183272j)*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.721272914757+0.936765092701j)*x[2]
            ref[(1, 1, 0, 0)]+=(-0.721272914757+0.936765092701j)*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.993473679742-0.438327239067j)*x[2]
            ref[(1, 1, 0, 1)]+=(-0.993473679742-0.438327239067j)*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.239514378906-0.69694263999j)*x[2]
            ref[(1, 1, 1, 0)]+=(0.239514378906-0.69694263999j)*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.67253774374-0.828905252176j)*x[2]
            ref[(1, 1, 1, 1)]+=(0.67253774374-0.828905252176j)*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.057261495334-0.480406612178j)*x[2]
            ref[(1, 2, 0, 0)]+=(0.057261495334-0.480406612178j)*x_ref[2]
            arg[(1, 2, 0, 1)]+=(-0.674879207715+0.714479732154j)*x[2]
            ref[(1, 2, 0, 1)]+=(-0.674879207715+0.714479732154j)*x_ref[2]
            arg[(1, 2, 1, 0)]+=(-0.301610501935-0.920638449246j)*x[2]
            ref[(1, 2, 1, 0)]+=(-0.301610501935-0.920638449246j)*x_ref[2]
            arg[(1, 2, 1, 1)]+=(0.100442849+0.699999461081j)*x[2]
            ref[(1, 2, 1, 1)]+=(0.100442849+0.699999461081j)*x_ref[2]
            arg[(1, 3, 0, 0)]+=(0.0848382607858-0.220742656043j)*x[2]
            ref[(1, 3, 0, 0)]+=(0.0848382607858-0.220742656043j)*x_ref[2]
            arg[(1, 3, 0, 1)]+=(0.731813021248+0.239282079597j)*x[2]
            ref[(1, 3, 0, 1)]+=(0.731813021248+0.239282079597j)*x_ref[2]
            arg[(1, 3, 1, 0)]+=(0.914337320777+0.698537015791j)*x[2]
            ref[(1, 3, 1, 0)]+=(0.914337320777+0.698537015791j)*x_ref[2]
            arg[(1, 3, 1, 1)]+=(-0.0410744653927+0.810782131966j)*x[2]
            ref[(1, 3, 1, 1)]+=(-0.0410744653927+0.810782131966j)*x_ref[2]
            arg[(2, 0, 0, 0)]+=(-0.976689851366+0.106010193062j)*x[2]
            ref[(2, 0, 0, 0)]+=(-0.976689851366+0.106010193062j)*x_ref[2]
            arg[(2, 0, 0, 1)]+=(0.0628576683482+0.357646654995j)*x[2]
            ref[(2, 0, 0, 1)]+=(0.0628576683482+0.357646654995j)*x_ref[2]
            arg[(2, 0, 1, 0)]+=(-0.0985351477939-0.809646638202j)*x[2]
            ref[(2, 0, 1, 0)]+=(-0.0985351477939-0.809646638202j)*x_ref[2]
            arg[(2, 0, 1, 1)]+=(0.142564100026-0.820007888485j)*x[2]
            ref[(2, 0, 1, 1)]+=(0.142564100026-0.820007888485j)*x_ref[2]
            arg[(2, 1, 0, 0)]+=(-0.670854889264-0.459529416044j)*x[2]
            ref[(2, 1, 0, 0)]+=(-0.670854889264-0.459529416044j)*x_ref[2]
            arg[(2, 1, 0, 1)]+=(-0.455883285378-0.567655011511j)*x[2]
            ref[(2, 1, 0, 1)]+=(-0.455883285378-0.567655011511j)*x_ref[2]
            arg[(2, 1, 1, 0)]+=(0.000384496495861-0.70514806593j)*x[2]
            ref[(2, 1, 1, 0)]+=(0.000384496495861-0.70514806593j)*x_ref[2]
            arg[(2, 1, 1, 1)]+=(-0.526148368767+0.967252851211j)*x[2]
            ref[(2, 1, 1, 1)]+=(-0.526148368767+0.967252851211j)*x_ref[2]
            arg[(2, 2, 0, 0)]+=(0.738864339506-0.733209728872j)*x[2]
            ref[(2, 2, 0, 0)]+=(0.738864339506-0.733209728872j)*x_ref[2]
            arg[(2, 2, 0, 1)]+=(-0.964980397788-0.540509577225j)*x[2]
            ref[(2, 2, 0, 1)]+=(-0.964980397788-0.540509577225j)*x_ref[2]
            arg[(2, 2, 1, 0)]+=(-0.0743253320047-0.981962837026j)*x[2]
            ref[(2, 2, 1, 0)]+=(-0.0743253320047-0.981962837026j)*x_ref[2]
            arg[(2, 2, 1, 1)]+=(-0.299354271426+0.373924939273j)*x[2]
            ref[(2, 2, 1, 1)]+=(-0.299354271426+0.373924939273j)*x_ref[2]
            arg[(2, 3, 0, 0)]+=(0.279554373567+0.404256949037j)*x[2]
            ref[(2, 3, 0, 0)]+=(0.279554373567+0.404256949037j)*x_ref[2]
            arg[(2, 3, 0, 1)]+=(-0.494803252345+0.22505816208j)*x[2]
            ref[(2, 3, 0, 1)]+=(-0.494803252345+0.22505816208j)*x_ref[2]
            arg[(2, 3, 1, 0)]+=(0.828587534518-0.526726872803j)*x[2]
            ref[(2, 3, 1, 0)]+=(0.828587534518-0.526726872803j)*x_ref[2]
            arg[(2, 3, 1, 1)]+=(0.145248685773+0.21198950125j)*x[2]
            ref[(2, 3, 1, 1)]+=(0.145248685773+0.21198950125j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedContinuousFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.0791259696384+0.600418218962j)*x[0]**o + ((0.0597209915325+0.713344872879j))*x[0] + ((0.119881707842+0.331828836828j))*x[1]**o + ((-0.288053702681-0.720784833156j))*x[1]
        ref=(0.0791259696384+0.600418218962j)*x_ref[0]**o + ((0.0597209915325+0.713344872879j))*x_ref[0] + ((0.119881707842+0.331828836828j))*x_ref[1]**o + ((-0.288053702681-0.720784833156j))*x_ref[1]
        if dim==3:
            arg+=((-0.713538203608+0.966381721127j))*x[2]**o + ((-0.138064104325-0.819896094991j))*x[2]
            ref+=((-0.713538203608+0.966381721127j))*x_ref[2]**o + ((-0.138064104325-0.819896094991j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedContinuousFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=(0.207483404031+0.328868307056j)*x[0]**o + ((0.00187074535625-0.303298318573j))*x[0] + ((-0.614194650403+0.272036100255j))*x[1]**o + ((0.530981455695+0.366718053792j))*x[1]
        ref[(0,)]=(0.207483404031+0.328868307056j)*x_ref[0]**o + ((0.00187074535625-0.303298318573j))*x_ref[0] + ((-0.614194650403+0.272036100255j))*x_ref[1]**o + ((0.530981455695+0.366718053792j))*x_ref[1]
        arg[(1,)]=(-0.751847782727-0.556032835007j)*x[0]**o + ((-0.20357848568-0.0592552103478j))*x[0] + ((-0.281221468492-0.195097745821j))*x[1]**o + ((0.170497008403+0.0360099098916j))*x[1]
        ref[(1,)]=(-0.751847782727-0.556032835007j)*x_ref[0]**o + ((-0.20357848568-0.0592552103478j))*x_ref[0] + ((-0.281221468492-0.195097745821j))*x_ref[1]**o + ((0.170497008403+0.0360099098916j))*x_ref[1]
        arg[(2,)]=(0.539666728882-0.519377225001j)*x[0]**o + ((0.192534205089+0.597733813648j))*x[0] + ((0.603243240512-0.826586664965j))*x[1]**o + ((-0.958109385408-0.497560585076j))*x[1]
        ref[(2,)]=(0.539666728882-0.519377225001j)*x_ref[0]**o + ((0.192534205089+0.597733813648j))*x_ref[0] + ((0.603243240512-0.826586664965j))*x_ref[1]**o + ((-0.958109385408-0.497560585076j))*x_ref[1]
        arg[(3,)]=(0.435168191548-0.810916564122j)*x[0]**o + ((-0.482983320016-0.931037670226j))*x[0] + ((0.660750833355-0.555394874468j))*x[1]**o + ((-0.620653021996+0.347370266123j))*x[1]
        ref[(3,)]=(0.435168191548-0.810916564122j)*x_ref[0]**o + ((-0.482983320016-0.931037670226j))*x_ref[0] + ((0.660750833355-0.555394874468j))*x_ref[1]**o + ((-0.620653021996+0.347370266123j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.844334667864-0.494607840141j)*x[2]**o + ((-0.971528703007+0.790345526041j))*x[2]
            ref[(0,)]+=(0.844334667864-0.494607840141j)*x_ref[2]**o + ((-0.971528703007+0.790345526041j))*x_ref[2]
            arg[(1,)]+=(0.00498863005193+0.173261369167j)*x[2]**o + ((-0.320658935779+0.824437461496j))*x[2]
            ref[(1,)]+=(0.00498863005193+0.173261369167j)*x_ref[2]**o + ((-0.320658935779+0.824437461496j))*x_ref[2]
            arg[(2,)]+=(0.209652155135+0.56241000681j)*x[2]**o + ((-0.266984953159+0.663513033468j))*x[2]
            ref[(2,)]+=(0.209652155135+0.56241000681j)*x_ref[2]**o + ((-0.266984953159+0.663513033468j))*x_ref[2]
            arg[(3,)]+=(-0.128526504271-0.736812965139j)*x[2]**o + ((0.436240822405+0.46105036541j))*x[2]
            ref[(3,)]+=(-0.128526504271-0.736812965139j)*x_ref[2]**o + ((0.436240822405+0.46105036541j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedContinuousFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref = Data(0,(3, 4),w_ref)
        arg[(0, 0)]=(-0.496499932726+0.266151644609j)*x[0]**o + ((-0.44631800278-0.0355342326767j))*x[0] + ((-0.901190312275+0.124674016435j))*x[1]**o + ((0.367954072202+0.276562230393j))*x[1]
        ref[(0, 0)]=(-0.496499932726+0.266151644609j)*x_ref[0]**o + ((-0.44631800278-0.0355342326767j))*x_ref[0] + ((-0.901190312275+0.124674016435j))*x_ref[1]**o + ((0.367954072202+0.276562230393j))*x_ref[1]
        arg[(0, 1)]=(0.442951829917+0.821937598564j)*x[0]**o + ((-0.4052603449-0.529334466158j))*x[0] + ((-0.148494741196+0.855864536286j))*x[1]**o + ((-0.0436760082921+0.737839252533j))*x[1]
        ref[(0, 1)]=(0.442951829917+0.821937598564j)*x_ref[0]**o + ((-0.4052603449-0.529334466158j))*x_ref[0] + ((-0.148494741196+0.855864536286j))*x_ref[1]**o + ((-0.0436760082921+0.737839252533j))*x_ref[1]
        arg[(0, 2)]=(0.303181697673-0.686559533388j)*x[0]**o + ((0.267780290268+0.827344380647j))*x[0] + ((-0.69782612095-0.881286798893j))*x[1]**o + ((-0.522575653316-0.567718262708j))*x[1]
        ref[(0, 2)]=(0.303181697673-0.686559533388j)*x_ref[0]**o + ((0.267780290268+0.827344380647j))*x_ref[0] + ((-0.69782612095-0.881286798893j))*x_ref[1]**o + ((-0.522575653316-0.567718262708j))*x_ref[1]
        arg[(0, 3)]=(-0.924466089494-0.0835951483578j)*x[0]**o + ((0.108752627227-0.718989019254j))*x[0] + ((-0.992281527504-0.161239713291j))*x[1]**o + ((0.860250598423+0.984937619689j))*x[1]
        ref[(0, 3)]=(-0.924466089494-0.0835951483578j)*x_ref[0]**o + ((0.108752627227-0.718989019254j))*x_ref[0] + ((-0.992281527504-0.161239713291j))*x_ref[1]**o + ((0.860250598423+0.984937619689j))*x_ref[1]
        arg[(1, 0)]=(0.920123913717+0.249293362299j)*x[0]**o + ((-0.329128900598+0.273229440905j))*x[0] + ((-0.903970680398+0.562187107498j))*x[1]**o + ((-0.261637353529-0.114515785303j))*x[1]
        ref[(1, 0)]=(0.920123913717+0.249293362299j)*x_ref[0]**o + ((-0.329128900598+0.273229440905j))*x_ref[0] + ((-0.903970680398+0.562187107498j))*x_ref[1]**o + ((-0.261637353529-0.114515785303j))*x_ref[1]
        arg[(1, 1)]=(-0.721955789714+0.420033908111j)*x[0]**o + ((-0.173613934237-0.171104713739j))*x[0] + ((-0.526291271822+0.542019973185j))*x[1]**o + ((-0.744490555418+0.426703159203j))*x[1]
        ref[(1, 1)]=(-0.721955789714+0.420033908111j)*x_ref[0]**o + ((-0.173613934237-0.171104713739j))*x_ref[0] + ((-0.526291271822+0.542019973185j))*x_ref[1]**o + ((-0.744490555418+0.426703159203j))*x_ref[1]
        arg[(1, 2)]=(0.719983653044-0.192348335886j)*x[0]**o + ((0.486413802326+0.571890516639j))*x[0] + ((0.888972022068+0.909298517846j))*x[1]**o + ((-0.304218008635-0.00555265867915j))*x[1]
        ref[(1, 2)]=(0.719983653044-0.192348335886j)*x_ref[0]**o + ((0.486413802326+0.571890516639j))*x_ref[0] + ((0.888972022068+0.909298517846j))*x_ref[1]**o + ((-0.304218008635-0.00555265867915j))*x_ref[1]
        arg[(1, 3)]=(-0.958427848075-0.74437225765j)*x[0]**o + ((-0.508840557418-0.178753595725j))*x[0] + ((0.248424858891-0.246804810398j))*x[1]**o + ((0.701926077042+0.817754792929j))*x[1]
        ref[(1, 3)]=(-0.958427848075-0.74437225765j)*x_ref[0]**o + ((-0.508840557418-0.178753595725j))*x_ref[0] + ((0.248424858891-0.246804810398j))*x_ref[1]**o + ((0.701926077042+0.817754792929j))*x_ref[1]
        arg[(2, 0)]=(0.208399459144-0.811340298716j)*x[0]**o + ((-0.782228454872+0.241730166929j))*x[0] + ((0.983279496919+0.577172458004j))*x[1]**o + ((0.360435099719-0.71131024479j))*x[1]
        ref[(2, 0)]=(0.208399459144-0.811340298716j)*x_ref[0]**o + ((-0.782228454872+0.241730166929j))*x_ref[0] + ((0.983279496919+0.577172458004j))*x_ref[1]**o + ((0.360435099719-0.71131024479j))*x_ref[1]
        arg[(2, 1)]=(-0.347692415909-0.102859927101j)*x[0]**o + ((0.430432316529+0.362250342497j))*x[0] + ((0.753800079764+0.835074126729j))*x[1]**o + ((0.0444239301673-0.498303301291j))*x[1]
        ref[(2, 1)]=(-0.347692415909-0.102859927101j)*x_ref[0]**o + ((0.430432316529+0.362250342497j))*x_ref[0] + ((0.753800079764+0.835074126729j))*x_ref[1]**o + ((0.0444239301673-0.498303301291j))*x_ref[1]
        arg[(2, 2)]=(-0.357022896067+0.536079593557j)*x[0]**o + ((-0.60277269536-0.13309927752j))*x[0] + ((-0.242364558051+0.714419070741j))*x[1]**o + ((0.647677215971-0.418632619535j))*x[1]
        ref[(2, 2)]=(-0.357022896067+0.536079593557j)*x_ref[0]**o + ((-0.60277269536-0.13309927752j))*x_ref[0] + ((-0.242364558051+0.714419070741j))*x_ref[1]**o + ((0.647677215971-0.418632619535j))*x_ref[1]
        arg[(2, 3)]=(0.831149580191+0.462325900785j)*x[0]**o + ((0.0349271483744+0.0624226893627j))*x[0] + ((0.354672325186-0.23186731952j))*x[1]**o + ((0.784425031667+0.914140101666j))*x[1]
        ref[(2, 3)]=(0.831149580191+0.462325900785j)*x_ref[0]**o + ((0.0349271483744+0.0624226893627j))*x_ref[0] + ((0.354672325186-0.23186731952j))*x_ref[1]**o + ((0.784425031667+0.914140101666j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.96578421743-0.393690558172j)*x[2]**o + ((-0.142622412282-0.37987747657j))*x[2]
            ref[(0, 0)]+=(0.96578421743-0.393690558172j)*x_ref[2]**o + ((-0.142622412282-0.37987747657j))*x_ref[2]
            arg[(0, 1)]+=(0.556113827842+0.656393339862j)*x[2]**o + ((-0.277160449944-0.926887709834j))*x[2]
            ref[(0, 1)]+=(0.556113827842+0.656393339862j)*x_ref[2]**o + ((-0.277160449944-0.926887709834j))*x_ref[2]
            arg[(0, 2)]+=(-0.88361755455-0.35566181498j)*x[2]**o + ((-0.934517720492-0.471182907746j))*x[2]
            ref[(0, 2)]+=(-0.88361755455-0.35566181498j)*x_ref[2]**o + ((-0.934517720492-0.471182907746j))*x_ref[2]
            arg[(0, 3)]+=(0.635725932772+0.504361741876j)*x[2]**o + ((0.901291611648+0.770452856882j))*x[2]
            ref[(0, 3)]+=(0.635725932772+0.504361741876j)*x_ref[2]**o + ((0.901291611648+0.770452856882j))*x_ref[2]
            arg[(1, 0)]+=(0.771871378698+0.795570818755j)*x[2]**o + ((-0.326476910382-0.935595179243j))*x[2]
            ref[(1, 0)]+=(0.771871378698+0.795570818755j)*x_ref[2]**o + ((-0.326476910382-0.935595179243j))*x_ref[2]
            arg[(1, 1)]+=(0.405256819168-0.651378303651j)*x[2]**o + ((0.85374386575-0.0875250693237j))*x[2]
            ref[(1, 1)]+=(0.405256819168-0.651378303651j)*x_ref[2]**o + ((0.85374386575-0.0875250693237j))*x_ref[2]
            arg[(1, 2)]+=(-0.0383192714274+0.377164933631j)*x[2]**o + ((0.198923165354+0.947839397457j))*x[2]
            ref[(1, 2)]+=(-0.0383192714274+0.377164933631j)*x_ref[2]**o + ((0.198923165354+0.947839397457j))*x_ref[2]
            arg[(1, 3)]+=(0.950314396694+0.32508142651j)*x[2]**o + ((0.932740547679+0.627573669481j))*x[2]
            ref[(1, 3)]+=(0.950314396694+0.32508142651j)*x_ref[2]**o + ((0.932740547679+0.627573669481j))*x_ref[2]
            arg[(2, 0)]+=(-0.185896389115-0.033140356985j)*x[2]**o + ((0.740947263187-0.569341087526j))*x[2]
            ref[(2, 0)]+=(-0.185896389115-0.033140356985j)*x_ref[2]**o + ((0.740947263187-0.569341087526j))*x_ref[2]
            arg[(2, 1)]+=(0.441804188115+0.306127796808j)*x[2]**o + ((-0.246865920639-0.807194697622j))*x[2]
            ref[(2, 1)]+=(0.441804188115+0.306127796808j)*x_ref[2]**o + ((-0.246865920639-0.807194697622j))*x_ref[2]
            arg[(2, 2)]+=(-0.162761638577+0.246555060334j)*x[2]**o + ((0.78483707683-0.6321946373j))*x[2]
            ref[(2, 2)]+=(-0.162761638577+0.246555060334j)*x_ref[2]**o + ((0.78483707683-0.6321946373j))*x_ref[2]
            arg[(2, 3)]+=(0.636383681474-0.0570386586352j)*x[2]**o + ((0.292449742899-0.0666821350163j))*x[2]
            ref[(2, 3)]+=(0.636383681474-0.0570386586352j)*x_ref[2]**o + ((0.292449742899-0.0666821350163j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedContinuousFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 3),w)
        ref = Data(0,(2, 3, 3),w_ref)
        arg[(0, 0, 0)]=(0.221732626828-0.36479788883j)*x[0]**o + ((0.812766962106+0.336063883442j))*x[0] + ((0.45429782309-0.514397497139j))*x[1]**o + ((0.963929204608-0.530764222271j))*x[1]
        ref[(0, 0, 0)]=(0.221732626828-0.36479788883j)*x_ref[0]**o + ((0.812766962106+0.336063883442j))*x_ref[0] + ((0.45429782309-0.514397497139j))*x_ref[1]**o + ((0.963929204608-0.530764222271j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.797148104525-0.709383655605j)*x[0]**o + ((-0.477770996026-0.268210809291j))*x[0] + ((0.793823625542+0.27501461057j))*x[1]**o + ((-0.97286832568+0.836876816572j))*x[1]
        ref[(0, 0, 1)]=(-0.797148104525-0.709383655605j)*x_ref[0]**o + ((-0.477770996026-0.268210809291j))*x_ref[0] + ((0.793823625542+0.27501461057j))*x_ref[1]**o + ((-0.97286832568+0.836876816572j))*x_ref[1]
        arg[(0, 0, 2)]=(0.321563496557-0.868964769902j)*x[0]**o + ((0.088153544304+0.620350657538j))*x[0] + ((0.748641041146-0.265397231255j))*x[1]**o + ((-0.496141659726+0.364468707479j))*x[1]
        ref[(0, 0, 2)]=(0.321563496557-0.868964769902j)*x_ref[0]**o + ((0.088153544304+0.620350657538j))*x_ref[0] + ((0.748641041146-0.265397231255j))*x_ref[1]**o + ((-0.496141659726+0.364468707479j))*x_ref[1]
        arg[(0, 1, 0)]=(0.646137775087-0.0435953908938j)*x[0]**o + ((0.100216074773-0.67532787063j))*x[0] + ((-0.823501818573+0.879509064362j))*x[1]**o + ((-0.842209542978+0.74303918582j))*x[1]
        ref[(0, 1, 0)]=(0.646137775087-0.0435953908938j)*x_ref[0]**o + ((0.100216074773-0.67532787063j))*x_ref[0] + ((-0.823501818573+0.879509064362j))*x_ref[1]**o + ((-0.842209542978+0.74303918582j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.425700682489-0.991311548787j)*x[0]**o + ((-0.0907631245685-0.0799864556434j))*x[0] + ((-0.970758797337+0.463681918269j))*x[1]**o + ((0.398637399817+0.0994785104571j))*x[1]
        ref[(0, 1, 1)]=(-0.425700682489-0.991311548787j)*x_ref[0]**o + ((-0.0907631245685-0.0799864556434j))*x_ref[0] + ((-0.970758797337+0.463681918269j))*x_ref[1]**o + ((0.398637399817+0.0994785104571j))*x_ref[1]
        arg[(0, 1, 2)]=(0.739447304762-0.620470945515j)*x[0]**o + ((-0.507440993705+0.662688916613j))*x[0] + ((0.649877857149-0.148234718357j))*x[1]**o + ((0.638620539719+0.242381433741j))*x[1]
        ref[(0, 1, 2)]=(0.739447304762-0.620470945515j)*x_ref[0]**o + ((-0.507440993705+0.662688916613j))*x_ref[0] + ((0.649877857149-0.148234718357j))*x_ref[1]**o + ((0.638620539719+0.242381433741j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.255053841042-0.0376061934939j)*x[0]**o + ((0.129321006076+0.161066040349j))*x[0] + ((-0.0530447538809-0.867696189721j))*x[1]**o + ((-0.155164267003+0.85183510982j))*x[1]
        ref[(0, 2, 0)]=(-0.255053841042-0.0376061934939j)*x_ref[0]**o + ((0.129321006076+0.161066040349j))*x_ref[0] + ((-0.0530447538809-0.867696189721j))*x_ref[1]**o + ((-0.155164267003+0.85183510982j))*x_ref[1]
        arg[(0, 2, 1)]=(0.951445043351+0.0712108504754j)*x[0]**o + ((-0.874881534698+0.813952668532j))*x[0] + ((-0.928071811809-0.430539680208j))*x[1]**o + ((-0.870056568674+0.724439152643j))*x[1]
        ref[(0, 2, 1)]=(0.951445043351+0.0712108504754j)*x_ref[0]**o + ((-0.874881534698+0.813952668532j))*x_ref[0] + ((-0.928071811809-0.430539680208j))*x_ref[1]**o + ((-0.870056568674+0.724439152643j))*x_ref[1]
        arg[(0, 2, 2)]=(0.928201079985+0.990525331787j)*x[0]**o + ((-0.275822097722-0.492091717958j))*x[0] + ((-0.357760658124+0.127267128879j))*x[1]**o + ((0.211818921475+0.329144256876j))*x[1]
        ref[(0, 2, 2)]=(0.928201079985+0.990525331787j)*x_ref[0]**o + ((-0.275822097722-0.492091717958j))*x_ref[0] + ((-0.357760658124+0.127267128879j))*x_ref[1]**o + ((0.211818921475+0.329144256876j))*x_ref[1]
        arg[(1, 0, 0)]=(0.0144379081522+0.56007313506j)*x[0]**o + ((-0.459893211135-0.862123261766j))*x[0] + ((0.374746794869+0.712797792633j))*x[1]**o + ((0.195979164823+0.114941243476j))*x[1]
        ref[(1, 0, 0)]=(0.0144379081522+0.56007313506j)*x_ref[0]**o + ((-0.459893211135-0.862123261766j))*x_ref[0] + ((0.374746794869+0.712797792633j))*x_ref[1]**o + ((0.195979164823+0.114941243476j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.745233744668+0.99270883734j)*x[0]**o + ((-0.522752573685+0.736068480762j))*x[0] + ((-0.414953302283+0.84869294287j))*x[1]**o + ((-0.549180432034-0.61062169063j))*x[1]
        ref[(1, 0, 1)]=(-0.745233744668+0.99270883734j)*x_ref[0]**o + ((-0.522752573685+0.736068480762j))*x_ref[0] + ((-0.414953302283+0.84869294287j))*x_ref[1]**o + ((-0.549180432034-0.61062169063j))*x_ref[1]
        arg[(1, 0, 2)]=(-0.287468500538-0.199324693637j)*x[0]**o + ((0.637555405214-0.550266320887j))*x[0] + ((0.285867972594-0.830479982438j))*x[1]**o + ((0.54087586011-0.130558790427j))*x[1]
        ref[(1, 0, 2)]=(-0.287468500538-0.199324693637j)*x_ref[0]**o + ((0.637555405214-0.550266320887j))*x_ref[0] + ((0.285867972594-0.830479982438j))*x_ref[1]**o + ((0.54087586011-0.130558790427j))*x_ref[1]
        arg[(1, 1, 0)]=(0.345758766352-0.952866109243j)*x[0]**o + ((0.56842190805-0.20729597622j))*x[0] + ((0.628747865336+0.897698588996j))*x[1]**o + ((0.21772950045+0.266566731702j))*x[1]
        ref[(1, 1, 0)]=(0.345758766352-0.952866109243j)*x_ref[0]**o + ((0.56842190805-0.20729597622j))*x_ref[0] + ((0.628747865336+0.897698588996j))*x_ref[1]**o + ((0.21772950045+0.266566731702j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.432394866251-0.967782054771j)*x[0]**o + ((-0.822028691174-0.965192868877j))*x[0] + ((-0.2649354982+0.542259520248j))*x[1]**o + ((0.622356417829-0.739211093594j))*x[1]
        ref[(1, 1, 1)]=(-0.432394866251-0.967782054771j)*x_ref[0]**o + ((-0.822028691174-0.965192868877j))*x_ref[0] + ((-0.2649354982+0.542259520248j))*x_ref[1]**o + ((0.622356417829-0.739211093594j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.724356071724-0.282607057496j)*x[0]**o + ((0.835552308213-0.97406779432j))*x[0] + ((-0.452139599846-0.742454241302j))*x[1]**o + ((-0.617722250495+0.528720757044j))*x[1]
        ref[(1, 1, 2)]=(-0.724356071724-0.282607057496j)*x_ref[0]**o + ((0.835552308213-0.97406779432j))*x_ref[0] + ((-0.452139599846-0.742454241302j))*x_ref[1]**o + ((-0.617722250495+0.528720757044j))*x_ref[1]
        arg[(1, 2, 0)]=(0.755030509029+0.886824594808j)*x[0]**o + ((-0.916559738336-0.882457979273j))*x[0] + ((0.563997240821-0.0496632688741j))*x[1]**o + ((0.695913871597+0.00419841484684j))*x[1]
        ref[(1, 2, 0)]=(0.755030509029+0.886824594808j)*x_ref[0]**o + ((-0.916559738336-0.882457979273j))*x_ref[0] + ((0.563997240821-0.0496632688741j))*x_ref[1]**o + ((0.695913871597+0.00419841484684j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.665828975826+0.731309078201j)*x[0]**o + ((-0.752303345897-0.910990893985j))*x[0] + ((-0.760312194723+0.454766568204j))*x[1]**o + ((-0.980867907631+0.655030806625j))*x[1]
        ref[(1, 2, 1)]=(-0.665828975826+0.731309078201j)*x_ref[0]**o + ((-0.752303345897-0.910990893985j))*x_ref[0] + ((-0.760312194723+0.454766568204j))*x_ref[1]**o + ((-0.980867907631+0.655030806625j))*x_ref[1]
        arg[(1, 2, 2)]=(0.63445764629-0.535485613077j)*x[0]**o + ((0.371841464303-0.272600114209j))*x[0] + ((-0.167196544786-0.122516994759j))*x[1]**o + ((0.702571788365-0.951094009814j))*x[1]
        ref[(1, 2, 2)]=(0.63445764629-0.535485613077j)*x_ref[0]**o + ((0.371841464303-0.272600114209j))*x_ref[0] + ((-0.167196544786-0.122516994759j))*x_ref[1]**o + ((0.702571788365-0.951094009814j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.169475421506-0.395517456639j)*x[2]**o + ((0.799941253321+0.582967591195j))*x[2]
            ref[(0, 0, 0)]+=(-0.169475421506-0.395517456639j)*x_ref[2]**o + ((0.799941253321+0.582967591195j))*x_ref[2]
            arg[(0, 0, 1)]+=(0.213943501638-0.956979575593j)*x[2]**o + ((-0.213239458943+0.736559493954j))*x[2]
            ref[(0, 0, 1)]+=(0.213943501638-0.956979575593j)*x_ref[2]**o + ((-0.213239458943+0.736559493954j))*x_ref[2]
            arg[(0, 0, 2)]+=(-0.907715792813-0.951031225791j)*x[2]**o + ((0.4134357482+0.123209273417j))*x[2]
            ref[(0, 0, 2)]+=(-0.907715792813-0.951031225791j)*x_ref[2]**o + ((0.4134357482+0.123209273417j))*x_ref[2]
            arg[(0, 1, 0)]+=(-0.928082594865-0.621047065198j)*x[2]**o + ((-0.83884353643+0.341380097965j))*x[2]
            ref[(0, 1, 0)]+=(-0.928082594865-0.621047065198j)*x_ref[2]**o + ((-0.83884353643+0.341380097965j))*x_ref[2]
            arg[(0, 1, 1)]+=(0.19612780206+0.934264779346j)*x[2]**o + ((-0.975584954327-0.233226009888j))*x[2]
            ref[(0, 1, 1)]+=(0.19612780206+0.934264779346j)*x_ref[2]**o + ((-0.975584954327-0.233226009888j))*x_ref[2]
            arg[(0, 1, 2)]+=(0.5965155882-0.547074535515j)*x[2]**o + ((-0.270825364325+0.226409598388j))*x[2]
            ref[(0, 1, 2)]+=(0.5965155882-0.547074535515j)*x_ref[2]**o + ((-0.270825364325+0.226409598388j))*x_ref[2]
            arg[(0, 2, 0)]+=(-0.315745050984+0.355539688831j)*x[2]**o + ((0.916210120514+0.637337537628j))*x[2]
            ref[(0, 2, 0)]+=(-0.315745050984+0.355539688831j)*x_ref[2]**o + ((0.916210120514+0.637337537628j))*x_ref[2]
            arg[(0, 2, 1)]+=(0.933184703742+0.357093023292j)*x[2]**o + ((-0.0634359801272-0.324004971757j))*x[2]
            ref[(0, 2, 1)]+=(0.933184703742+0.357093023292j)*x_ref[2]**o + ((-0.0634359801272-0.324004971757j))*x_ref[2]
            arg[(0, 2, 2)]+=(0.663599556688-0.123296979976j)*x[2]**o + ((-0.0494759261389-0.904535510861j))*x[2]
            ref[(0, 2, 2)]+=(0.663599556688-0.123296979976j)*x_ref[2]**o + ((-0.0494759261389-0.904535510861j))*x_ref[2]
            arg[(1, 0, 0)]+=(-0.541098322401+0.185403033209j)*x[2]**o + ((-0.820934351005+0.759122143139j))*x[2]
            ref[(1, 0, 0)]+=(-0.541098322401+0.185403033209j)*x_ref[2]**o + ((-0.820934351005+0.759122143139j))*x_ref[2]
            arg[(1, 0, 1)]+=(0.518918558658+0.610772586567j)*x[2]**o + ((0.143066220457-0.880599797592j))*x[2]
            ref[(1, 0, 1)]+=(0.518918558658+0.610772586567j)*x_ref[2]**o + ((0.143066220457-0.880599797592j))*x_ref[2]
            arg[(1, 0, 2)]+=(-0.946865483034-0.968620909761j)*x[2]**o + ((-0.778869806999-0.966418682383j))*x[2]
            ref[(1, 0, 2)]+=(-0.946865483034-0.968620909761j)*x_ref[2]**o + ((-0.778869806999-0.966418682383j))*x_ref[2]
            arg[(1, 1, 0)]+=(0.763517947589-0.589751585005j)*x[2]**o + ((0.951911131199+0.526402043895j))*x[2]
            ref[(1, 1, 0)]+=(0.763517947589-0.589751585005j)*x_ref[2]**o + ((0.951911131199+0.526402043895j))*x_ref[2]
            arg[(1, 1, 1)]+=(0.324205796689+0.492459368357j)*x[2]**o + ((-0.993839160794+0.798328943424j))*x[2]
            ref[(1, 1, 1)]+=(0.324205796689+0.492459368357j)*x_ref[2]**o + ((-0.993839160794+0.798328943424j))*x_ref[2]
            arg[(1, 1, 2)]+=(0.753419023182-0.472417891212j)*x[2]**o + ((0.85164506249-0.214091624329j))*x[2]
            ref[(1, 1, 2)]+=(0.753419023182-0.472417891212j)*x_ref[2]**o + ((0.85164506249-0.214091624329j))*x_ref[2]
            arg[(1, 2, 0)]+=(-0.231056763442-0.969130121411j)*x[2]**o + ((-0.760221236868+0.283185949389j))*x[2]
            ref[(1, 2, 0)]+=(-0.231056763442-0.969130121411j)*x_ref[2]**o + ((-0.760221236868+0.283185949389j))*x_ref[2]
            arg[(1, 2, 1)]+=(0.933183771842-0.00413635358234j)*x[2]**o + ((-0.288313452453+0.820470458803j))*x[2]
            ref[(1, 2, 1)]+=(0.933183771842-0.00413635358234j)*x_ref[2]**o + ((-0.288313452453+0.820470458803j))*x_ref[2]
            arg[(1, 2, 2)]+=(0.812646606211+0.495334578337j)*x[2]**o + ((0.603232153191-0.0793631766778j))*x[2]
            ref[(1, 2, 2)]+=(0.812646606211+0.495334578337j)*x_ref[2]**o + ((0.603232153191-0.0793631766778j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedContinuousFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 4, 4),w)
        ref = Data(0,(2, 4, 4, 4),w_ref)
        arg[(0, 0, 0, 0)]=(0.661805107743+0.483058911354j)*x[0]**o + ((0.499475377319-0.534026487844j))*x[0] + ((0.402895386465+0.957513476566j))*x[1]**o + ((0.812160458744-0.0261451875448j))*x[1]
        ref[(0, 0, 0, 0)]=(0.661805107743+0.483058911354j)*x_ref[0]**o + ((0.499475377319-0.534026487844j))*x_ref[0] + ((0.402895386465+0.957513476566j))*x_ref[1]**o + ((0.812160458744-0.0261451875448j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.298148767203-0.344276916557j)*x[0]**o + ((0.827157508283+0.744366323723j))*x[0] + ((-0.736688204117-0.850486562972j))*x[1]**o + ((-0.248643792687-0.751981044233j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.298148767203-0.344276916557j)*x_ref[0]**o + ((0.827157508283+0.744366323723j))*x_ref[0] + ((-0.736688204117-0.850486562972j))*x_ref[1]**o + ((-0.248643792687-0.751981044233j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(-0.449485012543+0.622179848722j)*x[0]**o + ((-0.159251027367+0.977853721913j))*x[0] + ((-0.529443408894+0.732473225774j))*x[1]**o + ((-0.696396430396-0.747769130192j))*x[1]
        ref[(0, 0, 0, 2)]=(-0.449485012543+0.622179848722j)*x_ref[0]**o + ((-0.159251027367+0.977853721913j))*x_ref[0] + ((-0.529443408894+0.732473225774j))*x_ref[1]**o + ((-0.696396430396-0.747769130192j))*x_ref[1]
        arg[(0, 0, 0, 3)]=(-0.0797897467221+0.914819602731j)*x[0]**o + ((0.803722643278-0.506072004959j))*x[0] + ((0.127501239334+0.804661891765j))*x[1]**o + ((0.73549957464-0.89127117941j))*x[1]
        ref[(0, 0, 0, 3)]=(-0.0797897467221+0.914819602731j)*x_ref[0]**o + ((0.803722643278-0.506072004959j))*x_ref[0] + ((0.127501239334+0.804661891765j))*x_ref[1]**o + ((0.73549957464-0.89127117941j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.0570868198308-0.897206111543j)*x[0]**o + ((-0.807769240288-0.320597414512j))*x[0] + ((0.604404890488+0.583407146344j))*x[1]**o + ((0.677763849584-0.973612697611j))*x[1]
        ref[(0, 0, 1, 0)]=(0.0570868198308-0.897206111543j)*x_ref[0]**o + ((-0.807769240288-0.320597414512j))*x_ref[0] + ((0.604404890488+0.583407146344j))*x_ref[1]**o + ((0.677763849584-0.973612697611j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.535012007725-0.442023179301j)*x[0]**o + ((-0.546952332255+0.545893009898j))*x[0] + ((0.380577532249-0.212457652325j))*x[1]**o + ((-0.891143556995-0.664588356905j))*x[1]
        ref[(0, 0, 1, 1)]=(0.535012007725-0.442023179301j)*x_ref[0]**o + ((-0.546952332255+0.545893009898j))*x_ref[0] + ((0.380577532249-0.212457652325j))*x_ref[1]**o + ((-0.891143556995-0.664588356905j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(0.463239803931-0.1971598098j)*x[0]**o + ((-0.178436644995+0.980677695147j))*x[0] + ((-0.584549885316-0.190120880267j))*x[1]**o + ((-0.690937883673-0.0514371056061j))*x[1]
        ref[(0, 0, 1, 2)]=(0.463239803931-0.1971598098j)*x_ref[0]**o + ((-0.178436644995+0.980677695147j))*x_ref[0] + ((-0.584549885316-0.190120880267j))*x_ref[1]**o + ((-0.690937883673-0.0514371056061j))*x_ref[1]
        arg[(0, 0, 1, 3)]=(0.590152470184+0.706537126318j)*x[0]**o + ((-0.791562389506-0.758662210971j))*x[0] + ((-0.403101199187-0.246019073353j))*x[1]**o + ((-0.807839369357-0.325536462643j))*x[1]
        ref[(0, 0, 1, 3)]=(0.590152470184+0.706537126318j)*x_ref[0]**o + ((-0.791562389506-0.758662210971j))*x_ref[0] + ((-0.403101199187-0.246019073353j))*x_ref[1]**o + ((-0.807839369357-0.325536462643j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(-0.66861689917-0.304150930764j)*x[0]**o + ((-0.112659112854+0.0321171721372j))*x[0] + ((-0.0366783115538-0.377469364911j))*x[1]**o + ((-0.847679172188-0.159485795659j))*x[1]
        ref[(0, 0, 2, 0)]=(-0.66861689917-0.304150930764j)*x_ref[0]**o + ((-0.112659112854+0.0321171721372j))*x_ref[0] + ((-0.0366783115538-0.377469364911j))*x_ref[1]**o + ((-0.847679172188-0.159485795659j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(-0.582273304811-0.459342969229j)*x[0]**o + ((0.915963463741+0.838708396742j))*x[0] + ((-0.332981511258-0.345972607683j))*x[1]**o + ((-0.665278994022+0.525535784078j))*x[1]
        ref[(0, 0, 2, 1)]=(-0.582273304811-0.459342969229j)*x_ref[0]**o + ((0.915963463741+0.838708396742j))*x_ref[0] + ((-0.332981511258-0.345972607683j))*x_ref[1]**o + ((-0.665278994022+0.525535784078j))*x_ref[1]
        arg[(0, 0, 2, 2)]=(0.343619561173+0.51303476835j)*x[0]**o + ((-0.1986531746-0.45352804133j))*x[0] + ((-0.229516113053+0.221492512386j))*x[1]**o + ((0.526817515031+0.798444964142j))*x[1]
        ref[(0, 0, 2, 2)]=(0.343619561173+0.51303476835j)*x_ref[0]**o + ((-0.1986531746-0.45352804133j))*x_ref[0] + ((-0.229516113053+0.221492512386j))*x_ref[1]**o + ((0.526817515031+0.798444964142j))*x_ref[1]
        arg[(0, 0, 2, 3)]=(0.358304353477-0.722821441992j)*x[0]**o + ((-0.293315841305+0.708394985389j))*x[0] + ((0.499993222836+0.434886664477j))*x[1]**o + ((-0.535809904821+0.0825800709239j))*x[1]
        ref[(0, 0, 2, 3)]=(0.358304353477-0.722821441992j)*x_ref[0]**o + ((-0.293315841305+0.708394985389j))*x_ref[0] + ((0.499993222836+0.434886664477j))*x_ref[1]**o + ((-0.535809904821+0.0825800709239j))*x_ref[1]
        arg[(0, 0, 3, 0)]=(0.526189452484+0.422412517009j)*x[0]**o + ((-0.646278794891+0.891166982316j))*x[0] + ((0.9324922214+0.0130844860679j))*x[1]**o + ((-0.684866051794-0.35530552505j))*x[1]
        ref[(0, 0, 3, 0)]=(0.526189452484+0.422412517009j)*x_ref[0]**o + ((-0.646278794891+0.891166982316j))*x_ref[0] + ((0.9324922214+0.0130844860679j))*x_ref[1]**o + ((-0.684866051794-0.35530552505j))*x_ref[1]
        arg[(0, 0, 3, 1)]=(0.071964236267+0.791606676092j)*x[0]**o + ((0.369121271902-0.219785478309j))*x[0] + ((0.761037698021-0.0713489730402j))*x[1]**o + ((-0.994145760805-0.687672081092j))*x[1]
        ref[(0, 0, 3, 1)]=(0.071964236267+0.791606676092j)*x_ref[0]**o + ((0.369121271902-0.219785478309j))*x_ref[0] + ((0.761037698021-0.0713489730402j))*x_ref[1]**o + ((-0.994145760805-0.687672081092j))*x_ref[1]
        arg[(0, 0, 3, 2)]=(0.536939416201+0.776905320257j)*x[0]**o + ((0.795232454976+0.844615000016j))*x[0] + ((-0.577222049984-0.441265087687j))*x[1]**o + ((0.848532767206-0.0473158025655j))*x[1]
        ref[(0, 0, 3, 2)]=(0.536939416201+0.776905320257j)*x_ref[0]**o + ((0.795232454976+0.844615000016j))*x_ref[0] + ((-0.577222049984-0.441265087687j))*x_ref[1]**o + ((0.848532767206-0.0473158025655j))*x_ref[1]
        arg[(0, 0, 3, 3)]=(0.551264856034+0.919372106045j)*x[0]**o + ((-0.647352574036-0.782834601187j))*x[0] + ((0.0445741064711-0.0464030102005j))*x[1]**o + ((-0.0184729812385+0.533043525131j))*x[1]
        ref[(0, 0, 3, 3)]=(0.551264856034+0.919372106045j)*x_ref[0]**o + ((-0.647352574036-0.782834601187j))*x_ref[0] + ((0.0445741064711-0.0464030102005j))*x_ref[1]**o + ((-0.0184729812385+0.533043525131j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(-0.820773871793+0.533245855364j)*x[0]**o + ((-0.247866438156-0.82024192817j))*x[0] + ((-0.909672866926+0.942940646655j))*x[1]**o + ((-0.514576738759-0.299754400255j))*x[1]
        ref[(0, 1, 0, 0)]=(-0.820773871793+0.533245855364j)*x_ref[0]**o + ((-0.247866438156-0.82024192817j))*x_ref[0] + ((-0.909672866926+0.942940646655j))*x_ref[1]**o + ((-0.514576738759-0.299754400255j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.271311118209+0.910472101052j)*x[0]**o + ((-0.52652571699-0.903508433307j))*x[0] + ((0.906281726603+0.40295616463j))*x[1]**o + ((0.453103976891+0.114435189132j))*x[1]
        ref[(0, 1, 0, 1)]=(0.271311118209+0.910472101052j)*x_ref[0]**o + ((-0.52652571699-0.903508433307j))*x_ref[0] + ((0.906281726603+0.40295616463j))*x_ref[1]**o + ((0.453103976891+0.114435189132j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(0.450103322217+0.0600303533298j)*x[0]**o + ((0.62592737899-0.725904422047j))*x[0] + ((0.429357442502-0.203001914775j))*x[1]**o + ((-0.105196018296+0.431539145758j))*x[1]
        ref[(0, 1, 0, 2)]=(0.450103322217+0.0600303533298j)*x_ref[0]**o + ((0.62592737899-0.725904422047j))*x_ref[0] + ((0.429357442502-0.203001914775j))*x_ref[1]**o + ((-0.105196018296+0.431539145758j))*x_ref[1]
        arg[(0, 1, 0, 3)]=(0.206482449941+0.17086357243j)*x[0]**o + ((0.981281226703+0.743290728248j))*x[0] + ((-0.115522630917+0.105601448212j))*x[1]**o + ((0.989139830054-0.772606880598j))*x[1]
        ref[(0, 1, 0, 3)]=(0.206482449941+0.17086357243j)*x_ref[0]**o + ((0.981281226703+0.743290728248j))*x_ref[0] + ((-0.115522630917+0.105601448212j))*x_ref[1]**o + ((0.989139830054-0.772606880598j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.0978398532847+0.525233026649j)*x[0]**o + ((0.220548535915-0.0100912525706j))*x[0] + ((0.00257059606198-0.271580431033j))*x[1]**o + ((-0.222117532342-0.138834500594j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.0978398532847+0.525233026649j)*x_ref[0]**o + ((0.220548535915-0.0100912525706j))*x_ref[0] + ((0.00257059606198-0.271580431033j))*x_ref[1]**o + ((-0.222117532342-0.138834500594j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.0816077582232-0.242032480897j)*x[0]**o + ((0.0244689193228-0.136281624659j))*x[0] + ((-0.0790863742819+0.00980791555826j))*x[1]**o + ((-0.380909861132+0.7061514441j))*x[1]
        ref[(0, 1, 1, 1)]=(0.0816077582232-0.242032480897j)*x_ref[0]**o + ((0.0244689193228-0.136281624659j))*x_ref[0] + ((-0.0790863742819+0.00980791555826j))*x_ref[1]**o + ((-0.380909861132+0.7061514441j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(0.176007611909+0.714437887558j)*x[0]**o + ((0.200989759103+0.868799263203j))*x[0] + ((0.712387528367+0.0447975438596j))*x[1]**o + ((-0.355048343323-0.710139714897j))*x[1]
        ref[(0, 1, 1, 2)]=(0.176007611909+0.714437887558j)*x_ref[0]**o + ((0.200989759103+0.868799263203j))*x_ref[0] + ((0.712387528367+0.0447975438596j))*x_ref[1]**o + ((-0.355048343323-0.710139714897j))*x_ref[1]
        arg[(0, 1, 1, 3)]=(-0.194619529352-0.511839644529j)*x[0]**o + ((-0.881721446066+0.142171071335j))*x[0] + ((-0.321962508747+0.630803302072j))*x[1]**o + ((-0.196735570318+0.577113742378j))*x[1]
        ref[(0, 1, 1, 3)]=(-0.194619529352-0.511839644529j)*x_ref[0]**o + ((-0.881721446066+0.142171071335j))*x_ref[0] + ((-0.321962508747+0.630803302072j))*x_ref[1]**o + ((-0.196735570318+0.577113742378j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(-0.14318196574-0.534523729755j)*x[0]**o + ((-0.685541926253-0.310861721161j))*x[0] + ((0.616978256249+0.262598383131j))*x[1]**o + ((-0.650971934619+0.0322186775773j))*x[1]
        ref[(0, 1, 2, 0)]=(-0.14318196574-0.534523729755j)*x_ref[0]**o + ((-0.685541926253-0.310861721161j))*x_ref[0] + ((0.616978256249+0.262598383131j))*x_ref[1]**o + ((-0.650971934619+0.0322186775773j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(0.129705413334+0.810275463399j)*x[0]**o + ((-0.650199069437-0.382664660946j))*x[0] + ((-0.305254318195-0.516322344974j))*x[1]**o + ((0.540459999118+0.629176225548j))*x[1]
        ref[(0, 1, 2, 1)]=(0.129705413334+0.810275463399j)*x_ref[0]**o + ((-0.650199069437-0.382664660946j))*x_ref[0] + ((-0.305254318195-0.516322344974j))*x_ref[1]**o + ((0.540459999118+0.629176225548j))*x_ref[1]
        arg[(0, 1, 2, 2)]=(-0.936863365381+0.747131840377j)*x[0]**o + ((0.772738432291+0.520318032829j))*x[0] + ((0.137632158701-0.467781147231j))*x[1]**o + ((-0.238446384344+0.0355829703896j))*x[1]
        ref[(0, 1, 2, 2)]=(-0.936863365381+0.747131840377j)*x_ref[0]**o + ((0.772738432291+0.520318032829j))*x_ref[0] + ((0.137632158701-0.467781147231j))*x_ref[1]**o + ((-0.238446384344+0.0355829703896j))*x_ref[1]
        arg[(0, 1, 2, 3)]=(0.88056488908-0.557349700148j)*x[0]**o + ((-0.658145838165+0.0607719056728j))*x[0] + ((-0.684127206976+0.831826434919j))*x[1]**o + ((0.13160694437+0.97046517811j))*x[1]
        ref[(0, 1, 2, 3)]=(0.88056488908-0.557349700148j)*x_ref[0]**o + ((-0.658145838165+0.0607719056728j))*x_ref[0] + ((-0.684127206976+0.831826434919j))*x_ref[1]**o + ((0.13160694437+0.97046517811j))*x_ref[1]
        arg[(0, 1, 3, 0)]=(0.100380618256+0.86346822466j)*x[0]**o + ((-0.475216245711-0.330354669717j))*x[0] + ((-0.335896464544-0.0574160235671j))*x[1]**o + ((-0.698757141307+0.614264388875j))*x[1]
        ref[(0, 1, 3, 0)]=(0.100380618256+0.86346822466j)*x_ref[0]**o + ((-0.475216245711-0.330354669717j))*x_ref[0] + ((-0.335896464544-0.0574160235671j))*x_ref[1]**o + ((-0.698757141307+0.614264388875j))*x_ref[1]
        arg[(0, 1, 3, 1)]=(0.431640492516+0.81655058655j)*x[0]**o + ((0.0697706596274+0.285797719495j))*x[0] + ((-0.205108965441-0.455906151849j))*x[1]**o + ((0.757971806886-0.212276882651j))*x[1]
        ref[(0, 1, 3, 1)]=(0.431640492516+0.81655058655j)*x_ref[0]**o + ((0.0697706596274+0.285797719495j))*x_ref[0] + ((-0.205108965441-0.455906151849j))*x_ref[1]**o + ((0.757971806886-0.212276882651j))*x_ref[1]
        arg[(0, 1, 3, 2)]=(-0.154680687243+0.281938478728j)*x[0]**o + ((-0.186009949373-0.44067905561j))*x[0] + ((-0.61551301993+0.565853088828j))*x[1]**o + ((0.282720923058-0.254138467092j))*x[1]
        ref[(0, 1, 3, 2)]=(-0.154680687243+0.281938478728j)*x_ref[0]**o + ((-0.186009949373-0.44067905561j))*x_ref[0] + ((-0.61551301993+0.565853088828j))*x_ref[1]**o + ((0.282720923058-0.254138467092j))*x_ref[1]
        arg[(0, 1, 3, 3)]=(0.225653811647-0.552436473744j)*x[0]**o + ((-0.0793729255457-0.687816319801j))*x[0] + ((-0.742040559516-0.952585997635j))*x[1]**o + ((-0.803237372116+0.5303189932j))*x[1]
        ref[(0, 1, 3, 3)]=(0.225653811647-0.552436473744j)*x_ref[0]**o + ((-0.0793729255457-0.687816319801j))*x_ref[0] + ((-0.742040559516-0.952585997635j))*x_ref[1]**o + ((-0.803237372116+0.5303189932j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.00148316005669+0.209834965604j)*x[0]**o + ((-0.411108996304-0.79681845611j))*x[0] + ((0.201210049715-0.681654209565j))*x[1]**o + ((0.975265577652+0.794529351902j))*x[1]
        ref[(0, 2, 0, 0)]=(0.00148316005669+0.209834965604j)*x_ref[0]**o + ((-0.411108996304-0.79681845611j))*x_ref[0] + ((0.201210049715-0.681654209565j))*x_ref[1]**o + ((0.975265577652+0.794529351902j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(-0.898557318585+0.630378274794j)*x[0]**o + ((0.80965727419+0.759872156j))*x[0] + ((0.334341478239+0.595212905445j))*x[1]**o + ((0.764019569282+0.236714770521j))*x[1]
        ref[(0, 2, 0, 1)]=(-0.898557318585+0.630378274794j)*x_ref[0]**o + ((0.80965727419+0.759872156j))*x_ref[0] + ((0.334341478239+0.595212905445j))*x_ref[1]**o + ((0.764019569282+0.236714770521j))*x_ref[1]
        arg[(0, 2, 0, 2)]=(0.0562483163741-0.738098158188j)*x[0]**o + ((-0.338844985754+0.00880266579589j))*x[0] + ((-0.144101732043+0.352674665477j))*x[1]**o + ((-0.0168544815946+0.368366050083j))*x[1]
        ref[(0, 2, 0, 2)]=(0.0562483163741-0.738098158188j)*x_ref[0]**o + ((-0.338844985754+0.00880266579589j))*x_ref[0] + ((-0.144101732043+0.352674665477j))*x_ref[1]**o + ((-0.0168544815946+0.368366050083j))*x_ref[1]
        arg[(0, 2, 0, 3)]=(0.390058202989+0.189592994854j)*x[0]**o + ((0.175517031749+0.452920026216j))*x[0] + ((0.508763455545+0.647473197277j))*x[1]**o + ((-0.0111760550349-0.128196781375j))*x[1]
        ref[(0, 2, 0, 3)]=(0.390058202989+0.189592994854j)*x_ref[0]**o + ((0.175517031749+0.452920026216j))*x_ref[0] + ((0.508763455545+0.647473197277j))*x_ref[1]**o + ((-0.0111760550349-0.128196781375j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.426756832816+0.591382500229j)*x[0]**o + ((0.206381398274+0.0306472118502j))*x[0] + ((-0.179973507955+0.805317758175j))*x[1]**o + ((0.728577393255-0.253399663015j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.426756832816+0.591382500229j)*x_ref[0]**o + ((0.206381398274+0.0306472118502j))*x_ref[0] + ((-0.179973507955+0.805317758175j))*x_ref[1]**o + ((0.728577393255-0.253399663015j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(-0.920252237096+0.966381931832j)*x[0]**o + ((0.254495551916+0.478209934531j))*x[0] + ((0.691225079548-0.768477760904j))*x[1]**o + ((-0.604718790274-0.160955446827j))*x[1]
        ref[(0, 2, 1, 1)]=(-0.920252237096+0.966381931832j)*x_ref[0]**o + ((0.254495551916+0.478209934531j))*x_ref[0] + ((0.691225079548-0.768477760904j))*x_ref[1]**o + ((-0.604718790274-0.160955446827j))*x_ref[1]
        arg[(0, 2, 1, 2)]=(0.0582587975786-0.84494069048j)*x[0]**o + ((0.255443715197-0.787385316297j))*x[0] + ((0.648038688942+0.533584813045j))*x[1]**o + ((0.673420935464+0.0365840403583j))*x[1]
        ref[(0, 2, 1, 2)]=(0.0582587975786-0.84494069048j)*x_ref[0]**o + ((0.255443715197-0.787385316297j))*x_ref[0] + ((0.648038688942+0.533584813045j))*x_ref[1]**o + ((0.673420935464+0.0365840403583j))*x_ref[1]
        arg[(0, 2, 1, 3)]=(-0.561022061697+0.887484097427j)*x[0]**o + ((0.128186803111+0.0112334722483j))*x[0] + ((0.924468862205+0.590032314064j))*x[1]**o + ((0.82931840827-0.873101628857j))*x[1]
        ref[(0, 2, 1, 3)]=(-0.561022061697+0.887484097427j)*x_ref[0]**o + ((0.128186803111+0.0112334722483j))*x_ref[0] + ((0.924468862205+0.590032314064j))*x_ref[1]**o + ((0.82931840827-0.873101628857j))*x_ref[1]
        arg[(0, 2, 2, 0)]=(-0.650695219675+0.445775553943j)*x[0]**o + ((0.637009610971-0.0368870256713j))*x[0] + ((0.769007996384-0.0270994369996j))*x[1]**o + ((0.232177290178+0.919947169965j))*x[1]
        ref[(0, 2, 2, 0)]=(-0.650695219675+0.445775553943j)*x_ref[0]**o + ((0.637009610971-0.0368870256713j))*x_ref[0] + ((0.769007996384-0.0270994369996j))*x_ref[1]**o + ((0.232177290178+0.919947169965j))*x_ref[1]
        arg[(0, 2, 2, 1)]=(0.41740141346+0.0526015028368j)*x[0]**o + ((-0.769352756219+0.129489578563j))*x[0] + ((0.651778799085-0.182301965766j))*x[1]**o + ((-0.996109058286+0.112108829382j))*x[1]
        ref[(0, 2, 2, 1)]=(0.41740141346+0.0526015028368j)*x_ref[0]**o + ((-0.769352756219+0.129489578563j))*x_ref[0] + ((0.651778799085-0.182301965766j))*x_ref[1]**o + ((-0.996109058286+0.112108829382j))*x_ref[1]
        arg[(0, 2, 2, 2)]=(0.868222794032-0.889287761772j)*x[0]**o + ((0.453100926764-0.155654922709j))*x[0] + ((0.107274515436-0.316115656883j))*x[1]**o + ((0.395676937082-0.334174288579j))*x[1]
        ref[(0, 2, 2, 2)]=(0.868222794032-0.889287761772j)*x_ref[0]**o + ((0.453100926764-0.155654922709j))*x_ref[0] + ((0.107274515436-0.316115656883j))*x_ref[1]**o + ((0.395676937082-0.334174288579j))*x_ref[1]
        arg[(0, 2, 2, 3)]=(0.280998926979+0.718923260078j)*x[0]**o + ((-0.477216889406-0.336862178811j))*x[0] + ((0.272387853332-0.330899921298j))*x[1]**o + ((0.718702028432+0.383284727676j))*x[1]
        ref[(0, 2, 2, 3)]=(0.280998926979+0.718923260078j)*x_ref[0]**o + ((-0.477216889406-0.336862178811j))*x_ref[0] + ((0.272387853332-0.330899921298j))*x_ref[1]**o + ((0.718702028432+0.383284727676j))*x_ref[1]
        arg[(0, 2, 3, 0)]=(-0.995871739252-0.773435393706j)*x[0]**o + ((0.423215179533-0.230713268674j))*x[0] + ((-0.623833294303-0.838826370317j))*x[1]**o + ((-0.52366618932-0.181322247044j))*x[1]
        ref[(0, 2, 3, 0)]=(-0.995871739252-0.773435393706j)*x_ref[0]**o + ((0.423215179533-0.230713268674j))*x_ref[0] + ((-0.623833294303-0.838826370317j))*x_ref[1]**o + ((-0.52366618932-0.181322247044j))*x_ref[1]
        arg[(0, 2, 3, 1)]=(-0.559070634072-0.731501916445j)*x[0]**o + ((-0.675350842337-0.266319798417j))*x[0] + ((-0.855104336614+0.796151794848j))*x[1]**o + ((-0.801485842994-0.0367219987841j))*x[1]
        ref[(0, 2, 3, 1)]=(-0.559070634072-0.731501916445j)*x_ref[0]**o + ((-0.675350842337-0.266319798417j))*x_ref[0] + ((-0.855104336614+0.796151794848j))*x_ref[1]**o + ((-0.801485842994-0.0367219987841j))*x_ref[1]
        arg[(0, 2, 3, 2)]=(-0.636853988071-0.174386563883j)*x[0]**o + ((0.657794747139+0.616170642408j))*x[0] + ((0.135539230148+0.250986939163j))*x[1]**o + ((-0.395550522118+0.736048491868j))*x[1]
        ref[(0, 2, 3, 2)]=(-0.636853988071-0.174386563883j)*x_ref[0]**o + ((0.657794747139+0.616170642408j))*x_ref[0] + ((0.135539230148+0.250986939163j))*x_ref[1]**o + ((-0.395550522118+0.736048491868j))*x_ref[1]
        arg[(0, 2, 3, 3)]=(0.258582958651+0.581273823937j)*x[0]**o + ((0.00539155435301-0.368984299075j))*x[0] + ((0.977238034028-0.608834104003j))*x[1]**o + ((-0.487934768014-0.0970892707847j))*x[1]
        ref[(0, 2, 3, 3)]=(0.258582958651+0.581273823937j)*x_ref[0]**o + ((0.00539155435301-0.368984299075j))*x_ref[0] + ((0.977238034028-0.608834104003j))*x_ref[1]**o + ((-0.487934768014-0.0970892707847j))*x_ref[1]
        arg[(0, 3, 0, 0)]=(0.965758019718-0.448272109455j)*x[0]**o + ((-0.148446913894+0.274785865333j))*x[0] + ((0.477229443788-0.575346255383j))*x[1]**o + ((0.851053019236-0.524240532957j))*x[1]
        ref[(0, 3, 0, 0)]=(0.965758019718-0.448272109455j)*x_ref[0]**o + ((-0.148446913894+0.274785865333j))*x_ref[0] + ((0.477229443788-0.575346255383j))*x_ref[1]**o + ((0.851053019236-0.524240532957j))*x_ref[1]
        arg[(0, 3, 0, 1)]=(0.786737050457-0.619433671563j)*x[0]**o + ((-0.635612451221-0.166651691045j))*x[0] + ((-0.586616041299-0.389624644201j))*x[1]**o + ((0.908532988613+0.651883939193j))*x[1]
        ref[(0, 3, 0, 1)]=(0.786737050457-0.619433671563j)*x_ref[0]**o + ((-0.635612451221-0.166651691045j))*x_ref[0] + ((-0.586616041299-0.389624644201j))*x_ref[1]**o + ((0.908532988613+0.651883939193j))*x_ref[1]
        arg[(0, 3, 0, 2)]=(0.825153577775+0.0330071501541j)*x[0]**o + ((-0.908590071713-0.700760907435j))*x[0] + ((0.959874905743+0.279250894799j))*x[1]**o + ((0.347659228602-0.0549248075103j))*x[1]
        ref[(0, 3, 0, 2)]=(0.825153577775+0.0330071501541j)*x_ref[0]**o + ((-0.908590071713-0.700760907435j))*x_ref[0] + ((0.959874905743+0.279250894799j))*x_ref[1]**o + ((0.347659228602-0.0549248075103j))*x_ref[1]
        arg[(0, 3, 0, 3)]=(0.69300491548-0.35561291492j)*x[0]**o + ((0.810941535541-0.663681375691j))*x[0] + ((-0.0181435120627+0.852996534366j))*x[1]**o + ((0.1087535109-0.727845844451j))*x[1]
        ref[(0, 3, 0, 3)]=(0.69300491548-0.35561291492j)*x_ref[0]**o + ((0.810941535541-0.663681375691j))*x_ref[0] + ((-0.0181435120627+0.852996534366j))*x_ref[1]**o + ((0.1087535109-0.727845844451j))*x_ref[1]
        arg[(0, 3, 1, 0)]=(0.531379737296-0.858564641751j)*x[0]**o + ((-0.37157346061-0.85320191696j))*x[0] + ((0.201779974068-0.69759297889j))*x[1]**o + ((0.376026959893-0.4911240259j))*x[1]
        ref[(0, 3, 1, 0)]=(0.531379737296-0.858564641751j)*x_ref[0]**o + ((-0.37157346061-0.85320191696j))*x_ref[0] + ((0.201779974068-0.69759297889j))*x_ref[1]**o + ((0.376026959893-0.4911240259j))*x_ref[1]
        arg[(0, 3, 1, 1)]=(-0.45239409088+0.403893684737j)*x[0]**o + ((0.190967209652+0.520455301665j))*x[0] + ((0.145806719606-0.00347247698728j))*x[1]**o + ((0.118149777994+0.10884213461j))*x[1]
        ref[(0, 3, 1, 1)]=(-0.45239409088+0.403893684737j)*x_ref[0]**o + ((0.190967209652+0.520455301665j))*x_ref[0] + ((0.145806719606-0.00347247698728j))*x_ref[1]**o + ((0.118149777994+0.10884213461j))*x_ref[1]
        arg[(0, 3, 1, 2)]=(-0.861998761563-0.604983326539j)*x[0]**o + ((-0.313354240244-0.272561649062j))*x[0] + ((-0.59688190901-0.170513199144j))*x[1]**o + ((-0.756976969457+0.308217125314j))*x[1]
        ref[(0, 3, 1, 2)]=(-0.861998761563-0.604983326539j)*x_ref[0]**o + ((-0.313354240244-0.272561649062j))*x_ref[0] + ((-0.59688190901-0.170513199144j))*x_ref[1]**o + ((-0.756976969457+0.308217125314j))*x_ref[1]
        arg[(0, 3, 1, 3)]=(0.960668277006-0.0566412511944j)*x[0]**o + ((0.871057675802+0.606654517873j))*x[0] + ((0.80180986054-0.725204915199j))*x[1]**o + ((-0.865010883761-0.195446644841j))*x[1]
        ref[(0, 3, 1, 3)]=(0.960668277006-0.0566412511944j)*x_ref[0]**o + ((0.871057675802+0.606654517873j))*x_ref[0] + ((0.80180986054-0.725204915199j))*x_ref[1]**o + ((-0.865010883761-0.195446644841j))*x_ref[1]
        arg[(0, 3, 2, 0)]=(0.535895243413+0.0574608740924j)*x[0]**o + ((-0.628094622121-0.225099624209j))*x[0] + ((0.146754550889-0.39953169012j))*x[1]**o + ((0.487402137034+0.228546302552j))*x[1]
        ref[(0, 3, 2, 0)]=(0.535895243413+0.0574608740924j)*x_ref[0]**o + ((-0.628094622121-0.225099624209j))*x_ref[0] + ((0.146754550889-0.39953169012j))*x_ref[1]**o + ((0.487402137034+0.228546302552j))*x_ref[1]
        arg[(0, 3, 2, 1)]=(-0.352668241042-0.757400449864j)*x[0]**o + ((-0.776765233207+0.199181334574j))*x[0] + ((0.375648320108-0.0133754227194j))*x[1]**o + ((-0.678108187575-0.0397632410476j))*x[1]
        ref[(0, 3, 2, 1)]=(-0.352668241042-0.757400449864j)*x_ref[0]**o + ((-0.776765233207+0.199181334574j))*x_ref[0] + ((0.375648320108-0.0133754227194j))*x_ref[1]**o + ((-0.678108187575-0.0397632410476j))*x_ref[1]
        arg[(0, 3, 2, 2)]=(-0.505116449134+0.316370009198j)*x[0]**o + ((-0.109395255971-0.538950831137j))*x[0] + ((-0.728146438256+0.717677139494j))*x[1]**o + ((0.948493451493+0.454544524262j))*x[1]
        ref[(0, 3, 2, 2)]=(-0.505116449134+0.316370009198j)*x_ref[0]**o + ((-0.109395255971-0.538950831137j))*x_ref[0] + ((-0.728146438256+0.717677139494j))*x_ref[1]**o + ((0.948493451493+0.454544524262j))*x_ref[1]
        arg[(0, 3, 2, 3)]=(0.0454575449626+0.791818672751j)*x[0]**o + ((-0.312226540473-0.247181239552j))*x[0] + ((-0.754543986762-0.86838325018j))*x[1]**o + ((0.235646662554+0.496544759864j))*x[1]
        ref[(0, 3, 2, 3)]=(0.0454575449626+0.791818672751j)*x_ref[0]**o + ((-0.312226540473-0.247181239552j))*x_ref[0] + ((-0.754543986762-0.86838325018j))*x_ref[1]**o + ((0.235646662554+0.496544759864j))*x_ref[1]
        arg[(0, 3, 3, 0)]=(0.456419914326-0.391511099928j)*x[0]**o + ((0.012792782853-0.244983123277j))*x[0] + ((-0.169542068652-0.0788649817298j))*x[1]**o + ((-0.124081030178+0.00756068886184j))*x[1]
        ref[(0, 3, 3, 0)]=(0.456419914326-0.391511099928j)*x_ref[0]**o + ((0.012792782853-0.244983123277j))*x_ref[0] + ((-0.169542068652-0.0788649817298j))*x_ref[1]**o + ((-0.124081030178+0.00756068886184j))*x_ref[1]
        arg[(0, 3, 3, 1)]=(0.304474661873-0.405802378424j)*x[0]**o + ((0.927954533603+0.0150642536475j))*x[0] + ((-0.292018424039+0.00104763371515j))*x[1]**o + ((-0.330498214096+0.506895778474j))*x[1]
        ref[(0, 3, 3, 1)]=(0.304474661873-0.405802378424j)*x_ref[0]**o + ((0.927954533603+0.0150642536475j))*x_ref[0] + ((-0.292018424039+0.00104763371515j))*x_ref[1]**o + ((-0.330498214096+0.506895778474j))*x_ref[1]
        arg[(0, 3, 3, 2)]=(0.0957341745938-0.00895546910152j)*x[0]**o + ((0.667397499817+0.43274701996j))*x[0] + ((0.796052288456-0.671939200863j))*x[1]**o + ((-0.67280529386+0.652183948973j))*x[1]
        ref[(0, 3, 3, 2)]=(0.0957341745938-0.00895546910152j)*x_ref[0]**o + ((0.667397499817+0.43274701996j))*x_ref[0] + ((0.796052288456-0.671939200863j))*x_ref[1]**o + ((-0.67280529386+0.652183948973j))*x_ref[1]
        arg[(0, 3, 3, 3)]=(-0.0961925006526+0.64760509667j)*x[0]**o + ((-0.46356921924-0.20798164277j))*x[0] + ((-0.950515209891+0.542721712451j))*x[1]**o + ((0.0473246774475+0.487521462592j))*x[1]
        ref[(0, 3, 3, 3)]=(-0.0961925006526+0.64760509667j)*x_ref[0]**o + ((-0.46356921924-0.20798164277j))*x_ref[0] + ((-0.950515209891+0.542721712451j))*x_ref[1]**o + ((0.0473246774475+0.487521462592j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.804964822631-0.491117075289j)*x[0]**o + ((0.222662710349-0.577031899994j))*x[0] + ((-0.959497985242+0.715375128373j))*x[1]**o + ((0.294375446027-0.281602091422j))*x[1]
        ref[(1, 0, 0, 0)]=(0.804964822631-0.491117075289j)*x_ref[0]**o + ((0.222662710349-0.577031899994j))*x_ref[0] + ((-0.959497985242+0.715375128373j))*x_ref[1]**o + ((0.294375446027-0.281602091422j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(-0.132140846702+0.147792717748j)*x[0]**o + ((-0.195250794557+0.260541391555j))*x[0] + ((0.13243491626+0.44754280229j))*x[1]**o + ((0.613960378898+0.67109289201j))*x[1]
        ref[(1, 0, 0, 1)]=(-0.132140846702+0.147792717748j)*x_ref[0]**o + ((-0.195250794557+0.260541391555j))*x_ref[0] + ((0.13243491626+0.44754280229j))*x_ref[1]**o + ((0.613960378898+0.67109289201j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(-0.272775760633-0.287057491903j)*x[0]**o + ((-0.228755684006+0.0459598891713j))*x[0] + ((-0.771102845336+0.698467149451j))*x[1]**o + ((-0.401509974322+0.679203630536j))*x[1]
        ref[(1, 0, 0, 2)]=(-0.272775760633-0.287057491903j)*x_ref[0]**o + ((-0.228755684006+0.0459598891713j))*x_ref[0] + ((-0.771102845336+0.698467149451j))*x_ref[1]**o + ((-0.401509974322+0.679203630536j))*x_ref[1]
        arg[(1, 0, 0, 3)]=(-0.911917973885-0.200418984591j)*x[0]**o + ((-0.378045211177+0.0343847838654j))*x[0] + ((-0.847405529497-0.0426727526456j))*x[1]**o + ((-0.891307733025-0.640097862039j))*x[1]
        ref[(1, 0, 0, 3)]=(-0.911917973885-0.200418984591j)*x_ref[0]**o + ((-0.378045211177+0.0343847838654j))*x_ref[0] + ((-0.847405529497-0.0426727526456j))*x_ref[1]**o + ((-0.891307733025-0.640097862039j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(0.0876379742205+0.00472199663596j)*x[0]**o + ((-0.455405856173+0.5735584385j))*x[0] + ((-0.339031129906+0.485412802728j))*x[1]**o + ((0.328323425745+0.619803285201j))*x[1]
        ref[(1, 0, 1, 0)]=(0.0876379742205+0.00472199663596j)*x_ref[0]**o + ((-0.455405856173+0.5735584385j))*x_ref[0] + ((-0.339031129906+0.485412802728j))*x_ref[1]**o + ((0.328323425745+0.619803285201j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.939737231359+0.11073330464j)*x[0]**o + ((-0.371017358722-0.106051858064j))*x[0] + ((0.990670104673+0.780293256556j))*x[1]**o + ((0.391504563391+0.335678652394j))*x[1]
        ref[(1, 0, 1, 1)]=(0.939737231359+0.11073330464j)*x_ref[0]**o + ((-0.371017358722-0.106051858064j))*x_ref[0] + ((0.990670104673+0.780293256556j))*x_ref[1]**o + ((0.391504563391+0.335678652394j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(-0.943344823053-0.15720356311j)*x[0]**o + ((0.233413828365-0.411011676429j))*x[0] + ((-0.530541441537+0.638724200885j))*x[1]**o + ((0.599849882949+0.78909303601j))*x[1]
        ref[(1, 0, 1, 2)]=(-0.943344823053-0.15720356311j)*x_ref[0]**o + ((0.233413828365-0.411011676429j))*x_ref[0] + ((-0.530541441537+0.638724200885j))*x_ref[1]**o + ((0.599849882949+0.78909303601j))*x_ref[1]
        arg[(1, 0, 1, 3)]=(-0.29960374326+0.878003896625j)*x[0]**o + ((0.724947346712+0.211279188542j))*x[0] + ((-0.803876933408+0.206310631413j))*x[1]**o + ((0.207911987749-0.0884774889575j))*x[1]
        ref[(1, 0, 1, 3)]=(-0.29960374326+0.878003896625j)*x_ref[0]**o + ((0.724947346712+0.211279188542j))*x_ref[0] + ((-0.803876933408+0.206310631413j))*x_ref[1]**o + ((0.207911987749-0.0884774889575j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(0.903272728038-0.949598144503j)*x[0]**o + ((-0.530292736047+0.0567816223307j))*x[0] + ((0.867709337039+0.372247450671j))*x[1]**o + ((-0.312511192506-0.0135434813784j))*x[1]
        ref[(1, 0, 2, 0)]=(0.903272728038-0.949598144503j)*x_ref[0]**o + ((-0.530292736047+0.0567816223307j))*x_ref[0] + ((0.867709337039+0.372247450671j))*x_ref[1]**o + ((-0.312511192506-0.0135434813784j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(-0.6197105537-0.889903526477j)*x[0]**o + ((0.234915122074-0.547991397057j))*x[0] + ((0.984836884158-0.483490770571j))*x[1]**o + ((0.859777215563-0.99214949269j))*x[1]
        ref[(1, 0, 2, 1)]=(-0.6197105537-0.889903526477j)*x_ref[0]**o + ((0.234915122074-0.547991397057j))*x_ref[0] + ((0.984836884158-0.483490770571j))*x_ref[1]**o + ((0.859777215563-0.99214949269j))*x_ref[1]
        arg[(1, 0, 2, 2)]=(0.974139705699+0.256445631028j)*x[0]**o + ((0.378701981171-0.944511569178j))*x[0] + ((-0.365016266321+0.0345091408419j))*x[1]**o + ((-0.213467707841+0.388938677417j))*x[1]
        ref[(1, 0, 2, 2)]=(0.974139705699+0.256445631028j)*x_ref[0]**o + ((0.378701981171-0.944511569178j))*x_ref[0] + ((-0.365016266321+0.0345091408419j))*x_ref[1]**o + ((-0.213467707841+0.388938677417j))*x_ref[1]
        arg[(1, 0, 2, 3)]=(0.1708068784-0.349481306681j)*x[0]**o + ((0.701560652558+0.512715283722j))*x[0] + ((0.725801696075-0.42382913066j))*x[1]**o + ((-0.383782637971-0.783165210481j))*x[1]
        ref[(1, 0, 2, 3)]=(0.1708068784-0.349481306681j)*x_ref[0]**o + ((0.701560652558+0.512715283722j))*x_ref[0] + ((0.725801696075-0.42382913066j))*x_ref[1]**o + ((-0.383782637971-0.783165210481j))*x_ref[1]
        arg[(1, 0, 3, 0)]=(0.991462347262-0.892071948572j)*x[0]**o + ((0.0816934826331+0.349909203085j))*x[0] + ((-0.100195549585-0.119818492796j))*x[1]**o + ((-0.183211908012-0.386421044189j))*x[1]
        ref[(1, 0, 3, 0)]=(0.991462347262-0.892071948572j)*x_ref[0]**o + ((0.0816934826331+0.349909203085j))*x_ref[0] + ((-0.100195549585-0.119818492796j))*x_ref[1]**o + ((-0.183211908012-0.386421044189j))*x_ref[1]
        arg[(1, 0, 3, 1)]=(0.342358957097-0.230735496737j)*x[0]**o + ((0.468698773788+0.0419529813315j))*x[0] + ((0.976957258252-0.195055226178j))*x[1]**o + ((-0.857685247361-0.235158010973j))*x[1]
        ref[(1, 0, 3, 1)]=(0.342358957097-0.230735496737j)*x_ref[0]**o + ((0.468698773788+0.0419529813315j))*x_ref[0] + ((0.976957258252-0.195055226178j))*x_ref[1]**o + ((-0.857685247361-0.235158010973j))*x_ref[1]
        arg[(1, 0, 3, 2)]=(0.810571760039-0.0319417871499j)*x[0]**o + ((0.878036279819-0.0850947581337j))*x[0] + ((0.0265946133698+0.531115434212j))*x[1]**o + ((0.443545874916-0.282629857944j))*x[1]
        ref[(1, 0, 3, 2)]=(0.810571760039-0.0319417871499j)*x_ref[0]**o + ((0.878036279819-0.0850947581337j))*x_ref[0] + ((0.0265946133698+0.531115434212j))*x_ref[1]**o + ((0.443545874916-0.282629857944j))*x_ref[1]
        arg[(1, 0, 3, 3)]=(0.666710574586+0.636843394187j)*x[0]**o + ((0.657342116141+0.679510107327j))*x[0] + ((-0.775114794638-0.422536543381j))*x[1]**o + ((-0.54545151273+0.514321962721j))*x[1]
        ref[(1, 0, 3, 3)]=(0.666710574586+0.636843394187j)*x_ref[0]**o + ((0.657342116141+0.679510107327j))*x_ref[0] + ((-0.775114794638-0.422536543381j))*x_ref[1]**o + ((-0.54545151273+0.514321962721j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.116595026773+0.00130735715912j)*x[0]**o + ((-0.11485344497-0.616532988143j))*x[0] + ((-0.578280990233-0.117186749586j))*x[1]**o + ((-0.871351269376-0.558506160669j))*x[1]
        ref[(1, 1, 0, 0)]=(0.116595026773+0.00130735715912j)*x_ref[0]**o + ((-0.11485344497-0.616532988143j))*x_ref[0] + ((-0.578280990233-0.117186749586j))*x_ref[1]**o + ((-0.871351269376-0.558506160669j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.686565387815-0.645291532611j)*x[0]**o + ((0.367360809214-0.263623541223j))*x[0] + ((0.805155666577-0.458668056775j))*x[1]**o + ((0.602040358441+0.287177859975j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.686565387815-0.645291532611j)*x_ref[0]**o + ((0.367360809214-0.263623541223j))*x_ref[0] + ((0.805155666577-0.458668056775j))*x_ref[1]**o + ((0.602040358441+0.287177859975j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(-0.134286831472+0.718636195752j)*x[0]**o + ((0.187125369432-0.254123769749j))*x[0] + ((-0.453941449686-0.725556806749j))*x[1]**o + ((0.296386579968+0.451534599771j))*x[1]
        ref[(1, 1, 0, 2)]=(-0.134286831472+0.718636195752j)*x_ref[0]**o + ((0.187125369432-0.254123769749j))*x_ref[0] + ((-0.453941449686-0.725556806749j))*x_ref[1]**o + ((0.296386579968+0.451534599771j))*x_ref[1]
        arg[(1, 1, 0, 3)]=(0.358621174452+0.710267637144j)*x[0]**o + ((0.395477350743-0.43129310957j))*x[0] + ((-0.400947578504+0.540206948455j))*x[1]**o + ((0.083668052547-0.778853865061j))*x[1]
        ref[(1, 1, 0, 3)]=(0.358621174452+0.710267637144j)*x_ref[0]**o + ((0.395477350743-0.43129310957j))*x_ref[0] + ((-0.400947578504+0.540206948455j))*x_ref[1]**o + ((0.083668052547-0.778853865061j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.561386748042+0.348832451645j)*x[0]**o + ((-0.496966142267-0.274740412653j))*x[0] + ((-0.107985862483+0.523154078303j))*x[1]**o + ((-0.466282555395-0.241036570786j))*x[1]
        ref[(1, 1, 1, 0)]=(0.561386748042+0.348832451645j)*x_ref[0]**o + ((-0.496966142267-0.274740412653j))*x_ref[0] + ((-0.107985862483+0.523154078303j))*x_ref[1]**o + ((-0.466282555395-0.241036570786j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.724354334486+0.109663625438j)*x[0]**o + ((-0.785105568157-0.442562677287j))*x[0] + ((0.654699536976+0.220298110534j))*x[1]**o + ((0.337467384562+0.731216630102j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.724354334486+0.109663625438j)*x_ref[0]**o + ((-0.785105568157-0.442562677287j))*x_ref[0] + ((0.654699536976+0.220298110534j))*x_ref[1]**o + ((0.337467384562+0.731216630102j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(0.638311790884-0.665996975754j)*x[0]**o + ((0.927588420548+0.293836736113j))*x[0] + ((-0.054758540324-0.138320330778j))*x[1]**o + ((-0.840482056697+0.290600628372j))*x[1]
        ref[(1, 1, 1, 2)]=(0.638311790884-0.665996975754j)*x_ref[0]**o + ((0.927588420548+0.293836736113j))*x_ref[0] + ((-0.054758540324-0.138320330778j))*x_ref[1]**o + ((-0.840482056697+0.290600628372j))*x_ref[1]
        arg[(1, 1, 1, 3)]=(-0.0395214250739+0.405294234339j)*x[0]**o + ((0.12536245068-0.87318090141j))*x[0] + ((-0.256677624002-0.88306717764j))*x[1]**o + ((-0.273126059564-0.865038823886j))*x[1]
        ref[(1, 1, 1, 3)]=(-0.0395214250739+0.405294234339j)*x_ref[0]**o + ((0.12536245068-0.87318090141j))*x_ref[0] + ((-0.256677624002-0.88306717764j))*x_ref[1]**o + ((-0.273126059564-0.865038823886j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(0.854565483311+0.444977350317j)*x[0]**o + ((0.790653757674-0.316175288544j))*x[0] + ((0.202565028477+0.982415451058j))*x[1]**o + ((0.464167778403-0.403522768656j))*x[1]
        ref[(1, 1, 2, 0)]=(0.854565483311+0.444977350317j)*x_ref[0]**o + ((0.790653757674-0.316175288544j))*x_ref[0] + ((0.202565028477+0.982415451058j))*x_ref[1]**o + ((0.464167778403-0.403522768656j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(0.62255199067+0.833308505156j)*x[0]**o + ((-0.470002679716+0.663397704258j))*x[0] + ((-0.634858125221+0.538742542575j))*x[1]**o + ((0.587479740662-0.231422568203j))*x[1]
        ref[(1, 1, 2, 1)]=(0.62255199067+0.833308505156j)*x_ref[0]**o + ((-0.470002679716+0.663397704258j))*x_ref[0] + ((-0.634858125221+0.538742542575j))*x_ref[1]**o + ((0.587479740662-0.231422568203j))*x_ref[1]
        arg[(1, 1, 2, 2)]=(-0.0695489690866+0.793989470472j)*x[0]**o + ((0.275094199963+0.889907093455j))*x[0] + ((-0.109285364652-0.735621778075j))*x[1]**o + ((0.875399225537+0.554169017828j))*x[1]
        ref[(1, 1, 2, 2)]=(-0.0695489690866+0.793989470472j)*x_ref[0]**o + ((0.275094199963+0.889907093455j))*x_ref[0] + ((-0.109285364652-0.735621778075j))*x_ref[1]**o + ((0.875399225537+0.554169017828j))*x_ref[1]
        arg[(1, 1, 2, 3)]=(-0.890230448133+0.542372860378j)*x[0]**o + ((-0.532563387846-0.00756629722783j))*x[0] + ((-0.947371487418+0.365854956531j))*x[1]**o + ((0.123357717352-0.874379526159j))*x[1]
        ref[(1, 1, 2, 3)]=(-0.890230448133+0.542372860378j)*x_ref[0]**o + ((-0.532563387846-0.00756629722783j))*x_ref[0] + ((-0.947371487418+0.365854956531j))*x_ref[1]**o + ((0.123357717352-0.874379526159j))*x_ref[1]
        arg[(1, 1, 3, 0)]=(-0.921205296905+0.274908105455j)*x[0]**o + ((-0.0708872845451+0.493489289435j))*x[0] + ((-0.152673085845-0.558749548162j))*x[1]**o + ((0.52131003838-0.986899004268j))*x[1]
        ref[(1, 1, 3, 0)]=(-0.921205296905+0.274908105455j)*x_ref[0]**o + ((-0.0708872845451+0.493489289435j))*x_ref[0] + ((-0.152673085845-0.558749548162j))*x_ref[1]**o + ((0.52131003838-0.986899004268j))*x_ref[1]
        arg[(1, 1, 3, 1)]=(0.0736038916095+0.203482552203j)*x[0]**o + ((0.977203775295-0.384913419097j))*x[0] + ((-0.88537703872-0.973854119535j))*x[1]**o + ((0.22100229402+0.505455403867j))*x[1]
        ref[(1, 1, 3, 1)]=(0.0736038916095+0.203482552203j)*x_ref[0]**o + ((0.977203775295-0.384913419097j))*x_ref[0] + ((-0.88537703872-0.973854119535j))*x_ref[1]**o + ((0.22100229402+0.505455403867j))*x_ref[1]
        arg[(1, 1, 3, 2)]=(0.122444626793-0.437170924851j)*x[0]**o + ((-0.36223035997-0.757162628278j))*x[0] + ((-0.515702196979-0.252938694248j))*x[1]**o + ((-0.124640758379+0.553038001581j))*x[1]
        ref[(1, 1, 3, 2)]=(0.122444626793-0.437170924851j)*x_ref[0]**o + ((-0.36223035997-0.757162628278j))*x_ref[0] + ((-0.515702196979-0.252938694248j))*x_ref[1]**o + ((-0.124640758379+0.553038001581j))*x_ref[1]
        arg[(1, 1, 3, 3)]=(-0.473154181029-0.119156989655j)*x[0]**o + ((-0.232493481838-0.698745473407j))*x[0] + ((-0.537193654703-0.478700655957j))*x[1]**o + ((0.941973204518-0.953565303153j))*x[1]
        ref[(1, 1, 3, 3)]=(-0.473154181029-0.119156989655j)*x_ref[0]**o + ((-0.232493481838-0.698745473407j))*x_ref[0] + ((-0.537193654703-0.478700655957j))*x_ref[1]**o + ((0.941973204518-0.953565303153j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(0.198251124888-0.618456359975j)*x[0]**o + ((0.969813152067-0.383709305833j))*x[0] + ((0.897604634359-0.899758517243j))*x[1]**o + ((0.0286013796901+0.926285028104j))*x[1]
        ref[(1, 2, 0, 0)]=(0.198251124888-0.618456359975j)*x_ref[0]**o + ((0.969813152067-0.383709305833j))*x_ref[0] + ((0.897604634359-0.899758517243j))*x_ref[1]**o + ((0.0286013796901+0.926285028104j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.554416658578+0.716406574898j)*x[0]**o + ((-0.573974430618+0.34165155497j))*x[0] + ((-0.944552067028-0.281988864261j))*x[1]**o + ((-0.764985848158-0.176922652168j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.554416658578+0.716406574898j)*x_ref[0]**o + ((-0.573974430618+0.34165155497j))*x_ref[0] + ((-0.944552067028-0.281988864261j))*x_ref[1]**o + ((-0.764985848158-0.176922652168j))*x_ref[1]
        arg[(1, 2, 0, 2)]=(0.375085108416+0.281135183398j)*x[0]**o + ((0.706232276705+0.90731073424j))*x[0] + ((-0.484597377678+0.705672869758j))*x[1]**o + ((-0.521892673293-0.891939263787j))*x[1]
        ref[(1, 2, 0, 2)]=(0.375085108416+0.281135183398j)*x_ref[0]**o + ((0.706232276705+0.90731073424j))*x_ref[0] + ((-0.484597377678+0.705672869758j))*x_ref[1]**o + ((-0.521892673293-0.891939263787j))*x_ref[1]
        arg[(1, 2, 0, 3)]=(0.90324221146+0.341851940289j)*x[0]**o + ((0.241388973603+0.0609794662372j))*x[0] + ((-0.619032017945-0.110391333182j))*x[1]**o + ((-0.661092098395+0.0519466250867j))*x[1]
        ref[(1, 2, 0, 3)]=(0.90324221146+0.341851940289j)*x_ref[0]**o + ((0.241388973603+0.0609794662372j))*x_ref[0] + ((-0.619032017945-0.110391333182j))*x_ref[1]**o + ((-0.661092098395+0.0519466250867j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(-0.416551642728-0.340631314797j)*x[0]**o + ((0.539987984522+0.761261091043j))*x[0] + ((0.0114216286938+0.435985352012j))*x[1]**o + ((-0.0478466642537+0.154209492662j))*x[1]
        ref[(1, 2, 1, 0)]=(-0.416551642728-0.340631314797j)*x_ref[0]**o + ((0.539987984522+0.761261091043j))*x_ref[0] + ((0.0114216286938+0.435985352012j))*x_ref[1]**o + ((-0.0478466642537+0.154209492662j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.413379646811+0.701489877879j)*x[0]**o + ((0.584044307522-0.198923226284j))*x[0] + ((-0.117724872049-0.245246013133j))*x[1]**o + ((-0.0632526110968-0.393592346113j))*x[1]
        ref[(1, 2, 1, 1)]=(0.413379646811+0.701489877879j)*x_ref[0]**o + ((0.584044307522-0.198923226284j))*x_ref[0] + ((-0.117724872049-0.245246013133j))*x_ref[1]**o + ((-0.0632526110968-0.393592346113j))*x_ref[1]
        arg[(1, 2, 1, 2)]=(-0.792136846853+0.0895206860374j)*x[0]**o + ((-0.681813054921+0.0118874991391j))*x[0] + ((0.304689449329-0.857978456976j))*x[1]**o + ((-0.191830661206+0.00609641966407j))*x[1]
        ref[(1, 2, 1, 2)]=(-0.792136846853+0.0895206860374j)*x_ref[0]**o + ((-0.681813054921+0.0118874991391j))*x_ref[0] + ((0.304689449329-0.857978456976j))*x_ref[1]**o + ((-0.191830661206+0.00609641966407j))*x_ref[1]
        arg[(1, 2, 1, 3)]=(0.303499263304-0.634405480296j)*x[0]**o + ((0.63988538669-0.612593925515j))*x[0] + ((-0.640322346216-0.521266931236j))*x[1]**o + ((0.197823952311-0.89435459676j))*x[1]
        ref[(1, 2, 1, 3)]=(0.303499263304-0.634405480296j)*x_ref[0]**o + ((0.63988538669-0.612593925515j))*x_ref[0] + ((-0.640322346216-0.521266931236j))*x_ref[1]**o + ((0.197823952311-0.89435459676j))*x_ref[1]
        arg[(1, 2, 2, 0)]=(-0.348388674565-0.263988043587j)*x[0]**o + ((-0.962363607356+0.309527350011j))*x[0] + ((-0.660584559329+0.0463883860986j))*x[1]**o + ((-0.750815778159-0.742484519229j))*x[1]
        ref[(1, 2, 2, 0)]=(-0.348388674565-0.263988043587j)*x_ref[0]**o + ((-0.962363607356+0.309527350011j))*x_ref[0] + ((-0.660584559329+0.0463883860986j))*x_ref[1]**o + ((-0.750815778159-0.742484519229j))*x_ref[1]
        arg[(1, 2, 2, 1)]=(-0.728609281935+0.836467200957j)*x[0]**o + ((-0.322753654529-0.145340861365j))*x[0] + ((0.302175465283+0.58193393559j))*x[1]**o + ((0.66342074774+0.563923159522j))*x[1]
        ref[(1, 2, 2, 1)]=(-0.728609281935+0.836467200957j)*x_ref[0]**o + ((-0.322753654529-0.145340861365j))*x_ref[0] + ((0.302175465283+0.58193393559j))*x_ref[1]**o + ((0.66342074774+0.563923159522j))*x_ref[1]
        arg[(1, 2, 2, 2)]=(0.341150812473-0.765422836158j)*x[0]**o + ((-0.768684575747+0.194260616324j))*x[0] + ((-0.0906307323187-0.340331122377j))*x[1]**o + ((0.51524818409+0.683136620143j))*x[1]
        ref[(1, 2, 2, 2)]=(0.341150812473-0.765422836158j)*x_ref[0]**o + ((-0.768684575747+0.194260616324j))*x_ref[0] + ((-0.0906307323187-0.340331122377j))*x_ref[1]**o + ((0.51524818409+0.683136620143j))*x_ref[1]
        arg[(1, 2, 2, 3)]=(0.412312621366+0.862527827792j)*x[0]**o + ((-0.0379098192326-0.860272077386j))*x[0] + ((-0.909476438642+0.0977590594313j))*x[1]**o + ((-0.959507526306-0.363051492973j))*x[1]
        ref[(1, 2, 2, 3)]=(0.412312621366+0.862527827792j)*x_ref[0]**o + ((-0.0379098192326-0.860272077386j))*x_ref[0] + ((-0.909476438642+0.0977590594313j))*x_ref[1]**o + ((-0.959507526306-0.363051492973j))*x_ref[1]
        arg[(1, 2, 3, 0)]=(0.319208002701+0.0500833657534j)*x[0]**o + ((-0.657963231482-0.943273835394j))*x[0] + ((-0.178153789304-0.447358918974j))*x[1]**o + ((0.840852553754-0.890314694226j))*x[1]
        ref[(1, 2, 3, 0)]=(0.319208002701+0.0500833657534j)*x_ref[0]**o + ((-0.657963231482-0.943273835394j))*x_ref[0] + ((-0.178153789304-0.447358918974j))*x_ref[1]**o + ((0.840852553754-0.890314694226j))*x_ref[1]
        arg[(1, 2, 3, 1)]=(0.912867863593+0.247678344699j)*x[0]**o + ((0.610300357998-0.266546064068j))*x[0] + ((0.683566120014+0.378808091414j))*x[1]**o + ((-0.206409660187-0.0720496449063j))*x[1]
        ref[(1, 2, 3, 1)]=(0.912867863593+0.247678344699j)*x_ref[0]**o + ((0.610300357998-0.266546064068j))*x_ref[0] + ((0.683566120014+0.378808091414j))*x_ref[1]**o + ((-0.206409660187-0.0720496449063j))*x_ref[1]
        arg[(1, 2, 3, 2)]=(0.921182514265+0.596932759006j)*x[0]**o + ((-0.499534853967+0.361344899384j))*x[0] + ((-0.423467956965+0.495690152816j))*x[1]**o + ((0.665763074979-0.986253539892j))*x[1]
        ref[(1, 2, 3, 2)]=(0.921182514265+0.596932759006j)*x_ref[0]**o + ((-0.499534853967+0.361344899384j))*x_ref[0] + ((-0.423467956965+0.495690152816j))*x_ref[1]**o + ((0.665763074979-0.986253539892j))*x_ref[1]
        arg[(1, 2, 3, 3)]=(0.788402233563+0.365373761849j)*x[0]**o + ((0.627385480575-0.741149356304j))*x[0] + ((0.831351431396-0.262964575887j))*x[1]**o + ((-0.746098808003+0.0485562690164j))*x[1]
        ref[(1, 2, 3, 3)]=(0.788402233563+0.365373761849j)*x_ref[0]**o + ((0.627385480575-0.741149356304j))*x_ref[0] + ((0.831351431396-0.262964575887j))*x_ref[1]**o + ((-0.746098808003+0.0485562690164j))*x_ref[1]
        arg[(1, 3, 0, 0)]=(-0.337981792931-0.385162999118j)*x[0]**o + ((-0.0582951806733-0.427108995168j))*x[0] + ((-0.378158916637+0.456335373388j))*x[1]**o + ((0.513300080081-0.594855322167j))*x[1]
        ref[(1, 3, 0, 0)]=(-0.337981792931-0.385162999118j)*x_ref[0]**o + ((-0.0582951806733-0.427108995168j))*x_ref[0] + ((-0.378158916637+0.456335373388j))*x_ref[1]**o + ((0.513300080081-0.594855322167j))*x_ref[1]
        arg[(1, 3, 0, 1)]=(-0.0697974307654+0.880851467555j)*x[0]**o + ((0.702529925277-0.00693914185147j))*x[0] + ((-0.691443345036-0.756176013598j))*x[1]**o + ((0.19880428589-0.403333220145j))*x[1]
        ref[(1, 3, 0, 1)]=(-0.0697974307654+0.880851467555j)*x_ref[0]**o + ((0.702529925277-0.00693914185147j))*x_ref[0] + ((-0.691443345036-0.756176013598j))*x_ref[1]**o + ((0.19880428589-0.403333220145j))*x_ref[1]
        arg[(1, 3, 0, 2)]=(0.392057756383+0.869853108055j)*x[0]**o + ((-0.0285973520227-0.56340289223j))*x[0] + ((-0.840386612518-0.777053431252j))*x[1]**o + ((-0.885370600572-0.199915219097j))*x[1]
        ref[(1, 3, 0, 2)]=(0.392057756383+0.869853108055j)*x_ref[0]**o + ((-0.0285973520227-0.56340289223j))*x_ref[0] + ((-0.840386612518-0.777053431252j))*x_ref[1]**o + ((-0.885370600572-0.199915219097j))*x_ref[1]
        arg[(1, 3, 0, 3)]=(0.990973318643+0.754528614744j)*x[0]**o + ((-0.914407178607+0.0567505710006j))*x[0] + ((-0.3802596813+0.189806083442j))*x[1]**o + ((-0.947870798931-0.600847663333j))*x[1]
        ref[(1, 3, 0, 3)]=(0.990973318643+0.754528614744j)*x_ref[0]**o + ((-0.914407178607+0.0567505710006j))*x_ref[0] + ((-0.3802596813+0.189806083442j))*x_ref[1]**o + ((-0.947870798931-0.600847663333j))*x_ref[1]
        arg[(1, 3, 1, 0)]=(0.361149335037+0.351381784295j)*x[0]**o + ((-0.811766119172-0.575671479291j))*x[0] + ((-0.271917239765-0.503678355666j))*x[1]**o + ((0.319079520087-0.577129941744j))*x[1]
        ref[(1, 3, 1, 0)]=(0.361149335037+0.351381784295j)*x_ref[0]**o + ((-0.811766119172-0.575671479291j))*x_ref[0] + ((-0.271917239765-0.503678355666j))*x_ref[1]**o + ((0.319079520087-0.577129941744j))*x_ref[1]
        arg[(1, 3, 1, 1)]=(0.821764029733-0.496516821999j)*x[0]**o + ((0.184059126908+0.309972401235j))*x[0] + ((-0.310130011757+0.712694188987j))*x[1]**o + ((0.460857489573+0.591270761505j))*x[1]
        ref[(1, 3, 1, 1)]=(0.821764029733-0.496516821999j)*x_ref[0]**o + ((0.184059126908+0.309972401235j))*x_ref[0] + ((-0.310130011757+0.712694188987j))*x_ref[1]**o + ((0.460857489573+0.591270761505j))*x_ref[1]
        arg[(1, 3, 1, 2)]=(0.875339144326+0.727194347673j)*x[0]**o + ((-0.679240805225-0.324716713172j))*x[0] + ((0.136639403255+0.425609949059j))*x[1]**o + ((0.117456759533+0.164781936366j))*x[1]
        ref[(1, 3, 1, 2)]=(0.875339144326+0.727194347673j)*x_ref[0]**o + ((-0.679240805225-0.324716713172j))*x_ref[0] + ((0.136639403255+0.425609949059j))*x_ref[1]**o + ((0.117456759533+0.164781936366j))*x_ref[1]
        arg[(1, 3, 1, 3)]=(0.623237224278+0.563269975617j)*x[0]**o + ((0.966744900921+0.394151888641j))*x[0] + ((0.836231407942+0.325685981857j))*x[1]**o + ((-0.388621272932-0.227371633761j))*x[1]
        ref[(1, 3, 1, 3)]=(0.623237224278+0.563269975617j)*x_ref[0]**o + ((0.966744900921+0.394151888641j))*x_ref[0] + ((0.836231407942+0.325685981857j))*x_ref[1]**o + ((-0.388621272932-0.227371633761j))*x_ref[1]
        arg[(1, 3, 2, 0)]=(-0.810827383113+0.262053292276j)*x[0]**o + ((0.962604932035-0.57399750721j))*x[0] + ((0.433328908352+0.712247214134j))*x[1]**o + ((0.508364755896-0.790654693741j))*x[1]
        ref[(1, 3, 2, 0)]=(-0.810827383113+0.262053292276j)*x_ref[0]**o + ((0.962604932035-0.57399750721j))*x_ref[0] + ((0.433328908352+0.712247214134j))*x_ref[1]**o + ((0.508364755896-0.790654693741j))*x_ref[1]
        arg[(1, 3, 2, 1)]=(-0.0444086565016+0.285847042002j)*x[0]**o + ((0.0538128862542+0.0787788077042j))*x[0] + ((-0.913817037378-0.754009043293j))*x[1]**o + ((0.847910933094-0.761444647034j))*x[1]
        ref[(1, 3, 2, 1)]=(-0.0444086565016+0.285847042002j)*x_ref[0]**o + ((0.0538128862542+0.0787788077042j))*x_ref[0] + ((-0.913817037378-0.754009043293j))*x_ref[1]**o + ((0.847910933094-0.761444647034j))*x_ref[1]
        arg[(1, 3, 2, 2)]=(-0.313904712678-0.0502542056564j)*x[0]**o + ((0.19226757488+0.60153405939j))*x[0] + ((-0.679302557432-0.0525887934695j))*x[1]**o + ((-0.638631165236-0.988579276669j))*x[1]
        ref[(1, 3, 2, 2)]=(-0.313904712678-0.0502542056564j)*x_ref[0]**o + ((0.19226757488+0.60153405939j))*x_ref[0] + ((-0.679302557432-0.0525887934695j))*x_ref[1]**o + ((-0.638631165236-0.988579276669j))*x_ref[1]
        arg[(1, 3, 2, 3)]=(-0.511400950791-0.193656167083j)*x[0]**o + ((0.251342231644+0.016979370541j))*x[0] + ((0.625320516021-0.65305818826j))*x[1]**o + ((0.613361296517+0.170422360379j))*x[1]
        ref[(1, 3, 2, 3)]=(-0.511400950791-0.193656167083j)*x_ref[0]**o + ((0.251342231644+0.016979370541j))*x_ref[0] + ((0.625320516021-0.65305818826j))*x_ref[1]**o + ((0.613361296517+0.170422360379j))*x_ref[1]
        arg[(1, 3, 3, 0)]=(-0.355420353969+0.837730038428j)*x[0]**o + ((0.723758151894-0.553408393769j))*x[0] + ((0.569856393391-0.526335730258j))*x[1]**o + ((-0.100855570623-0.826435474799j))*x[1]
        ref[(1, 3, 3, 0)]=(-0.355420353969+0.837730038428j)*x_ref[0]**o + ((0.723758151894-0.553408393769j))*x_ref[0] + ((0.569856393391-0.526335730258j))*x_ref[1]**o + ((-0.100855570623-0.826435474799j))*x_ref[1]
        arg[(1, 3, 3, 1)]=(-0.290466682565+0.278764182492j)*x[0]**o + ((0.58211778998+0.229398045107j))*x[0] + ((0.230715035383-0.289518226302j))*x[1]**o + ((0.727870314055-0.221374365657j))*x[1]
        ref[(1, 3, 3, 1)]=(-0.290466682565+0.278764182492j)*x_ref[0]**o + ((0.58211778998+0.229398045107j))*x_ref[0] + ((0.230715035383-0.289518226302j))*x_ref[1]**o + ((0.727870314055-0.221374365657j))*x_ref[1]
        arg[(1, 3, 3, 2)]=(0.43711771623-0.363562900599j)*x[0]**o + ((-0.254864494332+0.625531992319j))*x[0] + ((0.203862043743-0.900531335445j))*x[1]**o + ((-0.534950126119-0.447188131165j))*x[1]
        ref[(1, 3, 3, 2)]=(0.43711771623-0.363562900599j)*x_ref[0]**o + ((-0.254864494332+0.625531992319j))*x_ref[0] + ((0.203862043743-0.900531335445j))*x_ref[1]**o + ((-0.534950126119-0.447188131165j))*x_ref[1]
        arg[(1, 3, 3, 3)]=(0.552625277545+0.238547945006j)*x[0]**o + ((0.339319686784-0.0352178008894j))*x[0] + ((0.812840472162-0.0100379156553j))*x[1]**o + ((0.0679325189072-0.092934399085j))*x[1]
        ref[(1, 3, 3, 3)]=(0.552625277545+0.238547945006j)*x_ref[0]**o + ((0.339319686784-0.0352178008894j))*x_ref[0] + ((0.812840472162-0.0100379156553j))*x_ref[1]**o + ((0.0679325189072-0.092934399085j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.895332329416-0.675665300562j)*x[2]**o + ((-0.913938140469-0.44496309403j))*x[2]
            ref[(0, 0, 0, 0)]+=(0.895332329416-0.675665300562j)*x_ref[2]**o + ((-0.913938140469-0.44496309403j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.226877151748-0.804950158323j)*x[2]**o + ((0.337625488219-0.686343307186j))*x[2]
            ref[(0, 0, 0, 1)]+=(-0.226877151748-0.804950158323j)*x_ref[2]**o + ((0.337625488219-0.686343307186j))*x_ref[2]
            arg[(0, 0, 0, 2)]+=(-0.317172175115+0.553906261467j)*x[2]**o + ((-0.957641209446-0.706293162334j))*x[2]
            ref[(0, 0, 0, 2)]+=(-0.317172175115+0.553906261467j)*x_ref[2]**o + ((-0.957641209446-0.706293162334j))*x_ref[2]
            arg[(0, 0, 0, 3)]+=(0.508195328376+0.218829376647j)*x[2]**o + ((0.29077085062-0.379303565394j))*x[2]
            ref[(0, 0, 0, 3)]+=(0.508195328376+0.218829376647j)*x_ref[2]**o + ((0.29077085062-0.379303565394j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.447336479034-0.829002012153j)*x[2]**o + ((-0.544345941829-0.0229064053463j))*x[2]
            ref[(0, 0, 1, 0)]+=(-0.447336479034-0.829002012153j)*x_ref[2]**o + ((-0.544345941829-0.0229064053463j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.139508204833+0.517114281851j)*x[2]**o + ((0.623975273146+0.826900558673j))*x[2]
            ref[(0, 0, 1, 1)]+=(0.139508204833+0.517114281851j)*x_ref[2]**o + ((0.623975273146+0.826900558673j))*x_ref[2]
            arg[(0, 0, 1, 2)]+=(0.39823225068-0.329506729314j)*x[2]**o + ((-0.932015510268-0.035884999511j))*x[2]
            ref[(0, 0, 1, 2)]+=(0.39823225068-0.329506729314j)*x_ref[2]**o + ((-0.932015510268-0.035884999511j))*x_ref[2]
            arg[(0, 0, 1, 3)]+=(-0.889912477336-0.939000804248j)*x[2]**o + ((0.66478748395+0.257754892038j))*x[2]
            ref[(0, 0, 1, 3)]+=(-0.889912477336-0.939000804248j)*x_ref[2]**o + ((0.66478748395+0.257754892038j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(-0.202786371319-0.350259486304j)*x[2]**o + ((-0.891396164794+0.94757088821j))*x[2]
            ref[(0, 0, 2, 0)]+=(-0.202786371319-0.350259486304j)*x_ref[2]**o + ((-0.891396164794+0.94757088821j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(0.783079719516+0.415570322398j)*x[2]**o + ((-0.0404255475961+0.240680282269j))*x[2]
            ref[(0, 0, 2, 1)]+=(0.783079719516+0.415570322398j)*x_ref[2]**o + ((-0.0404255475961+0.240680282269j))*x_ref[2]
            arg[(0, 0, 2, 2)]+=(-0.335492124214+0.818910490443j)*x[2]**o + ((-0.867366278365+0.910352696448j))*x[2]
            ref[(0, 0, 2, 2)]+=(-0.335492124214+0.818910490443j)*x_ref[2]**o + ((-0.867366278365+0.910352696448j))*x_ref[2]
            arg[(0, 0, 2, 3)]+=(-0.622080804361+0.823698849245j)*x[2]**o + ((0.579671094623+0.749564864467j))*x[2]
            ref[(0, 0, 2, 3)]+=(-0.622080804361+0.823698849245j)*x_ref[2]**o + ((0.579671094623+0.749564864467j))*x_ref[2]
            arg[(0, 0, 3, 0)]+=(0.745970499764+0.20846849888j)*x[2]**o + ((-0.530747138161+0.160153807173j))*x[2]
            ref[(0, 0, 3, 0)]+=(0.745970499764+0.20846849888j)*x_ref[2]**o + ((-0.530747138161+0.160153807173j))*x_ref[2]
            arg[(0, 0, 3, 1)]+=(-0.571342156793+0.14131210386j)*x[2]**o + ((0.313110736555+0.808921492506j))*x[2]
            ref[(0, 0, 3, 1)]+=(-0.571342156793+0.14131210386j)*x_ref[2]**o + ((0.313110736555+0.808921492506j))*x_ref[2]
            arg[(0, 0, 3, 2)]+=(-0.35778370423+0.474910411324j)*x[2]**o + ((-0.140196692-0.187047033476j))*x[2]
            ref[(0, 0, 3, 2)]+=(-0.35778370423+0.474910411324j)*x_ref[2]**o + ((-0.140196692-0.187047033476j))*x_ref[2]
            arg[(0, 0, 3, 3)]+=(0.693326255738+0.0488446364394j)*x[2]**o + ((0.776885306101-0.64222475787j))*x[2]
            ref[(0, 0, 3, 3)]+=(0.693326255738+0.0488446364394j)*x_ref[2]**o + ((0.776885306101-0.64222475787j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.70670032231-0.948331384749j)*x[2]**o + ((0.877724782697-0.303338465907j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.70670032231-0.948331384749j)*x_ref[2]**o + ((0.877724782697-0.303338465907j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.152704693759-0.96842813102j)*x[2]**o + ((-0.181552073998-0.366174342949j))*x[2]
            ref[(0, 1, 0, 1)]+=(-0.152704693759-0.96842813102j)*x_ref[2]**o + ((-0.181552073998-0.366174342949j))*x_ref[2]
            arg[(0, 1, 0, 2)]+=(0.543130383352+0.1611151062j)*x[2]**o + ((-0.923320612113+0.029907361054j))*x[2]
            ref[(0, 1, 0, 2)]+=(0.543130383352+0.1611151062j)*x_ref[2]**o + ((-0.923320612113+0.029907361054j))*x_ref[2]
            arg[(0, 1, 0, 3)]+=(-0.242946131086-0.125456154558j)*x[2]**o + ((0.959724833386-0.667102979508j))*x[2]
            ref[(0, 1, 0, 3)]+=(-0.242946131086-0.125456154558j)*x_ref[2]**o + ((0.959724833386-0.667102979508j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.563552097817-0.684530918068j)*x[2]**o + ((-0.600691871885-0.359843096874j))*x[2]
            ref[(0, 1, 1, 0)]+=(0.563552097817-0.684530918068j)*x_ref[2]**o + ((-0.600691871885-0.359843096874j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.534634167718-0.562561649214j)*x[2]**o + ((-0.696616426859+0.916455046347j))*x[2]
            ref[(0, 1, 1, 1)]+=(0.534634167718-0.562561649214j)*x_ref[2]**o + ((-0.696616426859+0.916455046347j))*x_ref[2]
            arg[(0, 1, 1, 2)]+=(0.7550400784-0.955701313714j)*x[2]**o + ((0.606174780402+0.161463361313j))*x[2]
            ref[(0, 1, 1, 2)]+=(0.7550400784-0.955701313714j)*x_ref[2]**o + ((0.606174780402+0.161463361313j))*x_ref[2]
            arg[(0, 1, 1, 3)]+=(0.37226388924-0.267018494567j)*x[2]**o + ((0.543069576285+0.0804184825545j))*x[2]
            ref[(0, 1, 1, 3)]+=(0.37226388924-0.267018494567j)*x_ref[2]**o + ((0.543069576285+0.0804184825545j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(-0.900335875297+0.676459537641j)*x[2]**o + ((0.137001629582+0.320860112816j))*x[2]
            ref[(0, 1, 2, 0)]+=(-0.900335875297+0.676459537641j)*x_ref[2]**o + ((0.137001629582+0.320860112816j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(-0.492483226569+0.964586395246j)*x[2]**o + ((-0.24891293673-0.141128095064j))*x[2]
            ref[(0, 1, 2, 1)]+=(-0.492483226569+0.964586395246j)*x_ref[2]**o + ((-0.24891293673-0.141128095064j))*x_ref[2]
            arg[(0, 1, 2, 2)]+=(0.0389950477796+0.231687624682j)*x[2]**o + ((-0.754145772368-0.190511267292j))*x[2]
            ref[(0, 1, 2, 2)]+=(0.0389950477796+0.231687624682j)*x_ref[2]**o + ((-0.754145772368-0.190511267292j))*x_ref[2]
            arg[(0, 1, 2, 3)]+=(-0.426348337398+0.0899625563015j)*x[2]**o + ((0.487760532807-0.191298383958j))*x[2]
            ref[(0, 1, 2, 3)]+=(-0.426348337398+0.0899625563015j)*x_ref[2]**o + ((0.487760532807-0.191298383958j))*x_ref[2]
            arg[(0, 1, 3, 0)]+=(0.466315165713+0.753010439375j)*x[2]**o + ((0.329514774556-0.999862344458j))*x[2]
            ref[(0, 1, 3, 0)]+=(0.466315165713+0.753010439375j)*x_ref[2]**o + ((0.329514774556-0.999862344458j))*x_ref[2]
            arg[(0, 1, 3, 1)]+=(-0.240792094446+0.411767085587j)*x[2]**o + ((-0.399826961091-0.867525729178j))*x[2]
            ref[(0, 1, 3, 1)]+=(-0.240792094446+0.411767085587j)*x_ref[2]**o + ((-0.399826961091-0.867525729178j))*x_ref[2]
            arg[(0, 1, 3, 2)]+=(0.105700831736+0.101276150622j)*x[2]**o + ((0.0173893258973-0.267680572738j))*x[2]
            ref[(0, 1, 3, 2)]+=(0.105700831736+0.101276150622j)*x_ref[2]**o + ((0.0173893258973-0.267680572738j))*x_ref[2]
            arg[(0, 1, 3, 3)]+=(-0.5630793524-0.711594982804j)*x[2]**o + ((0.587450250702+0.158682343548j))*x[2]
            ref[(0, 1, 3, 3)]+=(-0.5630793524-0.711594982804j)*x_ref[2]**o + ((0.587450250702+0.158682343548j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(-0.612761789232-0.788644196727j)*x[2]**o + ((0.369540228558-0.848513710144j))*x[2]
            ref[(0, 2, 0, 0)]+=(-0.612761789232-0.788644196727j)*x_ref[2]**o + ((0.369540228558-0.848513710144j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(-0.299105965527-0.0689444684273j)*x[2]**o + ((0.168481888747+0.0305384832488j))*x[2]
            ref[(0, 2, 0, 1)]+=(-0.299105965527-0.0689444684273j)*x_ref[2]**o + ((0.168481888747+0.0305384832488j))*x_ref[2]
            arg[(0, 2, 0, 2)]+=(-0.693327496649-0.44980187481j)*x[2]**o + ((0.21731841569+0.739617243644j))*x[2]
            ref[(0, 2, 0, 2)]+=(-0.693327496649-0.44980187481j)*x_ref[2]**o + ((0.21731841569+0.739617243644j))*x_ref[2]
            arg[(0, 2, 0, 3)]+=(0.941312185077-0.511064423998j)*x[2]**o + ((0.837050399179+0.0656198694417j))*x[2]
            ref[(0, 2, 0, 3)]+=(0.941312185077-0.511064423998j)*x_ref[2]**o + ((0.837050399179+0.0656198694417j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.375003912628-0.0141053534396j)*x[2]**o + ((-0.200241466587+0.953962466461j))*x[2]
            ref[(0, 2, 1, 0)]+=(-0.375003912628-0.0141053534396j)*x_ref[2]**o + ((-0.200241466587+0.953962466461j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(-0.687245375897-0.933599554511j)*x[2]**o + ((-0.579937602942+0.674055110209j))*x[2]
            ref[(0, 2, 1, 1)]+=(-0.687245375897-0.933599554511j)*x_ref[2]**o + ((-0.579937602942+0.674055110209j))*x_ref[2]
            arg[(0, 2, 1, 2)]+=(-0.0172889599973-0.0948161729956j)*x[2]**o + ((-0.371044340074+0.954726684155j))*x[2]
            ref[(0, 2, 1, 2)]+=(-0.0172889599973-0.0948161729956j)*x_ref[2]**o + ((-0.371044340074+0.954726684155j))*x_ref[2]
            arg[(0, 2, 1, 3)]+=(0.340089312421+0.575660495285j)*x[2]**o + ((-0.393812853138+0.958075984474j))*x[2]
            ref[(0, 2, 1, 3)]+=(0.340089312421+0.575660495285j)*x_ref[2]**o + ((-0.393812853138+0.958075984474j))*x_ref[2]
            arg[(0, 2, 2, 0)]+=(0.210211341619-0.496551471017j)*x[2]**o + ((-0.00221072016005-0.550604615867j))*x[2]
            ref[(0, 2, 2, 0)]+=(0.210211341619-0.496551471017j)*x_ref[2]**o + ((-0.00221072016005-0.550604615867j))*x_ref[2]
            arg[(0, 2, 2, 1)]+=(-0.140016282543-0.399463306311j)*x[2]**o + ((-0.793910921102-0.0513151747185j))*x[2]
            ref[(0, 2, 2, 1)]+=(-0.140016282543-0.399463306311j)*x_ref[2]**o + ((-0.793910921102-0.0513151747185j))*x_ref[2]
            arg[(0, 2, 2, 2)]+=(-0.030384977086+0.583108387714j)*x[2]**o + ((0.372136681172-0.0662561754681j))*x[2]
            ref[(0, 2, 2, 2)]+=(-0.030384977086+0.583108387714j)*x_ref[2]**o + ((0.372136681172-0.0662561754681j))*x_ref[2]
            arg[(0, 2, 2, 3)]+=(-0.599774803259-0.582655560947j)*x[2]**o + ((-0.934221688088+0.215765179588j))*x[2]
            ref[(0, 2, 2, 3)]+=(-0.599774803259-0.582655560947j)*x_ref[2]**o + ((-0.934221688088+0.215765179588j))*x_ref[2]
            arg[(0, 2, 3, 0)]+=(0.820217333612+0.371934019405j)*x[2]**o + ((0.394309721332+0.231149307291j))*x[2]
            ref[(0, 2, 3, 0)]+=(0.820217333612+0.371934019405j)*x_ref[2]**o + ((0.394309721332+0.231149307291j))*x_ref[2]
            arg[(0, 2, 3, 1)]+=(0.566750244072-0.207832395297j)*x[2]**o + ((-0.31365514862+0.748961914541j))*x[2]
            ref[(0, 2, 3, 1)]+=(0.566750244072-0.207832395297j)*x_ref[2]**o + ((-0.31365514862+0.748961914541j))*x_ref[2]
            arg[(0, 2, 3, 2)]+=(-0.366442923253+0.667618084515j)*x[2]**o + ((0.698877912692+0.6142432405j))*x[2]
            ref[(0, 2, 3, 2)]+=(-0.366442923253+0.667618084515j)*x_ref[2]**o + ((0.698877912692+0.6142432405j))*x_ref[2]
            arg[(0, 2, 3, 3)]+=(-0.973710968339-0.691669586389j)*x[2]**o + ((0.17012742301-0.951467230002j))*x[2]
            ref[(0, 2, 3, 3)]+=(-0.973710968339-0.691669586389j)*x_ref[2]**o + ((0.17012742301-0.951467230002j))*x_ref[2]
            arg[(0, 3, 0, 0)]+=(-0.474379507458-0.903467218486j)*x[2]**o + ((-0.775267681143-0.327839649963j))*x[2]
            ref[(0, 3, 0, 0)]+=(-0.474379507458-0.903467218486j)*x_ref[2]**o + ((-0.775267681143-0.327839649963j))*x_ref[2]
            arg[(0, 3, 0, 1)]+=(-0.545053227203-0.0855280889349j)*x[2]**o + ((-0.979162554122+0.843564329968j))*x[2]
            ref[(0, 3, 0, 1)]+=(-0.545053227203-0.0855280889349j)*x_ref[2]**o + ((-0.979162554122+0.843564329968j))*x_ref[2]
            arg[(0, 3, 0, 2)]+=(-0.899253448493-0.478819600619j)*x[2]**o + ((0.535652297511+0.438333366341j))*x[2]
            ref[(0, 3, 0, 2)]+=(-0.899253448493-0.478819600619j)*x_ref[2]**o + ((0.535652297511+0.438333366341j))*x_ref[2]
            arg[(0, 3, 0, 3)]+=(-0.360198595618+0.997108969243j)*x[2]**o + ((-0.613807216987+0.126369465893j))*x[2]
            ref[(0, 3, 0, 3)]+=(-0.360198595618+0.997108969243j)*x_ref[2]**o + ((-0.613807216987+0.126369465893j))*x_ref[2]
            arg[(0, 3, 1, 0)]+=(-0.277705837615+0.292700609965j)*x[2]**o + ((0.757434837109-0.513039935054j))*x[2]
            ref[(0, 3, 1, 0)]+=(-0.277705837615+0.292700609965j)*x_ref[2]**o + ((0.757434837109-0.513039935054j))*x_ref[2]
            arg[(0, 3, 1, 1)]+=(-0.332552818921-0.631081639464j)*x[2]**o + ((0.382661533645-0.399023227609j))*x[2]
            ref[(0, 3, 1, 1)]+=(-0.332552818921-0.631081639464j)*x_ref[2]**o + ((0.382661533645-0.399023227609j))*x_ref[2]
            arg[(0, 3, 1, 2)]+=(0.0989563162791+0.726362298558j)*x[2]**o + ((-0.21954590364-0.924928324954j))*x[2]
            ref[(0, 3, 1, 2)]+=(0.0989563162791+0.726362298558j)*x_ref[2]**o + ((-0.21954590364-0.924928324954j))*x_ref[2]
            arg[(0, 3, 1, 3)]+=(-0.7440412167+0.39897420055j)*x[2]**o + ((0.0268886645848+0.183779947025j))*x[2]
            ref[(0, 3, 1, 3)]+=(-0.7440412167+0.39897420055j)*x_ref[2]**o + ((0.0268886645848+0.183779947025j))*x_ref[2]
            arg[(0, 3, 2, 0)]+=(0.449635777398+0.0262840101164j)*x[2]**o + ((-0.792080798565+0.859792250779j))*x[2]
            ref[(0, 3, 2, 0)]+=(0.449635777398+0.0262840101164j)*x_ref[2]**o + ((-0.792080798565+0.859792250779j))*x_ref[2]
            arg[(0, 3, 2, 1)]+=(-0.625590577905+0.974491291476j)*x[2]**o + ((-0.4594934844-0.78287894506j))*x[2]
            ref[(0, 3, 2, 1)]+=(-0.625590577905+0.974491291476j)*x_ref[2]**o + ((-0.4594934844-0.78287894506j))*x_ref[2]
            arg[(0, 3, 2, 2)]+=(0.284469933719-0.658354517073j)*x[2]**o + ((-0.192590317257-0.252351757997j))*x[2]
            ref[(0, 3, 2, 2)]+=(0.284469933719-0.658354517073j)*x_ref[2]**o + ((-0.192590317257-0.252351757997j))*x_ref[2]
            arg[(0, 3, 2, 3)]+=(0.499707176159-0.268174883102j)*x[2]**o + ((0.286014442698-0.410216411178j))*x[2]
            ref[(0, 3, 2, 3)]+=(0.499707176159-0.268174883102j)*x_ref[2]**o + ((0.286014442698-0.410216411178j))*x_ref[2]
            arg[(0, 3, 3, 0)]+=(-0.246215516084-0.796185158921j)*x[2]**o + ((-0.0102722271493+0.282263311184j))*x[2]
            ref[(0, 3, 3, 0)]+=(-0.246215516084-0.796185158921j)*x_ref[2]**o + ((-0.0102722271493+0.282263311184j))*x_ref[2]
            arg[(0, 3, 3, 1)]+=(0.906071711618-0.557999106251j)*x[2]**o + ((-0.295681844046-0.567294097096j))*x[2]
            ref[(0, 3, 3, 1)]+=(0.906071711618-0.557999106251j)*x_ref[2]**o + ((-0.295681844046-0.567294097096j))*x_ref[2]
            arg[(0, 3, 3, 2)]+=(-0.418388590434-0.667694127681j)*x[2]**o + ((0.415336782178-0.529672425175j))*x[2]
            ref[(0, 3, 3, 2)]+=(-0.418388590434-0.667694127681j)*x_ref[2]**o + ((0.415336782178-0.529672425175j))*x_ref[2]
            arg[(0, 3, 3, 3)]+=(0.648117835332+0.143705896554j)*x[2]**o + ((0.739003485759+0.0380719468561j))*x[2]
            ref[(0, 3, 3, 3)]+=(0.648117835332+0.143705896554j)*x_ref[2]**o + ((0.739003485759+0.0380719468561j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.396923171586+0.931318854413j)*x[2]**o + ((0.212995269627-0.128026915633j))*x[2]
            ref[(1, 0, 0, 0)]+=(0.396923171586+0.931318854413j)*x_ref[2]**o + ((0.212995269627-0.128026915633j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.230833464889-0.632322182233j)*x[2]**o + ((0.391646705989+0.690382530487j))*x[2]
            ref[(1, 0, 0, 1)]+=(0.230833464889-0.632322182233j)*x_ref[2]**o + ((0.391646705989+0.690382530487j))*x_ref[2]
            arg[(1, 0, 0, 2)]+=(0.745602166936+0.404056793435j)*x[2]**o + ((0.796405341183+0.0815540765431j))*x[2]
            ref[(1, 0, 0, 2)]+=(0.745602166936+0.404056793435j)*x_ref[2]**o + ((0.796405341183+0.0815540765431j))*x_ref[2]
            arg[(1, 0, 0, 3)]+=(-0.0186378892446+0.807371878535j)*x[2]**o + ((0.796062363034+0.937879502834j))*x[2]
            ref[(1, 0, 0, 3)]+=(-0.0186378892446+0.807371878535j)*x_ref[2]**o + ((0.796062363034+0.937879502834j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.258096403264+0.37933802164j)*x[2]**o + ((0.949048599874-0.645442939743j))*x[2]
            ref[(1, 0, 1, 0)]+=(-0.258096403264+0.37933802164j)*x_ref[2]**o + ((0.949048599874-0.645442939743j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.398191586283+0.942960617702j)*x[2]**o + ((0.416474630997-0.375128363797j))*x[2]
            ref[(1, 0, 1, 1)]+=(-0.398191586283+0.942960617702j)*x_ref[2]**o + ((0.416474630997-0.375128363797j))*x_ref[2]
            arg[(1, 0, 1, 2)]+=(0.303248033412+0.356121798225j)*x[2]**o + ((0.615856274913-0.388659988706j))*x[2]
            ref[(1, 0, 1, 2)]+=(0.303248033412+0.356121798225j)*x_ref[2]**o + ((0.615856274913-0.388659988706j))*x_ref[2]
            arg[(1, 0, 1, 3)]+=(0.80722431515+0.89882559877j)*x[2]**o + ((-0.634303394969+0.612874904951j))*x[2]
            ref[(1, 0, 1, 3)]+=(0.80722431515+0.89882559877j)*x_ref[2]**o + ((-0.634303394969+0.612874904951j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(0.141163670226+0.349591616807j)*x[2]**o + ((0.094242885637+0.657962391434j))*x[2]
            ref[(1, 0, 2, 0)]+=(0.141163670226+0.349591616807j)*x_ref[2]**o + ((0.094242885637+0.657962391434j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(-0.66911584786-0.555405117466j)*x[2]**o + ((0.41607024416+0.342161366107j))*x[2]
            ref[(1, 0, 2, 1)]+=(-0.66911584786-0.555405117466j)*x_ref[2]**o + ((0.41607024416+0.342161366107j))*x_ref[2]
            arg[(1, 0, 2, 2)]+=(-0.0706743808969-0.017439691698j)*x[2]**o + ((-0.0404733159771+0.330577110491j))*x[2]
            ref[(1, 0, 2, 2)]+=(-0.0706743808969-0.017439691698j)*x_ref[2]**o + ((-0.0404733159771+0.330577110491j))*x_ref[2]
            arg[(1, 0, 2, 3)]+=(-0.73263926033+0.274459854677j)*x[2]**o + ((0.420418253625-0.0792729375905j))*x[2]
            ref[(1, 0, 2, 3)]+=(-0.73263926033+0.274459854677j)*x_ref[2]**o + ((0.420418253625-0.0792729375905j))*x_ref[2]
            arg[(1, 0, 3, 0)]+=(0.10169837399+0.840173460865j)*x[2]**o + ((0.436889662306-0.164011652433j))*x[2]
            ref[(1, 0, 3, 0)]+=(0.10169837399+0.840173460865j)*x_ref[2]**o + ((0.436889662306-0.164011652433j))*x_ref[2]
            arg[(1, 0, 3, 1)]+=(0.211564982573+0.633944860146j)*x[2]**o + ((-0.0154222977707+0.0549787628778j))*x[2]
            ref[(1, 0, 3, 1)]+=(0.211564982573+0.633944860146j)*x_ref[2]**o + ((-0.0154222977707+0.0549787628778j))*x_ref[2]
            arg[(1, 0, 3, 2)]+=(-0.454749274219-0.687423870606j)*x[2]**o + ((-0.309873090836+0.639398514208j))*x[2]
            ref[(1, 0, 3, 2)]+=(-0.454749274219-0.687423870606j)*x_ref[2]**o + ((-0.309873090836+0.639398514208j))*x_ref[2]
            arg[(1, 0, 3, 3)]+=(-0.367900619864-0.342684738403j)*x[2]**o + ((0.112447687576+0.23605461126j))*x[2]
            ref[(1, 0, 3, 3)]+=(-0.367900619864-0.342684738403j)*x_ref[2]**o + ((0.112447687576+0.23605461126j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.707135043471-0.846871282101j)*x[2]**o + ((0.814014823938-0.381907356378j))*x[2]
            ref[(1, 1, 0, 0)]+=(-0.707135043471-0.846871282101j)*x_ref[2]**o + ((0.814014823938-0.381907356378j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.413457182819-0.289881433146j)*x[2]**o + ((-0.367070009709+0.356723187292j))*x[2]
            ref[(1, 1, 0, 1)]+=(0.413457182819-0.289881433146j)*x_ref[2]**o + ((-0.367070009709+0.356723187292j))*x_ref[2]
            arg[(1, 1, 0, 2)]+=(-0.303177118978-0.538738085611j)*x[2]**o + ((0.45976031883-0.770263636971j))*x[2]
            ref[(1, 1, 0, 2)]+=(-0.303177118978-0.538738085611j)*x_ref[2]**o + ((0.45976031883-0.770263636971j))*x_ref[2]
            arg[(1, 1, 0, 3)]+=(-0.855091843433+0.035438936259j)*x[2]**o + ((0.076438450786+0.147245324726j))*x[2]
            ref[(1, 1, 0, 3)]+=(-0.855091843433+0.035438936259j)*x_ref[2]**o + ((0.076438450786+0.147245324726j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(-0.857297594484+0.221442912731j)*x[2]**o + ((0.993518040892-0.632473641659j))*x[2]
            ref[(1, 1, 1, 0)]+=(-0.857297594484+0.221442912731j)*x_ref[2]**o + ((0.993518040892-0.632473641659j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.24830139588-0.0582664871941j)*x[2]**o + ((-0.204961301323+0.533644740697j))*x[2]
            ref[(1, 1, 1, 1)]+=(0.24830139588-0.0582664871941j)*x_ref[2]**o + ((-0.204961301323+0.533644740697j))*x_ref[2]
            arg[(1, 1, 1, 2)]+=(-0.484564909021+0.581268497742j)*x[2]**o + ((0.346177267622+0.698302917038j))*x[2]
            ref[(1, 1, 1, 2)]+=(-0.484564909021+0.581268497742j)*x_ref[2]**o + ((0.346177267622+0.698302917038j))*x_ref[2]
            arg[(1, 1, 1, 3)]+=(-0.722508079092+0.628674263602j)*x[2]**o + ((-0.207961662445-0.456634094595j))*x[2]
            ref[(1, 1, 1, 3)]+=(-0.722508079092+0.628674263602j)*x_ref[2]**o + ((-0.207961662445-0.456634094595j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(-0.22356213296-0.423244114842j)*x[2]**o + ((0.123952357791+0.331784699477j))*x[2]
            ref[(1, 1, 2, 0)]+=(-0.22356213296-0.423244114842j)*x_ref[2]**o + ((0.123952357791+0.331784699477j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(-0.357450552543-0.713584650812j)*x[2]**o + ((-0.53062237025-0.432089119256j))*x[2]
            ref[(1, 1, 2, 1)]+=(-0.357450552543-0.713584650812j)*x_ref[2]**o + ((-0.53062237025-0.432089119256j))*x_ref[2]
            arg[(1, 1, 2, 2)]+=(-0.629622091487-0.279533082683j)*x[2]**o + ((0.398303166609-0.577178842454j))*x[2]
            ref[(1, 1, 2, 2)]+=(-0.629622091487-0.279533082683j)*x_ref[2]**o + ((0.398303166609-0.577178842454j))*x_ref[2]
            arg[(1, 1, 2, 3)]+=(0.261875201997-0.506414706563j)*x[2]**o + ((-0.786060549995+0.0430412411984j))*x[2]
            ref[(1, 1, 2, 3)]+=(0.261875201997-0.506414706563j)*x_ref[2]**o + ((-0.786060549995+0.0430412411984j))*x_ref[2]
            arg[(1, 1, 3, 0)]+=(-0.43230565104+0.410159497348j)*x[2]**o + ((-0.296419228168+0.519099725583j))*x[2]
            ref[(1, 1, 3, 0)]+=(-0.43230565104+0.410159497348j)*x_ref[2]**o + ((-0.296419228168+0.519099725583j))*x_ref[2]
            arg[(1, 1, 3, 1)]+=(-0.888825318624+0.191606011706j)*x[2]**o + ((-0.968163099804+0.665231076695j))*x[2]
            ref[(1, 1, 3, 1)]+=(-0.888825318624+0.191606011706j)*x_ref[2]**o + ((-0.968163099804+0.665231076695j))*x_ref[2]
            arg[(1, 1, 3, 2)]+=(0.523633254012+0.00740691562552j)*x[2]**o + ((0.138661854669-0.752713112972j))*x[2]
            ref[(1, 1, 3, 2)]+=(0.523633254012+0.00740691562552j)*x_ref[2]**o + ((0.138661854669-0.752713112972j))*x_ref[2]
            arg[(1, 1, 3, 3)]+=(-0.700218503492-0.0410337467685j)*x[2]**o + ((0.337122508364-0.330670188411j))*x[2]
            ref[(1, 1, 3, 3)]+=(-0.700218503492-0.0410337467685j)*x_ref[2]**o + ((0.337122508364-0.330670188411j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.713508570045-0.425933951256j)*x[2]**o + ((-0.529396639214-0.819529404106j))*x[2]
            ref[(1, 2, 0, 0)]+=(0.713508570045-0.425933951256j)*x_ref[2]**o + ((-0.529396639214-0.819529404106j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(-0.985409589169+0.717094473779j)*x[2]**o + ((0.906748898335+0.710357888818j))*x[2]
            ref[(1, 2, 0, 1)]+=(-0.985409589169+0.717094473779j)*x_ref[2]**o + ((0.906748898335+0.710357888818j))*x_ref[2]
            arg[(1, 2, 0, 2)]+=(0.74810469414+0.20148919942j)*x[2]**o + ((0.157835960536-0.425493344867j))*x[2]
            ref[(1, 2, 0, 2)]+=(0.74810469414+0.20148919942j)*x_ref[2]**o + ((0.157835960536-0.425493344867j))*x_ref[2]
            arg[(1, 2, 0, 3)]+=(-0.699986509625+0.233167551669j)*x[2]**o + ((-0.296876238735+0.711044032188j))*x[2]
            ref[(1, 2, 0, 3)]+=(-0.699986509625+0.233167551669j)*x_ref[2]**o + ((-0.296876238735+0.711044032188j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(-0.820949743456+0.322572843008j)*x[2]**o + ((0.756751365653-0.987142969168j))*x[2]
            ref[(1, 2, 1, 0)]+=(-0.820949743456+0.322572843008j)*x_ref[2]**o + ((0.756751365653-0.987142969168j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(-0.0272915624665-0.464551307569j)*x[2]**o + ((0.331032102534+0.209882240704j))*x[2]
            ref[(1, 2, 1, 1)]+=(-0.0272915624665-0.464551307569j)*x_ref[2]**o + ((0.331032102534+0.209882240704j))*x_ref[2]
            arg[(1, 2, 1, 2)]+=(-0.671938098087-0.815816689847j)*x[2]**o + ((-0.862580936777-0.0864275067905j))*x[2]
            ref[(1, 2, 1, 2)]+=(-0.671938098087-0.815816689847j)*x_ref[2]**o + ((-0.862580936777-0.0864275067905j))*x_ref[2]
            arg[(1, 2, 1, 3)]+=(-0.0120386472611-0.599817025612j)*x[2]**o + ((0.620046785385+0.392298692972j))*x[2]
            ref[(1, 2, 1, 3)]+=(-0.0120386472611-0.599817025612j)*x_ref[2]**o + ((0.620046785385+0.392298692972j))*x_ref[2]
            arg[(1, 2, 2, 0)]+=(0.455290039119-0.0879503446397j)*x[2]**o + ((-0.515328678867-0.0647419549845j))*x[2]
            ref[(1, 2, 2, 0)]+=(0.455290039119-0.0879503446397j)*x_ref[2]**o + ((-0.515328678867-0.0647419549845j))*x_ref[2]
            arg[(1, 2, 2, 1)]+=(0.737904355859+0.876394327046j)*x[2]**o + ((-0.743066582523-0.375772880147j))*x[2]
            ref[(1, 2, 2, 1)]+=(0.737904355859+0.876394327046j)*x_ref[2]**o + ((-0.743066582523-0.375772880147j))*x_ref[2]
            arg[(1, 2, 2, 2)]+=(0.263599567733+0.807084407939j)*x[2]**o + ((0.726833034337+0.195153398064j))*x[2]
            ref[(1, 2, 2, 2)]+=(0.263599567733+0.807084407939j)*x_ref[2]**o + ((0.726833034337+0.195153398064j))*x_ref[2]
            arg[(1, 2, 2, 3)]+=(0.867832915805-0.365265364346j)*x[2]**o + ((-0.351149711697+0.0692393104094j))*x[2]
            ref[(1, 2, 2, 3)]+=(0.867832915805-0.365265364346j)*x_ref[2]**o + ((-0.351149711697+0.0692393104094j))*x_ref[2]
            arg[(1, 2, 3, 0)]+=(0.757610561691+0.179824022037j)*x[2]**o + ((-0.289898726504+0.34201618055j))*x[2]
            ref[(1, 2, 3, 0)]+=(0.757610561691+0.179824022037j)*x_ref[2]**o + ((-0.289898726504+0.34201618055j))*x_ref[2]
            arg[(1, 2, 3, 1)]+=(0.577252397087+0.864619050005j)*x[2]**o + ((-0.59675074221+0.819799627277j))*x[2]
            ref[(1, 2, 3, 1)]+=(0.577252397087+0.864619050005j)*x_ref[2]**o + ((-0.59675074221+0.819799627277j))*x_ref[2]
            arg[(1, 2, 3, 2)]+=(-0.413713681468+0.662056698108j)*x[2]**o + ((0.669975012306-0.743773231953j))*x[2]
            ref[(1, 2, 3, 2)]+=(-0.413713681468+0.662056698108j)*x_ref[2]**o + ((0.669975012306-0.743773231953j))*x_ref[2]
            arg[(1, 2, 3, 3)]+=(-0.501262630622-0.449781376428j)*x[2]**o + ((0.162190417261+0.301606065001j))*x[2]
            ref[(1, 2, 3, 3)]+=(-0.501262630622-0.449781376428j)*x_ref[2]**o + ((0.162190417261+0.301606065001j))*x_ref[2]
            arg[(1, 3, 0, 0)]+=(-0.494275424956-0.355939205802j)*x[2]**o + ((-0.0129457712114-0.9753311365j))*x[2]
            ref[(1, 3, 0, 0)]+=(-0.494275424956-0.355939205802j)*x_ref[2]**o + ((-0.0129457712114-0.9753311365j))*x_ref[2]
            arg[(1, 3, 0, 1)]+=(0.88663549752-0.416153297827j)*x[2]**o + ((-0.475071191367-0.565215984439j))*x[2]
            ref[(1, 3, 0, 1)]+=(0.88663549752-0.416153297827j)*x_ref[2]**o + ((-0.475071191367-0.565215984439j))*x_ref[2]
            arg[(1, 3, 0, 2)]+=(0.921400377057-0.575435431045j)*x[2]**o + ((0.961268427625-0.58848021458j))*x[2]
            ref[(1, 3, 0, 2)]+=(0.921400377057-0.575435431045j)*x_ref[2]**o + ((0.961268427625-0.58848021458j))*x_ref[2]
            arg[(1, 3, 0, 3)]+=(-0.931125915933+0.822484987321j)*x[2]**o + ((-0.263792228743+0.929452766469j))*x[2]
            ref[(1, 3, 0, 3)]+=(-0.931125915933+0.822484987321j)*x_ref[2]**o + ((-0.263792228743+0.929452766469j))*x_ref[2]
            arg[(1, 3, 1, 0)]+=(0.580261659154+0.639057234108j)*x[2]**o + ((-0.101314480615-0.248861591689j))*x[2]
            ref[(1, 3, 1, 0)]+=(0.580261659154+0.639057234108j)*x_ref[2]**o + ((-0.101314480615-0.248861591689j))*x_ref[2]
            arg[(1, 3, 1, 1)]+=(-0.968292284816-0.558086144678j)*x[2]**o + ((0.373867665169+0.981164192531j))*x[2]
            ref[(1, 3, 1, 1)]+=(-0.968292284816-0.558086144678j)*x_ref[2]**o + ((0.373867665169+0.981164192531j))*x_ref[2]
            arg[(1, 3, 1, 2)]+=(-0.177115991168+0.182241794258j)*x[2]**o + ((-0.538564079461+0.401523394931j))*x[2]
            ref[(1, 3, 1, 2)]+=(-0.177115991168+0.182241794258j)*x_ref[2]**o + ((-0.538564079461+0.401523394931j))*x_ref[2]
            arg[(1, 3, 1, 3)]+=(0.125088831851-0.61624167228j)*x[2]**o + ((-0.193780694594-0.18694365623j))*x[2]
            ref[(1, 3, 1, 3)]+=(0.125088831851-0.61624167228j)*x_ref[2]**o + ((-0.193780694594-0.18694365623j))*x_ref[2]
            arg[(1, 3, 2, 0)]+=(-0.415220825215+0.324186626181j)*x[2]**o + ((-0.439436522111+0.299144574515j))*x[2]
            ref[(1, 3, 2, 0)]+=(-0.415220825215+0.324186626181j)*x_ref[2]**o + ((-0.439436522111+0.299144574515j))*x_ref[2]
            arg[(1, 3, 2, 1)]+=(0.489223122138-0.693795236842j)*x[2]**o + ((-0.364103413929+0.805859047788j))*x[2]
            ref[(1, 3, 2, 1)]+=(0.489223122138-0.693795236842j)*x_ref[2]**o + ((-0.364103413929+0.805859047788j))*x_ref[2]
            arg[(1, 3, 2, 2)]+=(0.0428340494579+0.271755439319j)*x[2]**o + ((0.440542998248-0.742676583903j))*x[2]
            ref[(1, 3, 2, 2)]+=(0.0428340494579+0.271755439319j)*x_ref[2]**o + ((0.440542998248-0.742676583903j))*x_ref[2]
            arg[(1, 3, 2, 3)]+=(-0.230506752775+0.415150889394j)*x[2]**o + ((0.822938131921-0.540509904496j))*x[2]
            ref[(1, 3, 2, 3)]+=(-0.230506752775+0.415150889394j)*x_ref[2]**o + ((0.822938131921-0.540509904496j))*x_ref[2]
            arg[(1, 3, 3, 0)]+=(0.702149927201-0.43018822844j)*x[2]**o + ((0.716223115676+0.899524142512j))*x[2]
            ref[(1, 3, 3, 0)]+=(0.702149927201-0.43018822844j)*x_ref[2]**o + ((0.716223115676+0.899524142512j))*x_ref[2]
            arg[(1, 3, 3, 1)]+=(0.323347425404+0.487941618767j)*x[2]**o + ((-0.966787342904-0.647814842555j))*x[2]
            ref[(1, 3, 3, 1)]+=(0.323347425404+0.487941618767j)*x_ref[2]**o + ((-0.966787342904-0.647814842555j))*x_ref[2]
            arg[(1, 3, 3, 2)]+=(-0.788972226328+0.410519748007j)*x[2]**o + ((0.712237062152+0.504905464898j))*x[2]
            ref[(1, 3, 3, 2)]+=(-0.788972226328+0.410519748007j)*x_ref[2]**o + ((0.712237062152+0.504905464898j))*x_ref[2]
            arg[(1, 3, 3, 3)]+=(0.0598790354758-0.816364519066j)*x[2]**o + ((0.382344652137-0.0111709223853j))*x[2]
            ref[(1, 3, 3, 3)]+=(0.0598790354758-0.816364519066j)*x_ref[2]**o + ((0.382344652137-0.0111709223853j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedContinuousFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.431530552897-0.247756394125j)*x[0]**o + ((-0.534101157902+0.373145818155j))*x[0] + ((-0.909195656461-0.348339558978j))*x[1]**o + ((-0.782273525876+0.494394241795j))*x[1]
        ref=(0.431530552897-0.247756394125j)*x_ref[0]**o + ((-0.534101157902+0.373145818155j))*x_ref[0] + ((-0.909195656461-0.348339558978j))*x_ref[1]**o + ((-0.782273525876+0.494394241795j))*x_ref[1]
        if dim==3:
            arg+=((-0.249773921283+0.444122217865j))*x[2]**o + ((-0.362382103021+0.841039590084j))*x[2]
            ref+=((-0.249773921283+0.444122217865j))*x_ref[2]**o + ((-0.362382103021+0.841039590084j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedContinuousFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=(-0.517927751617-0.185335920755j)*x[0]**o + ((-0.608314833263+0.21875162911j))*x[0] + ((-0.863634022914+0.42222696551j))*x[1]**o + ((0.662760424084-0.663422871707j))*x[1]
        ref[(0,)]=(-0.517927751617-0.185335920755j)*x_ref[0]**o + ((-0.608314833263+0.21875162911j))*x_ref[0] + ((-0.863634022914+0.42222696551j))*x_ref[1]**o + ((0.662760424084-0.663422871707j))*x_ref[1]
        arg[(1,)]=(0.198453405055+0.78635805039j)*x[0]**o + ((-0.331075854263+0.465516773293j))*x[0] + ((0.842914396384-0.667527122741j))*x[1]**o + ((-0.189064936111+0.0328289321179j))*x[1]
        ref[(1,)]=(0.198453405055+0.78635805039j)*x_ref[0]**o + ((-0.331075854263+0.465516773293j))*x_ref[0] + ((0.842914396384-0.667527122741j))*x_ref[1]**o + ((-0.189064936111+0.0328289321179j))*x_ref[1]
        arg[(2,)]=(-0.654800137544-0.202369060332j)*x[0]**o + ((0.284844880848+0.755879275393j))*x[0] + ((0.967584589219+0.280385034541j))*x[1]**o + ((0.628722567854+0.0226368426535j))*x[1]
        ref[(2,)]=(-0.654800137544-0.202369060332j)*x_ref[0]**o + ((0.284844880848+0.755879275393j))*x_ref[0] + ((0.967584589219+0.280385034541j))*x_ref[1]**o + ((0.628722567854+0.0226368426535j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.114902197277+0.227307579227j)*x[2]**o + ((0.590436812317-0.749230145312j))*x[2]
            ref[(0,)]+=(0.114902197277+0.227307579227j)*x_ref[2]**o + ((0.590436812317-0.749230145312j))*x_ref[2]
            arg[(1,)]+=(0.133588531462+0.126967107191j)*x[2]**o + ((0.842848739325-0.452111778805j))*x[2]
            ref[(1,)]+=(0.133588531462+0.126967107191j)*x_ref[2]**o + ((0.842848739325-0.452111778805j))*x_ref[2]
            arg[(2,)]+=(-0.434860532881+0.139815611217j)*x[2]**o + ((0.156551294353-0.073607697273j))*x[2]
            ref[(2,)]+=(-0.434860532881+0.139815611217j)*x_ref[2]**o + ((0.156551294353-0.073607697273j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedContinuousFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref = Data(0,(3, 4),w_ref)
        arg[(0, 0)]=(0.569606798465+0.258257257337j)*x[0]**o + ((0.262492686309+0.91474171139j))*x[0] + ((0.223462412718-0.918967712816j))*x[1]**o + ((-0.887840161084-0.706763206451j))*x[1]
        ref[(0, 0)]=(0.569606798465+0.258257257337j)*x_ref[0]**o + ((0.262492686309+0.91474171139j))*x_ref[0] + ((0.223462412718-0.918967712816j))*x_ref[1]**o + ((-0.887840161084-0.706763206451j))*x_ref[1]
        arg[(0, 1)]=(0.745314946718-0.358487490456j)*x[0]**o + ((0.0945377239615+0.605554721341j))*x[0] + ((-0.532465797222-0.567168560439j))*x[1]**o + ((0.21559810563+0.928715999166j))*x[1]
        ref[(0, 1)]=(0.745314946718-0.358487490456j)*x_ref[0]**o + ((0.0945377239615+0.605554721341j))*x_ref[0] + ((-0.532465797222-0.567168560439j))*x_ref[1]**o + ((0.21559810563+0.928715999166j))*x_ref[1]
        arg[(0, 2)]=(0.326195542295+0.710256942815j)*x[0]**o + ((0.709324584296+0.482199924179j))*x[0] + ((0.821051740843+0.479919196698j))*x[1]**o + ((-0.417566682371+0.381214442686j))*x[1]
        ref[(0, 2)]=(0.326195542295+0.710256942815j)*x_ref[0]**o + ((0.709324584296+0.482199924179j))*x_ref[0] + ((0.821051740843+0.479919196698j))*x_ref[1]**o + ((-0.417566682371+0.381214442686j))*x_ref[1]
        arg[(0, 3)]=(-0.766441357387+0.392548266517j)*x[0]**o + ((-0.319797606124-0.797423943051j))*x[0] + ((0.758210400916+0.355289191465j))*x[1]**o + ((0.941884629893-0.975838497262j))*x[1]
        ref[(0, 3)]=(-0.766441357387+0.392548266517j)*x_ref[0]**o + ((-0.319797606124-0.797423943051j))*x_ref[0] + ((0.758210400916+0.355289191465j))*x_ref[1]**o + ((0.941884629893-0.975838497262j))*x_ref[1]
        arg[(1, 0)]=(-0.700372164369+0.527247931153j)*x[0]**o + ((-0.404711921737+0.611397740344j))*x[0] + ((-0.569006079545+0.845494219753j))*x[1]**o + ((0.221814165843+0.270970418229j))*x[1]
        ref[(1, 0)]=(-0.700372164369+0.527247931153j)*x_ref[0]**o + ((-0.404711921737+0.611397740344j))*x_ref[0] + ((-0.569006079545+0.845494219753j))*x_ref[1]**o + ((0.221814165843+0.270970418229j))*x_ref[1]
        arg[(1, 1)]=(0.80191751019+0.592085103829j)*x[0]**o + ((0.164666043347-0.623710268063j))*x[0] + ((0.221520167764-0.258825442739j))*x[1]**o + ((0.295896469229+0.875135653086j))*x[1]
        ref[(1, 1)]=(0.80191751019+0.592085103829j)*x_ref[0]**o + ((0.164666043347-0.623710268063j))*x_ref[0] + ((0.221520167764-0.258825442739j))*x_ref[1]**o + ((0.295896469229+0.875135653086j))*x_ref[1]
        arg[(1, 2)]=(0.736976384445+0.343293305002j)*x[0]**o + ((-0.126929304244-0.146315806994j))*x[0] + ((-0.0959615560456+0.880414618043j))*x[1]**o + ((-0.0953868087036-0.0839809474312j))*x[1]
        ref[(1, 2)]=(0.736976384445+0.343293305002j)*x_ref[0]**o + ((-0.126929304244-0.146315806994j))*x_ref[0] + ((-0.0959615560456+0.880414618043j))*x_ref[1]**o + ((-0.0953868087036-0.0839809474312j))*x_ref[1]
        arg[(1, 3)]=(0.741002828484-0.913442116854j)*x[0]**o + ((0.8713417346+0.127079631643j))*x[0] + ((0.529204414347+0.00757866123654j))*x[1]**o + ((-0.222290243091-0.0279891807522j))*x[1]
        ref[(1, 3)]=(0.741002828484-0.913442116854j)*x_ref[0]**o + ((0.8713417346+0.127079631643j))*x_ref[0] + ((0.529204414347+0.00757866123654j))*x_ref[1]**o + ((-0.222290243091-0.0279891807522j))*x_ref[1]
        arg[(2, 0)]=(-0.295426950352+0.0523086708384j)*x[0]**o + ((-0.195043033016+0.390596347636j))*x[0] + ((-0.013671146553-0.331923771229j))*x[1]**o + ((-0.976435616501-0.82356086288j))*x[1]
        ref[(2, 0)]=(-0.295426950352+0.0523086708384j)*x_ref[0]**o + ((-0.195043033016+0.390596347636j))*x_ref[0] + ((-0.013671146553-0.331923771229j))*x_ref[1]**o + ((-0.976435616501-0.82356086288j))*x_ref[1]
        arg[(2, 1)]=(0.721450589623+0.642326813366j)*x[0]**o + ((0.31604440266-0.839545087158j))*x[0] + ((0.0972543033558+0.365420821108j))*x[1]**o + ((-0.227731023784-0.387887385929j))*x[1]
        ref[(2, 1)]=(0.721450589623+0.642326813366j)*x_ref[0]**o + ((0.31604440266-0.839545087158j))*x_ref[0] + ((0.0972543033558+0.365420821108j))*x_ref[1]**o + ((-0.227731023784-0.387887385929j))*x_ref[1]
        arg[(2, 2)]=(-0.522262271988+0.869501184396j)*x[0]**o + ((-0.430262532676+0.135836062071j))*x[0] + ((-0.462012815967+0.163369749895j))*x[1]**o + ((0.592588482063+0.765748060217j))*x[1]
        ref[(2, 2)]=(-0.522262271988+0.869501184396j)*x_ref[0]**o + ((-0.430262532676+0.135836062071j))*x_ref[0] + ((-0.462012815967+0.163369749895j))*x_ref[1]**o + ((0.592588482063+0.765748060217j))*x_ref[1]
        arg[(2, 3)]=(-0.348037135421+0.424085032656j)*x[0]**o + ((-0.648328313297-0.44087389154j))*x[0] + ((-0.692845412738-0.937863778187j))*x[1]**o + ((0.021677048679-0.899117660282j))*x[1]
        ref[(2, 3)]=(-0.348037135421+0.424085032656j)*x_ref[0]**o + ((-0.648328313297-0.44087389154j))*x_ref[0] + ((-0.692845412738-0.937863778187j))*x_ref[1]**o + ((0.021677048679-0.899117660282j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(-0.076729794653+0.74156839426j)*x[2]**o + ((0.840641575414+0.122078767997j))*x[2]
            ref[(0, 0)]+=(-0.076729794653+0.74156839426j)*x_ref[2]**o + ((0.840641575414+0.122078767997j))*x_ref[2]
            arg[(0, 1)]+=(0.689721834887-0.255365664494j)*x[2]**o + ((-0.0735629721123-0.643651434233j))*x[2]
            ref[(0, 1)]+=(0.689721834887-0.255365664494j)*x_ref[2]**o + ((-0.0735629721123-0.643651434233j))*x_ref[2]
            arg[(0, 2)]+=(-0.503027357603-0.216321260363j)*x[2]**o + ((-0.4988865606-0.69488539962j))*x[2]
            ref[(0, 2)]+=(-0.503027357603-0.216321260363j)*x_ref[2]**o + ((-0.4988865606-0.69488539962j))*x_ref[2]
            arg[(0, 3)]+=(-0.419180237644-0.119779309087j)*x[2]**o + ((0.684414841175-0.837043310218j))*x[2]
            ref[(0, 3)]+=(-0.419180237644-0.119779309087j)*x_ref[2]**o + ((0.684414841175-0.837043310218j))*x_ref[2]
            arg[(1, 0)]+=(0.981948483487+0.413010347024j)*x[2]**o + ((-0.562023471122+0.56647096029j))*x[2]
            ref[(1, 0)]+=(0.981948483487+0.413010347024j)*x_ref[2]**o + ((-0.562023471122+0.56647096029j))*x_ref[2]
            arg[(1, 1)]+=(-0.0232803567908-0.103955038585j)*x[2]**o + ((-0.395748819715+0.961999467951j))*x[2]
            ref[(1, 1)]+=(-0.0232803567908-0.103955038585j)*x_ref[2]**o + ((-0.395748819715+0.961999467951j))*x_ref[2]
            arg[(1, 2)]+=(-0.00347287462776+0.00749785352454j)*x[2]**o + ((0.129887765857+0.0172269943391j))*x[2]
            ref[(1, 2)]+=(-0.00347287462776+0.00749785352454j)*x_ref[2]**o + ((0.129887765857+0.0172269943391j))*x_ref[2]
            arg[(1, 3)]+=(0.985959278078-0.0113275811921j)*x[2]**o + ((0.299320281377+0.598847501802j))*x[2]
            ref[(1, 3)]+=(0.985959278078-0.0113275811921j)*x_ref[2]**o + ((0.299320281377+0.598847501802j))*x_ref[2]
            arg[(2, 0)]+=(0.91619255961-0.130890468115j)*x[2]**o + ((0.927388394125-0.807659731061j))*x[2]
            ref[(2, 0)]+=(0.91619255961-0.130890468115j)*x_ref[2]**o + ((0.927388394125-0.807659731061j))*x_ref[2]
            arg[(2, 1)]+=(-0.425012191097-0.340465054884j)*x[2]**o + ((-0.316262753135+0.53620927297j))*x[2]
            ref[(2, 1)]+=(-0.425012191097-0.340465054884j)*x_ref[2]**o + ((-0.316262753135+0.53620927297j))*x_ref[2]
            arg[(2, 2)]+=(-0.576474651132+0.992102256688j)*x[2]**o + ((0.776023543377+0.382767229615j))*x[2]
            ref[(2, 2)]+=(-0.576474651132+0.992102256688j)*x_ref[2]**o + ((0.776023543377+0.382767229615j))*x_ref[2]
            arg[(2, 3)]+=(-0.998808433519-0.315980983576j)*x[2]**o + ((0.291302056215+0.780530632911j))*x[2]
            ref[(2, 3)]+=(-0.998808433519-0.315980983576j)*x_ref[2]**o + ((0.291302056215+0.780530632911j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedContinuousFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 2),w)
        ref = Data(0,(3, 3, 2),w_ref)
        arg[(0, 0, 0)]=(-0.725824254027+0.0223481366607j)*x[0]**o + ((0.187283044099+0.396946763571j))*x[0] + ((-0.282603015406-0.545326442199j))*x[1]**o + ((-0.324795916892-0.341307471436j))*x[1]
        ref[(0, 0, 0)]=(-0.725824254027+0.0223481366607j)*x_ref[0]**o + ((0.187283044099+0.396946763571j))*x_ref[0] + ((-0.282603015406-0.545326442199j))*x_ref[1]**o + ((-0.324795916892-0.341307471436j))*x_ref[1]
        arg[(0, 0, 1)]=(0.601443103712-0.355791877135j)*x[0]**o + ((0.325171507069-0.0914702219585j))*x[0] + ((0.00189287954367-0.54973698791j))*x[1]**o + ((0.623674764018-0.487865243759j))*x[1]
        ref[(0, 0, 1)]=(0.601443103712-0.355791877135j)*x_ref[0]**o + ((0.325171507069-0.0914702219585j))*x_ref[0] + ((0.00189287954367-0.54973698791j))*x_ref[1]**o + ((0.623674764018-0.487865243759j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.073461465887-0.348047581553j)*x[0]**o + ((-0.489766490302-0.0617978186191j))*x[0] + ((-0.812456427618-0.185457673759j))*x[1]**o + ((0.827881029805-0.107406206923j))*x[1]
        ref[(0, 1, 0)]=(-0.073461465887-0.348047581553j)*x_ref[0]**o + ((-0.489766490302-0.0617978186191j))*x_ref[0] + ((-0.812456427618-0.185457673759j))*x_ref[1]**o + ((0.827881029805-0.107406206923j))*x_ref[1]
        arg[(0, 1, 1)]=(0.598124787201-0.0213727220615j)*x[0]**o + ((0.979586437731-0.689181604125j))*x[0] + ((-0.721286824961+0.0481494323956j))*x[1]**o + ((0.827608472032+0.696423517471j))*x[1]
        ref[(0, 1, 1)]=(0.598124787201-0.0213727220615j)*x_ref[0]**o + ((0.979586437731-0.689181604125j))*x_ref[0] + ((-0.721286824961+0.0481494323956j))*x_ref[1]**o + ((0.827608472032+0.696423517471j))*x_ref[1]
        arg[(0, 2, 0)]=(0.573436591573+0.915425400909j)*x[0]**o + ((0.847567338752-0.236044371676j))*x[0] + ((0.318365464481+0.315554994667j))*x[1]**o + ((-0.407010886321-0.208455624011j))*x[1]
        ref[(0, 2, 0)]=(0.573436591573+0.915425400909j)*x_ref[0]**o + ((0.847567338752-0.236044371676j))*x_ref[0] + ((0.318365464481+0.315554994667j))*x_ref[1]**o + ((-0.407010886321-0.208455624011j))*x_ref[1]
        arg[(0, 2, 1)]=(-0.253711003393-0.676081243297j)*x[0]**o + ((-0.920007498732+0.844545743582j))*x[0] + ((0.84660323487-0.803480636285j))*x[1]**o + ((0.296985908471-0.902534420402j))*x[1]
        ref[(0, 2, 1)]=(-0.253711003393-0.676081243297j)*x_ref[0]**o + ((-0.920007498732+0.844545743582j))*x_ref[0] + ((0.84660323487-0.803480636285j))*x_ref[1]**o + ((0.296985908471-0.902534420402j))*x_ref[1]
        arg[(1, 0, 0)]=(0.742214449063-0.727823427612j)*x[0]**o + ((0.0970624924868+0.485143661269j))*x[0] + ((-0.330231073158+0.896101130959j))*x[1]**o + ((-0.0518050844515-0.00534234029551j))*x[1]
        ref[(1, 0, 0)]=(0.742214449063-0.727823427612j)*x_ref[0]**o + ((0.0970624924868+0.485143661269j))*x_ref[0] + ((-0.330231073158+0.896101130959j))*x_ref[1]**o + ((-0.0518050844515-0.00534234029551j))*x_ref[1]
        arg[(1, 0, 1)]=(0.449212161492+0.112437706244j)*x[0]**o + ((0.466716671114+0.256262581804j))*x[0] + ((-0.757263221316+0.183370516057j))*x[1]**o + ((0.685041228018-0.45801604248j))*x[1]
        ref[(1, 0, 1)]=(0.449212161492+0.112437706244j)*x_ref[0]**o + ((0.466716671114+0.256262581804j))*x_ref[0] + ((-0.757263221316+0.183370516057j))*x_ref[1]**o + ((0.685041228018-0.45801604248j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.116535798376+0.437065505443j)*x[0]**o + ((-0.765526797202+0.398669158939j))*x[0] + ((0.969746114596+0.585550451454j))*x[1]**o + ((0.344823622285+0.370797233974j))*x[1]
        ref[(1, 1, 0)]=(-0.116535798376+0.437065505443j)*x_ref[0]**o + ((-0.765526797202+0.398669158939j))*x_ref[0] + ((0.969746114596+0.585550451454j))*x_ref[1]**o + ((0.344823622285+0.370797233974j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.38029262361+0.55398876671j)*x[0]**o + ((-0.89179531406-0.959214043234j))*x[0] + ((0.950252845583-0.978305636455j))*x[1]**o + ((0.904688744835+0.106237944497j))*x[1]
        ref[(1, 1, 1)]=(-0.38029262361+0.55398876671j)*x_ref[0]**o + ((-0.89179531406-0.959214043234j))*x_ref[0] + ((0.950252845583-0.978305636455j))*x_ref[1]**o + ((0.904688744835+0.106237944497j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.206658019121+0.10689676923j)*x[0]**o + ((-0.654824321076+0.745034453887j))*x[0] + ((-0.671472948802+0.695589772139j))*x[1]**o + ((-0.298457895731-0.611839013929j))*x[1]
        ref[(1, 2, 0)]=(-0.206658019121+0.10689676923j)*x_ref[0]**o + ((-0.654824321076+0.745034453887j))*x_ref[0] + ((-0.671472948802+0.695589772139j))*x_ref[1]**o + ((-0.298457895731-0.611839013929j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.2412457278-0.963654159874j)*x[0]**o + ((0.663748159867-0.130362966711j))*x[0] + ((-0.649471009861+0.147918630919j))*x[1]**o + ((0.569438792648+0.269581323476j))*x[1]
        ref[(1, 2, 1)]=(-0.2412457278-0.963654159874j)*x_ref[0]**o + ((0.663748159867-0.130362966711j))*x_ref[0] + ((-0.649471009861+0.147918630919j))*x_ref[1]**o + ((0.569438792648+0.269581323476j))*x_ref[1]
        arg[(2, 0, 0)]=(-0.834449598415-0.867339598543j)*x[0]**o + ((0.707482281547-0.0470595808183j))*x[0] + ((-0.524425291801+0.038906551501j))*x[1]**o + ((-0.052232044959-0.318209590337j))*x[1]
        ref[(2, 0, 0)]=(-0.834449598415-0.867339598543j)*x_ref[0]**o + ((0.707482281547-0.0470595808183j))*x_ref[0] + ((-0.524425291801+0.038906551501j))*x_ref[1]**o + ((-0.052232044959-0.318209590337j))*x_ref[1]
        arg[(2, 0, 1)]=(0.55157052585+0.434322470082j)*x[0]**o + ((-0.823467668651+0.483570763474j))*x[0] + ((0.362895536974+0.0172261772476j))*x[1]**o + ((-0.86290604339+0.756496980943j))*x[1]
        ref[(2, 0, 1)]=(0.55157052585+0.434322470082j)*x_ref[0]**o + ((-0.823467668651+0.483570763474j))*x_ref[0] + ((0.362895536974+0.0172261772476j))*x_ref[1]**o + ((-0.86290604339+0.756496980943j))*x_ref[1]
        arg[(2, 1, 0)]=(0.243689150972+0.531077794281j)*x[0]**o + ((-0.734268850751+0.0704598286456j))*x[0] + ((0.394117065498-0.620854822993j))*x[1]**o + ((-0.657665835409+0.843241070364j))*x[1]
        ref[(2, 1, 0)]=(0.243689150972+0.531077794281j)*x_ref[0]**o + ((-0.734268850751+0.0704598286456j))*x_ref[0] + ((0.394117065498-0.620854822993j))*x_ref[1]**o + ((-0.657665835409+0.843241070364j))*x_ref[1]
        arg[(2, 1, 1)]=(-0.62374920892-0.385418186842j)*x[0]**o + ((-0.0819494304163+0.505542069754j))*x[0] + ((0.245213403785+0.627070980431j))*x[1]**o + ((0.225557221746+0.0103810204303j))*x[1]
        ref[(2, 1, 1)]=(-0.62374920892-0.385418186842j)*x_ref[0]**o + ((-0.0819494304163+0.505542069754j))*x_ref[0] + ((0.245213403785+0.627070980431j))*x_ref[1]**o + ((0.225557221746+0.0103810204303j))*x_ref[1]
        arg[(2, 2, 0)]=(0.451845450928-0.0400764626011j)*x[0]**o + ((0.967244259091+0.455803123253j))*x[0] + ((0.990350319929+0.224372573614j))*x[1]**o + ((-0.288034715752-0.104062724994j))*x[1]
        ref[(2, 2, 0)]=(0.451845450928-0.0400764626011j)*x_ref[0]**o + ((0.967244259091+0.455803123253j))*x_ref[0] + ((0.990350319929+0.224372573614j))*x_ref[1]**o + ((-0.288034715752-0.104062724994j))*x_ref[1]
        arg[(2, 2, 1)]=(-0.87904107313-0.484603970468j)*x[0]**o + ((0.681553352284-0.234916068063j))*x[0] + ((0.616106327535+0.696980247699j))*x[1]**o + ((0.657107416409+0.149143954253j))*x[1]
        ref[(2, 2, 1)]=(-0.87904107313-0.484603970468j)*x_ref[0]**o + ((0.681553352284-0.234916068063j))*x_ref[0] + ((0.616106327535+0.696980247699j))*x_ref[1]**o + ((0.657107416409+0.149143954253j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.422405583781-0.663197812272j)*x[2]**o + ((0.065593859641+0.916015903778j))*x[2]
            ref[(0, 0, 0)]+=(0.422405583781-0.663197812272j)*x_ref[2]**o + ((0.065593859641+0.916015903778j))*x_ref[2]
            arg[(0, 0, 1)]+=(-0.64146724611+0.993466786885j)*x[2]**o + ((-0.834848467377-0.434896681493j))*x[2]
            ref[(0, 0, 1)]+=(-0.64146724611+0.993466786885j)*x_ref[2]**o + ((-0.834848467377-0.434896681493j))*x_ref[2]
            arg[(0, 1, 0)]+=(0.691314144675+0.0769054148557j)*x[2]**o + ((0.192225247773+0.0563950291752j))*x[2]
            ref[(0, 1, 0)]+=(0.691314144675+0.0769054148557j)*x_ref[2]**o + ((0.192225247773+0.0563950291752j))*x_ref[2]
            arg[(0, 1, 1)]+=(-0.157893396232-0.234934571707j)*x[2]**o + ((-0.497057313122-0.0186347653985j))*x[2]
            ref[(0, 1, 1)]+=(-0.157893396232-0.234934571707j)*x_ref[2]**o + ((-0.497057313122-0.0186347653985j))*x_ref[2]
            arg[(0, 2, 0)]+=(-0.619983514096+0.717859203759j)*x[2]**o + ((0.106939678597+0.934559666534j))*x[2]
            ref[(0, 2, 0)]+=(-0.619983514096+0.717859203759j)*x_ref[2]**o + ((0.106939678597+0.934559666534j))*x_ref[2]
            arg[(0, 2, 1)]+=(0.342379866067+0.804715076603j)*x[2]**o + ((-0.51396525371+0.0208193209238j))*x[2]
            ref[(0, 2, 1)]+=(0.342379866067+0.804715076603j)*x_ref[2]**o + ((-0.51396525371+0.0208193209238j))*x_ref[2]
            arg[(1, 0, 0)]+=(0.206156014432+0.48078792289j)*x[2]**o + ((0.268032471099-0.770128723168j))*x[2]
            ref[(1, 0, 0)]+=(0.206156014432+0.48078792289j)*x_ref[2]**o + ((0.268032471099-0.770128723168j))*x_ref[2]
            arg[(1, 0, 1)]+=(0.734339320403+0.786990370635j)*x[2]**o + ((-0.549477978467-0.536210028186j))*x[2]
            ref[(1, 0, 1)]+=(0.734339320403+0.786990370635j)*x_ref[2]**o + ((-0.549477978467-0.536210028186j))*x_ref[2]
            arg[(1, 1, 0)]+=(-0.915248804054-0.931475014481j)*x[2]**o + ((-0.221181837398+0.648474472678j))*x[2]
            ref[(1, 1, 0)]+=(-0.915248804054-0.931475014481j)*x_ref[2]**o + ((-0.221181837398+0.648474472678j))*x_ref[2]
            arg[(1, 1, 1)]+=(0.405925438521-0.472010844139j)*x[2]**o + ((-0.346548675077-0.178580498143j))*x[2]
            ref[(1, 1, 1)]+=(0.405925438521-0.472010844139j)*x_ref[2]**o + ((-0.346548675077-0.178580498143j))*x_ref[2]
            arg[(1, 2, 0)]+=(-0.974914238512-0.45389777825j)*x[2]**o + ((-0.293817935615+0.455133347536j))*x[2]
            ref[(1, 2, 0)]+=(-0.974914238512-0.45389777825j)*x_ref[2]**o + ((-0.293817935615+0.455133347536j))*x_ref[2]
            arg[(1, 2, 1)]+=(-0.0591572406743-0.749783723956j)*x[2]**o + ((-0.0248729455042+0.986927963758j))*x[2]
            ref[(1, 2, 1)]+=(-0.0591572406743-0.749783723956j)*x_ref[2]**o + ((-0.0248729455042+0.986927963758j))*x_ref[2]
            arg[(2, 0, 0)]+=(-0.358048755473+0.220672492304j)*x[2]**o + ((0.419011643763+0.359482501952j))*x[2]
            ref[(2, 0, 0)]+=(-0.358048755473+0.220672492304j)*x_ref[2]**o + ((0.419011643763+0.359482501952j))*x_ref[2]
            arg[(2, 0, 1)]+=(0.778049436652-0.528538720688j)*x[2]**o + ((0.136583176122+0.204812404214j))*x[2]
            ref[(2, 0, 1)]+=(0.778049436652-0.528538720688j)*x_ref[2]**o + ((0.136583176122+0.204812404214j))*x_ref[2]
            arg[(2, 1, 0)]+=(-0.715962549618-0.678467989085j)*x[2]**o + ((0.597761793924-0.966177929606j))*x[2]
            ref[(2, 1, 0)]+=(-0.715962549618-0.678467989085j)*x_ref[2]**o + ((0.597761793924-0.966177929606j))*x_ref[2]
            arg[(2, 1, 1)]+=(-0.136075867311-0.780445503946j)*x[2]**o + ((-0.619946405758+0.653538054116j))*x[2]
            ref[(2, 1, 1)]+=(-0.136075867311-0.780445503946j)*x_ref[2]**o + ((-0.619946405758+0.653538054116j))*x_ref[2]
            arg[(2, 2, 0)]+=(-0.0269137586336-0.837205615862j)*x[2]**o + ((-0.490207553116+0.869319875355j))*x[2]
            ref[(2, 2, 0)]+=(-0.0269137586336-0.837205615862j)*x_ref[2]**o + ((-0.490207553116+0.869319875355j))*x_ref[2]
            arg[(2, 2, 1)]+=(-0.721894062132+0.726805088109j)*x[2]**o + ((-0.557530746422+0.283158819515j))*x[2]
            ref[(2, 2, 1)]+=(-0.721894062132+0.726805088109j)*x_ref[2]**o + ((-0.557530746422+0.283158819515j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedContinuousFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 2, 4),w)
        ref = Data(0,(2, 2, 2, 4),w_ref)
        arg[(0, 0, 0, 0)]=(-0.114725515543+0.928122466098j)*x[0]**o + ((-0.0568736747077+0.618409137241j))*x[0] + ((-0.157299057084-0.292815638866j))*x[1]**o + ((-0.405683048482-0.985407166985j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.114725515543+0.928122466098j)*x_ref[0]**o + ((-0.0568736747077+0.618409137241j))*x_ref[0] + ((-0.157299057084-0.292815638866j))*x_ref[1]**o + ((-0.405683048482-0.985407166985j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.348051041881+0.437034784668j)*x[0]**o + ((-0.269906157335+0.792980856208j))*x[0] + ((0.743883621669-0.0449076968555j))*x[1]**o + ((-0.599727003581+0.91650827878j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.348051041881+0.437034784668j)*x_ref[0]**o + ((-0.269906157335+0.792980856208j))*x_ref[0] + ((0.743883621669-0.0449076968555j))*x_ref[1]**o + ((-0.599727003581+0.91650827878j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(-0.280798609743-0.822300441169j)*x[0]**o + ((-0.934900109098-0.477644697501j))*x[0] + ((-0.990868198334+0.518678702286j))*x[1]**o + ((0.482764453356-0.457737593544j))*x[1]
        ref[(0, 0, 0, 2)]=(-0.280798609743-0.822300441169j)*x_ref[0]**o + ((-0.934900109098-0.477644697501j))*x_ref[0] + ((-0.990868198334+0.518678702286j))*x_ref[1]**o + ((0.482764453356-0.457737593544j))*x_ref[1]
        arg[(0, 0, 0, 3)]=(-0.427500704357+0.247718064805j)*x[0]**o + ((0.322127255481+0.653930182469j))*x[0] + ((0.283107891345+0.455928758311j))*x[1]**o + ((-0.845310627563+0.8747017466j))*x[1]
        ref[(0, 0, 0, 3)]=(-0.427500704357+0.247718064805j)*x_ref[0]**o + ((0.322127255481+0.653930182469j))*x_ref[0] + ((0.283107891345+0.455928758311j))*x_ref[1]**o + ((-0.845310627563+0.8747017466j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.982269698617+0.88144275506j)*x[0]**o + ((-0.81291794952-0.95920707061j))*x[0] + ((0.732927715955+0.537700949767j))*x[1]**o + ((0.0745147167368-0.23723377643j))*x[1]
        ref[(0, 0, 1, 0)]=(0.982269698617+0.88144275506j)*x_ref[0]**o + ((-0.81291794952-0.95920707061j))*x_ref[0] + ((0.732927715955+0.537700949767j))*x_ref[1]**o + ((0.0745147167368-0.23723377643j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.083626617293-0.294514358604j)*x[0]**o + ((-0.558880675279-0.813013310362j))*x[0] + ((-0.512476389747+0.987028790483j))*x[1]**o + ((-0.559340197846+0.683181546976j))*x[1]
        ref[(0, 0, 1, 1)]=(0.083626617293-0.294514358604j)*x_ref[0]**o + ((-0.558880675279-0.813013310362j))*x_ref[0] + ((-0.512476389747+0.987028790483j))*x_ref[1]**o + ((-0.559340197846+0.683181546976j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(0.85062126996-0.237878029766j)*x[0]**o + ((-0.46034403678+0.175592609934j))*x[0] + ((0.249448923161+0.312227200654j))*x[1]**o + ((-0.705802032501+0.793353090463j))*x[1]
        ref[(0, 0, 1, 2)]=(0.85062126996-0.237878029766j)*x_ref[0]**o + ((-0.46034403678+0.175592609934j))*x_ref[0] + ((0.249448923161+0.312227200654j))*x_ref[1]**o + ((-0.705802032501+0.793353090463j))*x_ref[1]
        arg[(0, 0, 1, 3)]=(-0.72654035193-0.865037261658j)*x[0]**o + ((-0.204149213712+0.647119746357j))*x[0] + ((0.647199934405+0.160624333329j))*x[1]**o + ((0.803337341941+0.945944256063j))*x[1]
        ref[(0, 0, 1, 3)]=(-0.72654035193-0.865037261658j)*x_ref[0]**o + ((-0.204149213712+0.647119746357j))*x_ref[0] + ((0.647199934405+0.160624333329j))*x_ref[1]**o + ((0.803337341941+0.945944256063j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.849768691207+0.998648138578j)*x[0]**o + ((0.205942453459-0.811800830999j))*x[0] + ((0.289807590158-0.657589055184j))*x[1]**o + ((-0.141163678277+0.114525538845j))*x[1]
        ref[(0, 1, 0, 0)]=(0.849768691207+0.998648138578j)*x_ref[0]**o + ((0.205942453459-0.811800830999j))*x_ref[0] + ((0.289807590158-0.657589055184j))*x_ref[1]**o + ((-0.141163678277+0.114525538845j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.611358694164-0.62380380588j)*x[0]**o + ((-0.12781548157-0.527542244913j))*x[0] + ((-0.9548543037+0.957372369971j))*x[1]**o + ((0.435698126664-0.648202717065j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.611358694164-0.62380380588j)*x_ref[0]**o + ((-0.12781548157-0.527542244913j))*x_ref[0] + ((-0.9548543037+0.957372369971j))*x_ref[1]**o + ((0.435698126664-0.648202717065j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(-0.557095890041+0.98302562902j)*x[0]**o + ((0.175762541109+0.523519512369j))*x[0] + ((-0.311725247128-0.991978022364j))*x[1]**o + ((0.579977005598-0.941006778573j))*x[1]
        ref[(0, 1, 0, 2)]=(-0.557095890041+0.98302562902j)*x_ref[0]**o + ((0.175762541109+0.523519512369j))*x_ref[0] + ((-0.311725247128-0.991978022364j))*x_ref[1]**o + ((0.579977005598-0.941006778573j))*x_ref[1]
        arg[(0, 1, 0, 3)]=(0.464256417997+0.693321207869j)*x[0]**o + ((0.0546901427661+0.088078477109j))*x[0] + ((0.736611098154+0.018184191512j))*x[1]**o + ((-0.0602558020606-0.337439687811j))*x[1]
        ref[(0, 1, 0, 3)]=(0.464256417997+0.693321207869j)*x_ref[0]**o + ((0.0546901427661+0.088078477109j))*x_ref[0] + ((0.736611098154+0.018184191512j))*x_ref[1]**o + ((-0.0602558020606-0.337439687811j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.4458958615-0.559961789472j)*x[0]**o + ((0.247726897371-0.605745823616j))*x[0] + ((-0.210738234897-0.513081687385j))*x[1]**o + ((-0.670353324234+0.465273661129j))*x[1]
        ref[(0, 1, 1, 0)]=(0.4458958615-0.559961789472j)*x_ref[0]**o + ((0.247726897371-0.605745823616j))*x_ref[0] + ((-0.210738234897-0.513081687385j))*x_ref[1]**o + ((-0.670353324234+0.465273661129j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.643687065142+0.613888654604j)*x[0]**o + ((0.294655769541-0.0205677927554j))*x[0] + ((-0.662340508634-0.215887568415j))*x[1]**o + ((0.195595472693-0.0481179514715j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.643687065142+0.613888654604j)*x_ref[0]**o + ((0.294655769541-0.0205677927554j))*x_ref[0] + ((-0.662340508634-0.215887568415j))*x_ref[1]**o + ((0.195595472693-0.0481179514715j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(0.261123934089-0.227801449834j)*x[0]**o + ((-0.907615723371+0.280130659331j))*x[0] + ((-0.902848136925+0.667535480711j))*x[1]**o + ((-0.662561540458-0.552775627091j))*x[1]
        ref[(0, 1, 1, 2)]=(0.261123934089-0.227801449834j)*x_ref[0]**o + ((-0.907615723371+0.280130659331j))*x_ref[0] + ((-0.902848136925+0.667535480711j))*x_ref[1]**o + ((-0.662561540458-0.552775627091j))*x_ref[1]
        arg[(0, 1, 1, 3)]=(-0.504566363978+0.218933803438j)*x[0]**o + ((-0.12684423889-0.349665211572j))*x[0] + ((0.405358181793-0.0664951587793j))*x[1]**o + ((-0.80819824647+0.645893941436j))*x[1]
        ref[(0, 1, 1, 3)]=(-0.504566363978+0.218933803438j)*x_ref[0]**o + ((-0.12684423889-0.349665211572j))*x_ref[0] + ((0.405358181793-0.0664951587793j))*x_ref[1]**o + ((-0.80819824647+0.645893941436j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.893667297892+0.455590276909j)*x[0]**o + ((0.19230275022+0.761964976555j))*x[0] + ((-0.837092901394+0.697824335494j))*x[1]**o + ((0.937147375341-0.140934158247j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.893667297892+0.455590276909j)*x_ref[0]**o + ((0.19230275022+0.761964976555j))*x_ref[0] + ((-0.837092901394+0.697824335494j))*x_ref[1]**o + ((0.937147375341-0.140934158247j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.0960138770837-0.225250384226j)*x[0]**o + ((0.384993354646-0.257557329975j))*x[0] + ((-0.590048520234-0.806385148105j))*x[1]**o + ((-0.928827521559+0.0222324556425j))*x[1]
        ref[(1, 0, 0, 1)]=(0.0960138770837-0.225250384226j)*x_ref[0]**o + ((0.384993354646-0.257557329975j))*x_ref[0] + ((-0.590048520234-0.806385148105j))*x_ref[1]**o + ((-0.928827521559+0.0222324556425j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(-0.976738989978+0.276541347369j)*x[0]**o + ((-0.521741843074-0.253049509527j))*x[0] + ((0.879468802178+0.878289913901j))*x[1]**o + ((-0.406423021678+0.376304871325j))*x[1]
        ref[(1, 0, 0, 2)]=(-0.976738989978+0.276541347369j)*x_ref[0]**o + ((-0.521741843074-0.253049509527j))*x_ref[0] + ((0.879468802178+0.878289913901j))*x_ref[1]**o + ((-0.406423021678+0.376304871325j))*x_ref[1]
        arg[(1, 0, 0, 3)]=(-0.650385630764-0.78092453253j)*x[0]**o + ((0.690623969793-0.291955754451j))*x[0] + ((-0.648765155955-0.235994997761j))*x[1]**o + ((0.804956359618+0.50481170975j))*x[1]
        ref[(1, 0, 0, 3)]=(-0.650385630764-0.78092453253j)*x_ref[0]**o + ((0.690623969793-0.291955754451j))*x_ref[0] + ((-0.648765155955-0.235994997761j))*x_ref[1]**o + ((0.804956359618+0.50481170975j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(0.900209191324+0.504902383036j)*x[0]**o + ((-0.592392476932+0.478514466518j))*x[0] + ((0.612669351889+0.464112534905j))*x[1]**o + ((0.595684562034+0.0095672658207j))*x[1]
        ref[(1, 0, 1, 0)]=(0.900209191324+0.504902383036j)*x_ref[0]**o + ((-0.592392476932+0.478514466518j))*x_ref[0] + ((0.612669351889+0.464112534905j))*x_ref[1]**o + ((0.595684562034+0.0095672658207j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.148662495525+0.10543353726j)*x[0]**o + ((0.850421776006-0.66554577768j))*x[0] + ((-0.656179930687+0.0848865881548j))*x[1]**o + ((-0.0417865447546-0.339269332567j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.148662495525+0.10543353726j)*x_ref[0]**o + ((0.850421776006-0.66554577768j))*x_ref[0] + ((-0.656179930687+0.0848865881548j))*x_ref[1]**o + ((-0.0417865447546-0.339269332567j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(-0.935721645685+0.538918691125j)*x[0]**o + ((0.702068901709+0.157646550996j))*x[0] + ((0.807083413159+0.576245644849j))*x[1]**o + ((0.408116260296+0.882758147188j))*x[1]
        ref[(1, 0, 1, 2)]=(-0.935721645685+0.538918691125j)*x_ref[0]**o + ((0.702068901709+0.157646550996j))*x_ref[0] + ((0.807083413159+0.576245644849j))*x_ref[1]**o + ((0.408116260296+0.882758147188j))*x_ref[1]
        arg[(1, 0, 1, 3)]=(0.0247617811861+0.769769794816j)*x[0]**o + ((0.749452360553+0.103388150195j))*x[0] + ((-0.629368515783-0.44408270839j))*x[1]**o + ((-0.383698888814-0.791585488714j))*x[1]
        ref[(1, 0, 1, 3)]=(0.0247617811861+0.769769794816j)*x_ref[0]**o + ((0.749452360553+0.103388150195j))*x_ref[0] + ((-0.629368515783-0.44408270839j))*x_ref[1]**o + ((-0.383698888814-0.791585488714j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.328504662377-0.329082049827j)*x[0]**o + ((0.749661712857-0.98270198311j))*x[0] + ((-0.345130351813-0.648504848612j))*x[1]**o + ((0.923677331547+0.709828851071j))*x[1]
        ref[(1, 1, 0, 0)]=(0.328504662377-0.329082049827j)*x_ref[0]**o + ((0.749661712857-0.98270198311j))*x_ref[0] + ((-0.345130351813-0.648504848612j))*x_ref[1]**o + ((0.923677331547+0.709828851071j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.350429422568-0.0422890337551j)*x[0]**o + ((-0.806207522995+0.630910934012j))*x[0] + ((-0.234622680712-0.387139815272j))*x[1]**o + ((-0.0979446795384+0.363275822104j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.350429422568-0.0422890337551j)*x_ref[0]**o + ((-0.806207522995+0.630910934012j))*x_ref[0] + ((-0.234622680712-0.387139815272j))*x_ref[1]**o + ((-0.0979446795384+0.363275822104j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(-0.532594774985-0.378773096997j)*x[0]**o + ((0.526010200015+0.966603579601j))*x[0] + ((0.325565850236-0.855720431288j))*x[1]**o + ((0.772262739423-0.577183225356j))*x[1]
        ref[(1, 1, 0, 2)]=(-0.532594774985-0.378773096997j)*x_ref[0]**o + ((0.526010200015+0.966603579601j))*x_ref[0] + ((0.325565850236-0.855720431288j))*x_ref[1]**o + ((0.772262739423-0.577183225356j))*x_ref[1]
        arg[(1, 1, 0, 3)]=(-0.558611820889+0.60865755408j)*x[0]**o + ((-0.0531600211264-0.189404265514j))*x[0] + ((0.555856397677+0.399075214194j))*x[1]**o + ((0.0280764538481+0.934367808921j))*x[1]
        ref[(1, 1, 0, 3)]=(-0.558611820889+0.60865755408j)*x_ref[0]**o + ((-0.0531600211264-0.189404265514j))*x_ref[0] + ((0.555856397677+0.399075214194j))*x_ref[1]**o + ((0.0280764538481+0.934367808921j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.78224697495-0.293700280307j)*x[0]**o + ((0.71062427569+0.0501722058516j))*x[0] + ((0.513089743661-0.634313965103j))*x[1]**o + ((-0.586569331114-0.581144799824j))*x[1]
        ref[(1, 1, 1, 0)]=(0.78224697495-0.293700280307j)*x_ref[0]**o + ((0.71062427569+0.0501722058516j))*x_ref[0] + ((0.513089743661-0.634313965103j))*x_ref[1]**o + ((-0.586569331114-0.581144799824j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.146823527438+0.466324826052j)*x[0]**o + ((-0.881963814875+0.911462663906j))*x[0] + ((-0.171180255714+0.0106477153952j))*x[1]**o + ((0.796603319008+0.435529470664j))*x[1]
        ref[(1, 1, 1, 1)]=(0.146823527438+0.466324826052j)*x_ref[0]**o + ((-0.881963814875+0.911462663906j))*x_ref[0] + ((-0.171180255714+0.0106477153952j))*x_ref[1]**o + ((0.796603319008+0.435529470664j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(0.546697623046+0.158164370118j)*x[0]**o + ((0.572544941584-0.180394193342j))*x[0] + ((-0.683271428721+0.0543250209686j))*x[1]**o + ((0.191526076855+0.93906532561j))*x[1]
        ref[(1, 1, 1, 2)]=(0.546697623046+0.158164370118j)*x_ref[0]**o + ((0.572544941584-0.180394193342j))*x_ref[0] + ((-0.683271428721+0.0543250209686j))*x_ref[1]**o + ((0.191526076855+0.93906532561j))*x_ref[1]
        arg[(1, 1, 1, 3)]=(0.63754608567-0.654790255743j)*x[0]**o + ((-0.397887819991+0.610445259088j))*x[0] + ((-0.379343748637-0.267536871561j))*x[1]**o + ((0.908539916416+0.341139545041j))*x[1]
        ref[(1, 1, 1, 3)]=(0.63754608567-0.654790255743j)*x_ref[0]**o + ((-0.397887819991+0.610445259088j))*x_ref[0] + ((-0.379343748637-0.267536871561j))*x_ref[1]**o + ((0.908539916416+0.341139545041j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.784659932736-0.437667974379j)*x[2]**o + ((-0.918600893369+0.389518840837j))*x[2]
            ref[(0, 0, 0, 0)]+=(0.784659932736-0.437667974379j)*x_ref[2]**o + ((-0.918600893369+0.389518840837j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.269159906986+0.849011910974j)*x[2]**o + ((0.031153315318-0.431388096226j))*x[2]
            ref[(0, 0, 0, 1)]+=(0.269159906986+0.849011910974j)*x_ref[2]**o + ((0.031153315318-0.431388096226j))*x_ref[2]
            arg[(0, 0, 0, 2)]+=(0.840221671772-0.0466740708329j)*x[2]**o + ((-0.444855807113+0.727223705128j))*x[2]
            ref[(0, 0, 0, 2)]+=(0.840221671772-0.0466740708329j)*x_ref[2]**o + ((-0.444855807113+0.727223705128j))*x_ref[2]
            arg[(0, 0, 0, 3)]+=(-0.108944819159+0.63341145059j)*x[2]**o + ((-0.445212402793+0.549012820825j))*x[2]
            ref[(0, 0, 0, 3)]+=(-0.108944819159+0.63341145059j)*x_ref[2]**o + ((-0.445212402793+0.549012820825j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.87953447987-0.214175186352j)*x[2]**o + ((-0.1853916633+0.338571592902j))*x[2]
            ref[(0, 0, 1, 0)]+=(0.87953447987-0.214175186352j)*x_ref[2]**o + ((-0.1853916633+0.338571592902j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.820503566288-0.976292892966j)*x[2]**o + ((0.887614736058+0.927942655731j))*x[2]
            ref[(0, 0, 1, 1)]+=(-0.820503566288-0.976292892966j)*x_ref[2]**o + ((0.887614736058+0.927942655731j))*x_ref[2]
            arg[(0, 0, 1, 2)]+=(-0.609629856356+0.513355412595j)*x[2]**o + ((0.830929915126-0.902415191335j))*x[2]
            ref[(0, 0, 1, 2)]+=(-0.609629856356+0.513355412595j)*x_ref[2]**o + ((0.830929915126-0.902415191335j))*x_ref[2]
            arg[(0, 0, 1, 3)]+=(0.109734568003-0.606166301974j)*x[2]**o + ((-0.956809675371-0.529063307817j))*x[2]
            ref[(0, 0, 1, 3)]+=(0.109734568003-0.606166301974j)*x_ref[2]**o + ((-0.956809675371-0.529063307817j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.328439431738-0.747099801767j)*x[2]**o + ((-0.515835167512-0.599920816106j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.328439431738-0.747099801767j)*x_ref[2]**o + ((-0.515835167512-0.599920816106j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.370407367606+0.381609147231j)*x[2]**o + ((-0.475504385919+0.730008666746j))*x[2]
            ref[(0, 1, 0, 1)]+=(-0.370407367606+0.381609147231j)*x_ref[2]**o + ((-0.475504385919+0.730008666746j))*x_ref[2]
            arg[(0, 1, 0, 2)]+=(-0.482494829609+0.60662618707j)*x[2]**o + ((-0.707043778364+0.176180349254j))*x[2]
            ref[(0, 1, 0, 2)]+=(-0.482494829609+0.60662618707j)*x_ref[2]**o + ((-0.707043778364+0.176180349254j))*x_ref[2]
            arg[(0, 1, 0, 3)]+=(-0.504177415854-0.798565475761j)*x[2]**o + ((-0.237500588751+0.0113648013855j))*x[2]
            ref[(0, 1, 0, 3)]+=(-0.504177415854-0.798565475761j)*x_ref[2]**o + ((-0.237500588751+0.0113648013855j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.811225655098+0.188490867833j)*x[2]**o + ((0.241780573798-0.0823758135031j))*x[2]
            ref[(0, 1, 1, 0)]+=(-0.811225655098+0.188490867833j)*x_ref[2]**o + ((0.241780573798-0.0823758135031j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.0932437121529+0.564078451211j)*x[2]**o + ((-0.742545014477-0.665742718437j))*x[2]
            ref[(0, 1, 1, 1)]+=(0.0932437121529+0.564078451211j)*x_ref[2]**o + ((-0.742545014477-0.665742718437j))*x_ref[2]
            arg[(0, 1, 1, 2)]+=(-0.656569537498-0.276502365194j)*x[2]**o + ((0.627575409658+0.976738537114j))*x[2]
            ref[(0, 1, 1, 2)]+=(-0.656569537498-0.276502365194j)*x_ref[2]**o + ((0.627575409658+0.976738537114j))*x_ref[2]
            arg[(0, 1, 1, 3)]+=(0.274598224374+0.970286285896j)*x[2]**o + ((-0.466324477282+0.129974008858j))*x[2]
            ref[(0, 1, 1, 3)]+=(0.274598224374+0.970286285896j)*x_ref[2]**o + ((-0.466324477282+0.129974008858j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.93427287526+0.999045722511j)*x[2]**o + ((-0.213104863349-0.149965463046j))*x[2]
            ref[(1, 0, 0, 0)]+=(-0.93427287526+0.999045722511j)*x_ref[2]**o + ((-0.213104863349-0.149965463046j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.312538250832-0.555694160021j)*x[2]**o + ((0.456329647174+0.935977226843j))*x[2]
            ref[(1, 0, 0, 1)]+=(0.312538250832-0.555694160021j)*x_ref[2]**o + ((0.456329647174+0.935977226843j))*x_ref[2]
            arg[(1, 0, 0, 2)]+=(0.641624154737+0.978075939377j)*x[2]**o + ((-0.813143836804+0.359020398709j))*x[2]
            ref[(1, 0, 0, 2)]+=(0.641624154737+0.978075939377j)*x_ref[2]**o + ((-0.813143836804+0.359020398709j))*x_ref[2]
            arg[(1, 0, 0, 3)]+=(0.447770580533-0.626039253492j)*x[2]**o + ((0.240326011506+0.674313008311j))*x[2]
            ref[(1, 0, 0, 3)]+=(0.447770580533-0.626039253492j)*x_ref[2]**o + ((0.240326011506+0.674313008311j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.302203536709+0.129155315603j)*x[2]**o + ((-0.901817217595-0.267640886973j))*x[2]
            ref[(1, 0, 1, 0)]+=(0.302203536709+0.129155315603j)*x_ref[2]**o + ((-0.901817217595-0.267640886973j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.38735191228+0.912379201937j)*x[2]**o + ((0.65603330033+0.219414733185j))*x[2]
            ref[(1, 0, 1, 1)]+=(0.38735191228+0.912379201937j)*x_ref[2]**o + ((0.65603330033+0.219414733185j))*x_ref[2]
            arg[(1, 0, 1, 2)]+=(0.293918749612+0.0551775188006j)*x[2]**o + ((0.620297146884-0.280178152022j))*x[2]
            ref[(1, 0, 1, 2)]+=(0.293918749612+0.0551775188006j)*x_ref[2]**o + ((0.620297146884-0.280178152022j))*x_ref[2]
            arg[(1, 0, 1, 3)]+=(0.274868652065-0.0649074868959j)*x[2]**o + ((-0.56217262583-0.323215569532j))*x[2]
            ref[(1, 0, 1, 3)]+=(0.274868652065-0.0649074868959j)*x_ref[2]**o + ((-0.56217262583-0.323215569532j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.262993838235+0.650174049004j)*x[2]**o + ((-0.704336852219+0.331669591908j))*x[2]
            ref[(1, 1, 0, 0)]+=(-0.262993838235+0.650174049004j)*x_ref[2]**o + ((-0.704336852219+0.331669591908j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.579101381252+0.509113463283j)*x[2]**o + ((-0.442821162362-0.398655666814j))*x[2]
            ref[(1, 1, 0, 1)]+=(0.579101381252+0.509113463283j)*x_ref[2]**o + ((-0.442821162362-0.398655666814j))*x_ref[2]
            arg[(1, 1, 0, 2)]+=(0.782849505144+0.468692093465j)*x[2]**o + ((-0.774856311592+0.710549501958j))*x[2]
            ref[(1, 1, 0, 2)]+=(0.782849505144+0.468692093465j)*x_ref[2]**o + ((-0.774856311592+0.710549501958j))*x_ref[2]
            arg[(1, 1, 0, 3)]+=(0.198756579849-0.476698932113j)*x[2]**o + ((0.0969044933985-0.64409053239j))*x[2]
            ref[(1, 1, 0, 3)]+=(0.198756579849-0.476698932113j)*x_ref[2]**o + ((0.0969044933985-0.64409053239j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(-0.0670365403996+0.229802917839j)*x[2]**o + ((0.40379765928-0.937477125262j))*x[2]
            ref[(1, 1, 1, 0)]+=(-0.0670365403996+0.229802917839j)*x_ref[2]**o + ((0.40379765928-0.937477125262j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.174552244159-0.394127721531j)*x[2]**o + ((-0.650845521468+0.64386021781j))*x[2]
            ref[(1, 1, 1, 1)]+=(0.174552244159-0.394127721531j)*x_ref[2]**o + ((-0.650845521468+0.64386021781j))*x_ref[2]
            arg[(1, 1, 1, 2)]+=(-0.601587584299+0.934602250544j)*x[2]**o + ((0.309816810617+0.834085324553j))*x[2]
            ref[(1, 1, 1, 2)]+=(-0.601587584299+0.934602250544j)*x_ref[2]**o + ((0.309816810617+0.834085324553j))*x_ref[2]
            arg[(1, 1, 1, 3)]+=(-0.670917903855+0.880078777014j)*x[2]**o + ((-0.651392299536+0.357219729909j))*x[2]
            ref[(1, 1, 1, 3)]+=(-0.670917903855+0.880078777014j)*x_ref[2]**o + ((-0.651392299536+0.357219729909j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedSolution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedContinuousFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.156941710275+0.0623765769126j)*x[0] + ((-0.872746311733+0.102054634418j))*x[1]
        ref=(0.156941710275+0.0623765769126j)*x_ref[0] + ((-0.872746311733+0.102054634418j))*x_ref[1]
        if dim==3:
            arg+=((-0.319054368643-0.556530756211j))*x[2]
            ref+=((-0.319054368643-0.556530756211j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedSolution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedContinuousFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=(-0.135160644208-0.597276466707j)*x[0] + ((-0.210516663406-0.541943373673j))*x[1]
        ref[(0,)]=(-0.135160644208-0.597276466707j)*x_ref[0] + ((-0.210516663406-0.541943373673j))*x_ref[1]
        arg[(1,)]=(-0.121972647485-0.456423015611j)*x[0] + ((-0.117528367393+0.339055172762j))*x[1]
        ref[(1,)]=(-0.121972647485-0.456423015611j)*x_ref[0] + ((-0.117528367393+0.339055172762j))*x_ref[1]
        arg[(2,)]=(-0.770928542836-0.559507792557j)*x[0] + ((-0.532215853173-0.645454816391j))*x[1]
        ref[(2,)]=(-0.770928542836-0.559507792557j)*x_ref[0] + ((-0.532215853173-0.645454816391j))*x_ref[1]
        arg[(3,)]=(-0.0805859436611+0.716788503257j)*x[0] + ((-0.938064739065-0.275226456388j))*x[1]
        ref[(3,)]=(-0.0805859436611+0.716788503257j)*x_ref[0] + ((-0.938064739065-0.275226456388j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.192905940903-0.169148347382j)*x[2]
            ref[(0,)]+=(-0.192905940903-0.169148347382j)*x_ref[2]
            arg[(1,)]+=(-0.577080509948-0.509239644143j)*x[2]
            ref[(1,)]+=(-0.577080509948-0.509239644143j)*x_ref[2]
            arg[(2,)]+=(-0.888105252196+0.0335361181152j)*x[2]
            ref[(2,)]+=(-0.888105252196+0.0335361181152j)*x_ref[2]
            arg[(3,)]+=(0.78172548652-0.0610272348344j)*x[2]
            ref[(3,)]+=(0.78172548652-0.0610272348344j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedSolution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedContinuousFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref = Data(0,(4, 3),w_ref)
        arg[(0, 0)]=(-0.156831246493+0.266443845097j)*x[0] + ((-0.79622233616-0.691187859468j))*x[1]
        ref[(0, 0)]=(-0.156831246493+0.266443845097j)*x_ref[0] + ((-0.79622233616-0.691187859468j))*x_ref[1]
        arg[(0, 1)]=(-0.138840169329+0.190977340813j)*x[0] + ((-0.660032123488-0.138155118963j))*x[1]
        ref[(0, 1)]=(-0.138840169329+0.190977340813j)*x_ref[0] + ((-0.660032123488-0.138155118963j))*x_ref[1]
        arg[(0, 2)]=(-0.239862016368+0.401192977333j)*x[0] + ((0.172864883772+0.244838168j))*x[1]
        ref[(0, 2)]=(-0.239862016368+0.401192977333j)*x_ref[0] + ((0.172864883772+0.244838168j))*x_ref[1]
        arg[(1, 0)]=(-0.892724492754-0.922670962913j)*x[0] + ((0.0135702278739-0.873366095129j))*x[1]
        ref[(1, 0)]=(-0.892724492754-0.922670962913j)*x_ref[0] + ((0.0135702278739-0.873366095129j))*x_ref[1]
        arg[(1, 1)]=(0.725806371604-0.53881268409j)*x[0] + ((-0.387427265648+0.00268413548185j))*x[1]
        ref[(1, 1)]=(0.725806371604-0.53881268409j)*x_ref[0] + ((-0.387427265648+0.00268413548185j))*x_ref[1]
        arg[(1, 2)]=(0.824022944891+0.309537620351j)*x[0] + ((0.993103421861-0.538002564j))*x[1]
        ref[(1, 2)]=(0.824022944891+0.309537620351j)*x_ref[0] + ((0.993103421861-0.538002564j))*x_ref[1]
        arg[(2, 0)]=(-0.155064243512-0.0105224952151j)*x[0] + ((-0.943389677588+0.214303647155j))*x[1]
        ref[(2, 0)]=(-0.155064243512-0.0105224952151j)*x_ref[0] + ((-0.943389677588+0.214303647155j))*x_ref[1]
        arg[(2, 1)]=(0.237142368723+0.760929048927j)*x[0] + ((-0.405797203333+0.953899003865j))*x[1]
        ref[(2, 1)]=(0.237142368723+0.760929048927j)*x_ref[0] + ((-0.405797203333+0.953899003865j))*x_ref[1]
        arg[(2, 2)]=(0.853027581171+0.286523481912j)*x[0] + ((-0.714908067359-0.826499084893j))*x[1]
        ref[(2, 2)]=(0.853027581171+0.286523481912j)*x_ref[0] + ((-0.714908067359-0.826499084893j))*x_ref[1]
        arg[(3, 0)]=(0.019630656766-0.807004395925j)*x[0] + ((0.46341008656-0.534975006333j))*x[1]
        ref[(3, 0)]=(0.019630656766-0.807004395925j)*x_ref[0] + ((0.46341008656-0.534975006333j))*x_ref[1]
        arg[(3, 1)]=(0.225340547204+0.95066372865j)*x[0] + ((0.821271981743+0.546036087042j))*x[1]
        ref[(3, 1)]=(0.225340547204+0.95066372865j)*x_ref[0] + ((0.821271981743+0.546036087042j))*x_ref[1]
        arg[(3, 2)]=(-0.933611250133+0.159620693646j)*x[0] + ((-0.243080566835-0.197803670906j))*x[1]
        ref[(3, 2)]=(-0.933611250133+0.159620693646j)*x_ref[0] + ((-0.243080566835-0.197803670906j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.578728913233-0.0402672252336j)*x[2]
            ref[(0, 0)]+=(0.578728913233-0.0402672252336j)*x_ref[2]
            arg[(0, 1)]+=(-0.961001576531+0.063164074471j)*x[2]
            ref[(0, 1)]+=(-0.961001576531+0.063164074471j)*x_ref[2]
            arg[(0, 2)]+=(-0.659085681635-0.87711488481j)*x[2]
            ref[(0, 2)]+=(-0.659085681635-0.87711488481j)*x_ref[2]
            arg[(1, 0)]+=(0.179164956911-0.967721697522j)*x[2]
            ref[(1, 0)]+=(0.179164956911-0.967721697522j)*x_ref[2]
            arg[(1, 1)]+=(-0.353609445617-0.113410819178j)*x[2]
            ref[(1, 1)]+=(-0.353609445617-0.113410819178j)*x_ref[2]
            arg[(1, 2)]+=(-0.95017799754+0.827154752148j)*x[2]
            ref[(1, 2)]+=(-0.95017799754+0.827154752148j)*x_ref[2]
            arg[(2, 0)]+=(-0.591665160843+0.882952349738j)*x[2]
            ref[(2, 0)]+=(-0.591665160843+0.882952349738j)*x_ref[2]
            arg[(2, 1)]+=(0.69988329917+0.447743481389j)*x[2]
            ref[(2, 1)]+=(0.69988329917+0.447743481389j)*x_ref[2]
            arg[(2, 2)]+=(-0.996786261791-0.53977952286j)*x[2]
            ref[(2, 2)]+=(-0.996786261791-0.53977952286j)*x_ref[2]
            arg[(3, 0)]+=(-0.48022138851+0.40166404225j)*x[2]
            ref[(3, 0)]+=(-0.48022138851+0.40166404225j)*x_ref[2]
            arg[(3, 1)]+=(-0.764565271571+0.597973267083j)*x[2]
            ref[(3, 1)]+=(-0.764565271571+0.597973267083j)*x_ref[2]
            arg[(3, 2)]+=(-0.0587968825489+0.919768516242j)*x[2]
            ref[(3, 2)]+=(-0.0587968825489+0.919768516242j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedSolution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedContinuousFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 4),w)
        ref = Data(0,(2, 4, 4),w_ref)
        arg[(0, 0, 0)]=(-0.816976549719+0.247733446342j)*x[0] + ((0.817908548247-0.59625092289j))*x[1]
        ref[(0, 0, 0)]=(-0.816976549719+0.247733446342j)*x_ref[0] + ((0.817908548247-0.59625092289j))*x_ref[1]
        arg[(0, 0, 1)]=(0.578020175058-0.178712320986j)*x[0] + ((-0.122432601435-0.401862086548j))*x[1]
        ref[(0, 0, 1)]=(0.578020175058-0.178712320986j)*x_ref[0] + ((-0.122432601435-0.401862086548j))*x_ref[1]
        arg[(0, 0, 2)]=(0.348503036942+0.963452618143j)*x[0] + ((-0.456004366106+0.414554011192j))*x[1]
        ref[(0, 0, 2)]=(0.348503036942+0.963452618143j)*x_ref[0] + ((-0.456004366106+0.414554011192j))*x_ref[1]
        arg[(0, 0, 3)]=(0.873640142199-0.420909331658j)*x[0] + ((0.0249608269527-0.985600246681j))*x[1]
        ref[(0, 0, 3)]=(0.873640142199-0.420909331658j)*x_ref[0] + ((0.0249608269527-0.985600246681j))*x_ref[1]
        arg[(0, 1, 0)]=(0.341344185404+0.924262674958j)*x[0] + ((-0.00736763125212-0.473137295182j))*x[1]
        ref[(0, 1, 0)]=(0.341344185404+0.924262674958j)*x_ref[0] + ((-0.00736763125212-0.473137295182j))*x_ref[1]
        arg[(0, 1, 1)]=(0.59672233787-0.515120659504j)*x[0] + ((-0.60985949898-0.966688274085j))*x[1]
        ref[(0, 1, 1)]=(0.59672233787-0.515120659504j)*x_ref[0] + ((-0.60985949898-0.966688274085j))*x_ref[1]
        arg[(0, 1, 2)]=(-0.120057552291-0.609388351056j)*x[0] + ((0.329624669972-0.803861578648j))*x[1]
        ref[(0, 1, 2)]=(-0.120057552291-0.609388351056j)*x_ref[0] + ((0.329624669972-0.803861578648j))*x_ref[1]
        arg[(0, 1, 3)]=(-0.920754234901-0.37636353785j)*x[0] + ((0.280168835764-0.676790119317j))*x[1]
        ref[(0, 1, 3)]=(-0.920754234901-0.37636353785j)*x_ref[0] + ((0.280168835764-0.676790119317j))*x_ref[1]
        arg[(0, 2, 0)]=(0.520845743759-0.577965114845j)*x[0] + ((0.103571413298-0.886178732507j))*x[1]
        ref[(0, 2, 0)]=(0.520845743759-0.577965114845j)*x_ref[0] + ((0.103571413298-0.886178732507j))*x_ref[1]
        arg[(0, 2, 1)]=(0.909422181983-0.205205401773j)*x[0] + ((-0.271736449544-0.138534425786j))*x[1]
        ref[(0, 2, 1)]=(0.909422181983-0.205205401773j)*x_ref[0] + ((-0.271736449544-0.138534425786j))*x_ref[1]
        arg[(0, 2, 2)]=(-0.587108634762-0.26420392294j)*x[0] + ((0.358762249099-0.375730425492j))*x[1]
        ref[(0, 2, 2)]=(-0.587108634762-0.26420392294j)*x_ref[0] + ((0.358762249099-0.375730425492j))*x_ref[1]
        arg[(0, 2, 3)]=(0.988950360879-0.184903716006j)*x[0] + ((-0.965395105568+0.022949488858j))*x[1]
        ref[(0, 2, 3)]=(0.988950360879-0.184903716006j)*x_ref[0] + ((-0.965395105568+0.022949488858j))*x_ref[1]
        arg[(0, 3, 0)]=(-0.260825027624+0.573078051165j)*x[0] + ((-0.613029507989-0.095754610851j))*x[1]
        ref[(0, 3, 0)]=(-0.260825027624+0.573078051165j)*x_ref[0] + ((-0.613029507989-0.095754610851j))*x_ref[1]
        arg[(0, 3, 1)]=(-0.384301529773-0.721787123529j)*x[0] + ((0.354220573768+0.290424795326j))*x[1]
        ref[(0, 3, 1)]=(-0.384301529773-0.721787123529j)*x_ref[0] + ((0.354220573768+0.290424795326j))*x_ref[1]
        arg[(0, 3, 2)]=(-0.642520711614+0.968074107311j)*x[0] + ((-0.427474932256-0.888177312712j))*x[1]
        ref[(0, 3, 2)]=(-0.642520711614+0.968074107311j)*x_ref[0] + ((-0.427474932256-0.888177312712j))*x_ref[1]
        arg[(0, 3, 3)]=(0.673922630864+0.281247043726j)*x[0] + ((-0.246070261677+0.87636795515j))*x[1]
        ref[(0, 3, 3)]=(0.673922630864+0.281247043726j)*x_ref[0] + ((-0.246070261677+0.87636795515j))*x_ref[1]
        arg[(1, 0, 0)]=(0.112063723543-0.21543065698j)*x[0] + ((-0.883247130003+0.24008628139j))*x[1]
        ref[(1, 0, 0)]=(0.112063723543-0.21543065698j)*x_ref[0] + ((-0.883247130003+0.24008628139j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.562919520762+0.635423096559j)*x[0] + ((-0.799894422763-0.409886225772j))*x[1]
        ref[(1, 0, 1)]=(-0.562919520762+0.635423096559j)*x_ref[0] + ((-0.799894422763-0.409886225772j))*x_ref[1]
        arg[(1, 0, 2)]=(-0.065555560753-0.899689861636j)*x[0] + ((0.00235457245526-0.491797499365j))*x[1]
        ref[(1, 0, 2)]=(-0.065555560753-0.899689861636j)*x_ref[0] + ((0.00235457245526-0.491797499365j))*x_ref[1]
        arg[(1, 0, 3)]=(0.007150600411+0.983468699746j)*x[0] + ((0.35793121194+0.612697501121j))*x[1]
        ref[(1, 0, 3)]=(0.007150600411+0.983468699746j)*x_ref[0] + ((0.35793121194+0.612697501121j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.500836293629+0.330521232052j)*x[0] + ((0.458343562518-0.395562575339j))*x[1]
        ref[(1, 1, 0)]=(-0.500836293629+0.330521232052j)*x_ref[0] + ((0.458343562518-0.395562575339j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.628045298045-0.275333619417j)*x[0] + ((0.903601088768+0.762739388885j))*x[1]
        ref[(1, 1, 1)]=(-0.628045298045-0.275333619417j)*x_ref[0] + ((0.903601088768+0.762739388885j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.318106980891-0.0165766899498j)*x[0] + ((0.36922912116+0.728827334005j))*x[1]
        ref[(1, 1, 2)]=(-0.318106980891-0.0165766899498j)*x_ref[0] + ((0.36922912116+0.728827334005j))*x_ref[1]
        arg[(1, 1, 3)]=(-0.367754172218+0.419092250731j)*x[0] + ((0.955900154491-0.437919706012j))*x[1]
        ref[(1, 1, 3)]=(-0.367754172218+0.419092250731j)*x_ref[0] + ((0.955900154491-0.437919706012j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.24881533148+0.502756803933j)*x[0] + ((-0.195424328326+0.53678540246j))*x[1]
        ref[(1, 2, 0)]=(-0.24881533148+0.502756803933j)*x_ref[0] + ((-0.195424328326+0.53678540246j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.809232049084-0.433789916565j)*x[0] + ((-0.611749319663-0.50593847756j))*x[1]
        ref[(1, 2, 1)]=(-0.809232049084-0.433789916565j)*x_ref[0] + ((-0.611749319663-0.50593847756j))*x_ref[1]
        arg[(1, 2, 2)]=(0.0651312761188-0.31766511494j)*x[0] + ((0.217155542076+0.226727326854j))*x[1]
        ref[(1, 2, 2)]=(0.0651312761188-0.31766511494j)*x_ref[0] + ((0.217155542076+0.226727326854j))*x_ref[1]
        arg[(1, 2, 3)]=(-0.566842516097-0.440773721551j)*x[0] + ((-0.962004961675-0.104743406579j))*x[1]
        ref[(1, 2, 3)]=(-0.566842516097-0.440773721551j)*x_ref[0] + ((-0.962004961675-0.104743406579j))*x_ref[1]
        arg[(1, 3, 0)]=(-0.367401833247-0.169068846511j)*x[0] + ((0.399560858221+0.948626327833j))*x[1]
        ref[(1, 3, 0)]=(-0.367401833247-0.169068846511j)*x_ref[0] + ((0.399560858221+0.948626327833j))*x_ref[1]
        arg[(1, 3, 1)]=(0.271692515952-0.527024084868j)*x[0] + ((0.28861625325-0.676949052541j))*x[1]
        ref[(1, 3, 1)]=(0.271692515952-0.527024084868j)*x_ref[0] + ((0.28861625325-0.676949052541j))*x_ref[1]
        arg[(1, 3, 2)]=(-0.579751951709+0.90393045733j)*x[0] + ((0.800744546306+0.931118282502j))*x[1]
        ref[(1, 3, 2)]=(-0.579751951709+0.90393045733j)*x_ref[0] + ((0.800744546306+0.931118282502j))*x_ref[1]
        arg[(1, 3, 3)]=(-0.545377202993+0.3859879665j)*x[0] + ((-0.155138032036+0.0475921277343j))*x[1]
        ref[(1, 3, 3)]=(-0.545377202993+0.3859879665j)*x_ref[0] + ((-0.155138032036+0.0475921277343j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.443081433625+0.898993473423j)*x[2]
            ref[(0, 0, 0)]+=(-0.443081433625+0.898993473423j)*x_ref[2]
            arg[(0, 0, 1)]+=(0.928862719574-0.697465111663j)*x[2]
            ref[(0, 0, 1)]+=(0.928862719574-0.697465111663j)*x_ref[2]
            arg[(0, 0, 2)]+=(-0.139346377738+0.400656038601j)*x[2]
            ref[(0, 0, 2)]+=(-0.139346377738+0.400656038601j)*x_ref[2]
            arg[(0, 0, 3)]+=(0.814018367435-0.704526620024j)*x[2]
            ref[(0, 0, 3)]+=(0.814018367435-0.704526620024j)*x_ref[2]
            arg[(0, 1, 0)]+=(-0.677593457986-0.688414491504j)*x[2]
            ref[(0, 1, 0)]+=(-0.677593457986-0.688414491504j)*x_ref[2]
            arg[(0, 1, 1)]+=(-0.315482440642-0.454084567179j)*x[2]
            ref[(0, 1, 1)]+=(-0.315482440642-0.454084567179j)*x_ref[2]
            arg[(0, 1, 2)]+=(-0.699384922167+0.786224570667j)*x[2]
            ref[(0, 1, 2)]+=(-0.699384922167+0.786224570667j)*x_ref[2]
            arg[(0, 1, 3)]+=(0.908749617198-0.0869457119774j)*x[2]
            ref[(0, 1, 3)]+=(0.908749617198-0.0869457119774j)*x_ref[2]
            arg[(0, 2, 0)]+=(-0.139101329012-0.857397135356j)*x[2]
            ref[(0, 2, 0)]+=(-0.139101329012-0.857397135356j)*x_ref[2]
            arg[(0, 2, 1)]+=(0.591860548014-0.509740496393j)*x[2]
            ref[(0, 2, 1)]+=(0.591860548014-0.509740496393j)*x_ref[2]
            arg[(0, 2, 2)]+=(0.224514549749+0.955648833268j)*x[2]
            ref[(0, 2, 2)]+=(0.224514549749+0.955648833268j)*x_ref[2]
            arg[(0, 2, 3)]+=(-0.773785543054+0.361358724328j)*x[2]
            ref[(0, 2, 3)]+=(-0.773785543054+0.361358724328j)*x_ref[2]
            arg[(0, 3, 0)]+=(0.517166290325+0.505202207191j)*x[2]
            ref[(0, 3, 0)]+=(0.517166290325+0.505202207191j)*x_ref[2]
            arg[(0, 3, 1)]+=(0.432923195687-0.620967541608j)*x[2]
            ref[(0, 3, 1)]+=(0.432923195687-0.620967541608j)*x_ref[2]
            arg[(0, 3, 2)]+=(-0.0242112841887+0.600349334537j)*x[2]
            ref[(0, 3, 2)]+=(-0.0242112841887+0.600349334537j)*x_ref[2]
            arg[(0, 3, 3)]+=(-0.196814065457+0.353790322335j)*x[2]
            ref[(0, 3, 3)]+=(-0.196814065457+0.353790322335j)*x_ref[2]
            arg[(1, 0, 0)]+=(0.140708382129-0.821923585505j)*x[2]
            ref[(1, 0, 0)]+=(0.140708382129-0.821923585505j)*x_ref[2]
            arg[(1, 0, 1)]+=(0.828830942927-0.296645643342j)*x[2]
            ref[(1, 0, 1)]+=(0.828830942927-0.296645643342j)*x_ref[2]
            arg[(1, 0, 2)]+=(-0.584137853278+0.0277313185184j)*x[2]
            ref[(1, 0, 2)]+=(-0.584137853278+0.0277313185184j)*x_ref[2]
            arg[(1, 0, 3)]+=(-0.00243273173759+0.516759588584j)*x[2]
            ref[(1, 0, 3)]+=(-0.00243273173759+0.516759588584j)*x_ref[2]
            arg[(1, 1, 0)]+=(-0.985508779012+0.677064586424j)*x[2]
            ref[(1, 1, 0)]+=(-0.985508779012+0.677064586424j)*x_ref[2]
            arg[(1, 1, 1)]+=(-0.0395783687189+0.0987219236844j)*x[2]
            ref[(1, 1, 1)]+=(-0.0395783687189+0.0987219236844j)*x_ref[2]
            arg[(1, 1, 2)]+=(-0.682733656748+0.606995638717j)*x[2]
            ref[(1, 1, 2)]+=(-0.682733656748+0.606995638717j)*x_ref[2]
            arg[(1, 1, 3)]+=(0.172925146599-0.0591443316811j)*x[2]
            ref[(1, 1, 3)]+=(0.172925146599-0.0591443316811j)*x_ref[2]
            arg[(1, 2, 0)]+=(-0.944056032877+0.644060611282j)*x[2]
            ref[(1, 2, 0)]+=(-0.944056032877+0.644060611282j)*x_ref[2]
            arg[(1, 2, 1)]+=(0.70928834527+0.157267048406j)*x[2]
            ref[(1, 2, 1)]+=(0.70928834527+0.157267048406j)*x_ref[2]
            arg[(1, 2, 2)]+=(0.39138411189+0.0495892835786j)*x[2]
            ref[(1, 2, 2)]+=(0.39138411189+0.0495892835786j)*x_ref[2]
            arg[(1, 2, 3)]+=(0.804740692372+0.619109757168j)*x[2]
            ref[(1, 2, 3)]+=(0.804740692372+0.619109757168j)*x_ref[2]
            arg[(1, 3, 0)]+=(-0.180017160994+0.255504898875j)*x[2]
            ref[(1, 3, 0)]+=(-0.180017160994+0.255504898875j)*x_ref[2]
            arg[(1, 3, 1)]+=(0.702260352649+0.906357006473j)*x[2]
            ref[(1, 3, 1)]+=(0.702260352649+0.906357006473j)*x_ref[2]
            arg[(1, 3, 2)]+=(-0.78011748667+0.252552773149j)*x[2]
            ref[(1, 3, 2)]+=(-0.78011748667+0.252552773149j)*x_ref[2]
            arg[(1, 3, 3)]+=(0.48840778696-0.0831373640266j)*x[2]
            ref[(1, 3, 3)]+=(0.48840778696-0.0831373640266j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedSolution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedContinuousFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 2, 4),w)
        ref = Data(0,(3, 2, 2, 4),w_ref)
        arg[(0, 0, 0, 0)]=(-0.212393446665+0.955656203017j)*x[0] + ((0.202057805091+0.344478305866j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.212393446665+0.955656203017j)*x_ref[0] + ((0.202057805091+0.344478305866j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(0.0294016073475-0.266657859693j)*x[0] + ((-0.365008384805+0.382895718987j))*x[1]
        ref[(0, 0, 0, 1)]=(0.0294016073475-0.266657859693j)*x_ref[0] + ((-0.365008384805+0.382895718987j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.243314980445-0.0866066999779j)*x[0] + ((-0.742034715685-0.869665763649j))*x[1]
        ref[(0, 0, 0, 2)]=(0.243314980445-0.0866066999779j)*x_ref[0] + ((-0.742034715685-0.869665763649j))*x_ref[1]
        arg[(0, 0, 0, 3)]=(-0.0476175890271+0.0305776111418j)*x[0] + ((-0.162708746105-0.337788806945j))*x[1]
        ref[(0, 0, 0, 3)]=(-0.0476175890271+0.0305776111418j)*x_ref[0] + ((-0.162708746105-0.337788806945j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.726557611991-0.354274579548j)*x[0] + ((0.392481932137+0.22007326985j))*x[1]
        ref[(0, 0, 1, 0)]=(0.726557611991-0.354274579548j)*x_ref[0] + ((0.392481932137+0.22007326985j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.235782839887-0.455847293356j)*x[0] + ((0.0497331652956+0.712896366436j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.235782839887-0.455847293356j)*x_ref[0] + ((0.0497331652956+0.712896366436j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(0.0607636916507+0.134896193192j)*x[0] + ((0.313532660056-0.556105114369j))*x[1]
        ref[(0, 0, 1, 2)]=(0.0607636916507+0.134896193192j)*x_ref[0] + ((0.313532660056-0.556105114369j))*x_ref[1]
        arg[(0, 0, 1, 3)]=(-0.193892509627+0.176642406674j)*x[0] + ((0.648274301385-0.923308906815j))*x[1]
        ref[(0, 0, 1, 3)]=(-0.193892509627+0.176642406674j)*x_ref[0] + ((0.648274301385-0.923308906815j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.338191351253+0.00404388568513j)*x[0] + ((-0.955265698409-0.6162798573j))*x[1]
        ref[(0, 1, 0, 0)]=(0.338191351253+0.00404388568513j)*x_ref[0] + ((-0.955265698409-0.6162798573j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.72518881753-0.644518873305j)*x[0] + ((0.234521669122+0.764430348112j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.72518881753-0.644518873305j)*x_ref[0] + ((0.234521669122+0.764430348112j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(0.443741406043+0.135510629217j)*x[0] + ((-0.806587417972-0.247188788537j))*x[1]
        ref[(0, 1, 0, 2)]=(0.443741406043+0.135510629217j)*x_ref[0] + ((-0.806587417972-0.247188788537j))*x_ref[1]
        arg[(0, 1, 0, 3)]=(-0.863614711835-0.803433159421j)*x[0] + ((-0.693632375149-0.651585698951j))*x[1]
        ref[(0, 1, 0, 3)]=(-0.863614711835-0.803433159421j)*x_ref[0] + ((-0.693632375149-0.651585698951j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.549993615263-0.791481629199j)*x[0] + ((0.818664395099+0.727554699566j))*x[1]
        ref[(0, 1, 1, 0)]=(0.549993615263-0.791481629199j)*x_ref[0] + ((0.818664395099+0.727554699566j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.879791678209-0.359107975114j)*x[0] + ((0.197262429606-0.770603839076j))*x[1]
        ref[(0, 1, 1, 1)]=(0.879791678209-0.359107975114j)*x_ref[0] + ((0.197262429606-0.770603839076j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(-0.656093260888+0.117456151124j)*x[0] + ((-0.235667798667+0.493272033696j))*x[1]
        ref[(0, 1, 1, 2)]=(-0.656093260888+0.117456151124j)*x_ref[0] + ((-0.235667798667+0.493272033696j))*x_ref[1]
        arg[(0, 1, 1, 3)]=(0.219477838567+0.193982351597j)*x[0] + ((-0.787281175076+0.6242619264j))*x[1]
        ref[(0, 1, 1, 3)]=(0.219477838567+0.193982351597j)*x_ref[0] + ((-0.787281175076+0.6242619264j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.622131873432+0.234671496548j)*x[0] + ((-0.894651707721-0.901822989256j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.622131873432+0.234671496548j)*x_ref[0] + ((-0.894651707721-0.901822989256j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.546200928506-0.0497023834278j)*x[0] + ((0.638193068958+0.663268589913j))*x[1]
        ref[(1, 0, 0, 1)]=(0.546200928506-0.0497023834278j)*x_ref[0] + ((0.638193068958+0.663268589913j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(0.444388583307+0.11408550388j)*x[0] + ((0.00978573385764+0.361789133155j))*x[1]
        ref[(1, 0, 0, 2)]=(0.444388583307+0.11408550388j)*x_ref[0] + ((0.00978573385764+0.361789133155j))*x_ref[1]
        arg[(1, 0, 0, 3)]=(-0.0822038384807-0.615841896907j)*x[0] + ((-0.255489061457-0.898597368143j))*x[1]
        ref[(1, 0, 0, 3)]=(-0.0822038384807-0.615841896907j)*x_ref[0] + ((-0.255489061457-0.898597368143j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.215623828901-0.940963704125j)*x[0] + ((-0.369144962893+0.317553430582j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.215623828901-0.940963704125j)*x_ref[0] + ((-0.369144962893+0.317553430582j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.133644536969+0.0798670470289j)*x[0] + ((-0.0489274180726+0.25503631163j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.133644536969+0.0798670470289j)*x_ref[0] + ((-0.0489274180726+0.25503631163j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(0.858725953843+0.898055767474j)*x[0] + ((-0.475962077813+0.442366514083j))*x[1]
        ref[(1, 0, 1, 2)]=(0.858725953843+0.898055767474j)*x_ref[0] + ((-0.475962077813+0.442366514083j))*x_ref[1]
        arg[(1, 0, 1, 3)]=(-0.407158206256+0.0510139197326j)*x[0] + ((-0.389685018592-0.981930967682j))*x[1]
        ref[(1, 0, 1, 3)]=(-0.407158206256+0.0510139197326j)*x_ref[0] + ((-0.389685018592-0.981930967682j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.476619851719+0.956632829511j)*x[0] + ((0.583687028866-0.282532928012j))*x[1]
        ref[(1, 1, 0, 0)]=(0.476619851719+0.956632829511j)*x_ref[0] + ((0.583687028866-0.282532928012j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.327277360049-0.282571539557j)*x[0] + ((-0.292112780446-0.77739117547j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.327277360049-0.282571539557j)*x_ref[0] + ((-0.292112780446-0.77739117547j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(-0.954762026078-0.787018028325j)*x[0] + ((-0.914872897955+0.804691674j))*x[1]
        ref[(1, 1, 0, 2)]=(-0.954762026078-0.787018028325j)*x_ref[0] + ((-0.914872897955+0.804691674j))*x_ref[1]
        arg[(1, 1, 0, 3)]=(0.0936231517573-0.57126961775j)*x[0] + ((-0.440152480285-0.72897143972j))*x[1]
        ref[(1, 1, 0, 3)]=(0.0936231517573-0.57126961775j)*x_ref[0] + ((-0.440152480285-0.72897143972j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.234091037812-0.966026036528j)*x[0] + ((0.437181365604+0.353473917147j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.234091037812-0.966026036528j)*x_ref[0] + ((0.437181365604+0.353473917147j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.552018521105+0.130760505834j)*x[0] + ((-0.856070585098-0.633316114681j))*x[1]
        ref[(1, 1, 1, 1)]=(0.552018521105+0.130760505834j)*x_ref[0] + ((-0.856070585098-0.633316114681j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(-0.355588253032+0.932631037333j)*x[0] + ((-0.810189750635+0.48538147243j))*x[1]
        ref[(1, 1, 1, 2)]=(-0.355588253032+0.932631037333j)*x_ref[0] + ((-0.810189750635+0.48538147243j))*x_ref[1]
        arg[(1, 1, 1, 3)]=(-0.898591443341-0.291183331809j)*x[0] + ((0.749342517819+0.702076657382j))*x[1]
        ref[(1, 1, 1, 3)]=(-0.898591443341-0.291183331809j)*x_ref[0] + ((0.749342517819+0.702076657382j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.745427983069-0.904002823668j)*x[0] + ((0.10432211125-0.522381378885j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.745427983069-0.904002823668j)*x_ref[0] + ((0.10432211125-0.522381378885j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(0.609794464579+0.987213549953j)*x[0] + ((0.0272727504189-0.621662365611j))*x[1]
        ref[(2, 0, 0, 1)]=(0.609794464579+0.987213549953j)*x_ref[0] + ((0.0272727504189-0.621662365611j))*x_ref[1]
        arg[(2, 0, 0, 2)]=(0.000493874377314+0.950552528673j)*x[0] + ((-0.0234140270688-0.645965033772j))*x[1]
        ref[(2, 0, 0, 2)]=(0.000493874377314+0.950552528673j)*x_ref[0] + ((-0.0234140270688-0.645965033772j))*x_ref[1]
        arg[(2, 0, 0, 3)]=(-0.492144463901+0.841996914645j)*x[0] + ((-0.170123653883-0.608751940276j))*x[1]
        ref[(2, 0, 0, 3)]=(-0.492144463901+0.841996914645j)*x_ref[0] + ((-0.170123653883-0.608751940276j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(0.890654370659+0.808722818193j)*x[0] + ((-0.930002818772-0.477934669426j))*x[1]
        ref[(2, 0, 1, 0)]=(0.890654370659+0.808722818193j)*x_ref[0] + ((-0.930002818772-0.477934669426j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.569973936109-0.551279293528j)*x[0] + ((-0.152771510717-0.0617154374711j))*x[1]
        ref[(2, 0, 1, 1)]=(0.569973936109-0.551279293528j)*x_ref[0] + ((-0.152771510717-0.0617154374711j))*x_ref[1]
        arg[(2, 0, 1, 2)]=(-0.735785831651+0.884389560451j)*x[0] + ((-0.285532665475-0.793295423855j))*x[1]
        ref[(2, 0, 1, 2)]=(-0.735785831651+0.884389560451j)*x_ref[0] + ((-0.285532665475-0.793295423855j))*x_ref[1]
        arg[(2, 0, 1, 3)]=(-0.86714343425-0.10618611294j)*x[0] + ((0.342066450047+0.801483521018j))*x[1]
        ref[(2, 0, 1, 3)]=(-0.86714343425-0.10618611294j)*x_ref[0] + ((0.342066450047+0.801483521018j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(-0.177114100524+0.698296863168j)*x[0] + ((0.964020237427-0.65804630035j))*x[1]
        ref[(2, 1, 0, 0)]=(-0.177114100524+0.698296863168j)*x_ref[0] + ((0.964020237427-0.65804630035j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.876687801335+0.437653817421j)*x[0] + ((-0.408567209146+0.0889111511527j))*x[1]
        ref[(2, 1, 0, 1)]=(0.876687801335+0.437653817421j)*x_ref[0] + ((-0.408567209146+0.0889111511527j))*x_ref[1]
        arg[(2, 1, 0, 2)]=(0.785651290029-0.56917947491j)*x[0] + ((0.880288708031-0.236395667147j))*x[1]
        ref[(2, 1, 0, 2)]=(0.785651290029-0.56917947491j)*x_ref[0] + ((0.880288708031-0.236395667147j))*x_ref[1]
        arg[(2, 1, 0, 3)]=(-0.591697177732-0.293765021675j)*x[0] + ((-0.231477922406-0.103372691163j))*x[1]
        ref[(2, 1, 0, 3)]=(-0.591697177732-0.293765021675j)*x_ref[0] + ((-0.231477922406-0.103372691163j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(-0.15607812568+0.285118034353j)*x[0] + ((0.793129190154-0.311287932693j))*x[1]
        ref[(2, 1, 1, 0)]=(-0.15607812568+0.285118034353j)*x_ref[0] + ((0.793129190154-0.311287932693j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(0.0931811444943-0.360103634935j)*x[0] + ((-0.490898901429+0.0187596671962j))*x[1]
        ref[(2, 1, 1, 1)]=(0.0931811444943-0.360103634935j)*x_ref[0] + ((-0.490898901429+0.0187596671962j))*x_ref[1]
        arg[(2, 1, 1, 2)]=(-0.995847289869-0.64784812993j)*x[0] + ((-0.138946303711-0.427996924029j))*x[1]
        ref[(2, 1, 1, 2)]=(-0.995847289869-0.64784812993j)*x_ref[0] + ((-0.138946303711-0.427996924029j))*x_ref[1]
        arg[(2, 1, 1, 3)]=(-0.494505444743+0.273080061931j)*x[0] + ((-0.104227127525+0.756095047895j))*x[1]
        ref[(2, 1, 1, 3)]=(-0.494505444743+0.273080061931j)*x_ref[0] + ((-0.104227127525+0.756095047895j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.369426861296-0.256983436907j)*x[2]
            ref[(0, 0, 0, 0)]+=(0.369426861296-0.256983436907j)*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.565770674998+0.141650515911j)*x[2]
            ref[(0, 0, 0, 1)]+=(0.565770674998+0.141650515911j)*x_ref[2]
            arg[(0, 0, 0, 2)]+=(-0.940982987852-0.0248937740219j)*x[2]
            ref[(0, 0, 0, 2)]+=(-0.940982987852-0.0248937740219j)*x_ref[2]
            arg[(0, 0, 0, 3)]+=(0.285857025948+0.908801120357j)*x[2]
            ref[(0, 0, 0, 3)]+=(0.285857025948+0.908801120357j)*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.683180480838+0.847364951436j)*x[2]
            ref[(0, 0, 1, 0)]+=(-0.683180480838+0.847364951436j)*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.220729876583+0.572192260599j)*x[2]
            ref[(0, 0, 1, 1)]+=(0.220729876583+0.572192260599j)*x_ref[2]
            arg[(0, 0, 1, 2)]+=(0.637088166072-0.264643176756j)*x[2]
            ref[(0, 0, 1, 2)]+=(0.637088166072-0.264643176756j)*x_ref[2]
            arg[(0, 0, 1, 3)]+=(-0.287631126048+0.755534154495j)*x[2]
            ref[(0, 0, 1, 3)]+=(-0.287631126048+0.755534154495j)*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.158742977633-0.835149106887j)*x[2]
            ref[(0, 1, 0, 0)]+=(0.158742977633-0.835149106887j)*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.992525523307+0.287940390314j)*x[2]
            ref[(0, 1, 0, 1)]+=(0.992525523307+0.287940390314j)*x_ref[2]
            arg[(0, 1, 0, 2)]+=(0.741779681224+0.779724521405j)*x[2]
            ref[(0, 1, 0, 2)]+=(0.741779681224+0.779724521405j)*x_ref[2]
            arg[(0, 1, 0, 3)]+=(-0.0915330470559-0.267226404814j)*x[2]
            ref[(0, 1, 0, 3)]+=(-0.0915330470559-0.267226404814j)*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.958119666085-0.852409213058j)*x[2]
            ref[(0, 1, 1, 0)]+=(-0.958119666085-0.852409213058j)*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.101383110242-0.0267214990804j)*x[2]
            ref[(0, 1, 1, 1)]+=(0.101383110242-0.0267214990804j)*x_ref[2]
            arg[(0, 1, 1, 2)]+=(-0.543100744665-0.416225047371j)*x[2]
            ref[(0, 1, 1, 2)]+=(-0.543100744665-0.416225047371j)*x_ref[2]
            arg[(0, 1, 1, 3)]+=(-0.0265066810849+0.429843594093j)*x[2]
            ref[(0, 1, 1, 3)]+=(-0.0265066810849+0.429843594093j)*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.21254095281+0.652145456381j)*x[2]
            ref[(1, 0, 0, 0)]+=(0.21254095281+0.652145456381j)*x_ref[2]
            arg[(1, 0, 0, 1)]+=(-0.537598059727-0.393426570746j)*x[2]
            ref[(1, 0, 0, 1)]+=(-0.537598059727-0.393426570746j)*x_ref[2]
            arg[(1, 0, 0, 2)]+=(-0.140214162963-0.725577520126j)*x[2]
            ref[(1, 0, 0, 2)]+=(-0.140214162963-0.725577520126j)*x_ref[2]
            arg[(1, 0, 0, 3)]+=(0.462386701216+0.182521581231j)*x[2]
            ref[(1, 0, 0, 3)]+=(0.462386701216+0.182521581231j)*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.747581751361-0.21570849122j)*x[2]
            ref[(1, 0, 1, 0)]+=(-0.747581751361-0.21570849122j)*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.558751449812+0.433878268953j)*x[2]
            ref[(1, 0, 1, 1)]+=(0.558751449812+0.433878268953j)*x_ref[2]
            arg[(1, 0, 1, 2)]+=(0.174232361283+0.273304721753j)*x[2]
            ref[(1, 0, 1, 2)]+=(0.174232361283+0.273304721753j)*x_ref[2]
            arg[(1, 0, 1, 3)]+=(-0.480250463232+0.454010594815j)*x[2]
            ref[(1, 0, 1, 3)]+=(-0.480250463232+0.454010594815j)*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.467095035654-0.747915326544j)*x[2]
            ref[(1, 1, 0, 0)]+=(0.467095035654-0.747915326544j)*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.693045572836+0.459965401127j)*x[2]
            ref[(1, 1, 0, 1)]+=(-0.693045572836+0.459965401127j)*x_ref[2]
            arg[(1, 1, 0, 2)]+=(0.426880953553+0.804894306304j)*x[2]
            ref[(1, 1, 0, 2)]+=(0.426880953553+0.804894306304j)*x_ref[2]
            arg[(1, 1, 0, 3)]+=(0.434392990195-0.784182365767j)*x[2]
            ref[(1, 1, 0, 3)]+=(0.434392990195-0.784182365767j)*x_ref[2]
            arg[(1, 1, 1, 0)]+=(-0.980706474969+0.277809497872j)*x[2]
            ref[(1, 1, 1, 0)]+=(-0.980706474969+0.277809497872j)*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.357482040651-0.986847951263j)*x[2]
            ref[(1, 1, 1, 1)]+=(0.357482040651-0.986847951263j)*x_ref[2]
            arg[(1, 1, 1, 2)]+=(0.508509536855-0.159385068501j)*x[2]
            ref[(1, 1, 1, 2)]+=(0.508509536855-0.159385068501j)*x_ref[2]
            arg[(1, 1, 1, 3)]+=(0.242983965311-0.817442621982j)*x[2]
            ref[(1, 1, 1, 3)]+=(0.242983965311-0.817442621982j)*x_ref[2]
            arg[(2, 0, 0, 0)]+=(0.932626985828+0.157077687063j)*x[2]
            ref[(2, 0, 0, 0)]+=(0.932626985828+0.157077687063j)*x_ref[2]
            arg[(2, 0, 0, 1)]+=(-0.679730103433-0.820847462567j)*x[2]
            ref[(2, 0, 0, 1)]+=(-0.679730103433-0.820847462567j)*x_ref[2]
            arg[(2, 0, 0, 2)]+=(-0.0754005458899-0.67841205829j)*x[2]
            ref[(2, 0, 0, 2)]+=(-0.0754005458899-0.67841205829j)*x_ref[2]
            arg[(2, 0, 0, 3)]+=(0.380297112226-0.202145744684j)*x[2]
            ref[(2, 0, 0, 3)]+=(0.380297112226-0.202145744684j)*x_ref[2]
            arg[(2, 0, 1, 0)]+=(0.988922696865+0.325392479131j)*x[2]
            ref[(2, 0, 1, 0)]+=(0.988922696865+0.325392479131j)*x_ref[2]
            arg[(2, 0, 1, 1)]+=(0.876564513007-0.574294018999j)*x[2]
            ref[(2, 0, 1, 1)]+=(0.876564513007-0.574294018999j)*x_ref[2]
            arg[(2, 0, 1, 2)]+=(-0.588653510959-0.166400071374j)*x[2]
            ref[(2, 0, 1, 2)]+=(-0.588653510959-0.166400071374j)*x_ref[2]
            arg[(2, 0, 1, 3)]+=(-0.130921085601+0.309536182127j)*x[2]
            ref[(2, 0, 1, 3)]+=(-0.130921085601+0.309536182127j)*x_ref[2]
            arg[(2, 1, 0, 0)]+=(0.442467850502+0.0438303529552j)*x[2]
            ref[(2, 1, 0, 0)]+=(0.442467850502+0.0438303529552j)*x_ref[2]
            arg[(2, 1, 0, 1)]+=(0.220874442467+0.0638702463101j)*x[2]
            ref[(2, 1, 0, 1)]+=(0.220874442467+0.0638702463101j)*x_ref[2]
            arg[(2, 1, 0, 2)]+=(-0.968715450208+0.670510734024j)*x[2]
            ref[(2, 1, 0, 2)]+=(-0.968715450208+0.670510734024j)*x_ref[2]
            arg[(2, 1, 0, 3)]+=(0.677295212052-0.194953947946j)*x[2]
            ref[(2, 1, 0, 3)]+=(0.677295212052-0.194953947946j)*x_ref[2]
            arg[(2, 1, 1, 0)]+=(-0.122155136234-0.640814656565j)*x[2]
            ref[(2, 1, 1, 0)]+=(-0.122155136234-0.640814656565j)*x_ref[2]
            arg[(2, 1, 1, 1)]+=(-0.852843879455+0.471239385815j)*x[2]
            ref[(2, 1, 1, 1)]+=(-0.852843879455+0.471239385815j)*x_ref[2]
            arg[(2, 1, 1, 2)]+=(-0.324122221765-0.138538310788j)*x[2]
            ref[(2, 1, 1, 2)]+=(-0.324122221765-0.138538310788j)*x_ref[2]
            arg[(2, 1, 1, 3)]+=(-0.000866907795533+0.292034089965j)*x[2]
            ref[(2, 1, 1, 3)]+=(-0.000866907795533+0.292034089965j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedContinuousFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.426582751074-0.613951529766j)*x[0] + ((-0.222568973734-0.759737603406j))*x[1]
        ref=(0.426582751074-0.613951529766j)*x_ref[0] + ((-0.222568973734-0.759737603406j))*x_ref[1]
        if dim==3:
            arg+=((-0.804900265152-0.0626184638598j))*x[2]
            ref+=((-0.804900265152-0.0626184638598j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedContinuousFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=(-0.598819596136-0.0547344854724j)*x[0] + ((-0.794203236637+0.847135542036j))*x[1]
        ref[(0,)]=(-0.598819596136-0.0547344854724j)*x_ref[0] + ((-0.794203236637+0.847135542036j))*x_ref[1]
        arg[(1,)]=(0.199677776446-0.602267251329j)*x[0] + ((-0.0254458658101-0.172153323518j))*x[1]
        ref[(1,)]=(0.199677776446-0.602267251329j)*x_ref[0] + ((-0.0254458658101-0.172153323518j))*x_ref[1]
        arg[(2,)]=(0.291188282815+0.325653174034j)*x[0] + ((-0.989586638758-0.375212239668j))*x[1]
        ref[(2,)]=(0.291188282815+0.325653174034j)*x_ref[0] + ((-0.989586638758-0.375212239668j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.249937834723+0.671664407497j)*x[2]
            ref[(0,)]+=(-0.249937834723+0.671664407497j)*x_ref[2]
            arg[(1,)]+=(-0.0358981398952-0.844752702397j)*x[2]
            ref[(1,)]+=(-0.0358981398952-0.844752702397j)*x_ref[2]
            arg[(2,)]+=(0.999936912916-0.406048077871j)*x[2]
            ref[(2,)]+=(0.999936912916-0.406048077871j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedContinuousFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref = Data(0,(4, 4),w_ref)
        arg[(0, 0)]=(-0.203927105475-0.0152144733195j)*x[0] + ((0.540680910462-0.89147688323j))*x[1]
        ref[(0, 0)]=(-0.203927105475-0.0152144733195j)*x_ref[0] + ((0.540680910462-0.89147688323j))*x_ref[1]
        arg[(0, 1)]=(0.652174531521+0.459617394373j)*x[0] + ((0.762278442864-0.224314939339j))*x[1]
        ref[(0, 1)]=(0.652174531521+0.459617394373j)*x_ref[0] + ((0.762278442864-0.224314939339j))*x_ref[1]
        arg[(0, 2)]=(0.888959907027-0.104483305195j)*x[0] + ((0.375226356824+0.423331289814j))*x[1]
        ref[(0, 2)]=(0.888959907027-0.104483305195j)*x_ref[0] + ((0.375226356824+0.423331289814j))*x_ref[1]
        arg[(0, 3)]=(-0.635698157741+0.832834978739j)*x[0] + ((0.271887903906+0.989577828059j))*x[1]
        ref[(0, 3)]=(-0.635698157741+0.832834978739j)*x_ref[0] + ((0.271887903906+0.989577828059j))*x_ref[1]
        arg[(1, 0)]=(0.847930473974+0.837618841523j)*x[0] + ((0.241081252978-0.553238097133j))*x[1]
        ref[(1, 0)]=(0.847930473974+0.837618841523j)*x_ref[0] + ((0.241081252978-0.553238097133j))*x_ref[1]
        arg[(1, 1)]=(0.38135699958-0.681665622134j)*x[0] + ((-0.170116785843+0.744875104171j))*x[1]
        ref[(1, 1)]=(0.38135699958-0.681665622134j)*x_ref[0] + ((-0.170116785843+0.744875104171j))*x_ref[1]
        arg[(1, 2)]=(-0.868111108926+0.733670402614j)*x[0] + ((0.693312250374-0.300578468571j))*x[1]
        ref[(1, 2)]=(-0.868111108926+0.733670402614j)*x_ref[0] + ((0.693312250374-0.300578468571j))*x_ref[1]
        arg[(1, 3)]=(0.177587608708+0.489222305385j)*x[0] + ((0.0734267482482-0.476275173796j))*x[1]
        ref[(1, 3)]=(0.177587608708+0.489222305385j)*x_ref[0] + ((0.0734267482482-0.476275173796j))*x_ref[1]
        arg[(2, 0)]=(0.578089712786+0.993163474902j)*x[0] + ((0.86483391555+0.277811624732j))*x[1]
        ref[(2, 0)]=(0.578089712786+0.993163474902j)*x_ref[0] + ((0.86483391555+0.277811624732j))*x_ref[1]
        arg[(2, 1)]=(0.950810057218+0.0940545169962j)*x[0] + ((0.516067151356+0.534397140724j))*x[1]
        ref[(2, 1)]=(0.950810057218+0.0940545169962j)*x_ref[0] + ((0.516067151356+0.534397140724j))*x_ref[1]
        arg[(2, 2)]=(0.0502981885071-0.143272602616j)*x[0] + ((0.891846798936+0.580677142924j))*x[1]
        ref[(2, 2)]=(0.0502981885071-0.143272602616j)*x_ref[0] + ((0.891846798936+0.580677142924j))*x_ref[1]
        arg[(2, 3)]=(-0.87627244383-0.166572079292j)*x[0] + ((0.0132406978428-0.0107762277501j))*x[1]
        ref[(2, 3)]=(-0.87627244383-0.166572079292j)*x_ref[0] + ((0.0132406978428-0.0107762277501j))*x_ref[1]
        arg[(3, 0)]=(-0.654938098042+0.483021030204j)*x[0] + ((-0.829444573576+0.0935862621981j))*x[1]
        ref[(3, 0)]=(-0.654938098042+0.483021030204j)*x_ref[0] + ((-0.829444573576+0.0935862621981j))*x_ref[1]
        arg[(3, 1)]=(0.2294968675-0.364808556276j)*x[0] + ((0.9411409464-0.224354104106j))*x[1]
        ref[(3, 1)]=(0.2294968675-0.364808556276j)*x_ref[0] + ((0.9411409464-0.224354104106j))*x_ref[1]
        arg[(3, 2)]=(-0.0767724120055+0.99657255465j)*x[0] + ((-0.0528235185781+0.175223027233j))*x[1]
        ref[(3, 2)]=(-0.0767724120055+0.99657255465j)*x_ref[0] + ((-0.0528235185781+0.175223027233j))*x_ref[1]
        arg[(3, 3)]=(0.7462436754+0.0435423015026j)*x[0] + ((-0.0497882340646-0.574309685791j))*x[1]
        ref[(3, 3)]=(0.7462436754+0.0435423015026j)*x_ref[0] + ((-0.0497882340646-0.574309685791j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.430108156715-0.178434279131j)*x[2]
            ref[(0, 0)]+=(0.430108156715-0.178434279131j)*x_ref[2]
            arg[(0, 1)]+=(0.662921003812+0.207973489377j)*x[2]
            ref[(0, 1)]+=(0.662921003812+0.207973489377j)*x_ref[2]
            arg[(0, 2)]+=(0.814354954402+0.568642630938j)*x[2]
            ref[(0, 2)]+=(0.814354954402+0.568642630938j)*x_ref[2]
            arg[(0, 3)]+=(0.0818514887241-0.638506165969j)*x[2]
            ref[(0, 3)]+=(0.0818514887241-0.638506165969j)*x_ref[2]
            arg[(1, 0)]+=(0.148854704265-0.176288950939j)*x[2]
            ref[(1, 0)]+=(0.148854704265-0.176288950939j)*x_ref[2]
            arg[(1, 1)]+=(-0.184937268337+0.444523494827j)*x[2]
            ref[(1, 1)]+=(-0.184937268337+0.444523494827j)*x_ref[2]
            arg[(1, 2)]+=(0.81340411433-0.649781149861j)*x[2]
            ref[(1, 2)]+=(0.81340411433-0.649781149861j)*x_ref[2]
            arg[(1, 3)]+=(-0.858702032596+0.329138356345j)*x[2]
            ref[(1, 3)]+=(-0.858702032596+0.329138356345j)*x_ref[2]
            arg[(2, 0)]+=(0.925330735875-0.22296539678j)*x[2]
            ref[(2, 0)]+=(0.925330735875-0.22296539678j)*x_ref[2]
            arg[(2, 1)]+=(-0.337458419747-0.605374925132j)*x[2]
            ref[(2, 1)]+=(-0.337458419747-0.605374925132j)*x_ref[2]
            arg[(2, 2)]+=(-0.237846912463+0.549189538504j)*x[2]
            ref[(2, 2)]+=(-0.237846912463+0.549189538504j)*x_ref[2]
            arg[(2, 3)]+=(-0.030870832554+0.496439061217j)*x[2]
            ref[(2, 3)]+=(-0.030870832554+0.496439061217j)*x_ref[2]
            arg[(3, 0)]+=(0.536242198724+0.480970389149j)*x[2]
            ref[(3, 0)]+=(0.536242198724+0.480970389149j)*x_ref[2]
            arg[(3, 1)]+=(-0.768152190975-0.29793702717j)*x[2]
            ref[(3, 1)]+=(-0.768152190975-0.29793702717j)*x_ref[2]
            arg[(3, 2)]+=(0.139140480789+0.589245708839j)*x[2]
            ref[(3, 2)]+=(0.139140480789+0.589245708839j)*x_ref[2]
            arg[(3, 3)]+=(-0.882454146944-0.0281672301506j)*x[2]
            ref[(3, 3)]+=(-0.882454146944-0.0281672301506j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedContinuousFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 4),w)
        ref = Data(0,(4, 2, 4),w_ref)
        arg[(0, 0, 0)]=(-0.695940636142+0.823395432395j)*x[0] + ((-0.617834606676-0.468768216948j))*x[1]
        ref[(0, 0, 0)]=(-0.695940636142+0.823395432395j)*x_ref[0] + ((-0.617834606676-0.468768216948j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.936054204315+0.164263592411j)*x[0] + ((0.914826376663+0.459109302039j))*x[1]
        ref[(0, 0, 1)]=(-0.936054204315+0.164263592411j)*x_ref[0] + ((0.914826376663+0.459109302039j))*x_ref[1]
        arg[(0, 0, 2)]=(0.887914267587-0.417021303927j)*x[0] + ((-0.0909777218851-0.807177288962j))*x[1]
        ref[(0, 0, 2)]=(0.887914267587-0.417021303927j)*x_ref[0] + ((-0.0909777218851-0.807177288962j))*x_ref[1]
        arg[(0, 0, 3)]=(0.81409958082-0.200159274502j)*x[0] + ((0.65236516712-0.0277032972206j))*x[1]
        ref[(0, 0, 3)]=(0.81409958082-0.200159274502j)*x_ref[0] + ((0.65236516712-0.0277032972206j))*x_ref[1]
        arg[(0, 1, 0)]=(0.700392513234-0.0456764030647j)*x[0] + ((0.701357266546+0.297774522324j))*x[1]
        ref[(0, 1, 0)]=(0.700392513234-0.0456764030647j)*x_ref[0] + ((0.701357266546+0.297774522324j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.99516133844-0.863157476812j)*x[0] + ((-0.423325640978-0.496586368662j))*x[1]
        ref[(0, 1, 1)]=(-0.99516133844-0.863157476812j)*x_ref[0] + ((-0.423325640978-0.496586368662j))*x_ref[1]
        arg[(0, 1, 2)]=(0.263619870438+0.226085028887j)*x[0] + ((0.0551405914906+0.928754655477j))*x[1]
        ref[(0, 1, 2)]=(0.263619870438+0.226085028887j)*x_ref[0] + ((0.0551405914906+0.928754655477j))*x_ref[1]
        arg[(0, 1, 3)]=(0.405831154011+0.144209231351j)*x[0] + ((0.978951499574+0.824559177097j))*x[1]
        ref[(0, 1, 3)]=(0.405831154011+0.144209231351j)*x_ref[0] + ((0.978951499574+0.824559177097j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.293012847289-0.270727619004j)*x[0] + ((-0.170682588854+0.372547272488j))*x[1]
        ref[(1, 0, 0)]=(-0.293012847289-0.270727619004j)*x_ref[0] + ((-0.170682588854+0.372547272488j))*x_ref[1]
        arg[(1, 0, 1)]=(0.642325806577-0.445093533565j)*x[0] + ((0.877739876758-0.819523547095j))*x[1]
        ref[(1, 0, 1)]=(0.642325806577-0.445093533565j)*x_ref[0] + ((0.877739876758-0.819523547095j))*x_ref[1]
        arg[(1, 0, 2)]=(-0.204638558236+0.0564104240706j)*x[0] + ((0.803458949947+0.450763187479j))*x[1]
        ref[(1, 0, 2)]=(-0.204638558236+0.0564104240706j)*x_ref[0] + ((0.803458949947+0.450763187479j))*x_ref[1]
        arg[(1, 0, 3)]=(0.363437688014+0.490368545241j)*x[0] + ((0.607163884466+0.526663967979j))*x[1]
        ref[(1, 0, 3)]=(0.363437688014+0.490368545241j)*x_ref[0] + ((0.607163884466+0.526663967979j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.30630766966+0.743671381443j)*x[0] + ((0.668004438493-0.632741320705j))*x[1]
        ref[(1, 1, 0)]=(-0.30630766966+0.743671381443j)*x_ref[0] + ((0.668004438493-0.632741320705j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.45435650712+0.208718962653j)*x[0] + ((0.827747886585-0.544990991805j))*x[1]
        ref[(1, 1, 1)]=(-0.45435650712+0.208718962653j)*x_ref[0] + ((0.827747886585-0.544990991805j))*x_ref[1]
        arg[(1, 1, 2)]=(0.570454877358-0.868556068935j)*x[0] + ((0.343704072995-0.667779521311j))*x[1]
        ref[(1, 1, 2)]=(0.570454877358-0.868556068935j)*x_ref[0] + ((0.343704072995-0.667779521311j))*x_ref[1]
        arg[(1, 1, 3)]=(0.48994531055+0.38290309453j)*x[0] + ((-0.537293492938-0.300494200438j))*x[1]
        ref[(1, 1, 3)]=(0.48994531055+0.38290309453j)*x_ref[0] + ((-0.537293492938-0.300494200438j))*x_ref[1]
        arg[(2, 0, 0)]=(0.817833301585+0.73165736705j)*x[0] + ((-0.603400526931+0.510245988354j))*x[1]
        ref[(2, 0, 0)]=(0.817833301585+0.73165736705j)*x_ref[0] + ((-0.603400526931+0.510245988354j))*x_ref[1]
        arg[(2, 0, 1)]=(0.268790876363-0.218913763795j)*x[0] + ((-0.486959330629-0.800352723677j))*x[1]
        ref[(2, 0, 1)]=(0.268790876363-0.218913763795j)*x_ref[0] + ((-0.486959330629-0.800352723677j))*x_ref[1]
        arg[(2, 0, 2)]=(0.867497646431+0.110099752391j)*x[0] + ((0.343644927001+0.452407967312j))*x[1]
        ref[(2, 0, 2)]=(0.867497646431+0.110099752391j)*x_ref[0] + ((0.343644927001+0.452407967312j))*x_ref[1]
        arg[(2, 0, 3)]=(-0.739339136019+0.517743688038j)*x[0] + ((-0.282544588878+0.0669243539478j))*x[1]
        ref[(2, 0, 3)]=(-0.739339136019+0.517743688038j)*x_ref[0] + ((-0.282544588878+0.0669243539478j))*x_ref[1]
        arg[(2, 1, 0)]=(0.911784915542+0.257369994865j)*x[0] + ((0.523410431749+0.515724798041j))*x[1]
        ref[(2, 1, 0)]=(0.911784915542+0.257369994865j)*x_ref[0] + ((0.523410431749+0.515724798041j))*x_ref[1]
        arg[(2, 1, 1)]=(-0.124940339804+0.922736045108j)*x[0] + ((0.554591715077+0.733335127051j))*x[1]
        ref[(2, 1, 1)]=(-0.124940339804+0.922736045108j)*x_ref[0] + ((0.554591715077+0.733335127051j))*x_ref[1]
        arg[(2, 1, 2)]=(0.567276614398+0.402784592871j)*x[0] + ((0.520181214708-0.587135235066j))*x[1]
        ref[(2, 1, 2)]=(0.567276614398+0.402784592871j)*x_ref[0] + ((0.520181214708-0.587135235066j))*x_ref[1]
        arg[(2, 1, 3)]=(-0.410391960227+0.790490751807j)*x[0] + ((-0.933143914347+0.491893048804j))*x[1]
        ref[(2, 1, 3)]=(-0.410391960227+0.790490751807j)*x_ref[0] + ((-0.933143914347+0.491893048804j))*x_ref[1]
        arg[(3, 0, 0)]=(-0.208111782726+0.479013844593j)*x[0] + ((0.106534645681-0.904086071967j))*x[1]
        ref[(3, 0, 0)]=(-0.208111782726+0.479013844593j)*x_ref[0] + ((0.106534645681-0.904086071967j))*x_ref[1]
        arg[(3, 0, 1)]=(0.222895820983-0.258251254646j)*x[0] + ((-0.739545698306-0.992778241391j))*x[1]
        ref[(3, 0, 1)]=(0.222895820983-0.258251254646j)*x_ref[0] + ((-0.739545698306-0.992778241391j))*x_ref[1]
        arg[(3, 0, 2)]=(0.306573522872-0.665046327193j)*x[0] + ((0.209808178233+0.810075300907j))*x[1]
        ref[(3, 0, 2)]=(0.306573522872-0.665046327193j)*x_ref[0] + ((0.209808178233+0.810075300907j))*x_ref[1]
        arg[(3, 0, 3)]=(-0.767120424865+0.738566513651j)*x[0] + ((0.421000814357-0.545303944064j))*x[1]
        ref[(3, 0, 3)]=(-0.767120424865+0.738566513651j)*x_ref[0] + ((0.421000814357-0.545303944064j))*x_ref[1]
        arg[(3, 1, 0)]=(-0.789547432861+0.864555138167j)*x[0] + ((-0.37265779121-0.152027025584j))*x[1]
        ref[(3, 1, 0)]=(-0.789547432861+0.864555138167j)*x_ref[0] + ((-0.37265779121-0.152027025584j))*x_ref[1]
        arg[(3, 1, 1)]=(-0.348684283163+0.792452827408j)*x[0] + ((0.0914017827888-0.759762970552j))*x[1]
        ref[(3, 1, 1)]=(-0.348684283163+0.792452827408j)*x_ref[0] + ((0.0914017827888-0.759762970552j))*x_ref[1]
        arg[(3, 1, 2)]=(-0.54336024355+0.409698839762j)*x[0] + ((0.178915205866+0.642894877303j))*x[1]
        ref[(3, 1, 2)]=(-0.54336024355+0.409698839762j)*x_ref[0] + ((0.178915205866+0.642894877303j))*x_ref[1]
        arg[(3, 1, 3)]=(0.271572109247+0.498522086725j)*x[0] + ((-0.597366298061-0.928748571767j))*x[1]
        ref[(3, 1, 3)]=(0.271572109247+0.498522086725j)*x_ref[0] + ((-0.597366298061-0.928748571767j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.295551620642+0.499754883883j)*x[2]
            ref[(0, 0, 0)]+=(0.295551620642+0.499754883883j)*x_ref[2]
            arg[(0, 0, 1)]+=(-0.622283985281-0.601344481344j)*x[2]
            ref[(0, 0, 1)]+=(-0.622283985281-0.601344481344j)*x_ref[2]
            arg[(0, 0, 2)]+=(-0.623099048076+0.799031756476j)*x[2]
            ref[(0, 0, 2)]+=(-0.623099048076+0.799031756476j)*x_ref[2]
            arg[(0, 0, 3)]+=(0.602941247687-0.274538477266j)*x[2]
            ref[(0, 0, 3)]+=(0.602941247687-0.274538477266j)*x_ref[2]
            arg[(0, 1, 0)]+=(-0.883403616897-0.0623737951397j)*x[2]
            ref[(0, 1, 0)]+=(-0.883403616897-0.0623737951397j)*x_ref[2]
            arg[(0, 1, 1)]+=(-0.532110567822-0.463517702496j)*x[2]
            ref[(0, 1, 1)]+=(-0.532110567822-0.463517702496j)*x_ref[2]
            arg[(0, 1, 2)]+=(-0.572472097957+0.599433146092j)*x[2]
            ref[(0, 1, 2)]+=(-0.572472097957+0.599433146092j)*x_ref[2]
            arg[(0, 1, 3)]+=(-0.48751657441+0.0373725504133j)*x[2]
            ref[(0, 1, 3)]+=(-0.48751657441+0.0373725504133j)*x_ref[2]
            arg[(1, 0, 0)]+=(0.164726598359+0.346753790725j)*x[2]
            ref[(1, 0, 0)]+=(0.164726598359+0.346753790725j)*x_ref[2]
            arg[(1, 0, 1)]+=(-0.625883671863+0.988087599433j)*x[2]
            ref[(1, 0, 1)]+=(-0.625883671863+0.988087599433j)*x_ref[2]
            arg[(1, 0, 2)]+=(0.790592223085-0.646231318116j)*x[2]
            ref[(1, 0, 2)]+=(0.790592223085-0.646231318116j)*x_ref[2]
            arg[(1, 0, 3)]+=(-0.944961355365+0.406598772064j)*x[2]
            ref[(1, 0, 3)]+=(-0.944961355365+0.406598772064j)*x_ref[2]
            arg[(1, 1, 0)]+=(-0.544660373922-0.5952812614j)*x[2]
            ref[(1, 1, 0)]+=(-0.544660373922-0.5952812614j)*x_ref[2]
            arg[(1, 1, 1)]+=(-0.32460176314+0.886443373199j)*x[2]
            ref[(1, 1, 1)]+=(-0.32460176314+0.886443373199j)*x_ref[2]
            arg[(1, 1, 2)]+=(-0.614422748518+0.480122946902j)*x[2]
            ref[(1, 1, 2)]+=(-0.614422748518+0.480122946902j)*x_ref[2]
            arg[(1, 1, 3)]+=(-0.111387189596+0.747143615656j)*x[2]
            ref[(1, 1, 3)]+=(-0.111387189596+0.747143615656j)*x_ref[2]
            arg[(2, 0, 0)]+=(-0.0997277811053+0.35713363833j)*x[2]
            ref[(2, 0, 0)]+=(-0.0997277811053+0.35713363833j)*x_ref[2]
            arg[(2, 0, 1)]+=(0.0253295594529-0.401993620606j)*x[2]
            ref[(2, 0, 1)]+=(0.0253295594529-0.401993620606j)*x_ref[2]
            arg[(2, 0, 2)]+=(0.409276180028-0.0616687416142j)*x[2]
            ref[(2, 0, 2)]+=(0.409276180028-0.0616687416142j)*x_ref[2]
            arg[(2, 0, 3)]+=(0.86280649997+0.573463209484j)*x[2]
            ref[(2, 0, 3)]+=(0.86280649997+0.573463209484j)*x_ref[2]
            arg[(2, 1, 0)]+=(-0.778877694763-0.0390757827405j)*x[2]
            ref[(2, 1, 0)]+=(-0.778877694763-0.0390757827405j)*x_ref[2]
            arg[(2, 1, 1)]+=(0.534563914684+0.0370741338532j)*x[2]
            ref[(2, 1, 1)]+=(0.534563914684+0.0370741338532j)*x_ref[2]
            arg[(2, 1, 2)]+=(-0.68117077421+0.751637500829j)*x[2]
            ref[(2, 1, 2)]+=(-0.68117077421+0.751637500829j)*x_ref[2]
            arg[(2, 1, 3)]+=(0.433432151617+0.48808929424j)*x[2]
            ref[(2, 1, 3)]+=(0.433432151617+0.48808929424j)*x_ref[2]
            arg[(3, 0, 0)]+=(0.947997437571-0.205232565817j)*x[2]
            ref[(3, 0, 0)]+=(0.947997437571-0.205232565817j)*x_ref[2]
            arg[(3, 0, 1)]+=(-0.950716418275+0.0512023511568j)*x[2]
            ref[(3, 0, 1)]+=(-0.950716418275+0.0512023511568j)*x_ref[2]
            arg[(3, 0, 2)]+=(0.21085891098-0.374327547392j)*x[2]
            ref[(3, 0, 2)]+=(0.21085891098-0.374327547392j)*x_ref[2]
            arg[(3, 0, 3)]+=(0.364653792758-0.201832405197j)*x[2]
            ref[(3, 0, 3)]+=(0.364653792758-0.201832405197j)*x_ref[2]
            arg[(3, 1, 0)]+=(-0.649298703149-0.630528747268j)*x[2]
            ref[(3, 1, 0)]+=(-0.649298703149-0.630528747268j)*x_ref[2]
            arg[(3, 1, 1)]+=(-0.871133730679-0.79747735877j)*x[2]
            ref[(3, 1, 1)]+=(-0.871133730679-0.79747735877j)*x_ref[2]
            arg[(3, 1, 2)]+=(-0.203113681376-0.579223495241j)*x[2]
            ref[(3, 1, 2)]+=(-0.203113681376-0.579223495241j)*x_ref[2]
            arg[(3, 1, 3)]+=(-0.924221158707-0.871372340559j)*x[2]
            ref[(3, 1, 3)]+=(-0.924221158707-0.871372340559j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedContinuousFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 2, 3),w)
        ref = Data(0,(2, 2, 2, 3),w_ref)
        arg[(0, 0, 0, 0)]=(0.0224878922466-0.121350220228j)*x[0] + ((-0.26564052764-0.885139062914j))*x[1]
        ref[(0, 0, 0, 0)]=(0.0224878922466-0.121350220228j)*x_ref[0] + ((-0.26564052764-0.885139062914j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(0.979674504613-0.708313551276j)*x[0] + ((-0.123280225308-0.0783468179516j))*x[1]
        ref[(0, 0, 0, 1)]=(0.979674504613-0.708313551276j)*x_ref[0] + ((-0.123280225308-0.0783468179516j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.497863586103-0.362446692231j)*x[0] + ((0.666372335057-0.188779476481j))*x[1]
        ref[(0, 0, 0, 2)]=(0.497863586103-0.362446692231j)*x_ref[0] + ((0.666372335057-0.188779476481j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.161811289251-0.429573742349j)*x[0] + ((0.42939071739+0.842778702483j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.161811289251-0.429573742349j)*x_ref[0] + ((0.42939071739+0.842778702483j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.234723419773+0.201794271458j)*x[0] + ((-0.348430788674+0.207810227054j))*x[1]
        ref[(0, 0, 1, 1)]=(0.234723419773+0.201794271458j)*x_ref[0] + ((-0.348430788674+0.207810227054j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(-0.617501115004+0.977626471554j)*x[0] + ((0.938151633273-0.231438944797j))*x[1]
        ref[(0, 0, 1, 2)]=(-0.617501115004+0.977626471554j)*x_ref[0] + ((0.938151633273-0.231438944797j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(-0.982252440269+0.354015979355j)*x[0] + ((-0.524597786338+0.240627176331j))*x[1]
        ref[(0, 1, 0, 0)]=(-0.982252440269+0.354015979355j)*x_ref[0] + ((-0.524597786338+0.240627176331j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.281480613355-0.883334202354j)*x[0] + ((0.758386128034+0.00890235396951j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.281480613355-0.883334202354j)*x_ref[0] + ((0.758386128034+0.00890235396951j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(-0.944143450759-0.473811633485j)*x[0] + ((0.0128818528788-0.71181554746j))*x[1]
        ref[(0, 1, 0, 2)]=(-0.944143450759-0.473811633485j)*x_ref[0] + ((0.0128818528788-0.71181554746j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.171636114966-0.975172677528j)*x[0] + ((0.414049441723-0.330188369283j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.171636114966-0.975172677528j)*x_ref[0] + ((0.414049441723-0.330188369283j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.469414067291-0.485686723299j)*x[0] + ((-0.0369510601086+0.408790021933j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.469414067291-0.485686723299j)*x_ref[0] + ((-0.0369510601086+0.408790021933j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(0.400189360917-0.785350056501j)*x[0] + ((-0.296346715944-0.115352872j))*x[1]
        ref[(0, 1, 1, 2)]=(0.400189360917-0.785350056501j)*x_ref[0] + ((-0.296346715944-0.115352872j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.385721948638+0.627220350404j)*x[0] + ((-0.348798270365+0.675500623687j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.385721948638+0.627220350404j)*x_ref[0] + ((-0.348798270365+0.675500623687j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.446097420292+0.630958735192j)*x[0] + ((0.75731229112+0.661192720297j))*x[1]
        ref[(1, 0, 0, 1)]=(0.446097420292+0.630958735192j)*x_ref[0] + ((0.75731229112+0.661192720297j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(-0.528898024532-0.181592292666j)*x[0] + ((-0.541482164107-0.901098138058j))*x[1]
        ref[(1, 0, 0, 2)]=(-0.528898024532-0.181592292666j)*x_ref[0] + ((-0.541482164107-0.901098138058j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.0443006511072-0.896701269093j)*x[0] + ((-0.194819702603+0.146974618823j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.0443006511072-0.896701269093j)*x_ref[0] + ((-0.194819702603+0.146974618823j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.679774066518+0.726185870651j)*x[0] + ((-0.587643512719+0.123535938119j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.679774066518+0.726185870651j)*x_ref[0] + ((-0.587643512719+0.123535938119j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(-0.938281021807-0.407440238164j)*x[0] + ((-0.0298257872683-0.482096405892j))*x[1]
        ref[(1, 0, 1, 2)]=(-0.938281021807-0.407440238164j)*x_ref[0] + ((-0.0298257872683-0.482096405892j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.21398854367+0.927333315729j)*x[0] + ((-0.855907491254-0.28518724555j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.21398854367+0.927333315729j)*x_ref[0] + ((-0.855907491254-0.28518724555j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.517760987745+0.205788792924j)*x[0] + ((-0.42265007118+0.739649291311j))*x[1]
        ref[(1, 1, 0, 1)]=(0.517760987745+0.205788792924j)*x_ref[0] + ((-0.42265007118+0.739649291311j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(0.759459250773-0.919618839265j)*x[0] + ((0.649342174157+0.069259558016j))*x[1]
        ref[(1, 1, 0, 2)]=(0.759459250773-0.919618839265j)*x_ref[0] + ((0.649342174157+0.069259558016j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.283820867183+0.604337731541j)*x[0] + ((0.0940007671655-0.016858895578j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.283820867183+0.604337731541j)*x_ref[0] + ((0.0940007671655-0.016858895578j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.320832473641-0.334919969383j)*x[0] + ((-0.540314992385+0.633119124646j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.320832473641-0.334919969383j)*x_ref[0] + ((-0.540314992385+0.633119124646j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(-0.678888818337-0.824104677162j)*x[0] + ((0.132680100769+0.0920257760998j))*x[1]
        ref[(1, 1, 1, 2)]=(-0.678888818337-0.824104677162j)*x_ref[0] + ((0.132680100769+0.0920257760998j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.826727610548-0.4517691722j)*x[2]
            ref[(0, 0, 0, 0)]+=(0.826727610548-0.4517691722j)*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.527789988634-0.448191342633j)*x[2]
            ref[(0, 0, 0, 1)]+=(-0.527789988634-0.448191342633j)*x_ref[2]
            arg[(0, 0, 0, 2)]+=(0.684033568108+0.963898963714j)*x[2]
            ref[(0, 0, 0, 2)]+=(0.684033568108+0.963898963714j)*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.228276468533-0.969744435452j)*x[2]
            ref[(0, 0, 1, 0)]+=(-0.228276468533-0.969744435452j)*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.851262772914+0.891336866004j)*x[2]
            ref[(0, 0, 1, 1)]+=(-0.851262772914+0.891336866004j)*x_ref[2]
            arg[(0, 0, 1, 2)]+=(0.20993793646+0.793841457173j)*x[2]
            ref[(0, 0, 1, 2)]+=(0.20993793646+0.793841457173j)*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.846164621098+0.741959339488j)*x[2]
            ref[(0, 1, 0, 0)]+=(0.846164621098+0.741959339488j)*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.656203620887-0.91619106196j)*x[2]
            ref[(0, 1, 0, 1)]+=(0.656203620887-0.91619106196j)*x_ref[2]
            arg[(0, 1, 0, 2)]+=(-0.859759549669+0.507095235984j)*x[2]
            ref[(0, 1, 0, 2)]+=(-0.859759549669+0.507095235984j)*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.416219399396-0.289932889143j)*x[2]
            ref[(0, 1, 1, 0)]+=(0.416219399396-0.289932889143j)*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.41208719865-0.0558623204473j)*x[2]
            ref[(0, 1, 1, 1)]+=(-0.41208719865-0.0558623204473j)*x_ref[2]
            arg[(0, 1, 1, 2)]+=(0.446904274612-0.847534522648j)*x[2]
            ref[(0, 1, 1, 2)]+=(0.446904274612-0.847534522648j)*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.234822027601-0.697125555677j)*x[2]
            ref[(1, 0, 0, 0)]+=(0.234822027601-0.697125555677j)*x_ref[2]
            arg[(1, 0, 0, 1)]+=(-0.702382702299+0.809506488691j)*x[2]
            ref[(1, 0, 0, 1)]+=(-0.702382702299+0.809506488691j)*x_ref[2]
            arg[(1, 0, 0, 2)]+=(-0.196764596368-0.115087232318j)*x[2]
            ref[(1, 0, 0, 2)]+=(-0.196764596368-0.115087232318j)*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.758868827089-0.973310857141j)*x[2]
            ref[(1, 0, 1, 0)]+=(-0.758868827089-0.973310857141j)*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.474409523553+0.470672113587j)*x[2]
            ref[(1, 0, 1, 1)]+=(0.474409523553+0.470672113587j)*x_ref[2]
            arg[(1, 0, 1, 2)]+=(0.734837698918-0.822129510773j)*x[2]
            ref[(1, 0, 1, 2)]+=(0.734837698918-0.822129510773j)*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.0940924089272-0.927309024154j)*x[2]
            ref[(1, 1, 0, 0)]+=(-0.0940924089272-0.927309024154j)*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.897615267115+0.802171263192j)*x[2]
            ref[(1, 1, 0, 1)]+=(0.897615267115+0.802171263192j)*x_ref[2]
            arg[(1, 1, 0, 2)]+=(-0.169589803285+0.726516874427j)*x[2]
            ref[(1, 1, 0, 2)]+=(-0.169589803285+0.726516874427j)*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.000361587949435-0.500070933952j)*x[2]
            ref[(1, 1, 1, 0)]+=(0.000361587949435-0.500070933952j)*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.650718500114+0.951594465465j)*x[2]
            ref[(1, 1, 1, 1)]+=(0.650718500114+0.951594465465j)*x_ref[2]
            arg[(1, 1, 1, 2)]+=(-0.751471284286-0.00453885398975j)*x[2]
            ref[(1, 1, 1, 2)]+=(-0.751471284286-0.00453885398975j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.841892344112*x[0]**o + (-0.468663082674)*x[0] + (-0.702309346117)*x[1]**o + (0.0493969001699)*x[1]
        ref=-0.841892344112*x_ref[0]**o + (-0.468663082674)*x_ref[0] + (-0.702309346117)*x_ref[1]**o + (0.0493969001699)*x_ref[1]
        if dim==3:
            arg+=(-0.428254389586)*x[2]**o + (-0.889621064389)*x[2]
            ref+=(-0.428254389586)*x_ref[2]**o + (-0.889621064389)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=0.440872643011*x[0]**o + (0.925523924193)*x[0] + (0.209057246698)*x[1]**o + (-0.781605067898)*x[1]
        ref[(0,)]=0.440872643011*x_ref[0]**o + (0.925523924193)*x_ref[0] + (0.209057246698)*x_ref[1]**o + (-0.781605067898)*x_ref[1]
        arg[(1,)]=0.890620779526*x[0]**o + (-0.504976096642)*x[0] + (0.854356265008)*x[1]**o + (0.177479934785)*x[1]
        ref[(1,)]=0.890620779526*x_ref[0]**o + (-0.504976096642)*x_ref[0] + (0.854356265008)*x_ref[1]**o + (0.177479934785)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.126093497877*x[2]**o + (0.348493965832)*x[2]
            ref[(0,)]+=0.126093497877*x_ref[2]**o + (0.348493965832)*x_ref[2]
            arg[(1,)]+=-0.261393183499*x[2]**o + (0.913646900496)*x[2]
            ref[(1,)]+=-0.261393183499*x_ref[2]**o + (0.913646900496)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref = Data(0,(2, 2),w_ref)
        arg[(0, 0)]=-0.783659726819*x[0]**o + (0.13227183666)*x[0] + (0.710865995556)*x[1]**o + (0.491656031622)*x[1]
        ref[(0, 0)]=-0.783659726819*x_ref[0]**o + (0.13227183666)*x_ref[0] + (0.710865995556)*x_ref[1]**o + (0.491656031622)*x_ref[1]
        arg[(0, 1)]=0.57743820119*x[0]**o + (-0.928705253705)*x[0] + (0.109099508499)*x[1]**o + (0.173844038618)*x[1]
        ref[(0, 1)]=0.57743820119*x_ref[0]**o + (-0.928705253705)*x_ref[0] + (0.109099508499)*x_ref[1]**o + (0.173844038618)*x_ref[1]
        arg[(1, 0)]=0.547911391737*x[0]**o + (-0.812646540955)*x[0] + (0.659167191412)*x[1]**o + (0.706019153662)*x[1]
        ref[(1, 0)]=0.547911391737*x_ref[0]**o + (-0.812646540955)*x_ref[0] + (0.659167191412)*x_ref[1]**o + (0.706019153662)*x_ref[1]
        arg[(1, 1)]=0.857803357125*x[0]**o + (-0.856575019595)*x[0] + (-0.400819602093)*x[1]**o + (0.197541938199)*x[1]
        ref[(1, 1)]=0.857803357125*x_ref[0]**o + (-0.856575019595)*x_ref[0] + (-0.400819602093)*x_ref[1]**o + (0.197541938199)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.497241166737*x[2]**o + (0.574161488964)*x[2]
            ref[(0, 0)]+=-0.497241166737*x_ref[2]**o + (0.574161488964)*x_ref[2]
            arg[(0, 1)]+=0.614372922535*x[2]**o + (-0.157127049332)*x[2]
            ref[(0, 1)]+=0.614372922535*x_ref[2]**o + (-0.157127049332)*x_ref[2]
            arg[(1, 0)]+=-0.656813712123*x[2]**o + (-0.498271505313)*x[2]
            ref[(1, 0)]+=-0.656813712123*x_ref[2]**o + (-0.498271505313)*x_ref[2]
            arg[(1, 1)]+=0.675830765704*x[2]**o + (0.829617789092)*x[2]
            ref[(1, 1)]+=0.675830765704*x_ref[2]**o + (0.829617789092)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 4),w)
        ref = Data(0,(4, 4, 4),w_ref)
        arg[(0, 0, 0)]=-0.320747056597*x[0]**o + (0.582948270103)*x[0] + (-0.942557579728)*x[1]**o + (0.47587041139)*x[1]
        ref[(0, 0, 0)]=-0.320747056597*x_ref[0]**o + (0.582948270103)*x_ref[0] + (-0.942557579728)*x_ref[1]**o + (0.47587041139)*x_ref[1]
        arg[(0, 0, 1)]=-0.426459554791*x[0]**o + (-0.036860532879)*x[0] + (-0.784311841698)*x[1]**o + (-0.727613672526)*x[1]
        ref[(0, 0, 1)]=-0.426459554791*x_ref[0]**o + (-0.036860532879)*x_ref[0] + (-0.784311841698)*x_ref[1]**o + (-0.727613672526)*x_ref[1]
        arg[(0, 0, 2)]=-0.269853137476*x[0]**o + (-0.0579615713961)*x[0] + (0.174884144189)*x[1]**o + (0.983325951142)*x[1]
        ref[(0, 0, 2)]=-0.269853137476*x_ref[0]**o + (-0.0579615713961)*x_ref[0] + (0.174884144189)*x_ref[1]**o + (0.983325951142)*x_ref[1]
        arg[(0, 0, 3)]=-0.627940434834*x[0]**o + (0.85396028872)*x[0] + (-0.730791645233)*x[1]**o + (-0.144938586544)*x[1]
        ref[(0, 0, 3)]=-0.627940434834*x_ref[0]**o + (0.85396028872)*x_ref[0] + (-0.730791645233)*x_ref[1]**o + (-0.144938586544)*x_ref[1]
        arg[(0, 1, 0)]=-0.334748726417*x[0]**o + (-0.973571024117)*x[0] + (-0.474968121856)*x[1]**o + (-0.855659156407)*x[1]
        ref[(0, 1, 0)]=-0.334748726417*x_ref[0]**o + (-0.973571024117)*x_ref[0] + (-0.474968121856)*x_ref[1]**o + (-0.855659156407)*x_ref[1]
        arg[(0, 1, 1)]=0.554224657862*x[0]**o + (-0.356982248535)*x[0] + (0.0149015381341)*x[1]**o + (-0.530113530114)*x[1]
        ref[(0, 1, 1)]=0.554224657862*x_ref[0]**o + (-0.356982248535)*x_ref[0] + (0.0149015381341)*x_ref[1]**o + (-0.530113530114)*x_ref[1]
        arg[(0, 1, 2)]=-0.17120585143*x[0]**o + (-0.582921204435)*x[0] + (-0.978582328032)*x[1]**o + (-0.13818797388)*x[1]
        ref[(0, 1, 2)]=-0.17120585143*x_ref[0]**o + (-0.582921204435)*x_ref[0] + (-0.978582328032)*x_ref[1]**o + (-0.13818797388)*x_ref[1]
        arg[(0, 1, 3)]=-0.999676092007*x[0]**o + (-0.0270632354339)*x[0] + (0.542007769492)*x[1]**o + (-0.655622913834)*x[1]
        ref[(0, 1, 3)]=-0.999676092007*x_ref[0]**o + (-0.0270632354339)*x_ref[0] + (0.542007769492)*x_ref[1]**o + (-0.655622913834)*x_ref[1]
        arg[(0, 2, 0)]=0.903686504184*x[0]**o + (-0.548052655497)*x[0] + (0.240720541672)*x[1]**o + (-0.356403270335)*x[1]
        ref[(0, 2, 0)]=0.903686504184*x_ref[0]**o + (-0.548052655497)*x_ref[0] + (0.240720541672)*x_ref[1]**o + (-0.356403270335)*x_ref[1]
        arg[(0, 2, 1)]=-0.846480977183*x[0]**o + (0.803218668252)*x[0] + (-0.550681028652)*x[1]**o + (0.781071839774)*x[1]
        ref[(0, 2, 1)]=-0.846480977183*x_ref[0]**o + (0.803218668252)*x_ref[0] + (-0.550681028652)*x_ref[1]**o + (0.781071839774)*x_ref[1]
        arg[(0, 2, 2)]=-0.991059358467*x[0]**o + (0.839381543006)*x[0] + (-0.0317427393445)*x[1]**o + (0.472958179939)*x[1]
        ref[(0, 2, 2)]=-0.991059358467*x_ref[0]**o + (0.839381543006)*x_ref[0] + (-0.0317427393445)*x_ref[1]**o + (0.472958179939)*x_ref[1]
        arg[(0, 2, 3)]=-0.863873342683*x[0]**o + (0.182669181337)*x[0] + (0.953311873118)*x[1]**o + (0.105319496291)*x[1]
        ref[(0, 2, 3)]=-0.863873342683*x_ref[0]**o + (0.182669181337)*x_ref[0] + (0.953311873118)*x_ref[1]**o + (0.105319496291)*x_ref[1]
        arg[(0, 3, 0)]=0.851126273558*x[0]**o + (-0.167622803257)*x[0] + (-0.229774876653)*x[1]**o + (-0.264798321232)*x[1]
        ref[(0, 3, 0)]=0.851126273558*x_ref[0]**o + (-0.167622803257)*x_ref[0] + (-0.229774876653)*x_ref[1]**o + (-0.264798321232)*x_ref[1]
        arg[(0, 3, 1)]=0.845948698127*x[0]**o + (-0.78926549608)*x[0] + (0.0864161675439)*x[1]**o + (-0.446330651171)*x[1]
        ref[(0, 3, 1)]=0.845948698127*x_ref[0]**o + (-0.78926549608)*x_ref[0] + (0.0864161675439)*x_ref[1]**o + (-0.446330651171)*x_ref[1]
        arg[(0, 3, 2)]=-0.148851349062*x[0]**o + (0.459725579043)*x[0] + (0.13038531931)*x[1]**o + (-0.714515077808)*x[1]
        ref[(0, 3, 2)]=-0.148851349062*x_ref[0]**o + (0.459725579043)*x_ref[0] + (0.13038531931)*x_ref[1]**o + (-0.714515077808)*x_ref[1]
        arg[(0, 3, 3)]=0.451399334457*x[0]**o + (0.555311780942)*x[0] + (-0.978147939321)*x[1]**o + (-0.444547977644)*x[1]
        ref[(0, 3, 3)]=0.451399334457*x_ref[0]**o + (0.555311780942)*x_ref[0] + (-0.978147939321)*x_ref[1]**o + (-0.444547977644)*x_ref[1]
        arg[(1, 0, 0)]=-0.160247303078*x[0]**o + (0.673939563974)*x[0] + (0.0627488614072)*x[1]**o + (-0.543920524152)*x[1]
        ref[(1, 0, 0)]=-0.160247303078*x_ref[0]**o + (0.673939563974)*x_ref[0] + (0.0627488614072)*x_ref[1]**o + (-0.543920524152)*x_ref[1]
        arg[(1, 0, 1)]=-0.283956867385*x[0]**o + (0.566691324517)*x[0] + (-0.350350613404)*x[1]**o + (-0.807891177891)*x[1]
        ref[(1, 0, 1)]=-0.283956867385*x_ref[0]**o + (0.566691324517)*x_ref[0] + (-0.350350613404)*x_ref[1]**o + (-0.807891177891)*x_ref[1]
        arg[(1, 0, 2)]=-0.086576150131*x[0]**o + (0.401264893135)*x[0] + (0.496043585268)*x[1]**o + (-0.314443957378)*x[1]
        ref[(1, 0, 2)]=-0.086576150131*x_ref[0]**o + (0.401264893135)*x_ref[0] + (0.496043585268)*x_ref[1]**o + (-0.314443957378)*x_ref[1]
        arg[(1, 0, 3)]=-0.27821567857*x[0]**o + (0.619276376817)*x[0] + (0.212542886223)*x[1]**o + (-0.29481160323)*x[1]
        ref[(1, 0, 3)]=-0.27821567857*x_ref[0]**o + (0.619276376817)*x_ref[0] + (0.212542886223)*x_ref[1]**o + (-0.29481160323)*x_ref[1]
        arg[(1, 1, 0)]=0.0903517253057*x[0]**o + (0.0776491645752)*x[0] + (-0.193038938848)*x[1]**o + (0.874396546183)*x[1]
        ref[(1, 1, 0)]=0.0903517253057*x_ref[0]**o + (0.0776491645752)*x_ref[0] + (-0.193038938848)*x_ref[1]**o + (0.874396546183)*x_ref[1]
        arg[(1, 1, 1)]=-0.628790515288*x[0]**o + (-0.91778767043)*x[0] + (0.164703089468)*x[1]**o + (-0.178826156951)*x[1]
        ref[(1, 1, 1)]=-0.628790515288*x_ref[0]**o + (-0.91778767043)*x_ref[0] + (0.164703089468)*x_ref[1]**o + (-0.178826156951)*x_ref[1]
        arg[(1, 1, 2)]=-0.633194656374*x[0]**o + (-0.827978041557)*x[0] + (-0.446857675575)*x[1]**o + (-0.889207731575)*x[1]
        ref[(1, 1, 2)]=-0.633194656374*x_ref[0]**o + (-0.827978041557)*x_ref[0] + (-0.446857675575)*x_ref[1]**o + (-0.889207731575)*x_ref[1]
        arg[(1, 1, 3)]=-0.427490515797*x[0]**o + (-0.808760655658)*x[0] + (0.687623703054)*x[1]**o + (-0.158755509243)*x[1]
        ref[(1, 1, 3)]=-0.427490515797*x_ref[0]**o + (-0.808760655658)*x_ref[0] + (0.687623703054)*x_ref[1]**o + (-0.158755509243)*x_ref[1]
        arg[(1, 2, 0)]=-0.72448406068*x[0]**o + (0.956154579182)*x[0] + (-0.0815199961296)*x[1]**o + (-0.798899902553)*x[1]
        ref[(1, 2, 0)]=-0.72448406068*x_ref[0]**o + (0.956154579182)*x_ref[0] + (-0.0815199961296)*x_ref[1]**o + (-0.798899902553)*x_ref[1]
        arg[(1, 2, 1)]=0.694876305928*x[0]**o + (-0.598419608287)*x[0] + (-0.305145991196)*x[1]**o + (0.599554147133)*x[1]
        ref[(1, 2, 1)]=0.694876305928*x_ref[0]**o + (-0.598419608287)*x_ref[0] + (-0.305145991196)*x_ref[1]**o + (0.599554147133)*x_ref[1]
        arg[(1, 2, 2)]=-0.346592538489*x[0]**o + (0.858997530233)*x[0] + (-0.256820369789)*x[1]**o + (0.553721682033)*x[1]
        ref[(1, 2, 2)]=-0.346592538489*x_ref[0]**o + (0.858997530233)*x_ref[0] + (-0.256820369789)*x_ref[1]**o + (0.553721682033)*x_ref[1]
        arg[(1, 2, 3)]=0.212288150389*x[0]**o + (0.562784612484)*x[0] + (-0.768387025061)*x[1]**o + (-0.69865720064)*x[1]
        ref[(1, 2, 3)]=0.212288150389*x_ref[0]**o + (0.562784612484)*x_ref[0] + (-0.768387025061)*x_ref[1]**o + (-0.69865720064)*x_ref[1]
        arg[(1, 3, 0)]=-0.755677319683*x[0]**o + (-0.643595136418)*x[0] + (-0.971636830069)*x[1]**o + (0.258774898416)*x[1]
        ref[(1, 3, 0)]=-0.755677319683*x_ref[0]**o + (-0.643595136418)*x_ref[0] + (-0.971636830069)*x_ref[1]**o + (0.258774898416)*x_ref[1]
        arg[(1, 3, 1)]=-0.377159134744*x[0]**o + (-0.321099806592)*x[0] + (-0.167724874229)*x[1]**o + (-0.355653946235)*x[1]
        ref[(1, 3, 1)]=-0.377159134744*x_ref[0]**o + (-0.321099806592)*x_ref[0] + (-0.167724874229)*x_ref[1]**o + (-0.355653946235)*x_ref[1]
        arg[(1, 3, 2)]=0.142589539215*x[0]**o + (0.659659239431)*x[0] + (0.462368255239)*x[1]**o + (-0.12766256441)*x[1]
        ref[(1, 3, 2)]=0.142589539215*x_ref[0]**o + (0.659659239431)*x_ref[0] + (0.462368255239)*x_ref[1]**o + (-0.12766256441)*x_ref[1]
        arg[(1, 3, 3)]=-0.797208048484*x[0]**o + (0.74202057474)*x[0] + (0.217900565149)*x[1]**o + (-0.545905786221)*x[1]
        ref[(1, 3, 3)]=-0.797208048484*x_ref[0]**o + (0.74202057474)*x_ref[0] + (0.217900565149)*x_ref[1]**o + (-0.545905786221)*x_ref[1]
        arg[(2, 0, 0)]=0.565003965618*x[0]**o + (-0.77410816312)*x[0] + (0.115800036151)*x[1]**o + (0.0812080986444)*x[1]
        ref[(2, 0, 0)]=0.565003965618*x_ref[0]**o + (-0.77410816312)*x_ref[0] + (0.115800036151)*x_ref[1]**o + (0.0812080986444)*x_ref[1]
        arg[(2, 0, 1)]=-0.645923023165*x[0]**o + (-0.242094307771)*x[0] + (0.597572998083)*x[1]**o + (0.559411672377)*x[1]
        ref[(2, 0, 1)]=-0.645923023165*x_ref[0]**o + (-0.242094307771)*x_ref[0] + (0.597572998083)*x_ref[1]**o + (0.559411672377)*x_ref[1]
        arg[(2, 0, 2)]=-0.877074258395*x[0]**o + (-0.874436545159)*x[0] + (-0.186428282506)*x[1]**o + (-0.881797385789)*x[1]
        ref[(2, 0, 2)]=-0.877074258395*x_ref[0]**o + (-0.874436545159)*x_ref[0] + (-0.186428282506)*x_ref[1]**o + (-0.881797385789)*x_ref[1]
        arg[(2, 0, 3)]=0.00348208135781*x[0]**o + (-0.597029653195)*x[0] + (0.945117626536)*x[1]**o + (-0.160747764433)*x[1]
        ref[(2, 0, 3)]=0.00348208135781*x_ref[0]**o + (-0.597029653195)*x_ref[0] + (0.945117626536)*x_ref[1]**o + (-0.160747764433)*x_ref[1]
        arg[(2, 1, 0)]=0.377901959194*x[0]**o + (0.976422927699)*x[0] + (0.864336633172)*x[1]**o + (-0.60605012316)*x[1]
        ref[(2, 1, 0)]=0.377901959194*x_ref[0]**o + (0.976422927699)*x_ref[0] + (0.864336633172)*x_ref[1]**o + (-0.60605012316)*x_ref[1]
        arg[(2, 1, 1)]=0.369635824225*x[0]**o + (0.0542723390782)*x[0] + (0.749290824039)*x[1]**o + (0.911355181276)*x[1]
        ref[(2, 1, 1)]=0.369635824225*x_ref[0]**o + (0.0542723390782)*x_ref[0] + (0.749290824039)*x_ref[1]**o + (0.911355181276)*x_ref[1]
        arg[(2, 1, 2)]=0.455164618649*x[0]**o + (-0.142239218833)*x[0] + (0.484813373308)*x[1]**o + (0.423160513055)*x[1]
        ref[(2, 1, 2)]=0.455164618649*x_ref[0]**o + (-0.142239218833)*x_ref[0] + (0.484813373308)*x_ref[1]**o + (0.423160513055)*x_ref[1]
        arg[(2, 1, 3)]=-0.998381348932*x[0]**o + (-0.148669871288)*x[0] + (-0.594557858108)*x[1]**o + (0.478086804281)*x[1]
        ref[(2, 1, 3)]=-0.998381348932*x_ref[0]**o + (-0.148669871288)*x_ref[0] + (-0.594557858108)*x_ref[1]**o + (0.478086804281)*x_ref[1]
        arg[(2, 2, 0)]=0.868483373941*x[0]**o + (-0.692731817276)*x[0] + (-0.842042057724)*x[1]**o + (0.200485476543)*x[1]
        ref[(2, 2, 0)]=0.868483373941*x_ref[0]**o + (-0.692731817276)*x_ref[0] + (-0.842042057724)*x_ref[1]**o + (0.200485476543)*x_ref[1]
        arg[(2, 2, 1)]=-0.776579244212*x[0]**o + (0.99201508453)*x[0] + (0.50052274184)*x[1]**o + (0.204718560407)*x[1]
        ref[(2, 2, 1)]=-0.776579244212*x_ref[0]**o + (0.99201508453)*x_ref[0] + (0.50052274184)*x_ref[1]**o + (0.204718560407)*x_ref[1]
        arg[(2, 2, 2)]=-0.487725999822*x[0]**o + (-0.95700986292)*x[0] + (-0.323912564285)*x[1]**o + (0.467456345959)*x[1]
        ref[(2, 2, 2)]=-0.487725999822*x_ref[0]**o + (-0.95700986292)*x_ref[0] + (-0.323912564285)*x_ref[1]**o + (0.467456345959)*x_ref[1]
        arg[(2, 2, 3)]=0.610154341239*x[0]**o + (-0.12358867588)*x[0] + (0.112871288728)*x[1]**o + (0.56324181502)*x[1]
        ref[(2, 2, 3)]=0.610154341239*x_ref[0]**o + (-0.12358867588)*x_ref[0] + (0.112871288728)*x_ref[1]**o + (0.56324181502)*x_ref[1]
        arg[(2, 3, 0)]=-0.243780624206*x[0]**o + (0.203890789481)*x[0] + (0.325446978644)*x[1]**o + (0.507812290108)*x[1]
        ref[(2, 3, 0)]=-0.243780624206*x_ref[0]**o + (0.203890789481)*x_ref[0] + (0.325446978644)*x_ref[1]**o + (0.507812290108)*x_ref[1]
        arg[(2, 3, 1)]=0.488089388406*x[0]**o + (-0.0528573169958)*x[0] + (-0.08048913828)*x[1]**o + (0.465697565616)*x[1]
        ref[(2, 3, 1)]=0.488089388406*x_ref[0]**o + (-0.0528573169958)*x_ref[0] + (-0.08048913828)*x_ref[1]**o + (0.465697565616)*x_ref[1]
        arg[(2, 3, 2)]=0.323284797205*x[0]**o + (-0.237368088495)*x[0] + (0.224880992832)*x[1]**o + (0.189175923708)*x[1]
        ref[(2, 3, 2)]=0.323284797205*x_ref[0]**o + (-0.237368088495)*x_ref[0] + (0.224880992832)*x_ref[1]**o + (0.189175923708)*x_ref[1]
        arg[(2, 3, 3)]=0.154658471981*x[0]**o + (0.167435173537)*x[0] + (-0.0402920025486)*x[1]**o + (-0.184461864389)*x[1]
        ref[(2, 3, 3)]=0.154658471981*x_ref[0]**o + (0.167435173537)*x_ref[0] + (-0.0402920025486)*x_ref[1]**o + (-0.184461864389)*x_ref[1]
        arg[(3, 0, 0)]=-0.990824930966*x[0]**o + (-0.0770406996512)*x[0] + (-0.831220195549)*x[1]**o + (0.297427553539)*x[1]
        ref[(3, 0, 0)]=-0.990824930966*x_ref[0]**o + (-0.0770406996512)*x_ref[0] + (-0.831220195549)*x_ref[1]**o + (0.297427553539)*x_ref[1]
        arg[(3, 0, 1)]=0.41249732502*x[0]**o + (0.760138507665)*x[0] + (-0.777951646586)*x[1]**o + (0.788276787328)*x[1]
        ref[(3, 0, 1)]=0.41249732502*x_ref[0]**o + (0.760138507665)*x_ref[0] + (-0.777951646586)*x_ref[1]**o + (0.788276787328)*x_ref[1]
        arg[(3, 0, 2)]=-0.877375699407*x[0]**o + (0.705701408516)*x[0] + (0.464018886291)*x[1]**o + (-0.923272426418)*x[1]
        ref[(3, 0, 2)]=-0.877375699407*x_ref[0]**o + (0.705701408516)*x_ref[0] + (0.464018886291)*x_ref[1]**o + (-0.923272426418)*x_ref[1]
        arg[(3, 0, 3)]=0.471191945156*x[0]**o + (-0.36606371817)*x[0] + (-0.853599783219)*x[1]**o + (-0.124525589645)*x[1]
        ref[(3, 0, 3)]=0.471191945156*x_ref[0]**o + (-0.36606371817)*x_ref[0] + (-0.853599783219)*x_ref[1]**o + (-0.124525589645)*x_ref[1]
        arg[(3, 1, 0)]=-0.670508393205*x[0]**o + (-0.0331221448647)*x[0] + (-0.915488108116)*x[1]**o + (-0.542806327406)*x[1]
        ref[(3, 1, 0)]=-0.670508393205*x_ref[0]**o + (-0.0331221448647)*x_ref[0] + (-0.915488108116)*x_ref[1]**o + (-0.542806327406)*x_ref[1]
        arg[(3, 1, 1)]=0.101399754332*x[0]**o + (0.758053312806)*x[0] + (0.311413658954)*x[1]**o + (-0.156014383001)*x[1]
        ref[(3, 1, 1)]=0.101399754332*x_ref[0]**o + (0.758053312806)*x_ref[0] + (0.311413658954)*x_ref[1]**o + (-0.156014383001)*x_ref[1]
        arg[(3, 1, 2)]=0.442981231389*x[0]**o + (0.129626954531)*x[0] + (-0.978860188116)*x[1]**o + (0.470454683358)*x[1]
        ref[(3, 1, 2)]=0.442981231389*x_ref[0]**o + (0.129626954531)*x_ref[0] + (-0.978860188116)*x_ref[1]**o + (0.470454683358)*x_ref[1]
        arg[(3, 1, 3)]=0.990640152664*x[0]**o + (0.00608426985176)*x[0] + (0.126576565553)*x[1]**o + (-0.375535967924)*x[1]
        ref[(3, 1, 3)]=0.990640152664*x_ref[0]**o + (0.00608426985176)*x_ref[0] + (0.126576565553)*x_ref[1]**o + (-0.375535967924)*x_ref[1]
        arg[(3, 2, 0)]=0.8184976817*x[0]**o + (0.816990505376)*x[0] + (0.0179527412992)*x[1]**o + (0.649953834757)*x[1]
        ref[(3, 2, 0)]=0.8184976817*x_ref[0]**o + (0.816990505376)*x_ref[0] + (0.0179527412992)*x_ref[1]**o + (0.649953834757)*x_ref[1]
        arg[(3, 2, 1)]=-0.247462933535*x[0]**o + (-0.981314955741)*x[0] + (0.839808493471)*x[1]**o + (0.607354475541)*x[1]
        ref[(3, 2, 1)]=-0.247462933535*x_ref[0]**o + (-0.981314955741)*x_ref[0] + (0.839808493471)*x_ref[1]**o + (0.607354475541)*x_ref[1]
        arg[(3, 2, 2)]=-0.237402267441*x[0]**o + (0.859825681429)*x[0] + (-0.562474809315)*x[1]**o + (0.726574615752)*x[1]
        ref[(3, 2, 2)]=-0.237402267441*x_ref[0]**o + (0.859825681429)*x_ref[0] + (-0.562474809315)*x_ref[1]**o + (0.726574615752)*x_ref[1]
        arg[(3, 2, 3)]=0.842127375721*x[0]**o + (0.0235896718667)*x[0] + (0.436103311708)*x[1]**o + (0.261619364664)*x[1]
        ref[(3, 2, 3)]=0.842127375721*x_ref[0]**o + (0.0235896718667)*x_ref[0] + (0.436103311708)*x_ref[1]**o + (0.261619364664)*x_ref[1]
        arg[(3, 3, 0)]=-0.108597869321*x[0]**o + (-0.912939948841)*x[0] + (0.793326111854)*x[1]**o + (0.65700335432)*x[1]
        ref[(3, 3, 0)]=-0.108597869321*x_ref[0]**o + (-0.912939948841)*x_ref[0] + (0.793326111854)*x_ref[1]**o + (0.65700335432)*x_ref[1]
        arg[(3, 3, 1)]=0.423976137419*x[0]**o + (0.0131546451734)*x[0] + (-0.193163180807)*x[1]**o + (0.735491140273)*x[1]
        ref[(3, 3, 1)]=0.423976137419*x_ref[0]**o + (0.0131546451734)*x_ref[0] + (-0.193163180807)*x_ref[1]**o + (0.735491140273)*x_ref[1]
        arg[(3, 3, 2)]=-0.851342866904*x[0]**o + (0.659093423681)*x[0] + (0.68489605288)*x[1]**o + (-0.726524732322)*x[1]
        ref[(3, 3, 2)]=-0.851342866904*x_ref[0]**o + (0.659093423681)*x_ref[0] + (0.68489605288)*x_ref[1]**o + (-0.726524732322)*x_ref[1]
        arg[(3, 3, 3)]=0.0893264451918*x[0]**o + (0.860324323169)*x[0] + (-0.242046001187)*x[1]**o + (0.284224599136)*x[1]
        ref[(3, 3, 3)]=0.0893264451918*x_ref[0]**o + (0.860324323169)*x_ref[0] + (-0.242046001187)*x_ref[1]**o + (0.284224599136)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.768199031146*x[2]**o + (-0.818203667326)*x[2]
            ref[(0, 0, 0)]+=-0.768199031146*x_ref[2]**o + (-0.818203667326)*x_ref[2]
            arg[(0, 0, 1)]+=-0.168955789437*x[2]**o + (-0.808091052696)*x[2]
            ref[(0, 0, 1)]+=-0.168955789437*x_ref[2]**o + (-0.808091052696)*x_ref[2]
            arg[(0, 0, 2)]+=0.841372756445*x[2]**o + (-0.446386841749)*x[2]
            ref[(0, 0, 2)]+=0.841372756445*x_ref[2]**o + (-0.446386841749)*x_ref[2]
            arg[(0, 0, 3)]+=-0.148920876225*x[2]**o + (-0.939371198148)*x[2]
            ref[(0, 0, 3)]+=-0.148920876225*x_ref[2]**o + (-0.939371198148)*x_ref[2]
            arg[(0, 1, 0)]+=-0.219694450758*x[2]**o + (0.144876270456)*x[2]
            ref[(0, 1, 0)]+=-0.219694450758*x_ref[2]**o + (0.144876270456)*x_ref[2]
            arg[(0, 1, 1)]+=-0.172925235094*x[2]**o + (-0.142035435373)*x[2]
            ref[(0, 1, 1)]+=-0.172925235094*x_ref[2]**o + (-0.142035435373)*x_ref[2]
            arg[(0, 1, 2)]+=0.660103610487*x[2]**o + (-0.114199609142)*x[2]
            ref[(0, 1, 2)]+=0.660103610487*x_ref[2]**o + (-0.114199609142)*x_ref[2]
            arg[(0, 1, 3)]+=-0.3897039992*x[2]**o + (-0.0734344637994)*x[2]
            ref[(0, 1, 3)]+=-0.3897039992*x_ref[2]**o + (-0.0734344637994)*x_ref[2]
            arg[(0, 2, 0)]+=-0.688556109178*x[2]**o + (0.0775437963116)*x[2]
            ref[(0, 2, 0)]+=-0.688556109178*x_ref[2]**o + (0.0775437963116)*x_ref[2]
            arg[(0, 2, 1)]+=0.809060209209*x[2]**o + (-0.0927061003594)*x[2]
            ref[(0, 2, 1)]+=0.809060209209*x_ref[2]**o + (-0.0927061003594)*x_ref[2]
            arg[(0, 2, 2)]+=-0.939328448756*x[2]**o + (-0.614907735161)*x[2]
            ref[(0, 2, 2)]+=-0.939328448756*x_ref[2]**o + (-0.614907735161)*x_ref[2]
            arg[(0, 2, 3)]+=-0.393529847876*x[2]**o + (-0.119495664484)*x[2]
            ref[(0, 2, 3)]+=-0.393529847876*x_ref[2]**o + (-0.119495664484)*x_ref[2]
            arg[(0, 3, 0)]+=0.358336446072*x[2]**o + (-0.655126782857)*x[2]
            ref[(0, 3, 0)]+=0.358336446072*x_ref[2]**o + (-0.655126782857)*x_ref[2]
            arg[(0, 3, 1)]+=0.149350892833*x[2]**o + (0.921076841702)*x[2]
            ref[(0, 3, 1)]+=0.149350892833*x_ref[2]**o + (0.921076841702)*x_ref[2]
            arg[(0, 3, 2)]+=-0.829332159434*x[2]**o + (-0.591877305684)*x[2]
            ref[(0, 3, 2)]+=-0.829332159434*x_ref[2]**o + (-0.591877305684)*x_ref[2]
            arg[(0, 3, 3)]+=0.254516044723*x[2]**o + (-0.772402099528)*x[2]
            ref[(0, 3, 3)]+=0.254516044723*x_ref[2]**o + (-0.772402099528)*x_ref[2]
            arg[(1, 0, 0)]+=-0.647912175288*x[2]**o + (0.558203772899)*x[2]
            ref[(1, 0, 0)]+=-0.647912175288*x_ref[2]**o + (0.558203772899)*x_ref[2]
            arg[(1, 0, 1)]+=0.602169157082*x[2]**o + (-0.330013332983)*x[2]
            ref[(1, 0, 1)]+=0.602169157082*x_ref[2]**o + (-0.330013332983)*x_ref[2]
            arg[(1, 0, 2)]+=0.711496904235*x[2]**o + (0.639823098149)*x[2]
            ref[(1, 0, 2)]+=0.711496904235*x_ref[2]**o + (0.639823098149)*x_ref[2]
            arg[(1, 0, 3)]+=-0.151391974845*x[2]**o + (0.692894648482)*x[2]
            ref[(1, 0, 3)]+=-0.151391974845*x_ref[2]**o + (0.692894648482)*x_ref[2]
            arg[(1, 1, 0)]+=-0.21183507867*x[2]**o + (0.297118668846)*x[2]
            ref[(1, 1, 0)]+=-0.21183507867*x_ref[2]**o + (0.297118668846)*x_ref[2]
            arg[(1, 1, 1)]+=0.675458519267*x[2]**o + (0.224730082295)*x[2]
            ref[(1, 1, 1)]+=0.675458519267*x_ref[2]**o + (0.224730082295)*x_ref[2]
            arg[(1, 1, 2)]+=0.208834105547*x[2]**o + (0.372198900795)*x[2]
            ref[(1, 1, 2)]+=0.208834105547*x_ref[2]**o + (0.372198900795)*x_ref[2]
            arg[(1, 1, 3)]+=-0.668680974413*x[2]**o + (0.0692728528199)*x[2]
            ref[(1, 1, 3)]+=-0.668680974413*x_ref[2]**o + (0.0692728528199)*x_ref[2]
            arg[(1, 2, 0)]+=0.0331774902945*x[2]**o + (-0.0914314894331)*x[2]
            ref[(1, 2, 0)]+=0.0331774902945*x_ref[2]**o + (-0.0914314894331)*x_ref[2]
            arg[(1, 2, 1)]+=0.442605447677*x[2]**o + (0.316912745422)*x[2]
            ref[(1, 2, 1)]+=0.442605447677*x_ref[2]**o + (0.316912745422)*x_ref[2]
            arg[(1, 2, 2)]+=-0.261321107554*x[2]**o + (0.5305914327)*x[2]
            ref[(1, 2, 2)]+=-0.261321107554*x_ref[2]**o + (0.5305914327)*x_ref[2]
            arg[(1, 2, 3)]+=-0.980168429411*x[2]**o + (0.42820234106)*x[2]
            ref[(1, 2, 3)]+=-0.980168429411*x_ref[2]**o + (0.42820234106)*x_ref[2]
            arg[(1, 3, 0)]+=0.5657335064*x[2]**o + (0.547022391612)*x[2]
            ref[(1, 3, 0)]+=0.5657335064*x_ref[2]**o + (0.547022391612)*x_ref[2]
            arg[(1, 3, 1)]+=0.257082147522*x[2]**o + (-0.246538003056)*x[2]
            ref[(1, 3, 1)]+=0.257082147522*x_ref[2]**o + (-0.246538003056)*x_ref[2]
            arg[(1, 3, 2)]+=0.312086018129*x[2]**o + (-0.573490672699)*x[2]
            ref[(1, 3, 2)]+=0.312086018129*x_ref[2]**o + (-0.573490672699)*x_ref[2]
            arg[(1, 3, 3)]+=0.341132965019*x[2]**o + (-0.29259751176)*x[2]
            ref[(1, 3, 3)]+=0.341132965019*x_ref[2]**o + (-0.29259751176)*x_ref[2]
            arg[(2, 0, 0)]+=-0.584476674034*x[2]**o + (0.681884927309)*x[2]
            ref[(2, 0, 0)]+=-0.584476674034*x_ref[2]**o + (0.681884927309)*x_ref[2]
            arg[(2, 0, 1)]+=0.319396975916*x[2]**o + (-0.877001365112)*x[2]
            ref[(2, 0, 1)]+=0.319396975916*x_ref[2]**o + (-0.877001365112)*x_ref[2]
            arg[(2, 0, 2)]+=-0.489301957495*x[2]**o + (0.974208303795)*x[2]
            ref[(2, 0, 2)]+=-0.489301957495*x_ref[2]**o + (0.974208303795)*x_ref[2]
            arg[(2, 0, 3)]+=-0.832473739614*x[2]**o + (0.881470658015)*x[2]
            ref[(2, 0, 3)]+=-0.832473739614*x_ref[2]**o + (0.881470658015)*x_ref[2]
            arg[(2, 1, 0)]+=-0.982723596168*x[2]**o + (0.00847117794738)*x[2]
            ref[(2, 1, 0)]+=-0.982723596168*x_ref[2]**o + (0.00847117794738)*x_ref[2]
            arg[(2, 1, 1)]+=0.598101408383*x[2]**o + (0.122556302146)*x[2]
            ref[(2, 1, 1)]+=0.598101408383*x_ref[2]**o + (0.122556302146)*x_ref[2]
            arg[(2, 1, 2)]+=0.717024101909*x[2]**o + (-0.633499389607)*x[2]
            ref[(2, 1, 2)]+=0.717024101909*x_ref[2]**o + (-0.633499389607)*x_ref[2]
            arg[(2, 1, 3)]+=0.168306571947*x[2]**o + (-0.737716388487)*x[2]
            ref[(2, 1, 3)]+=0.168306571947*x_ref[2]**o + (-0.737716388487)*x_ref[2]
            arg[(2, 2, 0)]+=0.076096621693*x[2]**o + (0.766324633822)*x[2]
            ref[(2, 2, 0)]+=0.076096621693*x_ref[2]**o + (0.766324633822)*x_ref[2]
            arg[(2, 2, 1)]+=-0.821981332893*x[2]**o + (-0.0214990847613)*x[2]
            ref[(2, 2, 1)]+=-0.821981332893*x_ref[2]**o + (-0.0214990847613)*x_ref[2]
            arg[(2, 2, 2)]+=0.127409016693*x[2]**o + (0.434328669897)*x[2]
            ref[(2, 2, 2)]+=0.127409016693*x_ref[2]**o + (0.434328669897)*x_ref[2]
            arg[(2, 2, 3)]+=-0.896521534741*x[2]**o + (0.00315899607526)*x[2]
            ref[(2, 2, 3)]+=-0.896521534741*x_ref[2]**o + (0.00315899607526)*x_ref[2]
            arg[(2, 3, 0)]+=-0.806678307121*x[2]**o + (0.773194907751)*x[2]
            ref[(2, 3, 0)]+=-0.806678307121*x_ref[2]**o + (0.773194907751)*x_ref[2]
            arg[(2, 3, 1)]+=0.505400425972*x[2]**o + (0.0115553928027)*x[2]
            ref[(2, 3, 1)]+=0.505400425972*x_ref[2]**o + (0.0115553928027)*x_ref[2]
            arg[(2, 3, 2)]+=0.543055072531*x[2]**o + (-0.247825305895)*x[2]
            ref[(2, 3, 2)]+=0.543055072531*x_ref[2]**o + (-0.247825305895)*x_ref[2]
            arg[(2, 3, 3)]+=0.149254989813*x[2]**o + (-0.604354430989)*x[2]
            ref[(2, 3, 3)]+=0.149254989813*x_ref[2]**o + (-0.604354430989)*x_ref[2]
            arg[(3, 0, 0)]+=0.873827015451*x[2]**o + (-0.97514830544)*x[2]
            ref[(3, 0, 0)]+=0.873827015451*x_ref[2]**o + (-0.97514830544)*x_ref[2]
            arg[(3, 0, 1)]+=-0.0999666456256*x[2]**o + (0.421192118321)*x[2]
            ref[(3, 0, 1)]+=-0.0999666456256*x_ref[2]**o + (0.421192118321)*x_ref[2]
            arg[(3, 0, 2)]+=0.44889013415*x[2]**o + (0.894621784031)*x[2]
            ref[(3, 0, 2)]+=0.44889013415*x_ref[2]**o + (0.894621784031)*x_ref[2]
            arg[(3, 0, 3)]+=-0.512387928469*x[2]**o + (0.603000887245)*x[2]
            ref[(3, 0, 3)]+=-0.512387928469*x_ref[2]**o + (0.603000887245)*x_ref[2]
            arg[(3, 1, 0)]+=-0.630105924865*x[2]**o + (-0.355245499631)*x[2]
            ref[(3, 1, 0)]+=-0.630105924865*x_ref[2]**o + (-0.355245499631)*x_ref[2]
            arg[(3, 1, 1)]+=0.662243513134*x[2]**o + (-0.0243858010018)*x[2]
            ref[(3, 1, 1)]+=0.662243513134*x_ref[2]**o + (-0.0243858010018)*x_ref[2]
            arg[(3, 1, 2)]+=0.156190270662*x[2]**o + (0.157433148254)*x[2]
            ref[(3, 1, 2)]+=0.156190270662*x_ref[2]**o + (0.157433148254)*x_ref[2]
            arg[(3, 1, 3)]+=-0.545625749529*x[2]**o + (0.339120759913)*x[2]
            ref[(3, 1, 3)]+=-0.545625749529*x_ref[2]**o + (0.339120759913)*x_ref[2]
            arg[(3, 2, 0)]+=-0.698490326496*x[2]**o + (-0.207611913608)*x[2]
            ref[(3, 2, 0)]+=-0.698490326496*x_ref[2]**o + (-0.207611913608)*x_ref[2]
            arg[(3, 2, 1)]+=0.309804276908*x[2]**o + (0.914505388859)*x[2]
            ref[(3, 2, 1)]+=0.309804276908*x_ref[2]**o + (0.914505388859)*x_ref[2]
            arg[(3, 2, 2)]+=0.462238517301*x[2]**o + (-0.903936246353)*x[2]
            ref[(3, 2, 2)]+=0.462238517301*x_ref[2]**o + (-0.903936246353)*x_ref[2]
            arg[(3, 2, 3)]+=-0.624496753332*x[2]**o + (0.123510903252)*x[2]
            ref[(3, 2, 3)]+=-0.624496753332*x_ref[2]**o + (0.123510903252)*x_ref[2]
            arg[(3, 3, 0)]+=0.102615373958*x[2]**o + (-0.745206591773)*x[2]
            ref[(3, 3, 0)]+=0.102615373958*x_ref[2]**o + (-0.745206591773)*x_ref[2]
            arg[(3, 3, 1)]+=-0.185565965157*x[2]**o + (-0.961086059504)*x[2]
            ref[(3, 3, 1)]+=-0.185565965157*x_ref[2]**o + (-0.961086059504)*x_ref[2]
            arg[(3, 3, 2)]+=-0.622581094313*x[2]**o + (-0.0813294176967)*x[2]
            ref[(3, 3, 2)]+=-0.622581094313*x_ref[2]**o + (-0.0813294176967)*x_ref[2]
            arg[(3, 3, 3)]+=-0.456643641561*x[2]**o + (0.57564871872)*x[2]
            ref[(3, 3, 3)]+=-0.456643641561*x_ref[2]**o + (0.57564871872)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 4, 4),w)
        ref = Data(0,(2, 2, 4, 4),w_ref)
        arg[(0, 0, 0, 0)]=-0.846772535805*x[0]**o + (-0.61423105728)*x[0] + (0.461457058651)*x[1]**o + (0.216904506824)*x[1]
        ref[(0, 0, 0, 0)]=-0.846772535805*x_ref[0]**o + (-0.61423105728)*x_ref[0] + (0.461457058651)*x_ref[1]**o + (0.216904506824)*x_ref[1]
        arg[(0, 0, 0, 1)]=-0.22146697796*x[0]**o + (0.856037276897)*x[0] + (0.380845499023)*x[1]**o + (-0.596326597767)*x[1]
        ref[(0, 0, 0, 1)]=-0.22146697796*x_ref[0]**o + (0.856037276897)*x_ref[0] + (0.380845499023)*x_ref[1]**o + (-0.596326597767)*x_ref[1]
        arg[(0, 0, 0, 2)]=-0.640982194009*x[0]**o + (0.0467522790623)*x[0] + (-0.00851815322242)*x[1]**o + (-0.790018501924)*x[1]
        ref[(0, 0, 0, 2)]=-0.640982194009*x_ref[0]**o + (0.0467522790623)*x_ref[0] + (-0.00851815322242)*x_ref[1]**o + (-0.790018501924)*x_ref[1]
        arg[(0, 0, 0, 3)]=0.929402080397*x[0]**o + (0.539953425865)*x[0] + (0.366018508515)*x[1]**o + (0.204553501224)*x[1]
        ref[(0, 0, 0, 3)]=0.929402080397*x_ref[0]**o + (0.539953425865)*x_ref[0] + (0.366018508515)*x_ref[1]**o + (0.204553501224)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.0384214266616*x[0]**o + (-0.150341644219)*x[0] + (-0.366670793447)*x[1]**o + (-0.0678226103902)*x[1]
        ref[(0, 0, 1, 0)]=0.0384214266616*x_ref[0]**o + (-0.150341644219)*x_ref[0] + (-0.366670793447)*x_ref[1]**o + (-0.0678226103902)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.637036360602*x[0]**o + (0.614760131555)*x[0] + (0.743470561958)*x[1]**o + (-0.0973502108187)*x[1]
        ref[(0, 0, 1, 1)]=0.637036360602*x_ref[0]**o + (0.614760131555)*x_ref[0] + (0.743470561958)*x_ref[1]**o + (-0.0973502108187)*x_ref[1]
        arg[(0, 0, 1, 2)]=-0.0629227625636*x[0]**o + (-0.157046351852)*x[0] + (-0.762367129292)*x[1]**o + (-0.75076452768)*x[1]
        ref[(0, 0, 1, 2)]=-0.0629227625636*x_ref[0]**o + (-0.157046351852)*x_ref[0] + (-0.762367129292)*x_ref[1]**o + (-0.75076452768)*x_ref[1]
        arg[(0, 0, 1, 3)]=-0.871838170153*x[0]**o + (0.180042058058)*x[0] + (0.772808772615)*x[1]**o + (-0.0639056853527)*x[1]
        ref[(0, 0, 1, 3)]=-0.871838170153*x_ref[0]**o + (0.180042058058)*x_ref[0] + (0.772808772615)*x_ref[1]**o + (-0.0639056853527)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.758916938509*x[0]**o + (-0.133984467911)*x[0] + (0.228189161944)*x[1]**o + (0.171248977853)*x[1]
        ref[(0, 0, 2, 0)]=-0.758916938509*x_ref[0]**o + (-0.133984467911)*x_ref[0] + (0.228189161944)*x_ref[1]**o + (0.171248977853)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.396713326407*x[0]**o + (0.147745758478)*x[0] + (0.285393875944)*x[1]**o + (0.257374033822)*x[1]
        ref[(0, 0, 2, 1)]=-0.396713326407*x_ref[0]**o + (0.147745758478)*x_ref[0] + (0.285393875944)*x_ref[1]**o + (0.257374033822)*x_ref[1]
        arg[(0, 0, 2, 2)]=-0.291138282826*x[0]**o + (0.434424700451)*x[0] + (0.84916813219)*x[1]**o + (-0.5008198776)*x[1]
        ref[(0, 0, 2, 2)]=-0.291138282826*x_ref[0]**o + (0.434424700451)*x_ref[0] + (0.84916813219)*x_ref[1]**o + (-0.5008198776)*x_ref[1]
        arg[(0, 0, 2, 3)]=0.624216927268*x[0]**o + (0.57101889484)*x[0] + (0.349926385007)*x[1]**o + (0.293505795737)*x[1]
        ref[(0, 0, 2, 3)]=0.624216927268*x_ref[0]**o + (0.57101889484)*x_ref[0] + (0.349926385007)*x_ref[1]**o + (0.293505795737)*x_ref[1]
        arg[(0, 0, 3, 0)]=-0.274055171921*x[0]**o + (-0.204304095982)*x[0] + (0.0371184633391)*x[1]**o + (0.86006315886)*x[1]
        ref[(0, 0, 3, 0)]=-0.274055171921*x_ref[0]**o + (-0.204304095982)*x_ref[0] + (0.0371184633391)*x_ref[1]**o + (0.86006315886)*x_ref[1]
        arg[(0, 0, 3, 1)]=-0.941365935666*x[0]**o + (0.902778722962)*x[0] + (-0.430684621026)*x[1]**o + (0.721564000755)*x[1]
        ref[(0, 0, 3, 1)]=-0.941365935666*x_ref[0]**o + (0.902778722962)*x_ref[0] + (-0.430684621026)*x_ref[1]**o + (0.721564000755)*x_ref[1]
        arg[(0, 0, 3, 2)]=-0.301559143682*x[0]**o + (-0.207350847858)*x[0] + (-0.104240323656)*x[1]**o + (0.819335592274)*x[1]
        ref[(0, 0, 3, 2)]=-0.301559143682*x_ref[0]**o + (-0.207350847858)*x_ref[0] + (-0.104240323656)*x_ref[1]**o + (0.819335592274)*x_ref[1]
        arg[(0, 0, 3, 3)]=-0.850257465753*x[0]**o + (0.15339903501)*x[0] + (-0.941424144333)*x[1]**o + (0.878600870004)*x[1]
        ref[(0, 0, 3, 3)]=-0.850257465753*x_ref[0]**o + (0.15339903501)*x_ref[0] + (-0.941424144333)*x_ref[1]**o + (0.878600870004)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.512801409653*x[0]**o + (-0.195506556074)*x[0] + (0.584072184471)*x[1]**o + (-0.763403655751)*x[1]
        ref[(0, 1, 0, 0)]=0.512801409653*x_ref[0]**o + (-0.195506556074)*x_ref[0] + (0.584072184471)*x_ref[1]**o + (-0.763403655751)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.207681697158*x[0]**o + (0.833186025934)*x[0] + (0.848328288474)*x[1]**o + (-0.0899808928851)*x[1]
        ref[(0, 1, 0, 1)]=0.207681697158*x_ref[0]**o + (0.833186025934)*x_ref[0] + (0.848328288474)*x_ref[1]**o + (-0.0899808928851)*x_ref[1]
        arg[(0, 1, 0, 2)]=-0.795104766254*x[0]**o + (0.522945728384)*x[0] + (0.358900398628)*x[1]**o + (0.123503518815)*x[1]
        ref[(0, 1, 0, 2)]=-0.795104766254*x_ref[0]**o + (0.522945728384)*x_ref[0] + (0.358900398628)*x_ref[1]**o + (0.123503518815)*x_ref[1]
        arg[(0, 1, 0, 3)]=0.789145717133*x[0]**o + (-0.14274977966)*x[0] + (0.936331703297)*x[1]**o + (0.615895148991)*x[1]
        ref[(0, 1, 0, 3)]=0.789145717133*x_ref[0]**o + (-0.14274977966)*x_ref[0] + (0.936331703297)*x_ref[1]**o + (0.615895148991)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.206104379213*x[0]**o + (0.410286913629)*x[0] + (-0.20596864004)*x[1]**o + (0.225633408245)*x[1]
        ref[(0, 1, 1, 0)]=0.206104379213*x_ref[0]**o + (0.410286913629)*x_ref[0] + (-0.20596864004)*x_ref[1]**o + (0.225633408245)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.837714303226*x[0]**o + (0.794616721031)*x[0] + (0.833970481483)*x[1]**o + (-0.10806665358)*x[1]
        ref[(0, 1, 1, 1)]=-0.837714303226*x_ref[0]**o + (0.794616721031)*x_ref[0] + (0.833970481483)*x_ref[1]**o + (-0.10806665358)*x_ref[1]
        arg[(0, 1, 1, 2)]=-0.142319110013*x[0]**o + (0.944300157175)*x[0] + (0.643639930509)*x[1]**o + (0.492650048998)*x[1]
        ref[(0, 1, 1, 2)]=-0.142319110013*x_ref[0]**o + (0.944300157175)*x_ref[0] + (0.643639930509)*x_ref[1]**o + (0.492650048998)*x_ref[1]
        arg[(0, 1, 1, 3)]=0.494917603605*x[0]**o + (-0.268120914137)*x[0] + (-0.87175637441)*x[1]**o + (0.504792672149)*x[1]
        ref[(0, 1, 1, 3)]=0.494917603605*x_ref[0]**o + (-0.268120914137)*x_ref[0] + (-0.87175637441)*x_ref[1]**o + (0.504792672149)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.427013193907*x[0]**o + (0.428574561442)*x[0] + (-0.197142717811)*x[1]**o + (-0.00582101152685)*x[1]
        ref[(0, 1, 2, 0)]=-0.427013193907*x_ref[0]**o + (0.428574561442)*x_ref[0] + (-0.197142717811)*x_ref[1]**o + (-0.00582101152685)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.319502880509*x[0]**o + (0.0355004102282)*x[0] + (-0.336931657403)*x[1]**o + (0.600581120826)*x[1]
        ref[(0, 1, 2, 1)]=0.319502880509*x_ref[0]**o + (0.0355004102282)*x_ref[0] + (-0.336931657403)*x_ref[1]**o + (0.600581120826)*x_ref[1]
        arg[(0, 1, 2, 2)]=-0.834289849156*x[0]**o + (0.079271440961)*x[0] + (-0.956959043815)*x[1]**o + (0.101400184511)*x[1]
        ref[(0, 1, 2, 2)]=-0.834289849156*x_ref[0]**o + (0.079271440961)*x_ref[0] + (-0.956959043815)*x_ref[1]**o + (0.101400184511)*x_ref[1]
        arg[(0, 1, 2, 3)]=0.0132099491941*x[0]**o + (-0.813475118657)*x[0] + (-0.730158726774)*x[1]**o + (-0.240975374716)*x[1]
        ref[(0, 1, 2, 3)]=0.0132099491941*x_ref[0]**o + (-0.813475118657)*x_ref[0] + (-0.730158726774)*x_ref[1]**o + (-0.240975374716)*x_ref[1]
        arg[(0, 1, 3, 0)]=-0.751671968861*x[0]**o + (-0.266779339247)*x[0] + (-0.858837267047)*x[1]**o + (0.0989160725952)*x[1]
        ref[(0, 1, 3, 0)]=-0.751671968861*x_ref[0]**o + (-0.266779339247)*x_ref[0] + (-0.858837267047)*x_ref[1]**o + (0.0989160725952)*x_ref[1]
        arg[(0, 1, 3, 1)]=-0.176190194766*x[0]**o + (0.957640259814)*x[0] + (-0.0832851623444)*x[1]**o + (0.536404295617)*x[1]
        ref[(0, 1, 3, 1)]=-0.176190194766*x_ref[0]**o + (0.957640259814)*x_ref[0] + (-0.0832851623444)*x_ref[1]**o + (0.536404295617)*x_ref[1]
        arg[(0, 1, 3, 2)]=-0.0527931060415*x[0]**o + (0.441693868268)*x[0] + (0.923862293607)*x[1]**o + (0.197872302471)*x[1]
        ref[(0, 1, 3, 2)]=-0.0527931060415*x_ref[0]**o + (0.441693868268)*x_ref[0] + (0.923862293607)*x_ref[1]**o + (0.197872302471)*x_ref[1]
        arg[(0, 1, 3, 3)]=-0.904474389757*x[0]**o + (-0.490514153751)*x[0] + (0.261301202889)*x[1]**o + (0.432579888108)*x[1]
        ref[(0, 1, 3, 3)]=-0.904474389757*x_ref[0]**o + (-0.490514153751)*x_ref[0] + (0.261301202889)*x_ref[1]**o + (0.432579888108)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.43529893507*x[0]**o + (0.974032106344)*x[0] + (-0.00491163701967)*x[1]**o + (0.776408467407)*x[1]
        ref[(1, 0, 0, 0)]=0.43529893507*x_ref[0]**o + (0.974032106344)*x_ref[0] + (-0.00491163701967)*x_ref[1]**o + (0.776408467407)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.77518081131*x[0]**o + (-0.131210180446)*x[0] + (0.536800993902)*x[1]**o + (0.265077535607)*x[1]
        ref[(1, 0, 0, 1)]=0.77518081131*x_ref[0]**o + (-0.131210180446)*x_ref[0] + (0.536800993902)*x_ref[1]**o + (0.265077535607)*x_ref[1]
        arg[(1, 0, 0, 2)]=0.421672792737*x[0]**o + (-0.0760310963155)*x[0] + (0.500809195992)*x[1]**o + (-0.885166254593)*x[1]
        ref[(1, 0, 0, 2)]=0.421672792737*x_ref[0]**o + (-0.0760310963155)*x_ref[0] + (0.500809195992)*x_ref[1]**o + (-0.885166254593)*x_ref[1]
        arg[(1, 0, 0, 3)]=-0.796992489343*x[0]**o + (0.697293981959)*x[0] + (0.553659177402)*x[1]**o + (0.096610734299)*x[1]
        ref[(1, 0, 0, 3)]=-0.796992489343*x_ref[0]**o + (0.697293981959)*x_ref[0] + (0.553659177402)*x_ref[1]**o + (0.096610734299)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.442729173812*x[0]**o + (0.277438477435)*x[0] + (0.778877176635)*x[1]**o + (-0.173616349078)*x[1]
        ref[(1, 0, 1, 0)]=0.442729173812*x_ref[0]**o + (0.277438477435)*x_ref[0] + (0.778877176635)*x_ref[1]**o + (-0.173616349078)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.779548000803*x[0]**o + (-0.412808853937)*x[0] + (-0.0949147547499)*x[1]**o + (0.311946492665)*x[1]
        ref[(1, 0, 1, 1)]=0.779548000803*x_ref[0]**o + (-0.412808853937)*x_ref[0] + (-0.0949147547499)*x_ref[1]**o + (0.311946492665)*x_ref[1]
        arg[(1, 0, 1, 2)]=0.861866962005*x[0]**o + (-0.933678418207)*x[0] + (-0.450276453686)*x[1]**o + (-0.344765936416)*x[1]
        ref[(1, 0, 1, 2)]=0.861866962005*x_ref[0]**o + (-0.933678418207)*x_ref[0] + (-0.450276453686)*x_ref[1]**o + (-0.344765936416)*x_ref[1]
        arg[(1, 0, 1, 3)]=0.376327819424*x[0]**o + (0.256077622428)*x[0] + (0.831014645354)*x[1]**o + (-0.603303856858)*x[1]
        ref[(1, 0, 1, 3)]=0.376327819424*x_ref[0]**o + (0.256077622428)*x_ref[0] + (0.831014645354)*x_ref[1]**o + (-0.603303856858)*x_ref[1]
        arg[(1, 0, 2, 0)]=-0.516169369557*x[0]**o + (-0.426667893604)*x[0] + (0.396563677094)*x[1]**o + (-0.42142565044)*x[1]
        ref[(1, 0, 2, 0)]=-0.516169369557*x_ref[0]**o + (-0.426667893604)*x_ref[0] + (0.396563677094)*x_ref[1]**o + (-0.42142565044)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.987197768725*x[0]**o + (-0.316291862992)*x[0] + (0.0783840484291)*x[1]**o + (-0.698663251164)*x[1]
        ref[(1, 0, 2, 1)]=0.987197768725*x_ref[0]**o + (-0.316291862992)*x_ref[0] + (0.0783840484291)*x_ref[1]**o + (-0.698663251164)*x_ref[1]
        arg[(1, 0, 2, 2)]=0.860500697153*x[0]**o + (0.654374407477)*x[0] + (-0.381014534387)*x[1]**o + (0.903888708259)*x[1]
        ref[(1, 0, 2, 2)]=0.860500697153*x_ref[0]**o + (0.654374407477)*x_ref[0] + (-0.381014534387)*x_ref[1]**o + (0.903888708259)*x_ref[1]
        arg[(1, 0, 2, 3)]=-0.201239343299*x[0]**o + (0.805371581446)*x[0] + (0.772211387152)*x[1]**o + (-0.700733570946)*x[1]
        ref[(1, 0, 2, 3)]=-0.201239343299*x_ref[0]**o + (0.805371581446)*x_ref[0] + (0.772211387152)*x_ref[1]**o + (-0.700733570946)*x_ref[1]
        arg[(1, 0, 3, 0)]=-0.291027168359*x[0]**o + (-0.153392164809)*x[0] + (-0.856708176702)*x[1]**o + (-0.895369962428)*x[1]
        ref[(1, 0, 3, 0)]=-0.291027168359*x_ref[0]**o + (-0.153392164809)*x_ref[0] + (-0.856708176702)*x_ref[1]**o + (-0.895369962428)*x_ref[1]
        arg[(1, 0, 3, 1)]=0.086044218744*x[0]**o + (-0.844567158949)*x[0] + (-0.759490328244)*x[1]**o + (0.254093737148)*x[1]
        ref[(1, 0, 3, 1)]=0.086044218744*x_ref[0]**o + (-0.844567158949)*x_ref[0] + (-0.759490328244)*x_ref[1]**o + (0.254093737148)*x_ref[1]
        arg[(1, 0, 3, 2)]=0.503825151909*x[0]**o + (0.833413603894)*x[0] + (0.711697415421)*x[1]**o + (-0.391827720685)*x[1]
        ref[(1, 0, 3, 2)]=0.503825151909*x_ref[0]**o + (0.833413603894)*x_ref[0] + (0.711697415421)*x_ref[1]**o + (-0.391827720685)*x_ref[1]
        arg[(1, 0, 3, 3)]=0.96461817917*x[0]**o + (0.662366568395)*x[0] + (0.739847119634)*x[1]**o + (-0.632169101597)*x[1]
        ref[(1, 0, 3, 3)]=0.96461817917*x_ref[0]**o + (0.662366568395)*x_ref[0] + (0.739847119634)*x_ref[1]**o + (-0.632169101597)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.0905778040603*x[0]**o + (-0.331443849575)*x[0] + (0.00451467058734)*x[1]**o + (0.0941171967908)*x[1]
        ref[(1, 1, 0, 0)]=-0.0905778040603*x_ref[0]**o + (-0.331443849575)*x_ref[0] + (0.00451467058734)*x_ref[1]**o + (0.0941171967908)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.130184922228*x[0]**o + (-0.541983911746)*x[0] + (-0.826997881154)*x[1]**o + (-0.316488843688)*x[1]
        ref[(1, 1, 0, 1)]=0.130184922228*x_ref[0]**o + (-0.541983911746)*x_ref[0] + (-0.826997881154)*x_ref[1]**o + (-0.316488843688)*x_ref[1]
        arg[(1, 1, 0, 2)]=-0.746377099514*x[0]**o + (0.186738737025)*x[0] + (0.541991765144)*x[1]**o + (-0.0914714733594)*x[1]
        ref[(1, 1, 0, 2)]=-0.746377099514*x_ref[0]**o + (0.186738737025)*x_ref[0] + (0.541991765144)*x_ref[1]**o + (-0.0914714733594)*x_ref[1]
        arg[(1, 1, 0, 3)]=0.122618304532*x[0]**o + (-0.842715233864)*x[0] + (-0.0415618668563)*x[1]**o + (0.264476872349)*x[1]
        ref[(1, 1, 0, 3)]=0.122618304532*x_ref[0]**o + (-0.842715233864)*x_ref[0] + (-0.0415618668563)*x_ref[1]**o + (0.264476872349)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.23713278371*x[0]**o + (0.822156729141)*x[0] + (0.542333654608)*x[1]**o + (-0.309952869997)*x[1]
        ref[(1, 1, 1, 0)]=-0.23713278371*x_ref[0]**o + (0.822156729141)*x_ref[0] + (0.542333654608)*x_ref[1]**o + (-0.309952869997)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.329299556166*x[0]**o + (-0.127544162308)*x[0] + (0.725860902882)*x[1]**o + (0.309331561179)*x[1]
        ref[(1, 1, 1, 1)]=-0.329299556166*x_ref[0]**o + (-0.127544162308)*x_ref[0] + (0.725860902882)*x_ref[1]**o + (0.309331561179)*x_ref[1]
        arg[(1, 1, 1, 2)]=-0.216875048688*x[0]**o + (-0.811703506179)*x[0] + (0.906841520693)*x[1]**o + (0.609017225794)*x[1]
        ref[(1, 1, 1, 2)]=-0.216875048688*x_ref[0]**o + (-0.811703506179)*x_ref[0] + (0.906841520693)*x_ref[1]**o + (0.609017225794)*x_ref[1]
        arg[(1, 1, 1, 3)]=0.82025855373*x[0]**o + (0.13321647878)*x[0] + (0.307486393768)*x[1]**o + (0.421117400968)*x[1]
        ref[(1, 1, 1, 3)]=0.82025855373*x_ref[0]**o + (0.13321647878)*x_ref[0] + (0.307486393768)*x_ref[1]**o + (0.421117400968)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.931132951569*x[0]**o + (-0.150751418191)*x[0] + (0.00349864341389)*x[1]**o + (0.833879935304)*x[1]
        ref[(1, 1, 2, 0)]=-0.931132951569*x_ref[0]**o + (-0.150751418191)*x_ref[0] + (0.00349864341389)*x_ref[1]**o + (0.833879935304)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.359837700022*x[0]**o + (-0.793111255094)*x[0] + (0.720898859079)*x[1]**o + (0.201347147834)*x[1]
        ref[(1, 1, 2, 1)]=-0.359837700022*x_ref[0]**o + (-0.793111255094)*x_ref[0] + (0.720898859079)*x_ref[1]**o + (0.201347147834)*x_ref[1]
        arg[(1, 1, 2, 2)]=0.39821580882*x[0]**o + (0.324094137971)*x[0] + (0.993281374638)*x[1]**o + (0.778620608018)*x[1]
        ref[(1, 1, 2, 2)]=0.39821580882*x_ref[0]**o + (0.324094137971)*x_ref[0] + (0.993281374638)*x_ref[1]**o + (0.778620608018)*x_ref[1]
        arg[(1, 1, 2, 3)]=-0.0085366498365*x[0]**o + (-0.377703591101)*x[0] + (0.947092420296)*x[1]**o + (0.761454431597)*x[1]
        ref[(1, 1, 2, 3)]=-0.0085366498365*x_ref[0]**o + (-0.377703591101)*x_ref[0] + (0.947092420296)*x_ref[1]**o + (0.761454431597)*x_ref[1]
        arg[(1, 1, 3, 0)]=-0.839774608312*x[0]**o + (0.685947199767)*x[0] + (-0.160498902764)*x[1]**o + (0.873830075025)*x[1]
        ref[(1, 1, 3, 0)]=-0.839774608312*x_ref[0]**o + (0.685947199767)*x_ref[0] + (-0.160498902764)*x_ref[1]**o + (0.873830075025)*x_ref[1]
        arg[(1, 1, 3, 1)]=0.784386929182*x[0]**o + (0.729618274609)*x[0] + (-0.620074762101)*x[1]**o + (0.0484728222286)*x[1]
        ref[(1, 1, 3, 1)]=0.784386929182*x_ref[0]**o + (0.729618274609)*x_ref[0] + (-0.620074762101)*x_ref[1]**o + (0.0484728222286)*x_ref[1]
        arg[(1, 1, 3, 2)]=-0.76726779223*x[0]**o + (0.994761404086)*x[0] + (-0.594864585888)*x[1]**o + (-0.451292815628)*x[1]
        ref[(1, 1, 3, 2)]=-0.76726779223*x_ref[0]**o + (0.994761404086)*x_ref[0] + (-0.594864585888)*x_ref[1]**o + (-0.451292815628)*x_ref[1]
        arg[(1, 1, 3, 3)]=0.09204945513*x[0]**o + (0.568547101246)*x[0] + (0.492645199073)*x[1]**o + (-0.482400185541)*x[1]
        ref[(1, 1, 3, 3)]=0.09204945513*x_ref[0]**o + (0.568547101246)*x_ref[0] + (0.492645199073)*x_ref[1]**o + (-0.482400185541)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.781665577079*x[2]**o + (-0.862279224093)*x[2]
            ref[(0, 0, 0, 0)]+=-0.781665577079*x_ref[2]**o + (-0.862279224093)*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.980342560359*x[2]**o + (0.88435446539)*x[2]
            ref[(0, 0, 0, 1)]+=0.980342560359*x_ref[2]**o + (0.88435446539)*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.026094168118*x[2]**o + (0.68291985259)*x[2]
            ref[(0, 0, 0, 2)]+=0.026094168118*x_ref[2]**o + (0.68291985259)*x_ref[2]
            arg[(0, 0, 0, 3)]+=0.457077794599*x[2]**o + (-0.344472511929)*x[2]
            ref[(0, 0, 0, 3)]+=0.457077794599*x_ref[2]**o + (-0.344472511929)*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.973939177828*x[2]**o + (0.165112594355)*x[2]
            ref[(0, 0, 1, 0)]+=-0.973939177828*x_ref[2]**o + (0.165112594355)*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.431995155125*x[2]**o + (0.176345085323)*x[2]
            ref[(0, 0, 1, 1)]+=-0.431995155125*x_ref[2]**o + (0.176345085323)*x_ref[2]
            arg[(0, 0, 1, 2)]+=-0.10644328309*x[2]**o + (-0.291418131818)*x[2]
            ref[(0, 0, 1, 2)]+=-0.10644328309*x_ref[2]**o + (-0.291418131818)*x_ref[2]
            arg[(0, 0, 1, 3)]+=-0.553247053853*x[2]**o + (-0.365543753073)*x[2]
            ref[(0, 0, 1, 3)]+=-0.553247053853*x_ref[2]**o + (-0.365543753073)*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.0980408760596*x[2]**o + (0.997573591537)*x[2]
            ref[(0, 0, 2, 0)]+=-0.0980408760596*x_ref[2]**o + (0.997573591537)*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.73532123807*x[2]**o + (-0.125824442605)*x[2]
            ref[(0, 0, 2, 1)]+=0.73532123807*x_ref[2]**o + (-0.125824442605)*x_ref[2]
            arg[(0, 0, 2, 2)]+=-0.0342798247944*x[2]**o + (-0.816657752827)*x[2]
            ref[(0, 0, 2, 2)]+=-0.0342798247944*x_ref[2]**o + (-0.816657752827)*x_ref[2]
            arg[(0, 0, 2, 3)]+=-0.191725692864*x[2]**o + (-0.112137241557)*x[2]
            ref[(0, 0, 2, 3)]+=-0.191725692864*x_ref[2]**o + (-0.112137241557)*x_ref[2]
            arg[(0, 0, 3, 0)]+=-0.655516733048*x[2]**o + (-0.557462386519)*x[2]
            ref[(0, 0, 3, 0)]+=-0.655516733048*x_ref[2]**o + (-0.557462386519)*x_ref[2]
            arg[(0, 0, 3, 1)]+=0.1979888697*x[2]**o + (0.831573490756)*x[2]
            ref[(0, 0, 3, 1)]+=0.1979888697*x_ref[2]**o + (0.831573490756)*x_ref[2]
            arg[(0, 0, 3, 2)]+=-0.940420556817*x[2]**o + (-0.0647995442939)*x[2]
            ref[(0, 0, 3, 2)]+=-0.940420556817*x_ref[2]**o + (-0.0647995442939)*x_ref[2]
            arg[(0, 0, 3, 3)]+=0.652737480662*x[2]**o + (0.611348811067)*x[2]
            ref[(0, 0, 3, 3)]+=0.652737480662*x_ref[2]**o + (0.611348811067)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.852410183271*x[2]**o + (-0.64315030142)*x[2]
            ref[(0, 1, 0, 0)]+=-0.852410183271*x_ref[2]**o + (-0.64315030142)*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.472926083024*x[2]**o + (-0.109846263016)*x[2]
            ref[(0, 1, 0, 1)]+=0.472926083024*x_ref[2]**o + (-0.109846263016)*x_ref[2]
            arg[(0, 1, 0, 2)]+=-0.0168927195943*x[2]**o + (-0.926578708913)*x[2]
            ref[(0, 1, 0, 2)]+=-0.0168927195943*x_ref[2]**o + (-0.926578708913)*x_ref[2]
            arg[(0, 1, 0, 3)]+=0.853258402209*x[2]**o + (0.3216115224)*x[2]
            ref[(0, 1, 0, 3)]+=0.853258402209*x_ref[2]**o + (0.3216115224)*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.149377537688*x[2]**o + (-0.769867888956)*x[2]
            ref[(0, 1, 1, 0)]+=0.149377537688*x_ref[2]**o + (-0.769867888956)*x_ref[2]
            arg[(0, 1, 1, 1)]+=0.864524348178*x[2]**o + (-0.187675125453)*x[2]
            ref[(0, 1, 1, 1)]+=0.864524348178*x_ref[2]**o + (-0.187675125453)*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.0314283911023*x[2]**o + (-0.0730935834246)*x[2]
            ref[(0, 1, 1, 2)]+=0.0314283911023*x_ref[2]**o + (-0.0730935834246)*x_ref[2]
            arg[(0, 1, 1, 3)]+=-0.428216063678*x[2]**o + (0.215710951904)*x[2]
            ref[(0, 1, 1, 3)]+=-0.428216063678*x_ref[2]**o + (0.215710951904)*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.00434432627626*x[2]**o + (-0.748405856646)*x[2]
            ref[(0, 1, 2, 0)]+=-0.00434432627626*x_ref[2]**o + (-0.748405856646)*x_ref[2]
            arg[(0, 1, 2, 1)]+=0.72316541467*x[2]**o + (-0.232212182592)*x[2]
            ref[(0, 1, 2, 1)]+=0.72316541467*x_ref[2]**o + (-0.232212182592)*x_ref[2]
            arg[(0, 1, 2, 2)]+=0.426695109871*x[2]**o + (0.0734774882373)*x[2]
            ref[(0, 1, 2, 2)]+=0.426695109871*x_ref[2]**o + (0.0734774882373)*x_ref[2]
            arg[(0, 1, 2, 3)]+=0.283937169495*x[2]**o + (-0.98329553778)*x[2]
            ref[(0, 1, 2, 3)]+=0.283937169495*x_ref[2]**o + (-0.98329553778)*x_ref[2]
            arg[(0, 1, 3, 0)]+=0.157997339628*x[2]**o + (-0.748733198546)*x[2]
            ref[(0, 1, 3, 0)]+=0.157997339628*x_ref[2]**o + (-0.748733198546)*x_ref[2]
            arg[(0, 1, 3, 1)]+=-0.995006408572*x[2]**o + (0.919842216729)*x[2]
            ref[(0, 1, 3, 1)]+=-0.995006408572*x_ref[2]**o + (0.919842216729)*x_ref[2]
            arg[(0, 1, 3, 2)]+=-0.989120940722*x[2]**o + (0.15681214384)*x[2]
            ref[(0, 1, 3, 2)]+=-0.989120940722*x_ref[2]**o + (0.15681214384)*x_ref[2]
            arg[(0, 1, 3, 3)]+=-0.941907667786*x[2]**o + (0.708298769529)*x[2]
            ref[(0, 1, 3, 3)]+=-0.941907667786*x_ref[2]**o + (0.708298769529)*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.0290427784514*x[2]**o + (0.373026053823)*x[2]
            ref[(1, 0, 0, 0)]+=-0.0290427784514*x_ref[2]**o + (0.373026053823)*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.924914827762*x[2]**o + (0.283089584262)*x[2]
            ref[(1, 0, 0, 1)]+=0.924914827762*x_ref[2]**o + (0.283089584262)*x_ref[2]
            arg[(1, 0, 0, 2)]+=0.574459312524*x[2]**o + (-0.67317061312)*x[2]
            ref[(1, 0, 0, 2)]+=0.574459312524*x_ref[2]**o + (-0.67317061312)*x_ref[2]
            arg[(1, 0, 0, 3)]+=0.178494802848*x[2]**o + (-0.287834613997)*x[2]
            ref[(1, 0, 0, 3)]+=0.178494802848*x_ref[2]**o + (-0.287834613997)*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.746818319161*x[2]**o + (0.489741331672)*x[2]
            ref[(1, 0, 1, 0)]+=0.746818319161*x_ref[2]**o + (0.489741331672)*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.0328129545*x[2]**o + (-0.0985359520056)*x[2]
            ref[(1, 0, 1, 1)]+=0.0328129545*x_ref[2]**o + (-0.0985359520056)*x_ref[2]
            arg[(1, 0, 1, 2)]+=-0.936593107053*x[2]**o + (0.524986463139)*x[2]
            ref[(1, 0, 1, 2)]+=-0.936593107053*x_ref[2]**o + (0.524986463139)*x_ref[2]
            arg[(1, 0, 1, 3)]+=0.364116004301*x[2]**o + (0.583258773589)*x[2]
            ref[(1, 0, 1, 3)]+=0.364116004301*x_ref[2]**o + (0.583258773589)*x_ref[2]
            arg[(1, 0, 2, 0)]+=0.658723743452*x[2]**o + (-0.304779001751)*x[2]
            ref[(1, 0, 2, 0)]+=0.658723743452*x_ref[2]**o + (-0.304779001751)*x_ref[2]
            arg[(1, 0, 2, 1)]+=-0.266870830168*x[2]**o + (0.922614700372)*x[2]
            ref[(1, 0, 2, 1)]+=-0.266870830168*x_ref[2]**o + (0.922614700372)*x_ref[2]
            arg[(1, 0, 2, 2)]+=-0.217220709928*x[2]**o + (-0.751794163728)*x[2]
            ref[(1, 0, 2, 2)]+=-0.217220709928*x_ref[2]**o + (-0.751794163728)*x_ref[2]
            arg[(1, 0, 2, 3)]+=-0.0308087930311*x[2]**o + (0.440093315351)*x[2]
            ref[(1, 0, 2, 3)]+=-0.0308087930311*x_ref[2]**o + (0.440093315351)*x_ref[2]
            arg[(1, 0, 3, 0)]+=-0.587848724211*x[2]**o + (0.103539301019)*x[2]
            ref[(1, 0, 3, 0)]+=-0.587848724211*x_ref[2]**o + (0.103539301019)*x_ref[2]
            arg[(1, 0, 3, 1)]+=0.339329393913*x[2]**o + (-0.870929554428)*x[2]
            ref[(1, 0, 3, 1)]+=0.339329393913*x_ref[2]**o + (-0.870929554428)*x_ref[2]
            arg[(1, 0, 3, 2)]+=-0.103191176678*x[2]**o + (0.142899356934)*x[2]
            ref[(1, 0, 3, 2)]+=-0.103191176678*x_ref[2]**o + (0.142899356934)*x_ref[2]
            arg[(1, 0, 3, 3)]+=0.106727699855*x[2]**o + (-0.827073563071)*x[2]
            ref[(1, 0, 3, 3)]+=0.106727699855*x_ref[2]**o + (-0.827073563071)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.607520765216*x[2]**o + (0.918431511269)*x[2]
            ref[(1, 1, 0, 0)]+=0.607520765216*x_ref[2]**o + (0.918431511269)*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.634481376455*x[2]**o + (0.0892992079417)*x[2]
            ref[(1, 1, 0, 1)]+=-0.634481376455*x_ref[2]**o + (0.0892992079417)*x_ref[2]
            arg[(1, 1, 0, 2)]+=0.924536865856*x[2]**o + (0.352785259899)*x[2]
            ref[(1, 1, 0, 2)]+=0.924536865856*x_ref[2]**o + (0.352785259899)*x_ref[2]
            arg[(1, 1, 0, 3)]+=0.347729508564*x[2]**o + (0.0104006293297)*x[2]
            ref[(1, 1, 0, 3)]+=0.347729508564*x_ref[2]**o + (0.0104006293297)*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.317322816284*x[2]**o + (0.10102755294)*x[2]
            ref[(1, 1, 1, 0)]+=0.317322816284*x_ref[2]**o + (0.10102755294)*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.361477976576*x[2]**o + (0.744561014661)*x[2]
            ref[(1, 1, 1, 1)]+=0.361477976576*x_ref[2]**o + (0.744561014661)*x_ref[2]
            arg[(1, 1, 1, 2)]+=0.0244956336819*x[2]**o + (-0.537772534326)*x[2]
            ref[(1, 1, 1, 2)]+=0.0244956336819*x_ref[2]**o + (-0.537772534326)*x_ref[2]
            arg[(1, 1, 1, 3)]+=0.491048714093*x[2]**o + (-0.0425432753908)*x[2]
            ref[(1, 1, 1, 3)]+=0.491048714093*x_ref[2]**o + (-0.0425432753908)*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.771652175747*x[2]**o + (0.354572277598)*x[2]
            ref[(1, 1, 2, 0)]+=-0.771652175747*x_ref[2]**o + (0.354572277598)*x_ref[2]
            arg[(1, 1, 2, 1)]+=-0.681999467173*x[2]**o + (-0.0715412208826)*x[2]
            ref[(1, 1, 2, 1)]+=-0.681999467173*x_ref[2]**o + (-0.0715412208826)*x_ref[2]
            arg[(1, 1, 2, 2)]+=0.0640361441419*x[2]**o + (0.198177561658)*x[2]
            ref[(1, 1, 2, 2)]+=0.0640361441419*x_ref[2]**o + (0.198177561658)*x_ref[2]
            arg[(1, 1, 2, 3)]+=0.950357885737*x[2]**o + (0.377204295631)*x[2]
            ref[(1, 1, 2, 3)]+=0.950357885737*x_ref[2]**o + (0.377204295631)*x_ref[2]
            arg[(1, 1, 3, 0)]+=0.855324272626*x[2]**o + (0.0643563285917)*x[2]
            ref[(1, 1, 3, 0)]+=0.855324272626*x_ref[2]**o + (0.0643563285917)*x_ref[2]
            arg[(1, 1, 3, 1)]+=0.563869957883*x[2]**o + (-0.479954641108)*x[2]
            ref[(1, 1, 3, 1)]+=0.563869957883*x_ref[2]**o + (-0.479954641108)*x_ref[2]
            arg[(1, 1, 3, 2)]+=-0.821505989217*x[2]**o + (0.0916247180137)*x[2]
            ref[(1, 1, 3, 2)]+=-0.821505989217*x_ref[2]**o + (0.0916247180137)*x_ref[2]
            arg[(1, 1, 3, 3)]+=-0.290479307746*x[2]**o + (0.318832738076)*x[2]
            ref[(1, 1, 3, 3)]+=-0.290479307746*x_ref[2]**o + (0.318832738076)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.175930111896*x[0]**o + (0.473595055473)*x[0] + (-0.237612010244)*x[1]**o + (0.54026461778)*x[1]
        ref=0.175930111896*x_ref[0]**o + (0.473595055473)*x_ref[0] + (-0.237612010244)*x_ref[1]**o + (0.54026461778)*x_ref[1]
        if dim==3:
            arg+=(0.320298055942)*x[2]**o + (-0.91569554958)*x[2]
            ref+=(0.320298055942)*x_ref[2]**o + (-0.91569554958)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=0.94619461447*x[0]**o + (0.841211927281)*x[0] + (-0.151545057478)*x[1]**o + (0.297078083472)*x[1]
        ref[(0,)]=0.94619461447*x_ref[0]**o + (0.841211927281)*x_ref[0] + (-0.151545057478)*x_ref[1]**o + (0.297078083472)*x_ref[1]
        arg[(1,)]=-0.249990356528*x[0]**o + (0.02233755549)*x[0] + (0.43828335033)*x[1]**o + (0.842776692134)*x[1]
        ref[(1,)]=-0.249990356528*x_ref[0]**o + (0.02233755549)*x_ref[0] + (0.43828335033)*x_ref[1]**o + (0.842776692134)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.105880597199*x[2]**o + (-0.976469028785)*x[2]
            ref[(0,)]+=0.105880597199*x_ref[2]**o + (-0.976469028785)*x_ref[2]
            arg[(1,)]+=-0.501786254054*x[2]**o + (0.813420239254)*x[2]
            ref[(1,)]+=-0.501786254054*x_ref[2]**o + (0.813420239254)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref = Data(0,(4, 3),w_ref)
        arg[(0, 0)]=-0.363716866641*x[0]**o + (0.741022536858)*x[0] + (-0.33604595564)*x[1]**o + (-0.540764605241)*x[1]
        ref[(0, 0)]=-0.363716866641*x_ref[0]**o + (0.741022536858)*x_ref[0] + (-0.33604595564)*x_ref[1]**o + (-0.540764605241)*x_ref[1]
        arg[(0, 1)]=0.18058992361*x[0]**o + (-0.200924033689)*x[0] + (0.322254520672)*x[1]**o + (0.293903004156)*x[1]
        ref[(0, 1)]=0.18058992361*x_ref[0]**o + (-0.200924033689)*x_ref[0] + (0.322254520672)*x_ref[1]**o + (0.293903004156)*x_ref[1]
        arg[(0, 2)]=0.15902544881*x[0]**o + (-0.104234532072)*x[0] + (-0.53973985319)*x[1]**o + (0.614708679234)*x[1]
        ref[(0, 2)]=0.15902544881*x_ref[0]**o + (-0.104234532072)*x_ref[0] + (-0.53973985319)*x_ref[1]**o + (0.614708679234)*x_ref[1]
        arg[(1, 0)]=0.387501732249*x[0]**o + (-0.593194762542)*x[0] + (-0.937523079211)*x[1]**o + (0.379224479147)*x[1]
        ref[(1, 0)]=0.387501732249*x_ref[0]**o + (-0.593194762542)*x_ref[0] + (-0.937523079211)*x_ref[1]**o + (0.379224479147)*x_ref[1]
        arg[(1, 1)]=0.00652431444068*x[0]**o + (-0.368421875039)*x[0] + (-0.756868762652)*x[1]**o + (-0.357523213523)*x[1]
        ref[(1, 1)]=0.00652431444068*x_ref[0]**o + (-0.368421875039)*x_ref[0] + (-0.756868762652)*x_ref[1]**o + (-0.357523213523)*x_ref[1]
        arg[(1, 2)]=0.160962327241*x[0]**o + (0.936853842866)*x[0] + (-0.584976186567)*x[1]**o + (0.784137731873)*x[1]
        ref[(1, 2)]=0.160962327241*x_ref[0]**o + (0.936853842866)*x_ref[0] + (-0.584976186567)*x_ref[1]**o + (0.784137731873)*x_ref[1]
        arg[(2, 0)]=0.884308180854*x[0]**o + (0.898342053011)*x[0] + (-0.745202483267)*x[1]**o + (0.526040129513)*x[1]
        ref[(2, 0)]=0.884308180854*x_ref[0]**o + (0.898342053011)*x_ref[0] + (-0.745202483267)*x_ref[1]**o + (0.526040129513)*x_ref[1]
        arg[(2, 1)]=0.346830640089*x[0]**o + (-0.44891129887)*x[0] + (-0.189323682672)*x[1]**o + (0.526829697226)*x[1]
        ref[(2, 1)]=0.346830640089*x_ref[0]**o + (-0.44891129887)*x_ref[0] + (-0.189323682672)*x_ref[1]**o + (0.526829697226)*x_ref[1]
        arg[(2, 2)]=-0.677270620297*x[0]**o + (-0.0519502927547)*x[0] + (-0.403393814805)*x[1]**o + (0.478650536054)*x[1]
        ref[(2, 2)]=-0.677270620297*x_ref[0]**o + (-0.0519502927547)*x_ref[0] + (-0.403393814805)*x_ref[1]**o + (0.478650536054)*x_ref[1]
        arg[(3, 0)]=0.807170040382*x[0]**o + (-0.678195019488)*x[0] + (0.918264558723)*x[1]**o + (0.682137483753)*x[1]
        ref[(3, 0)]=0.807170040382*x_ref[0]**o + (-0.678195019488)*x_ref[0] + (0.918264558723)*x_ref[1]**o + (0.682137483753)*x_ref[1]
        arg[(3, 1)]=-0.888396881188*x[0]**o + (-0.751480379073)*x[0] + (-0.0185578214569)*x[1]**o + (-0.939690225729)*x[1]
        ref[(3, 1)]=-0.888396881188*x_ref[0]**o + (-0.751480379073)*x_ref[0] + (-0.0185578214569)*x_ref[1]**o + (-0.939690225729)*x_ref[1]
        arg[(3, 2)]=0.778660085195*x[0]**o + (0.620585640159)*x[0] + (-0.303425718914)*x[1]**o + (0.391089162611)*x[1]
        ref[(3, 2)]=0.778660085195*x_ref[0]**o + (0.620585640159)*x_ref[0] + (-0.303425718914)*x_ref[1]**o + (0.391089162611)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.174769006395*x[2]**o + (-0.0380608677847)*x[2]
            ref[(0, 0)]+=0.174769006395*x_ref[2]**o + (-0.0380608677847)*x_ref[2]
            arg[(0, 1)]+=0.100164468068*x[2]**o + (0.40936146562)*x[2]
            ref[(0, 1)]+=0.100164468068*x_ref[2]**o + (0.40936146562)*x_ref[2]
            arg[(0, 2)]+=0.255435132276*x[2]**o + (0.0657941574003)*x[2]
            ref[(0, 2)]+=0.255435132276*x_ref[2]**o + (0.0657941574003)*x_ref[2]
            arg[(1, 0)]+=-0.217453293234*x[2]**o + (-0.878492156045)*x[2]
            ref[(1, 0)]+=-0.217453293234*x_ref[2]**o + (-0.878492156045)*x_ref[2]
            arg[(1, 1)]+=-0.926279850511*x[2]**o + (0.406326266638)*x[2]
            ref[(1, 1)]+=-0.926279850511*x_ref[2]**o + (0.406326266638)*x_ref[2]
            arg[(1, 2)]+=-0.103397769616*x[2]**o + (0.681580328248)*x[2]
            ref[(1, 2)]+=-0.103397769616*x_ref[2]**o + (0.681580328248)*x_ref[2]
            arg[(2, 0)]+=0.586064782767*x[2]**o + (0.684232966224)*x[2]
            ref[(2, 0)]+=0.586064782767*x_ref[2]**o + (0.684232966224)*x_ref[2]
            arg[(2, 1)]+=-0.217881175236*x[2]**o + (-0.351964251579)*x[2]
            ref[(2, 1)]+=-0.217881175236*x_ref[2]**o + (-0.351964251579)*x_ref[2]
            arg[(2, 2)]+=0.206154015306*x[2]**o + (-0.158528810755)*x[2]
            ref[(2, 2)]+=0.206154015306*x_ref[2]**o + (-0.158528810755)*x_ref[2]
            arg[(3, 0)]+=-0.503424995716*x[2]**o + (-0.318424063529)*x[2]
            ref[(3, 0)]+=-0.503424995716*x_ref[2]**o + (-0.318424063529)*x_ref[2]
            arg[(3, 1)]+=-0.310312962383*x[2]**o + (0.592548818821)*x[2]
            ref[(3, 1)]+=-0.310312962383*x_ref[2]**o + (0.592548818821)*x_ref[2]
            arg[(3, 2)]+=0.713409427615*x[2]**o + (0.65552943281)*x[2]
            ref[(3, 2)]+=0.713409427615*x_ref[2]**o + (0.65552943281)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 3),w)
        ref = Data(0,(2, 2, 3),w_ref)
        arg[(0, 0, 0)]=0.855789093542*x[0]**o + (0.862821431272)*x[0] + (0.16701226374)*x[1]**o + (-0.682648666061)*x[1]
        ref[(0, 0, 0)]=0.855789093542*x_ref[0]**o + (0.862821431272)*x_ref[0] + (0.16701226374)*x_ref[1]**o + (-0.682648666061)*x_ref[1]
        arg[(0, 0, 1)]=0.00207461570294*x[0]**o + (0.0587208564329)*x[0] + (-0.265969151777)*x[1]**o + (0.567606786567)*x[1]
        ref[(0, 0, 1)]=0.00207461570294*x_ref[0]**o + (0.0587208564329)*x_ref[0] + (-0.265969151777)*x_ref[1]**o + (0.567606786567)*x_ref[1]
        arg[(0, 0, 2)]=0.303253008796*x[0]**o + (0.258930286501)*x[0] + (0.591872524615)*x[1]**o + (0.78682698493)*x[1]
        ref[(0, 0, 2)]=0.303253008796*x_ref[0]**o + (0.258930286501)*x_ref[0] + (0.591872524615)*x_ref[1]**o + (0.78682698493)*x_ref[1]
        arg[(0, 1, 0)]=-0.757232299961*x[0]**o + (-0.253635427769)*x[0] + (0.916883479487)*x[1]**o + (0.391278278521)*x[1]
        ref[(0, 1, 0)]=-0.757232299961*x_ref[0]**o + (-0.253635427769)*x_ref[0] + (0.916883479487)*x_ref[1]**o + (0.391278278521)*x_ref[1]
        arg[(0, 1, 1)]=0.0393236812454*x[0]**o + (-0.234138799395)*x[0] + (0.62594872685)*x[1]**o + (-0.416093194547)*x[1]
        ref[(0, 1, 1)]=0.0393236812454*x_ref[0]**o + (-0.234138799395)*x_ref[0] + (0.62594872685)*x_ref[1]**o + (-0.416093194547)*x_ref[1]
        arg[(0, 1, 2)]=-0.7339692397*x[0]**o + (-0.34598515213)*x[0] + (0.885008826849)*x[1]**o + (-0.162278127092)*x[1]
        ref[(0, 1, 2)]=-0.7339692397*x_ref[0]**o + (-0.34598515213)*x_ref[0] + (0.885008826849)*x_ref[1]**o + (-0.162278127092)*x_ref[1]
        arg[(1, 0, 0)]=0.652421856257*x[0]**o + (-0.185179632177)*x[0] + (-0.977849590662)*x[1]**o + (0.92080398564)*x[1]
        ref[(1, 0, 0)]=0.652421856257*x_ref[0]**o + (-0.185179632177)*x_ref[0] + (-0.977849590662)*x_ref[1]**o + (0.92080398564)*x_ref[1]
        arg[(1, 0, 1)]=0.21426642037*x[0]**o + (0.217006735497)*x[0] + (-0.630844686933)*x[1]**o + (-0.742024619423)*x[1]
        ref[(1, 0, 1)]=0.21426642037*x_ref[0]**o + (0.217006735497)*x_ref[0] + (-0.630844686933)*x_ref[1]**o + (-0.742024619423)*x_ref[1]
        arg[(1, 0, 2)]=0.517033392524*x[0]**o + (-0.0924330687659)*x[0] + (0.52943157719)*x[1]**o + (0.743453552814)*x[1]
        ref[(1, 0, 2)]=0.517033392524*x_ref[0]**o + (-0.0924330687659)*x_ref[0] + (0.52943157719)*x_ref[1]**o + (0.743453552814)*x_ref[1]
        arg[(1, 1, 0)]=0.223527132461*x[0]**o + (0.525153260632)*x[0] + (-0.200900184899)*x[1]**o + (-0.165131961156)*x[1]
        ref[(1, 1, 0)]=0.223527132461*x_ref[0]**o + (0.525153260632)*x_ref[0] + (-0.200900184899)*x_ref[1]**o + (-0.165131961156)*x_ref[1]
        arg[(1, 1, 1)]=-0.272932869829*x[0]**o + (-0.85374406602)*x[0] + (0.645216667289)*x[1]**o + (0.0197228927323)*x[1]
        ref[(1, 1, 1)]=-0.272932869829*x_ref[0]**o + (-0.85374406602)*x_ref[0] + (0.645216667289)*x_ref[1]**o + (0.0197228927323)*x_ref[1]
        arg[(1, 1, 2)]=-0.105233138939*x[0]**o + (-0.41285717689)*x[0] + (-0.776006324581)*x[1]**o + (-0.88012058288)*x[1]
        ref[(1, 1, 2)]=-0.105233138939*x_ref[0]**o + (-0.41285717689)*x_ref[0] + (-0.776006324581)*x_ref[1]**o + (-0.88012058288)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.74201209618*x[2]**o + (-0.372292053031)*x[2]
            ref[(0, 0, 0)]+=-0.74201209618*x_ref[2]**o + (-0.372292053031)*x_ref[2]
            arg[(0, 0, 1)]+=-0.434655441638*x[2]**o + (-0.358701173567)*x[2]
            ref[(0, 0, 1)]+=-0.434655441638*x_ref[2]**o + (-0.358701173567)*x_ref[2]
            arg[(0, 0, 2)]+=-0.544957144024*x[2]**o + (-0.923100305007)*x[2]
            ref[(0, 0, 2)]+=-0.544957144024*x_ref[2]**o + (-0.923100305007)*x_ref[2]
            arg[(0, 1, 0)]+=0.63324343827*x[2]**o + (0.500593123604)*x[2]
            ref[(0, 1, 0)]+=0.63324343827*x_ref[2]**o + (0.500593123604)*x_ref[2]
            arg[(0, 1, 1)]+=0.445806520586*x[2]**o + (-0.911405036832)*x[2]
            ref[(0, 1, 1)]+=0.445806520586*x_ref[2]**o + (-0.911405036832)*x_ref[2]
            arg[(0, 1, 2)]+=-0.557840581809*x[2]**o + (-0.63554592021)*x[2]
            ref[(0, 1, 2)]+=-0.557840581809*x_ref[2]**o + (-0.63554592021)*x_ref[2]
            arg[(1, 0, 0)]+=-0.716263704123*x[2]**o + (-0.970859161123)*x[2]
            ref[(1, 0, 0)]+=-0.716263704123*x_ref[2]**o + (-0.970859161123)*x_ref[2]
            arg[(1, 0, 1)]+=0.0845039809321*x[2]**o + (-0.267662851411)*x[2]
            ref[(1, 0, 1)]+=0.0845039809321*x_ref[2]**o + (-0.267662851411)*x_ref[2]
            arg[(1, 0, 2)]+=0.391552158831*x[2]**o + (0.960685817238)*x[2]
            ref[(1, 0, 2)]+=0.391552158831*x_ref[2]**o + (0.960685817238)*x_ref[2]
            arg[(1, 1, 0)]+=-0.918170857797*x[2]**o + (0.205383597393)*x[2]
            ref[(1, 1, 0)]+=-0.918170857797*x_ref[2]**o + (0.205383597393)*x_ref[2]
            arg[(1, 1, 1)]+=-0.82504658313*x[2]**o + (-0.575531429758)*x[2]
            ref[(1, 1, 1)]+=-0.82504658313*x_ref[2]**o + (-0.575531429758)*x_ref[2]
            arg[(1, 1, 2)]+=-0.276773522941*x[2]**o + (-0.430114108908)*x[2]
            ref[(1, 1, 2)]+=-0.276773522941*x_ref[2]**o + (-0.430114108908)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 2, 3),w)
        ref = Data(0,(3, 3, 2, 3),w_ref)
        arg[(0, 0, 0, 0)]=0.171510060392*x[0]**o + (0.395917056953)*x[0] + (-0.578883105272)*x[1]**o + (-0.785222279918)*x[1]
        ref[(0, 0, 0, 0)]=0.171510060392*x_ref[0]**o + (0.395917056953)*x_ref[0] + (-0.578883105272)*x_ref[1]**o + (-0.785222279918)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.563184527771*x[0]**o + (0.754147831974)*x[0] + (0.11894819711)*x[1]**o + (0.0726481003395)*x[1]
        ref[(0, 0, 0, 1)]=0.563184527771*x_ref[0]**o + (0.754147831974)*x_ref[0] + (0.11894819711)*x_ref[1]**o + (0.0726481003395)*x_ref[1]
        arg[(0, 0, 0, 2)]=-0.755007970601*x[0]**o + (-0.784527779958)*x[0] + (-0.00452495385134)*x[1]**o + (-0.298414556595)*x[1]
        ref[(0, 0, 0, 2)]=-0.755007970601*x_ref[0]**o + (-0.784527779958)*x_ref[0] + (-0.00452495385134)*x_ref[1]**o + (-0.298414556595)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.893953411516*x[0]**o + (-0.045647852254)*x[0] + (-0.604961089936)*x[1]**o + (-0.439944438531)*x[1]
        ref[(0, 0, 1, 0)]=-0.893953411516*x_ref[0]**o + (-0.045647852254)*x_ref[0] + (-0.604961089936)*x_ref[1]**o + (-0.439944438531)*x_ref[1]
        arg[(0, 0, 1, 1)]=-0.448147456023*x[0]**o + (0.522137914238)*x[0] + (0.532072247631)*x[1]**o + (-0.592757018244)*x[1]
        ref[(0, 0, 1, 1)]=-0.448147456023*x_ref[0]**o + (0.522137914238)*x_ref[0] + (0.532072247631)*x_ref[1]**o + (-0.592757018244)*x_ref[1]
        arg[(0, 0, 1, 2)]=0.188745567443*x[0]**o + (0.644192853018)*x[0] + (0.823828386551)*x[1]**o + (0.34100638042)*x[1]
        ref[(0, 0, 1, 2)]=0.188745567443*x_ref[0]**o + (0.644192853018)*x_ref[0] + (0.823828386551)*x_ref[1]**o + (0.34100638042)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.651282570839*x[0]**o + (0.232462762081)*x[0] + (0.90222489828)*x[1]**o + (0.404985480728)*x[1]
        ref[(0, 1, 0, 0)]=-0.651282570839*x_ref[0]**o + (0.232462762081)*x_ref[0] + (0.90222489828)*x_ref[1]**o + (0.404985480728)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.419222972154*x[0]**o + (0.639176874812)*x[0] + (0.731276752555)*x[1]**o + (0.738477872724)*x[1]
        ref[(0, 1, 0, 1)]=0.419222972154*x_ref[0]**o + (0.639176874812)*x_ref[0] + (0.731276752555)*x_ref[1]**o + (0.738477872724)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.0841209431773*x[0]**o + (-0.134918071648)*x[0] + (-0.423130970877)*x[1]**o + (-0.352828083976)*x[1]
        ref[(0, 1, 0, 2)]=0.0841209431773*x_ref[0]**o + (-0.134918071648)*x_ref[0] + (-0.423130970877)*x_ref[1]**o + (-0.352828083976)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.502091553856*x[0]**o + (-0.676519690016)*x[0] + (0.275255150038)*x[1]**o + (-0.361468510123)*x[1]
        ref[(0, 1, 1, 0)]=-0.502091553856*x_ref[0]**o + (-0.676519690016)*x_ref[0] + (0.275255150038)*x_ref[1]**o + (-0.361468510123)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.678379027105*x[0]**o + (0.490097518818)*x[0] + (-0.535277575731)*x[1]**o + (0.65278738735)*x[1]
        ref[(0, 1, 1, 1)]=0.678379027105*x_ref[0]**o + (0.490097518818)*x_ref[0] + (-0.535277575731)*x_ref[1]**o + (0.65278738735)*x_ref[1]
        arg[(0, 1, 1, 2)]=0.590813105954*x[0]**o + (-0.956710595035)*x[0] + (0.415029080935)*x[1]**o + (-0.540027858525)*x[1]
        ref[(0, 1, 1, 2)]=0.590813105954*x_ref[0]**o + (-0.956710595035)*x_ref[0] + (0.415029080935)*x_ref[1]**o + (-0.540027858525)*x_ref[1]
        arg[(0, 2, 0, 0)]=-0.406088953839*x[0]**o + (0.592630431258)*x[0] + (0.341379703301)*x[1]**o + (-0.309049126244)*x[1]
        ref[(0, 2, 0, 0)]=-0.406088953839*x_ref[0]**o + (0.592630431258)*x_ref[0] + (0.341379703301)*x_ref[1]**o + (-0.309049126244)*x_ref[1]
        arg[(0, 2, 0, 1)]=0.615072688459*x[0]**o + (0.178258914236)*x[0] + (0.27049629464)*x[1]**o + (0.623789278979)*x[1]
        ref[(0, 2, 0, 1)]=0.615072688459*x_ref[0]**o + (0.178258914236)*x_ref[0] + (0.27049629464)*x_ref[1]**o + (0.623789278979)*x_ref[1]
        arg[(0, 2, 0, 2)]=0.0219739044313*x[0]**o + (-0.462883959229)*x[0] + (0.318854790542)*x[1]**o + (-0.272028516297)*x[1]
        ref[(0, 2, 0, 2)]=0.0219739044313*x_ref[0]**o + (-0.462883959229)*x_ref[0] + (0.318854790542)*x_ref[1]**o + (-0.272028516297)*x_ref[1]
        arg[(0, 2, 1, 0)]=0.125250829808*x[0]**o + (-0.926083221613)*x[0] + (-0.203698338435)*x[1]**o + (-0.702608835135)*x[1]
        ref[(0, 2, 1, 0)]=0.125250829808*x_ref[0]**o + (-0.926083221613)*x_ref[0] + (-0.203698338435)*x_ref[1]**o + (-0.702608835135)*x_ref[1]
        arg[(0, 2, 1, 1)]=0.0906719180759*x[0]**o + (-0.484725706295)*x[0] + (0.421880852036)*x[1]**o + (0.224824694329)*x[1]
        ref[(0, 2, 1, 1)]=0.0906719180759*x_ref[0]**o + (-0.484725706295)*x_ref[0] + (0.421880852036)*x_ref[1]**o + (0.224824694329)*x_ref[1]
        arg[(0, 2, 1, 2)]=-0.847832987463*x[0]**o + (-0.369722230078)*x[0] + (-0.2973957702)*x[1]**o + (0.346849992562)*x[1]
        ref[(0, 2, 1, 2)]=-0.847832987463*x_ref[0]**o + (-0.369722230078)*x_ref[0] + (-0.2973957702)*x_ref[1]**o + (0.346849992562)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.690297425941*x[0]**o + (0.0145905808091)*x[0] + (0.0551778320284)*x[1]**o + (-0.832256738937)*x[1]
        ref[(1, 0, 0, 0)]=-0.690297425941*x_ref[0]**o + (0.0145905808091)*x_ref[0] + (0.0551778320284)*x_ref[1]**o + (-0.832256738937)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.199635136224*x[0]**o + (-0.0581885868399)*x[0] + (0.607693870117)*x[1]**o + (-0.563063422813)*x[1]
        ref[(1, 0, 0, 1)]=-0.199635136224*x_ref[0]**o + (-0.0581885868399)*x_ref[0] + (0.607693870117)*x_ref[1]**o + (-0.563063422813)*x_ref[1]
        arg[(1, 0, 0, 2)]=-0.674705661981*x[0]**o + (-0.969132280743)*x[0] + (0.776560172558)*x[1]**o + (0.692807718324)*x[1]
        ref[(1, 0, 0, 2)]=-0.674705661981*x_ref[0]**o + (-0.969132280743)*x_ref[0] + (0.776560172558)*x_ref[1]**o + (0.692807718324)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.999665163043*x[0]**o + (0.362143078723)*x[0] + (-0.317356094807)*x[1]**o + (0.878481178798)*x[1]
        ref[(1, 0, 1, 0)]=-0.999665163043*x_ref[0]**o + (0.362143078723)*x_ref[0] + (-0.317356094807)*x_ref[1]**o + (0.878481178798)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.617291640475*x[0]**o + (0.911712781501)*x[0] + (-0.929055372271)*x[1]**o + (-0.577221737525)*x[1]
        ref[(1, 0, 1, 1)]=0.617291640475*x_ref[0]**o + (0.911712781501)*x_ref[0] + (-0.929055372271)*x_ref[1]**o + (-0.577221737525)*x_ref[1]
        arg[(1, 0, 1, 2)]=0.198242106457*x[0]**o + (-0.80929168698)*x[0] + (0.00419499948913)*x[1]**o + (-0.467037681889)*x[1]
        ref[(1, 0, 1, 2)]=0.198242106457*x_ref[0]**o + (-0.80929168698)*x_ref[0] + (0.00419499948913)*x_ref[1]**o + (-0.467037681889)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.439743102735*x[0]**o + (0.521311216266)*x[0] + (0.985269701835)*x[1]**o + (0.511681032989)*x[1]
        ref[(1, 1, 0, 0)]=-0.439743102735*x_ref[0]**o + (0.521311216266)*x_ref[0] + (0.985269701835)*x_ref[1]**o + (0.511681032989)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.128071161515*x[0]**o + (0.431504763649)*x[0] + (0.210975676885)*x[1]**o + (-0.426384170469)*x[1]
        ref[(1, 1, 0, 1)]=0.128071161515*x_ref[0]**o + (0.431504763649)*x_ref[0] + (0.210975676885)*x_ref[1]**o + (-0.426384170469)*x_ref[1]
        arg[(1, 1, 0, 2)]=-0.81377142388*x[0]**o + (-0.863694846876)*x[0] + (0.47017412394)*x[1]**o + (0.419947303356)*x[1]
        ref[(1, 1, 0, 2)]=-0.81377142388*x_ref[0]**o + (-0.863694846876)*x_ref[0] + (0.47017412394)*x_ref[1]**o + (0.419947303356)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.0177237444076*x[0]**o + (-0.806255622512)*x[0] + (0.191510027567)*x[1]**o + (0.250510373906)*x[1]
        ref[(1, 1, 1, 0)]=0.0177237444076*x_ref[0]**o + (-0.806255622512)*x_ref[0] + (0.191510027567)*x_ref[1]**o + (0.250510373906)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.890360581901*x[0]**o + (0.753899822423)*x[0] + (-0.206117728195)*x[1]**o + (-0.611403443076)*x[1]
        ref[(1, 1, 1, 1)]=0.890360581901*x_ref[0]**o + (0.753899822423)*x_ref[0] + (-0.206117728195)*x_ref[1]**o + (-0.611403443076)*x_ref[1]
        arg[(1, 1, 1, 2)]=0.85429896663*x[0]**o + (0.177455593727)*x[0] + (-0.45836286569)*x[1]**o + (0.584201527495)*x[1]
        ref[(1, 1, 1, 2)]=0.85429896663*x_ref[0]**o + (0.177455593727)*x_ref[0] + (-0.45836286569)*x_ref[1]**o + (0.584201527495)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.634573302816*x[0]**o + (-0.295868951717)*x[0] + (-0.892285376216)*x[1]**o + (-0.626048960906)*x[1]
        ref[(1, 2, 0, 0)]=-0.634573302816*x_ref[0]**o + (-0.295868951717)*x_ref[0] + (-0.892285376216)*x_ref[1]**o + (-0.626048960906)*x_ref[1]
        arg[(1, 2, 0, 1)]=0.0846474770162*x[0]**o + (0.577930965703)*x[0] + (0.433550849935)*x[1]**o + (-0.443955496924)*x[1]
        ref[(1, 2, 0, 1)]=0.0846474770162*x_ref[0]**o + (0.577930965703)*x_ref[0] + (0.433550849935)*x_ref[1]**o + (-0.443955496924)*x_ref[1]
        arg[(1, 2, 0, 2)]=0.649002022983*x[0]**o + (-0.773068024406)*x[0] + (0.971714819448)*x[1]**o + (0.631534884391)*x[1]
        ref[(1, 2, 0, 2)]=0.649002022983*x_ref[0]**o + (-0.773068024406)*x_ref[0] + (0.971714819448)*x_ref[1]**o + (0.631534884391)*x_ref[1]
        arg[(1, 2, 1, 0)]=-0.0600262680234*x[0]**o + (0.380982381397)*x[0] + (-0.573740793825)*x[1]**o + (0.860598436139)*x[1]
        ref[(1, 2, 1, 0)]=-0.0600262680234*x_ref[0]**o + (0.380982381397)*x_ref[0] + (-0.573740793825)*x_ref[1]**o + (0.860598436139)*x_ref[1]
        arg[(1, 2, 1, 1)]=0.63591943566*x[0]**o + (-0.0346511211412)*x[0] + (-0.158558151968)*x[1]**o + (0.468963134263)*x[1]
        ref[(1, 2, 1, 1)]=0.63591943566*x_ref[0]**o + (-0.0346511211412)*x_ref[0] + (-0.158558151968)*x_ref[1]**o + (0.468963134263)*x_ref[1]
        arg[(1, 2, 1, 2)]=-0.437988165548*x[0]**o + (-0.521061116058)*x[0] + (0.956483437861)*x[1]**o + (-0.6109600743)*x[1]
        ref[(1, 2, 1, 2)]=-0.437988165548*x_ref[0]**o + (-0.521061116058)*x_ref[0] + (0.956483437861)*x_ref[1]**o + (-0.6109600743)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.49089361903*x[0]**o + (-0.982566992382)*x[0] + (0.594274073503)*x[1]**o + (0.180123297879)*x[1]
        ref[(2, 0, 0, 0)]=0.49089361903*x_ref[0]**o + (-0.982566992382)*x_ref[0] + (0.594274073503)*x_ref[1]**o + (0.180123297879)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.111409693229*x[0]**o + (0.274854087665)*x[0] + (0.995753390074)*x[1]**o + (0.737611765856)*x[1]
        ref[(2, 0, 0, 1)]=0.111409693229*x_ref[0]**o + (0.274854087665)*x_ref[0] + (0.995753390074)*x_ref[1]**o + (0.737611765856)*x_ref[1]
        arg[(2, 0, 0, 2)]=-0.639212737424*x[0]**o + (0.658770501138)*x[0] + (-0.278256168978)*x[1]**o + (-0.00575672678991)*x[1]
        ref[(2, 0, 0, 2)]=-0.639212737424*x_ref[0]**o + (0.658770501138)*x_ref[0] + (-0.278256168978)*x_ref[1]**o + (-0.00575672678991)*x_ref[1]
        arg[(2, 0, 1, 0)]=-0.125825565326*x[0]**o + (0.179737120103)*x[0] + (-0.736278317212)*x[1]**o + (-0.692952909308)*x[1]
        ref[(2, 0, 1, 0)]=-0.125825565326*x_ref[0]**o + (0.179737120103)*x_ref[0] + (-0.736278317212)*x_ref[1]**o + (-0.692952909308)*x_ref[1]
        arg[(2, 0, 1, 1)]=-0.782391007954*x[0]**o + (0.243560547593)*x[0] + (0.546416052553)*x[1]**o + (0.862070281627)*x[1]
        ref[(2, 0, 1, 1)]=-0.782391007954*x_ref[0]**o + (0.243560547593)*x_ref[0] + (0.546416052553)*x_ref[1]**o + (0.862070281627)*x_ref[1]
        arg[(2, 0, 1, 2)]=0.951793646833*x[0]**o + (-0.724317960242)*x[0] + (-0.708892521895)*x[1]**o + (-0.0958558054276)*x[1]
        ref[(2, 0, 1, 2)]=0.951793646833*x_ref[0]**o + (-0.724317960242)*x_ref[0] + (-0.708892521895)*x_ref[1]**o + (-0.0958558054276)*x_ref[1]
        arg[(2, 1, 0, 0)]=-0.316317489512*x[0]**o + (0.61925007619)*x[0] + (-0.0108000384169)*x[1]**o + (-0.889124790188)*x[1]
        ref[(2, 1, 0, 0)]=-0.316317489512*x_ref[0]**o + (0.61925007619)*x_ref[0] + (-0.0108000384169)*x_ref[1]**o + (-0.889124790188)*x_ref[1]
        arg[(2, 1, 0, 1)]=-0.029910194817*x[0]**o + (0.931789533685)*x[0] + (0.155361896813)*x[1]**o + (0.740948356685)*x[1]
        ref[(2, 1, 0, 1)]=-0.029910194817*x_ref[0]**o + (0.931789533685)*x_ref[0] + (0.155361896813)*x_ref[1]**o + (0.740948356685)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.143331250851*x[0]**o + (-0.2441388346)*x[0] + (-0.273463260756)*x[1]**o + (-0.670746602167)*x[1]
        ref[(2, 1, 0, 2)]=-0.143331250851*x_ref[0]**o + (-0.2441388346)*x_ref[0] + (-0.273463260756)*x_ref[1]**o + (-0.670746602167)*x_ref[1]
        arg[(2, 1, 1, 0)]=0.12586129609*x[0]**o + (0.222958880432)*x[0] + (0.942320627705)*x[1]**o + (0.993547679458)*x[1]
        ref[(2, 1, 1, 0)]=0.12586129609*x_ref[0]**o + (0.222958880432)*x_ref[0] + (0.942320627705)*x_ref[1]**o + (0.993547679458)*x_ref[1]
        arg[(2, 1, 1, 1)]=0.820714000658*x[0]**o + (-0.208038515174)*x[0] + (-0.634561059223)*x[1]**o + (-0.872445825238)*x[1]
        ref[(2, 1, 1, 1)]=0.820714000658*x_ref[0]**o + (-0.208038515174)*x_ref[0] + (-0.634561059223)*x_ref[1]**o + (-0.872445825238)*x_ref[1]
        arg[(2, 1, 1, 2)]=-0.873897722574*x[0]**o + (0.775126273516)*x[0] + (-0.0509091342996)*x[1]**o + (-0.782696070447)*x[1]
        ref[(2, 1, 1, 2)]=-0.873897722574*x_ref[0]**o + (0.775126273516)*x_ref[0] + (-0.0509091342996)*x_ref[1]**o + (-0.782696070447)*x_ref[1]
        arg[(2, 2, 0, 0)]=0.0370272028537*x[0]**o + (0.242689856555)*x[0] + (-0.449683703836)*x[1]**o + (0.496245005947)*x[1]
        ref[(2, 2, 0, 0)]=0.0370272028537*x_ref[0]**o + (0.242689856555)*x_ref[0] + (-0.449683703836)*x_ref[1]**o + (0.496245005947)*x_ref[1]
        arg[(2, 2, 0, 1)]=0.328020091658*x[0]**o + (-0.0799076784274)*x[0] + (0.651046993686)*x[1]**o + (-0.619324048006)*x[1]
        ref[(2, 2, 0, 1)]=0.328020091658*x_ref[0]**o + (-0.0799076784274)*x_ref[0] + (0.651046993686)*x_ref[1]**o + (-0.619324048006)*x_ref[1]
        arg[(2, 2, 0, 2)]=-0.62737093406*x[0]**o + (-0.715672924754)*x[0] + (-0.782713304289)*x[1]**o + (0.54681329976)*x[1]
        ref[(2, 2, 0, 2)]=-0.62737093406*x_ref[0]**o + (-0.715672924754)*x_ref[0] + (-0.782713304289)*x_ref[1]**o + (0.54681329976)*x_ref[1]
        arg[(2, 2, 1, 0)]=-0.767466688967*x[0]**o + (-0.820866488315)*x[0] + (0.352630868137)*x[1]**o + (-0.292410083342)*x[1]
        ref[(2, 2, 1, 0)]=-0.767466688967*x_ref[0]**o + (-0.820866488315)*x_ref[0] + (0.352630868137)*x_ref[1]**o + (-0.292410083342)*x_ref[1]
        arg[(2, 2, 1, 1)]=0.726122411242*x[0]**o + (-0.823924976887)*x[0] + (-0.789768323257)*x[1]**o + (0.123850522284)*x[1]
        ref[(2, 2, 1, 1)]=0.726122411242*x_ref[0]**o + (-0.823924976887)*x_ref[0] + (-0.789768323257)*x_ref[1]**o + (0.123850522284)*x_ref[1]
        arg[(2, 2, 1, 2)]=0.251360084883*x[0]**o + (-0.941423896951)*x[0] + (-0.729679341668)*x[1]**o + (0.43459729598)*x[1]
        ref[(2, 2, 1, 2)]=0.251360084883*x_ref[0]**o + (-0.941423896951)*x_ref[0] + (-0.729679341668)*x_ref[1]**o + (0.43459729598)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.755145963848*x[2]**o + (-0.20426044599)*x[2]
            ref[(0, 0, 0, 0)]+=0.755145963848*x_ref[2]**o + (-0.20426044599)*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.135815682704*x[2]**o + (-0.36070547769)*x[2]
            ref[(0, 0, 0, 1)]+=0.135815682704*x_ref[2]**o + (-0.36070547769)*x_ref[2]
            arg[(0, 0, 0, 2)]+=-0.768258240127*x[2]**o + (0.664522319864)*x[2]
            ref[(0, 0, 0, 2)]+=-0.768258240127*x_ref[2]**o + (0.664522319864)*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.519534037776*x[2]**o + (-0.392986783303)*x[2]
            ref[(0, 0, 1, 0)]+=0.519534037776*x_ref[2]**o + (-0.392986783303)*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.876921387929*x[2]**o + (-0.546888158413)*x[2]
            ref[(0, 0, 1, 1)]+=0.876921387929*x_ref[2]**o + (-0.546888158413)*x_ref[2]
            arg[(0, 0, 1, 2)]+=0.462720733643*x[2]**o + (-0.230247646142)*x[2]
            ref[(0, 0, 1, 2)]+=0.462720733643*x_ref[2]**o + (-0.230247646142)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.0519265046786*x[2]**o + (-0.430226131921)*x[2]
            ref[(0, 1, 0, 0)]+=-0.0519265046786*x_ref[2]**o + (-0.430226131921)*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.490206308711*x[2]**o + (-0.386305583465)*x[2]
            ref[(0, 1, 0, 1)]+=-0.490206308711*x_ref[2]**o + (-0.386305583465)*x_ref[2]
            arg[(0, 1, 0, 2)]+=-0.61989796898*x[2]**o + (-0.163237274994)*x[2]
            ref[(0, 1, 0, 2)]+=-0.61989796898*x_ref[2]**o + (-0.163237274994)*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.314288598611*x[2]**o + (0.303563357975)*x[2]
            ref[(0, 1, 1, 0)]+=0.314288598611*x_ref[2]**o + (0.303563357975)*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.628107347423*x[2]**o + (0.27609867172)*x[2]
            ref[(0, 1, 1, 1)]+=-0.628107347423*x_ref[2]**o + (0.27609867172)*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.163385201419*x[2]**o + (0.489583923024)*x[2]
            ref[(0, 1, 1, 2)]+=0.163385201419*x_ref[2]**o + (0.489583923024)*x_ref[2]
            arg[(0, 2, 0, 0)]+=0.970416248141*x[2]**o + (-0.216612135422)*x[2]
            ref[(0, 2, 0, 0)]+=0.970416248141*x_ref[2]**o + (-0.216612135422)*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.426422148804*x[2]**o + (-0.33370465489)*x[2]
            ref[(0, 2, 0, 1)]+=-0.426422148804*x_ref[2]**o + (-0.33370465489)*x_ref[2]
            arg[(0, 2, 0, 2)]+=-0.234040358695*x[2]**o + (-0.832502943586)*x[2]
            ref[(0, 2, 0, 2)]+=-0.234040358695*x_ref[2]**o + (-0.832502943586)*x_ref[2]
            arg[(0, 2, 1, 0)]+=0.263138022345*x[2]**o + (0.3093056476)*x[2]
            ref[(0, 2, 1, 0)]+=0.263138022345*x_ref[2]**o + (0.3093056476)*x_ref[2]
            arg[(0, 2, 1, 1)]+=0.679389831934*x[2]**o + (0.214604660422)*x[2]
            ref[(0, 2, 1, 1)]+=0.679389831934*x_ref[2]**o + (0.214604660422)*x_ref[2]
            arg[(0, 2, 1, 2)]+=0.960535579965*x[2]**o + (-0.623533445271)*x[2]
            ref[(0, 2, 1, 2)]+=0.960535579965*x_ref[2]**o + (-0.623533445271)*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.541398167669*x[2]**o + (0.594847499232)*x[2]
            ref[(1, 0, 0, 0)]+=0.541398167669*x_ref[2]**o + (0.594847499232)*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.893169451602*x[2]**o + (0.756596333054)*x[2]
            ref[(1, 0, 0, 1)]+=0.893169451602*x_ref[2]**o + (0.756596333054)*x_ref[2]
            arg[(1, 0, 0, 2)]+=-0.690615638115*x[2]**o + (-0.330990198136)*x[2]
            ref[(1, 0, 0, 2)]+=-0.690615638115*x_ref[2]**o + (-0.330990198136)*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.0315608907026*x[2]**o + (-0.960473431911)*x[2]
            ref[(1, 0, 1, 0)]+=0.0315608907026*x_ref[2]**o + (-0.960473431911)*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.936545556473*x[2]**o + (-0.434687949329)*x[2]
            ref[(1, 0, 1, 1)]+=0.936545556473*x_ref[2]**o + (-0.434687949329)*x_ref[2]
            arg[(1, 0, 1, 2)]+=0.0368112218492*x[2]**o + (0.238179831677)*x[2]
            ref[(1, 0, 1, 2)]+=0.0368112218492*x_ref[2]**o + (0.238179831677)*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.90861990291*x[2]**o + (-0.729924547362)*x[2]
            ref[(1, 1, 0, 0)]+=-0.90861990291*x_ref[2]**o + (-0.729924547362)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.198419151063*x[2]**o + (-0.663383295551)*x[2]
            ref[(1, 1, 0, 1)]+=0.198419151063*x_ref[2]**o + (-0.663383295551)*x_ref[2]
            arg[(1, 1, 0, 2)]+=-0.264055867489*x[2]**o + (-0.255951615759)*x[2]
            ref[(1, 1, 0, 2)]+=-0.264055867489*x_ref[2]**o + (-0.255951615759)*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.0446927866719*x[2]**o + (0.204624437928)*x[2]
            ref[(1, 1, 1, 0)]+=0.0446927866719*x_ref[2]**o + (0.204624437928)*x_ref[2]
            arg[(1, 1, 1, 1)]+=-0.212733876074*x[2]**o + (0.371069404684)*x[2]
            ref[(1, 1, 1, 1)]+=-0.212733876074*x_ref[2]**o + (0.371069404684)*x_ref[2]
            arg[(1, 1, 1, 2)]+=0.236883593547*x[2]**o + (0.370041707782)*x[2]
            ref[(1, 1, 1, 2)]+=0.236883593547*x_ref[2]**o + (0.370041707782)*x_ref[2]
            arg[(1, 2, 0, 0)]+=-0.204575222048*x[2]**o + (-0.23013311825)*x[2]
            ref[(1, 2, 0, 0)]+=-0.204575222048*x_ref[2]**o + (-0.23013311825)*x_ref[2]
            arg[(1, 2, 0, 1)]+=0.182729767815*x[2]**o + (0.412195593848)*x[2]
            ref[(1, 2, 0, 1)]+=0.182729767815*x_ref[2]**o + (0.412195593848)*x_ref[2]
            arg[(1, 2, 0, 2)]+=-0.59076914845*x[2]**o + (0.592270594623)*x[2]
            ref[(1, 2, 0, 2)]+=-0.59076914845*x_ref[2]**o + (0.592270594623)*x_ref[2]
            arg[(1, 2, 1, 0)]+=-0.945634160286*x[2]**o + (0.896746903742)*x[2]
            ref[(1, 2, 1, 0)]+=-0.945634160286*x_ref[2]**o + (0.896746903742)*x_ref[2]
            arg[(1, 2, 1, 1)]+=-0.38212627527*x[2]**o + (-0.0516103799485)*x[2]
            ref[(1, 2, 1, 1)]+=-0.38212627527*x_ref[2]**o + (-0.0516103799485)*x_ref[2]
            arg[(1, 2, 1, 2)]+=0.107676613749*x[2]**o + (0.0419234268567)*x[2]
            ref[(1, 2, 1, 2)]+=0.107676613749*x_ref[2]**o + (0.0419234268567)*x_ref[2]
            arg[(2, 0, 0, 0)]+=0.509222868585*x[2]**o + (-0.470100054396)*x[2]
            ref[(2, 0, 0, 0)]+=0.509222868585*x_ref[2]**o + (-0.470100054396)*x_ref[2]
            arg[(2, 0, 0, 1)]+=-0.134258102798*x[2]**o + (-0.128938301849)*x[2]
            ref[(2, 0, 0, 1)]+=-0.134258102798*x_ref[2]**o + (-0.128938301849)*x_ref[2]
            arg[(2, 0, 0, 2)]+=0.433712522468*x[2]**o + (-0.263046458105)*x[2]
            ref[(2, 0, 0, 2)]+=0.433712522468*x_ref[2]**o + (-0.263046458105)*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.0877648266517*x[2]**o + (0.986584755424)*x[2]
            ref[(2, 0, 1, 0)]+=-0.0877648266517*x_ref[2]**o + (0.986584755424)*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.694252802155*x[2]**o + (0.579196587115)*x[2]
            ref[(2, 0, 1, 1)]+=0.694252802155*x_ref[2]**o + (0.579196587115)*x_ref[2]
            arg[(2, 0, 1, 2)]+=0.225797161787*x[2]**o + (0.39217707512)*x[2]
            ref[(2, 0, 1, 2)]+=0.225797161787*x_ref[2]**o + (0.39217707512)*x_ref[2]
            arg[(2, 1, 0, 0)]+=-0.231953030228*x[2]**o + (0.634872244516)*x[2]
            ref[(2, 1, 0, 0)]+=-0.231953030228*x_ref[2]**o + (0.634872244516)*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.13509477581*x[2]**o + (-0.903684138454)*x[2]
            ref[(2, 1, 0, 1)]+=-0.13509477581*x_ref[2]**o + (-0.903684138454)*x_ref[2]
            arg[(2, 1, 0, 2)]+=0.836292863604*x[2]**o + (-0.750074143141)*x[2]
            ref[(2, 1, 0, 2)]+=0.836292863604*x_ref[2]**o + (-0.750074143141)*x_ref[2]
            arg[(2, 1, 1, 0)]+=-0.81390971644*x[2]**o + (0.854571915263)*x[2]
            ref[(2, 1, 1, 0)]+=-0.81390971644*x_ref[2]**o + (0.854571915263)*x_ref[2]
            arg[(2, 1, 1, 1)]+=-0.43023136681*x[2]**o + (0.687032916791)*x[2]
            ref[(2, 1, 1, 1)]+=-0.43023136681*x_ref[2]**o + (0.687032916791)*x_ref[2]
            arg[(2, 1, 1, 2)]+=-0.652588870517*x[2]**o + (-0.593091610904)*x[2]
            ref[(2, 1, 1, 2)]+=-0.652588870517*x_ref[2]**o + (-0.593091610904)*x_ref[2]
            arg[(2, 2, 0, 0)]+=0.797095023807*x[2]**o + (-0.350914598589)*x[2]
            ref[(2, 2, 0, 0)]+=0.797095023807*x_ref[2]**o + (-0.350914598589)*x_ref[2]
            arg[(2, 2, 0, 1)]+=0.820771015647*x[2]**o + (-0.863522642462)*x[2]
            ref[(2, 2, 0, 1)]+=0.820771015647*x_ref[2]**o + (-0.863522642462)*x_ref[2]
            arg[(2, 2, 0, 2)]+=-0.676835357217*x[2]**o + (0.603731071748)*x[2]
            ref[(2, 2, 0, 2)]+=-0.676835357217*x_ref[2]**o + (0.603731071748)*x_ref[2]
            arg[(2, 2, 1, 0)]+=0.65384433508*x[2]**o + (-0.200919701409)*x[2]
            ref[(2, 2, 1, 0)]+=0.65384433508*x_ref[2]**o + (-0.200919701409)*x_ref[2]
            arg[(2, 2, 1, 1)]+=0.535121784544*x[2]**o + (0.395196635275)*x[2]
            ref[(2, 2, 1, 1)]+=0.535121784544*x_ref[2]**o + (0.395196635275)*x_ref[2]
            arg[(2, 2, 1, 2)]+=-0.730792104424*x[2]**o + (-0.863383356261)*x[2]
            ref[(2, 2, 1, 2)]+=-0.730792104424*x_ref[2]**o + (-0.863383356261)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_ReducedSolution_rank0(self):
        """
        tests interpolation of rank 0 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.967983959929*x[0] + (-0.970511750401)*x[1]
        ref=-0.967983959929*x_ref[0] + (-0.970511750401)*x_ref[1]
        if dim==3:
            arg+=(0.920536599308)*x[2]
            ref+=(0.920536599308)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_ReducedSolution_rank1(self):
        """
        tests interpolation of rank 1 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=0.458392051292*x[0] + (0.251646244599)*x[1]
        ref[(0,)]=0.458392051292*x_ref[0] + (0.251646244599)*x_ref[1]
        arg[(1,)]=0.882661598128*x[0] + (0.190085948493)*x[1]
        ref[(1,)]=0.882661598128*x_ref[0] + (0.190085948493)*x_ref[1]
        arg[(2,)]=-0.101190230203*x[0] + (-0.629740915109)*x[1]
        ref[(2,)]=-0.101190230203*x_ref[0] + (-0.629740915109)*x_ref[1]
        arg[(3,)]=0.99722390472*x[0] + (0.2087201871)*x[1]
        ref[(3,)]=0.99722390472*x_ref[0] + (0.2087201871)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.102182497146*x[2]
            ref[(0,)]+=-0.102182497146*x_ref[2]
            arg[(1,)]+=0.151087860217*x[2]
            ref[(1,)]+=0.151087860217*x_ref[2]
            arg[(2,)]+=-0.120165771134*x[2]
            ref[(2,)]+=-0.120165771134*x_ref[2]
            arg[(3,)]+=-0.400541041607*x[2]
            ref[(3,)]+=-0.400541041607*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_ReducedSolution_rank2(self):
        """
        tests interpolation of rank 2 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref = Data(0,(4, 4),w_ref)
        arg[(0, 0)]=-0.203683556818*x[0] + (0.118224649259)*x[1]
        ref[(0, 0)]=-0.203683556818*x_ref[0] + (0.118224649259)*x_ref[1]
        arg[(0, 1)]=-0.915846100666*x[0] + (-0.64684972337)*x[1]
        ref[(0, 1)]=-0.915846100666*x_ref[0] + (-0.64684972337)*x_ref[1]
        arg[(0, 2)]=-0.589190119848*x[0] + (-0.0553392028031)*x[1]
        ref[(0, 2)]=-0.589190119848*x_ref[0] + (-0.0553392028031)*x_ref[1]
        arg[(0, 3)]=0.49513426995*x[0] + (0.35667099733)*x[1]
        ref[(0, 3)]=0.49513426995*x_ref[0] + (0.35667099733)*x_ref[1]
        arg[(1, 0)]=0.729327146131*x[0] + (-0.97715966368)*x[1]
        ref[(1, 0)]=0.729327146131*x_ref[0] + (-0.97715966368)*x_ref[1]
        arg[(1, 1)]=-0.836923141075*x[0] + (-0.955465577447)*x[1]
        ref[(1, 1)]=-0.836923141075*x_ref[0] + (-0.955465577447)*x_ref[1]
        arg[(1, 2)]=-0.323268206398*x[0] + (0.561168485497)*x[1]
        ref[(1, 2)]=-0.323268206398*x_ref[0] + (0.561168485497)*x_ref[1]
        arg[(1, 3)]=-0.975453016326*x[0] + (0.292937625274)*x[1]
        ref[(1, 3)]=-0.975453016326*x_ref[0] + (0.292937625274)*x_ref[1]
        arg[(2, 0)]=-0.203676527137*x[0] + (-0.145016254359)*x[1]
        ref[(2, 0)]=-0.203676527137*x_ref[0] + (-0.145016254359)*x_ref[1]
        arg[(2, 1)]=-0.760841402673*x[0] + (0.75626894079)*x[1]
        ref[(2, 1)]=-0.760841402673*x_ref[0] + (0.75626894079)*x_ref[1]
        arg[(2, 2)]=0.547302200061*x[0] + (-0.119276947383)*x[1]
        ref[(2, 2)]=0.547302200061*x_ref[0] + (-0.119276947383)*x_ref[1]
        arg[(2, 3)]=-0.850827166322*x[0] + (-0.144270591217)*x[1]
        ref[(2, 3)]=-0.850827166322*x_ref[0] + (-0.144270591217)*x_ref[1]
        arg[(3, 0)]=0.123750714123*x[0] + (-0.935652723714)*x[1]
        ref[(3, 0)]=0.123750714123*x_ref[0] + (-0.935652723714)*x_ref[1]
        arg[(3, 1)]=-0.0249066664988*x[0] + (0.969702946008)*x[1]
        ref[(3, 1)]=-0.0249066664988*x_ref[0] + (0.969702946008)*x_ref[1]
        arg[(3, 2)]=-0.379253367109*x[0] + (-0.829104018043)*x[1]
        ref[(3, 2)]=-0.379253367109*x_ref[0] + (-0.829104018043)*x_ref[1]
        arg[(3, 3)]=-0.34533329873*x[0] + (0.271019775557)*x[1]
        ref[(3, 3)]=-0.34533329873*x_ref[0] + (0.271019775557)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.22768898782*x[2]
            ref[(0, 0)]+=-0.22768898782*x_ref[2]
            arg[(0, 1)]+=-0.49929769423*x[2]
            ref[(0, 1)]+=-0.49929769423*x_ref[2]
            arg[(0, 2)]+=-0.223066181227*x[2]
            ref[(0, 2)]+=-0.223066181227*x_ref[2]
            arg[(0, 3)]+=-0.219609933284*x[2]
            ref[(0, 3)]+=-0.219609933284*x_ref[2]
            arg[(1, 0)]+=0.897066482395*x[2]
            ref[(1, 0)]+=0.897066482395*x_ref[2]
            arg[(1, 1)]+=-0.703327630804*x[2]
            ref[(1, 1)]+=-0.703327630804*x_ref[2]
            arg[(1, 2)]+=0.47391666343*x[2]
            ref[(1, 2)]+=0.47391666343*x_ref[2]
            arg[(1, 3)]+=0.180205380151*x[2]
            ref[(1, 3)]+=0.180205380151*x_ref[2]
            arg[(2, 0)]+=0.149389946131*x[2]
            ref[(2, 0)]+=0.149389946131*x_ref[2]
            arg[(2, 1)]+=-0.468764042694*x[2]
            ref[(2, 1)]+=-0.468764042694*x_ref[2]
            arg[(2, 2)]+=-0.712316912159*x[2]
            ref[(2, 2)]+=-0.712316912159*x_ref[2]
            arg[(2, 3)]+=0.33348976855*x[2]
            ref[(2, 3)]+=0.33348976855*x_ref[2]
            arg[(3, 0)]+=0.303655876908*x[2]
            ref[(3, 0)]+=0.303655876908*x_ref[2]
            arg[(3, 1)]+=-0.0807801818598*x[2]
            ref[(3, 1)]+=-0.0807801818598*x_ref[2]
            arg[(3, 2)]+=0.302628663285*x[2]
            ref[(3, 2)]+=0.302628663285*x_ref[2]
            arg[(3, 3)]+=-0.627574832503*x[2]
            ref[(3, 3)]+=-0.627574832503*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_ReducedSolution_rank3(self):
        """
        tests interpolation of rank 3 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 3),w)
        ref = Data(0,(2, 3, 3),w_ref)
        arg[(0, 0, 0)]=0.816665098751*x[0] + (0.00899067104422)*x[1]
        ref[(0, 0, 0)]=0.816665098751*x_ref[0] + (0.00899067104422)*x_ref[1]
        arg[(0, 0, 1)]=0.636581269625*x[0] + (0.398681432406)*x[1]
        ref[(0, 0, 1)]=0.636581269625*x_ref[0] + (0.398681432406)*x_ref[1]
        arg[(0, 0, 2)]=0.611017507532*x[0] + (0.125585589443)*x[1]
        ref[(0, 0, 2)]=0.611017507532*x_ref[0] + (0.125585589443)*x_ref[1]
        arg[(0, 1, 0)]=0.313596505939*x[0] + (-0.531398482891)*x[1]
        ref[(0, 1, 0)]=0.313596505939*x_ref[0] + (-0.531398482891)*x_ref[1]
        arg[(0, 1, 1)]=0.974627089897*x[0] + (0.268527752833)*x[1]
        ref[(0, 1, 1)]=0.974627089897*x_ref[0] + (0.268527752833)*x_ref[1]
        arg[(0, 1, 2)]=-0.388827373862*x[0] + (-0.295273375954)*x[1]
        ref[(0, 1, 2)]=-0.388827373862*x_ref[0] + (-0.295273375954)*x_ref[1]
        arg[(0, 2, 0)]=0.4408437015*x[0] + (-0.92605652898)*x[1]
        ref[(0, 2, 0)]=0.4408437015*x_ref[0] + (-0.92605652898)*x_ref[1]
        arg[(0, 2, 1)]=-0.715279723979*x[0] + (0.268625725997)*x[1]
        ref[(0, 2, 1)]=-0.715279723979*x_ref[0] + (0.268625725997)*x_ref[1]
        arg[(0, 2, 2)]=0.494098741292*x[0] + (0.787250414677)*x[1]
        ref[(0, 2, 2)]=0.494098741292*x_ref[0] + (0.787250414677)*x_ref[1]
        arg[(1, 0, 0)]=-0.551475315051*x[0] + (-0.0399176946307)*x[1]
        ref[(1, 0, 0)]=-0.551475315051*x_ref[0] + (-0.0399176946307)*x_ref[1]
        arg[(1, 0, 1)]=0.0764390507746*x[0] + (0.504642899138)*x[1]
        ref[(1, 0, 1)]=0.0764390507746*x_ref[0] + (0.504642899138)*x_ref[1]
        arg[(1, 0, 2)]=-0.607805328062*x[0] + (-0.414597681764)*x[1]
        ref[(1, 0, 2)]=-0.607805328062*x_ref[0] + (-0.414597681764)*x_ref[1]
        arg[(1, 1, 0)]=-0.710037905051*x[0] + (0.559989321466)*x[1]
        ref[(1, 1, 0)]=-0.710037905051*x_ref[0] + (0.559989321466)*x_ref[1]
        arg[(1, 1, 1)]=-0.629274056881*x[0] + (0.33305986695)*x[1]
        ref[(1, 1, 1)]=-0.629274056881*x_ref[0] + (0.33305986695)*x_ref[1]
        arg[(1, 1, 2)]=-0.687606678316*x[0] + (0.612053758251)*x[1]
        ref[(1, 1, 2)]=-0.687606678316*x_ref[0] + (0.612053758251)*x_ref[1]
        arg[(1, 2, 0)]=-0.982045389141*x[0] + (-0.589509313201)*x[1]
        ref[(1, 2, 0)]=-0.982045389141*x_ref[0] + (-0.589509313201)*x_ref[1]
        arg[(1, 2, 1)]=-0.412595498669*x[0] + (-0.572333714458)*x[1]
        ref[(1, 2, 1)]=-0.412595498669*x_ref[0] + (-0.572333714458)*x_ref[1]
        arg[(1, 2, 2)]=0.215600457607*x[0] + (-0.298845636752)*x[1]
        ref[(1, 2, 2)]=0.215600457607*x_ref[0] + (-0.298845636752)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.609462505843*x[2]
            ref[(0, 0, 0)]+=-0.609462505843*x_ref[2]
            arg[(0, 0, 1)]+=0.292838255698*x[2]
            ref[(0, 0, 1)]+=0.292838255698*x_ref[2]
            arg[(0, 0, 2)]+=0.271335416314*x[2]
            ref[(0, 0, 2)]+=0.271335416314*x_ref[2]
            arg[(0, 1, 0)]+=-0.446746044483*x[2]
            ref[(0, 1, 0)]+=-0.446746044483*x_ref[2]
            arg[(0, 1, 1)]+=0.131448098113*x[2]
            ref[(0, 1, 1)]+=0.131448098113*x_ref[2]
            arg[(0, 1, 2)]+=0.609321869544*x[2]
            ref[(0, 1, 2)]+=0.609321869544*x_ref[2]
            arg[(0, 2, 0)]+=-0.500500439334*x[2]
            ref[(0, 2, 0)]+=-0.500500439334*x_ref[2]
            arg[(0, 2, 1)]+=-0.0566578138722*x[2]
            ref[(0, 2, 1)]+=-0.0566578138722*x_ref[2]
            arg[(0, 2, 2)]+=-0.998253017293*x[2]
            ref[(0, 2, 2)]+=-0.998253017293*x_ref[2]
            arg[(1, 0, 0)]+=-0.414452728996*x[2]
            ref[(1, 0, 0)]+=-0.414452728996*x_ref[2]
            arg[(1, 0, 1)]+=-0.835308391145*x[2]
            ref[(1, 0, 1)]+=-0.835308391145*x_ref[2]
            arg[(1, 0, 2)]+=-0.818697984547*x[2]
            ref[(1, 0, 2)]+=-0.818697984547*x_ref[2]
            arg[(1, 1, 0)]+=0.968592019335*x[2]
            ref[(1, 1, 0)]+=0.968592019335*x_ref[2]
            arg[(1, 1, 1)]+=-0.73119384463*x[2]
            ref[(1, 1, 1)]+=-0.73119384463*x_ref[2]
            arg[(1, 1, 2)]+=-0.357555302795*x[2]
            ref[(1, 1, 2)]+=-0.357555302795*x_ref[2]
            arg[(1, 2, 0)]+=-0.96332080002*x[2]
            ref[(1, 2, 0)]+=-0.96332080002*x_ref[2]
            arg[(1, 2, 1)]+=0.234719937755*x[2]
            ref[(1, 2, 1)]+=0.234719937755*x_ref[2]
            arg[(1, 2, 2)]+=-0.909819549461*x[2]
            ref[(1, 2, 2)]+=-0.909819549461*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_ReducedSolution_rank4(self):
        """
        tests interpolation of rank 4 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 2, 4),w)
        ref = Data(0,(3, 2, 2, 4),w_ref)
        arg[(0, 0, 0, 0)]=-0.386249792439*x[0] + (-0.634201234389)*x[1]
        ref[(0, 0, 0, 0)]=-0.386249792439*x_ref[0] + (-0.634201234389)*x_ref[1]
        arg[(0, 0, 0, 1)]=-0.714905048697*x[0] + (0.196352729467)*x[1]
        ref[(0, 0, 0, 1)]=-0.714905048697*x_ref[0] + (0.196352729467)*x_ref[1]
        arg[(0, 0, 0, 2)]=0.299619938335*x[0] + (-0.768201973342)*x[1]
        ref[(0, 0, 0, 2)]=0.299619938335*x_ref[0] + (-0.768201973342)*x_ref[1]
        arg[(0, 0, 0, 3)]=0.465484013792*x[0] + (-0.768408375719)*x[1]
        ref[(0, 0, 0, 3)]=0.465484013792*x_ref[0] + (-0.768408375719)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.173952989396*x[0] + (-0.787506771526)*x[1]
        ref[(0, 0, 1, 0)]=0.173952989396*x_ref[0] + (-0.787506771526)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.446452247002*x[0] + (0.844618372154)*x[1]
        ref[(0, 0, 1, 1)]=0.446452247002*x_ref[0] + (0.844618372154)*x_ref[1]
        arg[(0, 0, 1, 2)]=-0.0534833566624*x[0] + (-0.975632205862)*x[1]
        ref[(0, 0, 1, 2)]=-0.0534833566624*x_ref[0] + (-0.975632205862)*x_ref[1]
        arg[(0, 0, 1, 3)]=0.822691084652*x[0] + (0.391188751782)*x[1]
        ref[(0, 0, 1, 3)]=0.822691084652*x_ref[0] + (0.391188751782)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.961453895678*x[0] + (-0.494692585179)*x[1]
        ref[(0, 1, 0, 0)]=-0.961453895678*x_ref[0] + (-0.494692585179)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.612452103238*x[0] + (-0.527464074657)*x[1]
        ref[(0, 1, 0, 1)]=0.612452103238*x_ref[0] + (-0.527464074657)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.154125527812*x[0] + (0.779865130106)*x[1]
        ref[(0, 1, 0, 2)]=0.154125527812*x_ref[0] + (0.779865130106)*x_ref[1]
        arg[(0, 1, 0, 3)]=0.104891100764*x[0] + (-0.452359933864)*x[1]
        ref[(0, 1, 0, 3)]=0.104891100764*x_ref[0] + (-0.452359933864)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.880728821674*x[0] + (-0.834693841527)*x[1]
        ref[(0, 1, 1, 0)]=0.880728821674*x_ref[0] + (-0.834693841527)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.766162480941*x[0] + (0.314476324151)*x[1]
        ref[(0, 1, 1, 1)]=0.766162480941*x_ref[0] + (0.314476324151)*x_ref[1]
        arg[(0, 1, 1, 2)]=0.546474684661*x[0] + (-0.753419779699)*x[1]
        ref[(0, 1, 1, 2)]=0.546474684661*x_ref[0] + (-0.753419779699)*x_ref[1]
        arg[(0, 1, 1, 3)]=-0.523676682648*x[0] + (0.0744263233053)*x[1]
        ref[(0, 1, 1, 3)]=-0.523676682648*x_ref[0] + (0.0744263233053)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.238240693633*x[0] + (0.771593747742)*x[1]
        ref[(1, 0, 0, 0)]=0.238240693633*x_ref[0] + (0.771593747742)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.862813584171*x[0] + (0.0237759799775)*x[1]
        ref[(1, 0, 0, 1)]=0.862813584171*x_ref[0] + (0.0237759799775)*x_ref[1]
        arg[(1, 0, 0, 2)]=-0.0678953915977*x[0] + (-0.956694079013)*x[1]
        ref[(1, 0, 0, 2)]=-0.0678953915977*x_ref[0] + (-0.956694079013)*x_ref[1]
        arg[(1, 0, 0, 3)]=-0.786477244158*x[0] + (-0.0510359888386)*x[1]
        ref[(1, 0, 0, 3)]=-0.786477244158*x_ref[0] + (-0.0510359888386)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.632010564961*x[0] + (-0.278495257805)*x[1]
        ref[(1, 0, 1, 0)]=0.632010564961*x_ref[0] + (-0.278495257805)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.131183984939*x[0] + (0.168674759906)*x[1]
        ref[(1, 0, 1, 1)]=0.131183984939*x_ref[0] + (0.168674759906)*x_ref[1]
        arg[(1, 0, 1, 2)]=0.512109335757*x[0] + (0.12313908468)*x[1]
        ref[(1, 0, 1, 2)]=0.512109335757*x_ref[0] + (0.12313908468)*x_ref[1]
        arg[(1, 0, 1, 3)]=-0.111681527153*x[0] + (-0.00701893738429)*x[1]
        ref[(1, 0, 1, 3)]=-0.111681527153*x_ref[0] + (-0.00701893738429)*x_ref[1]
        arg[(1, 1, 0, 0)]=0.354499874678*x[0] + (0.0681888434129)*x[1]
        ref[(1, 1, 0, 0)]=0.354499874678*x_ref[0] + (0.0681888434129)*x_ref[1]
        arg[(1, 1, 0, 1)]=-0.231967674004*x[0] + (0.947910275172)*x[1]
        ref[(1, 1, 0, 1)]=-0.231967674004*x_ref[0] + (0.947910275172)*x_ref[1]
        arg[(1, 1, 0, 2)]=0.60111291323*x[0] + (0.42569699872)*x[1]
        ref[(1, 1, 0, 2)]=0.60111291323*x_ref[0] + (0.42569699872)*x_ref[1]
        arg[(1, 1, 0, 3)]=-0.732077893736*x[0] + (-0.345088593822)*x[1]
        ref[(1, 1, 0, 3)]=-0.732077893736*x_ref[0] + (-0.345088593822)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.981690177362*x[0] + (0.701450786143)*x[1]
        ref[(1, 1, 1, 0)]=-0.981690177362*x_ref[0] + (0.701450786143)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.0389839606609*x[0] + (0.0693083801887)*x[1]
        ref[(1, 1, 1, 1)]=-0.0389839606609*x_ref[0] + (0.0693083801887)*x_ref[1]
        arg[(1, 1, 1, 2)]=-0.370240612527*x[0] + (0.638182882398)*x[1]
        ref[(1, 1, 1, 2)]=-0.370240612527*x_ref[0] + (0.638182882398)*x_ref[1]
        arg[(1, 1, 1, 3)]=0.835239622208*x[0] + (-0.708089675185)*x[1]
        ref[(1, 1, 1, 3)]=0.835239622208*x_ref[0] + (-0.708089675185)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.989189268558*x[0] + (-0.650766998969)*x[1]
        ref[(2, 0, 0, 0)]=0.989189268558*x_ref[0] + (-0.650766998969)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.460004019729*x[0] + (0.165649873566)*x[1]
        ref[(2, 0, 0, 1)]=0.460004019729*x_ref[0] + (0.165649873566)*x_ref[1]
        arg[(2, 0, 0, 2)]=0.0340680107747*x[0] + (-0.812080833218)*x[1]
        ref[(2, 0, 0, 2)]=0.0340680107747*x_ref[0] + (-0.812080833218)*x_ref[1]
        arg[(2, 0, 0, 3)]=-0.840944915172*x[0] + (-0.746084871505)*x[1]
        ref[(2, 0, 0, 3)]=-0.840944915172*x_ref[0] + (-0.746084871505)*x_ref[1]
        arg[(2, 0, 1, 0)]=0.895751804742*x[0] + (0.607925567884)*x[1]
        ref[(2, 0, 1, 0)]=0.895751804742*x_ref[0] + (0.607925567884)*x_ref[1]
        arg[(2, 0, 1, 1)]=0.0822375428736*x[0] + (0.518724520776)*x[1]
        ref[(2, 0, 1, 1)]=0.0822375428736*x_ref[0] + (0.518724520776)*x_ref[1]
        arg[(2, 0, 1, 2)]=-0.145728538958*x[0] + (-0.0396353787151)*x[1]
        ref[(2, 0, 1, 2)]=-0.145728538958*x_ref[0] + (-0.0396353787151)*x_ref[1]
        arg[(2, 0, 1, 3)]=0.845061011293*x[0] + (0.0956895129288)*x[1]
        ref[(2, 0, 1, 3)]=0.845061011293*x_ref[0] + (0.0956895129288)*x_ref[1]
        arg[(2, 1, 0, 0)]=0.297972666152*x[0] + (-0.0682208045205)*x[1]
        ref[(2, 1, 0, 0)]=0.297972666152*x_ref[0] + (-0.0682208045205)*x_ref[1]
        arg[(2, 1, 0, 1)]=-0.330145262312*x[0] + (-0.160194155685)*x[1]
        ref[(2, 1, 0, 1)]=-0.330145262312*x_ref[0] + (-0.160194155685)*x_ref[1]
        arg[(2, 1, 0, 2)]=0.957260236777*x[0] + (-0.240577123952)*x[1]
        ref[(2, 1, 0, 2)]=0.957260236777*x_ref[0] + (-0.240577123952)*x_ref[1]
        arg[(2, 1, 0, 3)]=0.0565700180312*x[0] + (-0.533382943502)*x[1]
        ref[(2, 1, 0, 3)]=0.0565700180312*x_ref[0] + (-0.533382943502)*x_ref[1]
        arg[(2, 1, 1, 0)]=-0.831847049224*x[0] + (-0.792008102154)*x[1]
        ref[(2, 1, 1, 0)]=-0.831847049224*x_ref[0] + (-0.792008102154)*x_ref[1]
        arg[(2, 1, 1, 1)]=-0.360386868761*x[0] + (-0.424466148679)*x[1]
        ref[(2, 1, 1, 1)]=-0.360386868761*x_ref[0] + (-0.424466148679)*x_ref[1]
        arg[(2, 1, 1, 2)]=-0.62946682257*x[0] + (0.0206689704669)*x[1]
        ref[(2, 1, 1, 2)]=-0.62946682257*x_ref[0] + (0.0206689704669)*x_ref[1]
        arg[(2, 1, 1, 3)]=-0.719673642717*x[0] + (-0.383955863718)*x[1]
        ref[(2, 1, 1, 3)]=-0.719673642717*x_ref[0] + (-0.383955863718)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.796649092794*x[2]
            ref[(0, 0, 0, 0)]+=0.796649092794*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.251682863903*x[2]
            ref[(0, 0, 0, 1)]+=0.251682863903*x_ref[2]
            arg[(0, 0, 0, 2)]+=-0.259487026618*x[2]
            ref[(0, 0, 0, 2)]+=-0.259487026618*x_ref[2]
            arg[(0, 0, 0, 3)]+=0.253047539329*x[2]
            ref[(0, 0, 0, 3)]+=0.253047539329*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.253422649684*x[2]
            ref[(0, 0, 1, 0)]+=-0.253422649684*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.742531258699*x[2]
            ref[(0, 0, 1, 1)]+=-0.742531258699*x_ref[2]
            arg[(0, 0, 1, 2)]+=-0.827017149516*x[2]
            ref[(0, 0, 1, 2)]+=-0.827017149516*x_ref[2]
            arg[(0, 0, 1, 3)]+=0.809308141299*x[2]
            ref[(0, 0, 1, 3)]+=0.809308141299*x_ref[2]
            arg[(0, 1, 0, 0)]+=0.616109566088*x[2]
            ref[(0, 1, 0, 0)]+=0.616109566088*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.585465804504*x[2]
            ref[(0, 1, 0, 1)]+=0.585465804504*x_ref[2]
            arg[(0, 1, 0, 2)]+=-0.298800150873*x[2]
            ref[(0, 1, 0, 2)]+=-0.298800150873*x_ref[2]
            arg[(0, 1, 0, 3)]+=-0.207219915932*x[2]
            ref[(0, 1, 0, 3)]+=-0.207219915932*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.873590470722*x[2]
            ref[(0, 1, 1, 0)]+=0.873590470722*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.362139452751*x[2]
            ref[(0, 1, 1, 1)]+=-0.362139452751*x_ref[2]
            arg[(0, 1, 1, 2)]+=-0.135486525936*x[2]
            ref[(0, 1, 1, 2)]+=-0.135486525936*x_ref[2]
            arg[(0, 1, 1, 3)]+=-0.403312154957*x[2]
            ref[(0, 1, 1, 3)]+=-0.403312154957*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.0766327884606*x[2]
            ref[(1, 0, 0, 0)]+=0.0766327884606*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.246775222244*x[2]
            ref[(1, 0, 0, 1)]+=-0.246775222244*x_ref[2]
            arg[(1, 0, 0, 2)]+=-0.86213418033*x[2]
            ref[(1, 0, 0, 2)]+=-0.86213418033*x_ref[2]
            arg[(1, 0, 0, 3)]+=0.704035073268*x[2]
            ref[(1, 0, 0, 3)]+=0.704035073268*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.805527951933*x[2]
            ref[(1, 0, 1, 0)]+=0.805527951933*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.615673538684*x[2]
            ref[(1, 0, 1, 1)]+=0.615673538684*x_ref[2]
            arg[(1, 0, 1, 2)]+=0.249932304552*x[2]
            ref[(1, 0, 1, 2)]+=0.249932304552*x_ref[2]
            arg[(1, 0, 1, 3)]+=-0.00863344591441*x[2]
            ref[(1, 0, 1, 3)]+=-0.00863344591441*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.0518586382037*x[2]
            ref[(1, 1, 0, 0)]+=-0.0518586382037*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.292003157179*x[2]
            ref[(1, 1, 0, 1)]+=-0.292003157179*x_ref[2]
            arg[(1, 1, 0, 2)]+=0.618415237831*x[2]
            ref[(1, 1, 0, 2)]+=0.618415237831*x_ref[2]
            arg[(1, 1, 0, 3)]+=0.652964908754*x[2]
            ref[(1, 1, 0, 3)]+=0.652964908754*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.447009220571*x[2]
            ref[(1, 1, 1, 0)]+=0.447009220571*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.958905680937*x[2]
            ref[(1, 1, 1, 1)]+=0.958905680937*x_ref[2]
            arg[(1, 1, 1, 2)]+=0.541633513012*x[2]
            ref[(1, 1, 1, 2)]+=0.541633513012*x_ref[2]
            arg[(1, 1, 1, 3)]+=0.276631087166*x[2]
            ref[(1, 1, 1, 3)]+=0.276631087166*x_ref[2]
            arg[(2, 0, 0, 0)]+=0.631521075355*x[2]
            ref[(2, 0, 0, 0)]+=0.631521075355*x_ref[2]
            arg[(2, 0, 0, 1)]+=-0.679886726743*x[2]
            ref[(2, 0, 0, 1)]+=-0.679886726743*x_ref[2]
            arg[(2, 0, 0, 2)]+=0.99806471915*x[2]
            ref[(2, 0, 0, 2)]+=0.99806471915*x_ref[2]
            arg[(2, 0, 0, 3)]+=-0.050483133769*x[2]
            ref[(2, 0, 0, 3)]+=-0.050483133769*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.11965183974*x[2]
            ref[(2, 0, 1, 0)]+=-0.11965183974*x_ref[2]
            arg[(2, 0, 1, 1)]+=-0.499826494907*x[2]
            ref[(2, 0, 1, 1)]+=-0.499826494907*x_ref[2]
            arg[(2, 0, 1, 2)]+=-0.755180339521*x[2]
            ref[(2, 0, 1, 2)]+=-0.755180339521*x_ref[2]
            arg[(2, 0, 1, 3)]+=0.504057190826*x[2]
            ref[(2, 0, 1, 3)]+=0.504057190826*x_ref[2]
            arg[(2, 1, 0, 0)]+=-0.231924561166*x[2]
            ref[(2, 1, 0, 0)]+=-0.231924561166*x_ref[2]
            arg[(2, 1, 0, 1)]+=0.163612605*x[2]
            ref[(2, 1, 0, 1)]+=0.163612605*x_ref[2]
            arg[(2, 1, 0, 2)]+=-0.931807020408*x[2]
            ref[(2, 1, 0, 2)]+=-0.931807020408*x_ref[2]
            arg[(2, 1, 0, 3)]+=0.329991403321*x[2]
            ref[(2, 1, 0, 3)]+=0.329991403321*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.750107005171*x[2]
            ref[(2, 1, 1, 0)]+=0.750107005171*x_ref[2]
            arg[(2, 1, 1, 1)]+=0.521689187581*x[2]
            ref[(2, 1, 1, 1)]+=0.521689187581*x_ref[2]
            arg[(2, 1, 1, 2)]+=0.971167615365*x[2]
            ref[(2, 1, 1, 2)]+=0.971167615365*x_ref[2]
            arg[(2, 1, 1, 3)]+=0.606677932522*x[2]
            ref[(2, 1, 1, 3)]+=0.606677932522*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.00558530448226*x[0] + (0.267281007953)*x[1]
        ref=-0.00558530448226*x_ref[0] + (0.267281007953)*x_ref[1]
        if dim==3:
            arg+=(-0.819295042566)*x[2]
            ref+=(-0.819295042566)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=-0.908053778173*x[0] + (0.623029028515)*x[1]
        ref[(0,)]=-0.908053778173*x_ref[0] + (0.623029028515)*x_ref[1]
        arg[(1,)]=-0.549803712197*x[0] + (0.659006291458)*x[1]
        ref[(1,)]=-0.549803712197*x_ref[0] + (0.659006291458)*x_ref[1]
        arg[(2,)]=0.705911805657*x[0] + (-0.00253847421384)*x[1]
        ref[(2,)]=0.705911805657*x_ref[0] + (-0.00253847421384)*x_ref[1]
        arg[(3,)]=0.270671382948*x[0] + (-0.549580058973)*x[1]
        ref[(3,)]=0.270671382948*x_ref[0] + (-0.549580058973)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.842284535601*x[2]
            ref[(0,)]+=0.842284535601*x_ref[2]
            arg[(1,)]+=-0.629133624239*x[2]
            ref[(1,)]+=-0.629133624239*x_ref[2]
            arg[(2,)]+=0.445363259489*x[2]
            ref[(2,)]+=0.445363259489*x_ref[2]
            arg[(3,)]+=0.526530022619*x[2]
            ref[(3,)]+=0.526530022619*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3),w)
        ref = Data(0,(3, 3),w_ref)
        arg[(0, 0)]=-0.262794774312*x[0] + (0.100932048413)*x[1]
        ref[(0, 0)]=-0.262794774312*x_ref[0] + (0.100932048413)*x_ref[1]
        arg[(0, 1)]=0.880286081581*x[0] + (0.205277570235)*x[1]
        ref[(0, 1)]=0.880286081581*x_ref[0] + (0.205277570235)*x_ref[1]
        arg[(0, 2)]=0.638116294207*x[0] + (0.400897419275)*x[1]
        ref[(0, 2)]=0.638116294207*x_ref[0] + (0.400897419275)*x_ref[1]
        arg[(1, 0)]=0.902001394085*x[0] + (0.327479610224)*x[1]
        ref[(1, 0)]=0.902001394085*x_ref[0] + (0.327479610224)*x_ref[1]
        arg[(1, 1)]=-0.424655622719*x[0] + (-0.116502493585)*x[1]
        ref[(1, 1)]=-0.424655622719*x_ref[0] + (-0.116502493585)*x_ref[1]
        arg[(1, 2)]=-0.253467689102*x[0] + (0.506353785178)*x[1]
        ref[(1, 2)]=-0.253467689102*x_ref[0] + (0.506353785178)*x_ref[1]
        arg[(2, 0)]=-0.338871524511*x[0] + (0.247676884805)*x[1]
        ref[(2, 0)]=-0.338871524511*x_ref[0] + (0.247676884805)*x_ref[1]
        arg[(2, 1)]=0.860572084782*x[0] + (-0.36450605783)*x[1]
        ref[(2, 1)]=0.860572084782*x_ref[0] + (-0.36450605783)*x_ref[1]
        arg[(2, 2)]=0.527908469665*x[0] + (0.86467996118)*x[1]
        ref[(2, 2)]=0.527908469665*x_ref[0] + (0.86467996118)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.292406011215*x[2]
            ref[(0, 0)]+=-0.292406011215*x_ref[2]
            arg[(0, 1)]+=0.498347849376*x[2]
            ref[(0, 1)]+=0.498347849376*x_ref[2]
            arg[(0, 2)]+=0.443159143783*x[2]
            ref[(0, 2)]+=0.443159143783*x_ref[2]
            arg[(1, 0)]+=-0.881749148197*x[2]
            ref[(1, 0)]+=-0.881749148197*x_ref[2]
            arg[(1, 1)]+=0.190920656578*x[2]
            ref[(1, 1)]+=0.190920656578*x_ref[2]
            arg[(1, 2)]+=0.139869380066*x[2]
            ref[(1, 2)]+=0.139869380066*x_ref[2]
            arg[(2, 0)]+=-0.902337379837*x[2]
            ref[(2, 0)]+=-0.902337379837*x_ref[2]
            arg[(2, 1)]+=0.260777582064*x[2]
            ref[(2, 1)]+=0.260777582064*x_ref[2]
            arg[(2, 2)]+=0.883319542848*x[2]
            ref[(2, 2)]+=0.883319542848*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 3),w)
        ref = Data(0,(4, 2, 3),w_ref)
        arg[(0, 0, 0)]=-0.473704988242*x[0] + (0.790285164461)*x[1]
        ref[(0, 0, 0)]=-0.473704988242*x_ref[0] + (0.790285164461)*x_ref[1]
        arg[(0, 0, 1)]=-0.0525811954851*x[0] + (0.490686288364)*x[1]
        ref[(0, 0, 1)]=-0.0525811954851*x_ref[0] + (0.490686288364)*x_ref[1]
        arg[(0, 0, 2)]=0.409260041253*x[0] + (-0.312059132297)*x[1]
        ref[(0, 0, 2)]=0.409260041253*x_ref[0] + (-0.312059132297)*x_ref[1]
        arg[(0, 1, 0)]=-0.874708619622*x[0] + (-0.344360692169)*x[1]
        ref[(0, 1, 0)]=-0.874708619622*x_ref[0] + (-0.344360692169)*x_ref[1]
        arg[(0, 1, 1)]=-0.328104683871*x[0] + (-0.509604637764)*x[1]
        ref[(0, 1, 1)]=-0.328104683871*x_ref[0] + (-0.509604637764)*x_ref[1]
        arg[(0, 1, 2)]=0.58908170749*x[0] + (0.30779353553)*x[1]
        ref[(0, 1, 2)]=0.58908170749*x_ref[0] + (0.30779353553)*x_ref[1]
        arg[(1, 0, 0)]=0.303965921498*x[0] + (0.482665890382)*x[1]
        ref[(1, 0, 0)]=0.303965921498*x_ref[0] + (0.482665890382)*x_ref[1]
        arg[(1, 0, 1)]=0.89041004541*x[0] + (0.309887237254)*x[1]
        ref[(1, 0, 1)]=0.89041004541*x_ref[0] + (0.309887237254)*x_ref[1]
        arg[(1, 0, 2)]=0.238292951721*x[0] + (-0.682119100838)*x[1]
        ref[(1, 0, 2)]=0.238292951721*x_ref[0] + (-0.682119100838)*x_ref[1]
        arg[(1, 1, 0)]=0.163039007027*x[0] + (0.460543662892)*x[1]
        ref[(1, 1, 0)]=0.163039007027*x_ref[0] + (0.460543662892)*x_ref[1]
        arg[(1, 1, 1)]=0.920838535017*x[0] + (-0.0345080894509)*x[1]
        ref[(1, 1, 1)]=0.920838535017*x_ref[0] + (-0.0345080894509)*x_ref[1]
        arg[(1, 1, 2)]=-0.561931402987*x[0] + (0.453671253277)*x[1]
        ref[(1, 1, 2)]=-0.561931402987*x_ref[0] + (0.453671253277)*x_ref[1]
        arg[(2, 0, 0)]=-0.704196600826*x[0] + (0.290672381747)*x[1]
        ref[(2, 0, 0)]=-0.704196600826*x_ref[0] + (0.290672381747)*x_ref[1]
        arg[(2, 0, 1)]=-0.691820902136*x[0] + (0.621002543162)*x[1]
        ref[(2, 0, 1)]=-0.691820902136*x_ref[0] + (0.621002543162)*x_ref[1]
        arg[(2, 0, 2)]=0.803426683457*x[0] + (-0.824203382895)*x[1]
        ref[(2, 0, 2)]=0.803426683457*x_ref[0] + (-0.824203382895)*x_ref[1]
        arg[(2, 1, 0)]=0.479136091401*x[0] + (0.740717305057)*x[1]
        ref[(2, 1, 0)]=0.479136091401*x_ref[0] + (0.740717305057)*x_ref[1]
        arg[(2, 1, 1)]=-0.369079876957*x[0] + (-0.507702576133)*x[1]
        ref[(2, 1, 1)]=-0.369079876957*x_ref[0] + (-0.507702576133)*x_ref[1]
        arg[(2, 1, 2)]=0.250940146446*x[0] + (-0.637366601841)*x[1]
        ref[(2, 1, 2)]=0.250940146446*x_ref[0] + (-0.637366601841)*x_ref[1]
        arg[(3, 0, 0)]=0.836469534115*x[0] + (-0.647224071128)*x[1]
        ref[(3, 0, 0)]=0.836469534115*x_ref[0] + (-0.647224071128)*x_ref[1]
        arg[(3, 0, 1)]=0.00653777164269*x[0] + (-0.953819137712)*x[1]
        ref[(3, 0, 1)]=0.00653777164269*x_ref[0] + (-0.953819137712)*x_ref[1]
        arg[(3, 0, 2)]=-0.978803773947*x[0] + (-0.477761454401)*x[1]
        ref[(3, 0, 2)]=-0.978803773947*x_ref[0] + (-0.477761454401)*x_ref[1]
        arg[(3, 1, 0)]=-0.764597218836*x[0] + (0.235654374977)*x[1]
        ref[(3, 1, 0)]=-0.764597218836*x_ref[0] + (0.235654374977)*x_ref[1]
        arg[(3, 1, 1)]=-0.414488056155*x[0] + (-0.322906324526)*x[1]
        ref[(3, 1, 1)]=-0.414488056155*x_ref[0] + (-0.322906324526)*x_ref[1]
        arg[(3, 1, 2)]=0.632312913294*x[0] + (0.159969551857)*x[1]
        ref[(3, 1, 2)]=0.632312913294*x_ref[0] + (0.159969551857)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.453912436345*x[2]
            ref[(0, 0, 0)]+=0.453912436345*x_ref[2]
            arg[(0, 0, 1)]+=-0.406176017799*x[2]
            ref[(0, 0, 1)]+=-0.406176017799*x_ref[2]
            arg[(0, 0, 2)]+=-0.814863467194*x[2]
            ref[(0, 0, 2)]+=-0.814863467194*x_ref[2]
            arg[(0, 1, 0)]+=-0.528235910886*x[2]
            ref[(0, 1, 0)]+=-0.528235910886*x_ref[2]
            arg[(0, 1, 1)]+=-0.475372035118*x[2]
            ref[(0, 1, 1)]+=-0.475372035118*x_ref[2]
            arg[(0, 1, 2)]+=-0.462548694315*x[2]
            ref[(0, 1, 2)]+=-0.462548694315*x_ref[2]
            arg[(1, 0, 0)]+=-0.0659510634272*x[2]
            ref[(1, 0, 0)]+=-0.0659510634272*x_ref[2]
            arg[(1, 0, 1)]+=-0.467508014288*x[2]
            ref[(1, 0, 1)]+=-0.467508014288*x_ref[2]
            arg[(1, 0, 2)]+=-0.970457193923*x[2]
            ref[(1, 0, 2)]+=-0.970457193923*x_ref[2]
            arg[(1, 1, 0)]+=0.474728987123*x[2]
            ref[(1, 1, 0)]+=0.474728987123*x_ref[2]
            arg[(1, 1, 1)]+=-0.944925654601*x[2]
            ref[(1, 1, 1)]+=-0.944925654601*x_ref[2]
            arg[(1, 1, 2)]+=0.898977869001*x[2]
            ref[(1, 1, 2)]+=0.898977869001*x_ref[2]
            arg[(2, 0, 0)]+=0.953812612246*x[2]
            ref[(2, 0, 0)]+=0.953812612246*x_ref[2]
            arg[(2, 0, 1)]+=0.520256199104*x[2]
            ref[(2, 0, 1)]+=0.520256199104*x_ref[2]
            arg[(2, 0, 2)]+=0.599228570925*x[2]
            ref[(2, 0, 2)]+=0.599228570925*x_ref[2]
            arg[(2, 1, 0)]+=-0.503009557334*x[2]
            ref[(2, 1, 0)]+=-0.503009557334*x_ref[2]
            arg[(2, 1, 1)]+=-0.492156121557*x[2]
            ref[(2, 1, 1)]+=-0.492156121557*x_ref[2]
            arg[(2, 1, 2)]+=-0.40165840015*x[2]
            ref[(2, 1, 2)]+=-0.40165840015*x_ref[2]
            arg[(3, 0, 0)]+=-0.989276867989*x[2]
            ref[(3, 0, 0)]+=-0.989276867989*x_ref[2]
            arg[(3, 0, 1)]+=-0.948077352817*x[2]
            ref[(3, 0, 1)]+=-0.948077352817*x_ref[2]
            arg[(3, 0, 2)]+=-0.178537840254*x[2]
            ref[(3, 0, 2)]+=-0.178537840254*x_ref[2]
            arg[(3, 1, 0)]+=-0.184004649718*x[2]
            ref[(3, 1, 0)]+=-0.184004649718*x_ref[2]
            arg[(3, 1, 1)]+=0.376093364717*x[2]
            ref[(3, 1, 1)]+=0.376093364717*x_ref[2]
            arg[(3, 1, 2)]+=-0.722547752088*x[2]
            ref[(3, 1, 2)]+=-0.722547752088*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 4, 2),w)
        ref = Data(0,(2, 3, 4, 2),w_ref)
        arg[(0, 0, 0, 0)]=-0.509549363935*x[0] + (0.031912714712)*x[1]
        ref[(0, 0, 0, 0)]=-0.509549363935*x_ref[0] + (0.031912714712)*x_ref[1]
        arg[(0, 0, 0, 1)]=-0.771767354914*x[0] + (0.890063053324)*x[1]
        ref[(0, 0, 0, 1)]=-0.771767354914*x_ref[0] + (0.890063053324)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.79443039146*x[0] + (0.945788782084)*x[1]
        ref[(0, 0, 1, 0)]=-0.79443039146*x_ref[0] + (0.945788782084)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.843018447372*x[0] + (-0.509213166049)*x[1]
        ref[(0, 0, 1, 1)]=0.843018447372*x_ref[0] + (-0.509213166049)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.677310562166*x[0] + (0.226404944134)*x[1]
        ref[(0, 0, 2, 0)]=-0.677310562166*x_ref[0] + (0.226404944134)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.785778890778*x[0] + (-0.537684565179)*x[1]
        ref[(0, 0, 2, 1)]=-0.785778890778*x_ref[0] + (-0.537684565179)*x_ref[1]
        arg[(0, 0, 3, 0)]=0.937993669572*x[0] + (-0.959865474648)*x[1]
        ref[(0, 0, 3, 0)]=0.937993669572*x_ref[0] + (-0.959865474648)*x_ref[1]
        arg[(0, 0, 3, 1)]=0.627279413127*x[0] + (0.651401910482)*x[1]
        ref[(0, 0, 3, 1)]=0.627279413127*x_ref[0] + (0.651401910482)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.0955746906829*x[0] + (0.574365730979)*x[1]
        ref[(0, 1, 0, 0)]=-0.0955746906829*x_ref[0] + (0.574365730979)*x_ref[1]
        arg[(0, 1, 0, 1)]=-0.77158595025*x[0] + (-0.130621969023)*x[1]
        ref[(0, 1, 0, 1)]=-0.77158595025*x_ref[0] + (-0.130621969023)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.686195417552*x[0] + (0.702609077951)*x[1]
        ref[(0, 1, 1, 0)]=0.686195417552*x_ref[0] + (0.702609077951)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.774168669826*x[0] + (-0.638215854051)*x[1]
        ref[(0, 1, 1, 1)]=-0.774168669826*x_ref[0] + (-0.638215854051)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.887097463598*x[0] + (0.582640727933)*x[1]
        ref[(0, 1, 2, 0)]=-0.887097463598*x_ref[0] + (0.582640727933)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.0999345274915*x[0] + (-0.471183300052)*x[1]
        ref[(0, 1, 2, 1)]=0.0999345274915*x_ref[0] + (-0.471183300052)*x_ref[1]
        arg[(0, 1, 3, 0)]=-0.602396989593*x[0] + (-0.288538142154)*x[1]
        ref[(0, 1, 3, 0)]=-0.602396989593*x_ref[0] + (-0.288538142154)*x_ref[1]
        arg[(0, 1, 3, 1)]=0.23839958454*x[0] + (-0.382160622365)*x[1]
        ref[(0, 1, 3, 1)]=0.23839958454*x_ref[0] + (-0.382160622365)*x_ref[1]
        arg[(0, 2, 0, 0)]=0.427254667656*x[0] + (0.927840454178)*x[1]
        ref[(0, 2, 0, 0)]=0.427254667656*x_ref[0] + (0.927840454178)*x_ref[1]
        arg[(0, 2, 0, 1)]=0.860881598408*x[0] + (0.288234219003)*x[1]
        ref[(0, 2, 0, 1)]=0.860881598408*x_ref[0] + (0.288234219003)*x_ref[1]
        arg[(0, 2, 1, 0)]=0.712629077032*x[0] + (-0.586695008899)*x[1]
        ref[(0, 2, 1, 0)]=0.712629077032*x_ref[0] + (-0.586695008899)*x_ref[1]
        arg[(0, 2, 1, 1)]=-0.663625055262*x[0] + (-0.522208236448)*x[1]
        ref[(0, 2, 1, 1)]=-0.663625055262*x_ref[0] + (-0.522208236448)*x_ref[1]
        arg[(0, 2, 2, 0)]=0.826915170432*x[0] + (-0.632954005461)*x[1]
        ref[(0, 2, 2, 0)]=0.826915170432*x_ref[0] + (-0.632954005461)*x_ref[1]
        arg[(0, 2, 2, 1)]=0.92078168494*x[0] + (-0.899062352781)*x[1]
        ref[(0, 2, 2, 1)]=0.92078168494*x_ref[0] + (-0.899062352781)*x_ref[1]
        arg[(0, 2, 3, 0)]=0.899622020898*x[0] + (-0.51322391504)*x[1]
        ref[(0, 2, 3, 0)]=0.899622020898*x_ref[0] + (-0.51322391504)*x_ref[1]
        arg[(0, 2, 3, 1)]=0.365532910856*x[0] + (-0.688738566778)*x[1]
        ref[(0, 2, 3, 1)]=0.365532910856*x_ref[0] + (-0.688738566778)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.581630286843*x[0] + (0.860133295779)*x[1]
        ref[(1, 0, 0, 0)]=-0.581630286843*x_ref[0] + (0.860133295779)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.831647030597*x[0] + (-0.705366397411)*x[1]
        ref[(1, 0, 0, 1)]=-0.831647030597*x_ref[0] + (-0.705366397411)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.349738592855*x[0] + (-0.973409667178)*x[1]
        ref[(1, 0, 1, 0)]=-0.349738592855*x_ref[0] + (-0.973409667178)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.547271227272*x[0] + (-0.252304690058)*x[1]
        ref[(1, 0, 1, 1)]=0.547271227272*x_ref[0] + (-0.252304690058)*x_ref[1]
        arg[(1, 0, 2, 0)]=0.288579488234*x[0] + (0.161746652732)*x[1]
        ref[(1, 0, 2, 0)]=0.288579488234*x_ref[0] + (0.161746652732)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.51949046393*x[0] + (0.811156989006)*x[1]
        ref[(1, 0, 2, 1)]=0.51949046393*x_ref[0] + (0.811156989006)*x_ref[1]
        arg[(1, 0, 3, 0)]=-0.413348083756*x[0] + (-0.488058771808)*x[1]
        ref[(1, 0, 3, 0)]=-0.413348083756*x_ref[0] + (-0.488058771808)*x_ref[1]
        arg[(1, 0, 3, 1)]=0.0646441193267*x[0] + (0.690078020056)*x[1]
        ref[(1, 0, 3, 1)]=0.0646441193267*x_ref[0] + (0.690078020056)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.751376424043*x[0] + (-0.612847994739)*x[1]
        ref[(1, 1, 0, 0)]=-0.751376424043*x_ref[0] + (-0.612847994739)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.422634517685*x[0] + (-0.225774390536)*x[1]
        ref[(1, 1, 0, 1)]=0.422634517685*x_ref[0] + (-0.225774390536)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.862292266015*x[0] + (0.403366322791)*x[1]
        ref[(1, 1, 1, 0)]=-0.862292266015*x_ref[0] + (0.403366322791)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.793144048807*x[0] + (-0.371987143125)*x[1]
        ref[(1, 1, 1, 1)]=-0.793144048807*x_ref[0] + (-0.371987143125)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.63111409155*x[0] + (0.939648436523)*x[1]
        ref[(1, 1, 2, 0)]=-0.63111409155*x_ref[0] + (0.939648436523)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.657930701502*x[0] + (0.697670502929)*x[1]
        ref[(1, 1, 2, 1)]=-0.657930701502*x_ref[0] + (0.697670502929)*x_ref[1]
        arg[(1, 1, 3, 0)]=0.00397775857587*x[0] + (0.0562914407268)*x[1]
        ref[(1, 1, 3, 0)]=0.00397775857587*x_ref[0] + (0.0562914407268)*x_ref[1]
        arg[(1, 1, 3, 1)]=-0.918176541334*x[0] + (0.000198165263958)*x[1]
        ref[(1, 1, 3, 1)]=-0.918176541334*x_ref[0] + (0.000198165263958)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.19324896532*x[0] + (0.154402468725)*x[1]
        ref[(1, 2, 0, 0)]=-0.19324896532*x_ref[0] + (0.154402468725)*x_ref[1]
        arg[(1, 2, 0, 1)]=-0.901979836091*x[0] + (-0.0905720472202)*x[1]
        ref[(1, 2, 0, 1)]=-0.901979836091*x_ref[0] + (-0.0905720472202)*x_ref[1]
        arg[(1, 2, 1, 0)]=-0.378153682554*x[0] + (-0.963400910005)*x[1]
        ref[(1, 2, 1, 0)]=-0.378153682554*x_ref[0] + (-0.963400910005)*x_ref[1]
        arg[(1, 2, 1, 1)]=-0.229852107516*x[0] + (0.75544284085)*x[1]
        ref[(1, 2, 1, 1)]=-0.229852107516*x_ref[0] + (0.75544284085)*x_ref[1]
        arg[(1, 2, 2, 0)]=0.518111521263*x[0] + (-0.0386105546831)*x[1]
        ref[(1, 2, 2, 0)]=0.518111521263*x_ref[0] + (-0.0386105546831)*x_ref[1]
        arg[(1, 2, 2, 1)]=-0.955344703458*x[0] + (-0.0965751786888)*x[1]
        ref[(1, 2, 2, 1)]=-0.955344703458*x_ref[0] + (-0.0965751786888)*x_ref[1]
        arg[(1, 2, 3, 0)]=-0.41375447808*x[0] + (0.673262009511)*x[1]
        ref[(1, 2, 3, 0)]=-0.41375447808*x_ref[0] + (0.673262009511)*x_ref[1]
        arg[(1, 2, 3, 1)]=-0.387230350631*x[0] + (-0.553097166584)*x[1]
        ref[(1, 2, 3, 1)]=-0.387230350631*x_ref[0] + (-0.553097166584)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.877307914227*x[2]
            ref[(0, 0, 0, 0)]+=0.877307914227*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.483831964226*x[2]
            ref[(0, 0, 0, 1)]+=-0.483831964226*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.332319791941*x[2]
            ref[(0, 0, 1, 0)]+=0.332319791941*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.857185254763*x[2]
            ref[(0, 0, 1, 1)]+=0.857185254763*x_ref[2]
            arg[(0, 0, 2, 0)]+=0.408193724805*x[2]
            ref[(0, 0, 2, 0)]+=0.408193724805*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.995301373165*x[2]
            ref[(0, 0, 2, 1)]+=0.995301373165*x_ref[2]
            arg[(0, 0, 3, 0)]+=0.249544115748*x[2]
            ref[(0, 0, 3, 0)]+=0.249544115748*x_ref[2]
            arg[(0, 0, 3, 1)]+=-0.110576968901*x[2]
            ref[(0, 0, 3, 1)]+=-0.110576968901*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.121785244421*x[2]
            ref[(0, 1, 0, 0)]+=-0.121785244421*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.353562858053*x[2]
            ref[(0, 1, 0, 1)]+=0.353562858053*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.326312901517*x[2]
            ref[(0, 1, 1, 0)]+=0.326312901517*x_ref[2]
            arg[(0, 1, 1, 1)]+=0.455837861461*x[2]
            ref[(0, 1, 1, 1)]+=0.455837861461*x_ref[2]
            arg[(0, 1, 2, 0)]+=0.115991421951*x[2]
            ref[(0, 1, 2, 0)]+=0.115991421951*x_ref[2]
            arg[(0, 1, 2, 1)]+=0.806184942002*x[2]
            ref[(0, 1, 2, 1)]+=0.806184942002*x_ref[2]
            arg[(0, 1, 3, 0)]+=-0.78605674774*x[2]
            ref[(0, 1, 3, 0)]+=-0.78605674774*x_ref[2]
            arg[(0, 1, 3, 1)]+=0.541221428877*x[2]
            ref[(0, 1, 3, 1)]+=0.541221428877*x_ref[2]
            arg[(0, 2, 0, 0)]+=0.50676127784*x[2]
            ref[(0, 2, 0, 0)]+=0.50676127784*x_ref[2]
            arg[(0, 2, 0, 1)]+=0.841668501832*x[2]
            ref[(0, 2, 0, 1)]+=0.841668501832*x_ref[2]
            arg[(0, 2, 1, 0)]+=0.871823264166*x[2]
            ref[(0, 2, 1, 0)]+=0.871823264166*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.903641417242*x[2]
            ref[(0, 2, 1, 1)]+=-0.903641417242*x_ref[2]
            arg[(0, 2, 2, 0)]+=-0.487956028099*x[2]
            ref[(0, 2, 2, 0)]+=-0.487956028099*x_ref[2]
            arg[(0, 2, 2, 1)]+=-0.905436495363*x[2]
            ref[(0, 2, 2, 1)]+=-0.905436495363*x_ref[2]
            arg[(0, 2, 3, 0)]+=-0.460952356003*x[2]
            ref[(0, 2, 3, 0)]+=-0.460952356003*x_ref[2]
            arg[(0, 2, 3, 1)]+=-0.678125870858*x[2]
            ref[(0, 2, 3, 1)]+=-0.678125870858*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.943725659488*x[2]
            ref[(1, 0, 0, 0)]+=-0.943725659488*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.620288881949*x[2]
            ref[(1, 0, 0, 1)]+=0.620288881949*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.74474294956*x[2]
            ref[(1, 0, 1, 0)]+=0.74474294956*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.570720618404*x[2]
            ref[(1, 0, 1, 1)]+=-0.570720618404*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.162326938985*x[2]
            ref[(1, 0, 2, 0)]+=-0.162326938985*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.925323409098*x[2]
            ref[(1, 0, 2, 1)]+=0.925323409098*x_ref[2]
            arg[(1, 0, 3, 0)]+=-0.0213543261191*x[2]
            ref[(1, 0, 3, 0)]+=-0.0213543261191*x_ref[2]
            arg[(1, 0, 3, 1)]+=-0.359353340529*x[2]
            ref[(1, 0, 3, 1)]+=-0.359353340529*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.386575277443*x[2]
            ref[(1, 1, 0, 0)]+=-0.386575277443*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.879774373851*x[2]
            ref[(1, 1, 0, 1)]+=-0.879774373851*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.269279172239*x[2]
            ref[(1, 1, 1, 0)]+=0.269279172239*x_ref[2]
            arg[(1, 1, 1, 1)]+=-0.841201140024*x[2]
            ref[(1, 1, 1, 1)]+=-0.841201140024*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.409432736371*x[2]
            ref[(1, 1, 2, 0)]+=-0.409432736371*x_ref[2]
            arg[(1, 1, 2, 1)]+=-0.670081306039*x[2]
            ref[(1, 1, 2, 1)]+=-0.670081306039*x_ref[2]
            arg[(1, 1, 3, 0)]+=-0.0864147764076*x[2]
            ref[(1, 1, 3, 0)]+=-0.0864147764076*x_ref[2]
            arg[(1, 1, 3, 1)]+=-0.908336954609*x[2]
            ref[(1, 1, 3, 1)]+=-0.908336954609*x_ref[2]
            arg[(1, 2, 0, 0)]+=0.457452496868*x[2]
            ref[(1, 2, 0, 0)]+=0.457452496868*x_ref[2]
            arg[(1, 2, 0, 1)]+=0.646969659492*x[2]
            ref[(1, 2, 0, 1)]+=0.646969659492*x_ref[2]
            arg[(1, 2, 1, 0)]+=-0.148720736996*x[2]
            ref[(1, 2, 1, 0)]+=-0.148720736996*x_ref[2]
            arg[(1, 2, 1, 1)]+=-0.187467161289*x[2]
            ref[(1, 2, 1, 1)]+=-0.187467161289*x_ref[2]
            arg[(1, 2, 2, 0)]+=-0.383242764993*x[2]
            ref[(1, 2, 2, 0)]+=-0.383242764993*x_ref[2]
            arg[(1, 2, 2, 1)]+=-0.172958421262*x[2]
            ref[(1, 2, 2, 1)]+=-0.172958421262*x_ref[2]
            arg[(1, 2, 3, 0)]+=-0.374197242061*x[2]
            ref[(1, 2, 3, 0)]+=-0.374197242061*x_ref[2]
            arg[(1, 2, 3, 1)]+=0.891445075599*x[2]
            ref[(1, 2, 3, 1)]+=0.891445075599*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_Function_rank0(self):
        """
        tests interpolation of rank 0 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports interpolation from Function to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.201967841992*x[0]**o + (0.615449461165)*x[0] + (-0.572678278067)*x[1]**o + (0.978748177254)*x[1]
        ref=0.201967841992*x_ref[0]**o + (0.615449461165)*x_ref[0] + (-0.572678278067)*x_ref[1]**o + (0.978748177254)*x_ref[1]
        if dim==3:
            arg+=(0.80753841967)*x[2]**o + (-0.89618939125)*x[2]
            ref+=(0.80753841967)*x_ref[2]**o + (-0.89618939125)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_Function_rank1(self):
        """
        tests interpolation of rank 1 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports interpolation from Function to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=0.461352065629*x[0]**o + (0.556382634443)*x[0] + (0.125332576018)*x[1]**o + (-0.269476489055)*x[1]
        ref[(0,)]=0.461352065629*x_ref[0]**o + (0.556382634443)*x_ref[0] + (0.125332576018)*x_ref[1]**o + (-0.269476489055)*x_ref[1]
        arg[(1,)]=0.986517841233*x[0]**o + (0.687066453831)*x[0] + (-0.0610924578418)*x[1]**o + (-0.412373342019)*x[1]
        ref[(1,)]=0.986517841233*x_ref[0]**o + (0.687066453831)*x_ref[0] + (-0.0610924578418)*x_ref[1]**o + (-0.412373342019)*x_ref[1]
        arg[(2,)]=0.124575075217*x[0]**o + (0.254013228414)*x[0] + (0.597006594341)*x[1]**o + (0.381786796732)*x[1]
        ref[(2,)]=0.124575075217*x_ref[0]**o + (0.254013228414)*x_ref[0] + (0.597006594341)*x_ref[1]**o + (0.381786796732)*x_ref[1]
        arg[(3,)]=-0.663480815283*x[0]**o + (0.655100022595)*x[0] + (0.45166154347)*x[1]**o + (-0.323069969671)*x[1]
        ref[(3,)]=-0.663480815283*x_ref[0]**o + (0.655100022595)*x_ref[0] + (0.45166154347)*x_ref[1]**o + (-0.323069969671)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.724801650649*x[2]**o + (0.420775089476)*x[2]
            ref[(0,)]+=-0.724801650649*x_ref[2]**o + (0.420775089476)*x_ref[2]
            arg[(1,)]+=0.832946666827*x[2]**o + (0.611805926031)*x[2]
            ref[(1,)]+=0.832946666827*x_ref[2]**o + (0.611805926031)*x_ref[2]
            arg[(2,)]+=0.27638785854*x[2]**o + (0.735966719696)*x[2]
            ref[(2,)]+=0.27638785854*x_ref[2]**o + (0.735966719696)*x_ref[2]
            arg[(3,)]+=0.171442640113*x[2]**o + (0.624946980531)*x[2]
            ref[(3,)]+=0.171442640113*x_ref[2]**o + (0.624946980531)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_Function_rank2(self):
        """
        tests interpolation of rank 2 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports interpolation from Function to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref = Data(0,(2, 3),w_ref)
        arg[(0, 0)]=0.166351385071*x[0]**o + (0.657924415337)*x[0] + (-0.325750833269)*x[1]**o + (0.154503724813)*x[1]
        ref[(0, 0)]=0.166351385071*x_ref[0]**o + (0.657924415337)*x_ref[0] + (-0.325750833269)*x_ref[1]**o + (0.154503724813)*x_ref[1]
        arg[(0, 1)]=0.725385102141*x[0]**o + (-0.471363263327)*x[0] + (-0.179307032893)*x[1]**o + (0.157716594921)*x[1]
        ref[(0, 1)]=0.725385102141*x_ref[0]**o + (-0.471363263327)*x_ref[0] + (-0.179307032893)*x_ref[1]**o + (0.157716594921)*x_ref[1]
        arg[(0, 2)]=-0.563635795849*x[0]**o + (0.896108165581)*x[0] + (-0.21083155077)*x[1]**o + (-0.802842599169)*x[1]
        ref[(0, 2)]=-0.563635795849*x_ref[0]**o + (0.896108165581)*x_ref[0] + (-0.21083155077)*x_ref[1]**o + (-0.802842599169)*x_ref[1]
        arg[(1, 0)]=-0.821343959388*x[0]**o + (0.260664556261)*x[0] + (0.0254058389407)*x[1]**o + (-0.29333808271)*x[1]
        ref[(1, 0)]=-0.821343959388*x_ref[0]**o + (0.260664556261)*x_ref[0] + (0.0254058389407)*x_ref[1]**o + (-0.29333808271)*x_ref[1]
        arg[(1, 1)]=0.705880762077*x[0]**o + (-0.280729248416)*x[0] + (-0.962607516746)*x[1]**o + (0.395770388635)*x[1]
        ref[(1, 1)]=0.705880762077*x_ref[0]**o + (-0.280729248416)*x_ref[0] + (-0.962607516746)*x_ref[1]**o + (0.395770388635)*x_ref[1]
        arg[(1, 2)]=0.866270077032*x[0]**o + (-0.60864615446)*x[0] + (0.952573823457)*x[1]**o + (0.704544819859)*x[1]
        ref[(1, 2)]=0.866270077032*x_ref[0]**o + (-0.60864615446)*x_ref[0] + (0.952573823457)*x_ref[1]**o + (0.704544819859)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.060652150171*x[2]**o + (-0.866383994818)*x[2]
            ref[(0, 0)]+=-0.060652150171*x_ref[2]**o + (-0.866383994818)*x_ref[2]
            arg[(0, 1)]+=-0.697986201398*x[2]**o + (0.56324835518)*x[2]
            ref[(0, 1)]+=-0.697986201398*x_ref[2]**o + (0.56324835518)*x_ref[2]
            arg[(0, 2)]+=0.879920568663*x[2]**o + (0.863094101803)*x[2]
            ref[(0, 2)]+=0.879920568663*x_ref[2]**o + (0.863094101803)*x_ref[2]
            arg[(1, 0)]+=0.557600928918*x[2]**o + (0.922223127323)*x[2]
            ref[(1, 0)]+=0.557600928918*x_ref[2]**o + (0.922223127323)*x_ref[2]
            arg[(1, 1)]+=0.334265261359*x[2]**o + (-0.455649372544)*x[2]
            ref[(1, 1)]+=0.334265261359*x_ref[2]**o + (-0.455649372544)*x_ref[2]
            arg[(1, 2)]+=-0.959463494262*x[2]**o + (-0.879280522226)*x[2]
            ref[(1, 2)]+=-0.959463494262*x_ref[2]**o + (-0.879280522226)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_Function_rank3(self):
        """
        tests interpolation of rank 3 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports interpolation from Function to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 4),w)
        ref = Data(0,(4, 4, 4),w_ref)
        arg[(0, 0, 0)]=-0.305506969549*x[0]**o + (0.0738211077422)*x[0] + (0.409774433212)*x[1]**o + (-0.00127245623261)*x[1]
        ref[(0, 0, 0)]=-0.305506969549*x_ref[0]**o + (0.0738211077422)*x_ref[0] + (0.409774433212)*x_ref[1]**o + (-0.00127245623261)*x_ref[1]
        arg[(0, 0, 1)]=-0.121867274559*x[0]**o + (0.64232812033)*x[0] + (-0.493575253702)*x[1]**o + (0.87620255681)*x[1]
        ref[(0, 0, 1)]=-0.121867274559*x_ref[0]**o + (0.64232812033)*x_ref[0] + (-0.493575253702)*x_ref[1]**o + (0.87620255681)*x_ref[1]
        arg[(0, 0, 2)]=0.414876671918*x[0]**o + (-0.106513876184)*x[0] + (0.756585048091)*x[1]**o + (-0.343837711423)*x[1]
        ref[(0, 0, 2)]=0.414876671918*x_ref[0]**o + (-0.106513876184)*x_ref[0] + (0.756585048091)*x_ref[1]**o + (-0.343837711423)*x_ref[1]
        arg[(0, 0, 3)]=0.974190636455*x[0]**o + (0.388309738116)*x[0] + (-0.185488169415)*x[1]**o + (0.437158094722)*x[1]
        ref[(0, 0, 3)]=0.974190636455*x_ref[0]**o + (0.388309738116)*x_ref[0] + (-0.185488169415)*x_ref[1]**o + (0.437158094722)*x_ref[1]
        arg[(0, 1, 0)]=-0.922709689953*x[0]**o + (0.516711121384)*x[0] + (0.467665924701)*x[1]**o + (-0.091593457718)*x[1]
        ref[(0, 1, 0)]=-0.922709689953*x_ref[0]**o + (0.516711121384)*x_ref[0] + (0.467665924701)*x_ref[1]**o + (-0.091593457718)*x_ref[1]
        arg[(0, 1, 1)]=-0.916797814967*x[0]**o + (-0.213838131184)*x[0] + (0.168070961705)*x[1]**o + (0.450190208276)*x[1]
        ref[(0, 1, 1)]=-0.916797814967*x_ref[0]**o + (-0.213838131184)*x_ref[0] + (0.168070961705)*x_ref[1]**o + (0.450190208276)*x_ref[1]
        arg[(0, 1, 2)]=-0.109696964111*x[0]**o + (0.114711647808)*x[0] + (-0.693144429744)*x[1]**o + (-0.302281904696)*x[1]
        ref[(0, 1, 2)]=-0.109696964111*x_ref[0]**o + (0.114711647808)*x_ref[0] + (-0.693144429744)*x_ref[1]**o + (-0.302281904696)*x_ref[1]
        arg[(0, 1, 3)]=-0.601657687711*x[0]**o + (0.792035427982)*x[0] + (-0.922910266776)*x[1]**o + (-0.690734138468)*x[1]
        ref[(0, 1, 3)]=-0.601657687711*x_ref[0]**o + (0.792035427982)*x_ref[0] + (-0.922910266776)*x_ref[1]**o + (-0.690734138468)*x_ref[1]
        arg[(0, 2, 0)]=0.749548592843*x[0]**o + (-0.783693960789)*x[0] + (-0.610942950298)*x[1]**o + (0.106368449882)*x[1]
        ref[(0, 2, 0)]=0.749548592843*x_ref[0]**o + (-0.783693960789)*x_ref[0] + (-0.610942950298)*x_ref[1]**o + (0.106368449882)*x_ref[1]
        arg[(0, 2, 1)]=-0.208632670097*x[0]**o + (-0.725315159996)*x[0] + (-0.588430414245)*x[1]**o + (0.406381780358)*x[1]
        ref[(0, 2, 1)]=-0.208632670097*x_ref[0]**o + (-0.725315159996)*x_ref[0] + (-0.588430414245)*x_ref[1]**o + (0.406381780358)*x_ref[1]
        arg[(0, 2, 2)]=0.895355364552*x[0]**o + (-0.952352943712)*x[0] + (0.898756964523)*x[1]**o + (0.144407806036)*x[1]
        ref[(0, 2, 2)]=0.895355364552*x_ref[0]**o + (-0.952352943712)*x_ref[0] + (0.898756964523)*x_ref[1]**o + (0.144407806036)*x_ref[1]
        arg[(0, 2, 3)]=-0.266029935493*x[0]**o + (0.433831758556)*x[0] + (0.891434533048)*x[1]**o + (0.500589444938)*x[1]
        ref[(0, 2, 3)]=-0.266029935493*x_ref[0]**o + (0.433831758556)*x_ref[0] + (0.891434533048)*x_ref[1]**o + (0.500589444938)*x_ref[1]
        arg[(0, 3, 0)]=-0.836743049851*x[0]**o + (-0.011625137272)*x[0] + (-0.508502599062)*x[1]**o + (-0.840646194458)*x[1]
        ref[(0, 3, 0)]=-0.836743049851*x_ref[0]**o + (-0.011625137272)*x_ref[0] + (-0.508502599062)*x_ref[1]**o + (-0.840646194458)*x_ref[1]
        arg[(0, 3, 1)]=-0.782586091747*x[0]**o + (-0.407085063698)*x[0] + (0.355607403783)*x[1]**o + (0.696703853811)*x[1]
        ref[(0, 3, 1)]=-0.782586091747*x_ref[0]**o + (-0.407085063698)*x_ref[0] + (0.355607403783)*x_ref[1]**o + (0.696703853811)*x_ref[1]
        arg[(0, 3, 2)]=0.486226889798*x[0]**o + (0.0406920350162)*x[0] + (0.259206307232)*x[1]**o + (-0.008532334849)*x[1]
        ref[(0, 3, 2)]=0.486226889798*x_ref[0]**o + (0.0406920350162)*x_ref[0] + (0.259206307232)*x_ref[1]**o + (-0.008532334849)*x_ref[1]
        arg[(0, 3, 3)]=-0.881252870061*x[0]**o + (0.0245209148008)*x[0] + (-0.516944732718)*x[1]**o + (0.720630537226)*x[1]
        ref[(0, 3, 3)]=-0.881252870061*x_ref[0]**o + (0.0245209148008)*x_ref[0] + (-0.516944732718)*x_ref[1]**o + (0.720630537226)*x_ref[1]
        arg[(1, 0, 0)]=-0.895394760781*x[0]**o + (0.437261730076)*x[0] + (-0.347588152901)*x[1]**o + (-0.585834373874)*x[1]
        ref[(1, 0, 0)]=-0.895394760781*x_ref[0]**o + (0.437261730076)*x_ref[0] + (-0.347588152901)*x_ref[1]**o + (-0.585834373874)*x_ref[1]
        arg[(1, 0, 1)]=-0.955042968928*x[0]**o + (-0.383798135964)*x[0] + (-0.418211194132)*x[1]**o + (0.285263343945)*x[1]
        ref[(1, 0, 1)]=-0.955042968928*x_ref[0]**o + (-0.383798135964)*x_ref[0] + (-0.418211194132)*x_ref[1]**o + (0.285263343945)*x_ref[1]
        arg[(1, 0, 2)]=0.72675733059*x[0]**o + (0.347279942183)*x[0] + (-0.800622136608)*x[1]**o + (-0.451379625369)*x[1]
        ref[(1, 0, 2)]=0.72675733059*x_ref[0]**o + (0.347279942183)*x_ref[0] + (-0.800622136608)*x_ref[1]**o + (-0.451379625369)*x_ref[1]
        arg[(1, 0, 3)]=-0.580305712117*x[0]**o + (-0.60205138141)*x[0] + (-0.737452127758)*x[1]**o + (0.798161547057)*x[1]
        ref[(1, 0, 3)]=-0.580305712117*x_ref[0]**o + (-0.60205138141)*x_ref[0] + (-0.737452127758)*x_ref[1]**o + (0.798161547057)*x_ref[1]
        arg[(1, 1, 0)]=0.687274179336*x[0]**o + (-0.00396877197297)*x[0] + (0.257944139101)*x[1]**o + (-0.376602584033)*x[1]
        ref[(1, 1, 0)]=0.687274179336*x_ref[0]**o + (-0.00396877197297)*x_ref[0] + (0.257944139101)*x_ref[1]**o + (-0.376602584033)*x_ref[1]
        arg[(1, 1, 1)]=-0.344504230346*x[0]**o + (-0.17687172824)*x[0] + (-0.519653601102)*x[1]**o + (0.433292307266)*x[1]
        ref[(1, 1, 1)]=-0.344504230346*x_ref[0]**o + (-0.17687172824)*x_ref[0] + (-0.519653601102)*x_ref[1]**o + (0.433292307266)*x_ref[1]
        arg[(1, 1, 2)]=-0.175444583943*x[0]**o + (-0.442638023563)*x[0] + (0.578729985102)*x[1]**o + (0.00881049533376)*x[1]
        ref[(1, 1, 2)]=-0.175444583943*x_ref[0]**o + (-0.442638023563)*x_ref[0] + (0.578729985102)*x_ref[1]**o + (0.00881049533376)*x_ref[1]
        arg[(1, 1, 3)]=0.601508568092*x[0]**o + (-0.427529255882)*x[0] + (-0.130252665006)*x[1]**o + (0.952215451781)*x[1]
        ref[(1, 1, 3)]=0.601508568092*x_ref[0]**o + (-0.427529255882)*x_ref[0] + (-0.130252665006)*x_ref[1]**o + (0.952215451781)*x_ref[1]
        arg[(1, 2, 0)]=0.0406550798861*x[0]**o + (0.372620255749)*x[0] + (-0.188638567506)*x[1]**o + (0.670073457192)*x[1]
        ref[(1, 2, 0)]=0.0406550798861*x_ref[0]**o + (0.372620255749)*x_ref[0] + (-0.188638567506)*x_ref[1]**o + (0.670073457192)*x_ref[1]
        arg[(1, 2, 1)]=0.0467627844093*x[0]**o + (-0.875720630272)*x[0] + (0.202321230696)*x[1]**o + (-0.941573560978)*x[1]
        ref[(1, 2, 1)]=0.0467627844093*x_ref[0]**o + (-0.875720630272)*x_ref[0] + (0.202321230696)*x_ref[1]**o + (-0.941573560978)*x_ref[1]
        arg[(1, 2, 2)]=-0.104328369782*x[0]**o + (-0.0341181285829)*x[0] + (-0.767560579871)*x[1]**o + (0.764939303048)*x[1]
        ref[(1, 2, 2)]=-0.104328369782*x_ref[0]**o + (-0.0341181285829)*x_ref[0] + (-0.767560579871)*x_ref[1]**o + (0.764939303048)*x_ref[1]
        arg[(1, 2, 3)]=0.400462792386*x[0]**o + (-0.768514176281)*x[0] + (-0.104346959646)*x[1]**o + (0.908169099613)*x[1]
        ref[(1, 2, 3)]=0.400462792386*x_ref[0]**o + (-0.768514176281)*x_ref[0] + (-0.104346959646)*x_ref[1]**o + (0.908169099613)*x_ref[1]
        arg[(1, 3, 0)]=0.866667815703*x[0]**o + (0.407474320849)*x[0] + (-0.678772350564)*x[1]**o + (-0.108780438488)*x[1]
        ref[(1, 3, 0)]=0.866667815703*x_ref[0]**o + (0.407474320849)*x_ref[0] + (-0.678772350564)*x_ref[1]**o + (-0.108780438488)*x_ref[1]
        arg[(1, 3, 1)]=-0.291073581603*x[0]**o + (0.806542216302)*x[0] + (-0.536268346186)*x[1]**o + (0.934838195065)*x[1]
        ref[(1, 3, 1)]=-0.291073581603*x_ref[0]**o + (0.806542216302)*x_ref[0] + (-0.536268346186)*x_ref[1]**o + (0.934838195065)*x_ref[1]
        arg[(1, 3, 2)]=-0.730930002173*x[0]**o + (-0.23781929661)*x[0] + (-0.455934053726)*x[1]**o + (0.610292577275)*x[1]
        ref[(1, 3, 2)]=-0.730930002173*x_ref[0]**o + (-0.23781929661)*x_ref[0] + (-0.455934053726)*x_ref[1]**o + (0.610292577275)*x_ref[1]
        arg[(1, 3, 3)]=-0.246918672584*x[0]**o + (0.221282952905)*x[0] + (0.665868294508)*x[1]**o + (-0.126285790038)*x[1]
        ref[(1, 3, 3)]=-0.246918672584*x_ref[0]**o + (0.221282952905)*x_ref[0] + (0.665868294508)*x_ref[1]**o + (-0.126285790038)*x_ref[1]
        arg[(2, 0, 0)]=-0.963253522486*x[0]**o + (0.87291297868)*x[0] + (-0.885262507702)*x[1]**o + (0.89972436809)*x[1]
        ref[(2, 0, 0)]=-0.963253522486*x_ref[0]**o + (0.87291297868)*x_ref[0] + (-0.885262507702)*x_ref[1]**o + (0.89972436809)*x_ref[1]
        arg[(2, 0, 1)]=0.75437360825*x[0]**o + (0.786209477325)*x[0] + (0.338120926234)*x[1]**o + (0.715616131961)*x[1]
        ref[(2, 0, 1)]=0.75437360825*x_ref[0]**o + (0.786209477325)*x_ref[0] + (0.338120926234)*x_ref[1]**o + (0.715616131961)*x_ref[1]
        arg[(2, 0, 2)]=0.777935295039*x[0]**o + (-0.844896128643)*x[0] + (0.88924925663)*x[1]**o + (-0.0848313063253)*x[1]
        ref[(2, 0, 2)]=0.777935295039*x_ref[0]**o + (-0.844896128643)*x_ref[0] + (0.88924925663)*x_ref[1]**o + (-0.0848313063253)*x_ref[1]
        arg[(2, 0, 3)]=-0.866108391028*x[0]**o + (-0.82292873728)*x[0] + (-0.473634543189)*x[1]**o + (-0.926657073708)*x[1]
        ref[(2, 0, 3)]=-0.866108391028*x_ref[0]**o + (-0.82292873728)*x_ref[0] + (-0.473634543189)*x_ref[1]**o + (-0.926657073708)*x_ref[1]
        arg[(2, 1, 0)]=0.537412692741*x[0]**o + (0.482437390603)*x[0] + (0.105577925755)*x[1]**o + (-0.523741283324)*x[1]
        ref[(2, 1, 0)]=0.537412692741*x_ref[0]**o + (0.482437390603)*x_ref[0] + (0.105577925755)*x_ref[1]**o + (-0.523741283324)*x_ref[1]
        arg[(2, 1, 1)]=-0.900737057222*x[0]**o + (-9.88367899246e-05)*x[0] + (-0.665529573033)*x[1]**o + (0.00657522443459)*x[1]
        ref[(2, 1, 1)]=-0.900737057222*x_ref[0]**o + (-9.88367899246e-05)*x_ref[0] + (-0.665529573033)*x_ref[1]**o + (0.00657522443459)*x_ref[1]
        arg[(2, 1, 2)]=0.904740144799*x[0]**o + (0.918712288682)*x[0] + (-0.996350970287)*x[1]**o + (0.901331939406)*x[1]
        ref[(2, 1, 2)]=0.904740144799*x_ref[0]**o + (0.918712288682)*x_ref[0] + (-0.996350970287)*x_ref[1]**o + (0.901331939406)*x_ref[1]
        arg[(2, 1, 3)]=-0.416204609368*x[0]**o + (0.0566822069452)*x[0] + (0.638101619296)*x[1]**o + (-0.952853767168)*x[1]
        ref[(2, 1, 3)]=-0.416204609368*x_ref[0]**o + (0.0566822069452)*x_ref[0] + (0.638101619296)*x_ref[1]**o + (-0.952853767168)*x_ref[1]
        arg[(2, 2, 0)]=-0.126025454447*x[0]**o + (0.795244482747)*x[0] + (-0.151016502098)*x[1]**o + (-0.0550880451502)*x[1]
        ref[(2, 2, 0)]=-0.126025454447*x_ref[0]**o + (0.795244482747)*x_ref[0] + (-0.151016502098)*x_ref[1]**o + (-0.0550880451502)*x_ref[1]
        arg[(2, 2, 1)]=0.707125351732*x[0]**o + (0.710931888399)*x[0] + (0.284901084326)*x[1]**o + (0.127414128131)*x[1]
        ref[(2, 2, 1)]=0.707125351732*x_ref[0]**o + (0.710931888399)*x_ref[0] + (0.284901084326)*x_ref[1]**o + (0.127414128131)*x_ref[1]
        arg[(2, 2, 2)]=0.696264594122*x[0]**o + (-0.27771694999)*x[0] + (0.682413411694)*x[1]**o + (-0.172561192413)*x[1]
        ref[(2, 2, 2)]=0.696264594122*x_ref[0]**o + (-0.27771694999)*x_ref[0] + (0.682413411694)*x_ref[1]**o + (-0.172561192413)*x_ref[1]
        arg[(2, 2, 3)]=0.877221794416*x[0]**o + (-0.965081646795)*x[0] + (-0.25979887571)*x[1]**o + (-0.839517145744)*x[1]
        ref[(2, 2, 3)]=0.877221794416*x_ref[0]**o + (-0.965081646795)*x_ref[0] + (-0.25979887571)*x_ref[1]**o + (-0.839517145744)*x_ref[1]
        arg[(2, 3, 0)]=0.44032304845*x[0]**o + (0.785275913262)*x[0] + (0.109355764637)*x[1]**o + (0.329395261865)*x[1]
        ref[(2, 3, 0)]=0.44032304845*x_ref[0]**o + (0.785275913262)*x_ref[0] + (0.109355764637)*x_ref[1]**o + (0.329395261865)*x_ref[1]
        arg[(2, 3, 1)]=-0.722688468222*x[0]**o + (0.177157037019)*x[0] + (-0.626381850791)*x[1]**o + (-0.64427280755)*x[1]
        ref[(2, 3, 1)]=-0.722688468222*x_ref[0]**o + (0.177157037019)*x_ref[0] + (-0.626381850791)*x_ref[1]**o + (-0.64427280755)*x_ref[1]
        arg[(2, 3, 2)]=0.88630028792*x[0]**o + (0.334983430384)*x[0] + (-0.251077644743)*x[1]**o + (-0.275586193788)*x[1]
        ref[(2, 3, 2)]=0.88630028792*x_ref[0]**o + (0.334983430384)*x_ref[0] + (-0.251077644743)*x_ref[1]**o + (-0.275586193788)*x_ref[1]
        arg[(2, 3, 3)]=-0.384597476325*x[0]**o + (0.817311979221)*x[0] + (-0.412062393367)*x[1]**o + (-0.0344021161503)*x[1]
        ref[(2, 3, 3)]=-0.384597476325*x_ref[0]**o + (0.817311979221)*x_ref[0] + (-0.412062393367)*x_ref[1]**o + (-0.0344021161503)*x_ref[1]
        arg[(3, 0, 0)]=0.674947583157*x[0]**o + (0.714574257806)*x[0] + (0.798851988794)*x[1]**o + (-0.179328316028)*x[1]
        ref[(3, 0, 0)]=0.674947583157*x_ref[0]**o + (0.714574257806)*x_ref[0] + (0.798851988794)*x_ref[1]**o + (-0.179328316028)*x_ref[1]
        arg[(3, 0, 1)]=-0.823716773154*x[0]**o + (-0.497156957339)*x[0] + (0.928405056499)*x[1]**o + (0.906271043785)*x[1]
        ref[(3, 0, 1)]=-0.823716773154*x_ref[0]**o + (-0.497156957339)*x_ref[0] + (0.928405056499)*x_ref[1]**o + (0.906271043785)*x_ref[1]
        arg[(3, 0, 2)]=0.637473064131*x[0]**o + (-0.117462186932)*x[0] + (0.43560000683)*x[1]**o + (-0.716326705122)*x[1]
        ref[(3, 0, 2)]=0.637473064131*x_ref[0]**o + (-0.117462186932)*x_ref[0] + (0.43560000683)*x_ref[1]**o + (-0.716326705122)*x_ref[1]
        arg[(3, 0, 3)]=-0.398507357561*x[0]**o + (0.364074653136)*x[0] + (0.294900671473)*x[1]**o + (0.961751774287)*x[1]
        ref[(3, 0, 3)]=-0.398507357561*x_ref[0]**o + (0.364074653136)*x_ref[0] + (0.294900671473)*x_ref[1]**o + (0.961751774287)*x_ref[1]
        arg[(3, 1, 0)]=-0.0747234273996*x[0]**o + (0.264287584271)*x[0] + (-0.487471840613)*x[1]**o + (-0.197823336026)*x[1]
        ref[(3, 1, 0)]=-0.0747234273996*x_ref[0]**o + (0.264287584271)*x_ref[0] + (-0.487471840613)*x_ref[1]**o + (-0.197823336026)*x_ref[1]
        arg[(3, 1, 1)]=-0.948420760387*x[0]**o + (0.72900155626)*x[0] + (0.140824174478)*x[1]**o + (-0.727087736441)*x[1]
        ref[(3, 1, 1)]=-0.948420760387*x_ref[0]**o + (0.72900155626)*x_ref[0] + (0.140824174478)*x_ref[1]**o + (-0.727087736441)*x_ref[1]
        arg[(3, 1, 2)]=0.890643620541*x[0]**o + (0.738876321379)*x[0] + (0.295319464383)*x[1]**o + (-0.694215533351)*x[1]
        ref[(3, 1, 2)]=0.890643620541*x_ref[0]**o + (0.738876321379)*x_ref[0] + (0.295319464383)*x_ref[1]**o + (-0.694215533351)*x_ref[1]
        arg[(3, 1, 3)]=-0.899252359588*x[0]**o + (-0.365885620678)*x[0] + (0.0495130112356)*x[1]**o + (-0.305248503991)*x[1]
        ref[(3, 1, 3)]=-0.899252359588*x_ref[0]**o + (-0.365885620678)*x_ref[0] + (0.0495130112356)*x_ref[1]**o + (-0.305248503991)*x_ref[1]
        arg[(3, 2, 0)]=0.00684840342758*x[0]**o + (0.602841517397)*x[0] + (-0.457928541063)*x[1]**o + (-0.101775427121)*x[1]
        ref[(3, 2, 0)]=0.00684840342758*x_ref[0]**o + (0.602841517397)*x_ref[0] + (-0.457928541063)*x_ref[1]**o + (-0.101775427121)*x_ref[1]
        arg[(3, 2, 1)]=-0.327076543247*x[0]**o + (0.303256604593)*x[0] + (-0.778949130783)*x[1]**o + (-0.544250559522)*x[1]
        ref[(3, 2, 1)]=-0.327076543247*x_ref[0]**o + (0.303256604593)*x_ref[0] + (-0.778949130783)*x_ref[1]**o + (-0.544250559522)*x_ref[1]
        arg[(3, 2, 2)]=0.339141212328*x[0]**o + (-0.477212911026)*x[0] + (0.744233747801)*x[1]**o + (0.217033433843)*x[1]
        ref[(3, 2, 2)]=0.339141212328*x_ref[0]**o + (-0.477212911026)*x_ref[0] + (0.744233747801)*x_ref[1]**o + (0.217033433843)*x_ref[1]
        arg[(3, 2, 3)]=0.572847936889*x[0]**o + (0.375528379005)*x[0] + (-0.299758180523)*x[1]**o + (0.000170794753498)*x[1]
        ref[(3, 2, 3)]=0.572847936889*x_ref[0]**o + (0.375528379005)*x_ref[0] + (-0.299758180523)*x_ref[1]**o + (0.000170794753498)*x_ref[1]
        arg[(3, 3, 0)]=0.314508563801*x[0]**o + (-0.0271773823585)*x[0] + (-0.0721013729917)*x[1]**o + (-0.83479833014)*x[1]
        ref[(3, 3, 0)]=0.314508563801*x_ref[0]**o + (-0.0271773823585)*x_ref[0] + (-0.0721013729917)*x_ref[1]**o + (-0.83479833014)*x_ref[1]
        arg[(3, 3, 1)]=-0.972649519724*x[0]**o + (0.117282696431)*x[0] + (0.0907211996868)*x[1]**o + (0.594905666986)*x[1]
        ref[(3, 3, 1)]=-0.972649519724*x_ref[0]**o + (0.117282696431)*x_ref[0] + (0.0907211996868)*x_ref[1]**o + (0.594905666986)*x_ref[1]
        arg[(3, 3, 2)]=-0.0857857841747*x[0]**o + (0.930085653613)*x[0] + (-0.273705871711)*x[1]**o + (0.292025889661)*x[1]
        ref[(3, 3, 2)]=-0.0857857841747*x_ref[0]**o + (0.930085653613)*x_ref[0] + (-0.273705871711)*x_ref[1]**o + (0.292025889661)*x_ref[1]
        arg[(3, 3, 3)]=0.0139145082934*x[0]**o + (0.113722522364)*x[0] + (0.391871920287)*x[1]**o + (0.710513426973)*x[1]
        ref[(3, 3, 3)]=0.0139145082934*x_ref[0]**o + (0.113722522364)*x_ref[0] + (0.391871920287)*x_ref[1]**o + (0.710513426973)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.738582091893*x[2]**o + (-0.436721520201)*x[2]
            ref[(0, 0, 0)]+=-0.738582091893*x_ref[2]**o + (-0.436721520201)*x_ref[2]
            arg[(0, 0, 1)]+=-0.272692039388*x[2]**o + (0.806686492712)*x[2]
            ref[(0, 0, 1)]+=-0.272692039388*x_ref[2]**o + (0.806686492712)*x_ref[2]
            arg[(0, 0, 2)]+=0.52353555723*x[2]**o + (0.909410831257)*x[2]
            ref[(0, 0, 2)]+=0.52353555723*x_ref[2]**o + (0.909410831257)*x_ref[2]
            arg[(0, 0, 3)]+=0.308951975936*x[2]**o + (0.835377207993)*x[2]
            ref[(0, 0, 3)]+=0.308951975936*x_ref[2]**o + (0.835377207993)*x_ref[2]
            arg[(0, 1, 0)]+=-0.566339166119*x[2]**o + (0.194132701488)*x[2]
            ref[(0, 1, 0)]+=-0.566339166119*x_ref[2]**o + (0.194132701488)*x_ref[2]
            arg[(0, 1, 1)]+=0.528568032954*x[2]**o + (-0.607769320583)*x[2]
            ref[(0, 1, 1)]+=0.528568032954*x_ref[2]**o + (-0.607769320583)*x_ref[2]
            arg[(0, 1, 2)]+=-0.490062385983*x[2]**o + (-0.725007951076)*x[2]
            ref[(0, 1, 2)]+=-0.490062385983*x_ref[2]**o + (-0.725007951076)*x_ref[2]
            arg[(0, 1, 3)]+=-0.782585390326*x[2]**o + (0.133951075548)*x[2]
            ref[(0, 1, 3)]+=-0.782585390326*x_ref[2]**o + (0.133951075548)*x_ref[2]
            arg[(0, 2, 0)]+=0.968481010543*x[2]**o + (-0.855270042731)*x[2]
            ref[(0, 2, 0)]+=0.968481010543*x_ref[2]**o + (-0.855270042731)*x_ref[2]
            arg[(0, 2, 1)]+=0.464239183367*x[2]**o + (0.636434910094)*x[2]
            ref[(0, 2, 1)]+=0.464239183367*x_ref[2]**o + (0.636434910094)*x_ref[2]
            arg[(0, 2, 2)]+=-0.426798434927*x[2]**o + (0.3239698261)*x[2]
            ref[(0, 2, 2)]+=-0.426798434927*x_ref[2]**o + (0.3239698261)*x_ref[2]
            arg[(0, 2, 3)]+=-0.0596078554457*x[2]**o + (0.0515350425626)*x[2]
            ref[(0, 2, 3)]+=-0.0596078554457*x_ref[2]**o + (0.0515350425626)*x_ref[2]
            arg[(0, 3, 0)]+=0.754234444402*x[2]**o + (-0.882597859467)*x[2]
            ref[(0, 3, 0)]+=0.754234444402*x_ref[2]**o + (-0.882597859467)*x_ref[2]
            arg[(0, 3, 1)]+=0.171382464396*x[2]**o + (-0.000382575344825)*x[2]
            ref[(0, 3, 1)]+=0.171382464396*x_ref[2]**o + (-0.000382575344825)*x_ref[2]
            arg[(0, 3, 2)]+=0.16029675494*x[2]**o + (-0.839176528938)*x[2]
            ref[(0, 3, 2)]+=0.16029675494*x_ref[2]**o + (-0.839176528938)*x_ref[2]
            arg[(0, 3, 3)]+=-0.686880345395*x[2]**o + (0.80249779051)*x[2]
            ref[(0, 3, 3)]+=-0.686880345395*x_ref[2]**o + (0.80249779051)*x_ref[2]
            arg[(1, 0, 0)]+=-0.686056014129*x[2]**o + (-0.48879087761)*x[2]
            ref[(1, 0, 0)]+=-0.686056014129*x_ref[2]**o + (-0.48879087761)*x_ref[2]
            arg[(1, 0, 1)]+=0.540706859976*x[2]**o + (-0.906910890902)*x[2]
            ref[(1, 0, 1)]+=0.540706859976*x_ref[2]**o + (-0.906910890902)*x_ref[2]
            arg[(1, 0, 2)]+=0.779686198965*x[2]**o + (-0.354381053833)*x[2]
            ref[(1, 0, 2)]+=0.779686198965*x_ref[2]**o + (-0.354381053833)*x_ref[2]
            arg[(1, 0, 3)]+=0.636639106038*x[2]**o + (0.227579505375)*x[2]
            ref[(1, 0, 3)]+=0.636639106038*x_ref[2]**o + (0.227579505375)*x_ref[2]
            arg[(1, 1, 0)]+=0.635568878807*x[2]**o + (0.167476025577)*x[2]
            ref[(1, 1, 0)]+=0.635568878807*x_ref[2]**o + (0.167476025577)*x_ref[2]
            arg[(1, 1, 1)]+=-0.195582717915*x[2]**o + (-0.962893501384)*x[2]
            ref[(1, 1, 1)]+=-0.195582717915*x_ref[2]**o + (-0.962893501384)*x_ref[2]
            arg[(1, 1, 2)]+=0.353272640031*x[2]**o + (-0.494750663597)*x[2]
            ref[(1, 1, 2)]+=0.353272640031*x_ref[2]**o + (-0.494750663597)*x_ref[2]
            arg[(1, 1, 3)]+=-0.55845555269*x[2]**o + (-0.302456526496)*x[2]
            ref[(1, 1, 3)]+=-0.55845555269*x_ref[2]**o + (-0.302456526496)*x_ref[2]
            arg[(1, 2, 0)]+=-0.336561222686*x[2]**o + (-0.11244571886)*x[2]
            ref[(1, 2, 0)]+=-0.336561222686*x_ref[2]**o + (-0.11244571886)*x_ref[2]
            arg[(1, 2, 1)]+=-0.516477268434*x[2]**o + (0.877465697992)*x[2]
            ref[(1, 2, 1)]+=-0.516477268434*x_ref[2]**o + (0.877465697992)*x_ref[2]
            arg[(1, 2, 2)]+=-0.122084265605*x[2]**o + (-0.510679127681)*x[2]
            ref[(1, 2, 2)]+=-0.122084265605*x_ref[2]**o + (-0.510679127681)*x_ref[2]
            arg[(1, 2, 3)]+=0.540127800246*x[2]**o + (-0.76959417786)*x[2]
            ref[(1, 2, 3)]+=0.540127800246*x_ref[2]**o + (-0.76959417786)*x_ref[2]
            arg[(1, 3, 0)]+=0.420953455789*x[2]**o + (0.0640069573965)*x[2]
            ref[(1, 3, 0)]+=0.420953455789*x_ref[2]**o + (0.0640069573965)*x_ref[2]
            arg[(1, 3, 1)]+=0.93980088372*x[2]**o + (-0.621447299196)*x[2]
            ref[(1, 3, 1)]+=0.93980088372*x_ref[2]**o + (-0.621447299196)*x_ref[2]
            arg[(1, 3, 2)]+=-0.654084617448*x[2]**o + (-0.304871166968)*x[2]
            ref[(1, 3, 2)]+=-0.654084617448*x_ref[2]**o + (-0.304871166968)*x_ref[2]
            arg[(1, 3, 3)]+=-0.424105171148*x[2]**o + (0.938739353061)*x[2]
            ref[(1, 3, 3)]+=-0.424105171148*x_ref[2]**o + (0.938739353061)*x_ref[2]
            arg[(2, 0, 0)]+=-0.121860721103*x[2]**o + (0.251077157925)*x[2]
            ref[(2, 0, 0)]+=-0.121860721103*x_ref[2]**o + (0.251077157925)*x_ref[2]
            arg[(2, 0, 1)]+=0.839451144674*x[2]**o + (0.182605003226)*x[2]
            ref[(2, 0, 1)]+=0.839451144674*x_ref[2]**o + (0.182605003226)*x_ref[2]
            arg[(2, 0, 2)]+=-0.512934915029*x[2]**o + (0.421504128075)*x[2]
            ref[(2, 0, 2)]+=-0.512934915029*x_ref[2]**o + (0.421504128075)*x_ref[2]
            arg[(2, 0, 3)]+=-0.27456502306*x[2]**o + (-0.014954700803)*x[2]
            ref[(2, 0, 3)]+=-0.27456502306*x_ref[2]**o + (-0.014954700803)*x_ref[2]
            arg[(2, 1, 0)]+=-0.605998590316*x[2]**o + (-0.800048519579)*x[2]
            ref[(2, 1, 0)]+=-0.605998590316*x_ref[2]**o + (-0.800048519579)*x_ref[2]
            arg[(2, 1, 1)]+=-0.125400836332*x[2]**o + (0.894161851062)*x[2]
            ref[(2, 1, 1)]+=-0.125400836332*x_ref[2]**o + (0.894161851062)*x_ref[2]
            arg[(2, 1, 2)]+=-0.0829269381949*x[2]**o + (-0.614845464126)*x[2]
            ref[(2, 1, 2)]+=-0.0829269381949*x_ref[2]**o + (-0.614845464126)*x_ref[2]
            arg[(2, 1, 3)]+=-0.30122640023*x[2]**o + (-0.650676255668)*x[2]
            ref[(2, 1, 3)]+=-0.30122640023*x_ref[2]**o + (-0.650676255668)*x_ref[2]
            arg[(2, 2, 0)]+=-0.532630308447*x[2]**o + (0.879498174486)*x[2]
            ref[(2, 2, 0)]+=-0.532630308447*x_ref[2]**o + (0.879498174486)*x_ref[2]
            arg[(2, 2, 1)]+=0.191902255801*x[2]**o + (0.843738630977)*x[2]
            ref[(2, 2, 1)]+=0.191902255801*x_ref[2]**o + (0.843738630977)*x_ref[2]
            arg[(2, 2, 2)]+=-0.758614380371*x[2]**o + (-0.582202144305)*x[2]
            ref[(2, 2, 2)]+=-0.758614380371*x_ref[2]**o + (-0.582202144305)*x_ref[2]
            arg[(2, 2, 3)]+=-0.0476066908085*x[2]**o + (-0.843036823874)*x[2]
            ref[(2, 2, 3)]+=-0.0476066908085*x_ref[2]**o + (-0.843036823874)*x_ref[2]
            arg[(2, 3, 0)]+=0.998822061106*x[2]**o + (-0.794722263514)*x[2]
            ref[(2, 3, 0)]+=0.998822061106*x_ref[2]**o + (-0.794722263514)*x_ref[2]
            arg[(2, 3, 1)]+=-0.234134317905*x[2]**o + (-0.719697480991)*x[2]
            ref[(2, 3, 1)]+=-0.234134317905*x_ref[2]**o + (-0.719697480991)*x_ref[2]
            arg[(2, 3, 2)]+=0.123224039767*x[2]**o + (0.75725440087)*x[2]
            ref[(2, 3, 2)]+=0.123224039767*x_ref[2]**o + (0.75725440087)*x_ref[2]
            arg[(2, 3, 3)]+=-0.246203504599*x[2]**o + (0.704268569031)*x[2]
            ref[(2, 3, 3)]+=-0.246203504599*x_ref[2]**o + (0.704268569031)*x_ref[2]
            arg[(3, 0, 0)]+=0.884084316619*x[2]**o + (-0.515986350988)*x[2]
            ref[(3, 0, 0)]+=0.884084316619*x_ref[2]**o + (-0.515986350988)*x_ref[2]
            arg[(3, 0, 1)]+=-0.0381509987075*x[2]**o + (0.258266214854)*x[2]
            ref[(3, 0, 1)]+=-0.0381509987075*x_ref[2]**o + (0.258266214854)*x_ref[2]
            arg[(3, 0, 2)]+=0.120880238369*x[2]**o + (0.00725059612562)*x[2]
            ref[(3, 0, 2)]+=0.120880238369*x_ref[2]**o + (0.00725059612562)*x_ref[2]
            arg[(3, 0, 3)]+=-0.434270883024*x[2]**o + (0.339885389893)*x[2]
            ref[(3, 0, 3)]+=-0.434270883024*x_ref[2]**o + (0.339885389893)*x_ref[2]
            arg[(3, 1, 0)]+=-0.928901665913*x[2]**o + (-0.372860803341)*x[2]
            ref[(3, 1, 0)]+=-0.928901665913*x_ref[2]**o + (-0.372860803341)*x_ref[2]
            arg[(3, 1, 1)]+=-0.549080765621*x[2]**o + (0.298395966613)*x[2]
            ref[(3, 1, 1)]+=-0.549080765621*x_ref[2]**o + (0.298395966613)*x_ref[2]
            arg[(3, 1, 2)]+=0.800733862569*x[2]**o + (0.597612423191)*x[2]
            ref[(3, 1, 2)]+=0.800733862569*x_ref[2]**o + (0.597612423191)*x_ref[2]
            arg[(3, 1, 3)]+=0.713160949402*x[2]**o + (-0.542430780576)*x[2]
            ref[(3, 1, 3)]+=0.713160949402*x_ref[2]**o + (-0.542430780576)*x_ref[2]
            arg[(3, 2, 0)]+=0.263919534661*x[2]**o + (-0.000573605180066)*x[2]
            ref[(3, 2, 0)]+=0.263919534661*x_ref[2]**o + (-0.000573605180066)*x_ref[2]
            arg[(3, 2, 1)]+=0.552326179891*x[2]**o + (-0.514039516741)*x[2]
            ref[(3, 2, 1)]+=0.552326179891*x_ref[2]**o + (-0.514039516741)*x_ref[2]
            arg[(3, 2, 2)]+=0.127518288753*x[2]**o + (0.483852205875)*x[2]
            ref[(3, 2, 2)]+=0.127518288753*x_ref[2]**o + (0.483852205875)*x_ref[2]
            arg[(3, 2, 3)]+=-0.976827291158*x[2]**o + (0.630745625315)*x[2]
            ref[(3, 2, 3)]+=-0.976827291158*x_ref[2]**o + (0.630745625315)*x_ref[2]
            arg[(3, 3, 0)]+=-0.363481014679*x[2]**o + (-0.805605186936)*x[2]
            ref[(3, 3, 0)]+=-0.363481014679*x_ref[2]**o + (-0.805605186936)*x_ref[2]
            arg[(3, 3, 1)]+=-0.219946349748*x[2]**o + (-0.609050779503)*x[2]
            ref[(3, 3, 1)]+=-0.219946349748*x_ref[2]**o + (-0.609050779503)*x_ref[2]
            arg[(3, 3, 2)]+=0.081236206454*x[2]**o + (-0.407678445926)*x[2]
            ref[(3, 3, 2)]+=0.081236206454*x_ref[2]**o + (-0.407678445926)*x_ref[2]
            arg[(3, 3, 3)]+=-0.409513628823*x[2]**o + (-0.510977260491)*x[2]
            ref[(3, 3, 3)]+=-0.409513628823*x_ref[2]**o + (-0.510977260491)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunction_fromData_Function_rank4(self):
        """
        tests interpolation of rank 4 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports interpolation from Function to Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        x_ref = w_ref.getX()
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 4, 2),w)
        ref = Data(0,(4, 2, 4, 2),w_ref)
        arg[(0, 0, 0, 0)]=-0.749829854297*x[0]**o + (-0.851944442396)*x[0] + (0.583555290694)*x[1]**o + (-0.904187202919)*x[1]
        ref[(0, 0, 0, 0)]=-0.749829854297*x_ref[0]**o + (-0.851944442396)*x_ref[0] + (0.583555290694)*x_ref[1]**o + (-0.904187202919)*x_ref[1]
        arg[(0, 0, 0, 1)]=-0.116533812537*x[0]**o + (0.474211071838)*x[0] + (-0.331483335016)*x[1]**o + (0.412668019325)*x[1]
        ref[(0, 0, 0, 1)]=-0.116533812537*x_ref[0]**o + (0.474211071838)*x_ref[0] + (-0.331483335016)*x_ref[1]**o + (0.412668019325)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.222523576958*x[0]**o + (0.0385417137269)*x[0] + (0.485180574998)*x[1]**o + (-0.00919416073321)*x[1]
        ref[(0, 0, 1, 0)]=0.222523576958*x_ref[0]**o + (0.0385417137269)*x_ref[0] + (0.485180574998)*x_ref[1]**o + (-0.00919416073321)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.784943204636*x[0]**o + (-0.199467954846)*x[0] + (-0.946950432744)*x[1]**o + (-0.184753863031)*x[1]
        ref[(0, 0, 1, 1)]=0.784943204636*x_ref[0]**o + (-0.199467954846)*x_ref[0] + (-0.946950432744)*x_ref[1]**o + (-0.184753863031)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.418414788961*x[0]**o + (-0.695905602901)*x[0] + (0.779274657839)*x[1]**o + (0.0955045029038)*x[1]
        ref[(0, 0, 2, 0)]=-0.418414788961*x_ref[0]**o + (-0.695905602901)*x_ref[0] + (0.779274657839)*x_ref[1]**o + (0.0955045029038)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.155742983259*x[0]**o + (-0.70142712971)*x[0] + (0.983928361458)*x[1]**o + (0.16242679304)*x[1]
        ref[(0, 0, 2, 1)]=-0.155742983259*x_ref[0]**o + (-0.70142712971)*x_ref[0] + (0.983928361458)*x_ref[1]**o + (0.16242679304)*x_ref[1]
        arg[(0, 0, 3, 0)]=0.435557759327*x[0]**o + (0.505952922156)*x[0] + (0.124279382028)*x[1]**o + (-0.197477750877)*x[1]
        ref[(0, 0, 3, 0)]=0.435557759327*x_ref[0]**o + (0.505952922156)*x_ref[0] + (0.124279382028)*x_ref[1]**o + (-0.197477750877)*x_ref[1]
        arg[(0, 0, 3, 1)]=-0.953038857017*x[0]**o + (-0.64210849273)*x[0] + (-0.751719391518)*x[1]**o + (-0.235168407152)*x[1]
        ref[(0, 0, 3, 1)]=-0.953038857017*x_ref[0]**o + (-0.64210849273)*x_ref[0] + (-0.751719391518)*x_ref[1]**o + (-0.235168407152)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.728709548287*x[0]**o + (-0.196177546008)*x[0] + (-0.782658884055)*x[1]**o + (0.374615381032)*x[1]
        ref[(0, 1, 0, 0)]=0.728709548287*x_ref[0]**o + (-0.196177546008)*x_ref[0] + (-0.782658884055)*x_ref[1]**o + (0.374615381032)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.906723530594*x[0]**o + (-0.714162061764)*x[0] + (0.244316031045)*x[1]**o + (0.130646735491)*x[1]
        ref[(0, 1, 0, 1)]=0.906723530594*x_ref[0]**o + (-0.714162061764)*x_ref[0] + (0.244316031045)*x_ref[1]**o + (0.130646735491)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.512364922722*x[0]**o + (-0.75851915195)*x[0] + (0.772910548807)*x[1]**o + (-0.922087268002)*x[1]
        ref[(0, 1, 1, 0)]=-0.512364922722*x_ref[0]**o + (-0.75851915195)*x_ref[0] + (0.772910548807)*x_ref[1]**o + (-0.922087268002)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.154951630711*x[0]**o + (0.587091838543)*x[0] + (-0.062059471468)*x[1]**o + (-0.298356453574)*x[1]
        ref[(0, 1, 1, 1)]=0.154951630711*x_ref[0]**o + (0.587091838543)*x_ref[0] + (-0.062059471468)*x_ref[1]**o + (-0.298356453574)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.746647552054*x[0]**o + (-0.14662621503)*x[0] + (0.852989927042)*x[1]**o + (0.612520560779)*x[1]
        ref[(0, 1, 2, 0)]=-0.746647552054*x_ref[0]**o + (-0.14662621503)*x_ref[0] + (0.852989927042)*x_ref[1]**o + (0.612520560779)*x_ref[1]
        arg[(0, 1, 2, 1)]=-0.741802158248*x[0]**o + (-0.217161404939)*x[0] + (0.20493515352)*x[1]**o + (-0.685748819803)*x[1]
        ref[(0, 1, 2, 1)]=-0.741802158248*x_ref[0]**o + (-0.217161404939)*x_ref[0] + (0.20493515352)*x_ref[1]**o + (-0.685748819803)*x_ref[1]
        arg[(0, 1, 3, 0)]=0.40453340204*x[0]**o + (0.645227627725)*x[0] + (0.430868462041)*x[1]**o + (0.161946265323)*x[1]
        ref[(0, 1, 3, 0)]=0.40453340204*x_ref[0]**o + (0.645227627725)*x_ref[0] + (0.430868462041)*x_ref[1]**o + (0.161946265323)*x_ref[1]
        arg[(0, 1, 3, 1)]=0.248679417672*x[0]**o + (-0.0415156394992)*x[0] + (-0.270192988158)*x[1]**o + (-0.773748037215)*x[1]
        ref[(0, 1, 3, 1)]=0.248679417672*x_ref[0]**o + (-0.0415156394992)*x_ref[0] + (-0.270192988158)*x_ref[1]**o + (-0.773748037215)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.267055505354*x[0]**o + (0.484723705567)*x[0] + (0.500499518812)*x[1]**o + (0.883782990867)*x[1]
        ref[(1, 0, 0, 0)]=0.267055505354*x_ref[0]**o + (0.484723705567)*x_ref[0] + (0.500499518812)*x_ref[1]**o + (0.883782990867)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.524471491493*x[0]**o + (0.397066501615)*x[0] + (0.460705306426)*x[1]**o + (0.606381210505)*x[1]
        ref[(1, 0, 0, 1)]=0.524471491493*x_ref[0]**o + (0.397066501615)*x_ref[0] + (0.460705306426)*x_ref[1]**o + (0.606381210505)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.62251428504*x[0]**o + (0.933994251211)*x[0] + (0.174022049113)*x[1]**o + (0.790318972407)*x[1]
        ref[(1, 0, 1, 0)]=0.62251428504*x_ref[0]**o + (0.933994251211)*x_ref[0] + (0.174022049113)*x_ref[1]**o + (0.790318972407)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.63711208821*x[0]**o + (-0.572571386996)*x[0] + (-0.743578495453)*x[1]**o + (-0.50749061333)*x[1]
        ref[(1, 0, 1, 1)]=0.63711208821*x_ref[0]**o + (-0.572571386996)*x_ref[0] + (-0.743578495453)*x_ref[1]**o + (-0.50749061333)*x_ref[1]
        arg[(1, 0, 2, 0)]=-0.4649528904*x[0]**o + (0.276539117474)*x[0] + (-0.595149393909)*x[1]**o + (-0.410937705056)*x[1]
        ref[(1, 0, 2, 0)]=-0.4649528904*x_ref[0]**o + (0.276539117474)*x_ref[0] + (-0.595149393909)*x_ref[1]**o + (-0.410937705056)*x_ref[1]
        arg[(1, 0, 2, 1)]=-0.131212526204*x[0]**o + (0.764534078479)*x[0] + (0.657467821073)*x[1]**o + (-0.638962934094)*x[1]
        ref[(1, 0, 2, 1)]=-0.131212526204*x_ref[0]**o + (0.764534078479)*x_ref[0] + (0.657467821073)*x_ref[1]**o + (-0.638962934094)*x_ref[1]
        arg[(1, 0, 3, 0)]=0.536733712384*x[0]**o + (-0.885869558126)*x[0] + (-0.897160205868)*x[1]**o + (0.954543012147)*x[1]
        ref[(1, 0, 3, 0)]=0.536733712384*x_ref[0]**o + (-0.885869558126)*x_ref[0] + (-0.897160205868)*x_ref[1]**o + (0.954543012147)*x_ref[1]
        arg[(1, 0, 3, 1)]=-0.687387341413*x[0]**o + (0.242073332171)*x[0] + (-0.570796346943)*x[1]**o + (0.569138501705)*x[1]
        ref[(1, 0, 3, 1)]=-0.687387341413*x_ref[0]**o + (0.242073332171)*x_ref[0] + (-0.570796346943)*x_ref[1]**o + (0.569138501705)*x_ref[1]
        arg[(1, 1, 0, 0)]=0.333572059163*x[0]**o + (-0.389048840266)*x[0] + (-0.754230612706)*x[1]**o + (0.702741983157)*x[1]
        ref[(1, 1, 0, 0)]=0.333572059163*x_ref[0]**o + (-0.389048840266)*x_ref[0] + (-0.754230612706)*x_ref[1]**o + (0.702741983157)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.402349387683*x[0]**o + (-0.67044968362)*x[0] + (0.0790261682617)*x[1]**o + (-0.971143300318)*x[1]
        ref[(1, 1, 0, 1)]=0.402349387683*x_ref[0]**o + (-0.67044968362)*x_ref[0] + (0.0790261682617)*x_ref[1]**o + (-0.971143300318)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.235576709682*x[0]**o + (0.747987422922)*x[0] + (-0.333050797273)*x[1]**o + (-0.770900201007)*x[1]
        ref[(1, 1, 1, 0)]=-0.235576709682*x_ref[0]**o + (0.747987422922)*x_ref[0] + (-0.333050797273)*x_ref[1]**o + (-0.770900201007)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.318752944783*x[0]**o + (0.265648573117)*x[0] + (0.343296750557)*x[1]**o + (0.542761412705)*x[1]
        ref[(1, 1, 1, 1)]=-0.318752944783*x_ref[0]**o + (0.265648573117)*x_ref[0] + (0.343296750557)*x_ref[1]**o + (0.542761412705)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.392832712093*x[0]**o + (-0.625122816236)*x[0] + (-0.294163715246)*x[1]**o + (0.767965165064)*x[1]
        ref[(1, 1, 2, 0)]=-0.392832712093*x_ref[0]**o + (-0.625122816236)*x_ref[0] + (-0.294163715246)*x_ref[1]**o + (0.767965165064)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.650878362674*x[0]**o + (0.212430283031)*x[0] + (0.660652178446)*x[1]**o + (0.619871267353)*x[1]
        ref[(1, 1, 2, 1)]=-0.650878362674*x_ref[0]**o + (0.212430283031)*x_ref[0] + (0.660652178446)*x_ref[1]**o + (0.619871267353)*x_ref[1]
        arg[(1, 1, 3, 0)]=-0.644395271872*x[0]**o + (-0.431606815569)*x[0] + (0.508320997483)*x[1]**o + (-0.0826401533806)*x[1]
        ref[(1, 1, 3, 0)]=-0.644395271872*x_ref[0]**o + (-0.431606815569)*x_ref[0] + (0.508320997483)*x_ref[1]**o + (-0.0826401533806)*x_ref[1]
        arg[(1, 1, 3, 1)]=-0.452035292175*x[0]**o + (0.961022784595)*x[0] + (0.652826083508)*x[1]**o + (-0.650317078782)*x[1]
        ref[(1, 1, 3, 1)]=-0.452035292175*x_ref[0]**o + (0.961022784595)*x_ref[0] + (0.652826083508)*x_ref[1]**o + (-0.650317078782)*x_ref[1]
        arg[(2, 0, 0, 0)]=-0.879460816364*x[0]**o + (-0.957142458444)*x[0] + (-0.706072018522)*x[1]**o + (-0.45640897131)*x[1]
        ref[(2, 0, 0, 0)]=-0.879460816364*x_ref[0]**o + (-0.957142458444)*x_ref[0] + (-0.706072018522)*x_ref[1]**o + (-0.45640897131)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.0419960487856*x[0]**o + (-0.434850682033)*x[0] + (0.944599645038)*x[1]**o + (-0.274183415003)*x[1]
        ref[(2, 0, 0, 1)]=0.0419960487856*x_ref[0]**o + (-0.434850682033)*x_ref[0] + (0.944599645038)*x_ref[1]**o + (-0.274183415003)*x_ref[1]
        arg[(2, 0, 1, 0)]=-0.00286800620506*x[0]**o + (-0.374781225261)*x[0] + (0.78998313072)*x[1]**o + (0.0303373794993)*x[1]
        ref[(2, 0, 1, 0)]=-0.00286800620506*x_ref[0]**o + (-0.374781225261)*x_ref[0] + (0.78998313072)*x_ref[1]**o + (0.0303373794993)*x_ref[1]
        arg[(2, 0, 1, 1)]=0.824844616391*x[0]**o + (0.228677510949)*x[0] + (0.466678233517)*x[1]**o + (-0.702059310708)*x[1]
        ref[(2, 0, 1, 1)]=0.824844616391*x_ref[0]**o + (0.228677510949)*x_ref[0] + (0.466678233517)*x_ref[1]**o + (-0.702059310708)*x_ref[1]
        arg[(2, 0, 2, 0)]=0.55488182707*x[0]**o + (0.462307742797)*x[0] + (-0.149313555808)*x[1]**o + (-0.368881908007)*x[1]
        ref[(2, 0, 2, 0)]=0.55488182707*x_ref[0]**o + (0.462307742797)*x_ref[0] + (-0.149313555808)*x_ref[1]**o + (-0.368881908007)*x_ref[1]
        arg[(2, 0, 2, 1)]=-0.0128426117728*x[0]**o + (0.660564721253)*x[0] + (0.4863199271)*x[1]**o + (-0.32652246897)*x[1]
        ref[(2, 0, 2, 1)]=-0.0128426117728*x_ref[0]**o + (0.660564721253)*x_ref[0] + (0.4863199271)*x_ref[1]**o + (-0.32652246897)*x_ref[1]
        arg[(2, 0, 3, 0)]=0.929420630652*x[0]**o + (0.478786136592)*x[0] + (0.206756920395)*x[1]**o + (-0.133445062196)*x[1]
        ref[(2, 0, 3, 0)]=0.929420630652*x_ref[0]**o + (0.478786136592)*x_ref[0] + (0.206756920395)*x_ref[1]**o + (-0.133445062196)*x_ref[1]
        arg[(2, 0, 3, 1)]=-0.585712747812*x[0]**o + (-0.309721827429)*x[0] + (0.957848684455)*x[1]**o + (-0.948056307632)*x[1]
        ref[(2, 0, 3, 1)]=-0.585712747812*x_ref[0]**o + (-0.309721827429)*x_ref[0] + (0.957848684455)*x_ref[1]**o + (-0.948056307632)*x_ref[1]
        arg[(2, 1, 0, 0)]=0.143029238043*x[0]**o + (0.885124154729)*x[0] + (0.495681557071)*x[1]**o + (-0.104389061526)*x[1]
        ref[(2, 1, 0, 0)]=0.143029238043*x_ref[0]**o + (0.885124154729)*x_ref[0] + (0.495681557071)*x_ref[1]**o + (-0.104389061526)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.728740129651*x[0]**o + (-0.967863069616)*x[0] + (0.0154335153332)*x[1]**o + (-0.904221135742)*x[1]
        ref[(2, 1, 0, 1)]=0.728740129651*x_ref[0]**o + (-0.967863069616)*x_ref[0] + (0.0154335153332)*x_ref[1]**o + (-0.904221135742)*x_ref[1]
        arg[(2, 1, 1, 0)]=0.0420762775979*x[0]**o + (0.416002483675)*x[0] + (-0.732095345699)*x[1]**o + (-0.65431760873)*x[1]
        ref[(2, 1, 1, 0)]=0.0420762775979*x_ref[0]**o + (0.416002483675)*x_ref[0] + (-0.732095345699)*x_ref[1]**o + (-0.65431760873)*x_ref[1]
        arg[(2, 1, 1, 1)]=0.547939973152*x[0]**o + (-0.876355936962)*x[0] + (-0.0723890741552)*x[1]**o + (0.684945956159)*x[1]
        ref[(2, 1, 1, 1)]=0.547939973152*x_ref[0]**o + (-0.876355936962)*x_ref[0] + (-0.0723890741552)*x_ref[1]**o + (0.684945956159)*x_ref[1]
        arg[(2, 1, 2, 0)]=-0.504896636213*x[0]**o + (0.305116117586)*x[0] + (0.284536714925)*x[1]**o + (0.477223943041)*x[1]
        ref[(2, 1, 2, 0)]=-0.504896636213*x_ref[0]**o + (0.305116117586)*x_ref[0] + (0.284536714925)*x_ref[1]**o + (0.477223943041)*x_ref[1]
        arg[(2, 1, 2, 1)]=-0.16180198103*x[0]**o + (0.825993268861)*x[0] + (-0.0659387853304)*x[1]**o + (0.35527642176)*x[1]
        ref[(2, 1, 2, 1)]=-0.16180198103*x_ref[0]**o + (0.825993268861)*x_ref[0] + (-0.0659387853304)*x_ref[1]**o + (0.35527642176)*x_ref[1]
        arg[(2, 1, 3, 0)]=0.856061189082*x[0]**o + (-0.482924744317)*x[0] + (-0.989706460586)*x[1]**o + (0.933782635843)*x[1]
        ref[(2, 1, 3, 0)]=0.856061189082*x_ref[0]**o + (-0.482924744317)*x_ref[0] + (-0.989706460586)*x_ref[1]**o + (0.933782635843)*x_ref[1]
        arg[(2, 1, 3, 1)]=-0.0438713801973*x[0]**o + (0.814626337941)*x[0] + (0.68068696421)*x[1]**o + (0.446074742514)*x[1]
        ref[(2, 1, 3, 1)]=-0.0438713801973*x_ref[0]**o + (0.814626337941)*x_ref[0] + (0.68068696421)*x_ref[1]**o + (0.446074742514)*x_ref[1]
        arg[(3, 0, 0, 0)]=-0.576863397295*x[0]**o + (-0.284238587537)*x[0] + (-0.296903746568)*x[1]**o + (0.1110296354)*x[1]
        ref[(3, 0, 0, 0)]=-0.576863397295*x_ref[0]**o + (-0.284238587537)*x_ref[0] + (-0.296903746568)*x_ref[1]**o + (0.1110296354)*x_ref[1]
        arg[(3, 0, 0, 1)]=0.882118358583*x[0]**o + (-0.504464964249)*x[0] + (-0.0288979121129)*x[1]**o + (0.271606966674)*x[1]
        ref[(3, 0, 0, 1)]=0.882118358583*x_ref[0]**o + (-0.504464964249)*x_ref[0] + (-0.0288979121129)*x_ref[1]**o + (0.271606966674)*x_ref[1]
        arg[(3, 0, 1, 0)]=-0.800994348023*x[0]**o + (0.389023794087)*x[0] + (-0.246025429494)*x[1]**o + (-0.0494223012495)*x[1]
        ref[(3, 0, 1, 0)]=-0.800994348023*x_ref[0]**o + (0.389023794087)*x_ref[0] + (-0.246025429494)*x_ref[1]**o + (-0.0494223012495)*x_ref[1]
        arg[(3, 0, 1, 1)]=0.344099967549*x[0]**o + (-0.320851889233)*x[0] + (-0.285859089791)*x[1]**o + (0.996628142497)*x[1]
        ref[(3, 0, 1, 1)]=0.344099967549*x_ref[0]**o + (-0.320851889233)*x_ref[0] + (-0.285859089791)*x_ref[1]**o + (0.996628142497)*x_ref[1]
        arg[(3, 0, 2, 0)]=-0.0678427803386*x[0]**o + (-0.391940106878)*x[0] + (0.780602516461)*x[1]**o + (0.891234140969)*x[1]
        ref[(3, 0, 2, 0)]=-0.0678427803386*x_ref[0]**o + (-0.391940106878)*x_ref[0] + (0.780602516461)*x_ref[1]**o + (0.891234140969)*x_ref[1]
        arg[(3, 0, 2, 1)]=-0.440889901163*x[0]**o + (-0.93782588212)*x[0] + (-0.16302606141)*x[1]**o + (0.0237493564813)*x[1]
        ref[(3, 0, 2, 1)]=-0.440889901163*x_ref[0]**o + (-0.93782588212)*x_ref[0] + (-0.16302606141)*x_ref[1]**o + (0.0237493564813)*x_ref[1]
        arg[(3, 0, 3, 0)]=0.405751850306*x[0]**o + (0.108148295652)*x[0] + (0.0456393629565)*x[1]**o + (0.485825412426)*x[1]
        ref[(3, 0, 3, 0)]=0.405751850306*x_ref[0]**o + (0.108148295652)*x_ref[0] + (0.0456393629565)*x_ref[1]**o + (0.485825412426)*x_ref[1]
        arg[(3, 0, 3, 1)]=-0.375669831661*x[0]**o + (-0.148711125343)*x[0] + (-0.883335860661)*x[1]**o + (0.493906231059)*x[1]
        ref[(3, 0, 3, 1)]=-0.375669831661*x_ref[0]**o + (-0.148711125343)*x_ref[0] + (-0.883335860661)*x_ref[1]**o + (0.493906231059)*x_ref[1]
        arg[(3, 1, 0, 0)]=-0.167933505944*x[0]**o + (-0.560714140285)*x[0] + (-0.0332820009954)*x[1]**o + (0.293629571819)*x[1]
        ref[(3, 1, 0, 0)]=-0.167933505944*x_ref[0]**o + (-0.560714140285)*x_ref[0] + (-0.0332820009954)*x_ref[1]**o + (0.293629571819)*x_ref[1]
        arg[(3, 1, 0, 1)]=-0.646706766077*x[0]**o + (0.494834249791)*x[0] + (0.0948012779747)*x[1]**o + (-0.591993590444)*x[1]
        ref[(3, 1, 0, 1)]=-0.646706766077*x_ref[0]**o + (0.494834249791)*x_ref[0] + (0.0948012779747)*x_ref[1]**o + (-0.591993590444)*x_ref[1]
        arg[(3, 1, 1, 0)]=0.571596290981*x[0]**o + (0.0858178099578)*x[0] + (-0.893394110487)*x[1]**o + (-0.168988414799)*x[1]
        ref[(3, 1, 1, 0)]=0.571596290981*x_ref[0]**o + (0.0858178099578)*x_ref[0] + (-0.893394110487)*x_ref[1]**o + (-0.168988414799)*x_ref[1]
        arg[(3, 1, 1, 1)]=0.268639226117*x[0]**o + (-0.227629644426)*x[0] + (0.285708124355)*x[1]**o + (-0.0916426180808)*x[1]
        ref[(3, 1, 1, 1)]=0.268639226117*x_ref[0]**o + (-0.227629644426)*x_ref[0] + (0.285708124355)*x_ref[1]**o + (-0.0916426180808)*x_ref[1]
        arg[(3, 1, 2, 0)]=-0.753856295398*x[0]**o + (-0.913292370853)*x[0] + (-0.84889576629)*x[1]**o + (0.44178440195)*x[1]
        ref[(3, 1, 2, 0)]=-0.753856295398*x_ref[0]**o + (-0.913292370853)*x_ref[0] + (-0.84889576629)*x_ref[1]**o + (0.44178440195)*x_ref[1]
        arg[(3, 1, 2, 1)]=0.961933058568*x[0]**o + (-0.209586737205)*x[0] + (0.11985528298)*x[1]**o + (0.539846491703)*x[1]
        ref[(3, 1, 2, 1)]=0.961933058568*x_ref[0]**o + (-0.209586737205)*x_ref[0] + (0.11985528298)*x_ref[1]**o + (0.539846491703)*x_ref[1]
        arg[(3, 1, 3, 0)]=0.441272638482*x[0]**o + (-0.999136830366)*x[0] + (0.0645551249842)*x[1]**o + (0.559867171697)*x[1]
        ref[(3, 1, 3, 0)]=0.441272638482*x_ref[0]**o + (-0.999136830366)*x_ref[0] + (0.0645551249842)*x_ref[1]**o + (0.559867171697)*x_ref[1]
        arg[(3, 1, 3, 1)]=-0.719396690718*x[0]**o + (-0.393781197298)*x[0] + (0.398592596797)*x[1]**o + (-0.865200671926)*x[1]
        ref[(3, 1, 3, 1)]=-0.719396690718*x_ref[0]**o + (-0.393781197298)*x_ref[0] + (0.398592596797)*x_ref[1]**o + (-0.865200671926)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.443920819205*x[2]**o + (0.127670434641)*x[2]
            ref[(0, 0, 0, 0)]+=0.443920819205*x_ref[2]**o + (0.127670434641)*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.475658010492*x[2]**o + (0.592402943328)*x[2]
            ref[(0, 0, 0, 1)]+=-0.475658010492*x_ref[2]**o + (0.592402943328)*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.354062403133*x[2]**o + (-0.06937156314)*x[2]
            ref[(0, 0, 1, 0)]+=0.354062403133*x_ref[2]**o + (-0.06937156314)*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.809647973604*x[2]**o + (-0.978519982671)*x[2]
            ref[(0, 0, 1, 1)]+=0.809647973604*x_ref[2]**o + (-0.978519982671)*x_ref[2]
            arg[(0, 0, 2, 0)]+=0.606406314552*x[2]**o + (0.500678369034)*x[2]
            ref[(0, 0, 2, 0)]+=0.606406314552*x_ref[2]**o + (0.500678369034)*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.107180791567*x[2]**o + (0.245520888962)*x[2]
            ref[(0, 0, 2, 1)]+=0.107180791567*x_ref[2]**o + (0.245520888962)*x_ref[2]
            arg[(0, 0, 3, 0)]+=-0.556230270461*x[2]**o + (-0.679309473407)*x[2]
            ref[(0, 0, 3, 0)]+=-0.556230270461*x_ref[2]**o + (-0.679309473407)*x_ref[2]
            arg[(0, 0, 3, 1)]+=0.948089075993*x[2]**o + (0.0502183578584)*x[2]
            ref[(0, 0, 3, 1)]+=0.948089075993*x_ref[2]**o + (0.0502183578584)*x_ref[2]
            arg[(0, 1, 0, 0)]+=0.65768239772*x[2]**o + (-0.923938438551)*x[2]
            ref[(0, 1, 0, 0)]+=0.65768239772*x_ref[2]**o + (-0.923938438551)*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.112077135903*x[2]**o + (-0.175634263786)*x[2]
            ref[(0, 1, 0, 1)]+=0.112077135903*x_ref[2]**o + (-0.175634263786)*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.824711967512*x[2]**o + (-0.758873169553)*x[2]
            ref[(0, 1, 1, 0)]+=-0.824711967512*x_ref[2]**o + (-0.758873169553)*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.516502145799*x[2]**o + (0.470616843267)*x[2]
            ref[(0, 1, 1, 1)]+=-0.516502145799*x_ref[2]**o + (0.470616843267)*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.780611591864*x[2]**o + (-0.630398063454)*x[2]
            ref[(0, 1, 2, 0)]+=-0.780611591864*x_ref[2]**o + (-0.630398063454)*x_ref[2]
            arg[(0, 1, 2, 1)]+=-0.152736009039*x[2]**o + (0.31182490302)*x[2]
            ref[(0, 1, 2, 1)]+=-0.152736009039*x_ref[2]**o + (0.31182490302)*x_ref[2]
            arg[(0, 1, 3, 0)]+=0.408303468514*x[2]**o + (0.89149337202)*x[2]
            ref[(0, 1, 3, 0)]+=0.408303468514*x_ref[2]**o + (0.89149337202)*x_ref[2]
            arg[(0, 1, 3, 1)]+=0.884546721974*x[2]**o + (-0.170080803277)*x[2]
            ref[(0, 1, 3, 1)]+=0.884546721974*x_ref[2]**o + (-0.170080803277)*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.239616889821*x[2]**o + (-0.105088948736)*x[2]
            ref[(1, 0, 0, 0)]+=0.239616889821*x_ref[2]**o + (-0.105088948736)*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.805878664966*x[2]**o + (-0.384673294775)*x[2]
            ref[(1, 0, 0, 1)]+=-0.805878664966*x_ref[2]**o + (-0.384673294775)*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.166578193503*x[2]**o + (-0.557659897435)*x[2]
            ref[(1, 0, 1, 0)]+=0.166578193503*x_ref[2]**o + (-0.557659897435)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.654588373317*x[2]**o + (-0.364034939151)*x[2]
            ref[(1, 0, 1, 1)]+=-0.654588373317*x_ref[2]**o + (-0.364034939151)*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.416808581262*x[2]**o + (-0.461352380011)*x[2]
            ref[(1, 0, 2, 0)]+=-0.416808581262*x_ref[2]**o + (-0.461352380011)*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.104004691807*x[2]**o + (-0.715896176498)*x[2]
            ref[(1, 0, 2, 1)]+=0.104004691807*x_ref[2]**o + (-0.715896176498)*x_ref[2]
            arg[(1, 0, 3, 0)]+=0.316454856782*x[2]**o + (-0.123874170892)*x[2]
            ref[(1, 0, 3, 0)]+=0.316454856782*x_ref[2]**o + (-0.123874170892)*x_ref[2]
            arg[(1, 0, 3, 1)]+=-0.685424270406*x[2]**o + (0.658621287729)*x[2]
            ref[(1, 0, 3, 1)]+=-0.685424270406*x_ref[2]**o + (0.658621287729)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.384526078183*x[2]**o + (0.118561757859)*x[2]
            ref[(1, 1, 0, 0)]+=0.384526078183*x_ref[2]**o + (0.118561757859)*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.527467446858*x[2]**o + (0.297516307943)*x[2]
            ref[(1, 1, 0, 1)]+=-0.527467446858*x_ref[2]**o + (0.297516307943)*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.107629788474*x[2]**o + (-0.143275344284)*x[2]
            ref[(1, 1, 1, 0)]+=-0.107629788474*x_ref[2]**o + (-0.143275344284)*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.135470524539*x[2]**o + (-0.469060875477)*x[2]
            ref[(1, 1, 1, 1)]+=0.135470524539*x_ref[2]**o + (-0.469060875477)*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.0071088178346*x[2]**o + (-0.246244487463)*x[2]
            ref[(1, 1, 2, 0)]+=-0.0071088178346*x_ref[2]**o + (-0.246244487463)*x_ref[2]
            arg[(1, 1, 2, 1)]+=-0.130374502219*x[2]**o + (-0.0340217722855)*x[2]
            ref[(1, 1, 2, 1)]+=-0.130374502219*x_ref[2]**o + (-0.0340217722855)*x_ref[2]
            arg[(1, 1, 3, 0)]+=0.860452972902*x[2]**o + (0.715476711118)*x[2]
            ref[(1, 1, 3, 0)]+=0.860452972902*x_ref[2]**o + (0.715476711118)*x_ref[2]
            arg[(1, 1, 3, 1)]+=-0.291647517702*x[2]**o + (-0.528839644502)*x[2]
            ref[(1, 1, 3, 1)]+=-0.291647517702*x_ref[2]**o + (-0.528839644502)*x_ref[2]
            arg[(2, 0, 0, 0)]+=0.0918134816061*x[2]**o + (-0.370770656004)*x[2]
            ref[(2, 0, 0, 0)]+=0.0918134816061*x_ref[2]**o + (-0.370770656004)*x_ref[2]
            arg[(2, 0, 0, 1)]+=-0.191582528467*x[2]**o + (-0.464873895764)*x[2]
            ref[(2, 0, 0, 1)]+=-0.191582528467*x_ref[2]**o + (-0.464873895764)*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.143737602929*x[2]**o + (0.286347200036)*x[2]
            ref[(2, 0, 1, 0)]+=-0.143737602929*x_ref[2]**o + (0.286347200036)*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.360255890191*x[2]**o + (0.655722530717)*x[2]
            ref[(2, 0, 1, 1)]+=0.360255890191*x_ref[2]**o + (0.655722530717)*x_ref[2]
            arg[(2, 0, 2, 0)]+=-0.32755130718*x[2]**o + (0.977781481167)*x[2]
            ref[(2, 0, 2, 0)]+=-0.32755130718*x_ref[2]**o + (0.977781481167)*x_ref[2]
            arg[(2, 0, 2, 1)]+=0.736012633448*x[2]**o + (0.378895283456)*x[2]
            ref[(2, 0, 2, 1)]+=0.736012633448*x_ref[2]**o + (0.378895283456)*x_ref[2]
            arg[(2, 0, 3, 0)]+=0.609794917939*x[2]**o + (-0.116023640639)*x[2]
            ref[(2, 0, 3, 0)]+=0.609794917939*x_ref[2]**o + (-0.116023640639)*x_ref[2]
            arg[(2, 0, 3, 1)]+=-0.683074773407*x[2]**o + (0.380851566088)*x[2]
            ref[(2, 0, 3, 1)]+=-0.683074773407*x_ref[2]**o + (0.380851566088)*x_ref[2]
            arg[(2, 1, 0, 0)]+=0.848390159656*x[2]**o + (-0.868899013273)*x[2]
            ref[(2, 1, 0, 0)]+=0.848390159656*x_ref[2]**o + (-0.868899013273)*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.971820057594*x[2]**o + (-0.313539166495)*x[2]
            ref[(2, 1, 0, 1)]+=-0.971820057594*x_ref[2]**o + (-0.313539166495)*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.312587378085*x[2]**o + (0.420267338501)*x[2]
            ref[(2, 1, 1, 0)]+=0.312587378085*x_ref[2]**o + (0.420267338501)*x_ref[2]
            arg[(2, 1, 1, 1)]+=0.664947884107*x[2]**o + (0.863753943413)*x[2]
            ref[(2, 1, 1, 1)]+=0.664947884107*x_ref[2]**o + (0.863753943413)*x_ref[2]
            arg[(2, 1, 2, 0)]+=0.2166032977*x[2]**o + (0.21745048161)*x[2]
            ref[(2, 1, 2, 0)]+=0.2166032977*x_ref[2]**o + (0.21745048161)*x_ref[2]
            arg[(2, 1, 2, 1)]+=0.188814545594*x[2]**o + (-0.660526494256)*x[2]
            ref[(2, 1, 2, 1)]+=0.188814545594*x_ref[2]**o + (-0.660526494256)*x_ref[2]
            arg[(2, 1, 3, 0)]+=-0.122619189361*x[2]**o + (-0.13790318252)*x[2]
            ref[(2, 1, 3, 0)]+=-0.122619189361*x_ref[2]**o + (-0.13790318252)*x_ref[2]
            arg[(2, 1, 3, 1)]+=0.961966446462*x[2]**o + (-0.856987587783)*x[2]
            ref[(2, 1, 3, 1)]+=0.961966446462*x_ref[2]**o + (-0.856987587783)*x_ref[2]
            arg[(3, 0, 0, 0)]+=-0.603087016284*x[2]**o + (0.497449596937)*x[2]
            ref[(3, 0, 0, 0)]+=-0.603087016284*x_ref[2]**o + (0.497449596937)*x_ref[2]
            arg[(3, 0, 0, 1)]+=0.30584347236*x[2]**o + (0.0295419403021)*x[2]
            ref[(3, 0, 0, 1)]+=0.30584347236*x_ref[2]**o + (0.0295419403021)*x_ref[2]
            arg[(3, 0, 1, 0)]+=0.273648285295*x[2]**o + (0.561278443242)*x[2]
            ref[(3, 0, 1, 0)]+=0.273648285295*x_ref[2]**o + (0.561278443242)*x_ref[2]
            arg[(3, 0, 1, 1)]+=0.0513469000389*x[2]**o + (0.286707303359)*x[2]
            ref[(3, 0, 1, 1)]+=0.0513469000389*x_ref[2]**o + (0.286707303359)*x_ref[2]
            arg[(3, 0, 2, 0)]+=0.730220147355*x[2]**o + (0.00061641959649)*x[2]
            ref[(3, 0, 2, 0)]+=0.730220147355*x_ref[2]**o + (0.00061641959649)*x_ref[2]
            arg[(3, 0, 2, 1)]+=0.120926714109*x[2]**o + (0.734550355656)*x[2]
            ref[(3, 0, 2, 1)]+=0.120926714109*x_ref[2]**o + (0.734550355656)*x_ref[2]
            arg[(3, 0, 3, 0)]+=0.480831177437*x[2]**o + (0.971749912316)*x[2]
            ref[(3, 0, 3, 0)]+=0.480831177437*x_ref[2]**o + (0.971749912316)*x_ref[2]
            arg[(3, 0, 3, 1)]+=0.773987479865*x[2]**o + (0.0386992209212)*x[2]
            ref[(3, 0, 3, 1)]+=0.773987479865*x_ref[2]**o + (0.0386992209212)*x_ref[2]
            arg[(3, 1, 0, 0)]+=0.497848115815*x[2]**o + (0.27518162562)*x[2]
            ref[(3, 1, 0, 0)]+=0.497848115815*x_ref[2]**o + (0.27518162562)*x_ref[2]
            arg[(3, 1, 0, 1)]+=-0.213564760295*x[2]**o + (-0.993187488888)*x[2]
            ref[(3, 1, 0, 1)]+=-0.213564760295*x_ref[2]**o + (-0.993187488888)*x_ref[2]
            arg[(3, 1, 1, 0)]+=0.330175613427*x[2]**o + (-0.374542557457)*x[2]
            ref[(3, 1, 1, 0)]+=0.330175613427*x_ref[2]**o + (-0.374542557457)*x_ref[2]
            arg[(3, 1, 1, 1)]+=-0.10080153828*x[2]**o + (0.467455129694)*x[2]
            ref[(3, 1, 1, 1)]+=-0.10080153828*x_ref[2]**o + (0.467455129694)*x_ref[2]
            arg[(3, 1, 2, 0)]+=0.15067851011*x[2]**o + (0.821076900005)*x[2]
            ref[(3, 1, 2, 0)]+=0.15067851011*x_ref[2]**o + (0.821076900005)*x_ref[2]
            arg[(3, 1, 2, 1)]+=-0.179587743396*x[2]**o + (-0.498403308004)*x[2]
            ref[(3, 1, 2, 1)]+=-0.179587743396*x_ref[2]**o + (-0.498403308004)*x_ref[2]
            arg[(3, 1, 3, 0)]+=-0.124540163894*x[2]**o + (0.410293544906)*x[2]
            ref[(3, 1, 3, 0)]+=-0.124540163894*x_ref[2]**o + (0.410293544906)*x_ref[2]
            arg[(3, 1, 3, 1)]+=0.900486342985*x[2]**o + (0.226192439154)*x[2]
            ref[(3, 1, 3, 1)]+=0.900486342985*x_ref[2]**o + (0.226192439154)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.0162009712169*x[0]**o + (0.0388925443912)*x[0] + (-0.37080977734)*x[1]**o + (-0.829146287721)*x[1]
        ref=0.0162009712169*x_ref[0]**o + (0.0388925443912)*x_ref[0] + (-0.37080977734)*x_ref[1]**o + (-0.829146287721)*x_ref[1]
        if dim==3:
            arg+=(-0.254842985783)*x[2]**o + (0.0336635390414)*x[2]
            ref+=(-0.254842985783)*x_ref[2]**o + (0.0336635390414)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=-0.066725437033*x[0]**o + (0.269284280513)*x[0] + (0.539845628639)*x[1]**o + (0.861386786563)*x[1]
        ref[(0,)]=-0.066725437033*x_ref[0]**o + (0.269284280513)*x_ref[0] + (0.539845628639)*x_ref[1]**o + (0.861386786563)*x_ref[1]
        arg[(1,)]=0.532159774709*x[0]**o + (-0.408643257007)*x[0] + (-0.206322389448)*x[1]**o + (-0.957216956004)*x[1]
        ref[(1,)]=0.532159774709*x_ref[0]**o + (-0.408643257007)*x_ref[0] + (-0.206322389448)*x_ref[1]**o + (-0.957216956004)*x_ref[1]
        arg[(2,)]=0.780362555591*x[0]**o + (-0.817116759743)*x[0] + (0.901519187592)*x[1]**o + (0.170055144873)*x[1]
        ref[(2,)]=0.780362555591*x_ref[0]**o + (-0.817116759743)*x_ref[0] + (0.901519187592)*x_ref[1]**o + (0.170055144873)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.190319751891*x[2]**o + (-0.0896063700566)*x[2]
            ref[(0,)]+=-0.190319751891*x_ref[2]**o + (-0.0896063700566)*x_ref[2]
            arg[(1,)]+=-0.0917718932154*x[2]**o + (0.934547509991)*x[2]
            ref[(1,)]+=-0.0917718932154*x_ref[2]**o + (0.934547509991)*x_ref[2]
            arg[(2,)]+=0.857211364003*x[2]**o + (-0.685803863507)*x[2]
            ref[(2,)]+=0.857211364003*x_ref[2]**o + (-0.685803863507)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref = Data(0,(4, 3),w_ref)
        arg[(0, 0)]=0.175721617691*x[0]**o + (0.0723131169138)*x[0] + (0.467047109757)*x[1]**o + (-0.233865963478)*x[1]
        ref[(0, 0)]=0.175721617691*x_ref[0]**o + (0.0723131169138)*x_ref[0] + (0.467047109757)*x_ref[1]**o + (-0.233865963478)*x_ref[1]
        arg[(0, 1)]=0.471615193983*x[0]**o + (-0.177319312532)*x[0] + (-0.582305524008)*x[1]**o + (0.0910084997063)*x[1]
        ref[(0, 1)]=0.471615193983*x_ref[0]**o + (-0.177319312532)*x_ref[0] + (-0.582305524008)*x_ref[1]**o + (0.0910084997063)*x_ref[1]
        arg[(0, 2)]=0.980559772251*x[0]**o + (0.55030124557)*x[0] + (-0.529709064851)*x[1]**o + (0.964737569676)*x[1]
        ref[(0, 2)]=0.980559772251*x_ref[0]**o + (0.55030124557)*x_ref[0] + (-0.529709064851)*x_ref[1]**o + (0.964737569676)*x_ref[1]
        arg[(1, 0)]=0.734952552083*x[0]**o + (-0.753943783616)*x[0] + (0.214968517211)*x[1]**o + (0.179653454566)*x[1]
        ref[(1, 0)]=0.734952552083*x_ref[0]**o + (-0.753943783616)*x_ref[0] + (0.214968517211)*x_ref[1]**o + (0.179653454566)*x_ref[1]
        arg[(1, 1)]=0.453807736857*x[0]**o + (0.884087409212)*x[0] + (0.0171794372574)*x[1]**o + (0.230289010666)*x[1]
        ref[(1, 1)]=0.453807736857*x_ref[0]**o + (0.884087409212)*x_ref[0] + (0.0171794372574)*x_ref[1]**o + (0.230289010666)*x_ref[1]
        arg[(1, 2)]=0.390483920786*x[0]**o + (0.188284691572)*x[0] + (0.663565145126)*x[1]**o + (0.3856807363)*x[1]
        ref[(1, 2)]=0.390483920786*x_ref[0]**o + (0.188284691572)*x_ref[0] + (0.663565145126)*x_ref[1]**o + (0.3856807363)*x_ref[1]
        arg[(2, 0)]=0.0183914102602*x[0]**o + (-0.797446196381)*x[0] + (-0.269377030326)*x[1]**o + (0.779576402299)*x[1]
        ref[(2, 0)]=0.0183914102602*x_ref[0]**o + (-0.797446196381)*x_ref[0] + (-0.269377030326)*x_ref[1]**o + (0.779576402299)*x_ref[1]
        arg[(2, 1)]=-0.905018246657*x[0]**o + (0.622584139974)*x[0] + (-0.25135923326)*x[1]**o + (-0.117403094789)*x[1]
        ref[(2, 1)]=-0.905018246657*x_ref[0]**o + (0.622584139974)*x_ref[0] + (-0.25135923326)*x_ref[1]**o + (-0.117403094789)*x_ref[1]
        arg[(2, 2)]=-0.453426697475*x[0]**o + (-0.346843378067)*x[0] + (0.406989672794)*x[1]**o + (0.953030974202)*x[1]
        ref[(2, 2)]=-0.453426697475*x_ref[0]**o + (-0.346843378067)*x_ref[0] + (0.406989672794)*x_ref[1]**o + (0.953030974202)*x_ref[1]
        arg[(3, 0)]=-0.253561220614*x[0]**o + (0.0663547656974)*x[0] + (0.46207026114)*x[1]**o + (0.419859802647)*x[1]
        ref[(3, 0)]=-0.253561220614*x_ref[0]**o + (0.0663547656974)*x_ref[0] + (0.46207026114)*x_ref[1]**o + (0.419859802647)*x_ref[1]
        arg[(3, 1)]=-0.36198235394*x[0]**o + (0.72937670736)*x[0] + (0.865573569993)*x[1]**o + (-0.956872627304)*x[1]
        ref[(3, 1)]=-0.36198235394*x_ref[0]**o + (0.72937670736)*x_ref[0] + (0.865573569993)*x_ref[1]**o + (-0.956872627304)*x_ref[1]
        arg[(3, 2)]=0.810648449824*x[0]**o + (-0.153626545517)*x[0] + (0.832439971259)*x[1]**o + (-0.896248935816)*x[1]
        ref[(3, 2)]=0.810648449824*x_ref[0]**o + (-0.153626545517)*x_ref[0] + (0.832439971259)*x_ref[1]**o + (-0.896248935816)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.693612430072*x[2]**o + (-0.607955223371)*x[2]
            ref[(0, 0)]+=-0.693612430072*x_ref[2]**o + (-0.607955223371)*x_ref[2]
            arg[(0, 1)]+=0.0252471421314*x[2]**o + (0.732533218951)*x[2]
            ref[(0, 1)]+=0.0252471421314*x_ref[2]**o + (0.732533218951)*x_ref[2]
            arg[(0, 2)]+=-0.737862112703*x[2]**o + (-0.250408259088)*x[2]
            ref[(0, 2)]+=-0.737862112703*x_ref[2]**o + (-0.250408259088)*x_ref[2]
            arg[(1, 0)]+=-0.918467832242*x[2]**o + (0.700645788837)*x[2]
            ref[(1, 0)]+=-0.918467832242*x_ref[2]**o + (0.700645788837)*x_ref[2]
            arg[(1, 1)]+=0.900679623052*x[2]**o + (0.447972574992)*x[2]
            ref[(1, 1)]+=0.900679623052*x_ref[2]**o + (0.447972574992)*x_ref[2]
            arg[(1, 2)]+=0.98842171519*x[2]**o + (-0.507568547043)*x[2]
            ref[(1, 2)]+=0.98842171519*x_ref[2]**o + (-0.507568547043)*x_ref[2]
            arg[(2, 0)]+=0.360545215265*x[2]**o + (-0.611556346744)*x[2]
            ref[(2, 0)]+=0.360545215265*x_ref[2]**o + (-0.611556346744)*x_ref[2]
            arg[(2, 1)]+=-0.482386118811*x[2]**o + (0.0526152876776)*x[2]
            ref[(2, 1)]+=-0.482386118811*x_ref[2]**o + (0.0526152876776)*x_ref[2]
            arg[(2, 2)]+=-0.966125083621*x[2]**o + (0.97053951021)*x[2]
            ref[(2, 2)]+=-0.966125083621*x_ref[2]**o + (0.97053951021)*x_ref[2]
            arg[(3, 0)]+=0.107286454366*x[2]**o + (-0.316030308365)*x[2]
            ref[(3, 0)]+=0.107286454366*x_ref[2]**o + (-0.316030308365)*x_ref[2]
            arg[(3, 1)]+=-0.462743804947*x[2]**o + (0.491911955351)*x[2]
            ref[(3, 1)]+=-0.462743804947*x_ref[2]**o + (0.491911955351)*x_ref[2]
            arg[(3, 2)]+=-0.64963460361*x[2]**o + (0.767680775033)*x[2]
            ref[(3, 2)]+=-0.64963460361*x_ref[2]**o + (0.767680775033)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 4),w)
        ref = Data(0,(4, 2, 4),w_ref)
        arg[(0, 0, 0)]=-0.596017222607*x[0]**o + (0.168145265368)*x[0] + (0.454472391726)*x[1]**o + (-0.372290002694)*x[1]
        ref[(0, 0, 0)]=-0.596017222607*x_ref[0]**o + (0.168145265368)*x_ref[0] + (0.454472391726)*x_ref[1]**o + (-0.372290002694)*x_ref[1]
        arg[(0, 0, 1)]=0.657780688816*x[0]**o + (0.337019283262)*x[0] + (0.954483553174)*x[1]**o + (0.530624725821)*x[1]
        ref[(0, 0, 1)]=0.657780688816*x_ref[0]**o + (0.337019283262)*x_ref[0] + (0.954483553174)*x_ref[1]**o + (0.530624725821)*x_ref[1]
        arg[(0, 0, 2)]=-0.616945129429*x[0]**o + (-0.895264059847)*x[0] + (-0.836559361122)*x[1]**o + (-0.200319759945)*x[1]
        ref[(0, 0, 2)]=-0.616945129429*x_ref[0]**o + (-0.895264059847)*x_ref[0] + (-0.836559361122)*x_ref[1]**o + (-0.200319759945)*x_ref[1]
        arg[(0, 0, 3)]=-0.456448241456*x[0]**o + (-0.441831390456)*x[0] + (0.735164205445)*x[1]**o + (-0.224414705247)*x[1]
        ref[(0, 0, 3)]=-0.456448241456*x_ref[0]**o + (-0.441831390456)*x_ref[0] + (0.735164205445)*x_ref[1]**o + (-0.224414705247)*x_ref[1]
        arg[(0, 1, 0)]=0.37540587749*x[0]**o + (0.399796575116)*x[0] + (0.782058592506)*x[1]**o + (0.381796687181)*x[1]
        ref[(0, 1, 0)]=0.37540587749*x_ref[0]**o + (0.399796575116)*x_ref[0] + (0.782058592506)*x_ref[1]**o + (0.381796687181)*x_ref[1]
        arg[(0, 1, 1)]=-0.64492600327*x[0]**o + (0.319755796395)*x[0] + (0.410959867623)*x[1]**o + (0.410945092618)*x[1]
        ref[(0, 1, 1)]=-0.64492600327*x_ref[0]**o + (0.319755796395)*x_ref[0] + (0.410959867623)*x_ref[1]**o + (0.410945092618)*x_ref[1]
        arg[(0, 1, 2)]=0.967669936936*x[0]**o + (0.398854454679)*x[0] + (0.493675677612)*x[1]**o + (-0.748945839084)*x[1]
        ref[(0, 1, 2)]=0.967669936936*x_ref[0]**o + (0.398854454679)*x_ref[0] + (0.493675677612)*x_ref[1]**o + (-0.748945839084)*x_ref[1]
        arg[(0, 1, 3)]=0.282463918783*x[0]**o + (0.182723418078)*x[0] + (-0.9909451219)*x[1]**o + (0.785421053932)*x[1]
        ref[(0, 1, 3)]=0.282463918783*x_ref[0]**o + (0.182723418078)*x_ref[0] + (-0.9909451219)*x_ref[1]**o + (0.785421053932)*x_ref[1]
        arg[(1, 0, 0)]=-0.534443704442*x[0]**o + (-0.147258151856)*x[0] + (0.00231444222386)*x[1]**o + (-0.540025314219)*x[1]
        ref[(1, 0, 0)]=-0.534443704442*x_ref[0]**o + (-0.147258151856)*x_ref[0] + (0.00231444222386)*x_ref[1]**o + (-0.540025314219)*x_ref[1]
        arg[(1, 0, 1)]=-0.172804153335*x[0]**o + (0.131194771449)*x[0] + (-0.875849010197)*x[1]**o + (0.557006343653)*x[1]
        ref[(1, 0, 1)]=-0.172804153335*x_ref[0]**o + (0.131194771449)*x_ref[0] + (-0.875849010197)*x_ref[1]**o + (0.557006343653)*x_ref[1]
        arg[(1, 0, 2)]=0.327228574198*x[0]**o + (-0.895888981543)*x[0] + (-0.565183689343)*x[1]**o + (-0.137219215892)*x[1]
        ref[(1, 0, 2)]=0.327228574198*x_ref[0]**o + (-0.895888981543)*x_ref[0] + (-0.565183689343)*x_ref[1]**o + (-0.137219215892)*x_ref[1]
        arg[(1, 0, 3)]=-0.898595842729*x[0]**o + (0.377462492993)*x[0] + (-0.616482754629)*x[1]**o + (0.849770415469)*x[1]
        ref[(1, 0, 3)]=-0.898595842729*x_ref[0]**o + (0.377462492993)*x_ref[0] + (-0.616482754629)*x_ref[1]**o + (0.849770415469)*x_ref[1]
        arg[(1, 1, 0)]=-0.812649387724*x[0]**o + (0.891109073733)*x[0] + (-0.505511982667)*x[1]**o + (0.363019862277)*x[1]
        ref[(1, 1, 0)]=-0.812649387724*x_ref[0]**o + (0.891109073733)*x_ref[0] + (-0.505511982667)*x_ref[1]**o + (0.363019862277)*x_ref[1]
        arg[(1, 1, 1)]=-0.865360337516*x[0]**o + (0.887871427947)*x[0] + (-0.0275874263735)*x[1]**o + (-0.736260829187)*x[1]
        ref[(1, 1, 1)]=-0.865360337516*x_ref[0]**o + (0.887871427947)*x_ref[0] + (-0.0275874263735)*x_ref[1]**o + (-0.736260829187)*x_ref[1]
        arg[(1, 1, 2)]=-0.499866887686*x[0]**o + (0.73688308363)*x[0] + (-0.861791357437)*x[1]**o + (-0.0930440687742)*x[1]
        ref[(1, 1, 2)]=-0.499866887686*x_ref[0]**o + (0.73688308363)*x_ref[0] + (-0.861791357437)*x_ref[1]**o + (-0.0930440687742)*x_ref[1]
        arg[(1, 1, 3)]=-0.138312729919*x[0]**o + (0.303905719483)*x[0] + (-0.753348942349)*x[1]**o + (-0.0403777962789)*x[1]
        ref[(1, 1, 3)]=-0.138312729919*x_ref[0]**o + (0.303905719483)*x_ref[0] + (-0.753348942349)*x_ref[1]**o + (-0.0403777962789)*x_ref[1]
        arg[(2, 0, 0)]=-0.310965308193*x[0]**o + (0.949236497053)*x[0] + (-0.326009177934)*x[1]**o + (0.722173934322)*x[1]
        ref[(2, 0, 0)]=-0.310965308193*x_ref[0]**o + (0.949236497053)*x_ref[0] + (-0.326009177934)*x_ref[1]**o + (0.722173934322)*x_ref[1]
        arg[(2, 0, 1)]=0.781128836191*x[0]**o + (-0.897667369941)*x[0] + (0.931942733655)*x[1]**o + (0.869434385598)*x[1]
        ref[(2, 0, 1)]=0.781128836191*x_ref[0]**o + (-0.897667369941)*x_ref[0] + (0.931942733655)*x_ref[1]**o + (0.869434385598)*x_ref[1]
        arg[(2, 0, 2)]=-0.363616970798*x[0]**o + (-0.43359398321)*x[0] + (-0.335082883618)*x[1]**o + (-0.647910163346)*x[1]
        ref[(2, 0, 2)]=-0.363616970798*x_ref[0]**o + (-0.43359398321)*x_ref[0] + (-0.335082883618)*x_ref[1]**o + (-0.647910163346)*x_ref[1]
        arg[(2, 0, 3)]=-0.356264723119*x[0]**o + (-0.257552521011)*x[0] + (0.814417475829)*x[1]**o + (0.356085152274)*x[1]
        ref[(2, 0, 3)]=-0.356264723119*x_ref[0]**o + (-0.257552521011)*x_ref[0] + (0.814417475829)*x_ref[1]**o + (0.356085152274)*x_ref[1]
        arg[(2, 1, 0)]=0.900763740285*x[0]**o + (-0.732318968898)*x[0] + (-0.536650211633)*x[1]**o + (-0.632439836084)*x[1]
        ref[(2, 1, 0)]=0.900763740285*x_ref[0]**o + (-0.732318968898)*x_ref[0] + (-0.536650211633)*x_ref[1]**o + (-0.632439836084)*x_ref[1]
        arg[(2, 1, 1)]=-0.387797603137*x[0]**o + (0.769120046833)*x[0] + (0.203222545604)*x[1]**o + (-0.71613625229)*x[1]
        ref[(2, 1, 1)]=-0.387797603137*x_ref[0]**o + (0.769120046833)*x_ref[0] + (0.203222545604)*x_ref[1]**o + (-0.71613625229)*x_ref[1]
        arg[(2, 1, 2)]=-0.964885213841*x[0]**o + (0.175088811044)*x[0] + (0.308534213603)*x[1]**o + (-0.72023557452)*x[1]
        ref[(2, 1, 2)]=-0.964885213841*x_ref[0]**o + (0.175088811044)*x_ref[0] + (0.308534213603)*x_ref[1]**o + (-0.72023557452)*x_ref[1]
        arg[(2, 1, 3)]=0.314051715496*x[0]**o + (0.189917567847)*x[0] + (-0.596009149112)*x[1]**o + (-0.385253906339)*x[1]
        ref[(2, 1, 3)]=0.314051715496*x_ref[0]**o + (0.189917567847)*x_ref[0] + (-0.596009149112)*x_ref[1]**o + (-0.385253906339)*x_ref[1]
        arg[(3, 0, 0)]=-0.436408473646*x[0]**o + (0.888942254828)*x[0] + (0.597361463093)*x[1]**o + (-0.712695177509)*x[1]
        ref[(3, 0, 0)]=-0.436408473646*x_ref[0]**o + (0.888942254828)*x_ref[0] + (0.597361463093)*x_ref[1]**o + (-0.712695177509)*x_ref[1]
        arg[(3, 0, 1)]=0.103908148414*x[0]**o + (-0.970074125599)*x[0] + (-0.0670839111492)*x[1]**o + (0.409025103419)*x[1]
        ref[(3, 0, 1)]=0.103908148414*x_ref[0]**o + (-0.970074125599)*x_ref[0] + (-0.0670839111492)*x_ref[1]**o + (0.409025103419)*x_ref[1]
        arg[(3, 0, 2)]=-0.0587721547417*x[0]**o + (-0.296576847255)*x[0] + (-0.418774426305)*x[1]**o + (-0.410017294414)*x[1]
        ref[(3, 0, 2)]=-0.0587721547417*x_ref[0]**o + (-0.296576847255)*x_ref[0] + (-0.418774426305)*x_ref[1]**o + (-0.410017294414)*x_ref[1]
        arg[(3, 0, 3)]=0.0167347356381*x[0]**o + (0.581666422733)*x[0] + (0.562986448157)*x[1]**o + (0.783813187095)*x[1]
        ref[(3, 0, 3)]=0.0167347356381*x_ref[0]**o + (0.581666422733)*x_ref[0] + (0.562986448157)*x_ref[1]**o + (0.783813187095)*x_ref[1]
        arg[(3, 1, 0)]=-0.617000974961*x[0]**o + (0.0141430137722)*x[0] + (-0.648863607558)*x[1]**o + (-0.650280949091)*x[1]
        ref[(3, 1, 0)]=-0.617000974961*x_ref[0]**o + (0.0141430137722)*x_ref[0] + (-0.648863607558)*x_ref[1]**o + (-0.650280949091)*x_ref[1]
        arg[(3, 1, 1)]=0.185521330521*x[0]**o + (0.755827187256)*x[0] + (0.436501856452)*x[1]**o + (-0.703478567633)*x[1]
        ref[(3, 1, 1)]=0.185521330521*x_ref[0]**o + (0.755827187256)*x_ref[0] + (0.436501856452)*x_ref[1]**o + (-0.703478567633)*x_ref[1]
        arg[(3, 1, 2)]=0.473245634298*x[0]**o + (-0.797235771971)*x[0] + (0.482660993451)*x[1]**o + (-0.604307930161)*x[1]
        ref[(3, 1, 2)]=0.473245634298*x_ref[0]**o + (-0.797235771971)*x_ref[0] + (0.482660993451)*x_ref[1]**o + (-0.604307930161)*x_ref[1]
        arg[(3, 1, 3)]=0.981096764095*x[0]**o + (0.301628356119)*x[0] + (-0.574642071424)*x[1]**o + (-0.633715921156)*x[1]
        ref[(3, 1, 3)]=0.981096764095*x_ref[0]**o + (0.301628356119)*x_ref[0] + (-0.574642071424)*x_ref[1]**o + (-0.633715921156)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.943277865733*x[2]**o + (0.00739551384629)*x[2]
            ref[(0, 0, 0)]+=0.943277865733*x_ref[2]**o + (0.00739551384629)*x_ref[2]
            arg[(0, 0, 1)]+=0.867936447092*x[2]**o + (-0.77605383681)*x[2]
            ref[(0, 0, 1)]+=0.867936447092*x_ref[2]**o + (-0.77605383681)*x_ref[2]
            arg[(0, 0, 2)]+=0.819318874539*x[2]**o + (0.34336341831)*x[2]
            ref[(0, 0, 2)]+=0.819318874539*x_ref[2]**o + (0.34336341831)*x_ref[2]
            arg[(0, 0, 3)]+=0.953300048605*x[2]**o + (0.258646976843)*x[2]
            ref[(0, 0, 3)]+=0.953300048605*x_ref[2]**o + (0.258646976843)*x_ref[2]
            arg[(0, 1, 0)]+=-0.335294432217*x[2]**o + (0.226563947047)*x[2]
            ref[(0, 1, 0)]+=-0.335294432217*x_ref[2]**o + (0.226563947047)*x_ref[2]
            arg[(0, 1, 1)]+=-0.0684059651827*x[2]**o + (0.669652760975)*x[2]
            ref[(0, 1, 1)]+=-0.0684059651827*x_ref[2]**o + (0.669652760975)*x_ref[2]
            arg[(0, 1, 2)]+=0.58194831926*x[2]**o + (0.37109478068)*x[2]
            ref[(0, 1, 2)]+=0.58194831926*x_ref[2]**o + (0.37109478068)*x_ref[2]
            arg[(0, 1, 3)]+=0.280963333867*x[2]**o + (-0.845378875959)*x[2]
            ref[(0, 1, 3)]+=0.280963333867*x_ref[2]**o + (-0.845378875959)*x_ref[2]
            arg[(1, 0, 0)]+=0.794483216169*x[2]**o + (-0.651743563448)*x[2]
            ref[(1, 0, 0)]+=0.794483216169*x_ref[2]**o + (-0.651743563448)*x_ref[2]
            arg[(1, 0, 1)]+=-0.55886994618*x[2]**o + (0.209824592021)*x[2]
            ref[(1, 0, 1)]+=-0.55886994618*x_ref[2]**o + (0.209824592021)*x_ref[2]
            arg[(1, 0, 2)]+=-0.269161619783*x[2]**o + (0.440762668402)*x[2]
            ref[(1, 0, 2)]+=-0.269161619783*x_ref[2]**o + (0.440762668402)*x_ref[2]
            arg[(1, 0, 3)]+=0.898352032763*x[2]**o + (0.296312527554)*x[2]
            ref[(1, 0, 3)]+=0.898352032763*x_ref[2]**o + (0.296312527554)*x_ref[2]
            arg[(1, 1, 0)]+=-0.598319888657*x[2]**o + (0.187509155505)*x[2]
            ref[(1, 1, 0)]+=-0.598319888657*x_ref[2]**o + (0.187509155505)*x_ref[2]
            arg[(1, 1, 1)]+=-0.36189635127*x[2]**o + (0.700755782596)*x[2]
            ref[(1, 1, 1)]+=-0.36189635127*x_ref[2]**o + (0.700755782596)*x_ref[2]
            arg[(1, 1, 2)]+=0.379376972268*x[2]**o + (0.492073199249)*x[2]
            ref[(1, 1, 2)]+=0.379376972268*x_ref[2]**o + (0.492073199249)*x_ref[2]
            arg[(1, 1, 3)]+=-0.454590500559*x[2]**o + (0.662434615969)*x[2]
            ref[(1, 1, 3)]+=-0.454590500559*x_ref[2]**o + (0.662434615969)*x_ref[2]
            arg[(2, 0, 0)]+=0.725966796511*x[2]**o + (-0.961657527879)*x[2]
            ref[(2, 0, 0)]+=0.725966796511*x_ref[2]**o + (-0.961657527879)*x_ref[2]
            arg[(2, 0, 1)]+=0.0207992205665*x[2]**o + (-0.602205923878)*x[2]
            ref[(2, 0, 1)]+=0.0207992205665*x_ref[2]**o + (-0.602205923878)*x_ref[2]
            arg[(2, 0, 2)]+=0.968222224471*x[2]**o + (0.503274280747)*x[2]
            ref[(2, 0, 2)]+=0.968222224471*x_ref[2]**o + (0.503274280747)*x_ref[2]
            arg[(2, 0, 3)]+=0.515083532008*x[2]**o + (0.315555316859)*x[2]
            ref[(2, 0, 3)]+=0.515083532008*x_ref[2]**o + (0.315555316859)*x_ref[2]
            arg[(2, 1, 0)]+=0.493373210483*x[2]**o + (0.684572042231)*x[2]
            ref[(2, 1, 0)]+=0.493373210483*x_ref[2]**o + (0.684572042231)*x_ref[2]
            arg[(2, 1, 1)]+=-0.718623275656*x[2]**o + (-0.102405947448)*x[2]
            ref[(2, 1, 1)]+=-0.718623275656*x_ref[2]**o + (-0.102405947448)*x_ref[2]
            arg[(2, 1, 2)]+=0.789504755125*x[2]**o + (-0.995155662893)*x[2]
            ref[(2, 1, 2)]+=0.789504755125*x_ref[2]**o + (-0.995155662893)*x_ref[2]
            arg[(2, 1, 3)]+=0.508756392484*x[2]**o + (-0.312067476181)*x[2]
            ref[(2, 1, 3)]+=0.508756392484*x_ref[2]**o + (-0.312067476181)*x_ref[2]
            arg[(3, 0, 0)]+=0.88345952881*x[2]**o + (0.838816645199)*x[2]
            ref[(3, 0, 0)]+=0.88345952881*x_ref[2]**o + (0.838816645199)*x_ref[2]
            arg[(3, 0, 1)]+=0.368228554886*x[2]**o + (-0.202181425837)*x[2]
            ref[(3, 0, 1)]+=0.368228554886*x_ref[2]**o + (-0.202181425837)*x_ref[2]
            arg[(3, 0, 2)]+=-0.00753541137884*x[2]**o + (-0.440286010873)*x[2]
            ref[(3, 0, 2)]+=-0.00753541137884*x_ref[2]**o + (-0.440286010873)*x_ref[2]
            arg[(3, 0, 3)]+=-0.789327335512*x[2]**o + (0.509835245604)*x[2]
            ref[(3, 0, 3)]+=-0.789327335512*x_ref[2]**o + (0.509835245604)*x_ref[2]
            arg[(3, 1, 0)]+=0.187530098147*x[2]**o + (0.271642922457)*x[2]
            ref[(3, 1, 0)]+=0.187530098147*x_ref[2]**o + (0.271642922457)*x_ref[2]
            arg[(3, 1, 1)]+=-0.051998158417*x[2]**o + (-0.979532842852)*x[2]
            ref[(3, 1, 1)]+=-0.051998158417*x_ref[2]**o + (-0.979532842852)*x_ref[2]
            arg[(3, 1, 2)]+=-0.914699566703*x[2]**o + (0.12121455002)*x[2]
            ref[(3, 1, 2)]+=-0.914699566703*x_ref[2]**o + (0.12121455002)*x_ref[2]
            arg[(3, 1, 3)]+=-0.389749220197*x[2]**o + (-0.662060592491)*x[2]
            ref[(3, 1, 3)]+=-0.389749220197*x_ref[2]**o + (-0.662060592491)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 3, 4),w)
        ref = Data(0,(3, 3, 3, 4),w_ref)
        arg[(0, 0, 0, 0)]=-0.644828183262*x[0]**o + (-0.809934803753)*x[0] + (0.786286212479)*x[1]**o + (-0.869614985694)*x[1]
        ref[(0, 0, 0, 0)]=-0.644828183262*x_ref[0]**o + (-0.809934803753)*x_ref[0] + (0.786286212479)*x_ref[1]**o + (-0.869614985694)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.592083204385*x[0]**o + (0.235375866966)*x[0] + (-0.49488952266)*x[1]**o + (0.890395539746)*x[1]
        ref[(0, 0, 0, 1)]=0.592083204385*x_ref[0]**o + (0.235375866966)*x_ref[0] + (-0.49488952266)*x_ref[1]**o + (0.890395539746)*x_ref[1]
        arg[(0, 0, 0, 2)]=-0.458029295171*x[0]**o + (-0.921244900796)*x[0] + (0.75513575239)*x[1]**o + (0.739144188853)*x[1]
        ref[(0, 0, 0, 2)]=-0.458029295171*x_ref[0]**o + (-0.921244900796)*x_ref[0] + (0.75513575239)*x_ref[1]**o + (0.739144188853)*x_ref[1]
        arg[(0, 0, 0, 3)]=-0.897499432582*x[0]**o + (0.648623961347)*x[0] + (0.184755360744)*x[1]**o + (0.975945127064)*x[1]
        ref[(0, 0, 0, 3)]=-0.897499432582*x_ref[0]**o + (0.648623961347)*x_ref[0] + (0.184755360744)*x_ref[1]**o + (0.975945127064)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.983369334968*x[0]**o + (0.970092801494)*x[0] + (0.734776284931)*x[1]**o + (-0.504962789849)*x[1]
        ref[(0, 0, 1, 0)]=-0.983369334968*x_ref[0]**o + (0.970092801494)*x_ref[0] + (0.734776284931)*x_ref[1]**o + (-0.504962789849)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.304101112239*x[0]**o + (0.434011440012)*x[0] + (0.420615855922)*x[1]**o + (-0.718855574084)*x[1]
        ref[(0, 0, 1, 1)]=0.304101112239*x_ref[0]**o + (0.434011440012)*x_ref[0] + (0.420615855922)*x_ref[1]**o + (-0.718855574084)*x_ref[1]
        arg[(0, 0, 1, 2)]=0.0109153709212*x[0]**o + (0.772282693438)*x[0] + (0.482687023903)*x[1]**o + (-0.918271837026)*x[1]
        ref[(0, 0, 1, 2)]=0.0109153709212*x_ref[0]**o + (0.772282693438)*x_ref[0] + (0.482687023903)*x_ref[1]**o + (-0.918271837026)*x_ref[1]
        arg[(0, 0, 1, 3)]=-0.233890361877*x[0]**o + (-0.527350010087)*x[0] + (0.854549568349)*x[1]**o + (0.447684664129)*x[1]
        ref[(0, 0, 1, 3)]=-0.233890361877*x_ref[0]**o + (-0.527350010087)*x_ref[0] + (0.854549568349)*x_ref[1]**o + (0.447684664129)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.319764645938*x[0]**o + (-0.871959351682)*x[0] + (-0.625754582723)*x[1]**o + (-0.862011116313)*x[1]
        ref[(0, 0, 2, 0)]=-0.319764645938*x_ref[0]**o + (-0.871959351682)*x_ref[0] + (-0.625754582723)*x_ref[1]**o + (-0.862011116313)*x_ref[1]
        arg[(0, 0, 2, 1)]=0.840089668399*x[0]**o + (0.995890124261)*x[0] + (-0.767682269242)*x[1]**o + (-0.637009895164)*x[1]
        ref[(0, 0, 2, 1)]=0.840089668399*x_ref[0]**o + (0.995890124261)*x_ref[0] + (-0.767682269242)*x_ref[1]**o + (-0.637009895164)*x_ref[1]
        arg[(0, 0, 2, 2)]=-0.828599554832*x[0]**o + (-0.377559875772)*x[0] + (0.88497608627)*x[1]**o + (-0.764498400023)*x[1]
        ref[(0, 0, 2, 2)]=-0.828599554832*x_ref[0]**o + (-0.377559875772)*x_ref[0] + (0.88497608627)*x_ref[1]**o + (-0.764498400023)*x_ref[1]
        arg[(0, 0, 2, 3)]=0.914889444281*x[0]**o + (-0.275005805216)*x[0] + (-0.835632711922)*x[1]**o + (0.237133691021)*x[1]
        ref[(0, 0, 2, 3)]=0.914889444281*x_ref[0]**o + (-0.275005805216)*x_ref[0] + (-0.835632711922)*x_ref[1]**o + (0.237133691021)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.875018722305*x[0]**o + (0.11569662944)*x[0] + (-0.976137321067)*x[1]**o + (-0.428548509751)*x[1]
        ref[(0, 1, 0, 0)]=0.875018722305*x_ref[0]**o + (0.11569662944)*x_ref[0] + (-0.976137321067)*x_ref[1]**o + (-0.428548509751)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.58789101298*x[0]**o + (0.663822386437)*x[0] + (-0.116178839071)*x[1]**o + (-0.273885108152)*x[1]
        ref[(0, 1, 0, 1)]=0.58789101298*x_ref[0]**o + (0.663822386437)*x_ref[0] + (-0.116178839071)*x_ref[1]**o + (-0.273885108152)*x_ref[1]
        arg[(0, 1, 0, 2)]=-0.928667297469*x[0]**o + (-0.956356003173)*x[0] + (0.555743133445)*x[1]**o + (0.0651129241764)*x[1]
        ref[(0, 1, 0, 2)]=-0.928667297469*x_ref[0]**o + (-0.956356003173)*x_ref[0] + (0.555743133445)*x_ref[1]**o + (0.0651129241764)*x_ref[1]
        arg[(0, 1, 0, 3)]=0.39693486426*x[0]**o + (-0.550303151431)*x[0] + (-0.571799953412)*x[1]**o + (0.0443287716089)*x[1]
        ref[(0, 1, 0, 3)]=0.39693486426*x_ref[0]**o + (-0.550303151431)*x_ref[0] + (-0.571799953412)*x_ref[1]**o + (0.0443287716089)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.899880400835*x[0]**o + (-0.678945849293)*x[0] + (-0.902569483056)*x[1]**o + (-0.170436182435)*x[1]
        ref[(0, 1, 1, 0)]=-0.899880400835*x_ref[0]**o + (-0.678945849293)*x_ref[0] + (-0.902569483056)*x_ref[1]**o + (-0.170436182435)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.501501235902*x[0]**o + (0.917785249455)*x[0] + (0.566260256204)*x[1]**o + (0.388913360073)*x[1]
        ref[(0, 1, 1, 1)]=-0.501501235902*x_ref[0]**o + (0.917785249455)*x_ref[0] + (0.566260256204)*x_ref[1]**o + (0.388913360073)*x_ref[1]
        arg[(0, 1, 1, 2)]=-0.708785591877*x[0]**o + (0.914525033071)*x[0] + (0.970825245901)*x[1]**o + (-0.203514470016)*x[1]
        ref[(0, 1, 1, 2)]=-0.708785591877*x_ref[0]**o + (0.914525033071)*x_ref[0] + (0.970825245901)*x_ref[1]**o + (-0.203514470016)*x_ref[1]
        arg[(0, 1, 1, 3)]=-0.571413299367*x[0]**o + (-0.422093271199)*x[0] + (-0.644409745619)*x[1]**o + (0.620709258238)*x[1]
        ref[(0, 1, 1, 3)]=-0.571413299367*x_ref[0]**o + (-0.422093271199)*x_ref[0] + (-0.644409745619)*x_ref[1]**o + (0.620709258238)*x_ref[1]
        arg[(0, 1, 2, 0)]=0.477472302922*x[0]**o + (0.0286982283061)*x[0] + (-0.101330894194)*x[1]**o + (0.344589188069)*x[1]
        ref[(0, 1, 2, 0)]=0.477472302922*x_ref[0]**o + (0.0286982283061)*x_ref[0] + (-0.101330894194)*x_ref[1]**o + (0.344589188069)*x_ref[1]
        arg[(0, 1, 2, 1)]=-0.180599859685*x[0]**o + (0.160160090701)*x[0] + (-0.651136945151)*x[1]**o + (-0.939788621829)*x[1]
        ref[(0, 1, 2, 1)]=-0.180599859685*x_ref[0]**o + (0.160160090701)*x_ref[0] + (-0.651136945151)*x_ref[1]**o + (-0.939788621829)*x_ref[1]
        arg[(0, 1, 2, 2)]=-0.0720817889*x[0]**o + (0.299885673922)*x[0] + (-0.433490515501)*x[1]**o + (0.4910447983)*x[1]
        ref[(0, 1, 2, 2)]=-0.0720817889*x_ref[0]**o + (0.299885673922)*x_ref[0] + (-0.433490515501)*x_ref[1]**o + (0.4910447983)*x_ref[1]
        arg[(0, 1, 2, 3)]=-0.849376127601*x[0]**o + (-0.413616241542)*x[0] + (-0.0958226839455)*x[1]**o + (0.418135839742)*x[1]
        ref[(0, 1, 2, 3)]=-0.849376127601*x_ref[0]**o + (-0.413616241542)*x_ref[0] + (-0.0958226839455)*x_ref[1]**o + (0.418135839742)*x_ref[1]
        arg[(0, 2, 0, 0)]=-0.764110158323*x[0]**o + (-0.00946615543572)*x[0] + (0.91551941726)*x[1]**o + (-0.198002812864)*x[1]
        ref[(0, 2, 0, 0)]=-0.764110158323*x_ref[0]**o + (-0.00946615543572)*x_ref[0] + (0.91551941726)*x_ref[1]**o + (-0.198002812864)*x_ref[1]
        arg[(0, 2, 0, 1)]=-0.376208425156*x[0]**o + (0.190317362564)*x[0] + (-0.402476363368)*x[1]**o + (0.355256850146)*x[1]
        ref[(0, 2, 0, 1)]=-0.376208425156*x_ref[0]**o + (0.190317362564)*x_ref[0] + (-0.402476363368)*x_ref[1]**o + (0.355256850146)*x_ref[1]
        arg[(0, 2, 0, 2)]=0.275377897089*x[0]**o + (-0.340124368332)*x[0] + (0.511777835838)*x[1]**o + (0.795147221216)*x[1]
        ref[(0, 2, 0, 2)]=0.275377897089*x_ref[0]**o + (-0.340124368332)*x_ref[0] + (0.511777835838)*x_ref[1]**o + (0.795147221216)*x_ref[1]
        arg[(0, 2, 0, 3)]=0.616476317488*x[0]**o + (0.128378005267)*x[0] + (-0.467065481862)*x[1]**o + (-0.753426818178)*x[1]
        ref[(0, 2, 0, 3)]=0.616476317488*x_ref[0]**o + (0.128378005267)*x_ref[0] + (-0.467065481862)*x_ref[1]**o + (-0.753426818178)*x_ref[1]
        arg[(0, 2, 1, 0)]=0.257412837693*x[0]**o + (-0.757424748645)*x[0] + (0.270162820587)*x[1]**o + (-0.572278023646)*x[1]
        ref[(0, 2, 1, 0)]=0.257412837693*x_ref[0]**o + (-0.757424748645)*x_ref[0] + (0.270162820587)*x_ref[1]**o + (-0.572278023646)*x_ref[1]
        arg[(0, 2, 1, 1)]=0.335336893911*x[0]**o + (0.573968288592)*x[0] + (-0.826058516788)*x[1]**o + (0.654372644109)*x[1]
        ref[(0, 2, 1, 1)]=0.335336893911*x_ref[0]**o + (0.573968288592)*x_ref[0] + (-0.826058516788)*x_ref[1]**o + (0.654372644109)*x_ref[1]
        arg[(0, 2, 1, 2)]=0.595113687635*x[0]**o + (-0.861267696085)*x[0] + (0.931616789723)*x[1]**o + (0.392146389411)*x[1]
        ref[(0, 2, 1, 2)]=0.595113687635*x_ref[0]**o + (-0.861267696085)*x_ref[0] + (0.931616789723)*x_ref[1]**o + (0.392146389411)*x_ref[1]
        arg[(0, 2, 1, 3)]=0.87801737948*x[0]**o + (0.596195107198)*x[0] + (-0.466856436506)*x[1]**o + (-0.695500850062)*x[1]
        ref[(0, 2, 1, 3)]=0.87801737948*x_ref[0]**o + (0.596195107198)*x_ref[0] + (-0.466856436506)*x_ref[1]**o + (-0.695500850062)*x_ref[1]
        arg[(0, 2, 2, 0)]=-0.243485197205*x[0]**o + (-0.89833958753)*x[0] + (-0.649053815639)*x[1]**o + (0.419584014073)*x[1]
        ref[(0, 2, 2, 0)]=-0.243485197205*x_ref[0]**o + (-0.89833958753)*x_ref[0] + (-0.649053815639)*x_ref[1]**o + (0.419584014073)*x_ref[1]
        arg[(0, 2, 2, 1)]=-0.785180145414*x[0]**o + (0.187461618442)*x[0] + (-0.763341749922)*x[1]**o + (0.973185612995)*x[1]
        ref[(0, 2, 2, 1)]=-0.785180145414*x_ref[0]**o + (0.187461618442)*x_ref[0] + (-0.763341749922)*x_ref[1]**o + (0.973185612995)*x_ref[1]
        arg[(0, 2, 2, 2)]=-0.981802087032*x[0]**o + (0.237874388529)*x[0] + (0.878373724535)*x[1]**o + (0.151918225141)*x[1]
        ref[(0, 2, 2, 2)]=-0.981802087032*x_ref[0]**o + (0.237874388529)*x_ref[0] + (0.878373724535)*x_ref[1]**o + (0.151918225141)*x_ref[1]
        arg[(0, 2, 2, 3)]=-0.0677131675292*x[0]**o + (0.995580152737)*x[0] + (-0.235955373056)*x[1]**o + (0.42262679141)*x[1]
        ref[(0, 2, 2, 3)]=-0.0677131675292*x_ref[0]**o + (0.995580152737)*x_ref[0] + (-0.235955373056)*x_ref[1]**o + (0.42262679141)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.698562917413*x[0]**o + (0.580387598765)*x[0] + (0.653980639808)*x[1]**o + (0.085940430819)*x[1]
        ref[(1, 0, 0, 0)]=-0.698562917413*x_ref[0]**o + (0.580387598765)*x_ref[0] + (0.653980639808)*x_ref[1]**o + (0.085940430819)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.894775842985*x[0]**o + (0.613011031946)*x[0] + (-0.151966183071)*x[1]**o + (-0.59895321342)*x[1]
        ref[(1, 0, 0, 1)]=-0.894775842985*x_ref[0]**o + (0.613011031946)*x_ref[0] + (-0.151966183071)*x_ref[1]**o + (-0.59895321342)*x_ref[1]
        arg[(1, 0, 0, 2)]=-0.804586113894*x[0]**o + (0.519178927413)*x[0] + (-0.639799575293)*x[1]**o + (0.285070322676)*x[1]
        ref[(1, 0, 0, 2)]=-0.804586113894*x_ref[0]**o + (0.519178927413)*x_ref[0] + (-0.639799575293)*x_ref[1]**o + (0.285070322676)*x_ref[1]
        arg[(1, 0, 0, 3)]=-0.0813093549451*x[0]**o + (-0.883252213008)*x[0] + (0.878883241967)*x[1]**o + (0.131254314935)*x[1]
        ref[(1, 0, 0, 3)]=-0.0813093549451*x_ref[0]**o + (-0.883252213008)*x_ref[0] + (0.878883241967)*x_ref[1]**o + (0.131254314935)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.0864383918989*x[0]**o + (-0.436699388099)*x[0] + (0.71545099536)*x[1]**o + (-0.0558189338224)*x[1]
        ref[(1, 0, 1, 0)]=-0.0864383918989*x_ref[0]**o + (-0.436699388099)*x_ref[0] + (0.71545099536)*x_ref[1]**o + (-0.0558189338224)*x_ref[1]
        arg[(1, 0, 1, 1)]=-0.529040952352*x[0]**o + (-0.986913693758)*x[0] + (-0.0798475126545)*x[1]**o + (0.415403322089)*x[1]
        ref[(1, 0, 1, 1)]=-0.529040952352*x_ref[0]**o + (-0.986913693758)*x_ref[0] + (-0.0798475126545)*x_ref[1]**o + (0.415403322089)*x_ref[1]
        arg[(1, 0, 1, 2)]=0.594671195813*x[0]**o + (-0.991901688729)*x[0] + (-0.873874266962)*x[1]**o + (-0.0807291026568)*x[1]
        ref[(1, 0, 1, 2)]=0.594671195813*x_ref[0]**o + (-0.991901688729)*x_ref[0] + (-0.873874266962)*x_ref[1]**o + (-0.0807291026568)*x_ref[1]
        arg[(1, 0, 1, 3)]=0.702902698095*x[0]**o + (0.294763064094)*x[0] + (0.251096834457)*x[1]**o + (-0.815541373764)*x[1]
        ref[(1, 0, 1, 3)]=0.702902698095*x_ref[0]**o + (0.294763064094)*x_ref[0] + (0.251096834457)*x_ref[1]**o + (-0.815541373764)*x_ref[1]
        arg[(1, 0, 2, 0)]=0.95426768277*x[0]**o + (-0.833175654586)*x[0] + (-0.910937358047)*x[1]**o + (-0.48000937278)*x[1]
        ref[(1, 0, 2, 0)]=0.95426768277*x_ref[0]**o + (-0.833175654586)*x_ref[0] + (-0.910937358047)*x_ref[1]**o + (-0.48000937278)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.23329882386*x[0]**o + (0.469766102611)*x[0] + (0.141727027939)*x[1]**o + (0.362187539158)*x[1]
        ref[(1, 0, 2, 1)]=0.23329882386*x_ref[0]**o + (0.469766102611)*x_ref[0] + (0.141727027939)*x_ref[1]**o + (0.362187539158)*x_ref[1]
        arg[(1, 0, 2, 2)]=-0.555141078216*x[0]**o + (-0.30139842896)*x[0] + (0.0387607094402)*x[1]**o + (-0.934590960551)*x[1]
        ref[(1, 0, 2, 2)]=-0.555141078216*x_ref[0]**o + (-0.30139842896)*x_ref[0] + (0.0387607094402)*x_ref[1]**o + (-0.934590960551)*x_ref[1]
        arg[(1, 0, 2, 3)]=-0.535367336783*x[0]**o + (-0.0467282933903)*x[0] + (0.741110911073)*x[1]**o + (0.341147467029)*x[1]
        ref[(1, 0, 2, 3)]=-0.535367336783*x_ref[0]**o + (-0.0467282933903)*x_ref[0] + (0.741110911073)*x_ref[1]**o + (0.341147467029)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.186604004189*x[0]**o + (-0.536932843925)*x[0] + (0.362898765386)*x[1]**o + (0.882887590747)*x[1]
        ref[(1, 1, 0, 0)]=-0.186604004189*x_ref[0]**o + (-0.536932843925)*x_ref[0] + (0.362898765386)*x_ref[1]**o + (0.882887590747)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.735863589614*x[0]**o + (-0.428628894932)*x[0] + (-0.690656945664)*x[1]**o + (0.035992087563)*x[1]
        ref[(1, 1, 0, 1)]=0.735863589614*x_ref[0]**o + (-0.428628894932)*x_ref[0] + (-0.690656945664)*x_ref[1]**o + (0.035992087563)*x_ref[1]
        arg[(1, 1, 0, 2)]=0.809047919924*x[0]**o + (-0.0762314296643)*x[0] + (0.420578904293)*x[1]**o + (-0.122400653316)*x[1]
        ref[(1, 1, 0, 2)]=0.809047919924*x_ref[0]**o + (-0.0762314296643)*x_ref[0] + (0.420578904293)*x_ref[1]**o + (-0.122400653316)*x_ref[1]
        arg[(1, 1, 0, 3)]=0.461941627573*x[0]**o + (0.400104056471)*x[0] + (0.720950573266)*x[1]**o + (-0.186382854999)*x[1]
        ref[(1, 1, 0, 3)]=0.461941627573*x_ref[0]**o + (0.400104056471)*x_ref[0] + (0.720950573266)*x_ref[1]**o + (-0.186382854999)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.938097486989*x[0]**o + (-0.299891544195)*x[0] + (0.552117866419)*x[1]**o + (0.446815584424)*x[1]
        ref[(1, 1, 1, 0)]=-0.938097486989*x_ref[0]**o + (-0.299891544195)*x_ref[0] + (0.552117866419)*x_ref[1]**o + (0.446815584424)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.799879854947*x[0]**o + (-0.32379388213)*x[0] + (0.530525917828)*x[1]**o + (0.402055762825)*x[1]
        ref[(1, 1, 1, 1)]=0.799879854947*x_ref[0]**o + (-0.32379388213)*x_ref[0] + (0.530525917828)*x_ref[1]**o + (0.402055762825)*x_ref[1]
        arg[(1, 1, 1, 2)]=0.818590347909*x[0]**o + (-0.657542011944)*x[0] + (-0.2720900734)*x[1]**o + (0.114101764307)*x[1]
        ref[(1, 1, 1, 2)]=0.818590347909*x_ref[0]**o + (-0.657542011944)*x_ref[0] + (-0.2720900734)*x_ref[1]**o + (0.114101764307)*x_ref[1]
        arg[(1, 1, 1, 3)]=0.576872148615*x[0]**o + (-0.459777000951)*x[0] + (0.565108845074)*x[1]**o + (-0.0917030709358)*x[1]
        ref[(1, 1, 1, 3)]=0.576872148615*x_ref[0]**o + (-0.459777000951)*x_ref[0] + (0.565108845074)*x_ref[1]**o + (-0.0917030709358)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.241888668549*x[0]**o + (-0.295035556138)*x[0] + (-0.504933927011)*x[1]**o + (0.763443159228)*x[1]
        ref[(1, 1, 2, 0)]=-0.241888668549*x_ref[0]**o + (-0.295035556138)*x_ref[0] + (-0.504933927011)*x_ref[1]**o + (0.763443159228)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.657196875365*x[0]**o + (0.993025887855)*x[0] + (-0.579593041292)*x[1]**o + (0.00939984749471)*x[1]
        ref[(1, 1, 2, 1)]=-0.657196875365*x_ref[0]**o + (0.993025887855)*x_ref[0] + (-0.579593041292)*x_ref[1]**o + (0.00939984749471)*x_ref[1]
        arg[(1, 1, 2, 2)]=-0.790019969914*x[0]**o + (0.377131220405)*x[0] + (0.0317031497237)*x[1]**o + (-0.13222304966)*x[1]
        ref[(1, 1, 2, 2)]=-0.790019969914*x_ref[0]**o + (0.377131220405)*x_ref[0] + (0.0317031497237)*x_ref[1]**o + (-0.13222304966)*x_ref[1]
        arg[(1, 1, 2, 3)]=0.835565933835*x[0]**o + (0.633166122503)*x[0] + (0.943002819404)*x[1]**o + (-0.299889145736)*x[1]
        ref[(1, 1, 2, 3)]=0.835565933835*x_ref[0]**o + (0.633166122503)*x_ref[0] + (0.943002819404)*x_ref[1]**o + (-0.299889145736)*x_ref[1]
        arg[(1, 2, 0, 0)]=0.645376482657*x[0]**o + (0.753508576098)*x[0] + (-0.0790448883388)*x[1]**o + (0.793757032952)*x[1]
        ref[(1, 2, 0, 0)]=0.645376482657*x_ref[0]**o + (0.753508576098)*x_ref[0] + (-0.0790448883388)*x_ref[1]**o + (0.793757032952)*x_ref[1]
        arg[(1, 2, 0, 1)]=0.724759422085*x[0]**o + (-0.0511447741378)*x[0] + (0.514825761353)*x[1]**o + (0.977873560511)*x[1]
        ref[(1, 2, 0, 1)]=0.724759422085*x_ref[0]**o + (-0.0511447741378)*x_ref[0] + (0.514825761353)*x_ref[1]**o + (0.977873560511)*x_ref[1]
        arg[(1, 2, 0, 2)]=0.225660165966*x[0]**o + (0.95958346279)*x[0] + (-0.104461038434)*x[1]**o + (-0.511862006015)*x[1]
        ref[(1, 2, 0, 2)]=0.225660165966*x_ref[0]**o + (0.95958346279)*x_ref[0] + (-0.104461038434)*x_ref[1]**o + (-0.511862006015)*x_ref[1]
        arg[(1, 2, 0, 3)]=0.865243751245*x[0]**o + (-0.916318272067)*x[0] + (-0.262311323456)*x[1]**o + (-0.605587462748)*x[1]
        ref[(1, 2, 0, 3)]=0.865243751245*x_ref[0]**o + (-0.916318272067)*x_ref[0] + (-0.262311323456)*x_ref[1]**o + (-0.605587462748)*x_ref[1]
        arg[(1, 2, 1, 0)]=0.352942108766*x[0]**o + (-0.0511768587638)*x[0] + (-0.77588898598)*x[1]**o + (0.318733323385)*x[1]
        ref[(1, 2, 1, 0)]=0.352942108766*x_ref[0]**o + (-0.0511768587638)*x_ref[0] + (-0.77588898598)*x_ref[1]**o + (0.318733323385)*x_ref[1]
        arg[(1, 2, 1, 1)]=-0.912032967171*x[0]**o + (0.267474345452)*x[0] + (-0.73616193201)*x[1]**o + (0.136108834265)*x[1]
        ref[(1, 2, 1, 1)]=-0.912032967171*x_ref[0]**o + (0.267474345452)*x_ref[0] + (-0.73616193201)*x_ref[1]**o + (0.136108834265)*x_ref[1]
        arg[(1, 2, 1, 2)]=0.0111793508271*x[0]**o + (-0.978581108018)*x[0] + (-0.981560784171)*x[1]**o + (-0.203733245842)*x[1]
        ref[(1, 2, 1, 2)]=0.0111793508271*x_ref[0]**o + (-0.978581108018)*x_ref[0] + (-0.981560784171)*x_ref[1]**o + (-0.203733245842)*x_ref[1]
        arg[(1, 2, 1, 3)]=0.335986881306*x[0]**o + (-0.867996317898)*x[0] + (0.0294011901281)*x[1]**o + (-0.972836786195)*x[1]
        ref[(1, 2, 1, 3)]=0.335986881306*x_ref[0]**o + (-0.867996317898)*x_ref[0] + (0.0294011901281)*x_ref[1]**o + (-0.972836786195)*x_ref[1]
        arg[(1, 2, 2, 0)]=-0.658557682196*x[0]**o + (0.057716216817)*x[0] + (-0.855635469788)*x[1]**o + (-0.555529014014)*x[1]
        ref[(1, 2, 2, 0)]=-0.658557682196*x_ref[0]**o + (0.057716216817)*x_ref[0] + (-0.855635469788)*x_ref[1]**o + (-0.555529014014)*x_ref[1]
        arg[(1, 2, 2, 1)]=0.508843423044*x[0]**o + (-0.502473048014)*x[0] + (-0.819772357809)*x[1]**o + (0.120392714661)*x[1]
        ref[(1, 2, 2, 1)]=0.508843423044*x_ref[0]**o + (-0.502473048014)*x_ref[0] + (-0.819772357809)*x_ref[1]**o + (0.120392714661)*x_ref[1]
        arg[(1, 2, 2, 2)]=-0.455484285214*x[0]**o + (-0.309412381202)*x[0] + (-0.286029982407)*x[1]**o + (0.462899810002)*x[1]
        ref[(1, 2, 2, 2)]=-0.455484285214*x_ref[0]**o + (-0.309412381202)*x_ref[0] + (-0.286029982407)*x_ref[1]**o + (0.462899810002)*x_ref[1]
        arg[(1, 2, 2, 3)]=-0.265742126754*x[0]**o + (-0.883071355904)*x[0] + (0.388946739813)*x[1]**o + (0.234979846535)*x[1]
        ref[(1, 2, 2, 3)]=-0.265742126754*x_ref[0]**o + (-0.883071355904)*x_ref[0] + (0.388946739813)*x_ref[1]**o + (0.234979846535)*x_ref[1]
        arg[(2, 0, 0, 0)]=-0.207533765792*x[0]**o + (-0.992565601662)*x[0] + (0.572664573762)*x[1]**o + (-0.484664005148)*x[1]
        ref[(2, 0, 0, 0)]=-0.207533765792*x_ref[0]**o + (-0.992565601662)*x_ref[0] + (0.572664573762)*x_ref[1]**o + (-0.484664005148)*x_ref[1]
        arg[(2, 0, 0, 1)]=-0.0219318102172*x[0]**o + (0.79249987167)*x[0] + (0.382266081125)*x[1]**o + (0.0728920902836)*x[1]
        ref[(2, 0, 0, 1)]=-0.0219318102172*x_ref[0]**o + (0.79249987167)*x_ref[0] + (0.382266081125)*x_ref[1]**o + (0.0728920902836)*x_ref[1]
        arg[(2, 0, 0, 2)]=-0.2004128604*x[0]**o + (0.72560148044)*x[0] + (-0.497568845583)*x[1]**o + (-0.32894470302)*x[1]
        ref[(2, 0, 0, 2)]=-0.2004128604*x_ref[0]**o + (0.72560148044)*x_ref[0] + (-0.497568845583)*x_ref[1]**o + (-0.32894470302)*x_ref[1]
        arg[(2, 0, 0, 3)]=0.50081138518*x[0]**o + (-0.603713264972)*x[0] + (0.121180907037)*x[1]**o + (-0.293842611708)*x[1]
        ref[(2, 0, 0, 3)]=0.50081138518*x_ref[0]**o + (-0.603713264972)*x_ref[0] + (0.121180907037)*x_ref[1]**o + (-0.293842611708)*x_ref[1]
        arg[(2, 0, 1, 0)]=0.0322451990038*x[0]**o + (0.928067164874)*x[0] + (-0.698667891487)*x[1]**o + (0.394332928759)*x[1]
        ref[(2, 0, 1, 0)]=0.0322451990038*x_ref[0]**o + (0.928067164874)*x_ref[0] + (-0.698667891487)*x_ref[1]**o + (0.394332928759)*x_ref[1]
        arg[(2, 0, 1, 1)]=0.285163460119*x[0]**o + (0.0367941530379)*x[0] + (0.806386701399)*x[1]**o + (0.318979829797)*x[1]
        ref[(2, 0, 1, 1)]=0.285163460119*x_ref[0]**o + (0.0367941530379)*x_ref[0] + (0.806386701399)*x_ref[1]**o + (0.318979829797)*x_ref[1]
        arg[(2, 0, 1, 2)]=0.743138165445*x[0]**o + (-0.781402176412)*x[0] + (0.143451414718)*x[1]**o + (0.453331514639)*x[1]
        ref[(2, 0, 1, 2)]=0.743138165445*x_ref[0]**o + (-0.781402176412)*x_ref[0] + (0.143451414718)*x_ref[1]**o + (0.453331514639)*x_ref[1]
        arg[(2, 0, 1, 3)]=0.642450006208*x[0]**o + (0.513597745247)*x[0] + (0.730898449419)*x[1]**o + (-0.995371212521)*x[1]
        ref[(2, 0, 1, 3)]=0.642450006208*x_ref[0]**o + (0.513597745247)*x_ref[0] + (0.730898449419)*x_ref[1]**o + (-0.995371212521)*x_ref[1]
        arg[(2, 0, 2, 0)]=-0.221799780045*x[0]**o + (0.263151971088)*x[0] + (0.540930043865)*x[1]**o + (0.586031287578)*x[1]
        ref[(2, 0, 2, 0)]=-0.221799780045*x_ref[0]**o + (0.263151971088)*x_ref[0] + (0.540930043865)*x_ref[1]**o + (0.586031287578)*x_ref[1]
        arg[(2, 0, 2, 1)]=0.712383214067*x[0]**o + (0.640976985339)*x[0] + (-0.155347382416)*x[1]**o + (-0.828737811162)*x[1]
        ref[(2, 0, 2, 1)]=0.712383214067*x_ref[0]**o + (0.640976985339)*x_ref[0] + (-0.155347382416)*x_ref[1]**o + (-0.828737811162)*x_ref[1]
        arg[(2, 0, 2, 2)]=0.37720284039*x[0]**o + (-0.383837386084)*x[0] + (-0.669405011721)*x[1]**o + (-0.113621045962)*x[1]
        ref[(2, 0, 2, 2)]=0.37720284039*x_ref[0]**o + (-0.383837386084)*x_ref[0] + (-0.669405011721)*x_ref[1]**o + (-0.113621045962)*x_ref[1]
        arg[(2, 0, 2, 3)]=0.917384026059*x[0]**o + (0.239495670184)*x[0] + (-0.807961614145)*x[1]**o + (-0.656450773902)*x[1]
        ref[(2, 0, 2, 3)]=0.917384026059*x_ref[0]**o + (0.239495670184)*x_ref[0] + (-0.807961614145)*x_ref[1]**o + (-0.656450773902)*x_ref[1]
        arg[(2, 1, 0, 0)]=0.989115691116*x[0]**o + (0.987333357437)*x[0] + (0.538110228931)*x[1]**o + (0.081179150734)*x[1]
        ref[(2, 1, 0, 0)]=0.989115691116*x_ref[0]**o + (0.987333357437)*x_ref[0] + (0.538110228931)*x_ref[1]**o + (0.081179150734)*x_ref[1]
        arg[(2, 1, 0, 1)]=-0.213598105552*x[0]**o + (0.00637847740337)*x[0] + (-0.860985690724)*x[1]**o + (-0.456157640163)*x[1]
        ref[(2, 1, 0, 1)]=-0.213598105552*x_ref[0]**o + (0.00637847740337)*x_ref[0] + (-0.860985690724)*x_ref[1]**o + (-0.456157640163)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.814481486326*x[0]**o + (-0.116277951097)*x[0] + (-0.511483689988)*x[1]**o + (-0.186598025566)*x[1]
        ref[(2, 1, 0, 2)]=-0.814481486326*x_ref[0]**o + (-0.116277951097)*x_ref[0] + (-0.511483689988)*x_ref[1]**o + (-0.186598025566)*x_ref[1]
        arg[(2, 1, 0, 3)]=0.184238037529*x[0]**o + (0.170297905484)*x[0] + (0.494716647205)*x[1]**o + (-0.462052873465)*x[1]
        ref[(2, 1, 0, 3)]=0.184238037529*x_ref[0]**o + (0.170297905484)*x_ref[0] + (0.494716647205)*x_ref[1]**o + (-0.462052873465)*x_ref[1]
        arg[(2, 1, 1, 0)]=0.556979101032*x[0]**o + (0.789836086959)*x[0] + (0.391727714481)*x[1]**o + (-0.949133009503)*x[1]
        ref[(2, 1, 1, 0)]=0.556979101032*x_ref[0]**o + (0.789836086959)*x_ref[0] + (0.391727714481)*x_ref[1]**o + (-0.949133009503)*x_ref[1]
        arg[(2, 1, 1, 1)]=0.498611208044*x[0]**o + (0.648545280784)*x[0] + (-0.565305109306)*x[1]**o + (-0.644565465524)*x[1]
        ref[(2, 1, 1, 1)]=0.498611208044*x_ref[0]**o + (0.648545280784)*x_ref[0] + (-0.565305109306)*x_ref[1]**o + (-0.644565465524)*x_ref[1]
        arg[(2, 1, 1, 2)]=-0.754944504481*x[0]**o + (-0.179471887121)*x[0] + (-0.488680517814)*x[1]**o + (-0.546097851958)*x[1]
        ref[(2, 1, 1, 2)]=-0.754944504481*x_ref[0]**o + (-0.179471887121)*x_ref[0] + (-0.488680517814)*x_ref[1]**o + (-0.546097851958)*x_ref[1]
        arg[(2, 1, 1, 3)]=-0.910495565931*x[0]**o + (-0.965812389502)*x[0] + (-0.0114766000892)*x[1]**o + (0.73865163607)*x[1]
        ref[(2, 1, 1, 3)]=-0.910495565931*x_ref[0]**o + (-0.965812389502)*x_ref[0] + (-0.0114766000892)*x_ref[1]**o + (0.73865163607)*x_ref[1]
        arg[(2, 1, 2, 0)]=-0.58977278162*x[0]**o + (0.54576787099)*x[0] + (-0.613328531785)*x[1]**o + (0.462145466049)*x[1]
        ref[(2, 1, 2, 0)]=-0.58977278162*x_ref[0]**o + (0.54576787099)*x_ref[0] + (-0.613328531785)*x_ref[1]**o + (0.462145466049)*x_ref[1]
        arg[(2, 1, 2, 1)]=0.12546175864*x[0]**o + (-0.800746687713)*x[0] + (-0.295804424798)*x[1]**o + (-0.0940228194073)*x[1]
        ref[(2, 1, 2, 1)]=0.12546175864*x_ref[0]**o + (-0.800746687713)*x_ref[0] + (-0.295804424798)*x_ref[1]**o + (-0.0940228194073)*x_ref[1]
        arg[(2, 1, 2, 2)]=0.722168099977*x[0]**o + (0.922719407621)*x[0] + (-0.798452464821)*x[1]**o + (-0.801138088625)*x[1]
        ref[(2, 1, 2, 2)]=0.722168099977*x_ref[0]**o + (0.922719407621)*x_ref[0] + (-0.798452464821)*x_ref[1]**o + (-0.801138088625)*x_ref[1]
        arg[(2, 1, 2, 3)]=-0.558200971915*x[0]**o + (0.971339068763)*x[0] + (-0.0716232404512)*x[1]**o + (0.104032536715)*x[1]
        ref[(2, 1, 2, 3)]=-0.558200971915*x_ref[0]**o + (0.971339068763)*x_ref[0] + (-0.0716232404512)*x_ref[1]**o + (0.104032536715)*x_ref[1]
        arg[(2, 2, 0, 0)]=0.485854013514*x[0]**o + (-0.438721114661)*x[0] + (-0.972037116173)*x[1]**o + (-0.609666821114)*x[1]
        ref[(2, 2, 0, 0)]=0.485854013514*x_ref[0]**o + (-0.438721114661)*x_ref[0] + (-0.972037116173)*x_ref[1]**o + (-0.609666821114)*x_ref[1]
        arg[(2, 2, 0, 1)]=0.564334534684*x[0]**o + (0.354185308657)*x[0] + (-0.738353614529)*x[1]**o + (0.893584757767)*x[1]
        ref[(2, 2, 0, 1)]=0.564334534684*x_ref[0]**o + (0.354185308657)*x_ref[0] + (-0.738353614529)*x_ref[1]**o + (0.893584757767)*x_ref[1]
        arg[(2, 2, 0, 2)]=0.602180823903*x[0]**o + (-0.101277317427)*x[0] + (0.461212079106)*x[1]**o + (0.238155549968)*x[1]
        ref[(2, 2, 0, 2)]=0.602180823903*x_ref[0]**o + (-0.101277317427)*x_ref[0] + (0.461212079106)*x_ref[1]**o + (0.238155549968)*x_ref[1]
        arg[(2, 2, 0, 3)]=0.526366324516*x[0]**o + (0.917670343206)*x[0] + (-0.505608573255)*x[1]**o + (0.0492645380449)*x[1]
        ref[(2, 2, 0, 3)]=0.526366324516*x_ref[0]**o + (0.917670343206)*x_ref[0] + (-0.505608573255)*x_ref[1]**o + (0.0492645380449)*x_ref[1]
        arg[(2, 2, 1, 0)]=0.393759816923*x[0]**o + (-0.320621175468)*x[0] + (-0.0623841210887)*x[1]**o + (0.920542609883)*x[1]
        ref[(2, 2, 1, 0)]=0.393759816923*x_ref[0]**o + (-0.320621175468)*x_ref[0] + (-0.0623841210887)*x_ref[1]**o + (0.920542609883)*x_ref[1]
        arg[(2, 2, 1, 1)]=-0.50785238765*x[0]**o + (-0.742332112055)*x[0] + (-0.737869296702)*x[1]**o + (0.300951530487)*x[1]
        ref[(2, 2, 1, 1)]=-0.50785238765*x_ref[0]**o + (-0.742332112055)*x_ref[0] + (-0.737869296702)*x_ref[1]**o + (0.300951530487)*x_ref[1]
        arg[(2, 2, 1, 2)]=0.205956253901*x[0]**o + (-0.0766070336236)*x[0] + (0.432154062418)*x[1]**o + (0.0466047852772)*x[1]
        ref[(2, 2, 1, 2)]=0.205956253901*x_ref[0]**o + (-0.0766070336236)*x_ref[0] + (0.432154062418)*x_ref[1]**o + (0.0466047852772)*x_ref[1]
        arg[(2, 2, 1, 3)]=0.632932568882*x[0]**o + (0.427968425165)*x[0] + (0.0336759108651)*x[1]**o + (-0.512914719815)*x[1]
        ref[(2, 2, 1, 3)]=0.632932568882*x_ref[0]**o + (0.427968425165)*x_ref[0] + (0.0336759108651)*x_ref[1]**o + (-0.512914719815)*x_ref[1]
        arg[(2, 2, 2, 0)]=0.611570985212*x[0]**o + (0.317735418047)*x[0] + (-0.796471362877)*x[1]**o + (0.825765295112)*x[1]
        ref[(2, 2, 2, 0)]=0.611570985212*x_ref[0]**o + (0.317735418047)*x_ref[0] + (-0.796471362877)*x_ref[1]**o + (0.825765295112)*x_ref[1]
        arg[(2, 2, 2, 1)]=-0.420734039677*x[0]**o + (0.795680753144)*x[0] + (-0.697543282115)*x[1]**o + (0.3486965505)*x[1]
        ref[(2, 2, 2, 1)]=-0.420734039677*x_ref[0]**o + (0.795680753144)*x_ref[0] + (-0.697543282115)*x_ref[1]**o + (0.3486965505)*x_ref[1]
        arg[(2, 2, 2, 2)]=-0.0119187908739*x[0]**o + (-0.126391070276)*x[0] + (-0.0139069227407)*x[1]**o + (0.625918580085)*x[1]
        ref[(2, 2, 2, 2)]=-0.0119187908739*x_ref[0]**o + (-0.126391070276)*x_ref[0] + (-0.0139069227407)*x_ref[1]**o + (0.625918580085)*x_ref[1]
        arg[(2, 2, 2, 3)]=0.880709663276*x[0]**o + (-0.71833138778)*x[0] + (-0.639623980587)*x[1]**o + (-0.690725301341)*x[1]
        ref[(2, 2, 2, 3)]=0.880709663276*x_ref[0]**o + (-0.71833138778)*x_ref[0] + (-0.639623980587)*x_ref[1]**o + (-0.690725301341)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.310785987477*x[2]**o + (0.704892670569)*x[2]
            ref[(0, 0, 0, 0)]+=-0.310785987477*x_ref[2]**o + (0.704892670569)*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.4119263626*x[2]**o + (0.33407259711)*x[2]
            ref[(0, 0, 0, 1)]+=0.4119263626*x_ref[2]**o + (0.33407259711)*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.500195934692*x[2]**o + (0.361135957176)*x[2]
            ref[(0, 0, 0, 2)]+=0.500195934692*x_ref[2]**o + (0.361135957176)*x_ref[2]
            arg[(0, 0, 0, 3)]+=0.937709975472*x[2]**o + (0.771671536014)*x[2]
            ref[(0, 0, 0, 3)]+=0.937709975472*x_ref[2]**o + (0.771671536014)*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.928049491903*x[2]**o + (-0.289113011636)*x[2]
            ref[(0, 0, 1, 0)]+=0.928049491903*x_ref[2]**o + (-0.289113011636)*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.543107156651*x[2]**o + (-0.890718118538)*x[2]
            ref[(0, 0, 1, 1)]+=-0.543107156651*x_ref[2]**o + (-0.890718118538)*x_ref[2]
            arg[(0, 0, 1, 2)]+=-0.675557481881*x[2]**o + (-0.463631128687)*x[2]
            ref[(0, 0, 1, 2)]+=-0.675557481881*x_ref[2]**o + (-0.463631128687)*x_ref[2]
            arg[(0, 0, 1, 3)]+=0.0416674941712*x[2]**o + (0.888668219372)*x[2]
            ref[(0, 0, 1, 3)]+=0.0416674941712*x_ref[2]**o + (0.888668219372)*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.308472989234*x[2]**o + (0.349661480648)*x[2]
            ref[(0, 0, 2, 0)]+=-0.308472989234*x_ref[2]**o + (0.349661480648)*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.247216917472*x[2]**o + (0.757769596069)*x[2]
            ref[(0, 0, 2, 1)]+=0.247216917472*x_ref[2]**o + (0.757769596069)*x_ref[2]
            arg[(0, 0, 2, 2)]+=-0.324458465967*x[2]**o + (0.517457904025)*x[2]
            ref[(0, 0, 2, 2)]+=-0.324458465967*x_ref[2]**o + (0.517457904025)*x_ref[2]
            arg[(0, 0, 2, 3)]+=0.909466692904*x[2]**o + (-0.85448966025)*x[2]
            ref[(0, 0, 2, 3)]+=0.909466692904*x_ref[2]**o + (-0.85448966025)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.213863627737*x[2]**o + (-0.688298136175)*x[2]
            ref[(0, 1, 0, 0)]+=-0.213863627737*x_ref[2]**o + (-0.688298136175)*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.547995922057*x[2]**o + (0.534532530599)*x[2]
            ref[(0, 1, 0, 1)]+=0.547995922057*x_ref[2]**o + (0.534532530599)*x_ref[2]
            arg[(0, 1, 0, 2)]+=-0.491300307791*x[2]**o + (-0.590811624932)*x[2]
            ref[(0, 1, 0, 2)]+=-0.491300307791*x_ref[2]**o + (-0.590811624932)*x_ref[2]
            arg[(0, 1, 0, 3)]+=-0.751822528218*x[2]**o + (0.533698590344)*x[2]
            ref[(0, 1, 0, 3)]+=-0.751822528218*x_ref[2]**o + (0.533698590344)*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.249748119861*x[2]**o + (-0.0247214753669)*x[2]
            ref[(0, 1, 1, 0)]+=0.249748119861*x_ref[2]**o + (-0.0247214753669)*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.0857894515099*x[2]**o + (-0.411156626318)*x[2]
            ref[(0, 1, 1, 1)]+=-0.0857894515099*x_ref[2]**o + (-0.411156626318)*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.788002441704*x[2]**o + (-0.424352858879)*x[2]
            ref[(0, 1, 1, 2)]+=0.788002441704*x_ref[2]**o + (-0.424352858879)*x_ref[2]
            arg[(0, 1, 1, 3)]+=-0.279531702463*x[2]**o + (-0.271030302861)*x[2]
            ref[(0, 1, 1, 3)]+=-0.279531702463*x_ref[2]**o + (-0.271030302861)*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.944649714749*x[2]**o + (-0.646087784182)*x[2]
            ref[(0, 1, 2, 0)]+=-0.944649714749*x_ref[2]**o + (-0.646087784182)*x_ref[2]
            arg[(0, 1, 2, 1)]+=0.552899039826*x[2]**o + (-0.172657886031)*x[2]
            ref[(0, 1, 2, 1)]+=0.552899039826*x_ref[2]**o + (-0.172657886031)*x_ref[2]
            arg[(0, 1, 2, 2)]+=0.569740327061*x[2]**o + (0.602934120326)*x[2]
            ref[(0, 1, 2, 2)]+=0.569740327061*x_ref[2]**o + (0.602934120326)*x_ref[2]
            arg[(0, 1, 2, 3)]+=0.845188782807*x[2]**o + (0.566686841875)*x[2]
            ref[(0, 1, 2, 3)]+=0.845188782807*x_ref[2]**o + (0.566686841875)*x_ref[2]
            arg[(0, 2, 0, 0)]+=-0.551638462442*x[2]**o + (-0.443868114735)*x[2]
            ref[(0, 2, 0, 0)]+=-0.551638462442*x_ref[2]**o + (-0.443868114735)*x_ref[2]
            arg[(0, 2, 0, 1)]+=0.122868362578*x[2]**o + (-0.375853283654)*x[2]
            ref[(0, 2, 0, 1)]+=0.122868362578*x_ref[2]**o + (-0.375853283654)*x_ref[2]
            arg[(0, 2, 0, 2)]+=0.352291195153*x[2]**o + (0.212920666533)*x[2]
            ref[(0, 2, 0, 2)]+=0.352291195153*x_ref[2]**o + (0.212920666533)*x_ref[2]
            arg[(0, 2, 0, 3)]+=0.243881610816*x[2]**o + (-0.690255698808)*x[2]
            ref[(0, 2, 0, 3)]+=0.243881610816*x_ref[2]**o + (-0.690255698808)*x_ref[2]
            arg[(0, 2, 1, 0)]+=0.849253576578*x[2]**o + (-0.943970099207)*x[2]
            ref[(0, 2, 1, 0)]+=0.849253576578*x_ref[2]**o + (-0.943970099207)*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.605846888735*x[2]**o + (-0.393960120153)*x[2]
            ref[(0, 2, 1, 1)]+=-0.605846888735*x_ref[2]**o + (-0.393960120153)*x_ref[2]
            arg[(0, 2, 1, 2)]+=0.873851426664*x[2]**o + (0.91462131761)*x[2]
            ref[(0, 2, 1, 2)]+=0.873851426664*x_ref[2]**o + (0.91462131761)*x_ref[2]
            arg[(0, 2, 1, 3)]+=-0.404494946762*x[2]**o + (0.558650800125)*x[2]
            ref[(0, 2, 1, 3)]+=-0.404494946762*x_ref[2]**o + (0.558650800125)*x_ref[2]
            arg[(0, 2, 2, 0)]+=0.787318006064*x[2]**o + (-0.295587249972)*x[2]
            ref[(0, 2, 2, 0)]+=0.787318006064*x_ref[2]**o + (-0.295587249972)*x_ref[2]
            arg[(0, 2, 2, 1)]+=0.266687186381*x[2]**o + (-0.943867124832)*x[2]
            ref[(0, 2, 2, 1)]+=0.266687186381*x_ref[2]**o + (-0.943867124832)*x_ref[2]
            arg[(0, 2, 2, 2)]+=0.829941416466*x[2]**o + (-0.00471456177519)*x[2]
            ref[(0, 2, 2, 2)]+=0.829941416466*x_ref[2]**o + (-0.00471456177519)*x_ref[2]
            arg[(0, 2, 2, 3)]+=0.310761985808*x[2]**o + (-0.313121829536)*x[2]
            ref[(0, 2, 2, 3)]+=0.310761985808*x_ref[2]**o + (-0.313121829536)*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.0726544830324*x[2]**o + (-0.814322288621)*x[2]
            ref[(1, 0, 0, 0)]+=0.0726544830324*x_ref[2]**o + (-0.814322288621)*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.166375001126*x[2]**o + (0.956880794605)*x[2]
            ref[(1, 0, 0, 1)]+=-0.166375001126*x_ref[2]**o + (0.956880794605)*x_ref[2]
            arg[(1, 0, 0, 2)]+=0.51093631938*x[2]**o + (-0.0985945782887)*x[2]
            ref[(1, 0, 0, 2)]+=0.51093631938*x_ref[2]**o + (-0.0985945782887)*x_ref[2]
            arg[(1, 0, 0, 3)]+=0.572063199581*x[2]**o + (0.589468864571)*x[2]
            ref[(1, 0, 0, 3)]+=0.572063199581*x_ref[2]**o + (0.589468864571)*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.898952000133*x[2]**o + (0.287187510595)*x[2]
            ref[(1, 0, 1, 0)]+=0.898952000133*x_ref[2]**o + (0.287187510595)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.795492461525*x[2]**o + (0.621857684779)*x[2]
            ref[(1, 0, 1, 1)]+=-0.795492461525*x_ref[2]**o + (0.621857684779)*x_ref[2]
            arg[(1, 0, 1, 2)]+=-0.705472078433*x[2]**o + (0.706897513967)*x[2]
            ref[(1, 0, 1, 2)]+=-0.705472078433*x_ref[2]**o + (0.706897513967)*x_ref[2]
            arg[(1, 0, 1, 3)]+=0.231254450613*x[2]**o + (-0.656031882862)*x[2]
            ref[(1, 0, 1, 3)]+=0.231254450613*x_ref[2]**o + (-0.656031882862)*x_ref[2]
            arg[(1, 0, 2, 0)]+=0.116688425131*x[2]**o + (-0.995154643749)*x[2]
            ref[(1, 0, 2, 0)]+=0.116688425131*x_ref[2]**o + (-0.995154643749)*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.781301742261*x[2]**o + (0.210182300243)*x[2]
            ref[(1, 0, 2, 1)]+=0.781301742261*x_ref[2]**o + (0.210182300243)*x_ref[2]
            arg[(1, 0, 2, 2)]+=0.395696200894*x[2]**o + (-0.222414182907)*x[2]
            ref[(1, 0, 2, 2)]+=0.395696200894*x_ref[2]**o + (-0.222414182907)*x_ref[2]
            arg[(1, 0, 2, 3)]+=-0.84978014337*x[2]**o + (-0.560170146074)*x[2]
            ref[(1, 0, 2, 3)]+=-0.84978014337*x_ref[2]**o + (-0.560170146074)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.888429046697*x[2]**o + (0.811583468522)*x[2]
            ref[(1, 1, 0, 0)]+=0.888429046697*x_ref[2]**o + (0.811583468522)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.936846146989*x[2]**o + (-0.710022885509)*x[2]
            ref[(1, 1, 0, 1)]+=0.936846146989*x_ref[2]**o + (-0.710022885509)*x_ref[2]
            arg[(1, 1, 0, 2)]+=0.595406066935*x[2]**o + (-0.622408449535)*x[2]
            ref[(1, 1, 0, 2)]+=0.595406066935*x_ref[2]**o + (-0.622408449535)*x_ref[2]
            arg[(1, 1, 0, 3)]+=-0.866437238518*x[2]**o + (0.192183109503)*x[2]
            ref[(1, 1, 0, 3)]+=-0.866437238518*x_ref[2]**o + (0.192183109503)*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.820532090233*x[2]**o + (-0.603839092413)*x[2]
            ref[(1, 1, 1, 0)]+=-0.820532090233*x_ref[2]**o + (-0.603839092413)*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.799657418478*x[2]**o + (-0.21782370802)*x[2]
            ref[(1, 1, 1, 1)]+=0.799657418478*x_ref[2]**o + (-0.21782370802)*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.983969221283*x[2]**o + (-0.120607943452)*x[2]
            ref[(1, 1, 1, 2)]+=-0.983969221283*x_ref[2]**o + (-0.120607943452)*x_ref[2]
            arg[(1, 1, 1, 3)]+=0.109235322873*x[2]**o + (0.261621910046)*x[2]
            ref[(1, 1, 1, 3)]+=0.109235322873*x_ref[2]**o + (0.261621910046)*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.442077521748*x[2]**o + (0.795068494168)*x[2]
            ref[(1, 1, 2, 0)]+=-0.442077521748*x_ref[2]**o + (0.795068494168)*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.483958148584*x[2]**o + (0.169361680344)*x[2]
            ref[(1, 1, 2, 1)]+=0.483958148584*x_ref[2]**o + (0.169361680344)*x_ref[2]
            arg[(1, 1, 2, 2)]+=0.00310410130732*x[2]**o + (0.119006641003)*x[2]
            ref[(1, 1, 2, 2)]+=0.00310410130732*x_ref[2]**o + (0.119006641003)*x_ref[2]
            arg[(1, 1, 2, 3)]+=0.805033914078*x[2]**o + (-0.648655201627)*x[2]
            ref[(1, 1, 2, 3)]+=0.805033914078*x_ref[2]**o + (-0.648655201627)*x_ref[2]
            arg[(1, 2, 0, 0)]+=-0.462987187067*x[2]**o + (-0.758788314368)*x[2]
            ref[(1, 2, 0, 0)]+=-0.462987187067*x_ref[2]**o + (-0.758788314368)*x_ref[2]
            arg[(1, 2, 0, 1)]+=-0.271356028462*x[2]**o + (-0.702575003727)*x[2]
            ref[(1, 2, 0, 1)]+=-0.271356028462*x_ref[2]**o + (-0.702575003727)*x_ref[2]
            arg[(1, 2, 0, 2)]+=0.581833291706*x[2]**o + (0.929266769839)*x[2]
            ref[(1, 2, 0, 2)]+=0.581833291706*x_ref[2]**o + (0.929266769839)*x_ref[2]
            arg[(1, 2, 0, 3)]+=0.234632409687*x[2]**o + (-0.483615134109)*x[2]
            ref[(1, 2, 0, 3)]+=0.234632409687*x_ref[2]**o + (-0.483615134109)*x_ref[2]
            arg[(1, 2, 1, 0)]+=-0.42407418814*x[2]**o + (-0.794462288109)*x[2]
            ref[(1, 2, 1, 0)]+=-0.42407418814*x_ref[2]**o + (-0.794462288109)*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.534998770022*x[2]**o + (0.776607274969)*x[2]
            ref[(1, 2, 1, 1)]+=0.534998770022*x_ref[2]**o + (0.776607274969)*x_ref[2]
            arg[(1, 2, 1, 2)]+=-0.345076999321*x[2]**o + (0.424654677777)*x[2]
            ref[(1, 2, 1, 2)]+=-0.345076999321*x_ref[2]**o + (0.424654677777)*x_ref[2]
            arg[(1, 2, 1, 3)]+=0.870301025395*x[2]**o + (0.384955505682)*x[2]
            ref[(1, 2, 1, 3)]+=0.870301025395*x_ref[2]**o + (0.384955505682)*x_ref[2]
            arg[(1, 2, 2, 0)]+=-0.668091399535*x[2]**o + (0.862447774738)*x[2]
            ref[(1, 2, 2, 0)]+=-0.668091399535*x_ref[2]**o + (0.862447774738)*x_ref[2]
            arg[(1, 2, 2, 1)]+=-0.803313205473*x[2]**o + (0.973222573663)*x[2]
            ref[(1, 2, 2, 1)]+=-0.803313205473*x_ref[2]**o + (0.973222573663)*x_ref[2]
            arg[(1, 2, 2, 2)]+=0.985933548084*x[2]**o + (0.746039382015)*x[2]
            ref[(1, 2, 2, 2)]+=0.985933548084*x_ref[2]**o + (0.746039382015)*x_ref[2]
            arg[(1, 2, 2, 3)]+=-0.314056819384*x[2]**o + (0.0722764729851)*x[2]
            ref[(1, 2, 2, 3)]+=-0.314056819384*x_ref[2]**o + (0.0722764729851)*x_ref[2]
            arg[(2, 0, 0, 0)]+=-0.855857691719*x[2]**o + (0.704221472137)*x[2]
            ref[(2, 0, 0, 0)]+=-0.855857691719*x_ref[2]**o + (0.704221472137)*x_ref[2]
            arg[(2, 0, 0, 1)]+=-0.105109416018*x[2]**o + (-0.522401052744)*x[2]
            ref[(2, 0, 0, 1)]+=-0.105109416018*x_ref[2]**o + (-0.522401052744)*x_ref[2]
            arg[(2, 0, 0, 2)]+=-0.660119851165*x[2]**o + (0.765981136139)*x[2]
            ref[(2, 0, 0, 2)]+=-0.660119851165*x_ref[2]**o + (0.765981136139)*x_ref[2]
            arg[(2, 0, 0, 3)]+=-0.496756435152*x[2]**o + (0.839896314626)*x[2]
            ref[(2, 0, 0, 3)]+=-0.496756435152*x_ref[2]**o + (0.839896314626)*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.914637824872*x[2]**o + (0.496843317139)*x[2]
            ref[(2, 0, 1, 0)]+=-0.914637824872*x_ref[2]**o + (0.496843317139)*x_ref[2]
            arg[(2, 0, 1, 1)]+=-0.207898175645*x[2]**o + (0.641894326311)*x[2]
            ref[(2, 0, 1, 1)]+=-0.207898175645*x_ref[2]**o + (0.641894326311)*x_ref[2]
            arg[(2, 0, 1, 2)]+=-0.77100183836*x[2]**o + (-0.76147914808)*x[2]
            ref[(2, 0, 1, 2)]+=-0.77100183836*x_ref[2]**o + (-0.76147914808)*x_ref[2]
            arg[(2, 0, 1, 3)]+=0.251914660994*x[2]**o + (0.549435506938)*x[2]
            ref[(2, 0, 1, 3)]+=0.251914660994*x_ref[2]**o + (0.549435506938)*x_ref[2]
            arg[(2, 0, 2, 0)]+=0.883236365428*x[2]**o + (0.627664299639)*x[2]
            ref[(2, 0, 2, 0)]+=0.883236365428*x_ref[2]**o + (0.627664299639)*x_ref[2]
            arg[(2, 0, 2, 1)]+=-0.515110698708*x[2]**o + (-0.434207026017)*x[2]
            ref[(2, 0, 2, 1)]+=-0.515110698708*x_ref[2]**o + (-0.434207026017)*x_ref[2]
            arg[(2, 0, 2, 2)]+=0.9196053296*x[2]**o + (-0.224284661287)*x[2]
            ref[(2, 0, 2, 2)]+=0.9196053296*x_ref[2]**o + (-0.224284661287)*x_ref[2]
            arg[(2, 0, 2, 3)]+=-0.532519683141*x[2]**o + (-0.964184910315)*x[2]
            ref[(2, 0, 2, 3)]+=-0.532519683141*x_ref[2]**o + (-0.964184910315)*x_ref[2]
            arg[(2, 1, 0, 0)]+=0.62956744454*x[2]**o + (-0.504823085391)*x[2]
            ref[(2, 1, 0, 0)]+=0.62956744454*x_ref[2]**o + (-0.504823085391)*x_ref[2]
            arg[(2, 1, 0, 1)]+=0.787045244958*x[2]**o + (0.25281720437)*x[2]
            ref[(2, 1, 0, 1)]+=0.787045244958*x_ref[2]**o + (0.25281720437)*x_ref[2]
            arg[(2, 1, 0, 2)]+=-0.13997402261*x[2]**o + (0.998587644047)*x[2]
            ref[(2, 1, 0, 2)]+=-0.13997402261*x_ref[2]**o + (0.998587644047)*x_ref[2]
            arg[(2, 1, 0, 3)]+=-0.509608968872*x[2]**o + (-0.0403194788018)*x[2]
            ref[(2, 1, 0, 3)]+=-0.509608968872*x_ref[2]**o + (-0.0403194788018)*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.24002663231*x[2]**o + (0.483875969384)*x[2]
            ref[(2, 1, 1, 0)]+=0.24002663231*x_ref[2]**o + (0.483875969384)*x_ref[2]
            arg[(2, 1, 1, 1)]+=0.137785174268*x[2]**o + (0.921985622948)*x[2]
            ref[(2, 1, 1, 1)]+=0.137785174268*x_ref[2]**o + (0.921985622948)*x_ref[2]
            arg[(2, 1, 1, 2)]+=0.232257015242*x[2]**o + (0.129093470647)*x[2]
            ref[(2, 1, 1, 2)]+=0.232257015242*x_ref[2]**o + (0.129093470647)*x_ref[2]
            arg[(2, 1, 1, 3)]+=-0.607581910237*x[2]**o + (-0.278742532774)*x[2]
            ref[(2, 1, 1, 3)]+=-0.607581910237*x_ref[2]**o + (-0.278742532774)*x_ref[2]
            arg[(2, 1, 2, 0)]+=-0.230050104511*x[2]**o + (0.387342282514)*x[2]
            ref[(2, 1, 2, 0)]+=-0.230050104511*x_ref[2]**o + (0.387342282514)*x_ref[2]
            arg[(2, 1, 2, 1)]+=-0.72382711532*x[2]**o + (0.0363364940259)*x[2]
            ref[(2, 1, 2, 1)]+=-0.72382711532*x_ref[2]**o + (0.0363364940259)*x_ref[2]
            arg[(2, 1, 2, 2)]+=0.570936030606*x[2]**o + (0.919525508584)*x[2]
            ref[(2, 1, 2, 2)]+=0.570936030606*x_ref[2]**o + (0.919525508584)*x_ref[2]
            arg[(2, 1, 2, 3)]+=0.374137089585*x[2]**o + (-0.723532616961)*x[2]
            ref[(2, 1, 2, 3)]+=0.374137089585*x_ref[2]**o + (-0.723532616961)*x_ref[2]
            arg[(2, 2, 0, 0)]+=-0.79975117544*x[2]**o + (0.582568839618)*x[2]
            ref[(2, 2, 0, 0)]+=-0.79975117544*x_ref[2]**o + (0.582568839618)*x_ref[2]
            arg[(2, 2, 0, 1)]+=-0.304827891246*x[2]**o + (0.576673598246)*x[2]
            ref[(2, 2, 0, 1)]+=-0.304827891246*x_ref[2]**o + (0.576673598246)*x_ref[2]
            arg[(2, 2, 0, 2)]+=-0.21592534069*x[2]**o + (-0.467014994773)*x[2]
            ref[(2, 2, 0, 2)]+=-0.21592534069*x_ref[2]**o + (-0.467014994773)*x_ref[2]
            arg[(2, 2, 0, 3)]+=-0.728242737139*x[2]**o + (-0.0974081811286)*x[2]
            ref[(2, 2, 0, 3)]+=-0.728242737139*x_ref[2]**o + (-0.0974081811286)*x_ref[2]
            arg[(2, 2, 1, 0)]+=-0.459147260229*x[2]**o + (0.084209375024)*x[2]
            ref[(2, 2, 1, 0)]+=-0.459147260229*x_ref[2]**o + (0.084209375024)*x_ref[2]
            arg[(2, 2, 1, 1)]+=-0.654353489993*x[2]**o + (0.659323449893)*x[2]
            ref[(2, 2, 1, 1)]+=-0.654353489993*x_ref[2]**o + (0.659323449893)*x_ref[2]
            arg[(2, 2, 1, 2)]+=0.611404586473*x[2]**o + (0.998513983022)*x[2]
            ref[(2, 2, 1, 2)]+=0.611404586473*x_ref[2]**o + (0.998513983022)*x_ref[2]
            arg[(2, 2, 1, 3)]+=-0.850349729734*x[2]**o + (0.926981482461)*x[2]
            ref[(2, 2, 1, 3)]+=-0.850349729734*x_ref[2]**o + (0.926981482461)*x_ref[2]
            arg[(2, 2, 2, 0)]+=-0.227741457027*x[2]**o + (0.128103475869)*x[2]
            ref[(2, 2, 2, 0)]+=-0.227741457027*x_ref[2]**o + (0.128103475869)*x_ref[2]
            arg[(2, 2, 2, 1)]+=0.184407157798*x[2]**o + (0.22541312568)*x[2]
            ref[(2, 2, 2, 1)]+=0.184407157798*x_ref[2]**o + (0.22541312568)*x_ref[2]
            arg[(2, 2, 2, 2)]+=0.986043768631*x[2]**o + (0.669240860542)*x[2]
            ref[(2, 2, 2, 2)]+=0.986043768631*x_ref[2]**o + (0.669240860542)*x_ref[2]
            arg[(2, 2, 2, 3)]+=-0.468849218572*x[2]**o + (-0.235813412562)*x[2]
            ref[(2, 2, 2, 3)]+=-0.468849218572*x_ref[2]**o + (-0.235813412562)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.769562098974*x[0]**o + (0.364981328798)*x[0] + (-0.610749468324)*x[1]**o + (-0.110602859165)*x[1]
        ref=0.769562098974*x_ref[0]**o + (0.364981328798)*x_ref[0] + (-0.610749468324)*x_ref[1]**o + (-0.110602859165)*x_ref[1]
        if dim==3:
            arg+=(0.461332802983)*x[2]**o + (-0.442455198016)*x[2]
            ref+=(0.461332802983)*x_ref[2]**o + (-0.442455198016)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=0.845013741754*x[0]**o + (0.866168979244)*x[0] + (-0.99111015176)*x[1]**o + (-0.906764472213)*x[1]
        ref[(0,)]=0.845013741754*x_ref[0]**o + (0.866168979244)*x_ref[0] + (-0.99111015176)*x_ref[1]**o + (-0.906764472213)*x_ref[1]
        arg[(1,)]=0.180659281768*x[0]**o + (-0.411016964338)*x[0] + (0.213215349001)*x[1]**o + (0.134177326456)*x[1]
        ref[(1,)]=0.180659281768*x_ref[0]**o + (-0.411016964338)*x_ref[0] + (0.213215349001)*x_ref[1]**o + (0.134177326456)*x_ref[1]
        arg[(2,)]=-0.45668461601*x[0]**o + (0.0864550247139)*x[0] + (-0.683635327233)*x[1]**o + (-0.282539875907)*x[1]
        ref[(2,)]=-0.45668461601*x_ref[0]**o + (0.0864550247139)*x_ref[0] + (-0.683635327233)*x_ref[1]**o + (-0.282539875907)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.65989003689*x[2]**o + (0.870781263367)*x[2]
            ref[(0,)]+=-0.65989003689*x_ref[2]**o + (0.870781263367)*x_ref[2]
            arg[(1,)]+=0.896961259779*x[2]**o + (-0.249561215191)*x[2]
            ref[(1,)]+=0.896961259779*x_ref[2]**o + (-0.249561215191)*x_ref[2]
            arg[(2,)]+=0.618669704548*x[2]**o + (-0.745080492187)*x[2]
            ref[(2,)]+=0.618669704548*x_ref[2]**o + (-0.745080492187)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref = Data(0,(3, 4),w_ref)
        arg[(0, 0)]=0.534159159123*x[0]**o + (-0.388646808127)*x[0] + (0.0737716532041)*x[1]**o + (-0.320359770691)*x[1]
        ref[(0, 0)]=0.534159159123*x_ref[0]**o + (-0.388646808127)*x_ref[0] + (0.0737716532041)*x_ref[1]**o + (-0.320359770691)*x_ref[1]
        arg[(0, 1)]=-0.863648875201*x[0]**o + (-0.0417329412647)*x[0] + (0.297868473664)*x[1]**o + (-0.472277115891)*x[1]
        ref[(0, 1)]=-0.863648875201*x_ref[0]**o + (-0.0417329412647)*x_ref[0] + (0.297868473664)*x_ref[1]**o + (-0.472277115891)*x_ref[1]
        arg[(0, 2)]=0.7395482381*x[0]**o + (0.496531740599)*x[0] + (0.629767746935)*x[1]**o + (-0.438306074706)*x[1]
        ref[(0, 2)]=0.7395482381*x_ref[0]**o + (0.496531740599)*x_ref[0] + (0.629767746935)*x_ref[1]**o + (-0.438306074706)*x_ref[1]
        arg[(0, 3)]=-0.276088336882*x[0]**o + (0.405928404479)*x[0] + (0.0638524782275)*x[1]**o + (0.585881444925)*x[1]
        ref[(0, 3)]=-0.276088336882*x_ref[0]**o + (0.405928404479)*x_ref[0] + (0.0638524782275)*x_ref[1]**o + (0.585881444925)*x_ref[1]
        arg[(1, 0)]=0.0675596838611*x[0]**o + (0.975026499266)*x[0] + (0.0160583312091)*x[1]**o + (-0.603848911194)*x[1]
        ref[(1, 0)]=0.0675596838611*x_ref[0]**o + (0.975026499266)*x_ref[0] + (0.0160583312091)*x_ref[1]**o + (-0.603848911194)*x_ref[1]
        arg[(1, 1)]=-0.951162463406*x[0]**o + (0.541281045713)*x[0] + (-0.505589351792)*x[1]**o + (-0.471498874659)*x[1]
        ref[(1, 1)]=-0.951162463406*x_ref[0]**o + (0.541281045713)*x_ref[0] + (-0.505589351792)*x_ref[1]**o + (-0.471498874659)*x_ref[1]
        arg[(1, 2)]=-0.45782403142*x[0]**o + (-0.254398701721)*x[0] + (-0.572695392769)*x[1]**o + (0.261497245079)*x[1]
        ref[(1, 2)]=-0.45782403142*x_ref[0]**o + (-0.254398701721)*x_ref[0] + (-0.572695392769)*x_ref[1]**o + (0.261497245079)*x_ref[1]
        arg[(1, 3)]=-0.731283617409*x[0]**o + (0.912648800827)*x[0] + (-0.455994795216)*x[1]**o + (0.422140834855)*x[1]
        ref[(1, 3)]=-0.731283617409*x_ref[0]**o + (0.912648800827)*x_ref[0] + (-0.455994795216)*x_ref[1]**o + (0.422140834855)*x_ref[1]
        arg[(2, 0)]=-0.673264453155*x[0]**o + (-0.471425163421)*x[0] + (0.286714117047)*x[1]**o + (-0.94948434795)*x[1]
        ref[(2, 0)]=-0.673264453155*x_ref[0]**o + (-0.471425163421)*x_ref[0] + (0.286714117047)*x_ref[1]**o + (-0.94948434795)*x_ref[1]
        arg[(2, 1)]=-0.909756478149*x[0]**o + (-0.230067972544)*x[0] + (-0.210635960558)*x[1]**o + (0.242421872744)*x[1]
        ref[(2, 1)]=-0.909756478149*x_ref[0]**o + (-0.230067972544)*x_ref[0] + (-0.210635960558)*x_ref[1]**o + (0.242421872744)*x_ref[1]
        arg[(2, 2)]=-0.889668997609*x[0]**o + (-0.700131238797)*x[0] + (0.21861715789)*x[1]**o + (0.809261230331)*x[1]
        ref[(2, 2)]=-0.889668997609*x_ref[0]**o + (-0.700131238797)*x_ref[0] + (0.21861715789)*x_ref[1]**o + (0.809261230331)*x_ref[1]
        arg[(2, 3)]=0.422019446555*x[0]**o + (0.545082067135)*x[0] + (0.931175367284)*x[1]**o + (-0.976058458179)*x[1]
        ref[(2, 3)]=0.422019446555*x_ref[0]**o + (0.545082067135)*x_ref[0] + (0.931175367284)*x_ref[1]**o + (-0.976058458179)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.309611216625*x[2]**o + (0.414901984765)*x[2]
            ref[(0, 0)]+=0.309611216625*x_ref[2]**o + (0.414901984765)*x_ref[2]
            arg[(0, 1)]+=-0.723438866843*x[2]**o + (0.102634557808)*x[2]
            ref[(0, 1)]+=-0.723438866843*x_ref[2]**o + (0.102634557808)*x_ref[2]
            arg[(0, 2)]+=0.857542090631*x[2]**o + (-0.509385995333)*x[2]
            ref[(0, 2)]+=0.857542090631*x_ref[2]**o + (-0.509385995333)*x_ref[2]
            arg[(0, 3)]+=-0.0875166885454*x[2]**o + (0.18774983851)*x[2]
            ref[(0, 3)]+=-0.0875166885454*x_ref[2]**o + (0.18774983851)*x_ref[2]
            arg[(1, 0)]+=0.662608938888*x[2]**o + (0.942912208616)*x[2]
            ref[(1, 0)]+=0.662608938888*x_ref[2]**o + (0.942912208616)*x_ref[2]
            arg[(1, 1)]+=0.714791374916*x[2]**o + (0.267613163427)*x[2]
            ref[(1, 1)]+=0.714791374916*x_ref[2]**o + (0.267613163427)*x_ref[2]
            arg[(1, 2)]+=0.353942053918*x[2]**o + (0.887827754458)*x[2]
            ref[(1, 2)]+=0.353942053918*x_ref[2]**o + (0.887827754458)*x_ref[2]
            arg[(1, 3)]+=0.0684552647164*x[2]**o + (0.715197818798)*x[2]
            ref[(1, 3)]+=0.0684552647164*x_ref[2]**o + (0.715197818798)*x_ref[2]
            arg[(2, 0)]+=0.374660442318*x[2]**o + (-0.704091653182)*x[2]
            ref[(2, 0)]+=0.374660442318*x_ref[2]**o + (-0.704091653182)*x_ref[2]
            arg[(2, 1)]+=-0.825600541395*x[2]**o + (0.933832719652)*x[2]
            ref[(2, 1)]+=-0.825600541395*x_ref[2]**o + (0.933832719652)*x_ref[2]
            arg[(2, 2)]+=0.725802707953*x[2]**o + (0.537473031472)*x[2]
            ref[(2, 2)]+=0.725802707953*x_ref[2]**o + (0.537473031472)*x_ref[2]
            arg[(2, 3)]+=0.46795426937*x[2]**o + (0.460509966417)*x[2]
            ref[(2, 3)]+=0.46795426937*x_ref[2]**o + (0.460509966417)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 2),w)
        ref = Data(0,(2, 2, 2),w_ref)
        arg[(0, 0, 0)]=0.492986024243*x[0]**o + (-0.886426165453)*x[0] + (-0.503113325384)*x[1]**o + (0.270872108418)*x[1]
        ref[(0, 0, 0)]=0.492986024243*x_ref[0]**o + (-0.886426165453)*x_ref[0] + (-0.503113325384)*x_ref[1]**o + (0.270872108418)*x_ref[1]
        arg[(0, 0, 1)]=-0.532258982706*x[0]**o + (-0.646197132398)*x[0] + (0.888087252896)*x[1]**o + (0.50719194228)*x[1]
        ref[(0, 0, 1)]=-0.532258982706*x_ref[0]**o + (-0.646197132398)*x_ref[0] + (0.888087252896)*x_ref[1]**o + (0.50719194228)*x_ref[1]
        arg[(0, 1, 0)]=0.832897057382*x[0]**o + (0.763673183509)*x[0] + (-0.218832912152)*x[1]**o + (0.0160230504226)*x[1]
        ref[(0, 1, 0)]=0.832897057382*x_ref[0]**o + (0.763673183509)*x_ref[0] + (-0.218832912152)*x_ref[1]**o + (0.0160230504226)*x_ref[1]
        arg[(0, 1, 1)]=-0.255117699376*x[0]**o + (-0.906354476751)*x[0] + (0.713639919069)*x[1]**o + (0.62453251821)*x[1]
        ref[(0, 1, 1)]=-0.255117699376*x_ref[0]**o + (-0.906354476751)*x_ref[0] + (0.713639919069)*x_ref[1]**o + (0.62453251821)*x_ref[1]
        arg[(1, 0, 0)]=-0.0541779507971*x[0]**o + (-0.0249391385259)*x[0] + (-0.982080203758)*x[1]**o + (0.776391492892)*x[1]
        ref[(1, 0, 0)]=-0.0541779507971*x_ref[0]**o + (-0.0249391385259)*x_ref[0] + (-0.982080203758)*x_ref[1]**o + (0.776391492892)*x_ref[1]
        arg[(1, 0, 1)]=0.945557543839*x[0]**o + (-0.835727197518)*x[0] + (0.0809056937032)*x[1]**o + (-0.426667503502)*x[1]
        ref[(1, 0, 1)]=0.945557543839*x_ref[0]**o + (-0.835727197518)*x_ref[0] + (0.0809056937032)*x_ref[1]**o + (-0.426667503502)*x_ref[1]
        arg[(1, 1, 0)]=-0.170550882501*x[0]**o + (0.228307106771)*x[0] + (0.666107594139)*x[1]**o + (-0.0645322957681)*x[1]
        ref[(1, 1, 0)]=-0.170550882501*x_ref[0]**o + (0.228307106771)*x_ref[0] + (0.666107594139)*x_ref[1]**o + (-0.0645322957681)*x_ref[1]
        arg[(1, 1, 1)]=-0.414684512187*x[0]**o + (0.396510732189)*x[0] + (0.45708663894)*x[1]**o + (0.471489410157)*x[1]
        ref[(1, 1, 1)]=-0.414684512187*x_ref[0]**o + (0.396510732189)*x_ref[0] + (0.45708663894)*x_ref[1]**o + (0.471489410157)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.939858743907*x[2]**o + (-0.332113748974)*x[2]
            ref[(0, 0, 0)]+=0.939858743907*x_ref[2]**o + (-0.332113748974)*x_ref[2]
            arg[(0, 0, 1)]+=0.0505409408867*x[2]**o + (-0.000850451808826)*x[2]
            ref[(0, 0, 1)]+=0.0505409408867*x_ref[2]**o + (-0.000850451808826)*x_ref[2]
            arg[(0, 1, 0)]+=-0.706564193349*x[2]**o + (0.0648138214977)*x[2]
            ref[(0, 1, 0)]+=-0.706564193349*x_ref[2]**o + (0.0648138214977)*x_ref[2]
            arg[(0, 1, 1)]+=0.061358550105*x[2]**o + (0.605199042053)*x[2]
            ref[(0, 1, 1)]+=0.061358550105*x_ref[2]**o + (0.605199042053)*x_ref[2]
            arg[(1, 0, 0)]+=0.0745354307639*x[2]**o + (-0.658988156593)*x[2]
            ref[(1, 0, 0)]+=0.0745354307639*x_ref[2]**o + (-0.658988156593)*x_ref[2]
            arg[(1, 0, 1)]+=0.156757118914*x[2]**o + (-0.163952005547)*x[2]
            ref[(1, 0, 1)]+=0.156757118914*x_ref[2]**o + (-0.163952005547)*x_ref[2]
            arg[(1, 1, 0)]+=0.927545777112*x[2]**o + (0.7660427728)*x[2]
            ref[(1, 1, 0)]+=0.927545777112*x_ref[2]**o + (0.7660427728)*x_ref[2]
            arg[(1, 1, 1)]+=-0.436687070229*x[2]**o + (-0.895721996648)*x[2]
            ref[(1, 1, 1)]+=-0.436687070229*x_ref[2]**o + (-0.895721996648)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 4, 4),w)
        ref = Data(0,(3, 4, 4, 4),w_ref)
        arg[(0, 0, 0, 0)]=0.193359637119*x[0]**o + (-0.871362531035)*x[0] + (0.305038430677)*x[1]**o + (-0.509810966167)*x[1]
        ref[(0, 0, 0, 0)]=0.193359637119*x_ref[0]**o + (-0.871362531035)*x_ref[0] + (0.305038430677)*x_ref[1]**o + (-0.509810966167)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.335465344157*x[0]**o + (-0.616038092636)*x[0] + (0.788227073613)*x[1]**o + (-0.618970261245)*x[1]
        ref[(0, 0, 0, 1)]=0.335465344157*x_ref[0]**o + (-0.616038092636)*x_ref[0] + (0.788227073613)*x_ref[1]**o + (-0.618970261245)*x_ref[1]
        arg[(0, 0, 0, 2)]=0.8369653115*x[0]**o + (-0.394648942315)*x[0] + (-0.381499003191)*x[1]**o + (0.0680254750596)*x[1]
        ref[(0, 0, 0, 2)]=0.8369653115*x_ref[0]**o + (-0.394648942315)*x_ref[0] + (-0.381499003191)*x_ref[1]**o + (0.0680254750596)*x_ref[1]
        arg[(0, 0, 0, 3)]=-0.869534243224*x[0]**o + (0.291341021371)*x[0] + (-0.680916188133)*x[1]**o + (0.65065429643)*x[1]
        ref[(0, 0, 0, 3)]=-0.869534243224*x_ref[0]**o + (0.291341021371)*x_ref[0] + (-0.680916188133)*x_ref[1]**o + (0.65065429643)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.272626555747*x[0]**o + (-0.0579226222222)*x[0] + (0.597861195214)*x[1]**o + (0.882775661483)*x[1]
        ref[(0, 0, 1, 0)]=0.272626555747*x_ref[0]**o + (-0.0579226222222)*x_ref[0] + (0.597861195214)*x_ref[1]**o + (0.882775661483)*x_ref[1]
        arg[(0, 0, 1, 1)]=-0.401042751015*x[0]**o + (0.32704957563)*x[0] + (-0.756563197278)*x[1]**o + (0.661992745159)*x[1]
        ref[(0, 0, 1, 1)]=-0.401042751015*x_ref[0]**o + (0.32704957563)*x_ref[0] + (-0.756563197278)*x_ref[1]**o + (0.661992745159)*x_ref[1]
        arg[(0, 0, 1, 2)]=0.209728814849*x[0]**o + (0.6790647998)*x[0] + (-0.174116530768)*x[1]**o + (-0.813590048304)*x[1]
        ref[(0, 0, 1, 2)]=0.209728814849*x_ref[0]**o + (0.6790647998)*x_ref[0] + (-0.174116530768)*x_ref[1]**o + (-0.813590048304)*x_ref[1]
        arg[(0, 0, 1, 3)]=0.257282887775*x[0]**o + (0.646773652621)*x[0] + (-0.127294538784)*x[1]**o + (-0.349768859672)*x[1]
        ref[(0, 0, 1, 3)]=0.257282887775*x_ref[0]**o + (0.646773652621)*x_ref[0] + (-0.127294538784)*x_ref[1]**o + (-0.349768859672)*x_ref[1]
        arg[(0, 0, 2, 0)]=0.463271938192*x[0]**o + (-0.747433252404)*x[0] + (-0.663638081733)*x[1]**o + (-0.0944517281325)*x[1]
        ref[(0, 0, 2, 0)]=0.463271938192*x_ref[0]**o + (-0.747433252404)*x_ref[0] + (-0.663638081733)*x_ref[1]**o + (-0.0944517281325)*x_ref[1]
        arg[(0, 0, 2, 1)]=0.68231773036*x[0]**o + (0.59790632376)*x[0] + (0.454195571425)*x[1]**o + (-0.536826815836)*x[1]
        ref[(0, 0, 2, 1)]=0.68231773036*x_ref[0]**o + (0.59790632376)*x_ref[0] + (0.454195571425)*x_ref[1]**o + (-0.536826815836)*x_ref[1]
        arg[(0, 0, 2, 2)]=0.423131761869*x[0]**o + (-0.0101927633922)*x[0] + (-0.694580026787)*x[1]**o + (0.641573674146)*x[1]
        ref[(0, 0, 2, 2)]=0.423131761869*x_ref[0]**o + (-0.0101927633922)*x_ref[0] + (-0.694580026787)*x_ref[1]**o + (0.641573674146)*x_ref[1]
        arg[(0, 0, 2, 3)]=-0.857540404479*x[0]**o + (-0.181422157225)*x[0] + (0.937408783756)*x[1]**o + (-0.0219406439657)*x[1]
        ref[(0, 0, 2, 3)]=-0.857540404479*x_ref[0]**o + (-0.181422157225)*x_ref[0] + (0.937408783756)*x_ref[1]**o + (-0.0219406439657)*x_ref[1]
        arg[(0, 0, 3, 0)]=0.0695055830637*x[0]**o + (0.558962257115)*x[0] + (0.223047098905)*x[1]**o + (-0.943401467387)*x[1]
        ref[(0, 0, 3, 0)]=0.0695055830637*x_ref[0]**o + (0.558962257115)*x_ref[0] + (0.223047098905)*x_ref[1]**o + (-0.943401467387)*x_ref[1]
        arg[(0, 0, 3, 1)]=0.317251182376*x[0]**o + (-0.0241025484044)*x[0] + (-0.649623044516)*x[1]**o + (0.651425799377)*x[1]
        ref[(0, 0, 3, 1)]=0.317251182376*x_ref[0]**o + (-0.0241025484044)*x_ref[0] + (-0.649623044516)*x_ref[1]**o + (0.651425799377)*x_ref[1]
        arg[(0, 0, 3, 2)]=0.457351847609*x[0]**o + (-0.68498854802)*x[0] + (-0.921804539702)*x[1]**o + (-0.573435152835)*x[1]
        ref[(0, 0, 3, 2)]=0.457351847609*x_ref[0]**o + (-0.68498854802)*x_ref[0] + (-0.921804539702)*x_ref[1]**o + (-0.573435152835)*x_ref[1]
        arg[(0, 0, 3, 3)]=-0.147863047747*x[0]**o + (0.0901765550713)*x[0] + (0.725256512802)*x[1]**o + (0.470860782314)*x[1]
        ref[(0, 0, 3, 3)]=-0.147863047747*x_ref[0]**o + (0.0901765550713)*x_ref[0] + (0.725256512802)*x_ref[1]**o + (0.470860782314)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.611739248766*x[0]**o + (-0.263589739378)*x[0] + (0.106894457274)*x[1]**o + (0.56285881947)*x[1]
        ref[(0, 1, 0, 0)]=-0.611739248766*x_ref[0]**o + (-0.263589739378)*x_ref[0] + (0.106894457274)*x_ref[1]**o + (0.56285881947)*x_ref[1]
        arg[(0, 1, 0, 1)]=-0.214125077052*x[0]**o + (-0.779730977342)*x[0] + (0.625817726994)*x[1]**o + (0.566918890168)*x[1]
        ref[(0, 1, 0, 1)]=-0.214125077052*x_ref[0]**o + (-0.779730977342)*x_ref[0] + (0.625817726994)*x_ref[1]**o + (0.566918890168)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.528798563863*x[0]**o + (0.134745900425)*x[0] + (-0.471571822254)*x[1]**o + (-0.686100330814)*x[1]
        ref[(0, 1, 0, 2)]=0.528798563863*x_ref[0]**o + (0.134745900425)*x_ref[0] + (-0.471571822254)*x_ref[1]**o + (-0.686100330814)*x_ref[1]
        arg[(0, 1, 0, 3)]=0.210560773842*x[0]**o + (-0.435841680554)*x[0] + (-0.199845464945)*x[1]**o + (0.169032868799)*x[1]
        ref[(0, 1, 0, 3)]=0.210560773842*x_ref[0]**o + (-0.435841680554)*x_ref[0] + (-0.199845464945)*x_ref[1]**o + (0.169032868799)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.89195035233*x[0]**o + (0.38682799077)*x[0] + (-0.948413510914)*x[1]**o + (0.953685337424)*x[1]
        ref[(0, 1, 1, 0)]=0.89195035233*x_ref[0]**o + (0.38682799077)*x_ref[0] + (-0.948413510914)*x_ref[1]**o + (0.953685337424)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.309372474601*x[0]**o + (0.34966964059)*x[0] + (0.476909383551)*x[1]**o + (-0.940984646307)*x[1]
        ref[(0, 1, 1, 1)]=-0.309372474601*x_ref[0]**o + (0.34966964059)*x_ref[0] + (0.476909383551)*x_ref[1]**o + (-0.940984646307)*x_ref[1]
        arg[(0, 1, 1, 2)]=0.404843783635*x[0]**o + (-0.0232776313288)*x[0] + (0.965625558005)*x[1]**o + (0.00239754443467)*x[1]
        ref[(0, 1, 1, 2)]=0.404843783635*x_ref[0]**o + (-0.0232776313288)*x_ref[0] + (0.965625558005)*x_ref[1]**o + (0.00239754443467)*x_ref[1]
        arg[(0, 1, 1, 3)]=-0.889621321724*x[0]**o + (-0.702485945851)*x[0] + (0.867110538827)*x[1]**o + (0.775656886603)*x[1]
        ref[(0, 1, 1, 3)]=-0.889621321724*x_ref[0]**o + (-0.702485945851)*x_ref[0] + (0.867110538827)*x_ref[1]**o + (0.775656886603)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.828295777882*x[0]**o + (-0.741032675028)*x[0] + (-0.167030973554)*x[1]**o + (0.131381548774)*x[1]
        ref[(0, 1, 2, 0)]=-0.828295777882*x_ref[0]**o + (-0.741032675028)*x_ref[0] + (-0.167030973554)*x_ref[1]**o + (0.131381548774)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.309489705022*x[0]**o + (-0.503434749653)*x[0] + (-0.964404612097)*x[1]**o + (-0.92756025704)*x[1]
        ref[(0, 1, 2, 1)]=0.309489705022*x_ref[0]**o + (-0.503434749653)*x_ref[0] + (-0.964404612097)*x_ref[1]**o + (-0.92756025704)*x_ref[1]
        arg[(0, 1, 2, 2)]=-0.633991106044*x[0]**o + (0.922845966369)*x[0] + (-0.251126962436)*x[1]**o + (0.592143653211)*x[1]
        ref[(0, 1, 2, 2)]=-0.633991106044*x_ref[0]**o + (0.922845966369)*x_ref[0] + (-0.251126962436)*x_ref[1]**o + (0.592143653211)*x_ref[1]
        arg[(0, 1, 2, 3)]=-0.634398602291*x[0]**o + (-0.301184488216)*x[0] + (-0.746141746429)*x[1]**o + (0.135847504554)*x[1]
        ref[(0, 1, 2, 3)]=-0.634398602291*x_ref[0]**o + (-0.301184488216)*x_ref[0] + (-0.746141746429)*x_ref[1]**o + (0.135847504554)*x_ref[1]
        arg[(0, 1, 3, 0)]=0.759376395654*x[0]**o + (0.349150623094)*x[0] + (-0.930824179768)*x[1]**o + (-0.0449130808973)*x[1]
        ref[(0, 1, 3, 0)]=0.759376395654*x_ref[0]**o + (0.349150623094)*x_ref[0] + (-0.930824179768)*x_ref[1]**o + (-0.0449130808973)*x_ref[1]
        arg[(0, 1, 3, 1)]=0.708988430341*x[0]**o + (-0.643047045505)*x[0] + (-0.0953608392689)*x[1]**o + (0.293870114308)*x[1]
        ref[(0, 1, 3, 1)]=0.708988430341*x_ref[0]**o + (-0.643047045505)*x_ref[0] + (-0.0953608392689)*x_ref[1]**o + (0.293870114308)*x_ref[1]
        arg[(0, 1, 3, 2)]=0.0599436692677*x[0]**o + (-0.972246689721)*x[0] + (0.774734518102)*x[1]**o + (0.928021786785)*x[1]
        ref[(0, 1, 3, 2)]=0.0599436692677*x_ref[0]**o + (-0.972246689721)*x_ref[0] + (0.774734518102)*x_ref[1]**o + (0.928021786785)*x_ref[1]
        arg[(0, 1, 3, 3)]=-0.37733199962*x[0]**o + (-0.513399820948)*x[0] + (-0.806721537594)*x[1]**o + (0.377058558629)*x[1]
        ref[(0, 1, 3, 3)]=-0.37733199962*x_ref[0]**o + (-0.513399820948)*x_ref[0] + (-0.806721537594)*x_ref[1]**o + (0.377058558629)*x_ref[1]
        arg[(0, 2, 0, 0)]=-0.304260885197*x[0]**o + (0.553083731941)*x[0] + (0.886136851801)*x[1]**o + (-0.983857696996)*x[1]
        ref[(0, 2, 0, 0)]=-0.304260885197*x_ref[0]**o + (0.553083731941)*x_ref[0] + (0.886136851801)*x_ref[1]**o + (-0.983857696996)*x_ref[1]
        arg[(0, 2, 0, 1)]=0.871348844319*x[0]**o + (0.55396878732)*x[0] + (-0.491334161187)*x[1]**o + (0.35358566867)*x[1]
        ref[(0, 2, 0, 1)]=0.871348844319*x_ref[0]**o + (0.55396878732)*x_ref[0] + (-0.491334161187)*x_ref[1]**o + (0.35358566867)*x_ref[1]
        arg[(0, 2, 0, 2)]=-0.938158424383*x[0]**o + (0.97552407138)*x[0] + (-0.42687718507)*x[1]**o + (-0.0408541042554)*x[1]
        ref[(0, 2, 0, 2)]=-0.938158424383*x_ref[0]**o + (0.97552407138)*x_ref[0] + (-0.42687718507)*x_ref[1]**o + (-0.0408541042554)*x_ref[1]
        arg[(0, 2, 0, 3)]=0.193248307625*x[0]**o + (0.405958383252)*x[0] + (-0.456376818862)*x[1]**o + (-0.962936534896)*x[1]
        ref[(0, 2, 0, 3)]=0.193248307625*x_ref[0]**o + (0.405958383252)*x_ref[0] + (-0.456376818862)*x_ref[1]**o + (-0.962936534896)*x_ref[1]
        arg[(0, 2, 1, 0)]=-0.453718498983*x[0]**o + (-0.766966948403)*x[0] + (0.0961579770574)*x[1]**o + (0.233942857349)*x[1]
        ref[(0, 2, 1, 0)]=-0.453718498983*x_ref[0]**o + (-0.766966948403)*x_ref[0] + (0.0961579770574)*x_ref[1]**o + (0.233942857349)*x_ref[1]
        arg[(0, 2, 1, 1)]=0.88604524869*x[0]**o + (0.278512430177)*x[0] + (0.291371783818)*x[1]**o + (-0.850320407863)*x[1]
        ref[(0, 2, 1, 1)]=0.88604524869*x_ref[0]**o + (0.278512430177)*x_ref[0] + (0.291371783818)*x_ref[1]**o + (-0.850320407863)*x_ref[1]
        arg[(0, 2, 1, 2)]=0.102457607946*x[0]**o + (0.0469816540624)*x[0] + (0.736826332335)*x[1]**o + (0.133586202705)*x[1]
        ref[(0, 2, 1, 2)]=0.102457607946*x_ref[0]**o + (0.0469816540624)*x_ref[0] + (0.736826332335)*x_ref[1]**o + (0.133586202705)*x_ref[1]
        arg[(0, 2, 1, 3)]=0.15722929085*x[0]**o + (0.113336777614)*x[0] + (0.900100705723)*x[1]**o + (-0.434786035379)*x[1]
        ref[(0, 2, 1, 3)]=0.15722929085*x_ref[0]**o + (0.113336777614)*x_ref[0] + (0.900100705723)*x_ref[1]**o + (-0.434786035379)*x_ref[1]
        arg[(0, 2, 2, 0)]=-0.413961882847*x[0]**o + (0.652945993812)*x[0] + (-0.500752119313)*x[1]**o + (-0.339092171205)*x[1]
        ref[(0, 2, 2, 0)]=-0.413961882847*x_ref[0]**o + (0.652945993812)*x_ref[0] + (-0.500752119313)*x_ref[1]**o + (-0.339092171205)*x_ref[1]
        arg[(0, 2, 2, 1)]=-0.315334847608*x[0]**o + (-0.360160186439)*x[0] + (-0.751377846363)*x[1]**o + (-0.775207465611)*x[1]
        ref[(0, 2, 2, 1)]=-0.315334847608*x_ref[0]**o + (-0.360160186439)*x_ref[0] + (-0.751377846363)*x_ref[1]**o + (-0.775207465611)*x_ref[1]
        arg[(0, 2, 2, 2)]=-0.861074656549*x[0]**o + (-0.984258826644)*x[0] + (-0.603803241012)*x[1]**o + (-0.349710709022)*x[1]
        ref[(0, 2, 2, 2)]=-0.861074656549*x_ref[0]**o + (-0.984258826644)*x_ref[0] + (-0.603803241012)*x_ref[1]**o + (-0.349710709022)*x_ref[1]
        arg[(0, 2, 2, 3)]=0.361038637405*x[0]**o + (-0.150245112073)*x[0] + (-0.799437420817)*x[1]**o + (0.0377332679244)*x[1]
        ref[(0, 2, 2, 3)]=0.361038637405*x_ref[0]**o + (-0.150245112073)*x_ref[0] + (-0.799437420817)*x_ref[1]**o + (0.0377332679244)*x_ref[1]
        arg[(0, 2, 3, 0)]=-0.97005482565*x[0]**o + (0.419764874765)*x[0] + (0.667307221705)*x[1]**o + (-0.882793329698)*x[1]
        ref[(0, 2, 3, 0)]=-0.97005482565*x_ref[0]**o + (0.419764874765)*x_ref[0] + (0.667307221705)*x_ref[1]**o + (-0.882793329698)*x_ref[1]
        arg[(0, 2, 3, 1)]=-0.511985327048*x[0]**o + (-0.866941999355)*x[0] + (-0.324574752051)*x[1]**o + (-0.100584921957)*x[1]
        ref[(0, 2, 3, 1)]=-0.511985327048*x_ref[0]**o + (-0.866941999355)*x_ref[0] + (-0.324574752051)*x_ref[1]**o + (-0.100584921957)*x_ref[1]
        arg[(0, 2, 3, 2)]=0.660907126796*x[0]**o + (-0.0802085979659)*x[0] + (-0.508882757692)*x[1]**o + (0.854798309475)*x[1]
        ref[(0, 2, 3, 2)]=0.660907126796*x_ref[0]**o + (-0.0802085979659)*x_ref[0] + (-0.508882757692)*x_ref[1]**o + (0.854798309475)*x_ref[1]
        arg[(0, 2, 3, 3)]=0.503173558112*x[0]**o + (-0.723876960201)*x[0] + (-0.859361884852)*x[1]**o + (0.588282697575)*x[1]
        ref[(0, 2, 3, 3)]=0.503173558112*x_ref[0]**o + (-0.723876960201)*x_ref[0] + (-0.859361884852)*x_ref[1]**o + (0.588282697575)*x_ref[1]
        arg[(0, 3, 0, 0)]=0.531627639269*x[0]**o + (0.215449102869)*x[0] + (0.1798719653)*x[1]**o + (-0.0803012357526)*x[1]
        ref[(0, 3, 0, 0)]=0.531627639269*x_ref[0]**o + (0.215449102869)*x_ref[0] + (0.1798719653)*x_ref[1]**o + (-0.0803012357526)*x_ref[1]
        arg[(0, 3, 0, 1)]=-0.860742991643*x[0]**o + (0.814240043339)*x[0] + (-0.158263755729)*x[1]**o + (0.00265724414159)*x[1]
        ref[(0, 3, 0, 1)]=-0.860742991643*x_ref[0]**o + (0.814240043339)*x_ref[0] + (-0.158263755729)*x_ref[1]**o + (0.00265724414159)*x_ref[1]
        arg[(0, 3, 0, 2)]=0.30091770621*x[0]**o + (0.844732211774)*x[0] + (0.881268502032)*x[1]**o + (-0.775411001628)*x[1]
        ref[(0, 3, 0, 2)]=0.30091770621*x_ref[0]**o + (0.844732211774)*x_ref[0] + (0.881268502032)*x_ref[1]**o + (-0.775411001628)*x_ref[1]
        arg[(0, 3, 0, 3)]=-0.541426426384*x[0]**o + (-0.0500037037204)*x[0] + (0.346639877592)*x[1]**o + (0.750688045042)*x[1]
        ref[(0, 3, 0, 3)]=-0.541426426384*x_ref[0]**o + (-0.0500037037204)*x_ref[0] + (0.346639877592)*x_ref[1]**o + (0.750688045042)*x_ref[1]
        arg[(0, 3, 1, 0)]=0.719539751009*x[0]**o + (0.9505990354)*x[0] + (-0.0482176984048)*x[1]**o + (-0.959465676454)*x[1]
        ref[(0, 3, 1, 0)]=0.719539751009*x_ref[0]**o + (0.9505990354)*x_ref[0] + (-0.0482176984048)*x_ref[1]**o + (-0.959465676454)*x_ref[1]
        arg[(0, 3, 1, 1)]=0.743918748924*x[0]**o + (0.17186240014)*x[0] + (0.979886563679)*x[1]**o + (-0.875138727221)*x[1]
        ref[(0, 3, 1, 1)]=0.743918748924*x_ref[0]**o + (0.17186240014)*x_ref[0] + (0.979886563679)*x_ref[1]**o + (-0.875138727221)*x_ref[1]
        arg[(0, 3, 1, 2)]=-0.107895768238*x[0]**o + (-0.46796172341)*x[0] + (-0.54320912415)*x[1]**o + (-0.580591411789)*x[1]
        ref[(0, 3, 1, 2)]=-0.107895768238*x_ref[0]**o + (-0.46796172341)*x_ref[0] + (-0.54320912415)*x_ref[1]**o + (-0.580591411789)*x_ref[1]
        arg[(0, 3, 1, 3)]=-0.537449290839*x[0]**o + (0.968900017357)*x[0] + (-0.45305481998)*x[1]**o + (0.151043060112)*x[1]
        ref[(0, 3, 1, 3)]=-0.537449290839*x_ref[0]**o + (0.968900017357)*x_ref[0] + (-0.45305481998)*x_ref[1]**o + (0.151043060112)*x_ref[1]
        arg[(0, 3, 2, 0)]=-0.107101980628*x[0]**o + (0.0312035603545)*x[0] + (-0.818759003232)*x[1]**o + (0.557865064128)*x[1]
        ref[(0, 3, 2, 0)]=-0.107101980628*x_ref[0]**o + (0.0312035603545)*x_ref[0] + (-0.818759003232)*x_ref[1]**o + (0.557865064128)*x_ref[1]
        arg[(0, 3, 2, 1)]=0.506329542398*x[0]**o + (0.433968052036)*x[0] + (0.127685797424)*x[1]**o + (-0.117674196631)*x[1]
        ref[(0, 3, 2, 1)]=0.506329542398*x_ref[0]**o + (0.433968052036)*x_ref[0] + (0.127685797424)*x_ref[1]**o + (-0.117674196631)*x_ref[1]
        arg[(0, 3, 2, 2)]=0.829906239546*x[0]**o + (0.343686644183)*x[0] + (0.526985855)*x[1]**o + (0.650145315725)*x[1]
        ref[(0, 3, 2, 2)]=0.829906239546*x_ref[0]**o + (0.343686644183)*x_ref[0] + (0.526985855)*x_ref[1]**o + (0.650145315725)*x_ref[1]
        arg[(0, 3, 2, 3)]=-0.615363051962*x[0]**o + (0.643349866893)*x[0] + (-0.0458981132491)*x[1]**o + (-0.80439470947)*x[1]
        ref[(0, 3, 2, 3)]=-0.615363051962*x_ref[0]**o + (0.643349866893)*x_ref[0] + (-0.0458981132491)*x_ref[1]**o + (-0.80439470947)*x_ref[1]
        arg[(0, 3, 3, 0)]=-0.894419731333*x[0]**o + (-0.553926052879)*x[0] + (0.0635543154147)*x[1]**o + (0.552317737005)*x[1]
        ref[(0, 3, 3, 0)]=-0.894419731333*x_ref[0]**o + (-0.553926052879)*x_ref[0] + (0.0635543154147)*x_ref[1]**o + (0.552317737005)*x_ref[1]
        arg[(0, 3, 3, 1)]=0.78280961699*x[0]**o + (-0.224188467687)*x[0] + (0.240959586348)*x[1]**o + (-0.60314970047)*x[1]
        ref[(0, 3, 3, 1)]=0.78280961699*x_ref[0]**o + (-0.224188467687)*x_ref[0] + (0.240959586348)*x_ref[1]**o + (-0.60314970047)*x_ref[1]
        arg[(0, 3, 3, 2)]=0.802879549698*x[0]**o + (-0.361939875318)*x[0] + (0.957668275245)*x[1]**o + (-0.814774203627)*x[1]
        ref[(0, 3, 3, 2)]=0.802879549698*x_ref[0]**o + (-0.361939875318)*x_ref[0] + (0.957668275245)*x_ref[1]**o + (-0.814774203627)*x_ref[1]
        arg[(0, 3, 3, 3)]=0.0833757273355*x[0]**o + (0.733069344803)*x[0] + (-0.738413895326)*x[1]**o + (-0.299384575408)*x[1]
        ref[(0, 3, 3, 3)]=0.0833757273355*x_ref[0]**o + (0.733069344803)*x_ref[0] + (-0.738413895326)*x_ref[1]**o + (-0.299384575408)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.693819456718*x[0]**o + (0.805900103783)*x[0] + (0.13514802281)*x[1]**o + (-0.49785848669)*x[1]
        ref[(1, 0, 0, 0)]=0.693819456718*x_ref[0]**o + (0.805900103783)*x_ref[0] + (0.13514802281)*x_ref[1]**o + (-0.49785848669)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.606085279858*x[0]**o + (0.196024149661)*x[0] + (-0.65148705666)*x[1]**o + (0.822087661768)*x[1]
        ref[(1, 0, 0, 1)]=-0.606085279858*x_ref[0]**o + (0.196024149661)*x_ref[0] + (-0.65148705666)*x_ref[1]**o + (0.822087661768)*x_ref[1]
        arg[(1, 0, 0, 2)]=-0.720779904373*x[0]**o + (0.833865626017)*x[0] + (-0.460045672934)*x[1]**o + (0.609083030332)*x[1]
        ref[(1, 0, 0, 2)]=-0.720779904373*x_ref[0]**o + (0.833865626017)*x_ref[0] + (-0.460045672934)*x_ref[1]**o + (0.609083030332)*x_ref[1]
        arg[(1, 0, 0, 3)]=0.838066780026*x[0]**o + (0.464242446393)*x[0] + (0.411177038679)*x[1]**o + (0.121225861164)*x[1]
        ref[(1, 0, 0, 3)]=0.838066780026*x_ref[0]**o + (0.464242446393)*x_ref[0] + (0.411177038679)*x_ref[1]**o + (0.121225861164)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.0362682075274*x[0]**o + (0.209063672781)*x[0] + (-0.764098944816)*x[1]**o + (0.838846710355)*x[1]
        ref[(1, 0, 1, 0)]=0.0362682075274*x_ref[0]**o + (0.209063672781)*x_ref[0] + (-0.764098944816)*x_ref[1]**o + (0.838846710355)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.343371009474*x[0]**o + (0.482140535211)*x[0] + (-0.426255281287)*x[1]**o + (-0.976092056551)*x[1]
        ref[(1, 0, 1, 1)]=0.343371009474*x_ref[0]**o + (0.482140535211)*x_ref[0] + (-0.426255281287)*x_ref[1]**o + (-0.976092056551)*x_ref[1]
        arg[(1, 0, 1, 2)]=0.475988564675*x[0]**o + (-0.713838553402)*x[0] + (-0.915807993285)*x[1]**o + (-0.0436564569449)*x[1]
        ref[(1, 0, 1, 2)]=0.475988564675*x_ref[0]**o + (-0.713838553402)*x_ref[0] + (-0.915807993285)*x_ref[1]**o + (-0.0436564569449)*x_ref[1]
        arg[(1, 0, 1, 3)]=0.730152347538*x[0]**o + (-0.386330345993)*x[0] + (-0.193015507518)*x[1]**o + (-0.84677372168)*x[1]
        ref[(1, 0, 1, 3)]=0.730152347538*x_ref[0]**o + (-0.386330345993)*x_ref[0] + (-0.193015507518)*x_ref[1]**o + (-0.84677372168)*x_ref[1]
        arg[(1, 0, 2, 0)]=0.207190009108*x[0]**o + (0.142231393154)*x[0] + (-0.340226650441)*x[1]**o + (-0.640494824263)*x[1]
        ref[(1, 0, 2, 0)]=0.207190009108*x_ref[0]**o + (0.142231393154)*x_ref[0] + (-0.340226650441)*x_ref[1]**o + (-0.640494824263)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.834067196193*x[0]**o + (-0.959168484641)*x[0] + (-0.797085079804)*x[1]**o + (0.739608001141)*x[1]
        ref[(1, 0, 2, 1)]=0.834067196193*x_ref[0]**o + (-0.959168484641)*x_ref[0] + (-0.797085079804)*x_ref[1]**o + (0.739608001141)*x_ref[1]
        arg[(1, 0, 2, 2)]=0.313925542565*x[0]**o + (-0.0107226024783)*x[0] + (-0.527586052388)*x[1]**o + (-0.267241242377)*x[1]
        ref[(1, 0, 2, 2)]=0.313925542565*x_ref[0]**o + (-0.0107226024783)*x_ref[0] + (-0.527586052388)*x_ref[1]**o + (-0.267241242377)*x_ref[1]
        arg[(1, 0, 2, 3)]=0.409035360308*x[0]**o + (-0.217094922694)*x[0] + (-0.993450407888)*x[1]**o + (0.261730764466)*x[1]
        ref[(1, 0, 2, 3)]=0.409035360308*x_ref[0]**o + (-0.217094922694)*x_ref[0] + (-0.993450407888)*x_ref[1]**o + (0.261730764466)*x_ref[1]
        arg[(1, 0, 3, 0)]=0.506855588857*x[0]**o + (-0.269454211147)*x[0] + (-0.529614833503)*x[1]**o + (0.907258485247)*x[1]
        ref[(1, 0, 3, 0)]=0.506855588857*x_ref[0]**o + (-0.269454211147)*x_ref[0] + (-0.529614833503)*x_ref[1]**o + (0.907258485247)*x_ref[1]
        arg[(1, 0, 3, 1)]=-0.767316486512*x[0]**o + (0.614076640096)*x[0] + (-0.292433594288)*x[1]**o + (0.961598925483)*x[1]
        ref[(1, 0, 3, 1)]=-0.767316486512*x_ref[0]**o + (0.614076640096)*x_ref[0] + (-0.292433594288)*x_ref[1]**o + (0.961598925483)*x_ref[1]
        arg[(1, 0, 3, 2)]=-0.28272327749*x[0]**o + (-0.634965324986)*x[0] + (-0.168629187331)*x[1]**o + (0.770366173076)*x[1]
        ref[(1, 0, 3, 2)]=-0.28272327749*x_ref[0]**o + (-0.634965324986)*x_ref[0] + (-0.168629187331)*x_ref[1]**o + (0.770366173076)*x_ref[1]
        arg[(1, 0, 3, 3)]=0.976981662443*x[0]**o + (-0.501668150967)*x[0] + (-0.216637925459)*x[1]**o + (-0.784224946407)*x[1]
        ref[(1, 0, 3, 3)]=0.976981662443*x_ref[0]**o + (-0.501668150967)*x_ref[0] + (-0.216637925459)*x_ref[1]**o + (-0.784224946407)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.0990004555292*x[0]**o + (-0.264191430777)*x[0] + (-0.327163776869)*x[1]**o + (0.0284048399109)*x[1]
        ref[(1, 1, 0, 0)]=-0.0990004555292*x_ref[0]**o + (-0.264191430777)*x_ref[0] + (-0.327163776869)*x_ref[1]**o + (0.0284048399109)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.471673292808*x[0]**o + (-0.0738954687593)*x[0] + (0.575503353561)*x[1]**o + (-0.180810027946)*x[1]
        ref[(1, 1, 0, 1)]=0.471673292808*x_ref[0]**o + (-0.0738954687593)*x_ref[0] + (0.575503353561)*x_ref[1]**o + (-0.180810027946)*x_ref[1]
        arg[(1, 1, 0, 2)]=0.958780697223*x[0]**o + (0.695916728342)*x[0] + (-0.978128561131)*x[1]**o + (0.547157522752)*x[1]
        ref[(1, 1, 0, 2)]=0.958780697223*x_ref[0]**o + (0.695916728342)*x_ref[0] + (-0.978128561131)*x_ref[1]**o + (0.547157522752)*x_ref[1]
        arg[(1, 1, 0, 3)]=-0.968762536222*x[0]**o + (0.532198743388)*x[0] + (0.407241810356)*x[1]**o + (-0.694641109431)*x[1]
        ref[(1, 1, 0, 3)]=-0.968762536222*x_ref[0]**o + (0.532198743388)*x_ref[0] + (0.407241810356)*x_ref[1]**o + (-0.694641109431)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.009236735812*x[0]**o + (0.212494386393)*x[0] + (-0.413407006233)*x[1]**o + (-0.981912132664)*x[1]
        ref[(1, 1, 1, 0)]=0.009236735812*x_ref[0]**o + (0.212494386393)*x_ref[0] + (-0.413407006233)*x_ref[1]**o + (-0.981912132664)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.38371063867*x[0]**o + (0.415276000673)*x[0] + (-0.509552368294)*x[1]**o + (-0.26783982637)*x[1]
        ref[(1, 1, 1, 1)]=0.38371063867*x_ref[0]**o + (0.415276000673)*x_ref[0] + (-0.509552368294)*x_ref[1]**o + (-0.26783982637)*x_ref[1]
        arg[(1, 1, 1, 2)]=0.324212873036*x[0]**o + (-0.980639320585)*x[0] + (-0.771964635182)*x[1]**o + (-0.198820565168)*x[1]
        ref[(1, 1, 1, 2)]=0.324212873036*x_ref[0]**o + (-0.980639320585)*x_ref[0] + (-0.771964635182)*x_ref[1]**o + (-0.198820565168)*x_ref[1]
        arg[(1, 1, 1, 3)]=-0.95524902762*x[0]**o + (0.780250699972)*x[0] + (0.0242390724916)*x[1]**o + (0.144250979203)*x[1]
        ref[(1, 1, 1, 3)]=-0.95524902762*x_ref[0]**o + (0.780250699972)*x_ref[0] + (0.0242390724916)*x_ref[1]**o + (0.144250979203)*x_ref[1]
        arg[(1, 1, 2, 0)]=0.631177763455*x[0]**o + (0.693242939858)*x[0] + (0.257625217927)*x[1]**o + (0.422775135997)*x[1]
        ref[(1, 1, 2, 0)]=0.631177763455*x_ref[0]**o + (0.693242939858)*x_ref[0] + (0.257625217927)*x_ref[1]**o + (0.422775135997)*x_ref[1]
        arg[(1, 1, 2, 1)]=0.759787648749*x[0]**o + (-0.996935320637)*x[0] + (0.699135513933)*x[1]**o + (0.351496522899)*x[1]
        ref[(1, 1, 2, 1)]=0.759787648749*x_ref[0]**o + (-0.996935320637)*x_ref[0] + (0.699135513933)*x_ref[1]**o + (0.351496522899)*x_ref[1]
        arg[(1, 1, 2, 2)]=0.933254615252*x[0]**o + (0.364603135386)*x[0] + (-0.0433399854646)*x[1]**o + (0.663491039514)*x[1]
        ref[(1, 1, 2, 2)]=0.933254615252*x_ref[0]**o + (0.364603135386)*x_ref[0] + (-0.0433399854646)*x_ref[1]**o + (0.663491039514)*x_ref[1]
        arg[(1, 1, 2, 3)]=-0.56858179798*x[0]**o + (0.234921887397)*x[0] + (0.20082418023)*x[1]**o + (0.1067999335)*x[1]
        ref[(1, 1, 2, 3)]=-0.56858179798*x_ref[0]**o + (0.234921887397)*x_ref[0] + (0.20082418023)*x_ref[1]**o + (0.1067999335)*x_ref[1]
        arg[(1, 1, 3, 0)]=0.118477352074*x[0]**o + (0.902258526747)*x[0] + (0.649213015054)*x[1]**o + (-0.555265098445)*x[1]
        ref[(1, 1, 3, 0)]=0.118477352074*x_ref[0]**o + (0.902258526747)*x_ref[0] + (0.649213015054)*x_ref[1]**o + (-0.555265098445)*x_ref[1]
        arg[(1, 1, 3, 1)]=-0.156899392083*x[0]**o + (0.826363026715)*x[0] + (0.784457759745)*x[1]**o + (-0.351301653444)*x[1]
        ref[(1, 1, 3, 1)]=-0.156899392083*x_ref[0]**o + (0.826363026715)*x_ref[0] + (0.784457759745)*x_ref[1]**o + (-0.351301653444)*x_ref[1]
        arg[(1, 1, 3, 2)]=-0.682612012284*x[0]**o + (0.829852402582)*x[0] + (0.512691357285)*x[1]**o + (0.779682069686)*x[1]
        ref[(1, 1, 3, 2)]=-0.682612012284*x_ref[0]**o + (0.829852402582)*x_ref[0] + (0.512691357285)*x_ref[1]**o + (0.779682069686)*x_ref[1]
        arg[(1, 1, 3, 3)]=0.566056296294*x[0]**o + (0.851423950068)*x[0] + (-0.191559161234)*x[1]**o + (0.19207709354)*x[1]
        ref[(1, 1, 3, 3)]=0.566056296294*x_ref[0]**o + (0.851423950068)*x_ref[0] + (-0.191559161234)*x_ref[1]**o + (0.19207709354)*x_ref[1]
        arg[(1, 2, 0, 0)]=0.214743375821*x[0]**o + (0.961916597285)*x[0] + (0.166881050385)*x[1]**o + (0.703992313281)*x[1]
        ref[(1, 2, 0, 0)]=0.214743375821*x_ref[0]**o + (0.961916597285)*x_ref[0] + (0.166881050385)*x_ref[1]**o + (0.703992313281)*x_ref[1]
        arg[(1, 2, 0, 1)]=0.545354735556*x[0]**o + (0.150667705433)*x[0] + (-0.335500762665)*x[1]**o + (0.366209045867)*x[1]
        ref[(1, 2, 0, 1)]=0.545354735556*x_ref[0]**o + (0.150667705433)*x_ref[0] + (-0.335500762665)*x_ref[1]**o + (0.366209045867)*x_ref[1]
        arg[(1, 2, 0, 2)]=0.581538503378*x[0]**o + (0.454326878708)*x[0] + (-0.789014106394)*x[1]**o + (0.877397069797)*x[1]
        ref[(1, 2, 0, 2)]=0.581538503378*x_ref[0]**o + (0.454326878708)*x_ref[0] + (-0.789014106394)*x_ref[1]**o + (0.877397069797)*x_ref[1]
        arg[(1, 2, 0, 3)]=-0.998709459146*x[0]**o + (0.505485490794)*x[0] + (-0.0370905855556)*x[1]**o + (0.53956239135)*x[1]
        ref[(1, 2, 0, 3)]=-0.998709459146*x_ref[0]**o + (0.505485490794)*x_ref[0] + (-0.0370905855556)*x_ref[1]**o + (0.53956239135)*x_ref[1]
        arg[(1, 2, 1, 0)]=0.274622200876*x[0]**o + (0.249771058225)*x[0] + (0.842524741596)*x[1]**o + (-0.107607020575)*x[1]
        ref[(1, 2, 1, 0)]=0.274622200876*x_ref[0]**o + (0.249771058225)*x_ref[0] + (0.842524741596)*x_ref[1]**o + (-0.107607020575)*x_ref[1]
        arg[(1, 2, 1, 1)]=0.664205521835*x[0]**o + (0.454737944084)*x[0] + (-0.554144411587)*x[1]**o + (-0.145432351591)*x[1]
        ref[(1, 2, 1, 1)]=0.664205521835*x_ref[0]**o + (0.454737944084)*x_ref[0] + (-0.554144411587)*x_ref[1]**o + (-0.145432351591)*x_ref[1]
        arg[(1, 2, 1, 2)]=-0.500415146027*x[0]**o + (-0.782794767218)*x[0] + (-0.371712813443)*x[1]**o + (-0.737271721802)*x[1]
        ref[(1, 2, 1, 2)]=-0.500415146027*x_ref[0]**o + (-0.782794767218)*x_ref[0] + (-0.371712813443)*x_ref[1]**o + (-0.737271721802)*x_ref[1]
        arg[(1, 2, 1, 3)]=-0.147300053351*x[0]**o + (0.111548044395)*x[0] + (0.908708626725)*x[1]**o + (-0.215126604714)*x[1]
        ref[(1, 2, 1, 3)]=-0.147300053351*x_ref[0]**o + (0.111548044395)*x_ref[0] + (0.908708626725)*x_ref[1]**o + (-0.215126604714)*x_ref[1]
        arg[(1, 2, 2, 0)]=-0.197735137012*x[0]**o + (-0.63754842889)*x[0] + (-0.485913149359)*x[1]**o + (0.0646160965737)*x[1]
        ref[(1, 2, 2, 0)]=-0.197735137012*x_ref[0]**o + (-0.63754842889)*x_ref[0] + (-0.485913149359)*x_ref[1]**o + (0.0646160965737)*x_ref[1]
        arg[(1, 2, 2, 1)]=0.245785441085*x[0]**o + (0.318038222435)*x[0] + (-0.341390280276)*x[1]**o + (-0.248960178263)*x[1]
        ref[(1, 2, 2, 1)]=0.245785441085*x_ref[0]**o + (0.318038222435)*x_ref[0] + (-0.341390280276)*x_ref[1]**o + (-0.248960178263)*x_ref[1]
        arg[(1, 2, 2, 2)]=-0.415812139792*x[0]**o + (-0.483451470535)*x[0] + (-0.0759200531399)*x[1]**o + (0.603658780454)*x[1]
        ref[(1, 2, 2, 2)]=-0.415812139792*x_ref[0]**o + (-0.483451470535)*x_ref[0] + (-0.0759200531399)*x_ref[1]**o + (0.603658780454)*x_ref[1]
        arg[(1, 2, 2, 3)]=0.327683499198*x[0]**o + (-0.423863039407)*x[0] + (-0.399171138669)*x[1]**o + (0.97027115332)*x[1]
        ref[(1, 2, 2, 3)]=0.327683499198*x_ref[0]**o + (-0.423863039407)*x_ref[0] + (-0.399171138669)*x_ref[1]**o + (0.97027115332)*x_ref[1]
        arg[(1, 2, 3, 0)]=-0.889225525062*x[0]**o + (0.564316595721)*x[0] + (0.697727165333)*x[1]**o + (0.675638205613)*x[1]
        ref[(1, 2, 3, 0)]=-0.889225525062*x_ref[0]**o + (0.564316595721)*x_ref[0] + (0.697727165333)*x_ref[1]**o + (0.675638205613)*x_ref[1]
        arg[(1, 2, 3, 1)]=0.15775183392*x[0]**o + (0.869583543974)*x[0] + (-0.654565831343)*x[1]**o + (0.245484927971)*x[1]
        ref[(1, 2, 3, 1)]=0.15775183392*x_ref[0]**o + (0.869583543974)*x_ref[0] + (-0.654565831343)*x_ref[1]**o + (0.245484927971)*x_ref[1]
        arg[(1, 2, 3, 2)]=-0.85388938086*x[0]**o + (0.236531758582)*x[0] + (0.216867610842)*x[1]**o + (-0.0178566026696)*x[1]
        ref[(1, 2, 3, 2)]=-0.85388938086*x_ref[0]**o + (0.236531758582)*x_ref[0] + (0.216867610842)*x_ref[1]**o + (-0.0178566026696)*x_ref[1]
        arg[(1, 2, 3, 3)]=0.541099325438*x[0]**o + (-0.332917228544)*x[0] + (-0.66258050143)*x[1]**o + (0.572775087305)*x[1]
        ref[(1, 2, 3, 3)]=0.541099325438*x_ref[0]**o + (-0.332917228544)*x_ref[0] + (-0.66258050143)*x_ref[1]**o + (0.572775087305)*x_ref[1]
        arg[(1, 3, 0, 0)]=-0.199332231707*x[0]**o + (-0.979958658532)*x[0] + (0.235596290751)*x[1]**o + (0.579191672182)*x[1]
        ref[(1, 3, 0, 0)]=-0.199332231707*x_ref[0]**o + (-0.979958658532)*x_ref[0] + (0.235596290751)*x_ref[1]**o + (0.579191672182)*x_ref[1]
        arg[(1, 3, 0, 1)]=0.328902859937*x[0]**o + (0.720821684656)*x[0] + (0.793053711362)*x[1]**o + (0.563811699954)*x[1]
        ref[(1, 3, 0, 1)]=0.328902859937*x_ref[0]**o + (0.720821684656)*x_ref[0] + (0.793053711362)*x_ref[1]**o + (0.563811699954)*x_ref[1]
        arg[(1, 3, 0, 2)]=-0.641866300756*x[0]**o + (0.432530209718)*x[0] + (-0.115856554837)*x[1]**o + (0.446141497941)*x[1]
        ref[(1, 3, 0, 2)]=-0.641866300756*x_ref[0]**o + (0.432530209718)*x_ref[0] + (-0.115856554837)*x_ref[1]**o + (0.446141497941)*x_ref[1]
        arg[(1, 3, 0, 3)]=-0.295796960312*x[0]**o + (0.354464428486)*x[0] + (-0.682205798685)*x[1]**o + (-0.763339663133)*x[1]
        ref[(1, 3, 0, 3)]=-0.295796960312*x_ref[0]**o + (0.354464428486)*x_ref[0] + (-0.682205798685)*x_ref[1]**o + (-0.763339663133)*x_ref[1]
        arg[(1, 3, 1, 0)]=-0.260599581293*x[0]**o + (-0.73036351682)*x[0] + (-0.101832293792)*x[1]**o + (0.444349227054)*x[1]
        ref[(1, 3, 1, 0)]=-0.260599581293*x_ref[0]**o + (-0.73036351682)*x_ref[0] + (-0.101832293792)*x_ref[1]**o + (0.444349227054)*x_ref[1]
        arg[(1, 3, 1, 1)]=0.849887872095*x[0]**o + (-0.207993174582)*x[0] + (-0.774802295725)*x[1]**o + (0.305806938057)*x[1]
        ref[(1, 3, 1, 1)]=0.849887872095*x_ref[0]**o + (-0.207993174582)*x_ref[0] + (-0.774802295725)*x_ref[1]**o + (0.305806938057)*x_ref[1]
        arg[(1, 3, 1, 2)]=-0.575564412021*x[0]**o + (0.819402753655)*x[0] + (0.434730075671)*x[1]**o + (-0.909197991877)*x[1]
        ref[(1, 3, 1, 2)]=-0.575564412021*x_ref[0]**o + (0.819402753655)*x_ref[0] + (0.434730075671)*x_ref[1]**o + (-0.909197991877)*x_ref[1]
        arg[(1, 3, 1, 3)]=-0.621316416607*x[0]**o + (0.896167970752)*x[0] + (-0.0222961841128)*x[1]**o + (0.44954894674)*x[1]
        ref[(1, 3, 1, 3)]=-0.621316416607*x_ref[0]**o + (0.896167970752)*x_ref[0] + (-0.0222961841128)*x_ref[1]**o + (0.44954894674)*x_ref[1]
        arg[(1, 3, 2, 0)]=0.631012448693*x[0]**o + (-0.999112148948)*x[0] + (-0.85571521983)*x[1]**o + (-0.00742209771402)*x[1]
        ref[(1, 3, 2, 0)]=0.631012448693*x_ref[0]**o + (-0.999112148948)*x_ref[0] + (-0.85571521983)*x_ref[1]**o + (-0.00742209771402)*x_ref[1]
        arg[(1, 3, 2, 1)]=0.833837125253*x[0]**o + (0.797344368753)*x[0] + (0.994229115606)*x[1]**o + (0.216608860538)*x[1]
        ref[(1, 3, 2, 1)]=0.833837125253*x_ref[0]**o + (0.797344368753)*x_ref[0] + (0.994229115606)*x_ref[1]**o + (0.216608860538)*x_ref[1]
        arg[(1, 3, 2, 2)]=0.614431755197*x[0]**o + (-0.27885602869)*x[0] + (-0.360634341945)*x[1]**o + (0.147576757896)*x[1]
        ref[(1, 3, 2, 2)]=0.614431755197*x_ref[0]**o + (-0.27885602869)*x_ref[0] + (-0.360634341945)*x_ref[1]**o + (0.147576757896)*x_ref[1]
        arg[(1, 3, 2, 3)]=-0.376250892392*x[0]**o + (0.762729638768)*x[0] + (0.381505680875)*x[1]**o + (-0.942116145254)*x[1]
        ref[(1, 3, 2, 3)]=-0.376250892392*x_ref[0]**o + (0.762729638768)*x_ref[0] + (0.381505680875)*x_ref[1]**o + (-0.942116145254)*x_ref[1]
        arg[(1, 3, 3, 0)]=-0.937377988517*x[0]**o + (-0.530465256868)*x[0] + (0.184129345737)*x[1]**o + (0.481099784052)*x[1]
        ref[(1, 3, 3, 0)]=-0.937377988517*x_ref[0]**o + (-0.530465256868)*x_ref[0] + (0.184129345737)*x_ref[1]**o + (0.481099784052)*x_ref[1]
        arg[(1, 3, 3, 1)]=-0.715231461809*x[0]**o + (-0.379722151939)*x[0] + (0.854948308383)*x[1]**o + (-0.724261070781)*x[1]
        ref[(1, 3, 3, 1)]=-0.715231461809*x_ref[0]**o + (-0.379722151939)*x_ref[0] + (0.854948308383)*x_ref[1]**o + (-0.724261070781)*x_ref[1]
        arg[(1, 3, 3, 2)]=0.675183301691*x[0]**o + (0.586976209544)*x[0] + (-0.565278821886)*x[1]**o + (0.468813256254)*x[1]
        ref[(1, 3, 3, 2)]=0.675183301691*x_ref[0]**o + (0.586976209544)*x_ref[0] + (-0.565278821886)*x_ref[1]**o + (0.468813256254)*x_ref[1]
        arg[(1, 3, 3, 3)]=-0.73220368305*x[0]**o + (-0.868923578003)*x[0] + (0.185405517983)*x[1]**o + (-0.287213823099)*x[1]
        ref[(1, 3, 3, 3)]=-0.73220368305*x_ref[0]**o + (-0.868923578003)*x_ref[0] + (0.185405517983)*x_ref[1]**o + (-0.287213823099)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.880399681966*x[0]**o + (-0.110499499639)*x[0] + (0.417841207177)*x[1]**o + (-0.93009070143)*x[1]
        ref[(2, 0, 0, 0)]=0.880399681966*x_ref[0]**o + (-0.110499499639)*x_ref[0] + (0.417841207177)*x_ref[1]**o + (-0.93009070143)*x_ref[1]
        arg[(2, 0, 0, 1)]=-0.334463362347*x[0]**o + (0.215901904698)*x[0] + (-0.62294925825)*x[1]**o + (-0.998275894583)*x[1]
        ref[(2, 0, 0, 1)]=-0.334463362347*x_ref[0]**o + (0.215901904698)*x_ref[0] + (-0.62294925825)*x_ref[1]**o + (-0.998275894583)*x_ref[1]
        arg[(2, 0, 0, 2)]=-0.41099650693*x[0]**o + (-0.736130907349)*x[0] + (-0.207017953456)*x[1]**o + (0.951104385533)*x[1]
        ref[(2, 0, 0, 2)]=-0.41099650693*x_ref[0]**o + (-0.736130907349)*x_ref[0] + (-0.207017953456)*x_ref[1]**o + (0.951104385533)*x_ref[1]
        arg[(2, 0, 0, 3)]=-0.652658904502*x[0]**o + (-0.362694178258)*x[0] + (-0.722710509546)*x[1]**o + (-0.427802457469)*x[1]
        ref[(2, 0, 0, 3)]=-0.652658904502*x_ref[0]**o + (-0.362694178258)*x_ref[0] + (-0.722710509546)*x_ref[1]**o + (-0.427802457469)*x_ref[1]
        arg[(2, 0, 1, 0)]=-0.33166789846*x[0]**o + (-0.803327376978)*x[0] + (-0.137218539665)*x[1]**o + (0.149670053034)*x[1]
        ref[(2, 0, 1, 0)]=-0.33166789846*x_ref[0]**o + (-0.803327376978)*x_ref[0] + (-0.137218539665)*x_ref[1]**o + (0.149670053034)*x_ref[1]
        arg[(2, 0, 1, 1)]=0.0369150348996*x[0]**o + (0.240475450291)*x[0] + (0.547437576633)*x[1]**o + (0.656222569234)*x[1]
        ref[(2, 0, 1, 1)]=0.0369150348996*x_ref[0]**o + (0.240475450291)*x_ref[0] + (0.547437576633)*x_ref[1]**o + (0.656222569234)*x_ref[1]
        arg[(2, 0, 1, 2)]=-0.407631189263*x[0]**o + (-0.433590081906)*x[0] + (0.0254681532405)*x[1]**o + (0.904655163566)*x[1]
        ref[(2, 0, 1, 2)]=-0.407631189263*x_ref[0]**o + (-0.433590081906)*x_ref[0] + (0.0254681532405)*x_ref[1]**o + (0.904655163566)*x_ref[1]
        arg[(2, 0, 1, 3)]=-0.32647545544*x[0]**o + (0.862510129431)*x[0] + (-0.265064536908)*x[1]**o + (0.721866127948)*x[1]
        ref[(2, 0, 1, 3)]=-0.32647545544*x_ref[0]**o + (0.862510129431)*x_ref[0] + (-0.265064536908)*x_ref[1]**o + (0.721866127948)*x_ref[1]
        arg[(2, 0, 2, 0)]=0.340497876047*x[0]**o + (0.919737618362)*x[0] + (-0.503468406492)*x[1]**o + (-0.628473899484)*x[1]
        ref[(2, 0, 2, 0)]=0.340497876047*x_ref[0]**o + (0.919737618362)*x_ref[0] + (-0.503468406492)*x_ref[1]**o + (-0.628473899484)*x_ref[1]
        arg[(2, 0, 2, 1)]=-0.556012889586*x[0]**o + (0.880975148609)*x[0] + (-0.963913201284)*x[1]**o + (0.769814410746)*x[1]
        ref[(2, 0, 2, 1)]=-0.556012889586*x_ref[0]**o + (0.880975148609)*x_ref[0] + (-0.963913201284)*x_ref[1]**o + (0.769814410746)*x_ref[1]
        arg[(2, 0, 2, 2)]=-0.749851762898*x[0]**o + (-0.179094141794)*x[0] + (0.878908048447)*x[1]**o + (-0.835002383285)*x[1]
        ref[(2, 0, 2, 2)]=-0.749851762898*x_ref[0]**o + (-0.179094141794)*x_ref[0] + (0.878908048447)*x_ref[1]**o + (-0.835002383285)*x_ref[1]
        arg[(2, 0, 2, 3)]=0.163795255661*x[0]**o + (0.251749057093)*x[0] + (-0.972384633443)*x[1]**o + (0.775963818924)*x[1]
        ref[(2, 0, 2, 3)]=0.163795255661*x_ref[0]**o + (0.251749057093)*x_ref[0] + (-0.972384633443)*x_ref[1]**o + (0.775963818924)*x_ref[1]
        arg[(2, 0, 3, 0)]=-0.0362080556964*x[0]**o + (-0.508590071141)*x[0] + (-0.0743276773268)*x[1]**o + (-0.313707017017)*x[1]
        ref[(2, 0, 3, 0)]=-0.0362080556964*x_ref[0]**o + (-0.508590071141)*x_ref[0] + (-0.0743276773268)*x_ref[1]**o + (-0.313707017017)*x_ref[1]
        arg[(2, 0, 3, 1)]=0.956584275648*x[0]**o + (-0.631948630834)*x[0] + (0.504941676754)*x[1]**o + (0.538315500842)*x[1]
        ref[(2, 0, 3, 1)]=0.956584275648*x_ref[0]**o + (-0.631948630834)*x_ref[0] + (0.504941676754)*x_ref[1]**o + (0.538315500842)*x_ref[1]
        arg[(2, 0, 3, 2)]=-0.179922651066*x[0]**o + (0.55076984387)*x[0] + (-0.954915147598)*x[1]**o + (-0.16271378092)*x[1]
        ref[(2, 0, 3, 2)]=-0.179922651066*x_ref[0]**o + (0.55076984387)*x_ref[0] + (-0.954915147598)*x_ref[1]**o + (-0.16271378092)*x_ref[1]
        arg[(2, 0, 3, 3)]=0.301702870341*x[0]**o + (0.656847579591)*x[0] + (0.992340125654)*x[1]**o + (-0.850156552948)*x[1]
        ref[(2, 0, 3, 3)]=0.301702870341*x_ref[0]**o + (0.656847579591)*x_ref[0] + (0.992340125654)*x_ref[1]**o + (-0.850156552948)*x_ref[1]
        arg[(2, 1, 0, 0)]=0.324922640419*x[0]**o + (0.453055959165)*x[0] + (-0.0792845344542)*x[1]**o + (-0.768111282719)*x[1]
        ref[(2, 1, 0, 0)]=0.324922640419*x_ref[0]**o + (0.453055959165)*x_ref[0] + (-0.0792845344542)*x_ref[1]**o + (-0.768111282719)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.0892326242954*x[0]**o + (0.669105863284)*x[0] + (0.59209173128)*x[1]**o + (-0.0518785429782)*x[1]
        ref[(2, 1, 0, 1)]=0.0892326242954*x_ref[0]**o + (0.669105863284)*x_ref[0] + (0.59209173128)*x_ref[1]**o + (-0.0518785429782)*x_ref[1]
        arg[(2, 1, 0, 2)]=0.308058567188*x[0]**o + (0.504339153278)*x[0] + (0.173283714014)*x[1]**o + (-0.741053368651)*x[1]
        ref[(2, 1, 0, 2)]=0.308058567188*x_ref[0]**o + (0.504339153278)*x_ref[0] + (0.173283714014)*x_ref[1]**o + (-0.741053368651)*x_ref[1]
        arg[(2, 1, 0, 3)]=-0.470518717178*x[0]**o + (-0.786300396378)*x[0] + (-0.00970399025732)*x[1]**o + (-0.92010586004)*x[1]
        ref[(2, 1, 0, 3)]=-0.470518717178*x_ref[0]**o + (-0.786300396378)*x_ref[0] + (-0.00970399025732)*x_ref[1]**o + (-0.92010586004)*x_ref[1]
        arg[(2, 1, 1, 0)]=-0.015008912816*x[0]**o + (-0.7244359633)*x[0] + (0.991512328363)*x[1]**o + (0.989007182118)*x[1]
        ref[(2, 1, 1, 0)]=-0.015008912816*x_ref[0]**o + (-0.7244359633)*x_ref[0] + (0.991512328363)*x_ref[1]**o + (0.989007182118)*x_ref[1]
        arg[(2, 1, 1, 1)]=0.609562037429*x[0]**o + (-0.160796065609)*x[0] + (-0.604368458865)*x[1]**o + (0.940665891351)*x[1]
        ref[(2, 1, 1, 1)]=0.609562037429*x_ref[0]**o + (-0.160796065609)*x_ref[0] + (-0.604368458865)*x_ref[1]**o + (0.940665891351)*x_ref[1]
        arg[(2, 1, 1, 2)]=-0.579733724684*x[0]**o + (0.908742375045)*x[0] + (-0.918483556566)*x[1]**o + (0.186023187217)*x[1]
        ref[(2, 1, 1, 2)]=-0.579733724684*x_ref[0]**o + (0.908742375045)*x_ref[0] + (-0.918483556566)*x_ref[1]**o + (0.186023187217)*x_ref[1]
        arg[(2, 1, 1, 3)]=0.474273965776*x[0]**o + (0.177575400583)*x[0] + (-0.0135275996462)*x[1]**o + (0.5291842025)*x[1]
        ref[(2, 1, 1, 3)]=0.474273965776*x_ref[0]**o + (0.177575400583)*x_ref[0] + (-0.0135275996462)*x_ref[1]**o + (0.5291842025)*x_ref[1]
        arg[(2, 1, 2, 0)]=0.337733727655*x[0]**o + (0.68789340238)*x[0] + (-0.594687999469)*x[1]**o + (0.511113376322)*x[1]
        ref[(2, 1, 2, 0)]=0.337733727655*x_ref[0]**o + (0.68789340238)*x_ref[0] + (-0.594687999469)*x_ref[1]**o + (0.511113376322)*x_ref[1]
        arg[(2, 1, 2, 1)]=-0.206025117605*x[0]**o + (-0.315654848681)*x[0] + (0.867646379135)*x[1]**o + (-0.00866291293288)*x[1]
        ref[(2, 1, 2, 1)]=-0.206025117605*x_ref[0]**o + (-0.315654848681)*x_ref[0] + (0.867646379135)*x_ref[1]**o + (-0.00866291293288)*x_ref[1]
        arg[(2, 1, 2, 2)]=0.957335452035*x[0]**o + (-0.710742228599)*x[0] + (0.64396044768)*x[1]**o + (0.578952806279)*x[1]
        ref[(2, 1, 2, 2)]=0.957335452035*x_ref[0]**o + (-0.710742228599)*x_ref[0] + (0.64396044768)*x_ref[1]**o + (0.578952806279)*x_ref[1]
        arg[(2, 1, 2, 3)]=-0.910943327508*x[0]**o + (-0.771954179141)*x[0] + (-0.138388332327)*x[1]**o + (0.458960366471)*x[1]
        ref[(2, 1, 2, 3)]=-0.910943327508*x_ref[0]**o + (-0.771954179141)*x_ref[0] + (-0.138388332327)*x_ref[1]**o + (0.458960366471)*x_ref[1]
        arg[(2, 1, 3, 0)]=0.043828495*x[0]**o + (-0.934704737212)*x[0] + (-0.355448464892)*x[1]**o + (-0.761366119385)*x[1]
        ref[(2, 1, 3, 0)]=0.043828495*x_ref[0]**o + (-0.934704737212)*x_ref[0] + (-0.355448464892)*x_ref[1]**o + (-0.761366119385)*x_ref[1]
        arg[(2, 1, 3, 1)]=-0.757616191723*x[0]**o + (-0.357807278117)*x[0] + (-0.054724864202)*x[1]**o + (-0.333389365909)*x[1]
        ref[(2, 1, 3, 1)]=-0.757616191723*x_ref[0]**o + (-0.357807278117)*x_ref[0] + (-0.054724864202)*x_ref[1]**o + (-0.333389365909)*x_ref[1]
        arg[(2, 1, 3, 2)]=0.997017841016*x[0]**o + (-0.0633385464719)*x[0] + (-0.148408599416)*x[1]**o + (0.400529569452)*x[1]
        ref[(2, 1, 3, 2)]=0.997017841016*x_ref[0]**o + (-0.0633385464719)*x_ref[0] + (-0.148408599416)*x_ref[1]**o + (0.400529569452)*x_ref[1]
        arg[(2, 1, 3, 3)]=0.768035746341*x[0]**o + (-0.7818823601)*x[0] + (-0.194962910487)*x[1]**o + (-0.961652118943)*x[1]
        ref[(2, 1, 3, 3)]=0.768035746341*x_ref[0]**o + (-0.7818823601)*x_ref[0] + (-0.194962910487)*x_ref[1]**o + (-0.961652118943)*x_ref[1]
        arg[(2, 2, 0, 0)]=0.884906323756*x[0]**o + (-0.526097767271)*x[0] + (0.289295258842)*x[1]**o + (0.978739500099)*x[1]
        ref[(2, 2, 0, 0)]=0.884906323756*x_ref[0]**o + (-0.526097767271)*x_ref[0] + (0.289295258842)*x_ref[1]**o + (0.978739500099)*x_ref[1]
        arg[(2, 2, 0, 1)]=0.483149714259*x[0]**o + (0.605005214769)*x[0] + (-0.276231364247)*x[1]**o + (0.950186843356)*x[1]
        ref[(2, 2, 0, 1)]=0.483149714259*x_ref[0]**o + (0.605005214769)*x_ref[0] + (-0.276231364247)*x_ref[1]**o + (0.950186843356)*x_ref[1]
        arg[(2, 2, 0, 2)]=0.672320761355*x[0]**o + (0.988702952649)*x[0] + (-0.299313090788)*x[1]**o + (-0.265043552859)*x[1]
        ref[(2, 2, 0, 2)]=0.672320761355*x_ref[0]**o + (0.988702952649)*x_ref[0] + (-0.299313090788)*x_ref[1]**o + (-0.265043552859)*x_ref[1]
        arg[(2, 2, 0, 3)]=-0.371273917461*x[0]**o + (-0.652849850247)*x[0] + (0.298393762051)*x[1]**o + (-0.08594556683)*x[1]
        ref[(2, 2, 0, 3)]=-0.371273917461*x_ref[0]**o + (-0.652849850247)*x_ref[0] + (0.298393762051)*x_ref[1]**o + (-0.08594556683)*x_ref[1]
        arg[(2, 2, 1, 0)]=-0.0136622097835*x[0]**o + (0.247069670896)*x[0] + (-0.256531552071)*x[1]**o + (0.6267749891)*x[1]
        ref[(2, 2, 1, 0)]=-0.0136622097835*x_ref[0]**o + (0.247069670896)*x_ref[0] + (-0.256531552071)*x_ref[1]**o + (0.6267749891)*x_ref[1]
        arg[(2, 2, 1, 1)]=-0.233949819486*x[0]**o + (-0.605257007809)*x[0] + (0.055107117099)*x[1]**o + (-0.500029540983)*x[1]
        ref[(2, 2, 1, 1)]=-0.233949819486*x_ref[0]**o + (-0.605257007809)*x_ref[0] + (0.055107117099)*x_ref[1]**o + (-0.500029540983)*x_ref[1]
        arg[(2, 2, 1, 2)]=-0.685578128293*x[0]**o + (-0.210169474013)*x[0] + (0.515351560798)*x[1]**o + (-0.498487986145)*x[1]
        ref[(2, 2, 1, 2)]=-0.685578128293*x_ref[0]**o + (-0.210169474013)*x_ref[0] + (0.515351560798)*x_ref[1]**o + (-0.498487986145)*x_ref[1]
        arg[(2, 2, 1, 3)]=-0.665219190109*x[0]**o + (-0.817003745446)*x[0] + (0.939869229296)*x[1]**o + (-0.5091646595)*x[1]
        ref[(2, 2, 1, 3)]=-0.665219190109*x_ref[0]**o + (-0.817003745446)*x_ref[0] + (0.939869229296)*x_ref[1]**o + (-0.5091646595)*x_ref[1]
        arg[(2, 2, 2, 0)]=-0.728097092693*x[0]**o + (0.11196343351)*x[0] + (0.666378006141)*x[1]**o + (0.568208502867)*x[1]
        ref[(2, 2, 2, 0)]=-0.728097092693*x_ref[0]**o + (0.11196343351)*x_ref[0] + (0.666378006141)*x_ref[1]**o + (0.568208502867)*x_ref[1]
        arg[(2, 2, 2, 1)]=0.7439077281*x[0]**o + (0.173875770027)*x[0] + (-0.684321173826)*x[1]**o + (-0.974916218007)*x[1]
        ref[(2, 2, 2, 1)]=0.7439077281*x_ref[0]**o + (0.173875770027)*x_ref[0] + (-0.684321173826)*x_ref[1]**o + (-0.974916218007)*x_ref[1]
        arg[(2, 2, 2, 2)]=0.235166535899*x[0]**o + (-0.214410180483)*x[0] + (-0.867959597458)*x[1]**o + (-0.980796826784)*x[1]
        ref[(2, 2, 2, 2)]=0.235166535899*x_ref[0]**o + (-0.214410180483)*x_ref[0] + (-0.867959597458)*x_ref[1]**o + (-0.980796826784)*x_ref[1]
        arg[(2, 2, 2, 3)]=-0.287753983409*x[0]**o + (0.0413326286419)*x[0] + (0.227628441674)*x[1]**o + (0.991746640798)*x[1]
        ref[(2, 2, 2, 3)]=-0.287753983409*x_ref[0]**o + (0.0413326286419)*x_ref[0] + (0.227628441674)*x_ref[1]**o + (0.991746640798)*x_ref[1]
        arg[(2, 2, 3, 0)]=0.0864548692829*x[0]**o + (-0.776233975233)*x[0] + (-0.789945168901)*x[1]**o + (-0.56076687986)*x[1]
        ref[(2, 2, 3, 0)]=0.0864548692829*x_ref[0]**o + (-0.776233975233)*x_ref[0] + (-0.789945168901)*x_ref[1]**o + (-0.56076687986)*x_ref[1]
        arg[(2, 2, 3, 1)]=0.276389387316*x[0]**o + (-0.101666135912)*x[0] + (0.186456365732)*x[1]**o + (-0.563652210818)*x[1]
        ref[(2, 2, 3, 1)]=0.276389387316*x_ref[0]**o + (-0.101666135912)*x_ref[0] + (0.186456365732)*x_ref[1]**o + (-0.563652210818)*x_ref[1]
        arg[(2, 2, 3, 2)]=0.125268756994*x[0]**o + (-0.178217906319)*x[0] + (0.327281223918)*x[1]**o + (-0.889525333912)*x[1]
        ref[(2, 2, 3, 2)]=0.125268756994*x_ref[0]**o + (-0.178217906319)*x_ref[0] + (0.327281223918)*x_ref[1]**o + (-0.889525333912)*x_ref[1]
        arg[(2, 2, 3, 3)]=-0.0842736825167*x[0]**o + (0.395301634615)*x[0] + (0.995948717314)*x[1]**o + (0.189370567768)*x[1]
        ref[(2, 2, 3, 3)]=-0.0842736825167*x_ref[0]**o + (0.395301634615)*x_ref[0] + (0.995948717314)*x_ref[1]**o + (0.189370567768)*x_ref[1]
        arg[(2, 3, 0, 0)]=0.48826955144*x[0]**o + (-0.747126923339)*x[0] + (-0.319015585098)*x[1]**o + (0.104393801511)*x[1]
        ref[(2, 3, 0, 0)]=0.48826955144*x_ref[0]**o + (-0.747126923339)*x_ref[0] + (-0.319015585098)*x_ref[1]**o + (0.104393801511)*x_ref[1]
        arg[(2, 3, 0, 1)]=0.627105859433*x[0]**o + (0.838672034942)*x[0] + (-0.133492136187)*x[1]**o + (0.444345640314)*x[1]
        ref[(2, 3, 0, 1)]=0.627105859433*x_ref[0]**o + (0.838672034942)*x_ref[0] + (-0.133492136187)*x_ref[1]**o + (0.444345640314)*x_ref[1]
        arg[(2, 3, 0, 2)]=0.219992315015*x[0]**o + (-0.630142775565)*x[0] + (0.268660499129)*x[1]**o + (0.659830038348)*x[1]
        ref[(2, 3, 0, 2)]=0.219992315015*x_ref[0]**o + (-0.630142775565)*x_ref[0] + (0.268660499129)*x_ref[1]**o + (0.659830038348)*x_ref[1]
        arg[(2, 3, 0, 3)]=0.0680063994974*x[0]**o + (-0.674974512548)*x[0] + (0.77210126963)*x[1]**o + (-0.135138703152)*x[1]
        ref[(2, 3, 0, 3)]=0.0680063994974*x_ref[0]**o + (-0.674974512548)*x_ref[0] + (0.77210126963)*x_ref[1]**o + (-0.135138703152)*x_ref[1]
        arg[(2, 3, 1, 0)]=-0.817608689169*x[0]**o + (0.822999015731)*x[0] + (-0.224139398727)*x[1]**o + (0.0680099382205)*x[1]
        ref[(2, 3, 1, 0)]=-0.817608689169*x_ref[0]**o + (0.822999015731)*x_ref[0] + (-0.224139398727)*x_ref[1]**o + (0.0680099382205)*x_ref[1]
        arg[(2, 3, 1, 1)]=-0.667741965511*x[0]**o + (0.61367368076)*x[0] + (-0.340746168101)*x[1]**o + (-0.0168420638755)*x[1]
        ref[(2, 3, 1, 1)]=-0.667741965511*x_ref[0]**o + (0.61367368076)*x_ref[0] + (-0.340746168101)*x_ref[1]**o + (-0.0168420638755)*x_ref[1]
        arg[(2, 3, 1, 2)]=-0.153734048769*x[0]**o + (0.198530735303)*x[0] + (0.155710688888)*x[1]**o + (0.372265028663)*x[1]
        ref[(2, 3, 1, 2)]=-0.153734048769*x_ref[0]**o + (0.198530735303)*x_ref[0] + (0.155710688888)*x_ref[1]**o + (0.372265028663)*x_ref[1]
        arg[(2, 3, 1, 3)]=-0.175414626415*x[0]**o + (0.747409758705)*x[0] + (-0.453456413068)*x[1]**o + (-0.165947737477)*x[1]
        ref[(2, 3, 1, 3)]=-0.175414626415*x_ref[0]**o + (0.747409758705)*x_ref[0] + (-0.453456413068)*x_ref[1]**o + (-0.165947737477)*x_ref[1]
        arg[(2, 3, 2, 0)]=0.157952509588*x[0]**o + (-0.898296658063)*x[0] + (-0.280829801464)*x[1]**o + (0.347005882885)*x[1]
        ref[(2, 3, 2, 0)]=0.157952509588*x_ref[0]**o + (-0.898296658063)*x_ref[0] + (-0.280829801464)*x_ref[1]**o + (0.347005882885)*x_ref[1]
        arg[(2, 3, 2, 1)]=0.429090641844*x[0]**o + (0.0689799349346)*x[0] + (0.309259856387)*x[1]**o + (-0.258712264402)*x[1]
        ref[(2, 3, 2, 1)]=0.429090641844*x_ref[0]**o + (0.0689799349346)*x_ref[0] + (0.309259856387)*x_ref[1]**o + (-0.258712264402)*x_ref[1]
        arg[(2, 3, 2, 2)]=0.742199854229*x[0]**o + (-0.420538071014)*x[0] + (-0.419983962537)*x[1]**o + (-0.236731284073)*x[1]
        ref[(2, 3, 2, 2)]=0.742199854229*x_ref[0]**o + (-0.420538071014)*x_ref[0] + (-0.419983962537)*x_ref[1]**o + (-0.236731284073)*x_ref[1]
        arg[(2, 3, 2, 3)]=-0.159979909183*x[0]**o + (-0.984905073798)*x[0] + (0.693545055609)*x[1]**o + (-0.805944554702)*x[1]
        ref[(2, 3, 2, 3)]=-0.159979909183*x_ref[0]**o + (-0.984905073798)*x_ref[0] + (0.693545055609)*x_ref[1]**o + (-0.805944554702)*x_ref[1]
        arg[(2, 3, 3, 0)]=-0.353615543701*x[0]**o + (-0.37385477108)*x[0] + (0.555931504707)*x[1]**o + (-0.7149896436)*x[1]
        ref[(2, 3, 3, 0)]=-0.353615543701*x_ref[0]**o + (-0.37385477108)*x_ref[0] + (0.555931504707)*x_ref[1]**o + (-0.7149896436)*x_ref[1]
        arg[(2, 3, 3, 1)]=0.200400684696*x[0]**o + (0.42282161039)*x[0] + (0.559124104289)*x[1]**o + (-0.823499618011)*x[1]
        ref[(2, 3, 3, 1)]=0.200400684696*x_ref[0]**o + (0.42282161039)*x_ref[0] + (0.559124104289)*x_ref[1]**o + (-0.823499618011)*x_ref[1]
        arg[(2, 3, 3, 2)]=0.629236482447*x[0]**o + (0.0980350860964)*x[0] + (0.62617661617)*x[1]**o + (0.759987494606)*x[1]
        ref[(2, 3, 3, 2)]=0.629236482447*x_ref[0]**o + (0.0980350860964)*x_ref[0] + (0.62617661617)*x_ref[1]**o + (0.759987494606)*x_ref[1]
        arg[(2, 3, 3, 3)]=-0.613804765136*x[0]**o + (0.405412781615)*x[0] + (0.310057758693)*x[1]**o + (0.0812462237544)*x[1]
        ref[(2, 3, 3, 3)]=-0.613804765136*x_ref[0]**o + (0.405412781615)*x_ref[0] + (0.310057758693)*x_ref[1]**o + (0.0812462237544)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.657034472505*x[2]**o + (0.853190618136)*x[2]
            ref[(0, 0, 0, 0)]+=-0.657034472505*x_ref[2]**o + (0.853190618136)*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.925618651522*x[2]**o + (0.591830523701)*x[2]
            ref[(0, 0, 0, 1)]+=-0.925618651522*x_ref[2]**o + (0.591830523701)*x_ref[2]
            arg[(0, 0, 0, 2)]+=-0.971381393519*x[2]**o + (0.304141771916)*x[2]
            ref[(0, 0, 0, 2)]+=-0.971381393519*x_ref[2]**o + (0.304141771916)*x_ref[2]
            arg[(0, 0, 0, 3)]+=0.519485285899*x[2]**o + (0.240208866528)*x[2]
            ref[(0, 0, 0, 3)]+=0.519485285899*x_ref[2]**o + (0.240208866528)*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.0149334403706*x[2]**o + (-0.664577216354)*x[2]
            ref[(0, 0, 1, 0)]+=-0.0149334403706*x_ref[2]**o + (-0.664577216354)*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.491051015585*x[2]**o + (-0.979330934622)*x[2]
            ref[(0, 0, 1, 1)]+=0.491051015585*x_ref[2]**o + (-0.979330934622)*x_ref[2]
            arg[(0, 0, 1, 2)]+=0.639745269476*x[2]**o + (-0.533066774603)*x[2]
            ref[(0, 0, 1, 2)]+=0.639745269476*x_ref[2]**o + (-0.533066774603)*x_ref[2]
            arg[(0, 0, 1, 3)]+=0.526974125508*x[2]**o + (0.381453258762)*x[2]
            ref[(0, 0, 1, 3)]+=0.526974125508*x_ref[2]**o + (0.381453258762)*x_ref[2]
            arg[(0, 0, 2, 0)]+=0.559536949855*x[2]**o + (-0.24726270109)*x[2]
            ref[(0, 0, 2, 0)]+=0.559536949855*x_ref[2]**o + (-0.24726270109)*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.606855914195*x[2]**o + (0.963658386322)*x[2]
            ref[(0, 0, 2, 1)]+=0.606855914195*x_ref[2]**o + (0.963658386322)*x_ref[2]
            arg[(0, 0, 2, 2)]+=0.527166040374*x[2]**o + (0.76244072748)*x[2]
            ref[(0, 0, 2, 2)]+=0.527166040374*x_ref[2]**o + (0.76244072748)*x_ref[2]
            arg[(0, 0, 2, 3)]+=0.518265133858*x[2]**o + (0.311691964136)*x[2]
            ref[(0, 0, 2, 3)]+=0.518265133858*x_ref[2]**o + (0.311691964136)*x_ref[2]
            arg[(0, 0, 3, 0)]+=0.954652231017*x[2]**o + (-0.318361550337)*x[2]
            ref[(0, 0, 3, 0)]+=0.954652231017*x_ref[2]**o + (-0.318361550337)*x_ref[2]
            arg[(0, 0, 3, 1)]+=0.642743880538*x[2]**o + (-0.66202590884)*x[2]
            ref[(0, 0, 3, 1)]+=0.642743880538*x_ref[2]**o + (-0.66202590884)*x_ref[2]
            arg[(0, 0, 3, 2)]+=0.903650246494*x[2]**o + (-0.0150660699803)*x[2]
            ref[(0, 0, 3, 2)]+=0.903650246494*x_ref[2]**o + (-0.0150660699803)*x_ref[2]
            arg[(0, 0, 3, 3)]+=-0.303239519495*x[2]**o + (-0.621147039115)*x[2]
            ref[(0, 0, 3, 3)]+=-0.303239519495*x_ref[2]**o + (-0.621147039115)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.47536979621*x[2]**o + (-0.988344141007)*x[2]
            ref[(0, 1, 0, 0)]+=-0.47536979621*x_ref[2]**o + (-0.988344141007)*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.669336713757*x[2]**o + (-0.182428005568)*x[2]
            ref[(0, 1, 0, 1)]+=0.669336713757*x_ref[2]**o + (-0.182428005568)*x_ref[2]
            arg[(0, 1, 0, 2)]+=0.817105460025*x[2]**o + (-0.135480983344)*x[2]
            ref[(0, 1, 0, 2)]+=0.817105460025*x_ref[2]**o + (-0.135480983344)*x_ref[2]
            arg[(0, 1, 0, 3)]+=0.995801736334*x[2]**o + (-0.996255788671)*x[2]
            ref[(0, 1, 0, 3)]+=0.995801736334*x_ref[2]**o + (-0.996255788671)*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.197539141155*x[2]**o + (-0.353097160072)*x[2]
            ref[(0, 1, 1, 0)]+=0.197539141155*x_ref[2]**o + (-0.353097160072)*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.803472086127*x[2]**o + (-0.675196291167)*x[2]
            ref[(0, 1, 1, 1)]+=-0.803472086127*x_ref[2]**o + (-0.675196291167)*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.950624743308*x[2]**o + (0.545018310511)*x[2]
            ref[(0, 1, 1, 2)]+=0.950624743308*x_ref[2]**o + (0.545018310511)*x_ref[2]
            arg[(0, 1, 1, 3)]+=-0.0933827651638*x[2]**o + (0.708890779072)*x[2]
            ref[(0, 1, 1, 3)]+=-0.0933827651638*x_ref[2]**o + (0.708890779072)*x_ref[2]
            arg[(0, 1, 2, 0)]+=0.321933537538*x[2]**o + (-0.315886743903)*x[2]
            ref[(0, 1, 2, 0)]+=0.321933537538*x_ref[2]**o + (-0.315886743903)*x_ref[2]
            arg[(0, 1, 2, 1)]+=0.218174316436*x[2]**o + (-0.997767739032)*x[2]
            ref[(0, 1, 2, 1)]+=0.218174316436*x_ref[2]**o + (-0.997767739032)*x_ref[2]
            arg[(0, 1, 2, 2)]+=-0.849962588074*x[2]**o + (-0.662122588489)*x[2]
            ref[(0, 1, 2, 2)]+=-0.849962588074*x_ref[2]**o + (-0.662122588489)*x_ref[2]
            arg[(0, 1, 2, 3)]+=-0.226160427998*x[2]**o + (-0.722257633176)*x[2]
            ref[(0, 1, 2, 3)]+=-0.226160427998*x_ref[2]**o + (-0.722257633176)*x_ref[2]
            arg[(0, 1, 3, 0)]+=-0.613265790641*x[2]**o + (-0.893203577439)*x[2]
            ref[(0, 1, 3, 0)]+=-0.613265790641*x_ref[2]**o + (-0.893203577439)*x_ref[2]
            arg[(0, 1, 3, 1)]+=-0.317678483177*x[2]**o + (-0.935382160542)*x[2]
            ref[(0, 1, 3, 1)]+=-0.317678483177*x_ref[2]**o + (-0.935382160542)*x_ref[2]
            arg[(0, 1, 3, 2)]+=-0.861860140665*x[2]**o + (0.624578303584)*x[2]
            ref[(0, 1, 3, 2)]+=-0.861860140665*x_ref[2]**o + (0.624578303584)*x_ref[2]
            arg[(0, 1, 3, 3)]+=0.261710637373*x[2]**o + (-0.742117874001)*x[2]
            ref[(0, 1, 3, 3)]+=0.261710637373*x_ref[2]**o + (-0.742117874001)*x_ref[2]
            arg[(0, 2, 0, 0)]+=-0.592395440352*x[2]**o + (0.0701242926385)*x[2]
            ref[(0, 2, 0, 0)]+=-0.592395440352*x_ref[2]**o + (0.0701242926385)*x_ref[2]
            arg[(0, 2, 0, 1)]+=0.81248553476*x[2]**o + (0.261899512451)*x[2]
            ref[(0, 2, 0, 1)]+=0.81248553476*x_ref[2]**o + (0.261899512451)*x_ref[2]
            arg[(0, 2, 0, 2)]+=-0.230906908005*x[2]**o + (0.534112384261)*x[2]
            ref[(0, 2, 0, 2)]+=-0.230906908005*x_ref[2]**o + (0.534112384261)*x_ref[2]
            arg[(0, 2, 0, 3)]+=-0.991904350592*x[2]**o + (-0.0398819604001)*x[2]
            ref[(0, 2, 0, 3)]+=-0.991904350592*x_ref[2]**o + (-0.0398819604001)*x_ref[2]
            arg[(0, 2, 1, 0)]+=-0.891223534284*x[2]**o + (0.749992498587)*x[2]
            ref[(0, 2, 1, 0)]+=-0.891223534284*x_ref[2]**o + (0.749992498587)*x_ref[2]
            arg[(0, 2, 1, 1)]+=0.187005215223*x[2]**o + (-0.479028032092)*x[2]
            ref[(0, 2, 1, 1)]+=0.187005215223*x_ref[2]**o + (-0.479028032092)*x_ref[2]
            arg[(0, 2, 1, 2)]+=-0.467235649047*x[2]**o + (0.0710181228431)*x[2]
            ref[(0, 2, 1, 2)]+=-0.467235649047*x_ref[2]**o + (0.0710181228431)*x_ref[2]
            arg[(0, 2, 1, 3)]+=-0.446140296257*x[2]**o + (0.800210705911)*x[2]
            ref[(0, 2, 1, 3)]+=-0.446140296257*x_ref[2]**o + (0.800210705911)*x_ref[2]
            arg[(0, 2, 2, 0)]+=-0.583760833952*x[2]**o + (0.471828019035)*x[2]
            ref[(0, 2, 2, 0)]+=-0.583760833952*x_ref[2]**o + (0.471828019035)*x_ref[2]
            arg[(0, 2, 2, 1)]+=-0.870938177624*x[2]**o + (-0.82752112032)*x[2]
            ref[(0, 2, 2, 1)]+=-0.870938177624*x_ref[2]**o + (-0.82752112032)*x_ref[2]
            arg[(0, 2, 2, 2)]+=-0.875676358945*x[2]**o + (-0.974124821883)*x[2]
            ref[(0, 2, 2, 2)]+=-0.875676358945*x_ref[2]**o + (-0.974124821883)*x_ref[2]
            arg[(0, 2, 2, 3)]+=-0.316305341576*x[2]**o + (0.124650256541)*x[2]
            ref[(0, 2, 2, 3)]+=-0.316305341576*x_ref[2]**o + (0.124650256541)*x_ref[2]
            arg[(0, 2, 3, 0)]+=-0.81733739483*x[2]**o + (0.827779916032)*x[2]
            ref[(0, 2, 3, 0)]+=-0.81733739483*x_ref[2]**o + (0.827779916032)*x_ref[2]
            arg[(0, 2, 3, 1)]+=0.0410135470828*x[2]**o + (-0.932417742569)*x[2]
            ref[(0, 2, 3, 1)]+=0.0410135470828*x_ref[2]**o + (-0.932417742569)*x_ref[2]
            arg[(0, 2, 3, 2)]+=-0.808600965073*x[2]**o + (-0.399599616677)*x[2]
            ref[(0, 2, 3, 2)]+=-0.808600965073*x_ref[2]**o + (-0.399599616677)*x_ref[2]
            arg[(0, 2, 3, 3)]+=-0.292354724338*x[2]**o + (-0.545091825531)*x[2]
            ref[(0, 2, 3, 3)]+=-0.292354724338*x_ref[2]**o + (-0.545091825531)*x_ref[2]
            arg[(0, 3, 0, 0)]+=0.84951142864*x[2]**o + (-0.113239816858)*x[2]
            ref[(0, 3, 0, 0)]+=0.84951142864*x_ref[2]**o + (-0.113239816858)*x_ref[2]
            arg[(0, 3, 0, 1)]+=-0.643843413213*x[2]**o + (0.670450612981)*x[2]
            ref[(0, 3, 0, 1)]+=-0.643843413213*x_ref[2]**o + (0.670450612981)*x_ref[2]
            arg[(0, 3, 0, 2)]+=-0.478205387879*x[2]**o + (0.925163498948)*x[2]
            ref[(0, 3, 0, 2)]+=-0.478205387879*x_ref[2]**o + (0.925163498948)*x_ref[2]
            arg[(0, 3, 0, 3)]+=0.393575547059*x[2]**o + (0.64153121543)*x[2]
            ref[(0, 3, 0, 3)]+=0.393575547059*x_ref[2]**o + (0.64153121543)*x_ref[2]
            arg[(0, 3, 1, 0)]+=0.266003116726*x[2]**o + (-0.841560246169)*x[2]
            ref[(0, 3, 1, 0)]+=0.266003116726*x_ref[2]**o + (-0.841560246169)*x_ref[2]
            arg[(0, 3, 1, 1)]+=-0.23589901928*x[2]**o + (0.604280049277)*x[2]
            ref[(0, 3, 1, 1)]+=-0.23589901928*x_ref[2]**o + (0.604280049277)*x_ref[2]
            arg[(0, 3, 1, 2)]+=0.931367396382*x[2]**o + (0.460122439921)*x[2]
            ref[(0, 3, 1, 2)]+=0.931367396382*x_ref[2]**o + (0.460122439921)*x_ref[2]
            arg[(0, 3, 1, 3)]+=-0.604448476425*x[2]**o + (0.13733565795)*x[2]
            ref[(0, 3, 1, 3)]+=-0.604448476425*x_ref[2]**o + (0.13733565795)*x_ref[2]
            arg[(0, 3, 2, 0)]+=0.449087086775*x[2]**o + (0.805312988963)*x[2]
            ref[(0, 3, 2, 0)]+=0.449087086775*x_ref[2]**o + (0.805312988963)*x_ref[2]
            arg[(0, 3, 2, 1)]+=-0.423472433572*x[2]**o + (0.96957553984)*x[2]
            ref[(0, 3, 2, 1)]+=-0.423472433572*x_ref[2]**o + (0.96957553984)*x_ref[2]
            arg[(0, 3, 2, 2)]+=-0.983303678656*x[2]**o + (0.905337218013)*x[2]
            ref[(0, 3, 2, 2)]+=-0.983303678656*x_ref[2]**o + (0.905337218013)*x_ref[2]
            arg[(0, 3, 2, 3)]+=-0.0512051016712*x[2]**o + (-0.066616002295)*x[2]
            ref[(0, 3, 2, 3)]+=-0.0512051016712*x_ref[2]**o + (-0.066616002295)*x_ref[2]
            arg[(0, 3, 3, 0)]+=-0.126581653526*x[2]**o + (-0.361862590145)*x[2]
            ref[(0, 3, 3, 0)]+=-0.126581653526*x_ref[2]**o + (-0.361862590145)*x_ref[2]
            arg[(0, 3, 3, 1)]+=0.829907789824*x[2]**o + (-0.286076323518)*x[2]
            ref[(0, 3, 3, 1)]+=0.829907789824*x_ref[2]**o + (-0.286076323518)*x_ref[2]
            arg[(0, 3, 3, 2)]+=0.184717114885*x[2]**o + (0.741778322628)*x[2]
            ref[(0, 3, 3, 2)]+=0.184717114885*x_ref[2]**o + (0.741778322628)*x_ref[2]
            arg[(0, 3, 3, 3)]+=-0.333087958558*x[2]**o + (0.0692420412278)*x[2]
            ref[(0, 3, 3, 3)]+=-0.333087958558*x_ref[2]**o + (0.0692420412278)*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.460608444902*x[2]**o + (0.160811690407)*x[2]
            ref[(1, 0, 0, 0)]+=-0.460608444902*x_ref[2]**o + (0.160811690407)*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.307413992219*x[2]**o + (0.202201027499)*x[2]
            ref[(1, 0, 0, 1)]+=0.307413992219*x_ref[2]**o + (0.202201027499)*x_ref[2]
            arg[(1, 0, 0, 2)]+=0.109708875384*x[2]**o + (-0.635187260999)*x[2]
            ref[(1, 0, 0, 2)]+=0.109708875384*x_ref[2]**o + (-0.635187260999)*x_ref[2]
            arg[(1, 0, 0, 3)]+=0.737045899042*x[2]**o + (-0.345773972199)*x[2]
            ref[(1, 0, 0, 3)]+=0.737045899042*x_ref[2]**o + (-0.345773972199)*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.328214922776*x[2]**o + (0.35681689828)*x[2]
            ref[(1, 0, 1, 0)]+=-0.328214922776*x_ref[2]**o + (0.35681689828)*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.32516039978*x[2]**o + (-0.490816852498)*x[2]
            ref[(1, 0, 1, 1)]+=0.32516039978*x_ref[2]**o + (-0.490816852498)*x_ref[2]
            arg[(1, 0, 1, 2)]+=-0.158408582753*x[2]**o + (-0.337990950635)*x[2]
            ref[(1, 0, 1, 2)]+=-0.158408582753*x_ref[2]**o + (-0.337990950635)*x_ref[2]
            arg[(1, 0, 1, 3)]+=-0.305555023234*x[2]**o + (-0.94285111071)*x[2]
            ref[(1, 0, 1, 3)]+=-0.305555023234*x_ref[2]**o + (-0.94285111071)*x_ref[2]
            arg[(1, 0, 2, 0)]+=0.371874037231*x[2]**o + (0.883681444168)*x[2]
            ref[(1, 0, 2, 0)]+=0.371874037231*x_ref[2]**o + (0.883681444168)*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.615543057993*x[2]**o + (-0.696656708787)*x[2]
            ref[(1, 0, 2, 1)]+=0.615543057993*x_ref[2]**o + (-0.696656708787)*x_ref[2]
            arg[(1, 0, 2, 2)]+=0.201250791185*x[2]**o + (-0.503536433569)*x[2]
            ref[(1, 0, 2, 2)]+=0.201250791185*x_ref[2]**o + (-0.503536433569)*x_ref[2]
            arg[(1, 0, 2, 3)]+=-0.536254669165*x[2]**o + (0.950471238588)*x[2]
            ref[(1, 0, 2, 3)]+=-0.536254669165*x_ref[2]**o + (0.950471238588)*x_ref[2]
            arg[(1, 0, 3, 0)]+=-0.110200226159*x[2]**o + (0.648624333948)*x[2]
            ref[(1, 0, 3, 0)]+=-0.110200226159*x_ref[2]**o + (0.648624333948)*x_ref[2]
            arg[(1, 0, 3, 1)]+=0.86455568919*x[2]**o + (0.354913650373)*x[2]
            ref[(1, 0, 3, 1)]+=0.86455568919*x_ref[2]**o + (0.354913650373)*x_ref[2]
            arg[(1, 0, 3, 2)]+=0.95912401908*x[2]**o + (0.256796295699)*x[2]
            ref[(1, 0, 3, 2)]+=0.95912401908*x_ref[2]**o + (0.256796295699)*x_ref[2]
            arg[(1, 0, 3, 3)]+=-0.751461395334*x[2]**o + (0.498215653506)*x[2]
            ref[(1, 0, 3, 3)]+=-0.751461395334*x_ref[2]**o + (0.498215653506)*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.382677078045*x[2]**o + (-0.990442236689)*x[2]
            ref[(1, 1, 0, 0)]+=-0.382677078045*x_ref[2]**o + (-0.990442236689)*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.595920493699*x[2]**o + (-0.423092180018)*x[2]
            ref[(1, 1, 0, 1)]+=-0.595920493699*x_ref[2]**o + (-0.423092180018)*x_ref[2]
            arg[(1, 1, 0, 2)]+=-0.945780281178*x[2]**o + (0.990835287031)*x[2]
            ref[(1, 1, 0, 2)]+=-0.945780281178*x_ref[2]**o + (0.990835287031)*x_ref[2]
            arg[(1, 1, 0, 3)]+=0.894070938939*x[2]**o + (-0.0965804986129)*x[2]
            ref[(1, 1, 0, 3)]+=0.894070938939*x_ref[2]**o + (-0.0965804986129)*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.0513314869477*x[2]**o + (-0.816073927646)*x[2]
            ref[(1, 1, 1, 0)]+=0.0513314869477*x_ref[2]**o + (-0.816073927646)*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.555741977803*x[2]**o + (-0.719460071758)*x[2]
            ref[(1, 1, 1, 1)]+=0.555741977803*x_ref[2]**o + (-0.719460071758)*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.0948346067619*x[2]**o + (0.923513684512)*x[2]
            ref[(1, 1, 1, 2)]+=-0.0948346067619*x_ref[2]**o + (0.923513684512)*x_ref[2]
            arg[(1, 1, 1, 3)]+=-0.556622953226*x[2]**o + (-0.543724957665)*x[2]
            ref[(1, 1, 1, 3)]+=-0.556622953226*x_ref[2]**o + (-0.543724957665)*x_ref[2]
            arg[(1, 1, 2, 0)]+=0.584584840274*x[2]**o + (0.0204843131094)*x[2]
            ref[(1, 1, 2, 0)]+=0.584584840274*x_ref[2]**o + (0.0204843131094)*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.10427955376*x[2]**o + (0.149447744258)*x[2]
            ref[(1, 1, 2, 1)]+=0.10427955376*x_ref[2]**o + (0.149447744258)*x_ref[2]
            arg[(1, 1, 2, 2)]+=0.389325076908*x[2]**o + (0.263042149992)*x[2]
            ref[(1, 1, 2, 2)]+=0.389325076908*x_ref[2]**o + (0.263042149992)*x_ref[2]
            arg[(1, 1, 2, 3)]+=0.637682398511*x[2]**o + (-0.289126383107)*x[2]
            ref[(1, 1, 2, 3)]+=0.637682398511*x_ref[2]**o + (-0.289126383107)*x_ref[2]
            arg[(1, 1, 3, 0)]+=0.280875696746*x[2]**o + (0.480328431451)*x[2]
            ref[(1, 1, 3, 0)]+=0.280875696746*x_ref[2]**o + (0.480328431451)*x_ref[2]
            arg[(1, 1, 3, 1)]+=0.935042296044*x[2]**o + (-0.556776484603)*x[2]
            ref[(1, 1, 3, 1)]+=0.935042296044*x_ref[2]**o + (-0.556776484603)*x_ref[2]
            arg[(1, 1, 3, 2)]+=0.432447087532*x[2]**o + (-0.563950814688)*x[2]
            ref[(1, 1, 3, 2)]+=0.432447087532*x_ref[2]**o + (-0.563950814688)*x_ref[2]
            arg[(1, 1, 3, 3)]+=0.188444012361*x[2]**o + (-0.0939651313849)*x[2]
            ref[(1, 1, 3, 3)]+=0.188444012361*x_ref[2]**o + (-0.0939651313849)*x_ref[2]
            arg[(1, 2, 0, 0)]+=-0.823588532984*x[2]**o + (0.371111637483)*x[2]
            ref[(1, 2, 0, 0)]+=-0.823588532984*x_ref[2]**o + (0.371111637483)*x_ref[2]
            arg[(1, 2, 0, 1)]+=-0.555378900233*x[2]**o + (-0.491730436285)*x[2]
            ref[(1, 2, 0, 1)]+=-0.555378900233*x_ref[2]**o + (-0.491730436285)*x_ref[2]
            arg[(1, 2, 0, 2)]+=-0.47326242887*x[2]**o + (0.419947415297)*x[2]
            ref[(1, 2, 0, 2)]+=-0.47326242887*x_ref[2]**o + (0.419947415297)*x_ref[2]
            arg[(1, 2, 0, 3)]+=0.662817426653*x[2]**o + (0.134546209148)*x[2]
            ref[(1, 2, 0, 3)]+=0.662817426653*x_ref[2]**o + (0.134546209148)*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.993027902957*x[2]**o + (0.687584883807)*x[2]
            ref[(1, 2, 1, 0)]+=0.993027902957*x_ref[2]**o + (0.687584883807)*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.912543862425*x[2]**o + (0.224775264814)*x[2]
            ref[(1, 2, 1, 1)]+=0.912543862425*x_ref[2]**o + (0.224775264814)*x_ref[2]
            arg[(1, 2, 1, 2)]+=-0.417121307595*x[2]**o + (-0.718317333862)*x[2]
            ref[(1, 2, 1, 2)]+=-0.417121307595*x_ref[2]**o + (-0.718317333862)*x_ref[2]
            arg[(1, 2, 1, 3)]+=0.25267896825*x[2]**o + (-0.419517112077)*x[2]
            ref[(1, 2, 1, 3)]+=0.25267896825*x_ref[2]**o + (-0.419517112077)*x_ref[2]
            arg[(1, 2, 2, 0)]+=0.589454762992*x[2]**o + (-0.185637471949)*x[2]
            ref[(1, 2, 2, 0)]+=0.589454762992*x_ref[2]**o + (-0.185637471949)*x_ref[2]
            arg[(1, 2, 2, 1)]+=-0.227576462957*x[2]**o + (-0.957661232336)*x[2]
            ref[(1, 2, 2, 1)]+=-0.227576462957*x_ref[2]**o + (-0.957661232336)*x_ref[2]
            arg[(1, 2, 2, 2)]+=0.0208888101161*x[2]**o + (0.55379831044)*x[2]
            ref[(1, 2, 2, 2)]+=0.0208888101161*x_ref[2]**o + (0.55379831044)*x_ref[2]
            arg[(1, 2, 2, 3)]+=-0.798209064725*x[2]**o + (0.0963217871841)*x[2]
            ref[(1, 2, 2, 3)]+=-0.798209064725*x_ref[2]**o + (0.0963217871841)*x_ref[2]
            arg[(1, 2, 3, 0)]+=0.731204208071*x[2]**o + (0.345597190052)*x[2]
            ref[(1, 2, 3, 0)]+=0.731204208071*x_ref[2]**o + (0.345597190052)*x_ref[2]
            arg[(1, 2, 3, 1)]+=-0.859478720083*x[2]**o + (-0.604793718277)*x[2]
            ref[(1, 2, 3, 1)]+=-0.859478720083*x_ref[2]**o + (-0.604793718277)*x_ref[2]
            arg[(1, 2, 3, 2)]+=0.312317522148*x[2]**o + (-0.966711334564)*x[2]
            ref[(1, 2, 3, 2)]+=0.312317522148*x_ref[2]**o + (-0.966711334564)*x_ref[2]
            arg[(1, 2, 3, 3)]+=-0.236052881872*x[2]**o + (-0.336591088693)*x[2]
            ref[(1, 2, 3, 3)]+=-0.236052881872*x_ref[2]**o + (-0.336591088693)*x_ref[2]
            arg[(1, 3, 0, 0)]+=0.227992183122*x[2]**o + (0.154393915724)*x[2]
            ref[(1, 3, 0, 0)]+=0.227992183122*x_ref[2]**o + (0.154393915724)*x_ref[2]
            arg[(1, 3, 0, 1)]+=-0.361223510459*x[2]**o + (-0.200976512562)*x[2]
            ref[(1, 3, 0, 1)]+=-0.361223510459*x_ref[2]**o + (-0.200976512562)*x_ref[2]
            arg[(1, 3, 0, 2)]+=-0.0408791458787*x[2]**o + (-0.0120148801222)*x[2]
            ref[(1, 3, 0, 2)]+=-0.0408791458787*x_ref[2]**o + (-0.0120148801222)*x_ref[2]
            arg[(1, 3, 0, 3)]+=-0.194638328545*x[2]**o + (-0.681293592342)*x[2]
            ref[(1, 3, 0, 3)]+=-0.194638328545*x_ref[2]**o + (-0.681293592342)*x_ref[2]
            arg[(1, 3, 1, 0)]+=-0.124197228015*x[2]**o + (-0.950547056904)*x[2]
            ref[(1, 3, 1, 0)]+=-0.124197228015*x_ref[2]**o + (-0.950547056904)*x_ref[2]
            arg[(1, 3, 1, 1)]+=-0.823670250479*x[2]**o + (0.847554999803)*x[2]
            ref[(1, 3, 1, 1)]+=-0.823670250479*x_ref[2]**o + (0.847554999803)*x_ref[2]
            arg[(1, 3, 1, 2)]+=-0.0285670055231*x[2]**o + (-0.586089715385)*x[2]
            ref[(1, 3, 1, 2)]+=-0.0285670055231*x_ref[2]**o + (-0.586089715385)*x_ref[2]
            arg[(1, 3, 1, 3)]+=0.596560615379*x[2]**o + (-0.468369629948)*x[2]
            ref[(1, 3, 1, 3)]+=0.596560615379*x_ref[2]**o + (-0.468369629948)*x_ref[2]
            arg[(1, 3, 2, 0)]+=0.809902124543*x[2]**o + (0.787847266785)*x[2]
            ref[(1, 3, 2, 0)]+=0.809902124543*x_ref[2]**o + (0.787847266785)*x_ref[2]
            arg[(1, 3, 2, 1)]+=0.379729568251*x[2]**o + (0.127913339745)*x[2]
            ref[(1, 3, 2, 1)]+=0.379729568251*x_ref[2]**o + (0.127913339745)*x_ref[2]
            arg[(1, 3, 2, 2)]+=0.962037989782*x[2]**o + (0.340863835577)*x[2]
            ref[(1, 3, 2, 2)]+=0.962037989782*x_ref[2]**o + (0.340863835577)*x_ref[2]
            arg[(1, 3, 2, 3)]+=-0.562312734596*x[2]**o + (-0.395342336496)*x[2]
            ref[(1, 3, 2, 3)]+=-0.562312734596*x_ref[2]**o + (-0.395342336496)*x_ref[2]
            arg[(1, 3, 3, 0)]+=-0.950894191579*x[2]**o + (-0.740424423944)*x[2]
            ref[(1, 3, 3, 0)]+=-0.950894191579*x_ref[2]**o + (-0.740424423944)*x_ref[2]
            arg[(1, 3, 3, 1)]+=0.299429314431*x[2]**o + (-0.808985203743)*x[2]
            ref[(1, 3, 3, 1)]+=0.299429314431*x_ref[2]**o + (-0.808985203743)*x_ref[2]
            arg[(1, 3, 3, 2)]+=0.47574401747*x[2]**o + (0.249299490023)*x[2]
            ref[(1, 3, 3, 2)]+=0.47574401747*x_ref[2]**o + (0.249299490023)*x_ref[2]
            arg[(1, 3, 3, 3)]+=-0.0182524519699*x[2]**o + (0.489417111578)*x[2]
            ref[(1, 3, 3, 3)]+=-0.0182524519699*x_ref[2]**o + (0.489417111578)*x_ref[2]
            arg[(2, 0, 0, 0)]+=0.834876093407*x[2]**o + (-0.480099341106)*x[2]
            ref[(2, 0, 0, 0)]+=0.834876093407*x_ref[2]**o + (-0.480099341106)*x_ref[2]
            arg[(2, 0, 0, 1)]+=0.513063371188*x[2]**o + (-0.384150490189)*x[2]
            ref[(2, 0, 0, 1)]+=0.513063371188*x_ref[2]**o + (-0.384150490189)*x_ref[2]
            arg[(2, 0, 0, 2)]+=-0.88615404385*x[2]**o + (-0.169890943427)*x[2]
            ref[(2, 0, 0, 2)]+=-0.88615404385*x_ref[2]**o + (-0.169890943427)*x_ref[2]
            arg[(2, 0, 0, 3)]+=-0.241900833509*x[2]**o + (0.977576088085)*x[2]
            ref[(2, 0, 0, 3)]+=-0.241900833509*x_ref[2]**o + (0.977576088085)*x_ref[2]
            arg[(2, 0, 1, 0)]+=0.213180294543*x[2]**o + (-0.760803499988)*x[2]
            ref[(2, 0, 1, 0)]+=0.213180294543*x_ref[2]**o + (-0.760803499988)*x_ref[2]
            arg[(2, 0, 1, 1)]+=-0.160156845506*x[2]**o + (0.871876553156)*x[2]
            ref[(2, 0, 1, 1)]+=-0.160156845506*x_ref[2]**o + (0.871876553156)*x_ref[2]
            arg[(2, 0, 1, 2)]+=0.594362987033*x[2]**o + (0.661354910568)*x[2]
            ref[(2, 0, 1, 2)]+=0.594362987033*x_ref[2]**o + (0.661354910568)*x_ref[2]
            arg[(2, 0, 1, 3)]+=0.131781615873*x[2]**o + (-0.136884755127)*x[2]
            ref[(2, 0, 1, 3)]+=0.131781615873*x_ref[2]**o + (-0.136884755127)*x_ref[2]
            arg[(2, 0, 2, 0)]+=0.377740723464*x[2]**o + (-0.472376620996)*x[2]
            ref[(2, 0, 2, 0)]+=0.377740723464*x_ref[2]**o + (-0.472376620996)*x_ref[2]
            arg[(2, 0, 2, 1)]+=-0.505286650219*x[2]**o + (-0.883284220841)*x[2]
            ref[(2, 0, 2, 1)]+=-0.505286650219*x_ref[2]**o + (-0.883284220841)*x_ref[2]
            arg[(2, 0, 2, 2)]+=-0.315122455535*x[2]**o + (-0.234531891623)*x[2]
            ref[(2, 0, 2, 2)]+=-0.315122455535*x_ref[2]**o + (-0.234531891623)*x_ref[2]
            arg[(2, 0, 2, 3)]+=0.658998752713*x[2]**o + (-0.823277928827)*x[2]
            ref[(2, 0, 2, 3)]+=0.658998752713*x_ref[2]**o + (-0.823277928827)*x_ref[2]
            arg[(2, 0, 3, 0)]+=0.993023603359*x[2]**o + (-0.660142607824)*x[2]
            ref[(2, 0, 3, 0)]+=0.993023603359*x_ref[2]**o + (-0.660142607824)*x_ref[2]
            arg[(2, 0, 3, 1)]+=0.331774715005*x[2]**o + (-0.862659323311)*x[2]
            ref[(2, 0, 3, 1)]+=0.331774715005*x_ref[2]**o + (-0.862659323311)*x_ref[2]
            arg[(2, 0, 3, 2)]+=-0.599947715037*x[2]**o + (0.735697957931)*x[2]
            ref[(2, 0, 3, 2)]+=-0.599947715037*x_ref[2]**o + (0.735697957931)*x_ref[2]
            arg[(2, 0, 3, 3)]+=-0.329099193458*x[2]**o + (0.970407723659)*x[2]
            ref[(2, 0, 3, 3)]+=-0.329099193458*x_ref[2]**o + (0.970407723659)*x_ref[2]
            arg[(2, 1, 0, 0)]+=-0.729167569338*x[2]**o + (-0.562405533763)*x[2]
            ref[(2, 1, 0, 0)]+=-0.729167569338*x_ref[2]**o + (-0.562405533763)*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.441214225054*x[2]**o + (0.0195638477347)*x[2]
            ref[(2, 1, 0, 1)]+=-0.441214225054*x_ref[2]**o + (0.0195638477347)*x_ref[2]
            arg[(2, 1, 0, 2)]+=0.223828489798*x[2]**o + (0.945069062757)*x[2]
            ref[(2, 1, 0, 2)]+=0.223828489798*x_ref[2]**o + (0.945069062757)*x_ref[2]
            arg[(2, 1, 0, 3)]+=-0.990020607309*x[2]**o + (-0.98463254204)*x[2]
            ref[(2, 1, 0, 3)]+=-0.990020607309*x_ref[2]**o + (-0.98463254204)*x_ref[2]
            arg[(2, 1, 1, 0)]+=-0.0486665604023*x[2]**o + (0.9498730497)*x[2]
            ref[(2, 1, 1, 0)]+=-0.0486665604023*x_ref[2]**o + (0.9498730497)*x_ref[2]
            arg[(2, 1, 1, 1)]+=0.63620611016*x[2]**o + (0.164929131841)*x[2]
            ref[(2, 1, 1, 1)]+=0.63620611016*x_ref[2]**o + (0.164929131841)*x_ref[2]
            arg[(2, 1, 1, 2)]+=-0.508086924172*x[2]**o + (0.497214665742)*x[2]
            ref[(2, 1, 1, 2)]+=-0.508086924172*x_ref[2]**o + (0.497214665742)*x_ref[2]
            arg[(2, 1, 1, 3)]+=0.85721412071*x[2]**o + (-0.882873256768)*x[2]
            ref[(2, 1, 1, 3)]+=0.85721412071*x_ref[2]**o + (-0.882873256768)*x_ref[2]
            arg[(2, 1, 2, 0)]+=0.586799014044*x[2]**o + (-0.383266956518)*x[2]
            ref[(2, 1, 2, 0)]+=0.586799014044*x_ref[2]**o + (-0.383266956518)*x_ref[2]
            arg[(2, 1, 2, 1)]+=0.667127088148*x[2]**o + (0.514571646269)*x[2]
            ref[(2, 1, 2, 1)]+=0.667127088148*x_ref[2]**o + (0.514571646269)*x_ref[2]
            arg[(2, 1, 2, 2)]+=-0.159934520322*x[2]**o + (-0.359400181229)*x[2]
            ref[(2, 1, 2, 2)]+=-0.159934520322*x_ref[2]**o + (-0.359400181229)*x_ref[2]
            arg[(2, 1, 2, 3)]+=-0.250923287327*x[2]**o + (-0.249745464924)*x[2]
            ref[(2, 1, 2, 3)]+=-0.250923287327*x_ref[2]**o + (-0.249745464924)*x_ref[2]
            arg[(2, 1, 3, 0)]+=0.525340671161*x[2]**o + (-0.817866494564)*x[2]
            ref[(2, 1, 3, 0)]+=0.525340671161*x_ref[2]**o + (-0.817866494564)*x_ref[2]
            arg[(2, 1, 3, 1)]+=0.693619807151*x[2]**o + (-0.196960647299)*x[2]
            ref[(2, 1, 3, 1)]+=0.693619807151*x_ref[2]**o + (-0.196960647299)*x_ref[2]
            arg[(2, 1, 3, 2)]+=0.681495553017*x[2]**o + (0.107970732343)*x[2]
            ref[(2, 1, 3, 2)]+=0.681495553017*x_ref[2]**o + (0.107970732343)*x_ref[2]
            arg[(2, 1, 3, 3)]+=0.981544697477*x[2]**o + (0.596377142159)*x[2]
            ref[(2, 1, 3, 3)]+=0.981544697477*x_ref[2]**o + (0.596377142159)*x_ref[2]
            arg[(2, 2, 0, 0)]+=-0.88726318531*x[2]**o + (-0.555402321796)*x[2]
            ref[(2, 2, 0, 0)]+=-0.88726318531*x_ref[2]**o + (-0.555402321796)*x_ref[2]
            arg[(2, 2, 0, 1)]+=0.202440961856*x[2]**o + (0.511674331742)*x[2]
            ref[(2, 2, 0, 1)]+=0.202440961856*x_ref[2]**o + (0.511674331742)*x_ref[2]
            arg[(2, 2, 0, 2)]+=-0.191869542668*x[2]**o + (-0.612220161707)*x[2]
            ref[(2, 2, 0, 2)]+=-0.191869542668*x_ref[2]**o + (-0.612220161707)*x_ref[2]
            arg[(2, 2, 0, 3)]+=0.948943556909*x[2]**o + (-0.917784155677)*x[2]
            ref[(2, 2, 0, 3)]+=0.948943556909*x_ref[2]**o + (-0.917784155677)*x_ref[2]
            arg[(2, 2, 1, 0)]+=0.0802011735128*x[2]**o + (-0.150274834765)*x[2]
            ref[(2, 2, 1, 0)]+=0.0802011735128*x_ref[2]**o + (-0.150274834765)*x_ref[2]
            arg[(2, 2, 1, 1)]+=-0.413900657098*x[2]**o + (-0.671577976252)*x[2]
            ref[(2, 2, 1, 1)]+=-0.413900657098*x_ref[2]**o + (-0.671577976252)*x_ref[2]
            arg[(2, 2, 1, 2)]+=0.716105274591*x[2]**o + (-0.669753788763)*x[2]
            ref[(2, 2, 1, 2)]+=0.716105274591*x_ref[2]**o + (-0.669753788763)*x_ref[2]
            arg[(2, 2, 1, 3)]+=-0.535001851673*x[2]**o + (0.71727992699)*x[2]
            ref[(2, 2, 1, 3)]+=-0.535001851673*x_ref[2]**o + (0.71727992699)*x_ref[2]
            arg[(2, 2, 2, 0)]+=0.542948233115*x[2]**o + (-0.460775929169)*x[2]
            ref[(2, 2, 2, 0)]+=0.542948233115*x_ref[2]**o + (-0.460775929169)*x_ref[2]
            arg[(2, 2, 2, 1)]+=-0.381165742527*x[2]**o + (0.127646753938)*x[2]
            ref[(2, 2, 2, 1)]+=-0.381165742527*x_ref[2]**o + (0.127646753938)*x_ref[2]
            arg[(2, 2, 2, 2)]+=0.827773718966*x[2]**o + (0.577079658786)*x[2]
            ref[(2, 2, 2, 2)]+=0.827773718966*x_ref[2]**o + (0.577079658786)*x_ref[2]
            arg[(2, 2, 2, 3)]+=-0.196792152143*x[2]**o + (0.229241121335)*x[2]
            ref[(2, 2, 2, 3)]+=-0.196792152143*x_ref[2]**o + (0.229241121335)*x_ref[2]
            arg[(2, 2, 3, 0)]+=-0.55805246338*x[2]**o + (0.293199070085)*x[2]
            ref[(2, 2, 3, 0)]+=-0.55805246338*x_ref[2]**o + (0.293199070085)*x_ref[2]
            arg[(2, 2, 3, 1)]+=-0.0832044502323*x[2]**o + (0.598719337862)*x[2]
            ref[(2, 2, 3, 1)]+=-0.0832044502323*x_ref[2]**o + (0.598719337862)*x_ref[2]
            arg[(2, 2, 3, 2)]+=-0.487466651398*x[2]**o + (0.486546772957)*x[2]
            ref[(2, 2, 3, 2)]+=-0.487466651398*x_ref[2]**o + (0.486546772957)*x_ref[2]
            arg[(2, 2, 3, 3)]+=-0.683342191923*x[2]**o + (-0.470290112857)*x[2]
            ref[(2, 2, 3, 3)]+=-0.683342191923*x_ref[2]**o + (-0.470290112857)*x_ref[2]
            arg[(2, 3, 0, 0)]+=0.546849665288*x[2]**o + (-0.770349439616)*x[2]
            ref[(2, 3, 0, 0)]+=0.546849665288*x_ref[2]**o + (-0.770349439616)*x_ref[2]
            arg[(2, 3, 0, 1)]+=0.512261302237*x[2]**o + (0.864309675706)*x[2]
            ref[(2, 3, 0, 1)]+=0.512261302237*x_ref[2]**o + (0.864309675706)*x_ref[2]
            arg[(2, 3, 0, 2)]+=-0.11048558236*x[2]**o + (-0.656736216711)*x[2]
            ref[(2, 3, 0, 2)]+=-0.11048558236*x_ref[2]**o + (-0.656736216711)*x_ref[2]
            arg[(2, 3, 0, 3)]+=0.92806864318*x[2]**o + (-0.0921919075557)*x[2]
            ref[(2, 3, 0, 3)]+=0.92806864318*x_ref[2]**o + (-0.0921919075557)*x_ref[2]
            arg[(2, 3, 1, 0)]+=-0.236979374375*x[2]**o + (-0.355946293529)*x[2]
            ref[(2, 3, 1, 0)]+=-0.236979374375*x_ref[2]**o + (-0.355946293529)*x_ref[2]
            arg[(2, 3, 1, 1)]+=0.754174950689*x[2]**o + (0.230138522161)*x[2]
            ref[(2, 3, 1, 1)]+=0.754174950689*x_ref[2]**o + (0.230138522161)*x_ref[2]
            arg[(2, 3, 1, 2)]+=0.2257353468*x[2]**o + (0.202088270476)*x[2]
            ref[(2, 3, 1, 2)]+=0.2257353468*x_ref[2]**o + (0.202088270476)*x_ref[2]
            arg[(2, 3, 1, 3)]+=-0.0789913584486*x[2]**o + (0.894165223303)*x[2]
            ref[(2, 3, 1, 3)]+=-0.0789913584486*x_ref[2]**o + (0.894165223303)*x_ref[2]
            arg[(2, 3, 2, 0)]+=-0.522736846972*x[2]**o + (0.459726120354)*x[2]
            ref[(2, 3, 2, 0)]+=-0.522736846972*x_ref[2]**o + (0.459726120354)*x_ref[2]
            arg[(2, 3, 2, 1)]+=0.677558399432*x[2]**o + (0.127000006009)*x[2]
            ref[(2, 3, 2, 1)]+=0.677558399432*x_ref[2]**o + (0.127000006009)*x_ref[2]
            arg[(2, 3, 2, 2)]+=0.21817793209*x[2]**o + (-0.7283572888)*x[2]
            ref[(2, 3, 2, 2)]+=0.21817793209*x_ref[2]**o + (-0.7283572888)*x_ref[2]
            arg[(2, 3, 2, 3)]+=0.604669144747*x[2]**o + (0.960992564925)*x[2]
            ref[(2, 3, 2, 3)]+=0.604669144747*x_ref[2]**o + (0.960992564925)*x_ref[2]
            arg[(2, 3, 3, 0)]+=-0.860202972795*x[2]**o + (0.711128180996)*x[2]
            ref[(2, 3, 3, 0)]+=-0.860202972795*x_ref[2]**o + (0.711128180996)*x_ref[2]
            arg[(2, 3, 3, 1)]+=-0.230968581722*x[2]**o + (-0.125822337023)*x[2]
            ref[(2, 3, 3, 1)]+=-0.230968581722*x_ref[2]**o + (-0.125822337023)*x_ref[2]
            arg[(2, 3, 3, 2)]+=0.049067304035*x[2]**o + (-0.40538792632)*x[2]
            ref[(2, 3, 3, 2)]+=0.049067304035*x_ref[2]**o + (-0.40538792632)*x_ref[2]
            arg[(2, 3, 3, 3)]+=-0.203512178801*x[2]**o + (0.762608445114)*x[2]
            ref[(2, 3, 3, 3)]+=-0.203512178801*x_ref[2]**o + (0.762608445114)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ReducedSolution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.620240970198*x[0] + (0.437541053347)*x[1]
        ref=0.620240970198*x_ref[0] + (0.437541053347)*x_ref[1]
        if dim==3:
            arg+=(-0.187200644191)*x[2]
            ref+=(-0.187200644191)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ReducedSolution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=-0.0852943286191*x[0] + (-0.561457647693)*x[1]
        ref[(0,)]=-0.0852943286191*x_ref[0] + (-0.561457647693)*x_ref[1]
        arg[(1,)]=-0.198373934077*x[0] + (-0.671884198071)*x[1]
        ref[(1,)]=-0.198373934077*x_ref[0] + (-0.671884198071)*x_ref[1]
        arg[(2,)]=-0.680171319207*x[0] + (0.567999300239)*x[1]
        ref[(2,)]=-0.680171319207*x_ref[0] + (0.567999300239)*x_ref[1]
        arg[(3,)]=0.85492869272*x[0] + (0.335884883824)*x[1]
        ref[(3,)]=0.85492869272*x_ref[0] + (0.335884883824)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.149270017865*x[2]
            ref[(0,)]+=0.149270017865*x_ref[2]
            arg[(1,)]+=0.803061617812*x[2]
            ref[(1,)]+=0.803061617812*x_ref[2]
            arg[(2,)]+=0.347692011599*x[2]
            ref[(2,)]+=0.347692011599*x_ref[2]
            arg[(3,)]+=-0.853996764737*x[2]
            ref[(3,)]+=-0.853996764737*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ReducedSolution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref = Data(0,(2, 4),w_ref)
        arg[(0, 0)]=-0.825316029483*x[0] + (-0.233249342262)*x[1]
        ref[(0, 0)]=-0.825316029483*x_ref[0] + (-0.233249342262)*x_ref[1]
        arg[(0, 1)]=0.367221572847*x[0] + (0.100641698708)*x[1]
        ref[(0, 1)]=0.367221572847*x_ref[0] + (0.100641698708)*x_ref[1]
        arg[(0, 2)]=-0.0644984846137*x[0] + (0.902118111757)*x[1]
        ref[(0, 2)]=-0.0644984846137*x_ref[0] + (0.902118111757)*x_ref[1]
        arg[(0, 3)]=0.146223068446*x[0] + (0.744588388623)*x[1]
        ref[(0, 3)]=0.146223068446*x_ref[0] + (0.744588388623)*x_ref[1]
        arg[(1, 0)]=-0.768702009574*x[0] + (-0.54433381722)*x[1]
        ref[(1, 0)]=-0.768702009574*x_ref[0] + (-0.54433381722)*x_ref[1]
        arg[(1, 1)]=0.0153841163077*x[0] + (0.393261666122)*x[1]
        ref[(1, 1)]=0.0153841163077*x_ref[0] + (0.393261666122)*x_ref[1]
        arg[(1, 2)]=-0.122922853038*x[0] + (-0.134041108323)*x[1]
        ref[(1, 2)]=-0.122922853038*x_ref[0] + (-0.134041108323)*x_ref[1]
        arg[(1, 3)]=0.28330687095*x[0] + (0.229204936044)*x[1]
        ref[(1, 3)]=0.28330687095*x_ref[0] + (0.229204936044)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.15516156244*x[2]
            ref[(0, 0)]+=0.15516156244*x_ref[2]
            arg[(0, 1)]+=0.742491254535*x[2]
            ref[(0, 1)]+=0.742491254535*x_ref[2]
            arg[(0, 2)]+=-0.623244000655*x[2]
            ref[(0, 2)]+=-0.623244000655*x_ref[2]
            arg[(0, 3)]+=-0.381769238474*x[2]
            ref[(0, 3)]+=-0.381769238474*x_ref[2]
            arg[(1, 0)]+=-0.456537871818*x[2]
            ref[(1, 0)]+=-0.456537871818*x_ref[2]
            arg[(1, 1)]+=-0.549687792705*x[2]
            ref[(1, 1)]+=-0.549687792705*x_ref[2]
            arg[(1, 2)]+=0.418035651277*x[2]
            ref[(1, 2)]+=0.418035651277*x_ref[2]
            arg[(1, 3)]+=-0.145998069175*x[2]
            ref[(1, 3)]+=-0.145998069175*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ReducedSolution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 3),w)
        ref = Data(0,(4, 2, 3),w_ref)
        arg[(0, 0, 0)]=0.737472999921*x[0] + (0.62622536221)*x[1]
        ref[(0, 0, 0)]=0.737472999921*x_ref[0] + (0.62622536221)*x_ref[1]
        arg[(0, 0, 1)]=-0.176123518373*x[0] + (0.91262876839)*x[1]
        ref[(0, 0, 1)]=-0.176123518373*x_ref[0] + (0.91262876839)*x_ref[1]
        arg[(0, 0, 2)]=-0.173341332298*x[0] + (-0.011490085402)*x[1]
        ref[(0, 0, 2)]=-0.173341332298*x_ref[0] + (-0.011490085402)*x_ref[1]
        arg[(0, 1, 0)]=0.981635117133*x[0] + (0.747178904479)*x[1]
        ref[(0, 1, 0)]=0.981635117133*x_ref[0] + (0.747178904479)*x_ref[1]
        arg[(0, 1, 1)]=0.100241982396*x[0] + (0.661356691054)*x[1]
        ref[(0, 1, 1)]=0.100241982396*x_ref[0] + (0.661356691054)*x_ref[1]
        arg[(0, 1, 2)]=0.540248393188*x[0] + (-0.798090962226)*x[1]
        ref[(0, 1, 2)]=0.540248393188*x_ref[0] + (-0.798090962226)*x_ref[1]
        arg[(1, 0, 0)]=-0.230201915289*x[0] + (-0.194194469939)*x[1]
        ref[(1, 0, 0)]=-0.230201915289*x_ref[0] + (-0.194194469939)*x_ref[1]
        arg[(1, 0, 1)]=0.389355324944*x[0] + (-0.184559980201)*x[1]
        ref[(1, 0, 1)]=0.389355324944*x_ref[0] + (-0.184559980201)*x_ref[1]
        arg[(1, 0, 2)]=0.980460118465*x[0] + (0.96302184943)*x[1]
        ref[(1, 0, 2)]=0.980460118465*x_ref[0] + (0.96302184943)*x_ref[1]
        arg[(1, 1, 0)]=0.852311725382*x[0] + (0.52240721081)*x[1]
        ref[(1, 1, 0)]=0.852311725382*x_ref[0] + (0.52240721081)*x_ref[1]
        arg[(1, 1, 1)]=-0.639132509398*x[0] + (-0.344250214765)*x[1]
        ref[(1, 1, 1)]=-0.639132509398*x_ref[0] + (-0.344250214765)*x_ref[1]
        arg[(1, 1, 2)]=0.125623045043*x[0] + (0.404747782824)*x[1]
        ref[(1, 1, 2)]=0.125623045043*x_ref[0] + (0.404747782824)*x_ref[1]
        arg[(2, 0, 0)]=0.697960600237*x[0] + (-0.616449131792)*x[1]
        ref[(2, 0, 0)]=0.697960600237*x_ref[0] + (-0.616449131792)*x_ref[1]
        arg[(2, 0, 1)]=-0.036996716746*x[0] + (-0.251742462513)*x[1]
        ref[(2, 0, 1)]=-0.036996716746*x_ref[0] + (-0.251742462513)*x_ref[1]
        arg[(2, 0, 2)]=-0.92135577926*x[0] + (0.0257597599353)*x[1]
        ref[(2, 0, 2)]=-0.92135577926*x_ref[0] + (0.0257597599353)*x_ref[1]
        arg[(2, 1, 0)]=0.842775378822*x[0] + (0.837431800192)*x[1]
        ref[(2, 1, 0)]=0.842775378822*x_ref[0] + (0.837431800192)*x_ref[1]
        arg[(2, 1, 1)]=-0.153474829619*x[0] + (-0.253808008649)*x[1]
        ref[(2, 1, 1)]=-0.153474829619*x_ref[0] + (-0.253808008649)*x_ref[1]
        arg[(2, 1, 2)]=0.806842447066*x[0] + (-0.460646753952)*x[1]
        ref[(2, 1, 2)]=0.806842447066*x_ref[0] + (-0.460646753952)*x_ref[1]
        arg[(3, 0, 0)]=-0.284816018855*x[0] + (-0.89311162533)*x[1]
        ref[(3, 0, 0)]=-0.284816018855*x_ref[0] + (-0.89311162533)*x_ref[1]
        arg[(3, 0, 1)]=-0.736112821377*x[0] + (0.13466399995)*x[1]
        ref[(3, 0, 1)]=-0.736112821377*x_ref[0] + (0.13466399995)*x_ref[1]
        arg[(3, 0, 2)]=-0.085450265022*x[0] + (-0.22510766651)*x[1]
        ref[(3, 0, 2)]=-0.085450265022*x_ref[0] + (-0.22510766651)*x_ref[1]
        arg[(3, 1, 0)]=0.137241657156*x[0] + (-0.477011220194)*x[1]
        ref[(3, 1, 0)]=0.137241657156*x_ref[0] + (-0.477011220194)*x_ref[1]
        arg[(3, 1, 1)]=-0.00704846791739*x[0] + (-0.242347853102)*x[1]
        ref[(3, 1, 1)]=-0.00704846791739*x_ref[0] + (-0.242347853102)*x_ref[1]
        arg[(3, 1, 2)]=0.801047201241*x[0] + (0.738608106873)*x[1]
        ref[(3, 1, 2)]=0.801047201241*x_ref[0] + (0.738608106873)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.653967715622*x[2]
            ref[(0, 0, 0)]+=0.653967715622*x_ref[2]
            arg[(0, 0, 1)]+=-0.251024260234*x[2]
            ref[(0, 0, 1)]+=-0.251024260234*x_ref[2]
            arg[(0, 0, 2)]+=0.59601341354*x[2]
            ref[(0, 0, 2)]+=0.59601341354*x_ref[2]
            arg[(0, 1, 0)]+=-0.22046860774*x[2]
            ref[(0, 1, 0)]+=-0.22046860774*x_ref[2]
            arg[(0, 1, 1)]+=0.608136932746*x[2]
            ref[(0, 1, 1)]+=0.608136932746*x_ref[2]
            arg[(0, 1, 2)]+=-0.437026920074*x[2]
            ref[(0, 1, 2)]+=-0.437026920074*x_ref[2]
            arg[(1, 0, 0)]+=0.584894859567*x[2]
            ref[(1, 0, 0)]+=0.584894859567*x_ref[2]
            arg[(1, 0, 1)]+=-0.601239437862*x[2]
            ref[(1, 0, 1)]+=-0.601239437862*x_ref[2]
            arg[(1, 0, 2)]+=-0.62768013845*x[2]
            ref[(1, 0, 2)]+=-0.62768013845*x_ref[2]
            arg[(1, 1, 0)]+=0.504950138146*x[2]
            ref[(1, 1, 0)]+=0.504950138146*x_ref[2]
            arg[(1, 1, 1)]+=-0.489027556276*x[2]
            ref[(1, 1, 1)]+=-0.489027556276*x_ref[2]
            arg[(1, 1, 2)]+=0.756530914306*x[2]
            ref[(1, 1, 2)]+=0.756530914306*x_ref[2]
            arg[(2, 0, 0)]+=-0.0166871880662*x[2]
            ref[(2, 0, 0)]+=-0.0166871880662*x_ref[2]
            arg[(2, 0, 1)]+=-0.227878102841*x[2]
            ref[(2, 0, 1)]+=-0.227878102841*x_ref[2]
            arg[(2, 0, 2)]+=-0.88691052256*x[2]
            ref[(2, 0, 2)]+=-0.88691052256*x_ref[2]
            arg[(2, 1, 0)]+=-0.252497144275*x[2]
            ref[(2, 1, 0)]+=-0.252497144275*x_ref[2]
            arg[(2, 1, 1)]+=-0.0295737069204*x[2]
            ref[(2, 1, 1)]+=-0.0295737069204*x_ref[2]
            arg[(2, 1, 2)]+=0.348022479283*x[2]
            ref[(2, 1, 2)]+=0.348022479283*x_ref[2]
            arg[(3, 0, 0)]+=-0.41503112656*x[2]
            ref[(3, 0, 0)]+=-0.41503112656*x_ref[2]
            arg[(3, 0, 1)]+=-0.144427859119*x[2]
            ref[(3, 0, 1)]+=-0.144427859119*x_ref[2]
            arg[(3, 0, 2)]+=0.341482500034*x[2]
            ref[(3, 0, 2)]+=0.341482500034*x_ref[2]
            arg[(3, 1, 0)]+=-0.242931671571*x[2]
            ref[(3, 1, 0)]+=-0.242931671571*x_ref[2]
            arg[(3, 1, 1)]+=-0.357667305124*x[2]
            ref[(3, 1, 1)]+=-0.357667305124*x_ref[2]
            arg[(3, 1, 2)]+=-0.747236168532*x[2]
            ref[(3, 1, 2)]+=-0.747236168532*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ReducedSolution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 4, 3),w)
        ref = Data(0,(4, 2, 4, 3),w_ref)
        arg[(0, 0, 0, 0)]=0.568437104084*x[0] + (0.83971095241)*x[1]
        ref[(0, 0, 0, 0)]=0.568437104084*x_ref[0] + (0.83971095241)*x_ref[1]
        arg[(0, 0, 0, 1)]=-0.274900217192*x[0] + (-0.317720667896)*x[1]
        ref[(0, 0, 0, 1)]=-0.274900217192*x_ref[0] + (-0.317720667896)*x_ref[1]
        arg[(0, 0, 0, 2)]=0.309337556866*x[0] + (0.156671264785)*x[1]
        ref[(0, 0, 0, 2)]=0.309337556866*x_ref[0] + (0.156671264785)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.491278207252*x[0] + (0.746164823571)*x[1]
        ref[(0, 0, 1, 0)]=0.491278207252*x_ref[0] + (0.746164823571)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.581131089242*x[0] + (0.545013944399)*x[1]
        ref[(0, 0, 1, 1)]=0.581131089242*x_ref[0] + (0.545013944399)*x_ref[1]
        arg[(0, 0, 1, 2)]=0.0902737074041*x[0] + (-0.547237841603)*x[1]
        ref[(0, 0, 1, 2)]=0.0902737074041*x_ref[0] + (-0.547237841603)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.530927965318*x[0] + (-0.109529468555)*x[1]
        ref[(0, 0, 2, 0)]=-0.530927965318*x_ref[0] + (-0.109529468555)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.100228122816*x[0] + (0.557555223843)*x[1]
        ref[(0, 0, 2, 1)]=-0.100228122816*x_ref[0] + (0.557555223843)*x_ref[1]
        arg[(0, 0, 2, 2)]=-0.936377138735*x[0] + (-0.0945431341327)*x[1]
        ref[(0, 0, 2, 2)]=-0.936377138735*x_ref[0] + (-0.0945431341327)*x_ref[1]
        arg[(0, 0, 3, 0)]=0.748732747719*x[0] + (0.693207000497)*x[1]
        ref[(0, 0, 3, 0)]=0.748732747719*x_ref[0] + (0.693207000497)*x_ref[1]
        arg[(0, 0, 3, 1)]=0.576357953282*x[0] + (0.551015716978)*x[1]
        ref[(0, 0, 3, 1)]=0.576357953282*x_ref[0] + (0.551015716978)*x_ref[1]
        arg[(0, 0, 3, 2)]=-0.58011384197*x[0] + (0.922953406116)*x[1]
        ref[(0, 0, 3, 2)]=-0.58011384197*x_ref[0] + (0.922953406116)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.911999123488*x[0] + (0.441044197582)*x[1]
        ref[(0, 1, 0, 0)]=-0.911999123488*x_ref[0] + (0.441044197582)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.796232514821*x[0] + (0.249716384919)*x[1]
        ref[(0, 1, 0, 1)]=0.796232514821*x_ref[0] + (0.249716384919)*x_ref[1]
        arg[(0, 1, 0, 2)]=-0.0519408795556*x[0] + (-0.646593692587)*x[1]
        ref[(0, 1, 0, 2)]=-0.0519408795556*x_ref[0] + (-0.646593692587)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.333691489319*x[0] + (-0.0767165596596)*x[1]
        ref[(0, 1, 1, 0)]=0.333691489319*x_ref[0] + (-0.0767165596596)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.499074460871*x[0] + (0.22355026464)*x[1]
        ref[(0, 1, 1, 1)]=0.499074460871*x_ref[0] + (0.22355026464)*x_ref[1]
        arg[(0, 1, 1, 2)]=-0.185360528455*x[0] + (0.130422406503)*x[1]
        ref[(0, 1, 1, 2)]=-0.185360528455*x_ref[0] + (0.130422406503)*x_ref[1]
        arg[(0, 1, 2, 0)]=0.124863562079*x[0] + (-0.695857389147)*x[1]
        ref[(0, 1, 2, 0)]=0.124863562079*x_ref[0] + (-0.695857389147)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.133330165872*x[0] + (0.530317120486)*x[1]
        ref[(0, 1, 2, 1)]=0.133330165872*x_ref[0] + (0.530317120486)*x_ref[1]
        arg[(0, 1, 2, 2)]=-0.823093078764*x[0] + (-0.0384872873369)*x[1]
        ref[(0, 1, 2, 2)]=-0.823093078764*x_ref[0] + (-0.0384872873369)*x_ref[1]
        arg[(0, 1, 3, 0)]=0.734409159635*x[0] + (-0.183400984734)*x[1]
        ref[(0, 1, 3, 0)]=0.734409159635*x_ref[0] + (-0.183400984734)*x_ref[1]
        arg[(0, 1, 3, 1)]=-0.310084265558*x[0] + (0.594177542127)*x[1]
        ref[(0, 1, 3, 1)]=-0.310084265558*x_ref[0] + (0.594177542127)*x_ref[1]
        arg[(0, 1, 3, 2)]=-0.0271860030279*x[0] + (0.935844501016)*x[1]
        ref[(0, 1, 3, 2)]=-0.0271860030279*x_ref[0] + (0.935844501016)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.979342160781*x[0] + (0.657960104622)*x[1]
        ref[(1, 0, 0, 0)]=0.979342160781*x_ref[0] + (0.657960104622)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.946765427337*x[0] + (0.00773956141018)*x[1]
        ref[(1, 0, 0, 1)]=-0.946765427337*x_ref[0] + (0.00773956141018)*x_ref[1]
        arg[(1, 0, 0, 2)]=0.655655416227*x[0] + (-0.55747744531)*x[1]
        ref[(1, 0, 0, 2)]=0.655655416227*x_ref[0] + (-0.55747744531)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.126499777336*x[0] + (0.11891236525)*x[1]
        ref[(1, 0, 1, 0)]=0.126499777336*x_ref[0] + (0.11891236525)*x_ref[1]
        arg[(1, 0, 1, 1)]=-0.95169208796*x[0] + (0.566032998429)*x[1]
        ref[(1, 0, 1, 1)]=-0.95169208796*x_ref[0] + (0.566032998429)*x_ref[1]
        arg[(1, 0, 1, 2)]=0.252113364824*x[0] + (0.429745905421)*x[1]
        ref[(1, 0, 1, 2)]=0.252113364824*x_ref[0] + (0.429745905421)*x_ref[1]
        arg[(1, 0, 2, 0)]=-0.221592651566*x[0] + (-0.842143317313)*x[1]
        ref[(1, 0, 2, 0)]=-0.221592651566*x_ref[0] + (-0.842143317313)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.280093811802*x[0] + (-0.253025666289)*x[1]
        ref[(1, 0, 2, 1)]=0.280093811802*x_ref[0] + (-0.253025666289)*x_ref[1]
        arg[(1, 0, 2, 2)]=0.528634394321*x[0] + (0.442905900089)*x[1]
        ref[(1, 0, 2, 2)]=0.528634394321*x_ref[0] + (0.442905900089)*x_ref[1]
        arg[(1, 0, 3, 0)]=0.596568147163*x[0] + (0.462745829007)*x[1]
        ref[(1, 0, 3, 0)]=0.596568147163*x_ref[0] + (0.462745829007)*x_ref[1]
        arg[(1, 0, 3, 1)]=-0.799478240645*x[0] + (-0.21603785884)*x[1]
        ref[(1, 0, 3, 1)]=-0.799478240645*x_ref[0] + (-0.21603785884)*x_ref[1]
        arg[(1, 0, 3, 2)]=-0.469737332562*x[0] + (0.264056124663)*x[1]
        ref[(1, 0, 3, 2)]=-0.469737332562*x_ref[0] + (0.264056124663)*x_ref[1]
        arg[(1, 1, 0, 0)]=0.632910729616*x[0] + (0.981792839614)*x[1]
        ref[(1, 1, 0, 0)]=0.632910729616*x_ref[0] + (0.981792839614)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.546504888829*x[0] + (0.988384182532)*x[1]
        ref[(1, 1, 0, 1)]=0.546504888829*x_ref[0] + (0.988384182532)*x_ref[1]
        arg[(1, 1, 0, 2)]=-0.57515624582*x[0] + (0.598256369007)*x[1]
        ref[(1, 1, 0, 2)]=-0.57515624582*x_ref[0] + (0.598256369007)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.0797614311564*x[0] + (0.375601538235)*x[1]
        ref[(1, 1, 1, 0)]=-0.0797614311564*x_ref[0] + (0.375601538235)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.932220175828*x[0] + (-0.215689300104)*x[1]
        ref[(1, 1, 1, 1)]=0.932220175828*x_ref[0] + (-0.215689300104)*x_ref[1]
        arg[(1, 1, 1, 2)]=0.498744559476*x[0] + (-0.949417132138)*x[1]
        ref[(1, 1, 1, 2)]=0.498744559476*x_ref[0] + (-0.949417132138)*x_ref[1]
        arg[(1, 1, 2, 0)]=0.840637197027*x[0] + (-0.792342145818)*x[1]
        ref[(1, 1, 2, 0)]=0.840637197027*x_ref[0] + (-0.792342145818)*x_ref[1]
        arg[(1, 1, 2, 1)]=0.517763491909*x[0] + (0.821838812666)*x[1]
        ref[(1, 1, 2, 1)]=0.517763491909*x_ref[0] + (0.821838812666)*x_ref[1]
        arg[(1, 1, 2, 2)]=-0.430400250567*x[0] + (-0.522443035679)*x[1]
        ref[(1, 1, 2, 2)]=-0.430400250567*x_ref[0] + (-0.522443035679)*x_ref[1]
        arg[(1, 1, 3, 0)]=0.0371948989793*x[0] + (0.346704845604)*x[1]
        ref[(1, 1, 3, 0)]=0.0371948989793*x_ref[0] + (0.346704845604)*x_ref[1]
        arg[(1, 1, 3, 1)]=0.0395258127151*x[0] + (0.848029999629)*x[1]
        ref[(1, 1, 3, 1)]=0.0395258127151*x_ref[0] + (0.848029999629)*x_ref[1]
        arg[(1, 1, 3, 2)]=0.730873429369*x[0] + (0.525431225416)*x[1]
        ref[(1, 1, 3, 2)]=0.730873429369*x_ref[0] + (0.525431225416)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.936982521679*x[0] + (0.685257882858)*x[1]
        ref[(2, 0, 0, 0)]=0.936982521679*x_ref[0] + (0.685257882858)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.315914555564*x[0] + (0.587682215295)*x[1]
        ref[(2, 0, 0, 1)]=0.315914555564*x_ref[0] + (0.587682215295)*x_ref[1]
        arg[(2, 0, 0, 2)]=0.862446295919*x[0] + (-0.974743367175)*x[1]
        ref[(2, 0, 0, 2)]=0.862446295919*x_ref[0] + (-0.974743367175)*x_ref[1]
        arg[(2, 0, 1, 0)]=0.505834272563*x[0] + (0.550628478431)*x[1]
        ref[(2, 0, 1, 0)]=0.505834272563*x_ref[0] + (0.550628478431)*x_ref[1]
        arg[(2, 0, 1, 1)]=0.25882571857*x[0] + (0.00933334746272)*x[1]
        ref[(2, 0, 1, 1)]=0.25882571857*x_ref[0] + (0.00933334746272)*x_ref[1]
        arg[(2, 0, 1, 2)]=0.0558159299247*x[0] + (0.138290964942)*x[1]
        ref[(2, 0, 1, 2)]=0.0558159299247*x_ref[0] + (0.138290964942)*x_ref[1]
        arg[(2, 0, 2, 0)]=0.815487890379*x[0] + (0.568137434344)*x[1]
        ref[(2, 0, 2, 0)]=0.815487890379*x_ref[0] + (0.568137434344)*x_ref[1]
        arg[(2, 0, 2, 1)]=-0.497199481763*x[0] + (0.510435267104)*x[1]
        ref[(2, 0, 2, 1)]=-0.497199481763*x_ref[0] + (0.510435267104)*x_ref[1]
        arg[(2, 0, 2, 2)]=-0.392912364819*x[0] + (0.306915627935)*x[1]
        ref[(2, 0, 2, 2)]=-0.392912364819*x_ref[0] + (0.306915627935)*x_ref[1]
        arg[(2, 0, 3, 0)]=0.451850173551*x[0] + (0.55174239834)*x[1]
        ref[(2, 0, 3, 0)]=0.451850173551*x_ref[0] + (0.55174239834)*x_ref[1]
        arg[(2, 0, 3, 1)]=-0.486310403942*x[0] + (-0.399922800055)*x[1]
        ref[(2, 0, 3, 1)]=-0.486310403942*x_ref[0] + (-0.399922800055)*x_ref[1]
        arg[(2, 0, 3, 2)]=-0.134425957837*x[0] + (0.0686936900527)*x[1]
        ref[(2, 0, 3, 2)]=-0.134425957837*x_ref[0] + (0.0686936900527)*x_ref[1]
        arg[(2, 1, 0, 0)]=0.237154977955*x[0] + (0.503328676278)*x[1]
        ref[(2, 1, 0, 0)]=0.237154977955*x_ref[0] + (0.503328676278)*x_ref[1]
        arg[(2, 1, 0, 1)]=-0.402251082255*x[0] + (0.608546323944)*x[1]
        ref[(2, 1, 0, 1)]=-0.402251082255*x_ref[0] + (0.608546323944)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.0396980301338*x[0] + (0.512254075841)*x[1]
        ref[(2, 1, 0, 2)]=-0.0396980301338*x_ref[0] + (0.512254075841)*x_ref[1]
        arg[(2, 1, 1, 0)]=0.0541646429916*x[0] + (-0.3689245724)*x[1]
        ref[(2, 1, 1, 0)]=0.0541646429916*x_ref[0] + (-0.3689245724)*x_ref[1]
        arg[(2, 1, 1, 1)]=0.689370044416*x[0] + (0.747142616306)*x[1]
        ref[(2, 1, 1, 1)]=0.689370044416*x_ref[0] + (0.747142616306)*x_ref[1]
        arg[(2, 1, 1, 2)]=0.249747782238*x[0] + (0.140634196422)*x[1]
        ref[(2, 1, 1, 2)]=0.249747782238*x_ref[0] + (0.140634196422)*x_ref[1]
        arg[(2, 1, 2, 0)]=-0.540195038362*x[0] + (0.0397852368686)*x[1]
        ref[(2, 1, 2, 0)]=-0.540195038362*x_ref[0] + (0.0397852368686)*x_ref[1]
        arg[(2, 1, 2, 1)]=0.609025572531*x[0] + (0.945605809347)*x[1]
        ref[(2, 1, 2, 1)]=0.609025572531*x_ref[0] + (0.945605809347)*x_ref[1]
        arg[(2, 1, 2, 2)]=-0.652739060052*x[0] + (0.190450641046)*x[1]
        ref[(2, 1, 2, 2)]=-0.652739060052*x_ref[0] + (0.190450641046)*x_ref[1]
        arg[(2, 1, 3, 0)]=0.112558004003*x[0] + (-0.620611717372)*x[1]
        ref[(2, 1, 3, 0)]=0.112558004003*x_ref[0] + (-0.620611717372)*x_ref[1]
        arg[(2, 1, 3, 1)]=-0.354332091217*x[0] + (0.17237305384)*x[1]
        ref[(2, 1, 3, 1)]=-0.354332091217*x_ref[0] + (0.17237305384)*x_ref[1]
        arg[(2, 1, 3, 2)]=-0.675145070157*x[0] + (0.585211542572)*x[1]
        ref[(2, 1, 3, 2)]=-0.675145070157*x_ref[0] + (0.585211542572)*x_ref[1]
        arg[(3, 0, 0, 0)]=-0.441475026988*x[0] + (-0.679919121861)*x[1]
        ref[(3, 0, 0, 0)]=-0.441475026988*x_ref[0] + (-0.679919121861)*x_ref[1]
        arg[(3, 0, 0, 1)]=-0.201274951061*x[0] + (-0.636923653498)*x[1]
        ref[(3, 0, 0, 1)]=-0.201274951061*x_ref[0] + (-0.636923653498)*x_ref[1]
        arg[(3, 0, 0, 2)]=0.0416988532802*x[0] + (-0.739104388414)*x[1]
        ref[(3, 0, 0, 2)]=0.0416988532802*x_ref[0] + (-0.739104388414)*x_ref[1]
        arg[(3, 0, 1, 0)]=-0.627167972131*x[0] + (0.659403699382)*x[1]
        ref[(3, 0, 1, 0)]=-0.627167972131*x_ref[0] + (0.659403699382)*x_ref[1]
        arg[(3, 0, 1, 1)]=-0.662704535132*x[0] + (-0.617241270941)*x[1]
        ref[(3, 0, 1, 1)]=-0.662704535132*x_ref[0] + (-0.617241270941)*x_ref[1]
        arg[(3, 0, 1, 2)]=-0.633399015089*x[0] + (0.66115712894)*x[1]
        ref[(3, 0, 1, 2)]=-0.633399015089*x_ref[0] + (0.66115712894)*x_ref[1]
        arg[(3, 0, 2, 0)]=0.243445492635*x[0] + (0.218439283639)*x[1]
        ref[(3, 0, 2, 0)]=0.243445492635*x_ref[0] + (0.218439283639)*x_ref[1]
        arg[(3, 0, 2, 1)]=0.200555398851*x[0] + (0.449031097586)*x[1]
        ref[(3, 0, 2, 1)]=0.200555398851*x_ref[0] + (0.449031097586)*x_ref[1]
        arg[(3, 0, 2, 2)]=-0.229730577835*x[0] + (-0.202196700978)*x[1]
        ref[(3, 0, 2, 2)]=-0.229730577835*x_ref[0] + (-0.202196700978)*x_ref[1]
        arg[(3, 0, 3, 0)]=-0.197802616578*x[0] + (-0.708607441016)*x[1]
        ref[(3, 0, 3, 0)]=-0.197802616578*x_ref[0] + (-0.708607441016)*x_ref[1]
        arg[(3, 0, 3, 1)]=-0.225844649482*x[0] + (-0.169918007557)*x[1]
        ref[(3, 0, 3, 1)]=-0.225844649482*x_ref[0] + (-0.169918007557)*x_ref[1]
        arg[(3, 0, 3, 2)]=0.791466542182*x[0] + (0.886259635619)*x[1]
        ref[(3, 0, 3, 2)]=0.791466542182*x_ref[0] + (0.886259635619)*x_ref[1]
        arg[(3, 1, 0, 0)]=-0.617347438608*x[0] + (0.369800294486)*x[1]
        ref[(3, 1, 0, 0)]=-0.617347438608*x_ref[0] + (0.369800294486)*x_ref[1]
        arg[(3, 1, 0, 1)]=0.0194742949516*x[0] + (0.985608260476)*x[1]
        ref[(3, 1, 0, 1)]=0.0194742949516*x_ref[0] + (0.985608260476)*x_ref[1]
        arg[(3, 1, 0, 2)]=0.617186003801*x[0] + (-0.415665903366)*x[1]
        ref[(3, 1, 0, 2)]=0.617186003801*x_ref[0] + (-0.415665903366)*x_ref[1]
        arg[(3, 1, 1, 0)]=0.980255056104*x[0] + (0.751764617971)*x[1]
        ref[(3, 1, 1, 0)]=0.980255056104*x_ref[0] + (0.751764617971)*x_ref[1]
        arg[(3, 1, 1, 1)]=-0.215818501315*x[0] + (-0.781040887498)*x[1]
        ref[(3, 1, 1, 1)]=-0.215818501315*x_ref[0] + (-0.781040887498)*x_ref[1]
        arg[(3, 1, 1, 2)]=-0.376804144545*x[0] + (0.835343459541)*x[1]
        ref[(3, 1, 1, 2)]=-0.376804144545*x_ref[0] + (0.835343459541)*x_ref[1]
        arg[(3, 1, 2, 0)]=0.240343554127*x[0] + (0.896156038425)*x[1]
        ref[(3, 1, 2, 0)]=0.240343554127*x_ref[0] + (0.896156038425)*x_ref[1]
        arg[(3, 1, 2, 1)]=0.23720682041*x[0] + (0.726314905529)*x[1]
        ref[(3, 1, 2, 1)]=0.23720682041*x_ref[0] + (0.726314905529)*x_ref[1]
        arg[(3, 1, 2, 2)]=0.554812120788*x[0] + (0.139992167164)*x[1]
        ref[(3, 1, 2, 2)]=0.554812120788*x_ref[0] + (0.139992167164)*x_ref[1]
        arg[(3, 1, 3, 0)]=-0.618804731126*x[0] + (0.753273753488)*x[1]
        ref[(3, 1, 3, 0)]=-0.618804731126*x_ref[0] + (0.753273753488)*x_ref[1]
        arg[(3, 1, 3, 1)]=-0.661919040527*x[0] + (-0.287354457639)*x[1]
        ref[(3, 1, 3, 1)]=-0.661919040527*x_ref[0] + (-0.287354457639)*x_ref[1]
        arg[(3, 1, 3, 2)]=-0.845549984163*x[0] + (0.847151589048)*x[1]
        ref[(3, 1, 3, 2)]=-0.845549984163*x_ref[0] + (0.847151589048)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.92883364413*x[2]
            ref[(0, 0, 0, 0)]+=-0.92883364413*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.426326580195*x[2]
            ref[(0, 0, 0, 1)]+=-0.426326580195*x_ref[2]
            arg[(0, 0, 0, 2)]+=-0.56641146186*x[2]
            ref[(0, 0, 0, 2)]+=-0.56641146186*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.231355551111*x[2]
            ref[(0, 0, 1, 0)]+=-0.231355551111*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.394847184025*x[2]
            ref[(0, 0, 1, 1)]+=0.394847184025*x_ref[2]
            arg[(0, 0, 1, 2)]+=0.667545058825*x[2]
            ref[(0, 0, 1, 2)]+=0.667545058825*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.263436556889*x[2]
            ref[(0, 0, 2, 0)]+=-0.263436556889*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.523204727631*x[2]
            ref[(0, 0, 2, 1)]+=0.523204727631*x_ref[2]
            arg[(0, 0, 2, 2)]+=-0.799064073757*x[2]
            ref[(0, 0, 2, 2)]+=-0.799064073757*x_ref[2]
            arg[(0, 0, 3, 0)]+=-0.117351757888*x[2]
            ref[(0, 0, 3, 0)]+=-0.117351757888*x_ref[2]
            arg[(0, 0, 3, 1)]+=0.907579865666*x[2]
            ref[(0, 0, 3, 1)]+=0.907579865666*x_ref[2]
            arg[(0, 0, 3, 2)]+=0.666871144776*x[2]
            ref[(0, 0, 3, 2)]+=0.666871144776*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.154860583289*x[2]
            ref[(0, 1, 0, 0)]+=-0.154860583289*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.0829051864851*x[2]
            ref[(0, 1, 0, 1)]+=-0.0829051864851*x_ref[2]
            arg[(0, 1, 0, 2)]+=-0.241526190969*x[2]
            ref[(0, 1, 0, 2)]+=-0.241526190969*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.128830731441*x[2]
            ref[(0, 1, 1, 0)]+=0.128830731441*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.0104413225751*x[2]
            ref[(0, 1, 1, 1)]+=-0.0104413225751*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.464189460815*x[2]
            ref[(0, 1, 1, 2)]+=0.464189460815*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.0851524737553*x[2]
            ref[(0, 1, 2, 0)]+=-0.0851524737553*x_ref[2]
            arg[(0, 1, 2, 1)]+=0.298182927037*x[2]
            ref[(0, 1, 2, 1)]+=0.298182927037*x_ref[2]
            arg[(0, 1, 2, 2)]+=0.289607702731*x[2]
            ref[(0, 1, 2, 2)]+=0.289607702731*x_ref[2]
            arg[(0, 1, 3, 0)]+=-0.755234647263*x[2]
            ref[(0, 1, 3, 0)]+=-0.755234647263*x_ref[2]
            arg[(0, 1, 3, 1)]+=-0.0297136208624*x[2]
            ref[(0, 1, 3, 1)]+=-0.0297136208624*x_ref[2]
            arg[(0, 1, 3, 2)]+=-0.58315452964*x[2]
            ref[(0, 1, 3, 2)]+=-0.58315452964*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.352157108779*x[2]
            ref[(1, 0, 0, 0)]+=0.352157108779*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.931727072861*x[2]
            ref[(1, 0, 0, 1)]+=-0.931727072861*x_ref[2]
            arg[(1, 0, 0, 2)]+=-0.417618240824*x[2]
            ref[(1, 0, 0, 2)]+=-0.417618240824*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.732021817072*x[2]
            ref[(1, 0, 1, 0)]+=-0.732021817072*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.279864053855*x[2]
            ref[(1, 0, 1, 1)]+=-0.279864053855*x_ref[2]
            arg[(1, 0, 1, 2)]+=0.0303580958113*x[2]
            ref[(1, 0, 1, 2)]+=0.0303580958113*x_ref[2]
            arg[(1, 0, 2, 0)]+=0.772905967139*x[2]
            ref[(1, 0, 2, 0)]+=0.772905967139*x_ref[2]
            arg[(1, 0, 2, 1)]+=-0.573911215323*x[2]
            ref[(1, 0, 2, 1)]+=-0.573911215323*x_ref[2]
            arg[(1, 0, 2, 2)]+=0.119044523249*x[2]
            ref[(1, 0, 2, 2)]+=0.119044523249*x_ref[2]
            arg[(1, 0, 3, 0)]+=0.0493532454725*x[2]
            ref[(1, 0, 3, 0)]+=0.0493532454725*x_ref[2]
            arg[(1, 0, 3, 1)]+=-0.81855783884*x[2]
            ref[(1, 0, 3, 1)]+=-0.81855783884*x_ref[2]
            arg[(1, 0, 3, 2)]+=0.89072564097*x[2]
            ref[(1, 0, 3, 2)]+=0.89072564097*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.402250310081*x[2]
            ref[(1, 1, 0, 0)]+=0.402250310081*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.264069275827*x[2]
            ref[(1, 1, 0, 1)]+=-0.264069275827*x_ref[2]
            arg[(1, 1, 0, 2)]+=-0.93270379328*x[2]
            ref[(1, 1, 0, 2)]+=-0.93270379328*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.191707428147*x[2]
            ref[(1, 1, 1, 0)]+=-0.191707428147*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.682447014544*x[2]
            ref[(1, 1, 1, 1)]+=0.682447014544*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.729688062269*x[2]
            ref[(1, 1, 1, 2)]+=-0.729688062269*x_ref[2]
            arg[(1, 1, 2, 0)]+=0.471085644078*x[2]
            ref[(1, 1, 2, 0)]+=0.471085644078*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.413234258312*x[2]
            ref[(1, 1, 2, 1)]+=0.413234258312*x_ref[2]
            arg[(1, 1, 2, 2)]+=-0.348320259642*x[2]
            ref[(1, 1, 2, 2)]+=-0.348320259642*x_ref[2]
            arg[(1, 1, 3, 0)]+=-0.168493955806*x[2]
            ref[(1, 1, 3, 0)]+=-0.168493955806*x_ref[2]
            arg[(1, 1, 3, 1)]+=0.254502998563*x[2]
            ref[(1, 1, 3, 1)]+=0.254502998563*x_ref[2]
            arg[(1, 1, 3, 2)]+=-0.668693134401*x[2]
            ref[(1, 1, 3, 2)]+=-0.668693134401*x_ref[2]
            arg[(2, 0, 0, 0)]+=0.831282562335*x[2]
            ref[(2, 0, 0, 0)]+=0.831282562335*x_ref[2]
            arg[(2, 0, 0, 1)]+=0.405830075971*x[2]
            ref[(2, 0, 0, 1)]+=0.405830075971*x_ref[2]
            arg[(2, 0, 0, 2)]+=0.673150199694*x[2]
            ref[(2, 0, 0, 2)]+=0.673150199694*x_ref[2]
            arg[(2, 0, 1, 0)]+=0.466015182213*x[2]
            ref[(2, 0, 1, 0)]+=0.466015182213*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.34343640692*x[2]
            ref[(2, 0, 1, 1)]+=0.34343640692*x_ref[2]
            arg[(2, 0, 1, 2)]+=-0.332540197435*x[2]
            ref[(2, 0, 1, 2)]+=-0.332540197435*x_ref[2]
            arg[(2, 0, 2, 0)]+=-0.593001890432*x[2]
            ref[(2, 0, 2, 0)]+=-0.593001890432*x_ref[2]
            arg[(2, 0, 2, 1)]+=-0.540381650304*x[2]
            ref[(2, 0, 2, 1)]+=-0.540381650304*x_ref[2]
            arg[(2, 0, 2, 2)]+=-0.696519288005*x[2]
            ref[(2, 0, 2, 2)]+=-0.696519288005*x_ref[2]
            arg[(2, 0, 3, 0)]+=0.550440364638*x[2]
            ref[(2, 0, 3, 0)]+=0.550440364638*x_ref[2]
            arg[(2, 0, 3, 1)]+=0.256907078578*x[2]
            ref[(2, 0, 3, 1)]+=0.256907078578*x_ref[2]
            arg[(2, 0, 3, 2)]+=0.926255714121*x[2]
            ref[(2, 0, 3, 2)]+=0.926255714121*x_ref[2]
            arg[(2, 1, 0, 0)]+=0.622520030887*x[2]
            ref[(2, 1, 0, 0)]+=0.622520030887*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.296726483171*x[2]
            ref[(2, 1, 0, 1)]+=-0.296726483171*x_ref[2]
            arg[(2, 1, 0, 2)]+=-0.255906866315*x[2]
            ref[(2, 1, 0, 2)]+=-0.255906866315*x_ref[2]
            arg[(2, 1, 1, 0)]+=-0.549546781615*x[2]
            ref[(2, 1, 1, 0)]+=-0.549546781615*x_ref[2]
            arg[(2, 1, 1, 1)]+=-0.309316422312*x[2]
            ref[(2, 1, 1, 1)]+=-0.309316422312*x_ref[2]
            arg[(2, 1, 1, 2)]+=0.742957219992*x[2]
            ref[(2, 1, 1, 2)]+=0.742957219992*x_ref[2]
            arg[(2, 1, 2, 0)]+=0.0363608695229*x[2]
            ref[(2, 1, 2, 0)]+=0.0363608695229*x_ref[2]
            arg[(2, 1, 2, 1)]+=0.990528860933*x[2]
            ref[(2, 1, 2, 1)]+=0.990528860933*x_ref[2]
            arg[(2, 1, 2, 2)]+=0.0565189337477*x[2]
            ref[(2, 1, 2, 2)]+=0.0565189337477*x_ref[2]
            arg[(2, 1, 3, 0)]+=0.0879842935493*x[2]
            ref[(2, 1, 3, 0)]+=0.0879842935493*x_ref[2]
            arg[(2, 1, 3, 1)]+=-0.820507130055*x[2]
            ref[(2, 1, 3, 1)]+=-0.820507130055*x_ref[2]
            arg[(2, 1, 3, 2)]+=0.911077795429*x[2]
            ref[(2, 1, 3, 2)]+=0.911077795429*x_ref[2]
            arg[(3, 0, 0, 0)]+=0.023719759424*x[2]
            ref[(3, 0, 0, 0)]+=0.023719759424*x_ref[2]
            arg[(3, 0, 0, 1)]+=-0.213104902348*x[2]
            ref[(3, 0, 0, 1)]+=-0.213104902348*x_ref[2]
            arg[(3, 0, 0, 2)]+=-0.768150961802*x[2]
            ref[(3, 0, 0, 2)]+=-0.768150961802*x_ref[2]
            arg[(3, 0, 1, 0)]+=-0.509136654316*x[2]
            ref[(3, 0, 1, 0)]+=-0.509136654316*x_ref[2]
            arg[(3, 0, 1, 1)]+=0.759382031217*x[2]
            ref[(3, 0, 1, 1)]+=0.759382031217*x_ref[2]
            arg[(3, 0, 1, 2)]+=-0.928048357309*x[2]
            ref[(3, 0, 1, 2)]+=-0.928048357309*x_ref[2]
            arg[(3, 0, 2, 0)]+=-0.533348447224*x[2]
            ref[(3, 0, 2, 0)]+=-0.533348447224*x_ref[2]
            arg[(3, 0, 2, 1)]+=0.132819686504*x[2]
            ref[(3, 0, 2, 1)]+=0.132819686504*x_ref[2]
            arg[(3, 0, 2, 2)]+=-0.206030822372*x[2]
            ref[(3, 0, 2, 2)]+=-0.206030822372*x_ref[2]
            arg[(3, 0, 3, 0)]+=0.320581050534*x[2]
            ref[(3, 0, 3, 0)]+=0.320581050534*x_ref[2]
            arg[(3, 0, 3, 1)]+=0.979651207169*x[2]
            ref[(3, 0, 3, 1)]+=0.979651207169*x_ref[2]
            arg[(3, 0, 3, 2)]+=0.0949107594684*x[2]
            ref[(3, 0, 3, 2)]+=0.0949107594684*x_ref[2]
            arg[(3, 1, 0, 0)]+=-0.371637215572*x[2]
            ref[(3, 1, 0, 0)]+=-0.371637215572*x_ref[2]
            arg[(3, 1, 0, 1)]+=0.889109288502*x[2]
            ref[(3, 1, 0, 1)]+=0.889109288502*x_ref[2]
            arg[(3, 1, 0, 2)]+=0.661253753165*x[2]
            ref[(3, 1, 0, 2)]+=0.661253753165*x_ref[2]
            arg[(3, 1, 1, 0)]+=-0.322108160241*x[2]
            ref[(3, 1, 1, 0)]+=-0.322108160241*x_ref[2]
            arg[(3, 1, 1, 1)]+=-0.920462798257*x[2]
            ref[(3, 1, 1, 1)]+=-0.920462798257*x_ref[2]
            arg[(3, 1, 1, 2)]+=0.256076916855*x[2]
            ref[(3, 1, 1, 2)]+=0.256076916855*x_ref[2]
            arg[(3, 1, 2, 0)]+=0.385678565295*x[2]
            ref[(3, 1, 2, 0)]+=0.385678565295*x_ref[2]
            arg[(3, 1, 2, 1)]+=0.139757332447*x[2]
            ref[(3, 1, 2, 1)]+=0.139757332447*x_ref[2]
            arg[(3, 1, 2, 2)]+=0.595810696135*x[2]
            ref[(3, 1, 2, 2)]+=0.595810696135*x_ref[2]
            arg[(3, 1, 3, 0)]+=0.496372419101*x[2]
            ref[(3, 1, 3, 0)]+=0.496372419101*x_ref[2]
            arg[(3, 1, 3, 1)]+=0.466792030194*x[2]
            ref[(3, 1, 3, 1)]+=0.466792030194*x_ref[2]
            arg[(3, 1, 3, 2)]+=0.771356470854*x[2]
            ref[(3, 1, 3, 2)]+=0.771356470854*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.0306161825794*x[0] + (-0.915804291643)*x[1]
        ref=0.0306161825794*x_ref[0] + (-0.915804291643)*x_ref[1]
        if dim==3:
            arg+=(-0.362344368695)*x[2]
            ref+=(-0.362344368695)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=0.893691358806*x[0] + (0.80597705667)*x[1]
        ref[(0,)]=0.893691358806*x_ref[0] + (0.80597705667)*x_ref[1]
        arg[(1,)]=-0.105144114287*x[0] + (-0.228159155184)*x[1]
        ref[(1,)]=-0.105144114287*x_ref[0] + (-0.228159155184)*x_ref[1]
        arg[(2,)]=-0.059676289064*x[0] + (-0.412327087742)*x[1]
        ref[(2,)]=-0.059676289064*x_ref[0] + (-0.412327087742)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.583806971319*x[2]
            ref[(0,)]+=0.583806971319*x_ref[2]
            arg[(1,)]+=-0.195432683279*x[2]
            ref[(1,)]+=-0.195432683279*x_ref[2]
            arg[(2,)]+=-0.845318668396*x[2]
            ref[(2,)]+=-0.845318668396*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref = Data(0,(2, 2),w_ref)
        arg[(0, 0)]=0.209672848641*x[0] + (0.451139790087)*x[1]
        ref[(0, 0)]=0.209672848641*x_ref[0] + (0.451139790087)*x_ref[1]
        arg[(0, 1)]=0.525914864024*x[0] + (-0.825974010638)*x[1]
        ref[(0, 1)]=0.525914864024*x_ref[0] + (-0.825974010638)*x_ref[1]
        arg[(1, 0)]=-0.417563004808*x[0] + (-0.400580352586)*x[1]
        ref[(1, 0)]=-0.417563004808*x_ref[0] + (-0.400580352586)*x_ref[1]
        arg[(1, 1)]=0.361559233037*x[0] + (0.477606149768)*x[1]
        ref[(1, 1)]=0.361559233037*x_ref[0] + (0.477606149768)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.599602028523*x[2]
            ref[(0, 0)]+=-0.599602028523*x_ref[2]
            arg[(0, 1)]+=-0.652153028677*x[2]
            ref[(0, 1)]+=-0.652153028677*x_ref[2]
            arg[(1, 0)]+=0.899970579519*x[2]
            ref[(1, 0)]+=0.899970579519*x_ref[2]
            arg[(1, 1)]+=0.480010874024*x[2]
            ref[(1, 1)]+=0.480010874024*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 2),w)
        ref = Data(0,(3, 3, 2),w_ref)
        arg[(0, 0, 0)]=-0.402848443212*x[0] + (-0.617818113089)*x[1]
        ref[(0, 0, 0)]=-0.402848443212*x_ref[0] + (-0.617818113089)*x_ref[1]
        arg[(0, 0, 1)]=0.342716052267*x[0] + (-0.729022656791)*x[1]
        ref[(0, 0, 1)]=0.342716052267*x_ref[0] + (-0.729022656791)*x_ref[1]
        arg[(0, 1, 0)]=0.320566043727*x[0] + (-0.75936733343)*x[1]
        ref[(0, 1, 0)]=0.320566043727*x_ref[0] + (-0.75936733343)*x_ref[1]
        arg[(0, 1, 1)]=-0.424471478962*x[0] + (0.705771389312)*x[1]
        ref[(0, 1, 1)]=-0.424471478962*x_ref[0] + (0.705771389312)*x_ref[1]
        arg[(0, 2, 0)]=-0.168493066837*x[0] + (-0.249034174185)*x[1]
        ref[(0, 2, 0)]=-0.168493066837*x_ref[0] + (-0.249034174185)*x_ref[1]
        arg[(0, 2, 1)]=-0.354312237701*x[0] + (-0.00220929554642)*x[1]
        ref[(0, 2, 1)]=-0.354312237701*x_ref[0] + (-0.00220929554642)*x_ref[1]
        arg[(1, 0, 0)]=0.939112382156*x[0] + (0.919875777518)*x[1]
        ref[(1, 0, 0)]=0.939112382156*x_ref[0] + (0.919875777518)*x_ref[1]
        arg[(1, 0, 1)]=-0.342179898895*x[0] + (-0.541061197034)*x[1]
        ref[(1, 0, 1)]=-0.342179898895*x_ref[0] + (-0.541061197034)*x_ref[1]
        arg[(1, 1, 0)]=-0.762217787863*x[0] + (0.0426122559796)*x[1]
        ref[(1, 1, 0)]=-0.762217787863*x_ref[0] + (0.0426122559796)*x_ref[1]
        arg[(1, 1, 1)]=0.919043087792*x[0] + (0.905024396613)*x[1]
        ref[(1, 1, 1)]=0.919043087792*x_ref[0] + (0.905024396613)*x_ref[1]
        arg[(1, 2, 0)]=0.927986458824*x[0] + (0.0132757081933)*x[1]
        ref[(1, 2, 0)]=0.927986458824*x_ref[0] + (0.0132757081933)*x_ref[1]
        arg[(1, 2, 1)]=-0.425770947902*x[0] + (0.839604469749)*x[1]
        ref[(1, 2, 1)]=-0.425770947902*x_ref[0] + (0.839604469749)*x_ref[1]
        arg[(2, 0, 0)]=-0.778013005687*x[0] + (-0.0405942671578)*x[1]
        ref[(2, 0, 0)]=-0.778013005687*x_ref[0] + (-0.0405942671578)*x_ref[1]
        arg[(2, 0, 1)]=-0.86238753112*x[0] + (0.722334559617)*x[1]
        ref[(2, 0, 1)]=-0.86238753112*x_ref[0] + (0.722334559617)*x_ref[1]
        arg[(2, 1, 0)]=-0.105160862714*x[0] + (0.305201910831)*x[1]
        ref[(2, 1, 0)]=-0.105160862714*x_ref[0] + (0.305201910831)*x_ref[1]
        arg[(2, 1, 1)]=-0.601831742317*x[0] + (0.53498992184)*x[1]
        ref[(2, 1, 1)]=-0.601831742317*x_ref[0] + (0.53498992184)*x_ref[1]
        arg[(2, 2, 0)]=-0.618378459583*x[0] + (0.106153641763)*x[1]
        ref[(2, 2, 0)]=-0.618378459583*x_ref[0] + (0.106153641763)*x_ref[1]
        arg[(2, 2, 1)]=-0.570910256529*x[0] + (-0.593316609352)*x[1]
        ref[(2, 2, 1)]=-0.570910256529*x_ref[0] + (-0.593316609352)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.512203336041*x[2]
            ref[(0, 0, 0)]+=0.512203336041*x_ref[2]
            arg[(0, 0, 1)]+=0.851424329198*x[2]
            ref[(0, 0, 1)]+=0.851424329198*x_ref[2]
            arg[(0, 1, 0)]+=0.412626859298*x[2]
            ref[(0, 1, 0)]+=0.412626859298*x_ref[2]
            arg[(0, 1, 1)]+=0.432748926485*x[2]
            ref[(0, 1, 1)]+=0.432748926485*x_ref[2]
            arg[(0, 2, 0)]+=-0.827382158663*x[2]
            ref[(0, 2, 0)]+=-0.827382158663*x_ref[2]
            arg[(0, 2, 1)]+=-0.814847661825*x[2]
            ref[(0, 2, 1)]+=-0.814847661825*x_ref[2]
            arg[(1, 0, 0)]+=0.356780557372*x[2]
            ref[(1, 0, 0)]+=0.356780557372*x_ref[2]
            arg[(1, 0, 1)]+=0.2914919447*x[2]
            ref[(1, 0, 1)]+=0.2914919447*x_ref[2]
            arg[(1, 1, 0)]+=0.536221197567*x[2]
            ref[(1, 1, 0)]+=0.536221197567*x_ref[2]
            arg[(1, 1, 1)]+=0.0192417306734*x[2]
            ref[(1, 1, 1)]+=0.0192417306734*x_ref[2]
            arg[(1, 2, 0)]+=0.493676774431*x[2]
            ref[(1, 2, 0)]+=0.493676774431*x_ref[2]
            arg[(1, 2, 1)]+=-0.641252905033*x[2]
            ref[(1, 2, 1)]+=-0.641252905033*x_ref[2]
            arg[(2, 0, 0)]+=0.916951794996*x[2]
            ref[(2, 0, 0)]+=0.916951794996*x_ref[2]
            arg[(2, 0, 1)]+=0.175793428625*x[2]
            ref[(2, 0, 1)]+=0.175793428625*x_ref[2]
            arg[(2, 1, 0)]+=-0.384014887556*x[2]
            ref[(2, 1, 0)]+=-0.384014887556*x_ref[2]
            arg[(2, 1, 1)]+=0.986532230796*x[2]
            ref[(2, 1, 1)]+=0.986532230796*x_ref[2]
            arg[(2, 2, 0)]+=0.350699976012*x[2]
            ref[(2, 2, 0)]+=0.350699976012*x_ref[2]
            arg[(2, 2, 1)]+=0.918308138171*x[2]
            ref[(2, 2, 1)]+=0.918308138171*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 4, 2),w)
        ref = Data(0,(3, 2, 4, 2),w_ref)
        arg[(0, 0, 0, 0)]=-0.639634370492*x[0] + (0.572657006697)*x[1]
        ref[(0, 0, 0, 0)]=-0.639634370492*x_ref[0] + (0.572657006697)*x_ref[1]
        arg[(0, 0, 0, 1)]=-0.368387939014*x[0] + (-0.223254141264)*x[1]
        ref[(0, 0, 0, 1)]=-0.368387939014*x_ref[0] + (-0.223254141264)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.188700273603*x[0] + (-0.742313219165)*x[1]
        ref[(0, 0, 1, 0)]=0.188700273603*x_ref[0] + (-0.742313219165)*x_ref[1]
        arg[(0, 0, 1, 1)]=-0.437848159857*x[0] + (0.715941202687)*x[1]
        ref[(0, 0, 1, 1)]=-0.437848159857*x_ref[0] + (0.715941202687)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.965558707389*x[0] + (0.958392891124)*x[1]
        ref[(0, 0, 2, 0)]=-0.965558707389*x_ref[0] + (0.958392891124)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.330089802095*x[0] + (0.409572580086)*x[1]
        ref[(0, 0, 2, 1)]=-0.330089802095*x_ref[0] + (0.409572580086)*x_ref[1]
        arg[(0, 0, 3, 0)]=-0.687800968304*x[0] + (-0.884049877808)*x[1]
        ref[(0, 0, 3, 0)]=-0.687800968304*x_ref[0] + (-0.884049877808)*x_ref[1]
        arg[(0, 0, 3, 1)]=0.49489199044*x[0] + (0.191484364601)*x[1]
        ref[(0, 0, 3, 1)]=0.49489199044*x_ref[0] + (0.191484364601)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.492145373535*x[0] + (0.229100054918)*x[1]
        ref[(0, 1, 0, 0)]=0.492145373535*x_ref[0] + (0.229100054918)*x_ref[1]
        arg[(0, 1, 0, 1)]=-0.423862341747*x[0] + (-0.136658969996)*x[1]
        ref[(0, 1, 0, 1)]=-0.423862341747*x_ref[0] + (-0.136658969996)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.587937251208*x[0] + (0.556838328833)*x[1]
        ref[(0, 1, 1, 0)]=0.587937251208*x_ref[0] + (0.556838328833)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.26633078882*x[0] + (-0.576774941034)*x[1]
        ref[(0, 1, 1, 1)]=-0.26633078882*x_ref[0] + (-0.576774941034)*x_ref[1]
        arg[(0, 1, 2, 0)]=0.61616258999*x[0] + (-0.411178532123)*x[1]
        ref[(0, 1, 2, 0)]=0.61616258999*x_ref[0] + (-0.411178532123)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.230465962086*x[0] + (-0.841980561744)*x[1]
        ref[(0, 1, 2, 1)]=0.230465962086*x_ref[0] + (-0.841980561744)*x_ref[1]
        arg[(0, 1, 3, 0)]=-0.145978162107*x[0] + (0.737070453636)*x[1]
        ref[(0, 1, 3, 0)]=-0.145978162107*x_ref[0] + (0.737070453636)*x_ref[1]
        arg[(0, 1, 3, 1)]=-0.755510639366*x[0] + (-0.389973568681)*x[1]
        ref[(0, 1, 3, 1)]=-0.755510639366*x_ref[0] + (-0.389973568681)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.942068968827*x[0] + (0.87639894508)*x[1]
        ref[(1, 0, 0, 0)]=-0.942068968827*x_ref[0] + (0.87639894508)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.154331556734*x[0] + (0.181733992215)*x[1]
        ref[(1, 0, 0, 1)]=-0.154331556734*x_ref[0] + (0.181733992215)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.489047388584*x[0] + (0.851046495775)*x[1]
        ref[(1, 0, 1, 0)]=0.489047388584*x_ref[0] + (0.851046495775)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.387449823135*x[0] + (-0.215339116137)*x[1]
        ref[(1, 0, 1, 1)]=0.387449823135*x_ref[0] + (-0.215339116137)*x_ref[1]
        arg[(1, 0, 2, 0)]=0.997711377826*x[0] + (-0.937423646447)*x[1]
        ref[(1, 0, 2, 0)]=0.997711377826*x_ref[0] + (-0.937423646447)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.289804214724*x[0] + (0.979541790204)*x[1]
        ref[(1, 0, 2, 1)]=0.289804214724*x_ref[0] + (0.979541790204)*x_ref[1]
        arg[(1, 0, 3, 0)]=-0.0685487470379*x[0] + (-0.0784478196967)*x[1]
        ref[(1, 0, 3, 0)]=-0.0685487470379*x_ref[0] + (-0.0784478196967)*x_ref[1]
        arg[(1, 0, 3, 1)]=-0.908859007917*x[0] + (-0.915685460072)*x[1]
        ref[(1, 0, 3, 1)]=-0.908859007917*x_ref[0] + (-0.915685460072)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.587957161946*x[0] + (-0.83098513512)*x[1]
        ref[(1, 1, 0, 0)]=-0.587957161946*x_ref[0] + (-0.83098513512)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.283063475889*x[0] + (-0.901623428494)*x[1]
        ref[(1, 1, 0, 1)]=0.283063475889*x_ref[0] + (-0.901623428494)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.047386299951*x[0] + (-0.884017552951)*x[1]
        ref[(1, 1, 1, 0)]=-0.047386299951*x_ref[0] + (-0.884017552951)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.381286662638*x[0] + (0.145704163164)*x[1]
        ref[(1, 1, 1, 1)]=0.381286662638*x_ref[0] + (0.145704163164)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.152109965403*x[0] + (0.194393994024)*x[1]
        ref[(1, 1, 2, 0)]=-0.152109965403*x_ref[0] + (0.194393994024)*x_ref[1]
        arg[(1, 1, 2, 1)]=0.753121274601*x[0] + (0.756812487492)*x[1]
        ref[(1, 1, 2, 1)]=0.753121274601*x_ref[0] + (0.756812487492)*x_ref[1]
        arg[(1, 1, 3, 0)]=-0.326870313217*x[0] + (-0.617637203192)*x[1]
        ref[(1, 1, 3, 0)]=-0.326870313217*x_ref[0] + (-0.617637203192)*x_ref[1]
        arg[(1, 1, 3, 1)]=-0.67773955993*x[0] + (-0.733458804355)*x[1]
        ref[(1, 1, 3, 1)]=-0.67773955993*x_ref[0] + (-0.733458804355)*x_ref[1]
        arg[(2, 0, 0, 0)]=-0.352383658398*x[0] + (0.277262113336)*x[1]
        ref[(2, 0, 0, 0)]=-0.352383658398*x_ref[0] + (0.277262113336)*x_ref[1]
        arg[(2, 0, 0, 1)]=-0.170321297085*x[0] + (0.11729938617)*x[1]
        ref[(2, 0, 0, 1)]=-0.170321297085*x_ref[0] + (0.11729938617)*x_ref[1]
        arg[(2, 0, 1, 0)]=0.227799835789*x[0] + (0.349938636122)*x[1]
        ref[(2, 0, 1, 0)]=0.227799835789*x_ref[0] + (0.349938636122)*x_ref[1]
        arg[(2, 0, 1, 1)]=0.439990540419*x[0] + (-0.205989826691)*x[1]
        ref[(2, 0, 1, 1)]=0.439990540419*x_ref[0] + (-0.205989826691)*x_ref[1]
        arg[(2, 0, 2, 0)]=-0.842394444312*x[0] + (-0.500130741204)*x[1]
        ref[(2, 0, 2, 0)]=-0.842394444312*x_ref[0] + (-0.500130741204)*x_ref[1]
        arg[(2, 0, 2, 1)]=0.371077752354*x[0] + (-0.345866089287)*x[1]
        ref[(2, 0, 2, 1)]=0.371077752354*x_ref[0] + (-0.345866089287)*x_ref[1]
        arg[(2, 0, 3, 0)]=0.103721935143*x[0] + (-0.986518791025)*x[1]
        ref[(2, 0, 3, 0)]=0.103721935143*x_ref[0] + (-0.986518791025)*x_ref[1]
        arg[(2, 0, 3, 1)]=0.0683161060875*x[0] + (-0.506731068906)*x[1]
        ref[(2, 0, 3, 1)]=0.0683161060875*x_ref[0] + (-0.506731068906)*x_ref[1]
        arg[(2, 1, 0, 0)]=0.603182809771*x[0] + (0.772356630143)*x[1]
        ref[(2, 1, 0, 0)]=0.603182809771*x_ref[0] + (0.772356630143)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.677747941698*x[0] + (-0.698671234336)*x[1]
        ref[(2, 1, 0, 1)]=0.677747941698*x_ref[0] + (-0.698671234336)*x_ref[1]
        arg[(2, 1, 1, 0)]=-0.115289344351*x[0] + (0.931271831074)*x[1]
        ref[(2, 1, 1, 0)]=-0.115289344351*x_ref[0] + (0.931271831074)*x_ref[1]
        arg[(2, 1, 1, 1)]=-0.158268202066*x[0] + (0.889840938835)*x[1]
        ref[(2, 1, 1, 1)]=-0.158268202066*x_ref[0] + (0.889840938835)*x_ref[1]
        arg[(2, 1, 2, 0)]=0.465621724302*x[0] + (-0.0233058704091)*x[1]
        ref[(2, 1, 2, 0)]=0.465621724302*x_ref[0] + (-0.0233058704091)*x_ref[1]
        arg[(2, 1, 2, 1)]=-0.846375934399*x[0] + (0.339659606485)*x[1]
        ref[(2, 1, 2, 1)]=-0.846375934399*x_ref[0] + (0.339659606485)*x_ref[1]
        arg[(2, 1, 3, 0)]=0.648481421521*x[0] + (0.15061917665)*x[1]
        ref[(2, 1, 3, 0)]=0.648481421521*x_ref[0] + (0.15061917665)*x_ref[1]
        arg[(2, 1, 3, 1)]=-0.257970677539*x[0] + (0.0507899843251)*x[1]
        ref[(2, 1, 3, 1)]=-0.257970677539*x_ref[0] + (0.0507899843251)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.953075966569*x[2]
            ref[(0, 0, 0, 0)]+=0.953075966569*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.0612090247239*x[2]
            ref[(0, 0, 0, 1)]+=-0.0612090247239*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.0206284794981*x[2]
            ref[(0, 0, 1, 0)]+=0.0206284794981*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.783522412316*x[2]
            ref[(0, 0, 1, 1)]+=0.783522412316*x_ref[2]
            arg[(0, 0, 2, 0)]+=0.944991831745*x[2]
            ref[(0, 0, 2, 0)]+=0.944991831745*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.40023354764*x[2]
            ref[(0, 0, 2, 1)]+=0.40023354764*x_ref[2]
            arg[(0, 0, 3, 0)]+=0.377344052889*x[2]
            ref[(0, 0, 3, 0)]+=0.377344052889*x_ref[2]
            arg[(0, 0, 3, 1)]+=0.978357558341*x[2]
            ref[(0, 0, 3, 1)]+=0.978357558341*x_ref[2]
            arg[(0, 1, 0, 0)]+=0.538315966594*x[2]
            ref[(0, 1, 0, 0)]+=0.538315966594*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.643590368439*x[2]
            ref[(0, 1, 0, 1)]+=0.643590368439*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.358592714743*x[2]
            ref[(0, 1, 1, 0)]+=0.358592714743*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.951190923887*x[2]
            ref[(0, 1, 1, 1)]+=-0.951190923887*x_ref[2]
            arg[(0, 1, 2, 0)]+=0.148510705723*x[2]
            ref[(0, 1, 2, 0)]+=0.148510705723*x_ref[2]
            arg[(0, 1, 2, 1)]+=0.124999561854*x[2]
            ref[(0, 1, 2, 1)]+=0.124999561854*x_ref[2]
            arg[(0, 1, 3, 0)]+=-0.390168181237*x[2]
            ref[(0, 1, 3, 0)]+=-0.390168181237*x_ref[2]
            arg[(0, 1, 3, 1)]+=0.0961953398784*x[2]
            ref[(0, 1, 3, 1)]+=0.0961953398784*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.717405684136*x[2]
            ref[(1, 0, 0, 0)]+=0.717405684136*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.380441845455*x[2]
            ref[(1, 0, 0, 1)]+=0.380441845455*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.109112845313*x[2]
            ref[(1, 0, 1, 0)]+=0.109112845313*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.172863479302*x[2]
            ref[(1, 0, 1, 1)]+=0.172863479302*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.562645550908*x[2]
            ref[(1, 0, 2, 0)]+=-0.562645550908*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.0026611852921*x[2]
            ref[(1, 0, 2, 1)]+=0.0026611852921*x_ref[2]
            arg[(1, 0, 3, 0)]+=-0.251548404025*x[2]
            ref[(1, 0, 3, 0)]+=-0.251548404025*x_ref[2]
            arg[(1, 0, 3, 1)]+=0.843394786987*x[2]
            ref[(1, 0, 3, 1)]+=0.843394786987*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.0898684520006*x[2]
            ref[(1, 1, 0, 0)]+=-0.0898684520006*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.48966666066*x[2]
            ref[(1, 1, 0, 1)]+=0.48966666066*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.342137557022*x[2]
            ref[(1, 1, 1, 0)]+=0.342137557022*x_ref[2]
            arg[(1, 1, 1, 1)]+=-0.320655864356*x[2]
            ref[(1, 1, 1, 1)]+=-0.320655864356*x_ref[2]
            arg[(1, 1, 2, 0)]+=0.824157776626*x[2]
            ref[(1, 1, 2, 0)]+=0.824157776626*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.0918142366159*x[2]
            ref[(1, 1, 2, 1)]+=0.0918142366159*x_ref[2]
            arg[(1, 1, 3, 0)]+=-0.973038775692*x[2]
            ref[(1, 1, 3, 0)]+=-0.973038775692*x_ref[2]
            arg[(1, 1, 3, 1)]+=-0.365297475993*x[2]
            ref[(1, 1, 3, 1)]+=-0.365297475993*x_ref[2]
            arg[(2, 0, 0, 0)]+=-0.762085608675*x[2]
            ref[(2, 0, 0, 0)]+=-0.762085608675*x_ref[2]
            arg[(2, 0, 0, 1)]+=0.601370476607*x[2]
            ref[(2, 0, 0, 1)]+=0.601370476607*x_ref[2]
            arg[(2, 0, 1, 0)]+=0.98596012377*x[2]
            ref[(2, 0, 1, 0)]+=0.98596012377*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.942689382316*x[2]
            ref[(2, 0, 1, 1)]+=0.942689382316*x_ref[2]
            arg[(2, 0, 2, 0)]+=0.118278728747*x[2]
            ref[(2, 0, 2, 0)]+=0.118278728747*x_ref[2]
            arg[(2, 0, 2, 1)]+=0.849505205919*x[2]
            ref[(2, 0, 2, 1)]+=0.849505205919*x_ref[2]
            arg[(2, 0, 3, 0)]+=0.785779747213*x[2]
            ref[(2, 0, 3, 0)]+=0.785779747213*x_ref[2]
            arg[(2, 0, 3, 1)]+=0.273487430267*x[2]
            ref[(2, 0, 3, 1)]+=0.273487430267*x_ref[2]
            arg[(2, 1, 0, 0)]+=0.00150040050151*x[2]
            ref[(2, 1, 0, 0)]+=0.00150040050151*x_ref[2]
            arg[(2, 1, 0, 1)]+=0.31183392109*x[2]
            ref[(2, 1, 0, 1)]+=0.31183392109*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.0983402385396*x[2]
            ref[(2, 1, 1, 0)]+=0.0983402385396*x_ref[2]
            arg[(2, 1, 1, 1)]+=0.321444037789*x[2]
            ref[(2, 1, 1, 1)]+=0.321444037789*x_ref[2]
            arg[(2, 1, 2, 0)]+=0.178613380118*x[2]
            ref[(2, 1, 2, 0)]+=0.178613380118*x_ref[2]
            arg[(2, 1, 2, 1)]+=-0.420209279471*x[2]
            ref[(2, 1, 2, 1)]+=-0.420209279471*x_ref[2]
            arg[(2, 1, 3, 0)]+=0.928125105521*x[2]
            ref[(2, 1, 3, 0)]+=0.928125105521*x_ref[2]
            arg[(2, 1, 3, 1)]+=-0.39764655829*x[2]
            ref[(2, 1, 3, 1)]+=-0.39764655829*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ReducedFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports interpolation from ReducedFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.175226667882*x[0]**o + (0.206476965469)*x[0] + (0.894303657771)*x[1]**o + (0.187903821684)*x[1]
        ref=-0.175226667882*x_ref[0]**o + (0.206476965469)*x_ref[0] + (0.894303657771)*x_ref[1]**o + (0.187903821684)*x_ref[1]
        if dim==3:
            arg+=(0.968277886848)*x[2]**o + (-0.960398773148)*x[2]
            ref+=(0.968277886848)*x_ref[2]**o + (-0.960398773148)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ReducedFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports interpolation from ReducedFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=0.565414174198*x[0]**o + (0.298420817661)*x[0] + (-0.862005147414)*x[1]**o + (0.415101660919)*x[1]
        ref[(0,)]=0.565414174198*x_ref[0]**o + (0.298420817661)*x_ref[0] + (-0.862005147414)*x_ref[1]**o + (0.415101660919)*x_ref[1]
        arg[(1,)]=0.309643775636*x[0]**o + (0.101029273957)*x[0] + (-0.372371561196)*x[1]**o + (0.939922437534)*x[1]
        ref[(1,)]=0.309643775636*x_ref[0]**o + (0.101029273957)*x_ref[0] + (-0.372371561196)*x_ref[1]**o + (0.939922437534)*x_ref[1]
        arg[(2,)]=0.697076312397*x[0]**o + (-0.946219786114)*x[0] + (-0.587541673483)*x[1]**o + (0.0410341583248)*x[1]
        ref[(2,)]=0.697076312397*x_ref[0]**o + (-0.946219786114)*x_ref[0] + (-0.587541673483)*x_ref[1]**o + (0.0410341583248)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.546845574471*x[2]**o + (0.831415498944)*x[2]
            ref[(0,)]+=-0.546845574471*x_ref[2]**o + (0.831415498944)*x_ref[2]
            arg[(1,)]+=0.28694651445*x[2]**o + (-0.325824438445)*x[2]
            ref[(1,)]+=0.28694651445*x_ref[2]**o + (-0.325824438445)*x_ref[2]
            arg[(2,)]+=-0.656826068273*x[2]**o + (0.730696276418)*x[2]
            ref[(2,)]+=-0.656826068273*x_ref[2]**o + (0.730696276418)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ReducedFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports interpolation from ReducedFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref = Data(0,(2, 3),w_ref)
        arg[(0, 0)]=0.157771823485*x[0]**o + (0.22369254067)*x[0] + (0.819754145259)*x[1]**o + (-0.465099173877)*x[1]
        ref[(0, 0)]=0.157771823485*x_ref[0]**o + (0.22369254067)*x_ref[0] + (0.819754145259)*x_ref[1]**o + (-0.465099173877)*x_ref[1]
        arg[(0, 1)]=0.477664030434*x[0]**o + (0.0487811516937)*x[0] + (0.291005881861)*x[1]**o + (-0.71206229216)*x[1]
        ref[(0, 1)]=0.477664030434*x_ref[0]**o + (0.0487811516937)*x_ref[0] + (0.291005881861)*x_ref[1]**o + (-0.71206229216)*x_ref[1]
        arg[(0, 2)]=0.0214323444882*x[0]**o + (0.556743861657)*x[0] + (0.991309331802)*x[1]**o + (-0.337277672608)*x[1]
        ref[(0, 2)]=0.0214323444882*x_ref[0]**o + (0.556743861657)*x_ref[0] + (0.991309331802)*x_ref[1]**o + (-0.337277672608)*x_ref[1]
        arg[(1, 0)]=-0.821698122084*x[0]**o + (0.032467616046)*x[0] + (0.393774396703)*x[1]**o + (-0.0636972699536)*x[1]
        ref[(1, 0)]=-0.821698122084*x_ref[0]**o + (0.032467616046)*x_ref[0] + (0.393774396703)*x_ref[1]**o + (-0.0636972699536)*x_ref[1]
        arg[(1, 1)]=-0.868435507983*x[0]**o + (0.491945697182)*x[0] + (0.865166288589)*x[1]**o + (0.607201287507)*x[1]
        ref[(1, 1)]=-0.868435507983*x_ref[0]**o + (0.491945697182)*x_ref[0] + (0.865166288589)*x_ref[1]**o + (0.607201287507)*x_ref[1]
        arg[(1, 2)]=-0.0251540034227*x[0]**o + (-0.890415922724)*x[0] + (-0.6883774706)*x[1]**o + (-0.335368640359)*x[1]
        ref[(1, 2)]=-0.0251540034227*x_ref[0]**o + (-0.890415922724)*x_ref[0] + (-0.6883774706)*x_ref[1]**o + (-0.335368640359)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.920445114536*x[2]**o + (0.0382710017148)*x[2]
            ref[(0, 0)]+=-0.920445114536*x_ref[2]**o + (0.0382710017148)*x_ref[2]
            arg[(0, 1)]+=-0.0856512157409*x[2]**o + (0.822404094338)*x[2]
            ref[(0, 1)]+=-0.0856512157409*x_ref[2]**o + (0.822404094338)*x_ref[2]
            arg[(0, 2)]+=-0.889239621319*x[2]**o + (-0.107023868444)*x[2]
            ref[(0, 2)]+=-0.889239621319*x_ref[2]**o + (-0.107023868444)*x_ref[2]
            arg[(1, 0)]+=0.0313135963431*x[2]**o + (-0.0161125100985)*x[2]
            ref[(1, 0)]+=0.0313135963431*x_ref[2]**o + (-0.0161125100985)*x_ref[2]
            arg[(1, 1)]+=0.17766788464*x[2]**o + (0.76917804879)*x[2]
            ref[(1, 1)]+=0.17766788464*x_ref[2]**o + (0.76917804879)*x_ref[2]
            arg[(1, 2)]+=0.396993748628*x[2]**o + (0.68166949075)*x[2]
            ref[(1, 2)]+=0.396993748628*x_ref[2]**o + (0.68166949075)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ReducedFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports interpolation from ReducedFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 3),w)
        ref = Data(0,(3, 4, 3),w_ref)
        arg[(0, 0, 0)]=-0.276296325853*x[0]**o + (0.96362187348)*x[0] + (0.816255333344)*x[1]**o + (-0.156178362786)*x[1]
        ref[(0, 0, 0)]=-0.276296325853*x_ref[0]**o + (0.96362187348)*x_ref[0] + (0.816255333344)*x_ref[1]**o + (-0.156178362786)*x_ref[1]
        arg[(0, 0, 1)]=-0.0579214505731*x[0]**o + (0.366440276008)*x[0] + (0.827087343308)*x[1]**o + (-0.231399830617)*x[1]
        ref[(0, 0, 1)]=-0.0579214505731*x_ref[0]**o + (0.366440276008)*x_ref[0] + (0.827087343308)*x_ref[1]**o + (-0.231399830617)*x_ref[1]
        arg[(0, 0, 2)]=0.441576562754*x[0]**o + (-0.95708769948)*x[0] + (-0.168691621331)*x[1]**o + (0.347824677143)*x[1]
        ref[(0, 0, 2)]=0.441576562754*x_ref[0]**o + (-0.95708769948)*x_ref[0] + (-0.168691621331)*x_ref[1]**o + (0.347824677143)*x_ref[1]
        arg[(0, 1, 0)]=0.438444695749*x[0]**o + (0.426918463622)*x[0] + (0.515024648016)*x[1]**o + (0.45891543541)*x[1]
        ref[(0, 1, 0)]=0.438444695749*x_ref[0]**o + (0.426918463622)*x_ref[0] + (0.515024648016)*x_ref[1]**o + (0.45891543541)*x_ref[1]
        arg[(0, 1, 1)]=-0.617970905326*x[0]**o + (-0.843930992547)*x[0] + (0.59324912098)*x[1]**o + (0.973506905121)*x[1]
        ref[(0, 1, 1)]=-0.617970905326*x_ref[0]**o + (-0.843930992547)*x_ref[0] + (0.59324912098)*x_ref[1]**o + (0.973506905121)*x_ref[1]
        arg[(0, 1, 2)]=0.522745571841*x[0]**o + (0.817264038385)*x[0] + (0.64110717768)*x[1]**o + (0.85526321959)*x[1]
        ref[(0, 1, 2)]=0.522745571841*x_ref[0]**o + (0.817264038385)*x_ref[0] + (0.64110717768)*x_ref[1]**o + (0.85526321959)*x_ref[1]
        arg[(0, 2, 0)]=-0.223307392429*x[0]**o + (0.49914977932)*x[0] + (-0.905637469266)*x[1]**o + (0.888581611614)*x[1]
        ref[(0, 2, 0)]=-0.223307392429*x_ref[0]**o + (0.49914977932)*x_ref[0] + (-0.905637469266)*x_ref[1]**o + (0.888581611614)*x_ref[1]
        arg[(0, 2, 1)]=0.686062083326*x[0]**o + (-0.29541995291)*x[0] + (0.00724472459075)*x[1]**o + (-0.895682061928)*x[1]
        ref[(0, 2, 1)]=0.686062083326*x_ref[0]**o + (-0.29541995291)*x_ref[0] + (0.00724472459075)*x_ref[1]**o + (-0.895682061928)*x_ref[1]
        arg[(0, 2, 2)]=0.213483231197*x[0]**o + (-0.507984274056)*x[0] + (-0.698808114877)*x[1]**o + (-0.16617856725)*x[1]
        ref[(0, 2, 2)]=0.213483231197*x_ref[0]**o + (-0.507984274056)*x_ref[0] + (-0.698808114877)*x_ref[1]**o + (-0.16617856725)*x_ref[1]
        arg[(0, 3, 0)]=-0.911757052034*x[0]**o + (0.447421182975)*x[0] + (-0.110657166015)*x[1]**o + (0.0660396712571)*x[1]
        ref[(0, 3, 0)]=-0.911757052034*x_ref[0]**o + (0.447421182975)*x_ref[0] + (-0.110657166015)*x_ref[1]**o + (0.0660396712571)*x_ref[1]
        arg[(0, 3, 1)]=0.624096250963*x[0]**o + (0.079285635522)*x[0] + (-0.503001337915)*x[1]**o + (-0.943720464894)*x[1]
        ref[(0, 3, 1)]=0.624096250963*x_ref[0]**o + (0.079285635522)*x_ref[0] + (-0.503001337915)*x_ref[1]**o + (-0.943720464894)*x_ref[1]
        arg[(0, 3, 2)]=-0.938521719566*x[0]**o + (0.155261469438)*x[0] + (0.12308669595)*x[1]**o + (-0.561508360784)*x[1]
        ref[(0, 3, 2)]=-0.938521719566*x_ref[0]**o + (0.155261469438)*x_ref[0] + (0.12308669595)*x_ref[1]**o + (-0.561508360784)*x_ref[1]
        arg[(1, 0, 0)]=0.372890188347*x[0]**o + (-0.726828462275)*x[0] + (0.374301715847)*x[1]**o + (0.703600379111)*x[1]
        ref[(1, 0, 0)]=0.372890188347*x_ref[0]**o + (-0.726828462275)*x_ref[0] + (0.374301715847)*x_ref[1]**o + (0.703600379111)*x_ref[1]
        arg[(1, 0, 1)]=-0.525686108297*x[0]**o + (-0.140082508765)*x[0] + (0.258157214909)*x[1]**o + (-0.657358337415)*x[1]
        ref[(1, 0, 1)]=-0.525686108297*x_ref[0]**o + (-0.140082508765)*x_ref[0] + (0.258157214909)*x_ref[1]**o + (-0.657358337415)*x_ref[1]
        arg[(1, 0, 2)]=0.290424300561*x[0]**o + (0.823623493097)*x[0] + (0.287572140584)*x[1]**o + (0.290013944647)*x[1]
        ref[(1, 0, 2)]=0.290424300561*x_ref[0]**o + (0.823623493097)*x_ref[0] + (0.287572140584)*x_ref[1]**o + (0.290013944647)*x_ref[1]
        arg[(1, 1, 0)]=-0.394933953017*x[0]**o + (-0.176346343604)*x[0] + (-0.0218985850108)*x[1]**o + (0.0552273624694)*x[1]
        ref[(1, 1, 0)]=-0.394933953017*x_ref[0]**o + (-0.176346343604)*x_ref[0] + (-0.0218985850108)*x_ref[1]**o + (0.0552273624694)*x_ref[1]
        arg[(1, 1, 1)]=-0.480567755421*x[0]**o + (-0.920343007272)*x[0] + (0.432993713175)*x[1]**o + (0.816263791383)*x[1]
        ref[(1, 1, 1)]=-0.480567755421*x_ref[0]**o + (-0.920343007272)*x_ref[0] + (0.432993713175)*x_ref[1]**o + (0.816263791383)*x_ref[1]
        arg[(1, 1, 2)]=-0.501384788278*x[0]**o + (0.182931033335)*x[0] + (-0.22714876549)*x[1]**o + (0.27192493085)*x[1]
        ref[(1, 1, 2)]=-0.501384788278*x_ref[0]**o + (0.182931033335)*x_ref[0] + (-0.22714876549)*x_ref[1]**o + (0.27192493085)*x_ref[1]
        arg[(1, 2, 0)]=-0.314578735435*x[0]**o + (0.207609802948)*x[0] + (0.664993570961)*x[1]**o + (-0.77560224283)*x[1]
        ref[(1, 2, 0)]=-0.314578735435*x_ref[0]**o + (0.207609802948)*x_ref[0] + (0.664993570961)*x_ref[1]**o + (-0.77560224283)*x_ref[1]
        arg[(1, 2, 1)]=-0.57475422537*x[0]**o + (-0.84602639857)*x[0] + (0.820048971194)*x[1]**o + (0.59990128607)*x[1]
        ref[(1, 2, 1)]=-0.57475422537*x_ref[0]**o + (-0.84602639857)*x_ref[0] + (0.820048971194)*x_ref[1]**o + (0.59990128607)*x_ref[1]
        arg[(1, 2, 2)]=-0.828972625787*x[0]**o + (-0.414440709979)*x[0] + (-0.587174639772)*x[1]**o + (-0.568653398101)*x[1]
        ref[(1, 2, 2)]=-0.828972625787*x_ref[0]**o + (-0.414440709979)*x_ref[0] + (-0.587174639772)*x_ref[1]**o + (-0.568653398101)*x_ref[1]
        arg[(1, 3, 0)]=0.50046650783*x[0]**o + (-0.0807753721777)*x[0] + (-0.0922625823514)*x[1]**o + (0.387710904799)*x[1]
        ref[(1, 3, 0)]=0.50046650783*x_ref[0]**o + (-0.0807753721777)*x_ref[0] + (-0.0922625823514)*x_ref[1]**o + (0.387710904799)*x_ref[1]
        arg[(1, 3, 1)]=-0.436061412335*x[0]**o + (-0.280459216294)*x[0] + (-0.386251393434)*x[1]**o + (0.626106699274)*x[1]
        ref[(1, 3, 1)]=-0.436061412335*x_ref[0]**o + (-0.280459216294)*x_ref[0] + (-0.386251393434)*x_ref[1]**o + (0.626106699274)*x_ref[1]
        arg[(1, 3, 2)]=-0.202236075062*x[0]**o + (0.740599418987)*x[0] + (-0.0968245461928)*x[1]**o + (0.982135538611)*x[1]
        ref[(1, 3, 2)]=-0.202236075062*x_ref[0]**o + (0.740599418987)*x_ref[0] + (-0.0968245461928)*x_ref[1]**o + (0.982135538611)*x_ref[1]
        arg[(2, 0, 0)]=0.932931249613*x[0]**o + (0.392370051458)*x[0] + (0.539641037303)*x[1]**o + (0.710842684881)*x[1]
        ref[(2, 0, 0)]=0.932931249613*x_ref[0]**o + (0.392370051458)*x_ref[0] + (0.539641037303)*x_ref[1]**o + (0.710842684881)*x_ref[1]
        arg[(2, 0, 1)]=-0.0414102128908*x[0]**o + (0.302477907059)*x[0] + (-0.640380883751)*x[1]**o + (0.33467072027)*x[1]
        ref[(2, 0, 1)]=-0.0414102128908*x_ref[0]**o + (0.302477907059)*x_ref[0] + (-0.640380883751)*x_ref[1]**o + (0.33467072027)*x_ref[1]
        arg[(2, 0, 2)]=-0.150753999462*x[0]**o + (-0.413519813679)*x[0] + (-0.347070998166)*x[1]**o + (-0.943162493548)*x[1]
        ref[(2, 0, 2)]=-0.150753999462*x_ref[0]**o + (-0.413519813679)*x_ref[0] + (-0.347070998166)*x_ref[1]**o + (-0.943162493548)*x_ref[1]
        arg[(2, 1, 0)]=-0.20993565576*x[0]**o + (0.506577139525)*x[0] + (-0.473440605549)*x[1]**o + (-0.970038587094)*x[1]
        ref[(2, 1, 0)]=-0.20993565576*x_ref[0]**o + (0.506577139525)*x_ref[0] + (-0.473440605549)*x_ref[1]**o + (-0.970038587094)*x_ref[1]
        arg[(2, 1, 1)]=-0.426475931207*x[0]**o + (-0.03764204235)*x[0] + (-0.11990761187)*x[1]**o + (-0.482513191167)*x[1]
        ref[(2, 1, 1)]=-0.426475931207*x_ref[0]**o + (-0.03764204235)*x_ref[0] + (-0.11990761187)*x_ref[1]**o + (-0.482513191167)*x_ref[1]
        arg[(2, 1, 2)]=-0.70105840218*x[0]**o + (0.71324745933)*x[0] + (-0.253061853687)*x[1]**o + (0.602255146294)*x[1]
        ref[(2, 1, 2)]=-0.70105840218*x_ref[0]**o + (0.71324745933)*x_ref[0] + (-0.253061853687)*x_ref[1]**o + (0.602255146294)*x_ref[1]
        arg[(2, 2, 0)]=-0.3092190692*x[0]**o + (-0.215681956884)*x[0] + (0.845868017226)*x[1]**o + (-0.759550199579)*x[1]
        ref[(2, 2, 0)]=-0.3092190692*x_ref[0]**o + (-0.215681956884)*x_ref[0] + (0.845868017226)*x_ref[1]**o + (-0.759550199579)*x_ref[1]
        arg[(2, 2, 1)]=-0.148168625419*x[0]**o + (0.980318324596)*x[0] + (-0.206152154279)*x[1]**o + (0.152363611569)*x[1]
        ref[(2, 2, 1)]=-0.148168625419*x_ref[0]**o + (0.980318324596)*x_ref[0] + (-0.206152154279)*x_ref[1]**o + (0.152363611569)*x_ref[1]
        arg[(2, 2, 2)]=0.224279123122*x[0]**o + (0.379938583162)*x[0] + (0.61786631909)*x[1]**o + (0.505909132523)*x[1]
        ref[(2, 2, 2)]=0.224279123122*x_ref[0]**o + (0.379938583162)*x_ref[0] + (0.61786631909)*x_ref[1]**o + (0.505909132523)*x_ref[1]
        arg[(2, 3, 0)]=0.60880584783*x[0]**o + (0.400930912474)*x[0] + (-0.593654873607)*x[1]**o + (-0.903899003924)*x[1]
        ref[(2, 3, 0)]=0.60880584783*x_ref[0]**o + (0.400930912474)*x_ref[0] + (-0.593654873607)*x_ref[1]**o + (-0.903899003924)*x_ref[1]
        arg[(2, 3, 1)]=0.0920186587311*x[0]**o + (-0.224069534369)*x[0] + (-0.0242556776206)*x[1]**o + (-0.898958886787)*x[1]
        ref[(2, 3, 1)]=0.0920186587311*x_ref[0]**o + (-0.224069534369)*x_ref[0] + (-0.0242556776206)*x_ref[1]**o + (-0.898958886787)*x_ref[1]
        arg[(2, 3, 2)]=0.354985284617*x[0]**o + (0.126125406934)*x[0] + (0.048157152957)*x[1]**o + (0.731874507516)*x[1]
        ref[(2, 3, 2)]=0.354985284617*x_ref[0]**o + (0.126125406934)*x_ref[0] + (0.048157152957)*x_ref[1]**o + (0.731874507516)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.665778427699*x[2]**o + (-0.7243454248)*x[2]
            ref[(0, 0, 0)]+=0.665778427699*x_ref[2]**o + (-0.7243454248)*x_ref[2]
            arg[(0, 0, 1)]+=0.365186175635*x[2]**o + (-0.36287759843)*x[2]
            ref[(0, 0, 1)]+=0.365186175635*x_ref[2]**o + (-0.36287759843)*x_ref[2]
            arg[(0, 0, 2)]+=0.355013724495*x[2]**o + (0.923955005984)*x[2]
            ref[(0, 0, 2)]+=0.355013724495*x_ref[2]**o + (0.923955005984)*x_ref[2]
            arg[(0, 1, 0)]+=0.377789689377*x[2]**o + (-0.21994859799)*x[2]
            ref[(0, 1, 0)]+=0.377789689377*x_ref[2]**o + (-0.21994859799)*x_ref[2]
            arg[(0, 1, 1)]+=0.734745223948*x[2]**o + (0.855770027778)*x[2]
            ref[(0, 1, 1)]+=0.734745223948*x_ref[2]**o + (0.855770027778)*x_ref[2]
            arg[(0, 1, 2)]+=0.910589978791*x[2]**o + (0.779874795482)*x[2]
            ref[(0, 1, 2)]+=0.910589978791*x_ref[2]**o + (0.779874795482)*x_ref[2]
            arg[(0, 2, 0)]+=0.308943146594*x[2]**o + (-0.23480547586)*x[2]
            ref[(0, 2, 0)]+=0.308943146594*x_ref[2]**o + (-0.23480547586)*x_ref[2]
            arg[(0, 2, 1)]+=-0.580794601271*x[2]**o + (0.499678520887)*x[2]
            ref[(0, 2, 1)]+=-0.580794601271*x_ref[2]**o + (0.499678520887)*x_ref[2]
            arg[(0, 2, 2)]+=-0.538383855271*x[2]**o + (0.310372325848)*x[2]
            ref[(0, 2, 2)]+=-0.538383855271*x_ref[2]**o + (0.310372325848)*x_ref[2]
            arg[(0, 3, 0)]+=0.225959831714*x[2]**o + (0.334796860702)*x[2]
            ref[(0, 3, 0)]+=0.225959831714*x_ref[2]**o + (0.334796860702)*x_ref[2]
            arg[(0, 3, 1)]+=-0.259571759935*x[2]**o + (0.530960667739)*x[2]
            ref[(0, 3, 1)]+=-0.259571759935*x_ref[2]**o + (0.530960667739)*x_ref[2]
            arg[(0, 3, 2)]+=0.615206189186*x[2]**o + (-0.0314843107524)*x[2]
            ref[(0, 3, 2)]+=0.615206189186*x_ref[2]**o + (-0.0314843107524)*x_ref[2]
            arg[(1, 0, 0)]+=0.377020152797*x[2]**o + (0.704157168199)*x[2]
            ref[(1, 0, 0)]+=0.377020152797*x_ref[2]**o + (0.704157168199)*x_ref[2]
            arg[(1, 0, 1)]+=-0.320347473989*x[2]**o + (-0.345420774473)*x[2]
            ref[(1, 0, 1)]+=-0.320347473989*x_ref[2]**o + (-0.345420774473)*x_ref[2]
            arg[(1, 0, 2)]+=0.73976798306*x[2]**o + (0.764744040531)*x[2]
            ref[(1, 0, 2)]+=0.73976798306*x_ref[2]**o + (0.764744040531)*x_ref[2]
            arg[(1, 1, 0)]+=-0.810137951159*x[2]**o + (-0.0789524935413)*x[2]
            ref[(1, 1, 0)]+=-0.810137951159*x_ref[2]**o + (-0.0789524935413)*x_ref[2]
            arg[(1, 1, 1)]+=0.342661653585*x[2]**o + (0.0569185055381)*x[2]
            ref[(1, 1, 1)]+=0.342661653585*x_ref[2]**o + (0.0569185055381)*x_ref[2]
            arg[(1, 1, 2)]+=0.901700634189*x[2]**o + (-0.612378445476)*x[2]
            ref[(1, 1, 2)]+=0.901700634189*x_ref[2]**o + (-0.612378445476)*x_ref[2]
            arg[(1, 2, 0)]+=-0.945076622423*x[2]**o + (-0.953976008189)*x[2]
            ref[(1, 2, 0)]+=-0.945076622423*x_ref[2]**o + (-0.953976008189)*x_ref[2]
            arg[(1, 2, 1)]+=0.893637679765*x[2]**o + (-0.483437532425)*x[2]
            ref[(1, 2, 1)]+=0.893637679765*x_ref[2]**o + (-0.483437532425)*x_ref[2]
            arg[(1, 2, 2)]+=0.192646072374*x[2]**o + (0.8477770645)*x[2]
            ref[(1, 2, 2)]+=0.192646072374*x_ref[2]**o + (0.8477770645)*x_ref[2]
            arg[(1, 3, 0)]+=0.631213220585*x[2]**o + (-0.997794919326)*x[2]
            ref[(1, 3, 0)]+=0.631213220585*x_ref[2]**o + (-0.997794919326)*x_ref[2]
            arg[(1, 3, 1)]+=-0.258616726092*x[2]**o + (-0.021341137708)*x[2]
            ref[(1, 3, 1)]+=-0.258616726092*x_ref[2]**o + (-0.021341137708)*x_ref[2]
            arg[(1, 3, 2)]+=0.049079489818*x[2]**o + (-0.300561123329)*x[2]
            ref[(1, 3, 2)]+=0.049079489818*x_ref[2]**o + (-0.300561123329)*x_ref[2]
            arg[(2, 0, 0)]+=-0.117641033003*x[2]**o + (-0.457953116996)*x[2]
            ref[(2, 0, 0)]+=-0.117641033003*x_ref[2]**o + (-0.457953116996)*x_ref[2]
            arg[(2, 0, 1)]+=-0.458841390675*x[2]**o + (0.596235331169)*x[2]
            ref[(2, 0, 1)]+=-0.458841390675*x_ref[2]**o + (0.596235331169)*x_ref[2]
            arg[(2, 0, 2)]+=-0.672485677267*x[2]**o + (0.933270818294)*x[2]
            ref[(2, 0, 2)]+=-0.672485677267*x_ref[2]**o + (0.933270818294)*x_ref[2]
            arg[(2, 1, 0)]+=0.997374205631*x[2]**o + (-0.384739596011)*x[2]
            ref[(2, 1, 0)]+=0.997374205631*x_ref[2]**o + (-0.384739596011)*x_ref[2]
            arg[(2, 1, 1)]+=0.846354514357*x[2]**o + (0.306823476893)*x[2]
            ref[(2, 1, 1)]+=0.846354514357*x_ref[2]**o + (0.306823476893)*x_ref[2]
            arg[(2, 1, 2)]+=-0.248493656959*x[2]**o + (-0.561881348799)*x[2]
            ref[(2, 1, 2)]+=-0.248493656959*x_ref[2]**o + (-0.561881348799)*x_ref[2]
            arg[(2, 2, 0)]+=-0.697252256609*x[2]**o + (-0.0285191204426)*x[2]
            ref[(2, 2, 0)]+=-0.697252256609*x_ref[2]**o + (-0.0285191204426)*x_ref[2]
            arg[(2, 2, 1)]+=0.0515326621014*x[2]**o + (-0.713062679833)*x[2]
            ref[(2, 2, 1)]+=0.0515326621014*x_ref[2]**o + (-0.713062679833)*x_ref[2]
            arg[(2, 2, 2)]+=0.0470040445313*x[2]**o + (0.604758314625)*x[2]
            ref[(2, 2, 2)]+=0.0470040445313*x_ref[2]**o + (0.604758314625)*x_ref[2]
            arg[(2, 3, 0)]+=0.227632179995*x[2]**o + (-0.0636914377951)*x[2]
            ref[(2, 3, 0)]+=0.227632179995*x_ref[2]**o + (-0.0636914377951)*x_ref[2]
            arg[(2, 3, 1)]+=0.587035342434*x[2]**o + (-0.64794985875)*x[2]
            ref[(2, 3, 1)]+=0.587035342434*x_ref[2]**o + (-0.64794985875)*x_ref[2]
            arg[(2, 3, 2)]+=-0.140200015132*x[2]**o + (0.781589878905)*x[2]
            ref[(2, 3, 2)]+=-0.140200015132*x_ref[2]**o + (0.781589878905)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunction_fromData_ReducedFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports interpolation from ReducedFunction to ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 3, 4),w)
        ref = Data(0,(3, 4, 3, 4),w_ref)
        arg[(0, 0, 0, 0)]=0.469405766196*x[0]**o + (-0.232147474334)*x[0] + (-0.164941462106)*x[1]**o + (0.691160341537)*x[1]
        ref[(0, 0, 0, 0)]=0.469405766196*x_ref[0]**o + (-0.232147474334)*x_ref[0] + (-0.164941462106)*x_ref[1]**o + (0.691160341537)*x_ref[1]
        arg[(0, 0, 0, 1)]=-0.344586802504*x[0]**o + (-0.29780600376)*x[0] + (-0.435280750565)*x[1]**o + (0.188269391886)*x[1]
        ref[(0, 0, 0, 1)]=-0.344586802504*x_ref[0]**o + (-0.29780600376)*x_ref[0] + (-0.435280750565)*x_ref[1]**o + (0.188269391886)*x_ref[1]
        arg[(0, 0, 0, 2)]=-0.769255361312*x[0]**o + (0.594596799302)*x[0] + (0.857485537783)*x[1]**o + (0.8991461166)*x[1]
        ref[(0, 0, 0, 2)]=-0.769255361312*x_ref[0]**o + (0.594596799302)*x_ref[0] + (0.857485537783)*x_ref[1]**o + (0.8991461166)*x_ref[1]
        arg[(0, 0, 0, 3)]=0.655443871145*x[0]**o + (-0.870016586262)*x[0] + (0.527990238451)*x[1]**o + (-0.369545378204)*x[1]
        ref[(0, 0, 0, 3)]=0.655443871145*x_ref[0]**o + (-0.870016586262)*x_ref[0] + (0.527990238451)*x_ref[1]**o + (-0.369545378204)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.676768220145*x[0]**o + (0.954236982437)*x[0] + (0.058449197454)*x[1]**o + (0.262972933186)*x[1]
        ref[(0, 0, 1, 0)]=-0.676768220145*x_ref[0]**o + (0.954236982437)*x_ref[0] + (0.058449197454)*x_ref[1]**o + (0.262972933186)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.220385439714*x[0]**o + (-0.875138356427)*x[0] + (-0.705278434083)*x[1]**o + (-0.766594904078)*x[1]
        ref[(0, 0, 1, 1)]=0.220385439714*x_ref[0]**o + (-0.875138356427)*x_ref[0] + (-0.705278434083)*x_ref[1]**o + (-0.766594904078)*x_ref[1]
        arg[(0, 0, 1, 2)]=-0.386811890318*x[0]**o + (0.611396588016)*x[0] + (-0.574934100024)*x[1]**o + (0.0812835374396)*x[1]
        ref[(0, 0, 1, 2)]=-0.386811890318*x_ref[0]**o + (0.611396588016)*x_ref[0] + (-0.574934100024)*x_ref[1]**o + (0.0812835374396)*x_ref[1]
        arg[(0, 0, 1, 3)]=0.0837453425473*x[0]**o + (0.0710699930704)*x[0] + (-0.247105428718)*x[1]**o + (-0.44081810926)*x[1]
        ref[(0, 0, 1, 3)]=0.0837453425473*x_ref[0]**o + (0.0710699930704)*x_ref[0] + (-0.247105428718)*x_ref[1]**o + (-0.44081810926)*x_ref[1]
        arg[(0, 0, 2, 0)]=0.0874626087878*x[0]**o + (0.445848786766)*x[0] + (-0.398785837975)*x[1]**o + (-0.37297884167)*x[1]
        ref[(0, 0, 2, 0)]=0.0874626087878*x_ref[0]**o + (0.445848786766)*x_ref[0] + (-0.398785837975)*x_ref[1]**o + (-0.37297884167)*x_ref[1]
        arg[(0, 0, 2, 1)]=0.325594632814*x[0]**o + (0.509883899888)*x[0] + (0.370631106947)*x[1]**o + (0.873722165047)*x[1]
        ref[(0, 0, 2, 1)]=0.325594632814*x_ref[0]**o + (0.509883899888)*x_ref[0] + (0.370631106947)*x_ref[1]**o + (0.873722165047)*x_ref[1]
        arg[(0, 0, 2, 2)]=0.50179584424*x[0]**o + (0.629889126672)*x[0] + (-0.632658848208)*x[1]**o + (0.393348735936)*x[1]
        ref[(0, 0, 2, 2)]=0.50179584424*x_ref[0]**o + (0.629889126672)*x_ref[0] + (-0.632658848208)*x_ref[1]**o + (0.393348735936)*x_ref[1]
        arg[(0, 0, 2, 3)]=-0.324191170602*x[0]**o + (0.641335999799)*x[0] + (-0.660147985308)*x[1]**o + (-0.38703993646)*x[1]
        ref[(0, 0, 2, 3)]=-0.324191170602*x_ref[0]**o + (0.641335999799)*x_ref[0] + (-0.660147985308)*x_ref[1]**o + (-0.38703993646)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.561393898854*x[0]**o + (-0.105690164594)*x[0] + (0.322799014658)*x[1]**o + (-0.52043308139)*x[1]
        ref[(0, 1, 0, 0)]=-0.561393898854*x_ref[0]**o + (-0.105690164594)*x_ref[0] + (0.322799014658)*x_ref[1]**o + (-0.52043308139)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.928305857432*x[0]**o + (-0.349013908027)*x[0] + (-0.658118791492)*x[1]**o + (-0.263255345191)*x[1]
        ref[(0, 1, 0, 1)]=0.928305857432*x_ref[0]**o + (-0.349013908027)*x_ref[0] + (-0.658118791492)*x_ref[1]**o + (-0.263255345191)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.361888965738*x[0]**o + (-0.468208886319)*x[0] + (0.649050640964)*x[1]**o + (-0.419533762575)*x[1]
        ref[(0, 1, 0, 2)]=0.361888965738*x_ref[0]**o + (-0.468208886319)*x_ref[0] + (0.649050640964)*x_ref[1]**o + (-0.419533762575)*x_ref[1]
        arg[(0, 1, 0, 3)]=0.994185484765*x[0]**o + (-0.676894354588)*x[0] + (-0.413338468606)*x[1]**o + (-0.00791603787323)*x[1]
        ref[(0, 1, 0, 3)]=0.994185484765*x_ref[0]**o + (-0.676894354588)*x_ref[0] + (-0.413338468606)*x_ref[1]**o + (-0.00791603787323)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.682422063094*x[0]**o + (-0.954979346461)*x[0] + (0.195176297595)*x[1]**o + (-0.0389965184682)*x[1]
        ref[(0, 1, 1, 0)]=-0.682422063094*x_ref[0]**o + (-0.954979346461)*x_ref[0] + (0.195176297595)*x_ref[1]**o + (-0.0389965184682)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.43193373881*x[0]**o + (0.785438126704)*x[0] + (0.617670845007)*x[1]**o + (0.0382188718465)*x[1]
        ref[(0, 1, 1, 1)]=0.43193373881*x_ref[0]**o + (0.785438126704)*x_ref[0] + (0.617670845007)*x_ref[1]**o + (0.0382188718465)*x_ref[1]
        arg[(0, 1, 1, 2)]=0.661004584788*x[0]**o + (0.432229438676)*x[0] + (-0.234554405287)*x[1]**o + (0.762046262807)*x[1]
        ref[(0, 1, 1, 2)]=0.661004584788*x_ref[0]**o + (0.432229438676)*x_ref[0] + (-0.234554405287)*x_ref[1]**o + (0.762046262807)*x_ref[1]
        arg[(0, 1, 1, 3)]=0.775608905978*x[0]**o + (0.309199119688)*x[0] + (0.89734613646)*x[1]**o + (0.786102197655)*x[1]
        ref[(0, 1, 1, 3)]=0.775608905978*x_ref[0]**o + (0.309199119688)*x_ref[0] + (0.89734613646)*x_ref[1]**o + (0.786102197655)*x_ref[1]
        arg[(0, 1, 2, 0)]=0.0598343458062*x[0]**o + (-0.214667982824)*x[0] + (-0.943340427806)*x[1]**o + (0.690989692579)*x[1]
        ref[(0, 1, 2, 0)]=0.0598343458062*x_ref[0]**o + (-0.214667982824)*x_ref[0] + (-0.943340427806)*x_ref[1]**o + (0.690989692579)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.746233117027*x[0]**o + (0.0877675569749)*x[0] + (-0.208248164931)*x[1]**o + (0.938939691573)*x[1]
        ref[(0, 1, 2, 1)]=0.746233117027*x_ref[0]**o + (0.0877675569749)*x_ref[0] + (-0.208248164931)*x_ref[1]**o + (0.938939691573)*x_ref[1]
        arg[(0, 1, 2, 2)]=-0.839201120031*x[0]**o + (0.0210702603058)*x[0] + (0.993034726888)*x[1]**o + (0.510132203529)*x[1]
        ref[(0, 1, 2, 2)]=-0.839201120031*x_ref[0]**o + (0.0210702603058)*x_ref[0] + (0.993034726888)*x_ref[1]**o + (0.510132203529)*x_ref[1]
        arg[(0, 1, 2, 3)]=-0.22255279987*x[0]**o + (-0.913717202495)*x[0] + (0.643913928738)*x[1]**o + (0.898851142514)*x[1]
        ref[(0, 1, 2, 3)]=-0.22255279987*x_ref[0]**o + (-0.913717202495)*x_ref[0] + (0.643913928738)*x_ref[1]**o + (0.898851142514)*x_ref[1]
        arg[(0, 2, 0, 0)]=-0.279586695003*x[0]**o + (0.288770942623)*x[0] + (-0.671635357784)*x[1]**o + (-0.195362385694)*x[1]
        ref[(0, 2, 0, 0)]=-0.279586695003*x_ref[0]**o + (0.288770942623)*x_ref[0] + (-0.671635357784)*x_ref[1]**o + (-0.195362385694)*x_ref[1]
        arg[(0, 2, 0, 1)]=-0.114282583447*x[0]**o + (0.653315665626)*x[0] + (0.359170862705)*x[1]**o + (-0.756855789462)*x[1]
        ref[(0, 2, 0, 1)]=-0.114282583447*x_ref[0]**o + (0.653315665626)*x_ref[0] + (0.359170862705)*x_ref[1]**o + (-0.756855789462)*x_ref[1]
        arg[(0, 2, 0, 2)]=0.859779204621*x[0]**o + (-0.376084034376)*x[0] + (0.319238641369)*x[1]**o + (0.623801864941)*x[1]
        ref[(0, 2, 0, 2)]=0.859779204621*x_ref[0]**o + (-0.376084034376)*x_ref[0] + (0.319238641369)*x_ref[1]**o + (0.623801864941)*x_ref[1]
        arg[(0, 2, 0, 3)]=0.74647206168*x[0]**o + (0.856638628536)*x[0] + (-0.908877408265)*x[1]**o + (-0.850378205235)*x[1]
        ref[(0, 2, 0, 3)]=0.74647206168*x_ref[0]**o + (0.856638628536)*x_ref[0] + (-0.908877408265)*x_ref[1]**o + (-0.850378205235)*x_ref[1]
        arg[(0, 2, 1, 0)]=-0.509175952697*x[0]**o + (0.885340705307)*x[0] + (-0.179370171766)*x[1]**o + (0.478889604997)*x[1]
        ref[(0, 2, 1, 0)]=-0.509175952697*x_ref[0]**o + (0.885340705307)*x_ref[0] + (-0.179370171766)*x_ref[1]**o + (0.478889604997)*x_ref[1]
        arg[(0, 2, 1, 1)]=0.563980149819*x[0]**o + (-0.15690743947)*x[0] + (-0.936560370184)*x[1]**o + (0.845813544804)*x[1]
        ref[(0, 2, 1, 1)]=0.563980149819*x_ref[0]**o + (-0.15690743947)*x_ref[0] + (-0.936560370184)*x_ref[1]**o + (0.845813544804)*x_ref[1]
        arg[(0, 2, 1, 2)]=-0.129629964478*x[0]**o + (0.733677011186)*x[0] + (0.839585093078)*x[1]**o + (0.243526363502)*x[1]
        ref[(0, 2, 1, 2)]=-0.129629964478*x_ref[0]**o + (0.733677011186)*x_ref[0] + (0.839585093078)*x_ref[1]**o + (0.243526363502)*x_ref[1]
        arg[(0, 2, 1, 3)]=-0.153447836825*x[0]**o + (0.93990225337)*x[0] + (-0.472823058852)*x[1]**o + (0.960763318243)*x[1]
        ref[(0, 2, 1, 3)]=-0.153447836825*x_ref[0]**o + (0.93990225337)*x_ref[0] + (-0.472823058852)*x_ref[1]**o + (0.960763318243)*x_ref[1]
        arg[(0, 2, 2, 0)]=-0.896144867196*x[0]**o + (-0.737090805175)*x[0] + (-0.0884192045315)*x[1]**o + (-0.575249291984)*x[1]
        ref[(0, 2, 2, 0)]=-0.896144867196*x_ref[0]**o + (-0.737090805175)*x_ref[0] + (-0.0884192045315)*x_ref[1]**o + (-0.575249291984)*x_ref[1]
        arg[(0, 2, 2, 1)]=0.209948766876*x[0]**o + (0.234265207301)*x[0] + (-0.0916773960369)*x[1]**o + (0.343079523478)*x[1]
        ref[(0, 2, 2, 1)]=0.209948766876*x_ref[0]**o + (0.234265207301)*x_ref[0] + (-0.0916773960369)*x_ref[1]**o + (0.343079523478)*x_ref[1]
        arg[(0, 2, 2, 2)]=0.60896043706*x[0]**o + (0.84877815097)*x[0] + (0.604309495524)*x[1]**o + (0.720507274617)*x[1]
        ref[(0, 2, 2, 2)]=0.60896043706*x_ref[0]**o + (0.84877815097)*x_ref[0] + (0.604309495524)*x_ref[1]**o + (0.720507274617)*x_ref[1]
        arg[(0, 2, 2, 3)]=0.437667778232*x[0]**o + (-0.792360357187)*x[0] + (-0.747594691771)*x[1]**o + (0.382389610678)*x[1]
        ref[(0, 2, 2, 3)]=0.437667778232*x_ref[0]**o + (-0.792360357187)*x_ref[0] + (-0.747594691771)*x_ref[1]**o + (0.382389610678)*x_ref[1]
        arg[(0, 3, 0, 0)]=-0.6925170122*x[0]**o + (-0.999936319567)*x[0] + (-0.751307461017)*x[1]**o + (-0.561764039977)*x[1]
        ref[(0, 3, 0, 0)]=-0.6925170122*x_ref[0]**o + (-0.999936319567)*x_ref[0] + (-0.751307461017)*x_ref[1]**o + (-0.561764039977)*x_ref[1]
        arg[(0, 3, 0, 1)]=-0.628583930688*x[0]**o + (-0.907974497402)*x[0] + (-0.647986208174)*x[1]**o + (0.296801882017)*x[1]
        ref[(0, 3, 0, 1)]=-0.628583930688*x_ref[0]**o + (-0.907974497402)*x_ref[0] + (-0.647986208174)*x_ref[1]**o + (0.296801882017)*x_ref[1]
        arg[(0, 3, 0, 2)]=-0.329147336422*x[0]**o + (0.464879194154)*x[0] + (0.191909224117)*x[1]**o + (0.354071351958)*x[1]
        ref[(0, 3, 0, 2)]=-0.329147336422*x_ref[0]**o + (0.464879194154)*x_ref[0] + (0.191909224117)*x_ref[1]**o + (0.354071351958)*x_ref[1]
        arg[(0, 3, 0, 3)]=0.0456146148024*x[0]**o + (0.264897094394)*x[0] + (0.710473324322)*x[1]**o + (-0.927396555558)*x[1]
        ref[(0, 3, 0, 3)]=0.0456146148024*x_ref[0]**o + (0.264897094394)*x_ref[0] + (0.710473324322)*x_ref[1]**o + (-0.927396555558)*x_ref[1]
        arg[(0, 3, 1, 0)]=0.537595743115*x[0]**o + (-0.375917682025)*x[0] + (-0.745449583768)*x[1]**o + (0.0578040940805)*x[1]
        ref[(0, 3, 1, 0)]=0.537595743115*x_ref[0]**o + (-0.375917682025)*x_ref[0] + (-0.745449583768)*x_ref[1]**o + (0.0578040940805)*x_ref[1]
        arg[(0, 3, 1, 1)]=-0.68715236147*x[0]**o + (0.593228347133)*x[0] + (0.768416980409)*x[1]**o + (-0.314920128163)*x[1]
        ref[(0, 3, 1, 1)]=-0.68715236147*x_ref[0]**o + (0.593228347133)*x_ref[0] + (0.768416980409)*x_ref[1]**o + (-0.314920128163)*x_ref[1]
        arg[(0, 3, 1, 2)]=-0.593927064142*x[0]**o + (0.750545427387)*x[0] + (0.1505082109)*x[1]**o + (-0.624731668968)*x[1]
        ref[(0, 3, 1, 2)]=-0.593927064142*x_ref[0]**o + (0.750545427387)*x_ref[0] + (0.1505082109)*x_ref[1]**o + (-0.624731668968)*x_ref[1]
        arg[(0, 3, 1, 3)]=0.354382630537*x[0]**o + (-0.453253567946)*x[0] + (-0.997999603825)*x[1]**o + (-0.170851858079)*x[1]
        ref[(0, 3, 1, 3)]=0.354382630537*x_ref[0]**o + (-0.453253567946)*x_ref[0] + (-0.997999603825)*x_ref[1]**o + (-0.170851858079)*x_ref[1]
        arg[(0, 3, 2, 0)]=-0.882703248049*x[0]**o + (0.88953076813)*x[0] + (-0.626443494358)*x[1]**o + (-0.0321245972124)*x[1]
        ref[(0, 3, 2, 0)]=-0.882703248049*x_ref[0]**o + (0.88953076813)*x_ref[0] + (-0.626443494358)*x_ref[1]**o + (-0.0321245972124)*x_ref[1]
        arg[(0, 3, 2, 1)]=0.649223958857*x[0]**o + (-0.814030770201)*x[0] + (0.161984717424)*x[1]**o + (0.676231162337)*x[1]
        ref[(0, 3, 2, 1)]=0.649223958857*x_ref[0]**o + (-0.814030770201)*x_ref[0] + (0.161984717424)*x_ref[1]**o + (0.676231162337)*x_ref[1]
        arg[(0, 3, 2, 2)]=0.374446118689*x[0]**o + (0.854472439918)*x[0] + (0.868445833251)*x[1]**o + (-0.861675530932)*x[1]
        ref[(0, 3, 2, 2)]=0.374446118689*x_ref[0]**o + (0.854472439918)*x_ref[0] + (0.868445833251)*x_ref[1]**o + (-0.861675530932)*x_ref[1]
        arg[(0, 3, 2, 3)]=-0.540459177976*x[0]**o + (-0.469058728123)*x[0] + (-0.334487193073)*x[1]**o + (0.00128688091923)*x[1]
        ref[(0, 3, 2, 3)]=-0.540459177976*x_ref[0]**o + (-0.469058728123)*x_ref[0] + (-0.334487193073)*x_ref[1]**o + (0.00128688091923)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.24434010103*x[0]**o + (0.621637396316)*x[0] + (-0.175453453484)*x[1]**o + (0.598240093729)*x[1]
        ref[(1, 0, 0, 0)]=-0.24434010103*x_ref[0]**o + (0.621637396316)*x_ref[0] + (-0.175453453484)*x_ref[1]**o + (0.598240093729)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.432618461928*x[0]**o + (-0.560423706281)*x[0] + (-0.844884689119)*x[1]**o + (0.733800123368)*x[1]
        ref[(1, 0, 0, 1)]=0.432618461928*x_ref[0]**o + (-0.560423706281)*x_ref[0] + (-0.844884689119)*x_ref[1]**o + (0.733800123368)*x_ref[1]
        arg[(1, 0, 0, 2)]=0.0115293469839*x[0]**o + (-0.439199755371)*x[0] + (-0.456422966631)*x[1]**o + (0.0574415010803)*x[1]
        ref[(1, 0, 0, 2)]=0.0115293469839*x_ref[0]**o + (-0.439199755371)*x_ref[0] + (-0.456422966631)*x_ref[1]**o + (0.0574415010803)*x_ref[1]
        arg[(1, 0, 0, 3)]=-0.835018740345*x[0]**o + (0.615487988569)*x[0] + (-0.197732046182)*x[1]**o + (-0.69144583024)*x[1]
        ref[(1, 0, 0, 3)]=-0.835018740345*x_ref[0]**o + (0.615487988569)*x_ref[0] + (-0.197732046182)*x_ref[1]**o + (-0.69144583024)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.479357682126*x[0]**o + (-0.494610092155)*x[0] + (-0.92934439156)*x[1]**o + (-0.602675063605)*x[1]
        ref[(1, 0, 1, 0)]=-0.479357682126*x_ref[0]**o + (-0.494610092155)*x_ref[0] + (-0.92934439156)*x_ref[1]**o + (-0.602675063605)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.274119407773*x[0]**o + (0.12554983765)*x[0] + (0.298375850826)*x[1]**o + (-0.8123710537)*x[1]
        ref[(1, 0, 1, 1)]=0.274119407773*x_ref[0]**o + (0.12554983765)*x_ref[0] + (0.298375850826)*x_ref[1]**o + (-0.8123710537)*x_ref[1]
        arg[(1, 0, 1, 2)]=0.879127477655*x[0]**o + (-0.590698884117)*x[0] + (-0.918159566225)*x[1]**o + (0.201775069739)*x[1]
        ref[(1, 0, 1, 2)]=0.879127477655*x_ref[0]**o + (-0.590698884117)*x_ref[0] + (-0.918159566225)*x_ref[1]**o + (0.201775069739)*x_ref[1]
        arg[(1, 0, 1, 3)]=0.726599772417*x[0]**o + (0.754972717928)*x[0] + (-0.820494386573)*x[1]**o + (0.733798094437)*x[1]
        ref[(1, 0, 1, 3)]=0.726599772417*x_ref[0]**o + (0.754972717928)*x_ref[0] + (-0.820494386573)*x_ref[1]**o + (0.733798094437)*x_ref[1]
        arg[(1, 0, 2, 0)]=0.27139341408*x[0]**o + (0.324865352693)*x[0] + (-0.589277972229)*x[1]**o + (0.816847413212)*x[1]
        ref[(1, 0, 2, 0)]=0.27139341408*x_ref[0]**o + (0.324865352693)*x_ref[0] + (-0.589277972229)*x_ref[1]**o + (0.816847413212)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.421746062407*x[0]**o + (-0.267332324487)*x[0] + (-0.816198539881)*x[1]**o + (0.504403290541)*x[1]
        ref[(1, 0, 2, 1)]=0.421746062407*x_ref[0]**o + (-0.267332324487)*x_ref[0] + (-0.816198539881)*x_ref[1]**o + (0.504403290541)*x_ref[1]
        arg[(1, 0, 2, 2)]=0.194304646561*x[0]**o + (0.137344937633)*x[0] + (0.512080507437)*x[1]**o + (-0.353996113992)*x[1]
        ref[(1, 0, 2, 2)]=0.194304646561*x_ref[0]**o + (0.137344937633)*x_ref[0] + (0.512080507437)*x_ref[1]**o + (-0.353996113992)*x_ref[1]
        arg[(1, 0, 2, 3)]=0.525039165356*x[0]**o + (-0.982909190389)*x[0] + (0.188221947515)*x[1]**o + (0.620630674)*x[1]
        ref[(1, 0, 2, 3)]=0.525039165356*x_ref[0]**o + (-0.982909190389)*x_ref[0] + (0.188221947515)*x_ref[1]**o + (0.620630674)*x_ref[1]
        arg[(1, 1, 0, 0)]=0.690834147121*x[0]**o + (-0.892925591818)*x[0] + (-0.973291364028)*x[1]**o + (-0.956563318139)*x[1]
        ref[(1, 1, 0, 0)]=0.690834147121*x_ref[0]**o + (-0.892925591818)*x_ref[0] + (-0.973291364028)*x_ref[1]**o + (-0.956563318139)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.11576692531*x[0]**o + (0.423458699736)*x[0] + (-0.652532971756)*x[1]**o + (0.335821236165)*x[1]
        ref[(1, 1, 0, 1)]=0.11576692531*x_ref[0]**o + (0.423458699736)*x_ref[0] + (-0.652532971756)*x_ref[1]**o + (0.335821236165)*x_ref[1]
        arg[(1, 1, 0, 2)]=0.889482196771*x[0]**o + (0.577328316893)*x[0] + (-0.0578034606787)*x[1]**o + (0.447060877507)*x[1]
        ref[(1, 1, 0, 2)]=0.889482196771*x_ref[0]**o + (0.577328316893)*x_ref[0] + (-0.0578034606787)*x_ref[1]**o + (0.447060877507)*x_ref[1]
        arg[(1, 1, 0, 3)]=-0.271560924686*x[0]**o + (-0.895110382438)*x[0] + (0.11025312846)*x[1]**o + (0.10292419495)*x[1]
        ref[(1, 1, 0, 3)]=-0.271560924686*x_ref[0]**o + (-0.895110382438)*x_ref[0] + (0.11025312846)*x_ref[1]**o + (0.10292419495)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.328228346381*x[0]**o + (0.984581205181)*x[0] + (-0.0957873564878)*x[1]**o + (-0.60119984097)*x[1]
        ref[(1, 1, 1, 0)]=-0.328228346381*x_ref[0]**o + (0.984581205181)*x_ref[0] + (-0.0957873564878)*x_ref[1]**o + (-0.60119984097)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.2274052489*x[0]**o + (-0.448115704157)*x[0] + (0.159698528641)*x[1]**o + (0.434694391119)*x[1]
        ref[(1, 1, 1, 1)]=0.2274052489*x_ref[0]**o + (-0.448115704157)*x_ref[0] + (0.159698528641)*x_ref[1]**o + (0.434694391119)*x_ref[1]
        arg[(1, 1, 1, 2)]=-0.513691022228*x[0]**o + (0.481043840246)*x[0] + (-0.555814421531)*x[1]**o + (0.25656925017)*x[1]
        ref[(1, 1, 1, 2)]=-0.513691022228*x_ref[0]**o + (0.481043840246)*x_ref[0] + (-0.555814421531)*x_ref[1]**o + (0.25656925017)*x_ref[1]
        arg[(1, 1, 1, 3)]=-0.00609906260267*x[0]**o + (-0.288699873117)*x[0] + (0.930180480986)*x[1]**o + (-0.533768690988)*x[1]
        ref[(1, 1, 1, 3)]=-0.00609906260267*x_ref[0]**o + (-0.288699873117)*x_ref[0] + (0.930180480986)*x_ref[1]**o + (-0.533768690988)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.548386233802*x[0]**o + (0.0463425366551)*x[0] + (0.36424075125)*x[1]**o + (-0.233430160243)*x[1]
        ref[(1, 1, 2, 0)]=-0.548386233802*x_ref[0]**o + (0.0463425366551)*x_ref[0] + (0.36424075125)*x_ref[1]**o + (-0.233430160243)*x_ref[1]
        arg[(1, 1, 2, 1)]=0.631859832447*x[0]**o + (0.0505345676389)*x[0] + (-0.810335945258)*x[1]**o + (-0.106763230137)*x[1]
        ref[(1, 1, 2, 1)]=0.631859832447*x_ref[0]**o + (0.0505345676389)*x_ref[0] + (-0.810335945258)*x_ref[1]**o + (-0.106763230137)*x_ref[1]
        arg[(1, 1, 2, 2)]=0.674589508422*x[0]**o + (0.166000165197)*x[0] + (-0.954979260977)*x[1]**o + (-0.241386549329)*x[1]
        ref[(1, 1, 2, 2)]=0.674589508422*x_ref[0]**o + (0.166000165197)*x_ref[0] + (-0.954979260977)*x_ref[1]**o + (-0.241386549329)*x_ref[1]
        arg[(1, 1, 2, 3)]=0.320436807505*x[0]**o + (-0.166775559417)*x[0] + (-0.566873393031)*x[1]**o + (-0.305448617943)*x[1]
        ref[(1, 1, 2, 3)]=0.320436807505*x_ref[0]**o + (-0.166775559417)*x_ref[0] + (-0.566873393031)*x_ref[1]**o + (-0.305448617943)*x_ref[1]
        arg[(1, 2, 0, 0)]=0.961163417072*x[0]**o + (0.825923454386)*x[0] + (0.342786924121)*x[1]**o + (0.473464540264)*x[1]
        ref[(1, 2, 0, 0)]=0.961163417072*x_ref[0]**o + (0.825923454386)*x_ref[0] + (0.342786924121)*x_ref[1]**o + (0.473464540264)*x_ref[1]
        arg[(1, 2, 0, 1)]=0.0399504056339*x[0]**o + (0.288506671224)*x[0] + (-0.469338902584)*x[1]**o + (-0.563059761995)*x[1]
        ref[(1, 2, 0, 1)]=0.0399504056339*x_ref[0]**o + (0.288506671224)*x_ref[0] + (-0.469338902584)*x_ref[1]**o + (-0.563059761995)*x_ref[1]
        arg[(1, 2, 0, 2)]=0.993692505197*x[0]**o + (0.338594492711)*x[0] + (0.479724029091)*x[1]**o + (-0.307377961117)*x[1]
        ref[(1, 2, 0, 2)]=0.993692505197*x_ref[0]**o + (0.338594492711)*x_ref[0] + (0.479724029091)*x_ref[1]**o + (-0.307377961117)*x_ref[1]
        arg[(1, 2, 0, 3)]=-0.15188367706*x[0]**o + (0.0268330917667)*x[0] + (-0.816311592439)*x[1]**o + (0.31261661004)*x[1]
        ref[(1, 2, 0, 3)]=-0.15188367706*x_ref[0]**o + (0.0268330917667)*x_ref[0] + (-0.816311592439)*x_ref[1]**o + (0.31261661004)*x_ref[1]
        arg[(1, 2, 1, 0)]=-0.895118338029*x[0]**o + (0.994392106073)*x[0] + (-0.571506060337)*x[1]**o + (0.469614045546)*x[1]
        ref[(1, 2, 1, 0)]=-0.895118338029*x_ref[0]**o + (0.994392106073)*x_ref[0] + (-0.571506060337)*x_ref[1]**o + (0.469614045546)*x_ref[1]
        arg[(1, 2, 1, 1)]=0.47156035185*x[0]**o + (-0.713314100057)*x[0] + (-0.967940381472)*x[1]**o + (0.508814362702)*x[1]
        ref[(1, 2, 1, 1)]=0.47156035185*x_ref[0]**o + (-0.713314100057)*x_ref[0] + (-0.967940381472)*x_ref[1]**o + (0.508814362702)*x_ref[1]
        arg[(1, 2, 1, 2)]=0.547581450075*x[0]**o + (0.792268299805)*x[0] + (-0.116626440776)*x[1]**o + (-0.496535248024)*x[1]
        ref[(1, 2, 1, 2)]=0.547581450075*x_ref[0]**o + (0.792268299805)*x_ref[0] + (-0.116626440776)*x_ref[1]**o + (-0.496535248024)*x_ref[1]
        arg[(1, 2, 1, 3)]=-0.126193062653*x[0]**o + (0.647940640851)*x[0] + (0.259430084756)*x[1]**o + (0.575740824606)*x[1]
        ref[(1, 2, 1, 3)]=-0.126193062653*x_ref[0]**o + (0.647940640851)*x_ref[0] + (0.259430084756)*x_ref[1]**o + (0.575740824606)*x_ref[1]
        arg[(1, 2, 2, 0)]=0.151713040644*x[0]**o + (-0.856082316211)*x[0] + (0.385875673052)*x[1]**o + (0.631423724265)*x[1]
        ref[(1, 2, 2, 0)]=0.151713040644*x_ref[0]**o + (-0.856082316211)*x_ref[0] + (0.385875673052)*x_ref[1]**o + (0.631423724265)*x_ref[1]
        arg[(1, 2, 2, 1)]=0.715625767953*x[0]**o + (0.620675005201)*x[0] + (-0.782042297048)*x[1]**o + (0.21720606009)*x[1]
        ref[(1, 2, 2, 1)]=0.715625767953*x_ref[0]**o + (0.620675005201)*x_ref[0] + (-0.782042297048)*x_ref[1]**o + (0.21720606009)*x_ref[1]
        arg[(1, 2, 2, 2)]=0.445306585638*x[0]**o + (0.667013109782)*x[0] + (-0.881326645985)*x[1]**o + (-0.796390264701)*x[1]
        ref[(1, 2, 2, 2)]=0.445306585638*x_ref[0]**o + (0.667013109782)*x_ref[0] + (-0.881326645985)*x_ref[1]**o + (-0.796390264701)*x_ref[1]
        arg[(1, 2, 2, 3)]=-0.852102286892*x[0]**o + (-0.657154784236)*x[0] + (-0.532992521306)*x[1]**o + (-0.332609770519)*x[1]
        ref[(1, 2, 2, 3)]=-0.852102286892*x_ref[0]**o + (-0.657154784236)*x_ref[0] + (-0.532992521306)*x_ref[1]**o + (-0.332609770519)*x_ref[1]
        arg[(1, 3, 0, 0)]=0.863507102064*x[0]**o + (0.0530332811822)*x[0] + (-0.247789692617)*x[1]**o + (-0.202476821472)*x[1]
        ref[(1, 3, 0, 0)]=0.863507102064*x_ref[0]**o + (0.0530332811822)*x_ref[0] + (-0.247789692617)*x_ref[1]**o + (-0.202476821472)*x_ref[1]
        arg[(1, 3, 0, 1)]=-0.379793982214*x[0]**o + (0.897762631413)*x[0] + (-0.836140686421)*x[1]**o + (0.583852180321)*x[1]
        ref[(1, 3, 0, 1)]=-0.379793982214*x_ref[0]**o + (0.897762631413)*x_ref[0] + (-0.836140686421)*x_ref[1]**o + (0.583852180321)*x_ref[1]
        arg[(1, 3, 0, 2)]=-0.869623225893*x[0]**o + (-0.217087264627)*x[0] + (0.509574391624)*x[1]**o + (-0.55024406463)*x[1]
        ref[(1, 3, 0, 2)]=-0.869623225893*x_ref[0]**o + (-0.217087264627)*x_ref[0] + (0.509574391624)*x_ref[1]**o + (-0.55024406463)*x_ref[1]
        arg[(1, 3, 0, 3)]=-0.688038665424*x[0]**o + (-0.802046761364)*x[0] + (-0.186380650248)*x[1]**o + (-0.929631784078)*x[1]
        ref[(1, 3, 0, 3)]=-0.688038665424*x_ref[0]**o + (-0.802046761364)*x_ref[0] + (-0.186380650248)*x_ref[1]**o + (-0.929631784078)*x_ref[1]
        arg[(1, 3, 1, 0)]=-0.786685172015*x[0]**o + (-0.4272751483)*x[0] + (0.911866146863)*x[1]**o + (-0.338279745076)*x[1]
        ref[(1, 3, 1, 0)]=-0.786685172015*x_ref[0]**o + (-0.4272751483)*x_ref[0] + (0.911866146863)*x_ref[1]**o + (-0.338279745076)*x_ref[1]
        arg[(1, 3, 1, 1)]=0.453193810865*x[0]**o + (-0.656087212166)*x[0] + (-0.109884763088)*x[1]**o + (0.609264055793)*x[1]
        ref[(1, 3, 1, 1)]=0.453193810865*x_ref[0]**o + (-0.656087212166)*x_ref[0] + (-0.109884763088)*x_ref[1]**o + (0.609264055793)*x_ref[1]
        arg[(1, 3, 1, 2)]=0.214347355809*x[0]**o + (0.615999092973)*x[0] + (0.579351668326)*x[1]**o + (0.309392800761)*x[1]
        ref[(1, 3, 1, 2)]=0.214347355809*x_ref[0]**o + (0.615999092973)*x_ref[0] + (0.579351668326)*x_ref[1]**o + (0.309392800761)*x_ref[1]
        arg[(1, 3, 1, 3)]=0.602607004244*x[0]**o + (0.163137081967)*x[0] + (-0.875846684875)*x[1]**o + (-0.437045961596)*x[1]
        ref[(1, 3, 1, 3)]=0.602607004244*x_ref[0]**o + (0.163137081967)*x_ref[0] + (-0.875846684875)*x_ref[1]**o + (-0.437045961596)*x_ref[1]
        arg[(1, 3, 2, 0)]=0.545556588178*x[0]**o + (0.527389142362)*x[0] + (0.736034153384)*x[1]**o + (-0.823796987564)*x[1]
        ref[(1, 3, 2, 0)]=0.545556588178*x_ref[0]**o + (0.527389142362)*x_ref[0] + (0.736034153384)*x_ref[1]**o + (-0.823796987564)*x_ref[1]
        arg[(1, 3, 2, 1)]=0.734083672515*x[0]**o + (0.788453879179)*x[0] + (-0.100790053009)*x[1]**o + (0.65593418121)*x[1]
        ref[(1, 3, 2, 1)]=0.734083672515*x_ref[0]**o + (0.788453879179)*x_ref[0] + (-0.100790053009)*x_ref[1]**o + (0.65593418121)*x_ref[1]
        arg[(1, 3, 2, 2)]=-0.611402659392*x[0]**o + (0.0764258352226)*x[0] + (0.190973289296)*x[1]**o + (-0.896692277962)*x[1]
        ref[(1, 3, 2, 2)]=-0.611402659392*x_ref[0]**o + (0.0764258352226)*x_ref[0] + (0.190973289296)*x_ref[1]**o + (-0.896692277962)*x_ref[1]
        arg[(1, 3, 2, 3)]=0.09879217841*x[0]**o + (-0.430404261741)*x[0] + (-0.46226768314)*x[1]**o + (0.802673586903)*x[1]
        ref[(1, 3, 2, 3)]=0.09879217841*x_ref[0]**o + (-0.430404261741)*x_ref[0] + (-0.46226768314)*x_ref[1]**o + (0.802673586903)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.878838870668*x[0]**o + (0.101498856423)*x[0] + (-0.120811213956)*x[1]**o + (-0.870754103274)*x[1]
        ref[(2, 0, 0, 0)]=0.878838870668*x_ref[0]**o + (0.101498856423)*x_ref[0] + (-0.120811213956)*x_ref[1]**o + (-0.870754103274)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.725852495734*x[0]**o + (-0.897968574582)*x[0] + (0.0763650222681)*x[1]**o + (0.0749948249689)*x[1]
        ref[(2, 0, 0, 1)]=0.725852495734*x_ref[0]**o + (-0.897968574582)*x_ref[0] + (0.0763650222681)*x_ref[1]**o + (0.0749948249689)*x_ref[1]
        arg[(2, 0, 0, 2)]=-0.283978089969*x[0]**o + (0.644559448138)*x[0] + (-0.656023382793)*x[1]**o + (-0.188357833452)*x[1]
        ref[(2, 0, 0, 2)]=-0.283978089969*x_ref[0]**o + (0.644559448138)*x_ref[0] + (-0.656023382793)*x_ref[1]**o + (-0.188357833452)*x_ref[1]
        arg[(2, 0, 0, 3)]=-0.536703498919*x[0]**o + (-0.556373810259)*x[0] + (-0.648364526032)*x[1]**o + (0.443179663505)*x[1]
        ref[(2, 0, 0, 3)]=-0.536703498919*x_ref[0]**o + (-0.556373810259)*x_ref[0] + (-0.648364526032)*x_ref[1]**o + (0.443179663505)*x_ref[1]
        arg[(2, 0, 1, 0)]=-0.281857552047*x[0]**o + (0.799843929768)*x[0] + (-0.0869405936211)*x[1]**o + (-0.470008698763)*x[1]
        ref[(2, 0, 1, 0)]=-0.281857552047*x_ref[0]**o + (0.799843929768)*x_ref[0] + (-0.0869405936211)*x_ref[1]**o + (-0.470008698763)*x_ref[1]
        arg[(2, 0, 1, 1)]=0.940943544381*x[0]**o + (-0.705241091287)*x[0] + (-0.971280332157)*x[1]**o + (-0.979463866667)*x[1]
        ref[(2, 0, 1, 1)]=0.940943544381*x_ref[0]**o + (-0.705241091287)*x_ref[0] + (-0.971280332157)*x_ref[1]**o + (-0.979463866667)*x_ref[1]
        arg[(2, 0, 1, 2)]=-0.375781483873*x[0]**o + (0.471666345206)*x[0] + (-0.103772336622)*x[1]**o + (0.675892683433)*x[1]
        ref[(2, 0, 1, 2)]=-0.375781483873*x_ref[0]**o + (0.471666345206)*x_ref[0] + (-0.103772336622)*x_ref[1]**o + (0.675892683433)*x_ref[1]
        arg[(2, 0, 1, 3)]=0.422183593074*x[0]**o + (-0.134929767543)*x[0] + (0.202723952988)*x[1]**o + (0.885312169881)*x[1]
        ref[(2, 0, 1, 3)]=0.422183593074*x_ref[0]**o + (-0.134929767543)*x_ref[0] + (0.202723952988)*x_ref[1]**o + (0.885312169881)*x_ref[1]
        arg[(2, 0, 2, 0)]=0.0128438778551*x[0]**o + (-0.497970527532)*x[0] + (-0.0581300422544)*x[1]**o + (-0.832804791497)*x[1]
        ref[(2, 0, 2, 0)]=0.0128438778551*x_ref[0]**o + (-0.497970527532)*x_ref[0] + (-0.0581300422544)*x_ref[1]**o + (-0.832804791497)*x_ref[1]
        arg[(2, 0, 2, 1)]=0.258096545057*x[0]**o + (-0.46111856097)*x[0] + (0.267167635786)*x[1]**o + (0.338717024956)*x[1]
        ref[(2, 0, 2, 1)]=0.258096545057*x_ref[0]**o + (-0.46111856097)*x_ref[0] + (0.267167635786)*x_ref[1]**o + (0.338717024956)*x_ref[1]
        arg[(2, 0, 2, 2)]=0.684026453914*x[0]**o + (-0.894114887182)*x[0] + (-0.536152664553)*x[1]**o + (0.874876188691)*x[1]
        ref[(2, 0, 2, 2)]=0.684026453914*x_ref[0]**o + (-0.894114887182)*x_ref[0] + (-0.536152664553)*x_ref[1]**o + (0.874876188691)*x_ref[1]
        arg[(2, 0, 2, 3)]=0.65914766146*x[0]**o + (-0.590294883093)*x[0] + (-0.99368842796)*x[1]**o + (0.128535530889)*x[1]
        ref[(2, 0, 2, 3)]=0.65914766146*x_ref[0]**o + (-0.590294883093)*x_ref[0] + (-0.99368842796)*x_ref[1]**o + (0.128535530889)*x_ref[1]
        arg[(2, 1, 0, 0)]=0.0298430359671*x[0]**o + (0.376842403761)*x[0] + (-0.240432775044)*x[1]**o + (0.143899826009)*x[1]
        ref[(2, 1, 0, 0)]=0.0298430359671*x_ref[0]**o + (0.376842403761)*x_ref[0] + (-0.240432775044)*x_ref[1]**o + (0.143899826009)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.302853490456*x[0]**o + (0.214792551751)*x[0] + (-0.902552858706)*x[1]**o + (-0.295469897238)*x[1]
        ref[(2, 1, 0, 1)]=0.302853490456*x_ref[0]**o + (0.214792551751)*x_ref[0] + (-0.902552858706)*x_ref[1]**o + (-0.295469897238)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.458871465627*x[0]**o + (-0.629974850634)*x[0] + (-0.566609893215)*x[1]**o + (0.631925254301)*x[1]
        ref[(2, 1, 0, 2)]=-0.458871465627*x_ref[0]**o + (-0.629974850634)*x_ref[0] + (-0.566609893215)*x_ref[1]**o + (0.631925254301)*x_ref[1]
        arg[(2, 1, 0, 3)]=-0.457695586282*x[0]**o + (0.178380969308)*x[0] + (-0.0838015405695)*x[1]**o + (-0.462007235798)*x[1]
        ref[(2, 1, 0, 3)]=-0.457695586282*x_ref[0]**o + (0.178380969308)*x_ref[0] + (-0.0838015405695)*x_ref[1]**o + (-0.462007235798)*x_ref[1]
        arg[(2, 1, 1, 0)]=-0.493671338781*x[0]**o + (0.668468552202)*x[0] + (-0.927040437266)*x[1]**o + (0.906714737553)*x[1]
        ref[(2, 1, 1, 0)]=-0.493671338781*x_ref[0]**o + (0.668468552202)*x_ref[0] + (-0.927040437266)*x_ref[1]**o + (0.906714737553)*x_ref[1]
        arg[(2, 1, 1, 1)]=0.45848062384*x[0]**o + (0.537520158962)*x[0] + (0.758347721172)*x[1]**o + (0.106235244778)*x[1]
        ref[(2, 1, 1, 1)]=0.45848062384*x_ref[0]**o + (0.537520158962)*x_ref[0] + (0.758347721172)*x_ref[1]**o + (0.106235244778)*x_ref[1]
        arg[(2, 1, 1, 2)]=0.744676160785*x[0]**o + (-0.0242304950393)*x[0] + (0.995876328051)*x[1]**o + (0.0696120027338)*x[1]
        ref[(2, 1, 1, 2)]=0.744676160785*x_ref[0]**o + (-0.0242304950393)*x_ref[0] + (0.995876328051)*x_ref[1]**o + (0.0696120027338)*x_ref[1]
        arg[(2, 1, 1, 3)]=-0.835552022884*x[0]**o + (-0.308319464458)*x[0] + (-0.029394009517)*x[1]**o + (0.0612192002279)*x[1]
        ref[(2, 1, 1, 3)]=-0.835552022884*x_ref[0]**o + (-0.308319464458)*x_ref[0] + (-0.029394009517)*x_ref[1]**o + (0.0612192002279)*x_ref[1]
        arg[(2, 1, 2, 0)]=-0.60417829613*x[0]**o + (-0.250548143911)*x[0] + (0.852291749386)*x[1]**o + (-0.671767095721)*x[1]
        ref[(2, 1, 2, 0)]=-0.60417829613*x_ref[0]**o + (-0.250548143911)*x_ref[0] + (0.852291749386)*x_ref[1]**o + (-0.671767095721)*x_ref[1]
        arg[(2, 1, 2, 1)]=-0.586753131449*x[0]**o + (-0.570435266335)*x[0] + (-0.218871704413)*x[1]**o + (-0.865359682001)*x[1]
        ref[(2, 1, 2, 1)]=-0.586753131449*x_ref[0]**o + (-0.570435266335)*x_ref[0] + (-0.218871704413)*x_ref[1]**o + (-0.865359682001)*x_ref[1]
        arg[(2, 1, 2, 2)]=0.618506530605*x[0]**o + (0.126802429092)*x[0] + (-0.656860108261)*x[1]**o + (0.791648164356)*x[1]
        ref[(2, 1, 2, 2)]=0.618506530605*x_ref[0]**o + (0.126802429092)*x_ref[0] + (-0.656860108261)*x_ref[1]**o + (0.791648164356)*x_ref[1]
        arg[(2, 1, 2, 3)]=-0.860450876632*x[0]**o + (-0.364102418983)*x[0] + (-0.589769631495)*x[1]**o + (-0.534127515082)*x[1]
        ref[(2, 1, 2, 3)]=-0.860450876632*x_ref[0]**o + (-0.364102418983)*x_ref[0] + (-0.589769631495)*x_ref[1]**o + (-0.534127515082)*x_ref[1]
        arg[(2, 2, 0, 0)]=-0.82757535139*x[0]**o + (-0.253633366424)*x[0] + (0.617329212493)*x[1]**o + (0.454319648444)*x[1]
        ref[(2, 2, 0, 0)]=-0.82757535139*x_ref[0]**o + (-0.253633366424)*x_ref[0] + (0.617329212493)*x_ref[1]**o + (0.454319648444)*x_ref[1]
        arg[(2, 2, 0, 1)]=-0.744293153996*x[0]**o + (0.884219383826)*x[0] + (-0.201173784863)*x[1]**o + (-0.777672696881)*x[1]
        ref[(2, 2, 0, 1)]=-0.744293153996*x_ref[0]**o + (0.884219383826)*x_ref[0] + (-0.201173784863)*x_ref[1]**o + (-0.777672696881)*x_ref[1]
        arg[(2, 2, 0, 2)]=-0.580409621109*x[0]**o + (0.968389833773)*x[0] + (-0.812651320855)*x[1]**o + (-0.919966405117)*x[1]
        ref[(2, 2, 0, 2)]=-0.580409621109*x_ref[0]**o + (0.968389833773)*x_ref[0] + (-0.812651320855)*x_ref[1]**o + (-0.919966405117)*x_ref[1]
        arg[(2, 2, 0, 3)]=-0.086819914943*x[0]**o + (-0.776580102896)*x[0] + (0.0726718542548)*x[1]**o + (0.165750825038)*x[1]
        ref[(2, 2, 0, 3)]=-0.086819914943*x_ref[0]**o + (-0.776580102896)*x_ref[0] + (0.0726718542548)*x_ref[1]**o + (0.165750825038)*x_ref[1]
        arg[(2, 2, 1, 0)]=-0.6887968483*x[0]**o + (0.307637318061)*x[0] + (-0.351513013348)*x[1]**o + (0.299936840659)*x[1]
        ref[(2, 2, 1, 0)]=-0.6887968483*x_ref[0]**o + (0.307637318061)*x_ref[0] + (-0.351513013348)*x_ref[1]**o + (0.299936840659)*x_ref[1]
        arg[(2, 2, 1, 1)]=0.63866666518*x[0]**o + (0.391054345373)*x[0] + (0.00443129478872)*x[1]**o + (0.102875608354)*x[1]
        ref[(2, 2, 1, 1)]=0.63866666518*x_ref[0]**o + (0.391054345373)*x_ref[0] + (0.00443129478872)*x_ref[1]**o + (0.102875608354)*x_ref[1]
        arg[(2, 2, 1, 2)]=-0.97358951345*x[0]**o + (0.800886159117)*x[0] + (-0.705009059622)*x[1]**o + (-0.570119816917)*x[1]
        ref[(2, 2, 1, 2)]=-0.97358951345*x_ref[0]**o + (0.800886159117)*x_ref[0] + (-0.705009059622)*x_ref[1]**o + (-0.570119816917)*x_ref[1]
        arg[(2, 2, 1, 3)]=0.552309460025*x[0]**o + (0.456009747172)*x[0] + (0.0762665583964)*x[1]**o + (-0.8716716872)*x[1]
        ref[(2, 2, 1, 3)]=0.552309460025*x_ref[0]**o + (0.456009747172)*x_ref[0] + (0.0762665583964)*x_ref[1]**o + (-0.8716716872)*x_ref[1]
        arg[(2, 2, 2, 0)]=-0.468040590137*x[0]**o + (0.297656162025)*x[0] + (0.147020895627)*x[1]**o + (0.348141141937)*x[1]
        ref[(2, 2, 2, 0)]=-0.468040590137*x_ref[0]**o + (0.297656162025)*x_ref[0] + (0.147020895627)*x_ref[1]**o + (0.348141141937)*x_ref[1]
        arg[(2, 2, 2, 1)]=-0.141507524456*x[0]**o + (-0.93560316187)*x[0] + (-0.212582173561)*x[1]**o + (0.861319573428)*x[1]
        ref[(2, 2, 2, 1)]=-0.141507524456*x_ref[0]**o + (-0.93560316187)*x_ref[0] + (-0.212582173561)*x_ref[1]**o + (0.861319573428)*x_ref[1]
        arg[(2, 2, 2, 2)]=0.675992595345*x[0]**o + (0.0137599413833)*x[0] + (0.470440659288)*x[1]**o + (0.0846710103393)*x[1]
        ref[(2, 2, 2, 2)]=0.675992595345*x_ref[0]**o + (0.0137599413833)*x_ref[0] + (0.470440659288)*x_ref[1]**o + (0.0846710103393)*x_ref[1]
        arg[(2, 2, 2, 3)]=0.318594986603*x[0]**o + (-0.368149739866)*x[0] + (0.125653433106)*x[1]**o + (-0.438187913627)*x[1]
        ref[(2, 2, 2, 3)]=0.318594986603*x_ref[0]**o + (-0.368149739866)*x_ref[0] + (0.125653433106)*x_ref[1]**o + (-0.438187913627)*x_ref[1]
        arg[(2, 3, 0, 0)]=-0.223122949325*x[0]**o + (-0.80051632401)*x[0] + (-0.64137056165)*x[1]**o + (0.0854250439584)*x[1]
        ref[(2, 3, 0, 0)]=-0.223122949325*x_ref[0]**o + (-0.80051632401)*x_ref[0] + (-0.64137056165)*x_ref[1]**o + (0.0854250439584)*x_ref[1]
        arg[(2, 3, 0, 1)]=0.0886619918381*x[0]**o + (0.00676772829934)*x[0] + (-0.117176435167)*x[1]**o + (0.0420627266259)*x[1]
        ref[(2, 3, 0, 1)]=0.0886619918381*x_ref[0]**o + (0.00676772829934)*x_ref[0] + (-0.117176435167)*x_ref[1]**o + (0.0420627266259)*x_ref[1]
        arg[(2, 3, 0, 2)]=0.542047306125*x[0]**o + (0.291204692251)*x[0] + (-0.0616401878719)*x[1]**o + (-0.378714124957)*x[1]
        ref[(2, 3, 0, 2)]=0.542047306125*x_ref[0]**o + (0.291204692251)*x_ref[0] + (-0.0616401878719)*x_ref[1]**o + (-0.378714124957)*x_ref[1]
        arg[(2, 3, 0, 3)]=-0.693693351075*x[0]**o + (0.59061016872)*x[0] + (-0.786934235819)*x[1]**o + (-0.282830964485)*x[1]
        ref[(2, 3, 0, 3)]=-0.693693351075*x_ref[0]**o + (0.59061016872)*x_ref[0] + (-0.786934235819)*x_ref[1]**o + (-0.282830964485)*x_ref[1]
        arg[(2, 3, 1, 0)]=-0.869134419004*x[0]**o + (0.0949711255427)*x[0] + (-0.490073512725)*x[1]**o + (0.662224546448)*x[1]
        ref[(2, 3, 1, 0)]=-0.869134419004*x_ref[0]**o + (0.0949711255427)*x_ref[0] + (-0.490073512725)*x_ref[1]**o + (0.662224546448)*x_ref[1]
        arg[(2, 3, 1, 1)]=-0.112484693556*x[0]**o + (0.394058654752)*x[0] + (-0.628826593586)*x[1]**o + (0.695494736742)*x[1]
        ref[(2, 3, 1, 1)]=-0.112484693556*x_ref[0]**o + (0.394058654752)*x_ref[0] + (-0.628826593586)*x_ref[1]**o + (0.695494736742)*x_ref[1]
        arg[(2, 3, 1, 2)]=0.940758166166*x[0]**o + (0.0381542525754)*x[0] + (0.0847877298391)*x[1]**o + (-0.58379684664)*x[1]
        ref[(2, 3, 1, 2)]=0.940758166166*x_ref[0]**o + (0.0381542525754)*x_ref[0] + (0.0847877298391)*x_ref[1]**o + (-0.58379684664)*x_ref[1]
        arg[(2, 3, 1, 3)]=-0.63925453187*x[0]**o + (-0.180244634229)*x[0] + (0.194273835638)*x[1]**o + (-0.00273578936612)*x[1]
        ref[(2, 3, 1, 3)]=-0.63925453187*x_ref[0]**o + (-0.180244634229)*x_ref[0] + (0.194273835638)*x_ref[1]**o + (-0.00273578936612)*x_ref[1]
        arg[(2, 3, 2, 0)]=0.913568592713*x[0]**o + (-0.709775394999)*x[0] + (-0.568647055692)*x[1]**o + (0.224524746237)*x[1]
        ref[(2, 3, 2, 0)]=0.913568592713*x_ref[0]**o + (-0.709775394999)*x_ref[0] + (-0.568647055692)*x_ref[1]**o + (0.224524746237)*x_ref[1]
        arg[(2, 3, 2, 1)]=-0.272189349779*x[0]**o + (-0.407524170166)*x[0] + (0.817189197421)*x[1]**o + (-0.562339856084)*x[1]
        ref[(2, 3, 2, 1)]=-0.272189349779*x_ref[0]**o + (-0.407524170166)*x_ref[0] + (0.817189197421)*x_ref[1]**o + (-0.562339856084)*x_ref[1]
        arg[(2, 3, 2, 2)]=0.594314614133*x[0]**o + (0.83231146105)*x[0] + (-0.809509129735)*x[1]**o + (0.840563952472)*x[1]
        ref[(2, 3, 2, 2)]=0.594314614133*x_ref[0]**o + (0.83231146105)*x_ref[0] + (-0.809509129735)*x_ref[1]**o + (0.840563952472)*x_ref[1]
        arg[(2, 3, 2, 3)]=0.163771237644*x[0]**o + (0.919718201004)*x[0] + (0.611320196318)*x[1]**o + (-0.849412144171)*x[1]
        ref[(2, 3, 2, 3)]=0.163771237644*x_ref[0]**o + (0.919718201004)*x_ref[0] + (0.611320196318)*x_ref[1]**o + (-0.849412144171)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.033789009972*x[2]**o + (-0.730850370053)*x[2]
            ref[(0, 0, 0, 0)]+=0.033789009972*x_ref[2]**o + (-0.730850370053)*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.891780851638*x[2]**o + (0.227060851524)*x[2]
            ref[(0, 0, 0, 1)]+=0.891780851638*x_ref[2]**o + (0.227060851524)*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.350055980976*x[2]**o + (0.819921018228)*x[2]
            ref[(0, 0, 0, 2)]+=0.350055980976*x_ref[2]**o + (0.819921018228)*x_ref[2]
            arg[(0, 0, 0, 3)]+=-0.908452303635*x[2]**o + (0.989277499262)*x[2]
            ref[(0, 0, 0, 3)]+=-0.908452303635*x_ref[2]**o + (0.989277499262)*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.370167494471*x[2]**o + (-0.727022951693)*x[2]
            ref[(0, 0, 1, 0)]+=0.370167494471*x_ref[2]**o + (-0.727022951693)*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.800253034609*x[2]**o + (-0.803424458563)*x[2]
            ref[(0, 0, 1, 1)]+=-0.800253034609*x_ref[2]**o + (-0.803424458563)*x_ref[2]
            arg[(0, 0, 1, 2)]+=0.415954049943*x[2]**o + (0.596048958501)*x[2]
            ref[(0, 0, 1, 2)]+=0.415954049943*x_ref[2]**o + (0.596048958501)*x_ref[2]
            arg[(0, 0, 1, 3)]+=0.151051928173*x[2]**o + (-0.173539645504)*x[2]
            ref[(0, 0, 1, 3)]+=0.151051928173*x_ref[2]**o + (-0.173539645504)*x_ref[2]
            arg[(0, 0, 2, 0)]+=0.754557136181*x[2]**o + (0.0703565842531)*x[2]
            ref[(0, 0, 2, 0)]+=0.754557136181*x_ref[2]**o + (0.0703565842531)*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.944405604861*x[2]**o + (-0.573932100425)*x[2]
            ref[(0, 0, 2, 1)]+=0.944405604861*x_ref[2]**o + (-0.573932100425)*x_ref[2]
            arg[(0, 0, 2, 2)]+=-0.56831500686*x[2]**o + (0.148520582169)*x[2]
            ref[(0, 0, 2, 2)]+=-0.56831500686*x_ref[2]**o + (0.148520582169)*x_ref[2]
            arg[(0, 0, 2, 3)]+=-0.540373800419*x[2]**o + (-0.868524928456)*x[2]
            ref[(0, 0, 2, 3)]+=-0.540373800419*x_ref[2]**o + (-0.868524928456)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.968018855442*x[2]**o + (-0.742853133345)*x[2]
            ref[(0, 1, 0, 0)]+=-0.968018855442*x_ref[2]**o + (-0.742853133345)*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.407860228522*x[2]**o + (0.419333118723)*x[2]
            ref[(0, 1, 0, 1)]+=-0.407860228522*x_ref[2]**o + (0.419333118723)*x_ref[2]
            arg[(0, 1, 0, 2)]+=0.801168469984*x[2]**o + (0.219225446308)*x[2]
            ref[(0, 1, 0, 2)]+=0.801168469984*x_ref[2]**o + (0.219225446308)*x_ref[2]
            arg[(0, 1, 0, 3)]+=-0.269396760663*x[2]**o + (0.985068041255)*x[2]
            ref[(0, 1, 0, 3)]+=-0.269396760663*x_ref[2]**o + (0.985068041255)*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.85538450556*x[2]**o + (0.123487016677)*x[2]
            ref[(0, 1, 1, 0)]+=-0.85538450556*x_ref[2]**o + (0.123487016677)*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.49386917454*x[2]**o + (-0.242372060772)*x[2]
            ref[(0, 1, 1, 1)]+=-0.49386917454*x_ref[2]**o + (-0.242372060772)*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.394015990371*x[2]**o + (-0.34563139644)*x[2]
            ref[(0, 1, 1, 2)]+=0.394015990371*x_ref[2]**o + (-0.34563139644)*x_ref[2]
            arg[(0, 1, 1, 3)]+=-0.640546880739*x[2]**o + (-0.275932825225)*x[2]
            ref[(0, 1, 1, 3)]+=-0.640546880739*x_ref[2]**o + (-0.275932825225)*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.886058804778*x[2]**o + (-0.135053464214)*x[2]
            ref[(0, 1, 2, 0)]+=-0.886058804778*x_ref[2]**o + (-0.135053464214)*x_ref[2]
            arg[(0, 1, 2, 1)]+=-0.620227921533*x[2]**o + (0.66641960887)*x[2]
            ref[(0, 1, 2, 1)]+=-0.620227921533*x_ref[2]**o + (0.66641960887)*x_ref[2]
            arg[(0, 1, 2, 2)]+=0.483159427485*x[2]**o + (-0.8792647954)*x[2]
            ref[(0, 1, 2, 2)]+=0.483159427485*x_ref[2]**o + (-0.8792647954)*x_ref[2]
            arg[(0, 1, 2, 3)]+=0.1027375042*x[2]**o + (-0.0849604065481)*x[2]
            ref[(0, 1, 2, 3)]+=0.1027375042*x_ref[2]**o + (-0.0849604065481)*x_ref[2]
            arg[(0, 2, 0, 0)]+=0.672871672825*x[2]**o + (-0.360191758389)*x[2]
            ref[(0, 2, 0, 0)]+=0.672871672825*x_ref[2]**o + (-0.360191758389)*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.261771982272*x[2]**o + (0.134385167215)*x[2]
            ref[(0, 2, 0, 1)]+=-0.261771982272*x_ref[2]**o + (0.134385167215)*x_ref[2]
            arg[(0, 2, 0, 2)]+=0.922935892316*x[2]**o + (-0.492651535944)*x[2]
            ref[(0, 2, 0, 2)]+=0.922935892316*x_ref[2]**o + (-0.492651535944)*x_ref[2]
            arg[(0, 2, 0, 3)]+=-0.311475168196*x[2]**o + (0.786380330106)*x[2]
            ref[(0, 2, 0, 3)]+=-0.311475168196*x_ref[2]**o + (0.786380330106)*x_ref[2]
            arg[(0, 2, 1, 0)]+=0.715313208918*x[2]**o + (-0.127737038341)*x[2]
            ref[(0, 2, 1, 0)]+=0.715313208918*x_ref[2]**o + (-0.127737038341)*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.367412464143*x[2]**o + (0.187864267032)*x[2]
            ref[(0, 2, 1, 1)]+=-0.367412464143*x_ref[2]**o + (0.187864267032)*x_ref[2]
            arg[(0, 2, 1, 2)]+=-0.120019693596*x[2]**o + (0.90601345345)*x[2]
            ref[(0, 2, 1, 2)]+=-0.120019693596*x_ref[2]**o + (0.90601345345)*x_ref[2]
            arg[(0, 2, 1, 3)]+=0.0670932126506*x[2]**o + (0.0852806858023)*x[2]
            ref[(0, 2, 1, 3)]+=0.0670932126506*x_ref[2]**o + (0.0852806858023)*x_ref[2]
            arg[(0, 2, 2, 0)]+=-0.54075490888*x[2]**o + (-0.045200073426)*x[2]
            ref[(0, 2, 2, 0)]+=-0.54075490888*x_ref[2]**o + (-0.045200073426)*x_ref[2]
            arg[(0, 2, 2, 1)]+=-0.762953599064*x[2]**o + (-0.331984837145)*x[2]
            ref[(0, 2, 2, 1)]+=-0.762953599064*x_ref[2]**o + (-0.331984837145)*x_ref[2]
            arg[(0, 2, 2, 2)]+=0.0905909462149*x[2]**o + (-0.362077769951)*x[2]
            ref[(0, 2, 2, 2)]+=0.0905909462149*x_ref[2]**o + (-0.362077769951)*x_ref[2]
            arg[(0, 2, 2, 3)]+=0.268741506292*x[2]**o + (0.194118675559)*x[2]
            ref[(0, 2, 2, 3)]+=0.268741506292*x_ref[2]**o + (0.194118675559)*x_ref[2]
            arg[(0, 3, 0, 0)]+=0.550572520855*x[2]**o + (0.961658803223)*x[2]
            ref[(0, 3, 0, 0)]+=0.550572520855*x_ref[2]**o + (0.961658803223)*x_ref[2]
            arg[(0, 3, 0, 1)]+=-0.588447674909*x[2]**o + (0.438224256589)*x[2]
            ref[(0, 3, 0, 1)]+=-0.588447674909*x_ref[2]**o + (0.438224256589)*x_ref[2]
            arg[(0, 3, 0, 2)]+=0.946540512451*x[2]**o + (-0.0971231794169)*x[2]
            ref[(0, 3, 0, 2)]+=0.946540512451*x_ref[2]**o + (-0.0971231794169)*x_ref[2]
            arg[(0, 3, 0, 3)]+=0.399815203162*x[2]**o + (0.0791738839552)*x[2]
            ref[(0, 3, 0, 3)]+=0.399815203162*x_ref[2]**o + (0.0791738839552)*x_ref[2]
            arg[(0, 3, 1, 0)]+=0.0440423609722*x[2]**o + (-0.869081594252)*x[2]
            ref[(0, 3, 1, 0)]+=0.0440423609722*x_ref[2]**o + (-0.869081594252)*x_ref[2]
            arg[(0, 3, 1, 1)]+=-0.718005491448*x[2]**o + (-0.00824696901913)*x[2]
            ref[(0, 3, 1, 1)]+=-0.718005491448*x_ref[2]**o + (-0.00824696901913)*x_ref[2]
            arg[(0, 3, 1, 2)]+=-0.0571973469478*x[2]**o + (0.0256336621697)*x[2]
            ref[(0, 3, 1, 2)]+=-0.0571973469478*x_ref[2]**o + (0.0256336621697)*x_ref[2]
            arg[(0, 3, 1, 3)]+=-0.0476256203658*x[2]**o + (-0.826843541324)*x[2]
            ref[(0, 3, 1, 3)]+=-0.0476256203658*x_ref[2]**o + (-0.826843541324)*x_ref[2]
            arg[(0, 3, 2, 0)]+=0.355371783335*x[2]**o + (-0.65502997319)*x[2]
            ref[(0, 3, 2, 0)]+=0.355371783335*x_ref[2]**o + (-0.65502997319)*x_ref[2]
            arg[(0, 3, 2, 1)]+=0.638035889674*x[2]**o + (-0.974538720798)*x[2]
            ref[(0, 3, 2, 1)]+=0.638035889674*x_ref[2]**o + (-0.974538720798)*x_ref[2]
            arg[(0, 3, 2, 2)]+=-0.587502369399*x[2]**o + (0.168409487319)*x[2]
            ref[(0, 3, 2, 2)]+=-0.587502369399*x_ref[2]**o + (0.168409487319)*x_ref[2]
            arg[(0, 3, 2, 3)]+=0.397747236873*x[2]**o + (-0.76830431244)*x[2]
            ref[(0, 3, 2, 3)]+=0.397747236873*x_ref[2]**o + (-0.76830431244)*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.331705636342*x[2]**o + (-0.372215863035)*x[2]
            ref[(1, 0, 0, 0)]+=-0.331705636342*x_ref[2]**o + (-0.372215863035)*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.988886884176*x[2]**o + (0.0725629776772)*x[2]
            ref[(1, 0, 0, 1)]+=0.988886884176*x_ref[2]**o + (0.0725629776772)*x_ref[2]
            arg[(1, 0, 0, 2)]+=0.547691777461*x[2]**o + (-0.102994497125)*x[2]
            ref[(1, 0, 0, 2)]+=0.547691777461*x_ref[2]**o + (-0.102994497125)*x_ref[2]
            arg[(1, 0, 0, 3)]+=0.552124204945*x[2]**o + (-0.13503990101)*x[2]
            ref[(1, 0, 0, 3)]+=0.552124204945*x_ref[2]**o + (-0.13503990101)*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.473281898301*x[2]**o + (-0.616280366214)*x[2]
            ref[(1, 0, 1, 0)]+=-0.473281898301*x_ref[2]**o + (-0.616280366214)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.850339531464*x[2]**o + (0.135324121981)*x[2]
            ref[(1, 0, 1, 1)]+=-0.850339531464*x_ref[2]**o + (0.135324121981)*x_ref[2]
            arg[(1, 0, 1, 2)]+=0.0461279705989*x[2]**o + (0.16452369271)*x[2]
            ref[(1, 0, 1, 2)]+=0.0461279705989*x_ref[2]**o + (0.16452369271)*x_ref[2]
            arg[(1, 0, 1, 3)]+=0.889997053979*x[2]**o + (-0.941574253582)*x[2]
            ref[(1, 0, 1, 3)]+=0.889997053979*x_ref[2]**o + (-0.941574253582)*x_ref[2]
            arg[(1, 0, 2, 0)]+=0.452325326895*x[2]**o + (0.46261652939)*x[2]
            ref[(1, 0, 2, 0)]+=0.452325326895*x_ref[2]**o + (0.46261652939)*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.988098398277*x[2]**o + (-0.345833104642)*x[2]
            ref[(1, 0, 2, 1)]+=0.988098398277*x_ref[2]**o + (-0.345833104642)*x_ref[2]
            arg[(1, 0, 2, 2)]+=-0.584865957623*x[2]**o + (0.000360744660901)*x[2]
            ref[(1, 0, 2, 2)]+=-0.584865957623*x_ref[2]**o + (0.000360744660901)*x_ref[2]
            arg[(1, 0, 2, 3)]+=-0.595206132518*x[2]**o + (-0.42996465224)*x[2]
            ref[(1, 0, 2, 3)]+=-0.595206132518*x_ref[2]**o + (-0.42996465224)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.515969393346*x[2]**o + (0.830016110101)*x[2]
            ref[(1, 1, 0, 0)]+=0.515969393346*x_ref[2]**o + (0.830016110101)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.190421771257*x[2]**o + (0.519772491944)*x[2]
            ref[(1, 1, 0, 1)]+=0.190421771257*x_ref[2]**o + (0.519772491944)*x_ref[2]
            arg[(1, 1, 0, 2)]+=-0.519902239362*x[2]**o + (0.42891454032)*x[2]
            ref[(1, 1, 0, 2)]+=-0.519902239362*x_ref[2]**o + (0.42891454032)*x_ref[2]
            arg[(1, 1, 0, 3)]+=0.497569815637*x[2]**o + (-0.508557271295)*x[2]
            ref[(1, 1, 0, 3)]+=0.497569815637*x_ref[2]**o + (-0.508557271295)*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.797396774065*x[2]**o + (-0.549970441948)*x[2]
            ref[(1, 1, 1, 0)]+=0.797396774065*x_ref[2]**o + (-0.549970441948)*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.535958278171*x[2]**o + (0.152924494107)*x[2]
            ref[(1, 1, 1, 1)]+=0.535958278171*x_ref[2]**o + (0.152924494107)*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.713025555899*x[2]**o + (0.63416972643)*x[2]
            ref[(1, 1, 1, 2)]+=-0.713025555899*x_ref[2]**o + (0.63416972643)*x_ref[2]
            arg[(1, 1, 1, 3)]+=-0.373951531097*x[2]**o + (0.912632203681)*x[2]
            ref[(1, 1, 1, 3)]+=-0.373951531097*x_ref[2]**o + (0.912632203681)*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.387789878816*x[2]**o + (-0.270842152401)*x[2]
            ref[(1, 1, 2, 0)]+=-0.387789878816*x_ref[2]**o + (-0.270842152401)*x_ref[2]
            arg[(1, 1, 2, 1)]+=-0.330711744025*x[2]**o + (0.685655607778)*x[2]
            ref[(1, 1, 2, 1)]+=-0.330711744025*x_ref[2]**o + (0.685655607778)*x_ref[2]
            arg[(1, 1, 2, 2)]+=0.22052432074*x[2]**o + (-0.912599325501)*x[2]
            ref[(1, 1, 2, 2)]+=0.22052432074*x_ref[2]**o + (-0.912599325501)*x_ref[2]
            arg[(1, 1, 2, 3)]+=-0.392167052373*x[2]**o + (-0.575867656221)*x[2]
            ref[(1, 1, 2, 3)]+=-0.392167052373*x_ref[2]**o + (-0.575867656221)*x_ref[2]
            arg[(1, 2, 0, 0)]+=0.459288684847*x[2]**o + (-0.507085924437)*x[2]
            ref[(1, 2, 0, 0)]+=0.459288684847*x_ref[2]**o + (-0.507085924437)*x_ref[2]
            arg[(1, 2, 0, 1)]+=-0.395900398002*x[2]**o + (-0.843540664136)*x[2]
            ref[(1, 2, 0, 1)]+=-0.395900398002*x_ref[2]**o + (-0.843540664136)*x_ref[2]
            arg[(1, 2, 0, 2)]+=0.571213867392*x[2]**o + (-0.12565376953)*x[2]
            ref[(1, 2, 0, 2)]+=0.571213867392*x_ref[2]**o + (-0.12565376953)*x_ref[2]
            arg[(1, 2, 0, 3)]+=-0.58671854463*x[2]**o + (0.705035197607)*x[2]
            ref[(1, 2, 0, 3)]+=-0.58671854463*x_ref[2]**o + (0.705035197607)*x_ref[2]
            arg[(1, 2, 1, 0)]+=-0.29691354005*x[2]**o + (-0.76799183754)*x[2]
            ref[(1, 2, 1, 0)]+=-0.29691354005*x_ref[2]**o + (-0.76799183754)*x_ref[2]
            arg[(1, 2, 1, 1)]+=-0.51623304993*x[2]**o + (0.285219943175)*x[2]
            ref[(1, 2, 1, 1)]+=-0.51623304993*x_ref[2]**o + (0.285219943175)*x_ref[2]
            arg[(1, 2, 1, 2)]+=-0.218236713182*x[2]**o + (-0.649613527207)*x[2]
            ref[(1, 2, 1, 2)]+=-0.218236713182*x_ref[2]**o + (-0.649613527207)*x_ref[2]
            arg[(1, 2, 1, 3)]+=0.734156342732*x[2]**o + (-0.723521655776)*x[2]
            ref[(1, 2, 1, 3)]+=0.734156342732*x_ref[2]**o + (-0.723521655776)*x_ref[2]
            arg[(1, 2, 2, 0)]+=-0.728963315447*x[2]**o + (-0.384195364611)*x[2]
            ref[(1, 2, 2, 0)]+=-0.728963315447*x_ref[2]**o + (-0.384195364611)*x_ref[2]
            arg[(1, 2, 2, 1)]+=-0.825445386814*x[2]**o + (0.505803529435)*x[2]
            ref[(1, 2, 2, 1)]+=-0.825445386814*x_ref[2]**o + (0.505803529435)*x_ref[2]
            arg[(1, 2, 2, 2)]+=-0.50320688672*x[2]**o + (-0.0504825057917)*x[2]
            ref[(1, 2, 2, 2)]+=-0.50320688672*x_ref[2]**o + (-0.0504825057917)*x_ref[2]
            arg[(1, 2, 2, 3)]+=-0.783210873912*x[2]**o + (-0.0737878787222)*x[2]
            ref[(1, 2, 2, 3)]+=-0.783210873912*x_ref[2]**o + (-0.0737878787222)*x_ref[2]
            arg[(1, 3, 0, 0)]+=-0.70756090094*x[2]**o + (0.562691512861)*x[2]
            ref[(1, 3, 0, 0)]+=-0.70756090094*x_ref[2]**o + (0.562691512861)*x_ref[2]
            arg[(1, 3, 0, 1)]+=0.865976347117*x[2]**o + (-0.549639587376)*x[2]
            ref[(1, 3, 0, 1)]+=0.865976347117*x_ref[2]**o + (-0.549639587376)*x_ref[2]
            arg[(1, 3, 0, 2)]+=0.248073441047*x[2]**o + (-0.898835164382)*x[2]
            ref[(1, 3, 0, 2)]+=0.248073441047*x_ref[2]**o + (-0.898835164382)*x_ref[2]
            arg[(1, 3, 0, 3)]+=0.874243806114*x[2]**o + (0.661757256635)*x[2]
            ref[(1, 3, 0, 3)]+=0.874243806114*x_ref[2]**o + (0.661757256635)*x_ref[2]
            arg[(1, 3, 1, 0)]+=-0.317582381269*x[2]**o + (0.283281772363)*x[2]
            ref[(1, 3, 1, 0)]+=-0.317582381269*x_ref[2]**o + (0.283281772363)*x_ref[2]
            arg[(1, 3, 1, 1)]+=0.314639431334*x[2]**o + (-0.460211982069)*x[2]
            ref[(1, 3, 1, 1)]+=0.314639431334*x_ref[2]**o + (-0.460211982069)*x_ref[2]
            arg[(1, 3, 1, 2)]+=-0.692553654569*x[2]**o + (-0.268938543685)*x[2]
            ref[(1, 3, 1, 2)]+=-0.692553654569*x_ref[2]**o + (-0.268938543685)*x_ref[2]
            arg[(1, 3, 1, 3)]+=-0.675946647829*x[2]**o + (0.390811769226)*x[2]
            ref[(1, 3, 1, 3)]+=-0.675946647829*x_ref[2]**o + (0.390811769226)*x_ref[2]
            arg[(1, 3, 2, 0)]+=0.236957618758*x[2]**o + (0.576099876838)*x[2]
            ref[(1, 3, 2, 0)]+=0.236957618758*x_ref[2]**o + (0.576099876838)*x_ref[2]
            arg[(1, 3, 2, 1)]+=-0.791044667831*x[2]**o + (-0.96531723911)*x[2]
            ref[(1, 3, 2, 1)]+=-0.791044667831*x_ref[2]**o + (-0.96531723911)*x_ref[2]
            arg[(1, 3, 2, 2)]+=0.371059376331*x[2]**o + (0.950606539083)*x[2]
            ref[(1, 3, 2, 2)]+=0.371059376331*x_ref[2]**o + (0.950606539083)*x_ref[2]
            arg[(1, 3, 2, 3)]+=0.624004865554*x[2]**o + (0.826996202686)*x[2]
            ref[(1, 3, 2, 3)]+=0.624004865554*x_ref[2]**o + (0.826996202686)*x_ref[2]
            arg[(2, 0, 0, 0)]+=0.637804478331*x[2]**o + (0.539552688281)*x[2]
            ref[(2, 0, 0, 0)]+=0.637804478331*x_ref[2]**o + (0.539552688281)*x_ref[2]
            arg[(2, 0, 0, 1)]+=-0.378923288715*x[2]**o + (-0.759283508692)*x[2]
            ref[(2, 0, 0, 1)]+=-0.378923288715*x_ref[2]**o + (-0.759283508692)*x_ref[2]
            arg[(2, 0, 0, 2)]+=-0.518180883332*x[2]**o + (0.147018437366)*x[2]
            ref[(2, 0, 0, 2)]+=-0.518180883332*x_ref[2]**o + (0.147018437366)*x_ref[2]
            arg[(2, 0, 0, 3)]+=0.880560582911*x[2]**o + (0.217018612035)*x[2]
            ref[(2, 0, 0, 3)]+=0.880560582911*x_ref[2]**o + (0.217018612035)*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.861071498302*x[2]**o + (-0.331504634796)*x[2]
            ref[(2, 0, 1, 0)]+=-0.861071498302*x_ref[2]**o + (-0.331504634796)*x_ref[2]
            arg[(2, 0, 1, 1)]+=-0.339382495095*x[2]**o + (-0.851798092414)*x[2]
            ref[(2, 0, 1, 1)]+=-0.339382495095*x_ref[2]**o + (-0.851798092414)*x_ref[2]
            arg[(2, 0, 1, 2)]+=0.563481858157*x[2]**o + (-0.755873264025)*x[2]
            ref[(2, 0, 1, 2)]+=0.563481858157*x_ref[2]**o + (-0.755873264025)*x_ref[2]
            arg[(2, 0, 1, 3)]+=-0.451149082524*x[2]**o + (0.497489302456)*x[2]
            ref[(2, 0, 1, 3)]+=-0.451149082524*x_ref[2]**o + (0.497489302456)*x_ref[2]
            arg[(2, 0, 2, 0)]+=-0.599652404052*x[2]**o + (-0.214932244877)*x[2]
            ref[(2, 0, 2, 0)]+=-0.599652404052*x_ref[2]**o + (-0.214932244877)*x_ref[2]
            arg[(2, 0, 2, 1)]+=-0.849714738883*x[2]**o + (0.786888473069)*x[2]
            ref[(2, 0, 2, 1)]+=-0.849714738883*x_ref[2]**o + (0.786888473069)*x_ref[2]
            arg[(2, 0, 2, 2)]+=-0.891032532788*x[2]**o + (-0.215727096341)*x[2]
            ref[(2, 0, 2, 2)]+=-0.891032532788*x_ref[2]**o + (-0.215727096341)*x_ref[2]
            arg[(2, 0, 2, 3)]+=0.684585583177*x[2]**o + (0.0896154583685)*x[2]
            ref[(2, 0, 2, 3)]+=0.684585583177*x_ref[2]**o + (0.0896154583685)*x_ref[2]
            arg[(2, 1, 0, 0)]+=-0.366279467947*x[2]**o + (0.471331197872)*x[2]
            ref[(2, 1, 0, 0)]+=-0.366279467947*x_ref[2]**o + (0.471331197872)*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.654752469579*x[2]**o + (-0.166780673759)*x[2]
            ref[(2, 1, 0, 1)]+=-0.654752469579*x_ref[2]**o + (-0.166780673759)*x_ref[2]
            arg[(2, 1, 0, 2)]+=-0.339021076687*x[2]**o + (0.0694006442228)*x[2]
            ref[(2, 1, 0, 2)]+=-0.339021076687*x_ref[2]**o + (0.0694006442228)*x_ref[2]
            arg[(2, 1, 0, 3)]+=0.759612676444*x[2]**o + (-0.794657585377)*x[2]
            ref[(2, 1, 0, 3)]+=0.759612676444*x_ref[2]**o + (-0.794657585377)*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.705882741022*x[2]**o + (0.478801124372)*x[2]
            ref[(2, 1, 1, 0)]+=0.705882741022*x_ref[2]**o + (0.478801124372)*x_ref[2]
            arg[(2, 1, 1, 1)]+=-0.349773234036*x[2]**o + (-0.988704521958)*x[2]
            ref[(2, 1, 1, 1)]+=-0.349773234036*x_ref[2]**o + (-0.988704521958)*x_ref[2]
            arg[(2, 1, 1, 2)]+=0.994376659777*x[2]**o + (0.9889364767)*x[2]
            ref[(2, 1, 1, 2)]+=0.994376659777*x_ref[2]**o + (0.9889364767)*x_ref[2]
            arg[(2, 1, 1, 3)]+=0.07890773295*x[2]**o + (0.664225207103)*x[2]
            ref[(2, 1, 1, 3)]+=0.07890773295*x_ref[2]**o + (0.664225207103)*x_ref[2]
            arg[(2, 1, 2, 0)]+=-0.393551209054*x[2]**o + (0.884679897286)*x[2]
            ref[(2, 1, 2, 0)]+=-0.393551209054*x_ref[2]**o + (0.884679897286)*x_ref[2]
            arg[(2, 1, 2, 1)]+=-0.512408477627*x[2]**o + (0.918325466495)*x[2]
            ref[(2, 1, 2, 1)]+=-0.512408477627*x_ref[2]**o + (0.918325466495)*x_ref[2]
            arg[(2, 1, 2, 2)]+=0.334372911039*x[2]**o + (-0.0943375533399)*x[2]
            ref[(2, 1, 2, 2)]+=0.334372911039*x_ref[2]**o + (-0.0943375533399)*x_ref[2]
            arg[(2, 1, 2, 3)]+=0.93419064641*x[2]**o + (-0.685605793654)*x[2]
            ref[(2, 1, 2, 3)]+=0.93419064641*x_ref[2]**o + (-0.685605793654)*x_ref[2]
            arg[(2, 2, 0, 0)]+=0.206128959766*x[2]**o + (0.612228837615)*x[2]
            ref[(2, 2, 0, 0)]+=0.206128959766*x_ref[2]**o + (0.612228837615)*x_ref[2]
            arg[(2, 2, 0, 1)]+=0.705102779146*x[2]**o + (-0.917406799998)*x[2]
            ref[(2, 2, 0, 1)]+=0.705102779146*x_ref[2]**o + (-0.917406799998)*x_ref[2]
            arg[(2, 2, 0, 2)]+=0.791272004642*x[2]**o + (0.0292702616625)*x[2]
            ref[(2, 2, 0, 2)]+=0.791272004642*x_ref[2]**o + (0.0292702616625)*x_ref[2]
            arg[(2, 2, 0, 3)]+=0.418442226378*x[2]**o + (-0.0305673814231)*x[2]
            ref[(2, 2, 0, 3)]+=0.418442226378*x_ref[2]**o + (-0.0305673814231)*x_ref[2]
            arg[(2, 2, 1, 0)]+=0.150541927997*x[2]**o + (0.578728353549)*x[2]
            ref[(2, 2, 1, 0)]+=0.150541927997*x_ref[2]**o + (0.578728353549)*x_ref[2]
            arg[(2, 2, 1, 1)]+=-0.222901347292*x[2]**o + (-0.278215956263)*x[2]
            ref[(2, 2, 1, 1)]+=-0.222901347292*x_ref[2]**o + (-0.278215956263)*x_ref[2]
            arg[(2, 2, 1, 2)]+=-0.43998165979*x[2]**o + (0.799223094585)*x[2]
            ref[(2, 2, 1, 2)]+=-0.43998165979*x_ref[2]**o + (0.799223094585)*x_ref[2]
            arg[(2, 2, 1, 3)]+=-0.973970681372*x[2]**o + (0.38909784902)*x[2]
            ref[(2, 2, 1, 3)]+=-0.973970681372*x_ref[2]**o + (0.38909784902)*x_ref[2]
            arg[(2, 2, 2, 0)]+=0.398228210958*x[2]**o + (0.99742311404)*x[2]
            ref[(2, 2, 2, 0)]+=0.398228210958*x_ref[2]**o + (0.99742311404)*x_ref[2]
            arg[(2, 2, 2, 1)]+=0.541847272377*x[2]**o + (0.333098914913)*x[2]
            ref[(2, 2, 2, 1)]+=0.541847272377*x_ref[2]**o + (0.333098914913)*x_ref[2]
            arg[(2, 2, 2, 2)]+=0.429280039833*x[2]**o + (-0.143321622491)*x[2]
            ref[(2, 2, 2, 2)]+=0.429280039833*x_ref[2]**o + (-0.143321622491)*x_ref[2]
            arg[(2, 2, 2, 3)]+=-0.748447348671*x[2]**o + (-0.516542421459)*x[2]
            ref[(2, 2, 2, 3)]+=-0.748447348671*x_ref[2]**o + (-0.516542421459)*x_ref[2]
            arg[(2, 3, 0, 0)]+=-0.235687421443*x[2]**o + (0.906982869696)*x[2]
            ref[(2, 3, 0, 0)]+=-0.235687421443*x_ref[2]**o + (0.906982869696)*x_ref[2]
            arg[(2, 3, 0, 1)]+=0.172398238935*x[2]**o + (0.00987256350419)*x[2]
            ref[(2, 3, 0, 1)]+=0.172398238935*x_ref[2]**o + (0.00987256350419)*x_ref[2]
            arg[(2, 3, 0, 2)]+=0.346828452102*x[2]**o + (0.895399017326)*x[2]
            ref[(2, 3, 0, 2)]+=0.346828452102*x_ref[2]**o + (0.895399017326)*x_ref[2]
            arg[(2, 3, 0, 3)]+=0.024875703884*x[2]**o + (0.0269229758556)*x[2]
            ref[(2, 3, 0, 3)]+=0.024875703884*x_ref[2]**o + (0.0269229758556)*x_ref[2]
            arg[(2, 3, 1, 0)]+=-0.814780977392*x[2]**o + (-0.932768281878)*x[2]
            ref[(2, 3, 1, 0)]+=-0.814780977392*x_ref[2]**o + (-0.932768281878)*x_ref[2]
            arg[(2, 3, 1, 1)]+=0.187247241997*x[2]**o + (-0.204254201939)*x[2]
            ref[(2, 3, 1, 1)]+=0.187247241997*x_ref[2]**o + (-0.204254201939)*x_ref[2]
            arg[(2, 3, 1, 2)]+=0.109131166146*x[2]**o + (0.939073239714)*x[2]
            ref[(2, 3, 1, 2)]+=0.109131166146*x_ref[2]**o + (0.939073239714)*x_ref[2]
            arg[(2, 3, 1, 3)]+=-0.779895423461*x[2]**o + (-0.720600719998)*x[2]
            ref[(2, 3, 1, 3)]+=-0.779895423461*x_ref[2]**o + (-0.720600719998)*x_ref[2]
            arg[(2, 3, 2, 0)]+=0.909683567775*x[2]**o + (0.500803177712)*x[2]
            ref[(2, 3, 2, 0)]+=0.909683567775*x_ref[2]**o + (0.500803177712)*x_ref[2]
            arg[(2, 3, 2, 1)]+=-0.462663934316*x[2]**o + (-0.019271644097)*x[2]
            ref[(2, 3, 2, 1)]+=-0.462663934316*x_ref[2]**o + (-0.019271644097)*x_ref[2]
            arg[(2, 3, 2, 2)]+=-0.239630667248*x[2]**o + (-0.28482533319)*x[2]
            ref[(2, 3, 2, 2)]+=-0.239630667248*x_ref[2]**o + (-0.28482533319)*x_ref[2]
            arg[(2, 3, 2, 3)]+=-0.975863924891*x[2]**o + (-0.0540779500495)*x[2]
            ref[(2, 3, 2, 3)]+=-0.975863924891*x_ref[2]**o + (-0.0540779500495)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.820664629413*x[0]**o + (0.0974902706436)*x[0] + (-0.703267974011)*x[1]**o + (-0.906935257384)*x[1]
        ref=0.820664629413*x_ref[0]**o + (0.0974902706436)*x_ref[0] + (-0.703267974011)*x_ref[1]**o + (-0.906935257384)*x_ref[1]
        if dim==3:
            arg+=(0.436095161385)*x[2]**o + (-0.143526929716)*x[2]
            ref+=(0.436095161385)*x_ref[2]**o + (-0.143526929716)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=0.858408899574*x[0]**o + (0.97050167223)*x[0] + (0.117489887427)*x[1]**o + (0.388265626459)*x[1]
        ref[(0,)]=0.858408899574*x_ref[0]**o + (0.97050167223)*x_ref[0] + (0.117489887427)*x_ref[1]**o + (0.388265626459)*x_ref[1]
        arg[(1,)]=0.248257253005*x[0]**o + (-0.971571638293)*x[0] + (0.197233771608)*x[1]**o + (0.599139999651)*x[1]
        ref[(1,)]=0.248257253005*x_ref[0]**o + (-0.971571638293)*x_ref[0] + (0.197233771608)*x_ref[1]**o + (0.599139999651)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.308498098895*x[2]**o + (0.516904110518)*x[2]
            ref[(0,)]+=-0.308498098895*x_ref[2]**o + (0.516904110518)*x_ref[2]
            arg[(1,)]+=0.247197621607*x[2]**o + (0.0430661037887)*x[2]
            ref[(1,)]+=0.247197621607*x_ref[2]**o + (0.0430661037887)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3),w)
        ref = Data(0,(3, 3),w_ref)
        arg[(0, 0)]=0.492310866474*x[0]**o + (0.187384516343)*x[0] + (0.265692366747)*x[1]**o + (-0.791970517458)*x[1]
        ref[(0, 0)]=0.492310866474*x_ref[0]**o + (0.187384516343)*x_ref[0] + (0.265692366747)*x_ref[1]**o + (-0.791970517458)*x_ref[1]
        arg[(0, 1)]=-0.211779950482*x[0]**o + (0.357424153249)*x[0] + (-0.547501195323)*x[1]**o + (0.507428285294)*x[1]
        ref[(0, 1)]=-0.211779950482*x_ref[0]**o + (0.357424153249)*x_ref[0] + (-0.547501195323)*x_ref[1]**o + (0.507428285294)*x_ref[1]
        arg[(0, 2)]=-0.482832592603*x[0]**o + (-0.679218702761)*x[0] + (0.620364214917)*x[1]**o + (-0.232995679903)*x[1]
        ref[(0, 2)]=-0.482832592603*x_ref[0]**o + (-0.679218702761)*x_ref[0] + (0.620364214917)*x_ref[1]**o + (-0.232995679903)*x_ref[1]
        arg[(1, 0)]=0.509381078203*x[0]**o + (-0.448150249446)*x[0] + (0.101177239549)*x[1]**o + (-0.460377476581)*x[1]
        ref[(1, 0)]=0.509381078203*x_ref[0]**o + (-0.448150249446)*x_ref[0] + (0.101177239549)*x_ref[1]**o + (-0.460377476581)*x_ref[1]
        arg[(1, 1)]=-0.59069633255*x[0]**o + (-0.605371383442)*x[0] + (0.799681287514)*x[1]**o + (0.251531005912)*x[1]
        ref[(1, 1)]=-0.59069633255*x_ref[0]**o + (-0.605371383442)*x_ref[0] + (0.799681287514)*x_ref[1]**o + (0.251531005912)*x_ref[1]
        arg[(1, 2)]=-0.456561590127*x[0]**o + (-0.733449326444)*x[0] + (-0.749414142444)*x[1]**o + (0.559960002404)*x[1]
        ref[(1, 2)]=-0.456561590127*x_ref[0]**o + (-0.733449326444)*x_ref[0] + (-0.749414142444)*x_ref[1]**o + (0.559960002404)*x_ref[1]
        arg[(2, 0)]=-0.823564413192*x[0]**o + (0.129730898795)*x[0] + (-0.0224159502525)*x[1]**o + (-0.89313177564)*x[1]
        ref[(2, 0)]=-0.823564413192*x_ref[0]**o + (0.129730898795)*x_ref[0] + (-0.0224159502525)*x_ref[1]**o + (-0.89313177564)*x_ref[1]
        arg[(2, 1)]=0.99932768873*x[0]**o + (0.35995029758)*x[0] + (0.630471675228)*x[1]**o + (0.455166471314)*x[1]
        ref[(2, 1)]=0.99932768873*x_ref[0]**o + (0.35995029758)*x_ref[0] + (0.630471675228)*x_ref[1]**o + (0.455166471314)*x_ref[1]
        arg[(2, 2)]=0.10710530564*x[0]**o + (0.1582700502)*x[0] + (-0.550579101871)*x[1]**o + (0.673358487742)*x[1]
        ref[(2, 2)]=0.10710530564*x_ref[0]**o + (0.1582700502)*x_ref[0] + (-0.550579101871)*x_ref[1]**o + (0.673358487742)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.0619895977088*x[2]**o + (-0.0641003817821)*x[2]
            ref[(0, 0)]+=0.0619895977088*x_ref[2]**o + (-0.0641003817821)*x_ref[2]
            arg[(0, 1)]+=0.344880404358*x[2]**o + (0.389845796409)*x[2]
            ref[(0, 1)]+=0.344880404358*x_ref[2]**o + (0.389845796409)*x_ref[2]
            arg[(0, 2)]+=-0.878408180534*x[2]**o + (-0.0592281635746)*x[2]
            ref[(0, 2)]+=-0.878408180534*x_ref[2]**o + (-0.0592281635746)*x_ref[2]
            arg[(1, 0)]+=0.693269251866*x[2]**o + (0.00930484362323)*x[2]
            ref[(1, 0)]+=0.693269251866*x_ref[2]**o + (0.00930484362323)*x_ref[2]
            arg[(1, 1)]+=0.517264281339*x[2]**o + (-0.195188403515)*x[2]
            ref[(1, 1)]+=0.517264281339*x_ref[2]**o + (-0.195188403515)*x_ref[2]
            arg[(1, 2)]+=0.0375443197261*x[2]**o + (0.830115347752)*x[2]
            ref[(1, 2)]+=0.0375443197261*x_ref[2]**o + (0.830115347752)*x_ref[2]
            arg[(2, 0)]+=-0.795805559516*x[2]**o + (0.175610197663)*x[2]
            ref[(2, 0)]+=-0.795805559516*x_ref[2]**o + (0.175610197663)*x_ref[2]
            arg[(2, 1)]+=-0.84306878603*x[2]**o + (-0.133489733038)*x[2]
            ref[(2, 1)]+=-0.84306878603*x_ref[2]**o + (-0.133489733038)*x_ref[2]
            arg[(2, 2)]+=-0.190465493354*x[2]**o + (-0.98932024889)*x[2]
            ref[(2, 2)]+=-0.190465493354*x_ref[2]**o + (-0.98932024889)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 4),w)
        ref = Data(0,(2, 2, 4),w_ref)
        arg[(0, 0, 0)]=-0.444004959725*x[0]**o + (0.900441789572)*x[0] + (-0.418759015797)*x[1]**o + (0.831759700178)*x[1]
        ref[(0, 0, 0)]=-0.444004959725*x_ref[0]**o + (0.900441789572)*x_ref[0] + (-0.418759015797)*x_ref[1]**o + (0.831759700178)*x_ref[1]
        arg[(0, 0, 1)]=0.276430892577*x[0]**o + (0.472657437855)*x[0] + (0.619832611311)*x[1]**o + (0.482347564173)*x[1]
        ref[(0, 0, 1)]=0.276430892577*x_ref[0]**o + (0.472657437855)*x_ref[0] + (0.619832611311)*x_ref[1]**o + (0.482347564173)*x_ref[1]
        arg[(0, 0, 2)]=0.807004962444*x[0]**o + (-0.0959144589115)*x[0] + (0.586136664947)*x[1]**o + (0.472312593758)*x[1]
        ref[(0, 0, 2)]=0.807004962444*x_ref[0]**o + (-0.0959144589115)*x_ref[0] + (0.586136664947)*x_ref[1]**o + (0.472312593758)*x_ref[1]
        arg[(0, 0, 3)]=-0.54336996176*x[0]**o + (0.669977863862)*x[0] + (0.52311047251)*x[1]**o + (-0.713809781757)*x[1]
        ref[(0, 0, 3)]=-0.54336996176*x_ref[0]**o + (0.669977863862)*x_ref[0] + (0.52311047251)*x_ref[1]**o + (-0.713809781757)*x_ref[1]
        arg[(0, 1, 0)]=-0.723452872258*x[0]**o + (-0.494125356973)*x[0] + (-0.675961863873)*x[1]**o + (-0.0193442517035)*x[1]
        ref[(0, 1, 0)]=-0.723452872258*x_ref[0]**o + (-0.494125356973)*x_ref[0] + (-0.675961863873)*x_ref[1]**o + (-0.0193442517035)*x_ref[1]
        arg[(0, 1, 1)]=-0.339166572514*x[0]**o + (0.204477607718)*x[0] + (-0.0106185724098)*x[1]**o + (-0.709432647673)*x[1]
        ref[(0, 1, 1)]=-0.339166572514*x_ref[0]**o + (0.204477607718)*x_ref[0] + (-0.0106185724098)*x_ref[1]**o + (-0.709432647673)*x_ref[1]
        arg[(0, 1, 2)]=-0.577517984878*x[0]**o + (0.875139325009)*x[0] + (-0.323223993455)*x[1]**o + (-0.544033649728)*x[1]
        ref[(0, 1, 2)]=-0.577517984878*x_ref[0]**o + (0.875139325009)*x_ref[0] + (-0.323223993455)*x_ref[1]**o + (-0.544033649728)*x_ref[1]
        arg[(0, 1, 3)]=0.506424264572*x[0]**o + (-0.973970650427)*x[0] + (0.381819982547)*x[1]**o + (-0.699558897949)*x[1]
        ref[(0, 1, 3)]=0.506424264572*x_ref[0]**o + (-0.973970650427)*x_ref[0] + (0.381819982547)*x_ref[1]**o + (-0.699558897949)*x_ref[1]
        arg[(1, 0, 0)]=0.455273463592*x[0]**o + (0.319653539436)*x[0] + (0.146800058397)*x[1]**o + (-0.673331533578)*x[1]
        ref[(1, 0, 0)]=0.455273463592*x_ref[0]**o + (0.319653539436)*x_ref[0] + (0.146800058397)*x_ref[1]**o + (-0.673331533578)*x_ref[1]
        arg[(1, 0, 1)]=-0.748204353784*x[0]**o + (-0.00519078047243)*x[0] + (-0.553628081079)*x[1]**o + (0.377976554588)*x[1]
        ref[(1, 0, 1)]=-0.748204353784*x_ref[0]**o + (-0.00519078047243)*x_ref[0] + (-0.553628081079)*x_ref[1]**o + (0.377976554588)*x_ref[1]
        arg[(1, 0, 2)]=-0.148283447184*x[0]**o + (-0.563894043098)*x[0] + (-0.540239110487)*x[1]**o + (-0.074722250653)*x[1]
        ref[(1, 0, 2)]=-0.148283447184*x_ref[0]**o + (-0.563894043098)*x_ref[0] + (-0.540239110487)*x_ref[1]**o + (-0.074722250653)*x_ref[1]
        arg[(1, 0, 3)]=-0.199534786847*x[0]**o + (-0.511158310471)*x[0] + (0.288150473449)*x[1]**o + (0.566945481055)*x[1]
        ref[(1, 0, 3)]=-0.199534786847*x_ref[0]**o + (-0.511158310471)*x_ref[0] + (0.288150473449)*x_ref[1]**o + (0.566945481055)*x_ref[1]
        arg[(1, 1, 0)]=-0.336349259823*x[0]**o + (-0.289374259046)*x[0] + (0.693770428101)*x[1]**o + (-0.288220207551)*x[1]
        ref[(1, 1, 0)]=-0.336349259823*x_ref[0]**o + (-0.289374259046)*x_ref[0] + (0.693770428101)*x_ref[1]**o + (-0.288220207551)*x_ref[1]
        arg[(1, 1, 1)]=-0.815215241943*x[0]**o + (0.0776547623268)*x[0] + (0.560984360008)*x[1]**o + (0.282725824337)*x[1]
        ref[(1, 1, 1)]=-0.815215241943*x_ref[0]**o + (0.0776547623268)*x_ref[0] + (0.560984360008)*x_ref[1]**o + (0.282725824337)*x_ref[1]
        arg[(1, 1, 2)]=-0.741488812713*x[0]**o + (-0.968616514902)*x[0] + (-0.601879074963)*x[1]**o + (-0.595209277631)*x[1]
        ref[(1, 1, 2)]=-0.741488812713*x_ref[0]**o + (-0.968616514902)*x_ref[0] + (-0.601879074963)*x_ref[1]**o + (-0.595209277631)*x_ref[1]
        arg[(1, 1, 3)]=0.93242059398*x[0]**o + (-0.957026860794)*x[0] + (0.00585546550398)*x[1]**o + (0.931845118815)*x[1]
        ref[(1, 1, 3)]=0.93242059398*x_ref[0]**o + (-0.957026860794)*x_ref[0] + (0.00585546550398)*x_ref[1]**o + (0.931845118815)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.456794225251*x[2]**o + (-0.695216169215)*x[2]
            ref[(0, 0, 0)]+=-0.456794225251*x_ref[2]**o + (-0.695216169215)*x_ref[2]
            arg[(0, 0, 1)]+=-0.953003000405*x[2]**o + (-0.118394798686)*x[2]
            ref[(0, 0, 1)]+=-0.953003000405*x_ref[2]**o + (-0.118394798686)*x_ref[2]
            arg[(0, 0, 2)]+=-0.760444587575*x[2]**o + (-0.940598678641)*x[2]
            ref[(0, 0, 2)]+=-0.760444587575*x_ref[2]**o + (-0.940598678641)*x_ref[2]
            arg[(0, 0, 3)]+=-0.368215032812*x[2]**o + (0.67745761953)*x[2]
            ref[(0, 0, 3)]+=-0.368215032812*x_ref[2]**o + (0.67745761953)*x_ref[2]
            arg[(0, 1, 0)]+=-0.66462825617*x[2]**o + (0.0529630458926)*x[2]
            ref[(0, 1, 0)]+=-0.66462825617*x_ref[2]**o + (0.0529630458926)*x_ref[2]
            arg[(0, 1, 1)]+=-0.828720517164*x[2]**o + (0.778229087738)*x[2]
            ref[(0, 1, 1)]+=-0.828720517164*x_ref[2]**o + (0.778229087738)*x_ref[2]
            arg[(0, 1, 2)]+=-0.240658802285*x[2]**o + (0.678182071727)*x[2]
            ref[(0, 1, 2)]+=-0.240658802285*x_ref[2]**o + (0.678182071727)*x_ref[2]
            arg[(0, 1, 3)]+=0.993237771575*x[2]**o + (0.679609017111)*x[2]
            ref[(0, 1, 3)]+=0.993237771575*x_ref[2]**o + (0.679609017111)*x_ref[2]
            arg[(1, 0, 0)]+=-0.901605712418*x[2]**o + (0.972741382274)*x[2]
            ref[(1, 0, 0)]+=-0.901605712418*x_ref[2]**o + (0.972741382274)*x_ref[2]
            arg[(1, 0, 1)]+=0.889740523345*x[2]**o + (-0.691235469536)*x[2]
            ref[(1, 0, 1)]+=0.889740523345*x_ref[2]**o + (-0.691235469536)*x_ref[2]
            arg[(1, 0, 2)]+=0.0211018145828*x[2]**o + (0.922719541486)*x[2]
            ref[(1, 0, 2)]+=0.0211018145828*x_ref[2]**o + (0.922719541486)*x_ref[2]
            arg[(1, 0, 3)]+=0.619063126787*x[2]**o + (0.159675881803)*x[2]
            ref[(1, 0, 3)]+=0.619063126787*x_ref[2]**o + (0.159675881803)*x_ref[2]
            arg[(1, 1, 0)]+=0.16294534252*x[2]**o + (-0.595199044312)*x[2]
            ref[(1, 1, 0)]+=0.16294534252*x_ref[2]**o + (-0.595199044312)*x_ref[2]
            arg[(1, 1, 1)]+=0.241320179017*x[2]**o + (-0.640374073488)*x[2]
            ref[(1, 1, 1)]+=0.241320179017*x_ref[2]**o + (-0.640374073488)*x_ref[2]
            arg[(1, 1, 2)]+=0.830045063212*x[2]**o + (-0.363989173843)*x[2]
            ref[(1, 1, 2)]+=0.830045063212*x_ref[2]**o + (-0.363989173843)*x_ref[2]
            arg[(1, 1, 3)]+=0.542443037528*x[2]**o + (-0.162779077648)*x[2]
            ref[(1, 1, 3)]+=0.542443037528*x_ref[2]**o + (-0.162779077648)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 4, 3),w)
        ref = Data(0,(3, 4, 4, 3),w_ref)
        arg[(0, 0, 0, 0)]=-0.614158724032*x[0]**o + (0.456016363185)*x[0] + (-0.284525582723)*x[1]**o + (0.0432875326066)*x[1]
        ref[(0, 0, 0, 0)]=-0.614158724032*x_ref[0]**o + (0.456016363185)*x_ref[0] + (-0.284525582723)*x_ref[1]**o + (0.0432875326066)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.951250582909*x[0]**o + (-0.212811327343)*x[0] + (0.0165744040051)*x[1]**o + (0.394175564117)*x[1]
        ref[(0, 0, 0, 1)]=0.951250582909*x_ref[0]**o + (-0.212811327343)*x_ref[0] + (0.0165744040051)*x_ref[1]**o + (0.394175564117)*x_ref[1]
        arg[(0, 0, 0, 2)]=-0.203202831924*x[0]**o + (0.559894467495)*x[0] + (0.260628802938)*x[1]**o + (0.00469851357823)*x[1]
        ref[(0, 0, 0, 2)]=-0.203202831924*x_ref[0]**o + (0.559894467495)*x_ref[0] + (0.260628802938)*x_ref[1]**o + (0.00469851357823)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.441519507436*x[0]**o + (-0.72725570993)*x[0] + (0.970945676481)*x[1]**o + (0.505115289545)*x[1]
        ref[(0, 0, 1, 0)]=-0.441519507436*x_ref[0]**o + (-0.72725570993)*x_ref[0] + (0.970945676481)*x_ref[1]**o + (0.505115289545)*x_ref[1]
        arg[(0, 0, 1, 1)]=-0.203681670313*x[0]**o + (0.496636904337)*x[0] + (-0.926750735525)*x[1]**o + (0.204446125409)*x[1]
        ref[(0, 0, 1, 1)]=-0.203681670313*x_ref[0]**o + (0.496636904337)*x_ref[0] + (-0.926750735525)*x_ref[1]**o + (0.204446125409)*x_ref[1]
        arg[(0, 0, 1, 2)]=-0.530798973677*x[0]**o + (-0.460231195676)*x[0] + (-0.524480386311)*x[1]**o + (0.0234411791503)*x[1]
        ref[(0, 0, 1, 2)]=-0.530798973677*x_ref[0]**o + (-0.460231195676)*x_ref[0] + (-0.524480386311)*x_ref[1]**o + (0.0234411791503)*x_ref[1]
        arg[(0, 0, 2, 0)]=0.410652133014*x[0]**o + (0.232758648449)*x[0] + (-0.145066533883)*x[1]**o + (-0.966340293975)*x[1]
        ref[(0, 0, 2, 0)]=0.410652133014*x_ref[0]**o + (0.232758648449)*x_ref[0] + (-0.145066533883)*x_ref[1]**o + (-0.966340293975)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.1611707873*x[0]**o + (-0.855614656294)*x[0] + (0.105915763866)*x[1]**o + (0.585457790327)*x[1]
        ref[(0, 0, 2, 1)]=-0.1611707873*x_ref[0]**o + (-0.855614656294)*x_ref[0] + (0.105915763866)*x_ref[1]**o + (0.585457790327)*x_ref[1]
        arg[(0, 0, 2, 2)]=0.801900858942*x[0]**o + (0.204731099745)*x[0] + (0.607062001468)*x[1]**o + (-0.00234344791237)*x[1]
        ref[(0, 0, 2, 2)]=0.801900858942*x_ref[0]**o + (0.204731099745)*x_ref[0] + (0.607062001468)*x_ref[1]**o + (-0.00234344791237)*x_ref[1]
        arg[(0, 0, 3, 0)]=0.0554237200822*x[0]**o + (-0.808905461206)*x[0] + (0.35762911943)*x[1]**o + (-0.461506696319)*x[1]
        ref[(0, 0, 3, 0)]=0.0554237200822*x_ref[0]**o + (-0.808905461206)*x_ref[0] + (0.35762911943)*x_ref[1]**o + (-0.461506696319)*x_ref[1]
        arg[(0, 0, 3, 1)]=0.539419195695*x[0]**o + (-0.825199500388)*x[0] + (-0.00858241312833)*x[1]**o + (-0.0733941941324)*x[1]
        ref[(0, 0, 3, 1)]=0.539419195695*x_ref[0]**o + (-0.825199500388)*x_ref[0] + (-0.00858241312833)*x_ref[1]**o + (-0.0733941941324)*x_ref[1]
        arg[(0, 0, 3, 2)]=0.797461413135*x[0]**o + (0.0395013185397)*x[0] + (0.634710411763)*x[1]**o + (0.372970055112)*x[1]
        ref[(0, 0, 3, 2)]=0.797461413135*x_ref[0]**o + (0.0395013185397)*x_ref[0] + (0.634710411763)*x_ref[1]**o + (0.372970055112)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.545643203288*x[0]**o + (0.337502121107)*x[0] + (0.564672956364)*x[1]**o + (-0.967474901537)*x[1]
        ref[(0, 1, 0, 0)]=0.545643203288*x_ref[0]**o + (0.337502121107)*x_ref[0] + (0.564672956364)*x_ref[1]**o + (-0.967474901537)*x_ref[1]
        arg[(0, 1, 0, 1)]=-0.382798213783*x[0]**o + (0.916882406252)*x[0] + (-0.850863776704)*x[1]**o + (0.289517489413)*x[1]
        ref[(0, 1, 0, 1)]=-0.382798213783*x_ref[0]**o + (0.916882406252)*x_ref[0] + (-0.850863776704)*x_ref[1]**o + (0.289517489413)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.458907513017*x[0]**o + (-0.535419151336)*x[0] + (-0.0824476030475)*x[1]**o + (-0.256306048529)*x[1]
        ref[(0, 1, 0, 2)]=0.458907513017*x_ref[0]**o + (-0.535419151336)*x_ref[0] + (-0.0824476030475)*x_ref[1]**o + (-0.256306048529)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.716737554706*x[0]**o + (-0.580906282875)*x[0] + (-0.51761103178)*x[1]**o + (-0.0130054964239)*x[1]
        ref[(0, 1, 1, 0)]=0.716737554706*x_ref[0]**o + (-0.580906282875)*x_ref[0] + (-0.51761103178)*x_ref[1]**o + (-0.0130054964239)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.913346475495*x[0]**o + (0.230763302916)*x[0] + (0.216552064544)*x[1]**o + (0.414042014093)*x[1]
        ref[(0, 1, 1, 1)]=-0.913346475495*x_ref[0]**o + (0.230763302916)*x_ref[0] + (0.216552064544)*x_ref[1]**o + (0.414042014093)*x_ref[1]
        arg[(0, 1, 1, 2)]=0.790521569293*x[0]**o + (0.481722538849)*x[0] + (0.961715704167)*x[1]**o + (-0.198589610145)*x[1]
        ref[(0, 1, 1, 2)]=0.790521569293*x_ref[0]**o + (0.481722538849)*x_ref[0] + (0.961715704167)*x_ref[1]**o + (-0.198589610145)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.508089796553*x[0]**o + (-0.64388375152)*x[0] + (0.48032605546)*x[1]**o + (-0.45634006434)*x[1]
        ref[(0, 1, 2, 0)]=-0.508089796553*x_ref[0]**o + (-0.64388375152)*x_ref[0] + (0.48032605546)*x_ref[1]**o + (-0.45634006434)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.0240882329954*x[0]**o + (-0.665384919658)*x[0] + (0.808784917573)*x[1]**o + (-0.0881058215582)*x[1]
        ref[(0, 1, 2, 1)]=0.0240882329954*x_ref[0]**o + (-0.665384919658)*x_ref[0] + (0.808784917573)*x_ref[1]**o + (-0.0881058215582)*x_ref[1]
        arg[(0, 1, 2, 2)]=-0.73686369253*x[0]**o + (-0.407423203981)*x[0] + (-0.439297119246)*x[1]**o + (0.0836068915879)*x[1]
        ref[(0, 1, 2, 2)]=-0.73686369253*x_ref[0]**o + (-0.407423203981)*x_ref[0] + (-0.439297119246)*x_ref[1]**o + (0.0836068915879)*x_ref[1]
        arg[(0, 1, 3, 0)]=-0.869880478561*x[0]**o + (0.889447950898)*x[0] + (0.993423003767)*x[1]**o + (0.720751691813)*x[1]
        ref[(0, 1, 3, 0)]=-0.869880478561*x_ref[0]**o + (0.889447950898)*x_ref[0] + (0.993423003767)*x_ref[1]**o + (0.720751691813)*x_ref[1]
        arg[(0, 1, 3, 1)]=0.597556875444*x[0]**o + (-0.980848093597)*x[0] + (0.0743525389751)*x[1]**o + (-0.301601644434)*x[1]
        ref[(0, 1, 3, 1)]=0.597556875444*x_ref[0]**o + (-0.980848093597)*x_ref[0] + (0.0743525389751)*x_ref[1]**o + (-0.301601644434)*x_ref[1]
        arg[(0, 1, 3, 2)]=-0.0791961909028*x[0]**o + (-0.10447811363)*x[0] + (-0.947263725198)*x[1]**o + (-0.505752516)*x[1]
        ref[(0, 1, 3, 2)]=-0.0791961909028*x_ref[0]**o + (-0.10447811363)*x_ref[0] + (-0.947263725198)*x_ref[1]**o + (-0.505752516)*x_ref[1]
        arg[(0, 2, 0, 0)]=0.968709227288*x[0]**o + (0.680700788405)*x[0] + (0.449606505363)*x[1]**o + (0.415956003818)*x[1]
        ref[(0, 2, 0, 0)]=0.968709227288*x_ref[0]**o + (0.680700788405)*x_ref[0] + (0.449606505363)*x_ref[1]**o + (0.415956003818)*x_ref[1]
        arg[(0, 2, 0, 1)]=0.788204843681*x[0]**o + (0.0429401661852)*x[0] + (0.930931444712)*x[1]**o + (-0.565639649794)*x[1]
        ref[(0, 2, 0, 1)]=0.788204843681*x_ref[0]**o + (0.0429401661852)*x_ref[0] + (0.930931444712)*x_ref[1]**o + (-0.565639649794)*x_ref[1]
        arg[(0, 2, 0, 2)]=0.84313022715*x[0]**o + (-0.117734857898)*x[0] + (0.163416652025)*x[1]**o + (-0.253059124883)*x[1]
        ref[(0, 2, 0, 2)]=0.84313022715*x_ref[0]**o + (-0.117734857898)*x_ref[0] + (0.163416652025)*x_ref[1]**o + (-0.253059124883)*x_ref[1]
        arg[(0, 2, 1, 0)]=-0.823327714029*x[0]**o + (0.658915033277)*x[0] + (-0.564087424643)*x[1]**o + (0.818317863915)*x[1]
        ref[(0, 2, 1, 0)]=-0.823327714029*x_ref[0]**o + (0.658915033277)*x_ref[0] + (-0.564087424643)*x_ref[1]**o + (0.818317863915)*x_ref[1]
        arg[(0, 2, 1, 1)]=-0.216721840782*x[0]**o + (-0.318366221569)*x[0] + (-0.121330867074)*x[1]**o + (0.85655007276)*x[1]
        ref[(0, 2, 1, 1)]=-0.216721840782*x_ref[0]**o + (-0.318366221569)*x_ref[0] + (-0.121330867074)*x_ref[1]**o + (0.85655007276)*x_ref[1]
        arg[(0, 2, 1, 2)]=-0.716348618675*x[0]**o + (0.312950281441)*x[0] + (-0.610029734047)*x[1]**o + (0.306991341284)*x[1]
        ref[(0, 2, 1, 2)]=-0.716348618675*x_ref[0]**o + (0.312950281441)*x_ref[0] + (-0.610029734047)*x_ref[1]**o + (0.306991341284)*x_ref[1]
        arg[(0, 2, 2, 0)]=-0.816741286482*x[0]**o + (0.0569067931483)*x[0] + (0.964294372584)*x[1]**o + (0.772434246308)*x[1]
        ref[(0, 2, 2, 0)]=-0.816741286482*x_ref[0]**o + (0.0569067931483)*x_ref[0] + (0.964294372584)*x_ref[1]**o + (0.772434246308)*x_ref[1]
        arg[(0, 2, 2, 1)]=0.240636219698*x[0]**o + (0.873019760869)*x[0] + (-0.0464408573128)*x[1]**o + (0.414245132013)*x[1]
        ref[(0, 2, 2, 1)]=0.240636219698*x_ref[0]**o + (0.873019760869)*x_ref[0] + (-0.0464408573128)*x_ref[1]**o + (0.414245132013)*x_ref[1]
        arg[(0, 2, 2, 2)]=-0.0403237955486*x[0]**o + (0.698086334939)*x[0] + (0.100774964267)*x[1]**o + (0.116399352043)*x[1]
        ref[(0, 2, 2, 2)]=-0.0403237955486*x_ref[0]**o + (0.698086334939)*x_ref[0] + (0.100774964267)*x_ref[1]**o + (0.116399352043)*x_ref[1]
        arg[(0, 2, 3, 0)]=-0.317585653039*x[0]**o + (0.812074300632)*x[0] + (0.711581387477)*x[1]**o + (0.274784789515)*x[1]
        ref[(0, 2, 3, 0)]=-0.317585653039*x_ref[0]**o + (0.812074300632)*x_ref[0] + (0.711581387477)*x_ref[1]**o + (0.274784789515)*x_ref[1]
        arg[(0, 2, 3, 1)]=-0.392784010499*x[0]**o + (-0.14356851165)*x[0] + (-0.328179221308)*x[1]**o + (0.277779983673)*x[1]
        ref[(0, 2, 3, 1)]=-0.392784010499*x_ref[0]**o + (-0.14356851165)*x_ref[0] + (-0.328179221308)*x_ref[1]**o + (0.277779983673)*x_ref[1]
        arg[(0, 2, 3, 2)]=-0.123531329079*x[0]**o + (-0.388952961393)*x[0] + (0.548364729802)*x[1]**o + (-0.898047195812)*x[1]
        ref[(0, 2, 3, 2)]=-0.123531329079*x_ref[0]**o + (-0.388952961393)*x_ref[0] + (0.548364729802)*x_ref[1]**o + (-0.898047195812)*x_ref[1]
        arg[(0, 3, 0, 0)]=-0.216504500949*x[0]**o + (0.990151119385)*x[0] + (0.0959574605788)*x[1]**o + (-0.0857537561126)*x[1]
        ref[(0, 3, 0, 0)]=-0.216504500949*x_ref[0]**o + (0.990151119385)*x_ref[0] + (0.0959574605788)*x_ref[1]**o + (-0.0857537561126)*x_ref[1]
        arg[(0, 3, 0, 1)]=-0.998619952606*x[0]**o + (-0.134371971324)*x[0] + (-0.585677853612)*x[1]**o + (-0.642502571127)*x[1]
        ref[(0, 3, 0, 1)]=-0.998619952606*x_ref[0]**o + (-0.134371971324)*x_ref[0] + (-0.585677853612)*x_ref[1]**o + (-0.642502571127)*x_ref[1]
        arg[(0, 3, 0, 2)]=-0.617377240463*x[0]**o + (0.0924594609459)*x[0] + (-0.91379245913)*x[1]**o + (-0.596998061058)*x[1]
        ref[(0, 3, 0, 2)]=-0.617377240463*x_ref[0]**o + (0.0924594609459)*x_ref[0] + (-0.91379245913)*x_ref[1]**o + (-0.596998061058)*x_ref[1]
        arg[(0, 3, 1, 0)]=-0.983674767053*x[0]**o + (0.804304186859)*x[0] + (-0.706839800207)*x[1]**o + (-0.234110677085)*x[1]
        ref[(0, 3, 1, 0)]=-0.983674767053*x_ref[0]**o + (0.804304186859)*x_ref[0] + (-0.706839800207)*x_ref[1]**o + (-0.234110677085)*x_ref[1]
        arg[(0, 3, 1, 1)]=-0.946471077547*x[0]**o + (-0.245154745929)*x[0] + (-0.399223015333)*x[1]**o + (-0.409860667787)*x[1]
        ref[(0, 3, 1, 1)]=-0.946471077547*x_ref[0]**o + (-0.245154745929)*x_ref[0] + (-0.399223015333)*x_ref[1]**o + (-0.409860667787)*x_ref[1]
        arg[(0, 3, 1, 2)]=0.923636581602*x[0]**o + (0.903599378581)*x[0] + (0.0831756508919)*x[1]**o + (0.661984773186)*x[1]
        ref[(0, 3, 1, 2)]=0.923636581602*x_ref[0]**o + (0.903599378581)*x_ref[0] + (0.0831756508919)*x_ref[1]**o + (0.661984773186)*x_ref[1]
        arg[(0, 3, 2, 0)]=-0.761632364564*x[0]**o + (0.497335599304)*x[0] + (0.324956784826)*x[1]**o + (0.0330427487738)*x[1]
        ref[(0, 3, 2, 0)]=-0.761632364564*x_ref[0]**o + (0.497335599304)*x_ref[0] + (0.324956784826)*x_ref[1]**o + (0.0330427487738)*x_ref[1]
        arg[(0, 3, 2, 1)]=-0.457089081017*x[0]**o + (-0.593164584503)*x[0] + (-0.150700183157)*x[1]**o + (-0.576870419691)*x[1]
        ref[(0, 3, 2, 1)]=-0.457089081017*x_ref[0]**o + (-0.593164584503)*x_ref[0] + (-0.150700183157)*x_ref[1]**o + (-0.576870419691)*x_ref[1]
        arg[(0, 3, 2, 2)]=-0.846035931963*x[0]**o + (0.257313101465)*x[0] + (0.360260100879)*x[1]**o + (-0.41873715343)*x[1]
        ref[(0, 3, 2, 2)]=-0.846035931963*x_ref[0]**o + (0.257313101465)*x_ref[0] + (0.360260100879)*x_ref[1]**o + (-0.41873715343)*x_ref[1]
        arg[(0, 3, 3, 0)]=-0.0374992813324*x[0]**o + (-0.829985657082)*x[0] + (0.341510712757)*x[1]**o + (0.311082735856)*x[1]
        ref[(0, 3, 3, 0)]=-0.0374992813324*x_ref[0]**o + (-0.829985657082)*x_ref[0] + (0.341510712757)*x_ref[1]**o + (0.311082735856)*x_ref[1]
        arg[(0, 3, 3, 1)]=-0.606903554515*x[0]**o + (-0.0719974201897)*x[0] + (0.408111017904)*x[1]**o + (-0.467773676878)*x[1]
        ref[(0, 3, 3, 1)]=-0.606903554515*x_ref[0]**o + (-0.0719974201897)*x_ref[0] + (0.408111017904)*x_ref[1]**o + (-0.467773676878)*x_ref[1]
        arg[(0, 3, 3, 2)]=0.391509989602*x[0]**o + (0.283195300353)*x[0] + (0.408247171451)*x[1]**o + (0.686754251682)*x[1]
        ref[(0, 3, 3, 2)]=0.391509989602*x_ref[0]**o + (0.283195300353)*x_ref[0] + (0.408247171451)*x_ref[1]**o + (0.686754251682)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.429661026286*x[0]**o + (0.854660902122)*x[0] + (-0.154983787293)*x[1]**o + (-0.892680568434)*x[1]
        ref[(1, 0, 0, 0)]=0.429661026286*x_ref[0]**o + (0.854660902122)*x_ref[0] + (-0.154983787293)*x_ref[1]**o + (-0.892680568434)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.154795626823*x[0]**o + (0.562614603124)*x[0] + (-0.523812199883)*x[1]**o + (-0.988259820937)*x[1]
        ref[(1, 0, 0, 1)]=0.154795626823*x_ref[0]**o + (0.562614603124)*x_ref[0] + (-0.523812199883)*x_ref[1]**o + (-0.988259820937)*x_ref[1]
        arg[(1, 0, 0, 2)]=-0.44777397248*x[0]**o + (0.507715445355)*x[0] + (-0.891548286883)*x[1]**o + (0.33909109116)*x[1]
        ref[(1, 0, 0, 2)]=-0.44777397248*x_ref[0]**o + (0.507715445355)*x_ref[0] + (-0.891548286883)*x_ref[1]**o + (0.33909109116)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.494159913491*x[0]**o + (0.330401598403)*x[0] + (0.655082373257)*x[1]**o + (0.940967116491)*x[1]
        ref[(1, 0, 1, 0)]=-0.494159913491*x_ref[0]**o + (0.330401598403)*x_ref[0] + (0.655082373257)*x_ref[1]**o + (0.940967116491)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.164694543028*x[0]**o + (0.163792087968)*x[0] + (0.68666456545)*x[1]**o + (0.932139932794)*x[1]
        ref[(1, 0, 1, 1)]=0.164694543028*x_ref[0]**o + (0.163792087968)*x_ref[0] + (0.68666456545)*x_ref[1]**o + (0.932139932794)*x_ref[1]
        arg[(1, 0, 1, 2)]=-0.340705541746*x[0]**o + (0.54318184949)*x[0] + (-0.939988557164)*x[1]**o + (-0.80738842761)*x[1]
        ref[(1, 0, 1, 2)]=-0.340705541746*x_ref[0]**o + (0.54318184949)*x_ref[0] + (-0.939988557164)*x_ref[1]**o + (-0.80738842761)*x_ref[1]
        arg[(1, 0, 2, 0)]=0.719790436572*x[0]**o + (-0.666498686922)*x[0] + (-0.0205860381721)*x[1]**o + (0.780398609648)*x[1]
        ref[(1, 0, 2, 0)]=0.719790436572*x_ref[0]**o + (-0.666498686922)*x_ref[0] + (-0.0205860381721)*x_ref[1]**o + (0.780398609648)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.555912828288*x[0]**o + (0.989385072853)*x[0] + (0.135101688799)*x[1]**o + (-0.36542507542)*x[1]
        ref[(1, 0, 2, 1)]=0.555912828288*x_ref[0]**o + (0.989385072853)*x_ref[0] + (0.135101688799)*x_ref[1]**o + (-0.36542507542)*x_ref[1]
        arg[(1, 0, 2, 2)]=0.00659631813271*x[0]**o + (0.999517372847)*x[0] + (0.232272326171)*x[1]**o + (-0.85743849507)*x[1]
        ref[(1, 0, 2, 2)]=0.00659631813271*x_ref[0]**o + (0.999517372847)*x_ref[0] + (0.232272326171)*x_ref[1]**o + (-0.85743849507)*x_ref[1]
        arg[(1, 0, 3, 0)]=0.551057977963*x[0]**o + (0.323098554471)*x[0] + (0.567795435097)*x[1]**o + (0.374973623258)*x[1]
        ref[(1, 0, 3, 0)]=0.551057977963*x_ref[0]**o + (0.323098554471)*x_ref[0] + (0.567795435097)*x_ref[1]**o + (0.374973623258)*x_ref[1]
        arg[(1, 0, 3, 1)]=0.964235913992*x[0]**o + (-0.0995503514781)*x[0] + (0.324806963612)*x[1]**o + (-0.0825208021896)*x[1]
        ref[(1, 0, 3, 1)]=0.964235913992*x_ref[0]**o + (-0.0995503514781)*x_ref[0] + (0.324806963612)*x_ref[1]**o + (-0.0825208021896)*x_ref[1]
        arg[(1, 0, 3, 2)]=-0.204637489992*x[0]**o + (-0.0105922733831)*x[0] + (0.474620097728)*x[1]**o + (-0.143836660909)*x[1]
        ref[(1, 0, 3, 2)]=-0.204637489992*x_ref[0]**o + (-0.0105922733831)*x_ref[0] + (0.474620097728)*x_ref[1]**o + (-0.143836660909)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.991684602618*x[0]**o + (0.786524554349)*x[0] + (0.772748888689)*x[1]**o + (-0.936514626078)*x[1]
        ref[(1, 1, 0, 0)]=-0.991684602618*x_ref[0]**o + (0.786524554349)*x_ref[0] + (0.772748888689)*x_ref[1]**o + (-0.936514626078)*x_ref[1]
        arg[(1, 1, 0, 1)]=-0.167362218457*x[0]**o + (-0.458653919295)*x[0] + (-0.374691077235)*x[1]**o + (-0.365562342267)*x[1]
        ref[(1, 1, 0, 1)]=-0.167362218457*x_ref[0]**o + (-0.458653919295)*x_ref[0] + (-0.374691077235)*x_ref[1]**o + (-0.365562342267)*x_ref[1]
        arg[(1, 1, 0, 2)]=0.172678385071*x[0]**o + (0.713350579976)*x[0] + (-0.597320891228)*x[1]**o + (-0.833927251096)*x[1]
        ref[(1, 1, 0, 2)]=0.172678385071*x_ref[0]**o + (0.713350579976)*x_ref[0] + (-0.597320891228)*x_ref[1]**o + (-0.833927251096)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.491557397139*x[0]**o + (-0.0565606994903)*x[0] + (0.371087646127)*x[1]**o + (0.890328437273)*x[1]
        ref[(1, 1, 1, 0)]=-0.491557397139*x_ref[0]**o + (-0.0565606994903)*x_ref[0] + (0.371087646127)*x_ref[1]**o + (0.890328437273)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.932220285322*x[0]**o + (0.860499428304)*x[0] + (0.202393791843)*x[1]**o + (-0.552200278956)*x[1]
        ref[(1, 1, 1, 1)]=-0.932220285322*x_ref[0]**o + (0.860499428304)*x_ref[0] + (0.202393791843)*x_ref[1]**o + (-0.552200278956)*x_ref[1]
        arg[(1, 1, 1, 2)]=0.742429657478*x[0]**o + (-0.98789153741)*x[0] + (-0.233671059077)*x[1]**o + (-0.71035026172)*x[1]
        ref[(1, 1, 1, 2)]=0.742429657478*x_ref[0]**o + (-0.98789153741)*x_ref[0] + (-0.233671059077)*x_ref[1]**o + (-0.71035026172)*x_ref[1]
        arg[(1, 1, 2, 0)]=0.475332150789*x[0]**o + (-0.965261230384)*x[0] + (0.697903743047)*x[1]**o + (0.540020478303)*x[1]
        ref[(1, 1, 2, 0)]=0.475332150789*x_ref[0]**o + (-0.965261230384)*x_ref[0] + (0.697903743047)*x_ref[1]**o + (0.540020478303)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.820775341215*x[0]**o + (0.782615968996)*x[0] + (0.467595073106)*x[1]**o + (0.632091941623)*x[1]
        ref[(1, 1, 2, 1)]=-0.820775341215*x_ref[0]**o + (0.782615968996)*x_ref[0] + (0.467595073106)*x_ref[1]**o + (0.632091941623)*x_ref[1]
        arg[(1, 1, 2, 2)]=0.690088590542*x[0]**o + (0.749874160036)*x[0] + (-0.751345275145)*x[1]**o + (0.663115652138)*x[1]
        ref[(1, 1, 2, 2)]=0.690088590542*x_ref[0]**o + (0.749874160036)*x_ref[0] + (-0.751345275145)*x_ref[1]**o + (0.663115652138)*x_ref[1]
        arg[(1, 1, 3, 0)]=0.527541202635*x[0]**o + (-0.0253793231699)*x[0] + (0.971870916959)*x[1]**o + (0.619535575209)*x[1]
        ref[(1, 1, 3, 0)]=0.527541202635*x_ref[0]**o + (-0.0253793231699)*x_ref[0] + (0.971870916959)*x_ref[1]**o + (0.619535575209)*x_ref[1]
        arg[(1, 1, 3, 1)]=-0.660737980535*x[0]**o + (0.120046570747)*x[0] + (-0.708116080321)*x[1]**o + (-0.237423283653)*x[1]
        ref[(1, 1, 3, 1)]=-0.660737980535*x_ref[0]**o + (0.120046570747)*x_ref[0] + (-0.708116080321)*x_ref[1]**o + (-0.237423283653)*x_ref[1]
        arg[(1, 1, 3, 2)]=0.0133879265733*x[0]**o + (0.291066368888)*x[0] + (0.0869922606816)*x[1]**o + (0.328914029297)*x[1]
        ref[(1, 1, 3, 2)]=0.0133879265733*x_ref[0]**o + (0.291066368888)*x_ref[0] + (0.0869922606816)*x_ref[1]**o + (0.328914029297)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.0780555275597*x[0]**o + (0.0194239237525)*x[0] + (-0.511213493472)*x[1]**o + (0.829662298698)*x[1]
        ref[(1, 2, 0, 0)]=-0.0780555275597*x_ref[0]**o + (0.0194239237525)*x_ref[0] + (-0.511213493472)*x_ref[1]**o + (0.829662298698)*x_ref[1]
        arg[(1, 2, 0, 1)]=-0.93193707322*x[0]**o + (0.726428305325)*x[0] + (0.843933822042)*x[1]**o + (-0.701760209399)*x[1]
        ref[(1, 2, 0, 1)]=-0.93193707322*x_ref[0]**o + (0.726428305325)*x_ref[0] + (0.843933822042)*x_ref[1]**o + (-0.701760209399)*x_ref[1]
        arg[(1, 2, 0, 2)]=-0.774099778779*x[0]**o + (0.885003779192)*x[0] + (-0.966187244285)*x[1]**o + (-0.235275615866)*x[1]
        ref[(1, 2, 0, 2)]=-0.774099778779*x_ref[0]**o + (0.885003779192)*x_ref[0] + (-0.966187244285)*x_ref[1]**o + (-0.235275615866)*x_ref[1]
        arg[(1, 2, 1, 0)]=0.194698974221*x[0]**o + (0.763348127148)*x[0] + (0.929738604884)*x[1]**o + (0.446384406368)*x[1]
        ref[(1, 2, 1, 0)]=0.194698974221*x_ref[0]**o + (0.763348127148)*x_ref[0] + (0.929738604884)*x_ref[1]**o + (0.446384406368)*x_ref[1]
        arg[(1, 2, 1, 1)]=-0.0856466593361*x[0]**o + (0.436771462941)*x[0] + (0.548942387023)*x[1]**o + (-0.545563506174)*x[1]
        ref[(1, 2, 1, 1)]=-0.0856466593361*x_ref[0]**o + (0.436771462941)*x_ref[0] + (0.548942387023)*x_ref[1]**o + (-0.545563506174)*x_ref[1]
        arg[(1, 2, 1, 2)]=0.283212940671*x[0]**o + (-0.0946050727881)*x[0] + (0.0651372779214)*x[1]**o + (0.449584091566)*x[1]
        ref[(1, 2, 1, 2)]=0.283212940671*x_ref[0]**o + (-0.0946050727881)*x_ref[0] + (0.0651372779214)*x_ref[1]**o + (0.449584091566)*x_ref[1]
        arg[(1, 2, 2, 0)]=0.945911514609*x[0]**o + (-0.20191238905)*x[0] + (-0.111214216439)*x[1]**o + (-0.0586414243638)*x[1]
        ref[(1, 2, 2, 0)]=0.945911514609*x_ref[0]**o + (-0.20191238905)*x_ref[0] + (-0.111214216439)*x_ref[1]**o + (-0.0586414243638)*x_ref[1]
        arg[(1, 2, 2, 1)]=0.468446667566*x[0]**o + (-0.316283715683)*x[0] + (0.986741723571)*x[1]**o + (-0.683545244481)*x[1]
        ref[(1, 2, 2, 1)]=0.468446667566*x_ref[0]**o + (-0.316283715683)*x_ref[0] + (0.986741723571)*x_ref[1]**o + (-0.683545244481)*x_ref[1]
        arg[(1, 2, 2, 2)]=0.59642881577*x[0]**o + (-0.747393453431)*x[0] + (0.531731803038)*x[1]**o + (-0.514742203696)*x[1]
        ref[(1, 2, 2, 2)]=0.59642881577*x_ref[0]**o + (-0.747393453431)*x_ref[0] + (0.531731803038)*x_ref[1]**o + (-0.514742203696)*x_ref[1]
        arg[(1, 2, 3, 0)]=-0.939574842507*x[0]**o + (-0.623619491216)*x[0] + (0.610574013505)*x[1]**o + (-0.9747140398)*x[1]
        ref[(1, 2, 3, 0)]=-0.939574842507*x_ref[0]**o + (-0.623619491216)*x_ref[0] + (0.610574013505)*x_ref[1]**o + (-0.9747140398)*x_ref[1]
        arg[(1, 2, 3, 1)]=0.426789083677*x[0]**o + (-0.399488980118)*x[0] + (-0.0882342771939)*x[1]**o + (0.700917050006)*x[1]
        ref[(1, 2, 3, 1)]=0.426789083677*x_ref[0]**o + (-0.399488980118)*x_ref[0] + (-0.0882342771939)*x_ref[1]**o + (0.700917050006)*x_ref[1]
        arg[(1, 2, 3, 2)]=-0.197109345215*x[0]**o + (-0.124561131837)*x[0] + (-0.311481264349)*x[1]**o + (0.556023164589)*x[1]
        ref[(1, 2, 3, 2)]=-0.197109345215*x_ref[0]**o + (-0.124561131837)*x_ref[0] + (-0.311481264349)*x_ref[1]**o + (0.556023164589)*x_ref[1]
        arg[(1, 3, 0, 0)]=-0.975827694763*x[0]**o + (-0.46811993616)*x[0] + (-0.00590368466763)*x[1]**o + (-0.527836179111)*x[1]
        ref[(1, 3, 0, 0)]=-0.975827694763*x_ref[0]**o + (-0.46811993616)*x_ref[0] + (-0.00590368466763)*x_ref[1]**o + (-0.527836179111)*x_ref[1]
        arg[(1, 3, 0, 1)]=0.747030486812*x[0]**o + (-0.016326709255)*x[0] + (-0.0212030735752)*x[1]**o + (0.231326923653)*x[1]
        ref[(1, 3, 0, 1)]=0.747030486812*x_ref[0]**o + (-0.016326709255)*x_ref[0] + (-0.0212030735752)*x_ref[1]**o + (0.231326923653)*x_ref[1]
        arg[(1, 3, 0, 2)]=-0.183460143756*x[0]**o + (-0.453425342917)*x[0] + (0.0911161461423)*x[1]**o + (-0.187901543336)*x[1]
        ref[(1, 3, 0, 2)]=-0.183460143756*x_ref[0]**o + (-0.453425342917)*x_ref[0] + (0.0911161461423)*x_ref[1]**o + (-0.187901543336)*x_ref[1]
        arg[(1, 3, 1, 0)]=-0.625976069238*x[0]**o + (0.40103968089)*x[0] + (0.519505632781)*x[1]**o + (0.0831742668175)*x[1]
        ref[(1, 3, 1, 0)]=-0.625976069238*x_ref[0]**o + (0.40103968089)*x_ref[0] + (0.519505632781)*x_ref[1]**o + (0.0831742668175)*x_ref[1]
        arg[(1, 3, 1, 1)]=0.0185919581885*x[0]**o + (0.177810714075)*x[0] + (0.898880683508)*x[1]**o + (0.181201569597)*x[1]
        ref[(1, 3, 1, 1)]=0.0185919581885*x_ref[0]**o + (0.177810714075)*x_ref[0] + (0.898880683508)*x_ref[1]**o + (0.181201569597)*x_ref[1]
        arg[(1, 3, 1, 2)]=-0.881200621574*x[0]**o + (0.440696639121)*x[0] + (0.713169149475)*x[1]**o + (0.099936953498)*x[1]
        ref[(1, 3, 1, 2)]=-0.881200621574*x_ref[0]**o + (0.440696639121)*x_ref[0] + (0.713169149475)*x_ref[1]**o + (0.099936953498)*x_ref[1]
        arg[(1, 3, 2, 0)]=0.569681736096*x[0]**o + (-0.423915555315)*x[0] + (0.215661393289)*x[1]**o + (0.894700068448)*x[1]
        ref[(1, 3, 2, 0)]=0.569681736096*x_ref[0]**o + (-0.423915555315)*x_ref[0] + (0.215661393289)*x_ref[1]**o + (0.894700068448)*x_ref[1]
        arg[(1, 3, 2, 1)]=0.0996510445825*x[0]**o + (0.572043119293)*x[0] + (-0.691704127713)*x[1]**o + (-0.622081919569)*x[1]
        ref[(1, 3, 2, 1)]=0.0996510445825*x_ref[0]**o + (0.572043119293)*x_ref[0] + (-0.691704127713)*x_ref[1]**o + (-0.622081919569)*x_ref[1]
        arg[(1, 3, 2, 2)]=-0.59409346709*x[0]**o + (0.409002748222)*x[0] + (-0.336758575702)*x[1]**o + (0.108070819568)*x[1]
        ref[(1, 3, 2, 2)]=-0.59409346709*x_ref[0]**o + (0.409002748222)*x_ref[0] + (-0.336758575702)*x_ref[1]**o + (0.108070819568)*x_ref[1]
        arg[(1, 3, 3, 0)]=-0.0258147827363*x[0]**o + (-0.965970206424)*x[0] + (-0.230820403227)*x[1]**o + (0.267349247932)*x[1]
        ref[(1, 3, 3, 0)]=-0.0258147827363*x_ref[0]**o + (-0.965970206424)*x_ref[0] + (-0.230820403227)*x_ref[1]**o + (0.267349247932)*x_ref[1]
        arg[(1, 3, 3, 1)]=-0.276487419361*x[0]**o + (0.515765915774)*x[0] + (-0.781761725167)*x[1]**o + (-0.400773751208)*x[1]
        ref[(1, 3, 3, 1)]=-0.276487419361*x_ref[0]**o + (0.515765915774)*x_ref[0] + (-0.781761725167)*x_ref[1]**o + (-0.400773751208)*x_ref[1]
        arg[(1, 3, 3, 2)]=-0.647508918673*x[0]**o + (-0.0603463911434)*x[0] + (0.813178515675)*x[1]**o + (0.941779585674)*x[1]
        ref[(1, 3, 3, 2)]=-0.647508918673*x_ref[0]**o + (-0.0603463911434)*x_ref[0] + (0.813178515675)*x_ref[1]**o + (0.941779585674)*x_ref[1]
        arg[(2, 0, 0, 0)]=-0.270368953493*x[0]**o + (-0.757387913498)*x[0] + (0.35360048127)*x[1]**o + (0.28389895418)*x[1]
        ref[(2, 0, 0, 0)]=-0.270368953493*x_ref[0]**o + (-0.757387913498)*x_ref[0] + (0.35360048127)*x_ref[1]**o + (0.28389895418)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.186384821061*x[0]**o + (0.668516533598)*x[0] + (0.0560544453099)*x[1]**o + (-0.820898412582)*x[1]
        ref[(2, 0, 0, 1)]=0.186384821061*x_ref[0]**o + (0.668516533598)*x_ref[0] + (0.0560544453099)*x_ref[1]**o + (-0.820898412582)*x_ref[1]
        arg[(2, 0, 0, 2)]=-0.54100920355*x[0]**o + (0.656679857028)*x[0] + (-0.0488459549067)*x[1]**o + (-0.64499127413)*x[1]
        ref[(2, 0, 0, 2)]=-0.54100920355*x_ref[0]**o + (0.656679857028)*x_ref[0] + (-0.0488459549067)*x_ref[1]**o + (-0.64499127413)*x_ref[1]
        arg[(2, 0, 1, 0)]=-0.618137852408*x[0]**o + (-0.70573293311)*x[0] + (-0.682140065394)*x[1]**o + (-0.882425461912)*x[1]
        ref[(2, 0, 1, 0)]=-0.618137852408*x_ref[0]**o + (-0.70573293311)*x_ref[0] + (-0.682140065394)*x_ref[1]**o + (-0.882425461912)*x_ref[1]
        arg[(2, 0, 1, 1)]=-0.667574902407*x[0]**o + (0.205303916988)*x[0] + (-0.036453015286)*x[1]**o + (0.323145350415)*x[1]
        ref[(2, 0, 1, 1)]=-0.667574902407*x_ref[0]**o + (0.205303916988)*x_ref[0] + (-0.036453015286)*x_ref[1]**o + (0.323145350415)*x_ref[1]
        arg[(2, 0, 1, 2)]=0.814571840779*x[0]**o + (-0.362179157711)*x[0] + (0.567584397656)*x[1]**o + (-0.814840602003)*x[1]
        ref[(2, 0, 1, 2)]=0.814571840779*x_ref[0]**o + (-0.362179157711)*x_ref[0] + (0.567584397656)*x_ref[1]**o + (-0.814840602003)*x_ref[1]
        arg[(2, 0, 2, 0)]=0.124885111222*x[0]**o + (-0.232273673189)*x[0] + (-0.378226728036)*x[1]**o + (-0.530097701087)*x[1]
        ref[(2, 0, 2, 0)]=0.124885111222*x_ref[0]**o + (-0.232273673189)*x_ref[0] + (-0.378226728036)*x_ref[1]**o + (-0.530097701087)*x_ref[1]
        arg[(2, 0, 2, 1)]=-0.220803162737*x[0]**o + (0.163319254578)*x[0] + (0.542312284072)*x[1]**o + (0.304242140372)*x[1]
        ref[(2, 0, 2, 1)]=-0.220803162737*x_ref[0]**o + (0.163319254578)*x_ref[0] + (0.542312284072)*x_ref[1]**o + (0.304242140372)*x_ref[1]
        arg[(2, 0, 2, 2)]=0.979386663246*x[0]**o + (0.315605548362)*x[0] + (-0.92638269137)*x[1]**o + (-0.254159102419)*x[1]
        ref[(2, 0, 2, 2)]=0.979386663246*x_ref[0]**o + (0.315605548362)*x_ref[0] + (-0.92638269137)*x_ref[1]**o + (-0.254159102419)*x_ref[1]
        arg[(2, 0, 3, 0)]=0.0383279847839*x[0]**o + (-0.433944586226)*x[0] + (-0.988494936586)*x[1]**o + (-0.938484627993)*x[1]
        ref[(2, 0, 3, 0)]=0.0383279847839*x_ref[0]**o + (-0.433944586226)*x_ref[0] + (-0.988494936586)*x_ref[1]**o + (-0.938484627993)*x_ref[1]
        arg[(2, 0, 3, 1)]=0.737590936326*x[0]**o + (-0.80657918378)*x[0] + (0.817453841755)*x[1]**o + (-0.476239586406)*x[1]
        ref[(2, 0, 3, 1)]=0.737590936326*x_ref[0]**o + (-0.80657918378)*x_ref[0] + (0.817453841755)*x_ref[1]**o + (-0.476239586406)*x_ref[1]
        arg[(2, 0, 3, 2)]=-0.694558342041*x[0]**o + (0.782959201293)*x[0] + (-0.150278691622)*x[1]**o + (-0.610727983388)*x[1]
        ref[(2, 0, 3, 2)]=-0.694558342041*x_ref[0]**o + (0.782959201293)*x_ref[0] + (-0.150278691622)*x_ref[1]**o + (-0.610727983388)*x_ref[1]
        arg[(2, 1, 0, 0)]=0.419422881579*x[0]**o + (-0.393154467986)*x[0] + (0.295432710123)*x[1]**o + (-0.684149005309)*x[1]
        ref[(2, 1, 0, 0)]=0.419422881579*x_ref[0]**o + (-0.393154467986)*x_ref[0] + (0.295432710123)*x_ref[1]**o + (-0.684149005309)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.524533869044*x[0]**o + (0.427418442341)*x[0] + (-0.733566404431)*x[1]**o + (0.170370743774)*x[1]
        ref[(2, 1, 0, 1)]=0.524533869044*x_ref[0]**o + (0.427418442341)*x_ref[0] + (-0.733566404431)*x_ref[1]**o + (0.170370743774)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.853899724209*x[0]**o + (-0.466925327599)*x[0] + (0.244368136258)*x[1]**o + (0.471821254726)*x[1]
        ref[(2, 1, 0, 2)]=-0.853899724209*x_ref[0]**o + (-0.466925327599)*x_ref[0] + (0.244368136258)*x_ref[1]**o + (0.471821254726)*x_ref[1]
        arg[(2, 1, 1, 0)]=0.813826554797*x[0]**o + (-0.664778214853)*x[0] + (0.0663679432942)*x[1]**o + (0.154936189024)*x[1]
        ref[(2, 1, 1, 0)]=0.813826554797*x_ref[0]**o + (-0.664778214853)*x_ref[0] + (0.0663679432942)*x_ref[1]**o + (0.154936189024)*x_ref[1]
        arg[(2, 1, 1, 1)]=-0.457115540513*x[0]**o + (0.704208325545)*x[0] + (0.899760011753)*x[1]**o + (-0.781560119999)*x[1]
        ref[(2, 1, 1, 1)]=-0.457115540513*x_ref[0]**o + (0.704208325545)*x_ref[0] + (0.899760011753)*x_ref[1]**o + (-0.781560119999)*x_ref[1]
        arg[(2, 1, 1, 2)]=0.169600158929*x[0]**o + (0.159052572458)*x[0] + (0.367527689846)*x[1]**o + (-0.150921226701)*x[1]
        ref[(2, 1, 1, 2)]=0.169600158929*x_ref[0]**o + (0.159052572458)*x_ref[0] + (0.367527689846)*x_ref[1]**o + (-0.150921226701)*x_ref[1]
        arg[(2, 1, 2, 0)]=0.142752185539*x[0]**o + (0.250500213954)*x[0] + (-0.17296098153)*x[1]**o + (0.821508006283)*x[1]
        ref[(2, 1, 2, 0)]=0.142752185539*x_ref[0]**o + (0.250500213954)*x_ref[0] + (-0.17296098153)*x_ref[1]**o + (0.821508006283)*x_ref[1]
        arg[(2, 1, 2, 1)]=-0.61223097406*x[0]**o + (-0.777632882872)*x[0] + (0.0176404338618)*x[1]**o + (0.893898573773)*x[1]
        ref[(2, 1, 2, 1)]=-0.61223097406*x_ref[0]**o + (-0.777632882872)*x_ref[0] + (0.0176404338618)*x_ref[1]**o + (0.893898573773)*x_ref[1]
        arg[(2, 1, 2, 2)]=-0.0376833641448*x[0]**o + (-0.632634649218)*x[0] + (0.077336031485)*x[1]**o + (-0.687119376063)*x[1]
        ref[(2, 1, 2, 2)]=-0.0376833641448*x_ref[0]**o + (-0.632634649218)*x_ref[0] + (0.077336031485)*x_ref[1]**o + (-0.687119376063)*x_ref[1]
        arg[(2, 1, 3, 0)]=0.592118956243*x[0]**o + (-0.836540246711)*x[0] + (-0.0681651273959)*x[1]**o + (-0.702284293057)*x[1]
        ref[(2, 1, 3, 0)]=0.592118956243*x_ref[0]**o + (-0.836540246711)*x_ref[0] + (-0.0681651273959)*x_ref[1]**o + (-0.702284293057)*x_ref[1]
        arg[(2, 1, 3, 1)]=0.195387360335*x[0]**o + (-0.853367714533)*x[0] + (0.143426469632)*x[1]**o + (-0.411262746184)*x[1]
        ref[(2, 1, 3, 1)]=0.195387360335*x_ref[0]**o + (-0.853367714533)*x_ref[0] + (0.143426469632)*x_ref[1]**o + (-0.411262746184)*x_ref[1]
        arg[(2, 1, 3, 2)]=-0.550529978587*x[0]**o + (0.582384471511)*x[0] + (0.527493447629)*x[1]**o + (-0.141465926482)*x[1]
        ref[(2, 1, 3, 2)]=-0.550529978587*x_ref[0]**o + (0.582384471511)*x_ref[0] + (0.527493447629)*x_ref[1]**o + (-0.141465926482)*x_ref[1]
        arg[(2, 2, 0, 0)]=-0.663891923041*x[0]**o + (0.913430345024)*x[0] + (-0.781464334193)*x[1]**o + (-0.389814083509)*x[1]
        ref[(2, 2, 0, 0)]=-0.663891923041*x_ref[0]**o + (0.913430345024)*x_ref[0] + (-0.781464334193)*x_ref[1]**o + (-0.389814083509)*x_ref[1]
        arg[(2, 2, 0, 1)]=0.0284772052077*x[0]**o + (-0.199846288619)*x[0] + (0.385998377106)*x[1]**o + (0.398443185322)*x[1]
        ref[(2, 2, 0, 1)]=0.0284772052077*x_ref[0]**o + (-0.199846288619)*x_ref[0] + (0.385998377106)*x_ref[1]**o + (0.398443185322)*x_ref[1]
        arg[(2, 2, 0, 2)]=-0.559125579177*x[0]**o + (-0.697489899886)*x[0] + (-0.981507983714)*x[1]**o + (0.140875364381)*x[1]
        ref[(2, 2, 0, 2)]=-0.559125579177*x_ref[0]**o + (-0.697489899886)*x_ref[0] + (-0.981507983714)*x_ref[1]**o + (0.140875364381)*x_ref[1]
        arg[(2, 2, 1, 0)]=-0.00510899401498*x[0]**o + (0.5965137185)*x[0] + (-0.582985079761)*x[1]**o + (0.862138272458)*x[1]
        ref[(2, 2, 1, 0)]=-0.00510899401498*x_ref[0]**o + (0.5965137185)*x_ref[0] + (-0.582985079761)*x_ref[1]**o + (0.862138272458)*x_ref[1]
        arg[(2, 2, 1, 1)]=0.465714637685*x[0]**o + (-0.626930645185)*x[0] + (-0.794055148827)*x[1]**o + (0.590439575941)*x[1]
        ref[(2, 2, 1, 1)]=0.465714637685*x_ref[0]**o + (-0.626930645185)*x_ref[0] + (-0.794055148827)*x_ref[1]**o + (0.590439575941)*x_ref[1]
        arg[(2, 2, 1, 2)]=-0.684097914089*x[0]**o + (-0.00718417429673)*x[0] + (0.132085262069)*x[1]**o + (0.712234627722)*x[1]
        ref[(2, 2, 1, 2)]=-0.684097914089*x_ref[0]**o + (-0.00718417429673)*x_ref[0] + (0.132085262069)*x_ref[1]**o + (0.712234627722)*x_ref[1]
        arg[(2, 2, 2, 0)]=0.362868416907*x[0]**o + (0.418124471552)*x[0] + (-0.0552209339749)*x[1]**o + (0.983178941246)*x[1]
        ref[(2, 2, 2, 0)]=0.362868416907*x_ref[0]**o + (0.418124471552)*x_ref[0] + (-0.0552209339749)*x_ref[1]**o + (0.983178941246)*x_ref[1]
        arg[(2, 2, 2, 1)]=0.606284715237*x[0]**o + (-0.0337127230715)*x[0] + (0.542582547259)*x[1]**o + (0.327755062078)*x[1]
        ref[(2, 2, 2, 1)]=0.606284715237*x_ref[0]**o + (-0.0337127230715)*x_ref[0] + (0.542582547259)*x_ref[1]**o + (0.327755062078)*x_ref[1]
        arg[(2, 2, 2, 2)]=-0.706693304473*x[0]**o + (0.159517567472)*x[0] + (0.122814101925)*x[1]**o + (0.863204769167)*x[1]
        ref[(2, 2, 2, 2)]=-0.706693304473*x_ref[0]**o + (0.159517567472)*x_ref[0] + (0.122814101925)*x_ref[1]**o + (0.863204769167)*x_ref[1]
        arg[(2, 2, 3, 0)]=0.589231690402*x[0]**o + (0.198366514053)*x[0] + (0.878637451426)*x[1]**o + (-0.924149064978)*x[1]
        ref[(2, 2, 3, 0)]=0.589231690402*x_ref[0]**o + (0.198366514053)*x_ref[0] + (0.878637451426)*x_ref[1]**o + (-0.924149064978)*x_ref[1]
        arg[(2, 2, 3, 1)]=-0.336504800074*x[0]**o + (0.904880229277)*x[0] + (-0.778062036477)*x[1]**o + (-0.20450194722)*x[1]
        ref[(2, 2, 3, 1)]=-0.336504800074*x_ref[0]**o + (0.904880229277)*x_ref[0] + (-0.778062036477)*x_ref[1]**o + (-0.20450194722)*x_ref[1]
        arg[(2, 2, 3, 2)]=-0.327199080222*x[0]**o + (0.738748229187)*x[0] + (0.775179876223)*x[1]**o + (0.633198198126)*x[1]
        ref[(2, 2, 3, 2)]=-0.327199080222*x_ref[0]**o + (0.738748229187)*x_ref[0] + (0.775179876223)*x_ref[1]**o + (0.633198198126)*x_ref[1]
        arg[(2, 3, 0, 0)]=0.814411559239*x[0]**o + (0.406519794522)*x[0] + (0.180150745081)*x[1]**o + (0.394440732212)*x[1]
        ref[(2, 3, 0, 0)]=0.814411559239*x_ref[0]**o + (0.406519794522)*x_ref[0] + (0.180150745081)*x_ref[1]**o + (0.394440732212)*x_ref[1]
        arg[(2, 3, 0, 1)]=0.00550704643968*x[0]**o + (-0.502368625174)*x[0] + (-0.12379909999)*x[1]**o + (0.975720466575)*x[1]
        ref[(2, 3, 0, 1)]=0.00550704643968*x_ref[0]**o + (-0.502368625174)*x_ref[0] + (-0.12379909999)*x_ref[1]**o + (0.975720466575)*x_ref[1]
        arg[(2, 3, 0, 2)]=0.975278533666*x[0]**o + (-0.271932745315)*x[0] + (-0.277675251825)*x[1]**o + (0.583300688917)*x[1]
        ref[(2, 3, 0, 2)]=0.975278533666*x_ref[0]**o + (-0.271932745315)*x_ref[0] + (-0.277675251825)*x_ref[1]**o + (0.583300688917)*x_ref[1]
        arg[(2, 3, 1, 0)]=0.54437998379*x[0]**o + (0.699602844174)*x[0] + (0.612505004526)*x[1]**o + (-0.78144164073)*x[1]
        ref[(2, 3, 1, 0)]=0.54437998379*x_ref[0]**o + (0.699602844174)*x_ref[0] + (0.612505004526)*x_ref[1]**o + (-0.78144164073)*x_ref[1]
        arg[(2, 3, 1, 1)]=0.0285844133455*x[0]**o + (0.250156134567)*x[0] + (-0.660384349151)*x[1]**o + (0.837384816516)*x[1]
        ref[(2, 3, 1, 1)]=0.0285844133455*x_ref[0]**o + (0.250156134567)*x_ref[0] + (-0.660384349151)*x_ref[1]**o + (0.837384816516)*x_ref[1]
        arg[(2, 3, 1, 2)]=-0.288107515106*x[0]**o + (0.503995173389)*x[0] + (-0.737575505935)*x[1]**o + (0.0899917019845)*x[1]
        ref[(2, 3, 1, 2)]=-0.288107515106*x_ref[0]**o + (0.503995173389)*x_ref[0] + (-0.737575505935)*x_ref[1]**o + (0.0899917019845)*x_ref[1]
        arg[(2, 3, 2, 0)]=-0.301854634295*x[0]**o + (-0.443284701832)*x[0] + (0.532609925768)*x[1]**o + (0.622211130827)*x[1]
        ref[(2, 3, 2, 0)]=-0.301854634295*x_ref[0]**o + (-0.443284701832)*x_ref[0] + (0.532609925768)*x_ref[1]**o + (0.622211130827)*x_ref[1]
        arg[(2, 3, 2, 1)]=-0.794469076388*x[0]**o + (0.966822465138)*x[0] + (0.11543081698)*x[1]**o + (0.382393483178)*x[1]
        ref[(2, 3, 2, 1)]=-0.794469076388*x_ref[0]**o + (0.966822465138)*x_ref[0] + (0.11543081698)*x_ref[1]**o + (0.382393483178)*x_ref[1]
        arg[(2, 3, 2, 2)]=0.54461386474*x[0]**o + (-0.821067236268)*x[0] + (0.731887681335)*x[1]**o + (0.392637034713)*x[1]
        ref[(2, 3, 2, 2)]=0.54461386474*x_ref[0]**o + (-0.821067236268)*x_ref[0] + (0.731887681335)*x_ref[1]**o + (0.392637034713)*x_ref[1]
        arg[(2, 3, 3, 0)]=-0.931763745383*x[0]**o + (-0.750638674004)*x[0] + (-0.454597739697)*x[1]**o + (-0.0637240519234)*x[1]
        ref[(2, 3, 3, 0)]=-0.931763745383*x_ref[0]**o + (-0.750638674004)*x_ref[0] + (-0.454597739697)*x_ref[1]**o + (-0.0637240519234)*x_ref[1]
        arg[(2, 3, 3, 1)]=0.34733492502*x[0]**o + (0.0631673477611)*x[0] + (-0.0236355276963)*x[1]**o + (-0.485587812912)*x[1]
        ref[(2, 3, 3, 1)]=0.34733492502*x_ref[0]**o + (0.0631673477611)*x_ref[0] + (-0.0236355276963)*x_ref[1]**o + (-0.485587812912)*x_ref[1]
        arg[(2, 3, 3, 2)]=0.726764797005*x[0]**o + (0.4680703276)*x[0] + (-0.605914705538)*x[1]**o + (0.91970788768)*x[1]
        ref[(2, 3, 3, 2)]=0.726764797005*x_ref[0]**o + (0.4680703276)*x_ref[0] + (-0.605914705538)*x_ref[1]**o + (0.91970788768)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.165769317492*x[2]**o + (-0.612469609662)*x[2]
            ref[(0, 0, 0, 0)]+=0.165769317492*x_ref[2]**o + (-0.612469609662)*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.582876128003*x[2]**o + (-0.0999164565086)*x[2]
            ref[(0, 0, 0, 1)]+=0.582876128003*x_ref[2]**o + (-0.0999164565086)*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.532518144005*x[2]**o + (0.269522248239)*x[2]
            ref[(0, 0, 0, 2)]+=0.532518144005*x_ref[2]**o + (0.269522248239)*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.0365531323659*x[2]**o + (0.810327756972)*x[2]
            ref[(0, 0, 1, 0)]+=-0.0365531323659*x_ref[2]**o + (0.810327756972)*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.125806014656*x[2]**o + (0.645021841014)*x[2]
            ref[(0, 0, 1, 1)]+=-0.125806014656*x_ref[2]**o + (0.645021841014)*x_ref[2]
            arg[(0, 0, 1, 2)]+=0.793136972324*x[2]**o + (0.849629714575)*x[2]
            ref[(0, 0, 1, 2)]+=0.793136972324*x_ref[2]**o + (0.849629714575)*x_ref[2]
            arg[(0, 0, 2, 0)]+=0.557175512882*x[2]**o + (-0.269788424271)*x[2]
            ref[(0, 0, 2, 0)]+=0.557175512882*x_ref[2]**o + (-0.269788424271)*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.828524772828*x[2]**o + (-0.0706689546543)*x[2]
            ref[(0, 0, 2, 1)]+=0.828524772828*x_ref[2]**o + (-0.0706689546543)*x_ref[2]
            arg[(0, 0, 2, 2)]+=-0.188033930044*x[2]**o + (0.903268502855)*x[2]
            ref[(0, 0, 2, 2)]+=-0.188033930044*x_ref[2]**o + (0.903268502855)*x_ref[2]
            arg[(0, 0, 3, 0)]+=-0.293490395917*x[2]**o + (0.0679030506152)*x[2]
            ref[(0, 0, 3, 0)]+=-0.293490395917*x_ref[2]**o + (0.0679030506152)*x_ref[2]
            arg[(0, 0, 3, 1)]+=-0.884620028277*x[2]**o + (-0.73017644776)*x[2]
            ref[(0, 0, 3, 1)]+=-0.884620028277*x_ref[2]**o + (-0.73017644776)*x_ref[2]
            arg[(0, 0, 3, 2)]+=-0.972093632321*x[2]**o + (-0.988386639223)*x[2]
            ref[(0, 0, 3, 2)]+=-0.972093632321*x_ref[2]**o + (-0.988386639223)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.271347100765*x[2]**o + (0.736070496681)*x[2]
            ref[(0, 1, 0, 0)]+=-0.271347100765*x_ref[2]**o + (0.736070496681)*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.645149910706*x[2]**o + (0.348370023596)*x[2]
            ref[(0, 1, 0, 1)]+=0.645149910706*x_ref[2]**o + (0.348370023596)*x_ref[2]
            arg[(0, 1, 0, 2)]+=0.431288196826*x[2]**o + (0.544153993892)*x[2]
            ref[(0, 1, 0, 2)]+=0.431288196826*x_ref[2]**o + (0.544153993892)*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.590865503147*x[2]**o + (-0.0332502823578)*x[2]
            ref[(0, 1, 1, 0)]+=0.590865503147*x_ref[2]**o + (-0.0332502823578)*x_ref[2]
            arg[(0, 1, 1, 1)]+=0.451669896514*x[2]**o + (0.061825507548)*x[2]
            ref[(0, 1, 1, 1)]+=0.451669896514*x_ref[2]**o + (0.061825507548)*x_ref[2]
            arg[(0, 1, 1, 2)]+=-0.224875711024*x[2]**o + (-0.484464045598)*x[2]
            ref[(0, 1, 1, 2)]+=-0.224875711024*x_ref[2]**o + (-0.484464045598)*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.192952016497*x[2]**o + (-0.218022592246)*x[2]
            ref[(0, 1, 2, 0)]+=-0.192952016497*x_ref[2]**o + (-0.218022592246)*x_ref[2]
            arg[(0, 1, 2, 1)]+=-0.498727855992*x[2]**o + (0.24561629501)*x[2]
            ref[(0, 1, 2, 1)]+=-0.498727855992*x_ref[2]**o + (0.24561629501)*x_ref[2]
            arg[(0, 1, 2, 2)]+=-0.497078564085*x[2]**o + (0.500486692521)*x[2]
            ref[(0, 1, 2, 2)]+=-0.497078564085*x_ref[2]**o + (0.500486692521)*x_ref[2]
            arg[(0, 1, 3, 0)]+=-0.245123227423*x[2]**o + (0.0427952937211)*x[2]
            ref[(0, 1, 3, 0)]+=-0.245123227423*x_ref[2]**o + (0.0427952937211)*x_ref[2]
            arg[(0, 1, 3, 1)]+=-0.631231703699*x[2]**o + (-0.477252173024)*x[2]
            ref[(0, 1, 3, 1)]+=-0.631231703699*x_ref[2]**o + (-0.477252173024)*x_ref[2]
            arg[(0, 1, 3, 2)]+=-0.832380333058*x[2]**o + (0.502844309966)*x[2]
            ref[(0, 1, 3, 2)]+=-0.832380333058*x_ref[2]**o + (0.502844309966)*x_ref[2]
            arg[(0, 2, 0, 0)]+=0.41672739939*x[2]**o + (-0.374105036318)*x[2]
            ref[(0, 2, 0, 0)]+=0.41672739939*x_ref[2]**o + (-0.374105036318)*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.135338446298*x[2]**o + (0.766812578149)*x[2]
            ref[(0, 2, 0, 1)]+=-0.135338446298*x_ref[2]**o + (0.766812578149)*x_ref[2]
            arg[(0, 2, 0, 2)]+=0.138932261788*x[2]**o + (-0.376066387968)*x[2]
            ref[(0, 2, 0, 2)]+=0.138932261788*x_ref[2]**o + (-0.376066387968)*x_ref[2]
            arg[(0, 2, 1, 0)]+=0.480525964143*x[2]**o + (0.40832425372)*x[2]
            ref[(0, 2, 1, 0)]+=0.480525964143*x_ref[2]**o + (0.40832425372)*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.186890501277*x[2]**o + (-0.0541722956317)*x[2]
            ref[(0, 2, 1, 1)]+=-0.186890501277*x_ref[2]**o + (-0.0541722956317)*x_ref[2]
            arg[(0, 2, 1, 2)]+=-0.643327771336*x[2]**o + (-0.162391029359)*x[2]
            ref[(0, 2, 1, 2)]+=-0.643327771336*x_ref[2]**o + (-0.162391029359)*x_ref[2]
            arg[(0, 2, 2, 0)]+=0.0664260297009*x[2]**o + (0.866396272185)*x[2]
            ref[(0, 2, 2, 0)]+=0.0664260297009*x_ref[2]**o + (0.866396272185)*x_ref[2]
            arg[(0, 2, 2, 1)]+=0.321641783803*x[2]**o + (-0.943067052309)*x[2]
            ref[(0, 2, 2, 1)]+=0.321641783803*x_ref[2]**o + (-0.943067052309)*x_ref[2]
            arg[(0, 2, 2, 2)]+=-0.760492094433*x[2]**o + (-0.996794024277)*x[2]
            ref[(0, 2, 2, 2)]+=-0.760492094433*x_ref[2]**o + (-0.996794024277)*x_ref[2]
            arg[(0, 2, 3, 0)]+=0.602010225932*x[2]**o + (-0.808476825829)*x[2]
            ref[(0, 2, 3, 0)]+=0.602010225932*x_ref[2]**o + (-0.808476825829)*x_ref[2]
            arg[(0, 2, 3, 1)]+=-0.196673504572*x[2]**o + (0.785571820284)*x[2]
            ref[(0, 2, 3, 1)]+=-0.196673504572*x_ref[2]**o + (0.785571820284)*x_ref[2]
            arg[(0, 2, 3, 2)]+=0.545983754882*x[2]**o + (0.85462142039)*x[2]
            ref[(0, 2, 3, 2)]+=0.545983754882*x_ref[2]**o + (0.85462142039)*x_ref[2]
            arg[(0, 3, 0, 0)]+=-0.651722340173*x[2]**o + (0.209758147045)*x[2]
            ref[(0, 3, 0, 0)]+=-0.651722340173*x_ref[2]**o + (0.209758147045)*x_ref[2]
            arg[(0, 3, 0, 1)]+=-0.915562249666*x[2]**o + (0.233979292888)*x[2]
            ref[(0, 3, 0, 1)]+=-0.915562249666*x_ref[2]**o + (0.233979292888)*x_ref[2]
            arg[(0, 3, 0, 2)]+=0.741401303106*x[2]**o + (-0.950308449413)*x[2]
            ref[(0, 3, 0, 2)]+=0.741401303106*x_ref[2]**o + (-0.950308449413)*x_ref[2]
            arg[(0, 3, 1, 0)]+=0.458829412729*x[2]**o + (0.748579769979)*x[2]
            ref[(0, 3, 1, 0)]+=0.458829412729*x_ref[2]**o + (0.748579769979)*x_ref[2]
            arg[(0, 3, 1, 1)]+=-0.918691804433*x[2]**o + (0.595024147224)*x[2]
            ref[(0, 3, 1, 1)]+=-0.918691804433*x_ref[2]**o + (0.595024147224)*x_ref[2]
            arg[(0, 3, 1, 2)]+=0.948000049251*x[2]**o + (-0.402587449999)*x[2]
            ref[(0, 3, 1, 2)]+=0.948000049251*x_ref[2]**o + (-0.402587449999)*x_ref[2]
            arg[(0, 3, 2, 0)]+=-0.250816551003*x[2]**o + (0.677169839343)*x[2]
            ref[(0, 3, 2, 0)]+=-0.250816551003*x_ref[2]**o + (0.677169839343)*x_ref[2]
            arg[(0, 3, 2, 1)]+=-0.955250936931*x[2]**o + (0.100107446961)*x[2]
            ref[(0, 3, 2, 1)]+=-0.955250936931*x_ref[2]**o + (0.100107446961)*x_ref[2]
            arg[(0, 3, 2, 2)]+=-0.696625588448*x[2]**o + (-0.8608745)*x[2]
            ref[(0, 3, 2, 2)]+=-0.696625588448*x_ref[2]**o + (-0.8608745)*x_ref[2]
            arg[(0, 3, 3, 0)]+=-0.374334337357*x[2]**o + (0.241738297388)*x[2]
            ref[(0, 3, 3, 0)]+=-0.374334337357*x_ref[2]**o + (0.241738297388)*x_ref[2]
            arg[(0, 3, 3, 1)]+=0.995189779752*x[2]**o + (-0.253423583369)*x[2]
            ref[(0, 3, 3, 1)]+=0.995189779752*x_ref[2]**o + (-0.253423583369)*x_ref[2]
            arg[(0, 3, 3, 2)]+=-0.46260614004*x[2]**o + (-0.371438681971)*x[2]
            ref[(0, 3, 3, 2)]+=-0.46260614004*x_ref[2]**o + (-0.371438681971)*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.517080839899*x[2]**o + (0.425848209568)*x[2]
            ref[(1, 0, 0, 0)]+=0.517080839899*x_ref[2]**o + (0.425848209568)*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.825311851536*x[2]**o + (-0.350632351039)*x[2]
            ref[(1, 0, 0, 1)]+=0.825311851536*x_ref[2]**o + (-0.350632351039)*x_ref[2]
            arg[(1, 0, 0, 2)]+=-0.0709584497837*x[2]**o + (0.77545155007)*x[2]
            ref[(1, 0, 0, 2)]+=-0.0709584497837*x_ref[2]**o + (0.77545155007)*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.759387064356*x[2]**o + (-0.8878153752)*x[2]
            ref[(1, 0, 1, 0)]+=-0.759387064356*x_ref[2]**o + (-0.8878153752)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.665354185966*x[2]**o + (0.276663840139)*x[2]
            ref[(1, 0, 1, 1)]+=-0.665354185966*x_ref[2]**o + (0.276663840139)*x_ref[2]
            arg[(1, 0, 1, 2)]+=-0.667525222724*x[2]**o + (0.510771932286)*x[2]
            ref[(1, 0, 1, 2)]+=-0.667525222724*x_ref[2]**o + (0.510771932286)*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.630198507058*x[2]**o + (0.319576668863)*x[2]
            ref[(1, 0, 2, 0)]+=-0.630198507058*x_ref[2]**o + (0.319576668863)*x_ref[2]
            arg[(1, 0, 2, 1)]+=-0.847596309197*x[2]**o + (0.69119535517)*x[2]
            ref[(1, 0, 2, 1)]+=-0.847596309197*x_ref[2]**o + (0.69119535517)*x_ref[2]
            arg[(1, 0, 2, 2)]+=0.732157967413*x[2]**o + (-0.171233349341)*x[2]
            ref[(1, 0, 2, 2)]+=0.732157967413*x_ref[2]**o + (-0.171233349341)*x_ref[2]
            arg[(1, 0, 3, 0)]+=-0.917527722858*x[2]**o + (-0.287265857876)*x[2]
            ref[(1, 0, 3, 0)]+=-0.917527722858*x_ref[2]**o + (-0.287265857876)*x_ref[2]
            arg[(1, 0, 3, 1)]+=0.723484119842*x[2]**o + (-0.316256421629)*x[2]
            ref[(1, 0, 3, 1)]+=0.723484119842*x_ref[2]**o + (-0.316256421629)*x_ref[2]
            arg[(1, 0, 3, 2)]+=-0.826147469192*x[2]**o + (0.865127112114)*x[2]
            ref[(1, 0, 3, 2)]+=-0.826147469192*x_ref[2]**o + (0.865127112114)*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.485443539475*x[2]**o + (0.882757099119)*x[2]
            ref[(1, 1, 0, 0)]+=-0.485443539475*x_ref[2]**o + (0.882757099119)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.285805016105*x[2]**o + (0.993247024179)*x[2]
            ref[(1, 1, 0, 1)]+=0.285805016105*x_ref[2]**o + (0.993247024179)*x_ref[2]
            arg[(1, 1, 0, 2)]+=0.852839632119*x[2]**o + (0.0401003699161)*x[2]
            ref[(1, 1, 0, 2)]+=0.852839632119*x_ref[2]**o + (0.0401003699161)*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.315678883658*x[2]**o + (0.618074156762)*x[2]
            ref[(1, 1, 1, 0)]+=-0.315678883658*x_ref[2]**o + (0.618074156762)*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.23641600881*x[2]**o + (-0.281631276295)*x[2]
            ref[(1, 1, 1, 1)]+=0.23641600881*x_ref[2]**o + (-0.281631276295)*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.340877836204*x[2]**o + (-0.31257706541)*x[2]
            ref[(1, 1, 1, 2)]+=-0.340877836204*x_ref[2]**o + (-0.31257706541)*x_ref[2]
            arg[(1, 1, 2, 0)]+=0.599887629316*x[2]**o + (-0.196422474798)*x[2]
            ref[(1, 1, 2, 0)]+=0.599887629316*x_ref[2]**o + (-0.196422474798)*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.241877697347*x[2]**o + (0.514689488511)*x[2]
            ref[(1, 1, 2, 1)]+=0.241877697347*x_ref[2]**o + (0.514689488511)*x_ref[2]
            arg[(1, 1, 2, 2)]+=-0.819943250959*x[2]**o + (-0.220260535714)*x[2]
            ref[(1, 1, 2, 2)]+=-0.819943250959*x_ref[2]**o + (-0.220260535714)*x_ref[2]
            arg[(1, 1, 3, 0)]+=0.358312945828*x[2]**o + (0.535625202256)*x[2]
            ref[(1, 1, 3, 0)]+=0.358312945828*x_ref[2]**o + (0.535625202256)*x_ref[2]
            arg[(1, 1, 3, 1)]+=0.268898601607*x[2]**o + (0.459312941563)*x[2]
            ref[(1, 1, 3, 1)]+=0.268898601607*x_ref[2]**o + (0.459312941563)*x_ref[2]
            arg[(1, 1, 3, 2)]+=-0.733568592885*x[2]**o + (0.489619368381)*x[2]
            ref[(1, 1, 3, 2)]+=-0.733568592885*x_ref[2]**o + (0.489619368381)*x_ref[2]
            arg[(1, 2, 0, 0)]+=-0.70657468172*x[2]**o + (-0.430250893686)*x[2]
            ref[(1, 2, 0, 0)]+=-0.70657468172*x_ref[2]**o + (-0.430250893686)*x_ref[2]
            arg[(1, 2, 0, 1)]+=-0.9041901728*x[2]**o + (-0.419852746356)*x[2]
            ref[(1, 2, 0, 1)]+=-0.9041901728*x_ref[2]**o + (-0.419852746356)*x_ref[2]
            arg[(1, 2, 0, 2)]+=-0.638407969793*x[2]**o + (0.274000146392)*x[2]
            ref[(1, 2, 0, 2)]+=-0.638407969793*x_ref[2]**o + (0.274000146392)*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.796525292117*x[2]**o + (-0.538474285215)*x[2]
            ref[(1, 2, 1, 0)]+=0.796525292117*x_ref[2]**o + (-0.538474285215)*x_ref[2]
            arg[(1, 2, 1, 1)]+=-0.491566682236*x[2]**o + (0.82183182016)*x[2]
            ref[(1, 2, 1, 1)]+=-0.491566682236*x_ref[2]**o + (0.82183182016)*x_ref[2]
            arg[(1, 2, 1, 2)]+=0.151051196142*x[2]**o + (-0.322966989735)*x[2]
            ref[(1, 2, 1, 2)]+=0.151051196142*x_ref[2]**o + (-0.322966989735)*x_ref[2]
            arg[(1, 2, 2, 0)]+=-0.299112471646*x[2]**o + (0.773447499085)*x[2]
            ref[(1, 2, 2, 0)]+=-0.299112471646*x_ref[2]**o + (0.773447499085)*x_ref[2]
            arg[(1, 2, 2, 1)]+=0.77785432598*x[2]**o + (-0.724096865501)*x[2]
            ref[(1, 2, 2, 1)]+=0.77785432598*x_ref[2]**o + (-0.724096865501)*x_ref[2]
            arg[(1, 2, 2, 2)]+=0.824509590043*x[2]**o + (0.0111642682684)*x[2]
            ref[(1, 2, 2, 2)]+=0.824509590043*x_ref[2]**o + (0.0111642682684)*x_ref[2]
            arg[(1, 2, 3, 0)]+=0.453458790417*x[2]**o + (-0.0141984076507)*x[2]
            ref[(1, 2, 3, 0)]+=0.453458790417*x_ref[2]**o + (-0.0141984076507)*x_ref[2]
            arg[(1, 2, 3, 1)]+=-0.756788048921*x[2]**o + (0.423758000324)*x[2]
            ref[(1, 2, 3, 1)]+=-0.756788048921*x_ref[2]**o + (0.423758000324)*x_ref[2]
            arg[(1, 2, 3, 2)]+=0.573676001778*x[2]**o + (0.717864303873)*x[2]
            ref[(1, 2, 3, 2)]+=0.573676001778*x_ref[2]**o + (0.717864303873)*x_ref[2]
            arg[(1, 3, 0, 0)]+=0.111515549464*x[2]**o + (-0.658677382349)*x[2]
            ref[(1, 3, 0, 0)]+=0.111515549464*x_ref[2]**o + (-0.658677382349)*x_ref[2]
            arg[(1, 3, 0, 1)]+=-0.280037051908*x[2]**o + (-0.542085291369)*x[2]
            ref[(1, 3, 0, 1)]+=-0.280037051908*x_ref[2]**o + (-0.542085291369)*x_ref[2]
            arg[(1, 3, 0, 2)]+=-0.135889545472*x[2]**o + (-0.641856495896)*x[2]
            ref[(1, 3, 0, 2)]+=-0.135889545472*x_ref[2]**o + (-0.641856495896)*x_ref[2]
            arg[(1, 3, 1, 0)]+=-0.848242976471*x[2]**o + (0.04101870484)*x[2]
            ref[(1, 3, 1, 0)]+=-0.848242976471*x_ref[2]**o + (0.04101870484)*x_ref[2]
            arg[(1, 3, 1, 1)]+=0.54489715566*x[2]**o + (0.121332272527)*x[2]
            ref[(1, 3, 1, 1)]+=0.54489715566*x_ref[2]**o + (0.121332272527)*x_ref[2]
            arg[(1, 3, 1, 2)]+=0.486324744408*x[2]**o + (0.386000110491)*x[2]
            ref[(1, 3, 1, 2)]+=0.486324744408*x_ref[2]**o + (0.386000110491)*x_ref[2]
            arg[(1, 3, 2, 0)]+=0.201424288806*x[2]**o + (-0.243780414011)*x[2]
            ref[(1, 3, 2, 0)]+=0.201424288806*x_ref[2]**o + (-0.243780414011)*x_ref[2]
            arg[(1, 3, 2, 1)]+=0.66420809791*x[2]**o + (-0.0495368087754)*x[2]
            ref[(1, 3, 2, 1)]+=0.66420809791*x_ref[2]**o + (-0.0495368087754)*x_ref[2]
            arg[(1, 3, 2, 2)]+=-0.427587778193*x[2]**o + (0.244664334745)*x[2]
            ref[(1, 3, 2, 2)]+=-0.427587778193*x_ref[2]**o + (0.244664334745)*x_ref[2]
            arg[(1, 3, 3, 0)]+=0.267979913917*x[2]**o + (-0.768475806309)*x[2]
            ref[(1, 3, 3, 0)]+=0.267979913917*x_ref[2]**o + (-0.768475806309)*x_ref[2]
            arg[(1, 3, 3, 1)]+=0.0117508775045*x[2]**o + (-0.879384115223)*x[2]
            ref[(1, 3, 3, 1)]+=0.0117508775045*x_ref[2]**o + (-0.879384115223)*x_ref[2]
            arg[(1, 3, 3, 2)]+=-0.144431653851*x[2]**o + (0.724040421861)*x[2]
            ref[(1, 3, 3, 2)]+=-0.144431653851*x_ref[2]**o + (0.724040421861)*x_ref[2]
            arg[(2, 0, 0, 0)]+=-0.592440353627*x[2]**o + (-0.34874260047)*x[2]
            ref[(2, 0, 0, 0)]+=-0.592440353627*x_ref[2]**o + (-0.34874260047)*x_ref[2]
            arg[(2, 0, 0, 1)]+=-0.476052915483*x[2]**o + (0.342716611809)*x[2]
            ref[(2, 0, 0, 1)]+=-0.476052915483*x_ref[2]**o + (0.342716611809)*x_ref[2]
            arg[(2, 0, 0, 2)]+=-0.621573445876*x[2]**o + (0.0515993910538)*x[2]
            ref[(2, 0, 0, 2)]+=-0.621573445876*x_ref[2]**o + (0.0515993910538)*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.413229213895*x[2]**o + (0.474632411603)*x[2]
            ref[(2, 0, 1, 0)]+=-0.413229213895*x_ref[2]**o + (0.474632411603)*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.251008649194*x[2]**o + (-0.669919972288)*x[2]
            ref[(2, 0, 1, 1)]+=0.251008649194*x_ref[2]**o + (-0.669919972288)*x_ref[2]
            arg[(2, 0, 1, 2)]+=0.974346242886*x[2]**o + (0.256137657262)*x[2]
            ref[(2, 0, 1, 2)]+=0.974346242886*x_ref[2]**o + (0.256137657262)*x_ref[2]
            arg[(2, 0, 2, 0)]+=-0.830208943258*x[2]**o + (0.109522833424)*x[2]
            ref[(2, 0, 2, 0)]+=-0.830208943258*x_ref[2]**o + (0.109522833424)*x_ref[2]
            arg[(2, 0, 2, 1)]+=-0.00105714364288*x[2]**o + (-0.0970530858647)*x[2]
            ref[(2, 0, 2, 1)]+=-0.00105714364288*x_ref[2]**o + (-0.0970530858647)*x_ref[2]
            arg[(2, 0, 2, 2)]+=0.0632066367766*x[2]**o + (0.559241974483)*x[2]
            ref[(2, 0, 2, 2)]+=0.0632066367766*x_ref[2]**o + (0.559241974483)*x_ref[2]
            arg[(2, 0, 3, 0)]+=-0.897169762572*x[2]**o + (-0.558838390526)*x[2]
            ref[(2, 0, 3, 0)]+=-0.897169762572*x_ref[2]**o + (-0.558838390526)*x_ref[2]
            arg[(2, 0, 3, 1)]+=0.757359766043*x[2]**o + (0.292922260362)*x[2]
            ref[(2, 0, 3, 1)]+=0.757359766043*x_ref[2]**o + (0.292922260362)*x_ref[2]
            arg[(2, 0, 3, 2)]+=0.776622038963*x[2]**o + (-0.262716584665)*x[2]
            ref[(2, 0, 3, 2)]+=0.776622038963*x_ref[2]**o + (-0.262716584665)*x_ref[2]
            arg[(2, 1, 0, 0)]+=0.0237584898376*x[2]**o + (-0.854507564991)*x[2]
            ref[(2, 1, 0, 0)]+=0.0237584898376*x_ref[2]**o + (-0.854507564991)*x_ref[2]
            arg[(2, 1, 0, 1)]+=0.72985621534*x[2]**o + (0.871031205255)*x[2]
            ref[(2, 1, 0, 1)]+=0.72985621534*x_ref[2]**o + (0.871031205255)*x_ref[2]
            arg[(2, 1, 0, 2)]+=0.988724767628*x[2]**o + (0.282929418416)*x[2]
            ref[(2, 1, 0, 2)]+=0.988724767628*x_ref[2]**o + (0.282929418416)*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.671065526354*x[2]**o + (0.450277737746)*x[2]
            ref[(2, 1, 1, 0)]+=0.671065526354*x_ref[2]**o + (0.450277737746)*x_ref[2]
            arg[(2, 1, 1, 1)]+=-0.0680328591368*x[2]**o + (-0.920146360189)*x[2]
            ref[(2, 1, 1, 1)]+=-0.0680328591368*x_ref[2]**o + (-0.920146360189)*x_ref[2]
            arg[(2, 1, 1, 2)]+=-0.393174223023*x[2]**o + (0.0788857125618)*x[2]
            ref[(2, 1, 1, 2)]+=-0.393174223023*x_ref[2]**o + (0.0788857125618)*x_ref[2]
            arg[(2, 1, 2, 0)]+=-0.0436622652595*x[2]**o + (0.00262509485452)*x[2]
            ref[(2, 1, 2, 0)]+=-0.0436622652595*x_ref[2]**o + (0.00262509485452)*x_ref[2]
            arg[(2, 1, 2, 1)]+=0.309009910341*x[2]**o + (0.311375969229)*x[2]
            ref[(2, 1, 2, 1)]+=0.309009910341*x_ref[2]**o + (0.311375969229)*x_ref[2]
            arg[(2, 1, 2, 2)]+=-0.851427547085*x[2]**o + (0.748251199692)*x[2]
            ref[(2, 1, 2, 2)]+=-0.851427547085*x_ref[2]**o + (0.748251199692)*x_ref[2]
            arg[(2, 1, 3, 0)]+=-0.316481534555*x[2]**o + (-0.493051121038)*x[2]
            ref[(2, 1, 3, 0)]+=-0.316481534555*x_ref[2]**o + (-0.493051121038)*x_ref[2]
            arg[(2, 1, 3, 1)]+=-0.303822840095*x[2]**o + (0.70347110385)*x[2]
            ref[(2, 1, 3, 1)]+=-0.303822840095*x_ref[2]**o + (0.70347110385)*x_ref[2]
            arg[(2, 1, 3, 2)]+=0.399264527106*x[2]**o + (-0.360912053792)*x[2]
            ref[(2, 1, 3, 2)]+=0.399264527106*x_ref[2]**o + (-0.360912053792)*x_ref[2]
            arg[(2, 2, 0, 0)]+=0.541803107092*x[2]**o + (-0.765900022068)*x[2]
            ref[(2, 2, 0, 0)]+=0.541803107092*x_ref[2]**o + (-0.765900022068)*x_ref[2]
            arg[(2, 2, 0, 1)]+=0.865280850666*x[2]**o + (-0.608089595972)*x[2]
            ref[(2, 2, 0, 1)]+=0.865280850666*x_ref[2]**o + (-0.608089595972)*x_ref[2]
            arg[(2, 2, 0, 2)]+=-0.492476619397*x[2]**o + (0.0246022228476)*x[2]
            ref[(2, 2, 0, 2)]+=-0.492476619397*x_ref[2]**o + (0.0246022228476)*x_ref[2]
            arg[(2, 2, 1, 0)]+=0.171124166749*x[2]**o + (-0.385494467173)*x[2]
            ref[(2, 2, 1, 0)]+=0.171124166749*x_ref[2]**o + (-0.385494467173)*x_ref[2]
            arg[(2, 2, 1, 1)]+=0.286158099859*x[2]**o + (-0.62678476579)*x[2]
            ref[(2, 2, 1, 1)]+=0.286158099859*x_ref[2]**o + (-0.62678476579)*x_ref[2]
            arg[(2, 2, 1, 2)]+=-0.124835974472*x[2]**o + (-0.959336312283)*x[2]
            ref[(2, 2, 1, 2)]+=-0.124835974472*x_ref[2]**o + (-0.959336312283)*x_ref[2]
            arg[(2, 2, 2, 0)]+=-0.877774025837*x[2]**o + (-0.129398493789)*x[2]
            ref[(2, 2, 2, 0)]+=-0.877774025837*x_ref[2]**o + (-0.129398493789)*x_ref[2]
            arg[(2, 2, 2, 1)]+=0.825236371468*x[2]**o + (0.821518190086)*x[2]
            ref[(2, 2, 2, 1)]+=0.825236371468*x_ref[2]**o + (0.821518190086)*x_ref[2]
            arg[(2, 2, 2, 2)]+=-0.930910836304*x[2]**o + (-0.106468206934)*x[2]
            ref[(2, 2, 2, 2)]+=-0.930910836304*x_ref[2]**o + (-0.106468206934)*x_ref[2]
            arg[(2, 2, 3, 0)]+=0.374323788375*x[2]**o + (0.569896912548)*x[2]
            ref[(2, 2, 3, 0)]+=0.374323788375*x_ref[2]**o + (0.569896912548)*x_ref[2]
            arg[(2, 2, 3, 1)]+=0.954790225537*x[2]**o + (0.611798655748)*x[2]
            ref[(2, 2, 3, 1)]+=0.954790225537*x_ref[2]**o + (0.611798655748)*x_ref[2]
            arg[(2, 2, 3, 2)]+=0.760518978216*x[2]**o + (0.800162900625)*x[2]
            ref[(2, 2, 3, 2)]+=0.760518978216*x_ref[2]**o + (0.800162900625)*x_ref[2]
            arg[(2, 3, 0, 0)]+=-0.607334439166*x[2]**o + (-0.0524599631437)*x[2]
            ref[(2, 3, 0, 0)]+=-0.607334439166*x_ref[2]**o + (-0.0524599631437)*x_ref[2]
            arg[(2, 3, 0, 1)]+=0.0999451701422*x[2]**o + (-0.967873950047)*x[2]
            ref[(2, 3, 0, 1)]+=0.0999451701422*x_ref[2]**o + (-0.967873950047)*x_ref[2]
            arg[(2, 3, 0, 2)]+=0.124210875568*x[2]**o + (0.702512881987)*x[2]
            ref[(2, 3, 0, 2)]+=0.124210875568*x_ref[2]**o + (0.702512881987)*x_ref[2]
            arg[(2, 3, 1, 0)]+=-0.0474445423417*x[2]**o + (-0.922962582272)*x[2]
            ref[(2, 3, 1, 0)]+=-0.0474445423417*x_ref[2]**o + (-0.922962582272)*x_ref[2]
            arg[(2, 3, 1, 1)]+=0.420663146979*x[2]**o + (-0.511527249885)*x[2]
            ref[(2, 3, 1, 1)]+=0.420663146979*x_ref[2]**o + (-0.511527249885)*x_ref[2]
            arg[(2, 3, 1, 2)]+=-0.189490778356*x[2]**o + (-0.479577615536)*x[2]
            ref[(2, 3, 1, 2)]+=-0.189490778356*x_ref[2]**o + (-0.479577615536)*x_ref[2]
            arg[(2, 3, 2, 0)]+=0.74572459476*x[2]**o + (-0.672832837195)*x[2]
            ref[(2, 3, 2, 0)]+=0.74572459476*x_ref[2]**o + (-0.672832837195)*x_ref[2]
            arg[(2, 3, 2, 1)]+=0.307311079627*x[2]**o + (-0.492191128071)*x[2]
            ref[(2, 3, 2, 1)]+=0.307311079627*x_ref[2]**o + (-0.492191128071)*x_ref[2]
            arg[(2, 3, 2, 2)]+=-0.599931183777*x[2]**o + (0.464638933764)*x[2]
            ref[(2, 3, 2, 2)]+=-0.599931183777*x_ref[2]**o + (0.464638933764)*x_ref[2]
            arg[(2, 3, 3, 0)]+=-0.340961240846*x[2]**o + (0.0231350341148)*x[2]
            ref[(2, 3, 3, 0)]+=-0.340961240846*x_ref[2]**o + (0.0231350341148)*x_ref[2]
            arg[(2, 3, 3, 1)]+=-0.44662351839*x[2]**o + (-0.673182796279)*x[2]
            ref[(2, 3, 3, 1)]+=-0.44662351839*x_ref[2]**o + (-0.673182796279)*x_ref[2]
            arg[(2, 3, 3, 2)]+=0.581195280835*x[2]**o + (0.727019487953)*x[2]
            ref[(2, 3, 3, 2)]+=0.581195280835*x_ref[2]**o + (0.727019487953)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.221496039959*x[0]**o + (-0.729211050348)*x[0] + (0.698201239664)*x[1]**o + (0.155387067429)*x[1]
        ref=0.221496039959*x_ref[0]**o + (-0.729211050348)*x_ref[0] + (0.698201239664)*x_ref[1]**o + (0.155387067429)*x_ref[1]
        if dim==3:
            arg+=(0.484094076499)*x[2]**o + (0.143308813376)*x[2]
            ref+=(0.484094076499)*x_ref[2]**o + (0.143308813376)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=-0.354785819293*x[0]**o + (0.0770572334782)*x[0] + (0.133757963484)*x[1]**o + (0.168765031978)*x[1]
        ref[(0,)]=-0.354785819293*x_ref[0]**o + (0.0770572334782)*x_ref[0] + (0.133757963484)*x_ref[1]**o + (0.168765031978)*x_ref[1]
        arg[(1,)]=0.936008049359*x[0]**o + (0.395370171081)*x[0] + (0.0896334039209)*x[1]**o + (-0.502498045352)*x[1]
        ref[(1,)]=0.936008049359*x_ref[0]**o + (0.395370171081)*x_ref[0] + (0.0896334039209)*x_ref[1]**o + (-0.502498045352)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.483457763441*x[2]**o + (-0.889094415831)*x[2]
            ref[(0,)]+=-0.483457763441*x_ref[2]**o + (-0.889094415831)*x_ref[2]
            arg[(1,)]+=0.758984940148*x[2]**o + (-0.622157953319)*x[2]
            ref[(1,)]+=0.758984940148*x_ref[2]**o + (-0.622157953319)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3),w)
        ref = Data(0,(3, 3),w_ref)
        arg[(0, 0)]=-0.485628987593*x[0]**o + (0.319561010332)*x[0] + (-0.4887754246)*x[1]**o + (-0.862984131669)*x[1]
        ref[(0, 0)]=-0.485628987593*x_ref[0]**o + (0.319561010332)*x_ref[0] + (-0.4887754246)*x_ref[1]**o + (-0.862984131669)*x_ref[1]
        arg[(0, 1)]=0.965943586021*x[0]**o + (-0.115998676929)*x[0] + (-0.262267434027)*x[1]**o + (-0.986438080496)*x[1]
        ref[(0, 1)]=0.965943586021*x_ref[0]**o + (-0.115998676929)*x_ref[0] + (-0.262267434027)*x_ref[1]**o + (-0.986438080496)*x_ref[1]
        arg[(0, 2)]=0.15629550555*x[0]**o + (0.612854840523)*x[0] + (-0.0348853810999)*x[1]**o + (0.502839972583)*x[1]
        ref[(0, 2)]=0.15629550555*x_ref[0]**o + (0.612854840523)*x_ref[0] + (-0.0348853810999)*x_ref[1]**o + (0.502839972583)*x_ref[1]
        arg[(1, 0)]=-0.958535074872*x[0]**o + (-0.18746022978)*x[0] + (0.340675136961)*x[1]**o + (0.187084678116)*x[1]
        ref[(1, 0)]=-0.958535074872*x_ref[0]**o + (-0.18746022978)*x_ref[0] + (0.340675136961)*x_ref[1]**o + (0.187084678116)*x_ref[1]
        arg[(1, 1)]=-0.419960089086*x[0]**o + (-0.582449751478)*x[0] + (0.596133770646)*x[1]**o + (-0.532556309414)*x[1]
        ref[(1, 1)]=-0.419960089086*x_ref[0]**o + (-0.582449751478)*x_ref[0] + (0.596133770646)*x_ref[1]**o + (-0.532556309414)*x_ref[1]
        arg[(1, 2)]=0.384194631837*x[0]**o + (0.0843551138873)*x[0] + (0.570203844825)*x[1]**o + (-0.235626305359)*x[1]
        ref[(1, 2)]=0.384194631837*x_ref[0]**o + (0.0843551138873)*x_ref[0] + (0.570203844825)*x_ref[1]**o + (-0.235626305359)*x_ref[1]
        arg[(2, 0)]=0.85166285864*x[0]**o + (-0.0214334054738)*x[0] + (0.558518427392)*x[1]**o + (-0.0717617056211)*x[1]
        ref[(2, 0)]=0.85166285864*x_ref[0]**o + (-0.0214334054738)*x_ref[0] + (0.558518427392)*x_ref[1]**o + (-0.0717617056211)*x_ref[1]
        arg[(2, 1)]=0.297423833682*x[0]**o + (0.840974425538)*x[0] + (0.518005578994)*x[1]**o + (-0.556107524194)*x[1]
        ref[(2, 1)]=0.297423833682*x_ref[0]**o + (0.840974425538)*x_ref[0] + (0.518005578994)*x_ref[1]**o + (-0.556107524194)*x_ref[1]
        arg[(2, 2)]=-0.458687809203*x[0]**o + (0.818597272614)*x[0] + (-0.905584211861)*x[1]**o + (0.619352766927)*x[1]
        ref[(2, 2)]=-0.458687809203*x_ref[0]**o + (0.818597272614)*x_ref[0] + (-0.905584211861)*x_ref[1]**o + (0.619352766927)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.783678757541*x[2]**o + (-0.791905358511)*x[2]
            ref[(0, 0)]+=0.783678757541*x_ref[2]**o + (-0.791905358511)*x_ref[2]
            arg[(0, 1)]+=-0.462157931254*x[2]**o + (0.035367131083)*x[2]
            ref[(0, 1)]+=-0.462157931254*x_ref[2]**o + (0.035367131083)*x_ref[2]
            arg[(0, 2)]+=0.561727784651*x[2]**o + (-0.326046179985)*x[2]
            ref[(0, 2)]+=0.561727784651*x_ref[2]**o + (-0.326046179985)*x_ref[2]
            arg[(1, 0)]+=-0.898693167885*x[2]**o + (-0.0340832552103)*x[2]
            ref[(1, 0)]+=-0.898693167885*x_ref[2]**o + (-0.0340832552103)*x_ref[2]
            arg[(1, 1)]+=0.530130417068*x[2]**o + (-0.468070028181)*x[2]
            ref[(1, 1)]+=0.530130417068*x_ref[2]**o + (-0.468070028181)*x_ref[2]
            arg[(1, 2)]+=0.829815026149*x[2]**o + (0.936098391239)*x[2]
            ref[(1, 2)]+=0.829815026149*x_ref[2]**o + (0.936098391239)*x_ref[2]
            arg[(2, 0)]+=-0.67367427838*x[2]**o + (-0.906644896491)*x[2]
            ref[(2, 0)]+=-0.67367427838*x_ref[2]**o + (-0.906644896491)*x_ref[2]
            arg[(2, 1)]+=0.895588200056*x[2]**o + (-0.850401254503)*x[2]
            ref[(2, 1)]+=0.895588200056*x_ref[2]**o + (-0.850401254503)*x_ref[2]
            arg[(2, 2)]+=-0.901939391436*x[2]**o + (0.910700472235)*x[2]
            ref[(2, 2)]+=-0.901939391436*x_ref[2]**o + (0.910700472235)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 3),w)
        ref = Data(0,(2, 2, 3),w_ref)
        arg[(0, 0, 0)]=-0.306212230417*x[0]**o + (-0.734295392513)*x[0] + (-0.854065444748)*x[1]**o + (0.330167206251)*x[1]
        ref[(0, 0, 0)]=-0.306212230417*x_ref[0]**o + (-0.734295392513)*x_ref[0] + (-0.854065444748)*x_ref[1]**o + (0.330167206251)*x_ref[1]
        arg[(0, 0, 1)]=-0.839751670384*x[0]**o + (-0.0186552432904)*x[0] + (0.568875059837)*x[1]**o + (0.0224381429527)*x[1]
        ref[(0, 0, 1)]=-0.839751670384*x_ref[0]**o + (-0.0186552432904)*x_ref[0] + (0.568875059837)*x_ref[1]**o + (0.0224381429527)*x_ref[1]
        arg[(0, 0, 2)]=-0.911057269405*x[0]**o + (-0.587428324971)*x[0] + (0.65502439471)*x[1]**o + (0.755369022857)*x[1]
        ref[(0, 0, 2)]=-0.911057269405*x_ref[0]**o + (-0.587428324971)*x_ref[0] + (0.65502439471)*x_ref[1]**o + (0.755369022857)*x_ref[1]
        arg[(0, 1, 0)]=0.618981186363*x[0]**o + (-0.416996805136)*x[0] + (0.253574142507)*x[1]**o + (0.280890490979)*x[1]
        ref[(0, 1, 0)]=0.618981186363*x_ref[0]**o + (-0.416996805136)*x_ref[0] + (0.253574142507)*x_ref[1]**o + (0.280890490979)*x_ref[1]
        arg[(0, 1, 1)]=0.617966470617*x[0]**o + (0.581621799231)*x[0] + (-0.460774727374)*x[1]**o + (-0.650673713106)*x[1]
        ref[(0, 1, 1)]=0.617966470617*x_ref[0]**o + (0.581621799231)*x_ref[0] + (-0.460774727374)*x_ref[1]**o + (-0.650673713106)*x_ref[1]
        arg[(0, 1, 2)]=-0.916118533636*x[0]**o + (-0.523192309467)*x[0] + (-0.123344992484)*x[1]**o + (0.0140052137686)*x[1]
        ref[(0, 1, 2)]=-0.916118533636*x_ref[0]**o + (-0.523192309467)*x_ref[0] + (-0.123344992484)*x_ref[1]**o + (0.0140052137686)*x_ref[1]
        arg[(1, 0, 0)]=-0.153125319301*x[0]**o + (-0.972347563252)*x[0] + (-0.71404218938)*x[1]**o + (0.796396907868)*x[1]
        ref[(1, 0, 0)]=-0.153125319301*x_ref[0]**o + (-0.972347563252)*x_ref[0] + (-0.71404218938)*x_ref[1]**o + (0.796396907868)*x_ref[1]
        arg[(1, 0, 1)]=-0.398911876386*x[0]**o + (0.463760362038)*x[0] + (0.936212288152)*x[1]**o + (0.207147692058)*x[1]
        ref[(1, 0, 1)]=-0.398911876386*x_ref[0]**o + (0.463760362038)*x_ref[0] + (0.936212288152)*x_ref[1]**o + (0.207147692058)*x_ref[1]
        arg[(1, 0, 2)]=-0.464569821722*x[0]**o + (-0.520684402507)*x[0] + (-0.448829227004)*x[1]**o + (-0.40788288184)*x[1]
        ref[(1, 0, 2)]=-0.464569821722*x_ref[0]**o + (-0.520684402507)*x_ref[0] + (-0.448829227004)*x_ref[1]**o + (-0.40788288184)*x_ref[1]
        arg[(1, 1, 0)]=-0.0567696903983*x[0]**o + (0.524973365985)*x[0] + (-0.686629351731)*x[1]**o + (0.924137272718)*x[1]
        ref[(1, 1, 0)]=-0.0567696903983*x_ref[0]**o + (0.524973365985)*x_ref[0] + (-0.686629351731)*x_ref[1]**o + (0.924137272718)*x_ref[1]
        arg[(1, 1, 1)]=0.574832550451*x[0]**o + (0.241280408889)*x[0] + (0.922224208234)*x[1]**o + (0.659202245692)*x[1]
        ref[(1, 1, 1)]=0.574832550451*x_ref[0]**o + (0.241280408889)*x_ref[0] + (0.922224208234)*x_ref[1]**o + (0.659202245692)*x_ref[1]
        arg[(1, 1, 2)]=-0.67690565713*x[0]**o + (0.214225464324)*x[0] + (0.836579821839)*x[1]**o + (0.84969222458)*x[1]
        ref[(1, 1, 2)]=-0.67690565713*x_ref[0]**o + (0.214225464324)*x_ref[0] + (0.836579821839)*x_ref[1]**o + (0.84969222458)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.946801439797*x[2]**o + (-0.981625310408)*x[2]
            ref[(0, 0, 0)]+=-0.946801439797*x_ref[2]**o + (-0.981625310408)*x_ref[2]
            arg[(0, 0, 1)]+=0.24714322319*x[2]**o + (0.41081043892)*x[2]
            ref[(0, 0, 1)]+=0.24714322319*x_ref[2]**o + (0.41081043892)*x_ref[2]
            arg[(0, 0, 2)]+=-0.903100457478*x[2]**o + (0.8862995024)*x[2]
            ref[(0, 0, 2)]+=-0.903100457478*x_ref[2]**o + (0.8862995024)*x_ref[2]
            arg[(0, 1, 0)]+=-0.00264271699392*x[2]**o + (-0.726130568862)*x[2]
            ref[(0, 1, 0)]+=-0.00264271699392*x_ref[2]**o + (-0.726130568862)*x_ref[2]
            arg[(0, 1, 1)]+=0.723832892811*x[2]**o + (0.584034898157)*x[2]
            ref[(0, 1, 1)]+=0.723832892811*x_ref[2]**o + (0.584034898157)*x_ref[2]
            arg[(0, 1, 2)]+=-0.113560811428*x[2]**o + (-0.67414546999)*x[2]
            ref[(0, 1, 2)]+=-0.113560811428*x_ref[2]**o + (-0.67414546999)*x_ref[2]
            arg[(1, 0, 0)]+=-0.56952774206*x[2]**o + (0.786675286497)*x[2]
            ref[(1, 0, 0)]+=-0.56952774206*x_ref[2]**o + (0.786675286497)*x_ref[2]
            arg[(1, 0, 1)]+=-0.134791330127*x[2]**o + (-0.800411744719)*x[2]
            ref[(1, 0, 1)]+=-0.134791330127*x_ref[2]**o + (-0.800411744719)*x_ref[2]
            arg[(1, 0, 2)]+=-0.064615103932*x[2]**o + (-0.773291921203)*x[2]
            ref[(1, 0, 2)]+=-0.064615103932*x_ref[2]**o + (-0.773291921203)*x_ref[2]
            arg[(1, 1, 0)]+=0.224692914354*x[2]**o + (-0.996288272211)*x[2]
            ref[(1, 1, 0)]+=0.224692914354*x_ref[2]**o + (-0.996288272211)*x_ref[2]
            arg[(1, 1, 1)]+=-0.242854174187*x[2]**o + (-0.501369669587)*x[2]
            ref[(1, 1, 1)]+=-0.242854174187*x_ref[2]**o + (-0.501369669587)*x_ref[2]
            arg[(1, 1, 2)]+=0.657976161298*x[2]**o + (0.858690692375)*x[2]
            ref[(1, 1, 2)]+=0.657976161298*x_ref[2]**o + (0.858690692375)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 4, 4),w)
        ref = Data(0,(3, 4, 4, 4),w_ref)
        arg[(0, 0, 0, 0)]=0.127779232195*x[0]**o + (-0.454167643015)*x[0] + (0.24004346576)*x[1]**o + (-0.93185738934)*x[1]
        ref[(0, 0, 0, 0)]=0.127779232195*x_ref[0]**o + (-0.454167643015)*x_ref[0] + (0.24004346576)*x_ref[1]**o + (-0.93185738934)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.107165731833*x[0]**o + (0.741018099548)*x[0] + (-0.189560296844)*x[1]**o + (-0.263635274032)*x[1]
        ref[(0, 0, 0, 1)]=0.107165731833*x_ref[0]**o + (0.741018099548)*x_ref[0] + (-0.189560296844)*x_ref[1]**o + (-0.263635274032)*x_ref[1]
        arg[(0, 0, 0, 2)]=0.593326114291*x[0]**o + (0.924360666134)*x[0] + (-0.715439643321)*x[1]**o + (0.360630751211)*x[1]
        ref[(0, 0, 0, 2)]=0.593326114291*x_ref[0]**o + (0.924360666134)*x_ref[0] + (-0.715439643321)*x_ref[1]**o + (0.360630751211)*x_ref[1]
        arg[(0, 0, 0, 3)]=0.779455336548*x[0]**o + (-0.495315465375)*x[0] + (-0.552062924768)*x[1]**o + (-0.537596441631)*x[1]
        ref[(0, 0, 0, 3)]=0.779455336548*x_ref[0]**o + (-0.495315465375)*x_ref[0] + (-0.552062924768)*x_ref[1]**o + (-0.537596441631)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.425182328914*x[0]**o + (-0.937291143891)*x[0] + (0.57736538131)*x[1]**o + (0.915775980192)*x[1]
        ref[(0, 0, 1, 0)]=-0.425182328914*x_ref[0]**o + (-0.937291143891)*x_ref[0] + (0.57736538131)*x_ref[1]**o + (0.915775980192)*x_ref[1]
        arg[(0, 0, 1, 1)]=-0.364526373957*x[0]**o + (-0.788905246707)*x[0] + (0.776410675969)*x[1]**o + (0.168907546676)*x[1]
        ref[(0, 0, 1, 1)]=-0.364526373957*x_ref[0]**o + (-0.788905246707)*x_ref[0] + (0.776410675969)*x_ref[1]**o + (0.168907546676)*x_ref[1]
        arg[(0, 0, 1, 2)]=0.564055159121*x[0]**o + (0.695652351225)*x[0] + (-0.224363868942)*x[1]**o + (-0.2036100848)*x[1]
        ref[(0, 0, 1, 2)]=0.564055159121*x_ref[0]**o + (0.695652351225)*x_ref[0] + (-0.224363868942)*x_ref[1]**o + (-0.2036100848)*x_ref[1]
        arg[(0, 0, 1, 3)]=-0.24782870728*x[0]**o + (0.566822805277)*x[0] + (0.401503006236)*x[1]**o + (-0.308463676854)*x[1]
        ref[(0, 0, 1, 3)]=-0.24782870728*x_ref[0]**o + (0.566822805277)*x_ref[0] + (0.401503006236)*x_ref[1]**o + (-0.308463676854)*x_ref[1]
        arg[(0, 0, 2, 0)]=0.658716702241*x[0]**o + (-0.693450576819)*x[0] + (-0.269781586754)*x[1]**o + (0.0388901229086)*x[1]
        ref[(0, 0, 2, 0)]=0.658716702241*x_ref[0]**o + (-0.693450576819)*x_ref[0] + (-0.269781586754)*x_ref[1]**o + (0.0388901229086)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.469389116098*x[0]**o + (-0.934052665057)*x[0] + (-0.574283662742)*x[1]**o + (0.332753851538)*x[1]
        ref[(0, 0, 2, 1)]=-0.469389116098*x_ref[0]**o + (-0.934052665057)*x_ref[0] + (-0.574283662742)*x_ref[1]**o + (0.332753851538)*x_ref[1]
        arg[(0, 0, 2, 2)]=-0.287154382509*x[0]**o + (0.408331117084)*x[0] + (-0.5597443213)*x[1]**o + (-0.794207459163)*x[1]
        ref[(0, 0, 2, 2)]=-0.287154382509*x_ref[0]**o + (0.408331117084)*x_ref[0] + (-0.5597443213)*x_ref[1]**o + (-0.794207459163)*x_ref[1]
        arg[(0, 0, 2, 3)]=-0.512872804548*x[0]**o + (-0.771822855991)*x[0] + (-0.727845960036)*x[1]**o + (-0.737331742018)*x[1]
        ref[(0, 0, 2, 3)]=-0.512872804548*x_ref[0]**o + (-0.771822855991)*x_ref[0] + (-0.727845960036)*x_ref[1]**o + (-0.737331742018)*x_ref[1]
        arg[(0, 0, 3, 0)]=-0.19851859284*x[0]**o + (0.122396456928)*x[0] + (-0.65371613257)*x[1]**o + (0.723691227396)*x[1]
        ref[(0, 0, 3, 0)]=-0.19851859284*x_ref[0]**o + (0.122396456928)*x_ref[0] + (-0.65371613257)*x_ref[1]**o + (0.723691227396)*x_ref[1]
        arg[(0, 0, 3, 1)]=-0.328277190956*x[0]**o + (0.856459329496)*x[0] + (-0.236638068399)*x[1]**o + (-0.355108091762)*x[1]
        ref[(0, 0, 3, 1)]=-0.328277190956*x_ref[0]**o + (0.856459329496)*x_ref[0] + (-0.236638068399)*x_ref[1]**o + (-0.355108091762)*x_ref[1]
        arg[(0, 0, 3, 2)]=0.73709239819*x[0]**o + (0.948677484092)*x[0] + (0.846788159387)*x[1]**o + (0.171926456079)*x[1]
        ref[(0, 0, 3, 2)]=0.73709239819*x_ref[0]**o + (0.948677484092)*x_ref[0] + (0.846788159387)*x_ref[1]**o + (0.171926456079)*x_ref[1]
        arg[(0, 0, 3, 3)]=0.238859649885*x[0]**o + (0.119982537436)*x[0] + (0.469265671667)*x[1]**o + (-0.561758481098)*x[1]
        ref[(0, 0, 3, 3)]=0.238859649885*x_ref[0]**o + (0.119982537436)*x_ref[0] + (0.469265671667)*x_ref[1]**o + (-0.561758481098)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.676890234014*x[0]**o + (-0.126266984936)*x[0] + (0.486821274556)*x[1]**o + (0.0535444895484)*x[1]
        ref[(0, 1, 0, 0)]=-0.676890234014*x_ref[0]**o + (-0.126266984936)*x_ref[0] + (0.486821274556)*x_ref[1]**o + (0.0535444895484)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.824707652796*x[0]**o + (0.249709278468)*x[0] + (0.856588972117)*x[1]**o + (-0.898317264002)*x[1]
        ref[(0, 1, 0, 1)]=0.824707652796*x_ref[0]**o + (0.249709278468)*x_ref[0] + (0.856588972117)*x_ref[1]**o + (-0.898317264002)*x_ref[1]
        arg[(0, 1, 0, 2)]=-0.212627791787*x[0]**o + (-0.924118239874)*x[0] + (-0.927826077957)*x[1]**o + (-0.492636785967)*x[1]
        ref[(0, 1, 0, 2)]=-0.212627791787*x_ref[0]**o + (-0.924118239874)*x_ref[0] + (-0.927826077957)*x_ref[1]**o + (-0.492636785967)*x_ref[1]
        arg[(0, 1, 0, 3)]=-0.0870063946102*x[0]**o + (-0.803912833595)*x[0] + (-0.252892608988)*x[1]**o + (0.872094221925)*x[1]
        ref[(0, 1, 0, 3)]=-0.0870063946102*x_ref[0]**o + (-0.803912833595)*x_ref[0] + (-0.252892608988)*x_ref[1]**o + (0.872094221925)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.894162822392*x[0]**o + (-0.61164329284)*x[0] + (0.755679299741)*x[1]**o + (-0.833030431989)*x[1]
        ref[(0, 1, 1, 0)]=-0.894162822392*x_ref[0]**o + (-0.61164329284)*x_ref[0] + (0.755679299741)*x_ref[1]**o + (-0.833030431989)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.697642553584*x[0]**o + (0.927994698324)*x[0] + (-0.370346521844)*x[1]**o + (-0.50084648524)*x[1]
        ref[(0, 1, 1, 1)]=-0.697642553584*x_ref[0]**o + (0.927994698324)*x_ref[0] + (-0.370346521844)*x_ref[1]**o + (-0.50084648524)*x_ref[1]
        arg[(0, 1, 1, 2)]=-0.716808219851*x[0]**o + (0.391617826835)*x[0] + (0.0784293553215)*x[1]**o + (0.253382504884)*x[1]
        ref[(0, 1, 1, 2)]=-0.716808219851*x_ref[0]**o + (0.391617826835)*x_ref[0] + (0.0784293553215)*x_ref[1]**o + (0.253382504884)*x_ref[1]
        arg[(0, 1, 1, 3)]=0.0215326375556*x[0]**o + (-0.477364940129)*x[0] + (-0.0375034503539)*x[1]**o + (-0.513474338856)*x[1]
        ref[(0, 1, 1, 3)]=0.0215326375556*x_ref[0]**o + (-0.477364940129)*x_ref[0] + (-0.0375034503539)*x_ref[1]**o + (-0.513474338856)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.145733672777*x[0]**o + (-0.500938060324)*x[0] + (0.259419070696)*x[1]**o + (-0.72993161716)*x[1]
        ref[(0, 1, 2, 0)]=-0.145733672777*x_ref[0]**o + (-0.500938060324)*x_ref[0] + (0.259419070696)*x_ref[1]**o + (-0.72993161716)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.31061063372*x[0]**o + (0.305157702699)*x[0] + (-0.438563743631)*x[1]**o + (0.0257671634461)*x[1]
        ref[(0, 1, 2, 1)]=0.31061063372*x_ref[0]**o + (0.305157702699)*x_ref[0] + (-0.438563743631)*x_ref[1]**o + (0.0257671634461)*x_ref[1]
        arg[(0, 1, 2, 2)]=0.190749445171*x[0]**o + (0.840683389613)*x[0] + (0.718992945718)*x[1]**o + (0.487440868192)*x[1]
        ref[(0, 1, 2, 2)]=0.190749445171*x_ref[0]**o + (0.840683389613)*x_ref[0] + (0.718992945718)*x_ref[1]**o + (0.487440868192)*x_ref[1]
        arg[(0, 1, 2, 3)]=0.87066155854*x[0]**o + (-0.0296621787944)*x[0] + (0.475891296643)*x[1]**o + (0.393929990327)*x[1]
        ref[(0, 1, 2, 3)]=0.87066155854*x_ref[0]**o + (-0.0296621787944)*x_ref[0] + (0.475891296643)*x_ref[1]**o + (0.393929990327)*x_ref[1]
        arg[(0, 1, 3, 0)]=-0.285269653802*x[0]**o + (-0.895842444793)*x[0] + (-0.0486153895476)*x[1]**o + (0.213942441166)*x[1]
        ref[(0, 1, 3, 0)]=-0.285269653802*x_ref[0]**o + (-0.895842444793)*x_ref[0] + (-0.0486153895476)*x_ref[1]**o + (0.213942441166)*x_ref[1]
        arg[(0, 1, 3, 1)]=-0.498409127637*x[0]**o + (-0.98924606136)*x[0] + (0.138191444027)*x[1]**o + (-0.0349661600913)*x[1]
        ref[(0, 1, 3, 1)]=-0.498409127637*x_ref[0]**o + (-0.98924606136)*x_ref[0] + (0.138191444027)*x_ref[1]**o + (-0.0349661600913)*x_ref[1]
        arg[(0, 1, 3, 2)]=-0.890092397288*x[0]**o + (-0.348726631042)*x[0] + (-0.708165636358)*x[1]**o + (-0.929124842768)*x[1]
        ref[(0, 1, 3, 2)]=-0.890092397288*x_ref[0]**o + (-0.348726631042)*x_ref[0] + (-0.708165636358)*x_ref[1]**o + (-0.929124842768)*x_ref[1]
        arg[(0, 1, 3, 3)]=0.880893701222*x[0]**o + (0.11896628249)*x[0] + (0.145075029848)*x[1]**o + (0.735476662584)*x[1]
        ref[(0, 1, 3, 3)]=0.880893701222*x_ref[0]**o + (0.11896628249)*x_ref[0] + (0.145075029848)*x_ref[1]**o + (0.735476662584)*x_ref[1]
        arg[(0, 2, 0, 0)]=0.784798061148*x[0]**o + (0.340329700016)*x[0] + (0.110170703574)*x[1]**o + (0.173901467503)*x[1]
        ref[(0, 2, 0, 0)]=0.784798061148*x_ref[0]**o + (0.340329700016)*x_ref[0] + (0.110170703574)*x_ref[1]**o + (0.173901467503)*x_ref[1]
        arg[(0, 2, 0, 1)]=-0.13349993533*x[0]**o + (-0.798822154059)*x[0] + (0.71615714387)*x[1]**o + (0.323102831999)*x[1]
        ref[(0, 2, 0, 1)]=-0.13349993533*x_ref[0]**o + (-0.798822154059)*x_ref[0] + (0.71615714387)*x_ref[1]**o + (0.323102831999)*x_ref[1]
        arg[(0, 2, 0, 2)]=0.112752800957*x[0]**o + (0.925577177622)*x[0] + (0.621050333987)*x[1]**o + (-0.535612938493)*x[1]
        ref[(0, 2, 0, 2)]=0.112752800957*x_ref[0]**o + (0.925577177622)*x_ref[0] + (0.621050333987)*x_ref[1]**o + (-0.535612938493)*x_ref[1]
        arg[(0, 2, 0, 3)]=0.83923734692*x[0]**o + (-0.770910838379)*x[0] + (-0.259755435944)*x[1]**o + (0.314994790705)*x[1]
        ref[(0, 2, 0, 3)]=0.83923734692*x_ref[0]**o + (-0.770910838379)*x_ref[0] + (-0.259755435944)*x_ref[1]**o + (0.314994790705)*x_ref[1]
        arg[(0, 2, 1, 0)]=0.454995938279*x[0]**o + (0.975394451463)*x[0] + (0.764430620707)*x[1]**o + (-0.694745949931)*x[1]
        ref[(0, 2, 1, 0)]=0.454995938279*x_ref[0]**o + (0.975394451463)*x_ref[0] + (0.764430620707)*x_ref[1]**o + (-0.694745949931)*x_ref[1]
        arg[(0, 2, 1, 1)]=-0.789797878357*x[0]**o + (0.484925663788)*x[0] + (0.783624272358)*x[1]**o + (-0.67324948976)*x[1]
        ref[(0, 2, 1, 1)]=-0.789797878357*x_ref[0]**o + (0.484925663788)*x_ref[0] + (0.783624272358)*x_ref[1]**o + (-0.67324948976)*x_ref[1]
        arg[(0, 2, 1, 2)]=0.18984127497*x[0]**o + (-0.0297323698347)*x[0] + (-0.551476666883)*x[1]**o + (-0.871322169441)*x[1]
        ref[(0, 2, 1, 2)]=0.18984127497*x_ref[0]**o + (-0.0297323698347)*x_ref[0] + (-0.551476666883)*x_ref[1]**o + (-0.871322169441)*x_ref[1]
        arg[(0, 2, 1, 3)]=-0.730007378359*x[0]**o + (0.973373453776)*x[0] + (-0.726968383802)*x[1]**o + (-0.440441139147)*x[1]
        ref[(0, 2, 1, 3)]=-0.730007378359*x_ref[0]**o + (0.973373453776)*x_ref[0] + (-0.726968383802)*x_ref[1]**o + (-0.440441139147)*x_ref[1]
        arg[(0, 2, 2, 0)]=0.830806948587*x[0]**o + (0.966000121975)*x[0] + (-0.315758414623)*x[1]**o + (-0.908320039817)*x[1]
        ref[(0, 2, 2, 0)]=0.830806948587*x_ref[0]**o + (0.966000121975)*x_ref[0] + (-0.315758414623)*x_ref[1]**o + (-0.908320039817)*x_ref[1]
        arg[(0, 2, 2, 1)]=-0.437453901804*x[0]**o + (0.981718485894)*x[0] + (-0.662915987702)*x[1]**o + (-0.135049704486)*x[1]
        ref[(0, 2, 2, 1)]=-0.437453901804*x_ref[0]**o + (0.981718485894)*x_ref[0] + (-0.662915987702)*x_ref[1]**o + (-0.135049704486)*x_ref[1]
        arg[(0, 2, 2, 2)]=-0.823720591204*x[0]**o + (-0.614809402619)*x[0] + (-0.375366670403)*x[1]**o + (-0.541434565287)*x[1]
        ref[(0, 2, 2, 2)]=-0.823720591204*x_ref[0]**o + (-0.614809402619)*x_ref[0] + (-0.375366670403)*x_ref[1]**o + (-0.541434565287)*x_ref[1]
        arg[(0, 2, 2, 3)]=-0.371646818838*x[0]**o + (0.400614089486)*x[0] + (-0.616165384644)*x[1]**o + (0.0119932420101)*x[1]
        ref[(0, 2, 2, 3)]=-0.371646818838*x_ref[0]**o + (0.400614089486)*x_ref[0] + (-0.616165384644)*x_ref[1]**o + (0.0119932420101)*x_ref[1]
        arg[(0, 2, 3, 0)]=0.179966027364*x[0]**o + (-0.0347928837315)*x[0] + (-0.0797318430898)*x[1]**o + (0.14795994281)*x[1]
        ref[(0, 2, 3, 0)]=0.179966027364*x_ref[0]**o + (-0.0347928837315)*x_ref[0] + (-0.0797318430898)*x_ref[1]**o + (0.14795994281)*x_ref[1]
        arg[(0, 2, 3, 1)]=-0.437523115661*x[0]**o + (0.600622299092)*x[0] + (0.221219620902)*x[1]**o + (0.845701773927)*x[1]
        ref[(0, 2, 3, 1)]=-0.437523115661*x_ref[0]**o + (0.600622299092)*x_ref[0] + (0.221219620902)*x_ref[1]**o + (0.845701773927)*x_ref[1]
        arg[(0, 2, 3, 2)]=-0.793654524923*x[0]**o + (0.41418799772)*x[0] + (0.871802921877)*x[1]**o + (-0.460293678453)*x[1]
        ref[(0, 2, 3, 2)]=-0.793654524923*x_ref[0]**o + (0.41418799772)*x_ref[0] + (0.871802921877)*x_ref[1]**o + (-0.460293678453)*x_ref[1]
        arg[(0, 2, 3, 3)]=-0.19321922568*x[0]**o + (0.634759879072)*x[0] + (-0.598149388192)*x[1]**o + (0.829268232839)*x[1]
        ref[(0, 2, 3, 3)]=-0.19321922568*x_ref[0]**o + (0.634759879072)*x_ref[0] + (-0.598149388192)*x_ref[1]**o + (0.829268232839)*x_ref[1]
        arg[(0, 3, 0, 0)]=0.158240648208*x[0]**o + (-0.171901404662)*x[0] + (0.0149622171579)*x[1]**o + (0.47863380579)*x[1]
        ref[(0, 3, 0, 0)]=0.158240648208*x_ref[0]**o + (-0.171901404662)*x_ref[0] + (0.0149622171579)*x_ref[1]**o + (0.47863380579)*x_ref[1]
        arg[(0, 3, 0, 1)]=-0.470663307112*x[0]**o + (0.0960997829887)*x[0] + (-0.247867837823)*x[1]**o + (-0.986921151304)*x[1]
        ref[(0, 3, 0, 1)]=-0.470663307112*x_ref[0]**o + (0.0960997829887)*x_ref[0] + (-0.247867837823)*x_ref[1]**o + (-0.986921151304)*x_ref[1]
        arg[(0, 3, 0, 2)]=-0.181431024467*x[0]**o + (-0.192589480257)*x[0] + (0.132311972884)*x[1]**o + (-0.921830310575)*x[1]
        ref[(0, 3, 0, 2)]=-0.181431024467*x_ref[0]**o + (-0.192589480257)*x_ref[0] + (0.132311972884)*x_ref[1]**o + (-0.921830310575)*x_ref[1]
        arg[(0, 3, 0, 3)]=-0.64804810138*x[0]**o + (-0.651072311831)*x[0] + (-0.0777247687892)*x[1]**o + (-0.33129132512)*x[1]
        ref[(0, 3, 0, 3)]=-0.64804810138*x_ref[0]**o + (-0.651072311831)*x_ref[0] + (-0.0777247687892)*x_ref[1]**o + (-0.33129132512)*x_ref[1]
        arg[(0, 3, 1, 0)]=0.705587727847*x[0]**o + (0.967352867419)*x[0] + (-0.217424123544)*x[1]**o + (0.153834352827)*x[1]
        ref[(0, 3, 1, 0)]=0.705587727847*x_ref[0]**o + (0.967352867419)*x_ref[0] + (-0.217424123544)*x_ref[1]**o + (0.153834352827)*x_ref[1]
        arg[(0, 3, 1, 1)]=0.745830222129*x[0]**o + (-0.730792320345)*x[0] + (0.132539753898)*x[1]**o + (0.201958306003)*x[1]
        ref[(0, 3, 1, 1)]=0.745830222129*x_ref[0]**o + (-0.730792320345)*x_ref[0] + (0.132539753898)*x_ref[1]**o + (0.201958306003)*x_ref[1]
        arg[(0, 3, 1, 2)]=-0.190551491617*x[0]**o + (-0.461910977236)*x[0] + (0.729413988243)*x[1]**o + (-0.977485103808)*x[1]
        ref[(0, 3, 1, 2)]=-0.190551491617*x_ref[0]**o + (-0.461910977236)*x_ref[0] + (0.729413988243)*x_ref[1]**o + (-0.977485103808)*x_ref[1]
        arg[(0, 3, 1, 3)]=-0.808651382209*x[0]**o + (0.32332352378)*x[0] + (-0.743444163283)*x[1]**o + (0.353739413109)*x[1]
        ref[(0, 3, 1, 3)]=-0.808651382209*x_ref[0]**o + (0.32332352378)*x_ref[0] + (-0.743444163283)*x_ref[1]**o + (0.353739413109)*x_ref[1]
        arg[(0, 3, 2, 0)]=0.876983484281*x[0]**o + (0.86612304997)*x[0] + (-0.0515009561924)*x[1]**o + (0.310063155112)*x[1]
        ref[(0, 3, 2, 0)]=0.876983484281*x_ref[0]**o + (0.86612304997)*x_ref[0] + (-0.0515009561924)*x_ref[1]**o + (0.310063155112)*x_ref[1]
        arg[(0, 3, 2, 1)]=0.979536999084*x[0]**o + (0.204558272487)*x[0] + (0.373043023906)*x[1]**o + (-0.682572506623)*x[1]
        ref[(0, 3, 2, 1)]=0.979536999084*x_ref[0]**o + (0.204558272487)*x_ref[0] + (0.373043023906)*x_ref[1]**o + (-0.682572506623)*x_ref[1]
        arg[(0, 3, 2, 2)]=0.0371018467681*x[0]**o + (-0.658042321625)*x[0] + (-0.368615101983)*x[1]**o + (-0.819645690362)*x[1]
        ref[(0, 3, 2, 2)]=0.0371018467681*x_ref[0]**o + (-0.658042321625)*x_ref[0] + (-0.368615101983)*x_ref[1]**o + (-0.819645690362)*x_ref[1]
        arg[(0, 3, 2, 3)]=-0.315958098351*x[0]**o + (0.0436986379908)*x[0] + (-0.504989663045)*x[1]**o + (0.112350425687)*x[1]
        ref[(0, 3, 2, 3)]=-0.315958098351*x_ref[0]**o + (0.0436986379908)*x_ref[0] + (-0.504989663045)*x_ref[1]**o + (0.112350425687)*x_ref[1]
        arg[(0, 3, 3, 0)]=-0.630275345416*x[0]**o + (0.0511948694402)*x[0] + (0.345135288975)*x[1]**o + (0.0145023526557)*x[1]
        ref[(0, 3, 3, 0)]=-0.630275345416*x_ref[0]**o + (0.0511948694402)*x_ref[0] + (0.345135288975)*x_ref[1]**o + (0.0145023526557)*x_ref[1]
        arg[(0, 3, 3, 1)]=-0.149078414736*x[0]**o + (-0.265512024028)*x[0] + (0.532818882685)*x[1]**o + (0.0435399307039)*x[1]
        ref[(0, 3, 3, 1)]=-0.149078414736*x_ref[0]**o + (-0.265512024028)*x_ref[0] + (0.532818882685)*x_ref[1]**o + (0.0435399307039)*x_ref[1]
        arg[(0, 3, 3, 2)]=0.16956053442*x[0]**o + (-0.894330598486)*x[0] + (-0.976493624448)*x[1]**o + (0.0267129306707)*x[1]
        ref[(0, 3, 3, 2)]=0.16956053442*x_ref[0]**o + (-0.894330598486)*x_ref[0] + (-0.976493624448)*x_ref[1]**o + (0.0267129306707)*x_ref[1]
        arg[(0, 3, 3, 3)]=0.259229100825*x[0]**o + (-0.443609656577)*x[0] + (-0.727940258268)*x[1]**o + (-0.568106828912)*x[1]
        ref[(0, 3, 3, 3)]=0.259229100825*x_ref[0]**o + (-0.443609656577)*x_ref[0] + (-0.727940258268)*x_ref[1]**o + (-0.568106828912)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.655163627566*x[0]**o + (-0.404493408895)*x[0] + (0.0604599943645)*x[1]**o + (-0.085713598334)*x[1]
        ref[(1, 0, 0, 0)]=0.655163627566*x_ref[0]**o + (-0.404493408895)*x_ref[0] + (0.0604599943645)*x_ref[1]**o + (-0.085713598334)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.145239050245*x[0]**o + (0.326978642612)*x[0] + (0.352706204939)*x[1]**o + (-0.295555084486)*x[1]
        ref[(1, 0, 0, 1)]=-0.145239050245*x_ref[0]**o + (0.326978642612)*x_ref[0] + (0.352706204939)*x_ref[1]**o + (-0.295555084486)*x_ref[1]
        arg[(1, 0, 0, 2)]=0.481179213965*x[0]**o + (0.748465900499)*x[0] + (0.484247250265)*x[1]**o + (-0.0305171332943)*x[1]
        ref[(1, 0, 0, 2)]=0.481179213965*x_ref[0]**o + (0.748465900499)*x_ref[0] + (0.484247250265)*x_ref[1]**o + (-0.0305171332943)*x_ref[1]
        arg[(1, 0, 0, 3)]=0.971442914305*x[0]**o + (-0.181154751266)*x[0] + (-0.0283485165827)*x[1]**o + (-0.283468472101)*x[1]
        ref[(1, 0, 0, 3)]=0.971442914305*x_ref[0]**o + (-0.181154751266)*x_ref[0] + (-0.0283485165827)*x_ref[1]**o + (-0.283468472101)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.503350311971*x[0]**o + (-0.790232802854)*x[0] + (-0.979919813041)*x[1]**o + (0.742236031985)*x[1]
        ref[(1, 0, 1, 0)]=-0.503350311971*x_ref[0]**o + (-0.790232802854)*x_ref[0] + (-0.979919813041)*x_ref[1]**o + (0.742236031985)*x_ref[1]
        arg[(1, 0, 1, 1)]=-0.424439454084*x[0]**o + (-0.51202495788)*x[0] + (-0.531315754866)*x[1]**o + (0.43384565536)*x[1]
        ref[(1, 0, 1, 1)]=-0.424439454084*x_ref[0]**o + (-0.51202495788)*x_ref[0] + (-0.531315754866)*x_ref[1]**o + (0.43384565536)*x_ref[1]
        arg[(1, 0, 1, 2)]=0.965269502415*x[0]**o + (-0.0590145990754)*x[0] + (0.0900904922394)*x[1]**o + (0.512720695206)*x[1]
        ref[(1, 0, 1, 2)]=0.965269502415*x_ref[0]**o + (-0.0590145990754)*x_ref[0] + (0.0900904922394)*x_ref[1]**o + (0.512720695206)*x_ref[1]
        arg[(1, 0, 1, 3)]=-0.54687083881*x[0]**o + (0.683621074884)*x[0] + (0.0613885172784)*x[1]**o + (0.887590698841)*x[1]
        ref[(1, 0, 1, 3)]=-0.54687083881*x_ref[0]**o + (0.683621074884)*x_ref[0] + (0.0613885172784)*x_ref[1]**o + (0.887590698841)*x_ref[1]
        arg[(1, 0, 2, 0)]=-0.735180513751*x[0]**o + (-0.187282441272)*x[0] + (0.0792334800205)*x[1]**o + (0.181905686515)*x[1]
        ref[(1, 0, 2, 0)]=-0.735180513751*x_ref[0]**o + (-0.187282441272)*x_ref[0] + (0.0792334800205)*x_ref[1]**o + (0.181905686515)*x_ref[1]
        arg[(1, 0, 2, 1)]=-0.781671654993*x[0]**o + (-0.337851570243)*x[0] + (-0.00997309626989)*x[1]**o + (0.120722899987)*x[1]
        ref[(1, 0, 2, 1)]=-0.781671654993*x_ref[0]**o + (-0.337851570243)*x_ref[0] + (-0.00997309626989)*x_ref[1]**o + (0.120722899987)*x_ref[1]
        arg[(1, 0, 2, 2)]=-0.0303376311413*x[0]**o + (-0.111738676201)*x[0] + (0.313796814864)*x[1]**o + (-0.397850371572)*x[1]
        ref[(1, 0, 2, 2)]=-0.0303376311413*x_ref[0]**o + (-0.111738676201)*x_ref[0] + (0.313796814864)*x_ref[1]**o + (-0.397850371572)*x_ref[1]
        arg[(1, 0, 2, 3)]=0.274958064293*x[0]**o + (0.325133420928)*x[0] + (-0.922041895901)*x[1]**o + (-0.290078668844)*x[1]
        ref[(1, 0, 2, 3)]=0.274958064293*x_ref[0]**o + (0.325133420928)*x_ref[0] + (-0.922041895901)*x_ref[1]**o + (-0.290078668844)*x_ref[1]
        arg[(1, 0, 3, 0)]=0.595015727926*x[0]**o + (0.166145106207)*x[0] + (-0.492480503567)*x[1]**o + (-0.503877997002)*x[1]
        ref[(1, 0, 3, 0)]=0.595015727926*x_ref[0]**o + (0.166145106207)*x_ref[0] + (-0.492480503567)*x_ref[1]**o + (-0.503877997002)*x_ref[1]
        arg[(1, 0, 3, 1)]=0.996476091719*x[0]**o + (0.650901552742)*x[0] + (0.478838622298)*x[1]**o + (0.438621607309)*x[1]
        ref[(1, 0, 3, 1)]=0.996476091719*x_ref[0]**o + (0.650901552742)*x_ref[0] + (0.478838622298)*x_ref[1]**o + (0.438621607309)*x_ref[1]
        arg[(1, 0, 3, 2)]=0.299098807912*x[0]**o + (0.859749086051)*x[0] + (-0.809955048588)*x[1]**o + (-0.756400486771)*x[1]
        ref[(1, 0, 3, 2)]=0.299098807912*x_ref[0]**o + (0.859749086051)*x_ref[0] + (-0.809955048588)*x_ref[1]**o + (-0.756400486771)*x_ref[1]
        arg[(1, 0, 3, 3)]=0.718407991686*x[0]**o + (-0.189472606126)*x[0] + (0.120482177107)*x[1]**o + (-0.128427504541)*x[1]
        ref[(1, 0, 3, 3)]=0.718407991686*x_ref[0]**o + (-0.189472606126)*x_ref[0] + (0.120482177107)*x_ref[1]**o + (-0.128427504541)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.416032840046*x[0]**o + (0.76053601551)*x[0] + (-0.879010127553)*x[1]**o + (-0.0477818280093)*x[1]
        ref[(1, 1, 0, 0)]=-0.416032840046*x_ref[0]**o + (0.76053601551)*x_ref[0] + (-0.879010127553)*x_ref[1]**o + (-0.0477818280093)*x_ref[1]
        arg[(1, 1, 0, 1)]=-0.501315066491*x[0]**o + (0.744035222291)*x[0] + (-0.209390892122)*x[1]**o + (-0.577080617713)*x[1]
        ref[(1, 1, 0, 1)]=-0.501315066491*x_ref[0]**o + (0.744035222291)*x_ref[0] + (-0.209390892122)*x_ref[1]**o + (-0.577080617713)*x_ref[1]
        arg[(1, 1, 0, 2)]=-0.317380263574*x[0]**o + (-0.583852586655)*x[0] + (0.943687716371)*x[1]**o + (-0.960579343203)*x[1]
        ref[(1, 1, 0, 2)]=-0.317380263574*x_ref[0]**o + (-0.583852586655)*x_ref[0] + (0.943687716371)*x_ref[1]**o + (-0.960579343203)*x_ref[1]
        arg[(1, 1, 0, 3)]=0.658754483129*x[0]**o + (-0.904891436074)*x[0] + (-0.988107386359)*x[1]**o + (-0.104117417468)*x[1]
        ref[(1, 1, 0, 3)]=0.658754483129*x_ref[0]**o + (-0.904891436074)*x_ref[0] + (-0.988107386359)*x_ref[1]**o + (-0.104117417468)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.0742156927824*x[0]**o + (0.286626869424)*x[0] + (-0.21224316928)*x[1]**o + (-0.0292440193266)*x[1]
        ref[(1, 1, 1, 0)]=0.0742156927824*x_ref[0]**o + (0.286626869424)*x_ref[0] + (-0.21224316928)*x_ref[1]**o + (-0.0292440193266)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.47314022549*x[0]**o + (-0.99489212546)*x[0] + (-0.376678660934)*x[1]**o + (0.84554776686)*x[1]
        ref[(1, 1, 1, 1)]=0.47314022549*x_ref[0]**o + (-0.99489212546)*x_ref[0] + (-0.376678660934)*x_ref[1]**o + (0.84554776686)*x_ref[1]
        arg[(1, 1, 1, 2)]=0.803448995614*x[0]**o + (0.483577948017)*x[0] + (0.997800275847)*x[1]**o + (0.498643911031)*x[1]
        ref[(1, 1, 1, 2)]=0.803448995614*x_ref[0]**o + (0.483577948017)*x_ref[0] + (0.997800275847)*x_ref[1]**o + (0.498643911031)*x_ref[1]
        arg[(1, 1, 1, 3)]=-0.75946770857*x[0]**o + (-0.0684201185385)*x[0] + (-0.749420958631)*x[1]**o + (-0.908338241363)*x[1]
        ref[(1, 1, 1, 3)]=-0.75946770857*x_ref[0]**o + (-0.0684201185385)*x_ref[0] + (-0.749420958631)*x_ref[1]**o + (-0.908338241363)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.947507976137*x[0]**o + (-0.462555017075)*x[0] + (0.993918736185)*x[1]**o + (-0.658041052537)*x[1]
        ref[(1, 1, 2, 0)]=-0.947507976137*x_ref[0]**o + (-0.462555017075)*x_ref[0] + (0.993918736185)*x_ref[1]**o + (-0.658041052537)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.161024981628*x[0]**o + (0.379349698659)*x[0] + (-0.497903271009)*x[1]**o + (0.927092402532)*x[1]
        ref[(1, 1, 2, 1)]=-0.161024981628*x_ref[0]**o + (0.379349698659)*x_ref[0] + (-0.497903271009)*x_ref[1]**o + (0.927092402532)*x_ref[1]
        arg[(1, 1, 2, 2)]=-0.00026224936615*x[0]**o + (-0.916825831127)*x[0] + (-0.985529831569)*x[1]**o + (-0.661952551416)*x[1]
        ref[(1, 1, 2, 2)]=-0.00026224936615*x_ref[0]**o + (-0.916825831127)*x_ref[0] + (-0.985529831569)*x_ref[1]**o + (-0.661952551416)*x_ref[1]
        arg[(1, 1, 2, 3)]=-0.0569681191797*x[0]**o + (-0.0511989266362)*x[0] + (0.79135636273)*x[1]**o + (-0.722234297086)*x[1]
        ref[(1, 1, 2, 3)]=-0.0569681191797*x_ref[0]**o + (-0.0511989266362)*x_ref[0] + (0.79135636273)*x_ref[1]**o + (-0.722234297086)*x_ref[1]
        arg[(1, 1, 3, 0)]=0.100449487453*x[0]**o + (-0.677297903574)*x[0] + (0.390761751655)*x[1]**o + (0.916689238252)*x[1]
        ref[(1, 1, 3, 0)]=0.100449487453*x_ref[0]**o + (-0.677297903574)*x_ref[0] + (0.390761751655)*x_ref[1]**o + (0.916689238252)*x_ref[1]
        arg[(1, 1, 3, 1)]=0.966719934889*x[0]**o + (-0.652470648337)*x[0] + (-0.210257987081)*x[1]**o + (-0.0175155803916)*x[1]
        ref[(1, 1, 3, 1)]=0.966719934889*x_ref[0]**o + (-0.652470648337)*x_ref[0] + (-0.210257987081)*x_ref[1]**o + (-0.0175155803916)*x_ref[1]
        arg[(1, 1, 3, 2)]=-0.642128503035*x[0]**o + (-0.277133153671)*x[0] + (0.222449232245)*x[1]**o + (-0.788075369934)*x[1]
        ref[(1, 1, 3, 2)]=-0.642128503035*x_ref[0]**o + (-0.277133153671)*x_ref[0] + (0.222449232245)*x_ref[1]**o + (-0.788075369934)*x_ref[1]
        arg[(1, 1, 3, 3)]=-0.961011657297*x[0]**o + (0.211459424636)*x[0] + (-0.945151765711)*x[1]**o + (0.105955118001)*x[1]
        ref[(1, 1, 3, 3)]=-0.961011657297*x_ref[0]**o + (0.211459424636)*x_ref[0] + (-0.945151765711)*x_ref[1]**o + (0.105955118001)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.847809724297*x[0]**o + (-0.937664606067)*x[0] + (-0.930291677262)*x[1]**o + (0.599065642562)*x[1]
        ref[(1, 2, 0, 0)]=-0.847809724297*x_ref[0]**o + (-0.937664606067)*x_ref[0] + (-0.930291677262)*x_ref[1]**o + (0.599065642562)*x_ref[1]
        arg[(1, 2, 0, 1)]=-0.872660244954*x[0]**o + (-0.110835202775)*x[0] + (-0.569941439094)*x[1]**o + (0.772271331826)*x[1]
        ref[(1, 2, 0, 1)]=-0.872660244954*x_ref[0]**o + (-0.110835202775)*x_ref[0] + (-0.569941439094)*x_ref[1]**o + (0.772271331826)*x_ref[1]
        arg[(1, 2, 0, 2)]=0.420143748369*x[0]**o + (0.140722854838)*x[0] + (0.470094015128)*x[1]**o + (-0.0721728221363)*x[1]
        ref[(1, 2, 0, 2)]=0.420143748369*x_ref[0]**o + (0.140722854838)*x_ref[0] + (0.470094015128)*x_ref[1]**o + (-0.0721728221363)*x_ref[1]
        arg[(1, 2, 0, 3)]=0.0718487960631*x[0]**o + (0.490010551209)*x[0] + (0.0830042446179)*x[1]**o + (0.655736709443)*x[1]
        ref[(1, 2, 0, 3)]=0.0718487960631*x_ref[0]**o + (0.490010551209)*x_ref[0] + (0.0830042446179)*x_ref[1]**o + (0.655736709443)*x_ref[1]
        arg[(1, 2, 1, 0)]=-0.290603257787*x[0]**o + (-0.323483966021)*x[0] + (0.269393535501)*x[1]**o + (-0.174915844243)*x[1]
        ref[(1, 2, 1, 0)]=-0.290603257787*x_ref[0]**o + (-0.323483966021)*x_ref[0] + (0.269393535501)*x_ref[1]**o + (-0.174915844243)*x_ref[1]
        arg[(1, 2, 1, 1)]=-0.78652165597*x[0]**o + (0.482895166343)*x[0] + (0.196659659445)*x[1]**o + (0.152202213453)*x[1]
        ref[(1, 2, 1, 1)]=-0.78652165597*x_ref[0]**o + (0.482895166343)*x_ref[0] + (0.196659659445)*x_ref[1]**o + (0.152202213453)*x_ref[1]
        arg[(1, 2, 1, 2)]=-0.710304901902*x[0]**o + (-0.730573158705)*x[0] + (-0.635206676331)*x[1]**o + (-0.712588567299)*x[1]
        ref[(1, 2, 1, 2)]=-0.710304901902*x_ref[0]**o + (-0.730573158705)*x_ref[0] + (-0.635206676331)*x_ref[1]**o + (-0.712588567299)*x_ref[1]
        arg[(1, 2, 1, 3)]=0.357874572329*x[0]**o + (0.803848072116)*x[0] + (-0.962321684728)*x[1]**o + (0.131288175184)*x[1]
        ref[(1, 2, 1, 3)]=0.357874572329*x_ref[0]**o + (0.803848072116)*x_ref[0] + (-0.962321684728)*x_ref[1]**o + (0.131288175184)*x_ref[1]
        arg[(1, 2, 2, 0)]=-0.94633417313*x[0]**o + (0.357152546346)*x[0] + (0.711392958576)*x[1]**o + (0.168880666299)*x[1]
        ref[(1, 2, 2, 0)]=-0.94633417313*x_ref[0]**o + (0.357152546346)*x_ref[0] + (0.711392958576)*x_ref[1]**o + (0.168880666299)*x_ref[1]
        arg[(1, 2, 2, 1)]=-0.876990923068*x[0]**o + (-0.475391710885)*x[0] + (-0.927519014264)*x[1]**o + (0.109810678648)*x[1]
        ref[(1, 2, 2, 1)]=-0.876990923068*x_ref[0]**o + (-0.475391710885)*x_ref[0] + (-0.927519014264)*x_ref[1]**o + (0.109810678648)*x_ref[1]
        arg[(1, 2, 2, 2)]=0.504896284875*x[0]**o + (-0.426204159018)*x[0] + (0.652768607113)*x[1]**o + (0.47605522993)*x[1]
        ref[(1, 2, 2, 2)]=0.504896284875*x_ref[0]**o + (-0.426204159018)*x_ref[0] + (0.652768607113)*x_ref[1]**o + (0.47605522993)*x_ref[1]
        arg[(1, 2, 2, 3)]=-0.232682592644*x[0]**o + (-0.858710281516)*x[0] + (0.388889557056)*x[1]**o + (-0.575812952856)*x[1]
        ref[(1, 2, 2, 3)]=-0.232682592644*x_ref[0]**o + (-0.858710281516)*x_ref[0] + (0.388889557056)*x_ref[1]**o + (-0.575812952856)*x_ref[1]
        arg[(1, 2, 3, 0)]=0.30642985492*x[0]**o + (-0.705884107235)*x[0] + (-0.446218072888)*x[1]**o + (0.328441871891)*x[1]
        ref[(1, 2, 3, 0)]=0.30642985492*x_ref[0]**o + (-0.705884107235)*x_ref[0] + (-0.446218072888)*x_ref[1]**o + (0.328441871891)*x_ref[1]
        arg[(1, 2, 3, 1)]=-0.131716924414*x[0]**o + (0.612097535902)*x[0] + (-0.888123506702)*x[1]**o + (-0.523338312787)*x[1]
        ref[(1, 2, 3, 1)]=-0.131716924414*x_ref[0]**o + (0.612097535902)*x_ref[0] + (-0.888123506702)*x_ref[1]**o + (-0.523338312787)*x_ref[1]
        arg[(1, 2, 3, 2)]=0.31856912146*x[0]**o + (0.227161773315)*x[0] + (0.908669224693)*x[1]**o + (-0.0580144091896)*x[1]
        ref[(1, 2, 3, 2)]=0.31856912146*x_ref[0]**o + (0.227161773315)*x_ref[0] + (0.908669224693)*x_ref[1]**o + (-0.0580144091896)*x_ref[1]
        arg[(1, 2, 3, 3)]=-0.906738513762*x[0]**o + (0.835018129558)*x[0] + (-0.729633324778)*x[1]**o + (0.781325958434)*x[1]
        ref[(1, 2, 3, 3)]=-0.906738513762*x_ref[0]**o + (0.835018129558)*x_ref[0] + (-0.729633324778)*x_ref[1]**o + (0.781325958434)*x_ref[1]
        arg[(1, 3, 0, 0)]=0.0495468161174*x[0]**o + (-0.19852432664)*x[0] + (-0.19478416561)*x[1]**o + (0.677673075728)*x[1]
        ref[(1, 3, 0, 0)]=0.0495468161174*x_ref[0]**o + (-0.19852432664)*x_ref[0] + (-0.19478416561)*x_ref[1]**o + (0.677673075728)*x_ref[1]
        arg[(1, 3, 0, 1)]=-0.20587948699*x[0]**o + (-0.466417133007)*x[0] + (0.752105239698)*x[1]**o + (-0.218546594752)*x[1]
        ref[(1, 3, 0, 1)]=-0.20587948699*x_ref[0]**o + (-0.466417133007)*x_ref[0] + (0.752105239698)*x_ref[1]**o + (-0.218546594752)*x_ref[1]
        arg[(1, 3, 0, 2)]=0.504574933105*x[0]**o + (0.119002389765)*x[0] + (-0.789150278673)*x[1]**o + (-0.83767340658)*x[1]
        ref[(1, 3, 0, 2)]=0.504574933105*x_ref[0]**o + (0.119002389765)*x_ref[0] + (-0.789150278673)*x_ref[1]**o + (-0.83767340658)*x_ref[1]
        arg[(1, 3, 0, 3)]=0.096964176132*x[0]**o + (-0.399591708924)*x[0] + (-0.549808549038)*x[1]**o + (-0.217292841924)*x[1]
        ref[(1, 3, 0, 3)]=0.096964176132*x_ref[0]**o + (-0.399591708924)*x_ref[0] + (-0.549808549038)*x_ref[1]**o + (-0.217292841924)*x_ref[1]
        arg[(1, 3, 1, 0)]=0.71326941241*x[0]**o + (-0.858970795088)*x[0] + (0.910240119172)*x[1]**o + (-0.222432165809)*x[1]
        ref[(1, 3, 1, 0)]=0.71326941241*x_ref[0]**o + (-0.858970795088)*x_ref[0] + (0.910240119172)*x_ref[1]**o + (-0.222432165809)*x_ref[1]
        arg[(1, 3, 1, 1)]=-0.75688013756*x[0]**o + (-0.909975166385)*x[0] + (0.864172662562)*x[1]**o + (0.147114997414)*x[1]
        ref[(1, 3, 1, 1)]=-0.75688013756*x_ref[0]**o + (-0.909975166385)*x_ref[0] + (0.864172662562)*x_ref[1]**o + (0.147114997414)*x_ref[1]
        arg[(1, 3, 1, 2)]=-0.615673973429*x[0]**o + (-0.211627555484)*x[0] + (0.232439197864)*x[1]**o + (-0.882421563841)*x[1]
        ref[(1, 3, 1, 2)]=-0.615673973429*x_ref[0]**o + (-0.211627555484)*x_ref[0] + (0.232439197864)*x_ref[1]**o + (-0.882421563841)*x_ref[1]
        arg[(1, 3, 1, 3)]=-0.409712860661*x[0]**o + (-0.177008729073)*x[0] + (0.286504813605)*x[1]**o + (0.0355677557858)*x[1]
        ref[(1, 3, 1, 3)]=-0.409712860661*x_ref[0]**o + (-0.177008729073)*x_ref[0] + (0.286504813605)*x_ref[1]**o + (0.0355677557858)*x_ref[1]
        arg[(1, 3, 2, 0)]=0.0728493689765*x[0]**o + (-0.957984311524)*x[0] + (0.559919025639)*x[1]**o + (0.77093278647)*x[1]
        ref[(1, 3, 2, 0)]=0.0728493689765*x_ref[0]**o + (-0.957984311524)*x_ref[0] + (0.559919025639)*x_ref[1]**o + (0.77093278647)*x_ref[1]
        arg[(1, 3, 2, 1)]=-0.895002366443*x[0]**o + (0.830197873784)*x[0] + (0.688497027787)*x[1]**o + (0.302037918646)*x[1]
        ref[(1, 3, 2, 1)]=-0.895002366443*x_ref[0]**o + (0.830197873784)*x_ref[0] + (0.688497027787)*x_ref[1]**o + (0.302037918646)*x_ref[1]
        arg[(1, 3, 2, 2)]=-0.102639969388*x[0]**o + (0.13232279409)*x[0] + (0.820367873379)*x[1]**o + (0.637690791536)*x[1]
        ref[(1, 3, 2, 2)]=-0.102639969388*x_ref[0]**o + (0.13232279409)*x_ref[0] + (0.820367873379)*x_ref[1]**o + (0.637690791536)*x_ref[1]
        arg[(1, 3, 2, 3)]=-0.95312711477*x[0]**o + (-0.0275481791599)*x[0] + (0.0448349261447)*x[1]**o + (0.943772299472)*x[1]
        ref[(1, 3, 2, 3)]=-0.95312711477*x_ref[0]**o + (-0.0275481791599)*x_ref[0] + (0.0448349261447)*x_ref[1]**o + (0.943772299472)*x_ref[1]
        arg[(1, 3, 3, 0)]=-0.499299631851*x[0]**o + (-0.403623290668)*x[0] + (0.577833558055)*x[1]**o + (0.613930692831)*x[1]
        ref[(1, 3, 3, 0)]=-0.499299631851*x_ref[0]**o + (-0.403623290668)*x_ref[0] + (0.577833558055)*x_ref[1]**o + (0.613930692831)*x_ref[1]
        arg[(1, 3, 3, 1)]=0.855705068095*x[0]**o + (0.0725120228119)*x[0] + (-0.696509540232)*x[1]**o + (-0.137019039277)*x[1]
        ref[(1, 3, 3, 1)]=0.855705068095*x_ref[0]**o + (0.0725120228119)*x_ref[0] + (-0.696509540232)*x_ref[1]**o + (-0.137019039277)*x_ref[1]
        arg[(1, 3, 3, 2)]=0.081302435473*x[0]**o + (-0.0209652789269)*x[0] + (-0.865757976161)*x[1]**o + (-0.526814989834)*x[1]
        ref[(1, 3, 3, 2)]=0.081302435473*x_ref[0]**o + (-0.0209652789269)*x_ref[0] + (-0.865757976161)*x_ref[1]**o + (-0.526814989834)*x_ref[1]
        arg[(1, 3, 3, 3)]=-0.244950432019*x[0]**o + (0.91726135792)*x[0] + (0.39913232076)*x[1]**o + (-0.626726128782)*x[1]
        ref[(1, 3, 3, 3)]=-0.244950432019*x_ref[0]**o + (0.91726135792)*x_ref[0] + (0.39913232076)*x_ref[1]**o + (-0.626726128782)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.391683574125*x[0]**o + (0.262969685697)*x[0] + (0.527354445399)*x[1]**o + (-0.869340164719)*x[1]
        ref[(2, 0, 0, 0)]=0.391683574125*x_ref[0]**o + (0.262969685697)*x_ref[0] + (0.527354445399)*x_ref[1]**o + (-0.869340164719)*x_ref[1]
        arg[(2, 0, 0, 1)]=-0.53613241993*x[0]**o + (0.161175902828)*x[0] + (-0.143237190964)*x[1]**o + (-0.617525738769)*x[1]
        ref[(2, 0, 0, 1)]=-0.53613241993*x_ref[0]**o + (0.161175902828)*x_ref[0] + (-0.143237190964)*x_ref[1]**o + (-0.617525738769)*x_ref[1]
        arg[(2, 0, 0, 2)]=-0.693158084954*x[0]**o + (0.855548778217)*x[0] + (0.416195926456)*x[1]**o + (0.18523789398)*x[1]
        ref[(2, 0, 0, 2)]=-0.693158084954*x_ref[0]**o + (0.855548778217)*x_ref[0] + (0.416195926456)*x_ref[1]**o + (0.18523789398)*x_ref[1]
        arg[(2, 0, 0, 3)]=-0.536720579627*x[0]**o + (0.302423469281)*x[0] + (0.958402465265)*x[1]**o + (0.177380350136)*x[1]
        ref[(2, 0, 0, 3)]=-0.536720579627*x_ref[0]**o + (0.302423469281)*x_ref[0] + (0.958402465265)*x_ref[1]**o + (0.177380350136)*x_ref[1]
        arg[(2, 0, 1, 0)]=0.933766566456*x[0]**o + (0.633097820346)*x[0] + (0.489155909957)*x[1]**o + (0.422697394102)*x[1]
        ref[(2, 0, 1, 0)]=0.933766566456*x_ref[0]**o + (0.633097820346)*x_ref[0] + (0.489155909957)*x_ref[1]**o + (0.422697394102)*x_ref[1]
        arg[(2, 0, 1, 1)]=-0.765765932719*x[0]**o + (0.134775214909)*x[0] + (0.811129389045)*x[1]**o + (-0.0477234515467)*x[1]
        ref[(2, 0, 1, 1)]=-0.765765932719*x_ref[0]**o + (0.134775214909)*x_ref[0] + (0.811129389045)*x_ref[1]**o + (-0.0477234515467)*x_ref[1]
        arg[(2, 0, 1, 2)]=0.626995690585*x[0]**o + (-0.546876906025)*x[0] + (0.449198544963)*x[1]**o + (0.689089682335)*x[1]
        ref[(2, 0, 1, 2)]=0.626995690585*x_ref[0]**o + (-0.546876906025)*x_ref[0] + (0.449198544963)*x_ref[1]**o + (0.689089682335)*x_ref[1]
        arg[(2, 0, 1, 3)]=-0.536535958516*x[0]**o + (0.541459494769)*x[0] + (0.194425251316)*x[1]**o + (0.997182662471)*x[1]
        ref[(2, 0, 1, 3)]=-0.536535958516*x_ref[0]**o + (0.541459494769)*x_ref[0] + (0.194425251316)*x_ref[1]**o + (0.997182662471)*x_ref[1]
        arg[(2, 0, 2, 0)]=-0.997806643619*x[0]**o + (-0.0872673520441)*x[0] + (0.585858381777)*x[1]**o + (-0.976228158386)*x[1]
        ref[(2, 0, 2, 0)]=-0.997806643619*x_ref[0]**o + (-0.0872673520441)*x_ref[0] + (0.585858381777)*x_ref[1]**o + (-0.976228158386)*x_ref[1]
        arg[(2, 0, 2, 1)]=-0.891017735135*x[0]**o + (0.503146439081)*x[0] + (-0.903596445324)*x[1]**o + (-0.248659779807)*x[1]
        ref[(2, 0, 2, 1)]=-0.891017735135*x_ref[0]**o + (0.503146439081)*x_ref[0] + (-0.903596445324)*x_ref[1]**o + (-0.248659779807)*x_ref[1]
        arg[(2, 0, 2, 2)]=0.679561883965*x[0]**o + (-0.5016019138)*x[0] + (0.599460412941)*x[1]**o + (0.813420226606)*x[1]
        ref[(2, 0, 2, 2)]=0.679561883965*x_ref[0]**o + (-0.5016019138)*x_ref[0] + (0.599460412941)*x_ref[1]**o + (0.813420226606)*x_ref[1]
        arg[(2, 0, 2, 3)]=0.366574396873*x[0]**o + (-0.0534947967465)*x[0] + (0.578191327487)*x[1]**o + (-0.53221847331)*x[1]
        ref[(2, 0, 2, 3)]=0.366574396873*x_ref[0]**o + (-0.0534947967465)*x_ref[0] + (0.578191327487)*x_ref[1]**o + (-0.53221847331)*x_ref[1]
        arg[(2, 0, 3, 0)]=-0.465042558649*x[0]**o + (-0.948458939003)*x[0] + (0.897238578462)*x[1]**o + (-0.622917462149)*x[1]
        ref[(2, 0, 3, 0)]=-0.465042558649*x_ref[0]**o + (-0.948458939003)*x_ref[0] + (0.897238578462)*x_ref[1]**o + (-0.622917462149)*x_ref[1]
        arg[(2, 0, 3, 1)]=-0.128601544746*x[0]**o + (-0.630455941536)*x[0] + (-0.591709348811)*x[1]**o + (-0.226575656799)*x[1]
        ref[(2, 0, 3, 1)]=-0.128601544746*x_ref[0]**o + (-0.630455941536)*x_ref[0] + (-0.591709348811)*x_ref[1]**o + (-0.226575656799)*x_ref[1]
        arg[(2, 0, 3, 2)]=0.922573159675*x[0]**o + (0.508126848867)*x[0] + (-0.967492095631)*x[1]**o + (0.225255032187)*x[1]
        ref[(2, 0, 3, 2)]=0.922573159675*x_ref[0]**o + (0.508126848867)*x_ref[0] + (-0.967492095631)*x_ref[1]**o + (0.225255032187)*x_ref[1]
        arg[(2, 0, 3, 3)]=0.110610492763*x[0]**o + (0.395210126571)*x[0] + (-0.227998549821)*x[1]**o + (0.624327586395)*x[1]
        ref[(2, 0, 3, 3)]=0.110610492763*x_ref[0]**o + (0.395210126571)*x_ref[0] + (-0.227998549821)*x_ref[1]**o + (0.624327586395)*x_ref[1]
        arg[(2, 1, 0, 0)]=0.267050932818*x[0]**o + (0.679195766425)*x[0] + (-0.17677516457)*x[1]**o + (0.752505760252)*x[1]
        ref[(2, 1, 0, 0)]=0.267050932818*x_ref[0]**o + (0.679195766425)*x_ref[0] + (-0.17677516457)*x_ref[1]**o + (0.752505760252)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.267345419339*x[0]**o + (0.878311332634)*x[0] + (-0.680363736104)*x[1]**o + (0.220231559784)*x[1]
        ref[(2, 1, 0, 1)]=0.267345419339*x_ref[0]**o + (0.878311332634)*x_ref[0] + (-0.680363736104)*x_ref[1]**o + (0.220231559784)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.150581662481*x[0]**o + (-0.488751707958)*x[0] + (0.169814610646)*x[1]**o + (0.176059237349)*x[1]
        ref[(2, 1, 0, 2)]=-0.150581662481*x_ref[0]**o + (-0.488751707958)*x_ref[0] + (0.169814610646)*x_ref[1]**o + (0.176059237349)*x_ref[1]
        arg[(2, 1, 0, 3)]=0.249392878188*x[0]**o + (-0.623841300666)*x[0] + (0.559386451582)*x[1]**o + (0.708021551409)*x[1]
        ref[(2, 1, 0, 3)]=0.249392878188*x_ref[0]**o + (-0.623841300666)*x_ref[0] + (0.559386451582)*x_ref[1]**o + (0.708021551409)*x_ref[1]
        arg[(2, 1, 1, 0)]=0.458588181622*x[0]**o + (-0.112354853798)*x[0] + (0.0676502969105)*x[1]**o + (0.389949547124)*x[1]
        ref[(2, 1, 1, 0)]=0.458588181622*x_ref[0]**o + (-0.112354853798)*x_ref[0] + (0.0676502969105)*x_ref[1]**o + (0.389949547124)*x_ref[1]
        arg[(2, 1, 1, 1)]=0.829494707286*x[0]**o + (-0.460584732484)*x[0] + (-0.524752968981)*x[1]**o + (0.244976143587)*x[1]
        ref[(2, 1, 1, 1)]=0.829494707286*x_ref[0]**o + (-0.460584732484)*x_ref[0] + (-0.524752968981)*x_ref[1]**o + (0.244976143587)*x_ref[1]
        arg[(2, 1, 1, 2)]=-0.33607171802*x[0]**o + (-0.727498744813)*x[0] + (-0.0671976004211)*x[1]**o + (0.668853472466)*x[1]
        ref[(2, 1, 1, 2)]=-0.33607171802*x_ref[0]**o + (-0.727498744813)*x_ref[0] + (-0.0671976004211)*x_ref[1]**o + (0.668853472466)*x_ref[1]
        arg[(2, 1, 1, 3)]=-0.575622485379*x[0]**o + (0.56976384966)*x[0] + (-0.660181796827)*x[1]**o + (0.675111786258)*x[1]
        ref[(2, 1, 1, 3)]=-0.575622485379*x_ref[0]**o + (0.56976384966)*x_ref[0] + (-0.660181796827)*x_ref[1]**o + (0.675111786258)*x_ref[1]
        arg[(2, 1, 2, 0)]=0.699323619844*x[0]**o + (0.357740131198)*x[0] + (-0.471829046843)*x[1]**o + (-0.988171928537)*x[1]
        ref[(2, 1, 2, 0)]=0.699323619844*x_ref[0]**o + (0.357740131198)*x_ref[0] + (-0.471829046843)*x_ref[1]**o + (-0.988171928537)*x_ref[1]
        arg[(2, 1, 2, 1)]=0.622346876569*x[0]**o + (-0.217160054474)*x[0] + (0.355668174762)*x[1]**o + (0.142144382331)*x[1]
        ref[(2, 1, 2, 1)]=0.622346876569*x_ref[0]**o + (-0.217160054474)*x_ref[0] + (0.355668174762)*x_ref[1]**o + (0.142144382331)*x_ref[1]
        arg[(2, 1, 2, 2)]=0.702935645422*x[0]**o + (-0.959837032318)*x[0] + (0.690412381811)*x[1]**o + (0.372188291568)*x[1]
        ref[(2, 1, 2, 2)]=0.702935645422*x_ref[0]**o + (-0.959837032318)*x_ref[0] + (0.690412381811)*x_ref[1]**o + (0.372188291568)*x_ref[1]
        arg[(2, 1, 2, 3)]=0.22289110498*x[0]**o + (0.00342009448788)*x[0] + (-0.252573674954)*x[1]**o + (0.544177588676)*x[1]
        ref[(2, 1, 2, 3)]=0.22289110498*x_ref[0]**o + (0.00342009448788)*x_ref[0] + (-0.252573674954)*x_ref[1]**o + (0.544177588676)*x_ref[1]
        arg[(2, 1, 3, 0)]=0.0719632697948*x[0]**o + (0.994751068161)*x[0] + (-0.860116576419)*x[1]**o + (0.0084932688279)*x[1]
        ref[(2, 1, 3, 0)]=0.0719632697948*x_ref[0]**o + (0.994751068161)*x_ref[0] + (-0.860116576419)*x_ref[1]**o + (0.0084932688279)*x_ref[1]
        arg[(2, 1, 3, 1)]=0.0685439798378*x[0]**o + (0.199025429637)*x[0] + (0.962713724727)*x[1]**o + (0.03246226828)*x[1]
        ref[(2, 1, 3, 1)]=0.0685439798378*x_ref[0]**o + (0.199025429637)*x_ref[0] + (0.962713724727)*x_ref[1]**o + (0.03246226828)*x_ref[1]
        arg[(2, 1, 3, 2)]=0.474533647905*x[0]**o + (-0.804905703604)*x[0] + (0.998551774384)*x[1]**o + (0.940233861191)*x[1]
        ref[(2, 1, 3, 2)]=0.474533647905*x_ref[0]**o + (-0.804905703604)*x_ref[0] + (0.998551774384)*x_ref[1]**o + (0.940233861191)*x_ref[1]
        arg[(2, 1, 3, 3)]=0.528987768403*x[0]**o + (-0.311202136182)*x[0] + (0.735392560901)*x[1]**o + (0.475590533395)*x[1]
        ref[(2, 1, 3, 3)]=0.528987768403*x_ref[0]**o + (-0.311202136182)*x_ref[0] + (0.735392560901)*x_ref[1]**o + (0.475590533395)*x_ref[1]
        arg[(2, 2, 0, 0)]=-0.37354608141*x[0]**o + (0.681384224929)*x[0] + (0.452249158464)*x[1]**o + (-0.103535060484)*x[1]
        ref[(2, 2, 0, 0)]=-0.37354608141*x_ref[0]**o + (0.681384224929)*x_ref[0] + (0.452249158464)*x_ref[1]**o + (-0.103535060484)*x_ref[1]
        arg[(2, 2, 0, 1)]=-0.847234291511*x[0]**o + (0.868941019092)*x[0] + (0.680460247189)*x[1]**o + (-0.314387661943)*x[1]
        ref[(2, 2, 0, 1)]=-0.847234291511*x_ref[0]**o + (0.868941019092)*x_ref[0] + (0.680460247189)*x_ref[1]**o + (-0.314387661943)*x_ref[1]
        arg[(2, 2, 0, 2)]=0.469319056335*x[0]**o + (-0.247961641034)*x[0] + (-0.0886342292271)*x[1]**o + (0.639433963322)*x[1]
        ref[(2, 2, 0, 2)]=0.469319056335*x_ref[0]**o + (-0.247961641034)*x_ref[0] + (-0.0886342292271)*x_ref[1]**o + (0.639433963322)*x_ref[1]
        arg[(2, 2, 0, 3)]=0.242018644249*x[0]**o + (0.909034045086)*x[0] + (-0.374419892233)*x[1]**o + (0.202176417312)*x[1]
        ref[(2, 2, 0, 3)]=0.242018644249*x_ref[0]**o + (0.909034045086)*x_ref[0] + (-0.374419892233)*x_ref[1]**o + (0.202176417312)*x_ref[1]
        arg[(2, 2, 1, 0)]=0.641623065372*x[0]**o + (0.180811398183)*x[0] + (-0.993963751654)*x[1]**o + (-0.832041532784)*x[1]
        ref[(2, 2, 1, 0)]=0.641623065372*x_ref[0]**o + (0.180811398183)*x_ref[0] + (-0.993963751654)*x_ref[1]**o + (-0.832041532784)*x_ref[1]
        arg[(2, 2, 1, 1)]=0.201035112863*x[0]**o + (-0.227883170021)*x[0] + (0.144938015166)*x[1]**o + (-0.448544988133)*x[1]
        ref[(2, 2, 1, 1)]=0.201035112863*x_ref[0]**o + (-0.227883170021)*x_ref[0] + (0.144938015166)*x_ref[1]**o + (-0.448544988133)*x_ref[1]
        arg[(2, 2, 1, 2)]=0.471129841838*x[0]**o + (0.862778830852)*x[0] + (0.0811806994844)*x[1]**o + (0.252032214892)*x[1]
        ref[(2, 2, 1, 2)]=0.471129841838*x_ref[0]**o + (0.862778830852)*x_ref[0] + (0.0811806994844)*x_ref[1]**o + (0.252032214892)*x_ref[1]
        arg[(2, 2, 1, 3)]=0.839693453367*x[0]**o + (0.969976059706)*x[0] + (-0.152230500472)*x[1]**o + (-0.807975545463)*x[1]
        ref[(2, 2, 1, 3)]=0.839693453367*x_ref[0]**o + (0.969976059706)*x_ref[0] + (-0.152230500472)*x_ref[1]**o + (-0.807975545463)*x_ref[1]
        arg[(2, 2, 2, 0)]=-0.103787848795*x[0]**o + (0.880923279049)*x[0] + (0.693079261237)*x[1]**o + (-0.102028507294)*x[1]
        ref[(2, 2, 2, 0)]=-0.103787848795*x_ref[0]**o + (0.880923279049)*x_ref[0] + (0.693079261237)*x_ref[1]**o + (-0.102028507294)*x_ref[1]
        arg[(2, 2, 2, 1)]=0.456800817956*x[0]**o + (0.700791428546)*x[0] + (-0.997499767289)*x[1]**o + (0.881319867903)*x[1]
        ref[(2, 2, 2, 1)]=0.456800817956*x_ref[0]**o + (0.700791428546)*x_ref[0] + (-0.997499767289)*x_ref[1]**o + (0.881319867903)*x_ref[1]
        arg[(2, 2, 2, 2)]=0.376549669982*x[0]**o + (-0.083306136882)*x[0] + (-0.337551223025)*x[1]**o + (0.760713333477)*x[1]
        ref[(2, 2, 2, 2)]=0.376549669982*x_ref[0]**o + (-0.083306136882)*x_ref[0] + (-0.337551223025)*x_ref[1]**o + (0.760713333477)*x_ref[1]
        arg[(2, 2, 2, 3)]=0.636750835988*x[0]**o + (0.388498723866)*x[0] + (-0.0613768974692)*x[1]**o + (-0.429785410968)*x[1]
        ref[(2, 2, 2, 3)]=0.636750835988*x_ref[0]**o + (0.388498723866)*x_ref[0] + (-0.0613768974692)*x_ref[1]**o + (-0.429785410968)*x_ref[1]
        arg[(2, 2, 3, 0)]=-0.425409746126*x[0]**o + (-0.346861553304)*x[0] + (-0.831714965464)*x[1]**o + (0.80103051086)*x[1]
        ref[(2, 2, 3, 0)]=-0.425409746126*x_ref[0]**o + (-0.346861553304)*x_ref[0] + (-0.831714965464)*x_ref[1]**o + (0.80103051086)*x_ref[1]
        arg[(2, 2, 3, 1)]=0.94893726665*x[0]**o + (0.165643826028)*x[0] + (0.353103932802)*x[1]**o + (-0.572265749904)*x[1]
        ref[(2, 2, 3, 1)]=0.94893726665*x_ref[0]**o + (0.165643826028)*x_ref[0] + (0.353103932802)*x_ref[1]**o + (-0.572265749904)*x_ref[1]
        arg[(2, 2, 3, 2)]=0.717819718006*x[0]**o + (-0.405755103247)*x[0] + (-0.178367370501)*x[1]**o + (-0.807693670491)*x[1]
        ref[(2, 2, 3, 2)]=0.717819718006*x_ref[0]**o + (-0.405755103247)*x_ref[0] + (-0.178367370501)*x_ref[1]**o + (-0.807693670491)*x_ref[1]
        arg[(2, 2, 3, 3)]=0.785617170856*x[0]**o + (-0.595178382405)*x[0] + (-0.295907528125)*x[1]**o + (0.988639133249)*x[1]
        ref[(2, 2, 3, 3)]=0.785617170856*x_ref[0]**o + (-0.595178382405)*x_ref[0] + (-0.295907528125)*x_ref[1]**o + (0.988639133249)*x_ref[1]
        arg[(2, 3, 0, 0)]=0.226937102482*x[0]**o + (-0.260428633809)*x[0] + (0.961912738351)*x[1]**o + (0.967966738385)*x[1]
        ref[(2, 3, 0, 0)]=0.226937102482*x_ref[0]**o + (-0.260428633809)*x_ref[0] + (0.961912738351)*x_ref[1]**o + (0.967966738385)*x_ref[1]
        arg[(2, 3, 0, 1)]=0.628868846716*x[0]**o + (0.743774135684)*x[0] + (-0.720150591728)*x[1]**o + (-0.867508922256)*x[1]
        ref[(2, 3, 0, 1)]=0.628868846716*x_ref[0]**o + (0.743774135684)*x_ref[0] + (-0.720150591728)*x_ref[1]**o + (-0.867508922256)*x_ref[1]
        arg[(2, 3, 0, 2)]=-0.792198933829*x[0]**o + (0.567849784261)*x[0] + (-0.500489421634)*x[1]**o + (-0.490337388843)*x[1]
        ref[(2, 3, 0, 2)]=-0.792198933829*x_ref[0]**o + (0.567849784261)*x_ref[0] + (-0.500489421634)*x_ref[1]**o + (-0.490337388843)*x_ref[1]
        arg[(2, 3, 0, 3)]=-0.319008522285*x[0]**o + (0.527666753661)*x[0] + (0.715813421051)*x[1]**o + (-0.251286517032)*x[1]
        ref[(2, 3, 0, 3)]=-0.319008522285*x_ref[0]**o + (0.527666753661)*x_ref[0] + (0.715813421051)*x_ref[1]**o + (-0.251286517032)*x_ref[1]
        arg[(2, 3, 1, 0)]=-0.757536947548*x[0]**o + (-0.609109572944)*x[0] + (-0.938388900311)*x[1]**o + (-0.535509284969)*x[1]
        ref[(2, 3, 1, 0)]=-0.757536947548*x_ref[0]**o + (-0.609109572944)*x_ref[0] + (-0.938388900311)*x_ref[1]**o + (-0.535509284969)*x_ref[1]
        arg[(2, 3, 1, 1)]=-0.941578335428*x[0]**o + (0.0709219260653)*x[0] + (-0.0558506836623)*x[1]**o + (-0.981656838609)*x[1]
        ref[(2, 3, 1, 1)]=-0.941578335428*x_ref[0]**o + (0.0709219260653)*x_ref[0] + (-0.0558506836623)*x_ref[1]**o + (-0.981656838609)*x_ref[1]
        arg[(2, 3, 1, 2)]=-0.578106183599*x[0]**o + (-0.926430212909)*x[0] + (0.834978107141)*x[1]**o + (-0.204618037842)*x[1]
        ref[(2, 3, 1, 2)]=-0.578106183599*x_ref[0]**o + (-0.926430212909)*x_ref[0] + (0.834978107141)*x_ref[1]**o + (-0.204618037842)*x_ref[1]
        arg[(2, 3, 1, 3)]=0.096782901622*x[0]**o + (-0.6115004319)*x[0] + (-0.0909851120879)*x[1]**o + (0.443918176848)*x[1]
        ref[(2, 3, 1, 3)]=0.096782901622*x_ref[0]**o + (-0.6115004319)*x_ref[0] + (-0.0909851120879)*x_ref[1]**o + (0.443918176848)*x_ref[1]
        arg[(2, 3, 2, 0)]=0.288544453609*x[0]**o + (0.143833537972)*x[0] + (0.77598129855)*x[1]**o + (0.87472465685)*x[1]
        ref[(2, 3, 2, 0)]=0.288544453609*x_ref[0]**o + (0.143833537972)*x_ref[0] + (0.77598129855)*x_ref[1]**o + (0.87472465685)*x_ref[1]
        arg[(2, 3, 2, 1)]=0.740132887404*x[0]**o + (-0.392853409551)*x[0] + (0.991923860094)*x[1]**o + (-0.463979137948)*x[1]
        ref[(2, 3, 2, 1)]=0.740132887404*x_ref[0]**o + (-0.392853409551)*x_ref[0] + (0.991923860094)*x_ref[1]**o + (-0.463979137948)*x_ref[1]
        arg[(2, 3, 2, 2)]=-0.99608624212*x[0]**o + (-0.63193468569)*x[0] + (-0.350876036269)*x[1]**o + (-0.217809780019)*x[1]
        ref[(2, 3, 2, 2)]=-0.99608624212*x_ref[0]**o + (-0.63193468569)*x_ref[0] + (-0.350876036269)*x_ref[1]**o + (-0.217809780019)*x_ref[1]
        arg[(2, 3, 2, 3)]=-0.180267754196*x[0]**o + (0.0615722685339)*x[0] + (-0.935452748475)*x[1]**o + (0.104150342401)*x[1]
        ref[(2, 3, 2, 3)]=-0.180267754196*x_ref[0]**o + (0.0615722685339)*x_ref[0] + (-0.935452748475)*x_ref[1]**o + (0.104150342401)*x_ref[1]
        arg[(2, 3, 3, 0)]=0.203765496251*x[0]**o + (-0.662939138944)*x[0] + (0.815872128188)*x[1]**o + (0.444709063918)*x[1]
        ref[(2, 3, 3, 0)]=0.203765496251*x_ref[0]**o + (-0.662939138944)*x_ref[0] + (0.815872128188)*x_ref[1]**o + (0.444709063918)*x_ref[1]
        arg[(2, 3, 3, 1)]=-0.909271930873*x[0]**o + (-0.146940208248)*x[0] + (0.450011189177)*x[1]**o + (0.58872755849)*x[1]
        ref[(2, 3, 3, 1)]=-0.909271930873*x_ref[0]**o + (-0.146940208248)*x_ref[0] + (0.450011189177)*x_ref[1]**o + (0.58872755849)*x_ref[1]
        arg[(2, 3, 3, 2)]=-0.248520383626*x[0]**o + (0.0921523886371)*x[0] + (0.785623410031)*x[1]**o + (-0.25184297655)*x[1]
        ref[(2, 3, 3, 2)]=-0.248520383626*x_ref[0]**o + (0.0921523886371)*x_ref[0] + (0.785623410031)*x_ref[1]**o + (-0.25184297655)*x_ref[1]
        arg[(2, 3, 3, 3)]=0.281676850158*x[0]**o + (0.291224287137)*x[0] + (-0.621504748577)*x[1]**o + (0.345111929357)*x[1]
        ref[(2, 3, 3, 3)]=0.281676850158*x_ref[0]**o + (0.291224287137)*x_ref[0] + (-0.621504748577)*x_ref[1]**o + (0.345111929357)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.979749862346*x[2]**o + (0.232371662779)*x[2]
            ref[(0, 0, 0, 0)]+=-0.979749862346*x_ref[2]**o + (0.232371662779)*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.377345556904*x[2]**o + (0.60931425016)*x[2]
            ref[(0, 0, 0, 1)]+=0.377345556904*x_ref[2]**o + (0.60931425016)*x_ref[2]
            arg[(0, 0, 0, 2)]+=-0.861046179577*x[2]**o + (-0.647362523834)*x[2]
            ref[(0, 0, 0, 2)]+=-0.861046179577*x_ref[2]**o + (-0.647362523834)*x_ref[2]
            arg[(0, 0, 0, 3)]+=0.28385030429*x[2]**o + (0.356978732444)*x[2]
            ref[(0, 0, 0, 3)]+=0.28385030429*x_ref[2]**o + (0.356978732444)*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.591275491051*x[2]**o + (0.135554013294)*x[2]
            ref[(0, 0, 1, 0)]+=-0.591275491051*x_ref[2]**o + (0.135554013294)*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.226470085352*x[2]**o + (0.938442463169)*x[2]
            ref[(0, 0, 1, 1)]+=0.226470085352*x_ref[2]**o + (0.938442463169)*x_ref[2]
            arg[(0, 0, 1, 2)]+=0.346321780672*x[2]**o + (0.9295042962)*x[2]
            ref[(0, 0, 1, 2)]+=0.346321780672*x_ref[2]**o + (0.9295042962)*x_ref[2]
            arg[(0, 0, 1, 3)]+=-0.493015113474*x[2]**o + (0.782458395286)*x[2]
            ref[(0, 0, 1, 3)]+=-0.493015113474*x_ref[2]**o + (0.782458395286)*x_ref[2]
            arg[(0, 0, 2, 0)]+=0.132318445858*x[2]**o + (-0.36355587273)*x[2]
            ref[(0, 0, 2, 0)]+=0.132318445858*x_ref[2]**o + (-0.36355587273)*x_ref[2]
            arg[(0, 0, 2, 1)]+=-0.569394666015*x[2]**o + (-0.668904051797)*x[2]
            ref[(0, 0, 2, 1)]+=-0.569394666015*x_ref[2]**o + (-0.668904051797)*x_ref[2]
            arg[(0, 0, 2, 2)]+=-0.639135894373*x[2]**o + (-0.44321687337)*x[2]
            ref[(0, 0, 2, 2)]+=-0.639135894373*x_ref[2]**o + (-0.44321687337)*x_ref[2]
            arg[(0, 0, 2, 3)]+=0.229900942275*x[2]**o + (-0.82231962311)*x[2]
            ref[(0, 0, 2, 3)]+=0.229900942275*x_ref[2]**o + (-0.82231962311)*x_ref[2]
            arg[(0, 0, 3, 0)]+=0.345236610772*x[2]**o + (-0.363815581833)*x[2]
            ref[(0, 0, 3, 0)]+=0.345236610772*x_ref[2]**o + (-0.363815581833)*x_ref[2]
            arg[(0, 0, 3, 1)]+=0.138769274183*x[2]**o + (0.827470433911)*x[2]
            ref[(0, 0, 3, 1)]+=0.138769274183*x_ref[2]**o + (0.827470433911)*x_ref[2]
            arg[(0, 0, 3, 2)]+=-0.496240590752*x[2]**o + (-0.319422949903)*x[2]
            ref[(0, 0, 3, 2)]+=-0.496240590752*x_ref[2]**o + (-0.319422949903)*x_ref[2]
            arg[(0, 0, 3, 3)]+=0.378405297446*x[2]**o + (0.352878671032)*x[2]
            ref[(0, 0, 3, 3)]+=0.378405297446*x_ref[2]**o + (0.352878671032)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.790108199966*x[2]**o + (0.288475896759)*x[2]
            ref[(0, 1, 0, 0)]+=-0.790108199966*x_ref[2]**o + (0.288475896759)*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.739424430823*x[2]**o + (-0.583867240697)*x[2]
            ref[(0, 1, 0, 1)]+=-0.739424430823*x_ref[2]**o + (-0.583867240697)*x_ref[2]
            arg[(0, 1, 0, 2)]+=0.444202894778*x[2]**o + (-0.904395353004)*x[2]
            ref[(0, 1, 0, 2)]+=0.444202894778*x_ref[2]**o + (-0.904395353004)*x_ref[2]
            arg[(0, 1, 0, 3)]+=-0.916286941016*x[2]**o + (-0.963193155007)*x[2]
            ref[(0, 1, 0, 3)]+=-0.916286941016*x_ref[2]**o + (-0.963193155007)*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.51264957979*x[2]**o + (0.865025701488)*x[2]
            ref[(0, 1, 1, 0)]+=0.51264957979*x_ref[2]**o + (0.865025701488)*x_ref[2]
            arg[(0, 1, 1, 1)]+=0.60237402117*x[2]**o + (0.845997452898)*x[2]
            ref[(0, 1, 1, 1)]+=0.60237402117*x_ref[2]**o + (0.845997452898)*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.792811180104*x[2]**o + (-0.702142682436)*x[2]
            ref[(0, 1, 1, 2)]+=0.792811180104*x_ref[2]**o + (-0.702142682436)*x_ref[2]
            arg[(0, 1, 1, 3)]+=0.791681288768*x[2]**o + (-0.0830487142795)*x[2]
            ref[(0, 1, 1, 3)]+=0.791681288768*x_ref[2]**o + (-0.0830487142795)*x_ref[2]
            arg[(0, 1, 2, 0)]+=0.724060530856*x[2]**o + (0.29264621425)*x[2]
            ref[(0, 1, 2, 0)]+=0.724060530856*x_ref[2]**o + (0.29264621425)*x_ref[2]
            arg[(0, 1, 2, 1)]+=-0.652430527025*x[2]**o + (-0.284494224229)*x[2]
            ref[(0, 1, 2, 1)]+=-0.652430527025*x_ref[2]**o + (-0.284494224229)*x_ref[2]
            arg[(0, 1, 2, 2)]+=-0.365664174894*x[2]**o + (0.408329649004)*x[2]
            ref[(0, 1, 2, 2)]+=-0.365664174894*x_ref[2]**o + (0.408329649004)*x_ref[2]
            arg[(0, 1, 2, 3)]+=0.746717423165*x[2]**o + (0.938463722772)*x[2]
            ref[(0, 1, 2, 3)]+=0.746717423165*x_ref[2]**o + (0.938463722772)*x_ref[2]
            arg[(0, 1, 3, 0)]+=0.337223834137*x[2]**o + (0.963850642951)*x[2]
            ref[(0, 1, 3, 0)]+=0.337223834137*x_ref[2]**o + (0.963850642951)*x_ref[2]
            arg[(0, 1, 3, 1)]+=0.943295268467*x[2]**o + (-0.107349067624)*x[2]
            ref[(0, 1, 3, 1)]+=0.943295268467*x_ref[2]**o + (-0.107349067624)*x_ref[2]
            arg[(0, 1, 3, 2)]+=-0.0446507917715*x[2]**o + (0.307385281136)*x[2]
            ref[(0, 1, 3, 2)]+=-0.0446507917715*x_ref[2]**o + (0.307385281136)*x_ref[2]
            arg[(0, 1, 3, 3)]+=-0.387366142328*x[2]**o + (-0.753512171008)*x[2]
            ref[(0, 1, 3, 3)]+=-0.387366142328*x_ref[2]**o + (-0.753512171008)*x_ref[2]
            arg[(0, 2, 0, 0)]+=-0.512010095308*x[2]**o + (-0.554558711403)*x[2]
            ref[(0, 2, 0, 0)]+=-0.512010095308*x_ref[2]**o + (-0.554558711403)*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.699939784986*x[2]**o + (0.103682977079)*x[2]
            ref[(0, 2, 0, 1)]+=-0.699939784986*x_ref[2]**o + (0.103682977079)*x_ref[2]
            arg[(0, 2, 0, 2)]+=-0.245694764054*x[2]**o + (0.230900013285)*x[2]
            ref[(0, 2, 0, 2)]+=-0.245694764054*x_ref[2]**o + (0.230900013285)*x_ref[2]
            arg[(0, 2, 0, 3)]+=-0.189415698612*x[2]**o + (-0.196084256604)*x[2]
            ref[(0, 2, 0, 3)]+=-0.189415698612*x_ref[2]**o + (-0.196084256604)*x_ref[2]
            arg[(0, 2, 1, 0)]+=0.78318413592*x[2]**o + (0.0025810483082)*x[2]
            ref[(0, 2, 1, 0)]+=0.78318413592*x_ref[2]**o + (0.0025810483082)*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.754811176825*x[2]**o + (0.198014017339)*x[2]
            ref[(0, 2, 1, 1)]+=-0.754811176825*x_ref[2]**o + (0.198014017339)*x_ref[2]
            arg[(0, 2, 1, 2)]+=-0.858796911247*x[2]**o + (0.54474740197)*x[2]
            ref[(0, 2, 1, 2)]+=-0.858796911247*x_ref[2]**o + (0.54474740197)*x_ref[2]
            arg[(0, 2, 1, 3)]+=0.674019939728*x[2]**o + (0.336672794305)*x[2]
            ref[(0, 2, 1, 3)]+=0.674019939728*x_ref[2]**o + (0.336672794305)*x_ref[2]
            arg[(0, 2, 2, 0)]+=-0.626170271667*x[2]**o + (0.217500184963)*x[2]
            ref[(0, 2, 2, 0)]+=-0.626170271667*x_ref[2]**o + (0.217500184963)*x_ref[2]
            arg[(0, 2, 2, 1)]+=0.0182065544497*x[2]**o + (-0.352045582363)*x[2]
            ref[(0, 2, 2, 1)]+=0.0182065544497*x_ref[2]**o + (-0.352045582363)*x_ref[2]
            arg[(0, 2, 2, 2)]+=0.413128423124*x[2]**o + (0.443580229414)*x[2]
            ref[(0, 2, 2, 2)]+=0.413128423124*x_ref[2]**o + (0.443580229414)*x_ref[2]
            arg[(0, 2, 2, 3)]+=0.822067987385*x[2]**o + (-0.435225201501)*x[2]
            ref[(0, 2, 2, 3)]+=0.822067987385*x_ref[2]**o + (-0.435225201501)*x_ref[2]
            arg[(0, 2, 3, 0)]+=0.886313268798*x[2]**o + (0.414160400688)*x[2]
            ref[(0, 2, 3, 0)]+=0.886313268798*x_ref[2]**o + (0.414160400688)*x_ref[2]
            arg[(0, 2, 3, 1)]+=0.39266211501*x[2]**o + (0.00489039785927)*x[2]
            ref[(0, 2, 3, 1)]+=0.39266211501*x_ref[2]**o + (0.00489039785927)*x_ref[2]
            arg[(0, 2, 3, 2)]+=0.728365721104*x[2]**o + (0.00452778573103)*x[2]
            ref[(0, 2, 3, 2)]+=0.728365721104*x_ref[2]**o + (0.00452778573103)*x_ref[2]
            arg[(0, 2, 3, 3)]+=0.595393191697*x[2]**o + (-0.336624582855)*x[2]
            ref[(0, 2, 3, 3)]+=0.595393191697*x_ref[2]**o + (-0.336624582855)*x_ref[2]
            arg[(0, 3, 0, 0)]+=-0.804637313168*x[2]**o + (0.929924471004)*x[2]
            ref[(0, 3, 0, 0)]+=-0.804637313168*x_ref[2]**o + (0.929924471004)*x_ref[2]
            arg[(0, 3, 0, 1)]+=0.408133071686*x[2]**o + (0.328548655886)*x[2]
            ref[(0, 3, 0, 1)]+=0.408133071686*x_ref[2]**o + (0.328548655886)*x_ref[2]
            arg[(0, 3, 0, 2)]+=-0.624129184642*x[2]**o + (-0.354523473178)*x[2]
            ref[(0, 3, 0, 2)]+=-0.624129184642*x_ref[2]**o + (-0.354523473178)*x_ref[2]
            arg[(0, 3, 0, 3)]+=0.627756453023*x[2]**o + (-0.0597291924237)*x[2]
            ref[(0, 3, 0, 3)]+=0.627756453023*x_ref[2]**o + (-0.0597291924237)*x_ref[2]
            arg[(0, 3, 1, 0)]+=-0.905306665435*x[2]**o + (0.724656998469)*x[2]
            ref[(0, 3, 1, 0)]+=-0.905306665435*x_ref[2]**o + (0.724656998469)*x_ref[2]
            arg[(0, 3, 1, 1)]+=0.397880833675*x[2]**o + (-0.78488705228)*x[2]
            ref[(0, 3, 1, 1)]+=0.397880833675*x_ref[2]**o + (-0.78488705228)*x_ref[2]
            arg[(0, 3, 1, 2)]+=0.542407074351*x[2]**o + (-0.0697760008893)*x[2]
            ref[(0, 3, 1, 2)]+=0.542407074351*x_ref[2]**o + (-0.0697760008893)*x_ref[2]
            arg[(0, 3, 1, 3)]+=-0.746008096606*x[2]**o + (-0.33984175679)*x[2]
            ref[(0, 3, 1, 3)]+=-0.746008096606*x_ref[2]**o + (-0.33984175679)*x_ref[2]
            arg[(0, 3, 2, 0)]+=-0.661959737669*x[2]**o + (-0.583135622256)*x[2]
            ref[(0, 3, 2, 0)]+=-0.661959737669*x_ref[2]**o + (-0.583135622256)*x_ref[2]
            arg[(0, 3, 2, 1)]+=-0.158620523328*x[2]**o + (0.39506703001)*x[2]
            ref[(0, 3, 2, 1)]+=-0.158620523328*x_ref[2]**o + (0.39506703001)*x_ref[2]
            arg[(0, 3, 2, 2)]+=-0.965876368851*x[2]**o + (0.254467212413)*x[2]
            ref[(0, 3, 2, 2)]+=-0.965876368851*x_ref[2]**o + (0.254467212413)*x_ref[2]
            arg[(0, 3, 2, 3)]+=0.612566021771*x[2]**o + (-0.673342561835)*x[2]
            ref[(0, 3, 2, 3)]+=0.612566021771*x_ref[2]**o + (-0.673342561835)*x_ref[2]
            arg[(0, 3, 3, 0)]+=-0.410930923126*x[2]**o + (-0.0291863933966)*x[2]
            ref[(0, 3, 3, 0)]+=-0.410930923126*x_ref[2]**o + (-0.0291863933966)*x_ref[2]
            arg[(0, 3, 3, 1)]+=-0.181836981542*x[2]**o + (0.26122732469)*x[2]
            ref[(0, 3, 3, 1)]+=-0.181836981542*x_ref[2]**o + (0.26122732469)*x_ref[2]
            arg[(0, 3, 3, 2)]+=0.494887239376*x[2]**o + (0.760946913249)*x[2]
            ref[(0, 3, 3, 2)]+=0.494887239376*x_ref[2]**o + (0.760946913249)*x_ref[2]
            arg[(0, 3, 3, 3)]+=-0.565363506578*x[2]**o + (-0.0628392725269)*x[2]
            ref[(0, 3, 3, 3)]+=-0.565363506578*x_ref[2]**o + (-0.0628392725269)*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.842164837989*x[2]**o + (0.833242470222)*x[2]
            ref[(1, 0, 0, 0)]+=0.842164837989*x_ref[2]**o + (0.833242470222)*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.0708254069943*x[2]**o + (0.0271796882746)*x[2]
            ref[(1, 0, 0, 1)]+=-0.0708254069943*x_ref[2]**o + (0.0271796882746)*x_ref[2]
            arg[(1, 0, 0, 2)]+=0.826453282205*x[2]**o + (0.363303006777)*x[2]
            ref[(1, 0, 0, 2)]+=0.826453282205*x_ref[2]**o + (0.363303006777)*x_ref[2]
            arg[(1, 0, 0, 3)]+=-0.771935518806*x[2]**o + (0.202287987853)*x[2]
            ref[(1, 0, 0, 3)]+=-0.771935518806*x_ref[2]**o + (0.202287987853)*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.416987294993*x[2]**o + (-0.723742070812)*x[2]
            ref[(1, 0, 1, 0)]+=-0.416987294993*x_ref[2]**o + (-0.723742070812)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.147939402066*x[2]**o + (-0.0316395368298)*x[2]
            ref[(1, 0, 1, 1)]+=-0.147939402066*x_ref[2]**o + (-0.0316395368298)*x_ref[2]
            arg[(1, 0, 1, 2)]+=-0.354658957726*x[2]**o + (-0.266708773697)*x[2]
            ref[(1, 0, 1, 2)]+=-0.354658957726*x_ref[2]**o + (-0.266708773697)*x_ref[2]
            arg[(1, 0, 1, 3)]+=0.2359461226*x[2]**o + (0.777089319)*x[2]
            ref[(1, 0, 1, 3)]+=0.2359461226*x_ref[2]**o + (0.777089319)*x_ref[2]
            arg[(1, 0, 2, 0)]+=0.707713653489*x[2]**o + (-0.260380640371)*x[2]
            ref[(1, 0, 2, 0)]+=0.707713653489*x_ref[2]**o + (-0.260380640371)*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.805888116603*x[2]**o + (0.919693996081)*x[2]
            ref[(1, 0, 2, 1)]+=0.805888116603*x_ref[2]**o + (0.919693996081)*x_ref[2]
            arg[(1, 0, 2, 2)]+=-0.398199290459*x[2]**o + (0.549719659304)*x[2]
            ref[(1, 0, 2, 2)]+=-0.398199290459*x_ref[2]**o + (0.549719659304)*x_ref[2]
            arg[(1, 0, 2, 3)]+=-0.814142108707*x[2]**o + (-0.439831585488)*x[2]
            ref[(1, 0, 2, 3)]+=-0.814142108707*x_ref[2]**o + (-0.439831585488)*x_ref[2]
            arg[(1, 0, 3, 0)]+=-0.383274897309*x[2]**o + (-0.522273166533)*x[2]
            ref[(1, 0, 3, 0)]+=-0.383274897309*x_ref[2]**o + (-0.522273166533)*x_ref[2]
            arg[(1, 0, 3, 1)]+=0.0185427032767*x[2]**o + (0.555859772274)*x[2]
            ref[(1, 0, 3, 1)]+=0.0185427032767*x_ref[2]**o + (0.555859772274)*x_ref[2]
            arg[(1, 0, 3, 2)]+=0.155844991524*x[2]**o + (0.68955480633)*x[2]
            ref[(1, 0, 3, 2)]+=0.155844991524*x_ref[2]**o + (0.68955480633)*x_ref[2]
            arg[(1, 0, 3, 3)]+=0.839367443176*x[2]**o + (-0.783379659305)*x[2]
            ref[(1, 0, 3, 3)]+=0.839367443176*x_ref[2]**o + (-0.783379659305)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.909119897235*x[2]**o + (-0.869636808844)*x[2]
            ref[(1, 1, 0, 0)]+=0.909119897235*x_ref[2]**o + (-0.869636808844)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.972648625835*x[2]**o + (0.90726939182)*x[2]
            ref[(1, 1, 0, 1)]+=0.972648625835*x_ref[2]**o + (0.90726939182)*x_ref[2]
            arg[(1, 1, 0, 2)]+=0.761690162259*x[2]**o + (-0.315493810618)*x[2]
            ref[(1, 1, 0, 2)]+=0.761690162259*x_ref[2]**o + (-0.315493810618)*x_ref[2]
            arg[(1, 1, 0, 3)]+=0.0673419464082*x[2]**o + (0.670188269499)*x[2]
            ref[(1, 1, 0, 3)]+=0.0673419464082*x_ref[2]**o + (0.670188269499)*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.72593628976*x[2]**o + (0.517142443839)*x[2]
            ref[(1, 1, 1, 0)]+=0.72593628976*x_ref[2]**o + (0.517142443839)*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.800560123895*x[2]**o + (-0.540525440989)*x[2]
            ref[(1, 1, 1, 1)]+=0.800560123895*x_ref[2]**o + (-0.540525440989)*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.675004786516*x[2]**o + (0.953167786917)*x[2]
            ref[(1, 1, 1, 2)]+=-0.675004786516*x_ref[2]**o + (0.953167786917)*x_ref[2]
            arg[(1, 1, 1, 3)]+=-0.719643795414*x[2]**o + (-0.439197318489)*x[2]
            ref[(1, 1, 1, 3)]+=-0.719643795414*x_ref[2]**o + (-0.439197318489)*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.799426714109*x[2]**o + (-0.890922281337)*x[2]
            ref[(1, 1, 2, 0)]+=-0.799426714109*x_ref[2]**o + (-0.890922281337)*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.113753511819*x[2]**o + (-0.72257383747)*x[2]
            ref[(1, 1, 2, 1)]+=0.113753511819*x_ref[2]**o + (-0.72257383747)*x_ref[2]
            arg[(1, 1, 2, 2)]+=-0.643964998994*x[2]**o + (0.514529241441)*x[2]
            ref[(1, 1, 2, 2)]+=-0.643964998994*x_ref[2]**o + (0.514529241441)*x_ref[2]
            arg[(1, 1, 2, 3)]+=-0.0546526774068*x[2]**o + (0.851742778744)*x[2]
            ref[(1, 1, 2, 3)]+=-0.0546526774068*x_ref[2]**o + (0.851742778744)*x_ref[2]
            arg[(1, 1, 3, 0)]+=-0.0152656189517*x[2]**o + (-0.590046419243)*x[2]
            ref[(1, 1, 3, 0)]+=-0.0152656189517*x_ref[2]**o + (-0.590046419243)*x_ref[2]
            arg[(1, 1, 3, 1)]+=-0.303447050808*x[2]**o + (-0.324874463487)*x[2]
            ref[(1, 1, 3, 1)]+=-0.303447050808*x_ref[2]**o + (-0.324874463487)*x_ref[2]
            arg[(1, 1, 3, 2)]+=-0.332297649714*x[2]**o + (0.17089615529)*x[2]
            ref[(1, 1, 3, 2)]+=-0.332297649714*x_ref[2]**o + (0.17089615529)*x_ref[2]
            arg[(1, 1, 3, 3)]+=0.781094620582*x[2]**o + (0.164866050899)*x[2]
            ref[(1, 1, 3, 3)]+=0.781094620582*x_ref[2]**o + (0.164866050899)*x_ref[2]
            arg[(1, 2, 0, 0)]+=0.0333935026268*x[2]**o + (-0.393690928645)*x[2]
            ref[(1, 2, 0, 0)]+=0.0333935026268*x_ref[2]**o + (-0.393690928645)*x_ref[2]
            arg[(1, 2, 0, 1)]+=-0.536101421348*x[2]**o + (-0.982732537224)*x[2]
            ref[(1, 2, 0, 1)]+=-0.536101421348*x_ref[2]**o + (-0.982732537224)*x_ref[2]
            arg[(1, 2, 0, 2)]+=-0.250118567548*x[2]**o + (0.212034362304)*x[2]
            ref[(1, 2, 0, 2)]+=-0.250118567548*x_ref[2]**o + (0.212034362304)*x_ref[2]
            arg[(1, 2, 0, 3)]+=0.281792783581*x[2]**o + (-0.176535083088)*x[2]
            ref[(1, 2, 0, 3)]+=0.281792783581*x_ref[2]**o + (-0.176535083088)*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.530111482071*x[2]**o + (-0.669470832186)*x[2]
            ref[(1, 2, 1, 0)]+=0.530111482071*x_ref[2]**o + (-0.669470832186)*x_ref[2]
            arg[(1, 2, 1, 1)]+=-0.479120504198*x[2]**o + (0.938995173557)*x[2]
            ref[(1, 2, 1, 1)]+=-0.479120504198*x_ref[2]**o + (0.938995173557)*x_ref[2]
            arg[(1, 2, 1, 2)]+=0.327298154391*x[2]**o + (0.265768280591)*x[2]
            ref[(1, 2, 1, 2)]+=0.327298154391*x_ref[2]**o + (0.265768280591)*x_ref[2]
            arg[(1, 2, 1, 3)]+=-0.491359532922*x[2]**o + (0.096711326645)*x[2]
            ref[(1, 2, 1, 3)]+=-0.491359532922*x_ref[2]**o + (0.096711326645)*x_ref[2]
            arg[(1, 2, 2, 0)]+=-0.494663445642*x[2]**o + (-0.130237389515)*x[2]
            ref[(1, 2, 2, 0)]+=-0.494663445642*x_ref[2]**o + (-0.130237389515)*x_ref[2]
            arg[(1, 2, 2, 1)]+=0.874123302668*x[2]**o + (-0.76841789272)*x[2]
            ref[(1, 2, 2, 1)]+=0.874123302668*x_ref[2]**o + (-0.76841789272)*x_ref[2]
            arg[(1, 2, 2, 2)]+=-0.990837660766*x[2]**o + (-0.931634112077)*x[2]
            ref[(1, 2, 2, 2)]+=-0.990837660766*x_ref[2]**o + (-0.931634112077)*x_ref[2]
            arg[(1, 2, 2, 3)]+=0.383287829182*x[2]**o + (-0.186045233861)*x[2]
            ref[(1, 2, 2, 3)]+=0.383287829182*x_ref[2]**o + (-0.186045233861)*x_ref[2]
            arg[(1, 2, 3, 0)]+=0.79900142004*x[2]**o + (0.0835709158413)*x[2]
            ref[(1, 2, 3, 0)]+=0.79900142004*x_ref[2]**o + (0.0835709158413)*x_ref[2]
            arg[(1, 2, 3, 1)]+=-0.440862472285*x[2]**o + (0.454912139191)*x[2]
            ref[(1, 2, 3, 1)]+=-0.440862472285*x_ref[2]**o + (0.454912139191)*x_ref[2]
            arg[(1, 2, 3, 2)]+=-0.0451102869388*x[2]**o + (-0.245547158282)*x[2]
            ref[(1, 2, 3, 2)]+=-0.0451102869388*x_ref[2]**o + (-0.245547158282)*x_ref[2]
            arg[(1, 2, 3, 3)]+=0.443001211305*x[2]**o + (-0.817873353641)*x[2]
            ref[(1, 2, 3, 3)]+=0.443001211305*x_ref[2]**o + (-0.817873353641)*x_ref[2]
            arg[(1, 3, 0, 0)]+=0.825195550394*x[2]**o + (-0.512938105842)*x[2]
            ref[(1, 3, 0, 0)]+=0.825195550394*x_ref[2]**o + (-0.512938105842)*x_ref[2]
            arg[(1, 3, 0, 1)]+=-0.0218254676854*x[2]**o + (0.133268089551)*x[2]
            ref[(1, 3, 0, 1)]+=-0.0218254676854*x_ref[2]**o + (0.133268089551)*x_ref[2]
            arg[(1, 3, 0, 2)]+=-0.577192013071*x[2]**o + (-0.744461066876)*x[2]
            ref[(1, 3, 0, 2)]+=-0.577192013071*x_ref[2]**o + (-0.744461066876)*x_ref[2]
            arg[(1, 3, 0, 3)]+=0.929223099198*x[2]**o + (-0.503600919709)*x[2]
            ref[(1, 3, 0, 3)]+=0.929223099198*x_ref[2]**o + (-0.503600919709)*x_ref[2]
            arg[(1, 3, 1, 0)]+=-0.97385149196*x[2]**o + (0.42368722903)*x[2]
            ref[(1, 3, 1, 0)]+=-0.97385149196*x_ref[2]**o + (0.42368722903)*x_ref[2]
            arg[(1, 3, 1, 1)]+=0.164502939329*x[2]**o + (0.396233904704)*x[2]
            ref[(1, 3, 1, 1)]+=0.164502939329*x_ref[2]**o + (0.396233904704)*x_ref[2]
            arg[(1, 3, 1, 2)]+=0.200579699509*x[2]**o + (0.703894574177)*x[2]
            ref[(1, 3, 1, 2)]+=0.200579699509*x_ref[2]**o + (0.703894574177)*x_ref[2]
            arg[(1, 3, 1, 3)]+=0.6074088967*x[2]**o + (0.608930269475)*x[2]
            ref[(1, 3, 1, 3)]+=0.6074088967*x_ref[2]**o + (0.608930269475)*x_ref[2]
            arg[(1, 3, 2, 0)]+=-0.888398906915*x[2]**o + (-0.299815565198)*x[2]
            ref[(1, 3, 2, 0)]+=-0.888398906915*x_ref[2]**o + (-0.299815565198)*x_ref[2]
            arg[(1, 3, 2, 1)]+=0.0451215848545*x[2]**o + (0.203002666742)*x[2]
            ref[(1, 3, 2, 1)]+=0.0451215848545*x_ref[2]**o + (0.203002666742)*x_ref[2]
            arg[(1, 3, 2, 2)]+=0.289265586404*x[2]**o + (0.409208239516)*x[2]
            ref[(1, 3, 2, 2)]+=0.289265586404*x_ref[2]**o + (0.409208239516)*x_ref[2]
            arg[(1, 3, 2, 3)]+=-0.0402862936874*x[2]**o + (0.73850911241)*x[2]
            ref[(1, 3, 2, 3)]+=-0.0402862936874*x_ref[2]**o + (0.73850911241)*x_ref[2]
            arg[(1, 3, 3, 0)]+=-0.474366350375*x[2]**o + (-0.469390774201)*x[2]
            ref[(1, 3, 3, 0)]+=-0.474366350375*x_ref[2]**o + (-0.469390774201)*x_ref[2]
            arg[(1, 3, 3, 1)]+=-0.874979839168*x[2]**o + (-0.797858513323)*x[2]
            ref[(1, 3, 3, 1)]+=-0.874979839168*x_ref[2]**o + (-0.797858513323)*x_ref[2]
            arg[(1, 3, 3, 2)]+=0.25272279182*x[2]**o + (0.0228132318534)*x[2]
            ref[(1, 3, 3, 2)]+=0.25272279182*x_ref[2]**o + (0.0228132318534)*x_ref[2]
            arg[(1, 3, 3, 3)]+=0.856683206879*x[2]**o + (0.699536025183)*x[2]
            ref[(1, 3, 3, 3)]+=0.856683206879*x_ref[2]**o + (0.699536025183)*x_ref[2]
            arg[(2, 0, 0, 0)]+=-0.621315091607*x[2]**o + (-0.107844255445)*x[2]
            ref[(2, 0, 0, 0)]+=-0.621315091607*x_ref[2]**o + (-0.107844255445)*x_ref[2]
            arg[(2, 0, 0, 1)]+=0.694860331243*x[2]**o + (-0.20498700172)*x[2]
            ref[(2, 0, 0, 1)]+=0.694860331243*x_ref[2]**o + (-0.20498700172)*x_ref[2]
            arg[(2, 0, 0, 2)]+=-0.350896765195*x[2]**o + (-0.834989125222)*x[2]
            ref[(2, 0, 0, 2)]+=-0.350896765195*x_ref[2]**o + (-0.834989125222)*x_ref[2]
            arg[(2, 0, 0, 3)]+=-0.261747206425*x[2]**o + (-0.963372419165)*x[2]
            ref[(2, 0, 0, 3)]+=-0.261747206425*x_ref[2]**o + (-0.963372419165)*x_ref[2]
            arg[(2, 0, 1, 0)]+=0.854852431498*x[2]**o + (-0.252855258128)*x[2]
            ref[(2, 0, 1, 0)]+=0.854852431498*x_ref[2]**o + (-0.252855258128)*x_ref[2]
            arg[(2, 0, 1, 1)]+=-0.106127763437*x[2]**o + (0.5865220608)*x[2]
            ref[(2, 0, 1, 1)]+=-0.106127763437*x_ref[2]**o + (0.5865220608)*x_ref[2]
            arg[(2, 0, 1, 2)]+=-0.902882749387*x[2]**o + (-0.251370280208)*x[2]
            ref[(2, 0, 1, 2)]+=-0.902882749387*x_ref[2]**o + (-0.251370280208)*x_ref[2]
            arg[(2, 0, 1, 3)]+=0.209416350888*x[2]**o + (-0.0833048374422)*x[2]
            ref[(2, 0, 1, 3)]+=0.209416350888*x_ref[2]**o + (-0.0833048374422)*x_ref[2]
            arg[(2, 0, 2, 0)]+=-0.452158500315*x[2]**o + (-0.973073005201)*x[2]
            ref[(2, 0, 2, 0)]+=-0.452158500315*x_ref[2]**o + (-0.973073005201)*x_ref[2]
            arg[(2, 0, 2, 1)]+=0.78502466582*x[2]**o + (0.575461377877)*x[2]
            ref[(2, 0, 2, 1)]+=0.78502466582*x_ref[2]**o + (0.575461377877)*x_ref[2]
            arg[(2, 0, 2, 2)]+=-0.901022369243*x[2]**o + (0.667033532316)*x[2]
            ref[(2, 0, 2, 2)]+=-0.901022369243*x_ref[2]**o + (0.667033532316)*x_ref[2]
            arg[(2, 0, 2, 3)]+=0.18694454115*x[2]**o + (-0.992426199059)*x[2]
            ref[(2, 0, 2, 3)]+=0.18694454115*x_ref[2]**o + (-0.992426199059)*x_ref[2]
            arg[(2, 0, 3, 0)]+=0.148589074178*x[2]**o + (-0.013833736549)*x[2]
            ref[(2, 0, 3, 0)]+=0.148589074178*x_ref[2]**o + (-0.013833736549)*x_ref[2]
            arg[(2, 0, 3, 1)]+=-0.0696490295358*x[2]**o + (0.365011608713)*x[2]
            ref[(2, 0, 3, 1)]+=-0.0696490295358*x_ref[2]**o + (0.365011608713)*x_ref[2]
            arg[(2, 0, 3, 2)]+=0.712771810578*x[2]**o + (0.348118947732)*x[2]
            ref[(2, 0, 3, 2)]+=0.712771810578*x_ref[2]**o + (0.348118947732)*x_ref[2]
            arg[(2, 0, 3, 3)]+=-0.425688304793*x[2]**o + (0.363245002275)*x[2]
            ref[(2, 0, 3, 3)]+=-0.425688304793*x_ref[2]**o + (0.363245002275)*x_ref[2]
            arg[(2, 1, 0, 0)]+=0.677849519455*x[2]**o + (0.439611818875)*x[2]
            ref[(2, 1, 0, 0)]+=0.677849519455*x_ref[2]**o + (0.439611818875)*x_ref[2]
            arg[(2, 1, 0, 1)]+=0.296974635523*x[2]**o + (0.893072959232)*x[2]
            ref[(2, 1, 0, 1)]+=0.296974635523*x_ref[2]**o + (0.893072959232)*x_ref[2]
            arg[(2, 1, 0, 2)]+=-0.0259340375729*x[2]**o + (-0.767654898968)*x[2]
            ref[(2, 1, 0, 2)]+=-0.0259340375729*x_ref[2]**o + (-0.767654898968)*x_ref[2]
            arg[(2, 1, 0, 3)]+=-0.601500785864*x[2]**o + (0.593919982603)*x[2]
            ref[(2, 1, 0, 3)]+=-0.601500785864*x_ref[2]**o + (0.593919982603)*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.352594317434*x[2]**o + (0.796747354701)*x[2]
            ref[(2, 1, 1, 0)]+=0.352594317434*x_ref[2]**o + (0.796747354701)*x_ref[2]
            arg[(2, 1, 1, 1)]+=0.473104987574*x[2]**o + (0.27019783998)*x[2]
            ref[(2, 1, 1, 1)]+=0.473104987574*x_ref[2]**o + (0.27019783998)*x_ref[2]
            arg[(2, 1, 1, 2)]+=-0.0178600282576*x[2]**o + (0.847549088728)*x[2]
            ref[(2, 1, 1, 2)]+=-0.0178600282576*x_ref[2]**o + (0.847549088728)*x_ref[2]
            arg[(2, 1, 1, 3)]+=0.243609778899*x[2]**o + (0.687802736319)*x[2]
            ref[(2, 1, 1, 3)]+=0.243609778899*x_ref[2]**o + (0.687802736319)*x_ref[2]
            arg[(2, 1, 2, 0)]+=-0.824933597313*x[2]**o + (0.894264554122)*x[2]
            ref[(2, 1, 2, 0)]+=-0.824933597313*x_ref[2]**o + (0.894264554122)*x_ref[2]
            arg[(2, 1, 2, 1)]+=-0.30385331515*x[2]**o + (0.454153507057)*x[2]
            ref[(2, 1, 2, 1)]+=-0.30385331515*x_ref[2]**o + (0.454153507057)*x_ref[2]
            arg[(2, 1, 2, 2)]+=0.860040616414*x[2]**o + (-0.442022787191)*x[2]
            ref[(2, 1, 2, 2)]+=0.860040616414*x_ref[2]**o + (-0.442022787191)*x_ref[2]
            arg[(2, 1, 2, 3)]+=0.833914115818*x[2]**o + (0.0630503188747)*x[2]
            ref[(2, 1, 2, 3)]+=0.833914115818*x_ref[2]**o + (0.0630503188747)*x_ref[2]
            arg[(2, 1, 3, 0)]+=-0.0409758582469*x[2]**o + (0.204599632517)*x[2]
            ref[(2, 1, 3, 0)]+=-0.0409758582469*x_ref[2]**o + (0.204599632517)*x_ref[2]
            arg[(2, 1, 3, 1)]+=0.987311295241*x[2]**o + (-0.133368000794)*x[2]
            ref[(2, 1, 3, 1)]+=0.987311295241*x_ref[2]**o + (-0.133368000794)*x_ref[2]
            arg[(2, 1, 3, 2)]+=-0.634176171981*x[2]**o + (-0.437803895365)*x[2]
            ref[(2, 1, 3, 2)]+=-0.634176171981*x_ref[2]**o + (-0.437803895365)*x_ref[2]
            arg[(2, 1, 3, 3)]+=0.261437238755*x[2]**o + (-0.209651498568)*x[2]
            ref[(2, 1, 3, 3)]+=0.261437238755*x_ref[2]**o + (-0.209651498568)*x_ref[2]
            arg[(2, 2, 0, 0)]+=-0.5097293356*x[2]**o + (0.0474620243204)*x[2]
            ref[(2, 2, 0, 0)]+=-0.5097293356*x_ref[2]**o + (0.0474620243204)*x_ref[2]
            arg[(2, 2, 0, 1)]+=0.100062448769*x[2]**o + (0.782840942569)*x[2]
            ref[(2, 2, 0, 1)]+=0.100062448769*x_ref[2]**o + (0.782840942569)*x_ref[2]
            arg[(2, 2, 0, 2)]+=-0.850140939751*x[2]**o + (0.979438476584)*x[2]
            ref[(2, 2, 0, 2)]+=-0.850140939751*x_ref[2]**o + (0.979438476584)*x_ref[2]
            arg[(2, 2, 0, 3)]+=-0.569757972402*x[2]**o + (0.863807979865)*x[2]
            ref[(2, 2, 0, 3)]+=-0.569757972402*x_ref[2]**o + (0.863807979865)*x_ref[2]
            arg[(2, 2, 1, 0)]+=-0.176127744209*x[2]**o + (-0.207152546603)*x[2]
            ref[(2, 2, 1, 0)]+=-0.176127744209*x_ref[2]**o + (-0.207152546603)*x_ref[2]
            arg[(2, 2, 1, 1)]+=0.774765736738*x[2]**o + (0.304077081787)*x[2]
            ref[(2, 2, 1, 1)]+=0.774765736738*x_ref[2]**o + (0.304077081787)*x_ref[2]
            arg[(2, 2, 1, 2)]+=-0.821910987383*x[2]**o + (-0.174380462724)*x[2]
            ref[(2, 2, 1, 2)]+=-0.821910987383*x_ref[2]**o + (-0.174380462724)*x_ref[2]
            arg[(2, 2, 1, 3)]+=0.697445324824*x[2]**o + (0.00120763631782)*x[2]
            ref[(2, 2, 1, 3)]+=0.697445324824*x_ref[2]**o + (0.00120763631782)*x_ref[2]
            arg[(2, 2, 2, 0)]+=-0.584351270515*x[2]**o + (0.92429284589)*x[2]
            ref[(2, 2, 2, 0)]+=-0.584351270515*x_ref[2]**o + (0.92429284589)*x_ref[2]
            arg[(2, 2, 2, 1)]+=0.0626624305648*x[2]**o + (0.988370928512)*x[2]
            ref[(2, 2, 2, 1)]+=0.0626624305648*x_ref[2]**o + (0.988370928512)*x_ref[2]
            arg[(2, 2, 2, 2)]+=-0.645929229129*x[2]**o + (-0.883082963562)*x[2]
            ref[(2, 2, 2, 2)]+=-0.645929229129*x_ref[2]**o + (-0.883082963562)*x_ref[2]
            arg[(2, 2, 2, 3)]+=0.336907513764*x[2]**o + (-0.97650905989)*x[2]
            ref[(2, 2, 2, 3)]+=0.336907513764*x_ref[2]**o + (-0.97650905989)*x_ref[2]
            arg[(2, 2, 3, 0)]+=0.566446257656*x[2]**o + (-0.680898408913)*x[2]
            ref[(2, 2, 3, 0)]+=0.566446257656*x_ref[2]**o + (-0.680898408913)*x_ref[2]
            arg[(2, 2, 3, 1)]+=-0.755787114203*x[2]**o + (0.0911666140841)*x[2]
            ref[(2, 2, 3, 1)]+=-0.755787114203*x_ref[2]**o + (0.0911666140841)*x_ref[2]
            arg[(2, 2, 3, 2)]+=-0.353452760597*x[2]**o + (-0.946822100228)*x[2]
            ref[(2, 2, 3, 2)]+=-0.353452760597*x_ref[2]**o + (-0.946822100228)*x_ref[2]
            arg[(2, 2, 3, 3)]+=-0.628893699306*x[2]**o + (0.850280987207)*x[2]
            ref[(2, 2, 3, 3)]+=-0.628893699306*x_ref[2]**o + (0.850280987207)*x_ref[2]
            arg[(2, 3, 0, 0)]+=0.59851829323*x[2]**o + (-0.389740001088)*x[2]
            ref[(2, 3, 0, 0)]+=0.59851829323*x_ref[2]**o + (-0.389740001088)*x_ref[2]
            arg[(2, 3, 0, 1)]+=0.432429209213*x[2]**o + (0.459578299052)*x[2]
            ref[(2, 3, 0, 1)]+=0.432429209213*x_ref[2]**o + (0.459578299052)*x_ref[2]
            arg[(2, 3, 0, 2)]+=-0.89443607964*x[2]**o + (-0.905798940997)*x[2]
            ref[(2, 3, 0, 2)]+=-0.89443607964*x_ref[2]**o + (-0.905798940997)*x_ref[2]
            arg[(2, 3, 0, 3)]+=0.693887898892*x[2]**o + (0.909934927152)*x[2]
            ref[(2, 3, 0, 3)]+=0.693887898892*x_ref[2]**o + (0.909934927152)*x_ref[2]
            arg[(2, 3, 1, 0)]+=-0.159515307374*x[2]**o + (0.623958910475)*x[2]
            ref[(2, 3, 1, 0)]+=-0.159515307374*x_ref[2]**o + (0.623958910475)*x_ref[2]
            arg[(2, 3, 1, 1)]+=0.680071915262*x[2]**o + (-0.586785145535)*x[2]
            ref[(2, 3, 1, 1)]+=0.680071915262*x_ref[2]**o + (-0.586785145535)*x_ref[2]
            arg[(2, 3, 1, 2)]+=0.370107824418*x[2]**o + (0.575265498356)*x[2]
            ref[(2, 3, 1, 2)]+=0.370107824418*x_ref[2]**o + (0.575265498356)*x_ref[2]
            arg[(2, 3, 1, 3)]+=0.830301605113*x[2]**o + (0.292251874353)*x[2]
            ref[(2, 3, 1, 3)]+=0.830301605113*x_ref[2]**o + (0.292251874353)*x_ref[2]
            arg[(2, 3, 2, 0)]+=0.0996322242627*x[2]**o + (0.381131151633)*x[2]
            ref[(2, 3, 2, 0)]+=0.0996322242627*x_ref[2]**o + (0.381131151633)*x_ref[2]
            arg[(2, 3, 2, 1)]+=-0.368384950604*x[2]**o + (0.0112700165074)*x[2]
            ref[(2, 3, 2, 1)]+=-0.368384950604*x_ref[2]**o + (0.0112700165074)*x_ref[2]
            arg[(2, 3, 2, 2)]+=-0.613478971194*x[2]**o + (-0.401314423667)*x[2]
            ref[(2, 3, 2, 2)]+=-0.613478971194*x_ref[2]**o + (-0.401314423667)*x_ref[2]
            arg[(2, 3, 2, 3)]+=0.985921133483*x[2]**o + (0.609086085415)*x[2]
            ref[(2, 3, 2, 3)]+=0.985921133483*x_ref[2]**o + (0.609086085415)*x_ref[2]
            arg[(2, 3, 3, 0)]+=0.972338105377*x[2]**o + (0.927280433511)*x[2]
            ref[(2, 3, 3, 0)]+=0.972338105377*x_ref[2]**o + (0.927280433511)*x_ref[2]
            arg[(2, 3, 3, 1)]+=0.229569081825*x[2]**o + (-0.99029565426)*x[2]
            ref[(2, 3, 3, 1)]+=0.229569081825*x_ref[2]**o + (-0.99029565426)*x_ref[2]
            arg[(2, 3, 3, 2)]+=0.930669681996*x[2]**o + (-0.693083683183)*x[2]
            ref[(2, 3, 3, 2)]+=0.930669681996*x_ref[2]**o + (-0.693083683183)*x_ref[2]
            arg[(2, 3, 3, 3)]+=-0.394871607412*x[2]**o + (0.419311682969)*x[2]
            ref[(2, 3, 3, 3)]+=-0.394871607412*x_ref[2]**o + (0.419311682969)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
        """
        tests interpolation of rank 0 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.68854789062*x[0] + (-0.584990350979)*x[1]
        ref=0.68854789062*x_ref[0] + (-0.584990350979)*x_ref[1]
        if dim==3:
            arg+=(0.26856535558)*x[2]
            ref+=(0.26856535558)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
        """
        tests interpolation of rank 1 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=0.903138685712*x[0] + (0.703428151734)*x[1]
        ref[(0,)]=0.903138685712*x_ref[0] + (0.703428151734)*x_ref[1]
        arg[(1,)]=-0.248622309667*x[0] + (0.274221063887)*x[1]
        ref[(1,)]=-0.248622309667*x_ref[0] + (0.274221063887)*x_ref[1]
        arg[(2,)]=0.990043275056*x[0] + (-0.780490793703)*x[1]
        ref[(2,)]=0.990043275056*x_ref[0] + (-0.780490793703)*x_ref[1]
        arg[(3,)]=-0.285951864062*x[0] + (0.968094018889)*x[1]
        ref[(3,)]=-0.285951864062*x_ref[0] + (0.968094018889)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.744056581135*x[2]
            ref[(0,)]+=0.744056581135*x_ref[2]
            arg[(1,)]+=-0.737830544903*x[2]
            ref[(1,)]+=-0.737830544903*x_ref[2]
            arg[(2,)]+=0.503393203877*x[2]
            ref[(2,)]+=0.503393203877*x_ref[2]
            arg[(3,)]+=0.62945274582*x[2]
            ref[(3,)]+=0.62945274582*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
        """
        tests interpolation of rank 2 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref = Data(0,(2, 4),w_ref)
        arg[(0, 0)]=0.132043363804*x[0] + (-0.558146908599)*x[1]
        ref[(0, 0)]=0.132043363804*x_ref[0] + (-0.558146908599)*x_ref[1]
        arg[(0, 1)]=-0.704806883031*x[0] + (-0.205383497447)*x[1]
        ref[(0, 1)]=-0.704806883031*x_ref[0] + (-0.205383497447)*x_ref[1]
        arg[(0, 2)]=-0.411043041555*x[0] + (-0.059454862383)*x[1]
        ref[(0, 2)]=-0.411043041555*x_ref[0] + (-0.059454862383)*x_ref[1]
        arg[(0, 3)]=-0.986815883068*x[0] + (-0.76484011459)*x[1]
        ref[(0, 3)]=-0.986815883068*x_ref[0] + (-0.76484011459)*x_ref[1]
        arg[(1, 0)]=-0.584689936146*x[0] + (-0.750761210274)*x[1]
        ref[(1, 0)]=-0.584689936146*x_ref[0] + (-0.750761210274)*x_ref[1]
        arg[(1, 1)]=-0.479237778443*x[0] + (-0.944378272853)*x[1]
        ref[(1, 1)]=-0.479237778443*x_ref[0] + (-0.944378272853)*x_ref[1]
        arg[(1, 2)]=0.10543890927*x[0] + (0.609928863207)*x[1]
        ref[(1, 2)]=0.10543890927*x_ref[0] + (0.609928863207)*x_ref[1]
        arg[(1, 3)]=-0.593185503677*x[0] + (0.829154595669)*x[1]
        ref[(1, 3)]=-0.593185503677*x_ref[0] + (0.829154595669)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.333197065001*x[2]
            ref[(0, 0)]+=-0.333197065001*x_ref[2]
            arg[(0, 1)]+=0.293114492967*x[2]
            ref[(0, 1)]+=0.293114492967*x_ref[2]
            arg[(0, 2)]+=-0.426031001014*x[2]
            ref[(0, 2)]+=-0.426031001014*x_ref[2]
            arg[(0, 3)]+=0.438418219357*x[2]
            ref[(0, 3)]+=0.438418219357*x_ref[2]
            arg[(1, 0)]+=-0.955413826266*x[2]
            ref[(1, 0)]+=-0.955413826266*x_ref[2]
            arg[(1, 1)]+=-0.533886453117*x[2]
            ref[(1, 1)]+=-0.533886453117*x_ref[2]
            arg[(1, 2)]+=-0.176575556381*x[2]
            ref[(1, 2)]+=-0.176575556381*x_ref[2]
            arg[(1, 3)]+=0.251769364772*x[2]
            ref[(1, 3)]+=0.251769364772*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
        """
        tests interpolation of rank 3 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 3),w)
        ref = Data(0,(3, 3, 3),w_ref)
        arg[(0, 0, 0)]=-0.271310485966*x[0] + (0.0401789875176)*x[1]
        ref[(0, 0, 0)]=-0.271310485966*x_ref[0] + (0.0401789875176)*x_ref[1]
        arg[(0, 0, 1)]=-0.889952037137*x[0] + (0.13420114902)*x[1]
        ref[(0, 0, 1)]=-0.889952037137*x_ref[0] + (0.13420114902)*x_ref[1]
        arg[(0, 0, 2)]=0.63036200394*x[0] + (-0.266925330388)*x[1]
        ref[(0, 0, 2)]=0.63036200394*x_ref[0] + (-0.266925330388)*x_ref[1]
        arg[(0, 1, 0)]=0.980897665644*x[0] + (0.318747137833)*x[1]
        ref[(0, 1, 0)]=0.980897665644*x_ref[0] + (0.318747137833)*x_ref[1]
        arg[(0, 1, 1)]=-0.383541563586*x[0] + (0.837888567084)*x[1]
        ref[(0, 1, 1)]=-0.383541563586*x_ref[0] + (0.837888567084)*x_ref[1]
        arg[(0, 1, 2)]=-0.281761718637*x[0] + (0.389952173773)*x[1]
        ref[(0, 1, 2)]=-0.281761718637*x_ref[0] + (0.389952173773)*x_ref[1]
        arg[(0, 2, 0)]=-0.680402506909*x[0] + (-0.737575972657)*x[1]
        ref[(0, 2, 0)]=-0.680402506909*x_ref[0] + (-0.737575972657)*x_ref[1]
        arg[(0, 2, 1)]=-0.118999303029*x[0] + (-0.282428755136)*x[1]
        ref[(0, 2, 1)]=-0.118999303029*x_ref[0] + (-0.282428755136)*x_ref[1]
        arg[(0, 2, 2)]=-0.751234229244*x[0] + (-0.15224986591)*x[1]
        ref[(0, 2, 2)]=-0.751234229244*x_ref[0] + (-0.15224986591)*x_ref[1]
        arg[(1, 0, 0)]=-0.518414815471*x[0] + (-0.0703855841777)*x[1]
        ref[(1, 0, 0)]=-0.518414815471*x_ref[0] + (-0.0703855841777)*x_ref[1]
        arg[(1, 0, 1)]=0.975801512682*x[0] + (-0.56930820378)*x[1]
        ref[(1, 0, 1)]=0.975801512682*x_ref[0] + (-0.56930820378)*x_ref[1]
        arg[(1, 0, 2)]=0.228587214726*x[0] + (-0.299809448512)*x[1]
        ref[(1, 0, 2)]=0.228587214726*x_ref[0] + (-0.299809448512)*x_ref[1]
        arg[(1, 1, 0)]=0.815181025993*x[0] + (0.388241591562)*x[1]
        ref[(1, 1, 0)]=0.815181025993*x_ref[0] + (0.388241591562)*x_ref[1]
        arg[(1, 1, 1)]=-0.180380988842*x[0] + (-0.321058530222)*x[1]
        ref[(1, 1, 1)]=-0.180380988842*x_ref[0] + (-0.321058530222)*x_ref[1]
        arg[(1, 1, 2)]=-0.726489141836*x[0] + (0.118403394303)*x[1]
        ref[(1, 1, 2)]=-0.726489141836*x_ref[0] + (0.118403394303)*x_ref[1]
        arg[(1, 2, 0)]=-0.324689001502*x[0] + (0.377222614281)*x[1]
        ref[(1, 2, 0)]=-0.324689001502*x_ref[0] + (0.377222614281)*x_ref[1]
        arg[(1, 2, 1)]=-0.885648327967*x[0] + (-0.846654847326)*x[1]
        ref[(1, 2, 1)]=-0.885648327967*x_ref[0] + (-0.846654847326)*x_ref[1]
        arg[(1, 2, 2)]=-0.0802141942308*x[0] + (-0.298800690526)*x[1]
        ref[(1, 2, 2)]=-0.0802141942308*x_ref[0] + (-0.298800690526)*x_ref[1]
        arg[(2, 0, 0)]=-0.952357363725*x[0] + (0.998164691951)*x[1]
        ref[(2, 0, 0)]=-0.952357363725*x_ref[0] + (0.998164691951)*x_ref[1]
        arg[(2, 0, 1)]=0.319478517452*x[0] + (0.0542082418119)*x[1]
        ref[(2, 0, 1)]=0.319478517452*x_ref[0] + (0.0542082418119)*x_ref[1]
        arg[(2, 0, 2)]=-0.386581665798*x[0] + (0.793076662699)*x[1]
        ref[(2, 0, 2)]=-0.386581665798*x_ref[0] + (0.793076662699)*x_ref[1]
        arg[(2, 1, 0)]=-0.103400851609*x[0] + (-0.750252344581)*x[1]
        ref[(2, 1, 0)]=-0.103400851609*x_ref[0] + (-0.750252344581)*x_ref[1]
        arg[(2, 1, 1)]=0.438374668003*x[0] + (0.00389246378494)*x[1]
        ref[(2, 1, 1)]=0.438374668003*x_ref[0] + (0.00389246378494)*x_ref[1]
        arg[(2, 1, 2)]=-0.678483424605*x[0] + (0.929369583077)*x[1]
        ref[(2, 1, 2)]=-0.678483424605*x_ref[0] + (0.929369583077)*x_ref[1]
        arg[(2, 2, 0)]=-0.317933023933*x[0] + (0.0534590646669)*x[1]
        ref[(2, 2, 0)]=-0.317933023933*x_ref[0] + (0.0534590646669)*x_ref[1]
        arg[(2, 2, 1)]=0.984042624269*x[0] + (0.769739789978)*x[1]
        ref[(2, 2, 1)]=0.984042624269*x_ref[0] + (0.769739789978)*x_ref[1]
        arg[(2, 2, 2)]=0.644891813721*x[0] + (0.822715756955)*x[1]
        ref[(2, 2, 2)]=0.644891813721*x_ref[0] + (0.822715756955)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.0870273042275*x[2]
            ref[(0, 0, 0)]+=0.0870273042275*x_ref[2]
            arg[(0, 0, 1)]+=0.243888487274*x[2]
            ref[(0, 0, 1)]+=0.243888487274*x_ref[2]
            arg[(0, 0, 2)]+=0.170934224396*x[2]
            ref[(0, 0, 2)]+=0.170934224396*x_ref[2]
            arg[(0, 1, 0)]+=0.115785575331*x[2]
            ref[(0, 1, 0)]+=0.115785575331*x_ref[2]
            arg[(0, 1, 1)]+=-0.441524632854*x[2]
            ref[(0, 1, 1)]+=-0.441524632854*x_ref[2]
            arg[(0, 1, 2)]+=0.9359503544*x[2]
            ref[(0, 1, 2)]+=0.9359503544*x_ref[2]
            arg[(0, 2, 0)]+=0.557584265423*x[2]
            ref[(0, 2, 0)]+=0.557584265423*x_ref[2]
            arg[(0, 2, 1)]+=0.667578029856*x[2]
            ref[(0, 2, 1)]+=0.667578029856*x_ref[2]
            arg[(0, 2, 2)]+=0.518618270445*x[2]
            ref[(0, 2, 2)]+=0.518618270445*x_ref[2]
            arg[(1, 0, 0)]+=-0.673402655919*x[2]
            ref[(1, 0, 0)]+=-0.673402655919*x_ref[2]
            arg[(1, 0, 1)]+=-0.679043254373*x[2]
            ref[(1, 0, 1)]+=-0.679043254373*x_ref[2]
            arg[(1, 0, 2)]+=-0.596744641621*x[2]
            ref[(1, 0, 2)]+=-0.596744641621*x_ref[2]
            arg[(1, 1, 0)]+=-0.989873128469*x[2]
            ref[(1, 1, 0)]+=-0.989873128469*x_ref[2]
            arg[(1, 1, 1)]+=-0.377766053192*x[2]
            ref[(1, 1, 1)]+=-0.377766053192*x_ref[2]
            arg[(1, 1, 2)]+=0.632477374935*x[2]
            ref[(1, 1, 2)]+=0.632477374935*x_ref[2]
            arg[(1, 2, 0)]+=0.733035887889*x[2]
            ref[(1, 2, 0)]+=0.733035887889*x_ref[2]
            arg[(1, 2, 1)]+=0.339047640808*x[2]
            ref[(1, 2, 1)]+=0.339047640808*x_ref[2]
            arg[(1, 2, 2)]+=0.359661177174*x[2]
            ref[(1, 2, 2)]+=0.359661177174*x_ref[2]
            arg[(2, 0, 0)]+=0.644745871423*x[2]
            ref[(2, 0, 0)]+=0.644745871423*x_ref[2]
            arg[(2, 0, 1)]+=0.216163796788*x[2]
            ref[(2, 0, 1)]+=0.216163796788*x_ref[2]
            arg[(2, 0, 2)]+=-0.909192241301*x[2]
            ref[(2, 0, 2)]+=-0.909192241301*x_ref[2]
            arg[(2, 1, 0)]+=-0.68434146208*x[2]
            ref[(2, 1, 0)]+=-0.68434146208*x_ref[2]
            arg[(2, 1, 1)]+=0.0212712296524*x[2]
            ref[(2, 1, 1)]+=0.0212712296524*x_ref[2]
            arg[(2, 1, 2)]+=0.999303714519*x[2]
            ref[(2, 1, 2)]+=0.999303714519*x_ref[2]
            arg[(2, 2, 0)]+=-0.341321951501*x[2]
            ref[(2, 2, 0)]+=-0.341321951501*x_ref[2]
            arg[(2, 2, 1)]+=0.49178919069*x[2]
            ref[(2, 2, 1)]+=0.49178919069*x_ref[2]
            arg[(2, 2, 2)]+=-0.594145773578*x[2]
            ref[(2, 2, 2)]+=-0.594145773578*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_ReducedSolution_rank4(self):
        """
        tests interpolation of rank 4 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 3, 3),w)
        ref = Data(0,(4, 4, 3, 3),w_ref)
        arg[(0, 0, 0, 0)]=0.512668651835*x[0] + (-0.901716566584)*x[1]
        ref[(0, 0, 0, 0)]=0.512668651835*x_ref[0] + (-0.901716566584)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.268307394951*x[0] + (-0.697297176107)*x[1]
        ref[(0, 0, 0, 1)]=0.268307394951*x_ref[0] + (-0.697297176107)*x_ref[1]
        arg[(0, 0, 0, 2)]=0.669340357096*x[0] + (-0.166281301692)*x[1]
        ref[(0, 0, 0, 2)]=0.669340357096*x_ref[0] + (-0.166281301692)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.807328637155*x[0] + (-0.505999220462)*x[1]
        ref[(0, 0, 1, 0)]=-0.807328637155*x_ref[0] + (-0.505999220462)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.771779255467*x[0] + (0.289813592638)*x[1]
        ref[(0, 0, 1, 1)]=0.771779255467*x_ref[0] + (0.289813592638)*x_ref[1]
        arg[(0, 0, 1, 2)]=0.389882763488*x[0] + (0.0364388691033)*x[1]
        ref[(0, 0, 1, 2)]=0.389882763488*x_ref[0] + (0.0364388691033)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.819761685432*x[0] + (-0.926787846214)*x[1]
        ref[(0, 0, 2, 0)]=-0.819761685432*x_ref[0] + (-0.926787846214)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.310386364331*x[0] + (0.342885249524)*x[1]
        ref[(0, 0, 2, 1)]=-0.310386364331*x_ref[0] + (0.342885249524)*x_ref[1]
        arg[(0, 0, 2, 2)]=0.712748780449*x[0] + (-0.224685814363)*x[1]
        ref[(0, 0, 2, 2)]=0.712748780449*x_ref[0] + (-0.224685814363)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.36451008228*x[0] + (0.26966954506)*x[1]
        ref[(0, 1, 0, 0)]=0.36451008228*x_ref[0] + (0.26966954506)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.548615310292*x[0] + (-0.69269479571)*x[1]
        ref[(0, 1, 0, 1)]=0.548615310292*x_ref[0] + (-0.69269479571)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.96118937355*x[0] + (0.119722514821)*x[1]
        ref[(0, 1, 0, 2)]=0.96118937355*x_ref[0] + (0.119722514821)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.602463741804*x[0] + (-0.364473059559)*x[1]
        ref[(0, 1, 1, 0)]=0.602463741804*x_ref[0] + (-0.364473059559)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.182857422017*x[0] + (-0.625095760259)*x[1]
        ref[(0, 1, 1, 1)]=-0.182857422017*x_ref[0] + (-0.625095760259)*x_ref[1]
        arg[(0, 1, 1, 2)]=-0.739549996173*x[0] + (0.0991441115344)*x[1]
        ref[(0, 1, 1, 2)]=-0.739549996173*x_ref[0] + (0.0991441115344)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.717292025661*x[0] + (-0.797480286504)*x[1]
        ref[(0, 1, 2, 0)]=-0.717292025661*x_ref[0] + (-0.797480286504)*x_ref[1]
        arg[(0, 1, 2, 1)]=-0.793157524332*x[0] + (-0.222529685778)*x[1]
        ref[(0, 1, 2, 1)]=-0.793157524332*x_ref[0] + (-0.222529685778)*x_ref[1]
        arg[(0, 1, 2, 2)]=0.110396558739*x[0] + (0.14104266623)*x[1]
        ref[(0, 1, 2, 2)]=0.110396558739*x_ref[0] + (0.14104266623)*x_ref[1]
        arg[(0, 2, 0, 0)]=-0.0241973942883*x[0] + (-0.841368202365)*x[1]
        ref[(0, 2, 0, 0)]=-0.0241973942883*x_ref[0] + (-0.841368202365)*x_ref[1]
        arg[(0, 2, 0, 1)]=-0.315769624233*x[0] + (-0.247710430353)*x[1]
        ref[(0, 2, 0, 1)]=-0.315769624233*x_ref[0] + (-0.247710430353)*x_ref[1]
        arg[(0, 2, 0, 2)]=-0.112816371184*x[0] + (0.687478652767)*x[1]
        ref[(0, 2, 0, 2)]=-0.112816371184*x_ref[0] + (0.687478652767)*x_ref[1]
        arg[(0, 2, 1, 0)]=0.20535771121*x[0] + (0.180266226878)*x[1]
        ref[(0, 2, 1, 0)]=0.20535771121*x_ref[0] + (0.180266226878)*x_ref[1]
        arg[(0, 2, 1, 1)]=-0.0561064353729*x[0] + (-0.561737948899)*x[1]
        ref[(0, 2, 1, 1)]=-0.0561064353729*x_ref[0] + (-0.561737948899)*x_ref[1]
        arg[(0, 2, 1, 2)]=-0.969524203607*x[0] + (0.835229878804)*x[1]
        ref[(0, 2, 1, 2)]=-0.969524203607*x_ref[0] + (0.835229878804)*x_ref[1]
        arg[(0, 2, 2, 0)]=0.923248083355*x[0] + (-0.320246986334)*x[1]
        ref[(0, 2, 2, 0)]=0.923248083355*x_ref[0] + (-0.320246986334)*x_ref[1]
        arg[(0, 2, 2, 1)]=0.182842507236*x[0] + (0.704993509998)*x[1]
        ref[(0, 2, 2, 1)]=0.182842507236*x_ref[0] + (0.704993509998)*x_ref[1]
        arg[(0, 2, 2, 2)]=0.632623931792*x[0] + (0.0363328490864)*x[1]
        ref[(0, 2, 2, 2)]=0.632623931792*x_ref[0] + (0.0363328490864)*x_ref[1]
        arg[(0, 3, 0, 0)]=0.14620408427*x[0] + (0.543766888301)*x[1]
        ref[(0, 3, 0, 0)]=0.14620408427*x_ref[0] + (0.543766888301)*x_ref[1]
        arg[(0, 3, 0, 1)]=0.613696277067*x[0] + (-0.656931193056)*x[1]
        ref[(0, 3, 0, 1)]=0.613696277067*x_ref[0] + (-0.656931193056)*x_ref[1]
        arg[(0, 3, 0, 2)]=-0.398374012513*x[0] + (0.786953996182)*x[1]
        ref[(0, 3, 0, 2)]=-0.398374012513*x_ref[0] + (0.786953996182)*x_ref[1]
        arg[(0, 3, 1, 0)]=0.0851855985755*x[0] + (-0.0916977730867)*x[1]
        ref[(0, 3, 1, 0)]=0.0851855985755*x_ref[0] + (-0.0916977730867)*x_ref[1]
        arg[(0, 3, 1, 1)]=-0.638192884259*x[0] + (-0.43117788626)*x[1]
        ref[(0, 3, 1, 1)]=-0.638192884259*x_ref[0] + (-0.43117788626)*x_ref[1]
        arg[(0, 3, 1, 2)]=-0.462682880494*x[0] + (0.678191671987)*x[1]
        ref[(0, 3, 1, 2)]=-0.462682880494*x_ref[0] + (0.678191671987)*x_ref[1]
        arg[(0, 3, 2, 0)]=0.0206314101424*x[0] + (0.975486685911)*x[1]
        ref[(0, 3, 2, 0)]=0.0206314101424*x_ref[0] + (0.975486685911)*x_ref[1]
        arg[(0, 3, 2, 1)]=-0.0584897621684*x[0] + (0.0104231893861)*x[1]
        ref[(0, 3, 2, 1)]=-0.0584897621684*x_ref[0] + (0.0104231893861)*x_ref[1]
        arg[(0, 3, 2, 2)]=0.856127925828*x[0] + (-0.125922896785)*x[1]
        ref[(0, 3, 2, 2)]=0.856127925828*x_ref[0] + (-0.125922896785)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.16430981477*x[0] + (-0.289363322759)*x[1]
        ref[(1, 0, 0, 0)]=-0.16430981477*x_ref[0] + (-0.289363322759)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.0581308542671*x[0] + (-0.871583522392)*x[1]
        ref[(1, 0, 0, 1)]=0.0581308542671*x_ref[0] + (-0.871583522392)*x_ref[1]
        arg[(1, 0, 0, 2)]=0.948309083014*x[0] + (-0.0332909338073)*x[1]
        ref[(1, 0, 0, 2)]=0.948309083014*x_ref[0] + (-0.0332909338073)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.239328239756*x[0] + (-0.956800699817)*x[1]
        ref[(1, 0, 1, 0)]=0.239328239756*x_ref[0] + (-0.956800699817)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.0693384447307*x[0] + (-0.667137140478)*x[1]
        ref[(1, 0, 1, 1)]=0.0693384447307*x_ref[0] + (-0.667137140478)*x_ref[1]
        arg[(1, 0, 1, 2)]=-0.84101695067*x[0] + (-0.37128673623)*x[1]
        ref[(1, 0, 1, 2)]=-0.84101695067*x_ref[0] + (-0.37128673623)*x_ref[1]
        arg[(1, 0, 2, 0)]=-0.0116838025772*x[0] + (0.785656819649)*x[1]
        ref[(1, 0, 2, 0)]=-0.0116838025772*x_ref[0] + (0.785656819649)*x_ref[1]
        arg[(1, 0, 2, 1)]=-0.0371019083251*x[0] + (0.0359241430407)*x[1]
        ref[(1, 0, 2, 1)]=-0.0371019083251*x_ref[0] + (0.0359241430407)*x_ref[1]
        arg[(1, 0, 2, 2)]=0.367824794555*x[0] + (-0.340310853369)*x[1]
        ref[(1, 0, 2, 2)]=0.367824794555*x_ref[0] + (-0.340310853369)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.929199037027*x[0] + (-0.599916973063)*x[1]
        ref[(1, 1, 0, 0)]=-0.929199037027*x_ref[0] + (-0.599916973063)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.683449712514*x[0] + (0.849561115894)*x[1]
        ref[(1, 1, 0, 1)]=0.683449712514*x_ref[0] + (0.849561115894)*x_ref[1]
        arg[(1, 1, 0, 2)]=-0.468591535938*x[0] + (-0.83619806392)*x[1]
        ref[(1, 1, 0, 2)]=-0.468591535938*x_ref[0] + (-0.83619806392)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.715815202407*x[0] + (0.326645349995)*x[1]
        ref[(1, 1, 1, 0)]=0.715815202407*x_ref[0] + (0.326645349995)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.205122715441*x[0] + (0.00415283680603)*x[1]
        ref[(1, 1, 1, 1)]=0.205122715441*x_ref[0] + (0.00415283680603)*x_ref[1]
        arg[(1, 1, 1, 2)]=0.772607600932*x[0] + (0.731640052173)*x[1]
        ref[(1, 1, 1, 2)]=0.772607600932*x_ref[0] + (0.731640052173)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.836548493849*x[0] + (-0.570086552069)*x[1]
        ref[(1, 1, 2, 0)]=-0.836548493849*x_ref[0] + (-0.570086552069)*x_ref[1]
        arg[(1, 1, 2, 1)]=0.0760079634055*x[0] + (-0.458118252866)*x[1]
        ref[(1, 1, 2, 1)]=0.0760079634055*x_ref[0] + (-0.458118252866)*x_ref[1]
        arg[(1, 1, 2, 2)]=0.973005596755*x[0] + (-0.376016774765)*x[1]
        ref[(1, 1, 2, 2)]=0.973005596755*x_ref[0] + (-0.376016774765)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.42868084456*x[0] + (0.0668918566189)*x[1]
        ref[(1, 2, 0, 0)]=-0.42868084456*x_ref[0] + (0.0668918566189)*x_ref[1]
        arg[(1, 2, 0, 1)]=-0.896145115397*x[0] + (-0.957692579931)*x[1]
        ref[(1, 2, 0, 1)]=-0.896145115397*x_ref[0] + (-0.957692579931)*x_ref[1]
        arg[(1, 2, 0, 2)]=-0.389696795039*x[0] + (-0.565806434911)*x[1]
        ref[(1, 2, 0, 2)]=-0.389696795039*x_ref[0] + (-0.565806434911)*x_ref[1]
        arg[(1, 2, 1, 0)]=-0.704536336664*x[0] + (-0.377174117765)*x[1]
        ref[(1, 2, 1, 0)]=-0.704536336664*x_ref[0] + (-0.377174117765)*x_ref[1]
        arg[(1, 2, 1, 1)]=0.203938404339*x[0] + (0.366358759919)*x[1]
        ref[(1, 2, 1, 1)]=0.203938404339*x_ref[0] + (0.366358759919)*x_ref[1]
        arg[(1, 2, 1, 2)]=0.259040229305*x[0] + (0.929719719962)*x[1]
        ref[(1, 2, 1, 2)]=0.259040229305*x_ref[0] + (0.929719719962)*x_ref[1]
        arg[(1, 2, 2, 0)]=-0.939422387914*x[0] + (-0.802105808225)*x[1]
        ref[(1, 2, 2, 0)]=-0.939422387914*x_ref[0] + (-0.802105808225)*x_ref[1]
        arg[(1, 2, 2, 1)]=0.623333791091*x[0] + (0.825294887499)*x[1]
        ref[(1, 2, 2, 1)]=0.623333791091*x_ref[0] + (0.825294887499)*x_ref[1]
        arg[(1, 2, 2, 2)]=0.341015074143*x[0] + (0.85450383902)*x[1]
        ref[(1, 2, 2, 2)]=0.341015074143*x_ref[0] + (0.85450383902)*x_ref[1]
        arg[(1, 3, 0, 0)]=-0.64729189742*x[0] + (-0.99099284455)*x[1]
        ref[(1, 3, 0, 0)]=-0.64729189742*x_ref[0] + (-0.99099284455)*x_ref[1]
        arg[(1, 3, 0, 1)]=-0.101877273213*x[0] + (0.879608352687)*x[1]
        ref[(1, 3, 0, 1)]=-0.101877273213*x_ref[0] + (0.879608352687)*x_ref[1]
        arg[(1, 3, 0, 2)]=0.859683410059*x[0] + (-0.168258383315)*x[1]
        ref[(1, 3, 0, 2)]=0.859683410059*x_ref[0] + (-0.168258383315)*x_ref[1]
        arg[(1, 3, 1, 0)]=0.331434715047*x[0] + (0.634317897703)*x[1]
        ref[(1, 3, 1, 0)]=0.331434715047*x_ref[0] + (0.634317897703)*x_ref[1]
        arg[(1, 3, 1, 1)]=0.345250414315*x[0] + (-0.491982911159)*x[1]
        ref[(1, 3, 1, 1)]=0.345250414315*x_ref[0] + (-0.491982911159)*x_ref[1]
        arg[(1, 3, 1, 2)]=0.63578533353*x[0] + (0.123018853192)*x[1]
        ref[(1, 3, 1, 2)]=0.63578533353*x_ref[0] + (0.123018853192)*x_ref[1]
        arg[(1, 3, 2, 0)]=0.304881035972*x[0] + (-0.411565531966)*x[1]
        ref[(1, 3, 2, 0)]=0.304881035972*x_ref[0] + (-0.411565531966)*x_ref[1]
        arg[(1, 3, 2, 1)]=0.620535403436*x[0] + (-0.669168926111)*x[1]
        ref[(1, 3, 2, 1)]=0.620535403436*x_ref[0] + (-0.669168926111)*x_ref[1]
        arg[(1, 3, 2, 2)]=0.671005399681*x[0] + (-0.87370266843)*x[1]
        ref[(1, 3, 2, 2)]=0.671005399681*x_ref[0] + (-0.87370266843)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.79054142541*x[0] + (-0.38049694953)*x[1]
        ref[(2, 0, 0, 0)]=0.79054142541*x_ref[0] + (-0.38049694953)*x_ref[1]
        arg[(2, 0, 0, 1)]=-0.459815675633*x[0] + (-0.147302536262)*x[1]
        ref[(2, 0, 0, 1)]=-0.459815675633*x_ref[0] + (-0.147302536262)*x_ref[1]
        arg[(2, 0, 0, 2)]=0.148627276465*x[0] + (-0.266679625706)*x[1]
        ref[(2, 0, 0, 2)]=0.148627276465*x_ref[0] + (-0.266679625706)*x_ref[1]
        arg[(2, 0, 1, 0)]=-0.811730461196*x[0] + (-0.325014470211)*x[1]
        ref[(2, 0, 1, 0)]=-0.811730461196*x_ref[0] + (-0.325014470211)*x_ref[1]
        arg[(2, 0, 1, 1)]=0.118358961132*x[0] + (0.0132840633452)*x[1]
        ref[(2, 0, 1, 1)]=0.118358961132*x_ref[0] + (0.0132840633452)*x_ref[1]
        arg[(2, 0, 1, 2)]=-0.269778075804*x[0] + (0.250076960175)*x[1]
        ref[(2, 0, 1, 2)]=-0.269778075804*x_ref[0] + (0.250076960175)*x_ref[1]
        arg[(2, 0, 2, 0)]=0.000109384071034*x[0] + (0.289834845195)*x[1]
        ref[(2, 0, 2, 0)]=0.000109384071034*x_ref[0] + (0.289834845195)*x_ref[1]
        arg[(2, 0, 2, 1)]=-0.48895190467*x[0] + (-0.914860988531)*x[1]
        ref[(2, 0, 2, 1)]=-0.48895190467*x_ref[0] + (-0.914860988531)*x_ref[1]
        arg[(2, 0, 2, 2)]=0.0523220417418*x[0] + (0.685329814362)*x[1]
        ref[(2, 0, 2, 2)]=0.0523220417418*x_ref[0] + (0.685329814362)*x_ref[1]
        arg[(2, 1, 0, 0)]=-0.368178265824*x[0] + (0.765358432665)*x[1]
        ref[(2, 1, 0, 0)]=-0.368178265824*x_ref[0] + (0.765358432665)*x_ref[1]
        arg[(2, 1, 0, 1)]=-0.9207863828*x[0] + (-0.120187039751)*x[1]
        ref[(2, 1, 0, 1)]=-0.9207863828*x_ref[0] + (-0.120187039751)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.220008020096*x[0] + (-0.758569721541)*x[1]
        ref[(2, 1, 0, 2)]=-0.220008020096*x_ref[0] + (-0.758569721541)*x_ref[1]
        arg[(2, 1, 1, 0)]=-0.967701386752*x[0] + (0.0245509826537)*x[1]
        ref[(2, 1, 1, 0)]=-0.967701386752*x_ref[0] + (0.0245509826537)*x_ref[1]
        arg[(2, 1, 1, 1)]=0.895192844524*x[0] + (0.975886394507)*x[1]
        ref[(2, 1, 1, 1)]=0.895192844524*x_ref[0] + (0.975886394507)*x_ref[1]
        arg[(2, 1, 1, 2)]=0.232347818907*x[0] + (0.194836891881)*x[1]
        ref[(2, 1, 1, 2)]=0.232347818907*x_ref[0] + (0.194836891881)*x_ref[1]
        arg[(2, 1, 2, 0)]=0.242206172557*x[0] + (0.388730845097)*x[1]
        ref[(2, 1, 2, 0)]=0.242206172557*x_ref[0] + (0.388730845097)*x_ref[1]
        arg[(2, 1, 2, 1)]=-0.485203311805*x[0] + (-0.640522194813)*x[1]
        ref[(2, 1, 2, 1)]=-0.485203311805*x_ref[0] + (-0.640522194813)*x_ref[1]
        arg[(2, 1, 2, 2)]=0.958869480902*x[0] + (0.262985086593)*x[1]
        ref[(2, 1, 2, 2)]=0.958869480902*x_ref[0] + (0.262985086593)*x_ref[1]
        arg[(2, 2, 0, 0)]=0.0590907231009*x[0] + (0.65060268397)*x[1]
        ref[(2, 2, 0, 0)]=0.0590907231009*x_ref[0] + (0.65060268397)*x_ref[1]
        arg[(2, 2, 0, 1)]=-0.0645675127479*x[0] + (-0.0596696135329)*x[1]
        ref[(2, 2, 0, 1)]=-0.0645675127479*x_ref[0] + (-0.0596696135329)*x_ref[1]
        arg[(2, 2, 0, 2)]=0.868325728133*x[0] + (-0.571363047257)*x[1]
        ref[(2, 2, 0, 2)]=0.868325728133*x_ref[0] + (-0.571363047257)*x_ref[1]
        arg[(2, 2, 1, 0)]=-0.544733750944*x[0] + (0.589827509426)*x[1]
        ref[(2, 2, 1, 0)]=-0.544733750944*x_ref[0] + (0.589827509426)*x_ref[1]
        arg[(2, 2, 1, 1)]=0.25281574476*x[0] + (0.959280086262)*x[1]
        ref[(2, 2, 1, 1)]=0.25281574476*x_ref[0] + (0.959280086262)*x_ref[1]
        arg[(2, 2, 1, 2)]=-0.0536451899455*x[0] + (0.939654814358)*x[1]
        ref[(2, 2, 1, 2)]=-0.0536451899455*x_ref[0] + (0.939654814358)*x_ref[1]
        arg[(2, 2, 2, 0)]=0.63742907579*x[0] + (-0.630827532174)*x[1]
        ref[(2, 2, 2, 0)]=0.63742907579*x_ref[0] + (-0.630827532174)*x_ref[1]
        arg[(2, 2, 2, 1)]=-0.696257783114*x[0] + (0.310365034063)*x[1]
        ref[(2, 2, 2, 1)]=-0.696257783114*x_ref[0] + (0.310365034063)*x_ref[1]
        arg[(2, 2, 2, 2)]=0.106366896878*x[0] + (-0.86403234729)*x[1]
        ref[(2, 2, 2, 2)]=0.106366896878*x_ref[0] + (-0.86403234729)*x_ref[1]
        arg[(2, 3, 0, 0)]=0.492863660074*x[0] + (-0.107070750577)*x[1]
        ref[(2, 3, 0, 0)]=0.492863660074*x_ref[0] + (-0.107070750577)*x_ref[1]
        arg[(2, 3, 0, 1)]=0.313955021521*x[0] + (-0.167859907354)*x[1]
        ref[(2, 3, 0, 1)]=0.313955021521*x_ref[0] + (-0.167859907354)*x_ref[1]
        arg[(2, 3, 0, 2)]=0.37019443583*x[0] + (0.342002623526)*x[1]
        ref[(2, 3, 0, 2)]=0.37019443583*x_ref[0] + (0.342002623526)*x_ref[1]
        arg[(2, 3, 1, 0)]=0.715503404166*x[0] + (0.441755003864)*x[1]
        ref[(2, 3, 1, 0)]=0.715503404166*x_ref[0] + (0.441755003864)*x_ref[1]
        arg[(2, 3, 1, 1)]=-0.895017376634*x[0] + (0.989767464027)*x[1]
        ref[(2, 3, 1, 1)]=-0.895017376634*x_ref[0] + (0.989767464027)*x_ref[1]
        arg[(2, 3, 1, 2)]=-0.773247388848*x[0] + (-0.522304398277)*x[1]
        ref[(2, 3, 1, 2)]=-0.773247388848*x_ref[0] + (-0.522304398277)*x_ref[1]
        arg[(2, 3, 2, 0)]=-0.722081661126*x[0] + (-0.811549523764)*x[1]
        ref[(2, 3, 2, 0)]=-0.722081661126*x_ref[0] + (-0.811549523764)*x_ref[1]
        arg[(2, 3, 2, 1)]=-0.485815772698*x[0] + (-0.482177358206)*x[1]
        ref[(2, 3, 2, 1)]=-0.485815772698*x_ref[0] + (-0.482177358206)*x_ref[1]
        arg[(2, 3, 2, 2)]=0.425505179363*x[0] + (0.386206191137)*x[1]
        ref[(2, 3, 2, 2)]=0.425505179363*x_ref[0] + (0.386206191137)*x_ref[1]
        arg[(3, 0, 0, 0)]=0.889624311612*x[0] + (0.495093289098)*x[1]
        ref[(3, 0, 0, 0)]=0.889624311612*x_ref[0] + (0.495093289098)*x_ref[1]
        arg[(3, 0, 0, 1)]=-0.295865589761*x[0] + (0.442772605251)*x[1]
        ref[(3, 0, 0, 1)]=-0.295865589761*x_ref[0] + (0.442772605251)*x_ref[1]
        arg[(3, 0, 0, 2)]=-0.801470246738*x[0] + (0.104255886792)*x[1]
        ref[(3, 0, 0, 2)]=-0.801470246738*x_ref[0] + (0.104255886792)*x_ref[1]
        arg[(3, 0, 1, 0)]=-0.681597644014*x[0] + (-0.44569908517)*x[1]
        ref[(3, 0, 1, 0)]=-0.681597644014*x_ref[0] + (-0.44569908517)*x_ref[1]
        arg[(3, 0, 1, 1)]=0.417975856019*x[0] + (0.605539340307)*x[1]
        ref[(3, 0, 1, 1)]=0.417975856019*x_ref[0] + (0.605539340307)*x_ref[1]
        arg[(3, 0, 1, 2)]=-0.881234255707*x[0] + (0.479155336436)*x[1]
        ref[(3, 0, 1, 2)]=-0.881234255707*x_ref[0] + (0.479155336436)*x_ref[1]
        arg[(3, 0, 2, 0)]=-0.883341608485*x[0] + (0.511146060007)*x[1]
        ref[(3, 0, 2, 0)]=-0.883341608485*x_ref[0] + (0.511146060007)*x_ref[1]
        arg[(3, 0, 2, 1)]=-0.368840797789*x[0] + (0.257940434394)*x[1]
        ref[(3, 0, 2, 1)]=-0.368840797789*x_ref[0] + (0.257940434394)*x_ref[1]
        arg[(3, 0, 2, 2)]=0.924420939468*x[0] + (-0.930272907179)*x[1]
        ref[(3, 0, 2, 2)]=0.924420939468*x_ref[0] + (-0.930272907179)*x_ref[1]
        arg[(3, 1, 0, 0)]=-0.845374365338*x[0] + (-0.0922524009651)*x[1]
        ref[(3, 1, 0, 0)]=-0.845374365338*x_ref[0] + (-0.0922524009651)*x_ref[1]
        arg[(3, 1, 0, 1)]=-0.352441381559*x[0] + (0.656822856031)*x[1]
        ref[(3, 1, 0, 1)]=-0.352441381559*x_ref[0] + (0.656822856031)*x_ref[1]
        arg[(3, 1, 0, 2)]=0.56792356598*x[0] + (-0.25975223007)*x[1]
        ref[(3, 1, 0, 2)]=0.56792356598*x_ref[0] + (-0.25975223007)*x_ref[1]
        arg[(3, 1, 1, 0)]=0.704143590544*x[0] + (-0.93191584867)*x[1]
        ref[(3, 1, 1, 0)]=0.704143590544*x_ref[0] + (-0.93191584867)*x_ref[1]
        arg[(3, 1, 1, 1)]=-0.779774581147*x[0] + (0.529339275691)*x[1]
        ref[(3, 1, 1, 1)]=-0.779774581147*x_ref[0] + (0.529339275691)*x_ref[1]
        arg[(3, 1, 1, 2)]=0.132824473746*x[0] + (-0.407674573713)*x[1]
        ref[(3, 1, 1, 2)]=0.132824473746*x_ref[0] + (-0.407674573713)*x_ref[1]
        arg[(3, 1, 2, 0)]=-0.556054488117*x[0] + (0.423472956559)*x[1]
        ref[(3, 1, 2, 0)]=-0.556054488117*x_ref[0] + (0.423472956559)*x_ref[1]
        arg[(3, 1, 2, 1)]=-0.636365298319*x[0] + (-0.9140582725)*x[1]
        ref[(3, 1, 2, 1)]=-0.636365298319*x_ref[0] + (-0.9140582725)*x_ref[1]
        arg[(3, 1, 2, 2)]=0.66159714543*x[0] + (0.099202651715)*x[1]
        ref[(3, 1, 2, 2)]=0.66159714543*x_ref[0] + (0.099202651715)*x_ref[1]
        arg[(3, 2, 0, 0)]=-0.0171257991158*x[0] + (0.476912758038)*x[1]
        ref[(3, 2, 0, 0)]=-0.0171257991158*x_ref[0] + (0.476912758038)*x_ref[1]
        arg[(3, 2, 0, 1)]=-0.778753536654*x[0] + (-0.916184243975)*x[1]
        ref[(3, 2, 0, 1)]=-0.778753536654*x_ref[0] + (-0.916184243975)*x_ref[1]
        arg[(3, 2, 0, 2)]=0.182104378059*x[0] + (-0.370297521401)*x[1]
        ref[(3, 2, 0, 2)]=0.182104378059*x_ref[0] + (-0.370297521401)*x_ref[1]
        arg[(3, 2, 1, 0)]=-0.239104032609*x[0] + (-0.199809889668)*x[1]
        ref[(3, 2, 1, 0)]=-0.239104032609*x_ref[0] + (-0.199809889668)*x_ref[1]
        arg[(3, 2, 1, 1)]=0.295005350969*x[0] + (0.161095042148)*x[1]
        ref[(3, 2, 1, 1)]=0.295005350969*x_ref[0] + (0.161095042148)*x_ref[1]
        arg[(3, 2, 1, 2)]=0.457211038292*x[0] + (0.677652975197)*x[1]
        ref[(3, 2, 1, 2)]=0.457211038292*x_ref[0] + (0.677652975197)*x_ref[1]
        arg[(3, 2, 2, 0)]=0.0688306903525*x[0] + (0.212160077744)*x[1]
        ref[(3, 2, 2, 0)]=0.0688306903525*x_ref[0] + (0.212160077744)*x_ref[1]
        arg[(3, 2, 2, 1)]=-0.703427940572*x[0] + (0.201042654937)*x[1]
        ref[(3, 2, 2, 1)]=-0.703427940572*x_ref[0] + (0.201042654937)*x_ref[1]
        arg[(3, 2, 2, 2)]=-0.680684170528*x[0] + (-0.204142167869)*x[1]
        ref[(3, 2, 2, 2)]=-0.680684170528*x_ref[0] + (-0.204142167869)*x_ref[1]
        arg[(3, 3, 0, 0)]=-0.495455804818*x[0] + (-0.598002864202)*x[1]
        ref[(3, 3, 0, 0)]=-0.495455804818*x_ref[0] + (-0.598002864202)*x_ref[1]
        arg[(3, 3, 0, 1)]=0.101979299736*x[0] + (-0.929758108437)*x[1]
        ref[(3, 3, 0, 1)]=0.101979299736*x_ref[0] + (-0.929758108437)*x_ref[1]
        arg[(3, 3, 0, 2)]=-0.504047555595*x[0] + (0.0554519831442)*x[1]
        ref[(3, 3, 0, 2)]=-0.504047555595*x_ref[0] + (0.0554519831442)*x_ref[1]
        arg[(3, 3, 1, 0)]=0.987526580196*x[0] + (-0.686549328263)*x[1]
        ref[(3, 3, 1, 0)]=0.987526580196*x_ref[0] + (-0.686549328263)*x_ref[1]
        arg[(3, 3, 1, 1)]=0.348325874395*x[0] + (0.209061519807)*x[1]
        ref[(3, 3, 1, 1)]=0.348325874395*x_ref[0] + (0.209061519807)*x_ref[1]
        arg[(3, 3, 1, 2)]=0.0406828334874*x[0] + (0.127454637903)*x[1]
        ref[(3, 3, 1, 2)]=0.0406828334874*x_ref[0] + (0.127454637903)*x_ref[1]
        arg[(3, 3, 2, 0)]=0.99546863156*x[0] + (0.741004466784)*x[1]
        ref[(3, 3, 2, 0)]=0.99546863156*x_ref[0] + (0.741004466784)*x_ref[1]
        arg[(3, 3, 2, 1)]=-0.614628481068*x[0] + (-0.742973726659)*x[1]
        ref[(3, 3, 2, 1)]=-0.614628481068*x_ref[0] + (-0.742973726659)*x_ref[1]
        arg[(3, 3, 2, 2)]=0.25451582417*x[0] + (-0.160914113705)*x[1]
        ref[(3, 3, 2, 2)]=0.25451582417*x_ref[0] + (-0.160914113705)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.129560957846*x[2]
            ref[(0, 0, 0, 0)]+=-0.129560957846*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.871854550353*x[2]
            ref[(0, 0, 0, 1)]+=-0.871854550353*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.599618480215*x[2]
            ref[(0, 0, 0, 2)]+=0.599618480215*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.523679548132*x[2]
            ref[(0, 0, 1, 0)]+=0.523679548132*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.816999141548*x[2]
            ref[(0, 0, 1, 1)]+=0.816999141548*x_ref[2]
            arg[(0, 0, 1, 2)]+=-0.0338749394732*x[2]
            ref[(0, 0, 1, 2)]+=-0.0338749394732*x_ref[2]
            arg[(0, 0, 2, 0)]+=0.462077733747*x[2]
            ref[(0, 0, 2, 0)]+=0.462077733747*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.313888279046*x[2]
            ref[(0, 0, 2, 1)]+=0.313888279046*x_ref[2]
            arg[(0, 0, 2, 2)]+=0.104198522987*x[2]
            ref[(0, 0, 2, 2)]+=0.104198522987*x_ref[2]
            arg[(0, 1, 0, 0)]+=0.161696638853*x[2]
            ref[(0, 1, 0, 0)]+=0.161696638853*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.0371417671322*x[2]
            ref[(0, 1, 0, 1)]+=-0.0371417671322*x_ref[2]
            arg[(0, 1, 0, 2)]+=0.144128768799*x[2]
            ref[(0, 1, 0, 2)]+=0.144128768799*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.800589657905*x[2]
            ref[(0, 1, 1, 0)]+=-0.800589657905*x_ref[2]
            arg[(0, 1, 1, 1)]+=0.463860851136*x[2]
            ref[(0, 1, 1, 1)]+=0.463860851136*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.992334205162*x[2]
            ref[(0, 1, 1, 2)]+=0.992334205162*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.595643694021*x[2]
            ref[(0, 1, 2, 0)]+=-0.595643694021*x_ref[2]
            arg[(0, 1, 2, 1)]+=0.218753185047*x[2]
            ref[(0, 1, 2, 1)]+=0.218753185047*x_ref[2]
            arg[(0, 1, 2, 2)]+=0.227034764597*x[2]
            ref[(0, 1, 2, 2)]+=0.227034764597*x_ref[2]
            arg[(0, 2, 0, 0)]+=-0.00754210950887*x[2]
            ref[(0, 2, 0, 0)]+=-0.00754210950887*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.459600557065*x[2]
            ref[(0, 2, 0, 1)]+=-0.459600557065*x_ref[2]
            arg[(0, 2, 0, 2)]+=0.49353907931*x[2]
            ref[(0, 2, 0, 2)]+=0.49353907931*x_ref[2]
            arg[(0, 2, 1, 0)]+=-0.443746117931*x[2]
            ref[(0, 2, 1, 0)]+=-0.443746117931*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.0147932127583*x[2]
            ref[(0, 2, 1, 1)]+=-0.0147932127583*x_ref[2]
            arg[(0, 2, 1, 2)]+=0.0157839166056*x[2]
            ref[(0, 2, 1, 2)]+=0.0157839166056*x_ref[2]
            arg[(0, 2, 2, 0)]+=0.317096111376*x[2]
            ref[(0, 2, 2, 0)]+=0.317096111376*x_ref[2]
            arg[(0, 2, 2, 1)]+=-0.118111050429*x[2]
            ref[(0, 2, 2, 1)]+=-0.118111050429*x_ref[2]
            arg[(0, 2, 2, 2)]+=0.181880515735*x[2]
            ref[(0, 2, 2, 2)]+=0.181880515735*x_ref[2]
            arg[(0, 3, 0, 0)]+=-0.394215708271*x[2]
            ref[(0, 3, 0, 0)]+=-0.394215708271*x_ref[2]
            arg[(0, 3, 0, 1)]+=0.21870859004*x[2]
            ref[(0, 3, 0, 1)]+=0.21870859004*x_ref[2]
            arg[(0, 3, 0, 2)]+=-0.0346225157862*x[2]
            ref[(0, 3, 0, 2)]+=-0.0346225157862*x_ref[2]
            arg[(0, 3, 1, 0)]+=0.999661627663*x[2]
            ref[(0, 3, 1, 0)]+=0.999661627663*x_ref[2]
            arg[(0, 3, 1, 1)]+=-0.846972756708*x[2]
            ref[(0, 3, 1, 1)]+=-0.846972756708*x_ref[2]
            arg[(0, 3, 1, 2)]+=0.806269280988*x[2]
            ref[(0, 3, 1, 2)]+=0.806269280988*x_ref[2]
            arg[(0, 3, 2, 0)]+=-0.244727274988*x[2]
            ref[(0, 3, 2, 0)]+=-0.244727274988*x_ref[2]
            arg[(0, 3, 2, 1)]+=0.325449858198*x[2]
            ref[(0, 3, 2, 1)]+=0.325449858198*x_ref[2]
            arg[(0, 3, 2, 2)]+=-0.837318004739*x[2]
            ref[(0, 3, 2, 2)]+=-0.837318004739*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.129975463642*x[2]
            ref[(1, 0, 0, 0)]+=-0.129975463642*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.965123597065*x[2]
            ref[(1, 0, 0, 1)]+=0.965123597065*x_ref[2]
            arg[(1, 0, 0, 2)]+=-0.337005654611*x[2]
            ref[(1, 0, 0, 2)]+=-0.337005654611*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.878425184307*x[2]
            ref[(1, 0, 1, 0)]+=-0.878425184307*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.418791850063*x[2]
            ref[(1, 0, 1, 1)]+=0.418791850063*x_ref[2]
            arg[(1, 0, 1, 2)]+=-0.642666825672*x[2]
            ref[(1, 0, 1, 2)]+=-0.642666825672*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.747506283159*x[2]
            ref[(1, 0, 2, 0)]+=-0.747506283159*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.200353460471*x[2]
            ref[(1, 0, 2, 1)]+=0.200353460471*x_ref[2]
            arg[(1, 0, 2, 2)]+=0.496686827731*x[2]
            ref[(1, 0, 2, 2)]+=0.496686827731*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.0177308808834*x[2]
            ref[(1, 1, 0, 0)]+=-0.0177308808834*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.391840934664*x[2]
            ref[(1, 1, 0, 1)]+=0.391840934664*x_ref[2]
            arg[(1, 1, 0, 2)]+=0.975766261795*x[2]
            ref[(1, 1, 0, 2)]+=0.975766261795*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.424693593056*x[2]
            ref[(1, 1, 1, 0)]+=0.424693593056*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.166836473475*x[2]
            ref[(1, 1, 1, 1)]+=0.166836473475*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.47234904737*x[2]
            ref[(1, 1, 1, 2)]+=-0.47234904737*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.288613450249*x[2]
            ref[(1, 1, 2, 0)]+=-0.288613450249*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.721277152871*x[2]
            ref[(1, 1, 2, 1)]+=0.721277152871*x_ref[2]
            arg[(1, 1, 2, 2)]+=-0.191334494363*x[2]
            ref[(1, 1, 2, 2)]+=-0.191334494363*x_ref[2]
            arg[(1, 2, 0, 0)]+=0.750364178526*x[2]
            ref[(1, 2, 0, 0)]+=0.750364178526*x_ref[2]
            arg[(1, 2, 0, 1)]+=-0.461826025575*x[2]
            ref[(1, 2, 0, 1)]+=-0.461826025575*x_ref[2]
            arg[(1, 2, 0, 2)]+=-0.520286377961*x[2]
            ref[(1, 2, 0, 2)]+=-0.520286377961*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.227049858997*x[2]
            ref[(1, 2, 1, 0)]+=0.227049858997*x_ref[2]
            arg[(1, 2, 1, 1)]+=-0.423592416404*x[2]
            ref[(1, 2, 1, 1)]+=-0.423592416404*x_ref[2]
            arg[(1, 2, 1, 2)]+=-0.19345571892*x[2]
            ref[(1, 2, 1, 2)]+=-0.19345571892*x_ref[2]
            arg[(1, 2, 2, 0)]+=0.381430938908*x[2]
            ref[(1, 2, 2, 0)]+=0.381430938908*x_ref[2]
            arg[(1, 2, 2, 1)]+=-0.950825244433*x[2]
            ref[(1, 2, 2, 1)]+=-0.950825244433*x_ref[2]
            arg[(1, 2, 2, 2)]+=-0.961716670758*x[2]
            ref[(1, 2, 2, 2)]+=-0.961716670758*x_ref[2]
            arg[(1, 3, 0, 0)]+=0.312084873169*x[2]
            ref[(1, 3, 0, 0)]+=0.312084873169*x_ref[2]
            arg[(1, 3, 0, 1)]+=0.263223747305*x[2]
            ref[(1, 3, 0, 1)]+=0.263223747305*x_ref[2]
            arg[(1, 3, 0, 2)]+=-0.675536583453*x[2]
            ref[(1, 3, 0, 2)]+=-0.675536583453*x_ref[2]
            arg[(1, 3, 1, 0)]+=-0.339483281776*x[2]
            ref[(1, 3, 1, 0)]+=-0.339483281776*x_ref[2]
            arg[(1, 3, 1, 1)]+=-0.194649709062*x[2]
            ref[(1, 3, 1, 1)]+=-0.194649709062*x_ref[2]
            arg[(1, 3, 1, 2)]+=-0.356865719943*x[2]
            ref[(1, 3, 1, 2)]+=-0.356865719943*x_ref[2]
            arg[(1, 3, 2, 0)]+=0.324943807941*x[2]
            ref[(1, 3, 2, 0)]+=0.324943807941*x_ref[2]
            arg[(1, 3, 2, 1)]+=0.335259001628*x[2]
            ref[(1, 3, 2, 1)]+=0.335259001628*x_ref[2]
            arg[(1, 3, 2, 2)]+=-0.571600784068*x[2]
            ref[(1, 3, 2, 2)]+=-0.571600784068*x_ref[2]
            arg[(2, 0, 0, 0)]+=-0.444589115918*x[2]
            ref[(2, 0, 0, 0)]+=-0.444589115918*x_ref[2]
            arg[(2, 0, 0, 1)]+=-0.756521135832*x[2]
            ref[(2, 0, 0, 1)]+=-0.756521135832*x_ref[2]
            arg[(2, 0, 0, 2)]+=-0.685267675534*x[2]
            ref[(2, 0, 0, 2)]+=-0.685267675534*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.368065366464*x[2]
            ref[(2, 0, 1, 0)]+=-0.368065366464*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.30712148307*x[2]
            ref[(2, 0, 1, 1)]+=0.30712148307*x_ref[2]
            arg[(2, 0, 1, 2)]+=-0.511714290198*x[2]
            ref[(2, 0, 1, 2)]+=-0.511714290198*x_ref[2]
            arg[(2, 0, 2, 0)]+=-0.500538348537*x[2]
            ref[(2, 0, 2, 0)]+=-0.500538348537*x_ref[2]
            arg[(2, 0, 2, 1)]+=-0.270991984322*x[2]
            ref[(2, 0, 2, 1)]+=-0.270991984322*x_ref[2]
            arg[(2, 0, 2, 2)]+=-0.4406332445*x[2]
            ref[(2, 0, 2, 2)]+=-0.4406332445*x_ref[2]
            arg[(2, 1, 0, 0)]+=-0.779325341886*x[2]
            ref[(2, 1, 0, 0)]+=-0.779325341886*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.149765713427*x[2]
            ref[(2, 1, 0, 1)]+=-0.149765713427*x_ref[2]
            arg[(2, 1, 0, 2)]+=0.247853492606*x[2]
            ref[(2, 1, 0, 2)]+=0.247853492606*x_ref[2]
            arg[(2, 1, 1, 0)]+=-0.894412257156*x[2]
            ref[(2, 1, 1, 0)]+=-0.894412257156*x_ref[2]
            arg[(2, 1, 1, 1)]+=0.578316870713*x[2]
            ref[(2, 1, 1, 1)]+=0.578316870713*x_ref[2]
            arg[(2, 1, 1, 2)]+=0.229968165451*x[2]
            ref[(2, 1, 1, 2)]+=0.229968165451*x_ref[2]
            arg[(2, 1, 2, 0)]+=0.532905907742*x[2]
            ref[(2, 1, 2, 0)]+=0.532905907742*x_ref[2]
            arg[(2, 1, 2, 1)]+=-0.922789813758*x[2]
            ref[(2, 1, 2, 1)]+=-0.922789813758*x_ref[2]
            arg[(2, 1, 2, 2)]+=-0.469219314248*x[2]
            ref[(2, 1, 2, 2)]+=-0.469219314248*x_ref[2]
            arg[(2, 2, 0, 0)]+=0.616057871397*x[2]
            ref[(2, 2, 0, 0)]+=0.616057871397*x_ref[2]
            arg[(2, 2, 0, 1)]+=-0.361179375959*x[2]
            ref[(2, 2, 0, 1)]+=-0.361179375959*x_ref[2]
            arg[(2, 2, 0, 2)]+=-0.197844137884*x[2]
            ref[(2, 2, 0, 2)]+=-0.197844137884*x_ref[2]
            arg[(2, 2, 1, 0)]+=-0.0211892440641*x[2]
            ref[(2, 2, 1, 0)]+=-0.0211892440641*x_ref[2]
            arg[(2, 2, 1, 1)]+=-0.874777103937*x[2]
            ref[(2, 2, 1, 1)]+=-0.874777103937*x_ref[2]
            arg[(2, 2, 1, 2)]+=-0.899503291968*x[2]
            ref[(2, 2, 1, 2)]+=-0.899503291968*x_ref[2]
            arg[(2, 2, 2, 0)]+=0.468195335216*x[2]
            ref[(2, 2, 2, 0)]+=0.468195335216*x_ref[2]
            arg[(2, 2, 2, 1)]+=-0.76947038373*x[2]
            ref[(2, 2, 2, 1)]+=-0.76947038373*x_ref[2]
            arg[(2, 2, 2, 2)]+=-0.0081754288163*x[2]
            ref[(2, 2, 2, 2)]+=-0.0081754288163*x_ref[2]
            arg[(2, 3, 0, 0)]+=0.300299246368*x[2]
            ref[(2, 3, 0, 0)]+=0.300299246368*x_ref[2]
            arg[(2, 3, 0, 1)]+=-0.109194381232*x[2]
            ref[(2, 3, 0, 1)]+=-0.109194381232*x_ref[2]
            arg[(2, 3, 0, 2)]+=0.699235798257*x[2]
            ref[(2, 3, 0, 2)]+=0.699235798257*x_ref[2]
            arg[(2, 3, 1, 0)]+=-0.997770554846*x[2]
            ref[(2, 3, 1, 0)]+=-0.997770554846*x_ref[2]
            arg[(2, 3, 1, 1)]+=0.529766688825*x[2]
            ref[(2, 3, 1, 1)]+=0.529766688825*x_ref[2]
            arg[(2, 3, 1, 2)]+=-0.877062547355*x[2]
            ref[(2, 3, 1, 2)]+=-0.877062547355*x_ref[2]
            arg[(2, 3, 2, 0)]+=-0.131530508663*x[2]
            ref[(2, 3, 2, 0)]+=-0.131530508663*x_ref[2]
            arg[(2, 3, 2, 1)]+=0.862465736303*x[2]
            ref[(2, 3, 2, 1)]+=0.862465736303*x_ref[2]
            arg[(2, 3, 2, 2)]+=-0.226138705905*x[2]
            ref[(2, 3, 2, 2)]+=-0.226138705905*x_ref[2]
            arg[(3, 0, 0, 0)]+=0.620353388297*x[2]
            ref[(3, 0, 0, 0)]+=0.620353388297*x_ref[2]
            arg[(3, 0, 0, 1)]+=0.483151180983*x[2]
            ref[(3, 0, 0, 1)]+=0.483151180983*x_ref[2]
            arg[(3, 0, 0, 2)]+=0.748995842328*x[2]
            ref[(3, 0, 0, 2)]+=0.748995842328*x_ref[2]
            arg[(3, 0, 1, 0)]+=-0.238086277391*x[2]
            ref[(3, 0, 1, 0)]+=-0.238086277391*x_ref[2]
            arg[(3, 0, 1, 1)]+=0.648161958047*x[2]
            ref[(3, 0, 1, 1)]+=0.648161958047*x_ref[2]
            arg[(3, 0, 1, 2)]+=0.591662784309*x[2]
            ref[(3, 0, 1, 2)]+=0.591662784309*x_ref[2]
            arg[(3, 0, 2, 0)]+=-0.955801654982*x[2]
            ref[(3, 0, 2, 0)]+=-0.955801654982*x_ref[2]
            arg[(3, 0, 2, 1)]+=0.544346915224*x[2]
            ref[(3, 0, 2, 1)]+=0.544346915224*x_ref[2]
            arg[(3, 0, 2, 2)]+=0.783460552373*x[2]
            ref[(3, 0, 2, 2)]+=0.783460552373*x_ref[2]
            arg[(3, 1, 0, 0)]+=0.396200746725*x[2]
            ref[(3, 1, 0, 0)]+=0.396200746725*x_ref[2]
            arg[(3, 1, 0, 1)]+=-0.168789685228*x[2]
            ref[(3, 1, 0, 1)]+=-0.168789685228*x_ref[2]
            arg[(3, 1, 0, 2)]+=-0.010821592123*x[2]
            ref[(3, 1, 0, 2)]+=-0.010821592123*x_ref[2]
            arg[(3, 1, 1, 0)]+=-0.927700744024*x[2]
            ref[(3, 1, 1, 0)]+=-0.927700744024*x_ref[2]
            arg[(3, 1, 1, 1)]+=-0.868709747199*x[2]
            ref[(3, 1, 1, 1)]+=-0.868709747199*x_ref[2]
            arg[(3, 1, 1, 2)]+=0.672048856451*x[2]
            ref[(3, 1, 1, 2)]+=0.672048856451*x_ref[2]
            arg[(3, 1, 2, 0)]+=-0.651102293733*x[2]
            ref[(3, 1, 2, 0)]+=-0.651102293733*x_ref[2]
            arg[(3, 1, 2, 1)]+=0.897959461428*x[2]
            ref[(3, 1, 2, 1)]+=0.897959461428*x_ref[2]
            arg[(3, 1, 2, 2)]+=-0.227011741882*x[2]
            ref[(3, 1, 2, 2)]+=-0.227011741882*x_ref[2]
            arg[(3, 2, 0, 0)]+=0.998110153925*x[2]
            ref[(3, 2, 0, 0)]+=0.998110153925*x_ref[2]
            arg[(3, 2, 0, 1)]+=0.186063431737*x[2]
            ref[(3, 2, 0, 1)]+=0.186063431737*x_ref[2]
            arg[(3, 2, 0, 2)]+=-0.702712691787*x[2]
            ref[(3, 2, 0, 2)]+=-0.702712691787*x_ref[2]
            arg[(3, 2, 1, 0)]+=0.643364076728*x[2]
            ref[(3, 2, 1, 0)]+=0.643364076728*x_ref[2]
            arg[(3, 2, 1, 1)]+=0.369054437157*x[2]
            ref[(3, 2, 1, 1)]+=0.369054437157*x_ref[2]
            arg[(3, 2, 1, 2)]+=0.289525745067*x[2]
            ref[(3, 2, 1, 2)]+=0.289525745067*x_ref[2]
            arg[(3, 2, 2, 0)]+=0.388268306898*x[2]
            ref[(3, 2, 2, 0)]+=0.388268306898*x_ref[2]
            arg[(3, 2, 2, 1)]+=-0.364563788918*x[2]
            ref[(3, 2, 2, 1)]+=-0.364563788918*x_ref[2]
            arg[(3, 2, 2, 2)]+=0.11526595332*x[2]
            ref[(3, 2, 2, 2)]+=0.11526595332*x_ref[2]
            arg[(3, 3, 0, 0)]+=-0.46720543701*x[2]
            ref[(3, 3, 0, 0)]+=-0.46720543701*x_ref[2]
            arg[(3, 3, 0, 1)]+=-0.0323085495425*x[2]
            ref[(3, 3, 0, 1)]+=-0.0323085495425*x_ref[2]
            arg[(3, 3, 0, 2)]+=0.311848384056*x[2]
            ref[(3, 3, 0, 2)]+=0.311848384056*x_ref[2]
            arg[(3, 3, 1, 0)]+=0.26322574238*x[2]
            ref[(3, 3, 1, 0)]+=0.26322574238*x_ref[2]
            arg[(3, 3, 1, 1)]+=-0.294593832256*x[2]
            ref[(3, 3, 1, 1)]+=-0.294593832256*x_ref[2]
            arg[(3, 3, 1, 2)]+=-0.0279999055588*x[2]
            ref[(3, 3, 1, 2)]+=-0.0279999055588*x_ref[2]
            arg[(3, 3, 2, 0)]+=-0.804999158238*x[2]
            ref[(3, 3, 2, 0)]+=-0.804999158238*x_ref[2]
            arg[(3, 3, 2, 1)]+=0.644625155091*x[2]
            ref[(3, 3, 2, 1)]+=0.644625155091*x_ref[2]
            arg[(3, 3, 2, 2)]+=0.617988149654*x[2]
            ref[(3, 3, 2, 2)]+=0.617988149654*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.861027576513*x[0] + (0.293003782513)*x[1]
        ref=0.861027576513*x_ref[0] + (0.293003782513)*x_ref[1]
        if dim==3:
            arg+=(-0.96615932809)*x[2]
            ref+=(-0.96615932809)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=0.180595711514*x[0] + (0.281311361171)*x[1]
        ref[(0,)]=0.180595711514*x_ref[0] + (0.281311361171)*x_ref[1]
        arg[(1,)]=-0.917770815172*x[0] + (-0.376349101032)*x[1]
        ref[(1,)]=-0.917770815172*x_ref[0] + (-0.376349101032)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.238178024934*x[2]
            ref[(0,)]+=-0.238178024934*x_ref[2]
            arg[(1,)]+=-0.526377305362*x[2]
            ref[(1,)]+=-0.526377305362*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref = Data(0,(2, 4),w_ref)
        arg[(0, 0)]=-0.103139452652*x[0] + (0.386905385783)*x[1]
        ref[(0, 0)]=-0.103139452652*x_ref[0] + (0.386905385783)*x_ref[1]
        arg[(0, 1)]=-0.838350728384*x[0] + (0.0384980470947)*x[1]
        ref[(0, 1)]=-0.838350728384*x_ref[0] + (0.0384980470947)*x_ref[1]
        arg[(0, 2)]=-0.521835047498*x[0] + (-0.850734507492)*x[1]
        ref[(0, 2)]=-0.521835047498*x_ref[0] + (-0.850734507492)*x_ref[1]
        arg[(0, 3)]=-0.741911845628*x[0] + (-0.167475806216)*x[1]
        ref[(0, 3)]=-0.741911845628*x_ref[0] + (-0.167475806216)*x_ref[1]
        arg[(1, 0)]=0.0256463609684*x[0] + (0.543919168808)*x[1]
        ref[(1, 0)]=0.0256463609684*x_ref[0] + (0.543919168808)*x_ref[1]
        arg[(1, 1)]=0.922266576805*x[0] + (0.708924809648)*x[1]
        ref[(1, 1)]=0.922266576805*x_ref[0] + (0.708924809648)*x_ref[1]
        arg[(1, 2)]=0.409547017508*x[0] + (0.714289131558)*x[1]
        ref[(1, 2)]=0.409547017508*x_ref[0] + (0.714289131558)*x_ref[1]
        arg[(1, 3)]=-0.612095353811*x[0] + (0.140832750693)*x[1]
        ref[(1, 3)]=-0.612095353811*x_ref[0] + (0.140832750693)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.539238554961*x[2]
            ref[(0, 0)]+=0.539238554961*x_ref[2]
            arg[(0, 1)]+=-0.280711096313*x[2]
            ref[(0, 1)]+=-0.280711096313*x_ref[2]
            arg[(0, 2)]+=0.828959604922*x[2]
            ref[(0, 2)]+=0.828959604922*x_ref[2]
            arg[(0, 3)]+=0.762619132594*x[2]
            ref[(0, 3)]+=0.762619132594*x_ref[2]
            arg[(1, 0)]+=0.756227330485*x[2]
            ref[(1, 0)]+=0.756227330485*x_ref[2]
            arg[(1, 1)]+=0.515434269086*x[2]
            ref[(1, 1)]+=0.515434269086*x_ref[2]
            arg[(1, 2)]+=-0.657768179121*x[2]
            ref[(1, 2)]+=-0.657768179121*x_ref[2]
            arg[(1, 3)]+=-0.469863738776*x[2]
            ref[(1, 3)]+=-0.469863738776*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 4),w)
        ref = Data(0,(2, 2, 4),w_ref)
        arg[(0, 0, 0)]=0.730588315951*x[0] + (-0.17737041058)*x[1]
        ref[(0, 0, 0)]=0.730588315951*x_ref[0] + (-0.17737041058)*x_ref[1]
        arg[(0, 0, 1)]=-0.940382533983*x[0] + (-0.889857042161)*x[1]
        ref[(0, 0, 1)]=-0.940382533983*x_ref[0] + (-0.889857042161)*x_ref[1]
        arg[(0, 0, 2)]=0.795142203167*x[0] + (-0.902441027794)*x[1]
        ref[(0, 0, 2)]=0.795142203167*x_ref[0] + (-0.902441027794)*x_ref[1]
        arg[(0, 0, 3)]=-0.93675197086*x[0] + (0.105328136207)*x[1]
        ref[(0, 0, 3)]=-0.93675197086*x_ref[0] + (0.105328136207)*x_ref[1]
        arg[(0, 1, 0)]=-0.898679708394*x[0] + (-0.839321133249)*x[1]
        ref[(0, 1, 0)]=-0.898679708394*x_ref[0] + (-0.839321133249)*x_ref[1]
        arg[(0, 1, 1)]=0.464258961395*x[0] + (-0.739418272829)*x[1]
        ref[(0, 1, 1)]=0.464258961395*x_ref[0] + (-0.739418272829)*x_ref[1]
        arg[(0, 1, 2)]=-0.391082247898*x[0] + (-0.566521870856)*x[1]
        ref[(0, 1, 2)]=-0.391082247898*x_ref[0] + (-0.566521870856)*x_ref[1]
        arg[(0, 1, 3)]=0.85841638089*x[0] + (0.440303658739)*x[1]
        ref[(0, 1, 3)]=0.85841638089*x_ref[0] + (0.440303658739)*x_ref[1]
        arg[(1, 0, 0)]=0.418765799583*x[0] + (-0.518242437696)*x[1]
        ref[(1, 0, 0)]=0.418765799583*x_ref[0] + (-0.518242437696)*x_ref[1]
        arg[(1, 0, 1)]=0.429534752714*x[0] + (-0.463260245006)*x[1]
        ref[(1, 0, 1)]=0.429534752714*x_ref[0] + (-0.463260245006)*x_ref[1]
        arg[(1, 0, 2)]=-0.652470489796*x[0] + (0.353102717214)*x[1]
        ref[(1, 0, 2)]=-0.652470489796*x_ref[0] + (0.353102717214)*x_ref[1]
        arg[(1, 0, 3)]=-0.886531050011*x[0] + (-0.0893204025307)*x[1]
        ref[(1, 0, 3)]=-0.886531050011*x_ref[0] + (-0.0893204025307)*x_ref[1]
        arg[(1, 1, 0)]=0.923475559181*x[0] + (0.139137588654)*x[1]
        ref[(1, 1, 0)]=0.923475559181*x_ref[0] + (0.139137588654)*x_ref[1]
        arg[(1, 1, 1)]=-0.0334247154717*x[0] + (-0.847155762213)*x[1]
        ref[(1, 1, 1)]=-0.0334247154717*x_ref[0] + (-0.847155762213)*x_ref[1]
        arg[(1, 1, 2)]=0.0737280534053*x[0] + (0.197122209097)*x[1]
        ref[(1, 1, 2)]=0.0737280534053*x_ref[0] + (0.197122209097)*x_ref[1]
        arg[(1, 1, 3)]=-0.012708928699*x[0] + (0.148321046403)*x[1]
        ref[(1, 1, 3)]=-0.012708928699*x_ref[0] + (0.148321046403)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.913459587118*x[2]
            ref[(0, 0, 0)]+=0.913459587118*x_ref[2]
            arg[(0, 0, 1)]+=0.447178696009*x[2]
            ref[(0, 0, 1)]+=0.447178696009*x_ref[2]
            arg[(0, 0, 2)]+=-0.704784951085*x[2]
            ref[(0, 0, 2)]+=-0.704784951085*x_ref[2]
            arg[(0, 0, 3)]+=-0.503766680046*x[2]
            ref[(0, 0, 3)]+=-0.503766680046*x_ref[2]
            arg[(0, 1, 0)]+=0.617099249691*x[2]
            ref[(0, 1, 0)]+=0.617099249691*x_ref[2]
            arg[(0, 1, 1)]+=0.912176431509*x[2]
            ref[(0, 1, 1)]+=0.912176431509*x_ref[2]
            arg[(0, 1, 2)]+=-0.207565651178*x[2]
            ref[(0, 1, 2)]+=-0.207565651178*x_ref[2]
            arg[(0, 1, 3)]+=-0.440012527968*x[2]
            ref[(0, 1, 3)]+=-0.440012527968*x_ref[2]
            arg[(1, 0, 0)]+=-0.67172558308*x[2]
            ref[(1, 0, 0)]+=-0.67172558308*x_ref[2]
            arg[(1, 0, 1)]+=-0.976670382173*x[2]
            ref[(1, 0, 1)]+=-0.976670382173*x_ref[2]
            arg[(1, 0, 2)]+=-0.447303427181*x[2]
            ref[(1, 0, 2)]+=-0.447303427181*x_ref[2]
            arg[(1, 0, 3)]+=0.548801298715*x[2]
            ref[(1, 0, 3)]+=0.548801298715*x_ref[2]
            arg[(1, 1, 0)]+=0.758351596186*x[2]
            ref[(1, 1, 0)]+=0.758351596186*x_ref[2]
            arg[(1, 1, 1)]+=0.675892156121*x[2]
            ref[(1, 1, 1)]+=0.675892156121*x_ref[2]
            arg[(1, 1, 2)]+=-0.761622327202*x[2]
            ref[(1, 1, 2)]+=-0.761622327202*x_ref[2]
            arg[(1, 1, 3)]+=-0.848564499699*x[2]
            ref[(1, 1, 3)]+=-0.848564499699*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 3, 2),w)
        ref = Data(0,(2, 2, 3, 2),w_ref)
        arg[(0, 0, 0, 0)]=-0.697806692809*x[0] + (0.627645040005)*x[1]
        ref[(0, 0, 0, 0)]=-0.697806692809*x_ref[0] + (0.627645040005)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.915201569078*x[0] + (0.866999815205)*x[1]
        ref[(0, 0, 0, 1)]=0.915201569078*x_ref[0] + (0.866999815205)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.785962870507*x[0] + (0.372451310683)*x[1]
        ref[(0, 0, 1, 0)]=-0.785962870507*x_ref[0] + (0.372451310683)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.581798432436*x[0] + (-0.82318257759)*x[1]
        ref[(0, 0, 1, 1)]=0.581798432436*x_ref[0] + (-0.82318257759)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.438610088791*x[0] + (-0.75119438542)*x[1]
        ref[(0, 0, 2, 0)]=-0.438610088791*x_ref[0] + (-0.75119438542)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.125839030484*x[0] + (0.71042592613)*x[1]
        ref[(0, 0, 2, 1)]=-0.125839030484*x_ref[0] + (0.71042592613)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.776132604911*x[0] + (-0.811084608636)*x[1]
        ref[(0, 1, 0, 0)]=0.776132604911*x_ref[0] + (-0.811084608636)*x_ref[1]
        arg[(0, 1, 0, 1)]=-0.188901255571*x[0] + (-0.391847985145)*x[1]
        ref[(0, 1, 0, 1)]=-0.188901255571*x_ref[0] + (-0.391847985145)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.107343924314*x[0] + (0.967863363529)*x[1]
        ref[(0, 1, 1, 0)]=-0.107343924314*x_ref[0] + (0.967863363529)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.933307865971*x[0] + (0.346805061821)*x[1]
        ref[(0, 1, 1, 1)]=0.933307865971*x_ref[0] + (0.346805061821)*x_ref[1]
        arg[(0, 1, 2, 0)]=0.0649381907608*x[0] + (-0.659269921701)*x[1]
        ref[(0, 1, 2, 0)]=0.0649381907608*x_ref[0] + (-0.659269921701)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.388922859454*x[0] + (0.110630305754)*x[1]
        ref[(0, 1, 2, 1)]=0.388922859454*x_ref[0] + (0.110630305754)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.423083882624*x[0] + (0.812119414919)*x[1]
        ref[(1, 0, 0, 0)]=-0.423083882624*x_ref[0] + (0.812119414919)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.550276016407*x[0] + (-0.979043124188)*x[1]
        ref[(1, 0, 0, 1)]=-0.550276016407*x_ref[0] + (-0.979043124188)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.850848258417*x[0] + (0.994945060996)*x[1]
        ref[(1, 0, 1, 0)]=-0.850848258417*x_ref[0] + (0.994945060996)*x_ref[1]
        arg[(1, 0, 1, 1)]=-0.462326675857*x[0] + (-0.760307220347)*x[1]
        ref[(1, 0, 1, 1)]=-0.462326675857*x_ref[0] + (-0.760307220347)*x_ref[1]
        arg[(1, 0, 2, 0)]=0.786279718173*x[0] + (0.154455854695)*x[1]
        ref[(1, 0, 2, 0)]=0.786279718173*x_ref[0] + (0.154455854695)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.0852071335033*x[0] + (0.386602610749)*x[1]
        ref[(1, 0, 2, 1)]=0.0852071335033*x_ref[0] + (0.386602610749)*x_ref[1]
        arg[(1, 1, 0, 0)]=0.882434367735*x[0] + (-0.482853939027)*x[1]
        ref[(1, 1, 0, 0)]=0.882434367735*x_ref[0] + (-0.482853939027)*x_ref[1]
        arg[(1, 1, 0, 1)]=-0.294346717176*x[0] + (0.15953347635)*x[1]
        ref[(1, 1, 0, 1)]=-0.294346717176*x_ref[0] + (0.15953347635)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.377728863446*x[0] + (0.122689493751)*x[1]
        ref[(1, 1, 1, 0)]=0.377728863446*x_ref[0] + (0.122689493751)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.50300465497*x[0] + (-0.381676065149)*x[1]
        ref[(1, 1, 1, 1)]=-0.50300465497*x_ref[0] + (-0.381676065149)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.0250185778246*x[0] + (-0.470600928461)*x[1]
        ref[(1, 1, 2, 0)]=-0.0250185778246*x_ref[0] + (-0.470600928461)*x_ref[1]
        arg[(1, 1, 2, 1)]=0.151579783825*x[0] + (-0.230042613686)*x[1]
        ref[(1, 1, 2, 1)]=0.151579783825*x_ref[0] + (-0.230042613686)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.24207213376*x[2]
            ref[(0, 0, 0, 0)]+=-0.24207213376*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.199712136772*x[2]
            ref[(0, 0, 0, 1)]+=0.199712136772*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.956920615657*x[2]
            ref[(0, 0, 1, 0)]+=0.956920615657*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.119966089259*x[2]
            ref[(0, 0, 1, 1)]+=0.119966089259*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.184533339789*x[2]
            ref[(0, 0, 2, 0)]+=-0.184533339789*x_ref[2]
            arg[(0, 0, 2, 1)]+=-0.887065610172*x[2]
            ref[(0, 0, 2, 1)]+=-0.887065610172*x_ref[2]
            arg[(0, 1, 0, 0)]+=0.809630269543*x[2]
            ref[(0, 1, 0, 0)]+=0.809630269543*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.715079539879*x[2]
            ref[(0, 1, 0, 1)]+=0.715079539879*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.74472345768*x[2]
            ref[(0, 1, 1, 0)]+=0.74472345768*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.518120846236*x[2]
            ref[(0, 1, 1, 1)]+=-0.518120846236*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.930833540445*x[2]
            ref[(0, 1, 2, 0)]+=-0.930833540445*x_ref[2]
            arg[(0, 1, 2, 1)]+=-0.889871839818*x[2]
            ref[(0, 1, 2, 1)]+=-0.889871839818*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.081390879338*x[2]
            ref[(1, 0, 0, 0)]+=-0.081390879338*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.765645285128*x[2]
            ref[(1, 0, 0, 1)]+=-0.765645285128*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.923324486865*x[2]
            ref[(1, 0, 1, 0)]+=0.923324486865*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.238602390008*x[2]
            ref[(1, 0, 1, 1)]+=0.238602390008*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.423850709398*x[2]
            ref[(1, 0, 2, 0)]+=-0.423850709398*x_ref[2]
            arg[(1, 0, 2, 1)]+=-0.210810297536*x[2]
            ref[(1, 0, 2, 1)]+=-0.210810297536*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.459853434178*x[2]
            ref[(1, 1, 0, 0)]+=-0.459853434178*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.628516009574*x[2]
            ref[(1, 1, 0, 1)]+=-0.628516009574*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.293142078253*x[2]
            ref[(1, 1, 1, 0)]+=-0.293142078253*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.42847920549*x[2]
            ref[(1, 1, 1, 1)]+=0.42847920549*x_ref[2]
            arg[(1, 1, 2, 0)]+=0.343861228113*x[2]
            ref[(1, 1, 2, 0)]+=0.343861228113*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.0122866762581*x[2]
            ref[(1, 1, 2, 1)]+=0.0122866762581*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank0(self):
        """
        tests interpolation of rank 0 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.0691967695776*x[0]**o + (-0.552693682725)*x[0] + (-0.814267320339)*x[1]**o + (-0.108759907876)*x[1]
        ref=-0.0691967695776*x_ref[0]**o + (-0.552693682725)*x_ref[0] + (-0.814267320339)*x_ref[1]**o + (-0.108759907876)*x_ref[1]
        if dim==3:
            arg+=(0.867445332266)*x[2]**o + (0.470859342869)*x[2]
            ref+=(0.867445332266)*x_ref[2]**o + (0.470859342869)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank1(self):
        """
        tests interpolation of rank 1 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=-0.849960425998*x[0]**o + (0.257691362309)*x[0] + (-0.20410368171)*x[1]**o + (0.708697041568)*x[1]
        ref[(0,)]=-0.849960425998*x_ref[0]**o + (0.257691362309)*x_ref[0] + (-0.20410368171)*x_ref[1]**o + (0.708697041568)*x_ref[1]
        arg[(1,)]=-0.894041127746*x[0]**o + (-0.332509007373)*x[0] + (0.735797667958)*x[1]**o + (-0.760095361987)*x[1]
        ref[(1,)]=-0.894041127746*x_ref[0]**o + (-0.332509007373)*x_ref[0] + (0.735797667958)*x_ref[1]**o + (-0.760095361987)*x_ref[1]
        arg[(2,)]=0.386207342225*x[0]**o + (-0.534656896905)*x[0] + (-0.386857953994)*x[1]**o + (-0.595332720769)*x[1]
        ref[(2,)]=0.386207342225*x_ref[0]**o + (-0.534656896905)*x_ref[0] + (-0.386857953994)*x_ref[1]**o + (-0.595332720769)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.461315276833*x[2]**o + (0.463288162093)*x[2]
            ref[(0,)]+=0.461315276833*x_ref[2]**o + (0.463288162093)*x_ref[2]
            arg[(1,)]+=-0.343078300304*x[2]**o + (-0.76259990046)*x[2]
            ref[(1,)]+=-0.343078300304*x_ref[2]**o + (-0.76259990046)*x_ref[2]
            arg[(2,)]+=-0.458882126031*x[2]**o + (-0.328144735635)*x[2]
            ref[(2,)]+=-0.458882126031*x_ref[2]**o + (-0.328144735635)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank2(self):
        """
        tests interpolation of rank 2 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref = Data(0,(4, 3),w_ref)
        arg[(0, 0)]=-0.388017370246*x[0]**o + (-0.703767376444)*x[0] + (0.122187455052)*x[1]**o + (0.0883950861444)*x[1]
        ref[(0, 0)]=-0.388017370246*x_ref[0]**o + (-0.703767376444)*x_ref[0] + (0.122187455052)*x_ref[1]**o + (0.0883950861444)*x_ref[1]
        arg[(0, 1)]=-0.525115436838*x[0]**o + (0.230004089005)*x[0] + (-0.762185980538)*x[1]**o + (-0.877462059826)*x[1]
        ref[(0, 1)]=-0.525115436838*x_ref[0]**o + (0.230004089005)*x_ref[0] + (-0.762185980538)*x_ref[1]**o + (-0.877462059826)*x_ref[1]
        arg[(0, 2)]=-0.685477321419*x[0]**o + (-0.12691532659)*x[0] + (-0.999202652867)*x[1]**o + (0.337901741076)*x[1]
        ref[(0, 2)]=-0.685477321419*x_ref[0]**o + (-0.12691532659)*x_ref[0] + (-0.999202652867)*x_ref[1]**o + (0.337901741076)*x_ref[1]
        arg[(1, 0)]=-0.681078195641*x[0]**o + (0.897404652923)*x[0] + (0.980826240155)*x[1]**o + (-0.686147763412)*x[1]
        ref[(1, 0)]=-0.681078195641*x_ref[0]**o + (0.897404652923)*x_ref[0] + (0.980826240155)*x_ref[1]**o + (-0.686147763412)*x_ref[1]
        arg[(1, 1)]=-0.576218764522*x[0]**o + (0.0535577528757)*x[0] + (-0.371122432381)*x[1]**o + (-0.159684962473)*x[1]
        ref[(1, 1)]=-0.576218764522*x_ref[0]**o + (0.0535577528757)*x_ref[0] + (-0.371122432381)*x_ref[1]**o + (-0.159684962473)*x_ref[1]
        arg[(1, 2)]=-0.962973151279*x[0]**o + (0.417705512722)*x[0] + (-0.83454605963)*x[1]**o + (0.700584577516)*x[1]
        ref[(1, 2)]=-0.962973151279*x_ref[0]**o + (0.417705512722)*x_ref[0] + (-0.83454605963)*x_ref[1]**o + (0.700584577516)*x_ref[1]
        arg[(2, 0)]=-0.927772047366*x[0]**o + (0.710469708656)*x[0] + (-0.0168398300228)*x[1]**o + (-0.613593363001)*x[1]
        ref[(2, 0)]=-0.927772047366*x_ref[0]**o + (0.710469708656)*x_ref[0] + (-0.0168398300228)*x_ref[1]**o + (-0.613593363001)*x_ref[1]
        arg[(2, 1)]=-0.567230982648*x[0]**o + (-0.279066345302)*x[0] + (-0.692824516497)*x[1]**o + (-0.118113731553)*x[1]
        ref[(2, 1)]=-0.567230982648*x_ref[0]**o + (-0.279066345302)*x_ref[0] + (-0.692824516497)*x_ref[1]**o + (-0.118113731553)*x_ref[1]
        arg[(2, 2)]=0.549568931053*x[0]**o + (0.0824364123215)*x[0] + (-0.817322940284)*x[1]**o + (-0.329986994701)*x[1]
        ref[(2, 2)]=0.549568931053*x_ref[0]**o + (0.0824364123215)*x_ref[0] + (-0.817322940284)*x_ref[1]**o + (-0.329986994701)*x_ref[1]
        arg[(3, 0)]=-0.433729788015*x[0]**o + (-0.65538813621)*x[0] + (0.860037156355)*x[1]**o + (-0.00472460619285)*x[1]
        ref[(3, 0)]=-0.433729788015*x_ref[0]**o + (-0.65538813621)*x_ref[0] + (0.860037156355)*x_ref[1]**o + (-0.00472460619285)*x_ref[1]
        arg[(3, 1)]=-0.414291591617*x[0]**o + (-0.728226662441)*x[0] + (-0.0901605667789)*x[1]**o + (0.713681493601)*x[1]
        ref[(3, 1)]=-0.414291591617*x_ref[0]**o + (-0.728226662441)*x_ref[0] + (-0.0901605667789)*x_ref[1]**o + (0.713681493601)*x_ref[1]
        arg[(3, 2)]=0.835756384321*x[0]**o + (-0.791567876344)*x[0] + (0.669365367771)*x[1]**o + (0.903555847059)*x[1]
        ref[(3, 2)]=0.835756384321*x_ref[0]**o + (-0.791567876344)*x_ref[0] + (0.669365367771)*x_ref[1]**o + (0.903555847059)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.108503885873*x[2]**o + (0.176321348879)*x[2]
            ref[(0, 0)]+=0.108503885873*x_ref[2]**o + (0.176321348879)*x_ref[2]
            arg[(0, 1)]+=-0.184777457249*x[2]**o + (-0.553233643489)*x[2]
            ref[(0, 1)]+=-0.184777457249*x_ref[2]**o + (-0.553233643489)*x_ref[2]
            arg[(0, 2)]+=-0.299552530363*x[2]**o + (-0.251163191066)*x[2]
            ref[(0, 2)]+=-0.299552530363*x_ref[2]**o + (-0.251163191066)*x_ref[2]
            arg[(1, 0)]+=0.527545490241*x[2]**o + (0.400996362091)*x[2]
            ref[(1, 0)]+=0.527545490241*x_ref[2]**o + (0.400996362091)*x_ref[2]
            arg[(1, 1)]+=-0.348589983901*x[2]**o + (-0.30547309423)*x[2]
            ref[(1, 1)]+=-0.348589983901*x_ref[2]**o + (-0.30547309423)*x_ref[2]
            arg[(1, 2)]+=0.241432141871*x[2]**o + (0.444936433426)*x[2]
            ref[(1, 2)]+=0.241432141871*x_ref[2]**o + (0.444936433426)*x_ref[2]
            arg[(2, 0)]+=0.507427724162*x[2]**o + (-0.561700400492)*x[2]
            ref[(2, 0)]+=0.507427724162*x_ref[2]**o + (-0.561700400492)*x_ref[2]
            arg[(2, 1)]+=-0.26362546301*x[2]**o + (-0.640104476795)*x[2]
            ref[(2, 1)]+=-0.26362546301*x_ref[2]**o + (-0.640104476795)*x_ref[2]
            arg[(2, 2)]+=-0.240390974077*x[2]**o + (-0.802566931445)*x[2]
            ref[(2, 2)]+=-0.240390974077*x_ref[2]**o + (-0.802566931445)*x_ref[2]
            arg[(3, 0)]+=0.285673448992*x[2]**o + (-0.663325334912)*x[2]
            ref[(3, 0)]+=0.285673448992*x_ref[2]**o + (-0.663325334912)*x_ref[2]
            arg[(3, 1)]+=-0.588205505709*x[2]**o + (-0.944795886807)*x[2]
            ref[(3, 1)]+=-0.588205505709*x_ref[2]**o + (-0.944795886807)*x_ref[2]
            arg[(3, 2)]+=-0.599014872264*x[2]**o + (-0.297673618943)*x[2]
            ref[(3, 2)]+=-0.599014872264*x_ref[2]**o + (-0.297673618943)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank3(self):
        """
        tests interpolation of rank 3 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 2),w)
        ref = Data(0,(4, 2, 2),w_ref)
        arg[(0, 0, 0)]=-0.277827271007*x[0]**o + (-0.114477232865)*x[0] + (-0.137849888851)*x[1]**o + (-0.298447934821)*x[1]
        ref[(0, 0, 0)]=-0.277827271007*x_ref[0]**o + (-0.114477232865)*x_ref[0] + (-0.137849888851)*x_ref[1]**o + (-0.298447934821)*x_ref[1]
        arg[(0, 0, 1)]=0.271745882649*x[0]**o + (-0.469809593576)*x[0] + (-0.401929268823)*x[1]**o + (-0.928887029092)*x[1]
        ref[(0, 0, 1)]=0.271745882649*x_ref[0]**o + (-0.469809593576)*x_ref[0] + (-0.401929268823)*x_ref[1]**o + (-0.928887029092)*x_ref[1]
        arg[(0, 1, 0)]=-0.764761043524*x[0]**o + (0.653694029706)*x[0] + (-0.962169259758)*x[1]**o + (-0.982690831501)*x[1]
        ref[(0, 1, 0)]=-0.764761043524*x_ref[0]**o + (0.653694029706)*x_ref[0] + (-0.962169259758)*x_ref[1]**o + (-0.982690831501)*x_ref[1]
        arg[(0, 1, 1)]=-0.833833941966*x[0]**o + (0.967308439705)*x[0] + (0.234676128825)*x[1]**o + (-0.473060525165)*x[1]
        ref[(0, 1, 1)]=-0.833833941966*x_ref[0]**o + (0.967308439705)*x_ref[0] + (0.234676128825)*x_ref[1]**o + (-0.473060525165)*x_ref[1]
        arg[(1, 0, 0)]=-0.421015040316*x[0]**o + (-0.868202334478)*x[0] + (-0.627664048025)*x[1]**o + (0.607437560016)*x[1]
        ref[(1, 0, 0)]=-0.421015040316*x_ref[0]**o + (-0.868202334478)*x_ref[0] + (-0.627664048025)*x_ref[1]**o + (0.607437560016)*x_ref[1]
        arg[(1, 0, 1)]=-0.431510570655*x[0]**o + (-0.559166463)*x[0] + (-0.773669213795)*x[1]**o + (0.959826522525)*x[1]
        ref[(1, 0, 1)]=-0.431510570655*x_ref[0]**o + (-0.559166463)*x_ref[0] + (-0.773669213795)*x_ref[1]**o + (0.959826522525)*x_ref[1]
        arg[(1, 1, 0)]=0.147746868372*x[0]**o + (0.0680006001303)*x[0] + (-0.299172530223)*x[1]**o + (0.956888434638)*x[1]
        ref[(1, 1, 0)]=0.147746868372*x_ref[0]**o + (0.0680006001303)*x_ref[0] + (-0.299172530223)*x_ref[1]**o + (0.956888434638)*x_ref[1]
        arg[(1, 1, 1)]=0.00377620496764*x[0]**o + (-0.800465607214)*x[0] + (-0.813221729961)*x[1]**o + (-0.82237290234)*x[1]
        ref[(1, 1, 1)]=0.00377620496764*x_ref[0]**o + (-0.800465607214)*x_ref[0] + (-0.813221729961)*x_ref[1]**o + (-0.82237290234)*x_ref[1]
        arg[(2, 0, 0)]=0.265500051986*x[0]**o + (-0.122173695213)*x[0] + (-0.687067791362)*x[1]**o + (0.654082384875)*x[1]
        ref[(2, 0, 0)]=0.265500051986*x_ref[0]**o + (-0.122173695213)*x_ref[0] + (-0.687067791362)*x_ref[1]**o + (0.654082384875)*x_ref[1]
        arg[(2, 0, 1)]=-0.303343670126*x[0]**o + (0.485404002293)*x[0] + (0.600540172829)*x[1]**o + (0.218687786782)*x[1]
        ref[(2, 0, 1)]=-0.303343670126*x_ref[0]**o + (0.485404002293)*x_ref[0] + (0.600540172829)*x_ref[1]**o + (0.218687786782)*x_ref[1]
        arg[(2, 1, 0)]=0.0543925066262*x[0]**o + (-0.0170817108247)*x[0] + (0.152996777569)*x[1]**o + (-0.030510314549)*x[1]
        ref[(2, 1, 0)]=0.0543925066262*x_ref[0]**o + (-0.0170817108247)*x_ref[0] + (0.152996777569)*x_ref[1]**o + (-0.030510314549)*x_ref[1]
        arg[(2, 1, 1)]=0.741148223779*x[0]**o + (0.0931005576235)*x[0] + (-0.0486788729612)*x[1]**o + (0.628037548153)*x[1]
        ref[(2, 1, 1)]=0.741148223779*x_ref[0]**o + (0.0931005576235)*x_ref[0] + (-0.0486788729612)*x_ref[1]**o + (0.628037548153)*x_ref[1]
        arg[(3, 0, 0)]=0.852005853856*x[0]**o + (-0.899240087514)*x[0] + (0.224820685441)*x[1]**o + (-0.971277488165)*x[1]
        ref[(3, 0, 0)]=0.852005853856*x_ref[0]**o + (-0.899240087514)*x_ref[0] + (0.224820685441)*x_ref[1]**o + (-0.971277488165)*x_ref[1]
        arg[(3, 0, 1)]=0.324317321503*x[0]**o + (-0.437357761061)*x[0] + (-0.059717069986)*x[1]**o + (-0.0130199543283)*x[1]
        ref[(3, 0, 1)]=0.324317321503*x_ref[0]**o + (-0.437357761061)*x_ref[0] + (-0.059717069986)*x_ref[1]**o + (-0.0130199543283)*x_ref[1]
        arg[(3, 1, 0)]=-0.7566120179*x[0]**o + (0.885016311283)*x[0] + (-0.171820821827)*x[1]**o + (-0.994965265301)*x[1]
        ref[(3, 1, 0)]=-0.7566120179*x_ref[0]**o + (0.885016311283)*x_ref[0] + (-0.171820821827)*x_ref[1]**o + (-0.994965265301)*x_ref[1]
        arg[(3, 1, 1)]=-0.810787041002*x[0]**o + (0.107504615445)*x[0] + (-0.903270131514)*x[1]**o + (0.07775431363)*x[1]
        ref[(3, 1, 1)]=-0.810787041002*x_ref[0]**o + (0.107504615445)*x_ref[0] + (-0.903270131514)*x_ref[1]**o + (0.07775431363)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.541956348811*x[2]**o + (-0.72364161728)*x[2]
            ref[(0, 0, 0)]+=-0.541956348811*x_ref[2]**o + (-0.72364161728)*x_ref[2]
            arg[(0, 0, 1)]+=0.339669413395*x[2]**o + (-0.679991079724)*x[2]
            ref[(0, 0, 1)]+=0.339669413395*x_ref[2]**o + (-0.679991079724)*x_ref[2]
            arg[(0, 1, 0)]+=-0.790195079635*x[2]**o + (0.0872427201941)*x[2]
            ref[(0, 1, 0)]+=-0.790195079635*x_ref[2]**o + (0.0872427201941)*x_ref[2]
            arg[(0, 1, 1)]+=0.570161605687*x[2]**o + (0.733307619293)*x[2]
            ref[(0, 1, 1)]+=0.570161605687*x_ref[2]**o + (0.733307619293)*x_ref[2]
            arg[(1, 0, 0)]+=0.000212058486412*x[2]**o + (-0.997087052106)*x[2]
            ref[(1, 0, 0)]+=0.000212058486412*x_ref[2]**o + (-0.997087052106)*x_ref[2]
            arg[(1, 0, 1)]+=-0.0999773765015*x[2]**o + (0.0899742892357)*x[2]
            ref[(1, 0, 1)]+=-0.0999773765015*x_ref[2]**o + (0.0899742892357)*x_ref[2]
            arg[(1, 1, 0)]+=0.517957224893*x[2]**o + (-0.313264520679)*x[2]
            ref[(1, 1, 0)]+=0.517957224893*x_ref[2]**o + (-0.313264520679)*x_ref[2]
            arg[(1, 1, 1)]+=-0.508976849546*x[2]**o + (-0.529321894148)*x[2]
            ref[(1, 1, 1)]+=-0.508976849546*x_ref[2]**o + (-0.529321894148)*x_ref[2]
            arg[(2, 0, 0)]+=-0.977131155595*x[2]**o + (-0.502285351199)*x[2]
            ref[(2, 0, 0)]+=-0.977131155595*x_ref[2]**o + (-0.502285351199)*x_ref[2]
            arg[(2, 0, 1)]+=-0.125598431739*x[2]**o + (0.932537838263)*x[2]
            ref[(2, 0, 1)]+=-0.125598431739*x_ref[2]**o + (0.932537838263)*x_ref[2]
            arg[(2, 1, 0)]+=-0.367909710755*x[2]**o + (0.606105236074)*x[2]
            ref[(2, 1, 0)]+=-0.367909710755*x_ref[2]**o + (0.606105236074)*x_ref[2]
            arg[(2, 1, 1)]+=0.791004379305*x[2]**o + (-0.220981427735)*x[2]
            ref[(2, 1, 1)]+=0.791004379305*x_ref[2]**o + (-0.220981427735)*x_ref[2]
            arg[(3, 0, 0)]+=-0.565216386458*x[2]**o + (-0.228868240609)*x[2]
            ref[(3, 0, 0)]+=-0.565216386458*x_ref[2]**o + (-0.228868240609)*x_ref[2]
            arg[(3, 0, 1)]+=-0.287212221135*x[2]**o + (0.0819553458192)*x[2]
            ref[(3, 0, 1)]+=-0.287212221135*x_ref[2]**o + (0.0819553458192)*x_ref[2]
            arg[(3, 1, 0)]+=0.915883727644*x[2]**o + (0.157345302088)*x[2]
            ref[(3, 1, 0)]+=0.915883727644*x_ref[2]**o + (0.157345302088)*x_ref[2]
            arg[(3, 1, 1)]+=0.446014566283*x[2]**o + (-0.507444992496)*x[2]
            ref[(3, 1, 1)]+=0.446014566283*x_ref[2]**o + (-0.507444992496)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank4(self):
        """
        tests interpolation of rank 4 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from FunctionOnBoundary to FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 4, 4),w)
        ref = Data(0,(3, 2, 4, 4),w_ref)
        arg[(0, 0, 0, 0)]=-0.137976741464*x[0]**o + (0.25927269801)*x[0] + (0.40952575027)*x[1]**o + (0.341215245224)*x[1]
        ref[(0, 0, 0, 0)]=-0.137976741464*x_ref[0]**o + (0.25927269801)*x_ref[0] + (0.40952575027)*x_ref[1]**o + (0.341215245224)*x_ref[1]
        arg[(0, 0, 0, 1)]=-0.901254508971*x[0]**o + (0.785744394356)*x[0] + (0.841565272109)*x[1]**o + (0.338264906106)*x[1]
        ref[(0, 0, 0, 1)]=-0.901254508971*x_ref[0]**o + (0.785744394356)*x_ref[0] + (0.841565272109)*x_ref[1]**o + (0.338264906106)*x_ref[1]
        arg[(0, 0, 0, 2)]=0.230623872299*x[0]**o + (-0.807138956524)*x[0] + (0.43357415858)*x[1]**o + (-0.761951188555)*x[1]
        ref[(0, 0, 0, 2)]=0.230623872299*x_ref[0]**o + (-0.807138956524)*x_ref[0] + (0.43357415858)*x_ref[1]**o + (-0.761951188555)*x_ref[1]
        arg[(0, 0, 0, 3)]=0.541441318568*x[0]**o + (-0.204359235558)*x[0] + (-0.718090331671)*x[1]**o + (0.663729791538)*x[1]
        ref[(0, 0, 0, 3)]=0.541441318568*x_ref[0]**o + (-0.204359235558)*x_ref[0] + (-0.718090331671)*x_ref[1]**o + (0.663729791538)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.548024939525*x[0]**o + (0.246007624382)*x[0] + (0.171738918088)*x[1]**o + (0.542319432807)*x[1]
        ref[(0, 0, 1, 0)]=-0.548024939525*x_ref[0]**o + (0.246007624382)*x_ref[0] + (0.171738918088)*x_ref[1]**o + (0.542319432807)*x_ref[1]
        arg[(0, 0, 1, 1)]=-0.130847052714*x[0]**o + (-0.81867192676)*x[0] + (0.978643419787)*x[1]**o + (0.489284887405)*x[1]
        ref[(0, 0, 1, 1)]=-0.130847052714*x_ref[0]**o + (-0.81867192676)*x_ref[0] + (0.978643419787)*x_ref[1]**o + (0.489284887405)*x_ref[1]
        arg[(0, 0, 1, 2)]=-0.112665459408*x[0]**o + (-0.897145438366)*x[0] + (-0.635626869195)*x[1]**o + (0.688966146293)*x[1]
        ref[(0, 0, 1, 2)]=-0.112665459408*x_ref[0]**o + (-0.897145438366)*x_ref[0] + (-0.635626869195)*x_ref[1]**o + (0.688966146293)*x_ref[1]
        arg[(0, 0, 1, 3)]=-0.86594481574*x[0]**o + (-0.289332055142)*x[0] + (-0.544116540799)*x[1]**o + (0.445755796395)*x[1]
        ref[(0, 0, 1, 3)]=-0.86594481574*x_ref[0]**o + (-0.289332055142)*x_ref[0] + (-0.544116540799)*x_ref[1]**o + (0.445755796395)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.949973151269*x[0]**o + (0.729150379164)*x[0] + (0.228820332873)*x[1]**o + (0.0433648396238)*x[1]
        ref[(0, 0, 2, 0)]=-0.949973151269*x_ref[0]**o + (0.729150379164)*x_ref[0] + (0.228820332873)*x_ref[1]**o + (0.0433648396238)*x_ref[1]
        arg[(0, 0, 2, 1)]=0.505579874287*x[0]**o + (-0.383693528023)*x[0] + (-0.449290127455)*x[1]**o + (-0.397914548385)*x[1]
        ref[(0, 0, 2, 1)]=0.505579874287*x_ref[0]**o + (-0.383693528023)*x_ref[0] + (-0.449290127455)*x_ref[1]**o + (-0.397914548385)*x_ref[1]
        arg[(0, 0, 2, 2)]=-0.214909591814*x[0]**o + (0.611528305011)*x[0] + (0.120628066505)*x[1]**o + (0.630464481074)*x[1]
        ref[(0, 0, 2, 2)]=-0.214909591814*x_ref[0]**o + (0.611528305011)*x_ref[0] + (0.120628066505)*x_ref[1]**o + (0.630464481074)*x_ref[1]
        arg[(0, 0, 2, 3)]=-0.173768718234*x[0]**o + (0.724908002978)*x[0] + (-0.726722310653)*x[1]**o + (-0.92583258363)*x[1]
        ref[(0, 0, 2, 3)]=-0.173768718234*x_ref[0]**o + (0.724908002978)*x_ref[0] + (-0.726722310653)*x_ref[1]**o + (-0.92583258363)*x_ref[1]
        arg[(0, 0, 3, 0)]=0.0606195809128*x[0]**o + (0.849301410919)*x[0] + (-0.92879537016)*x[1]**o + (-0.525375858331)*x[1]
        ref[(0, 0, 3, 0)]=0.0606195809128*x_ref[0]**o + (0.849301410919)*x_ref[0] + (-0.92879537016)*x_ref[1]**o + (-0.525375858331)*x_ref[1]
        arg[(0, 0, 3, 1)]=0.45810666517*x[0]**o + (-0.550581289429)*x[0] + (-0.743065045338)*x[1]**o + (0.48669048009)*x[1]
        ref[(0, 0, 3, 1)]=0.45810666517*x_ref[0]**o + (-0.550581289429)*x_ref[0] + (-0.743065045338)*x_ref[1]**o + (0.48669048009)*x_ref[1]
        arg[(0, 0, 3, 2)]=0.386748387887*x[0]**o + (-0.224236483081)*x[0] + (0.110260823191)*x[1]**o + (-0.902359607416)*x[1]
        ref[(0, 0, 3, 2)]=0.386748387887*x_ref[0]**o + (-0.224236483081)*x_ref[0] + (0.110260823191)*x_ref[1]**o + (-0.902359607416)*x_ref[1]
        arg[(0, 0, 3, 3)]=-0.339240300848*x[0]**o + (0.392227205611)*x[0] + (-0.723690392744)*x[1]**o + (0.563678609339)*x[1]
        ref[(0, 0, 3, 3)]=-0.339240300848*x_ref[0]**o + (0.392227205611)*x_ref[0] + (-0.723690392744)*x_ref[1]**o + (0.563678609339)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.155178660857*x[0]**o + (-0.564474323132)*x[0] + (0.36982633303)*x[1]**o + (-0.379029155641)*x[1]
        ref[(0, 1, 0, 0)]=-0.155178660857*x_ref[0]**o + (-0.564474323132)*x_ref[0] + (0.36982633303)*x_ref[1]**o + (-0.379029155641)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.644761568727*x[0]**o + (0.231512012492)*x[0] + (-0.941405287292)*x[1]**o + (-0.2676475866)*x[1]
        ref[(0, 1, 0, 1)]=0.644761568727*x_ref[0]**o + (0.231512012492)*x_ref[0] + (-0.941405287292)*x_ref[1]**o + (-0.2676475866)*x_ref[1]
        arg[(0, 1, 0, 2)]=-0.478639251072*x[0]**o + (-0.0124487306108)*x[0] + (0.470110125359)*x[1]**o + (-0.353178372566)*x[1]
        ref[(0, 1, 0, 2)]=-0.478639251072*x_ref[0]**o + (-0.0124487306108)*x_ref[0] + (0.470110125359)*x_ref[1]**o + (-0.353178372566)*x_ref[1]
        arg[(0, 1, 0, 3)]=0.204882785388*x[0]**o + (0.625329175743)*x[0] + (0.220812019853)*x[1]**o + (0.635194169189)*x[1]
        ref[(0, 1, 0, 3)]=0.204882785388*x_ref[0]**o + (0.625329175743)*x_ref[0] + (0.220812019853)*x_ref[1]**o + (0.635194169189)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.645286649491*x[0]**o + (0.109359171835)*x[0] + (0.966777614612)*x[1]**o + (0.618108736851)*x[1]
        ref[(0, 1, 1, 0)]=0.645286649491*x_ref[0]**o + (0.109359171835)*x_ref[0] + (0.966777614612)*x_ref[1]**o + (0.618108736851)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.975682014778*x[0]**o + (-0.853954292567)*x[0] + (0.553780201095)*x[1]**o + (-0.833913006752)*x[1]
        ref[(0, 1, 1, 1)]=-0.975682014778*x_ref[0]**o + (-0.853954292567)*x_ref[0] + (0.553780201095)*x_ref[1]**o + (-0.833913006752)*x_ref[1]
        arg[(0, 1, 1, 2)]=-0.425830311033*x[0]**o + (0.500321176719)*x[0] + (0.951643311567)*x[1]**o + (-0.518918279154)*x[1]
        ref[(0, 1, 1, 2)]=-0.425830311033*x_ref[0]**o + (0.500321176719)*x_ref[0] + (0.951643311567)*x_ref[1]**o + (-0.518918279154)*x_ref[1]
        arg[(0, 1, 1, 3)]=0.87688399178*x[0]**o + (-0.676845066494)*x[0] + (0.321233418876)*x[1]**o + (-0.182729809325)*x[1]
        ref[(0, 1, 1, 3)]=0.87688399178*x_ref[0]**o + (-0.676845066494)*x_ref[0] + (0.321233418876)*x_ref[1]**o + (-0.182729809325)*x_ref[1]
        arg[(0, 1, 2, 0)]=0.373801823537*x[0]**o + (0.737035103071)*x[0] + (0.890244107318)*x[1]**o + (0.691876284239)*x[1]
        ref[(0, 1, 2, 0)]=0.373801823537*x_ref[0]**o + (0.737035103071)*x_ref[0] + (0.890244107318)*x_ref[1]**o + (0.691876284239)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.812494321334*x[0]**o + (-0.261928772058)*x[0] + (-0.198755061142)*x[1]**o + (-0.624191899465)*x[1]
        ref[(0, 1, 2, 1)]=0.812494321334*x_ref[0]**o + (-0.261928772058)*x_ref[0] + (-0.198755061142)*x_ref[1]**o + (-0.624191899465)*x_ref[1]
        arg[(0, 1, 2, 2)]=-0.371243072357*x[0]**o + (0.649326076372)*x[0] + (0.248718824344)*x[1]**o + (-0.516916444761)*x[1]
        ref[(0, 1, 2, 2)]=-0.371243072357*x_ref[0]**o + (0.649326076372)*x_ref[0] + (0.248718824344)*x_ref[1]**o + (-0.516916444761)*x_ref[1]
        arg[(0, 1, 2, 3)]=0.256761483586*x[0]**o + (0.147316940923)*x[0] + (-0.508474945126)*x[1]**o + (-0.678906567399)*x[1]
        ref[(0, 1, 2, 3)]=0.256761483586*x_ref[0]**o + (0.147316940923)*x_ref[0] + (-0.508474945126)*x_ref[1]**o + (-0.678906567399)*x_ref[1]
        arg[(0, 1, 3, 0)]=0.517223267541*x[0]**o + (-0.93174648414)*x[0] + (-0.637793485898)*x[1]**o + (0.442303344997)*x[1]
        ref[(0, 1, 3, 0)]=0.517223267541*x_ref[0]**o + (-0.93174648414)*x_ref[0] + (-0.637793485898)*x_ref[1]**o + (0.442303344997)*x_ref[1]
        arg[(0, 1, 3, 1)]=-0.791793253528*x[0]**o + (0.521427546071)*x[0] + (0.432534889267)*x[1]**o + (0.863615750001)*x[1]
        ref[(0, 1, 3, 1)]=-0.791793253528*x_ref[0]**o + (0.521427546071)*x_ref[0] + (0.432534889267)*x_ref[1]**o + (0.863615750001)*x_ref[1]
        arg[(0, 1, 3, 2)]=-0.261211873273*x[0]**o + (0.352099045056)*x[0] + (-0.269247635666)*x[1]**o + (-0.873926300108)*x[1]
        ref[(0, 1, 3, 2)]=-0.261211873273*x_ref[0]**o + (0.352099045056)*x_ref[0] + (-0.269247635666)*x_ref[1]**o + (-0.873926300108)*x_ref[1]
        arg[(0, 1, 3, 3)]=-0.886851092751*x[0]**o + (0.73606731279)*x[0] + (0.412726253768)*x[1]**o + (0.839360823597)*x[1]
        ref[(0, 1, 3, 3)]=-0.886851092751*x_ref[0]**o + (0.73606731279)*x_ref[0] + (0.412726253768)*x_ref[1]**o + (0.839360823597)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.61870379207*x[0]**o + (0.715295772954)*x[0] + (-0.0882251372342)*x[1]**o + (0.285801649426)*x[1]
        ref[(1, 0, 0, 0)]=-0.61870379207*x_ref[0]**o + (0.715295772954)*x_ref[0] + (-0.0882251372342)*x_ref[1]**o + (0.285801649426)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.831293519618*x[0]**o + (-0.4468035901)*x[0] + (-0.788023532049)*x[1]**o + (0.37164699684)*x[1]
        ref[(1, 0, 0, 1)]=-0.831293519618*x_ref[0]**o + (-0.4468035901)*x_ref[0] + (-0.788023532049)*x_ref[1]**o + (0.37164699684)*x_ref[1]
        arg[(1, 0, 0, 2)]=0.742995395145*x[0]**o + (-0.56638650731)*x[0] + (0.16507023899)*x[1]**o + (-0.00493825384341)*x[1]
        ref[(1, 0, 0, 2)]=0.742995395145*x_ref[0]**o + (-0.56638650731)*x_ref[0] + (0.16507023899)*x_ref[1]**o + (-0.00493825384341)*x_ref[1]
        arg[(1, 0, 0, 3)]=-0.362702846986*x[0]**o + (-0.0174277837075)*x[0] + (-0.826305472642)*x[1]**o + (-0.186752605828)*x[1]
        ref[(1, 0, 0, 3)]=-0.362702846986*x_ref[0]**o + (-0.0174277837075)*x_ref[0] + (-0.826305472642)*x_ref[1]**o + (-0.186752605828)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.0812626552247*x[0]**o + (-0.922125120548)*x[0] + (-0.380063201942)*x[1]**o + (0.555055942577)*x[1]
        ref[(1, 0, 1, 0)]=-0.0812626552247*x_ref[0]**o + (-0.922125120548)*x_ref[0] + (-0.380063201942)*x_ref[1]**o + (0.555055942577)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.338219466052*x[0]**o + (0.31888371708)*x[0] + (0.263573888485)*x[1]**o + (0.984097083547)*x[1]
        ref[(1, 0, 1, 1)]=0.338219466052*x_ref[0]**o + (0.31888371708)*x_ref[0] + (0.263573888485)*x_ref[1]**o + (0.984097083547)*x_ref[1]
        arg[(1, 0, 1, 2)]=-0.391755000701*x[0]**o + (-0.152752823434)*x[0] + (0.648306740649)*x[1]**o + (-0.431410818224)*x[1]
        ref[(1, 0, 1, 2)]=-0.391755000701*x_ref[0]**o + (-0.152752823434)*x_ref[0] + (0.648306740649)*x_ref[1]**o + (-0.431410818224)*x_ref[1]
        arg[(1, 0, 1, 3)]=0.429596917036*x[0]**o + (-0.996329090494)*x[0] + (-0.250898994556)*x[1]**o + (0.558153684329)*x[1]
        ref[(1, 0, 1, 3)]=0.429596917036*x_ref[0]**o + (-0.996329090494)*x_ref[0] + (-0.250898994556)*x_ref[1]**o + (0.558153684329)*x_ref[1]
        arg[(1, 0, 2, 0)]=-0.205100615963*x[0]**o + (0.369421454866)*x[0] + (-0.264980726783)*x[1]**o + (0.948905111944)*x[1]
        ref[(1, 0, 2, 0)]=-0.205100615963*x_ref[0]**o + (0.369421454866)*x_ref[0] + (-0.264980726783)*x_ref[1]**o + (0.948905111944)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.020310430167*x[0]**o + (0.492246849623)*x[0] + (-0.562722076806)*x[1]**o + (-0.0789895508665)*x[1]
        ref[(1, 0, 2, 1)]=0.020310430167*x_ref[0]**o + (0.492246849623)*x_ref[0] + (-0.562722076806)*x_ref[1]**o + (-0.0789895508665)*x_ref[1]
        arg[(1, 0, 2, 2)]=0.264454715917*x[0]**o + (0.922549237866)*x[0] + (0.510811516766)*x[1]**o + (0.107740101188)*x[1]
        ref[(1, 0, 2, 2)]=0.264454715917*x_ref[0]**o + (0.922549237866)*x_ref[0] + (0.510811516766)*x_ref[1]**o + (0.107740101188)*x_ref[1]
        arg[(1, 0, 2, 3)]=0.15837319798*x[0]**o + (0.0405324762228)*x[0] + (-0.113166103399)*x[1]**o + (0.197538772531)*x[1]
        ref[(1, 0, 2, 3)]=0.15837319798*x_ref[0]**o + (0.0405324762228)*x_ref[0] + (-0.113166103399)*x_ref[1]**o + (0.197538772531)*x_ref[1]
        arg[(1, 0, 3, 0)]=-0.368496953879*x[0]**o + (0.897197214995)*x[0] + (-0.580783288389)*x[1]**o + (-0.738176190516)*x[1]
        ref[(1, 0, 3, 0)]=-0.368496953879*x_ref[0]**o + (0.897197214995)*x_ref[0] + (-0.580783288389)*x_ref[1]**o + (-0.738176190516)*x_ref[1]
        arg[(1, 0, 3, 1)]=0.0334875712322*x[0]**o + (-0.222328070186)*x[0] + (-0.236984182838)*x[1]**o + (0.0507196692741)*x[1]
        ref[(1, 0, 3, 1)]=0.0334875712322*x_ref[0]**o + (-0.222328070186)*x_ref[0] + (-0.236984182838)*x_ref[1]**o + (0.0507196692741)*x_ref[1]
        arg[(1, 0, 3, 2)]=0.549817939764*x[0]**o + (-0.460861171343)*x[0] + (0.21618660746)*x[1]**o + (-0.427227036988)*x[1]
        ref[(1, 0, 3, 2)]=0.549817939764*x_ref[0]**o + (-0.460861171343)*x_ref[0] + (0.21618660746)*x_ref[1]**o + (-0.427227036988)*x_ref[1]
        arg[(1, 0, 3, 3)]=0.82039281707*x[0]**o + (0.842908187892)*x[0] + (0.750125111303)*x[1]**o + (-0.0200584009649)*x[1]
        ref[(1, 0, 3, 3)]=0.82039281707*x_ref[0]**o + (0.842908187892)*x_ref[0] + (0.750125111303)*x_ref[1]**o + (-0.0200584009649)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.860047992213*x[0]**o + (0.272676236899)*x[0] + (-0.956614439796)*x[1]**o + (0.198175699928)*x[1]
        ref[(1, 1, 0, 0)]=-0.860047992213*x_ref[0]**o + (0.272676236899)*x_ref[0] + (-0.956614439796)*x_ref[1]**o + (0.198175699928)*x_ref[1]
        arg[(1, 1, 0, 1)]=-0.666089960975*x[0]**o + (0.0735232848313)*x[0] + (-0.0177896352817)*x[1]**o + (-0.169525524032)*x[1]
        ref[(1, 1, 0, 1)]=-0.666089960975*x_ref[0]**o + (0.0735232848313)*x_ref[0] + (-0.0177896352817)*x_ref[1]**o + (-0.169525524032)*x_ref[1]
        arg[(1, 1, 0, 2)]=0.0325228676761*x[0]**o + (0.134384396438)*x[0] + (-0.484130705777)*x[1]**o + (0.222974616966)*x[1]
        ref[(1, 1, 0, 2)]=0.0325228676761*x_ref[0]**o + (0.134384396438)*x_ref[0] + (-0.484130705777)*x_ref[1]**o + (0.222974616966)*x_ref[1]
        arg[(1, 1, 0, 3)]=-0.446872403597*x[0]**o + (0.588313558727)*x[0] + (0.519268308145)*x[1]**o + (0.253502578978)*x[1]
        ref[(1, 1, 0, 3)]=-0.446872403597*x_ref[0]**o + (0.588313558727)*x_ref[0] + (0.519268308145)*x_ref[1]**o + (0.253502578978)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.584772162372*x[0]**o + (-0.497864246165)*x[0] + (0.894745708319)*x[1]**o + (0.829267119857)*x[1]
        ref[(1, 1, 1, 0)]=0.584772162372*x_ref[0]**o + (-0.497864246165)*x_ref[0] + (0.894745708319)*x_ref[1]**o + (0.829267119857)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.982678730276*x[0]**o + (0.813235591855)*x[0] + (-0.503707034275)*x[1]**o + (0.251270915383)*x[1]
        ref[(1, 1, 1, 1)]=0.982678730276*x_ref[0]**o + (0.813235591855)*x_ref[0] + (-0.503707034275)*x_ref[1]**o + (0.251270915383)*x_ref[1]
        arg[(1, 1, 1, 2)]=-0.447259111543*x[0]**o + (-0.672550406949)*x[0] + (-0.314623459569)*x[1]**o + (-0.423887645523)*x[1]
        ref[(1, 1, 1, 2)]=-0.447259111543*x_ref[0]**o + (-0.672550406949)*x_ref[0] + (-0.314623459569)*x_ref[1]**o + (-0.423887645523)*x_ref[1]
        arg[(1, 1, 1, 3)]=-0.822981922577*x[0]**o + (0.791298900543)*x[0] + (-0.328722861473)*x[1]**o + (-0.206983639708)*x[1]
        ref[(1, 1, 1, 3)]=-0.822981922577*x_ref[0]**o + (0.791298900543)*x_ref[0] + (-0.328722861473)*x_ref[1]**o + (-0.206983639708)*x_ref[1]
        arg[(1, 1, 2, 0)]=0.345457346494*x[0]**o + (0.404232817207)*x[0] + (-0.453721901551)*x[1]**o + (0.506926731411)*x[1]
        ref[(1, 1, 2, 0)]=0.345457346494*x_ref[0]**o + (0.404232817207)*x_ref[0] + (-0.453721901551)*x_ref[1]**o + (0.506926731411)*x_ref[1]
        arg[(1, 1, 2, 1)]=0.080526604462*x[0]**o + (0.407844447176)*x[0] + (-0.736226147359)*x[1]**o + (-0.849686908575)*x[1]
        ref[(1, 1, 2, 1)]=0.080526604462*x_ref[0]**o + (0.407844447176)*x_ref[0] + (-0.736226147359)*x_ref[1]**o + (-0.849686908575)*x_ref[1]
        arg[(1, 1, 2, 2)]=-0.903490183523*x[0]**o + (0.566141199465)*x[0] + (0.739018657413)*x[1]**o + (-0.131732215905)*x[1]
        ref[(1, 1, 2, 2)]=-0.903490183523*x_ref[0]**o + (0.566141199465)*x_ref[0] + (0.739018657413)*x_ref[1]**o + (-0.131732215905)*x_ref[1]
        arg[(1, 1, 2, 3)]=-0.418632862977*x[0]**o + (-0.350292582418)*x[0] + (0.763418004198)*x[1]**o + (0.479201719238)*x[1]
        ref[(1, 1, 2, 3)]=-0.418632862977*x_ref[0]**o + (-0.350292582418)*x_ref[0] + (0.763418004198)*x_ref[1]**o + (0.479201719238)*x_ref[1]
        arg[(1, 1, 3, 0)]=0.560770224578*x[0]**o + (0.513332262134)*x[0] + (-0.71276114123)*x[1]**o + (-0.0762601172864)*x[1]
        ref[(1, 1, 3, 0)]=0.560770224578*x_ref[0]**o + (0.513332262134)*x_ref[0] + (-0.71276114123)*x_ref[1]**o + (-0.0762601172864)*x_ref[1]
        arg[(1, 1, 3, 1)]=0.487731480442*x[0]**o + (0.937969342265)*x[0] + (0.540851537717)*x[1]**o + (0.645218008736)*x[1]
        ref[(1, 1, 3, 1)]=0.487731480442*x_ref[0]**o + (0.937969342265)*x_ref[0] + (0.540851537717)*x_ref[1]**o + (0.645218008736)*x_ref[1]
        arg[(1, 1, 3, 2)]=-0.594444967677*x[0]**o + (0.00759237275733)*x[0] + (0.597998978756)*x[1]**o + (0.935590792168)*x[1]
        ref[(1, 1, 3, 2)]=-0.594444967677*x_ref[0]**o + (0.00759237275733)*x_ref[0] + (0.597998978756)*x_ref[1]**o + (0.935590792168)*x_ref[1]
        arg[(1, 1, 3, 3)]=0.622946110739*x[0]**o + (-0.261615755645)*x[0] + (-0.927513327937)*x[1]**o + (-0.871575585872)*x[1]
        ref[(1, 1, 3, 3)]=0.622946110739*x_ref[0]**o + (-0.261615755645)*x_ref[0] + (-0.927513327937)*x_ref[1]**o + (-0.871575585872)*x_ref[1]
        arg[(2, 0, 0, 0)]=-0.2323740068*x[0]**o + (0.731501787424)*x[0] + (0.246846819036)*x[1]**o + (0.36515030238)*x[1]
        ref[(2, 0, 0, 0)]=-0.2323740068*x_ref[0]**o + (0.731501787424)*x_ref[0] + (0.246846819036)*x_ref[1]**o + (0.36515030238)*x_ref[1]
        arg[(2, 0, 0, 1)]=-0.546007683004*x[0]**o + (-0.613223963448)*x[0] + (0.305774334635)*x[1]**o + (-0.189390914482)*x[1]
        ref[(2, 0, 0, 1)]=-0.546007683004*x_ref[0]**o + (-0.613223963448)*x_ref[0] + (0.305774334635)*x_ref[1]**o + (-0.189390914482)*x_ref[1]
        arg[(2, 0, 0, 2)]=0.926575903448*x[0]**o + (-0.767387605586)*x[0] + (0.979797132829)*x[1]**o + (0.610947910673)*x[1]
        ref[(2, 0, 0, 2)]=0.926575903448*x_ref[0]**o + (-0.767387605586)*x_ref[0] + (0.979797132829)*x_ref[1]**o + (0.610947910673)*x_ref[1]
        arg[(2, 0, 0, 3)]=0.266278640004*x[0]**o + (-0.115460480622)*x[0] + (0.15200206501)*x[1]**o + (0.289926863332)*x[1]
        ref[(2, 0, 0, 3)]=0.266278640004*x_ref[0]**o + (-0.115460480622)*x_ref[0] + (0.15200206501)*x_ref[1]**o + (0.289926863332)*x_ref[1]
        arg[(2, 0, 1, 0)]=0.677652426218*x[0]**o + (0.0677137560033)*x[0] + (0.848295828184)*x[1]**o + (0.540543817569)*x[1]
        ref[(2, 0, 1, 0)]=0.677652426218*x_ref[0]**o + (0.0677137560033)*x_ref[0] + (0.848295828184)*x_ref[1]**o + (0.540543817569)*x_ref[1]
        arg[(2, 0, 1, 1)]=-0.61297911309*x[0]**o + (0.980867196466)*x[0] + (0.761275361084)*x[1]**o + (0.40679935397)*x[1]
        ref[(2, 0, 1, 1)]=-0.61297911309*x_ref[0]**o + (0.980867196466)*x_ref[0] + (0.761275361084)*x_ref[1]**o + (0.40679935397)*x_ref[1]
        arg[(2, 0, 1, 2)]=-0.648362633972*x[0]**o + (0.199616844062)*x[0] + (0.140481033387)*x[1]**o + (0.763292185409)*x[1]
        ref[(2, 0, 1, 2)]=-0.648362633972*x_ref[0]**o + (0.199616844062)*x_ref[0] + (0.140481033387)*x_ref[1]**o + (0.763292185409)*x_ref[1]
        arg[(2, 0, 1, 3)]=-0.821912207466*x[0]**o + (0.239758797571)*x[0] + (0.929974736792)*x[1]**o + (0.674276530529)*x[1]
        ref[(2, 0, 1, 3)]=-0.821912207466*x_ref[0]**o + (0.239758797571)*x_ref[0] + (0.929974736792)*x_ref[1]**o + (0.674276530529)*x_ref[1]
        arg[(2, 0, 2, 0)]=0.194455639888*x[0]**o + (-0.252822742865)*x[0] + (0.144402906721)*x[1]**o + (0.662020048245)*x[1]
        ref[(2, 0, 2, 0)]=0.194455639888*x_ref[0]**o + (-0.252822742865)*x_ref[0] + (0.144402906721)*x_ref[1]**o + (0.662020048245)*x_ref[1]
        arg[(2, 0, 2, 1)]=-0.611602888999*x[0]**o + (0.168185115061)*x[0] + (-0.152211132424)*x[1]**o + (0.0886512660775)*x[1]
        ref[(2, 0, 2, 1)]=-0.611602888999*x_ref[0]**o + (0.168185115061)*x_ref[0] + (-0.152211132424)*x_ref[1]**o + (0.0886512660775)*x_ref[1]
        arg[(2, 0, 2, 2)]=0.648173310583*x[0]**o + (-0.337898815828)*x[0] + (-0.866733489843)*x[1]**o + (0.844836690268)*x[1]
        ref[(2, 0, 2, 2)]=0.648173310583*x_ref[0]**o + (-0.337898815828)*x_ref[0] + (-0.866733489843)*x_ref[1]**o + (0.844836690268)*x_ref[1]
        arg[(2, 0, 2, 3)]=-0.507380246305*x[0]**o + (0.770793459995)*x[0] + (-0.399675045727)*x[1]**o + (0.904588427474)*x[1]
        ref[(2, 0, 2, 3)]=-0.507380246305*x_ref[0]**o + (0.770793459995)*x_ref[0] + (-0.399675045727)*x_ref[1]**o + (0.904588427474)*x_ref[1]
        arg[(2, 0, 3, 0)]=-0.735395390086*x[0]**o + (-0.603259789088)*x[0] + (-0.268144512438)*x[1]**o + (-0.178359427098)*x[1]
        ref[(2, 0, 3, 0)]=-0.735395390086*x_ref[0]**o + (-0.603259789088)*x_ref[0] + (-0.268144512438)*x_ref[1]**o + (-0.178359427098)*x_ref[1]
        arg[(2, 0, 3, 1)]=-0.984938616631*x[0]**o + (-0.359608169597)*x[0] + (-0.366145726123)*x[1]**o + (-0.726534186394)*x[1]
        ref[(2, 0, 3, 1)]=-0.984938616631*x_ref[0]**o + (-0.359608169597)*x_ref[0] + (-0.366145726123)*x_ref[1]**o + (-0.726534186394)*x_ref[1]
        arg[(2, 0, 3, 2)]=0.548492036287*x[0]**o + (0.246451481183)*x[0] + (-0.213774631409)*x[1]**o + (0.811160226118)*x[1]
        ref[(2, 0, 3, 2)]=0.548492036287*x_ref[0]**o + (0.246451481183)*x_ref[0] + (-0.213774631409)*x_ref[1]**o + (0.811160226118)*x_ref[1]
        arg[(2, 0, 3, 3)]=0.956060199047*x[0]**o + (0.898387228613)*x[0] + (0.313175573943)*x[1]**o + (-0.579022530119)*x[1]
        ref[(2, 0, 3, 3)]=0.956060199047*x_ref[0]**o + (0.898387228613)*x_ref[0] + (0.313175573943)*x_ref[1]**o + (-0.579022530119)*x_ref[1]
        arg[(2, 1, 0, 0)]=-0.680114601843*x[0]**o + (-0.891255175044)*x[0] + (-0.478166683934)*x[1]**o + (0.618977906003)*x[1]
        ref[(2, 1, 0, 0)]=-0.680114601843*x_ref[0]**o + (-0.891255175044)*x_ref[0] + (-0.478166683934)*x_ref[1]**o + (0.618977906003)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.360872068907*x[0]**o + (-0.574257128202)*x[0] + (0.36829370779)*x[1]**o + (0.946860598827)*x[1]
        ref[(2, 1, 0, 1)]=0.360872068907*x_ref[0]**o + (-0.574257128202)*x_ref[0] + (0.36829370779)*x_ref[1]**o + (0.946860598827)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.75427922907*x[0]**o + (-0.0801082671615)*x[0] + (0.378953291714)*x[1]**o + (-0.681382972288)*x[1]
        ref[(2, 1, 0, 2)]=-0.75427922907*x_ref[0]**o + (-0.0801082671615)*x_ref[0] + (0.378953291714)*x_ref[1]**o + (-0.681382972288)*x_ref[1]
        arg[(2, 1, 0, 3)]=0.0509614175524*x[0]**o + (-0.781671295568)*x[0] + (0.896433639985)*x[1]**o + (-0.401704029963)*x[1]
        ref[(2, 1, 0, 3)]=0.0509614175524*x_ref[0]**o + (-0.781671295568)*x_ref[0] + (0.896433639985)*x_ref[1]**o + (-0.401704029963)*x_ref[1]
        arg[(2, 1, 1, 0)]=-0.124757614733*x[0]**o + (0.177594847374)*x[0] + (0.524647754476)*x[1]**o + (-0.957130651789)*x[1]
        ref[(2, 1, 1, 0)]=-0.124757614733*x_ref[0]**o + (0.177594847374)*x_ref[0] + (0.524647754476)*x_ref[1]**o + (-0.957130651789)*x_ref[1]
        arg[(2, 1, 1, 1)]=-0.245284162498*x[0]**o + (0.800555683265)*x[0] + (0.927788164912)*x[1]**o + (0.0625591710106)*x[1]
        ref[(2, 1, 1, 1)]=-0.245284162498*x_ref[0]**o + (0.800555683265)*x_ref[0] + (0.927788164912)*x_ref[1]**o + (0.0625591710106)*x_ref[1]
        arg[(2, 1, 1, 2)]=0.140667957167*x[0]**o + (-0.911774263862)*x[0] + (0.890580045466)*x[1]**o + (-0.788886635945)*x[1]
        ref[(2, 1, 1, 2)]=0.140667957167*x_ref[0]**o + (-0.911774263862)*x_ref[0] + (0.890580045466)*x_ref[1]**o + (-0.788886635945)*x_ref[1]
        arg[(2, 1, 1, 3)]=-0.504747721388*x[0]**o + (-0.855120321921)*x[0] + (0.395166709279)*x[1]**o + (-0.980290565694)*x[1]
        ref[(2, 1, 1, 3)]=-0.504747721388*x_ref[0]**o + (-0.855120321921)*x_ref[0] + (0.395166709279)*x_ref[1]**o + (-0.980290565694)*x_ref[1]
        arg[(2, 1, 2, 0)]=-0.228440026654*x[0]**o + (0.277269268021)*x[0] + (0.565478526958)*x[1]**o + (-0.747032651832)*x[1]
        ref[(2, 1, 2, 0)]=-0.228440026654*x_ref[0]**o + (0.277269268021)*x_ref[0] + (0.565478526958)*x_ref[1]**o + (-0.747032651832)*x_ref[1]
        arg[(2, 1, 2, 1)]=-0.0734340709966*x[0]**o + (0.811950543285)*x[0] + (0.727110011778)*x[1]**o + (0.0553593744174)*x[1]
        ref[(2, 1, 2, 1)]=-0.0734340709966*x_ref[0]**o + (0.811950543285)*x_ref[0] + (0.727110011778)*x_ref[1]**o + (0.0553593744174)*x_ref[1]
        arg[(2, 1, 2, 2)]=-0.130707774584*x[0]**o + (-0.54599059745)*x[0] + (-0.296673101128)*x[1]**o + (0.764785649689)*x[1]
        ref[(2, 1, 2, 2)]=-0.130707774584*x_ref[0]**o + (-0.54599059745)*x_ref[0] + (-0.296673101128)*x_ref[1]**o + (0.764785649689)*x_ref[1]
        arg[(2, 1, 2, 3)]=-0.141133717339*x[0]**o + (0.840089223056)*x[0] + (-0.33702733072)*x[1]**o + (0.713357759326)*x[1]
        ref[(2, 1, 2, 3)]=-0.141133717339*x_ref[0]**o + (0.840089223056)*x_ref[0] + (-0.33702733072)*x_ref[1]**o + (0.713357759326)*x_ref[1]
        arg[(2, 1, 3, 0)]=-0.95036300124*x[0]**o + (-0.855836584755)*x[0] + (-0.751251960817)*x[1]**o + (-0.31808373734)*x[1]
        ref[(2, 1, 3, 0)]=-0.95036300124*x_ref[0]**o + (-0.855836584755)*x_ref[0] + (-0.751251960817)*x_ref[1]**o + (-0.31808373734)*x_ref[1]
        arg[(2, 1, 3, 1)]=0.799863846652*x[0]**o + (0.104101672488)*x[0] + (0.404860660437)*x[1]**o + (-0.927533672629)*x[1]
        ref[(2, 1, 3, 1)]=0.799863846652*x_ref[0]**o + (0.104101672488)*x_ref[0] + (0.404860660437)*x_ref[1]**o + (-0.927533672629)*x_ref[1]
        arg[(2, 1, 3, 2)]=-0.0790757077825*x[0]**o + (0.598824022211)*x[0] + (-0.0623436410366)*x[1]**o + (0.799194410949)*x[1]
        ref[(2, 1, 3, 2)]=-0.0790757077825*x_ref[0]**o + (0.598824022211)*x_ref[0] + (-0.0623436410366)*x_ref[1]**o + (0.799194410949)*x_ref[1]
        arg[(2, 1, 3, 3)]=0.481315379691*x[0]**o + (0.439786503099)*x[0] + (-0.295256436897)*x[1]**o + (0.207565261451)*x[1]
        ref[(2, 1, 3, 3)]=0.481315379691*x_ref[0]**o + (0.439786503099)*x_ref[0] + (-0.295256436897)*x_ref[1]**o + (0.207565261451)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.50836544037*x[2]**o + (-0.590735768189)*x[2]
            ref[(0, 0, 0, 0)]+=-0.50836544037*x_ref[2]**o + (-0.590735768189)*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.367834105656*x[2]**o + (-0.67892764613)*x[2]
            ref[(0, 0, 0, 1)]+=-0.367834105656*x_ref[2]**o + (-0.67892764613)*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.391261329573*x[2]**o + (-0.619222016242)*x[2]
            ref[(0, 0, 0, 2)]+=0.391261329573*x_ref[2]**o + (-0.619222016242)*x_ref[2]
            arg[(0, 0, 0, 3)]+=-0.3261170373*x[2]**o + (-0.69558523454)*x[2]
            ref[(0, 0, 0, 3)]+=-0.3261170373*x_ref[2]**o + (-0.69558523454)*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.513150900634*x[2]**o + (0.954518114822)*x[2]
            ref[(0, 0, 1, 0)]+=-0.513150900634*x_ref[2]**o + (0.954518114822)*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.403672654042*x[2]**o + (0.618728941218)*x[2]
            ref[(0, 0, 1, 1)]+=0.403672654042*x_ref[2]**o + (0.618728941218)*x_ref[2]
            arg[(0, 0, 1, 2)]+=-0.806173120178*x[2]**o + (0.278066961872)*x[2]
            ref[(0, 0, 1, 2)]+=-0.806173120178*x_ref[2]**o + (0.278066961872)*x_ref[2]
            arg[(0, 0, 1, 3)]+=-0.250125600885*x[2]**o + (-0.147026216554)*x[2]
            ref[(0, 0, 1, 3)]+=-0.250125600885*x_ref[2]**o + (-0.147026216554)*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.12940747677*x[2]**o + (-0.887214377642)*x[2]
            ref[(0, 0, 2, 0)]+=-0.12940747677*x_ref[2]**o + (-0.887214377642)*x_ref[2]
            arg[(0, 0, 2, 1)]+=-0.349483514999*x[2]**o + (0.0894900645681)*x[2]
            ref[(0, 0, 2, 1)]+=-0.349483514999*x_ref[2]**o + (0.0894900645681)*x_ref[2]
            arg[(0, 0, 2, 2)]+=0.416785610146*x[2]**o + (0.0256110236202)*x[2]
            ref[(0, 0, 2, 2)]+=0.416785610146*x_ref[2]**o + (0.0256110236202)*x_ref[2]
            arg[(0, 0, 2, 3)]+=-0.566087173322*x[2]**o + (0.502715271569)*x[2]
            ref[(0, 0, 2, 3)]+=-0.566087173322*x_ref[2]**o + (0.502715271569)*x_ref[2]
            arg[(0, 0, 3, 0)]+=-0.988400178629*x[2]**o + (-0.319818692747)*x[2]
            ref[(0, 0, 3, 0)]+=-0.988400178629*x_ref[2]**o + (-0.319818692747)*x_ref[2]
            arg[(0, 0, 3, 1)]+=-0.329193144306*x[2]**o + (0.158124251008)*x[2]
            ref[(0, 0, 3, 1)]+=-0.329193144306*x_ref[2]**o + (0.158124251008)*x_ref[2]
            arg[(0, 0, 3, 2)]+=-0.133545612671*x[2]**o + (-0.165846947371)*x[2]
            ref[(0, 0, 3, 2)]+=-0.133545612671*x_ref[2]**o + (-0.165846947371)*x_ref[2]
            arg[(0, 0, 3, 3)]+=-0.0529982819092*x[2]**o + (-0.882397854239)*x[2]
            ref[(0, 0, 3, 3)]+=-0.0529982819092*x_ref[2]**o + (-0.882397854239)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.498639839711*x[2]**o + (0.716126782625)*x[2]
            ref[(0, 1, 0, 0)]+=-0.498639839711*x_ref[2]**o + (0.716126782625)*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.299964404942*x[2]**o + (0.330589704634)*x[2]
            ref[(0, 1, 0, 1)]+=-0.299964404942*x_ref[2]**o + (0.330589704634)*x_ref[2]
            arg[(0, 1, 0, 2)]+=0.45960848736*x[2]**o + (-0.507787223021)*x[2]
            ref[(0, 1, 0, 2)]+=0.45960848736*x_ref[2]**o + (-0.507787223021)*x_ref[2]
            arg[(0, 1, 0, 3)]+=-0.374202667317*x[2]**o + (-0.688000814648)*x[2]
            ref[(0, 1, 0, 3)]+=-0.374202667317*x_ref[2]**o + (-0.688000814648)*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.780447611753*x[2]**o + (-0.927283203705)*x[2]
            ref[(0, 1, 1, 0)]+=-0.780447611753*x_ref[2]**o + (-0.927283203705)*x_ref[2]
            arg[(0, 1, 1, 1)]+=0.522585395596*x[2]**o + (0.234007360608)*x[2]
            ref[(0, 1, 1, 1)]+=0.522585395596*x_ref[2]**o + (0.234007360608)*x_ref[2]
            arg[(0, 1, 1, 2)]+=-0.125740692069*x[2]**o + (-0.641363656598)*x[2]
            ref[(0, 1, 1, 2)]+=-0.125740692069*x_ref[2]**o + (-0.641363656598)*x_ref[2]
            arg[(0, 1, 1, 3)]+=0.545212814196*x[2]**o + (-0.69921644699)*x[2]
            ref[(0, 1, 1, 3)]+=0.545212814196*x_ref[2]**o + (-0.69921644699)*x_ref[2]
            arg[(0, 1, 2, 0)]+=0.218233080199*x[2]**o + (0.898291075325)*x[2]
            ref[(0, 1, 2, 0)]+=0.218233080199*x_ref[2]**o + (0.898291075325)*x_ref[2]
            arg[(0, 1, 2, 1)]+=0.957290054316*x[2]**o + (-0.23887699216)*x[2]
            ref[(0, 1, 2, 1)]+=0.957290054316*x_ref[2]**o + (-0.23887699216)*x_ref[2]
            arg[(0, 1, 2, 2)]+=0.291934274578*x[2]**o + (0.342227829399)*x[2]
            ref[(0, 1, 2, 2)]+=0.291934274578*x_ref[2]**o + (0.342227829399)*x_ref[2]
            arg[(0, 1, 2, 3)]+=0.170574942056*x[2]**o + (-0.378239557026)*x[2]
            ref[(0, 1, 2, 3)]+=0.170574942056*x_ref[2]**o + (-0.378239557026)*x_ref[2]
            arg[(0, 1, 3, 0)]+=-0.491236011098*x[2]**o + (-0.473448954694)*x[2]
            ref[(0, 1, 3, 0)]+=-0.491236011098*x_ref[2]**o + (-0.473448954694)*x_ref[2]
            arg[(0, 1, 3, 1)]+=-0.41737063941*x[2]**o + (-0.88521911997)*x[2]
            ref[(0, 1, 3, 1)]+=-0.41737063941*x_ref[2]**o + (-0.88521911997)*x_ref[2]
            arg[(0, 1, 3, 2)]+=-0.220007827056*x[2]**o + (0.818362146479)*x[2]
            ref[(0, 1, 3, 2)]+=-0.220007827056*x_ref[2]**o + (0.818362146479)*x_ref[2]
            arg[(0, 1, 3, 3)]+=-0.0481292107634*x[2]**o + (0.389765622873)*x[2]
            ref[(0, 1, 3, 3)]+=-0.0481292107634*x_ref[2]**o + (0.389765622873)*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.743012654167*x[2]**o + (0.611462340716)*x[2]
            ref[(1, 0, 0, 0)]+=0.743012654167*x_ref[2]**o + (0.611462340716)*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.355964687827*x[2]**o + (-0.992991224165)*x[2]
            ref[(1, 0, 0, 1)]+=-0.355964687827*x_ref[2]**o + (-0.992991224165)*x_ref[2]
            arg[(1, 0, 0, 2)]+=0.363898206646*x[2]**o + (-0.925038139403)*x[2]
            ref[(1, 0, 0, 2)]+=0.363898206646*x_ref[2]**o + (-0.925038139403)*x_ref[2]
            arg[(1, 0, 0, 3)]+=0.346391379486*x[2]**o + (-0.6075936518)*x[2]
            ref[(1, 0, 0, 3)]+=0.346391379486*x_ref[2]**o + (-0.6075936518)*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.810691308561*x[2]**o + (-0.661632727806)*x[2]
            ref[(1, 0, 1, 0)]+=0.810691308561*x_ref[2]**o + (-0.661632727806)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.19179668347*x[2]**o + (-0.315902730542)*x[2]
            ref[(1, 0, 1, 1)]+=-0.19179668347*x_ref[2]**o + (-0.315902730542)*x_ref[2]
            arg[(1, 0, 1, 2)]+=-0.453600752612*x[2]**o + (-0.644376661279)*x[2]
            ref[(1, 0, 1, 2)]+=-0.453600752612*x_ref[2]**o + (-0.644376661279)*x_ref[2]
            arg[(1, 0, 1, 3)]+=-0.352118546688*x[2]**o + (-0.620035870864)*x[2]
            ref[(1, 0, 1, 3)]+=-0.352118546688*x_ref[2]**o + (-0.620035870864)*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.429671331483*x[2]**o + (0.708239493013)*x[2]
            ref[(1, 0, 2, 0)]+=-0.429671331483*x_ref[2]**o + (0.708239493013)*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.924879635671*x[2]**o + (-0.166596479983)*x[2]
            ref[(1, 0, 2, 1)]+=0.924879635671*x_ref[2]**o + (-0.166596479983)*x_ref[2]
            arg[(1, 0, 2, 2)]+=-0.00860184968664*x[2]**o + (-0.864375663889)*x[2]
            ref[(1, 0, 2, 2)]+=-0.00860184968664*x_ref[2]**o + (-0.864375663889)*x_ref[2]
            arg[(1, 0, 2, 3)]+=-0.570421268406*x[2]**o + (-0.303261500315)*x[2]
            ref[(1, 0, 2, 3)]+=-0.570421268406*x_ref[2]**o + (-0.303261500315)*x_ref[2]
            arg[(1, 0, 3, 0)]+=0.0832853914436*x[2]**o + (0.151210994974)*x[2]
            ref[(1, 0, 3, 0)]+=0.0832853914436*x_ref[2]**o + (0.151210994974)*x_ref[2]
            arg[(1, 0, 3, 1)]+=0.424088541336*x[2]**o + (-0.06219478325)*x[2]
            ref[(1, 0, 3, 1)]+=0.424088541336*x_ref[2]**o + (-0.06219478325)*x_ref[2]
            arg[(1, 0, 3, 2)]+=-0.367980556035*x[2]**o + (-0.831057756277)*x[2]
            ref[(1, 0, 3, 2)]+=-0.367980556035*x_ref[2]**o + (-0.831057756277)*x_ref[2]
            arg[(1, 0, 3, 3)]+=0.112548860615*x[2]**o + (-0.493532128271)*x[2]
            ref[(1, 0, 3, 3)]+=0.112548860615*x_ref[2]**o + (-0.493532128271)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.476910023169*x[2]**o + (-0.252779578105)*x[2]
            ref[(1, 1, 0, 0)]+=0.476910023169*x_ref[2]**o + (-0.252779578105)*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.873076209054*x[2]**o + (-0.627991475533)*x[2]
            ref[(1, 1, 0, 1)]+=-0.873076209054*x_ref[2]**o + (-0.627991475533)*x_ref[2]
            arg[(1, 1, 0, 2)]+=0.722991691699*x[2]**o + (-0.762684818262)*x[2]
            ref[(1, 1, 0, 2)]+=0.722991691699*x_ref[2]**o + (-0.762684818262)*x_ref[2]
            arg[(1, 1, 0, 3)]+=-0.354912629082*x[2]**o + (0.253479264313)*x[2]
            ref[(1, 1, 0, 3)]+=-0.354912629082*x_ref[2]**o + (0.253479264313)*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.384043356423*x[2]**o + (0.312442212539)*x[2]
            ref[(1, 1, 1, 0)]+=-0.384043356423*x_ref[2]**o + (0.312442212539)*x_ref[2]
            arg[(1, 1, 1, 1)]+=-0.586200220837*x[2]**o + (-0.394222584865)*x[2]
            ref[(1, 1, 1, 1)]+=-0.586200220837*x_ref[2]**o + (-0.394222584865)*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.266952939323*x[2]**o + (0.942589837017)*x[2]
            ref[(1, 1, 1, 2)]+=-0.266952939323*x_ref[2]**o + (0.942589837017)*x_ref[2]
            arg[(1, 1, 1, 3)]+=-0.650769123871*x[2]**o + (-0.335861855233)*x[2]
            ref[(1, 1, 1, 3)]+=-0.650769123871*x_ref[2]**o + (-0.335861855233)*x_ref[2]
            arg[(1, 1, 2, 0)]+=0.1500971295*x[2]**o + (0.765401725582)*x[2]
            ref[(1, 1, 2, 0)]+=0.1500971295*x_ref[2]**o + (0.765401725582)*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.129159745588*x[2]**o + (-0.585789466075)*x[2]
            ref[(1, 1, 2, 1)]+=0.129159745588*x_ref[2]**o + (-0.585789466075)*x_ref[2]
            arg[(1, 1, 2, 2)]+=0.295724109676*x[2]**o + (0.928009063398)*x[2]
            ref[(1, 1, 2, 2)]+=0.295724109676*x_ref[2]**o + (0.928009063398)*x_ref[2]
            arg[(1, 1, 2, 3)]+=0.0291973505432*x[2]**o + (0.242284807624)*x[2]
            ref[(1, 1, 2, 3)]+=0.0291973505432*x_ref[2]**o + (0.242284807624)*x_ref[2]
            arg[(1, 1, 3, 0)]+=0.724612455667*x[2]**o + (0.59579201927)*x[2]
            ref[(1, 1, 3, 0)]+=0.724612455667*x_ref[2]**o + (0.59579201927)*x_ref[2]
            arg[(1, 1, 3, 1)]+=0.632394898443*x[2]**o + (-0.516057752137)*x[2]
            ref[(1, 1, 3, 1)]+=0.632394898443*x_ref[2]**o + (-0.516057752137)*x_ref[2]
            arg[(1, 1, 3, 2)]+=0.395113771001*x[2]**o + (0.51313911717)*x[2]
            ref[(1, 1, 3, 2)]+=0.395113771001*x_ref[2]**o + (0.51313911717)*x_ref[2]
            arg[(1, 1, 3, 3)]+=-0.18985544271*x[2]**o + (-0.231695800328)*x[2]
            ref[(1, 1, 3, 3)]+=-0.18985544271*x_ref[2]**o + (-0.231695800328)*x_ref[2]
            arg[(2, 0, 0, 0)]+=-0.15690040061*x[2]**o + (0.0888030049712)*x[2]
            ref[(2, 0, 0, 0)]+=-0.15690040061*x_ref[2]**o + (0.0888030049712)*x_ref[2]
            arg[(2, 0, 0, 1)]+=0.966201836072*x[2]**o + (-0.996693535125)*x[2]
            ref[(2, 0, 0, 1)]+=0.966201836072*x_ref[2]**o + (-0.996693535125)*x_ref[2]
            arg[(2, 0, 0, 2)]+=-0.902430780399*x[2]**o + (-0.717787851228)*x[2]
            ref[(2, 0, 0, 2)]+=-0.902430780399*x_ref[2]**o + (-0.717787851228)*x_ref[2]
            arg[(2, 0, 0, 3)]+=0.874763799448*x[2]**o + (0.810401219606)*x[2]
            ref[(2, 0, 0, 3)]+=0.874763799448*x_ref[2]**o + (0.810401219606)*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.489321922417*x[2]**o + (0.94569278903)*x[2]
            ref[(2, 0, 1, 0)]+=-0.489321922417*x_ref[2]**o + (0.94569278903)*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.334486414085*x[2]**o + (0.720041168103)*x[2]
            ref[(2, 0, 1, 1)]+=0.334486414085*x_ref[2]**o + (0.720041168103)*x_ref[2]
            arg[(2, 0, 1, 2)]+=-0.449003793091*x[2]**o + (0.231716788008)*x[2]
            ref[(2, 0, 1, 2)]+=-0.449003793091*x_ref[2]**o + (0.231716788008)*x_ref[2]
            arg[(2, 0, 1, 3)]+=-0.0677263565356*x[2]**o + (-0.0883911566748)*x[2]
            ref[(2, 0, 1, 3)]+=-0.0677263565356*x_ref[2]**o + (-0.0883911566748)*x_ref[2]
            arg[(2, 0, 2, 0)]+=0.632236184748*x[2]**o + (0.308622414849)*x[2]
            ref[(2, 0, 2, 0)]+=0.632236184748*x_ref[2]**o + (0.308622414849)*x_ref[2]
            arg[(2, 0, 2, 1)]+=0.717408368627*x[2]**o + (0.396420736772)*x[2]
            ref[(2, 0, 2, 1)]+=0.717408368627*x_ref[2]**o + (0.396420736772)*x_ref[2]
            arg[(2, 0, 2, 2)]+=0.405571448905*x[2]**o + (0.678425243945)*x[2]
            ref[(2, 0, 2, 2)]+=0.405571448905*x_ref[2]**o + (0.678425243945)*x_ref[2]
            arg[(2, 0, 2, 3)]+=-0.754819412692*x[2]**o + (0.332674659479)*x[2]
            ref[(2, 0, 2, 3)]+=-0.754819412692*x_ref[2]**o + (0.332674659479)*x_ref[2]
            arg[(2, 0, 3, 0)]+=-0.694947780628*x[2]**o + (0.513051881938)*x[2]
            ref[(2, 0, 3, 0)]+=-0.694947780628*x_ref[2]**o + (0.513051881938)*x_ref[2]
            arg[(2, 0, 3, 1)]+=0.0741553174969*x[2]**o + (0.298643533321)*x[2]
            ref[(2, 0, 3, 1)]+=0.0741553174969*x_ref[2]**o + (0.298643533321)*x_ref[2]
            arg[(2, 0, 3, 2)]+=-0.526070043829*x[2]**o + (0.597931278729)*x[2]
            ref[(2, 0, 3, 2)]+=-0.526070043829*x_ref[2]**o + (0.597931278729)*x_ref[2]
            arg[(2, 0, 3, 3)]+=-0.159771728089*x[2]**o + (0.776242501567)*x[2]
            ref[(2, 0, 3, 3)]+=-0.159771728089*x_ref[2]**o + (0.776242501567)*x_ref[2]
            arg[(2, 1, 0, 0)]+=0.576759600975*x[2]**o + (-0.00199107054691)*x[2]
            ref[(2, 1, 0, 0)]+=0.576759600975*x_ref[2]**o + (-0.00199107054691)*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.344018510076*x[2]**o + (-0.618766610215)*x[2]
            ref[(2, 1, 0, 1)]+=-0.344018510076*x_ref[2]**o + (-0.618766610215)*x_ref[2]
            arg[(2, 1, 0, 2)]+=0.017096032071*x[2]**o + (0.999776181892)*x[2]
            ref[(2, 1, 0, 2)]+=0.017096032071*x_ref[2]**o + (0.999776181892)*x_ref[2]
            arg[(2, 1, 0, 3)]+=-0.590000952991*x[2]**o + (0.0324749491408)*x[2]
            ref[(2, 1, 0, 3)]+=-0.590000952991*x_ref[2]**o + (0.0324749491408)*x_ref[2]
            arg[(2, 1, 1, 0)]+=-0.4482580441*x[2]**o + (-0.433379513246)*x[2]
            ref[(2, 1, 1, 0)]+=-0.4482580441*x_ref[2]**o + (-0.433379513246)*x_ref[2]
            arg[(2, 1, 1, 1)]+=0.923988235008*x[2]**o + (-0.535860007909)*x[2]
            ref[(2, 1, 1, 1)]+=0.923988235008*x_ref[2]**o + (-0.535860007909)*x_ref[2]
            arg[(2, 1, 1, 2)]+=-0.955599397334*x[2]**o + (-0.300774623679)*x[2]
            ref[(2, 1, 1, 2)]+=-0.955599397334*x_ref[2]**o + (-0.300774623679)*x_ref[2]
            arg[(2, 1, 1, 3)]+=-0.495580088338*x[2]**o + (-0.969694355525)*x[2]
            ref[(2, 1, 1, 3)]+=-0.495580088338*x_ref[2]**o + (-0.969694355525)*x_ref[2]
            arg[(2, 1, 2, 0)]+=-0.783871495504*x[2]**o + (-0.784019373296)*x[2]
            ref[(2, 1, 2, 0)]+=-0.783871495504*x_ref[2]**o + (-0.784019373296)*x_ref[2]
            arg[(2, 1, 2, 1)]+=-0.147910114153*x[2]**o + (-0.232202267704)*x[2]
            ref[(2, 1, 2, 1)]+=-0.147910114153*x_ref[2]**o + (-0.232202267704)*x_ref[2]
            arg[(2, 1, 2, 2)]+=0.0586136310108*x[2]**o + (0.0110988946373)*x[2]
            ref[(2, 1, 2, 2)]+=0.0586136310108*x_ref[2]**o + (0.0110988946373)*x_ref[2]
            arg[(2, 1, 2, 3)]+=-0.0400623958434*x[2]**o + (0.527338455102)*x[2]
            ref[(2, 1, 2, 3)]+=-0.0400623958434*x_ref[2]**o + (0.527338455102)*x_ref[2]
            arg[(2, 1, 3, 0)]+=-0.0330948253612*x[2]**o + (0.760685267938)*x[2]
            ref[(2, 1, 3, 0)]+=-0.0330948253612*x_ref[2]**o + (0.760685267938)*x_ref[2]
            arg[(2, 1, 3, 1)]+=0.676674423397*x[2]**o + (-0.478000160124)*x[2]
            ref[(2, 1, 3, 1)]+=0.676674423397*x_ref[2]**o + (-0.478000160124)*x_ref[2]
            arg[(2, 1, 3, 2)]+=-0.703528605933*x[2]**o + (-0.308141239429)*x[2]
            ref[(2, 1, 3, 2)]+=-0.703528605933*x_ref[2]**o + (-0.308141239429)*x_ref[2]
            arg[(2, 1, 3, 3)]+=-0.011442837061*x[2]**o + (0.173296588387)*x[2]
            ref[(2, 1, 3, 3)]+=-0.011442837061*x_ref[2]**o + (0.173296588387)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.545216822054*x[0]**o + (0.387118136427)*x[0] + (0.477795145346)*x[1]**o + (0.554918683985)*x[1]
        ref=0.545216822054*x_ref[0]**o + (0.387118136427)*x_ref[0] + (0.477795145346)*x_ref[1]**o + (0.554918683985)*x_ref[1]
        if dim==3:
            arg+=(-0.0346179798344)*x[2]**o + (0.0826490085535)*x[2]
            ref+=(-0.0346179798344)*x_ref[2]**o + (0.0826490085535)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=0.226007616059*x[0]**o + (0.306786183041)*x[0] + (-0.985271388095)*x[1]**o + (0.638256446748)*x[1]
        ref[(0,)]=0.226007616059*x_ref[0]**o + (0.306786183041)*x_ref[0] + (-0.985271388095)*x_ref[1]**o + (0.638256446748)*x_ref[1]
        arg[(1,)]=0.384820179085*x[0]**o + (0.78983217005)*x[0] + (0.342495311019)*x[1]**o + (-0.0113193104594)*x[1]
        ref[(1,)]=0.384820179085*x_ref[0]**o + (0.78983217005)*x_ref[0] + (0.342495311019)*x_ref[1]**o + (-0.0113193104594)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.0563663345773*x[2]**o + (0.728523144617)*x[2]
            ref[(0,)]+=0.0563663345773*x_ref[2]**o + (0.728523144617)*x_ref[2]
            arg[(1,)]+=-0.268070306969*x[2]**o + (0.297432471618)*x[2]
            ref[(1,)]+=-0.268070306969*x_ref[2]**o + (0.297432471618)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref = Data(0,(4, 4),w_ref)
        arg[(0, 0)]=0.875721312671*x[0]**o + (0.97924744363)*x[0] + (-0.6513795311)*x[1]**o + (-0.263025714584)*x[1]
        ref[(0, 0)]=0.875721312671*x_ref[0]**o + (0.97924744363)*x_ref[0] + (-0.6513795311)*x_ref[1]**o + (-0.263025714584)*x_ref[1]
        arg[(0, 1)]=0.801989645405*x[0]**o + (-0.417400553238)*x[0] + (0.202756462857)*x[1]**o + (0.776537999338)*x[1]
        ref[(0, 1)]=0.801989645405*x_ref[0]**o + (-0.417400553238)*x_ref[0] + (0.202756462857)*x_ref[1]**o + (0.776537999338)*x_ref[1]
        arg[(0, 2)]=0.463513581957*x[0]**o + (0.435380879161)*x[0] + (-0.890713246188)*x[1]**o + (0.64929985298)*x[1]
        ref[(0, 2)]=0.463513581957*x_ref[0]**o + (0.435380879161)*x_ref[0] + (-0.890713246188)*x_ref[1]**o + (0.64929985298)*x_ref[1]
        arg[(0, 3)]=-0.268471901833*x[0]**o + (-0.0268867721231)*x[0] + (0.467696879418)*x[1]**o + (-0.814878851763)*x[1]
        ref[(0, 3)]=-0.268471901833*x_ref[0]**o + (-0.0268867721231)*x_ref[0] + (0.467696879418)*x_ref[1]**o + (-0.814878851763)*x_ref[1]
        arg[(1, 0)]=-0.391711421755*x[0]**o + (-0.148772615613)*x[0] + (0.163451116488)*x[1]**o + (-0.91105666526)*x[1]
        ref[(1, 0)]=-0.391711421755*x_ref[0]**o + (-0.148772615613)*x_ref[0] + (0.163451116488)*x_ref[1]**o + (-0.91105666526)*x_ref[1]
        arg[(1, 1)]=-0.127843467845*x[0]**o + (0.0615679861239)*x[0] + (0.914932694878)*x[1]**o + (-0.831779288022)*x[1]
        ref[(1, 1)]=-0.127843467845*x_ref[0]**o + (0.0615679861239)*x_ref[0] + (0.914932694878)*x_ref[1]**o + (-0.831779288022)*x_ref[1]
        arg[(1, 2)]=-0.449139964211*x[0]**o + (-0.664643855396)*x[0] + (-0.872767620341)*x[1]**o + (-0.578974846103)*x[1]
        ref[(1, 2)]=-0.449139964211*x_ref[0]**o + (-0.664643855396)*x_ref[0] + (-0.872767620341)*x_ref[1]**o + (-0.578974846103)*x_ref[1]
        arg[(1, 3)]=0.277328559008*x[0]**o + (0.733175333839)*x[0] + (0.350976713344)*x[1]**o + (0.348249328394)*x[1]
        ref[(1, 3)]=0.277328559008*x_ref[0]**o + (0.733175333839)*x_ref[0] + (0.350976713344)*x_ref[1]**o + (0.348249328394)*x_ref[1]
        arg[(2, 0)]=-0.556510012297*x[0]**o + (0.447563028307)*x[0] + (0.516240396087)*x[1]**o + (0.773537423883)*x[1]
        ref[(2, 0)]=-0.556510012297*x_ref[0]**o + (0.447563028307)*x_ref[0] + (0.516240396087)*x_ref[1]**o + (0.773537423883)*x_ref[1]
        arg[(2, 1)]=0.158854493802*x[0]**o + (-0.415640227204)*x[0] + (-0.591133336846)*x[1]**o + (-0.370641407759)*x[1]
        ref[(2, 1)]=0.158854493802*x_ref[0]**o + (-0.415640227204)*x_ref[0] + (-0.591133336846)*x_ref[1]**o + (-0.370641407759)*x_ref[1]
        arg[(2, 2)]=-0.0238260307888*x[0]**o + (-0.240668257533)*x[0] + (-0.55182760058)*x[1]**o + (0.0575912930613)*x[1]
        ref[(2, 2)]=-0.0238260307888*x_ref[0]**o + (-0.240668257533)*x_ref[0] + (-0.55182760058)*x_ref[1]**o + (0.0575912930613)*x_ref[1]
        arg[(2, 3)]=-0.726229971761*x[0]**o + (-0.19770920747)*x[0] + (-0.956365325646)*x[1]**o + (-0.835218019399)*x[1]
        ref[(2, 3)]=-0.726229971761*x_ref[0]**o + (-0.19770920747)*x_ref[0] + (-0.956365325646)*x_ref[1]**o + (-0.835218019399)*x_ref[1]
        arg[(3, 0)]=0.48582447232*x[0]**o + (0.848911751463)*x[0] + (-0.902868951405)*x[1]**o + (0.453458498467)*x[1]
        ref[(3, 0)]=0.48582447232*x_ref[0]**o + (0.848911751463)*x_ref[0] + (-0.902868951405)*x_ref[1]**o + (0.453458498467)*x_ref[1]
        arg[(3, 1)]=-0.391998228689*x[0]**o + (0.455001541049)*x[0] + (0.844287129951)*x[1]**o + (0.504523250958)*x[1]
        ref[(3, 1)]=-0.391998228689*x_ref[0]**o + (0.455001541049)*x_ref[0] + (0.844287129951)*x_ref[1]**o + (0.504523250958)*x_ref[1]
        arg[(3, 2)]=0.930526761415*x[0]**o + (-0.417543387625)*x[0] + (-0.312104879622)*x[1]**o + (-0.188607963479)*x[1]
        ref[(3, 2)]=0.930526761415*x_ref[0]**o + (-0.417543387625)*x_ref[0] + (-0.312104879622)*x_ref[1]**o + (-0.188607963479)*x_ref[1]
        arg[(3, 3)]=0.134818580012*x[0]**o + (-0.784281381644)*x[0] + (-0.524410510281)*x[1]**o + (0.620594518859)*x[1]
        ref[(3, 3)]=0.134818580012*x_ref[0]**o + (-0.784281381644)*x_ref[0] + (-0.524410510281)*x_ref[1]**o + (0.620594518859)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.801745951371*x[2]**o + (0.100573229358)*x[2]
            ref[(0, 0)]+=0.801745951371*x_ref[2]**o + (0.100573229358)*x_ref[2]
            arg[(0, 1)]+=-0.917126355885*x[2]**o + (0.399364519154)*x[2]
            ref[(0, 1)]+=-0.917126355885*x_ref[2]**o + (0.399364519154)*x_ref[2]
            arg[(0, 2)]+=-0.565674065908*x[2]**o + (0.0287000048863)*x[2]
            ref[(0, 2)]+=-0.565674065908*x_ref[2]**o + (0.0287000048863)*x_ref[2]
            arg[(0, 3)]+=-0.930860218107*x[2]**o + (0.0528111731514)*x[2]
            ref[(0, 3)]+=-0.930860218107*x_ref[2]**o + (0.0528111731514)*x_ref[2]
            arg[(1, 0)]+=-0.0872377039954*x[2]**o + (-0.344711822477)*x[2]
            ref[(1, 0)]+=-0.0872377039954*x_ref[2]**o + (-0.344711822477)*x_ref[2]
            arg[(1, 1)]+=0.783720593274*x[2]**o + (0.17803048778)*x[2]
            ref[(1, 1)]+=0.783720593274*x_ref[2]**o + (0.17803048778)*x_ref[2]
            arg[(1, 2)]+=0.00810524725898*x[2]**o + (0.338885106327)*x[2]
            ref[(1, 2)]+=0.00810524725898*x_ref[2]**o + (0.338885106327)*x_ref[2]
            arg[(1, 3)]+=0.0562303604592*x[2]**o + (-0.593460591164)*x[2]
            ref[(1, 3)]+=0.0562303604592*x_ref[2]**o + (-0.593460591164)*x_ref[2]
            arg[(2, 0)]+=-0.919563568541*x[2]**o + (-0.3164107976)*x[2]
            ref[(2, 0)]+=-0.919563568541*x_ref[2]**o + (-0.3164107976)*x_ref[2]
            arg[(2, 1)]+=0.921409956597*x[2]**o + (0.835415812618)*x[2]
            ref[(2, 1)]+=0.921409956597*x_ref[2]**o + (0.835415812618)*x_ref[2]
            arg[(2, 2)]+=0.729396030503*x[2]**o + (-0.267117714794)*x[2]
            ref[(2, 2)]+=0.729396030503*x_ref[2]**o + (-0.267117714794)*x_ref[2]
            arg[(2, 3)]+=0.244792925077*x[2]**o + (0.700899142841)*x[2]
            ref[(2, 3)]+=0.244792925077*x_ref[2]**o + (0.700899142841)*x_ref[2]
            arg[(3, 0)]+=0.0344097843462*x[2]**o + (-0.727840437948)*x[2]
            ref[(3, 0)]+=0.0344097843462*x_ref[2]**o + (-0.727840437948)*x_ref[2]
            arg[(3, 1)]+=0.742068064339*x[2]**o + (-0.627395211951)*x[2]
            ref[(3, 1)]+=0.742068064339*x_ref[2]**o + (-0.627395211951)*x_ref[2]
            arg[(3, 2)]+=0.873206752536*x[2]**o + (0.930845897521)*x[2]
            ref[(3, 2)]+=0.873206752536*x_ref[2]**o + (0.930845897521)*x_ref[2]
            arg[(3, 3)]+=-0.16359087164*x[2]**o + (0.512331426778)*x[2]
            ref[(3, 3)]+=-0.16359087164*x_ref[2]**o + (0.512331426778)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 4),w)
        ref = Data(0,(3, 4, 4),w_ref)
        arg[(0, 0, 0)]=0.996818762587*x[0]**o + (0.00810873816405)*x[0] + (-0.148172322428)*x[1]**o + (0.726705205048)*x[1]
        ref[(0, 0, 0)]=0.996818762587*x_ref[0]**o + (0.00810873816405)*x_ref[0] + (-0.148172322428)*x_ref[1]**o + (0.726705205048)*x_ref[1]
        arg[(0, 0, 1)]=-0.273972267556*x[0]**o + (-0.902380749314)*x[0] + (0.576511467023)*x[1]**o + (0.555140699857)*x[1]
        ref[(0, 0, 1)]=-0.273972267556*x_ref[0]**o + (-0.902380749314)*x_ref[0] + (0.576511467023)*x_ref[1]**o + (0.555140699857)*x_ref[1]
        arg[(0, 0, 2)]=0.0959118848229*x[0]**o + (0.663485849043)*x[0] + (-0.329209914514)*x[1]**o + (0.220910383585)*x[1]
        ref[(0, 0, 2)]=0.0959118848229*x_ref[0]**o + (0.663485849043)*x_ref[0] + (-0.329209914514)*x_ref[1]**o + (0.220910383585)*x_ref[1]
        arg[(0, 0, 3)]=0.911977285069*x[0]**o + (0.389518341522)*x[0] + (0.707925065489)*x[1]**o + (-0.466907660802)*x[1]
        ref[(0, 0, 3)]=0.911977285069*x_ref[0]**o + (0.389518341522)*x_ref[0] + (0.707925065489)*x_ref[1]**o + (-0.466907660802)*x_ref[1]
        arg[(0, 1, 0)]=0.00367811452543*x[0]**o + (0.946159832354)*x[0] + (0.637126205223)*x[1]**o + (-0.95439102056)*x[1]
        ref[(0, 1, 0)]=0.00367811452543*x_ref[0]**o + (0.946159832354)*x_ref[0] + (0.637126205223)*x_ref[1]**o + (-0.95439102056)*x_ref[1]
        arg[(0, 1, 1)]=0.771812905549*x[0]**o + (0.825928852686)*x[0] + (-0.626250650063)*x[1]**o + (0.893254065464)*x[1]
        ref[(0, 1, 1)]=0.771812905549*x_ref[0]**o + (0.825928852686)*x_ref[0] + (-0.626250650063)*x_ref[1]**o + (0.893254065464)*x_ref[1]
        arg[(0, 1, 2)]=-0.92077194723*x[0]**o + (-0.813571462298)*x[0] + (0.712496375152)*x[1]**o + (-0.778336346938)*x[1]
        ref[(0, 1, 2)]=-0.92077194723*x_ref[0]**o + (-0.813571462298)*x_ref[0] + (0.712496375152)*x_ref[1]**o + (-0.778336346938)*x_ref[1]
        arg[(0, 1, 3)]=-0.709377481453*x[0]**o + (0.23081279246)*x[0] + (0.601004205532)*x[1]**o + (0.411842550494)*x[1]
        ref[(0, 1, 3)]=-0.709377481453*x_ref[0]**o + (0.23081279246)*x_ref[0] + (0.601004205532)*x_ref[1]**o + (0.411842550494)*x_ref[1]
        arg[(0, 2, 0)]=0.366884310462*x[0]**o + (-0.125776547831)*x[0] + (0.72446793976)*x[1]**o + (0.116195375548)*x[1]
        ref[(0, 2, 0)]=0.366884310462*x_ref[0]**o + (-0.125776547831)*x_ref[0] + (0.72446793976)*x_ref[1]**o + (0.116195375548)*x_ref[1]
        arg[(0, 2, 1)]=0.00650666619581*x[0]**o + (0.0923793368665)*x[0] + (0.154801504402)*x[1]**o + (0.97887483529)*x[1]
        ref[(0, 2, 1)]=0.00650666619581*x_ref[0]**o + (0.0923793368665)*x_ref[0] + (0.154801504402)*x_ref[1]**o + (0.97887483529)*x_ref[1]
        arg[(0, 2, 2)]=0.811758813112*x[0]**o + (-0.410241959813)*x[0] + (-0.639006235002)*x[1]**o + (0.824476370899)*x[1]
        ref[(0, 2, 2)]=0.811758813112*x_ref[0]**o + (-0.410241959813)*x_ref[0] + (-0.639006235002)*x_ref[1]**o + (0.824476370899)*x_ref[1]
        arg[(0, 2, 3)]=0.878913602141*x[0]**o + (-0.556871372219)*x[0] + (0.455330681605)*x[1]**o + (0.80312850764)*x[1]
        ref[(0, 2, 3)]=0.878913602141*x_ref[0]**o + (-0.556871372219)*x_ref[0] + (0.455330681605)*x_ref[1]**o + (0.80312850764)*x_ref[1]
        arg[(0, 3, 0)]=0.762126033131*x[0]**o + (-0.650721858899)*x[0] + (0.340160791488)*x[1]**o + (-0.527159438585)*x[1]
        ref[(0, 3, 0)]=0.762126033131*x_ref[0]**o + (-0.650721858899)*x_ref[0] + (0.340160791488)*x_ref[1]**o + (-0.527159438585)*x_ref[1]
        arg[(0, 3, 1)]=-0.118171137072*x[0]**o + (-0.755499169455)*x[0] + (0.895632429056)*x[1]**o + (0.426734206138)*x[1]
        ref[(0, 3, 1)]=-0.118171137072*x_ref[0]**o + (-0.755499169455)*x_ref[0] + (0.895632429056)*x_ref[1]**o + (0.426734206138)*x_ref[1]
        arg[(0, 3, 2)]=0.0416279491368*x[0]**o + (-0.613032148842)*x[0] + (0.464894415495)*x[1]**o + (-0.736254906704)*x[1]
        ref[(0, 3, 2)]=0.0416279491368*x_ref[0]**o + (-0.613032148842)*x_ref[0] + (0.464894415495)*x_ref[1]**o + (-0.736254906704)*x_ref[1]
        arg[(0, 3, 3)]=-0.662421685267*x[0]**o + (0.012767479386)*x[0] + (-0.968489289362)*x[1]**o + (0.338388160494)*x[1]
        ref[(0, 3, 3)]=-0.662421685267*x_ref[0]**o + (0.012767479386)*x_ref[0] + (-0.968489289362)*x_ref[1]**o + (0.338388160494)*x_ref[1]
        arg[(1, 0, 0)]=-0.282464644129*x[0]**o + (-0.564665419597)*x[0] + (-0.388298536393)*x[1]**o + (-0.600295756766)*x[1]
        ref[(1, 0, 0)]=-0.282464644129*x_ref[0]**o + (-0.564665419597)*x_ref[0] + (-0.388298536393)*x_ref[1]**o + (-0.600295756766)*x_ref[1]
        arg[(1, 0, 1)]=0.183215722296*x[0]**o + (-0.931919015928)*x[0] + (-0.224324100273)*x[1]**o + (-0.600450163468)*x[1]
        ref[(1, 0, 1)]=0.183215722296*x_ref[0]**o + (-0.931919015928)*x_ref[0] + (-0.224324100273)*x_ref[1]**o + (-0.600450163468)*x_ref[1]
        arg[(1, 0, 2)]=-0.694396414637*x[0]**o + (0.0292093615534)*x[0] + (0.522161887566)*x[1]**o + (0.263418153217)*x[1]
        ref[(1, 0, 2)]=-0.694396414637*x_ref[0]**o + (0.0292093615534)*x_ref[0] + (0.522161887566)*x_ref[1]**o + (0.263418153217)*x_ref[1]
        arg[(1, 0, 3)]=-0.443433793112*x[0]**o + (0.278716396291)*x[0] + (0.699533217524)*x[1]**o + (-0.272965968656)*x[1]
        ref[(1, 0, 3)]=-0.443433793112*x_ref[0]**o + (0.278716396291)*x_ref[0] + (0.699533217524)*x_ref[1]**o + (-0.272965968656)*x_ref[1]
        arg[(1, 1, 0)]=-0.661690159467*x[0]**o + (0.0737028634022)*x[0] + (-0.559593481998)*x[1]**o + (0.175050971577)*x[1]
        ref[(1, 1, 0)]=-0.661690159467*x_ref[0]**o + (0.0737028634022)*x_ref[0] + (-0.559593481998)*x_ref[1]**o + (0.175050971577)*x_ref[1]
        arg[(1, 1, 1)]=0.537917364106*x[0]**o + (0.473275297493)*x[0] + (-0.56450504996)*x[1]**o + (-0.389482730861)*x[1]
        ref[(1, 1, 1)]=0.537917364106*x_ref[0]**o + (0.473275297493)*x_ref[0] + (-0.56450504996)*x_ref[1]**o + (-0.389482730861)*x_ref[1]
        arg[(1, 1, 2)]=0.706583197553*x[0]**o + (0.296431488407)*x[0] + (0.858459473533)*x[1]**o + (0.407074369564)*x[1]
        ref[(1, 1, 2)]=0.706583197553*x_ref[0]**o + (0.296431488407)*x_ref[0] + (0.858459473533)*x_ref[1]**o + (0.407074369564)*x_ref[1]
        arg[(1, 1, 3)]=-0.247729110849*x[0]**o + (-0.017458136178)*x[0] + (-0.244420809115)*x[1]**o + (-0.0951714378462)*x[1]
        ref[(1, 1, 3)]=-0.247729110849*x_ref[0]**o + (-0.017458136178)*x_ref[0] + (-0.244420809115)*x_ref[1]**o + (-0.0951714378462)*x_ref[1]
        arg[(1, 2, 0)]=-0.510701535437*x[0]**o + (-0.74203570769)*x[0] + (-0.719063920704)*x[1]**o + (0.20322715868)*x[1]
        ref[(1, 2, 0)]=-0.510701535437*x_ref[0]**o + (-0.74203570769)*x_ref[0] + (-0.719063920704)*x_ref[1]**o + (0.20322715868)*x_ref[1]
        arg[(1, 2, 1)]=0.691794754796*x[0]**o + (0.67211663646)*x[0] + (-0.820470786954)*x[1]**o + (0.649054775966)*x[1]
        ref[(1, 2, 1)]=0.691794754796*x_ref[0]**o + (0.67211663646)*x_ref[0] + (-0.820470786954)*x_ref[1]**o + (0.649054775966)*x_ref[1]
        arg[(1, 2, 2)]=0.870648142706*x[0]**o + (0.580002678664)*x[0] + (-0.955112318576)*x[1]**o + (-0.227323219947)*x[1]
        ref[(1, 2, 2)]=0.870648142706*x_ref[0]**o + (0.580002678664)*x_ref[0] + (-0.955112318576)*x_ref[1]**o + (-0.227323219947)*x_ref[1]
        arg[(1, 2, 3)]=0.563804151622*x[0]**o + (-0.319047327063)*x[0] + (0.867801825278)*x[1]**o + (-0.409180188894)*x[1]
        ref[(1, 2, 3)]=0.563804151622*x_ref[0]**o + (-0.319047327063)*x_ref[0] + (0.867801825278)*x_ref[1]**o + (-0.409180188894)*x_ref[1]
        arg[(1, 3, 0)]=-0.261797392398*x[0]**o + (0.316016627919)*x[0] + (0.177444110063)*x[1]**o + (-0.120161441619)*x[1]
        ref[(1, 3, 0)]=-0.261797392398*x_ref[0]**o + (0.316016627919)*x_ref[0] + (0.177444110063)*x_ref[1]**o + (-0.120161441619)*x_ref[1]
        arg[(1, 3, 1)]=0.627672974081*x[0]**o + (-0.578863660127)*x[0] + (-0.759611726486)*x[1]**o + (0.0445105114083)*x[1]
        ref[(1, 3, 1)]=0.627672974081*x_ref[0]**o + (-0.578863660127)*x_ref[0] + (-0.759611726486)*x_ref[1]**o + (0.0445105114083)*x_ref[1]
        arg[(1, 3, 2)]=0.320793117438*x[0]**o + (0.388347060367)*x[0] + (-0.036796430285)*x[1]**o + (-0.266716774754)*x[1]
        ref[(1, 3, 2)]=0.320793117438*x_ref[0]**o + (0.388347060367)*x_ref[0] + (-0.036796430285)*x_ref[1]**o + (-0.266716774754)*x_ref[1]
        arg[(1, 3, 3)]=-0.673787692765*x[0]**o + (0.219646337815)*x[0] + (0.519620065189)*x[1]**o + (0.232785391501)*x[1]
        ref[(1, 3, 3)]=-0.673787692765*x_ref[0]**o + (0.219646337815)*x_ref[0] + (0.519620065189)*x_ref[1]**o + (0.232785391501)*x_ref[1]
        arg[(2, 0, 0)]=-0.0192062097221*x[0]**o + (-0.0916588099222)*x[0] + (-0.305157599266)*x[1]**o + (-0.601454393164)*x[1]
        ref[(2, 0, 0)]=-0.0192062097221*x_ref[0]**o + (-0.0916588099222)*x_ref[0] + (-0.305157599266)*x_ref[1]**o + (-0.601454393164)*x_ref[1]
        arg[(2, 0, 1)]=-0.697193375766*x[0]**o + (0.0216889796364)*x[0] + (0.927615074398)*x[1]**o + (-0.105190296333)*x[1]
        ref[(2, 0, 1)]=-0.697193375766*x_ref[0]**o + (0.0216889796364)*x_ref[0] + (0.927615074398)*x_ref[1]**o + (-0.105190296333)*x_ref[1]
        arg[(2, 0, 2)]=0.0758985663765*x[0]**o + (-0.530694270364)*x[0] + (-0.426740334948)*x[1]**o + (0.396838383182)*x[1]
        ref[(2, 0, 2)]=0.0758985663765*x_ref[0]**o + (-0.530694270364)*x_ref[0] + (-0.426740334948)*x_ref[1]**o + (0.396838383182)*x_ref[1]
        arg[(2, 0, 3)]=-0.101219981867*x[0]**o + (0.544239081181)*x[0] + (-0.897354176183)*x[1]**o + (-0.883315793606)*x[1]
        ref[(2, 0, 3)]=-0.101219981867*x_ref[0]**o + (0.544239081181)*x_ref[0] + (-0.897354176183)*x_ref[1]**o + (-0.883315793606)*x_ref[1]
        arg[(2, 1, 0)]=-0.168655347051*x[0]**o + (0.775542333203)*x[0] + (-0.189091387371)*x[1]**o + (0.972662923333)*x[1]
        ref[(2, 1, 0)]=-0.168655347051*x_ref[0]**o + (0.775542333203)*x_ref[0] + (-0.189091387371)*x_ref[1]**o + (0.972662923333)*x_ref[1]
        arg[(2, 1, 1)]=0.0835712465997*x[0]**o + (-0.104390176132)*x[0] + (-0.594387879091)*x[1]**o + (0.949472296175)*x[1]
        ref[(2, 1, 1)]=0.0835712465997*x_ref[0]**o + (-0.104390176132)*x_ref[0] + (-0.594387879091)*x_ref[1]**o + (0.949472296175)*x_ref[1]
        arg[(2, 1, 2)]=-0.0991061372687*x[0]**o + (-0.0096619701624)*x[0] + (-0.388104554862)*x[1]**o + (-0.469471179652)*x[1]
        ref[(2, 1, 2)]=-0.0991061372687*x_ref[0]**o + (-0.0096619701624)*x_ref[0] + (-0.388104554862)*x_ref[1]**o + (-0.469471179652)*x_ref[1]
        arg[(2, 1, 3)]=-0.34547534931*x[0]**o + (-0.189785315442)*x[0] + (-0.716937513145)*x[1]**o + (-0.0139906124163)*x[1]
        ref[(2, 1, 3)]=-0.34547534931*x_ref[0]**o + (-0.189785315442)*x_ref[0] + (-0.716937513145)*x_ref[1]**o + (-0.0139906124163)*x_ref[1]
        arg[(2, 2, 0)]=-0.607481841392*x[0]**o + (-0.692647881551)*x[0] + (-0.997058933425)*x[1]**o + (-0.533365305859)*x[1]
        ref[(2, 2, 0)]=-0.607481841392*x_ref[0]**o + (-0.692647881551)*x_ref[0] + (-0.997058933425)*x_ref[1]**o + (-0.533365305859)*x_ref[1]
        arg[(2, 2, 1)]=-0.415035983306*x[0]**o + (-0.337404357138)*x[0] + (-0.0846974184558)*x[1]**o + (-0.472324946594)*x[1]
        ref[(2, 2, 1)]=-0.415035983306*x_ref[0]**o + (-0.337404357138)*x_ref[0] + (-0.0846974184558)*x_ref[1]**o + (-0.472324946594)*x_ref[1]
        arg[(2, 2, 2)]=-0.245858467193*x[0]**o + (0.964560199472)*x[0] + (-0.272952970924)*x[1]**o + (-0.398545137011)*x[1]
        ref[(2, 2, 2)]=-0.245858467193*x_ref[0]**o + (0.964560199472)*x_ref[0] + (-0.272952970924)*x_ref[1]**o + (-0.398545137011)*x_ref[1]
        arg[(2, 2, 3)]=0.076213024829*x[0]**o + (0.432553008512)*x[0] + (-0.324572340426)*x[1]**o + (0.174993589488)*x[1]
        ref[(2, 2, 3)]=0.076213024829*x_ref[0]**o + (0.432553008512)*x_ref[0] + (-0.324572340426)*x_ref[1]**o + (0.174993589488)*x_ref[1]
        arg[(2, 3, 0)]=-0.763484851057*x[0]**o + (-0.660025381745)*x[0] + (0.584709036627)*x[1]**o + (-0.259400493282)*x[1]
        ref[(2, 3, 0)]=-0.763484851057*x_ref[0]**o + (-0.660025381745)*x_ref[0] + (0.584709036627)*x_ref[1]**o + (-0.259400493282)*x_ref[1]
        arg[(2, 3, 1)]=0.383124807494*x[0]**o + (-0.368948792128)*x[0] + (-0.443919609306)*x[1]**o + (-0.376331200418)*x[1]
        ref[(2, 3, 1)]=0.383124807494*x_ref[0]**o + (-0.368948792128)*x_ref[0] + (-0.443919609306)*x_ref[1]**o + (-0.376331200418)*x_ref[1]
        arg[(2, 3, 2)]=-0.685102895737*x[0]**o + (-0.449445282495)*x[0] + (-0.133249744419)*x[1]**o + (-0.543373402989)*x[1]
        ref[(2, 3, 2)]=-0.685102895737*x_ref[0]**o + (-0.449445282495)*x_ref[0] + (-0.133249744419)*x_ref[1]**o + (-0.543373402989)*x_ref[1]
        arg[(2, 3, 3)]=-0.418495381256*x[0]**o + (0.36535482647)*x[0] + (0.0185615747029)*x[1]**o + (-0.982114058234)*x[1]
        ref[(2, 3, 3)]=-0.418495381256*x_ref[0]**o + (0.36535482647)*x_ref[0] + (0.0185615747029)*x_ref[1]**o + (-0.982114058234)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.354555894426*x[2]**o + (0.785679969009)*x[2]
            ref[(0, 0, 0)]+=-0.354555894426*x_ref[2]**o + (0.785679969009)*x_ref[2]
            arg[(0, 0, 1)]+=-0.0449539417361*x[2]**o + (-0.998595401628)*x[2]
            ref[(0, 0, 1)]+=-0.0449539417361*x_ref[2]**o + (-0.998595401628)*x_ref[2]
            arg[(0, 0, 2)]+=-0.576735038234*x[2]**o + (-0.573991618999)*x[2]
            ref[(0, 0, 2)]+=-0.576735038234*x_ref[2]**o + (-0.573991618999)*x_ref[2]
            arg[(0, 0, 3)]+=-0.984501543904*x[2]**o + (0.111917585703)*x[2]
            ref[(0, 0, 3)]+=-0.984501543904*x_ref[2]**o + (0.111917585703)*x_ref[2]
            arg[(0, 1, 0)]+=0.174476117379*x[2]**o + (-0.118199751247)*x[2]
            ref[(0, 1, 0)]+=0.174476117379*x_ref[2]**o + (-0.118199751247)*x_ref[2]
            arg[(0, 1, 1)]+=0.0772271239732*x[2]**o + (-0.145447596564)*x[2]
            ref[(0, 1, 1)]+=0.0772271239732*x_ref[2]**o + (-0.145447596564)*x_ref[2]
            arg[(0, 1, 2)]+=0.283043729259*x[2]**o + (-0.339722328276)*x[2]
            ref[(0, 1, 2)]+=0.283043729259*x_ref[2]**o + (-0.339722328276)*x_ref[2]
            arg[(0, 1, 3)]+=-0.70272147401*x[2]**o + (0.591174439547)*x[2]
            ref[(0, 1, 3)]+=-0.70272147401*x_ref[2]**o + (0.591174439547)*x_ref[2]
            arg[(0, 2, 0)]+=-0.155214394521*x[2]**o + (0.146214113471)*x[2]
            ref[(0, 2, 0)]+=-0.155214394521*x_ref[2]**o + (0.146214113471)*x_ref[2]
            arg[(0, 2, 1)]+=-0.0167006380306*x[2]**o + (-0.179413910645)*x[2]
            ref[(0, 2, 1)]+=-0.0167006380306*x_ref[2]**o + (-0.179413910645)*x_ref[2]
            arg[(0, 2, 2)]+=0.951835774006*x[2]**o + (0.261039508983)*x[2]
            ref[(0, 2, 2)]+=0.951835774006*x_ref[2]**o + (0.261039508983)*x_ref[2]
            arg[(0, 2, 3)]+=-0.295361605611*x[2]**o + (-0.17697119179)*x[2]
            ref[(0, 2, 3)]+=-0.295361605611*x_ref[2]**o + (-0.17697119179)*x_ref[2]
            arg[(0, 3, 0)]+=-0.500274501849*x[2]**o + (-0.0123903104899)*x[2]
            ref[(0, 3, 0)]+=-0.500274501849*x_ref[2]**o + (-0.0123903104899)*x_ref[2]
            arg[(0, 3, 1)]+=-0.250192392589*x[2]**o + (-0.38269282236)*x[2]
            ref[(0, 3, 1)]+=-0.250192392589*x_ref[2]**o + (-0.38269282236)*x_ref[2]
            arg[(0, 3, 2)]+=-0.238735615099*x[2]**o + (-0.8214166896)*x[2]
            ref[(0, 3, 2)]+=-0.238735615099*x_ref[2]**o + (-0.8214166896)*x_ref[2]
            arg[(0, 3, 3)]+=-0.675658797847*x[2]**o + (0.493387803072)*x[2]
            ref[(0, 3, 3)]+=-0.675658797847*x_ref[2]**o + (0.493387803072)*x_ref[2]
            arg[(1, 0, 0)]+=0.827754092338*x[2]**o + (-0.555308453039)*x[2]
            ref[(1, 0, 0)]+=0.827754092338*x_ref[2]**o + (-0.555308453039)*x_ref[2]
            arg[(1, 0, 1)]+=-0.333658659126*x[2]**o + (0.574680299451)*x[2]
            ref[(1, 0, 1)]+=-0.333658659126*x_ref[2]**o + (0.574680299451)*x_ref[2]
            arg[(1, 0, 2)]+=-0.992390669651*x[2]**o + (0.280900590938)*x[2]
            ref[(1, 0, 2)]+=-0.992390669651*x_ref[2]**o + (0.280900590938)*x_ref[2]
            arg[(1, 0, 3)]+=-0.530536188922*x[2]**o + (-0.455914764221)*x[2]
            ref[(1, 0, 3)]+=-0.530536188922*x_ref[2]**o + (-0.455914764221)*x_ref[2]
            arg[(1, 1, 0)]+=0.126653428591*x[2]**o + (-0.826200539087)*x[2]
            ref[(1, 1, 0)]+=0.126653428591*x_ref[2]**o + (-0.826200539087)*x_ref[2]
            arg[(1, 1, 1)]+=0.512455875223*x[2]**o + (-0.960065200622)*x[2]
            ref[(1, 1, 1)]+=0.512455875223*x_ref[2]**o + (-0.960065200622)*x_ref[2]
            arg[(1, 1, 2)]+=0.210464822868*x[2]**o + (-0.334365855572)*x[2]
            ref[(1, 1, 2)]+=0.210464822868*x_ref[2]**o + (-0.334365855572)*x_ref[2]
            arg[(1, 1, 3)]+=0.669338667361*x[2]**o + (-0.194649173886)*x[2]
            ref[(1, 1, 3)]+=0.669338667361*x_ref[2]**o + (-0.194649173886)*x_ref[2]
            arg[(1, 2, 0)]+=-0.445399334227*x[2]**o + (0.27214912119)*x[2]
            ref[(1, 2, 0)]+=-0.445399334227*x_ref[2]**o + (0.27214912119)*x_ref[2]
            arg[(1, 2, 1)]+=0.915350715738*x[2]**o + (0.794328367624)*x[2]
            ref[(1, 2, 1)]+=0.915350715738*x_ref[2]**o + (0.794328367624)*x_ref[2]
            arg[(1, 2, 2)]+=0.0725568295222*x[2]**o + (0.899127926531)*x[2]
            ref[(1, 2, 2)]+=0.0725568295222*x_ref[2]**o + (0.899127926531)*x_ref[2]
            arg[(1, 2, 3)]+=0.970238171646*x[2]**o + (-0.052423409967)*x[2]
            ref[(1, 2, 3)]+=0.970238171646*x_ref[2]**o + (-0.052423409967)*x_ref[2]
            arg[(1, 3, 0)]+=-0.0326193917865*x[2]**o + (0.490165265023)*x[2]
            ref[(1, 3, 0)]+=-0.0326193917865*x_ref[2]**o + (0.490165265023)*x_ref[2]
            arg[(1, 3, 1)]+=0.252632601131*x[2]**o + (-0.261849129124)*x[2]
            ref[(1, 3, 1)]+=0.252632601131*x_ref[2]**o + (-0.261849129124)*x_ref[2]
            arg[(1, 3, 2)]+=-0.0507861813661*x[2]**o + (0.58018793069)*x[2]
            ref[(1, 3, 2)]+=-0.0507861813661*x_ref[2]**o + (0.58018793069)*x_ref[2]
            arg[(1, 3, 3)]+=-0.368628231705*x[2]**o + (-0.0785100830339)*x[2]
            ref[(1, 3, 3)]+=-0.368628231705*x_ref[2]**o + (-0.0785100830339)*x_ref[2]
            arg[(2, 0, 0)]+=0.43389238872*x[2]**o + (0.345650208472)*x[2]
            ref[(2, 0, 0)]+=0.43389238872*x_ref[2]**o + (0.345650208472)*x_ref[2]
            arg[(2, 0, 1)]+=-0.316086242109*x[2]**o + (0.26998053729)*x[2]
            ref[(2, 0, 1)]+=-0.316086242109*x_ref[2]**o + (0.26998053729)*x_ref[2]
            arg[(2, 0, 2)]+=-0.197280710873*x[2]**o + (0.00158281044384)*x[2]
            ref[(2, 0, 2)]+=-0.197280710873*x_ref[2]**o + (0.00158281044384)*x_ref[2]
            arg[(2, 0, 3)]+=0.08866170617*x[2]**o + (0.945887068337)*x[2]
            ref[(2, 0, 3)]+=0.08866170617*x_ref[2]**o + (0.945887068337)*x_ref[2]
            arg[(2, 1, 0)]+=0.269931212887*x[2]**o + (0.752532532109)*x[2]
            ref[(2, 1, 0)]+=0.269931212887*x_ref[2]**o + (0.752532532109)*x_ref[2]
            arg[(2, 1, 1)]+=0.147099694543*x[2]**o + (0.322566380052)*x[2]
            ref[(2, 1, 1)]+=0.147099694543*x_ref[2]**o + (0.322566380052)*x_ref[2]
            arg[(2, 1, 2)]+=-0.852973669188*x[2]**o + (0.322428930615)*x[2]
            ref[(2, 1, 2)]+=-0.852973669188*x_ref[2]**o + (0.322428930615)*x_ref[2]
            arg[(2, 1, 3)]+=0.485514093636*x[2]**o + (0.196142103843)*x[2]
            ref[(2, 1, 3)]+=0.485514093636*x_ref[2]**o + (0.196142103843)*x_ref[2]
            arg[(2, 2, 0)]+=0.465543484997*x[2]**o + (0.738891319139)*x[2]
            ref[(2, 2, 0)]+=0.465543484997*x_ref[2]**o + (0.738891319139)*x_ref[2]
            arg[(2, 2, 1)]+=-0.826685573291*x[2]**o + (0.130777471293)*x[2]
            ref[(2, 2, 1)]+=-0.826685573291*x_ref[2]**o + (0.130777471293)*x_ref[2]
            arg[(2, 2, 2)]+=0.528490336675*x[2]**o + (0.71841686005)*x[2]
            ref[(2, 2, 2)]+=0.528490336675*x_ref[2]**o + (0.71841686005)*x_ref[2]
            arg[(2, 2, 3)]+=0.27990901943*x[2]**o + (-0.232977279753)*x[2]
            ref[(2, 2, 3)]+=0.27990901943*x_ref[2]**o + (-0.232977279753)*x_ref[2]
            arg[(2, 3, 0)]+=0.365810193417*x[2]**o + (-0.252204584998)*x[2]
            ref[(2, 3, 0)]+=0.365810193417*x_ref[2]**o + (-0.252204584998)*x_ref[2]
            arg[(2, 3, 1)]+=0.412265989539*x[2]**o + (-0.477263028881)*x[2]
            ref[(2, 3, 1)]+=0.412265989539*x_ref[2]**o + (-0.477263028881)*x_ref[2]
            arg[(2, 3, 2)]+=-0.366589128971*x[2]**o + (-0.219736475692)*x[2]
            ref[(2, 3, 2)]+=-0.366589128971*x_ref[2]**o + (-0.219736475692)*x_ref[2]
            arg[(2, 3, 3)]+=0.504905998426*x[2]**o + (0.848726134815)*x[2]
            ref[(2, 3, 3)]+=0.504905998426*x_ref[2]**o + (0.848726134815)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 3, 3),w)
        ref = Data(0,(2, 3, 3, 3),w_ref)
        arg[(0, 0, 0, 0)]=-0.746612487011*x[0]**o + (-0.315509053411)*x[0] + (-0.427853296329)*x[1]**o + (-0.0141959279337)*x[1]
        ref[(0, 0, 0, 0)]=-0.746612487011*x_ref[0]**o + (-0.315509053411)*x_ref[0] + (-0.427853296329)*x_ref[1]**o + (-0.0141959279337)*x_ref[1]
        arg[(0, 0, 0, 1)]=-0.293027831894*x[0]**o + (0.414455119738)*x[0] + (-0.641609489464)*x[1]**o + (-0.295946985866)*x[1]
        ref[(0, 0, 0, 1)]=-0.293027831894*x_ref[0]**o + (0.414455119738)*x_ref[0] + (-0.641609489464)*x_ref[1]**o + (-0.295946985866)*x_ref[1]
        arg[(0, 0, 0, 2)]=0.965145334146*x[0]**o + (-0.0995983797716)*x[0] + (0.725596790218)*x[1]**o + (0.885165793749)*x[1]
        ref[(0, 0, 0, 2)]=0.965145334146*x_ref[0]**o + (-0.0995983797716)*x_ref[0] + (0.725596790218)*x_ref[1]**o + (0.885165793749)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.672084830709*x[0]**o + (0.718432060399)*x[0] + (-0.0276884569474)*x[1]**o + (0.146672996495)*x[1]
        ref[(0, 0, 1, 0)]=-0.672084830709*x_ref[0]**o + (0.718432060399)*x_ref[0] + (-0.0276884569474)*x_ref[1]**o + (0.146672996495)*x_ref[1]
        arg[(0, 0, 1, 1)]=-0.154753709157*x[0]**o + (-0.334938550648)*x[0] + (0.0690789755012)*x[1]**o + (0.945933504471)*x[1]
        ref[(0, 0, 1, 1)]=-0.154753709157*x_ref[0]**o + (-0.334938550648)*x_ref[0] + (0.0690789755012)*x_ref[1]**o + (0.945933504471)*x_ref[1]
        arg[(0, 0, 1, 2)]=-0.319554651259*x[0]**o + (-0.820382964499)*x[0] + (-0.422011905545)*x[1]**o + (-0.828307628149)*x[1]
        ref[(0, 0, 1, 2)]=-0.319554651259*x_ref[0]**o + (-0.820382964499)*x_ref[0] + (-0.422011905545)*x_ref[1]**o + (-0.828307628149)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.635993823334*x[0]**o + (-0.227696296371)*x[0] + (0.994645955153)*x[1]**o + (0.521462672684)*x[1]
        ref[(0, 0, 2, 0)]=-0.635993823334*x_ref[0]**o + (-0.227696296371)*x_ref[0] + (0.994645955153)*x_ref[1]**o + (0.521462672684)*x_ref[1]
        arg[(0, 0, 2, 1)]=0.212751519866*x[0]**o + (0.222194492905)*x[0] + (-0.193450046572)*x[1]**o + (-0.527905391484)*x[1]
        ref[(0, 0, 2, 1)]=0.212751519866*x_ref[0]**o + (0.222194492905)*x_ref[0] + (-0.193450046572)*x_ref[1]**o + (-0.527905391484)*x_ref[1]
        arg[(0, 0, 2, 2)]=-0.636341322551*x[0]**o + (0.51835485694)*x[0] + (0.720482138923)*x[1]**o + (-0.891007297514)*x[1]
        ref[(0, 0, 2, 2)]=-0.636341322551*x_ref[0]**o + (0.51835485694)*x_ref[0] + (0.720482138923)*x_ref[1]**o + (-0.891007297514)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.83758066562*x[0]**o + (0.250501039922)*x[0] + (-0.970928560676)*x[1]**o + (-0.905964784794)*x[1]
        ref[(0, 1, 0, 0)]=-0.83758066562*x_ref[0]**o + (0.250501039922)*x_ref[0] + (-0.970928560676)*x_ref[1]**o + (-0.905964784794)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.94401096786*x[0]**o + (-0.567340165692)*x[0] + (-0.444293114147)*x[1]**o + (0.232525049618)*x[1]
        ref[(0, 1, 0, 1)]=0.94401096786*x_ref[0]**o + (-0.567340165692)*x_ref[0] + (-0.444293114147)*x_ref[1]**o + (0.232525049618)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.447784826533*x[0]**o + (0.470353969063)*x[0] + (-0.300828176617)*x[1]**o + (-0.579336305826)*x[1]
        ref[(0, 1, 0, 2)]=0.447784826533*x_ref[0]**o + (0.470353969063)*x_ref[0] + (-0.300828176617)*x_ref[1]**o + (-0.579336305826)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.716049484261*x[0]**o + (0.630102157743)*x[0] + (-0.958095461696)*x[1]**o + (-0.596142592495)*x[1]
        ref[(0, 1, 1, 0)]=0.716049484261*x_ref[0]**o + (0.630102157743)*x_ref[0] + (-0.958095461696)*x_ref[1]**o + (-0.596142592495)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.672002906263*x[0]**o + (0.119461157258)*x[0] + (-0.817265710856)*x[1]**o + (0.707805906774)*x[1]
        ref[(0, 1, 1, 1)]=-0.672002906263*x_ref[0]**o + (0.119461157258)*x_ref[0] + (-0.817265710856)*x_ref[1]**o + (0.707805906774)*x_ref[1]
        arg[(0, 1, 1, 2)]=-0.924093577775*x[0]**o + (-0.998274658801)*x[0] + (-0.152128835885)*x[1]**o + (0.0821043331881)*x[1]
        ref[(0, 1, 1, 2)]=-0.924093577775*x_ref[0]**o + (-0.998274658801)*x_ref[0] + (-0.152128835885)*x_ref[1]**o + (0.0821043331881)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.913466172507*x[0]**o + (-0.43997925565)*x[0] + (-0.48568138228)*x[1]**o + (0.250364795648)*x[1]
        ref[(0, 1, 2, 0)]=-0.913466172507*x_ref[0]**o + (-0.43997925565)*x_ref[0] + (-0.48568138228)*x_ref[1]**o + (0.250364795648)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.709056691339*x[0]**o + (0.024423202396)*x[0] + (-0.804343164462)*x[1]**o + (0.401806771175)*x[1]
        ref[(0, 1, 2, 1)]=0.709056691339*x_ref[0]**o + (0.024423202396)*x_ref[0] + (-0.804343164462)*x_ref[1]**o + (0.401806771175)*x_ref[1]
        arg[(0, 1, 2, 2)]=-0.61550599818*x[0]**o + (-0.985973185592)*x[0] + (-0.588131487779)*x[1]**o + (0.00845560855932)*x[1]
        ref[(0, 1, 2, 2)]=-0.61550599818*x_ref[0]**o + (-0.985973185592)*x_ref[0] + (-0.588131487779)*x_ref[1]**o + (0.00845560855932)*x_ref[1]
        arg[(0, 2, 0, 0)]=-0.852015158255*x[0]**o + (-0.47771435891)*x[0] + (-0.323102788868)*x[1]**o + (-0.200020197209)*x[1]
        ref[(0, 2, 0, 0)]=-0.852015158255*x_ref[0]**o + (-0.47771435891)*x_ref[0] + (-0.323102788868)*x_ref[1]**o + (-0.200020197209)*x_ref[1]
        arg[(0, 2, 0, 1)]=-0.383940494074*x[0]**o + (0.999341524135)*x[0] + (0.964979126948)*x[1]**o + (0.481041395067)*x[1]
        ref[(0, 2, 0, 1)]=-0.383940494074*x_ref[0]**o + (0.999341524135)*x_ref[0] + (0.964979126948)*x_ref[1]**o + (0.481041395067)*x_ref[1]
        arg[(0, 2, 0, 2)]=0.360769165248*x[0]**o + (0.203331211503)*x[0] + (0.0688798286329)*x[1]**o + (0.235229358378)*x[1]
        ref[(0, 2, 0, 2)]=0.360769165248*x_ref[0]**o + (0.203331211503)*x_ref[0] + (0.0688798286329)*x_ref[1]**o + (0.235229358378)*x_ref[1]
        arg[(0, 2, 1, 0)]=-0.325980585045*x[0]**o + (-0.340645256168)*x[0] + (-0.858655834796)*x[1]**o + (-0.777657890428)*x[1]
        ref[(0, 2, 1, 0)]=-0.325980585045*x_ref[0]**o + (-0.340645256168)*x_ref[0] + (-0.858655834796)*x_ref[1]**o + (-0.777657890428)*x_ref[1]
        arg[(0, 2, 1, 1)]=0.142557212865*x[0]**o + (-0.785021440717)*x[0] + (0.140415998849)*x[1]**o + (-0.0493836629487)*x[1]
        ref[(0, 2, 1, 1)]=0.142557212865*x_ref[0]**o + (-0.785021440717)*x_ref[0] + (0.140415998849)*x_ref[1]**o + (-0.0493836629487)*x_ref[1]
        arg[(0, 2, 1, 2)]=-0.192116983218*x[0]**o + (0.802978993309)*x[0] + (0.730091641817)*x[1]**o + (-0.516409176969)*x[1]
        ref[(0, 2, 1, 2)]=-0.192116983218*x_ref[0]**o + (0.802978993309)*x_ref[0] + (0.730091641817)*x_ref[1]**o + (-0.516409176969)*x_ref[1]
        arg[(0, 2, 2, 0)]=-0.0127852802764*x[0]**o + (-0.846217993442)*x[0] + (0.901952379405)*x[1]**o + (0.667831624002)*x[1]
        ref[(0, 2, 2, 0)]=-0.0127852802764*x_ref[0]**o + (-0.846217993442)*x_ref[0] + (0.901952379405)*x_ref[1]**o + (0.667831624002)*x_ref[1]
        arg[(0, 2, 2, 1)]=-0.237064678435*x[0]**o + (-0.588870925668)*x[0] + (-0.99808748057)*x[1]**o + (0.484613335957)*x[1]
        ref[(0, 2, 2, 1)]=-0.237064678435*x_ref[0]**o + (-0.588870925668)*x_ref[0] + (-0.99808748057)*x_ref[1]**o + (0.484613335957)*x_ref[1]
        arg[(0, 2, 2, 2)]=0.209806881603*x[0]**o + (0.885971591965)*x[0] + (0.8896535809)*x[1]**o + (0.255709091127)*x[1]
        ref[(0, 2, 2, 2)]=0.209806881603*x_ref[0]**o + (0.885971591965)*x_ref[0] + (0.8896535809)*x_ref[1]**o + (0.255709091127)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.448390098206*x[0]**o + (-0.183033792675)*x[0] + (0.603804842672)*x[1]**o + (0.306200114152)*x[1]
        ref[(1, 0, 0, 0)]=-0.448390098206*x_ref[0]**o + (-0.183033792675)*x_ref[0] + (0.603804842672)*x_ref[1]**o + (0.306200114152)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.188913642124*x[0]**o + (-0.517820979862)*x[0] + (-0.28298642154)*x[1]**o + (0.764486585746)*x[1]
        ref[(1, 0, 0, 1)]=-0.188913642124*x_ref[0]**o + (-0.517820979862)*x_ref[0] + (-0.28298642154)*x_ref[1]**o + (0.764486585746)*x_ref[1]
        arg[(1, 0, 0, 2)]=-0.37531462077*x[0]**o + (-0.977275708274)*x[0] + (0.521000632201)*x[1]**o + (-0.148196918501)*x[1]
        ref[(1, 0, 0, 2)]=-0.37531462077*x_ref[0]**o + (-0.977275708274)*x_ref[0] + (0.521000632201)*x_ref[1]**o + (-0.148196918501)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.126477617257*x[0]**o + (0.658403422334)*x[0] + (0.519389785373)*x[1]**o + (-0.798452300411)*x[1]
        ref[(1, 0, 1, 0)]=0.126477617257*x_ref[0]**o + (0.658403422334)*x_ref[0] + (0.519389785373)*x_ref[1]**o + (-0.798452300411)*x_ref[1]
        arg[(1, 0, 1, 1)]=-0.156559603764*x[0]**o + (0.712111506865)*x[0] + (-0.00992227691681)*x[1]**o + (0.830524253154)*x[1]
        ref[(1, 0, 1, 1)]=-0.156559603764*x_ref[0]**o + (0.712111506865)*x_ref[0] + (-0.00992227691681)*x_ref[1]**o + (0.830524253154)*x_ref[1]
        arg[(1, 0, 1, 2)]=0.57697487283*x[0]**o + (-0.0823104933633)*x[0] + (-0.347652807175)*x[1]**o + (-0.292088749594)*x[1]
        ref[(1, 0, 1, 2)]=0.57697487283*x_ref[0]**o + (-0.0823104933633)*x_ref[0] + (-0.347652807175)*x_ref[1]**o + (-0.292088749594)*x_ref[1]
        arg[(1, 0, 2, 0)]=0.170753293648*x[0]**o + (-0.622083706844)*x[0] + (-0.496212749744)*x[1]**o + (-0.924247135872)*x[1]
        ref[(1, 0, 2, 0)]=0.170753293648*x_ref[0]**o + (-0.622083706844)*x_ref[0] + (-0.496212749744)*x_ref[1]**o + (-0.924247135872)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.403404029845*x[0]**o + (0.676452452127)*x[0] + (0.39423491952)*x[1]**o + (0.269259353594)*x[1]
        ref[(1, 0, 2, 1)]=0.403404029845*x_ref[0]**o + (0.676452452127)*x_ref[0] + (0.39423491952)*x_ref[1]**o + (0.269259353594)*x_ref[1]
        arg[(1, 0, 2, 2)]=0.933682055735*x[0]**o + (-0.960839847486)*x[0] + (-0.188460800247)*x[1]**o + (-0.103141835162)*x[1]
        ref[(1, 0, 2, 2)]=0.933682055735*x_ref[0]**o + (-0.960839847486)*x_ref[0] + (-0.188460800247)*x_ref[1]**o + (-0.103141835162)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.0883333296563*x[0]**o + (-0.866603082933)*x[0] + (0.407543615208)*x[1]**o + (-0.978886787859)*x[1]
        ref[(1, 1, 0, 0)]=-0.0883333296563*x_ref[0]**o + (-0.866603082933)*x_ref[0] + (0.407543615208)*x_ref[1]**o + (-0.978886787859)*x_ref[1]
        arg[(1, 1, 0, 1)]=-0.859278004445*x[0]**o + (-0.319429758909)*x[0] + (0.848540123215)*x[1]**o + (0.0405093150298)*x[1]
        ref[(1, 1, 0, 1)]=-0.859278004445*x_ref[0]**o + (-0.319429758909)*x_ref[0] + (0.848540123215)*x_ref[1]**o + (0.0405093150298)*x_ref[1]
        arg[(1, 1, 0, 2)]=-0.736250418779*x[0]**o + (0.873324705433)*x[0] + (0.52370532031)*x[1]**o + (-0.381639068065)*x[1]
        ref[(1, 1, 0, 2)]=-0.736250418779*x_ref[0]**o + (0.873324705433)*x_ref[0] + (0.52370532031)*x_ref[1]**o + (-0.381639068065)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.323882217259*x[0]**o + (-0.759214405989)*x[0] + (-0.92660839328)*x[1]**o + (-0.0439692380259)*x[1]
        ref[(1, 1, 1, 0)]=-0.323882217259*x_ref[0]**o + (-0.759214405989)*x_ref[0] + (-0.92660839328)*x_ref[1]**o + (-0.0439692380259)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.238341811297*x[0]**o + (0.842991957693)*x[0] + (-0.63384779835)*x[1]**o + (0.0844701679253)*x[1]
        ref[(1, 1, 1, 1)]=0.238341811297*x_ref[0]**o + (0.842991957693)*x_ref[0] + (-0.63384779835)*x_ref[1]**o + (0.0844701679253)*x_ref[1]
        arg[(1, 1, 1, 2)]=-0.150745864421*x[0]**o + (0.287202120879)*x[0] + (0.0302139544641)*x[1]**o + (-0.257945047719)*x[1]
        ref[(1, 1, 1, 2)]=-0.150745864421*x_ref[0]**o + (0.287202120879)*x_ref[0] + (0.0302139544641)*x_ref[1]**o + (-0.257945047719)*x_ref[1]
        arg[(1, 1, 2, 0)]=0.037683070699*x[0]**o + (-0.618483144529)*x[0] + (0.255209202925)*x[1]**o + (0.58727096279)*x[1]
        ref[(1, 1, 2, 0)]=0.037683070699*x_ref[0]**o + (-0.618483144529)*x_ref[0] + (0.255209202925)*x_ref[1]**o + (0.58727096279)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.159698139484*x[0]**o + (-0.370661319296)*x[0] + (-0.310024526545)*x[1]**o + (0.33937796106)*x[1]
        ref[(1, 1, 2, 1)]=-0.159698139484*x_ref[0]**o + (-0.370661319296)*x_ref[0] + (-0.310024526545)*x_ref[1]**o + (0.33937796106)*x_ref[1]
        arg[(1, 1, 2, 2)]=-0.70841543013*x[0]**o + (0.00289216930668)*x[0] + (-0.914929271401)*x[1]**o + (0.0448852917376)*x[1]
        ref[(1, 1, 2, 2)]=-0.70841543013*x_ref[0]**o + (0.00289216930668)*x_ref[0] + (-0.914929271401)*x_ref[1]**o + (0.0448852917376)*x_ref[1]
        arg[(1, 2, 0, 0)]=0.381109881198*x[0]**o + (0.0303285665504)*x[0] + (-0.0197607133306)*x[1]**o + (0.576967262955)*x[1]
        ref[(1, 2, 0, 0)]=0.381109881198*x_ref[0]**o + (0.0303285665504)*x_ref[0] + (-0.0197607133306)*x_ref[1]**o + (0.576967262955)*x_ref[1]
        arg[(1, 2, 0, 1)]=0.64618696424*x[0]**o + (0.827085716807)*x[0] + (-0.849191631331)*x[1]**o + (-0.333852755126)*x[1]
        ref[(1, 2, 0, 1)]=0.64618696424*x_ref[0]**o + (0.827085716807)*x_ref[0] + (-0.849191631331)*x_ref[1]**o + (-0.333852755126)*x_ref[1]
        arg[(1, 2, 0, 2)]=-0.0191826824836*x[0]**o + (0.155462198239)*x[0] + (-0.37716463313)*x[1]**o + (0.93590453488)*x[1]
        ref[(1, 2, 0, 2)]=-0.0191826824836*x_ref[0]**o + (0.155462198239)*x_ref[0] + (-0.37716463313)*x_ref[1]**o + (0.93590453488)*x_ref[1]
        arg[(1, 2, 1, 0)]=-0.851349792356*x[0]**o + (0.175030984337)*x[0] + (-0.921932319445)*x[1]**o + (-0.6825766459)*x[1]
        ref[(1, 2, 1, 0)]=-0.851349792356*x_ref[0]**o + (0.175030984337)*x_ref[0] + (-0.921932319445)*x_ref[1]**o + (-0.6825766459)*x_ref[1]
        arg[(1, 2, 1, 1)]=0.827514663341*x[0]**o + (-0.728572579724)*x[0] + (-0.0447398332396)*x[1]**o + (-0.346225920791)*x[1]
        ref[(1, 2, 1, 1)]=0.827514663341*x_ref[0]**o + (-0.728572579724)*x_ref[0] + (-0.0447398332396)*x_ref[1]**o + (-0.346225920791)*x_ref[1]
        arg[(1, 2, 1, 2)]=0.557452923226*x[0]**o + (-0.0463377008023)*x[0] + (-0.598655039939)*x[1]**o + (-0.173923136382)*x[1]
        ref[(1, 2, 1, 2)]=0.557452923226*x_ref[0]**o + (-0.0463377008023)*x_ref[0] + (-0.598655039939)*x_ref[1]**o + (-0.173923136382)*x_ref[1]
        arg[(1, 2, 2, 0)]=0.429161350252*x[0]**o + (-0.288821793932)*x[0] + (0.139079768141)*x[1]**o + (0.397187243959)*x[1]
        ref[(1, 2, 2, 0)]=0.429161350252*x_ref[0]**o + (-0.288821793932)*x_ref[0] + (0.139079768141)*x_ref[1]**o + (0.397187243959)*x_ref[1]
        arg[(1, 2, 2, 1)]=-0.63906141843*x[0]**o + (-0.402237512409)*x[0] + (-0.686521437967)*x[1]**o + (-0.666501154942)*x[1]
        ref[(1, 2, 2, 1)]=-0.63906141843*x_ref[0]**o + (-0.402237512409)*x_ref[0] + (-0.686521437967)*x_ref[1]**o + (-0.666501154942)*x_ref[1]
        arg[(1, 2, 2, 2)]=-0.724037506941*x[0]**o + (0.219605781833)*x[0] + (0.863277154228)*x[1]**o + (-0.636633640894)*x[1]
        ref[(1, 2, 2, 2)]=-0.724037506941*x_ref[0]**o + (0.219605781833)*x_ref[0] + (0.863277154228)*x_ref[1]**o + (-0.636633640894)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.199894120752*x[2]**o + (0.417499923763)*x[2]
            ref[(0, 0, 0, 0)]+=0.199894120752*x_ref[2]**o + (0.417499923763)*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.856277958595*x[2]**o + (-0.929689498717)*x[2]
            ref[(0, 0, 0, 1)]+=0.856277958595*x_ref[2]**o + (-0.929689498717)*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.810238587935*x[2]**o + (0.571154994169)*x[2]
            ref[(0, 0, 0, 2)]+=0.810238587935*x_ref[2]**o + (0.571154994169)*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.963697707002*x[2]**o + (0.850180625716)*x[2]
            ref[(0, 0, 1, 0)]+=-0.963697707002*x_ref[2]**o + (0.850180625716)*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.31556660874*x[2]**o + (-0.781451658477)*x[2]
            ref[(0, 0, 1, 1)]+=0.31556660874*x_ref[2]**o + (-0.781451658477)*x_ref[2]
            arg[(0, 0, 1, 2)]+=0.630623550946*x[2]**o + (0.751431084799)*x[2]
            ref[(0, 0, 1, 2)]+=0.630623550946*x_ref[2]**o + (0.751431084799)*x_ref[2]
            arg[(0, 0, 2, 0)]+=0.760451639364*x[2]**o + (0.000752210736331)*x[2]
            ref[(0, 0, 2, 0)]+=0.760451639364*x_ref[2]**o + (0.000752210736331)*x_ref[2]
            arg[(0, 0, 2, 1)]+=-0.289628572774*x[2]**o + (-0.967889783853)*x[2]
            ref[(0, 0, 2, 1)]+=-0.289628572774*x_ref[2]**o + (-0.967889783853)*x_ref[2]
            arg[(0, 0, 2, 2)]+=-0.821623796159*x[2]**o + (-0.418705753974)*x[2]
            ref[(0, 0, 2, 2)]+=-0.821623796159*x_ref[2]**o + (-0.418705753974)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.441656689716*x[2]**o + (0.213232663949)*x[2]
            ref[(0, 1, 0, 0)]+=-0.441656689716*x_ref[2]**o + (0.213232663949)*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.747286298293*x[2]**o + (0.484839053698)*x[2]
            ref[(0, 1, 0, 1)]+=-0.747286298293*x_ref[2]**o + (0.484839053698)*x_ref[2]
            arg[(0, 1, 0, 2)]+=0.547140812909*x[2]**o + (-0.150157257726)*x[2]
            ref[(0, 1, 0, 2)]+=0.547140812909*x_ref[2]**o + (-0.150157257726)*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.907046392918*x[2]**o + (-0.148214592729)*x[2]
            ref[(0, 1, 1, 0)]+=0.907046392918*x_ref[2]**o + (-0.148214592729)*x_ref[2]
            arg[(0, 1, 1, 1)]+=0.521873275556*x[2]**o + (-0.66509876086)*x[2]
            ref[(0, 1, 1, 1)]+=0.521873275556*x_ref[2]**o + (-0.66509876086)*x_ref[2]
            arg[(0, 1, 1, 2)]+=-0.346464008308*x[2]**o + (-0.602940477323)*x[2]
            ref[(0, 1, 1, 2)]+=-0.346464008308*x_ref[2]**o + (-0.602940477323)*x_ref[2]
            arg[(0, 1, 2, 0)]+=0.553582886883*x[2]**o + (0.890255600719)*x[2]
            ref[(0, 1, 2, 0)]+=0.553582886883*x_ref[2]**o + (0.890255600719)*x_ref[2]
            arg[(0, 1, 2, 1)]+=0.867364310091*x[2]**o + (-0.0888887506873)*x[2]
            ref[(0, 1, 2, 1)]+=0.867364310091*x_ref[2]**o + (-0.0888887506873)*x_ref[2]
            arg[(0, 1, 2, 2)]+=0.799430942398*x[2]**o + (-0.985852375285)*x[2]
            ref[(0, 1, 2, 2)]+=0.799430942398*x_ref[2]**o + (-0.985852375285)*x_ref[2]
            arg[(0, 2, 0, 0)]+=0.382030087462*x[2]**o + (-0.770753156973)*x[2]
            ref[(0, 2, 0, 0)]+=0.382030087462*x_ref[2]**o + (-0.770753156973)*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.995741248033*x[2]**o + (-0.0296301398253)*x[2]
            ref[(0, 2, 0, 1)]+=-0.995741248033*x_ref[2]**o + (-0.0296301398253)*x_ref[2]
            arg[(0, 2, 0, 2)]+=-0.228513727431*x[2]**o + (0.0307336239619)*x[2]
            ref[(0, 2, 0, 2)]+=-0.228513727431*x_ref[2]**o + (0.0307336239619)*x_ref[2]
            arg[(0, 2, 1, 0)]+=-0.298689564496*x[2]**o + (0.97062479616)*x[2]
            ref[(0, 2, 1, 0)]+=-0.298689564496*x_ref[2]**o + (0.97062479616)*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.169426061382*x[2]**o + (0.133244667844)*x[2]
            ref[(0, 2, 1, 1)]+=-0.169426061382*x_ref[2]**o + (0.133244667844)*x_ref[2]
            arg[(0, 2, 1, 2)]+=-0.454136141653*x[2]**o + (0.0713356195627)*x[2]
            ref[(0, 2, 1, 2)]+=-0.454136141653*x_ref[2]**o + (0.0713356195627)*x_ref[2]
            arg[(0, 2, 2, 0)]+=0.583899883641*x[2]**o + (-0.980196142024)*x[2]
            ref[(0, 2, 2, 0)]+=0.583899883641*x_ref[2]**o + (-0.980196142024)*x_ref[2]
            arg[(0, 2, 2, 1)]+=0.323683970812*x[2]**o + (0.594849993759)*x[2]
            ref[(0, 2, 2, 1)]+=0.323683970812*x_ref[2]**o + (0.594849993759)*x_ref[2]
            arg[(0, 2, 2, 2)]+=0.432116209484*x[2]**o + (-0.625206165519)*x[2]
            ref[(0, 2, 2, 2)]+=0.432116209484*x_ref[2]**o + (-0.625206165519)*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.468340078985*x[2]**o + (0.53637487315)*x[2]
            ref[(1, 0, 0, 0)]+=-0.468340078985*x_ref[2]**o + (0.53637487315)*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.507762458726*x[2]**o + (0.596814226364)*x[2]
            ref[(1, 0, 0, 1)]+=0.507762458726*x_ref[2]**o + (0.596814226364)*x_ref[2]
            arg[(1, 0, 0, 2)]+=0.154610253429*x[2]**o + (-0.257669787124)*x[2]
            ref[(1, 0, 0, 2)]+=0.154610253429*x_ref[2]**o + (-0.257669787124)*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.33620611764*x[2]**o + (-0.296212638591)*x[2]
            ref[(1, 0, 1, 0)]+=-0.33620611764*x_ref[2]**o + (-0.296212638591)*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.246294140534*x[2]**o + (-0.00895698621364)*x[2]
            ref[(1, 0, 1, 1)]+=0.246294140534*x_ref[2]**o + (-0.00895698621364)*x_ref[2]
            arg[(1, 0, 1, 2)]+=-0.655330084881*x[2]**o + (-0.165740543883)*x[2]
            ref[(1, 0, 1, 2)]+=-0.655330084881*x_ref[2]**o + (-0.165740543883)*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.121051630393*x[2]**o + (-0.939814730983)*x[2]
            ref[(1, 0, 2, 0)]+=-0.121051630393*x_ref[2]**o + (-0.939814730983)*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.165540850878*x[2]**o + (-0.618659014366)*x[2]
            ref[(1, 0, 2, 1)]+=0.165540850878*x_ref[2]**o + (-0.618659014366)*x_ref[2]
            arg[(1, 0, 2, 2)]+=0.632990828184*x[2]**o + (0.170323985745)*x[2]
            ref[(1, 0, 2, 2)]+=0.632990828184*x_ref[2]**o + (0.170323985745)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.343017737917*x[2]**o + (0.247181725158)*x[2]
            ref[(1, 1, 0, 0)]+=0.343017737917*x_ref[2]**o + (0.247181725158)*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.407372848755*x[2]**o + (0.930165714094)*x[2]
            ref[(1, 1, 0, 1)]+=-0.407372848755*x_ref[2]**o + (0.930165714094)*x_ref[2]
            arg[(1, 1, 0, 2)]+=0.713782872968*x[2]**o + (0.807458913001)*x[2]
            ref[(1, 1, 0, 2)]+=0.713782872968*x_ref[2]**o + (0.807458913001)*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.645496416049*x[2]**o + (-0.482616275088)*x[2]
            ref[(1, 1, 1, 0)]+=-0.645496416049*x_ref[2]**o + (-0.482616275088)*x_ref[2]
            arg[(1, 1, 1, 1)]+=-0.637374428066*x[2]**o + (-0.305185345996)*x[2]
            ref[(1, 1, 1, 1)]+=-0.637374428066*x_ref[2]**o + (-0.305185345996)*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.0405850036216*x[2]**o + (0.119065388506)*x[2]
            ref[(1, 1, 1, 2)]+=-0.0405850036216*x_ref[2]**o + (0.119065388506)*x_ref[2]
            arg[(1, 1, 2, 0)]+=0.887032658177*x[2]**o + (0.788222893128)*x[2]
            ref[(1, 1, 2, 0)]+=0.887032658177*x_ref[2]**o + (0.788222893128)*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.298070058117*x[2]**o + (-0.961456680369)*x[2]
            ref[(1, 1, 2, 1)]+=0.298070058117*x_ref[2]**o + (-0.961456680369)*x_ref[2]
            arg[(1, 1, 2, 2)]+=-0.27071378921*x[2]**o + (-0.0476503015146)*x[2]
            ref[(1, 1, 2, 2)]+=-0.27071378921*x_ref[2]**o + (-0.0476503015146)*x_ref[2]
            arg[(1, 2, 0, 0)]+=0.808109910276*x[2]**o + (-0.218949097401)*x[2]
            ref[(1, 2, 0, 0)]+=0.808109910276*x_ref[2]**o + (-0.218949097401)*x_ref[2]
            arg[(1, 2, 0, 1)]+=-0.85753347982*x[2]**o + (-0.897261134986)*x[2]
            ref[(1, 2, 0, 1)]+=-0.85753347982*x_ref[2]**o + (-0.897261134986)*x_ref[2]
            arg[(1, 2, 0, 2)]+=-0.13014533527*x[2]**o + (-0.597892704282)*x[2]
            ref[(1, 2, 0, 2)]+=-0.13014533527*x_ref[2]**o + (-0.597892704282)*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.499905979046*x[2]**o + (0.233688371087)*x[2]
            ref[(1, 2, 1, 0)]+=0.499905979046*x_ref[2]**o + (0.233688371087)*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.850704242993*x[2]**o + (0.918438660468)*x[2]
            ref[(1, 2, 1, 1)]+=0.850704242993*x_ref[2]**o + (0.918438660468)*x_ref[2]
            arg[(1, 2, 1, 2)]+=-0.103864330163*x[2]**o + (-0.11137185849)*x[2]
            ref[(1, 2, 1, 2)]+=-0.103864330163*x_ref[2]**o + (-0.11137185849)*x_ref[2]
            arg[(1, 2, 2, 0)]+=-0.616355187185*x[2]**o + (0.188027887076)*x[2]
            ref[(1, 2, 2, 0)]+=-0.616355187185*x_ref[2]**o + (0.188027887076)*x_ref[2]
            arg[(1, 2, 2, 1)]+=0.861143854642*x[2]**o + (-0.959121450004)*x[2]
            ref[(1, 2, 2, 1)]+=0.861143854642*x_ref[2]**o + (-0.959121450004)*x_ref[2]
            arg[(1, 2, 2, 2)]+=-0.106510654481*x[2]**o + (0.103920815813)*x[2]
            ref[(1, 2, 2, 2)]+=-0.106510654481*x_ref[2]**o + (0.103920815813)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.202545265026*x[0]**o + (-0.645920024483)*x[0] + (0.560703115909)*x[1]**o + (0.464649461025)*x[1]
        ref=0.202545265026*x_ref[0]**o + (-0.645920024483)*x_ref[0] + (0.560703115909)*x_ref[1]**o + (0.464649461025)*x_ref[1]
        if dim==3:
            arg+=(0.855226414599)*x[2]**o + (0.00195475618557)*x[2]
            ref+=(0.855226414599)*x_ref[2]**o + (0.00195475618557)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=0.947403036192*x[0]**o + (-0.363202831973)*x[0] + (0.8314475876)*x[1]**o + (-0.51745996268)*x[1]
        ref[(0,)]=0.947403036192*x_ref[0]**o + (-0.363202831973)*x_ref[0] + (0.8314475876)*x_ref[1]**o + (-0.51745996268)*x_ref[1]
        arg[(1,)]=0.43775186044*x[0]**o + (0.689242980122)*x[0] + (-0.633465207146)*x[1]**o + (0.528906070475)*x[1]
        ref[(1,)]=0.43775186044*x_ref[0]**o + (0.689242980122)*x_ref[0] + (-0.633465207146)*x_ref[1]**o + (0.528906070475)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.226734581557*x[2]**o + (0.850187939607)*x[2]
            ref[(0,)]+=-0.226734581557*x_ref[2]**o + (0.850187939607)*x_ref[2]
            arg[(1,)]+=0.62034441503*x[2]**o + (0.53102916869)*x[2]
            ref[(1,)]+=0.62034441503*x_ref[2]**o + (0.53102916869)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2),w)
        ref = Data(0,(4, 2),w_ref)
        arg[(0, 0)]=-0.174328133175*x[0]**o + (-0.520272780878)*x[0] + (-0.61442883775)*x[1]**o + (0.717922478747)*x[1]
        ref[(0, 0)]=-0.174328133175*x_ref[0]**o + (-0.520272780878)*x_ref[0] + (-0.61442883775)*x_ref[1]**o + (0.717922478747)*x_ref[1]
        arg[(0, 1)]=0.00265537344887*x[0]**o + (-0.741609493496)*x[0] + (-0.116617299032)*x[1]**o + (-0.776632792379)*x[1]
        ref[(0, 1)]=0.00265537344887*x_ref[0]**o + (-0.741609493496)*x_ref[0] + (-0.116617299032)*x_ref[1]**o + (-0.776632792379)*x_ref[1]
        arg[(1, 0)]=-0.291776896661*x[0]**o + (0.128047791931)*x[0] + (0.098580124171)*x[1]**o + (0.491242770131)*x[1]
        ref[(1, 0)]=-0.291776896661*x_ref[0]**o + (0.128047791931)*x_ref[0] + (0.098580124171)*x_ref[1]**o + (0.491242770131)*x_ref[1]
        arg[(1, 1)]=0.974408257145*x[0]**o + (0.098577556906)*x[0] + (-0.831678636922)*x[1]**o + (0.565666166956)*x[1]
        ref[(1, 1)]=0.974408257145*x_ref[0]**o + (0.098577556906)*x_ref[0] + (-0.831678636922)*x_ref[1]**o + (0.565666166956)*x_ref[1]
        arg[(2, 0)]=-0.979952388031*x[0]**o + (0.964283170325)*x[0] + (0.348736049567)*x[1]**o + (0.463815350062)*x[1]
        ref[(2, 0)]=-0.979952388031*x_ref[0]**o + (0.964283170325)*x_ref[0] + (0.348736049567)*x_ref[1]**o + (0.463815350062)*x_ref[1]
        arg[(2, 1)]=0.545791857694*x[0]**o + (-0.826273120886)*x[0] + (0.37539417297)*x[1]**o + (-0.113040549472)*x[1]
        ref[(2, 1)]=0.545791857694*x_ref[0]**o + (-0.826273120886)*x_ref[0] + (0.37539417297)*x_ref[1]**o + (-0.113040549472)*x_ref[1]
        arg[(3, 0)]=-0.623665744911*x[0]**o + (0.913807214752)*x[0] + (-0.193121287399)*x[1]**o + (0.589342657197)*x[1]
        ref[(3, 0)]=-0.623665744911*x_ref[0]**o + (0.913807214752)*x_ref[0] + (-0.193121287399)*x_ref[1]**o + (0.589342657197)*x_ref[1]
        arg[(3, 1)]=0.876782468632*x[0]**o + (-0.775443660801)*x[0] + (0.554397596419)*x[1]**o + (-0.0894101575138)*x[1]
        ref[(3, 1)]=0.876782468632*x_ref[0]**o + (-0.775443660801)*x_ref[0] + (0.554397596419)*x_ref[1]**o + (-0.0894101575138)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.62411319578*x[2]**o + (-0.597682132193)*x[2]
            ref[(0, 0)]+=-0.62411319578*x_ref[2]**o + (-0.597682132193)*x_ref[2]
            arg[(0, 1)]+=0.755667721282*x[2]**o + (0.435883193404)*x[2]
            ref[(0, 1)]+=0.755667721282*x_ref[2]**o + (0.435883193404)*x_ref[2]
            arg[(1, 0)]+=0.428630819972*x[2]**o + (0.259874627843)*x[2]
            ref[(1, 0)]+=0.428630819972*x_ref[2]**o + (0.259874627843)*x_ref[2]
            arg[(1, 1)]+=-0.856927229485*x[2]**o + (-0.741044685622)*x[2]
            ref[(1, 1)]+=-0.856927229485*x_ref[2]**o + (-0.741044685622)*x_ref[2]
            arg[(2, 0)]+=0.696144554163*x[2]**o + (0.00358081307238)*x[2]
            ref[(2, 0)]+=0.696144554163*x_ref[2]**o + (0.00358081307238)*x_ref[2]
            arg[(2, 1)]+=-0.815898931067*x[2]**o + (0.591527021174)*x[2]
            ref[(2, 1)]+=-0.815898931067*x_ref[2]**o + (0.591527021174)*x_ref[2]
            arg[(3, 0)]+=-0.298348718516*x[2]**o + (0.796111721302)*x[2]
            ref[(3, 0)]+=-0.298348718516*x_ref[2]**o + (0.796111721302)*x_ref[2]
            arg[(3, 1)]+=0.699386825908*x[2]**o + (0.033374342656)*x[2]
            ref[(3, 1)]+=0.699386825908*x_ref[2]**o + (0.033374342656)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 3),w)
        ref = Data(0,(4, 2, 3),w_ref)
        arg[(0, 0, 0)]=0.811955431616*x[0]**o + (-0.996810243505)*x[0] + (0.762842821373)*x[1]**o + (0.717219341766)*x[1]
        ref[(0, 0, 0)]=0.811955431616*x_ref[0]**o + (-0.996810243505)*x_ref[0] + (0.762842821373)*x_ref[1]**o + (0.717219341766)*x_ref[1]
        arg[(0, 0, 1)]=0.801199424634*x[0]**o + (-0.123470379454)*x[0] + (-0.774144090966)*x[1]**o + (0.259873432676)*x[1]
        ref[(0, 0, 1)]=0.801199424634*x_ref[0]**o + (-0.123470379454)*x_ref[0] + (-0.774144090966)*x_ref[1]**o + (0.259873432676)*x_ref[1]
        arg[(0, 0, 2)]=-0.302459971278*x[0]**o + (0.189663583644)*x[0] + (0.679885088366)*x[1]**o + (-0.818034777378)*x[1]
        ref[(0, 0, 2)]=-0.302459971278*x_ref[0]**o + (0.189663583644)*x_ref[0] + (0.679885088366)*x_ref[1]**o + (-0.818034777378)*x_ref[1]
        arg[(0, 1, 0)]=0.907056968842*x[0]**o + (0.278330244241)*x[0] + (-0.543985712805)*x[1]**o + (0.783367298538)*x[1]
        ref[(0, 1, 0)]=0.907056968842*x_ref[0]**o + (0.278330244241)*x_ref[0] + (-0.543985712805)*x_ref[1]**o + (0.783367298538)*x_ref[1]
        arg[(0, 1, 1)]=-0.769635301099*x[0]**o + (-0.170639848894)*x[0] + (0.447918560252)*x[1]**o + (-0.759499440966)*x[1]
        ref[(0, 1, 1)]=-0.769635301099*x_ref[0]**o + (-0.170639848894)*x_ref[0] + (0.447918560252)*x_ref[1]**o + (-0.759499440966)*x_ref[1]
        arg[(0, 1, 2)]=-0.178272334891*x[0]**o + (0.320339622351)*x[0] + (-0.310003653639)*x[1]**o + (-0.851138988389)*x[1]
        ref[(0, 1, 2)]=-0.178272334891*x_ref[0]**o + (0.320339622351)*x_ref[0] + (-0.310003653639)*x_ref[1]**o + (-0.851138988389)*x_ref[1]
        arg[(1, 0, 0)]=0.929304442218*x[0]**o + (0.716099665997)*x[0] + (-0.799902956509)*x[1]**o + (0.238780002127)*x[1]
        ref[(1, 0, 0)]=0.929304442218*x_ref[0]**o + (0.716099665997)*x_ref[0] + (-0.799902956509)*x_ref[1]**o + (0.238780002127)*x_ref[1]
        arg[(1, 0, 1)]=-0.683676929852*x[0]**o + (-0.94598116578)*x[0] + (0.47563869136)*x[1]**o + (0.664438144168)*x[1]
        ref[(1, 0, 1)]=-0.683676929852*x_ref[0]**o + (-0.94598116578)*x_ref[0] + (0.47563869136)*x_ref[1]**o + (0.664438144168)*x_ref[1]
        arg[(1, 0, 2)]=-0.325471198208*x[0]**o + (-0.166444301662)*x[0] + (0.629886337213)*x[1]**o + (-0.626989223964)*x[1]
        ref[(1, 0, 2)]=-0.325471198208*x_ref[0]**o + (-0.166444301662)*x_ref[0] + (0.629886337213)*x_ref[1]**o + (-0.626989223964)*x_ref[1]
        arg[(1, 1, 0)]=0.868313201619*x[0]**o + (-0.481040242626)*x[0] + (0.106571043739)*x[1]**o + (-0.79669502338)*x[1]
        ref[(1, 1, 0)]=0.868313201619*x_ref[0]**o + (-0.481040242626)*x_ref[0] + (0.106571043739)*x_ref[1]**o + (-0.79669502338)*x_ref[1]
        arg[(1, 1, 1)]=0.368488439996*x[0]**o + (0.167657148533)*x[0] + (-0.874364049863)*x[1]**o + (0.243651879802)*x[1]
        ref[(1, 1, 1)]=0.368488439996*x_ref[0]**o + (0.167657148533)*x_ref[0] + (-0.874364049863)*x_ref[1]**o + (0.243651879802)*x_ref[1]
        arg[(1, 1, 2)]=-0.247765647099*x[0]**o + (0.0348080209309)*x[0] + (0.415733716203)*x[1]**o + (0.471281858101)*x[1]
        ref[(1, 1, 2)]=-0.247765647099*x_ref[0]**o + (0.0348080209309)*x_ref[0] + (0.415733716203)*x_ref[1]**o + (0.471281858101)*x_ref[1]
        arg[(2, 0, 0)]=-0.176069229625*x[0]**o + (-0.140994390176)*x[0] + (-0.484616408918)*x[1]**o + (0.244492311634)*x[1]
        ref[(2, 0, 0)]=-0.176069229625*x_ref[0]**o + (-0.140994390176)*x_ref[0] + (-0.484616408918)*x_ref[1]**o + (0.244492311634)*x_ref[1]
        arg[(2, 0, 1)]=0.290662072369*x[0]**o + (-0.833744196414)*x[0] + (-0.628212929878)*x[1]**o + (0.384263255565)*x[1]
        ref[(2, 0, 1)]=0.290662072369*x_ref[0]**o + (-0.833744196414)*x_ref[0] + (-0.628212929878)*x_ref[1]**o + (0.384263255565)*x_ref[1]
        arg[(2, 0, 2)]=-0.139589971371*x[0]**o + (-0.296152037369)*x[0] + (0.0012260195863)*x[1]**o + (-0.723576015867)*x[1]
        ref[(2, 0, 2)]=-0.139589971371*x_ref[0]**o + (-0.296152037369)*x_ref[0] + (0.0012260195863)*x_ref[1]**o + (-0.723576015867)*x_ref[1]
        arg[(2, 1, 0)]=0.291516380314*x[0]**o + (-0.896221223563)*x[0] + (-0.872449780252)*x[1]**o + (-0.630862651468)*x[1]
        ref[(2, 1, 0)]=0.291516380314*x_ref[0]**o + (-0.896221223563)*x_ref[0] + (-0.872449780252)*x_ref[1]**o + (-0.630862651468)*x_ref[1]
        arg[(2, 1, 1)]=-0.208576099656*x[0]**o + (0.644495746893)*x[0] + (-0.483386764222)*x[1]**o + (0.155467110431)*x[1]
        ref[(2, 1, 1)]=-0.208576099656*x_ref[0]**o + (0.644495746893)*x_ref[0] + (-0.483386764222)*x_ref[1]**o + (0.155467110431)*x_ref[1]
        arg[(2, 1, 2)]=-0.782082245529*x[0]**o + (0.486684792962)*x[0] + (0.621788411678)*x[1]**o + (0.665980407111)*x[1]
        ref[(2, 1, 2)]=-0.782082245529*x_ref[0]**o + (0.486684792962)*x_ref[0] + (0.621788411678)*x_ref[1]**o + (0.665980407111)*x_ref[1]
        arg[(3, 0, 0)]=0.646712532223*x[0]**o + (-0.506189399533)*x[0] + (0.247246751692)*x[1]**o + (0.572622699945)*x[1]
        ref[(3, 0, 0)]=0.646712532223*x_ref[0]**o + (-0.506189399533)*x_ref[0] + (0.247246751692)*x_ref[1]**o + (0.572622699945)*x_ref[1]
        arg[(3, 0, 1)]=-0.0725498206849*x[0]**o + (0.678363011679)*x[0] + (0.0582431935287)*x[1]**o + (0.244804050565)*x[1]
        ref[(3, 0, 1)]=-0.0725498206849*x_ref[0]**o + (0.678363011679)*x_ref[0] + (0.0582431935287)*x_ref[1]**o + (0.244804050565)*x_ref[1]
        arg[(3, 0, 2)]=0.882952734454*x[0]**o + (0.880919700335)*x[0] + (0.723654732087)*x[1]**o + (0.575190173974)*x[1]
        ref[(3, 0, 2)]=0.882952734454*x_ref[0]**o + (0.880919700335)*x_ref[0] + (0.723654732087)*x_ref[1]**o + (0.575190173974)*x_ref[1]
        arg[(3, 1, 0)]=-0.258472239042*x[0]**o + (0.149105438864)*x[0] + (-0.765447522887)*x[1]**o + (0.683293894146)*x[1]
        ref[(3, 1, 0)]=-0.258472239042*x_ref[0]**o + (0.149105438864)*x_ref[0] + (-0.765447522887)*x_ref[1]**o + (0.683293894146)*x_ref[1]
        arg[(3, 1, 1)]=-0.787021224468*x[0]**o + (-0.440735378266)*x[0] + (0.553067147818)*x[1]**o + (-0.974525598134)*x[1]
        ref[(3, 1, 1)]=-0.787021224468*x_ref[0]**o + (-0.440735378266)*x_ref[0] + (0.553067147818)*x_ref[1]**o + (-0.974525598134)*x_ref[1]
        arg[(3, 1, 2)]=-0.107825235975*x[0]**o + (-0.286475875875)*x[0] + (0.193862850278)*x[1]**o + (0.709081975108)*x[1]
        ref[(3, 1, 2)]=-0.107825235975*x_ref[0]**o + (-0.286475875875)*x_ref[0] + (0.193862850278)*x_ref[1]**o + (0.709081975108)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.0229899919428*x[2]**o + (-0.656966914133)*x[2]
            ref[(0, 0, 0)]+=0.0229899919428*x_ref[2]**o + (-0.656966914133)*x_ref[2]
            arg[(0, 0, 1)]+=-0.340537526054*x[2]**o + (0.893593838041)*x[2]
            ref[(0, 0, 1)]+=-0.340537526054*x_ref[2]**o + (0.893593838041)*x_ref[2]
            arg[(0, 0, 2)]+=-0.14776250971*x[2]**o + (0.12788195366)*x[2]
            ref[(0, 0, 2)]+=-0.14776250971*x_ref[2]**o + (0.12788195366)*x_ref[2]
            arg[(0, 1, 0)]+=0.349152496008*x[2]**o + (0.21385847329)*x[2]
            ref[(0, 1, 0)]+=0.349152496008*x_ref[2]**o + (0.21385847329)*x_ref[2]
            arg[(0, 1, 1)]+=-0.843643505125*x[2]**o + (-0.686703813996)*x[2]
            ref[(0, 1, 1)]+=-0.843643505125*x_ref[2]**o + (-0.686703813996)*x_ref[2]
            arg[(0, 1, 2)]+=0.10575265478*x[2]**o + (0.991596130501)*x[2]
            ref[(0, 1, 2)]+=0.10575265478*x_ref[2]**o + (0.991596130501)*x_ref[2]
            arg[(1, 0, 0)]+=-0.652244546623*x[2]**o + (-0.51555016285)*x[2]
            ref[(1, 0, 0)]+=-0.652244546623*x_ref[2]**o + (-0.51555016285)*x_ref[2]
            arg[(1, 0, 1)]+=0.555101106712*x[2]**o + (-0.424015043894)*x[2]
            ref[(1, 0, 1)]+=0.555101106712*x_ref[2]**o + (-0.424015043894)*x_ref[2]
            arg[(1, 0, 2)]+=-0.513891710292*x[2]**o + (0.151648188043)*x[2]
            ref[(1, 0, 2)]+=-0.513891710292*x_ref[2]**o + (0.151648188043)*x_ref[2]
            arg[(1, 1, 0)]+=-0.906063533098*x[2]**o + (0.737942906537)*x[2]
            ref[(1, 1, 0)]+=-0.906063533098*x_ref[2]**o + (0.737942906537)*x_ref[2]
            arg[(1, 1, 1)]+=0.399686953522*x[2]**o + (0.604301298925)*x[2]
            ref[(1, 1, 1)]+=0.399686953522*x_ref[2]**o + (0.604301298925)*x_ref[2]
            arg[(1, 1, 2)]+=0.588505949252*x[2]**o + (0.519636765982)*x[2]
            ref[(1, 1, 2)]+=0.588505949252*x_ref[2]**o + (0.519636765982)*x_ref[2]
            arg[(2, 0, 0)]+=0.168720060194*x[2]**o + (-0.312398875186)*x[2]
            ref[(2, 0, 0)]+=0.168720060194*x_ref[2]**o + (-0.312398875186)*x_ref[2]
            arg[(2, 0, 1)]+=0.312503595478*x[2]**o + (0.725260295873)*x[2]
            ref[(2, 0, 1)]+=0.312503595478*x_ref[2]**o + (0.725260295873)*x_ref[2]
            arg[(2, 0, 2)]+=-0.945173199286*x[2]**o + (-0.139464427179)*x[2]
            ref[(2, 0, 2)]+=-0.945173199286*x_ref[2]**o + (-0.139464427179)*x_ref[2]
            arg[(2, 1, 0)]+=-0.523003846683*x[2]**o + (0.103877003533)*x[2]
            ref[(2, 1, 0)]+=-0.523003846683*x_ref[2]**o + (0.103877003533)*x_ref[2]
            arg[(2, 1, 1)]+=-0.0691488776653*x[2]**o + (0.910248780413)*x[2]
            ref[(2, 1, 1)]+=-0.0691488776653*x_ref[2]**o + (0.910248780413)*x_ref[2]
            arg[(2, 1, 2)]+=0.194995401199*x[2]**o + (-0.816489314086)*x[2]
            ref[(2, 1, 2)]+=0.194995401199*x_ref[2]**o + (-0.816489314086)*x_ref[2]
            arg[(3, 0, 0)]+=0.367499901321*x[2]**o + (-0.18007124238)*x[2]
            ref[(3, 0, 0)]+=0.367499901321*x_ref[2]**o + (-0.18007124238)*x_ref[2]
            arg[(3, 0, 1)]+=0.452928353132*x[2]**o + (-0.568236355049)*x[2]
            ref[(3, 0, 1)]+=0.452928353132*x_ref[2]**o + (-0.568236355049)*x_ref[2]
            arg[(3, 0, 2)]+=-0.694232320067*x[2]**o + (-0.644371589182)*x[2]
            ref[(3, 0, 2)]+=-0.694232320067*x_ref[2]**o + (-0.644371589182)*x_ref[2]
            arg[(3, 1, 0)]+=-0.0393969133569*x[2]**o + (-0.384020293274)*x[2]
            ref[(3, 1, 0)]+=-0.0393969133569*x_ref[2]**o + (-0.384020293274)*x_ref[2]
            arg[(3, 1, 1)]+=0.216820367221*x[2]**o + (-0.633477007543)*x[2]
            ref[(3, 1, 1)]+=0.216820367221*x_ref[2]**o + (-0.633477007543)*x_ref[2]
            arg[(3, 1, 2)]+=0.788623538086*x[2]**o + (0.637338609648)*x[2]
            ref[(3, 1, 2)]+=0.788623538086*x_ref[2]**o + (0.637338609648)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 3, 4),w)
        ref = Data(0,(3, 4, 3, 4),w_ref)
        arg[(0, 0, 0, 0)]=0.203967237012*x[0]**o + (-0.0635642570114)*x[0] + (0.352008426547)*x[1]**o + (-0.430197435322)*x[1]
        ref[(0, 0, 0, 0)]=0.203967237012*x_ref[0]**o + (-0.0635642570114)*x_ref[0] + (0.352008426547)*x_ref[1]**o + (-0.430197435322)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.673960490667*x[0]**o + (-0.179253466368)*x[0] + (-0.658864571592)*x[1]**o + (-0.942973221595)*x[1]
        ref[(0, 0, 0, 1)]=0.673960490667*x_ref[0]**o + (-0.179253466368)*x_ref[0] + (-0.658864571592)*x_ref[1]**o + (-0.942973221595)*x_ref[1]
        arg[(0, 0, 0, 2)]=-0.584868943795*x[0]**o + (0.104510151558)*x[0] + (0.532187920772)*x[1]**o + (-0.61369316821)*x[1]
        ref[(0, 0, 0, 2)]=-0.584868943795*x_ref[0]**o + (0.104510151558)*x_ref[0] + (0.532187920772)*x_ref[1]**o + (-0.61369316821)*x_ref[1]
        arg[(0, 0, 0, 3)]=0.352820744279*x[0]**o + (-0.698084536073)*x[0] + (-0.0300144249214)*x[1]**o + (0.400730653675)*x[1]
        ref[(0, 0, 0, 3)]=0.352820744279*x_ref[0]**o + (-0.698084536073)*x_ref[0] + (-0.0300144249214)*x_ref[1]**o + (0.400730653675)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.573066360467*x[0]**o + (0.724280866892)*x[0] + (-0.262464755625)*x[1]**o + (-0.94718432553)*x[1]
        ref[(0, 0, 1, 0)]=0.573066360467*x_ref[0]**o + (0.724280866892)*x_ref[0] + (-0.262464755625)*x_ref[1]**o + (-0.94718432553)*x_ref[1]
        arg[(0, 0, 1, 1)]=-0.142278698957*x[0]**o + (-0.832084561706)*x[0] + (-0.332497890553)*x[1]**o + (-0.487267941725)*x[1]
        ref[(0, 0, 1, 1)]=-0.142278698957*x_ref[0]**o + (-0.832084561706)*x_ref[0] + (-0.332497890553)*x_ref[1]**o + (-0.487267941725)*x_ref[1]
        arg[(0, 0, 1, 2)]=-0.667487552877*x[0]**o + (-0.217825563385)*x[0] + (0.843485361133)*x[1]**o + (-0.0272796569331)*x[1]
        ref[(0, 0, 1, 2)]=-0.667487552877*x_ref[0]**o + (-0.217825563385)*x_ref[0] + (0.843485361133)*x_ref[1]**o + (-0.0272796569331)*x_ref[1]
        arg[(0, 0, 1, 3)]=-0.224472172913*x[0]**o + (0.332618927013)*x[0] + (0.0663344972952)*x[1]**o + (0.814827895348)*x[1]
        ref[(0, 0, 1, 3)]=-0.224472172913*x_ref[0]**o + (0.332618927013)*x_ref[0] + (0.0663344972952)*x_ref[1]**o + (0.814827895348)*x_ref[1]
        arg[(0, 0, 2, 0)]=0.294934842389*x[0]**o + (-0.750044028962)*x[0] + (0.125291188833)*x[1]**o + (-0.447284883137)*x[1]
        ref[(0, 0, 2, 0)]=0.294934842389*x_ref[0]**o + (-0.750044028962)*x_ref[0] + (0.125291188833)*x_ref[1]**o + (-0.447284883137)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.862917102212*x[0]**o + (0.584314795076)*x[0] + (0.297292917773)*x[1]**o + (-0.925117180608)*x[1]
        ref[(0, 0, 2, 1)]=-0.862917102212*x_ref[0]**o + (0.584314795076)*x_ref[0] + (0.297292917773)*x_ref[1]**o + (-0.925117180608)*x_ref[1]
        arg[(0, 0, 2, 2)]=0.836864000638*x[0]**o + (-0.895563949549)*x[0] + (0.964353979843)*x[1]**o + (0.817125954067)*x[1]
        ref[(0, 0, 2, 2)]=0.836864000638*x_ref[0]**o + (-0.895563949549)*x_ref[0] + (0.964353979843)*x_ref[1]**o + (0.817125954067)*x_ref[1]
        arg[(0, 0, 2, 3)]=0.958642529577*x[0]**o + (0.201375574887)*x[0] + (0.01409320008)*x[1]**o + (0.896368622507)*x[1]
        ref[(0, 0, 2, 3)]=0.958642529577*x_ref[0]**o + (0.201375574887)*x_ref[0] + (0.01409320008)*x_ref[1]**o + (0.896368622507)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.909933443546*x[0]**o + (-0.56881265836)*x[0] + (-0.993258819476)*x[1]**o + (0.134608253795)*x[1]
        ref[(0, 1, 0, 0)]=-0.909933443546*x_ref[0]**o + (-0.56881265836)*x_ref[0] + (-0.993258819476)*x_ref[1]**o + (0.134608253795)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.852818571654*x[0]**o + (-0.965292734598)*x[0] + (-0.0506307569623)*x[1]**o + (0.596160668723)*x[1]
        ref[(0, 1, 0, 1)]=0.852818571654*x_ref[0]**o + (-0.965292734598)*x_ref[0] + (-0.0506307569623)*x_ref[1]**o + (0.596160668723)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.920012885528*x[0]**o + (-0.738636155336)*x[0] + (0.177599715619)*x[1]**o + (-0.850920399098)*x[1]
        ref[(0, 1, 0, 2)]=0.920012885528*x_ref[0]**o + (-0.738636155336)*x_ref[0] + (0.177599715619)*x_ref[1]**o + (-0.850920399098)*x_ref[1]
        arg[(0, 1, 0, 3)]=-0.00575314226539*x[0]**o + (0.770195092185)*x[0] + (0.995578970844)*x[1]**o + (-0.110991304873)*x[1]
        ref[(0, 1, 0, 3)]=-0.00575314226539*x_ref[0]**o + (0.770195092185)*x_ref[0] + (0.995578970844)*x_ref[1]**o + (-0.110991304873)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.691520694778*x[0]**o + (-0.918596794638)*x[0] + (0.456860948381)*x[1]**o + (-0.723141648945)*x[1]
        ref[(0, 1, 1, 0)]=0.691520694778*x_ref[0]**o + (-0.918596794638)*x_ref[0] + (0.456860948381)*x_ref[1]**o + (-0.723141648945)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.723400193208*x[0]**o + (-0.308681354869)*x[0] + (-0.868199562627)*x[1]**o + (0.879299010437)*x[1]
        ref[(0, 1, 1, 1)]=-0.723400193208*x_ref[0]**o + (-0.308681354869)*x_ref[0] + (-0.868199562627)*x_ref[1]**o + (0.879299010437)*x_ref[1]
        arg[(0, 1, 1, 2)]=0.835668408599*x[0]**o + (-0.110942276145)*x[0] + (0.65742046962)*x[1]**o + (-0.709568805132)*x[1]
        ref[(0, 1, 1, 2)]=0.835668408599*x_ref[0]**o + (-0.110942276145)*x_ref[0] + (0.65742046962)*x_ref[1]**o + (-0.709568805132)*x_ref[1]
        arg[(0, 1, 1, 3)]=-0.103909196661*x[0]**o + (-0.622188091202)*x[0] + (-0.551957173207)*x[1]**o + (0.16200144244)*x[1]
        ref[(0, 1, 1, 3)]=-0.103909196661*x_ref[0]**o + (-0.622188091202)*x_ref[0] + (-0.551957173207)*x_ref[1]**o + (0.16200144244)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.704726642321*x[0]**o + (-0.917339074126)*x[0] + (-0.0878736829479)*x[1]**o + (-0.100500475442)*x[1]
        ref[(0, 1, 2, 0)]=-0.704726642321*x_ref[0]**o + (-0.917339074126)*x_ref[0] + (-0.0878736829479)*x_ref[1]**o + (-0.100500475442)*x_ref[1]
        arg[(0, 1, 2, 1)]=-0.538162683594*x[0]**o + (-0.13982687038)*x[0] + (0.419221288788)*x[1]**o + (0.68407252759)*x[1]
        ref[(0, 1, 2, 1)]=-0.538162683594*x_ref[0]**o + (-0.13982687038)*x_ref[0] + (0.419221288788)*x_ref[1]**o + (0.68407252759)*x_ref[1]
        arg[(0, 1, 2, 2)]=0.99493358237*x[0]**o + (0.948964587168)*x[0] + (0.132716706744)*x[1]**o + (-0.270926751558)*x[1]
        ref[(0, 1, 2, 2)]=0.99493358237*x_ref[0]**o + (0.948964587168)*x_ref[0] + (0.132716706744)*x_ref[1]**o + (-0.270926751558)*x_ref[1]
        arg[(0, 1, 2, 3)]=0.740913208176*x[0]**o + (0.876736053965)*x[0] + (-0.888036051783)*x[1]**o + (-0.426464226062)*x[1]
        ref[(0, 1, 2, 3)]=0.740913208176*x_ref[0]**o + (0.876736053965)*x_ref[0] + (-0.888036051783)*x_ref[1]**o + (-0.426464226062)*x_ref[1]
        arg[(0, 2, 0, 0)]=0.726789809617*x[0]**o + (0.636056334555)*x[0] + (-0.317071882334)*x[1]**o + (0.227577810771)*x[1]
        ref[(0, 2, 0, 0)]=0.726789809617*x_ref[0]**o + (0.636056334555)*x_ref[0] + (-0.317071882334)*x_ref[1]**o + (0.227577810771)*x_ref[1]
        arg[(0, 2, 0, 1)]=-0.653964610795*x[0]**o + (-0.978494334403)*x[0] + (0.229232937644)*x[1]**o + (-0.182062048451)*x[1]
        ref[(0, 2, 0, 1)]=-0.653964610795*x_ref[0]**o + (-0.978494334403)*x_ref[0] + (0.229232937644)*x_ref[1]**o + (-0.182062048451)*x_ref[1]
        arg[(0, 2, 0, 2)]=-0.588792824299*x[0]**o + (0.87973222252)*x[0] + (0.326149873318)*x[1]**o + (0.875381140366)*x[1]
        ref[(0, 2, 0, 2)]=-0.588792824299*x_ref[0]**o + (0.87973222252)*x_ref[0] + (0.326149873318)*x_ref[1]**o + (0.875381140366)*x_ref[1]
        arg[(0, 2, 0, 3)]=-0.0482212162875*x[0]**o + (-0.420353491871)*x[0] + (0.704259971911)*x[1]**o + (0.342500190565)*x[1]
        ref[(0, 2, 0, 3)]=-0.0482212162875*x_ref[0]**o + (-0.420353491871)*x_ref[0] + (0.704259971911)*x_ref[1]**o + (0.342500190565)*x_ref[1]
        arg[(0, 2, 1, 0)]=-0.746911801182*x[0]**o + (-0.262845497583)*x[0] + (0.42612269133)*x[1]**o + (0.275321165463)*x[1]
        ref[(0, 2, 1, 0)]=-0.746911801182*x_ref[0]**o + (-0.262845497583)*x_ref[0] + (0.42612269133)*x_ref[1]**o + (0.275321165463)*x_ref[1]
        arg[(0, 2, 1, 1)]=-0.302274468619*x[0]**o + (-0.407094862121)*x[0] + (-0.235803979514)*x[1]**o + (-0.676832531811)*x[1]
        ref[(0, 2, 1, 1)]=-0.302274468619*x_ref[0]**o + (-0.407094862121)*x_ref[0] + (-0.235803979514)*x_ref[1]**o + (-0.676832531811)*x_ref[1]
        arg[(0, 2, 1, 2)]=-0.116029281518*x[0]**o + (0.350059481501)*x[0] + (0.459111255432)*x[1]**o + (0.625803033578)*x[1]
        ref[(0, 2, 1, 2)]=-0.116029281518*x_ref[0]**o + (0.350059481501)*x_ref[0] + (0.459111255432)*x_ref[1]**o + (0.625803033578)*x_ref[1]
        arg[(0, 2, 1, 3)]=-0.939389867528*x[0]**o + (-0.172708853618)*x[0] + (0.826588399735)*x[1]**o + (-0.0710610451895)*x[1]
        ref[(0, 2, 1, 3)]=-0.939389867528*x_ref[0]**o + (-0.172708853618)*x_ref[0] + (0.826588399735)*x_ref[1]**o + (-0.0710610451895)*x_ref[1]
        arg[(0, 2, 2, 0)]=-0.14294000637*x[0]**o + (0.103519820538)*x[0] + (0.679763541013)*x[1]**o + (-0.111162252047)*x[1]
        ref[(0, 2, 2, 0)]=-0.14294000637*x_ref[0]**o + (0.103519820538)*x_ref[0] + (0.679763541013)*x_ref[1]**o + (-0.111162252047)*x_ref[1]
        arg[(0, 2, 2, 1)]=0.495914423256*x[0]**o + (0.113805088398)*x[0] + (-0.728219066692)*x[1]**o + (-0.133395971841)*x[1]
        ref[(0, 2, 2, 1)]=0.495914423256*x_ref[0]**o + (0.113805088398)*x_ref[0] + (-0.728219066692)*x_ref[1]**o + (-0.133395971841)*x_ref[1]
        arg[(0, 2, 2, 2)]=-0.944884057829*x[0]**o + (-0.603565376981)*x[0] + (0.433766015716)*x[1]**o + (0.700480187383)*x[1]
        ref[(0, 2, 2, 2)]=-0.944884057829*x_ref[0]**o + (-0.603565376981)*x_ref[0] + (0.433766015716)*x_ref[1]**o + (0.700480187383)*x_ref[1]
        arg[(0, 2, 2, 3)]=0.281875727845*x[0]**o + (-0.420629713435)*x[0] + (0.853606154893)*x[1]**o + (0.613253008277)*x[1]
        ref[(0, 2, 2, 3)]=0.281875727845*x_ref[0]**o + (-0.420629713435)*x_ref[0] + (0.853606154893)*x_ref[1]**o + (0.613253008277)*x_ref[1]
        arg[(0, 3, 0, 0)]=-0.604685192185*x[0]**o + (0.999773459565)*x[0] + (0.874383656689)*x[1]**o + (0.505113010181)*x[1]
        ref[(0, 3, 0, 0)]=-0.604685192185*x_ref[0]**o + (0.999773459565)*x_ref[0] + (0.874383656689)*x_ref[1]**o + (0.505113010181)*x_ref[1]
        arg[(0, 3, 0, 1)]=0.974067972965*x[0]**o + (0.368630630636)*x[0] + (0.0350742059564)*x[1]**o + (-0.099470577583)*x[1]
        ref[(0, 3, 0, 1)]=0.974067972965*x_ref[0]**o + (0.368630630636)*x_ref[0] + (0.0350742059564)*x_ref[1]**o + (-0.099470577583)*x_ref[1]
        arg[(0, 3, 0, 2)]=-0.216767322829*x[0]**o + (0.522315899094)*x[0] + (0.047236994414)*x[1]**o + (0.244241091861)*x[1]
        ref[(0, 3, 0, 2)]=-0.216767322829*x_ref[0]**o + (0.522315899094)*x_ref[0] + (0.047236994414)*x_ref[1]**o + (0.244241091861)*x_ref[1]
        arg[(0, 3, 0, 3)]=-0.14101462263*x[0]**o + (-0.470339339174)*x[0] + (0.467264876411)*x[1]**o + (0.189596119732)*x[1]
        ref[(0, 3, 0, 3)]=-0.14101462263*x_ref[0]**o + (-0.470339339174)*x_ref[0] + (0.467264876411)*x_ref[1]**o + (0.189596119732)*x_ref[1]
        arg[(0, 3, 1, 0)]=0.654405817135*x[0]**o + (-0.779881841777)*x[0] + (-0.597380242997)*x[1]**o + (0.100908262882)*x[1]
        ref[(0, 3, 1, 0)]=0.654405817135*x_ref[0]**o + (-0.779881841777)*x_ref[0] + (-0.597380242997)*x_ref[1]**o + (0.100908262882)*x_ref[1]
        arg[(0, 3, 1, 1)]=-0.637596146065*x[0]**o + (-0.604722572527)*x[0] + (0.404854260486)*x[1]**o + (0.223666857608)*x[1]
        ref[(0, 3, 1, 1)]=-0.637596146065*x_ref[0]**o + (-0.604722572527)*x_ref[0] + (0.404854260486)*x_ref[1]**o + (0.223666857608)*x_ref[1]
        arg[(0, 3, 1, 2)]=0.58210913663*x[0]**o + (0.671156901293)*x[0] + (-0.717785654056)*x[1]**o + (-0.819995537833)*x[1]
        ref[(0, 3, 1, 2)]=0.58210913663*x_ref[0]**o + (0.671156901293)*x_ref[0] + (-0.717785654056)*x_ref[1]**o + (-0.819995537833)*x_ref[1]
        arg[(0, 3, 1, 3)]=-0.017118151643*x[0]**o + (0.653580288381)*x[0] + (0.462766549508)*x[1]**o + (-0.463465018174)*x[1]
        ref[(0, 3, 1, 3)]=-0.017118151643*x_ref[0]**o + (0.653580288381)*x_ref[0] + (0.462766549508)*x_ref[1]**o + (-0.463465018174)*x_ref[1]
        arg[(0, 3, 2, 0)]=0.491590175254*x[0]**o + (-0.77711409949)*x[0] + (-0.830871045861)*x[1]**o + (-0.248415204276)*x[1]
        ref[(0, 3, 2, 0)]=0.491590175254*x_ref[0]**o + (-0.77711409949)*x_ref[0] + (-0.830871045861)*x_ref[1]**o + (-0.248415204276)*x_ref[1]
        arg[(0, 3, 2, 1)]=0.202743991764*x[0]**o + (-0.0817320919547)*x[0] + (-0.826363445873)*x[1]**o + (-0.822109601427)*x[1]
        ref[(0, 3, 2, 1)]=0.202743991764*x_ref[0]**o + (-0.0817320919547)*x_ref[0] + (-0.826363445873)*x_ref[1]**o + (-0.822109601427)*x_ref[1]
        arg[(0, 3, 2, 2)]=-0.0637319577654*x[0]**o + (0.5246686099)*x[0] + (-0.338397669507)*x[1]**o + (0.471905472764)*x[1]
        ref[(0, 3, 2, 2)]=-0.0637319577654*x_ref[0]**o + (0.5246686099)*x_ref[0] + (-0.338397669507)*x_ref[1]**o + (0.471905472764)*x_ref[1]
        arg[(0, 3, 2, 3)]=0.766001239394*x[0]**o + (0.0689026350965)*x[0] + (0.469085524675)*x[1]**o + (0.184532305703)*x[1]
        ref[(0, 3, 2, 3)]=0.766001239394*x_ref[0]**o + (0.0689026350965)*x_ref[0] + (0.469085524675)*x_ref[1]**o + (0.184532305703)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.895277594264*x[0]**o + (0.845944816662)*x[0] + (-0.899401768121)*x[1]**o + (-0.0391938228695)*x[1]
        ref[(1, 0, 0, 0)]=0.895277594264*x_ref[0]**o + (0.845944816662)*x_ref[0] + (-0.899401768121)*x_ref[1]**o + (-0.0391938228695)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.191355676138*x[0]**o + (0.997014592311)*x[0] + (0.481683417355)*x[1]**o + (-0.775157890387)*x[1]
        ref[(1, 0, 0, 1)]=-0.191355676138*x_ref[0]**o + (0.997014592311)*x_ref[0] + (0.481683417355)*x_ref[1]**o + (-0.775157890387)*x_ref[1]
        arg[(1, 0, 0, 2)]=-0.461059914465*x[0]**o + (0.415605145536)*x[0] + (0.836649749068)*x[1]**o + (0.312953492626)*x[1]
        ref[(1, 0, 0, 2)]=-0.461059914465*x_ref[0]**o + (0.415605145536)*x_ref[0] + (0.836649749068)*x_ref[1]**o + (0.312953492626)*x_ref[1]
        arg[(1, 0, 0, 3)]=0.59200129334*x[0]**o + (-0.236128588247)*x[0] + (0.228331427012)*x[1]**o + (0.492105632729)*x[1]
        ref[(1, 0, 0, 3)]=0.59200129334*x_ref[0]**o + (-0.236128588247)*x_ref[0] + (0.228331427012)*x_ref[1]**o + (0.492105632729)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.26459390063*x[0]**o + (0.730043823408)*x[0] + (0.85392831703)*x[1]**o + (0.217009771119)*x[1]
        ref[(1, 0, 1, 0)]=-0.26459390063*x_ref[0]**o + (0.730043823408)*x_ref[0] + (0.85392831703)*x_ref[1]**o + (0.217009771119)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.700262787062*x[0]**o + (-0.5137873857)*x[0] + (0.422247464534)*x[1]**o + (-0.775909333528)*x[1]
        ref[(1, 0, 1, 1)]=0.700262787062*x_ref[0]**o + (-0.5137873857)*x_ref[0] + (0.422247464534)*x_ref[1]**o + (-0.775909333528)*x_ref[1]
        arg[(1, 0, 1, 2)]=-0.27240707108*x[0]**o + (0.0910406250976)*x[0] + (0.134477576955)*x[1]**o + (0.404738720882)*x[1]
        ref[(1, 0, 1, 2)]=-0.27240707108*x_ref[0]**o + (0.0910406250976)*x_ref[0] + (0.134477576955)*x_ref[1]**o + (0.404738720882)*x_ref[1]
        arg[(1, 0, 1, 3)]=0.640259674659*x[0]**o + (-0.180012351574)*x[0] + (-0.0131460917594)*x[1]**o + (0.410379852205)*x[1]
        ref[(1, 0, 1, 3)]=0.640259674659*x_ref[0]**o + (-0.180012351574)*x_ref[0] + (-0.0131460917594)*x_ref[1]**o + (0.410379852205)*x_ref[1]
        arg[(1, 0, 2, 0)]=-0.47839466156*x[0]**o + (-0.593438892038)*x[0] + (-0.0478561705158)*x[1]**o + (-0.1190569806)*x[1]
        ref[(1, 0, 2, 0)]=-0.47839466156*x_ref[0]**o + (-0.593438892038)*x_ref[0] + (-0.0478561705158)*x_ref[1]**o + (-0.1190569806)*x_ref[1]
        arg[(1, 0, 2, 1)]=-0.541600210065*x[0]**o + (0.294432539976)*x[0] + (0.624128062325)*x[1]**o + (-0.623389873375)*x[1]
        ref[(1, 0, 2, 1)]=-0.541600210065*x_ref[0]**o + (0.294432539976)*x_ref[0] + (0.624128062325)*x_ref[1]**o + (-0.623389873375)*x_ref[1]
        arg[(1, 0, 2, 2)]=0.992136655873*x[0]**o + (0.328203839611)*x[0] + (0.44976269623)*x[1]**o + (-0.228176205887)*x[1]
        ref[(1, 0, 2, 2)]=0.992136655873*x_ref[0]**o + (0.328203839611)*x_ref[0] + (0.44976269623)*x_ref[1]**o + (-0.228176205887)*x_ref[1]
        arg[(1, 0, 2, 3)]=0.127466555118*x[0]**o + (-0.88450141898)*x[0] + (-0.221235964084)*x[1]**o + (-0.813754952209)*x[1]
        ref[(1, 0, 2, 3)]=0.127466555118*x_ref[0]**o + (-0.88450141898)*x_ref[0] + (-0.221235964084)*x_ref[1]**o + (-0.813754952209)*x_ref[1]
        arg[(1, 1, 0, 0)]=0.777246525935*x[0]**o + (0.254030221655)*x[0] + (-0.989856437465)*x[1]**o + (-0.616468331185)*x[1]
        ref[(1, 1, 0, 0)]=0.777246525935*x_ref[0]**o + (0.254030221655)*x_ref[0] + (-0.989856437465)*x_ref[1]**o + (-0.616468331185)*x_ref[1]
        arg[(1, 1, 0, 1)]=-0.474704769439*x[0]**o + (-0.0202619425155)*x[0] + (-0.52864752925)*x[1]**o + (-0.456217665649)*x[1]
        ref[(1, 1, 0, 1)]=-0.474704769439*x_ref[0]**o + (-0.0202619425155)*x_ref[0] + (-0.52864752925)*x_ref[1]**o + (-0.456217665649)*x_ref[1]
        arg[(1, 1, 0, 2)]=-0.52950609426*x[0]**o + (0.708767804751)*x[0] + (-0.678985202248)*x[1]**o + (0.260189324889)*x[1]
        ref[(1, 1, 0, 2)]=-0.52950609426*x_ref[0]**o + (0.708767804751)*x_ref[0] + (-0.678985202248)*x_ref[1]**o + (0.260189324889)*x_ref[1]
        arg[(1, 1, 0, 3)]=0.328510583539*x[0]**o + (0.160584278496)*x[0] + (0.568108773769)*x[1]**o + (-0.645453909062)*x[1]
        ref[(1, 1, 0, 3)]=0.328510583539*x_ref[0]**o + (0.160584278496)*x_ref[0] + (0.568108773769)*x_ref[1]**o + (-0.645453909062)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.795987300375*x[0]**o + (0.228143996159)*x[0] + (-0.908904429407)*x[1]**o + (0.238325365554)*x[1]
        ref[(1, 1, 1, 0)]=0.795987300375*x_ref[0]**o + (0.228143996159)*x_ref[0] + (-0.908904429407)*x_ref[1]**o + (0.238325365554)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.0432912991196*x[0]**o + (-0.291536363825)*x[0] + (-0.912754118445)*x[1]**o + (0.367157811078)*x[1]
        ref[(1, 1, 1, 1)]=-0.0432912991196*x_ref[0]**o + (-0.291536363825)*x_ref[0] + (-0.912754118445)*x_ref[1]**o + (0.367157811078)*x_ref[1]
        arg[(1, 1, 1, 2)]=-0.719357340782*x[0]**o + (0.681000214683)*x[0] + (0.488255897959)*x[1]**o + (0.099833717497)*x[1]
        ref[(1, 1, 1, 2)]=-0.719357340782*x_ref[0]**o + (0.681000214683)*x_ref[0] + (0.488255897959)*x_ref[1]**o + (0.099833717497)*x_ref[1]
        arg[(1, 1, 1, 3)]=-0.685868232177*x[0]**o + (0.505711750584)*x[0] + (-0.959371642156)*x[1]**o + (0.0570363938035)*x[1]
        ref[(1, 1, 1, 3)]=-0.685868232177*x_ref[0]**o + (0.505711750584)*x_ref[0] + (-0.959371642156)*x_ref[1]**o + (0.0570363938035)*x_ref[1]
        arg[(1, 1, 2, 0)]=0.680388794485*x[0]**o + (-0.675120937698)*x[0] + (-0.394567531604)*x[1]**o + (-0.90355388524)*x[1]
        ref[(1, 1, 2, 0)]=0.680388794485*x_ref[0]**o + (-0.675120937698)*x_ref[0] + (-0.394567531604)*x_ref[1]**o + (-0.90355388524)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.712710169468*x[0]**o + (0.71174378767)*x[0] + (-0.57430241875)*x[1]**o + (-0.460106108657)*x[1]
        ref[(1, 1, 2, 1)]=-0.712710169468*x_ref[0]**o + (0.71174378767)*x_ref[0] + (-0.57430241875)*x_ref[1]**o + (-0.460106108657)*x_ref[1]
        arg[(1, 1, 2, 2)]=-0.124796246309*x[0]**o + (0.114909545659)*x[0] + (0.201700177993)*x[1]**o + (-0.851639997438)*x[1]
        ref[(1, 1, 2, 2)]=-0.124796246309*x_ref[0]**o + (0.114909545659)*x_ref[0] + (0.201700177993)*x_ref[1]**o + (-0.851639997438)*x_ref[1]
        arg[(1, 1, 2, 3)]=0.738617854025*x[0]**o + (0.183489145597)*x[0] + (-0.35320981075)*x[1]**o + (-0.883256512413)*x[1]
        ref[(1, 1, 2, 3)]=0.738617854025*x_ref[0]**o + (0.183489145597)*x_ref[0] + (-0.35320981075)*x_ref[1]**o + (-0.883256512413)*x_ref[1]
        arg[(1, 2, 0, 0)]=0.25969156308*x[0]**o + (0.0225123435445)*x[0] + (-0.16087279224)*x[1]**o + (-0.824034903023)*x[1]
        ref[(1, 2, 0, 0)]=0.25969156308*x_ref[0]**o + (0.0225123435445)*x_ref[0] + (-0.16087279224)*x_ref[1]**o + (-0.824034903023)*x_ref[1]
        arg[(1, 2, 0, 1)]=0.314502500885*x[0]**o + (0.208297866429)*x[0] + (-0.856089537549)*x[1]**o + (0.0257014359936)*x[1]
        ref[(1, 2, 0, 1)]=0.314502500885*x_ref[0]**o + (0.208297866429)*x_ref[0] + (-0.856089537549)*x_ref[1]**o + (0.0257014359936)*x_ref[1]
        arg[(1, 2, 0, 2)]=0.0824333324332*x[0]**o + (0.975494480769)*x[0] + (0.685004524031)*x[1]**o + (0.913653977498)*x[1]
        ref[(1, 2, 0, 2)]=0.0824333324332*x_ref[0]**o + (0.975494480769)*x_ref[0] + (0.685004524031)*x_ref[1]**o + (0.913653977498)*x_ref[1]
        arg[(1, 2, 0, 3)]=-0.754246482851*x[0]**o + (-0.304997262435)*x[0] + (-0.438821127447)*x[1]**o + (-0.719595216557)*x[1]
        ref[(1, 2, 0, 3)]=-0.754246482851*x_ref[0]**o + (-0.304997262435)*x_ref[0] + (-0.438821127447)*x_ref[1]**o + (-0.719595216557)*x_ref[1]
        arg[(1, 2, 1, 0)]=-0.235628744314*x[0]**o + (0.9460849398)*x[0] + (0.360214651702)*x[1]**o + (-0.783192240497)*x[1]
        ref[(1, 2, 1, 0)]=-0.235628744314*x_ref[0]**o + (0.9460849398)*x_ref[0] + (0.360214651702)*x_ref[1]**o + (-0.783192240497)*x_ref[1]
        arg[(1, 2, 1, 1)]=-0.19521907519*x[0]**o + (0.0511001640498)*x[0] + (0.710591114641)*x[1]**o + (0.194941465652)*x[1]
        ref[(1, 2, 1, 1)]=-0.19521907519*x_ref[0]**o + (0.0511001640498)*x_ref[0] + (0.710591114641)*x_ref[1]**o + (0.194941465652)*x_ref[1]
        arg[(1, 2, 1, 2)]=0.919072241409*x[0]**o + (0.680908077875)*x[0] + (-0.761801569149)*x[1]**o + (0.320712018064)*x[1]
        ref[(1, 2, 1, 2)]=0.919072241409*x_ref[0]**o + (0.680908077875)*x_ref[0] + (-0.761801569149)*x_ref[1]**o + (0.320712018064)*x_ref[1]
        arg[(1, 2, 1, 3)]=0.975989359994*x[0]**o + (-0.336370539039)*x[0] + (-0.0474341462409)*x[1]**o + (0.0486896430122)*x[1]
        ref[(1, 2, 1, 3)]=0.975989359994*x_ref[0]**o + (-0.336370539039)*x_ref[0] + (-0.0474341462409)*x_ref[1]**o + (0.0486896430122)*x_ref[1]
        arg[(1, 2, 2, 0)]=0.0169431962191*x[0]**o + (-0.545120929849)*x[0] + (-0.792403475174)*x[1]**o + (0.706287983004)*x[1]
        ref[(1, 2, 2, 0)]=0.0169431962191*x_ref[0]**o + (-0.545120929849)*x_ref[0] + (-0.792403475174)*x_ref[1]**o + (0.706287983004)*x_ref[1]
        arg[(1, 2, 2, 1)]=0.563765369048*x[0]**o + (0.603238444428)*x[0] + (0.25295872391)*x[1]**o + (-0.869895177797)*x[1]
        ref[(1, 2, 2, 1)]=0.563765369048*x_ref[0]**o + (0.603238444428)*x_ref[0] + (0.25295872391)*x_ref[1]**o + (-0.869895177797)*x_ref[1]
        arg[(1, 2, 2, 2)]=-0.348994472694*x[0]**o + (0.865498053788)*x[0] + (-0.155432155392)*x[1]**o + (-0.392213851759)*x[1]
        ref[(1, 2, 2, 2)]=-0.348994472694*x_ref[0]**o + (0.865498053788)*x_ref[0] + (-0.155432155392)*x_ref[1]**o + (-0.392213851759)*x_ref[1]
        arg[(1, 2, 2, 3)]=-0.545676051648*x[0]**o + (-0.943073872924)*x[0] + (0.195690818622)*x[1]**o + (0.183321095712)*x[1]
        ref[(1, 2, 2, 3)]=-0.545676051648*x_ref[0]**o + (-0.943073872924)*x_ref[0] + (0.195690818622)*x_ref[1]**o + (0.183321095712)*x_ref[1]
        arg[(1, 3, 0, 0)]=0.711590877061*x[0]**o + (-0.498118331929)*x[0] + (0.120576431853)*x[1]**o + (0.350685376601)*x[1]
        ref[(1, 3, 0, 0)]=0.711590877061*x_ref[0]**o + (-0.498118331929)*x_ref[0] + (0.120576431853)*x_ref[1]**o + (0.350685376601)*x_ref[1]
        arg[(1, 3, 0, 1)]=-0.87283213537*x[0]**o + (-0.260210103055)*x[0] + (-0.277155315725)*x[1]**o + (0.789822145201)*x[1]
        ref[(1, 3, 0, 1)]=-0.87283213537*x_ref[0]**o + (-0.260210103055)*x_ref[0] + (-0.277155315725)*x_ref[1]**o + (0.789822145201)*x_ref[1]
        arg[(1, 3, 0, 2)]=0.419749308126*x[0]**o + (-0.706767481873)*x[0] + (0.54335588042)*x[1]**o + (-0.937316588221)*x[1]
        ref[(1, 3, 0, 2)]=0.419749308126*x_ref[0]**o + (-0.706767481873)*x_ref[0] + (0.54335588042)*x_ref[1]**o + (-0.937316588221)*x_ref[1]
        arg[(1, 3, 0, 3)]=-0.605061093491*x[0]**o + (0.893467728463)*x[0] + (0.525298018436)*x[1]**o + (0.181014162829)*x[1]
        ref[(1, 3, 0, 3)]=-0.605061093491*x_ref[0]**o + (0.893467728463)*x_ref[0] + (0.525298018436)*x_ref[1]**o + (0.181014162829)*x_ref[1]
        arg[(1, 3, 1, 0)]=0.669879376783*x[0]**o + (-0.588293734357)*x[0] + (0.558981750844)*x[1]**o + (0.237199816957)*x[1]
        ref[(1, 3, 1, 0)]=0.669879376783*x_ref[0]**o + (-0.588293734357)*x_ref[0] + (0.558981750844)*x_ref[1]**o + (0.237199816957)*x_ref[1]
        arg[(1, 3, 1, 1)]=0.753847595478*x[0]**o + (0.485301875328)*x[0] + (-0.26920621409)*x[1]**o + (0.121211456831)*x[1]
        ref[(1, 3, 1, 1)]=0.753847595478*x_ref[0]**o + (0.485301875328)*x_ref[0] + (-0.26920621409)*x_ref[1]**o + (0.121211456831)*x_ref[1]
        arg[(1, 3, 1, 2)]=0.310415400589*x[0]**o + (-0.21208323655)*x[0] + (0.646371956667)*x[1]**o + (0.741810554793)*x[1]
        ref[(1, 3, 1, 2)]=0.310415400589*x_ref[0]**o + (-0.21208323655)*x_ref[0] + (0.646371956667)*x_ref[1]**o + (0.741810554793)*x_ref[1]
        arg[(1, 3, 1, 3)]=0.679064576079*x[0]**o + (-0.590356391727)*x[0] + (0.455460051649)*x[1]**o + (-0.130157955647)*x[1]
        ref[(1, 3, 1, 3)]=0.679064576079*x_ref[0]**o + (-0.590356391727)*x_ref[0] + (0.455460051649)*x_ref[1]**o + (-0.130157955647)*x_ref[1]
        arg[(1, 3, 2, 0)]=-0.976975937448*x[0]**o + (-0.793585119362)*x[0] + (-0.773144829871)*x[1]**o + (-0.338176408629)*x[1]
        ref[(1, 3, 2, 0)]=-0.976975937448*x_ref[0]**o + (-0.793585119362)*x_ref[0] + (-0.773144829871)*x_ref[1]**o + (-0.338176408629)*x_ref[1]
        arg[(1, 3, 2, 1)]=-0.705428392412*x[0]**o + (0.0450241290098)*x[0] + (-0.987843326257)*x[1]**o + (0.13403120655)*x[1]
        ref[(1, 3, 2, 1)]=-0.705428392412*x_ref[0]**o + (0.0450241290098)*x_ref[0] + (-0.987843326257)*x_ref[1]**o + (0.13403120655)*x_ref[1]
        arg[(1, 3, 2, 2)]=-0.149328510955*x[0]**o + (-0.860202122656)*x[0] + (0.927211523748)*x[1]**o + (0.555490986157)*x[1]
        ref[(1, 3, 2, 2)]=-0.149328510955*x_ref[0]**o + (-0.860202122656)*x_ref[0] + (0.927211523748)*x_ref[1]**o + (0.555490986157)*x_ref[1]
        arg[(1, 3, 2, 3)]=-0.745727433013*x[0]**o + (-0.757690945743)*x[0] + (-0.339857715407)*x[1]**o + (0.736886752367)*x[1]
        ref[(1, 3, 2, 3)]=-0.745727433013*x_ref[0]**o + (-0.757690945743)*x_ref[0] + (-0.339857715407)*x_ref[1]**o + (0.736886752367)*x_ref[1]
        arg[(2, 0, 0, 0)]=-0.157140218148*x[0]**o + (0.706971055372)*x[0] + (0.161319798686)*x[1]**o + (-0.242113067637)*x[1]
        ref[(2, 0, 0, 0)]=-0.157140218148*x_ref[0]**o + (0.706971055372)*x_ref[0] + (0.161319798686)*x_ref[1]**o + (-0.242113067637)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.765236488992*x[0]**o + (0.776897784853)*x[0] + (0.229243182562)*x[1]**o + (0.690159348145)*x[1]
        ref[(2, 0, 0, 1)]=0.765236488992*x_ref[0]**o + (0.776897784853)*x_ref[0] + (0.229243182562)*x_ref[1]**o + (0.690159348145)*x_ref[1]
        arg[(2, 0, 0, 2)]=0.570434177022*x[0]**o + (-0.661602280766)*x[0] + (-0.0197693274331)*x[1]**o + (-0.361226682047)*x[1]
        ref[(2, 0, 0, 2)]=0.570434177022*x_ref[0]**o + (-0.661602280766)*x_ref[0] + (-0.0197693274331)*x_ref[1]**o + (-0.361226682047)*x_ref[1]
        arg[(2, 0, 0, 3)]=-0.53699587259*x[0]**o + (0.155578237105)*x[0] + (0.890841834916)*x[1]**o + (-0.566058619425)*x[1]
        ref[(2, 0, 0, 3)]=-0.53699587259*x_ref[0]**o + (0.155578237105)*x_ref[0] + (0.890841834916)*x_ref[1]**o + (-0.566058619425)*x_ref[1]
        arg[(2, 0, 1, 0)]=0.907628641556*x[0]**o + (0.176280288505)*x[0] + (-0.59738340909)*x[1]**o + (0.596701775876)*x[1]
        ref[(2, 0, 1, 0)]=0.907628641556*x_ref[0]**o + (0.176280288505)*x_ref[0] + (-0.59738340909)*x_ref[1]**o + (0.596701775876)*x_ref[1]
        arg[(2, 0, 1, 1)]=0.899748528201*x[0]**o + (0.818104761364)*x[0] + (-0.299191408027)*x[1]**o + (-0.187472061904)*x[1]
        ref[(2, 0, 1, 1)]=0.899748528201*x_ref[0]**o + (0.818104761364)*x_ref[0] + (-0.299191408027)*x_ref[1]**o + (-0.187472061904)*x_ref[1]
        arg[(2, 0, 1, 2)]=-0.7387977877*x[0]**o + (-0.562821046099)*x[0] + (0.45250741975)*x[1]**o + (0.497365367494)*x[1]
        ref[(2, 0, 1, 2)]=-0.7387977877*x_ref[0]**o + (-0.562821046099)*x_ref[0] + (0.45250741975)*x_ref[1]**o + (0.497365367494)*x_ref[1]
        arg[(2, 0, 1, 3)]=0.636625581487*x[0]**o + (0.922451588769)*x[0] + (-0.538130793772)*x[1]**o + (0.808098370426)*x[1]
        ref[(2, 0, 1, 3)]=0.636625581487*x_ref[0]**o + (0.922451588769)*x_ref[0] + (-0.538130793772)*x_ref[1]**o + (0.808098370426)*x_ref[1]
        arg[(2, 0, 2, 0)]=-0.216033253101*x[0]**o + (0.882331096148)*x[0] + (-0.226497568697)*x[1]**o + (0.983185895459)*x[1]
        ref[(2, 0, 2, 0)]=-0.216033253101*x_ref[0]**o + (0.882331096148)*x_ref[0] + (-0.226497568697)*x_ref[1]**o + (0.983185895459)*x_ref[1]
        arg[(2, 0, 2, 1)]=-0.371105837601*x[0]**o + (-0.477552346968)*x[0] + (0.584920575155)*x[1]**o + (0.61894743694)*x[1]
        ref[(2, 0, 2, 1)]=-0.371105837601*x_ref[0]**o + (-0.477552346968)*x_ref[0] + (0.584920575155)*x_ref[1]**o + (0.61894743694)*x_ref[1]
        arg[(2, 0, 2, 2)]=0.301668715977*x[0]**o + (0.472242193623)*x[0] + (0.334726131855)*x[1]**o + (-0.826400129873)*x[1]
        ref[(2, 0, 2, 2)]=0.301668715977*x_ref[0]**o + (0.472242193623)*x_ref[0] + (0.334726131855)*x_ref[1]**o + (-0.826400129873)*x_ref[1]
        arg[(2, 0, 2, 3)]=-0.173373409536*x[0]**o + (0.476653747635)*x[0] + (-0.643688313219)*x[1]**o + (-0.60657899923)*x[1]
        ref[(2, 0, 2, 3)]=-0.173373409536*x_ref[0]**o + (0.476653747635)*x_ref[0] + (-0.643688313219)*x_ref[1]**o + (-0.60657899923)*x_ref[1]
        arg[(2, 1, 0, 0)]=0.396595140922*x[0]**o + (-0.105304132086)*x[0] + (0.70796330635)*x[1]**o + (-0.792019011908)*x[1]
        ref[(2, 1, 0, 0)]=0.396595140922*x_ref[0]**o + (-0.105304132086)*x_ref[0] + (0.70796330635)*x_ref[1]**o + (-0.792019011908)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.926669249248*x[0]**o + (0.891435949577)*x[0] + (0.687235245787)*x[1]**o + (-0.162804495344)*x[1]
        ref[(2, 1, 0, 1)]=0.926669249248*x_ref[0]**o + (0.891435949577)*x_ref[0] + (0.687235245787)*x_ref[1]**o + (-0.162804495344)*x_ref[1]
        arg[(2, 1, 0, 2)]=0.35118595427*x[0]**o + (-0.204158152068)*x[0] + (0.597455024829)*x[1]**o + (0.796041110527)*x[1]
        ref[(2, 1, 0, 2)]=0.35118595427*x_ref[0]**o + (-0.204158152068)*x_ref[0] + (0.597455024829)*x_ref[1]**o + (0.796041110527)*x_ref[1]
        arg[(2, 1, 0, 3)]=-0.561168666276*x[0]**o + (0.898388433016)*x[0] + (0.47563262813)*x[1]**o + (0.308736951846)*x[1]
        ref[(2, 1, 0, 3)]=-0.561168666276*x_ref[0]**o + (0.898388433016)*x_ref[0] + (0.47563262813)*x_ref[1]**o + (0.308736951846)*x_ref[1]
        arg[(2, 1, 1, 0)]=0.968889689203*x[0]**o + (0.66182577459)*x[0] + (-0.721150635926)*x[1]**o + (0.317077317506)*x[1]
        ref[(2, 1, 1, 0)]=0.968889689203*x_ref[0]**o + (0.66182577459)*x_ref[0] + (-0.721150635926)*x_ref[1]**o + (0.317077317506)*x_ref[1]
        arg[(2, 1, 1, 1)]=0.376793901623*x[0]**o + (0.0654274130117)*x[0] + (-0.0747819388216)*x[1]**o + (0.144797574999)*x[1]
        ref[(2, 1, 1, 1)]=0.376793901623*x_ref[0]**o + (0.0654274130117)*x_ref[0] + (-0.0747819388216)*x_ref[1]**o + (0.144797574999)*x_ref[1]
        arg[(2, 1, 1, 2)]=0.457356918081*x[0]**o + (0.402616195828)*x[0] + (0.366737854937)*x[1]**o + (0.267312318557)*x[1]
        ref[(2, 1, 1, 2)]=0.457356918081*x_ref[0]**o + (0.402616195828)*x_ref[0] + (0.366737854937)*x_ref[1]**o + (0.267312318557)*x_ref[1]
        arg[(2, 1, 1, 3)]=-0.778552126124*x[0]**o + (-0.686054812466)*x[0] + (0.366109450168)*x[1]**o + (-0.886187622335)*x[1]
        ref[(2, 1, 1, 3)]=-0.778552126124*x_ref[0]**o + (-0.686054812466)*x_ref[0] + (0.366109450168)*x_ref[1]**o + (-0.886187622335)*x_ref[1]
        arg[(2, 1, 2, 0)]=-0.437553809814*x[0]**o + (-0.103469187927)*x[0] + (0.632460447745)*x[1]**o + (-0.41000686516)*x[1]
        ref[(2, 1, 2, 0)]=-0.437553809814*x_ref[0]**o + (-0.103469187927)*x_ref[0] + (0.632460447745)*x_ref[1]**o + (-0.41000686516)*x_ref[1]
        arg[(2, 1, 2, 1)]=0.198025690233*x[0]**o + (-0.920539142069)*x[0] + (-0.207443681546)*x[1]**o + (-0.909007818243)*x[1]
        ref[(2, 1, 2, 1)]=0.198025690233*x_ref[0]**o + (-0.920539142069)*x_ref[0] + (-0.207443681546)*x_ref[1]**o + (-0.909007818243)*x_ref[1]
        arg[(2, 1, 2, 2)]=-0.401407438154*x[0]**o + (-0.958607338915)*x[0] + (0.216887326935)*x[1]**o + (0.972711724598)*x[1]
        ref[(2, 1, 2, 2)]=-0.401407438154*x_ref[0]**o + (-0.958607338915)*x_ref[0] + (0.216887326935)*x_ref[1]**o + (0.972711724598)*x_ref[1]
        arg[(2, 1, 2, 3)]=0.205660706115*x[0]**o + (0.956406043149)*x[0] + (-0.670113092111)*x[1]**o + (0.922906634535)*x[1]
        ref[(2, 1, 2, 3)]=0.205660706115*x_ref[0]**o + (0.956406043149)*x_ref[0] + (-0.670113092111)*x_ref[1]**o + (0.922906634535)*x_ref[1]
        arg[(2, 2, 0, 0)]=0.203166619945*x[0]**o + (0.743160631257)*x[0] + (0.277652131871)*x[1]**o + (-0.596374525847)*x[1]
        ref[(2, 2, 0, 0)]=0.203166619945*x_ref[0]**o + (0.743160631257)*x_ref[0] + (0.277652131871)*x_ref[1]**o + (-0.596374525847)*x_ref[1]
        arg[(2, 2, 0, 1)]=0.0643435338288*x[0]**o + (-0.402342393023)*x[0] + (0.926478765652)*x[1]**o + (-0.794718385145)*x[1]
        ref[(2, 2, 0, 1)]=0.0643435338288*x_ref[0]**o + (-0.402342393023)*x_ref[0] + (0.926478765652)*x_ref[1]**o + (-0.794718385145)*x_ref[1]
        arg[(2, 2, 0, 2)]=-0.0382953924406*x[0]**o + (-0.946062181291)*x[0] + (-0.546731133419)*x[1]**o + (-0.295944706638)*x[1]
        ref[(2, 2, 0, 2)]=-0.0382953924406*x_ref[0]**o + (-0.946062181291)*x_ref[0] + (-0.546731133419)*x_ref[1]**o + (-0.295944706638)*x_ref[1]
        arg[(2, 2, 0, 3)]=0.62943564402*x[0]**o + (0.609420337403)*x[0] + (0.145323126368)*x[1]**o + (0.56106780846)*x[1]
        ref[(2, 2, 0, 3)]=0.62943564402*x_ref[0]**o + (0.609420337403)*x_ref[0] + (0.145323126368)*x_ref[1]**o + (0.56106780846)*x_ref[1]
        arg[(2, 2, 1, 0)]=-0.769664508323*x[0]**o + (0.487307614533)*x[0] + (-0.922977349075)*x[1]**o + (0.995084489449)*x[1]
        ref[(2, 2, 1, 0)]=-0.769664508323*x_ref[0]**o + (0.487307614533)*x_ref[0] + (-0.922977349075)*x_ref[1]**o + (0.995084489449)*x_ref[1]
        arg[(2, 2, 1, 1)]=0.179040376744*x[0]**o + (-0.332848323892)*x[0] + (0.780721070908)*x[1]**o + (-0.748398431047)*x[1]
        ref[(2, 2, 1, 1)]=0.179040376744*x_ref[0]**o + (-0.332848323892)*x_ref[0] + (0.780721070908)*x_ref[1]**o + (-0.748398431047)*x_ref[1]
        arg[(2, 2, 1, 2)]=-0.683620678648*x[0]**o + (0.151718556894)*x[0] + (0.378571047164)*x[1]**o + (-0.74765512305)*x[1]
        ref[(2, 2, 1, 2)]=-0.683620678648*x_ref[0]**o + (0.151718556894)*x_ref[0] + (0.378571047164)*x_ref[1]**o + (-0.74765512305)*x_ref[1]
        arg[(2, 2, 1, 3)]=-0.440702427278*x[0]**o + (0.235330987556)*x[0] + (0.676099936213)*x[1]**o + (0.519535275529)*x[1]
        ref[(2, 2, 1, 3)]=-0.440702427278*x_ref[0]**o + (0.235330987556)*x_ref[0] + (0.676099936213)*x_ref[1]**o + (0.519535275529)*x_ref[1]
        arg[(2, 2, 2, 0)]=0.28806359921*x[0]**o + (-0.451736269073)*x[0] + (-0.899747388529)*x[1]**o + (-0.84846120685)*x[1]
        ref[(2, 2, 2, 0)]=0.28806359921*x_ref[0]**o + (-0.451736269073)*x_ref[0] + (-0.899747388529)*x_ref[1]**o + (-0.84846120685)*x_ref[1]
        arg[(2, 2, 2, 1)]=0.569186890154*x[0]**o + (0.0883565157086)*x[0] + (0.778473033567)*x[1]**o + (-0.175872981962)*x[1]
        ref[(2, 2, 2, 1)]=0.569186890154*x_ref[0]**o + (0.0883565157086)*x_ref[0] + (0.778473033567)*x_ref[1]**o + (-0.175872981962)*x_ref[1]
        arg[(2, 2, 2, 2)]=-0.0504507890789*x[0]**o + (0.103795742618)*x[0] + (0.0861741065973)*x[1]**o + (-0.665370179401)*x[1]
        ref[(2, 2, 2, 2)]=-0.0504507890789*x_ref[0]**o + (0.103795742618)*x_ref[0] + (0.0861741065973)*x_ref[1]**o + (-0.665370179401)*x_ref[1]
        arg[(2, 2, 2, 3)]=-0.183522190882*x[0]**o + (0.361119646)*x[0] + (-0.857648987371)*x[1]**o + (-0.531896756301)*x[1]
        ref[(2, 2, 2, 3)]=-0.183522190882*x_ref[0]**o + (0.361119646)*x_ref[0] + (-0.857648987371)*x_ref[1]**o + (-0.531896756301)*x_ref[1]
        arg[(2, 3, 0, 0)]=0.521721639177*x[0]**o + (-0.336737254585)*x[0] + (0.969203706845)*x[1]**o + (0.564237759341)*x[1]
        ref[(2, 3, 0, 0)]=0.521721639177*x_ref[0]**o + (-0.336737254585)*x_ref[0] + (0.969203706845)*x_ref[1]**o + (0.564237759341)*x_ref[1]
        arg[(2, 3, 0, 1)]=0.810803892907*x[0]**o + (-0.521601202707)*x[0] + (0.529586867499)*x[1]**o + (-0.270291889213)*x[1]
        ref[(2, 3, 0, 1)]=0.810803892907*x_ref[0]**o + (-0.521601202707)*x_ref[0] + (0.529586867499)*x_ref[1]**o + (-0.270291889213)*x_ref[1]
        arg[(2, 3, 0, 2)]=-0.453111256952*x[0]**o + (-0.104464896264)*x[0] + (-0.614589708449)*x[1]**o + (0.449432165078)*x[1]
        ref[(2, 3, 0, 2)]=-0.453111256952*x_ref[0]**o + (-0.104464896264)*x_ref[0] + (-0.614589708449)*x_ref[1]**o + (0.449432165078)*x_ref[1]
        arg[(2, 3, 0, 3)]=0.656543297521*x[0]**o + (0.500441528647)*x[0] + (-0.660743987385)*x[1]**o + (-0.652971439073)*x[1]
        ref[(2, 3, 0, 3)]=0.656543297521*x_ref[0]**o + (0.500441528647)*x_ref[0] + (-0.660743987385)*x_ref[1]**o + (-0.652971439073)*x_ref[1]
        arg[(2, 3, 1, 0)]=0.0493118698816*x[0]**o + (0.461249282776)*x[0] + (0.810374477346)*x[1]**o + (0.206626449056)*x[1]
        ref[(2, 3, 1, 0)]=0.0493118698816*x_ref[0]**o + (0.461249282776)*x_ref[0] + (0.810374477346)*x_ref[1]**o + (0.206626449056)*x_ref[1]
        arg[(2, 3, 1, 1)]=0.431565489444*x[0]**o + (0.953759377637)*x[0] + (0.459436638052)*x[1]**o + (-0.845499426018)*x[1]
        ref[(2, 3, 1, 1)]=0.431565489444*x_ref[0]**o + (0.953759377637)*x_ref[0] + (0.459436638052)*x_ref[1]**o + (-0.845499426018)*x_ref[1]
        arg[(2, 3, 1, 2)]=0.262888603629*x[0]**o + (0.426140462681)*x[0] + (0.208680721512)*x[1]**o + (0.792219059353)*x[1]
        ref[(2, 3, 1, 2)]=0.262888603629*x_ref[0]**o + (0.426140462681)*x_ref[0] + (0.208680721512)*x_ref[1]**o + (0.792219059353)*x_ref[1]
        arg[(2, 3, 1, 3)]=0.790401249494*x[0]**o + (0.686920573853)*x[0] + (-0.133519949966)*x[1]**o + (-0.629513037725)*x[1]
        ref[(2, 3, 1, 3)]=0.790401249494*x_ref[0]**o + (0.686920573853)*x_ref[0] + (-0.133519949966)*x_ref[1]**o + (-0.629513037725)*x_ref[1]
        arg[(2, 3, 2, 0)]=-0.825760813386*x[0]**o + (0.031875889216)*x[0] + (-0.474046133029)*x[1]**o + (-0.799075931863)*x[1]
        ref[(2, 3, 2, 0)]=-0.825760813386*x_ref[0]**o + (0.031875889216)*x_ref[0] + (-0.474046133029)*x_ref[1]**o + (-0.799075931863)*x_ref[1]
        arg[(2, 3, 2, 1)]=0.15090920568*x[0]**o + (0.178504907434)*x[0] + (-0.085021965812)*x[1]**o + (0.848726153196)*x[1]
        ref[(2, 3, 2, 1)]=0.15090920568*x_ref[0]**o + (0.178504907434)*x_ref[0] + (-0.085021965812)*x_ref[1]**o + (0.848726153196)*x_ref[1]
        arg[(2, 3, 2, 2)]=-0.986897125867*x[0]**o + (0.583483096632)*x[0] + (-0.864508015613)*x[1]**o + (-0.800357550345)*x[1]
        ref[(2, 3, 2, 2)]=-0.986897125867*x_ref[0]**o + (0.583483096632)*x_ref[0] + (-0.864508015613)*x_ref[1]**o + (-0.800357550345)*x_ref[1]
        arg[(2, 3, 2, 3)]=-0.879713528643*x[0]**o + (0.107199046806)*x[0] + (-0.62066551578)*x[1]**o + (0.04468196116)*x[1]
        ref[(2, 3, 2, 3)]=-0.879713528643*x_ref[0]**o + (0.107199046806)*x_ref[0] + (-0.62066551578)*x_ref[1]**o + (0.04468196116)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.987362268119*x[2]**o + (-0.796086835547)*x[2]
            ref[(0, 0, 0, 0)]+=0.987362268119*x_ref[2]**o + (-0.796086835547)*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.84237067235*x[2]**o + (-0.59104965009)*x[2]
            ref[(0, 0, 0, 1)]+=-0.84237067235*x_ref[2]**o + (-0.59104965009)*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.833722898628*x[2]**o + (-0.556852885374)*x[2]
            ref[(0, 0, 0, 2)]+=0.833722898628*x_ref[2]**o + (-0.556852885374)*x_ref[2]
            arg[(0, 0, 0, 3)]+=0.503804791028*x[2]**o + (0.170304446953)*x[2]
            ref[(0, 0, 0, 3)]+=0.503804791028*x_ref[2]**o + (0.170304446953)*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.622348722282*x[2]**o + (0.70158986836)*x[2]
            ref[(0, 0, 1, 0)]+=-0.622348722282*x_ref[2]**o + (0.70158986836)*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.0103207870026*x[2]**o + (-0.00605151628128)*x[2]
            ref[(0, 0, 1, 1)]+=0.0103207870026*x_ref[2]**o + (-0.00605151628128)*x_ref[2]
            arg[(0, 0, 1, 2)]+=0.109462535621*x[2]**o + (0.264420961004)*x[2]
            ref[(0, 0, 1, 2)]+=0.109462535621*x_ref[2]**o + (0.264420961004)*x_ref[2]
            arg[(0, 0, 1, 3)]+=-0.574953764214*x[2]**o + (0.3564817566)*x[2]
            ref[(0, 0, 1, 3)]+=-0.574953764214*x_ref[2]**o + (0.3564817566)*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.462590441569*x[2]**o + (0.923518071334)*x[2]
            ref[(0, 0, 2, 0)]+=-0.462590441569*x_ref[2]**o + (0.923518071334)*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.855380941761*x[2]**o + (-0.390548642302)*x[2]
            ref[(0, 0, 2, 1)]+=0.855380941761*x_ref[2]**o + (-0.390548642302)*x_ref[2]
            arg[(0, 0, 2, 2)]+=-0.849614876474*x[2]**o + (-0.824981317671)*x[2]
            ref[(0, 0, 2, 2)]+=-0.849614876474*x_ref[2]**o + (-0.824981317671)*x_ref[2]
            arg[(0, 0, 2, 3)]+=-0.858749786763*x[2]**o + (0.742661607035)*x[2]
            ref[(0, 0, 2, 3)]+=-0.858749786763*x_ref[2]**o + (0.742661607035)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.217180847834*x[2]**o + (0.281071244267)*x[2]
            ref[(0, 1, 0, 0)]+=-0.217180847834*x_ref[2]**o + (0.281071244267)*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.63578199268*x[2]**o + (0.310607536774)*x[2]
            ref[(0, 1, 0, 1)]+=0.63578199268*x_ref[2]**o + (0.310607536774)*x_ref[2]
            arg[(0, 1, 0, 2)]+=0.402322643583*x[2]**o + (0.731336330654)*x[2]
            ref[(0, 1, 0, 2)]+=0.402322643583*x_ref[2]**o + (0.731336330654)*x_ref[2]
            arg[(0, 1, 0, 3)]+=-0.0436784560438*x[2]**o + (-0.000943666305892)*x[2]
            ref[(0, 1, 0, 3)]+=-0.0436784560438*x_ref[2]**o + (-0.000943666305892)*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.648654410479*x[2]**o + (0.657402392482)*x[2]
            ref[(0, 1, 1, 0)]+=-0.648654410479*x_ref[2]**o + (0.657402392482)*x_ref[2]
            arg[(0, 1, 1, 1)]+=0.0327630654577*x[2]**o + (-0.419280167752)*x[2]
            ref[(0, 1, 1, 1)]+=0.0327630654577*x_ref[2]**o + (-0.419280167752)*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.0339898223166*x[2]**o + (-0.165829820371)*x[2]
            ref[(0, 1, 1, 2)]+=0.0339898223166*x_ref[2]**o + (-0.165829820371)*x_ref[2]
            arg[(0, 1, 1, 3)]+=-0.861956561444*x[2]**o + (0.574668229371)*x[2]
            ref[(0, 1, 1, 3)]+=-0.861956561444*x_ref[2]**o + (0.574668229371)*x_ref[2]
            arg[(0, 1, 2, 0)]+=0.157620832004*x[2]**o + (-0.944782902443)*x[2]
            ref[(0, 1, 2, 0)]+=0.157620832004*x_ref[2]**o + (-0.944782902443)*x_ref[2]
            arg[(0, 1, 2, 1)]+=0.280425903635*x[2]**o + (-0.6297928757)*x[2]
            ref[(0, 1, 2, 1)]+=0.280425903635*x_ref[2]**o + (-0.6297928757)*x_ref[2]
            arg[(0, 1, 2, 2)]+=-0.969788378135*x[2]**o + (-0.34477629725)*x[2]
            ref[(0, 1, 2, 2)]+=-0.969788378135*x_ref[2]**o + (-0.34477629725)*x_ref[2]
            arg[(0, 1, 2, 3)]+=0.41375842412*x[2]**o + (-0.100921051726)*x[2]
            ref[(0, 1, 2, 3)]+=0.41375842412*x_ref[2]**o + (-0.100921051726)*x_ref[2]
            arg[(0, 2, 0, 0)]+=0.0744845996355*x[2]**o + (0.34190914472)*x[2]
            ref[(0, 2, 0, 0)]+=0.0744845996355*x_ref[2]**o + (0.34190914472)*x_ref[2]
            arg[(0, 2, 0, 1)]+=0.0177087820895*x[2]**o + (0.621663890674)*x[2]
            ref[(0, 2, 0, 1)]+=0.0177087820895*x_ref[2]**o + (0.621663890674)*x_ref[2]
            arg[(0, 2, 0, 2)]+=0.751124366485*x[2]**o + (-0.622447448596)*x[2]
            ref[(0, 2, 0, 2)]+=0.751124366485*x_ref[2]**o + (-0.622447448596)*x_ref[2]
            arg[(0, 2, 0, 3)]+=-0.0505480411442*x[2]**o + (0.173376858712)*x[2]
            ref[(0, 2, 0, 3)]+=-0.0505480411442*x_ref[2]**o + (0.173376858712)*x_ref[2]
            arg[(0, 2, 1, 0)]+=-0.588623310972*x[2]**o + (-0.324829959899)*x[2]
            ref[(0, 2, 1, 0)]+=-0.588623310972*x_ref[2]**o + (-0.324829959899)*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.100369900237*x[2]**o + (0.107550027746)*x[2]
            ref[(0, 2, 1, 1)]+=-0.100369900237*x_ref[2]**o + (0.107550027746)*x_ref[2]
            arg[(0, 2, 1, 2)]+=0.404642117212*x[2]**o + (0.468498331374)*x[2]
            ref[(0, 2, 1, 2)]+=0.404642117212*x_ref[2]**o + (0.468498331374)*x_ref[2]
            arg[(0, 2, 1, 3)]+=0.327793128975*x[2]**o + (0.202590387121)*x[2]
            ref[(0, 2, 1, 3)]+=0.327793128975*x_ref[2]**o + (0.202590387121)*x_ref[2]
            arg[(0, 2, 2, 0)]+=0.699321905873*x[2]**o + (-0.0670780564917)*x[2]
            ref[(0, 2, 2, 0)]+=0.699321905873*x_ref[2]**o + (-0.0670780564917)*x_ref[2]
            arg[(0, 2, 2, 1)]+=0.132923690315*x[2]**o + (0.490982680132)*x[2]
            ref[(0, 2, 2, 1)]+=0.132923690315*x_ref[2]**o + (0.490982680132)*x_ref[2]
            arg[(0, 2, 2, 2)]+=-0.550367494126*x[2]**o + (-0.486053083108)*x[2]
            ref[(0, 2, 2, 2)]+=-0.550367494126*x_ref[2]**o + (-0.486053083108)*x_ref[2]
            arg[(0, 2, 2, 3)]+=0.231364250903*x[2]**o + (0.288360629001)*x[2]
            ref[(0, 2, 2, 3)]+=0.231364250903*x_ref[2]**o + (0.288360629001)*x_ref[2]
            arg[(0, 3, 0, 0)]+=-0.459922233967*x[2]**o + (-0.937763282544)*x[2]
            ref[(0, 3, 0, 0)]+=-0.459922233967*x_ref[2]**o + (-0.937763282544)*x_ref[2]
            arg[(0, 3, 0, 1)]+=-0.0675789497034*x[2]**o + (-0.929995279588)*x[2]
            ref[(0, 3, 0, 1)]+=-0.0675789497034*x_ref[2]**o + (-0.929995279588)*x_ref[2]
            arg[(0, 3, 0, 2)]+=-0.383681605513*x[2]**o + (0.600272592432)*x[2]
            ref[(0, 3, 0, 2)]+=-0.383681605513*x_ref[2]**o + (0.600272592432)*x_ref[2]
            arg[(0, 3, 0, 3)]+=-0.477424174929*x[2]**o + (0.994927155822)*x[2]
            ref[(0, 3, 0, 3)]+=-0.477424174929*x_ref[2]**o + (0.994927155822)*x_ref[2]
            arg[(0, 3, 1, 0)]+=0.290741442788*x[2]**o + (0.579936278777)*x[2]
            ref[(0, 3, 1, 0)]+=0.290741442788*x_ref[2]**o + (0.579936278777)*x_ref[2]
            arg[(0, 3, 1, 1)]+=0.60107240217*x[2]**o + (0.454757868685)*x[2]
            ref[(0, 3, 1, 1)]+=0.60107240217*x_ref[2]**o + (0.454757868685)*x_ref[2]
            arg[(0, 3, 1, 2)]+=0.484091463519*x[2]**o + (0.69254246703)*x[2]
            ref[(0, 3, 1, 2)]+=0.484091463519*x_ref[2]**o + (0.69254246703)*x_ref[2]
            arg[(0, 3, 1, 3)]+=0.604295287531*x[2]**o + (-0.0265742182727)*x[2]
            ref[(0, 3, 1, 3)]+=0.604295287531*x_ref[2]**o + (-0.0265742182727)*x_ref[2]
            arg[(0, 3, 2, 0)]+=-0.506585749817*x[2]**o + (0.758215451674)*x[2]
            ref[(0, 3, 2, 0)]+=-0.506585749817*x_ref[2]**o + (0.758215451674)*x_ref[2]
            arg[(0, 3, 2, 1)]+=0.451077839111*x[2]**o + (-0.799701412098)*x[2]
            ref[(0, 3, 2, 1)]+=0.451077839111*x_ref[2]**o + (-0.799701412098)*x_ref[2]
            arg[(0, 3, 2, 2)]+=0.197371057445*x[2]**o + (0.513010497912)*x[2]
            ref[(0, 3, 2, 2)]+=0.197371057445*x_ref[2]**o + (0.513010497912)*x_ref[2]
            arg[(0, 3, 2, 3)]+=0.369346176835*x[2]**o + (-0.399066524426)*x[2]
            ref[(0, 3, 2, 3)]+=0.369346176835*x_ref[2]**o + (-0.399066524426)*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.0531209121722*x[2]**o + (0.0259985787419)*x[2]
            ref[(1, 0, 0, 0)]+=-0.0531209121722*x_ref[2]**o + (0.0259985787419)*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.426095099023*x[2]**o + (0.0314520943547)*x[2]
            ref[(1, 0, 0, 1)]+=-0.426095099023*x_ref[2]**o + (0.0314520943547)*x_ref[2]
            arg[(1, 0, 0, 2)]+=0.827503704184*x[2]**o + (-0.775482411987)*x[2]
            ref[(1, 0, 0, 2)]+=0.827503704184*x_ref[2]**o + (-0.775482411987)*x_ref[2]
            arg[(1, 0, 0, 3)]+=0.896576325271*x[2]**o + (-0.716404085097)*x[2]
            ref[(1, 0, 0, 3)]+=0.896576325271*x_ref[2]**o + (-0.716404085097)*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.266134712825*x[2]**o + (0.405497975388)*x[2]
            ref[(1, 0, 1, 0)]+=0.266134712825*x_ref[2]**o + (0.405497975388)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.301192132481*x[2]**o + (-0.250019213108)*x[2]
            ref[(1, 0, 1, 1)]+=-0.301192132481*x_ref[2]**o + (-0.250019213108)*x_ref[2]
            arg[(1, 0, 1, 2)]+=-0.852671105076*x[2]**o + (-0.272235071228)*x[2]
            ref[(1, 0, 1, 2)]+=-0.852671105076*x_ref[2]**o + (-0.272235071228)*x_ref[2]
            arg[(1, 0, 1, 3)]+=0.900798022138*x[2]**o + (-0.873708201005)*x[2]
            ref[(1, 0, 1, 3)]+=0.900798022138*x_ref[2]**o + (-0.873708201005)*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.904919024905*x[2]**o + (0.570577113709)*x[2]
            ref[(1, 0, 2, 0)]+=-0.904919024905*x_ref[2]**o + (0.570577113709)*x_ref[2]
            arg[(1, 0, 2, 1)]+=-0.294444778663*x[2]**o + (-0.371908800729)*x[2]
            ref[(1, 0, 2, 1)]+=-0.294444778663*x_ref[2]**o + (-0.371908800729)*x_ref[2]
            arg[(1, 0, 2, 2)]+=0.709858230168*x[2]**o + (-0.000879003387753)*x[2]
            ref[(1, 0, 2, 2)]+=0.709858230168*x_ref[2]**o + (-0.000879003387753)*x_ref[2]
            arg[(1, 0, 2, 3)]+=0.50043318174*x[2]**o + (-0.0615157686946)*x[2]
            ref[(1, 0, 2, 3)]+=0.50043318174*x_ref[2]**o + (-0.0615157686946)*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.816400586204*x[2]**o + (-0.684381823366)*x[2]
            ref[(1, 1, 0, 0)]+=-0.816400586204*x_ref[2]**o + (-0.684381823366)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.936543539925*x[2]**o + (-0.365283110275)*x[2]
            ref[(1, 1, 0, 1)]+=0.936543539925*x_ref[2]**o + (-0.365283110275)*x_ref[2]
            arg[(1, 1, 0, 2)]+=-0.22308151847*x[2]**o + (-0.478413008575)*x[2]
            ref[(1, 1, 0, 2)]+=-0.22308151847*x_ref[2]**o + (-0.478413008575)*x_ref[2]
            arg[(1, 1, 0, 3)]+=-0.564729864177*x[2]**o + (0.61066095011)*x[2]
            ref[(1, 1, 0, 3)]+=-0.564729864177*x_ref[2]**o + (0.61066095011)*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.678485907147*x[2]**o + (-0.384449372934)*x[2]
            ref[(1, 1, 1, 0)]+=0.678485907147*x_ref[2]**o + (-0.384449372934)*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.263358394714*x[2]**o + (0.715356114743)*x[2]
            ref[(1, 1, 1, 1)]+=0.263358394714*x_ref[2]**o + (0.715356114743)*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.162724036635*x[2]**o + (0.48473608594)*x[2]
            ref[(1, 1, 1, 2)]+=-0.162724036635*x_ref[2]**o + (0.48473608594)*x_ref[2]
            arg[(1, 1, 1, 3)]+=-0.286414324158*x[2]**o + (0.656021467155)*x[2]
            ref[(1, 1, 1, 3)]+=-0.286414324158*x_ref[2]**o + (0.656021467155)*x_ref[2]
            arg[(1, 1, 2, 0)]+=0.137202658161*x[2]**o + (-0.197751345281)*x[2]
            ref[(1, 1, 2, 0)]+=0.137202658161*x_ref[2]**o + (-0.197751345281)*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.33129996608*x[2]**o + (-0.156494224963)*x[2]
            ref[(1, 1, 2, 1)]+=0.33129996608*x_ref[2]**o + (-0.156494224963)*x_ref[2]
            arg[(1, 1, 2, 2)]+=-0.438511037444*x[2]**o + (-0.298467665761)*x[2]
            ref[(1, 1, 2, 2)]+=-0.438511037444*x_ref[2]**o + (-0.298467665761)*x_ref[2]
            arg[(1, 1, 2, 3)]+=0.472568664271*x[2]**o + (0.749147860826)*x[2]
            ref[(1, 1, 2, 3)]+=0.472568664271*x_ref[2]**o + (0.749147860826)*x_ref[2]
            arg[(1, 2, 0, 0)]+=-0.300505530913*x[2]**o + (0.151119524552)*x[2]
            ref[(1, 2, 0, 0)]+=-0.300505530913*x_ref[2]**o + (0.151119524552)*x_ref[2]
            arg[(1, 2, 0, 1)]+=0.743311890618*x[2]**o + (-0.328152018591)*x[2]
            ref[(1, 2, 0, 1)]+=0.743311890618*x_ref[2]**o + (-0.328152018591)*x_ref[2]
            arg[(1, 2, 0, 2)]+=-0.82623971309*x[2]**o + (-0.111082476423)*x[2]
            ref[(1, 2, 0, 2)]+=-0.82623971309*x_ref[2]**o + (-0.111082476423)*x_ref[2]
            arg[(1, 2, 0, 3)]+=-0.00643836564691*x[2]**o + (0.981766258841)*x[2]
            ref[(1, 2, 0, 3)]+=-0.00643836564691*x_ref[2]**o + (0.981766258841)*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.319514627221*x[2]**o + (0.129531250916)*x[2]
            ref[(1, 2, 1, 0)]+=0.319514627221*x_ref[2]**o + (0.129531250916)*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.400553732056*x[2]**o + (0.350695698556)*x[2]
            ref[(1, 2, 1, 1)]+=0.400553732056*x_ref[2]**o + (0.350695698556)*x_ref[2]
            arg[(1, 2, 1, 2)]+=-0.668400207768*x[2]**o + (0.471787691842)*x[2]
            ref[(1, 2, 1, 2)]+=-0.668400207768*x_ref[2]**o + (0.471787691842)*x_ref[2]
            arg[(1, 2, 1, 3)]+=-0.761677259879*x[2]**o + (-0.535313407894)*x[2]
            ref[(1, 2, 1, 3)]+=-0.761677259879*x_ref[2]**o + (-0.535313407894)*x_ref[2]
            arg[(1, 2, 2, 0)]+=-0.290225894814*x[2]**o + (-0.935453645084)*x[2]
            ref[(1, 2, 2, 0)]+=-0.290225894814*x_ref[2]**o + (-0.935453645084)*x_ref[2]
            arg[(1, 2, 2, 1)]+=-0.489275999174*x[2]**o + (0.939484488486)*x[2]
            ref[(1, 2, 2, 1)]+=-0.489275999174*x_ref[2]**o + (0.939484488486)*x_ref[2]
            arg[(1, 2, 2, 2)]+=-0.921978823453*x[2]**o + (-0.469984151583)*x[2]
            ref[(1, 2, 2, 2)]+=-0.921978823453*x_ref[2]**o + (-0.469984151583)*x_ref[2]
            arg[(1, 2, 2, 3)]+=-0.854861639309*x[2]**o + (0.807319033826)*x[2]
            ref[(1, 2, 2, 3)]+=-0.854861639309*x_ref[2]**o + (0.807319033826)*x_ref[2]
            arg[(1, 3, 0, 0)]+=0.467457253818*x[2]**o + (-0.227799446636)*x[2]
            ref[(1, 3, 0, 0)]+=0.467457253818*x_ref[2]**o + (-0.227799446636)*x_ref[2]
            arg[(1, 3, 0, 1)]+=8.61535367083e-05*x[2]**o + (0.842818611362)*x[2]
            ref[(1, 3, 0, 1)]+=8.61535367083e-05*x_ref[2]**o + (0.842818611362)*x_ref[2]
            arg[(1, 3, 0, 2)]+=-0.165352486455*x[2]**o + (-0.050160112814)*x[2]
            ref[(1, 3, 0, 2)]+=-0.165352486455*x_ref[2]**o + (-0.050160112814)*x_ref[2]
            arg[(1, 3, 0, 3)]+=-0.466044038713*x[2]**o + (-0.610280020572)*x[2]
            ref[(1, 3, 0, 3)]+=-0.466044038713*x_ref[2]**o + (-0.610280020572)*x_ref[2]
            arg[(1, 3, 1, 0)]+=0.509869697606*x[2]**o + (0.976705042568)*x[2]
            ref[(1, 3, 1, 0)]+=0.509869697606*x_ref[2]**o + (0.976705042568)*x_ref[2]
            arg[(1, 3, 1, 1)]+=-0.578747225836*x[2]**o + (-0.94754390409)*x[2]
            ref[(1, 3, 1, 1)]+=-0.578747225836*x_ref[2]**o + (-0.94754390409)*x_ref[2]
            arg[(1, 3, 1, 2)]+=0.474278638042*x[2]**o + (-0.577871770949)*x[2]
            ref[(1, 3, 1, 2)]+=0.474278638042*x_ref[2]**o + (-0.577871770949)*x_ref[2]
            arg[(1, 3, 1, 3)]+=-0.105614229739*x[2]**o + (-0.468603662375)*x[2]
            ref[(1, 3, 1, 3)]+=-0.105614229739*x_ref[2]**o + (-0.468603662375)*x_ref[2]
            arg[(1, 3, 2, 0)]+=-0.0222582934397*x[2]**o + (0.304516209425)*x[2]
            ref[(1, 3, 2, 0)]+=-0.0222582934397*x_ref[2]**o + (0.304516209425)*x_ref[2]
            arg[(1, 3, 2, 1)]+=0.0162122610948*x[2]**o + (0.961333740632)*x[2]
            ref[(1, 3, 2, 1)]+=0.0162122610948*x_ref[2]**o + (0.961333740632)*x_ref[2]
            arg[(1, 3, 2, 2)]+=0.469474044934*x[2]**o + (0.820223597963)*x[2]
            ref[(1, 3, 2, 2)]+=0.469474044934*x_ref[2]**o + (0.820223597963)*x_ref[2]
            arg[(1, 3, 2, 3)]+=0.93617766601*x[2]**o + (0.210964749571)*x[2]
            ref[(1, 3, 2, 3)]+=0.93617766601*x_ref[2]**o + (0.210964749571)*x_ref[2]
            arg[(2, 0, 0, 0)]+=0.332307085614*x[2]**o + (0.0520705164959)*x[2]
            ref[(2, 0, 0, 0)]+=0.332307085614*x_ref[2]**o + (0.0520705164959)*x_ref[2]
            arg[(2, 0, 0, 1)]+=0.345084396982*x[2]**o + (-0.775371178661)*x[2]
            ref[(2, 0, 0, 1)]+=0.345084396982*x_ref[2]**o + (-0.775371178661)*x_ref[2]
            arg[(2, 0, 0, 2)]+=0.0797871328394*x[2]**o + (0.71123053651)*x[2]
            ref[(2, 0, 0, 2)]+=0.0797871328394*x_ref[2]**o + (0.71123053651)*x_ref[2]
            arg[(2, 0, 0, 3)]+=-0.186448855321*x[2]**o + (-0.745930275273)*x[2]
            ref[(2, 0, 0, 3)]+=-0.186448855321*x_ref[2]**o + (-0.745930275273)*x_ref[2]
            arg[(2, 0, 1, 0)]+=0.566951648163*x[2]**o + (-0.463359865682)*x[2]
            ref[(2, 0, 1, 0)]+=0.566951648163*x_ref[2]**o + (-0.463359865682)*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.149874714731*x[2]**o + (0.0744262340799)*x[2]
            ref[(2, 0, 1, 1)]+=0.149874714731*x_ref[2]**o + (0.0744262340799)*x_ref[2]
            arg[(2, 0, 1, 2)]+=-0.531322976558*x[2]**o + (-0.0614333822618)*x[2]
            ref[(2, 0, 1, 2)]+=-0.531322976558*x_ref[2]**o + (-0.0614333822618)*x_ref[2]
            arg[(2, 0, 1, 3)]+=0.98193453058*x[2]**o + (-0.642658623725)*x[2]
            ref[(2, 0, 1, 3)]+=0.98193453058*x_ref[2]**o + (-0.642658623725)*x_ref[2]
            arg[(2, 0, 2, 0)]+=-0.773617178598*x[2]**o + (-0.0904965988773)*x[2]
            ref[(2, 0, 2, 0)]+=-0.773617178598*x_ref[2]**o + (-0.0904965988773)*x_ref[2]
            arg[(2, 0, 2, 1)]+=0.899332968997*x[2]**o + (0.91779480401)*x[2]
            ref[(2, 0, 2, 1)]+=0.899332968997*x_ref[2]**o + (0.91779480401)*x_ref[2]
            arg[(2, 0, 2, 2)]+=-0.558998325521*x[2]**o + (-0.539207579578)*x[2]
            ref[(2, 0, 2, 2)]+=-0.558998325521*x_ref[2]**o + (-0.539207579578)*x_ref[2]
            arg[(2, 0, 2, 3)]+=-0.0589024205917*x[2]**o + (-0.0513701899822)*x[2]
            ref[(2, 0, 2, 3)]+=-0.0589024205917*x_ref[2]**o + (-0.0513701899822)*x_ref[2]
            arg[(2, 1, 0, 0)]+=-0.121113322741*x[2]**o + (-0.301898881904)*x[2]
            ref[(2, 1, 0, 0)]+=-0.121113322741*x_ref[2]**o + (-0.301898881904)*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.556209424015*x[2]**o + (0.789687150757)*x[2]
            ref[(2, 1, 0, 1)]+=-0.556209424015*x_ref[2]**o + (0.789687150757)*x_ref[2]
            arg[(2, 1, 0, 2)]+=0.988539091467*x[2]**o + (-0.861229268817)*x[2]
            ref[(2, 1, 0, 2)]+=0.988539091467*x_ref[2]**o + (-0.861229268817)*x_ref[2]
            arg[(2, 1, 0, 3)]+=-0.589183066307*x[2]**o + (0.136219259691)*x[2]
            ref[(2, 1, 0, 3)]+=-0.589183066307*x_ref[2]**o + (0.136219259691)*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.535624097401*x[2]**o + (0.126250618157)*x[2]
            ref[(2, 1, 1, 0)]+=0.535624097401*x_ref[2]**o + (0.126250618157)*x_ref[2]
            arg[(2, 1, 1, 1)]+=-0.085701991919*x[2]**o + (0.84278366995)*x[2]
            ref[(2, 1, 1, 1)]+=-0.085701991919*x_ref[2]**o + (0.84278366995)*x_ref[2]
            arg[(2, 1, 1, 2)]+=0.380821673595*x[2]**o + (0.0660225858107)*x[2]
            ref[(2, 1, 1, 2)]+=0.380821673595*x_ref[2]**o + (0.0660225858107)*x_ref[2]
            arg[(2, 1, 1, 3)]+=-0.797601566093*x[2]**o + (0.221100803903)*x[2]
            ref[(2, 1, 1, 3)]+=-0.797601566093*x_ref[2]**o + (0.221100803903)*x_ref[2]
            arg[(2, 1, 2, 0)]+=-0.331029506851*x[2]**o + (-0.554472033433)*x[2]
            ref[(2, 1, 2, 0)]+=-0.331029506851*x_ref[2]**o + (-0.554472033433)*x_ref[2]
            arg[(2, 1, 2, 1)]+=-0.551475664753*x[2]**o + (0.705660388742)*x[2]
            ref[(2, 1, 2, 1)]+=-0.551475664753*x_ref[2]**o + (0.705660388742)*x_ref[2]
            arg[(2, 1, 2, 2)]+=0.958392045847*x[2]**o + (-0.725198771712)*x[2]
            ref[(2, 1, 2, 2)]+=0.958392045847*x_ref[2]**o + (-0.725198771712)*x_ref[2]
            arg[(2, 1, 2, 3)]+=0.160468072974*x[2]**o + (0.254998180336)*x[2]
            ref[(2, 1, 2, 3)]+=0.160468072974*x_ref[2]**o + (0.254998180336)*x_ref[2]
            arg[(2, 2, 0, 0)]+=0.983311586773*x[2]**o + (-0.399751809476)*x[2]
            ref[(2, 2, 0, 0)]+=0.983311586773*x_ref[2]**o + (-0.399751809476)*x_ref[2]
            arg[(2, 2, 0, 1)]+=0.662402897088*x[2]**o + (-0.997278135133)*x[2]
            ref[(2, 2, 0, 1)]+=0.662402897088*x_ref[2]**o + (-0.997278135133)*x_ref[2]
            arg[(2, 2, 0, 2)]+=-0.415385342063*x[2]**o + (0.810101312504)*x[2]
            ref[(2, 2, 0, 2)]+=-0.415385342063*x_ref[2]**o + (0.810101312504)*x_ref[2]
            arg[(2, 2, 0, 3)]+=-0.109614425147*x[2]**o + (0.570694870768)*x[2]
            ref[(2, 2, 0, 3)]+=-0.109614425147*x_ref[2]**o + (0.570694870768)*x_ref[2]
            arg[(2, 2, 1, 0)]+=-0.37966339952*x[2]**o + (0.136719817533)*x[2]
            ref[(2, 2, 1, 0)]+=-0.37966339952*x_ref[2]**o + (0.136719817533)*x_ref[2]
            arg[(2, 2, 1, 1)]+=0.987080884465*x[2]**o + (-0.237789625468)*x[2]
            ref[(2, 2, 1, 1)]+=0.987080884465*x_ref[2]**o + (-0.237789625468)*x_ref[2]
            arg[(2, 2, 1, 2)]+=0.860971503146*x[2]**o + (0.475363973774)*x[2]
            ref[(2, 2, 1, 2)]+=0.860971503146*x_ref[2]**o + (0.475363973774)*x_ref[2]
            arg[(2, 2, 1, 3)]+=0.7051387109*x[2]**o + (-0.971976848039)*x[2]
            ref[(2, 2, 1, 3)]+=0.7051387109*x_ref[2]**o + (-0.971976848039)*x_ref[2]
            arg[(2, 2, 2, 0)]+=-0.20895268572*x[2]**o + (0.635929357318)*x[2]
            ref[(2, 2, 2, 0)]+=-0.20895268572*x_ref[2]**o + (0.635929357318)*x_ref[2]
            arg[(2, 2, 2, 1)]+=-0.0463968812778*x[2]**o + (0.631242659714)*x[2]
            ref[(2, 2, 2, 1)]+=-0.0463968812778*x_ref[2]**o + (0.631242659714)*x_ref[2]
            arg[(2, 2, 2, 2)]+=0.090311841314*x[2]**o + (-0.0894264179748)*x[2]
            ref[(2, 2, 2, 2)]+=0.090311841314*x_ref[2]**o + (-0.0894264179748)*x_ref[2]
            arg[(2, 2, 2, 3)]+=-0.515134295559*x[2]**o + (0.664708562749)*x[2]
            ref[(2, 2, 2, 3)]+=-0.515134295559*x_ref[2]**o + (0.664708562749)*x_ref[2]
            arg[(2, 3, 0, 0)]+=0.909879499225*x[2]**o + (-0.211736633023)*x[2]
            ref[(2, 3, 0, 0)]+=0.909879499225*x_ref[2]**o + (-0.211736633023)*x_ref[2]
            arg[(2, 3, 0, 1)]+=-0.13021718766*x[2]**o + (0.416355185213)*x[2]
            ref[(2, 3, 0, 1)]+=-0.13021718766*x_ref[2]**o + (0.416355185213)*x_ref[2]
            arg[(2, 3, 0, 2)]+=-0.914319628015*x[2]**o + (0.473866114694)*x[2]
            ref[(2, 3, 0, 2)]+=-0.914319628015*x_ref[2]**o + (0.473866114694)*x_ref[2]
            arg[(2, 3, 0, 3)]+=-0.00221313188104*x[2]**o + (-0.467106021623)*x[2]
            ref[(2, 3, 0, 3)]+=-0.00221313188104*x_ref[2]**o + (-0.467106021623)*x_ref[2]
            arg[(2, 3, 1, 0)]+=-0.0993620331845*x[2]**o + (0.86000766438)*x[2]
            ref[(2, 3, 1, 0)]+=-0.0993620331845*x_ref[2]**o + (0.86000766438)*x_ref[2]
            arg[(2, 3, 1, 1)]+=0.0361594927962*x[2]**o + (0.920366295565)*x[2]
            ref[(2, 3, 1, 1)]+=0.0361594927962*x_ref[2]**o + (0.920366295565)*x_ref[2]
            arg[(2, 3, 1, 2)]+=0.973544583379*x[2]**o + (0.607035363994)*x[2]
            ref[(2, 3, 1, 2)]+=0.973544583379*x_ref[2]**o + (0.607035363994)*x_ref[2]
            arg[(2, 3, 1, 3)]+=0.194651019922*x[2]**o + (-0.149277956601)*x[2]
            ref[(2, 3, 1, 3)]+=0.194651019922*x_ref[2]**o + (-0.149277956601)*x_ref[2]
            arg[(2, 3, 2, 0)]+=-0.85811589599*x[2]**o + (-0.232023862652)*x[2]
            ref[(2, 3, 2, 0)]+=-0.85811589599*x_ref[2]**o + (-0.232023862652)*x_ref[2]
            arg[(2, 3, 2, 1)]+=0.616759369173*x[2]**o + (-0.940382166141)*x[2]
            ref[(2, 3, 2, 1)]+=0.616759369173*x_ref[2]**o + (-0.940382166141)*x_ref[2]
            arg[(2, 3, 2, 2)]+=-0.285605893538*x[2]**o + (0.772341565477)*x[2]
            ref[(2, 3, 2, 2)]+=-0.285605893538*x_ref[2]**o + (0.772341565477)*x_ref[2]
            arg[(2, 3, 2, 3)]+=-0.901893677767*x[2]**o + (-0.780239802944)*x[2]
            ref[(2, 3, 2, 3)]+=-0.901893677767*x_ref[2]**o + (-0.780239802944)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.508646694177*x[0] + (0.131112154643)*x[1]
        ref=-0.508646694177*x_ref[0] + (0.131112154643)*x_ref[1]
        if dim==3:
            arg+=(-0.940911842324)*x[2]
            ref+=(-0.940911842324)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=-0.824958399075*x[0] + (-0.0396141832597)*x[1]
        ref[(0,)]=-0.824958399075*x_ref[0] + (-0.0396141832597)*x_ref[1]
        arg[(1,)]=-0.541702819266*x[0] + (0.502725365166)*x[1]
        ref[(1,)]=-0.541702819266*x_ref[0] + (0.502725365166)*x_ref[1]
        arg[(2,)]=0.238231617151*x[0] + (-0.905645151193)*x[1]
        ref[(2,)]=0.238231617151*x_ref[0] + (-0.905645151193)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.0955263326799*x[2]
            ref[(0,)]+=0.0955263326799*x_ref[2]
            arg[(1,)]+=-0.511301873333*x[2]
            ref[(1,)]+=-0.511301873333*x_ref[2]
            arg[(2,)]+=0.896993050102*x[2]
            ref[(2,)]+=0.896993050102*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref = Data(0,(2, 4),w_ref)
        arg[(0, 0)]=0.578014262672*x[0] + (0.738188943595)*x[1]
        ref[(0, 0)]=0.578014262672*x_ref[0] + (0.738188943595)*x_ref[1]
        arg[(0, 1)]=0.128610685062*x[0] + (0.92155688086)*x[1]
        ref[(0, 1)]=0.128610685062*x_ref[0] + (0.92155688086)*x_ref[1]
        arg[(0, 2)]=0.618555855973*x[0] + (0.430481164325)*x[1]
        ref[(0, 2)]=0.618555855973*x_ref[0] + (0.430481164325)*x_ref[1]
        arg[(0, 3)]=0.375400196714*x[0] + (0.568253023178)*x[1]
        ref[(0, 3)]=0.375400196714*x_ref[0] + (0.568253023178)*x_ref[1]
        arg[(1, 0)]=0.250724356529*x[0] + (-0.647787929701)*x[1]
        ref[(1, 0)]=0.250724356529*x_ref[0] + (-0.647787929701)*x_ref[1]
        arg[(1, 1)]=0.750271623989*x[0] + (-0.149021708666)*x[1]
        ref[(1, 1)]=0.750271623989*x_ref[0] + (-0.149021708666)*x_ref[1]
        arg[(1, 2)]=-0.460473520436*x[0] + (0.915762619505)*x[1]
        ref[(1, 2)]=-0.460473520436*x_ref[0] + (0.915762619505)*x_ref[1]
        arg[(1, 3)]=0.816374377488*x[0] + (-0.30002352127)*x[1]
        ref[(1, 3)]=0.816374377488*x_ref[0] + (-0.30002352127)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.429434515186*x[2]
            ref[(0, 0)]+=0.429434515186*x_ref[2]
            arg[(0, 1)]+=-0.368921519724*x[2]
            ref[(0, 1)]+=-0.368921519724*x_ref[2]
            arg[(0, 2)]+=-0.0292326941023*x[2]
            ref[(0, 2)]+=-0.0292326941023*x_ref[2]
            arg[(0, 3)]+=-0.349041240059*x[2]
            ref[(0, 3)]+=-0.349041240059*x_ref[2]
            arg[(1, 0)]+=-0.845122350923*x[2]
            ref[(1, 0)]+=-0.845122350923*x_ref[2]
            arg[(1, 1)]+=-0.889904757677*x[2]
            ref[(1, 1)]+=-0.889904757677*x_ref[2]
            arg[(1, 2)]+=0.406759524055*x[2]
            ref[(1, 2)]+=0.406759524055*x_ref[2]
            arg[(1, 3)]+=0.897913408972*x[2]
            ref[(1, 3)]+=0.897913408972*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 3),w)
        ref = Data(0,(3, 3, 3),w_ref)
        arg[(0, 0, 0)]=0.611254659758*x[0] + (0.775732272207)*x[1]
        ref[(0, 0, 0)]=0.611254659758*x_ref[0] + (0.775732272207)*x_ref[1]
        arg[(0, 0, 1)]=0.573713655604*x[0] + (0.373108144619)*x[1]
        ref[(0, 0, 1)]=0.573713655604*x_ref[0] + (0.373108144619)*x_ref[1]
        arg[(0, 0, 2)]=0.502661044093*x[0] + (0.768473575496)*x[1]
        ref[(0, 0, 2)]=0.502661044093*x_ref[0] + (0.768473575496)*x_ref[1]
        arg[(0, 1, 0)]=-0.587005071819*x[0] + (-0.183576441241)*x[1]
        ref[(0, 1, 0)]=-0.587005071819*x_ref[0] + (-0.183576441241)*x_ref[1]
        arg[(0, 1, 1)]=-0.647266162975*x[0] + (-0.402913370476)*x[1]
        ref[(0, 1, 1)]=-0.647266162975*x_ref[0] + (-0.402913370476)*x_ref[1]
        arg[(0, 1, 2)]=0.690784806087*x[0] + (0.260665354293)*x[1]
        ref[(0, 1, 2)]=0.690784806087*x_ref[0] + (0.260665354293)*x_ref[1]
        arg[(0, 2, 0)]=0.55308974928*x[0] + (0.391899224244)*x[1]
        ref[(0, 2, 0)]=0.55308974928*x_ref[0] + (0.391899224244)*x_ref[1]
        arg[(0, 2, 1)]=-0.647344391194*x[0] + (0.871078979493)*x[1]
        ref[(0, 2, 1)]=-0.647344391194*x_ref[0] + (0.871078979493)*x_ref[1]
        arg[(0, 2, 2)]=0.0386775864918*x[0] + (0.45058682331)*x[1]
        ref[(0, 2, 2)]=0.0386775864918*x_ref[0] + (0.45058682331)*x_ref[1]
        arg[(1, 0, 0)]=0.168239570009*x[0] + (0.804997256117)*x[1]
        ref[(1, 0, 0)]=0.168239570009*x_ref[0] + (0.804997256117)*x_ref[1]
        arg[(1, 0, 1)]=-0.684453232825*x[0] + (-0.144531183501)*x[1]
        ref[(1, 0, 1)]=-0.684453232825*x_ref[0] + (-0.144531183501)*x_ref[1]
        arg[(1, 0, 2)]=0.190226938363*x[0] + (-0.165096569131)*x[1]
        ref[(1, 0, 2)]=0.190226938363*x_ref[0] + (-0.165096569131)*x_ref[1]
        arg[(1, 1, 0)]=0.492929673301*x[0] + (-0.450986085472)*x[1]
        ref[(1, 1, 0)]=0.492929673301*x_ref[0] + (-0.450986085472)*x_ref[1]
        arg[(1, 1, 1)]=0.622507438324*x[0] + (-0.900418526655)*x[1]
        ref[(1, 1, 1)]=0.622507438324*x_ref[0] + (-0.900418526655)*x_ref[1]
        arg[(1, 1, 2)]=-0.452176788299*x[0] + (0.867505945764)*x[1]
        ref[(1, 1, 2)]=-0.452176788299*x_ref[0] + (0.867505945764)*x_ref[1]
        arg[(1, 2, 0)]=-0.829757235151*x[0] + (-0.852700458407)*x[1]
        ref[(1, 2, 0)]=-0.829757235151*x_ref[0] + (-0.852700458407)*x_ref[1]
        arg[(1, 2, 1)]=-0.352572374212*x[0] + (0.230637129038)*x[1]
        ref[(1, 2, 1)]=-0.352572374212*x_ref[0] + (0.230637129038)*x_ref[1]
        arg[(1, 2, 2)]=-0.640158540555*x[0] + (0.2674217652)*x[1]
        ref[(1, 2, 2)]=-0.640158540555*x_ref[0] + (0.2674217652)*x_ref[1]
        arg[(2, 0, 0)]=-0.319421208875*x[0] + (0.237485397431)*x[1]
        ref[(2, 0, 0)]=-0.319421208875*x_ref[0] + (0.237485397431)*x_ref[1]
        arg[(2, 0, 1)]=0.0532707363573*x[0] + (-0.866790111289)*x[1]
        ref[(2, 0, 1)]=0.0532707363573*x_ref[0] + (-0.866790111289)*x_ref[1]
        arg[(2, 0, 2)]=0.707677831892*x[0] + (-0.793328101896)*x[1]
        ref[(2, 0, 2)]=0.707677831892*x_ref[0] + (-0.793328101896)*x_ref[1]
        arg[(2, 1, 0)]=0.490204992055*x[0] + (-0.431451724988)*x[1]
        ref[(2, 1, 0)]=0.490204992055*x_ref[0] + (-0.431451724988)*x_ref[1]
        arg[(2, 1, 1)]=-0.759940770099*x[0] + (-0.381741355473)*x[1]
        ref[(2, 1, 1)]=-0.759940770099*x_ref[0] + (-0.381741355473)*x_ref[1]
        arg[(2, 1, 2)]=0.53914332232*x[0] + (-0.805961968819)*x[1]
        ref[(2, 1, 2)]=0.53914332232*x_ref[0] + (-0.805961968819)*x_ref[1]
        arg[(2, 2, 0)]=-0.226940291294*x[0] + (-0.0291096305013)*x[1]
        ref[(2, 2, 0)]=-0.226940291294*x_ref[0] + (-0.0291096305013)*x_ref[1]
        arg[(2, 2, 1)]=-0.793695022137*x[0] + (-0.901526005403)*x[1]
        ref[(2, 2, 1)]=-0.793695022137*x_ref[0] + (-0.901526005403)*x_ref[1]
        arg[(2, 2, 2)]=0.182167032526*x[0] + (-0.0043779840736)*x[1]
        ref[(2, 2, 2)]=0.182167032526*x_ref[0] + (-0.0043779840736)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.549900327604*x[2]
            ref[(0, 0, 0)]+=0.549900327604*x_ref[2]
            arg[(0, 0, 1)]+=0.851573839441*x[2]
            ref[(0, 0, 1)]+=0.851573839441*x_ref[2]
            arg[(0, 0, 2)]+=-0.428441469558*x[2]
            ref[(0, 0, 2)]+=-0.428441469558*x_ref[2]
            arg[(0, 1, 0)]+=-0.128443988894*x[2]
            ref[(0, 1, 0)]+=-0.128443988894*x_ref[2]
            arg[(0, 1, 1)]+=0.687728269735*x[2]
            ref[(0, 1, 1)]+=0.687728269735*x_ref[2]
            arg[(0, 1, 2)]+=0.701198050099*x[2]
            ref[(0, 1, 2)]+=0.701198050099*x_ref[2]
            arg[(0, 2, 0)]+=0.835501622955*x[2]
            ref[(0, 2, 0)]+=0.835501622955*x_ref[2]
            arg[(0, 2, 1)]+=0.648596972988*x[2]
            ref[(0, 2, 1)]+=0.648596972988*x_ref[2]
            arg[(0, 2, 2)]+=0.873977676277*x[2]
            ref[(0, 2, 2)]+=0.873977676277*x_ref[2]
            arg[(1, 0, 0)]+=0.711192402021*x[2]
            ref[(1, 0, 0)]+=0.711192402021*x_ref[2]
            arg[(1, 0, 1)]+=0.812503133633*x[2]
            ref[(1, 0, 1)]+=0.812503133633*x_ref[2]
            arg[(1, 0, 2)]+=-0.655978868317*x[2]
            ref[(1, 0, 2)]+=-0.655978868317*x_ref[2]
            arg[(1, 1, 0)]+=0.844997378601*x[2]
            ref[(1, 1, 0)]+=0.844997378601*x_ref[2]
            arg[(1, 1, 1)]+=0.966825602933*x[2]
            ref[(1, 1, 1)]+=0.966825602933*x_ref[2]
            arg[(1, 1, 2)]+=0.0222973978547*x[2]
            ref[(1, 1, 2)]+=0.0222973978547*x_ref[2]
            arg[(1, 2, 0)]+=0.337617122481*x[2]
            ref[(1, 2, 0)]+=0.337617122481*x_ref[2]
            arg[(1, 2, 1)]+=-0.758099294651*x[2]
            ref[(1, 2, 1)]+=-0.758099294651*x_ref[2]
            arg[(1, 2, 2)]+=-0.490701810352*x[2]
            ref[(1, 2, 2)]+=-0.490701810352*x_ref[2]
            arg[(2, 0, 0)]+=-0.994961531637*x[2]
            ref[(2, 0, 0)]+=-0.994961531637*x_ref[2]
            arg[(2, 0, 1)]+=-0.157006730921*x[2]
            ref[(2, 0, 1)]+=-0.157006730921*x_ref[2]
            arg[(2, 0, 2)]+=0.283925272237*x[2]
            ref[(2, 0, 2)]+=0.283925272237*x_ref[2]
            arg[(2, 1, 0)]+=-0.851716566442*x[2]
            ref[(2, 1, 0)]+=-0.851716566442*x_ref[2]
            arg[(2, 1, 1)]+=0.773162432465*x[2]
            ref[(2, 1, 1)]+=0.773162432465*x_ref[2]
            arg[(2, 1, 2)]+=0.462627181769*x[2]
            ref[(2, 1, 2)]+=0.462627181769*x_ref[2]
            arg[(2, 2, 0)]+=0.30499552396*x[2]
            ref[(2, 2, 0)]+=0.30499552396*x_ref[2]
            arg[(2, 2, 1)]+=-0.778512875683*x[2]
            ref[(2, 2, 1)]+=-0.778512875683*x_ref[2]
            arg[(2, 2, 2)]+=0.365629140347*x[2]
            ref[(2, 2, 2)]+=0.365629140347*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 2, 4),w)
        ref = Data(0,(3, 3, 2, 4),w_ref)
        arg[(0, 0, 0, 0)]=-0.412329884514*x[0] + (-0.0160734125314)*x[1]
        ref[(0, 0, 0, 0)]=-0.412329884514*x_ref[0] + (-0.0160734125314)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.0723829298737*x[0] + (0.334349753968)*x[1]
        ref[(0, 0, 0, 1)]=0.0723829298737*x_ref[0] + (0.334349753968)*x_ref[1]
        arg[(0, 0, 0, 2)]=-0.11046633963*x[0] + (-0.452745790587)*x[1]
        ref[(0, 0, 0, 2)]=-0.11046633963*x_ref[0] + (-0.452745790587)*x_ref[1]
        arg[(0, 0, 0, 3)]=0.434348404283*x[0] + (0.634047195632)*x[1]
        ref[(0, 0, 0, 3)]=0.434348404283*x_ref[0] + (0.634047195632)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.0328390907919*x[0] + (-0.904427431882)*x[1]
        ref[(0, 0, 1, 0)]=-0.0328390907919*x_ref[0] + (-0.904427431882)*x_ref[1]
        arg[(0, 0, 1, 1)]=-0.71115836696*x[0] + (0.458218178159)*x[1]
        ref[(0, 0, 1, 1)]=-0.71115836696*x_ref[0] + (0.458218178159)*x_ref[1]
        arg[(0, 0, 1, 2)]=-0.0384094231624*x[0] + (0.129507559585)*x[1]
        ref[(0, 0, 1, 2)]=-0.0384094231624*x_ref[0] + (0.129507559585)*x_ref[1]
        arg[(0, 0, 1, 3)]=-0.141642675617*x[0] + (0.600182940894)*x[1]
        ref[(0, 0, 1, 3)]=-0.141642675617*x_ref[0] + (0.600182940894)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.660152585314*x[0] + (0.0429197284267)*x[1]
        ref[(0, 1, 0, 0)]=0.660152585314*x_ref[0] + (0.0429197284267)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.181219751947*x[0] + (-0.158736095047)*x[1]
        ref[(0, 1, 0, 1)]=0.181219751947*x_ref[0] + (-0.158736095047)*x_ref[1]
        arg[(0, 1, 0, 2)]=-0.274007312483*x[0] + (0.649957457731)*x[1]
        ref[(0, 1, 0, 2)]=-0.274007312483*x_ref[0] + (0.649957457731)*x_ref[1]
        arg[(0, 1, 0, 3)]=-0.0817690488347*x[0] + (-0.925106215986)*x[1]
        ref[(0, 1, 0, 3)]=-0.0817690488347*x_ref[0] + (-0.925106215986)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.333190755555*x[0] + (0.116897399512)*x[1]
        ref[(0, 1, 1, 0)]=-0.333190755555*x_ref[0] + (0.116897399512)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.858128850868*x[0] + (0.870354188161)*x[1]
        ref[(0, 1, 1, 1)]=0.858128850868*x_ref[0] + (0.870354188161)*x_ref[1]
        arg[(0, 1, 1, 2)]=-0.178745387311*x[0] + (0.300288364468)*x[1]
        ref[(0, 1, 1, 2)]=-0.178745387311*x_ref[0] + (0.300288364468)*x_ref[1]
        arg[(0, 1, 1, 3)]=0.652206213901*x[0] + (-0.779045384572)*x[1]
        ref[(0, 1, 1, 3)]=0.652206213901*x_ref[0] + (-0.779045384572)*x_ref[1]
        arg[(0, 2, 0, 0)]=0.880797348229*x[0] + (0.374461024507)*x[1]
        ref[(0, 2, 0, 0)]=0.880797348229*x_ref[0] + (0.374461024507)*x_ref[1]
        arg[(0, 2, 0, 1)]=-0.156084366633*x[0] + (-0.864864451886)*x[1]
        ref[(0, 2, 0, 1)]=-0.156084366633*x_ref[0] + (-0.864864451886)*x_ref[1]
        arg[(0, 2, 0, 2)]=0.16052482381*x[0] + (-0.421677513981)*x[1]
        ref[(0, 2, 0, 2)]=0.16052482381*x_ref[0] + (-0.421677513981)*x_ref[1]
        arg[(0, 2, 0, 3)]=-0.378040778596*x[0] + (0.635162660178)*x[1]
        ref[(0, 2, 0, 3)]=-0.378040778596*x_ref[0] + (0.635162660178)*x_ref[1]
        arg[(0, 2, 1, 0)]=-0.6088300387*x[0] + (-0.382792558365)*x[1]
        ref[(0, 2, 1, 0)]=-0.6088300387*x_ref[0] + (-0.382792558365)*x_ref[1]
        arg[(0, 2, 1, 1)]=-0.677327095704*x[0] + (-0.244586104541)*x[1]
        ref[(0, 2, 1, 1)]=-0.677327095704*x_ref[0] + (-0.244586104541)*x_ref[1]
        arg[(0, 2, 1, 2)]=-0.784790192818*x[0] + (0.788924449064)*x[1]
        ref[(0, 2, 1, 2)]=-0.784790192818*x_ref[0] + (0.788924449064)*x_ref[1]
        arg[(0, 2, 1, 3)]=0.0460815522969*x[0] + (-0.614607258437)*x[1]
        ref[(0, 2, 1, 3)]=0.0460815522969*x_ref[0] + (-0.614607258437)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.18589738331*x[0] + (0.556490249693)*x[1]
        ref[(1, 0, 0, 0)]=-0.18589738331*x_ref[0] + (0.556490249693)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.750342920504*x[0] + (-0.580694041193)*x[1]
        ref[(1, 0, 0, 1)]=0.750342920504*x_ref[0] + (-0.580694041193)*x_ref[1]
        arg[(1, 0, 0, 2)]=0.859906706919*x[0] + (0.950916423076)*x[1]
        ref[(1, 0, 0, 2)]=0.859906706919*x_ref[0] + (0.950916423076)*x_ref[1]
        arg[(1, 0, 0, 3)]=-0.198666870398*x[0] + (0.25036208037)*x[1]
        ref[(1, 0, 0, 3)]=-0.198666870398*x_ref[0] + (0.25036208037)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.543716821425*x[0] + (0.196216560113)*x[1]
        ref[(1, 0, 1, 0)]=0.543716821425*x_ref[0] + (0.196216560113)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.0325062635545*x[0] + (0.533370664242)*x[1]
        ref[(1, 0, 1, 1)]=0.0325062635545*x_ref[0] + (0.533370664242)*x_ref[1]
        arg[(1, 0, 1, 2)]=0.998593863498*x[0] + (0.965424789679)*x[1]
        ref[(1, 0, 1, 2)]=0.998593863498*x_ref[0] + (0.965424789679)*x_ref[1]
        arg[(1, 0, 1, 3)]=-0.719315129264*x[0] + (-0.787768172241)*x[1]
        ref[(1, 0, 1, 3)]=-0.719315129264*x_ref[0] + (-0.787768172241)*x_ref[1]
        arg[(1, 1, 0, 0)]=0.812555878248*x[0] + (0.813499981386)*x[1]
        ref[(1, 1, 0, 0)]=0.812555878248*x_ref[0] + (0.813499981386)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.0220697561453*x[0] + (0.689691666238)*x[1]
        ref[(1, 1, 0, 1)]=0.0220697561453*x_ref[0] + (0.689691666238)*x_ref[1]
        arg[(1, 1, 0, 2)]=-0.466080314756*x[0] + (0.0920639319903)*x[1]
        ref[(1, 1, 0, 2)]=-0.466080314756*x_ref[0] + (0.0920639319903)*x_ref[1]
        arg[(1, 1, 0, 3)]=-0.679478358584*x[0] + (-0.293331009954)*x[1]
        ref[(1, 1, 0, 3)]=-0.679478358584*x_ref[0] + (-0.293331009954)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.368637169098*x[0] + (0.880622082125)*x[1]
        ref[(1, 1, 1, 0)]=-0.368637169098*x_ref[0] + (0.880622082125)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.455688317147*x[0] + (0.694147651031)*x[1]
        ref[(1, 1, 1, 1)]=-0.455688317147*x_ref[0] + (0.694147651031)*x_ref[1]
        arg[(1, 1, 1, 2)]=-0.613709630844*x[0] + (-0.886872718267)*x[1]
        ref[(1, 1, 1, 2)]=-0.613709630844*x_ref[0] + (-0.886872718267)*x_ref[1]
        arg[(1, 1, 1, 3)]=-0.397350065896*x[0] + (-0.815519395773)*x[1]
        ref[(1, 1, 1, 3)]=-0.397350065896*x_ref[0] + (-0.815519395773)*x_ref[1]
        arg[(1, 2, 0, 0)]=0.134689151537*x[0] + (-0.20353231043)*x[1]
        ref[(1, 2, 0, 0)]=0.134689151537*x_ref[0] + (-0.20353231043)*x_ref[1]
        arg[(1, 2, 0, 1)]=0.0286753741314*x[0] + (-0.858679298214)*x[1]
        ref[(1, 2, 0, 1)]=0.0286753741314*x_ref[0] + (-0.858679298214)*x_ref[1]
        arg[(1, 2, 0, 2)]=-0.918988459173*x[0] + (0.475839370315)*x[1]
        ref[(1, 2, 0, 2)]=-0.918988459173*x_ref[0] + (0.475839370315)*x_ref[1]
        arg[(1, 2, 0, 3)]=0.578331283234*x[0] + (0.814142804136)*x[1]
        ref[(1, 2, 0, 3)]=0.578331283234*x_ref[0] + (0.814142804136)*x_ref[1]
        arg[(1, 2, 1, 0)]=0.227794104564*x[0] + (-0.83464498107)*x[1]
        ref[(1, 2, 1, 0)]=0.227794104564*x_ref[0] + (-0.83464498107)*x_ref[1]
        arg[(1, 2, 1, 1)]=-0.753230489994*x[0] + (-0.44587495254)*x[1]
        ref[(1, 2, 1, 1)]=-0.753230489994*x_ref[0] + (-0.44587495254)*x_ref[1]
        arg[(1, 2, 1, 2)]=-0.170361934967*x[0] + (0.262758769717)*x[1]
        ref[(1, 2, 1, 2)]=-0.170361934967*x_ref[0] + (0.262758769717)*x_ref[1]
        arg[(1, 2, 1, 3)]=-0.870182931987*x[0] + (0.801754126649)*x[1]
        ref[(1, 2, 1, 3)]=-0.870182931987*x_ref[0] + (0.801754126649)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.557401969531*x[0] + (0.543293156123)*x[1]
        ref[(2, 0, 0, 0)]=0.557401969531*x_ref[0] + (0.543293156123)*x_ref[1]
        arg[(2, 0, 0, 1)]=-0.255336999897*x[0] + (0.785117340194)*x[1]
        ref[(2, 0, 0, 1)]=-0.255336999897*x_ref[0] + (0.785117340194)*x_ref[1]
        arg[(2, 0, 0, 2)]=0.260140972435*x[0] + (0.23890589323)*x[1]
        ref[(2, 0, 0, 2)]=0.260140972435*x_ref[0] + (0.23890589323)*x_ref[1]
        arg[(2, 0, 0, 3)]=-0.205541964887*x[0] + (-0.886051905804)*x[1]
        ref[(2, 0, 0, 3)]=-0.205541964887*x_ref[0] + (-0.886051905804)*x_ref[1]
        arg[(2, 0, 1, 0)]=-0.838639220675*x[0] + (-0.263160587103)*x[1]
        ref[(2, 0, 1, 0)]=-0.838639220675*x_ref[0] + (-0.263160587103)*x_ref[1]
        arg[(2, 0, 1, 1)]=-0.206935205495*x[0] + (0.497359341916)*x[1]
        ref[(2, 0, 1, 1)]=-0.206935205495*x_ref[0] + (0.497359341916)*x_ref[1]
        arg[(2, 0, 1, 2)]=0.140720080424*x[0] + (-0.0248216368976)*x[1]
        ref[(2, 0, 1, 2)]=0.140720080424*x_ref[0] + (-0.0248216368976)*x_ref[1]
        arg[(2, 0, 1, 3)]=-0.722582273788*x[0] + (0.172776138424)*x[1]
        ref[(2, 0, 1, 3)]=-0.722582273788*x_ref[0] + (0.172776138424)*x_ref[1]
        arg[(2, 1, 0, 0)]=0.254611015689*x[0] + (0.67812793212)*x[1]
        ref[(2, 1, 0, 0)]=0.254611015689*x_ref[0] + (0.67812793212)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.240821832819*x[0] + (-0.27159251197)*x[1]
        ref[(2, 1, 0, 1)]=0.240821832819*x_ref[0] + (-0.27159251197)*x_ref[1]
        arg[(2, 1, 0, 2)]=0.297984046711*x[0] + (-0.321554805918)*x[1]
        ref[(2, 1, 0, 2)]=0.297984046711*x_ref[0] + (-0.321554805918)*x_ref[1]
        arg[(2, 1, 0, 3)]=0.5355315741*x[0] + (-0.700793334126)*x[1]
        ref[(2, 1, 0, 3)]=0.5355315741*x_ref[0] + (-0.700793334126)*x_ref[1]
        arg[(2, 1, 1, 0)]=-0.823990110327*x[0] + (-0.754928288236)*x[1]
        ref[(2, 1, 1, 0)]=-0.823990110327*x_ref[0] + (-0.754928288236)*x_ref[1]
        arg[(2, 1, 1, 1)]=-0.639678278184*x[0] + (0.531122585747)*x[1]
        ref[(2, 1, 1, 1)]=-0.639678278184*x_ref[0] + (0.531122585747)*x_ref[1]
        arg[(2, 1, 1, 2)]=0.811910169688*x[0] + (-0.984542180204)*x[1]
        ref[(2, 1, 1, 2)]=0.811910169688*x_ref[0] + (-0.984542180204)*x_ref[1]
        arg[(2, 1, 1, 3)]=-0.598205436404*x[0] + (-0.584678317293)*x[1]
        ref[(2, 1, 1, 3)]=-0.598205436404*x_ref[0] + (-0.584678317293)*x_ref[1]
        arg[(2, 2, 0, 0)]=-0.0284448981955*x[0] + (-0.787215699234)*x[1]
        ref[(2, 2, 0, 0)]=-0.0284448981955*x_ref[0] + (-0.787215699234)*x_ref[1]
        arg[(2, 2, 0, 1)]=-0.784306267598*x[0] + (0.129825803862)*x[1]
        ref[(2, 2, 0, 1)]=-0.784306267598*x_ref[0] + (0.129825803862)*x_ref[1]
        arg[(2, 2, 0, 2)]=-0.532054816798*x[0] + (0.770624498665)*x[1]
        ref[(2, 2, 0, 2)]=-0.532054816798*x_ref[0] + (0.770624498665)*x_ref[1]
        arg[(2, 2, 0, 3)]=-0.218033122149*x[0] + (0.53211781813)*x[1]
        ref[(2, 2, 0, 3)]=-0.218033122149*x_ref[0] + (0.53211781813)*x_ref[1]
        arg[(2, 2, 1, 0)]=-0.47913351661*x[0] + (0.351282627483)*x[1]
        ref[(2, 2, 1, 0)]=-0.47913351661*x_ref[0] + (0.351282627483)*x_ref[1]
        arg[(2, 2, 1, 1)]=-0.110346701288*x[0] + (-0.165153746822)*x[1]
        ref[(2, 2, 1, 1)]=-0.110346701288*x_ref[0] + (-0.165153746822)*x_ref[1]
        arg[(2, 2, 1, 2)]=-0.372962745708*x[0] + (0.0775501896947)*x[1]
        ref[(2, 2, 1, 2)]=-0.372962745708*x_ref[0] + (0.0775501896947)*x_ref[1]
        arg[(2, 2, 1, 3)]=0.680396577286*x[0] + (0.592922032255)*x[1]
        ref[(2, 2, 1, 3)]=0.680396577286*x_ref[0] + (0.592922032255)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.25786698413*x[2]
            ref[(0, 0, 0, 0)]+=-0.25786698413*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.113671487273*x[2]
            ref[(0, 0, 0, 1)]+=-0.113671487273*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.46901073505*x[2]
            ref[(0, 0, 0, 2)]+=0.46901073505*x_ref[2]
            arg[(0, 0, 0, 3)]+=0.0167587767065*x[2]
            ref[(0, 0, 0, 3)]+=0.0167587767065*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.665867090379*x[2]
            ref[(0, 0, 1, 0)]+=0.665867090379*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.119812804466*x[2]
            ref[(0, 0, 1, 1)]+=0.119812804466*x_ref[2]
            arg[(0, 0, 1, 2)]+=0.514651714086*x[2]
            ref[(0, 0, 1, 2)]+=0.514651714086*x_ref[2]
            arg[(0, 0, 1, 3)]+=0.284950775428*x[2]
            ref[(0, 0, 1, 3)]+=0.284950775428*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.982624167901*x[2]
            ref[(0, 1, 0, 0)]+=-0.982624167901*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.310828000158*x[2]
            ref[(0, 1, 0, 1)]+=-0.310828000158*x_ref[2]
            arg[(0, 1, 0, 2)]+=0.820224717265*x[2]
            ref[(0, 1, 0, 2)]+=0.820224717265*x_ref[2]
            arg[(0, 1, 0, 3)]+=-0.0661432327045*x[2]
            ref[(0, 1, 0, 3)]+=-0.0661432327045*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.462728176674*x[2]
            ref[(0, 1, 1, 0)]+=-0.462728176674*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.947421950984*x[2]
            ref[(0, 1, 1, 1)]+=-0.947421950984*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.996757723469*x[2]
            ref[(0, 1, 1, 2)]+=0.996757723469*x_ref[2]
            arg[(0, 1, 1, 3)]+=-0.575338628147*x[2]
            ref[(0, 1, 1, 3)]+=-0.575338628147*x_ref[2]
            arg[(0, 2, 0, 0)]+=-0.234814416687*x[2]
            ref[(0, 2, 0, 0)]+=-0.234814416687*x_ref[2]
            arg[(0, 2, 0, 1)]+=0.773766123462*x[2]
            ref[(0, 2, 0, 1)]+=0.773766123462*x_ref[2]
            arg[(0, 2, 0, 2)]+=0.066195334905*x[2]
            ref[(0, 2, 0, 2)]+=0.066195334905*x_ref[2]
            arg[(0, 2, 0, 3)]+=0.030023121823*x[2]
            ref[(0, 2, 0, 3)]+=0.030023121823*x_ref[2]
            arg[(0, 2, 1, 0)]+=-0.392957678221*x[2]
            ref[(0, 2, 1, 0)]+=-0.392957678221*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.579382659118*x[2]
            ref[(0, 2, 1, 1)]+=-0.579382659118*x_ref[2]
            arg[(0, 2, 1, 2)]+=-0.632159097602*x[2]
            ref[(0, 2, 1, 2)]+=-0.632159097602*x_ref[2]
            arg[(0, 2, 1, 3)]+=0.700579842886*x[2]
            ref[(0, 2, 1, 3)]+=0.700579842886*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.0124209201761*x[2]
            ref[(1, 0, 0, 0)]+=-0.0124209201761*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.386347719308*x[2]
            ref[(1, 0, 0, 1)]+=-0.386347719308*x_ref[2]
            arg[(1, 0, 0, 2)]+=-0.433415521151*x[2]
            ref[(1, 0, 0, 2)]+=-0.433415521151*x_ref[2]
            arg[(1, 0, 0, 3)]+=-0.50082161297*x[2]
            ref[(1, 0, 0, 3)]+=-0.50082161297*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.556872776697*x[2]
            ref[(1, 0, 1, 0)]+=-0.556872776697*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.943539152977*x[2]
            ref[(1, 0, 1, 1)]+=0.943539152977*x_ref[2]
            arg[(1, 0, 1, 2)]+=0.866308818694*x[2]
            ref[(1, 0, 1, 2)]+=0.866308818694*x_ref[2]
            arg[(1, 0, 1, 3)]+=0.862923077161*x[2]
            ref[(1, 0, 1, 3)]+=0.862923077161*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.867694850103*x[2]
            ref[(1, 1, 0, 0)]+=-0.867694850103*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.0422038175752*x[2]
            ref[(1, 1, 0, 1)]+=0.0422038175752*x_ref[2]
            arg[(1, 1, 0, 2)]+=-0.917001877712*x[2]
            ref[(1, 1, 0, 2)]+=-0.917001877712*x_ref[2]
            arg[(1, 1, 0, 3)]+=-0.100809413691*x[2]
            ref[(1, 1, 0, 3)]+=-0.100809413691*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.754169183008*x[2]
            ref[(1, 1, 1, 0)]+=0.754169183008*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.382007556336*x[2]
            ref[(1, 1, 1, 1)]+=0.382007556336*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.946601270885*x[2]
            ref[(1, 1, 1, 2)]+=-0.946601270885*x_ref[2]
            arg[(1, 1, 1, 3)]+=0.347447861021*x[2]
            ref[(1, 1, 1, 3)]+=0.347447861021*x_ref[2]
            arg[(1, 2, 0, 0)]+=0.907305691212*x[2]
            ref[(1, 2, 0, 0)]+=0.907305691212*x_ref[2]
            arg[(1, 2, 0, 1)]+=-0.474716605417*x[2]
            ref[(1, 2, 0, 1)]+=-0.474716605417*x_ref[2]
            arg[(1, 2, 0, 2)]+=0.775314664705*x[2]
            ref[(1, 2, 0, 2)]+=0.775314664705*x_ref[2]
            arg[(1, 2, 0, 3)]+=-0.37727785918*x[2]
            ref[(1, 2, 0, 3)]+=-0.37727785918*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.965489714481*x[2]
            ref[(1, 2, 1, 0)]+=0.965489714481*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.334796931199*x[2]
            ref[(1, 2, 1, 1)]+=0.334796931199*x_ref[2]
            arg[(1, 2, 1, 2)]+=0.390777634936*x[2]
            ref[(1, 2, 1, 2)]+=0.390777634936*x_ref[2]
            arg[(1, 2, 1, 3)]+=-0.0941244381989*x[2]
            ref[(1, 2, 1, 3)]+=-0.0941244381989*x_ref[2]
            arg[(2, 0, 0, 0)]+=-0.168049350211*x[2]
            ref[(2, 0, 0, 0)]+=-0.168049350211*x_ref[2]
            arg[(2, 0, 0, 1)]+=-0.870552176866*x[2]
            ref[(2, 0, 0, 1)]+=-0.870552176866*x_ref[2]
            arg[(2, 0, 0, 2)]+=0.13635687732*x[2]
            ref[(2, 0, 0, 2)]+=0.13635687732*x_ref[2]
            arg[(2, 0, 0, 3)]+=-0.374017262406*x[2]
            ref[(2, 0, 0, 3)]+=-0.374017262406*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.623809712805*x[2]
            ref[(2, 0, 1, 0)]+=-0.623809712805*x_ref[2]
            arg[(2, 0, 1, 1)]+=-0.115315384803*x[2]
            ref[(2, 0, 1, 1)]+=-0.115315384803*x_ref[2]
            arg[(2, 0, 1, 2)]+=-0.498336935326*x[2]
            ref[(2, 0, 1, 2)]+=-0.498336935326*x_ref[2]
            arg[(2, 0, 1, 3)]+=-0.433428579054*x[2]
            ref[(2, 0, 1, 3)]+=-0.433428579054*x_ref[2]
            arg[(2, 1, 0, 0)]+=-0.911101745001*x[2]
            ref[(2, 1, 0, 0)]+=-0.911101745001*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.327901059359*x[2]
            ref[(2, 1, 0, 1)]+=-0.327901059359*x_ref[2]
            arg[(2, 1, 0, 2)]+=-0.852922358524*x[2]
            ref[(2, 1, 0, 2)]+=-0.852922358524*x_ref[2]
            arg[(2, 1, 0, 3)]+=-0.0578812706834*x[2]
            ref[(2, 1, 0, 3)]+=-0.0578812706834*x_ref[2]
            arg[(2, 1, 1, 0)]+=-0.92193167602*x[2]
            ref[(2, 1, 1, 0)]+=-0.92193167602*x_ref[2]
            arg[(2, 1, 1, 1)]+=0.503503118091*x[2]
            ref[(2, 1, 1, 1)]+=0.503503118091*x_ref[2]
            arg[(2, 1, 1, 2)]+=-0.428441943073*x[2]
            ref[(2, 1, 1, 2)]+=-0.428441943073*x_ref[2]
            arg[(2, 1, 1, 3)]+=0.518847028441*x[2]
            ref[(2, 1, 1, 3)]+=0.518847028441*x_ref[2]
            arg[(2, 2, 0, 0)]+=-0.414784846011*x[2]
            ref[(2, 2, 0, 0)]+=-0.414784846011*x_ref[2]
            arg[(2, 2, 0, 1)]+=0.583324135735*x[2]
            ref[(2, 2, 0, 1)]+=0.583324135735*x_ref[2]
            arg[(2, 2, 0, 2)]+=-0.00484682995042*x[2]
            ref[(2, 2, 0, 2)]+=-0.00484682995042*x_ref[2]
            arg[(2, 2, 0, 3)]+=-0.200491579495*x[2]
            ref[(2, 2, 0, 3)]+=-0.200491579495*x_ref[2]
            arg[(2, 2, 1, 0)]+=0.801117359629*x[2]
            ref[(2, 2, 1, 0)]+=0.801117359629*x_ref[2]
            arg[(2, 2, 1, 1)]+=0.268198683463*x[2]
            ref[(2, 2, 1, 1)]+=0.268198683463*x_ref[2]
            arg[(2, 2, 1, 2)]+=0.732132399896*x[2]
            ref[(2, 2, 1, 2)]+=0.732132399896*x_ref[2]
            arg[(2, 2, 1, 3)]+=-0.707626145367*x[2]
            ref[(2, 2, 1, 3)]+=-0.707626145367*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.994360060082*x[0] + (0.717962715898)*x[1]
        ref=-0.994360060082*x_ref[0] + (0.717962715898)*x_ref[1]
        if dim==3:
            arg+=(0.408040092263)*x[2]
            ref+=(0.408040092263)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=-0.0614765460942*x[0] + (0.866515321491)*x[1]
        ref[(0,)]=-0.0614765460942*x_ref[0] + (0.866515321491)*x_ref[1]
        arg[(1,)]=-0.133408958168*x[0] + (0.810927790425)*x[1]
        ref[(1,)]=-0.133408958168*x_ref[0] + (0.810927790425)*x_ref[1]
        arg[(2,)]=-0.107216893294*x[0] + (0.721890001554)*x[1]
        ref[(2,)]=-0.107216893294*x_ref[0] + (0.721890001554)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.859231991607*x[2]
            ref[(0,)]+=0.859231991607*x_ref[2]
            arg[(1,)]+=-0.54035866092*x[2]
            ref[(1,)]+=-0.54035866092*x_ref[2]
            arg[(2,)]+=-0.0977746200711*x[2]
            ref[(2,)]+=-0.0977746200711*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref = Data(0,(2, 3),w_ref)
        arg[(0, 0)]=-0.778962243119*x[0] + (-0.0155682224767)*x[1]
        ref[(0, 0)]=-0.778962243119*x_ref[0] + (-0.0155682224767)*x_ref[1]
        arg[(0, 1)]=0.848887883484*x[0] + (0.731216897374)*x[1]
        ref[(0, 1)]=0.848887883484*x_ref[0] + (0.731216897374)*x_ref[1]
        arg[(0, 2)]=0.890343336147*x[0] + (-0.911917408593)*x[1]
        ref[(0, 2)]=0.890343336147*x_ref[0] + (-0.911917408593)*x_ref[1]
        arg[(1, 0)]=-0.0455017253404*x[0] + (0.488243541083)*x[1]
        ref[(1, 0)]=-0.0455017253404*x_ref[0] + (0.488243541083)*x_ref[1]
        arg[(1, 1)]=0.169165950611*x[0] + (-0.804452445571)*x[1]
        ref[(1, 1)]=0.169165950611*x_ref[0] + (-0.804452445571)*x_ref[1]
        arg[(1, 2)]=-0.754545849855*x[0] + (-0.237138647698)*x[1]
        ref[(1, 2)]=-0.754545849855*x_ref[0] + (-0.237138647698)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.283123155212*x[2]
            ref[(0, 0)]+=-0.283123155212*x_ref[2]
            arg[(0, 1)]+=0.871085730866*x[2]
            ref[(0, 1)]+=0.871085730866*x_ref[2]
            arg[(0, 2)]+=-0.38020290526*x[2]
            ref[(0, 2)]+=-0.38020290526*x_ref[2]
            arg[(1, 0)]+=0.917589202437*x[2]
            ref[(1, 0)]+=0.917589202437*x_ref[2]
            arg[(1, 1)]+=0.922301238635*x[2]
            ref[(1, 1)]+=0.922301238635*x_ref[2]
            arg[(1, 2)]+=-0.991370982825*x[2]
            ref[(1, 2)]+=-0.991370982825*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 3),w)
        ref = Data(0,(4, 2, 3),w_ref)
        arg[(0, 0, 0)]=-0.889696437397*x[0] + (0.326432480718)*x[1]
        ref[(0, 0, 0)]=-0.889696437397*x_ref[0] + (0.326432480718)*x_ref[1]
        arg[(0, 0, 1)]=0.23468697154*x[0] + (-0.380489829009)*x[1]
        ref[(0, 0, 1)]=0.23468697154*x_ref[0] + (-0.380489829009)*x_ref[1]
        arg[(0, 0, 2)]=-0.620390055564*x[0] + (0.934770485366)*x[1]
        ref[(0, 0, 2)]=-0.620390055564*x_ref[0] + (0.934770485366)*x_ref[1]
        arg[(0, 1, 0)]=-0.818826407036*x[0] + (0.559971761018)*x[1]
        ref[(0, 1, 0)]=-0.818826407036*x_ref[0] + (0.559971761018)*x_ref[1]
        arg[(0, 1, 1)]=0.58259923886*x[0] + (-0.29720732013)*x[1]
        ref[(0, 1, 1)]=0.58259923886*x_ref[0] + (-0.29720732013)*x_ref[1]
        arg[(0, 1, 2)]=-0.415667073805*x[0] + (-0.0634165396358)*x[1]
        ref[(0, 1, 2)]=-0.415667073805*x_ref[0] + (-0.0634165396358)*x_ref[1]
        arg[(1, 0, 0)]=0.84737584451*x[0] + (-0.0992881002549)*x[1]
        ref[(1, 0, 0)]=0.84737584451*x_ref[0] + (-0.0992881002549)*x_ref[1]
        arg[(1, 0, 1)]=-0.557445760661*x[0] + (-0.239935232331)*x[1]
        ref[(1, 0, 1)]=-0.557445760661*x_ref[0] + (-0.239935232331)*x_ref[1]
        arg[(1, 0, 2)]=0.962023578932*x[0] + (0.389449729994)*x[1]
        ref[(1, 0, 2)]=0.962023578932*x_ref[0] + (0.389449729994)*x_ref[1]
        arg[(1, 1, 0)]=-0.551339970206*x[0] + (-0.0240119723576)*x[1]
        ref[(1, 1, 0)]=-0.551339970206*x_ref[0] + (-0.0240119723576)*x_ref[1]
        arg[(1, 1, 1)]=0.785236396173*x[0] + (-0.755610864963)*x[1]
        ref[(1, 1, 1)]=0.785236396173*x_ref[0] + (-0.755610864963)*x_ref[1]
        arg[(1, 1, 2)]=-0.28694791076*x[0] + (-0.0946929030941)*x[1]
        ref[(1, 1, 2)]=-0.28694791076*x_ref[0] + (-0.0946929030941)*x_ref[1]
        arg[(2, 0, 0)]=0.22075384624*x[0] + (-0.345298557148)*x[1]
        ref[(2, 0, 0)]=0.22075384624*x_ref[0] + (-0.345298557148)*x_ref[1]
        arg[(2, 0, 1)]=0.589221931587*x[0] + (-0.293121817438)*x[1]
        ref[(2, 0, 1)]=0.589221931587*x_ref[0] + (-0.293121817438)*x_ref[1]
        arg[(2, 0, 2)]=0.237461285178*x[0] + (-0.870359941024)*x[1]
        ref[(2, 0, 2)]=0.237461285178*x_ref[0] + (-0.870359941024)*x_ref[1]
        arg[(2, 1, 0)]=-0.52585101566*x[0] + (-0.20389398109)*x[1]
        ref[(2, 1, 0)]=-0.52585101566*x_ref[0] + (-0.20389398109)*x_ref[1]
        arg[(2, 1, 1)]=0.419073977552*x[0] + (-0.0761652974857)*x[1]
        ref[(2, 1, 1)]=0.419073977552*x_ref[0] + (-0.0761652974857)*x_ref[1]
        arg[(2, 1, 2)]=0.366266056249*x[0] + (-0.570188417722)*x[1]
        ref[(2, 1, 2)]=0.366266056249*x_ref[0] + (-0.570188417722)*x_ref[1]
        arg[(3, 0, 0)]=0.190507018872*x[0] + (-0.825363711779)*x[1]
        ref[(3, 0, 0)]=0.190507018872*x_ref[0] + (-0.825363711779)*x_ref[1]
        arg[(3, 0, 1)]=0.799458546722*x[0] + (-0.0724186838429)*x[1]
        ref[(3, 0, 1)]=0.799458546722*x_ref[0] + (-0.0724186838429)*x_ref[1]
        arg[(3, 0, 2)]=0.368428552413*x[0] + (-0.408237109413)*x[1]
        ref[(3, 0, 2)]=0.368428552413*x_ref[0] + (-0.408237109413)*x_ref[1]
        arg[(3, 1, 0)]=-0.348763158941*x[0] + (-0.907672573185)*x[1]
        ref[(3, 1, 0)]=-0.348763158941*x_ref[0] + (-0.907672573185)*x_ref[1]
        arg[(3, 1, 1)]=-0.894649142136*x[0] + (-0.164939007751)*x[1]
        ref[(3, 1, 1)]=-0.894649142136*x_ref[0] + (-0.164939007751)*x_ref[1]
        arg[(3, 1, 2)]=-0.31853123786*x[0] + (-0.624972948915)*x[1]
        ref[(3, 1, 2)]=-0.31853123786*x_ref[0] + (-0.624972948915)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.461680732094*x[2]
            ref[(0, 0, 0)]+=0.461680732094*x_ref[2]
            arg[(0, 0, 1)]+=0.246911327955*x[2]
            ref[(0, 0, 1)]+=0.246911327955*x_ref[2]
            arg[(0, 0, 2)]+=-0.29873398137*x[2]
            ref[(0, 0, 2)]+=-0.29873398137*x_ref[2]
            arg[(0, 1, 0)]+=-0.286778001018*x[2]
            ref[(0, 1, 0)]+=-0.286778001018*x_ref[2]
            arg[(0, 1, 1)]+=0.153908872158*x[2]
            ref[(0, 1, 1)]+=0.153908872158*x_ref[2]
            arg[(0, 1, 2)]+=-0.586717318407*x[2]
            ref[(0, 1, 2)]+=-0.586717318407*x_ref[2]
            arg[(1, 0, 0)]+=-0.384733178876*x[2]
            ref[(1, 0, 0)]+=-0.384733178876*x_ref[2]
            arg[(1, 0, 1)]+=-0.486152064943*x[2]
            ref[(1, 0, 1)]+=-0.486152064943*x_ref[2]
            arg[(1, 0, 2)]+=0.0459856420724*x[2]
            ref[(1, 0, 2)]+=0.0459856420724*x_ref[2]
            arg[(1, 1, 0)]+=0.0842312719822*x[2]
            ref[(1, 1, 0)]+=0.0842312719822*x_ref[2]
            arg[(1, 1, 1)]+=0.471691081859*x[2]
            ref[(1, 1, 1)]+=0.471691081859*x_ref[2]
            arg[(1, 1, 2)]+=0.580966055819*x[2]
            ref[(1, 1, 2)]+=0.580966055819*x_ref[2]
            arg[(2, 0, 0)]+=-0.813895234652*x[2]
            ref[(2, 0, 0)]+=-0.813895234652*x_ref[2]
            arg[(2, 0, 1)]+=-0.68654008506*x[2]
            ref[(2, 0, 1)]+=-0.68654008506*x_ref[2]
            arg[(2, 0, 2)]+=0.833435273817*x[2]
            ref[(2, 0, 2)]+=0.833435273817*x_ref[2]
            arg[(2, 1, 0)]+=-0.05382921609*x[2]
            ref[(2, 1, 0)]+=-0.05382921609*x_ref[2]
            arg[(2, 1, 1)]+=0.306898158829*x[2]
            ref[(2, 1, 1)]+=0.306898158829*x_ref[2]
            arg[(2, 1, 2)]+=0.581834260176*x[2]
            ref[(2, 1, 2)]+=0.581834260176*x_ref[2]
            arg[(3, 0, 0)]+=-0.853727778901*x[2]
            ref[(3, 0, 0)]+=-0.853727778901*x_ref[2]
            arg[(3, 0, 1)]+=-0.214510217355*x[2]
            ref[(3, 0, 1)]+=-0.214510217355*x_ref[2]
            arg[(3, 0, 2)]+=-0.349629627145*x[2]
            ref[(3, 0, 2)]+=-0.349629627145*x_ref[2]
            arg[(3, 1, 0)]+=-0.545435587922*x[2]
            ref[(3, 1, 0)]+=-0.545435587922*x_ref[2]
            arg[(3, 1, 1)]+=0.0213071525744*x[2]
            ref[(3, 1, 1)]+=0.0213071525744*x_ref[2]
            arg[(3, 1, 2)]+=0.523617311784*x[2]
            ref[(3, 1, 2)]+=0.523617311784*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 4, 2),w)
        ref = Data(0,(2, 4, 4, 2),w_ref)
        arg[(0, 0, 0, 0)]=0.947400008914*x[0] + (0.253552868747)*x[1]
        ref[(0, 0, 0, 0)]=0.947400008914*x_ref[0] + (0.253552868747)*x_ref[1]
        arg[(0, 0, 0, 1)]=-0.332629175092*x[0] + (-0.11967702327)*x[1]
        ref[(0, 0, 0, 1)]=-0.332629175092*x_ref[0] + (-0.11967702327)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.296354595836*x[0] + (-0.996240568839)*x[1]
        ref[(0, 0, 1, 0)]=-0.296354595836*x_ref[0] + (-0.996240568839)*x_ref[1]
        arg[(0, 0, 1, 1)]=-0.810878880936*x[0] + (-0.928573899098)*x[1]
        ref[(0, 0, 1, 1)]=-0.810878880936*x_ref[0] + (-0.928573899098)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.820306384517*x[0] + (-0.862124893724)*x[1]
        ref[(0, 0, 2, 0)]=-0.820306384517*x_ref[0] + (-0.862124893724)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.41348107753*x[0] + (0.884263621615)*x[1]
        ref[(0, 0, 2, 1)]=-0.41348107753*x_ref[0] + (0.884263621615)*x_ref[1]
        arg[(0, 0, 3, 0)]=0.353627694257*x[0] + (0.0879199811806)*x[1]
        ref[(0, 0, 3, 0)]=0.353627694257*x_ref[0] + (0.0879199811806)*x_ref[1]
        arg[(0, 0, 3, 1)]=0.0126430447852*x[0] + (0.423205821151)*x[1]
        ref[(0, 0, 3, 1)]=0.0126430447852*x_ref[0] + (0.423205821151)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.970807183795*x[0] + (-0.743171117188)*x[1]
        ref[(0, 1, 0, 0)]=-0.970807183795*x_ref[0] + (-0.743171117188)*x_ref[1]
        arg[(0, 1, 0, 1)]=-0.204537134434*x[0] + (0.709945049746)*x[1]
        ref[(0, 1, 0, 1)]=-0.204537134434*x_ref[0] + (0.709945049746)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.618790975656*x[0] + (-0.950563036876)*x[1]
        ref[(0, 1, 1, 0)]=-0.618790975656*x_ref[0] + (-0.950563036876)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.992352753619*x[0] + (-0.193428265672)*x[1]
        ref[(0, 1, 1, 1)]=-0.992352753619*x_ref[0] + (-0.193428265672)*x_ref[1]
        arg[(0, 1, 2, 0)]=0.839873586991*x[0] + (0.995358376112)*x[1]
        ref[(0, 1, 2, 0)]=0.839873586991*x_ref[0] + (0.995358376112)*x_ref[1]
        arg[(0, 1, 2, 1)]=-0.32961834481*x[0] + (-0.681450298033)*x[1]
        ref[(0, 1, 2, 1)]=-0.32961834481*x_ref[0] + (-0.681450298033)*x_ref[1]
        arg[(0, 1, 3, 0)]=-0.642163135952*x[0] + (0.0780451293695)*x[1]
        ref[(0, 1, 3, 0)]=-0.642163135952*x_ref[0] + (0.0780451293695)*x_ref[1]
        arg[(0, 1, 3, 1)]=0.763739841233*x[0] + (0.394499516358)*x[1]
        ref[(0, 1, 3, 1)]=0.763739841233*x_ref[0] + (0.394499516358)*x_ref[1]
        arg[(0, 2, 0, 0)]=0.23618288466*x[0] + (-0.188016280464)*x[1]
        ref[(0, 2, 0, 0)]=0.23618288466*x_ref[0] + (-0.188016280464)*x_ref[1]
        arg[(0, 2, 0, 1)]=-0.278663121376*x[0] + (0.305065826942)*x[1]
        ref[(0, 2, 0, 1)]=-0.278663121376*x_ref[0] + (0.305065826942)*x_ref[1]
        arg[(0, 2, 1, 0)]=0.830390625579*x[0] + (0.723281665764)*x[1]
        ref[(0, 2, 1, 0)]=0.830390625579*x_ref[0] + (0.723281665764)*x_ref[1]
        arg[(0, 2, 1, 1)]=-0.377835074453*x[0] + (0.401220853849)*x[1]
        ref[(0, 2, 1, 1)]=-0.377835074453*x_ref[0] + (0.401220853849)*x_ref[1]
        arg[(0, 2, 2, 0)]=-0.117438753213*x[0] + (-0.394553686005)*x[1]
        ref[(0, 2, 2, 0)]=-0.117438753213*x_ref[0] + (-0.394553686005)*x_ref[1]
        arg[(0, 2, 2, 1)]=0.459151038364*x[0] + (0.666176065305)*x[1]
        ref[(0, 2, 2, 1)]=0.459151038364*x_ref[0] + (0.666176065305)*x_ref[1]
        arg[(0, 2, 3, 0)]=0.537665743203*x[0] + (0.330328646283)*x[1]
        ref[(0, 2, 3, 0)]=0.537665743203*x_ref[0] + (0.330328646283)*x_ref[1]
        arg[(0, 2, 3, 1)]=-0.328062981561*x[0] + (0.460850725057)*x[1]
        ref[(0, 2, 3, 1)]=-0.328062981561*x_ref[0] + (0.460850725057)*x_ref[1]
        arg[(0, 3, 0, 0)]=0.819991713931*x[0] + (-0.0654225724873)*x[1]
        ref[(0, 3, 0, 0)]=0.819991713931*x_ref[0] + (-0.0654225724873)*x_ref[1]
        arg[(0, 3, 0, 1)]=-0.243081913386*x[0] + (0.912080509269)*x[1]
        ref[(0, 3, 0, 1)]=-0.243081913386*x_ref[0] + (0.912080509269)*x_ref[1]
        arg[(0, 3, 1, 0)]=-0.672911799173*x[0] + (0.64487779612)*x[1]
        ref[(0, 3, 1, 0)]=-0.672911799173*x_ref[0] + (0.64487779612)*x_ref[1]
        arg[(0, 3, 1, 1)]=0.211584652115*x[0] + (-0.110722835736)*x[1]
        ref[(0, 3, 1, 1)]=0.211584652115*x_ref[0] + (-0.110722835736)*x_ref[1]
        arg[(0, 3, 2, 0)]=-0.30727767668*x[0] + (0.65871177506)*x[1]
        ref[(0, 3, 2, 0)]=-0.30727767668*x_ref[0] + (0.65871177506)*x_ref[1]
        arg[(0, 3, 2, 1)]=-0.857036662249*x[0] + (-0.300330702486)*x[1]
        ref[(0, 3, 2, 1)]=-0.857036662249*x_ref[0] + (-0.300330702486)*x_ref[1]
        arg[(0, 3, 3, 0)]=0.602456973985*x[0] + (0.887607357466)*x[1]
        ref[(0, 3, 3, 0)]=0.602456973985*x_ref[0] + (0.887607357466)*x_ref[1]
        arg[(0, 3, 3, 1)]=-0.181935402005*x[0] + (0.354666454942)*x[1]
        ref[(0, 3, 3, 1)]=-0.181935402005*x_ref[0] + (0.354666454942)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.891751000923*x[0] + (0.128235289568)*x[1]
        ref[(1, 0, 0, 0)]=-0.891751000923*x_ref[0] + (0.128235289568)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.356485063102*x[0] + (0.935213177985)*x[1]
        ref[(1, 0, 0, 1)]=0.356485063102*x_ref[0] + (0.935213177985)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.393289736606*x[0] + (-0.270736648012)*x[1]
        ref[(1, 0, 1, 0)]=0.393289736606*x_ref[0] + (-0.270736648012)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.149198857607*x[0] + (0.8847845714)*x[1]
        ref[(1, 0, 1, 1)]=0.149198857607*x_ref[0] + (0.8847845714)*x_ref[1]
        arg[(1, 0, 2, 0)]=-0.565832588722*x[0] + (-0.77044726281)*x[1]
        ref[(1, 0, 2, 0)]=-0.565832588722*x_ref[0] + (-0.77044726281)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.378861570789*x[0] + (0.306543184313)*x[1]
        ref[(1, 0, 2, 1)]=0.378861570789*x_ref[0] + (0.306543184313)*x_ref[1]
        arg[(1, 0, 3, 0)]=0.717261696154*x[0] + (-0.106754378767)*x[1]
        ref[(1, 0, 3, 0)]=0.717261696154*x_ref[0] + (-0.106754378767)*x_ref[1]
        arg[(1, 0, 3, 1)]=-0.714250385323*x[0] + (0.876960015631)*x[1]
        ref[(1, 0, 3, 1)]=-0.714250385323*x_ref[0] + (0.876960015631)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.0782089849366*x[0] + (0.469602583721)*x[1]
        ref[(1, 1, 0, 0)]=-0.0782089849366*x_ref[0] + (0.469602583721)*x_ref[1]
        arg[(1, 1, 0, 1)]=-0.345885636275*x[0] + (-0.037689911251)*x[1]
        ref[(1, 1, 0, 1)]=-0.345885636275*x_ref[0] + (-0.037689911251)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.128222700363*x[0] + (-0.276696205767)*x[1]
        ref[(1, 1, 1, 0)]=0.128222700363*x_ref[0] + (-0.276696205767)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.482895565618*x[0] + (-0.852512133484)*x[1]
        ref[(1, 1, 1, 1)]=-0.482895565618*x_ref[0] + (-0.852512133484)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.333152839037*x[0] + (-0.69595487019)*x[1]
        ref[(1, 1, 2, 0)]=-0.333152839037*x_ref[0] + (-0.69595487019)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.897485538709*x[0] + (0.886723802187)*x[1]
        ref[(1, 1, 2, 1)]=-0.897485538709*x_ref[0] + (0.886723802187)*x_ref[1]
        arg[(1, 1, 3, 0)]=-0.411021678051*x[0] + (-0.819950408832)*x[1]
        ref[(1, 1, 3, 0)]=-0.411021678051*x_ref[0] + (-0.819950408832)*x_ref[1]
        arg[(1, 1, 3, 1)]=-0.2423351124*x[0] + (-0.0581032354888)*x[1]
        ref[(1, 1, 3, 1)]=-0.2423351124*x_ref[0] + (-0.0581032354888)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.662592858119*x[0] + (0.731302825561)*x[1]
        ref[(1, 2, 0, 0)]=-0.662592858119*x_ref[0] + (0.731302825561)*x_ref[1]
        arg[(1, 2, 0, 1)]=0.463164359065*x[0] + (0.770605994029)*x[1]
        ref[(1, 2, 0, 1)]=0.463164359065*x_ref[0] + (0.770605994029)*x_ref[1]
        arg[(1, 2, 1, 0)]=-0.0401888390228*x[0] + (0.21897892858)*x[1]
        ref[(1, 2, 1, 0)]=-0.0401888390228*x_ref[0] + (0.21897892858)*x_ref[1]
        arg[(1, 2, 1, 1)]=0.00507791161944*x[0] + (-0.592746392224)*x[1]
        ref[(1, 2, 1, 1)]=0.00507791161944*x_ref[0] + (-0.592746392224)*x_ref[1]
        arg[(1, 2, 2, 0)]=0.0111014367047*x[0] + (0.303062411424)*x[1]
        ref[(1, 2, 2, 0)]=0.0111014367047*x_ref[0] + (0.303062411424)*x_ref[1]
        arg[(1, 2, 2, 1)]=-0.284787579326*x[0] + (-0.772740384223)*x[1]
        ref[(1, 2, 2, 1)]=-0.284787579326*x_ref[0] + (-0.772740384223)*x_ref[1]
        arg[(1, 2, 3, 0)]=-0.86310921696*x[0] + (-0.758174894355)*x[1]
        ref[(1, 2, 3, 0)]=-0.86310921696*x_ref[0] + (-0.758174894355)*x_ref[1]
        arg[(1, 2, 3, 1)]=0.724350188856*x[0] + (0.43269378959)*x[1]
        ref[(1, 2, 3, 1)]=0.724350188856*x_ref[0] + (0.43269378959)*x_ref[1]
        arg[(1, 3, 0, 0)]=-0.0282324904458*x[0] + (0.652172097529)*x[1]
        ref[(1, 3, 0, 0)]=-0.0282324904458*x_ref[0] + (0.652172097529)*x_ref[1]
        arg[(1, 3, 0, 1)]=-0.634621005809*x[0] + (-0.8725802186)*x[1]
        ref[(1, 3, 0, 1)]=-0.634621005809*x_ref[0] + (-0.8725802186)*x_ref[1]
        arg[(1, 3, 1, 0)]=0.413568276522*x[0] + (-0.917004739524)*x[1]
        ref[(1, 3, 1, 0)]=0.413568276522*x_ref[0] + (-0.917004739524)*x_ref[1]
        arg[(1, 3, 1, 1)]=0.201215298221*x[0] + (0.978224745358)*x[1]
        ref[(1, 3, 1, 1)]=0.201215298221*x_ref[0] + (0.978224745358)*x_ref[1]
        arg[(1, 3, 2, 0)]=-0.844239118978*x[0] + (0.121726625336)*x[1]
        ref[(1, 3, 2, 0)]=-0.844239118978*x_ref[0] + (0.121726625336)*x_ref[1]
        arg[(1, 3, 2, 1)]=0.871762869019*x[0] + (-0.837159134397)*x[1]
        ref[(1, 3, 2, 1)]=0.871762869019*x_ref[0] + (-0.837159134397)*x_ref[1]
        arg[(1, 3, 3, 0)]=-0.0191137454967*x[0] + (-0.465222366146)*x[1]
        ref[(1, 3, 3, 0)]=-0.0191137454967*x_ref[0] + (-0.465222366146)*x_ref[1]
        arg[(1, 3, 3, 1)]=-0.0102270112285*x[0] + (0.269206421258)*x[1]
        ref[(1, 3, 3, 1)]=-0.0102270112285*x_ref[0] + (0.269206421258)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.97904644657*x[2]
            ref[(0, 0, 0, 0)]+=-0.97904644657*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.947547664739*x[2]
            ref[(0, 0, 0, 1)]+=-0.947547664739*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.157879365022*x[2]
            ref[(0, 0, 1, 0)]+=0.157879365022*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.539024131218*x[2]
            ref[(0, 0, 1, 1)]+=0.539024131218*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.0605687760377*x[2]
            ref[(0, 0, 2, 0)]+=-0.0605687760377*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.779488812143*x[2]
            ref[(0, 0, 2, 1)]+=0.779488812143*x_ref[2]
            arg[(0, 0, 3, 0)]+=0.738780104494*x[2]
            ref[(0, 0, 3, 0)]+=0.738780104494*x_ref[2]
            arg[(0, 0, 3, 1)]+=-0.138141210979*x[2]
            ref[(0, 0, 3, 1)]+=-0.138141210979*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.925367312026*x[2]
            ref[(0, 1, 0, 0)]+=-0.925367312026*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.187091261563*x[2]
            ref[(0, 1, 0, 1)]+=0.187091261563*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.459380673625*x[2]
            ref[(0, 1, 1, 0)]+=-0.459380673625*x_ref[2]
            arg[(0, 1, 1, 1)]+=0.846983662199*x[2]
            ref[(0, 1, 1, 1)]+=0.846983662199*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.75473739403*x[2]
            ref[(0, 1, 2, 0)]+=-0.75473739403*x_ref[2]
            arg[(0, 1, 2, 1)]+=-0.737399045264*x[2]
            ref[(0, 1, 2, 1)]+=-0.737399045264*x_ref[2]
            arg[(0, 1, 3, 0)]+=-0.743335233306*x[2]
            ref[(0, 1, 3, 0)]+=-0.743335233306*x_ref[2]
            arg[(0, 1, 3, 1)]+=-0.848641751007*x[2]
            ref[(0, 1, 3, 1)]+=-0.848641751007*x_ref[2]
            arg[(0, 2, 0, 0)]+=-0.117000539941*x[2]
            ref[(0, 2, 0, 0)]+=-0.117000539941*x_ref[2]
            arg[(0, 2, 0, 1)]+=0.907856884816*x[2]
            ref[(0, 2, 0, 1)]+=0.907856884816*x_ref[2]
            arg[(0, 2, 1, 0)]+=0.165017723456*x[2]
            ref[(0, 2, 1, 0)]+=0.165017723456*x_ref[2]
            arg[(0, 2, 1, 1)]+=0.926291206053*x[2]
            ref[(0, 2, 1, 1)]+=0.926291206053*x_ref[2]
            arg[(0, 2, 2, 0)]+=0.505626807151*x[2]
            ref[(0, 2, 2, 0)]+=0.505626807151*x_ref[2]
            arg[(0, 2, 2, 1)]+=-0.949803336102*x[2]
            ref[(0, 2, 2, 1)]+=-0.949803336102*x_ref[2]
            arg[(0, 2, 3, 0)]+=-0.915572172478*x[2]
            ref[(0, 2, 3, 0)]+=-0.915572172478*x_ref[2]
            arg[(0, 2, 3, 1)]+=-0.308452216042*x[2]
            ref[(0, 2, 3, 1)]+=-0.308452216042*x_ref[2]
            arg[(0, 3, 0, 0)]+=-0.467418691676*x[2]
            ref[(0, 3, 0, 0)]+=-0.467418691676*x_ref[2]
            arg[(0, 3, 0, 1)]+=-0.462090355915*x[2]
            ref[(0, 3, 0, 1)]+=-0.462090355915*x_ref[2]
            arg[(0, 3, 1, 0)]+=-0.618764167193*x[2]
            ref[(0, 3, 1, 0)]+=-0.618764167193*x_ref[2]
            arg[(0, 3, 1, 1)]+=-0.290048483668*x[2]
            ref[(0, 3, 1, 1)]+=-0.290048483668*x_ref[2]
            arg[(0, 3, 2, 0)]+=-0.570455575623*x[2]
            ref[(0, 3, 2, 0)]+=-0.570455575623*x_ref[2]
            arg[(0, 3, 2, 1)]+=-0.55932938819*x[2]
            ref[(0, 3, 2, 1)]+=-0.55932938819*x_ref[2]
            arg[(0, 3, 3, 0)]+=-0.450475571015*x[2]
            ref[(0, 3, 3, 0)]+=-0.450475571015*x_ref[2]
            arg[(0, 3, 3, 1)]+=-0.16413524592*x[2]
            ref[(0, 3, 3, 1)]+=-0.16413524592*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.648347628477*x[2]
            ref[(1, 0, 0, 0)]+=-0.648347628477*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.253588463449*x[2]
            ref[(1, 0, 0, 1)]+=-0.253588463449*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.98219626359*x[2]
            ref[(1, 0, 1, 0)]+=0.98219626359*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.131146953367*x[2]
            ref[(1, 0, 1, 1)]+=0.131146953367*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.734422060827*x[2]
            ref[(1, 0, 2, 0)]+=-0.734422060827*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.797940731619*x[2]
            ref[(1, 0, 2, 1)]+=0.797940731619*x_ref[2]
            arg[(1, 0, 3, 0)]+=0.520090587519*x[2]
            ref[(1, 0, 3, 0)]+=0.520090587519*x_ref[2]
            arg[(1, 0, 3, 1)]+=0.289551881971*x[2]
            ref[(1, 0, 3, 1)]+=0.289551881971*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.111259686758*x[2]
            ref[(1, 1, 0, 0)]+=-0.111259686758*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.467017431622*x[2]
            ref[(1, 1, 0, 1)]+=-0.467017431622*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.394965004071*x[2]
            ref[(1, 1, 1, 0)]+=0.394965004071*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.879081143871*x[2]
            ref[(1, 1, 1, 1)]+=0.879081143871*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.0482340417452*x[2]
            ref[(1, 1, 2, 0)]+=-0.0482340417452*x_ref[2]
            arg[(1, 1, 2, 1)]+=-0.826974269596*x[2]
            ref[(1, 1, 2, 1)]+=-0.826974269596*x_ref[2]
            arg[(1, 1, 3, 0)]+=-0.821756339751*x[2]
            ref[(1, 1, 3, 0)]+=-0.821756339751*x_ref[2]
            arg[(1, 1, 3, 1)]+=-0.27855289819*x[2]
            ref[(1, 1, 3, 1)]+=-0.27855289819*x_ref[2]
            arg[(1, 2, 0, 0)]+=-0.626155234464*x[2]
            ref[(1, 2, 0, 0)]+=-0.626155234464*x_ref[2]
            arg[(1, 2, 0, 1)]+=0.645776225064*x[2]
            ref[(1, 2, 0, 1)]+=0.645776225064*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.0804899086826*x[2]
            ref[(1, 2, 1, 0)]+=0.0804899086826*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.274584027127*x[2]
            ref[(1, 2, 1, 1)]+=0.274584027127*x_ref[2]
            arg[(1, 2, 2, 0)]+=-0.666619746034*x[2]
            ref[(1, 2, 2, 0)]+=-0.666619746034*x_ref[2]
            arg[(1, 2, 2, 1)]+=-0.308068952559*x[2]
            ref[(1, 2, 2, 1)]+=-0.308068952559*x_ref[2]
            arg[(1, 2, 3, 0)]+=0.382898966152*x[2]
            ref[(1, 2, 3, 0)]+=0.382898966152*x_ref[2]
            arg[(1, 2, 3, 1)]+=0.305379270325*x[2]
            ref[(1, 2, 3, 1)]+=0.305379270325*x_ref[2]
            arg[(1, 3, 0, 0)]+=-0.18387629553*x[2]
            ref[(1, 3, 0, 0)]+=-0.18387629553*x_ref[2]
            arg[(1, 3, 0, 1)]+=0.143987325889*x[2]
            ref[(1, 3, 0, 1)]+=0.143987325889*x_ref[2]
            arg[(1, 3, 1, 0)]+=0.976017042647*x[2]
            ref[(1, 3, 1, 0)]+=0.976017042647*x_ref[2]
            arg[(1, 3, 1, 1)]+=-0.742845602718*x[2]
            ref[(1, 3, 1, 1)]+=-0.742845602718*x_ref[2]
            arg[(1, 3, 2, 0)]+=-0.686132517886*x[2]
            ref[(1, 3, 2, 0)]+=-0.686132517886*x_ref[2]
            arg[(1, 3, 2, 1)]+=-0.293960858705*x[2]
            ref[(1, 3, 2, 1)]+=-0.293960858705*x_ref[2]
            arg[(1, 3, 3, 0)]+=-0.516815995172*x[2]
            ref[(1, 3, 3, 0)]+=-0.516815995172*x_ref[2]
            arg[(1, 3, 3, 1)]+=-0.330946369379*x[2]
            ref[(1, 3, 3, 1)]+=-0.330946369379*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.423852764909*x[0]**o + (-0.502466793838)*x[0] + (0.687737906202)*x[1]**o + (0.430275712221)*x[1]
        ref=0.423852764909*x_ref[0]**o + (-0.502466793838)*x_ref[0] + (0.687737906202)*x_ref[1]**o + (0.430275712221)*x_ref[1]
        if dim==3:
            arg+=(-0.394226149617)*x[2]**o + (0.854915612592)*x[2]
            ref+=(-0.394226149617)*x_ref[2]**o + (0.854915612592)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=-0.876901418971*x[0]**o + (-0.85717899698)*x[0] + (0.115195230513)*x[1]**o + (0.886600538724)*x[1]
        ref[(0,)]=-0.876901418971*x_ref[0]**o + (-0.85717899698)*x_ref[0] + (0.115195230513)*x_ref[1]**o + (0.886600538724)*x_ref[1]
        arg[(1,)]=-0.267100769878*x[0]**o + (-0.477939094459)*x[0] + (0.855971456187)*x[1]**o + (-0.110881027544)*x[1]
        ref[(1,)]=-0.267100769878*x_ref[0]**o + (-0.477939094459)*x_ref[0] + (0.855971456187)*x_ref[1]**o + (-0.110881027544)*x_ref[1]
        arg[(2,)]=-0.531901388243*x[0]**o + (-0.630830610286)*x[0] + (-0.93750272562)*x[1]**o + (-0.998006904038)*x[1]
        ref[(2,)]=-0.531901388243*x_ref[0]**o + (-0.630830610286)*x_ref[0] + (-0.93750272562)*x_ref[1]**o + (-0.998006904038)*x_ref[1]
        arg[(3,)]=-0.44313722581*x[0]**o + (0.600879176925)*x[0] + (0.515428871542)*x[1]**o + (-0.759668639588)*x[1]
        ref[(3,)]=-0.44313722581*x_ref[0]**o + (0.600879176925)*x_ref[0] + (0.515428871542)*x_ref[1]**o + (-0.759668639588)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.590361007499*x[2]**o + (-0.126713722717)*x[2]
            ref[(0,)]+=0.590361007499*x_ref[2]**o + (-0.126713722717)*x_ref[2]
            arg[(1,)]+=-0.547206150821*x[2]**o + (-0.771814522354)*x[2]
            ref[(1,)]+=-0.547206150821*x_ref[2]**o + (-0.771814522354)*x_ref[2]
            arg[(2,)]+=-0.339028236357*x[2]**o + (-0.019259235775)*x[2]
            ref[(2,)]+=-0.339028236357*x_ref[2]**o + (-0.019259235775)*x_ref[2]
            arg[(3,)]+=0.697298576646*x[2]**o + (-0.283173654719)*x[2]
            ref[(3,)]+=0.697298576646*x_ref[2]**o + (-0.283173654719)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2),w)
        ref = Data(0,(3, 2),w_ref)
        arg[(0, 0)]=-0.690472116792*x[0]**o + (-0.871042645016)*x[0] + (-0.89896005556)*x[1]**o + (0.820058011673)*x[1]
        ref[(0, 0)]=-0.690472116792*x_ref[0]**o + (-0.871042645016)*x_ref[0] + (-0.89896005556)*x_ref[1]**o + (0.820058011673)*x_ref[1]
        arg[(0, 1)]=0.365003630566*x[0]**o + (0.796094191185)*x[0] + (0.459600172086)*x[1]**o + (-0.776326151806)*x[1]
        ref[(0, 1)]=0.365003630566*x_ref[0]**o + (0.796094191185)*x_ref[0] + (0.459600172086)*x_ref[1]**o + (-0.776326151806)*x_ref[1]
        arg[(1, 0)]=0.10074694517*x[0]**o + (0.651966998405)*x[0] + (0.393538095142)*x[1]**o + (-0.884441396443)*x[1]
        ref[(1, 0)]=0.10074694517*x_ref[0]**o + (0.651966998405)*x_ref[0] + (0.393538095142)*x_ref[1]**o + (-0.884441396443)*x_ref[1]
        arg[(1, 1)]=0.10715100693*x[0]**o + (-0.265908322741)*x[0] + (0.557495294397)*x[1]**o + (-0.818524256631)*x[1]
        ref[(1, 1)]=0.10715100693*x_ref[0]**o + (-0.265908322741)*x_ref[0] + (0.557495294397)*x_ref[1]**o + (-0.818524256631)*x_ref[1]
        arg[(2, 0)]=0.954407863637*x[0]**o + (0.596774660971)*x[0] + (0.12929052461)*x[1]**o + (0.836363005317)*x[1]
        ref[(2, 0)]=0.954407863637*x_ref[0]**o + (0.596774660971)*x_ref[0] + (0.12929052461)*x_ref[1]**o + (0.836363005317)*x_ref[1]
        arg[(2, 1)]=0.733821968214*x[0]**o + (0.994951471409)*x[0] + (-0.746273310208)*x[1]**o + (0.271406216836)*x[1]
        ref[(2, 1)]=0.733821968214*x_ref[0]**o + (0.994951471409)*x_ref[0] + (-0.746273310208)*x_ref[1]**o + (0.271406216836)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.0774370547652*x[2]**o + (-0.73820297074)*x[2]
            ref[(0, 0)]+=0.0774370547652*x_ref[2]**o + (-0.73820297074)*x_ref[2]
            arg[(0, 1)]+=0.0340546773321*x[2]**o + (-0.0396427576518)*x[2]
            ref[(0, 1)]+=0.0340546773321*x_ref[2]**o + (-0.0396427576518)*x_ref[2]
            arg[(1, 0)]+=-0.863151815699*x[2]**o + (0.673849645037)*x[2]
            ref[(1, 0)]+=-0.863151815699*x_ref[2]**o + (0.673849645037)*x_ref[2]
            arg[(1, 1)]+=-0.196167912553*x[2]**o + (-0.169065308442)*x[2]
            ref[(1, 1)]+=-0.196167912553*x_ref[2]**o + (-0.169065308442)*x_ref[2]
            arg[(2, 0)]+=-0.767627063272*x[2]**o + (-0.576707061968)*x[2]
            ref[(2, 0)]+=-0.767627063272*x_ref[2]**o + (-0.576707061968)*x_ref[2]
            arg[(2, 1)]+=-0.330725476622*x[2]**o + (-0.753078759817)*x[2]
            ref[(2, 1)]+=-0.330725476622*x_ref[2]**o + (-0.753078759817)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 2),w)
        ref = Data(0,(2, 3, 2),w_ref)
        arg[(0, 0, 0)]=-0.779562589021*x[0]**o + (-0.158434960893)*x[0] + (-0.990007496841)*x[1]**o + (-0.468516690794)*x[1]
        ref[(0, 0, 0)]=-0.779562589021*x_ref[0]**o + (-0.158434960893)*x_ref[0] + (-0.990007496841)*x_ref[1]**o + (-0.468516690794)*x_ref[1]
        arg[(0, 0, 1)]=-0.0739543254892*x[0]**o + (0.166337075044)*x[0] + (-0.501923363217)*x[1]**o + (0.823084308477)*x[1]
        ref[(0, 0, 1)]=-0.0739543254892*x_ref[0]**o + (0.166337075044)*x_ref[0] + (-0.501923363217)*x_ref[1]**o + (0.823084308477)*x_ref[1]
        arg[(0, 1, 0)]=-0.898359121863*x[0]**o + (-0.985010302393)*x[0] + (-0.873768399218)*x[1]**o + (0.262348756445)*x[1]
        ref[(0, 1, 0)]=-0.898359121863*x_ref[0]**o + (-0.985010302393)*x_ref[0] + (-0.873768399218)*x_ref[1]**o + (0.262348756445)*x_ref[1]
        arg[(0, 1, 1)]=0.319140126791*x[0]**o + (-0.949388953348)*x[0] + (0.670171770726)*x[1]**o + (-0.577731571386)*x[1]
        ref[(0, 1, 1)]=0.319140126791*x_ref[0]**o + (-0.949388953348)*x_ref[0] + (0.670171770726)*x_ref[1]**o + (-0.577731571386)*x_ref[1]
        arg[(0, 2, 0)]=-0.61705546737*x[0]**o + (0.250907347987)*x[0] + (0.58572033679)*x[1]**o + (0.620600552557)*x[1]
        ref[(0, 2, 0)]=-0.61705546737*x_ref[0]**o + (0.250907347987)*x_ref[0] + (0.58572033679)*x_ref[1]**o + (0.620600552557)*x_ref[1]
        arg[(0, 2, 1)]=0.500615281538*x[0]**o + (-0.225404992706)*x[0] + (0.377072242475)*x[1]**o + (0.360870880032)*x[1]
        ref[(0, 2, 1)]=0.500615281538*x_ref[0]**o + (-0.225404992706)*x_ref[0] + (0.377072242475)*x_ref[1]**o + (0.360870880032)*x_ref[1]
        arg[(1, 0, 0)]=0.685094281059*x[0]**o + (-0.0516148883709)*x[0] + (-0.991865407359)*x[1]**o + (0.140269619474)*x[1]
        ref[(1, 0, 0)]=0.685094281059*x_ref[0]**o + (-0.0516148883709)*x_ref[0] + (-0.991865407359)*x_ref[1]**o + (0.140269619474)*x_ref[1]
        arg[(1, 0, 1)]=0.55993788063*x[0]**o + (-0.264748799903)*x[0] + (-0.673327147044)*x[1]**o + (0.991202808614)*x[1]
        ref[(1, 0, 1)]=0.55993788063*x_ref[0]**o + (-0.264748799903)*x_ref[0] + (-0.673327147044)*x_ref[1]**o + (0.991202808614)*x_ref[1]
        arg[(1, 1, 0)]=0.306747561574*x[0]**o + (-0.346653647542)*x[0] + (0.0611794510952)*x[1]**o + (0.272351539188)*x[1]
        ref[(1, 1, 0)]=0.306747561574*x_ref[0]**o + (-0.346653647542)*x_ref[0] + (0.0611794510952)*x_ref[1]**o + (0.272351539188)*x_ref[1]
        arg[(1, 1, 1)]=-0.169312401227*x[0]**o + (-0.00540987471869)*x[0] + (-0.0164977116289)*x[1]**o + (0.704925009683)*x[1]
        ref[(1, 1, 1)]=-0.169312401227*x_ref[0]**o + (-0.00540987471869)*x_ref[0] + (-0.0164977116289)*x_ref[1]**o + (0.704925009683)*x_ref[1]
        arg[(1, 2, 0)]=-0.448138974828*x[0]**o + (0.431758344205)*x[0] + (-0.245481078247)*x[1]**o + (-0.709014758627)*x[1]
        ref[(1, 2, 0)]=-0.448138974828*x_ref[0]**o + (0.431758344205)*x_ref[0] + (-0.245481078247)*x_ref[1]**o + (-0.709014758627)*x_ref[1]
        arg[(1, 2, 1)]=-0.621803241988*x[0]**o + (-0.680375793542)*x[0] + (-0.256506979747)*x[1]**o + (0.791256543865)*x[1]
        ref[(1, 2, 1)]=-0.621803241988*x_ref[0]**o + (-0.680375793542)*x_ref[0] + (-0.256506979747)*x_ref[1]**o + (0.791256543865)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.53921287176*x[2]**o + (0.657096887107)*x[2]
            ref[(0, 0, 0)]+=0.53921287176*x_ref[2]**o + (0.657096887107)*x_ref[2]
            arg[(0, 0, 1)]+=-0.689181548551*x[2]**o + (-0.433345060032)*x[2]
            ref[(0, 0, 1)]+=-0.689181548551*x_ref[2]**o + (-0.433345060032)*x_ref[2]
            arg[(0, 1, 0)]+=0.342171723781*x[2]**o + (-0.874702068899)*x[2]
            ref[(0, 1, 0)]+=0.342171723781*x_ref[2]**o + (-0.874702068899)*x_ref[2]
            arg[(0, 1, 1)]+=0.503655009404*x[2]**o + (-0.293295216259)*x[2]
            ref[(0, 1, 1)]+=0.503655009404*x_ref[2]**o + (-0.293295216259)*x_ref[2]
            arg[(0, 2, 0)]+=-0.835592400828*x[2]**o + (-0.793431781558)*x[2]
            ref[(0, 2, 0)]+=-0.835592400828*x_ref[2]**o + (-0.793431781558)*x_ref[2]
            arg[(0, 2, 1)]+=0.534196715827*x[2]**o + (0.998867693947)*x[2]
            ref[(0, 2, 1)]+=0.534196715827*x_ref[2]**o + (0.998867693947)*x_ref[2]
            arg[(1, 0, 0)]+=-0.129667054366*x[2]**o + (0.395492303533)*x[2]
            ref[(1, 0, 0)]+=-0.129667054366*x_ref[2]**o + (0.395492303533)*x_ref[2]
            arg[(1, 0, 1)]+=-0.835313301037*x[2]**o + (0.968910158871)*x[2]
            ref[(1, 0, 1)]+=-0.835313301037*x_ref[2]**o + (0.968910158871)*x_ref[2]
            arg[(1, 1, 0)]+=0.537874663369*x[2]**o + (0.621363428923)*x[2]
            ref[(1, 1, 0)]+=0.537874663369*x_ref[2]**o + (0.621363428923)*x_ref[2]
            arg[(1, 1, 1)]+=0.736890850191*x[2]**o + (0.545770395531)*x[2]
            ref[(1, 1, 1)]+=0.736890850191*x_ref[2]**o + (0.545770395531)*x_ref[2]
            arg[(1, 2, 0)]+=0.422560330606*x[2]**o + (0.449457143091)*x[2]
            ref[(1, 2, 0)]+=0.422560330606*x_ref[2]**o + (0.449457143091)*x_ref[2]
            arg[(1, 2, 1)]+=0.198493781795*x[2]**o + (0.614940523485)*x[2]
            ref[(1, 2, 1)]+=0.198493781795*x_ref[2]**o + (0.614940523485)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnBoundary to ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 4, 4),w)
        ref = Data(0,(4, 2, 4, 4),w_ref)
        arg[(0, 0, 0, 0)]=0.684590689455*x[0]**o + (0.152230307134)*x[0] + (-0.110706660536)*x[1]**o + (0.224367937045)*x[1]
        ref[(0, 0, 0, 0)]=0.684590689455*x_ref[0]**o + (0.152230307134)*x_ref[0] + (-0.110706660536)*x_ref[1]**o + (0.224367937045)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.0355233606382*x[0]**o + (0.0274257537088)*x[0] + (0.56045419877)*x[1]**o + (0.400293632689)*x[1]
        ref[(0, 0, 0, 1)]=0.0355233606382*x_ref[0]**o + (0.0274257537088)*x_ref[0] + (0.56045419877)*x_ref[1]**o + (0.400293632689)*x_ref[1]
        arg[(0, 0, 0, 2)]=-0.977007984269*x[0]**o + (-0.52670775231)*x[0] + (0.522474393424)*x[1]**o + (-0.00745481113546)*x[1]
        ref[(0, 0, 0, 2)]=-0.977007984269*x_ref[0]**o + (-0.52670775231)*x_ref[0] + (0.522474393424)*x_ref[1]**o + (-0.00745481113546)*x_ref[1]
        arg[(0, 0, 0, 3)]=-0.570562809327*x[0]**o + (-0.497859119287)*x[0] + (-0.870891263322)*x[1]**o + (0.0666528564367)*x[1]
        ref[(0, 0, 0, 3)]=-0.570562809327*x_ref[0]**o + (-0.497859119287)*x_ref[0] + (-0.870891263322)*x_ref[1]**o + (0.0666528564367)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.896985756879*x[0]**o + (-0.993363256262)*x[0] + (-0.706745276992)*x[1]**o + (0.767509930059)*x[1]
        ref[(0, 0, 1, 0)]=0.896985756879*x_ref[0]**o + (-0.993363256262)*x_ref[0] + (-0.706745276992)*x_ref[1]**o + (0.767509930059)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.930818240201*x[0]**o + (0.798849847518)*x[0] + (-0.74203698111)*x[1]**o + (-0.320585938304)*x[1]
        ref[(0, 0, 1, 1)]=0.930818240201*x_ref[0]**o + (0.798849847518)*x_ref[0] + (-0.74203698111)*x_ref[1]**o + (-0.320585938304)*x_ref[1]
        arg[(0, 0, 1, 2)]=-0.243310416728*x[0]**o + (-0.568119524309)*x[0] + (0.692811111742)*x[1]**o + (0.198465425851)*x[1]
        ref[(0, 0, 1, 2)]=-0.243310416728*x_ref[0]**o + (-0.568119524309)*x_ref[0] + (0.692811111742)*x_ref[1]**o + (0.198465425851)*x_ref[1]
        arg[(0, 0, 1, 3)]=-0.254138931018*x[0]**o + (-0.389859222198)*x[0] + (0.458207323758)*x[1]**o + (0.763497548911)*x[1]
        ref[(0, 0, 1, 3)]=-0.254138931018*x_ref[0]**o + (-0.389859222198)*x_ref[0] + (0.458207323758)*x_ref[1]**o + (0.763497548911)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.231640092887*x[0]**o + (-0.545692950006)*x[0] + (-0.248393567865)*x[1]**o + (-0.788516140097)*x[1]
        ref[(0, 0, 2, 0)]=-0.231640092887*x_ref[0]**o + (-0.545692950006)*x_ref[0] + (-0.248393567865)*x_ref[1]**o + (-0.788516140097)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.899780181918*x[0]**o + (-0.096363177632)*x[0] + (-0.80209465258)*x[1]**o + (0.745903251673)*x[1]
        ref[(0, 0, 2, 1)]=-0.899780181918*x_ref[0]**o + (-0.096363177632)*x_ref[0] + (-0.80209465258)*x_ref[1]**o + (0.745903251673)*x_ref[1]
        arg[(0, 0, 2, 2)]=0.165803000421*x[0]**o + (0.209939332126)*x[0] + (0.863843392848)*x[1]**o + (-0.0451650267261)*x[1]
        ref[(0, 0, 2, 2)]=0.165803000421*x_ref[0]**o + (0.209939332126)*x_ref[0] + (0.863843392848)*x_ref[1]**o + (-0.0451650267261)*x_ref[1]
        arg[(0, 0, 2, 3)]=0.462312333976*x[0]**o + (-0.920592605372)*x[0] + (0.444012535351)*x[1]**o + (0.916694060732)*x[1]
        ref[(0, 0, 2, 3)]=0.462312333976*x_ref[0]**o + (-0.920592605372)*x_ref[0] + (0.444012535351)*x_ref[1]**o + (0.916694060732)*x_ref[1]
        arg[(0, 0, 3, 0)]=0.796106071102*x[0]**o + (-0.814593601397)*x[0] + (0.642146040034)*x[1]**o + (0.687145065226)*x[1]
        ref[(0, 0, 3, 0)]=0.796106071102*x_ref[0]**o + (-0.814593601397)*x_ref[0] + (0.642146040034)*x_ref[1]**o + (0.687145065226)*x_ref[1]
        arg[(0, 0, 3, 1)]=-0.0252961213026*x[0]**o + (0.362708269875)*x[0] + (0.674213701663)*x[1]**o + (0.0565916159926)*x[1]
        ref[(0, 0, 3, 1)]=-0.0252961213026*x_ref[0]**o + (0.362708269875)*x_ref[0] + (0.674213701663)*x_ref[1]**o + (0.0565916159926)*x_ref[1]
        arg[(0, 0, 3, 2)]=-0.591038438807*x[0]**o + (0.537885571579)*x[0] + (-0.485154156484)*x[1]**o + (-0.832485391449)*x[1]
        ref[(0, 0, 3, 2)]=-0.591038438807*x_ref[0]**o + (0.537885571579)*x_ref[0] + (-0.485154156484)*x_ref[1]**o + (-0.832485391449)*x_ref[1]
        arg[(0, 0, 3, 3)]=0.760278129509*x[0]**o + (-0.556890849123)*x[0] + (-0.748250134879)*x[1]**o + (-0.0194106387808)*x[1]
        ref[(0, 0, 3, 3)]=0.760278129509*x_ref[0]**o + (-0.556890849123)*x_ref[0] + (-0.748250134879)*x_ref[1]**o + (-0.0194106387808)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.856211700086*x[0]**o + (0.326094700145)*x[0] + (-0.537940620466)*x[1]**o + (0.479628965963)*x[1]
        ref[(0, 1, 0, 0)]=0.856211700086*x_ref[0]**o + (0.326094700145)*x_ref[0] + (-0.537940620466)*x_ref[1]**o + (0.479628965963)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.526432431727*x[0]**o + (0.606856487788)*x[0] + (-0.760500292866)*x[1]**o + (-0.515546773913)*x[1]
        ref[(0, 1, 0, 1)]=0.526432431727*x_ref[0]**o + (0.606856487788)*x_ref[0] + (-0.760500292866)*x_ref[1]**o + (-0.515546773913)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.168005756582*x[0]**o + (-0.365846608394)*x[0] + (-0.0245115487785)*x[1]**o + (0.211511404102)*x[1]
        ref[(0, 1, 0, 2)]=0.168005756582*x_ref[0]**o + (-0.365846608394)*x_ref[0] + (-0.0245115487785)*x_ref[1]**o + (0.211511404102)*x_ref[1]
        arg[(0, 1, 0, 3)]=0.950031195605*x[0]**o + (0.801292864562)*x[0] + (0.750514723793)*x[1]**o + (0.00708579343701)*x[1]
        ref[(0, 1, 0, 3)]=0.950031195605*x_ref[0]**o + (0.801292864562)*x_ref[0] + (0.750514723793)*x_ref[1]**o + (0.00708579343701)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.255654337181*x[0]**o + (-0.153837136569)*x[0] + (-0.969468326857)*x[1]**o + (-0.305426473502)*x[1]
        ref[(0, 1, 1, 0)]=-0.255654337181*x_ref[0]**o + (-0.153837136569)*x_ref[0] + (-0.969468326857)*x_ref[1]**o + (-0.305426473502)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.299754766629*x[0]**o + (-0.939407841682)*x[0] + (-0.0211003371983)*x[1]**o + (-0.53822113207)*x[1]
        ref[(0, 1, 1, 1)]=-0.299754766629*x_ref[0]**o + (-0.939407841682)*x_ref[0] + (-0.0211003371983)*x_ref[1]**o + (-0.53822113207)*x_ref[1]
        arg[(0, 1, 1, 2)]=0.15501062459*x[0]**o + (0.542098957219)*x[0] + (-0.116976442496)*x[1]**o + (0.98533077746)*x[1]
        ref[(0, 1, 1, 2)]=0.15501062459*x_ref[0]**o + (0.542098957219)*x_ref[0] + (-0.116976442496)*x_ref[1]**o + (0.98533077746)*x_ref[1]
        arg[(0, 1, 1, 3)]=0.515184876131*x[0]**o + (0.592890852105)*x[0] + (0.221216828923)*x[1]**o + (-0.698251159592)*x[1]
        ref[(0, 1, 1, 3)]=0.515184876131*x_ref[0]**o + (0.592890852105)*x_ref[0] + (0.221216828923)*x_ref[1]**o + (-0.698251159592)*x_ref[1]
        arg[(0, 1, 2, 0)]=0.0135964447243*x[0]**o + (0.896033603409)*x[0] + (-0.0810999050971)*x[1]**o + (-0.987451001929)*x[1]
        ref[(0, 1, 2, 0)]=0.0135964447243*x_ref[0]**o + (0.896033603409)*x_ref[0] + (-0.0810999050971)*x_ref[1]**o + (-0.987451001929)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.149210652133*x[0]**o + (-0.366373950567)*x[0] + (-0.863373194251)*x[1]**o + (-0.804662790265)*x[1]
        ref[(0, 1, 2, 1)]=0.149210652133*x_ref[0]**o + (-0.366373950567)*x_ref[0] + (-0.863373194251)*x_ref[1]**o + (-0.804662790265)*x_ref[1]
        arg[(0, 1, 2, 2)]=-0.656575482913*x[0]**o + (0.481210233936)*x[0] + (0.779234778396)*x[1]**o + (0.342140982048)*x[1]
        ref[(0, 1, 2, 2)]=-0.656575482913*x_ref[0]**o + (0.481210233936)*x_ref[0] + (0.779234778396)*x_ref[1]**o + (0.342140982048)*x_ref[1]
        arg[(0, 1, 2, 3)]=-0.241888712852*x[0]**o + (-0.255849951332)*x[0] + (0.0965189697854)*x[1]**o + (-0.999705039782)*x[1]
        ref[(0, 1, 2, 3)]=-0.241888712852*x_ref[0]**o + (-0.255849951332)*x_ref[0] + (0.0965189697854)*x_ref[1]**o + (-0.999705039782)*x_ref[1]
        arg[(0, 1, 3, 0)]=0.755404521059*x[0]**o + (0.666684521576)*x[0] + (0.982321381348)*x[1]**o + (0.331057961022)*x[1]
        ref[(0, 1, 3, 0)]=0.755404521059*x_ref[0]**o + (0.666684521576)*x_ref[0] + (0.982321381348)*x_ref[1]**o + (0.331057961022)*x_ref[1]
        arg[(0, 1, 3, 1)]=-0.862280574348*x[0]**o + (0.819002495009)*x[0] + (0.694290677873)*x[1]**o + (0.319823627248)*x[1]
        ref[(0, 1, 3, 1)]=-0.862280574348*x_ref[0]**o + (0.819002495009)*x_ref[0] + (0.694290677873)*x_ref[1]**o + (0.319823627248)*x_ref[1]
        arg[(0, 1, 3, 2)]=0.615731398278*x[0]**o + (0.66051860638)*x[0] + (-0.145464257818)*x[1]**o + (-0.911928517088)*x[1]
        ref[(0, 1, 3, 2)]=0.615731398278*x_ref[0]**o + (0.66051860638)*x_ref[0] + (-0.145464257818)*x_ref[1]**o + (-0.911928517088)*x_ref[1]
        arg[(0, 1, 3, 3)]=0.753064158728*x[0]**o + (0.857792599896)*x[0] + (-0.901109834503)*x[1]**o + (-0.914391055892)*x[1]
        ref[(0, 1, 3, 3)]=0.753064158728*x_ref[0]**o + (0.857792599896)*x_ref[0] + (-0.901109834503)*x_ref[1]**o + (-0.914391055892)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.7058234673*x[0]**o + (-0.755715619532)*x[0] + (-0.945525949815)*x[1]**o + (-0.341352524135)*x[1]
        ref[(1, 0, 0, 0)]=0.7058234673*x_ref[0]**o + (-0.755715619532)*x_ref[0] + (-0.945525949815)*x_ref[1]**o + (-0.341352524135)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.674894627822*x[0]**o + (-0.183661260711)*x[0] + (-0.203490477857)*x[1]**o + (-0.368417681616)*x[1]
        ref[(1, 0, 0, 1)]=0.674894627822*x_ref[0]**o + (-0.183661260711)*x_ref[0] + (-0.203490477857)*x_ref[1]**o + (-0.368417681616)*x_ref[1]
        arg[(1, 0, 0, 2)]=-0.400581260086*x[0]**o + (0.602594109222)*x[0] + (0.17508810448)*x[1]**o + (-0.399688613495)*x[1]
        ref[(1, 0, 0, 2)]=-0.400581260086*x_ref[0]**o + (0.602594109222)*x_ref[0] + (0.17508810448)*x_ref[1]**o + (-0.399688613495)*x_ref[1]
        arg[(1, 0, 0, 3)]=-0.580078376919*x[0]**o + (-0.0203426694588)*x[0] + (-0.772209373923)*x[1]**o + (-0.994785552175)*x[1]
        ref[(1, 0, 0, 3)]=-0.580078376919*x_ref[0]**o + (-0.0203426694588)*x_ref[0] + (-0.772209373923)*x_ref[1]**o + (-0.994785552175)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.639370594501*x[0]**o + (0.07071959782)*x[0] + (0.598862393805)*x[1]**o + (-0.767204847078)*x[1]
        ref[(1, 0, 1, 0)]=0.639370594501*x_ref[0]**o + (0.07071959782)*x_ref[0] + (0.598862393805)*x_ref[1]**o + (-0.767204847078)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.554104841734*x[0]**o + (0.484516843876)*x[0] + (-0.376386375707)*x[1]**o + (-0.2238919487)*x[1]
        ref[(1, 0, 1, 1)]=0.554104841734*x_ref[0]**o + (0.484516843876)*x_ref[0] + (-0.376386375707)*x_ref[1]**o + (-0.2238919487)*x_ref[1]
        arg[(1, 0, 1, 2)]=-0.00265231182636*x[0]**o + (-0.812185079106)*x[0] + (0.640275115693)*x[1]**o + (0.601282759634)*x[1]
        ref[(1, 0, 1, 2)]=-0.00265231182636*x_ref[0]**o + (-0.812185079106)*x_ref[0] + (0.640275115693)*x_ref[1]**o + (0.601282759634)*x_ref[1]
        arg[(1, 0, 1, 3)]=-0.769283587909*x[0]**o + (-0.141002577305)*x[0] + (0.106719783919)*x[1]**o + (-0.633698434357)*x[1]
        ref[(1, 0, 1, 3)]=-0.769283587909*x_ref[0]**o + (-0.141002577305)*x_ref[0] + (0.106719783919)*x_ref[1]**o + (-0.633698434357)*x_ref[1]
        arg[(1, 0, 2, 0)]=0.880075604734*x[0]**o + (-0.229977204247)*x[0] + (-0.484030917173)*x[1]**o + (0.0483817031168)*x[1]
        ref[(1, 0, 2, 0)]=0.880075604734*x_ref[0]**o + (-0.229977204247)*x_ref[0] + (-0.484030917173)*x_ref[1]**o + (0.0483817031168)*x_ref[1]
        arg[(1, 0, 2, 1)]=-0.959666413939*x[0]**o + (0.245114300563)*x[0] + (-0.349208445957)*x[1]**o + (-0.394760054659)*x[1]
        ref[(1, 0, 2, 1)]=-0.959666413939*x_ref[0]**o + (0.245114300563)*x_ref[0] + (-0.349208445957)*x_ref[1]**o + (-0.394760054659)*x_ref[1]
        arg[(1, 0, 2, 2)]=-0.859451848067*x[0]**o + (0.764165589557)*x[0] + (0.745684658353)*x[1]**o + (0.646540999241)*x[1]
        ref[(1, 0, 2, 2)]=-0.859451848067*x_ref[0]**o + (0.764165589557)*x_ref[0] + (0.745684658353)*x_ref[1]**o + (0.646540999241)*x_ref[1]
        arg[(1, 0, 2, 3)]=-0.62383432807*x[0]**o + (0.0332152651061)*x[0] + (-0.843323708867)*x[1]**o + (0.685613845625)*x[1]
        ref[(1, 0, 2, 3)]=-0.62383432807*x_ref[0]**o + (0.0332152651061)*x_ref[0] + (-0.843323708867)*x_ref[1]**o + (0.685613845625)*x_ref[1]
        arg[(1, 0, 3, 0)]=-0.563799270497*x[0]**o + (-0.85989857225)*x[0] + (0.130455638712)*x[1]**o + (-0.431093905712)*x[1]
        ref[(1, 0, 3, 0)]=-0.563799270497*x_ref[0]**o + (-0.85989857225)*x_ref[0] + (0.130455638712)*x_ref[1]**o + (-0.431093905712)*x_ref[1]
        arg[(1, 0, 3, 1)]=-0.968606753825*x[0]**o + (0.497460582518)*x[0] + (-0.0609620569583)*x[1]**o + (-0.580964491072)*x[1]
        ref[(1, 0, 3, 1)]=-0.968606753825*x_ref[0]**o + (0.497460582518)*x_ref[0] + (-0.0609620569583)*x_ref[1]**o + (-0.580964491072)*x_ref[1]
        arg[(1, 0, 3, 2)]=-0.81035621603*x[0]**o + (-0.70947659735)*x[0] + (-0.17401774449)*x[1]**o + (-0.991676803738)*x[1]
        ref[(1, 0, 3, 2)]=-0.81035621603*x_ref[0]**o + (-0.70947659735)*x_ref[0] + (-0.17401774449)*x_ref[1]**o + (-0.991676803738)*x_ref[1]
        arg[(1, 0, 3, 3)]=-0.720415269364*x[0]**o + (-0.836466297422)*x[0] + (-0.679788824047)*x[1]**o + (-0.199653299058)*x[1]
        ref[(1, 0, 3, 3)]=-0.720415269364*x_ref[0]**o + (-0.836466297422)*x_ref[0] + (-0.679788824047)*x_ref[1]**o + (-0.199653299058)*x_ref[1]
        arg[(1, 1, 0, 0)]=0.658552222644*x[0]**o + (-0.476132564091)*x[0] + (-0.0930927778957)*x[1]**o + (0.186393497355)*x[1]
        ref[(1, 1, 0, 0)]=0.658552222644*x_ref[0]**o + (-0.476132564091)*x_ref[0] + (-0.0930927778957)*x_ref[1]**o + (0.186393497355)*x_ref[1]
        arg[(1, 1, 0, 1)]=-0.662287925216*x[0]**o + (0.445692102685)*x[0] + (-0.891739344204)*x[1]**o + (-0.500396363859)*x[1]
        ref[(1, 1, 0, 1)]=-0.662287925216*x_ref[0]**o + (0.445692102685)*x_ref[0] + (-0.891739344204)*x_ref[1]**o + (-0.500396363859)*x_ref[1]
        arg[(1, 1, 0, 2)]=-0.710601191538*x[0]**o + (0.897085028898)*x[0] + (-0.645652384668)*x[1]**o + (0.853853852044)*x[1]
        ref[(1, 1, 0, 2)]=-0.710601191538*x_ref[0]**o + (0.897085028898)*x_ref[0] + (-0.645652384668)*x_ref[1]**o + (0.853853852044)*x_ref[1]
        arg[(1, 1, 0, 3)]=0.271135255811*x[0]**o + (-0.894057563117)*x[0] + (0.585006313115)*x[1]**o + (0.861107077616)*x[1]
        ref[(1, 1, 0, 3)]=0.271135255811*x_ref[0]**o + (-0.894057563117)*x_ref[0] + (0.585006313115)*x_ref[1]**o + (0.861107077616)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.862102911179*x[0]**o + (-0.449917432693)*x[0] + (-0.0595087950707)*x[1]**o + (-0.00064656720643)*x[1]
        ref[(1, 1, 1, 0)]=0.862102911179*x_ref[0]**o + (-0.449917432693)*x_ref[0] + (-0.0595087950707)*x_ref[1]**o + (-0.00064656720643)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.364998471654*x[0]**o + (-0.715454173783)*x[0] + (-0.201186982851)*x[1]**o + (0.470360543753)*x[1]
        ref[(1, 1, 1, 1)]=-0.364998471654*x_ref[0]**o + (-0.715454173783)*x_ref[0] + (-0.201186982851)*x_ref[1]**o + (0.470360543753)*x_ref[1]
        arg[(1, 1, 1, 2)]=0.744759708815*x[0]**o + (-0.545510216923)*x[0] + (-0.983326074328)*x[1]**o + (0.0123352747796)*x[1]
        ref[(1, 1, 1, 2)]=0.744759708815*x_ref[0]**o + (-0.545510216923)*x_ref[0] + (-0.983326074328)*x_ref[1]**o + (0.0123352747796)*x_ref[1]
        arg[(1, 1, 1, 3)]=0.692657765435*x[0]**o + (-0.39506964254)*x[0] + (-0.245884282032)*x[1]**o + (-0.468510364974)*x[1]
        ref[(1, 1, 1, 3)]=0.692657765435*x_ref[0]**o + (-0.39506964254)*x_ref[0] + (-0.245884282032)*x_ref[1]**o + (-0.468510364974)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.991866263649*x[0]**o + (-0.883203670811)*x[0] + (0.0883638794577)*x[1]**o + (0.648121317702)*x[1]
        ref[(1, 1, 2, 0)]=-0.991866263649*x_ref[0]**o + (-0.883203670811)*x_ref[0] + (0.0883638794577)*x_ref[1]**o + (0.648121317702)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.357314948145*x[0]**o + (0.346795872609)*x[0] + (-0.609080151465)*x[1]**o + (-0.403424680455)*x[1]
        ref[(1, 1, 2, 1)]=-0.357314948145*x_ref[0]**o + (0.346795872609)*x_ref[0] + (-0.609080151465)*x_ref[1]**o + (-0.403424680455)*x_ref[1]
        arg[(1, 1, 2, 2)]=0.928851581353*x[0]**o + (-0.867721839599)*x[0] + (-0.858856638291)*x[1]**o + (-0.867711920775)*x[1]
        ref[(1, 1, 2, 2)]=0.928851581353*x_ref[0]**o + (-0.867721839599)*x_ref[0] + (-0.858856638291)*x_ref[1]**o + (-0.867711920775)*x_ref[1]
        arg[(1, 1, 2, 3)]=-0.872431332378*x[0]**o + (0.884044148325)*x[0] + (0.987149748538)*x[1]**o + (0.373606343675)*x[1]
        ref[(1, 1, 2, 3)]=-0.872431332378*x_ref[0]**o + (0.884044148325)*x_ref[0] + (0.987149748538)*x_ref[1]**o + (0.373606343675)*x_ref[1]
        arg[(1, 1, 3, 0)]=-0.791751494784*x[0]**o + (0.461950506977)*x[0] + (-0.149449939128)*x[1]**o + (0.00953488024937)*x[1]
        ref[(1, 1, 3, 0)]=-0.791751494784*x_ref[0]**o + (0.461950506977)*x_ref[0] + (-0.149449939128)*x_ref[1]**o + (0.00953488024937)*x_ref[1]
        arg[(1, 1, 3, 1)]=0.022783703148*x[0]**o + (0.237391853356)*x[0] + (-0.280799410121)*x[1]**o + (0.24614045028)*x[1]
        ref[(1, 1, 3, 1)]=0.022783703148*x_ref[0]**o + (0.237391853356)*x_ref[0] + (-0.280799410121)*x_ref[1]**o + (0.24614045028)*x_ref[1]
        arg[(1, 1, 3, 2)]=-0.287199078732*x[0]**o + (0.185519115085)*x[0] + (0.274525169789)*x[1]**o + (0.52832959824)*x[1]
        ref[(1, 1, 3, 2)]=-0.287199078732*x_ref[0]**o + (0.185519115085)*x_ref[0] + (0.274525169789)*x_ref[1]**o + (0.52832959824)*x_ref[1]
        arg[(1, 1, 3, 3)]=-0.536257430418*x[0]**o + (0.845502753309)*x[0] + (-0.631589080266)*x[1]**o + (0.276713340427)*x[1]
        ref[(1, 1, 3, 3)]=-0.536257430418*x_ref[0]**o + (0.845502753309)*x_ref[0] + (-0.631589080266)*x_ref[1]**o + (0.276713340427)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.59609824857*x[0]**o + (-0.299985586563)*x[0] + (0.424021123451)*x[1]**o + (0.547671356096)*x[1]
        ref[(2, 0, 0, 0)]=0.59609824857*x_ref[0]**o + (-0.299985586563)*x_ref[0] + (0.424021123451)*x_ref[1]**o + (0.547671356096)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.517965740315*x[0]**o + (-0.677570325264)*x[0] + (-0.721542474943)*x[1]**o + (-0.68101428167)*x[1]
        ref[(2, 0, 0, 1)]=0.517965740315*x_ref[0]**o + (-0.677570325264)*x_ref[0] + (-0.721542474943)*x_ref[1]**o + (-0.68101428167)*x_ref[1]
        arg[(2, 0, 0, 2)]=-0.0234525644586*x[0]**o + (-0.532529358089)*x[0] + (0.261947370765)*x[1]**o + (-0.670869245859)*x[1]
        ref[(2, 0, 0, 2)]=-0.0234525644586*x_ref[0]**o + (-0.532529358089)*x_ref[0] + (0.261947370765)*x_ref[1]**o + (-0.670869245859)*x_ref[1]
        arg[(2, 0, 0, 3)]=-0.706547888365*x[0]**o + (-0.723754912723)*x[0] + (-0.522844607276)*x[1]**o + (0.18741054019)*x[1]
        ref[(2, 0, 0, 3)]=-0.706547888365*x_ref[0]**o + (-0.723754912723)*x_ref[0] + (-0.522844607276)*x_ref[1]**o + (0.18741054019)*x_ref[1]
        arg[(2, 0, 1, 0)]=-0.42239008323*x[0]**o + (0.33118288666)*x[0] + (0.15229448693)*x[1]**o + (0.52874578847)*x[1]
        ref[(2, 0, 1, 0)]=-0.42239008323*x_ref[0]**o + (0.33118288666)*x_ref[0] + (0.15229448693)*x_ref[1]**o + (0.52874578847)*x_ref[1]
        arg[(2, 0, 1, 1)]=-0.855113903399*x[0]**o + (-0.137647079625)*x[0] + (0.0728819372649)*x[1]**o + (-0.94716406583)*x[1]
        ref[(2, 0, 1, 1)]=-0.855113903399*x_ref[0]**o + (-0.137647079625)*x_ref[0] + (0.0728819372649)*x_ref[1]**o + (-0.94716406583)*x_ref[1]
        arg[(2, 0, 1, 2)]=0.703989638705*x[0]**o + (-0.924789193757)*x[0] + (-0.443445863351)*x[1]**o + (-0.114224287485)*x[1]
        ref[(2, 0, 1, 2)]=0.703989638705*x_ref[0]**o + (-0.924789193757)*x_ref[0] + (-0.443445863351)*x_ref[1]**o + (-0.114224287485)*x_ref[1]
        arg[(2, 0, 1, 3)]=-0.415775325136*x[0]**o + (0.0266515077717)*x[0] + (0.3333029496)*x[1]**o + (-0.0391841288044)*x[1]
        ref[(2, 0, 1, 3)]=-0.415775325136*x_ref[0]**o + (0.0266515077717)*x_ref[0] + (0.3333029496)*x_ref[1]**o + (-0.0391841288044)*x_ref[1]
        arg[(2, 0, 2, 0)]=0.319913985729*x[0]**o + (-0.778446783673)*x[0] + (-0.453407239263)*x[1]**o + (-0.797587621967)*x[1]
        ref[(2, 0, 2, 0)]=0.319913985729*x_ref[0]**o + (-0.778446783673)*x_ref[0] + (-0.453407239263)*x_ref[1]**o + (-0.797587621967)*x_ref[1]
        arg[(2, 0, 2, 1)]=-0.0306199425954*x[0]**o + (0.0493707765118)*x[0] + (-0.952097122531)*x[1]**o + (-0.205746712511)*x[1]
        ref[(2, 0, 2, 1)]=-0.0306199425954*x_ref[0]**o + (0.0493707765118)*x_ref[0] + (-0.952097122531)*x_ref[1]**o + (-0.205746712511)*x_ref[1]
        arg[(2, 0, 2, 2)]=-0.306027452261*x[0]**o + (-0.718526931386)*x[0] + (0.524219290121)*x[1]**o + (0.165118202838)*x[1]
        ref[(2, 0, 2, 2)]=-0.306027452261*x_ref[0]**o + (-0.718526931386)*x_ref[0] + (0.524219290121)*x_ref[1]**o + (0.165118202838)*x_ref[1]
        arg[(2, 0, 2, 3)]=0.295368880357*x[0]**o + (0.223061711398)*x[0] + (0.151469598457)*x[1]**o + (0.962558676036)*x[1]
        ref[(2, 0, 2, 3)]=0.295368880357*x_ref[0]**o + (0.223061711398)*x_ref[0] + (0.151469598457)*x_ref[1]**o + (0.962558676036)*x_ref[1]
        arg[(2, 0, 3, 0)]=-0.98049051449*x[0]**o + (0.194608354291)*x[0] + (-0.288859383589)*x[1]**o + (0.872213733385)*x[1]
        ref[(2, 0, 3, 0)]=-0.98049051449*x_ref[0]**o + (0.194608354291)*x_ref[0] + (-0.288859383589)*x_ref[1]**o + (0.872213733385)*x_ref[1]
        arg[(2, 0, 3, 1)]=0.799943317366*x[0]**o + (0.276400327661)*x[0] + (0.87771494202)*x[1]**o + (0.736805230377)*x[1]
        ref[(2, 0, 3, 1)]=0.799943317366*x_ref[0]**o + (0.276400327661)*x_ref[0] + (0.87771494202)*x_ref[1]**o + (0.736805230377)*x_ref[1]
        arg[(2, 0, 3, 2)]=-0.820742708677*x[0]**o + (-0.56161596308)*x[0] + (-0.0386181582783)*x[1]**o + (0.392756517174)*x[1]
        ref[(2, 0, 3, 2)]=-0.820742708677*x_ref[0]**o + (-0.56161596308)*x_ref[0] + (-0.0386181582783)*x_ref[1]**o + (0.392756517174)*x_ref[1]
        arg[(2, 0, 3, 3)]=0.772587730896*x[0]**o + (0.556993939438)*x[0] + (-0.529095751826)*x[1]**o + (-0.129377576552)*x[1]
        ref[(2, 0, 3, 3)]=0.772587730896*x_ref[0]**o + (0.556993939438)*x_ref[0] + (-0.529095751826)*x_ref[1]**o + (-0.129377576552)*x_ref[1]
        arg[(2, 1, 0, 0)]=-0.986430661937*x[0]**o + (0.047991279217)*x[0] + (0.0429684877471)*x[1]**o + (-0.612166399451)*x[1]
        ref[(2, 1, 0, 0)]=-0.986430661937*x_ref[0]**o + (0.047991279217)*x_ref[0] + (0.0429684877471)*x_ref[1]**o + (-0.612166399451)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.30302939003*x[0]**o + (0.336342129639)*x[0] + (-0.397928491087)*x[1]**o + (-0.397005860325)*x[1]
        ref[(2, 1, 0, 1)]=0.30302939003*x_ref[0]**o + (0.336342129639)*x_ref[0] + (-0.397928491087)*x_ref[1]**o + (-0.397005860325)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.864794960987*x[0]**o + (-1.11485025323e-05)*x[0] + (-0.963970411171)*x[1]**o + (0.273714216096)*x[1]
        ref[(2, 1, 0, 2)]=-0.864794960987*x_ref[0]**o + (-1.11485025323e-05)*x_ref[0] + (-0.963970411171)*x_ref[1]**o + (0.273714216096)*x_ref[1]
        arg[(2, 1, 0, 3)]=-0.458138952573*x[0]**o + (0.429276078472)*x[0] + (0.180857676632)*x[1]**o + (0.395157676128)*x[1]
        ref[(2, 1, 0, 3)]=-0.458138952573*x_ref[0]**o + (0.429276078472)*x_ref[0] + (0.180857676632)*x_ref[1]**o + (0.395157676128)*x_ref[1]
        arg[(2, 1, 1, 0)]=-0.651698978695*x[0]**o + (0.403359700235)*x[0] + (0.112572862427)*x[1]**o + (-0.385967524063)*x[1]
        ref[(2, 1, 1, 0)]=-0.651698978695*x_ref[0]**o + (0.403359700235)*x_ref[0] + (0.112572862427)*x_ref[1]**o + (-0.385967524063)*x_ref[1]
        arg[(2, 1, 1, 1)]=-0.45584100485*x[0]**o + (-0.761979403253)*x[0] + (0.0735874916608)*x[1]**o + (0.142306398977)*x[1]
        ref[(2, 1, 1, 1)]=-0.45584100485*x_ref[0]**o + (-0.761979403253)*x_ref[0] + (0.0735874916608)*x_ref[1]**o + (0.142306398977)*x_ref[1]
        arg[(2, 1, 1, 2)]=-0.9838099845*x[0]**o + (0.950282863902)*x[0] + (-0.585927009903)*x[1]**o + (-0.243492837615)*x[1]
        ref[(2, 1, 1, 2)]=-0.9838099845*x_ref[0]**o + (0.950282863902)*x_ref[0] + (-0.585927009903)*x_ref[1]**o + (-0.243492837615)*x_ref[1]
        arg[(2, 1, 1, 3)]=-0.653716150466*x[0]**o + (-0.216634677135)*x[0] + (-0.640205149699)*x[1]**o + (0.020295312998)*x[1]
        ref[(2, 1, 1, 3)]=-0.653716150466*x_ref[0]**o + (-0.216634677135)*x_ref[0] + (-0.640205149699)*x_ref[1]**o + (0.020295312998)*x_ref[1]
        arg[(2, 1, 2, 0)]=-0.754575257994*x[0]**o + (0.837741207723)*x[0] + (-0.959873800816)*x[1]**o + (0.5814597086)*x[1]
        ref[(2, 1, 2, 0)]=-0.754575257994*x_ref[0]**o + (0.837741207723)*x_ref[0] + (-0.959873800816)*x_ref[1]**o + (0.5814597086)*x_ref[1]
        arg[(2, 1, 2, 1)]=0.470516076219*x[0]**o + (0.247856132764)*x[0] + (0.520057189982)*x[1]**o + (0.0469925025967)*x[1]
        ref[(2, 1, 2, 1)]=0.470516076219*x_ref[0]**o + (0.247856132764)*x_ref[0] + (0.520057189982)*x_ref[1]**o + (0.0469925025967)*x_ref[1]
        arg[(2, 1, 2, 2)]=0.980962622579*x[0]**o + (0.151919937631)*x[0] + (0.504373638065)*x[1]**o + (0.35425460027)*x[1]
        ref[(2, 1, 2, 2)]=0.980962622579*x_ref[0]**o + (0.151919937631)*x_ref[0] + (0.504373638065)*x_ref[1]**o + (0.35425460027)*x_ref[1]
        arg[(2, 1, 2, 3)]=0.666759827809*x[0]**o + (0.916368495288)*x[0] + (0.375324225213)*x[1]**o + (0.187928444338)*x[1]
        ref[(2, 1, 2, 3)]=0.666759827809*x_ref[0]**o + (0.916368495288)*x_ref[0] + (0.375324225213)*x_ref[1]**o + (0.187928444338)*x_ref[1]
        arg[(2, 1, 3, 0)]=0.72377123648*x[0]**o + (0.994621774811)*x[0] + (0.622421795089)*x[1]**o + (-0.385715736046)*x[1]
        ref[(2, 1, 3, 0)]=0.72377123648*x_ref[0]**o + (0.994621774811)*x_ref[0] + (0.622421795089)*x_ref[1]**o + (-0.385715736046)*x_ref[1]
        arg[(2, 1, 3, 1)]=-0.824673554652*x[0]**o + (0.264123139682)*x[0] + (0.141849959038)*x[1]**o + (-0.187374065298)*x[1]
        ref[(2, 1, 3, 1)]=-0.824673554652*x_ref[0]**o + (0.264123139682)*x_ref[0] + (0.141849959038)*x_ref[1]**o + (-0.187374065298)*x_ref[1]
        arg[(2, 1, 3, 2)]=0.174923005759*x[0]**o + (0.069691571853)*x[0] + (-0.00470283482357)*x[1]**o + (0.998557856147)*x[1]
        ref[(2, 1, 3, 2)]=0.174923005759*x_ref[0]**o + (0.069691571853)*x_ref[0] + (-0.00470283482357)*x_ref[1]**o + (0.998557856147)*x_ref[1]
        arg[(2, 1, 3, 3)]=-0.738943682271*x[0]**o + (-0.319834413207)*x[0] + (-0.157935627428)*x[1]**o + (0.0953555465715)*x[1]
        ref[(2, 1, 3, 3)]=-0.738943682271*x_ref[0]**o + (-0.319834413207)*x_ref[0] + (-0.157935627428)*x_ref[1]**o + (0.0953555465715)*x_ref[1]
        arg[(3, 0, 0, 0)]=0.174014677532*x[0]**o + (0.130039057311)*x[0] + (-0.911284538866)*x[1]**o + (-0.656615219931)*x[1]
        ref[(3, 0, 0, 0)]=0.174014677532*x_ref[0]**o + (0.130039057311)*x_ref[0] + (-0.911284538866)*x_ref[1]**o + (-0.656615219931)*x_ref[1]
        arg[(3, 0, 0, 1)]=0.865607315095*x[0]**o + (-0.754769604256)*x[0] + (-0.798420570776)*x[1]**o + (-0.398409522617)*x[1]
        ref[(3, 0, 0, 1)]=0.865607315095*x_ref[0]**o + (-0.754769604256)*x_ref[0] + (-0.798420570776)*x_ref[1]**o + (-0.398409522617)*x_ref[1]
        arg[(3, 0, 0, 2)]=-0.21052633102*x[0]**o + (0.826352645515)*x[0] + (-0.664345852789)*x[1]**o + (0.356506348437)*x[1]
        ref[(3, 0, 0, 2)]=-0.21052633102*x_ref[0]**o + (0.826352645515)*x_ref[0] + (-0.664345852789)*x_ref[1]**o + (0.356506348437)*x_ref[1]
        arg[(3, 0, 0, 3)]=-0.427482742621*x[0]**o + (-0.720765713142)*x[0] + (0.301109600659)*x[1]**o + (-0.50060686218)*x[1]
        ref[(3, 0, 0, 3)]=-0.427482742621*x_ref[0]**o + (-0.720765713142)*x_ref[0] + (0.301109600659)*x_ref[1]**o + (-0.50060686218)*x_ref[1]
        arg[(3, 0, 1, 0)]=-0.187361653619*x[0]**o + (0.883979399325)*x[0] + (-0.885041598035)*x[1]**o + (-0.741408108831)*x[1]
        ref[(3, 0, 1, 0)]=-0.187361653619*x_ref[0]**o + (0.883979399325)*x_ref[0] + (-0.885041598035)*x_ref[1]**o + (-0.741408108831)*x_ref[1]
        arg[(3, 0, 1, 1)]=0.0503733969479*x[0]**o + (-0.164452991574)*x[0] + (0.414036091791)*x[1]**o + (-0.868797345418)*x[1]
        ref[(3, 0, 1, 1)]=0.0503733969479*x_ref[0]**o + (-0.164452991574)*x_ref[0] + (0.414036091791)*x_ref[1]**o + (-0.868797345418)*x_ref[1]
        arg[(3, 0, 1, 2)]=-0.556518448867*x[0]**o + (0.684400176615)*x[0] + (-0.860653233459)*x[1]**o + (0.788871925674)*x[1]
        ref[(3, 0, 1, 2)]=-0.556518448867*x_ref[0]**o + (0.684400176615)*x_ref[0] + (-0.860653233459)*x_ref[1]**o + (0.788871925674)*x_ref[1]
        arg[(3, 0, 1, 3)]=-0.644052869599*x[0]**o + (0.228227633658)*x[0] + (0.7295613236)*x[1]**o + (-0.111671705756)*x[1]
        ref[(3, 0, 1, 3)]=-0.644052869599*x_ref[0]**o + (0.228227633658)*x_ref[0] + (0.7295613236)*x_ref[1]**o + (-0.111671705756)*x_ref[1]
        arg[(3, 0, 2, 0)]=-0.354850425114*x[0]**o + (-0.482583066629)*x[0] + (-0.751653187598)*x[1]**o + (-0.715432647632)*x[1]
        ref[(3, 0, 2, 0)]=-0.354850425114*x_ref[0]**o + (-0.482583066629)*x_ref[0] + (-0.751653187598)*x_ref[1]**o + (-0.715432647632)*x_ref[1]
        arg[(3, 0, 2, 1)]=0.737758761125*x[0]**o + (0.00665853308152)*x[0] + (0.22928686234)*x[1]**o + (-0.973231665991)*x[1]
        ref[(3, 0, 2, 1)]=0.737758761125*x_ref[0]**o + (0.00665853308152)*x_ref[0] + (0.22928686234)*x_ref[1]**o + (-0.973231665991)*x_ref[1]
        arg[(3, 0, 2, 2)]=0.924610171896*x[0]**o + (0.207974044764)*x[0] + (0.336322862165)*x[1]**o + (-0.209502930027)*x[1]
        ref[(3, 0, 2, 2)]=0.924610171896*x_ref[0]**o + (0.207974044764)*x_ref[0] + (0.336322862165)*x_ref[1]**o + (-0.209502930027)*x_ref[1]
        arg[(3, 0, 2, 3)]=-0.84450193087*x[0]**o + (0.565486615756)*x[0] + (0.473026450191)*x[1]**o + (0.0555244689662)*x[1]
        ref[(3, 0, 2, 3)]=-0.84450193087*x_ref[0]**o + (0.565486615756)*x_ref[0] + (0.473026450191)*x_ref[1]**o + (0.0555244689662)*x_ref[1]
        arg[(3, 0, 3, 0)]=0.116964899862*x[0]**o + (-0.900575321515)*x[0] + (0.297483731708)*x[1]**o + (0.633540722849)*x[1]
        ref[(3, 0, 3, 0)]=0.116964899862*x_ref[0]**o + (-0.900575321515)*x_ref[0] + (0.297483731708)*x_ref[1]**o + (0.633540722849)*x_ref[1]
        arg[(3, 0, 3, 1)]=0.742558128881*x[0]**o + (-0.162277773462)*x[0] + (-0.437899475687)*x[1]**o + (0.148881703661)*x[1]
        ref[(3, 0, 3, 1)]=0.742558128881*x_ref[0]**o + (-0.162277773462)*x_ref[0] + (-0.437899475687)*x_ref[1]**o + (0.148881703661)*x_ref[1]
        arg[(3, 0, 3, 2)]=-0.151807828009*x[0]**o + (-0.947992717527)*x[0] + (0.305910174588)*x[1]**o + (-0.40299180759)*x[1]
        ref[(3, 0, 3, 2)]=-0.151807828009*x_ref[0]**o + (-0.947992717527)*x_ref[0] + (0.305910174588)*x_ref[1]**o + (-0.40299180759)*x_ref[1]
        arg[(3, 0, 3, 3)]=0.3080688397*x[0]**o + (-0.730718879981)*x[0] + (-0.24714012516)*x[1]**o + (-0.258543146866)*x[1]
        ref[(3, 0, 3, 3)]=0.3080688397*x_ref[0]**o + (-0.730718879981)*x_ref[0] + (-0.24714012516)*x_ref[1]**o + (-0.258543146866)*x_ref[1]
        arg[(3, 1, 0, 0)]=-0.115316482594*x[0]**o + (0.0963262883061)*x[0] + (0.182383511562)*x[1]**o + (-0.6028507113)*x[1]
        ref[(3, 1, 0, 0)]=-0.115316482594*x_ref[0]**o + (0.0963262883061)*x_ref[0] + (0.182383511562)*x_ref[1]**o + (-0.6028507113)*x_ref[1]
        arg[(3, 1, 0, 1)]=0.777963302996*x[0]**o + (0.0181519596602)*x[0] + (0.142157978721)*x[1]**o + (-0.199344952073)*x[1]
        ref[(3, 1, 0, 1)]=0.777963302996*x_ref[0]**o + (0.0181519596602)*x_ref[0] + (0.142157978721)*x_ref[1]**o + (-0.199344952073)*x_ref[1]
        arg[(3, 1, 0, 2)]=0.79502507094*x[0]**o + (0.0428919263535)*x[0] + (-0.202243211341)*x[1]**o + (-0.106765837851)*x[1]
        ref[(3, 1, 0, 2)]=0.79502507094*x_ref[0]**o + (0.0428919263535)*x_ref[0] + (-0.202243211341)*x_ref[1]**o + (-0.106765837851)*x_ref[1]
        arg[(3, 1, 0, 3)]=0.067746590062*x[0]**o + (-0.375048154709)*x[0] + (0.238044341932)*x[1]**o + (0.790241908867)*x[1]
        ref[(3, 1, 0, 3)]=0.067746590062*x_ref[0]**o + (-0.375048154709)*x_ref[0] + (0.238044341932)*x_ref[1]**o + (0.790241908867)*x_ref[1]
        arg[(3, 1, 1, 0)]=0.200304204055*x[0]**o + (-0.66959937254)*x[0] + (-0.581222762052)*x[1]**o + (-0.210499723609)*x[1]
        ref[(3, 1, 1, 0)]=0.200304204055*x_ref[0]**o + (-0.66959937254)*x_ref[0] + (-0.581222762052)*x_ref[1]**o + (-0.210499723609)*x_ref[1]
        arg[(3, 1, 1, 1)]=-0.837710367481*x[0]**o + (0.630132439796)*x[0] + (-0.90412675154)*x[1]**o + (-0.365065823584)*x[1]
        ref[(3, 1, 1, 1)]=-0.837710367481*x_ref[0]**o + (0.630132439796)*x_ref[0] + (-0.90412675154)*x_ref[1]**o + (-0.365065823584)*x_ref[1]
        arg[(3, 1, 1, 2)]=0.708921127919*x[0]**o + (0.508694880839)*x[0] + (0.608715461235)*x[1]**o + (-0.713936232723)*x[1]
        ref[(3, 1, 1, 2)]=0.708921127919*x_ref[0]**o + (0.508694880839)*x_ref[0] + (0.608715461235)*x_ref[1]**o + (-0.713936232723)*x_ref[1]
        arg[(3, 1, 1, 3)]=0.250321628515*x[0]**o + (0.475342547495)*x[0] + (-0.14051986095)*x[1]**o + (-0.574057610099)*x[1]
        ref[(3, 1, 1, 3)]=0.250321628515*x_ref[0]**o + (0.475342547495)*x_ref[0] + (-0.14051986095)*x_ref[1]**o + (-0.574057610099)*x_ref[1]
        arg[(3, 1, 2, 0)]=0.727732632533*x[0]**o + (-0.291422763427)*x[0] + (0.107405030174)*x[1]**o + (-0.149966375283)*x[1]
        ref[(3, 1, 2, 0)]=0.727732632533*x_ref[0]**o + (-0.291422763427)*x_ref[0] + (0.107405030174)*x_ref[1]**o + (-0.149966375283)*x_ref[1]
        arg[(3, 1, 2, 1)]=0.443934333622*x[0]**o + (0.288689805363)*x[0] + (-0.897170254773)*x[1]**o + (-0.864014448991)*x[1]
        ref[(3, 1, 2, 1)]=0.443934333622*x_ref[0]**o + (0.288689805363)*x_ref[0] + (-0.897170254773)*x_ref[1]**o + (-0.864014448991)*x_ref[1]
        arg[(3, 1, 2, 2)]=0.46577770369*x[0]**o + (-0.742221967855)*x[0] + (0.968208598202)*x[1]**o + (-0.482576058921)*x[1]
        ref[(3, 1, 2, 2)]=0.46577770369*x_ref[0]**o + (-0.742221967855)*x_ref[0] + (0.968208598202)*x_ref[1]**o + (-0.482576058921)*x_ref[1]
        arg[(3, 1, 2, 3)]=-0.767716083329*x[0]**o + (0.702725632579)*x[0] + (-0.67650829725)*x[1]**o + (-0.568070053056)*x[1]
        ref[(3, 1, 2, 3)]=-0.767716083329*x_ref[0]**o + (0.702725632579)*x_ref[0] + (-0.67650829725)*x_ref[1]**o + (-0.568070053056)*x_ref[1]
        arg[(3, 1, 3, 0)]=0.663587588932*x[0]**o + (0.0178768424036)*x[0] + (-0.248175327691)*x[1]**o + (0.025714801215)*x[1]
        ref[(3, 1, 3, 0)]=0.663587588932*x_ref[0]**o + (0.0178768424036)*x_ref[0] + (-0.248175327691)*x_ref[1]**o + (0.025714801215)*x_ref[1]
        arg[(3, 1, 3, 1)]=0.992804524965*x[0]**o + (0.120389657052)*x[0] + (-0.409532743948)*x[1]**o + (-0.0350481288671)*x[1]
        ref[(3, 1, 3, 1)]=0.992804524965*x_ref[0]**o + (0.120389657052)*x_ref[0] + (-0.409532743948)*x_ref[1]**o + (-0.0350481288671)*x_ref[1]
        arg[(3, 1, 3, 2)]=0.657956527739*x[0]**o + (0.87182852839)*x[0] + (-0.636008552332)*x[1]**o + (0.91899713004)*x[1]
        ref[(3, 1, 3, 2)]=0.657956527739*x_ref[0]**o + (0.87182852839)*x_ref[0] + (-0.636008552332)*x_ref[1]**o + (0.91899713004)*x_ref[1]
        arg[(3, 1, 3, 3)]=0.962558043753*x[0]**o + (0.123349503671)*x[0] + (-0.580958396798)*x[1]**o + (-0.406410999241)*x[1]
        ref[(3, 1, 3, 3)]=0.962558043753*x_ref[0]**o + (0.123349503671)*x_ref[0] + (-0.580958396798)*x_ref[1]**o + (-0.406410999241)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.696564460869*x[2]**o + (0.707709424719)*x[2]
            ref[(0, 0, 0, 0)]+=0.696564460869*x_ref[2]**o + (0.707709424719)*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.954273631331*x[2]**o + (-0.0858529981835)*x[2]
            ref[(0, 0, 0, 1)]+=0.954273631331*x_ref[2]**o + (-0.0858529981835)*x_ref[2]
            arg[(0, 0, 0, 2)]+=-0.996755216106*x[2]**o + (-0.203255443202)*x[2]
            ref[(0, 0, 0, 2)]+=-0.996755216106*x_ref[2]**o + (-0.203255443202)*x_ref[2]
            arg[(0, 0, 0, 3)]+=-0.282542995844*x[2]**o + (-0.0730663633072)*x[2]
            ref[(0, 0, 0, 3)]+=-0.282542995844*x_ref[2]**o + (-0.0730663633072)*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.234658914844*x[2]**o + (-0.214728152891)*x[2]
            ref[(0, 0, 1, 0)]+=-0.234658914844*x_ref[2]**o + (-0.214728152891)*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.105284600489*x[2]**o + (-0.954026843742)*x[2]
            ref[(0, 0, 1, 1)]+=0.105284600489*x_ref[2]**o + (-0.954026843742)*x_ref[2]
            arg[(0, 0, 1, 2)]+=-0.694394002921*x[2]**o + (0.00178872401298)*x[2]
            ref[(0, 0, 1, 2)]+=-0.694394002921*x_ref[2]**o + (0.00178872401298)*x_ref[2]
            arg[(0, 0, 1, 3)]+=0.891638368151*x[2]**o + (-0.108867547099)*x[2]
            ref[(0, 0, 1, 3)]+=0.891638368151*x_ref[2]**o + (-0.108867547099)*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.291975115905*x[2]**o + (0.317708280862)*x[2]
            ref[(0, 0, 2, 0)]+=-0.291975115905*x_ref[2]**o + (0.317708280862)*x_ref[2]
            arg[(0, 0, 2, 1)]+=-0.514285471882*x[2]**o + (0.869771309801)*x[2]
            ref[(0, 0, 2, 1)]+=-0.514285471882*x_ref[2]**o + (0.869771309801)*x_ref[2]
            arg[(0, 0, 2, 2)]+=0.103757260084*x[2]**o + (-0.282574528647)*x[2]
            ref[(0, 0, 2, 2)]+=0.103757260084*x_ref[2]**o + (-0.282574528647)*x_ref[2]
            arg[(0, 0, 2, 3)]+=-0.879403578744*x[2]**o + (0.472996353906)*x[2]
            ref[(0, 0, 2, 3)]+=-0.879403578744*x_ref[2]**o + (0.472996353906)*x_ref[2]
            arg[(0, 0, 3, 0)]+=-0.372759714978*x[2]**o + (-0.103610985516)*x[2]
            ref[(0, 0, 3, 0)]+=-0.372759714978*x_ref[2]**o + (-0.103610985516)*x_ref[2]
            arg[(0, 0, 3, 1)]+=0.0760378692415*x[2]**o + (0.487971069704)*x[2]
            ref[(0, 0, 3, 1)]+=0.0760378692415*x_ref[2]**o + (0.487971069704)*x_ref[2]
            arg[(0, 0, 3, 2)]+=0.316094559303*x[2]**o + (0.556919615535)*x[2]
            ref[(0, 0, 3, 2)]+=0.316094559303*x_ref[2]**o + (0.556919615535)*x_ref[2]
            arg[(0, 0, 3, 3)]+=0.127408071406*x[2]**o + (-0.248014676047)*x[2]
            ref[(0, 0, 3, 3)]+=0.127408071406*x_ref[2]**o + (-0.248014676047)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.944718915265*x[2]**o + (0.447632819865)*x[2]
            ref[(0, 1, 0, 0)]+=-0.944718915265*x_ref[2]**o + (0.447632819865)*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.440250357159*x[2]**o + (0.953227430589)*x[2]
            ref[(0, 1, 0, 1)]+=-0.440250357159*x_ref[2]**o + (0.953227430589)*x_ref[2]
            arg[(0, 1, 0, 2)]+=-0.395250446747*x[2]**o + (0.300589630797)*x[2]
            ref[(0, 1, 0, 2)]+=-0.395250446747*x_ref[2]**o + (0.300589630797)*x_ref[2]
            arg[(0, 1, 0, 3)]+=-0.40853261065*x[2]**o + (0.779932896053)*x[2]
            ref[(0, 1, 0, 3)]+=-0.40853261065*x_ref[2]**o + (0.779932896053)*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.90791750852*x[2]**o + (0.0804359151812)*x[2]
            ref[(0, 1, 1, 0)]+=-0.90791750852*x_ref[2]**o + (0.0804359151812)*x_ref[2]
            arg[(0, 1, 1, 1)]+=0.166065839535*x[2]**o + (-0.0471470185351)*x[2]
            ref[(0, 1, 1, 1)]+=0.166065839535*x_ref[2]**o + (-0.0471470185351)*x_ref[2]
            arg[(0, 1, 1, 2)]+=-0.37995945435*x[2]**o + (-0.590870261033)*x[2]
            ref[(0, 1, 1, 2)]+=-0.37995945435*x_ref[2]**o + (-0.590870261033)*x_ref[2]
            arg[(0, 1, 1, 3)]+=-0.466207450307*x[2]**o + (0.0914834570634)*x[2]
            ref[(0, 1, 1, 3)]+=-0.466207450307*x_ref[2]**o + (0.0914834570634)*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.215280473125*x[2]**o + (0.419167354817)*x[2]
            ref[(0, 1, 2, 0)]+=-0.215280473125*x_ref[2]**o + (0.419167354817)*x_ref[2]
            arg[(0, 1, 2, 1)]+=0.402462503482*x[2]**o + (0.729866999369)*x[2]
            ref[(0, 1, 2, 1)]+=0.402462503482*x_ref[2]**o + (0.729866999369)*x_ref[2]
            arg[(0, 1, 2, 2)]+=0.973027071571*x[2]**o + (-0.784786840402)*x[2]
            ref[(0, 1, 2, 2)]+=0.973027071571*x_ref[2]**o + (-0.784786840402)*x_ref[2]
            arg[(0, 1, 2, 3)]+=0.40959950238*x[2]**o + (0.0500083263512)*x[2]
            ref[(0, 1, 2, 3)]+=0.40959950238*x_ref[2]**o + (0.0500083263512)*x_ref[2]
            arg[(0, 1, 3, 0)]+=-0.807407646376*x[2]**o + (0.92582549386)*x[2]
            ref[(0, 1, 3, 0)]+=-0.807407646376*x_ref[2]**o + (0.92582549386)*x_ref[2]
            arg[(0, 1, 3, 1)]+=-0.0566711922263*x[2]**o + (-0.574523028624)*x[2]
            ref[(0, 1, 3, 1)]+=-0.0566711922263*x_ref[2]**o + (-0.574523028624)*x_ref[2]
            arg[(0, 1, 3, 2)]+=-0.344365017146*x[2]**o + (0.945252053587)*x[2]
            ref[(0, 1, 3, 2)]+=-0.344365017146*x_ref[2]**o + (0.945252053587)*x_ref[2]
            arg[(0, 1, 3, 3)]+=0.356735293695*x[2]**o + (0.495986027923)*x[2]
            ref[(0, 1, 3, 3)]+=0.356735293695*x_ref[2]**o + (0.495986027923)*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.47652463692*x[2]**o + (0.430823984371)*x[2]
            ref[(1, 0, 0, 0)]+=-0.47652463692*x_ref[2]**o + (0.430823984371)*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.179937033811*x[2]**o + (0.981440431517)*x[2]
            ref[(1, 0, 0, 1)]+=0.179937033811*x_ref[2]**o + (0.981440431517)*x_ref[2]
            arg[(1, 0, 0, 2)]+=0.155584188848*x[2]**o + (0.655717325044)*x[2]
            ref[(1, 0, 0, 2)]+=0.155584188848*x_ref[2]**o + (0.655717325044)*x_ref[2]
            arg[(1, 0, 0, 3)]+=0.13414302166*x[2]**o + (0.805493333739)*x[2]
            ref[(1, 0, 0, 3)]+=0.13414302166*x_ref[2]**o + (0.805493333739)*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.101581418301*x[2]**o + (-0.991704462763)*x[2]
            ref[(1, 0, 1, 0)]+=-0.101581418301*x_ref[2]**o + (-0.991704462763)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.143795047589*x[2]**o + (-0.278782532507)*x[2]
            ref[(1, 0, 1, 1)]+=-0.143795047589*x_ref[2]**o + (-0.278782532507)*x_ref[2]
            arg[(1, 0, 1, 2)]+=0.944288237473*x[2]**o + (0.463281594141)*x[2]
            ref[(1, 0, 1, 2)]+=0.944288237473*x_ref[2]**o + (0.463281594141)*x_ref[2]
            arg[(1, 0, 1, 3)]+=-0.270198993939*x[2]**o + (0.295358293922)*x[2]
            ref[(1, 0, 1, 3)]+=-0.270198993939*x_ref[2]**o + (0.295358293922)*x_ref[2]
            arg[(1, 0, 2, 0)]+=0.0170984417106*x[2]**o + (0.0462163838553)*x[2]
            ref[(1, 0, 2, 0)]+=0.0170984417106*x_ref[2]**o + (0.0462163838553)*x_ref[2]
            arg[(1, 0, 2, 1)]+=-0.494703089727*x[2]**o + (0.520048860879)*x[2]
            ref[(1, 0, 2, 1)]+=-0.494703089727*x_ref[2]**o + (0.520048860879)*x_ref[2]
            arg[(1, 0, 2, 2)]+=0.604002947329*x[2]**o + (0.173849117472)*x[2]
            ref[(1, 0, 2, 2)]+=0.604002947329*x_ref[2]**o + (0.173849117472)*x_ref[2]
            arg[(1, 0, 2, 3)]+=0.34502226615*x[2]**o + (0.149900399522)*x[2]
            ref[(1, 0, 2, 3)]+=0.34502226615*x_ref[2]**o + (0.149900399522)*x_ref[2]
            arg[(1, 0, 3, 0)]+=-0.716496127021*x[2]**o + (0.528458177724)*x[2]
            ref[(1, 0, 3, 0)]+=-0.716496127021*x_ref[2]**o + (0.528458177724)*x_ref[2]
            arg[(1, 0, 3, 1)]+=-0.645027492474*x[2]**o + (0.387983180298)*x[2]
            ref[(1, 0, 3, 1)]+=-0.645027492474*x_ref[2]**o + (0.387983180298)*x_ref[2]
            arg[(1, 0, 3, 2)]+=-0.96613490219*x[2]**o + (0.116330937496)*x[2]
            ref[(1, 0, 3, 2)]+=-0.96613490219*x_ref[2]**o + (0.116330937496)*x_ref[2]
            arg[(1, 0, 3, 3)]+=0.0879228213866*x[2]**o + (0.605496039438)*x[2]
            ref[(1, 0, 3, 3)]+=0.0879228213866*x_ref[2]**o + (0.605496039438)*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.449350685718*x[2]**o + (-0.0165071317207)*x[2]
            ref[(1, 1, 0, 0)]+=-0.449350685718*x_ref[2]**o + (-0.0165071317207)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.203242755473*x[2]**o + (-0.861291329562)*x[2]
            ref[(1, 1, 0, 1)]+=0.203242755473*x_ref[2]**o + (-0.861291329562)*x_ref[2]
            arg[(1, 1, 0, 2)]+=0.292419286169*x[2]**o + (0.885151728919)*x[2]
            ref[(1, 1, 0, 2)]+=0.292419286169*x_ref[2]**o + (0.885151728919)*x_ref[2]
            arg[(1, 1, 0, 3)]+=0.770624317786*x[2]**o + (-0.869764021782)*x[2]
            ref[(1, 1, 0, 3)]+=0.770624317786*x_ref[2]**o + (-0.869764021782)*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.653539939669*x[2]**o + (-0.956098602337)*x[2]
            ref[(1, 1, 1, 0)]+=0.653539939669*x_ref[2]**o + (-0.956098602337)*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.800776429772*x[2]**o + (-0.0369819042479)*x[2]
            ref[(1, 1, 1, 1)]+=0.800776429772*x_ref[2]**o + (-0.0369819042479)*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.876696380197*x[2]**o + (0.418818631516)*x[2]
            ref[(1, 1, 1, 2)]+=-0.876696380197*x_ref[2]**o + (0.418818631516)*x_ref[2]
            arg[(1, 1, 1, 3)]+=-0.575439374824*x[2]**o + (-0.34414481195)*x[2]
            ref[(1, 1, 1, 3)]+=-0.575439374824*x_ref[2]**o + (-0.34414481195)*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.793603685512*x[2]**o + (0.36751641836)*x[2]
            ref[(1, 1, 2, 0)]+=-0.793603685512*x_ref[2]**o + (0.36751641836)*x_ref[2]
            arg[(1, 1, 2, 1)]+=-0.154935761139*x[2]**o + (-0.334295466654)*x[2]
            ref[(1, 1, 2, 1)]+=-0.154935761139*x_ref[2]**o + (-0.334295466654)*x_ref[2]
            arg[(1, 1, 2, 2)]+=-0.708665537978*x[2]**o + (-0.653508383102)*x[2]
            ref[(1, 1, 2, 2)]+=-0.708665537978*x_ref[2]**o + (-0.653508383102)*x_ref[2]
            arg[(1, 1, 2, 3)]+=-0.144945840826*x[2]**o + (-0.250610032642)*x[2]
            ref[(1, 1, 2, 3)]+=-0.144945840826*x_ref[2]**o + (-0.250610032642)*x_ref[2]
            arg[(1, 1, 3, 0)]+=0.725879714634*x[2]**o + (-0.695538244657)*x[2]
            ref[(1, 1, 3, 0)]+=0.725879714634*x_ref[2]**o + (-0.695538244657)*x_ref[2]
            arg[(1, 1, 3, 1)]+=0.388273560251*x[2]**o + (-0.806695954733)*x[2]
            ref[(1, 1, 3, 1)]+=0.388273560251*x_ref[2]**o + (-0.806695954733)*x_ref[2]
            arg[(1, 1, 3, 2)]+=0.740355571401*x[2]**o + (0.219072015579)*x[2]
            ref[(1, 1, 3, 2)]+=0.740355571401*x_ref[2]**o + (0.219072015579)*x_ref[2]
            arg[(1, 1, 3, 3)]+=0.0133621728346*x[2]**o + (0.250161845397)*x[2]
            ref[(1, 1, 3, 3)]+=0.0133621728346*x_ref[2]**o + (0.250161845397)*x_ref[2]
            arg[(2, 0, 0, 0)]+=-0.320007695183*x[2]**o + (-0.300875071444)*x[2]
            ref[(2, 0, 0, 0)]+=-0.320007695183*x_ref[2]**o + (-0.300875071444)*x_ref[2]
            arg[(2, 0, 0, 1)]+=0.129248365953*x[2]**o + (0.727336955336)*x[2]
            ref[(2, 0, 0, 1)]+=0.129248365953*x_ref[2]**o + (0.727336955336)*x_ref[2]
            arg[(2, 0, 0, 2)]+=0.987006188284*x[2]**o + (-0.110321575894)*x[2]
            ref[(2, 0, 0, 2)]+=0.987006188284*x_ref[2]**o + (-0.110321575894)*x_ref[2]
            arg[(2, 0, 0, 3)]+=-0.675858035239*x[2]**o + (-0.689137114585)*x[2]
            ref[(2, 0, 0, 3)]+=-0.675858035239*x_ref[2]**o + (-0.689137114585)*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.82709675517*x[2]**o + (-0.682917377442)*x[2]
            ref[(2, 0, 1, 0)]+=-0.82709675517*x_ref[2]**o + (-0.682917377442)*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.258912316482*x[2]**o + (0.934193138768)*x[2]
            ref[(2, 0, 1, 1)]+=0.258912316482*x_ref[2]**o + (0.934193138768)*x_ref[2]
            arg[(2, 0, 1, 2)]+=0.0876657796285*x[2]**o + (0.163364082789)*x[2]
            ref[(2, 0, 1, 2)]+=0.0876657796285*x_ref[2]**o + (0.163364082789)*x_ref[2]
            arg[(2, 0, 1, 3)]+=-0.566549912313*x[2]**o + (0.047403189568)*x[2]
            ref[(2, 0, 1, 3)]+=-0.566549912313*x_ref[2]**o + (0.047403189568)*x_ref[2]
            arg[(2, 0, 2, 0)]+=0.732268590402*x[2]**o + (0.839465318492)*x[2]
            ref[(2, 0, 2, 0)]+=0.732268590402*x_ref[2]**o + (0.839465318492)*x_ref[2]
            arg[(2, 0, 2, 1)]+=0.369510448418*x[2]**o + (0.885144133704)*x[2]
            ref[(2, 0, 2, 1)]+=0.369510448418*x_ref[2]**o + (0.885144133704)*x_ref[2]
            arg[(2, 0, 2, 2)]+=0.0311306568657*x[2]**o + (-0.537828109792)*x[2]
            ref[(2, 0, 2, 2)]+=0.0311306568657*x_ref[2]**o + (-0.537828109792)*x_ref[2]
            arg[(2, 0, 2, 3)]+=-0.2317427161*x[2]**o + (0.937405915163)*x[2]
            ref[(2, 0, 2, 3)]+=-0.2317427161*x_ref[2]**o + (0.937405915163)*x_ref[2]
            arg[(2, 0, 3, 0)]+=0.184642722278*x[2]**o + (-0.0786363025487)*x[2]
            ref[(2, 0, 3, 0)]+=0.184642722278*x_ref[2]**o + (-0.0786363025487)*x_ref[2]
            arg[(2, 0, 3, 1)]+=0.223946530313*x[2]**o + (-0.806180159181)*x[2]
            ref[(2, 0, 3, 1)]+=0.223946530313*x_ref[2]**o + (-0.806180159181)*x_ref[2]
            arg[(2, 0, 3, 2)]+=0.863047932191*x[2]**o + (-0.26825131435)*x[2]
            ref[(2, 0, 3, 2)]+=0.863047932191*x_ref[2]**o + (-0.26825131435)*x_ref[2]
            arg[(2, 0, 3, 3)]+=-0.291053218144*x[2]**o + (0.486678105777)*x[2]
            ref[(2, 0, 3, 3)]+=-0.291053218144*x_ref[2]**o + (0.486678105777)*x_ref[2]
            arg[(2, 1, 0, 0)]+=0.33213716533*x[2]**o + (-0.537963566193)*x[2]
            ref[(2, 1, 0, 0)]+=0.33213716533*x_ref[2]**o + (-0.537963566193)*x_ref[2]
            arg[(2, 1, 0, 1)]+=0.752712287133*x[2]**o + (-0.636733905629)*x[2]
            ref[(2, 1, 0, 1)]+=0.752712287133*x_ref[2]**o + (-0.636733905629)*x_ref[2]
            arg[(2, 1, 0, 2)]+=-0.799396635169*x[2]**o + (0.946479673472)*x[2]
            ref[(2, 1, 0, 2)]+=-0.799396635169*x_ref[2]**o + (0.946479673472)*x_ref[2]
            arg[(2, 1, 0, 3)]+=-0.75540566243*x[2]**o + (-0.489943188759)*x[2]
            ref[(2, 1, 0, 3)]+=-0.75540566243*x_ref[2]**o + (-0.489943188759)*x_ref[2]
            arg[(2, 1, 1, 0)]+=-0.926647037817*x[2]**o + (-0.942463285815)*x[2]
            ref[(2, 1, 1, 0)]+=-0.926647037817*x_ref[2]**o + (-0.942463285815)*x_ref[2]
            arg[(2, 1, 1, 1)]+=0.799520983506*x[2]**o + (0.398125947325)*x[2]
            ref[(2, 1, 1, 1)]+=0.799520983506*x_ref[2]**o + (0.398125947325)*x_ref[2]
            arg[(2, 1, 1, 2)]+=-0.739253756548*x[2]**o + (0.706597332042)*x[2]
            ref[(2, 1, 1, 2)]+=-0.739253756548*x_ref[2]**o + (0.706597332042)*x_ref[2]
            arg[(2, 1, 1, 3)]+=-0.492117780266*x[2]**o + (-0.157439459234)*x[2]
            ref[(2, 1, 1, 3)]+=-0.492117780266*x_ref[2]**o + (-0.157439459234)*x_ref[2]
            arg[(2, 1, 2, 0)]+=-0.462961673623*x[2]**o + (-0.439797620506)*x[2]
            ref[(2, 1, 2, 0)]+=-0.462961673623*x_ref[2]**o + (-0.439797620506)*x_ref[2]
            arg[(2, 1, 2, 1)]+=0.969054632999*x[2]**o + (-0.0281992876001)*x[2]
            ref[(2, 1, 2, 1)]+=0.969054632999*x_ref[2]**o + (-0.0281992876001)*x_ref[2]
            arg[(2, 1, 2, 2)]+=0.425321041288*x[2]**o + (-0.240642778999)*x[2]
            ref[(2, 1, 2, 2)]+=0.425321041288*x_ref[2]**o + (-0.240642778999)*x_ref[2]
            arg[(2, 1, 2, 3)]+=-0.952568094637*x[2]**o + (0.336679415082)*x[2]
            ref[(2, 1, 2, 3)]+=-0.952568094637*x_ref[2]**o + (0.336679415082)*x_ref[2]
            arg[(2, 1, 3, 0)]+=-0.160225932415*x[2]**o + (0.928866302575)*x[2]
            ref[(2, 1, 3, 0)]+=-0.160225932415*x_ref[2]**o + (0.928866302575)*x_ref[2]
            arg[(2, 1, 3, 1)]+=-0.321267877806*x[2]**o + (0.906114273414)*x[2]
            ref[(2, 1, 3, 1)]+=-0.321267877806*x_ref[2]**o + (0.906114273414)*x_ref[2]
            arg[(2, 1, 3, 2)]+=0.491182498508*x[2]**o + (0.746784051633)*x[2]
            ref[(2, 1, 3, 2)]+=0.491182498508*x_ref[2]**o + (0.746784051633)*x_ref[2]
            arg[(2, 1, 3, 3)]+=-0.249147505003*x[2]**o + (0.829907703719)*x[2]
            ref[(2, 1, 3, 3)]+=-0.249147505003*x_ref[2]**o + (0.829907703719)*x_ref[2]
            arg[(3, 0, 0, 0)]+=-0.431314488025*x[2]**o + (-0.533875085834)*x[2]
            ref[(3, 0, 0, 0)]+=-0.431314488025*x_ref[2]**o + (-0.533875085834)*x_ref[2]
            arg[(3, 0, 0, 1)]+=0.020623352925*x[2]**o + (-0.948437816426)*x[2]
            ref[(3, 0, 0, 1)]+=0.020623352925*x_ref[2]**o + (-0.948437816426)*x_ref[2]
            arg[(3, 0, 0, 2)]+=0.729403770813*x[2]**o + (0.46918687571)*x[2]
            ref[(3, 0, 0, 2)]+=0.729403770813*x_ref[2]**o + (0.46918687571)*x_ref[2]
            arg[(3, 0, 0, 3)]+=-0.540359266623*x[2]**o + (-0.20468149262)*x[2]
            ref[(3, 0, 0, 3)]+=-0.540359266623*x_ref[2]**o + (-0.20468149262)*x_ref[2]
            arg[(3, 0, 1, 0)]+=-0.872331124537*x[2]**o + (0.292375794447)*x[2]
            ref[(3, 0, 1, 0)]+=-0.872331124537*x_ref[2]**o + (0.292375794447)*x_ref[2]
            arg[(3, 0, 1, 1)]+=0.563539063588*x[2]**o + (0.522536566053)*x[2]
            ref[(3, 0, 1, 1)]+=0.563539063588*x_ref[2]**o + (0.522536566053)*x_ref[2]
            arg[(3, 0, 1, 2)]+=-0.543475751185*x[2]**o + (-0.030904335936)*x[2]
            ref[(3, 0, 1, 2)]+=-0.543475751185*x_ref[2]**o + (-0.030904335936)*x_ref[2]
            arg[(3, 0, 1, 3)]+=0.797957709532*x[2]**o + (0.87637788638)*x[2]
            ref[(3, 0, 1, 3)]+=0.797957709532*x_ref[2]**o + (0.87637788638)*x_ref[2]
            arg[(3, 0, 2, 0)]+=0.854620115337*x[2]**o + (0.115032617402)*x[2]
            ref[(3, 0, 2, 0)]+=0.854620115337*x_ref[2]**o + (0.115032617402)*x_ref[2]
            arg[(3, 0, 2, 1)]+=-0.176952176528*x[2]**o + (0.780082159663)*x[2]
            ref[(3, 0, 2, 1)]+=-0.176952176528*x_ref[2]**o + (0.780082159663)*x_ref[2]
            arg[(3, 0, 2, 2)]+=-0.898891735519*x[2]**o + (0.677615256366)*x[2]
            ref[(3, 0, 2, 2)]+=-0.898891735519*x_ref[2]**o + (0.677615256366)*x_ref[2]
            arg[(3, 0, 2, 3)]+=-0.502430987453*x[2]**o + (0.257778360054)*x[2]
            ref[(3, 0, 2, 3)]+=-0.502430987453*x_ref[2]**o + (0.257778360054)*x_ref[2]
            arg[(3, 0, 3, 0)]+=0.272506608327*x[2]**o + (-0.932142445832)*x[2]
            ref[(3, 0, 3, 0)]+=0.272506608327*x_ref[2]**o + (-0.932142445832)*x_ref[2]
            arg[(3, 0, 3, 1)]+=-0.42791693389*x[2]**o + (-0.522852929015)*x[2]
            ref[(3, 0, 3, 1)]+=-0.42791693389*x_ref[2]**o + (-0.522852929015)*x_ref[2]
            arg[(3, 0, 3, 2)]+=0.94815093151*x[2]**o + (-0.514114688134)*x[2]
            ref[(3, 0, 3, 2)]+=0.94815093151*x_ref[2]**o + (-0.514114688134)*x_ref[2]
            arg[(3, 0, 3, 3)]+=0.290522215252*x[2]**o + (-0.360691016106)*x[2]
            ref[(3, 0, 3, 3)]+=0.290522215252*x_ref[2]**o + (-0.360691016106)*x_ref[2]
            arg[(3, 1, 0, 0)]+=-0.214241248349*x[2]**o + (0.363744497524)*x[2]
            ref[(3, 1, 0, 0)]+=-0.214241248349*x_ref[2]**o + (0.363744497524)*x_ref[2]
            arg[(3, 1, 0, 1)]+=0.880645881658*x[2]**o + (-0.693480546723)*x[2]
            ref[(3, 1, 0, 1)]+=0.880645881658*x_ref[2]**o + (-0.693480546723)*x_ref[2]
            arg[(3, 1, 0, 2)]+=0.0625518606436*x[2]**o + (0.979576297838)*x[2]
            ref[(3, 1, 0, 2)]+=0.0625518606436*x_ref[2]**o + (0.979576297838)*x_ref[2]
            arg[(3, 1, 0, 3)]+=0.192630352158*x[2]**o + (-0.999975359519)*x[2]
            ref[(3, 1, 0, 3)]+=0.192630352158*x_ref[2]**o + (-0.999975359519)*x_ref[2]
            arg[(3, 1, 1, 0)]+=0.517456028007*x[2]**o + (-0.562875578201)*x[2]
            ref[(3, 1, 1, 0)]+=0.517456028007*x_ref[2]**o + (-0.562875578201)*x_ref[2]
            arg[(3, 1, 1, 1)]+=-0.663219239826*x[2]**o + (-0.666453972321)*x[2]
            ref[(3, 1, 1, 1)]+=-0.663219239826*x_ref[2]**o + (-0.666453972321)*x_ref[2]
            arg[(3, 1, 1, 2)]+=0.411070551611*x[2]**o + (0.473378746422)*x[2]
            ref[(3, 1, 1, 2)]+=0.411070551611*x_ref[2]**o + (0.473378746422)*x_ref[2]
            arg[(3, 1, 1, 3)]+=-0.346514989574*x[2]**o + (0.179442627689)*x[2]
            ref[(3, 1, 1, 3)]+=-0.346514989574*x_ref[2]**o + (0.179442627689)*x_ref[2]
            arg[(3, 1, 2, 0)]+=0.958287832168*x[2]**o + (0.293189132749)*x[2]
            ref[(3, 1, 2, 0)]+=0.958287832168*x_ref[2]**o + (0.293189132749)*x_ref[2]
            arg[(3, 1, 2, 1)]+=0.453390871424*x[2]**o + (0.631821991781)*x[2]
            ref[(3, 1, 2, 1)]+=0.453390871424*x_ref[2]**o + (0.631821991781)*x_ref[2]
            arg[(3, 1, 2, 2)]+=0.910455713095*x[2]**o + (-0.0729782043855)*x[2]
            ref[(3, 1, 2, 2)]+=0.910455713095*x_ref[2]**o + (-0.0729782043855)*x_ref[2]
            arg[(3, 1, 2, 3)]+=0.169068081585*x[2]**o + (-0.46300729498)*x[2]
            ref[(3, 1, 2, 3)]+=0.169068081585*x_ref[2]**o + (-0.46300729498)*x_ref[2]
            arg[(3, 1, 3, 0)]+=0.409617939118*x[2]**o + (-0.912797355134)*x[2]
            ref[(3, 1, 3, 0)]+=0.409617939118*x_ref[2]**o + (-0.912797355134)*x_ref[2]
            arg[(3, 1, 3, 1)]+=-0.150060674652*x[2]**o + (-0.437240052307)*x[2]
            ref[(3, 1, 3, 1)]+=-0.150060674652*x_ref[2]**o + (-0.437240052307)*x_ref[2]
            arg[(3, 1, 3, 2)]+=0.26193349266*x[2]**o + (0.260232077576)*x[2]
            ref[(3, 1, 3, 2)]+=0.26193349266*x_ref[2]**o + (0.260232077576)*x_ref[2]
            arg[(3, 1, 3, 3)]+=0.556106227981*x[2]**o + (0.0509622455509)*x[2]
            ref[(3, 1, 3, 3)]+=0.556106227981*x_ref[2]**o + (0.0509622455509)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onSolution_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on Solution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.180930262858*x[0]**o + (-0.62101045406)*x[0] + (-0.251141768926)*x[1]**o + (0.301679308937)*x[1]
        ref=0.180930262858*x_ref[0]**o + (-0.62101045406)*x_ref[0] + (-0.251141768926)*x_ref[1]**o + (0.301679308937)*x_ref[1]
        if dim==3:
            arg+=(-0.700888136096)*x[2]**o + (0.696829054142)*x[2]
            ref+=(-0.700888136096)*x_ref[2]**o + (0.696829054142)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onSolution_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on Solution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=0.106981660874*x[0]**o + (0.700566339763)*x[0] + (0.518759716561)*x[1]**o + (-0.0351158149746)*x[1]
        ref[(0,)]=0.106981660874*x_ref[0]**o + (0.700566339763)*x_ref[0] + (0.518759716561)*x_ref[1]**o + (-0.0351158149746)*x_ref[1]
        arg[(1,)]=0.33048935962*x[0]**o + (0.515949052426)*x[0] + (-0.475494847027)*x[1]**o + (0.770159342563)*x[1]
        ref[(1,)]=0.33048935962*x_ref[0]**o + (0.515949052426)*x_ref[0] + (-0.475494847027)*x_ref[1]**o + (0.770159342563)*x_ref[1]
        arg[(2,)]=-0.403810390959*x[0]**o + (-0.198889561374)*x[0] + (0.554563646072)*x[1]**o + (0.545393696151)*x[1]
        ref[(2,)]=-0.403810390959*x_ref[0]**o + (-0.198889561374)*x_ref[0] + (0.554563646072)*x_ref[1]**o + (0.545393696151)*x_ref[1]
        arg[(3,)]=0.563833269811*x[0]**o + (-0.598240770029)*x[0] + (0.430058591295)*x[1]**o + (0.681476812136)*x[1]
        ref[(3,)]=0.563833269811*x_ref[0]**o + (-0.598240770029)*x_ref[0] + (0.430058591295)*x_ref[1]**o + (0.681476812136)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.348034013102*x[2]**o + (0.252294818036)*x[2]
            ref[(0,)]+=0.348034013102*x_ref[2]**o + (0.252294818036)*x_ref[2]
            arg[(1,)]+=-0.984974043077*x[2]**o + (0.296242844074)*x[2]
            ref[(1,)]+=-0.984974043077*x_ref[2]**o + (0.296242844074)*x_ref[2]
            arg[(2,)]+=-0.580009112804*x[2]**o + (-0.393689095754)*x[2]
            ref[(2,)]+=-0.580009112804*x_ref[2]**o + (-0.393689095754)*x_ref[2]
            arg[(3,)]+=-0.00395030201742*x[2]**o + (0.284825887077)*x[2]
            ref[(3,)]+=-0.00395030201742*x_ref[2]**o + (0.284825887077)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onSolution_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on Solution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref = Data(0,(4, 4),w_ref)
        arg[(0, 0)]=-0.490536844259*x[0]**o + (0.48230214457)*x[0] + (-0.0440406998421)*x[1]**o + (-0.309535136021)*x[1]
        ref[(0, 0)]=-0.490536844259*x_ref[0]**o + (0.48230214457)*x_ref[0] + (-0.0440406998421)*x_ref[1]**o + (-0.309535136021)*x_ref[1]
        arg[(0, 1)]=0.785071524638*x[0]**o + (0.101607120245)*x[0] + (-0.599376917764)*x[1]**o + (-0.433247913271)*x[1]
        ref[(0, 1)]=0.785071524638*x_ref[0]**o + (0.101607120245)*x_ref[0] + (-0.599376917764)*x_ref[1]**o + (-0.433247913271)*x_ref[1]
        arg[(0, 2)]=-0.973652228257*x[0]**o + (0.138452241622)*x[0] + (0.0166402767062)*x[1]**o + (-0.516771029714)*x[1]
        ref[(0, 2)]=-0.973652228257*x_ref[0]**o + (0.138452241622)*x_ref[0] + (0.0166402767062)*x_ref[1]**o + (-0.516771029714)*x_ref[1]
        arg[(0, 3)]=-0.429675175387*x[0]**o + (0.389618327883)*x[0] + (0.620788552954)*x[1]**o + (-0.0850781265232)*x[1]
        ref[(0, 3)]=-0.429675175387*x_ref[0]**o + (0.389618327883)*x_ref[0] + (0.620788552954)*x_ref[1]**o + (-0.0850781265232)*x_ref[1]
        arg[(1, 0)]=-0.678004142566*x[0]**o + (-0.121915567833)*x[0] + (0.522615802743)*x[1]**o + (0.838371271853)*x[1]
        ref[(1, 0)]=-0.678004142566*x_ref[0]**o + (-0.121915567833)*x_ref[0] + (0.522615802743)*x_ref[1]**o + (0.838371271853)*x_ref[1]
        arg[(1, 1)]=0.426780278604*x[0]**o + (-0.495765355228)*x[0] + (-0.490225301135)*x[1]**o + (-0.453224707097)*x[1]
        ref[(1, 1)]=0.426780278604*x_ref[0]**o + (-0.495765355228)*x_ref[0] + (-0.490225301135)*x_ref[1]**o + (-0.453224707097)*x_ref[1]
        arg[(1, 2)]=0.926818211583*x[0]**o + (0.0340769144189)*x[0] + (-0.826380816529)*x[1]**o + (0.177840854959)*x[1]
        ref[(1, 2)]=0.926818211583*x_ref[0]**o + (0.0340769144189)*x_ref[0] + (-0.826380816529)*x_ref[1]**o + (0.177840854959)*x_ref[1]
        arg[(1, 3)]=-0.269134638978*x[0]**o + (-0.470947772484)*x[0] + (0.0578940576508)*x[1]**o + (-0.750684648898)*x[1]
        ref[(1, 3)]=-0.269134638978*x_ref[0]**o + (-0.470947772484)*x_ref[0] + (0.0578940576508)*x_ref[1]**o + (-0.750684648898)*x_ref[1]
        arg[(2, 0)]=-0.02261483144*x[0]**o + (0.941081031672)*x[0] + (-0.480915261833)*x[1]**o + (-0.171898447845)*x[1]
        ref[(2, 0)]=-0.02261483144*x_ref[0]**o + (0.941081031672)*x_ref[0] + (-0.480915261833)*x_ref[1]**o + (-0.171898447845)*x_ref[1]
        arg[(2, 1)]=-0.778800160394*x[0]**o + (0.554502398884)*x[0] + (0.414459174657)*x[1]**o + (-0.0852967469228)*x[1]
        ref[(2, 1)]=-0.778800160394*x_ref[0]**o + (0.554502398884)*x_ref[0] + (0.414459174657)*x_ref[1]**o + (-0.0852967469228)*x_ref[1]
        arg[(2, 2)]=-0.254319899681*x[0]**o + (0.749539326452)*x[0] + (0.168188936735)*x[1]**o + (0.922580778409)*x[1]
        ref[(2, 2)]=-0.254319899681*x_ref[0]**o + (0.749539326452)*x_ref[0] + (0.168188936735)*x_ref[1]**o + (0.922580778409)*x_ref[1]
        arg[(2, 3)]=-0.622799066859*x[0]**o + (0.877827780061)*x[0] + (0.854590901828)*x[1]**o + (-0.695682106769)*x[1]
        ref[(2, 3)]=-0.622799066859*x_ref[0]**o + (0.877827780061)*x_ref[0] + (0.854590901828)*x_ref[1]**o + (-0.695682106769)*x_ref[1]
        arg[(3, 0)]=0.552607765848*x[0]**o + (-0.780917641685)*x[0] + (0.844860781021)*x[1]**o + (-0.456549657165)*x[1]
        ref[(3, 0)]=0.552607765848*x_ref[0]**o + (-0.780917641685)*x_ref[0] + (0.844860781021)*x_ref[1]**o + (-0.456549657165)*x_ref[1]
        arg[(3, 1)]=-0.574997640589*x[0]**o + (0.569734575319)*x[0] + (-0.590206331307)*x[1]**o + (-0.344601463486)*x[1]
        ref[(3, 1)]=-0.574997640589*x_ref[0]**o + (0.569734575319)*x_ref[0] + (-0.590206331307)*x_ref[1]**o + (-0.344601463486)*x_ref[1]
        arg[(3, 2)]=-0.606132413552*x[0]**o + (0.963928996484)*x[0] + (0.666511368768)*x[1]**o + (0.560553763931)*x[1]
        ref[(3, 2)]=-0.606132413552*x_ref[0]**o + (0.963928996484)*x_ref[0] + (0.666511368768)*x_ref[1]**o + (0.560553763931)*x_ref[1]
        arg[(3, 3)]=0.686876449596*x[0]**o + (0.544696785011)*x[0] + (-0.236719460147)*x[1]**o + (0.308876785993)*x[1]
        ref[(3, 3)]=0.686876449596*x_ref[0]**o + (0.544696785011)*x_ref[0] + (-0.236719460147)*x_ref[1]**o + (0.308876785993)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.832699789434*x[2]**o + (0.219704021057)*x[2]
            ref[(0, 0)]+=-0.832699789434*x_ref[2]**o + (0.219704021057)*x_ref[2]
            arg[(0, 1)]+=0.591421001393*x[2]**o + (0.332556580047)*x[2]
            ref[(0, 1)]+=0.591421001393*x_ref[2]**o + (0.332556580047)*x_ref[2]
            arg[(0, 2)]+=0.489022429985*x[2]**o + (0.788255144816)*x[2]
            ref[(0, 2)]+=0.489022429985*x_ref[2]**o + (0.788255144816)*x_ref[2]
            arg[(0, 3)]+=0.485090187887*x[2]**o + (-0.871956448694)*x[2]
            ref[(0, 3)]+=0.485090187887*x_ref[2]**o + (-0.871956448694)*x_ref[2]
            arg[(1, 0)]+=0.97782004445*x[2]**o + (-0.898925565574)*x[2]
            ref[(1, 0)]+=0.97782004445*x_ref[2]**o + (-0.898925565574)*x_ref[2]
            arg[(1, 1)]+=0.0174624193015*x[2]**o + (0.41655772206)*x[2]
            ref[(1, 1)]+=0.0174624193015*x_ref[2]**o + (0.41655772206)*x_ref[2]
            arg[(1, 2)]+=0.784990707087*x[2]**o + (-0.271648772282)*x[2]
            ref[(1, 2)]+=0.784990707087*x_ref[2]**o + (-0.271648772282)*x_ref[2]
            arg[(1, 3)]+=0.55999900198*x[2]**o + (-0.520791396067)*x[2]
            ref[(1, 3)]+=0.55999900198*x_ref[2]**o + (-0.520791396067)*x_ref[2]
            arg[(2, 0)]+=0.189337056343*x[2]**o + (0.897410161747)*x[2]
            ref[(2, 0)]+=0.189337056343*x_ref[2]**o + (0.897410161747)*x_ref[2]
            arg[(2, 1)]+=0.24486137997*x[2]**o + (0.182480892605)*x[2]
            ref[(2, 1)]+=0.24486137997*x_ref[2]**o + (0.182480892605)*x_ref[2]
            arg[(2, 2)]+=0.0797748601783*x[2]**o + (0.669602881575)*x[2]
            ref[(2, 2)]+=0.0797748601783*x_ref[2]**o + (0.669602881575)*x_ref[2]
            arg[(2, 3)]+=-0.217426559484*x[2]**o + (0.713480630551)*x[2]
            ref[(2, 3)]+=-0.217426559484*x_ref[2]**o + (0.713480630551)*x_ref[2]
            arg[(3, 0)]+=0.048200301104*x[2]**o + (-0.596231323956)*x[2]
            ref[(3, 0)]+=0.048200301104*x_ref[2]**o + (-0.596231323956)*x_ref[2]
            arg[(3, 1)]+=-0.4438011146*x[2]**o + (0.180332471433)*x[2]
            ref[(3, 1)]+=-0.4438011146*x_ref[2]**o + (0.180332471433)*x_ref[2]
            arg[(3, 2)]+=0.188045152617*x[2]**o + (0.555432850197)*x[2]
            ref[(3, 2)]+=0.188045152617*x_ref[2]**o + (0.555432850197)*x_ref[2]
            arg[(3, 3)]+=0.656443482736*x[2]**o + (0.299042972602)*x[2]
            ref[(3, 3)]+=0.656443482736*x_ref[2]**o + (0.299042972602)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onSolution_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on Solution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 3),w)
        ref = Data(0,(2, 2, 3),w_ref)
        arg[(0, 0, 0)]=-0.902803708747*x[0]**o + (0.674621299707)*x[0] + (-0.179898796762)*x[1]**o + (0.864737207449)*x[1]
        ref[(0, 0, 0)]=-0.902803708747*x_ref[0]**o + (0.674621299707)*x_ref[0] + (-0.179898796762)*x_ref[1]**o + (0.864737207449)*x_ref[1]
        arg[(0, 0, 1)]=-0.550746606987*x[0]**o + (0.129545579846)*x[0] + (-0.784169921551)*x[1]**o + (0.774060475294)*x[1]
        ref[(0, 0, 1)]=-0.550746606987*x_ref[0]**o + (0.129545579846)*x_ref[0] + (-0.784169921551)*x_ref[1]**o + (0.774060475294)*x_ref[1]
        arg[(0, 0, 2)]=-0.393444100412*x[0]**o + (0.950807770022)*x[0] + (-0.194964957378)*x[1]**o + (-0.640339787577)*x[1]
        ref[(0, 0, 2)]=-0.393444100412*x_ref[0]**o + (0.950807770022)*x_ref[0] + (-0.194964957378)*x_ref[1]**o + (-0.640339787577)*x_ref[1]
        arg[(0, 1, 0)]=0.983372173199*x[0]**o + (0.580966761827)*x[0] + (0.00301645522026)*x[1]**o + (0.435598841224)*x[1]
        ref[(0, 1, 0)]=0.983372173199*x_ref[0]**o + (0.580966761827)*x_ref[0] + (0.00301645522026)*x_ref[1]**o + (0.435598841224)*x_ref[1]
        arg[(0, 1, 1)]=0.0113296340486*x[0]**o + (-0.631792930631)*x[0] + (-0.880157942293)*x[1]**o + (0.553487768438)*x[1]
        ref[(0, 1, 1)]=0.0113296340486*x_ref[0]**o + (-0.631792930631)*x_ref[0] + (-0.880157942293)*x_ref[1]**o + (0.553487768438)*x_ref[1]
        arg[(0, 1, 2)]=-0.893590006181*x[0]**o + (0.173466359072)*x[0] + (-0.568881989266)*x[1]**o + (-0.270215216353)*x[1]
        ref[(0, 1, 2)]=-0.893590006181*x_ref[0]**o + (0.173466359072)*x_ref[0] + (-0.568881989266)*x_ref[1]**o + (-0.270215216353)*x_ref[1]
        arg[(1, 0, 0)]=-0.543429304116*x[0]**o + (0.0234833706516)*x[0] + (-0.671877994153)*x[1]**o + (0.827889942325)*x[1]
        ref[(1, 0, 0)]=-0.543429304116*x_ref[0]**o + (0.0234833706516)*x_ref[0] + (-0.671877994153)*x_ref[1]**o + (0.827889942325)*x_ref[1]
        arg[(1, 0, 1)]=0.534254114125*x[0]**o + (0.399388962403)*x[0] + (-0.979724392054)*x[1]**o + (-0.0607589379308)*x[1]
        ref[(1, 0, 1)]=0.534254114125*x_ref[0]**o + (0.399388962403)*x_ref[0] + (-0.979724392054)*x_ref[1]**o + (-0.0607589379308)*x_ref[1]
        arg[(1, 0, 2)]=-0.840441480432*x[0]**o + (-0.103810790627)*x[0] + (0.408702521552)*x[1]**o + (0.987806677667)*x[1]
        ref[(1, 0, 2)]=-0.840441480432*x_ref[0]**o + (-0.103810790627)*x_ref[0] + (0.408702521552)*x_ref[1]**o + (0.987806677667)*x_ref[1]
        arg[(1, 1, 0)]=0.692976785258*x[0]**o + (0.0988704226223)*x[0] + (-0.518300400327)*x[1]**o + (0.209648730237)*x[1]
        ref[(1, 1, 0)]=0.692976785258*x_ref[0]**o + (0.0988704226223)*x_ref[0] + (-0.518300400327)*x_ref[1]**o + (0.209648730237)*x_ref[1]
        arg[(1, 1, 1)]=-0.319974598624*x[0]**o + (0.0422493521305)*x[0] + (-0.287654793871)*x[1]**o + (0.954252062974)*x[1]
        ref[(1, 1, 1)]=-0.319974598624*x_ref[0]**o + (0.0422493521305)*x_ref[0] + (-0.287654793871)*x_ref[1]**o + (0.954252062974)*x_ref[1]
        arg[(1, 1, 2)]=0.16205677405*x[0]**o + (0.377960581855)*x[0] + (0.729502565881)*x[1]**o + (-0.307831209814)*x[1]
        ref[(1, 1, 2)]=0.16205677405*x_ref[0]**o + (0.377960581855)*x_ref[0] + (0.729502565881)*x_ref[1]**o + (-0.307831209814)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.0939933164066*x[2]**o + (-0.244108516503)*x[2]
            ref[(0, 0, 0)]+=0.0939933164066*x_ref[2]**o + (-0.244108516503)*x_ref[2]
            arg[(0, 0, 1)]+=-0.0409631930446*x[2]**o + (-0.205062309971)*x[2]
            ref[(0, 0, 1)]+=-0.0409631930446*x_ref[2]**o + (-0.205062309971)*x_ref[2]
            arg[(0, 0, 2)]+=0.737989235634*x[2]**o + (-0.185695115204)*x[2]
            ref[(0, 0, 2)]+=0.737989235634*x_ref[2]**o + (-0.185695115204)*x_ref[2]
            arg[(0, 1, 0)]+=0.118879599498*x[2]**o + (0.791161447963)*x[2]
            ref[(0, 1, 0)]+=0.118879599498*x_ref[2]**o + (0.791161447963)*x_ref[2]
            arg[(0, 1, 1)]+=-0.791324170627*x[2]**o + (-0.612278217259)*x[2]
            ref[(0, 1, 1)]+=-0.791324170627*x_ref[2]**o + (-0.612278217259)*x_ref[2]
            arg[(0, 1, 2)]+=0.14448997708*x[2]**o + (0.26854179118)*x[2]
            ref[(0, 1, 2)]+=0.14448997708*x_ref[2]**o + (0.26854179118)*x_ref[2]
            arg[(1, 0, 0)]+=-0.0813835232223*x[2]**o + (-0.467673838688)*x[2]
            ref[(1, 0, 0)]+=-0.0813835232223*x_ref[2]**o + (-0.467673838688)*x_ref[2]
            arg[(1, 0, 1)]+=-0.24731941494*x[2]**o + (0.638316061767)*x[2]
            ref[(1, 0, 1)]+=-0.24731941494*x_ref[2]**o + (0.638316061767)*x_ref[2]
            arg[(1, 0, 2)]+=-0.125747204521*x[2]**o + (-0.647212468004)*x[2]
            ref[(1, 0, 2)]+=-0.125747204521*x_ref[2]**o + (-0.647212468004)*x_ref[2]
            arg[(1, 1, 0)]+=0.0406333169629*x[2]**o + (0.376717639715)*x[2]
            ref[(1, 1, 0)]+=0.0406333169629*x_ref[2]**o + (0.376717639715)*x_ref[2]
            arg[(1, 1, 1)]+=-0.197943961736*x[2]**o + (-0.97231656565)*x[2]
            ref[(1, 1, 1)]+=-0.197943961736*x_ref[2]**o + (-0.97231656565)*x_ref[2]
            arg[(1, 1, 2)]+=-0.722859738507*x[2]**o + (-0.548222610639)*x[2]
            ref[(1, 1, 2)]+=-0.722859738507*x_ref[2]**o + (-0.548222610639)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onSolution_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on Solution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 2, 2),w)
        ref = Data(0,(4, 4, 2, 2),w_ref)
        arg[(0, 0, 0, 0)]=0.467787052663*x[0]**o + (-0.246831530405)*x[0] + (-0.233869006729)*x[1]**o + (-0.466607867907)*x[1]
        ref[(0, 0, 0, 0)]=0.467787052663*x_ref[0]**o + (-0.246831530405)*x_ref[0] + (-0.233869006729)*x_ref[1]**o + (-0.466607867907)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.958527297273*x[0]**o + (0.569745068802)*x[0] + (0.497123199479)*x[1]**o + (-0.999262526464)*x[1]
        ref[(0, 0, 0, 1)]=0.958527297273*x_ref[0]**o + (0.569745068802)*x_ref[0] + (0.497123199479)*x_ref[1]**o + (-0.999262526464)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.221466733779*x[0]**o + (-0.80412599948)*x[0] + (0.516055691024)*x[1]**o + (-0.177240997971)*x[1]
        ref[(0, 0, 1, 0)]=-0.221466733779*x_ref[0]**o + (-0.80412599948)*x_ref[0] + (0.516055691024)*x_ref[1]**o + (-0.177240997971)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.285559763538*x[0]**o + (0.400859166017)*x[0] + (0.921743187493)*x[1]**o + (0.313199066598)*x[1]
        ref[(0, 0, 1, 1)]=0.285559763538*x_ref[0]**o + (0.400859166017)*x_ref[0] + (0.921743187493)*x_ref[1]**o + (0.313199066598)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.503612870544*x[0]**o + (-0.855096605914)*x[0] + (0.879023869416)*x[1]**o + (0.145909712572)*x[1]
        ref[(0, 1, 0, 0)]=0.503612870544*x_ref[0]**o + (-0.855096605914)*x_ref[0] + (0.879023869416)*x_ref[1]**o + (0.145909712572)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.487622973683*x[0]**o + (0.374014285028)*x[0] + (0.196111588971)*x[1]**o + (-0.0907927395119)*x[1]
        ref[(0, 1, 0, 1)]=0.487622973683*x_ref[0]**o + (0.374014285028)*x_ref[0] + (0.196111588971)*x_ref[1]**o + (-0.0907927395119)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.296983410226*x[0]**o + (-0.643227323605)*x[0] + (-0.241605322275)*x[1]**o + (-0.821090127511)*x[1]
        ref[(0, 1, 1, 0)]=0.296983410226*x_ref[0]**o + (-0.643227323605)*x_ref[0] + (-0.241605322275)*x_ref[1]**o + (-0.821090127511)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.751252151735*x[0]**o + (-0.309014519761)*x[0] + (-0.590950210068)*x[1]**o + (-0.514962462962)*x[1]
        ref[(0, 1, 1, 1)]=0.751252151735*x_ref[0]**o + (-0.309014519761)*x_ref[0] + (-0.590950210068)*x_ref[1]**o + (-0.514962462962)*x_ref[1]
        arg[(0, 2, 0, 0)]=0.762910767289*x[0]**o + (-0.181171127913)*x[0] + (0.610202350014)*x[1]**o + (-0.0259144481331)*x[1]
        ref[(0, 2, 0, 0)]=0.762910767289*x_ref[0]**o + (-0.181171127913)*x_ref[0] + (0.610202350014)*x_ref[1]**o + (-0.0259144481331)*x_ref[1]
        arg[(0, 2, 0, 1)]=-0.949344388934*x[0]**o + (-0.178145736354)*x[0] + (-0.0675466182324)*x[1]**o + (-0.88233784472)*x[1]
        ref[(0, 2, 0, 1)]=-0.949344388934*x_ref[0]**o + (-0.178145736354)*x_ref[0] + (-0.0675466182324)*x_ref[1]**o + (-0.88233784472)*x_ref[1]
        arg[(0, 2, 1, 0)]=0.743203495696*x[0]**o + (0.863190150445)*x[0] + (-0.0199943896884)*x[1]**o + (0.825977999226)*x[1]
        ref[(0, 2, 1, 0)]=0.743203495696*x_ref[0]**o + (0.863190150445)*x_ref[0] + (-0.0199943896884)*x_ref[1]**o + (0.825977999226)*x_ref[1]
        arg[(0, 2, 1, 1)]=-0.370545065104*x[0]**o + (0.66755459179)*x[0] + (0.328414010914)*x[1]**o + (0.328362340262)*x[1]
        ref[(0, 2, 1, 1)]=-0.370545065104*x_ref[0]**o + (0.66755459179)*x_ref[0] + (0.328414010914)*x_ref[1]**o + (0.328362340262)*x_ref[1]
        arg[(0, 3, 0, 0)]=0.866643075394*x[0]**o + (-0.329392807727)*x[0] + (0.581925186595)*x[1]**o + (-0.811706708685)*x[1]
        ref[(0, 3, 0, 0)]=0.866643075394*x_ref[0]**o + (-0.329392807727)*x_ref[0] + (0.581925186595)*x_ref[1]**o + (-0.811706708685)*x_ref[1]
        arg[(0, 3, 0, 1)]=0.394834317931*x[0]**o + (-0.282075622622)*x[0] + (-0.991162121048)*x[1]**o + (0.441156519631)*x[1]
        ref[(0, 3, 0, 1)]=0.394834317931*x_ref[0]**o + (-0.282075622622)*x_ref[0] + (-0.991162121048)*x_ref[1]**o + (0.441156519631)*x_ref[1]
        arg[(0, 3, 1, 0)]=-0.436292239561*x[0]**o + (0.190909727011)*x[0] + (0.718058496757)*x[1]**o + (0.512155891088)*x[1]
        ref[(0, 3, 1, 0)]=-0.436292239561*x_ref[0]**o + (0.190909727011)*x_ref[0] + (0.718058496757)*x_ref[1]**o + (0.512155891088)*x_ref[1]
        arg[(0, 3, 1, 1)]=0.199702361098*x[0]**o + (-0.187662223586)*x[0] + (0.96210916187)*x[1]**o + (0.217539630329)*x[1]
        ref[(0, 3, 1, 1)]=0.199702361098*x_ref[0]**o + (-0.187662223586)*x_ref[0] + (0.96210916187)*x_ref[1]**o + (0.217539630329)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.239470457405*x[0]**o + (-0.527142484011)*x[0] + (0.324303436743)*x[1]**o + (0.563804453223)*x[1]
        ref[(1, 0, 0, 0)]=-0.239470457405*x_ref[0]**o + (-0.527142484011)*x_ref[0] + (0.324303436743)*x_ref[1]**o + (0.563804453223)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.340555513081*x[0]**o + (0.879033276211)*x[0] + (-0.923835755675)*x[1]**o + (0.164337651235)*x[1]
        ref[(1, 0, 0, 1)]=0.340555513081*x_ref[0]**o + (0.879033276211)*x_ref[0] + (-0.923835755675)*x_ref[1]**o + (0.164337651235)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.0945997848702*x[0]**o + (-0.214058380008)*x[0] + (-0.577186179426)*x[1]**o + (0.338344054152)*x[1]
        ref[(1, 0, 1, 0)]=-0.0945997848702*x_ref[0]**o + (-0.214058380008)*x_ref[0] + (-0.577186179426)*x_ref[1]**o + (0.338344054152)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.218408160522*x[0]**o + (-0.00517209270699)*x[0] + (-0.94571687628)*x[1]**o + (0.129213095169)*x[1]
        ref[(1, 0, 1, 1)]=0.218408160522*x_ref[0]**o + (-0.00517209270699)*x_ref[0] + (-0.94571687628)*x_ref[1]**o + (0.129213095169)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.764426353338*x[0]**o + (-0.0422039579566)*x[0] + (0.184772493741)*x[1]**o + (0.255797743719)*x[1]
        ref[(1, 1, 0, 0)]=-0.764426353338*x_ref[0]**o + (-0.0422039579566)*x_ref[0] + (0.184772493741)*x_ref[1]**o + (0.255797743719)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.701320367887*x[0]**o + (-0.0993781621046)*x[0] + (-0.00152964331073)*x[1]**o + (0.548778645075)*x[1]
        ref[(1, 1, 0, 1)]=0.701320367887*x_ref[0]**o + (-0.0993781621046)*x_ref[0] + (-0.00152964331073)*x_ref[1]**o + (0.548778645075)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.448071188374*x[0]**o + (-0.499631074788)*x[0] + (-0.650478206273)*x[1]**o + (0.906257499539)*x[1]
        ref[(1, 1, 1, 0)]=0.448071188374*x_ref[0]**o + (-0.499631074788)*x_ref[0] + (-0.650478206273)*x_ref[1]**o + (0.906257499539)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.270194654802*x[0]**o + (-0.030848505947)*x[0] + (0.0907351771826)*x[1]**o + (-0.470525915659)*x[1]
        ref[(1, 1, 1, 1)]=-0.270194654802*x_ref[0]**o + (-0.030848505947)*x_ref[0] + (0.0907351771826)*x_ref[1]**o + (-0.470525915659)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.306837540535*x[0]**o + (-0.742536755165)*x[0] + (0.73515352155)*x[1]**o + (0.660571401538)*x[1]
        ref[(1, 2, 0, 0)]=-0.306837540535*x_ref[0]**o + (-0.742536755165)*x_ref[0] + (0.73515352155)*x_ref[1]**o + (0.660571401538)*x_ref[1]
        arg[(1, 2, 0, 1)]=-0.145444443816*x[0]**o + (-0.364357210487)*x[0] + (-0.301958467874)*x[1]**o + (-0.930645534291)*x[1]
        ref[(1, 2, 0, 1)]=-0.145444443816*x_ref[0]**o + (-0.364357210487)*x_ref[0] + (-0.301958467874)*x_ref[1]**o + (-0.930645534291)*x_ref[1]
        arg[(1, 2, 1, 0)]=0.335785511414*x[0]**o + (0.859029142571)*x[0] + (0.0424496548934)*x[1]**o + (-0.640947662311)*x[1]
        ref[(1, 2, 1, 0)]=0.335785511414*x_ref[0]**o + (0.859029142571)*x_ref[0] + (0.0424496548934)*x_ref[1]**o + (-0.640947662311)*x_ref[1]
        arg[(1, 2, 1, 1)]=0.984328353691*x[0]**o + (-0.0213405532707)*x[0] + (-0.132243937824)*x[1]**o + (-0.386139656139)*x[1]
        ref[(1, 2, 1, 1)]=0.984328353691*x_ref[0]**o + (-0.0213405532707)*x_ref[0] + (-0.132243937824)*x_ref[1]**o + (-0.386139656139)*x_ref[1]
        arg[(1, 3, 0, 0)]=0.0272273105715*x[0]**o + (-0.585817133524)*x[0] + (-0.93585206836)*x[1]**o + (0.751250463261)*x[1]
        ref[(1, 3, 0, 0)]=0.0272273105715*x_ref[0]**o + (-0.585817133524)*x_ref[0] + (-0.93585206836)*x_ref[1]**o + (0.751250463261)*x_ref[1]
        arg[(1, 3, 0, 1)]=-0.408384984485*x[0]**o + (-0.521885535869)*x[0] + (0.290459202634)*x[1]**o + (0.733042173028)*x[1]
        ref[(1, 3, 0, 1)]=-0.408384984485*x_ref[0]**o + (-0.521885535869)*x_ref[0] + (0.290459202634)*x_ref[1]**o + (0.733042173028)*x_ref[1]
        arg[(1, 3, 1, 0)]=-0.217421456698*x[0]**o + (-0.579956137842)*x[0] + (-0.185465284453)*x[1]**o + (0.0717611262877)*x[1]
        ref[(1, 3, 1, 0)]=-0.217421456698*x_ref[0]**o + (-0.579956137842)*x_ref[0] + (-0.185465284453)*x_ref[1]**o + (0.0717611262877)*x_ref[1]
        arg[(1, 3, 1, 1)]=0.702879599024*x[0]**o + (-0.153204348434)*x[0] + (-0.996671676161)*x[1]**o + (-0.635440189225)*x[1]
        ref[(1, 3, 1, 1)]=0.702879599024*x_ref[0]**o + (-0.153204348434)*x_ref[0] + (-0.996671676161)*x_ref[1]**o + (-0.635440189225)*x_ref[1]
        arg[(2, 0, 0, 0)]=-0.112324290334*x[0]**o + (-0.124534140165)*x[0] + (0.563878104168)*x[1]**o + (0.847663408935)*x[1]
        ref[(2, 0, 0, 0)]=-0.112324290334*x_ref[0]**o + (-0.124534140165)*x_ref[0] + (0.563878104168)*x_ref[1]**o + (0.847663408935)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.682205249179*x[0]**o + (-0.58800160075)*x[0] + (-0.0758865811225)*x[1]**o + (-0.261868848781)*x[1]
        ref[(2, 0, 0, 1)]=0.682205249179*x_ref[0]**o + (-0.58800160075)*x_ref[0] + (-0.0758865811225)*x_ref[1]**o + (-0.261868848781)*x_ref[1]
        arg[(2, 0, 1, 0)]=0.985830926297*x[0]**o + (0.512169274088)*x[0] + (-0.192901696579)*x[1]**o + (0.935725669682)*x[1]
        ref[(2, 0, 1, 0)]=0.985830926297*x_ref[0]**o + (0.512169274088)*x_ref[0] + (-0.192901696579)*x_ref[1]**o + (0.935725669682)*x_ref[1]
        arg[(2, 0, 1, 1)]=-0.796885240415*x[0]**o + (0.0464034738541)*x[0] + (-0.130170480266)*x[1]**o + (-0.32618536196)*x[1]
        ref[(2, 0, 1, 1)]=-0.796885240415*x_ref[0]**o + (0.0464034738541)*x_ref[0] + (-0.130170480266)*x_ref[1]**o + (-0.32618536196)*x_ref[1]
        arg[(2, 1, 0, 0)]=-0.914526179185*x[0]**o + (-0.154779418418)*x[0] + (-0.111113257703)*x[1]**o + (-0.0398058256888)*x[1]
        ref[(2, 1, 0, 0)]=-0.914526179185*x_ref[0]**o + (-0.154779418418)*x_ref[0] + (-0.111113257703)*x_ref[1]**o + (-0.0398058256888)*x_ref[1]
        arg[(2, 1, 0, 1)]=-0.342729272381*x[0]**o + (-0.207500224928)*x[0] + (-0.334813918118)*x[1]**o + (-0.661237251613)*x[1]
        ref[(2, 1, 0, 1)]=-0.342729272381*x_ref[0]**o + (-0.207500224928)*x_ref[0] + (-0.334813918118)*x_ref[1]**o + (-0.661237251613)*x_ref[1]
        arg[(2, 1, 1, 0)]=0.73801310022*x[0]**o + (-0.15805668098)*x[0] + (-0.579942220809)*x[1]**o + (0.924098014391)*x[1]
        ref[(2, 1, 1, 0)]=0.73801310022*x_ref[0]**o + (-0.15805668098)*x_ref[0] + (-0.579942220809)*x_ref[1]**o + (0.924098014391)*x_ref[1]
        arg[(2, 1, 1, 1)]=-0.609604320495*x[0]**o + (-0.66130665656)*x[0] + (-0.798533220089)*x[1]**o + (-0.248151019829)*x[1]
        ref[(2, 1, 1, 1)]=-0.609604320495*x_ref[0]**o + (-0.66130665656)*x_ref[0] + (-0.798533220089)*x_ref[1]**o + (-0.248151019829)*x_ref[1]
        arg[(2, 2, 0, 0)]=-0.693048248205*x[0]**o + (0.840147430039)*x[0] + (0.0356229388954)*x[1]**o + (0.759184059726)*x[1]
        ref[(2, 2, 0, 0)]=-0.693048248205*x_ref[0]**o + (0.840147430039)*x_ref[0] + (0.0356229388954)*x_ref[1]**o + (0.759184059726)*x_ref[1]
        arg[(2, 2, 0, 1)]=-0.671696657463*x[0]**o + (-0.142651257878)*x[0] + (0.958323282219)*x[1]**o + (0.0741990537283)*x[1]
        ref[(2, 2, 0, 1)]=-0.671696657463*x_ref[0]**o + (-0.142651257878)*x_ref[0] + (0.958323282219)*x_ref[1]**o + (0.0741990537283)*x_ref[1]
        arg[(2, 2, 1, 0)]=0.754055461487*x[0]**o + (-0.351355794402)*x[0] + (-0.308341646761)*x[1]**o + (0.392135145681)*x[1]
        ref[(2, 2, 1, 0)]=0.754055461487*x_ref[0]**o + (-0.351355794402)*x_ref[0] + (-0.308341646761)*x_ref[1]**o + (0.392135145681)*x_ref[1]
        arg[(2, 2, 1, 1)]=-0.857856847285*x[0]**o + (0.387677209419)*x[0] + (0.176027347211)*x[1]**o + (-0.0847131996343)*x[1]
        ref[(2, 2, 1, 1)]=-0.857856847285*x_ref[0]**o + (0.387677209419)*x_ref[0] + (0.176027347211)*x_ref[1]**o + (-0.0847131996343)*x_ref[1]
        arg[(2, 3, 0, 0)]=0.905911643219*x[0]**o + (-0.552365347713)*x[0] + (-0.482854943852)*x[1]**o + (0.724413325541)*x[1]
        ref[(2, 3, 0, 0)]=0.905911643219*x_ref[0]**o + (-0.552365347713)*x_ref[0] + (-0.482854943852)*x_ref[1]**o + (0.724413325541)*x_ref[1]
        arg[(2, 3, 0, 1)]=0.145248985194*x[0]**o + (-0.460270860827)*x[0] + (0.0126233995184)*x[1]**o + (-0.257287698551)*x[1]
        ref[(2, 3, 0, 1)]=0.145248985194*x_ref[0]**o + (-0.460270860827)*x_ref[0] + (0.0126233995184)*x_ref[1]**o + (-0.257287698551)*x_ref[1]
        arg[(2, 3, 1, 0)]=0.0441603459037*x[0]**o + (-0.394467364804)*x[0] + (-0.602893320718)*x[1]**o + (-0.695788654441)*x[1]
        ref[(2, 3, 1, 0)]=0.0441603459037*x_ref[0]**o + (-0.394467364804)*x_ref[0] + (-0.602893320718)*x_ref[1]**o + (-0.695788654441)*x_ref[1]
        arg[(2, 3, 1, 1)]=-0.0981016239177*x[0]**o + (0.753717719101)*x[0] + (-0.0794843530482)*x[1]**o + (-0.979391201739)*x[1]
        ref[(2, 3, 1, 1)]=-0.0981016239177*x_ref[0]**o + (0.753717719101)*x_ref[0] + (-0.0794843530482)*x_ref[1]**o + (-0.979391201739)*x_ref[1]
        arg[(3, 0, 0, 0)]=-0.195530049697*x[0]**o + (-0.313923136713)*x[0] + (-0.20008022751)*x[1]**o + (0.398164248402)*x[1]
        ref[(3, 0, 0, 0)]=-0.195530049697*x_ref[0]**o + (-0.313923136713)*x_ref[0] + (-0.20008022751)*x_ref[1]**o + (0.398164248402)*x_ref[1]
        arg[(3, 0, 0, 1)]=-0.432455159442*x[0]**o + (0.662651916984)*x[0] + (0.0978287741517)*x[1]**o + (-0.520039994624)*x[1]
        ref[(3, 0, 0, 1)]=-0.432455159442*x_ref[0]**o + (0.662651916984)*x_ref[0] + (0.0978287741517)*x_ref[1]**o + (-0.520039994624)*x_ref[1]
        arg[(3, 0, 1, 0)]=0.310893210931*x[0]**o + (0.697287035576)*x[0] + (0.466999704449)*x[1]**o + (0.828841678326)*x[1]
        ref[(3, 0, 1, 0)]=0.310893210931*x_ref[0]**o + (0.697287035576)*x_ref[0] + (0.466999704449)*x_ref[1]**o + (0.828841678326)*x_ref[1]
        arg[(3, 0, 1, 1)]=0.163798355541*x[0]**o + (-0.486989673117)*x[0] + (-0.50027914983)*x[1]**o + (0.467130206686)*x[1]
        ref[(3, 0, 1, 1)]=0.163798355541*x_ref[0]**o + (-0.486989673117)*x_ref[0] + (-0.50027914983)*x_ref[1]**o + (0.467130206686)*x_ref[1]
        arg[(3, 1, 0, 0)]=0.0890241593605*x[0]**o + (0.818278922595)*x[0] + (-0.575511155286)*x[1]**o + (-0.947830802775)*x[1]
        ref[(3, 1, 0, 0)]=0.0890241593605*x_ref[0]**o + (0.818278922595)*x_ref[0] + (-0.575511155286)*x_ref[1]**o + (-0.947830802775)*x_ref[1]
        arg[(3, 1, 0, 1)]=0.148519817106*x[0]**o + (0.80886078557)*x[0] + (0.38280354801)*x[1]**o + (-0.12216470662)*x[1]
        ref[(3, 1, 0, 1)]=0.148519817106*x_ref[0]**o + (0.80886078557)*x_ref[0] + (0.38280354801)*x_ref[1]**o + (-0.12216470662)*x_ref[1]
        arg[(3, 1, 1, 0)]=0.827136640028*x[0]**o + (0.0442811987397)*x[0] + (0.936542030634)*x[1]**o + (0.0449601340766)*x[1]
        ref[(3, 1, 1, 0)]=0.827136640028*x_ref[0]**o + (0.0442811987397)*x_ref[0] + (0.936542030634)*x_ref[1]**o + (0.0449601340766)*x_ref[1]
        arg[(3, 1, 1, 1)]=0.123400346*x[0]**o + (0.63421925213)*x[0] + (0.287098500435)*x[1]**o + (-0.754998013226)*x[1]
        ref[(3, 1, 1, 1)]=0.123400346*x_ref[0]**o + (0.63421925213)*x_ref[0] + (0.287098500435)*x_ref[1]**o + (-0.754998013226)*x_ref[1]
        arg[(3, 2, 0, 0)]=-0.276762772213*x[0]**o + (-0.424089948429)*x[0] + (0.479114355409)*x[1]**o + (0.979589057101)*x[1]
        ref[(3, 2, 0, 0)]=-0.276762772213*x_ref[0]**o + (-0.424089948429)*x_ref[0] + (0.479114355409)*x_ref[1]**o + (0.979589057101)*x_ref[1]
        arg[(3, 2, 0, 1)]=-0.149859650582*x[0]**o + (0.0251799108588)*x[0] + (-0.715013421569)*x[1]**o + (0.736725793669)*x[1]
        ref[(3, 2, 0, 1)]=-0.149859650582*x_ref[0]**o + (0.0251799108588)*x_ref[0] + (-0.715013421569)*x_ref[1]**o + (0.736725793669)*x_ref[1]
        arg[(3, 2, 1, 0)]=-0.445367446278*x[0]**o + (-0.957577403846)*x[0] + (0.917782361017)*x[1]**o + (-0.542483852061)*x[1]
        ref[(3, 2, 1, 0)]=-0.445367446278*x_ref[0]**o + (-0.957577403846)*x_ref[0] + (0.917782361017)*x_ref[1]**o + (-0.542483852061)*x_ref[1]
        arg[(3, 2, 1, 1)]=-0.24034630295*x[0]**o + (-0.25888168354)*x[0] + (-0.987414006368)*x[1]**o + (-0.836692527514)*x[1]
        ref[(3, 2, 1, 1)]=-0.24034630295*x_ref[0]**o + (-0.25888168354)*x_ref[0] + (-0.987414006368)*x_ref[1]**o + (-0.836692527514)*x_ref[1]
        arg[(3, 3, 0, 0)]=0.618104486455*x[0]**o + (0.451442365484)*x[0] + (0.931016615758)*x[1]**o + (0.227715625728)*x[1]
        ref[(3, 3, 0, 0)]=0.618104486455*x_ref[0]**o + (0.451442365484)*x_ref[0] + (0.931016615758)*x_ref[1]**o + (0.227715625728)*x_ref[1]
        arg[(3, 3, 0, 1)]=-0.435704672292*x[0]**o + (-0.650931744723)*x[0] + (-0.14766955874)*x[1]**o + (0.318215835753)*x[1]
        ref[(3, 3, 0, 1)]=-0.435704672292*x_ref[0]**o + (-0.650931744723)*x_ref[0] + (-0.14766955874)*x_ref[1]**o + (0.318215835753)*x_ref[1]
        arg[(3, 3, 1, 0)]=0.815208472702*x[0]**o + (-0.88765248209)*x[0] + (-0.208300550015)*x[1]**o + (-0.519774496476)*x[1]
        ref[(3, 3, 1, 0)]=0.815208472702*x_ref[0]**o + (-0.88765248209)*x_ref[0] + (-0.208300550015)*x_ref[1]**o + (-0.519774496476)*x_ref[1]
        arg[(3, 3, 1, 1)]=-0.392134883933*x[0]**o + (-0.548682800087)*x[0] + (0.938341192828)*x[1]**o + (-0.474128590591)*x[1]
        ref[(3, 3, 1, 1)]=-0.392134883933*x_ref[0]**o + (-0.548682800087)*x_ref[0] + (0.938341192828)*x_ref[1]**o + (-0.474128590591)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.134545370997*x[2]**o + (0.827521536287)*x[2]
            ref[(0, 0, 0, 0)]+=0.134545370997*x_ref[2]**o + (0.827521536287)*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.658312999426*x[2]**o + (-0.608726164552)*x[2]
            ref[(0, 0, 0, 1)]+=-0.658312999426*x_ref[2]**o + (-0.608726164552)*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.538123217409*x[2]**o + (-0.86833619882)*x[2]
            ref[(0, 0, 1, 0)]+=-0.538123217409*x_ref[2]**o + (-0.86833619882)*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.0930361473618*x[2]**o + (0.907937327771)*x[2]
            ref[(0, 0, 1, 1)]+=0.0930361473618*x_ref[2]**o + (0.907937327771)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.271762315155*x[2]**o + (-0.616118314428)*x[2]
            ref[(0, 1, 0, 0)]+=-0.271762315155*x_ref[2]**o + (-0.616118314428)*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.984915201339*x[2]**o + (-0.0366232382795)*x[2]
            ref[(0, 1, 0, 1)]+=0.984915201339*x_ref[2]**o + (-0.0366232382795)*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.759695484413*x[2]**o + (-0.841121824512)*x[2]
            ref[(0, 1, 1, 0)]+=-0.759695484413*x_ref[2]**o + (-0.841121824512)*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.872830696785*x[2]**o + (0.131426100439)*x[2]
            ref[(0, 1, 1, 1)]+=-0.872830696785*x_ref[2]**o + (0.131426100439)*x_ref[2]
            arg[(0, 2, 0, 0)]+=-0.0238903942919*x[2]**o + (-0.348196824862)*x[2]
            ref[(0, 2, 0, 0)]+=-0.0238903942919*x_ref[2]**o + (-0.348196824862)*x_ref[2]
            arg[(0, 2, 0, 1)]+=0.772345235203*x[2]**o + (-0.681058879663)*x[2]
            ref[(0, 2, 0, 1)]+=0.772345235203*x_ref[2]**o + (-0.681058879663)*x_ref[2]
            arg[(0, 2, 1, 0)]+=-0.42138467499*x[2]**o + (-0.419610004562)*x[2]
            ref[(0, 2, 1, 0)]+=-0.42138467499*x_ref[2]**o + (-0.419610004562)*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.441278932313*x[2]**o + (-0.776741517195)*x[2]
            ref[(0, 2, 1, 1)]+=-0.441278932313*x_ref[2]**o + (-0.776741517195)*x_ref[2]
            arg[(0, 3, 0, 0)]+=-0.762816161906*x[2]**o + (-0.0193590811546)*x[2]
            ref[(0, 3, 0, 0)]+=-0.762816161906*x_ref[2]**o + (-0.0193590811546)*x_ref[2]
            arg[(0, 3, 0, 1)]+=-0.661401729169*x[2]**o + (0.522338877661)*x[2]
            ref[(0, 3, 0, 1)]+=-0.661401729169*x_ref[2]**o + (0.522338877661)*x_ref[2]
            arg[(0, 3, 1, 0)]+=0.578433889794*x[2]**o + (-0.227995851558)*x[2]
            ref[(0, 3, 1, 0)]+=0.578433889794*x_ref[2]**o + (-0.227995851558)*x_ref[2]
            arg[(0, 3, 1, 1)]+=0.871332838109*x[2]**o + (0.928632285448)*x[2]
            ref[(0, 3, 1, 1)]+=0.871332838109*x_ref[2]**o + (0.928632285448)*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.776165996209*x[2]**o + (-0.563733705648)*x[2]
            ref[(1, 0, 0, 0)]+=0.776165996209*x_ref[2]**o + (-0.563733705648)*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.104488257589*x[2]**o + (0.180698766453)*x[2]
            ref[(1, 0, 0, 1)]+=-0.104488257589*x_ref[2]**o + (0.180698766453)*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.863853623862*x[2]**o + (0.33379617906)*x[2]
            ref[(1, 0, 1, 0)]+=0.863853623862*x_ref[2]**o + (0.33379617906)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.68273811263*x[2]**o + (0.742903864739)*x[2]
            ref[(1, 0, 1, 1)]+=-0.68273811263*x_ref[2]**o + (0.742903864739)*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.879568075304*x[2]**o + (-0.807185146728)*x[2]
            ref[(1, 1, 0, 0)]+=-0.879568075304*x_ref[2]**o + (-0.807185146728)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.315550847489*x[2]**o + (-0.565336416371)*x[2]
            ref[(1, 1, 0, 1)]+=0.315550847489*x_ref[2]**o + (-0.565336416371)*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.445793660268*x[2]**o + (0.712887444841)*x[2]
            ref[(1, 1, 1, 0)]+=0.445793660268*x_ref[2]**o + (0.712887444841)*x_ref[2]
            arg[(1, 1, 1, 1)]+=-0.0260185667525*x[2]**o + (0.210678021083)*x[2]
            ref[(1, 1, 1, 1)]+=-0.0260185667525*x_ref[2]**o + (0.210678021083)*x_ref[2]
            arg[(1, 2, 0, 0)]+=-0.69367558496*x[2]**o + (-0.519679353356)*x[2]
            ref[(1, 2, 0, 0)]+=-0.69367558496*x_ref[2]**o + (-0.519679353356)*x_ref[2]
            arg[(1, 2, 0, 1)]+=0.592186159266*x[2]**o + (0.0436076787289)*x[2]
            ref[(1, 2, 0, 1)]+=0.592186159266*x_ref[2]**o + (0.0436076787289)*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.871128397471*x[2]**o + (0.724644605992)*x[2]
            ref[(1, 2, 1, 0)]+=0.871128397471*x_ref[2]**o + (0.724644605992)*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.559672328586*x[2]**o + (0.492533349099)*x[2]
            ref[(1, 2, 1, 1)]+=0.559672328586*x_ref[2]**o + (0.492533349099)*x_ref[2]
            arg[(1, 3, 0, 0)]+=-0.859685355059*x[2]**o + (-0.486405624893)*x[2]
            ref[(1, 3, 0, 0)]+=-0.859685355059*x_ref[2]**o + (-0.486405624893)*x_ref[2]
            arg[(1, 3, 0, 1)]+=-0.661893834078*x[2]**o + (-0.480847550469)*x[2]
            ref[(1, 3, 0, 1)]+=-0.661893834078*x_ref[2]**o + (-0.480847550469)*x_ref[2]
            arg[(1, 3, 1, 0)]+=0.117099717751*x[2]**o + (-0.198980081576)*x[2]
            ref[(1, 3, 1, 0)]+=0.117099717751*x_ref[2]**o + (-0.198980081576)*x_ref[2]
            arg[(1, 3, 1, 1)]+=0.173773221625*x[2]**o + (0.87391317298)*x[2]
            ref[(1, 3, 1, 1)]+=0.173773221625*x_ref[2]**o + (0.87391317298)*x_ref[2]
            arg[(2, 0, 0, 0)]+=0.856973549079*x[2]**o + (-0.348903569306)*x[2]
            ref[(2, 0, 0, 0)]+=0.856973549079*x_ref[2]**o + (-0.348903569306)*x_ref[2]
            arg[(2, 0, 0, 1)]+=-0.766167966685*x[2]**o + (-0.4840006358)*x[2]
            ref[(2, 0, 0, 1)]+=-0.766167966685*x_ref[2]**o + (-0.4840006358)*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.680740162386*x[2]**o + (-0.308751291115)*x[2]
            ref[(2, 0, 1, 0)]+=-0.680740162386*x_ref[2]**o + (-0.308751291115)*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.110043315534*x[2]**o + (-0.274987030183)*x[2]
            ref[(2, 0, 1, 1)]+=0.110043315534*x_ref[2]**o + (-0.274987030183)*x_ref[2]
            arg[(2, 1, 0, 0)]+=-0.171389730263*x[2]**o + (-0.226775953225)*x[2]
            ref[(2, 1, 0, 0)]+=-0.171389730263*x_ref[2]**o + (-0.226775953225)*x_ref[2]
            arg[(2, 1, 0, 1)]+=0.629898264103*x[2]**o + (0.0844381283158)*x[2]
            ref[(2, 1, 0, 1)]+=0.629898264103*x_ref[2]**o + (0.0844381283158)*x_ref[2]
            arg[(2, 1, 1, 0)]+=-0.684021054131*x[2]**o + (0.308660461312)*x[2]
            ref[(2, 1, 1, 0)]+=-0.684021054131*x_ref[2]**o + (0.308660461312)*x_ref[2]
            arg[(2, 1, 1, 1)]+=0.485682605543*x[2]**o + (0.0344091823468)*x[2]
            ref[(2, 1, 1, 1)]+=0.485682605543*x_ref[2]**o + (0.0344091823468)*x_ref[2]
            arg[(2, 2, 0, 0)]+=0.352795268141*x[2]**o + (0.0321869153363)*x[2]
            ref[(2, 2, 0, 0)]+=0.352795268141*x_ref[2]**o + (0.0321869153363)*x_ref[2]
            arg[(2, 2, 0, 1)]+=0.346019953269*x[2]**o + (0.232910505988)*x[2]
            ref[(2, 2, 0, 1)]+=0.346019953269*x_ref[2]**o + (0.232910505988)*x_ref[2]
            arg[(2, 2, 1, 0)]+=-0.788967642771*x[2]**o + (-0.41992522747)*x[2]
            ref[(2, 2, 1, 0)]+=-0.788967642771*x_ref[2]**o + (-0.41992522747)*x_ref[2]
            arg[(2, 2, 1, 1)]+=0.0222830898285*x[2]**o + (-0.34583589812)*x[2]
            ref[(2, 2, 1, 1)]+=0.0222830898285*x_ref[2]**o + (-0.34583589812)*x_ref[2]
            arg[(2, 3, 0, 0)]+=-0.918585679306*x[2]**o + (-0.547017843825)*x[2]
            ref[(2, 3, 0, 0)]+=-0.918585679306*x_ref[2]**o + (-0.547017843825)*x_ref[2]
            arg[(2, 3, 0, 1)]+=0.931532584784*x[2]**o + (0.0495206295199)*x[2]
            ref[(2, 3, 0, 1)]+=0.931532584784*x_ref[2]**o + (0.0495206295199)*x_ref[2]
            arg[(2, 3, 1, 0)]+=-0.123539258791*x[2]**o + (0.820828393538)*x[2]
            ref[(2, 3, 1, 0)]+=-0.123539258791*x_ref[2]**o + (0.820828393538)*x_ref[2]
            arg[(2, 3, 1, 1)]+=0.189152317843*x[2]**o + (-0.204644122362)*x[2]
            ref[(2, 3, 1, 1)]+=0.189152317843*x_ref[2]**o + (-0.204644122362)*x_ref[2]
            arg[(3, 0, 0, 0)]+=-0.282547186458*x[2]**o + (0.43938025506)*x[2]
            ref[(3, 0, 0, 0)]+=-0.282547186458*x_ref[2]**o + (0.43938025506)*x_ref[2]
            arg[(3, 0, 0, 1)]+=-0.0249606326832*x[2]**o + (-0.280257773896)*x[2]
            ref[(3, 0, 0, 1)]+=-0.0249606326832*x_ref[2]**o + (-0.280257773896)*x_ref[2]
            arg[(3, 0, 1, 0)]+=0.804221467909*x[2]**o + (0.439096377248)*x[2]
            ref[(3, 0, 1, 0)]+=0.804221467909*x_ref[2]**o + (0.439096377248)*x_ref[2]
            arg[(3, 0, 1, 1)]+=0.0567879464664*x[2]**o + (-0.0532388933011)*x[2]
            ref[(3, 0, 1, 1)]+=0.0567879464664*x_ref[2]**o + (-0.0532388933011)*x_ref[2]
            arg[(3, 1, 0, 0)]+=-0.403527263787*x[2]**o + (-0.98823446862)*x[2]
            ref[(3, 1, 0, 0)]+=-0.403527263787*x_ref[2]**o + (-0.98823446862)*x_ref[2]
            arg[(3, 1, 0, 1)]+=0.00988471059381*x[2]**o + (-0.447843848931)*x[2]
            ref[(3, 1, 0, 1)]+=0.00988471059381*x_ref[2]**o + (-0.447843848931)*x_ref[2]
            arg[(3, 1, 1, 0)]+=-0.172487717513*x[2]**o + (0.448275391931)*x[2]
            ref[(3, 1, 1, 0)]+=-0.172487717513*x_ref[2]**o + (0.448275391931)*x_ref[2]
            arg[(3, 1, 1, 1)]+=0.050499203894*x[2]**o + (0.171443681576)*x[2]
            ref[(3, 1, 1, 1)]+=0.050499203894*x_ref[2]**o + (0.171443681576)*x_ref[2]
            arg[(3, 2, 0, 0)]+=-0.833049357158*x[2]**o + (-0.32430534477)*x[2]
            ref[(3, 2, 0, 0)]+=-0.833049357158*x_ref[2]**o + (-0.32430534477)*x_ref[2]
            arg[(3, 2, 0, 1)]+=-0.0284226241642*x[2]**o + (0.285573708531)*x[2]
            ref[(3, 2, 0, 1)]+=-0.0284226241642*x_ref[2]**o + (0.285573708531)*x_ref[2]
            arg[(3, 2, 1, 0)]+=0.495904750757*x[2]**o + (-0.755850738205)*x[2]
            ref[(3, 2, 1, 0)]+=0.495904750757*x_ref[2]**o + (-0.755850738205)*x_ref[2]
            arg[(3, 2, 1, 1)]+=0.296078091704*x[2]**o + (-0.799707514798)*x[2]
            ref[(3, 2, 1, 1)]+=0.296078091704*x_ref[2]**o + (-0.799707514798)*x_ref[2]
            arg[(3, 3, 0, 0)]+=0.521039024319*x[2]**o + (-0.577000341082)*x[2]
            ref[(3, 3, 0, 0)]+=0.521039024319*x_ref[2]**o + (-0.577000341082)*x_ref[2]
            arg[(3, 3, 0, 1)]+=-0.839919764279*x[2]**o + (-0.578245409119)*x[2]
            ref[(3, 3, 0, 1)]+=-0.839919764279*x_ref[2]**o + (-0.578245409119)*x_ref[2]
            arg[(3, 3, 1, 0)]+=-0.361165895308*x[2]**o + (-0.139348859255)*x[2]
            ref[(3, 3, 1, 0)]+=-0.361165895308*x_ref[2]**o + (-0.139348859255)*x_ref[2]
            arg[(3, 3, 1, 1)]+=0.140914722906*x[2]**o + (0.507160700748)*x[2]
            ref[(3, 3, 1, 1)]+=0.140914722906*x_ref[2]**o + (0.507160700748)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onSolution_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on Solution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.39254586703*x[0]**o + (-0.558617410644)*x[0] + (-0.874648167001)*x[1]**o + (0.283644611958)*x[1]
        ref=-0.39254586703*x_ref[0]**o + (-0.558617410644)*x_ref[0] + (-0.874648167001)*x_ref[1]**o + (0.283644611958)*x_ref[1]
        if dim==3:
            arg+=(0.5365713747)*x[2]**o + (-0.0012624950012)*x[2]
            ref+=(0.5365713747)*x_ref[2]**o + (-0.0012624950012)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onSolution_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on Solution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=0.730608467801*x[0]**o + (-0.0210497190214)*x[0] + (0.319172463206)*x[1]**o + (-0.965177459598)*x[1]
        ref[(0,)]=0.730608467801*x_ref[0]**o + (-0.0210497190214)*x_ref[0] + (0.319172463206)*x_ref[1]**o + (-0.965177459598)*x_ref[1]
        arg[(1,)]=-0.803614686509*x[0]**o + (0.279193170649)*x[0] + (-0.813827066801)*x[1]**o + (0.30229478691)*x[1]
        ref[(1,)]=-0.803614686509*x_ref[0]**o + (0.279193170649)*x_ref[0] + (-0.813827066801)*x_ref[1]**o + (0.30229478691)*x_ref[1]
        arg[(2,)]=0.729433384656*x[0]**o + (0.862181552378)*x[0] + (-0.213369124432)*x[1]**o + (-0.26391208472)*x[1]
        ref[(2,)]=0.729433384656*x_ref[0]**o + (0.862181552378)*x_ref[0] + (-0.213369124432)*x_ref[1]**o + (-0.26391208472)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.70570679873*x[2]**o + (-0.772500589762)*x[2]
            ref[(0,)]+=0.70570679873*x_ref[2]**o + (-0.772500589762)*x_ref[2]
            arg[(1,)]+=0.211248569895*x[2]**o + (-0.291323888923)*x[2]
            ref[(1,)]+=0.211248569895*x_ref[2]**o + (-0.291323888923)*x_ref[2]
            arg[(2,)]+=0.23317229381*x[2]**o + (-0.557562289724)*x[2]
            ref[(2,)]+=0.23317229381*x_ref[2]**o + (-0.557562289724)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onSolution_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on Solution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref = Data(0,(2, 2),w_ref)
        arg[(0, 0)]=-0.14226608834*x[0]**o + (0.49956977824)*x[0] + (0.58434420004)*x[1]**o + (-0.28964000027)*x[1]
        ref[(0, 0)]=-0.14226608834*x_ref[0]**o + (0.49956977824)*x_ref[0] + (0.58434420004)*x_ref[1]**o + (-0.28964000027)*x_ref[1]
        arg[(0, 1)]=0.841888088542*x[0]**o + (0.756194922991)*x[0] + (-0.171393498335)*x[1]**o + (-0.135564511363)*x[1]
        ref[(0, 1)]=0.841888088542*x_ref[0]**o + (0.756194922991)*x_ref[0] + (-0.171393498335)*x_ref[1]**o + (-0.135564511363)*x_ref[1]
        arg[(1, 0)]=0.205655396732*x[0]**o + (0.158104237538)*x[0] + (0.054827328324)*x[1]**o + (-0.350086373326)*x[1]
        ref[(1, 0)]=0.205655396732*x_ref[0]**o + (0.158104237538)*x_ref[0] + (0.054827328324)*x_ref[1]**o + (-0.350086373326)*x_ref[1]
        arg[(1, 1)]=-0.170880207196*x[0]**o + (0.180381017041)*x[0] + (0.792120986278)*x[1]**o + (-0.875235070623)*x[1]
        ref[(1, 1)]=-0.170880207196*x_ref[0]**o + (0.180381017041)*x_ref[0] + (0.792120986278)*x_ref[1]**o + (-0.875235070623)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.387143692343*x[2]**o + (-0.410686406906)*x[2]
            ref[(0, 0)]+=-0.387143692343*x_ref[2]**o + (-0.410686406906)*x_ref[2]
            arg[(0, 1)]+=-0.48505571291*x[2]**o + (0.941180750707)*x[2]
            ref[(0, 1)]+=-0.48505571291*x_ref[2]**o + (0.941180750707)*x_ref[2]
            arg[(1, 0)]+=-0.511732923528*x[2]**o + (0.150415166954)*x[2]
            ref[(1, 0)]+=-0.511732923528*x_ref[2]**o + (0.150415166954)*x_ref[2]
            arg[(1, 1)]+=0.990764971161*x[2]**o + (-0.718917973908)*x[2]
            ref[(1, 1)]+=0.990764971161*x_ref[2]**o + (-0.718917973908)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onSolution_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on Solution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 3),w)
        ref = Data(0,(4, 4, 3),w_ref)
        arg[(0, 0, 0)]=-0.465057886297*x[0]**o + (-0.854963453142)*x[0] + (0.601510413583)*x[1]**o + (0.261059969359)*x[1]
        ref[(0, 0, 0)]=-0.465057886297*x_ref[0]**o + (-0.854963453142)*x_ref[0] + (0.601510413583)*x_ref[1]**o + (0.261059969359)*x_ref[1]
        arg[(0, 0, 1)]=0.776842440825*x[0]**o + (-0.985106480695)*x[0] + (-0.192732449836)*x[1]**o + (0.423488575599)*x[1]
        ref[(0, 0, 1)]=0.776842440825*x_ref[0]**o + (-0.985106480695)*x_ref[0] + (-0.192732449836)*x_ref[1]**o + (0.423488575599)*x_ref[1]
        arg[(0, 0, 2)]=0.465931377805*x[0]**o + (0.704854975303)*x[0] + (-0.35989615108)*x[1]**o + (0.420156444919)*x[1]
        ref[(0, 0, 2)]=0.465931377805*x_ref[0]**o + (0.704854975303)*x_ref[0] + (-0.35989615108)*x_ref[1]**o + (0.420156444919)*x_ref[1]
        arg[(0, 1, 0)]=-0.112628947341*x[0]**o + (0.654530066201)*x[0] + (-0.793528601068)*x[1]**o + (-0.158366603993)*x[1]
        ref[(0, 1, 0)]=-0.112628947341*x_ref[0]**o + (0.654530066201)*x_ref[0] + (-0.793528601068)*x_ref[1]**o + (-0.158366603993)*x_ref[1]
        arg[(0, 1, 1)]=-0.690279708063*x[0]**o + (0.214783801187)*x[0] + (-0.0823302573849)*x[1]**o + (0.999168293133)*x[1]
        ref[(0, 1, 1)]=-0.690279708063*x_ref[0]**o + (0.214783801187)*x_ref[0] + (-0.0823302573849)*x_ref[1]**o + (0.999168293133)*x_ref[1]
        arg[(0, 1, 2)]=0.207209350156*x[0]**o + (-0.726495993705)*x[0] + (-0.560835953676)*x[1]**o + (0.930166140941)*x[1]
        ref[(0, 1, 2)]=0.207209350156*x_ref[0]**o + (-0.726495993705)*x_ref[0] + (-0.560835953676)*x_ref[1]**o + (0.930166140941)*x_ref[1]
        arg[(0, 2, 0)]=0.397970382928*x[0]**o + (-0.722273356945)*x[0] + (-0.0204780473484)*x[1]**o + (0.913164882305)*x[1]
        ref[(0, 2, 0)]=0.397970382928*x_ref[0]**o + (-0.722273356945)*x_ref[0] + (-0.0204780473484)*x_ref[1]**o + (0.913164882305)*x_ref[1]
        arg[(0, 2, 1)]=0.209586679507*x[0]**o + (0.22701940067)*x[0] + (0.680021850205)*x[1]**o + (-0.168364830629)*x[1]
        ref[(0, 2, 1)]=0.209586679507*x_ref[0]**o + (0.22701940067)*x_ref[0] + (0.680021850205)*x_ref[1]**o + (-0.168364830629)*x_ref[1]
        arg[(0, 2, 2)]=-0.00644078093473*x[0]**o + (0.26480199687)*x[0] + (-0.485108540529)*x[1]**o + (0.21641333903)*x[1]
        ref[(0, 2, 2)]=-0.00644078093473*x_ref[0]**o + (0.26480199687)*x_ref[0] + (-0.485108540529)*x_ref[1]**o + (0.21641333903)*x_ref[1]
        arg[(0, 3, 0)]=-0.979302980065*x[0]**o + (0.473419359584)*x[0] + (0.0526411243753)*x[1]**o + (0.700223186247)*x[1]
        ref[(0, 3, 0)]=-0.979302980065*x_ref[0]**o + (0.473419359584)*x_ref[0] + (0.0526411243753)*x_ref[1]**o + (0.700223186247)*x_ref[1]
        arg[(0, 3, 1)]=-0.999958408972*x[0]**o + (0.900041391387)*x[0] + (-0.414255984753)*x[1]**o + (-0.130615993584)*x[1]
        ref[(0, 3, 1)]=-0.999958408972*x_ref[0]**o + (0.900041391387)*x_ref[0] + (-0.414255984753)*x_ref[1]**o + (-0.130615993584)*x_ref[1]
        arg[(0, 3, 2)]=0.613914296561*x[0]**o + (0.740131079311)*x[0] + (0.80434130712)*x[1]**o + (0.951690614649)*x[1]
        ref[(0, 3, 2)]=0.613914296561*x_ref[0]**o + (0.740131079311)*x_ref[0] + (0.80434130712)*x_ref[1]**o + (0.951690614649)*x_ref[1]
        arg[(1, 0, 0)]=-0.942371033984*x[0]**o + (-0.42071747492)*x[0] + (-0.414702815212)*x[1]**o + (0.326345470015)*x[1]
        ref[(1, 0, 0)]=-0.942371033984*x_ref[0]**o + (-0.42071747492)*x_ref[0] + (-0.414702815212)*x_ref[1]**o + (0.326345470015)*x_ref[1]
        arg[(1, 0, 1)]=-0.289674496446*x[0]**o + (0.00285634553399)*x[0] + (0.982510528182)*x[1]**o + (-0.901011075707)*x[1]
        ref[(1, 0, 1)]=-0.289674496446*x_ref[0]**o + (0.00285634553399)*x_ref[0] + (0.982510528182)*x_ref[1]**o + (-0.901011075707)*x_ref[1]
        arg[(1, 0, 2)]=0.30575840561*x[0]**o + (-0.44299449452)*x[0] + (-0.940738624995)*x[1]**o + (0.327967468932)*x[1]
        ref[(1, 0, 2)]=0.30575840561*x_ref[0]**o + (-0.44299449452)*x_ref[0] + (-0.940738624995)*x_ref[1]**o + (0.327967468932)*x_ref[1]
        arg[(1, 1, 0)]=0.700702002509*x[0]**o + (0.994008183269)*x[0] + (-0.909123265327)*x[1]**o + (-0.852788262521)*x[1]
        ref[(1, 1, 0)]=0.700702002509*x_ref[0]**o + (0.994008183269)*x_ref[0] + (-0.909123265327)*x_ref[1]**o + (-0.852788262521)*x_ref[1]
        arg[(1, 1, 1)]=0.761526560741*x[0]**o + (-0.26278418347)*x[0] + (0.637848175434)*x[1]**o + (-0.731516214617)*x[1]
        ref[(1, 1, 1)]=0.761526560741*x_ref[0]**o + (-0.26278418347)*x_ref[0] + (0.637848175434)*x_ref[1]**o + (-0.731516214617)*x_ref[1]
        arg[(1, 1, 2)]=-0.207971330471*x[0]**o + (-0.104337570684)*x[0] + (-0.923627447677)*x[1]**o + (-0.627332938933)*x[1]
        ref[(1, 1, 2)]=-0.207971330471*x_ref[0]**o + (-0.104337570684)*x_ref[0] + (-0.923627447677)*x_ref[1]**o + (-0.627332938933)*x_ref[1]
        arg[(1, 2, 0)]=0.447053988653*x[0]**o + (-0.362993282631)*x[0] + (-0.695388043595)*x[1]**o + (0.178407980885)*x[1]
        ref[(1, 2, 0)]=0.447053988653*x_ref[0]**o + (-0.362993282631)*x_ref[0] + (-0.695388043595)*x_ref[1]**o + (0.178407980885)*x_ref[1]
        arg[(1, 2, 1)]=0.0533320952621*x[0]**o + (0.756011232417)*x[0] + (0.69404556896)*x[1]**o + (0.559554196393)*x[1]
        ref[(1, 2, 1)]=0.0533320952621*x_ref[0]**o + (0.756011232417)*x_ref[0] + (0.69404556896)*x_ref[1]**o + (0.559554196393)*x_ref[1]
        arg[(1, 2, 2)]=-0.674359889416*x[0]**o + (0.476256330096)*x[0] + (-0.419701510163)*x[1]**o + (0.940121626346)*x[1]
        ref[(1, 2, 2)]=-0.674359889416*x_ref[0]**o + (0.476256330096)*x_ref[0] + (-0.419701510163)*x_ref[1]**o + (0.940121626346)*x_ref[1]
        arg[(1, 3, 0)]=-0.992154680918*x[0]**o + (-0.56000823256)*x[0] + (-0.250310488101)*x[1]**o + (0.113495391943)*x[1]
        ref[(1, 3, 0)]=-0.992154680918*x_ref[0]**o + (-0.56000823256)*x_ref[0] + (-0.250310488101)*x_ref[1]**o + (0.113495391943)*x_ref[1]
        arg[(1, 3, 1)]=0.330970723301*x[0]**o + (0.323056792548)*x[0] + (-0.707739405685)*x[1]**o + (0.105072624953)*x[1]
        ref[(1, 3, 1)]=0.330970723301*x_ref[0]**o + (0.323056792548)*x_ref[0] + (-0.707739405685)*x_ref[1]**o + (0.105072624953)*x_ref[1]
        arg[(1, 3, 2)]=-0.281536066147*x[0]**o + (0.436405600288)*x[0] + (-0.636218728907)*x[1]**o + (0.653080753687)*x[1]
        ref[(1, 3, 2)]=-0.281536066147*x_ref[0]**o + (0.436405600288)*x_ref[0] + (-0.636218728907)*x_ref[1]**o + (0.653080753687)*x_ref[1]
        arg[(2, 0, 0)]=-0.388137726525*x[0]**o + (-0.1587901702)*x[0] + (-0.373326598619)*x[1]**o + (-0.100965934694)*x[1]
        ref[(2, 0, 0)]=-0.388137726525*x_ref[0]**o + (-0.1587901702)*x_ref[0] + (-0.373326598619)*x_ref[1]**o + (-0.100965934694)*x_ref[1]
        arg[(2, 0, 1)]=0.503729813725*x[0]**o + (-0.329115526168)*x[0] + (0.265585315506)*x[1]**o + (-0.464103071069)*x[1]
        ref[(2, 0, 1)]=0.503729813725*x_ref[0]**o + (-0.329115526168)*x_ref[0] + (0.265585315506)*x_ref[1]**o + (-0.464103071069)*x_ref[1]
        arg[(2, 0, 2)]=-0.607900511062*x[0]**o + (-0.672617463993)*x[0] + (-0.0450573875041)*x[1]**o + (-0.40528388384)*x[1]
        ref[(2, 0, 2)]=-0.607900511062*x_ref[0]**o + (-0.672617463993)*x_ref[0] + (-0.0450573875041)*x_ref[1]**o + (-0.40528388384)*x_ref[1]
        arg[(2, 1, 0)]=0.738666513598*x[0]**o + (0.766720063019)*x[0] + (-0.0532957160535)*x[1]**o + (0.203804213088)*x[1]
        ref[(2, 1, 0)]=0.738666513598*x_ref[0]**o + (0.766720063019)*x_ref[0] + (-0.0532957160535)*x_ref[1]**o + (0.203804213088)*x_ref[1]
        arg[(2, 1, 1)]=0.671832549331*x[0]**o + (-0.217000337883)*x[0] + (0.377230192264)*x[1]**o + (0.846394823132)*x[1]
        ref[(2, 1, 1)]=0.671832549331*x_ref[0]**o + (-0.217000337883)*x_ref[0] + (0.377230192264)*x_ref[1]**o + (0.846394823132)*x_ref[1]
        arg[(2, 1, 2)]=0.432947784233*x[0]**o + (0.907108308662)*x[0] + (0.356984983901)*x[1]**o + (0.73765027833)*x[1]
        ref[(2, 1, 2)]=0.432947784233*x_ref[0]**o + (0.907108308662)*x_ref[0] + (0.356984983901)*x_ref[1]**o + (0.73765027833)*x_ref[1]
        arg[(2, 2, 0)]=-0.0829261841093*x[0]**o + (-0.0133778334135)*x[0] + (0.108066861251)*x[1]**o + (0.5357416863)*x[1]
        ref[(2, 2, 0)]=-0.0829261841093*x_ref[0]**o + (-0.0133778334135)*x_ref[0] + (0.108066861251)*x_ref[1]**o + (0.5357416863)*x_ref[1]
        arg[(2, 2, 1)]=0.988287394434*x[0]**o + (0.997160832254)*x[0] + (0.534399653282)*x[1]**o + (-0.900179194747)*x[1]
        ref[(2, 2, 1)]=0.988287394434*x_ref[0]**o + (0.997160832254)*x_ref[0] + (0.534399653282)*x_ref[1]**o + (-0.900179194747)*x_ref[1]
        arg[(2, 2, 2)]=0.270894489418*x[0]**o + (-0.934181425219)*x[0] + (0.511199977887)*x[1]**o + (-0.465411341382)*x[1]
        ref[(2, 2, 2)]=0.270894489418*x_ref[0]**o + (-0.934181425219)*x_ref[0] + (0.511199977887)*x_ref[1]**o + (-0.465411341382)*x_ref[1]
        arg[(2, 3, 0)]=-0.40323630734*x[0]**o + (0.485291080754)*x[0] + (-0.857081762197)*x[1]**o + (0.781433817269)*x[1]
        ref[(2, 3, 0)]=-0.40323630734*x_ref[0]**o + (0.485291080754)*x_ref[0] + (-0.857081762197)*x_ref[1]**o + (0.781433817269)*x_ref[1]
        arg[(2, 3, 1)]=0.221577588662*x[0]**o + (-0.719334891178)*x[0] + (0.455534008404)*x[1]**o + (0.047034647381)*x[1]
        ref[(2, 3, 1)]=0.221577588662*x_ref[0]**o + (-0.719334891178)*x_ref[0] + (0.455534008404)*x_ref[1]**o + (0.047034647381)*x_ref[1]
        arg[(2, 3, 2)]=0.425400501249*x[0]**o + (0.00491692773493)*x[0] + (0.721034378527)*x[1]**o + (-0.0373666195985)*x[1]
        ref[(2, 3, 2)]=0.425400501249*x_ref[0]**o + (0.00491692773493)*x_ref[0] + (0.721034378527)*x_ref[1]**o + (-0.0373666195985)*x_ref[1]
        arg[(3, 0, 0)]=-0.526808500209*x[0]**o + (-0.15793392652)*x[0] + (0.213520630941)*x[1]**o + (-0.695534670862)*x[1]
        ref[(3, 0, 0)]=-0.526808500209*x_ref[0]**o + (-0.15793392652)*x_ref[0] + (0.213520630941)*x_ref[1]**o + (-0.695534670862)*x_ref[1]
        arg[(3, 0, 1)]=-0.425529116542*x[0]**o + (0.0730751146349)*x[0] + (0.323171888716)*x[1]**o + (0.606267464363)*x[1]
        ref[(3, 0, 1)]=-0.425529116542*x_ref[0]**o + (0.0730751146349)*x_ref[0] + (0.323171888716)*x_ref[1]**o + (0.606267464363)*x_ref[1]
        arg[(3, 0, 2)]=0.455392267247*x[0]**o + (-0.729782109191)*x[0] + (-0.56896464717)*x[1]**o + (-0.801689391813)*x[1]
        ref[(3, 0, 2)]=0.455392267247*x_ref[0]**o + (-0.729782109191)*x_ref[0] + (-0.56896464717)*x_ref[1]**o + (-0.801689391813)*x_ref[1]
        arg[(3, 1, 0)]=0.3468613403*x[0]**o + (-0.550489374689)*x[0] + (-0.982376815246)*x[1]**o + (-0.491377092572)*x[1]
        ref[(3, 1, 0)]=0.3468613403*x_ref[0]**o + (-0.550489374689)*x_ref[0] + (-0.982376815246)*x_ref[1]**o + (-0.491377092572)*x_ref[1]
        arg[(3, 1, 1)]=-0.858407936403*x[0]**o + (0.285264300133)*x[0] + (0.696811923563)*x[1]**o + (0.300948507321)*x[1]
        ref[(3, 1, 1)]=-0.858407936403*x_ref[0]**o + (0.285264300133)*x_ref[0] + (0.696811923563)*x_ref[1]**o + (0.300948507321)*x_ref[1]
        arg[(3, 1, 2)]=-0.520934670758*x[0]**o + (0.936275391732)*x[0] + (-0.515489951285)*x[1]**o + (-0.783175965835)*x[1]
        ref[(3, 1, 2)]=-0.520934670758*x_ref[0]**o + (0.936275391732)*x_ref[0] + (-0.515489951285)*x_ref[1]**o + (-0.783175965835)*x_ref[1]
        arg[(3, 2, 0)]=0.0649647508703*x[0]**o + (0.895086424204)*x[0] + (-0.493511989259)*x[1]**o + (0.361612240015)*x[1]
        ref[(3, 2, 0)]=0.0649647508703*x_ref[0]**o + (0.895086424204)*x_ref[0] + (-0.493511989259)*x_ref[1]**o + (0.361612240015)*x_ref[1]
        arg[(3, 2, 1)]=-0.680739033877*x[0]**o + (-0.486015705082)*x[0] + (-0.271164002903)*x[1]**o + (0.633200291787)*x[1]
        ref[(3, 2, 1)]=-0.680739033877*x_ref[0]**o + (-0.486015705082)*x_ref[0] + (-0.271164002903)*x_ref[1]**o + (0.633200291787)*x_ref[1]
        arg[(3, 2, 2)]=-0.279842616867*x[0]**o + (0.779798104178)*x[0] + (-0.651818819326)*x[1]**o + (0.689921052336)*x[1]
        ref[(3, 2, 2)]=-0.279842616867*x_ref[0]**o + (0.779798104178)*x_ref[0] + (-0.651818819326)*x_ref[1]**o + (0.689921052336)*x_ref[1]
        arg[(3, 3, 0)]=-0.172132571425*x[0]**o + (0.954073805433)*x[0] + (0.818204054623)*x[1]**o + (-0.926666156285)*x[1]
        ref[(3, 3, 0)]=-0.172132571425*x_ref[0]**o + (0.954073805433)*x_ref[0] + (0.818204054623)*x_ref[1]**o + (-0.926666156285)*x_ref[1]
        arg[(3, 3, 1)]=-0.284945625208*x[0]**o + (-0.0517659585293)*x[0] + (-0.224428510617)*x[1]**o + (0.0740493202001)*x[1]
        ref[(3, 3, 1)]=-0.284945625208*x_ref[0]**o + (-0.0517659585293)*x_ref[0] + (-0.224428510617)*x_ref[1]**o + (0.0740493202001)*x_ref[1]
        arg[(3, 3, 2)]=0.573161795284*x[0]**o + (0.156155174608)*x[0] + (0.878706571284)*x[1]**o + (-0.406964677434)*x[1]
        ref[(3, 3, 2)]=0.573161795284*x_ref[0]**o + (0.156155174608)*x_ref[0] + (0.878706571284)*x_ref[1]**o + (-0.406964677434)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.449205400906*x[2]**o + (0.0989205532617)*x[2]
            ref[(0, 0, 0)]+=0.449205400906*x_ref[2]**o + (0.0989205532617)*x_ref[2]
            arg[(0, 0, 1)]+=0.958371620221*x[2]**o + (0.617914618758)*x[2]
            ref[(0, 0, 1)]+=0.958371620221*x_ref[2]**o + (0.617914618758)*x_ref[2]
            arg[(0, 0, 2)]+=0.959124242155*x[2]**o + (-0.979246883791)*x[2]
            ref[(0, 0, 2)]+=0.959124242155*x_ref[2]**o + (-0.979246883791)*x_ref[2]
            arg[(0, 1, 0)]+=-0.399072224273*x[2]**o + (0.179382354045)*x[2]
            ref[(0, 1, 0)]+=-0.399072224273*x_ref[2]**o + (0.179382354045)*x_ref[2]
            arg[(0, 1, 1)]+=0.384773162485*x[2]**o + (-0.57128813889)*x[2]
            ref[(0, 1, 1)]+=0.384773162485*x_ref[2]**o + (-0.57128813889)*x_ref[2]
            arg[(0, 1, 2)]+=0.126544482311*x[2]**o + (0.580813276768)*x[2]
            ref[(0, 1, 2)]+=0.126544482311*x_ref[2]**o + (0.580813276768)*x_ref[2]
            arg[(0, 2, 0)]+=-0.274383025242*x[2]**o + (-0.529828217433)*x[2]
            ref[(0, 2, 0)]+=-0.274383025242*x_ref[2]**o + (-0.529828217433)*x_ref[2]
            arg[(0, 2, 1)]+=0.479370315637*x[2]**o + (-0.962207939407)*x[2]
            ref[(0, 2, 1)]+=0.479370315637*x_ref[2]**o + (-0.962207939407)*x_ref[2]
            arg[(0, 2, 2)]+=-0.454148442335*x[2]**o + (0.506232779197)*x[2]
            ref[(0, 2, 2)]+=-0.454148442335*x_ref[2]**o + (0.506232779197)*x_ref[2]
            arg[(0, 3, 0)]+=-0.304380757615*x[2]**o + (0.839779617915)*x[2]
            ref[(0, 3, 0)]+=-0.304380757615*x_ref[2]**o + (0.839779617915)*x_ref[2]
            arg[(0, 3, 1)]+=-0.318390986733*x[2]**o + (0.679920947)*x[2]
            ref[(0, 3, 1)]+=-0.318390986733*x_ref[2]**o + (0.679920947)*x_ref[2]
            arg[(0, 3, 2)]+=-0.804953079586*x[2]**o + (0.187158661265)*x[2]
            ref[(0, 3, 2)]+=-0.804953079586*x_ref[2]**o + (0.187158661265)*x_ref[2]
            arg[(1, 0, 0)]+=0.895471677041*x[2]**o + (0.140925545243)*x[2]
            ref[(1, 0, 0)]+=0.895471677041*x_ref[2]**o + (0.140925545243)*x_ref[2]
            arg[(1, 0, 1)]+=-0.0212959713587*x[2]**o + (0.160563384761)*x[2]
            ref[(1, 0, 1)]+=-0.0212959713587*x_ref[2]**o + (0.160563384761)*x_ref[2]
            arg[(1, 0, 2)]+=-0.0996735700512*x[2]**o + (-0.887050751289)*x[2]
            ref[(1, 0, 2)]+=-0.0996735700512*x_ref[2]**o + (-0.887050751289)*x_ref[2]
            arg[(1, 1, 0)]+=-0.268471289287*x[2]**o + (0.216336333953)*x[2]
            ref[(1, 1, 0)]+=-0.268471289287*x_ref[2]**o + (0.216336333953)*x_ref[2]
            arg[(1, 1, 1)]+=0.900840050702*x[2]**o + (-0.327570253727)*x[2]
            ref[(1, 1, 1)]+=0.900840050702*x_ref[2]**o + (-0.327570253727)*x_ref[2]
            arg[(1, 1, 2)]+=0.236311411728*x[2]**o + (-0.974188150713)*x[2]
            ref[(1, 1, 2)]+=0.236311411728*x_ref[2]**o + (-0.974188150713)*x_ref[2]
            arg[(1, 2, 0)]+=0.322755002324*x[2]**o + (0.31914951726)*x[2]
            ref[(1, 2, 0)]+=0.322755002324*x_ref[2]**o + (0.31914951726)*x_ref[2]
            arg[(1, 2, 1)]+=0.923880057865*x[2]**o + (-0.0113001971194)*x[2]
            ref[(1, 2, 1)]+=0.923880057865*x_ref[2]**o + (-0.0113001971194)*x_ref[2]
            arg[(1, 2, 2)]+=0.215927429006*x[2]**o + (0.568096668879)*x[2]
            ref[(1, 2, 2)]+=0.215927429006*x_ref[2]**o + (0.568096668879)*x_ref[2]
            arg[(1, 3, 0)]+=0.491525970034*x[2]**o + (-0.787040779064)*x[2]
            ref[(1, 3, 0)]+=0.491525970034*x_ref[2]**o + (-0.787040779064)*x_ref[2]
            arg[(1, 3, 1)]+=0.26896023163*x[2]**o + (-0.882674344518)*x[2]
            ref[(1, 3, 1)]+=0.26896023163*x_ref[2]**o + (-0.882674344518)*x_ref[2]
            arg[(1, 3, 2)]+=-0.303951235488*x[2]**o + (-0.472969807767)*x[2]
            ref[(1, 3, 2)]+=-0.303951235488*x_ref[2]**o + (-0.472969807767)*x_ref[2]
            arg[(2, 0, 0)]+=-0.936381863102*x[2]**o + (0.937116126629)*x[2]
            ref[(2, 0, 0)]+=-0.936381863102*x_ref[2]**o + (0.937116126629)*x_ref[2]
            arg[(2, 0, 1)]+=-0.73330314496*x[2]**o + (0.341792807653)*x[2]
            ref[(2, 0, 1)]+=-0.73330314496*x_ref[2]**o + (0.341792807653)*x_ref[2]
            arg[(2, 0, 2)]+=-0.888878989374*x[2]**o + (-0.246570692241)*x[2]
            ref[(2, 0, 2)]+=-0.888878989374*x_ref[2]**o + (-0.246570692241)*x_ref[2]
            arg[(2, 1, 0)]+=0.505181022267*x[2]**o + (0.963838404993)*x[2]
            ref[(2, 1, 0)]+=0.505181022267*x_ref[2]**o + (0.963838404993)*x_ref[2]
            arg[(2, 1, 1)]+=-0.964646372114*x[2]**o + (-0.878446832697)*x[2]
            ref[(2, 1, 1)]+=-0.964646372114*x_ref[2]**o + (-0.878446832697)*x_ref[2]
            arg[(2, 1, 2)]+=-0.0969395027553*x[2]**o + (-0.530734061363)*x[2]
            ref[(2, 1, 2)]+=-0.0969395027553*x_ref[2]**o + (-0.530734061363)*x_ref[2]
            arg[(2, 2, 0)]+=0.848567133392*x[2]**o + (0.955049634662)*x[2]
            ref[(2, 2, 0)]+=0.848567133392*x_ref[2]**o + (0.955049634662)*x_ref[2]
            arg[(2, 2, 1)]+=0.258304209345*x[2]**o + (-0.196801440331)*x[2]
            ref[(2, 2, 1)]+=0.258304209345*x_ref[2]**o + (-0.196801440331)*x_ref[2]
            arg[(2, 2, 2)]+=-0.60075219686*x[2]**o + (0.372199718831)*x[2]
            ref[(2, 2, 2)]+=-0.60075219686*x_ref[2]**o + (0.372199718831)*x_ref[2]
            arg[(2, 3, 0)]+=0.285724236151*x[2]**o + (-0.423864510102)*x[2]
            ref[(2, 3, 0)]+=0.285724236151*x_ref[2]**o + (-0.423864510102)*x_ref[2]
            arg[(2, 3, 1)]+=0.558317680191*x[2]**o + (0.737296789416)*x[2]
            ref[(2, 3, 1)]+=0.558317680191*x_ref[2]**o + (0.737296789416)*x_ref[2]
            arg[(2, 3, 2)]+=-0.687403515245*x[2]**o + (-0.0964188034174)*x[2]
            ref[(2, 3, 2)]+=-0.687403515245*x_ref[2]**o + (-0.0964188034174)*x_ref[2]
            arg[(3, 0, 0)]+=-0.178123750027*x[2]**o + (-0.638564567431)*x[2]
            ref[(3, 0, 0)]+=-0.178123750027*x_ref[2]**o + (-0.638564567431)*x_ref[2]
            arg[(3, 0, 1)]+=0.0371544204218*x[2]**o + (0.771936810222)*x[2]
            ref[(3, 0, 1)]+=0.0371544204218*x_ref[2]**o + (0.771936810222)*x_ref[2]
            arg[(3, 0, 2)]+=-0.115795798936*x[2]**o + (-0.90562114012)*x[2]
            ref[(3, 0, 2)]+=-0.115795798936*x_ref[2]**o + (-0.90562114012)*x_ref[2]
            arg[(3, 1, 0)]+=0.754377336754*x[2]**o + (-0.283944880292)*x[2]
            ref[(3, 1, 0)]+=0.754377336754*x_ref[2]**o + (-0.283944880292)*x_ref[2]
            arg[(3, 1, 1)]+=-0.80371179142*x[2]**o + (-0.503005810685)*x[2]
            ref[(3, 1, 1)]+=-0.80371179142*x_ref[2]**o + (-0.503005810685)*x_ref[2]
            arg[(3, 1, 2)]+=0.457877231652*x[2]**o + (-0.709214368026)*x[2]
            ref[(3, 1, 2)]+=0.457877231652*x_ref[2]**o + (-0.709214368026)*x_ref[2]
            arg[(3, 2, 0)]+=0.632042762594*x[2]**o + (-0.0724542888664)*x[2]
            ref[(3, 2, 0)]+=0.632042762594*x_ref[2]**o + (-0.0724542888664)*x_ref[2]
            arg[(3, 2, 1)]+=0.253300805398*x[2]**o + (0.28610577238)*x[2]
            ref[(3, 2, 1)]+=0.253300805398*x_ref[2]**o + (0.28610577238)*x_ref[2]
            arg[(3, 2, 2)]+=0.187886275015*x[2]**o + (-0.398371203798)*x[2]
            ref[(3, 2, 2)]+=0.187886275015*x_ref[2]**o + (-0.398371203798)*x_ref[2]
            arg[(3, 3, 0)]+=0.887770910581*x[2]**o + (-0.820127846964)*x[2]
            ref[(3, 3, 0)]+=0.887770910581*x_ref[2]**o + (-0.820127846964)*x_ref[2]
            arg[(3, 3, 1)]+=0.381116663924*x[2]**o + (-0.444153210805)*x[2]
            ref[(3, 3, 1)]+=0.381116663924*x_ref[2]**o + (-0.444153210805)*x_ref[2]
            arg[(3, 3, 2)]+=0.274772602148*x[2]**o + (0.31796306)*x[2]
            ref[(3, 3, 2)]+=0.274772602148*x_ref[2]**o + (0.31796306)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onSolution_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on Solution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to Solution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Solution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 4, 2),w)
        ref = Data(0,(4, 3, 4, 2),w_ref)
        arg[(0, 0, 0, 0)]=-0.831366489245*x[0]**o + (0.683342607215)*x[0] + (0.329695129067)*x[1]**o + (0.256491189714)*x[1]
        ref[(0, 0, 0, 0)]=-0.831366489245*x_ref[0]**o + (0.683342607215)*x_ref[0] + (0.329695129067)*x_ref[1]**o + (0.256491189714)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.0198083775093*x[0]**o + (0.245306612572)*x[0] + (0.709428739106)*x[1]**o + (0.883152486568)*x[1]
        ref[(0, 0, 0, 1)]=0.0198083775093*x_ref[0]**o + (0.245306612572)*x_ref[0] + (0.709428739106)*x_ref[1]**o + (0.883152486568)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.0102828875505*x[0]**o + (0.113461896871)*x[0] + (0.925968648696)*x[1]**o + (-0.913244364726)*x[1]
        ref[(0, 0, 1, 0)]=0.0102828875505*x_ref[0]**o + (0.113461896871)*x_ref[0] + (0.925968648696)*x_ref[1]**o + (-0.913244364726)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.17582546422*x[0]**o + (-0.106883345585)*x[0] + (0.9790913557)*x[1]**o + (0.135188604157)*x[1]
        ref[(0, 0, 1, 1)]=0.17582546422*x_ref[0]**o + (-0.106883345585)*x_ref[0] + (0.9790913557)*x_ref[1]**o + (0.135188604157)*x_ref[1]
        arg[(0, 0, 2, 0)]=0.811896112648*x[0]**o + (-0.0484912370492)*x[0] + (-0.306444486559)*x[1]**o + (0.823149292834)*x[1]
        ref[(0, 0, 2, 0)]=0.811896112648*x_ref[0]**o + (-0.0484912370492)*x_ref[0] + (-0.306444486559)*x_ref[1]**o + (0.823149292834)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.741346502703*x[0]**o + (-0.934355066775)*x[0] + (0.864053213896)*x[1]**o + (-0.0501528800581)*x[1]
        ref[(0, 0, 2, 1)]=-0.741346502703*x_ref[0]**o + (-0.934355066775)*x_ref[0] + (0.864053213896)*x_ref[1]**o + (-0.0501528800581)*x_ref[1]
        arg[(0, 0, 3, 0)]=-0.594954411245*x[0]**o + (0.858912868126)*x[0] + (0.575235217577)*x[1]**o + (0.448433668147)*x[1]
        ref[(0, 0, 3, 0)]=-0.594954411245*x_ref[0]**o + (0.858912868126)*x_ref[0] + (0.575235217577)*x_ref[1]**o + (0.448433668147)*x_ref[1]
        arg[(0, 0, 3, 1)]=-0.208480641606*x[0]**o + (-0.567434879074)*x[0] + (-0.905078428466)*x[1]**o + (-0.522425505931)*x[1]
        ref[(0, 0, 3, 1)]=-0.208480641606*x_ref[0]**o + (-0.567434879074)*x_ref[0] + (-0.905078428466)*x_ref[1]**o + (-0.522425505931)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.25804222835*x[0]**o + (-0.937645406975)*x[0] + (0.218050440406)*x[1]**o + (0.139114598539)*x[1]
        ref[(0, 1, 0, 0)]=0.25804222835*x_ref[0]**o + (-0.937645406975)*x_ref[0] + (0.218050440406)*x_ref[1]**o + (0.139114598539)*x_ref[1]
        arg[(0, 1, 0, 1)]=-0.0514096542514*x[0]**o + (0.0114691190274)*x[0] + (-0.0721649323592)*x[1]**o + (-0.327893551345)*x[1]
        ref[(0, 1, 0, 1)]=-0.0514096542514*x_ref[0]**o + (0.0114691190274)*x_ref[0] + (-0.0721649323592)*x_ref[1]**o + (-0.327893551345)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.752257124957*x[0]**o + (0.505262262368)*x[0] + (0.017217402462)*x[1]**o + (0.254811179722)*x[1]
        ref[(0, 1, 1, 0)]=-0.752257124957*x_ref[0]**o + (0.505262262368)*x_ref[0] + (0.017217402462)*x_ref[1]**o + (0.254811179722)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.223910448486*x[0]**o + (0.589038918053)*x[0] + (-0.756835697989)*x[1]**o + (-0.887156715421)*x[1]
        ref[(0, 1, 1, 1)]=-0.223910448486*x_ref[0]**o + (0.589038918053)*x_ref[0] + (-0.756835697989)*x_ref[1]**o + (-0.887156715421)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.966440510991*x[0]**o + (-0.975906487283)*x[0] + (0.224677859982)*x[1]**o + (0.508902865925)*x[1]
        ref[(0, 1, 2, 0)]=-0.966440510991*x_ref[0]**o + (-0.975906487283)*x_ref[0] + (0.224677859982)*x_ref[1]**o + (0.508902865925)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.48689474194*x[0]**o + (0.401196620185)*x[0] + (0.804869705791)*x[1]**o + (0.944932688337)*x[1]
        ref[(0, 1, 2, 1)]=0.48689474194*x_ref[0]**o + (0.401196620185)*x_ref[0] + (0.804869705791)*x_ref[1]**o + (0.944932688337)*x_ref[1]
        arg[(0, 1, 3, 0)]=0.554806411141*x[0]**o + (0.713328648012)*x[0] + (0.210893556757)*x[1]**o + (-0.9712980176)*x[1]
        ref[(0, 1, 3, 0)]=0.554806411141*x_ref[0]**o + (0.713328648012)*x_ref[0] + (0.210893556757)*x_ref[1]**o + (-0.9712980176)*x_ref[1]
        arg[(0, 1, 3, 1)]=-0.987769769348*x[0]**o + (-0.760425545669)*x[0] + (-0.808509334954)*x[1]**o + (0.932736072732)*x[1]
        ref[(0, 1, 3, 1)]=-0.987769769348*x_ref[0]**o + (-0.760425545669)*x_ref[0] + (-0.808509334954)*x_ref[1]**o + (0.932736072732)*x_ref[1]
        arg[(0, 2, 0, 0)]=0.613955916297*x[0]**o + (-0.833935824739)*x[0] + (-0.764453752239)*x[1]**o + (-0.717130074942)*x[1]
        ref[(0, 2, 0, 0)]=0.613955916297*x_ref[0]**o + (-0.833935824739)*x_ref[0] + (-0.764453752239)*x_ref[1]**o + (-0.717130074942)*x_ref[1]
        arg[(0, 2, 0, 1)]=-0.927463029524*x[0]**o + (-0.610508616089)*x[0] + (-0.03200824902)*x[1]**o + (0.225563537078)*x[1]
        ref[(0, 2, 0, 1)]=-0.927463029524*x_ref[0]**o + (-0.610508616089)*x_ref[0] + (-0.03200824902)*x_ref[1]**o + (0.225563537078)*x_ref[1]
        arg[(0, 2, 1, 0)]=0.932908374538*x[0]**o + (0.472689817856)*x[0] + (-0.419321525908)*x[1]**o + (-0.270381943541)*x[1]
        ref[(0, 2, 1, 0)]=0.932908374538*x_ref[0]**o + (0.472689817856)*x_ref[0] + (-0.419321525908)*x_ref[1]**o + (-0.270381943541)*x_ref[1]
        arg[(0, 2, 1, 1)]=0.927757787331*x[0]**o + (-0.506770467385)*x[0] + (0.861014818076)*x[1]**o + (0.452351339525)*x[1]
        ref[(0, 2, 1, 1)]=0.927757787331*x_ref[0]**o + (-0.506770467385)*x_ref[0] + (0.861014818076)*x_ref[1]**o + (0.452351339525)*x_ref[1]
        arg[(0, 2, 2, 0)]=-0.188228910189*x[0]**o + (0.278907017879)*x[0] + (-0.0411424332197)*x[1]**o + (0.683712601673)*x[1]
        ref[(0, 2, 2, 0)]=-0.188228910189*x_ref[0]**o + (0.278907017879)*x_ref[0] + (-0.0411424332197)*x_ref[1]**o + (0.683712601673)*x_ref[1]
        arg[(0, 2, 2, 1)]=0.990822783962*x[0]**o + (-0.071359899513)*x[0] + (-0.0560753257459)*x[1]**o + (0.899496003998)*x[1]
        ref[(0, 2, 2, 1)]=0.990822783962*x_ref[0]**o + (-0.071359899513)*x_ref[0] + (-0.0560753257459)*x_ref[1]**o + (0.899496003998)*x_ref[1]
        arg[(0, 2, 3, 0)]=-0.707886944153*x[0]**o + (0.538142658957)*x[0] + (-0.270362129266)*x[1]**o + (-0.634646339942)*x[1]
        ref[(0, 2, 3, 0)]=-0.707886944153*x_ref[0]**o + (0.538142658957)*x_ref[0] + (-0.270362129266)*x_ref[1]**o + (-0.634646339942)*x_ref[1]
        arg[(0, 2, 3, 1)]=0.120809772127*x[0]**o + (-0.0426795572049)*x[0] + (-0.684131230437)*x[1]**o + (0.857336847847)*x[1]
        ref[(0, 2, 3, 1)]=0.120809772127*x_ref[0]**o + (-0.0426795572049)*x_ref[0] + (-0.684131230437)*x_ref[1]**o + (0.857336847847)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.846681817395*x[0]**o + (-0.577910598101)*x[0] + (-0.121748512874)*x[1]**o + (-0.214252429314)*x[1]
        ref[(1, 0, 0, 0)]=0.846681817395*x_ref[0]**o + (-0.577910598101)*x_ref[0] + (-0.121748512874)*x_ref[1]**o + (-0.214252429314)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.983168346251*x[0]**o + (-0.363694465172)*x[0] + (0.521593999728)*x[1]**o + (-0.843205300355)*x[1]
        ref[(1, 0, 0, 1)]=0.983168346251*x_ref[0]**o + (-0.363694465172)*x_ref[0] + (0.521593999728)*x_ref[1]**o + (-0.843205300355)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.345900526594*x[0]**o + (0.878846290577)*x[0] + (0.115867019399)*x[1]**o + (-0.309379852996)*x[1]
        ref[(1, 0, 1, 0)]=0.345900526594*x_ref[0]**o + (0.878846290577)*x_ref[0] + (0.115867019399)*x_ref[1]**o + (-0.309379852996)*x_ref[1]
        arg[(1, 0, 1, 1)]=-0.476582175827*x[0]**o + (-0.0159035133273)*x[0] + (0.894764035289)*x[1]**o + (-0.896851444423)*x[1]
        ref[(1, 0, 1, 1)]=-0.476582175827*x_ref[0]**o + (-0.0159035133273)*x_ref[0] + (0.894764035289)*x_ref[1]**o + (-0.896851444423)*x_ref[1]
        arg[(1, 0, 2, 0)]=-0.729603114657*x[0]**o + (0.0895136538578)*x[0] + (0.796769599057)*x[1]**o + (0.502451312663)*x[1]
        ref[(1, 0, 2, 0)]=-0.729603114657*x_ref[0]**o + (0.0895136538578)*x_ref[0] + (0.796769599057)*x_ref[1]**o + (0.502451312663)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.062998222954*x[0]**o + (0.75995494136)*x[0] + (0.169689341646)*x[1]**o + (0.651479997907)*x[1]
        ref[(1, 0, 2, 1)]=0.062998222954*x_ref[0]**o + (0.75995494136)*x_ref[0] + (0.169689341646)*x_ref[1]**o + (0.651479997907)*x_ref[1]
        arg[(1, 0, 3, 0)]=-0.67866840204*x[0]**o + (0.67833802727)*x[0] + (-0.518683678917)*x[1]**o + (-0.681588276443)*x[1]
        ref[(1, 0, 3, 0)]=-0.67866840204*x_ref[0]**o + (0.67833802727)*x_ref[0] + (-0.518683678917)*x_ref[1]**o + (-0.681588276443)*x_ref[1]
        arg[(1, 0, 3, 1)]=0.356574759527*x[0]**o + (-0.856467274898)*x[0] + (-0.742225017987)*x[1]**o + (0.117269517341)*x[1]
        ref[(1, 0, 3, 1)]=0.356574759527*x_ref[0]**o + (-0.856467274898)*x_ref[0] + (-0.742225017987)*x_ref[1]**o + (0.117269517341)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.655649823974*x[0]**o + (-0.382178957643)*x[0] + (-0.0149041235082)*x[1]**o + (0.0377895385886)*x[1]
        ref[(1, 1, 0, 0)]=-0.655649823974*x_ref[0]**o + (-0.382178957643)*x_ref[0] + (-0.0149041235082)*x_ref[1]**o + (0.0377895385886)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.886892399911*x[0]**o + (0.736604517584)*x[0] + (0.0112221648585)*x[1]**o + (0.0899221918651)*x[1]
        ref[(1, 1, 0, 1)]=0.886892399911*x_ref[0]**o + (0.736604517584)*x_ref[0] + (0.0112221648585)*x_ref[1]**o + (0.0899221918651)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.540156202681*x[0]**o + (-0.913074844901)*x[0] + (0.893458997505)*x[1]**o + (0.563979054412)*x[1]
        ref[(1, 1, 1, 0)]=-0.540156202681*x_ref[0]**o + (-0.913074844901)*x_ref[0] + (0.893458997505)*x_ref[1]**o + (0.563979054412)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.970608632963*x[0]**o + (-0.548572651136)*x[0] + (-0.307524715571)*x[1]**o + (0.0297699690563)*x[1]
        ref[(1, 1, 1, 1)]=0.970608632963*x_ref[0]**o + (-0.548572651136)*x_ref[0] + (-0.307524715571)*x_ref[1]**o + (0.0297699690563)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.895306829291*x[0]**o + (0.186045753736)*x[0] + (0.472076723078)*x[1]**o + (0.00519253069637)*x[1]
        ref[(1, 1, 2, 0)]=-0.895306829291*x_ref[0]**o + (0.186045753736)*x_ref[0] + (0.472076723078)*x_ref[1]**o + (0.00519253069637)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.518776319071*x[0]**o + (0.867830303151)*x[0] + (-0.424265889049)*x[1]**o + (0.308754498138)*x[1]
        ref[(1, 1, 2, 1)]=-0.518776319071*x_ref[0]**o + (0.867830303151)*x_ref[0] + (-0.424265889049)*x_ref[1]**o + (0.308754498138)*x_ref[1]
        arg[(1, 1, 3, 0)]=-0.187930854485*x[0]**o + (0.76689703033)*x[0] + (-0.884193657326)*x[1]**o + (-0.0742457836572)*x[1]
        ref[(1, 1, 3, 0)]=-0.187930854485*x_ref[0]**o + (0.76689703033)*x_ref[0] + (-0.884193657326)*x_ref[1]**o + (-0.0742457836572)*x_ref[1]
        arg[(1, 1, 3, 1)]=0.0419378526757*x[0]**o + (0.933170729572)*x[0] + (0.245595974447)*x[1]**o + (0.759728780938)*x[1]
        ref[(1, 1, 3, 1)]=0.0419378526757*x_ref[0]**o + (0.933170729572)*x_ref[0] + (0.245595974447)*x_ref[1]**o + (0.759728780938)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.551992334835*x[0]**o + (-0.979413936046)*x[0] + (0.0905960851595)*x[1]**o + (0.124955227811)*x[1]
        ref[(1, 2, 0, 0)]=-0.551992334835*x_ref[0]**o + (-0.979413936046)*x_ref[0] + (0.0905960851595)*x_ref[1]**o + (0.124955227811)*x_ref[1]
        arg[(1, 2, 0, 1)]=-0.304176876896*x[0]**o + (-0.669683149184)*x[0] + (0.0425120445567)*x[1]**o + (-0.99503659043)*x[1]
        ref[(1, 2, 0, 1)]=-0.304176876896*x_ref[0]**o + (-0.669683149184)*x_ref[0] + (0.0425120445567)*x_ref[1]**o + (-0.99503659043)*x_ref[1]
        arg[(1, 2, 1, 0)]=0.193441284379*x[0]**o + (0.10856822129)*x[0] + (0.182518449617)*x[1]**o + (-0.755968957692)*x[1]
        ref[(1, 2, 1, 0)]=0.193441284379*x_ref[0]**o + (0.10856822129)*x_ref[0] + (0.182518449617)*x_ref[1]**o + (-0.755968957692)*x_ref[1]
        arg[(1, 2, 1, 1)]=0.281130807122*x[0]**o + (0.643892883792)*x[0] + (-0.350307848424)*x[1]**o + (-0.293351518883)*x[1]
        ref[(1, 2, 1, 1)]=0.281130807122*x_ref[0]**o + (0.643892883792)*x_ref[0] + (-0.350307848424)*x_ref[1]**o + (-0.293351518883)*x_ref[1]
        arg[(1, 2, 2, 0)]=0.159133567467*x[0]**o + (0.143713562729)*x[0] + (-0.504527006736)*x[1]**o + (0.38261038453)*x[1]
        ref[(1, 2, 2, 0)]=0.159133567467*x_ref[0]**o + (0.143713562729)*x_ref[0] + (-0.504527006736)*x_ref[1]**o + (0.38261038453)*x_ref[1]
        arg[(1, 2, 2, 1)]=-0.0333990627049*x[0]**o + (-0.99441751955)*x[0] + (0.651250583827)*x[1]**o + (-0.564799901811)*x[1]
        ref[(1, 2, 2, 1)]=-0.0333990627049*x_ref[0]**o + (-0.99441751955)*x_ref[0] + (0.651250583827)*x_ref[1]**o + (-0.564799901811)*x_ref[1]
        arg[(1, 2, 3, 0)]=0.468793527192*x[0]**o + (-0.202017871985)*x[0] + (0.677649630396)*x[1]**o + (-0.144081640889)*x[1]
        ref[(1, 2, 3, 0)]=0.468793527192*x_ref[0]**o + (-0.202017871985)*x_ref[0] + (0.677649630396)*x_ref[1]**o + (-0.144081640889)*x_ref[1]
        arg[(1, 2, 3, 1)]=0.519578763434*x[0]**o + (-0.39514488095)*x[0] + (-0.580813325495)*x[1]**o + (-0.50922535436)*x[1]
        ref[(1, 2, 3, 1)]=0.519578763434*x_ref[0]**o + (-0.39514488095)*x_ref[0] + (-0.580813325495)*x_ref[1]**o + (-0.50922535436)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.840810691453*x[0]**o + (-0.538227674081)*x[0] + (-0.878024218975)*x[1]**o + (0.975453258092)*x[1]
        ref[(2, 0, 0, 0)]=0.840810691453*x_ref[0]**o + (-0.538227674081)*x_ref[0] + (-0.878024218975)*x_ref[1]**o + (0.975453258092)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.706746564577*x[0]**o + (-0.0138295428473)*x[0] + (0.460944149931)*x[1]**o + (0.276655536267)*x[1]
        ref[(2, 0, 0, 1)]=0.706746564577*x_ref[0]**o + (-0.0138295428473)*x_ref[0] + (0.460944149931)*x_ref[1]**o + (0.276655536267)*x_ref[1]
        arg[(2, 0, 1, 0)]=0.965945211186*x[0]**o + (-0.532729060924)*x[0] + (-0.752414018126)*x[1]**o + (-0.884833297598)*x[1]
        ref[(2, 0, 1, 0)]=0.965945211186*x_ref[0]**o + (-0.532729060924)*x_ref[0] + (-0.752414018126)*x_ref[1]**o + (-0.884833297598)*x_ref[1]
        arg[(2, 0, 1, 1)]=-0.626721755153*x[0]**o + (0.766952942247)*x[0] + (-0.735688397511)*x[1]**o + (0.596070002836)*x[1]
        ref[(2, 0, 1, 1)]=-0.626721755153*x_ref[0]**o + (0.766952942247)*x_ref[0] + (-0.735688397511)*x_ref[1]**o + (0.596070002836)*x_ref[1]
        arg[(2, 0, 2, 0)]=-0.76785548908*x[0]**o + (-0.265853543378)*x[0] + (0.460706498317)*x[1]**o + (-0.215783115929)*x[1]
        ref[(2, 0, 2, 0)]=-0.76785548908*x_ref[0]**o + (-0.265853543378)*x_ref[0] + (0.460706498317)*x_ref[1]**o + (-0.215783115929)*x_ref[1]
        arg[(2, 0, 2, 1)]=-0.743834783968*x[0]**o + (0.101628150629)*x[0] + (-0.294724645413)*x[1]**o + (0.725780787086)*x[1]
        ref[(2, 0, 2, 1)]=-0.743834783968*x_ref[0]**o + (0.101628150629)*x_ref[0] + (-0.294724645413)*x_ref[1]**o + (0.725780787086)*x_ref[1]
        arg[(2, 0, 3, 0)]=0.416527539339*x[0]**o + (-0.904930439005)*x[0] + (-0.209566378836)*x[1]**o + (0.272661818723)*x[1]
        ref[(2, 0, 3, 0)]=0.416527539339*x_ref[0]**o + (-0.904930439005)*x_ref[0] + (-0.209566378836)*x_ref[1]**o + (0.272661818723)*x_ref[1]
        arg[(2, 0, 3, 1)]=-0.716752252406*x[0]**o + (0.646273068667)*x[0] + (0.844131511506)*x[1]**o + (0.350560882909)*x[1]
        ref[(2, 0, 3, 1)]=-0.716752252406*x_ref[0]**o + (0.646273068667)*x_ref[0] + (0.844131511506)*x_ref[1]**o + (0.350560882909)*x_ref[1]
        arg[(2, 1, 0, 0)]=0.204807120126*x[0]**o + (-0.901061463658)*x[0] + (-0.177035528329)*x[1]**o + (0.513125409095)*x[1]
        ref[(2, 1, 0, 0)]=0.204807120126*x_ref[0]**o + (-0.901061463658)*x_ref[0] + (-0.177035528329)*x_ref[1]**o + (0.513125409095)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.0834164357622*x[0]**o + (0.256758797028)*x[0] + (-0.845100837836)*x[1]**o + (0.321573737564)*x[1]
        ref[(2, 1, 0, 1)]=0.0834164357622*x_ref[0]**o + (0.256758797028)*x_ref[0] + (-0.845100837836)*x_ref[1]**o + (0.321573737564)*x_ref[1]
        arg[(2, 1, 1, 0)]=-0.959021012521*x[0]**o + (-0.430596744973)*x[0] + (-0.762780573451)*x[1]**o + (0.65385110807)*x[1]
        ref[(2, 1, 1, 0)]=-0.959021012521*x_ref[0]**o + (-0.430596744973)*x_ref[0] + (-0.762780573451)*x_ref[1]**o + (0.65385110807)*x_ref[1]
        arg[(2, 1, 1, 1)]=-0.165697616234*x[0]**o + (-0.567338858739)*x[0] + (0.0622171084276)*x[1]**o + (0.820732012896)*x[1]
        ref[(2, 1, 1, 1)]=-0.165697616234*x_ref[0]**o + (-0.567338858739)*x_ref[0] + (0.0622171084276)*x_ref[1]**o + (0.820732012896)*x_ref[1]
        arg[(2, 1, 2, 0)]=-0.492474700616*x[0]**o + (0.572567085668)*x[0] + (-0.282971689556)*x[1]**o + (0.864187146823)*x[1]
        ref[(2, 1, 2, 0)]=-0.492474700616*x_ref[0]**o + (0.572567085668)*x_ref[0] + (-0.282971689556)*x_ref[1]**o + (0.864187146823)*x_ref[1]
        arg[(2, 1, 2, 1)]=-0.511989710619*x[0]**o + (0.687563834844)*x[0] + (-0.305634585344)*x[1]**o + (-0.780599826622)*x[1]
        ref[(2, 1, 2, 1)]=-0.511989710619*x_ref[0]**o + (0.687563834844)*x_ref[0] + (-0.305634585344)*x_ref[1]**o + (-0.780599826622)*x_ref[1]
        arg[(2, 1, 3, 0)]=0.0870294999985*x[0]**o + (-0.347922117895)*x[0] + (0.260685155778)*x[1]**o + (-0.657091990556)*x[1]
        ref[(2, 1, 3, 0)]=0.0870294999985*x_ref[0]**o + (-0.347922117895)*x_ref[0] + (0.260685155778)*x_ref[1]**o + (-0.657091990556)*x_ref[1]
        arg[(2, 1, 3, 1)]=-0.372203725713*x[0]**o + (-0.306216734644)*x[0] + (-0.447546387161)*x[1]**o + (0.328195146218)*x[1]
        ref[(2, 1, 3, 1)]=-0.372203725713*x_ref[0]**o + (-0.306216734644)*x_ref[0] + (-0.447546387161)*x_ref[1]**o + (0.328195146218)*x_ref[1]
        arg[(2, 2, 0, 0)]=0.827169912135*x[0]**o + (-0.786369276994)*x[0] + (-0.429810904155)*x[1]**o + (0.770711790579)*x[1]
        ref[(2, 2, 0, 0)]=0.827169912135*x_ref[0]**o + (-0.786369276994)*x_ref[0] + (-0.429810904155)*x_ref[1]**o + (0.770711790579)*x_ref[1]
        arg[(2, 2, 0, 1)]=-0.989323452241*x[0]**o + (-0.762235852823)*x[0] + (-0.11194210852)*x[1]**o + (-0.862959994212)*x[1]
        ref[(2, 2, 0, 1)]=-0.989323452241*x_ref[0]**o + (-0.762235852823)*x_ref[0] + (-0.11194210852)*x_ref[1]**o + (-0.862959994212)*x_ref[1]
        arg[(2, 2, 1, 0)]=-0.0042618355092*x[0]**o + (0.926577544522)*x[0] + (0.237949739318)*x[1]**o + (-0.287004392412)*x[1]
        ref[(2, 2, 1, 0)]=-0.0042618355092*x_ref[0]**o + (0.926577544522)*x_ref[0] + (0.237949739318)*x_ref[1]**o + (-0.287004392412)*x_ref[1]
        arg[(2, 2, 1, 1)]=-0.224416908785*x[0]**o + (0.573628658897)*x[0] + (-0.9598699014)*x[1]**o + (0.924414627828)*x[1]
        ref[(2, 2, 1, 1)]=-0.224416908785*x_ref[0]**o + (0.573628658897)*x_ref[0] + (-0.9598699014)*x_ref[1]**o + (0.924414627828)*x_ref[1]
        arg[(2, 2, 2, 0)]=-0.365104178079*x[0]**o + (-0.734541679763)*x[0] + (-0.820736279798)*x[1]**o + (-0.424920624234)*x[1]
        ref[(2, 2, 2, 0)]=-0.365104178079*x_ref[0]**o + (-0.734541679763)*x_ref[0] + (-0.820736279798)*x_ref[1]**o + (-0.424920624234)*x_ref[1]
        arg[(2, 2, 2, 1)]=-0.205174592576*x[0]**o + (-0.0791913339448)*x[0] + (0.777876307203)*x[1]**o + (0.758146332664)*x[1]
        ref[(2, 2, 2, 1)]=-0.205174592576*x_ref[0]**o + (-0.0791913339448)*x_ref[0] + (0.777876307203)*x_ref[1]**o + (0.758146332664)*x_ref[1]
        arg[(2, 2, 3, 0)]=-0.896724861267*x[0]**o + (-0.490989017269)*x[0] + (-0.515586192155)*x[1]**o + (0.958278008818)*x[1]
        ref[(2, 2, 3, 0)]=-0.896724861267*x_ref[0]**o + (-0.490989017269)*x_ref[0] + (-0.515586192155)*x_ref[1]**o + (0.958278008818)*x_ref[1]
        arg[(2, 2, 3, 1)]=-0.801281692979*x[0]**o + (0.530933007593)*x[0] + (0.129495700214)*x[1]**o + (0.063542371111)*x[1]
        ref[(2, 2, 3, 1)]=-0.801281692979*x_ref[0]**o + (0.530933007593)*x_ref[0] + (0.129495700214)*x_ref[1]**o + (0.063542371111)*x_ref[1]
        arg[(3, 0, 0, 0)]=0.429644373305*x[0]**o + (-0.966579180884)*x[0] + (0.767060896548)*x[1]**o + (-0.69733875206)*x[1]
        ref[(3, 0, 0, 0)]=0.429644373305*x_ref[0]**o + (-0.966579180884)*x_ref[0] + (0.767060896548)*x_ref[1]**o + (-0.69733875206)*x_ref[1]
        arg[(3, 0, 0, 1)]=-0.835860494179*x[0]**o + (0.171949760689)*x[0] + (0.504270761408)*x[1]**o + (0.422417960125)*x[1]
        ref[(3, 0, 0, 1)]=-0.835860494179*x_ref[0]**o + (0.171949760689)*x_ref[0] + (0.504270761408)*x_ref[1]**o + (0.422417960125)*x_ref[1]
        arg[(3, 0, 1, 0)]=0.686493433744*x[0]**o + (-0.369367031649)*x[0] + (0.226511552503)*x[1]**o + (0.165404723303)*x[1]
        ref[(3, 0, 1, 0)]=0.686493433744*x_ref[0]**o + (-0.369367031649)*x_ref[0] + (0.226511552503)*x_ref[1]**o + (0.165404723303)*x_ref[1]
        arg[(3, 0, 1, 1)]=-0.102972009518*x[0]**o + (0.102033530961)*x[0] + (0.623825704824)*x[1]**o + (-0.150737022599)*x[1]
        ref[(3, 0, 1, 1)]=-0.102972009518*x_ref[0]**o + (0.102033530961)*x_ref[0] + (0.623825704824)*x_ref[1]**o + (-0.150737022599)*x_ref[1]
        arg[(3, 0, 2, 0)]=0.414331087606*x[0]**o + (0.232676585535)*x[0] + (-0.37773459324)*x[1]**o + (0.273909743937)*x[1]
        ref[(3, 0, 2, 0)]=0.414331087606*x_ref[0]**o + (0.232676585535)*x_ref[0] + (-0.37773459324)*x_ref[1]**o + (0.273909743937)*x_ref[1]
        arg[(3, 0, 2, 1)]=0.142930467991*x[0]**o + (-0.188806930195)*x[0] + (-0.792962262387)*x[1]**o + (-0.77597641196)*x[1]
        ref[(3, 0, 2, 1)]=0.142930467991*x_ref[0]**o + (-0.188806930195)*x_ref[0] + (-0.792962262387)*x_ref[1]**o + (-0.77597641196)*x_ref[1]
        arg[(3, 0, 3, 0)]=-0.132748281011*x[0]**o + (0.743838208995)*x[0] + (-0.849221084091)*x[1]**o + (-0.677995553882)*x[1]
        ref[(3, 0, 3, 0)]=-0.132748281011*x_ref[0]**o + (0.743838208995)*x_ref[0] + (-0.849221084091)*x_ref[1]**o + (-0.677995553882)*x_ref[1]
        arg[(3, 0, 3, 1)]=0.66370892577*x[0]**o + (-0.588182557839)*x[0] + (0.0922956792635)*x[1]**o + (0.579679760374)*x[1]
        ref[(3, 0, 3, 1)]=0.66370892577*x_ref[0]**o + (-0.588182557839)*x_ref[0] + (0.0922956792635)*x_ref[1]**o + (0.579679760374)*x_ref[1]
        arg[(3, 1, 0, 0)]=0.0880667718186*x[0]**o + (0.524236678)*x[0] + (-0.0781117221658)*x[1]**o + (-0.570129367545)*x[1]
        ref[(3, 1, 0, 0)]=0.0880667718186*x_ref[0]**o + (0.524236678)*x_ref[0] + (-0.0781117221658)*x_ref[1]**o + (-0.570129367545)*x_ref[1]
        arg[(3, 1, 0, 1)]=0.090089978352*x[0]**o + (-0.480425621446)*x[0] + (-0.42099914331)*x[1]**o + (0.41560913204)*x[1]
        ref[(3, 1, 0, 1)]=0.090089978352*x_ref[0]**o + (-0.480425621446)*x_ref[0] + (-0.42099914331)*x_ref[1]**o + (0.41560913204)*x_ref[1]
        arg[(3, 1, 1, 0)]=-0.436202153704*x[0]**o + (0.387716360704)*x[0] + (0.519182110314)*x[1]**o + (0.62957824616)*x[1]
        ref[(3, 1, 1, 0)]=-0.436202153704*x_ref[0]**o + (0.387716360704)*x_ref[0] + (0.519182110314)*x_ref[1]**o + (0.62957824616)*x_ref[1]
        arg[(3, 1, 1, 1)]=0.0687754005043*x[0]**o + (-0.548209514944)*x[0] + (0.459510818185)*x[1]**o + (0.015960729555)*x[1]
        ref[(3, 1, 1, 1)]=0.0687754005043*x_ref[0]**o + (-0.548209514944)*x_ref[0] + (0.459510818185)*x_ref[1]**o + (0.015960729555)*x_ref[1]
        arg[(3, 1, 2, 0)]=-0.272527855894*x[0]**o + (0.225937515631)*x[0] + (-0.814681896923)*x[1]**o + (-0.451676907718)*x[1]
        ref[(3, 1, 2, 0)]=-0.272527855894*x_ref[0]**o + (0.225937515631)*x_ref[0] + (-0.814681896923)*x_ref[1]**o + (-0.451676907718)*x_ref[1]
        arg[(3, 1, 2, 1)]=-0.197945825804*x[0]**o + (-0.0512912118405)*x[0] + (-0.605442959537)*x[1]**o + (-0.748306525906)*x[1]
        ref[(3, 1, 2, 1)]=-0.197945825804*x_ref[0]**o + (-0.0512912118405)*x_ref[0] + (-0.605442959537)*x_ref[1]**o + (-0.748306525906)*x_ref[1]
        arg[(3, 1, 3, 0)]=0.881220609429*x[0]**o + (-0.756800223281)*x[0] + (-0.16878778954)*x[1]**o + (0.694889121545)*x[1]
        ref[(3, 1, 3, 0)]=0.881220609429*x_ref[0]**o + (-0.756800223281)*x_ref[0] + (-0.16878778954)*x_ref[1]**o + (0.694889121545)*x_ref[1]
        arg[(3, 1, 3, 1)]=-0.0272700664207*x[0]**o + (-0.804662703672)*x[0] + (0.644773880152)*x[1]**o + (0.561180551536)*x[1]
        ref[(3, 1, 3, 1)]=-0.0272700664207*x_ref[0]**o + (-0.804662703672)*x_ref[0] + (0.644773880152)*x_ref[1]**o + (0.561180551536)*x_ref[1]
        arg[(3, 2, 0, 0)]=-0.880919114101*x[0]**o + (-0.433718935874)*x[0] + (0.883194636405)*x[1]**o + (-0.750973367746)*x[1]
        ref[(3, 2, 0, 0)]=-0.880919114101*x_ref[0]**o + (-0.433718935874)*x_ref[0] + (0.883194636405)*x_ref[1]**o + (-0.750973367746)*x_ref[1]
        arg[(3, 2, 0, 1)]=-0.400040989184*x[0]**o + (-0.841815016537)*x[0] + (0.283581766672)*x[1]**o + (0.367052008072)*x[1]
        ref[(3, 2, 0, 1)]=-0.400040989184*x_ref[0]**o + (-0.841815016537)*x_ref[0] + (0.283581766672)*x_ref[1]**o + (0.367052008072)*x_ref[1]
        arg[(3, 2, 1, 0)]=-0.383421655381*x[0]**o + (0.633926957977)*x[0] + (-0.730194502773)*x[1]**o + (-0.281948179475)*x[1]
        ref[(3, 2, 1, 0)]=-0.383421655381*x_ref[0]**o + (0.633926957977)*x_ref[0] + (-0.730194502773)*x_ref[1]**o + (-0.281948179475)*x_ref[1]
        arg[(3, 2, 1, 1)]=0.955671630226*x[0]**o + (-0.440901454319)*x[0] + (-0.521526899194)*x[1]**o + (-0.373939329721)*x[1]
        ref[(3, 2, 1, 1)]=0.955671630226*x_ref[0]**o + (-0.440901454319)*x_ref[0] + (-0.521526899194)*x_ref[1]**o + (-0.373939329721)*x_ref[1]
        arg[(3, 2, 2, 0)]=0.745937777469*x[0]**o + (-0.237673677425)*x[0] + (0.600102263543)*x[1]**o + (0.786754902637)*x[1]
        ref[(3, 2, 2, 0)]=0.745937777469*x_ref[0]**o + (-0.237673677425)*x_ref[0] + (0.600102263543)*x_ref[1]**o + (0.786754902637)*x_ref[1]
        arg[(3, 2, 2, 1)]=-0.413090810324*x[0]**o + (0.958440060053)*x[0] + (0.27895530008)*x[1]**o + (-0.373875009059)*x[1]
        ref[(3, 2, 2, 1)]=-0.413090810324*x_ref[0]**o + (0.958440060053)*x_ref[0] + (0.27895530008)*x_ref[1]**o + (-0.373875009059)*x_ref[1]
        arg[(3, 2, 3, 0)]=-0.32277430541*x[0]**o + (-0.964110575189)*x[0] + (0.917630692709)*x[1]**o + (0.712396351693)*x[1]
        ref[(3, 2, 3, 0)]=-0.32277430541*x_ref[0]**o + (-0.964110575189)*x_ref[0] + (0.917630692709)*x_ref[1]**o + (0.712396351693)*x_ref[1]
        arg[(3, 2, 3, 1)]=0.0759754906856*x[0]**o + (-0.754198030332)*x[0] + (0.835877633452)*x[1]**o + (0.59513447119)*x[1]
        ref[(3, 2, 3, 1)]=0.0759754906856*x_ref[0]**o + (-0.754198030332)*x_ref[0] + (0.835877633452)*x_ref[1]**o + (0.59513447119)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.76359160153*x[2]**o + (0.994028314767)*x[2]
            ref[(0, 0, 0, 0)]+=-0.76359160153*x_ref[2]**o + (0.994028314767)*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.279081750116*x[2]**o + (-0.772397385791)*x[2]
            ref[(0, 0, 0, 1)]+=0.279081750116*x_ref[2]**o + (-0.772397385791)*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.247057929521*x[2]**o + (0.158615282214)*x[2]
            ref[(0, 0, 1, 0)]+=-0.247057929521*x_ref[2]**o + (0.158615282214)*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.549458571328*x[2]**o + (0.318311589457)*x[2]
            ref[(0, 0, 1, 1)]+=-0.549458571328*x_ref[2]**o + (0.318311589457)*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.929750384974*x[2]**o + (0.707097529957)*x[2]
            ref[(0, 0, 2, 0)]+=-0.929750384974*x_ref[2]**o + (0.707097529957)*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.236081847745*x[2]**o + (-0.190310258682)*x[2]
            ref[(0, 0, 2, 1)]+=0.236081847745*x_ref[2]**o + (-0.190310258682)*x_ref[2]
            arg[(0, 0, 3, 0)]+=0.642542353569*x[2]**o + (-0.597854734245)*x[2]
            ref[(0, 0, 3, 0)]+=0.642542353569*x_ref[2]**o + (-0.597854734245)*x_ref[2]
            arg[(0, 0, 3, 1)]+=0.124365065941*x[2]**o + (0.276819443256)*x[2]
            ref[(0, 0, 3, 1)]+=0.124365065941*x_ref[2]**o + (0.276819443256)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.303581740544*x[2]**o + (0.85716509906)*x[2]
            ref[(0, 1, 0, 0)]+=-0.303581740544*x_ref[2]**o + (0.85716509906)*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.936146520137*x[2]**o + (-0.631902222322)*x[2]
            ref[(0, 1, 0, 1)]+=0.936146520137*x_ref[2]**o + (-0.631902222322)*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.63513718286*x[2]**o + (0.705700809538)*x[2]
            ref[(0, 1, 1, 0)]+=0.63513718286*x_ref[2]**o + (0.705700809538)*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.781943479631*x[2]**o + (0.595506380421)*x[2]
            ref[(0, 1, 1, 1)]+=-0.781943479631*x_ref[2]**o + (0.595506380421)*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.102177906227*x[2]**o + (0.96501704543)*x[2]
            ref[(0, 1, 2, 0)]+=-0.102177906227*x_ref[2]**o + (0.96501704543)*x_ref[2]
            arg[(0, 1, 2, 1)]+=0.296502974901*x[2]**o + (0.694298644372)*x[2]
            ref[(0, 1, 2, 1)]+=0.296502974901*x_ref[2]**o + (0.694298644372)*x_ref[2]
            arg[(0, 1, 3, 0)]+=0.407182019699*x[2]**o + (0.319609268293)*x[2]
            ref[(0, 1, 3, 0)]+=0.407182019699*x_ref[2]**o + (0.319609268293)*x_ref[2]
            arg[(0, 1, 3, 1)]+=-0.126011720368*x[2]**o + (0.0722301158406)*x[2]
            ref[(0, 1, 3, 1)]+=-0.126011720368*x_ref[2]**o + (0.0722301158406)*x_ref[2]
            arg[(0, 2, 0, 0)]+=0.448758440637*x[2]**o + (-0.506871621538)*x[2]
            ref[(0, 2, 0, 0)]+=0.448758440637*x_ref[2]**o + (-0.506871621538)*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.134173469673*x[2]**o + (0.961210018377)*x[2]
            ref[(0, 2, 0, 1)]+=-0.134173469673*x_ref[2]**o + (0.961210018377)*x_ref[2]
            arg[(0, 2, 1, 0)]+=0.774346053365*x[2]**o + (0.31267298119)*x[2]
            ref[(0, 2, 1, 0)]+=0.774346053365*x_ref[2]**o + (0.31267298119)*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.120923231601*x[2]**o + (-0.0864905803486)*x[2]
            ref[(0, 2, 1, 1)]+=-0.120923231601*x_ref[2]**o + (-0.0864905803486)*x_ref[2]
            arg[(0, 2, 2, 0)]+=-0.932249005223*x[2]**o + (-0.494884637395)*x[2]
            ref[(0, 2, 2, 0)]+=-0.932249005223*x_ref[2]**o + (-0.494884637395)*x_ref[2]
            arg[(0, 2, 2, 1)]+=-0.403478794812*x[2]**o + (0.549763438806)*x[2]
            ref[(0, 2, 2, 1)]+=-0.403478794812*x_ref[2]**o + (0.549763438806)*x_ref[2]
            arg[(0, 2, 3, 0)]+=-0.0932713451417*x[2]**o + (-0.991925791795)*x[2]
            ref[(0, 2, 3, 0)]+=-0.0932713451417*x_ref[2]**o + (-0.991925791795)*x_ref[2]
            arg[(0, 2, 3, 1)]+=0.180537754848*x[2]**o + (0.142415656456)*x[2]
            ref[(0, 2, 3, 1)]+=0.180537754848*x_ref[2]**o + (0.142415656456)*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.29420250446*x[2]**o + (-0.095397454759)*x[2]
            ref[(1, 0, 0, 0)]+=0.29420250446*x_ref[2]**o + (-0.095397454759)*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.16791869561*x[2]**o + (-0.356522765651)*x[2]
            ref[(1, 0, 0, 1)]+=-0.16791869561*x_ref[2]**o + (-0.356522765651)*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.7672385586*x[2]**o + (0.41301792396)*x[2]
            ref[(1, 0, 1, 0)]+=0.7672385586*x_ref[2]**o + (0.41301792396)*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.639663051727*x[2]**o + (0.155609415455)*x[2]
            ref[(1, 0, 1, 1)]+=0.639663051727*x_ref[2]**o + (0.155609415455)*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.90052957568*x[2]**o + (0.985891787125)*x[2]
            ref[(1, 0, 2, 0)]+=-0.90052957568*x_ref[2]**o + (0.985891787125)*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.675657798594*x[2]**o + (0.193654337863)*x[2]
            ref[(1, 0, 2, 1)]+=0.675657798594*x_ref[2]**o + (0.193654337863)*x_ref[2]
            arg[(1, 0, 3, 0)]+=-0.346340030098*x[2]**o + (-0.0116440786741)*x[2]
            ref[(1, 0, 3, 0)]+=-0.346340030098*x_ref[2]**o + (-0.0116440786741)*x_ref[2]
            arg[(1, 0, 3, 1)]+=-0.905194728557*x[2]**o + (0.516476452438)*x[2]
            ref[(1, 0, 3, 1)]+=-0.905194728557*x_ref[2]**o + (0.516476452438)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.809801674272*x[2]**o + (-0.760870617876)*x[2]
            ref[(1, 1, 0, 0)]+=0.809801674272*x_ref[2]**o + (-0.760870617876)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.985958381929*x[2]**o + (-0.559453278238)*x[2]
            ref[(1, 1, 0, 1)]+=0.985958381929*x_ref[2]**o + (-0.559453278238)*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.237040783453*x[2]**o + (0.682666767657)*x[2]
            ref[(1, 1, 1, 0)]+=-0.237040783453*x_ref[2]**o + (0.682666767657)*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.754136567411*x[2]**o + (-0.000455719088739)*x[2]
            ref[(1, 1, 1, 1)]+=0.754136567411*x_ref[2]**o + (-0.000455719088739)*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.424258489551*x[2]**o + (-0.333095278878)*x[2]
            ref[(1, 1, 2, 0)]+=-0.424258489551*x_ref[2]**o + (-0.333095278878)*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.629658309684*x[2]**o + (0.549097321238)*x[2]
            ref[(1, 1, 2, 1)]+=0.629658309684*x_ref[2]**o + (0.549097321238)*x_ref[2]
            arg[(1, 1, 3, 0)]+=-0.432310113841*x[2]**o + (0.476227404746)*x[2]
            ref[(1, 1, 3, 0)]+=-0.432310113841*x_ref[2]**o + (0.476227404746)*x_ref[2]
            arg[(1, 1, 3, 1)]+=0.399085489999*x[2]**o + (0.441434873197)*x[2]
            ref[(1, 1, 3, 1)]+=0.399085489999*x_ref[2]**o + (0.441434873197)*x_ref[2]
            arg[(1, 2, 0, 0)]+=-0.633631959083*x[2]**o + (0.428341401297)*x[2]
            ref[(1, 2, 0, 0)]+=-0.633631959083*x_ref[2]**o + (0.428341401297)*x_ref[2]
            arg[(1, 2, 0, 1)]+=0.978505949707*x[2]**o + (-0.918809522545)*x[2]
            ref[(1, 2, 0, 1)]+=0.978505949707*x_ref[2]**o + (-0.918809522545)*x_ref[2]
            arg[(1, 2, 1, 0)]+=-0.225206187097*x[2]**o + (-0.0373564609246)*x[2]
            ref[(1, 2, 1, 0)]+=-0.225206187097*x_ref[2]**o + (-0.0373564609246)*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.699087167653*x[2]**o + (0.912003206414)*x[2]
            ref[(1, 2, 1, 1)]+=0.699087167653*x_ref[2]**o + (0.912003206414)*x_ref[2]
            arg[(1, 2, 2, 0)]+=-0.652901172076*x[2]**o + (-0.660055064297)*x[2]
            ref[(1, 2, 2, 0)]+=-0.652901172076*x_ref[2]**o + (-0.660055064297)*x_ref[2]
            arg[(1, 2, 2, 1)]+=-0.731722090228*x[2]**o + (0.570844626416)*x[2]
            ref[(1, 2, 2, 1)]+=-0.731722090228*x_ref[2]**o + (0.570844626416)*x_ref[2]
            arg[(1, 2, 3, 0)]+=-0.100097748495*x[2]**o + (-0.968837251069)*x[2]
            ref[(1, 2, 3, 0)]+=-0.100097748495*x_ref[2]**o + (-0.968837251069)*x_ref[2]
            arg[(1, 2, 3, 1)]+=-0.582755922664*x[2]**o + (-0.470858256872)*x[2]
            ref[(1, 2, 3, 1)]+=-0.582755922664*x_ref[2]**o + (-0.470858256872)*x_ref[2]
            arg[(2, 0, 0, 0)]+=0.0350385995779*x[2]**o + (0.851442081326)*x[2]
            ref[(2, 0, 0, 0)]+=0.0350385995779*x_ref[2]**o + (0.851442081326)*x_ref[2]
            arg[(2, 0, 0, 1)]+=0.703234386692*x[2]**o + (-0.596641169592)*x[2]
            ref[(2, 0, 0, 1)]+=0.703234386692*x_ref[2]**o + (-0.596641169592)*x_ref[2]
            arg[(2, 0, 1, 0)]+=0.167912358569*x[2]**o + (0.619217960605)*x[2]
            ref[(2, 0, 1, 0)]+=0.167912358569*x_ref[2]**o + (0.619217960605)*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.420096171131*x[2]**o + (-0.244731611543)*x[2]
            ref[(2, 0, 1, 1)]+=0.420096171131*x_ref[2]**o + (-0.244731611543)*x_ref[2]
            arg[(2, 0, 2, 0)]+=-0.168331045*x[2]**o + (-0.0983682718113)*x[2]
            ref[(2, 0, 2, 0)]+=-0.168331045*x_ref[2]**o + (-0.0983682718113)*x_ref[2]
            arg[(2, 0, 2, 1)]+=0.677843398421*x[2]**o + (-0.786415996279)*x[2]
            ref[(2, 0, 2, 1)]+=0.677843398421*x_ref[2]**o + (-0.786415996279)*x_ref[2]
            arg[(2, 0, 3, 0)]+=0.870841083703*x[2]**o + (0.660419688565)*x[2]
            ref[(2, 0, 3, 0)]+=0.870841083703*x_ref[2]**o + (0.660419688565)*x_ref[2]
            arg[(2, 0, 3, 1)]+=-0.406731146289*x[2]**o + (-0.938817067033)*x[2]
            ref[(2, 0, 3, 1)]+=-0.406731146289*x_ref[2]**o + (-0.938817067033)*x_ref[2]
            arg[(2, 1, 0, 0)]+=-0.186814601847*x[2]**o + (-0.706192365095)*x[2]
            ref[(2, 1, 0, 0)]+=-0.186814601847*x_ref[2]**o + (-0.706192365095)*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.932330025695*x[2]**o + (0.114044812147)*x[2]
            ref[(2, 1, 0, 1)]+=-0.932330025695*x_ref[2]**o + (0.114044812147)*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.677008199488*x[2]**o + (0.702516378741)*x[2]
            ref[(2, 1, 1, 0)]+=0.677008199488*x_ref[2]**o + (0.702516378741)*x_ref[2]
            arg[(2, 1, 1, 1)]+=0.693756410615*x[2]**o + (0.919366288677)*x[2]
            ref[(2, 1, 1, 1)]+=0.693756410615*x_ref[2]**o + (0.919366288677)*x_ref[2]
            arg[(2, 1, 2, 0)]+=0.40794260605*x[2]**o + (-0.94559887128)*x[2]
            ref[(2, 1, 2, 0)]+=0.40794260605*x_ref[2]**o + (-0.94559887128)*x_ref[2]
            arg[(2, 1, 2, 1)]+=0.164469360797*x[2]**o + (-0.404698361402)*x[2]
            ref[(2, 1, 2, 1)]+=0.164469360797*x_ref[2]**o + (-0.404698361402)*x_ref[2]
            arg[(2, 1, 3, 0)]+=0.438785606426*x[2]**o + (-0.300891882541)*x[2]
            ref[(2, 1, 3, 0)]+=0.438785606426*x_ref[2]**o + (-0.300891882541)*x_ref[2]
            arg[(2, 1, 3, 1)]+=0.879878183482*x[2]**o + (-0.979028111838)*x[2]
            ref[(2, 1, 3, 1)]+=0.879878183482*x_ref[2]**o + (-0.979028111838)*x_ref[2]
            arg[(2, 2, 0, 0)]+=0.450157722719*x[2]**o + (-0.696796696587)*x[2]
            ref[(2, 2, 0, 0)]+=0.450157722719*x_ref[2]**o + (-0.696796696587)*x_ref[2]
            arg[(2, 2, 0, 1)]+=0.910063997256*x[2]**o + (0.755574158283)*x[2]
            ref[(2, 2, 0, 1)]+=0.910063997256*x_ref[2]**o + (0.755574158283)*x_ref[2]
            arg[(2, 2, 1, 0)]+=-0.698308142864*x[2]**o + (0.533873237167)*x[2]
            ref[(2, 2, 1, 0)]+=-0.698308142864*x_ref[2]**o + (0.533873237167)*x_ref[2]
            arg[(2, 2, 1, 1)]+=0.0621916047101*x[2]**o + (0.335853494012)*x[2]
            ref[(2, 2, 1, 1)]+=0.0621916047101*x_ref[2]**o + (0.335853494012)*x_ref[2]
            arg[(2, 2, 2, 0)]+=-0.804828568968*x[2]**o + (-0.991482097716)*x[2]
            ref[(2, 2, 2, 0)]+=-0.804828568968*x_ref[2]**o + (-0.991482097716)*x_ref[2]
            arg[(2, 2, 2, 1)]+=0.68426477619*x[2]**o + (-0.938365963479)*x[2]
            ref[(2, 2, 2, 1)]+=0.68426477619*x_ref[2]**o + (-0.938365963479)*x_ref[2]
            arg[(2, 2, 3, 0)]+=-0.580527013257*x[2]**o + (0.154888276511)*x[2]
            ref[(2, 2, 3, 0)]+=-0.580527013257*x_ref[2]**o + (0.154888276511)*x_ref[2]
            arg[(2, 2, 3, 1)]+=0.913162571026*x[2]**o + (0.0615855614471)*x[2]
            ref[(2, 2, 3, 1)]+=0.913162571026*x_ref[2]**o + (0.0615855614471)*x_ref[2]
            arg[(3, 0, 0, 0)]+=0.652852873446*x[2]**o + (-0.392602175914)*x[2]
            ref[(3, 0, 0, 0)]+=0.652852873446*x_ref[2]**o + (-0.392602175914)*x_ref[2]
            arg[(3, 0, 0, 1)]+=-0.634021151466*x[2]**o + (-0.742197087112)*x[2]
            ref[(3, 0, 0, 1)]+=-0.634021151466*x_ref[2]**o + (-0.742197087112)*x_ref[2]
            arg[(3, 0, 1, 0)]+=-0.402551853712*x[2]**o + (0.449262485601)*x[2]
            ref[(3, 0, 1, 0)]+=-0.402551853712*x_ref[2]**o + (0.449262485601)*x_ref[2]
            arg[(3, 0, 1, 1)]+=0.264080599771*x[2]**o + (0.904300178402)*x[2]
            ref[(3, 0, 1, 1)]+=0.264080599771*x_ref[2]**o + (0.904300178402)*x_ref[2]
            arg[(3, 0, 2, 0)]+=-0.961751692412*x[2]**o + (-0.852351636219)*x[2]
            ref[(3, 0, 2, 0)]+=-0.961751692412*x_ref[2]**o + (-0.852351636219)*x_ref[2]
            arg[(3, 0, 2, 1)]+=-0.790946538059*x[2]**o + (-0.93784809921)*x[2]
            ref[(3, 0, 2, 1)]+=-0.790946538059*x_ref[2]**o + (-0.93784809921)*x_ref[2]
            arg[(3, 0, 3, 0)]+=-0.0781178022087*x[2]**o + (-0.384188870904)*x[2]
            ref[(3, 0, 3, 0)]+=-0.0781178022087*x_ref[2]**o + (-0.384188870904)*x_ref[2]
            arg[(3, 0, 3, 1)]+=0.256626903608*x[2]**o + (0.450462945069)*x[2]
            ref[(3, 0, 3, 1)]+=0.256626903608*x_ref[2]**o + (0.450462945069)*x_ref[2]
            arg[(3, 1, 0, 0)]+=0.144468810844*x[2]**o + (-0.07279416384)*x[2]
            ref[(3, 1, 0, 0)]+=0.144468810844*x_ref[2]**o + (-0.07279416384)*x_ref[2]
            arg[(3, 1, 0, 1)]+=0.861231018269*x[2]**o + (-0.617932978396)*x[2]
            ref[(3, 1, 0, 1)]+=0.861231018269*x_ref[2]**o + (-0.617932978396)*x_ref[2]
            arg[(3, 1, 1, 0)]+=0.407982333502*x[2]**o + (0.921394643559)*x[2]
            ref[(3, 1, 1, 0)]+=0.407982333502*x_ref[2]**o + (0.921394643559)*x_ref[2]
            arg[(3, 1, 1, 1)]+=0.220695012537*x[2]**o + (-0.479154206361)*x[2]
            ref[(3, 1, 1, 1)]+=0.220695012537*x_ref[2]**o + (-0.479154206361)*x_ref[2]
            arg[(3, 1, 2, 0)]+=-0.21541110253*x[2]**o + (0.115918122278)*x[2]
            ref[(3, 1, 2, 0)]+=-0.21541110253*x_ref[2]**o + (0.115918122278)*x_ref[2]
            arg[(3, 1, 2, 1)]+=-0.333407799233*x[2]**o + (0.500125455685)*x[2]
            ref[(3, 1, 2, 1)]+=-0.333407799233*x_ref[2]**o + (0.500125455685)*x_ref[2]
            arg[(3, 1, 3, 0)]+=0.0167220036117*x[2]**o + (-0.723979538659)*x[2]
            ref[(3, 1, 3, 0)]+=0.0167220036117*x_ref[2]**o + (-0.723979538659)*x_ref[2]
            arg[(3, 1, 3, 1)]+=0.340194679741*x[2]**o + (0.55770654202)*x[2]
            ref[(3, 1, 3, 1)]+=0.340194679741*x_ref[2]**o + (0.55770654202)*x_ref[2]
            arg[(3, 2, 0, 0)]+=-0.224726091811*x[2]**o + (-0.792547053082)*x[2]
            ref[(3, 2, 0, 0)]+=-0.224726091811*x_ref[2]**o + (-0.792547053082)*x_ref[2]
            arg[(3, 2, 0, 1)]+=0.660690050714*x[2]**o + (0.013702963917)*x[2]
            ref[(3, 2, 0, 1)]+=0.660690050714*x_ref[2]**o + (0.013702963917)*x_ref[2]
            arg[(3, 2, 1, 0)]+=-0.550403321102*x[2]**o + (-0.877073414416)*x[2]
            ref[(3, 2, 1, 0)]+=-0.550403321102*x_ref[2]**o + (-0.877073414416)*x_ref[2]
            arg[(3, 2, 1, 1)]+=-0.878228057332*x[2]**o + (-0.672426824116)*x[2]
            ref[(3, 2, 1, 1)]+=-0.878228057332*x_ref[2]**o + (-0.672426824116)*x_ref[2]
            arg[(3, 2, 2, 0)]+=0.74024993705*x[2]**o + (-0.702779546232)*x[2]
            ref[(3, 2, 2, 0)]+=0.74024993705*x_ref[2]**o + (-0.702779546232)*x_ref[2]
            arg[(3, 2, 2, 1)]+=-0.712170241895*x[2]**o + (0.533493008977)*x[2]
            ref[(3, 2, 2, 1)]+=-0.712170241895*x_ref[2]**o + (0.533493008977)*x_ref[2]
            arg[(3, 2, 3, 0)]+=-0.441993775424*x[2]**o + (-0.537331107031)*x[2]
            ref[(3, 2, 3, 0)]+=-0.441993775424*x_ref[2]**o + (-0.537331107031)*x_ref[2]
            arg[(3, 2, 3, 1)]+=0.24036710936*x[2]**o + (-0.432207046628)*x[2]
            ref[(3, 2, 3, 1)]+=0.24036710936*x_ref[2]**o + (-0.432207046628)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedSolution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.460506983182*x[0]**o + (-0.0315124556713)*x[0] + (0.568863245029)*x[1]**o + (0.174009453423)*x[1]
        ref=-0.460506983182*x_ref[0]**o + (-0.0315124556713)*x_ref[0] + (0.568863245029)*x_ref[1]**o + (0.174009453423)*x_ref[1]
        if dim==3:
            arg+=(-0.487138715435)*x[2]**o + (-0.546617942106)*x[2]
            ref+=(-0.487138715435)*x_ref[2]**o + (-0.546617942106)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedSolution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=-0.109921105214*x[0]**o + (0.908219926224)*x[0] + (0.304443025754)*x[1]**o + (0.828523466771)*x[1]
        ref[(0,)]=-0.109921105214*x_ref[0]**o + (0.908219926224)*x_ref[0] + (0.304443025754)*x_ref[1]**o + (0.828523466771)*x_ref[1]
        arg[(1,)]=-0.922061763061*x[0]**o + (-0.912767766811)*x[0] + (-0.881741738003)*x[1]**o + (-0.275283871562)*x[1]
        ref[(1,)]=-0.922061763061*x_ref[0]**o + (-0.912767766811)*x_ref[0] + (-0.881741738003)*x_ref[1]**o + (-0.275283871562)*x_ref[1]
        arg[(2,)]=0.323167781697*x[0]**o + (-0.129451726207)*x[0] + (-0.0230619788372)*x[1]**o + (0.206462330204)*x[1]
        ref[(2,)]=0.323167781697*x_ref[0]**o + (-0.129451726207)*x_ref[0] + (-0.0230619788372)*x_ref[1]**o + (0.206462330204)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.00463076004278*x[2]**o + (-0.340612937246)*x[2]
            ref[(0,)]+=-0.00463076004278*x_ref[2]**o + (-0.340612937246)*x_ref[2]
            arg[(1,)]+=0.971389713537*x[2]**o + (0.18461838059)*x[2]
            ref[(1,)]+=0.971389713537*x_ref[2]**o + (0.18461838059)*x_ref[2]
            arg[(2,)]+=-0.519236606038*x[2]**o + (0.612541424013)*x[2]
            ref[(2,)]+=-0.519236606038*x_ref[2]**o + (0.612541424013)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedSolution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref = Data(0,(4, 3),w_ref)
        arg[(0, 0)]=-0.0907993981655*x[0]**o + (0.995989633179)*x[0] + (0.689997689109)*x[1]**o + (-0.922862302034)*x[1]
        ref[(0, 0)]=-0.0907993981655*x_ref[0]**o + (0.995989633179)*x_ref[0] + (0.689997689109)*x_ref[1]**o + (-0.922862302034)*x_ref[1]
        arg[(0, 1)]=0.521931730788*x[0]**o + (0.686515669616)*x[0] + (0.258729470882)*x[1]**o + (0.103472325597)*x[1]
        ref[(0, 1)]=0.521931730788*x_ref[0]**o + (0.686515669616)*x_ref[0] + (0.258729470882)*x_ref[1]**o + (0.103472325597)*x_ref[1]
        arg[(0, 2)]=0.397315582529*x[0]**o + (-0.811717038853)*x[0] + (-0.160231586817)*x[1]**o + (0.105917133786)*x[1]
        ref[(0, 2)]=0.397315582529*x_ref[0]**o + (-0.811717038853)*x_ref[0] + (-0.160231586817)*x_ref[1]**o + (0.105917133786)*x_ref[1]
        arg[(1, 0)]=-0.882439284399*x[0]**o + (-0.715505986797)*x[0] + (0.368744297022)*x[1]**o + (-0.208356239672)*x[1]
        ref[(1, 0)]=-0.882439284399*x_ref[0]**o + (-0.715505986797)*x_ref[0] + (0.368744297022)*x_ref[1]**o + (-0.208356239672)*x_ref[1]
        arg[(1, 1)]=0.537520771731*x[0]**o + (-0.0752831129491)*x[0] + (0.802534209202)*x[1]**o + (0.832115819492)*x[1]
        ref[(1, 1)]=0.537520771731*x_ref[0]**o + (-0.0752831129491)*x_ref[0] + (0.802534209202)*x_ref[1]**o + (0.832115819492)*x_ref[1]
        arg[(1, 2)]=0.242329551524*x[0]**o + (-0.582096867504)*x[0] + (0.705823072377)*x[1]**o + (0.54662224635)*x[1]
        ref[(1, 2)]=0.242329551524*x_ref[0]**o + (-0.582096867504)*x_ref[0] + (0.705823072377)*x_ref[1]**o + (0.54662224635)*x_ref[1]
        arg[(2, 0)]=-0.180336866317*x[0]**o + (-0.912157887348)*x[0] + (0.728691428989)*x[1]**o + (-0.648114104766)*x[1]
        ref[(2, 0)]=-0.180336866317*x_ref[0]**o + (-0.912157887348)*x_ref[0] + (0.728691428989)*x_ref[1]**o + (-0.648114104766)*x_ref[1]
        arg[(2, 1)]=-0.492158682581*x[0]**o + (0.888797716245)*x[0] + (-0.411398029126)*x[1]**o + (0.00316490427563)*x[1]
        ref[(2, 1)]=-0.492158682581*x_ref[0]**o + (0.888797716245)*x_ref[0] + (-0.411398029126)*x_ref[1]**o + (0.00316490427563)*x_ref[1]
        arg[(2, 2)]=0.0769705592316*x[0]**o + (-0.848367183126)*x[0] + (-0.431768798461)*x[1]**o + (-0.968571805984)*x[1]
        ref[(2, 2)]=0.0769705592316*x_ref[0]**o + (-0.848367183126)*x_ref[0] + (-0.431768798461)*x_ref[1]**o + (-0.968571805984)*x_ref[1]
        arg[(3, 0)]=0.923266355695*x[0]**o + (-0.329014669687)*x[0] + (-0.614149970925)*x[1]**o + (0.265493217331)*x[1]
        ref[(3, 0)]=0.923266355695*x_ref[0]**o + (-0.329014669687)*x_ref[0] + (-0.614149970925)*x_ref[1]**o + (0.265493217331)*x_ref[1]
        arg[(3, 1)]=0.34007436076*x[0]**o + (-0.844549087545)*x[0] + (-0.439615991847)*x[1]**o + (-0.905611992849)*x[1]
        ref[(3, 1)]=0.34007436076*x_ref[0]**o + (-0.844549087545)*x_ref[0] + (-0.439615991847)*x_ref[1]**o + (-0.905611992849)*x_ref[1]
        arg[(3, 2)]=0.486050171793*x[0]**o + (-0.2764829559)*x[0] + (-0.45778528711)*x[1]**o + (-0.0774876989593)*x[1]
        ref[(3, 2)]=0.486050171793*x_ref[0]**o + (-0.2764829559)*x_ref[0] + (-0.45778528711)*x_ref[1]**o + (-0.0774876989593)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.775416636241*x[2]**o + (0.840186764446)*x[2]
            ref[(0, 0)]+=-0.775416636241*x_ref[2]**o + (0.840186764446)*x_ref[2]
            arg[(0, 1)]+=-0.561535144351*x[2]**o + (-0.172939386499)*x[2]
            ref[(0, 1)]+=-0.561535144351*x_ref[2]**o + (-0.172939386499)*x_ref[2]
            arg[(0, 2)]+=-0.807303527267*x[2]**o + (-0.444265534044)*x[2]
            ref[(0, 2)]+=-0.807303527267*x_ref[2]**o + (-0.444265534044)*x_ref[2]
            arg[(1, 0)]+=-0.553391039111*x[2]**o + (-0.224816069005)*x[2]
            ref[(1, 0)]+=-0.553391039111*x_ref[2]**o + (-0.224816069005)*x_ref[2]
            arg[(1, 1)]+=-0.965039464271*x[2]**o + (0.872850759079)*x[2]
            ref[(1, 1)]+=-0.965039464271*x_ref[2]**o + (0.872850759079)*x_ref[2]
            arg[(1, 2)]+=0.709716954234*x[2]**o + (0.595764083276)*x[2]
            ref[(1, 2)]+=0.709716954234*x_ref[2]**o + (0.595764083276)*x_ref[2]
            arg[(2, 0)]+=-0.425510097121*x[2]**o + (0.738574539608)*x[2]
            ref[(2, 0)]+=-0.425510097121*x_ref[2]**o + (0.738574539608)*x_ref[2]
            arg[(2, 1)]+=0.738880180823*x[2]**o + (-0.17541896644)*x[2]
            ref[(2, 1)]+=0.738880180823*x_ref[2]**o + (-0.17541896644)*x_ref[2]
            arg[(2, 2)]+=0.31954672178*x[2]**o + (0.630066565596)*x[2]
            ref[(2, 2)]+=0.31954672178*x_ref[2]**o + (0.630066565596)*x_ref[2]
            arg[(3, 0)]+=-0.852544505248*x[2]**o + (0.730471067609)*x[2]
            ref[(3, 0)]+=-0.852544505248*x_ref[2]**o + (0.730471067609)*x_ref[2]
            arg[(3, 1)]+=0.412114127123*x[2]**o + (0.710320484489)*x[2]
            ref[(3, 1)]+=0.412114127123*x_ref[2]**o + (0.710320484489)*x_ref[2]
            arg[(3, 2)]+=0.529799607979*x[2]**o + (-0.113388212348)*x[2]
            ref[(3, 2)]+=0.529799607979*x_ref[2]**o + (-0.113388212348)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedSolution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 3),w)
        ref = Data(0,(3, 3, 3),w_ref)
        arg[(0, 0, 0)]=-0.664483893477*x[0]**o + (-0.430737073416)*x[0] + (0.00142886652524)*x[1]**o + (0.338558553041)*x[1]
        ref[(0, 0, 0)]=-0.664483893477*x_ref[0]**o + (-0.430737073416)*x_ref[0] + (0.00142886652524)*x_ref[1]**o + (0.338558553041)*x_ref[1]
        arg[(0, 0, 1)]=0.124871776662*x[0]**o + (-0.976370944466)*x[0] + (0.745247343006)*x[1]**o + (-0.563592177173)*x[1]
        ref[(0, 0, 1)]=0.124871776662*x_ref[0]**o + (-0.976370944466)*x_ref[0] + (0.745247343006)*x_ref[1]**o + (-0.563592177173)*x_ref[1]
        arg[(0, 0, 2)]=-0.333357279813*x[0]**o + (0.149372991875)*x[0] + (-0.00730084774111)*x[1]**o + (0.940785427801)*x[1]
        ref[(0, 0, 2)]=-0.333357279813*x_ref[0]**o + (0.149372991875)*x_ref[0] + (-0.00730084774111)*x_ref[1]**o + (0.940785427801)*x_ref[1]
        arg[(0, 1, 0)]=-0.671033768449*x[0]**o + (0.36914667304)*x[0] + (0.0247816535897)*x[1]**o + (-0.977733917794)*x[1]
        ref[(0, 1, 0)]=-0.671033768449*x_ref[0]**o + (0.36914667304)*x_ref[0] + (0.0247816535897)*x_ref[1]**o + (-0.977733917794)*x_ref[1]
        arg[(0, 1, 1)]=0.691651353843*x[0]**o + (0.425763159634)*x[0] + (0.351852959819)*x[1]**o + (-0.480074036597)*x[1]
        ref[(0, 1, 1)]=0.691651353843*x_ref[0]**o + (0.425763159634)*x_ref[0] + (0.351852959819)*x_ref[1]**o + (-0.480074036597)*x_ref[1]
        arg[(0, 1, 2)]=0.311303431278*x[0]**o + (0.509884090324)*x[0] + (-0.186751065185)*x[1]**o + (-0.113102996462)*x[1]
        ref[(0, 1, 2)]=0.311303431278*x_ref[0]**o + (0.509884090324)*x_ref[0] + (-0.186751065185)*x_ref[1]**o + (-0.113102996462)*x_ref[1]
        arg[(0, 2, 0)]=-0.125544858418*x[0]**o + (-0.994150222958)*x[0] + (-0.103205284612)*x[1]**o + (-0.705171033348)*x[1]
        ref[(0, 2, 0)]=-0.125544858418*x_ref[0]**o + (-0.994150222958)*x_ref[0] + (-0.103205284612)*x_ref[1]**o + (-0.705171033348)*x_ref[1]
        arg[(0, 2, 1)]=-0.251662792119*x[0]**o + (-0.755231708128)*x[0] + (-0.00552024421247)*x[1]**o + (-0.360114313414)*x[1]
        ref[(0, 2, 1)]=-0.251662792119*x_ref[0]**o + (-0.755231708128)*x_ref[0] + (-0.00552024421247)*x_ref[1]**o + (-0.360114313414)*x_ref[1]
        arg[(0, 2, 2)]=-0.302256449995*x[0]**o + (0.0670814028013)*x[0] + (-0.986669657074)*x[1]**o + (0.877010298997)*x[1]
        ref[(0, 2, 2)]=-0.302256449995*x_ref[0]**o + (0.0670814028013)*x_ref[0] + (-0.986669657074)*x_ref[1]**o + (0.877010298997)*x_ref[1]
        arg[(1, 0, 0)]=0.0637339645773*x[0]**o + (-0.598180383754)*x[0] + (0.927699571106)*x[1]**o + (-0.998283811)*x[1]
        ref[(1, 0, 0)]=0.0637339645773*x_ref[0]**o + (-0.598180383754)*x_ref[0] + (0.927699571106)*x_ref[1]**o + (-0.998283811)*x_ref[1]
        arg[(1, 0, 1)]=-0.869532020757*x[0]**o + (0.592870307159)*x[0] + (-0.595098544923)*x[1]**o + (0.24739681912)*x[1]
        ref[(1, 0, 1)]=-0.869532020757*x_ref[0]**o + (0.592870307159)*x_ref[0] + (-0.595098544923)*x_ref[1]**o + (0.24739681912)*x_ref[1]
        arg[(1, 0, 2)]=0.232396753221*x[0]**o + (0.500780922019)*x[0] + (0.225886993137)*x[1]**o + (0.791930251635)*x[1]
        ref[(1, 0, 2)]=0.232396753221*x_ref[0]**o + (0.500780922019)*x_ref[0] + (0.225886993137)*x_ref[1]**o + (0.791930251635)*x_ref[1]
        arg[(1, 1, 0)]=0.483970504201*x[0]**o + (0.73182316421)*x[0] + (0.539255322245)*x[1]**o + (-0.525199021929)*x[1]
        ref[(1, 1, 0)]=0.483970504201*x_ref[0]**o + (0.73182316421)*x_ref[0] + (0.539255322245)*x_ref[1]**o + (-0.525199021929)*x_ref[1]
        arg[(1, 1, 1)]=-0.679194944218*x[0]**o + (0.749389280046)*x[0] + (-0.791208103959)*x[1]**o + (-0.857700750527)*x[1]
        ref[(1, 1, 1)]=-0.679194944218*x_ref[0]**o + (0.749389280046)*x_ref[0] + (-0.791208103959)*x_ref[1]**o + (-0.857700750527)*x_ref[1]
        arg[(1, 1, 2)]=0.04591626694*x[0]**o + (-0.21344491425)*x[0] + (-0.113217493315)*x[1]**o + (0.330931888619)*x[1]
        ref[(1, 1, 2)]=0.04591626694*x_ref[0]**o + (-0.21344491425)*x_ref[0] + (-0.113217493315)*x_ref[1]**o + (0.330931888619)*x_ref[1]
        arg[(1, 2, 0)]=-0.930054740891*x[0]**o + (0.318978239584)*x[0] + (-0.100087997473)*x[1]**o + (-0.0281821887486)*x[1]
        ref[(1, 2, 0)]=-0.930054740891*x_ref[0]**o + (0.318978239584)*x_ref[0] + (-0.100087997473)*x_ref[1]**o + (-0.0281821887486)*x_ref[1]
        arg[(1, 2, 1)]=0.493244016646*x[0]**o + (-0.964588607658)*x[0] + (0.0408579362572)*x[1]**o + (0.694116124548)*x[1]
        ref[(1, 2, 1)]=0.493244016646*x_ref[0]**o + (-0.964588607658)*x_ref[0] + (0.0408579362572)*x_ref[1]**o + (0.694116124548)*x_ref[1]
        arg[(1, 2, 2)]=-0.766230811185*x[0]**o + (-0.638186036839)*x[0] + (0.54197429726)*x[1]**o + (-0.509105244424)*x[1]
        ref[(1, 2, 2)]=-0.766230811185*x_ref[0]**o + (-0.638186036839)*x_ref[0] + (0.54197429726)*x_ref[1]**o + (-0.509105244424)*x_ref[1]
        arg[(2, 0, 0)]=0.817154147589*x[0]**o + (-0.613243951679)*x[0] + (-0.451404542398)*x[1]**o + (-0.629666127141)*x[1]
        ref[(2, 0, 0)]=0.817154147589*x_ref[0]**o + (-0.613243951679)*x_ref[0] + (-0.451404542398)*x_ref[1]**o + (-0.629666127141)*x_ref[1]
        arg[(2, 0, 1)]=0.419334942848*x[0]**o + (0.94700763663)*x[0] + (-0.19014144992)*x[1]**o + (-0.848272338476)*x[1]
        ref[(2, 0, 1)]=0.419334942848*x_ref[0]**o + (0.94700763663)*x_ref[0] + (-0.19014144992)*x_ref[1]**o + (-0.848272338476)*x_ref[1]
        arg[(2, 0, 2)]=0.132709863671*x[0]**o + (0.966075425354)*x[0] + (0.950355090091)*x[1]**o + (-0.487635572336)*x[1]
        ref[(2, 0, 2)]=0.132709863671*x_ref[0]**o + (0.966075425354)*x_ref[0] + (0.950355090091)*x_ref[1]**o + (-0.487635572336)*x_ref[1]
        arg[(2, 1, 0)]=-0.925278434803*x[0]**o + (-0.063599891605)*x[0] + (0.16077519826)*x[1]**o + (0.240445530795)*x[1]
        ref[(2, 1, 0)]=-0.925278434803*x_ref[0]**o + (-0.063599891605)*x_ref[0] + (0.16077519826)*x_ref[1]**o + (0.240445530795)*x_ref[1]
        arg[(2, 1, 1)]=0.580172472374*x[0]**o + (-0.492131701112)*x[0] + (-0.70784064322)*x[1]**o + (0.784269631079)*x[1]
        ref[(2, 1, 1)]=0.580172472374*x_ref[0]**o + (-0.492131701112)*x_ref[0] + (-0.70784064322)*x_ref[1]**o + (0.784269631079)*x_ref[1]
        arg[(2, 1, 2)]=-0.398133193826*x[0]**o + (0.188204516138)*x[0] + (0.183246225485)*x[1]**o + (-0.722433531209)*x[1]
        ref[(2, 1, 2)]=-0.398133193826*x_ref[0]**o + (0.188204516138)*x_ref[0] + (0.183246225485)*x_ref[1]**o + (-0.722433531209)*x_ref[1]
        arg[(2, 2, 0)]=0.624411859651*x[0]**o + (0.950130839395)*x[0] + (0.297980846822)*x[1]**o + (0.182055824778)*x[1]
        ref[(2, 2, 0)]=0.624411859651*x_ref[0]**o + (0.950130839395)*x_ref[0] + (0.297980846822)*x_ref[1]**o + (0.182055824778)*x_ref[1]
        arg[(2, 2, 1)]=0.730688782803*x[0]**o + (-0.00212278703963)*x[0] + (-0.590154018486)*x[1]**o + (0.650298362868)*x[1]
        ref[(2, 2, 1)]=0.730688782803*x_ref[0]**o + (-0.00212278703963)*x_ref[0] + (-0.590154018486)*x_ref[1]**o + (0.650298362868)*x_ref[1]
        arg[(2, 2, 2)]=0.695776099862*x[0]**o + (0.640301517473)*x[0] + (0.920669469431)*x[1]**o + (-0.399942391986)*x[1]
        ref[(2, 2, 2)]=0.695776099862*x_ref[0]**o + (0.640301517473)*x_ref[0] + (0.920669469431)*x_ref[1]**o + (-0.399942391986)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.391703322504*x[2]**o + (-0.604589345635)*x[2]
            ref[(0, 0, 0)]+=-0.391703322504*x_ref[2]**o + (-0.604589345635)*x_ref[2]
            arg[(0, 0, 1)]+=0.857081619768*x[2]**o + (0.312086409831)*x[2]
            ref[(0, 0, 1)]+=0.857081619768*x_ref[2]**o + (0.312086409831)*x_ref[2]
            arg[(0, 0, 2)]+=0.250996440434*x[2]**o + (0.309422440642)*x[2]
            ref[(0, 0, 2)]+=0.250996440434*x_ref[2]**o + (0.309422440642)*x_ref[2]
            arg[(0, 1, 0)]+=0.583782050518*x[2]**o + (-0.880017429269)*x[2]
            ref[(0, 1, 0)]+=0.583782050518*x_ref[2]**o + (-0.880017429269)*x_ref[2]
            arg[(0, 1, 1)]+=0.0494860055995*x[2]**o + (-0.262820834673)*x[2]
            ref[(0, 1, 1)]+=0.0494860055995*x_ref[2]**o + (-0.262820834673)*x_ref[2]
            arg[(0, 1, 2)]+=-0.25128597897*x[2]**o + (0.915616914552)*x[2]
            ref[(0, 1, 2)]+=-0.25128597897*x_ref[2]**o + (0.915616914552)*x_ref[2]
            arg[(0, 2, 0)]+=0.763052698398*x[2]**o + (-0.184670042804)*x[2]
            ref[(0, 2, 0)]+=0.763052698398*x_ref[2]**o + (-0.184670042804)*x_ref[2]
            arg[(0, 2, 1)]+=0.567049671762*x[2]**o + (-0.0609642405173)*x[2]
            ref[(0, 2, 1)]+=0.567049671762*x_ref[2]**o + (-0.0609642405173)*x_ref[2]
            arg[(0, 2, 2)]+=-0.822244908559*x[2]**o + (-0.870546497508)*x[2]
            ref[(0, 2, 2)]+=-0.822244908559*x_ref[2]**o + (-0.870546497508)*x_ref[2]
            arg[(1, 0, 0)]+=0.356313882107*x[2]**o + (-0.452006434768)*x[2]
            ref[(1, 0, 0)]+=0.356313882107*x_ref[2]**o + (-0.452006434768)*x_ref[2]
            arg[(1, 0, 1)]+=0.909919876129*x[2]**o + (-0.626900512848)*x[2]
            ref[(1, 0, 1)]+=0.909919876129*x_ref[2]**o + (-0.626900512848)*x_ref[2]
            arg[(1, 0, 2)]+=0.366959224639*x[2]**o + (0.305977295124)*x[2]
            ref[(1, 0, 2)]+=0.366959224639*x_ref[2]**o + (0.305977295124)*x_ref[2]
            arg[(1, 1, 0)]+=0.478709055411*x[2]**o + (-0.286365526821)*x[2]
            ref[(1, 1, 0)]+=0.478709055411*x_ref[2]**o + (-0.286365526821)*x_ref[2]
            arg[(1, 1, 1)]+=-0.779229553919*x[2]**o + (0.259100123412)*x[2]
            ref[(1, 1, 1)]+=-0.779229553919*x_ref[2]**o + (0.259100123412)*x_ref[2]
            arg[(1, 1, 2)]+=0.157850404396*x[2]**o + (0.134971088297)*x[2]
            ref[(1, 1, 2)]+=0.157850404396*x_ref[2]**o + (0.134971088297)*x_ref[2]
            arg[(1, 2, 0)]+=0.206669465821*x[2]**o + (0.139279971478)*x[2]
            ref[(1, 2, 0)]+=0.206669465821*x_ref[2]**o + (0.139279971478)*x_ref[2]
            arg[(1, 2, 1)]+=-0.227621269177*x[2]**o + (0.179447513775)*x[2]
            ref[(1, 2, 1)]+=-0.227621269177*x_ref[2]**o + (0.179447513775)*x_ref[2]
            arg[(1, 2, 2)]+=0.308642897542*x[2]**o + (-0.453706521122)*x[2]
            ref[(1, 2, 2)]+=0.308642897542*x_ref[2]**o + (-0.453706521122)*x_ref[2]
            arg[(2, 0, 0)]+=0.292302937564*x[2]**o + (-0.168729853319)*x[2]
            ref[(2, 0, 0)]+=0.292302937564*x_ref[2]**o + (-0.168729853319)*x_ref[2]
            arg[(2, 0, 1)]+=-0.0132751859233*x[2]**o + (0.855984026591)*x[2]
            ref[(2, 0, 1)]+=-0.0132751859233*x_ref[2]**o + (0.855984026591)*x_ref[2]
            arg[(2, 0, 2)]+=-0.287922545269*x[2]**o + (0.0540766144417)*x[2]
            ref[(2, 0, 2)]+=-0.287922545269*x_ref[2]**o + (0.0540766144417)*x_ref[2]
            arg[(2, 1, 0)]+=-0.417913814793*x[2]**o + (0.413915918508)*x[2]
            ref[(2, 1, 0)]+=-0.417913814793*x_ref[2]**o + (0.413915918508)*x_ref[2]
            arg[(2, 1, 1)]+=0.201135274079*x[2]**o + (0.0463863756525)*x[2]
            ref[(2, 1, 1)]+=0.201135274079*x_ref[2]**o + (0.0463863756525)*x_ref[2]
            arg[(2, 1, 2)]+=0.0238418328929*x[2]**o + (-0.117350506498)*x[2]
            ref[(2, 1, 2)]+=0.0238418328929*x_ref[2]**o + (-0.117350506498)*x_ref[2]
            arg[(2, 2, 0)]+=-0.976790062517*x[2]**o + (-0.535534084457)*x[2]
            ref[(2, 2, 0)]+=-0.976790062517*x_ref[2]**o + (-0.535534084457)*x_ref[2]
            arg[(2, 2, 1)]+=0.758425091197*x[2]**o + (-0.717645413934)*x[2]
            ref[(2, 2, 1)]+=0.758425091197*x_ref[2]**o + (-0.717645413934)*x_ref[2]
            arg[(2, 2, 2)]+=-0.467230005129*x[2]**o + (0.741392088429)*x[2]
            ref[(2, 2, 2)]+=-0.467230005129*x_ref[2]**o + (0.741392088429)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedSolution

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 3, 2),w)
        ref = Data(0,(2, 2, 3, 2),w_ref)
        arg[(0, 0, 0, 0)]=0.91640819205*x[0]**o + (0.215434872556)*x[0] + (0.733776716312)*x[1]**o + (-0.0747050851868)*x[1]
        ref[(0, 0, 0, 0)]=0.91640819205*x_ref[0]**o + (0.215434872556)*x_ref[0] + (0.733776716312)*x_ref[1]**o + (-0.0747050851868)*x_ref[1]
        arg[(0, 0, 0, 1)]=-0.102993523837*x[0]**o + (0.865745001962)*x[0] + (0.219229794737)*x[1]**o + (0.324424103111)*x[1]
        ref[(0, 0, 0, 1)]=-0.102993523837*x_ref[0]**o + (0.865745001962)*x_ref[0] + (0.219229794737)*x_ref[1]**o + (0.324424103111)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.460331811701*x[0]**o + (0.0493186261371)*x[0] + (-0.729006250545)*x[1]**o + (0.48979134701)*x[1]
        ref[(0, 0, 1, 0)]=-0.460331811701*x_ref[0]**o + (0.0493186261371)*x_ref[0] + (-0.729006250545)*x_ref[1]**o + (0.48979134701)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.211342242159*x[0]**o + (0.109509666312)*x[0] + (-0.702835151984)*x[1]**o + (-0.0161156277758)*x[1]
        ref[(0, 0, 1, 1)]=0.211342242159*x_ref[0]**o + (0.109509666312)*x_ref[0] + (-0.702835151984)*x_ref[1]**o + (-0.0161156277758)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.458159837862*x[0]**o + (-0.031450624425)*x[0] + (0.573366900422)*x[1]**o + (-0.959502013064)*x[1]
        ref[(0, 0, 2, 0)]=-0.458159837862*x_ref[0]**o + (-0.031450624425)*x_ref[0] + (0.573366900422)*x_ref[1]**o + (-0.959502013064)*x_ref[1]
        arg[(0, 0, 2, 1)]=0.370746050651*x[0]**o + (0.0226010807303)*x[0] + (-0.0512766805494)*x[1]**o + (0.777023192213)*x[1]
        ref[(0, 0, 2, 1)]=0.370746050651*x_ref[0]**o + (0.0226010807303)*x_ref[0] + (-0.0512766805494)*x_ref[1]**o + (0.777023192213)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.31309491391*x[0]**o + (0.634723618536)*x[0] + (0.966112516611)*x[1]**o + (0.0700405118504)*x[1]
        ref[(0, 1, 0, 0)]=-0.31309491391*x_ref[0]**o + (0.634723618536)*x_ref[0] + (0.966112516611)*x_ref[1]**o + (0.0700405118504)*x_ref[1]
        arg[(0, 1, 0, 1)]=-0.932573524874*x[0]**o + (-0.824504470334)*x[0] + (0.326529872373)*x[1]**o + (-0.99478594286)*x[1]
        ref[(0, 1, 0, 1)]=-0.932573524874*x_ref[0]**o + (-0.824504470334)*x_ref[0] + (0.326529872373)*x_ref[1]**o + (-0.99478594286)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.483918660693*x[0]**o + (-0.828244645181)*x[0] + (0.453408739178)*x[1]**o + (-0.80395572859)*x[1]
        ref[(0, 1, 1, 0)]=-0.483918660693*x_ref[0]**o + (-0.828244645181)*x_ref[0] + (0.453408739178)*x_ref[1]**o + (-0.80395572859)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.297193544989*x[0]**o + (-0.525637572574)*x[0] + (0.446816516369)*x[1]**o + (-0.391986524471)*x[1]
        ref[(0, 1, 1, 1)]=-0.297193544989*x_ref[0]**o + (-0.525637572574)*x_ref[0] + (0.446816516369)*x_ref[1]**o + (-0.391986524471)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.657931485218*x[0]**o + (0.940275884578)*x[0] + (0.593857376859)*x[1]**o + (-0.405242941213)*x[1]
        ref[(0, 1, 2, 0)]=-0.657931485218*x_ref[0]**o + (0.940275884578)*x_ref[0] + (0.593857376859)*x_ref[1]**o + (-0.405242941213)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.889415012373*x[0]**o + (-0.397419076787)*x[0] + (0.601832331052)*x[1]**o + (0.331750521497)*x[1]
        ref[(0, 1, 2, 1)]=0.889415012373*x_ref[0]**o + (-0.397419076787)*x_ref[0] + (0.601832331052)*x_ref[1]**o + (0.331750521497)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.677165774363*x[0]**o + (-0.373063199031)*x[0] + (0.753088834489)*x[1]**o + (0.822047736071)*x[1]
        ref[(1, 0, 0, 0)]=-0.677165774363*x_ref[0]**o + (-0.373063199031)*x_ref[0] + (0.753088834489)*x_ref[1]**o + (0.822047736071)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.929759516075*x[0]**o + (-0.835024732246)*x[0] + (0.967747935595)*x[1]**o + (0.941952793666)*x[1]
        ref[(1, 0, 0, 1)]=0.929759516075*x_ref[0]**o + (-0.835024732246)*x_ref[0] + (0.967747935595)*x_ref[1]**o + (0.941952793666)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.949879415833*x[0]**o + (0.305664186956)*x[0] + (-0.403398746782)*x[1]**o + (0.27042828586)*x[1]
        ref[(1, 0, 1, 0)]=-0.949879415833*x_ref[0]**o + (0.305664186956)*x_ref[0] + (-0.403398746782)*x_ref[1]**o + (0.27042828586)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.947655918268*x[0]**o + (0.000909221729522)*x[0] + (-0.608729601352)*x[1]**o + (-0.807021305271)*x[1]
        ref[(1, 0, 1, 1)]=0.947655918268*x_ref[0]**o + (0.000909221729522)*x_ref[0] + (-0.608729601352)*x_ref[1]**o + (-0.807021305271)*x_ref[1]
        arg[(1, 0, 2, 0)]=0.131991960594*x[0]**o + (0.877153917771)*x[0] + (-0.00703251353667)*x[1]**o + (-0.99002071054)*x[1]
        ref[(1, 0, 2, 0)]=0.131991960594*x_ref[0]**o + (0.877153917771)*x_ref[0] + (-0.00703251353667)*x_ref[1]**o + (-0.99002071054)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.389268048188*x[0]**o + (-0.0809611329837)*x[0] + (0.680794463813)*x[1]**o + (0.779464738348)*x[1]
        ref[(1, 0, 2, 1)]=0.389268048188*x_ref[0]**o + (-0.0809611329837)*x_ref[0] + (0.680794463813)*x_ref[1]**o + (0.779464738348)*x_ref[1]
        arg[(1, 1, 0, 0)]=0.57942657995*x[0]**o + (-0.524569306294)*x[0] + (-0.263748678486)*x[1]**o + (0.33846601202)*x[1]
        ref[(1, 1, 0, 0)]=0.57942657995*x_ref[0]**o + (-0.524569306294)*x_ref[0] + (-0.263748678486)*x_ref[1]**o + (0.33846601202)*x_ref[1]
        arg[(1, 1, 0, 1)]=-0.439644523052*x[0]**o + (-0.0250854592353)*x[0] + (0.478699808085)*x[1]**o + (0.152617480345)*x[1]
        ref[(1, 1, 0, 1)]=-0.439644523052*x_ref[0]**o + (-0.0250854592353)*x_ref[0] + (0.478699808085)*x_ref[1]**o + (0.152617480345)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.996967183772*x[0]**o + (-0.649969058393)*x[0] + (0.574281643214)*x[1]**o + (-0.92179151654)*x[1]
        ref[(1, 1, 1, 0)]=0.996967183772*x_ref[0]**o + (-0.649969058393)*x_ref[0] + (0.574281643214)*x_ref[1]**o + (-0.92179151654)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.434590859389*x[0]**o + (-0.22461153986)*x[0] + (0.122972451814)*x[1]**o + (0.0128844765431)*x[1]
        ref[(1, 1, 1, 1)]=-0.434590859389*x_ref[0]**o + (-0.22461153986)*x_ref[0] + (0.122972451814)*x_ref[1]**o + (0.0128844765431)*x_ref[1]
        arg[(1, 1, 2, 0)]=0.352403363338*x[0]**o + (0.986424520031)*x[0] + (0.405426808052)*x[1]**o + (0.41744006638)*x[1]
        ref[(1, 1, 2, 0)]=0.352403363338*x_ref[0]**o + (0.986424520031)*x_ref[0] + (0.405426808052)*x_ref[1]**o + (0.41744006638)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.148887586638*x[0]**o + (-0.299514019228)*x[0] + (-0.670558295083)*x[1]**o + (0.252929225729)*x[1]
        ref[(1, 1, 2, 1)]=-0.148887586638*x_ref[0]**o + (-0.299514019228)*x_ref[0] + (-0.670558295083)*x_ref[1]**o + (0.252929225729)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.0841996608325*x[2]**o + (-0.193839439278)*x[2]
            ref[(0, 0, 0, 0)]+=-0.0841996608325*x_ref[2]**o + (-0.193839439278)*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.291367136557*x[2]**o + (0.948727138088)*x[2]
            ref[(0, 0, 0, 1)]+=-0.291367136557*x_ref[2]**o + (0.948727138088)*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.224039220934*x[2]**o + (-0.214470870253)*x[2]
            ref[(0, 0, 1, 0)]+=0.224039220934*x_ref[2]**o + (-0.214470870253)*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.999770014097*x[2]**o + (-0.617367584123)*x[2]
            ref[(0, 0, 1, 1)]+=-0.999770014097*x_ref[2]**o + (-0.617367584123)*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.83707128569*x[2]**o + (0.0450365626193)*x[2]
            ref[(0, 0, 2, 0)]+=-0.83707128569*x_ref[2]**o + (0.0450365626193)*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.41939522936*x[2]**o + (0.164038626149)*x[2]
            ref[(0, 0, 2, 1)]+=0.41939522936*x_ref[2]**o + (0.164038626149)*x_ref[2]
            arg[(0, 1, 0, 0)]+=0.493716902118*x[2]**o + (0.583903086422)*x[2]
            ref[(0, 1, 0, 0)]+=0.493716902118*x_ref[2]**o + (0.583903086422)*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.0891866518462*x[2]**o + (-0.396559819516)*x[2]
            ref[(0, 1, 0, 1)]+=-0.0891866518462*x_ref[2]**o + (-0.396559819516)*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.728499317661*x[2]**o + (-0.377817579175)*x[2]
            ref[(0, 1, 1, 0)]+=0.728499317661*x_ref[2]**o + (-0.377817579175)*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.929448480324*x[2]**o + (0.703037708781)*x[2]
            ref[(0, 1, 1, 1)]+=-0.929448480324*x_ref[2]**o + (0.703037708781)*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.276194977341*x[2]**o + (0.923054722856)*x[2]
            ref[(0, 1, 2, 0)]+=-0.276194977341*x_ref[2]**o + (0.923054722856)*x_ref[2]
            arg[(0, 1, 2, 1)]+=-0.475157420579*x[2]**o + (0.617419844385)*x[2]
            ref[(0, 1, 2, 1)]+=-0.475157420579*x_ref[2]**o + (0.617419844385)*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.720046977963*x[2]**o + (0.577534765042)*x[2]
            ref[(1, 0, 0, 0)]+=-0.720046977963*x_ref[2]**o + (0.577534765042)*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.261424098581*x[2]**o + (0.810808952822)*x[2]
            ref[(1, 0, 0, 1)]+=-0.261424098581*x_ref[2]**o + (0.810808952822)*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.538914043683*x[2]**o + (0.329658542247)*x[2]
            ref[(1, 0, 1, 0)]+=-0.538914043683*x_ref[2]**o + (0.329658542247)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.106160994354*x[2]**o + (-0.208892829532)*x[2]
            ref[(1, 0, 1, 1)]+=-0.106160994354*x_ref[2]**o + (-0.208892829532)*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.917280553887*x[2]**o + (-0.332424616919)*x[2]
            ref[(1, 0, 2, 0)]+=-0.917280553887*x_ref[2]**o + (-0.332424616919)*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.413771105531*x[2]**o + (0.11939902132)*x[2]
            ref[(1, 0, 2, 1)]+=0.413771105531*x_ref[2]**o + (0.11939902132)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.586856869727*x[2]**o + (-0.0272193682724)*x[2]
            ref[(1, 1, 0, 0)]+=0.586856869727*x_ref[2]**o + (-0.0272193682724)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.453639670216*x[2]**o + (-0.0901891560676)*x[2]
            ref[(1, 1, 0, 1)]+=0.453639670216*x_ref[2]**o + (-0.0901891560676)*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.533903774655*x[2]**o + (0.282068417271)*x[2]
            ref[(1, 1, 1, 0)]+=-0.533903774655*x_ref[2]**o + (0.282068417271)*x_ref[2]
            arg[(1, 1, 1, 1)]+=-0.114559859286*x[2]**o + (0.886156093912)*x[2]
            ref[(1, 1, 1, 1)]+=-0.114559859286*x_ref[2]**o + (0.886156093912)*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.218736452171*x[2]**o + (0.450715845465)*x[2]
            ref[(1, 1, 2, 0)]+=-0.218736452171*x_ref[2]**o + (0.450715845465)*x_ref[2]
            arg[(1, 1, 2, 1)]+=-0.0664767165792*x[2]**o + (0.607039752965)*x[2]
            ref[(1, 1, 2, 1)]+=-0.0664767165792*x_ref[2]**o + (0.607039752965)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedSolution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.229521524864*x[0]**o + (-0.658894069806)*x[0] + (0.366690206055)*x[1]**o + (0.725813613996)*x[1]
        ref=0.229521524864*x_ref[0]**o + (-0.658894069806)*x_ref[0] + (0.366690206055)*x_ref[1]**o + (0.725813613996)*x_ref[1]
        if dim==3:
            arg+=(0.892939705971)*x[2]**o + (0.532756576087)*x[2]
            ref+=(0.892939705971)*x_ref[2]**o + (0.532756576087)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedSolution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=0.30498969699*x[0]**o + (0.292791410601)*x[0] + (-0.94306046968)*x[1]**o + (-0.144719030513)*x[1]
        ref[(0,)]=0.30498969699*x_ref[0]**o + (0.292791410601)*x_ref[0] + (-0.94306046968)*x_ref[1]**o + (-0.144719030513)*x_ref[1]
        arg[(1,)]=-0.690753614222*x[0]**o + (-0.294188650607)*x[0] + (-0.311869279705)*x[1]**o + (0.134209921354)*x[1]
        ref[(1,)]=-0.690753614222*x_ref[0]**o + (-0.294188650607)*x_ref[0] + (-0.311869279705)*x_ref[1]**o + (0.134209921354)*x_ref[1]
        arg[(2,)]=0.623697364139*x[0]**o + (-0.0580995794245)*x[0] + (-0.140943776334)*x[1]**o + (0.505008392338)*x[1]
        ref[(2,)]=0.623697364139*x_ref[0]**o + (-0.0580995794245)*x_ref[0] + (-0.140943776334)*x_ref[1]**o + (0.505008392338)*x_ref[1]
        arg[(3,)]=0.526324510239*x[0]**o + (-0.633948435587)*x[0] + (-0.616778211732)*x[1]**o + (0.325551353581)*x[1]
        ref[(3,)]=0.526324510239*x_ref[0]**o + (-0.633948435587)*x_ref[0] + (-0.616778211732)*x_ref[1]**o + (0.325551353581)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.474166674608*x[2]**o + (-0.409863773168)*x[2]
            ref[(0,)]+=-0.474166674608*x_ref[2]**o + (-0.409863773168)*x_ref[2]
            arg[(1,)]+=0.469736963188*x[2]**o + (-0.954846121093)*x[2]
            ref[(1,)]+=0.469736963188*x_ref[2]**o + (-0.954846121093)*x_ref[2]
            arg[(2,)]+=-0.735921883298*x[2]**o + (-0.130751335249)*x[2]
            ref[(2,)]+=-0.735921883298*x_ref[2]**o + (-0.130751335249)*x_ref[2]
            arg[(3,)]+=0.0698963353204*x[2]**o + (0.749889288849)*x[2]
            ref[(3,)]+=0.0698963353204*x_ref[2]**o + (0.749889288849)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedSolution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2),w)
        ref = Data(0,(3, 2),w_ref)
        arg[(0, 0)]=-0.0545972766312*x[0]**o + (-0.717152773697)*x[0] + (-0.888044603449)*x[1]**o + (-0.0228838662369)*x[1]
        ref[(0, 0)]=-0.0545972766312*x_ref[0]**o + (-0.717152773697)*x_ref[0] + (-0.888044603449)*x_ref[1]**o + (-0.0228838662369)*x_ref[1]
        arg[(0, 1)]=-0.111519608763*x[0]**o + (-0.332305540549)*x[0] + (0.0473048170059)*x[1]**o + (-0.699825575851)*x[1]
        ref[(0, 1)]=-0.111519608763*x_ref[0]**o + (-0.332305540549)*x_ref[0] + (0.0473048170059)*x_ref[1]**o + (-0.699825575851)*x_ref[1]
        arg[(1, 0)]=-0.0660644897544*x[0]**o + (-0.809356663774)*x[0] + (0.681283210462)*x[1]**o + (0.321293223906)*x[1]
        ref[(1, 0)]=-0.0660644897544*x_ref[0]**o + (-0.809356663774)*x_ref[0] + (0.681283210462)*x_ref[1]**o + (0.321293223906)*x_ref[1]
        arg[(1, 1)]=0.902507978678*x[0]**o + (-0.811354837802)*x[0] + (0.78296335701)*x[1]**o + (0.687450971134)*x[1]
        ref[(1, 1)]=0.902507978678*x_ref[0]**o + (-0.811354837802)*x_ref[0] + (0.78296335701)*x_ref[1]**o + (0.687450971134)*x_ref[1]
        arg[(2, 0)]=-0.288488239445*x[0]**o + (-0.0932617998688)*x[0] + (-0.00977877259988)*x[1]**o + (-0.0649264361719)*x[1]
        ref[(2, 0)]=-0.288488239445*x_ref[0]**o + (-0.0932617998688)*x_ref[0] + (-0.00977877259988)*x_ref[1]**o + (-0.0649264361719)*x_ref[1]
        arg[(2, 1)]=-0.190322087748*x[0]**o + (-0.848650215735)*x[0] + (-0.108705903497)*x[1]**o + (0.213609562917)*x[1]
        ref[(2, 1)]=-0.190322087748*x_ref[0]**o + (-0.848650215735)*x_ref[0] + (-0.108705903497)*x_ref[1]**o + (0.213609562917)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.505219681754*x[2]**o + (0.676966462967)*x[2]
            ref[(0, 0)]+=0.505219681754*x_ref[2]**o + (0.676966462967)*x_ref[2]
            arg[(0, 1)]+=0.021808398458*x[2]**o + (0.0483310029626)*x[2]
            ref[(0, 1)]+=0.021808398458*x_ref[2]**o + (0.0483310029626)*x_ref[2]
            arg[(1, 0)]+=0.0838659921824*x[2]**o + (0.491349362833)*x[2]
            ref[(1, 0)]+=0.0838659921824*x_ref[2]**o + (0.491349362833)*x_ref[2]
            arg[(1, 1)]+=-0.815976917621*x[2]**o + (-0.676820833574)*x[2]
            ref[(1, 1)]+=-0.815976917621*x_ref[2]**o + (-0.676820833574)*x_ref[2]
            arg[(2, 0)]+=-0.386591411543*x[2]**o + (0.652759065822)*x[2]
            ref[(2, 0)]+=-0.386591411543*x_ref[2]**o + (0.652759065822)*x_ref[2]
            arg[(2, 1)]+=0.320943080448*x[2]**o + (0.0157677624937)*x[2]
            ref[(2, 1)]+=0.320943080448*x_ref[2]**o + (0.0157677624937)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedSolution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 2),w)
        ref = Data(0,(2, 2, 2),w_ref)
        arg[(0, 0, 0)]=0.933728527772*x[0]**o + (0.201413157108)*x[0] + (-0.160400047964)*x[1]**o + (0.543925937252)*x[1]
        ref[(0, 0, 0)]=0.933728527772*x_ref[0]**o + (0.201413157108)*x_ref[0] + (-0.160400047964)*x_ref[1]**o + (0.543925937252)*x_ref[1]
        arg[(0, 0, 1)]=0.313725831183*x[0]**o + (-0.647027758473)*x[0] + (-0.629839931605)*x[1]**o + (-0.111195622404)*x[1]
        ref[(0, 0, 1)]=0.313725831183*x_ref[0]**o + (-0.647027758473)*x_ref[0] + (-0.629839931605)*x_ref[1]**o + (-0.111195622404)*x_ref[1]
        arg[(0, 1, 0)]=0.0145570582943*x[0]**o + (-0.874658664881)*x[0] + (0.314478251152)*x[1]**o + (0.0485000605032)*x[1]
        ref[(0, 1, 0)]=0.0145570582943*x_ref[0]**o + (-0.874658664881)*x_ref[0] + (0.314478251152)*x_ref[1]**o + (0.0485000605032)*x_ref[1]
        arg[(0, 1, 1)]=-0.665104712786*x[0]**o + (0.844719882124)*x[0] + (-0.478488059084)*x[1]**o + (0.153330714319)*x[1]
        ref[(0, 1, 1)]=-0.665104712786*x_ref[0]**o + (0.844719882124)*x_ref[0] + (-0.478488059084)*x_ref[1]**o + (0.153330714319)*x_ref[1]
        arg[(1, 0, 0)]=-0.275683140181*x[0]**o + (0.262992917051)*x[0] + (0.25410394444)*x[1]**o + (-0.0989564411888)*x[1]
        ref[(1, 0, 0)]=-0.275683140181*x_ref[0]**o + (0.262992917051)*x_ref[0] + (0.25410394444)*x_ref[1]**o + (-0.0989564411888)*x_ref[1]
        arg[(1, 0, 1)]=0.649165915015*x[0]**o + (0.766981713532)*x[0] + (0.910302011827)*x[1]**o + (-0.0317553282085)*x[1]
        ref[(1, 0, 1)]=0.649165915015*x_ref[0]**o + (0.766981713532)*x_ref[0] + (0.910302011827)*x_ref[1]**o + (-0.0317553282085)*x_ref[1]
        arg[(1, 1, 0)]=0.504384011843*x[0]**o + (-0.530215631638)*x[0] + (0.313224059566)*x[1]**o + (0.148589339392)*x[1]
        ref[(1, 1, 0)]=0.504384011843*x_ref[0]**o + (-0.530215631638)*x_ref[0] + (0.313224059566)*x_ref[1]**o + (0.148589339392)*x_ref[1]
        arg[(1, 1, 1)]=-0.506774675464*x[0]**o + (-0.72916056267)*x[0] + (0.594297498878)*x[1]**o + (0.303352517226)*x[1]
        ref[(1, 1, 1)]=-0.506774675464*x_ref[0]**o + (-0.72916056267)*x_ref[0] + (0.594297498878)*x_ref[1]**o + (0.303352517226)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.392414786949*x[2]**o + (0.621471085049)*x[2]
            ref[(0, 0, 0)]+=0.392414786949*x_ref[2]**o + (0.621471085049)*x_ref[2]
            arg[(0, 0, 1)]+=-0.198901534873*x[2]**o + (-0.578133706675)*x[2]
            ref[(0, 0, 1)]+=-0.198901534873*x_ref[2]**o + (-0.578133706675)*x_ref[2]
            arg[(0, 1, 0)]+=-0.590388390106*x[2]**o + (0.4946582539)*x[2]
            ref[(0, 1, 0)]+=-0.590388390106*x_ref[2]**o + (0.4946582539)*x_ref[2]
            arg[(0, 1, 1)]+=-0.744982347077*x[2]**o + (0.275534145982)*x[2]
            ref[(0, 1, 1)]+=-0.744982347077*x_ref[2]**o + (0.275534145982)*x_ref[2]
            arg[(1, 0, 0)]+=0.710138010958*x[2]**o + (-0.568939065768)*x[2]
            ref[(1, 0, 0)]+=0.710138010958*x_ref[2]**o + (-0.568939065768)*x_ref[2]
            arg[(1, 0, 1)]+=-0.85128367036*x[2]**o + (-0.399468714796)*x[2]
            ref[(1, 0, 1)]+=-0.85128367036*x_ref[2]**o + (-0.399468714796)*x_ref[2]
            arg[(1, 1, 0)]+=0.481252905983*x[2]**o + (-0.327307381274)*x[2]
            ref[(1, 1, 0)]+=0.481252905983*x_ref[2]**o + (-0.327307381274)*x_ref[2]
            arg[(1, 1, 1)]+=0.0543242500047*x[2]**o + (0.878415329344)*x[2]
            ref[(1, 1, 1)]+=0.0543242500047*x_ref[2]**o + (0.878415329344)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedSolution

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 4, 4),w)
        ref = Data(0,(2, 2, 4, 4),w_ref)
        arg[(0, 0, 0, 0)]=-0.539589303421*x[0]**o + (-0.788991443618)*x[0] + (0.52022533349)*x[1]**o + (-0.684820242308)*x[1]
        ref[(0, 0, 0, 0)]=-0.539589303421*x_ref[0]**o + (-0.788991443618)*x_ref[0] + (0.52022533349)*x_ref[1]**o + (-0.684820242308)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.666980534124*x[0]**o + (-0.0800959883932)*x[0] + (-0.455753970262)*x[1]**o + (-0.315615522175)*x[1]
        ref[(0, 0, 0, 1)]=0.666980534124*x_ref[0]**o + (-0.0800959883932)*x_ref[0] + (-0.455753970262)*x_ref[1]**o + (-0.315615522175)*x_ref[1]
        arg[(0, 0, 0, 2)]=-0.584735031747*x[0]**o + (-0.215794451255)*x[0] + (0.592607807061)*x[1]**o + (-0.13702740081)*x[1]
        ref[(0, 0, 0, 2)]=-0.584735031747*x_ref[0]**o + (-0.215794451255)*x_ref[0] + (0.592607807061)*x_ref[1]**o + (-0.13702740081)*x_ref[1]
        arg[(0, 0, 0, 3)]=-0.177689988964*x[0]**o + (-0.0587428684922)*x[0] + (-0.78894131795)*x[1]**o + (0.659130138769)*x[1]
        ref[(0, 0, 0, 3)]=-0.177689988964*x_ref[0]**o + (-0.0587428684922)*x_ref[0] + (-0.78894131795)*x_ref[1]**o + (0.659130138769)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.898792780781*x[0]**o + (-0.367990534635)*x[0] + (0.594775554219)*x[1]**o + (0.92394356521)*x[1]
        ref[(0, 0, 1, 0)]=0.898792780781*x_ref[0]**o + (-0.367990534635)*x_ref[0] + (0.594775554219)*x_ref[1]**o + (0.92394356521)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.966927673329*x[0]**o + (0.80882732541)*x[0] + (-0.573079427499)*x[1]**o + (0.388350238528)*x[1]
        ref[(0, 0, 1, 1)]=0.966927673329*x_ref[0]**o + (0.80882732541)*x_ref[0] + (-0.573079427499)*x_ref[1]**o + (0.388350238528)*x_ref[1]
        arg[(0, 0, 1, 2)]=0.012431743976*x[0]**o + (0.574326696879)*x[0] + (-0.137469331752)*x[1]**o + (-0.166312077527)*x[1]
        ref[(0, 0, 1, 2)]=0.012431743976*x_ref[0]**o + (0.574326696879)*x_ref[0] + (-0.137469331752)*x_ref[1]**o + (-0.166312077527)*x_ref[1]
        arg[(0, 0, 1, 3)]=-0.00243464326396*x[0]**o + (0.894993981171)*x[0] + (0.657181642864)*x[1]**o + (0.512617543543)*x[1]
        ref[(0, 0, 1, 3)]=-0.00243464326396*x_ref[0]**o + (0.894993981171)*x_ref[0] + (0.657181642864)*x_ref[1]**o + (0.512617543543)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.408610252396*x[0]**o + (0.0579437083136)*x[0] + (-0.198988160984)*x[1]**o + (0.856422811098)*x[1]
        ref[(0, 0, 2, 0)]=-0.408610252396*x_ref[0]**o + (0.0579437083136)*x_ref[0] + (-0.198988160984)*x_ref[1]**o + (0.856422811098)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.454263894086*x[0]**o + (0.668243399496)*x[0] + (0.484266157456)*x[1]**o + (0.603064171063)*x[1]
        ref[(0, 0, 2, 1)]=-0.454263894086*x_ref[0]**o + (0.668243399496)*x_ref[0] + (0.484266157456)*x_ref[1]**o + (0.603064171063)*x_ref[1]
        arg[(0, 0, 2, 2)]=0.44154832626*x[0]**o + (0.888939001301)*x[0] + (-0.133152745419)*x[1]**o + (0.486158250414)*x[1]
        ref[(0, 0, 2, 2)]=0.44154832626*x_ref[0]**o + (0.888939001301)*x_ref[0] + (-0.133152745419)*x_ref[1]**o + (0.486158250414)*x_ref[1]
        arg[(0, 0, 2, 3)]=-0.333620837548*x[0]**o + (0.655999619376)*x[0] + (0.110425782547)*x[1]**o + (-0.502954074917)*x[1]
        ref[(0, 0, 2, 3)]=-0.333620837548*x_ref[0]**o + (0.655999619376)*x_ref[0] + (0.110425782547)*x_ref[1]**o + (-0.502954074917)*x_ref[1]
        arg[(0, 0, 3, 0)]=0.127867657717*x[0]**o + (0.802195303736)*x[0] + (0.78365441036)*x[1]**o + (0.895094986882)*x[1]
        ref[(0, 0, 3, 0)]=0.127867657717*x_ref[0]**o + (0.802195303736)*x_ref[0] + (0.78365441036)*x_ref[1]**o + (0.895094986882)*x_ref[1]
        arg[(0, 0, 3, 1)]=0.225046471937*x[0]**o + (0.266687459931)*x[0] + (0.75332203841)*x[1]**o + (-0.719991255219)*x[1]
        ref[(0, 0, 3, 1)]=0.225046471937*x_ref[0]**o + (0.266687459931)*x_ref[0] + (0.75332203841)*x_ref[1]**o + (-0.719991255219)*x_ref[1]
        arg[(0, 0, 3, 2)]=-0.451831653273*x[0]**o + (-0.265186899518)*x[0] + (-0.0160937686084)*x[1]**o + (0.36487246462)*x[1]
        ref[(0, 0, 3, 2)]=-0.451831653273*x_ref[0]**o + (-0.265186899518)*x_ref[0] + (-0.0160937686084)*x_ref[1]**o + (0.36487246462)*x_ref[1]
        arg[(0, 0, 3, 3)]=-0.601649473218*x[0]**o + (0.51700695225)*x[0] + (0.181159969371)*x[1]**o + (0.201710480723)*x[1]
        ref[(0, 0, 3, 3)]=-0.601649473218*x_ref[0]**o + (0.51700695225)*x_ref[0] + (0.181159969371)*x_ref[1]**o + (0.201710480723)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.228480521293*x[0]**o + (-0.722651748314)*x[0] + (-0.241253467212)*x[1]**o + (-0.0170195233843)*x[1]
        ref[(0, 1, 0, 0)]=-0.228480521293*x_ref[0]**o + (-0.722651748314)*x_ref[0] + (-0.241253467212)*x_ref[1]**o + (-0.0170195233843)*x_ref[1]
        arg[(0, 1, 0, 1)]=-0.532872227383*x[0]**o + (0.0394266279674)*x[0] + (-5.59385570109e-05)*x[1]**o + (0.200637735271)*x[1]
        ref[(0, 1, 0, 1)]=-0.532872227383*x_ref[0]**o + (0.0394266279674)*x_ref[0] + (-5.59385570109e-05)*x_ref[1]**o + (0.200637735271)*x_ref[1]
        arg[(0, 1, 0, 2)]=-0.375920634331*x[0]**o + (0.310301576145)*x[0] + (-0.0731326204974)*x[1]**o + (-0.944268749193)*x[1]
        ref[(0, 1, 0, 2)]=-0.375920634331*x_ref[0]**o + (0.310301576145)*x_ref[0] + (-0.0731326204974)*x_ref[1]**o + (-0.944268749193)*x_ref[1]
        arg[(0, 1, 0, 3)]=0.59622708071*x[0]**o + (0.954824759817)*x[0] + (0.993977149158)*x[1]**o + (0.0941551602428)*x[1]
        ref[(0, 1, 0, 3)]=0.59622708071*x_ref[0]**o + (0.954824759817)*x_ref[0] + (0.993977149158)*x_ref[1]**o + (0.0941551602428)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.245101576653*x[0]**o + (-0.0560902944437)*x[0] + (-0.42389772539)*x[1]**o + (-0.21427280656)*x[1]
        ref[(0, 1, 1, 0)]=0.245101576653*x_ref[0]**o + (-0.0560902944437)*x_ref[0] + (-0.42389772539)*x_ref[1]**o + (-0.21427280656)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.229717358503*x[0]**o + (0.00529979344333)*x[0] + (0.907579021308)*x[1]**o + (0.534277264981)*x[1]
        ref[(0, 1, 1, 1)]=-0.229717358503*x_ref[0]**o + (0.00529979344333)*x_ref[0] + (0.907579021308)*x_ref[1]**o + (0.534277264981)*x_ref[1]
        arg[(0, 1, 1, 2)]=-0.733069340272*x[0]**o + (-0.506616143644)*x[0] + (0.95443330994)*x[1]**o + (0.127005652405)*x[1]
        ref[(0, 1, 1, 2)]=-0.733069340272*x_ref[0]**o + (-0.506616143644)*x_ref[0] + (0.95443330994)*x_ref[1]**o + (0.127005652405)*x_ref[1]
        arg[(0, 1, 1, 3)]=0.237020883132*x[0]**o + (-0.994024123428)*x[0] + (0.769664743255)*x[1]**o + (0.0286659191029)*x[1]
        ref[(0, 1, 1, 3)]=0.237020883132*x_ref[0]**o + (-0.994024123428)*x_ref[0] + (0.769664743255)*x_ref[1]**o + (0.0286659191029)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.416152457505*x[0]**o + (-0.668082840611)*x[0] + (-0.422115549588)*x[1]**o + (-0.256327675056)*x[1]
        ref[(0, 1, 2, 0)]=-0.416152457505*x_ref[0]**o + (-0.668082840611)*x_ref[0] + (-0.422115549588)*x_ref[1]**o + (-0.256327675056)*x_ref[1]
        arg[(0, 1, 2, 1)]=-0.802195018484*x[0]**o + (0.122299617817)*x[0] + (0.71810176629)*x[1]**o + (-0.846420211045)*x[1]
        ref[(0, 1, 2, 1)]=-0.802195018484*x_ref[0]**o + (0.122299617817)*x_ref[0] + (0.71810176629)*x_ref[1]**o + (-0.846420211045)*x_ref[1]
        arg[(0, 1, 2, 2)]=-0.00328673351299*x[0]**o + (-0.591077294357)*x[0] + (0.859287559348)*x[1]**o + (-0.101163991602)*x[1]
        ref[(0, 1, 2, 2)]=-0.00328673351299*x_ref[0]**o + (-0.591077294357)*x_ref[0] + (0.859287559348)*x_ref[1]**o + (-0.101163991602)*x_ref[1]
        arg[(0, 1, 2, 3)]=-0.439227784292*x[0]**o + (-0.406105588878)*x[0] + (0.783020520449)*x[1]**o + (-0.593246710956)*x[1]
        ref[(0, 1, 2, 3)]=-0.439227784292*x_ref[0]**o + (-0.406105588878)*x_ref[0] + (0.783020520449)*x_ref[1]**o + (-0.593246710956)*x_ref[1]
        arg[(0, 1, 3, 0)]=0.955552936774*x[0]**o + (-0.970634124278)*x[0] + (0.231016972359)*x[1]**o + (0.140382096058)*x[1]
        ref[(0, 1, 3, 0)]=0.955552936774*x_ref[0]**o + (-0.970634124278)*x_ref[0] + (0.231016972359)*x_ref[1]**o + (0.140382096058)*x_ref[1]
        arg[(0, 1, 3, 1)]=0.117894542532*x[0]**o + (-0.988059202354)*x[0] + (-0.599325148826)*x[1]**o + (0.426024781448)*x[1]
        ref[(0, 1, 3, 1)]=0.117894542532*x_ref[0]**o + (-0.988059202354)*x_ref[0] + (-0.599325148826)*x_ref[1]**o + (0.426024781448)*x_ref[1]
        arg[(0, 1, 3, 2)]=0.971800785642*x[0]**o + (0.319066126006)*x[0] + (-0.136986723439)*x[1]**o + (0.308039655879)*x[1]
        ref[(0, 1, 3, 2)]=0.971800785642*x_ref[0]**o + (0.319066126006)*x_ref[0] + (-0.136986723439)*x_ref[1]**o + (0.308039655879)*x_ref[1]
        arg[(0, 1, 3, 3)]=-0.70149618631*x[0]**o + (0.164965424859)*x[0] + (0.119871408803)*x[1]**o + (-0.346504197089)*x[1]
        ref[(0, 1, 3, 3)]=-0.70149618631*x_ref[0]**o + (0.164965424859)*x_ref[0] + (0.119871408803)*x_ref[1]**o + (-0.346504197089)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.275590842822*x[0]**o + (0.193467401747)*x[0] + (0.597175464475)*x[1]**o + (0.878041767249)*x[1]
        ref[(1, 0, 0, 0)]=0.275590842822*x_ref[0]**o + (0.193467401747)*x_ref[0] + (0.597175464475)*x_ref[1]**o + (0.878041767249)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.0733494047286*x[0]**o + (0.47572272179)*x[0] + (-0.581682620292)*x[1]**o + (-0.905398032276)*x[1]
        ref[(1, 0, 0, 1)]=0.0733494047286*x_ref[0]**o + (0.47572272179)*x_ref[0] + (-0.581682620292)*x_ref[1]**o + (-0.905398032276)*x_ref[1]
        arg[(1, 0, 0, 2)]=-0.0184437952117*x[0]**o + (0.847787334015)*x[0] + (-0.0863119383547)*x[1]**o + (-0.260849757508)*x[1]
        ref[(1, 0, 0, 2)]=-0.0184437952117*x_ref[0]**o + (0.847787334015)*x_ref[0] + (-0.0863119383547)*x_ref[1]**o + (-0.260849757508)*x_ref[1]
        arg[(1, 0, 0, 3)]=-0.473828942738*x[0]**o + (0.148836649402)*x[0] + (0.247677881097)*x[1]**o + (0.744627107069)*x[1]
        ref[(1, 0, 0, 3)]=-0.473828942738*x_ref[0]**o + (0.148836649402)*x_ref[0] + (0.247677881097)*x_ref[1]**o + (0.744627107069)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.321893820078*x[0]**o + (-0.159928423918)*x[0] + (-0.680514911479)*x[1]**o + (0.280848531583)*x[1]
        ref[(1, 0, 1, 0)]=-0.321893820078*x_ref[0]**o + (-0.159928423918)*x_ref[0] + (-0.680514911479)*x_ref[1]**o + (0.280848531583)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.111002404757*x[0]**o + (-0.883556187637)*x[0] + (-0.890909476059)*x[1]**o + (0.423646757157)*x[1]
        ref[(1, 0, 1, 1)]=0.111002404757*x_ref[0]**o + (-0.883556187637)*x_ref[0] + (-0.890909476059)*x_ref[1]**o + (0.423646757157)*x_ref[1]
        arg[(1, 0, 1, 2)]=-0.720162519832*x[0]**o + (-0.0135616678346)*x[0] + (0.890490585792)*x[1]**o + (0.705550207259)*x[1]
        ref[(1, 0, 1, 2)]=-0.720162519832*x_ref[0]**o + (-0.0135616678346)*x_ref[0] + (0.890490585792)*x_ref[1]**o + (0.705550207259)*x_ref[1]
        arg[(1, 0, 1, 3)]=-0.637750794925*x[0]**o + (-0.110424877466)*x[0] + (-0.682822336735)*x[1]**o + (0.199044367645)*x[1]
        ref[(1, 0, 1, 3)]=-0.637750794925*x_ref[0]**o + (-0.110424877466)*x_ref[0] + (-0.682822336735)*x_ref[1]**o + (0.199044367645)*x_ref[1]
        arg[(1, 0, 2, 0)]=0.253963091283*x[0]**o + (0.491515777559)*x[0] + (-0.959938536298)*x[1]**o + (-0.136479086858)*x[1]
        ref[(1, 0, 2, 0)]=0.253963091283*x_ref[0]**o + (0.491515777559)*x_ref[0] + (-0.959938536298)*x_ref[1]**o + (-0.136479086858)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.909742457292*x[0]**o + (-0.134239643557)*x[0] + (-0.913220915635)*x[1]**o + (-0.430110840537)*x[1]
        ref[(1, 0, 2, 1)]=0.909742457292*x_ref[0]**o + (-0.134239643557)*x_ref[0] + (-0.913220915635)*x_ref[1]**o + (-0.430110840537)*x_ref[1]
        arg[(1, 0, 2, 2)]=-0.691279801544*x[0]**o + (0.0106771022925)*x[0] + (-0.190249778961)*x[1]**o + (0.877817868425)*x[1]
        ref[(1, 0, 2, 2)]=-0.691279801544*x_ref[0]**o + (0.0106771022925)*x_ref[0] + (-0.190249778961)*x_ref[1]**o + (0.877817868425)*x_ref[1]
        arg[(1, 0, 2, 3)]=-0.0213390479032*x[0]**o + (-0.0520035888057)*x[0] + (-0.271313573553)*x[1]**o + (0.303042488759)*x[1]
        ref[(1, 0, 2, 3)]=-0.0213390479032*x_ref[0]**o + (-0.0520035888057)*x_ref[0] + (-0.271313573553)*x_ref[1]**o + (0.303042488759)*x_ref[1]
        arg[(1, 0, 3, 0)]=-0.861498252503*x[0]**o + (-0.514262037376)*x[0] + (0.727475095055)*x[1]**o + (0.446453224199)*x[1]
        ref[(1, 0, 3, 0)]=-0.861498252503*x_ref[0]**o + (-0.514262037376)*x_ref[0] + (0.727475095055)*x_ref[1]**o + (0.446453224199)*x_ref[1]
        arg[(1, 0, 3, 1)]=-0.836018055273*x[0]**o + (-0.149264512934)*x[0] + (-0.392539763147)*x[1]**o + (0.67863179789)*x[1]
        ref[(1, 0, 3, 1)]=-0.836018055273*x_ref[0]**o + (-0.149264512934)*x_ref[0] + (-0.392539763147)*x_ref[1]**o + (0.67863179789)*x_ref[1]
        arg[(1, 0, 3, 2)]=-0.446092431514*x[0]**o + (-0.405291658378)*x[0] + (-0.181373705168)*x[1]**o + (0.397654793092)*x[1]
        ref[(1, 0, 3, 2)]=-0.446092431514*x_ref[0]**o + (-0.405291658378)*x_ref[0] + (-0.181373705168)*x_ref[1]**o + (0.397654793092)*x_ref[1]
        arg[(1, 0, 3, 3)]=-0.19603002603*x[0]**o + (0.629725477988)*x[0] + (0.67320235888)*x[1]**o + (-0.14984852797)*x[1]
        ref[(1, 0, 3, 3)]=-0.19603002603*x_ref[0]**o + (0.629725477988)*x_ref[0] + (0.67320235888)*x_ref[1]**o + (-0.14984852797)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.120353079339*x[0]**o + (-0.378220684513)*x[0] + (0.596895927876)*x[1]**o + (0.843904211058)*x[1]
        ref[(1, 1, 0, 0)]=-0.120353079339*x_ref[0]**o + (-0.378220684513)*x_ref[0] + (0.596895927876)*x_ref[1]**o + (0.843904211058)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.100773275692*x[0]**o + (0.163213567614)*x[0] + (-0.0890711674335)*x[1]**o + (0.883308957554)*x[1]
        ref[(1, 1, 0, 1)]=0.100773275692*x_ref[0]**o + (0.163213567614)*x_ref[0] + (-0.0890711674335)*x_ref[1]**o + (0.883308957554)*x_ref[1]
        arg[(1, 1, 0, 2)]=-0.463620677359*x[0]**o + (-0.839990441594)*x[0] + (-0.706076435815)*x[1]**o + (-0.111630769127)*x[1]
        ref[(1, 1, 0, 2)]=-0.463620677359*x_ref[0]**o + (-0.839990441594)*x_ref[0] + (-0.706076435815)*x_ref[1]**o + (-0.111630769127)*x_ref[1]
        arg[(1, 1, 0, 3)]=0.843468470961*x[0]**o + (-0.629386229726)*x[0] + (-0.697868505362)*x[1]**o + (-0.386200001087)*x[1]
        ref[(1, 1, 0, 3)]=0.843468470961*x_ref[0]**o + (-0.629386229726)*x_ref[0] + (-0.697868505362)*x_ref[1]**o + (-0.386200001087)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.476834570986*x[0]**o + (-0.55441904847)*x[0] + (0.796675511512)*x[1]**o + (-0.38952518847)*x[1]
        ref[(1, 1, 1, 0)]=0.476834570986*x_ref[0]**o + (-0.55441904847)*x_ref[0] + (0.796675511512)*x_ref[1]**o + (-0.38952518847)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.15223710043*x[0]**o + (-0.343126306057)*x[0] + (-0.330592556527)*x[1]**o + (0.521564285639)*x[1]
        ref[(1, 1, 1, 1)]=-0.15223710043*x_ref[0]**o + (-0.343126306057)*x_ref[0] + (-0.330592556527)*x_ref[1]**o + (0.521564285639)*x_ref[1]
        arg[(1, 1, 1, 2)]=0.53797465149*x[0]**o + (-0.754248346662)*x[0] + (0.448049230029)*x[1]**o + (0.00259902363356)*x[1]
        ref[(1, 1, 1, 2)]=0.53797465149*x_ref[0]**o + (-0.754248346662)*x_ref[0] + (0.448049230029)*x_ref[1]**o + (0.00259902363356)*x_ref[1]
        arg[(1, 1, 1, 3)]=-0.67171084111*x[0]**o + (-0.270339616226)*x[0] + (0.030713679897)*x[1]**o + (-0.917436652213)*x[1]
        ref[(1, 1, 1, 3)]=-0.67171084111*x_ref[0]**o + (-0.270339616226)*x_ref[0] + (0.030713679897)*x_ref[1]**o + (-0.917436652213)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.666313312698*x[0]**o + (-0.0592159488054)*x[0] + (0.672484673024)*x[1]**o + (0.301848025759)*x[1]
        ref[(1, 1, 2, 0)]=-0.666313312698*x_ref[0]**o + (-0.0592159488054)*x_ref[0] + (0.672484673024)*x_ref[1]**o + (0.301848025759)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.195799492073*x[0]**o + (0.983554872581)*x[0] + (-0.946224867565)*x[1]**o + (-0.189411680614)*x[1]
        ref[(1, 1, 2, 1)]=-0.195799492073*x_ref[0]**o + (0.983554872581)*x_ref[0] + (-0.946224867565)*x_ref[1]**o + (-0.189411680614)*x_ref[1]
        arg[(1, 1, 2, 2)]=0.548824741581*x[0]**o + (0.416351169629)*x[0] + (0.223814054025)*x[1]**o + (0.261182164119)*x[1]
        ref[(1, 1, 2, 2)]=0.548824741581*x_ref[0]**o + (0.416351169629)*x_ref[0] + (0.223814054025)*x_ref[1]**o + (0.261182164119)*x_ref[1]
        arg[(1, 1, 2, 3)]=-0.937340257763*x[0]**o + (0.923450619493)*x[0] + (-0.0383789194469)*x[1]**o + (-0.382417256124)*x[1]
        ref[(1, 1, 2, 3)]=-0.937340257763*x_ref[0]**o + (0.923450619493)*x_ref[0] + (-0.0383789194469)*x_ref[1]**o + (-0.382417256124)*x_ref[1]
        arg[(1, 1, 3, 0)]=-0.628643520976*x[0]**o + (-0.662284974163)*x[0] + (0.216845591217)*x[1]**o + (-0.618714464538)*x[1]
        ref[(1, 1, 3, 0)]=-0.628643520976*x_ref[0]**o + (-0.662284974163)*x_ref[0] + (0.216845591217)*x_ref[1]**o + (-0.618714464538)*x_ref[1]
        arg[(1, 1, 3, 1)]=0.2725491614*x[0]**o + (-0.406148221624)*x[0] + (0.205130978895)*x[1]**o + (-0.783219866557)*x[1]
        ref[(1, 1, 3, 1)]=0.2725491614*x_ref[0]**o + (-0.406148221624)*x_ref[0] + (0.205130978895)*x_ref[1]**o + (-0.783219866557)*x_ref[1]
        arg[(1, 1, 3, 2)]=0.523262039661*x[0]**o + (-0.360313599258)*x[0] + (0.633184234176)*x[1]**o + (-0.470484952824)*x[1]
        ref[(1, 1, 3, 2)]=0.523262039661*x_ref[0]**o + (-0.360313599258)*x_ref[0] + (0.633184234176)*x_ref[1]**o + (-0.470484952824)*x_ref[1]
        arg[(1, 1, 3, 3)]=0.677235611172*x[0]**o + (-0.788184642827)*x[0] + (0.0894974657587)*x[1]**o + (0.355024579768)*x[1]
        ref[(1, 1, 3, 3)]=0.677235611172*x_ref[0]**o + (-0.788184642827)*x_ref[0] + (0.0894974657587)*x_ref[1]**o + (0.355024579768)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.363252593584*x[2]**o + (0.535004233614)*x[2]
            ref[(0, 0, 0, 0)]+=-0.363252593584*x_ref[2]**o + (0.535004233614)*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.35800529457*x[2]**o + (-0.976143391265)*x[2]
            ref[(0, 0, 0, 1)]+=0.35800529457*x_ref[2]**o + (-0.976143391265)*x_ref[2]
            arg[(0, 0, 0, 2)]+=-0.554207669285*x[2]**o + (0.942818955592)*x[2]
            ref[(0, 0, 0, 2)]+=-0.554207669285*x_ref[2]**o + (0.942818955592)*x_ref[2]
            arg[(0, 0, 0, 3)]+=-0.0496307679928*x[2]**o + (0.340920757205)*x[2]
            ref[(0, 0, 0, 3)]+=-0.0496307679928*x_ref[2]**o + (0.340920757205)*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.15008240539*x[2]**o + (0.00292243115607)*x[2]
            ref[(0, 0, 1, 0)]+=-0.15008240539*x_ref[2]**o + (0.00292243115607)*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.471757106056*x[2]**o + (0.0867277747899)*x[2]
            ref[(0, 0, 1, 1)]+=-0.471757106056*x_ref[2]**o + (0.0867277747899)*x_ref[2]
            arg[(0, 0, 1, 2)]+=0.196095488257*x[2]**o + (0.332634535774)*x[2]
            ref[(0, 0, 1, 2)]+=0.196095488257*x_ref[2]**o + (0.332634535774)*x_ref[2]
            arg[(0, 0, 1, 3)]+=-0.725981891572*x[2]**o + (-0.00561099525744)*x[2]
            ref[(0, 0, 1, 3)]+=-0.725981891572*x_ref[2]**o + (-0.00561099525744)*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.110497855888*x[2]**o + (0.310393463625)*x[2]
            ref[(0, 0, 2, 0)]+=-0.110497855888*x_ref[2]**o + (0.310393463625)*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.787037783784*x[2]**o + (0.177382434497)*x[2]
            ref[(0, 0, 2, 1)]+=0.787037783784*x_ref[2]**o + (0.177382434497)*x_ref[2]
            arg[(0, 0, 2, 2)]+=0.248037831884*x[2]**o + (0.0237762929982)*x[2]
            ref[(0, 0, 2, 2)]+=0.248037831884*x_ref[2]**o + (0.0237762929982)*x_ref[2]
            arg[(0, 0, 2, 3)]+=0.647044209519*x[2]**o + (0.642953240769)*x[2]
            ref[(0, 0, 2, 3)]+=0.647044209519*x_ref[2]**o + (0.642953240769)*x_ref[2]
            arg[(0, 0, 3, 0)]+=-0.49635060669*x[2]**o + (0.0451264745643)*x[2]
            ref[(0, 0, 3, 0)]+=-0.49635060669*x_ref[2]**o + (0.0451264745643)*x_ref[2]
            arg[(0, 0, 3, 1)]+=-0.793783665548*x[2]**o + (0.405487038045)*x[2]
            ref[(0, 0, 3, 1)]+=-0.793783665548*x_ref[2]**o + (0.405487038045)*x_ref[2]
            arg[(0, 0, 3, 2)]+=0.62091691111*x[2]**o + (-0.0433273215145)*x[2]
            ref[(0, 0, 3, 2)]+=0.62091691111*x_ref[2]**o + (-0.0433273215145)*x_ref[2]
            arg[(0, 0, 3, 3)]+=-0.275185149775*x[2]**o + (0.620059527137)*x[2]
            ref[(0, 0, 3, 3)]+=-0.275185149775*x_ref[2]**o + (0.620059527137)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.620016384148*x[2]**o + (-0.199536392092)*x[2]
            ref[(0, 1, 0, 0)]+=-0.620016384148*x_ref[2]**o + (-0.199536392092)*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.208227347434*x[2]**o + (-0.86468264193)*x[2]
            ref[(0, 1, 0, 1)]+=0.208227347434*x_ref[2]**o + (-0.86468264193)*x_ref[2]
            arg[(0, 1, 0, 2)]+=0.926008758283*x[2]**o + (0.464108961384)*x[2]
            ref[(0, 1, 0, 2)]+=0.926008758283*x_ref[2]**o + (0.464108961384)*x_ref[2]
            arg[(0, 1, 0, 3)]+=0.571868052681*x[2]**o + (0.201788452074)*x[2]
            ref[(0, 1, 0, 3)]+=0.571868052681*x_ref[2]**o + (0.201788452074)*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.916023575285*x[2]**o + (0.572021299166)*x[2]
            ref[(0, 1, 1, 0)]+=-0.916023575285*x_ref[2]**o + (0.572021299166)*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.101365709103*x[2]**o + (-0.986308052473)*x[2]
            ref[(0, 1, 1, 1)]+=-0.101365709103*x_ref[2]**o + (-0.986308052473)*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.0385715112664*x[2]**o + (-0.770325535769)*x[2]
            ref[(0, 1, 1, 2)]+=0.0385715112664*x_ref[2]**o + (-0.770325535769)*x_ref[2]
            arg[(0, 1, 1, 3)]+=0.27103579772*x[2]**o + (0.0750316438633)*x[2]
            ref[(0, 1, 1, 3)]+=0.27103579772*x_ref[2]**o + (0.0750316438633)*x_ref[2]
            arg[(0, 1, 2, 0)]+=0.174219869758*x[2]**o + (0.612298924878)*x[2]
            ref[(0, 1, 2, 0)]+=0.174219869758*x_ref[2]**o + (0.612298924878)*x_ref[2]
            arg[(0, 1, 2, 1)]+=-0.572585648893*x[2]**o + (0.0453804636884)*x[2]
            ref[(0, 1, 2, 1)]+=-0.572585648893*x_ref[2]**o + (0.0453804636884)*x_ref[2]
            arg[(0, 1, 2, 2)]+=-0.641528503481*x[2]**o + (0.926472052403)*x[2]
            ref[(0, 1, 2, 2)]+=-0.641528503481*x_ref[2]**o + (0.926472052403)*x_ref[2]
            arg[(0, 1, 2, 3)]+=0.33586821102*x[2]**o + (0.357602444004)*x[2]
            ref[(0, 1, 2, 3)]+=0.33586821102*x_ref[2]**o + (0.357602444004)*x_ref[2]
            arg[(0, 1, 3, 0)]+=0.368626412757*x[2]**o + (0.277661211699)*x[2]
            ref[(0, 1, 3, 0)]+=0.368626412757*x_ref[2]**o + (0.277661211699)*x_ref[2]
            arg[(0, 1, 3, 1)]+=0.384967206685*x[2]**o + (-0.159846704199)*x[2]
            ref[(0, 1, 3, 1)]+=0.384967206685*x_ref[2]**o + (-0.159846704199)*x_ref[2]
            arg[(0, 1, 3, 2)]+=-0.682477965532*x[2]**o + (0.150866298435)*x[2]
            ref[(0, 1, 3, 2)]+=-0.682477965532*x_ref[2]**o + (0.150866298435)*x_ref[2]
            arg[(0, 1, 3, 3)]+=-0.955101378221*x[2]**o + (0.0656139949418)*x[2]
            ref[(0, 1, 3, 3)]+=-0.955101378221*x_ref[2]**o + (0.0656139949418)*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.898169446464*x[2]**o + (-0.557465896775)*x[2]
            ref[(1, 0, 0, 0)]+=-0.898169446464*x_ref[2]**o + (-0.557465896775)*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.58377927303*x[2]**o + (0.950062283796)*x[2]
            ref[(1, 0, 0, 1)]+=-0.58377927303*x_ref[2]**o + (0.950062283796)*x_ref[2]
            arg[(1, 0, 0, 2)]+=-0.825262606055*x[2]**o + (-0.61029776866)*x[2]
            ref[(1, 0, 0, 2)]+=-0.825262606055*x_ref[2]**o + (-0.61029776866)*x_ref[2]
            arg[(1, 0, 0, 3)]+=-0.0355586270341*x[2]**o + (-0.0954442429815)*x[2]
            ref[(1, 0, 0, 3)]+=-0.0355586270341*x_ref[2]**o + (-0.0954442429815)*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.331457879668*x[2]**o + (0.420983911702)*x[2]
            ref[(1, 0, 1, 0)]+=0.331457879668*x_ref[2]**o + (0.420983911702)*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.765699473607*x[2]**o + (-0.862504397309)*x[2]
            ref[(1, 0, 1, 1)]+=0.765699473607*x_ref[2]**o + (-0.862504397309)*x_ref[2]
            arg[(1, 0, 1, 2)]+=0.716975578895*x[2]**o + (0.864553305858)*x[2]
            ref[(1, 0, 1, 2)]+=0.716975578895*x_ref[2]**o + (0.864553305858)*x_ref[2]
            arg[(1, 0, 1, 3)]+=-0.731535838694*x[2]**o + (0.0358786141834)*x[2]
            ref[(1, 0, 1, 3)]+=-0.731535838694*x_ref[2]**o + (0.0358786141834)*x_ref[2]
            arg[(1, 0, 2, 0)]+=0.545989000867*x[2]**o + (-0.176453252755)*x[2]
            ref[(1, 0, 2, 0)]+=0.545989000867*x_ref[2]**o + (-0.176453252755)*x_ref[2]
            arg[(1, 0, 2, 1)]+=-0.19557759036*x[2]**o + (-0.904067500858)*x[2]
            ref[(1, 0, 2, 1)]+=-0.19557759036*x_ref[2]**o + (-0.904067500858)*x_ref[2]
            arg[(1, 0, 2, 2)]+=0.996199313326*x[2]**o + (0.123696017652)*x[2]
            ref[(1, 0, 2, 2)]+=0.996199313326*x_ref[2]**o + (0.123696017652)*x_ref[2]
            arg[(1, 0, 2, 3)]+=0.690549627809*x[2]**o + (-0.492933203539)*x[2]
            ref[(1, 0, 2, 3)]+=0.690549627809*x_ref[2]**o + (-0.492933203539)*x_ref[2]
            arg[(1, 0, 3, 0)]+=-0.256706578138*x[2]**o + (-0.735338217828)*x[2]
            ref[(1, 0, 3, 0)]+=-0.256706578138*x_ref[2]**o + (-0.735338217828)*x_ref[2]
            arg[(1, 0, 3, 1)]+=-0.581094677557*x[2]**o + (0.382102381113)*x[2]
            ref[(1, 0, 3, 1)]+=-0.581094677557*x_ref[2]**o + (0.382102381113)*x_ref[2]
            arg[(1, 0, 3, 2)]+=0.677351784582*x[2]**o + (-0.337605057686)*x[2]
            ref[(1, 0, 3, 2)]+=0.677351784582*x_ref[2]**o + (-0.337605057686)*x_ref[2]
            arg[(1, 0, 3, 3)]+=0.811688365868*x[2]**o + (0.787785982657)*x[2]
            ref[(1, 0, 3, 3)]+=0.811688365868*x_ref[2]**o + (0.787785982657)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.451226348857*x[2]**o + (0.954294281725)*x[2]
            ref[(1, 1, 0, 0)]+=0.451226348857*x_ref[2]**o + (0.954294281725)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.395563755999*x[2]**o + (-0.692525303037)*x[2]
            ref[(1, 1, 0, 1)]+=0.395563755999*x_ref[2]**o + (-0.692525303037)*x_ref[2]
            arg[(1, 1, 0, 2)]+=0.396333936398*x[2]**o + (-0.439436717588)*x[2]
            ref[(1, 1, 0, 2)]+=0.396333936398*x_ref[2]**o + (-0.439436717588)*x_ref[2]
            arg[(1, 1, 0, 3)]+=0.541548664738*x[2]**o + (0.794245271137)*x[2]
            ref[(1, 1, 0, 3)]+=0.541548664738*x_ref[2]**o + (0.794245271137)*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.96849895236*x[2]**o + (-0.235250237012)*x[2]
            ref[(1, 1, 1, 0)]+=0.96849895236*x_ref[2]**o + (-0.235250237012)*x_ref[2]
            arg[(1, 1, 1, 1)]+=-0.616430512864*x[2]**o + (-0.437786484367)*x[2]
            ref[(1, 1, 1, 1)]+=-0.616430512864*x_ref[2]**o + (-0.437786484367)*x_ref[2]
            arg[(1, 1, 1, 2)]+=0.0648901285134*x[2]**o + (-0.109939374191)*x[2]
            ref[(1, 1, 1, 2)]+=0.0648901285134*x_ref[2]**o + (-0.109939374191)*x_ref[2]
            arg[(1, 1, 1, 3)]+=-0.689532013731*x[2]**o + (0.302627214642)*x[2]
            ref[(1, 1, 1, 3)]+=-0.689532013731*x_ref[2]**o + (0.302627214642)*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.612023644189*x[2]**o + (0.964095098299)*x[2]
            ref[(1, 1, 2, 0)]+=-0.612023644189*x_ref[2]**o + (0.964095098299)*x_ref[2]
            arg[(1, 1, 2, 1)]+=-0.444941816497*x[2]**o + (0.611069112131)*x[2]
            ref[(1, 1, 2, 1)]+=-0.444941816497*x_ref[2]**o + (0.611069112131)*x_ref[2]
            arg[(1, 1, 2, 2)]+=0.322000410123*x[2]**o + (-0.644305608466)*x[2]
            ref[(1, 1, 2, 2)]+=0.322000410123*x_ref[2]**o + (-0.644305608466)*x_ref[2]
            arg[(1, 1, 2, 3)]+=0.911995214509*x[2]**o + (0.821333303417)*x[2]
            ref[(1, 1, 2, 3)]+=0.911995214509*x_ref[2]**o + (0.821333303417)*x_ref[2]
            arg[(1, 1, 3, 0)]+=-0.602551062711*x[2]**o + (0.834232435222)*x[2]
            ref[(1, 1, 3, 0)]+=-0.602551062711*x_ref[2]**o + (0.834232435222)*x_ref[2]
            arg[(1, 1, 3, 1)]+=-0.990763635775*x[2]**o + (0.50184624261)*x[2]
            ref[(1, 1, 3, 1)]+=-0.990763635775*x_ref[2]**o + (0.50184624261)*x_ref[2]
            arg[(1, 1, 3, 2)]+=0.466196148152*x[2]**o + (-0.317130626777)*x[2]
            ref[(1, 1, 3, 2)]+=0.466196148152*x_ref[2]**o + (-0.317130626777)*x_ref[2]
            arg[(1, 1, 3, 3)]+=-0.479566323305*x[2]**o + (-0.189310008403)*x[2]
            ref[(1, 1, 3, 3)]+=-0.479566323305*x_ref[2]**o + (-0.189310008403)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_ReducedSolution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedSolution

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.808296405617*x[0] + (-0.869007242515)*x[1]
        ref=-0.808296405617*x_ref[0] + (-0.869007242515)*x_ref[1]
        if dim==3:
            arg+=(0.63536005197)*x[2]
            ref+=(0.63536005197)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_ReducedSolution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedSolution

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=0.372545111955*x[0] + (-0.0823590815224)*x[1]
        ref[(0,)]=0.372545111955*x_ref[0] + (-0.0823590815224)*x_ref[1]
        arg[(1,)]=-0.511525219035*x[0] + (-0.232960126777)*x[1]
        ref[(1,)]=-0.511525219035*x_ref[0] + (-0.232960126777)*x_ref[1]
        arg[(2,)]=0.970656117333*x[0] + (-0.0674618057503)*x[1]
        ref[(2,)]=0.970656117333*x_ref[0] + (-0.0674618057503)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.202517915493*x[2]
            ref[(0,)]+=0.202517915493*x_ref[2]
            arg[(1,)]+=0.125229967585*x[2]
            ref[(1,)]+=0.125229967585*x_ref[2]
            arg[(2,)]+=-0.777844604149*x[2]
            ref[(2,)]+=-0.777844604149*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_ReducedSolution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedSolution

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2),w)
        ref = Data(0,(4, 2),w_ref)
        arg[(0, 0)]=0.382104599806*x[0] + (0.737465311268)*x[1]
        ref[(0, 0)]=0.382104599806*x_ref[0] + (0.737465311268)*x_ref[1]
        arg[(0, 1)]=0.960432364571*x[0] + (0.605939145051)*x[1]
        ref[(0, 1)]=0.960432364571*x_ref[0] + (0.605939145051)*x_ref[1]
        arg[(1, 0)]=-0.214917326973*x[0] + (0.931653306683)*x[1]
        ref[(1, 0)]=-0.214917326973*x_ref[0] + (0.931653306683)*x_ref[1]
        arg[(1, 1)]=0.289362892104*x[0] + (0.787702079467)*x[1]
        ref[(1, 1)]=0.289362892104*x_ref[0] + (0.787702079467)*x_ref[1]
        arg[(2, 0)]=-0.65840361896*x[0] + (0.873365251784)*x[1]
        ref[(2, 0)]=-0.65840361896*x_ref[0] + (0.873365251784)*x_ref[1]
        arg[(2, 1)]=-0.486144399075*x[0] + (-0.213875262777)*x[1]
        ref[(2, 1)]=-0.486144399075*x_ref[0] + (-0.213875262777)*x_ref[1]
        arg[(3, 0)]=0.580933875006*x[0] + (-0.0134423021981)*x[1]
        ref[(3, 0)]=0.580933875006*x_ref[0] + (-0.0134423021981)*x_ref[1]
        arg[(3, 1)]=-0.903200359554*x[0] + (0.884864499658)*x[1]
        ref[(3, 1)]=-0.903200359554*x_ref[0] + (0.884864499658)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.299671646649*x[2]
            ref[(0, 0)]+=-0.299671646649*x_ref[2]
            arg[(0, 1)]+=0.0848197833043*x[2]
            ref[(0, 1)]+=0.0848197833043*x_ref[2]
            arg[(1, 0)]+=0.837274004015*x[2]
            ref[(1, 0)]+=0.837274004015*x_ref[2]
            arg[(1, 1)]+=-0.774089908555*x[2]
            ref[(1, 1)]+=-0.774089908555*x_ref[2]
            arg[(2, 0)]+=-0.676832800911*x[2]
            ref[(2, 0)]+=-0.676832800911*x_ref[2]
            arg[(2, 1)]+=-0.705437507255*x[2]
            ref[(2, 1)]+=-0.705437507255*x_ref[2]
            arg[(3, 0)]+=0.306721927005*x[2]
            ref[(3, 0)]+=0.306721927005*x_ref[2]
            arg[(3, 1)]+=0.710075153306*x[2]
            ref[(3, 1)]+=0.710075153306*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_ReducedSolution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedSolution

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 4),w)
        ref = Data(0,(4, 4, 4),w_ref)
        arg[(0, 0, 0)]=-0.605146138354*x[0] + (-0.203283909031)*x[1]
        ref[(0, 0, 0)]=-0.605146138354*x_ref[0] + (-0.203283909031)*x_ref[1]
        arg[(0, 0, 1)]=-0.416676640951*x[0] + (0.283338999123)*x[1]
        ref[(0, 0, 1)]=-0.416676640951*x_ref[0] + (0.283338999123)*x_ref[1]
        arg[(0, 0, 2)]=0.209681098547*x[0] + (-0.189194693167)*x[1]
        ref[(0, 0, 2)]=0.209681098547*x_ref[0] + (-0.189194693167)*x_ref[1]
        arg[(0, 0, 3)]=-0.0933909565534*x[0] + (-0.776378882503)*x[1]
        ref[(0, 0, 3)]=-0.0933909565534*x_ref[0] + (-0.776378882503)*x_ref[1]
        arg[(0, 1, 0)]=0.388366694308*x[0] + (-0.486594857727)*x[1]
        ref[(0, 1, 0)]=0.388366694308*x_ref[0] + (-0.486594857727)*x_ref[1]
        arg[(0, 1, 1)]=0.964211522616*x[0] + (-0.166773058378)*x[1]
        ref[(0, 1, 1)]=0.964211522616*x_ref[0] + (-0.166773058378)*x_ref[1]
        arg[(0, 1, 2)]=0.652513139136*x[0] + (0.904496582048)*x[1]
        ref[(0, 1, 2)]=0.652513139136*x_ref[0] + (0.904496582048)*x_ref[1]
        arg[(0, 1, 3)]=0.125401676479*x[0] + (0.753300972943)*x[1]
        ref[(0, 1, 3)]=0.125401676479*x_ref[0] + (0.753300972943)*x_ref[1]
        arg[(0, 2, 0)]=0.338974755983*x[0] + (-0.539613550072)*x[1]
        ref[(0, 2, 0)]=0.338974755983*x_ref[0] + (-0.539613550072)*x_ref[1]
        arg[(0, 2, 1)]=-0.561341703177*x[0] + (0.346334187195)*x[1]
        ref[(0, 2, 1)]=-0.561341703177*x_ref[0] + (0.346334187195)*x_ref[1]
        arg[(0, 2, 2)]=-0.920750683553*x[0] + (0.998871986315)*x[1]
        ref[(0, 2, 2)]=-0.920750683553*x_ref[0] + (0.998871986315)*x_ref[1]
        arg[(0, 2, 3)]=-0.191815698297*x[0] + (-0.0839499000805)*x[1]
        ref[(0, 2, 3)]=-0.191815698297*x_ref[0] + (-0.0839499000805)*x_ref[1]
        arg[(0, 3, 0)]=0.687957743434*x[0] + (-0.825861221392)*x[1]
        ref[(0, 3, 0)]=0.687957743434*x_ref[0] + (-0.825861221392)*x_ref[1]
        arg[(0, 3, 1)]=-0.0673549488819*x[0] + (-0.242686725932)*x[1]
        ref[(0, 3, 1)]=-0.0673549488819*x_ref[0] + (-0.242686725932)*x_ref[1]
        arg[(0, 3, 2)]=-0.340968871179*x[0] + (-0.0267016825406)*x[1]
        ref[(0, 3, 2)]=-0.340968871179*x_ref[0] + (-0.0267016825406)*x_ref[1]
        arg[(0, 3, 3)]=0.258027045584*x[0] + (0.222945412301)*x[1]
        ref[(0, 3, 3)]=0.258027045584*x_ref[0] + (0.222945412301)*x_ref[1]
        arg[(1, 0, 0)]=-0.858636382543*x[0] + (0.401863168663)*x[1]
        ref[(1, 0, 0)]=-0.858636382543*x_ref[0] + (0.401863168663)*x_ref[1]
        arg[(1, 0, 1)]=0.887413466417*x[0] + (-0.563724966162)*x[1]
        ref[(1, 0, 1)]=0.887413466417*x_ref[0] + (-0.563724966162)*x_ref[1]
        arg[(1, 0, 2)]=0.311550553279*x[0] + (-0.376330098261)*x[1]
        ref[(1, 0, 2)]=0.311550553279*x_ref[0] + (-0.376330098261)*x_ref[1]
        arg[(1, 0, 3)]=0.323333424352*x[0] + (-0.45334599397)*x[1]
        ref[(1, 0, 3)]=0.323333424352*x_ref[0] + (-0.45334599397)*x_ref[1]
        arg[(1, 1, 0)]=-0.524125268179*x[0] + (-0.8342831667)*x[1]
        ref[(1, 1, 0)]=-0.524125268179*x_ref[0] + (-0.8342831667)*x_ref[1]
        arg[(1, 1, 1)]=0.117730704793*x[0] + (-0.455528096303)*x[1]
        ref[(1, 1, 1)]=0.117730704793*x_ref[0] + (-0.455528096303)*x_ref[1]
        arg[(1, 1, 2)]=0.757578995877*x[0] + (-0.971156277987)*x[1]
        ref[(1, 1, 2)]=0.757578995877*x_ref[0] + (-0.971156277987)*x_ref[1]
        arg[(1, 1, 3)]=-0.224073648354*x[0] + (-0.313004676333)*x[1]
        ref[(1, 1, 3)]=-0.224073648354*x_ref[0] + (-0.313004676333)*x_ref[1]
        arg[(1, 2, 0)]=0.587180354185*x[0] + (0.965046848546)*x[1]
        ref[(1, 2, 0)]=0.587180354185*x_ref[0] + (0.965046848546)*x_ref[1]
        arg[(1, 2, 1)]=-0.863745237309*x[0] + (-0.826342111976)*x[1]
        ref[(1, 2, 1)]=-0.863745237309*x_ref[0] + (-0.826342111976)*x_ref[1]
        arg[(1, 2, 2)]=-0.849466721764*x[0] + (-0.367807482401)*x[1]
        ref[(1, 2, 2)]=-0.849466721764*x_ref[0] + (-0.367807482401)*x_ref[1]
        arg[(1, 2, 3)]=-0.944131607242*x[0] + (-0.860228995289)*x[1]
        ref[(1, 2, 3)]=-0.944131607242*x_ref[0] + (-0.860228995289)*x_ref[1]
        arg[(1, 3, 0)]=-0.174923422007*x[0] + (0.152007586582)*x[1]
        ref[(1, 3, 0)]=-0.174923422007*x_ref[0] + (0.152007586582)*x_ref[1]
        arg[(1, 3, 1)]=-0.723235310352*x[0] + (0.921510568917)*x[1]
        ref[(1, 3, 1)]=-0.723235310352*x_ref[0] + (0.921510568917)*x_ref[1]
        arg[(1, 3, 2)]=-0.736402425338*x[0] + (0.952463073038)*x[1]
        ref[(1, 3, 2)]=-0.736402425338*x_ref[0] + (0.952463073038)*x_ref[1]
        arg[(1, 3, 3)]=0.173263821114*x[0] + (0.935267688531)*x[1]
        ref[(1, 3, 3)]=0.173263821114*x_ref[0] + (0.935267688531)*x_ref[1]
        arg[(2, 0, 0)]=-0.393811134659*x[0] + (0.313702458882)*x[1]
        ref[(2, 0, 0)]=-0.393811134659*x_ref[0] + (0.313702458882)*x_ref[1]
        arg[(2, 0, 1)]=-0.484951456555*x[0] + (-0.938182193895)*x[1]
        ref[(2, 0, 1)]=-0.484951456555*x_ref[0] + (-0.938182193895)*x_ref[1]
        arg[(2, 0, 2)]=-0.632817538285*x[0] + (0.117795644482)*x[1]
        ref[(2, 0, 2)]=-0.632817538285*x_ref[0] + (0.117795644482)*x_ref[1]
        arg[(2, 0, 3)]=-0.59737041971*x[0] + (-0.252700410161)*x[1]
        ref[(2, 0, 3)]=-0.59737041971*x_ref[0] + (-0.252700410161)*x_ref[1]
        arg[(2, 1, 0)]=0.29110296658*x[0] + (-0.288743359536)*x[1]
        ref[(2, 1, 0)]=0.29110296658*x_ref[0] + (-0.288743359536)*x_ref[1]
        arg[(2, 1, 1)]=0.777106221293*x[0] + (-0.985217272328)*x[1]
        ref[(2, 1, 1)]=0.777106221293*x_ref[0] + (-0.985217272328)*x_ref[1]
        arg[(2, 1, 2)]=-0.344344378324*x[0] + (0.414015998183)*x[1]
        ref[(2, 1, 2)]=-0.344344378324*x_ref[0] + (0.414015998183)*x_ref[1]
        arg[(2, 1, 3)]=-0.924063877453*x[0] + (0.329510312508)*x[1]
        ref[(2, 1, 3)]=-0.924063877453*x_ref[0] + (0.329510312508)*x_ref[1]
        arg[(2, 2, 0)]=0.210581032086*x[0] + (0.433721869147)*x[1]
        ref[(2, 2, 0)]=0.210581032086*x_ref[0] + (0.433721869147)*x_ref[1]
        arg[(2, 2, 1)]=-0.026110900512*x[0] + (0.178077747703)*x[1]
        ref[(2, 2, 1)]=-0.026110900512*x_ref[0] + (0.178077747703)*x_ref[1]
        arg[(2, 2, 2)]=-0.693895419456*x[0] + (0.240861015561)*x[1]
        ref[(2, 2, 2)]=-0.693895419456*x_ref[0] + (0.240861015561)*x_ref[1]
        arg[(2, 2, 3)]=0.251527747511*x[0] + (-0.704288601858)*x[1]
        ref[(2, 2, 3)]=0.251527747511*x_ref[0] + (-0.704288601858)*x_ref[1]
        arg[(2, 3, 0)]=0.296113972573*x[0] + (-0.993391117138)*x[1]
        ref[(2, 3, 0)]=0.296113972573*x_ref[0] + (-0.993391117138)*x_ref[1]
        arg[(2, 3, 1)]=0.974558967177*x[0] + (-0.265733658612)*x[1]
        ref[(2, 3, 1)]=0.974558967177*x_ref[0] + (-0.265733658612)*x_ref[1]
        arg[(2, 3, 2)]=-0.450713128545*x[0] + (-0.265840628187)*x[1]
        ref[(2, 3, 2)]=-0.450713128545*x_ref[0] + (-0.265840628187)*x_ref[1]
        arg[(2, 3, 3)]=0.0929113791465*x[0] + (-0.553204075784)*x[1]
        ref[(2, 3, 3)]=0.0929113791465*x_ref[0] + (-0.553204075784)*x_ref[1]
        arg[(3, 0, 0)]=0.634150578044*x[0] + (0.0378806047732)*x[1]
        ref[(3, 0, 0)]=0.634150578044*x_ref[0] + (0.0378806047732)*x_ref[1]
        arg[(3, 0, 1)]=0.822691228673*x[0] + (0.519079209462)*x[1]
        ref[(3, 0, 1)]=0.822691228673*x_ref[0] + (0.519079209462)*x_ref[1]
        arg[(3, 0, 2)]=0.477074004965*x[0] + (-0.979197869144)*x[1]
        ref[(3, 0, 2)]=0.477074004965*x_ref[0] + (-0.979197869144)*x_ref[1]
        arg[(3, 0, 3)]=0.121873242544*x[0] + (0.0364238689649)*x[1]
        ref[(3, 0, 3)]=0.121873242544*x_ref[0] + (0.0364238689649)*x_ref[1]
        arg[(3, 1, 0)]=-0.755477231939*x[0] + (0.958930176391)*x[1]
        ref[(3, 1, 0)]=-0.755477231939*x_ref[0] + (0.958930176391)*x_ref[1]
        arg[(3, 1, 1)]=-0.83910614781*x[0] + (0.929155804964)*x[1]
        ref[(3, 1, 1)]=-0.83910614781*x_ref[0] + (0.929155804964)*x_ref[1]
        arg[(3, 1, 2)]=0.105443760116*x[0] + (0.0928013210847)*x[1]
        ref[(3, 1, 2)]=0.105443760116*x_ref[0] + (0.0928013210847)*x_ref[1]
        arg[(3, 1, 3)]=-0.877125543387*x[0] + (0.150703629437)*x[1]
        ref[(3, 1, 3)]=-0.877125543387*x_ref[0] + (0.150703629437)*x_ref[1]
        arg[(3, 2, 0)]=-0.258625502615*x[0] + (0.155168618579)*x[1]
        ref[(3, 2, 0)]=-0.258625502615*x_ref[0] + (0.155168618579)*x_ref[1]
        arg[(3, 2, 1)]=0.393379956028*x[0] + (0.979685003657)*x[1]
        ref[(3, 2, 1)]=0.393379956028*x_ref[0] + (0.979685003657)*x_ref[1]
        arg[(3, 2, 2)]=-0.438857072303*x[0] + (-0.0876105030939)*x[1]
        ref[(3, 2, 2)]=-0.438857072303*x_ref[0] + (-0.0876105030939)*x_ref[1]
        arg[(3, 2, 3)]=0.074076352062*x[0] + (0.443995833158)*x[1]
        ref[(3, 2, 3)]=0.074076352062*x_ref[0] + (0.443995833158)*x_ref[1]
        arg[(3, 3, 0)]=-0.107366966672*x[0] + (-0.0882956075047)*x[1]
        ref[(3, 3, 0)]=-0.107366966672*x_ref[0] + (-0.0882956075047)*x_ref[1]
        arg[(3, 3, 1)]=-0.412435469022*x[0] + (-0.234645705186)*x[1]
        ref[(3, 3, 1)]=-0.412435469022*x_ref[0] + (-0.234645705186)*x_ref[1]
        arg[(3, 3, 2)]=-0.174017936277*x[0] + (0.200693536305)*x[1]
        ref[(3, 3, 2)]=-0.174017936277*x_ref[0] + (0.200693536305)*x_ref[1]
        arg[(3, 3, 3)]=0.907057167668*x[0] + (-0.283320485472)*x[1]
        ref[(3, 3, 3)]=0.907057167668*x_ref[0] + (-0.283320485472)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.272583652964*x[2]
            ref[(0, 0, 0)]+=-0.272583652964*x_ref[2]
            arg[(0, 0, 1)]+=-0.190682476985*x[2]
            ref[(0, 0, 1)]+=-0.190682476985*x_ref[2]
            arg[(0, 0, 2)]+=-0.520032338097*x[2]
            ref[(0, 0, 2)]+=-0.520032338097*x_ref[2]
            arg[(0, 0, 3)]+=0.587224880911*x[2]
            ref[(0, 0, 3)]+=0.587224880911*x_ref[2]
            arg[(0, 1, 0)]+=-0.157780072042*x[2]
            ref[(0, 1, 0)]+=-0.157780072042*x_ref[2]
            arg[(0, 1, 1)]+=0.264868660994*x[2]
            ref[(0, 1, 1)]+=0.264868660994*x_ref[2]
            arg[(0, 1, 2)]+=0.330897548491*x[2]
            ref[(0, 1, 2)]+=0.330897548491*x_ref[2]
            arg[(0, 1, 3)]+=0.677085259977*x[2]
            ref[(0, 1, 3)]+=0.677085259977*x_ref[2]
            arg[(0, 2, 0)]+=0.879523564729*x[2]
            ref[(0, 2, 0)]+=0.879523564729*x_ref[2]
            arg[(0, 2, 1)]+=0.0143972914443*x[2]
            ref[(0, 2, 1)]+=0.0143972914443*x_ref[2]
            arg[(0, 2, 2)]+=0.508105110064*x[2]
            ref[(0, 2, 2)]+=0.508105110064*x_ref[2]
            arg[(0, 2, 3)]+=0.455270644207*x[2]
            ref[(0, 2, 3)]+=0.455270644207*x_ref[2]
            arg[(0, 3, 0)]+=0.637227798886*x[2]
            ref[(0, 3, 0)]+=0.637227798886*x_ref[2]
            arg[(0, 3, 1)]+=-0.550210672537*x[2]
            ref[(0, 3, 1)]+=-0.550210672537*x_ref[2]
            arg[(0, 3, 2)]+=0.00567529304651*x[2]
            ref[(0, 3, 2)]+=0.00567529304651*x_ref[2]
            arg[(0, 3, 3)]+=0.501028459571*x[2]
            ref[(0, 3, 3)]+=0.501028459571*x_ref[2]
            arg[(1, 0, 0)]+=0.473320067272*x[2]
            ref[(1, 0, 0)]+=0.473320067272*x_ref[2]
            arg[(1, 0, 1)]+=0.926523601754*x[2]
            ref[(1, 0, 1)]+=0.926523601754*x_ref[2]
            arg[(1, 0, 2)]+=0.520385033721*x[2]
            ref[(1, 0, 2)]+=0.520385033721*x_ref[2]
            arg[(1, 0, 3)]+=-0.136087212826*x[2]
            ref[(1, 0, 3)]+=-0.136087212826*x_ref[2]
            arg[(1, 1, 0)]+=-0.94902198549*x[2]
            ref[(1, 1, 0)]+=-0.94902198549*x_ref[2]
            arg[(1, 1, 1)]+=0.0959932096982*x[2]
            ref[(1, 1, 1)]+=0.0959932096982*x_ref[2]
            arg[(1, 1, 2)]+=0.998037771795*x[2]
            ref[(1, 1, 2)]+=0.998037771795*x_ref[2]
            arg[(1, 1, 3)]+=0.971985241843*x[2]
            ref[(1, 1, 3)]+=0.971985241843*x_ref[2]
            arg[(1, 2, 0)]+=-0.199636427083*x[2]
            ref[(1, 2, 0)]+=-0.199636427083*x_ref[2]
            arg[(1, 2, 1)]+=0.343488103604*x[2]
            ref[(1, 2, 1)]+=0.343488103604*x_ref[2]
            arg[(1, 2, 2)]+=0.860621900433*x[2]
            ref[(1, 2, 2)]+=0.860621900433*x_ref[2]
            arg[(1, 2, 3)]+=-0.409353635804*x[2]
            ref[(1, 2, 3)]+=-0.409353635804*x_ref[2]
            arg[(1, 3, 0)]+=0.720409266545*x[2]
            ref[(1, 3, 0)]+=0.720409266545*x_ref[2]
            arg[(1, 3, 1)]+=0.393788054814*x[2]
            ref[(1, 3, 1)]+=0.393788054814*x_ref[2]
            arg[(1, 3, 2)]+=-0.642702724886*x[2]
            ref[(1, 3, 2)]+=-0.642702724886*x_ref[2]
            arg[(1, 3, 3)]+=0.379200823686*x[2]
            ref[(1, 3, 3)]+=0.379200823686*x_ref[2]
            arg[(2, 0, 0)]+=0.564533484661*x[2]
            ref[(2, 0, 0)]+=0.564533484661*x_ref[2]
            arg[(2, 0, 1)]+=-0.075633776099*x[2]
            ref[(2, 0, 1)]+=-0.075633776099*x_ref[2]
            arg[(2, 0, 2)]+=0.66444845118*x[2]
            ref[(2, 0, 2)]+=0.66444845118*x_ref[2]
            arg[(2, 0, 3)]+=-0.0839853877303*x[2]
            ref[(2, 0, 3)]+=-0.0839853877303*x_ref[2]
            arg[(2, 1, 0)]+=0.242793332564*x[2]
            ref[(2, 1, 0)]+=0.242793332564*x_ref[2]
            arg[(2, 1, 1)]+=-0.77223603544*x[2]
            ref[(2, 1, 1)]+=-0.77223603544*x_ref[2]
            arg[(2, 1, 2)]+=0.576658716108*x[2]
            ref[(2, 1, 2)]+=0.576658716108*x_ref[2]
            arg[(2, 1, 3)]+=0.841788966745*x[2]
            ref[(2, 1, 3)]+=0.841788966745*x_ref[2]
            arg[(2, 2, 0)]+=0.867809370734*x[2]
            ref[(2, 2, 0)]+=0.867809370734*x_ref[2]
            arg[(2, 2, 1)]+=-0.109004316044*x[2]
            ref[(2, 2, 1)]+=-0.109004316044*x_ref[2]
            arg[(2, 2, 2)]+=0.772259168508*x[2]
            ref[(2, 2, 2)]+=0.772259168508*x_ref[2]
            arg[(2, 2, 3)]+=-0.464833738349*x[2]
            ref[(2, 2, 3)]+=-0.464833738349*x_ref[2]
            arg[(2, 3, 0)]+=0.375901189937*x[2]
            ref[(2, 3, 0)]+=0.375901189937*x_ref[2]
            arg[(2, 3, 1)]+=0.979210197865*x[2]
            ref[(2, 3, 1)]+=0.979210197865*x_ref[2]
            arg[(2, 3, 2)]+=0.563255728761*x[2]
            ref[(2, 3, 2)]+=0.563255728761*x_ref[2]
            arg[(2, 3, 3)]+=0.679980295425*x[2]
            ref[(2, 3, 3)]+=0.679980295425*x_ref[2]
            arg[(3, 0, 0)]+=0.644997922366*x[2]
            ref[(3, 0, 0)]+=0.644997922366*x_ref[2]
            arg[(3, 0, 1)]+=0.999580383012*x[2]
            ref[(3, 0, 1)]+=0.999580383012*x_ref[2]
            arg[(3, 0, 2)]+=0.208479011146*x[2]
            ref[(3, 0, 2)]+=0.208479011146*x_ref[2]
            arg[(3, 0, 3)]+=-0.901365050858*x[2]
            ref[(3, 0, 3)]+=-0.901365050858*x_ref[2]
            arg[(3, 1, 0)]+=0.884950543936*x[2]
            ref[(3, 1, 0)]+=0.884950543936*x_ref[2]
            arg[(3, 1, 1)]+=0.93767294827*x[2]
            ref[(3, 1, 1)]+=0.93767294827*x_ref[2]
            arg[(3, 1, 2)]+=0.0950477100304*x[2]
            ref[(3, 1, 2)]+=0.0950477100304*x_ref[2]
            arg[(3, 1, 3)]+=-0.248335714822*x[2]
            ref[(3, 1, 3)]+=-0.248335714822*x_ref[2]
            arg[(3, 2, 0)]+=0.133975444433*x[2]
            ref[(3, 2, 0)]+=0.133975444433*x_ref[2]
            arg[(3, 2, 1)]+=-0.99615640055*x[2]
            ref[(3, 2, 1)]+=-0.99615640055*x_ref[2]
            arg[(3, 2, 2)]+=-0.142657896449*x[2]
            ref[(3, 2, 2)]+=-0.142657896449*x_ref[2]
            arg[(3, 2, 3)]+=-0.258528158478*x[2]
            ref[(3, 2, 3)]+=-0.258528158478*x_ref[2]
            arg[(3, 3, 0)]+=0.241763540067*x[2]
            ref[(3, 3, 0)]+=0.241763540067*x_ref[2]
            arg[(3, 3, 1)]+=0.647957714685*x[2]
            ref[(3, 3, 1)]+=0.647957714685*x_ref[2]
            arg[(3, 3, 2)]+=0.30962047733*x[2]
            ref[(3, 3, 2)]+=0.30962047733*x_ref[2]
            arg[(3, 3, 3)]+=-0.853222210263*x[2]
            ref[(3, 3, 3)]+=-0.853222210263*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_ReducedSolution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedSolution

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 2, 2),w)
        ref = Data(0,(4, 3, 2, 2),w_ref)
        arg[(0, 0, 0, 0)]=0.471387391298*x[0] + (-0.435824371618)*x[1]
        ref[(0, 0, 0, 0)]=0.471387391298*x_ref[0] + (-0.435824371618)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.341815973089*x[0] + (-0.114788384106)*x[1]
        ref[(0, 0, 0, 1)]=0.341815973089*x_ref[0] + (-0.114788384106)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.725802648666*x[0] + (0.579415717337)*x[1]
        ref[(0, 0, 1, 0)]=0.725802648666*x_ref[0] + (0.579415717337)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.144943344992*x[0] + (0.218990980203)*x[1]
        ref[(0, 0, 1, 1)]=0.144943344992*x_ref[0] + (0.218990980203)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.489381881836*x[0] + (-0.0686249653886)*x[1]
        ref[(0, 1, 0, 0)]=-0.489381881836*x_ref[0] + (-0.0686249653886)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.145703158475*x[0] + (0.720116635888)*x[1]
        ref[(0, 1, 0, 1)]=0.145703158475*x_ref[0] + (0.720116635888)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.10854335273*x[0] + (0.0642677188489)*x[1]
        ref[(0, 1, 1, 0)]=0.10854335273*x_ref[0] + (0.0642677188489)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.0693703988217*x[0] + (0.927040708691)*x[1]
        ref[(0, 1, 1, 1)]=-0.0693703988217*x_ref[0] + (0.927040708691)*x_ref[1]
        arg[(0, 2, 0, 0)]=0.403357052687*x[0] + (-0.944890172263)*x[1]
        ref[(0, 2, 0, 0)]=0.403357052687*x_ref[0] + (-0.944890172263)*x_ref[1]
        arg[(0, 2, 0, 1)]=-0.795103035681*x[0] + (-0.535960077685)*x[1]
        ref[(0, 2, 0, 1)]=-0.795103035681*x_ref[0] + (-0.535960077685)*x_ref[1]
        arg[(0, 2, 1, 0)]=-0.829200934448*x[0] + (0.141503932084)*x[1]
        ref[(0, 2, 1, 0)]=-0.829200934448*x_ref[0] + (0.141503932084)*x_ref[1]
        arg[(0, 2, 1, 1)]=0.307550656977*x[0] + (0.163029389678)*x[1]
        ref[(0, 2, 1, 1)]=0.307550656977*x_ref[0] + (0.163029389678)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.924744105518*x[0] + (0.835409939272)*x[1]
        ref[(1, 0, 0, 0)]=0.924744105518*x_ref[0] + (0.835409939272)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.833072379769*x[0] + (-0.908384929619)*x[1]
        ref[(1, 0, 0, 1)]=0.833072379769*x_ref[0] + (-0.908384929619)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.214235249898*x[0] + (-0.959111900739)*x[1]
        ref[(1, 0, 1, 0)]=-0.214235249898*x_ref[0] + (-0.959111900739)*x_ref[1]
        arg[(1, 0, 1, 1)]=-0.528127961217*x[0] + (0.925928142849)*x[1]
        ref[(1, 0, 1, 1)]=-0.528127961217*x_ref[0] + (0.925928142849)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.842936352843*x[0] + (0.151807965058)*x[1]
        ref[(1, 1, 0, 0)]=-0.842936352843*x_ref[0] + (0.151807965058)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.829597501628*x[0] + (0.48600177406)*x[1]
        ref[(1, 1, 0, 1)]=0.829597501628*x_ref[0] + (0.48600177406)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.494956134104*x[0] + (0.114634751701)*x[1]
        ref[(1, 1, 1, 0)]=-0.494956134104*x_ref[0] + (0.114634751701)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.408330186245*x[0] + (0.783782747339)*x[1]
        ref[(1, 1, 1, 1)]=0.408330186245*x_ref[0] + (0.783782747339)*x_ref[1]
        arg[(1, 2, 0, 0)]=0.0180265185352*x[0] + (-0.363082384723)*x[1]
        ref[(1, 2, 0, 0)]=0.0180265185352*x_ref[0] + (-0.363082384723)*x_ref[1]
        arg[(1, 2, 0, 1)]=-0.0190544348978*x[0] + (-0.115432496122)*x[1]
        ref[(1, 2, 0, 1)]=-0.0190544348978*x_ref[0] + (-0.115432496122)*x_ref[1]
        arg[(1, 2, 1, 0)]=0.549489969725*x[0] + (-0.937219092156)*x[1]
        ref[(1, 2, 1, 0)]=0.549489969725*x_ref[0] + (-0.937219092156)*x_ref[1]
        arg[(1, 2, 1, 1)]=-0.171910268123*x[0] + (0.423076617924)*x[1]
        ref[(1, 2, 1, 1)]=-0.171910268123*x_ref[0] + (0.423076617924)*x_ref[1]
        arg[(2, 0, 0, 0)]=-0.485424755678*x[0] + (-0.903531924576)*x[1]
        ref[(2, 0, 0, 0)]=-0.485424755678*x_ref[0] + (-0.903531924576)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.184668006201*x[0] + (0.588572199297)*x[1]
        ref[(2, 0, 0, 1)]=0.184668006201*x_ref[0] + (0.588572199297)*x_ref[1]
        arg[(2, 0, 1, 0)]=-0.628562266222*x[0] + (-0.112657397382)*x[1]
        ref[(2, 0, 1, 0)]=-0.628562266222*x_ref[0] + (-0.112657397382)*x_ref[1]
        arg[(2, 0, 1, 1)]=-0.00880895629712*x[0] + (0.471125764969)*x[1]
        ref[(2, 0, 1, 1)]=-0.00880895629712*x_ref[0] + (0.471125764969)*x_ref[1]
        arg[(2, 1, 0, 0)]=-0.244142527344*x[0] + (-0.166948933841)*x[1]
        ref[(2, 1, 0, 0)]=-0.244142527344*x_ref[0] + (-0.166948933841)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.0896274661506*x[0] + (0.681909362669)*x[1]
        ref[(2, 1, 0, 1)]=0.0896274661506*x_ref[0] + (0.681909362669)*x_ref[1]
        arg[(2, 1, 1, 0)]=0.4618230031*x[0] + (0.0215334106864)*x[1]
        ref[(2, 1, 1, 0)]=0.4618230031*x_ref[0] + (0.0215334106864)*x_ref[1]
        arg[(2, 1, 1, 1)]=0.137770967338*x[0] + (0.293922187861)*x[1]
        ref[(2, 1, 1, 1)]=0.137770967338*x_ref[0] + (0.293922187861)*x_ref[1]
        arg[(2, 2, 0, 0)]=-0.883739279152*x[0] + (0.385678431384)*x[1]
        ref[(2, 2, 0, 0)]=-0.883739279152*x_ref[0] + (0.385678431384)*x_ref[1]
        arg[(2, 2, 0, 1)]=0.34352436134*x[0] + (-0.0634767429527)*x[1]
        ref[(2, 2, 0, 1)]=0.34352436134*x_ref[0] + (-0.0634767429527)*x_ref[1]
        arg[(2, 2, 1, 0)]=-0.315207348*x[0] + (-0.209598720621)*x[1]
        ref[(2, 2, 1, 0)]=-0.315207348*x_ref[0] + (-0.209598720621)*x_ref[1]
        arg[(2, 2, 1, 1)]=0.654960024169*x[0] + (-0.211787809194)*x[1]
        ref[(2, 2, 1, 1)]=0.654960024169*x_ref[0] + (-0.211787809194)*x_ref[1]
        arg[(3, 0, 0, 0)]=-0.837044876291*x[0] + (0.172696441895)*x[1]
        ref[(3, 0, 0, 0)]=-0.837044876291*x_ref[0] + (0.172696441895)*x_ref[1]
        arg[(3, 0, 0, 1)]=-0.752055808903*x[0] + (-0.436125675676)*x[1]
        ref[(3, 0, 0, 1)]=-0.752055808903*x_ref[0] + (-0.436125675676)*x_ref[1]
        arg[(3, 0, 1, 0)]=0.491205770525*x[0] + (-0.0207959076521)*x[1]
        ref[(3, 0, 1, 0)]=0.491205770525*x_ref[0] + (-0.0207959076521)*x_ref[1]
        arg[(3, 0, 1, 1)]=-0.602835203983*x[0] + (0.504913577676)*x[1]
        ref[(3, 0, 1, 1)]=-0.602835203983*x_ref[0] + (0.504913577676)*x_ref[1]
        arg[(3, 1, 0, 0)]=0.252180106573*x[0] + (0.0602677415308)*x[1]
        ref[(3, 1, 0, 0)]=0.252180106573*x_ref[0] + (0.0602677415308)*x_ref[1]
        arg[(3, 1, 0, 1)]=0.40967582075*x[0] + (-0.663529739527)*x[1]
        ref[(3, 1, 0, 1)]=0.40967582075*x_ref[0] + (-0.663529739527)*x_ref[1]
        arg[(3, 1, 1, 0)]=0.432152830786*x[0] + (0.455975628326)*x[1]
        ref[(3, 1, 1, 0)]=0.432152830786*x_ref[0] + (0.455975628326)*x_ref[1]
        arg[(3, 1, 1, 1)]=-0.701886389809*x[0] + (-0.165982533957)*x[1]
        ref[(3, 1, 1, 1)]=-0.701886389809*x_ref[0] + (-0.165982533957)*x_ref[1]
        arg[(3, 2, 0, 0)]=0.282879450845*x[0] + (-0.192836656176)*x[1]
        ref[(3, 2, 0, 0)]=0.282879450845*x_ref[0] + (-0.192836656176)*x_ref[1]
        arg[(3, 2, 0, 1)]=-0.728600575951*x[0] + (-0.198688675293)*x[1]
        ref[(3, 2, 0, 1)]=-0.728600575951*x_ref[0] + (-0.198688675293)*x_ref[1]
        arg[(3, 2, 1, 0)]=0.185627152445*x[0] + (0.122963176525)*x[1]
        ref[(3, 2, 1, 0)]=0.185627152445*x_ref[0] + (0.122963176525)*x_ref[1]
        arg[(3, 2, 1, 1)]=-0.884639601861*x[0] + (-0.471293782372)*x[1]
        ref[(3, 2, 1, 1)]=-0.884639601861*x_ref[0] + (-0.471293782372)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.603195222473*x[2]
            ref[(0, 0, 0, 0)]+=0.603195222473*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.566464795899*x[2]
            ref[(0, 0, 0, 1)]+=0.566464795899*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.353884686457*x[2]
            ref[(0, 0, 1, 0)]+=0.353884686457*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.192657588944*x[2]
            ref[(0, 0, 1, 1)]+=-0.192657588944*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.43267814346*x[2]
            ref[(0, 1, 0, 0)]+=-0.43267814346*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.761062538576*x[2]
            ref[(0, 1, 0, 1)]+=0.761062538576*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.54193733618*x[2]
            ref[(0, 1, 1, 0)]+=-0.54193733618*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.666076502276*x[2]
            ref[(0, 1, 1, 1)]+=-0.666076502276*x_ref[2]
            arg[(0, 2, 0, 0)]+=0.12020605612*x[2]
            ref[(0, 2, 0, 0)]+=0.12020605612*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.760925272478*x[2]
            ref[(0, 2, 0, 1)]+=-0.760925272478*x_ref[2]
            arg[(0, 2, 1, 0)]+=0.442853043212*x[2]
            ref[(0, 2, 1, 0)]+=0.442853043212*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.388527746615*x[2]
            ref[(0, 2, 1, 1)]+=-0.388527746615*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.182978451002*x[2]
            ref[(1, 0, 0, 0)]+=0.182978451002*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.323128860947*x[2]
            ref[(1, 0, 0, 1)]+=0.323128860947*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.802812957598*x[2]
            ref[(1, 0, 1, 0)]+=-0.802812957598*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.880997806359*x[2]
            ref[(1, 0, 1, 1)]+=0.880997806359*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.0218583170515*x[2]
            ref[(1, 1, 0, 0)]+=0.0218583170515*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.970876818855*x[2]
            ref[(1, 1, 0, 1)]+=-0.970876818855*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.295866459525*x[2]
            ref[(1, 1, 1, 0)]+=0.295866459525*x_ref[2]
            arg[(1, 1, 1, 1)]+=-0.521006634528*x[2]
            ref[(1, 1, 1, 1)]+=-0.521006634528*x_ref[2]
            arg[(1, 2, 0, 0)]+=-0.217859576856*x[2]
            ref[(1, 2, 0, 0)]+=-0.217859576856*x_ref[2]
            arg[(1, 2, 0, 1)]+=-0.520690411607*x[2]
            ref[(1, 2, 0, 1)]+=-0.520690411607*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.0129294754369*x[2]
            ref[(1, 2, 1, 0)]+=0.0129294754369*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.386856554522*x[2]
            ref[(1, 2, 1, 1)]+=0.386856554522*x_ref[2]
            arg[(2, 0, 0, 0)]+=0.874966099769*x[2]
            ref[(2, 0, 0, 0)]+=0.874966099769*x_ref[2]
            arg[(2, 0, 0, 1)]+=0.685451790883*x[2]
            ref[(2, 0, 0, 1)]+=0.685451790883*x_ref[2]
            arg[(2, 0, 1, 0)]+=0.853195143696*x[2]
            ref[(2, 0, 1, 0)]+=0.853195143696*x_ref[2]
            arg[(2, 0, 1, 1)]+=-0.0957202278551*x[2]
            ref[(2, 0, 1, 1)]+=-0.0957202278551*x_ref[2]
            arg[(2, 1, 0, 0)]+=0.619595503959*x[2]
            ref[(2, 1, 0, 0)]+=0.619595503959*x_ref[2]
            arg[(2, 1, 0, 1)]+=0.498757353667*x[2]
            ref[(2, 1, 0, 1)]+=0.498757353667*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.620992182439*x[2]
            ref[(2, 1, 1, 0)]+=0.620992182439*x_ref[2]
            arg[(2, 1, 1, 1)]+=-0.933605240455*x[2]
            ref[(2, 1, 1, 1)]+=-0.933605240455*x_ref[2]
            arg[(2, 2, 0, 0)]+=0.414795309253*x[2]
            ref[(2, 2, 0, 0)]+=0.414795309253*x_ref[2]
            arg[(2, 2, 0, 1)]+=-0.547944539709*x[2]
            ref[(2, 2, 0, 1)]+=-0.547944539709*x_ref[2]
            arg[(2, 2, 1, 0)]+=0.631594777065*x[2]
            ref[(2, 2, 1, 0)]+=0.631594777065*x_ref[2]
            arg[(2, 2, 1, 1)]+=0.474233602924*x[2]
            ref[(2, 2, 1, 1)]+=0.474233602924*x_ref[2]
            arg[(3, 0, 0, 0)]+=0.557764378521*x[2]
            ref[(3, 0, 0, 0)]+=0.557764378521*x_ref[2]
            arg[(3, 0, 0, 1)]+=0.660283529032*x[2]
            ref[(3, 0, 0, 1)]+=0.660283529032*x_ref[2]
            arg[(3, 0, 1, 0)]+=-0.891775254169*x[2]
            ref[(3, 0, 1, 0)]+=-0.891775254169*x_ref[2]
            arg[(3, 0, 1, 1)]+=-0.560576139488*x[2]
            ref[(3, 0, 1, 1)]+=-0.560576139488*x_ref[2]
            arg[(3, 1, 0, 0)]+=-0.814340524415*x[2]
            ref[(3, 1, 0, 0)]+=-0.814340524415*x_ref[2]
            arg[(3, 1, 0, 1)]+=0.305493868075*x[2]
            ref[(3, 1, 0, 1)]+=0.305493868075*x_ref[2]
            arg[(3, 1, 1, 0)]+=0.917447149418*x[2]
            ref[(3, 1, 1, 0)]+=0.917447149418*x_ref[2]
            arg[(3, 1, 1, 1)]+=0.7468337303*x[2]
            ref[(3, 1, 1, 1)]+=0.7468337303*x_ref[2]
            arg[(3, 2, 0, 0)]+=-0.988562363643*x[2]
            ref[(3, 2, 0, 0)]+=-0.988562363643*x_ref[2]
            arg[(3, 2, 0, 1)]+=-0.291822724775*x[2]
            ref[(3, 2, 0, 1)]+=-0.291822724775*x_ref[2]
            arg[(3, 2, 1, 0)]+=-0.10762588072*x[2]
            ref[(3, 2, 1, 0)]+=-0.10762588072*x_ref[2]
            arg[(3, 2, 1, 1)]+=0.0219135922262*x[2]
            ref[(3, 2, 1, 1)]+=0.0219135922262*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedSolution

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.585654201094*x[0] + (-0.546634749206)*x[1]
        ref=-0.585654201094*x_ref[0] + (-0.546634749206)*x_ref[1]
        if dim==3:
            arg+=(0.660675878729)*x[2]
            ref+=(0.660675878729)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedSolution

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=0.253564491796*x[0] + (0.465693007369)*x[1]
        ref[(0,)]=0.253564491796*x_ref[0] + (0.465693007369)*x_ref[1]
        arg[(1,)]=0.18095075812*x[0] + (-0.0661561338306)*x[1]
        ref[(1,)]=0.18095075812*x_ref[0] + (-0.0661561338306)*x_ref[1]
        arg[(2,)]=-0.0716581918538*x[0] + (-0.743722329241)*x[1]
        ref[(2,)]=-0.0716581918538*x_ref[0] + (-0.743722329241)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.199926543094*x[2]
            ref[(0,)]+=-0.199926543094*x_ref[2]
            arg[(1,)]+=-0.937836843002*x[2]
            ref[(1,)]+=-0.937836843002*x_ref[2]
            arg[(2,)]+=-0.905529203011*x[2]
            ref[(2,)]+=-0.905529203011*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedSolution

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref = Data(0,(3, 4),w_ref)
        arg[(0, 0)]=-0.0973643949455*x[0] + (0.938905228413)*x[1]
        ref[(0, 0)]=-0.0973643949455*x_ref[0] + (0.938905228413)*x_ref[1]
        arg[(0, 1)]=-0.903400013319*x[0] + (-0.624948295964)*x[1]
        ref[(0, 1)]=-0.903400013319*x_ref[0] + (-0.624948295964)*x_ref[1]
        arg[(0, 2)]=0.928892663663*x[0] + (-0.456852258424)*x[1]
        ref[(0, 2)]=0.928892663663*x_ref[0] + (-0.456852258424)*x_ref[1]
        arg[(0, 3)]=-0.193377550447*x[0] + (-0.760216596867)*x[1]
        ref[(0, 3)]=-0.193377550447*x_ref[0] + (-0.760216596867)*x_ref[1]
        arg[(1, 0)]=0.776939404759*x[0] + (0.741863984738)*x[1]
        ref[(1, 0)]=0.776939404759*x_ref[0] + (0.741863984738)*x_ref[1]
        arg[(1, 1)]=-0.977290916889*x[0] + (0.742221260481)*x[1]
        ref[(1, 1)]=-0.977290916889*x_ref[0] + (0.742221260481)*x_ref[1]
        arg[(1, 2)]=0.224754066365*x[0] + (-0.526043405766)*x[1]
        ref[(1, 2)]=0.224754066365*x_ref[0] + (-0.526043405766)*x_ref[1]
        arg[(1, 3)]=-0.767595380232*x[0] + (-0.91048508987)*x[1]
        ref[(1, 3)]=-0.767595380232*x_ref[0] + (-0.91048508987)*x_ref[1]
        arg[(2, 0)]=0.579361430133*x[0] + (-0.408262073237)*x[1]
        ref[(2, 0)]=0.579361430133*x_ref[0] + (-0.408262073237)*x_ref[1]
        arg[(2, 1)]=0.975745279925*x[0] + (0.5030487808)*x[1]
        ref[(2, 1)]=0.975745279925*x_ref[0] + (0.5030487808)*x_ref[1]
        arg[(2, 2)]=-0.926207860551*x[0] + (0.23305263599)*x[1]
        ref[(2, 2)]=-0.926207860551*x_ref[0] + (0.23305263599)*x_ref[1]
        arg[(2, 3)]=-0.233299193235*x[0] + (-0.165288241586)*x[1]
        ref[(2, 3)]=-0.233299193235*x_ref[0] + (-0.165288241586)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.280625478891*x[2]
            ref[(0, 0)]+=0.280625478891*x_ref[2]
            arg[(0, 1)]+=-0.31675367192*x[2]
            ref[(0, 1)]+=-0.31675367192*x_ref[2]
            arg[(0, 2)]+=-0.53209082785*x[2]
            ref[(0, 2)]+=-0.53209082785*x_ref[2]
            arg[(0, 3)]+=-0.924594215533*x[2]
            ref[(0, 3)]+=-0.924594215533*x_ref[2]
            arg[(1, 0)]+=0.542470364929*x[2]
            ref[(1, 0)]+=0.542470364929*x_ref[2]
            arg[(1, 1)]+=-0.8494864236*x[2]
            ref[(1, 1)]+=-0.8494864236*x_ref[2]
            arg[(1, 2)]+=0.272952832744*x[2]
            ref[(1, 2)]+=0.272952832744*x_ref[2]
            arg[(1, 3)]+=0.252531464598*x[2]
            ref[(1, 3)]+=0.252531464598*x_ref[2]
            arg[(2, 0)]+=0.503403092379*x[2]
            ref[(2, 0)]+=0.503403092379*x_ref[2]
            arg[(2, 1)]+=-0.930300046731*x[2]
            ref[(2, 1)]+=-0.930300046731*x_ref[2]
            arg[(2, 2)]+=-0.669597322959*x[2]
            ref[(2, 2)]+=-0.669597322959*x_ref[2]
            arg[(2, 3)]+=0.16362480049*x[2]
            ref[(2, 3)]+=0.16362480049*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedSolution

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 2),w)
        ref = Data(0,(4, 2, 2),w_ref)
        arg[(0, 0, 0)]=-0.199413368057*x[0] + (0.718598149383)*x[1]
        ref[(0, 0, 0)]=-0.199413368057*x_ref[0] + (0.718598149383)*x_ref[1]
        arg[(0, 0, 1)]=0.121141297648*x[0] + (-0.967854912401)*x[1]
        ref[(0, 0, 1)]=0.121141297648*x_ref[0] + (-0.967854912401)*x_ref[1]
        arg[(0, 1, 0)]=-0.623051183289*x[0] + (0.501274281213)*x[1]
        ref[(0, 1, 0)]=-0.623051183289*x_ref[0] + (0.501274281213)*x_ref[1]
        arg[(0, 1, 1)]=0.782541566075*x[0] + (-0.734947571901)*x[1]
        ref[(0, 1, 1)]=0.782541566075*x_ref[0] + (-0.734947571901)*x_ref[1]
        arg[(1, 0, 0)]=0.249043034384*x[0] + (0.180480513868)*x[1]
        ref[(1, 0, 0)]=0.249043034384*x_ref[0] + (0.180480513868)*x_ref[1]
        arg[(1, 0, 1)]=-0.0111548999729*x[0] + (0.233798886011)*x[1]
        ref[(1, 0, 1)]=-0.0111548999729*x_ref[0] + (0.233798886011)*x_ref[1]
        arg[(1, 1, 0)]=0.191024061618*x[0] + (-0.010607352492)*x[1]
        ref[(1, 1, 0)]=0.191024061618*x_ref[0] + (-0.010607352492)*x_ref[1]
        arg[(1, 1, 1)]=0.650805437967*x[0] + (0.550089653885)*x[1]
        ref[(1, 1, 1)]=0.650805437967*x_ref[0] + (0.550089653885)*x_ref[1]
        arg[(2, 0, 0)]=-0.50935748409*x[0] + (-0.634491477283)*x[1]
        ref[(2, 0, 0)]=-0.50935748409*x_ref[0] + (-0.634491477283)*x_ref[1]
        arg[(2, 0, 1)]=-0.374171074746*x[0] + (-0.982620127795)*x[1]
        ref[(2, 0, 1)]=-0.374171074746*x_ref[0] + (-0.982620127795)*x_ref[1]
        arg[(2, 1, 0)]=-0.77837810523*x[0] + (0.422988616878)*x[1]
        ref[(2, 1, 0)]=-0.77837810523*x_ref[0] + (0.422988616878)*x_ref[1]
        arg[(2, 1, 1)]=-0.0856307229181*x[0] + (-0.1025201811)*x[1]
        ref[(2, 1, 1)]=-0.0856307229181*x_ref[0] + (-0.1025201811)*x_ref[1]
        arg[(3, 0, 0)]=-0.355018132047*x[0] + (-0.0852499207025)*x[1]
        ref[(3, 0, 0)]=-0.355018132047*x_ref[0] + (-0.0852499207025)*x_ref[1]
        arg[(3, 0, 1)]=0.858871270476*x[0] + (-0.561610717959)*x[1]
        ref[(3, 0, 1)]=0.858871270476*x_ref[0] + (-0.561610717959)*x_ref[1]
        arg[(3, 1, 0)]=-0.517510424647*x[0] + (0.223878012641)*x[1]
        ref[(3, 1, 0)]=-0.517510424647*x_ref[0] + (0.223878012641)*x_ref[1]
        arg[(3, 1, 1)]=-0.254388516025*x[0] + (0.457298789124)*x[1]
        ref[(3, 1, 1)]=-0.254388516025*x_ref[0] + (0.457298789124)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.280798123459*x[2]
            ref[(0, 0, 0)]+=-0.280798123459*x_ref[2]
            arg[(0, 0, 1)]+=-0.497211129136*x[2]
            ref[(0, 0, 1)]+=-0.497211129136*x_ref[2]
            arg[(0, 1, 0)]+=0.548463648011*x[2]
            ref[(0, 1, 0)]+=0.548463648011*x_ref[2]
            arg[(0, 1, 1)]+=0.152686304599*x[2]
            ref[(0, 1, 1)]+=0.152686304599*x_ref[2]
            arg[(1, 0, 0)]+=-0.938891620859*x[2]
            ref[(1, 0, 0)]+=-0.938891620859*x_ref[2]
            arg[(1, 0, 1)]+=-0.149854879038*x[2]
            ref[(1, 0, 1)]+=-0.149854879038*x_ref[2]
            arg[(1, 1, 0)]+=-0.630795079233*x[2]
            ref[(1, 1, 0)]+=-0.630795079233*x_ref[2]
            arg[(1, 1, 1)]+=0.427378040103*x[2]
            ref[(1, 1, 1)]+=0.427378040103*x_ref[2]
            arg[(2, 0, 0)]+=-0.866300856556*x[2]
            ref[(2, 0, 0)]+=-0.866300856556*x_ref[2]
            arg[(2, 0, 1)]+=-0.927901885182*x[2]
            ref[(2, 0, 1)]+=-0.927901885182*x_ref[2]
            arg[(2, 1, 0)]+=-0.252996820884*x[2]
            ref[(2, 1, 0)]+=-0.252996820884*x_ref[2]
            arg[(2, 1, 1)]+=0.39354782415*x[2]
            ref[(2, 1, 1)]+=0.39354782415*x_ref[2]
            arg[(3, 0, 0)]+=-0.53441696364*x[2]
            ref[(3, 0, 0)]+=-0.53441696364*x_ref[2]
            arg[(3, 0, 1)]+=-0.53966046964*x[2]
            ref[(3, 0, 1)]+=-0.53966046964*x_ref[2]
            arg[(3, 1, 0)]+=-0.79672391476*x[2]
            ref[(3, 1, 0)]+=-0.79672391476*x_ref[2]
            arg[(3, 1, 1)]+=-0.305963441874*x[2]
            ref[(3, 1, 1)]+=-0.305963441874*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedSolution_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedSolution

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedSolution
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedSolution(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 2, 4),w)
        ref = Data(0,(3, 4, 2, 4),w_ref)
        arg[(0, 0, 0, 0)]=0.717355557717*x[0] + (0.291374059855)*x[1]
        ref[(0, 0, 0, 0)]=0.717355557717*x_ref[0] + (0.291374059855)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.547806579391*x[0] + (-0.808319901504)*x[1]
        ref[(0, 0, 0, 1)]=0.547806579391*x_ref[0] + (-0.808319901504)*x_ref[1]
        arg[(0, 0, 0, 2)]=-0.35526760841*x[0] + (-0.992397517406)*x[1]
        ref[(0, 0, 0, 2)]=-0.35526760841*x_ref[0] + (-0.992397517406)*x_ref[1]
        arg[(0, 0, 0, 3)]=-0.975135493287*x[0] + (-0.590156779353)*x[1]
        ref[(0, 0, 0, 3)]=-0.975135493287*x_ref[0] + (-0.590156779353)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.00727174171635*x[0] + (0.36973998926)*x[1]
        ref[(0, 0, 1, 0)]=0.00727174171635*x_ref[0] + (0.36973998926)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.990670404187*x[0] + (0.039652193735)*x[1]
        ref[(0, 0, 1, 1)]=0.990670404187*x_ref[0] + (0.039652193735)*x_ref[1]
        arg[(0, 0, 1, 2)]=0.00284672135802*x[0] + (0.841172283606)*x[1]
        ref[(0, 0, 1, 2)]=0.00284672135802*x_ref[0] + (0.841172283606)*x_ref[1]
        arg[(0, 0, 1, 3)]=0.376455043599*x[0] + (-0.334352194913)*x[1]
        ref[(0, 0, 1, 3)]=0.376455043599*x_ref[0] + (-0.334352194913)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.658164774966*x[0] + (-0.58606428605)*x[1]
        ref[(0, 1, 0, 0)]=-0.658164774966*x_ref[0] + (-0.58606428605)*x_ref[1]
        arg[(0, 1, 0, 1)]=-0.362730398589*x[0] + (-0.320080162391)*x[1]
        ref[(0, 1, 0, 1)]=-0.362730398589*x_ref[0] + (-0.320080162391)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.668118643598*x[0] + (-0.763047949146)*x[1]
        ref[(0, 1, 0, 2)]=0.668118643598*x_ref[0] + (-0.763047949146)*x_ref[1]
        arg[(0, 1, 0, 3)]=-0.340262641551*x[0] + (-0.77227942467)*x[1]
        ref[(0, 1, 0, 3)]=-0.340262641551*x_ref[0] + (-0.77227942467)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.858665843433*x[0] + (-0.110077224544)*x[1]
        ref[(0, 1, 1, 0)]=0.858665843433*x_ref[0] + (-0.110077224544)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.496266055494*x[0] + (0.90566838938)*x[1]
        ref[(0, 1, 1, 1)]=-0.496266055494*x_ref[0] + (0.90566838938)*x_ref[1]
        arg[(0, 1, 1, 2)]=-0.904313342779*x[0] + (-0.524766666231)*x[1]
        ref[(0, 1, 1, 2)]=-0.904313342779*x_ref[0] + (-0.524766666231)*x_ref[1]
        arg[(0, 1, 1, 3)]=-0.101716263101*x[0] + (0.640495554503)*x[1]
        ref[(0, 1, 1, 3)]=-0.101716263101*x_ref[0] + (0.640495554503)*x_ref[1]
        arg[(0, 2, 0, 0)]=0.24765438179*x[0] + (0.114073437022)*x[1]
        ref[(0, 2, 0, 0)]=0.24765438179*x_ref[0] + (0.114073437022)*x_ref[1]
        arg[(0, 2, 0, 1)]=0.705824379192*x[0] + (-0.101526071928)*x[1]
        ref[(0, 2, 0, 1)]=0.705824379192*x_ref[0] + (-0.101526071928)*x_ref[1]
        arg[(0, 2, 0, 2)]=-0.546401706441*x[0] + (0.39826666641)*x[1]
        ref[(0, 2, 0, 2)]=-0.546401706441*x_ref[0] + (0.39826666641)*x_ref[1]
        arg[(0, 2, 0, 3)]=-0.978611948341*x[0] + (-0.464244108992)*x[1]
        ref[(0, 2, 0, 3)]=-0.978611948341*x_ref[0] + (-0.464244108992)*x_ref[1]
        arg[(0, 2, 1, 0)]=0.170568181116*x[0] + (-0.18960005313)*x[1]
        ref[(0, 2, 1, 0)]=0.170568181116*x_ref[0] + (-0.18960005313)*x_ref[1]
        arg[(0, 2, 1, 1)]=0.0470466045409*x[0] + (0.912625741216)*x[1]
        ref[(0, 2, 1, 1)]=0.0470466045409*x_ref[0] + (0.912625741216)*x_ref[1]
        arg[(0, 2, 1, 2)]=-0.159931940484*x[0] + (-0.223945750208)*x[1]
        ref[(0, 2, 1, 2)]=-0.159931940484*x_ref[0] + (-0.223945750208)*x_ref[1]
        arg[(0, 2, 1, 3)]=0.304355311866*x[0] + (0.788529769914)*x[1]
        ref[(0, 2, 1, 3)]=0.304355311866*x_ref[0] + (0.788529769914)*x_ref[1]
        arg[(0, 3, 0, 0)]=0.241098288113*x[0] + (-0.633953806127)*x[1]
        ref[(0, 3, 0, 0)]=0.241098288113*x_ref[0] + (-0.633953806127)*x_ref[1]
        arg[(0, 3, 0, 1)]=0.0439095241558*x[0] + (0.623371862396)*x[1]
        ref[(0, 3, 0, 1)]=0.0439095241558*x_ref[0] + (0.623371862396)*x_ref[1]
        arg[(0, 3, 0, 2)]=0.509421683237*x[0] + (-0.513259153023)*x[1]
        ref[(0, 3, 0, 2)]=0.509421683237*x_ref[0] + (-0.513259153023)*x_ref[1]
        arg[(0, 3, 0, 3)]=-0.569573759894*x[0] + (-0.369468539924)*x[1]
        ref[(0, 3, 0, 3)]=-0.569573759894*x_ref[0] + (-0.369468539924)*x_ref[1]
        arg[(0, 3, 1, 0)]=-0.100170375743*x[0] + (0.779809081493)*x[1]
        ref[(0, 3, 1, 0)]=-0.100170375743*x_ref[0] + (0.779809081493)*x_ref[1]
        arg[(0, 3, 1, 1)]=-0.346126119938*x[0] + (-0.0603296818015)*x[1]
        ref[(0, 3, 1, 1)]=-0.346126119938*x_ref[0] + (-0.0603296818015)*x_ref[1]
        arg[(0, 3, 1, 2)]=-0.104172133117*x[0] + (0.177065666405)*x[1]
        ref[(0, 3, 1, 2)]=-0.104172133117*x_ref[0] + (0.177065666405)*x_ref[1]
        arg[(0, 3, 1, 3)]=0.537506698908*x[0] + (0.792753758883)*x[1]
        ref[(0, 3, 1, 3)]=0.537506698908*x_ref[0] + (0.792753758883)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.838934673909*x[0] + (-0.384003737612)*x[1]
        ref[(1, 0, 0, 0)]=0.838934673909*x_ref[0] + (-0.384003737612)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.124370558711*x[0] + (0.555211379728)*x[1]
        ref[(1, 0, 0, 1)]=-0.124370558711*x_ref[0] + (0.555211379728)*x_ref[1]
        arg[(1, 0, 0, 2)]=0.387757305744*x[0] + (0.674643238775)*x[1]
        ref[(1, 0, 0, 2)]=0.387757305744*x_ref[0] + (0.674643238775)*x_ref[1]
        arg[(1, 0, 0, 3)]=-0.40088532539*x[0] + (-0.462073987195)*x[1]
        ref[(1, 0, 0, 3)]=-0.40088532539*x_ref[0] + (-0.462073987195)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.469783134143*x[0] + (-0.571235562)*x[1]
        ref[(1, 0, 1, 0)]=-0.469783134143*x_ref[0] + (-0.571235562)*x_ref[1]
        arg[(1, 0, 1, 1)]=-0.0378277772691*x[0] + (-0.354784897085)*x[1]
        ref[(1, 0, 1, 1)]=-0.0378277772691*x_ref[0] + (-0.354784897085)*x_ref[1]
        arg[(1, 0, 1, 2)]=0.601875511116*x[0] + (0.237755499303)*x[1]
        ref[(1, 0, 1, 2)]=0.601875511116*x_ref[0] + (0.237755499303)*x_ref[1]
        arg[(1, 0, 1, 3)]=0.453011915851*x[0] + (-0.188013172968)*x[1]
        ref[(1, 0, 1, 3)]=0.453011915851*x_ref[0] + (-0.188013172968)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.742786522922*x[0] + (-0.78415206249)*x[1]
        ref[(1, 1, 0, 0)]=-0.742786522922*x_ref[0] + (-0.78415206249)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.905709007843*x[0] + (-0.485650475202)*x[1]
        ref[(1, 1, 0, 1)]=0.905709007843*x_ref[0] + (-0.485650475202)*x_ref[1]
        arg[(1, 1, 0, 2)]=0.0155647629453*x[0] + (-0.670702579787)*x[1]
        ref[(1, 1, 0, 2)]=0.0155647629453*x_ref[0] + (-0.670702579787)*x_ref[1]
        arg[(1, 1, 0, 3)]=0.451914200793*x[0] + (-0.607947905044)*x[1]
        ref[(1, 1, 0, 3)]=0.451914200793*x_ref[0] + (-0.607947905044)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.647061697727*x[0] + (0.45592559662)*x[1]
        ref[(1, 1, 1, 0)]=0.647061697727*x_ref[0] + (0.45592559662)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.247430654424*x[0] + (-0.228871816355)*x[1]
        ref[(1, 1, 1, 1)]=0.247430654424*x_ref[0] + (-0.228871816355)*x_ref[1]
        arg[(1, 1, 1, 2)]=-0.901736308827*x[0] + (-0.495909946783)*x[1]
        ref[(1, 1, 1, 2)]=-0.901736308827*x_ref[0] + (-0.495909946783)*x_ref[1]
        arg[(1, 1, 1, 3)]=0.0490175996538*x[0] + (-0.0821639677493)*x[1]
        ref[(1, 1, 1, 3)]=0.0490175996538*x_ref[0] + (-0.0821639677493)*x_ref[1]
        arg[(1, 2, 0, 0)]=0.0828361668735*x[0] + (0.024645455665)*x[1]
        ref[(1, 2, 0, 0)]=0.0828361668735*x_ref[0] + (0.024645455665)*x_ref[1]
        arg[(1, 2, 0, 1)]=-0.550652243613*x[0] + (0.103361561928)*x[1]
        ref[(1, 2, 0, 1)]=-0.550652243613*x_ref[0] + (0.103361561928)*x_ref[1]
        arg[(1, 2, 0, 2)]=-0.108997001604*x[0] + (0.891713928201)*x[1]
        ref[(1, 2, 0, 2)]=-0.108997001604*x_ref[0] + (0.891713928201)*x_ref[1]
        arg[(1, 2, 0, 3)]=0.525648723069*x[0] + (-0.28975811168)*x[1]
        ref[(1, 2, 0, 3)]=0.525648723069*x_ref[0] + (-0.28975811168)*x_ref[1]
        arg[(1, 2, 1, 0)]=0.0497755114498*x[0] + (0.744847834674)*x[1]
        ref[(1, 2, 1, 0)]=0.0497755114498*x_ref[0] + (0.744847834674)*x_ref[1]
        arg[(1, 2, 1, 1)]=0.226625257509*x[0] + (0.12106577801)*x[1]
        ref[(1, 2, 1, 1)]=0.226625257509*x_ref[0] + (0.12106577801)*x_ref[1]
        arg[(1, 2, 1, 2)]=-0.834210848574*x[0] + (-0.988707898446)*x[1]
        ref[(1, 2, 1, 2)]=-0.834210848574*x_ref[0] + (-0.988707898446)*x_ref[1]
        arg[(1, 2, 1, 3)]=-0.578579343356*x[0] + (-0.292532000226)*x[1]
        ref[(1, 2, 1, 3)]=-0.578579343356*x_ref[0] + (-0.292532000226)*x_ref[1]
        arg[(1, 3, 0, 0)]=0.956336813843*x[0] + (0.435664026492)*x[1]
        ref[(1, 3, 0, 0)]=0.956336813843*x_ref[0] + (0.435664026492)*x_ref[1]
        arg[(1, 3, 0, 1)]=0.743835205341*x[0] + (0.936593657964)*x[1]
        ref[(1, 3, 0, 1)]=0.743835205341*x_ref[0] + (0.936593657964)*x_ref[1]
        arg[(1, 3, 0, 2)]=0.0644441639203*x[0] + (-0.898711142842)*x[1]
        ref[(1, 3, 0, 2)]=0.0644441639203*x_ref[0] + (-0.898711142842)*x_ref[1]
        arg[(1, 3, 0, 3)]=0.240900744211*x[0] + (0.77547761889)*x[1]
        ref[(1, 3, 0, 3)]=0.240900744211*x_ref[0] + (0.77547761889)*x_ref[1]
        arg[(1, 3, 1, 0)]=0.935391179344*x[0] + (0.139906703335)*x[1]
        ref[(1, 3, 1, 0)]=0.935391179344*x_ref[0] + (0.139906703335)*x_ref[1]
        arg[(1, 3, 1, 1)]=0.512370291467*x[0] + (-0.633037772072)*x[1]
        ref[(1, 3, 1, 1)]=0.512370291467*x_ref[0] + (-0.633037772072)*x_ref[1]
        arg[(1, 3, 1, 2)]=0.0654765287215*x[0] + (0.898947779223)*x[1]
        ref[(1, 3, 1, 2)]=0.0654765287215*x_ref[0] + (0.898947779223)*x_ref[1]
        arg[(1, 3, 1, 3)]=0.556338398264*x[0] + (-0.625831180809)*x[1]
        ref[(1, 3, 1, 3)]=0.556338398264*x_ref[0] + (-0.625831180809)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.326764187627*x[0] + (0.746111145208)*x[1]
        ref[(2, 0, 0, 0)]=0.326764187627*x_ref[0] + (0.746111145208)*x_ref[1]
        arg[(2, 0, 0, 1)]=-0.26563873513*x[0] + (0.642147535264)*x[1]
        ref[(2, 0, 0, 1)]=-0.26563873513*x_ref[0] + (0.642147535264)*x_ref[1]
        arg[(2, 0, 0, 2)]=0.100280155714*x[0] + (0.982778642854)*x[1]
        ref[(2, 0, 0, 2)]=0.100280155714*x_ref[0] + (0.982778642854)*x_ref[1]
        arg[(2, 0, 0, 3)]=-0.898926823901*x[0] + (0.638602307458)*x[1]
        ref[(2, 0, 0, 3)]=-0.898926823901*x_ref[0] + (0.638602307458)*x_ref[1]
        arg[(2, 0, 1, 0)]=0.705563395592*x[0] + (0.232066951072)*x[1]
        ref[(2, 0, 1, 0)]=0.705563395592*x_ref[0] + (0.232066951072)*x_ref[1]
        arg[(2, 0, 1, 1)]=-0.244335872744*x[0] + (-0.381514047128)*x[1]
        ref[(2, 0, 1, 1)]=-0.244335872744*x_ref[0] + (-0.381514047128)*x_ref[1]
        arg[(2, 0, 1, 2)]=0.685990352886*x[0] + (-0.572835720631)*x[1]
        ref[(2, 0, 1, 2)]=0.685990352886*x_ref[0] + (-0.572835720631)*x_ref[1]
        arg[(2, 0, 1, 3)]=0.65715902032*x[0] + (0.104229396872)*x[1]
        ref[(2, 0, 1, 3)]=0.65715902032*x_ref[0] + (0.104229396872)*x_ref[1]
        arg[(2, 1, 0, 0)]=-0.58154093769*x[0] + (-0.572720254982)*x[1]
        ref[(2, 1, 0, 0)]=-0.58154093769*x_ref[0] + (-0.572720254982)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.355683046628*x[0] + (0.786882164089)*x[1]
        ref[(2, 1, 0, 1)]=0.355683046628*x_ref[0] + (0.786882164089)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.26542107023*x[0] + (-0.216642246374)*x[1]
        ref[(2, 1, 0, 2)]=-0.26542107023*x_ref[0] + (-0.216642246374)*x_ref[1]
        arg[(2, 1, 0, 3)]=-0.131542087371*x[0] + (0.957759437557)*x[1]
        ref[(2, 1, 0, 3)]=-0.131542087371*x_ref[0] + (0.957759437557)*x_ref[1]
        arg[(2, 1, 1, 0)]=-0.127738182561*x[0] + (-0.419150119617)*x[1]
        ref[(2, 1, 1, 0)]=-0.127738182561*x_ref[0] + (-0.419150119617)*x_ref[1]
        arg[(2, 1, 1, 1)]=0.337492626172*x[0] + (0.200825912857)*x[1]
        ref[(2, 1, 1, 1)]=0.337492626172*x_ref[0] + (0.200825912857)*x_ref[1]
        arg[(2, 1, 1, 2)]=-0.109845565778*x[0] + (-0.587634598849)*x[1]
        ref[(2, 1, 1, 2)]=-0.109845565778*x_ref[0] + (-0.587634598849)*x_ref[1]
        arg[(2, 1, 1, 3)]=0.544363383793*x[0] + (0.896083268711)*x[1]
        ref[(2, 1, 1, 3)]=0.544363383793*x_ref[0] + (0.896083268711)*x_ref[1]
        arg[(2, 2, 0, 0)]=-0.834297566491*x[0] + (0.656447533044)*x[1]
        ref[(2, 2, 0, 0)]=-0.834297566491*x_ref[0] + (0.656447533044)*x_ref[1]
        arg[(2, 2, 0, 1)]=0.640731039062*x[0] + (0.259914481155)*x[1]
        ref[(2, 2, 0, 1)]=0.640731039062*x_ref[0] + (0.259914481155)*x_ref[1]
        arg[(2, 2, 0, 2)]=-0.435109125792*x[0] + (-0.256386304685)*x[1]
        ref[(2, 2, 0, 2)]=-0.435109125792*x_ref[0] + (-0.256386304685)*x_ref[1]
        arg[(2, 2, 0, 3)]=-0.292697466266*x[0] + (0.739729814228)*x[1]
        ref[(2, 2, 0, 3)]=-0.292697466266*x_ref[0] + (0.739729814228)*x_ref[1]
        arg[(2, 2, 1, 0)]=-0.127130310072*x[0] + (-0.339215817237)*x[1]
        ref[(2, 2, 1, 0)]=-0.127130310072*x_ref[0] + (-0.339215817237)*x_ref[1]
        arg[(2, 2, 1, 1)]=0.297032092407*x[0] + (-0.751288168569)*x[1]
        ref[(2, 2, 1, 1)]=0.297032092407*x_ref[0] + (-0.751288168569)*x_ref[1]
        arg[(2, 2, 1, 2)]=0.70498622417*x[0] + (0.655809717868)*x[1]
        ref[(2, 2, 1, 2)]=0.70498622417*x_ref[0] + (0.655809717868)*x_ref[1]
        arg[(2, 2, 1, 3)]=0.3064841459*x[0] + (0.496440428055)*x[1]
        ref[(2, 2, 1, 3)]=0.3064841459*x_ref[0] + (0.496440428055)*x_ref[1]
        arg[(2, 3, 0, 0)]=-0.503239993023*x[0] + (-0.0691613533194)*x[1]
        ref[(2, 3, 0, 0)]=-0.503239993023*x_ref[0] + (-0.0691613533194)*x_ref[1]
        arg[(2, 3, 0, 1)]=-0.346713102355*x[0] + (-0.863056897496)*x[1]
        ref[(2, 3, 0, 1)]=-0.346713102355*x_ref[0] + (-0.863056897496)*x_ref[1]
        arg[(2, 3, 0, 2)]=0.451955430406*x[0] + (0.00884081755386)*x[1]
        ref[(2, 3, 0, 2)]=0.451955430406*x_ref[0] + (0.00884081755386)*x_ref[1]
        arg[(2, 3, 0, 3)]=-0.370698199015*x[0] + (-0.656698473161)*x[1]
        ref[(2, 3, 0, 3)]=-0.370698199015*x_ref[0] + (-0.656698473161)*x_ref[1]
        arg[(2, 3, 1, 0)]=0.849863127991*x[0] + (-0.367540340492)*x[1]
        ref[(2, 3, 1, 0)]=0.849863127991*x_ref[0] + (-0.367540340492)*x_ref[1]
        arg[(2, 3, 1, 1)]=0.969358830567*x[0] + (-0.280031433729)*x[1]
        ref[(2, 3, 1, 1)]=0.969358830567*x_ref[0] + (-0.280031433729)*x_ref[1]
        arg[(2, 3, 1, 2)]=0.39599748328*x[0] + (-0.658217007677)*x[1]
        ref[(2, 3, 1, 2)]=0.39599748328*x_ref[0] + (-0.658217007677)*x_ref[1]
        arg[(2, 3, 1, 3)]=-0.541161044811*x[0] + (0.613200329729)*x[1]
        ref[(2, 3, 1, 3)]=-0.541161044811*x_ref[0] + (0.613200329729)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.301799013356*x[2]
            ref[(0, 0, 0, 0)]+=-0.301799013356*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.459808980998*x[2]
            ref[(0, 0, 0, 1)]+=-0.459808980998*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.841923718726*x[2]
            ref[(0, 0, 0, 2)]+=0.841923718726*x_ref[2]
            arg[(0, 0, 0, 3)]+=-0.840097229352*x[2]
            ref[(0, 0, 0, 3)]+=-0.840097229352*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.213200837562*x[2]
            ref[(0, 0, 1, 0)]+=0.213200837562*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.77948373544*x[2]
            ref[(0, 0, 1, 1)]+=-0.77948373544*x_ref[2]
            arg[(0, 0, 1, 2)]+=0.67238780444*x[2]
            ref[(0, 0, 1, 2)]+=0.67238780444*x_ref[2]
            arg[(0, 0, 1, 3)]+=0.786528374581*x[2]
            ref[(0, 0, 1, 3)]+=0.786528374581*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.513377460054*x[2]
            ref[(0, 1, 0, 0)]+=-0.513377460054*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.753757839583*x[2]
            ref[(0, 1, 0, 1)]+=0.753757839583*x_ref[2]
            arg[(0, 1, 0, 2)]+=0.500700958497*x[2]
            ref[(0, 1, 0, 2)]+=0.500700958497*x_ref[2]
            arg[(0, 1, 0, 3)]+=0.0292250746514*x[2]
            ref[(0, 1, 0, 3)]+=0.0292250746514*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.197765385109*x[2]
            ref[(0, 1, 1, 0)]+=-0.197765385109*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.835546142372*x[2]
            ref[(0, 1, 1, 1)]+=-0.835546142372*x_ref[2]
            arg[(0, 1, 1, 2)]+=-0.538082151044*x[2]
            ref[(0, 1, 1, 2)]+=-0.538082151044*x_ref[2]
            arg[(0, 1, 1, 3)]+=-0.0259054482259*x[2]
            ref[(0, 1, 1, 3)]+=-0.0259054482259*x_ref[2]
            arg[(0, 2, 0, 0)]+=0.848909040028*x[2]
            ref[(0, 2, 0, 0)]+=0.848909040028*x_ref[2]
            arg[(0, 2, 0, 1)]+=0.699414063357*x[2]
            ref[(0, 2, 0, 1)]+=0.699414063357*x_ref[2]
            arg[(0, 2, 0, 2)]+=0.0133919309571*x[2]
            ref[(0, 2, 0, 2)]+=0.0133919309571*x_ref[2]
            arg[(0, 2, 0, 3)]+=-0.241162553441*x[2]
            ref[(0, 2, 0, 3)]+=-0.241162553441*x_ref[2]
            arg[(0, 2, 1, 0)]+=0.854032654312*x[2]
            ref[(0, 2, 1, 0)]+=0.854032654312*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.687384195214*x[2]
            ref[(0, 2, 1, 1)]+=-0.687384195214*x_ref[2]
            arg[(0, 2, 1, 2)]+=0.479927873878*x[2]
            ref[(0, 2, 1, 2)]+=0.479927873878*x_ref[2]
            arg[(0, 2, 1, 3)]+=0.456544688086*x[2]
            ref[(0, 2, 1, 3)]+=0.456544688086*x_ref[2]
            arg[(0, 3, 0, 0)]+=9.66202946997e-05*x[2]
            ref[(0, 3, 0, 0)]+=9.66202946997e-05*x_ref[2]
            arg[(0, 3, 0, 1)]+=0.147257429802*x[2]
            ref[(0, 3, 0, 1)]+=0.147257429802*x_ref[2]
            arg[(0, 3, 0, 2)]+=0.997458661335*x[2]
            ref[(0, 3, 0, 2)]+=0.997458661335*x_ref[2]
            arg[(0, 3, 0, 3)]+=-0.100844325041*x[2]
            ref[(0, 3, 0, 3)]+=-0.100844325041*x_ref[2]
            arg[(0, 3, 1, 0)]+=-0.96198772174*x[2]
            ref[(0, 3, 1, 0)]+=-0.96198772174*x_ref[2]
            arg[(0, 3, 1, 1)]+=0.197517911748*x[2]
            ref[(0, 3, 1, 1)]+=0.197517911748*x_ref[2]
            arg[(0, 3, 1, 2)]+=0.285997842574*x[2]
            ref[(0, 3, 1, 2)]+=0.285997842574*x_ref[2]
            arg[(0, 3, 1, 3)]+=0.0617212988999*x[2]
            ref[(0, 3, 1, 3)]+=0.0617212988999*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.524979389249*x[2]
            ref[(1, 0, 0, 0)]+=-0.524979389249*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.737148269643*x[2]
            ref[(1, 0, 0, 1)]+=0.737148269643*x_ref[2]
            arg[(1, 0, 0, 2)]+=0.419950721047*x[2]
            ref[(1, 0, 0, 2)]+=0.419950721047*x_ref[2]
            arg[(1, 0, 0, 3)]+=-0.161790872487*x[2]
            ref[(1, 0, 0, 3)]+=-0.161790872487*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.232201936626*x[2]
            ref[(1, 0, 1, 0)]+=0.232201936626*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.462100246873*x[2]
            ref[(1, 0, 1, 1)]+=0.462100246873*x_ref[2]
            arg[(1, 0, 1, 2)]+=0.284547536368*x[2]
            ref[(1, 0, 1, 2)]+=0.284547536368*x_ref[2]
            arg[(1, 0, 1, 3)]+=-0.767474373367*x[2]
            ref[(1, 0, 1, 3)]+=-0.767474373367*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.600731365234*x[2]
            ref[(1, 1, 0, 0)]+=-0.600731365234*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.342287272366*x[2]
            ref[(1, 1, 0, 1)]+=0.342287272366*x_ref[2]
            arg[(1, 1, 0, 2)]+=-0.324947873098*x[2]
            ref[(1, 1, 0, 2)]+=-0.324947873098*x_ref[2]
            arg[(1, 1, 0, 3)]+=-0.196003915468*x[2]
            ref[(1, 1, 0, 3)]+=-0.196003915468*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.556131135305*x[2]
            ref[(1, 1, 1, 0)]+=0.556131135305*x_ref[2]
            arg[(1, 1, 1, 1)]+=-0.618810491081*x[2]
            ref[(1, 1, 1, 1)]+=-0.618810491081*x_ref[2]
            arg[(1, 1, 1, 2)]+=0.626953429943*x[2]
            ref[(1, 1, 1, 2)]+=0.626953429943*x_ref[2]
            arg[(1, 1, 1, 3)]+=-0.462842437078*x[2]
            ref[(1, 1, 1, 3)]+=-0.462842437078*x_ref[2]
            arg[(1, 2, 0, 0)]+=0.28920353306*x[2]
            ref[(1, 2, 0, 0)]+=0.28920353306*x_ref[2]
            arg[(1, 2, 0, 1)]+=0.147865733906*x[2]
            ref[(1, 2, 0, 1)]+=0.147865733906*x_ref[2]
            arg[(1, 2, 0, 2)]+=0.415137764681*x[2]
            ref[(1, 2, 0, 2)]+=0.415137764681*x_ref[2]
            arg[(1, 2, 0, 3)]+=0.321555391257*x[2]
            ref[(1, 2, 0, 3)]+=0.321555391257*x_ref[2]
            arg[(1, 2, 1, 0)]+=-0.894306199129*x[2]
            ref[(1, 2, 1, 0)]+=-0.894306199129*x_ref[2]
            arg[(1, 2, 1, 1)]+=-0.205383283825*x[2]
            ref[(1, 2, 1, 1)]+=-0.205383283825*x_ref[2]
            arg[(1, 2, 1, 2)]+=-0.792773150546*x[2]
            ref[(1, 2, 1, 2)]+=-0.792773150546*x_ref[2]
            arg[(1, 2, 1, 3)]+=-0.196094312098*x[2]
            ref[(1, 2, 1, 3)]+=-0.196094312098*x_ref[2]
            arg[(1, 3, 0, 0)]+=0.825989580313*x[2]
            ref[(1, 3, 0, 0)]+=0.825989580313*x_ref[2]
            arg[(1, 3, 0, 1)]+=0.421486689015*x[2]
            ref[(1, 3, 0, 1)]+=0.421486689015*x_ref[2]
            arg[(1, 3, 0, 2)]+=0.661655121499*x[2]
            ref[(1, 3, 0, 2)]+=0.661655121499*x_ref[2]
            arg[(1, 3, 0, 3)]+=0.784953061411*x[2]
            ref[(1, 3, 0, 3)]+=0.784953061411*x_ref[2]
            arg[(1, 3, 1, 0)]+=0.227800574462*x[2]
            ref[(1, 3, 1, 0)]+=0.227800574462*x_ref[2]
            arg[(1, 3, 1, 1)]+=-0.940277356314*x[2]
            ref[(1, 3, 1, 1)]+=-0.940277356314*x_ref[2]
            arg[(1, 3, 1, 2)]+=0.897406620369*x[2]
            ref[(1, 3, 1, 2)]+=0.897406620369*x_ref[2]
            arg[(1, 3, 1, 3)]+=-0.571979538679*x[2]
            ref[(1, 3, 1, 3)]+=-0.571979538679*x_ref[2]
            arg[(2, 0, 0, 0)]+=0.118106332131*x[2]
            ref[(2, 0, 0, 0)]+=0.118106332131*x_ref[2]
            arg[(2, 0, 0, 1)]+=-0.695566646941*x[2]
            ref[(2, 0, 0, 1)]+=-0.695566646941*x_ref[2]
            arg[(2, 0, 0, 2)]+=0.0414056035806*x[2]
            ref[(2, 0, 0, 2)]+=0.0414056035806*x_ref[2]
            arg[(2, 0, 0, 3)]+=-0.356513760868*x[2]
            ref[(2, 0, 0, 3)]+=-0.356513760868*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.279455182417*x[2]
            ref[(2, 0, 1, 0)]+=-0.279455182417*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.0916879391682*x[2]
            ref[(2, 0, 1, 1)]+=0.0916879391682*x_ref[2]
            arg[(2, 0, 1, 2)]+=-0.205710580945*x[2]
            ref[(2, 0, 1, 2)]+=-0.205710580945*x_ref[2]
            arg[(2, 0, 1, 3)]+=0.697689655183*x[2]
            ref[(2, 0, 1, 3)]+=0.697689655183*x_ref[2]
            arg[(2, 1, 0, 0)]+=0.505031160214*x[2]
            ref[(2, 1, 0, 0)]+=0.505031160214*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.358309316823*x[2]
            ref[(2, 1, 0, 1)]+=-0.358309316823*x_ref[2]
            arg[(2, 1, 0, 2)]+=0.784471946094*x[2]
            ref[(2, 1, 0, 2)]+=0.784471946094*x_ref[2]
            arg[(2, 1, 0, 3)]+=-0.701306683779*x[2]
            ref[(2, 1, 0, 3)]+=-0.701306683779*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.502644577777*x[2]
            ref[(2, 1, 1, 0)]+=0.502644577777*x_ref[2]
            arg[(2, 1, 1, 1)]+=0.976573087722*x[2]
            ref[(2, 1, 1, 1)]+=0.976573087722*x_ref[2]
            arg[(2, 1, 1, 2)]+=-0.494136866135*x[2]
            ref[(2, 1, 1, 2)]+=-0.494136866135*x_ref[2]
            arg[(2, 1, 1, 3)]+=-0.106458287277*x[2]
            ref[(2, 1, 1, 3)]+=-0.106458287277*x_ref[2]
            arg[(2, 2, 0, 0)]+=-0.348101570941*x[2]
            ref[(2, 2, 0, 0)]+=-0.348101570941*x_ref[2]
            arg[(2, 2, 0, 1)]+=0.288666293412*x[2]
            ref[(2, 2, 0, 1)]+=0.288666293412*x_ref[2]
            arg[(2, 2, 0, 2)]+=-0.686201536913*x[2]
            ref[(2, 2, 0, 2)]+=-0.686201536913*x_ref[2]
            arg[(2, 2, 0, 3)]+=-0.0818349305074*x[2]
            ref[(2, 2, 0, 3)]+=-0.0818349305074*x_ref[2]
            arg[(2, 2, 1, 0)]+=0.245772403349*x[2]
            ref[(2, 2, 1, 0)]+=0.245772403349*x_ref[2]
            arg[(2, 2, 1, 1)]+=-0.23800443729*x[2]
            ref[(2, 2, 1, 1)]+=-0.23800443729*x_ref[2]
            arg[(2, 2, 1, 2)]+=-0.302921691202*x[2]
            ref[(2, 2, 1, 2)]+=-0.302921691202*x_ref[2]
            arg[(2, 2, 1, 3)]+=-0.915773799358*x[2]
            ref[(2, 2, 1, 3)]+=-0.915773799358*x_ref[2]
            arg[(2, 3, 0, 0)]+=-0.820421946078*x[2]
            ref[(2, 3, 0, 0)]+=-0.820421946078*x_ref[2]
            arg[(2, 3, 0, 1)]+=-0.0608017383315*x[2]
            ref[(2, 3, 0, 1)]+=-0.0608017383315*x_ref[2]
            arg[(2, 3, 0, 2)]+=0.803001006781*x[2]
            ref[(2, 3, 0, 2)]+=0.803001006781*x_ref[2]
            arg[(2, 3, 0, 3)]+=-0.462202291576*x[2]
            ref[(2, 3, 0, 3)]+=-0.462202291576*x_ref[2]
            arg[(2, 3, 1, 0)]+=-0.523073252927*x[2]
            ref[(2, 3, 1, 0)]+=-0.523073252927*x_ref[2]
            arg[(2, 3, 1, 1)]+=0.0609546178986*x[2]
            ref[(2, 3, 1, 1)]+=0.0609546178986*x_ref[2]
            arg[(2, 3, 1, 2)]+=-0.37697537399*x[2]
            ref[(2, 3, 1, 2)]+=-0.37697537399*x_ref[2]
            arg[(2, 3, 1, 3)]+=0.669014966618*x[2]
            ref[(2, 3, 1, 3)]+=0.669014966618*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedContinuousFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.378978430708*x[0]**o + (-0.163569989298)*x[0] + (-0.0372799872876)*x[1]**o + (0.743643471109)*x[1]
        ref=0.378978430708*x_ref[0]**o + (-0.163569989298)*x_ref[0] + (-0.0372799872876)*x_ref[1]**o + (0.743643471109)*x_ref[1]
        if dim==3:
            arg+=(0.0165682002687)*x[2]**o + (-0.553073529331)*x[2]
            ref+=(0.0165682002687)*x_ref[2]**o + (-0.553073529331)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedContinuousFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=-0.896348124834*x[0]**o + (0.446296369148)*x[0] + (-0.904223412033)*x[1]**o + (-0.629185144183)*x[1]
        ref[(0,)]=-0.896348124834*x_ref[0]**o + (0.446296369148)*x_ref[0] + (-0.904223412033)*x_ref[1]**o + (-0.629185144183)*x_ref[1]
        arg[(1,)]=-0.930827325045*x[0]**o + (0.749715959648)*x[0] + (0.334071155516)*x[1]**o + (-0.715797890352)*x[1]
        ref[(1,)]=-0.930827325045*x_ref[0]**o + (0.749715959648)*x_ref[0] + (0.334071155516)*x_ref[1]**o + (-0.715797890352)*x_ref[1]
        arg[(2,)]=0.873566265289*x[0]**o + (-0.456095774324)*x[0] + (0.912811258266)*x[1]**o + (0.682092231563)*x[1]
        ref[(2,)]=0.873566265289*x_ref[0]**o + (-0.456095774324)*x_ref[0] + (0.912811258266)*x_ref[1]**o + (0.682092231563)*x_ref[1]
        arg[(3,)]=-0.821440680849*x[0]**o + (-0.819389877093)*x[0] + (-0.67107710748)*x[1]**o + (-0.109743341662)*x[1]
        ref[(3,)]=-0.821440680849*x_ref[0]**o + (-0.819389877093)*x_ref[0] + (-0.67107710748)*x_ref[1]**o + (-0.109743341662)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.122232622379*x[2]**o + (-0.431837491215)*x[2]
            ref[(0,)]+=-0.122232622379*x_ref[2]**o + (-0.431837491215)*x_ref[2]
            arg[(1,)]+=-0.510106056966*x[2]**o + (-0.19182379431)*x[2]
            ref[(1,)]+=-0.510106056966*x_ref[2]**o + (-0.19182379431)*x_ref[2]
            arg[(2,)]+=-0.929262010563*x[2]**o + (0.277860254836)*x[2]
            ref[(2,)]+=-0.929262010563*x_ref[2]**o + (0.277860254836)*x_ref[2]
            arg[(3,)]+=0.600462148497*x[2]**o + (-0.779219636228)*x[2]
            ref[(3,)]+=0.600462148497*x_ref[2]**o + (-0.779219636228)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedContinuousFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref = Data(0,(2, 3),w_ref)
        arg[(0, 0)]=-0.337380190098*x[0]**o + (-0.852138992888)*x[0] + (0.298315689764)*x[1]**o + (0.59101134838)*x[1]
        ref[(0, 0)]=-0.337380190098*x_ref[0]**o + (-0.852138992888)*x_ref[0] + (0.298315689764)*x_ref[1]**o + (0.59101134838)*x_ref[1]
        arg[(0, 1)]=-0.229297241959*x[0]**o + (-0.974916402795)*x[0] + (0.181906903718)*x[1]**o + (-0.991646987922)*x[1]
        ref[(0, 1)]=-0.229297241959*x_ref[0]**o + (-0.974916402795)*x_ref[0] + (0.181906903718)*x_ref[1]**o + (-0.991646987922)*x_ref[1]
        arg[(0, 2)]=-0.226887143532*x[0]**o + (0.421502436537)*x[0] + (0.413650429543)*x[1]**o + (-0.468630698932)*x[1]
        ref[(0, 2)]=-0.226887143532*x_ref[0]**o + (0.421502436537)*x_ref[0] + (0.413650429543)*x_ref[1]**o + (-0.468630698932)*x_ref[1]
        arg[(1, 0)]=-0.458000131394*x[0]**o + (-0.0979743294081)*x[0] + (0.931383099796)*x[1]**o + (0.759922086962)*x[1]
        ref[(1, 0)]=-0.458000131394*x_ref[0]**o + (-0.0979743294081)*x_ref[0] + (0.931383099796)*x_ref[1]**o + (0.759922086962)*x_ref[1]
        arg[(1, 1)]=0.120606309582*x[0]**o + (0.392410033531)*x[0] + (-0.933789942464)*x[1]**o + (-0.626703662196)*x[1]
        ref[(1, 1)]=0.120606309582*x_ref[0]**o + (0.392410033531)*x_ref[0] + (-0.933789942464)*x_ref[1]**o + (-0.626703662196)*x_ref[1]
        arg[(1, 2)]=-0.874922042233*x[0]**o + (-0.754216213113)*x[0] + (-0.415593278444)*x[1]**o + (0.254245389287)*x[1]
        ref[(1, 2)]=-0.874922042233*x_ref[0]**o + (-0.754216213113)*x_ref[0] + (-0.415593278444)*x_ref[1]**o + (0.254245389287)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.805575013691*x[2]**o + (-0.144731766836)*x[2]
            ref[(0, 0)]+=-0.805575013691*x_ref[2]**o + (-0.144731766836)*x_ref[2]
            arg[(0, 1)]+=0.67974768202*x[2]**o + (0.836928322127)*x[2]
            ref[(0, 1)]+=0.67974768202*x_ref[2]**o + (0.836928322127)*x_ref[2]
            arg[(0, 2)]+=0.614193795285*x[2]**o + (0.24571317411)*x[2]
            ref[(0, 2)]+=0.614193795285*x_ref[2]**o + (0.24571317411)*x_ref[2]
            arg[(1, 0)]+=-0.329803832899*x[2]**o + (0.0848452238992)*x[2]
            ref[(1, 0)]+=-0.329803832899*x_ref[2]**o + (0.0848452238992)*x_ref[2]
            arg[(1, 1)]+=-0.945511474415*x[2]**o + (0.493633236604)*x[2]
            ref[(1, 1)]+=-0.945511474415*x_ref[2]**o + (0.493633236604)*x_ref[2]
            arg[(1, 2)]+=0.129412439976*x[2]**o + (0.40038801346)*x[2]
            ref[(1, 2)]+=0.129412439976*x_ref[2]**o + (0.40038801346)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedContinuousFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 2),w)
        ref = Data(0,(4, 4, 2),w_ref)
        arg[(0, 0, 0)]=0.472562290379*x[0]**o + (0.880589657581)*x[0] + (0.383411820398)*x[1]**o + (0.204539941389)*x[1]
        ref[(0, 0, 0)]=0.472562290379*x_ref[0]**o + (0.880589657581)*x_ref[0] + (0.383411820398)*x_ref[1]**o + (0.204539941389)*x_ref[1]
        arg[(0, 0, 1)]=-0.518122109009*x[0]**o + (-0.475884169785)*x[0] + (-0.118277065767)*x[1]**o + (-0.564229054407)*x[1]
        ref[(0, 0, 1)]=-0.518122109009*x_ref[0]**o + (-0.475884169785)*x_ref[0] + (-0.118277065767)*x_ref[1]**o + (-0.564229054407)*x_ref[1]
        arg[(0, 1, 0)]=-0.194081496658*x[0]**o + (-0.600830146086)*x[0] + (0.447292244468)*x[1]**o + (-0.367309424031)*x[1]
        ref[(0, 1, 0)]=-0.194081496658*x_ref[0]**o + (-0.600830146086)*x_ref[0] + (0.447292244468)*x_ref[1]**o + (-0.367309424031)*x_ref[1]
        arg[(0, 1, 1)]=-0.0962817757664*x[0]**o + (-0.210019847742)*x[0] + (0.428639068829)*x[1]**o + (-0.370058727368)*x[1]
        ref[(0, 1, 1)]=-0.0962817757664*x_ref[0]**o + (-0.210019847742)*x_ref[0] + (0.428639068829)*x_ref[1]**o + (-0.370058727368)*x_ref[1]
        arg[(0, 2, 0)]=-0.799288127471*x[0]**o + (-0.255268930497)*x[0] + (0.859729589795)*x[1]**o + (-0.937264604608)*x[1]
        ref[(0, 2, 0)]=-0.799288127471*x_ref[0]**o + (-0.255268930497)*x_ref[0] + (0.859729589795)*x_ref[1]**o + (-0.937264604608)*x_ref[1]
        arg[(0, 2, 1)]=-0.566948157115*x[0]**o + (-0.257707138104)*x[0] + (0.813358056492)*x[1]**o + (-0.741456999812)*x[1]
        ref[(0, 2, 1)]=-0.566948157115*x_ref[0]**o + (-0.257707138104)*x_ref[0] + (0.813358056492)*x_ref[1]**o + (-0.741456999812)*x_ref[1]
        arg[(0, 3, 0)]=0.305379799418*x[0]**o + (0.764066070111)*x[0] + (0.165521342961)*x[1]**o + (-0.429759501217)*x[1]
        ref[(0, 3, 0)]=0.305379799418*x_ref[0]**o + (0.764066070111)*x_ref[0] + (0.165521342961)*x_ref[1]**o + (-0.429759501217)*x_ref[1]
        arg[(0, 3, 1)]=-0.054145483978*x[0]**o + (-0.311691824332)*x[0] + (-0.701848479415)*x[1]**o + (0.399019887833)*x[1]
        ref[(0, 3, 1)]=-0.054145483978*x_ref[0]**o + (-0.311691824332)*x_ref[0] + (-0.701848479415)*x_ref[1]**o + (0.399019887833)*x_ref[1]
        arg[(1, 0, 0)]=-0.363562249186*x[0]**o + (0.437178639019)*x[0] + (-0.547848572103)*x[1]**o + (0.425250740321)*x[1]
        ref[(1, 0, 0)]=-0.363562249186*x_ref[0]**o + (0.437178639019)*x_ref[0] + (-0.547848572103)*x_ref[1]**o + (0.425250740321)*x_ref[1]
        arg[(1, 0, 1)]=0.497767560891*x[0]**o + (-0.561068222162)*x[0] + (0.643475244208)*x[1]**o + (-0.946108992536)*x[1]
        ref[(1, 0, 1)]=0.497767560891*x_ref[0]**o + (-0.561068222162)*x_ref[0] + (0.643475244208)*x_ref[1]**o + (-0.946108992536)*x_ref[1]
        arg[(1, 1, 0)]=-0.592035135428*x[0]**o + (-0.00492123817253)*x[0] + (-0.622515434442)*x[1]**o + (0.464343261221)*x[1]
        ref[(1, 1, 0)]=-0.592035135428*x_ref[0]**o + (-0.00492123817253)*x_ref[0] + (-0.622515434442)*x_ref[1]**o + (0.464343261221)*x_ref[1]
        arg[(1, 1, 1)]=-0.794708630111*x[0]**o + (-0.955883316749)*x[0] + (0.415108616455)*x[1]**o + (-0.0496642519081)*x[1]
        ref[(1, 1, 1)]=-0.794708630111*x_ref[0]**o + (-0.955883316749)*x_ref[0] + (0.415108616455)*x_ref[1]**o + (-0.0496642519081)*x_ref[1]
        arg[(1, 2, 0)]=0.45188568143*x[0]**o + (0.542312163783)*x[0] + (-0.492757078763)*x[1]**o + (0.708987515378)*x[1]
        ref[(1, 2, 0)]=0.45188568143*x_ref[0]**o + (0.542312163783)*x_ref[0] + (-0.492757078763)*x_ref[1]**o + (0.708987515378)*x_ref[1]
        arg[(1, 2, 1)]=-0.832639887141*x[0]**o + (0.923592905291)*x[0] + (-0.616116428273)*x[1]**o + (0.0890344114732)*x[1]
        ref[(1, 2, 1)]=-0.832639887141*x_ref[0]**o + (0.923592905291)*x_ref[0] + (-0.616116428273)*x_ref[1]**o + (0.0890344114732)*x_ref[1]
        arg[(1, 3, 0)]=0.813687144012*x[0]**o + (-0.017681512003)*x[0] + (0.77298517789)*x[1]**o + (0.676903024087)*x[1]
        ref[(1, 3, 0)]=0.813687144012*x_ref[0]**o + (-0.017681512003)*x_ref[0] + (0.77298517789)*x_ref[1]**o + (0.676903024087)*x_ref[1]
        arg[(1, 3, 1)]=-0.14930699162*x[0]**o + (0.127790684909)*x[0] + (-0.0800717411223)*x[1]**o + (0.399089200387)*x[1]
        ref[(1, 3, 1)]=-0.14930699162*x_ref[0]**o + (0.127790684909)*x_ref[0] + (-0.0800717411223)*x_ref[1]**o + (0.399089200387)*x_ref[1]
        arg[(2, 0, 0)]=0.469779330559*x[0]**o + (0.717780945751)*x[0] + (0.89311756978)*x[1]**o + (0.202036537409)*x[1]
        ref[(2, 0, 0)]=0.469779330559*x_ref[0]**o + (0.717780945751)*x_ref[0] + (0.89311756978)*x_ref[1]**o + (0.202036537409)*x_ref[1]
        arg[(2, 0, 1)]=0.818041585088*x[0]**o + (0.918596198424)*x[0] + (0.353011464885)*x[1]**o + (0.233886900318)*x[1]
        ref[(2, 0, 1)]=0.818041585088*x_ref[0]**o + (0.918596198424)*x_ref[0] + (0.353011464885)*x_ref[1]**o + (0.233886900318)*x_ref[1]
        arg[(2, 1, 0)]=0.875783380814*x[0]**o + (0.775301254624)*x[0] + (-0.997255045643)*x[1]**o + (0.747755393187)*x[1]
        ref[(2, 1, 0)]=0.875783380814*x_ref[0]**o + (0.775301254624)*x_ref[0] + (-0.997255045643)*x_ref[1]**o + (0.747755393187)*x_ref[1]
        arg[(2, 1, 1)]=-0.459903387428*x[0]**o + (-0.858013130604)*x[0] + (-0.922485803855)*x[1]**o + (0.0351186023909)*x[1]
        ref[(2, 1, 1)]=-0.459903387428*x_ref[0]**o + (-0.858013130604)*x_ref[0] + (-0.922485803855)*x_ref[1]**o + (0.0351186023909)*x_ref[1]
        arg[(2, 2, 0)]=0.705723731433*x[0]**o + (0.372391766474)*x[0] + (0.711239872859)*x[1]**o + (0.294291823571)*x[1]
        ref[(2, 2, 0)]=0.705723731433*x_ref[0]**o + (0.372391766474)*x_ref[0] + (0.711239872859)*x_ref[1]**o + (0.294291823571)*x_ref[1]
        arg[(2, 2, 1)]=-0.880461967377*x[0]**o + (0.339398558106)*x[0] + (-0.849540338071)*x[1]**o + (0.305083516372)*x[1]
        ref[(2, 2, 1)]=-0.880461967377*x_ref[0]**o + (0.339398558106)*x_ref[0] + (-0.849540338071)*x_ref[1]**o + (0.305083516372)*x_ref[1]
        arg[(2, 3, 0)]=0.456912431365*x[0]**o + (0.211178267221)*x[0] + (0.599833438493)*x[1]**o + (0.736820051987)*x[1]
        ref[(2, 3, 0)]=0.456912431365*x_ref[0]**o + (0.211178267221)*x_ref[0] + (0.599833438493)*x_ref[1]**o + (0.736820051987)*x_ref[1]
        arg[(2, 3, 1)]=-0.738019437692*x[0]**o + (-0.986653175452)*x[0] + (0.0766988997947)*x[1]**o + (-0.193872421233)*x[1]
        ref[(2, 3, 1)]=-0.738019437692*x_ref[0]**o + (-0.986653175452)*x_ref[0] + (0.0766988997947)*x_ref[1]**o + (-0.193872421233)*x_ref[1]
        arg[(3, 0, 0)]=-0.159358845866*x[0]**o + (0.824072238731)*x[0] + (0.431995772788)*x[1]**o + (0.496865055446)*x[1]
        ref[(3, 0, 0)]=-0.159358845866*x_ref[0]**o + (0.824072238731)*x_ref[0] + (0.431995772788)*x_ref[1]**o + (0.496865055446)*x_ref[1]
        arg[(3, 0, 1)]=0.644496431528*x[0]**o + (0.024958523433)*x[0] + (-0.5363636591)*x[1]**o + (-0.407528352429)*x[1]
        ref[(3, 0, 1)]=0.644496431528*x_ref[0]**o + (0.024958523433)*x_ref[0] + (-0.5363636591)*x_ref[1]**o + (-0.407528352429)*x_ref[1]
        arg[(3, 1, 0)]=0.717493084804*x[0]**o + (0.988679360514)*x[0] + (0.541641019463)*x[1]**o + (0.977894020351)*x[1]
        ref[(3, 1, 0)]=0.717493084804*x_ref[0]**o + (0.988679360514)*x_ref[0] + (0.541641019463)*x_ref[1]**o + (0.977894020351)*x_ref[1]
        arg[(3, 1, 1)]=0.869269394608*x[0]**o + (0.491959088902)*x[0] + (-0.0227163024772)*x[1]**o + (0.742856540122)*x[1]
        ref[(3, 1, 1)]=0.869269394608*x_ref[0]**o + (0.491959088902)*x_ref[0] + (-0.0227163024772)*x_ref[1]**o + (0.742856540122)*x_ref[1]
        arg[(3, 2, 0)]=0.527612023553*x[0]**o + (0.657320329351)*x[0] + (0.823810645912)*x[1]**o + (-0.892844233701)*x[1]
        ref[(3, 2, 0)]=0.527612023553*x_ref[0]**o + (0.657320329351)*x_ref[0] + (0.823810645912)*x_ref[1]**o + (-0.892844233701)*x_ref[1]
        arg[(3, 2, 1)]=0.579067474716*x[0]**o + (0.674355251157)*x[0] + (0.585528382651)*x[1]**o + (-0.779593337298)*x[1]
        ref[(3, 2, 1)]=0.579067474716*x_ref[0]**o + (0.674355251157)*x_ref[0] + (0.585528382651)*x_ref[1]**o + (-0.779593337298)*x_ref[1]
        arg[(3, 3, 0)]=-0.597439805761*x[0]**o + (-0.525312079928)*x[0] + (0.494551405312)*x[1]**o + (0.733268102684)*x[1]
        ref[(3, 3, 0)]=-0.597439805761*x_ref[0]**o + (-0.525312079928)*x_ref[0] + (0.494551405312)*x_ref[1]**o + (0.733268102684)*x_ref[1]
        arg[(3, 3, 1)]=-0.991367477299*x[0]**o + (-0.122340736332)*x[0] + (0.887503784525)*x[1]**o + (-0.554371788337)*x[1]
        ref[(3, 3, 1)]=-0.991367477299*x_ref[0]**o + (-0.122340736332)*x_ref[0] + (0.887503784525)*x_ref[1]**o + (-0.554371788337)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.337568091314*x[2]**o + (-0.449432747192)*x[2]
            ref[(0, 0, 0)]+=-0.337568091314*x_ref[2]**o + (-0.449432747192)*x_ref[2]
            arg[(0, 0, 1)]+=-0.869432125724*x[2]**o + (0.678845157392)*x[2]
            ref[(0, 0, 1)]+=-0.869432125724*x_ref[2]**o + (0.678845157392)*x_ref[2]
            arg[(0, 1, 0)]+=0.137203586228*x[2]**o + (0.382282164676)*x[2]
            ref[(0, 1, 0)]+=0.137203586228*x_ref[2]**o + (0.382282164676)*x_ref[2]
            arg[(0, 1, 1)]+=-0.792185293153*x[2]**o + (-0.74327642435)*x[2]
            ref[(0, 1, 1)]+=-0.792185293153*x_ref[2]**o + (-0.74327642435)*x_ref[2]
            arg[(0, 2, 0)]+=0.0460749620501*x[2]**o + (0.796148243514)*x[2]
            ref[(0, 2, 0)]+=0.0460749620501*x_ref[2]**o + (0.796148243514)*x_ref[2]
            arg[(0, 2, 1)]+=0.242659935167*x[2]**o + (-0.990428755197)*x[2]
            ref[(0, 2, 1)]+=0.242659935167*x_ref[2]**o + (-0.990428755197)*x_ref[2]
            arg[(0, 3, 0)]+=0.0753923868134*x[2]**o + (-0.282362211782)*x[2]
            ref[(0, 3, 0)]+=0.0753923868134*x_ref[2]**o + (-0.282362211782)*x_ref[2]
            arg[(0, 3, 1)]+=-0.337003118532*x[2]**o + (-0.491829189356)*x[2]
            ref[(0, 3, 1)]+=-0.337003118532*x_ref[2]**o + (-0.491829189356)*x_ref[2]
            arg[(1, 0, 0)]+=-0.386779414769*x[2]**o + (0.460000480605)*x[2]
            ref[(1, 0, 0)]+=-0.386779414769*x_ref[2]**o + (0.460000480605)*x_ref[2]
            arg[(1, 0, 1)]+=-0.499905015019*x[2]**o + (-0.175142858798)*x[2]
            ref[(1, 0, 1)]+=-0.499905015019*x_ref[2]**o + (-0.175142858798)*x_ref[2]
            arg[(1, 1, 0)]+=-0.972275178553*x[2]**o + (0.420738205318)*x[2]
            ref[(1, 1, 0)]+=-0.972275178553*x_ref[2]**o + (0.420738205318)*x_ref[2]
            arg[(1, 1, 1)]+=-0.660752402524*x[2]**o + (-0.663503781821)*x[2]
            ref[(1, 1, 1)]+=-0.660752402524*x_ref[2]**o + (-0.663503781821)*x_ref[2]
            arg[(1, 2, 0)]+=0.241840958261*x[2]**o + (0.0905689946055)*x[2]
            ref[(1, 2, 0)]+=0.241840958261*x_ref[2]**o + (0.0905689946055)*x_ref[2]
            arg[(1, 2, 1)]+=0.981047159125*x[2]**o + (0.300932919306)*x[2]
            ref[(1, 2, 1)]+=0.981047159125*x_ref[2]**o + (0.300932919306)*x_ref[2]
            arg[(1, 3, 0)]+=0.396425208523*x[2]**o + (0.69644304502)*x[2]
            ref[(1, 3, 0)]+=0.396425208523*x_ref[2]**o + (0.69644304502)*x_ref[2]
            arg[(1, 3, 1)]+=0.172955960472*x[2]**o + (-0.627635652826)*x[2]
            ref[(1, 3, 1)]+=0.172955960472*x_ref[2]**o + (-0.627635652826)*x_ref[2]
            arg[(2, 0, 0)]+=-0.998831139178*x[2]**o + (0.0120375567544)*x[2]
            ref[(2, 0, 0)]+=-0.998831139178*x_ref[2]**o + (0.0120375567544)*x_ref[2]
            arg[(2, 0, 1)]+=0.601186191004*x[2]**o + (0.694385535842)*x[2]
            ref[(2, 0, 1)]+=0.601186191004*x_ref[2]**o + (0.694385535842)*x_ref[2]
            arg[(2, 1, 0)]+=0.82690991911*x[2]**o + (0.372078628916)*x[2]
            ref[(2, 1, 0)]+=0.82690991911*x_ref[2]**o + (0.372078628916)*x_ref[2]
            arg[(2, 1, 1)]+=0.338114706418*x[2]**o + (0.691946893952)*x[2]
            ref[(2, 1, 1)]+=0.338114706418*x_ref[2]**o + (0.691946893952)*x_ref[2]
            arg[(2, 2, 0)]+=-0.640054235949*x[2]**o + (-0.102491300351)*x[2]
            ref[(2, 2, 0)]+=-0.640054235949*x_ref[2]**o + (-0.102491300351)*x_ref[2]
            arg[(2, 2, 1)]+=0.11226557712*x[2]**o + (-0.283525720443)*x[2]
            ref[(2, 2, 1)]+=0.11226557712*x_ref[2]**o + (-0.283525720443)*x_ref[2]
            arg[(2, 3, 0)]+=-0.763737568617*x[2]**o + (0.860007057337)*x[2]
            ref[(2, 3, 0)]+=-0.763737568617*x_ref[2]**o + (0.860007057337)*x_ref[2]
            arg[(2, 3, 1)]+=-0.632102951484*x[2]**o + (-0.362834716618)*x[2]
            ref[(2, 3, 1)]+=-0.632102951484*x_ref[2]**o + (-0.362834716618)*x_ref[2]
            arg[(3, 0, 0)]+=-0.015020451869*x[2]**o + (-0.024580610465)*x[2]
            ref[(3, 0, 0)]+=-0.015020451869*x_ref[2]**o + (-0.024580610465)*x_ref[2]
            arg[(3, 0, 1)]+=-0.136421737784*x[2]**o + (0.565299730088)*x[2]
            ref[(3, 0, 1)]+=-0.136421737784*x_ref[2]**o + (0.565299730088)*x_ref[2]
            arg[(3, 1, 0)]+=-0.446477492699*x[2]**o + (0.812557315023)*x[2]
            ref[(3, 1, 0)]+=-0.446477492699*x_ref[2]**o + (0.812557315023)*x_ref[2]
            arg[(3, 1, 1)]+=-0.483394276897*x[2]**o + (-0.536053880168)*x[2]
            ref[(3, 1, 1)]+=-0.483394276897*x_ref[2]**o + (-0.536053880168)*x_ref[2]
            arg[(3, 2, 0)]+=-0.992215920436*x[2]**o + (0.919819184203)*x[2]
            ref[(3, 2, 0)]+=-0.992215920436*x_ref[2]**o + (0.919819184203)*x_ref[2]
            arg[(3, 2, 1)]+=0.349453522693*x[2]**o + (0.104196858053)*x[2]
            ref[(3, 2, 1)]+=0.349453522693*x_ref[2]**o + (0.104196858053)*x_ref[2]
            arg[(3, 3, 0)]+=-0.111047532857*x[2]**o + (0.405697014817)*x[2]
            ref[(3, 3, 0)]+=-0.111047532857*x_ref[2]**o + (0.405697014817)*x_ref[2]
            arg[(3, 3, 1)]+=-0.024567126085*x[2]**o + (0.817534418209)*x[2]
            ref[(3, 3, 1)]+=-0.024567126085*x_ref[2]**o + (0.817534418209)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedContinuousFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 3, 4),w)
        ref = Data(0,(4, 4, 3, 4),w_ref)
        arg[(0, 0, 0, 0)]=0.54345636248*x[0]**o + (-0.304384892665)*x[0] + (0.148570732633)*x[1]**o + (0.173419640542)*x[1]
        ref[(0, 0, 0, 0)]=0.54345636248*x_ref[0]**o + (-0.304384892665)*x_ref[0] + (0.148570732633)*x_ref[1]**o + (0.173419640542)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.356459593141*x[0]**o + (-0.940165051955)*x[0] + (0.0981333023222)*x[1]**o + (-0.792186537155)*x[1]
        ref[(0, 0, 0, 1)]=0.356459593141*x_ref[0]**o + (-0.940165051955)*x_ref[0] + (0.0981333023222)*x_ref[1]**o + (-0.792186537155)*x_ref[1]
        arg[(0, 0, 0, 2)]=-0.341853978559*x[0]**o + (-0.782652412174)*x[0] + (0.615837095586)*x[1]**o + (-0.0687067488066)*x[1]
        ref[(0, 0, 0, 2)]=-0.341853978559*x_ref[0]**o + (-0.782652412174)*x_ref[0] + (0.615837095586)*x_ref[1]**o + (-0.0687067488066)*x_ref[1]
        arg[(0, 0, 0, 3)]=0.824187963119*x[0]**o + (-0.485044930554)*x[0] + (0.49969055063)*x[1]**o + (-0.851475602239)*x[1]
        ref[(0, 0, 0, 3)]=0.824187963119*x_ref[0]**o + (-0.485044930554)*x_ref[0] + (0.49969055063)*x_ref[1]**o + (-0.851475602239)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.423651708717*x[0]**o + (0.468815182217)*x[0] + (-0.217454147671)*x[1]**o + (-0.158403632786)*x[1]
        ref[(0, 0, 1, 0)]=-0.423651708717*x_ref[0]**o + (0.468815182217)*x_ref[0] + (-0.217454147671)*x_ref[1]**o + (-0.158403632786)*x_ref[1]
        arg[(0, 0, 1, 1)]=-0.32620079163*x[0]**o + (-0.979227255434)*x[0] + (0.769677281387)*x[1]**o + (0.920316116385)*x[1]
        ref[(0, 0, 1, 1)]=-0.32620079163*x_ref[0]**o + (-0.979227255434)*x_ref[0] + (0.769677281387)*x_ref[1]**o + (0.920316116385)*x_ref[1]
        arg[(0, 0, 1, 2)]=-0.0809251351338*x[0]**o + (0.811757915459)*x[0] + (0.455233563548)*x[1]**o + (-0.499054155465)*x[1]
        ref[(0, 0, 1, 2)]=-0.0809251351338*x_ref[0]**o + (0.811757915459)*x_ref[0] + (0.455233563548)*x_ref[1]**o + (-0.499054155465)*x_ref[1]
        arg[(0, 0, 1, 3)]=0.340194778019*x[0]**o + (0.866407759564)*x[0] + (0.260857337753)*x[1]**o + (-0.24369802614)*x[1]
        ref[(0, 0, 1, 3)]=0.340194778019*x_ref[0]**o + (0.866407759564)*x_ref[0] + (0.260857337753)*x_ref[1]**o + (-0.24369802614)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.960165426692*x[0]**o + (0.103409902071)*x[0] + (-0.466413058307)*x[1]**o + (0.29147373686)*x[1]
        ref[(0, 0, 2, 0)]=-0.960165426692*x_ref[0]**o + (0.103409902071)*x_ref[0] + (-0.466413058307)*x_ref[1]**o + (0.29147373686)*x_ref[1]
        arg[(0, 0, 2, 1)]=0.795533068503*x[0]**o + (-0.44654239876)*x[0] + (0.953543856499)*x[1]**o + (-0.268824414025)*x[1]
        ref[(0, 0, 2, 1)]=0.795533068503*x_ref[0]**o + (-0.44654239876)*x_ref[0] + (0.953543856499)*x_ref[1]**o + (-0.268824414025)*x_ref[1]
        arg[(0, 0, 2, 2)]=0.719465669431*x[0]**o + (-0.671659794231)*x[0] + (-0.182746296675)*x[1]**o + (-0.558955931584)*x[1]
        ref[(0, 0, 2, 2)]=0.719465669431*x_ref[0]**o + (-0.671659794231)*x_ref[0] + (-0.182746296675)*x_ref[1]**o + (-0.558955931584)*x_ref[1]
        arg[(0, 0, 2, 3)]=0.0271273894004*x[0]**o + (0.526483402238)*x[0] + (0.471624991103)*x[1]**o + (-0.675940098809)*x[1]
        ref[(0, 0, 2, 3)]=0.0271273894004*x_ref[0]**o + (0.526483402238)*x_ref[0] + (0.471624991103)*x_ref[1]**o + (-0.675940098809)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.957834500879*x[0]**o + (0.548453586975)*x[0] + (-0.942467029547)*x[1]**o + (0.470297100198)*x[1]
        ref[(0, 1, 0, 0)]=-0.957834500879*x_ref[0]**o + (0.548453586975)*x_ref[0] + (-0.942467029547)*x_ref[1]**o + (0.470297100198)*x_ref[1]
        arg[(0, 1, 0, 1)]=-0.367878862082*x[0]**o + (0.0383685142076)*x[0] + (-0.395553697702)*x[1]**o + (-0.952021569587)*x[1]
        ref[(0, 1, 0, 1)]=-0.367878862082*x_ref[0]**o + (0.0383685142076)*x_ref[0] + (-0.395553697702)*x_ref[1]**o + (-0.952021569587)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.92103627034*x[0]**o + (0.661459891019)*x[0] + (0.186680885614)*x[1]**o + (0.805687490979)*x[1]
        ref[(0, 1, 0, 2)]=0.92103627034*x_ref[0]**o + (0.661459891019)*x_ref[0] + (0.186680885614)*x_ref[1]**o + (0.805687490979)*x_ref[1]
        arg[(0, 1, 0, 3)]=0.441431647568*x[0]**o + (0.955144742158)*x[0] + (0.226018103517)*x[1]**o + (0.65108006755)*x[1]
        ref[(0, 1, 0, 3)]=0.441431647568*x_ref[0]**o + (0.955144742158)*x_ref[0] + (0.226018103517)*x_ref[1]**o + (0.65108006755)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.62977857516*x[0]**o + (0.308116924431)*x[0] + (-0.222920930172)*x[1]**o + (-0.734813267573)*x[1]
        ref[(0, 1, 1, 0)]=0.62977857516*x_ref[0]**o + (0.308116924431)*x_ref[0] + (-0.222920930172)*x_ref[1]**o + (-0.734813267573)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.528270098188*x[0]**o + (-0.876975599968)*x[0] + (0.281040068158)*x[1]**o + (0.520015430107)*x[1]
        ref[(0, 1, 1, 1)]=-0.528270098188*x_ref[0]**o + (-0.876975599968)*x_ref[0] + (0.281040068158)*x_ref[1]**o + (0.520015430107)*x_ref[1]
        arg[(0, 1, 1, 2)]=0.972964682873*x[0]**o + (-0.999538716612)*x[0] + (-0.452501385736)*x[1]**o + (0.345138099945)*x[1]
        ref[(0, 1, 1, 2)]=0.972964682873*x_ref[0]**o + (-0.999538716612)*x_ref[0] + (-0.452501385736)*x_ref[1]**o + (0.345138099945)*x_ref[1]
        arg[(0, 1, 1, 3)]=-0.858591426264*x[0]**o + (-0.494159605836)*x[0] + (-0.757443747752)*x[1]**o + (-0.196480288667)*x[1]
        ref[(0, 1, 1, 3)]=-0.858591426264*x_ref[0]**o + (-0.494159605836)*x_ref[0] + (-0.757443747752)*x_ref[1]**o + (-0.196480288667)*x_ref[1]
        arg[(0, 1, 2, 0)]=0.369357834836*x[0]**o + (0.914629964573)*x[0] + (-0.577690884504)*x[1]**o + (-0.801534971853)*x[1]
        ref[(0, 1, 2, 0)]=0.369357834836*x_ref[0]**o + (0.914629964573)*x_ref[0] + (-0.577690884504)*x_ref[1]**o + (-0.801534971853)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.0782640117066*x[0]**o + (-0.272543221471)*x[0] + (-0.226445229806)*x[1]**o + (0.399552560548)*x[1]
        ref[(0, 1, 2, 1)]=0.0782640117066*x_ref[0]**o + (-0.272543221471)*x_ref[0] + (-0.226445229806)*x_ref[1]**o + (0.399552560548)*x_ref[1]
        arg[(0, 1, 2, 2)]=0.871214335437*x[0]**o + (-0.796687050321)*x[0] + (-0.599951923905)*x[1]**o + (-0.606042948307)*x[1]
        ref[(0, 1, 2, 2)]=0.871214335437*x_ref[0]**o + (-0.796687050321)*x_ref[0] + (-0.599951923905)*x_ref[1]**o + (-0.606042948307)*x_ref[1]
        arg[(0, 1, 2, 3)]=-0.468715501031*x[0]**o + (-0.399311029929)*x[0] + (0.820389197578)*x[1]**o + (-0.102625959104)*x[1]
        ref[(0, 1, 2, 3)]=-0.468715501031*x_ref[0]**o + (-0.399311029929)*x_ref[0] + (0.820389197578)*x_ref[1]**o + (-0.102625959104)*x_ref[1]
        arg[(0, 2, 0, 0)]=-0.986561506868*x[0]**o + (0.133066085112)*x[0] + (0.797607611722)*x[1]**o + (0.697890370809)*x[1]
        ref[(0, 2, 0, 0)]=-0.986561506868*x_ref[0]**o + (0.133066085112)*x_ref[0] + (0.797607611722)*x_ref[1]**o + (0.697890370809)*x_ref[1]
        arg[(0, 2, 0, 1)]=0.564155942152*x[0]**o + (-0.696402595413)*x[0] + (0.0903764131415)*x[1]**o + (0.138396700912)*x[1]
        ref[(0, 2, 0, 1)]=0.564155942152*x_ref[0]**o + (-0.696402595413)*x_ref[0] + (0.0903764131415)*x_ref[1]**o + (0.138396700912)*x_ref[1]
        arg[(0, 2, 0, 2)]=-0.254707841935*x[0]**o + (0.771512712636)*x[0] + (-0.666992815076)*x[1]**o + (-0.24018230919)*x[1]
        ref[(0, 2, 0, 2)]=-0.254707841935*x_ref[0]**o + (0.771512712636)*x_ref[0] + (-0.666992815076)*x_ref[1]**o + (-0.24018230919)*x_ref[1]
        arg[(0, 2, 0, 3)]=0.241343817735*x[0]**o + (0.112715601013)*x[0] + (0.491593774054)*x[1]**o + (0.277742714327)*x[1]
        ref[(0, 2, 0, 3)]=0.241343817735*x_ref[0]**o + (0.112715601013)*x_ref[0] + (0.491593774054)*x_ref[1]**o + (0.277742714327)*x_ref[1]
        arg[(0, 2, 1, 0)]=0.908311477842*x[0]**o + (0.914732094895)*x[0] + (0.319736701102)*x[1]**o + (-0.276715467249)*x[1]
        ref[(0, 2, 1, 0)]=0.908311477842*x_ref[0]**o + (0.914732094895)*x_ref[0] + (0.319736701102)*x_ref[1]**o + (-0.276715467249)*x_ref[1]
        arg[(0, 2, 1, 1)]=-0.0245574903429*x[0]**o + (0.458499626582)*x[0] + (0.8733994649)*x[1]**o + (0.0773574240291)*x[1]
        ref[(0, 2, 1, 1)]=-0.0245574903429*x_ref[0]**o + (0.458499626582)*x_ref[0] + (0.8733994649)*x_ref[1]**o + (0.0773574240291)*x_ref[1]
        arg[(0, 2, 1, 2)]=0.266585075438*x[0]**o + (0.811230008758)*x[0] + (-0.672321580852)*x[1]**o + (0.195222330768)*x[1]
        ref[(0, 2, 1, 2)]=0.266585075438*x_ref[0]**o + (0.811230008758)*x_ref[0] + (-0.672321580852)*x_ref[1]**o + (0.195222330768)*x_ref[1]
        arg[(0, 2, 1, 3)]=0.994844831099*x[0]**o + (-0.68198270572)*x[0] + (-0.868645841079)*x[1]**o + (0.800680452837)*x[1]
        ref[(0, 2, 1, 3)]=0.994844831099*x_ref[0]**o + (-0.68198270572)*x_ref[0] + (-0.868645841079)*x_ref[1]**o + (0.800680452837)*x_ref[1]
        arg[(0, 2, 2, 0)]=-0.827306001741*x[0]**o + (-0.617580638418)*x[0] + (-0.401643965743)*x[1]**o + (-0.407591407704)*x[1]
        ref[(0, 2, 2, 0)]=-0.827306001741*x_ref[0]**o + (-0.617580638418)*x_ref[0] + (-0.401643965743)*x_ref[1]**o + (-0.407591407704)*x_ref[1]
        arg[(0, 2, 2, 1)]=0.895651975668*x[0]**o + (0.798596539338)*x[0] + (0.150108015623)*x[1]**o + (0.699918436135)*x[1]
        ref[(0, 2, 2, 1)]=0.895651975668*x_ref[0]**o + (0.798596539338)*x_ref[0] + (0.150108015623)*x_ref[1]**o + (0.699918436135)*x_ref[1]
        arg[(0, 2, 2, 2)]=-0.174169525949*x[0]**o + (0.140186831938)*x[0] + (-0.635147909112)*x[1]**o + (0.520669125283)*x[1]
        ref[(0, 2, 2, 2)]=-0.174169525949*x_ref[0]**o + (0.140186831938)*x_ref[0] + (-0.635147909112)*x_ref[1]**o + (0.520669125283)*x_ref[1]
        arg[(0, 2, 2, 3)]=0.529286598042*x[0]**o + (0.653708892052)*x[0] + (0.74594790373)*x[1]**o + (-0.673102622841)*x[1]
        ref[(0, 2, 2, 3)]=0.529286598042*x_ref[0]**o + (0.653708892052)*x_ref[0] + (0.74594790373)*x_ref[1]**o + (-0.673102622841)*x_ref[1]
        arg[(0, 3, 0, 0)]=0.389985039542*x[0]**o + (-0.906080813028)*x[0] + (0.703816042735)*x[1]**o + (0.133474119279)*x[1]
        ref[(0, 3, 0, 0)]=0.389985039542*x_ref[0]**o + (-0.906080813028)*x_ref[0] + (0.703816042735)*x_ref[1]**o + (0.133474119279)*x_ref[1]
        arg[(0, 3, 0, 1)]=0.860576655429*x[0]**o + (-0.282609559831)*x[0] + (0.55736034783)*x[1]**o + (0.289964644625)*x[1]
        ref[(0, 3, 0, 1)]=0.860576655429*x_ref[0]**o + (-0.282609559831)*x_ref[0] + (0.55736034783)*x_ref[1]**o + (0.289964644625)*x_ref[1]
        arg[(0, 3, 0, 2)]=0.566732265773*x[0]**o + (-0.645348926253)*x[0] + (0.0789185683742)*x[1]**o + (0.839453383501)*x[1]
        ref[(0, 3, 0, 2)]=0.566732265773*x_ref[0]**o + (-0.645348926253)*x_ref[0] + (0.0789185683742)*x_ref[1]**o + (0.839453383501)*x_ref[1]
        arg[(0, 3, 0, 3)]=-0.804866452781*x[0]**o + (-0.825059092582)*x[0] + (-0.900824279982)*x[1]**o + (-0.536063018646)*x[1]
        ref[(0, 3, 0, 3)]=-0.804866452781*x_ref[0]**o + (-0.825059092582)*x_ref[0] + (-0.900824279982)*x_ref[1]**o + (-0.536063018646)*x_ref[1]
        arg[(0, 3, 1, 0)]=0.29237019573*x[0]**o + (0.488390561497)*x[0] + (-0.593394416835)*x[1]**o + (0.48789894827)*x[1]
        ref[(0, 3, 1, 0)]=0.29237019573*x_ref[0]**o + (0.488390561497)*x_ref[0] + (-0.593394416835)*x_ref[1]**o + (0.48789894827)*x_ref[1]
        arg[(0, 3, 1, 1)]=0.530455774939*x[0]**o + (-0.372188258097)*x[0] + (-0.702281399607)*x[1]**o + (-0.86594950829)*x[1]
        ref[(0, 3, 1, 1)]=0.530455774939*x_ref[0]**o + (-0.372188258097)*x_ref[0] + (-0.702281399607)*x_ref[1]**o + (-0.86594950829)*x_ref[1]
        arg[(0, 3, 1, 2)]=-0.160955273216*x[0]**o + (-0.670256804421)*x[0] + (-0.687062938783)*x[1]**o + (-0.37260810281)*x[1]
        ref[(0, 3, 1, 2)]=-0.160955273216*x_ref[0]**o + (-0.670256804421)*x_ref[0] + (-0.687062938783)*x_ref[1]**o + (-0.37260810281)*x_ref[1]
        arg[(0, 3, 1, 3)]=-0.0264959503265*x[0]**o + (-0.660873248756)*x[0] + (-0.435977939982)*x[1]**o + (0.377144346348)*x[1]
        ref[(0, 3, 1, 3)]=-0.0264959503265*x_ref[0]**o + (-0.660873248756)*x_ref[0] + (-0.435977939982)*x_ref[1]**o + (0.377144346348)*x_ref[1]
        arg[(0, 3, 2, 0)]=-0.951528912449*x[0]**o + (-0.470483394829)*x[0] + (-0.0133809463071)*x[1]**o + (-0.119166649288)*x[1]
        ref[(0, 3, 2, 0)]=-0.951528912449*x_ref[0]**o + (-0.470483394829)*x_ref[0] + (-0.0133809463071)*x_ref[1]**o + (-0.119166649288)*x_ref[1]
        arg[(0, 3, 2, 1)]=0.451004167786*x[0]**o + (-0.0276084823065)*x[0] + (-0.895398101734)*x[1]**o + (0.350472570955)*x[1]
        ref[(0, 3, 2, 1)]=0.451004167786*x_ref[0]**o + (-0.0276084823065)*x_ref[0] + (-0.895398101734)*x_ref[1]**o + (0.350472570955)*x_ref[1]
        arg[(0, 3, 2, 2)]=-0.60500216799*x[0]**o + (0.237998851554)*x[0] + (-0.338427957828)*x[1]**o + (0.651132201264)*x[1]
        ref[(0, 3, 2, 2)]=-0.60500216799*x_ref[0]**o + (0.237998851554)*x_ref[0] + (-0.338427957828)*x_ref[1]**o + (0.651132201264)*x_ref[1]
        arg[(0, 3, 2, 3)]=-0.00890942323662*x[0]**o + (0.0650483305417)*x[0] + (0.0233962335157)*x[1]**o + (-0.851008436436)*x[1]
        ref[(0, 3, 2, 3)]=-0.00890942323662*x_ref[0]**o + (0.0650483305417)*x_ref[0] + (0.0233962335157)*x_ref[1]**o + (-0.851008436436)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.710430600462*x[0]**o + (0.0754846977523)*x[0] + (0.0966324861248)*x[1]**o + (-0.0365826907533)*x[1]
        ref[(1, 0, 0, 0)]=0.710430600462*x_ref[0]**o + (0.0754846977523)*x_ref[0] + (0.0966324861248)*x_ref[1]**o + (-0.0365826907533)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.511217231823*x[0]**o + (-0.379450024993)*x[0] + (-0.710584322457)*x[1]**o + (0.74295527514)*x[1]
        ref[(1, 0, 0, 1)]=0.511217231823*x_ref[0]**o + (-0.379450024993)*x_ref[0] + (-0.710584322457)*x_ref[1]**o + (0.74295527514)*x_ref[1]
        arg[(1, 0, 0, 2)]=0.84568916028*x[0]**o + (-0.732241628691)*x[0] + (-0.407949043288)*x[1]**o + (0.372633795353)*x[1]
        ref[(1, 0, 0, 2)]=0.84568916028*x_ref[0]**o + (-0.732241628691)*x_ref[0] + (-0.407949043288)*x_ref[1]**o + (0.372633795353)*x_ref[1]
        arg[(1, 0, 0, 3)]=-0.580177426463*x[0]**o + (0.110156852316)*x[0] + (-0.491477856178)*x[1]**o + (0.971769831549)*x[1]
        ref[(1, 0, 0, 3)]=-0.580177426463*x_ref[0]**o + (0.110156852316)*x_ref[0] + (-0.491477856178)*x_ref[1]**o + (0.971769831549)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.941740125009*x[0]**o + (0.806281315184)*x[0] + (0.211203386723)*x[1]**o + (-0.0859626996591)*x[1]
        ref[(1, 0, 1, 0)]=-0.941740125009*x_ref[0]**o + (0.806281315184)*x_ref[0] + (0.211203386723)*x_ref[1]**o + (-0.0859626996591)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.00256749338589*x[0]**o + (0.0886999831622)*x[0] + (0.741337446711)*x[1]**o + (0.0441685657762)*x[1]
        ref[(1, 0, 1, 1)]=0.00256749338589*x_ref[0]**o + (0.0886999831622)*x_ref[0] + (0.741337446711)*x_ref[1]**o + (0.0441685657762)*x_ref[1]
        arg[(1, 0, 1, 2)]=-0.342723015843*x[0]**o + (-0.208899343225)*x[0] + (0.362571269669)*x[1]**o + (0.244516933816)*x[1]
        ref[(1, 0, 1, 2)]=-0.342723015843*x_ref[0]**o + (-0.208899343225)*x_ref[0] + (0.362571269669)*x_ref[1]**o + (0.244516933816)*x_ref[1]
        arg[(1, 0, 1, 3)]=-0.9298491715*x[0]**o + (0.993528031867)*x[0] + (-0.268353891608)*x[1]**o + (0.467164414001)*x[1]
        ref[(1, 0, 1, 3)]=-0.9298491715*x_ref[0]**o + (0.993528031867)*x_ref[0] + (-0.268353891608)*x_ref[1]**o + (0.467164414001)*x_ref[1]
        arg[(1, 0, 2, 0)]=0.498838851787*x[0]**o + (-0.451976021006)*x[0] + (0.570801205864)*x[1]**o + (0.143385667117)*x[1]
        ref[(1, 0, 2, 0)]=0.498838851787*x_ref[0]**o + (-0.451976021006)*x_ref[0] + (0.570801205864)*x_ref[1]**o + (0.143385667117)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.232338964237*x[0]**o + (0.891548499314)*x[0] + (-0.53576502896)*x[1]**o + (-0.193474252541)*x[1]
        ref[(1, 0, 2, 1)]=0.232338964237*x_ref[0]**o + (0.891548499314)*x_ref[0] + (-0.53576502896)*x_ref[1]**o + (-0.193474252541)*x_ref[1]
        arg[(1, 0, 2, 2)]=0.66779027325*x[0]**o + (-0.792174865353)*x[0] + (-0.443664792646)*x[1]**o + (-0.825118439203)*x[1]
        ref[(1, 0, 2, 2)]=0.66779027325*x_ref[0]**o + (-0.792174865353)*x_ref[0] + (-0.443664792646)*x_ref[1]**o + (-0.825118439203)*x_ref[1]
        arg[(1, 0, 2, 3)]=-0.240161811462*x[0]**o + (-0.94257321378)*x[0] + (0.854452644553)*x[1]**o + (-0.211021595672)*x[1]
        ref[(1, 0, 2, 3)]=-0.240161811462*x_ref[0]**o + (-0.94257321378)*x_ref[0] + (0.854452644553)*x_ref[1]**o + (-0.211021595672)*x_ref[1]
        arg[(1, 1, 0, 0)]=0.0658634259574*x[0]**o + (0.287024189293)*x[0] + (-0.225195552899)*x[1]**o + (0.239484580431)*x[1]
        ref[(1, 1, 0, 0)]=0.0658634259574*x_ref[0]**o + (0.287024189293)*x_ref[0] + (-0.225195552899)*x_ref[1]**o + (0.239484580431)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.296234000989*x[0]**o + (-0.647868086232)*x[0] + (-0.661004908397)*x[1]**o + (-0.606062377191)*x[1]
        ref[(1, 1, 0, 1)]=0.296234000989*x_ref[0]**o + (-0.647868086232)*x_ref[0] + (-0.661004908397)*x_ref[1]**o + (-0.606062377191)*x_ref[1]
        arg[(1, 1, 0, 2)]=0.00999457411449*x[0]**o + (0.0819015096281)*x[0] + (-0.589171172322)*x[1]**o + (0.168141492895)*x[1]
        ref[(1, 1, 0, 2)]=0.00999457411449*x_ref[0]**o + (0.0819015096281)*x_ref[0] + (-0.589171172322)*x_ref[1]**o + (0.168141492895)*x_ref[1]
        arg[(1, 1, 0, 3)]=0.883040808414*x[0]**o + (-0.0605562920759)*x[0] + (-0.884077083766)*x[1]**o + (0.142177300455)*x[1]
        ref[(1, 1, 0, 3)]=0.883040808414*x_ref[0]**o + (-0.0605562920759)*x_ref[0] + (-0.884077083766)*x_ref[1]**o + (0.142177300455)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.501560255375*x[0]**o + (-0.497625332923)*x[0] + (0.429138468963)*x[1]**o + (-0.165352735808)*x[1]
        ref[(1, 1, 1, 0)]=0.501560255375*x_ref[0]**o + (-0.497625332923)*x_ref[0] + (0.429138468963)*x_ref[1]**o + (-0.165352735808)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.59303817376*x[0]**o + (-0.227593595695)*x[0] + (0.075952557797)*x[1]**o + (0.0321182620143)*x[1]
        ref[(1, 1, 1, 1)]=-0.59303817376*x_ref[0]**o + (-0.227593595695)*x_ref[0] + (0.075952557797)*x_ref[1]**o + (0.0321182620143)*x_ref[1]
        arg[(1, 1, 1, 2)]=0.777695636857*x[0]**o + (0.394814645144)*x[0] + (-0.952305714265)*x[1]**o + (-0.458933230601)*x[1]
        ref[(1, 1, 1, 2)]=0.777695636857*x_ref[0]**o + (0.394814645144)*x_ref[0] + (-0.952305714265)*x_ref[1]**o + (-0.458933230601)*x_ref[1]
        arg[(1, 1, 1, 3)]=-0.918468727495*x[0]**o + (0.608712466411)*x[0] + (-0.0260122107744)*x[1]**o + (0.0312695350393)*x[1]
        ref[(1, 1, 1, 3)]=-0.918468727495*x_ref[0]**o + (0.608712466411)*x_ref[0] + (-0.0260122107744)*x_ref[1]**o + (0.0312695350393)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.343316601152*x[0]**o + (-0.748575537687)*x[0] + (0.85651392402)*x[1]**o + (0.825660761103)*x[1]
        ref[(1, 1, 2, 0)]=-0.343316601152*x_ref[0]**o + (-0.748575537687)*x_ref[0] + (0.85651392402)*x_ref[1]**o + (0.825660761103)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.76976629072*x[0]**o + (-0.669484842469)*x[0] + (-0.314566268201)*x[1]**o + (-0.34348251926)*x[1]
        ref[(1, 1, 2, 1)]=-0.76976629072*x_ref[0]**o + (-0.669484842469)*x_ref[0] + (-0.314566268201)*x_ref[1]**o + (-0.34348251926)*x_ref[1]
        arg[(1, 1, 2, 2)]=-0.268601948137*x[0]**o + (-0.230634761868)*x[0] + (0.303651434519)*x[1]**o + (-0.798509471484)*x[1]
        ref[(1, 1, 2, 2)]=-0.268601948137*x_ref[0]**o + (-0.230634761868)*x_ref[0] + (0.303651434519)*x_ref[1]**o + (-0.798509471484)*x_ref[1]
        arg[(1, 1, 2, 3)]=-0.614037744417*x[0]**o + (-0.0514944621087)*x[0] + (-0.223159737464)*x[1]**o + (-0.894755806685)*x[1]
        ref[(1, 1, 2, 3)]=-0.614037744417*x_ref[0]**o + (-0.0514944621087)*x_ref[0] + (-0.223159737464)*x_ref[1]**o + (-0.894755806685)*x_ref[1]
        arg[(1, 2, 0, 0)]=0.587599385013*x[0]**o + (-0.496321737806)*x[0] + (0.309754037738)*x[1]**o + (0.171033114767)*x[1]
        ref[(1, 2, 0, 0)]=0.587599385013*x_ref[0]**o + (-0.496321737806)*x_ref[0] + (0.309754037738)*x_ref[1]**o + (0.171033114767)*x_ref[1]
        arg[(1, 2, 0, 1)]=-0.220199006099*x[0]**o + (-0.945062384048)*x[0] + (-0.745800032333)*x[1]**o + (-0.604275680466)*x[1]
        ref[(1, 2, 0, 1)]=-0.220199006099*x_ref[0]**o + (-0.945062384048)*x_ref[0] + (-0.745800032333)*x_ref[1]**o + (-0.604275680466)*x_ref[1]
        arg[(1, 2, 0, 2)]=-0.347268332823*x[0]**o + (0.777354837676)*x[0] + (0.701703689149)*x[1]**o + (0.707643737064)*x[1]
        ref[(1, 2, 0, 2)]=-0.347268332823*x_ref[0]**o + (0.777354837676)*x_ref[0] + (0.701703689149)*x_ref[1]**o + (0.707643737064)*x_ref[1]
        arg[(1, 2, 0, 3)]=0.623972316483*x[0]**o + (-0.593753303732)*x[0] + (0.115652550235)*x[1]**o + (-0.857939391209)*x[1]
        ref[(1, 2, 0, 3)]=0.623972316483*x_ref[0]**o + (-0.593753303732)*x_ref[0] + (0.115652550235)*x_ref[1]**o + (-0.857939391209)*x_ref[1]
        arg[(1, 2, 1, 0)]=-0.883280378609*x[0]**o + (-0.88304628863)*x[0] + (0.691791607733)*x[1]**o + (0.286470666531)*x[1]
        ref[(1, 2, 1, 0)]=-0.883280378609*x_ref[0]**o + (-0.88304628863)*x_ref[0] + (0.691791607733)*x_ref[1]**o + (0.286470666531)*x_ref[1]
        arg[(1, 2, 1, 1)]=0.763539219664*x[0]**o + (0.778441538541)*x[0] + (-0.826255803796)*x[1]**o + (-0.544302921049)*x[1]
        ref[(1, 2, 1, 1)]=0.763539219664*x_ref[0]**o + (0.778441538541)*x_ref[0] + (-0.826255803796)*x_ref[1]**o + (-0.544302921049)*x_ref[1]
        arg[(1, 2, 1, 2)]=-0.664567953472*x[0]**o + (0.591474330836)*x[0] + (-0.715268622848)*x[1]**o + (-0.17119230103)*x[1]
        ref[(1, 2, 1, 2)]=-0.664567953472*x_ref[0]**o + (0.591474330836)*x_ref[0] + (-0.715268622848)*x_ref[1]**o + (-0.17119230103)*x_ref[1]
        arg[(1, 2, 1, 3)]=0.123092239655*x[0]**o + (-0.0382044154702)*x[0] + (-0.908967441707)*x[1]**o + (0.579284043991)*x[1]
        ref[(1, 2, 1, 3)]=0.123092239655*x_ref[0]**o + (-0.0382044154702)*x_ref[0] + (-0.908967441707)*x_ref[1]**o + (0.579284043991)*x_ref[1]
        arg[(1, 2, 2, 0)]=-0.311099089097*x[0]**o + (0.712966657811)*x[0] + (-0.650610501228)*x[1]**o + (0.318912531071)*x[1]
        ref[(1, 2, 2, 0)]=-0.311099089097*x_ref[0]**o + (0.712966657811)*x_ref[0] + (-0.650610501228)*x_ref[1]**o + (0.318912531071)*x_ref[1]
        arg[(1, 2, 2, 1)]=-0.702677822873*x[0]**o + (0.250160762306)*x[0] + (0.216986839845)*x[1]**o + (-0.0781404344879)*x[1]
        ref[(1, 2, 2, 1)]=-0.702677822873*x_ref[0]**o + (0.250160762306)*x_ref[0] + (0.216986839845)*x_ref[1]**o + (-0.0781404344879)*x_ref[1]
        arg[(1, 2, 2, 2)]=-0.481263672942*x[0]**o + (-0.0462039721776)*x[0] + (0.285505761548)*x[1]**o + (0.480418061636)*x[1]
        ref[(1, 2, 2, 2)]=-0.481263672942*x_ref[0]**o + (-0.0462039721776)*x_ref[0] + (0.285505761548)*x_ref[1]**o + (0.480418061636)*x_ref[1]
        arg[(1, 2, 2, 3)]=0.317359882612*x[0]**o + (-0.965637954599)*x[0] + (-0.606667884369)*x[1]**o + (0.664632184333)*x[1]
        ref[(1, 2, 2, 3)]=0.317359882612*x_ref[0]**o + (-0.965637954599)*x_ref[0] + (-0.606667884369)*x_ref[1]**o + (0.664632184333)*x_ref[1]
        arg[(1, 3, 0, 0)]=-0.775285035806*x[0]**o + (0.382915100561)*x[0] + (-0.672277084841)*x[1]**o + (-0.864259870814)*x[1]
        ref[(1, 3, 0, 0)]=-0.775285035806*x_ref[0]**o + (0.382915100561)*x_ref[0] + (-0.672277084841)*x_ref[1]**o + (-0.864259870814)*x_ref[1]
        arg[(1, 3, 0, 1)]=-0.367375518306*x[0]**o + (-0.429279730622)*x[0] + (-0.667597732742)*x[1]**o + (0.504512706164)*x[1]
        ref[(1, 3, 0, 1)]=-0.367375518306*x_ref[0]**o + (-0.429279730622)*x_ref[0] + (-0.667597732742)*x_ref[1]**o + (0.504512706164)*x_ref[1]
        arg[(1, 3, 0, 2)]=0.0337673297964*x[0]**o + (-0.889993325516)*x[0] + (0.477596839559)*x[1]**o + (-0.0699558162847)*x[1]
        ref[(1, 3, 0, 2)]=0.0337673297964*x_ref[0]**o + (-0.889993325516)*x_ref[0] + (0.477596839559)*x_ref[1]**o + (-0.0699558162847)*x_ref[1]
        arg[(1, 3, 0, 3)]=-0.418231398015*x[0]**o + (-0.328658170946)*x[0] + (0.807831613405)*x[1]**o + (-0.87289536907)*x[1]
        ref[(1, 3, 0, 3)]=-0.418231398015*x_ref[0]**o + (-0.328658170946)*x_ref[0] + (0.807831613405)*x_ref[1]**o + (-0.87289536907)*x_ref[1]
        arg[(1, 3, 1, 0)]=-0.743750669786*x[0]**o + (-0.238548480461)*x[0] + (0.067508922957)*x[1]**o + (-0.2579039393)*x[1]
        ref[(1, 3, 1, 0)]=-0.743750669786*x_ref[0]**o + (-0.238548480461)*x_ref[0] + (0.067508922957)*x_ref[1]**o + (-0.2579039393)*x_ref[1]
        arg[(1, 3, 1, 1)]=0.91319962273*x[0]**o + (0.624248253839)*x[0] + (0.174843879141)*x[1]**o + (-0.819331614526)*x[1]
        ref[(1, 3, 1, 1)]=0.91319962273*x_ref[0]**o + (0.624248253839)*x_ref[0] + (0.174843879141)*x_ref[1]**o + (-0.819331614526)*x_ref[1]
        arg[(1, 3, 1, 2)]=-0.0973532368414*x[0]**o + (-0.476483082985)*x[0] + (-0.136997587508)*x[1]**o + (-0.856886727008)*x[1]
        ref[(1, 3, 1, 2)]=-0.0973532368414*x_ref[0]**o + (-0.476483082985)*x_ref[0] + (-0.136997587508)*x_ref[1]**o + (-0.856886727008)*x_ref[1]
        arg[(1, 3, 1, 3)]=0.370358917161*x[0]**o + (-0.273307274024)*x[0] + (-0.837615757928)*x[1]**o + (-0.403976455648)*x[1]
        ref[(1, 3, 1, 3)]=0.370358917161*x_ref[0]**o + (-0.273307274024)*x_ref[0] + (-0.837615757928)*x_ref[1]**o + (-0.403976455648)*x_ref[1]
        arg[(1, 3, 2, 0)]=0.717057523444*x[0]**o + (-0.736560255231)*x[0] + (-0.476062882227)*x[1]**o + (-0.438154655346)*x[1]
        ref[(1, 3, 2, 0)]=0.717057523444*x_ref[0]**o + (-0.736560255231)*x_ref[0] + (-0.476062882227)*x_ref[1]**o + (-0.438154655346)*x_ref[1]
        arg[(1, 3, 2, 1)]=0.141742478177*x[0]**o + (0.882141864313)*x[0] + (-0.685491608245)*x[1]**o + (-0.358824001496)*x[1]
        ref[(1, 3, 2, 1)]=0.141742478177*x_ref[0]**o + (0.882141864313)*x_ref[0] + (-0.685491608245)*x_ref[1]**o + (-0.358824001496)*x_ref[1]
        arg[(1, 3, 2, 2)]=0.372299772867*x[0]**o + (0.632033221621)*x[0] + (-0.234205141724)*x[1]**o + (-0.0869934110506)*x[1]
        ref[(1, 3, 2, 2)]=0.372299772867*x_ref[0]**o + (0.632033221621)*x_ref[0] + (-0.234205141724)*x_ref[1]**o + (-0.0869934110506)*x_ref[1]
        arg[(1, 3, 2, 3)]=-0.701863453046*x[0]**o + (-0.163619998579)*x[0] + (0.934871184264)*x[1]**o + (0.845173288132)*x[1]
        ref[(1, 3, 2, 3)]=-0.701863453046*x_ref[0]**o + (-0.163619998579)*x_ref[0] + (0.934871184264)*x_ref[1]**o + (0.845173288132)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.0577433452414*x[0]**o + (-0.758013174437)*x[0] + (0.520132112952)*x[1]**o + (0.358352834225)*x[1]
        ref[(2, 0, 0, 0)]=0.0577433452414*x_ref[0]**o + (-0.758013174437)*x_ref[0] + (0.520132112952)*x_ref[1]**o + (0.358352834225)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.184393911713*x[0]**o + (-0.0390702562814)*x[0] + (-0.243236564823)*x[1]**o + (0.458899172353)*x[1]
        ref[(2, 0, 0, 1)]=0.184393911713*x_ref[0]**o + (-0.0390702562814)*x_ref[0] + (-0.243236564823)*x_ref[1]**o + (0.458899172353)*x_ref[1]
        arg[(2, 0, 0, 2)]=-0.0451819346122*x[0]**o + (-0.224735420744)*x[0] + (0.174934699525)*x[1]**o + (0.475779056128)*x[1]
        ref[(2, 0, 0, 2)]=-0.0451819346122*x_ref[0]**o + (-0.224735420744)*x_ref[0] + (0.174934699525)*x_ref[1]**o + (0.475779056128)*x_ref[1]
        arg[(2, 0, 0, 3)]=-0.318431935277*x[0]**o + (-0.643028307618)*x[0] + (-0.698670934329)*x[1]**o + (0.464462846985)*x[1]
        ref[(2, 0, 0, 3)]=-0.318431935277*x_ref[0]**o + (-0.643028307618)*x_ref[0] + (-0.698670934329)*x_ref[1]**o + (0.464462846985)*x_ref[1]
        arg[(2, 0, 1, 0)]=0.726699688335*x[0]**o + (-0.0123004105897)*x[0] + (0.756575003381)*x[1]**o + (-0.172191668466)*x[1]
        ref[(2, 0, 1, 0)]=0.726699688335*x_ref[0]**o + (-0.0123004105897)*x_ref[0] + (0.756575003381)*x_ref[1]**o + (-0.172191668466)*x_ref[1]
        arg[(2, 0, 1, 1)]=0.266704040222*x[0]**o + (0.261762623117)*x[0] + (0.427489941315)*x[1]**o + (-0.759346748886)*x[1]
        ref[(2, 0, 1, 1)]=0.266704040222*x_ref[0]**o + (0.261762623117)*x_ref[0] + (0.427489941315)*x_ref[1]**o + (-0.759346748886)*x_ref[1]
        arg[(2, 0, 1, 2)]=0.125994198848*x[0]**o + (-0.874209140785)*x[0] + (-0.640912189011)*x[1]**o + (0.469754666155)*x[1]
        ref[(2, 0, 1, 2)]=0.125994198848*x_ref[0]**o + (-0.874209140785)*x_ref[0] + (-0.640912189011)*x_ref[1]**o + (0.469754666155)*x_ref[1]
        arg[(2, 0, 1, 3)]=0.0239206656222*x[0]**o + (0.564677841199)*x[0] + (0.689763089113)*x[1]**o + (-0.418853241988)*x[1]
        ref[(2, 0, 1, 3)]=0.0239206656222*x_ref[0]**o + (0.564677841199)*x_ref[0] + (0.689763089113)*x_ref[1]**o + (-0.418853241988)*x_ref[1]
        arg[(2, 0, 2, 0)]=0.825872160505*x[0]**o + (-0.675431918338)*x[0] + (0.0686929406555)*x[1]**o + (0.7536312189)*x[1]
        ref[(2, 0, 2, 0)]=0.825872160505*x_ref[0]**o + (-0.675431918338)*x_ref[0] + (0.0686929406555)*x_ref[1]**o + (0.7536312189)*x_ref[1]
        arg[(2, 0, 2, 1)]=0.231748443846*x[0]**o + (-0.437939293751)*x[0] + (0.76903899721)*x[1]**o + (0.577352375596)*x[1]
        ref[(2, 0, 2, 1)]=0.231748443846*x_ref[0]**o + (-0.437939293751)*x_ref[0] + (0.76903899721)*x_ref[1]**o + (0.577352375596)*x_ref[1]
        arg[(2, 0, 2, 2)]=-0.691840788677*x[0]**o + (0.242321050272)*x[0] + (-0.927519169514)*x[1]**o + (-0.162649343169)*x[1]
        ref[(2, 0, 2, 2)]=-0.691840788677*x_ref[0]**o + (0.242321050272)*x_ref[0] + (-0.927519169514)*x_ref[1]**o + (-0.162649343169)*x_ref[1]
        arg[(2, 0, 2, 3)]=-0.562425365392*x[0]**o + (-0.999873944757)*x[0] + (0.632948821578)*x[1]**o + (-0.825961346641)*x[1]
        ref[(2, 0, 2, 3)]=-0.562425365392*x_ref[0]**o + (-0.999873944757)*x_ref[0] + (0.632948821578)*x_ref[1]**o + (-0.825961346641)*x_ref[1]
        arg[(2, 1, 0, 0)]=-0.660577324634*x[0]**o + (0.441952243808)*x[0] + (-0.67333817087)*x[1]**o + (0.769543381843)*x[1]
        ref[(2, 1, 0, 0)]=-0.660577324634*x_ref[0]**o + (0.441952243808)*x_ref[0] + (-0.67333817087)*x_ref[1]**o + (0.769543381843)*x_ref[1]
        arg[(2, 1, 0, 1)]=-0.495606536308*x[0]**o + (-0.529773494251)*x[0] + (0.0899827368252)*x[1]**o + (-0.222234301001)*x[1]
        ref[(2, 1, 0, 1)]=-0.495606536308*x_ref[0]**o + (-0.529773494251)*x_ref[0] + (0.0899827368252)*x_ref[1]**o + (-0.222234301001)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.561258033248*x[0]**o + (0.627017887485)*x[0] + (-0.134152144553)*x[1]**o + (0.293319063035)*x[1]
        ref[(2, 1, 0, 2)]=-0.561258033248*x_ref[0]**o + (0.627017887485)*x_ref[0] + (-0.134152144553)*x_ref[1]**o + (0.293319063035)*x_ref[1]
        arg[(2, 1, 0, 3)]=0.381079483595*x[0]**o + (0.365189010821)*x[0] + (0.293607695175)*x[1]**o + (0.61038221264)*x[1]
        ref[(2, 1, 0, 3)]=0.381079483595*x_ref[0]**o + (0.365189010821)*x_ref[0] + (0.293607695175)*x_ref[1]**o + (0.61038221264)*x_ref[1]
        arg[(2, 1, 1, 0)]=-0.0627639846299*x[0]**o + (0.55394612651)*x[0] + (0.94981031827)*x[1]**o + (-0.8187723595)*x[1]
        ref[(2, 1, 1, 0)]=-0.0627639846299*x_ref[0]**o + (0.55394612651)*x_ref[0] + (0.94981031827)*x_ref[1]**o + (-0.8187723595)*x_ref[1]
        arg[(2, 1, 1, 1)]=-0.531872826238*x[0]**o + (0.657379020111)*x[0] + (0.362336785689)*x[1]**o + (-0.478812330675)*x[1]
        ref[(2, 1, 1, 1)]=-0.531872826238*x_ref[0]**o + (0.657379020111)*x_ref[0] + (0.362336785689)*x_ref[1]**o + (-0.478812330675)*x_ref[1]
        arg[(2, 1, 1, 2)]=-0.643097751167*x[0]**o + (-0.955829182861)*x[0] + (-0.665109780201)*x[1]**o + (0.562884510616)*x[1]
        ref[(2, 1, 1, 2)]=-0.643097751167*x_ref[0]**o + (-0.955829182861)*x_ref[0] + (-0.665109780201)*x_ref[1]**o + (0.562884510616)*x_ref[1]
        arg[(2, 1, 1, 3)]=-0.368221442127*x[0]**o + (0.75618877051)*x[0] + (-0.219117457794)*x[1]**o + (0.0526095757342)*x[1]
        ref[(2, 1, 1, 3)]=-0.368221442127*x_ref[0]**o + (0.75618877051)*x_ref[0] + (-0.219117457794)*x_ref[1]**o + (0.0526095757342)*x_ref[1]
        arg[(2, 1, 2, 0)]=0.834696767274*x[0]**o + (0.274854118124)*x[0] + (-0.0555006681575)*x[1]**o + (-0.0199641734999)*x[1]
        ref[(2, 1, 2, 0)]=0.834696767274*x_ref[0]**o + (0.274854118124)*x_ref[0] + (-0.0555006681575)*x_ref[1]**o + (-0.0199641734999)*x_ref[1]
        arg[(2, 1, 2, 1)]=0.244830925382*x[0]**o + (0.256809301388)*x[0] + (-0.223299680601)*x[1]**o + (-0.0108818455526)*x[1]
        ref[(2, 1, 2, 1)]=0.244830925382*x_ref[0]**o + (0.256809301388)*x_ref[0] + (-0.223299680601)*x_ref[1]**o + (-0.0108818455526)*x_ref[1]
        arg[(2, 1, 2, 2)]=-0.24795950448*x[0]**o + (0.303795830817)*x[0] + (0.92959033406)*x[1]**o + (-0.399341138171)*x[1]
        ref[(2, 1, 2, 2)]=-0.24795950448*x_ref[0]**o + (0.303795830817)*x_ref[0] + (0.92959033406)*x_ref[1]**o + (-0.399341138171)*x_ref[1]
        arg[(2, 1, 2, 3)]=0.44235885938*x[0]**o + (-0.224776846816)*x[0] + (0.927890780948)*x[1]**o + (-0.85226961118)*x[1]
        ref[(2, 1, 2, 3)]=0.44235885938*x_ref[0]**o + (-0.224776846816)*x_ref[0] + (0.927890780948)*x_ref[1]**o + (-0.85226961118)*x_ref[1]
        arg[(2, 2, 0, 0)]=0.106608882745*x[0]**o + (0.871182612072)*x[0] + (0.692627043535)*x[1]**o + (0.920229506334)*x[1]
        ref[(2, 2, 0, 0)]=0.106608882745*x_ref[0]**o + (0.871182612072)*x_ref[0] + (0.692627043535)*x_ref[1]**o + (0.920229506334)*x_ref[1]
        arg[(2, 2, 0, 1)]=-0.252525859391*x[0]**o + (-0.545710360837)*x[0] + (-0.224341498332)*x[1]**o + (0.183991117918)*x[1]
        ref[(2, 2, 0, 1)]=-0.252525859391*x_ref[0]**o + (-0.545710360837)*x_ref[0] + (-0.224341498332)*x_ref[1]**o + (0.183991117918)*x_ref[1]
        arg[(2, 2, 0, 2)]=-0.83411731453*x[0]**o + (-0.457376029541)*x[0] + (0.413138202133)*x[1]**o + (0.539700536446)*x[1]
        ref[(2, 2, 0, 2)]=-0.83411731453*x_ref[0]**o + (-0.457376029541)*x_ref[0] + (0.413138202133)*x_ref[1]**o + (0.539700536446)*x_ref[1]
        arg[(2, 2, 0, 3)]=0.548286706075*x[0]**o + (-0.477390235976)*x[0] + (0.109111196488)*x[1]**o + (-0.172173331421)*x[1]
        ref[(2, 2, 0, 3)]=0.548286706075*x_ref[0]**o + (-0.477390235976)*x_ref[0] + (0.109111196488)*x_ref[1]**o + (-0.172173331421)*x_ref[1]
        arg[(2, 2, 1, 0)]=-0.393019514198*x[0]**o + (-0.656291927921)*x[0] + (0.336690441109)*x[1]**o + (0.916874920225)*x[1]
        ref[(2, 2, 1, 0)]=-0.393019514198*x_ref[0]**o + (-0.656291927921)*x_ref[0] + (0.336690441109)*x_ref[1]**o + (0.916874920225)*x_ref[1]
        arg[(2, 2, 1, 1)]=-0.0726266366313*x[0]**o + (-0.0753814179861)*x[0] + (0.309365769932)*x[1]**o + (-0.496989274637)*x[1]
        ref[(2, 2, 1, 1)]=-0.0726266366313*x_ref[0]**o + (-0.0753814179861)*x_ref[0] + (0.309365769932)*x_ref[1]**o + (-0.496989274637)*x_ref[1]
        arg[(2, 2, 1, 2)]=-0.099946075321*x[0]**o + (0.471140546716)*x[0] + (-0.0375459826382)*x[1]**o + (0.916255694028)*x[1]
        ref[(2, 2, 1, 2)]=-0.099946075321*x_ref[0]**o + (0.471140546716)*x_ref[0] + (-0.0375459826382)*x_ref[1]**o + (0.916255694028)*x_ref[1]
        arg[(2, 2, 1, 3)]=-0.021739795267*x[0]**o + (0.677702211174)*x[0] + (-0.311663926746)*x[1]**o + (0.28434352737)*x[1]
        ref[(2, 2, 1, 3)]=-0.021739795267*x_ref[0]**o + (0.677702211174)*x_ref[0] + (-0.311663926746)*x_ref[1]**o + (0.28434352737)*x_ref[1]
        arg[(2, 2, 2, 0)]=0.460772446594*x[0]**o + (0.893682367345)*x[0] + (-0.392242116404)*x[1]**o + (-0.399075519)*x[1]
        ref[(2, 2, 2, 0)]=0.460772446594*x_ref[0]**o + (0.893682367345)*x_ref[0] + (-0.392242116404)*x_ref[1]**o + (-0.399075519)*x_ref[1]
        arg[(2, 2, 2, 1)]=0.689723570222*x[0]**o + (-0.508081663045)*x[0] + (-0.975554257744)*x[1]**o + (-0.634774838258)*x[1]
        ref[(2, 2, 2, 1)]=0.689723570222*x_ref[0]**o + (-0.508081663045)*x_ref[0] + (-0.975554257744)*x_ref[1]**o + (-0.634774838258)*x_ref[1]
        arg[(2, 2, 2, 2)]=-0.235062024217*x[0]**o + (0.684682558373)*x[0] + (0.565856296603)*x[1]**o + (0.695604097892)*x[1]
        ref[(2, 2, 2, 2)]=-0.235062024217*x_ref[0]**o + (0.684682558373)*x_ref[0] + (0.565856296603)*x_ref[1]**o + (0.695604097892)*x_ref[1]
        arg[(2, 2, 2, 3)]=0.514277704998*x[0]**o + (0.038630594894)*x[0] + (-0.485446715603)*x[1]**o + (-0.834881029712)*x[1]
        ref[(2, 2, 2, 3)]=0.514277704998*x_ref[0]**o + (0.038630594894)*x_ref[0] + (-0.485446715603)*x_ref[1]**o + (-0.834881029712)*x_ref[1]
        arg[(2, 3, 0, 0)]=0.298741661066*x[0]**o + (0.0149763846616)*x[0] + (-0.359044045129)*x[1]**o + (0.0109251649801)*x[1]
        ref[(2, 3, 0, 0)]=0.298741661066*x_ref[0]**o + (0.0149763846616)*x_ref[0] + (-0.359044045129)*x_ref[1]**o + (0.0109251649801)*x_ref[1]
        arg[(2, 3, 0, 1)]=-0.032942532433*x[0]**o + (0.852841782096)*x[0] + (-0.727895021271)*x[1]**o + (0.882062793663)*x[1]
        ref[(2, 3, 0, 1)]=-0.032942532433*x_ref[0]**o + (0.852841782096)*x_ref[0] + (-0.727895021271)*x_ref[1]**o + (0.882062793663)*x_ref[1]
        arg[(2, 3, 0, 2)]=0.774378040571*x[0]**o + (-0.846472509693)*x[0] + (-0.0618980976116)*x[1]**o + (-0.349965456694)*x[1]
        ref[(2, 3, 0, 2)]=0.774378040571*x_ref[0]**o + (-0.846472509693)*x_ref[0] + (-0.0618980976116)*x_ref[1]**o + (-0.349965456694)*x_ref[1]
        arg[(2, 3, 0, 3)]=0.938191399379*x[0]**o + (-0.923137084462)*x[0] + (-0.928066886397)*x[1]**o + (-0.19382722156)*x[1]
        ref[(2, 3, 0, 3)]=0.938191399379*x_ref[0]**o + (-0.923137084462)*x_ref[0] + (-0.928066886397)*x_ref[1]**o + (-0.19382722156)*x_ref[1]
        arg[(2, 3, 1, 0)]=0.456585775684*x[0]**o + (0.00371403480067)*x[0] + (-0.360396976751)*x[1]**o + (-0.610294229552)*x[1]
        ref[(2, 3, 1, 0)]=0.456585775684*x_ref[0]**o + (0.00371403480067)*x_ref[0] + (-0.360396976751)*x_ref[1]**o + (-0.610294229552)*x_ref[1]
        arg[(2, 3, 1, 1)]=0.95370561263*x[0]**o + (0.619229067018)*x[0] + (0.935893194894)*x[1]**o + (0.982184975113)*x[1]
        ref[(2, 3, 1, 1)]=0.95370561263*x_ref[0]**o + (0.619229067018)*x_ref[0] + (0.935893194894)*x_ref[1]**o + (0.982184975113)*x_ref[1]
        arg[(2, 3, 1, 2)]=-0.634432565623*x[0]**o + (0.66322434464)*x[0] + (0.537507150815)*x[1]**o + (-0.0974006698146)*x[1]
        ref[(2, 3, 1, 2)]=-0.634432565623*x_ref[0]**o + (0.66322434464)*x_ref[0] + (0.537507150815)*x_ref[1]**o + (-0.0974006698146)*x_ref[1]
        arg[(2, 3, 1, 3)]=-0.791197557159*x[0]**o + (0.014661960475)*x[0] + (0.0819935353425)*x[1]**o + (-0.22812063802)*x[1]
        ref[(2, 3, 1, 3)]=-0.791197557159*x_ref[0]**o + (0.014661960475)*x_ref[0] + (0.0819935353425)*x_ref[1]**o + (-0.22812063802)*x_ref[1]
        arg[(2, 3, 2, 0)]=0.416950564642*x[0]**o + (-0.963016693461)*x[0] + (-0.397573612816)*x[1]**o + (-0.824459776369)*x[1]
        ref[(2, 3, 2, 0)]=0.416950564642*x_ref[0]**o + (-0.963016693461)*x_ref[0] + (-0.397573612816)*x_ref[1]**o + (-0.824459776369)*x_ref[1]
        arg[(2, 3, 2, 1)]=0.774086237046*x[0]**o + (0.0295769736188)*x[0] + (-0.685436369817)*x[1]**o + (0.430469528247)*x[1]
        ref[(2, 3, 2, 1)]=0.774086237046*x_ref[0]**o + (0.0295769736188)*x_ref[0] + (-0.685436369817)*x_ref[1]**o + (0.430469528247)*x_ref[1]
        arg[(2, 3, 2, 2)]=-0.270045357043*x[0]**o + (-0.270059016959)*x[0] + (-0.693374239971)*x[1]**o + (0.621131705531)*x[1]
        ref[(2, 3, 2, 2)]=-0.270045357043*x_ref[0]**o + (-0.270059016959)*x_ref[0] + (-0.693374239971)*x_ref[1]**o + (0.621131705531)*x_ref[1]
        arg[(2, 3, 2, 3)]=-0.183573266757*x[0]**o + (0.961124699502)*x[0] + (-0.749372499095)*x[1]**o + (0.287394095621)*x[1]
        ref[(2, 3, 2, 3)]=-0.183573266757*x_ref[0]**o + (0.961124699502)*x_ref[0] + (-0.749372499095)*x_ref[1]**o + (0.287394095621)*x_ref[1]
        arg[(3, 0, 0, 0)]=0.285897713461*x[0]**o + (-0.726824873841)*x[0] + (-0.807587133069)*x[1]**o + (0.771614089417)*x[1]
        ref[(3, 0, 0, 0)]=0.285897713461*x_ref[0]**o + (-0.726824873841)*x_ref[0] + (-0.807587133069)*x_ref[1]**o + (0.771614089417)*x_ref[1]
        arg[(3, 0, 0, 1)]=-0.910071260668*x[0]**o + (-0.04324424345)*x[0] + (0.637675758631)*x[1]**o + (-0.781996532065)*x[1]
        ref[(3, 0, 0, 1)]=-0.910071260668*x_ref[0]**o + (-0.04324424345)*x_ref[0] + (0.637675758631)*x_ref[1]**o + (-0.781996532065)*x_ref[1]
        arg[(3, 0, 0, 2)]=-0.205224032839*x[0]**o + (-0.57303898498)*x[0] + (-0.684323165058)*x[1]**o + (-0.484286306813)*x[1]
        ref[(3, 0, 0, 2)]=-0.205224032839*x_ref[0]**o + (-0.57303898498)*x_ref[0] + (-0.684323165058)*x_ref[1]**o + (-0.484286306813)*x_ref[1]
        arg[(3, 0, 0, 3)]=0.347301863977*x[0]**o + (0.68199317722)*x[0] + (0.856873720529)*x[1]**o + (0.00218712761055)*x[1]
        ref[(3, 0, 0, 3)]=0.347301863977*x_ref[0]**o + (0.68199317722)*x_ref[0] + (0.856873720529)*x_ref[1]**o + (0.00218712761055)*x_ref[1]
        arg[(3, 0, 1, 0)]=0.471455943482*x[0]**o + (0.556379524385)*x[0] + (0.930435035211)*x[1]**o + (0.309027715373)*x[1]
        ref[(3, 0, 1, 0)]=0.471455943482*x_ref[0]**o + (0.556379524385)*x_ref[0] + (0.930435035211)*x_ref[1]**o + (0.309027715373)*x_ref[1]
        arg[(3, 0, 1, 1)]=-0.911399729647*x[0]**o + (0.285822817363)*x[0] + (-0.392788320887)*x[1]**o + (0.430052815865)*x[1]
        ref[(3, 0, 1, 1)]=-0.911399729647*x_ref[0]**o + (0.285822817363)*x_ref[0] + (-0.392788320887)*x_ref[1]**o + (0.430052815865)*x_ref[1]
        arg[(3, 0, 1, 2)]=0.539761577355*x[0]**o + (-0.276504239862)*x[0] + (0.248361965844)*x[1]**o + (-0.110944737977)*x[1]
        ref[(3, 0, 1, 2)]=0.539761577355*x_ref[0]**o + (-0.276504239862)*x_ref[0] + (0.248361965844)*x_ref[1]**o + (-0.110944737977)*x_ref[1]
        arg[(3, 0, 1, 3)]=0.970741569294*x[0]**o + (-0.473061070811)*x[0] + (0.239393550181)*x[1]**o + (0.371697635332)*x[1]
        ref[(3, 0, 1, 3)]=0.970741569294*x_ref[0]**o + (-0.473061070811)*x_ref[0] + (0.239393550181)*x_ref[1]**o + (0.371697635332)*x_ref[1]
        arg[(3, 0, 2, 0)]=0.102208260492*x[0]**o + (0.722337230432)*x[0] + (0.435837777724)*x[1]**o + (-0.235159957326)*x[1]
        ref[(3, 0, 2, 0)]=0.102208260492*x_ref[0]**o + (0.722337230432)*x_ref[0] + (0.435837777724)*x_ref[1]**o + (-0.235159957326)*x_ref[1]
        arg[(3, 0, 2, 1)]=0.450413075085*x[0]**o + (0.392985900188)*x[0] + (-0.689157481518)*x[1]**o + (-0.582990811516)*x[1]
        ref[(3, 0, 2, 1)]=0.450413075085*x_ref[0]**o + (0.392985900188)*x_ref[0] + (-0.689157481518)*x_ref[1]**o + (-0.582990811516)*x_ref[1]
        arg[(3, 0, 2, 2)]=0.199222831832*x[0]**o + (-0.0354560283619)*x[0] + (-0.528846826083)*x[1]**o + (0.718234604421)*x[1]
        ref[(3, 0, 2, 2)]=0.199222831832*x_ref[0]**o + (-0.0354560283619)*x_ref[0] + (-0.528846826083)*x_ref[1]**o + (0.718234604421)*x_ref[1]
        arg[(3, 0, 2, 3)]=0.323181221895*x[0]**o + (-0.105605070468)*x[0] + (-0.608004575568)*x[1]**o + (0.604591931035)*x[1]
        ref[(3, 0, 2, 3)]=0.323181221895*x_ref[0]**o + (-0.105605070468)*x_ref[0] + (-0.608004575568)*x_ref[1]**o + (0.604591931035)*x_ref[1]
        arg[(3, 1, 0, 0)]=0.864896263976*x[0]**o + (0.0961697271636)*x[0] + (0.50034867438)*x[1]**o + (-0.585781516072)*x[1]
        ref[(3, 1, 0, 0)]=0.864896263976*x_ref[0]**o + (0.0961697271636)*x_ref[0] + (0.50034867438)*x_ref[1]**o + (-0.585781516072)*x_ref[1]
        arg[(3, 1, 0, 1)]=-0.502446687677*x[0]**o + (-0.832347596862)*x[0] + (-0.696100830929)*x[1]**o + (0.109055258633)*x[1]
        ref[(3, 1, 0, 1)]=-0.502446687677*x_ref[0]**o + (-0.832347596862)*x_ref[0] + (-0.696100830929)*x_ref[1]**o + (0.109055258633)*x_ref[1]
        arg[(3, 1, 0, 2)]=0.815372852451*x[0]**o + (0.169830684384)*x[0] + (0.317006858869)*x[1]**o + (0.356512993429)*x[1]
        ref[(3, 1, 0, 2)]=0.815372852451*x_ref[0]**o + (0.169830684384)*x_ref[0] + (0.317006858869)*x_ref[1]**o + (0.356512993429)*x_ref[1]
        arg[(3, 1, 0, 3)]=0.194383386342*x[0]**o + (-0.906954164649)*x[0] + (-0.107460714257)*x[1]**o + (-0.204902515322)*x[1]
        ref[(3, 1, 0, 3)]=0.194383386342*x_ref[0]**o + (-0.906954164649)*x_ref[0] + (-0.107460714257)*x_ref[1]**o + (-0.204902515322)*x_ref[1]
        arg[(3, 1, 1, 0)]=0.76175982117*x[0]**o + (0.87380060212)*x[0] + (-0.623578725593)*x[1]**o + (-0.928809452036)*x[1]
        ref[(3, 1, 1, 0)]=0.76175982117*x_ref[0]**o + (0.87380060212)*x_ref[0] + (-0.623578725593)*x_ref[1]**o + (-0.928809452036)*x_ref[1]
        arg[(3, 1, 1, 1)]=-0.743179158976*x[0]**o + (0.177856524243)*x[0] + (0.337557579521)*x[1]**o + (0.93102024582)*x[1]
        ref[(3, 1, 1, 1)]=-0.743179158976*x_ref[0]**o + (0.177856524243)*x_ref[0] + (0.337557579521)*x_ref[1]**o + (0.93102024582)*x_ref[1]
        arg[(3, 1, 1, 2)]=0.727235793113*x[0]**o + (-0.626612181174)*x[0] + (-0.872522645318)*x[1]**o + (0.905533916761)*x[1]
        ref[(3, 1, 1, 2)]=0.727235793113*x_ref[0]**o + (-0.626612181174)*x_ref[0] + (-0.872522645318)*x_ref[1]**o + (0.905533916761)*x_ref[1]
        arg[(3, 1, 1, 3)]=0.360037155209*x[0]**o + (0.25216273636)*x[0] + (-0.905489923827)*x[1]**o + (0.803530433107)*x[1]
        ref[(3, 1, 1, 3)]=0.360037155209*x_ref[0]**o + (0.25216273636)*x_ref[0] + (-0.905489923827)*x_ref[1]**o + (0.803530433107)*x_ref[1]
        arg[(3, 1, 2, 0)]=-0.1611779522*x[0]**o + (-0.581598634952)*x[0] + (0.864678400954)*x[1]**o + (-0.648300196749)*x[1]
        ref[(3, 1, 2, 0)]=-0.1611779522*x_ref[0]**o + (-0.581598634952)*x_ref[0] + (0.864678400954)*x_ref[1]**o + (-0.648300196749)*x_ref[1]
        arg[(3, 1, 2, 1)]=0.816988739498*x[0]**o + (-0.857613220527)*x[0] + (-0.051762363675)*x[1]**o + (0.621773752986)*x[1]
        ref[(3, 1, 2, 1)]=0.816988739498*x_ref[0]**o + (-0.857613220527)*x_ref[0] + (-0.051762363675)*x_ref[1]**o + (0.621773752986)*x_ref[1]
        arg[(3, 1, 2, 2)]=-0.835185429569*x[0]**o + (0.45764018339)*x[0] + (0.246398747361)*x[1]**o + (-0.794844448396)*x[1]
        ref[(3, 1, 2, 2)]=-0.835185429569*x_ref[0]**o + (0.45764018339)*x_ref[0] + (0.246398747361)*x_ref[1]**o + (-0.794844448396)*x_ref[1]
        arg[(3, 1, 2, 3)]=0.701842477788*x[0]**o + (0.613554797358)*x[0] + (-0.512360169969)*x[1]**o + (0.0137873743975)*x[1]
        ref[(3, 1, 2, 3)]=0.701842477788*x_ref[0]**o + (0.613554797358)*x_ref[0] + (-0.512360169969)*x_ref[1]**o + (0.0137873743975)*x_ref[1]
        arg[(3, 2, 0, 0)]=0.368146466272*x[0]**o + (0.136611421829)*x[0] + (0.549957235525)*x[1]**o + (0.738364582781)*x[1]
        ref[(3, 2, 0, 0)]=0.368146466272*x_ref[0]**o + (0.136611421829)*x_ref[0] + (0.549957235525)*x_ref[1]**o + (0.738364582781)*x_ref[1]
        arg[(3, 2, 0, 1)]=0.0829921968349*x[0]**o + (-0.993743038066)*x[0] + (0.413032703849)*x[1]**o + (-0.512813485467)*x[1]
        ref[(3, 2, 0, 1)]=0.0829921968349*x_ref[0]**o + (-0.993743038066)*x_ref[0] + (0.413032703849)*x_ref[1]**o + (-0.512813485467)*x_ref[1]
        arg[(3, 2, 0, 2)]=0.649545931499*x[0]**o + (-0.766321251779)*x[0] + (0.489212559208)*x[1]**o + (-0.423910773711)*x[1]
        ref[(3, 2, 0, 2)]=0.649545931499*x_ref[0]**o + (-0.766321251779)*x_ref[0] + (0.489212559208)*x_ref[1]**o + (-0.423910773711)*x_ref[1]
        arg[(3, 2, 0, 3)]=0.680581437307*x[0]**o + (0.619095016907)*x[0] + (0.296737234717)*x[1]**o + (0.515369085447)*x[1]
        ref[(3, 2, 0, 3)]=0.680581437307*x_ref[0]**o + (0.619095016907)*x_ref[0] + (0.296737234717)*x_ref[1]**o + (0.515369085447)*x_ref[1]
        arg[(3, 2, 1, 0)]=-0.536881646834*x[0]**o + (-0.747705882102)*x[0] + (-0.797279379839)*x[1]**o + (-0.770469482671)*x[1]
        ref[(3, 2, 1, 0)]=-0.536881646834*x_ref[0]**o + (-0.747705882102)*x_ref[0] + (-0.797279379839)*x_ref[1]**o + (-0.770469482671)*x_ref[1]
        arg[(3, 2, 1, 1)]=0.213567694131*x[0]**o + (0.593344791758)*x[0] + (0.732341140673)*x[1]**o + (0.613695063196)*x[1]
        ref[(3, 2, 1, 1)]=0.213567694131*x_ref[0]**o + (0.593344791758)*x_ref[0] + (0.732341140673)*x_ref[1]**o + (0.613695063196)*x_ref[1]
        arg[(3, 2, 1, 2)]=-0.0243137853376*x[0]**o + (0.482246460014)*x[0] + (-0.762292969773)*x[1]**o + (-0.866798693351)*x[1]
        ref[(3, 2, 1, 2)]=-0.0243137853376*x_ref[0]**o + (0.482246460014)*x_ref[0] + (-0.762292969773)*x_ref[1]**o + (-0.866798693351)*x_ref[1]
        arg[(3, 2, 1, 3)]=-0.0681020180491*x[0]**o + (-0.196502813136)*x[0] + (0.997009165069)*x[1]**o + (-0.700252550419)*x[1]
        ref[(3, 2, 1, 3)]=-0.0681020180491*x_ref[0]**o + (-0.196502813136)*x_ref[0] + (0.997009165069)*x_ref[1]**o + (-0.700252550419)*x_ref[1]
        arg[(3, 2, 2, 0)]=-0.0588162665866*x[0]**o + (0.995245771042)*x[0] + (-0.849554970162)*x[1]**o + (0.927564001705)*x[1]
        ref[(3, 2, 2, 0)]=-0.0588162665866*x_ref[0]**o + (0.995245771042)*x_ref[0] + (-0.849554970162)*x_ref[1]**o + (0.927564001705)*x_ref[1]
        arg[(3, 2, 2, 1)]=-0.608785571445*x[0]**o + (0.543119279992)*x[0] + (-0.553251391335)*x[1]**o + (0.76275314426)*x[1]
        ref[(3, 2, 2, 1)]=-0.608785571445*x_ref[0]**o + (0.543119279992)*x_ref[0] + (-0.553251391335)*x_ref[1]**o + (0.76275314426)*x_ref[1]
        arg[(3, 2, 2, 2)]=0.698481774019*x[0]**o + (-0.86935585611)*x[0] + (0.331439137472)*x[1]**o + (0.454263516268)*x[1]
        ref[(3, 2, 2, 2)]=0.698481774019*x_ref[0]**o + (-0.86935585611)*x_ref[0] + (0.331439137472)*x_ref[1]**o + (0.454263516268)*x_ref[1]
        arg[(3, 2, 2, 3)]=-0.533709250547*x[0]**o + (-0.92084700561)*x[0] + (-0.504177873724)*x[1]**o + (-0.863907503066)*x[1]
        ref[(3, 2, 2, 3)]=-0.533709250547*x_ref[0]**o + (-0.92084700561)*x_ref[0] + (-0.504177873724)*x_ref[1]**o + (-0.863907503066)*x_ref[1]
        arg[(3, 3, 0, 0)]=0.674205624002*x[0]**o + (-0.0742669333456)*x[0] + (0.970437586857)*x[1]**o + (-0.853429252933)*x[1]
        ref[(3, 3, 0, 0)]=0.674205624002*x_ref[0]**o + (-0.0742669333456)*x_ref[0] + (0.970437586857)*x_ref[1]**o + (-0.853429252933)*x_ref[1]
        arg[(3, 3, 0, 1)]=-0.551371021904*x[0]**o + (0.575894899233)*x[0] + (-0.134339059019)*x[1]**o + (-0.560354089321)*x[1]
        ref[(3, 3, 0, 1)]=-0.551371021904*x_ref[0]**o + (0.575894899233)*x_ref[0] + (-0.134339059019)*x_ref[1]**o + (-0.560354089321)*x_ref[1]
        arg[(3, 3, 0, 2)]=-0.359310667998*x[0]**o + (0.881025632805)*x[0] + (0.818791388142)*x[1]**o + (0.942834156165)*x[1]
        ref[(3, 3, 0, 2)]=-0.359310667998*x_ref[0]**o + (0.881025632805)*x_ref[0] + (0.818791388142)*x_ref[1]**o + (0.942834156165)*x_ref[1]
        arg[(3, 3, 0, 3)]=-0.938928746214*x[0]**o + (0.341880111739)*x[0] + (0.903290570847)*x[1]**o + (-0.99430615099)*x[1]
        ref[(3, 3, 0, 3)]=-0.938928746214*x_ref[0]**o + (0.341880111739)*x_ref[0] + (0.903290570847)*x_ref[1]**o + (-0.99430615099)*x_ref[1]
        arg[(3, 3, 1, 0)]=-0.501153158468*x[0]**o + (-0.347160397077)*x[0] + (-0.245976712719)*x[1]**o + (0.0622736293882)*x[1]
        ref[(3, 3, 1, 0)]=-0.501153158468*x_ref[0]**o + (-0.347160397077)*x_ref[0] + (-0.245976712719)*x_ref[1]**o + (0.0622736293882)*x_ref[1]
        arg[(3, 3, 1, 1)]=-0.509703497169*x[0]**o + (0.736924640607)*x[0] + (-0.187235294297)*x[1]**o + (0.0537879103122)*x[1]
        ref[(3, 3, 1, 1)]=-0.509703497169*x_ref[0]**o + (0.736924640607)*x_ref[0] + (-0.187235294297)*x_ref[1]**o + (0.0537879103122)*x_ref[1]
        arg[(3, 3, 1, 2)]=0.90284813602*x[0]**o + (0.833335513653)*x[0] + (0.629922387699)*x[1]**o + (0.692627116173)*x[1]
        ref[(3, 3, 1, 2)]=0.90284813602*x_ref[0]**o + (0.833335513653)*x_ref[0] + (0.629922387699)*x_ref[1]**o + (0.692627116173)*x_ref[1]
        arg[(3, 3, 1, 3)]=-0.711336284389*x[0]**o + (-0.744422837474)*x[0] + (-0.779601000551)*x[1]**o + (0.363477447354)*x[1]
        ref[(3, 3, 1, 3)]=-0.711336284389*x_ref[0]**o + (-0.744422837474)*x_ref[0] + (-0.779601000551)*x_ref[1]**o + (0.363477447354)*x_ref[1]
        arg[(3, 3, 2, 0)]=-0.100268993633*x[0]**o + (0.755559831033)*x[0] + (0.964583260045)*x[1]**o + (0.952097368313)*x[1]
        ref[(3, 3, 2, 0)]=-0.100268993633*x_ref[0]**o + (0.755559831033)*x_ref[0] + (0.964583260045)*x_ref[1]**o + (0.952097368313)*x_ref[1]
        arg[(3, 3, 2, 1)]=0.15484492183*x[0]**o + (0.696137216569)*x[0] + (-0.985887412974)*x[1]**o + (-0.439134778248)*x[1]
        ref[(3, 3, 2, 1)]=0.15484492183*x_ref[0]**o + (0.696137216569)*x_ref[0] + (-0.985887412974)*x_ref[1]**o + (-0.439134778248)*x_ref[1]
        arg[(3, 3, 2, 2)]=-0.978929075054*x[0]**o + (-0.397826529305)*x[0] + (0.40081690204)*x[1]**o + (-0.749409000351)*x[1]
        ref[(3, 3, 2, 2)]=-0.978929075054*x_ref[0]**o + (-0.397826529305)*x_ref[0] + (0.40081690204)*x_ref[1]**o + (-0.749409000351)*x_ref[1]
        arg[(3, 3, 2, 3)]=-0.600574239608*x[0]**o + (-0.907281588876)*x[0] + (0.611163577161)*x[1]**o + (-0.837202214302)*x[1]
        ref[(3, 3, 2, 3)]=-0.600574239608*x_ref[0]**o + (-0.907281588876)*x_ref[0] + (0.611163577161)*x_ref[1]**o + (-0.837202214302)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.511985229674*x[2]**o + (-0.178909427221)*x[2]
            ref[(0, 0, 0, 0)]+=0.511985229674*x_ref[2]**o + (-0.178909427221)*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.156768034076*x[2]**o + (-0.021351698762)*x[2]
            ref[(0, 0, 0, 1)]+=-0.156768034076*x_ref[2]**o + (-0.021351698762)*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.919675386657*x[2]**o + (0.922663938185)*x[2]
            ref[(0, 0, 0, 2)]+=0.919675386657*x_ref[2]**o + (0.922663938185)*x_ref[2]
            arg[(0, 0, 0, 3)]+=0.268468440839*x[2]**o + (-0.746930214508)*x[2]
            ref[(0, 0, 0, 3)]+=0.268468440839*x_ref[2]**o + (-0.746930214508)*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.169056691228*x[2]**o + (-0.572131767708)*x[2]
            ref[(0, 0, 1, 0)]+=0.169056691228*x_ref[2]**o + (-0.572131767708)*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.125654383061*x[2]**o + (-0.206207571097)*x[2]
            ref[(0, 0, 1, 1)]+=-0.125654383061*x_ref[2]**o + (-0.206207571097)*x_ref[2]
            arg[(0, 0, 1, 2)]+=-0.900437209128*x[2]**o + (-0.409604439)*x[2]
            ref[(0, 0, 1, 2)]+=-0.900437209128*x_ref[2]**o + (-0.409604439)*x_ref[2]
            arg[(0, 0, 1, 3)]+=0.641179322149*x[2]**o + (-0.720143644632)*x[2]
            ref[(0, 0, 1, 3)]+=0.641179322149*x_ref[2]**o + (-0.720143644632)*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.713364331927*x[2]**o + (-0.867543142922)*x[2]
            ref[(0, 0, 2, 0)]+=-0.713364331927*x_ref[2]**o + (-0.867543142922)*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.866257290175*x[2]**o + (-0.483722228312)*x[2]
            ref[(0, 0, 2, 1)]+=0.866257290175*x_ref[2]**o + (-0.483722228312)*x_ref[2]
            arg[(0, 0, 2, 2)]+=-0.429350116404*x[2]**o + (0.0233706894843)*x[2]
            ref[(0, 0, 2, 2)]+=-0.429350116404*x_ref[2]**o + (0.0233706894843)*x_ref[2]
            arg[(0, 0, 2, 3)]+=-0.356783115698*x[2]**o + (-0.228469028659)*x[2]
            ref[(0, 0, 2, 3)]+=-0.356783115698*x_ref[2]**o + (-0.228469028659)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.797588668051*x[2]**o + (0.298322981753)*x[2]
            ref[(0, 1, 0, 0)]+=-0.797588668051*x_ref[2]**o + (0.298322981753)*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.727871481771*x[2]**o + (-0.0776874806266)*x[2]
            ref[(0, 1, 0, 1)]+=-0.727871481771*x_ref[2]**o + (-0.0776874806266)*x_ref[2]
            arg[(0, 1, 0, 2)]+=-0.641788672485*x[2]**o + (0.792933093321)*x[2]
            ref[(0, 1, 0, 2)]+=-0.641788672485*x_ref[2]**o + (0.792933093321)*x_ref[2]
            arg[(0, 1, 0, 3)]+=0.656637879008*x[2]**o + (-0.454162665853)*x[2]
            ref[(0, 1, 0, 3)]+=0.656637879008*x_ref[2]**o + (-0.454162665853)*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.383628157371*x[2]**o + (0.533676674815)*x[2]
            ref[(0, 1, 1, 0)]+=-0.383628157371*x_ref[2]**o + (0.533676674815)*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.0656751393604*x[2]**o + (-0.0469650415118)*x[2]
            ref[(0, 1, 1, 1)]+=-0.0656751393604*x_ref[2]**o + (-0.0469650415118)*x_ref[2]
            arg[(0, 1, 1, 2)]+=-0.821010260446*x[2]**o + (0.423475561765)*x[2]
            ref[(0, 1, 1, 2)]+=-0.821010260446*x_ref[2]**o + (0.423475561765)*x_ref[2]
            arg[(0, 1, 1, 3)]+=-0.152925923913*x[2]**o + (0.984220683361)*x[2]
            ref[(0, 1, 1, 3)]+=-0.152925923913*x_ref[2]**o + (0.984220683361)*x_ref[2]
            arg[(0, 1, 2, 0)]+=0.629302484213*x[2]**o + (-0.852717970489)*x[2]
            ref[(0, 1, 2, 0)]+=0.629302484213*x_ref[2]**o + (-0.852717970489)*x_ref[2]
            arg[(0, 1, 2, 1)]+=-0.247556378*x[2]**o + (0.51680777101)*x[2]
            ref[(0, 1, 2, 1)]+=-0.247556378*x_ref[2]**o + (0.51680777101)*x_ref[2]
            arg[(0, 1, 2, 2)]+=-0.561673299068*x[2]**o + (-0.847947418635)*x[2]
            ref[(0, 1, 2, 2)]+=-0.561673299068*x_ref[2]**o + (-0.847947418635)*x_ref[2]
            arg[(0, 1, 2, 3)]+=0.382973523635*x[2]**o + (0.678930419505)*x[2]
            ref[(0, 1, 2, 3)]+=0.382973523635*x_ref[2]**o + (0.678930419505)*x_ref[2]
            arg[(0, 2, 0, 0)]+=-0.301868285857*x[2]**o + (-0.913606330567)*x[2]
            ref[(0, 2, 0, 0)]+=-0.301868285857*x_ref[2]**o + (-0.913606330567)*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.441532680372*x[2]**o + (0.019836431391)*x[2]
            ref[(0, 2, 0, 1)]+=-0.441532680372*x_ref[2]**o + (0.019836431391)*x_ref[2]
            arg[(0, 2, 0, 2)]+=-0.541891567744*x[2]**o + (0.89958226173)*x[2]
            ref[(0, 2, 0, 2)]+=-0.541891567744*x_ref[2]**o + (0.89958226173)*x_ref[2]
            arg[(0, 2, 0, 3)]+=-0.945134452647*x[2]**o + (-0.488313473814)*x[2]
            ref[(0, 2, 0, 3)]+=-0.945134452647*x_ref[2]**o + (-0.488313473814)*x_ref[2]
            arg[(0, 2, 1, 0)]+=-0.725331306389*x[2]**o + (0.745100224956)*x[2]
            ref[(0, 2, 1, 0)]+=-0.725331306389*x_ref[2]**o + (0.745100224956)*x_ref[2]
            arg[(0, 2, 1, 1)]+=0.511329177444*x[2]**o + (-0.174843674928)*x[2]
            ref[(0, 2, 1, 1)]+=0.511329177444*x_ref[2]**o + (-0.174843674928)*x_ref[2]
            arg[(0, 2, 1, 2)]+=-0.303926908402*x[2]**o + (0.0408402097193)*x[2]
            ref[(0, 2, 1, 2)]+=-0.303926908402*x_ref[2]**o + (0.0408402097193)*x_ref[2]
            arg[(0, 2, 1, 3)]+=-0.43781503735*x[2]**o + (-0.209390287687)*x[2]
            ref[(0, 2, 1, 3)]+=-0.43781503735*x_ref[2]**o + (-0.209390287687)*x_ref[2]
            arg[(0, 2, 2, 0)]+=0.700065779515*x[2]**o + (0.762384855694)*x[2]
            ref[(0, 2, 2, 0)]+=0.700065779515*x_ref[2]**o + (0.762384855694)*x_ref[2]
            arg[(0, 2, 2, 1)]+=-0.885552203703*x[2]**o + (0.784611391001)*x[2]
            ref[(0, 2, 2, 1)]+=-0.885552203703*x_ref[2]**o + (0.784611391001)*x_ref[2]
            arg[(0, 2, 2, 2)]+=-0.780377966953*x[2]**o + (0.61576440027)*x[2]
            ref[(0, 2, 2, 2)]+=-0.780377966953*x_ref[2]**o + (0.61576440027)*x_ref[2]
            arg[(0, 2, 2, 3)]+=0.34651677506*x[2]**o + (-0.784059447873)*x[2]
            ref[(0, 2, 2, 3)]+=0.34651677506*x_ref[2]**o + (-0.784059447873)*x_ref[2]
            arg[(0, 3, 0, 0)]+=-0.820782251534*x[2]**o + (0.0706603075253)*x[2]
            ref[(0, 3, 0, 0)]+=-0.820782251534*x_ref[2]**o + (0.0706603075253)*x_ref[2]
            arg[(0, 3, 0, 1)]+=0.865818562227*x[2]**o + (0.314621118928)*x[2]
            ref[(0, 3, 0, 1)]+=0.865818562227*x_ref[2]**o + (0.314621118928)*x_ref[2]
            arg[(0, 3, 0, 2)]+=-0.19077960227*x[2]**o + (-0.754545387344)*x[2]
            ref[(0, 3, 0, 2)]+=-0.19077960227*x_ref[2]**o + (-0.754545387344)*x_ref[2]
            arg[(0, 3, 0, 3)]+=0.875435444613*x[2]**o + (0.319516922987)*x[2]
            ref[(0, 3, 0, 3)]+=0.875435444613*x_ref[2]**o + (0.319516922987)*x_ref[2]
            arg[(0, 3, 1, 0)]+=0.866409361553*x[2]**o + (-0.235865586657)*x[2]
            ref[(0, 3, 1, 0)]+=0.866409361553*x_ref[2]**o + (-0.235865586657)*x_ref[2]
            arg[(0, 3, 1, 1)]+=0.0859634007409*x[2]**o + (-0.336843336316)*x[2]
            ref[(0, 3, 1, 1)]+=0.0859634007409*x_ref[2]**o + (-0.336843336316)*x_ref[2]
            arg[(0, 3, 1, 2)]+=-0.571915253077*x[2]**o + (-0.204146040741)*x[2]
            ref[(0, 3, 1, 2)]+=-0.571915253077*x_ref[2]**o + (-0.204146040741)*x_ref[2]
            arg[(0, 3, 1, 3)]+=0.348881616594*x[2]**o + (-0.694617484084)*x[2]
            ref[(0, 3, 1, 3)]+=0.348881616594*x_ref[2]**o + (-0.694617484084)*x_ref[2]
            arg[(0, 3, 2, 0)]+=0.360499692848*x[2]**o + (0.488166040249)*x[2]
            ref[(0, 3, 2, 0)]+=0.360499692848*x_ref[2]**o + (0.488166040249)*x_ref[2]
            arg[(0, 3, 2, 1)]+=0.998906901808*x[2]**o + (-0.884755874127)*x[2]
            ref[(0, 3, 2, 1)]+=0.998906901808*x_ref[2]**o + (-0.884755874127)*x_ref[2]
            arg[(0, 3, 2, 2)]+=-0.48441104194*x[2]**o + (-0.479554106178)*x[2]
            ref[(0, 3, 2, 2)]+=-0.48441104194*x_ref[2]**o + (-0.479554106178)*x_ref[2]
            arg[(0, 3, 2, 3)]+=0.100376402656*x[2]**o + (-0.569779149317)*x[2]
            ref[(0, 3, 2, 3)]+=0.100376402656*x_ref[2]**o + (-0.569779149317)*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.635048965422*x[2]**o + (-0.748754567646)*x[2]
            ref[(1, 0, 0, 0)]+=-0.635048965422*x_ref[2]**o + (-0.748754567646)*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.11912980791*x[2]**o + (0.229558055913)*x[2]
            ref[(1, 0, 0, 1)]+=-0.11912980791*x_ref[2]**o + (0.229558055913)*x_ref[2]
            arg[(1, 0, 0, 2)]+=-0.362663926154*x[2]**o + (-0.929455179515)*x[2]
            ref[(1, 0, 0, 2)]+=-0.362663926154*x_ref[2]**o + (-0.929455179515)*x_ref[2]
            arg[(1, 0, 0, 3)]+=0.829172601466*x[2]**o + (0.91401248835)*x[2]
            ref[(1, 0, 0, 3)]+=0.829172601466*x_ref[2]**o + (0.91401248835)*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.287139680585*x[2]**o + (0.468881953266)*x[2]
            ref[(1, 0, 1, 0)]+=0.287139680585*x_ref[2]**o + (0.468881953266)*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.435745505925*x[2]**o + (0.914843097658)*x[2]
            ref[(1, 0, 1, 1)]+=0.435745505925*x_ref[2]**o + (0.914843097658)*x_ref[2]
            arg[(1, 0, 1, 2)]+=0.852489722467*x[2]**o + (-0.0171799410853)*x[2]
            ref[(1, 0, 1, 2)]+=0.852489722467*x_ref[2]**o + (-0.0171799410853)*x_ref[2]
            arg[(1, 0, 1, 3)]+=-0.909336543377*x[2]**o + (0.0307210278015)*x[2]
            ref[(1, 0, 1, 3)]+=-0.909336543377*x_ref[2]**o + (0.0307210278015)*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.897548807059*x[2]**o + (-0.490244902713)*x[2]
            ref[(1, 0, 2, 0)]+=-0.897548807059*x_ref[2]**o + (-0.490244902713)*x_ref[2]
            arg[(1, 0, 2, 1)]+=-0.85889430681*x[2]**o + (-0.037757794074)*x[2]
            ref[(1, 0, 2, 1)]+=-0.85889430681*x_ref[2]**o + (-0.037757794074)*x_ref[2]
            arg[(1, 0, 2, 2)]+=0.312700082735*x[2]**o + (-0.913022155193)*x[2]
            ref[(1, 0, 2, 2)]+=0.312700082735*x_ref[2]**o + (-0.913022155193)*x_ref[2]
            arg[(1, 0, 2, 3)]+=0.0522567519318*x[2]**o + (-0.787085204464)*x[2]
            ref[(1, 0, 2, 3)]+=0.0522567519318*x_ref[2]**o + (-0.787085204464)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.930740374456*x[2]**o + (0.752045321925)*x[2]
            ref[(1, 1, 0, 0)]+=0.930740374456*x_ref[2]**o + (0.752045321925)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.551200485052*x[2]**o + (0.535025812498)*x[2]
            ref[(1, 1, 0, 1)]+=0.551200485052*x_ref[2]**o + (0.535025812498)*x_ref[2]
            arg[(1, 1, 0, 2)]+=-0.00610831977848*x[2]**o + (-0.607370483871)*x[2]
            ref[(1, 1, 0, 2)]+=-0.00610831977848*x_ref[2]**o + (-0.607370483871)*x_ref[2]
            arg[(1, 1, 0, 3)]+=0.0270565185234*x[2]**o + (-0.456662416485)*x[2]
            ref[(1, 1, 0, 3)]+=0.0270565185234*x_ref[2]**o + (-0.456662416485)*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.442123578356*x[2]**o + (-0.475397981379)*x[2]
            ref[(1, 1, 1, 0)]+=-0.442123578356*x_ref[2]**o + (-0.475397981379)*x_ref[2]
            arg[(1, 1, 1, 1)]+=-0.167795349175*x[2]**o + (-0.642912715366)*x[2]
            ref[(1, 1, 1, 1)]+=-0.167795349175*x_ref[2]**o + (-0.642912715366)*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.74301629719*x[2]**o + (0.913159241376)*x[2]
            ref[(1, 1, 1, 2)]+=-0.74301629719*x_ref[2]**o + (0.913159241376)*x_ref[2]
            arg[(1, 1, 1, 3)]+=-0.424548295059*x[2]**o + (-0.780416587277)*x[2]
            ref[(1, 1, 1, 3)]+=-0.424548295059*x_ref[2]**o + (-0.780416587277)*x_ref[2]
            arg[(1, 1, 2, 0)]+=0.243462464263*x[2]**o + (0.597644048566)*x[2]
            ref[(1, 1, 2, 0)]+=0.243462464263*x_ref[2]**o + (0.597644048566)*x_ref[2]
            arg[(1, 1, 2, 1)]+=-0.37001059168*x[2]**o + (0.815631625894)*x[2]
            ref[(1, 1, 2, 1)]+=-0.37001059168*x_ref[2]**o + (0.815631625894)*x_ref[2]
            arg[(1, 1, 2, 2)]+=-0.835522671331*x[2]**o + (0.564642232478)*x[2]
            ref[(1, 1, 2, 2)]+=-0.835522671331*x_ref[2]**o + (0.564642232478)*x_ref[2]
            arg[(1, 1, 2, 3)]+=0.0032436721189*x[2]**o + (0.302394482869)*x[2]
            ref[(1, 1, 2, 3)]+=0.0032436721189*x_ref[2]**o + (0.302394482869)*x_ref[2]
            arg[(1, 2, 0, 0)]+=0.34042846784*x[2]**o + (-0.415158035837)*x[2]
            ref[(1, 2, 0, 0)]+=0.34042846784*x_ref[2]**o + (-0.415158035837)*x_ref[2]
            arg[(1, 2, 0, 1)]+=0.41790889038*x[2]**o + (-0.855016143316)*x[2]
            ref[(1, 2, 0, 1)]+=0.41790889038*x_ref[2]**o + (-0.855016143316)*x_ref[2]
            arg[(1, 2, 0, 2)]+=0.561685213805*x[2]**o + (-0.565779941949)*x[2]
            ref[(1, 2, 0, 2)]+=0.561685213805*x_ref[2]**o + (-0.565779941949)*x_ref[2]
            arg[(1, 2, 0, 3)]+=0.924192521257*x[2]**o + (-0.19881778784)*x[2]
            ref[(1, 2, 0, 3)]+=0.924192521257*x_ref[2]**o + (-0.19881778784)*x_ref[2]
            arg[(1, 2, 1, 0)]+=-0.749387146204*x[2]**o + (0.454806735665)*x[2]
            ref[(1, 2, 1, 0)]+=-0.749387146204*x_ref[2]**o + (0.454806735665)*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.457209895844*x[2]**o + (-0.0496434435362)*x[2]
            ref[(1, 2, 1, 1)]+=0.457209895844*x_ref[2]**o + (-0.0496434435362)*x_ref[2]
            arg[(1, 2, 1, 2)]+=-0.398192024775*x[2]**o + (-0.909850615254)*x[2]
            ref[(1, 2, 1, 2)]+=-0.398192024775*x_ref[2]**o + (-0.909850615254)*x_ref[2]
            arg[(1, 2, 1, 3)]+=0.368083616375*x[2]**o + (-0.0690145724917)*x[2]
            ref[(1, 2, 1, 3)]+=0.368083616375*x_ref[2]**o + (-0.0690145724917)*x_ref[2]
            arg[(1, 2, 2, 0)]+=0.887263663063*x[2]**o + (-0.997764626037)*x[2]
            ref[(1, 2, 2, 0)]+=0.887263663063*x_ref[2]**o + (-0.997764626037)*x_ref[2]
            arg[(1, 2, 2, 1)]+=-0.369678999662*x[2]**o + (-0.685186055563)*x[2]
            ref[(1, 2, 2, 1)]+=-0.369678999662*x_ref[2]**o + (-0.685186055563)*x_ref[2]
            arg[(1, 2, 2, 2)]+=0.944100477377*x[2]**o + (0.132321135409)*x[2]
            ref[(1, 2, 2, 2)]+=0.944100477377*x_ref[2]**o + (0.132321135409)*x_ref[2]
            arg[(1, 2, 2, 3)]+=0.0317280686696*x[2]**o + (-0.328656805874)*x[2]
            ref[(1, 2, 2, 3)]+=0.0317280686696*x_ref[2]**o + (-0.328656805874)*x_ref[2]
            arg[(1, 3, 0, 0)]+=0.858206101885*x[2]**o + (0.347174816445)*x[2]
            ref[(1, 3, 0, 0)]+=0.858206101885*x_ref[2]**o + (0.347174816445)*x_ref[2]
            arg[(1, 3, 0, 1)]+=0.807280553233*x[2]**o + (0.845881235047)*x[2]
            ref[(1, 3, 0, 1)]+=0.807280553233*x_ref[2]**o + (0.845881235047)*x_ref[2]
            arg[(1, 3, 0, 2)]+=0.752001700463*x[2]**o + (-0.01341190516)*x[2]
            ref[(1, 3, 0, 2)]+=0.752001700463*x_ref[2]**o + (-0.01341190516)*x_ref[2]
            arg[(1, 3, 0, 3)]+=-0.767338830303*x[2]**o + (-0.500793069245)*x[2]
            ref[(1, 3, 0, 3)]+=-0.767338830303*x_ref[2]**o + (-0.500793069245)*x_ref[2]
            arg[(1, 3, 1, 0)]+=0.714020663314*x[2]**o + (0.0425882787793)*x[2]
            ref[(1, 3, 1, 0)]+=0.714020663314*x_ref[2]**o + (0.0425882787793)*x_ref[2]
            arg[(1, 3, 1, 1)]+=-0.967135595654*x[2]**o + (-0.949612161)*x[2]
            ref[(1, 3, 1, 1)]+=-0.967135595654*x_ref[2]**o + (-0.949612161)*x_ref[2]
            arg[(1, 3, 1, 2)]+=0.643867513881*x[2]**o + (-0.316101744713)*x[2]
            ref[(1, 3, 1, 2)]+=0.643867513881*x_ref[2]**o + (-0.316101744713)*x_ref[2]
            arg[(1, 3, 1, 3)]+=-0.596151296805*x[2]**o + (-0.501553485525)*x[2]
            ref[(1, 3, 1, 3)]+=-0.596151296805*x_ref[2]**o + (-0.501553485525)*x_ref[2]
            arg[(1, 3, 2, 0)]+=0.534029659881*x[2]**o + (0.796081988196)*x[2]
            ref[(1, 3, 2, 0)]+=0.534029659881*x_ref[2]**o + (0.796081988196)*x_ref[2]
            arg[(1, 3, 2, 1)]+=0.241192849751*x[2]**o + (0.101796001071)*x[2]
            ref[(1, 3, 2, 1)]+=0.241192849751*x_ref[2]**o + (0.101796001071)*x_ref[2]
            arg[(1, 3, 2, 2)]+=0.537455847441*x[2]**o + (-0.263984969193)*x[2]
            ref[(1, 3, 2, 2)]+=0.537455847441*x_ref[2]**o + (-0.263984969193)*x_ref[2]
            arg[(1, 3, 2, 3)]+=0.770238077085*x[2]**o + (0.159730717349)*x[2]
            ref[(1, 3, 2, 3)]+=0.770238077085*x_ref[2]**o + (0.159730717349)*x_ref[2]
            arg[(2, 0, 0, 0)]+=0.911328283994*x[2]**o + (0.277546505818)*x[2]
            ref[(2, 0, 0, 0)]+=0.911328283994*x_ref[2]**o + (0.277546505818)*x_ref[2]
            arg[(2, 0, 0, 1)]+=0.0773396751834*x[2]**o + (-0.398551792172)*x[2]
            ref[(2, 0, 0, 1)]+=0.0773396751834*x_ref[2]**o + (-0.398551792172)*x_ref[2]
            arg[(2, 0, 0, 2)]+=0.923433553786*x[2]**o + (0.901127151555)*x[2]
            ref[(2, 0, 0, 2)]+=0.923433553786*x_ref[2]**o + (0.901127151555)*x_ref[2]
            arg[(2, 0, 0, 3)]+=-0.790798191275*x[2]**o + (-0.427303876856)*x[2]
            ref[(2, 0, 0, 3)]+=-0.790798191275*x_ref[2]**o + (-0.427303876856)*x_ref[2]
            arg[(2, 0, 1, 0)]+=0.48730152482*x[2]**o + (-0.890097868546)*x[2]
            ref[(2, 0, 1, 0)]+=0.48730152482*x_ref[2]**o + (-0.890097868546)*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.314511650955*x[2]**o + (-0.343094248935)*x[2]
            ref[(2, 0, 1, 1)]+=0.314511650955*x_ref[2]**o + (-0.343094248935)*x_ref[2]
            arg[(2, 0, 1, 2)]+=0.398249328424*x[2]**o + (-0.159838856135)*x[2]
            ref[(2, 0, 1, 2)]+=0.398249328424*x_ref[2]**o + (-0.159838856135)*x_ref[2]
            arg[(2, 0, 1, 3)]+=0.094739182923*x[2]**o + (-0.579993899572)*x[2]
            ref[(2, 0, 1, 3)]+=0.094739182923*x_ref[2]**o + (-0.579993899572)*x_ref[2]
            arg[(2, 0, 2, 0)]+=-0.601431025756*x[2]**o + (-0.398917025053)*x[2]
            ref[(2, 0, 2, 0)]+=-0.601431025756*x_ref[2]**o + (-0.398917025053)*x_ref[2]
            arg[(2, 0, 2, 1)]+=0.652335083094*x[2]**o + (0.125639773999)*x[2]
            ref[(2, 0, 2, 1)]+=0.652335083094*x_ref[2]**o + (0.125639773999)*x_ref[2]
            arg[(2, 0, 2, 2)]+=0.666533031449*x[2]**o + (0.0576536080131)*x[2]
            ref[(2, 0, 2, 2)]+=0.666533031449*x_ref[2]**o + (0.0576536080131)*x_ref[2]
            arg[(2, 0, 2, 3)]+=0.761872177387*x[2]**o + (0.748004330094)*x[2]
            ref[(2, 0, 2, 3)]+=0.761872177387*x_ref[2]**o + (0.748004330094)*x_ref[2]
            arg[(2, 1, 0, 0)]+=0.861126869944*x[2]**o + (0.157043185349)*x[2]
            ref[(2, 1, 0, 0)]+=0.861126869944*x_ref[2]**o + (0.157043185349)*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.750165022859*x[2]**o + (-0.632038512622)*x[2]
            ref[(2, 1, 0, 1)]+=-0.750165022859*x_ref[2]**o + (-0.632038512622)*x_ref[2]
            arg[(2, 1, 0, 2)]+=-0.371596939854*x[2]**o + (0.809882286394)*x[2]
            ref[(2, 1, 0, 2)]+=-0.371596939854*x_ref[2]**o + (0.809882286394)*x_ref[2]
            arg[(2, 1, 0, 3)]+=-0.4029443026*x[2]**o + (-0.0420750288779)*x[2]
            ref[(2, 1, 0, 3)]+=-0.4029443026*x_ref[2]**o + (-0.0420750288779)*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.439716274827*x[2]**o + (0.256098265035)*x[2]
            ref[(2, 1, 1, 0)]+=0.439716274827*x_ref[2]**o + (0.256098265035)*x_ref[2]
            arg[(2, 1, 1, 1)]+=-0.640466519875*x[2]**o + (-0.94038668266)*x[2]
            ref[(2, 1, 1, 1)]+=-0.640466519875*x_ref[2]**o + (-0.94038668266)*x_ref[2]
            arg[(2, 1, 1, 2)]+=0.322352606816*x[2]**o + (-0.463813921701)*x[2]
            ref[(2, 1, 1, 2)]+=0.322352606816*x_ref[2]**o + (-0.463813921701)*x_ref[2]
            arg[(2, 1, 1, 3)]+=-0.280209468562*x[2]**o + (0.6606019291)*x[2]
            ref[(2, 1, 1, 3)]+=-0.280209468562*x_ref[2]**o + (0.6606019291)*x_ref[2]
            arg[(2, 1, 2, 0)]+=-0.43609030005*x[2]**o + (0.10988967984)*x[2]
            ref[(2, 1, 2, 0)]+=-0.43609030005*x_ref[2]**o + (0.10988967984)*x_ref[2]
            arg[(2, 1, 2, 1)]+=0.567687664767*x[2]**o + (-0.429661124047)*x[2]
            ref[(2, 1, 2, 1)]+=0.567687664767*x_ref[2]**o + (-0.429661124047)*x_ref[2]
            arg[(2, 1, 2, 2)]+=0.471115208371*x[2]**o + (-0.652383379897)*x[2]
            ref[(2, 1, 2, 2)]+=0.471115208371*x_ref[2]**o + (-0.652383379897)*x_ref[2]
            arg[(2, 1, 2, 3)]+=0.332905825581*x[2]**o + (-0.560739610372)*x[2]
            ref[(2, 1, 2, 3)]+=0.332905825581*x_ref[2]**o + (-0.560739610372)*x_ref[2]
            arg[(2, 2, 0, 0)]+=0.191076103188*x[2]**o + (0.678348135214)*x[2]
            ref[(2, 2, 0, 0)]+=0.191076103188*x_ref[2]**o + (0.678348135214)*x_ref[2]
            arg[(2, 2, 0, 1)]+=0.271874230237*x[2]**o + (-0.657218940461)*x[2]
            ref[(2, 2, 0, 1)]+=0.271874230237*x_ref[2]**o + (-0.657218940461)*x_ref[2]
            arg[(2, 2, 0, 2)]+=0.218338612175*x[2]**o + (-0.258838952755)*x[2]
            ref[(2, 2, 0, 2)]+=0.218338612175*x_ref[2]**o + (-0.258838952755)*x_ref[2]
            arg[(2, 2, 0, 3)]+=0.806039746755*x[2]**o + (-0.948217083149)*x[2]
            ref[(2, 2, 0, 3)]+=0.806039746755*x_ref[2]**o + (-0.948217083149)*x_ref[2]
            arg[(2, 2, 1, 0)]+=-0.641774313836*x[2]**o + (0.376483008315)*x[2]
            ref[(2, 2, 1, 0)]+=-0.641774313836*x_ref[2]**o + (0.376483008315)*x_ref[2]
            arg[(2, 2, 1, 1)]+=0.483640453806*x[2]**o + (-0.893212735783)*x[2]
            ref[(2, 2, 1, 1)]+=0.483640453806*x_ref[2]**o + (-0.893212735783)*x_ref[2]
            arg[(2, 2, 1, 2)]+=0.575445319056*x[2]**o + (-0.761882127789)*x[2]
            ref[(2, 2, 1, 2)]+=0.575445319056*x_ref[2]**o + (-0.761882127789)*x_ref[2]
            arg[(2, 2, 1, 3)]+=0.945383302646*x[2]**o + (-0.557033891424)*x[2]
            ref[(2, 2, 1, 3)]+=0.945383302646*x_ref[2]**o + (-0.557033891424)*x_ref[2]
            arg[(2, 2, 2, 0)]+=-0.359031206086*x[2]**o + (0.475827268104)*x[2]
            ref[(2, 2, 2, 0)]+=-0.359031206086*x_ref[2]**o + (0.475827268104)*x_ref[2]
            arg[(2, 2, 2, 1)]+=0.0972117639539*x[2]**o + (-0.92903811663)*x[2]
            ref[(2, 2, 2, 1)]+=0.0972117639539*x_ref[2]**o + (-0.92903811663)*x_ref[2]
            arg[(2, 2, 2, 2)]+=-0.808474971198*x[2]**o + (-0.270009947742)*x[2]
            ref[(2, 2, 2, 2)]+=-0.808474971198*x_ref[2]**o + (-0.270009947742)*x_ref[2]
            arg[(2, 2, 2, 3)]+=-0.151476514841*x[2]**o + (0.985868207264)*x[2]
            ref[(2, 2, 2, 3)]+=-0.151476514841*x_ref[2]**o + (0.985868207264)*x_ref[2]
            arg[(2, 3, 0, 0)]+=-0.258354252541*x[2]**o + (0.619032811851)*x[2]
            ref[(2, 3, 0, 0)]+=-0.258354252541*x_ref[2]**o + (0.619032811851)*x_ref[2]
            arg[(2, 3, 0, 1)]+=0.120418530552*x[2]**o + (0.481265878445)*x[2]
            ref[(2, 3, 0, 1)]+=0.120418530552*x_ref[2]**o + (0.481265878445)*x_ref[2]
            arg[(2, 3, 0, 2)]+=-0.272035377757*x[2]**o + (0.261464453764)*x[2]
            ref[(2, 3, 0, 2)]+=-0.272035377757*x_ref[2]**o + (0.261464453764)*x_ref[2]
            arg[(2, 3, 0, 3)]+=0.338547884501*x[2]**o + (0.853886162571)*x[2]
            ref[(2, 3, 0, 3)]+=0.338547884501*x_ref[2]**o + (0.853886162571)*x_ref[2]
            arg[(2, 3, 1, 0)]+=-0.826790248586*x[2]**o + (-0.990942290657)*x[2]
            ref[(2, 3, 1, 0)]+=-0.826790248586*x_ref[2]**o + (-0.990942290657)*x_ref[2]
            arg[(2, 3, 1, 1)]+=0.0262408233915*x[2]**o + (-0.972339707105)*x[2]
            ref[(2, 3, 1, 1)]+=0.0262408233915*x_ref[2]**o + (-0.972339707105)*x_ref[2]
            arg[(2, 3, 1, 2)]+=0.264209874541*x[2]**o + (0.311973955323)*x[2]
            ref[(2, 3, 1, 2)]+=0.264209874541*x_ref[2]**o + (0.311973955323)*x_ref[2]
            arg[(2, 3, 1, 3)]+=-0.119915541591*x[2]**o + (0.19818304611)*x[2]
            ref[(2, 3, 1, 3)]+=-0.119915541591*x_ref[2]**o + (0.19818304611)*x_ref[2]
            arg[(2, 3, 2, 0)]+=0.608963882344*x[2]**o + (0.518712106514)*x[2]
            ref[(2, 3, 2, 0)]+=0.608963882344*x_ref[2]**o + (0.518712106514)*x_ref[2]
            arg[(2, 3, 2, 1)]+=-0.148751077324*x[2]**o + (0.433386623673)*x[2]
            ref[(2, 3, 2, 1)]+=-0.148751077324*x_ref[2]**o + (0.433386623673)*x_ref[2]
            arg[(2, 3, 2, 2)]+=0.36286636688*x[2]**o + (0.395253111144)*x[2]
            ref[(2, 3, 2, 2)]+=0.36286636688*x_ref[2]**o + (0.395253111144)*x_ref[2]
            arg[(2, 3, 2, 3)]+=0.076908452816*x[2]**o + (0.850755387399)*x[2]
            ref[(2, 3, 2, 3)]+=0.076908452816*x_ref[2]**o + (0.850755387399)*x_ref[2]
            arg[(3, 0, 0, 0)]+=-0.392997618833*x[2]**o + (-0.177102734518)*x[2]
            ref[(3, 0, 0, 0)]+=-0.392997618833*x_ref[2]**o + (-0.177102734518)*x_ref[2]
            arg[(3, 0, 0, 1)]+=-0.721637678236*x[2]**o + (-0.29716960128)*x[2]
            ref[(3, 0, 0, 1)]+=-0.721637678236*x_ref[2]**o + (-0.29716960128)*x_ref[2]
            arg[(3, 0, 0, 2)]+=0.509150857813*x[2]**o + (-0.690701661296)*x[2]
            ref[(3, 0, 0, 2)]+=0.509150857813*x_ref[2]**o + (-0.690701661296)*x_ref[2]
            arg[(3, 0, 0, 3)]+=-0.101669354766*x[2]**o + (0.231691708491)*x[2]
            ref[(3, 0, 0, 3)]+=-0.101669354766*x_ref[2]**o + (0.231691708491)*x_ref[2]
            arg[(3, 0, 1, 0)]+=0.0597692404766*x[2]**o + (0.129436995453)*x[2]
            ref[(3, 0, 1, 0)]+=0.0597692404766*x_ref[2]**o + (0.129436995453)*x_ref[2]
            arg[(3, 0, 1, 1)]+=0.25614535171*x[2]**o + (0.515729917138)*x[2]
            ref[(3, 0, 1, 1)]+=0.25614535171*x_ref[2]**o + (0.515729917138)*x_ref[2]
            arg[(3, 0, 1, 2)]+=0.423304216866*x[2]**o + (-0.68328103273)*x[2]
            ref[(3, 0, 1, 2)]+=0.423304216866*x_ref[2]**o + (-0.68328103273)*x_ref[2]
            arg[(3, 0, 1, 3)]+=0.606491152615*x[2]**o + (-0.711705973278)*x[2]
            ref[(3, 0, 1, 3)]+=0.606491152615*x_ref[2]**o + (-0.711705973278)*x_ref[2]
            arg[(3, 0, 2, 0)]+=-0.562851186596*x[2]**o + (0.23177556014)*x[2]
            ref[(3, 0, 2, 0)]+=-0.562851186596*x_ref[2]**o + (0.23177556014)*x_ref[2]
            arg[(3, 0, 2, 1)]+=0.614468603103*x[2]**o + (-0.129095894294)*x[2]
            ref[(3, 0, 2, 1)]+=0.614468603103*x_ref[2]**o + (-0.129095894294)*x_ref[2]
            arg[(3, 0, 2, 2)]+=0.700071234295*x[2]**o + (0.542327934561)*x[2]
            ref[(3, 0, 2, 2)]+=0.700071234295*x_ref[2]**o + (0.542327934561)*x_ref[2]
            arg[(3, 0, 2, 3)]+=-0.88480913146*x[2]**o + (0.27816574453)*x[2]
            ref[(3, 0, 2, 3)]+=-0.88480913146*x_ref[2]**o + (0.27816574453)*x_ref[2]
            arg[(3, 1, 0, 0)]+=-0.0250525258162*x[2]**o + (0.654300626851)*x[2]
            ref[(3, 1, 0, 0)]+=-0.0250525258162*x_ref[2]**o + (0.654300626851)*x_ref[2]
            arg[(3, 1, 0, 1)]+=0.559176489862*x[2]**o + (-0.323693813778)*x[2]
            ref[(3, 1, 0, 1)]+=0.559176489862*x_ref[2]**o + (-0.323693813778)*x_ref[2]
            arg[(3, 1, 0, 2)]+=-0.250755537124*x[2]**o + (0.529199526544)*x[2]
            ref[(3, 1, 0, 2)]+=-0.250755537124*x_ref[2]**o + (0.529199526544)*x_ref[2]
            arg[(3, 1, 0, 3)]+=0.992410164942*x[2]**o + (-0.627392055476)*x[2]
            ref[(3, 1, 0, 3)]+=0.992410164942*x_ref[2]**o + (-0.627392055476)*x_ref[2]
            arg[(3, 1, 1, 0)]+=-0.648829638263*x[2]**o + (0.306637209363)*x[2]
            ref[(3, 1, 1, 0)]+=-0.648829638263*x_ref[2]**o + (0.306637209363)*x_ref[2]
            arg[(3, 1, 1, 1)]+=0.549932040021*x[2]**o + (0.521785906657)*x[2]
            ref[(3, 1, 1, 1)]+=0.549932040021*x_ref[2]**o + (0.521785906657)*x_ref[2]
            arg[(3, 1, 1, 2)]+=-0.711064211334*x[2]**o + (0.0823838547805)*x[2]
            ref[(3, 1, 1, 2)]+=-0.711064211334*x_ref[2]**o + (0.0823838547805)*x_ref[2]
            arg[(3, 1, 1, 3)]+=0.845335098171*x[2]**o + (-0.809887632507)*x[2]
            ref[(3, 1, 1, 3)]+=0.845335098171*x_ref[2]**o + (-0.809887632507)*x_ref[2]
            arg[(3, 1, 2, 0)]+=-0.584573570977*x[2]**o + (-0.602408317011)*x[2]
            ref[(3, 1, 2, 0)]+=-0.584573570977*x_ref[2]**o + (-0.602408317011)*x_ref[2]
            arg[(3, 1, 2, 1)]+=0.826624311816*x[2]**o + (0.928234253801)*x[2]
            ref[(3, 1, 2, 1)]+=0.826624311816*x_ref[2]**o + (0.928234253801)*x_ref[2]
            arg[(3, 1, 2, 2)]+=0.370000128072*x[2]**o + (0.82831714428)*x[2]
            ref[(3, 1, 2, 2)]+=0.370000128072*x_ref[2]**o + (0.82831714428)*x_ref[2]
            arg[(3, 1, 2, 3)]+=0.377568676567*x[2]**o + (-0.582989017858)*x[2]
            ref[(3, 1, 2, 3)]+=0.377568676567*x_ref[2]**o + (-0.582989017858)*x_ref[2]
            arg[(3, 2, 0, 0)]+=-0.865723868874*x[2]**o + (0.262717626905)*x[2]
            ref[(3, 2, 0, 0)]+=-0.865723868874*x_ref[2]**o + (0.262717626905)*x_ref[2]
            arg[(3, 2, 0, 1)]+=-0.235608112522*x[2]**o + (0.0798622164597)*x[2]
            ref[(3, 2, 0, 1)]+=-0.235608112522*x_ref[2]**o + (0.0798622164597)*x_ref[2]
            arg[(3, 2, 0, 2)]+=-0.752170558408*x[2]**o + (-0.838115407503)*x[2]
            ref[(3, 2, 0, 2)]+=-0.752170558408*x_ref[2]**o + (-0.838115407503)*x_ref[2]
            arg[(3, 2, 0, 3)]+=-0.516256409655*x[2]**o + (0.0561585641182)*x[2]
            ref[(3, 2, 0, 3)]+=-0.516256409655*x_ref[2]**o + (0.0561585641182)*x_ref[2]
            arg[(3, 2, 1, 0)]+=-0.318618908521*x[2]**o + (-0.678196816886)*x[2]
            ref[(3, 2, 1, 0)]+=-0.318618908521*x_ref[2]**o + (-0.678196816886)*x_ref[2]
            arg[(3, 2, 1, 1)]+=0.934243325003*x[2]**o + (0.0108890505107)*x[2]
            ref[(3, 2, 1, 1)]+=0.934243325003*x_ref[2]**o + (0.0108890505107)*x_ref[2]
            arg[(3, 2, 1, 2)]+=0.628926839634*x[2]**o + (-0.754003947072)*x[2]
            ref[(3, 2, 1, 2)]+=0.628926839634*x_ref[2]**o + (-0.754003947072)*x_ref[2]
            arg[(3, 2, 1, 3)]+=0.636777700009*x[2]**o + (-0.0790056088548)*x[2]
            ref[(3, 2, 1, 3)]+=0.636777700009*x_ref[2]**o + (-0.0790056088548)*x_ref[2]
            arg[(3, 2, 2, 0)]+=0.210004771546*x[2]**o + (-0.0985400664074)*x[2]
            ref[(3, 2, 2, 0)]+=0.210004771546*x_ref[2]**o + (-0.0985400664074)*x_ref[2]
            arg[(3, 2, 2, 1)]+=0.720035996724*x[2]**o + (-0.0636623597853)*x[2]
            ref[(3, 2, 2, 1)]+=0.720035996724*x_ref[2]**o + (-0.0636623597853)*x_ref[2]
            arg[(3, 2, 2, 2)]+=-0.366568539576*x[2]**o + (0.397646731746)*x[2]
            ref[(3, 2, 2, 2)]+=-0.366568539576*x_ref[2]**o + (0.397646731746)*x_ref[2]
            arg[(3, 2, 2, 3)]+=0.0618061617038*x[2]**o + (-0.456134392225)*x[2]
            ref[(3, 2, 2, 3)]+=0.0618061617038*x_ref[2]**o + (-0.456134392225)*x_ref[2]
            arg[(3, 3, 0, 0)]+=0.318569296248*x[2]**o + (0.229343632539)*x[2]
            ref[(3, 3, 0, 0)]+=0.318569296248*x_ref[2]**o + (0.229343632539)*x_ref[2]
            arg[(3, 3, 0, 1)]+=-0.140437589444*x[2]**o + (-0.855093611344)*x[2]
            ref[(3, 3, 0, 1)]+=-0.140437589444*x_ref[2]**o + (-0.855093611344)*x_ref[2]
            arg[(3, 3, 0, 2)]+=0.197133109195*x[2]**o + (0.913506974648)*x[2]
            ref[(3, 3, 0, 2)]+=0.197133109195*x_ref[2]**o + (0.913506974648)*x_ref[2]
            arg[(3, 3, 0, 3)]+=-0.768611226722*x[2]**o + (-0.851906781555)*x[2]
            ref[(3, 3, 0, 3)]+=-0.768611226722*x_ref[2]**o + (-0.851906781555)*x_ref[2]
            arg[(3, 3, 1, 0)]+=0.467709286333*x[2]**o + (0.145784848471)*x[2]
            ref[(3, 3, 1, 0)]+=0.467709286333*x_ref[2]**o + (0.145784848471)*x_ref[2]
            arg[(3, 3, 1, 1)]+=-0.262452532587*x[2]**o + (0.598397463363)*x[2]
            ref[(3, 3, 1, 1)]+=-0.262452532587*x_ref[2]**o + (0.598397463363)*x_ref[2]
            arg[(3, 3, 1, 2)]+=0.470814193393*x[2]**o + (-0.000505772332136)*x[2]
            ref[(3, 3, 1, 2)]+=0.470814193393*x_ref[2]**o + (-0.000505772332136)*x_ref[2]
            arg[(3, 3, 1, 3)]+=-0.38768960297*x[2]**o + (0.411057408647)*x[2]
            ref[(3, 3, 1, 3)]+=-0.38768960297*x_ref[2]**o + (0.411057408647)*x_ref[2]
            arg[(3, 3, 2, 0)]+=-0.690722825516*x[2]**o + (-0.130030267951)*x[2]
            ref[(3, 3, 2, 0)]+=-0.690722825516*x_ref[2]**o + (-0.130030267951)*x_ref[2]
            arg[(3, 3, 2, 1)]+=-0.283315094026*x[2]**o + (-0.533784583516)*x[2]
            ref[(3, 3, 2, 1)]+=-0.283315094026*x_ref[2]**o + (-0.533784583516)*x_ref[2]
            arg[(3, 3, 2, 2)]+=-0.355055766075*x[2]**o + (-0.692410609281)*x[2]
            ref[(3, 3, 2, 2)]+=-0.355055766075*x_ref[2]**o + (-0.692410609281)*x_ref[2]
            arg[(3, 3, 2, 3)]+=0.937730681432*x[2]**o + (-0.571241761449)*x[2]
            ref[(3, 3, 2, 3)]+=0.937730681432*x_ref[2]**o + (-0.571241761449)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedContinuousFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.849116902495*x[0]**o + (-0.774472637654)*x[0] + (-0.79829421771)*x[1]**o + (0.865742108214)*x[1]
        ref=-0.849116902495*x_ref[0]**o + (-0.774472637654)*x_ref[0] + (-0.79829421771)*x_ref[1]**o + (0.865742108214)*x_ref[1]
        if dim==3:
            arg+=(-0.670859909765)*x[2]**o + (-0.627890436301)*x[2]
            ref+=(-0.670859909765)*x_ref[2]**o + (-0.627890436301)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedContinuousFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=0.526885778045*x[0]**o + (-0.288355801217)*x[0] + (-0.267327433861)*x[1]**o + (-0.44985151088)*x[1]
        ref[(0,)]=0.526885778045*x_ref[0]**o + (-0.288355801217)*x_ref[0] + (-0.267327433861)*x_ref[1]**o + (-0.44985151088)*x_ref[1]
        arg[(1,)]=0.689896020062*x[0]**o + (0.679804837565)*x[0] + (-0.671788368522)*x[1]**o + (-0.126301477671)*x[1]
        ref[(1,)]=0.689896020062*x_ref[0]**o + (0.679804837565)*x_ref[0] + (-0.671788368522)*x_ref[1]**o + (-0.126301477671)*x_ref[1]
        arg[(2,)]=-0.801524912475*x[0]**o + (0.983515979769)*x[0] + (-0.683344638491)*x[1]**o + (0.891732233081)*x[1]
        ref[(2,)]=-0.801524912475*x_ref[0]**o + (0.983515979769)*x_ref[0] + (-0.683344638491)*x_ref[1]**o + (0.891732233081)*x_ref[1]
        arg[(3,)]=0.307962249723*x[0]**o + (0.666836654672)*x[0] + (0.0712666696704)*x[1]**o + (-0.155462497457)*x[1]
        ref[(3,)]=0.307962249723*x_ref[0]**o + (0.666836654672)*x_ref[0] + (0.0712666696704)*x_ref[1]**o + (-0.155462497457)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.86537575339*x[2]**o + (-0.135197263706)*x[2]
            ref[(0,)]+=0.86537575339*x_ref[2]**o + (-0.135197263706)*x_ref[2]
            arg[(1,)]+=-0.801686040118*x[2]**o + (0.69016732187)*x[2]
            ref[(1,)]+=-0.801686040118*x_ref[2]**o + (0.69016732187)*x_ref[2]
            arg[(2,)]+=0.738403849613*x[2]**o + (0.679797162554)*x[2]
            ref[(2,)]+=0.738403849613*x_ref[2]**o + (0.679797162554)*x_ref[2]
            arg[(3,)]+=0.894762504131*x[2]**o + (-0.546008289431)*x[2]
            ref[(3,)]+=0.894762504131*x_ref[2]**o + (-0.546008289431)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedContinuousFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref = Data(0,(2, 3),w_ref)
        arg[(0, 0)]=0.613576769194*x[0]**o + (0.937569357519)*x[0] + (-0.94649451199)*x[1]**o + (0.630155087638)*x[1]
        ref[(0, 0)]=0.613576769194*x_ref[0]**o + (0.937569357519)*x_ref[0] + (-0.94649451199)*x_ref[1]**o + (0.630155087638)*x_ref[1]
        arg[(0, 1)]=0.935867133264*x[0]**o + (0.338180833988)*x[0] + (-0.822649892155)*x[1]**o + (-0.249283846961)*x[1]
        ref[(0, 1)]=0.935867133264*x_ref[0]**o + (0.338180833988)*x_ref[0] + (-0.822649892155)*x_ref[1]**o + (-0.249283846961)*x_ref[1]
        arg[(0, 2)]=0.59433212548*x[0]**o + (0.397338748877)*x[0] + (0.558451765418)*x[1]**o + (0.439519676068)*x[1]
        ref[(0, 2)]=0.59433212548*x_ref[0]**o + (0.397338748877)*x_ref[0] + (0.558451765418)*x_ref[1]**o + (0.439519676068)*x_ref[1]
        arg[(1, 0)]=-0.0828730890001*x[0]**o + (-0.36989955286)*x[0] + (-0.260071565048)*x[1]**o + (-0.796243869754)*x[1]
        ref[(1, 0)]=-0.0828730890001*x_ref[0]**o + (-0.36989955286)*x_ref[0] + (-0.260071565048)*x_ref[1]**o + (-0.796243869754)*x_ref[1]
        arg[(1, 1)]=-0.609482938218*x[0]**o + (0.0551983891798)*x[0] + (0.626053756107)*x[1]**o + (-0.897166889978)*x[1]
        ref[(1, 1)]=-0.609482938218*x_ref[0]**o + (0.0551983891798)*x_ref[0] + (0.626053756107)*x_ref[1]**o + (-0.897166889978)*x_ref[1]
        arg[(1, 2)]=0.343992404158*x[0]**o + (-0.625649340892)*x[0] + (0.168377238201)*x[1]**o + (-0.535128093974)*x[1]
        ref[(1, 2)]=0.343992404158*x_ref[0]**o + (-0.625649340892)*x_ref[0] + (0.168377238201)*x_ref[1]**o + (-0.535128093974)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.930437098531*x[2]**o + (-0.428006550723)*x[2]
            ref[(0, 0)]+=-0.930437098531*x_ref[2]**o + (-0.428006550723)*x_ref[2]
            arg[(0, 1)]+=-0.169500462077*x[2]**o + (0.863357856306)*x[2]
            ref[(0, 1)]+=-0.169500462077*x_ref[2]**o + (0.863357856306)*x_ref[2]
            arg[(0, 2)]+=-0.728604089688*x[2]**o + (-0.739824277317)*x[2]
            ref[(0, 2)]+=-0.728604089688*x_ref[2]**o + (-0.739824277317)*x_ref[2]
            arg[(1, 0)]+=-0.717921611236*x[2]**o + (-0.123608918943)*x[2]
            ref[(1, 0)]+=-0.717921611236*x_ref[2]**o + (-0.123608918943)*x_ref[2]
            arg[(1, 1)]+=0.557730788333*x[2]**o + (0.46139492908)*x[2]
            ref[(1, 1)]+=0.557730788333*x_ref[2]**o + (0.46139492908)*x_ref[2]
            arg[(1, 2)]+=-0.663989361036*x[2]**o + (-0.310485214646)*x[2]
            ref[(1, 2)]+=-0.663989361036*x_ref[2]**o + (-0.310485214646)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedContinuousFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 3),w)
        ref = Data(0,(4, 3, 3),w_ref)
        arg[(0, 0, 0)]=0.032621552723*x[0]**o + (0.121175918362)*x[0] + (0.259564381691)*x[1]**o + (0.407700471832)*x[1]
        ref[(0, 0, 0)]=0.032621552723*x_ref[0]**o + (0.121175918362)*x_ref[0] + (0.259564381691)*x_ref[1]**o + (0.407700471832)*x_ref[1]
        arg[(0, 0, 1)]=0.825177857528*x[0]**o + (-0.114729418937)*x[0] + (-0.532518478132)*x[1]**o + (-0.948604313892)*x[1]
        ref[(0, 0, 1)]=0.825177857528*x_ref[0]**o + (-0.114729418937)*x_ref[0] + (-0.532518478132)*x_ref[1]**o + (-0.948604313892)*x_ref[1]
        arg[(0, 0, 2)]=-0.596570017031*x[0]**o + (0.82445112417)*x[0] + (0.682160936561)*x[1]**o + (0.638455454798)*x[1]
        ref[(0, 0, 2)]=-0.596570017031*x_ref[0]**o + (0.82445112417)*x_ref[0] + (0.682160936561)*x_ref[1]**o + (0.638455454798)*x_ref[1]
        arg[(0, 1, 0)]=-0.650499890101*x[0]**o + (0.712149437554)*x[0] + (-0.302923533453)*x[1]**o + (0.652351658303)*x[1]
        ref[(0, 1, 0)]=-0.650499890101*x_ref[0]**o + (0.712149437554)*x_ref[0] + (-0.302923533453)*x_ref[1]**o + (0.652351658303)*x_ref[1]
        arg[(0, 1, 1)]=-0.319609622104*x[0]**o + (-0.331227635196)*x[0] + (0.602483893653)*x[1]**o + (-0.994322210185)*x[1]
        ref[(0, 1, 1)]=-0.319609622104*x_ref[0]**o + (-0.331227635196)*x_ref[0] + (0.602483893653)*x_ref[1]**o + (-0.994322210185)*x_ref[1]
        arg[(0, 1, 2)]=0.236203910499*x[0]**o + (0.910530760347)*x[0] + (-0.12327913554)*x[1]**o + (-0.614086058285)*x[1]
        ref[(0, 1, 2)]=0.236203910499*x_ref[0]**o + (0.910530760347)*x_ref[0] + (-0.12327913554)*x_ref[1]**o + (-0.614086058285)*x_ref[1]
        arg[(0, 2, 0)]=-0.288547044689*x[0]**o + (-0.498430897105)*x[0] + (-0.712401681451)*x[1]**o + (-0.970162758566)*x[1]
        ref[(0, 2, 0)]=-0.288547044689*x_ref[0]**o + (-0.498430897105)*x_ref[0] + (-0.712401681451)*x_ref[1]**o + (-0.970162758566)*x_ref[1]
        arg[(0, 2, 1)]=-0.186183459207*x[0]**o + (-0.589338787829)*x[0] + (0.679757962161)*x[1]**o + (0.728349723498)*x[1]
        ref[(0, 2, 1)]=-0.186183459207*x_ref[0]**o + (-0.589338787829)*x_ref[0] + (0.679757962161)*x_ref[1]**o + (0.728349723498)*x_ref[1]
        arg[(0, 2, 2)]=-0.0936319572479*x[0]**o + (0.207294731536)*x[0] + (-0.353673998797)*x[1]**o + (-0.882566497755)*x[1]
        ref[(0, 2, 2)]=-0.0936319572479*x_ref[0]**o + (0.207294731536)*x_ref[0] + (-0.353673998797)*x_ref[1]**o + (-0.882566497755)*x_ref[1]
        arg[(1, 0, 0)]=0.808816429556*x[0]**o + (-0.423076841429)*x[0] + (0.436118615371)*x[1]**o + (0.266708415756)*x[1]
        ref[(1, 0, 0)]=0.808816429556*x_ref[0]**o + (-0.423076841429)*x_ref[0] + (0.436118615371)*x_ref[1]**o + (0.266708415756)*x_ref[1]
        arg[(1, 0, 1)]=-0.0063047040459*x[0]**o + (0.241667913058)*x[0] + (0.00937826028475)*x[1]**o + (-0.752744434129)*x[1]
        ref[(1, 0, 1)]=-0.0063047040459*x_ref[0]**o + (0.241667913058)*x_ref[0] + (0.00937826028475)*x_ref[1]**o + (-0.752744434129)*x_ref[1]
        arg[(1, 0, 2)]=0.566168747056*x[0]**o + (-0.0167876537435)*x[0] + (-0.364726790352)*x[1]**o + (0.279094716946)*x[1]
        ref[(1, 0, 2)]=0.566168747056*x_ref[0]**o + (-0.0167876537435)*x_ref[0] + (-0.364726790352)*x_ref[1]**o + (0.279094716946)*x_ref[1]
        arg[(1, 1, 0)]=-0.608749878956*x[0]**o + (-0.480361392828)*x[0] + (0.369239125589)*x[1]**o + (-0.0456895196095)*x[1]
        ref[(1, 1, 0)]=-0.608749878956*x_ref[0]**o + (-0.480361392828)*x_ref[0] + (0.369239125589)*x_ref[1]**o + (-0.0456895196095)*x_ref[1]
        arg[(1, 1, 1)]=-0.851711271386*x[0]**o + (0.0917869900373)*x[0] + (-0.838842835544)*x[1]**o + (0.846108158521)*x[1]
        ref[(1, 1, 1)]=-0.851711271386*x_ref[0]**o + (0.0917869900373)*x_ref[0] + (-0.838842835544)*x_ref[1]**o + (0.846108158521)*x_ref[1]
        arg[(1, 1, 2)]=0.590405580075*x[0]**o + (0.160028126865)*x[0] + (-0.915521366629)*x[1]**o + (-0.786679860502)*x[1]
        ref[(1, 1, 2)]=0.590405580075*x_ref[0]**o + (0.160028126865)*x_ref[0] + (-0.915521366629)*x_ref[1]**o + (-0.786679860502)*x_ref[1]
        arg[(1, 2, 0)]=0.71874065543*x[0]**o + (0.502552984728)*x[0] + (0.00436888125215)*x[1]**o + (0.61100490556)*x[1]
        ref[(1, 2, 0)]=0.71874065543*x_ref[0]**o + (0.502552984728)*x_ref[0] + (0.00436888125215)*x_ref[1]**o + (0.61100490556)*x_ref[1]
        arg[(1, 2, 1)]=-0.942048817545*x[0]**o + (-0.741604192281)*x[0] + (0.594175698627)*x[1]**o + (0.917149457112)*x[1]
        ref[(1, 2, 1)]=-0.942048817545*x_ref[0]**o + (-0.741604192281)*x_ref[0] + (0.594175698627)*x_ref[1]**o + (0.917149457112)*x_ref[1]
        arg[(1, 2, 2)]=-0.323351867736*x[0]**o + (-0.461347073165)*x[0] + (-0.0166107720577)*x[1]**o + (0.780870617428)*x[1]
        ref[(1, 2, 2)]=-0.323351867736*x_ref[0]**o + (-0.461347073165)*x_ref[0] + (-0.0166107720577)*x_ref[1]**o + (0.780870617428)*x_ref[1]
        arg[(2, 0, 0)]=0.0428949239454*x[0]**o + (0.00545899034001)*x[0] + (-0.786445939908)*x[1]**o + (-0.0066335183427)*x[1]
        ref[(2, 0, 0)]=0.0428949239454*x_ref[0]**o + (0.00545899034001)*x_ref[0] + (-0.786445939908)*x_ref[1]**o + (-0.0066335183427)*x_ref[1]
        arg[(2, 0, 1)]=-0.388643256029*x[0]**o + (0.719473424213)*x[0] + (-0.285055426242)*x[1]**o + (0.454982977061)*x[1]
        ref[(2, 0, 1)]=-0.388643256029*x_ref[0]**o + (0.719473424213)*x_ref[0] + (-0.285055426242)*x_ref[1]**o + (0.454982977061)*x_ref[1]
        arg[(2, 0, 2)]=0.203857953675*x[0]**o + (0.282723081932)*x[0] + (-0.665997379065)*x[1]**o + (-0.745214986385)*x[1]
        ref[(2, 0, 2)]=0.203857953675*x_ref[0]**o + (0.282723081932)*x_ref[0] + (-0.665997379065)*x_ref[1]**o + (-0.745214986385)*x_ref[1]
        arg[(2, 1, 0)]=0.967437134209*x[0]**o + (-0.490999256748)*x[0] + (0.779837956868)*x[1]**o + (-0.381959856546)*x[1]
        ref[(2, 1, 0)]=0.967437134209*x_ref[0]**o + (-0.490999256748)*x_ref[0] + (0.779837956868)*x_ref[1]**o + (-0.381959856546)*x_ref[1]
        arg[(2, 1, 1)]=-0.232202871078*x[0]**o + (0.330084178664)*x[0] + (-0.933811487655)*x[1]**o + (0.919373545518)*x[1]
        ref[(2, 1, 1)]=-0.232202871078*x_ref[0]**o + (0.330084178664)*x_ref[0] + (-0.933811487655)*x_ref[1]**o + (0.919373545518)*x_ref[1]
        arg[(2, 1, 2)]=0.0419650105944*x[0]**o + (0.955771706992)*x[0] + (-0.226266565195)*x[1]**o + (-0.471638990116)*x[1]
        ref[(2, 1, 2)]=0.0419650105944*x_ref[0]**o + (0.955771706992)*x_ref[0] + (-0.226266565195)*x_ref[1]**o + (-0.471638990116)*x_ref[1]
        arg[(2, 2, 0)]=0.87547681844*x[0]**o + (0.125257797784)*x[0] + (-0.156471257721)*x[1]**o + (0.585277555749)*x[1]
        ref[(2, 2, 0)]=0.87547681844*x_ref[0]**o + (0.125257797784)*x_ref[0] + (-0.156471257721)*x_ref[1]**o + (0.585277555749)*x_ref[1]
        arg[(2, 2, 1)]=-0.371332695718*x[0]**o + (0.720580092437)*x[0] + (-0.126141554584)*x[1]**o + (0.742363575719)*x[1]
        ref[(2, 2, 1)]=-0.371332695718*x_ref[0]**o + (0.720580092437)*x_ref[0] + (-0.126141554584)*x_ref[1]**o + (0.742363575719)*x_ref[1]
        arg[(2, 2, 2)]=0.0661413779824*x[0]**o + (0.534744810079)*x[0] + (-0.886531918153)*x[1]**o + (-0.312670401351)*x[1]
        ref[(2, 2, 2)]=0.0661413779824*x_ref[0]**o + (0.534744810079)*x_ref[0] + (-0.886531918153)*x_ref[1]**o + (-0.312670401351)*x_ref[1]
        arg[(3, 0, 0)]=0.103424666399*x[0]**o + (0.944183126872)*x[0] + (-0.44159088708)*x[1]**o + (-0.356403357767)*x[1]
        ref[(3, 0, 0)]=0.103424666399*x_ref[0]**o + (0.944183126872)*x_ref[0] + (-0.44159088708)*x_ref[1]**o + (-0.356403357767)*x_ref[1]
        arg[(3, 0, 1)]=-0.785727636029*x[0]**o + (-0.39869100903)*x[0] + (0.0727747270054)*x[1]**o + (-0.756183549703)*x[1]
        ref[(3, 0, 1)]=-0.785727636029*x_ref[0]**o + (-0.39869100903)*x_ref[0] + (0.0727747270054)*x_ref[1]**o + (-0.756183549703)*x_ref[1]
        arg[(3, 0, 2)]=-0.69497955216*x[0]**o + (0.539316124916)*x[0] + (-0.282632405436)*x[1]**o + (0.478299749274)*x[1]
        ref[(3, 0, 2)]=-0.69497955216*x_ref[0]**o + (0.539316124916)*x_ref[0] + (-0.282632405436)*x_ref[1]**o + (0.478299749274)*x_ref[1]
        arg[(3, 1, 0)]=0.931548655475*x[0]**o + (0.862730171248)*x[0] + (0.27856943459)*x[1]**o + (0.284234248923)*x[1]
        ref[(3, 1, 0)]=0.931548655475*x_ref[0]**o + (0.862730171248)*x_ref[0] + (0.27856943459)*x_ref[1]**o + (0.284234248923)*x_ref[1]
        arg[(3, 1, 1)]=-0.628229674397*x[0]**o + (-0.067171831819)*x[0] + (0.960481127466)*x[1]**o + (0.83408101311)*x[1]
        ref[(3, 1, 1)]=-0.628229674397*x_ref[0]**o + (-0.067171831819)*x_ref[0] + (0.960481127466)*x_ref[1]**o + (0.83408101311)*x_ref[1]
        arg[(3, 1, 2)]=0.502611778842*x[0]**o + (-0.440811932318)*x[0] + (0.261922229969)*x[1]**o + (-0.26725448487)*x[1]
        ref[(3, 1, 2)]=0.502611778842*x_ref[0]**o + (-0.440811932318)*x_ref[0] + (0.261922229969)*x_ref[1]**o + (-0.26725448487)*x_ref[1]
        arg[(3, 2, 0)]=-0.902162779452*x[0]**o + (-0.7521904324)*x[0] + (-0.704753645855)*x[1]**o + (-0.552380929734)*x[1]
        ref[(3, 2, 0)]=-0.902162779452*x_ref[0]**o + (-0.7521904324)*x_ref[0] + (-0.704753645855)*x_ref[1]**o + (-0.552380929734)*x_ref[1]
        arg[(3, 2, 1)]=0.311930514632*x[0]**o + (-0.224766237634)*x[0] + (-0.91960016637)*x[1]**o + (-0.246526406135)*x[1]
        ref[(3, 2, 1)]=0.311930514632*x_ref[0]**o + (-0.224766237634)*x_ref[0] + (-0.91960016637)*x_ref[1]**o + (-0.246526406135)*x_ref[1]
        arg[(3, 2, 2)]=-0.74113111355*x[0]**o + (-0.527358825059)*x[0] + (-0.0122038769703)*x[1]**o + (0.246605840675)*x[1]
        ref[(3, 2, 2)]=-0.74113111355*x_ref[0]**o + (-0.527358825059)*x_ref[0] + (-0.0122038769703)*x_ref[1]**o + (0.246605840675)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.206603313424*x[2]**o + (0.0947662692473)*x[2]
            ref[(0, 0, 0)]+=0.206603313424*x_ref[2]**o + (0.0947662692473)*x_ref[2]
            arg[(0, 0, 1)]+=-0.0496990146322*x[2]**o + (-0.557728428689)*x[2]
            ref[(0, 0, 1)]+=-0.0496990146322*x_ref[2]**o + (-0.557728428689)*x_ref[2]
            arg[(0, 0, 2)]+=-0.183326472172*x[2]**o + (-0.80790474343)*x[2]
            ref[(0, 0, 2)]+=-0.183326472172*x_ref[2]**o + (-0.80790474343)*x_ref[2]
            arg[(0, 1, 0)]+=-0.00310831898836*x[2]**o + (0.166700395706)*x[2]
            ref[(0, 1, 0)]+=-0.00310831898836*x_ref[2]**o + (0.166700395706)*x_ref[2]
            arg[(0, 1, 1)]+=0.23405139493*x[2]**o + (-0.900531753723)*x[2]
            ref[(0, 1, 1)]+=0.23405139493*x_ref[2]**o + (-0.900531753723)*x_ref[2]
            arg[(0, 1, 2)]+=-0.0832355061367*x[2]**o + (0.994602302753)*x[2]
            ref[(0, 1, 2)]+=-0.0832355061367*x_ref[2]**o + (0.994602302753)*x_ref[2]
            arg[(0, 2, 0)]+=0.0689893300242*x[2]**o + (-0.316920699367)*x[2]
            ref[(0, 2, 0)]+=0.0689893300242*x_ref[2]**o + (-0.316920699367)*x_ref[2]
            arg[(0, 2, 1)]+=0.489217270119*x[2]**o + (0.678258579399)*x[2]
            ref[(0, 2, 1)]+=0.489217270119*x_ref[2]**o + (0.678258579399)*x_ref[2]
            arg[(0, 2, 2)]+=-0.03276799722*x[2]**o + (-0.447738762478)*x[2]
            ref[(0, 2, 2)]+=-0.03276799722*x_ref[2]**o + (-0.447738762478)*x_ref[2]
            arg[(1, 0, 0)]+=-0.378188534292*x[2]**o + (-0.787781327736)*x[2]
            ref[(1, 0, 0)]+=-0.378188534292*x_ref[2]**o + (-0.787781327736)*x_ref[2]
            arg[(1, 0, 1)]+=0.0735340099641*x[2]**o + (-0.279563911076)*x[2]
            ref[(1, 0, 1)]+=0.0735340099641*x_ref[2]**o + (-0.279563911076)*x_ref[2]
            arg[(1, 0, 2)]+=-0.374249711929*x[2]**o + (-0.403555603739)*x[2]
            ref[(1, 0, 2)]+=-0.374249711929*x_ref[2]**o + (-0.403555603739)*x_ref[2]
            arg[(1, 1, 0)]+=-0.787223580292*x[2]**o + (0.734425467725)*x[2]
            ref[(1, 1, 0)]+=-0.787223580292*x_ref[2]**o + (0.734425467725)*x_ref[2]
            arg[(1, 1, 1)]+=-0.322108897229*x[2]**o + (0.567884277276)*x[2]
            ref[(1, 1, 1)]+=-0.322108897229*x_ref[2]**o + (0.567884277276)*x_ref[2]
            arg[(1, 1, 2)]+=0.505958215615*x[2]**o + (0.874244924339)*x[2]
            ref[(1, 1, 2)]+=0.505958215615*x_ref[2]**o + (0.874244924339)*x_ref[2]
            arg[(1, 2, 0)]+=-0.521061471553*x[2]**o + (0.758508831705)*x[2]
            ref[(1, 2, 0)]+=-0.521061471553*x_ref[2]**o + (0.758508831705)*x_ref[2]
            arg[(1, 2, 1)]+=0.676570447216*x[2]**o + (0.583468568058)*x[2]
            ref[(1, 2, 1)]+=0.676570447216*x_ref[2]**o + (0.583468568058)*x_ref[2]
            arg[(1, 2, 2)]+=0.980258591516*x[2]**o + (-0.789207065544)*x[2]
            ref[(1, 2, 2)]+=0.980258591516*x_ref[2]**o + (-0.789207065544)*x_ref[2]
            arg[(2, 0, 0)]+=0.720129014451*x[2]**o + (-0.997875812678)*x[2]
            ref[(2, 0, 0)]+=0.720129014451*x_ref[2]**o + (-0.997875812678)*x_ref[2]
            arg[(2, 0, 1)]+=0.15641803134*x[2]**o + (-0.0292012829022)*x[2]
            ref[(2, 0, 1)]+=0.15641803134*x_ref[2]**o + (-0.0292012829022)*x_ref[2]
            arg[(2, 0, 2)]+=0.295258879065*x[2]**o + (0.194813145655)*x[2]
            ref[(2, 0, 2)]+=0.295258879065*x_ref[2]**o + (0.194813145655)*x_ref[2]
            arg[(2, 1, 0)]+=-0.348875390748*x[2]**o + (0.497992055536)*x[2]
            ref[(2, 1, 0)]+=-0.348875390748*x_ref[2]**o + (0.497992055536)*x_ref[2]
            arg[(2, 1, 1)]+=0.364451467987*x[2]**o + (0.513572063871)*x[2]
            ref[(2, 1, 1)]+=0.364451467987*x_ref[2]**o + (0.513572063871)*x_ref[2]
            arg[(2, 1, 2)]+=0.574062284896*x[2]**o + (0.338769778845)*x[2]
            ref[(2, 1, 2)]+=0.574062284896*x_ref[2]**o + (0.338769778845)*x_ref[2]
            arg[(2, 2, 0)]+=-0.0792274814435*x[2]**o + (-0.2087423957)*x[2]
            ref[(2, 2, 0)]+=-0.0792274814435*x_ref[2]**o + (-0.2087423957)*x_ref[2]
            arg[(2, 2, 1)]+=-0.155526806074*x[2]**o + (-0.118041295369)*x[2]
            ref[(2, 2, 1)]+=-0.155526806074*x_ref[2]**o + (-0.118041295369)*x_ref[2]
            arg[(2, 2, 2)]+=-0.603619962412*x[2]**o + (0.781917324399)*x[2]
            ref[(2, 2, 2)]+=-0.603619962412*x_ref[2]**o + (0.781917324399)*x_ref[2]
            arg[(3, 0, 0)]+=-0.483648341523*x[2]**o + (-0.856687252147)*x[2]
            ref[(3, 0, 0)]+=-0.483648341523*x_ref[2]**o + (-0.856687252147)*x_ref[2]
            arg[(3, 0, 1)]+=0.174855681129*x[2]**o + (-0.800467809781)*x[2]
            ref[(3, 0, 1)]+=0.174855681129*x_ref[2]**o + (-0.800467809781)*x_ref[2]
            arg[(3, 0, 2)]+=-0.678650901819*x[2]**o + (-0.0702547812583)*x[2]
            ref[(3, 0, 2)]+=-0.678650901819*x_ref[2]**o + (-0.0702547812583)*x_ref[2]
            arg[(3, 1, 0)]+=-0.0304519826863*x[2]**o + (-0.156710123304)*x[2]
            ref[(3, 1, 0)]+=-0.0304519826863*x_ref[2]**o + (-0.156710123304)*x_ref[2]
            arg[(3, 1, 1)]+=0.289960068812*x[2]**o + (-0.53496355142)*x[2]
            ref[(3, 1, 1)]+=0.289960068812*x_ref[2]**o + (-0.53496355142)*x_ref[2]
            arg[(3, 1, 2)]+=0.612441155517*x[2]**o + (0.914499767981)*x[2]
            ref[(3, 1, 2)]+=0.612441155517*x_ref[2]**o + (0.914499767981)*x_ref[2]
            arg[(3, 2, 0)]+=-0.961609642464*x[2]**o + (-0.782303361544)*x[2]
            ref[(3, 2, 0)]+=-0.961609642464*x_ref[2]**o + (-0.782303361544)*x_ref[2]
            arg[(3, 2, 1)]+=0.404152824812*x[2]**o + (-0.322684398648)*x[2]
            ref[(3, 2, 1)]+=0.404152824812*x_ref[2]**o + (-0.322684398648)*x_ref[2]
            arg[(3, 2, 2)]+=-0.0781778895968*x[2]**o + (-0.196544094251)*x[2]
            ref[(3, 2, 2)]+=-0.0781778895968*x_ref[2]**o + (-0.196544094251)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedContinuousFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 3, 3),w)
        ref = Data(0,(4, 3, 3, 3),w_ref)
        arg[(0, 0, 0, 0)]=-0.135317929407*x[0]**o + (0.884294264956)*x[0] + (-0.019086763373)*x[1]**o + (0.198177624634)*x[1]
        ref[(0, 0, 0, 0)]=-0.135317929407*x_ref[0]**o + (0.884294264956)*x_ref[0] + (-0.019086763373)*x_ref[1]**o + (0.198177624634)*x_ref[1]
        arg[(0, 0, 0, 1)]=-0.165658708328*x[0]**o + (-0.529096553466)*x[0] + (-0.624947862257)*x[1]**o + (-0.493141184506)*x[1]
        ref[(0, 0, 0, 1)]=-0.165658708328*x_ref[0]**o + (-0.529096553466)*x_ref[0] + (-0.624947862257)*x_ref[1]**o + (-0.493141184506)*x_ref[1]
        arg[(0, 0, 0, 2)]=-0.842130791241*x[0]**o + (-0.895112448445)*x[0] + (0.448551570616)*x[1]**o + (-0.433708761433)*x[1]
        ref[(0, 0, 0, 2)]=-0.842130791241*x_ref[0]**o + (-0.895112448445)*x_ref[0] + (0.448551570616)*x_ref[1]**o + (-0.433708761433)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.679832611766*x[0]**o + (-0.0739977058413)*x[0] + (0.85804126822)*x[1]**o + (0.725548342973)*x[1]
        ref[(0, 0, 1, 0)]=0.679832611766*x_ref[0]**o + (-0.0739977058413)*x_ref[0] + (0.85804126822)*x_ref[1]**o + (0.725548342973)*x_ref[1]
        arg[(0, 0, 1, 1)]=-0.272311061706*x[0]**o + (0.5198030959)*x[0] + (0.897026899265)*x[1]**o + (0.117088156396)*x[1]
        ref[(0, 0, 1, 1)]=-0.272311061706*x_ref[0]**o + (0.5198030959)*x_ref[0] + (0.897026899265)*x_ref[1]**o + (0.117088156396)*x_ref[1]
        arg[(0, 0, 1, 2)]=-0.496467187808*x[0]**o + (-0.569419128395)*x[0] + (-0.419697556036)*x[1]**o + (0.445077696173)*x[1]
        ref[(0, 0, 1, 2)]=-0.496467187808*x_ref[0]**o + (-0.569419128395)*x_ref[0] + (-0.419697556036)*x_ref[1]**o + (0.445077696173)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.363468914516*x[0]**o + (-0.700492427575)*x[0] + (-0.482209495061)*x[1]**o + (-0.779038122173)*x[1]
        ref[(0, 0, 2, 0)]=-0.363468914516*x_ref[0]**o + (-0.700492427575)*x_ref[0] + (-0.482209495061)*x_ref[1]**o + (-0.779038122173)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.582393281157*x[0]**o + (-0.709281132545)*x[0] + (0.521731413967)*x[1]**o + (0.770158785658)*x[1]
        ref[(0, 0, 2, 1)]=-0.582393281157*x_ref[0]**o + (-0.709281132545)*x_ref[0] + (0.521731413967)*x_ref[1]**o + (0.770158785658)*x_ref[1]
        arg[(0, 0, 2, 2)]=0.387982288409*x[0]**o + (-0.740903550591)*x[0] + (-0.0391678723934)*x[1]**o + (0.0529449043173)*x[1]
        ref[(0, 0, 2, 2)]=0.387982288409*x_ref[0]**o + (-0.740903550591)*x_ref[0] + (-0.0391678723934)*x_ref[1]**o + (0.0529449043173)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.365997257686*x[0]**o + (0.365580207323)*x[0] + (0.767670895941)*x[1]**o + (0.902566512575)*x[1]
        ref[(0, 1, 0, 0)]=0.365997257686*x_ref[0]**o + (0.365580207323)*x_ref[0] + (0.767670895941)*x_ref[1]**o + (0.902566512575)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.858745460472*x[0]**o + (-0.786640585593)*x[0] + (-0.227279104942)*x[1]**o + (0.554349613002)*x[1]
        ref[(0, 1, 0, 1)]=0.858745460472*x_ref[0]**o + (-0.786640585593)*x_ref[0] + (-0.227279104942)*x_ref[1]**o + (0.554349613002)*x_ref[1]
        arg[(0, 1, 0, 2)]=-0.242587131696*x[0]**o + (-0.499523298067)*x[0] + (0.910563128673)*x[1]**o + (-0.0498996628336)*x[1]
        ref[(0, 1, 0, 2)]=-0.242587131696*x_ref[0]**o + (-0.499523298067)*x_ref[0] + (0.910563128673)*x_ref[1]**o + (-0.0498996628336)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.036028897505*x[0]**o + (0.828828481256)*x[0] + (0.155685321626)*x[1]**o + (0.556528788123)*x[1]
        ref[(0, 1, 1, 0)]=0.036028897505*x_ref[0]**o + (0.828828481256)*x_ref[0] + (0.155685321626)*x_ref[1]**o + (0.556528788123)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.90985282667*x[0]**o + (0.394042783921)*x[0] + (0.449190134291)*x[1]**o + (-0.535516760651)*x[1]
        ref[(0, 1, 1, 1)]=0.90985282667*x_ref[0]**o + (0.394042783921)*x_ref[0] + (0.449190134291)*x_ref[1]**o + (-0.535516760651)*x_ref[1]
        arg[(0, 1, 1, 2)]=0.330175972865*x[0]**o + (-0.731515360123)*x[0] + (-0.596857735311)*x[1]**o + (-0.888458903196)*x[1]
        ref[(0, 1, 1, 2)]=0.330175972865*x_ref[0]**o + (-0.731515360123)*x_ref[0] + (-0.596857735311)*x_ref[1]**o + (-0.888458903196)*x_ref[1]
        arg[(0, 1, 2, 0)]=0.835573053093*x[0]**o + (-0.433854610434)*x[0] + (-0.265928036409)*x[1]**o + (-0.122103209289)*x[1]
        ref[(0, 1, 2, 0)]=0.835573053093*x_ref[0]**o + (-0.433854610434)*x_ref[0] + (-0.265928036409)*x_ref[1]**o + (-0.122103209289)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.117265432069*x[0]**o + (0.332833596707)*x[0] + (0.464241569983)*x[1]**o + (-0.585260027998)*x[1]
        ref[(0, 1, 2, 1)]=0.117265432069*x_ref[0]**o + (0.332833596707)*x_ref[0] + (0.464241569983)*x_ref[1]**o + (-0.585260027998)*x_ref[1]
        arg[(0, 1, 2, 2)]=0.235127856393*x[0]**o + (-0.252055031792)*x[0] + (0.565942881176)*x[1]**o + (-0.132328637853)*x[1]
        ref[(0, 1, 2, 2)]=0.235127856393*x_ref[0]**o + (-0.252055031792)*x_ref[0] + (0.565942881176)*x_ref[1]**o + (-0.132328637853)*x_ref[1]
        arg[(0, 2, 0, 0)]=0.671962654834*x[0]**o + (-0.5751989787)*x[0] + (-0.194981986367)*x[1]**o + (0.465904996431)*x[1]
        ref[(0, 2, 0, 0)]=0.671962654834*x_ref[0]**o + (-0.5751989787)*x_ref[0] + (-0.194981986367)*x_ref[1]**o + (0.465904996431)*x_ref[1]
        arg[(0, 2, 0, 1)]=-0.886435932624*x[0]**o + (-0.0564258457169)*x[0] + (0.541315822282)*x[1]**o + (-0.983342535174)*x[1]
        ref[(0, 2, 0, 1)]=-0.886435932624*x_ref[0]**o + (-0.0564258457169)*x_ref[0] + (0.541315822282)*x_ref[1]**o + (-0.983342535174)*x_ref[1]
        arg[(0, 2, 0, 2)]=-0.303199652124*x[0]**o + (0.164424188265)*x[0] + (0.252733664814)*x[1]**o + (-0.865673201677)*x[1]
        ref[(0, 2, 0, 2)]=-0.303199652124*x_ref[0]**o + (0.164424188265)*x_ref[0] + (0.252733664814)*x_ref[1]**o + (-0.865673201677)*x_ref[1]
        arg[(0, 2, 1, 0)]=-0.266044680319*x[0]**o + (-0.00865102178028)*x[0] + (0.534768871966)*x[1]**o + (0.299177669813)*x[1]
        ref[(0, 2, 1, 0)]=-0.266044680319*x_ref[0]**o + (-0.00865102178028)*x_ref[0] + (0.534768871966)*x_ref[1]**o + (0.299177669813)*x_ref[1]
        arg[(0, 2, 1, 1)]=-0.959045979973*x[0]**o + (-0.783964512718)*x[0] + (-0.216371333718)*x[1]**o + (0.447715589513)*x[1]
        ref[(0, 2, 1, 1)]=-0.959045979973*x_ref[0]**o + (-0.783964512718)*x_ref[0] + (-0.216371333718)*x_ref[1]**o + (0.447715589513)*x_ref[1]
        arg[(0, 2, 1, 2)]=-0.767800048119*x[0]**o + (0.933096935629)*x[0] + (-0.59341190018)*x[1]**o + (0.446184352788)*x[1]
        ref[(0, 2, 1, 2)]=-0.767800048119*x_ref[0]**o + (0.933096935629)*x_ref[0] + (-0.59341190018)*x_ref[1]**o + (0.446184352788)*x_ref[1]
        arg[(0, 2, 2, 0)]=-0.531612304447*x[0]**o + (-0.97863831992)*x[0] + (-0.531114904625)*x[1]**o + (0.225304847144)*x[1]
        ref[(0, 2, 2, 0)]=-0.531612304447*x_ref[0]**o + (-0.97863831992)*x_ref[0] + (-0.531114904625)*x_ref[1]**o + (0.225304847144)*x_ref[1]
        arg[(0, 2, 2, 1)]=-0.870434569417*x[0]**o + (-0.685085454068)*x[0] + (-0.543532156439)*x[1]**o + (0.978480245634)*x[1]
        ref[(0, 2, 2, 1)]=-0.870434569417*x_ref[0]**o + (-0.685085454068)*x_ref[0] + (-0.543532156439)*x_ref[1]**o + (0.978480245634)*x_ref[1]
        arg[(0, 2, 2, 2)]=-0.827947339273*x[0]**o + (-0.165820689578)*x[0] + (-0.950148523652)*x[1]**o + (-0.781323148156)*x[1]
        ref[(0, 2, 2, 2)]=-0.827947339273*x_ref[0]**o + (-0.165820689578)*x_ref[0] + (-0.950148523652)*x_ref[1]**o + (-0.781323148156)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.607221822224*x[0]**o + (0.324970458139)*x[0] + (-0.214614007304)*x[1]**o + (0.715211401853)*x[1]
        ref[(1, 0, 0, 0)]=-0.607221822224*x_ref[0]**o + (0.324970458139)*x_ref[0] + (-0.214614007304)*x_ref[1]**o + (0.715211401853)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.573607145612*x[0]**o + (-0.640519310102)*x[0] + (0.652929505654)*x[1]**o + (0.038978112147)*x[1]
        ref[(1, 0, 0, 1)]=0.573607145612*x_ref[0]**o + (-0.640519310102)*x_ref[0] + (0.652929505654)*x_ref[1]**o + (0.038978112147)*x_ref[1]
        arg[(1, 0, 0, 2)]=-0.558463032743*x[0]**o + (-0.47031161976)*x[0] + (0.256782872375)*x[1]**o + (0.618004054729)*x[1]
        ref[(1, 0, 0, 2)]=-0.558463032743*x_ref[0]**o + (-0.47031161976)*x_ref[0] + (0.256782872375)*x_ref[1]**o + (0.618004054729)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.461003586193*x[0]**o + (0.197922807281)*x[0] + (0.285882626563)*x[1]**o + (0.959572512052)*x[1]
        ref[(1, 0, 1, 0)]=0.461003586193*x_ref[0]**o + (0.197922807281)*x_ref[0] + (0.285882626563)*x_ref[1]**o + (0.959572512052)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.167114057663*x[0]**o + (-0.126242539753)*x[0] + (0.816937767064)*x[1]**o + (0.690543785957)*x[1]
        ref[(1, 0, 1, 1)]=0.167114057663*x_ref[0]**o + (-0.126242539753)*x_ref[0] + (0.816937767064)*x_ref[1]**o + (0.690543785957)*x_ref[1]
        arg[(1, 0, 1, 2)]=-0.480911841362*x[0]**o + (0.138632236578)*x[0] + (-0.880580007913)*x[1]**o + (0.421166197904)*x[1]
        ref[(1, 0, 1, 2)]=-0.480911841362*x_ref[0]**o + (0.138632236578)*x_ref[0] + (-0.880580007913)*x_ref[1]**o + (0.421166197904)*x_ref[1]
        arg[(1, 0, 2, 0)]=-0.705154730178*x[0]**o + (0.542475942595)*x[0] + (0.0104312974823)*x[1]**o + (0.80750414044)*x[1]
        ref[(1, 0, 2, 0)]=-0.705154730178*x_ref[0]**o + (0.542475942595)*x_ref[0] + (0.0104312974823)*x_ref[1]**o + (0.80750414044)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.199551913657*x[0]**o + (-0.857864344984)*x[0] + (-0.810545232386)*x[1]**o + (-0.64592265471)*x[1]
        ref[(1, 0, 2, 1)]=0.199551913657*x_ref[0]**o + (-0.857864344984)*x_ref[0] + (-0.810545232386)*x_ref[1]**o + (-0.64592265471)*x_ref[1]
        arg[(1, 0, 2, 2)]=-0.068394467589*x[0]**o + (0.748032432351)*x[0] + (0.865401409061)*x[1]**o + (-0.0369675751832)*x[1]
        ref[(1, 0, 2, 2)]=-0.068394467589*x_ref[0]**o + (0.748032432351)*x_ref[0] + (0.865401409061)*x_ref[1]**o + (-0.0369675751832)*x_ref[1]
        arg[(1, 1, 0, 0)]=0.231361126271*x[0]**o + (0.25150768468)*x[0] + (0.589987896875)*x[1]**o + (0.198649865167)*x[1]
        ref[(1, 1, 0, 0)]=0.231361126271*x_ref[0]**o + (0.25150768468)*x_ref[0] + (0.589987896875)*x_ref[1]**o + (0.198649865167)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.719556220228*x[0]**o + (-0.734583923331)*x[0] + (-0.842715267843)*x[1]**o + (-0.844172292329)*x[1]
        ref[(1, 1, 0, 1)]=0.719556220228*x_ref[0]**o + (-0.734583923331)*x_ref[0] + (-0.842715267843)*x_ref[1]**o + (-0.844172292329)*x_ref[1]
        arg[(1, 1, 0, 2)]=0.920914154773*x[0]**o + (0.176339010845)*x[0] + (0.992196756639)*x[1]**o + (-0.0372359815251)*x[1]
        ref[(1, 1, 0, 2)]=0.920914154773*x_ref[0]**o + (0.176339010845)*x_ref[0] + (0.992196756639)*x_ref[1]**o + (-0.0372359815251)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.586698978893*x[0]**o + (-0.326995776311)*x[0] + (0.136704476054)*x[1]**o + (-0.477478618977)*x[1]
        ref[(1, 1, 1, 0)]=-0.586698978893*x_ref[0]**o + (-0.326995776311)*x_ref[0] + (0.136704476054)*x_ref[1]**o + (-0.477478618977)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.0354094003207*x[0]**o + (0.649611921964)*x[0] + (-0.983576246769)*x[1]**o + (-0.129543428119)*x[1]
        ref[(1, 1, 1, 1)]=-0.0354094003207*x_ref[0]**o + (0.649611921964)*x_ref[0] + (-0.983576246769)*x_ref[1]**o + (-0.129543428119)*x_ref[1]
        arg[(1, 1, 1, 2)]=0.145605053494*x[0]**o + (0.397516227113)*x[0] + (0.87704938232)*x[1]**o + (0.214114976981)*x[1]
        ref[(1, 1, 1, 2)]=0.145605053494*x_ref[0]**o + (0.397516227113)*x_ref[0] + (0.87704938232)*x_ref[1]**o + (0.214114976981)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.273873442932*x[0]**o + (0.0412975182876)*x[0] + (-0.337801557025)*x[1]**o + (-0.918034487769)*x[1]
        ref[(1, 1, 2, 0)]=-0.273873442932*x_ref[0]**o + (0.0412975182876)*x_ref[0] + (-0.337801557025)*x_ref[1]**o + (-0.918034487769)*x_ref[1]
        arg[(1, 1, 2, 1)]=0.740309339428*x[0]**o + (-0.0660158004003)*x[0] + (0.422942355227)*x[1]**o + (-0.411781633448)*x[1]
        ref[(1, 1, 2, 1)]=0.740309339428*x_ref[0]**o + (-0.0660158004003)*x_ref[0] + (0.422942355227)*x_ref[1]**o + (-0.411781633448)*x_ref[1]
        arg[(1, 1, 2, 2)]=-0.822700784307*x[0]**o + (0.45107585441)*x[0] + (-0.211649371541)*x[1]**o + (-0.691143994746)*x[1]
        ref[(1, 1, 2, 2)]=-0.822700784307*x_ref[0]**o + (0.45107585441)*x_ref[0] + (-0.211649371541)*x_ref[1]**o + (-0.691143994746)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.56652707969*x[0]**o + (-0.26458135935)*x[0] + (-0.900204739668)*x[1]**o + (0.0236882756914)*x[1]
        ref[(1, 2, 0, 0)]=-0.56652707969*x_ref[0]**o + (-0.26458135935)*x_ref[0] + (-0.900204739668)*x_ref[1]**o + (0.0236882756914)*x_ref[1]
        arg[(1, 2, 0, 1)]=0.568945893259*x[0]**o + (-0.771976798769)*x[0] + (0.925600192843)*x[1]**o + (0.301352732947)*x[1]
        ref[(1, 2, 0, 1)]=0.568945893259*x_ref[0]**o + (-0.771976798769)*x_ref[0] + (0.925600192843)*x_ref[1]**o + (0.301352732947)*x_ref[1]
        arg[(1, 2, 0, 2)]=-0.513915304568*x[0]**o + (0.22883255432)*x[0] + (0.217768605529)*x[1]**o + (-0.124661747011)*x[1]
        ref[(1, 2, 0, 2)]=-0.513915304568*x_ref[0]**o + (0.22883255432)*x_ref[0] + (0.217768605529)*x_ref[1]**o + (-0.124661747011)*x_ref[1]
        arg[(1, 2, 1, 0)]=-0.0526874198468*x[0]**o + (0.952856741581)*x[0] + (0.411425516206)*x[1]**o + (0.277758323843)*x[1]
        ref[(1, 2, 1, 0)]=-0.0526874198468*x_ref[0]**o + (0.952856741581)*x_ref[0] + (0.411425516206)*x_ref[1]**o + (0.277758323843)*x_ref[1]
        arg[(1, 2, 1, 1)]=0.29401718993*x[0]**o + (0.503589723058)*x[0] + (-0.897737334526)*x[1]**o + (-0.982457119956)*x[1]
        ref[(1, 2, 1, 1)]=0.29401718993*x_ref[0]**o + (0.503589723058)*x_ref[0] + (-0.897737334526)*x_ref[1]**o + (-0.982457119956)*x_ref[1]
        arg[(1, 2, 1, 2)]=0.1396984592*x[0]**o + (0.368236023453)*x[0] + (-0.5192088764)*x[1]**o + (0.401981757107)*x[1]
        ref[(1, 2, 1, 2)]=0.1396984592*x_ref[0]**o + (0.368236023453)*x_ref[0] + (-0.5192088764)*x_ref[1]**o + (0.401981757107)*x_ref[1]
        arg[(1, 2, 2, 0)]=0.400760658756*x[0]**o + (-0.365652540011)*x[0] + (-0.732571724007)*x[1]**o + (0.0787231639529)*x[1]
        ref[(1, 2, 2, 0)]=0.400760658756*x_ref[0]**o + (-0.365652540011)*x_ref[0] + (-0.732571724007)*x_ref[1]**o + (0.0787231639529)*x_ref[1]
        arg[(1, 2, 2, 1)]=0.375782737826*x[0]**o + (0.804071122833)*x[0] + (-0.0135398020312)*x[1]**o + (-0.0063040819579)*x[1]
        ref[(1, 2, 2, 1)]=0.375782737826*x_ref[0]**o + (0.804071122833)*x_ref[0] + (-0.0135398020312)*x_ref[1]**o + (-0.0063040819579)*x_ref[1]
        arg[(1, 2, 2, 2)]=-0.964586917226*x[0]**o + (0.759553922474)*x[0] + (0.485290093273)*x[1]**o + (0.296715186321)*x[1]
        ref[(1, 2, 2, 2)]=-0.964586917226*x_ref[0]**o + (0.759553922474)*x_ref[0] + (0.485290093273)*x_ref[1]**o + (0.296715186321)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.371299122236*x[0]**o + (-0.850880241945)*x[0] + (-0.0184584255185)*x[1]**o + (0.432585125628)*x[1]
        ref[(2, 0, 0, 0)]=0.371299122236*x_ref[0]**o + (-0.850880241945)*x_ref[0] + (-0.0184584255185)*x_ref[1]**o + (0.432585125628)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.294464972691*x[0]**o + (0.0408881897051)*x[0] + (-0.135683824833)*x[1]**o + (0.449140405697)*x[1]
        ref[(2, 0, 0, 1)]=0.294464972691*x_ref[0]**o + (0.0408881897051)*x_ref[0] + (-0.135683824833)*x_ref[1]**o + (0.449140405697)*x_ref[1]
        arg[(2, 0, 0, 2)]=-0.833469223702*x[0]**o + (-0.479293680633)*x[0] + (0.431278818108)*x[1]**o + (0.605582149099)*x[1]
        ref[(2, 0, 0, 2)]=-0.833469223702*x_ref[0]**o + (-0.479293680633)*x_ref[0] + (0.431278818108)*x_ref[1]**o + (0.605582149099)*x_ref[1]
        arg[(2, 0, 1, 0)]=0.85859169041*x[0]**o + (0.761829047248)*x[0] + (-0.482435858216)*x[1]**o + (-0.913445298193)*x[1]
        ref[(2, 0, 1, 0)]=0.85859169041*x_ref[0]**o + (0.761829047248)*x_ref[0] + (-0.482435858216)*x_ref[1]**o + (-0.913445298193)*x_ref[1]
        arg[(2, 0, 1, 1)]=-0.910461863972*x[0]**o + (-0.793969823876)*x[0] + (0.397154461545)*x[1]**o + (0.160137374329)*x[1]
        ref[(2, 0, 1, 1)]=-0.910461863972*x_ref[0]**o + (-0.793969823876)*x_ref[0] + (0.397154461545)*x_ref[1]**o + (0.160137374329)*x_ref[1]
        arg[(2, 0, 1, 2)]=0.790188377333*x[0]**o + (0.576153430287)*x[0] + (0.643623788326)*x[1]**o + (-0.252430814729)*x[1]
        ref[(2, 0, 1, 2)]=0.790188377333*x_ref[0]**o + (0.576153430287)*x_ref[0] + (0.643623788326)*x_ref[1]**o + (-0.252430814729)*x_ref[1]
        arg[(2, 0, 2, 0)]=0.771188249123*x[0]**o + (0.783928759246)*x[0] + (0.181735281038)*x[1]**o + (-0.597112148535)*x[1]
        ref[(2, 0, 2, 0)]=0.771188249123*x_ref[0]**o + (0.783928759246)*x_ref[0] + (0.181735281038)*x_ref[1]**o + (-0.597112148535)*x_ref[1]
        arg[(2, 0, 2, 1)]=-0.59139194049*x[0]**o + (-0.123940645251)*x[0] + (-0.675001125314)*x[1]**o + (0.129244165324)*x[1]
        ref[(2, 0, 2, 1)]=-0.59139194049*x_ref[0]**o + (-0.123940645251)*x_ref[0] + (-0.675001125314)*x_ref[1]**o + (0.129244165324)*x_ref[1]
        arg[(2, 0, 2, 2)]=-0.190167931923*x[0]**o + (-0.784761712849)*x[0] + (-0.911628487943)*x[1]**o + (-0.495787054133)*x[1]
        ref[(2, 0, 2, 2)]=-0.190167931923*x_ref[0]**o + (-0.784761712849)*x_ref[0] + (-0.911628487943)*x_ref[1]**o + (-0.495787054133)*x_ref[1]
        arg[(2, 1, 0, 0)]=0.874122638335*x[0]**o + (-0.608350519494)*x[0] + (0.908262133564)*x[1]**o + (0.124098688391)*x[1]
        ref[(2, 1, 0, 0)]=0.874122638335*x_ref[0]**o + (-0.608350519494)*x_ref[0] + (0.908262133564)*x_ref[1]**o + (0.124098688391)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.645240250577*x[0]**o + (-0.832836403927)*x[0] + (-0.365217322365)*x[1]**o + (0.279934289999)*x[1]
        ref[(2, 1, 0, 1)]=0.645240250577*x_ref[0]**o + (-0.832836403927)*x_ref[0] + (-0.365217322365)*x_ref[1]**o + (0.279934289999)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.878139681028*x[0]**o + (-0.704824368563)*x[0] + (-0.894818697095)*x[1]**o + (-0.226553529791)*x[1]
        ref[(2, 1, 0, 2)]=-0.878139681028*x_ref[0]**o + (-0.704824368563)*x_ref[0] + (-0.894818697095)*x_ref[1]**o + (-0.226553529791)*x_ref[1]
        arg[(2, 1, 1, 0)]=-0.991546266955*x[0]**o + (-0.939728490336)*x[0] + (-0.962081709894)*x[1]**o + (0.968532367626)*x[1]
        ref[(2, 1, 1, 0)]=-0.991546266955*x_ref[0]**o + (-0.939728490336)*x_ref[0] + (-0.962081709894)*x_ref[1]**o + (0.968532367626)*x_ref[1]
        arg[(2, 1, 1, 1)]=0.856301387312*x[0]**o + (-0.807753307714)*x[0] + (0.440614195712)*x[1]**o + (0.189025269919)*x[1]
        ref[(2, 1, 1, 1)]=0.856301387312*x_ref[0]**o + (-0.807753307714)*x_ref[0] + (0.440614195712)*x_ref[1]**o + (0.189025269919)*x_ref[1]
        arg[(2, 1, 1, 2)]=-0.344598318884*x[0]**o + (0.0416863721299)*x[0] + (0.498747869157)*x[1]**o + (0.720252465678)*x[1]
        ref[(2, 1, 1, 2)]=-0.344598318884*x_ref[0]**o + (0.0416863721299)*x_ref[0] + (0.498747869157)*x_ref[1]**o + (0.720252465678)*x_ref[1]
        arg[(2, 1, 2, 0)]=-0.467044497393*x[0]**o + (0.164805893971)*x[0] + (-0.173852593681)*x[1]**o + (-0.571986180009)*x[1]
        ref[(2, 1, 2, 0)]=-0.467044497393*x_ref[0]**o + (0.164805893971)*x_ref[0] + (-0.173852593681)*x_ref[1]**o + (-0.571986180009)*x_ref[1]
        arg[(2, 1, 2, 1)]=-0.692831022759*x[0]**o + (0.522980953362)*x[0] + (0.696560518381)*x[1]**o + (-0.803629417501)*x[1]
        ref[(2, 1, 2, 1)]=-0.692831022759*x_ref[0]**o + (0.522980953362)*x_ref[0] + (0.696560518381)*x_ref[1]**o + (-0.803629417501)*x_ref[1]
        arg[(2, 1, 2, 2)]=-0.744739944371*x[0]**o + (-0.530584261777)*x[0] + (-0.0370302890591)*x[1]**o + (-0.32511589516)*x[1]
        ref[(2, 1, 2, 2)]=-0.744739944371*x_ref[0]**o + (-0.530584261777)*x_ref[0] + (-0.0370302890591)*x_ref[1]**o + (-0.32511589516)*x_ref[1]
        arg[(2, 2, 0, 0)]=-0.787176292339*x[0]**o + (-0.621427543542)*x[0] + (0.880802054216)*x[1]**o + (0.3992251188)*x[1]
        ref[(2, 2, 0, 0)]=-0.787176292339*x_ref[0]**o + (-0.621427543542)*x_ref[0] + (0.880802054216)*x_ref[1]**o + (0.3992251188)*x_ref[1]
        arg[(2, 2, 0, 1)]=-0.00164684051785*x[0]**o + (-0.0588102041567)*x[0] + (-0.835423335833)*x[1]**o + (-0.271502045182)*x[1]
        ref[(2, 2, 0, 1)]=-0.00164684051785*x_ref[0]**o + (-0.0588102041567)*x_ref[0] + (-0.835423335833)*x_ref[1]**o + (-0.271502045182)*x_ref[1]
        arg[(2, 2, 0, 2)]=0.717406498499*x[0]**o + (-0.619847119332)*x[0] + (0.850447755368)*x[1]**o + (-0.302835724805)*x[1]
        ref[(2, 2, 0, 2)]=0.717406498499*x_ref[0]**o + (-0.619847119332)*x_ref[0] + (0.850447755368)*x_ref[1]**o + (-0.302835724805)*x_ref[1]
        arg[(2, 2, 1, 0)]=-0.084827062974*x[0]**o + (-0.802175996457)*x[0] + (0.715696081519)*x[1]**o + (-0.781109929986)*x[1]
        ref[(2, 2, 1, 0)]=-0.084827062974*x_ref[0]**o + (-0.802175996457)*x_ref[0] + (0.715696081519)*x_ref[1]**o + (-0.781109929986)*x_ref[1]
        arg[(2, 2, 1, 1)]=0.0710945783141*x[0]**o + (-0.226251566759)*x[0] + (0.499853416547)*x[1]**o + (0.571605199979)*x[1]
        ref[(2, 2, 1, 1)]=0.0710945783141*x_ref[0]**o + (-0.226251566759)*x_ref[0] + (0.499853416547)*x_ref[1]**o + (0.571605199979)*x_ref[1]
        arg[(2, 2, 1, 2)]=-0.37084363419*x[0]**o + (-0.807617434494)*x[0] + (0.961063708465)*x[1]**o + (-0.354253697476)*x[1]
        ref[(2, 2, 1, 2)]=-0.37084363419*x_ref[0]**o + (-0.807617434494)*x_ref[0] + (0.961063708465)*x_ref[1]**o + (-0.354253697476)*x_ref[1]
        arg[(2, 2, 2, 0)]=-0.229263629537*x[0]**o + (-0.273425972673)*x[0] + (-0.560740528342)*x[1]**o + (0.372915126798)*x[1]
        ref[(2, 2, 2, 0)]=-0.229263629537*x_ref[0]**o + (-0.273425972673)*x_ref[0] + (-0.560740528342)*x_ref[1]**o + (0.372915126798)*x_ref[1]
        arg[(2, 2, 2, 1)]=0.98926965642*x[0]**o + (-0.0342923743482)*x[0] + (-0.623443310218)*x[1]**o + (0.969008018616)*x[1]
        ref[(2, 2, 2, 1)]=0.98926965642*x_ref[0]**o + (-0.0342923743482)*x_ref[0] + (-0.623443310218)*x_ref[1]**o + (0.969008018616)*x_ref[1]
        arg[(2, 2, 2, 2)]=0.049673560828*x[0]**o + (-0.0926659534059)*x[0] + (0.100025553493)*x[1]**o + (-0.332439171392)*x[1]
        ref[(2, 2, 2, 2)]=0.049673560828*x_ref[0]**o + (-0.0926659534059)*x_ref[0] + (0.100025553493)*x_ref[1]**o + (-0.332439171392)*x_ref[1]
        arg[(3, 0, 0, 0)]=0.752413757909*x[0]**o + (-0.0241949568564)*x[0] + (-0.237388015384)*x[1]**o + (0.686366103759)*x[1]
        ref[(3, 0, 0, 0)]=0.752413757909*x_ref[0]**o + (-0.0241949568564)*x_ref[0] + (-0.237388015384)*x_ref[1]**o + (0.686366103759)*x_ref[1]
        arg[(3, 0, 0, 1)]=-0.783232179152*x[0]**o + (0.787225118765)*x[0] + (-0.855476377721)*x[1]**o + (0.739193442306)*x[1]
        ref[(3, 0, 0, 1)]=-0.783232179152*x_ref[0]**o + (0.787225118765)*x_ref[0] + (-0.855476377721)*x_ref[1]**o + (0.739193442306)*x_ref[1]
        arg[(3, 0, 0, 2)]=-0.636544607842*x[0]**o + (-0.322041211792)*x[0] + (0.975861689397)*x[1]**o + (0.496396239152)*x[1]
        ref[(3, 0, 0, 2)]=-0.636544607842*x_ref[0]**o + (-0.322041211792)*x_ref[0] + (0.975861689397)*x_ref[1]**o + (0.496396239152)*x_ref[1]
        arg[(3, 0, 1, 0)]=0.703321183713*x[0]**o + (-0.594776032355)*x[0] + (0.275365370733)*x[1]**o + (-0.38429100804)*x[1]
        ref[(3, 0, 1, 0)]=0.703321183713*x_ref[0]**o + (-0.594776032355)*x_ref[0] + (0.275365370733)*x_ref[1]**o + (-0.38429100804)*x_ref[1]
        arg[(3, 0, 1, 1)]=0.810363777649*x[0]**o + (0.816436682807)*x[0] + (0.761650864842)*x[1]**o + (0.995355547489)*x[1]
        ref[(3, 0, 1, 1)]=0.810363777649*x_ref[0]**o + (0.816436682807)*x_ref[0] + (0.761650864842)*x_ref[1]**o + (0.995355547489)*x_ref[1]
        arg[(3, 0, 1, 2)]=0.559527322647*x[0]**o + (-0.515900983673)*x[0] + (0.924238225966)*x[1]**o + (-0.479393953918)*x[1]
        ref[(3, 0, 1, 2)]=0.559527322647*x_ref[0]**o + (-0.515900983673)*x_ref[0] + (0.924238225966)*x_ref[1]**o + (-0.479393953918)*x_ref[1]
        arg[(3, 0, 2, 0)]=-0.741516793167*x[0]**o + (0.615901893382)*x[0] + (0.61856948409)*x[1]**o + (-0.795290799385)*x[1]
        ref[(3, 0, 2, 0)]=-0.741516793167*x_ref[0]**o + (0.615901893382)*x_ref[0] + (0.61856948409)*x_ref[1]**o + (-0.795290799385)*x_ref[1]
        arg[(3, 0, 2, 1)]=0.13892785097*x[0]**o + (-0.120384696819)*x[0] + (0.867922708761)*x[1]**o + (-0.348264900593)*x[1]
        ref[(3, 0, 2, 1)]=0.13892785097*x_ref[0]**o + (-0.120384696819)*x_ref[0] + (0.867922708761)*x_ref[1]**o + (-0.348264900593)*x_ref[1]
        arg[(3, 0, 2, 2)]=0.510451893413*x[0]**o + (-0.0279959749437)*x[0] + (0.871826976061)*x[1]**o + (-0.999271795655)*x[1]
        ref[(3, 0, 2, 2)]=0.510451893413*x_ref[0]**o + (-0.0279959749437)*x_ref[0] + (0.871826976061)*x_ref[1]**o + (-0.999271795655)*x_ref[1]
        arg[(3, 1, 0, 0)]=-0.354629239334*x[0]**o + (0.954002826293)*x[0] + (-0.355058727653)*x[1]**o + (0.785262232284)*x[1]
        ref[(3, 1, 0, 0)]=-0.354629239334*x_ref[0]**o + (0.954002826293)*x_ref[0] + (-0.355058727653)*x_ref[1]**o + (0.785262232284)*x_ref[1]
        arg[(3, 1, 0, 1)]=0.910976004277*x[0]**o + (-0.292278850747)*x[0] + (-0.279382648426)*x[1]**o + (0.190722941997)*x[1]
        ref[(3, 1, 0, 1)]=0.910976004277*x_ref[0]**o + (-0.292278850747)*x_ref[0] + (-0.279382648426)*x_ref[1]**o + (0.190722941997)*x_ref[1]
        arg[(3, 1, 0, 2)]=0.910913521163*x[0]**o + (0.58668778579)*x[0] + (-0.226885218596)*x[1]**o + (-0.962117414359)*x[1]
        ref[(3, 1, 0, 2)]=0.910913521163*x_ref[0]**o + (0.58668778579)*x_ref[0] + (-0.226885218596)*x_ref[1]**o + (-0.962117414359)*x_ref[1]
        arg[(3, 1, 1, 0)]=0.367606278233*x[0]**o + (0.911186338932)*x[0] + (-0.0629052881115)*x[1]**o + (-0.0347593012107)*x[1]
        ref[(3, 1, 1, 0)]=0.367606278233*x_ref[0]**o + (0.911186338932)*x_ref[0] + (-0.0629052881115)*x_ref[1]**o + (-0.0347593012107)*x_ref[1]
        arg[(3, 1, 1, 1)]=0.706879721147*x[0]**o + (-0.153375061419)*x[0] + (0.937573114346)*x[1]**o + (-0.177969119191)*x[1]
        ref[(3, 1, 1, 1)]=0.706879721147*x_ref[0]**o + (-0.153375061419)*x_ref[0] + (0.937573114346)*x_ref[1]**o + (-0.177969119191)*x_ref[1]
        arg[(3, 1, 1, 2)]=0.0669105164676*x[0]**o + (-0.346037124843)*x[0] + (0.305107375629)*x[1]**o + (-0.71648613994)*x[1]
        ref[(3, 1, 1, 2)]=0.0669105164676*x_ref[0]**o + (-0.346037124843)*x_ref[0] + (0.305107375629)*x_ref[1]**o + (-0.71648613994)*x_ref[1]
        arg[(3, 1, 2, 0)]=0.848816195694*x[0]**o + (-0.196064797855)*x[0] + (0.170190251012)*x[1]**o + (-0.698515201588)*x[1]
        ref[(3, 1, 2, 0)]=0.848816195694*x_ref[0]**o + (-0.196064797855)*x_ref[0] + (0.170190251012)*x_ref[1]**o + (-0.698515201588)*x_ref[1]
        arg[(3, 1, 2, 1)]=0.668437983879*x[0]**o + (-0.0341586394508)*x[0] + (-0.872888731919)*x[1]**o + (0.223671108555)*x[1]
        ref[(3, 1, 2, 1)]=0.668437983879*x_ref[0]**o + (-0.0341586394508)*x_ref[0] + (-0.872888731919)*x_ref[1]**o + (0.223671108555)*x_ref[1]
        arg[(3, 1, 2, 2)]=0.520126678613*x[0]**o + (-0.58628734018)*x[0] + (0.635905852699)*x[1]**o + (-0.0361314094571)*x[1]
        ref[(3, 1, 2, 2)]=0.520126678613*x_ref[0]**o + (-0.58628734018)*x_ref[0] + (0.635905852699)*x_ref[1]**o + (-0.0361314094571)*x_ref[1]
        arg[(3, 2, 0, 0)]=-0.73226518906*x[0]**o + (-0.818487519105)*x[0] + (0.127476321608)*x[1]**o + (-0.33515070501)*x[1]
        ref[(3, 2, 0, 0)]=-0.73226518906*x_ref[0]**o + (-0.818487519105)*x_ref[0] + (0.127476321608)*x_ref[1]**o + (-0.33515070501)*x_ref[1]
        arg[(3, 2, 0, 1)]=0.408319001816*x[0]**o + (0.561568073072)*x[0] + (-0.227529498181)*x[1]**o + (-0.0203392295182)*x[1]
        ref[(3, 2, 0, 1)]=0.408319001816*x_ref[0]**o + (0.561568073072)*x_ref[0] + (-0.227529498181)*x_ref[1]**o + (-0.0203392295182)*x_ref[1]
        arg[(3, 2, 0, 2)]=-0.152396334863*x[0]**o + (-0.39812524593)*x[0] + (-0.292580147307)*x[1]**o + (-0.0277401222759)*x[1]
        ref[(3, 2, 0, 2)]=-0.152396334863*x_ref[0]**o + (-0.39812524593)*x_ref[0] + (-0.292580147307)*x_ref[1]**o + (-0.0277401222759)*x_ref[1]
        arg[(3, 2, 1, 0)]=0.261769729682*x[0]**o + (-0.74381956573)*x[0] + (0.85426807143)*x[1]**o + (-0.381815747646)*x[1]
        ref[(3, 2, 1, 0)]=0.261769729682*x_ref[0]**o + (-0.74381956573)*x_ref[0] + (0.85426807143)*x_ref[1]**o + (-0.381815747646)*x_ref[1]
        arg[(3, 2, 1, 1)]=-0.394708990357*x[0]**o + (-0.0269424888747)*x[0] + (0.0182508705843)*x[1]**o + (-0.945418235002)*x[1]
        ref[(3, 2, 1, 1)]=-0.394708990357*x_ref[0]**o + (-0.0269424888747)*x_ref[0] + (0.0182508705843)*x_ref[1]**o + (-0.945418235002)*x_ref[1]
        arg[(3, 2, 1, 2)]=-0.929354307528*x[0]**o + (-0.113096321066)*x[0] + (-0.979331963943)*x[1]**o + (0.931242918512)*x[1]
        ref[(3, 2, 1, 2)]=-0.929354307528*x_ref[0]**o + (-0.113096321066)*x_ref[0] + (-0.979331963943)*x_ref[1]**o + (0.931242918512)*x_ref[1]
        arg[(3, 2, 2, 0)]=-0.210675495547*x[0]**o + (0.543215090218)*x[0] + (-0.769616110227)*x[1]**o + (0.824210371726)*x[1]
        ref[(3, 2, 2, 0)]=-0.210675495547*x_ref[0]**o + (0.543215090218)*x_ref[0] + (-0.769616110227)*x_ref[1]**o + (0.824210371726)*x_ref[1]
        arg[(3, 2, 2, 1)]=0.739836674585*x[0]**o + (0.407877755956)*x[0] + (0.205767308711)*x[1]**o + (0.753146337349)*x[1]
        ref[(3, 2, 2, 1)]=0.739836674585*x_ref[0]**o + (0.407877755956)*x_ref[0] + (0.205767308711)*x_ref[1]**o + (0.753146337349)*x_ref[1]
        arg[(3, 2, 2, 2)]=-0.590096465119*x[0]**o + (-0.547072883477)*x[0] + (0.549777686764)*x[1]**o + (-0.161084420711)*x[1]
        ref[(3, 2, 2, 2)]=-0.590096465119*x_ref[0]**o + (-0.547072883477)*x_ref[0] + (0.549777686764)*x_ref[1]**o + (-0.161084420711)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.0653840454948*x[2]**o + (-0.25182164455)*x[2]
            ref[(0, 0, 0, 0)]+=-0.0653840454948*x_ref[2]**o + (-0.25182164455)*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.751029586034*x[2]**o + (-0.595431869819)*x[2]
            ref[(0, 0, 0, 1)]+=0.751029586034*x_ref[2]**o + (-0.595431869819)*x_ref[2]
            arg[(0, 0, 0, 2)]+=-0.147734098002*x[2]**o + (-0.0813095692009)*x[2]
            ref[(0, 0, 0, 2)]+=-0.147734098002*x_ref[2]**o + (-0.0813095692009)*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.055026789775*x[2]**o + (-0.142389572744)*x[2]
            ref[(0, 0, 1, 0)]+=0.055026789775*x_ref[2]**o + (-0.142389572744)*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.972716257174*x[2]**o + (-0.00947590238948)*x[2]
            ref[(0, 0, 1, 1)]+=0.972716257174*x_ref[2]**o + (-0.00947590238948)*x_ref[2]
            arg[(0, 0, 1, 2)]+=0.916503595524*x[2]**o + (0.0875918772045)*x[2]
            ref[(0, 0, 1, 2)]+=0.916503595524*x_ref[2]**o + (0.0875918772045)*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.0860989895979*x[2]**o + (-0.846842804266)*x[2]
            ref[(0, 0, 2, 0)]+=-0.0860989895979*x_ref[2]**o + (-0.846842804266)*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.0612693074881*x[2]**o + (0.0437334002565)*x[2]
            ref[(0, 0, 2, 1)]+=0.0612693074881*x_ref[2]**o + (0.0437334002565)*x_ref[2]
            arg[(0, 0, 2, 2)]+=-0.851116242448*x[2]**o + (-0.769314512331)*x[2]
            ref[(0, 0, 2, 2)]+=-0.851116242448*x_ref[2]**o + (-0.769314512331)*x_ref[2]
            arg[(0, 1, 0, 0)]+=0.112730287057*x[2]**o + (-0.637124847367)*x[2]
            ref[(0, 1, 0, 0)]+=0.112730287057*x_ref[2]**o + (-0.637124847367)*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.0748776077105*x[2]**o + (0.647611346559)*x[2]
            ref[(0, 1, 0, 1)]+=-0.0748776077105*x_ref[2]**o + (0.647611346559)*x_ref[2]
            arg[(0, 1, 0, 2)]+=0.770808199845*x[2]**o + (0.290660180385)*x[2]
            ref[(0, 1, 0, 2)]+=0.770808199845*x_ref[2]**o + (0.290660180385)*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.271878970265*x[2]**o + (0.90616866031)*x[2]
            ref[(0, 1, 1, 0)]+=-0.271878970265*x_ref[2]**o + (0.90616866031)*x_ref[2]
            arg[(0, 1, 1, 1)]+=0.579124805311*x[2]**o + (-0.0859031386061)*x[2]
            ref[(0, 1, 1, 1)]+=0.579124805311*x_ref[2]**o + (-0.0859031386061)*x_ref[2]
            arg[(0, 1, 1, 2)]+=-0.743010786649*x[2]**o + (0.0542894875732)*x[2]
            ref[(0, 1, 1, 2)]+=-0.743010786649*x_ref[2]**o + (0.0542894875732)*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.728689108923*x[2]**o + (-0.605418346831)*x[2]
            ref[(0, 1, 2, 0)]+=-0.728689108923*x_ref[2]**o + (-0.605418346831)*x_ref[2]
            arg[(0, 1, 2, 1)]+=0.459763484289*x[2]**o + (-0.582926023527)*x[2]
            ref[(0, 1, 2, 1)]+=0.459763484289*x_ref[2]**o + (-0.582926023527)*x_ref[2]
            arg[(0, 1, 2, 2)]+=-0.754920266874*x[2]**o + (-0.53703779285)*x[2]
            ref[(0, 1, 2, 2)]+=-0.754920266874*x_ref[2]**o + (-0.53703779285)*x_ref[2]
            arg[(0, 2, 0, 0)]+=0.00889069049757*x[2]**o + (-0.381955670888)*x[2]
            ref[(0, 2, 0, 0)]+=0.00889069049757*x_ref[2]**o + (-0.381955670888)*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.301810389325*x[2]**o + (0.651401588572)*x[2]
            ref[(0, 2, 0, 1)]+=-0.301810389325*x_ref[2]**o + (0.651401588572)*x_ref[2]
            arg[(0, 2, 0, 2)]+=0.537405522441*x[2]**o + (0.467873774901)*x[2]
            ref[(0, 2, 0, 2)]+=0.537405522441*x_ref[2]**o + (0.467873774901)*x_ref[2]
            arg[(0, 2, 1, 0)]+=-0.574582896779*x[2]**o + (0.458919249694)*x[2]
            ref[(0, 2, 1, 0)]+=-0.574582896779*x_ref[2]**o + (0.458919249694)*x_ref[2]
            arg[(0, 2, 1, 1)]+=0.0665506182916*x[2]**o + (0.126473359135)*x[2]
            ref[(0, 2, 1, 1)]+=0.0665506182916*x_ref[2]**o + (0.126473359135)*x_ref[2]
            arg[(0, 2, 1, 2)]+=0.565813995703*x[2]**o + (0.723958595332)*x[2]
            ref[(0, 2, 1, 2)]+=0.565813995703*x_ref[2]**o + (0.723958595332)*x_ref[2]
            arg[(0, 2, 2, 0)]+=-0.413308307052*x[2]**o + (0.560857673251)*x[2]
            ref[(0, 2, 2, 0)]+=-0.413308307052*x_ref[2]**o + (0.560857673251)*x_ref[2]
            arg[(0, 2, 2, 1)]+=-0.970423850328*x[2]**o + (0.0107252240923)*x[2]
            ref[(0, 2, 2, 1)]+=-0.970423850328*x_ref[2]**o + (0.0107252240923)*x_ref[2]
            arg[(0, 2, 2, 2)]+=-0.984822671715*x[2]**o + (-0.338237157141)*x[2]
            ref[(0, 2, 2, 2)]+=-0.984822671715*x_ref[2]**o + (-0.338237157141)*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.578876365152*x[2]**o + (-0.73572822613)*x[2]
            ref[(1, 0, 0, 0)]+=0.578876365152*x_ref[2]**o + (-0.73572822613)*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.450692208618*x[2]**o + (0.509317668314)*x[2]
            ref[(1, 0, 0, 1)]+=0.450692208618*x_ref[2]**o + (0.509317668314)*x_ref[2]
            arg[(1, 0, 0, 2)]+=-0.465462848129*x[2]**o + (0.65243321685)*x[2]
            ref[(1, 0, 0, 2)]+=-0.465462848129*x_ref[2]**o + (0.65243321685)*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.993823168048*x[2]**o + (0.395251085468)*x[2]
            ref[(1, 0, 1, 0)]+=-0.993823168048*x_ref[2]**o + (0.395251085468)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.768448259406*x[2]**o + (0.655550445147)*x[2]
            ref[(1, 0, 1, 1)]+=-0.768448259406*x_ref[2]**o + (0.655550445147)*x_ref[2]
            arg[(1, 0, 1, 2)]+=0.389374055009*x[2]**o + (-0.052969464743)*x[2]
            ref[(1, 0, 1, 2)]+=0.389374055009*x_ref[2]**o + (-0.052969464743)*x_ref[2]
            arg[(1, 0, 2, 0)]+=0.795035227741*x[2]**o + (-0.558134276388)*x[2]
            ref[(1, 0, 2, 0)]+=0.795035227741*x_ref[2]**o + (-0.558134276388)*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.570357826807*x[2]**o + (0.967071673057)*x[2]
            ref[(1, 0, 2, 1)]+=0.570357826807*x_ref[2]**o + (0.967071673057)*x_ref[2]
            arg[(1, 0, 2, 2)]+=-0.27354948102*x[2]**o + (0.95152535755)*x[2]
            ref[(1, 0, 2, 2)]+=-0.27354948102*x_ref[2]**o + (0.95152535755)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.0281342449303*x[2]**o + (0.779835278355)*x[2]
            ref[(1, 1, 0, 0)]+=0.0281342449303*x_ref[2]**o + (0.779835278355)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.297080874795*x[2]**o + (-0.91955225446)*x[2]
            ref[(1, 1, 0, 1)]+=0.297080874795*x_ref[2]**o + (-0.91955225446)*x_ref[2]
            arg[(1, 1, 0, 2)]+=0.0920907656412*x[2]**o + (-0.943731396986)*x[2]
            ref[(1, 1, 0, 2)]+=0.0920907656412*x_ref[2]**o + (-0.943731396986)*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.97760258054*x[2]**o + (0.0157532066365)*x[2]
            ref[(1, 1, 1, 0)]+=-0.97760258054*x_ref[2]**o + (0.0157532066365)*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.680392014377*x[2]**o + (-0.0594656398755)*x[2]
            ref[(1, 1, 1, 1)]+=0.680392014377*x_ref[2]**o + (-0.0594656398755)*x_ref[2]
            arg[(1, 1, 1, 2)]+=0.738928206599*x[2]**o + (0.329833544041)*x[2]
            ref[(1, 1, 1, 2)]+=0.738928206599*x_ref[2]**o + (0.329833544041)*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.347696799247*x[2]**o + (0.203198672124)*x[2]
            ref[(1, 1, 2, 0)]+=-0.347696799247*x_ref[2]**o + (0.203198672124)*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.447601684555*x[2]**o + (0.597542960355)*x[2]
            ref[(1, 1, 2, 1)]+=0.447601684555*x_ref[2]**o + (0.597542960355)*x_ref[2]
            arg[(1, 1, 2, 2)]+=-0.759250546252*x[2]**o + (0.730659754305)*x[2]
            ref[(1, 1, 2, 2)]+=-0.759250546252*x_ref[2]**o + (0.730659754305)*x_ref[2]
            arg[(1, 2, 0, 0)]+=0.499174672456*x[2]**o + (0.710445011198)*x[2]
            ref[(1, 2, 0, 0)]+=0.499174672456*x_ref[2]**o + (0.710445011198)*x_ref[2]
            arg[(1, 2, 0, 1)]+=0.241679507871*x[2]**o + (0.992665544612)*x[2]
            ref[(1, 2, 0, 1)]+=0.241679507871*x_ref[2]**o + (0.992665544612)*x_ref[2]
            arg[(1, 2, 0, 2)]+=-0.50443984015*x[2]**o + (0.85673796691)*x[2]
            ref[(1, 2, 0, 2)]+=-0.50443984015*x_ref[2]**o + (0.85673796691)*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.772067500182*x[2]**o + (0.342788415446)*x[2]
            ref[(1, 2, 1, 0)]+=0.772067500182*x_ref[2]**o + (0.342788415446)*x_ref[2]
            arg[(1, 2, 1, 1)]+=-0.544087133694*x[2]**o + (-0.672913956447)*x[2]
            ref[(1, 2, 1, 1)]+=-0.544087133694*x_ref[2]**o + (-0.672913956447)*x_ref[2]
            arg[(1, 2, 1, 2)]+=0.327675225255*x[2]**o + (0.994621739267)*x[2]
            ref[(1, 2, 1, 2)]+=0.327675225255*x_ref[2]**o + (0.994621739267)*x_ref[2]
            arg[(1, 2, 2, 0)]+=0.118527793274*x[2]**o + (-0.309722213382)*x[2]
            ref[(1, 2, 2, 0)]+=0.118527793274*x_ref[2]**o + (-0.309722213382)*x_ref[2]
            arg[(1, 2, 2, 1)]+=0.761751752095*x[2]**o + (-0.3906647767)*x[2]
            ref[(1, 2, 2, 1)]+=0.761751752095*x_ref[2]**o + (-0.3906647767)*x_ref[2]
            arg[(1, 2, 2, 2)]+=0.817749177171*x[2]**o + (0.517206360919)*x[2]
            ref[(1, 2, 2, 2)]+=0.817749177171*x_ref[2]**o + (0.517206360919)*x_ref[2]
            arg[(2, 0, 0, 0)]+=-0.258969869973*x[2]**o + (-0.198217128749)*x[2]
            ref[(2, 0, 0, 0)]+=-0.258969869973*x_ref[2]**o + (-0.198217128749)*x_ref[2]
            arg[(2, 0, 0, 1)]+=-0.988428205629*x[2]**o + (-0.494739050121)*x[2]
            ref[(2, 0, 0, 1)]+=-0.988428205629*x_ref[2]**o + (-0.494739050121)*x_ref[2]
            arg[(2, 0, 0, 2)]+=-0.778041658589*x[2]**o + (-0.273452284013)*x[2]
            ref[(2, 0, 0, 2)]+=-0.778041658589*x_ref[2]**o + (-0.273452284013)*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.300629041907*x[2]**o + (-0.819412522253)*x[2]
            ref[(2, 0, 1, 0)]+=-0.300629041907*x_ref[2]**o + (-0.819412522253)*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.353275993434*x[2]**o + (-0.552077860578)*x[2]
            ref[(2, 0, 1, 1)]+=0.353275993434*x_ref[2]**o + (-0.552077860578)*x_ref[2]
            arg[(2, 0, 1, 2)]+=-0.217311785963*x[2]**o + (-0.957130283522)*x[2]
            ref[(2, 0, 1, 2)]+=-0.217311785963*x_ref[2]**o + (-0.957130283522)*x_ref[2]
            arg[(2, 0, 2, 0)]+=-0.513616015227*x[2]**o + (0.607105535675)*x[2]
            ref[(2, 0, 2, 0)]+=-0.513616015227*x_ref[2]**o + (0.607105535675)*x_ref[2]
            arg[(2, 0, 2, 1)]+=0.570642487716*x[2]**o + (0.776767952941)*x[2]
            ref[(2, 0, 2, 1)]+=0.570642487716*x_ref[2]**o + (0.776767952941)*x_ref[2]
            arg[(2, 0, 2, 2)]+=-0.239840087904*x[2]**o + (0.984256723228)*x[2]
            ref[(2, 0, 2, 2)]+=-0.239840087904*x_ref[2]**o + (0.984256723228)*x_ref[2]
            arg[(2, 1, 0, 0)]+=-0.979964781672*x[2]**o + (0.942572192111)*x[2]
            ref[(2, 1, 0, 0)]+=-0.979964781672*x_ref[2]**o + (0.942572192111)*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.142949499468*x[2]**o + (0.593320068657)*x[2]
            ref[(2, 1, 0, 1)]+=-0.142949499468*x_ref[2]**o + (0.593320068657)*x_ref[2]
            arg[(2, 1, 0, 2)]+=-0.73272638582*x[2]**o + (-0.387830358891)*x[2]
            ref[(2, 1, 0, 2)]+=-0.73272638582*x_ref[2]**o + (-0.387830358891)*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.0546496715758*x[2]**o + (-0.690836566819)*x[2]
            ref[(2, 1, 1, 0)]+=0.0546496715758*x_ref[2]**o + (-0.690836566819)*x_ref[2]
            arg[(2, 1, 1, 1)]+=0.457064903937*x[2]**o + (-0.964956199082)*x[2]
            ref[(2, 1, 1, 1)]+=0.457064903937*x_ref[2]**o + (-0.964956199082)*x_ref[2]
            arg[(2, 1, 1, 2)]+=-0.886283458574*x[2]**o + (0.707158467803)*x[2]
            ref[(2, 1, 1, 2)]+=-0.886283458574*x_ref[2]**o + (0.707158467803)*x_ref[2]
            arg[(2, 1, 2, 0)]+=0.570335636296*x[2]**o + (-0.397401761579)*x[2]
            ref[(2, 1, 2, 0)]+=0.570335636296*x_ref[2]**o + (-0.397401761579)*x_ref[2]
            arg[(2, 1, 2, 1)]+=-0.17795440033*x[2]**o + (0.626446130758)*x[2]
            ref[(2, 1, 2, 1)]+=-0.17795440033*x_ref[2]**o + (0.626446130758)*x_ref[2]
            arg[(2, 1, 2, 2)]+=0.156671495659*x[2]**o + (0.973131737831)*x[2]
            ref[(2, 1, 2, 2)]+=0.156671495659*x_ref[2]**o + (0.973131737831)*x_ref[2]
            arg[(2, 2, 0, 0)]+=-0.599070285776*x[2]**o + (-0.666281681063)*x[2]
            ref[(2, 2, 0, 0)]+=-0.599070285776*x_ref[2]**o + (-0.666281681063)*x_ref[2]
            arg[(2, 2, 0, 1)]+=0.203297500954*x[2]**o + (-0.498925089115)*x[2]
            ref[(2, 2, 0, 1)]+=0.203297500954*x_ref[2]**o + (-0.498925089115)*x_ref[2]
            arg[(2, 2, 0, 2)]+=0.416719422629*x[2]**o + (-0.259539198428)*x[2]
            ref[(2, 2, 0, 2)]+=0.416719422629*x_ref[2]**o + (-0.259539198428)*x_ref[2]
            arg[(2, 2, 1, 0)]+=-0.673131243047*x[2]**o + (0.194668763242)*x[2]
            ref[(2, 2, 1, 0)]+=-0.673131243047*x_ref[2]**o + (0.194668763242)*x_ref[2]
            arg[(2, 2, 1, 1)]+=-0.0637412618748*x[2]**o + (-0.426878866992)*x[2]
            ref[(2, 2, 1, 1)]+=-0.0637412618748*x_ref[2]**o + (-0.426878866992)*x_ref[2]
            arg[(2, 2, 1, 2)]+=0.0342603105694*x[2]**o + (0.758260109007)*x[2]
            ref[(2, 2, 1, 2)]+=0.0342603105694*x_ref[2]**o + (0.758260109007)*x_ref[2]
            arg[(2, 2, 2, 0)]+=-0.761724520548*x[2]**o + (0.91336837518)*x[2]
            ref[(2, 2, 2, 0)]+=-0.761724520548*x_ref[2]**o + (0.91336837518)*x_ref[2]
            arg[(2, 2, 2, 1)]+=0.735816816052*x[2]**o + (-0.646744286729)*x[2]
            ref[(2, 2, 2, 1)]+=0.735816816052*x_ref[2]**o + (-0.646744286729)*x_ref[2]
            arg[(2, 2, 2, 2)]+=0.46159543021*x[2]**o + (0.960813293158)*x[2]
            ref[(2, 2, 2, 2)]+=0.46159543021*x_ref[2]**o + (0.960813293158)*x_ref[2]
            arg[(3, 0, 0, 0)]+=0.847457737561*x[2]**o + (0.332899731622)*x[2]
            ref[(3, 0, 0, 0)]+=0.847457737561*x_ref[2]**o + (0.332899731622)*x_ref[2]
            arg[(3, 0, 0, 1)]+=-0.781072534674*x[2]**o + (0.314971281642)*x[2]
            ref[(3, 0, 0, 1)]+=-0.781072534674*x_ref[2]**o + (0.314971281642)*x_ref[2]
            arg[(3, 0, 0, 2)]+=0.194982377407*x[2]**o + (0.959953812571)*x[2]
            ref[(3, 0, 0, 2)]+=0.194982377407*x_ref[2]**o + (0.959953812571)*x_ref[2]
            arg[(3, 0, 1, 0)]+=0.144202643401*x[2]**o + (0.541587202762)*x[2]
            ref[(3, 0, 1, 0)]+=0.144202643401*x_ref[2]**o + (0.541587202762)*x_ref[2]
            arg[(3, 0, 1, 1)]+=-0.305638503215*x[2]**o + (0.0258555599715)*x[2]
            ref[(3, 0, 1, 1)]+=-0.305638503215*x_ref[2]**o + (0.0258555599715)*x_ref[2]
            arg[(3, 0, 1, 2)]+=0.114967829249*x[2]**o + (0.239158933366)*x[2]
            ref[(3, 0, 1, 2)]+=0.114967829249*x_ref[2]**o + (0.239158933366)*x_ref[2]
            arg[(3, 0, 2, 0)]+=0.474772936207*x[2]**o + (-0.745491781301)*x[2]
            ref[(3, 0, 2, 0)]+=0.474772936207*x_ref[2]**o + (-0.745491781301)*x_ref[2]
            arg[(3, 0, 2, 1)]+=-0.885966330242*x[2]**o + (-0.817682061687)*x[2]
            ref[(3, 0, 2, 1)]+=-0.885966330242*x_ref[2]**o + (-0.817682061687)*x_ref[2]
            arg[(3, 0, 2, 2)]+=-0.422723276034*x[2]**o + (0.471742052037)*x[2]
            ref[(3, 0, 2, 2)]+=-0.422723276034*x_ref[2]**o + (0.471742052037)*x_ref[2]
            arg[(3, 1, 0, 0)]+=0.842220358128*x[2]**o + (0.666462718505)*x[2]
            ref[(3, 1, 0, 0)]+=0.842220358128*x_ref[2]**o + (0.666462718505)*x_ref[2]
            arg[(3, 1, 0, 1)]+=-0.589858715305*x[2]**o + (0.751529928324)*x[2]
            ref[(3, 1, 0, 1)]+=-0.589858715305*x_ref[2]**o + (0.751529928324)*x_ref[2]
            arg[(3, 1, 0, 2)]+=0.831506476792*x[2]**o + (0.226732227925)*x[2]
            ref[(3, 1, 0, 2)]+=0.831506476792*x_ref[2]**o + (0.226732227925)*x_ref[2]
            arg[(3, 1, 1, 0)]+=0.4575315254*x[2]**o + (-0.607729676761)*x[2]
            ref[(3, 1, 1, 0)]+=0.4575315254*x_ref[2]**o + (-0.607729676761)*x_ref[2]
            arg[(3, 1, 1, 1)]+=-0.704155979794*x[2]**o + (-0.281393304318)*x[2]
            ref[(3, 1, 1, 1)]+=-0.704155979794*x_ref[2]**o + (-0.281393304318)*x_ref[2]
            arg[(3, 1, 1, 2)]+=0.73009013391*x[2]**o + (-0.845725388632)*x[2]
            ref[(3, 1, 1, 2)]+=0.73009013391*x_ref[2]**o + (-0.845725388632)*x_ref[2]
            arg[(3, 1, 2, 0)]+=0.764003500851*x[2]**o + (0.392938326424)*x[2]
            ref[(3, 1, 2, 0)]+=0.764003500851*x_ref[2]**o + (0.392938326424)*x_ref[2]
            arg[(3, 1, 2, 1)]+=0.0967575766899*x[2]**o + (-0.614286412607)*x[2]
            ref[(3, 1, 2, 1)]+=0.0967575766899*x_ref[2]**o + (-0.614286412607)*x_ref[2]
            arg[(3, 1, 2, 2)]+=0.457499831225*x[2]**o + (-0.630478870327)*x[2]
            ref[(3, 1, 2, 2)]+=0.457499831225*x_ref[2]**o + (-0.630478870327)*x_ref[2]
            arg[(3, 2, 0, 0)]+=-0.950302516705*x[2]**o + (0.901501154613)*x[2]
            ref[(3, 2, 0, 0)]+=-0.950302516705*x_ref[2]**o + (0.901501154613)*x_ref[2]
            arg[(3, 2, 0, 1)]+=-0.371289538367*x[2]**o + (0.319324237269)*x[2]
            ref[(3, 2, 0, 1)]+=-0.371289538367*x_ref[2]**o + (0.319324237269)*x_ref[2]
            arg[(3, 2, 0, 2)]+=-0.862044215097*x[2]**o + (-0.577983008197)*x[2]
            ref[(3, 2, 0, 2)]+=-0.862044215097*x_ref[2]**o + (-0.577983008197)*x_ref[2]
            arg[(3, 2, 1, 0)]+=0.330242251607*x[2]**o + (0.737659848122)*x[2]
            ref[(3, 2, 1, 0)]+=0.330242251607*x_ref[2]**o + (0.737659848122)*x_ref[2]
            arg[(3, 2, 1, 1)]+=-0.615559047061*x[2]**o + (0.421248885049)*x[2]
            ref[(3, 2, 1, 1)]+=-0.615559047061*x_ref[2]**o + (0.421248885049)*x_ref[2]
            arg[(3, 2, 1, 2)]+=0.254440306526*x[2]**o + (0.397763952172)*x[2]
            ref[(3, 2, 1, 2)]+=0.254440306526*x_ref[2]**o + (0.397763952172)*x_ref[2]
            arg[(3, 2, 2, 0)]+=0.717216705566*x[2]**o + (0.934436957694)*x[2]
            ref[(3, 2, 2, 0)]+=0.717216705566*x_ref[2]**o + (0.934436957694)*x_ref[2]
            arg[(3, 2, 2, 1)]+=0.202382227837*x[2]**o + (0.933673978761)*x[2]
            ref[(3, 2, 2, 1)]+=0.202382227837*x_ref[2]**o + (0.933673978761)*x_ref[2]
            arg[(3, 2, 2, 2)]+=-0.688132876321*x[2]**o + (0.823030690511)*x[2]
            ref[(3, 2, 2, 2)]+=-0.688132876321*x_ref[2]**o + (0.823030690511)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_ReducedSolution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedContinuousFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.306298862226*x[0] + (-0.460491692905)*x[1]
        ref=-0.306298862226*x_ref[0] + (-0.460491692905)*x_ref[1]
        if dim==3:
            arg+=(0.197235542626)*x[2]
            ref+=(0.197235542626)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_ReducedSolution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedContinuousFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=0.981987278747*x[0] + (0.739163256133)*x[1]
        ref[(0,)]=0.981987278747*x_ref[0] + (0.739163256133)*x_ref[1]
        arg[(1,)]=-0.566719052674*x[0] + (-0.0223829788224)*x[1]
        ref[(1,)]=-0.566719052674*x_ref[0] + (-0.0223829788224)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.153932086604*x[2]
            ref[(0,)]+=0.153932086604*x_ref[2]
            arg[(1,)]+=0.896117733729*x[2]
            ref[(1,)]+=0.896117733729*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_ReducedSolution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedContinuousFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref = Data(0,(2, 2),w_ref)
        arg[(0, 0)]=-0.951543082026*x[0] + (0.72305282865)*x[1]
        ref[(0, 0)]=-0.951543082026*x_ref[0] + (0.72305282865)*x_ref[1]
        arg[(0, 1)]=0.801299151045*x[0] + (-0.982627447104)*x[1]
        ref[(0, 1)]=0.801299151045*x_ref[0] + (-0.982627447104)*x_ref[1]
        arg[(1, 0)]=-0.856075600363*x[0] + (0.623225048835)*x[1]
        ref[(1, 0)]=-0.856075600363*x_ref[0] + (0.623225048835)*x_ref[1]
        arg[(1, 1)]=-0.58343772215*x[0] + (-0.772359360014)*x[1]
        ref[(1, 1)]=-0.58343772215*x_ref[0] + (-0.772359360014)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.0959611057032*x[2]
            ref[(0, 0)]+=0.0959611057032*x_ref[2]
            arg[(0, 1)]+=-0.509914884488*x[2]
            ref[(0, 1)]+=-0.509914884488*x_ref[2]
            arg[(1, 0)]+=-0.0211568455205*x[2]
            ref[(1, 0)]+=-0.0211568455205*x_ref[2]
            arg[(1, 1)]+=-0.642681565905*x[2]
            ref[(1, 1)]+=-0.642681565905*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_ReducedSolution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedContinuousFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 3),w)
        ref = Data(0,(2, 3, 3),w_ref)
        arg[(0, 0, 0)]=-0.917519987125*x[0] + (-0.162842730551)*x[1]
        ref[(0, 0, 0)]=-0.917519987125*x_ref[0] + (-0.162842730551)*x_ref[1]
        arg[(0, 0, 1)]=-0.468629749237*x[0] + (0.906354815956)*x[1]
        ref[(0, 0, 1)]=-0.468629749237*x_ref[0] + (0.906354815956)*x_ref[1]
        arg[(0, 0, 2)]=0.874235420441*x[0] + (0.446681682593)*x[1]
        ref[(0, 0, 2)]=0.874235420441*x_ref[0] + (0.446681682593)*x_ref[1]
        arg[(0, 1, 0)]=0.340243836341*x[0] + (-0.981329594172)*x[1]
        ref[(0, 1, 0)]=0.340243836341*x_ref[0] + (-0.981329594172)*x_ref[1]
        arg[(0, 1, 1)]=-0.0144514353865*x[0] + (-0.254294037656)*x[1]
        ref[(0, 1, 1)]=-0.0144514353865*x_ref[0] + (-0.254294037656)*x_ref[1]
        arg[(0, 1, 2)]=0.231292707356*x[0] + (0.186425405773)*x[1]
        ref[(0, 1, 2)]=0.231292707356*x_ref[0] + (0.186425405773)*x_ref[1]
        arg[(0, 2, 0)]=-0.613576419661*x[0] + (0.589734771601)*x[1]
        ref[(0, 2, 0)]=-0.613576419661*x_ref[0] + (0.589734771601)*x_ref[1]
        arg[(0, 2, 1)]=-0.677694485802*x[0] + (-0.337602923423)*x[1]
        ref[(0, 2, 1)]=-0.677694485802*x_ref[0] + (-0.337602923423)*x_ref[1]
        arg[(0, 2, 2)]=0.243806332523*x[0] + (-0.975918672413)*x[1]
        ref[(0, 2, 2)]=0.243806332523*x_ref[0] + (-0.975918672413)*x_ref[1]
        arg[(1, 0, 0)]=0.81812426468*x[0] + (-0.0321550328604)*x[1]
        ref[(1, 0, 0)]=0.81812426468*x_ref[0] + (-0.0321550328604)*x_ref[1]
        arg[(1, 0, 1)]=0.221479205578*x[0] + (-0.818111781866)*x[1]
        ref[(1, 0, 1)]=0.221479205578*x_ref[0] + (-0.818111781866)*x_ref[1]
        arg[(1, 0, 2)]=0.180227722423*x[0] + (-0.666225087967)*x[1]
        ref[(1, 0, 2)]=0.180227722423*x_ref[0] + (-0.666225087967)*x_ref[1]
        arg[(1, 1, 0)]=0.122361171863*x[0] + (-0.0497548848119)*x[1]
        ref[(1, 1, 0)]=0.122361171863*x_ref[0] + (-0.0497548848119)*x_ref[1]
        arg[(1, 1, 1)]=0.675224316312*x[0] + (-0.533079895089)*x[1]
        ref[(1, 1, 1)]=0.675224316312*x_ref[0] + (-0.533079895089)*x_ref[1]
        arg[(1, 1, 2)]=0.437166373882*x[0] + (-0.311665347371)*x[1]
        ref[(1, 1, 2)]=0.437166373882*x_ref[0] + (-0.311665347371)*x_ref[1]
        arg[(1, 2, 0)]=0.650058066457*x[0] + (0.485682016012)*x[1]
        ref[(1, 2, 0)]=0.650058066457*x_ref[0] + (0.485682016012)*x_ref[1]
        arg[(1, 2, 1)]=-0.489537514148*x[0] + (-0.64115126883)*x[1]
        ref[(1, 2, 1)]=-0.489537514148*x_ref[0] + (-0.64115126883)*x_ref[1]
        arg[(1, 2, 2)]=0.844290551701*x[0] + (-0.921063308416)*x[1]
        ref[(1, 2, 2)]=0.844290551701*x_ref[0] + (-0.921063308416)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.137264787304*x[2]
            ref[(0, 0, 0)]+=0.137264787304*x_ref[2]
            arg[(0, 0, 1)]+=0.570704719325*x[2]
            ref[(0, 0, 1)]+=0.570704719325*x_ref[2]
            arg[(0, 0, 2)]+=-0.204580243429*x[2]
            ref[(0, 0, 2)]+=-0.204580243429*x_ref[2]
            arg[(0, 1, 0)]+=-0.162058167625*x[2]
            ref[(0, 1, 0)]+=-0.162058167625*x_ref[2]
            arg[(0, 1, 1)]+=-0.710323231369*x[2]
            ref[(0, 1, 1)]+=-0.710323231369*x_ref[2]
            arg[(0, 1, 2)]+=0.79224282179*x[2]
            ref[(0, 1, 2)]+=0.79224282179*x_ref[2]
            arg[(0, 2, 0)]+=0.844753765341*x[2]
            ref[(0, 2, 0)]+=0.844753765341*x_ref[2]
            arg[(0, 2, 1)]+=0.854839692325*x[2]
            ref[(0, 2, 1)]+=0.854839692325*x_ref[2]
            arg[(0, 2, 2)]+=0.849737420944*x[2]
            ref[(0, 2, 2)]+=0.849737420944*x_ref[2]
            arg[(1, 0, 0)]+=0.43485024868*x[2]
            ref[(1, 0, 0)]+=0.43485024868*x_ref[2]
            arg[(1, 0, 1)]+=0.976330000691*x[2]
            ref[(1, 0, 1)]+=0.976330000691*x_ref[2]
            arg[(1, 0, 2)]+=0.989455058918*x[2]
            ref[(1, 0, 2)]+=0.989455058918*x_ref[2]
            arg[(1, 1, 0)]+=0.278873863159*x[2]
            ref[(1, 1, 0)]+=0.278873863159*x_ref[2]
            arg[(1, 1, 1)]+=0.0909421880225*x[2]
            ref[(1, 1, 1)]+=0.0909421880225*x_ref[2]
            arg[(1, 1, 2)]+=0.911586959659*x[2]
            ref[(1, 1, 2)]+=0.911586959659*x_ref[2]
            arg[(1, 2, 0)]+=0.582575470835*x[2]
            ref[(1, 2, 0)]+=0.582575470835*x_ref[2]
            arg[(1, 2, 1)]+=0.91206745008*x[2]
            ref[(1, 2, 1)]+=0.91206745008*x_ref[2]
            arg[(1, 2, 2)]+=0.932794285395*x[2]
            ref[(1, 2, 2)]+=0.932794285395*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_ReducedSolution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedContinuousFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 3, 3),w)
        ref = Data(0,(4, 4, 3, 3),w_ref)
        arg[(0, 0, 0, 0)]=-0.852805932094*x[0] + (-0.930986320116)*x[1]
        ref[(0, 0, 0, 0)]=-0.852805932094*x_ref[0] + (-0.930986320116)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.794178667899*x[0] + (0.673436509688)*x[1]
        ref[(0, 0, 0, 1)]=0.794178667899*x_ref[0] + (0.673436509688)*x_ref[1]
        arg[(0, 0, 0, 2)]=0.402110693362*x[0] + (0.0844702074725)*x[1]
        ref[(0, 0, 0, 2)]=0.402110693362*x_ref[0] + (0.0844702074725)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.553127283158*x[0] + (-0.160263464441)*x[1]
        ref[(0, 0, 1, 0)]=-0.553127283158*x_ref[0] + (-0.160263464441)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.550633414047*x[0] + (0.250908922837)*x[1]
        ref[(0, 0, 1, 1)]=0.550633414047*x_ref[0] + (0.250908922837)*x_ref[1]
        arg[(0, 0, 1, 2)]=0.853941300505*x[0] + (-0.296908145949)*x[1]
        ref[(0, 0, 1, 2)]=0.853941300505*x_ref[0] + (-0.296908145949)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.733678506977*x[0] + (-0.0537974115663)*x[1]
        ref[(0, 0, 2, 0)]=-0.733678506977*x_ref[0] + (-0.0537974115663)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.674058300132*x[0] + (0.00102819617103)*x[1]
        ref[(0, 0, 2, 1)]=-0.674058300132*x_ref[0] + (0.00102819617103)*x_ref[1]
        arg[(0, 0, 2, 2)]=-0.376279959576*x[0] + (0.0433428918851)*x[1]
        ref[(0, 0, 2, 2)]=-0.376279959576*x_ref[0] + (0.0433428918851)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.65031376942*x[0] + (0.709701894186)*x[1]
        ref[(0, 1, 0, 0)]=0.65031376942*x_ref[0] + (0.709701894186)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.607150242272*x[0] + (-0.539925317191)*x[1]
        ref[(0, 1, 0, 1)]=0.607150242272*x_ref[0] + (-0.539925317191)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.0407485155687*x[0] + (-0.350805884365)*x[1]
        ref[(0, 1, 0, 2)]=0.0407485155687*x_ref[0] + (-0.350805884365)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.167495858505*x[0] + (-0.0796413035958)*x[1]
        ref[(0, 1, 1, 0)]=0.167495858505*x_ref[0] + (-0.0796413035958)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.452896210708*x[0] + (-0.222316558847)*x[1]
        ref[(0, 1, 1, 1)]=-0.452896210708*x_ref[0] + (-0.222316558847)*x_ref[1]
        arg[(0, 1, 1, 2)]=-0.949908575133*x[0] + (-0.431534270807)*x[1]
        ref[(0, 1, 1, 2)]=-0.949908575133*x_ref[0] + (-0.431534270807)*x_ref[1]
        arg[(0, 1, 2, 0)]=0.185487289814*x[0] + (0.66172546278)*x[1]
        ref[(0, 1, 2, 0)]=0.185487289814*x_ref[0] + (0.66172546278)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.787288204375*x[0] + (-0.489802701585)*x[1]
        ref[(0, 1, 2, 1)]=0.787288204375*x_ref[0] + (-0.489802701585)*x_ref[1]
        arg[(0, 1, 2, 2)]=0.432612534085*x[0] + (0.373083856956)*x[1]
        ref[(0, 1, 2, 2)]=0.432612534085*x_ref[0] + (0.373083856956)*x_ref[1]
        arg[(0, 2, 0, 0)]=-0.86718573949*x[0] + (-0.94860595174)*x[1]
        ref[(0, 2, 0, 0)]=-0.86718573949*x_ref[0] + (-0.94860595174)*x_ref[1]
        arg[(0, 2, 0, 1)]=0.143154231221*x[0] + (-0.651450583839)*x[1]
        ref[(0, 2, 0, 1)]=0.143154231221*x_ref[0] + (-0.651450583839)*x_ref[1]
        arg[(0, 2, 0, 2)]=0.697359625319*x[0] + (0.427218845672)*x[1]
        ref[(0, 2, 0, 2)]=0.697359625319*x_ref[0] + (0.427218845672)*x_ref[1]
        arg[(0, 2, 1, 0)]=-0.813670167876*x[0] + (0.126112213101)*x[1]
        ref[(0, 2, 1, 0)]=-0.813670167876*x_ref[0] + (0.126112213101)*x_ref[1]
        arg[(0, 2, 1, 1)]=0.00464960155129*x[0] + (0.792738307996)*x[1]
        ref[(0, 2, 1, 1)]=0.00464960155129*x_ref[0] + (0.792738307996)*x_ref[1]
        arg[(0, 2, 1, 2)]=0.0802139868471*x[0] + (0.906581899886)*x[1]
        ref[(0, 2, 1, 2)]=0.0802139868471*x_ref[0] + (0.906581899886)*x_ref[1]
        arg[(0, 2, 2, 0)]=0.661251363598*x[0] + (-0.991643106995)*x[1]
        ref[(0, 2, 2, 0)]=0.661251363598*x_ref[0] + (-0.991643106995)*x_ref[1]
        arg[(0, 2, 2, 1)]=-0.907408871323*x[0] + (0.345874139172)*x[1]
        ref[(0, 2, 2, 1)]=-0.907408871323*x_ref[0] + (0.345874139172)*x_ref[1]
        arg[(0, 2, 2, 2)]=-0.5866195148*x[0] + (0.332045998306)*x[1]
        ref[(0, 2, 2, 2)]=-0.5866195148*x_ref[0] + (0.332045998306)*x_ref[1]
        arg[(0, 3, 0, 0)]=0.015483409348*x[0] + (-0.786314959393)*x[1]
        ref[(0, 3, 0, 0)]=0.015483409348*x_ref[0] + (-0.786314959393)*x_ref[1]
        arg[(0, 3, 0, 1)]=0.689832652006*x[0] + (-0.137758453303)*x[1]
        ref[(0, 3, 0, 1)]=0.689832652006*x_ref[0] + (-0.137758453303)*x_ref[1]
        arg[(0, 3, 0, 2)]=-0.673633470984*x[0] + (-0.541444443086)*x[1]
        ref[(0, 3, 0, 2)]=-0.673633470984*x_ref[0] + (-0.541444443086)*x_ref[1]
        arg[(0, 3, 1, 0)]=0.9567969491*x[0] + (-0.879441488105)*x[1]
        ref[(0, 3, 1, 0)]=0.9567969491*x_ref[0] + (-0.879441488105)*x_ref[1]
        arg[(0, 3, 1, 1)]=-0.705850358539*x[0] + (-0.599440401366)*x[1]
        ref[(0, 3, 1, 1)]=-0.705850358539*x_ref[0] + (-0.599440401366)*x_ref[1]
        arg[(0, 3, 1, 2)]=-0.727083334638*x[0] + (0.387708903857)*x[1]
        ref[(0, 3, 1, 2)]=-0.727083334638*x_ref[0] + (0.387708903857)*x_ref[1]
        arg[(0, 3, 2, 0)]=0.330030702175*x[0] + (-0.470030388366)*x[1]
        ref[(0, 3, 2, 0)]=0.330030702175*x_ref[0] + (-0.470030388366)*x_ref[1]
        arg[(0, 3, 2, 1)]=0.550147522644*x[0] + (-0.123342179299)*x[1]
        ref[(0, 3, 2, 1)]=0.550147522644*x_ref[0] + (-0.123342179299)*x_ref[1]
        arg[(0, 3, 2, 2)]=0.19456620774*x[0] + (-0.0753667220358)*x[1]
        ref[(0, 3, 2, 2)]=0.19456620774*x_ref[0] + (-0.0753667220358)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.135085273521*x[0] + (0.15134121821)*x[1]
        ref[(1, 0, 0, 0)]=0.135085273521*x_ref[0] + (0.15134121821)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.965570953823*x[0] + (-0.522239277338)*x[1]
        ref[(1, 0, 0, 1)]=-0.965570953823*x_ref[0] + (-0.522239277338)*x_ref[1]
        arg[(1, 0, 0, 2)]=-0.419389763697*x[0] + (-0.978857311942)*x[1]
        ref[(1, 0, 0, 2)]=-0.419389763697*x_ref[0] + (-0.978857311942)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.00335499753328*x[0] + (-0.687831911484)*x[1]
        ref[(1, 0, 1, 0)]=0.00335499753328*x_ref[0] + (-0.687831911484)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.0196323100298*x[0] + (0.939080267695)*x[1]
        ref[(1, 0, 1, 1)]=0.0196323100298*x_ref[0] + (0.939080267695)*x_ref[1]
        arg[(1, 0, 1, 2)]=0.121659831277*x[0] + (0.753192640878)*x[1]
        ref[(1, 0, 1, 2)]=0.121659831277*x_ref[0] + (0.753192640878)*x_ref[1]
        arg[(1, 0, 2, 0)]=0.357541789801*x[0] + (0.423518371008)*x[1]
        ref[(1, 0, 2, 0)]=0.357541789801*x_ref[0] + (0.423518371008)*x_ref[1]
        arg[(1, 0, 2, 1)]=-0.883866949007*x[0] + (0.702954664957)*x[1]
        ref[(1, 0, 2, 1)]=-0.883866949007*x_ref[0] + (0.702954664957)*x_ref[1]
        arg[(1, 0, 2, 2)]=-0.54880190222*x[0] + (-0.871543541633)*x[1]
        ref[(1, 0, 2, 2)]=-0.54880190222*x_ref[0] + (-0.871543541633)*x_ref[1]
        arg[(1, 1, 0, 0)]=0.131532607708*x[0] + (-0.602938288358)*x[1]
        ref[(1, 1, 0, 0)]=0.131532607708*x_ref[0] + (-0.602938288358)*x_ref[1]
        arg[(1, 1, 0, 1)]=-0.815932275297*x[0] + (-0.0709802690671)*x[1]
        ref[(1, 1, 0, 1)]=-0.815932275297*x_ref[0] + (-0.0709802690671)*x_ref[1]
        arg[(1, 1, 0, 2)]=0.893670935143*x[0] + (0.609009826383)*x[1]
        ref[(1, 1, 0, 2)]=0.893670935143*x_ref[0] + (0.609009826383)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.181821038914*x[0] + (-0.26198792012)*x[1]
        ref[(1, 1, 1, 0)]=0.181821038914*x_ref[0] + (-0.26198792012)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.586299532057*x[0] + (-0.725949249668)*x[1]
        ref[(1, 1, 1, 1)]=0.586299532057*x_ref[0] + (-0.725949249668)*x_ref[1]
        arg[(1, 1, 1, 2)]=-0.0391912467163*x[0] + (-0.313162000351)*x[1]
        ref[(1, 1, 1, 2)]=-0.0391912467163*x_ref[0] + (-0.313162000351)*x_ref[1]
        arg[(1, 1, 2, 0)]=0.325035844516*x[0] + (-0.718558084378)*x[1]
        ref[(1, 1, 2, 0)]=0.325035844516*x_ref[0] + (-0.718558084378)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.24329544699*x[0] + (-0.733336288556)*x[1]
        ref[(1, 1, 2, 1)]=-0.24329544699*x_ref[0] + (-0.733336288556)*x_ref[1]
        arg[(1, 1, 2, 2)]=-0.476725889364*x[0] + (0.55650487663)*x[1]
        ref[(1, 1, 2, 2)]=-0.476725889364*x_ref[0] + (0.55650487663)*x_ref[1]
        arg[(1, 2, 0, 0)]=0.210552848024*x[0] + (0.778310425988)*x[1]
        ref[(1, 2, 0, 0)]=0.210552848024*x_ref[0] + (0.778310425988)*x_ref[1]
        arg[(1, 2, 0, 1)]=0.689527494658*x[0] + (-0.708238380289)*x[1]
        ref[(1, 2, 0, 1)]=0.689527494658*x_ref[0] + (-0.708238380289)*x_ref[1]
        arg[(1, 2, 0, 2)]=-0.880312712856*x[0] + (0.141423590946)*x[1]
        ref[(1, 2, 0, 2)]=-0.880312712856*x_ref[0] + (0.141423590946)*x_ref[1]
        arg[(1, 2, 1, 0)]=0.902425131282*x[0] + (-0.201930990917)*x[1]
        ref[(1, 2, 1, 0)]=0.902425131282*x_ref[0] + (-0.201930990917)*x_ref[1]
        arg[(1, 2, 1, 1)]=0.177271586378*x[0] + (0.871658012608)*x[1]
        ref[(1, 2, 1, 1)]=0.177271586378*x_ref[0] + (0.871658012608)*x_ref[1]
        arg[(1, 2, 1, 2)]=-0.769996860206*x[0] + (0.309621662064)*x[1]
        ref[(1, 2, 1, 2)]=-0.769996860206*x_ref[0] + (0.309621662064)*x_ref[1]
        arg[(1, 2, 2, 0)]=0.623468227598*x[0] + (-0.597481208421)*x[1]
        ref[(1, 2, 2, 0)]=0.623468227598*x_ref[0] + (-0.597481208421)*x_ref[1]
        arg[(1, 2, 2, 1)]=-0.703106083328*x[0] + (-0.645196152136)*x[1]
        ref[(1, 2, 2, 1)]=-0.703106083328*x_ref[0] + (-0.645196152136)*x_ref[1]
        arg[(1, 2, 2, 2)]=-0.0652158517545*x[0] + (0.1808877588)*x[1]
        ref[(1, 2, 2, 2)]=-0.0652158517545*x_ref[0] + (0.1808877588)*x_ref[1]
        arg[(1, 3, 0, 0)]=-0.440779607206*x[0] + (-0.795535927912)*x[1]
        ref[(1, 3, 0, 0)]=-0.440779607206*x_ref[0] + (-0.795535927912)*x_ref[1]
        arg[(1, 3, 0, 1)]=0.858764175858*x[0] + (-0.213580819247)*x[1]
        ref[(1, 3, 0, 1)]=0.858764175858*x_ref[0] + (-0.213580819247)*x_ref[1]
        arg[(1, 3, 0, 2)]=0.488199391656*x[0] + (-0.353274988975)*x[1]
        ref[(1, 3, 0, 2)]=0.488199391656*x_ref[0] + (-0.353274988975)*x_ref[1]
        arg[(1, 3, 1, 0)]=-0.195696665391*x[0] + (-0.198785314864)*x[1]
        ref[(1, 3, 1, 0)]=-0.195696665391*x_ref[0] + (-0.198785314864)*x_ref[1]
        arg[(1, 3, 1, 1)]=0.640348245369*x[0] + (-0.527680503282)*x[1]
        ref[(1, 3, 1, 1)]=0.640348245369*x_ref[0] + (-0.527680503282)*x_ref[1]
        arg[(1, 3, 1, 2)]=0.0265698462816*x[0] + (0.309728146396)*x[1]
        ref[(1, 3, 1, 2)]=0.0265698462816*x_ref[0] + (0.309728146396)*x_ref[1]
        arg[(1, 3, 2, 0)]=-0.00801906921662*x[0] + (0.674369637155)*x[1]
        ref[(1, 3, 2, 0)]=-0.00801906921662*x_ref[0] + (0.674369637155)*x_ref[1]
        arg[(1, 3, 2, 1)]=-0.939523844745*x[0] + (0.98445090143)*x[1]
        ref[(1, 3, 2, 1)]=-0.939523844745*x_ref[0] + (0.98445090143)*x_ref[1]
        arg[(1, 3, 2, 2)]=-0.611692119072*x[0] + (-0.00804038346086)*x[1]
        ref[(1, 3, 2, 2)]=-0.611692119072*x_ref[0] + (-0.00804038346086)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.112441734344*x[0] + (0.522267831028)*x[1]
        ref[(2, 0, 0, 0)]=0.112441734344*x_ref[0] + (0.522267831028)*x_ref[1]
        arg[(2, 0, 0, 1)]=-0.0119964418866*x[0] + (0.857940349705)*x[1]
        ref[(2, 0, 0, 1)]=-0.0119964418866*x_ref[0] + (0.857940349705)*x_ref[1]
        arg[(2, 0, 0, 2)]=0.229572272248*x[0] + (-0.519557251497)*x[1]
        ref[(2, 0, 0, 2)]=0.229572272248*x_ref[0] + (-0.519557251497)*x_ref[1]
        arg[(2, 0, 1, 0)]=-0.482761437973*x[0] + (-0.849330262933)*x[1]
        ref[(2, 0, 1, 0)]=-0.482761437973*x_ref[0] + (-0.849330262933)*x_ref[1]
        arg[(2, 0, 1, 1)]=0.857662332562*x[0] + (-0.780380788033)*x[1]
        ref[(2, 0, 1, 1)]=0.857662332562*x_ref[0] + (-0.780380788033)*x_ref[1]
        arg[(2, 0, 1, 2)]=0.963633663935*x[0] + (0.493906971477)*x[1]
        ref[(2, 0, 1, 2)]=0.963633663935*x_ref[0] + (0.493906971477)*x_ref[1]
        arg[(2, 0, 2, 0)]=-0.68427753626*x[0] + (0.613019517175)*x[1]
        ref[(2, 0, 2, 0)]=-0.68427753626*x_ref[0] + (0.613019517175)*x_ref[1]
        arg[(2, 0, 2, 1)]=-0.745304659264*x[0] + (0.658729556878)*x[1]
        ref[(2, 0, 2, 1)]=-0.745304659264*x_ref[0] + (0.658729556878)*x_ref[1]
        arg[(2, 0, 2, 2)]=0.935155079145*x[0] + (-0.333275948086)*x[1]
        ref[(2, 0, 2, 2)]=0.935155079145*x_ref[0] + (-0.333275948086)*x_ref[1]
        arg[(2, 1, 0, 0)]=-0.93355172476*x[0] + (0.738017661472)*x[1]
        ref[(2, 1, 0, 0)]=-0.93355172476*x_ref[0] + (0.738017661472)*x_ref[1]
        arg[(2, 1, 0, 1)]=-0.201295444092*x[0] + (0.400535888822)*x[1]
        ref[(2, 1, 0, 1)]=-0.201295444092*x_ref[0] + (0.400535888822)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.0608050583269*x[0] + (0.25096601028)*x[1]
        ref[(2, 1, 0, 2)]=-0.0608050583269*x_ref[0] + (0.25096601028)*x_ref[1]
        arg[(2, 1, 1, 0)]=-0.770490629128*x[0] + (-0.993674267129)*x[1]
        ref[(2, 1, 1, 0)]=-0.770490629128*x_ref[0] + (-0.993674267129)*x_ref[1]
        arg[(2, 1, 1, 1)]=-0.115096981581*x[0] + (-0.613638251284)*x[1]
        ref[(2, 1, 1, 1)]=-0.115096981581*x_ref[0] + (-0.613638251284)*x_ref[1]
        arg[(2, 1, 1, 2)]=-0.857962254159*x[0] + (-0.16674216532)*x[1]
        ref[(2, 1, 1, 2)]=-0.857962254159*x_ref[0] + (-0.16674216532)*x_ref[1]
        arg[(2, 1, 2, 0)]=0.218683982679*x[0] + (-0.389364484899)*x[1]
        ref[(2, 1, 2, 0)]=0.218683982679*x_ref[0] + (-0.389364484899)*x_ref[1]
        arg[(2, 1, 2, 1)]=-0.338764429297*x[0] + (0.292175242853)*x[1]
        ref[(2, 1, 2, 1)]=-0.338764429297*x_ref[0] + (0.292175242853)*x_ref[1]
        arg[(2, 1, 2, 2)]=-0.480366490193*x[0] + (-0.560564492226)*x[1]
        ref[(2, 1, 2, 2)]=-0.480366490193*x_ref[0] + (-0.560564492226)*x_ref[1]
        arg[(2, 2, 0, 0)]=-0.00846369026793*x[0] + (-0.557976960326)*x[1]
        ref[(2, 2, 0, 0)]=-0.00846369026793*x_ref[0] + (-0.557976960326)*x_ref[1]
        arg[(2, 2, 0, 1)]=-0.696900990921*x[0] + (-0.458000967684)*x[1]
        ref[(2, 2, 0, 1)]=-0.696900990921*x_ref[0] + (-0.458000967684)*x_ref[1]
        arg[(2, 2, 0, 2)]=-0.0697813097839*x[0] + (0.123984169069)*x[1]
        ref[(2, 2, 0, 2)]=-0.0697813097839*x_ref[0] + (0.123984169069)*x_ref[1]
        arg[(2, 2, 1, 0)]=-0.639615881399*x[0] + (0.0265773019396)*x[1]
        ref[(2, 2, 1, 0)]=-0.639615881399*x_ref[0] + (0.0265773019396)*x_ref[1]
        arg[(2, 2, 1, 1)]=0.703898593984*x[0] + (-0.0927260658625)*x[1]
        ref[(2, 2, 1, 1)]=0.703898593984*x_ref[0] + (-0.0927260658625)*x_ref[1]
        arg[(2, 2, 1, 2)]=0.975703895145*x[0] + (0.71973099972)*x[1]
        ref[(2, 2, 1, 2)]=0.975703895145*x_ref[0] + (0.71973099972)*x_ref[1]
        arg[(2, 2, 2, 0)]=-0.559472020573*x[0] + (-0.515325254649)*x[1]
        ref[(2, 2, 2, 0)]=-0.559472020573*x_ref[0] + (-0.515325254649)*x_ref[1]
        arg[(2, 2, 2, 1)]=-0.775225705406*x[0] + (0.84714080791)*x[1]
        ref[(2, 2, 2, 1)]=-0.775225705406*x_ref[0] + (0.84714080791)*x_ref[1]
        arg[(2, 2, 2, 2)]=-0.915079755242*x[0] + (-0.485300882466)*x[1]
        ref[(2, 2, 2, 2)]=-0.915079755242*x_ref[0] + (-0.485300882466)*x_ref[1]
        arg[(2, 3, 0, 0)]=0.142765121327*x[0] + (0.178272441902)*x[1]
        ref[(2, 3, 0, 0)]=0.142765121327*x_ref[0] + (0.178272441902)*x_ref[1]
        arg[(2, 3, 0, 1)]=-0.869618231352*x[0] + (0.686906595408)*x[1]
        ref[(2, 3, 0, 1)]=-0.869618231352*x_ref[0] + (0.686906595408)*x_ref[1]
        arg[(2, 3, 0, 2)]=0.139704179207*x[0] + (0.526093559529)*x[1]
        ref[(2, 3, 0, 2)]=0.139704179207*x_ref[0] + (0.526093559529)*x_ref[1]
        arg[(2, 3, 1, 0)]=0.338419272414*x[0] + (0.982248669015)*x[1]
        ref[(2, 3, 1, 0)]=0.338419272414*x_ref[0] + (0.982248669015)*x_ref[1]
        arg[(2, 3, 1, 1)]=-0.915286354049*x[0] + (-0.919682211606)*x[1]
        ref[(2, 3, 1, 1)]=-0.915286354049*x_ref[0] + (-0.919682211606)*x_ref[1]
        arg[(2, 3, 1, 2)]=0.622216452454*x[0] + (-0.516316475153)*x[1]
        ref[(2, 3, 1, 2)]=0.622216452454*x_ref[0] + (-0.516316475153)*x_ref[1]
        arg[(2, 3, 2, 0)]=-0.944004129504*x[0] + (-0.601651929319)*x[1]
        ref[(2, 3, 2, 0)]=-0.944004129504*x_ref[0] + (-0.601651929319)*x_ref[1]
        arg[(2, 3, 2, 1)]=-0.392224246111*x[0] + (0.661557078745)*x[1]
        ref[(2, 3, 2, 1)]=-0.392224246111*x_ref[0] + (0.661557078745)*x_ref[1]
        arg[(2, 3, 2, 2)]=-0.315156870712*x[0] + (-0.379572821707)*x[1]
        ref[(2, 3, 2, 2)]=-0.315156870712*x_ref[0] + (-0.379572821707)*x_ref[1]
        arg[(3, 0, 0, 0)]=0.792009362365*x[0] + (0.725497104566)*x[1]
        ref[(3, 0, 0, 0)]=0.792009362365*x_ref[0] + (0.725497104566)*x_ref[1]
        arg[(3, 0, 0, 1)]=0.894971320418*x[0] + (-0.906350636027)*x[1]
        ref[(3, 0, 0, 1)]=0.894971320418*x_ref[0] + (-0.906350636027)*x_ref[1]
        arg[(3, 0, 0, 2)]=-0.743664289226*x[0] + (0.644919225435)*x[1]
        ref[(3, 0, 0, 2)]=-0.743664289226*x_ref[0] + (0.644919225435)*x_ref[1]
        arg[(3, 0, 1, 0)]=0.336315349634*x[0] + (0.300569242374)*x[1]
        ref[(3, 0, 1, 0)]=0.336315349634*x_ref[0] + (0.300569242374)*x_ref[1]
        arg[(3, 0, 1, 1)]=-0.638473246917*x[0] + (0.179936763011)*x[1]
        ref[(3, 0, 1, 1)]=-0.638473246917*x_ref[0] + (0.179936763011)*x_ref[1]
        arg[(3, 0, 1, 2)]=0.0136596967709*x[0] + (0.184050575344)*x[1]
        ref[(3, 0, 1, 2)]=0.0136596967709*x_ref[0] + (0.184050575344)*x_ref[1]
        arg[(3, 0, 2, 0)]=-0.859756013648*x[0] + (-0.91396842866)*x[1]
        ref[(3, 0, 2, 0)]=-0.859756013648*x_ref[0] + (-0.91396842866)*x_ref[1]
        arg[(3, 0, 2, 1)]=-0.286216911357*x[0] + (0.710004625746)*x[1]
        ref[(3, 0, 2, 1)]=-0.286216911357*x_ref[0] + (0.710004625746)*x_ref[1]
        arg[(3, 0, 2, 2)]=0.707006098895*x[0] + (0.666771974543)*x[1]
        ref[(3, 0, 2, 2)]=0.707006098895*x_ref[0] + (0.666771974543)*x_ref[1]
        arg[(3, 1, 0, 0)]=-0.0127904127759*x[0] + (-0.562865360157)*x[1]
        ref[(3, 1, 0, 0)]=-0.0127904127759*x_ref[0] + (-0.562865360157)*x_ref[1]
        arg[(3, 1, 0, 1)]=0.75350804591*x[0] + (0.486384192876)*x[1]
        ref[(3, 1, 0, 1)]=0.75350804591*x_ref[0] + (0.486384192876)*x_ref[1]
        arg[(3, 1, 0, 2)]=-0.546273519168*x[0] + (0.561851423897)*x[1]
        ref[(3, 1, 0, 2)]=-0.546273519168*x_ref[0] + (0.561851423897)*x_ref[1]
        arg[(3, 1, 1, 0)]=0.245944297188*x[0] + (-0.697303629841)*x[1]
        ref[(3, 1, 1, 0)]=0.245944297188*x_ref[0] + (-0.697303629841)*x_ref[1]
        arg[(3, 1, 1, 1)]=0.622329340064*x[0] + (-0.39419227384)*x[1]
        ref[(3, 1, 1, 1)]=0.622329340064*x_ref[0] + (-0.39419227384)*x_ref[1]
        arg[(3, 1, 1, 2)]=-0.909721432476*x[0] + (0.653025637947)*x[1]
        ref[(3, 1, 1, 2)]=-0.909721432476*x_ref[0] + (0.653025637947)*x_ref[1]
        arg[(3, 1, 2, 0)]=0.0983427258227*x[0] + (0.79093880724)*x[1]
        ref[(3, 1, 2, 0)]=0.0983427258227*x_ref[0] + (0.79093880724)*x_ref[1]
        arg[(3, 1, 2, 1)]=-0.145136234862*x[0] + (0.407102594344)*x[1]
        ref[(3, 1, 2, 1)]=-0.145136234862*x_ref[0] + (0.407102594344)*x_ref[1]
        arg[(3, 1, 2, 2)]=-0.403165722332*x[0] + (-0.360346908275)*x[1]
        ref[(3, 1, 2, 2)]=-0.403165722332*x_ref[0] + (-0.360346908275)*x_ref[1]
        arg[(3, 2, 0, 0)]=0.844449717472*x[0] + (0.934086856385)*x[1]
        ref[(3, 2, 0, 0)]=0.844449717472*x_ref[0] + (0.934086856385)*x_ref[1]
        arg[(3, 2, 0, 1)]=-0.882560053815*x[0] + (-0.680358524381)*x[1]
        ref[(3, 2, 0, 1)]=-0.882560053815*x_ref[0] + (-0.680358524381)*x_ref[1]
        arg[(3, 2, 0, 2)]=0.88942977235*x[0] + (0.290396887434)*x[1]
        ref[(3, 2, 0, 2)]=0.88942977235*x_ref[0] + (0.290396887434)*x_ref[1]
        arg[(3, 2, 1, 0)]=-0.369236340673*x[0] + (0.886381748038)*x[1]
        ref[(3, 2, 1, 0)]=-0.369236340673*x_ref[0] + (0.886381748038)*x_ref[1]
        arg[(3, 2, 1, 1)]=-0.989671141685*x[0] + (0.000174592492617)*x[1]
        ref[(3, 2, 1, 1)]=-0.989671141685*x_ref[0] + (0.000174592492617)*x_ref[1]
        arg[(3, 2, 1, 2)]=0.0954355703528*x[0] + (-0.92305960039)*x[1]
        ref[(3, 2, 1, 2)]=0.0954355703528*x_ref[0] + (-0.92305960039)*x_ref[1]
        arg[(3, 2, 2, 0)]=0.0992721881029*x[0] + (0.856732871366)*x[1]
        ref[(3, 2, 2, 0)]=0.0992721881029*x_ref[0] + (0.856732871366)*x_ref[1]
        arg[(3, 2, 2, 1)]=-0.534321382218*x[0] + (0.427787088939)*x[1]
        ref[(3, 2, 2, 1)]=-0.534321382218*x_ref[0] + (0.427787088939)*x_ref[1]
        arg[(3, 2, 2, 2)]=0.883849717801*x[0] + (0.437073437189)*x[1]
        ref[(3, 2, 2, 2)]=0.883849717801*x_ref[0] + (0.437073437189)*x_ref[1]
        arg[(3, 3, 0, 0)]=-0.678830383538*x[0] + (-0.0943117298613)*x[1]
        ref[(3, 3, 0, 0)]=-0.678830383538*x_ref[0] + (-0.0943117298613)*x_ref[1]
        arg[(3, 3, 0, 1)]=-0.883284220639*x[0] + (-0.433367643849)*x[1]
        ref[(3, 3, 0, 1)]=-0.883284220639*x_ref[0] + (-0.433367643849)*x_ref[1]
        arg[(3, 3, 0, 2)]=0.377477797061*x[0] + (-0.919445768432)*x[1]
        ref[(3, 3, 0, 2)]=0.377477797061*x_ref[0] + (-0.919445768432)*x_ref[1]
        arg[(3, 3, 1, 0)]=-0.236324442551*x[0] + (-0.862722178082)*x[1]
        ref[(3, 3, 1, 0)]=-0.236324442551*x_ref[0] + (-0.862722178082)*x_ref[1]
        arg[(3, 3, 1, 1)]=0.6209985827*x[0] + (0.51725305066)*x[1]
        ref[(3, 3, 1, 1)]=0.6209985827*x_ref[0] + (0.51725305066)*x_ref[1]
        arg[(3, 3, 1, 2)]=0.0539387410665*x[0] + (-0.319959040873)*x[1]
        ref[(3, 3, 1, 2)]=0.0539387410665*x_ref[0] + (-0.319959040873)*x_ref[1]
        arg[(3, 3, 2, 0)]=0.957233743719*x[0] + (0.804397532227)*x[1]
        ref[(3, 3, 2, 0)]=0.957233743719*x_ref[0] + (0.804397532227)*x_ref[1]
        arg[(3, 3, 2, 1)]=0.366450898117*x[0] + (0.67808035578)*x[1]
        ref[(3, 3, 2, 1)]=0.366450898117*x_ref[0] + (0.67808035578)*x_ref[1]
        arg[(3, 3, 2, 2)]=-0.765406790788*x[0] + (0.310902149132)*x[1]
        ref[(3, 3, 2, 2)]=-0.765406790788*x_ref[0] + (0.310902149132)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.327884466817*x[2]
            ref[(0, 0, 0, 0)]+=0.327884466817*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.894073534298*x[2]
            ref[(0, 0, 0, 1)]+=0.894073534298*x_ref[2]
            arg[(0, 0, 0, 2)]+=-0.837747751644*x[2]
            ref[(0, 0, 0, 2)]+=-0.837747751644*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.346286826134*x[2]
            ref[(0, 0, 1, 0)]+=-0.346286826134*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.394181032312*x[2]
            ref[(0, 0, 1, 1)]+=-0.394181032312*x_ref[2]
            arg[(0, 0, 1, 2)]+=-0.63083526073*x[2]
            ref[(0, 0, 1, 2)]+=-0.63083526073*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.0630358480512*x[2]
            ref[(0, 0, 2, 0)]+=-0.0630358480512*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.252084215275*x[2]
            ref[(0, 0, 2, 1)]+=0.252084215275*x_ref[2]
            arg[(0, 0, 2, 2)]+=0.448767093355*x[2]
            ref[(0, 0, 2, 2)]+=0.448767093355*x_ref[2]
            arg[(0, 1, 0, 0)]+=0.186703471896*x[2]
            ref[(0, 1, 0, 0)]+=0.186703471896*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.289470022529*x[2]
            ref[(0, 1, 0, 1)]+=-0.289470022529*x_ref[2]
            arg[(0, 1, 0, 2)]+=-0.844335141904*x[2]
            ref[(0, 1, 0, 2)]+=-0.844335141904*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.313956814575*x[2]
            ref[(0, 1, 1, 0)]+=-0.313956814575*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.336095240092*x[2]
            ref[(0, 1, 1, 1)]+=-0.336095240092*x_ref[2]
            arg[(0, 1, 1, 2)]+=-0.993565980005*x[2]
            ref[(0, 1, 1, 2)]+=-0.993565980005*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.127857053243*x[2]
            ref[(0, 1, 2, 0)]+=-0.127857053243*x_ref[2]
            arg[(0, 1, 2, 1)]+=0.204479150429*x[2]
            ref[(0, 1, 2, 1)]+=0.204479150429*x_ref[2]
            arg[(0, 1, 2, 2)]+=0.855606479987*x[2]
            ref[(0, 1, 2, 2)]+=0.855606479987*x_ref[2]
            arg[(0, 2, 0, 0)]+=-0.714561163188*x[2]
            ref[(0, 2, 0, 0)]+=-0.714561163188*x_ref[2]
            arg[(0, 2, 0, 1)]+=0.0236594874428*x[2]
            ref[(0, 2, 0, 1)]+=0.0236594874428*x_ref[2]
            arg[(0, 2, 0, 2)]+=0.299471142825*x[2]
            ref[(0, 2, 0, 2)]+=0.299471142825*x_ref[2]
            arg[(0, 2, 1, 0)]+=-0.100387163135*x[2]
            ref[(0, 2, 1, 0)]+=-0.100387163135*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.114412202932*x[2]
            ref[(0, 2, 1, 1)]+=-0.114412202932*x_ref[2]
            arg[(0, 2, 1, 2)]+=-0.131950373654*x[2]
            ref[(0, 2, 1, 2)]+=-0.131950373654*x_ref[2]
            arg[(0, 2, 2, 0)]+=-0.773329655531*x[2]
            ref[(0, 2, 2, 0)]+=-0.773329655531*x_ref[2]
            arg[(0, 2, 2, 1)]+=0.20659008675*x[2]
            ref[(0, 2, 2, 1)]+=0.20659008675*x_ref[2]
            arg[(0, 2, 2, 2)]+=0.332843070142*x[2]
            ref[(0, 2, 2, 2)]+=0.332843070142*x_ref[2]
            arg[(0, 3, 0, 0)]+=-0.106645988575*x[2]
            ref[(0, 3, 0, 0)]+=-0.106645988575*x_ref[2]
            arg[(0, 3, 0, 1)]+=0.613447918659*x[2]
            ref[(0, 3, 0, 1)]+=0.613447918659*x_ref[2]
            arg[(0, 3, 0, 2)]+=-0.298601984485*x[2]
            ref[(0, 3, 0, 2)]+=-0.298601984485*x_ref[2]
            arg[(0, 3, 1, 0)]+=0.353920861981*x[2]
            ref[(0, 3, 1, 0)]+=0.353920861981*x_ref[2]
            arg[(0, 3, 1, 1)]+=0.586482741274*x[2]
            ref[(0, 3, 1, 1)]+=0.586482741274*x_ref[2]
            arg[(0, 3, 1, 2)]+=0.558895057978*x[2]
            ref[(0, 3, 1, 2)]+=0.558895057978*x_ref[2]
            arg[(0, 3, 2, 0)]+=-0.337684067716*x[2]
            ref[(0, 3, 2, 0)]+=-0.337684067716*x_ref[2]
            arg[(0, 3, 2, 1)]+=-0.450310606821*x[2]
            ref[(0, 3, 2, 1)]+=-0.450310606821*x_ref[2]
            arg[(0, 3, 2, 2)]+=0.0272175703884*x[2]
            ref[(0, 3, 2, 2)]+=0.0272175703884*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.551886559076*x[2]
            ref[(1, 0, 0, 0)]+=0.551886559076*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.488074723991*x[2]
            ref[(1, 0, 0, 1)]+=-0.488074723991*x_ref[2]
            arg[(1, 0, 0, 2)]+=-0.169345804599*x[2]
            ref[(1, 0, 0, 2)]+=-0.169345804599*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.125191355127*x[2]
            ref[(1, 0, 1, 0)]+=-0.125191355127*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.951556813897*x[2]
            ref[(1, 0, 1, 1)]+=-0.951556813897*x_ref[2]
            arg[(1, 0, 1, 2)]+=-0.169993979292*x[2]
            ref[(1, 0, 1, 2)]+=-0.169993979292*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.993925336093*x[2]
            ref[(1, 0, 2, 0)]+=-0.993925336093*x_ref[2]
            arg[(1, 0, 2, 1)]+=-0.402358996377*x[2]
            ref[(1, 0, 2, 1)]+=-0.402358996377*x_ref[2]
            arg[(1, 0, 2, 2)]+=-0.245571260663*x[2]
            ref[(1, 0, 2, 2)]+=-0.245571260663*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.9521379055*x[2]
            ref[(1, 1, 0, 0)]+=0.9521379055*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.582788757077*x[2]
            ref[(1, 1, 0, 1)]+=0.582788757077*x_ref[2]
            arg[(1, 1, 0, 2)]+=-0.614550113324*x[2]
            ref[(1, 1, 0, 2)]+=-0.614550113324*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.844658354892*x[2]
            ref[(1, 1, 1, 0)]+=0.844658354892*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.0978010539877*x[2]
            ref[(1, 1, 1, 1)]+=0.0978010539877*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.665609330058*x[2]
            ref[(1, 1, 1, 2)]+=-0.665609330058*x_ref[2]
            arg[(1, 1, 2, 0)]+=0.711955293605*x[2]
            ref[(1, 1, 2, 0)]+=0.711955293605*x_ref[2]
            arg[(1, 1, 2, 1)]+=-0.984182165051*x[2]
            ref[(1, 1, 2, 1)]+=-0.984182165051*x_ref[2]
            arg[(1, 1, 2, 2)]+=-0.00382889302958*x[2]
            ref[(1, 1, 2, 2)]+=-0.00382889302958*x_ref[2]
            arg[(1, 2, 0, 0)]+=-0.705167300004*x[2]
            ref[(1, 2, 0, 0)]+=-0.705167300004*x_ref[2]
            arg[(1, 2, 0, 1)]+=-0.207500667565*x[2]
            ref[(1, 2, 0, 1)]+=-0.207500667565*x_ref[2]
            arg[(1, 2, 0, 2)]+=-0.653898721936*x[2]
            ref[(1, 2, 0, 2)]+=-0.653898721936*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.800568609562*x[2]
            ref[(1, 2, 1, 0)]+=0.800568609562*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.709566815113*x[2]
            ref[(1, 2, 1, 1)]+=0.709566815113*x_ref[2]
            arg[(1, 2, 1, 2)]+=-0.67719613025*x[2]
            ref[(1, 2, 1, 2)]+=-0.67719613025*x_ref[2]
            arg[(1, 2, 2, 0)]+=-0.390279583361*x[2]
            ref[(1, 2, 2, 0)]+=-0.390279583361*x_ref[2]
            arg[(1, 2, 2, 1)]+=-0.211106321151*x[2]
            ref[(1, 2, 2, 1)]+=-0.211106321151*x_ref[2]
            arg[(1, 2, 2, 2)]+=0.0757099454752*x[2]
            ref[(1, 2, 2, 2)]+=0.0757099454752*x_ref[2]
            arg[(1, 3, 0, 0)]+=-0.152468595101*x[2]
            ref[(1, 3, 0, 0)]+=-0.152468595101*x_ref[2]
            arg[(1, 3, 0, 1)]+=0.603988633082*x[2]
            ref[(1, 3, 0, 1)]+=0.603988633082*x_ref[2]
            arg[(1, 3, 0, 2)]+=-0.918029440908*x[2]
            ref[(1, 3, 0, 2)]+=-0.918029440908*x_ref[2]
            arg[(1, 3, 1, 0)]+=-0.459403742646*x[2]
            ref[(1, 3, 1, 0)]+=-0.459403742646*x_ref[2]
            arg[(1, 3, 1, 1)]+=0.707203955603*x[2]
            ref[(1, 3, 1, 1)]+=0.707203955603*x_ref[2]
            arg[(1, 3, 1, 2)]+=0.9843353086*x[2]
            ref[(1, 3, 1, 2)]+=0.9843353086*x_ref[2]
            arg[(1, 3, 2, 0)]+=-0.884326443072*x[2]
            ref[(1, 3, 2, 0)]+=-0.884326443072*x_ref[2]
            arg[(1, 3, 2, 1)]+=0.911619540037*x[2]
            ref[(1, 3, 2, 1)]+=0.911619540037*x_ref[2]
            arg[(1, 3, 2, 2)]+=0.318176302859*x[2]
            ref[(1, 3, 2, 2)]+=0.318176302859*x_ref[2]
            arg[(2, 0, 0, 0)]+=-0.71434293054*x[2]
            ref[(2, 0, 0, 0)]+=-0.71434293054*x_ref[2]
            arg[(2, 0, 0, 1)]+=0.333338066811*x[2]
            ref[(2, 0, 0, 1)]+=0.333338066811*x_ref[2]
            arg[(2, 0, 0, 2)]+=-0.741143628303*x[2]
            ref[(2, 0, 0, 2)]+=-0.741143628303*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.369883537519*x[2]
            ref[(2, 0, 1, 0)]+=-0.369883537519*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.236705233382*x[2]
            ref[(2, 0, 1, 1)]+=0.236705233382*x_ref[2]
            arg[(2, 0, 1, 2)]+=0.675788529894*x[2]
            ref[(2, 0, 1, 2)]+=0.675788529894*x_ref[2]
            arg[(2, 0, 2, 0)]+=0.926663484083*x[2]
            ref[(2, 0, 2, 0)]+=0.926663484083*x_ref[2]
            arg[(2, 0, 2, 1)]+=0.145140897382*x[2]
            ref[(2, 0, 2, 1)]+=0.145140897382*x_ref[2]
            arg[(2, 0, 2, 2)]+=-0.662310260548*x[2]
            ref[(2, 0, 2, 2)]+=-0.662310260548*x_ref[2]
            arg[(2, 1, 0, 0)]+=-0.620714076737*x[2]
            ref[(2, 1, 0, 0)]+=-0.620714076737*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.848083690107*x[2]
            ref[(2, 1, 0, 1)]+=-0.848083690107*x_ref[2]
            arg[(2, 1, 0, 2)]+=-0.789283531452*x[2]
            ref[(2, 1, 0, 2)]+=-0.789283531452*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.05363340476*x[2]
            ref[(2, 1, 1, 0)]+=0.05363340476*x_ref[2]
            arg[(2, 1, 1, 1)]+=-0.0206137594184*x[2]
            ref[(2, 1, 1, 1)]+=-0.0206137594184*x_ref[2]
            arg[(2, 1, 1, 2)]+=-0.849862618286*x[2]
            ref[(2, 1, 1, 2)]+=-0.849862618286*x_ref[2]
            arg[(2, 1, 2, 0)]+=-0.646364991547*x[2]
            ref[(2, 1, 2, 0)]+=-0.646364991547*x_ref[2]
            arg[(2, 1, 2, 1)]+=-0.328470410977*x[2]
            ref[(2, 1, 2, 1)]+=-0.328470410977*x_ref[2]
            arg[(2, 1, 2, 2)]+=-0.391194575494*x[2]
            ref[(2, 1, 2, 2)]+=-0.391194575494*x_ref[2]
            arg[(2, 2, 0, 0)]+=0.748420552753*x[2]
            ref[(2, 2, 0, 0)]+=0.748420552753*x_ref[2]
            arg[(2, 2, 0, 1)]+=0.0578905094598*x[2]
            ref[(2, 2, 0, 1)]+=0.0578905094598*x_ref[2]
            arg[(2, 2, 0, 2)]+=0.213994557136*x[2]
            ref[(2, 2, 0, 2)]+=0.213994557136*x_ref[2]
            arg[(2, 2, 1, 0)]+=0.452836176431*x[2]
            ref[(2, 2, 1, 0)]+=0.452836176431*x_ref[2]
            arg[(2, 2, 1, 1)]+=0.476265002554*x[2]
            ref[(2, 2, 1, 1)]+=0.476265002554*x_ref[2]
            arg[(2, 2, 1, 2)]+=-0.110158158932*x[2]
            ref[(2, 2, 1, 2)]+=-0.110158158932*x_ref[2]
            arg[(2, 2, 2, 0)]+=-0.415106004881*x[2]
            ref[(2, 2, 2, 0)]+=-0.415106004881*x_ref[2]
            arg[(2, 2, 2, 1)]+=0.415313215867*x[2]
            ref[(2, 2, 2, 1)]+=0.415313215867*x_ref[2]
            arg[(2, 2, 2, 2)]+=0.231048981187*x[2]
            ref[(2, 2, 2, 2)]+=0.231048981187*x_ref[2]
            arg[(2, 3, 0, 0)]+=-0.201199644011*x[2]
            ref[(2, 3, 0, 0)]+=-0.201199644011*x_ref[2]
            arg[(2, 3, 0, 1)]+=-0.277987492387*x[2]
            ref[(2, 3, 0, 1)]+=-0.277987492387*x_ref[2]
            arg[(2, 3, 0, 2)]+=-0.213723223716*x[2]
            ref[(2, 3, 0, 2)]+=-0.213723223716*x_ref[2]
            arg[(2, 3, 1, 0)]+=0.0178662059935*x[2]
            ref[(2, 3, 1, 0)]+=0.0178662059935*x_ref[2]
            arg[(2, 3, 1, 1)]+=-0.33838425307*x[2]
            ref[(2, 3, 1, 1)]+=-0.33838425307*x_ref[2]
            arg[(2, 3, 1, 2)]+=-0.384253658294*x[2]
            ref[(2, 3, 1, 2)]+=-0.384253658294*x_ref[2]
            arg[(2, 3, 2, 0)]+=0.90550247419*x[2]
            ref[(2, 3, 2, 0)]+=0.90550247419*x_ref[2]
            arg[(2, 3, 2, 1)]+=-0.376704866231*x[2]
            ref[(2, 3, 2, 1)]+=-0.376704866231*x_ref[2]
            arg[(2, 3, 2, 2)]+=-0.862108222437*x[2]
            ref[(2, 3, 2, 2)]+=-0.862108222437*x_ref[2]
            arg[(3, 0, 0, 0)]+=0.0297487436104*x[2]
            ref[(3, 0, 0, 0)]+=0.0297487436104*x_ref[2]
            arg[(3, 0, 0, 1)]+=0.946681127863*x[2]
            ref[(3, 0, 0, 1)]+=0.946681127863*x_ref[2]
            arg[(3, 0, 0, 2)]+=0.410302852566*x[2]
            ref[(3, 0, 0, 2)]+=0.410302852566*x_ref[2]
            arg[(3, 0, 1, 0)]+=0.751150763055*x[2]
            ref[(3, 0, 1, 0)]+=0.751150763055*x_ref[2]
            arg[(3, 0, 1, 1)]+=0.496764948807*x[2]
            ref[(3, 0, 1, 1)]+=0.496764948807*x_ref[2]
            arg[(3, 0, 1, 2)]+=-0.228548735907*x[2]
            ref[(3, 0, 1, 2)]+=-0.228548735907*x_ref[2]
            arg[(3, 0, 2, 0)]+=0.845859563945*x[2]
            ref[(3, 0, 2, 0)]+=0.845859563945*x_ref[2]
            arg[(3, 0, 2, 1)]+=-0.679627623312*x[2]
            ref[(3, 0, 2, 1)]+=-0.679627623312*x_ref[2]
            arg[(3, 0, 2, 2)]+=-0.396989864044*x[2]
            ref[(3, 0, 2, 2)]+=-0.396989864044*x_ref[2]
            arg[(3, 1, 0, 0)]+=0.657210292807*x[2]
            ref[(3, 1, 0, 0)]+=0.657210292807*x_ref[2]
            arg[(3, 1, 0, 1)]+=-0.235246288063*x[2]
            ref[(3, 1, 0, 1)]+=-0.235246288063*x_ref[2]
            arg[(3, 1, 0, 2)]+=-0.352216941534*x[2]
            ref[(3, 1, 0, 2)]+=-0.352216941534*x_ref[2]
            arg[(3, 1, 1, 0)]+=0.38326620921*x[2]
            ref[(3, 1, 1, 0)]+=0.38326620921*x_ref[2]
            arg[(3, 1, 1, 1)]+=-0.23566594172*x[2]
            ref[(3, 1, 1, 1)]+=-0.23566594172*x_ref[2]
            arg[(3, 1, 1, 2)]+=0.525733365114*x[2]
            ref[(3, 1, 1, 2)]+=0.525733365114*x_ref[2]
            arg[(3, 1, 2, 0)]+=-0.0920537435048*x[2]
            ref[(3, 1, 2, 0)]+=-0.0920537435048*x_ref[2]
            arg[(3, 1, 2, 1)]+=0.230355602736*x[2]
            ref[(3, 1, 2, 1)]+=0.230355602736*x_ref[2]
            arg[(3, 1, 2, 2)]+=-0.0418694056207*x[2]
            ref[(3, 1, 2, 2)]+=-0.0418694056207*x_ref[2]
            arg[(3, 2, 0, 0)]+=0.76363194047*x[2]
            ref[(3, 2, 0, 0)]+=0.76363194047*x_ref[2]
            arg[(3, 2, 0, 1)]+=-0.734927990289*x[2]
            ref[(3, 2, 0, 1)]+=-0.734927990289*x_ref[2]
            arg[(3, 2, 0, 2)]+=-0.0322853521983*x[2]
            ref[(3, 2, 0, 2)]+=-0.0322853521983*x_ref[2]
            arg[(3, 2, 1, 0)]+=-0.2762992726*x[2]
            ref[(3, 2, 1, 0)]+=-0.2762992726*x_ref[2]
            arg[(3, 2, 1, 1)]+=0.73920175288*x[2]
            ref[(3, 2, 1, 1)]+=0.73920175288*x_ref[2]
            arg[(3, 2, 1, 2)]+=-0.160369740235*x[2]
            ref[(3, 2, 1, 2)]+=-0.160369740235*x_ref[2]
            arg[(3, 2, 2, 0)]+=0.213850787992*x[2]
            ref[(3, 2, 2, 0)]+=0.213850787992*x_ref[2]
            arg[(3, 2, 2, 1)]+=-0.396287293986*x[2]
            ref[(3, 2, 2, 1)]+=-0.396287293986*x_ref[2]
            arg[(3, 2, 2, 2)]+=0.0398503289342*x[2]
            ref[(3, 2, 2, 2)]+=0.0398503289342*x_ref[2]
            arg[(3, 3, 0, 0)]+=-0.45307018942*x[2]
            ref[(3, 3, 0, 0)]+=-0.45307018942*x_ref[2]
            arg[(3, 3, 0, 1)]+=0.595196286833*x[2]
            ref[(3, 3, 0, 1)]+=0.595196286833*x_ref[2]
            arg[(3, 3, 0, 2)]+=0.625927889092*x[2]
            ref[(3, 3, 0, 2)]+=0.625927889092*x_ref[2]
            arg[(3, 3, 1, 0)]+=0.87508330772*x[2]
            ref[(3, 3, 1, 0)]+=0.87508330772*x_ref[2]
            arg[(3, 3, 1, 1)]+=-0.911805209435*x[2]
            ref[(3, 3, 1, 1)]+=-0.911805209435*x_ref[2]
            arg[(3, 3, 1, 2)]+=0.35089460253*x[2]
            ref[(3, 3, 1, 2)]+=0.35089460253*x_ref[2]
            arg[(3, 3, 2, 0)]+=0.991265683719*x[2]
            ref[(3, 3, 2, 0)]+=0.991265683719*x_ref[2]
            arg[(3, 3, 2, 1)]+=0.571243277813*x[2]
            ref[(3, 3, 2, 1)]+=0.571243277813*x_ref[2]
            arg[(3, 3, 2, 2)]+=-0.673869140997*x[2]
            ref[(3, 3, 2, 2)]+=-0.673869140997*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedContinuousFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.911163200466*x[0] + (0.0231775447825)*x[1]
        ref=0.911163200466*x_ref[0] + (0.0231775447825)*x_ref[1]
        if dim==3:
            arg+=(-0.686236478959)*x[2]
            ref+=(-0.686236478959)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedContinuousFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=-0.564518494411*x[0] + (-0.870296773283)*x[1]
        ref[(0,)]=-0.564518494411*x_ref[0] + (-0.870296773283)*x_ref[1]
        arg[(1,)]=0.878715674244*x[0] + (-0.84408988823)*x[1]
        ref[(1,)]=0.878715674244*x_ref[0] + (-0.84408988823)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.044579661078*x[2]
            ref[(0,)]+=0.044579661078*x_ref[2]
            arg[(1,)]+=0.724826024909*x[2]
            ref[(1,)]+=0.724826024909*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedContinuousFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref = Data(0,(3, 4),w_ref)
        arg[(0, 0)]=-0.777801351227*x[0] + (0.535187800251)*x[1]
        ref[(0, 0)]=-0.777801351227*x_ref[0] + (0.535187800251)*x_ref[1]
        arg[(0, 1)]=0.83627077681*x[0] + (-0.155845726538)*x[1]
        ref[(0, 1)]=0.83627077681*x_ref[0] + (-0.155845726538)*x_ref[1]
        arg[(0, 2)]=0.925052612242*x[0] + (0.428700106063)*x[1]
        ref[(0, 2)]=0.925052612242*x_ref[0] + (0.428700106063)*x_ref[1]
        arg[(0, 3)]=0.0696882003134*x[0] + (-0.283784995412)*x[1]
        ref[(0, 3)]=0.0696882003134*x_ref[0] + (-0.283784995412)*x_ref[1]
        arg[(1, 0)]=0.592399489425*x[0] + (0.127009350933)*x[1]
        ref[(1, 0)]=0.592399489425*x_ref[0] + (0.127009350933)*x_ref[1]
        arg[(1, 1)]=-0.723205944372*x[0] + (-0.280032915743)*x[1]
        ref[(1, 1)]=-0.723205944372*x_ref[0] + (-0.280032915743)*x_ref[1]
        arg[(1, 2)]=0.373117170054*x[0] + (-0.210670986329)*x[1]
        ref[(1, 2)]=0.373117170054*x_ref[0] + (-0.210670986329)*x_ref[1]
        arg[(1, 3)]=0.350414971752*x[0] + (0.762070317479)*x[1]
        ref[(1, 3)]=0.350414971752*x_ref[0] + (0.762070317479)*x_ref[1]
        arg[(2, 0)]=0.775915175548*x[0] + (0.700677756571)*x[1]
        ref[(2, 0)]=0.775915175548*x_ref[0] + (0.700677756571)*x_ref[1]
        arg[(2, 1)]=0.1691274709*x[0] + (-0.103105338812)*x[1]
        ref[(2, 1)]=0.1691274709*x_ref[0] + (-0.103105338812)*x_ref[1]
        arg[(2, 2)]=0.893608513264*x[0] + (-0.850639897468)*x[1]
        ref[(2, 2)]=0.893608513264*x_ref[0] + (-0.850639897468)*x_ref[1]
        arg[(2, 3)]=0.990964913983*x[0] + (0.174313862662)*x[1]
        ref[(2, 3)]=0.990964913983*x_ref[0] + (0.174313862662)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.202530366998*x[2]
            ref[(0, 0)]+=-0.202530366998*x_ref[2]
            arg[(0, 1)]+=0.00609918325248*x[2]
            ref[(0, 1)]+=0.00609918325248*x_ref[2]
            arg[(0, 2)]+=-0.10963639189*x[2]
            ref[(0, 2)]+=-0.10963639189*x_ref[2]
            arg[(0, 3)]+=0.130086771293*x[2]
            ref[(0, 3)]+=0.130086771293*x_ref[2]
            arg[(1, 0)]+=-0.252760569354*x[2]
            ref[(1, 0)]+=-0.252760569354*x_ref[2]
            arg[(1, 1)]+=-0.463397263064*x[2]
            ref[(1, 1)]+=-0.463397263064*x_ref[2]
            arg[(1, 2)]+=0.106737773264*x[2]
            ref[(1, 2)]+=0.106737773264*x_ref[2]
            arg[(1, 3)]+=0.468699578434*x[2]
            ref[(1, 3)]+=0.468699578434*x_ref[2]
            arg[(2, 0)]+=0.826859466541*x[2]
            ref[(2, 0)]+=0.826859466541*x_ref[2]
            arg[(2, 1)]+=-0.832415690406*x[2]
            ref[(2, 1)]+=-0.832415690406*x_ref[2]
            arg[(2, 2)]+=-0.211446620553*x[2]
            ref[(2, 2)]+=-0.211446620553*x_ref[2]
            arg[(2, 3)]+=0.640764394392*x[2]
            ref[(2, 3)]+=0.640764394392*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedContinuousFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 2),w)
        ref = Data(0,(3, 4, 2),w_ref)
        arg[(0, 0, 0)]=-0.538206183488*x[0] + (-0.0174170064663)*x[1]
        ref[(0, 0, 0)]=-0.538206183488*x_ref[0] + (-0.0174170064663)*x_ref[1]
        arg[(0, 0, 1)]=-0.357880559581*x[0] + (-0.798150651096)*x[1]
        ref[(0, 0, 1)]=-0.357880559581*x_ref[0] + (-0.798150651096)*x_ref[1]
        arg[(0, 1, 0)]=-0.774728588337*x[0] + (0.618566477504)*x[1]
        ref[(0, 1, 0)]=-0.774728588337*x_ref[0] + (0.618566477504)*x_ref[1]
        arg[(0, 1, 1)]=-0.681127234294*x[0] + (-0.353297999109)*x[1]
        ref[(0, 1, 1)]=-0.681127234294*x_ref[0] + (-0.353297999109)*x_ref[1]
        arg[(0, 2, 0)]=0.191996745321*x[0] + (0.155735075176)*x[1]
        ref[(0, 2, 0)]=0.191996745321*x_ref[0] + (0.155735075176)*x_ref[1]
        arg[(0, 2, 1)]=-0.648484459389*x[0] + (0.962572983441)*x[1]
        ref[(0, 2, 1)]=-0.648484459389*x_ref[0] + (0.962572983441)*x_ref[1]
        arg[(0, 3, 0)]=0.621544431866*x[0] + (-0.706386735501)*x[1]
        ref[(0, 3, 0)]=0.621544431866*x_ref[0] + (-0.706386735501)*x_ref[1]
        arg[(0, 3, 1)]=0.89269635539*x[0] + (-0.968250550072)*x[1]
        ref[(0, 3, 1)]=0.89269635539*x_ref[0] + (-0.968250550072)*x_ref[1]
        arg[(1, 0, 0)]=-0.36961644696*x[0] + (-0.708489461762)*x[1]
        ref[(1, 0, 0)]=-0.36961644696*x_ref[0] + (-0.708489461762)*x_ref[1]
        arg[(1, 0, 1)]=0.00807203732195*x[0] + (-0.96033118418)*x[1]
        ref[(1, 0, 1)]=0.00807203732195*x_ref[0] + (-0.96033118418)*x_ref[1]
        arg[(1, 1, 0)]=-0.331073889153*x[0] + (-0.111357272192)*x[1]
        ref[(1, 1, 0)]=-0.331073889153*x_ref[0] + (-0.111357272192)*x_ref[1]
        arg[(1, 1, 1)]=0.897511265339*x[0] + (-0.249035102599)*x[1]
        ref[(1, 1, 1)]=0.897511265339*x_ref[0] + (-0.249035102599)*x_ref[1]
        arg[(1, 2, 0)]=0.836802624154*x[0] + (0.562686099213)*x[1]
        ref[(1, 2, 0)]=0.836802624154*x_ref[0] + (0.562686099213)*x_ref[1]
        arg[(1, 2, 1)]=0.136723100037*x[0] + (-0.326401609495)*x[1]
        ref[(1, 2, 1)]=0.136723100037*x_ref[0] + (-0.326401609495)*x_ref[1]
        arg[(1, 3, 0)]=-0.537411401406*x[0] + (0.62550043651)*x[1]
        ref[(1, 3, 0)]=-0.537411401406*x_ref[0] + (0.62550043651)*x_ref[1]
        arg[(1, 3, 1)]=-0.579465959198*x[0] + (0.436865114474)*x[1]
        ref[(1, 3, 1)]=-0.579465959198*x_ref[0] + (0.436865114474)*x_ref[1]
        arg[(2, 0, 0)]=-0.750336352919*x[0] + (-0.528604748596)*x[1]
        ref[(2, 0, 0)]=-0.750336352919*x_ref[0] + (-0.528604748596)*x_ref[1]
        arg[(2, 0, 1)]=-0.35383944162*x[0] + (-0.359116240619)*x[1]
        ref[(2, 0, 1)]=-0.35383944162*x_ref[0] + (-0.359116240619)*x_ref[1]
        arg[(2, 1, 0)]=0.613383044952*x[0] + (0.361772719695)*x[1]
        ref[(2, 1, 0)]=0.613383044952*x_ref[0] + (0.361772719695)*x_ref[1]
        arg[(2, 1, 1)]=0.961911537241*x[0] + (-0.48309022094)*x[1]
        ref[(2, 1, 1)]=0.961911537241*x_ref[0] + (-0.48309022094)*x_ref[1]
        arg[(2, 2, 0)]=-0.823904015719*x[0] + (-0.733165279256)*x[1]
        ref[(2, 2, 0)]=-0.823904015719*x_ref[0] + (-0.733165279256)*x_ref[1]
        arg[(2, 2, 1)]=0.160354183955*x[0] + (-0.382074476845)*x[1]
        ref[(2, 2, 1)]=0.160354183955*x_ref[0] + (-0.382074476845)*x_ref[1]
        arg[(2, 3, 0)]=-0.0960289429226*x[0] + (-0.445037265378)*x[1]
        ref[(2, 3, 0)]=-0.0960289429226*x_ref[0] + (-0.445037265378)*x_ref[1]
        arg[(2, 3, 1)]=-0.749714628939*x[0] + (-0.947010369218)*x[1]
        ref[(2, 3, 1)]=-0.749714628939*x_ref[0] + (-0.947010369218)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.438137580196*x[2]
            ref[(0, 0, 0)]+=-0.438137580196*x_ref[2]
            arg[(0, 0, 1)]+=0.601952858384*x[2]
            ref[(0, 0, 1)]+=0.601952858384*x_ref[2]
            arg[(0, 1, 0)]+=0.24599019303*x[2]
            ref[(0, 1, 0)]+=0.24599019303*x_ref[2]
            arg[(0, 1, 1)]+=0.588000828325*x[2]
            ref[(0, 1, 1)]+=0.588000828325*x_ref[2]
            arg[(0, 2, 0)]+=0.653234892719*x[2]
            ref[(0, 2, 0)]+=0.653234892719*x_ref[2]
            arg[(0, 2, 1)]+=-0.658688867342*x[2]
            ref[(0, 2, 1)]+=-0.658688867342*x_ref[2]
            arg[(0, 3, 0)]+=-0.519842605394*x[2]
            ref[(0, 3, 0)]+=-0.519842605394*x_ref[2]
            arg[(0, 3, 1)]+=0.312027637251*x[2]
            ref[(0, 3, 1)]+=0.312027637251*x_ref[2]
            arg[(1, 0, 0)]+=-0.918733764096*x[2]
            ref[(1, 0, 0)]+=-0.918733764096*x_ref[2]
            arg[(1, 0, 1)]+=-0.669136509667*x[2]
            ref[(1, 0, 1)]+=-0.669136509667*x_ref[2]
            arg[(1, 1, 0)]+=-0.572443022458*x[2]
            ref[(1, 1, 0)]+=-0.572443022458*x_ref[2]
            arg[(1, 1, 1)]+=0.165170772297*x[2]
            ref[(1, 1, 1)]+=0.165170772297*x_ref[2]
            arg[(1, 2, 0)]+=0.257114869794*x[2]
            ref[(1, 2, 0)]+=0.257114869794*x_ref[2]
            arg[(1, 2, 1)]+=0.951489495849*x[2]
            ref[(1, 2, 1)]+=0.951489495849*x_ref[2]
            arg[(1, 3, 0)]+=-0.838281900789*x[2]
            ref[(1, 3, 0)]+=-0.838281900789*x_ref[2]
            arg[(1, 3, 1)]+=0.976031902722*x[2]
            ref[(1, 3, 1)]+=0.976031902722*x_ref[2]
            arg[(2, 0, 0)]+=-0.890802486836*x[2]
            ref[(2, 0, 0)]+=-0.890802486836*x_ref[2]
            arg[(2, 0, 1)]+=-0.356842238215*x[2]
            ref[(2, 0, 1)]+=-0.356842238215*x_ref[2]
            arg[(2, 1, 0)]+=-0.797163982842*x[2]
            ref[(2, 1, 0)]+=-0.797163982842*x_ref[2]
            arg[(2, 1, 1)]+=0.904529583405*x[2]
            ref[(2, 1, 1)]+=0.904529583405*x_ref[2]
            arg[(2, 2, 0)]+=0.0432774152547*x[2]
            ref[(2, 2, 0)]+=0.0432774152547*x_ref[2]
            arg[(2, 2, 1)]+=-0.220820409857*x[2]
            ref[(2, 2, 1)]+=-0.220820409857*x_ref[2]
            arg[(2, 3, 0)]+=-0.590132327094*x[2]
            ref[(2, 3, 0)]+=-0.590132327094*x_ref[2]
            arg[(2, 3, 1)]+=-0.0895908373345*x[2]
            ref[(2, 3, 1)]+=-0.0895908373345*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedContinuousFunction_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedContinuousFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedContinuousFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedContinuousFunction(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 2, 4),w)
        ref = Data(0,(3, 3, 2, 4),w_ref)
        arg[(0, 0, 0, 0)]=-0.0339705803038*x[0] + (-0.0370468272831)*x[1]
        ref[(0, 0, 0, 0)]=-0.0339705803038*x_ref[0] + (-0.0370468272831)*x_ref[1]
        arg[(0, 0, 0, 1)]=-0.529927210651*x[0] + (-0.315674055035)*x[1]
        ref[(0, 0, 0, 1)]=-0.529927210651*x_ref[0] + (-0.315674055035)*x_ref[1]
        arg[(0, 0, 0, 2)]=0.102057731321*x[0] + (0.377479461811)*x[1]
        ref[(0, 0, 0, 2)]=0.102057731321*x_ref[0] + (0.377479461811)*x_ref[1]
        arg[(0, 0, 0, 3)]=0.265567879415*x[0] + (-0.578789403566)*x[1]
        ref[(0, 0, 0, 3)]=0.265567879415*x_ref[0] + (-0.578789403566)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.139764146526*x[0] + (0.935041899172)*x[1]
        ref[(0, 0, 1, 0)]=0.139764146526*x_ref[0] + (0.935041899172)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.799496013552*x[0] + (-0.0761871943872)*x[1]
        ref[(0, 0, 1, 1)]=0.799496013552*x_ref[0] + (-0.0761871943872)*x_ref[1]
        arg[(0, 0, 1, 2)]=-0.0357319918032*x[0] + (-0.38006039803)*x[1]
        ref[(0, 0, 1, 2)]=-0.0357319918032*x_ref[0] + (-0.38006039803)*x_ref[1]
        arg[(0, 0, 1, 3)]=0.69533120723*x[0] + (-0.192352121032)*x[1]
        ref[(0, 0, 1, 3)]=0.69533120723*x_ref[0] + (-0.192352121032)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.972008960586*x[0] + (0.604330384838)*x[1]
        ref[(0, 1, 0, 0)]=0.972008960586*x_ref[0] + (0.604330384838)*x_ref[1]
        arg[(0, 1, 0, 1)]=-0.236415653359*x[0] + (0.817592129007)*x[1]
        ref[(0, 1, 0, 1)]=-0.236415653359*x_ref[0] + (0.817592129007)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.504070869069*x[0] + (0.38827622022)*x[1]
        ref[(0, 1, 0, 2)]=0.504070869069*x_ref[0] + (0.38827622022)*x_ref[1]
        arg[(0, 1, 0, 3)]=-0.51316713145*x[0] + (-0.726869293271)*x[1]
        ref[(0, 1, 0, 3)]=-0.51316713145*x_ref[0] + (-0.726869293271)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.572651834791*x[0] + (-0.0425745858866)*x[1]
        ref[(0, 1, 1, 0)]=0.572651834791*x_ref[0] + (-0.0425745858866)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.27112509409*x[0] + (-0.0291537353017)*x[1]
        ref[(0, 1, 1, 1)]=0.27112509409*x_ref[0] + (-0.0291537353017)*x_ref[1]
        arg[(0, 1, 1, 2)]=-0.82881422165*x[0] + (0.725098123407)*x[1]
        ref[(0, 1, 1, 2)]=-0.82881422165*x_ref[0] + (0.725098123407)*x_ref[1]
        arg[(0, 1, 1, 3)]=-0.288148129397*x[0] + (-0.158107241945)*x[1]
        ref[(0, 1, 1, 3)]=-0.288148129397*x_ref[0] + (-0.158107241945)*x_ref[1]
        arg[(0, 2, 0, 0)]=-0.0583221250048*x[0] + (-0.218835149806)*x[1]
        ref[(0, 2, 0, 0)]=-0.0583221250048*x_ref[0] + (-0.218835149806)*x_ref[1]
        arg[(0, 2, 0, 1)]=0.104896343383*x[0] + (-0.290817124141)*x[1]
        ref[(0, 2, 0, 1)]=0.104896343383*x_ref[0] + (-0.290817124141)*x_ref[1]
        arg[(0, 2, 0, 2)]=0.433839729288*x[0] + (-0.699601464275)*x[1]
        ref[(0, 2, 0, 2)]=0.433839729288*x_ref[0] + (-0.699601464275)*x_ref[1]
        arg[(0, 2, 0, 3)]=-0.649227285363*x[0] + (0.222426866483)*x[1]
        ref[(0, 2, 0, 3)]=-0.649227285363*x_ref[0] + (0.222426866483)*x_ref[1]
        arg[(0, 2, 1, 0)]=-0.236781614303*x[0] + (-0.980351832597)*x[1]
        ref[(0, 2, 1, 0)]=-0.236781614303*x_ref[0] + (-0.980351832597)*x_ref[1]
        arg[(0, 2, 1, 1)]=-0.823854641762*x[0] + (0.0958001073971)*x[1]
        ref[(0, 2, 1, 1)]=-0.823854641762*x_ref[0] + (0.0958001073971)*x_ref[1]
        arg[(0, 2, 1, 2)]=-0.949415703657*x[0] + (0.86252640249)*x[1]
        ref[(0, 2, 1, 2)]=-0.949415703657*x_ref[0] + (0.86252640249)*x_ref[1]
        arg[(0, 2, 1, 3)]=0.602008346955*x[0] + (-0.695221468662)*x[1]
        ref[(0, 2, 1, 3)]=0.602008346955*x_ref[0] + (-0.695221468662)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.0889263481385*x[0] + (0.151144753841)*x[1]
        ref[(1, 0, 0, 0)]=-0.0889263481385*x_ref[0] + (0.151144753841)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.732355267671*x[0] + (-0.176253072178)*x[1]
        ref[(1, 0, 0, 1)]=-0.732355267671*x_ref[0] + (-0.176253072178)*x_ref[1]
        arg[(1, 0, 0, 2)]=-0.0143015245641*x[0] + (-0.874465677692)*x[1]
        ref[(1, 0, 0, 2)]=-0.0143015245641*x_ref[0] + (-0.874465677692)*x_ref[1]
        arg[(1, 0, 0, 3)]=-0.969941982469*x[0] + (-0.809668083671)*x[1]
        ref[(1, 0, 0, 3)]=-0.969941982469*x_ref[0] + (-0.809668083671)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.793215930718*x[0] + (-0.241901342479)*x[1]
        ref[(1, 0, 1, 0)]=-0.793215930718*x_ref[0] + (-0.241901342479)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.790599916533*x[0] + (0.946059285637)*x[1]
        ref[(1, 0, 1, 1)]=0.790599916533*x_ref[0] + (0.946059285637)*x_ref[1]
        arg[(1, 0, 1, 2)]=0.649785507755*x[0] + (-0.304430896043)*x[1]
        ref[(1, 0, 1, 2)]=0.649785507755*x_ref[0] + (-0.304430896043)*x_ref[1]
        arg[(1, 0, 1, 3)]=0.369599675664*x[0] + (0.843469721676)*x[1]
        ref[(1, 0, 1, 3)]=0.369599675664*x_ref[0] + (0.843469721676)*x_ref[1]
        arg[(1, 1, 0, 0)]=0.378146356869*x[0] + (0.710829576427)*x[1]
        ref[(1, 1, 0, 0)]=0.378146356869*x_ref[0] + (0.710829576427)*x_ref[1]
        arg[(1, 1, 0, 1)]=-0.180398815054*x[0] + (0.0395304726598)*x[1]
        ref[(1, 1, 0, 1)]=-0.180398815054*x_ref[0] + (0.0395304726598)*x_ref[1]
        arg[(1, 1, 0, 2)]=0.967196619118*x[0] + (0.656034533564)*x[1]
        ref[(1, 1, 0, 2)]=0.967196619118*x_ref[0] + (0.656034533564)*x_ref[1]
        arg[(1, 1, 0, 3)]=0.960635205779*x[0] + (-0.72071722455)*x[1]
        ref[(1, 1, 0, 3)]=0.960635205779*x_ref[0] + (-0.72071722455)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.99772273672*x[0] + (0.340054097163)*x[1]
        ref[(1, 1, 1, 0)]=-0.99772273672*x_ref[0] + (0.340054097163)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.575583683475*x[0] + (-0.0417277546541)*x[1]
        ref[(1, 1, 1, 1)]=0.575583683475*x_ref[0] + (-0.0417277546541)*x_ref[1]
        arg[(1, 1, 1, 2)]=-0.871724585438*x[0] + (-0.260398543253)*x[1]
        ref[(1, 1, 1, 2)]=-0.871724585438*x_ref[0] + (-0.260398543253)*x_ref[1]
        arg[(1, 1, 1, 3)]=-0.77145510109*x[0] + (-0.046159336813)*x[1]
        ref[(1, 1, 1, 3)]=-0.77145510109*x_ref[0] + (-0.046159336813)*x_ref[1]
        arg[(1, 2, 0, 0)]=0.99958950381*x[0] + (0.555500808364)*x[1]
        ref[(1, 2, 0, 0)]=0.99958950381*x_ref[0] + (0.555500808364)*x_ref[1]
        arg[(1, 2, 0, 1)]=0.721901045815*x[0] + (-0.954297639938)*x[1]
        ref[(1, 2, 0, 1)]=0.721901045815*x_ref[0] + (-0.954297639938)*x_ref[1]
        arg[(1, 2, 0, 2)]=0.165522949184*x[0] + (-0.0180140438982)*x[1]
        ref[(1, 2, 0, 2)]=0.165522949184*x_ref[0] + (-0.0180140438982)*x_ref[1]
        arg[(1, 2, 0, 3)]=0.127298086556*x[0] + (-0.675032877624)*x[1]
        ref[(1, 2, 0, 3)]=0.127298086556*x_ref[0] + (-0.675032877624)*x_ref[1]
        arg[(1, 2, 1, 0)]=-0.982298526695*x[0] + (-0.0804793132413)*x[1]
        ref[(1, 2, 1, 0)]=-0.982298526695*x_ref[0] + (-0.0804793132413)*x_ref[1]
        arg[(1, 2, 1, 1)]=0.97693199817*x[0] + (-0.984075099641)*x[1]
        ref[(1, 2, 1, 1)]=0.97693199817*x_ref[0] + (-0.984075099641)*x_ref[1]
        arg[(1, 2, 1, 2)]=-0.888377210222*x[0] + (0.397274578984)*x[1]
        ref[(1, 2, 1, 2)]=-0.888377210222*x_ref[0] + (0.397274578984)*x_ref[1]
        arg[(1, 2, 1, 3)]=-0.224795094153*x[0] + (0.0584561314873)*x[1]
        ref[(1, 2, 1, 3)]=-0.224795094153*x_ref[0] + (0.0584561314873)*x_ref[1]
        arg[(2, 0, 0, 0)]=-0.9111491689*x[0] + (-0.345438019932)*x[1]
        ref[(2, 0, 0, 0)]=-0.9111491689*x_ref[0] + (-0.345438019932)*x_ref[1]
        arg[(2, 0, 0, 1)]=-0.773387064848*x[0] + (-0.491239712886)*x[1]
        ref[(2, 0, 0, 1)]=-0.773387064848*x_ref[0] + (-0.491239712886)*x_ref[1]
        arg[(2, 0, 0, 2)]=0.145246759737*x[0] + (0.669931064073)*x[1]
        ref[(2, 0, 0, 2)]=0.145246759737*x_ref[0] + (0.669931064073)*x_ref[1]
        arg[(2, 0, 0, 3)]=-0.531402633021*x[0] + (0.322229423789)*x[1]
        ref[(2, 0, 0, 3)]=-0.531402633021*x_ref[0] + (0.322229423789)*x_ref[1]
        arg[(2, 0, 1, 0)]=0.37507756776*x[0] + (-0.652533757776)*x[1]
        ref[(2, 0, 1, 0)]=0.37507756776*x_ref[0] + (-0.652533757776)*x_ref[1]
        arg[(2, 0, 1, 1)]=-0.871754569386*x[0] + (0.477948566897)*x[1]
        ref[(2, 0, 1, 1)]=-0.871754569386*x_ref[0] + (0.477948566897)*x_ref[1]
        arg[(2, 0, 1, 2)]=0.615956092704*x[0] + (0.532521298334)*x[1]
        ref[(2, 0, 1, 2)]=0.615956092704*x_ref[0] + (0.532521298334)*x_ref[1]
        arg[(2, 0, 1, 3)]=-0.232518376422*x[0] + (-0.191014024775)*x[1]
        ref[(2, 0, 1, 3)]=-0.232518376422*x_ref[0] + (-0.191014024775)*x_ref[1]
        arg[(2, 1, 0, 0)]=0.905485066591*x[0] + (-0.760328343836)*x[1]
        ref[(2, 1, 0, 0)]=0.905485066591*x_ref[0] + (-0.760328343836)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.525791823004*x[0] + (0.345616546203)*x[1]
        ref[(2, 1, 0, 1)]=0.525791823004*x_ref[0] + (0.345616546203)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.791110338924*x[0] + (-0.254569695351)*x[1]
        ref[(2, 1, 0, 2)]=-0.791110338924*x_ref[0] + (-0.254569695351)*x_ref[1]
        arg[(2, 1, 0, 3)]=-0.557233568704*x[0] + (0.563764196705)*x[1]
        ref[(2, 1, 0, 3)]=-0.557233568704*x_ref[0] + (0.563764196705)*x_ref[1]
        arg[(2, 1, 1, 0)]=0.989252890969*x[0] + (-0.375264236171)*x[1]
        ref[(2, 1, 1, 0)]=0.989252890969*x_ref[0] + (-0.375264236171)*x_ref[1]
        arg[(2, 1, 1, 1)]=-0.599984696798*x[0] + (-0.870145607538)*x[1]
        ref[(2, 1, 1, 1)]=-0.599984696798*x_ref[0] + (-0.870145607538)*x_ref[1]
        arg[(2, 1, 1, 2)]=0.722703044148*x[0] + (0.402622625878)*x[1]
        ref[(2, 1, 1, 2)]=0.722703044148*x_ref[0] + (0.402622625878)*x_ref[1]
        arg[(2, 1, 1, 3)]=-0.25424254267*x[0] + (-0.973032614994)*x[1]
        ref[(2, 1, 1, 3)]=-0.25424254267*x_ref[0] + (-0.973032614994)*x_ref[1]
        arg[(2, 2, 0, 0)]=0.999934364207*x[0] + (-0.672839186746)*x[1]
        ref[(2, 2, 0, 0)]=0.999934364207*x_ref[0] + (-0.672839186746)*x_ref[1]
        arg[(2, 2, 0, 1)]=0.980063565921*x[0] + (0.835609350273)*x[1]
        ref[(2, 2, 0, 1)]=0.980063565921*x_ref[0] + (0.835609350273)*x_ref[1]
        arg[(2, 2, 0, 2)]=0.659665138749*x[0] + (-0.734636669594)*x[1]
        ref[(2, 2, 0, 2)]=0.659665138749*x_ref[0] + (-0.734636669594)*x_ref[1]
        arg[(2, 2, 0, 3)]=-0.59229211015*x[0] + (-0.277634121682)*x[1]
        ref[(2, 2, 0, 3)]=-0.59229211015*x_ref[0] + (-0.277634121682)*x_ref[1]
        arg[(2, 2, 1, 0)]=0.802903145405*x[0] + (0.794575813816)*x[1]
        ref[(2, 2, 1, 0)]=0.802903145405*x_ref[0] + (0.794575813816)*x_ref[1]
        arg[(2, 2, 1, 1)]=-0.710643078543*x[0] + (-0.600906732443)*x[1]
        ref[(2, 2, 1, 1)]=-0.710643078543*x_ref[0] + (-0.600906732443)*x_ref[1]
        arg[(2, 2, 1, 2)]=-0.137268693797*x[0] + (0.926812150007)*x[1]
        ref[(2, 2, 1, 2)]=-0.137268693797*x_ref[0] + (0.926812150007)*x_ref[1]
        arg[(2, 2, 1, 3)]=0.237002154475*x[0] + (0.437970498936)*x[1]
        ref[(2, 2, 1, 3)]=0.237002154475*x_ref[0] + (0.437970498936)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.539796635667*x[2]
            ref[(0, 0, 0, 0)]+=-0.539796635667*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.749987680723*x[2]
            ref[(0, 0, 0, 1)]+=-0.749987680723*x_ref[2]
            arg[(0, 0, 0, 2)]+=-0.411203246296*x[2]
            ref[(0, 0, 0, 2)]+=-0.411203246296*x_ref[2]
            arg[(0, 0, 0, 3)]+=-0.770549725619*x[2]
            ref[(0, 0, 0, 3)]+=-0.770549725619*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.0156715034995*x[2]
            ref[(0, 0, 1, 0)]+=-0.0156715034995*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.0561304969464*x[2]
            ref[(0, 0, 1, 1)]+=-0.0561304969464*x_ref[2]
            arg[(0, 0, 1, 2)]+=0.357158913622*x[2]
            ref[(0, 0, 1, 2)]+=0.357158913622*x_ref[2]
            arg[(0, 0, 1, 3)]+=-0.211437244393*x[2]
            ref[(0, 0, 1, 3)]+=-0.211437244393*x_ref[2]
            arg[(0, 1, 0, 0)]+=0.692843125531*x[2]
            ref[(0, 1, 0, 0)]+=0.692843125531*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.573376166027*x[2]
            ref[(0, 1, 0, 1)]+=-0.573376166027*x_ref[2]
            arg[(0, 1, 0, 2)]+=0.612573856298*x[2]
            ref[(0, 1, 0, 2)]+=0.612573856298*x_ref[2]
            arg[(0, 1, 0, 3)]+=-0.765180296697*x[2]
            ref[(0, 1, 0, 3)]+=-0.765180296697*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.940377447034*x[2]
            ref[(0, 1, 1, 0)]+=-0.940377447034*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.466892518682*x[2]
            ref[(0, 1, 1, 1)]+=-0.466892518682*x_ref[2]
            arg[(0, 1, 1, 2)]+=-0.153101471081*x[2]
            ref[(0, 1, 1, 2)]+=-0.153101471081*x_ref[2]
            arg[(0, 1, 1, 3)]+=0.5306116706*x[2]
            ref[(0, 1, 1, 3)]+=0.5306116706*x_ref[2]
            arg[(0, 2, 0, 0)]+=0.651606252532*x[2]
            ref[(0, 2, 0, 0)]+=0.651606252532*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.39327307001*x[2]
            ref[(0, 2, 0, 1)]+=-0.39327307001*x_ref[2]
            arg[(0, 2, 0, 2)]+=0.559857876442*x[2]
            ref[(0, 2, 0, 2)]+=0.559857876442*x_ref[2]
            arg[(0, 2, 0, 3)]+=0.665755176655*x[2]
            ref[(0, 2, 0, 3)]+=0.665755176655*x_ref[2]
            arg[(0, 2, 1, 0)]+=0.100583640891*x[2]
            ref[(0, 2, 1, 0)]+=0.100583640891*x_ref[2]
            arg[(0, 2, 1, 1)]+=0.452888759435*x[2]
            ref[(0, 2, 1, 1)]+=0.452888759435*x_ref[2]
            arg[(0, 2, 1, 2)]+=0.309875099298*x[2]
            ref[(0, 2, 1, 2)]+=0.309875099298*x_ref[2]
            arg[(0, 2, 1, 3)]+=-0.754626399424*x[2]
            ref[(0, 2, 1, 3)]+=-0.754626399424*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.982937604441*x[2]
            ref[(1, 0, 0, 0)]+=-0.982937604441*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.233885059835*x[2]
            ref[(1, 0, 0, 1)]+=-0.233885059835*x_ref[2]
            arg[(1, 0, 0, 2)]+=-0.099263063802*x[2]
            ref[(1, 0, 0, 2)]+=-0.099263063802*x_ref[2]
            arg[(1, 0, 0, 3)]+=-0.292299643411*x[2]
            ref[(1, 0, 0, 3)]+=-0.292299643411*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.164750831972*x[2]
            ref[(1, 0, 1, 0)]+=-0.164750831972*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.558605150482*x[2]
            ref[(1, 0, 1, 1)]+=0.558605150482*x_ref[2]
            arg[(1, 0, 1, 2)]+=0.235031270809*x[2]
            ref[(1, 0, 1, 2)]+=0.235031270809*x_ref[2]
            arg[(1, 0, 1, 3)]+=0.651452737066*x[2]
            ref[(1, 0, 1, 3)]+=0.651452737066*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.731280807627*x[2]
            ref[(1, 1, 0, 0)]+=0.731280807627*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.592252322243*x[2]
            ref[(1, 1, 0, 1)]+=0.592252322243*x_ref[2]
            arg[(1, 1, 0, 2)]+=-0.183786608839*x[2]
            ref[(1, 1, 0, 2)]+=-0.183786608839*x_ref[2]
            arg[(1, 1, 0, 3)]+=-0.306784735257*x[2]
            ref[(1, 1, 0, 3)]+=-0.306784735257*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.473718272428*x[2]
            ref[(1, 1, 1, 0)]+=-0.473718272428*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.172946482138*x[2]
            ref[(1, 1, 1, 1)]+=0.172946482138*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.276475007755*x[2]
            ref[(1, 1, 1, 2)]+=-0.276475007755*x_ref[2]
            arg[(1, 1, 1, 3)]+=-0.148228963888*x[2]
            ref[(1, 1, 1, 3)]+=-0.148228963888*x_ref[2]
            arg[(1, 2, 0, 0)]+=0.267861401191*x[2]
            ref[(1, 2, 0, 0)]+=0.267861401191*x_ref[2]
            arg[(1, 2, 0, 1)]+=0.909497205779*x[2]
            ref[(1, 2, 0, 1)]+=0.909497205779*x_ref[2]
            arg[(1, 2, 0, 2)]+=-0.412039782723*x[2]
            ref[(1, 2, 0, 2)]+=-0.412039782723*x_ref[2]
            arg[(1, 2, 0, 3)]+=-0.905088747098*x[2]
            ref[(1, 2, 0, 3)]+=-0.905088747098*x_ref[2]
            arg[(1, 2, 1, 0)]+=-0.695256701213*x[2]
            ref[(1, 2, 1, 0)]+=-0.695256701213*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.133777317667*x[2]
            ref[(1, 2, 1, 1)]+=0.133777317667*x_ref[2]
            arg[(1, 2, 1, 2)]+=0.727582849307*x[2]
            ref[(1, 2, 1, 2)]+=0.727582849307*x_ref[2]
            arg[(1, 2, 1, 3)]+=0.98431709626*x[2]
            ref[(1, 2, 1, 3)]+=0.98431709626*x_ref[2]
            arg[(2, 0, 0, 0)]+=-0.748287677814*x[2]
            ref[(2, 0, 0, 0)]+=-0.748287677814*x_ref[2]
            arg[(2, 0, 0, 1)]+=-0.351037678848*x[2]
            ref[(2, 0, 0, 1)]+=-0.351037678848*x_ref[2]
            arg[(2, 0, 0, 2)]+=0.812486667755*x[2]
            ref[(2, 0, 0, 2)]+=0.812486667755*x_ref[2]
            arg[(2, 0, 0, 3)]+=-0.154289845249*x[2]
            ref[(2, 0, 0, 3)]+=-0.154289845249*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.257743633506*x[2]
            ref[(2, 0, 1, 0)]+=-0.257743633506*x_ref[2]
            arg[(2, 0, 1, 1)]+=-0.569853363955*x[2]
            ref[(2, 0, 1, 1)]+=-0.569853363955*x_ref[2]
            arg[(2, 0, 1, 2)]+=0.347621629036*x[2]
            ref[(2, 0, 1, 2)]+=0.347621629036*x_ref[2]
            arg[(2, 0, 1, 3)]+=0.189812561516*x[2]
            ref[(2, 0, 1, 3)]+=0.189812561516*x_ref[2]
            arg[(2, 1, 0, 0)]+=0.356016639057*x[2]
            ref[(2, 1, 0, 0)]+=0.356016639057*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.97194270757*x[2]
            ref[(2, 1, 0, 1)]+=-0.97194270757*x_ref[2]
            arg[(2, 1, 0, 2)]+=0.316239565158*x[2]
            ref[(2, 1, 0, 2)]+=0.316239565158*x_ref[2]
            arg[(2, 1, 0, 3)]+=-0.858841440431*x[2]
            ref[(2, 1, 0, 3)]+=-0.858841440431*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.337427032535*x[2]
            ref[(2, 1, 1, 0)]+=0.337427032535*x_ref[2]
            arg[(2, 1, 1, 1)]+=-0.426074795819*x[2]
            ref[(2, 1, 1, 1)]+=-0.426074795819*x_ref[2]
            arg[(2, 1, 1, 2)]+=-0.125375296453*x[2]
            ref[(2, 1, 1, 2)]+=-0.125375296453*x_ref[2]
            arg[(2, 1, 1, 3)]+=0.295663281036*x[2]
            ref[(2, 1, 1, 3)]+=0.295663281036*x_ref[2]
            arg[(2, 2, 0, 0)]+=0.930491682109*x[2]
            ref[(2, 2, 0, 0)]+=0.930491682109*x_ref[2]
            arg[(2, 2, 0, 1)]+=0.764973187926*x[2]
            ref[(2, 2, 0, 1)]+=0.764973187926*x_ref[2]
            arg[(2, 2, 0, 2)]+=0.0413592010137*x[2]
            ref[(2, 2, 0, 2)]+=0.0413592010137*x_ref[2]
            arg[(2, 2, 0, 3)]+=-0.8609198351*x[2]
            ref[(2, 2, 0, 3)]+=-0.8609198351*x_ref[2]
            arg[(2, 2, 1, 0)]+=0.0365010876546*x[2]
            ref[(2, 2, 1, 0)]+=0.0365010876546*x_ref[2]
            arg[(2, 2, 1, 1)]+=-0.710851923884*x[2]
            ref[(2, 2, 1, 1)]+=-0.710851923884*x_ref[2]
            arg[(2, 2, 1, 2)]+=0.948879557288*x[2]
            ref[(2, 2, 1, 2)]+=0.948879557288*x_ref[2]
            arg[(2, 2, 1, 3)]+=0.386404656918*x[2]
            ref[(2, 2, 1, 3)]+=0.386404656918*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

class Test_Util_Interpolation(Test_Util_Interpolation_noContact):
    RES_TOL=1.e-8

    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.366267785453-0.211649661019j)*x[0]**o + ((-0.966429432128+0.254832986117j))*x[0] + ((0.691224307345+0.358052434321j))*x[1]**o + ((-0.0278893987409-0.765603463263j))*x[1]
        ref=(0.366267785453-0.211649661019j)*x_ref[0]**o + ((-0.966429432128+0.254832986117j))*x_ref[0] + ((0.691224307345+0.358052434321j))*x_ref[1]**o + ((-0.0278893987409-0.765603463263j))*x_ref[1]
        if dim==3:
            arg+=((0.654537288537+0.623159659544j))*x[2]**o + ((0.598426373831+0.466366282024j))*x[2]
            ref+=((0.654537288537+0.623159659544j))*x_ref[2]**o + ((0.598426373831+0.466366282024j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=(0.0848565664668-0.671290979288j)*x[0]**o + ((-0.478263346064+0.595268770463j))*x[0] + ((-0.756520890005+0.756159929437j))*x[1]**o + ((0.194946860468+0.26030301842j))*x[1]
        ref[(0,)]=(0.0848565664668-0.671290979288j)*x_ref[0]**o + ((-0.478263346064+0.595268770463j))*x_ref[0] + ((-0.756520890005+0.756159929437j))*x_ref[1]**o + ((0.194946860468+0.26030301842j))*x_ref[1]
        arg[(1,)]=(0.153343168727-0.861281102682j)*x[0]**o + ((-0.660362508816+0.0733936629371j))*x[0] + ((-0.166446124726+0.357849867586j))*x[1]**o + ((-0.669053125014+0.0344882757253j))*x[1]
        ref[(1,)]=(0.153343168727-0.861281102682j)*x_ref[0]**o + ((-0.660362508816+0.0733936629371j))*x_ref[0] + ((-0.166446124726+0.357849867586j))*x_ref[1]**o + ((-0.669053125014+0.0344882757253j))*x_ref[1]
        arg[(2,)]=(0.223918785351+0.777687453953j)*x[0]**o + ((-0.593289732568-0.514958671796j))*x[0] + ((0.994735929432-0.77042940499j))*x[1]**o + ((-0.878112822109-0.67392777727j))*x[1]
        ref[(2,)]=(0.223918785351+0.777687453953j)*x_ref[0]**o + ((-0.593289732568-0.514958671796j))*x_ref[0] + ((0.994735929432-0.77042940499j))*x_ref[1]**o + ((-0.878112822109-0.67392777727j))*x_ref[1]
        arg[(3,)]=(-0.834464486747+0.386038500903j)*x[0]**o + ((0.639548086156-0.517334872371j))*x[0] + ((-0.194137202005+0.727079289527j))*x[1]**o + ((0.0974918579881-0.393221639425j))*x[1]
        ref[(3,)]=(-0.834464486747+0.386038500903j)*x_ref[0]**o + ((0.639548086156-0.517334872371j))*x_ref[0] + ((-0.194137202005+0.727079289527j))*x_ref[1]**o + ((0.0974918579881-0.393221639425j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.193845884975+0.644697259349j)*x[2]**o + ((-0.384115910322-0.236443581396j))*x[2]
            ref[(0,)]+=(-0.193845884975+0.644697259349j)*x_ref[2]**o + ((-0.384115910322-0.236443581396j))*x_ref[2]
            arg[(1,)]+=(-0.578552322206-0.154129645678j)*x[2]**o + ((0.0363462290283+0.924197859518j))*x[2]
            ref[(1,)]+=(-0.578552322206-0.154129645678j)*x_ref[2]**o + ((0.0363462290283+0.924197859518j))*x_ref[2]
            arg[(2,)]+=(-0.205086064361+0.860503492609j)*x[2]**o + ((-0.639222584406+0.413572318956j))*x[2]
            ref[(2,)]+=(-0.205086064361+0.860503492609j)*x_ref[2]**o + ((-0.639222584406+0.413572318956j))*x_ref[2]
            arg[(3,)]+=(-0.825804107237+0.701856524646j)*x[2]**o + ((-0.614171366082-0.304854872406j))*x[2]
            ref[(3,)]+=(-0.825804107237+0.701856524646j)*x_ref[2]**o + ((-0.614171366082-0.304854872406j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref = Data(0,(3, 4),w_ref)
        arg[(0, 0)]=(-0.625777086837+0.600248664474j)*x[0]**o + ((-0.150997818846+0.764910017901j))*x[0] + ((0.991819727306+0.304506617864j))*x[1]**o + ((-0.552236946263+0.596957647733j))*x[1]
        ref[(0, 0)]=(-0.625777086837+0.600248664474j)*x_ref[0]**o + ((-0.150997818846+0.764910017901j))*x_ref[0] + ((0.991819727306+0.304506617864j))*x_ref[1]**o + ((-0.552236946263+0.596957647733j))*x_ref[1]
        arg[(0, 1)]=(0.378612840184-0.776701943225j)*x[0]**o + ((-0.306589101369+0.280635978911j))*x[0] + ((-0.785996515984+0.837416700395j))*x[1]**o + ((-0.945667025153+0.937641031297j))*x[1]
        ref[(0, 1)]=(0.378612840184-0.776701943225j)*x_ref[0]**o + ((-0.306589101369+0.280635978911j))*x_ref[0] + ((-0.785996515984+0.837416700395j))*x_ref[1]**o + ((-0.945667025153+0.937641031297j))*x_ref[1]
        arg[(0, 2)]=(0.000387714579155+0.779397638885j)*x[0]**o + ((0.246210796745-0.264324614489j))*x[0] + ((0.255592315216+0.7914463834j))*x[1]**o + ((-0.0349521408552+0.961355614161j))*x[1]
        ref[(0, 2)]=(0.000387714579155+0.779397638885j)*x_ref[0]**o + ((0.246210796745-0.264324614489j))*x_ref[0] + ((0.255592315216+0.7914463834j))*x_ref[1]**o + ((-0.0349521408552+0.961355614161j))*x_ref[1]
        arg[(0, 3)]=(0.233099807279-0.0226130934497j)*x[0]**o + ((-0.931152538142+0.638308490666j))*x[0] + ((-0.0891133144686+0.575507597254j))*x[1]**o + ((0.161980532278-0.670895248859j))*x[1]
        ref[(0, 3)]=(0.233099807279-0.0226130934497j)*x_ref[0]**o + ((-0.931152538142+0.638308490666j))*x_ref[0] + ((-0.0891133144686+0.575507597254j))*x_ref[1]**o + ((0.161980532278-0.670895248859j))*x_ref[1]
        arg[(1, 0)]=(0.576751851169+0.158153088414j)*x[0]**o + ((0.332233813931-0.657389105057j))*x[0] + ((-0.350383483342+0.523418481386j))*x[1]**o + ((-0.756380894276-0.198314401927j))*x[1]
        ref[(1, 0)]=(0.576751851169+0.158153088414j)*x_ref[0]**o + ((0.332233813931-0.657389105057j))*x_ref[0] + ((-0.350383483342+0.523418481386j))*x_ref[1]**o + ((-0.756380894276-0.198314401927j))*x_ref[1]
        arg[(1, 1)]=(0.463151958789-0.631243995708j)*x[0]**o + ((0.666376795682+0.980784858556j))*x[0] + ((0.560541705155-0.894201496844j))*x[1]**o + ((-0.219643699618-0.583464593206j))*x[1]
        ref[(1, 1)]=(0.463151958789-0.631243995708j)*x_ref[0]**o + ((0.666376795682+0.980784858556j))*x_ref[0] + ((0.560541705155-0.894201496844j))*x_ref[1]**o + ((-0.219643699618-0.583464593206j))*x_ref[1]
        arg[(1, 2)]=(-0.881718409316+0.431024713643j)*x[0]**o + ((0.589774770085+0.944935066771j))*x[0] + ((-0.0122325179308-0.492248142545j))*x[1]**o + ((-0.820069830251-0.165646975253j))*x[1]
        ref[(1, 2)]=(-0.881718409316+0.431024713643j)*x_ref[0]**o + ((0.589774770085+0.944935066771j))*x_ref[0] + ((-0.0122325179308-0.492248142545j))*x_ref[1]**o + ((-0.820069830251-0.165646975253j))*x_ref[1]
        arg[(1, 3)]=(0.65790171146-0.212558161285j)*x[0]**o + ((0.712398433773-0.263013028742j))*x[0] + ((-0.0956887239175-0.602011068132j))*x[1]**o + ((-0.983257467775+0.796561663149j))*x[1]
        ref[(1, 3)]=(0.65790171146-0.212558161285j)*x_ref[0]**o + ((0.712398433773-0.263013028742j))*x_ref[0] + ((-0.0956887239175-0.602011068132j))*x_ref[1]**o + ((-0.983257467775+0.796561663149j))*x_ref[1]
        arg[(2, 0)]=(-0.951638661002-0.413230093029j)*x[0]**o + ((0.10268695053-0.158490261208j))*x[0] + ((0.591528219798+0.826812664638j))*x[1]**o + ((0.85644044365+0.266144912809j))*x[1]
        ref[(2, 0)]=(-0.951638661002-0.413230093029j)*x_ref[0]**o + ((0.10268695053-0.158490261208j))*x_ref[0] + ((0.591528219798+0.826812664638j))*x_ref[1]**o + ((0.85644044365+0.266144912809j))*x_ref[1]
        arg[(2, 1)]=(0.412052548866+0.242533506625j)*x[0]**o + ((-0.0949107981345+0.698348818986j))*x[0] + ((0.171604064165-0.471154203882j))*x[1]**o + ((-0.133385824002-0.481939769765j))*x[1]
        ref[(2, 1)]=(0.412052548866+0.242533506625j)*x_ref[0]**o + ((-0.0949107981345+0.698348818986j))*x_ref[0] + ((0.171604064165-0.471154203882j))*x_ref[1]**o + ((-0.133385824002-0.481939769765j))*x_ref[1]
        arg[(2, 2)]=(-0.965387163622-0.380981131774j)*x[0]**o + ((0.320965933979+0.868962006926j))*x[0] + ((0.591592446142+0.189135900221j))*x[1]**o + ((-0.129259919217+0.58752281925j))*x[1]
        ref[(2, 2)]=(-0.965387163622-0.380981131774j)*x_ref[0]**o + ((0.320965933979+0.868962006926j))*x_ref[0] + ((0.591592446142+0.189135900221j))*x_ref[1]**o + ((-0.129259919217+0.58752281925j))*x_ref[1]
        arg[(2, 3)]=(-0.65858685367-0.314658585675j)*x[0]**o + ((0.0246471726706+0.0143908383051j))*x[0] + ((-0.0101793606141-0.0544272060816j))*x[1]**o + ((-0.0314806507528+0.631628559251j))*x[1]
        ref[(2, 3)]=(-0.65858685367-0.314658585675j)*x_ref[0]**o + ((0.0246471726706+0.0143908383051j))*x_ref[0] + ((-0.0101793606141-0.0544272060816j))*x_ref[1]**o + ((-0.0314806507528+0.631628559251j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(-0.603940232798+0.304367368316j)*x[2]**o + ((0.9591945976-0.588131015081j))*x[2]
            ref[(0, 0)]+=(-0.603940232798+0.304367368316j)*x_ref[2]**o + ((0.9591945976-0.588131015081j))*x_ref[2]
            arg[(0, 1)]+=(-0.625397890291-0.86041534392j)*x[2]**o + ((0.26223691701+0.423530041385j))*x[2]
            ref[(0, 1)]+=(-0.625397890291-0.86041534392j)*x_ref[2]**o + ((0.26223691701+0.423530041385j))*x_ref[2]
            arg[(0, 2)]+=(-0.0824562900944+0.580252873081j)*x[2]**o + ((-0.396782744494+0.29396094066j))*x[2]
            ref[(0, 2)]+=(-0.0824562900944+0.580252873081j)*x_ref[2]**o + ((-0.396782744494+0.29396094066j))*x_ref[2]
            arg[(0, 3)]+=(0.190489457954-0.0450963572611j)*x[2]**o + ((0.800470826492-0.17657978436j))*x[2]
            ref[(0, 3)]+=(0.190489457954-0.0450963572611j)*x_ref[2]**o + ((0.800470826492-0.17657978436j))*x_ref[2]
            arg[(1, 0)]+=(-0.423733732566-0.68219169692j)*x[2]**o + ((-0.555087725522+0.246388597247j))*x[2]
            ref[(1, 0)]+=(-0.423733732566-0.68219169692j)*x_ref[2]**o + ((-0.555087725522+0.246388597247j))*x_ref[2]
            arg[(1, 1)]+=(-0.735181905304-0.879827192874j)*x[2]**o + ((-0.250281642458+0.121773265258j))*x[2]
            ref[(1, 1)]+=(-0.735181905304-0.879827192874j)*x_ref[2]**o + ((-0.250281642458+0.121773265258j))*x_ref[2]
            arg[(1, 2)]+=(0.374910767779-0.368995010437j)*x[2]**o + ((-0.385226145584+0.0669417413465j))*x[2]
            ref[(1, 2)]+=(0.374910767779-0.368995010437j)*x_ref[2]**o + ((-0.385226145584+0.0669417413465j))*x_ref[2]
            arg[(1, 3)]+=(0.334001679198+0.955856863202j)*x[2]**o + ((0.299124883562-0.767048199473j))*x[2]
            ref[(1, 3)]+=(0.334001679198+0.955856863202j)*x_ref[2]**o + ((0.299124883562-0.767048199473j))*x_ref[2]
            arg[(2, 0)]+=(0.104135300109-0.426556661252j)*x[2]**o + ((0.605626397646+0.0611202678171j))*x[2]
            ref[(2, 0)]+=(0.104135300109-0.426556661252j)*x_ref[2]**o + ((0.605626397646+0.0611202678171j))*x_ref[2]
            arg[(2, 1)]+=(-0.633712736148+0.433004927848j)*x[2]**o + ((-0.937592570534-0.811375186733j))*x[2]
            ref[(2, 1)]+=(-0.633712736148+0.433004927848j)*x_ref[2]**o + ((-0.937592570534-0.811375186733j))*x_ref[2]
            arg[(2, 2)]+=(-0.686764756896+0.558277410086j)*x[2]**o + ((0.378451480408+0.930189188644j))*x[2]
            ref[(2, 2)]+=(-0.686764756896+0.558277410086j)*x_ref[2]**o + ((0.378451480408+0.930189188644j))*x_ref[2]
            arg[(2, 3)]+=(-0.0155500689+0.853433534004j)*x[2]**o + ((-0.472470849125-0.501369720035j))*x[2]
            ref[(2, 3)]+=(-0.0155500689+0.853433534004j)*x_ref[2]**o + ((-0.472470849125-0.501369720035j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 3),w)
        ref = Data(0,(3, 2, 3),w_ref)
        arg[(0, 0, 0)]=(0.841958973288-0.931122103599j)*x[0]**o + ((-0.640040736832-0.23693502113j))*x[0] + ((0.0749402606208-0.656654344841j))*x[1]**o + ((-0.196905596106+0.98137376162j))*x[1]
        ref[(0, 0, 0)]=(0.841958973288-0.931122103599j)*x_ref[0]**o + ((-0.640040736832-0.23693502113j))*x_ref[0] + ((0.0749402606208-0.656654344841j))*x_ref[1]**o + ((-0.196905596106+0.98137376162j))*x_ref[1]
        arg[(0, 0, 1)]=(0.488605626819-0.0053604287459j)*x[0]**o + ((0.358748040655-0.127821154715j))*x[0] + ((-0.48905577362-0.79551805008j))*x[1]**o + ((0.144506933331+0.0657856956126j))*x[1]
        ref[(0, 0, 1)]=(0.488605626819-0.0053604287459j)*x_ref[0]**o + ((0.358748040655-0.127821154715j))*x_ref[0] + ((-0.48905577362-0.79551805008j))*x_ref[1]**o + ((0.144506933331+0.0657856956126j))*x_ref[1]
        arg[(0, 0, 2)]=(-0.100259580069+0.808939767451j)*x[0]**o + ((-0.388842350633+0.94262715739j))*x[0] + ((0.501179205153-0.586901789234j))*x[1]**o + ((0.535775845653+0.852444352018j))*x[1]
        ref[(0, 0, 2)]=(-0.100259580069+0.808939767451j)*x_ref[0]**o + ((-0.388842350633+0.94262715739j))*x_ref[0] + ((0.501179205153-0.586901789234j))*x_ref[1]**o + ((0.535775845653+0.852444352018j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.767628640623-0.249339970269j)*x[0]**o + ((-0.457312660597+0.27605761646j))*x[0] + ((-0.417881524182+0.273831845528j))*x[1]**o + ((0.00939531219059+0.55227488251j))*x[1]
        ref[(0, 1, 0)]=(-0.767628640623-0.249339970269j)*x_ref[0]**o + ((-0.457312660597+0.27605761646j))*x_ref[0] + ((-0.417881524182+0.273831845528j))*x_ref[1]**o + ((0.00939531219059+0.55227488251j))*x_ref[1]
        arg[(0, 1, 1)]=(0.343032334352-0.505447501346j)*x[0]**o + ((-0.470561685548-0.455152521774j))*x[0] + ((0.466099229522-0.0734489728347j))*x[1]**o + ((-0.277415465028+0.331802000935j))*x[1]
        ref[(0, 1, 1)]=(0.343032334352-0.505447501346j)*x_ref[0]**o + ((-0.470561685548-0.455152521774j))*x_ref[0] + ((0.466099229522-0.0734489728347j))*x_ref[1]**o + ((-0.277415465028+0.331802000935j))*x_ref[1]
        arg[(0, 1, 2)]=(0.893881072763-0.489670080605j)*x[0]**o + ((-0.463361433424+0.471660135823j))*x[0] + ((-0.999292274956+0.395169994581j))*x[1]**o + ((0.0172064939639-0.125519021669j))*x[1]
        ref[(0, 1, 2)]=(0.893881072763-0.489670080605j)*x_ref[0]**o + ((-0.463361433424+0.471660135823j))*x_ref[0] + ((-0.999292274956+0.395169994581j))*x_ref[1]**o + ((0.0172064939639-0.125519021669j))*x_ref[1]
        arg[(1, 0, 0)]=(0.880572494668-0.966442313803j)*x[0]**o + ((0.78751154555+0.995378240865j))*x[0] + ((-0.968519461394-0.232889653509j))*x[1]**o + ((0.771413837009-0.825576496769j))*x[1]
        ref[(1, 0, 0)]=(0.880572494668-0.966442313803j)*x_ref[0]**o + ((0.78751154555+0.995378240865j))*x_ref[0] + ((-0.968519461394-0.232889653509j))*x_ref[1]**o + ((0.771413837009-0.825576496769j))*x_ref[1]
        arg[(1, 0, 1)]=(0.990576947611+0.425286268282j)*x[0]**o + ((-0.545823515464+0.811911590911j))*x[0] + ((-0.222695079811+0.994089519239j))*x[1]**o + ((0.0280441193104+0.605134713571j))*x[1]
        ref[(1, 0, 1)]=(0.990576947611+0.425286268282j)*x_ref[0]**o + ((-0.545823515464+0.811911590911j))*x_ref[0] + ((-0.222695079811+0.994089519239j))*x_ref[1]**o + ((0.0280441193104+0.605134713571j))*x_ref[1]
        arg[(1, 0, 2)]=(0.431092814791-0.308219573823j)*x[0]**o + ((-0.179013473619-0.112565670663j))*x[0] + ((0.660099666322-0.848485578854j))*x[1]**o + ((-0.582317097414-0.551847371159j))*x[1]
        ref[(1, 0, 2)]=(0.431092814791-0.308219573823j)*x_ref[0]**o + ((-0.179013473619-0.112565670663j))*x_ref[0] + ((0.660099666322-0.848485578854j))*x_ref[1]**o + ((-0.582317097414-0.551847371159j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.21642473-0.0185778268903j)*x[0]**o + ((0.138935575365+0.207201755282j))*x[0] + ((-0.495182538364+0.961133789656j))*x[1]**o + ((0.377941995571-0.716052922437j))*x[1]
        ref[(1, 1, 0)]=(-0.21642473-0.0185778268903j)*x_ref[0]**o + ((0.138935575365+0.207201755282j))*x_ref[0] + ((-0.495182538364+0.961133789656j))*x_ref[1]**o + ((0.377941995571-0.716052922437j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.466322866348+0.685171527677j)*x[0]**o + ((-0.526924609443+0.464163491781j))*x[0] + ((0.749970261305-0.237123235972j))*x[1]**o + ((0.796406752731+0.255506225865j))*x[1]
        ref[(1, 1, 1)]=(-0.466322866348+0.685171527677j)*x_ref[0]**o + ((-0.526924609443+0.464163491781j))*x_ref[0] + ((0.749970261305-0.237123235972j))*x_ref[1]**o + ((0.796406752731+0.255506225865j))*x_ref[1]
        arg[(1, 1, 2)]=(0.361523931943-0.577708170363j)*x[0]**o + ((0.215731401732+0.443286319124j))*x[0] + ((-0.0129892854582-0.989129267763j))*x[1]**o + ((0.908846176317-0.536514467869j))*x[1]
        ref[(1, 1, 2)]=(0.361523931943-0.577708170363j)*x_ref[0]**o + ((0.215731401732+0.443286319124j))*x_ref[0] + ((-0.0129892854582-0.989129267763j))*x_ref[1]**o + ((0.908846176317-0.536514467869j))*x_ref[1]
        arg[(2, 0, 0)]=(-0.244803747403-0.543847077208j)*x[0]**o + ((-0.796404671534+0.550886523689j))*x[0] + ((-0.434046247674-0.254169302891j))*x[1]**o + ((0.730886792676+0.291655928238j))*x[1]
        ref[(2, 0, 0)]=(-0.244803747403-0.543847077208j)*x_ref[0]**o + ((-0.796404671534+0.550886523689j))*x_ref[0] + ((-0.434046247674-0.254169302891j))*x_ref[1]**o + ((0.730886792676+0.291655928238j))*x_ref[1]
        arg[(2, 0, 1)]=(0.76520343491-0.623433563681j)*x[0]**o + ((0.324851469617-0.495917022519j))*x[0] + ((-0.786787705765+0.371692994179j))*x[1]**o + ((0.332733859404-0.976818870152j))*x[1]
        ref[(2, 0, 1)]=(0.76520343491-0.623433563681j)*x_ref[0]**o + ((0.324851469617-0.495917022519j))*x_ref[0] + ((-0.786787705765+0.371692994179j))*x_ref[1]**o + ((0.332733859404-0.976818870152j))*x_ref[1]
        arg[(2, 0, 2)]=(0.447883209835-0.899769282494j)*x[0]**o + ((0.547273571904+0.726183999541j))*x[0] + ((0.596883648871-0.694004131484j))*x[1]**o + ((0.0349190261032+0.271445192152j))*x[1]
        ref[(2, 0, 2)]=(0.447883209835-0.899769282494j)*x_ref[0]**o + ((0.547273571904+0.726183999541j))*x_ref[0] + ((0.596883648871-0.694004131484j))*x_ref[1]**o + ((0.0349190261032+0.271445192152j))*x_ref[1]
        arg[(2, 1, 0)]=(0.0750363126043-0.730897222023j)*x[0]**o + ((0.942073041454-0.690290874807j))*x[0] + ((0.596685342405+0.994158954932j))*x[1]**o + ((0.160641807252+0.507951032261j))*x[1]
        ref[(2, 1, 0)]=(0.0750363126043-0.730897222023j)*x_ref[0]**o + ((0.942073041454-0.690290874807j))*x_ref[0] + ((0.596685342405+0.994158954932j))*x_ref[1]**o + ((0.160641807252+0.507951032261j))*x_ref[1]
        arg[(2, 1, 1)]=(0.0324552774448-0.972448097951j)*x[0]**o + ((0.858962085854-0.909898398831j))*x[0] + ((-0.418052604657+0.0687300421447j))*x[1]**o + ((-0.819337847371-0.556295469289j))*x[1]
        ref[(2, 1, 1)]=(0.0324552774448-0.972448097951j)*x_ref[0]**o + ((0.858962085854-0.909898398831j))*x_ref[0] + ((-0.418052604657+0.0687300421447j))*x_ref[1]**o + ((-0.819337847371-0.556295469289j))*x_ref[1]
        arg[(2, 1, 2)]=(0.287838860514+0.355099528433j)*x[0]**o + ((0.351218346345+0.235539131581j))*x[0] + ((-0.955668798312-0.323044320836j))*x[1]**o + ((0.391498766055+0.856813765282j))*x[1]
        ref[(2, 1, 2)]=(0.287838860514+0.355099528433j)*x_ref[0]**o + ((0.351218346345+0.235539131581j))*x_ref[0] + ((-0.955668798312-0.323044320836j))*x_ref[1]**o + ((0.391498766055+0.856813765282j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.877585986323+0.575725696891j)*x[2]**o + ((0.134351211473-0.544992115374j))*x[2]
            ref[(0, 0, 0)]+=(-0.877585986323+0.575725696891j)*x_ref[2]**o + ((0.134351211473-0.544992115374j))*x_ref[2]
            arg[(0, 0, 1)]+=(0.037032124754+0.773530577813j)*x[2]**o + ((-0.0124188981267-0.794118953695j))*x[2]
            ref[(0, 0, 1)]+=(0.037032124754+0.773530577813j)*x_ref[2]**o + ((-0.0124188981267-0.794118953695j))*x_ref[2]
            arg[(0, 0, 2)]+=(-0.31558109581+0.908882184818j)*x[2]**o + ((-0.0610340236637-0.65059996913j))*x[2]
            ref[(0, 0, 2)]+=(-0.31558109581+0.908882184818j)*x_ref[2]**o + ((-0.0610340236637-0.65059996913j))*x_ref[2]
            arg[(0, 1, 0)]+=(0.183739189775+0.389405559825j)*x[2]**o + ((0.0172253735432-0.0448639719972j))*x[2]
            ref[(0, 1, 0)]+=(0.183739189775+0.389405559825j)*x_ref[2]**o + ((0.0172253735432-0.0448639719972j))*x_ref[2]
            arg[(0, 1, 1)]+=(0.834170097289-0.519148134315j)*x[2]**o + ((-0.87608531374-0.360041314921j))*x[2]
            ref[(0, 1, 1)]+=(0.834170097289-0.519148134315j)*x_ref[2]**o + ((-0.87608531374-0.360041314921j))*x_ref[2]
            arg[(0, 1, 2)]+=(-0.949480774549-0.476233950631j)*x[2]**o + ((-0.250281598743-0.924539546591j))*x[2]
            ref[(0, 1, 2)]+=(-0.949480774549-0.476233950631j)*x_ref[2]**o + ((-0.250281598743-0.924539546591j))*x_ref[2]
            arg[(1, 0, 0)]+=(-0.543165073187+0.593714163665j)*x[2]**o + ((-0.158339481312+0.170893134037j))*x[2]
            ref[(1, 0, 0)]+=(-0.543165073187+0.593714163665j)*x_ref[2]**o + ((-0.158339481312+0.170893134037j))*x_ref[2]
            arg[(1, 0, 1)]+=(0.118842625504+0.113461590508j)*x[2]**o + ((-0.35976006759+0.770065711139j))*x[2]
            ref[(1, 0, 1)]+=(0.118842625504+0.113461590508j)*x_ref[2]**o + ((-0.35976006759+0.770065711139j))*x_ref[2]
            arg[(1, 0, 2)]+=(-0.187229528766-0.0871853680988j)*x[2]**o + ((0.792265227392+0.171417120799j))*x[2]
            ref[(1, 0, 2)]+=(-0.187229528766-0.0871853680988j)*x_ref[2]**o + ((0.792265227392+0.171417120799j))*x_ref[2]
            arg[(1, 1, 0)]+=(-0.910731002996+0.621438489847j)*x[2]**o + ((-0.787236384737+0.757530005268j))*x[2]
            ref[(1, 1, 0)]+=(-0.910731002996+0.621438489847j)*x_ref[2]**o + ((-0.787236384737+0.757530005268j))*x_ref[2]
            arg[(1, 1, 1)]+=(0.775297755123+0.987985647442j)*x[2]**o + ((-0.361932746031+0.557469548822j))*x[2]
            ref[(1, 1, 1)]+=(0.775297755123+0.987985647442j)*x_ref[2]**o + ((-0.361932746031+0.557469548822j))*x_ref[2]
            arg[(1, 1, 2)]+=(0.481456353553-0.868432054011j)*x[2]**o + ((0.861881461057+0.357965203691j))*x[2]
            ref[(1, 1, 2)]+=(0.481456353553-0.868432054011j)*x_ref[2]**o + ((0.861881461057+0.357965203691j))*x_ref[2]
            arg[(2, 0, 0)]+=(0.178727562898-0.597908986521j)*x[2]**o + ((-0.920704643977-0.888922518913j))*x[2]
            ref[(2, 0, 0)]+=(0.178727562898-0.597908986521j)*x_ref[2]**o + ((-0.920704643977-0.888922518913j))*x_ref[2]
            arg[(2, 0, 1)]+=(0.129057032106-0.66279934161j)*x[2]**o + ((0.119069721637-0.793315887697j))*x[2]
            ref[(2, 0, 1)]+=(0.129057032106-0.66279934161j)*x_ref[2]**o + ((0.119069721637-0.793315887697j))*x_ref[2]
            arg[(2, 0, 2)]+=(-0.218937834017+0.399240111284j)*x[2]**o + ((-0.85827091749-0.847767873405j))*x[2]
            ref[(2, 0, 2)]+=(-0.218937834017+0.399240111284j)*x_ref[2]**o + ((-0.85827091749-0.847767873405j))*x_ref[2]
            arg[(2, 1, 0)]+=(-0.0590423592011-0.812803175458j)*x[2]**o + ((0.621747102312+0.50409286524j))*x[2]
            ref[(2, 1, 0)]+=(-0.0590423592011-0.812803175458j)*x_ref[2]**o + ((0.621747102312+0.50409286524j))*x_ref[2]
            arg[(2, 1, 1)]+=(-0.698925995356+0.34419841487j)*x[2]**o + ((0.327808677167-0.810638930723j))*x[2]
            ref[(2, 1, 1)]+=(-0.698925995356+0.34419841487j)*x_ref[2]**o + ((0.327808677167-0.810638930723j))*x_ref[2]
            arg[(2, 1, 2)]+=(-0.650763923888-0.840508962433j)*x[2]**o + ((-0.818686524406+0.179655856624j))*x[2]
            ref[(2, 1, 2)]+=(-0.650763923888-0.840508962433j)*x_ref[2]**o + ((-0.818686524406+0.179655856624j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 3, 3),w)
        ref = Data(0,(3, 3, 3, 3),w_ref)
        arg[(0, 0, 0, 0)]=(-0.976804524097-0.751850152013j)*x[0]**o + ((0.837061660701+0.497969400256j))*x[0] + ((0.935856488392+0.371530744061j))*x[1]**o + ((0.743298306391+0.21791109809j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.976804524097-0.751850152013j)*x_ref[0]**o + ((0.837061660701+0.497969400256j))*x_ref[0] + ((0.935856488392+0.371530744061j))*x_ref[1]**o + ((0.743298306391+0.21791109809j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(0.567549021005-0.956929088428j)*x[0]**o + ((-0.563289564425-0.435095287846j))*x[0] + ((0.622289976748-0.464464018348j))*x[1]**o + ((-0.412502948569+0.986368915081j))*x[1]
        ref[(0, 0, 0, 1)]=(0.567549021005-0.956929088428j)*x_ref[0]**o + ((-0.563289564425-0.435095287846j))*x_ref[0] + ((0.622289976748-0.464464018348j))*x_ref[1]**o + ((-0.412502948569+0.986368915081j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.0814120625517+0.419045448824j)*x[0]**o + ((-0.33076002818-0.377669435292j))*x[0] + ((-0.579940138604-0.856019061609j))*x[1]**o + ((0.729097313273+0.57917837224j))*x[1]
        ref[(0, 0, 0, 2)]=(0.0814120625517+0.419045448824j)*x_ref[0]**o + ((-0.33076002818-0.377669435292j))*x_ref[0] + ((-0.579940138604-0.856019061609j))*x_ref[1]**o + ((0.729097313273+0.57917837224j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.189199649116-0.819022066839j)*x[0]**o + ((-0.194445325727-0.248244454265j))*x[0] + ((0.704458687116+0.59151174152j))*x[1]**o + ((0.731769696629+0.912131397889j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.189199649116-0.819022066839j)*x_ref[0]**o + ((-0.194445325727-0.248244454265j))*x_ref[0] + ((0.704458687116+0.59151174152j))*x_ref[1]**o + ((0.731769696629+0.912131397889j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.825014588688-0.913155821048j)*x[0]**o + ((-0.462179073964+0.869041864068j))*x[0] + ((0.790111234928-0.338833444476j))*x[1]**o + ((0.228945396869+0.506316913352j))*x[1]
        ref[(0, 0, 1, 1)]=(0.825014588688-0.913155821048j)*x_ref[0]**o + ((-0.462179073964+0.869041864068j))*x_ref[0] + ((0.790111234928-0.338833444476j))*x_ref[1]**o + ((0.228945396869+0.506316913352j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(0.305738798612+0.912871218207j)*x[0]**o + ((-0.639676505412-0.0218206766183j))*x[0] + ((0.88756167951+0.171930291176j))*x[1]**o + ((0.879071180769+0.829465322111j))*x[1]
        ref[(0, 0, 1, 2)]=(0.305738798612+0.912871218207j)*x_ref[0]**o + ((-0.639676505412-0.0218206766183j))*x_ref[0] + ((0.88756167951+0.171930291176j))*x_ref[1]**o + ((0.879071180769+0.829465322111j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(0.787168007761-0.775360879414j)*x[0]**o + ((0.369155189625-0.878693601883j))*x[0] + ((-0.163243123921+0.784536717017j))*x[1]**o + ((-0.705198158144+0.231264436784j))*x[1]
        ref[(0, 0, 2, 0)]=(0.787168007761-0.775360879414j)*x_ref[0]**o + ((0.369155189625-0.878693601883j))*x_ref[0] + ((-0.163243123921+0.784536717017j))*x_ref[1]**o + ((-0.705198158144+0.231264436784j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(0.319866125515+0.671059982969j)*x[0]**o + ((-0.644655294563+0.847331568853j))*x[0] + ((0.448241343586-0.400744957243j))*x[1]**o + ((-0.291305519101+0.849329315635j))*x[1]
        ref[(0, 0, 2, 1)]=(0.319866125515+0.671059982969j)*x_ref[0]**o + ((-0.644655294563+0.847331568853j))*x_ref[0] + ((0.448241343586-0.400744957243j))*x_ref[1]**o + ((-0.291305519101+0.849329315635j))*x_ref[1]
        arg[(0, 0, 2, 2)]=(-0.862739191053+0.268194536479j)*x[0]**o + ((0.372854148908+0.744500855103j))*x[0] + ((-0.0675885286186-0.799041058227j))*x[1]**o + ((0.970654996922-0.514252329821j))*x[1]
        ref[(0, 0, 2, 2)]=(-0.862739191053+0.268194536479j)*x_ref[0]**o + ((0.372854148908+0.744500855103j))*x_ref[0] + ((-0.0675885286186-0.799041058227j))*x_ref[1]**o + ((0.970654996922-0.514252329821j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(-0.344027954531-0.526630247178j)*x[0]**o + ((0.645331755811-0.480063489512j))*x[0] + ((0.520744452474+0.522527582896j))*x[1]**o + ((-0.695584004597-0.890715647914j))*x[1]
        ref[(0, 1, 0, 0)]=(-0.344027954531-0.526630247178j)*x_ref[0]**o + ((0.645331755811-0.480063489512j))*x_ref[0] + ((0.520744452474+0.522527582896j))*x_ref[1]**o + ((-0.695584004597-0.890715647914j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.145937924907-0.647518783531j)*x[0]**o + ((-0.83118883586-0.0867651956233j))*x[0] + ((-0.35369542133+0.496339786529j))*x[1]**o + ((0.190700029638-0.100192062142j))*x[1]
        ref[(0, 1, 0, 1)]=(0.145937924907-0.647518783531j)*x_ref[0]**o + ((-0.83118883586-0.0867651956233j))*x_ref[0] + ((-0.35369542133+0.496339786529j))*x_ref[1]**o + ((0.190700029638-0.100192062142j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(0.502865699075+0.543506977969j)*x[0]**o + ((0.662842867211+0.234177940967j))*x[0] + ((-0.579559778822+0.459267390284j))*x[1]**o + ((0.279534975776+0.287925391038j))*x[1]
        ref[(0, 1, 0, 2)]=(0.502865699075+0.543506977969j)*x_ref[0]**o + ((0.662842867211+0.234177940967j))*x_ref[0] + ((-0.579559778822+0.459267390284j))*x_ref[1]**o + ((0.279534975776+0.287925391038j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.428012760145-0.976519879152j)*x[0]**o + ((0.594599932384+0.252402097278j))*x[0] + ((-0.337251634626+0.985130876916j))*x[1]**o + ((0.60885992526+0.189491328463j))*x[1]
        ref[(0, 1, 1, 0)]=(0.428012760145-0.976519879152j)*x_ref[0]**o + ((0.594599932384+0.252402097278j))*x_ref[0] + ((-0.337251634626+0.985130876916j))*x_ref[1]**o + ((0.60885992526+0.189491328463j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.671506289158+0.794708518078j)*x[0]**o + ((0.127773960004-0.165632023689j))*x[0] + ((0.741053888035-0.479380600579j))*x[1]**o + ((0.187813431631+0.478679022862j))*x[1]
        ref[(0, 1, 1, 1)]=(0.671506289158+0.794708518078j)*x_ref[0]**o + ((0.127773960004-0.165632023689j))*x_ref[0] + ((0.741053888035-0.479380600579j))*x_ref[1]**o + ((0.187813431631+0.478679022862j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(0.812984155613+0.366092377697j)*x[0]**o + ((0.738916559221+0.231120748049j))*x[0] + ((0.417040341748-0.817276647906j))*x[1]**o + ((-0.474520786891+0.0992821969705j))*x[1]
        ref[(0, 1, 1, 2)]=(0.812984155613+0.366092377697j)*x_ref[0]**o + ((0.738916559221+0.231120748049j))*x_ref[0] + ((0.417040341748-0.817276647906j))*x_ref[1]**o + ((-0.474520786891+0.0992821969705j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(-0.78064481955-0.160376059737j)*x[0]**o + ((0.508181690038-0.996758599077j))*x[0] + ((0.488881911748+0.443412603815j))*x[1]**o + ((-0.873350455672-0.942385495117j))*x[1]
        ref[(0, 1, 2, 0)]=(-0.78064481955-0.160376059737j)*x_ref[0]**o + ((0.508181690038-0.996758599077j))*x_ref[0] + ((0.488881911748+0.443412603815j))*x_ref[1]**o + ((-0.873350455672-0.942385495117j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(0.42874007034+0.568082804788j)*x[0]**o + ((0.376907126415+0.133641219346j))*x[0] + ((-0.70111929474-0.977212587597j))*x[1]**o + ((-0.164521271181-0.0182118199158j))*x[1]
        ref[(0, 1, 2, 1)]=(0.42874007034+0.568082804788j)*x_ref[0]**o + ((0.376907126415+0.133641219346j))*x_ref[0] + ((-0.70111929474-0.977212587597j))*x_ref[1]**o + ((-0.164521271181-0.0182118199158j))*x_ref[1]
        arg[(0, 1, 2, 2)]=(-0.736922868529-0.599789344174j)*x[0]**o + ((0.671348265245-0.289309393473j))*x[0] + ((0.621218776634+0.0539121094746j))*x[1]**o + ((0.331420778253-0.576643802198j))*x[1]
        ref[(0, 1, 2, 2)]=(-0.736922868529-0.599789344174j)*x_ref[0]**o + ((0.671348265245-0.289309393473j))*x_ref[0] + ((0.621218776634+0.0539121094746j))*x_ref[1]**o + ((0.331420778253-0.576643802198j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.277182830611-0.41776531601j)*x[0]**o + ((-0.10130159438-0.65206734342j))*x[0] + ((-0.739855094858+0.293932463614j))*x[1]**o + ((0.0531963490091-0.420908568054j))*x[1]
        ref[(0, 2, 0, 0)]=(0.277182830611-0.41776531601j)*x_ref[0]**o + ((-0.10130159438-0.65206734342j))*x_ref[0] + ((-0.739855094858+0.293932463614j))*x_ref[1]**o + ((0.0531963490091-0.420908568054j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(-0.725698366283-0.33358900549j)*x[0]**o + ((0.683832364204-0.568980316559j))*x[0] + ((-0.831169201162+0.746950566259j))*x[1]**o + ((0.809281909295+0.0657133791766j))*x[1]
        ref[(0, 2, 0, 1)]=(-0.725698366283-0.33358900549j)*x_ref[0]**o + ((0.683832364204-0.568980316559j))*x_ref[0] + ((-0.831169201162+0.746950566259j))*x_ref[1]**o + ((0.809281909295+0.0657133791766j))*x_ref[1]
        arg[(0, 2, 0, 2)]=(-0.250945088971+0.26201623248j)*x[0]**o + ((-0.663726725467+0.873431844972j))*x[0] + ((0.148158206292+0.00015630574704j))*x[1]**o + ((0.929105688173-0.80687766387j))*x[1]
        ref[(0, 2, 0, 2)]=(-0.250945088971+0.26201623248j)*x_ref[0]**o + ((-0.663726725467+0.873431844972j))*x_ref[0] + ((0.148158206292+0.00015630574704j))*x_ref[1]**o + ((0.929105688173-0.80687766387j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.125545688046+0.193799863282j)*x[0]**o + ((0.412778082984+0.205825417578j))*x[0] + ((-0.0195613813331-0.112209588874j))*x[1]**o + ((0.278401366109-0.414862867499j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.125545688046+0.193799863282j)*x_ref[0]**o + ((0.412778082984+0.205825417578j))*x_ref[0] + ((-0.0195613813331-0.112209588874j))*x_ref[1]**o + ((0.278401366109-0.414862867499j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(-0.558388815099+0.0447351948892j)*x[0]**o + ((0.663233562254+0.783464779808j))*x[0] + ((-0.740792824777-0.976873918118j))*x[1]**o + ((0.488313508353+0.752159099407j))*x[1]
        ref[(0, 2, 1, 1)]=(-0.558388815099+0.0447351948892j)*x_ref[0]**o + ((0.663233562254+0.783464779808j))*x_ref[0] + ((-0.740792824777-0.976873918118j))*x_ref[1]**o + ((0.488313508353+0.752159099407j))*x_ref[1]
        arg[(0, 2, 1, 2)]=(0.761718099588+0.438051843934j)*x[0]**o + ((-0.963155914412+0.893044141762j))*x[0] + ((0.031257308018-0.226476994502j))*x[1]**o + ((-0.423333076638-0.398079825389j))*x[1]
        ref[(0, 2, 1, 2)]=(0.761718099588+0.438051843934j)*x_ref[0]**o + ((-0.963155914412+0.893044141762j))*x_ref[0] + ((0.031257308018-0.226476994502j))*x_ref[1]**o + ((-0.423333076638-0.398079825389j))*x_ref[1]
        arg[(0, 2, 2, 0)]=(-0.77245941021-0.309440367745j)*x[0]**o + ((-0.511864192867+0.0116438426537j))*x[0] + ((0.11282500636-0.589833702676j))*x[1]**o + ((-0.706517614256-0.0253310774248j))*x[1]
        ref[(0, 2, 2, 0)]=(-0.77245941021-0.309440367745j)*x_ref[0]**o + ((-0.511864192867+0.0116438426537j))*x_ref[0] + ((0.11282500636-0.589833702676j))*x_ref[1]**o + ((-0.706517614256-0.0253310774248j))*x_ref[1]
        arg[(0, 2, 2, 1)]=(-0.660695586653+0.142350628364j)*x[0]**o + ((0.922142061136-0.0312540900772j))*x[0] + ((0.0708974045281+0.61639071296j))*x[1]**o + ((-0.217326965751-0.646764059931j))*x[1]
        ref[(0, 2, 2, 1)]=(-0.660695586653+0.142350628364j)*x_ref[0]**o + ((0.922142061136-0.0312540900772j))*x_ref[0] + ((0.0708974045281+0.61639071296j))*x_ref[1]**o + ((-0.217326965751-0.646764059931j))*x_ref[1]
        arg[(0, 2, 2, 2)]=(0.425525151956+0.693236057178j)*x[0]**o + ((0.239705572516+0.557611131892j))*x[0] + ((0.947592569123-0.23864088796j))*x[1]**o + ((-0.341388853513+0.165339254604j))*x[1]
        ref[(0, 2, 2, 2)]=(0.425525151956+0.693236057178j)*x_ref[0]**o + ((0.239705572516+0.557611131892j))*x_ref[0] + ((0.947592569123-0.23864088796j))*x_ref[1]**o + ((-0.341388853513+0.165339254604j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.272711075584+0.495645996959j)*x[0]**o + ((-0.287902359166+0.62679001393j))*x[0] + ((-0.793895294842-0.725829131792j))*x[1]**o + ((0.775890445402+0.803189117082j))*x[1]
        ref[(1, 0, 0, 0)]=(0.272711075584+0.495645996959j)*x_ref[0]**o + ((-0.287902359166+0.62679001393j))*x_ref[0] + ((-0.793895294842-0.725829131792j))*x_ref[1]**o + ((0.775890445402+0.803189117082j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.00267926946818-0.880818691547j)*x[0]**o + ((-0.100237874083+0.583154700613j))*x[0] + ((-0.26537507448+0.26873615104j))*x[1]**o + ((-0.985257863948+0.456261966346j))*x[1]
        ref[(1, 0, 0, 1)]=(0.00267926946818-0.880818691547j)*x_ref[0]**o + ((-0.100237874083+0.583154700613j))*x_ref[0] + ((-0.26537507448+0.26873615104j))*x_ref[1]**o + ((-0.985257863948+0.456261966346j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(-0.863399523373+0.746019887222j)*x[0]**o + ((0.988888496378-0.893411013521j))*x[0] + ((-0.986863596791-0.35243859719j))*x[1]**o + ((0.766712246429+0.360671264996j))*x[1]
        ref[(1, 0, 0, 2)]=(-0.863399523373+0.746019887222j)*x_ref[0]**o + ((0.988888496378-0.893411013521j))*x_ref[0] + ((-0.986863596791-0.35243859719j))*x_ref[1]**o + ((0.766712246429+0.360671264996j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.666018020575-0.333097476379j)*x[0]**o + ((0.944914091826+0.759847471383j))*x[0] + ((-0.765110786485+0.705345338935j))*x[1]**o + ((0.910617020421-0.80044743377j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.666018020575-0.333097476379j)*x_ref[0]**o + ((0.944914091826+0.759847471383j))*x_ref[0] + ((-0.765110786485+0.705345338935j))*x_ref[1]**o + ((0.910617020421-0.80044743377j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.907904000717+0.897056545766j)*x[0]**o + ((0.125522418086-0.492072468053j))*x[0] + ((-0.577332866626-0.523229853091j))*x[1]**o + ((-0.480267648763-0.718382253135j))*x[1]
        ref[(1, 0, 1, 1)]=(0.907904000717+0.897056545766j)*x_ref[0]**o + ((0.125522418086-0.492072468053j))*x_ref[0] + ((-0.577332866626-0.523229853091j))*x_ref[1]**o + ((-0.480267648763-0.718382253135j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(0.747337704475-0.949685693317j)*x[0]**o + ((0.619589689534+0.52897353898j))*x[0] + ((0.865360993234+0.306713913456j))*x[1]**o + ((0.559295873855+0.106288205855j))*x[1]
        ref[(1, 0, 1, 2)]=(0.747337704475-0.949685693317j)*x_ref[0]**o + ((0.619589689534+0.52897353898j))*x_ref[0] + ((0.865360993234+0.306713913456j))*x_ref[1]**o + ((0.559295873855+0.106288205855j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(-0.73561544795+0.459061808129j)*x[0]**o + ((0.996707254166+0.761684137271j))*x[0] + ((-0.550709791505-0.748350732153j))*x[1]**o + ((-0.0121340917047-0.120048373128j))*x[1]
        ref[(1, 0, 2, 0)]=(-0.73561544795+0.459061808129j)*x_ref[0]**o + ((0.996707254166+0.761684137271j))*x_ref[0] + ((-0.550709791505-0.748350732153j))*x_ref[1]**o + ((-0.0121340917047-0.120048373128j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(0.515960673811-0.103933434364j)*x[0]**o + ((0.354691409044-0.749978114473j))*x[0] + ((-0.711871380306-0.961842838782j))*x[1]**o + ((0.274563207897+0.771449088384j))*x[1]
        ref[(1, 0, 2, 1)]=(0.515960673811-0.103933434364j)*x_ref[0]**o + ((0.354691409044-0.749978114473j))*x_ref[0] + ((-0.711871380306-0.961842838782j))*x_ref[1]**o + ((0.274563207897+0.771449088384j))*x_ref[1]
        arg[(1, 0, 2, 2)]=(0.248023655884-0.116859424145j)*x[0]**o + ((0.8277126712+0.573885962725j))*x[0] + ((0.832294664885+0.102356984536j))*x[1]**o + ((-0.111935757363+0.397999508262j))*x[1]
        ref[(1, 0, 2, 2)]=(0.248023655884-0.116859424145j)*x_ref[0]**o + ((0.8277126712+0.573885962725j))*x_ref[0] + ((0.832294664885+0.102356984536j))*x_ref[1]**o + ((-0.111935757363+0.397999508262j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.887155124461-0.852340249707j)*x[0]**o + ((0.208364051309-0.766024504552j))*x[0] + ((-0.131821768354+0.645552087498j))*x[1]**o + ((-0.763402527443-0.367755262554j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.887155124461-0.852340249707j)*x_ref[0]**o + ((0.208364051309-0.766024504552j))*x_ref[0] + ((-0.131821768354+0.645552087498j))*x_ref[1]**o + ((-0.763402527443-0.367755262554j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.219055732503+0.635322295434j)*x[0]**o + ((-0.987309415195+0.376991836488j))*x[0] + ((0.0109447532221-0.489488877568j))*x[1]**o + ((0.414864525916+0.888589471464j))*x[1]
        ref[(1, 1, 0, 1)]=(0.219055732503+0.635322295434j)*x_ref[0]**o + ((-0.987309415195+0.376991836488j))*x_ref[0] + ((0.0109447532221-0.489488877568j))*x_ref[1]**o + ((0.414864525916+0.888589471464j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(-0.632027804762+0.813438502003j)*x[0]**o + ((-0.945017411636+0.294799508359j))*x[0] + ((-0.809376902125-0.618636929096j))*x[1]**o + ((-0.29438773481+0.811927260756j))*x[1]
        ref[(1, 1, 0, 2)]=(-0.632027804762+0.813438502003j)*x_ref[0]**o + ((-0.945017411636+0.294799508359j))*x_ref[0] + ((-0.809376902125-0.618636929096j))*x_ref[1]**o + ((-0.29438773481+0.811927260756j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.0380331417853-0.390079675478j)*x[0]**o + ((0.89770940837-0.779932674093j))*x[0] + ((-0.507025600019-0.290370487303j))*x[1]**o + ((0.313399785673-0.919248288765j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.0380331417853-0.390079675478j)*x_ref[0]**o + ((0.89770940837-0.779932674093j))*x_ref[0] + ((-0.507025600019-0.290370487303j))*x_ref[1]**o + ((0.313399785673-0.919248288765j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.910032804294+0.153345739746j)*x[0]**o + ((-0.910135053133+0.820426656834j))*x[0] + ((-0.383173317342+0.322477772172j))*x[1]**o + ((-0.779816424463-0.481418119118j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.910032804294+0.153345739746j)*x_ref[0]**o + ((-0.910135053133+0.820426656834j))*x_ref[0] + ((-0.383173317342+0.322477772172j))*x_ref[1]**o + ((-0.779816424463-0.481418119118j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(0.0103837773738+0.793534273802j)*x[0]**o + ((-0.131858326107+0.0881709614637j))*x[0] + ((-0.963092719123+0.750683645786j))*x[1]**o + ((0.201957541185-0.250127932008j))*x[1]
        ref[(1, 1, 1, 2)]=(0.0103837773738+0.793534273802j)*x_ref[0]**o + ((-0.131858326107+0.0881709614637j))*x_ref[0] + ((-0.963092719123+0.750683645786j))*x_ref[1]**o + ((0.201957541185-0.250127932008j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(0.547168707772+0.550430515427j)*x[0]**o + ((0.784325587508-0.335534512524j))*x[0] + ((-0.67392109642+0.0158063883252j))*x[1]**o + ((-0.204491026244-0.137180835877j))*x[1]
        ref[(1, 1, 2, 0)]=(0.547168707772+0.550430515427j)*x_ref[0]**o + ((0.784325587508-0.335534512524j))*x_ref[0] + ((-0.67392109642+0.0158063883252j))*x_ref[1]**o + ((-0.204491026244-0.137180835877j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(-0.397011602966+0.483279112097j)*x[0]**o + ((-0.213505185833-0.731271647959j))*x[0] + ((0.376729713791+0.064747257179j))*x[1]**o + ((-0.803515396271-0.331547945494j))*x[1]
        ref[(1, 1, 2, 1)]=(-0.397011602966+0.483279112097j)*x_ref[0]**o + ((-0.213505185833-0.731271647959j))*x_ref[0] + ((0.376729713791+0.064747257179j))*x_ref[1]**o + ((-0.803515396271-0.331547945494j))*x_ref[1]
        arg[(1, 1, 2, 2)]=(0.130299498783-0.952663278257j)*x[0]**o + ((0.430012635486-0.681195566149j))*x[0] + ((-0.919580515626+0.15228461084j))*x[1]**o + ((0.816894971097-0.735573118558j))*x[1]
        ref[(1, 1, 2, 2)]=(0.130299498783-0.952663278257j)*x_ref[0]**o + ((0.430012635486-0.681195566149j))*x_ref[0] + ((-0.919580515626+0.15228461084j))*x_ref[1]**o + ((0.816894971097-0.735573118558j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(-0.178376752188-0.372848247966j)*x[0]**o + ((0.672494998764+0.0957873128382j))*x[0] + ((-0.312120469653+0.487377682138j))*x[1]**o + ((0.550460189839-0.980969562131j))*x[1]
        ref[(1, 2, 0, 0)]=(-0.178376752188-0.372848247966j)*x_ref[0]**o + ((0.672494998764+0.0957873128382j))*x_ref[0] + ((-0.312120469653+0.487377682138j))*x_ref[1]**o + ((0.550460189839-0.980969562131j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.657572277463+0.166253783024j)*x[0]**o + ((-0.514711359005-0.822711877704j))*x[0] + ((0.98899075289+0.267013556185j))*x[1]**o + ((-0.526927378388+0.846451547615j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.657572277463+0.166253783024j)*x_ref[0]**o + ((-0.514711359005-0.822711877704j))*x_ref[0] + ((0.98899075289+0.267013556185j))*x_ref[1]**o + ((-0.526927378388+0.846451547615j))*x_ref[1]
        arg[(1, 2, 0, 2)]=(0.946940280729+0.557658863999j)*x[0]**o + ((0.613798951911+0.227595482764j))*x[0] + ((0.129630731842+0.815640277695j))*x[1]**o + ((-0.134488408114-0.436259471359j))*x[1]
        ref[(1, 2, 0, 2)]=(0.946940280729+0.557658863999j)*x_ref[0]**o + ((0.613798951911+0.227595482764j))*x_ref[0] + ((0.129630731842+0.815640277695j))*x_ref[1]**o + ((-0.134488408114-0.436259471359j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(0.0159768610863+0.31017799105j)*x[0]**o + ((-0.763613442066-0.112686803525j))*x[0] + ((-0.484377475844+0.16645908185j))*x[1]**o + ((0.821407709876-0.0526171223899j))*x[1]
        ref[(1, 2, 1, 0)]=(0.0159768610863+0.31017799105j)*x_ref[0]**o + ((-0.763613442066-0.112686803525j))*x_ref[0] + ((-0.484377475844+0.16645908185j))*x_ref[1]**o + ((0.821407709876-0.0526171223899j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.668864242271-0.460701147783j)*x[0]**o + ((-0.113419077946+0.405409400583j))*x[0] + ((0.858181493122-0.858359043652j))*x[1]**o + ((0.0617028207537+0.642295013294j))*x[1]
        ref[(1, 2, 1, 1)]=(0.668864242271-0.460701147783j)*x_ref[0]**o + ((-0.113419077946+0.405409400583j))*x_ref[0] + ((0.858181493122-0.858359043652j))*x_ref[1]**o + ((0.0617028207537+0.642295013294j))*x_ref[1]
        arg[(1, 2, 1, 2)]=(-0.16445841802+0.499941732559j)*x[0]**o + ((0.87844132954-0.836663699133j))*x[0] + ((0.375909143804+0.610590554689j))*x[1]**o + ((0.95525669069+0.00227755270924j))*x[1]
        ref[(1, 2, 1, 2)]=(-0.16445841802+0.499941732559j)*x_ref[0]**o + ((0.87844132954-0.836663699133j))*x_ref[0] + ((0.375909143804+0.610590554689j))*x_ref[1]**o + ((0.95525669069+0.00227755270924j))*x_ref[1]
        arg[(1, 2, 2, 0)]=(0.627101162041-0.904487486446j)*x[0]**o + ((0.123408237768+0.219416037526j))*x[0] + ((-0.513253893738-0.671209105228j))*x[1]**o + ((-0.42063602865-0.00719568009012j))*x[1]
        ref[(1, 2, 2, 0)]=(0.627101162041-0.904487486446j)*x_ref[0]**o + ((0.123408237768+0.219416037526j))*x_ref[0] + ((-0.513253893738-0.671209105228j))*x_ref[1]**o + ((-0.42063602865-0.00719568009012j))*x_ref[1]
        arg[(1, 2, 2, 1)]=(-0.453941201777-0.0878680693298j)*x[0]**o + ((0.325239906019-0.759225715295j))*x[0] + ((-0.0147467576062-0.610017432163j))*x[1]**o + ((0.571246607393+0.819210639145j))*x[1]
        ref[(1, 2, 2, 1)]=(-0.453941201777-0.0878680693298j)*x_ref[0]**o + ((0.325239906019-0.759225715295j))*x_ref[0] + ((-0.0147467576062-0.610017432163j))*x_ref[1]**o + ((0.571246607393+0.819210639145j))*x_ref[1]
        arg[(1, 2, 2, 2)]=(0.474104792767+0.336050378667j)*x[0]**o + ((0.0235117136098-0.918501374933j))*x[0] + ((-0.843360405982-0.952762647243j))*x[1]**o + ((0.860414792773-0.873537045248j))*x[1]
        ref[(1, 2, 2, 2)]=(0.474104792767+0.336050378667j)*x_ref[0]**o + ((0.0235117136098-0.918501374933j))*x_ref[0] + ((-0.843360405982-0.952762647243j))*x_ref[1]**o + ((0.860414792773-0.873537045248j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.464432345416-0.12811206597j)*x[0]**o + ((0.183861902779-0.581666358549j))*x[0] + ((-0.56275049315+0.377536696438j))*x[1]**o + ((-0.476912568618+0.651740837627j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.464432345416-0.12811206597j)*x_ref[0]**o + ((0.183861902779-0.581666358549j))*x_ref[0] + ((-0.56275049315+0.377536696438j))*x_ref[1]**o + ((-0.476912568618+0.651740837627j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(0.732064160953-0.391008806163j)*x[0]**o + ((0.666688362063-0.820796393648j))*x[0] + ((-0.445285451886-0.843134732788j))*x[1]**o + ((0.452887553984-0.662996737195j))*x[1]
        ref[(2, 0, 0, 1)]=(0.732064160953-0.391008806163j)*x_ref[0]**o + ((0.666688362063-0.820796393648j))*x_ref[0] + ((-0.445285451886-0.843134732788j))*x_ref[1]**o + ((0.452887553984-0.662996737195j))*x_ref[1]
        arg[(2, 0, 0, 2)]=(0.511873963248+0.166008092919j)*x[0]**o + ((-0.826502268512-0.592506096758j))*x[0] + ((0.727914045812-0.498505298796j))*x[1]**o + ((-0.0767662556414-0.218998216108j))*x[1]
        ref[(2, 0, 0, 2)]=(0.511873963248+0.166008092919j)*x_ref[0]**o + ((-0.826502268512-0.592506096758j))*x_ref[0] + ((0.727914045812-0.498505298796j))*x_ref[1]**o + ((-0.0767662556414-0.218998216108j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(-0.452432319199-0.923675697311j)*x[0]**o + ((-0.529180468555+0.346252158643j))*x[0] + ((0.128431527635-0.94672201976j))*x[1]**o + ((0.764852197352+0.593152890296j))*x[1]
        ref[(2, 0, 1, 0)]=(-0.452432319199-0.923675697311j)*x_ref[0]**o + ((-0.529180468555+0.346252158643j))*x_ref[0] + ((0.128431527635-0.94672201976j))*x_ref[1]**o + ((0.764852197352+0.593152890296j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.276175063868+0.978433663539j)*x[0]**o + ((0.0037520237549-0.179423450706j))*x[0] + ((0.263342226267+0.209439257123j))*x[1]**o + ((-0.551496660513-0.293281181452j))*x[1]
        ref[(2, 0, 1, 1)]=(0.276175063868+0.978433663539j)*x_ref[0]**o + ((0.0037520237549-0.179423450706j))*x_ref[0] + ((0.263342226267+0.209439257123j))*x_ref[1]**o + ((-0.551496660513-0.293281181452j))*x_ref[1]
        arg[(2, 0, 1, 2)]=(-0.958044382614+0.422446314811j)*x[0]**o + ((0.914347200305-0.578108807927j))*x[0] + ((-0.0641757978244-0.190664648719j))*x[1]**o + ((0.887940566451+0.557303172783j))*x[1]
        ref[(2, 0, 1, 2)]=(-0.958044382614+0.422446314811j)*x_ref[0]**o + ((0.914347200305-0.578108807927j))*x_ref[0] + ((-0.0641757978244-0.190664648719j))*x_ref[1]**o + ((0.887940566451+0.557303172783j))*x_ref[1]
        arg[(2, 0, 2, 0)]=(0.806905546639-0.0773752011748j)*x[0]**o + ((0.0429433225774+0.233547633975j))*x[0] + ((-0.729909199143-0.872864981097j))*x[1]**o + ((-0.0412148934487-0.349010833204j))*x[1]
        ref[(2, 0, 2, 0)]=(0.806905546639-0.0773752011748j)*x_ref[0]**o + ((0.0429433225774+0.233547633975j))*x_ref[0] + ((-0.729909199143-0.872864981097j))*x_ref[1]**o + ((-0.0412148934487-0.349010833204j))*x_ref[1]
        arg[(2, 0, 2, 1)]=(0.739413353162-0.532354722868j)*x[0]**o + ((0.390244704863-0.0670130769307j))*x[0] + ((0.427199497419+0.770959375751j))*x[1]**o + ((0.69497349907-0.852477845143j))*x[1]
        ref[(2, 0, 2, 1)]=(0.739413353162-0.532354722868j)*x_ref[0]**o + ((0.390244704863-0.0670130769307j))*x_ref[0] + ((0.427199497419+0.770959375751j))*x_ref[1]**o + ((0.69497349907-0.852477845143j))*x_ref[1]
        arg[(2, 0, 2, 2)]=(-0.398078176981+0.444743482292j)*x[0]**o + ((0.232708589851+0.795553929105j))*x[0] + ((-0.471511804976+0.0637134115233j))*x[1]**o + ((0.602412859019+0.470393118785j))*x[1]
        ref[(2, 0, 2, 2)]=(-0.398078176981+0.444743482292j)*x_ref[0]**o + ((0.232708589851+0.795553929105j))*x_ref[0] + ((-0.471511804976+0.0637134115233j))*x_ref[1]**o + ((0.602412859019+0.470393118785j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(-0.589415578844-0.429782809633j)*x[0]**o + ((0.58168008337-0.744267813553j))*x[0] + ((-0.991660149045+0.0513245040093j))*x[1]**o + ((-0.523679652056-0.529924530622j))*x[1]
        ref[(2, 1, 0, 0)]=(-0.589415578844-0.429782809633j)*x_ref[0]**o + ((0.58168008337-0.744267813553j))*x_ref[0] + ((-0.991660149045+0.0513245040093j))*x_ref[1]**o + ((-0.523679652056-0.529924530622j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.163008366413+0.976943735685j)*x[0]**o + ((0.736734022513-0.557153801099j))*x[0] + ((0.787243608608-0.45021547415j))*x[1]**o + ((-0.770736654931+0.522314037709j))*x[1]
        ref[(2, 1, 0, 1)]=(0.163008366413+0.976943735685j)*x_ref[0]**o + ((0.736734022513-0.557153801099j))*x_ref[0] + ((0.787243608608-0.45021547415j))*x_ref[1]**o + ((-0.770736654931+0.522314037709j))*x_ref[1]
        arg[(2, 1, 0, 2)]=(-0.938776555613+0.782941007348j)*x[0]**o + ((0.200634926167+0.280781530203j))*x[0] + ((0.608080102489+0.179041149346j))*x[1]**o + ((-0.74904598031-0.757168714907j))*x[1]
        ref[(2, 1, 0, 2)]=(-0.938776555613+0.782941007348j)*x_ref[0]**o + ((0.200634926167+0.280781530203j))*x_ref[0] + ((0.608080102489+0.179041149346j))*x_ref[1]**o + ((-0.74904598031-0.757168714907j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(-0.809844133852-0.12229853582j)*x[0]**o + ((0.0922147133591+0.924905645043j))*x[0] + ((-0.953924493206+0.564555658982j))*x[1]**o + ((0.888393593761-0.216114430394j))*x[1]
        ref[(2, 1, 1, 0)]=(-0.809844133852-0.12229853582j)*x_ref[0]**o + ((0.0922147133591+0.924905645043j))*x_ref[0] + ((-0.953924493206+0.564555658982j))*x_ref[1]**o + ((0.888393593761-0.216114430394j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(0.954297401335+0.345543451316j)*x[0]**o + ((-0.213331114427-0.058027103846j))*x[0] + ((0.803520784424-0.895417735625j))*x[1]**o + ((0.100710923264-0.0383783392055j))*x[1]
        ref[(2, 1, 1, 1)]=(0.954297401335+0.345543451316j)*x_ref[0]**o + ((-0.213331114427-0.058027103846j))*x_ref[0] + ((0.803520784424-0.895417735625j))*x_ref[1]**o + ((0.100710923264-0.0383783392055j))*x_ref[1]
        arg[(2, 1, 1, 2)]=(-0.962566209255-0.689591241862j)*x[0]**o + ((-0.191885134909-0.843052335432j))*x[0] + ((0.72164979092+0.843057440271j))*x[1]**o + ((0.156390085893+0.33968598191j))*x[1]
        ref[(2, 1, 1, 2)]=(-0.962566209255-0.689591241862j)*x_ref[0]**o + ((-0.191885134909-0.843052335432j))*x_ref[0] + ((0.72164979092+0.843057440271j))*x_ref[1]**o + ((0.156390085893+0.33968598191j))*x_ref[1]
        arg[(2, 1, 2, 0)]=(0.837623037539-0.282708419715j)*x[0]**o + ((0.073853737938+0.219072859195j))*x[0] + ((-0.806939637829+0.0890494464264j))*x[1]**o + ((-0.745930410679+0.275280635708j))*x[1]
        ref[(2, 1, 2, 0)]=(0.837623037539-0.282708419715j)*x_ref[0]**o + ((0.073853737938+0.219072859195j))*x_ref[0] + ((-0.806939637829+0.0890494464264j))*x_ref[1]**o + ((-0.745930410679+0.275280635708j))*x_ref[1]
        arg[(2, 1, 2, 1)]=(0.258131114442-0.216788814108j)*x[0]**o + ((0.608759586579-0.58831961448j))*x[0] + ((0.954876161033-0.940295036225j))*x[1]**o + ((-0.111940005249+0.93909739516j))*x[1]
        ref[(2, 1, 2, 1)]=(0.258131114442-0.216788814108j)*x_ref[0]**o + ((0.608759586579-0.58831961448j))*x_ref[0] + ((0.954876161033-0.940295036225j))*x_ref[1]**o + ((-0.111940005249+0.93909739516j))*x_ref[1]
        arg[(2, 1, 2, 2)]=(-0.622726756104+0.0300139537799j)*x[0]**o + ((0.18496796726+0.235915789905j))*x[0] + ((-0.478079805417-0.115310743556j))*x[1]**o + ((0.956998494175+0.608670792587j))*x[1]
        ref[(2, 1, 2, 2)]=(-0.622726756104+0.0300139537799j)*x_ref[0]**o + ((0.18496796726+0.235915789905j))*x_ref[0] + ((-0.478079805417-0.115310743556j))*x_ref[1]**o + ((0.956998494175+0.608670792587j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(-0.98482041547+0.637247366785j)*x[0]**o + ((0.173424996163+0.685173646605j))*x[0] + ((-0.861537250059-0.223702018988j))*x[1]**o + ((0.0513176523428-0.714196210332j))*x[1]
        ref[(2, 2, 0, 0)]=(-0.98482041547+0.637247366785j)*x_ref[0]**o + ((0.173424996163+0.685173646605j))*x_ref[0] + ((-0.861537250059-0.223702018988j))*x_ref[1]**o + ((0.0513176523428-0.714196210332j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(-0.8596816734+0.524663333157j)*x[0]**o + ((0.814292186758+0.980977162174j))*x[0] + ((-0.448277972757+0.427627659554j))*x[1]**o + ((-0.593775293096+0.0421917006767j))*x[1]
        ref[(2, 2, 0, 1)]=(-0.8596816734+0.524663333157j)*x_ref[0]**o + ((0.814292186758+0.980977162174j))*x_ref[0] + ((-0.448277972757+0.427627659554j))*x_ref[1]**o + ((-0.593775293096+0.0421917006767j))*x_ref[1]
        arg[(2, 2, 0, 2)]=(-0.978933917783+0.151776324854j)*x[0]**o + ((0.840960043507-0.167105556667j))*x[0] + ((0.562816983896-0.186625052885j))*x[1]**o + ((-0.134496790045+0.0652269867055j))*x[1]
        ref[(2, 2, 0, 2)]=(-0.978933917783+0.151776324854j)*x_ref[0]**o + ((0.840960043507-0.167105556667j))*x_ref[0] + ((0.562816983896-0.186625052885j))*x_ref[1]**o + ((-0.134496790045+0.0652269867055j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(0.507716512256-0.0447662705034j)*x[0]**o + ((0.781531657747-0.724828552184j))*x[0] + ((-0.570459406136+0.0332226288024j))*x[1]**o + ((0.273219292291-0.0710596938105j))*x[1]
        ref[(2, 2, 1, 0)]=(0.507716512256-0.0447662705034j)*x_ref[0]**o + ((0.781531657747-0.724828552184j))*x_ref[0] + ((-0.570459406136+0.0332226288024j))*x_ref[1]**o + ((0.273219292291-0.0710596938105j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(-0.30924693765+0.713004013679j)*x[0]**o + ((0.229922584898-0.168609501646j))*x[0] + ((0.880244608332-0.257934468418j))*x[1]**o + ((0.554672051993+0.369795345145j))*x[1]
        ref[(2, 2, 1, 1)]=(-0.30924693765+0.713004013679j)*x_ref[0]**o + ((0.229922584898-0.168609501646j))*x_ref[0] + ((0.880244608332-0.257934468418j))*x_ref[1]**o + ((0.554672051993+0.369795345145j))*x_ref[1]
        arg[(2, 2, 1, 2)]=(0.871933422602+0.127783870925j)*x[0]**o + ((0.778880835916-0.577551615074j))*x[0] + ((0.937966644995-0.00790860886498j))*x[1]**o + ((0.464914890907+0.949766162305j))*x[1]
        ref[(2, 2, 1, 2)]=(0.871933422602+0.127783870925j)*x_ref[0]**o + ((0.778880835916-0.577551615074j))*x_ref[0] + ((0.937966644995-0.00790860886498j))*x_ref[1]**o + ((0.464914890907+0.949766162305j))*x_ref[1]
        arg[(2, 2, 2, 0)]=(-0.31985453775+0.985689612427j)*x[0]**o + ((0.423200215644+0.188566676573j))*x[0] + ((0.207270337478-0.736528603596j))*x[1]**o + ((-0.0459281584448+0.893258438056j))*x[1]
        ref[(2, 2, 2, 0)]=(-0.31985453775+0.985689612427j)*x_ref[0]**o + ((0.423200215644+0.188566676573j))*x_ref[0] + ((0.207270337478-0.736528603596j))*x_ref[1]**o + ((-0.0459281584448+0.893258438056j))*x_ref[1]
        arg[(2, 2, 2, 1)]=(-0.969789406543+0.218660714758j)*x[0]**o + ((0.37714561683-0.810038917541j))*x[0] + ((-0.932682617944+0.318529385364j))*x[1]**o + ((0.574227365249+0.332089289295j))*x[1]
        ref[(2, 2, 2, 1)]=(-0.969789406543+0.218660714758j)*x_ref[0]**o + ((0.37714561683-0.810038917541j))*x_ref[0] + ((-0.932682617944+0.318529385364j))*x_ref[1]**o + ((0.574227365249+0.332089289295j))*x_ref[1]
        arg[(2, 2, 2, 2)]=(-0.225730511621-0.904108557705j)*x[0]**o + ((0.796210286132+0.816506431912j))*x[0] + ((0.231337607402+0.949361577428j))*x[1]**o + ((0.870946817334+0.189803610266j))*x[1]
        ref[(2, 2, 2, 2)]=(-0.225730511621-0.904108557705j)*x_ref[0]**o + ((0.796210286132+0.816506431912j))*x_ref[0] + ((0.231337607402+0.949361577428j))*x_ref[1]**o + ((0.870946817334+0.189803610266j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.78439488913-0.588259203694j)*x[2]**o + ((-0.139186396666+0.332154670719j))*x[2]
            ref[(0, 0, 0, 0)]+=(0.78439488913-0.588259203694j)*x_ref[2]**o + ((-0.139186396666+0.332154670719j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.358453650587-0.365107968593j)*x[2]**o + ((0.797242842571-0.752601360857j))*x[2]
            ref[(0, 0, 0, 1)]+=(-0.358453650587-0.365107968593j)*x_ref[2]**o + ((0.797242842571-0.752601360857j))*x_ref[2]
            arg[(0, 0, 0, 2)]+=(-0.303956638238-0.197427910897j)*x[2]**o + ((-0.800313266203+0.948435507286j))*x[2]
            ref[(0, 0, 0, 2)]+=(-0.303956638238-0.197427910897j)*x_ref[2]**o + ((-0.800313266203+0.948435507286j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.658271560971+0.189159260018j)*x[2]**o + ((0.895003467194-0.120694066749j))*x[2]
            ref[(0, 0, 1, 0)]+=(0.658271560971+0.189159260018j)*x_ref[2]**o + ((0.895003467194-0.120694066749j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.739804849499-0.545345703216j)*x[2]**o + ((-0.199349912837+0.903103358497j))*x[2]
            ref[(0, 0, 1, 1)]+=(0.739804849499-0.545345703216j)*x_ref[2]**o + ((-0.199349912837+0.903103358497j))*x_ref[2]
            arg[(0, 0, 1, 2)]+=(0.729017367104-0.76298130551j)*x[2]**o + ((-0.744999395393+0.25067851065j))*x[2]
            ref[(0, 0, 1, 2)]+=(0.729017367104-0.76298130551j)*x_ref[2]**o + ((-0.744999395393+0.25067851065j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(0.821403225951+0.225934218768j)*x[2]**o + ((-0.854811257943-0.861669082833j))*x[2]
            ref[(0, 0, 2, 0)]+=(0.821403225951+0.225934218768j)*x_ref[2]**o + ((-0.854811257943-0.861669082833j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(0.859054473606-0.142618608422j)*x[2]**o + ((0.0168671737301+0.128131446906j))*x[2]
            ref[(0, 0, 2, 1)]+=(0.859054473606-0.142618608422j)*x_ref[2]**o + ((0.0168671737301+0.128131446906j))*x_ref[2]
            arg[(0, 0, 2, 2)]+=(-0.152299394132-0.558297138658j)*x[2]**o + ((-0.0537858000543-0.716573475647j))*x[2]
            ref[(0, 0, 2, 2)]+=(-0.152299394132-0.558297138658j)*x_ref[2]**o + ((-0.0537858000543-0.716573475647j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.507562747792+0.953232870806j)*x[2]**o + ((-0.815468259535+0.452240531087j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.507562747792+0.953232870806j)*x_ref[2]**o + ((-0.815468259535+0.452240531087j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.535229575865+0.79557318018j)*x[2]**o + ((0.247452977808-0.680172837455j))*x[2]
            ref[(0, 1, 0, 1)]+=(0.535229575865+0.79557318018j)*x_ref[2]**o + ((0.247452977808-0.680172837455j))*x_ref[2]
            arg[(0, 1, 0, 2)]+=(0.329865802595+0.815246405761j)*x[2]**o + ((-0.97060833118+0.575411802943j))*x[2]
            ref[(0, 1, 0, 2)]+=(0.329865802595+0.815246405761j)*x_ref[2]**o + ((-0.97060833118+0.575411802943j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.549061813769-0.941573647561j)*x[2]**o + ((0.839527178167-0.428523601426j))*x[2]
            ref[(0, 1, 1, 0)]+=(0.549061813769-0.941573647561j)*x_ref[2]**o + ((0.839527178167-0.428523601426j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.278296317911+0.742347780173j)*x[2]**o + ((-0.27283377657-0.379170491053j))*x[2]
            ref[(0, 1, 1, 1)]+=(-0.278296317911+0.742347780173j)*x_ref[2]**o + ((-0.27283377657-0.379170491053j))*x_ref[2]
            arg[(0, 1, 1, 2)]+=(0.56330659364-0.0866772647475j)*x[2]**o + ((0.136140897539+0.33392159188j))*x[2]
            ref[(0, 1, 1, 2)]+=(0.56330659364-0.0866772647475j)*x_ref[2]**o + ((0.136140897539+0.33392159188j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(0.0659681942864+0.4385477518j)*x[2]**o + ((0.984131761441+0.445503927401j))*x[2]
            ref[(0, 1, 2, 0)]+=(0.0659681942864+0.4385477518j)*x_ref[2]**o + ((0.984131761441+0.445503927401j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(0.507170016792-0.351442118039j)*x[2]**o + ((0.942597393612+0.600142954687j))*x[2]
            ref[(0, 1, 2, 1)]+=(0.507170016792-0.351442118039j)*x_ref[2]**o + ((0.942597393612+0.600142954687j))*x_ref[2]
            arg[(0, 1, 2, 2)]+=(-0.216170903829-0.572841650546j)*x[2]**o + ((0.869156953185-0.167874276766j))*x[2]
            ref[(0, 1, 2, 2)]+=(-0.216170903829-0.572841650546j)*x_ref[2]**o + ((0.869156953185-0.167874276766j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(0.422305854258+0.36123058529j)*x[2]**o + ((0.941782121385-0.302401056338j))*x[2]
            ref[(0, 2, 0, 0)]+=(0.422305854258+0.36123058529j)*x_ref[2]**o + ((0.941782121385-0.302401056338j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(0.54508138863+0.312887916612j)*x[2]**o + ((-0.0870966333008+0.280642690661j))*x[2]
            ref[(0, 2, 0, 1)]+=(0.54508138863+0.312887916612j)*x_ref[2]**o + ((-0.0870966333008+0.280642690661j))*x_ref[2]
            arg[(0, 2, 0, 2)]+=(-0.825777810547-0.376401262444j)*x[2]**o + ((-0.215917690531-0.446100400749j))*x[2]
            ref[(0, 2, 0, 2)]+=(-0.825777810547-0.376401262444j)*x_ref[2]**o + ((-0.215917690531-0.446100400749j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(0.58358712203-0.777525576203j)*x[2]**o + ((-0.25125713032+0.00982787456449j))*x[2]
            ref[(0, 2, 1, 0)]+=(0.58358712203-0.777525576203j)*x_ref[2]**o + ((-0.25125713032+0.00982787456449j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(0.0333499470966+0.28445682992j)*x[2]**o + ((-0.0986959671532-0.892929482487j))*x[2]
            ref[(0, 2, 1, 1)]+=(0.0333499470966+0.28445682992j)*x_ref[2]**o + ((-0.0986959671532-0.892929482487j))*x_ref[2]
            arg[(0, 2, 1, 2)]+=(-0.255405650357+0.418758923649j)*x[2]**o + ((-0.930275895323+0.0678885127891j))*x[2]
            ref[(0, 2, 1, 2)]+=(-0.255405650357+0.418758923649j)*x_ref[2]**o + ((-0.930275895323+0.0678885127891j))*x_ref[2]
            arg[(0, 2, 2, 0)]+=(-0.829616337788-0.492827430378j)*x[2]**o + ((-0.191762728038-0.502021051965j))*x[2]
            ref[(0, 2, 2, 0)]+=(-0.829616337788-0.492827430378j)*x_ref[2]**o + ((-0.191762728038-0.502021051965j))*x_ref[2]
            arg[(0, 2, 2, 1)]+=(0.407403630039+0.390331540488j)*x[2]**o + ((-0.119203552408-0.91792257872j))*x[2]
            ref[(0, 2, 2, 1)]+=(0.407403630039+0.390331540488j)*x_ref[2]**o + ((-0.119203552408-0.91792257872j))*x_ref[2]
            arg[(0, 2, 2, 2)]+=(-0.460514174489-0.614132204095j)*x[2]**o + ((0.213796374034-0.736399971337j))*x[2]
            ref[(0, 2, 2, 2)]+=(-0.460514174489-0.614132204095j)*x_ref[2]**o + ((0.213796374034-0.736399971337j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.549775150901-0.616061033506j)*x[2]**o + ((-0.891338342902+0.00342039100195j))*x[2]
            ref[(1, 0, 0, 0)]+=(0.549775150901-0.616061033506j)*x_ref[2]**o + ((-0.891338342902+0.00342039100195j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.333590619223-0.149139756671j)*x[2]**o + ((0.728975071696+0.813961941479j))*x[2]
            ref[(1, 0, 0, 1)]+=(0.333590619223-0.149139756671j)*x_ref[2]**o + ((0.728975071696+0.813961941479j))*x_ref[2]
            arg[(1, 0, 0, 2)]+=(0.28837404611-0.571824995539j)*x[2]**o + ((0.621509138616-0.297911095059j))*x[2]
            ref[(1, 0, 0, 2)]+=(0.28837404611-0.571824995539j)*x_ref[2]**o + ((0.621509138616-0.297911095059j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.968031798279-0.512206492099j)*x[2]**o + ((0.45140075914-0.30137866882j))*x[2]
            ref[(1, 0, 1, 0)]+=(-0.968031798279-0.512206492099j)*x_ref[2]**o + ((0.45140075914-0.30137866882j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.557949145212-0.822698342306j)*x[2]**o + ((-0.319726284857+0.153911018492j))*x[2]
            ref[(1, 0, 1, 1)]+=(0.557949145212-0.822698342306j)*x_ref[2]**o + ((-0.319726284857+0.153911018492j))*x_ref[2]
            arg[(1, 0, 1, 2)]+=(-0.743642739087-0.294302589135j)*x[2]**o + ((0.70527308906-0.979125604989j))*x[2]
            ref[(1, 0, 1, 2)]+=(-0.743642739087-0.294302589135j)*x_ref[2]**o + ((0.70527308906-0.979125604989j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(-0.399888320762+0.0193677662019j)*x[2]**o + ((0.614517495278-0.134988409657j))*x[2]
            ref[(1, 0, 2, 0)]+=(-0.399888320762+0.0193677662019j)*x_ref[2]**o + ((0.614517495278-0.134988409657j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(0.313263377317+0.582206109387j)*x[2]**o + ((0.0276206202315+0.594353187064j))*x[2]
            ref[(1, 0, 2, 1)]+=(0.313263377317+0.582206109387j)*x_ref[2]**o + ((0.0276206202315+0.594353187064j))*x_ref[2]
            arg[(1, 0, 2, 2)]+=(0.363005093244+0.087859995396j)*x[2]**o + ((0.201181245584-0.492552275444j))*x[2]
            ref[(1, 0, 2, 2)]+=(0.363005093244+0.087859995396j)*x_ref[2]**o + ((0.201181245584-0.492552275444j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.576677513998-0.286032240572j)*x[2]**o + ((-0.406517529264+0.0106448968345j))*x[2]
            ref[(1, 1, 0, 0)]+=(0.576677513998-0.286032240572j)*x_ref[2]**o + ((-0.406517529264+0.0106448968345j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.925894631238-0.837111178911j)*x[2]**o + ((-0.929933842081+0.225655538835j))*x[2]
            ref[(1, 1, 0, 1)]+=(-0.925894631238-0.837111178911j)*x_ref[2]**o + ((-0.929933842081+0.225655538835j))*x_ref[2]
            arg[(1, 1, 0, 2)]+=(-0.971106303569+0.606165491882j)*x[2]**o + ((0.416095170874+0.570988118826j))*x[2]
            ref[(1, 1, 0, 2)]+=(-0.971106303569+0.606165491882j)*x_ref[2]**o + ((0.416095170874+0.570988118826j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(-0.863547691487+0.202034231985j)*x[2]**o + ((-0.658248656534-0.00793205772162j))*x[2]
            ref[(1, 1, 1, 0)]+=(-0.863547691487+0.202034231985j)*x_ref[2]**o + ((-0.658248656534-0.00793205772162j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.253961074297-0.0639131632386j)*x[2]**o + ((-0.89692782909-0.83903732716j))*x[2]
            ref[(1, 1, 1, 1)]+=(0.253961074297-0.0639131632386j)*x_ref[2]**o + ((-0.89692782909-0.83903732716j))*x_ref[2]
            arg[(1, 1, 1, 2)]+=(-0.892311851807+0.567023558952j)*x[2]**o + ((0.37092737577-0.527937347263j))*x[2]
            ref[(1, 1, 1, 2)]+=(-0.892311851807+0.567023558952j)*x_ref[2]**o + ((0.37092737577-0.527937347263j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(-0.816813128541+0.147471245091j)*x[2]**o + ((-0.778479250899-0.46123432021j))*x[2]
            ref[(1, 1, 2, 0)]+=(-0.816813128541+0.147471245091j)*x_ref[2]**o + ((-0.778479250899-0.46123432021j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(0.490636570175+0.3028943012j)*x[2]**o + ((-0.610354762071+0.748014763134j))*x[2]
            ref[(1, 1, 2, 1)]+=(0.490636570175+0.3028943012j)*x_ref[2]**o + ((-0.610354762071+0.748014763134j))*x_ref[2]
            arg[(1, 1, 2, 2)]+=(0.670154642231+0.987169233027j)*x[2]**o + ((-0.81935094116+0.929553146465j))*x[2]
            ref[(1, 1, 2, 2)]+=(0.670154642231+0.987169233027j)*x_ref[2]**o + ((-0.81935094116+0.929553146465j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(-0.469147853903-0.353608174508j)*x[2]**o + ((0.102127404622-0.958913924359j))*x[2]
            ref[(1, 2, 0, 0)]+=(-0.469147853903-0.353608174508j)*x_ref[2]**o + ((0.102127404622-0.958913924359j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(0.675112201878-0.55812749522j)*x[2]**o + ((-0.126261700669-0.0660806246161j))*x[2]
            ref[(1, 2, 0, 1)]+=(0.675112201878-0.55812749522j)*x_ref[2]**o + ((-0.126261700669-0.0660806246161j))*x_ref[2]
            arg[(1, 2, 0, 2)]+=(0.525748180735+0.971864814328j)*x[2]**o + ((0.410660392501+0.185212512218j))*x[2]
            ref[(1, 2, 0, 2)]+=(0.525748180735+0.971864814328j)*x_ref[2]**o + ((0.410660392501+0.185212512218j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(0.00841479412381-0.514510080351j)*x[2]**o + ((0.583568432799-0.500104626475j))*x[2]
            ref[(1, 2, 1, 0)]+=(0.00841479412381-0.514510080351j)*x_ref[2]**o + ((0.583568432799-0.500104626475j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(-0.637097628301-0.880249181752j)*x[2]**o + ((0.393837684123+0.898152612112j))*x[2]
            ref[(1, 2, 1, 1)]+=(-0.637097628301-0.880249181752j)*x_ref[2]**o + ((0.393837684123+0.898152612112j))*x_ref[2]
            arg[(1, 2, 1, 2)]+=(-0.444204386335-0.149447365997j)*x[2]**o + ((0.72428399619-0.135992573586j))*x[2]
            ref[(1, 2, 1, 2)]+=(-0.444204386335-0.149447365997j)*x_ref[2]**o + ((0.72428399619-0.135992573586j))*x_ref[2]
            arg[(1, 2, 2, 0)]+=(0.221562451002-0.667035115171j)*x[2]**o + ((0.876979393095+0.931232380198j))*x[2]
            ref[(1, 2, 2, 0)]+=(0.221562451002-0.667035115171j)*x_ref[2]**o + ((0.876979393095+0.931232380198j))*x_ref[2]
            arg[(1, 2, 2, 1)]+=(-0.413816026247-0.22794482876j)*x[2]**o + ((0.621174395989-0.350772718447j))*x[2]
            ref[(1, 2, 2, 1)]+=(-0.413816026247-0.22794482876j)*x_ref[2]**o + ((0.621174395989-0.350772718447j))*x_ref[2]
            arg[(1, 2, 2, 2)]+=(-0.925074028716-0.592207842431j)*x[2]**o + ((-0.855593463364+0.662698346526j))*x[2]
            ref[(1, 2, 2, 2)]+=(-0.925074028716-0.592207842431j)*x_ref[2]**o + ((-0.855593463364+0.662698346526j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(0.48851906684-0.788128556191j)*x[2]**o + ((0.523440608319+0.0715790489137j))*x[2]
            ref[(2, 0, 0, 0)]+=(0.48851906684-0.788128556191j)*x_ref[2]**o + ((0.523440608319+0.0715790489137j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(-0.151112297916-0.893195286378j)*x[2]**o + ((-0.157124623548+0.0386478182655j))*x[2]
            ref[(2, 0, 0, 1)]+=(-0.151112297916-0.893195286378j)*x_ref[2]**o + ((-0.157124623548+0.0386478182655j))*x_ref[2]
            arg[(2, 0, 0, 2)]+=(0.258852636742-0.402516978005j)*x[2]**o + ((-0.339168193206+0.41089355031j))*x[2]
            ref[(2, 0, 0, 2)]+=(0.258852636742-0.402516978005j)*x_ref[2]**o + ((-0.339168193206+0.41089355031j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(0.441258526916-0.285962357167j)*x[2]**o + ((-0.246820459872+0.902219872131j))*x[2]
            ref[(2, 0, 1, 0)]+=(0.441258526916-0.285962357167j)*x_ref[2]**o + ((-0.246820459872+0.902219872131j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(0.46058492102+0.995632920199j)*x[2]**o + ((0.179580114071-0.810213006411j))*x[2]
            ref[(2, 0, 1, 1)]+=(0.46058492102+0.995632920199j)*x_ref[2]**o + ((0.179580114071-0.810213006411j))*x_ref[2]
            arg[(2, 0, 1, 2)]+=(0.571091027924+0.00480397871205j)*x[2]**o + ((0.89329202414-0.700452068556j))*x[2]
            ref[(2, 0, 1, 2)]+=(0.571091027924+0.00480397871205j)*x_ref[2]**o + ((0.89329202414-0.700452068556j))*x_ref[2]
            arg[(2, 0, 2, 0)]+=(-0.135489137658+0.472135108504j)*x[2]**o + ((0.390274970796+0.867430745085j))*x[2]
            ref[(2, 0, 2, 0)]+=(-0.135489137658+0.472135108504j)*x_ref[2]**o + ((0.390274970796+0.867430745085j))*x_ref[2]
            arg[(2, 0, 2, 1)]+=(0.510677417645+0.150681630065j)*x[2]**o + ((-0.663314298057-0.346635223748j))*x[2]
            ref[(2, 0, 2, 1)]+=(0.510677417645+0.150681630065j)*x_ref[2]**o + ((-0.663314298057-0.346635223748j))*x_ref[2]
            arg[(2, 0, 2, 2)]+=(-0.64736530874-0.678264590254j)*x[2]**o + ((0.264971643762+0.651760987905j))*x[2]
            ref[(2, 0, 2, 2)]+=(-0.64736530874-0.678264590254j)*x_ref[2]**o + ((0.264971643762+0.651760987905j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(-0.749181679467+0.344592530939j)*x[2]**o + ((0.787219517705+0.360340707163j))*x[2]
            ref[(2, 1, 0, 0)]+=(-0.749181679467+0.344592530939j)*x_ref[2]**o + ((0.787219517705+0.360340707163j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(-0.261364931986-0.35396376131j)*x[2]**o + ((0.423036918915-0.9501779615j))*x[2]
            ref[(2, 1, 0, 1)]+=(-0.261364931986-0.35396376131j)*x_ref[2]**o + ((0.423036918915-0.9501779615j))*x_ref[2]
            arg[(2, 1, 0, 2)]+=(-0.252906885546+0.0476606945083j)*x[2]**o + ((-0.349611448982-0.66945455553j))*x[2]
            ref[(2, 1, 0, 2)]+=(-0.252906885546+0.0476606945083j)*x_ref[2]**o + ((-0.349611448982-0.66945455553j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(-0.193486624384-0.20143733189j)*x[2]**o + ((0.149161741475+0.379583344702j))*x[2]
            ref[(2, 1, 1, 0)]+=(-0.193486624384-0.20143733189j)*x_ref[2]**o + ((0.149161741475+0.379583344702j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(0.228668413178+0.681472221866j)*x[2]**o + ((-0.369636174543+0.332544960388j))*x[2]
            ref[(2, 1, 1, 1)]+=(0.228668413178+0.681472221866j)*x_ref[2]**o + ((-0.369636174543+0.332544960388j))*x_ref[2]
            arg[(2, 1, 1, 2)]+=(0.130171742482+0.212723692222j)*x[2]**o + ((-0.532274859366-0.338639102382j))*x[2]
            ref[(2, 1, 1, 2)]+=(0.130171742482+0.212723692222j)*x_ref[2]**o + ((-0.532274859366-0.338639102382j))*x_ref[2]
            arg[(2, 1, 2, 0)]+=(-0.962329938835+0.406180826438j)*x[2]**o + ((0.382844553839+0.418266953626j))*x[2]
            ref[(2, 1, 2, 0)]+=(-0.962329938835+0.406180826438j)*x_ref[2]**o + ((0.382844553839+0.418266953626j))*x_ref[2]
            arg[(2, 1, 2, 1)]+=(0.20660265143+0.786439502485j)*x[2]**o + ((-0.645028007227-0.230971173682j))*x[2]
            ref[(2, 1, 2, 1)]+=(0.20660265143+0.786439502485j)*x_ref[2]**o + ((-0.645028007227-0.230971173682j))*x_ref[2]
            arg[(2, 1, 2, 2)]+=(-0.561038096398-0.951026004169j)*x[2]**o + ((-0.914799340307+0.017534973861j))*x[2]
            ref[(2, 1, 2, 2)]+=(-0.561038096398-0.951026004169j)*x_ref[2]**o + ((-0.914799340307+0.017534973861j))*x_ref[2]
            arg[(2, 2, 0, 0)]+=(-0.394187583006-0.419434290289j)*x[2]**o + ((-0.0477237569666-0.902948068402j))*x[2]
            ref[(2, 2, 0, 0)]+=(-0.394187583006-0.419434290289j)*x_ref[2]**o + ((-0.0477237569666-0.902948068402j))*x_ref[2]
            arg[(2, 2, 0, 1)]+=(0.913162592577-0.324969925095j)*x[2]**o + ((0.0992954993314+0.479979720249j))*x[2]
            ref[(2, 2, 0, 1)]+=(0.913162592577-0.324969925095j)*x_ref[2]**o + ((0.0992954993314+0.479979720249j))*x_ref[2]
            arg[(2, 2, 0, 2)]+=(-0.343400168159-0.552579800137j)*x[2]**o + ((-0.276498302303+0.347328192j))*x[2]
            ref[(2, 2, 0, 2)]+=(-0.343400168159-0.552579800137j)*x_ref[2]**o + ((-0.276498302303+0.347328192j))*x_ref[2]
            arg[(2, 2, 1, 0)]+=(-0.792556300526-0.526281327036j)*x[2]**o + ((0.528042291031-0.255016790122j))*x[2]
            ref[(2, 2, 1, 0)]+=(-0.792556300526-0.526281327036j)*x_ref[2]**o + ((0.528042291031-0.255016790122j))*x_ref[2]
            arg[(2, 2, 1, 1)]+=(0.713618843217+0.580945312281j)*x[2]**o + ((-0.696031948351+0.520013128513j))*x[2]
            ref[(2, 2, 1, 1)]+=(0.713618843217+0.580945312281j)*x_ref[2]**o + ((-0.696031948351+0.520013128513j))*x_ref[2]
            arg[(2, 2, 1, 2)]+=(-0.0175763993539-0.793701746969j)*x[2]**o + ((-0.130315467547+0.376136911599j))*x[2]
            ref[(2, 2, 1, 2)]+=(-0.0175763993539-0.793701746969j)*x_ref[2]**o + ((-0.130315467547+0.376136911599j))*x_ref[2]
            arg[(2, 2, 2, 0)]+=(0.678201670517+0.35398413188j)*x[2]**o + ((0.351465442025+0.0629552350139j))*x[2]
            ref[(2, 2, 2, 0)]+=(0.678201670517+0.35398413188j)*x_ref[2]**o + ((0.351465442025+0.0629552350139j))*x_ref[2]
            arg[(2, 2, 2, 1)]+=(-0.966459234776-0.180049819853j)*x[2]**o + ((0.608818023776+0.687525450068j))*x[2]
            ref[(2, 2, 2, 1)]+=(-0.966459234776-0.180049819853j)*x_ref[2]**o + ((0.608818023776+0.687525450068j))*x_ref[2]
            arg[(2, 2, 2, 2)]+=(0.29140335559+0.899840717319j)*x[2]**o + ((0.0484755200651-0.852985916084j))*x[2]
            ref[(2, 2, 2, 2)]+=(0.29140335559+0.899840717319j)*x_ref[2]**o + ((0.0484755200651-0.852985916084j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.66935213835-0.0106931762908j)*x[0]**o + ((-0.46244854219+0.964437697012j))*x[0] + ((-0.695533390607+0.252158812121j))*x[1]**o + ((-0.279391056854-0.53628410617j))*x[1]
        ref=(0.66935213835-0.0106931762908j)*x_ref[0]**o + ((-0.46244854219+0.964437697012j))*x_ref[0] + ((-0.695533390607+0.252158812121j))*x_ref[1]**o + ((-0.279391056854-0.53628410617j))*x_ref[1]
        if dim==3:
            arg+=((0.911519232439-0.638288871776j))*x[2]**o + ((0.923171857563-0.522519198785j))*x[2]
            ref+=((0.911519232439-0.638288871776j))*x_ref[2]**o + ((0.923171857563-0.522519198785j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=(-0.828546305481+0.125564390517j)*x[0]**o + ((0.466600100402+0.182062293397j))*x[0] + ((0.849907503794-0.0830261264068j))*x[1]**o + ((-0.920817459547-0.69786688474j))*x[1]
        ref[(0,)]=(-0.828546305481+0.125564390517j)*x_ref[0]**o + ((0.466600100402+0.182062293397j))*x_ref[0] + ((0.849907503794-0.0830261264068j))*x_ref[1]**o + ((-0.920817459547-0.69786688474j))*x_ref[1]
        arg[(1,)]=(0.0826019314169-0.0147469075428j)*x[0]**o + ((-0.323178818259-0.617649005689j))*x[0] + ((0.139013227471+0.816976347869j))*x[1]**o + ((0.905257068125-0.617643594522j))*x[1]
        ref[(1,)]=(0.0826019314169-0.0147469075428j)*x_ref[0]**o + ((-0.323178818259-0.617649005689j))*x_ref[0] + ((0.139013227471+0.816976347869j))*x_ref[1]**o + ((0.905257068125-0.617643594522j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.922368707873-0.536079389428j)*x[2]**o + ((-0.642121052594+0.585131318028j))*x[2]
            ref[(0,)]+=(0.922368707873-0.536079389428j)*x_ref[2]**o + ((-0.642121052594+0.585131318028j))*x_ref[2]
            arg[(1,)]+=(0.4124595276+0.712457553295j)*x[2]**o + ((0.0631996780409-0.327966809117j))*x[2]
            ref[(1,)]+=(0.4124595276+0.712457553295j)*x_ref[2]**o + ((0.0631996780409-0.327966809117j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref = Data(0,(4, 3),w_ref)
        arg[(0, 0)]=(0.303726170177-0.257523763417j)*x[0]**o + ((-0.266165420297-0.675296833416j))*x[0] + ((0.505216998356+0.0683442656349j))*x[1]**o + ((-0.898605623411+0.831985141144j))*x[1]
        ref[(0, 0)]=(0.303726170177-0.257523763417j)*x_ref[0]**o + ((-0.266165420297-0.675296833416j))*x_ref[0] + ((0.505216998356+0.0683442656349j))*x_ref[1]**o + ((-0.898605623411+0.831985141144j))*x_ref[1]
        arg[(0, 1)]=(-0.142240837804-0.100042963607j)*x[0]**o + ((-0.643630327453-0.987708919261j))*x[0] + ((-0.149931274112+0.93587305053j))*x[1]**o + ((-0.564940654779+0.160073591784j))*x[1]
        ref[(0, 1)]=(-0.142240837804-0.100042963607j)*x_ref[0]**o + ((-0.643630327453-0.987708919261j))*x_ref[0] + ((-0.149931274112+0.93587305053j))*x_ref[1]**o + ((-0.564940654779+0.160073591784j))*x_ref[1]
        arg[(0, 2)]=(-0.224212999757-0.753399500593j)*x[0]**o + ((0.200314058766-0.488182894707j))*x[0] + ((0.484474446903-0.402488099921j))*x[1]**o + ((-0.18502926207-0.329964813694j))*x[1]
        ref[(0, 2)]=(-0.224212999757-0.753399500593j)*x_ref[0]**o + ((0.200314058766-0.488182894707j))*x_ref[0] + ((0.484474446903-0.402488099921j))*x_ref[1]**o + ((-0.18502926207-0.329964813694j))*x_ref[1]
        arg[(1, 0)]=(0.664655389247-0.73625854814j)*x[0]**o + ((-0.59567769604-0.63034369691j))*x[0] + ((0.0145583791079-0.977769913873j))*x[1]**o + ((0.869553444439+0.0292542611931j))*x[1]
        ref[(1, 0)]=(0.664655389247-0.73625854814j)*x_ref[0]**o + ((-0.59567769604-0.63034369691j))*x_ref[0] + ((0.0145583791079-0.977769913873j))*x_ref[1]**o + ((0.869553444439+0.0292542611931j))*x_ref[1]
        arg[(1, 1)]=(0.57497844454+0.0133631981273j)*x[0]**o + ((-0.210849134683-0.472549463423j))*x[0] + ((0.961677524105+0.937876433653j))*x[1]**o + ((0.592941825913-0.401743029363j))*x[1]
        ref[(1, 1)]=(0.57497844454+0.0133631981273j)*x_ref[0]**o + ((-0.210849134683-0.472549463423j))*x_ref[0] + ((0.961677524105+0.937876433653j))*x_ref[1]**o + ((0.592941825913-0.401743029363j))*x_ref[1]
        arg[(1, 2)]=(0.116709028565+0.38111545725j)*x[0]**o + ((-0.837514707121+0.949361858995j))*x[0] + ((-0.0584507652288-0.726220439222j))*x[1]**o + ((0.989132949523-0.867226965109j))*x[1]
        ref[(1, 2)]=(0.116709028565+0.38111545725j)*x_ref[0]**o + ((-0.837514707121+0.949361858995j))*x_ref[0] + ((-0.0584507652288-0.726220439222j))*x_ref[1]**o + ((0.989132949523-0.867226965109j))*x_ref[1]
        arg[(2, 0)]=(-0.0048822527323+0.37474701995j)*x[0]**o + ((-0.318142935826-0.524683401081j))*x[0] + ((0.227240022445+0.20511637751j))*x[1]**o + ((-0.611666879031+0.516406495965j))*x[1]
        ref[(2, 0)]=(-0.0048822527323+0.37474701995j)*x_ref[0]**o + ((-0.318142935826-0.524683401081j))*x_ref[0] + ((0.227240022445+0.20511637751j))*x_ref[1]**o + ((-0.611666879031+0.516406495965j))*x_ref[1]
        arg[(2, 1)]=(-0.407008611822+0.197699034509j)*x[0]**o + ((-0.490250700122+0.568574532198j))*x[0] + ((-0.121746066969-0.0343916968866j))*x[1]**o + ((0.847537408768+0.397691968951j))*x[1]
        ref[(2, 1)]=(-0.407008611822+0.197699034509j)*x_ref[0]**o + ((-0.490250700122+0.568574532198j))*x_ref[0] + ((-0.121746066969-0.0343916968866j))*x_ref[1]**o + ((0.847537408768+0.397691968951j))*x_ref[1]
        arg[(2, 2)]=(0.527633618796+0.117124950124j)*x[0]**o + ((-0.668720800197-0.0745190970656j))*x[0] + ((0.836746856232+0.822990752026j))*x[1]**o + ((0.105915269714+0.592572087963j))*x[1]
        ref[(2, 2)]=(0.527633618796+0.117124950124j)*x_ref[0]**o + ((-0.668720800197-0.0745190970656j))*x_ref[0] + ((0.836746856232+0.822990752026j))*x_ref[1]**o + ((0.105915269714+0.592572087963j))*x_ref[1]
        arg[(3, 0)]=(0.442725315218+0.886318758499j)*x[0]**o + ((0.414208654135-0.783762710834j))*x[0] + ((-0.598934538716+0.951903441863j))*x[1]**o + ((0.679328090773+0.63705219228j))*x[1]
        ref[(3, 0)]=(0.442725315218+0.886318758499j)*x_ref[0]**o + ((0.414208654135-0.783762710834j))*x_ref[0] + ((-0.598934538716+0.951903441863j))*x_ref[1]**o + ((0.679328090773+0.63705219228j))*x_ref[1]
        arg[(3, 1)]=(-0.147636925657+0.03545570268j)*x[0]**o + ((0.728767117877-0.307288691663j))*x[0] + ((0.563876068065-0.692285205229j))*x[1]**o + ((0.0589730203096-0.193184059976j))*x[1]
        ref[(3, 1)]=(-0.147636925657+0.03545570268j)*x_ref[0]**o + ((0.728767117877-0.307288691663j))*x_ref[0] + ((0.563876068065-0.692285205229j))*x_ref[1]**o + ((0.0589730203096-0.193184059976j))*x_ref[1]
        arg[(3, 2)]=(0.0210975278137+0.328231486401j)*x[0]**o + ((-0.607059088238-0.744247966957j))*x[0] + ((-0.485360708572+0.0884719298064j))*x[1]**o + ((-0.108202494327-0.880587498853j))*x[1]
        ref[(3, 2)]=(0.0210975278137+0.328231486401j)*x_ref[0]**o + ((-0.607059088238-0.744247966957j))*x_ref[0] + ((-0.485360708572+0.0884719298064j))*x_ref[1]**o + ((-0.108202494327-0.880587498853j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(-0.112715096628-0.993089375863j)*x[2]**o + ((-0.81725301884-0.0998903060495j))*x[2]
            ref[(0, 0)]+=(-0.112715096628-0.993089375863j)*x_ref[2]**o + ((-0.81725301884-0.0998903060495j))*x_ref[2]
            arg[(0, 1)]+=(-0.984873132523-0.958702862799j)*x[2]**o + ((0.60012371554-0.326909915924j))*x[2]
            ref[(0, 1)]+=(-0.984873132523-0.958702862799j)*x_ref[2]**o + ((0.60012371554-0.326909915924j))*x_ref[2]
            arg[(0, 2)]+=(0.463620515742+0.118859654439j)*x[2]**o + ((0.81454163373-0.187835338766j))*x[2]
            ref[(0, 2)]+=(0.463620515742+0.118859654439j)*x_ref[2]**o + ((0.81454163373-0.187835338766j))*x_ref[2]
            arg[(1, 0)]+=(-0.894220168592+0.851061003608j)*x[2]**o + ((-0.131262486694+0.0911626123717j))*x[2]
            ref[(1, 0)]+=(-0.894220168592+0.851061003608j)*x_ref[2]**o + ((-0.131262486694+0.0911626123717j))*x_ref[2]
            arg[(1, 1)]+=(-0.832053045783+0.641529672354j)*x[2]**o + ((-0.288329473194+0.408762550361j))*x[2]
            ref[(1, 1)]+=(-0.832053045783+0.641529672354j)*x_ref[2]**o + ((-0.288329473194+0.408762550361j))*x_ref[2]
            arg[(1, 2)]+=(-0.888975145712-0.591481109662j)*x[2]**o + ((-0.665086965437-0.373148436714j))*x[2]
            ref[(1, 2)]+=(-0.888975145712-0.591481109662j)*x_ref[2]**o + ((-0.665086965437-0.373148436714j))*x_ref[2]
            arg[(2, 0)]+=(-0.0465519788097-0.550493968012j)*x[2]**o + ((0.0133225440005+0.380536012496j))*x[2]
            ref[(2, 0)]+=(-0.0465519788097-0.550493968012j)*x_ref[2]**o + ((0.0133225440005+0.380536012496j))*x_ref[2]
            arg[(2, 1)]+=(0.998155224905+0.929180845026j)*x[2]**o + ((-0.730744205151-0.74005109801j))*x[2]
            ref[(2, 1)]+=(0.998155224905+0.929180845026j)*x_ref[2]**o + ((-0.730744205151-0.74005109801j))*x_ref[2]
            arg[(2, 2)]+=(0.179153227229+0.576436866929j)*x[2]**o + ((-0.533868344453-0.870214850762j))*x[2]
            ref[(2, 2)]+=(0.179153227229+0.576436866929j)*x_ref[2]**o + ((-0.533868344453-0.870214850762j))*x_ref[2]
            arg[(3, 0)]+=(0.631815656388+0.0972862605277j)*x[2]**o + ((-0.742970095856-0.46140905592j))*x[2]
            ref[(3, 0)]+=(0.631815656388+0.0972862605277j)*x_ref[2]**o + ((-0.742970095856-0.46140905592j))*x_ref[2]
            arg[(3, 1)]+=(-0.987099247813+0.86513224186j)*x[2]**o + ((-0.200328636027-0.147463665377j))*x[2]
            ref[(3, 1)]+=(-0.987099247813+0.86513224186j)*x_ref[2]**o + ((-0.200328636027-0.147463665377j))*x_ref[2]
            arg[(3, 2)]+=(0.982830447298+0.153773363251j)*x[2]**o + ((-0.191921648263-0.164017607737j))*x[2]
            ref[(3, 2)]+=(0.982830447298+0.153773363251j)*x_ref[2]**o + ((-0.191921648263-0.164017607737j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 2),w)
        ref = Data(0,(4, 3, 2),w_ref)
        arg[(0, 0, 0)]=(-0.10674924992+0.478432219073j)*x[0]**o + ((-0.0279783487665+0.652362178556j))*x[0] + ((-0.123554571483+0.666452893657j))*x[1]**o + ((0.278997533943+0.0774713262833j))*x[1]
        ref[(0, 0, 0)]=(-0.10674924992+0.478432219073j)*x_ref[0]**o + ((-0.0279783487665+0.652362178556j))*x_ref[0] + ((-0.123554571483+0.666452893657j))*x_ref[1]**o + ((0.278997533943+0.0774713262833j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.100189375844+0.695029725236j)*x[0]**o + ((-0.457314088697-0.407026770371j))*x[0] + ((-0.461052280616-0.924158532286j))*x[1]**o + ((-0.399741326563+0.174071944883j))*x[1]
        ref[(0, 0, 1)]=(-0.100189375844+0.695029725236j)*x_ref[0]**o + ((-0.457314088697-0.407026770371j))*x_ref[0] + ((-0.461052280616-0.924158532286j))*x_ref[1]**o + ((-0.399741326563+0.174071944883j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.0302340348794-0.0424391393807j)*x[0]**o + ((-0.0438121262394-0.627615561026j))*x[0] + ((0.524887265616-0.143565047118j))*x[1]**o + ((0.611910040484-0.744341180919j))*x[1]
        ref[(0, 1, 0)]=(-0.0302340348794-0.0424391393807j)*x_ref[0]**o + ((-0.0438121262394-0.627615561026j))*x_ref[0] + ((0.524887265616-0.143565047118j))*x_ref[1]**o + ((0.611910040484-0.744341180919j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.828279509642-0.271788515933j)*x[0]**o + ((-0.225572117796+0.549181586014j))*x[0] + ((-0.534690377196-0.73647554436j))*x[1]**o + ((-0.447519471532-0.236518544931j))*x[1]
        ref[(0, 1, 1)]=(-0.828279509642-0.271788515933j)*x_ref[0]**o + ((-0.225572117796+0.549181586014j))*x_ref[0] + ((-0.534690377196-0.73647554436j))*x_ref[1]**o + ((-0.447519471532-0.236518544931j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.316244869308-0.637525203871j)*x[0]**o + ((0.0895638859924+0.77590787503j))*x[0] + ((0.842097690279-0.0550596868785j))*x[1]**o + ((0.527228776671-0.248034230447j))*x[1]
        ref[(0, 2, 0)]=(-0.316244869308-0.637525203871j)*x_ref[0]**o + ((0.0895638859924+0.77590787503j))*x_ref[0] + ((0.842097690279-0.0550596868785j))*x_ref[1]**o + ((0.527228776671-0.248034230447j))*x_ref[1]
        arg[(0, 2, 1)]=(-0.334430042601+0.14863943135j)*x[0]**o + ((-0.69340472258+0.87608300888j))*x[0] + ((-0.490856126219+0.82460720739j))*x[1]**o + ((0.784074995722-0.453831758229j))*x[1]
        ref[(0, 2, 1)]=(-0.334430042601+0.14863943135j)*x_ref[0]**o + ((-0.69340472258+0.87608300888j))*x_ref[0] + ((-0.490856126219+0.82460720739j))*x_ref[1]**o + ((0.784074995722-0.453831758229j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.603689729221-0.843361726879j)*x[0]**o + ((0.695326981776+0.0252714835344j))*x[0] + ((-0.0251650829761-0.842301177951j))*x[1]**o + ((-0.841778837858+0.642056228576j))*x[1]
        ref[(1, 0, 0)]=(-0.603689729221-0.843361726879j)*x_ref[0]**o + ((0.695326981776+0.0252714835344j))*x_ref[0] + ((-0.0251650829761-0.842301177951j))*x_ref[1]**o + ((-0.841778837858+0.642056228576j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.406437721732-0.548875611427j)*x[0]**o + ((-0.353624679696+0.982952396668j))*x[0] + ((0.772562047054-0.0410610993246j))*x[1]**o + ((0.463258010969-0.217783384442j))*x[1]
        ref[(1, 0, 1)]=(-0.406437721732-0.548875611427j)*x_ref[0]**o + ((-0.353624679696+0.982952396668j))*x_ref[0] + ((0.772562047054-0.0410610993246j))*x_ref[1]**o + ((0.463258010969-0.217783384442j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.0248705398412+0.780851971812j)*x[0]**o + ((-0.990470032336+0.352902322898j))*x[0] + ((-0.17111478253-0.278447861043j))*x[1]**o + ((-0.230500707963+0.819878895814j))*x[1]
        ref[(1, 1, 0)]=(-0.0248705398412+0.780851971812j)*x_ref[0]**o + ((-0.990470032336+0.352902322898j))*x_ref[0] + ((-0.17111478253-0.278447861043j))*x_ref[1]**o + ((-0.230500707963+0.819878895814j))*x_ref[1]
        arg[(1, 1, 1)]=(0.99088718933-0.926528309409j)*x[0]**o + ((-0.0216707200605+0.959483776302j))*x[0] + ((-0.205283289171+0.556431893322j))*x[1]**o + ((-0.119489274427-0.249491142752j))*x[1]
        ref[(1, 1, 1)]=(0.99088718933-0.926528309409j)*x_ref[0]**o + ((-0.0216707200605+0.959483776302j))*x_ref[0] + ((-0.205283289171+0.556431893322j))*x_ref[1]**o + ((-0.119489274427-0.249491142752j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.212125055051-0.770580295748j)*x[0]**o + ((0.211265217835+0.617718513585j))*x[0] + ((-0.283043351537-0.206102207548j))*x[1]**o + ((-0.530830129934-0.585438807085j))*x[1]
        ref[(1, 2, 0)]=(-0.212125055051-0.770580295748j)*x_ref[0]**o + ((0.211265217835+0.617718513585j))*x_ref[0] + ((-0.283043351537-0.206102207548j))*x_ref[1]**o + ((-0.530830129934-0.585438807085j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.592668259901-0.449597083758j)*x[0]**o + ((0.686192754639+0.478291241008j))*x[0] + ((0.797691642408+0.538475412837j))*x[1]**o + ((-0.679867493915-0.101367686731j))*x[1]
        ref[(1, 2, 1)]=(-0.592668259901-0.449597083758j)*x_ref[0]**o + ((0.686192754639+0.478291241008j))*x_ref[0] + ((0.797691642408+0.538475412837j))*x_ref[1]**o + ((-0.679867493915-0.101367686731j))*x_ref[1]
        arg[(2, 0, 0)]=(-0.841095153267-0.170900589647j)*x[0]**o + ((-0.307158961654+0.14334131113j))*x[0] + ((0.642553547139-0.196267446352j))*x[1]**o + ((-0.918492165607-0.424065176584j))*x[1]
        ref[(2, 0, 0)]=(-0.841095153267-0.170900589647j)*x_ref[0]**o + ((-0.307158961654+0.14334131113j))*x_ref[0] + ((0.642553547139-0.196267446352j))*x_ref[1]**o + ((-0.918492165607-0.424065176584j))*x_ref[1]
        arg[(2, 0, 1)]=(0.0423362535332-0.696446951185j)*x[0]**o + ((-0.113835666004-0.730738987807j))*x[0] + ((0.126284949826-0.842172177119j))*x[1]**o + ((-0.614003490885+0.253360131843j))*x[1]
        ref[(2, 0, 1)]=(0.0423362535332-0.696446951185j)*x_ref[0]**o + ((-0.113835666004-0.730738987807j))*x_ref[0] + ((0.126284949826-0.842172177119j))*x_ref[1]**o + ((-0.614003490885+0.253360131843j))*x_ref[1]
        arg[(2, 1, 0)]=(-0.552784540762+0.0849295946324j)*x[0]**o + ((0.99257281512-0.447551023067j))*x[0] + ((-0.733433892847+0.343065728077j))*x[1]**o + ((-0.154176732054+0.916757144691j))*x[1]
        ref[(2, 1, 0)]=(-0.552784540762+0.0849295946324j)*x_ref[0]**o + ((0.99257281512-0.447551023067j))*x_ref[0] + ((-0.733433892847+0.343065728077j))*x_ref[1]**o + ((-0.154176732054+0.916757144691j))*x_ref[1]
        arg[(2, 1, 1)]=(0.580642430598+0.952082245963j)*x[0]**o + ((-0.237321288151-0.07154503994j))*x[0] + ((0.814975382418-0.337725780201j))*x[1]**o + ((-0.180983615652-0.762956346712j))*x[1]
        ref[(2, 1, 1)]=(0.580642430598+0.952082245963j)*x_ref[0]**o + ((-0.237321288151-0.07154503994j))*x_ref[0] + ((0.814975382418-0.337725780201j))*x_ref[1]**o + ((-0.180983615652-0.762956346712j))*x_ref[1]
        arg[(2, 2, 0)]=(-0.485999272854+0.626062550105j)*x[0]**o + ((0.24420548708-0.204166794927j))*x[0] + ((0.916582559997-0.781892723071j))*x[1]**o + ((-0.219763226355+0.156354832892j))*x[1]
        ref[(2, 2, 0)]=(-0.485999272854+0.626062550105j)*x_ref[0]**o + ((0.24420548708-0.204166794927j))*x_ref[0] + ((0.916582559997-0.781892723071j))*x_ref[1]**o + ((-0.219763226355+0.156354832892j))*x_ref[1]
        arg[(2, 2, 1)]=(-0.972346451502-0.591783595304j)*x[0]**o + ((0.104797573541-0.927625556204j))*x[0] + ((0.66440736679+0.236614795701j))*x[1]**o + ((-0.531796647334+0.406554608492j))*x[1]
        ref[(2, 2, 1)]=(-0.972346451502-0.591783595304j)*x_ref[0]**o + ((0.104797573541-0.927625556204j))*x_ref[0] + ((0.66440736679+0.236614795701j))*x_ref[1]**o + ((-0.531796647334+0.406554608492j))*x_ref[1]
        arg[(3, 0, 0)]=(-0.211747196639+0.630749332715j)*x[0]**o + ((-0.785166161561-0.034544409422j))*x[0] + ((0.512239276798-0.255040234745j))*x[1]**o + ((0.980003874796-0.867900066276j))*x[1]
        ref[(3, 0, 0)]=(-0.211747196639+0.630749332715j)*x_ref[0]**o + ((-0.785166161561-0.034544409422j))*x_ref[0] + ((0.512239276798-0.255040234745j))*x_ref[1]**o + ((0.980003874796-0.867900066276j))*x_ref[1]
        arg[(3, 0, 1)]=(0.268721121114-0.887687267279j)*x[0]**o + ((-0.968111803111+0.740425040833j))*x[0] + ((0.626112788938+0.367367863295j))*x[1]**o + ((-0.532457183587-0.629910240805j))*x[1]
        ref[(3, 0, 1)]=(0.268721121114-0.887687267279j)*x_ref[0]**o + ((-0.968111803111+0.740425040833j))*x_ref[0] + ((0.626112788938+0.367367863295j))*x_ref[1]**o + ((-0.532457183587-0.629910240805j))*x_ref[1]
        arg[(3, 1, 0)]=(-0.38107677527+0.58381517632j)*x[0]**o + ((0.0534300701612+0.617762402477j))*x[0] + ((0.590319739205-0.395812508274j))*x[1]**o + ((-0.286268092946+0.855122131343j))*x[1]
        ref[(3, 1, 0)]=(-0.38107677527+0.58381517632j)*x_ref[0]**o + ((0.0534300701612+0.617762402477j))*x_ref[0] + ((0.590319739205-0.395812508274j))*x_ref[1]**o + ((-0.286268092946+0.855122131343j))*x_ref[1]
        arg[(3, 1, 1)]=(-0.59777182432-0.0370220962051j)*x[0]**o + ((-0.892270101526+0.497112141292j))*x[0] + ((-0.840467119611-0.30705740019j))*x[1]**o + ((-0.897424540159-0.808899972228j))*x[1]
        ref[(3, 1, 1)]=(-0.59777182432-0.0370220962051j)*x_ref[0]**o + ((-0.892270101526+0.497112141292j))*x_ref[0] + ((-0.840467119611-0.30705740019j))*x_ref[1]**o + ((-0.897424540159-0.808899972228j))*x_ref[1]
        arg[(3, 2, 0)]=(0.732075751344-0.233182179495j)*x[0]**o + ((-0.949153166799+0.27557366782j))*x[0] + ((-0.288340636788-0.807248589094j))*x[1]**o + ((-0.165889643602+0.255404742806j))*x[1]
        ref[(3, 2, 0)]=(0.732075751344-0.233182179495j)*x_ref[0]**o + ((-0.949153166799+0.27557366782j))*x_ref[0] + ((-0.288340636788-0.807248589094j))*x_ref[1]**o + ((-0.165889643602+0.255404742806j))*x_ref[1]
        arg[(3, 2, 1)]=(-0.474705601571-0.287821757015j)*x[0]**o + ((0.620669689901-0.0287469445445j))*x[0] + ((0.797636861109+0.134424728323j))*x[1]**o + ((-0.876656303997-0.19615576673j))*x[1]
        ref[(3, 2, 1)]=(-0.474705601571-0.287821757015j)*x_ref[0]**o + ((0.620669689901-0.0287469445445j))*x_ref[0] + ((0.797636861109+0.134424728323j))*x_ref[1]**o + ((-0.876656303997-0.19615576673j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.409536128638-0.918511969443j)*x[2]**o + ((-0.953772860182-0.146626157401j))*x[2]
            ref[(0, 0, 0)]+=(0.409536128638-0.918511969443j)*x_ref[2]**o + ((-0.953772860182-0.146626157401j))*x_ref[2]
            arg[(0, 0, 1)]+=(0.174862528831-0.0858466746401j)*x[2]**o + ((-0.748955663862-0.163647649736j))*x[2]
            ref[(0, 0, 1)]+=(0.174862528831-0.0858466746401j)*x_ref[2]**o + ((-0.748955663862-0.163647649736j))*x_ref[2]
            arg[(0, 1, 0)]+=(-0.142446810999+0.327321735475j)*x[2]**o + ((-0.307932216136+0.95479783015j))*x[2]
            ref[(0, 1, 0)]+=(-0.142446810999+0.327321735475j)*x_ref[2]**o + ((-0.307932216136+0.95479783015j))*x_ref[2]
            arg[(0, 1, 1)]+=(0.566560097936-0.746590383239j)*x[2]**o + ((-0.780532043485+0.126414054191j))*x[2]
            ref[(0, 1, 1)]+=(0.566560097936-0.746590383239j)*x_ref[2]**o + ((-0.780532043485+0.126414054191j))*x_ref[2]
            arg[(0, 2, 0)]+=(-0.427759724384-0.731734216438j)*x[2]**o + ((-0.912929208503-0.804830295338j))*x[2]
            ref[(0, 2, 0)]+=(-0.427759724384-0.731734216438j)*x_ref[2]**o + ((-0.912929208503-0.804830295338j))*x_ref[2]
            arg[(0, 2, 1)]+=(-0.998563577879-0.870560110857j)*x[2]**o + ((-0.0705331761799-0.00784374057634j))*x[2]
            ref[(0, 2, 1)]+=(-0.998563577879-0.870560110857j)*x_ref[2]**o + ((-0.0705331761799-0.00784374057634j))*x_ref[2]
            arg[(1, 0, 0)]+=(0.46254497049-0.158625117619j)*x[2]**o + ((-0.706932591351-0.459889281389j))*x[2]
            ref[(1, 0, 0)]+=(0.46254497049-0.158625117619j)*x_ref[2]**o + ((-0.706932591351-0.459889281389j))*x_ref[2]
            arg[(1, 0, 1)]+=(-0.768928796592+0.389865602669j)*x[2]**o + ((0.163981397007+0.66782809926j))*x[2]
            ref[(1, 0, 1)]+=(-0.768928796592+0.389865602669j)*x_ref[2]**o + ((0.163981397007+0.66782809926j))*x_ref[2]
            arg[(1, 1, 0)]+=(-0.776643522868+0.441615342031j)*x[2]**o + ((0.700342396054-0.0613902334759j))*x[2]
            ref[(1, 1, 0)]+=(-0.776643522868+0.441615342031j)*x_ref[2]**o + ((0.700342396054-0.0613902334759j))*x_ref[2]
            arg[(1, 1, 1)]+=(-0.831151297272+0.866014625843j)*x[2]**o + ((-0.465189248733-0.816049669875j))*x[2]
            ref[(1, 1, 1)]+=(-0.831151297272+0.866014625843j)*x_ref[2]**o + ((-0.465189248733-0.816049669875j))*x_ref[2]
            arg[(1, 2, 0)]+=(-0.884835820265-0.0649125780813j)*x[2]**o + ((0.944177041289-0.629628378709j))*x[2]
            ref[(1, 2, 0)]+=(-0.884835820265-0.0649125780813j)*x_ref[2]**o + ((0.944177041289-0.629628378709j))*x_ref[2]
            arg[(1, 2, 1)]+=(-0.484081850285-0.945600218594j)*x[2]**o + ((0.386256612793-0.683289357186j))*x[2]
            ref[(1, 2, 1)]+=(-0.484081850285-0.945600218594j)*x_ref[2]**o + ((0.386256612793-0.683289357186j))*x_ref[2]
            arg[(2, 0, 0)]+=(0.304888735214+0.682347846243j)*x[2]**o + ((-0.868740119259-0.960393085237j))*x[2]
            ref[(2, 0, 0)]+=(0.304888735214+0.682347846243j)*x_ref[2]**o + ((-0.868740119259-0.960393085237j))*x_ref[2]
            arg[(2, 0, 1)]+=(-0.313368331484-0.454227660485j)*x[2]**o + ((-0.859561368785+0.595418823219j))*x[2]
            ref[(2, 0, 1)]+=(-0.313368331484-0.454227660485j)*x_ref[2]**o + ((-0.859561368785+0.595418823219j))*x_ref[2]
            arg[(2, 1, 0)]+=(-0.312474303944-0.987442058527j)*x[2]**o + ((0.108831851321+0.237574558135j))*x[2]
            ref[(2, 1, 0)]+=(-0.312474303944-0.987442058527j)*x_ref[2]**o + ((0.108831851321+0.237574558135j))*x_ref[2]
            arg[(2, 1, 1)]+=(-0.409304814483+0.283077412471j)*x[2]**o + ((0.580886091222-0.100860506514j))*x[2]
            ref[(2, 1, 1)]+=(-0.409304814483+0.283077412471j)*x_ref[2]**o + ((0.580886091222-0.100860506514j))*x_ref[2]
            arg[(2, 2, 0)]+=(0.864540607876-0.0591396603613j)*x[2]**o + ((0.363509764383+0.630948647677j))*x[2]
            ref[(2, 2, 0)]+=(0.864540607876-0.0591396603613j)*x_ref[2]**o + ((0.363509764383+0.630948647677j))*x_ref[2]
            arg[(2, 2, 1)]+=(0.849075474905-0.418198997328j)*x[2]**o + ((0.298762053844-0.490581596026j))*x[2]
            ref[(2, 2, 1)]+=(0.849075474905-0.418198997328j)*x_ref[2]**o + ((0.298762053844-0.490581596026j))*x_ref[2]
            arg[(3, 0, 0)]+=(0.664510225251+0.873262323134j)*x[2]**o + ((0.896617905417+0.748867624614j))*x[2]
            ref[(3, 0, 0)]+=(0.664510225251+0.873262323134j)*x_ref[2]**o + ((0.896617905417+0.748867624614j))*x_ref[2]
            arg[(3, 0, 1)]+=(-0.453911632093-0.544517199251j)*x[2]**o + ((0.328933482325+0.787031270964j))*x[2]
            ref[(3, 0, 1)]+=(-0.453911632093-0.544517199251j)*x_ref[2]**o + ((0.328933482325+0.787031270964j))*x_ref[2]
            arg[(3, 1, 0)]+=(-0.0393131296894+0.617948090811j)*x[2]**o + ((-0.90326756805+0.438610139749j))*x[2]
            ref[(3, 1, 0)]+=(-0.0393131296894+0.617948090811j)*x_ref[2]**o + ((-0.90326756805+0.438610139749j))*x_ref[2]
            arg[(3, 1, 1)]+=(0.792101219892+0.505432701242j)*x[2]**o + ((0.0242341367097+0.381191707668j))*x[2]
            ref[(3, 1, 1)]+=(0.792101219892+0.505432701242j)*x_ref[2]**o + ((0.0242341367097+0.381191707668j))*x_ref[2]
            arg[(3, 2, 0)]+=(0.984684216308-0.261888849276j)*x[2]**o + ((0.800084993959-0.910404098298j))*x[2]
            ref[(3, 2, 0)]+=(0.984684216308-0.261888849276j)*x_ref[2]**o + ((0.800084993959-0.910404098298j))*x_ref[2]
            arg[(3, 2, 1)]+=(-0.695933869541-0.708681857063j)*x[2]**o + ((-0.400236827353-0.380727021898j))*x[2]
            ref[(3, 2, 1)]+=(-0.695933869541-0.708681857063j)*x_ref[2]**o + ((-0.400236827353-0.380727021898j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 3, 2),w)
        ref = Data(0,(2, 4, 3, 2),w_ref)
        arg[(0, 0, 0, 0)]=(-0.213824583478+0.296656872655j)*x[0]**o + ((-0.340883353323-0.471640347022j))*x[0] + ((-0.567297060306+0.212067256559j))*x[1]**o + ((-0.52988798037-0.901184705397j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.213824583478+0.296656872655j)*x_ref[0]**o + ((-0.340883353323-0.471640347022j))*x_ref[0] + ((-0.567297060306+0.212067256559j))*x_ref[1]**o + ((-0.52988798037-0.901184705397j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(0.337648240338-0.431906424328j)*x[0]**o + ((0.859714169084+0.636201794183j))*x[0] + ((-0.0532591133462+0.769066822598j))*x[1]**o + ((0.0798021332189+0.956443650967j))*x[1]
        ref[(0, 0, 0, 1)]=(0.337648240338-0.431906424328j)*x_ref[0]**o + ((0.859714169084+0.636201794183j))*x_ref[0] + ((-0.0532591133462+0.769066822598j))*x_ref[1]**o + ((0.0798021332189+0.956443650967j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.795647872613-0.16445458806j)*x[0]**o + ((-0.470505707579-0.419116924125j))*x[0] + ((0.247937616768+0.395130202632j))*x[1]**o + ((-0.983034614498-0.893641778642j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.795647872613-0.16445458806j)*x_ref[0]**o + ((-0.470505707579-0.419116924125j))*x_ref[0] + ((0.247937616768+0.395130202632j))*x_ref[1]**o + ((-0.983034614498-0.893641778642j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.259799365643-0.517460247746j)*x[0]**o + ((-0.503831869251+0.805927492138j))*x[0] + ((-0.721815741281-0.666099301792j))*x[1]**o + ((-0.674465235831-0.324544671305j))*x[1]
        ref[(0, 0, 1, 1)]=(0.259799365643-0.517460247746j)*x_ref[0]**o + ((-0.503831869251+0.805927492138j))*x_ref[0] + ((-0.721815741281-0.666099301792j))*x_ref[1]**o + ((-0.674465235831-0.324544671305j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(0.614125939766-0.00952764350881j)*x[0]**o + ((0.366115927632-0.977708441562j))*x[0] + ((0.135210984614+0.625246706677j))*x[1]**o + ((-0.661230865278+0.780273603389j))*x[1]
        ref[(0, 0, 2, 0)]=(0.614125939766-0.00952764350881j)*x_ref[0]**o + ((0.366115927632-0.977708441562j))*x_ref[0] + ((0.135210984614+0.625246706677j))*x_ref[1]**o + ((-0.661230865278+0.780273603389j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(0.801461041719-0.840300500681j)*x[0]**o + ((0.55941681644+0.390611454733j))*x[0] + ((0.578272368501+0.430479026257j))*x[1]**o + ((0.541269774313+0.056881264699j))*x[1]
        ref[(0, 0, 2, 1)]=(0.801461041719-0.840300500681j)*x_ref[0]**o + ((0.55941681644+0.390611454733j))*x_ref[0] + ((0.578272368501+0.430479026257j))*x_ref[1]**o + ((0.541269774313+0.056881264699j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.358662638681+0.3965273262j)*x[0]**o + ((0.441654485957-0.878302231681j))*x[0] + ((-0.109306234512+0.3326879604j))*x[1]**o + ((0.686627019287+0.949912916372j))*x[1]
        ref[(0, 1, 0, 0)]=(0.358662638681+0.3965273262j)*x_ref[0]**o + ((0.441654485957-0.878302231681j))*x_ref[0] + ((-0.109306234512+0.3326879604j))*x_ref[1]**o + ((0.686627019287+0.949912916372j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.876225878669+0.85492641691j)*x[0]**o + ((-0.893461816006+0.755527187312j))*x[0] + ((-0.544461169196+0.595030493708j))*x[1]**o + ((0.22768049879+0.209961093654j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.876225878669+0.85492641691j)*x_ref[0]**o + ((-0.893461816006+0.755527187312j))*x_ref[0] + ((-0.544461169196+0.595030493708j))*x_ref[1]**o + ((0.22768049879+0.209961093654j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.726651945579-0.768540670932j)*x[0]**o + ((-0.788742484654-0.485927905716j))*x[0] + ((-0.99145086175+0.691175487273j))*x[1]**o + ((-0.0830178520777-0.817747452792j))*x[1]
        ref[(0, 1, 1, 0)]=(0.726651945579-0.768540670932j)*x_ref[0]**o + ((-0.788742484654-0.485927905716j))*x_ref[0] + ((-0.99145086175+0.691175487273j))*x_ref[1]**o + ((-0.0830178520777-0.817747452792j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.511013722287+0.735167620954j)*x[0]**o + ((0.551231824557+0.326445633252j))*x[0] + ((-0.348619849268+0.11924922212j))*x[1]**o + ((-0.605360561714+0.561112124328j))*x[1]
        ref[(0, 1, 1, 1)]=(0.511013722287+0.735167620954j)*x_ref[0]**o + ((0.551231824557+0.326445633252j))*x_ref[0] + ((-0.348619849268+0.11924922212j))*x_ref[1]**o + ((-0.605360561714+0.561112124328j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(-0.8525620872-0.500343284857j)*x[0]**o + ((0.983178268664-0.0219941519224j))*x[0] + ((-0.369560237255+0.693655469878j))*x[1]**o + ((-0.559289196101-0.671998602581j))*x[1]
        ref[(0, 1, 2, 0)]=(-0.8525620872-0.500343284857j)*x_ref[0]**o + ((0.983178268664-0.0219941519224j))*x_ref[0] + ((-0.369560237255+0.693655469878j))*x_ref[1]**o + ((-0.559289196101-0.671998602581j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(-0.355038641699+0.438594033076j)*x[0]**o + ((-0.985447640284+0.90658689468j))*x[0] + ((-0.537417070682+0.140986086214j))*x[1]**o + ((-0.581604652465-0.240387151143j))*x[1]
        ref[(0, 1, 2, 1)]=(-0.355038641699+0.438594033076j)*x_ref[0]**o + ((-0.985447640284+0.90658689468j))*x_ref[0] + ((-0.537417070682+0.140986086214j))*x_ref[1]**o + ((-0.581604652465-0.240387151143j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.883176550475+0.523105046961j)*x[0]**o + ((0.273945423658-0.875308762875j))*x[0] + ((0.432474970375-0.948076143214j))*x[1]**o + ((0.944638898583-0.267063621889j))*x[1]
        ref[(0, 2, 0, 0)]=(0.883176550475+0.523105046961j)*x_ref[0]**o + ((0.273945423658-0.875308762875j))*x_ref[0] + ((0.432474970375-0.948076143214j))*x_ref[1]**o + ((0.944638898583-0.267063621889j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(0.199762897493+0.554744508687j)*x[0]**o + ((-0.304608178411-0.961442387031j))*x[0] + ((0.0501573049675-0.0735784880807j))*x[1]**o + ((-0.715383678992-0.710272741908j))*x[1]
        ref[(0, 2, 0, 1)]=(0.199762897493+0.554744508687j)*x_ref[0]**o + ((-0.304608178411-0.961442387031j))*x_ref[0] + ((0.0501573049675-0.0735784880807j))*x_ref[1]**o + ((-0.715383678992-0.710272741908j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(0.889759809072-0.927481787279j)*x[0]**o + ((0.615866897766-0.215438823971j))*x[0] + ((-0.474168021154-0.448465218603j))*x[1]**o + ((0.627161590353-0.0623652192891j))*x[1]
        ref[(0, 2, 1, 0)]=(0.889759809072-0.927481787279j)*x_ref[0]**o + ((0.615866897766-0.215438823971j))*x_ref[0] + ((-0.474168021154-0.448465218603j))*x_ref[1]**o + ((0.627161590353-0.0623652192891j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(0.58585640042+0.199758330847j)*x[0]**o + ((0.449404590019-0.237575319148j))*x[0] + ((0.968001652231-0.278205660176j))*x[1]**o + ((-0.178150462415-0.906820679982j))*x[1]
        ref[(0, 2, 1, 1)]=(0.58585640042+0.199758330847j)*x_ref[0]**o + ((0.449404590019-0.237575319148j))*x_ref[0] + ((0.968001652231-0.278205660176j))*x_ref[1]**o + ((-0.178150462415-0.906820679982j))*x_ref[1]
        arg[(0, 2, 2, 0)]=(0.894087136796+0.42532882269j)*x[0]**o + ((0.421303693671+0.771256481999j))*x[0] + ((0.8223349563-0.392746272473j))*x[1]**o + ((-0.484051418844-0.958940029476j))*x[1]
        ref[(0, 2, 2, 0)]=(0.894087136796+0.42532882269j)*x_ref[0]**o + ((0.421303693671+0.771256481999j))*x_ref[0] + ((0.8223349563-0.392746272473j))*x_ref[1]**o + ((-0.484051418844-0.958940029476j))*x_ref[1]
        arg[(0, 2, 2, 1)]=(-0.598918689004+0.238809462587j)*x[0]**o + ((-0.0654375132944+0.00843605394703j))*x[0] + ((-0.390736964526+0.365540000406j))*x[1]**o + ((-0.716306453562-0.816149456466j))*x[1]
        ref[(0, 2, 2, 1)]=(-0.598918689004+0.238809462587j)*x_ref[0]**o + ((-0.0654375132944+0.00843605394703j))*x_ref[0] + ((-0.390736964526+0.365540000406j))*x_ref[1]**o + ((-0.716306453562-0.816149456466j))*x_ref[1]
        arg[(0, 3, 0, 0)]=(0.174567957304-0.354624081617j)*x[0]**o + ((0.589203808023-0.727284768002j))*x[0] + ((0.295384423354-0.969538739892j))*x[1]**o + ((0.256637490145+0.428804593552j))*x[1]
        ref[(0, 3, 0, 0)]=(0.174567957304-0.354624081617j)*x_ref[0]**o + ((0.589203808023-0.727284768002j))*x_ref[0] + ((0.295384423354-0.969538739892j))*x_ref[1]**o + ((0.256637490145+0.428804593552j))*x_ref[1]
        arg[(0, 3, 0, 1)]=(-0.859748941403-0.880451836013j)*x[0]**o + ((0.311271946556+0.910791394044j))*x[0] + ((0.310410535523+0.647906664687j))*x[1]**o + ((0.780056909405-0.751063637077j))*x[1]
        ref[(0, 3, 0, 1)]=(-0.859748941403-0.880451836013j)*x_ref[0]**o + ((0.311271946556+0.910791394044j))*x_ref[0] + ((0.310410535523+0.647906664687j))*x_ref[1]**o + ((0.780056909405-0.751063637077j))*x_ref[1]
        arg[(0, 3, 1, 0)]=(-0.105421161633-0.896069073061j)*x[0]**o + ((-0.563326653168-0.923926857996j))*x[0] + ((0.752002959153+0.73780216855j))*x[1]**o + ((0.414160676371+0.6906707804j))*x[1]
        ref[(0, 3, 1, 0)]=(-0.105421161633-0.896069073061j)*x_ref[0]**o + ((-0.563326653168-0.923926857996j))*x_ref[0] + ((0.752002959153+0.73780216855j))*x_ref[1]**o + ((0.414160676371+0.6906707804j))*x_ref[1]
        arg[(0, 3, 1, 1)]=(0.427355859718+0.930615572222j)*x[0]**o + ((0.939673307253-0.959191132911j))*x[0] + ((0.0375204978582-0.272806469918j))*x[1]**o + ((-0.145935974075-0.556157149286j))*x[1]
        ref[(0, 3, 1, 1)]=(0.427355859718+0.930615572222j)*x_ref[0]**o + ((0.939673307253-0.959191132911j))*x_ref[0] + ((0.0375204978582-0.272806469918j))*x_ref[1]**o + ((-0.145935974075-0.556157149286j))*x_ref[1]
        arg[(0, 3, 2, 0)]=(0.213694296317+0.683643024218j)*x[0]**o + ((0.919209150965-0.913368766659j))*x[0] + ((-0.216041638586-0.644526712564j))*x[1]**o + ((-0.729286632616-0.687708048372j))*x[1]
        ref[(0, 3, 2, 0)]=(0.213694296317+0.683643024218j)*x_ref[0]**o + ((0.919209150965-0.913368766659j))*x_ref[0] + ((-0.216041638586-0.644526712564j))*x_ref[1]**o + ((-0.729286632616-0.687708048372j))*x_ref[1]
        arg[(0, 3, 2, 1)]=(-0.633172440568+0.448499743149j)*x[0]**o + ((-0.344848705703-0.306196687127j))*x[0] + ((-0.237404584365-0.0121082689456j))*x[1]**o + ((0.939710663009+0.0278108021835j))*x[1]
        ref[(0, 3, 2, 1)]=(-0.633172440568+0.448499743149j)*x_ref[0]**o + ((-0.344848705703-0.306196687127j))*x_ref[0] + ((-0.237404584365-0.0121082689456j))*x_ref[1]**o + ((0.939710663009+0.0278108021835j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.0365506747894-0.216640221187j)*x[0]**o + ((0.767495790914-0.984615792805j))*x[0] + ((0.400058174245+0.636868343972j))*x[1]**o + ((0.440320894567+0.559690294245j))*x[1]
        ref[(1, 0, 0, 0)]=(0.0365506747894-0.216640221187j)*x_ref[0]**o + ((0.767495790914-0.984615792805j))*x_ref[0] + ((0.400058174245+0.636868343972j))*x_ref[1]**o + ((0.440320894567+0.559690294245j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(-0.391020311486-0.979244046793j)*x[0]**o + ((-0.299288251586-0.374810536134j))*x[0] + ((0.648482185426-0.356297523813j))*x[1]**o + ((0.496973339171+0.758249622094j))*x[1]
        ref[(1, 0, 0, 1)]=(-0.391020311486-0.979244046793j)*x_ref[0]**o + ((-0.299288251586-0.374810536134j))*x_ref[0] + ((0.648482185426-0.356297523813j))*x_ref[1]**o + ((0.496973339171+0.758249622094j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.16539388835-0.505967718925j)*x[0]**o + ((0.287262943103-0.83903353965j))*x[0] + ((0.891475169073+0.954492771054j))*x[1]**o + ((0.724777320578-0.529009932808j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.16539388835-0.505967718925j)*x_ref[0]**o + ((0.287262943103-0.83903353965j))*x_ref[0] + ((0.891475169073+0.954492771054j))*x_ref[1]**o + ((0.724777320578-0.529009932808j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.688971760492+0.676135933895j)*x[0]**o + ((0.280248543918+0.070923547598j))*x[0] + ((-0.825357947103+0.367704738475j))*x[1]**o + ((0.132807715791+0.885084333297j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.688971760492+0.676135933895j)*x_ref[0]**o + ((0.280248543918+0.070923547598j))*x_ref[0] + ((-0.825357947103+0.367704738475j))*x_ref[1]**o + ((0.132807715791+0.885084333297j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(0.734693928518-0.414022899268j)*x[0]**o + ((-0.67110605713-0.708472970927j))*x[0] + ((-0.9135049509+0.263919740587j))*x[1]**o + ((0.631349359547-0.883235501157j))*x[1]
        ref[(1, 0, 2, 0)]=(0.734693928518-0.414022899268j)*x_ref[0]**o + ((-0.67110605713-0.708472970927j))*x_ref[0] + ((-0.9135049509+0.263919740587j))*x_ref[1]**o + ((0.631349359547-0.883235501157j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(-0.729183176546+0.517745005329j)*x[0]**o + ((0.390191791887+0.0204559796174j))*x[0] + ((-0.398924317492-0.463098734702j))*x[1]**o + ((0.00382018640702-0.38642276744j))*x[1]
        ref[(1, 0, 2, 1)]=(-0.729183176546+0.517745005329j)*x_ref[0]**o + ((0.390191791887+0.0204559796174j))*x_ref[0] + ((-0.398924317492-0.463098734702j))*x_ref[1]**o + ((0.00382018640702-0.38642276744j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.752444975612-0.722639499093j)*x[0]**o + ((-0.937658403998+0.0271084797409j))*x[0] + ((0.101750461714+0.783096718168j))*x[1]**o + ((0.737520993627+0.68719004836j))*x[1]
        ref[(1, 1, 0, 0)]=(0.752444975612-0.722639499093j)*x_ref[0]**o + ((-0.937658403998+0.0271084797409j))*x_ref[0] + ((0.101750461714+0.783096718168j))*x_ref[1]**o + ((0.737520993627+0.68719004836j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.945768225831+0.982008511426j)*x[0]**o + ((0.0771899896078+0.525193916113j))*x[0] + ((-0.903552466905-0.0631022588083j))*x[1]**o + ((0.0766785138145-0.592779607147j))*x[1]
        ref[(1, 1, 0, 1)]=(0.945768225831+0.982008511426j)*x_ref[0]**o + ((0.0771899896078+0.525193916113j))*x_ref[0] + ((-0.903552466905-0.0631022588083j))*x_ref[1]**o + ((0.0766785138145-0.592779607147j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.755719725503-0.765848057125j)*x[0]**o + ((-0.286348882589-0.559695928303j))*x[0] + ((-0.307011466951-0.599825027482j))*x[1]**o + ((0.212105048847+0.334746380907j))*x[1]
        ref[(1, 1, 1, 0)]=(0.755719725503-0.765848057125j)*x_ref[0]**o + ((-0.286348882589-0.559695928303j))*x_ref[0] + ((-0.307011466951-0.599825027482j))*x_ref[1]**o + ((0.212105048847+0.334746380907j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.795694578756-0.0305801323231j)*x[0]**o + ((-0.135744425037+0.892325689493j))*x[0] + ((0.599914023127+0.390668367283j))*x[1]**o + ((0.713121594872-0.00813160762364j))*x[1]
        ref[(1, 1, 1, 1)]=(0.795694578756-0.0305801323231j)*x_ref[0]**o + ((-0.135744425037+0.892325689493j))*x_ref[0] + ((0.599914023127+0.390668367283j))*x_ref[1]**o + ((0.713121594872-0.00813160762364j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(0.461193687159+0.604538998826j)*x[0]**o + ((-0.579273041549-0.882010819063j))*x[0] + ((-0.189072321534-0.971922688689j))*x[1]**o + ((0.721892082439-0.550837300985j))*x[1]
        ref[(1, 1, 2, 0)]=(0.461193687159+0.604538998826j)*x_ref[0]**o + ((-0.579273041549-0.882010819063j))*x_ref[0] + ((-0.189072321534-0.971922688689j))*x_ref[1]**o + ((0.721892082439-0.550837300985j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(0.461995407015+0.277699143176j)*x[0]**o + ((-0.532407701714-0.0475085043823j))*x[0] + ((-0.33219455534+0.0321548459389j))*x[1]**o + ((-0.788031040338-0.128815113543j))*x[1]
        ref[(1, 1, 2, 1)]=(0.461995407015+0.277699143176j)*x_ref[0]**o + ((-0.532407701714-0.0475085043823j))*x_ref[0] + ((-0.33219455534+0.0321548459389j))*x_ref[1]**o + ((-0.788031040338-0.128815113543j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(-0.980380611524+0.749271231726j)*x[0]**o + ((0.734356589061-0.337821072727j))*x[0] + ((-0.228790397778-0.901700722909j))*x[1]**o + ((0.620280855129+0.884614855944j))*x[1]
        ref[(1, 2, 0, 0)]=(-0.980380611524+0.749271231726j)*x_ref[0]**o + ((0.734356589061-0.337821072727j))*x_ref[0] + ((-0.228790397778-0.901700722909j))*x_ref[1]**o + ((0.620280855129+0.884614855944j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(0.313130543628+0.902158661434j)*x[0]**o + ((-0.712401090169-0.0405706855796j))*x[0] + ((0.955824111694-0.236681541232j))*x[1]**o + ((-0.876464330524-0.367820575232j))*x[1]
        ref[(1, 2, 0, 1)]=(0.313130543628+0.902158661434j)*x_ref[0]**o + ((-0.712401090169-0.0405706855796j))*x_ref[0] + ((0.955824111694-0.236681541232j))*x_ref[1]**o + ((-0.876464330524-0.367820575232j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(-0.421025775495+0.132499070285j)*x[0]**o + ((0.8113616152-0.482278273514j))*x[0] + ((0.975800111894-0.812434379843j))*x[1]**o + ((0.572253022381+0.251026949061j))*x[1]
        ref[(1, 2, 1, 0)]=(-0.421025775495+0.132499070285j)*x_ref[0]**o + ((0.8113616152-0.482278273514j))*x_ref[0] + ((0.975800111894-0.812434379843j))*x_ref[1]**o + ((0.572253022381+0.251026949061j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.799728021825+0.918760902171j)*x[0]**o + ((0.192727000835-0.449138319714j))*x[0] + ((0.918671270089+0.566416829296j))*x[1]**o + ((-0.121257051145+0.336560012279j))*x[1]
        ref[(1, 2, 1, 1)]=(0.799728021825+0.918760902171j)*x_ref[0]**o + ((0.192727000835-0.449138319714j))*x_ref[0] + ((0.918671270089+0.566416829296j))*x_ref[1]**o + ((-0.121257051145+0.336560012279j))*x_ref[1]
        arg[(1, 2, 2, 0)]=(0.808720292222+0.0445235595239j)*x[0]**o + ((-0.802909745745+0.696421790526j))*x[0] + ((0.24487588225+0.869188328578j))*x[1]**o + ((0.917565400168-0.677904966688j))*x[1]
        ref[(1, 2, 2, 0)]=(0.808720292222+0.0445235595239j)*x_ref[0]**o + ((-0.802909745745+0.696421790526j))*x_ref[0] + ((0.24487588225+0.869188328578j))*x_ref[1]**o + ((0.917565400168-0.677904966688j))*x_ref[1]
        arg[(1, 2, 2, 1)]=(0.940132802277+0.917157969152j)*x[0]**o + ((0.976122742579-0.233553181292j))*x[0] + ((-0.28902795253-0.56910467339j))*x[1]**o + ((0.580036303414-0.872308052579j))*x[1]
        ref[(1, 2, 2, 1)]=(0.940132802277+0.917157969152j)*x_ref[0]**o + ((0.976122742579-0.233553181292j))*x_ref[0] + ((-0.28902795253-0.56910467339j))*x_ref[1]**o + ((0.580036303414-0.872308052579j))*x_ref[1]
        arg[(1, 3, 0, 0)]=(0.51226076716-0.790747741085j)*x[0]**o + ((0.80723721522+0.729616877259j))*x[0] + ((-0.925357253268+0.00320745421965j))*x[1]**o + ((-0.156367346689-0.853274617072j))*x[1]
        ref[(1, 3, 0, 0)]=(0.51226076716-0.790747741085j)*x_ref[0]**o + ((0.80723721522+0.729616877259j))*x_ref[0] + ((-0.925357253268+0.00320745421965j))*x_ref[1]**o + ((-0.156367346689-0.853274617072j))*x_ref[1]
        arg[(1, 3, 0, 1)]=(0.313897796578-0.497925033357j)*x[0]**o + ((-0.858771253564-0.905122722411j))*x[0] + ((0.135657953808+0.822129058426j))*x[1]**o + ((-0.814324555766+0.171427835519j))*x[1]
        ref[(1, 3, 0, 1)]=(0.313897796578-0.497925033357j)*x_ref[0]**o + ((-0.858771253564-0.905122722411j))*x_ref[0] + ((0.135657953808+0.822129058426j))*x_ref[1]**o + ((-0.814324555766+0.171427835519j))*x_ref[1]
        arg[(1, 3, 1, 0)]=(-0.238220825431-0.722509166408j)*x[0]**o + ((-0.892056932396+0.157838149731j))*x[0] + ((0.0429509161064+0.773293285837j))*x[1]**o + ((-0.447454136405+0.250238683507j))*x[1]
        ref[(1, 3, 1, 0)]=(-0.238220825431-0.722509166408j)*x_ref[0]**o + ((-0.892056932396+0.157838149731j))*x_ref[0] + ((0.0429509161064+0.773293285837j))*x_ref[1]**o + ((-0.447454136405+0.250238683507j))*x_ref[1]
        arg[(1, 3, 1, 1)]=(0.698657526198+0.211465756195j)*x[0]**o + ((0.0977078011242+0.314629235705j))*x[0] + ((-0.526051168417-0.700360589024j))*x[1]**o + ((-0.296304648348-0.017174968387j))*x[1]
        ref[(1, 3, 1, 1)]=(0.698657526198+0.211465756195j)*x_ref[0]**o + ((0.0977078011242+0.314629235705j))*x_ref[0] + ((-0.526051168417-0.700360589024j))*x_ref[1]**o + ((-0.296304648348-0.017174968387j))*x_ref[1]
        arg[(1, 3, 2, 0)]=(0.482128826252+0.625789961427j)*x[0]**o + ((0.952156129478+0.0154312562614j))*x[0] + ((0.594166977671+0.111049820308j))*x[1]**o + ((0.0998757984913+0.786410152828j))*x[1]
        ref[(1, 3, 2, 0)]=(0.482128826252+0.625789961427j)*x_ref[0]**o + ((0.952156129478+0.0154312562614j))*x_ref[0] + ((0.594166977671+0.111049820308j))*x_ref[1]**o + ((0.0998757984913+0.786410152828j))*x_ref[1]
        arg[(1, 3, 2, 1)]=(-0.418629234631+0.868119200965j)*x[0]**o + ((0.579716437858-0.497582793231j))*x[0] + ((-0.990441137602+0.540940295714j))*x[1]**o + ((0.395418326809+0.649791379165j))*x[1]
        ref[(1, 3, 2, 1)]=(-0.418629234631+0.868119200965j)*x_ref[0]**o + ((0.579716437858-0.497582793231j))*x_ref[0] + ((-0.990441137602+0.540940295714j))*x_ref[1]**o + ((0.395418326809+0.649791379165j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.295900874791-0.959229916381j)*x[2]**o + ((-0.573857271629-0.327134507041j))*x[2]
            ref[(0, 0, 0, 0)]+=(0.295900874791-0.959229916381j)*x_ref[2]**o + ((-0.573857271629-0.327134507041j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.0966159060121+0.594553334372j)*x[2]**o + ((-0.554615530415-0.597747527526j))*x[2]
            ref[(0, 0, 0, 1)]+=(-0.0966159060121+0.594553334372j)*x_ref[2]**o + ((-0.554615530415-0.597747527526j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.304273364299+0.233722701402j)*x[2]**o + ((0.0887000734892-0.620753005125j))*x[2]
            ref[(0, 0, 1, 0)]+=(0.304273364299+0.233722701402j)*x_ref[2]**o + ((0.0887000734892-0.620753005125j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.196963273245-0.376806025653j)*x[2]**o + ((-0.486273188824+0.874474751112j))*x[2]
            ref[(0, 0, 1, 1)]+=(-0.196963273245-0.376806025653j)*x_ref[2]**o + ((-0.486273188824+0.874474751112j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(-0.0382609661075+0.263302561674j)*x[2]**o + ((0.0372777684768+0.43795861901j))*x[2]
            ref[(0, 0, 2, 0)]+=(-0.0382609661075+0.263302561674j)*x_ref[2]**o + ((0.0372777684768+0.43795861901j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(0.474380224017-0.259422710623j)*x[2]**o + ((0.403826290914+0.644020928999j))*x[2]
            ref[(0, 0, 2, 1)]+=(0.474380224017-0.259422710623j)*x_ref[2]**o + ((0.403826290914+0.644020928999j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.0967898447953+0.571408070198j)*x[2]**o + ((-0.465695362849+0.474825127887j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.0967898447953+0.571408070198j)*x_ref[2]**o + ((-0.465695362849+0.474825127887j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.905937691159+0.981809983671j)*x[2]**o + ((-0.636380722845+0.981746088963j))*x[2]
            ref[(0, 1, 0, 1)]+=(-0.905937691159+0.981809983671j)*x_ref[2]**o + ((-0.636380722845+0.981746088963j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.364467260683-0.314173474884j)*x[2]**o + ((0.357729299644-0.952171257841j))*x[2]
            ref[(0, 1, 1, 0)]+=(0.364467260683-0.314173474884j)*x_ref[2]**o + ((0.357729299644-0.952171257841j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.926893371495+0.615282999756j)*x[2]**o + ((0.169047560528-0.254912191571j))*x[2]
            ref[(0, 1, 1, 1)]+=(-0.926893371495+0.615282999756j)*x_ref[2]**o + ((0.169047560528-0.254912191571j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(0.684732142133-0.178684587047j)*x[2]**o + ((-0.935446067755+0.972552044647j))*x[2]
            ref[(0, 1, 2, 0)]+=(0.684732142133-0.178684587047j)*x_ref[2]**o + ((-0.935446067755+0.972552044647j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(-0.0122218839649+0.277400005359j)*x[2]**o + ((0.826073266391+0.888755701192j))*x[2]
            ref[(0, 1, 2, 1)]+=(-0.0122218839649+0.277400005359j)*x_ref[2]**o + ((0.826073266391+0.888755701192j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(0.3301012127+0.194319648508j)*x[2]**o + ((0.122019570874-0.68574234384j))*x[2]
            ref[(0, 2, 0, 0)]+=(0.3301012127+0.194319648508j)*x_ref[2]**o + ((0.122019570874-0.68574234384j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(0.227911946543+0.336080412904j)*x[2]**o + ((-0.659620867307+0.707210450468j))*x[2]
            ref[(0, 2, 0, 1)]+=(0.227911946543+0.336080412904j)*x_ref[2]**o + ((-0.659620867307+0.707210450468j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.490698437317-0.424899098241j)*x[2]**o + ((-0.0865133651985-0.485511213779j))*x[2]
            ref[(0, 2, 1, 0)]+=(-0.490698437317-0.424899098241j)*x_ref[2]**o + ((-0.0865133651985-0.485511213779j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(-0.190962931489-0.416239762281j)*x[2]**o + ((0.791206036877-0.0769719469269j))*x[2]
            ref[(0, 2, 1, 1)]+=(-0.190962931489-0.416239762281j)*x_ref[2]**o + ((0.791206036877-0.0769719469269j))*x_ref[2]
            arg[(0, 2, 2, 0)]+=(0.223734180098+0.255177668838j)*x[2]**o + ((-0.927547873368-0.34413123816j))*x[2]
            ref[(0, 2, 2, 0)]+=(0.223734180098+0.255177668838j)*x_ref[2]**o + ((-0.927547873368-0.34413123816j))*x_ref[2]
            arg[(0, 2, 2, 1)]+=(0.606936873944-0.686410878958j)*x[2]**o + ((0.972229308144-0.0900234396428j))*x[2]
            ref[(0, 2, 2, 1)]+=(0.606936873944-0.686410878958j)*x_ref[2]**o + ((0.972229308144-0.0900234396428j))*x_ref[2]
            arg[(0, 3, 0, 0)]+=(-0.33281732828-0.343267333634j)*x[2]**o + ((-0.290086602617-0.848289113263j))*x[2]
            ref[(0, 3, 0, 0)]+=(-0.33281732828-0.343267333634j)*x_ref[2]**o + ((-0.290086602617-0.848289113263j))*x_ref[2]
            arg[(0, 3, 0, 1)]+=(0.680779683872-0.232494210272j)*x[2]**o + ((0.60014201423-0.700602575085j))*x[2]
            ref[(0, 3, 0, 1)]+=(0.680779683872-0.232494210272j)*x_ref[2]**o + ((0.60014201423-0.700602575085j))*x_ref[2]
            arg[(0, 3, 1, 0)]+=(0.0514185502547-0.242975405552j)*x[2]**o + ((-0.134751854721+0.0832169708302j))*x[2]
            ref[(0, 3, 1, 0)]+=(0.0514185502547-0.242975405552j)*x_ref[2]**o + ((-0.134751854721+0.0832169708302j))*x_ref[2]
            arg[(0, 3, 1, 1)]+=(-0.946346585796+0.502485117186j)*x[2]**o + ((0.413748968658+0.510594342834j))*x[2]
            ref[(0, 3, 1, 1)]+=(-0.946346585796+0.502485117186j)*x_ref[2]**o + ((0.413748968658+0.510594342834j))*x_ref[2]
            arg[(0, 3, 2, 0)]+=(0.459232321222+0.485126230719j)*x[2]**o + ((-0.372677951623+0.661183220585j))*x[2]
            ref[(0, 3, 2, 0)]+=(0.459232321222+0.485126230719j)*x_ref[2]**o + ((-0.372677951623+0.661183220585j))*x_ref[2]
            arg[(0, 3, 2, 1)]+=(0.641973645907-0.41595249263j)*x[2]**o + ((0.950098465854-0.871071657272j))*x[2]
            ref[(0, 3, 2, 1)]+=(0.641973645907-0.41595249263j)*x_ref[2]**o + ((0.950098465854-0.871071657272j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.180726275765-0.0591399292106j)*x[2]**o + ((-0.129405498158-0.0672814854637j))*x[2]
            ref[(1, 0, 0, 0)]+=(0.180726275765-0.0591399292106j)*x_ref[2]**o + ((-0.129405498158-0.0672814854637j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.458840397813-0.242000839235j)*x[2]**o + ((0.25032911639-0.795987421376j))*x[2]
            ref[(1, 0, 0, 1)]+=(0.458840397813-0.242000839235j)*x_ref[2]**o + ((0.25032911639-0.795987421376j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.973571134092-0.848564286045j)*x[2]**o + ((-0.390445896511-0.702405889843j))*x[2]
            ref[(1, 0, 1, 0)]+=(-0.973571134092-0.848564286045j)*x_ref[2]**o + ((-0.390445896511-0.702405889843j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.80082058079-0.717597126501j)*x[2]**o + ((0.724887705209-0.204142069625j))*x[2]
            ref[(1, 0, 1, 1)]+=(0.80082058079-0.717597126501j)*x_ref[2]**o + ((0.724887705209-0.204142069625j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(0.257316326003+0.842139758932j)*x[2]**o + ((0.13760416969-0.917982894728j))*x[2]
            ref[(1, 0, 2, 0)]+=(0.257316326003+0.842139758932j)*x_ref[2]**o + ((0.13760416969-0.917982894728j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(0.470289598242-0.0533484371219j)*x[2]**o + ((0.962941548793+0.200079713712j))*x[2]
            ref[(1, 0, 2, 1)]+=(0.470289598242-0.0533484371219j)*x_ref[2]**o + ((0.962941548793+0.200079713712j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.209373190904+0.986395326054j)*x[2]**o + ((-0.628414571032+0.142273893371j))*x[2]
            ref[(1, 1, 0, 0)]+=(0.209373190904+0.986395326054j)*x_ref[2]**o + ((-0.628414571032+0.142273893371j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.898077214464-0.641004236886j)*x[2]**o + ((-0.665303899974+0.926366465507j))*x[2]
            ref[(1, 1, 0, 1)]+=(0.898077214464-0.641004236886j)*x_ref[2]**o + ((-0.665303899974+0.926366465507j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.0706308041687+0.271659154906j)*x[2]**o + ((-0.126193481457-0.989903983115j))*x[2]
            ref[(1, 1, 1, 0)]+=(0.0706308041687+0.271659154906j)*x_ref[2]**o + ((-0.126193481457-0.989903983115j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.61144118706+0.828947828229j)*x[2]**o + ((0.738508848932+0.191075513175j))*x[2]
            ref[(1, 1, 1, 1)]+=(-0.61144118706+0.828947828229j)*x_ref[2]**o + ((0.738508848932+0.191075513175j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(-0.492776803055+0.962208772054j)*x[2]**o + ((0.434649628267+0.853945824921j))*x[2]
            ref[(1, 1, 2, 0)]+=(-0.492776803055+0.962208772054j)*x_ref[2]**o + ((0.434649628267+0.853945824921j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(-0.787069738322-0.685306276823j)*x[2]**o + ((-0.996709338194-0.130264714065j))*x[2]
            ref[(1, 1, 2, 1)]+=(-0.787069738322-0.685306276823j)*x_ref[2]**o + ((-0.996709338194-0.130264714065j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.509807668624-0.834197702485j)*x[2]**o + ((-0.569748637476-0.0437512104235j))*x[2]
            ref[(1, 2, 0, 0)]+=(0.509807668624-0.834197702485j)*x_ref[2]**o + ((-0.569748637476-0.0437512104235j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(-0.377228839411-0.526161561887j)*x[2]**o + ((-0.330237702039-0.892334775004j))*x[2]
            ref[(1, 2, 0, 1)]+=(-0.377228839411-0.526161561887j)*x_ref[2]**o + ((-0.330237702039-0.892334775004j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(0.913350331637+0.544302721601j)*x[2]**o + ((0.775481748197-0.701260177666j))*x[2]
            ref[(1, 2, 1, 0)]+=(0.913350331637+0.544302721601j)*x_ref[2]**o + ((0.775481748197-0.701260177666j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(0.83069810459+0.714302584835j)*x[2]**o + ((-0.259202767256-0.0726721122136j))*x[2]
            ref[(1, 2, 1, 1)]+=(0.83069810459+0.714302584835j)*x_ref[2]**o + ((-0.259202767256-0.0726721122136j))*x_ref[2]
            arg[(1, 2, 2, 0)]+=(-0.244212977884-0.141750977187j)*x[2]**o + ((0.782977241178+0.0635701952781j))*x[2]
            ref[(1, 2, 2, 0)]+=(-0.244212977884-0.141750977187j)*x_ref[2]**o + ((0.782977241178+0.0635701952781j))*x_ref[2]
            arg[(1, 2, 2, 1)]+=(-0.257834499399+0.433317390101j)*x[2]**o + ((-0.185257104434+0.4233144521j))*x[2]
            ref[(1, 2, 2, 1)]+=(-0.257834499399+0.433317390101j)*x_ref[2]**o + ((-0.185257104434+0.4233144521j))*x_ref[2]
            arg[(1, 3, 0, 0)]+=(0.3069486134+0.477777545943j)*x[2]**o + ((-0.942307816029+0.365749734476j))*x[2]
            ref[(1, 3, 0, 0)]+=(0.3069486134+0.477777545943j)*x_ref[2]**o + ((-0.942307816029+0.365749734476j))*x_ref[2]
            arg[(1, 3, 0, 1)]+=(0.945316068288-0.927764308323j)*x[2]**o + ((0.145578900842-0.337179304998j))*x[2]
            ref[(1, 3, 0, 1)]+=(0.945316068288-0.927764308323j)*x_ref[2]**o + ((0.145578900842-0.337179304998j))*x_ref[2]
            arg[(1, 3, 1, 0)]+=(-0.828471228917+0.39081188576j)*x[2]**o + ((-0.470050855278-0.422757372768j))*x[2]
            ref[(1, 3, 1, 0)]+=(-0.828471228917+0.39081188576j)*x_ref[2]**o + ((-0.470050855278-0.422757372768j))*x_ref[2]
            arg[(1, 3, 1, 1)]+=(0.968652850561-0.0618361964094j)*x[2]**o + ((0.266731947318-0.128630333518j))*x[2]
            ref[(1, 3, 1, 1)]+=(0.968652850561-0.0618361964094j)*x_ref[2]**o + ((0.266731947318-0.128630333518j))*x_ref[2]
            arg[(1, 3, 2, 0)]+=(0.648550388802-0.935500908318j)*x[2]**o + ((-0.59693542179+0.174900148002j))*x[2]
            ref[(1, 3, 2, 0)]+=(0.648550388802-0.935500908318j)*x_ref[2]**o + ((-0.59693542179+0.174900148002j))*x_ref[2]
            arg[(1, 3, 2, 1)]+=(0.592562991152+0.353003481549j)*x[2]**o + ((0.479926774082+0.396981040034j))*x[2]
            ref[(1, 3, 2, 1)]+=(0.592562991152+0.353003481549j)*x_ref[2]**o + ((0.479926774082+0.396981040034j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.938367266793-0.163161657602j)*x[0] + ((-0.85444400323+0.987120153298j))*x[1]
        ref=(-0.938367266793-0.163161657602j)*x_ref[0] + ((-0.85444400323+0.987120153298j))*x_ref[1]
        if dim==3:
            arg+=((-0.0473009232852+0.170467839363j))*x[2]
            ref+=((-0.0473009232852+0.170467839363j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=(0.193959976522+0.526005510097j)*x[0] + ((0.713306847198+0.843191569067j))*x[1]
        ref[(0,)]=(0.193959976522+0.526005510097j)*x_ref[0] + ((0.713306847198+0.843191569067j))*x_ref[1]
        arg[(1,)]=(0.368052301088-0.934526400935j)*x[0] + ((-0.39260035803+0.179314047682j))*x[1]
        ref[(1,)]=(0.368052301088-0.934526400935j)*x_ref[0] + ((-0.39260035803+0.179314047682j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.69431280535-0.618257616857j)*x[2]
            ref[(0,)]+=(0.69431280535-0.618257616857j)*x_ref[2]
            arg[(1,)]+=(-0.453522141622+0.920785583452j)*x[2]
            ref[(1,)]+=(-0.453522141622+0.920785583452j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref = Data(0,(2, 4),w_ref)
        arg[(0, 0)]=(-0.323420034826-0.132558854288j)*x[0] + ((-0.743326760624-0.177094591914j))*x[1]
        ref[(0, 0)]=(-0.323420034826-0.132558854288j)*x_ref[0] + ((-0.743326760624-0.177094591914j))*x_ref[1]
        arg[(0, 1)]=(0.878879112028+0.554161409482j)*x[0] + ((0.982742859939-0.515493263771j))*x[1]
        ref[(0, 1)]=(0.878879112028+0.554161409482j)*x_ref[0] + ((0.982742859939-0.515493263771j))*x_ref[1]
        arg[(0, 2)]=(0.15701000214+0.512423898512j)*x[0] + ((0.517956050191-0.516977925207j))*x[1]
        ref[(0, 2)]=(0.15701000214+0.512423898512j)*x_ref[0] + ((0.517956050191-0.516977925207j))*x_ref[1]
        arg[(0, 3)]=(0.795776713376-0.0530742209486j)*x[0] + ((0.567553621607-0.381400892262j))*x[1]
        ref[(0, 3)]=(0.795776713376-0.0530742209486j)*x_ref[0] + ((0.567553621607-0.381400892262j))*x_ref[1]
        arg[(1, 0)]=(-0.0575327273153+0.134900585466j)*x[0] + ((-0.974072726613-0.69399143355j))*x[1]
        ref[(1, 0)]=(-0.0575327273153+0.134900585466j)*x_ref[0] + ((-0.974072726613-0.69399143355j))*x_ref[1]
        arg[(1, 1)]=(0.86955551632-0.814534032925j)*x[0] + ((-0.625608547019+0.875274409282j))*x[1]
        ref[(1, 1)]=(0.86955551632-0.814534032925j)*x_ref[0] + ((-0.625608547019+0.875274409282j))*x_ref[1]
        arg[(1, 2)]=(-0.942266753666-0.383770884363j)*x[0] + ((0.370186829812+0.404960259655j))*x[1]
        ref[(1, 2)]=(-0.942266753666-0.383770884363j)*x_ref[0] + ((0.370186829812+0.404960259655j))*x_ref[1]
        arg[(1, 3)]=(-0.129534417227-0.854866965677j)*x[0] + ((-0.749986226861-0.35854483082j))*x[1]
        ref[(1, 3)]=(-0.129534417227-0.854866965677j)*x_ref[0] + ((-0.749986226861-0.35854483082j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.839531596606-0.0808683565468j)*x[2]
            ref[(0, 0)]+=(0.839531596606-0.0808683565468j)*x_ref[2]
            arg[(0, 1)]+=(-0.520849076917+0.342641051534j)*x[2]
            ref[(0, 1)]+=(-0.520849076917+0.342641051534j)*x_ref[2]
            arg[(0, 2)]+=(-0.554000663688+0.289864973057j)*x[2]
            ref[(0, 2)]+=(-0.554000663688+0.289864973057j)*x_ref[2]
            arg[(0, 3)]+=(0.753265209427+0.15392440605j)*x[2]
            ref[(0, 3)]+=(0.753265209427+0.15392440605j)*x_ref[2]
            arg[(1, 0)]+=(-0.713036101956+0.440155354204j)*x[2]
            ref[(1, 0)]+=(-0.713036101956+0.440155354204j)*x_ref[2]
            arg[(1, 1)]+=(-0.647165854877-0.134994548178j)*x[2]
            ref[(1, 1)]+=(-0.647165854877-0.134994548178j)*x_ref[2]
            arg[(1, 2)]+=(-0.937040975163-0.302362121261j)*x[2]
            ref[(1, 2)]+=(-0.937040975163-0.302362121261j)*x_ref[2]
            arg[(1, 3)]+=(0.822153367951-0.523173155886j)*x[2]
            ref[(1, 3)]+=(0.822153367951-0.523173155886j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 4),w)
        ref = Data(0,(2, 3, 4),w_ref)
        arg[(0, 0, 0)]=(0.823460709398+0.960261560357j)*x[0] + ((-0.676951396501+0.651982551028j))*x[1]
        ref[(0, 0, 0)]=(0.823460709398+0.960261560357j)*x_ref[0] + ((-0.676951396501+0.651982551028j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.819599333479-0.854626974548j)*x[0] + ((-0.487869506795-0.670334059048j))*x[1]
        ref[(0, 0, 1)]=(-0.819599333479-0.854626974548j)*x_ref[0] + ((-0.487869506795-0.670334059048j))*x_ref[1]
        arg[(0, 0, 2)]=(-0.44976691962-0.521142614013j)*x[0] + ((-0.529308541531+0.953041511197j))*x[1]
        ref[(0, 0, 2)]=(-0.44976691962-0.521142614013j)*x_ref[0] + ((-0.529308541531+0.953041511197j))*x_ref[1]
        arg[(0, 0, 3)]=(-0.305864399979-0.0604771589716j)*x[0] + ((0.14742772426+0.824528440941j))*x[1]
        ref[(0, 0, 3)]=(-0.305864399979-0.0604771589716j)*x_ref[0] + ((0.14742772426+0.824528440941j))*x_ref[1]
        arg[(0, 1, 0)]=(0.411101523783+0.0862970981927j)*x[0] + ((-0.854729805634-0.173214605495j))*x[1]
        ref[(0, 1, 0)]=(0.411101523783+0.0862970981927j)*x_ref[0] + ((-0.854729805634-0.173214605495j))*x_ref[1]
        arg[(0, 1, 1)]=(0.0624921387768-0.629683859553j)*x[0] + ((0.00167674216315-0.647335401309j))*x[1]
        ref[(0, 1, 1)]=(0.0624921387768-0.629683859553j)*x_ref[0] + ((0.00167674216315-0.647335401309j))*x_ref[1]
        arg[(0, 1, 2)]=(0.946353346966+0.491139057893j)*x[0] + ((0.907940319757-0.772744772759j))*x[1]
        ref[(0, 1, 2)]=(0.946353346966+0.491139057893j)*x_ref[0] + ((0.907940319757-0.772744772759j))*x_ref[1]
        arg[(0, 1, 3)]=(-0.488780639512+0.718384053775j)*x[0] + ((-0.976327871111-0.45973330475j))*x[1]
        ref[(0, 1, 3)]=(-0.488780639512+0.718384053775j)*x_ref[0] + ((-0.976327871111-0.45973330475j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.507732341017-0.359718267552j)*x[0] + ((0.353375309622+0.51877221065j))*x[1]
        ref[(0, 2, 0)]=(-0.507732341017-0.359718267552j)*x_ref[0] + ((0.353375309622+0.51877221065j))*x_ref[1]
        arg[(0, 2, 1)]=(0.351039110347-0.168271971154j)*x[0] + ((0.950447516819-0.990528918879j))*x[1]
        ref[(0, 2, 1)]=(0.351039110347-0.168271971154j)*x_ref[0] + ((0.950447516819-0.990528918879j))*x_ref[1]
        arg[(0, 2, 2)]=(0.263388293612-0.816022948869j)*x[0] + ((-0.677696793261+0.89587534288j))*x[1]
        ref[(0, 2, 2)]=(0.263388293612-0.816022948869j)*x_ref[0] + ((-0.677696793261+0.89587534288j))*x_ref[1]
        arg[(0, 2, 3)]=(0.238326548264+0.294711105104j)*x[0] + ((0.0585161983589+0.903835610929j))*x[1]
        ref[(0, 2, 3)]=(0.238326548264+0.294711105104j)*x_ref[0] + ((0.0585161983589+0.903835610929j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.471096813212+0.0612673787703j)*x[0] + ((0.157298995642+0.957119802782j))*x[1]
        ref[(1, 0, 0)]=(-0.471096813212+0.0612673787703j)*x_ref[0] + ((0.157298995642+0.957119802782j))*x_ref[1]
        arg[(1, 0, 1)]=(0.47725820344-0.824844314705j)*x[0] + ((0.0166537279042+0.491925706842j))*x[1]
        ref[(1, 0, 1)]=(0.47725820344-0.824844314705j)*x_ref[0] + ((0.0166537279042+0.491925706842j))*x_ref[1]
        arg[(1, 0, 2)]=(-0.0319505936494+0.980625728133j)*x[0] + ((0.788675549598+0.280882008184j))*x[1]
        ref[(1, 0, 2)]=(-0.0319505936494+0.980625728133j)*x_ref[0] + ((0.788675549598+0.280882008184j))*x_ref[1]
        arg[(1, 0, 3)]=(0.808075980754+0.92117800488j)*x[0] + ((-0.188355708817-0.662146754472j))*x[1]
        ref[(1, 0, 3)]=(0.808075980754+0.92117800488j)*x_ref[0] + ((-0.188355708817-0.662146754472j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.334153838694+0.871141707824j)*x[0] + ((-0.677051448955+0.924057143906j))*x[1]
        ref[(1, 1, 0)]=(-0.334153838694+0.871141707824j)*x_ref[0] + ((-0.677051448955+0.924057143906j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.112186977591+0.259224592514j)*x[0] + ((0.782960266641+0.332989677217j))*x[1]
        ref[(1, 1, 1)]=(-0.112186977591+0.259224592514j)*x_ref[0] + ((0.782960266641+0.332989677217j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.239514573899-0.798441774734j)*x[0] + ((0.00683888593179+0.31962021178j))*x[1]
        ref[(1, 1, 2)]=(-0.239514573899-0.798441774734j)*x_ref[0] + ((0.00683888593179+0.31962021178j))*x_ref[1]
        arg[(1, 1, 3)]=(-0.47106443338+0.941297773453j)*x[0] + ((-0.172748868231+0.819161213182j))*x[1]
        ref[(1, 1, 3)]=(-0.47106443338+0.941297773453j)*x_ref[0] + ((-0.172748868231+0.819161213182j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.410087833762-0.500128601459j)*x[0] + ((0.677241811004+0.0319576242681j))*x[1]
        ref[(1, 2, 0)]=(-0.410087833762-0.500128601459j)*x_ref[0] + ((0.677241811004+0.0319576242681j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.2549182681-0.812600676741j)*x[0] + ((-0.231256103751-0.783001414806j))*x[1]
        ref[(1, 2, 1)]=(-0.2549182681-0.812600676741j)*x_ref[0] + ((-0.231256103751-0.783001414806j))*x_ref[1]
        arg[(1, 2, 2)]=(0.745455575142-0.191460935378j)*x[0] + ((-0.844390852079+0.49699039883j))*x[1]
        ref[(1, 2, 2)]=(0.745455575142-0.191460935378j)*x_ref[0] + ((-0.844390852079+0.49699039883j))*x_ref[1]
        arg[(1, 2, 3)]=(-0.749244944236-0.908401694912j)*x[0] + ((-0.530159297177+0.464443944756j))*x[1]
        ref[(1, 2, 3)]=(-0.749244944236-0.908401694912j)*x_ref[0] + ((-0.530159297177+0.464443944756j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.643989404118+0.974434550083j)*x[2]
            ref[(0, 0, 0)]+=(0.643989404118+0.974434550083j)*x_ref[2]
            arg[(0, 0, 1)]+=(0.947094507785+0.861974441327j)*x[2]
            ref[(0, 0, 1)]+=(0.947094507785+0.861974441327j)*x_ref[2]
            arg[(0, 0, 2)]+=(0.0197877572394-0.134509727393j)*x[2]
            ref[(0, 0, 2)]+=(0.0197877572394-0.134509727393j)*x_ref[2]
            arg[(0, 0, 3)]+=(0.458461376983+0.278726720068j)*x[2]
            ref[(0, 0, 3)]+=(0.458461376983+0.278726720068j)*x_ref[2]
            arg[(0, 1, 0)]+=(-0.997623105548-0.700190275807j)*x[2]
            ref[(0, 1, 0)]+=(-0.997623105548-0.700190275807j)*x_ref[2]
            arg[(0, 1, 1)]+=(-0.110386909395-0.0706619924778j)*x[2]
            ref[(0, 1, 1)]+=(-0.110386909395-0.0706619924778j)*x_ref[2]
            arg[(0, 1, 2)]+=(0.87766751818+0.722667697577j)*x[2]
            ref[(0, 1, 2)]+=(0.87766751818+0.722667697577j)*x_ref[2]
            arg[(0, 1, 3)]+=(0.146984851313+0.788866044641j)*x[2]
            ref[(0, 1, 3)]+=(0.146984851313+0.788866044641j)*x_ref[2]
            arg[(0, 2, 0)]+=(0.0413798879069-0.121918723162j)*x[2]
            ref[(0, 2, 0)]+=(0.0413798879069-0.121918723162j)*x_ref[2]
            arg[(0, 2, 1)]+=(0.00100384775046-0.544382680582j)*x[2]
            ref[(0, 2, 1)]+=(0.00100384775046-0.544382680582j)*x_ref[2]
            arg[(0, 2, 2)]+=(0.482515268626+0.992777650473j)*x[2]
            ref[(0, 2, 2)]+=(0.482515268626+0.992777650473j)*x_ref[2]
            arg[(0, 2, 3)]+=(-0.00575995436205+0.634442463502j)*x[2]
            ref[(0, 2, 3)]+=(-0.00575995436205+0.634442463502j)*x_ref[2]
            arg[(1, 0, 0)]+=(0.610289508976+0.987803879411j)*x[2]
            ref[(1, 0, 0)]+=(0.610289508976+0.987803879411j)*x_ref[2]
            arg[(1, 0, 1)]+=(0.28478622184-0.636621936918j)*x[2]
            ref[(1, 0, 1)]+=(0.28478622184-0.636621936918j)*x_ref[2]
            arg[(1, 0, 2)]+=(0.757309251688+0.856570203552j)*x[2]
            ref[(1, 0, 2)]+=(0.757309251688+0.856570203552j)*x_ref[2]
            arg[(1, 0, 3)]+=(-0.305957113288+0.461292225245j)*x[2]
            ref[(1, 0, 3)]+=(-0.305957113288+0.461292225245j)*x_ref[2]
            arg[(1, 1, 0)]+=(0.703300507222+0.196507425264j)*x[2]
            ref[(1, 1, 0)]+=(0.703300507222+0.196507425264j)*x_ref[2]
            arg[(1, 1, 1)]+=(-0.421371031875-0.710099917374j)*x[2]
            ref[(1, 1, 1)]+=(-0.421371031875-0.710099917374j)*x_ref[2]
            arg[(1, 1, 2)]+=(0.674110218107-0.282219969471j)*x[2]
            ref[(1, 1, 2)]+=(0.674110218107-0.282219969471j)*x_ref[2]
            arg[(1, 1, 3)]+=(0.0543656798959+0.0627442739732j)*x[2]
            ref[(1, 1, 3)]+=(0.0543656798959+0.0627442739732j)*x_ref[2]
            arg[(1, 2, 0)]+=(0.29376870759+0.667906859945j)*x[2]
            ref[(1, 2, 0)]+=(0.29376870759+0.667906859945j)*x_ref[2]
            arg[(1, 2, 1)]+=(0.979892515329-0.284612172487j)*x[2]
            ref[(1, 2, 1)]+=(0.979892515329-0.284612172487j)*x_ref[2]
            arg[(1, 2, 2)]+=(0.894949107601-0.323142955585j)*x[2]
            ref[(1, 2, 2)]+=(0.894949107601-0.323142955585j)*x_ref[2]
            arg[(1, 2, 3)]+=(-0.629713777099-0.308961343366j)*x[2]
            ref[(1, 2, 3)]+=(-0.629713777099-0.308961343366j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 2, 3),w)
        ref = Data(0,(3, 3, 2, 3),w_ref)
        arg[(0, 0, 0, 0)]=(0.938802201892+0.938999692129j)*x[0] + ((-0.557889926338+0.389170693616j))*x[1]
        ref[(0, 0, 0, 0)]=(0.938802201892+0.938999692129j)*x_ref[0] + ((-0.557889926338+0.389170693616j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.281972876446-0.11758784562j)*x[0] + ((0.768806240589-0.448806948247j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.281972876446-0.11758784562j)*x_ref[0] + ((0.768806240589-0.448806948247j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(-0.966874233411-0.281540755605j)*x[0] + ((-0.321460022894-0.761224289387j))*x[1]
        ref[(0, 0, 0, 2)]=(-0.966874233411-0.281540755605j)*x_ref[0] + ((-0.321460022894-0.761224289387j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.741493527449+0.0820955068927j)*x[0] + ((-0.395535434587+0.786877343891j))*x[1]
        ref[(0, 0, 1, 0)]=(0.741493527449+0.0820955068927j)*x_ref[0] + ((-0.395535434587+0.786877343891j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.478292636096-0.274286860321j)*x[0] + ((-0.685455303802-0.351036367453j))*x[1]
        ref[(0, 0, 1, 1)]=(0.478292636096-0.274286860321j)*x_ref[0] + ((-0.685455303802-0.351036367453j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(-0.406271777114-0.021143174674j)*x[0] + ((0.822588924202-0.499447440763j))*x[1]
        ref[(0, 0, 1, 2)]=(-0.406271777114-0.021143174674j)*x_ref[0] + ((0.822588924202-0.499447440763j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.0617550802748+0.403172623935j)*x[0] + ((0.50402391575-0.657808169292j))*x[1]
        ref[(0, 1, 0, 0)]=(0.0617550802748+0.403172623935j)*x_ref[0] + ((0.50402391575-0.657808169292j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.00624385837151+0.777826414747j)*x[0] + ((0.203118228043-0.966489367779j))*x[1]
        ref[(0, 1, 0, 1)]=(0.00624385837151+0.777826414747j)*x_ref[0] + ((0.203118228043-0.966489367779j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(0.0769016579532-0.350456828419j)*x[0] + ((0.550254472149+0.123277048497j))*x[1]
        ref[(0, 1, 0, 2)]=(0.0769016579532-0.350456828419j)*x_ref[0] + ((0.550254472149+0.123277048497j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.379741033259-0.250673038887j)*x[0] + ((0.540508552237+0.595966262926j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.379741033259-0.250673038887j)*x_ref[0] + ((0.540508552237+0.595966262926j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.117156800102-0.102400916648j)*x[0] + ((-0.887531407699-0.921813621771j))*x[1]
        ref[(0, 1, 1, 1)]=(0.117156800102-0.102400916648j)*x_ref[0] + ((-0.887531407699-0.921813621771j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(-0.0332312521042-0.302590105861j)*x[0] + ((-0.257855259664+0.22255598561j))*x[1]
        ref[(0, 1, 1, 2)]=(-0.0332312521042-0.302590105861j)*x_ref[0] + ((-0.257855259664+0.22255598561j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.113213674379+0.624002617094j)*x[0] + ((0.410359747566+0.633484642113j))*x[1]
        ref[(0, 2, 0, 0)]=(0.113213674379+0.624002617094j)*x_ref[0] + ((0.410359747566+0.633484642113j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(0.525184937918-0.673281648688j)*x[0] + ((-0.26562676683-0.0505628202808j))*x[1]
        ref[(0, 2, 0, 1)]=(0.525184937918-0.673281648688j)*x_ref[0] + ((-0.26562676683-0.0505628202808j))*x_ref[1]
        arg[(0, 2, 0, 2)]=(0.998968187693+0.992697524514j)*x[0] + ((0.252168992185+0.0351232750919j))*x[1]
        ref[(0, 2, 0, 2)]=(0.998968187693+0.992697524514j)*x_ref[0] + ((0.252168992185+0.0351232750919j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.737903047791+0.307154125381j)*x[0] + ((0.93699459253-0.178329618001j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.737903047791+0.307154125381j)*x_ref[0] + ((0.93699459253-0.178329618001j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(0.737461833632-0.376037062916j)*x[0] + ((0.694308307964+0.708282315882j))*x[1]
        ref[(0, 2, 1, 1)]=(0.737461833632-0.376037062916j)*x_ref[0] + ((0.694308307964+0.708282315882j))*x_ref[1]
        arg[(0, 2, 1, 2)]=(-0.11883290544-0.432985234447j)*x[0] + ((-0.747824473969+0.73175970319j))*x[1]
        ref[(0, 2, 1, 2)]=(-0.11883290544-0.432985234447j)*x_ref[0] + ((-0.747824473969+0.73175970319j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.530800074807-0.637697102165j)*x[0] + ((0.502544251643-0.0762486654075j))*x[1]
        ref[(1, 0, 0, 0)]=(0.530800074807-0.637697102165j)*x_ref[0] + ((0.502544251643-0.0762486654075j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(-0.804441994976-0.101283949697j)*x[0] + ((0.763401020517-0.778357120684j))*x[1]
        ref[(1, 0, 0, 1)]=(-0.804441994976-0.101283949697j)*x_ref[0] + ((0.763401020517-0.778357120684j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(0.552518937293+0.658847095333j)*x[0] + ((-0.765606113492+0.99975531489j))*x[1]
        ref[(1, 0, 0, 2)]=(0.552518937293+0.658847095333j)*x_ref[0] + ((-0.765606113492+0.99975531489j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(0.555282110518-0.804071920107j)*x[0] + ((-0.123337090327-0.227535853856j))*x[1]
        ref[(1, 0, 1, 0)]=(0.555282110518-0.804071920107j)*x_ref[0] + ((-0.123337090327-0.227535853856j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.890249761694+0.348178582373j)*x[0] + ((0.985118933258-0.34633451554j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.890249761694+0.348178582373j)*x_ref[0] + ((0.985118933258-0.34633451554j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(0.734642347363+0.793422901156j)*x[0] + ((-0.0595310394488-0.620843335733j))*x[1]
        ref[(1, 0, 1, 2)]=(0.734642347363+0.793422901156j)*x_ref[0] + ((-0.0595310394488-0.620843335733j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.61371885807-0.0269313932089j)*x[0] + ((0.507929744033+0.303165039899j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.61371885807-0.0269313932089j)*x_ref[0] + ((0.507929744033+0.303165039899j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.811168688478-0.228880065411j)*x[0] + ((-0.541270322145-0.982593164699j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.811168688478-0.228880065411j)*x_ref[0] + ((-0.541270322145-0.982593164699j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(0.732838361974-0.829878539758j)*x[0] + ((-0.494189812193+0.178625830303j))*x[1]
        ref[(1, 1, 0, 2)]=(0.732838361974-0.829878539758j)*x_ref[0] + ((-0.494189812193+0.178625830303j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.230149003348-0.946166577936j)*x[0] + ((-0.189981810122-0.180156013745j))*x[1]
        ref[(1, 1, 1, 0)]=(0.230149003348-0.946166577936j)*x_ref[0] + ((-0.189981810122-0.180156013745j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.0473910028384-0.904067157841j)*x[0] + ((0.792130954911-0.753954746461j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.0473910028384-0.904067157841j)*x_ref[0] + ((0.792130954911-0.753954746461j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(0.385612543355-0.292064942282j)*x[0] + ((0.194889906219+0.669682315488j))*x[1]
        ref[(1, 1, 1, 2)]=(0.385612543355-0.292064942282j)*x_ref[0] + ((0.194889906219+0.669682315488j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(-0.127604203384+0.674502209536j)*x[0] + ((0.330509999124-0.686032984119j))*x[1]
        ref[(1, 2, 0, 0)]=(-0.127604203384+0.674502209536j)*x_ref[0] + ((0.330509999124-0.686032984119j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.92522352284-0.641899149789j)*x[0] + ((-0.740358974994+0.840318707443j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.92522352284-0.641899149789j)*x_ref[0] + ((-0.740358974994+0.840318707443j))*x_ref[1]
        arg[(1, 2, 0, 2)]=(-0.755209273752+0.366577256422j)*x[0] + ((0.805350011176+0.792270065329j))*x[1]
        ref[(1, 2, 0, 2)]=(-0.755209273752+0.366577256422j)*x_ref[0] + ((0.805350011176+0.792270065329j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(0.254132871179+0.322130857281j)*x[0] + ((0.681464326066+0.430682484374j))*x[1]
        ref[(1, 2, 1, 0)]=(0.254132871179+0.322130857281j)*x_ref[0] + ((0.681464326066+0.430682484374j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(-0.786250588741-0.745761559712j)*x[0] + ((0.155577585208-0.0997656128692j))*x[1]
        ref[(1, 2, 1, 1)]=(-0.786250588741-0.745761559712j)*x_ref[0] + ((0.155577585208-0.0997656128692j))*x_ref[1]
        arg[(1, 2, 1, 2)]=(-0.570434040018-0.0337713995267j)*x[0] + ((-0.0573673489872+0.503304482246j))*x[1]
        ref[(1, 2, 1, 2)]=(-0.570434040018-0.0337713995267j)*x_ref[0] + ((-0.0573673489872+0.503304482246j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.803298444766-0.88849636999j)*x[0] + ((0.727838025415+0.940237582669j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.803298444766-0.88849636999j)*x_ref[0] + ((0.727838025415+0.940237582669j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(0.175919409354+0.319190525619j)*x[0] + ((-0.10812603105+0.538298305878j))*x[1]
        ref[(2, 0, 0, 1)]=(0.175919409354+0.319190525619j)*x_ref[0] + ((-0.10812603105+0.538298305878j))*x_ref[1]
        arg[(2, 0, 0, 2)]=(0.0800047388351+0.296708408145j)*x[0] + ((0.88957817415-0.780254275145j))*x[1]
        ref[(2, 0, 0, 2)]=(0.0800047388351+0.296708408145j)*x_ref[0] + ((0.88957817415-0.780254275145j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(0.746542000926+0.544266063189j)*x[0] + ((0.158953352075+0.109974003714j))*x[1]
        ref[(2, 0, 1, 0)]=(0.746542000926+0.544266063189j)*x_ref[0] + ((0.158953352075+0.109974003714j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.389835756032-0.646545695242j)*x[0] + ((0.427123352365-0.878805996212j))*x[1]
        ref[(2, 0, 1, 1)]=(0.389835756032-0.646545695242j)*x_ref[0] + ((0.427123352365-0.878805996212j))*x_ref[1]
        arg[(2, 0, 1, 2)]=(0.773362751447-0.624667299039j)*x[0] + ((0.887410559805+0.484262812857j))*x[1]
        ref[(2, 0, 1, 2)]=(0.773362751447-0.624667299039j)*x_ref[0] + ((0.887410559805+0.484262812857j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(-0.0912557886987-0.151499678336j)*x[0] + ((0.712686350844-0.650933334825j))*x[1]
        ref[(2, 1, 0, 0)]=(-0.0912557886987-0.151499678336j)*x_ref[0] + ((0.712686350844-0.650933334825j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.464765415872-0.635106962067j)*x[0] + ((0.276476188477-0.47545100992j))*x[1]
        ref[(2, 1, 0, 1)]=(0.464765415872-0.635106962067j)*x_ref[0] + ((0.276476188477-0.47545100992j))*x_ref[1]
        arg[(2, 1, 0, 2)]=(0.382960307007+0.0219337787588j)*x[0] + ((0.413771256379+0.566224535321j))*x[1]
        ref[(2, 1, 0, 2)]=(0.382960307007+0.0219337787588j)*x_ref[0] + ((0.413771256379+0.566224535321j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(0.317183979841+0.602841993348j)*x[0] + ((-0.237134080489-0.0400995554135j))*x[1]
        ref[(2, 1, 1, 0)]=(0.317183979841+0.602841993348j)*x_ref[0] + ((-0.237134080489-0.0400995554135j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(-0.373811142438+0.256595294348j)*x[0] + ((0.895062866569+0.744592973864j))*x[1]
        ref[(2, 1, 1, 1)]=(-0.373811142438+0.256595294348j)*x_ref[0] + ((0.895062866569+0.744592973864j))*x_ref[1]
        arg[(2, 1, 1, 2)]=(0.94710893129-0.700406261268j)*x[0] + ((-0.744152623937+0.55055945363j))*x[1]
        ref[(2, 1, 1, 2)]=(0.94710893129-0.700406261268j)*x_ref[0] + ((-0.744152623937+0.55055945363j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(0.854289343133+0.159842731203j)*x[0] + ((-0.390449859278+0.330866528328j))*x[1]
        ref[(2, 2, 0, 0)]=(0.854289343133+0.159842731203j)*x_ref[0] + ((-0.390449859278+0.330866528328j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(0.022900218791-0.281959562464j)*x[0] + ((-0.444837483431-0.159227561546j))*x[1]
        ref[(2, 2, 0, 1)]=(0.022900218791-0.281959562464j)*x_ref[0] + ((-0.444837483431-0.159227561546j))*x_ref[1]
        arg[(2, 2, 0, 2)]=(0.00784879816285-0.424176842222j)*x[0] + ((0.359551887945+0.585121226766j))*x[1]
        ref[(2, 2, 0, 2)]=(0.00784879816285-0.424176842222j)*x_ref[0] + ((0.359551887945+0.585121226766j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(0.20884372436-0.321003065978j)*x[0] + ((0.313416674751+0.068913996806j))*x[1]
        ref[(2, 2, 1, 0)]=(0.20884372436-0.321003065978j)*x_ref[0] + ((0.313416674751+0.068913996806j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(-0.958199732516-0.498464904511j)*x[0] + ((-0.86584909975-0.693856035573j))*x[1]
        ref[(2, 2, 1, 1)]=(-0.958199732516-0.498464904511j)*x_ref[0] + ((-0.86584909975-0.693856035573j))*x_ref[1]
        arg[(2, 2, 1, 2)]=(-0.949482982178-0.557598924849j)*x[0] + ((-0.163872752801-0.384784633387j))*x[1]
        ref[(2, 2, 1, 2)]=(-0.949482982178-0.557598924849j)*x_ref[0] + ((-0.163872752801-0.384784633387j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.240865200485-0.31621832635j)*x[2]
            ref[(0, 0, 0, 0)]+=(0.240865200485-0.31621832635j)*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.270625912149-0.955228278649j)*x[2]
            ref[(0, 0, 0, 1)]+=(0.270625912149-0.955228278649j)*x_ref[2]
            arg[(0, 0, 0, 2)]+=(-0.196584453315-0.749378058142j)*x[2]
            ref[(0, 0, 0, 2)]+=(-0.196584453315-0.749378058142j)*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.155300762316+0.415850842459j)*x[2]
            ref[(0, 0, 1, 0)]+=(-0.155300762316+0.415850842459j)*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.705161834672+0.189335283528j)*x[2]
            ref[(0, 0, 1, 1)]+=(-0.705161834672+0.189335283528j)*x_ref[2]
            arg[(0, 0, 1, 2)]+=(-0.775954619524+0.86662693482j)*x[2]
            ref[(0, 0, 1, 2)]+=(-0.775954619524+0.86662693482j)*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.637988260605+0.827601531103j)*x[2]
            ref[(0, 1, 0, 0)]+=(0.637988260605+0.827601531103j)*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.882722350366-0.839285934975j)*x[2]
            ref[(0, 1, 0, 1)]+=(0.882722350366-0.839285934975j)*x_ref[2]
            arg[(0, 1, 0, 2)]+=(-0.220087243466-0.0558462051857j)*x[2]
            ref[(0, 1, 0, 2)]+=(-0.220087243466-0.0558462051857j)*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.822734408297-0.349461342954j)*x[2]
            ref[(0, 1, 1, 0)]+=(0.822734408297-0.349461342954j)*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.375843102589-0.636269683587j)*x[2]
            ref[(0, 1, 1, 1)]+=(0.375843102589-0.636269683587j)*x_ref[2]
            arg[(0, 1, 1, 2)]+=(-0.440397445541-0.167934246637j)*x[2]
            ref[(0, 1, 1, 2)]+=(-0.440397445541-0.167934246637j)*x_ref[2]
            arg[(0, 2, 0, 0)]+=(-0.254579069463-0.736844371561j)*x[2]
            ref[(0, 2, 0, 0)]+=(-0.254579069463-0.736844371561j)*x_ref[2]
            arg[(0, 2, 0, 1)]+=(0.694453488069+0.127064044466j)*x[2]
            ref[(0, 2, 0, 1)]+=(0.694453488069+0.127064044466j)*x_ref[2]
            arg[(0, 2, 0, 2)]+=(-0.570741617393-0.353046957118j)*x[2]
            ref[(0, 2, 0, 2)]+=(-0.570741617393-0.353046957118j)*x_ref[2]
            arg[(0, 2, 1, 0)]+=(0.395036045249+0.996217171958j)*x[2]
            ref[(0, 2, 1, 0)]+=(0.395036045249+0.996217171958j)*x_ref[2]
            arg[(0, 2, 1, 1)]+=(0.331936345637+0.0511220518414j)*x[2]
            ref[(0, 2, 1, 1)]+=(0.331936345637+0.0511220518414j)*x_ref[2]
            arg[(0, 2, 1, 2)]+=(0.46040973568-0.493465636662j)*x[2]
            ref[(0, 2, 1, 2)]+=(0.46040973568-0.493465636662j)*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.428187608774+0.975768758242j)*x[2]
            ref[(1, 0, 0, 0)]+=(-0.428187608774+0.975768758242j)*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.468325913232+0.675684095897j)*x[2]
            ref[(1, 0, 0, 1)]+=(0.468325913232+0.675684095897j)*x_ref[2]
            arg[(1, 0, 0, 2)]+=(0.945588345213+0.0150990263417j)*x[2]
            ref[(1, 0, 0, 2)]+=(0.945588345213+0.0150990263417j)*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.75296976157-0.30884412034j)*x[2]
            ref[(1, 0, 1, 0)]+=(0.75296976157-0.30884412034j)*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.339820166377+0.582300353184j)*x[2]
            ref[(1, 0, 1, 1)]+=(0.339820166377+0.582300353184j)*x_ref[2]
            arg[(1, 0, 1, 2)]+=(-0.621133339595-0.583538820051j)*x[2]
            ref[(1, 0, 1, 2)]+=(-0.621133339595-0.583538820051j)*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.935045531702-0.249730894713j)*x[2]
            ref[(1, 1, 0, 0)]+=(-0.935045531702-0.249730894713j)*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.0384638243273-0.894579816153j)*x[2]
            ref[(1, 1, 0, 1)]+=(-0.0384638243273-0.894579816153j)*x_ref[2]
            arg[(1, 1, 0, 2)]+=(0.553760062885+0.762039469996j)*x[2]
            ref[(1, 1, 0, 2)]+=(0.553760062885+0.762039469996j)*x_ref[2]
            arg[(1, 1, 1, 0)]+=(-0.0884245039599+0.425395416003j)*x[2]
            ref[(1, 1, 1, 0)]+=(-0.0884245039599+0.425395416003j)*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.949869153929-0.207085842342j)*x[2]
            ref[(1, 1, 1, 1)]+=(0.949869153929-0.207085842342j)*x_ref[2]
            arg[(1, 1, 1, 2)]+=(-0.578623005448+0.543024373427j)*x[2]
            ref[(1, 1, 1, 2)]+=(-0.578623005448+0.543024373427j)*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.396519276666-0.228584246043j)*x[2]
            ref[(1, 2, 0, 0)]+=(0.396519276666-0.228584246043j)*x_ref[2]
            arg[(1, 2, 0, 1)]+=(-0.302418451124-0.152847694151j)*x[2]
            ref[(1, 2, 0, 1)]+=(-0.302418451124-0.152847694151j)*x_ref[2]
            arg[(1, 2, 0, 2)]+=(0.260171873265+0.780401825889j)*x[2]
            ref[(1, 2, 0, 2)]+=(0.260171873265+0.780401825889j)*x_ref[2]
            arg[(1, 2, 1, 0)]+=(-0.820318966791+0.744884073821j)*x[2]
            ref[(1, 2, 1, 0)]+=(-0.820318966791+0.744884073821j)*x_ref[2]
            arg[(1, 2, 1, 1)]+=(-0.760042132943+0.796860994222j)*x[2]
            ref[(1, 2, 1, 1)]+=(-0.760042132943+0.796860994222j)*x_ref[2]
            arg[(1, 2, 1, 2)]+=(0.0676968348383+0.935268374722j)*x[2]
            ref[(1, 2, 1, 2)]+=(0.0676968348383+0.935268374722j)*x_ref[2]
            arg[(2, 0, 0, 0)]+=(0.219444892519-0.770398320037j)*x[2]
            ref[(2, 0, 0, 0)]+=(0.219444892519-0.770398320037j)*x_ref[2]
            arg[(2, 0, 0, 1)]+=(-0.28454987003+0.29878388516j)*x[2]
            ref[(2, 0, 0, 1)]+=(-0.28454987003+0.29878388516j)*x_ref[2]
            arg[(2, 0, 0, 2)]+=(-0.455162564654-0.854398793779j)*x[2]
            ref[(2, 0, 0, 2)]+=(-0.455162564654-0.854398793779j)*x_ref[2]
            arg[(2, 0, 1, 0)]+=(-0.822732944265+0.113021784314j)*x[2]
            ref[(2, 0, 1, 0)]+=(-0.822732944265+0.113021784314j)*x_ref[2]
            arg[(2, 0, 1, 1)]+=(-0.399215350818-0.858311974701j)*x[2]
            ref[(2, 0, 1, 1)]+=(-0.399215350818-0.858311974701j)*x_ref[2]
            arg[(2, 0, 1, 2)]+=(-0.0223294163571-0.65668103641j)*x[2]
            ref[(2, 0, 1, 2)]+=(-0.0223294163571-0.65668103641j)*x_ref[2]
            arg[(2, 1, 0, 0)]+=(0.201338688944-0.579444176099j)*x[2]
            ref[(2, 1, 0, 0)]+=(0.201338688944-0.579444176099j)*x_ref[2]
            arg[(2, 1, 0, 1)]+=(0.03168678009+0.158416924575j)*x[2]
            ref[(2, 1, 0, 1)]+=(0.03168678009+0.158416924575j)*x_ref[2]
            arg[(2, 1, 0, 2)]+=(-0.451971897621-0.494494203697j)*x[2]
            ref[(2, 1, 0, 2)]+=(-0.451971897621-0.494494203697j)*x_ref[2]
            arg[(2, 1, 1, 0)]+=(0.0076389224478-0.983562492947j)*x[2]
            ref[(2, 1, 1, 0)]+=(0.0076389224478-0.983562492947j)*x_ref[2]
            arg[(2, 1, 1, 1)]+=(0.164886396704+0.0745255423601j)*x[2]
            ref[(2, 1, 1, 1)]+=(0.164886396704+0.0745255423601j)*x_ref[2]
            arg[(2, 1, 1, 2)]+=(-0.849286877876-0.158747245864j)*x[2]
            ref[(2, 1, 1, 2)]+=(-0.849286877876-0.158747245864j)*x_ref[2]
            arg[(2, 2, 0, 0)]+=(0.540691019571+0.309407615969j)*x[2]
            ref[(2, 2, 0, 0)]+=(0.540691019571+0.309407615969j)*x_ref[2]
            arg[(2, 2, 0, 1)]+=(0.605329224336+0.850755077558j)*x[2]
            ref[(2, 2, 0, 1)]+=(0.605329224336+0.850755077558j)*x_ref[2]
            arg[(2, 2, 0, 2)]+=(-0.420751737747+0.299795562386j)*x[2]
            ref[(2, 2, 0, 2)]+=(-0.420751737747+0.299795562386j)*x_ref[2]
            arg[(2, 2, 1, 0)]+=(0.369988684786-0.329821613925j)*x[2]
            ref[(2, 2, 1, 0)]+=(0.369988684786-0.329821613925j)*x_ref[2]
            arg[(2, 2, 1, 1)]+=(0.753892509128+0.124505342406j)*x[2]
            ref[(2, 2, 1, 1)]+=(0.753892509128+0.124505342406j)*x_ref[2]
            arg[(2, 2, 1, 2)]+=(-0.768712732186-0.869658010274j)*x[2]
            ref[(2, 2, 1, 2)]+=(-0.768712732186-0.869658010274j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.181933321349-0.313900040383j)*x[0] + ((-0.282368794837-0.36307264153j))*x[1]
        ref=(0.181933321349-0.313900040383j)*x_ref[0] + ((-0.282368794837-0.36307264153j))*x_ref[1]
        if dim==3:
            arg+=((-0.751054810927+0.294806850703j))*x[2]
            ref+=((-0.751054810927+0.294806850703j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=(-0.592956602208+0.148844066819j)*x[0] + ((-0.864982095323-0.847498741164j))*x[1]
        ref[(0,)]=(-0.592956602208+0.148844066819j)*x_ref[0] + ((-0.864982095323-0.847498741164j))*x_ref[1]
        arg[(1,)]=(-0.155595212841+0.567152151178j)*x[0] + ((0.166382393535+0.0632530882704j))*x[1]
        ref[(1,)]=(-0.155595212841+0.567152151178j)*x_ref[0] + ((0.166382393535+0.0632530882704j))*x_ref[1]
        arg[(2,)]=(-0.485734169352-0.968216079618j)*x[0] + ((-0.396275553433-0.917995476339j))*x[1]
        ref[(2,)]=(-0.485734169352-0.968216079618j)*x_ref[0] + ((-0.396275553433-0.917995476339j))*x_ref[1]
        arg[(3,)]=(0.734415775793-0.404986744452j)*x[0] + ((0.84157204403-0.709619411534j))*x[1]
        ref[(3,)]=(0.734415775793-0.404986744452j)*x_ref[0] + ((0.84157204403-0.709619411534j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.675899669208+0.486213931533j)*x[2]
            ref[(0,)]+=(-0.675899669208+0.486213931533j)*x_ref[2]
            arg[(1,)]+=(-0.738401528074+0.268294105872j)*x[2]
            ref[(1,)]+=(-0.738401528074+0.268294105872j)*x_ref[2]
            arg[(2,)]+=(0.46050353574-0.0652688836023j)*x[2]
            ref[(2,)]+=(0.46050353574-0.0652688836023j)*x_ref[2]
            arg[(3,)]+=(-0.359871626363+0.521299174875j)*x[2]
            ref[(3,)]+=(-0.359871626363+0.521299174875j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref = Data(0,(4, 4),w_ref)
        arg[(0, 0)]=(0.216851089449-0.572058516358j)*x[0] + ((-0.111556919599+0.720307434118j))*x[1]
        ref[(0, 0)]=(0.216851089449-0.572058516358j)*x_ref[0] + ((-0.111556919599+0.720307434118j))*x_ref[1]
        arg[(0, 1)]=(0.884683790858-0.0482090799911j)*x[0] + ((-0.917713967411-0.179980195624j))*x[1]
        ref[(0, 1)]=(0.884683790858-0.0482090799911j)*x_ref[0] + ((-0.917713967411-0.179980195624j))*x_ref[1]
        arg[(0, 2)]=(0.127934128856-0.323473734865j)*x[0] + ((-0.423478723611+0.084417683654j))*x[1]
        ref[(0, 2)]=(0.127934128856-0.323473734865j)*x_ref[0] + ((-0.423478723611+0.084417683654j))*x_ref[1]
        arg[(0, 3)]=(-0.632791332096+0.212814108618j)*x[0] + ((-0.328959281242+0.0353509260077j))*x[1]
        ref[(0, 3)]=(-0.632791332096+0.212814108618j)*x_ref[0] + ((-0.328959281242+0.0353509260077j))*x_ref[1]
        arg[(1, 0)]=(-0.227336991655+0.912908802813j)*x[0] + ((-0.194923450609+0.511462317941j))*x[1]
        ref[(1, 0)]=(-0.227336991655+0.912908802813j)*x_ref[0] + ((-0.194923450609+0.511462317941j))*x_ref[1]
        arg[(1, 1)]=(-0.0721091243334+0.356097526137j)*x[0] + ((-0.0471340197279+0.799362499006j))*x[1]
        ref[(1, 1)]=(-0.0721091243334+0.356097526137j)*x_ref[0] + ((-0.0471340197279+0.799362499006j))*x_ref[1]
        arg[(1, 2)]=(0.371525496112-0.262982377943j)*x[0] + ((-0.727016694395-0.939470870481j))*x[1]
        ref[(1, 2)]=(0.371525496112-0.262982377943j)*x_ref[0] + ((-0.727016694395-0.939470870481j))*x_ref[1]
        arg[(1, 3)]=(-0.210050004469-0.634917564076j)*x[0] + ((-0.132481698828+0.737837016081j))*x[1]
        ref[(1, 3)]=(-0.210050004469-0.634917564076j)*x_ref[0] + ((-0.132481698828+0.737837016081j))*x_ref[1]
        arg[(2, 0)]=(0.677657130838-0.194203661289j)*x[0] + ((0.753817353636+0.488221254837j))*x[1]
        ref[(2, 0)]=(0.677657130838-0.194203661289j)*x_ref[0] + ((0.753817353636+0.488221254837j))*x_ref[1]
        arg[(2, 1)]=(0.755841079621-0.197961867486j)*x[0] + ((0.797407764057-0.981253918234j))*x[1]
        ref[(2, 1)]=(0.755841079621-0.197961867486j)*x_ref[0] + ((0.797407764057-0.981253918234j))*x_ref[1]
        arg[(2, 2)]=(0.767340937847-0.944839021498j)*x[0] + ((0.148075615914-0.454462521654j))*x[1]
        ref[(2, 2)]=(0.767340937847-0.944839021498j)*x_ref[0] + ((0.148075615914-0.454462521654j))*x_ref[1]
        arg[(2, 3)]=(-0.145437459631-0.476630869717j)*x[0] + ((-0.0758047906262-0.365908614183j))*x[1]
        ref[(2, 3)]=(-0.145437459631-0.476630869717j)*x_ref[0] + ((-0.0758047906262-0.365908614183j))*x_ref[1]
        arg[(3, 0)]=(-0.695926767002+0.875027221109j)*x[0] + ((0.467884872242+0.0362356069491j))*x[1]
        ref[(3, 0)]=(-0.695926767002+0.875027221109j)*x_ref[0] + ((0.467884872242+0.0362356069491j))*x_ref[1]
        arg[(3, 1)]=(-0.193896919796+0.854322309598j)*x[0] + ((0.715363011245-0.98724108645j))*x[1]
        ref[(3, 1)]=(-0.193896919796+0.854322309598j)*x_ref[0] + ((0.715363011245-0.98724108645j))*x_ref[1]
        arg[(3, 2)]=(-0.167697771068+0.980954346332j)*x[0] + ((0.16452169998+0.0313711464242j))*x[1]
        ref[(3, 2)]=(-0.167697771068+0.980954346332j)*x_ref[0] + ((0.16452169998+0.0313711464242j))*x_ref[1]
        arg[(3, 3)]=(0.535614380226-0.128788165448j)*x[0] + ((0.934462056253-0.0170108109928j))*x[1]
        ref[(3, 3)]=(0.535614380226-0.128788165448j)*x_ref[0] + ((0.934462056253-0.0170108109928j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(-0.983096505106-0.390689480094j)*x[2]
            ref[(0, 0)]+=(-0.983096505106-0.390689480094j)*x_ref[2]
            arg[(0, 1)]+=(0.624338506419-0.892732583552j)*x[2]
            ref[(0, 1)]+=(0.624338506419-0.892732583552j)*x_ref[2]
            arg[(0, 2)]+=(-0.73274972569+0.894301892628j)*x[2]
            ref[(0, 2)]+=(-0.73274972569+0.894301892628j)*x_ref[2]
            arg[(0, 3)]+=(0.421819587059+0.772697778433j)*x[2]
            ref[(0, 3)]+=(0.421819587059+0.772697778433j)*x_ref[2]
            arg[(1, 0)]+=(0.674304971886-0.815133886348j)*x[2]
            ref[(1, 0)]+=(0.674304971886-0.815133886348j)*x_ref[2]
            arg[(1, 1)]+=(-0.0509063431973-0.586317605216j)*x[2]
            ref[(1, 1)]+=(-0.0509063431973-0.586317605216j)*x_ref[2]
            arg[(1, 2)]+=(0.0899442670311+0.344957795583j)*x[2]
            ref[(1, 2)]+=(0.0899442670311+0.344957795583j)*x_ref[2]
            arg[(1, 3)]+=(-0.224493459296+0.609165681924j)*x[2]
            ref[(1, 3)]+=(-0.224493459296+0.609165681924j)*x_ref[2]
            arg[(2, 0)]+=(0.612390108936+0.820641214314j)*x[2]
            ref[(2, 0)]+=(0.612390108936+0.820641214314j)*x_ref[2]
            arg[(2, 1)]+=(0.38545205409-0.0965645379506j)*x[2]
            ref[(2, 1)]+=(0.38545205409-0.0965645379506j)*x_ref[2]
            arg[(2, 2)]+=(0.802457131314-0.584244769012j)*x[2]
            ref[(2, 2)]+=(0.802457131314-0.584244769012j)*x_ref[2]
            arg[(2, 3)]+=(0.10327620411-0.639650957727j)*x[2]
            ref[(2, 3)]+=(0.10327620411-0.639650957727j)*x_ref[2]
            arg[(3, 0)]+=(0.751337549988+0.855253322679j)*x[2]
            ref[(3, 0)]+=(0.751337549988+0.855253322679j)*x_ref[2]
            arg[(3, 1)]+=(0.408092890594-0.596335088886j)*x[2]
            ref[(3, 1)]+=(0.408092890594-0.596335088886j)*x_ref[2]
            arg[(3, 2)]+=(-0.930429140627-0.435791036824j)*x[2]
            ref[(3, 2)]+=(-0.930429140627-0.435791036824j)*x_ref[2]
            arg[(3, 3)]+=(0.176479279225+0.304738110568j)*x[2]
            ref[(3, 3)]+=(0.176479279225+0.304738110568j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 3),w)
        ref = Data(0,(4, 2, 3),w_ref)
        arg[(0, 0, 0)]=(0.744977449645+0.89486323919j)*x[0] + ((-0.913502461795-0.202044807487j))*x[1]
        ref[(0, 0, 0)]=(0.744977449645+0.89486323919j)*x_ref[0] + ((-0.913502461795-0.202044807487j))*x_ref[1]
        arg[(0, 0, 1)]=(0.721772805248+0.394797423792j)*x[0] + ((-0.181926802198-0.10992656357j))*x[1]
        ref[(0, 0, 1)]=(0.721772805248+0.394797423792j)*x_ref[0] + ((-0.181926802198-0.10992656357j))*x_ref[1]
        arg[(0, 0, 2)]=(-0.271094547494+0.920668945889j)*x[0] + ((0.886777044014-0.512313996232j))*x[1]
        ref[(0, 0, 2)]=(-0.271094547494+0.920668945889j)*x_ref[0] + ((0.886777044014-0.512313996232j))*x_ref[1]
        arg[(0, 1, 0)]=(0.491334517582+0.685161020843j)*x[0] + ((0.564219204708+0.0773883460257j))*x[1]
        ref[(0, 1, 0)]=(0.491334517582+0.685161020843j)*x_ref[0] + ((0.564219204708+0.0773883460257j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.718807112636-0.0985879214294j)*x[0] + ((-0.108327165747-0.439690250364j))*x[1]
        ref[(0, 1, 1)]=(-0.718807112636-0.0985879214294j)*x_ref[0] + ((-0.108327165747-0.439690250364j))*x_ref[1]
        arg[(0, 1, 2)]=(0.6378596041+0.85092466934j)*x[0] + ((-0.551115504431+0.0107327087829j))*x[1]
        ref[(0, 1, 2)]=(0.6378596041+0.85092466934j)*x_ref[0] + ((-0.551115504431+0.0107327087829j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.0913285372718+0.981068219397j)*x[0] + ((-0.766882046618-0.918404865194j))*x[1]
        ref[(1, 0, 0)]=(-0.0913285372718+0.981068219397j)*x_ref[0] + ((-0.766882046618-0.918404865194j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.936646567707-0.056691242771j)*x[0] + ((-0.990572993276+0.51357692354j))*x[1]
        ref[(1, 0, 1)]=(-0.936646567707-0.056691242771j)*x_ref[0] + ((-0.990572993276+0.51357692354j))*x_ref[1]
        arg[(1, 0, 2)]=(0.0147587873968+0.895829238755j)*x[0] + ((0.594031397885+0.966564672783j))*x[1]
        ref[(1, 0, 2)]=(0.0147587873968+0.895829238755j)*x_ref[0] + ((0.594031397885+0.966564672783j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.867646377863-0.974739346658j)*x[0] + ((-0.80172552328+0.788455378877j))*x[1]
        ref[(1, 1, 0)]=(-0.867646377863-0.974739346658j)*x_ref[0] + ((-0.80172552328+0.788455378877j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.0548440540143+0.0706193891696j)*x[0] + ((0.905172926257-0.387519567923j))*x[1]
        ref[(1, 1, 1)]=(-0.0548440540143+0.0706193891696j)*x_ref[0] + ((0.905172926257-0.387519567923j))*x_ref[1]
        arg[(1, 1, 2)]=(0.75736772942+0.613555663032j)*x[0] + ((-0.720196177863-0.121301685684j))*x[1]
        ref[(1, 1, 2)]=(0.75736772942+0.613555663032j)*x_ref[0] + ((-0.720196177863-0.121301685684j))*x_ref[1]
        arg[(2, 0, 0)]=(-0.525967205415+0.224999985903j)*x[0] + ((-0.880418292105+0.263229667984j))*x[1]
        ref[(2, 0, 0)]=(-0.525967205415+0.224999985903j)*x_ref[0] + ((-0.880418292105+0.263229667984j))*x_ref[1]
        arg[(2, 0, 1)]=(0.365744987432+0.423210077682j)*x[0] + ((0.609616374486+0.995679991821j))*x[1]
        ref[(2, 0, 1)]=(0.365744987432+0.423210077682j)*x_ref[0] + ((0.609616374486+0.995679991821j))*x_ref[1]
        arg[(2, 0, 2)]=(-0.635305439563+0.433039351717j)*x[0] + ((-0.708992300047-0.00345097773488j))*x[1]
        ref[(2, 0, 2)]=(-0.635305439563+0.433039351717j)*x_ref[0] + ((-0.708992300047-0.00345097773488j))*x_ref[1]
        arg[(2, 1, 0)]=(0.725981194758-0.226237493928j)*x[0] + ((0.298332411105-0.0778122100168j))*x[1]
        ref[(2, 1, 0)]=(0.725981194758-0.226237493928j)*x_ref[0] + ((0.298332411105-0.0778122100168j))*x_ref[1]
        arg[(2, 1, 1)]=(0.0193010851564-0.99823563611j)*x[0] + ((0.429885002471+0.127409938505j))*x[1]
        ref[(2, 1, 1)]=(0.0193010851564-0.99823563611j)*x_ref[0] + ((0.429885002471+0.127409938505j))*x_ref[1]
        arg[(2, 1, 2)]=(-0.132221174656+0.846492210102j)*x[0] + ((-0.793226574472-0.232067965669j))*x[1]
        ref[(2, 1, 2)]=(-0.132221174656+0.846492210102j)*x_ref[0] + ((-0.793226574472-0.232067965669j))*x_ref[1]
        arg[(3, 0, 0)]=(0.743117005917+0.0640155254732j)*x[0] + ((0.874821888798-0.870665769731j))*x[1]
        ref[(3, 0, 0)]=(0.743117005917+0.0640155254732j)*x_ref[0] + ((0.874821888798-0.870665769731j))*x_ref[1]
        arg[(3, 0, 1)]=(-0.304148308317+0.384798698484j)*x[0] + ((0.58707986027-0.176757203782j))*x[1]
        ref[(3, 0, 1)]=(-0.304148308317+0.384798698484j)*x_ref[0] + ((0.58707986027-0.176757203782j))*x_ref[1]
        arg[(3, 0, 2)]=(-0.657067140195+0.453926134899j)*x[0] + ((-0.0886292272266+0.385883490513j))*x[1]
        ref[(3, 0, 2)]=(-0.657067140195+0.453926134899j)*x_ref[0] + ((-0.0886292272266+0.385883490513j))*x_ref[1]
        arg[(3, 1, 0)]=(0.322637792058+0.510499316435j)*x[0] + ((0.380548383856+0.791184858059j))*x[1]
        ref[(3, 1, 0)]=(0.322637792058+0.510499316435j)*x_ref[0] + ((0.380548383856+0.791184858059j))*x_ref[1]
        arg[(3, 1, 1)]=(0.900122916117+0.346886687868j)*x[0] + ((-0.505025466714-0.341638261184j))*x[1]
        ref[(3, 1, 1)]=(0.900122916117+0.346886687868j)*x_ref[0] + ((-0.505025466714-0.341638261184j))*x_ref[1]
        arg[(3, 1, 2)]=(-0.679933236483+0.156523314222j)*x[0] + ((0.760514667438-0.840758751634j))*x[1]
        ref[(3, 1, 2)]=(-0.679933236483+0.156523314222j)*x_ref[0] + ((0.760514667438-0.840758751634j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.967818835615-0.624376770991j)*x[2]
            ref[(0, 0, 0)]+=(0.967818835615-0.624376770991j)*x_ref[2]
            arg[(0, 0, 1)]+=(0.0464391630306+0.230037290542j)*x[2]
            ref[(0, 0, 1)]+=(0.0464391630306+0.230037290542j)*x_ref[2]
            arg[(0, 0, 2)]+=(-0.601250756624+0.165609474986j)*x[2]
            ref[(0, 0, 2)]+=(-0.601250756624+0.165609474986j)*x_ref[2]
            arg[(0, 1, 0)]+=(0.352331911761-0.622282882575j)*x[2]
            ref[(0, 1, 0)]+=(0.352331911761-0.622282882575j)*x_ref[2]
            arg[(0, 1, 1)]+=(-0.761362811664+0.800590675739j)*x[2]
            ref[(0, 1, 1)]+=(-0.761362811664+0.800590675739j)*x_ref[2]
            arg[(0, 1, 2)]+=(0.124701972547-0.604843646949j)*x[2]
            ref[(0, 1, 2)]+=(0.124701972547-0.604843646949j)*x_ref[2]
            arg[(1, 0, 0)]+=(0.881305521389+0.0781527511345j)*x[2]
            ref[(1, 0, 0)]+=(0.881305521389+0.0781527511345j)*x_ref[2]
            arg[(1, 0, 1)]+=(0.551405838387+0.331908918834j)*x[2]
            ref[(1, 0, 1)]+=(0.551405838387+0.331908918834j)*x_ref[2]
            arg[(1, 0, 2)]+=(-0.915644238854-0.381774425844j)*x[2]
            ref[(1, 0, 2)]+=(-0.915644238854-0.381774425844j)*x_ref[2]
            arg[(1, 1, 0)]+=(-0.485264288686+0.853894914104j)*x[2]
            ref[(1, 1, 0)]+=(-0.485264288686+0.853894914104j)*x_ref[2]
            arg[(1, 1, 1)]+=(0.383495596381-0.07683751517j)*x[2]
            ref[(1, 1, 1)]+=(0.383495596381-0.07683751517j)*x_ref[2]
            arg[(1, 1, 2)]+=(-0.99710576726+0.295491596365j)*x[2]
            ref[(1, 1, 2)]+=(-0.99710576726+0.295491596365j)*x_ref[2]
            arg[(2, 0, 0)]+=(0.145807551811-0.326028720851j)*x[2]
            ref[(2, 0, 0)]+=(0.145807551811-0.326028720851j)*x_ref[2]
            arg[(2, 0, 1)]+=(0.416193053485-0.708950143685j)*x[2]
            ref[(2, 0, 1)]+=(0.416193053485-0.708950143685j)*x_ref[2]
            arg[(2, 0, 2)]+=(0.98713533363-0.758857043603j)*x[2]
            ref[(2, 0, 2)]+=(0.98713533363-0.758857043603j)*x_ref[2]
            arg[(2, 1, 0)]+=(-0.426643931141-0.434665927374j)*x[2]
            ref[(2, 1, 0)]+=(-0.426643931141-0.434665927374j)*x_ref[2]
            arg[(2, 1, 1)]+=(0.246136072476-0.953651208908j)*x[2]
            ref[(2, 1, 1)]+=(0.246136072476-0.953651208908j)*x_ref[2]
            arg[(2, 1, 2)]+=(0.007122138078+0.474698950052j)*x[2]
            ref[(2, 1, 2)]+=(0.007122138078+0.474698950052j)*x_ref[2]
            arg[(3, 0, 0)]+=(-0.225644493567+0.0086018904633j)*x[2]
            ref[(3, 0, 0)]+=(-0.225644493567+0.0086018904633j)*x_ref[2]
            arg[(3, 0, 1)]+=(0.200931622692+0.926702788478j)*x[2]
            ref[(3, 0, 1)]+=(0.200931622692+0.926702788478j)*x_ref[2]
            arg[(3, 0, 2)]+=(-0.481845798365+0.671369235402j)*x[2]
            ref[(3, 0, 2)]+=(-0.481845798365+0.671369235402j)*x_ref[2]
            arg[(3, 1, 0)]+=(0.947243541735-0.00270798310452j)*x[2]
            ref[(3, 1, 0)]+=(0.947243541735-0.00270798310452j)*x_ref[2]
            arg[(3, 1, 1)]+=(0.634654855862+0.478283619984j)*x[2]
            ref[(3, 1, 1)]+=(0.634654855862+0.478283619984j)*x_ref[2]
            arg[(3, 1, 2)]+=(0.922624986375-0.444510733978j)*x[2]
            ref[(3, 1, 2)]+=(0.922624986375-0.444510733978j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 2, 4),w)
        ref = Data(0,(4, 3, 2, 4),w_ref)
        arg[(0, 0, 0, 0)]=(-0.575642629305+0.677727817243j)*x[0] + ((0.0894025824421+0.537483782676j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.575642629305+0.677727817243j)*x_ref[0] + ((0.0894025824421+0.537483782676j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(0.323035894495-0.112505379478j)*x[0] + ((0.650802892116+0.678257238181j))*x[1]
        ref[(0, 0, 0, 1)]=(0.323035894495-0.112505379478j)*x_ref[0] + ((0.650802892116+0.678257238181j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.428355598073+0.276038463041j)*x[0] + ((-0.528915427881-0.210479458093j))*x[1]
        ref[(0, 0, 0, 2)]=(0.428355598073+0.276038463041j)*x_ref[0] + ((-0.528915427881-0.210479458093j))*x_ref[1]
        arg[(0, 0, 0, 3)]=(-0.774714628697-0.301173908815j)*x[0] + ((0.254180761183-0.391614610853j))*x[1]
        ref[(0, 0, 0, 3)]=(-0.774714628697-0.301173908815j)*x_ref[0] + ((0.254180761183-0.391614610853j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.0811951086711+0.275975634611j)*x[0] + ((0.957086689819+0.594881744287j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.0811951086711+0.275975634611j)*x_ref[0] + ((0.957086689819+0.594881744287j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.122744727486+0.851054084959j)*x[0] + ((0.619666497836-0.858752092158j))*x[1]
        ref[(0, 0, 1, 1)]=(0.122744727486+0.851054084959j)*x_ref[0] + ((0.619666497836-0.858752092158j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(-0.405945167375-0.663178092989j)*x[0] + ((0.811683035176+0.990646682816j))*x[1]
        ref[(0, 0, 1, 2)]=(-0.405945167375-0.663178092989j)*x_ref[0] + ((0.811683035176+0.990646682816j))*x_ref[1]
        arg[(0, 0, 1, 3)]=(0.187343630644+0.44150990466j)*x[0] + ((0.926298968493+0.177445760493j))*x[1]
        ref[(0, 0, 1, 3)]=(0.187343630644+0.44150990466j)*x_ref[0] + ((0.926298968493+0.177445760493j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.512649215677-0.781707557959j)*x[0] + ((0.371782826497-0.409387923781j))*x[1]
        ref[(0, 1, 0, 0)]=(0.512649215677-0.781707557959j)*x_ref[0] + ((0.371782826497-0.409387923781j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.506005687251-0.090989714738j)*x[0] + ((0.0276368291266+0.967879972213j))*x[1]
        ref[(0, 1, 0, 1)]=(0.506005687251-0.090989714738j)*x_ref[0] + ((0.0276368291266+0.967879972213j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(0.0108784574866+0.0121243205246j)*x[0] + ((-0.635223436149+0.476559208219j))*x[1]
        ref[(0, 1, 0, 2)]=(0.0108784574866+0.0121243205246j)*x_ref[0] + ((-0.635223436149+0.476559208219j))*x_ref[1]
        arg[(0, 1, 0, 3)]=(-0.9326416334+0.0809221635795j)*x[0] + ((0.247220282485-0.848087510653j))*x[1]
        ref[(0, 1, 0, 3)]=(-0.9326416334+0.0809221635795j)*x_ref[0] + ((0.247220282485-0.848087510653j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.598019618612-0.88189133233j)*x[0] + ((0.589819065626+0.714344973756j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.598019618612-0.88189133233j)*x_ref[0] + ((0.589819065626+0.714344973756j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.84798002448+0.0147380177727j)*x[0] + ((0.808990210263+0.487853170251j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.84798002448+0.0147380177727j)*x_ref[0] + ((0.808990210263+0.487853170251j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(-0.0717301848514-0.249456099593j)*x[0] + ((-0.844758586452-0.567691399959j))*x[1]
        ref[(0, 1, 1, 2)]=(-0.0717301848514-0.249456099593j)*x_ref[0] + ((-0.844758586452-0.567691399959j))*x_ref[1]
        arg[(0, 1, 1, 3)]=(0.969831736705-0.590490219313j)*x[0] + ((-0.701261422674-0.798653604388j))*x[1]
        ref[(0, 1, 1, 3)]=(0.969831736705-0.590490219313j)*x_ref[0] + ((-0.701261422674-0.798653604388j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.116658692829-0.72640627593j)*x[0] + ((-0.869246148665-0.50055888043j))*x[1]
        ref[(0, 2, 0, 0)]=(0.116658692829-0.72640627593j)*x_ref[0] + ((-0.869246148665-0.50055888043j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(0.0311008615564+0.74950397798j)*x[0] + ((0.764477191305+0.467450529478j))*x[1]
        ref[(0, 2, 0, 1)]=(0.0311008615564+0.74950397798j)*x_ref[0] + ((0.764477191305+0.467450529478j))*x_ref[1]
        arg[(0, 2, 0, 2)]=(-0.91516274473+0.0650431309057j)*x[0] + ((0.237636773116-0.560398351351j))*x[1]
        ref[(0, 2, 0, 2)]=(-0.91516274473+0.0650431309057j)*x_ref[0] + ((0.237636773116-0.560398351351j))*x_ref[1]
        arg[(0, 2, 0, 3)]=(-0.844392750617+0.598472613494j)*x[0] + ((0.0532517129386+0.776106560162j))*x[1]
        ref[(0, 2, 0, 3)]=(-0.844392750617+0.598472613494j)*x_ref[0] + ((0.0532517129386+0.776106560162j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.290915519336+0.480830916448j)*x[0] + ((0.58088677436+0.592696290995j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.290915519336+0.480830916448j)*x_ref[0] + ((0.58088677436+0.592696290995j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(-0.69237657114-0.558927753973j)*x[0] + ((-0.230102157466-0.483498829085j))*x[1]
        ref[(0, 2, 1, 1)]=(-0.69237657114-0.558927753973j)*x_ref[0] + ((-0.230102157466-0.483498829085j))*x_ref[1]
        arg[(0, 2, 1, 2)]=(0.0509786285852-0.451201428152j)*x[0] + ((-0.123785529557+0.306621666562j))*x[1]
        ref[(0, 2, 1, 2)]=(0.0509786285852-0.451201428152j)*x_ref[0] + ((-0.123785529557+0.306621666562j))*x_ref[1]
        arg[(0, 2, 1, 3)]=(0.567907305971+0.815086572653j)*x[0] + ((0.0353717911577+0.905008860003j))*x[1]
        ref[(0, 2, 1, 3)]=(0.567907305971+0.815086572653j)*x_ref[0] + ((0.0353717911577+0.905008860003j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.931648957641-0.120672443035j)*x[0] + ((0.487812609746-0.882847252107j))*x[1]
        ref[(1, 0, 0, 0)]=(0.931648957641-0.120672443035j)*x_ref[0] + ((0.487812609746-0.882847252107j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.905656728623+0.743100643077j)*x[0] + ((-0.406706027102-0.89903009746j))*x[1]
        ref[(1, 0, 0, 1)]=(0.905656728623+0.743100643077j)*x_ref[0] + ((-0.406706027102-0.89903009746j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(-0.943674392399-0.0199758141718j)*x[0] + ((-0.101356563341+0.711846648762j))*x[1]
        ref[(1, 0, 0, 2)]=(-0.943674392399-0.0199758141718j)*x_ref[0] + ((-0.101356563341+0.711846648762j))*x_ref[1]
        arg[(1, 0, 0, 3)]=(-0.73300304425+0.211127701106j)*x[0] + ((-0.0410299876471+0.651069768528j))*x[1]
        ref[(1, 0, 0, 3)]=(-0.73300304425+0.211127701106j)*x_ref[0] + ((-0.0410299876471+0.651069768528j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.801598059824-0.422350659979j)*x[0] + ((-0.125415667891-0.259147877317j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.801598059824-0.422350659979j)*x_ref[0] + ((-0.125415667891-0.259147877317j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.185406827548-0.709248432418j)*x[0] + ((0.422878779965-0.298148224723j))*x[1]
        ref[(1, 0, 1, 1)]=(0.185406827548-0.709248432418j)*x_ref[0] + ((0.422878779965-0.298148224723j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(-0.757222250393+0.597638198645j)*x[0] + ((-0.900296769234-0.429429572848j))*x[1]
        ref[(1, 0, 1, 2)]=(-0.757222250393+0.597638198645j)*x_ref[0] + ((-0.900296769234-0.429429572848j))*x_ref[1]
        arg[(1, 0, 1, 3)]=(-0.274951386329-0.745453060913j)*x[0] + ((0.394013265587-0.757012410492j))*x[1]
        ref[(1, 0, 1, 3)]=(-0.274951386329-0.745453060913j)*x_ref[0] + ((0.394013265587-0.757012410492j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.824729396312+0.434760911009j)*x[0] + ((0.640713705687-0.161873577967j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.824729396312+0.434760911009j)*x_ref[0] + ((0.640713705687-0.161873577967j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.349056354675-0.961527468637j)*x[0] + ((-0.891275221706+0.756686022914j))*x[1]
        ref[(1, 1, 0, 1)]=(0.349056354675-0.961527468637j)*x_ref[0] + ((-0.891275221706+0.756686022914j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(-0.351544785635+0.234585162097j)*x[0] + ((-0.244577303592-0.815099585281j))*x[1]
        ref[(1, 1, 0, 2)]=(-0.351544785635+0.234585162097j)*x_ref[0] + ((-0.244577303592-0.815099585281j))*x_ref[1]
        arg[(1, 1, 0, 3)]=(0.732429343203-0.144120737998j)*x[0] + ((0.32384067113-0.903958412771j))*x[1]
        ref[(1, 1, 0, 3)]=(0.732429343203-0.144120737998j)*x_ref[0] + ((0.32384067113-0.903958412771j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.34085760472+0.144598624362j)*x[0] + ((-0.0257542436357+0.20007455675j))*x[1]
        ref[(1, 1, 1, 0)]=(0.34085760472+0.144598624362j)*x_ref[0] + ((-0.0257542436357+0.20007455675j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.583270098295-0.493163861083j)*x[0] + ((-0.0357070326047-0.682764897183j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.583270098295-0.493163861083j)*x_ref[0] + ((-0.0357070326047-0.682764897183j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(-0.499194901641-0.118439818071j)*x[0] + ((-0.634592703744+0.393799191771j))*x[1]
        ref[(1, 1, 1, 2)]=(-0.499194901641-0.118439818071j)*x_ref[0] + ((-0.634592703744+0.393799191771j))*x_ref[1]
        arg[(1, 1, 1, 3)]=(-0.740936003332-0.933636709204j)*x[0] + ((-0.408107911048-0.0900288954056j))*x[1]
        ref[(1, 1, 1, 3)]=(-0.740936003332-0.933636709204j)*x_ref[0] + ((-0.408107911048-0.0900288954056j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(-0.759010693202+0.554133061616j)*x[0] + ((0.936289117369+0.52961501351j))*x[1]
        ref[(1, 2, 0, 0)]=(-0.759010693202+0.554133061616j)*x_ref[0] + ((0.936289117369+0.52961501351j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.433261241224+0.317609309918j)*x[0] + ((0.968910829971-0.548130973492j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.433261241224+0.317609309918j)*x_ref[0] + ((0.968910829971-0.548130973492j))*x_ref[1]
        arg[(1, 2, 0, 2)]=(0.122267191942+0.20544316903j)*x[0] + ((0.677156266001-0.868973612861j))*x[1]
        ref[(1, 2, 0, 2)]=(0.122267191942+0.20544316903j)*x_ref[0] + ((0.677156266001-0.868973612861j))*x_ref[1]
        arg[(1, 2, 0, 3)]=(0.324178313816-0.647774445062j)*x[0] + ((-0.624387931536+0.465168299922j))*x[1]
        ref[(1, 2, 0, 3)]=(0.324178313816-0.647774445062j)*x_ref[0] + ((-0.624387931536+0.465168299922j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(0.385813712169-0.655234426852j)*x[0] + ((-0.675930335137+0.727399685288j))*x[1]
        ref[(1, 2, 1, 0)]=(0.385813712169-0.655234426852j)*x_ref[0] + ((-0.675930335137+0.727399685288j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(-0.612562886808-0.97023301477j)*x[0] + ((0.362835117729-0.322214366163j))*x[1]
        ref[(1, 2, 1, 1)]=(-0.612562886808-0.97023301477j)*x_ref[0] + ((0.362835117729-0.322214366163j))*x_ref[1]
        arg[(1, 2, 1, 2)]=(0.404699906899+0.0593987561705j)*x[0] + ((0.376750522458+0.360027038097j))*x[1]
        ref[(1, 2, 1, 2)]=(0.404699906899+0.0593987561705j)*x_ref[0] + ((0.376750522458+0.360027038097j))*x_ref[1]
        arg[(1, 2, 1, 3)]=(-0.444404864652+0.35688922738j)*x[0] + ((-0.566458053712+0.0219090818811j))*x[1]
        ref[(1, 2, 1, 3)]=(-0.444404864652+0.35688922738j)*x_ref[0] + ((-0.566458053712+0.0219090818811j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.580348919153-0.79910860808j)*x[0] + ((-0.264031166332-0.403379867717j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.580348919153-0.79910860808j)*x_ref[0] + ((-0.264031166332-0.403379867717j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(0.85539596373-0.021830104968j)*x[0] + ((-0.67735619582-0.174886285409j))*x[1]
        ref[(2, 0, 0, 1)]=(0.85539596373-0.021830104968j)*x_ref[0] + ((-0.67735619582-0.174886285409j))*x_ref[1]
        arg[(2, 0, 0, 2)]=(-0.54720547442+0.232998545017j)*x[0] + ((-0.545435284229+0.0390839097545j))*x[1]
        ref[(2, 0, 0, 2)]=(-0.54720547442+0.232998545017j)*x_ref[0] + ((-0.545435284229+0.0390839097545j))*x_ref[1]
        arg[(2, 0, 0, 3)]=(-0.807683591683+0.974417909183j)*x[0] + ((0.834908864997+0.43138367034j))*x[1]
        ref[(2, 0, 0, 3)]=(-0.807683591683+0.974417909183j)*x_ref[0] + ((0.834908864997+0.43138367034j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(-0.748152037015-0.958093470681j)*x[0] + ((0.734299135493-0.699782259438j))*x[1]
        ref[(2, 0, 1, 0)]=(-0.748152037015-0.958093470681j)*x_ref[0] + ((0.734299135493-0.699782259438j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.709057812382-0.263752332937j)*x[0] + ((0.394786719736-0.876534913119j))*x[1]
        ref[(2, 0, 1, 1)]=(0.709057812382-0.263752332937j)*x_ref[0] + ((0.394786719736-0.876534913119j))*x_ref[1]
        arg[(2, 0, 1, 2)]=(-0.688126735699+0.221950410483j)*x[0] + ((0.425680682852-0.47133734336j))*x[1]
        ref[(2, 0, 1, 2)]=(-0.688126735699+0.221950410483j)*x_ref[0] + ((0.425680682852-0.47133734336j))*x_ref[1]
        arg[(2, 0, 1, 3)]=(-0.304567551674-0.407561594917j)*x[0] + ((-0.270630535236+0.964045449937j))*x[1]
        ref[(2, 0, 1, 3)]=(-0.304567551674-0.407561594917j)*x_ref[0] + ((-0.270630535236+0.964045449937j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(0.961691929891-0.468936429159j)*x[0] + ((-0.0763664486081-0.477385277271j))*x[1]
        ref[(2, 1, 0, 0)]=(0.961691929891-0.468936429159j)*x_ref[0] + ((-0.0763664486081-0.477385277271j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.0524170750629+0.929082112853j)*x[0] + ((0.217975094747-0.882825074324j))*x[1]
        ref[(2, 1, 0, 1)]=(0.0524170750629+0.929082112853j)*x_ref[0] + ((0.217975094747-0.882825074324j))*x_ref[1]
        arg[(2, 1, 0, 2)]=(0.459560272684+0.761248090666j)*x[0] + ((-0.315608610824+0.195979216325j))*x[1]
        ref[(2, 1, 0, 2)]=(0.459560272684+0.761248090666j)*x_ref[0] + ((-0.315608610824+0.195979216325j))*x_ref[1]
        arg[(2, 1, 0, 3)]=(0.0982734215048-0.963705985217j)*x[0] + ((-0.53801477027-0.417907050556j))*x[1]
        ref[(2, 1, 0, 3)]=(0.0982734215048-0.963705985217j)*x_ref[0] + ((-0.53801477027-0.417907050556j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(-0.169076720604-0.932483375771j)*x[0] + ((-0.481686690234-0.921660746603j))*x[1]
        ref[(2, 1, 1, 0)]=(-0.169076720604-0.932483375771j)*x_ref[0] + ((-0.481686690234-0.921660746603j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(0.813309530444-0.957322083902j)*x[0] + ((-0.545420333596+0.307492982854j))*x[1]
        ref[(2, 1, 1, 1)]=(0.813309530444-0.957322083902j)*x_ref[0] + ((-0.545420333596+0.307492982854j))*x_ref[1]
        arg[(2, 1, 1, 2)]=(0.753263963464-0.658785619965j)*x[0] + ((0.575260558924-0.961910905582j))*x[1]
        ref[(2, 1, 1, 2)]=(0.753263963464-0.658785619965j)*x_ref[0] + ((0.575260558924-0.961910905582j))*x_ref[1]
        arg[(2, 1, 1, 3)]=(0.758509552142-0.0306821930742j)*x[0] + ((0.867146936261-0.625117911846j))*x[1]
        ref[(2, 1, 1, 3)]=(0.758509552142-0.0306821930742j)*x_ref[0] + ((0.867146936261-0.625117911846j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(0.179434650118+0.465570948139j)*x[0] + ((0.749536779264+0.509886128208j))*x[1]
        ref[(2, 2, 0, 0)]=(0.179434650118+0.465570948139j)*x_ref[0] + ((0.749536779264+0.509886128208j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(0.538287655975-0.343466723194j)*x[0] + ((0.336063100953+0.481624084837j))*x[1]
        ref[(2, 2, 0, 1)]=(0.538287655975-0.343466723194j)*x_ref[0] + ((0.336063100953+0.481624084837j))*x_ref[1]
        arg[(2, 2, 0, 2)]=(0.322372098584+0.489398382305j)*x[0] + ((0.972283309051-0.353820747249j))*x[1]
        ref[(2, 2, 0, 2)]=(0.322372098584+0.489398382305j)*x_ref[0] + ((0.972283309051-0.353820747249j))*x_ref[1]
        arg[(2, 2, 0, 3)]=(0.669935462958-0.132648370965j)*x[0] + ((-0.379382855101+0.347894445317j))*x[1]
        ref[(2, 2, 0, 3)]=(0.669935462958-0.132648370965j)*x_ref[0] + ((-0.379382855101+0.347894445317j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(-0.627181266397-0.870838614516j)*x[0] + ((0.791687026261+0.20798767372j))*x[1]
        ref[(2, 2, 1, 0)]=(-0.627181266397-0.870838614516j)*x_ref[0] + ((0.791687026261+0.20798767372j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(0.924768441176+0.0874769130151j)*x[0] + ((0.854417910703-0.471717363576j))*x[1]
        ref[(2, 2, 1, 1)]=(0.924768441176+0.0874769130151j)*x_ref[0] + ((0.854417910703-0.471717363576j))*x_ref[1]
        arg[(2, 2, 1, 2)]=(-0.238714170507+0.672411414066j)*x[0] + ((0.0794271493226+0.185892330248j))*x[1]
        ref[(2, 2, 1, 2)]=(-0.238714170507+0.672411414066j)*x_ref[0] + ((0.0794271493226+0.185892330248j))*x_ref[1]
        arg[(2, 2, 1, 3)]=(0.9042060442+0.355919146118j)*x[0] + ((0.949942220535+0.745051108164j))*x[1]
        ref[(2, 2, 1, 3)]=(0.9042060442+0.355919146118j)*x_ref[0] + ((0.949942220535+0.745051108164j))*x_ref[1]
        arg[(3, 0, 0, 0)]=(-0.161515410394+0.324309841191j)*x[0] + ((-0.885071776758-0.228718438017j))*x[1]
        ref[(3, 0, 0, 0)]=(-0.161515410394+0.324309841191j)*x_ref[0] + ((-0.885071776758-0.228718438017j))*x_ref[1]
        arg[(3, 0, 0, 1)]=(0.54183935534-0.939654069664j)*x[0] + ((0.771399848106-0.33186485513j))*x[1]
        ref[(3, 0, 0, 1)]=(0.54183935534-0.939654069664j)*x_ref[0] + ((0.771399848106-0.33186485513j))*x_ref[1]
        arg[(3, 0, 0, 2)]=(-0.752076078449+0.410431542275j)*x[0] + ((-0.54949017496-0.217045834472j))*x[1]
        ref[(3, 0, 0, 2)]=(-0.752076078449+0.410431542275j)*x_ref[0] + ((-0.54949017496-0.217045834472j))*x_ref[1]
        arg[(3, 0, 0, 3)]=(0.404643377072-0.573671461684j)*x[0] + ((-0.548287176293-0.306008451367j))*x[1]
        ref[(3, 0, 0, 3)]=(0.404643377072-0.573671461684j)*x_ref[0] + ((-0.548287176293-0.306008451367j))*x_ref[1]
        arg[(3, 0, 1, 0)]=(0.543629379625+0.696363700481j)*x[0] + ((-0.876071788904+0.48820753443j))*x[1]
        ref[(3, 0, 1, 0)]=(0.543629379625+0.696363700481j)*x_ref[0] + ((-0.876071788904+0.48820753443j))*x_ref[1]
        arg[(3, 0, 1, 1)]=(0.0672654466794+0.632335164206j)*x[0] + ((-0.773875801128+0.483442460353j))*x[1]
        ref[(3, 0, 1, 1)]=(0.0672654466794+0.632335164206j)*x_ref[0] + ((-0.773875801128+0.483442460353j))*x_ref[1]
        arg[(3, 0, 1, 2)]=(-0.835876900869-0.627446456241j)*x[0] + ((-0.680128506276+0.775286348766j))*x[1]
        ref[(3, 0, 1, 2)]=(-0.835876900869-0.627446456241j)*x_ref[0] + ((-0.680128506276+0.775286348766j))*x_ref[1]
        arg[(3, 0, 1, 3)]=(0.886306645933+0.26870903374j)*x[0] + ((-0.367087948853+0.065621571096j))*x[1]
        ref[(3, 0, 1, 3)]=(0.886306645933+0.26870903374j)*x_ref[0] + ((-0.367087948853+0.065621571096j))*x_ref[1]
        arg[(3, 1, 0, 0)]=(-0.980387319009+0.905644286065j)*x[0] + ((0.106394612196+0.394237646436j))*x[1]
        ref[(3, 1, 0, 0)]=(-0.980387319009+0.905644286065j)*x_ref[0] + ((0.106394612196+0.394237646436j))*x_ref[1]
        arg[(3, 1, 0, 1)]=(-0.208694059844+0.854663229692j)*x[0] + ((-0.498650849241-0.198039193285j))*x[1]
        ref[(3, 1, 0, 1)]=(-0.208694059844+0.854663229692j)*x_ref[0] + ((-0.498650849241-0.198039193285j))*x_ref[1]
        arg[(3, 1, 0, 2)]=(0.127968905564-0.706952638777j)*x[0] + ((-0.556269525514+0.965987138985j))*x[1]
        ref[(3, 1, 0, 2)]=(0.127968905564-0.706952638777j)*x_ref[0] + ((-0.556269525514+0.965987138985j))*x_ref[1]
        arg[(3, 1, 0, 3)]=(0.494579013055-0.482903111713j)*x[0] + ((-0.828734348558+0.400233753066j))*x[1]
        ref[(3, 1, 0, 3)]=(0.494579013055-0.482903111713j)*x_ref[0] + ((-0.828734348558+0.400233753066j))*x_ref[1]
        arg[(3, 1, 1, 0)]=(0.558677404958+0.568274288648j)*x[0] + ((0.536138805244+0.775529452894j))*x[1]
        ref[(3, 1, 1, 0)]=(0.558677404958+0.568274288648j)*x_ref[0] + ((0.536138805244+0.775529452894j))*x_ref[1]
        arg[(3, 1, 1, 1)]=(-0.00439916971799+0.55333752674j)*x[0] + ((-0.283592670849+0.538664305309j))*x[1]
        ref[(3, 1, 1, 1)]=(-0.00439916971799+0.55333752674j)*x_ref[0] + ((-0.283592670849+0.538664305309j))*x_ref[1]
        arg[(3, 1, 1, 2)]=(-0.481228161778-0.685080900497j)*x[0] + ((-0.811188616687-0.369513710129j))*x[1]
        ref[(3, 1, 1, 2)]=(-0.481228161778-0.685080900497j)*x_ref[0] + ((-0.811188616687-0.369513710129j))*x_ref[1]
        arg[(3, 1, 1, 3)]=(0.107590759787-0.250255796658j)*x[0] + ((-0.403934613912-0.417183472885j))*x[1]
        ref[(3, 1, 1, 3)]=(0.107590759787-0.250255796658j)*x_ref[0] + ((-0.403934613912-0.417183472885j))*x_ref[1]
        arg[(3, 2, 0, 0)]=(0.21433848415-0.000525911663677j)*x[0] + ((0.52858542133+0.900033695814j))*x[1]
        ref[(3, 2, 0, 0)]=(0.21433848415-0.000525911663677j)*x_ref[0] + ((0.52858542133+0.900033695814j))*x_ref[1]
        arg[(3, 2, 0, 1)]=(-0.0447422190145+0.484248903883j)*x[0] + ((0.847950326236-0.541936439911j))*x[1]
        ref[(3, 2, 0, 1)]=(-0.0447422190145+0.484248903883j)*x_ref[0] + ((0.847950326236-0.541936439911j))*x_ref[1]
        arg[(3, 2, 0, 2)]=(0.589298841104+0.978117142117j)*x[0] + ((-0.121159404984-0.528618311766j))*x[1]
        ref[(3, 2, 0, 2)]=(0.589298841104+0.978117142117j)*x_ref[0] + ((-0.121159404984-0.528618311766j))*x_ref[1]
        arg[(3, 2, 0, 3)]=(0.524804963791-0.455250915985j)*x[0] + ((0.261515736445-0.489522082224j))*x[1]
        ref[(3, 2, 0, 3)]=(0.524804963791-0.455250915985j)*x_ref[0] + ((0.261515736445-0.489522082224j))*x_ref[1]
        arg[(3, 2, 1, 0)]=(0.84505395773+0.95314206991j)*x[0] + ((-0.466017544129+0.848487766808j))*x[1]
        ref[(3, 2, 1, 0)]=(0.84505395773+0.95314206991j)*x_ref[0] + ((-0.466017544129+0.848487766808j))*x_ref[1]
        arg[(3, 2, 1, 1)]=(0.168863766557+0.56763314367j)*x[0] + ((0.202014183117+0.721390361411j))*x[1]
        ref[(3, 2, 1, 1)]=(0.168863766557+0.56763314367j)*x_ref[0] + ((0.202014183117+0.721390361411j))*x_ref[1]
        arg[(3, 2, 1, 2)]=(0.861160907396-0.232314432003j)*x[0] + ((0.526831653459+0.812229754101j))*x[1]
        ref[(3, 2, 1, 2)]=(0.861160907396-0.232314432003j)*x_ref[0] + ((0.526831653459+0.812229754101j))*x_ref[1]
        arg[(3, 2, 1, 3)]=(0.504565735348-0.526800315087j)*x[0] + ((0.265795726627+0.456308094836j))*x[1]
        ref[(3, 2, 1, 3)]=(0.504565735348-0.526800315087j)*x_ref[0] + ((0.265795726627+0.456308094836j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.929928066132+0.86878418636j)*x[2]
            ref[(0, 0, 0, 0)]+=(0.929928066132+0.86878418636j)*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.467496511556-0.538764212036j)*x[2]
            ref[(0, 0, 0, 1)]+=(-0.467496511556-0.538764212036j)*x_ref[2]
            arg[(0, 0, 0, 2)]+=(0.311435293572-0.303670703941j)*x[2]
            ref[(0, 0, 0, 2)]+=(0.311435293572-0.303670703941j)*x_ref[2]
            arg[(0, 0, 0, 3)]+=(-0.249705882831+0.901687874062j)*x[2]
            ref[(0, 0, 0, 3)]+=(-0.249705882831+0.901687874062j)*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.129337799276+0.706455640329j)*x[2]
            ref[(0, 0, 1, 0)]+=(0.129337799276+0.706455640329j)*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.473658049287-0.0692133952182j)*x[2]
            ref[(0, 0, 1, 1)]+=(-0.473658049287-0.0692133952182j)*x_ref[2]
            arg[(0, 0, 1, 2)]+=(0.314118966898-0.232928446451j)*x[2]
            ref[(0, 0, 1, 2)]+=(0.314118966898-0.232928446451j)*x_ref[2]
            arg[(0, 0, 1, 3)]+=(0.00622988239408+0.0994183103336j)*x[2]
            ref[(0, 0, 1, 3)]+=(0.00622988239408+0.0994183103336j)*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.481846609895+0.463941399882j)*x[2]
            ref[(0, 1, 0, 0)]+=(-0.481846609895+0.463941399882j)*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.100192369847+0.103061533313j)*x[2]
            ref[(0, 1, 0, 1)]+=(-0.100192369847+0.103061533313j)*x_ref[2]
            arg[(0, 1, 0, 2)]+=(0.33163742229+0.985776323285j)*x[2]
            ref[(0, 1, 0, 2)]+=(0.33163742229+0.985776323285j)*x_ref[2]
            arg[(0, 1, 0, 3)]+=(0.68490699401+0.654584935351j)*x[2]
            ref[(0, 1, 0, 3)]+=(0.68490699401+0.654584935351j)*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.981169274734-0.751667812952j)*x[2]
            ref[(0, 1, 1, 0)]+=(0.981169274734-0.751667812952j)*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.872963128136+0.161584250868j)*x[2]
            ref[(0, 1, 1, 1)]+=(-0.872963128136+0.161584250868j)*x_ref[2]
            arg[(0, 1, 1, 2)]+=(0.624204606734-0.235924196779j)*x[2]
            ref[(0, 1, 1, 2)]+=(0.624204606734-0.235924196779j)*x_ref[2]
            arg[(0, 1, 1, 3)]+=(-0.323601533076+0.971242670133j)*x[2]
            ref[(0, 1, 1, 3)]+=(-0.323601533076+0.971242670133j)*x_ref[2]
            arg[(0, 2, 0, 0)]+=(0.157368585029+0.20292986265j)*x[2]
            ref[(0, 2, 0, 0)]+=(0.157368585029+0.20292986265j)*x_ref[2]
            arg[(0, 2, 0, 1)]+=(0.497614938033-0.150235947478j)*x[2]
            ref[(0, 2, 0, 1)]+=(0.497614938033-0.150235947478j)*x_ref[2]
            arg[(0, 2, 0, 2)]+=(0.172036113637+0.711998418161j)*x[2]
            ref[(0, 2, 0, 2)]+=(0.172036113637+0.711998418161j)*x_ref[2]
            arg[(0, 2, 0, 3)]+=(-0.936839229937+0.151369685969j)*x[2]
            ref[(0, 2, 0, 3)]+=(-0.936839229937+0.151369685969j)*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.189475292305-0.518427492704j)*x[2]
            ref[(0, 2, 1, 0)]+=(-0.189475292305-0.518427492704j)*x_ref[2]
            arg[(0, 2, 1, 1)]+=(-0.818892897966+0.154515467987j)*x[2]
            ref[(0, 2, 1, 1)]+=(-0.818892897966+0.154515467987j)*x_ref[2]
            arg[(0, 2, 1, 2)]+=(-0.200776260053+0.666268287133j)*x[2]
            ref[(0, 2, 1, 2)]+=(-0.200776260053+0.666268287133j)*x_ref[2]
            arg[(0, 2, 1, 3)]+=(0.967106732747+0.721318788853j)*x[2]
            ref[(0, 2, 1, 3)]+=(0.967106732747+0.721318788853j)*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.420176124592+0.225350695741j)*x[2]
            ref[(1, 0, 0, 0)]+=(0.420176124592+0.225350695741j)*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.629641640803+0.23608665281j)*x[2]
            ref[(1, 0, 0, 1)]+=(0.629641640803+0.23608665281j)*x_ref[2]
            arg[(1, 0, 0, 2)]+=(0.371388086287-0.486480601183j)*x[2]
            ref[(1, 0, 0, 2)]+=(0.371388086287-0.486480601183j)*x_ref[2]
            arg[(1, 0, 0, 3)]+=(0.626063720071-0.330898231214j)*x[2]
            ref[(1, 0, 0, 3)]+=(0.626063720071-0.330898231214j)*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.639753396148+0.446218410165j)*x[2]
            ref[(1, 0, 1, 0)]+=(-0.639753396148+0.446218410165j)*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.337738207302+0.886974827306j)*x[2]
            ref[(1, 0, 1, 1)]+=(-0.337738207302+0.886974827306j)*x_ref[2]
            arg[(1, 0, 1, 2)]+=(0.773775478751-0.0269439362191j)*x[2]
            ref[(1, 0, 1, 2)]+=(0.773775478751-0.0269439362191j)*x_ref[2]
            arg[(1, 0, 1, 3)]+=(-0.842725851484-0.591591377933j)*x[2]
            ref[(1, 0, 1, 3)]+=(-0.842725851484-0.591591377933j)*x_ref[2]
            arg[(1, 1, 0, 0)]+=(-0.349383903328+0.586120841404j)*x[2]
            ref[(1, 1, 0, 0)]+=(-0.349383903328+0.586120841404j)*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.171706639093+0.89277355723j)*x[2]
            ref[(1, 1, 0, 1)]+=(0.171706639093+0.89277355723j)*x_ref[2]
            arg[(1, 1, 0, 2)]+=(-0.906372928023+0.390038913434j)*x[2]
            ref[(1, 1, 0, 2)]+=(-0.906372928023+0.390038913434j)*x_ref[2]
            arg[(1, 1, 0, 3)]+=(-0.100358211057-0.293703204201j)*x[2]
            ref[(1, 1, 0, 3)]+=(-0.100358211057-0.293703204201j)*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.968702602625-0.981893881448j)*x[2]
            ref[(1, 1, 1, 0)]+=(0.968702602625-0.981893881448j)*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.0813051509081+0.356372129616j)*x[2]
            ref[(1, 1, 1, 1)]+=(-0.0813051509081+0.356372129616j)*x_ref[2]
            arg[(1, 1, 1, 2)]+=(0.0907919104973+0.998906895713j)*x[2]
            ref[(1, 1, 1, 2)]+=(0.0907919104973+0.998906895713j)*x_ref[2]
            arg[(1, 1, 1, 3)]+=(0.833803106699+0.720083567817j)*x[2]
            ref[(1, 1, 1, 3)]+=(0.833803106699+0.720083567817j)*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.763226621112+0.650813656137j)*x[2]
            ref[(1, 2, 0, 0)]+=(0.763226621112+0.650813656137j)*x_ref[2]
            arg[(1, 2, 0, 1)]+=(-0.737462523758-0.634473321558j)*x[2]
            ref[(1, 2, 0, 1)]+=(-0.737462523758-0.634473321558j)*x_ref[2]
            arg[(1, 2, 0, 2)]+=(0.0581001709126-0.384674848912j)*x[2]
            ref[(1, 2, 0, 2)]+=(0.0581001709126-0.384674848912j)*x_ref[2]
            arg[(1, 2, 0, 3)]+=(-0.070535987364-0.884646896366j)*x[2]
            ref[(1, 2, 0, 3)]+=(-0.070535987364-0.884646896366j)*x_ref[2]
            arg[(1, 2, 1, 0)]+=(0.0392840490234-0.38000288984j)*x[2]
            ref[(1, 2, 1, 0)]+=(0.0392840490234-0.38000288984j)*x_ref[2]
            arg[(1, 2, 1, 1)]+=(-0.304409297709+0.314739160118j)*x[2]
            ref[(1, 2, 1, 1)]+=(-0.304409297709+0.314739160118j)*x_ref[2]
            arg[(1, 2, 1, 2)]+=(-0.267652285837-0.547379749962j)*x[2]
            ref[(1, 2, 1, 2)]+=(-0.267652285837-0.547379749962j)*x_ref[2]
            arg[(1, 2, 1, 3)]+=(0.628548312129+0.429460616103j)*x[2]
            ref[(1, 2, 1, 3)]+=(0.628548312129+0.429460616103j)*x_ref[2]
            arg[(2, 0, 0, 0)]+=(-0.193067139934-0.390158252638j)*x[2]
            ref[(2, 0, 0, 0)]+=(-0.193067139934-0.390158252638j)*x_ref[2]
            arg[(2, 0, 0, 1)]+=(0.178981595692+0.801188214967j)*x[2]
            ref[(2, 0, 0, 1)]+=(0.178981595692+0.801188214967j)*x_ref[2]
            arg[(2, 0, 0, 2)]+=(0.453527564598+0.959740955816j)*x[2]
            ref[(2, 0, 0, 2)]+=(0.453527564598+0.959740955816j)*x_ref[2]
            arg[(2, 0, 0, 3)]+=(0.439031634294+0.785911980653j)*x[2]
            ref[(2, 0, 0, 3)]+=(0.439031634294+0.785911980653j)*x_ref[2]
            arg[(2, 0, 1, 0)]+=(-0.401591733659-0.535798084575j)*x[2]
            ref[(2, 0, 1, 0)]+=(-0.401591733659-0.535798084575j)*x_ref[2]
            arg[(2, 0, 1, 1)]+=(0.745111819086-0.604677752086j)*x[2]
            ref[(2, 0, 1, 1)]+=(0.745111819086-0.604677752086j)*x_ref[2]
            arg[(2, 0, 1, 2)]+=(-0.350169589426-0.717690756697j)*x[2]
            ref[(2, 0, 1, 2)]+=(-0.350169589426-0.717690756697j)*x_ref[2]
            arg[(2, 0, 1, 3)]+=(0.551888161124-0.17268712888j)*x[2]
            ref[(2, 0, 1, 3)]+=(0.551888161124-0.17268712888j)*x_ref[2]
            arg[(2, 1, 0, 0)]+=(0.718770414746-0.966532533772j)*x[2]
            ref[(2, 1, 0, 0)]+=(0.718770414746-0.966532533772j)*x_ref[2]
            arg[(2, 1, 0, 1)]+=(-0.457118698323+0.554534066786j)*x[2]
            ref[(2, 1, 0, 1)]+=(-0.457118698323+0.554534066786j)*x_ref[2]
            arg[(2, 1, 0, 2)]+=(-0.706644924825+0.670812027621j)*x[2]
            ref[(2, 1, 0, 2)]+=(-0.706644924825+0.670812027621j)*x_ref[2]
            arg[(2, 1, 0, 3)]+=(0.643641542791-0.983969337421j)*x[2]
            ref[(2, 1, 0, 3)]+=(0.643641542791-0.983969337421j)*x_ref[2]
            arg[(2, 1, 1, 0)]+=(0.759713955444+0.872789774599j)*x[2]
            ref[(2, 1, 1, 0)]+=(0.759713955444+0.872789774599j)*x_ref[2]
            arg[(2, 1, 1, 1)]+=(-0.771739407696+0.986914656403j)*x[2]
            ref[(2, 1, 1, 1)]+=(-0.771739407696+0.986914656403j)*x_ref[2]
            arg[(2, 1, 1, 2)]+=(0.429786129341-0.382921893696j)*x[2]
            ref[(2, 1, 1, 2)]+=(0.429786129341-0.382921893696j)*x_ref[2]
            arg[(2, 1, 1, 3)]+=(-0.993737019285+0.68294971373j)*x[2]
            ref[(2, 1, 1, 3)]+=(-0.993737019285+0.68294971373j)*x_ref[2]
            arg[(2, 2, 0, 0)]+=(0.143615079495-0.723918195266j)*x[2]
            ref[(2, 2, 0, 0)]+=(0.143615079495-0.723918195266j)*x_ref[2]
            arg[(2, 2, 0, 1)]+=(-0.820867799557-0.488794460618j)*x[2]
            ref[(2, 2, 0, 1)]+=(-0.820867799557-0.488794460618j)*x_ref[2]
            arg[(2, 2, 0, 2)]+=(0.672748359547+0.779144586501j)*x[2]
            ref[(2, 2, 0, 2)]+=(0.672748359547+0.779144586501j)*x_ref[2]
            arg[(2, 2, 0, 3)]+=(-0.257556132652-0.770054555229j)*x[2]
            ref[(2, 2, 0, 3)]+=(-0.257556132652-0.770054555229j)*x_ref[2]
            arg[(2, 2, 1, 0)]+=(-0.403199381154-0.938601418361j)*x[2]
            ref[(2, 2, 1, 0)]+=(-0.403199381154-0.938601418361j)*x_ref[2]
            arg[(2, 2, 1, 1)]+=(-0.543924931921+0.27844629049j)*x[2]
            ref[(2, 2, 1, 1)]+=(-0.543924931921+0.27844629049j)*x_ref[2]
            arg[(2, 2, 1, 2)]+=(0.423998082957+0.989824810678j)*x[2]
            ref[(2, 2, 1, 2)]+=(0.423998082957+0.989824810678j)*x_ref[2]
            arg[(2, 2, 1, 3)]+=(0.684857425664+0.511854621583j)*x[2]
            ref[(2, 2, 1, 3)]+=(0.684857425664+0.511854621583j)*x_ref[2]
            arg[(3, 0, 0, 0)]+=(-0.280496179027+0.544288305445j)*x[2]
            ref[(3, 0, 0, 0)]+=(-0.280496179027+0.544288305445j)*x_ref[2]
            arg[(3, 0, 0, 1)]+=(-0.00671225685431+0.64621591226j)*x[2]
            ref[(3, 0, 0, 1)]+=(-0.00671225685431+0.64621591226j)*x_ref[2]
            arg[(3, 0, 0, 2)]+=(0.56473003905-0.522917716929j)*x[2]
            ref[(3, 0, 0, 2)]+=(0.56473003905-0.522917716929j)*x_ref[2]
            arg[(3, 0, 0, 3)]+=(0.0813990589877+0.954985291044j)*x[2]
            ref[(3, 0, 0, 3)]+=(0.0813990589877+0.954985291044j)*x_ref[2]
            arg[(3, 0, 1, 0)]+=(-0.729134884698+0.305795962473j)*x[2]
            ref[(3, 0, 1, 0)]+=(-0.729134884698+0.305795962473j)*x_ref[2]
            arg[(3, 0, 1, 1)]+=(0.940910263684-0.294525717618j)*x[2]
            ref[(3, 0, 1, 1)]+=(0.940910263684-0.294525717618j)*x_ref[2]
            arg[(3, 0, 1, 2)]+=(-0.130287586721+0.869704201681j)*x[2]
            ref[(3, 0, 1, 2)]+=(-0.130287586721+0.869704201681j)*x_ref[2]
            arg[(3, 0, 1, 3)]+=(-0.105896616158+0.736510340412j)*x[2]
            ref[(3, 0, 1, 3)]+=(-0.105896616158+0.736510340412j)*x_ref[2]
            arg[(3, 1, 0, 0)]+=(0.822518875595+0.199363802963j)*x[2]
            ref[(3, 1, 0, 0)]+=(0.822518875595+0.199363802963j)*x_ref[2]
            arg[(3, 1, 0, 1)]+=(0.0785866082893+0.432723811817j)*x[2]
            ref[(3, 1, 0, 1)]+=(0.0785866082893+0.432723811817j)*x_ref[2]
            arg[(3, 1, 0, 2)]+=(0.168888104276-0.347666656722j)*x[2]
            ref[(3, 1, 0, 2)]+=(0.168888104276-0.347666656722j)*x_ref[2]
            arg[(3, 1, 0, 3)]+=(-0.799883092273-0.768620147513j)*x[2]
            ref[(3, 1, 0, 3)]+=(-0.799883092273-0.768620147513j)*x_ref[2]
            arg[(3, 1, 1, 0)]+=(-0.632742353688+0.392291107764j)*x[2]
            ref[(3, 1, 1, 0)]+=(-0.632742353688+0.392291107764j)*x_ref[2]
            arg[(3, 1, 1, 1)]+=(0.590172405852+0.884900668346j)*x[2]
            ref[(3, 1, 1, 1)]+=(0.590172405852+0.884900668346j)*x_ref[2]
            arg[(3, 1, 1, 2)]+=(-0.810905197851+0.885160933089j)*x[2]
            ref[(3, 1, 1, 2)]+=(-0.810905197851+0.885160933089j)*x_ref[2]
            arg[(3, 1, 1, 3)]+=(-0.0771296186825-0.0367352635028j)*x[2]
            ref[(3, 1, 1, 3)]+=(-0.0771296186825-0.0367352635028j)*x_ref[2]
            arg[(3, 2, 0, 0)]+=(-0.394225420725+0.0242354971466j)*x[2]
            ref[(3, 2, 0, 0)]+=(-0.394225420725+0.0242354971466j)*x_ref[2]
            arg[(3, 2, 0, 1)]+=(0.0436133503604-0.543898764353j)*x[2]
            ref[(3, 2, 0, 1)]+=(0.0436133503604-0.543898764353j)*x_ref[2]
            arg[(3, 2, 0, 2)]+=(-0.0993657370825-0.913268558374j)*x[2]
            ref[(3, 2, 0, 2)]+=(-0.0993657370825-0.913268558374j)*x_ref[2]
            arg[(3, 2, 0, 3)]+=(-0.773623185925+0.676495463264j)*x[2]
            ref[(3, 2, 0, 3)]+=(-0.773623185925+0.676495463264j)*x_ref[2]
            arg[(3, 2, 1, 0)]+=(0.437893979659+0.155839805775j)*x[2]
            ref[(3, 2, 1, 0)]+=(0.437893979659+0.155839805775j)*x_ref[2]
            arg[(3, 2, 1, 1)]+=(-0.300329957729+0.759744566475j)*x[2]
            ref[(3, 2, 1, 1)]+=(-0.300329957729+0.759744566475j)*x_ref[2]
            arg[(3, 2, 1, 2)]+=(-0.119118678235-0.21284966143j)*x[2]
            ref[(3, 2, 1, 2)]+=(-0.119118678235-0.21284966143j)*x_ref[2]
            arg[(3, 2, 1, 3)]+=(0.571645211363+0.519811098426j)*x[2]
            ref[(3, 2, 1, 3)]+=(0.571645211363+0.519811098426j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.337936416086+0.879146035096j)*x[0]**o + ((0.206936745687+0.0469164259985j))*x[0] + ((0.415126067566-0.621601844708j))*x[1]**o + ((-0.837255567149-0.772917562854j))*x[1]
        ref=(0.337936416086+0.879146035096j)*x_ref[0]**o + ((0.206936745687+0.0469164259985j))*x_ref[0] + ((0.415126067566-0.621601844708j))*x_ref[1]**o + ((-0.837255567149-0.772917562854j))*x_ref[1]
        if dim==3:
            arg+=((0.82544815618+0.730388878277j))*x[2]**o + ((-0.483455212327+0.869153990095j))*x[2]
            ref+=((0.82544815618+0.730388878277j))*x_ref[2]**o + ((-0.483455212327+0.869153990095j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=(0.802062938836+0.894512632468j)*x[0]**o + ((-0.398806257077-0.756569960382j))*x[0] + ((0.403620421406+0.717857142279j))*x[1]**o + ((0.352051166231+0.684040071817j))*x[1]
        ref[(0,)]=(0.802062938836+0.894512632468j)*x_ref[0]**o + ((-0.398806257077-0.756569960382j))*x_ref[0] + ((0.403620421406+0.717857142279j))*x_ref[1]**o + ((0.352051166231+0.684040071817j))*x_ref[1]
        arg[(1,)]=(-0.13119165098-0.654757519743j)*x[0]**o + ((-0.676753938872+0.7884439262j))*x[0] + ((0.168806410492+0.16276988472j))*x[1]**o + ((0.72070037131+0.094582943187j))*x[1]
        ref[(1,)]=(-0.13119165098-0.654757519743j)*x_ref[0]**o + ((-0.676753938872+0.7884439262j))*x_ref[0] + ((0.168806410492+0.16276988472j))*x_ref[1]**o + ((0.72070037131+0.094582943187j))*x_ref[1]
        arg[(2,)]=(0.727199849313+0.691420452323j)*x[0]**o + ((-0.693388866431-0.132259301172j))*x[0] + ((-0.985502883359-0.011281495423j))*x[1]**o + ((0.721134680893+0.398180324171j))*x[1]
        ref[(2,)]=(0.727199849313+0.691420452323j)*x_ref[0]**o + ((-0.693388866431-0.132259301172j))*x_ref[0] + ((-0.985502883359-0.011281495423j))*x_ref[1]**o + ((0.721134680893+0.398180324171j))*x_ref[1]
        arg[(3,)]=(0.212959472218+0.974222255326j)*x[0]**o + ((-0.644906811731+0.365399716144j))*x[0] + ((0.665821870532-0.827987876754j))*x[1]**o + ((0.584722327543+0.314838933668j))*x[1]
        ref[(3,)]=(0.212959472218+0.974222255326j)*x_ref[0]**o + ((-0.644906811731+0.365399716144j))*x_ref[0] + ((0.665821870532-0.827987876754j))*x_ref[1]**o + ((0.584722327543+0.314838933668j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.53096343108-0.406912512279j)*x[2]**o + ((0.0979870948117-0.524618507014j))*x[2]
            ref[(0,)]+=(0.53096343108-0.406912512279j)*x_ref[2]**o + ((0.0979870948117-0.524618507014j))*x_ref[2]
            arg[(1,)]+=(0.592037919818-0.139518864385j)*x[2]**o + ((-0.65322070771-0.6694006404j))*x[2]
            ref[(1,)]+=(0.592037919818-0.139518864385j)*x_ref[2]**o + ((-0.65322070771-0.6694006404j))*x_ref[2]
            arg[(2,)]+=(0.140990469387-0.291313383643j)*x[2]**o + ((-0.17781147678-0.587890118763j))*x[2]
            ref[(2,)]+=(0.140990469387-0.291313383643j)*x_ref[2]**o + ((-0.17781147678-0.587890118763j))*x_ref[2]
            arg[(3,)]+=(-0.757505974395-0.14202758046j)*x[2]**o + ((0.954741184465-0.995118597995j))*x[2]
            ref[(3,)]+=(-0.757505974395-0.14202758046j)*x_ref[2]**o + ((0.954741184465-0.995118597995j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref = Data(0,(2, 4),w_ref)
        arg[(0, 0)]=(0.0877959592501+0.527163432785j)*x[0]**o + ((-0.395654607132+0.798140740435j))*x[0] + ((0.270898826442+0.486433843237j))*x[1]**o + ((-0.282568773042+0.472037631238j))*x[1]
        ref[(0, 0)]=(0.0877959592501+0.527163432785j)*x_ref[0]**o + ((-0.395654607132+0.798140740435j))*x_ref[0] + ((0.270898826442+0.486433843237j))*x_ref[1]**o + ((-0.282568773042+0.472037631238j))*x_ref[1]
        arg[(0, 1)]=(-0.401576534399-0.544248721063j)*x[0]**o + ((-0.710712681204+0.402487787748j))*x[0] + ((-0.242893860838+0.96728987423j))*x[1]**o + ((0.176988009302-0.111397853347j))*x[1]
        ref[(0, 1)]=(-0.401576534399-0.544248721063j)*x_ref[0]**o + ((-0.710712681204+0.402487787748j))*x_ref[0] + ((-0.242893860838+0.96728987423j))*x_ref[1]**o + ((0.176988009302-0.111397853347j))*x_ref[1]
        arg[(0, 2)]=(0.764037017786+0.697921289005j)*x[0]**o + ((-0.714620943329-0.336913186837j))*x[0] + ((0.886584626126+0.826482992215j))*x[1]**o + ((-0.285706624908+0.476813118751j))*x[1]
        ref[(0, 2)]=(0.764037017786+0.697921289005j)*x_ref[0]**o + ((-0.714620943329-0.336913186837j))*x_ref[0] + ((0.886584626126+0.826482992215j))*x_ref[1]**o + ((-0.285706624908+0.476813118751j))*x_ref[1]
        arg[(0, 3)]=(0.897424748468-0.142901569456j)*x[0]**o + ((-0.28640656449+0.114412173238j))*x[0] + ((-0.559764233353+0.422220478321j))*x[1]**o + ((0.75170895804-0.399354743716j))*x[1]
        ref[(0, 3)]=(0.897424748468-0.142901569456j)*x_ref[0]**o + ((-0.28640656449+0.114412173238j))*x_ref[0] + ((-0.559764233353+0.422220478321j))*x_ref[1]**o + ((0.75170895804-0.399354743716j))*x_ref[1]
        arg[(1, 0)]=(-0.274034396845+0.0687168701409j)*x[0]**o + ((0.308630088975-0.0274700560425j))*x[0] + ((-0.575552173111-0.0508537279931j))*x[1]**o + ((-0.301548571335-0.5771528341j))*x[1]
        ref[(1, 0)]=(-0.274034396845+0.0687168701409j)*x_ref[0]**o + ((0.308630088975-0.0274700560425j))*x_ref[0] + ((-0.575552173111-0.0508537279931j))*x_ref[1]**o + ((-0.301548571335-0.5771528341j))*x_ref[1]
        arg[(1, 1)]=(-0.768393575256-0.252089506004j)*x[0]**o + ((-0.577588349762+0.614209613675j))*x[0] + ((0.459274105958-0.968300482473j))*x[1]**o + ((0.496817916553+0.637719970296j))*x[1]
        ref[(1, 1)]=(-0.768393575256-0.252089506004j)*x_ref[0]**o + ((-0.577588349762+0.614209613675j))*x_ref[0] + ((0.459274105958-0.968300482473j))*x_ref[1]**o + ((0.496817916553+0.637719970296j))*x_ref[1]
        arg[(1, 2)]=(0.117531281417+0.140112620682j)*x[0]**o + ((-0.784352217972+0.106049617214j))*x[0] + ((-0.928414273086-0.836307924531j))*x[1]**o + ((-0.957388058708-0.684392923577j))*x[1]
        ref[(1, 2)]=(0.117531281417+0.140112620682j)*x_ref[0]**o + ((-0.784352217972+0.106049617214j))*x_ref[0] + ((-0.928414273086-0.836307924531j))*x_ref[1]**o + ((-0.957388058708-0.684392923577j))*x_ref[1]
        arg[(1, 3)]=(0.767033150164-0.92830544292j)*x[0]**o + ((-0.0599867345999-0.0240065410546j))*x[0] + ((-0.486920857706-0.0994136776186j))*x[1]**o + ((0.602574445151-0.491414565701j))*x[1]
        ref[(1, 3)]=(0.767033150164-0.92830544292j)*x_ref[0]**o + ((-0.0599867345999-0.0240065410546j))*x_ref[0] + ((-0.486920857706-0.0994136776186j))*x_ref[1]**o + ((0.602574445151-0.491414565701j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.906726748083-0.467279545735j)*x[2]**o + ((-0.58398396835-0.149599023256j))*x[2]
            ref[(0, 0)]+=(0.906726748083-0.467279545735j)*x_ref[2]**o + ((-0.58398396835-0.149599023256j))*x_ref[2]
            arg[(0, 1)]+=(-0.174084974095+0.0248180686261j)*x[2]**o + ((0.804286148635-0.709289609092j))*x[2]
            ref[(0, 1)]+=(-0.174084974095+0.0248180686261j)*x_ref[2]**o + ((0.804286148635-0.709289609092j))*x_ref[2]
            arg[(0, 2)]+=(0.778728385527-0.0610189724699j)*x[2]**o + ((-0.481907302572-0.468285342281j))*x[2]
            ref[(0, 2)]+=(0.778728385527-0.0610189724699j)*x_ref[2]**o + ((-0.481907302572-0.468285342281j))*x_ref[2]
            arg[(0, 3)]+=(-0.749991346643+0.92717698023j)*x[2]**o + ((0.131231670173-0.683407233735j))*x[2]
            ref[(0, 3)]+=(-0.749991346643+0.92717698023j)*x_ref[2]**o + ((0.131231670173-0.683407233735j))*x_ref[2]
            arg[(1, 0)]+=(-0.534754207132-0.739056469564j)*x[2]**o + ((-0.537113602816+0.278235033976j))*x[2]
            ref[(1, 0)]+=(-0.534754207132-0.739056469564j)*x_ref[2]**o + ((-0.537113602816+0.278235033976j))*x_ref[2]
            arg[(1, 1)]+=(0.463643118938-0.537716974489j)*x[2]**o + ((0.619775445308+0.94727292256j))*x[2]
            ref[(1, 1)]+=(0.463643118938-0.537716974489j)*x_ref[2]**o + ((0.619775445308+0.94727292256j))*x_ref[2]
            arg[(1, 2)]+=(0.778665037803-0.413122459849j)*x[2]**o + ((-0.551822389784-0.555003803299j))*x[2]
            ref[(1, 2)]+=(0.778665037803-0.413122459849j)*x_ref[2]**o + ((-0.551822389784-0.555003803299j))*x_ref[2]
            arg[(1, 3)]+=(0.531277183459-0.763356560653j)*x[2]**o + ((-0.109458058191-0.326221820507j))*x[2]
            ref[(1, 3)]+=(0.531277183459-0.763356560653j)*x_ref[2]**o + ((-0.109458058191-0.326221820507j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 2),w)
        ref = Data(0,(2, 4, 2),w_ref)
        arg[(0, 0, 0)]=(-0.407992419238-0.505434091649j)*x[0]**o + ((-0.424392905158+0.584745392994j))*x[0] + ((-0.971973049788+0.780655780261j))*x[1]**o + ((0.767820835371-0.465698853578j))*x[1]
        ref[(0, 0, 0)]=(-0.407992419238-0.505434091649j)*x_ref[0]**o + ((-0.424392905158+0.584745392994j))*x_ref[0] + ((-0.971973049788+0.780655780261j))*x_ref[1]**o + ((0.767820835371-0.465698853578j))*x_ref[1]
        arg[(0, 0, 1)]=(0.440830186811-0.654165204653j)*x[0]**o + ((-0.908359226286-0.970427274338j))*x[0] + ((0.545980032789-0.718678739392j))*x[1]**o + ((0.789809069453+0.715439424623j))*x[1]
        ref[(0, 0, 1)]=(0.440830186811-0.654165204653j)*x_ref[0]**o + ((-0.908359226286-0.970427274338j))*x_ref[0] + ((0.545980032789-0.718678739392j))*x_ref[1]**o + ((0.789809069453+0.715439424623j))*x_ref[1]
        arg[(0, 1, 0)]=(0.720917319477+0.890830809281j)*x[0]**o + ((-0.796150482721+0.825211169999j))*x[0] + ((-0.551412475768+0.0691311516537j))*x[1]**o + ((-0.871267160417+0.307086282053j))*x[1]
        ref[(0, 1, 0)]=(0.720917319477+0.890830809281j)*x_ref[0]**o + ((-0.796150482721+0.825211169999j))*x_ref[0] + ((-0.551412475768+0.0691311516537j))*x_ref[1]**o + ((-0.871267160417+0.307086282053j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.535031932762+0.75022519452j)*x[0]**o + ((-0.437871553298-0.621159710059j))*x[0] + ((0.99017778778+0.769051407335j))*x[1]**o + ((0.504122423674+0.783263009014j))*x[1]
        ref[(0, 1, 1)]=(-0.535031932762+0.75022519452j)*x_ref[0]**o + ((-0.437871553298-0.621159710059j))*x_ref[0] + ((0.99017778778+0.769051407335j))*x_ref[1]**o + ((0.504122423674+0.783263009014j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.1742956699+0.483481393091j)*x[0]**o + ((-0.824733348117-0.778627467032j))*x[0] + ((0.21840093667-0.844363885016j))*x[1]**o + ((0.588844739613-0.74990779271j))*x[1]
        ref[(0, 2, 0)]=(-0.1742956699+0.483481393091j)*x_ref[0]**o + ((-0.824733348117-0.778627467032j))*x_ref[0] + ((0.21840093667-0.844363885016j))*x_ref[1]**o + ((0.588844739613-0.74990779271j))*x_ref[1]
        arg[(0, 2, 1)]=(0.142831444787+0.845000670279j)*x[0]**o + ((-0.997383844161+0.914153862891j))*x[0] + ((-0.246606164206+0.38985475605j))*x[1]**o + ((0.343152365751-0.454802569802j))*x[1]
        ref[(0, 2, 1)]=(0.142831444787+0.845000670279j)*x_ref[0]**o + ((-0.997383844161+0.914153862891j))*x_ref[0] + ((-0.246606164206+0.38985475605j))*x_ref[1]**o + ((0.343152365751-0.454802569802j))*x_ref[1]
        arg[(0, 3, 0)]=(0.0807730678791+0.170717810646j)*x[0]**o + ((0.80145375076+0.984871805239j))*x[0] + ((-0.248444097302+0.645791423118j))*x[1]**o + ((-0.915846433984+0.288692920119j))*x[1]
        ref[(0, 3, 0)]=(0.0807730678791+0.170717810646j)*x_ref[0]**o + ((0.80145375076+0.984871805239j))*x_ref[0] + ((-0.248444097302+0.645791423118j))*x_ref[1]**o + ((-0.915846433984+0.288692920119j))*x_ref[1]
        arg[(0, 3, 1)]=(0.929926765799-0.81526666938j)*x[0]**o + ((0.702349783419+0.559096206758j))*x[0] + ((-0.498740520736+0.411893616276j))*x[1]**o + ((-0.423411199798+0.117550295673j))*x[1]
        ref[(0, 3, 1)]=(0.929926765799-0.81526666938j)*x_ref[0]**o + ((0.702349783419+0.559096206758j))*x_ref[0] + ((-0.498740520736+0.411893616276j))*x_ref[1]**o + ((-0.423411199798+0.117550295673j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.312026934838-0.282801640822j)*x[0]**o + ((0.034151914247+0.597226080721j))*x[0] + ((0.622619326048-0.0228255434125j))*x[1]**o + ((-0.737703681131+0.0626159172464j))*x[1]
        ref[(1, 0, 0)]=(-0.312026934838-0.282801640822j)*x_ref[0]**o + ((0.034151914247+0.597226080721j))*x_ref[0] + ((0.622619326048-0.0228255434125j))*x_ref[1]**o + ((-0.737703681131+0.0626159172464j))*x_ref[1]
        arg[(1, 0, 1)]=(0.73585218898+0.191962522221j)*x[0]**o + ((-0.365651300764+0.661550446866j))*x[0] + ((0.666611754864+0.296017478512j))*x[1]**o + ((-0.845628511361+0.798158906582j))*x[1]
        ref[(1, 0, 1)]=(0.73585218898+0.191962522221j)*x_ref[0]**o + ((-0.365651300764+0.661550446866j))*x_ref[0] + ((0.666611754864+0.296017478512j))*x_ref[1]**o + ((-0.845628511361+0.798158906582j))*x_ref[1]
        arg[(1, 1, 0)]=(0.164730039089+0.883655470993j)*x[0]**o + ((-0.900847985126+0.420790128465j))*x[0] + ((0.707274341034-0.186289435542j))*x[1]**o + ((0.892040408635-0.380532815655j))*x[1]
        ref[(1, 1, 0)]=(0.164730039089+0.883655470993j)*x_ref[0]**o + ((-0.900847985126+0.420790128465j))*x_ref[0] + ((0.707274341034-0.186289435542j))*x_ref[1]**o + ((0.892040408635-0.380532815655j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.974101666026-0.0654025074405j)*x[0]**o + ((-0.75143997344-0.0973313251275j))*x[0] + ((0.364526700221+0.277459669457j))*x[1]**o + ((-0.0712503434036-0.603886373767j))*x[1]
        ref[(1, 1, 1)]=(-0.974101666026-0.0654025074405j)*x_ref[0]**o + ((-0.75143997344-0.0973313251275j))*x_ref[0] + ((0.364526700221+0.277459669457j))*x_ref[1]**o + ((-0.0712503434036-0.603886373767j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.508655805495-0.275984798341j)*x[0]**o + ((-0.583791978304+0.174588591916j))*x[0] + ((-0.241116991538+0.392207287308j))*x[1]**o + ((-0.92556025412+0.950500909525j))*x[1]
        ref[(1, 2, 0)]=(-0.508655805495-0.275984798341j)*x_ref[0]**o + ((-0.583791978304+0.174588591916j))*x_ref[0] + ((-0.241116991538+0.392207287308j))*x_ref[1]**o + ((-0.92556025412+0.950500909525j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.639324136963-0.764250551696j)*x[0]**o + ((-0.370548045875-0.618091152662j))*x[0] + ((0.336572734869-0.7067677866j))*x[1]**o + ((-0.22463005321-0.385361673579j))*x[1]
        ref[(1, 2, 1)]=(-0.639324136963-0.764250551696j)*x_ref[0]**o + ((-0.370548045875-0.618091152662j))*x_ref[0] + ((0.336572734869-0.7067677866j))*x_ref[1]**o + ((-0.22463005321-0.385361673579j))*x_ref[1]
        arg[(1, 3, 0)]=(0.875260833005-0.826680738464j)*x[0]**o + ((0.294468843516-0.204023610738j))*x[0] + ((0.613700254079-0.501168601247j))*x[1]**o + ((-0.38524744265-0.932131461376j))*x[1]
        ref[(1, 3, 0)]=(0.875260833005-0.826680738464j)*x_ref[0]**o + ((0.294468843516-0.204023610738j))*x_ref[0] + ((0.613700254079-0.501168601247j))*x_ref[1]**o + ((-0.38524744265-0.932131461376j))*x_ref[1]
        arg[(1, 3, 1)]=(0.379544978628+0.436703948324j)*x[0]**o + ((-0.69006621183+0.872709620375j))*x[0] + ((0.253094603365+0.842358247968j))*x[1]**o + ((0.16174134908-0.284622718384j))*x[1]
        ref[(1, 3, 1)]=(0.379544978628+0.436703948324j)*x_ref[0]**o + ((-0.69006621183+0.872709620375j))*x_ref[0] + ((0.253094603365+0.842358247968j))*x_ref[1]**o + ((0.16174134908-0.284622718384j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.72623932705+0.91700039985j)*x[2]**o + ((0.80826124658+0.926118329726j))*x[2]
            ref[(0, 0, 0)]+=(-0.72623932705+0.91700039985j)*x_ref[2]**o + ((0.80826124658+0.926118329726j))*x_ref[2]
            arg[(0, 0, 1)]+=(0.237228159697-0.487568187559j)*x[2]**o + ((0.926865797317+0.28122071169j))*x[2]
            ref[(0, 0, 1)]+=(0.237228159697-0.487568187559j)*x_ref[2]**o + ((0.926865797317+0.28122071169j))*x_ref[2]
            arg[(0, 1, 0)]+=(0.851730536087+0.508305600159j)*x[2]**o + ((-0.284079718673-0.0847014446784j))*x[2]
            ref[(0, 1, 0)]+=(0.851730536087+0.508305600159j)*x_ref[2]**o + ((-0.284079718673-0.0847014446784j))*x_ref[2]
            arg[(0, 1, 1)]+=(-0.636630665773+0.916355311453j)*x[2]**o + ((0.240057971039+0.761571971806j))*x[2]
            ref[(0, 1, 1)]+=(-0.636630665773+0.916355311453j)*x_ref[2]**o + ((0.240057971039+0.761571971806j))*x_ref[2]
            arg[(0, 2, 0)]+=(0.696825913946-0.0632326357954j)*x[2]**o + ((0.0193442927901-0.85758534393j))*x[2]
            ref[(0, 2, 0)]+=(0.696825913946-0.0632326357954j)*x_ref[2]**o + ((0.0193442927901-0.85758534393j))*x_ref[2]
            arg[(0, 2, 1)]+=(0.465761186602+0.28233734951j)*x[2]**o + ((0.667320383879+0.0515038564144j))*x[2]
            ref[(0, 2, 1)]+=(0.465761186602+0.28233734951j)*x_ref[2]**o + ((0.667320383879+0.0515038564144j))*x_ref[2]
            arg[(0, 3, 0)]+=(-0.0417067443615-0.102452829682j)*x[2]**o + ((0.00428114775828-0.857815716733j))*x[2]
            ref[(0, 3, 0)]+=(-0.0417067443615-0.102452829682j)*x_ref[2]**o + ((0.00428114775828-0.857815716733j))*x_ref[2]
            arg[(0, 3, 1)]+=(0.581008991196-0.747489707377j)*x[2]**o + ((-0.0341640866992-0.259980180917j))*x[2]
            ref[(0, 3, 1)]+=(0.581008991196-0.747489707377j)*x_ref[2]**o + ((-0.0341640866992-0.259980180917j))*x_ref[2]
            arg[(1, 0, 0)]+=(0.245743808239-0.314094139991j)*x[2]**o + ((0.323963648858-0.166070212598j))*x[2]
            ref[(1, 0, 0)]+=(0.245743808239-0.314094139991j)*x_ref[2]**o + ((0.323963648858-0.166070212598j))*x_ref[2]
            arg[(1, 0, 1)]+=(-0.246237048588-0.362452428429j)*x[2]**o + ((0.796177415482-0.556901308389j))*x[2]
            ref[(1, 0, 1)]+=(-0.246237048588-0.362452428429j)*x_ref[2]**o + ((0.796177415482-0.556901308389j))*x_ref[2]
            arg[(1, 1, 0)]+=(-0.00356147369003-0.0311773359843j)*x[2]**o + ((-0.500356874751+0.660794544412j))*x[2]
            ref[(1, 1, 0)]+=(-0.00356147369003-0.0311773359843j)*x_ref[2]**o + ((-0.500356874751+0.660794544412j))*x_ref[2]
            arg[(1, 1, 1)]+=(0.782782585313+0.867366282234j)*x[2]**o + ((0.557631341932-0.231553913097j))*x[2]
            ref[(1, 1, 1)]+=(0.782782585313+0.867366282234j)*x_ref[2]**o + ((0.557631341932-0.231553913097j))*x_ref[2]
            arg[(1, 2, 0)]+=(-0.915840984318-0.486492380352j)*x[2]**o + ((-0.176420662467+0.447853343229j))*x[2]
            ref[(1, 2, 0)]+=(-0.915840984318-0.486492380352j)*x_ref[2]**o + ((-0.176420662467+0.447853343229j))*x_ref[2]
            arg[(1, 2, 1)]+=(0.610352709274+0.595845719372j)*x[2]**o + ((-0.449306468794-0.342613697426j))*x[2]
            ref[(1, 2, 1)]+=(0.610352709274+0.595845719372j)*x_ref[2]**o + ((-0.449306468794-0.342613697426j))*x_ref[2]
            arg[(1, 3, 0)]+=(0.651824293191+0.166504570802j)*x[2]**o + ((-0.39717363482+0.0987172912895j))*x[2]
            ref[(1, 3, 0)]+=(0.651824293191+0.166504570802j)*x_ref[2]**o + ((-0.39717363482+0.0987172912895j))*x_ref[2]
            arg[(1, 3, 1)]+=(0.661602273487-0.675780254142j)*x[2]**o + ((0.153904703256-0.944833264007j))*x[2]
            ref[(1, 3, 1)]+=(0.661602273487-0.675780254142j)*x_ref[2]**o + ((0.153904703256-0.944833264007j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 3, 2),w)
        ref = Data(0,(3, 4, 3, 2),w_ref)
        arg[(0, 0, 0, 0)]=(-0.734412131632-0.271595161728j)*x[0]**o + ((-0.0513326662446+0.23504128163j))*x[0] + ((-0.206172349949+0.122159501922j))*x[1]**o + ((-0.427694987825-0.881260165278j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.734412131632-0.271595161728j)*x_ref[0]**o + ((-0.0513326662446+0.23504128163j))*x_ref[0] + ((-0.206172349949+0.122159501922j))*x_ref[1]**o + ((-0.427694987825-0.881260165278j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.807489181953+0.217086370746j)*x[0]**o + ((0.584735248542-0.345884178542j))*x[0] + ((0.479736552006-0.266527829773j))*x[1]**o + ((0.501939951337-0.136280311179j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.807489181953+0.217086370746j)*x_ref[0]**o + ((0.584735248542-0.345884178542j))*x_ref[0] + ((0.479736552006-0.266527829773j))*x_ref[1]**o + ((0.501939951337-0.136280311179j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.182431871304+0.736271763812j)*x[0]**o + ((-0.979232194955-0.836124060456j))*x[0] + ((-0.25247606794-0.559369673933j))*x[1]**o + ((-0.701514143723-0.323296683782j))*x[1]
        ref[(0, 0, 1, 0)]=(0.182431871304+0.736271763812j)*x_ref[0]**o + ((-0.979232194955-0.836124060456j))*x_ref[0] + ((-0.25247606794-0.559369673933j))*x_ref[1]**o + ((-0.701514143723-0.323296683782j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.329643316948-0.868806051998j)*x[0]**o + ((-0.411323935682-0.456905757268j))*x[0] + ((0.197189121265+0.0353746012042j))*x[1]**o + ((0.378371861001-0.645810943323j))*x[1]
        ref[(0, 0, 1, 1)]=(0.329643316948-0.868806051998j)*x_ref[0]**o + ((-0.411323935682-0.456905757268j))*x_ref[0] + ((0.197189121265+0.0353746012042j))*x_ref[1]**o + ((0.378371861001-0.645810943323j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(0.727484326443+0.968341463534j)*x[0]**o + ((-0.905347175457+0.30044612251j))*x[0] + ((0.962985850507-0.96019530821j))*x[1]**o + ((-0.266041641466+0.0760379527761j))*x[1]
        ref[(0, 0, 2, 0)]=(0.727484326443+0.968341463534j)*x_ref[0]**o + ((-0.905347175457+0.30044612251j))*x_ref[0] + ((0.962985850507-0.96019530821j))*x_ref[1]**o + ((-0.266041641466+0.0760379527761j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(0.937229148681+0.861201592099j)*x[0]**o + ((-0.551776722136-0.448287556984j))*x[0] + ((0.145632530657-0.456280366626j))*x[1]**o + ((-0.530529805521+0.589620130414j))*x[1]
        ref[(0, 0, 2, 1)]=(0.937229148681+0.861201592099j)*x_ref[0]**o + ((-0.551776722136-0.448287556984j))*x_ref[0] + ((0.145632530657-0.456280366626j))*x_ref[1]**o + ((-0.530529805521+0.589620130414j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(-0.100762668002-0.232947363074j)*x[0]**o + ((0.863835957529-0.0429409760129j))*x[0] + ((-0.239783365238+0.64558824925j))*x[1]**o + ((-0.34051393682-0.741931498037j))*x[1]
        ref[(0, 1, 0, 0)]=(-0.100762668002-0.232947363074j)*x_ref[0]**o + ((0.863835957529-0.0429409760129j))*x_ref[0] + ((-0.239783365238+0.64558824925j))*x_ref[1]**o + ((-0.34051393682-0.741931498037j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.0867389434595+0.923017453079j)*x[0]**o + ((0.692760049335-0.659368390802j))*x[0] + ((-0.66099015449+0.344629203212j))*x[1]**o + ((-0.005693066545-0.299080935794j))*x[1]
        ref[(0, 1, 0, 1)]=(0.0867389434595+0.923017453079j)*x_ref[0]**o + ((0.692760049335-0.659368390802j))*x_ref[0] + ((-0.66099015449+0.344629203212j))*x_ref[1]**o + ((-0.005693066545-0.299080935794j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.62804128885+0.954141146044j)*x[0]**o + ((-0.462191631018-0.439056089083j))*x[0] + ((-0.517167208043+0.158861827457j))*x[1]**o + ((-0.957162231329-0.981090401532j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.62804128885+0.954141146044j)*x_ref[0]**o + ((-0.462191631018-0.439056089083j))*x_ref[0] + ((-0.517167208043+0.158861827457j))*x_ref[1]**o + ((-0.957162231329-0.981090401532j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.217464275581-0.672926256279j)*x[0]**o + ((0.755295276486-0.0999260702105j))*x[0] + ((-0.0789972534751-0.815559420597j))*x[1]**o + ((0.849242925712+0.542362698663j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.217464275581-0.672926256279j)*x_ref[0]**o + ((0.755295276486-0.0999260702105j))*x_ref[0] + ((-0.0789972534751-0.815559420597j))*x_ref[1]**o + ((0.849242925712+0.542362698663j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(0.448978317325-0.106430527714j)*x[0]**o + ((0.663275236713-0.128326707418j))*x[0] + ((0.972021105282+0.949924603113j))*x[1]**o + ((0.578381060404+0.795768899377j))*x[1]
        ref[(0, 1, 2, 0)]=(0.448978317325-0.106430527714j)*x_ref[0]**o + ((0.663275236713-0.128326707418j))*x_ref[0] + ((0.972021105282+0.949924603113j))*x_ref[1]**o + ((0.578381060404+0.795768899377j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(-0.463920943746+0.846207333872j)*x[0]**o + ((0.879937169106+0.207964029649j))*x[0] + ((0.394846060134-0.910560927828j))*x[1]**o + ((0.110173087745+0.211108765306j))*x[1]
        ref[(0, 1, 2, 1)]=(-0.463920943746+0.846207333872j)*x_ref[0]**o + ((0.879937169106+0.207964029649j))*x_ref[0] + ((0.394846060134-0.910560927828j))*x_ref[1]**o + ((0.110173087745+0.211108765306j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.82800908978-0.986727142371j)*x[0]**o + ((-0.256014716717-0.366862947054j))*x[0] + ((-0.677316036942+0.426931462411j))*x[1]**o + ((0.0776228969874-0.399558008511j))*x[1]
        ref[(0, 2, 0, 0)]=(0.82800908978-0.986727142371j)*x_ref[0]**o + ((-0.256014716717-0.366862947054j))*x_ref[0] + ((-0.677316036942+0.426931462411j))*x_ref[1]**o + ((0.0776228969874-0.399558008511j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(-0.118382975785-0.383490559528j)*x[0]**o + ((0.762258082414-0.102980684384j))*x[0] + ((0.938087844477+0.907745066622j))*x[1]**o + ((-0.700224049374-0.240642324806j))*x[1]
        ref[(0, 2, 0, 1)]=(-0.118382975785-0.383490559528j)*x_ref[0]**o + ((0.762258082414-0.102980684384j))*x_ref[0] + ((0.938087844477+0.907745066622j))*x_ref[1]**o + ((-0.700224049374-0.240642324806j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.967182539919-0.224741533212j)*x[0]**o + ((-0.303571145606+0.633050065772j))*x[0] + ((0.733774818312-0.382789770039j))*x[1]**o + ((-0.530308663745-0.868498412181j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.967182539919-0.224741533212j)*x_ref[0]**o + ((-0.303571145606+0.633050065772j))*x_ref[0] + ((0.733774818312-0.382789770039j))*x_ref[1]**o + ((-0.530308663745-0.868498412181j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(-0.814416920065-0.649938553682j)*x[0]**o + ((-0.416527063199-0.806101996825j))*x[0] + ((0.0755808793873+0.527311670259j))*x[1]**o + ((0.0455241640234+0.426553348948j))*x[1]
        ref[(0, 2, 1, 1)]=(-0.814416920065-0.649938553682j)*x_ref[0]**o + ((-0.416527063199-0.806101996825j))*x_ref[0] + ((0.0755808793873+0.527311670259j))*x_ref[1]**o + ((0.0455241640234+0.426553348948j))*x_ref[1]
        arg[(0, 2, 2, 0)]=(-0.333790068375+0.00857241153395j)*x[0]**o + ((0.950050425068-0.237317596113j))*x[0] + ((0.558352847408+0.642153423677j))*x[1]**o + ((0.428379603721-0.578135685341j))*x[1]
        ref[(0, 2, 2, 0)]=(-0.333790068375+0.00857241153395j)*x_ref[0]**o + ((0.950050425068-0.237317596113j))*x_ref[0] + ((0.558352847408+0.642153423677j))*x_ref[1]**o + ((0.428379603721-0.578135685341j))*x_ref[1]
        arg[(0, 2, 2, 1)]=(0.961991055238+0.489027480771j)*x[0]**o + ((0.185512418624-0.595600978513j))*x[0] + ((0.493170607954-0.0650091080574j))*x[1]**o + ((-0.17634164627-0.452849772991j))*x[1]
        ref[(0, 2, 2, 1)]=(0.961991055238+0.489027480771j)*x_ref[0]**o + ((0.185512418624-0.595600978513j))*x_ref[0] + ((0.493170607954-0.0650091080574j))*x_ref[1]**o + ((-0.17634164627-0.452849772991j))*x_ref[1]
        arg[(0, 3, 0, 0)]=(0.202054081598+0.681366866083j)*x[0]**o + ((-0.059358531644+0.115312419733j))*x[0] + ((0.617311928801+0.734619479991j))*x[1]**o + ((0.66235225329+0.679562667876j))*x[1]
        ref[(0, 3, 0, 0)]=(0.202054081598+0.681366866083j)*x_ref[0]**o + ((-0.059358531644+0.115312419733j))*x_ref[0] + ((0.617311928801+0.734619479991j))*x_ref[1]**o + ((0.66235225329+0.679562667876j))*x_ref[1]
        arg[(0, 3, 0, 1)]=(-0.721581468373+0.256901200385j)*x[0]**o + ((0.387288512118+0.71457681108j))*x[0] + ((0.635247477764+0.365228016513j))*x[1]**o + ((0.450871945107+0.882387271474j))*x[1]
        ref[(0, 3, 0, 1)]=(-0.721581468373+0.256901200385j)*x_ref[0]**o + ((0.387288512118+0.71457681108j))*x_ref[0] + ((0.635247477764+0.365228016513j))*x_ref[1]**o + ((0.450871945107+0.882387271474j))*x_ref[1]
        arg[(0, 3, 1, 0)]=(-0.679460436028+0.506484632637j)*x[0]**o + ((0.175997565818-0.335374913697j))*x[0] + ((0.00713728523181-0.827340460852j))*x[1]**o + ((0.473546669492+0.635605242054j))*x[1]
        ref[(0, 3, 1, 0)]=(-0.679460436028+0.506484632637j)*x_ref[0]**o + ((0.175997565818-0.335374913697j))*x_ref[0] + ((0.00713728523181-0.827340460852j))*x_ref[1]**o + ((0.473546669492+0.635605242054j))*x_ref[1]
        arg[(0, 3, 1, 1)]=(0.187673205495+0.660267582408j)*x[0]**o + ((-0.880941876064+0.687656534887j))*x[0] + ((0.90637613274-0.137097500893j))*x[1]**o + ((-0.713740058488+0.218919532737j))*x[1]
        ref[(0, 3, 1, 1)]=(0.187673205495+0.660267582408j)*x_ref[0]**o + ((-0.880941876064+0.687656534887j))*x_ref[0] + ((0.90637613274-0.137097500893j))*x_ref[1]**o + ((-0.713740058488+0.218919532737j))*x_ref[1]
        arg[(0, 3, 2, 0)]=(-0.542366518867-0.0651551662697j)*x[0]**o + ((-0.991832155883-0.578004149299j))*x[0] + ((0.982755447735-0.0935002582583j))*x[1]**o + ((-0.803676646054-0.65991926773j))*x[1]
        ref[(0, 3, 2, 0)]=(-0.542366518867-0.0651551662697j)*x_ref[0]**o + ((-0.991832155883-0.578004149299j))*x_ref[0] + ((0.982755447735-0.0935002582583j))*x_ref[1]**o + ((-0.803676646054-0.65991926773j))*x_ref[1]
        arg[(0, 3, 2, 1)]=(0.030999090328-0.592388972177j)*x[0]**o + ((0.330206632527+0.986480006522j))*x[0] + ((0.908498876577-0.215545111667j))*x[1]**o + ((-0.466168969041+0.892201079498j))*x[1]
        ref[(0, 3, 2, 1)]=(0.030999090328-0.592388972177j)*x_ref[0]**o + ((0.330206632527+0.986480006522j))*x_ref[0] + ((0.908498876577-0.215545111667j))*x_ref[1]**o + ((-0.466168969041+0.892201079498j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.203645030808+0.531450951566j)*x[0]**o + ((0.827261384753-0.880236314833j))*x[0] + ((0.735116481851+0.463854868589j))*x[1]**o + ((-0.603195456909+0.723267503028j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.203645030808+0.531450951566j)*x_ref[0]**o + ((0.827261384753-0.880236314833j))*x_ref[0] + ((0.735116481851+0.463854868589j))*x_ref[1]**o + ((-0.603195456909+0.723267503028j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.227597061737-0.173883882588j)*x[0]**o + ((-0.289866376864+0.318218649656j))*x[0] + ((-0.000569895051857+0.746297004606j))*x[1]**o + ((0.804018879922+0.54582421873j))*x[1]
        ref[(1, 0, 0, 1)]=(0.227597061737-0.173883882588j)*x_ref[0]**o + ((-0.289866376864+0.318218649656j))*x_ref[0] + ((-0.000569895051857+0.746297004606j))*x_ref[1]**o + ((0.804018879922+0.54582421873j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.947942934925-0.866105303468j)*x[0]**o + ((0.631793575383-0.683504615879j))*x[0] + ((0.52203671399+0.0828238665445j))*x[1]**o + ((-0.241739628788-0.945105008014j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.947942934925-0.866105303468j)*x_ref[0]**o + ((0.631793575383-0.683504615879j))*x_ref[0] + ((0.52203671399+0.0828238665445j))*x_ref[1]**o + ((-0.241739628788-0.945105008014j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.901249520645-0.0768834682021j)*x[0]**o + ((0.960272658267-0.445493995962j))*x[0] + ((-0.99976427461-0.685155935323j))*x[1]**o + ((-0.776822743225-0.913828907929j))*x[1]
        ref[(1, 0, 1, 1)]=(0.901249520645-0.0768834682021j)*x_ref[0]**o + ((0.960272658267-0.445493995962j))*x_ref[0] + ((-0.99976427461-0.685155935323j))*x_ref[1]**o + ((-0.776822743225-0.913828907929j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(0.195464393607+0.917587122774j)*x[0]**o + ((-0.260406191041-0.455535827754j))*x[0] + ((-0.230874395718-0.684205968949j))*x[1]**o + ((0.217513717617-0.0633145689245j))*x[1]
        ref[(1, 0, 2, 0)]=(0.195464393607+0.917587122774j)*x_ref[0]**o + ((-0.260406191041-0.455535827754j))*x_ref[0] + ((-0.230874395718-0.684205968949j))*x_ref[1]**o + ((0.217513717617-0.0633145689245j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(0.343541082765-0.406418167914j)*x[0]**o + ((0.119280194666+0.285646088862j))*x[0] + ((0.13752728345-0.119598625524j))*x[1]**o + ((-0.343829832519+0.627512999066j))*x[1]
        ref[(1, 0, 2, 1)]=(0.343541082765-0.406418167914j)*x_ref[0]**o + ((0.119280194666+0.285646088862j))*x_ref[0] + ((0.13752728345-0.119598625524j))*x_ref[1]**o + ((-0.343829832519+0.627512999066j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.445896852881-0.698468833564j)*x[0]**o + ((-0.374276249153-0.698891283075j))*x[0] + ((0.316404162098-0.318769144833j))*x[1]**o + ((-0.111638610793+0.225886721719j))*x[1]
        ref[(1, 1, 0, 0)]=(0.445896852881-0.698468833564j)*x_ref[0]**o + ((-0.374276249153-0.698891283075j))*x_ref[0] + ((0.316404162098-0.318769144833j))*x_ref[1]**o + ((-0.111638610793+0.225886721719j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.891323246056-0.869683924897j)*x[0]**o + ((0.698005168092+0.279845948646j))*x[0] + ((0.222280858586+0.149189054481j))*x[1]**o + ((-0.433474775351-0.404619841864j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.891323246056-0.869683924897j)*x_ref[0]**o + ((0.698005168092+0.279845948646j))*x_ref[0] + ((0.222280858586+0.149189054481j))*x_ref[1]**o + ((-0.433474775351-0.404619841864j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.159774338003+0.256393087838j)*x[0]**o + ((-0.356070554603+0.819452713743j))*x[0] + ((0.651027620172+0.730638021853j))*x[1]**o + ((-0.850599104102-0.54079823755j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.159774338003+0.256393087838j)*x_ref[0]**o + ((-0.356070554603+0.819452713743j))*x_ref[0] + ((0.651027620172+0.730638021853j))*x_ref[1]**o + ((-0.850599104102-0.54079823755j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.872534677861+0.279862991969j)*x[0]**o + ((0.25963493993+0.437115594598j))*x[0] + ((-0.842362856472-0.566732362863j))*x[1]**o + ((0.218299218386-0.195981234507j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.872534677861+0.279862991969j)*x_ref[0]**o + ((0.25963493993+0.437115594598j))*x_ref[0] + ((-0.842362856472-0.566732362863j))*x_ref[1]**o + ((0.218299218386-0.195981234507j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(0.349791879047-0.308508650782j)*x[0]**o + ((-0.504238207344+0.868249406091j))*x[0] + ((0.43644571793+0.726619715872j))*x[1]**o + ((-0.439297769527-0.450512605907j))*x[1]
        ref[(1, 1, 2, 0)]=(0.349791879047-0.308508650782j)*x_ref[0]**o + ((-0.504238207344+0.868249406091j))*x_ref[0] + ((0.43644571793+0.726619715872j))*x_ref[1]**o + ((-0.439297769527-0.450512605907j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(0.350145970683+0.158610406111j)*x[0]**o + ((0.626552902953-0.700850819714j))*x[0] + ((-0.509489382361+0.638396552128j))*x[1]**o + ((0.218777820692+0.283423640008j))*x[1]
        ref[(1, 1, 2, 1)]=(0.350145970683+0.158610406111j)*x_ref[0]**o + ((0.626552902953-0.700850819714j))*x_ref[0] + ((-0.509489382361+0.638396552128j))*x_ref[1]**o + ((0.218777820692+0.283423640008j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(-0.585335991916-0.588796883011j)*x[0]**o + ((0.821914691876-0.300875530999j))*x[0] + ((-0.231887081687+0.96817090839j))*x[1]**o + ((-0.182040183689+0.875496327026j))*x[1]
        ref[(1, 2, 0, 0)]=(-0.585335991916-0.588796883011j)*x_ref[0]**o + ((0.821914691876-0.300875530999j))*x_ref[0] + ((-0.231887081687+0.96817090839j))*x_ref[1]**o + ((-0.182040183689+0.875496327026j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.0799338965425+0.0711550442775j)*x[0]**o + ((0.86017861648-0.0820547926475j))*x[0] + ((0.0619087250429-0.47891928041j))*x[1]**o + ((0.644290969394-0.956209307341j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.0799338965425+0.0711550442775j)*x_ref[0]**o + ((0.86017861648-0.0820547926475j))*x_ref[0] + ((0.0619087250429-0.47891928041j))*x_ref[1]**o + ((0.644290969394-0.956209307341j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(0.916180504382-0.117438330353j)*x[0]**o + ((-0.71479175688-0.259012658853j))*x[0] + ((-0.1034704208-0.274993911246j))*x[1]**o + ((-0.28057841749+0.765203352898j))*x[1]
        ref[(1, 2, 1, 0)]=(0.916180504382-0.117438330353j)*x_ref[0]**o + ((-0.71479175688-0.259012658853j))*x_ref[0] + ((-0.1034704208-0.274993911246j))*x_ref[1]**o + ((-0.28057841749+0.765203352898j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.747660594462-0.76595071223j)*x[0]**o + ((0.934446563035-0.125213672489j))*x[0] + ((0.692643869228+0.469987226743j))*x[1]**o + ((-0.244870443453+0.710563885227j))*x[1]
        ref[(1, 2, 1, 1)]=(0.747660594462-0.76595071223j)*x_ref[0]**o + ((0.934446563035-0.125213672489j))*x_ref[0] + ((0.692643869228+0.469987226743j))*x_ref[1]**o + ((-0.244870443453+0.710563885227j))*x_ref[1]
        arg[(1, 2, 2, 0)]=(0.226594639654+0.0832671455649j)*x[0]**o + ((0.622513428626-0.187614198408j))*x[0] + ((-0.719303820762-0.720687109968j))*x[1]**o + ((-0.953281270032-0.113821934985j))*x[1]
        ref[(1, 2, 2, 0)]=(0.226594639654+0.0832671455649j)*x_ref[0]**o + ((0.622513428626-0.187614198408j))*x_ref[0] + ((-0.719303820762-0.720687109968j))*x_ref[1]**o + ((-0.953281270032-0.113821934985j))*x_ref[1]
        arg[(1, 2, 2, 1)]=(0.178032926979+0.611490979407j)*x[0]**o + ((0.641621790039-0.0769476427398j))*x[0] + ((-0.663538305573-0.846256715456j))*x[1]**o + ((0.902322185868+0.852781129532j))*x[1]
        ref[(1, 2, 2, 1)]=(0.178032926979+0.611490979407j)*x_ref[0]**o + ((0.641621790039-0.0769476427398j))*x_ref[0] + ((-0.663538305573-0.846256715456j))*x_ref[1]**o + ((0.902322185868+0.852781129532j))*x_ref[1]
        arg[(1, 3, 0, 0)]=(-0.726575447543+0.528592632213j)*x[0]**o + ((-0.240059998904-0.960518524518j))*x[0] + ((0.998969784813-0.922916522509j))*x[1]**o + ((0.190320988857+0.181813731527j))*x[1]
        ref[(1, 3, 0, 0)]=(-0.726575447543+0.528592632213j)*x_ref[0]**o + ((-0.240059998904-0.960518524518j))*x_ref[0] + ((0.998969784813-0.922916522509j))*x_ref[1]**o + ((0.190320988857+0.181813731527j))*x_ref[1]
        arg[(1, 3, 0, 1)]=(-0.864164511637-0.205031553132j)*x[0]**o + ((-0.317214106922-0.764018001559j))*x[0] + ((0.800027156678+0.363092782912j))*x[1]**o + ((0.842685932392+0.595427735976j))*x[1]
        ref[(1, 3, 0, 1)]=(-0.864164511637-0.205031553132j)*x_ref[0]**o + ((-0.317214106922-0.764018001559j))*x_ref[0] + ((0.800027156678+0.363092782912j))*x_ref[1]**o + ((0.842685932392+0.595427735976j))*x_ref[1]
        arg[(1, 3, 1, 0)]=(0.732058467152+0.889080752236j)*x[0]**o + ((-0.503733401676-0.679038152102j))*x[0] + ((-0.755065970685+0.687358196465j))*x[1]**o + ((-0.436546403839+0.383442624577j))*x[1]
        ref[(1, 3, 1, 0)]=(0.732058467152+0.889080752236j)*x_ref[0]**o + ((-0.503733401676-0.679038152102j))*x_ref[0] + ((-0.755065970685+0.687358196465j))*x_ref[1]**o + ((-0.436546403839+0.383442624577j))*x_ref[1]
        arg[(1, 3, 1, 1)]=(0.463046490207-0.841303812877j)*x[0]**o + ((-0.479081939902-0.342772159026j))*x[0] + ((-0.0438532494785+0.650753170298j))*x[1]**o + ((0.0737538613739+0.925888699644j))*x[1]
        ref[(1, 3, 1, 1)]=(0.463046490207-0.841303812877j)*x_ref[0]**o + ((-0.479081939902-0.342772159026j))*x_ref[0] + ((-0.0438532494785+0.650753170298j))*x_ref[1]**o + ((0.0737538613739+0.925888699644j))*x_ref[1]
        arg[(1, 3, 2, 0)]=(-0.404438981699-0.194578881037j)*x[0]**o + ((0.452533365714+0.267768522019j))*x[0] + ((0.608270267656+0.833242930459j))*x[1]**o + ((0.351217767149-0.64348596101j))*x[1]
        ref[(1, 3, 2, 0)]=(-0.404438981699-0.194578881037j)*x_ref[0]**o + ((0.452533365714+0.267768522019j))*x_ref[0] + ((0.608270267656+0.833242930459j))*x_ref[1]**o + ((0.351217767149-0.64348596101j))*x_ref[1]
        arg[(1, 3, 2, 1)]=(-0.473086253484-0.0917584994764j)*x[0]**o + ((0.937503878474-0.880326599129j))*x[0] + ((-0.543374574914-0.199450347928j))*x[1]**o + ((0.34531677675-0.227949781826j))*x[1]
        ref[(1, 3, 2, 1)]=(-0.473086253484-0.0917584994764j)*x_ref[0]**o + ((0.937503878474-0.880326599129j))*x_ref[0] + ((-0.543374574914-0.199450347928j))*x_ref[1]**o + ((0.34531677675-0.227949781826j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.00976165720346+0.770840904474j)*x[0]**o + ((-0.857239967717+0.895602032223j))*x[0] + ((0.422693865395-0.653055068965j))*x[1]**o + ((-0.739329937792+0.867814781868j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.00976165720346+0.770840904474j)*x_ref[0]**o + ((-0.857239967717+0.895602032223j))*x_ref[0] + ((0.422693865395-0.653055068965j))*x_ref[1]**o + ((-0.739329937792+0.867814781868j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(-0.000151773856097-0.113857597938j)*x[0]**o + ((0.665362644209-0.79689129263j))*x[0] + ((-0.0575202661217+0.428806411501j))*x[1]**o + ((0.719385945598-0.692765883439j))*x[1]
        ref[(2, 0, 0, 1)]=(-0.000151773856097-0.113857597938j)*x_ref[0]**o + ((0.665362644209-0.79689129263j))*x_ref[0] + ((-0.0575202661217+0.428806411501j))*x_ref[1]**o + ((0.719385945598-0.692765883439j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(0.456455571134+0.613705019176j)*x[0]**o + ((-0.187276185315-0.0620060018276j))*x[0] + ((-0.900245718044+0.489570521449j))*x[1]**o + ((-0.263764870349-0.588750883129j))*x[1]
        ref[(2, 0, 1, 0)]=(0.456455571134+0.613705019176j)*x_ref[0]**o + ((-0.187276185315-0.0620060018276j))*x_ref[0] + ((-0.900245718044+0.489570521449j))*x_ref[1]**o + ((-0.263764870349-0.588750883129j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.865631197028-0.964602684138j)*x[0]**o + ((-0.173060000695-0.733912478909j))*x[0] + ((0.845873634597-0.525632115781j))*x[1]**o + ((-0.212197604645-0.0754612290453j))*x[1]
        ref[(2, 0, 1, 1)]=(0.865631197028-0.964602684138j)*x_ref[0]**o + ((-0.173060000695-0.733912478909j))*x_ref[0] + ((0.845873634597-0.525632115781j))*x_ref[1]**o + ((-0.212197604645-0.0754612290453j))*x_ref[1]
        arg[(2, 0, 2, 0)]=(-0.449703658832-0.837214317688j)*x[0]**o + ((0.948151899782-0.0742400793366j))*x[0] + ((0.134054863919+0.866413960507j))*x[1]**o + ((0.2702591109+0.253100804106j))*x[1]
        ref[(2, 0, 2, 0)]=(-0.449703658832-0.837214317688j)*x_ref[0]**o + ((0.948151899782-0.0742400793366j))*x_ref[0] + ((0.134054863919+0.866413960507j))*x_ref[1]**o + ((0.2702591109+0.253100804106j))*x_ref[1]
        arg[(2, 0, 2, 1)]=(0.86805049229-0.542030231307j)*x[0]**o + ((0.73225356986-0.815669951092j))*x[0] + ((-0.234715343684+0.522326489792j))*x[1]**o + ((0.0421330490082-0.387258324872j))*x[1]
        ref[(2, 0, 2, 1)]=(0.86805049229-0.542030231307j)*x_ref[0]**o + ((0.73225356986-0.815669951092j))*x_ref[0] + ((-0.234715343684+0.522326489792j))*x_ref[1]**o + ((0.0421330490082-0.387258324872j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(-0.315262311232+0.121520685747j)*x[0]**o + ((-0.40685180304-0.0572932183943j))*x[0] + ((-0.408112831464-0.377591593967j))*x[1]**o + ((0.812082824098+0.866330966348j))*x[1]
        ref[(2, 1, 0, 0)]=(-0.315262311232+0.121520685747j)*x_ref[0]**o + ((-0.40685180304-0.0572932183943j))*x_ref[0] + ((-0.408112831464-0.377591593967j))*x_ref[1]**o + ((0.812082824098+0.866330966348j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(-0.382579837404-0.557464866585j)*x[0]**o + ((-0.928102608576-0.139373441053j))*x[0] + ((0.932257263623-0.965914472633j))*x[1]**o + ((-0.355166087962+0.370568183866j))*x[1]
        ref[(2, 1, 0, 1)]=(-0.382579837404-0.557464866585j)*x_ref[0]**o + ((-0.928102608576-0.139373441053j))*x_ref[0] + ((0.932257263623-0.965914472633j))*x_ref[1]**o + ((-0.355166087962+0.370568183866j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(0.86040991304+0.471622855492j)*x[0]**o + ((0.952770421299+0.727527683458j))*x[0] + ((-0.265983105971+0.35167968672j))*x[1]**o + ((-0.539132829416+0.811791802293j))*x[1]
        ref[(2, 1, 1, 0)]=(0.86040991304+0.471622855492j)*x_ref[0]**o + ((0.952770421299+0.727527683458j))*x_ref[0] + ((-0.265983105971+0.35167968672j))*x_ref[1]**o + ((-0.539132829416+0.811791802293j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(-0.788231633512-0.360334065478j)*x[0]**o + ((0.56121956739+0.619225893178j))*x[0] + ((0.70625158507+0.591905787423j))*x[1]**o + ((-0.299490896361+0.31452468313j))*x[1]
        ref[(2, 1, 1, 1)]=(-0.788231633512-0.360334065478j)*x_ref[0]**o + ((0.56121956739+0.619225893178j))*x_ref[0] + ((0.70625158507+0.591905787423j))*x_ref[1]**o + ((-0.299490896361+0.31452468313j))*x_ref[1]
        arg[(2, 1, 2, 0)]=(0.919537292503+0.0387988982104j)*x[0]**o + ((0.576732470432-0.102291689539j))*x[0] + ((-0.85626585025-0.351737803836j))*x[1]**o + ((-0.25858804699+0.99358829355j))*x[1]
        ref[(2, 1, 2, 0)]=(0.919537292503+0.0387988982104j)*x_ref[0]**o + ((0.576732470432-0.102291689539j))*x_ref[0] + ((-0.85626585025-0.351737803836j))*x_ref[1]**o + ((-0.25858804699+0.99358829355j))*x_ref[1]
        arg[(2, 1, 2, 1)]=(0.987198039141-0.975272400128j)*x[0]**o + ((0.222946794461+0.212977249832j))*x[0] + ((0.323837906115+0.741621776026j))*x[1]**o + ((0.253309090335-0.580232759667j))*x[1]
        ref[(2, 1, 2, 1)]=(0.987198039141-0.975272400128j)*x_ref[0]**o + ((0.222946794461+0.212977249832j))*x_ref[0] + ((0.323837906115+0.741621776026j))*x_ref[1]**o + ((0.253309090335-0.580232759667j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(0.588079609341-0.0458516015972j)*x[0]**o + ((-0.695319903484-0.0845669559817j))*x[0] + ((-0.224706060188+0.803873546423j))*x[1]**o + ((-0.254533811496-0.846756459469j))*x[1]
        ref[(2, 2, 0, 0)]=(0.588079609341-0.0458516015972j)*x_ref[0]**o + ((-0.695319903484-0.0845669559817j))*x_ref[0] + ((-0.224706060188+0.803873546423j))*x_ref[1]**o + ((-0.254533811496-0.846756459469j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(0.946914258357+0.976901655738j)*x[0]**o + ((0.491214018339+0.68137726457j))*x[0] + ((-0.194778893216-0.589323733637j))*x[1]**o + ((0.237617596726-0.0777261832541j))*x[1]
        ref[(2, 2, 0, 1)]=(0.946914258357+0.976901655738j)*x_ref[0]**o + ((0.491214018339+0.68137726457j))*x_ref[0] + ((-0.194778893216-0.589323733637j))*x_ref[1]**o + ((0.237617596726-0.0777261832541j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(-0.371640052404+0.444818570172j)*x[0]**o + ((-0.169350155713+0.0554790905839j))*x[0] + ((-0.925483537374+0.739157822682j))*x[1]**o + ((0.75449778286+0.736429736219j))*x[1]
        ref[(2, 2, 1, 0)]=(-0.371640052404+0.444818570172j)*x_ref[0]**o + ((-0.169350155713+0.0554790905839j))*x_ref[0] + ((-0.925483537374+0.739157822682j))*x_ref[1]**o + ((0.75449778286+0.736429736219j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(0.46381308395+0.329991690388j)*x[0]**o + ((0.521939546892-0.185903842486j))*x[0] + ((0.364697245335+0.795508265731j))*x[1]**o + ((-0.390311341584+0.127817093893j))*x[1]
        ref[(2, 2, 1, 1)]=(0.46381308395+0.329991690388j)*x_ref[0]**o + ((0.521939546892-0.185903842486j))*x_ref[0] + ((0.364697245335+0.795508265731j))*x_ref[1]**o + ((-0.390311341584+0.127817093893j))*x_ref[1]
        arg[(2, 2, 2, 0)]=(0.174072811163+0.727171488993j)*x[0]**o + ((0.941346217162-0.871205006185j))*x[0] + ((0.383538615541+0.114032949325j))*x[1]**o + ((-0.581366829256-0.358134698927j))*x[1]
        ref[(2, 2, 2, 0)]=(0.174072811163+0.727171488993j)*x_ref[0]**o + ((0.941346217162-0.871205006185j))*x_ref[0] + ((0.383538615541+0.114032949325j))*x_ref[1]**o + ((-0.581366829256-0.358134698927j))*x_ref[1]
        arg[(2, 2, 2, 1)]=(0.736181772075+0.30729981424j)*x[0]**o + ((0.384145882307+0.693551370167j))*x[0] + ((0.393010236361-0.803605392784j))*x[1]**o + ((0.196331657199+0.749181378036j))*x[1]
        ref[(2, 2, 2, 1)]=(0.736181772075+0.30729981424j)*x_ref[0]**o + ((0.384145882307+0.693551370167j))*x_ref[0] + ((0.393010236361-0.803605392784j))*x_ref[1]**o + ((0.196331657199+0.749181378036j))*x_ref[1]
        arg[(2, 3, 0, 0)]=(-0.208971670018-0.73344328445j)*x[0]**o + ((-0.404388727624-0.820664761653j))*x[0] + ((0.148091084714+0.138905958666j))*x[1]**o + ((-0.395073178238-0.156781070444j))*x[1]
        ref[(2, 3, 0, 0)]=(-0.208971670018-0.73344328445j)*x_ref[0]**o + ((-0.404388727624-0.820664761653j))*x_ref[0] + ((0.148091084714+0.138905958666j))*x_ref[1]**o + ((-0.395073178238-0.156781070444j))*x_ref[1]
        arg[(2, 3, 0, 1)]=(-0.717565307193+0.0486341140235j)*x[0]**o + ((-0.731780169348+0.926427147848j))*x[0] + ((0.0845936128223+0.0323322325384j))*x[1]**o + ((0.424421055469+0.533965938506j))*x[1]
        ref[(2, 3, 0, 1)]=(-0.717565307193+0.0486341140235j)*x_ref[0]**o + ((-0.731780169348+0.926427147848j))*x_ref[0] + ((0.0845936128223+0.0323322325384j))*x_ref[1]**o + ((0.424421055469+0.533965938506j))*x_ref[1]
        arg[(2, 3, 1, 0)]=(0.124679175287-0.19105318049j)*x[0]**o + ((-0.665243824126-0.429706667991j))*x[0] + ((-0.596283899443-0.636885967391j))*x[1]**o + ((-0.36412291568+0.430616858649j))*x[1]
        ref[(2, 3, 1, 0)]=(0.124679175287-0.19105318049j)*x_ref[0]**o + ((-0.665243824126-0.429706667991j))*x_ref[0] + ((-0.596283899443-0.636885967391j))*x_ref[1]**o + ((-0.36412291568+0.430616858649j))*x_ref[1]
        arg[(2, 3, 1, 1)]=(0.0349111545425+0.958204540956j)*x[0]**o + ((0.99112399378-0.124267323647j))*x[0] + ((0.70310507842-0.170514103396j))*x[1]**o + ((0.786931410407+0.750079698765j))*x[1]
        ref[(2, 3, 1, 1)]=(0.0349111545425+0.958204540956j)*x_ref[0]**o + ((0.99112399378-0.124267323647j))*x_ref[0] + ((0.70310507842-0.170514103396j))*x_ref[1]**o + ((0.786931410407+0.750079698765j))*x_ref[1]
        arg[(2, 3, 2, 0)]=(-0.679882729094+0.417194460645j)*x[0]**o + ((-0.400555600408+0.0356319264022j))*x[0] + ((-0.343678783182+0.48006741473j))*x[1]**o + ((-0.588957625341-0.999154040792j))*x[1]
        ref[(2, 3, 2, 0)]=(-0.679882729094+0.417194460645j)*x_ref[0]**o + ((-0.400555600408+0.0356319264022j))*x_ref[0] + ((-0.343678783182+0.48006741473j))*x_ref[1]**o + ((-0.588957625341-0.999154040792j))*x_ref[1]
        arg[(2, 3, 2, 1)]=(0.688718487962-0.117703652817j)*x[0]**o + ((0.570339238054-0.5080420554j))*x[0] + ((0.31755973002-0.769785467432j))*x[1]**o + ((-0.82402612419+0.676308825777j))*x[1]
        ref[(2, 3, 2, 1)]=(0.688718487962-0.117703652817j)*x_ref[0]**o + ((0.570339238054-0.5080420554j))*x_ref[0] + ((0.31755973002-0.769785467432j))*x_ref[1]**o + ((-0.82402612419+0.676308825777j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.184560877788-0.0159541650796j)*x[2]**o + ((-0.382213235705-0.0466245712676j))*x[2]
            ref[(0, 0, 0, 0)]+=(-0.184560877788-0.0159541650796j)*x_ref[2]**o + ((-0.382213235705-0.0466245712676j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.812435059263+0.191805545189j)*x[2]**o + ((0.523594193576+0.345571689791j))*x[2]
            ref[(0, 0, 0, 1)]+=(0.812435059263+0.191805545189j)*x_ref[2]**o + ((0.523594193576+0.345571689791j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.397907133849+0.641590858219j)*x[2]**o + ((-0.561076552823-0.712124493434j))*x[2]
            ref[(0, 0, 1, 0)]+=(0.397907133849+0.641590858219j)*x_ref[2]**o + ((-0.561076552823-0.712124493434j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.00659801046916+0.927540559533j)*x[2]**o + ((0.865676337084+0.868087278703j))*x[2]
            ref[(0, 0, 1, 1)]+=(-0.00659801046916+0.927540559533j)*x_ref[2]**o + ((0.865676337084+0.868087278703j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(-0.947896294125+0.810427462277j)*x[2]**o + ((-0.210313578338+0.241254360031j))*x[2]
            ref[(0, 0, 2, 0)]+=(-0.947896294125+0.810427462277j)*x_ref[2]**o + ((-0.210313578338+0.241254360031j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(0.0838816469827+0.582645074266j)*x[2]**o + ((0.466522239262-0.527038889167j))*x[2]
            ref[(0, 0, 2, 1)]+=(0.0838816469827+0.582645074266j)*x_ref[2]**o + ((0.466522239262-0.527038889167j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.50522947336-0.494948849833j)*x[2]**o + ((0.714436438401-0.0714334578636j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.50522947336-0.494948849833j)*x_ref[2]**o + ((0.714436438401-0.0714334578636j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.308001110908-0.381331086438j)*x[2]**o + ((0.127503212547-0.172304873379j))*x[2]
            ref[(0, 1, 0, 1)]+=(0.308001110908-0.381331086438j)*x_ref[2]**o + ((0.127503212547-0.172304873379j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.529952556792-0.136033999616j)*x[2]**o + ((-0.496418127448+0.79175215626j))*x[2]
            ref[(0, 1, 1, 0)]+=(-0.529952556792-0.136033999616j)*x_ref[2]**o + ((-0.496418127448+0.79175215626j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.25204932118-0.33741840845j)*x[2]**o + ((-0.640629735553+0.551598318992j))*x[2]
            ref[(0, 1, 1, 1)]+=(-0.25204932118-0.33741840845j)*x_ref[2]**o + ((-0.640629735553+0.551598318992j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(-0.815013209479+0.534929953875j)*x[2]**o + ((-0.984242307454+0.725626848858j))*x[2]
            ref[(0, 1, 2, 0)]+=(-0.815013209479+0.534929953875j)*x_ref[2]**o + ((-0.984242307454+0.725626848858j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(-0.918548109824+0.486435757021j)*x[2]**o + ((0.68192765244-0.397482983141j))*x[2]
            ref[(0, 1, 2, 1)]+=(-0.918548109824+0.486435757021j)*x_ref[2]**o + ((0.68192765244-0.397482983141j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(-0.504195190644-0.00931227931046j)*x[2]**o + ((-0.00388289740328-0.432913323793j))*x[2]
            ref[(0, 2, 0, 0)]+=(-0.504195190644-0.00931227931046j)*x_ref[2]**o + ((-0.00388289740328-0.432913323793j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(-0.420875602261-0.319562024961j)*x[2]**o + ((0.570295296669+0.475687487947j))*x[2]
            ref[(0, 2, 0, 1)]+=(-0.420875602261-0.319562024961j)*x_ref[2]**o + ((0.570295296669+0.475687487947j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(0.821594033729+0.524860913582j)*x[2]**o + ((0.38590929563-0.00296839723312j))*x[2]
            ref[(0, 2, 1, 0)]+=(0.821594033729+0.524860913582j)*x_ref[2]**o + ((0.38590929563-0.00296839723312j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(0.904373732243+0.256009009309j)*x[2]**o + ((0.92751563856-0.4535262121j))*x[2]
            ref[(0, 2, 1, 1)]+=(0.904373732243+0.256009009309j)*x_ref[2]**o + ((0.92751563856-0.4535262121j))*x_ref[2]
            arg[(0, 2, 2, 0)]+=(-0.500479742614-0.742507399503j)*x[2]**o + ((0.46903997135-0.476013785324j))*x[2]
            ref[(0, 2, 2, 0)]+=(-0.500479742614-0.742507399503j)*x_ref[2]**o + ((0.46903997135-0.476013785324j))*x_ref[2]
            arg[(0, 2, 2, 1)]+=(-0.566196792894+0.154018687514j)*x[2]**o + ((-0.985778576955+0.895057874957j))*x[2]
            ref[(0, 2, 2, 1)]+=(-0.566196792894+0.154018687514j)*x_ref[2]**o + ((-0.985778576955+0.895057874957j))*x_ref[2]
            arg[(0, 3, 0, 0)]+=(-0.860704158098-0.667502293287j)*x[2]**o + ((-0.267680349866+0.0786309122152j))*x[2]
            ref[(0, 3, 0, 0)]+=(-0.860704158098-0.667502293287j)*x_ref[2]**o + ((-0.267680349866+0.0786309122152j))*x_ref[2]
            arg[(0, 3, 0, 1)]+=(-0.477263862542+0.849972501308j)*x[2]**o + ((-0.570908603911+0.0677408827619j))*x[2]
            ref[(0, 3, 0, 1)]+=(-0.477263862542+0.849972501308j)*x_ref[2]**o + ((-0.570908603911+0.0677408827619j))*x_ref[2]
            arg[(0, 3, 1, 0)]+=(-0.921918260168+0.834486791142j)*x[2]**o + ((-0.271549315932-0.756372986169j))*x[2]
            ref[(0, 3, 1, 0)]+=(-0.921918260168+0.834486791142j)*x_ref[2]**o + ((-0.271549315932-0.756372986169j))*x_ref[2]
            arg[(0, 3, 1, 1)]+=(0.498266603354-0.788754164561j)*x[2]**o + ((0.140618603889-0.109332089744j))*x[2]
            ref[(0, 3, 1, 1)]+=(0.498266603354-0.788754164561j)*x_ref[2]**o + ((0.140618603889-0.109332089744j))*x_ref[2]
            arg[(0, 3, 2, 0)]+=(0.645509027063+0.145937074956j)*x[2]**o + ((0.378678104658+0.0707834036175j))*x[2]
            ref[(0, 3, 2, 0)]+=(0.645509027063+0.145937074956j)*x_ref[2]**o + ((0.378678104658+0.0707834036175j))*x_ref[2]
            arg[(0, 3, 2, 1)]+=(0.0697447529153-0.614493539459j)*x[2]**o + ((-0.171509195165-0.662517959984j))*x[2]
            ref[(0, 3, 2, 1)]+=(0.0697447529153-0.614493539459j)*x_ref[2]**o + ((-0.171509195165-0.662517959984j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.940299274905+0.147347181082j)*x[2]**o + ((-0.586585094613-0.718384690136j))*x[2]
            ref[(1, 0, 0, 0)]+=(0.940299274905+0.147347181082j)*x_ref[2]**o + ((-0.586585094613-0.718384690136j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(-0.905282722473+0.916333007588j)*x[2]**o + ((0.0998445552641+0.942968567627j))*x[2]
            ref[(1, 0, 0, 1)]+=(-0.905282722473+0.916333007588j)*x_ref[2]**o + ((0.0998445552641+0.942968567627j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.409332855676+0.267947654352j)*x[2]**o + ((0.316840332321-0.352887595627j))*x[2]
            ref[(1, 0, 1, 0)]+=(0.409332855676+0.267947654352j)*x_ref[2]**o + ((0.316840332321-0.352887595627j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.428331499122-0.0470660409649j)*x[2]**o + ((0.589023833967-0.0567393678771j))*x[2]
            ref[(1, 0, 1, 1)]+=(-0.428331499122-0.0470660409649j)*x_ref[2]**o + ((0.589023833967-0.0567393678771j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(-0.301942773947+0.878786456078j)*x[2]**o + ((-0.378664868477+0.980375119675j))*x[2]
            ref[(1, 0, 2, 0)]+=(-0.301942773947+0.878786456078j)*x_ref[2]**o + ((-0.378664868477+0.980375119675j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(0.347097894967+0.394537533598j)*x[2]**o + ((-0.15237801127-0.913995649767j))*x[2]
            ref[(1, 0, 2, 1)]+=(0.347097894967+0.394537533598j)*x_ref[2]**o + ((-0.15237801127-0.913995649767j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.556717740197-0.999825214666j)*x[2]**o + ((0.816154566039-0.795570592023j))*x[2]
            ref[(1, 1, 0, 0)]+=(0.556717740197-0.999825214666j)*x_ref[2]**o + ((0.816154566039-0.795570592023j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.746639090413-0.420338751353j)*x[2]**o + ((-0.891269546919-0.27719984735j))*x[2]
            ref[(1, 1, 0, 1)]+=(-0.746639090413-0.420338751353j)*x_ref[2]**o + ((-0.891269546919-0.27719984735j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(-0.797346958367+0.204625859626j)*x[2]**o + ((0.902525133994-0.425092554694j))*x[2]
            ref[(1, 1, 1, 0)]+=(-0.797346958367+0.204625859626j)*x_ref[2]**o + ((0.902525133994-0.425092554694j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.770826571016+0.992369362147j)*x[2]**o + ((-0.771140642703+0.241330642678j))*x[2]
            ref[(1, 1, 1, 1)]+=(0.770826571016+0.992369362147j)*x_ref[2]**o + ((-0.771140642703+0.241330642678j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(0.388434650826-0.753372137397j)*x[2]**o + ((0.346937152749+0.242216040459j))*x[2]
            ref[(1, 1, 2, 0)]+=(0.388434650826-0.753372137397j)*x_ref[2]**o + ((0.346937152749+0.242216040459j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(-0.0192705131691+0.383432289617j)*x[2]**o + ((0.455161629898+0.788293843476j))*x[2]
            ref[(1, 1, 2, 1)]+=(-0.0192705131691+0.383432289617j)*x_ref[2]**o + ((0.455161629898+0.788293843476j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.740297594299-0.622550495806j)*x[2]**o + ((0.512085763348+0.0638681430278j))*x[2]
            ref[(1, 2, 0, 0)]+=(0.740297594299-0.622550495806j)*x_ref[2]**o + ((0.512085763348+0.0638681430278j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(0.793952045691-0.290228717367j)*x[2]**o + ((-0.535940703803-0.195855775737j))*x[2]
            ref[(1, 2, 0, 1)]+=(0.793952045691-0.290228717367j)*x_ref[2]**o + ((-0.535940703803-0.195855775737j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(-0.938211800751-0.242685948834j)*x[2]**o + ((-0.110279643115-0.14133877225j))*x[2]
            ref[(1, 2, 1, 0)]+=(-0.938211800751-0.242685948834j)*x_ref[2]**o + ((-0.110279643115-0.14133877225j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(-0.848049049421-0.330502671911j)*x[2]**o + ((-0.0417862482691+0.092877897022j))*x[2]
            ref[(1, 2, 1, 1)]+=(-0.848049049421-0.330502671911j)*x_ref[2]**o + ((-0.0417862482691+0.092877897022j))*x_ref[2]
            arg[(1, 2, 2, 0)]+=(-0.101150705613-0.247400733416j)*x[2]**o + ((0.690876276249+0.549103693891j))*x[2]
            ref[(1, 2, 2, 0)]+=(-0.101150705613-0.247400733416j)*x_ref[2]**o + ((0.690876276249+0.549103693891j))*x_ref[2]
            arg[(1, 2, 2, 1)]+=(0.669091644142-0.0240394702216j)*x[2]**o + ((0.0377704047066+0.674348473856j))*x[2]
            ref[(1, 2, 2, 1)]+=(0.669091644142-0.0240394702216j)*x_ref[2]**o + ((0.0377704047066+0.674348473856j))*x_ref[2]
            arg[(1, 3, 0, 0)]+=(0.4434310164-0.0603081494134j)*x[2]**o + ((0.757886781601-0.701891916367j))*x[2]
            ref[(1, 3, 0, 0)]+=(0.4434310164-0.0603081494134j)*x_ref[2]**o + ((0.757886781601-0.701891916367j))*x_ref[2]
            arg[(1, 3, 0, 1)]+=(-0.593910022165-0.632188323535j)*x[2]**o + ((0.578056796981+0.444135570756j))*x[2]
            ref[(1, 3, 0, 1)]+=(-0.593910022165-0.632188323535j)*x_ref[2]**o + ((0.578056796981+0.444135570756j))*x_ref[2]
            arg[(1, 3, 1, 0)]+=(-0.976867533918-0.724224806341j)*x[2]**o + ((0.0530793777269+0.685663062768j))*x[2]
            ref[(1, 3, 1, 0)]+=(-0.976867533918-0.724224806341j)*x_ref[2]**o + ((0.0530793777269+0.685663062768j))*x_ref[2]
            arg[(1, 3, 1, 1)]+=(0.0635953087051-0.138505376138j)*x[2]**o + ((0.704883860894-0.175989408477j))*x[2]
            ref[(1, 3, 1, 1)]+=(0.0635953087051-0.138505376138j)*x_ref[2]**o + ((0.704883860894-0.175989408477j))*x_ref[2]
            arg[(1, 3, 2, 0)]+=(-0.0950610009901+0.0349469212151j)*x[2]**o + ((0.457577075942+0.707433005658j))*x[2]
            ref[(1, 3, 2, 0)]+=(-0.0950610009901+0.0349469212151j)*x_ref[2]**o + ((0.457577075942+0.707433005658j))*x_ref[2]
            arg[(1, 3, 2, 1)]+=(0.470445849668+0.13586024309j)*x[2]**o + ((0.14533871118-0.443170958522j))*x[2]
            ref[(1, 3, 2, 1)]+=(0.470445849668+0.13586024309j)*x_ref[2]**o + ((0.14533871118-0.443170958522j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(-0.400748332831-0.734088060499j)*x[2]**o + ((0.539993370501+0.940092158826j))*x[2]
            ref[(2, 0, 0, 0)]+=(-0.400748332831-0.734088060499j)*x_ref[2]**o + ((0.539993370501+0.940092158826j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(0.495719544007+0.651523214114j)*x[2]**o + ((-0.945168075012+0.533196156147j))*x[2]
            ref[(2, 0, 0, 1)]+=(0.495719544007+0.651523214114j)*x_ref[2]**o + ((-0.945168075012+0.533196156147j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(0.871099137396+0.777302595306j)*x[2]**o + ((-0.372417581127+0.817712261722j))*x[2]
            ref[(2, 0, 1, 0)]+=(0.871099137396+0.777302595306j)*x_ref[2]**o + ((-0.372417581127+0.817712261722j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(-0.44502574739-0.44147355898j)*x[2]**o + ((0.546034225055-0.715195697739j))*x[2]
            ref[(2, 0, 1, 1)]+=(-0.44502574739-0.44147355898j)*x_ref[2]**o + ((0.546034225055-0.715195697739j))*x_ref[2]
            arg[(2, 0, 2, 0)]+=(-0.0902618373294+0.204588889346j)*x[2]**o + ((-0.570955602827+0.970246372103j))*x[2]
            ref[(2, 0, 2, 0)]+=(-0.0902618373294+0.204588889346j)*x_ref[2]**o + ((-0.570955602827+0.970246372103j))*x_ref[2]
            arg[(2, 0, 2, 1)]+=(-0.629281926384+0.866627488811j)*x[2]**o + ((-0.750980440774+0.637019186302j))*x[2]
            ref[(2, 0, 2, 1)]+=(-0.629281926384+0.866627488811j)*x_ref[2]**o + ((-0.750980440774+0.637019186302j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(0.784451849236-0.912864594638j)*x[2]**o + ((0.803505553955+0.631177392581j))*x[2]
            ref[(2, 1, 0, 0)]+=(0.784451849236-0.912864594638j)*x_ref[2]**o + ((0.803505553955+0.631177392581j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(-0.0327840798955+0.993687941187j)*x[2]**o + ((-0.0214917838775+0.379966676483j))*x[2]
            ref[(2, 1, 0, 1)]+=(-0.0327840798955+0.993687941187j)*x_ref[2]**o + ((-0.0214917838775+0.379966676483j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(-0.871518861766-0.115801760187j)*x[2]**o + ((-0.128204216765-0.578636957728j))*x[2]
            ref[(2, 1, 1, 0)]+=(-0.871518861766-0.115801760187j)*x_ref[2]**o + ((-0.128204216765-0.578636957728j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(0.517092876281-0.920326906788j)*x[2]**o + ((0.959554121764-0.871398814385j))*x[2]
            ref[(2, 1, 1, 1)]+=(0.517092876281-0.920326906788j)*x_ref[2]**o + ((0.959554121764-0.871398814385j))*x_ref[2]
            arg[(2, 1, 2, 0)]+=(-0.742781956437+0.338201903263j)*x[2]**o + ((-0.18531341993-0.165845824535j))*x[2]
            ref[(2, 1, 2, 0)]+=(-0.742781956437+0.338201903263j)*x_ref[2]**o + ((-0.18531341993-0.165845824535j))*x_ref[2]
            arg[(2, 1, 2, 1)]+=(0.0353741141573+0.404141426037j)*x[2]**o + ((0.431045950449+0.804789172425j))*x[2]
            ref[(2, 1, 2, 1)]+=(0.0353741141573+0.404141426037j)*x_ref[2]**o + ((0.431045950449+0.804789172425j))*x_ref[2]
            arg[(2, 2, 0, 0)]+=(0.484421707972+0.607096182199j)*x[2]**o + ((-0.600262913369-0.370611939945j))*x[2]
            ref[(2, 2, 0, 0)]+=(0.484421707972+0.607096182199j)*x_ref[2]**o + ((-0.600262913369-0.370611939945j))*x_ref[2]
            arg[(2, 2, 0, 1)]+=(0.571087362401+0.959537040566j)*x[2]**o + ((0.31654304893+0.956576517346j))*x[2]
            ref[(2, 2, 0, 1)]+=(0.571087362401+0.959537040566j)*x_ref[2]**o + ((0.31654304893+0.956576517346j))*x_ref[2]
            arg[(2, 2, 1, 0)]+=(0.0230410900223+0.466460572228j)*x[2]**o + ((-0.446815937983+0.407207220783j))*x[2]
            ref[(2, 2, 1, 0)]+=(0.0230410900223+0.466460572228j)*x_ref[2]**o + ((-0.446815937983+0.407207220783j))*x_ref[2]
            arg[(2, 2, 1, 1)]+=(0.496593164742-0.906050177842j)*x[2]**o + ((-0.358705169856-0.0323617149559j))*x[2]
            ref[(2, 2, 1, 1)]+=(0.496593164742-0.906050177842j)*x_ref[2]**o + ((-0.358705169856-0.0323617149559j))*x_ref[2]
            arg[(2, 2, 2, 0)]+=(-0.12610252746+0.468938221653j)*x[2]**o + ((-0.753751050779+0.129499353613j))*x[2]
            ref[(2, 2, 2, 0)]+=(-0.12610252746+0.468938221653j)*x_ref[2]**o + ((-0.753751050779+0.129499353613j))*x_ref[2]
            arg[(2, 2, 2, 1)]+=(0.622564807938-0.305848529903j)*x[2]**o + ((0.207481790212+0.0668163333862j))*x[2]
            ref[(2, 2, 2, 1)]+=(0.622564807938-0.305848529903j)*x_ref[2]**o + ((0.207481790212+0.0668163333862j))*x_ref[2]
            arg[(2, 3, 0, 0)]+=(0.599805022102-0.838322340911j)*x[2]**o + ((-0.821381151124+0.569875035422j))*x[2]
            ref[(2, 3, 0, 0)]+=(0.599805022102-0.838322340911j)*x_ref[2]**o + ((-0.821381151124+0.569875035422j))*x_ref[2]
            arg[(2, 3, 0, 1)]+=(-0.701873109325-0.113172978314j)*x[2]**o + ((-0.498091093579-0.0574901752716j))*x[2]
            ref[(2, 3, 0, 1)]+=(-0.701873109325-0.113172978314j)*x_ref[2]**o + ((-0.498091093579-0.0574901752716j))*x_ref[2]
            arg[(2, 3, 1, 0)]+=(-0.587700879953+0.262870449384j)*x[2]**o + ((0.32397222635-0.764384547123j))*x[2]
            ref[(2, 3, 1, 0)]+=(-0.587700879953+0.262870449384j)*x_ref[2]**o + ((0.32397222635-0.764384547123j))*x_ref[2]
            arg[(2, 3, 1, 1)]+=(0.89393068837+0.742436021918j)*x[2]**o + ((-0.221737688693-0.519701061218j))*x[2]
            ref[(2, 3, 1, 1)]+=(0.89393068837+0.742436021918j)*x_ref[2]**o + ((-0.221737688693-0.519701061218j))*x_ref[2]
            arg[(2, 3, 2, 0)]+=(0.797680376179+0.530329923482j)*x[2]**o + ((0.0599915720473-0.510397937571j))*x[2]
            ref[(2, 3, 2, 0)]+=(0.797680376179+0.530329923482j)*x_ref[2]**o + ((0.0599915720473-0.510397937571j))*x_ref[2]
            arg[(2, 3, 2, 1)]+=(-0.270251907157-0.935924836816j)*x[2]**o + ((0.39203997499+0.308236568033j))*x[2]
            ref[(2, 3, 2, 1)]+=(-0.270251907157-0.935924836816j)*x_ref[2]**o + ((0.39203997499+0.308236568033j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.501826102942-0.456183104783j)*x[0]**o + ((0.26699388224-0.140300515384j))*x[0] + ((0.3526319632-0.0670314694319j))*x[1]**o + ((0.642156139163+0.872672324489j))*x[1]
        ref=(0.501826102942-0.456183104783j)*x_ref[0]**o + ((0.26699388224-0.140300515384j))*x_ref[0] + ((0.3526319632-0.0670314694319j))*x_ref[1]**o + ((0.642156139163+0.872672324489j))*x_ref[1]
        if dim==3:
            arg+=((0.797392075314+0.961080618767j))*x[2]**o + ((-0.24007273312+0.834312173861j))*x[2]
            ref+=((0.797392075314+0.961080618767j))*x_ref[2]**o + ((-0.24007273312+0.834312173861j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=(-0.628269417794-0.771960520457j)*x[0]**o + ((0.603747695941-0.871815559632j))*x[0] + ((-0.739869974522-0.222206924994j))*x[1]**o + ((-0.181033986941+0.619660084357j))*x[1]
        ref[(0,)]=(-0.628269417794-0.771960520457j)*x_ref[0]**o + ((0.603747695941-0.871815559632j))*x_ref[0] + ((-0.739869974522-0.222206924994j))*x_ref[1]**o + ((-0.181033986941+0.619660084357j))*x_ref[1]
        arg[(1,)]=(-0.498002572714-0.770754044692j)*x[0]**o + ((-0.358423697749+0.797954042773j))*x[0] + ((-0.596541733953-0.822680966018j))*x[1]**o + ((0.478411768282-0.148410612656j))*x[1]
        ref[(1,)]=(-0.498002572714-0.770754044692j)*x_ref[0]**o + ((-0.358423697749+0.797954042773j))*x_ref[0] + ((-0.596541733953-0.822680966018j))*x_ref[1]**o + ((0.478411768282-0.148410612656j))*x_ref[1]
        arg[(2,)]=(0.347705819436-0.372997919166j)*x[0]**o + ((0.814187011895-0.539010537718j))*x[0] + ((0.22450486873-0.293665694323j))*x[1]**o + ((-0.924346400861+0.951530046134j))*x[1]
        ref[(2,)]=(0.347705819436-0.372997919166j)*x_ref[0]**o + ((0.814187011895-0.539010537718j))*x_ref[0] + ((0.22450486873-0.293665694323j))*x_ref[1]**o + ((-0.924346400861+0.951530046134j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.874661169626-0.680669802621j)*x[2]**o + ((-0.152297183225+0.73696608995j))*x[2]
            ref[(0,)]+=(0.874661169626-0.680669802621j)*x_ref[2]**o + ((-0.152297183225+0.73696608995j))*x_ref[2]
            arg[(1,)]+=(-0.972748699102+0.468058488995j)*x[2]**o + ((0.835954125726+0.390134754677j))*x[2]
            ref[(1,)]+=(-0.972748699102+0.468058488995j)*x_ref[2]**o + ((0.835954125726+0.390134754677j))*x_ref[2]
            arg[(2,)]+=(-0.793854172434-0.294287614013j)*x[2]**o + ((0.215720102535-0.59511832418j))*x[2]
            ref[(2,)]+=(-0.793854172434-0.294287614013j)*x_ref[2]**o + ((0.215720102535-0.59511832418j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3),w)
        ref = Data(0,(3, 3),w_ref)
        arg[(0, 0)]=(0.823461375406+0.995959975614j)*x[0]**o + ((-0.391674837532+0.9335301104j))*x[0] + ((-0.134102470324-0.459704193645j))*x[1]**o + ((0.27787844644-0.258950104375j))*x[1]
        ref[(0, 0)]=(0.823461375406+0.995959975614j)*x_ref[0]**o + ((-0.391674837532+0.9335301104j))*x_ref[0] + ((-0.134102470324-0.459704193645j))*x_ref[1]**o + ((0.27787844644-0.258950104375j))*x_ref[1]
        arg[(0, 1)]=(-0.678885184732+0.702872104227j)*x[0]**o + ((-0.0414694257884-0.707106348409j))*x[0] + ((0.407167535077+0.756524513573j))*x[1]**o + ((0.578816762656+0.944714800645j))*x[1]
        ref[(0, 1)]=(-0.678885184732+0.702872104227j)*x_ref[0]**o + ((-0.0414694257884-0.707106348409j))*x_ref[0] + ((0.407167535077+0.756524513573j))*x_ref[1]**o + ((0.578816762656+0.944714800645j))*x_ref[1]
        arg[(0, 2)]=(0.998153432419-0.653503950901j)*x[0]**o + ((-0.671088764766-0.309409174615j))*x[0] + ((-0.700805296763-0.921558624746j))*x[1]**o + ((-0.72912140094+0.420312236186j))*x[1]
        ref[(0, 2)]=(0.998153432419-0.653503950901j)*x_ref[0]**o + ((-0.671088764766-0.309409174615j))*x_ref[0] + ((-0.700805296763-0.921558624746j))*x_ref[1]**o + ((-0.72912140094+0.420312236186j))*x_ref[1]
        arg[(1, 0)]=(-0.459267069345+0.277300044215j)*x[0]**o + ((-0.799961681137-0.814615174806j))*x[0] + ((0.348865699559+0.458343680194j))*x[1]**o + ((0.958353944313-0.459274901179j))*x[1]
        ref[(1, 0)]=(-0.459267069345+0.277300044215j)*x_ref[0]**o + ((-0.799961681137-0.814615174806j))*x_ref[0] + ((0.348865699559+0.458343680194j))*x_ref[1]**o + ((0.958353944313-0.459274901179j))*x_ref[1]
        arg[(1, 1)]=(-0.0700361090101+0.27868113092j)*x[0]**o + ((-0.384276806937+0.775606719754j))*x[0] + ((0.628413145264+0.231243212117j))*x[1]**o + ((-0.0813776226157-0.1812281509j))*x[1]
        ref[(1, 1)]=(-0.0700361090101+0.27868113092j)*x_ref[0]**o + ((-0.384276806937+0.775606719754j))*x_ref[0] + ((0.628413145264+0.231243212117j))*x_ref[1]**o + ((-0.0813776226157-0.1812281509j))*x_ref[1]
        arg[(1, 2)]=(0.100030117116+0.182119243007j)*x[0]**o + ((-0.204214200233+0.0462500445138j))*x[0] + ((-0.436749938302-0.576432355304j))*x[1]**o + ((0.176825378888+0.949457362747j))*x[1]
        ref[(1, 2)]=(0.100030117116+0.182119243007j)*x_ref[0]**o + ((-0.204214200233+0.0462500445138j))*x_ref[0] + ((-0.436749938302-0.576432355304j))*x_ref[1]**o + ((0.176825378888+0.949457362747j))*x_ref[1]
        arg[(2, 0)]=(0.184352415009+0.95021033716j)*x[0]**o + ((-0.87888949894-0.484061253402j))*x[0] + ((-0.157548574303-0.587594796684j))*x[1]**o + ((-0.493189991616-0.753424004352j))*x[1]
        ref[(2, 0)]=(0.184352415009+0.95021033716j)*x_ref[0]**o + ((-0.87888949894-0.484061253402j))*x_ref[0] + ((-0.157548574303-0.587594796684j))*x_ref[1]**o + ((-0.493189991616-0.753424004352j))*x_ref[1]
        arg[(2, 1)]=(0.328951711558-0.466370433499j)*x[0]**o + ((-0.909908426699-0.34056476501j))*x[0] + ((0.490636218036-0.923473293652j))*x[1]**o + ((0.808170787983-0.784008609197j))*x[1]
        ref[(2, 1)]=(0.328951711558-0.466370433499j)*x_ref[0]**o + ((-0.909908426699-0.34056476501j))*x_ref[0] + ((0.490636218036-0.923473293652j))*x_ref[1]**o + ((0.808170787983-0.784008609197j))*x_ref[1]
        arg[(2, 2)]=(0.0347615600401+0.66543539352j)*x[0]**o + ((0.232331782367-0.329121873751j))*x[0] + ((0.431072913366+0.127749889163j))*x[1]**o + ((-0.203008153841+0.711435427465j))*x[1]
        ref[(2, 2)]=(0.0347615600401+0.66543539352j)*x_ref[0]**o + ((0.232331782367-0.329121873751j))*x_ref[0] + ((0.431072913366+0.127749889163j))*x_ref[1]**o + ((-0.203008153841+0.711435427465j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.604438125572-0.343124672046j)*x[2]**o + ((0.439356702916-0.910258090096j))*x[2]
            ref[(0, 0)]+=(0.604438125572-0.343124672046j)*x_ref[2]**o + ((0.439356702916-0.910258090096j))*x_ref[2]
            arg[(0, 1)]+=(-0.997881194944-0.674339874242j)*x[2]**o + ((0.0137671577615+0.294838562491j))*x[2]
            ref[(0, 1)]+=(-0.997881194944-0.674339874242j)*x_ref[2]**o + ((0.0137671577615+0.294838562491j))*x_ref[2]
            arg[(0, 2)]+=(-0.899500541974-0.633627644517j)*x[2]**o + ((0.333601011304-0.705311586813j))*x[2]
            ref[(0, 2)]+=(-0.899500541974-0.633627644517j)*x_ref[2]**o + ((0.333601011304-0.705311586813j))*x_ref[2]
            arg[(1, 0)]+=(-0.118707291864+0.623147952293j)*x[2]**o + ((-0.0889621041403-0.534128871507j))*x[2]
            ref[(1, 0)]+=(-0.118707291864+0.623147952293j)*x_ref[2]**o + ((-0.0889621041403-0.534128871507j))*x_ref[2]
            arg[(1, 1)]+=(0.41611018855+0.777372995766j)*x[2]**o + ((-0.475171884236-0.465376673119j))*x[2]
            ref[(1, 1)]+=(0.41611018855+0.777372995766j)*x_ref[2]**o + ((-0.475171884236-0.465376673119j))*x_ref[2]
            arg[(1, 2)]+=(0.187012746209+0.681788778342j)*x[2]**o + ((0.644661444204+0.465799980404j))*x[2]
            ref[(1, 2)]+=(0.187012746209+0.681788778342j)*x_ref[2]**o + ((0.644661444204+0.465799980404j))*x_ref[2]
            arg[(2, 0)]+=(0.0469537635109-0.849579972017j)*x[2]**o + ((-0.654205270527-0.683568707793j))*x[2]
            ref[(2, 0)]+=(0.0469537635109-0.849579972017j)*x_ref[2]**o + ((-0.654205270527-0.683568707793j))*x_ref[2]
            arg[(2, 1)]+=(-0.534829868081+0.386166404216j)*x[2]**o + ((-0.843460692444-0.726266336463j))*x[2]
            ref[(2, 1)]+=(-0.534829868081+0.386166404216j)*x_ref[2]**o + ((-0.843460692444-0.726266336463j))*x_ref[2]
            arg[(2, 2)]+=(0.0408000991296-0.373600739251j)*x[2]**o + ((0.011648401793+0.976804053731j))*x[2]
            ref[(2, 2)]+=(0.0408000991296-0.373600739251j)*x_ref[2]**o + ((0.011648401793+0.976804053731j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 2),w)
        ref = Data(0,(2, 3, 2),w_ref)
        arg[(0, 0, 0)]=(-0.662624868181-0.817802523622j)*x[0]**o + ((-0.0298266709288+0.163247382999j))*x[0] + ((0.840185402882+0.336482137132j))*x[1]**o + ((-0.960660454802-0.920536740913j))*x[1]
        ref[(0, 0, 0)]=(-0.662624868181-0.817802523622j)*x_ref[0]**o + ((-0.0298266709288+0.163247382999j))*x_ref[0] + ((0.840185402882+0.336482137132j))*x_ref[1]**o + ((-0.960660454802-0.920536740913j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.85048335227-0.812716986093j)*x[0]**o + ((0.302924063576+0.958745355704j))*x[0] + ((-0.382954236746+0.693233559106j))*x[1]**o + ((0.651050992832+0.170473497676j))*x[1]
        ref[(0, 0, 1)]=(-0.85048335227-0.812716986093j)*x_ref[0]**o + ((0.302924063576+0.958745355704j))*x_ref[0] + ((-0.382954236746+0.693233559106j))*x_ref[1]**o + ((0.651050992832+0.170473497676j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.303301296222+0.18408813818j)*x[0]**o + ((0.680517235216-0.852608699358j))*x[0] + ((0.420535806849-0.702443392038j))*x[1]**o + ((-0.684423535279+0.450438130504j))*x[1]
        ref[(0, 1, 0)]=(-0.303301296222+0.18408813818j)*x_ref[0]**o + ((0.680517235216-0.852608699358j))*x_ref[0] + ((0.420535806849-0.702443392038j))*x_ref[1]**o + ((-0.684423535279+0.450438130504j))*x_ref[1]
        arg[(0, 1, 1)]=(0.696902511705-0.441075617719j)*x[0]**o + ((0.936915243719+0.39359150505j))*x[0] + ((0.832408033316-0.949885194834j))*x[1]**o + ((0.0504688958389+0.358597234383j))*x[1]
        ref[(0, 1, 1)]=(0.696902511705-0.441075617719j)*x_ref[0]**o + ((0.936915243719+0.39359150505j))*x_ref[0] + ((0.832408033316-0.949885194834j))*x_ref[1]**o + ((0.0504688958389+0.358597234383j))*x_ref[1]
        arg[(0, 2, 0)]=(0.983575205883+0.89570038847j)*x[0]**o + ((-0.481840315797-0.250188801403j))*x[0] + ((-0.326983264912+0.404415044527j))*x[1]**o + ((-0.873173841046+0.241443725j))*x[1]
        ref[(0, 2, 0)]=(0.983575205883+0.89570038847j)*x_ref[0]**o + ((-0.481840315797-0.250188801403j))*x_ref[0] + ((-0.326983264912+0.404415044527j))*x_ref[1]**o + ((-0.873173841046+0.241443725j))*x_ref[1]
        arg[(0, 2, 1)]=(-0.561743259123+0.583722338135j)*x[0]**o + ((-0.704476313173-0.0232609978508j))*x[0] + ((-0.813583578691-0.515354114069j))*x[1]**o + ((-0.39031725332+0.696179311873j))*x[1]
        ref[(0, 2, 1)]=(-0.561743259123+0.583722338135j)*x_ref[0]**o + ((-0.704476313173-0.0232609978508j))*x_ref[0] + ((-0.813583578691-0.515354114069j))*x_ref[1]**o + ((-0.39031725332+0.696179311873j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.993315524358+0.169969930317j)*x[0]**o + ((0.98847457898-0.295756274727j))*x[0] + ((-0.530707495657+0.94212565567j))*x[1]**o + ((-0.38151151217+0.696491575248j))*x[1]
        ref[(1, 0, 0)]=(-0.993315524358+0.169969930317j)*x_ref[0]**o + ((0.98847457898-0.295756274727j))*x_ref[0] + ((-0.530707495657+0.94212565567j))*x_ref[1]**o + ((-0.38151151217+0.696491575248j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.751235610432+0.858885104916j)*x[0]**o + ((-0.894802647066-0.488214981206j))*x[0] + ((-0.976536450788-0.466758813954j))*x[1]**o + ((-0.11284529567+0.576928983421j))*x[1]
        ref[(1, 0, 1)]=(-0.751235610432+0.858885104916j)*x_ref[0]**o + ((-0.894802647066-0.488214981206j))*x_ref[0] + ((-0.976536450788-0.466758813954j))*x_ref[1]**o + ((-0.11284529567+0.576928983421j))*x_ref[1]
        arg[(1, 1, 0)]=(0.965591996672-0.249332445872j)*x[0]**o + ((0.435515873851+0.99102446791j))*x[0] + ((-0.582592771784+0.715453025903j))*x[1]**o + ((-0.281391859287-0.412690313453j))*x[1]
        ref[(1, 1, 0)]=(0.965591996672-0.249332445872j)*x_ref[0]**o + ((0.435515873851+0.99102446791j))*x_ref[0] + ((-0.582592771784+0.715453025903j))*x_ref[1]**o + ((-0.281391859287-0.412690313453j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.132867671091+0.529680270413j)*x[0]**o + ((-0.398114246381-0.0654589277887j))*x[0] + ((-0.221308376371-0.648318481025j))*x[1]**o + ((-0.294779625807+0.0356745947348j))*x[1]
        ref[(1, 1, 1)]=(-0.132867671091+0.529680270413j)*x_ref[0]**o + ((-0.398114246381-0.0654589277887j))*x_ref[0] + ((-0.221308376371-0.648318481025j))*x_ref[1]**o + ((-0.294779625807+0.0356745947348j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.301200797745-0.545856270488j)*x[0]**o + ((0.44967918312+0.780649231088j))*x[0] + ((0.863254371967-0.996455039745j))*x[1]**o + ((-0.515213073258-0.161960063724j))*x[1]
        ref[(1, 2, 0)]=(-0.301200797745-0.545856270488j)*x_ref[0]**o + ((0.44967918312+0.780649231088j))*x_ref[0] + ((0.863254371967-0.996455039745j))*x_ref[1]**o + ((-0.515213073258-0.161960063724j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.862681615313-0.964897942815j)*x[0]**o + ((0.272055266194-0.358497935481j))*x[0] + ((-0.509370889287-0.262368166051j))*x[1]**o + ((-0.779655346008-0.240349113344j))*x[1]
        ref[(1, 2, 1)]=(-0.862681615313-0.964897942815j)*x_ref[0]**o + ((0.272055266194-0.358497935481j))*x_ref[0] + ((-0.509370889287-0.262368166051j))*x_ref[1]**o + ((-0.779655346008-0.240349113344j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.93801783138+0.892567536691j)*x[2]**o + ((-0.511883760585+0.328615038854j))*x[2]
            ref[(0, 0, 0)]+=(-0.93801783138+0.892567536691j)*x_ref[2]**o + ((-0.511883760585+0.328615038854j))*x_ref[2]
            arg[(0, 0, 1)]+=(-0.113728894122-0.331731352346j)*x[2]**o + ((-0.442457248594-0.302760220828j))*x[2]
            ref[(0, 0, 1)]+=(-0.113728894122-0.331731352346j)*x_ref[2]**o + ((-0.442457248594-0.302760220828j))*x_ref[2]
            arg[(0, 1, 0)]+=(-0.102149879426-0.274023087501j)*x[2]**o + ((0.499954649038-0.992243060546j))*x[2]
            ref[(0, 1, 0)]+=(-0.102149879426-0.274023087501j)*x_ref[2]**o + ((0.499954649038-0.992243060546j))*x_ref[2]
            arg[(0, 1, 1)]+=(-0.380654664932-0.355383588165j)*x[2]**o + ((-0.438872822286+0.412969085338j))*x[2]
            ref[(0, 1, 1)]+=(-0.380654664932-0.355383588165j)*x_ref[2]**o + ((-0.438872822286+0.412969085338j))*x_ref[2]
            arg[(0, 2, 0)]+=(-0.694053252784-0.0589036601985j)*x[2]**o + ((-0.549811505557+0.969214461326j))*x[2]
            ref[(0, 2, 0)]+=(-0.694053252784-0.0589036601985j)*x_ref[2]**o + ((-0.549811505557+0.969214461326j))*x_ref[2]
            arg[(0, 2, 1)]+=(0.993593505265+0.428149062233j)*x[2]**o + ((-0.262689407234+0.239061106684j))*x[2]
            ref[(0, 2, 1)]+=(0.993593505265+0.428149062233j)*x_ref[2]**o + ((-0.262689407234+0.239061106684j))*x_ref[2]
            arg[(1, 0, 0)]+=(0.652390145008-0.0339980824722j)*x[2]**o + ((0.634593723304-0.5662110145j))*x[2]
            ref[(1, 0, 0)]+=(0.652390145008-0.0339980824722j)*x_ref[2]**o + ((0.634593723304-0.5662110145j))*x_ref[2]
            arg[(1, 0, 1)]+=(0.856207148415-0.0932388207843j)*x[2]**o + ((-0.379661536882-0.296397691038j))*x[2]
            ref[(1, 0, 1)]+=(0.856207148415-0.0932388207843j)*x_ref[2]**o + ((-0.379661536882-0.296397691038j))*x_ref[2]
            arg[(1, 1, 0)]+=(-0.278855274022-0.526320292825j)*x[2]**o + ((0.263896615912-0.615492993474j))*x[2]
            ref[(1, 1, 0)]+=(-0.278855274022-0.526320292825j)*x_ref[2]**o + ((0.263896615912-0.615492993474j))*x_ref[2]
            arg[(1, 1, 1)]+=(0.128945101623-0.725964287494j)*x[2]**o + ((0.680788276406+0.483091666668j))*x[2]
            ref[(1, 1, 1)]+=(0.128945101623-0.725964287494j)*x_ref[2]**o + ((0.680788276406+0.483091666668j))*x_ref[2]
            arg[(1, 2, 0)]+=(-0.919845193605-0.527979638256j)*x[2]**o + ((0.827952049195-0.605682936176j))*x[2]
            ref[(1, 2, 0)]+=(-0.919845193605-0.527979638256j)*x_ref[2]**o + ((0.827952049195-0.605682936176j))*x_ref[2]
            arg[(1, 2, 1)]+=(-0.853683173688-0.166001677714j)*x[2]**o + ((0.484673090781+0.139948406871j))*x[2]
            ref[(1, 2, 1)]+=(-0.853683173688-0.166001677714j)*x_ref[2]**o + ((0.484673090781+0.139948406871j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 2, 2),w)
        ref = Data(0,(4, 4, 2, 2),w_ref)
        arg[(0, 0, 0, 0)]=(0.00185063053711-0.832609170609j)*x[0]**o + ((-0.348911362742+0.185106023184j))*x[0] + ((0.879755569088-0.201834289677j))*x[1]**o + ((-0.851499293491-0.0256476604865j))*x[1]
        ref[(0, 0, 0, 0)]=(0.00185063053711-0.832609170609j)*x_ref[0]**o + ((-0.348911362742+0.185106023184j))*x_ref[0] + ((0.879755569088-0.201834289677j))*x_ref[1]**o + ((-0.851499293491-0.0256476604865j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.359298401449+0.395324782189j)*x[0]**o + ((-0.85210729836-0.99566280408j))*x[0] + ((0.47159873441-0.231699928144j))*x[1]**o + ((0.0536599927788+0.732241410932j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.359298401449+0.395324782189j)*x_ref[0]**o + ((-0.85210729836-0.99566280408j))*x_ref[0] + ((0.47159873441-0.231699928144j))*x_ref[1]**o + ((0.0536599927788+0.732241410932j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.712911336554-0.883454420956j)*x[0]**o + ((0.867796804053-0.736825782156j))*x[0] + ((0.981751050822-0.0427747307615j))*x[1]**o + ((0.941634257157+0.60954884704j))*x[1]
        ref[(0, 0, 1, 0)]=(0.712911336554-0.883454420956j)*x_ref[0]**o + ((0.867796804053-0.736825782156j))*x_ref[0] + ((0.981751050822-0.0427747307615j))*x_ref[1]**o + ((0.941634257157+0.60954884704j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.605966593444-0.270225985672j)*x[0]**o + ((-0.108168152929-0.465585115218j))*x[0] + ((0.735907309965+0.899871393213j))*x[1]**o + ((-0.182172054432+0.550627136347j))*x[1]
        ref[(0, 0, 1, 1)]=(0.605966593444-0.270225985672j)*x_ref[0]**o + ((-0.108168152929-0.465585115218j))*x_ref[0] + ((0.735907309965+0.899871393213j))*x_ref[1]**o + ((-0.182172054432+0.550627136347j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.697765468061-0.66682810381j)*x[0]**o + ((0.42483443286+0.942116041248j))*x[0] + ((0.938695344317-0.959568178716j))*x[1]**o + ((-0.498108833574+0.0803327653949j))*x[1]
        ref[(0, 1, 0, 0)]=(0.697765468061-0.66682810381j)*x_ref[0]**o + ((0.42483443286+0.942116041248j))*x_ref[0] + ((0.938695344317-0.959568178716j))*x_ref[1]**o + ((-0.498108833574+0.0803327653949j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.585372899208-0.784769163269j)*x[0]**o + ((-0.615610615299+0.310220706542j))*x[0] + ((0.197183142682+0.713263019761j))*x[1]**o + ((0.982019826852-0.411385470165j))*x[1]
        ref[(0, 1, 0, 1)]=(0.585372899208-0.784769163269j)*x_ref[0]**o + ((-0.615610615299+0.310220706542j))*x_ref[0] + ((0.197183142682+0.713263019761j))*x_ref[1]**o + ((0.982019826852-0.411385470165j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.476886948736+0.579396374089j)*x[0]**o + ((-0.260188092307-0.116549401263j))*x[0] + ((-0.939606475585-0.581701199736j))*x[1]**o + ((0.205244249896-0.662705956278j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.476886948736+0.579396374089j)*x_ref[0]**o + ((-0.260188092307-0.116549401263j))*x_ref[0] + ((-0.939606475585-0.581701199736j))*x_ref[1]**o + ((0.205244249896-0.662705956278j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.194347779265+0.370141486038j)*x[0]**o + ((0.396109559427+0.850445442037j))*x[0] + ((-0.585803283733-0.639959344754j))*x[1]**o + ((-0.250033657322-0.915037418659j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.194347779265+0.370141486038j)*x_ref[0]**o + ((0.396109559427+0.850445442037j))*x_ref[0] + ((-0.585803283733-0.639959344754j))*x_ref[1]**o + ((-0.250033657322-0.915037418659j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.654744178329-0.568227201984j)*x[0]**o + ((-0.158855390242+0.668873064622j))*x[0] + ((-0.121478570373+0.385106370277j))*x[1]**o + ((0.0725520424247+0.287202441784j))*x[1]
        ref[(0, 2, 0, 0)]=(0.654744178329-0.568227201984j)*x_ref[0]**o + ((-0.158855390242+0.668873064622j))*x_ref[0] + ((-0.121478570373+0.385106370277j))*x_ref[1]**o + ((0.0725520424247+0.287202441784j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(-0.128882289908+0.273019202827j)*x[0]**o + ((-0.470682630788+0.980974530204j))*x[0] + ((0.953849991499-0.89004323823j))*x[1]**o + ((-0.309174187971-0.010490023739j))*x[1]
        ref[(0, 2, 0, 1)]=(-0.128882289908+0.273019202827j)*x_ref[0]**o + ((-0.470682630788+0.980974530204j))*x_ref[0] + ((0.953849991499-0.89004323823j))*x_ref[1]**o + ((-0.309174187971-0.010490023739j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(0.0708548612044-0.930076240518j)*x[0]**o + ((-0.016798048419-0.3259495599j))*x[0] + ((0.489637942001-0.616457009996j))*x[1]**o + ((-0.464471003779-0.256470297442j))*x[1]
        ref[(0, 2, 1, 0)]=(0.0708548612044-0.930076240518j)*x_ref[0]**o + ((-0.016798048419-0.3259495599j))*x_ref[0] + ((0.489637942001-0.616457009996j))*x_ref[1]**o + ((-0.464471003779-0.256470297442j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(0.975621683827+0.15411870229j)*x[0]**o + ((-0.228554284023-0.996417963113j))*x[0] + ((-0.997734984422-0.928185658777j))*x[1]**o + ((0.536953195916-0.504723828227j))*x[1]
        ref[(0, 2, 1, 1)]=(0.975621683827+0.15411870229j)*x_ref[0]**o + ((-0.228554284023-0.996417963113j))*x_ref[0] + ((-0.997734984422-0.928185658777j))*x_ref[1]**o + ((0.536953195916-0.504723828227j))*x_ref[1]
        arg[(0, 3, 0, 0)]=(0.858969186488+0.846996444938j)*x[0]**o + ((0.644584901966-0.834037705649j))*x[0] + ((0.275065866537+0.0435861136824j))*x[1]**o + ((-0.239932679785+0.430528133184j))*x[1]
        ref[(0, 3, 0, 0)]=(0.858969186488+0.846996444938j)*x_ref[0]**o + ((0.644584901966-0.834037705649j))*x_ref[0] + ((0.275065866537+0.0435861136824j))*x_ref[1]**o + ((-0.239932679785+0.430528133184j))*x_ref[1]
        arg[(0, 3, 0, 1)]=(0.472291716346-0.841475818592j)*x[0]**o + ((0.173697234902+0.873060467947j))*x[0] + ((0.286203522162-0.980120367686j))*x[1]**o + ((0.0781734804691+0.893254328695j))*x[1]
        ref[(0, 3, 0, 1)]=(0.472291716346-0.841475818592j)*x_ref[0]**o + ((0.173697234902+0.873060467947j))*x_ref[0] + ((0.286203522162-0.980120367686j))*x_ref[1]**o + ((0.0781734804691+0.893254328695j))*x_ref[1]
        arg[(0, 3, 1, 0)]=(0.704204041097+0.918827500429j)*x[0]**o + ((-0.838447400072-0.505849020508j))*x[0] + ((0.12612241801-0.489356391872j))*x[1]**o + ((-0.909291193564-0.819400238075j))*x[1]
        ref[(0, 3, 1, 0)]=(0.704204041097+0.918827500429j)*x_ref[0]**o + ((-0.838447400072-0.505849020508j))*x_ref[0] + ((0.12612241801-0.489356391872j))*x_ref[1]**o + ((-0.909291193564-0.819400238075j))*x_ref[1]
        arg[(0, 3, 1, 1)]=(-0.397171526747-0.492184567715j)*x[0]**o + ((-0.81279521218-0.967579199252j))*x[0] + ((-0.434971838047-0.37965008445j))*x[1]**o + ((0.695493016649-0.346713826741j))*x[1]
        ref[(0, 3, 1, 1)]=(-0.397171526747-0.492184567715j)*x_ref[0]**o + ((-0.81279521218-0.967579199252j))*x_ref[0] + ((-0.434971838047-0.37965008445j))*x_ref[1]**o + ((0.695493016649-0.346713826741j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.538781006886-0.481394470955j)*x[0]**o + ((-0.616197556985+0.185110351683j))*x[0] + ((-0.909306898193+0.918732667269j))*x[1]**o + ((-0.552851210176+0.686763948189j))*x[1]
        ref[(1, 0, 0, 0)]=(0.538781006886-0.481394470955j)*x_ref[0]**o + ((-0.616197556985+0.185110351683j))*x_ref[0] + ((-0.909306898193+0.918732667269j))*x_ref[1]**o + ((-0.552851210176+0.686763948189j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.572954767203+0.256127661379j)*x[0]**o + ((0.268425231983-0.96286054238j))*x[0] + ((-0.772335365059-0.926475706746j))*x[1]**o + ((0.419741528007+0.702168063106j))*x[1]
        ref[(1, 0, 0, 1)]=(0.572954767203+0.256127661379j)*x_ref[0]**o + ((0.268425231983-0.96286054238j))*x_ref[0] + ((-0.772335365059-0.926475706746j))*x_ref[1]**o + ((0.419741528007+0.702168063106j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(0.193518779984-0.592018676862j)*x[0]**o + ((0.337710741215-0.547829043062j))*x[0] + ((0.00632632044666+0.625492811968j))*x[1]**o + ((-0.0378519719511+0.00994723992071j))*x[1]
        ref[(1, 0, 1, 0)]=(0.193518779984-0.592018676862j)*x_ref[0]**o + ((0.337710741215-0.547829043062j))*x_ref[0] + ((0.00632632044666+0.625492811968j))*x_ref[1]**o + ((-0.0378519719511+0.00994723992071j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.121686242566-0.40596202106j)*x[0]**o + ((0.239546035309-0.163982920222j))*x[0] + ((-0.172376708792+0.94486595109j))*x[1]**o + ((0.118897963295+0.595610785635j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.121686242566-0.40596202106j)*x_ref[0]**o + ((0.239546035309-0.163982920222j))*x_ref[0] + ((-0.172376708792+0.94486595109j))*x_ref[1]**o + ((0.118897963295+0.595610785635j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.146185905784-0.469438857349j)*x[0]**o + ((-0.512801312825-0.734611837139j))*x[0] + ((0.283169414895-0.98497526882j))*x[1]**o + ((-0.835449921103+0.878980363928j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.146185905784-0.469438857349j)*x_ref[0]**o + ((-0.512801312825-0.734611837139j))*x_ref[0] + ((0.283169414895-0.98497526882j))*x_ref[1]**o + ((-0.835449921103+0.878980363928j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(0.484867357711-0.657866165561j)*x[0]**o + ((-0.353130082339-0.825555780793j))*x[0] + ((0.0427838688806+0.956319740248j))*x[1]**o + ((-0.0435101965843-0.667617154457j))*x[1]
        ref[(1, 1, 0, 1)]=(0.484867357711-0.657866165561j)*x_ref[0]**o + ((-0.353130082339-0.825555780793j))*x_ref[0] + ((0.0427838688806+0.956319740248j))*x_ref[1]**o + ((-0.0435101965843-0.667617154457j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.696064619702+0.0492563549254j)*x[0]**o + ((0.895033499531-0.50909131991j))*x[0] + ((-0.901926007138+0.316830462491j))*x[1]**o + ((0.27579529907+0.69453471685j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.696064619702+0.0492563549254j)*x_ref[0]**o + ((0.895033499531-0.50909131991j))*x_ref[0] + ((-0.901926007138+0.316830462491j))*x_ref[1]**o + ((0.27579529907+0.69453471685j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.125644995134+0.113665138655j)*x[0]**o + ((0.402513272751-0.542881703914j))*x[0] + ((-0.841412317332-0.26039193768j))*x[1]**o + ((0.298145762916-0.566202654928j))*x[1]
        ref[(1, 1, 1, 1)]=(0.125644995134+0.113665138655j)*x_ref[0]**o + ((0.402513272751-0.542881703914j))*x_ref[0] + ((-0.841412317332-0.26039193768j))*x_ref[1]**o + ((0.298145762916-0.566202654928j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(-0.625157065531-0.804492973676j)*x[0]**o + ((0.0995104670296+0.405313044954j))*x[0] + ((-0.0094609120024+0.154517904922j))*x[1]**o + ((-0.149043819103-0.0680073878128j))*x[1]
        ref[(1, 2, 0, 0)]=(-0.625157065531-0.804492973676j)*x_ref[0]**o + ((0.0995104670296+0.405313044954j))*x_ref[0] + ((-0.0094609120024+0.154517904922j))*x_ref[1]**o + ((-0.149043819103-0.0680073878128j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(0.960848871881-0.652109447815j)*x[0]**o + ((-0.895153606224-0.934637864554j))*x[0] + ((0.945618307242-0.224808783672j))*x[1]**o + ((-0.194267755438-0.411816812241j))*x[1]
        ref[(1, 2, 0, 1)]=(0.960848871881-0.652109447815j)*x_ref[0]**o + ((-0.895153606224-0.934637864554j))*x_ref[0] + ((0.945618307242-0.224808783672j))*x_ref[1]**o + ((-0.194267755438-0.411816812241j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(-0.87811949103+0.23186819942j)*x[0]**o + ((-0.38270524936+0.269240370916j))*x[0] + ((-0.655135617234-0.779164218274j))*x[1]**o + ((0.457019178371-0.711348836572j))*x[1]
        ref[(1, 2, 1, 0)]=(-0.87811949103+0.23186819942j)*x_ref[0]**o + ((-0.38270524936+0.269240370916j))*x_ref[0] + ((-0.655135617234-0.779164218274j))*x_ref[1]**o + ((0.457019178371-0.711348836572j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(-0.841226631773-0.601245668037j)*x[0]**o + ((-0.201714905818-0.435455852354j))*x[0] + ((0.734272617528+0.00221165719818j))*x[1]**o + ((0.896745896053-0.738291880761j))*x[1]
        ref[(1, 2, 1, 1)]=(-0.841226631773-0.601245668037j)*x_ref[0]**o + ((-0.201714905818-0.435455852354j))*x_ref[0] + ((0.734272617528+0.00221165719818j))*x_ref[1]**o + ((0.896745896053-0.738291880761j))*x_ref[1]
        arg[(1, 3, 0, 0)]=(-0.110223445955+0.45826483739j)*x[0]**o + ((0.278576231856+0.550722979988j))*x[0] + ((-0.930214347063-0.579198302378j))*x[1]**o + ((0.665868774857-0.268297256452j))*x[1]
        ref[(1, 3, 0, 0)]=(-0.110223445955+0.45826483739j)*x_ref[0]**o + ((0.278576231856+0.550722979988j))*x_ref[0] + ((-0.930214347063-0.579198302378j))*x_ref[1]**o + ((0.665868774857-0.268297256452j))*x_ref[1]
        arg[(1, 3, 0, 1)]=(-0.60649701453+0.72588214242j)*x[0]**o + ((-0.794062622364-0.544632618465j))*x[0] + ((0.532459063416-0.568809234357j))*x[1]**o + ((-0.415773379143-0.552975723077j))*x[1]
        ref[(1, 3, 0, 1)]=(-0.60649701453+0.72588214242j)*x_ref[0]**o + ((-0.794062622364-0.544632618465j))*x_ref[0] + ((0.532459063416-0.568809234357j))*x_ref[1]**o + ((-0.415773379143-0.552975723077j))*x_ref[1]
        arg[(1, 3, 1, 0)]=(-0.346928060114-0.774572276154j)*x[0]**o + ((0.958887781035-0.585814207795j))*x[0] + ((0.484568129448+0.998354909753j))*x[1]**o + ((0.178660070412+0.191975875967j))*x[1]
        ref[(1, 3, 1, 0)]=(-0.346928060114-0.774572276154j)*x_ref[0]**o + ((0.958887781035-0.585814207795j))*x_ref[0] + ((0.484568129448+0.998354909753j))*x_ref[1]**o + ((0.178660070412+0.191975875967j))*x_ref[1]
        arg[(1, 3, 1, 1)]=(-0.586910092993+0.585203328369j)*x[0]**o + ((-0.853408729028-0.149249305178j))*x[0] + ((-0.319923875055-0.302145912202j))*x[1]**o + ((-0.976516065423+0.0939875316463j))*x[1]
        ref[(1, 3, 1, 1)]=(-0.586910092993+0.585203328369j)*x_ref[0]**o + ((-0.853408729028-0.149249305178j))*x_ref[0] + ((-0.319923875055-0.302145912202j))*x_ref[1]**o + ((-0.976516065423+0.0939875316463j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.117847607597+0.272722665141j)*x[0]**o + ((-0.191244677186+0.20532285043j))*x[0] + ((-0.110150438726+0.137715064126j))*x[1]**o + ((-0.973080876452+0.461490242302j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.117847607597+0.272722665141j)*x_ref[0]**o + ((-0.191244677186+0.20532285043j))*x_ref[0] + ((-0.110150438726+0.137715064126j))*x_ref[1]**o + ((-0.973080876452+0.461490242302j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(0.845906170133-0.0372995777781j)*x[0]**o + ((-0.797778077405+0.529597388356j))*x[0] + ((-0.108647243125-0.254847494481j))*x[1]**o + ((-0.621973370673+0.263290790174j))*x[1]
        ref[(2, 0, 0, 1)]=(0.845906170133-0.0372995777781j)*x_ref[0]**o + ((-0.797778077405+0.529597388356j))*x_ref[0] + ((-0.108647243125-0.254847494481j))*x_ref[1]**o + ((-0.621973370673+0.263290790174j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(0.815304002652-0.518763625529j)*x[0]**o + ((0.188764340155-0.968806701356j))*x[0] + ((0.147702900221+0.638278462268j))*x[1]**o + ((0.596708314284-0.295491109403j))*x[1]
        ref[(2, 0, 1, 0)]=(0.815304002652-0.518763625529j)*x_ref[0]**o + ((0.188764340155-0.968806701356j))*x_ref[0] + ((0.147702900221+0.638278462268j))*x_ref[1]**o + ((0.596708314284-0.295491109403j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(-0.43709768589-0.765894311743j)*x[0]**o + ((-0.0580397674373+0.13764662722j))*x[0] + ((0.435083821068+0.663886160066j))*x[1]**o + ((-0.779450267763+0.666387783159j))*x[1]
        ref[(2, 0, 1, 1)]=(-0.43709768589-0.765894311743j)*x_ref[0]**o + ((-0.0580397674373+0.13764662722j))*x_ref[0] + ((0.435083821068+0.663886160066j))*x_ref[1]**o + ((-0.779450267763+0.666387783159j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(0.272635085853+0.168396428474j)*x[0]**o + ((0.388353009585-0.301920100644j))*x[0] + ((-0.670297843658-0.530666008101j))*x[1]**o + ((-0.604371578503+0.527265976358j))*x[1]
        ref[(2, 1, 0, 0)]=(0.272635085853+0.168396428474j)*x_ref[0]**o + ((0.388353009585-0.301920100644j))*x_ref[0] + ((-0.670297843658-0.530666008101j))*x_ref[1]**o + ((-0.604371578503+0.527265976358j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.117451692476+0.832648313884j)*x[0]**o + ((-0.771995001809-0.207933576824j))*x[0] + ((-0.669843883877+0.747171372054j))*x[1]**o + ((-0.538498350268+0.818375267975j))*x[1]
        ref[(2, 1, 0, 1)]=(0.117451692476+0.832648313884j)*x_ref[0]**o + ((-0.771995001809-0.207933576824j))*x_ref[0] + ((-0.669843883877+0.747171372054j))*x_ref[1]**o + ((-0.538498350268+0.818375267975j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(0.529799744774-0.807870402141j)*x[0]**o + ((-0.900239853312-0.895672256458j))*x[0] + ((-0.642400153414-0.242996009937j))*x[1]**o + ((-0.926912483876-0.230037858153j))*x[1]
        ref[(2, 1, 1, 0)]=(0.529799744774-0.807870402141j)*x_ref[0]**o + ((-0.900239853312-0.895672256458j))*x_ref[0] + ((-0.642400153414-0.242996009937j))*x_ref[1]**o + ((-0.926912483876-0.230037858153j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(-0.902612127703-0.804861543422j)*x[0]**o + ((-0.0899392565403-0.474466483608j))*x[0] + ((0.798930078045+0.405396754527j))*x[1]**o + ((0.175932433063-0.485233117474j))*x[1]
        ref[(2, 1, 1, 1)]=(-0.902612127703-0.804861543422j)*x_ref[0]**o + ((-0.0899392565403-0.474466483608j))*x_ref[0] + ((0.798930078045+0.405396754527j))*x_ref[1]**o + ((0.175932433063-0.485233117474j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(0.56295482665+0.834602682981j)*x[0]**o + ((-0.867186859471-0.00264455235387j))*x[0] + ((0.583573514234+0.561433709751j))*x[1]**o + ((-0.749001296989+0.37117324279j))*x[1]
        ref[(2, 2, 0, 0)]=(0.56295482665+0.834602682981j)*x_ref[0]**o + ((-0.867186859471-0.00264455235387j))*x_ref[0] + ((0.583573514234+0.561433709751j))*x_ref[1]**o + ((-0.749001296989+0.37117324279j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(-0.18617540925+0.949990683516j)*x[0]**o + ((0.331930271445-0.193770425887j))*x[0] + ((0.600664775779-0.919597664656j))*x[1]**o + ((0.860654866543-0.142926079958j))*x[1]
        ref[(2, 2, 0, 1)]=(-0.18617540925+0.949990683516j)*x_ref[0]**o + ((0.331930271445-0.193770425887j))*x_ref[0] + ((0.600664775779-0.919597664656j))*x_ref[1]**o + ((0.860654866543-0.142926079958j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(0.79814257102-0.0757927990134j)*x[0]**o + ((-0.29790607502-0.684115827101j))*x[0] + ((0.840485390188+0.596161767943j))*x[1]**o + ((0.688983421766-0.129888831451j))*x[1]
        ref[(2, 2, 1, 0)]=(0.79814257102-0.0757927990134j)*x_ref[0]**o + ((-0.29790607502-0.684115827101j))*x_ref[0] + ((0.840485390188+0.596161767943j))*x_ref[1]**o + ((0.688983421766-0.129888831451j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(-0.502935347141-0.207352926369j)*x[0]**o + ((0.899190340345+0.267434700583j))*x[0] + ((0.676785254246-0.43002618782j))*x[1]**o + ((0.388324531502+0.160150729522j))*x[1]
        ref[(2, 2, 1, 1)]=(-0.502935347141-0.207352926369j)*x_ref[0]**o + ((0.899190340345+0.267434700583j))*x_ref[0] + ((0.676785254246-0.43002618782j))*x_ref[1]**o + ((0.388324531502+0.160150729522j))*x_ref[1]
        arg[(2, 3, 0, 0)]=(0.357037220481-0.334361114099j)*x[0]**o + ((0.74063629905-0.579873567757j))*x[0] + ((-0.586272920338-0.925634389511j))*x[1]**o + ((0.686090496282-0.800783830269j))*x[1]
        ref[(2, 3, 0, 0)]=(0.357037220481-0.334361114099j)*x_ref[0]**o + ((0.74063629905-0.579873567757j))*x_ref[0] + ((-0.586272920338-0.925634389511j))*x_ref[1]**o + ((0.686090496282-0.800783830269j))*x_ref[1]
        arg[(2, 3, 0, 1)]=(0.145054218276+0.0329975317894j)*x[0]**o + ((0.829041778588+0.492070078528j))*x[0] + ((-0.73653486942-0.224487040096j))*x[1]**o + ((-0.222592916322-0.0619967856387j))*x[1]
        ref[(2, 3, 0, 1)]=(0.145054218276+0.0329975317894j)*x_ref[0]**o + ((0.829041778588+0.492070078528j))*x_ref[0] + ((-0.73653486942-0.224487040096j))*x_ref[1]**o + ((-0.222592916322-0.0619967856387j))*x_ref[1]
        arg[(2, 3, 1, 0)]=(0.140972799292-0.429605845129j)*x[0]**o + ((0.889664800624-0.350633882677j))*x[0] + ((-0.51667167501+0.0335006021046j))*x[1]**o + ((-0.8227855776-0.0273279310874j))*x[1]
        ref[(2, 3, 1, 0)]=(0.140972799292-0.429605845129j)*x_ref[0]**o + ((0.889664800624-0.350633882677j))*x_ref[0] + ((-0.51667167501+0.0335006021046j))*x_ref[1]**o + ((-0.8227855776-0.0273279310874j))*x_ref[1]
        arg[(2, 3, 1, 1)]=(0.774548257841-0.118733447043j)*x[0]**o + ((0.711870972517-0.851661617785j))*x[0] + ((-0.378295902777-0.198016145582j))*x[1]**o + ((0.338442919613-0.864584729913j))*x[1]
        ref[(2, 3, 1, 1)]=(0.774548257841-0.118733447043j)*x_ref[0]**o + ((0.711870972517-0.851661617785j))*x_ref[0] + ((-0.378295902777-0.198016145582j))*x_ref[1]**o + ((0.338442919613-0.864584729913j))*x_ref[1]
        arg[(3, 0, 0, 0)]=(0.881355795188+0.198807574085j)*x[0]**o + ((-0.944722261131-0.590570235884j))*x[0] + ((0.798298348358-0.839931128034j))*x[1]**o + ((0.0921989847857+0.893486877335j))*x[1]
        ref[(3, 0, 0, 0)]=(0.881355795188+0.198807574085j)*x_ref[0]**o + ((-0.944722261131-0.590570235884j))*x_ref[0] + ((0.798298348358-0.839931128034j))*x_ref[1]**o + ((0.0921989847857+0.893486877335j))*x_ref[1]
        arg[(3, 0, 0, 1)]=(-0.522241789841-0.316852520497j)*x[0]**o + ((0.586338395198-0.0906972572103j))*x[0] + ((0.0549668534675-0.25387992881j))*x[1]**o + ((-0.873375557283+0.660337018635j))*x[1]
        ref[(3, 0, 0, 1)]=(-0.522241789841-0.316852520497j)*x_ref[0]**o + ((0.586338395198-0.0906972572103j))*x_ref[0] + ((0.0549668534675-0.25387992881j))*x_ref[1]**o + ((-0.873375557283+0.660337018635j))*x_ref[1]
        arg[(3, 0, 1, 0)]=(0.12676540114-0.929241739675j)*x[0]**o + ((-0.250121100591+0.0792926713803j))*x[0] + ((-0.819884920024+0.0114296120591j))*x[1]**o + ((-0.47211086065+0.0114406127724j))*x[1]
        ref[(3, 0, 1, 0)]=(0.12676540114-0.929241739675j)*x_ref[0]**o + ((-0.250121100591+0.0792926713803j))*x_ref[0] + ((-0.819884920024+0.0114296120591j))*x_ref[1]**o + ((-0.47211086065+0.0114406127724j))*x_ref[1]
        arg[(3, 0, 1, 1)]=(0.660690315538+0.97500749208j)*x[0]**o + ((0.20225798401+0.928962920043j))*x[0] + ((-0.671582535951-0.276939619218j))*x[1]**o + ((-0.316675287029+0.171285422198j))*x[1]
        ref[(3, 0, 1, 1)]=(0.660690315538+0.97500749208j)*x_ref[0]**o + ((0.20225798401+0.928962920043j))*x_ref[0] + ((-0.671582535951-0.276939619218j))*x_ref[1]**o + ((-0.316675287029+0.171285422198j))*x_ref[1]
        arg[(3, 1, 0, 0)]=(-0.754296962907+0.164682120042j)*x[0]**o + ((0.943880977665+0.208536252253j))*x[0] + ((0.669982205581+0.211468810488j))*x[1]**o + ((0.0422629166396+0.413698615568j))*x[1]
        ref[(3, 1, 0, 0)]=(-0.754296962907+0.164682120042j)*x_ref[0]**o + ((0.943880977665+0.208536252253j))*x_ref[0] + ((0.669982205581+0.211468810488j))*x_ref[1]**o + ((0.0422629166396+0.413698615568j))*x_ref[1]
        arg[(3, 1, 0, 1)]=(0.834226310631+0.876700772416j)*x[0]**o + ((-0.287000370908+0.498915905654j))*x[0] + ((-0.688805301264-0.419504557005j))*x[1]**o + ((0.423939187739-0.291789378756j))*x[1]
        ref[(3, 1, 0, 1)]=(0.834226310631+0.876700772416j)*x_ref[0]**o + ((-0.287000370908+0.498915905654j))*x_ref[0] + ((-0.688805301264-0.419504557005j))*x_ref[1]**o + ((0.423939187739-0.291789378756j))*x_ref[1]
        arg[(3, 1, 1, 0)]=(0.157541785118-0.377114947392j)*x[0]**o + ((-0.954761420013+0.50339152956j))*x[0] + ((-0.590921123232+0.580312318596j))*x[1]**o + ((-0.337535684554-0.491357017303j))*x[1]
        ref[(3, 1, 1, 0)]=(0.157541785118-0.377114947392j)*x_ref[0]**o + ((-0.954761420013+0.50339152956j))*x_ref[0] + ((-0.590921123232+0.580312318596j))*x_ref[1]**o + ((-0.337535684554-0.491357017303j))*x_ref[1]
        arg[(3, 1, 1, 1)]=(-0.930622291609-0.640368500334j)*x[0]**o + ((-0.933479114666-0.624933723404j))*x[0] + ((-0.427890375448-0.65421422083j))*x[1]**o + ((0.970400924465+0.842178188182j))*x[1]
        ref[(3, 1, 1, 1)]=(-0.930622291609-0.640368500334j)*x_ref[0]**o + ((-0.933479114666-0.624933723404j))*x_ref[0] + ((-0.427890375448-0.65421422083j))*x_ref[1]**o + ((0.970400924465+0.842178188182j))*x_ref[1]
        arg[(3, 2, 0, 0)]=(0.839889386894-0.516769883539j)*x[0]**o + ((-0.893653263652+0.314518245626j))*x[0] + ((0.707908063288-0.277962677889j))*x[1]**o + ((0.465307683881+0.0654899310092j))*x[1]
        ref[(3, 2, 0, 0)]=(0.839889386894-0.516769883539j)*x_ref[0]**o + ((-0.893653263652+0.314518245626j))*x_ref[0] + ((0.707908063288-0.277962677889j))*x_ref[1]**o + ((0.465307683881+0.0654899310092j))*x_ref[1]
        arg[(3, 2, 0, 1)]=(-0.255705888577-0.818658118651j)*x[0]**o + ((0.421838958579-0.678108075333j))*x[0] + ((0.97382488167-0.556919279213j))*x[1]**o + ((0.858003179106-0.36762216473j))*x[1]
        ref[(3, 2, 0, 1)]=(-0.255705888577-0.818658118651j)*x_ref[0]**o + ((0.421838958579-0.678108075333j))*x_ref[0] + ((0.97382488167-0.556919279213j))*x_ref[1]**o + ((0.858003179106-0.36762216473j))*x_ref[1]
        arg[(3, 2, 1, 0)]=(-0.315112854885+0.922140769527j)*x[0]**o + ((0.0373152784217-0.768679106854j))*x[0] + ((-0.492019727594+0.484333191945j))*x[1]**o + ((0.394670092236-0.786144700068j))*x[1]
        ref[(3, 2, 1, 0)]=(-0.315112854885+0.922140769527j)*x_ref[0]**o + ((0.0373152784217-0.768679106854j))*x_ref[0] + ((-0.492019727594+0.484333191945j))*x_ref[1]**o + ((0.394670092236-0.786144700068j))*x_ref[1]
        arg[(3, 2, 1, 1)]=(-0.278603892675+0.0527817823361j)*x[0]**o + ((0.718392389744-0.918825780454j))*x[0] + ((-0.437484188244-0.622226221408j))*x[1]**o + ((0.795757237836-0.358560424852j))*x[1]
        ref[(3, 2, 1, 1)]=(-0.278603892675+0.0527817823361j)*x_ref[0]**o + ((0.718392389744-0.918825780454j))*x_ref[0] + ((-0.437484188244-0.622226221408j))*x_ref[1]**o + ((0.795757237836-0.358560424852j))*x_ref[1]
        arg[(3, 3, 0, 0)]=(0.734828432084+0.855024914679j)*x[0]**o + ((0.343856117475-0.620838917678j))*x[0] + ((0.403667796534+0.259511376431j))*x[1]**o + ((0.177745236643-0.134991685825j))*x[1]
        ref[(3, 3, 0, 0)]=(0.734828432084+0.855024914679j)*x_ref[0]**o + ((0.343856117475-0.620838917678j))*x_ref[0] + ((0.403667796534+0.259511376431j))*x_ref[1]**o + ((0.177745236643-0.134991685825j))*x_ref[1]
        arg[(3, 3, 0, 1)]=(0.681687956882-0.97689364085j)*x[0]**o + ((0.239900246616+0.0464998225779j))*x[0] + ((-0.487271711391-0.0996568745945j))*x[1]**o + ((0.0570193196117+0.593664980868j))*x[1]
        ref[(3, 3, 0, 1)]=(0.681687956882-0.97689364085j)*x_ref[0]**o + ((0.239900246616+0.0464998225779j))*x_ref[0] + ((-0.487271711391-0.0996568745945j))*x_ref[1]**o + ((0.0570193196117+0.593664980868j))*x_ref[1]
        arg[(3, 3, 1, 0)]=(-0.125193944516+0.180327359376j)*x[0]**o + ((0.270728025478-0.244978740375j))*x[0] + ((0.922093528604-0.768564641518j))*x[1]**o + ((-0.971405681538-0.549468369457j))*x[1]
        ref[(3, 3, 1, 0)]=(-0.125193944516+0.180327359376j)*x_ref[0]**o + ((0.270728025478-0.244978740375j))*x_ref[0] + ((0.922093528604-0.768564641518j))*x_ref[1]**o + ((-0.971405681538-0.549468369457j))*x_ref[1]
        arg[(3, 3, 1, 1)]=(0.137362843233+0.648424730246j)*x[0]**o + ((0.140025229422+0.027526081199j))*x[0] + ((0.436266674801+0.624772846194j))*x[1]**o + ((0.125879263584-0.70218934543j))*x[1]
        ref[(3, 3, 1, 1)]=(0.137362843233+0.648424730246j)*x_ref[0]**o + ((0.140025229422+0.027526081199j))*x_ref[0] + ((0.436266674801+0.624772846194j))*x_ref[1]**o + ((0.125879263584-0.70218934543j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.172303944845+0.447026658811j)*x[2]**o + ((0.384227545793-0.260521494773j))*x[2]
            ref[(0, 0, 0, 0)]+=(-0.172303944845+0.447026658811j)*x_ref[2]**o + ((0.384227545793-0.260521494773j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.0088766678613+0.0238779661811j)*x[2]**o + ((-0.331411472505+0.433703674756j))*x[2]
            ref[(0, 0, 0, 1)]+=(-0.0088766678613+0.0238779661811j)*x_ref[2]**o + ((-0.331411472505+0.433703674756j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.987538638077+0.498737086032j)*x[2]**o + ((-0.231733613084-0.996542496108j))*x[2]
            ref[(0, 0, 1, 0)]+=(0.987538638077+0.498737086032j)*x_ref[2]**o + ((-0.231733613084-0.996542496108j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.230087824513+0.903419298194j)*x[2]**o + ((-0.719602509165-0.330789663866j))*x[2]
            ref[(0, 0, 1, 1)]+=(0.230087824513+0.903419298194j)*x_ref[2]**o + ((-0.719602509165-0.330789663866j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.0907335722384+0.885840498243j)*x[2]**o + ((0.200544786618+0.0351370230559j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.0907335722384+0.885840498243j)*x_ref[2]**o + ((0.200544786618+0.0351370230559j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.506705126963-0.507645761358j)*x[2]**o + ((-0.612036999336+0.447579316561j))*x[2]
            ref[(0, 1, 0, 1)]+=(-0.506705126963-0.507645761358j)*x_ref[2]**o + ((-0.612036999336+0.447579316561j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.480971985911-0.910645632956j)*x[2]**o + ((0.670100490067-0.416846490472j))*x[2]
            ref[(0, 1, 1, 0)]+=(0.480971985911-0.910645632956j)*x_ref[2]**o + ((0.670100490067-0.416846490472j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.613689310729-0.75989792698j)*x[2]**o + ((-0.399128932429+0.703381399903j))*x[2]
            ref[(0, 1, 1, 1)]+=(-0.613689310729-0.75989792698j)*x_ref[2]**o + ((-0.399128932429+0.703381399903j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(0.548911663488-0.367070010538j)*x[2]**o + ((0.016751576663+0.00134240084481j))*x[2]
            ref[(0, 2, 0, 0)]+=(0.548911663488-0.367070010538j)*x_ref[2]**o + ((0.016751576663+0.00134240084481j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(0.20407669593-0.760813870207j)*x[2]**o + ((-0.0147087470519+0.799615725455j))*x[2]
            ref[(0, 2, 0, 1)]+=(0.20407669593-0.760813870207j)*x_ref[2]**o + ((-0.0147087470519+0.799615725455j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.827702879238-0.570852994419j)*x[2]**o + ((-0.304242728219+0.268304571242j))*x[2]
            ref[(0, 2, 1, 0)]+=(-0.827702879238-0.570852994419j)*x_ref[2]**o + ((-0.304242728219+0.268304571242j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(0.520183238194+0.171491877232j)*x[2]**o + ((-0.626325608233+0.677018870399j))*x[2]
            ref[(0, 2, 1, 1)]+=(0.520183238194+0.171491877232j)*x_ref[2]**o + ((-0.626325608233+0.677018870399j))*x_ref[2]
            arg[(0, 3, 0, 0)]+=(0.907910641978-0.649646882645j)*x[2]**o + ((-0.412026548295+0.788539898873j))*x[2]
            ref[(0, 3, 0, 0)]+=(0.907910641978-0.649646882645j)*x_ref[2]**o + ((-0.412026548295+0.788539898873j))*x_ref[2]
            arg[(0, 3, 0, 1)]+=(0.230294097459+0.487530983139j)*x[2]**o + ((-0.822743364456+0.954557231428j))*x[2]
            ref[(0, 3, 0, 1)]+=(0.230294097459+0.487530983139j)*x_ref[2]**o + ((-0.822743364456+0.954557231428j))*x_ref[2]
            arg[(0, 3, 1, 0)]+=(-0.786704813874-0.265037798498j)*x[2]**o + ((-0.897068459059+0.717672477807j))*x[2]
            ref[(0, 3, 1, 0)]+=(-0.786704813874-0.265037798498j)*x_ref[2]**o + ((-0.897068459059+0.717672477807j))*x_ref[2]
            arg[(0, 3, 1, 1)]+=(-0.323185262844+0.22164199439j)*x[2]**o + ((0.165180118926-0.322331223457j))*x[2]
            ref[(0, 3, 1, 1)]+=(-0.323185262844+0.22164199439j)*x_ref[2]**o + ((0.165180118926-0.322331223457j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.915282369935+0.759670552828j)*x[2]**o + ((-0.609398899899-0.778140319441j))*x[2]
            ref[(1, 0, 0, 0)]+=(0.915282369935+0.759670552828j)*x_ref[2]**o + ((-0.609398899899-0.778140319441j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(-0.801641805446-0.737223384807j)*x[2]**o + ((-0.34629905919+0.672616071096j))*x[2]
            ref[(1, 0, 0, 1)]+=(-0.801641805446-0.737223384807j)*x_ref[2]**o + ((-0.34629905919+0.672616071096j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.375702309553+0.948517438141j)*x[2]**o + ((0.0288419157733-0.845236674857j))*x[2]
            ref[(1, 0, 1, 0)]+=(-0.375702309553+0.948517438141j)*x_ref[2]**o + ((0.0288419157733-0.845236674857j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.543438145617+0.0850668768159j)*x[2]**o + ((0.630851585156-0.809702764112j))*x[2]
            ref[(1, 0, 1, 1)]+=(0.543438145617+0.0850668768159j)*x_ref[2]**o + ((0.630851585156-0.809702764112j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.594820310291-0.941052834702j)*x[2]**o + ((-0.0166141361831-0.258141165978j))*x[2]
            ref[(1, 1, 0, 0)]+=(0.594820310291-0.941052834702j)*x_ref[2]**o + ((-0.0166141361831-0.258141165978j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.0855231201938+0.00603785882842j)*x[2]**o + ((0.387698306711-0.486665079189j))*x[2]
            ref[(1, 1, 0, 1)]+=(-0.0855231201938+0.00603785882842j)*x_ref[2]**o + ((0.387698306711-0.486665079189j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(-0.460954726566-0.913516006056j)*x[2]**o + ((-0.590890930217-0.42410110204j))*x[2]
            ref[(1, 1, 1, 0)]+=(-0.460954726566-0.913516006056j)*x_ref[2]**o + ((-0.590890930217-0.42410110204j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.50443416575+0.293604953395j)*x[2]**o + ((-0.288531415586-0.441284608018j))*x[2]
            ref[(1, 1, 1, 1)]+=(0.50443416575+0.293604953395j)*x_ref[2]**o + ((-0.288531415586-0.441284608018j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(-0.123060124324-0.0402253226713j)*x[2]**o + ((0.653468274861+0.313908372922j))*x[2]
            ref[(1, 2, 0, 0)]+=(-0.123060124324-0.0402253226713j)*x_ref[2]**o + ((0.653468274861+0.313908372922j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(0.0722691102112-0.602200129581j)*x[2]**o + ((0.705489007456-0.346431665734j))*x[2]
            ref[(1, 2, 0, 1)]+=(0.0722691102112-0.602200129581j)*x_ref[2]**o + ((0.705489007456-0.346431665734j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(-0.92331961505+0.508202491108j)*x[2]**o + ((0.0435316118154+0.858190472301j))*x[2]
            ref[(1, 2, 1, 0)]+=(-0.92331961505+0.508202491108j)*x_ref[2]**o + ((0.0435316118154+0.858190472301j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(0.867403821494-0.894075246911j)*x[2]**o + ((-0.843181271426-0.585932385186j))*x[2]
            ref[(1, 2, 1, 1)]+=(0.867403821494-0.894075246911j)*x_ref[2]**o + ((-0.843181271426-0.585932385186j))*x_ref[2]
            arg[(1, 3, 0, 0)]+=(0.275214712132+0.232726716553j)*x[2]**o + ((-0.149673574578+0.023887214875j))*x[2]
            ref[(1, 3, 0, 0)]+=(0.275214712132+0.232726716553j)*x_ref[2]**o + ((-0.149673574578+0.023887214875j))*x_ref[2]
            arg[(1, 3, 0, 1)]+=(-0.984089814715+0.56793203675j)*x[2]**o + ((0.239112840293-0.825081129289j))*x[2]
            ref[(1, 3, 0, 1)]+=(-0.984089814715+0.56793203675j)*x_ref[2]**o + ((0.239112840293-0.825081129289j))*x_ref[2]
            arg[(1, 3, 1, 0)]+=(0.282243072258-0.124319334958j)*x[2]**o + ((0.485381687804+0.347323545102j))*x[2]
            ref[(1, 3, 1, 0)]+=(0.282243072258-0.124319334958j)*x_ref[2]**o + ((0.485381687804+0.347323545102j))*x_ref[2]
            arg[(1, 3, 1, 1)]+=(0.403807564274-0.642107958983j)*x[2]**o + ((-0.481143031834+0.376619821545j))*x[2]
            ref[(1, 3, 1, 1)]+=(0.403807564274-0.642107958983j)*x_ref[2]**o + ((-0.481143031834+0.376619821545j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(-0.00168380246065+0.643849078888j)*x[2]**o + ((-0.396974701432+0.151193621301j))*x[2]
            ref[(2, 0, 0, 0)]+=(-0.00168380246065+0.643849078888j)*x_ref[2]**o + ((-0.396974701432+0.151193621301j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(-0.363879992789+0.994240393948j)*x[2]**o + ((0.257824860961-0.782424079272j))*x[2]
            ref[(2, 0, 0, 1)]+=(-0.363879992789+0.994240393948j)*x_ref[2]**o + ((0.257824860961-0.782424079272j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(-0.12912550917+0.811071386026j)*x[2]**o + ((0.290618842593+0.962080076786j))*x[2]
            ref[(2, 0, 1, 0)]+=(-0.12912550917+0.811071386026j)*x_ref[2]**o + ((0.290618842593+0.962080076786j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(0.637878588888+0.00815940179507j)*x[2]**o + ((-0.527704185254-0.401306790603j))*x[2]
            ref[(2, 0, 1, 1)]+=(0.637878588888+0.00815940179507j)*x_ref[2]**o + ((-0.527704185254-0.401306790603j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(0.520625312014-0.944809462145j)*x[2]**o + ((-0.432672088366+0.258722763996j))*x[2]
            ref[(2, 1, 0, 0)]+=(0.520625312014-0.944809462145j)*x_ref[2]**o + ((-0.432672088366+0.258722763996j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(-0.193121402939+0.477278727175j)*x[2]**o + ((0.482008640488-0.139489341146j))*x[2]
            ref[(2, 1, 0, 1)]+=(-0.193121402939+0.477278727175j)*x_ref[2]**o + ((0.482008640488-0.139489341146j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(0.127512144189+0.564483030357j)*x[2]**o + ((0.704942832164-0.0644583071418j))*x[2]
            ref[(2, 1, 1, 0)]+=(0.127512144189+0.564483030357j)*x_ref[2]**o + ((0.704942832164-0.0644583071418j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(0.986598763402-0.843592708757j)*x[2]**o + ((-0.201865946165+0.1102175514j))*x[2]
            ref[(2, 1, 1, 1)]+=(0.986598763402-0.843592708757j)*x_ref[2]**o + ((-0.201865946165+0.1102175514j))*x_ref[2]
            arg[(2, 2, 0, 0)]+=(-0.847126211862+0.244636935637j)*x[2]**o + ((-0.92679667162+0.674331915882j))*x[2]
            ref[(2, 2, 0, 0)]+=(-0.847126211862+0.244636935637j)*x_ref[2]**o + ((-0.92679667162+0.674331915882j))*x_ref[2]
            arg[(2, 2, 0, 1)]+=(0.324498700088-0.644605009218j)*x[2]**o + ((-0.680898475653+0.292537248253j))*x[2]
            ref[(2, 2, 0, 1)]+=(0.324498700088-0.644605009218j)*x_ref[2]**o + ((-0.680898475653+0.292537248253j))*x_ref[2]
            arg[(2, 2, 1, 0)]+=(0.840452682093+0.29023200495j)*x[2]**o + ((-0.0673135216142+0.789547612454j))*x[2]
            ref[(2, 2, 1, 0)]+=(0.840452682093+0.29023200495j)*x_ref[2]**o + ((-0.0673135216142+0.789547612454j))*x_ref[2]
            arg[(2, 2, 1, 1)]+=(0.371686078222+0.603552006515j)*x[2]**o + ((0.558620513535+0.150160828239j))*x[2]
            ref[(2, 2, 1, 1)]+=(0.371686078222+0.603552006515j)*x_ref[2]**o + ((0.558620513535+0.150160828239j))*x_ref[2]
            arg[(2, 3, 0, 0)]+=(-0.607711193956+0.493353640196j)*x[2]**o + ((-0.83604006745-0.687585080996j))*x[2]
            ref[(2, 3, 0, 0)]+=(-0.607711193956+0.493353640196j)*x_ref[2]**o + ((-0.83604006745-0.687585080996j))*x_ref[2]
            arg[(2, 3, 0, 1)]+=(-0.596820901756-0.529385984943j)*x[2]**o + ((0.082193066786+0.877836550271j))*x[2]
            ref[(2, 3, 0, 1)]+=(-0.596820901756-0.529385984943j)*x_ref[2]**o + ((0.082193066786+0.877836550271j))*x_ref[2]
            arg[(2, 3, 1, 0)]+=(-0.0753535489214-0.716397821228j)*x[2]**o + ((-0.238620022168-0.507331222072j))*x[2]
            ref[(2, 3, 1, 0)]+=(-0.0753535489214-0.716397821228j)*x_ref[2]**o + ((-0.238620022168-0.507331222072j))*x_ref[2]
            arg[(2, 3, 1, 1)]+=(-0.748972024976+0.768605484396j)*x[2]**o + ((-0.925163569885-0.742309627826j))*x[2]
            ref[(2, 3, 1, 1)]+=(-0.748972024976+0.768605484396j)*x_ref[2]**o + ((-0.925163569885-0.742309627826j))*x_ref[2]
            arg[(3, 0, 0, 0)]+=(0.516434353414-0.944074918698j)*x[2]**o + ((0.244486353966-0.611313975245j))*x[2]
            ref[(3, 0, 0, 0)]+=(0.516434353414-0.944074918698j)*x_ref[2]**o + ((0.244486353966-0.611313975245j))*x_ref[2]
            arg[(3, 0, 0, 1)]+=(0.123216200743+0.375494835354j)*x[2]**o + ((0.455661290771-0.719144157377j))*x[2]
            ref[(3, 0, 0, 1)]+=(0.123216200743+0.375494835354j)*x_ref[2]**o + ((0.455661290771-0.719144157377j))*x_ref[2]
            arg[(3, 0, 1, 0)]+=(0.906912269465+0.439803171477j)*x[2]**o + ((-0.458556367232+0.212411140737j))*x[2]
            ref[(3, 0, 1, 0)]+=(0.906912269465+0.439803171477j)*x_ref[2]**o + ((-0.458556367232+0.212411140737j))*x_ref[2]
            arg[(3, 0, 1, 1)]+=(-0.270440786213+0.965628166411j)*x[2]**o + ((0.275434725809+0.718980899034j))*x[2]
            ref[(3, 0, 1, 1)]+=(-0.270440786213+0.965628166411j)*x_ref[2]**o + ((0.275434725809+0.718980899034j))*x_ref[2]
            arg[(3, 1, 0, 0)]+=(0.511903938392+0.793162558902j)*x[2]**o + ((-0.114882212075-0.868553545675j))*x[2]
            ref[(3, 1, 0, 0)]+=(0.511903938392+0.793162558902j)*x_ref[2]**o + ((-0.114882212075-0.868553545675j))*x_ref[2]
            arg[(3, 1, 0, 1)]+=(-0.197395139639-0.61647862773j)*x[2]**o + ((0.985789840079+0.267096314463j))*x[2]
            ref[(3, 1, 0, 1)]+=(-0.197395139639-0.61647862773j)*x_ref[2]**o + ((0.985789840079+0.267096314463j))*x_ref[2]
            arg[(3, 1, 1, 0)]+=(0.989048095814-0.141013281501j)*x[2]**o + ((0.473616922216-0.684815928774j))*x[2]
            ref[(3, 1, 1, 0)]+=(0.989048095814-0.141013281501j)*x_ref[2]**o + ((0.473616922216-0.684815928774j))*x_ref[2]
            arg[(3, 1, 1, 1)]+=(-0.622238699852-0.268949077491j)*x[2]**o + ((-0.952261494293+0.632440377193j))*x[2]
            ref[(3, 1, 1, 1)]+=(-0.622238699852-0.268949077491j)*x_ref[2]**o + ((-0.952261494293+0.632440377193j))*x_ref[2]
            arg[(3, 2, 0, 0)]+=(0.326479238702+0.880645296756j)*x[2]**o + ((0.368973918634+0.544074491598j))*x[2]
            ref[(3, 2, 0, 0)]+=(0.326479238702+0.880645296756j)*x_ref[2]**o + ((0.368973918634+0.544074491598j))*x_ref[2]
            arg[(3, 2, 0, 1)]+=(-0.973223526188+0.496890910524j)*x[2]**o + ((-0.43763540946-0.251457339087j))*x[2]
            ref[(3, 2, 0, 1)]+=(-0.973223526188+0.496890910524j)*x_ref[2]**o + ((-0.43763540946-0.251457339087j))*x_ref[2]
            arg[(3, 2, 1, 0)]+=(-0.54015329954+0.669812916352j)*x[2]**o + ((0.685946364288+0.0891606089813j))*x[2]
            ref[(3, 2, 1, 0)]+=(-0.54015329954+0.669812916352j)*x_ref[2]**o + ((0.685946364288+0.0891606089813j))*x_ref[2]
            arg[(3, 2, 1, 1)]+=(-0.0700352839651+0.794673010107j)*x[2]**o + ((-0.440536884277+0.00595695199498j))*x[2]
            ref[(3, 2, 1, 1)]+=(-0.0700352839651+0.794673010107j)*x_ref[2]**o + ((-0.440536884277+0.00595695199498j))*x_ref[2]
            arg[(3, 3, 0, 0)]+=(0.681098960616+0.112515443781j)*x[2]**o + ((-0.139823429545-0.079629051321j))*x[2]
            ref[(3, 3, 0, 0)]+=(0.681098960616+0.112515443781j)*x_ref[2]**o + ((-0.139823429545-0.079629051321j))*x_ref[2]
            arg[(3, 3, 0, 1)]+=(0.832105876112-0.354186112042j)*x[2]**o + ((0.225973095782-0.544762327998j))*x[2]
            ref[(3, 3, 0, 1)]+=(0.832105876112-0.354186112042j)*x_ref[2]**o + ((0.225973095782-0.544762327998j))*x_ref[2]
            arg[(3, 3, 1, 0)]+=(-0.356206023778+0.109789244047j)*x[2]**o + ((0.968106045169+0.538533218112j))*x[2]
            ref[(3, 3, 1, 0)]+=(-0.356206023778+0.109789244047j)*x_ref[2]**o + ((0.968106045169+0.538533218112j))*x_ref[2]
            arg[(3, 3, 1, 1)]+=(-0.292923583635+0.370576055222j)*x[2]**o + ((0.473938794139+0.544794858013j))*x[2]
            ref[(3, 3, 1, 1)]+=(-0.292923583635+0.370576055222j)*x_ref[2]**o + ((0.473938794139+0.544794858013j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.993183623419+0.0519606499032j)*x[0]**o + ((-0.41129664194-0.364927557742j))*x[0] + ((0.719525339314+0.683482723863j))*x[1]**o + ((-0.826752426762-0.187898483682j))*x[1]
        ref=(-0.993183623419+0.0519606499032j)*x_ref[0]**o + ((-0.41129664194-0.364927557742j))*x_ref[0] + ((0.719525339314+0.683482723863j))*x_ref[1]**o + ((-0.826752426762-0.187898483682j))*x_ref[1]
        if dim==3:
            arg+=((0.203837175531+0.0728129482051j))*x[2]**o + ((-0.734067548172+0.124359291279j))*x[2]
            ref+=((0.203837175531+0.0728129482051j))*x_ref[2]**o + ((-0.734067548172+0.124359291279j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=(0.460119764054+0.696469804544j)*x[0]**o + ((0.178921828815-0.785099538562j))*x[0] + ((0.612749797618+0.362466330587j))*x[1]**o + ((0.589442085377-0.472415979687j))*x[1]
        ref[(0,)]=(0.460119764054+0.696469804544j)*x_ref[0]**o + ((0.178921828815-0.785099538562j))*x_ref[0] + ((0.612749797618+0.362466330587j))*x_ref[1]**o + ((0.589442085377-0.472415979687j))*x_ref[1]
        arg[(1,)]=(0.874312729139-0.368385243797j)*x[0]**o + ((0.319612639199+0.154516053922j))*x[0] + ((0.687738674899-0.18723242888j))*x[1]**o + ((-0.737598187815-0.786129029425j))*x[1]
        ref[(1,)]=(0.874312729139-0.368385243797j)*x_ref[0]**o + ((0.319612639199+0.154516053922j))*x_ref[0] + ((0.687738674899-0.18723242888j))*x_ref[1]**o + ((-0.737598187815-0.786129029425j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.825833405874+0.819728515876j)*x[2]**o + ((0.655798063884+0.56332472889j))*x[2]
            ref[(0,)]+=(-0.825833405874+0.819728515876j)*x_ref[2]**o + ((0.655798063884+0.56332472889j))*x_ref[2]
            arg[(1,)]+=(-0.47399515888-0.96340566722j)*x[2]**o + ((-0.801006165724+0.473542298113j))*x[2]
            ref[(1,)]+=(-0.47399515888-0.96340566722j)*x_ref[2]**o + ((-0.801006165724+0.473542298113j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref = Data(0,(3, 4),w_ref)
        arg[(0, 0)]=(0.651214383148-0.986312711324j)*x[0]**o + ((0.350913157991-0.665517900039j))*x[0] + ((-0.466864089912-0.470147708637j))*x[1]**o + ((0.717647574193+0.738374086673j))*x[1]
        ref[(0, 0)]=(0.651214383148-0.986312711324j)*x_ref[0]**o + ((0.350913157991-0.665517900039j))*x_ref[0] + ((-0.466864089912-0.470147708637j))*x_ref[1]**o + ((0.717647574193+0.738374086673j))*x_ref[1]
        arg[(0, 1)]=(0.480614768022-0.341282794401j)*x[0]**o + ((0.989573857286+0.967220116759j))*x[0] + ((-0.980190844893-0.677152891106j))*x[1]**o + ((-0.903257233976+0.629720985989j))*x[1]
        ref[(0, 1)]=(0.480614768022-0.341282794401j)*x_ref[0]**o + ((0.989573857286+0.967220116759j))*x_ref[0] + ((-0.980190844893-0.677152891106j))*x_ref[1]**o + ((-0.903257233976+0.629720985989j))*x_ref[1]
        arg[(0, 2)]=(0.584003928684+0.669888543177j)*x[0]**o + ((-0.113247711728+0.812674407128j))*x[0] + ((0.619052130106-0.422829299397j))*x[1]**o + ((0.104317696016+0.593447613376j))*x[1]
        ref[(0, 2)]=(0.584003928684+0.669888543177j)*x_ref[0]**o + ((-0.113247711728+0.812674407128j))*x_ref[0] + ((0.619052130106-0.422829299397j))*x_ref[1]**o + ((0.104317696016+0.593447613376j))*x_ref[1]
        arg[(0, 3)]=(-0.787619816939+0.312347018938j)*x[0]**o + ((0.521969910293+0.119188794083j))*x[0] + ((0.707545587351-0.435898076938j))*x[1]**o + ((0.808330653834+0.115983953828j))*x[1]
        ref[(0, 3)]=(-0.787619816939+0.312347018938j)*x_ref[0]**o + ((0.521969910293+0.119188794083j))*x_ref[0] + ((0.707545587351-0.435898076938j))*x_ref[1]**o + ((0.808330653834+0.115983953828j))*x_ref[1]
        arg[(1, 0)]=(0.265402200491+0.867384574361j)*x[0]**o + ((0.825901677831-0.0110616955962j))*x[0] + ((-0.636130181697+0.957581624176j))*x[1]**o + ((0.290131930642+0.566887157657j))*x[1]
        ref[(1, 0)]=(0.265402200491+0.867384574361j)*x_ref[0]**o + ((0.825901677831-0.0110616955962j))*x_ref[0] + ((-0.636130181697+0.957581624176j))*x_ref[1]**o + ((0.290131930642+0.566887157657j))*x_ref[1]
        arg[(1, 1)]=(-0.199783629984-0.716708624537j)*x[0]**o + ((0.104386919211+0.439164711816j))*x[0] + ((0.902887660953+0.386873976321j))*x[1]**o + ((0.38967949571+0.753971387388j))*x[1]
        ref[(1, 1)]=(-0.199783629984-0.716708624537j)*x_ref[0]**o + ((0.104386919211+0.439164711816j))*x_ref[0] + ((0.902887660953+0.386873976321j))*x_ref[1]**o + ((0.38967949571+0.753971387388j))*x_ref[1]
        arg[(1, 2)]=(-0.14994581252+0.380227836262j)*x[0]**o + ((0.194258990801-0.771396501081j))*x[0] + ((0.133078230848-0.944991717652j))*x[1]**o + ((-0.646111238502+0.332086036971j))*x[1]
        ref[(1, 2)]=(-0.14994581252+0.380227836262j)*x_ref[0]**o + ((0.194258990801-0.771396501081j))*x_ref[0] + ((0.133078230848-0.944991717652j))*x_ref[1]**o + ((-0.646111238502+0.332086036971j))*x_ref[1]
        arg[(1, 3)]=(0.109338272917-0.93954170978j)*x[0]**o + ((0.618545177323-0.326838992235j))*x[0] + ((-0.0632600104033+0.132580390808j))*x[1]**o + ((0.506668782624+0.827605340937j))*x[1]
        ref[(1, 3)]=(0.109338272917-0.93954170978j)*x_ref[0]**o + ((0.618545177323-0.326838992235j))*x_ref[0] + ((-0.0632600104033+0.132580390808j))*x_ref[1]**o + ((0.506668782624+0.827605340937j))*x_ref[1]
        arg[(2, 0)]=(-0.496361742019+0.770400631228j)*x[0]**o + ((-0.827827924253+0.392300532813j))*x[0] + ((0.317142426356+0.763509468814j))*x[1]**o + ((0.0056254417554+0.907746496037j))*x[1]
        ref[(2, 0)]=(-0.496361742019+0.770400631228j)*x_ref[0]**o + ((-0.827827924253+0.392300532813j))*x_ref[0] + ((0.317142426356+0.763509468814j))*x_ref[1]**o + ((0.0056254417554+0.907746496037j))*x_ref[1]
        arg[(2, 1)]=(0.694474262725+0.135679944093j)*x[0]**o + ((0.979639731911-0.974620349904j))*x[0] + ((-0.976934983806-0.26263164306j))*x[1]**o + ((-0.155755678166+0.894710296273j))*x[1]
        ref[(2, 1)]=(0.694474262725+0.135679944093j)*x_ref[0]**o + ((0.979639731911-0.974620349904j))*x_ref[0] + ((-0.976934983806-0.26263164306j))*x_ref[1]**o + ((-0.155755678166+0.894710296273j))*x_ref[1]
        arg[(2, 2)]=(0.289775107568+0.29763874764j)*x[0]**o + ((0.771651720367-0.176403755823j))*x[0] + ((-0.744954102163-0.171482252023j))*x[1]**o + ((-0.881357416089-0.173256645726j))*x[1]
        ref[(2, 2)]=(0.289775107568+0.29763874764j)*x_ref[0]**o + ((0.771651720367-0.176403755823j))*x_ref[0] + ((-0.744954102163-0.171482252023j))*x_ref[1]**o + ((-0.881357416089-0.173256645726j))*x_ref[1]
        arg[(2, 3)]=(0.30110164526+0.39899644807j)*x[0]**o + ((0.986942511436-0.691323396177j))*x[0] + ((-0.617295787168-0.967493486162j))*x[1]**o + ((0.608076732635-0.283073747719j))*x[1]
        ref[(2, 3)]=(0.30110164526+0.39899644807j)*x_ref[0]**o + ((0.986942511436-0.691323396177j))*x_ref[0] + ((-0.617295787168-0.967493486162j))*x_ref[1]**o + ((0.608076732635-0.283073747719j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.423779444028-0.650801748195j)*x[2]**o + ((-0.124060537817+0.639514591789j))*x[2]
            ref[(0, 0)]+=(0.423779444028-0.650801748195j)*x_ref[2]**o + ((-0.124060537817+0.639514591789j))*x_ref[2]
            arg[(0, 1)]+=(-0.48947206096-0.32801952667j)*x[2]**o + ((0.308924204014-0.0810133586262j))*x[2]
            ref[(0, 1)]+=(-0.48947206096-0.32801952667j)*x_ref[2]**o + ((0.308924204014-0.0810133586262j))*x_ref[2]
            arg[(0, 2)]+=(0.34285236581+0.872555648688j)*x[2]**o + ((0.978908384622+0.9041385004j))*x[2]
            ref[(0, 2)]+=(0.34285236581+0.872555648688j)*x_ref[2]**o + ((0.978908384622+0.9041385004j))*x_ref[2]
            arg[(0, 3)]+=(0.230966766272+0.0887350942577j)*x[2]**o + ((0.844333928654+0.858515408085j))*x[2]
            ref[(0, 3)]+=(0.230966766272+0.0887350942577j)*x_ref[2]**o + ((0.844333928654+0.858515408085j))*x_ref[2]
            arg[(1, 0)]+=(0.549577408651-0.547826960768j)*x[2]**o + ((-0.829155638343-0.231296830728j))*x[2]
            ref[(1, 0)]+=(0.549577408651-0.547826960768j)*x_ref[2]**o + ((-0.829155638343-0.231296830728j))*x_ref[2]
            arg[(1, 1)]+=(0.575867364239+0.939199939384j)*x[2]**o + ((-0.237274815696-0.561747389916j))*x[2]
            ref[(1, 1)]+=(0.575867364239+0.939199939384j)*x_ref[2]**o + ((-0.237274815696-0.561747389916j))*x_ref[2]
            arg[(1, 2)]+=(0.946223828484-0.712726147585j)*x[2]**o + ((0.243842950144-0.537923550679j))*x[2]
            ref[(1, 2)]+=(0.946223828484-0.712726147585j)*x_ref[2]**o + ((0.243842950144-0.537923550679j))*x_ref[2]
            arg[(1, 3)]+=(0.278434722252-0.872467952433j)*x[2]**o + ((0.640241629043+0.277207345775j))*x[2]
            ref[(1, 3)]+=(0.278434722252-0.872467952433j)*x_ref[2]**o + ((0.640241629043+0.277207345775j))*x_ref[2]
            arg[(2, 0)]+=(0.209374041508+0.0654881513814j)*x[2]**o + ((-0.0155003581968-0.37686231208j))*x[2]
            ref[(2, 0)]+=(0.209374041508+0.0654881513814j)*x_ref[2]**o + ((-0.0155003581968-0.37686231208j))*x_ref[2]
            arg[(2, 1)]+=(0.426946507472-0.98827308953j)*x[2]**o + ((0.70199860568-0.792370942886j))*x[2]
            ref[(2, 1)]+=(0.426946507472-0.98827308953j)*x_ref[2]**o + ((0.70199860568-0.792370942886j))*x_ref[2]
            arg[(2, 2)]+=(0.386411852713-0.493323039942j)*x[2]**o + ((-0.824156991638-0.40449043828j))*x[2]
            ref[(2, 2)]+=(0.386411852713-0.493323039942j)*x_ref[2]**o + ((-0.824156991638-0.40449043828j))*x_ref[2]
            arg[(2, 3)]+=(0.684775174239+0.442240272734j)*x[2]**o + ((0.113734133405+0.128150838456j))*x[2]
            ref[(2, 3)]+=(0.684775174239+0.442240272734j)*x_ref[2]**o + ((0.113734133405+0.128150838456j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 2),w)
        ref = Data(0,(4, 3, 2),w_ref)
        arg[(0, 0, 0)]=(-0.675836295765+0.286411035698j)*x[0]**o + ((-0.775468431828+0.0805215832496j))*x[0] + ((0.882733128694+0.159278563137j))*x[1]**o + ((0.39131564668+0.72375873149j))*x[1]
        ref[(0, 0, 0)]=(-0.675836295765+0.286411035698j)*x_ref[0]**o + ((-0.775468431828+0.0805215832496j))*x_ref[0] + ((0.882733128694+0.159278563137j))*x_ref[1]**o + ((0.39131564668+0.72375873149j))*x_ref[1]
        arg[(0, 0, 1)]=(0.469257635125-0.313257403445j)*x[0]**o + ((-0.837162217587+0.315176660498j))*x[0] + ((-0.29192669732+0.512694403194j))*x[1]**o + ((-0.739586651847-0.137820017459j))*x[1]
        ref[(0, 0, 1)]=(0.469257635125-0.313257403445j)*x_ref[0]**o + ((-0.837162217587+0.315176660498j))*x_ref[0] + ((-0.29192669732+0.512694403194j))*x_ref[1]**o + ((-0.739586651847-0.137820017459j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.612315575079-0.686945961458j)*x[0]**o + ((-0.514560137696-0.227902242349j))*x[0] + ((-0.523183851531-0.668517075848j))*x[1]**o + ((0.360664236565-0.400147428116j))*x[1]
        ref[(0, 1, 0)]=(-0.612315575079-0.686945961458j)*x_ref[0]**o + ((-0.514560137696-0.227902242349j))*x_ref[0] + ((-0.523183851531-0.668517075848j))*x_ref[1]**o + ((0.360664236565-0.400147428116j))*x_ref[1]
        arg[(0, 1, 1)]=(0.400230965627+0.0922016553975j)*x[0]**o + ((0.168503846777-0.607066522462j))*x[0] + ((-0.649719055545+0.470783976812j))*x[1]**o + ((-0.165526470769+0.423278487744j))*x[1]
        ref[(0, 1, 1)]=(0.400230965627+0.0922016553975j)*x_ref[0]**o + ((0.168503846777-0.607066522462j))*x_ref[0] + ((-0.649719055545+0.470783976812j))*x_ref[1]**o + ((-0.165526470769+0.423278487744j))*x_ref[1]
        arg[(0, 2, 0)]=(-0.787516516983-0.879767918628j)*x[0]**o + ((-0.1798286089+0.372709379047j))*x[0] + ((0.937086526414-0.634560744381j))*x[1]**o + ((0.236645360847-0.202840615407j))*x[1]
        ref[(0, 2, 0)]=(-0.787516516983-0.879767918628j)*x_ref[0]**o + ((-0.1798286089+0.372709379047j))*x_ref[0] + ((0.937086526414-0.634560744381j))*x_ref[1]**o + ((0.236645360847-0.202840615407j))*x_ref[1]
        arg[(0, 2, 1)]=(-0.781138328628-0.895844628674j)*x[0]**o + ((-0.498894080487+0.905392717183j))*x[0] + ((-0.648273175251-0.664929555582j))*x[1]**o + ((-0.883144039168+0.433005647382j))*x[1]
        ref[(0, 2, 1)]=(-0.781138328628-0.895844628674j)*x_ref[0]**o + ((-0.498894080487+0.905392717183j))*x_ref[0] + ((-0.648273175251-0.664929555582j))*x_ref[1]**o + ((-0.883144039168+0.433005647382j))*x_ref[1]
        arg[(1, 0, 0)]=(0.823600063558+0.416311686355j)*x[0]**o + ((-0.978736193202-0.516522425493j))*x[0] + ((0.76923730759-0.38983067039j))*x[1]**o + ((-0.921503954536-0.575240675471j))*x[1]
        ref[(1, 0, 0)]=(0.823600063558+0.416311686355j)*x_ref[0]**o + ((-0.978736193202-0.516522425493j))*x_ref[0] + ((0.76923730759-0.38983067039j))*x_ref[1]**o + ((-0.921503954536-0.575240675471j))*x_ref[1]
        arg[(1, 0, 1)]=(0.292610129216+0.673083261878j)*x[0]**o + ((-0.0458375220145-0.569374891743j))*x[0] + ((0.380560482338-0.0271577767829j))*x[1]**o + ((0.655891403737+0.45222969113j))*x[1]
        ref[(1, 0, 1)]=(0.292610129216+0.673083261878j)*x_ref[0]**o + ((-0.0458375220145-0.569374891743j))*x_ref[0] + ((0.380560482338-0.0271577767829j))*x_ref[1]**o + ((0.655891403737+0.45222969113j))*x_ref[1]
        arg[(1, 1, 0)]=(0.322129837922+0.959676459169j)*x[0]**o + ((-0.710096970322-0.952193092235j))*x[0] + ((0.247464925572-0.951249858104j))*x[1]**o + ((0.837878253154+0.437952637808j))*x[1]
        ref[(1, 1, 0)]=(0.322129837922+0.959676459169j)*x_ref[0]**o + ((-0.710096970322-0.952193092235j))*x_ref[0] + ((0.247464925572-0.951249858104j))*x_ref[1]**o + ((0.837878253154+0.437952637808j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.893195162841+0.441134514626j)*x[0]**o + ((-0.634642846604+0.906433590056j))*x[0] + ((0.375402945302+0.253309907008j))*x[1]**o + ((0.987756025389-0.830455088918j))*x[1]
        ref[(1, 1, 1)]=(-0.893195162841+0.441134514626j)*x_ref[0]**o + ((-0.634642846604+0.906433590056j))*x_ref[0] + ((0.375402945302+0.253309907008j))*x_ref[1]**o + ((0.987756025389-0.830455088918j))*x_ref[1]
        arg[(1, 2, 0)]=(0.187010062414+0.222674206298j)*x[0]**o + ((0.543609211408-0.700796481457j))*x[0] + ((0.225909692367-0.594913319975j))*x[1]**o + ((0.579786657826+0.941142613022j))*x[1]
        ref[(1, 2, 0)]=(0.187010062414+0.222674206298j)*x_ref[0]**o + ((0.543609211408-0.700796481457j))*x_ref[0] + ((0.225909692367-0.594913319975j))*x_ref[1]**o + ((0.579786657826+0.941142613022j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.183353044979-0.973702907837j)*x[0]**o + ((0.0380405587514-0.76719496051j))*x[0] + ((-0.72168524185+0.616463160613j))*x[1]**o + ((-0.603205739687+0.57464163153j))*x[1]
        ref[(1, 2, 1)]=(-0.183353044979-0.973702907837j)*x_ref[0]**o + ((0.0380405587514-0.76719496051j))*x_ref[0] + ((-0.72168524185+0.616463160613j))*x_ref[1]**o + ((-0.603205739687+0.57464163153j))*x_ref[1]
        arg[(2, 0, 0)]=(0.540501359393+0.992711559797j)*x[0]**o + ((-0.2096586597+0.304041083284j))*x[0] + ((-0.289550031801-0.529236449038j))*x[1]**o + ((-0.674306524858-0.390099679585j))*x[1]
        ref[(2, 0, 0)]=(0.540501359393+0.992711559797j)*x_ref[0]**o + ((-0.2096586597+0.304041083284j))*x_ref[0] + ((-0.289550031801-0.529236449038j))*x_ref[1]**o + ((-0.674306524858-0.390099679585j))*x_ref[1]
        arg[(2, 0, 1)]=(-0.45232869289+0.499575970244j)*x[0]**o + ((0.424167612556+0.396367850021j))*x[0] + ((-0.284576792816-0.602204641178j))*x[1]**o + ((0.354406785285-0.662299986596j))*x[1]
        ref[(2, 0, 1)]=(-0.45232869289+0.499575970244j)*x_ref[0]**o + ((0.424167612556+0.396367850021j))*x_ref[0] + ((-0.284576792816-0.602204641178j))*x_ref[1]**o + ((0.354406785285-0.662299986596j))*x_ref[1]
        arg[(2, 1, 0)]=(-0.915457922547+0.985498333486j)*x[0]**o + ((-0.998416205375+0.29543940246j))*x[0] + ((-0.824264281556+0.871255369786j))*x[1]**o + ((0.964045305376+0.0676385936508j))*x[1]
        ref[(2, 1, 0)]=(-0.915457922547+0.985498333486j)*x_ref[0]**o + ((-0.998416205375+0.29543940246j))*x_ref[0] + ((-0.824264281556+0.871255369786j))*x_ref[1]**o + ((0.964045305376+0.0676385936508j))*x_ref[1]
        arg[(2, 1, 1)]=(0.999200620307-0.651610724549j)*x[0]**o + ((-0.563459002169-0.154786773129j))*x[0] + ((-0.445479544412+0.911417735812j))*x[1]**o + ((0.573738202591-0.630639280395j))*x[1]
        ref[(2, 1, 1)]=(0.999200620307-0.651610724549j)*x_ref[0]**o + ((-0.563459002169-0.154786773129j))*x_ref[0] + ((-0.445479544412+0.911417735812j))*x_ref[1]**o + ((0.573738202591-0.630639280395j))*x_ref[1]
        arg[(2, 2, 0)]=(-0.0355021037327+0.244441230902j)*x[0]**o + ((-0.342041412633-0.102122972045j))*x[0] + ((0.681649234829+0.023785132842j))*x[1]**o + ((0.106077444433+0.195691642094j))*x[1]
        ref[(2, 2, 0)]=(-0.0355021037327+0.244441230902j)*x_ref[0]**o + ((-0.342041412633-0.102122972045j))*x_ref[0] + ((0.681649234829+0.023785132842j))*x_ref[1]**o + ((0.106077444433+0.195691642094j))*x_ref[1]
        arg[(2, 2, 1)]=(-0.480183765466-0.0574023119632j)*x[0]**o + ((-0.625023311-0.294836775959j))*x[0] + ((0.276483890842+0.687767589142j))*x[1]**o + ((0.850003101603+0.0732468027815j))*x[1]
        ref[(2, 2, 1)]=(-0.480183765466-0.0574023119632j)*x_ref[0]**o + ((-0.625023311-0.294836775959j))*x_ref[0] + ((0.276483890842+0.687767589142j))*x_ref[1]**o + ((0.850003101603+0.0732468027815j))*x_ref[1]
        arg[(3, 0, 0)]=(0.294570333324-0.429223950771j)*x[0]**o + ((0.545751800824-0.949881839182j))*x[0] + ((-0.814216233699+0.516556696854j))*x[1]**o + ((0.171998658753+0.584794128971j))*x[1]
        ref[(3, 0, 0)]=(0.294570333324-0.429223950771j)*x_ref[0]**o + ((0.545751800824-0.949881839182j))*x_ref[0] + ((-0.814216233699+0.516556696854j))*x_ref[1]**o + ((0.171998658753+0.584794128971j))*x_ref[1]
        arg[(3, 0, 1)]=(0.444118117515+0.925291204213j)*x[0]**o + ((0.594458430134-0.0977331714255j))*x[0] + ((0.511956912018-0.541649465374j))*x[1]**o + ((0.285518344737-0.0787742122737j))*x[1]
        ref[(3, 0, 1)]=(0.444118117515+0.925291204213j)*x_ref[0]**o + ((0.594458430134-0.0977331714255j))*x_ref[0] + ((0.511956912018-0.541649465374j))*x_ref[1]**o + ((0.285518344737-0.0787742122737j))*x_ref[1]
        arg[(3, 1, 0)]=(-0.176403764976-0.0851014411586j)*x[0]**o + ((0.323667566496-0.589122868377j))*x[0] + ((-0.823872546749+0.64087249069j))*x[1]**o + ((-0.980863968931+0.643138817223j))*x[1]
        ref[(3, 1, 0)]=(-0.176403764976-0.0851014411586j)*x_ref[0]**o + ((0.323667566496-0.589122868377j))*x_ref[0] + ((-0.823872546749+0.64087249069j))*x_ref[1]**o + ((-0.980863968931+0.643138817223j))*x_ref[1]
        arg[(3, 1, 1)]=(-0.129792770508+0.482406643853j)*x[0]**o + ((0.614784727007-0.0569828531763j))*x[0] + ((-0.543009389481+0.556138110066j))*x[1]**o + ((-0.573924937117-0.112773255368j))*x[1]
        ref[(3, 1, 1)]=(-0.129792770508+0.482406643853j)*x_ref[0]**o + ((0.614784727007-0.0569828531763j))*x_ref[0] + ((-0.543009389481+0.556138110066j))*x_ref[1]**o + ((-0.573924937117-0.112773255368j))*x_ref[1]
        arg[(3, 2, 0)]=(0.267198090183-0.929536251314j)*x[0]**o + ((-0.171662525492+0.79479963477j))*x[0] + ((0.663250403853-0.787700738665j))*x[1]**o + ((-0.757342857993-0.199658681055j))*x[1]
        ref[(3, 2, 0)]=(0.267198090183-0.929536251314j)*x_ref[0]**o + ((-0.171662525492+0.79479963477j))*x_ref[0] + ((0.663250403853-0.787700738665j))*x_ref[1]**o + ((-0.757342857993-0.199658681055j))*x_ref[1]
        arg[(3, 2, 1)]=(-0.490405378804+0.270537680383j)*x[0]**o + ((-0.696626939822-0.0898474583213j))*x[0] + ((0.395125775665+0.300751835827j))*x[1]**o + ((0.821710429473+0.456878473726j))*x[1]
        ref[(3, 2, 1)]=(-0.490405378804+0.270537680383j)*x_ref[0]**o + ((-0.696626939822-0.0898474583213j))*x_ref[0] + ((0.395125775665+0.300751835827j))*x_ref[1]**o + ((0.821710429473+0.456878473726j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.341194732152+0.53077870343j)*x[2]**o + ((-0.119029921222+0.899230572052j))*x[2]
            ref[(0, 0, 0)]+=(-0.341194732152+0.53077870343j)*x_ref[2]**o + ((-0.119029921222+0.899230572052j))*x_ref[2]
            arg[(0, 0, 1)]+=(0.691351831766+0.245680818481j)*x[2]**o + ((0.975846198916-0.344310056635j))*x[2]
            ref[(0, 0, 1)]+=(0.691351831766+0.245680818481j)*x_ref[2]**o + ((0.975846198916-0.344310056635j))*x_ref[2]
            arg[(0, 1, 0)]+=(0.631981598319+0.70138837639j)*x[2]**o + ((0.764530769477-0.590676568672j))*x[2]
            ref[(0, 1, 0)]+=(0.631981598319+0.70138837639j)*x_ref[2]**o + ((0.764530769477-0.590676568672j))*x_ref[2]
            arg[(0, 1, 1)]+=(0.912992738252+0.609050116415j)*x[2]**o + ((-0.887302273825-0.168667842629j))*x[2]
            ref[(0, 1, 1)]+=(0.912992738252+0.609050116415j)*x_ref[2]**o + ((-0.887302273825-0.168667842629j))*x_ref[2]
            arg[(0, 2, 0)]+=(0.00267585555753-0.396533196649j)*x[2]**o + ((-0.52528741052-0.428552201193j))*x[2]
            ref[(0, 2, 0)]+=(0.00267585555753-0.396533196649j)*x_ref[2]**o + ((-0.52528741052-0.428552201193j))*x_ref[2]
            arg[(0, 2, 1)]+=(-0.994900890572-0.305147121415j)*x[2]**o + ((-0.754353360907+0.944054806705j))*x[2]
            ref[(0, 2, 1)]+=(-0.994900890572-0.305147121415j)*x_ref[2]**o + ((-0.754353360907+0.944054806705j))*x_ref[2]
            arg[(1, 0, 0)]+=(0.845911501673+0.305386507517j)*x[2]**o + ((0.304843419989-0.346087893299j))*x[2]
            ref[(1, 0, 0)]+=(0.845911501673+0.305386507517j)*x_ref[2]**o + ((0.304843419989-0.346087893299j))*x_ref[2]
            arg[(1, 0, 1)]+=(0.497292303675-0.000457193303672j)*x[2]**o + ((0.221430315029+0.946801618077j))*x[2]
            ref[(1, 0, 1)]+=(0.497292303675-0.000457193303672j)*x_ref[2]**o + ((0.221430315029+0.946801618077j))*x_ref[2]
            arg[(1, 1, 0)]+=(0.16292089351-0.39370070213j)*x[2]**o + ((0.458563000333+0.0957941137625j))*x[2]
            ref[(1, 1, 0)]+=(0.16292089351-0.39370070213j)*x_ref[2]**o + ((0.458563000333+0.0957941137625j))*x_ref[2]
            arg[(1, 1, 1)]+=(0.874860467744+0.92271032897j)*x[2]**o + ((0.692986568617-0.791863844297j))*x[2]
            ref[(1, 1, 1)]+=(0.874860467744+0.92271032897j)*x_ref[2]**o + ((0.692986568617-0.791863844297j))*x_ref[2]
            arg[(1, 2, 0)]+=(0.872139051187-0.552601971199j)*x[2]**o + ((-0.189437009165+0.145809804241j))*x[2]
            ref[(1, 2, 0)]+=(0.872139051187-0.552601971199j)*x_ref[2]**o + ((-0.189437009165+0.145809804241j))*x_ref[2]
            arg[(1, 2, 1)]+=(-0.591122469677+0.375738472014j)*x[2]**o + ((-0.221409631439-0.055419696477j))*x[2]
            ref[(1, 2, 1)]+=(-0.591122469677+0.375738472014j)*x_ref[2]**o + ((-0.221409631439-0.055419696477j))*x_ref[2]
            arg[(2, 0, 0)]+=(-0.295442478183-0.611791049015j)*x[2]**o + ((-0.204978051583+0.708488137928j))*x[2]
            ref[(2, 0, 0)]+=(-0.295442478183-0.611791049015j)*x_ref[2]**o + ((-0.204978051583+0.708488137928j))*x_ref[2]
            arg[(2, 0, 1)]+=(0.716314508556-0.350239855814j)*x[2]**o + ((-0.181695399767-0.608990544113j))*x[2]
            ref[(2, 0, 1)]+=(0.716314508556-0.350239855814j)*x_ref[2]**o + ((-0.181695399767-0.608990544113j))*x_ref[2]
            arg[(2, 1, 0)]+=(0.766512474077-0.997520627617j)*x[2]**o + ((0.247961285767-0.847971047682j))*x[2]
            ref[(2, 1, 0)]+=(0.766512474077-0.997520627617j)*x_ref[2]**o + ((0.247961285767-0.847971047682j))*x_ref[2]
            arg[(2, 1, 1)]+=(-0.898348981888+0.71530579577j)*x[2]**o + ((0.572450570306+0.584951051575j))*x[2]
            ref[(2, 1, 1)]+=(-0.898348981888+0.71530579577j)*x_ref[2]**o + ((0.572450570306+0.584951051575j))*x_ref[2]
            arg[(2, 2, 0)]+=(0.0427591365684+0.770551025984j)*x[2]**o + ((0.571103909483+0.748770673081j))*x[2]
            ref[(2, 2, 0)]+=(0.0427591365684+0.770551025984j)*x_ref[2]**o + ((0.571103909483+0.748770673081j))*x_ref[2]
            arg[(2, 2, 1)]+=(0.710259429439+0.862862907476j)*x[2]**o + ((-0.957750254165+0.00720233890993j))*x[2]
            ref[(2, 2, 1)]+=(0.710259429439+0.862862907476j)*x_ref[2]**o + ((-0.957750254165+0.00720233890993j))*x_ref[2]
            arg[(3, 0, 0)]+=(-0.434259169364+0.19303995176j)*x[2]**o + ((0.504044886702+0.136727085406j))*x[2]
            ref[(3, 0, 0)]+=(-0.434259169364+0.19303995176j)*x_ref[2]**o + ((0.504044886702+0.136727085406j))*x_ref[2]
            arg[(3, 0, 1)]+=(-0.386143179913-0.160502382111j)*x[2]**o + ((0.906677915788+0.898808312429j))*x[2]
            ref[(3, 0, 1)]+=(-0.386143179913-0.160502382111j)*x_ref[2]**o + ((0.906677915788+0.898808312429j))*x_ref[2]
            arg[(3, 1, 0)]+=(-0.334034789681-0.57796486648j)*x[2]**o + ((0.000910154459598+0.252881864122j))*x[2]
            ref[(3, 1, 0)]+=(-0.334034789681-0.57796486648j)*x_ref[2]**o + ((0.000910154459598+0.252881864122j))*x_ref[2]
            arg[(3, 1, 1)]+=(0.555946723906+0.995111304601j)*x[2]**o + ((-0.447968321334-0.166678498126j))*x[2]
            ref[(3, 1, 1)]+=(0.555946723906+0.995111304601j)*x_ref[2]**o + ((-0.447968321334-0.166678498126j))*x_ref[2]
            arg[(3, 2, 0)]+=(0.012556619589-0.114650455536j)*x[2]**o + ((0.783248725579-0.790916158987j))*x[2]
            ref[(3, 2, 0)]+=(0.012556619589-0.114650455536j)*x_ref[2]**o + ((0.783248725579-0.790916158987j))*x_ref[2]
            arg[(3, 2, 1)]+=(-0.671961445832-0.584089071116j)*x[2]**o + ((-0.482571156205-0.37960724725j))*x[2]
            ref[(3, 2, 1)]+=(-0.671961445832-0.584089071116j)*x_ref[2]**o + ((-0.482571156205-0.37960724725j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 4, 3),w)
        ref = Data(0,(4, 3, 4, 3),w_ref)
        arg[(0, 0, 0, 0)]=(-0.864270902053+0.438079809967j)*x[0]**o + ((-0.424371147328+0.502095706256j))*x[0] + ((-0.962231175325+0.943062474117j))*x[1]**o + ((-0.946753829594+0.445578479774j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.864270902053+0.438079809967j)*x_ref[0]**o + ((-0.424371147328+0.502095706256j))*x_ref[0] + ((-0.962231175325+0.943062474117j))*x_ref[1]**o + ((-0.946753829594+0.445578479774j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.00392009439621+0.766894945818j)*x[0]**o + ((-0.354976506827-0.531810520697j))*x[0] + ((0.989566806355+0.833644872609j))*x[1]**o + ((0.423318506169+0.866044457228j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.00392009439621+0.766894945818j)*x_ref[0]**o + ((-0.354976506827-0.531810520697j))*x_ref[0] + ((0.989566806355+0.833644872609j))*x_ref[1]**o + ((0.423318506169+0.866044457228j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.851099109987+0.713427065181j)*x[0]**o + ((0.493035821404-0.778089072915j))*x[0] + ((-0.335398939708+0.977461340905j))*x[1]**o + ((-0.53213664017-0.445130629773j))*x[1]
        ref[(0, 0, 0, 2)]=(0.851099109987+0.713427065181j)*x_ref[0]**o + ((0.493035821404-0.778089072915j))*x_ref[0] + ((-0.335398939708+0.977461340905j))*x_ref[1]**o + ((-0.53213664017-0.445130629773j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.104749182074-0.413534167605j)*x[0]**o + ((-0.544242569062-0.580582298376j))*x[0] + ((-0.627322358403+0.768578319334j))*x[1]**o + ((-0.905786583026-0.359593605611j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.104749182074-0.413534167605j)*x_ref[0]**o + ((-0.544242569062-0.580582298376j))*x_ref[0] + ((-0.627322358403+0.768578319334j))*x_ref[1]**o + ((-0.905786583026-0.359593605611j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.365890521236+0.736874135872j)*x[0]**o + ((-0.994792302535+0.415356001462j))*x[0] + ((0.753288096509-0.838899611512j))*x[1]**o + ((-0.929247990146-0.42295668638j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.365890521236+0.736874135872j)*x_ref[0]**o + ((-0.994792302535+0.415356001462j))*x_ref[0] + ((0.753288096509-0.838899611512j))*x_ref[1]**o + ((-0.929247990146-0.42295668638j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(-0.915956464204+0.822908240993j)*x[0]**o + ((0.374299711615-0.727079200375j))*x[0] + ((0.700672766491-0.326325872258j))*x[1]**o + ((0.119755100029+0.397289837563j))*x[1]
        ref[(0, 0, 1, 2)]=(-0.915956464204+0.822908240993j)*x_ref[0]**o + ((0.374299711615-0.727079200375j))*x_ref[0] + ((0.700672766491-0.326325872258j))*x_ref[1]**o + ((0.119755100029+0.397289837563j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(-0.112332505843+0.742351346504j)*x[0]**o + ((0.216978626681-0.883570293569j))*x[0] + ((-0.80040723992+0.294395571794j))*x[1]**o + ((0.73413213888-0.642678218796j))*x[1]
        ref[(0, 0, 2, 0)]=(-0.112332505843+0.742351346504j)*x_ref[0]**o + ((0.216978626681-0.883570293569j))*x_ref[0] + ((-0.80040723992+0.294395571794j))*x_ref[1]**o + ((0.73413213888-0.642678218796j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(-0.907038632508-0.0162077909288j)*x[0]**o + ((0.798019596687+0.742010800501j))*x[0] + ((0.440434557111+0.0360721785038j))*x[1]**o + ((-0.164011907217-0.764713402298j))*x[1]
        ref[(0, 0, 2, 1)]=(-0.907038632508-0.0162077909288j)*x_ref[0]**o + ((0.798019596687+0.742010800501j))*x_ref[0] + ((0.440434557111+0.0360721785038j))*x_ref[1]**o + ((-0.164011907217-0.764713402298j))*x_ref[1]
        arg[(0, 0, 2, 2)]=(0.842125891052+0.147925218047j)*x[0]**o + ((-0.50168203633+0.612050335417j))*x[0] + ((0.564701313598-0.166981213959j))*x[1]**o + ((-0.738987056645+0.0974653705882j))*x[1]
        ref[(0, 0, 2, 2)]=(0.842125891052+0.147925218047j)*x_ref[0]**o + ((-0.50168203633+0.612050335417j))*x_ref[0] + ((0.564701313598-0.166981213959j))*x_ref[1]**o + ((-0.738987056645+0.0974653705882j))*x_ref[1]
        arg[(0, 0, 3, 0)]=(0.598567192812-0.772374116317j)*x[0]**o + ((0.0759867384117+0.217191672784j))*x[0] + ((-0.618712934204-0.210596275744j))*x[1]**o + ((0.988145981923-0.255690712587j))*x[1]
        ref[(0, 0, 3, 0)]=(0.598567192812-0.772374116317j)*x_ref[0]**o + ((0.0759867384117+0.217191672784j))*x_ref[0] + ((-0.618712934204-0.210596275744j))*x_ref[1]**o + ((0.988145981923-0.255690712587j))*x_ref[1]
        arg[(0, 0, 3, 1)]=(0.651784419771+0.494357563795j)*x[0]**o + ((0.0729381905445-0.75704053471j))*x[0] + ((-0.512149072412+0.218595707244j))*x[1]**o + ((-0.576637536525+0.401988604446j))*x[1]
        ref[(0, 0, 3, 1)]=(0.651784419771+0.494357563795j)*x_ref[0]**o + ((0.0729381905445-0.75704053471j))*x_ref[0] + ((-0.512149072412+0.218595707244j))*x_ref[1]**o + ((-0.576637536525+0.401988604446j))*x_ref[1]
        arg[(0, 0, 3, 2)]=(-0.583342824537+0.109782977644j)*x[0]**o + ((0.633049917149-0.822191192912j))*x[0] + ((0.839892184743-0.156260514541j))*x[1]**o + ((0.78390968372-0.196822667829j))*x[1]
        ref[(0, 0, 3, 2)]=(-0.583342824537+0.109782977644j)*x_ref[0]**o + ((0.633049917149-0.822191192912j))*x_ref[0] + ((0.839892184743-0.156260514541j))*x_ref[1]**o + ((0.78390968372-0.196822667829j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.617618568116-0.271236799449j)*x[0]**o + ((-0.341323154934-0.350625253744j))*x[0] + ((0.783382369025-0.518037141092j))*x[1]**o + ((0.279609690599-0.4586522568j))*x[1]
        ref[(0, 1, 0, 0)]=(0.617618568116-0.271236799449j)*x_ref[0]**o + ((-0.341323154934-0.350625253744j))*x_ref[0] + ((0.783382369025-0.518037141092j))*x_ref[1]**o + ((0.279609690599-0.4586522568j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(0.545763615242+0.595896371887j)*x[0]**o + ((-0.265357907234+0.295419323511j))*x[0] + ((0.667835951636+0.965179624927j))*x[1]**o + ((0.938815946715-0.542557823614j))*x[1]
        ref[(0, 1, 0, 1)]=(0.545763615242+0.595896371887j)*x_ref[0]**o + ((-0.265357907234+0.295419323511j))*x_ref[0] + ((0.667835951636+0.965179624927j))*x_ref[1]**o + ((0.938815946715-0.542557823614j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(-0.570797033343-0.697914346385j)*x[0]**o + ((-0.250077029239+0.102641745963j))*x[0] + ((-0.153250013004+0.110794960945j))*x[1]**o + ((-0.429943367512+0.780890287792j))*x[1]
        ref[(0, 1, 0, 2)]=(-0.570797033343-0.697914346385j)*x_ref[0]**o + ((-0.250077029239+0.102641745963j))*x_ref[0] + ((-0.153250013004+0.110794960945j))*x_ref[1]**o + ((-0.429943367512+0.780890287792j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.545966656028-0.441986339791j)*x[0]**o + ((-0.746225797796+0.607535485126j))*x[0] + ((0.211232097735-0.438471718874j))*x[1]**o + ((-0.413843374108+0.799692131565j))*x[1]
        ref[(0, 1, 1, 0)]=(0.545966656028-0.441986339791j)*x_ref[0]**o + ((-0.746225797796+0.607535485126j))*x_ref[0] + ((0.211232097735-0.438471718874j))*x_ref[1]**o + ((-0.413843374108+0.799692131565j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.357493967123+0.765757423635j)*x[0]**o + ((-0.433513274093+0.188863123234j))*x[0] + ((0.916942392921-0.261851734591j))*x[1]**o + ((-0.229234880345-0.90079886744j))*x[1]
        ref[(0, 1, 1, 1)]=(0.357493967123+0.765757423635j)*x_ref[0]**o + ((-0.433513274093+0.188863123234j))*x_ref[0] + ((0.916942392921-0.261851734591j))*x_ref[1]**o + ((-0.229234880345-0.90079886744j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(0.317231157159+0.663757746949j)*x[0]**o + ((0.154530729134-0.116724632364j))*x[0] + ((0.00299627499761-0.57057567383j))*x[1]**o + ((0.507230556094-0.0207500621162j))*x[1]
        ref[(0, 1, 1, 2)]=(0.317231157159+0.663757746949j)*x_ref[0]**o + ((0.154530729134-0.116724632364j))*x_ref[0] + ((0.00299627499761-0.57057567383j))*x_ref[1]**o + ((0.507230556094-0.0207500621162j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(0.970229911394-0.256685617002j)*x[0]**o + ((-0.14631360191+0.274577847109j))*x[0] + ((-0.198747880991+0.0313155629696j))*x[1]**o + ((-0.0643490688279-0.718801179021j))*x[1]
        ref[(0, 1, 2, 0)]=(0.970229911394-0.256685617002j)*x_ref[0]**o + ((-0.14631360191+0.274577847109j))*x_ref[0] + ((-0.198747880991+0.0313155629696j))*x_ref[1]**o + ((-0.0643490688279-0.718801179021j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(-0.808694426353+0.331902462232j)*x[0]**o + ((0.495458264797-0.126351615534j))*x[0] + ((0.6484957704-0.00203354515938j))*x[1]**o + ((0.768167635972-0.143484928785j))*x[1]
        ref[(0, 1, 2, 1)]=(-0.808694426353+0.331902462232j)*x_ref[0]**o + ((0.495458264797-0.126351615534j))*x_ref[0] + ((0.6484957704-0.00203354515938j))*x_ref[1]**o + ((0.768167635972-0.143484928785j))*x_ref[1]
        arg[(0, 1, 2, 2)]=(-0.314329604472-0.936716731775j)*x[0]**o + ((-0.0251092192747-0.0987314160266j))*x[0] + ((-0.264325525596-0.0482616386075j))*x[1]**o + ((0.103053188381+0.524404033166j))*x[1]
        ref[(0, 1, 2, 2)]=(-0.314329604472-0.936716731775j)*x_ref[0]**o + ((-0.0251092192747-0.0987314160266j))*x_ref[0] + ((-0.264325525596-0.0482616386075j))*x_ref[1]**o + ((0.103053188381+0.524404033166j))*x_ref[1]
        arg[(0, 1, 3, 0)]=(0.710522124112-0.717701579061j)*x[0]**o + ((0.379358857953+0.0669046094286j))*x[0] + ((-0.645977777118+0.561965307835j))*x[1]**o + ((-0.726627677525-0.984159154466j))*x[1]
        ref[(0, 1, 3, 0)]=(0.710522124112-0.717701579061j)*x_ref[0]**o + ((0.379358857953+0.0669046094286j))*x_ref[0] + ((-0.645977777118+0.561965307835j))*x_ref[1]**o + ((-0.726627677525-0.984159154466j))*x_ref[1]
        arg[(0, 1, 3, 1)]=(-0.512250375118-0.157416774617j)*x[0]**o + ((0.687237428364+0.722454377764j))*x[0] + ((-0.7448600953-0.316452240714j))*x[1]**o + ((0.835532606378+0.160611116183j))*x[1]
        ref[(0, 1, 3, 1)]=(-0.512250375118-0.157416774617j)*x_ref[0]**o + ((0.687237428364+0.722454377764j))*x_ref[0] + ((-0.7448600953-0.316452240714j))*x_ref[1]**o + ((0.835532606378+0.160611116183j))*x_ref[1]
        arg[(0, 1, 3, 2)]=(0.557372837913-0.0470581487674j)*x[0]**o + ((-0.922886870848+0.711581127666j))*x[0] + ((0.431175371365-0.762522634414j))*x[1]**o + ((-0.542392047825+0.0958244568516j))*x[1]
        ref[(0, 1, 3, 2)]=(0.557372837913-0.0470581487674j)*x_ref[0]**o + ((-0.922886870848+0.711581127666j))*x_ref[0] + ((0.431175371365-0.762522634414j))*x_ref[1]**o + ((-0.542392047825+0.0958244568516j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.162912973691+0.354203583604j)*x[0]**o + ((0.978996018703+0.253246474909j))*x[0] + ((-0.270546932805-0.304550208997j))*x[1]**o + ((0.386104121658+0.14706852972j))*x[1]
        ref[(0, 2, 0, 0)]=(0.162912973691+0.354203583604j)*x_ref[0]**o + ((0.978996018703+0.253246474909j))*x_ref[0] + ((-0.270546932805-0.304550208997j))*x_ref[1]**o + ((0.386104121658+0.14706852972j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(0.656468705025+0.0294472340065j)*x[0]**o + ((-0.847155363743+0.833999874996j))*x[0] + ((0.744135507478-0.949796308426j))*x[1]**o + ((-0.159652626021-0.238583041432j))*x[1]
        ref[(0, 2, 0, 1)]=(0.656468705025+0.0294472340065j)*x_ref[0]**o + ((-0.847155363743+0.833999874996j))*x_ref[0] + ((0.744135507478-0.949796308426j))*x_ref[1]**o + ((-0.159652626021-0.238583041432j))*x_ref[1]
        arg[(0, 2, 0, 2)]=(0.947200726022-0.651806474034j)*x[0]**o + ((0.440888179712-0.545401951354j))*x[0] + ((-0.330007232906-0.329874015127j))*x[1]**o + ((0.427975743006-0.594932845528j))*x[1]
        ref[(0, 2, 0, 2)]=(0.947200726022-0.651806474034j)*x_ref[0]**o + ((0.440888179712-0.545401951354j))*x_ref[0] + ((-0.330007232906-0.329874015127j))*x_ref[1]**o + ((0.427975743006-0.594932845528j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.0501837850305+0.391372164931j)*x[0]**o + ((0.797008807205-0.168471306128j))*x[0] + ((0.4858768862-0.369945640198j))*x[1]**o + ((-0.768040990909+0.119945144148j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.0501837850305+0.391372164931j)*x_ref[0]**o + ((0.797008807205-0.168471306128j))*x_ref[0] + ((0.4858768862-0.369945640198j))*x_ref[1]**o + ((-0.768040990909+0.119945144148j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(0.542570217413+0.735158612035j)*x[0]**o + ((-0.452715045128+0.235063453983j))*x[0] + ((0.19375897437+0.83861139626j))*x[1]**o + ((0.0605003222642+0.0760646126527j))*x[1]
        ref[(0, 2, 1, 1)]=(0.542570217413+0.735158612035j)*x_ref[0]**o + ((-0.452715045128+0.235063453983j))*x_ref[0] + ((0.19375897437+0.83861139626j))*x_ref[1]**o + ((0.0605003222642+0.0760646126527j))*x_ref[1]
        arg[(0, 2, 1, 2)]=(-0.379529677845-0.282637523084j)*x[0]**o + ((0.422552793988+0.208812516505j))*x[0] + ((0.469352070413+0.572713199948j))*x[1]**o + ((-0.824144197348+0.999911137738j))*x[1]
        ref[(0, 2, 1, 2)]=(-0.379529677845-0.282637523084j)*x_ref[0]**o + ((0.422552793988+0.208812516505j))*x_ref[0] + ((0.469352070413+0.572713199948j))*x_ref[1]**o + ((-0.824144197348+0.999911137738j))*x_ref[1]
        arg[(0, 2, 2, 0)]=(-0.906525192204-0.873757344522j)*x[0]**o + ((0.163310598775-0.233126554143j))*x[0] + ((0.335993331254+0.317958225669j))*x[1]**o + ((0.26066188783-0.0867526141897j))*x[1]
        ref[(0, 2, 2, 0)]=(-0.906525192204-0.873757344522j)*x_ref[0]**o + ((0.163310598775-0.233126554143j))*x_ref[0] + ((0.335993331254+0.317958225669j))*x_ref[1]**o + ((0.26066188783-0.0867526141897j))*x_ref[1]
        arg[(0, 2, 2, 1)]=(-0.487982801816-0.593410165017j)*x[0]**o + ((0.38782238107+0.373683814927j))*x[0] + ((0.0611782713717-0.812189135523j))*x[1]**o + ((-0.463632834292+0.971080571841j))*x[1]
        ref[(0, 2, 2, 1)]=(-0.487982801816-0.593410165017j)*x_ref[0]**o + ((0.38782238107+0.373683814927j))*x_ref[0] + ((0.0611782713717-0.812189135523j))*x_ref[1]**o + ((-0.463632834292+0.971080571841j))*x_ref[1]
        arg[(0, 2, 2, 2)]=(0.48314634745+0.870245939818j)*x[0]**o + ((-0.458865278068-0.0673180161309j))*x[0] + ((-0.677003669698+0.477298500613j))*x[1]**o + ((-0.660016036444+0.672786480766j))*x[1]
        ref[(0, 2, 2, 2)]=(0.48314634745+0.870245939818j)*x_ref[0]**o + ((-0.458865278068-0.0673180161309j))*x_ref[0] + ((-0.677003669698+0.477298500613j))*x_ref[1]**o + ((-0.660016036444+0.672786480766j))*x_ref[1]
        arg[(0, 2, 3, 0)]=(0.184602355198+0.392715796004j)*x[0]**o + ((0.0614053908177-0.817054710979j))*x[0] + ((-0.91289714344-0.534383176056j))*x[1]**o + ((0.644608548364+0.0849331054364j))*x[1]
        ref[(0, 2, 3, 0)]=(0.184602355198+0.392715796004j)*x_ref[0]**o + ((0.0614053908177-0.817054710979j))*x_ref[0] + ((-0.91289714344-0.534383176056j))*x_ref[1]**o + ((0.644608548364+0.0849331054364j))*x_ref[1]
        arg[(0, 2, 3, 1)]=(0.0904186791994+0.792694079875j)*x[0]**o + ((-0.272764622469+0.666268811127j))*x[0] + ((-0.916176519295-0.110585801118j))*x[1]**o + ((-0.530953328488-0.138547379586j))*x[1]
        ref[(0, 2, 3, 1)]=(0.0904186791994+0.792694079875j)*x_ref[0]**o + ((-0.272764622469+0.666268811127j))*x_ref[0] + ((-0.916176519295-0.110585801118j))*x_ref[1]**o + ((-0.530953328488-0.138547379586j))*x_ref[1]
        arg[(0, 2, 3, 2)]=(0.361764015888+0.0879110606863j)*x[0]**o + ((0.388404608552-0.991699033264j))*x[0] + ((-0.0126840693998+0.479454459713j))*x[1]**o + ((-0.369484173494-0.43596282005j))*x[1]
        ref[(0, 2, 3, 2)]=(0.361764015888+0.0879110606863j)*x_ref[0]**o + ((0.388404608552-0.991699033264j))*x_ref[0] + ((-0.0126840693998+0.479454459713j))*x_ref[1]**o + ((-0.369484173494-0.43596282005j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.120723988983-0.0229385064391j)*x[0]**o + ((0.997185984891+0.151631420574j))*x[0] + ((0.378958457228+0.608480492385j))*x[1]**o + ((0.268515245914+0.960900795434j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.120723988983-0.0229385064391j)*x_ref[0]**o + ((0.997185984891+0.151631420574j))*x_ref[0] + ((0.378958457228+0.608480492385j))*x_ref[1]**o + ((0.268515245914+0.960900795434j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(-0.849922985709-0.689828155315j)*x[0]**o + ((-0.720580788416+0.0212152266136j))*x[0] + ((-0.46238408203-0.288079682158j))*x[1]**o + ((-0.611177411503+0.974731528947j))*x[1]
        ref[(1, 0, 0, 1)]=(-0.849922985709-0.689828155315j)*x_ref[0]**o + ((-0.720580788416+0.0212152266136j))*x_ref[0] + ((-0.46238408203-0.288079682158j))*x_ref[1]**o + ((-0.611177411503+0.974731528947j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(0.51237953907+0.548378927014j)*x[0]**o + ((-0.383757969846-0.359458241353j))*x[0] + ((-0.727428986455-0.0757051482409j))*x[1]**o + ((-0.369969887108+0.809515477723j))*x[1]
        ref[(1, 0, 0, 2)]=(0.51237953907+0.548378927014j)*x_ref[0]**o + ((-0.383757969846-0.359458241353j))*x_ref[0] + ((-0.727428986455-0.0757051482409j))*x_ref[1]**o + ((-0.369969887108+0.809515477723j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(0.41113567917-0.930470374809j)*x[0]**o + ((0.403443344811-0.633332034369j))*x[0] + ((-0.0297264399055+0.790500115798j))*x[1]**o + ((-0.619011401527-0.38565805177j))*x[1]
        ref[(1, 0, 1, 0)]=(0.41113567917-0.930470374809j)*x_ref[0]**o + ((0.403443344811-0.633332034369j))*x_ref[0] + ((-0.0297264399055+0.790500115798j))*x_ref[1]**o + ((-0.619011401527-0.38565805177j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.206495898373-0.992614998214j)*x[0]**o + ((-0.342506389444-0.543833441317j))*x[0] + ((-0.702485143431+0.402234688584j))*x[1]**o + ((-0.949499709096-0.443908923022j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.206495898373-0.992614998214j)*x_ref[0]**o + ((-0.342506389444-0.543833441317j))*x_ref[0] + ((-0.702485143431+0.402234688584j))*x_ref[1]**o + ((-0.949499709096-0.443908923022j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(-0.0314193053174+0.83600994971j)*x[0]**o + ((0.209109716828-0.216485926239j))*x[0] + ((0.724289768807-0.658848736722j))*x[1]**o + ((-0.333264811264+0.395642568106j))*x[1]
        ref[(1, 0, 1, 2)]=(-0.0314193053174+0.83600994971j)*x_ref[0]**o + ((0.209109716828-0.216485926239j))*x_ref[0] + ((0.724289768807-0.658848736722j))*x_ref[1]**o + ((-0.333264811264+0.395642568106j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(0.392550104814+0.844381064522j)*x[0]**o + ((0.431628844073-0.499627245664j))*x[0] + ((-0.59725323989-0.758917441382j))*x[1]**o + ((0.85122321609+0.39427089329j))*x[1]
        ref[(1, 0, 2, 0)]=(0.392550104814+0.844381064522j)*x_ref[0]**o + ((0.431628844073-0.499627245664j))*x_ref[0] + ((-0.59725323989-0.758917441382j))*x_ref[1]**o + ((0.85122321609+0.39427089329j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(0.191502587933+0.216214070948j)*x[0]**o + ((-0.0244835926176+0.980913869889j))*x[0] + ((0.42940712953-0.0877583296738j))*x[1]**o + ((-0.15252321497-0.2676968316j))*x[1]
        ref[(1, 0, 2, 1)]=(0.191502587933+0.216214070948j)*x_ref[0]**o + ((-0.0244835926176+0.980913869889j))*x_ref[0] + ((0.42940712953-0.0877583296738j))*x_ref[1]**o + ((-0.15252321497-0.2676968316j))*x_ref[1]
        arg[(1, 0, 2, 2)]=(0.42634139294+0.658228442834j)*x[0]**o + ((0.179687310497-0.853369453392j))*x[0] + ((-0.3219091797-0.895506347357j))*x[1]**o + ((0.599175960511+0.859233126461j))*x[1]
        ref[(1, 0, 2, 2)]=(0.42634139294+0.658228442834j)*x_ref[0]**o + ((0.179687310497-0.853369453392j))*x_ref[0] + ((-0.3219091797-0.895506347357j))*x_ref[1]**o + ((0.599175960511+0.859233126461j))*x_ref[1]
        arg[(1, 0, 3, 0)]=(-0.194492798921+0.715274527743j)*x[0]**o + ((0.020206406719-0.695187355843j))*x[0] + ((0.171552597466-0.603934683791j))*x[1]**o + ((0.178457444095+0.272093736434j))*x[1]
        ref[(1, 0, 3, 0)]=(-0.194492798921+0.715274527743j)*x_ref[0]**o + ((0.020206406719-0.695187355843j))*x_ref[0] + ((0.171552597466-0.603934683791j))*x_ref[1]**o + ((0.178457444095+0.272093736434j))*x_ref[1]
        arg[(1, 0, 3, 1)]=(-0.259258806368+0.975265436165j)*x[0]**o + ((-0.510701024073-0.60127263049j))*x[0] + ((0.244442413613-0.185126140317j))*x[1]**o + ((0.186316984768+0.951448476922j))*x[1]
        ref[(1, 0, 3, 1)]=(-0.259258806368+0.975265436165j)*x_ref[0]**o + ((-0.510701024073-0.60127263049j))*x_ref[0] + ((0.244442413613-0.185126140317j))*x_ref[1]**o + ((0.186316984768+0.951448476922j))*x_ref[1]
        arg[(1, 0, 3, 2)]=(0.231553438437+0.0335256939502j)*x[0]**o + ((0.516023543163-0.500579775005j))*x[0] + ((0.347754338322-0.604814461989j))*x[1]**o + ((0.95813403383+0.577344659281j))*x[1]
        ref[(1, 0, 3, 2)]=(0.231553438437+0.0335256939502j)*x_ref[0]**o + ((0.516023543163-0.500579775005j))*x_ref[0] + ((0.347754338322-0.604814461989j))*x_ref[1]**o + ((0.95813403383+0.577344659281j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.190970818722+0.497475086744j)*x[0]**o + ((-0.827814395618-0.978521185107j))*x[0] + ((0.358351074814+0.401655361626j))*x[1]**o + ((0.749993969849-0.904399914343j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.190970818722+0.497475086744j)*x_ref[0]**o + ((-0.827814395618-0.978521185107j))*x_ref[0] + ((0.358351074814+0.401655361626j))*x_ref[1]**o + ((0.749993969849-0.904399914343j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.529943914301+0.891945704514j)*x[0]**o + ((0.029489433379-0.0842381181081j))*x[0] + ((-0.496379116126+0.567532246109j))*x[1]**o + ((0.574170500995+0.901825733683j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.529943914301+0.891945704514j)*x_ref[0]**o + ((0.029489433379-0.0842381181081j))*x_ref[0] + ((-0.496379116126+0.567532246109j))*x_ref[1]**o + ((0.574170500995+0.901825733683j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(-0.737288725789-0.776506542806j)*x[0]**o + ((-0.351801254139+0.121430100319j))*x[0] + ((0.221905162511-0.250044536898j))*x[1]**o + ((0.67182807439+0.143465452071j))*x[1]
        ref[(1, 1, 0, 2)]=(-0.737288725789-0.776506542806j)*x_ref[0]**o + ((-0.351801254139+0.121430100319j))*x_ref[0] + ((0.221905162511-0.250044536898j))*x_ref[1]**o + ((0.67182807439+0.143465452071j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.860291913706+0.408869189109j)*x[0]**o + ((0.4919012726+0.682345033602j))*x[0] + ((0.446867532724+0.484146859047j))*x[1]**o + ((0.853610606828-0.11179288811j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.860291913706+0.408869189109j)*x_ref[0]**o + ((0.4919012726+0.682345033602j))*x_ref[0] + ((0.446867532724+0.484146859047j))*x_ref[1]**o + ((0.853610606828-0.11179288811j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.0424157781285+0.090777752553j)*x[0]**o + ((0.472432778478-0.26315294374j))*x[0] + ((-0.94213608938-0.603655867884j))*x[1]**o + ((0.490212392303-0.59010163711j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.0424157781285+0.090777752553j)*x_ref[0]**o + ((0.472432778478-0.26315294374j))*x_ref[0] + ((-0.94213608938-0.603655867884j))*x_ref[1]**o + ((0.490212392303-0.59010163711j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(0.391327097476+0.363727406674j)*x[0]**o + ((0.364609363096-0.868132995938j))*x[0] + ((0.733816210279-0.813069697234j))*x[1]**o + ((-0.200698267097+0.546069392481j))*x[1]
        ref[(1, 1, 1, 2)]=(0.391327097476+0.363727406674j)*x_ref[0]**o + ((0.364609363096-0.868132995938j))*x_ref[0] + ((0.733816210279-0.813069697234j))*x_ref[1]**o + ((-0.200698267097+0.546069392481j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(0.097146863316+0.746311465154j)*x[0]**o + ((0.0407618582099+0.883790408445j))*x[0] + ((0.905157686581+0.807886349831j))*x[1]**o + ((-0.498527273837-0.260837045658j))*x[1]
        ref[(1, 1, 2, 0)]=(0.097146863316+0.746311465154j)*x_ref[0]**o + ((0.0407618582099+0.883790408445j))*x_ref[0] + ((0.905157686581+0.807886349831j))*x_ref[1]**o + ((-0.498527273837-0.260837045658j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(-0.923802329348+0.504615388014j)*x[0]**o + ((0.650603219009+0.564084614652j))*x[0] + ((0.889825652233+0.822082904537j))*x[1]**o + ((0.8551644516-0.198884107776j))*x[1]
        ref[(1, 1, 2, 1)]=(-0.923802329348+0.504615388014j)*x_ref[0]**o + ((0.650603219009+0.564084614652j))*x_ref[0] + ((0.889825652233+0.822082904537j))*x_ref[1]**o + ((0.8551644516-0.198884107776j))*x_ref[1]
        arg[(1, 1, 2, 2)]=(-0.98955214673+0.926676623508j)*x[0]**o + ((-0.218659781677+0.0836113213696j))*x[0] + ((-0.281242157329-0.381415108421j))*x[1]**o + ((-0.493369823524+0.185444706249j))*x[1]
        ref[(1, 1, 2, 2)]=(-0.98955214673+0.926676623508j)*x_ref[0]**o + ((-0.218659781677+0.0836113213696j))*x_ref[0] + ((-0.281242157329-0.381415108421j))*x_ref[1]**o + ((-0.493369823524+0.185444706249j))*x_ref[1]
        arg[(1, 1, 3, 0)]=(0.436089674347+0.645039953609j)*x[0]**o + ((-0.857831291338+0.665505962057j))*x[0] + ((0.218523057246-0.904953656333j))*x[1]**o + ((-0.804233706301+0.698238881931j))*x[1]
        ref[(1, 1, 3, 0)]=(0.436089674347+0.645039953609j)*x_ref[0]**o + ((-0.857831291338+0.665505962057j))*x_ref[0] + ((0.218523057246-0.904953656333j))*x_ref[1]**o + ((-0.804233706301+0.698238881931j))*x_ref[1]
        arg[(1, 1, 3, 1)]=(0.795476125261-0.777357006848j)*x[0]**o + ((0.971278913656-0.871758141723j))*x[0] + ((0.603813873059-0.695451332106j))*x[1]**o + ((0.443105706591-0.294317691677j))*x[1]
        ref[(1, 1, 3, 1)]=(0.795476125261-0.777357006848j)*x_ref[0]**o + ((0.971278913656-0.871758141723j))*x_ref[0] + ((0.603813873059-0.695451332106j))*x_ref[1]**o + ((0.443105706591-0.294317691677j))*x_ref[1]
        arg[(1, 1, 3, 2)]=(0.480154548372+0.160413873369j)*x[0]**o + ((-0.652823434949-0.290021207247j))*x[0] + ((0.912592709196-0.395886368996j))*x[1]**o + ((0.977128595814+0.977579129971j))*x[1]
        ref[(1, 1, 3, 2)]=(0.480154548372+0.160413873369j)*x_ref[0]**o + ((-0.652823434949-0.290021207247j))*x_ref[0] + ((0.912592709196-0.395886368996j))*x_ref[1]**o + ((0.977128595814+0.977579129971j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(-0.12660166473+0.429032806298j)*x[0]**o + ((-0.795826420906-0.0813777171509j))*x[0] + ((-0.561914972806+0.400514312886j))*x[1]**o + ((-0.246563764813+0.464416290017j))*x[1]
        ref[(1, 2, 0, 0)]=(-0.12660166473+0.429032806298j)*x_ref[0]**o + ((-0.795826420906-0.0813777171509j))*x_ref[0] + ((-0.561914972806+0.400514312886j))*x_ref[1]**o + ((-0.246563764813+0.464416290017j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(0.529184995449-0.779323058655j)*x[0]**o + ((-0.677151148873+0.145420418829j))*x[0] + ((-0.105538045934+0.165193909054j))*x[1]**o + ((0.447748724037-0.0210511625278j))*x[1]
        ref[(1, 2, 0, 1)]=(0.529184995449-0.779323058655j)*x_ref[0]**o + ((-0.677151148873+0.145420418829j))*x_ref[0] + ((-0.105538045934+0.165193909054j))*x_ref[1]**o + ((0.447748724037-0.0210511625278j))*x_ref[1]
        arg[(1, 2, 0, 2)]=(-0.766685016827+0.561907944366j)*x[0]**o + ((-0.109176644938-0.29354605129j))*x[0] + ((0.72454102628+0.708645462173j))*x[1]**o + ((0.479842896377-0.94930150218j))*x[1]
        ref[(1, 2, 0, 2)]=(-0.766685016827+0.561907944366j)*x_ref[0]**o + ((-0.109176644938-0.29354605129j))*x_ref[0] + ((0.72454102628+0.708645462173j))*x_ref[1]**o + ((0.479842896377-0.94930150218j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(-0.749255054536-0.20463985242j)*x[0]**o + ((0.746849189573+0.0586591229776j))*x[0] + ((0.110697775954-0.905398635025j))*x[1]**o + ((0.938049748351-0.509643430499j))*x[1]
        ref[(1, 2, 1, 0)]=(-0.749255054536-0.20463985242j)*x_ref[0]**o + ((0.746849189573+0.0586591229776j))*x_ref[0] + ((0.110697775954-0.905398635025j))*x_ref[1]**o + ((0.938049748351-0.509643430499j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(-0.392942712054+0.178667737006j)*x[0]**o + ((-0.835052507379+0.463841516217j))*x[0] + ((0.32940099297-0.230193925855j))*x[1]**o + ((0.0694446752512-0.403021416789j))*x[1]
        ref[(1, 2, 1, 1)]=(-0.392942712054+0.178667737006j)*x_ref[0]**o + ((-0.835052507379+0.463841516217j))*x_ref[0] + ((0.32940099297-0.230193925855j))*x_ref[1]**o + ((0.0694446752512-0.403021416789j))*x_ref[1]
        arg[(1, 2, 1, 2)]=(0.95179393121-9.4404961543e-05j)*x[0]**o + ((0.0301509790749-0.974659782852j))*x[0] + ((-0.860417713089+0.285861338969j))*x[1]**o + ((0.820193825843-0.759360996928j))*x[1]
        ref[(1, 2, 1, 2)]=(0.95179393121-9.4404961543e-05j)*x_ref[0]**o + ((0.0301509790749-0.974659782852j))*x_ref[0] + ((-0.860417713089+0.285861338969j))*x_ref[1]**o + ((0.820193825843-0.759360996928j))*x_ref[1]
        arg[(1, 2, 2, 0)]=(-0.329468922943+0.942626030661j)*x[0]**o + ((-0.411832962855-0.296648644147j))*x[0] + ((0.426707862742-0.545331659638j))*x[1]**o + ((0.826816370684+0.0455809431743j))*x[1]
        ref[(1, 2, 2, 0)]=(-0.329468922943+0.942626030661j)*x_ref[0]**o + ((-0.411832962855-0.296648644147j))*x_ref[0] + ((0.426707862742-0.545331659638j))*x_ref[1]**o + ((0.826816370684+0.0455809431743j))*x_ref[1]
        arg[(1, 2, 2, 1)]=(-0.199772902128+0.690300783206j)*x[0]**o + ((-0.965703435149-0.560018785601j))*x[0] + ((0.937239629293-0.816698318227j))*x[1]**o + ((0.00450942966463-0.405426407034j))*x[1]
        ref[(1, 2, 2, 1)]=(-0.199772902128+0.690300783206j)*x_ref[0]**o + ((-0.965703435149-0.560018785601j))*x_ref[0] + ((0.937239629293-0.816698318227j))*x_ref[1]**o + ((0.00450942966463-0.405426407034j))*x_ref[1]
        arg[(1, 2, 2, 2)]=(-0.799010540525-0.374957031412j)*x[0]**o + ((0.0158872441795-0.919245465516j))*x[0] + ((-0.492712853635-0.477011844974j))*x[1]**o + ((-0.828567550834+0.7137258336j))*x[1]
        ref[(1, 2, 2, 2)]=(-0.799010540525-0.374957031412j)*x_ref[0]**o + ((0.0158872441795-0.919245465516j))*x_ref[0] + ((-0.492712853635-0.477011844974j))*x_ref[1]**o + ((-0.828567550834+0.7137258336j))*x_ref[1]
        arg[(1, 2, 3, 0)]=(-0.776380030673-0.667659017795j)*x[0]**o + ((0.575276902861+0.797345795482j))*x[0] + ((-0.119530117215+0.00821068625388j))*x[1]**o + ((0.0151047112763+0.767571774787j))*x[1]
        ref[(1, 2, 3, 0)]=(-0.776380030673-0.667659017795j)*x_ref[0]**o + ((0.575276902861+0.797345795482j))*x_ref[0] + ((-0.119530117215+0.00821068625388j))*x_ref[1]**o + ((0.0151047112763+0.767571774787j))*x_ref[1]
        arg[(1, 2, 3, 1)]=(-0.440091471977+0.095162163133j)*x[0]**o + ((0.990195438847+0.574190830875j))*x[0] + ((-0.770506851722-0.832844176693j))*x[1]**o + ((-0.470579891348-0.41370476468j))*x[1]
        ref[(1, 2, 3, 1)]=(-0.440091471977+0.095162163133j)*x_ref[0]**o + ((0.990195438847+0.574190830875j))*x_ref[0] + ((-0.770506851722-0.832844176693j))*x_ref[1]**o + ((-0.470579891348-0.41370476468j))*x_ref[1]
        arg[(1, 2, 3, 2)]=(-0.80533349603-0.686435637508j)*x[0]**o + ((-0.847310208617-0.252823502465j))*x[0] + ((0.52649826067-0.0476541954279j))*x[1]**o + ((0.679603434395-0.982643496243j))*x[1]
        ref[(1, 2, 3, 2)]=(-0.80533349603-0.686435637508j)*x_ref[0]**o + ((-0.847310208617-0.252823502465j))*x_ref[0] + ((0.52649826067-0.0476541954279j))*x_ref[1]**o + ((0.679603434395-0.982643496243j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(0.0304401269738+0.893338083588j)*x[0]**o + ((-0.556308360594+0.857208752967j))*x[0] + ((0.963487142858+0.24167298065j))*x[1]**o + ((-0.632823541439-0.30375522516j))*x[1]
        ref[(2, 0, 0, 0)]=(0.0304401269738+0.893338083588j)*x_ref[0]**o + ((-0.556308360594+0.857208752967j))*x_ref[0] + ((0.963487142858+0.24167298065j))*x_ref[1]**o + ((-0.632823541439-0.30375522516j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(0.249441671659-0.80664114913j)*x[0]**o + ((0.322790028112+0.462956014729j))*x[0] + ((0.813318681867-0.138243262697j))*x[1]**o + ((-0.0344261166408-0.541911825918j))*x[1]
        ref[(2, 0, 0, 1)]=(0.249441671659-0.80664114913j)*x_ref[0]**o + ((0.322790028112+0.462956014729j))*x_ref[0] + ((0.813318681867-0.138243262697j))*x_ref[1]**o + ((-0.0344261166408-0.541911825918j))*x_ref[1]
        arg[(2, 0, 0, 2)]=(0.572041957074-0.226766232149j)*x[0]**o + ((0.689734011117+0.740012901179j))*x[0] + ((0.52381282666-0.0184430309606j))*x[1]**o + ((0.991884047585+0.572542512416j))*x[1]
        ref[(2, 0, 0, 2)]=(0.572041957074-0.226766232149j)*x_ref[0]**o + ((0.689734011117+0.740012901179j))*x_ref[0] + ((0.52381282666-0.0184430309606j))*x_ref[1]**o + ((0.991884047585+0.572542512416j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(0.717304159103+0.193336049763j)*x[0]**o + ((-0.794986534126+0.667850173472j))*x[0] + ((-0.25269319818-0.220357261491j))*x[1]**o + ((0.0800528481983-0.11929722887j))*x[1]
        ref[(2, 0, 1, 0)]=(0.717304159103+0.193336049763j)*x_ref[0]**o + ((-0.794986534126+0.667850173472j))*x_ref[0] + ((-0.25269319818-0.220357261491j))*x_ref[1]**o + ((0.0800528481983-0.11929722887j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.524502912991-0.55419966207j)*x[0]**o + ((0.203909667777+0.44392066468j))*x[0] + ((0.680705339959+0.0116067225395j))*x[1]**o + ((-0.592786311407+0.362501732221j))*x[1]
        ref[(2, 0, 1, 1)]=(0.524502912991-0.55419966207j)*x_ref[0]**o + ((0.203909667777+0.44392066468j))*x_ref[0] + ((0.680705339959+0.0116067225395j))*x_ref[1]**o + ((-0.592786311407+0.362501732221j))*x_ref[1]
        arg[(2, 0, 1, 2)]=(0.25776906758-0.298967469369j)*x[0]**o + ((-0.818302475769-0.20495678694j))*x[0] + ((-0.984167336048+0.917726303971j))*x[1]**o + ((0.40892566027-0.256603286555j))*x[1]
        ref[(2, 0, 1, 2)]=(0.25776906758-0.298967469369j)*x_ref[0]**o + ((-0.818302475769-0.20495678694j))*x_ref[0] + ((-0.984167336048+0.917726303971j))*x_ref[1]**o + ((0.40892566027-0.256603286555j))*x_ref[1]
        arg[(2, 0, 2, 0)]=(-0.8220002554+0.73134455047j)*x[0]**o + ((0.250045150536+0.775483258148j))*x[0] + ((-0.25166423075+0.170507057112j))*x[1]**o + ((-0.462698588531-0.553728330218j))*x[1]
        ref[(2, 0, 2, 0)]=(-0.8220002554+0.73134455047j)*x_ref[0]**o + ((0.250045150536+0.775483258148j))*x_ref[0] + ((-0.25166423075+0.170507057112j))*x_ref[1]**o + ((-0.462698588531-0.553728330218j))*x_ref[1]
        arg[(2, 0, 2, 1)]=(-0.660113457866-0.593260170777j)*x[0]**o + ((-0.017605745812+0.0536974304104j))*x[0] + ((0.790357912302+0.254656575619j))*x[1]**o + ((-0.869709422445-0.859667841761j))*x[1]
        ref[(2, 0, 2, 1)]=(-0.660113457866-0.593260170777j)*x_ref[0]**o + ((-0.017605745812+0.0536974304104j))*x_ref[0] + ((0.790357912302+0.254656575619j))*x_ref[1]**o + ((-0.869709422445-0.859667841761j))*x_ref[1]
        arg[(2, 0, 2, 2)]=(-0.288319182679-0.173049070067j)*x[0]**o + ((0.780925646645-0.86325244122j))*x[0] + ((-0.728874739068-0.827484855833j))*x[1]**o + ((0.035362384244-0.421831804629j))*x[1]
        ref[(2, 0, 2, 2)]=(-0.288319182679-0.173049070067j)*x_ref[0]**o + ((0.780925646645-0.86325244122j))*x_ref[0] + ((-0.728874739068-0.827484855833j))*x_ref[1]**o + ((0.035362384244-0.421831804629j))*x_ref[1]
        arg[(2, 0, 3, 0)]=(-0.926669082484+0.354767588417j)*x[0]**o + ((-0.117103551966+0.362225430288j))*x[0] + ((-0.440048015189-0.348114279792j))*x[1]**o + ((-0.661476867663+0.914783638845j))*x[1]
        ref[(2, 0, 3, 0)]=(-0.926669082484+0.354767588417j)*x_ref[0]**o + ((-0.117103551966+0.362225430288j))*x_ref[0] + ((-0.440048015189-0.348114279792j))*x_ref[1]**o + ((-0.661476867663+0.914783638845j))*x_ref[1]
        arg[(2, 0, 3, 1)]=(0.193994363135-0.434655859263j)*x[0]**o + ((-0.636401236735-0.715778758799j))*x[0] + ((-0.563706963294+0.87438745153j))*x[1]**o + ((0.351421583369-0.133617348871j))*x[1]
        ref[(2, 0, 3, 1)]=(0.193994363135-0.434655859263j)*x_ref[0]**o + ((-0.636401236735-0.715778758799j))*x_ref[0] + ((-0.563706963294+0.87438745153j))*x_ref[1]**o + ((0.351421583369-0.133617348871j))*x_ref[1]
        arg[(2, 0, 3, 2)]=(-0.00569215144228-0.598469915509j)*x[0]**o + ((0.0458863125661-0.911982913238j))*x[0] + ((-0.295490232676-0.630957218104j))*x[1]**o + ((-0.541721849492-0.176735004717j))*x[1]
        ref[(2, 0, 3, 2)]=(-0.00569215144228-0.598469915509j)*x_ref[0]**o + ((0.0458863125661-0.911982913238j))*x_ref[0] + ((-0.295490232676-0.630957218104j))*x_ref[1]**o + ((-0.541721849492-0.176735004717j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(-0.729227577602+0.0225803900388j)*x[0]**o + ((0.616931160995+0.941555272094j))*x[0] + ((-0.0433944578881+0.339638449469j))*x[1]**o + ((0.822730808053+0.366225227889j))*x[1]
        ref[(2, 1, 0, 0)]=(-0.729227577602+0.0225803900388j)*x_ref[0]**o + ((0.616931160995+0.941555272094j))*x_ref[0] + ((-0.0433944578881+0.339638449469j))*x_ref[1]**o + ((0.822730808053+0.366225227889j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(-0.226504154887-0.815179913507j)*x[0]**o + ((0.78284349649-0.80198260676j))*x[0] + ((-0.504560716237-0.862900262484j))*x[1]**o + ((0.902584721934+0.298498889493j))*x[1]
        ref[(2, 1, 0, 1)]=(-0.226504154887-0.815179913507j)*x_ref[0]**o + ((0.78284349649-0.80198260676j))*x_ref[0] + ((-0.504560716237-0.862900262484j))*x_ref[1]**o + ((0.902584721934+0.298498889493j))*x_ref[1]
        arg[(2, 1, 0, 2)]=(-0.91373617231+0.691948151339j)*x[0]**o + ((-0.854378058645+0.807165858422j))*x[0] + ((0.78710018945+0.18758907618j))*x[1]**o + ((0.870779804101-0.917881490709j))*x[1]
        ref[(2, 1, 0, 2)]=(-0.91373617231+0.691948151339j)*x_ref[0]**o + ((-0.854378058645+0.807165858422j))*x_ref[0] + ((0.78710018945+0.18758907618j))*x_ref[1]**o + ((0.870779804101-0.917881490709j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(0.454404502594-0.885783771374j)*x[0]**o + ((-0.00701522131924+0.385373756145j))*x[0] + ((-0.702178093443-0.242632457596j))*x[1]**o + ((-0.75931761741-0.0974111731942j))*x[1]
        ref[(2, 1, 1, 0)]=(0.454404502594-0.885783771374j)*x_ref[0]**o + ((-0.00701522131924+0.385373756145j))*x_ref[0] + ((-0.702178093443-0.242632457596j))*x_ref[1]**o + ((-0.75931761741-0.0974111731942j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(0.42177548533+0.892823491937j)*x[0]**o + ((0.555209516505+0.527682079442j))*x[0] + ((0.915115279827+0.248904816613j))*x[1]**o + ((-0.60631607209-0.603556616118j))*x[1]
        ref[(2, 1, 1, 1)]=(0.42177548533+0.892823491937j)*x_ref[0]**o + ((0.555209516505+0.527682079442j))*x_ref[0] + ((0.915115279827+0.248904816613j))*x_ref[1]**o + ((-0.60631607209-0.603556616118j))*x_ref[1]
        arg[(2, 1, 1, 2)]=(-0.426897114228+0.770272476673j)*x[0]**o + ((-0.739927856618+0.161526748925j))*x[0] + ((0.945524366458-0.993320810574j))*x[1]**o + ((0.234255190188-0.19552746324j))*x[1]
        ref[(2, 1, 1, 2)]=(-0.426897114228+0.770272476673j)*x_ref[0]**o + ((-0.739927856618+0.161526748925j))*x_ref[0] + ((0.945524366458-0.993320810574j))*x_ref[1]**o + ((0.234255190188-0.19552746324j))*x_ref[1]
        arg[(2, 1, 2, 0)]=(0.0652011793813+0.274253095248j)*x[0]**o + ((0.605648392003-0.627674036278j))*x[0] + ((-0.371565022926+0.330392270682j))*x[1]**o + ((-0.808321221919+0.805668409408j))*x[1]
        ref[(2, 1, 2, 0)]=(0.0652011793813+0.274253095248j)*x_ref[0]**o + ((0.605648392003-0.627674036278j))*x_ref[0] + ((-0.371565022926+0.330392270682j))*x_ref[1]**o + ((-0.808321221919+0.805668409408j))*x_ref[1]
        arg[(2, 1, 2, 1)]=(-0.467686419951+0.619265524277j)*x[0]**o + ((0.680173084686+0.735554899402j))*x[0] + ((0.00976549835948-0.608719236705j))*x[1]**o + ((-0.955524980405-0.832622218613j))*x[1]
        ref[(2, 1, 2, 1)]=(-0.467686419951+0.619265524277j)*x_ref[0]**o + ((0.680173084686+0.735554899402j))*x_ref[0] + ((0.00976549835948-0.608719236705j))*x_ref[1]**o + ((-0.955524980405-0.832622218613j))*x_ref[1]
        arg[(2, 1, 2, 2)]=(-0.811505341567+0.379174249131j)*x[0]**o + ((-0.220061722001-0.176482399976j))*x[0] + ((-0.0629796566012-0.610563522959j))*x[1]**o + ((-0.0593689750368+0.682580239491j))*x[1]
        ref[(2, 1, 2, 2)]=(-0.811505341567+0.379174249131j)*x_ref[0]**o + ((-0.220061722001-0.176482399976j))*x_ref[0] + ((-0.0629796566012-0.610563522959j))*x_ref[1]**o + ((-0.0593689750368+0.682580239491j))*x_ref[1]
        arg[(2, 1, 3, 0)]=(-0.831658961048+0.246060153521j)*x[0]**o + ((-0.35594411769+0.186630389609j))*x[0] + ((-0.028635594655-0.483541915767j))*x[1]**o + ((-0.831745752393-0.544311163381j))*x[1]
        ref[(2, 1, 3, 0)]=(-0.831658961048+0.246060153521j)*x_ref[0]**o + ((-0.35594411769+0.186630389609j))*x_ref[0] + ((-0.028635594655-0.483541915767j))*x_ref[1]**o + ((-0.831745752393-0.544311163381j))*x_ref[1]
        arg[(2, 1, 3, 1)]=(-0.553062708857+0.913166463066j)*x[0]**o + ((0.293809617901+0.683794722559j))*x[0] + ((-0.0959964839407+0.658599187417j))*x[1]**o + ((0.239479048678+0.569987817265j))*x[1]
        ref[(2, 1, 3, 1)]=(-0.553062708857+0.913166463066j)*x_ref[0]**o + ((0.293809617901+0.683794722559j))*x_ref[0] + ((-0.0959964839407+0.658599187417j))*x_ref[1]**o + ((0.239479048678+0.569987817265j))*x_ref[1]
        arg[(2, 1, 3, 2)]=(-0.692945859974+0.639058584779j)*x[0]**o + ((0.828773538627-0.702991827319j))*x[0] + ((0.57258095805+0.442025883482j))*x[1]**o + ((0.995459258732-0.754210544011j))*x[1]
        ref[(2, 1, 3, 2)]=(-0.692945859974+0.639058584779j)*x_ref[0]**o + ((0.828773538627-0.702991827319j))*x_ref[0] + ((0.57258095805+0.442025883482j))*x_ref[1]**o + ((0.995459258732-0.754210544011j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(0.455480219596+0.459501224652j)*x[0]**o + ((-0.160700943325-0.631599045131j))*x[0] + ((0.777612789845+0.825211052498j))*x[1]**o + ((0.972849935564+0.92305056291j))*x[1]
        ref[(2, 2, 0, 0)]=(0.455480219596+0.459501224652j)*x_ref[0]**o + ((-0.160700943325-0.631599045131j))*x_ref[0] + ((0.777612789845+0.825211052498j))*x_ref[1]**o + ((0.972849935564+0.92305056291j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(-0.974419773337-0.541124801133j)*x[0]**o + ((0.864513519671-0.775722212991j))*x[0] + ((-0.127418608114+0.302801992398j))*x[1]**o + ((-0.894505036587+0.456233749688j))*x[1]
        ref[(2, 2, 0, 1)]=(-0.974419773337-0.541124801133j)*x_ref[0]**o + ((0.864513519671-0.775722212991j))*x_ref[0] + ((-0.127418608114+0.302801992398j))*x_ref[1]**o + ((-0.894505036587+0.456233749688j))*x_ref[1]
        arg[(2, 2, 0, 2)]=(-0.0285412564288+0.995170480286j)*x[0]**o + ((0.501043944221+0.364822760692j))*x[0] + ((-0.0538450676526+0.828104000695j))*x[1]**o + ((0.00214195080811+0.00278102963823j))*x[1]
        ref[(2, 2, 0, 2)]=(-0.0285412564288+0.995170480286j)*x_ref[0]**o + ((0.501043944221+0.364822760692j))*x_ref[0] + ((-0.0538450676526+0.828104000695j))*x_ref[1]**o + ((0.00214195080811+0.00278102963823j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(0.262348921911+0.939814514288j)*x[0]**o + ((-0.65307867747-0.239892136706j))*x[0] + ((-0.614328763556-0.600627180515j))*x[1]**o + ((0.735359859972-0.815725542493j))*x[1]
        ref[(2, 2, 1, 0)]=(0.262348921911+0.939814514288j)*x_ref[0]**o + ((-0.65307867747-0.239892136706j))*x_ref[0] + ((-0.614328763556-0.600627180515j))*x_ref[1]**o + ((0.735359859972-0.815725542493j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(0.503912527911-0.0831723503509j)*x[0]**o + ((-0.196551034368-0.0949912936828j))*x[0] + ((0.88833580298+0.51705746446j))*x[1]**o + ((-0.292333936948-0.923247509173j))*x[1]
        ref[(2, 2, 1, 1)]=(0.503912527911-0.0831723503509j)*x_ref[0]**o + ((-0.196551034368-0.0949912936828j))*x_ref[0] + ((0.88833580298+0.51705746446j))*x_ref[1]**o + ((-0.292333936948-0.923247509173j))*x_ref[1]
        arg[(2, 2, 1, 2)]=(-0.390834713341-0.713683978554j)*x[0]**o + ((0.877408683015-0.603335320741j))*x[0] + ((-0.600346251902-0.115547752734j))*x[1]**o + ((0.323343814779-0.573006264163j))*x[1]
        ref[(2, 2, 1, 2)]=(-0.390834713341-0.713683978554j)*x_ref[0]**o + ((0.877408683015-0.603335320741j))*x_ref[0] + ((-0.600346251902-0.115547752734j))*x_ref[1]**o + ((0.323343814779-0.573006264163j))*x_ref[1]
        arg[(2, 2, 2, 0)]=(-0.498782234666+0.582242695581j)*x[0]**o + ((-0.862199172557-0.936663386768j))*x[0] + ((0.401074845045-0.893725436963j))*x[1]**o + ((-0.603400036977+0.086490095506j))*x[1]
        ref[(2, 2, 2, 0)]=(-0.498782234666+0.582242695581j)*x_ref[0]**o + ((-0.862199172557-0.936663386768j))*x_ref[0] + ((0.401074845045-0.893725436963j))*x_ref[1]**o + ((-0.603400036977+0.086490095506j))*x_ref[1]
        arg[(2, 2, 2, 1)]=(0.849819829769-0.477411347583j)*x[0]**o + ((0.404311632512+0.319852646508j))*x[0] + ((-0.190382515643-0.810384394219j))*x[1]**o + ((-0.939241399475+0.863156435533j))*x[1]
        ref[(2, 2, 2, 1)]=(0.849819829769-0.477411347583j)*x_ref[0]**o + ((0.404311632512+0.319852646508j))*x_ref[0] + ((-0.190382515643-0.810384394219j))*x_ref[1]**o + ((-0.939241399475+0.863156435533j))*x_ref[1]
        arg[(2, 2, 2, 2)]=(-0.064698452913-0.5715909524j)*x[0]**o + ((-0.777730013453+0.686584296419j))*x[0] + ((0.364562545103+0.832237341258j))*x[1]**o + ((0.514571292415+0.35359811265j))*x[1]
        ref[(2, 2, 2, 2)]=(-0.064698452913-0.5715909524j)*x_ref[0]**o + ((-0.777730013453+0.686584296419j))*x_ref[0] + ((0.364562545103+0.832237341258j))*x_ref[1]**o + ((0.514571292415+0.35359811265j))*x_ref[1]
        arg[(2, 2, 3, 0)]=(-0.206903867714-0.861226756443j)*x[0]**o + ((0.00796039319825-0.301767058361j))*x[0] + ((-0.765937188879-0.0982223947212j))*x[1]**o + ((-0.299257991067+0.414124784066j))*x[1]
        ref[(2, 2, 3, 0)]=(-0.206903867714-0.861226756443j)*x_ref[0]**o + ((0.00796039319825-0.301767058361j))*x_ref[0] + ((-0.765937188879-0.0982223947212j))*x_ref[1]**o + ((-0.299257991067+0.414124784066j))*x_ref[1]
        arg[(2, 2, 3, 1)]=(0.810528246528+0.359516517171j)*x[0]**o + ((-0.473803463246+0.431740129438j))*x[0] + ((0.62142413974+0.761823783608j))*x[1]**o + ((-0.179017826399+0.42860317577j))*x[1]
        ref[(2, 2, 3, 1)]=(0.810528246528+0.359516517171j)*x_ref[0]**o + ((-0.473803463246+0.431740129438j))*x_ref[0] + ((0.62142413974+0.761823783608j))*x_ref[1]**o + ((-0.179017826399+0.42860317577j))*x_ref[1]
        arg[(2, 2, 3, 2)]=(-0.173593937194-0.616454371213j)*x[0]**o + ((-0.755143495801-0.408416698283j))*x[0] + ((0.1413730837-0.460593050443j))*x[1]**o + ((-0.398593757023+0.690948561586j))*x[1]
        ref[(2, 2, 3, 2)]=(-0.173593937194-0.616454371213j)*x_ref[0]**o + ((-0.755143495801-0.408416698283j))*x_ref[0] + ((0.1413730837-0.460593050443j))*x_ref[1]**o + ((-0.398593757023+0.690948561586j))*x_ref[1]
        arg[(3, 0, 0, 0)]=(0.119343475158-0.110297767484j)*x[0]**o + ((0.230361022875+0.9370607923j))*x[0] + ((-0.316524290677-0.285488109466j))*x[1]**o + ((0.484444044163-0.834371908039j))*x[1]
        ref[(3, 0, 0, 0)]=(0.119343475158-0.110297767484j)*x_ref[0]**o + ((0.230361022875+0.9370607923j))*x_ref[0] + ((-0.316524290677-0.285488109466j))*x_ref[1]**o + ((0.484444044163-0.834371908039j))*x_ref[1]
        arg[(3, 0, 0, 1)]=(0.721484035937-0.00948587416067j)*x[0]**o + ((-0.472265617861-0.563557582214j))*x[0] + ((-0.315621865329-0.649620840565j))*x[1]**o + ((0.906181036344-0.696605144821j))*x[1]
        ref[(3, 0, 0, 1)]=(0.721484035937-0.00948587416067j)*x_ref[0]**o + ((-0.472265617861-0.563557582214j))*x_ref[0] + ((-0.315621865329-0.649620840565j))*x_ref[1]**o + ((0.906181036344-0.696605144821j))*x_ref[1]
        arg[(3, 0, 0, 2)]=(-0.0237675828436-0.226301470577j)*x[0]**o + ((-0.712659166847-0.341087059304j))*x[0] + ((-0.125667271777-0.105964586853j))*x[1]**o + ((0.254120921152+0.0684922327111j))*x[1]
        ref[(3, 0, 0, 2)]=(-0.0237675828436-0.226301470577j)*x_ref[0]**o + ((-0.712659166847-0.341087059304j))*x_ref[0] + ((-0.125667271777-0.105964586853j))*x_ref[1]**o + ((0.254120921152+0.0684922327111j))*x_ref[1]
        arg[(3, 0, 1, 0)]=(0.489999927666+0.674216919134j)*x[0]**o + ((-0.388638114021-0.643336643701j))*x[0] + ((-0.648145396914-0.982642788598j))*x[1]**o + ((-0.562759511916+0.791531300488j))*x[1]
        ref[(3, 0, 1, 0)]=(0.489999927666+0.674216919134j)*x_ref[0]**o + ((-0.388638114021-0.643336643701j))*x_ref[0] + ((-0.648145396914-0.982642788598j))*x_ref[1]**o + ((-0.562759511916+0.791531300488j))*x_ref[1]
        arg[(3, 0, 1, 1)]=(-0.73656533113-0.355907698442j)*x[0]**o + ((-0.780772655765+0.861914483476j))*x[0] + ((0.880695971232+0.816746497681j))*x[1]**o + ((-0.643826471092+0.435529103754j))*x[1]
        ref[(3, 0, 1, 1)]=(-0.73656533113-0.355907698442j)*x_ref[0]**o + ((-0.780772655765+0.861914483476j))*x_ref[0] + ((0.880695971232+0.816746497681j))*x_ref[1]**o + ((-0.643826471092+0.435529103754j))*x_ref[1]
        arg[(3, 0, 1, 2)]=(-0.42203438304-0.652526321011j)*x[0]**o + ((-0.373136429493+0.100016970146j))*x[0] + ((0.42146809289-0.314539470968j))*x[1]**o + ((-0.959672969882-0.159240691134j))*x[1]
        ref[(3, 0, 1, 2)]=(-0.42203438304-0.652526321011j)*x_ref[0]**o + ((-0.373136429493+0.100016970146j))*x_ref[0] + ((0.42146809289-0.314539470968j))*x_ref[1]**o + ((-0.959672969882-0.159240691134j))*x_ref[1]
        arg[(3, 0, 2, 0)]=(0.967064694872+0.591990556096j)*x[0]**o + ((-0.0337867360259+0.508282665629j))*x[0] + ((-0.349280971393+0.52230780391j))*x[1]**o + ((-0.709803031915-0.83509273255j))*x[1]
        ref[(3, 0, 2, 0)]=(0.967064694872+0.591990556096j)*x_ref[0]**o + ((-0.0337867360259+0.508282665629j))*x_ref[0] + ((-0.349280971393+0.52230780391j))*x_ref[1]**o + ((-0.709803031915-0.83509273255j))*x_ref[1]
        arg[(3, 0, 2, 1)]=(0.618104197646+0.0970652978126j)*x[0]**o + ((-0.157110388808+0.240533982197j))*x[0] + ((-0.619705560618-0.761425293118j))*x[1]**o + ((-0.341573764319+0.292846708288j))*x[1]
        ref[(3, 0, 2, 1)]=(0.618104197646+0.0970652978126j)*x_ref[0]**o + ((-0.157110388808+0.240533982197j))*x_ref[0] + ((-0.619705560618-0.761425293118j))*x_ref[1]**o + ((-0.341573764319+0.292846708288j))*x_ref[1]
        arg[(3, 0, 2, 2)]=(0.0696642858374+0.203209577004j)*x[0]**o + ((-0.739005321961-0.935655898231j))*x[0] + ((-0.5815082192+0.382483519688j))*x[1]**o + ((-0.128588532115-0.69268690674j))*x[1]
        ref[(3, 0, 2, 2)]=(0.0696642858374+0.203209577004j)*x_ref[0]**o + ((-0.739005321961-0.935655898231j))*x_ref[0] + ((-0.5815082192+0.382483519688j))*x_ref[1]**o + ((-0.128588532115-0.69268690674j))*x_ref[1]
        arg[(3, 0, 3, 0)]=(-0.846489286293+0.0581210450176j)*x[0]**o + ((0.406363396687+0.801465630604j))*x[0] + ((0.422877247924-0.867308613003j))*x[1]**o + ((0.733394032858-0.965690790733j))*x[1]
        ref[(3, 0, 3, 0)]=(-0.846489286293+0.0581210450176j)*x_ref[0]**o + ((0.406363396687+0.801465630604j))*x_ref[0] + ((0.422877247924-0.867308613003j))*x_ref[1]**o + ((0.733394032858-0.965690790733j))*x_ref[1]
        arg[(3, 0, 3, 1)]=(0.898364882079-0.359100212582j)*x[0]**o + ((0.729032649765-0.431332241729j))*x[0] + ((0.518750048319-0.286089172812j))*x[1]**o + ((-0.844075263058-0.963691615226j))*x[1]
        ref[(3, 0, 3, 1)]=(0.898364882079-0.359100212582j)*x_ref[0]**o + ((0.729032649765-0.431332241729j))*x_ref[0] + ((0.518750048319-0.286089172812j))*x_ref[1]**o + ((-0.844075263058-0.963691615226j))*x_ref[1]
        arg[(3, 0, 3, 2)]=(0.0355911382366+0.215141615094j)*x[0]**o + ((0.0229777840057+0.929788254235j))*x[0] + ((0.35916084834-0.850441985194j))*x[1]**o + ((-0.589444304755+0.890125447286j))*x[1]
        ref[(3, 0, 3, 2)]=(0.0355911382366+0.215141615094j)*x_ref[0]**o + ((0.0229777840057+0.929788254235j))*x_ref[0] + ((0.35916084834-0.850441985194j))*x_ref[1]**o + ((-0.589444304755+0.890125447286j))*x_ref[1]
        arg[(3, 1, 0, 0)]=(0.566235588324+0.425232254366j)*x[0]**o + ((-0.64306208594-0.24196274473j))*x[0] + ((0.382030724753-0.741999046465j))*x[1]**o + ((0.209937056831-0.213018756511j))*x[1]
        ref[(3, 1, 0, 0)]=(0.566235588324+0.425232254366j)*x_ref[0]**o + ((-0.64306208594-0.24196274473j))*x_ref[0] + ((0.382030724753-0.741999046465j))*x_ref[1]**o + ((0.209937056831-0.213018756511j))*x_ref[1]
        arg[(3, 1, 0, 1)]=(-0.609636169021-0.0816512742802j)*x[0]**o + ((0.710936370045+0.372290836954j))*x[0] + ((-0.145133118471-0.240083014471j))*x[1]**o + ((-0.0263838047695-0.655001105459j))*x[1]
        ref[(3, 1, 0, 1)]=(-0.609636169021-0.0816512742802j)*x_ref[0]**o + ((0.710936370045+0.372290836954j))*x_ref[0] + ((-0.145133118471-0.240083014471j))*x_ref[1]**o + ((-0.0263838047695-0.655001105459j))*x_ref[1]
        arg[(3, 1, 0, 2)]=(0.795717405926-0.726456373086j)*x[0]**o + ((0.0374396604932-0.523596305975j))*x[0] + ((-0.862019961222+0.992284116136j))*x[1]**o + ((0.544693739193-0.50909942754j))*x[1]
        ref[(3, 1, 0, 2)]=(0.795717405926-0.726456373086j)*x_ref[0]**o + ((0.0374396604932-0.523596305975j))*x_ref[0] + ((-0.862019961222+0.992284116136j))*x_ref[1]**o + ((0.544693739193-0.50909942754j))*x_ref[1]
        arg[(3, 1, 1, 0)]=(0.5294255542-0.269093254549j)*x[0]**o + ((0.715143204704-0.0304707829694j))*x[0] + ((0.0805574648522-0.286518528931j))*x[1]**o + ((0.382684632478+0.0843481245035j))*x[1]
        ref[(3, 1, 1, 0)]=(0.5294255542-0.269093254549j)*x_ref[0]**o + ((0.715143204704-0.0304707829694j))*x_ref[0] + ((0.0805574648522-0.286518528931j))*x_ref[1]**o + ((0.382684632478+0.0843481245035j))*x_ref[1]
        arg[(3, 1, 1, 1)]=(0.0594413732725-0.563239523124j)*x[0]**o + ((-0.300643022443+0.50540930871j))*x[0] + ((0.903316408933-0.348679319669j))*x[1]**o + ((0.677120390263+0.968733119098j))*x[1]
        ref[(3, 1, 1, 1)]=(0.0594413732725-0.563239523124j)*x_ref[0]**o + ((-0.300643022443+0.50540930871j))*x_ref[0] + ((0.903316408933-0.348679319669j))*x_ref[1]**o + ((0.677120390263+0.968733119098j))*x_ref[1]
        arg[(3, 1, 1, 2)]=(-0.983722895234+0.870120562598j)*x[0]**o + ((-0.722086950416-0.000763717892243j))*x[0] + ((0.531870533787-0.757185447832j))*x[1]**o + ((-0.653727051185+0.653300945514j))*x[1]
        ref[(3, 1, 1, 2)]=(-0.983722895234+0.870120562598j)*x_ref[0]**o + ((-0.722086950416-0.000763717892243j))*x_ref[0] + ((0.531870533787-0.757185447832j))*x_ref[1]**o + ((-0.653727051185+0.653300945514j))*x_ref[1]
        arg[(3, 1, 2, 0)]=(0.335361670402+0.566730679073j)*x[0]**o + ((-0.96804751558+0.380492834388j))*x[0] + ((-0.525449883084+0.639101748708j))*x[1]**o + ((0.854125068338-0.17276842618j))*x[1]
        ref[(3, 1, 2, 0)]=(0.335361670402+0.566730679073j)*x_ref[0]**o + ((-0.96804751558+0.380492834388j))*x_ref[0] + ((-0.525449883084+0.639101748708j))*x_ref[1]**o + ((0.854125068338-0.17276842618j))*x_ref[1]
        arg[(3, 1, 2, 1)]=(0.120255145617+0.788229566133j)*x[0]**o + ((0.158387052046+0.908829908786j))*x[0] + ((0.597831036933-0.781890893619j))*x[1]**o + ((-0.380729744841+0.53661823349j))*x[1]
        ref[(3, 1, 2, 1)]=(0.120255145617+0.788229566133j)*x_ref[0]**o + ((0.158387052046+0.908829908786j))*x_ref[0] + ((0.597831036933-0.781890893619j))*x_ref[1]**o + ((-0.380729744841+0.53661823349j))*x_ref[1]
        arg[(3, 1, 2, 2)]=(0.797593294207+0.655060673129j)*x[0]**o + ((-0.284820082113+0.656453867112j))*x[0] + ((0.861505398852-0.798381167738j))*x[1]**o + ((-0.545531825433-0.27229562188j))*x[1]
        ref[(3, 1, 2, 2)]=(0.797593294207+0.655060673129j)*x_ref[0]**o + ((-0.284820082113+0.656453867112j))*x_ref[0] + ((0.861505398852-0.798381167738j))*x_ref[1]**o + ((-0.545531825433-0.27229562188j))*x_ref[1]
        arg[(3, 1, 3, 0)]=(-0.911050775367+0.33823742642j)*x[0]**o + ((0.458591868416+0.193381421171j))*x[0] + ((-0.0811263217328+0.249363860336j))*x[1]**o + ((0.268430655715+0.704375531705j))*x[1]
        ref[(3, 1, 3, 0)]=(-0.911050775367+0.33823742642j)*x_ref[0]**o + ((0.458591868416+0.193381421171j))*x_ref[0] + ((-0.0811263217328+0.249363860336j))*x_ref[1]**o + ((0.268430655715+0.704375531705j))*x_ref[1]
        arg[(3, 1, 3, 1)]=(-0.585448613943+0.529621133255j)*x[0]**o + ((0.732117761808+0.140765236949j))*x[0] + ((-0.7137892504+0.685502283066j))*x[1]**o + ((-0.274985300779+0.854475772261j))*x[1]
        ref[(3, 1, 3, 1)]=(-0.585448613943+0.529621133255j)*x_ref[0]**o + ((0.732117761808+0.140765236949j))*x_ref[0] + ((-0.7137892504+0.685502283066j))*x_ref[1]**o + ((-0.274985300779+0.854475772261j))*x_ref[1]
        arg[(3, 1, 3, 2)]=(0.598051061775+0.877458633441j)*x[0]**o + ((0.293076200079+0.670823018915j))*x[0] + ((-0.891963457658+0.520248628702j))*x[1]**o + ((-0.964449197795+0.613241168392j))*x[1]
        ref[(3, 1, 3, 2)]=(0.598051061775+0.877458633441j)*x_ref[0]**o + ((0.293076200079+0.670823018915j))*x_ref[0] + ((-0.891963457658+0.520248628702j))*x_ref[1]**o + ((-0.964449197795+0.613241168392j))*x_ref[1]
        arg[(3, 2, 0, 0)]=(-0.718975863676-0.332664002288j)*x[0]**o + ((-0.443730750724-0.932124077936j))*x[0] + ((0.432848950492+0.907323488326j))*x[1]**o + ((-0.739184176248+0.511285301677j))*x[1]
        ref[(3, 2, 0, 0)]=(-0.718975863676-0.332664002288j)*x_ref[0]**o + ((-0.443730750724-0.932124077936j))*x_ref[0] + ((0.432848950492+0.907323488326j))*x_ref[1]**o + ((-0.739184176248+0.511285301677j))*x_ref[1]
        arg[(3, 2, 0, 1)]=(-0.237765880273-0.866694715323j)*x[0]**o + ((-0.485636741337+0.230771807971j))*x[0] + ((-0.522061583216+0.621202876092j))*x[1]**o + ((-0.893116128337-0.491995810468j))*x[1]
        ref[(3, 2, 0, 1)]=(-0.237765880273-0.866694715323j)*x_ref[0]**o + ((-0.485636741337+0.230771807971j))*x_ref[0] + ((-0.522061583216+0.621202876092j))*x_ref[1]**o + ((-0.893116128337-0.491995810468j))*x_ref[1]
        arg[(3, 2, 0, 2)]=(0.647142887497+0.317778226328j)*x[0]**o + ((0.860288975998-0.730771775046j))*x[0] + ((0.125521881476+0.0900042829667j))*x[1]**o + ((-0.507864282756+0.0099710279617j))*x[1]
        ref[(3, 2, 0, 2)]=(0.647142887497+0.317778226328j)*x_ref[0]**o + ((0.860288975998-0.730771775046j))*x_ref[0] + ((0.125521881476+0.0900042829667j))*x_ref[1]**o + ((-0.507864282756+0.0099710279617j))*x_ref[1]
        arg[(3, 2, 1, 0)]=(0.12068421239+0.615043403814j)*x[0]**o + ((-0.510738407329-0.150318785709j))*x[0] + ((0.91678297677+0.0049588894979j))*x[1]**o + ((0.519609994621-0.907671254722j))*x[1]
        ref[(3, 2, 1, 0)]=(0.12068421239+0.615043403814j)*x_ref[0]**o + ((-0.510738407329-0.150318785709j))*x_ref[0] + ((0.91678297677+0.0049588894979j))*x_ref[1]**o + ((0.519609994621-0.907671254722j))*x_ref[1]
        arg[(3, 2, 1, 1)]=(-0.0371498462898+0.452361793295j)*x[0]**o + ((-0.975397142924-0.899990053725j))*x[0] + ((0.908880380142-0.911660197066j))*x[1]**o + ((0.677658050917-0.845655799768j))*x[1]
        ref[(3, 2, 1, 1)]=(-0.0371498462898+0.452361793295j)*x_ref[0]**o + ((-0.975397142924-0.899990053725j))*x_ref[0] + ((0.908880380142-0.911660197066j))*x_ref[1]**o + ((0.677658050917-0.845655799768j))*x_ref[1]
        arg[(3, 2, 1, 2)]=(-0.341373127654-0.639757618725j)*x[0]**o + ((-0.0368444298638-0.15872708785j))*x[0] + ((-0.971974465441+0.922587120951j))*x[1]**o + ((0.733115577169+0.0228638888076j))*x[1]
        ref[(3, 2, 1, 2)]=(-0.341373127654-0.639757618725j)*x_ref[0]**o + ((-0.0368444298638-0.15872708785j))*x_ref[0] + ((-0.971974465441+0.922587120951j))*x_ref[1]**o + ((0.733115577169+0.0228638888076j))*x_ref[1]
        arg[(3, 2, 2, 0)]=(-0.165997523089-0.225079098417j)*x[0]**o + ((0.951005768955-0.150345380578j))*x[0] + ((-0.435546691768-0.097941979935j))*x[1]**o + ((-0.822816549977-0.163704937498j))*x[1]
        ref[(3, 2, 2, 0)]=(-0.165997523089-0.225079098417j)*x_ref[0]**o + ((0.951005768955-0.150345380578j))*x_ref[0] + ((-0.435546691768-0.097941979935j))*x_ref[1]**o + ((-0.822816549977-0.163704937498j))*x_ref[1]
        arg[(3, 2, 2, 1)]=(-0.275708589804+0.0447242486761j)*x[0]**o + ((-0.784767603912-0.304343810649j))*x[0] + ((0.361920909326-0.368866578393j))*x[1]**o + ((0.129130045681-0.556281196241j))*x[1]
        ref[(3, 2, 2, 1)]=(-0.275708589804+0.0447242486761j)*x_ref[0]**o + ((-0.784767603912-0.304343810649j))*x_ref[0] + ((0.361920909326-0.368866578393j))*x_ref[1]**o + ((0.129130045681-0.556281196241j))*x_ref[1]
        arg[(3, 2, 2, 2)]=(-0.858484293875+0.996630292497j)*x[0]**o + ((0.698315458285+0.6521059613j))*x[0] + ((-0.196322872258+0.575150612828j))*x[1]**o + ((-0.292205090398-0.586829953247j))*x[1]
        ref[(3, 2, 2, 2)]=(-0.858484293875+0.996630292497j)*x_ref[0]**o + ((0.698315458285+0.6521059613j))*x_ref[0] + ((-0.196322872258+0.575150612828j))*x_ref[1]**o + ((-0.292205090398-0.586829953247j))*x_ref[1]
        arg[(3, 2, 3, 0)]=(-0.304748460983+0.889963336864j)*x[0]**o + ((-0.763203613421-0.598159225837j))*x[0] + ((-0.864008494279+0.625442470717j))*x[1]**o + ((0.326800998559-0.442755845225j))*x[1]
        ref[(3, 2, 3, 0)]=(-0.304748460983+0.889963336864j)*x_ref[0]**o + ((-0.763203613421-0.598159225837j))*x_ref[0] + ((-0.864008494279+0.625442470717j))*x_ref[1]**o + ((0.326800998559-0.442755845225j))*x_ref[1]
        arg[(3, 2, 3, 1)]=(0.057202089256-0.255866335516j)*x[0]**o + ((-0.886329357203+0.410200027675j))*x[0] + ((-0.010966137179+0.0909543915578j))*x[1]**o + ((-0.332819305224+0.186446690581j))*x[1]
        ref[(3, 2, 3, 1)]=(0.057202089256-0.255866335516j)*x_ref[0]**o + ((-0.886329357203+0.410200027675j))*x_ref[0] + ((-0.010966137179+0.0909543915578j))*x_ref[1]**o + ((-0.332819305224+0.186446690581j))*x_ref[1]
        arg[(3, 2, 3, 2)]=(-0.365869524854+0.581882877101j)*x[0]**o + ((-0.406923336354+0.126332335142j))*x[0] + ((0.138801135073+0.659214768242j))*x[1]**o + ((0.44753456567+0.282545046852j))*x[1]
        ref[(3, 2, 3, 2)]=(-0.365869524854+0.581882877101j)*x_ref[0]**o + ((-0.406923336354+0.126332335142j))*x_ref[0] + ((0.138801135073+0.659214768242j))*x_ref[1]**o + ((0.44753456567+0.282545046852j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.455669256727+0.585843947431j)*x[2]**o + ((0.826563890548-0.691217762902j))*x[2]
            ref[(0, 0, 0, 0)]+=(-0.455669256727+0.585843947431j)*x_ref[2]**o + ((0.826563890548-0.691217762902j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.912160596049+0.987340769126j)*x[2]**o + ((-0.242810303666+0.733236406643j))*x[2]
            ref[(0, 0, 0, 1)]+=(0.912160596049+0.987340769126j)*x_ref[2]**o + ((-0.242810303666+0.733236406643j))*x_ref[2]
            arg[(0, 0, 0, 2)]+=(-0.158829064265+0.22595751356j)*x[2]**o + ((0.463508482202-0.876895160867j))*x[2]
            ref[(0, 0, 0, 2)]+=(-0.158829064265+0.22595751356j)*x_ref[2]**o + ((0.463508482202-0.876895160867j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.321636041432+0.842476228578j)*x[2]**o + ((-0.786958544162+0.74482992009j))*x[2]
            ref[(0, 0, 1, 0)]+=(-0.321636041432+0.842476228578j)*x_ref[2]**o + ((-0.786958544162+0.74482992009j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.737759595883+0.230213992543j)*x[2]**o + ((0.712870126874-0.707335218555j))*x[2]
            ref[(0, 0, 1, 1)]+=(0.737759595883+0.230213992543j)*x_ref[2]**o + ((0.712870126874-0.707335218555j))*x_ref[2]
            arg[(0, 0, 1, 2)]+=(0.730306353229+0.632160237059j)*x[2]**o + ((-0.94446985919-0.676034297403j))*x[2]
            ref[(0, 0, 1, 2)]+=(0.730306353229+0.632160237059j)*x_ref[2]**o + ((-0.94446985919-0.676034297403j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(0.320198306797-0.708260006477j)*x[2]**o + ((-0.835302151371+0.8034229943j))*x[2]
            ref[(0, 0, 2, 0)]+=(0.320198306797-0.708260006477j)*x_ref[2]**o + ((-0.835302151371+0.8034229943j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(-0.759400962983-0.326570599046j)*x[2]**o + ((0.521024054214+0.745076377053j))*x[2]
            ref[(0, 0, 2, 1)]+=(-0.759400962983-0.326570599046j)*x_ref[2]**o + ((0.521024054214+0.745076377053j))*x_ref[2]
            arg[(0, 0, 2, 2)]+=(0.493874828854-0.234744659119j)*x[2]**o + ((-0.169387712717-0.357000443227j))*x[2]
            ref[(0, 0, 2, 2)]+=(0.493874828854-0.234744659119j)*x_ref[2]**o + ((-0.169387712717-0.357000443227j))*x_ref[2]
            arg[(0, 0, 3, 0)]+=(-0.730311034128+0.581689566999j)*x[2]**o + ((0.227333577119+0.599244089862j))*x[2]
            ref[(0, 0, 3, 0)]+=(-0.730311034128+0.581689566999j)*x_ref[2]**o + ((0.227333577119+0.599244089862j))*x_ref[2]
            arg[(0, 0, 3, 1)]+=(0.154876204216-0.631857352705j)*x[2]**o + ((-0.392302352159-0.773036386883j))*x[2]
            ref[(0, 0, 3, 1)]+=(0.154876204216-0.631857352705j)*x_ref[2]**o + ((-0.392302352159-0.773036386883j))*x_ref[2]
            arg[(0, 0, 3, 2)]+=(0.389245560888-0.964843660055j)*x[2]**o + ((-0.302346855847+0.72386133509j))*x[2]
            ref[(0, 0, 3, 2)]+=(0.389245560888-0.964843660055j)*x_ref[2]**o + ((-0.302346855847+0.72386133509j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.949270403637-0.920859018445j)*x[2]**o + ((0.666438798341+0.382878451658j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.949270403637-0.920859018445j)*x_ref[2]**o + ((0.666438798341+0.382878451658j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.559024161446-0.0756814111372j)*x[2]**o + ((-0.517014631437+0.19974586699j))*x[2]
            ref[(0, 1, 0, 1)]+=(-0.559024161446-0.0756814111372j)*x_ref[2]**o + ((-0.517014631437+0.19974586699j))*x_ref[2]
            arg[(0, 1, 0, 2)]+=(-0.72118720451-0.388018213216j)*x[2]**o + ((0.192555389248-0.601762381404j))*x[2]
            ref[(0, 1, 0, 2)]+=(-0.72118720451-0.388018213216j)*x_ref[2]**o + ((0.192555389248-0.601762381404j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.728201119619+0.226477127936j)*x[2]**o + ((-0.209008848448-0.348930476791j))*x[2]
            ref[(0, 1, 1, 0)]+=(0.728201119619+0.226477127936j)*x_ref[2]**o + ((-0.209008848448-0.348930476791j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.452228666437+0.834101846439j)*x[2]**o + ((-0.297746488184+0.792947351137j))*x[2]
            ref[(0, 1, 1, 1)]+=(-0.452228666437+0.834101846439j)*x_ref[2]**o + ((-0.297746488184+0.792947351137j))*x_ref[2]
            arg[(0, 1, 1, 2)]+=(0.109567951471-0.782507397732j)*x[2]**o + ((0.148232207768+0.346136647058j))*x[2]
            ref[(0, 1, 1, 2)]+=(0.109567951471-0.782507397732j)*x_ref[2]**o + ((0.148232207768+0.346136647058j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(-0.0290256784671-0.32318195467j)*x[2]**o + ((0.260946013121-0.164047788173j))*x[2]
            ref[(0, 1, 2, 0)]+=(-0.0290256784671-0.32318195467j)*x_ref[2]**o + ((0.260946013121-0.164047788173j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(-0.567241445405-0.314701069878j)*x[2]**o + ((0.706769711686+0.226827565658j))*x[2]
            ref[(0, 1, 2, 1)]+=(-0.567241445405-0.314701069878j)*x_ref[2]**o + ((0.706769711686+0.226827565658j))*x_ref[2]
            arg[(0, 1, 2, 2)]+=(-0.205438716212-0.0788311485517j)*x[2]**o + ((0.277528138496+0.303577866538j))*x[2]
            ref[(0, 1, 2, 2)]+=(-0.205438716212-0.0788311485517j)*x_ref[2]**o + ((0.277528138496+0.303577866538j))*x_ref[2]
            arg[(0, 1, 3, 0)]+=(0.73380166083-0.1227061878j)*x[2]**o + ((0.691032325362+0.44966304132j))*x[2]
            ref[(0, 1, 3, 0)]+=(0.73380166083-0.1227061878j)*x_ref[2]**o + ((0.691032325362+0.44966304132j))*x_ref[2]
            arg[(0, 1, 3, 1)]+=(-0.753304661909-0.0608622838578j)*x[2]**o + ((-0.883824702557+0.923566303186j))*x[2]
            ref[(0, 1, 3, 1)]+=(-0.753304661909-0.0608622838578j)*x_ref[2]**o + ((-0.883824702557+0.923566303186j))*x_ref[2]
            arg[(0, 1, 3, 2)]+=(-0.554409734116-0.798567624699j)*x[2]**o + ((-0.34980735242-0.306268470947j))*x[2]
            ref[(0, 1, 3, 2)]+=(-0.554409734116-0.798567624699j)*x_ref[2]**o + ((-0.34980735242-0.306268470947j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(-0.0744622991279+0.882943386511j)*x[2]**o + ((-0.18525427456-0.747104196425j))*x[2]
            ref[(0, 2, 0, 0)]+=(-0.0744622991279+0.882943386511j)*x_ref[2]**o + ((-0.18525427456-0.747104196425j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(0.379463729754+0.16113121933j)*x[2]**o + ((-0.720214208546-0.421038582519j))*x[2]
            ref[(0, 2, 0, 1)]+=(0.379463729754+0.16113121933j)*x_ref[2]**o + ((-0.720214208546-0.421038582519j))*x_ref[2]
            arg[(0, 2, 0, 2)]+=(-0.626130665669-0.0598902395339j)*x[2]**o + ((-0.441509572325-0.128273853894j))*x[2]
            ref[(0, 2, 0, 2)]+=(-0.626130665669-0.0598902395339j)*x_ref[2]**o + ((-0.441509572325-0.128273853894j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(0.501966903722+0.692256963656j)*x[2]**o + ((0.142363838746-0.273310717145j))*x[2]
            ref[(0, 2, 1, 0)]+=(0.501966903722+0.692256963656j)*x_ref[2]**o + ((0.142363838746-0.273310717145j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(0.210475258941-0.298926046329j)*x[2]**o + ((-0.699494305281+0.499693235091j))*x[2]
            ref[(0, 2, 1, 1)]+=(0.210475258941-0.298926046329j)*x_ref[2]**o + ((-0.699494305281+0.499693235091j))*x_ref[2]
            arg[(0, 2, 1, 2)]+=(0.125436286485-0.694129840849j)*x[2]**o + ((-0.679713134234+0.486032593286j))*x[2]
            ref[(0, 2, 1, 2)]+=(0.125436286485-0.694129840849j)*x_ref[2]**o + ((-0.679713134234+0.486032593286j))*x_ref[2]
            arg[(0, 2, 2, 0)]+=(-0.492922850001+0.080661749199j)*x[2]**o + ((-0.988643961102-0.698341374921j))*x[2]
            ref[(0, 2, 2, 0)]+=(-0.492922850001+0.080661749199j)*x_ref[2]**o + ((-0.988643961102-0.698341374921j))*x_ref[2]
            arg[(0, 2, 2, 1)]+=(0.335372496608+0.751654962742j)*x[2]**o + ((0.484951291727-0.817022582215j))*x[2]
            ref[(0, 2, 2, 1)]+=(0.335372496608+0.751654962742j)*x_ref[2]**o + ((0.484951291727-0.817022582215j))*x_ref[2]
            arg[(0, 2, 2, 2)]+=(-0.509569264826+0.577287736681j)*x[2]**o + ((0.562643616674-0.193989703878j))*x[2]
            ref[(0, 2, 2, 2)]+=(-0.509569264826+0.577287736681j)*x_ref[2]**o + ((0.562643616674-0.193989703878j))*x_ref[2]
            arg[(0, 2, 3, 0)]+=(0.0163684652675+0.785251899874j)*x[2]**o + ((0.695706176659-0.333453760644j))*x[2]
            ref[(0, 2, 3, 0)]+=(0.0163684652675+0.785251899874j)*x_ref[2]**o + ((0.695706176659-0.333453760644j))*x_ref[2]
            arg[(0, 2, 3, 1)]+=(0.940746351496-0.211567578205j)*x[2]**o + ((0.617243894967-0.291657990903j))*x[2]
            ref[(0, 2, 3, 1)]+=(0.940746351496-0.211567578205j)*x_ref[2]**o + ((0.617243894967-0.291657990903j))*x_ref[2]
            arg[(0, 2, 3, 2)]+=(0.0314008644331+0.0401285003315j)*x[2]**o + ((-0.420343191013-0.0353858431837j))*x[2]
            ref[(0, 2, 3, 2)]+=(0.0314008644331+0.0401285003315j)*x_ref[2]**o + ((-0.420343191013-0.0353858431837j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.382423181854-0.662752677838j)*x[2]**o + ((-0.242572770747+0.689327181028j))*x[2]
            ref[(1, 0, 0, 0)]+=(-0.382423181854-0.662752677838j)*x_ref[2]**o + ((-0.242572770747+0.689327181028j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.199965683209+0.691449014357j)*x[2]**o + ((-0.581977727924-0.740880608061j))*x[2]
            ref[(1, 0, 0, 1)]+=(0.199965683209+0.691449014357j)*x_ref[2]**o + ((-0.581977727924-0.740880608061j))*x_ref[2]
            arg[(1, 0, 0, 2)]+=(0.645310235797+0.793476249651j)*x[2]**o + ((0.476532880406+0.805515365868j))*x[2]
            ref[(1, 0, 0, 2)]+=(0.645310235797+0.793476249651j)*x_ref[2]**o + ((0.476532880406+0.805515365868j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.230306239452-0.26287246807j)*x[2]**o + ((0.53820727281+0.500687842572j))*x[2]
            ref[(1, 0, 1, 0)]+=(-0.230306239452-0.26287246807j)*x_ref[2]**o + ((0.53820727281+0.500687842572j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.32483812069+0.761848059058j)*x[2]**o + ((0.232713936777+0.189581716189j))*x[2]
            ref[(1, 0, 1, 1)]+=(0.32483812069+0.761848059058j)*x_ref[2]**o + ((0.232713936777+0.189581716189j))*x_ref[2]
            arg[(1, 0, 1, 2)]+=(-0.74555221949+0.762214167518j)*x[2]**o + ((0.742450789932+0.856386399093j))*x[2]
            ref[(1, 0, 1, 2)]+=(-0.74555221949+0.762214167518j)*x_ref[2]**o + ((0.742450789932+0.856386399093j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(-0.19341945943-0.68381495175j)*x[2]**o + ((0.338089930358-0.354881837523j))*x[2]
            ref[(1, 0, 2, 0)]+=(-0.19341945943-0.68381495175j)*x_ref[2]**o + ((0.338089930358-0.354881837523j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(-0.9467403546+0.436344343527j)*x[2]**o + ((0.0652205036895-0.0391319966399j))*x[2]
            ref[(1, 0, 2, 1)]+=(-0.9467403546+0.436344343527j)*x_ref[2]**o + ((0.0652205036895-0.0391319966399j))*x_ref[2]
            arg[(1, 0, 2, 2)]+=(0.16336979629-0.495780491691j)*x[2]**o + ((-0.581882604675+0.107991555392j))*x[2]
            ref[(1, 0, 2, 2)]+=(0.16336979629-0.495780491691j)*x_ref[2]**o + ((-0.581882604675+0.107991555392j))*x_ref[2]
            arg[(1, 0, 3, 0)]+=(-0.909963071029-0.640526679939j)*x[2]**o + ((-0.918394665458+0.962986501935j))*x[2]
            ref[(1, 0, 3, 0)]+=(-0.909963071029-0.640526679939j)*x_ref[2]**o + ((-0.918394665458+0.962986501935j))*x_ref[2]
            arg[(1, 0, 3, 1)]+=(-0.317035307781-0.771296516916j)*x[2]**o + ((0.350859807753-0.811188354198j))*x[2]
            ref[(1, 0, 3, 1)]+=(-0.317035307781-0.771296516916j)*x_ref[2]**o + ((0.350859807753-0.811188354198j))*x_ref[2]
            arg[(1, 0, 3, 2)]+=(-0.461216991382+0.792480519656j)*x[2]**o + ((-0.741091637639-0.805758720606j))*x[2]
            ref[(1, 0, 3, 2)]+=(-0.461216991382+0.792480519656j)*x_ref[2]**o + ((-0.741091637639-0.805758720606j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.535055157002+0.508284803502j)*x[2]**o + ((-0.573066148017-0.420690207132j))*x[2]
            ref[(1, 1, 0, 0)]+=(0.535055157002+0.508284803502j)*x_ref[2]**o + ((-0.573066148017-0.420690207132j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.785004656162+0.514604567441j)*x[2]**o + ((0.102201805995-0.36957308214j))*x[2]
            ref[(1, 1, 0, 1)]+=(0.785004656162+0.514604567441j)*x_ref[2]**o + ((0.102201805995-0.36957308214j))*x_ref[2]
            arg[(1, 1, 0, 2)]+=(0.154497825597-0.930826753891j)*x[2]**o + ((-0.905436566165+0.807116966551j))*x[2]
            ref[(1, 1, 0, 2)]+=(0.154497825597-0.930826753891j)*x_ref[2]**o + ((-0.905436566165+0.807116966551j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.996301544194-0.511243599541j)*x[2]**o + ((0.174072756853+0.714672621614j))*x[2]
            ref[(1, 1, 1, 0)]+=(0.996301544194-0.511243599541j)*x_ref[2]**o + ((0.174072756853+0.714672621614j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.271270974531+0.727547979684j)*x[2]**o + ((0.638892733017-0.198955925356j))*x[2]
            ref[(1, 1, 1, 1)]+=(-0.271270974531+0.727547979684j)*x_ref[2]**o + ((0.638892733017-0.198955925356j))*x_ref[2]
            arg[(1, 1, 1, 2)]+=(-0.10959356082+0.735972817962j)*x[2]**o + ((0.727387322769-0.391869061745j))*x[2]
            ref[(1, 1, 1, 2)]+=(-0.10959356082+0.735972817962j)*x_ref[2]**o + ((0.727387322769-0.391869061745j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(0.831217464609-0.952675179302j)*x[2]**o + ((-0.904785340391+0.122558106076j))*x[2]
            ref[(1, 1, 2, 0)]+=(0.831217464609-0.952675179302j)*x_ref[2]**o + ((-0.904785340391+0.122558106076j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(0.589530312531-0.23091376802j)*x[2]**o + ((0.603897024367-0.28200345595j))*x[2]
            ref[(1, 1, 2, 1)]+=(0.589530312531-0.23091376802j)*x_ref[2]**o + ((0.603897024367-0.28200345595j))*x_ref[2]
            arg[(1, 1, 2, 2)]+=(-0.704368992584-0.291394097308j)*x[2]**o + ((0.871612678231+0.0763246254778j))*x[2]
            ref[(1, 1, 2, 2)]+=(-0.704368992584-0.291394097308j)*x_ref[2]**o + ((0.871612678231+0.0763246254778j))*x_ref[2]
            arg[(1, 1, 3, 0)]+=(0.319101601679-0.9924496928j)*x[2]**o + ((0.166353149-0.914057792162j))*x[2]
            ref[(1, 1, 3, 0)]+=(0.319101601679-0.9924496928j)*x_ref[2]**o + ((0.166353149-0.914057792162j))*x_ref[2]
            arg[(1, 1, 3, 1)]+=(-0.507472643255+0.419865445032j)*x[2]**o + ((-0.446644981956+0.759486988566j))*x[2]
            ref[(1, 1, 3, 1)]+=(-0.507472643255+0.419865445032j)*x_ref[2]**o + ((-0.446644981956+0.759486988566j))*x_ref[2]
            arg[(1, 1, 3, 2)]+=(0.270795588354-0.350623022033j)*x[2]**o + ((-0.612564226267-0.575036515388j))*x[2]
            ref[(1, 1, 3, 2)]+=(0.270795588354-0.350623022033j)*x_ref[2]**o + ((-0.612564226267-0.575036515388j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.29089887076+0.653625720883j)*x[2]**o + ((-0.924726051241-0.771532477117j))*x[2]
            ref[(1, 2, 0, 0)]+=(0.29089887076+0.653625720883j)*x_ref[2]**o + ((-0.924726051241-0.771532477117j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(-0.721804619492-0.153301226719j)*x[2]**o + ((-0.742065444766-0.940147055126j))*x[2]
            ref[(1, 2, 0, 1)]+=(-0.721804619492-0.153301226719j)*x_ref[2]**o + ((-0.742065444766-0.940147055126j))*x_ref[2]
            arg[(1, 2, 0, 2)]+=(0.462331473864-0.509824746875j)*x[2]**o + ((0.936008090349-0.694500362899j))*x[2]
            ref[(1, 2, 0, 2)]+=(0.462331473864-0.509824746875j)*x_ref[2]**o + ((0.936008090349-0.694500362899j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(-0.972625987375+0.794885273634j)*x[2]**o + ((0.774840777821+0.300794792889j))*x[2]
            ref[(1, 2, 1, 0)]+=(-0.972625987375+0.794885273634j)*x_ref[2]**o + ((0.774840777821+0.300794792889j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(0.0205981507618+0.971982119262j)*x[2]**o + ((-0.542865373189-0.747265479787j))*x[2]
            ref[(1, 2, 1, 1)]+=(0.0205981507618+0.971982119262j)*x_ref[2]**o + ((-0.542865373189-0.747265479787j))*x_ref[2]
            arg[(1, 2, 1, 2)]+=(0.720689274063-0.26381514471j)*x[2]**o + ((0.919010871645+0.812710136365j))*x[2]
            ref[(1, 2, 1, 2)]+=(0.720689274063-0.26381514471j)*x_ref[2]**o + ((0.919010871645+0.812710136365j))*x_ref[2]
            arg[(1, 2, 2, 0)]+=(-0.168547179487+0.90483529112j)*x[2]**o + ((0.584460438207-0.404337990597j))*x[2]
            ref[(1, 2, 2, 0)]+=(-0.168547179487+0.90483529112j)*x_ref[2]**o + ((0.584460438207-0.404337990597j))*x_ref[2]
            arg[(1, 2, 2, 1)]+=(0.526200383751-0.28778700048j)*x[2]**o + ((0.642352723709-0.483528243292j))*x[2]
            ref[(1, 2, 2, 1)]+=(0.526200383751-0.28778700048j)*x_ref[2]**o + ((0.642352723709-0.483528243292j))*x_ref[2]
            arg[(1, 2, 2, 2)]+=(0.415565675411-0.973602798415j)*x[2]**o + ((0.222402871257-0.592662162052j))*x[2]
            ref[(1, 2, 2, 2)]+=(0.415565675411-0.973602798415j)*x_ref[2]**o + ((0.222402871257-0.592662162052j))*x_ref[2]
            arg[(1, 2, 3, 0)]+=(0.312097998143+0.193149996515j)*x[2]**o + ((-0.457632446499+0.928789704346j))*x[2]
            ref[(1, 2, 3, 0)]+=(0.312097998143+0.193149996515j)*x_ref[2]**o + ((-0.457632446499+0.928789704346j))*x_ref[2]
            arg[(1, 2, 3, 1)]+=(-0.423917378786+0.322402889531j)*x[2]**o + ((-0.219815356265-0.751210124305j))*x[2]
            ref[(1, 2, 3, 1)]+=(-0.423917378786+0.322402889531j)*x_ref[2]**o + ((-0.219815356265-0.751210124305j))*x_ref[2]
            arg[(1, 2, 3, 2)]+=(-0.0842257004613-0.673992637662j)*x[2]**o + ((-0.654661275289-0.900696394639j))*x[2]
            ref[(1, 2, 3, 2)]+=(-0.0842257004613-0.673992637662j)*x_ref[2]**o + ((-0.654661275289-0.900696394639j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(0.45470589712+0.538585217131j)*x[2]**o + ((0.143411480232-0.876134518158j))*x[2]
            ref[(2, 0, 0, 0)]+=(0.45470589712+0.538585217131j)*x_ref[2]**o + ((0.143411480232-0.876134518158j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(0.146472506426+0.596295283691j)*x[2]**o + ((0.118639482887+0.734060398743j))*x[2]
            ref[(2, 0, 0, 1)]+=(0.146472506426+0.596295283691j)*x_ref[2]**o + ((0.118639482887+0.734060398743j))*x_ref[2]
            arg[(2, 0, 0, 2)]+=(-0.338627020863-0.573962953263j)*x[2]**o + ((0.148506860109+0.540151700823j))*x[2]
            ref[(2, 0, 0, 2)]+=(-0.338627020863-0.573962953263j)*x_ref[2]**o + ((0.148506860109+0.540151700823j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(-0.0905384976111+0.0845211512512j)*x[2]**o + ((0.508055015315-0.115674913553j))*x[2]
            ref[(2, 0, 1, 0)]+=(-0.0905384976111+0.0845211512512j)*x_ref[2]**o + ((0.508055015315-0.115674913553j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(0.263827702823+0.0314173587656j)*x[2]**o + ((-0.379684623104-0.652701730691j))*x[2]
            ref[(2, 0, 1, 1)]+=(0.263827702823+0.0314173587656j)*x_ref[2]**o + ((-0.379684623104-0.652701730691j))*x_ref[2]
            arg[(2, 0, 1, 2)]+=(-0.587123180142-0.993158843782j)*x[2]**o + ((-0.720430294663-0.897847438806j))*x[2]
            ref[(2, 0, 1, 2)]+=(-0.587123180142-0.993158843782j)*x_ref[2]**o + ((-0.720430294663-0.897847438806j))*x_ref[2]
            arg[(2, 0, 2, 0)]+=(0.896859363164-0.493766830461j)*x[2]**o + ((-0.159133072436+0.564025846187j))*x[2]
            ref[(2, 0, 2, 0)]+=(0.896859363164-0.493766830461j)*x_ref[2]**o + ((-0.159133072436+0.564025846187j))*x_ref[2]
            arg[(2, 0, 2, 1)]+=(-0.0654406460297-0.211609224746j)*x[2]**o + ((0.339635477122-0.65078683578j))*x[2]
            ref[(2, 0, 2, 1)]+=(-0.0654406460297-0.211609224746j)*x_ref[2]**o + ((0.339635477122-0.65078683578j))*x_ref[2]
            arg[(2, 0, 2, 2)]+=(0.625016834267+0.459302039335j)*x[2]**o + ((0.65334371962-0.996216337764j))*x[2]
            ref[(2, 0, 2, 2)]+=(0.625016834267+0.459302039335j)*x_ref[2]**o + ((0.65334371962-0.996216337764j))*x_ref[2]
            arg[(2, 0, 3, 0)]+=(0.186059793761+0.484131321187j)*x[2]**o + ((-0.662584698453+0.589734781982j))*x[2]
            ref[(2, 0, 3, 0)]+=(0.186059793761+0.484131321187j)*x_ref[2]**o + ((-0.662584698453+0.589734781982j))*x_ref[2]
            arg[(2, 0, 3, 1)]+=(0.22439272537-0.733734093735j)*x[2]**o + ((0.969370388479-0.70865607743j))*x[2]
            ref[(2, 0, 3, 1)]+=(0.22439272537-0.733734093735j)*x_ref[2]**o + ((0.969370388479-0.70865607743j))*x_ref[2]
            arg[(2, 0, 3, 2)]+=(0.859236489947-0.206367725533j)*x[2]**o + ((0.237154476893+0.0323121127375j))*x[2]
            ref[(2, 0, 3, 2)]+=(0.859236489947-0.206367725533j)*x_ref[2]**o + ((0.237154476893+0.0323121127375j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(-0.52230287294+0.408949194348j)*x[2]**o + ((-0.888747914622-0.541499130692j))*x[2]
            ref[(2, 1, 0, 0)]+=(-0.52230287294+0.408949194348j)*x_ref[2]**o + ((-0.888747914622-0.541499130692j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(-0.924185277481+0.510032931658j)*x[2]**o + ((0.484023552923+0.258184430881j))*x[2]
            ref[(2, 1, 0, 1)]+=(-0.924185277481+0.510032931658j)*x_ref[2]**o + ((0.484023552923+0.258184430881j))*x_ref[2]
            arg[(2, 1, 0, 2)]+=(-0.61349260983-0.81075165681j)*x[2]**o + ((0.359377712944+0.434965393214j))*x[2]
            ref[(2, 1, 0, 2)]+=(-0.61349260983-0.81075165681j)*x_ref[2]**o + ((0.359377712944+0.434965393214j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(-0.513512080449+0.883196411144j)*x[2]**o + ((0.83064747776-0.661581886568j))*x[2]
            ref[(2, 1, 1, 0)]+=(-0.513512080449+0.883196411144j)*x_ref[2]**o + ((0.83064747776-0.661581886568j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(-0.190294035211-0.142276177729j)*x[2]**o + ((-0.940138420174-0.645816145049j))*x[2]
            ref[(2, 1, 1, 1)]+=(-0.190294035211-0.142276177729j)*x_ref[2]**o + ((-0.940138420174-0.645816145049j))*x_ref[2]
            arg[(2, 1, 1, 2)]+=(0.686620304103-0.938026205177j)*x[2]**o + ((-0.701847835422+0.59825505709j))*x[2]
            ref[(2, 1, 1, 2)]+=(0.686620304103-0.938026205177j)*x_ref[2]**o + ((-0.701847835422+0.59825505709j))*x_ref[2]
            arg[(2, 1, 2, 0)]+=(0.252008852604+0.663870248034j)*x[2]**o + ((-0.126315460514+0.609134436265j))*x[2]
            ref[(2, 1, 2, 0)]+=(0.252008852604+0.663870248034j)*x_ref[2]**o + ((-0.126315460514+0.609134436265j))*x_ref[2]
            arg[(2, 1, 2, 1)]+=(-0.679964509787+0.87354610267j)*x[2]**o + ((0.657414055941+0.5083279384j))*x[2]
            ref[(2, 1, 2, 1)]+=(-0.679964509787+0.87354610267j)*x_ref[2]**o + ((0.657414055941+0.5083279384j))*x_ref[2]
            arg[(2, 1, 2, 2)]+=(-0.546112885096-0.573102817131j)*x[2]**o + ((-0.48463038242-0.964455801391j))*x[2]
            ref[(2, 1, 2, 2)]+=(-0.546112885096-0.573102817131j)*x_ref[2]**o + ((-0.48463038242-0.964455801391j))*x_ref[2]
            arg[(2, 1, 3, 0)]+=(0.0121649223622-0.148659223599j)*x[2]**o + ((0.924546095294+0.0690406683798j))*x[2]
            ref[(2, 1, 3, 0)]+=(0.0121649223622-0.148659223599j)*x_ref[2]**o + ((0.924546095294+0.0690406683798j))*x_ref[2]
            arg[(2, 1, 3, 1)]+=(-0.390975932465-0.883291586093j)*x[2]**o + ((0.0441727017852+0.818151733961j))*x[2]
            ref[(2, 1, 3, 1)]+=(-0.390975932465-0.883291586093j)*x_ref[2]**o + ((0.0441727017852+0.818151733961j))*x_ref[2]
            arg[(2, 1, 3, 2)]+=(0.774121900979+0.417343922987j)*x[2]**o + ((0.30212264407+0.872111459729j))*x[2]
            ref[(2, 1, 3, 2)]+=(0.774121900979+0.417343922987j)*x_ref[2]**o + ((0.30212264407+0.872111459729j))*x_ref[2]
            arg[(2, 2, 0, 0)]+=(-0.116776180902-0.846963804019j)*x[2]**o + ((-0.419671627002-0.500004878027j))*x[2]
            ref[(2, 2, 0, 0)]+=(-0.116776180902-0.846963804019j)*x_ref[2]**o + ((-0.419671627002-0.500004878027j))*x_ref[2]
            arg[(2, 2, 0, 1)]+=(-0.701861821572-0.176040737107j)*x[2]**o + ((-0.265275984528-0.637291408307j))*x[2]
            ref[(2, 2, 0, 1)]+=(-0.701861821572-0.176040737107j)*x_ref[2]**o + ((-0.265275984528-0.637291408307j))*x_ref[2]
            arg[(2, 2, 0, 2)]+=(0.301310026259+0.67810841782j)*x[2]**o + ((0.40925497668-0.400435652921j))*x[2]
            ref[(2, 2, 0, 2)]+=(0.301310026259+0.67810841782j)*x_ref[2]**o + ((0.40925497668-0.400435652921j))*x_ref[2]
            arg[(2, 2, 1, 0)]+=(-0.66259299249+0.295695824659j)*x[2]**o + ((-0.284256105559-0.429297534359j))*x[2]
            ref[(2, 2, 1, 0)]+=(-0.66259299249+0.295695824659j)*x_ref[2]**o + ((-0.284256105559-0.429297534359j))*x_ref[2]
            arg[(2, 2, 1, 1)]+=(-0.310349311997+0.436139828384j)*x[2]**o + ((-0.340380926764-0.723878413492j))*x[2]
            ref[(2, 2, 1, 1)]+=(-0.310349311997+0.436139828384j)*x_ref[2]**o + ((-0.340380926764-0.723878413492j))*x_ref[2]
            arg[(2, 2, 1, 2)]+=(0.685225598783-0.844000701115j)*x[2]**o + ((0.558269918274+0.770504433056j))*x[2]
            ref[(2, 2, 1, 2)]+=(0.685225598783-0.844000701115j)*x_ref[2]**o + ((0.558269918274+0.770504433056j))*x_ref[2]
            arg[(2, 2, 2, 0)]+=(0.784862715024+0.652313472863j)*x[2]**o + ((-0.528470000878+0.52920466877j))*x[2]
            ref[(2, 2, 2, 0)]+=(0.784862715024+0.652313472863j)*x_ref[2]**o + ((-0.528470000878+0.52920466877j))*x_ref[2]
            arg[(2, 2, 2, 1)]+=(0.0553774286236+0.343104358322j)*x[2]**o + ((-0.400165188011+0.429972764596j))*x[2]
            ref[(2, 2, 2, 1)]+=(0.0553774286236+0.343104358322j)*x_ref[2]**o + ((-0.400165188011+0.429972764596j))*x_ref[2]
            arg[(2, 2, 2, 2)]+=(0.685252885201-0.401791233366j)*x[2]**o + ((0.96671642936+0.280867332368j))*x[2]
            ref[(2, 2, 2, 2)]+=(0.685252885201-0.401791233366j)*x_ref[2]**o + ((0.96671642936+0.280867332368j))*x_ref[2]
            arg[(2, 2, 3, 0)]+=(0.595373621184-0.614842922339j)*x[2]**o + ((0.595995589684+0.532855286839j))*x[2]
            ref[(2, 2, 3, 0)]+=(0.595373621184-0.614842922339j)*x_ref[2]**o + ((0.595995589684+0.532855286839j))*x_ref[2]
            arg[(2, 2, 3, 1)]+=(-0.522025554263-0.602380144209j)*x[2]**o + ((-0.00236331975555-0.489567313663j))*x[2]
            ref[(2, 2, 3, 1)]+=(-0.522025554263-0.602380144209j)*x_ref[2]**o + ((-0.00236331975555-0.489567313663j))*x_ref[2]
            arg[(2, 2, 3, 2)]+=(0.675857179946+0.320581672894j)*x[2]**o + ((-0.0204603343319-0.01832717029j))*x[2]
            ref[(2, 2, 3, 2)]+=(0.675857179946+0.320581672894j)*x_ref[2]**o + ((-0.0204603343319-0.01832717029j))*x_ref[2]
            arg[(3, 0, 0, 0)]+=(-0.0825924111201+0.709186525855j)*x[2]**o + ((0.604961989952+0.861169597497j))*x[2]
            ref[(3, 0, 0, 0)]+=(-0.0825924111201+0.709186525855j)*x_ref[2]**o + ((0.604961989952+0.861169597497j))*x_ref[2]
            arg[(3, 0, 0, 1)]+=(-0.975124350732+0.202977640371j)*x[2]**o + ((0.809398382186+0.352086509563j))*x[2]
            ref[(3, 0, 0, 1)]+=(-0.975124350732+0.202977640371j)*x_ref[2]**o + ((0.809398382186+0.352086509563j))*x_ref[2]
            arg[(3, 0, 0, 2)]+=(-0.0997712226633+0.500036648181j)*x[2]**o + ((0.354616071243-0.0616076902738j))*x[2]
            ref[(3, 0, 0, 2)]+=(-0.0997712226633+0.500036648181j)*x_ref[2]**o + ((0.354616071243-0.0616076902738j))*x_ref[2]
            arg[(3, 0, 1, 0)]+=(-0.0386349447324+0.770815102896j)*x[2]**o + ((-0.534317805479-0.642424340231j))*x[2]
            ref[(3, 0, 1, 0)]+=(-0.0386349447324+0.770815102896j)*x_ref[2]**o + ((-0.534317805479-0.642424340231j))*x_ref[2]
            arg[(3, 0, 1, 1)]+=(0.0198686491044-0.451349640403j)*x[2]**o + ((-0.933818008441-0.360360420459j))*x[2]
            ref[(3, 0, 1, 1)]+=(0.0198686491044-0.451349640403j)*x_ref[2]**o + ((-0.933818008441-0.360360420459j))*x_ref[2]
            arg[(3, 0, 1, 2)]+=(0.297849278041+0.84837865836j)*x[2]**o + ((0.882268054909-0.950708844479j))*x[2]
            ref[(3, 0, 1, 2)]+=(0.297849278041+0.84837865836j)*x_ref[2]**o + ((0.882268054909-0.950708844479j))*x_ref[2]
            arg[(3, 0, 2, 0)]+=(0.405076853518-0.842694268498j)*x[2]**o + ((-0.511198179381-0.964048094353j))*x[2]
            ref[(3, 0, 2, 0)]+=(0.405076853518-0.842694268498j)*x_ref[2]**o + ((-0.511198179381-0.964048094353j))*x_ref[2]
            arg[(3, 0, 2, 1)]+=(0.257756674841-0.838593215215j)*x[2]**o + ((0.608571330054-0.267740149868j))*x[2]
            ref[(3, 0, 2, 1)]+=(0.257756674841-0.838593215215j)*x_ref[2]**o + ((0.608571330054-0.267740149868j))*x_ref[2]
            arg[(3, 0, 2, 2)]+=(-0.417041172542-0.964970418239j)*x[2]**o + ((-0.277787853636-0.275843902096j))*x[2]
            ref[(3, 0, 2, 2)]+=(-0.417041172542-0.964970418239j)*x_ref[2]**o + ((-0.277787853636-0.275843902096j))*x_ref[2]
            arg[(3, 0, 3, 0)]+=(-0.447961633478-0.0201881465471j)*x[2]**o + ((-0.635730055314-0.0762573023895j))*x[2]
            ref[(3, 0, 3, 0)]+=(-0.447961633478-0.0201881465471j)*x_ref[2]**o + ((-0.635730055314-0.0762573023895j))*x_ref[2]
            arg[(3, 0, 3, 1)]+=(0.810670258302-0.485714873576j)*x[2]**o + ((0.73069939168-0.146114962329j))*x[2]
            ref[(3, 0, 3, 1)]+=(0.810670258302-0.485714873576j)*x_ref[2]**o + ((0.73069939168-0.146114962329j))*x_ref[2]
            arg[(3, 0, 3, 2)]+=(0.0776924760485-0.173717846448j)*x[2]**o + ((0.668888535082-0.290965096898j))*x[2]
            ref[(3, 0, 3, 2)]+=(0.0776924760485-0.173717846448j)*x_ref[2]**o + ((0.668888535082-0.290965096898j))*x_ref[2]
            arg[(3, 1, 0, 0)]+=(-0.38529193593+0.807028324464j)*x[2]**o + ((0.446693567071+0.549629019174j))*x[2]
            ref[(3, 1, 0, 0)]+=(-0.38529193593+0.807028324464j)*x_ref[2]**o + ((0.446693567071+0.549629019174j))*x_ref[2]
            arg[(3, 1, 0, 1)]+=(-0.132688186848-0.627027590411j)*x[2]**o + ((-0.95209092677+0.413274533536j))*x[2]
            ref[(3, 1, 0, 1)]+=(-0.132688186848-0.627027590411j)*x_ref[2]**o + ((-0.95209092677+0.413274533536j))*x_ref[2]
            arg[(3, 1, 0, 2)]+=(-0.900139887065-0.784492392609j)*x[2]**o + ((-0.302751755905+0.8554851137j))*x[2]
            ref[(3, 1, 0, 2)]+=(-0.900139887065-0.784492392609j)*x_ref[2]**o + ((-0.302751755905+0.8554851137j))*x_ref[2]
            arg[(3, 1, 1, 0)]+=(0.176729778176-0.528826102163j)*x[2]**o + ((-0.401746474749+0.210858178964j))*x[2]
            ref[(3, 1, 1, 0)]+=(0.176729778176-0.528826102163j)*x_ref[2]**o + ((-0.401746474749+0.210858178964j))*x_ref[2]
            arg[(3, 1, 1, 1)]+=(0.399136553154+0.50440559432j)*x[2]**o + ((-0.936054559599+0.760108827023j))*x[2]
            ref[(3, 1, 1, 1)]+=(0.399136553154+0.50440559432j)*x_ref[2]**o + ((-0.936054559599+0.760108827023j))*x_ref[2]
            arg[(3, 1, 1, 2)]+=(0.306876148519+0.671788695803j)*x[2]**o + ((-0.00994352524198+0.120510227483j))*x[2]
            ref[(3, 1, 1, 2)]+=(0.306876148519+0.671788695803j)*x_ref[2]**o + ((-0.00994352524198+0.120510227483j))*x_ref[2]
            arg[(3, 1, 2, 0)]+=(-0.231839059514+0.00832363872228j)*x[2]**o + ((-0.836621942879+0.317415472644j))*x[2]
            ref[(3, 1, 2, 0)]+=(-0.231839059514+0.00832363872228j)*x_ref[2]**o + ((-0.836621942879+0.317415472644j))*x_ref[2]
            arg[(3, 1, 2, 1)]+=(-0.396261088995+0.291117598179j)*x[2]**o + ((-0.911263120754-0.79111297625j))*x[2]
            ref[(3, 1, 2, 1)]+=(-0.396261088995+0.291117598179j)*x_ref[2]**o + ((-0.911263120754-0.79111297625j))*x_ref[2]
            arg[(3, 1, 2, 2)]+=(-0.480287280704+0.838645532276j)*x[2]**o + ((0.666121667371-0.213132175504j))*x[2]
            ref[(3, 1, 2, 2)]+=(-0.480287280704+0.838645532276j)*x_ref[2]**o + ((0.666121667371-0.213132175504j))*x_ref[2]
            arg[(3, 1, 3, 0)]+=(-0.394294206758-0.90383468112j)*x[2]**o + ((0.419567195141+0.0755601232596j))*x[2]
            ref[(3, 1, 3, 0)]+=(-0.394294206758-0.90383468112j)*x_ref[2]**o + ((0.419567195141+0.0755601232596j))*x_ref[2]
            arg[(3, 1, 3, 1)]+=(0.517542621361-0.940326925179j)*x[2]**o + ((-0.549119584579-0.946217825653j))*x[2]
            ref[(3, 1, 3, 1)]+=(0.517542621361-0.940326925179j)*x_ref[2]**o + ((-0.549119584579-0.946217825653j))*x_ref[2]
            arg[(3, 1, 3, 2)]+=(-0.338857167777+0.468619328958j)*x[2]**o + ((0.599604315868+0.834461941617j))*x[2]
            ref[(3, 1, 3, 2)]+=(-0.338857167777+0.468619328958j)*x_ref[2]**o + ((0.599604315868+0.834461941617j))*x_ref[2]
            arg[(3, 2, 0, 0)]+=(-0.547859890177-0.929049690876j)*x[2]**o + ((0.424529707201-0.932212263102j))*x[2]
            ref[(3, 2, 0, 0)]+=(-0.547859890177-0.929049690876j)*x_ref[2]**o + ((0.424529707201-0.932212263102j))*x_ref[2]
            arg[(3, 2, 0, 1)]+=(0.471731653977-0.852060877862j)*x[2]**o + ((0.0462731113903-0.762091476756j))*x[2]
            ref[(3, 2, 0, 1)]+=(0.471731653977-0.852060877862j)*x_ref[2]**o + ((0.0462731113903-0.762091476756j))*x_ref[2]
            arg[(3, 2, 0, 2)]+=(-0.533616239439-0.291037021403j)*x[2]**o + ((-0.709831715412+0.358413918105j))*x[2]
            ref[(3, 2, 0, 2)]+=(-0.533616239439-0.291037021403j)*x_ref[2]**o + ((-0.709831715412+0.358413918105j))*x_ref[2]
            arg[(3, 2, 1, 0)]+=(0.495870786144-0.73744664381j)*x[2]**o + ((0.555778029281-0.5455225997j))*x[2]
            ref[(3, 2, 1, 0)]+=(0.495870786144-0.73744664381j)*x_ref[2]**o + ((0.555778029281-0.5455225997j))*x_ref[2]
            arg[(3, 2, 1, 1)]+=(0.803395511557+0.575235425052j)*x[2]**o + ((-0.973889951839+0.335518380585j))*x[2]
            ref[(3, 2, 1, 1)]+=(0.803395511557+0.575235425052j)*x_ref[2]**o + ((-0.973889951839+0.335518380585j))*x_ref[2]
            arg[(3, 2, 1, 2)]+=(0.67921153727+0.188943338892j)*x[2]**o + ((-0.147350562102+0.25837343104j))*x[2]
            ref[(3, 2, 1, 2)]+=(0.67921153727+0.188943338892j)*x_ref[2]**o + ((-0.147350562102+0.25837343104j))*x_ref[2]
            arg[(3, 2, 2, 0)]+=(-0.624587559299+0.118402377537j)*x[2]**o + ((0.0898860948722-0.376782853534j))*x[2]
            ref[(3, 2, 2, 0)]+=(-0.624587559299+0.118402377537j)*x_ref[2]**o + ((0.0898860948722-0.376782853534j))*x_ref[2]
            arg[(3, 2, 2, 1)]+=(-0.932562821483+0.352461293475j)*x[2]**o + ((-0.597493876825+0.458117485755j))*x[2]
            ref[(3, 2, 2, 1)]+=(-0.932562821483+0.352461293475j)*x_ref[2]**o + ((-0.597493876825+0.458117485755j))*x_ref[2]
            arg[(3, 2, 2, 2)]+=(0.764836128492+0.638954695369j)*x[2]**o + ((0.367014553289-0.407687004128j))*x[2]
            ref[(3, 2, 2, 2)]+=(0.764836128492+0.638954695369j)*x_ref[2]**o + ((0.367014553289-0.407687004128j))*x_ref[2]
            arg[(3, 2, 3, 0)]+=(-0.035860081198-0.09837024032j)*x[2]**o + ((0.177741264058-0.444131505282j))*x[2]
            ref[(3, 2, 3, 0)]+=(-0.035860081198-0.09837024032j)*x_ref[2]**o + ((0.177741264058-0.444131505282j))*x_ref[2]
            arg[(3, 2, 3, 1)]+=(-0.38472867376-0.0347520447542j)*x[2]**o + ((0.247400757585-0.953365519726j))*x[2]
            ref[(3, 2, 3, 1)]+=(-0.38472867376-0.0347520447542j)*x_ref[2]**o + ((0.247400757585-0.953365519726j))*x_ref[2]
            arg[(3, 2, 3, 2)]+=(0.723135885515+0.0648483975586j)*x[2]**o + ((-0.521629101136-0.527731955442j))*x[2]
            ref[(3, 2, 3, 2)]+=(0.723135885515+0.0648483975586j)*x_ref[2]**o + ((-0.521629101136-0.527731955442j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.906852178231-0.0048175631039j)*x[0]**o + ((0.215032060866-0.256051105843j))*x[0] + ((-0.396573145493+0.891068934005j))*x[1]**o + ((0.244419509338-0.504351050587j))*x[1]
        ref=(0.906852178231-0.0048175631039j)*x_ref[0]**o + ((0.215032060866-0.256051105843j))*x_ref[0] + ((-0.396573145493+0.891068934005j))*x_ref[1]**o + ((0.244419509338-0.504351050587j))*x_ref[1]
        if dim==3:
            arg+=((-0.0895704199958-0.0993512786136j))*x[2]**o + ((0.124809442435+0.921746998969j))*x[2]
            ref+=((-0.0895704199958-0.0993512786136j))*x_ref[2]**o + ((0.124809442435+0.921746998969j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=(-0.584503809313-0.264569944259j)*x[0]**o + ((0.0362502248907+0.445554149608j))*x[0] + ((-0.80795105297+0.774998918407j))*x[1]**o + ((0.109420312688+0.640720138459j))*x[1]
        ref[(0,)]=(-0.584503809313-0.264569944259j)*x_ref[0]**o + ((0.0362502248907+0.445554149608j))*x_ref[0] + ((-0.80795105297+0.774998918407j))*x_ref[1]**o + ((0.109420312688+0.640720138459j))*x_ref[1]
        arg[(1,)]=(0.604668442109-0.094922422879j)*x[0]**o + ((-0.513782045089+0.370506402633j))*x[0] + ((0.0134073688086-0.311454158402j))*x[1]**o + ((0.859991591873+0.560987420447j))*x[1]
        ref[(1,)]=(0.604668442109-0.094922422879j)*x_ref[0]**o + ((-0.513782045089+0.370506402633j))*x_ref[0] + ((0.0134073688086-0.311454158402j))*x_ref[1]**o + ((0.859991591873+0.560987420447j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.366525238058-0.0731006494223j)*x[2]**o + ((0.179402936369-0.913237231624j))*x[2]
            ref[(0,)]+=(-0.366525238058-0.0731006494223j)*x_ref[2]**o + ((0.179402936369-0.913237231624j))*x_ref[2]
            arg[(1,)]+=(-0.973175879334+0.932093306155j)*x[2]**o + ((0.745549584945-0.00847849553494j))*x[2]
            ref[(1,)]+=(-0.973175879334+0.932093306155j)*x_ref[2]**o + ((0.745549584945-0.00847849553494j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref = Data(0,(4, 3),w_ref)
        arg[(0, 0)]=(-0.658388761904+0.0712542500697j)*x[0]**o + ((-0.916745910599+0.21701639275j))*x[0] + ((-0.743164812134-0.958934194644j))*x[1]**o + ((0.688530833959-0.0761930664903j))*x[1]
        ref[(0, 0)]=(-0.658388761904+0.0712542500697j)*x_ref[0]**o + ((-0.916745910599+0.21701639275j))*x_ref[0] + ((-0.743164812134-0.958934194644j))*x_ref[1]**o + ((0.688530833959-0.0761930664903j))*x_ref[1]
        arg[(0, 1)]=(0.990010107209-0.497091246117j)*x[0]**o + ((0.6048320429+0.807752911978j))*x[0] + ((0.966536650338-0.123672208186j))*x[1]**o + ((-0.723035298935-0.547772117786j))*x[1]
        ref[(0, 1)]=(0.990010107209-0.497091246117j)*x_ref[0]**o + ((0.6048320429+0.807752911978j))*x_ref[0] + ((0.966536650338-0.123672208186j))*x_ref[1]**o + ((-0.723035298935-0.547772117786j))*x_ref[1]
        arg[(0, 2)]=(0.492148152946+0.902167891636j)*x[0]**o + ((0.972213527534+0.0920424501835j))*x[0] + ((0.185296262319-0.648828926294j))*x[1]**o + ((-0.985957463641-0.397959817311j))*x[1]
        ref[(0, 2)]=(0.492148152946+0.902167891636j)*x_ref[0]**o + ((0.972213527534+0.0920424501835j))*x_ref[0] + ((0.185296262319-0.648828926294j))*x_ref[1]**o + ((-0.985957463641-0.397959817311j))*x_ref[1]
        arg[(1, 0)]=(-0.121236739726-0.328312123139j)*x[0]**o + ((0.863513898094-0.991304599513j))*x[0] + ((-0.404959573236-0.867838753663j))*x[1]**o + ((0.450071340592-0.943963756495j))*x[1]
        ref[(1, 0)]=(-0.121236739726-0.328312123139j)*x_ref[0]**o + ((0.863513898094-0.991304599513j))*x_ref[0] + ((-0.404959573236-0.867838753663j))*x_ref[1]**o + ((0.450071340592-0.943963756495j))*x_ref[1]
        arg[(1, 1)]=(0.194721698768+0.427506433088j)*x[0]**o + ((-0.900966773979-0.195919634423j))*x[0] + ((-0.992236811778-0.0607649014621j))*x[1]**o + ((0.186540506063-0.434252891269j))*x[1]
        ref[(1, 1)]=(0.194721698768+0.427506433088j)*x_ref[0]**o + ((-0.900966773979-0.195919634423j))*x_ref[0] + ((-0.992236811778-0.0607649014621j))*x_ref[1]**o + ((0.186540506063-0.434252891269j))*x_ref[1]
        arg[(1, 2)]=(-0.969054197587-0.871068970926j)*x[0]**o + ((0.305039773523+0.0980878849495j))*x[0] + ((-0.620230779514+0.979621855819j))*x[1]**o + ((0.26744695938+0.524645059792j))*x[1]
        ref[(1, 2)]=(-0.969054197587-0.871068970926j)*x_ref[0]**o + ((0.305039773523+0.0980878849495j))*x_ref[0] + ((-0.620230779514+0.979621855819j))*x_ref[1]**o + ((0.26744695938+0.524645059792j))*x_ref[1]
        arg[(2, 0)]=(0.299062736797-0.319434380659j)*x[0]**o + ((0.10594221746+0.897809538427j))*x[0] + ((-0.168265859074+0.675032757839j))*x[1]**o + ((0.418782792244+0.0198378154709j))*x[1]
        ref[(2, 0)]=(0.299062736797-0.319434380659j)*x_ref[0]**o + ((0.10594221746+0.897809538427j))*x_ref[0] + ((-0.168265859074+0.675032757839j))*x_ref[1]**o + ((0.418782792244+0.0198378154709j))*x_ref[1]
        arg[(2, 1)]=(0.164474867318+0.0354112466244j)*x[0]**o + ((0.246694769905-0.085509572237j))*x[0] + ((0.228672530772+0.1840075411j))*x[1]**o + ((-0.505440612392+0.193695657552j))*x[1]
        ref[(2, 1)]=(0.164474867318+0.0354112466244j)*x_ref[0]**o + ((0.246694769905-0.085509572237j))*x_ref[0] + ((0.228672530772+0.1840075411j))*x_ref[1]**o + ((-0.505440612392+0.193695657552j))*x_ref[1]
        arg[(2, 2)]=(-0.535306943372+0.279744782043j)*x[0]**o + ((-0.0797195986562+0.898158380741j))*x[0] + ((0.954459670653-0.758893840629j))*x[1]**o + ((0.298711368307-0.448377491941j))*x[1]
        ref[(2, 2)]=(-0.535306943372+0.279744782043j)*x_ref[0]**o + ((-0.0797195986562+0.898158380741j))*x_ref[0] + ((0.954459670653-0.758893840629j))*x_ref[1]**o + ((0.298711368307-0.448377491941j))*x_ref[1]
        arg[(3, 0)]=(-0.548658067754-0.787632587266j)*x[0]**o + ((-0.645308611733+0.785882759354j))*x[0] + ((-0.971344191409-0.75540227977j))*x[1]**o + ((-0.654770563581+0.701327263866j))*x[1]
        ref[(3, 0)]=(-0.548658067754-0.787632587266j)*x_ref[0]**o + ((-0.645308611733+0.785882759354j))*x_ref[0] + ((-0.971344191409-0.75540227977j))*x_ref[1]**o + ((-0.654770563581+0.701327263866j))*x_ref[1]
        arg[(3, 1)]=(-0.19852251572-0.453397917584j)*x[0]**o + ((-0.224423792297-0.833856466536j))*x[0] + ((0.400098681133+0.888332164716j))*x[1]**o + ((0.650003330894+0.67830933566j))*x[1]
        ref[(3, 1)]=(-0.19852251572-0.453397917584j)*x_ref[0]**o + ((-0.224423792297-0.833856466536j))*x_ref[0] + ((0.400098681133+0.888332164716j))*x_ref[1]**o + ((0.650003330894+0.67830933566j))*x_ref[1]
        arg[(3, 2)]=(0.469760871358+0.0639893724751j)*x[0]**o + ((0.65148912046+0.551992030196j))*x[0] + ((0.889211572376-0.137428202395j))*x[1]**o + ((-0.734572856105-0.961649922896j))*x[1]
        ref[(3, 2)]=(0.469760871358+0.0639893724751j)*x_ref[0]**o + ((0.65148912046+0.551992030196j))*x_ref[0] + ((0.889211572376-0.137428202395j))*x_ref[1]**o + ((-0.734572856105-0.961649922896j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.5704147366-0.981470798914j)*x[2]**o + ((-0.982022552694-0.384757277111j))*x[2]
            ref[(0, 0)]+=(0.5704147366-0.981470798914j)*x_ref[2]**o + ((-0.982022552694-0.384757277111j))*x_ref[2]
            arg[(0, 1)]+=(0.940033432385+0.718265360577j)*x[2]**o + ((-0.200985082746-0.0038485326831j))*x[2]
            ref[(0, 1)]+=(0.940033432385+0.718265360577j)*x_ref[2]**o + ((-0.200985082746-0.0038485326831j))*x_ref[2]
            arg[(0, 2)]+=(-0.339371583125-0.222170710363j)*x[2]**o + ((0.476039060707+0.0823149789854j))*x[2]
            ref[(0, 2)]+=(-0.339371583125-0.222170710363j)*x_ref[2]**o + ((0.476039060707+0.0823149789854j))*x_ref[2]
            arg[(1, 0)]+=(-0.822179097174+0.215252639734j)*x[2]**o + ((0.949834534215+0.523899589963j))*x[2]
            ref[(1, 0)]+=(-0.822179097174+0.215252639734j)*x_ref[2]**o + ((0.949834534215+0.523899589963j))*x_ref[2]
            arg[(1, 1)]+=(0.163782252841-0.623637057271j)*x[2]**o + ((-0.273711783086+0.442109301934j))*x[2]
            ref[(1, 1)]+=(0.163782252841-0.623637057271j)*x_ref[2]**o + ((-0.273711783086+0.442109301934j))*x_ref[2]
            arg[(1, 2)]+=(0.560322230969-0.130465745933j)*x[2]**o + ((0.634239549929-0.564606399463j))*x[2]
            ref[(1, 2)]+=(0.560322230969-0.130465745933j)*x_ref[2]**o + ((0.634239549929-0.564606399463j))*x_ref[2]
            arg[(2, 0)]+=(-0.09962596525+0.775611438549j)*x[2]**o + ((-0.00247789702323+0.410098568571j))*x[2]
            ref[(2, 0)]+=(-0.09962596525+0.775611438549j)*x_ref[2]**o + ((-0.00247789702323+0.410098568571j))*x_ref[2]
            arg[(2, 1)]+=(-0.503000590461+0.553599867735j)*x[2]**o + ((-0.15222593428+0.270682007469j))*x[2]
            ref[(2, 1)]+=(-0.503000590461+0.553599867735j)*x_ref[2]**o + ((-0.15222593428+0.270682007469j))*x_ref[2]
            arg[(2, 2)]+=(0.751817929285+0.623437507151j)*x[2]**o + ((-0.590094433971+0.0471985541632j))*x[2]
            ref[(2, 2)]+=(0.751817929285+0.623437507151j)*x_ref[2]**o + ((-0.590094433971+0.0471985541632j))*x_ref[2]
            arg[(3, 0)]+=(-0.274551635858-0.911710604841j)*x[2]**o + ((0.938824865059+0.0373630938351j))*x[2]
            ref[(3, 0)]+=(-0.274551635858-0.911710604841j)*x_ref[2]**o + ((0.938824865059+0.0373630938351j))*x_ref[2]
            arg[(3, 1)]+=(-0.140411311044-0.65467448927j)*x[2]**o + ((-0.451733627555-0.124655879859j))*x[2]
            ref[(3, 1)]+=(-0.140411311044-0.65467448927j)*x_ref[2]**o + ((-0.451733627555-0.124655879859j))*x_ref[2]
            arg[(3, 2)]+=(-0.962845198181-0.586046365181j)*x[2]**o + ((0.0873195622606+0.56257606546j))*x[2]
            ref[(3, 2)]+=(-0.962845198181-0.586046365181j)*x_ref[2]**o + ((0.0873195622606+0.56257606546j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 3),w)
        ref = Data(0,(2, 2, 3),w_ref)
        arg[(0, 0, 0)]=(-0.0855045246805+0.0618800528661j)*x[0]**o + ((0.765040891936-0.497744395822j))*x[0] + ((0.583842087984-0.530372950309j))*x[1]**o + ((0.158493461792+0.260685248752j))*x[1]
        ref[(0, 0, 0)]=(-0.0855045246805+0.0618800528661j)*x_ref[0]**o + ((0.765040891936-0.497744395822j))*x_ref[0] + ((0.583842087984-0.530372950309j))*x_ref[1]**o + ((0.158493461792+0.260685248752j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.946441964057-0.34107160242j)*x[0]**o + ((0.0164885927899-0.433059706283j))*x[0] + ((0.449329414035-0.29687054382j))*x[1]**o + ((0.305816129783-0.670003604344j))*x[1]
        ref[(0, 0, 1)]=(-0.946441964057-0.34107160242j)*x_ref[0]**o + ((0.0164885927899-0.433059706283j))*x_ref[0] + ((0.449329414035-0.29687054382j))*x_ref[1]**o + ((0.305816129783-0.670003604344j))*x_ref[1]
        arg[(0, 0, 2)]=(0.866133321204+0.288740642213j)*x[0]**o + ((-0.0639224652158+0.756359061734j))*x[0] + ((0.432138635281+0.905402281021j))*x[1]**o + ((-0.427732182819-0.888969862363j))*x[1]
        ref[(0, 0, 2)]=(0.866133321204+0.288740642213j)*x_ref[0]**o + ((-0.0639224652158+0.756359061734j))*x_ref[0] + ((0.432138635281+0.905402281021j))*x_ref[1]**o + ((-0.427732182819-0.888969862363j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.0243399508595+0.0261625681425j)*x[0]**o + ((0.226829866798+0.471403880201j))*x[0] + ((0.867418388214-0.241152048249j))*x[1]**o + ((-0.0592884337346-0.611771549429j))*x[1]
        ref[(0, 1, 0)]=(-0.0243399508595+0.0261625681425j)*x_ref[0]**o + ((0.226829866798+0.471403880201j))*x_ref[0] + ((0.867418388214-0.241152048249j))*x_ref[1]**o + ((-0.0592884337346-0.611771549429j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.297015264481-0.571757251475j)*x[0]**o + ((0.825854561972-0.551454670589j))*x[0] + ((0.815278860744-0.286869781563j))*x[1]**o + ((0.140555823583+0.431518780385j))*x[1]
        ref[(0, 1, 1)]=(-0.297015264481-0.571757251475j)*x_ref[0]**o + ((0.825854561972-0.551454670589j))*x_ref[0] + ((0.815278860744-0.286869781563j))*x_ref[1]**o + ((0.140555823583+0.431518780385j))*x_ref[1]
        arg[(0, 1, 2)]=(0.154396339277+0.477049135493j)*x[0]**o + ((0.250053477839+0.912007031476j))*x[0] + ((-0.754473010092-0.0208046441927j))*x[1]**o + ((-0.579988095942-0.481210135498j))*x[1]
        ref[(0, 1, 2)]=(0.154396339277+0.477049135493j)*x_ref[0]**o + ((0.250053477839+0.912007031476j))*x_ref[0] + ((-0.754473010092-0.0208046441927j))*x_ref[1]**o + ((-0.579988095942-0.481210135498j))*x_ref[1]
        arg[(1, 0, 0)]=(-0.235137316203-0.658391630552j)*x[0]**o + ((0.370524646745-0.546788320199j))*x[0] + ((-0.464855941972+0.775244996011j))*x[1]**o + ((-0.228044066784+0.448900856351j))*x[1]
        ref[(1, 0, 0)]=(-0.235137316203-0.658391630552j)*x_ref[0]**o + ((0.370524646745-0.546788320199j))*x_ref[0] + ((-0.464855941972+0.775244996011j))*x_ref[1]**o + ((-0.228044066784+0.448900856351j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.0209091855489-0.0374283616111j)*x[0]**o + ((-0.014018783963-0.41579568311j))*x[0] + ((-0.94154718478+0.84344956456j))*x[1]**o + ((-0.832195905818-0.617267451276j))*x[1]
        ref[(1, 0, 1)]=(-0.0209091855489-0.0374283616111j)*x_ref[0]**o + ((-0.014018783963-0.41579568311j))*x_ref[0] + ((-0.94154718478+0.84344956456j))*x_ref[1]**o + ((-0.832195905818-0.617267451276j))*x_ref[1]
        arg[(1, 0, 2)]=(0.218123885115-0.694333972049j)*x[0]**o + ((0.335723078162-0.0957400551394j))*x[0] + ((-0.703777606853+0.0577720080789j))*x[1]**o + ((0.71806498269+0.0760661108422j))*x[1]
        ref[(1, 0, 2)]=(0.218123885115-0.694333972049j)*x_ref[0]**o + ((0.335723078162-0.0957400551394j))*x_ref[0] + ((-0.703777606853+0.0577720080789j))*x_ref[1]**o + ((0.71806498269+0.0760661108422j))*x_ref[1]
        arg[(1, 1, 0)]=(0.00801918609703-0.87314646205j)*x[0]**o + ((0.0440928752265-0.734292284393j))*x[0] + ((0.309310655384-0.0854892986631j))*x[1]**o + ((0.842070628554-0.955742340066j))*x[1]
        ref[(1, 1, 0)]=(0.00801918609703-0.87314646205j)*x_ref[0]**o + ((0.0440928752265-0.734292284393j))*x_ref[0] + ((0.309310655384-0.0854892986631j))*x_ref[1]**o + ((0.842070628554-0.955742340066j))*x_ref[1]
        arg[(1, 1, 1)]=(0.175865081232-0.254170278588j)*x[0]**o + ((0.309865058446+0.996335649372j))*x[0] + ((-0.963006530232-0.828499451211j))*x[1]**o + ((-0.583027254155-0.0771022428392j))*x[1]
        ref[(1, 1, 1)]=(0.175865081232-0.254170278588j)*x_ref[0]**o + ((0.309865058446+0.996335649372j))*x_ref[0] + ((-0.963006530232-0.828499451211j))*x_ref[1]**o + ((-0.583027254155-0.0771022428392j))*x_ref[1]
        arg[(1, 1, 2)]=(0.138097567227-0.592328618431j)*x[0]**o + ((-0.235393599837+0.417461754616j))*x[0] + ((0.0440968287487+0.632521548139j))*x[1]**o + ((-0.502432963057-0.635496215816j))*x[1]
        ref[(1, 1, 2)]=(0.138097567227-0.592328618431j)*x_ref[0]**o + ((-0.235393599837+0.417461754616j))*x_ref[0] + ((0.0440968287487+0.632521548139j))*x_ref[1]**o + ((-0.502432963057-0.635496215816j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.941872921251+0.193302384934j)*x[2]**o + ((-0.491740133822-0.696977908455j))*x[2]
            ref[(0, 0, 0)]+=(-0.941872921251+0.193302384934j)*x_ref[2]**o + ((-0.491740133822-0.696977908455j))*x_ref[2]
            arg[(0, 0, 1)]+=(-0.412484785211-0.498238498019j)*x[2]**o + ((-0.880172732006+0.151304822197j))*x[2]
            ref[(0, 0, 1)]+=(-0.412484785211-0.498238498019j)*x_ref[2]**o + ((-0.880172732006+0.151304822197j))*x_ref[2]
            arg[(0, 0, 2)]+=(-0.507642999082+0.407655993241j)*x[2]**o + ((0.23208398942+0.454060914016j))*x[2]
            ref[(0, 0, 2)]+=(-0.507642999082+0.407655993241j)*x_ref[2]**o + ((0.23208398942+0.454060914016j))*x_ref[2]
            arg[(0, 1, 0)]+=(-0.822387564187-0.746351203708j)*x[2]**o + ((-0.191480654223+0.934380084388j))*x[2]
            ref[(0, 1, 0)]+=(-0.822387564187-0.746351203708j)*x_ref[2]**o + ((-0.191480654223+0.934380084388j))*x_ref[2]
            arg[(0, 1, 1)]+=(0.572899038832-0.0249625982344j)*x[2]**o + ((0.612153263945-0.707056462051j))*x[2]
            ref[(0, 1, 1)]+=(0.572899038832-0.0249625982344j)*x_ref[2]**o + ((0.612153263945-0.707056462051j))*x_ref[2]
            arg[(0, 1, 2)]+=(-0.727449122048-0.391777887691j)*x[2]**o + ((0.405956931026-0.876421183774j))*x[2]
            ref[(0, 1, 2)]+=(-0.727449122048-0.391777887691j)*x_ref[2]**o + ((0.405956931026-0.876421183774j))*x_ref[2]
            arg[(1, 0, 0)]+=(0.469657952806+0.188342103735j)*x[2]**o + ((-0.663338011961+0.645794288919j))*x[2]
            ref[(1, 0, 0)]+=(0.469657952806+0.188342103735j)*x_ref[2]**o + ((-0.663338011961+0.645794288919j))*x_ref[2]
            arg[(1, 0, 1)]+=(0.0974524636952-0.706817579344j)*x[2]**o + ((0.137820645068+0.0633824690429j))*x[2]
            ref[(1, 0, 1)]+=(0.0974524636952-0.706817579344j)*x_ref[2]**o + ((0.137820645068+0.0633824690429j))*x_ref[2]
            arg[(1, 0, 2)]+=(-0.525521617423+0.0202497289892j)*x[2]**o + ((0.24747949842+0.182825192361j))*x[2]
            ref[(1, 0, 2)]+=(-0.525521617423+0.0202497289892j)*x_ref[2]**o + ((0.24747949842+0.182825192361j))*x_ref[2]
            arg[(1, 1, 0)]+=(0.887072251901+0.918797963741j)*x[2]**o + ((0.202296305488+0.729436444831j))*x[2]
            ref[(1, 1, 0)]+=(0.887072251901+0.918797963741j)*x_ref[2]**o + ((0.202296305488+0.729436444831j))*x_ref[2]
            arg[(1, 1, 1)]+=(0.0647649267706-0.30434805799j)*x[2]**o + ((0.925832916494+0.663306660098j))*x[2]
            ref[(1, 1, 1)]+=(0.0647649267706-0.30434805799j)*x_ref[2]**o + ((0.925832916494+0.663306660098j))*x_ref[2]
            arg[(1, 1, 2)]+=(-0.227081762769+0.727403794093j)*x[2]**o + ((-0.355065315659-0.298325314166j))*x[2]
            ref[(1, 1, 2)]+=(-0.227081762769+0.727403794093j)*x_ref[2]**o + ((-0.355065315659-0.298325314166j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 2, 2),w)
        ref = Data(0,(4, 3, 2, 2),w_ref)
        arg[(0, 0, 0, 0)]=(0.461411918525+0.358682098745j)*x[0]**o + ((-0.517134434511-0.89513842827j))*x[0] + ((0.705560002812+0.0834358821286j))*x[1]**o + ((0.133560079669-0.626722279119j))*x[1]
        ref[(0, 0, 0, 0)]=(0.461411918525+0.358682098745j)*x_ref[0]**o + ((-0.517134434511-0.89513842827j))*x_ref[0] + ((0.705560002812+0.0834358821286j))*x_ref[1]**o + ((0.133560079669-0.626722279119j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.722379013538+0.319746037726j)*x[0]**o + ((0.160867382685-0.10373846922j))*x[0] + ((0.25382412743-0.238042334724j))*x[1]**o + ((0.659541457857-0.133909222118j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.722379013538+0.319746037726j)*x_ref[0]**o + ((0.160867382685-0.10373846922j))*x_ref[0] + ((0.25382412743-0.238042334724j))*x_ref[1]**o + ((0.659541457857-0.133909222118j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.30983864563+0.0846893960533j)*x[0]**o + ((-0.706338469484+0.476648256917j))*x[0] + ((-0.547220690767+0.89703412589j))*x[1]**o + ((0.0779867115532-0.979755068424j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.30983864563+0.0846893960533j)*x_ref[0]**o + ((-0.706338469484+0.476648256917j))*x_ref[0] + ((-0.547220690767+0.89703412589j))*x_ref[1]**o + ((0.0779867115532-0.979755068424j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.443586510716+0.24705438552j)*x[0]**o + ((-0.382611190028+0.520292297871j))*x[0] + ((-0.163007748786-0.761960492688j))*x[1]**o + ((0.905222120757-0.874668417647j))*x[1]
        ref[(0, 0, 1, 1)]=(0.443586510716+0.24705438552j)*x_ref[0]**o + ((-0.382611190028+0.520292297871j))*x_ref[0] + ((-0.163007748786-0.761960492688j))*x_ref[1]**o + ((0.905222120757-0.874668417647j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.915665066811+0.082760650041j)*x[0]**o + ((-0.619541773903+0.725712740526j))*x[0] + ((0.427014262678-0.695890655457j))*x[1]**o + ((0.953676811103+0.278702380399j))*x[1]
        ref[(0, 1, 0, 0)]=(0.915665066811+0.082760650041j)*x_ref[0]**o + ((-0.619541773903+0.725712740526j))*x_ref[0] + ((0.427014262678-0.695890655457j))*x_ref[1]**o + ((0.953676811103+0.278702380399j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.0373960256684+0.972107318322j)*x[0]**o + ((0.489608463824-0.910658045926j))*x[0] + ((-0.0975008761262-0.539788452997j))*x[1]**o + ((-0.685268340919-0.367950727356j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.0373960256684+0.972107318322j)*x_ref[0]**o + ((0.489608463824-0.910658045926j))*x_ref[0] + ((-0.0975008761262-0.539788452997j))*x_ref[1]**o + ((-0.685268340919-0.367950727356j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.496509241276+0.347263062393j)*x[0]**o + ((-0.945549956228+0.546835139568j))*x[0] + ((0.272570006004-0.387157594375j))*x[1]**o + ((0.680389840527+0.391109326799j))*x[1]
        ref[(0, 1, 1, 0)]=(0.496509241276+0.347263062393j)*x_ref[0]**o + ((-0.945549956228+0.546835139568j))*x_ref[0] + ((0.272570006004-0.387157594375j))*x_ref[1]**o + ((0.680389840527+0.391109326799j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.168823886314+0.142822557794j)*x[0]**o + ((0.431501248267+0.688751138315j))*x[0] + ((0.920035686747-0.337496771757j))*x[1]**o + ((-0.300029446656+0.0890854631852j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.168823886314+0.142822557794j)*x_ref[0]**o + ((0.431501248267+0.688751138315j))*x_ref[0] + ((0.920035686747-0.337496771757j))*x_ref[1]**o + ((-0.300029446656+0.0890854631852j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.0495326991609-0.775395079638j)*x[0]**o + ((-0.100496635904-0.435696353348j))*x[0] + ((-0.357255958356-0.0838716808475j))*x[1]**o + ((0.0809277991586+0.314655124642j))*x[1]
        ref[(0, 2, 0, 0)]=(0.0495326991609-0.775395079638j)*x_ref[0]**o + ((-0.100496635904-0.435696353348j))*x_ref[0] + ((-0.357255958356-0.0838716808475j))*x_ref[1]**o + ((0.0809277991586+0.314655124642j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(0.138685639289+0.119031149323j)*x[0]**o + ((0.866650117478-0.0827884972064j))*x[0] + ((0.686537366428+0.413093308643j))*x[1]**o + ((0.837956322204+0.190965540317j))*x[1]
        ref[(0, 2, 0, 1)]=(0.138685639289+0.119031149323j)*x_ref[0]**o + ((0.866650117478-0.0827884972064j))*x_ref[0] + ((0.686537366428+0.413093308643j))*x_ref[1]**o + ((0.837956322204+0.190965540317j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.555070955853-0.785048226616j)*x[0]**o + ((0.962004405166-0.849560357274j))*x[0] + ((0.148473670837+0.805030751297j))*x[1]**o + ((-0.00603631998526-0.667066598253j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.555070955853-0.785048226616j)*x_ref[0]**o + ((0.962004405166-0.849560357274j))*x_ref[0] + ((0.148473670837+0.805030751297j))*x_ref[1]**o + ((-0.00603631998526-0.667066598253j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(-0.297797933349+0.390400989551j)*x[0]**o + ((0.971270867644+0.18047811598j))*x[0] + ((0.430817585003+0.760520747937j))*x[1]**o + ((-0.980951225336+0.788019128804j))*x[1]
        ref[(0, 2, 1, 1)]=(-0.297797933349+0.390400989551j)*x_ref[0]**o + ((0.971270867644+0.18047811598j))*x_ref[0] + ((0.430817585003+0.760520747937j))*x_ref[1]**o + ((-0.980951225336+0.788019128804j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.224311274466+0.129900622742j)*x[0]**o + ((0.44761410626-0.123423196201j))*x[0] + ((0.738628060736+0.971508664263j))*x[1]**o + ((0.660088530436+0.633462510881j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.224311274466+0.129900622742j)*x_ref[0]**o + ((0.44761410626-0.123423196201j))*x_ref[0] + ((0.738628060736+0.971508664263j))*x_ref[1]**o + ((0.660088530436+0.633462510881j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.548129515538+0.0616837885751j)*x[0]**o + ((0.864248306118+0.47064578716j))*x[0] + ((0.253371355359+0.425271149997j))*x[1]**o + ((0.822960420729+0.519671091868j))*x[1]
        ref[(1, 0, 0, 1)]=(0.548129515538+0.0616837885751j)*x_ref[0]**o + ((0.864248306118+0.47064578716j))*x_ref[0] + ((0.253371355359+0.425271149997j))*x_ref[1]**o + ((0.822960420729+0.519671091868j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.959394190431+0.696116507869j)*x[0]**o + ((0.0952186312689-0.972244578412j))*x[0] + ((0.801250244266-0.719786719961j))*x[1]**o + ((0.477842509506-0.326699749445j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.959394190431+0.696116507869j)*x_ref[0]**o + ((0.0952186312689-0.972244578412j))*x_ref[0] + ((0.801250244266-0.719786719961j))*x_ref[1]**o + ((0.477842509506-0.326699749445j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.679818162757-0.282824341915j)*x[0]**o + ((-0.482502382074-0.384143246094j))*x[0] + ((-0.0847816461621+0.949115896875j))*x[1]**o + ((-0.875768823568+0.111080636999j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.679818162757-0.282824341915j)*x_ref[0]**o + ((-0.482502382074-0.384143246094j))*x_ref[0] + ((-0.0847816461621+0.949115896875j))*x_ref[1]**o + ((-0.875768823568+0.111080636999j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.358427969024+0.596756006133j)*x[0]**o + ((-0.230740466144+0.0875621065469j))*x[0] + ((0.0424018488533-0.998619526543j))*x[1]**o + ((0.884755297178+0.35891960254j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.358427969024+0.596756006133j)*x_ref[0]**o + ((-0.230740466144+0.0875621065469j))*x_ref[0] + ((0.0424018488533-0.998619526543j))*x_ref[1]**o + ((0.884755297178+0.35891960254j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.600296584845+0.782838613717j)*x[0]**o + ((0.0170757166179+0.904479374261j))*x[0] + ((0.803710940574+0.504742149655j))*x[1]**o + ((-0.144797525338+0.107150094893j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.600296584845+0.782838613717j)*x_ref[0]**o + ((0.0170757166179+0.904479374261j))*x_ref[0] + ((0.803710940574+0.504742149655j))*x_ref[1]**o + ((-0.144797525338+0.107150094893j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.883612110235-0.0998327430481j)*x[0]**o + ((0.280990740911+0.0228616810453j))*x[0] + ((-0.647032273629-0.18152639446j))*x[1]**o + ((-0.348565858425-0.840966572811j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.883612110235-0.0998327430481j)*x_ref[0]**o + ((0.280990740911+0.0228616810453j))*x_ref[0] + ((-0.647032273629-0.18152639446j))*x_ref[1]**o + ((-0.348565858425-0.840966572811j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.16354488631-0.528228000544j)*x[0]**o + ((-0.517039580121-0.0413191092071j))*x[0] + ((0.556305658194-0.887060920207j))*x[1]**o + ((0.526337918793-0.0725369512349j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.16354488631-0.528228000544j)*x_ref[0]**o + ((-0.517039580121-0.0413191092071j))*x_ref[0] + ((0.556305658194-0.887060920207j))*x_ref[1]**o + ((0.526337918793-0.0725369512349j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(0.806418513512-0.244091451244j)*x[0]**o + ((-0.233885689234+0.613423058453j))*x[0] + ((-0.643125405219+0.51405415921j))*x[1]**o + ((0.249184243872-0.560134638991j))*x[1]
        ref[(1, 2, 0, 0)]=(0.806418513512-0.244091451244j)*x_ref[0]**o + ((-0.233885689234+0.613423058453j))*x_ref[0] + ((-0.643125405219+0.51405415921j))*x_ref[1]**o + ((0.249184243872-0.560134638991j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(-0.493770738822-0.472358887312j)*x[0]**o + ((-0.409265925472-0.84670191063j))*x[0] + ((0.893100963084-0.664571143199j))*x[1]**o + ((0.293941487844-0.0668792125126j))*x[1]
        ref[(1, 2, 0, 1)]=(-0.493770738822-0.472358887312j)*x_ref[0]**o + ((-0.409265925472-0.84670191063j))*x_ref[0] + ((0.893100963084-0.664571143199j))*x_ref[1]**o + ((0.293941487844-0.0668792125126j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(0.117714081952-0.22034717673j)*x[0]**o + ((-0.557715445609+0.61191788082j))*x[0] + ((-0.15389576161-0.547219536379j))*x[1]**o + ((0.603321217396-0.28263843696j))*x[1]
        ref[(1, 2, 1, 0)]=(0.117714081952-0.22034717673j)*x_ref[0]**o + ((-0.557715445609+0.61191788082j))*x_ref[0] + ((-0.15389576161-0.547219536379j))*x_ref[1]**o + ((0.603321217396-0.28263843696j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(-0.77204142488-0.361632237633j)*x[0]**o + ((0.367947083206+0.438709032575j))*x[0] + ((0.328695372787-0.643419563249j))*x[1]**o + ((-0.831694971394-0.515840697408j))*x[1]
        ref[(1, 2, 1, 1)]=(-0.77204142488-0.361632237633j)*x_ref[0]**o + ((0.367947083206+0.438709032575j))*x_ref[0] + ((0.328695372787-0.643419563249j))*x_ref[1]**o + ((-0.831694971394-0.515840697408j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(-0.395425696364+0.0992649095132j)*x[0]**o + ((-0.269697780064-0.561159346467j))*x[0] + ((0.862282995942-0.971198381901j))*x[1]**o + ((-0.864376211994-0.131217849419j))*x[1]
        ref[(2, 0, 0, 0)]=(-0.395425696364+0.0992649095132j)*x_ref[0]**o + ((-0.269697780064-0.561159346467j))*x_ref[0] + ((0.862282995942-0.971198381901j))*x_ref[1]**o + ((-0.864376211994-0.131217849419j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(0.554619056773-0.888811435764j)*x[0]**o + ((-0.35425714613-0.480326371991j))*x[0] + ((0.285797256466+0.576967994401j))*x[1]**o + ((0.112409777006+0.806845527889j))*x[1]
        ref[(2, 0, 0, 1)]=(0.554619056773-0.888811435764j)*x_ref[0]**o + ((-0.35425714613-0.480326371991j))*x_ref[0] + ((0.285797256466+0.576967994401j))*x_ref[1]**o + ((0.112409777006+0.806845527889j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(0.796617083763+0.146654650224j)*x[0]**o + ((-0.981036992313-0.442987655202j))*x[0] + ((-0.317242659552-0.181113876689j))*x[1]**o + ((-0.269886448713-0.736265994066j))*x[1]
        ref[(2, 0, 1, 0)]=(0.796617083763+0.146654650224j)*x_ref[0]**o + ((-0.981036992313-0.442987655202j))*x_ref[0] + ((-0.317242659552-0.181113876689j))*x_ref[1]**o + ((-0.269886448713-0.736265994066j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.0820497453919+0.445667380721j)*x[0]**o + ((-0.247032424784+0.504966603657j))*x[0] + ((-0.794854437689+0.391640609335j))*x[1]**o + ((-0.726052485029-0.864198303102j))*x[1]
        ref[(2, 0, 1, 1)]=(0.0820497453919+0.445667380721j)*x_ref[0]**o + ((-0.247032424784+0.504966603657j))*x_ref[0] + ((-0.794854437689+0.391640609335j))*x_ref[1]**o + ((-0.726052485029-0.864198303102j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(-0.574227635272+0.452309678136j)*x[0]**o + ((0.759320566182+0.591975958834j))*x[0] + ((0.918404696811+0.9572015101j))*x[1]**o + ((-0.0210693505457+0.698092689856j))*x[1]
        ref[(2, 1, 0, 0)]=(-0.574227635272+0.452309678136j)*x_ref[0]**o + ((0.759320566182+0.591975958834j))*x_ref[0] + ((0.918404696811+0.9572015101j))*x_ref[1]**o + ((-0.0210693505457+0.698092689856j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(-0.644203020722-0.540659156271j)*x[0]**o + ((-0.690624322769-0.374259771115j))*x[0] + ((-0.64047015292-0.210315671128j))*x[1]**o + ((-0.727086045777-0.557256263361j))*x[1]
        ref[(2, 1, 0, 1)]=(-0.644203020722-0.540659156271j)*x_ref[0]**o + ((-0.690624322769-0.374259771115j))*x_ref[0] + ((-0.64047015292-0.210315671128j))*x_ref[1]**o + ((-0.727086045777-0.557256263361j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(-0.967120437419-0.0840800063168j)*x[0]**o + ((-0.288142264971-0.224675271664j))*x[0] + ((-0.618708942363-0.79606589651j))*x[1]**o + ((0.846104881739-0.0609468657343j))*x[1]
        ref[(2, 1, 1, 0)]=(-0.967120437419-0.0840800063168j)*x_ref[0]**o + ((-0.288142264971-0.224675271664j))*x_ref[0] + ((-0.618708942363-0.79606589651j))*x_ref[1]**o + ((0.846104881739-0.0609468657343j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(0.56146689819+0.83137496758j)*x[0]**o + ((0.732424376262-0.808912380662j))*x[0] + ((0.629535073395+0.532671140912j))*x[1]**o + ((-0.851391005228-0.857591173825j))*x[1]
        ref[(2, 1, 1, 1)]=(0.56146689819+0.83137496758j)*x_ref[0]**o + ((0.732424376262-0.808912380662j))*x_ref[0] + ((0.629535073395+0.532671140912j))*x_ref[1]**o + ((-0.851391005228-0.857591173825j))*x_ref[1]
        arg[(2, 2, 0, 0)]=(0.334438693477+0.96935836815j)*x[0]**o + ((0.818883709161-0.119459974196j))*x[0] + ((0.642300967992-0.104809066953j))*x[1]**o + ((-0.303373946975-0.389298628866j))*x[1]
        ref[(2, 2, 0, 0)]=(0.334438693477+0.96935836815j)*x_ref[0]**o + ((0.818883709161-0.119459974196j))*x_ref[0] + ((0.642300967992-0.104809066953j))*x_ref[1]**o + ((-0.303373946975-0.389298628866j))*x_ref[1]
        arg[(2, 2, 0, 1)]=(0.0602717002373-0.0038121432197j)*x[0]**o + ((0.560055929288+0.120650606301j))*x[0] + ((0.461065541542-0.727839789941j))*x[1]**o + ((-0.118086462725-0.438963302939j))*x[1]
        ref[(2, 2, 0, 1)]=(0.0602717002373-0.0038121432197j)*x_ref[0]**o + ((0.560055929288+0.120650606301j))*x_ref[0] + ((0.461065541542-0.727839789941j))*x_ref[1]**o + ((-0.118086462725-0.438963302939j))*x_ref[1]
        arg[(2, 2, 1, 0)]=(-0.801076743352-0.357133388129j)*x[0]**o + ((0.191019359409+0.552051262251j))*x[0] + ((0.73988861489-0.911619024262j))*x[1]**o + ((-0.54306105578+0.536613819656j))*x[1]
        ref[(2, 2, 1, 0)]=(-0.801076743352-0.357133388129j)*x_ref[0]**o + ((0.191019359409+0.552051262251j))*x_ref[0] + ((0.73988861489-0.911619024262j))*x_ref[1]**o + ((-0.54306105578+0.536613819656j))*x_ref[1]
        arg[(2, 2, 1, 1)]=(0.293345552566-0.555430392885j)*x[0]**o + ((0.950626361481-0.826230277965j))*x[0] + ((-0.305025367816-0.763239739138j))*x[1]**o + ((0.741342814672-0.580540289971j))*x[1]
        ref[(2, 2, 1, 1)]=(0.293345552566-0.555430392885j)*x_ref[0]**o + ((0.950626361481-0.826230277965j))*x_ref[0] + ((-0.305025367816-0.763239739138j))*x_ref[1]**o + ((0.741342814672-0.580540289971j))*x_ref[1]
        arg[(3, 0, 0, 0)]=(-0.626788292084-0.683217669409j)*x[0]**o + ((0.843395995006+0.753626377711j))*x[0] + ((0.0168412470691-0.774463338756j))*x[1]**o + ((-0.907214087992-0.410576117995j))*x[1]
        ref[(3, 0, 0, 0)]=(-0.626788292084-0.683217669409j)*x_ref[0]**o + ((0.843395995006+0.753626377711j))*x_ref[0] + ((0.0168412470691-0.774463338756j))*x_ref[1]**o + ((-0.907214087992-0.410576117995j))*x_ref[1]
        arg[(3, 0, 0, 1)]=(0.250507108153-0.38767919156j)*x[0]**o + ((0.203918960446-0.0864283598913j))*x[0] + ((0.677591283397+0.0929477743358j))*x[1]**o + ((-0.666518044134+0.845413532077j))*x[1]
        ref[(3, 0, 0, 1)]=(0.250507108153-0.38767919156j)*x_ref[0]**o + ((0.203918960446-0.0864283598913j))*x_ref[0] + ((0.677591283397+0.0929477743358j))*x_ref[1]**o + ((-0.666518044134+0.845413532077j))*x_ref[1]
        arg[(3, 0, 1, 0)]=(-0.318086857161-0.991846460277j)*x[0]**o + ((0.948176293161+0.834438115436j))*x[0] + ((-0.964965343777-0.801489419798j))*x[1]**o + ((-0.736292603774-0.983729367246j))*x[1]
        ref[(3, 0, 1, 0)]=(-0.318086857161-0.991846460277j)*x_ref[0]**o + ((0.948176293161+0.834438115436j))*x_ref[0] + ((-0.964965343777-0.801489419798j))*x_ref[1]**o + ((-0.736292603774-0.983729367246j))*x_ref[1]
        arg[(3, 0, 1, 1)]=(0.877508742162+0.940527008659j)*x[0]**o + ((0.815307011664+0.0115489612404j))*x[0] + ((-0.166395023051+0.877291292963j))*x[1]**o + ((-0.759667776657-0.702261305619j))*x[1]
        ref[(3, 0, 1, 1)]=(0.877508742162+0.940527008659j)*x_ref[0]**o + ((0.815307011664+0.0115489612404j))*x_ref[0] + ((-0.166395023051+0.877291292963j))*x_ref[1]**o + ((-0.759667776657-0.702261305619j))*x_ref[1]
        arg[(3, 1, 0, 0)]=(0.00641061274794+0.693758055974j)*x[0]**o + ((-0.207173867114-0.339935306368j))*x[0] + ((0.442370283018+0.649558831401j))*x[1]**o + ((-0.413603659905-0.457706478017j))*x[1]
        ref[(3, 1, 0, 0)]=(0.00641061274794+0.693758055974j)*x_ref[0]**o + ((-0.207173867114-0.339935306368j))*x_ref[0] + ((0.442370283018+0.649558831401j))*x_ref[1]**o + ((-0.413603659905-0.457706478017j))*x_ref[1]
        arg[(3, 1, 0, 1)]=(0.381433301943+0.305525197384j)*x[0]**o + ((0.0773720521213-0.762764333315j))*x[0] + ((0.226859435251-0.86600753024j))*x[1]**o + ((0.138707002899+0.547567305543j))*x[1]
        ref[(3, 1, 0, 1)]=(0.381433301943+0.305525197384j)*x_ref[0]**o + ((0.0773720521213-0.762764333315j))*x_ref[0] + ((0.226859435251-0.86600753024j))*x_ref[1]**o + ((0.138707002899+0.547567305543j))*x_ref[1]
        arg[(3, 1, 1, 0)]=(0.995589952508-0.824770722144j)*x[0]**o + ((0.967294151225+0.985043934546j))*x[0] + ((-0.926384413715-0.501700905443j))*x[1]**o + ((-0.437938914779-0.493612849028j))*x[1]
        ref[(3, 1, 1, 0)]=(0.995589952508-0.824770722144j)*x_ref[0]**o + ((0.967294151225+0.985043934546j))*x_ref[0] + ((-0.926384413715-0.501700905443j))*x_ref[1]**o + ((-0.437938914779-0.493612849028j))*x_ref[1]
        arg[(3, 1, 1, 1)]=(0.44290379715+0.156462382614j)*x[0]**o + ((0.687286713555+0.035309099558j))*x[0] + ((-0.271161804117-0.228061861019j))*x[1]**o + ((-0.443033583513+0.357945964744j))*x[1]
        ref[(3, 1, 1, 1)]=(0.44290379715+0.156462382614j)*x_ref[0]**o + ((0.687286713555+0.035309099558j))*x_ref[0] + ((-0.271161804117-0.228061861019j))*x_ref[1]**o + ((-0.443033583513+0.357945964744j))*x_ref[1]
        arg[(3, 2, 0, 0)]=(-0.779914262233-0.54576139278j)*x[0]**o + ((-0.835993016727+0.546693422928j))*x[0] + ((0.469902667822+0.478899261842j))*x[1]**o + ((-0.0298347445095-0.777416439158j))*x[1]
        ref[(3, 2, 0, 0)]=(-0.779914262233-0.54576139278j)*x_ref[0]**o + ((-0.835993016727+0.546693422928j))*x_ref[0] + ((0.469902667822+0.478899261842j))*x_ref[1]**o + ((-0.0298347445095-0.777416439158j))*x_ref[1]
        arg[(3, 2, 0, 1)]=(-0.657361379345-0.295236363074j)*x[0]**o + ((-0.223564404994+0.779802838434j))*x[0] + ((-0.967896136737+0.460332724899j))*x[1]**o + ((0.677887200792+0.113085069773j))*x[1]
        ref[(3, 2, 0, 1)]=(-0.657361379345-0.295236363074j)*x_ref[0]**o + ((-0.223564404994+0.779802838434j))*x_ref[0] + ((-0.967896136737+0.460332724899j))*x_ref[1]**o + ((0.677887200792+0.113085069773j))*x_ref[1]
        arg[(3, 2, 1, 0)]=(0.0667868315742+0.166391782419j)*x[0]**o + ((0.6876723556-0.00346035096245j))*x[0] + ((-0.219362516753+0.0470892142466j))*x[1]**o + ((-0.826523991674-0.690813467157j))*x[1]
        ref[(3, 2, 1, 0)]=(0.0667868315742+0.166391782419j)*x_ref[0]**o + ((0.6876723556-0.00346035096245j))*x_ref[0] + ((-0.219362516753+0.0470892142466j))*x_ref[1]**o + ((-0.826523991674-0.690813467157j))*x_ref[1]
        arg[(3, 2, 1, 1)]=(0.212887889166+0.358023742039j)*x[0]**o + ((0.761426670433+0.449585293164j))*x[0] + ((0.0537704502313+0.0953172172311j))*x[1]**o + ((-0.60287618842-0.43765487382j))*x[1]
        ref[(3, 2, 1, 1)]=(0.212887889166+0.358023742039j)*x_ref[0]**o + ((0.761426670433+0.449585293164j))*x_ref[0] + ((0.0537704502313+0.0953172172311j))*x_ref[1]**o + ((-0.60287618842-0.43765487382j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.208620225978-0.400269063615j)*x[2]**o + ((0.0666522361307-0.426208117276j))*x[2]
            ref[(0, 0, 0, 0)]+=(-0.208620225978-0.400269063615j)*x_ref[2]**o + ((0.0666522361307-0.426208117276j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.796096665253-0.623063087306j)*x[2]**o + ((-0.90165759585-0.739407777754j))*x[2]
            ref[(0, 0, 0, 1)]+=(-0.796096665253-0.623063087306j)*x_ref[2]**o + ((-0.90165759585-0.739407777754j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.0882586043462-0.0531377222974j)*x[2]**o + ((0.964587198512+0.655761807741j))*x[2]
            ref[(0, 0, 1, 0)]+=(-0.0882586043462-0.0531377222974j)*x_ref[2]**o + ((0.964587198512+0.655761807741j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(0.0347038574615-0.117879541797j)*x[2]**o + ((0.566061279004+0.130549792075j))*x[2]
            ref[(0, 0, 1, 1)]+=(0.0347038574615-0.117879541797j)*x_ref[2]**o + ((0.566061279004+0.130549792075j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(0.0137180360376+0.0658316794116j)*x[2]**o + ((-0.991984627672+0.263342399264j))*x[2]
            ref[(0, 1, 0, 0)]+=(0.0137180360376+0.0658316794116j)*x_ref[2]**o + ((-0.991984627672+0.263342399264j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.12512649991+0.00976888998498j)*x[2]**o + ((-0.816666462344-0.603958833091j))*x[2]
            ref[(0, 1, 0, 1)]+=(0.12512649991+0.00976888998498j)*x_ref[2]**o + ((-0.816666462344-0.603958833091j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.747122256214-0.454831650919j)*x[2]**o + ((-0.133382269802+0.317536347094j))*x[2]
            ref[(0, 1, 1, 0)]+=(-0.747122256214-0.454831650919j)*x_ref[2]**o + ((-0.133382269802+0.317536347094j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.535491604104+0.11941895356j)*x[2]**o + ((0.653084022796+0.0197770150217j))*x[2]
            ref[(0, 1, 1, 1)]+=(-0.535491604104+0.11941895356j)*x_ref[2]**o + ((0.653084022796+0.0197770150217j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(0.127231083442-0.0187305451182j)*x[2]**o + ((-0.662137479677-0.923690256444j))*x[2]
            ref[(0, 2, 0, 0)]+=(0.127231083442-0.0187305451182j)*x_ref[2]**o + ((-0.662137479677-0.923690256444j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(-0.421710713636+0.586368002049j)*x[2]**o + ((-0.0462030916572+0.585454177983j))*x[2]
            ref[(0, 2, 0, 1)]+=(-0.421710713636+0.586368002049j)*x_ref[2]**o + ((-0.0462030916572+0.585454177983j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(0.399708614915-0.81747281329j)*x[2]**o + ((-0.349347798983-0.1714572838j))*x[2]
            ref[(0, 2, 1, 0)]+=(0.399708614915-0.81747281329j)*x_ref[2]**o + ((-0.349347798983-0.1714572838j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(-0.312103978609+0.992868514429j)*x[2]**o + ((0.305535679317-0.557881551738j))*x[2]
            ref[(0, 2, 1, 1)]+=(-0.312103978609+0.992868514429j)*x_ref[2]**o + ((0.305535679317-0.557881551738j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.9133468747+0.340523566457j)*x[2]**o + ((0.467165323274-0.535057953369j))*x[2]
            ref[(1, 0, 0, 0)]+=(-0.9133468747+0.340523566457j)*x_ref[2]**o + ((0.467165323274-0.535057953369j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(-0.460461607791-0.981105281631j)*x[2]**o + ((0.64255004449+0.889891452678j))*x[2]
            ref[(1, 0, 0, 1)]+=(-0.460461607791-0.981105281631j)*x_ref[2]**o + ((0.64255004449+0.889891452678j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.0247121431123+0.0883661445372j)*x[2]**o + ((-0.645689469008+0.88514739377j))*x[2]
            ref[(1, 0, 1, 0)]+=(0.0247121431123+0.0883661445372j)*x_ref[2]**o + ((-0.645689469008+0.88514739377j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.890245260942-0.974781572501j)*x[2]**o + ((0.676263269675+0.326125783491j))*x[2]
            ref[(1, 0, 1, 1)]+=(-0.890245260942-0.974781572501j)*x_ref[2]**o + ((0.676263269675+0.326125783491j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.176673981335-0.513719174334j)*x[2]**o + ((0.377929055273-0.0395082548168j))*x[2]
            ref[(1, 1, 0, 0)]+=(0.176673981335-0.513719174334j)*x_ref[2]**o + ((0.377929055273-0.0395082548168j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.981236905415+0.0743985712354j)*x[2]**o + ((-0.0353292245705-0.716171246323j))*x[2]
            ref[(1, 1, 0, 1)]+=(0.981236905415+0.0743985712354j)*x_ref[2]**o + ((-0.0353292245705-0.716171246323j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.925854811869-0.316880357043j)*x[2]**o + ((0.0881471055715-0.716264226937j))*x[2]
            ref[(1, 1, 1, 0)]+=(0.925854811869-0.316880357043j)*x_ref[2]**o + ((0.0881471055715-0.716264226937j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.508418975943-0.86553766237j)*x[2]**o + ((-0.107029414854-0.553420205149j))*x[2]
            ref[(1, 1, 1, 1)]+=(0.508418975943-0.86553766237j)*x_ref[2]**o + ((-0.107029414854-0.553420205149j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.9104259751-0.092928648109j)*x[2]**o + ((-0.691750482769+0.125185776415j))*x[2]
            ref[(1, 2, 0, 0)]+=(0.9104259751-0.092928648109j)*x_ref[2]**o + ((-0.691750482769+0.125185776415j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(-0.0960593002108-0.124284110009j)*x[2]**o + ((0.0812417051416+0.0256454804952j))*x[2]
            ref[(1, 2, 0, 1)]+=(-0.0960593002108-0.124284110009j)*x_ref[2]**o + ((0.0812417051416+0.0256454804952j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(0.401075749797-0.524327861516j)*x[2]**o + ((-0.401974734144-0.134879525974j))*x[2]
            ref[(1, 2, 1, 0)]+=(0.401075749797-0.524327861516j)*x_ref[2]**o + ((-0.401974734144-0.134879525974j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(0.516244648995+0.327015997733j)*x[2]**o + ((0.454614364375-0.812295701732j))*x[2]
            ref[(1, 2, 1, 1)]+=(0.516244648995+0.327015997733j)*x_ref[2]**o + ((0.454614364375-0.812295701732j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(0.442592841524+0.982005572607j)*x[2]**o + ((-0.12997798765+0.0970334582309j))*x[2]
            ref[(2, 0, 0, 0)]+=(0.442592841524+0.982005572607j)*x_ref[2]**o + ((-0.12997798765+0.0970334582309j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(0.983026279517+0.448964915805j)*x[2]**o + ((-0.571324381695+0.232127221651j))*x[2]
            ref[(2, 0, 0, 1)]+=(0.983026279517+0.448964915805j)*x_ref[2]**o + ((-0.571324381695+0.232127221651j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(0.481899476364+0.487841000238j)*x[2]**o + ((0.830956498674+0.319936654731j))*x[2]
            ref[(2, 0, 1, 0)]+=(0.481899476364+0.487841000238j)*x_ref[2]**o + ((0.830956498674+0.319936654731j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(-0.306035739198+0.172445272479j)*x[2]**o + ((0.659162319334+0.975562684529j))*x[2]
            ref[(2, 0, 1, 1)]+=(-0.306035739198+0.172445272479j)*x_ref[2]**o + ((0.659162319334+0.975562684529j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(-0.558739826514-0.333807325315j)*x[2]**o + ((0.51045765924-0.677716272391j))*x[2]
            ref[(2, 1, 0, 0)]+=(-0.558739826514-0.333807325315j)*x_ref[2]**o + ((0.51045765924-0.677716272391j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(-0.818255333646+0.923192447255j)*x[2]**o + ((-0.727750664226+0.734514094435j))*x[2]
            ref[(2, 1, 0, 1)]+=(-0.818255333646+0.923192447255j)*x_ref[2]**o + ((-0.727750664226+0.734514094435j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(0.46782980943-0.212039038211j)*x[2]**o + ((-0.717019736689+0.522477529244j))*x[2]
            ref[(2, 1, 1, 0)]+=(0.46782980943-0.212039038211j)*x_ref[2]**o + ((-0.717019736689+0.522477529244j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(0.38110897252+0.995025013398j)*x[2]**o + ((-0.677826617598+0.243579814759j))*x[2]
            ref[(2, 1, 1, 1)]+=(0.38110897252+0.995025013398j)*x_ref[2]**o + ((-0.677826617598+0.243579814759j))*x_ref[2]
            arg[(2, 2, 0, 0)]+=(-0.0439129745645+0.845877666461j)*x[2]**o + ((-0.546255823053+0.509446287242j))*x[2]
            ref[(2, 2, 0, 0)]+=(-0.0439129745645+0.845877666461j)*x_ref[2]**o + ((-0.546255823053+0.509446287242j))*x_ref[2]
            arg[(2, 2, 0, 1)]+=(-0.0518297461222-0.536738218189j)*x[2]**o + ((-0.283591702724+0.935944704018j))*x[2]
            ref[(2, 2, 0, 1)]+=(-0.0518297461222-0.536738218189j)*x_ref[2]**o + ((-0.283591702724+0.935944704018j))*x_ref[2]
            arg[(2, 2, 1, 0)]+=(-0.21434305595-0.385764310179j)*x[2]**o + ((0.444335747135+0.884042379936j))*x[2]
            ref[(2, 2, 1, 0)]+=(-0.21434305595-0.385764310179j)*x_ref[2]**o + ((0.444335747135+0.884042379936j))*x_ref[2]
            arg[(2, 2, 1, 1)]+=(0.188302046764-0.497179285588j)*x[2]**o + ((-0.423667402633+0.130772576785j))*x[2]
            ref[(2, 2, 1, 1)]+=(0.188302046764-0.497179285588j)*x_ref[2]**o + ((-0.423667402633+0.130772576785j))*x_ref[2]
            arg[(3, 0, 0, 0)]+=(0.977231423682+0.538166604678j)*x[2]**o + ((0.92450420907-0.9009011032j))*x[2]
            ref[(3, 0, 0, 0)]+=(0.977231423682+0.538166604678j)*x_ref[2]**o + ((0.92450420907-0.9009011032j))*x_ref[2]
            arg[(3, 0, 0, 1)]+=(0.996352487657-0.341917626658j)*x[2]**o + ((0.557283798572-0.633528383062j))*x[2]
            ref[(3, 0, 0, 1)]+=(0.996352487657-0.341917626658j)*x_ref[2]**o + ((0.557283798572-0.633528383062j))*x_ref[2]
            arg[(3, 0, 1, 0)]+=(0.598598785939-0.693876669377j)*x[2]**o + ((0.495029018458-0.954427544015j))*x[2]
            ref[(3, 0, 1, 0)]+=(0.598598785939-0.693876669377j)*x_ref[2]**o + ((0.495029018458-0.954427544015j))*x_ref[2]
            arg[(3, 0, 1, 1)]+=(0.429990832248-0.0801026067725j)*x[2]**o + ((0.315010920331+0.768519090747j))*x[2]
            ref[(3, 0, 1, 1)]+=(0.429990832248-0.0801026067725j)*x_ref[2]**o + ((0.315010920331+0.768519090747j))*x_ref[2]
            arg[(3, 1, 0, 0)]+=(-0.425790938046+0.87412083573j)*x[2]**o + ((0.127884812959-0.182149491749j))*x[2]
            ref[(3, 1, 0, 0)]+=(-0.425790938046+0.87412083573j)*x_ref[2]**o + ((0.127884812959-0.182149491749j))*x_ref[2]
            arg[(3, 1, 0, 1)]+=(-0.97193020515-0.153971083552j)*x[2]**o + ((0.732091091382+0.979740026034j))*x[2]
            ref[(3, 1, 0, 1)]+=(-0.97193020515-0.153971083552j)*x_ref[2]**o + ((0.732091091382+0.979740026034j))*x_ref[2]
            arg[(3, 1, 1, 0)]+=(0.60161912016+0.660393425382j)*x[2]**o + ((0.0109371754263+0.776951842591j))*x[2]
            ref[(3, 1, 1, 0)]+=(0.60161912016+0.660393425382j)*x_ref[2]**o + ((0.0109371754263+0.776951842591j))*x_ref[2]
            arg[(3, 1, 1, 1)]+=(-0.399175867045+0.668960369249j)*x[2]**o + ((-0.0989447169322+0.768201864033j))*x[2]
            ref[(3, 1, 1, 1)]+=(-0.399175867045+0.668960369249j)*x_ref[2]**o + ((-0.0989447169322+0.768201864033j))*x_ref[2]
            arg[(3, 2, 0, 0)]+=(0.30964504395+0.386457967485j)*x[2]**o + ((-0.639077931386-0.661024759625j))*x[2]
            ref[(3, 2, 0, 0)]+=(0.30964504395+0.386457967485j)*x_ref[2]**o + ((-0.639077931386-0.661024759625j))*x_ref[2]
            arg[(3, 2, 0, 1)]+=(-0.409965315455+0.695446390872j)*x[2]**o + ((0.216259065216-0.599676987532j))*x[2]
            ref[(3, 2, 0, 1)]+=(-0.409965315455+0.695446390872j)*x_ref[2]**o + ((0.216259065216-0.599676987532j))*x_ref[2]
            arg[(3, 2, 1, 0)]+=(-0.461996085729-0.36601643407j)*x[2]**o + ((0.182784990134+0.885181490555j))*x[2]
            ref[(3, 2, 1, 0)]+=(-0.461996085729-0.36601643407j)*x_ref[2]**o + ((0.182784990134+0.885181490555j))*x_ref[2]
            arg[(3, 2, 1, 1)]+=(0.978262639677+0.745260209133j)*x[2]**o + ((-0.920472240609+0.197359108654j))*x[2]
            ref[(3, 2, 1, 1)]+=(0.978262639677+0.745260209133j)*x_ref[2]**o + ((-0.920472240609+0.197359108654j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.926911776254-0.628389856954j)*x[0] + ((0.559725495102+0.723096475259j))*x[1]
        ref=(-0.926911776254-0.628389856954j)*x_ref[0] + ((0.559725495102+0.723096475259j))*x_ref[1]
        if dim==3:
            arg+=((0.125089761729-0.714377669775j))*x[2]
            ref+=((0.125089761729-0.714377669775j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=(-0.785271699612+0.273753446694j)*x[0] + ((0.870577130035+0.66452151927j))*x[1]
        ref[(0,)]=(-0.785271699612+0.273753446694j)*x_ref[0] + ((0.870577130035+0.66452151927j))*x_ref[1]
        arg[(1,)]=(0.306079061731-0.530202981224j)*x[0] + ((0.345782612924-0.296622898984j))*x[1]
        ref[(1,)]=(0.306079061731-0.530202981224j)*x_ref[0] + ((0.345782612924-0.296622898984j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.867654640863-0.639222407411j)*x[2]
            ref[(0,)]+=(-0.867654640863-0.639222407411j)*x_ref[2]
            arg[(1,)]+=(0.652530517898-0.664963538342j)*x[2]
            ref[(1,)]+=(0.652530517898-0.664963538342j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2),w)
        ref = Data(0,(3, 2),w_ref)
        arg[(0, 0)]=(0.0311923581264+0.418485876477j)*x[0] + ((0.495557239829+0.480239405015j))*x[1]
        ref[(0, 0)]=(0.0311923581264+0.418485876477j)*x_ref[0] + ((0.495557239829+0.480239405015j))*x_ref[1]
        arg[(0, 1)]=(-0.610344002375+0.115468841226j)*x[0] + ((-0.694051076493-0.755820755338j))*x[1]
        ref[(0, 1)]=(-0.610344002375+0.115468841226j)*x_ref[0] + ((-0.694051076493-0.755820755338j))*x_ref[1]
        arg[(1, 0)]=(0.811216380855-0.403902889202j)*x[0] + ((-0.902349087727-0.950648420133j))*x[1]
        ref[(1, 0)]=(0.811216380855-0.403902889202j)*x_ref[0] + ((-0.902349087727-0.950648420133j))*x_ref[1]
        arg[(1, 1)]=(-0.680854755044+0.46036606591j)*x[0] + ((-0.132789220151-0.666916367289j))*x[1]
        ref[(1, 1)]=(-0.680854755044+0.46036606591j)*x_ref[0] + ((-0.132789220151-0.666916367289j))*x_ref[1]
        arg[(2, 0)]=(0.673210948322+0.4815072852j)*x[0] + ((-0.350740553759+0.201473923745j))*x[1]
        ref[(2, 0)]=(0.673210948322+0.4815072852j)*x_ref[0] + ((-0.350740553759+0.201473923745j))*x_ref[1]
        arg[(2, 1)]=(-0.681769483543-0.533354623984j)*x[0] + ((0.0436570081035-0.550691917623j))*x[1]
        ref[(2, 1)]=(-0.681769483543-0.533354623984j)*x_ref[0] + ((0.0436570081035-0.550691917623j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.211574341284+0.887705931183j)*x[2]
            ref[(0, 0)]+=(0.211574341284+0.887705931183j)*x_ref[2]
            arg[(0, 1)]+=(-0.187863706701+0.839613420044j)*x[2]
            ref[(0, 1)]+=(-0.187863706701+0.839613420044j)*x_ref[2]
            arg[(1, 0)]+=(-0.416216286712-0.735903602771j)*x[2]
            ref[(1, 0)]+=(-0.416216286712-0.735903602771j)*x_ref[2]
            arg[(1, 1)]+=(-0.770216795777+0.556478083345j)*x[2]
            ref[(1, 1)]+=(-0.770216795777+0.556478083345j)*x_ref[2]
            arg[(2, 0)]+=(0.000896708447675+0.143547778551j)*x[2]
            ref[(2, 0)]+=(0.000896708447675+0.143547778551j)*x_ref[2]
            arg[(2, 1)]+=(-0.347816875373+0.0764246542504j)*x[2]
            ref[(2, 1)]+=(-0.347816875373+0.0764246542504j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 2),w)
        ref = Data(0,(2, 2, 2),w_ref)
        arg[(0, 0, 0)]=(0.174521612535-0.800233837361j)*x[0] + ((0.950284925551-0.996466345739j))*x[1]
        ref[(0, 0, 0)]=(0.174521612535-0.800233837361j)*x_ref[0] + ((0.950284925551-0.996466345739j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.958267774786+0.583134280071j)*x[0] + ((-0.276376747725+0.224535867804j))*x[1]
        ref[(0, 0, 1)]=(-0.958267774786+0.583134280071j)*x_ref[0] + ((-0.276376747725+0.224535867804j))*x_ref[1]
        arg[(0, 1, 0)]=(0.478538079671-0.741352245578j)*x[0] + ((0.408690688264+0.488821148375j))*x[1]
        ref[(0, 1, 0)]=(0.478538079671-0.741352245578j)*x_ref[0] + ((0.408690688264+0.488821148375j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.569037963533-0.633018106918j)*x[0] + ((-0.314806311855-0.719788850146j))*x[1]
        ref[(0, 1, 1)]=(-0.569037963533-0.633018106918j)*x_ref[0] + ((-0.314806311855-0.719788850146j))*x_ref[1]
        arg[(1, 0, 0)]=(0.0601144046154-0.351076339844j)*x[0] + ((0.312878389466+0.0597081549233j))*x[1]
        ref[(1, 0, 0)]=(0.0601144046154-0.351076339844j)*x_ref[0] + ((0.312878389466+0.0597081549233j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.898781662074-0.819232117075j)*x[0] + ((0.620777496276-0.42193185306j))*x[1]
        ref[(1, 0, 1)]=(-0.898781662074-0.819232117075j)*x_ref[0] + ((0.620777496276-0.42193185306j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.187288954342-0.413219950116j)*x[0] + ((-0.258405317588+0.740636436516j))*x[1]
        ref[(1, 1, 0)]=(-0.187288954342-0.413219950116j)*x_ref[0] + ((-0.258405317588+0.740636436516j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.389072008661+0.803793946221j)*x[0] + ((-0.00136458129803-0.221543809301j))*x[1]
        ref[(1, 1, 1)]=(-0.389072008661+0.803793946221j)*x_ref[0] + ((-0.00136458129803-0.221543809301j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.290402374051-0.109192907874j)*x[2]
            ref[(0, 0, 0)]+=(-0.290402374051-0.109192907874j)*x_ref[2]
            arg[(0, 0, 1)]+=(0.759213223652-0.0812070639056j)*x[2]
            ref[(0, 0, 1)]+=(0.759213223652-0.0812070639056j)*x_ref[2]
            arg[(0, 1, 0)]+=(-0.237181521622-0.296411217968j)*x[2]
            ref[(0, 1, 0)]+=(-0.237181521622-0.296411217968j)*x_ref[2]
            arg[(0, 1, 1)]+=(0.0700290476528+0.648961233477j)*x[2]
            ref[(0, 1, 1)]+=(0.0700290476528+0.648961233477j)*x_ref[2]
            arg[(1, 0, 0)]+=(0.278598718489+0.470988887328j)*x[2]
            ref[(1, 0, 0)]+=(0.278598718489+0.470988887328j)*x_ref[2]
            arg[(1, 0, 1)]+=(0.956720460849+0.578225472262j)*x[2]
            ref[(1, 0, 1)]+=(0.956720460849+0.578225472262j)*x_ref[2]
            arg[(1, 1, 0)]+=(0.85720462514+0.068976522008j)*x[2]
            ref[(1, 1, 0)]+=(0.85720462514+0.068976522008j)*x_ref[2]
            arg[(1, 1, 1)]+=(0.255798355779-0.103116309095j)*x[2]
            ref[(1, 1, 1)]+=(0.255798355779-0.103116309095j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 3, 3),w)
        ref = Data(0,(4, 2, 3, 3),w_ref)
        arg[(0, 0, 0, 0)]=(-0.802811128865-0.420867762795j)*x[0] + ((0.660953935976-0.55309006139j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.802811128865-0.420867762795j)*x_ref[0] + ((0.660953935976-0.55309006139j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.553485566872+0.618741912292j)*x[0] + ((-0.406108193411-0.231845677315j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.553485566872+0.618741912292j)*x_ref[0] + ((-0.406108193411-0.231845677315j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.286231123117-0.877349087301j)*x[0] + ((0.559727070839-0.106537388702j))*x[1]
        ref[(0, 0, 0, 2)]=(0.286231123117-0.877349087301j)*x_ref[0] + ((0.559727070839-0.106537388702j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.0871957144607-0.0696689979794j)*x[0] + ((-0.184458287953+0.0489099628362j))*x[1]
        ref[(0, 0, 1, 0)]=(0.0871957144607-0.0696689979794j)*x_ref[0] + ((-0.184458287953+0.0489099628362j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.604798189982+0.00334369935648j)*x[0] + ((0.169989326272-0.861321979129j))*x[1]
        ref[(0, 0, 1, 1)]=(0.604798189982+0.00334369935648j)*x_ref[0] + ((0.169989326272-0.861321979129j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(0.721416825289+0.334287138957j)*x[0] + ((-0.159136202731-0.028096350655j))*x[1]
        ref[(0, 0, 1, 2)]=(0.721416825289+0.334287138957j)*x_ref[0] + ((-0.159136202731-0.028096350655j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(0.17859811398-0.626683212658j)*x[0] + ((0.239674012492-0.860730106532j))*x[1]
        ref[(0, 0, 2, 0)]=(0.17859811398-0.626683212658j)*x_ref[0] + ((0.239674012492-0.860730106532j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(0.144428234929+0.518533329548j)*x[0] + ((-0.703121859286-0.960540272927j))*x[1]
        ref[(0, 0, 2, 1)]=(0.144428234929+0.518533329548j)*x_ref[0] + ((-0.703121859286-0.960540272927j))*x_ref[1]
        arg[(0, 0, 2, 2)]=(0.0609568024481+0.624857213223j)*x[0] + ((-0.00373662603149-0.43283915781j))*x[1]
        ref[(0, 0, 2, 2)]=(0.0609568024481+0.624857213223j)*x_ref[0] + ((-0.00373662603149-0.43283915781j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(-0.960359536787-0.849030631605j)*x[0] + ((0.706095556375-0.491145422996j))*x[1]
        ref[(0, 1, 0, 0)]=(-0.960359536787-0.849030631605j)*x_ref[0] + ((0.706095556375-0.491145422996j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.913394344923-0.249453361602j)*x[0] + ((-0.244678968229-0.698599727556j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.913394344923-0.249453361602j)*x_ref[0] + ((-0.244678968229-0.698599727556j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(0.737542049123-0.560015477358j)*x[0] + ((0.193499809171+0.787316568196j))*x[1]
        ref[(0, 1, 0, 2)]=(0.737542049123-0.560015477358j)*x_ref[0] + ((0.193499809171+0.787316568196j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.88151893219+0.744345850381j)*x[0] + ((-0.104913898379-0.848307489366j))*x[1]
        ref[(0, 1, 1, 0)]=(0.88151893219+0.744345850381j)*x_ref[0] + ((-0.104913898379-0.848307489366j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.430301015194-0.325043818492j)*x[0] + ((-0.944260232536+0.241724543006j))*x[1]
        ref[(0, 1, 1, 1)]=(0.430301015194-0.325043818492j)*x_ref[0] + ((-0.944260232536+0.241724543006j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(-0.543404134861-0.476027292174j)*x[0] + ((0.01337670834-0.15516069894j))*x[1]
        ref[(0, 1, 1, 2)]=(-0.543404134861-0.476027292174j)*x_ref[0] + ((0.01337670834-0.15516069894j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(0.889676026206-0.532378239442j)*x[0] + ((0.659407151777-0.766280269383j))*x[1]
        ref[(0, 1, 2, 0)]=(0.889676026206-0.532378239442j)*x_ref[0] + ((0.659407151777-0.766280269383j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(-0.338465269031-0.172717528455j)*x[0] + ((0.281322064748-0.847118060652j))*x[1]
        ref[(0, 1, 2, 1)]=(-0.338465269031-0.172717528455j)*x_ref[0] + ((0.281322064748-0.847118060652j))*x_ref[1]
        arg[(0, 1, 2, 2)]=(0.0380886290772-0.372583982759j)*x[0] + ((-0.94957528612-0.258884182559j))*x[1]
        ref[(0, 1, 2, 2)]=(0.0380886290772-0.372583982759j)*x_ref[0] + ((-0.94957528612-0.258884182559j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.674672314358-0.17676792239j)*x[0] + ((-0.601141114469+0.18367756712j))*x[1]
        ref[(1, 0, 0, 0)]=(0.674672314358-0.17676792239j)*x_ref[0] + ((-0.601141114469+0.18367756712j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(-0.825536309232+0.947684396898j)*x[0] + ((-0.993483640714+0.773641935084j))*x[1]
        ref[(1, 0, 0, 1)]=(-0.825536309232+0.947684396898j)*x_ref[0] + ((-0.993483640714+0.773641935084j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(-0.319027105643-0.945984964821j)*x[0] + ((-0.314228317964-0.85818569394j))*x[1]
        ref[(1, 0, 0, 2)]=(-0.319027105643-0.945984964821j)*x_ref[0] + ((-0.314228317964-0.85818569394j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.720489031758-0.311448572838j)*x[0] + ((-0.826628154256-0.813351592026j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.720489031758-0.311448572838j)*x_ref[0] + ((-0.826628154256-0.813351592026j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.0916718113368+0.25193540599j)*x[0] + ((0.215230574285-0.619320815285j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.0916718113368+0.25193540599j)*x_ref[0] + ((0.215230574285-0.619320815285j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(0.948423726524+0.161132365384j)*x[0] + ((0.837830771911-0.532418937463j))*x[1]
        ref[(1, 0, 1, 2)]=(0.948423726524+0.161132365384j)*x_ref[0] + ((0.837830771911-0.532418937463j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(0.646911970344-0.970063802687j)*x[0] + ((0.862499187251+0.885218082911j))*x[1]
        ref[(1, 0, 2, 0)]=(0.646911970344-0.970063802687j)*x_ref[0] + ((0.862499187251+0.885218082911j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(0.374140735289+0.252425279018j)*x[0] + ((-0.482784650273-0.396042803738j))*x[1]
        ref[(1, 0, 2, 1)]=(0.374140735289+0.252425279018j)*x_ref[0] + ((-0.482784650273-0.396042803738j))*x_ref[1]
        arg[(1, 0, 2, 2)]=(-0.0336085754799-0.88415180885j)*x[0] + ((-0.885400947586-0.0353158701939j))*x[1]
        ref[(1, 0, 2, 2)]=(-0.0336085754799-0.88415180885j)*x_ref[0] + ((-0.885400947586-0.0353158701939j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(-0.60787674949+0.339927964195j)*x[0] + ((0.496705783133-0.930548319158j))*x[1]
        ref[(1, 1, 0, 0)]=(-0.60787674949+0.339927964195j)*x_ref[0] + ((0.496705783133-0.930548319158j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.258862941148+0.264905012455j)*x[0] + ((-0.965262502941-0.842127142151j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.258862941148+0.264905012455j)*x_ref[0] + ((-0.965262502941-0.842127142151j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(-0.587480124639-0.449305722457j)*x[0] + ((0.579490591145-0.0845799234078j))*x[1]
        ref[(1, 1, 0, 2)]=(-0.587480124639-0.449305722457j)*x_ref[0] + ((0.579490591145-0.0845799234078j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.368806805206-0.410270500811j)*x[0] + ((-0.398365415385+0.60699105685j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.368806805206-0.410270500811j)*x_ref[0] + ((-0.398365415385+0.60699105685j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.0665078772128-0.805304193389j)*x[0] + ((0.880785623487+0.158429635551j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.0665078772128-0.805304193389j)*x_ref[0] + ((0.880785623487+0.158429635551j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(0.506261546546+0.838664228369j)*x[0] + ((0.693648360412+0.108221224886j))*x[1]
        ref[(1, 1, 1, 2)]=(0.506261546546+0.838664228369j)*x_ref[0] + ((0.693648360412+0.108221224886j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(0.827400505264-0.974946598691j)*x[0] + ((-0.156712471114-0.321468521431j))*x[1]
        ref[(1, 1, 2, 0)]=(0.827400505264-0.974946598691j)*x_ref[0] + ((-0.156712471114-0.321468521431j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(0.265100523625+0.892800213009j)*x[0] + ((-0.0537272275803+0.2879335536j))*x[1]
        ref[(1, 1, 2, 1)]=(0.265100523625+0.892800213009j)*x_ref[0] + ((-0.0537272275803+0.2879335536j))*x_ref[1]
        arg[(1, 1, 2, 2)]=(0.196218299306+0.0106236421407j)*x[0] + ((-0.305705942017+0.809475798968j))*x[1]
        ref[(1, 1, 2, 2)]=(0.196218299306+0.0106236421407j)*x_ref[0] + ((-0.305705942017+0.809475798968j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(0.549791270313-0.366651335582j)*x[0] + ((0.479524954167+0.839091711255j))*x[1]
        ref[(2, 0, 0, 0)]=(0.549791270313-0.366651335582j)*x_ref[0] + ((0.479524954167+0.839091711255j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(-0.208179683834-0.382382914547j)*x[0] + ((-0.643410506925-0.454259858748j))*x[1]
        ref[(2, 0, 0, 1)]=(-0.208179683834-0.382382914547j)*x_ref[0] + ((-0.643410506925-0.454259858748j))*x_ref[1]
        arg[(2, 0, 0, 2)]=(-0.270007602818+0.657952942539j)*x[0] + ((0.0226985600041+0.251815273424j))*x[1]
        ref[(2, 0, 0, 2)]=(-0.270007602818+0.657952942539j)*x_ref[0] + ((0.0226985600041+0.251815273424j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(0.925667288731-0.0151704910949j)*x[0] + ((-0.380871615302+0.562656963967j))*x[1]
        ref[(2, 0, 1, 0)]=(0.925667288731-0.0151704910949j)*x_ref[0] + ((-0.380871615302+0.562656963967j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(-0.489154302415-0.39969464785j)*x[0] + ((0.829722364894-0.77032941335j))*x[1]
        ref[(2, 0, 1, 1)]=(-0.489154302415-0.39969464785j)*x_ref[0] + ((0.829722364894-0.77032941335j))*x_ref[1]
        arg[(2, 0, 1, 2)]=(0.416537074454-0.694202286749j)*x[0] + ((0.18883464263-0.0810693899222j))*x[1]
        ref[(2, 0, 1, 2)]=(0.416537074454-0.694202286749j)*x_ref[0] + ((0.18883464263-0.0810693899222j))*x_ref[1]
        arg[(2, 0, 2, 0)]=(-0.644819355205+0.0272342060913j)*x[0] + ((0.233417192433-0.104755182967j))*x[1]
        ref[(2, 0, 2, 0)]=(-0.644819355205+0.0272342060913j)*x_ref[0] + ((0.233417192433-0.104755182967j))*x_ref[1]
        arg[(2, 0, 2, 1)]=(-0.761443948057+0.564434537398j)*x[0] + ((0.183886352601+0.15096971164j))*x[1]
        ref[(2, 0, 2, 1)]=(-0.761443948057+0.564434537398j)*x_ref[0] + ((0.183886352601+0.15096971164j))*x_ref[1]
        arg[(2, 0, 2, 2)]=(-0.864103897043+0.805124106915j)*x[0] + ((0.0520808410014+0.427506755047j))*x[1]
        ref[(2, 0, 2, 2)]=(-0.864103897043+0.805124106915j)*x_ref[0] + ((0.0520808410014+0.427506755047j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(0.720979138978+0.245314801702j)*x[0] + ((0.640070726275-0.267141468118j))*x[1]
        ref[(2, 1, 0, 0)]=(0.720979138978+0.245314801702j)*x_ref[0] + ((0.640070726275-0.267141468118j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(-0.187254219798-0.971081950696j)*x[0] + ((0.344668632345+0.67441554193j))*x[1]
        ref[(2, 1, 0, 1)]=(-0.187254219798-0.971081950696j)*x_ref[0] + ((0.344668632345+0.67441554193j))*x_ref[1]
        arg[(2, 1, 0, 2)]=(-0.574616144401+0.0967600515191j)*x[0] + ((-0.0596612323192+0.816197178404j))*x[1]
        ref[(2, 1, 0, 2)]=(-0.574616144401+0.0967600515191j)*x_ref[0] + ((-0.0596612323192+0.816197178404j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(0.336941640243-0.167217490409j)*x[0] + ((-0.780100146922+0.908376891075j))*x[1]
        ref[(2, 1, 1, 0)]=(0.336941640243-0.167217490409j)*x_ref[0] + ((-0.780100146922+0.908376891075j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(0.576302488863-0.0377929030776j)*x[0] + ((0.981213939673-0.0935935316561j))*x[1]
        ref[(2, 1, 1, 1)]=(0.576302488863-0.0377929030776j)*x_ref[0] + ((0.981213939673-0.0935935316561j))*x_ref[1]
        arg[(2, 1, 1, 2)]=(0.855540132839+0.411074518356j)*x[0] + ((-0.349246173683+0.275462274938j))*x[1]
        ref[(2, 1, 1, 2)]=(0.855540132839+0.411074518356j)*x_ref[0] + ((-0.349246173683+0.275462274938j))*x_ref[1]
        arg[(2, 1, 2, 0)]=(0.541862482595-0.643103730022j)*x[0] + ((0.784788258545-0.811052221465j))*x[1]
        ref[(2, 1, 2, 0)]=(0.541862482595-0.643103730022j)*x_ref[0] + ((0.784788258545-0.811052221465j))*x_ref[1]
        arg[(2, 1, 2, 1)]=(-0.0597032107603+0.735556382044j)*x[0] + ((-0.085056241978+0.289534119326j))*x[1]
        ref[(2, 1, 2, 1)]=(-0.0597032107603+0.735556382044j)*x_ref[0] + ((-0.085056241978+0.289534119326j))*x_ref[1]
        arg[(2, 1, 2, 2)]=(0.145801304242+0.876468443862j)*x[0] + ((0.339728140332-0.294504438317j))*x[1]
        ref[(2, 1, 2, 2)]=(0.145801304242+0.876468443862j)*x_ref[0] + ((0.339728140332-0.294504438317j))*x_ref[1]
        arg[(3, 0, 0, 0)]=(-0.514944126488+0.671282320891j)*x[0] + ((0.889954355359+0.561051528246j))*x[1]
        ref[(3, 0, 0, 0)]=(-0.514944126488+0.671282320891j)*x_ref[0] + ((0.889954355359+0.561051528246j))*x_ref[1]
        arg[(3, 0, 0, 1)]=(-0.545937580724-0.677130576888j)*x[0] + ((-0.124185361425+0.521004196709j))*x[1]
        ref[(3, 0, 0, 1)]=(-0.545937580724-0.677130576888j)*x_ref[0] + ((-0.124185361425+0.521004196709j))*x_ref[1]
        arg[(3, 0, 0, 2)]=(0.205303355837+0.967769366374j)*x[0] + ((0.0883684205326+0.441999936309j))*x[1]
        ref[(3, 0, 0, 2)]=(0.205303355837+0.967769366374j)*x_ref[0] + ((0.0883684205326+0.441999936309j))*x_ref[1]
        arg[(3, 0, 1, 0)]=(-0.165254319011-0.325107568056j)*x[0] + ((0.593530172835-0.633585846039j))*x[1]
        ref[(3, 0, 1, 0)]=(-0.165254319011-0.325107568056j)*x_ref[0] + ((0.593530172835-0.633585846039j))*x_ref[1]
        arg[(3, 0, 1, 1)]=(-0.244315318627+0.88878101021j)*x[0] + ((-0.316140942253+0.625096758033j))*x[1]
        ref[(3, 0, 1, 1)]=(-0.244315318627+0.88878101021j)*x_ref[0] + ((-0.316140942253+0.625096758033j))*x_ref[1]
        arg[(3, 0, 1, 2)]=(0.685364049731+0.523631823872j)*x[0] + ((-0.96640916806+0.828250707907j))*x[1]
        ref[(3, 0, 1, 2)]=(0.685364049731+0.523631823872j)*x_ref[0] + ((-0.96640916806+0.828250707907j))*x_ref[1]
        arg[(3, 0, 2, 0)]=(-0.264025118055-0.345745929687j)*x[0] + ((-0.930889457879-0.271718695268j))*x[1]
        ref[(3, 0, 2, 0)]=(-0.264025118055-0.345745929687j)*x_ref[0] + ((-0.930889457879-0.271718695268j))*x_ref[1]
        arg[(3, 0, 2, 1)]=(0.919551383153+0.361337570246j)*x[0] + ((-0.641547032157+0.349895413759j))*x[1]
        ref[(3, 0, 2, 1)]=(0.919551383153+0.361337570246j)*x_ref[0] + ((-0.641547032157+0.349895413759j))*x_ref[1]
        arg[(3, 0, 2, 2)]=(-0.355972615636-0.85762703231j)*x[0] + ((0.566991040021+0.46287020327j))*x[1]
        ref[(3, 0, 2, 2)]=(-0.355972615636-0.85762703231j)*x_ref[0] + ((0.566991040021+0.46287020327j))*x_ref[1]
        arg[(3, 1, 0, 0)]=(-0.403704210407+0.516502774395j)*x[0] + ((0.365732199852+0.596147036399j))*x[1]
        ref[(3, 1, 0, 0)]=(-0.403704210407+0.516502774395j)*x_ref[0] + ((0.365732199852+0.596147036399j))*x_ref[1]
        arg[(3, 1, 0, 1)]=(0.878453110901-0.382186229441j)*x[0] + ((0.29709434916-0.923077872888j))*x[1]
        ref[(3, 1, 0, 1)]=(0.878453110901-0.382186229441j)*x_ref[0] + ((0.29709434916-0.923077872888j))*x_ref[1]
        arg[(3, 1, 0, 2)]=(-0.183233411321-0.9621664784j)*x[0] + ((-0.333343883605+0.00670692667176j))*x[1]
        ref[(3, 1, 0, 2)]=(-0.183233411321-0.9621664784j)*x_ref[0] + ((-0.333343883605+0.00670692667176j))*x_ref[1]
        arg[(3, 1, 1, 0)]=(0.796733721338+0.397314001025j)*x[0] + ((0.598694258403+0.9551746503j))*x[1]
        ref[(3, 1, 1, 0)]=(0.796733721338+0.397314001025j)*x_ref[0] + ((0.598694258403+0.9551746503j))*x_ref[1]
        arg[(3, 1, 1, 1)]=(-0.744470037942+0.0120078235908j)*x[0] + ((0.942972370821-0.171497434721j))*x[1]
        ref[(3, 1, 1, 1)]=(-0.744470037942+0.0120078235908j)*x_ref[0] + ((0.942972370821-0.171497434721j))*x_ref[1]
        arg[(3, 1, 1, 2)]=(0.387032149882+0.933462059016j)*x[0] + ((-0.841947352372-0.941987236573j))*x[1]
        ref[(3, 1, 1, 2)]=(0.387032149882+0.933462059016j)*x_ref[0] + ((-0.841947352372-0.941987236573j))*x_ref[1]
        arg[(3, 1, 2, 0)]=(-0.733186389965+0.978390751084j)*x[0] + ((0.91446665852-0.62663032419j))*x[1]
        ref[(3, 1, 2, 0)]=(-0.733186389965+0.978390751084j)*x_ref[0] + ((0.91446665852-0.62663032419j))*x_ref[1]
        arg[(3, 1, 2, 1)]=(-0.150964327541+0.748497100876j)*x[0] + ((0.187407372515-0.248266172158j))*x[1]
        ref[(3, 1, 2, 1)]=(-0.150964327541+0.748497100876j)*x_ref[0] + ((0.187407372515-0.248266172158j))*x_ref[1]
        arg[(3, 1, 2, 2)]=(-0.666008504197+0.803543378972j)*x[0] + ((0.79831990518+0.245339651253j))*x[1]
        ref[(3, 1, 2, 2)]=(-0.666008504197+0.803543378972j)*x_ref[0] + ((0.79831990518+0.245339651253j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.39125332488-0.55411053511j)*x[2]
            ref[(0, 0, 0, 0)]+=(-0.39125332488-0.55411053511j)*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.872703348097-0.863763600322j)*x[2]
            ref[(0, 0, 0, 1)]+=(0.872703348097-0.863763600322j)*x_ref[2]
            arg[(0, 0, 0, 2)]+=(0.430545504571+0.229073590011j)*x[2]
            ref[(0, 0, 0, 2)]+=(0.430545504571+0.229073590011j)*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.334609347539+0.493327734435j)*x[2]
            ref[(0, 0, 1, 0)]+=(0.334609347539+0.493327734435j)*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.648655709723+0.867210998204j)*x[2]
            ref[(0, 0, 1, 1)]+=(-0.648655709723+0.867210998204j)*x_ref[2]
            arg[(0, 0, 1, 2)]+=(0.417402819254-0.817384855244j)*x[2]
            ref[(0, 0, 1, 2)]+=(0.417402819254-0.817384855244j)*x_ref[2]
            arg[(0, 0, 2, 0)]+=(-0.0743993559628+0.887891666792j)*x[2]
            ref[(0, 0, 2, 0)]+=(-0.0743993559628+0.887891666792j)*x_ref[2]
            arg[(0, 0, 2, 1)]+=(-0.405459515785+0.342522458719j)*x[2]
            ref[(0, 0, 2, 1)]+=(-0.405459515785+0.342522458719j)*x_ref[2]
            arg[(0, 0, 2, 2)]+=(0.324317028787+0.80868163635j)*x[2]
            ref[(0, 0, 2, 2)]+=(0.324317028787+0.80868163635j)*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.635168525616-0.13155302208j)*x[2]
            ref[(0, 1, 0, 0)]+=(-0.635168525616-0.13155302208j)*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.375253010716+0.407524920359j)*x[2]
            ref[(0, 1, 0, 1)]+=(0.375253010716+0.407524920359j)*x_ref[2]
            arg[(0, 1, 0, 2)]+=(-0.401735610781+0.48104816626j)*x[2]
            ref[(0, 1, 0, 2)]+=(-0.401735610781+0.48104816626j)*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.00359885374327-0.409165278164j)*x[2]
            ref[(0, 1, 1, 0)]+=(-0.00359885374327-0.409165278164j)*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.696557062672+0.166009474096j)*x[2]
            ref[(0, 1, 1, 1)]+=(0.696557062672+0.166009474096j)*x_ref[2]
            arg[(0, 1, 1, 2)]+=(-0.333984036234+0.632548762618j)*x[2]
            ref[(0, 1, 1, 2)]+=(-0.333984036234+0.632548762618j)*x_ref[2]
            arg[(0, 1, 2, 0)]+=(0.61402471158-0.735332858518j)*x[2]
            ref[(0, 1, 2, 0)]+=(0.61402471158-0.735332858518j)*x_ref[2]
            arg[(0, 1, 2, 1)]+=(0.694303724746+0.425784799357j)*x[2]
            ref[(0, 1, 2, 1)]+=(0.694303724746+0.425784799357j)*x_ref[2]
            arg[(0, 1, 2, 2)]+=(0.909274868806+0.398241682997j)*x[2]
            ref[(0, 1, 2, 2)]+=(0.909274868806+0.398241682997j)*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.535057727408-0.100086368352j)*x[2]
            ref[(1, 0, 0, 0)]+=(0.535057727408-0.100086368352j)*x_ref[2]
            arg[(1, 0, 0, 1)]+=(-0.195437116899-0.321859193228j)*x[2]
            ref[(1, 0, 0, 1)]+=(-0.195437116899-0.321859193228j)*x_ref[2]
            arg[(1, 0, 0, 2)]+=(-0.744985613593-0.0789246544926j)*x[2]
            ref[(1, 0, 0, 2)]+=(-0.744985613593-0.0789246544926j)*x_ref[2]
            arg[(1, 0, 1, 0)]+=(-0.660777372039+0.33574889129j)*x[2]
            ref[(1, 0, 1, 0)]+=(-0.660777372039+0.33574889129j)*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.696516412916-0.82944825265j)*x[2]
            ref[(1, 0, 1, 1)]+=(0.696516412916-0.82944825265j)*x_ref[2]
            arg[(1, 0, 1, 2)]+=(0.611814127153+0.338227002838j)*x[2]
            ref[(1, 0, 1, 2)]+=(0.611814127153+0.338227002838j)*x_ref[2]
            arg[(1, 0, 2, 0)]+=(0.209494840098-0.832047062387j)*x[2]
            ref[(1, 0, 2, 0)]+=(0.209494840098-0.832047062387j)*x_ref[2]
            arg[(1, 0, 2, 1)]+=(0.214716375852-0.21099863451j)*x[2]
            ref[(1, 0, 2, 1)]+=(0.214716375852-0.21099863451j)*x_ref[2]
            arg[(1, 0, 2, 2)]+=(0.0955760406454-0.51267603993j)*x[2]
            ref[(1, 0, 2, 2)]+=(0.0955760406454-0.51267603993j)*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.396569422419-0.695163595052j)*x[2]
            ref[(1, 1, 0, 0)]+=(0.396569422419-0.695163595052j)*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.992876570756-0.884929239239j)*x[2]
            ref[(1, 1, 0, 1)]+=(-0.992876570756-0.884929239239j)*x_ref[2]
            arg[(1, 1, 0, 2)]+=(-0.162661084303+0.839575493602j)*x[2]
            ref[(1, 1, 0, 2)]+=(-0.162661084303+0.839575493602j)*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.362271252591+0.901981213936j)*x[2]
            ref[(1, 1, 1, 0)]+=(0.362271252591+0.901981213936j)*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.530101975944+0.657431699661j)*x[2]
            ref[(1, 1, 1, 1)]+=(0.530101975944+0.657431699661j)*x_ref[2]
            arg[(1, 1, 1, 2)]+=(0.739601026162+0.0629839903217j)*x[2]
            ref[(1, 1, 1, 2)]+=(0.739601026162+0.0629839903217j)*x_ref[2]
            arg[(1, 1, 2, 0)]+=(0.0425257531364+0.874896268072j)*x[2]
            ref[(1, 1, 2, 0)]+=(0.0425257531364+0.874896268072j)*x_ref[2]
            arg[(1, 1, 2, 1)]+=(-0.908720351791+0.23731841614j)*x[2]
            ref[(1, 1, 2, 1)]+=(-0.908720351791+0.23731841614j)*x_ref[2]
            arg[(1, 1, 2, 2)]+=(0.801447922868+0.0976369890391j)*x[2]
            ref[(1, 1, 2, 2)]+=(0.801447922868+0.0976369890391j)*x_ref[2]
            arg[(2, 0, 0, 0)]+=(0.648095323666+0.63259991062j)*x[2]
            ref[(2, 0, 0, 0)]+=(0.648095323666+0.63259991062j)*x_ref[2]
            arg[(2, 0, 0, 1)]+=(-0.52975924985-0.646276396963j)*x[2]
            ref[(2, 0, 0, 1)]+=(-0.52975924985-0.646276396963j)*x_ref[2]
            arg[(2, 0, 0, 2)]+=(-0.0581897811226-0.993693801456j)*x[2]
            ref[(2, 0, 0, 2)]+=(-0.0581897811226-0.993693801456j)*x_ref[2]
            arg[(2, 0, 1, 0)]+=(-0.622555033212+0.0869960583362j)*x[2]
            ref[(2, 0, 1, 0)]+=(-0.622555033212+0.0869960583362j)*x_ref[2]
            arg[(2, 0, 1, 1)]+=(0.767390330443-0.493366880467j)*x[2]
            ref[(2, 0, 1, 1)]+=(0.767390330443-0.493366880467j)*x_ref[2]
            arg[(2, 0, 1, 2)]+=(-0.451753826623+0.0601754758236j)*x[2]
            ref[(2, 0, 1, 2)]+=(-0.451753826623+0.0601754758236j)*x_ref[2]
            arg[(2, 0, 2, 0)]+=(-0.0780600285129+0.204328171644j)*x[2]
            ref[(2, 0, 2, 0)]+=(-0.0780600285129+0.204328171644j)*x_ref[2]
            arg[(2, 0, 2, 1)]+=(0.271357347631+0.687685031498j)*x[2]
            ref[(2, 0, 2, 1)]+=(0.271357347631+0.687685031498j)*x_ref[2]
            arg[(2, 0, 2, 2)]+=(-0.601034159022+0.835679753073j)*x[2]
            ref[(2, 0, 2, 2)]+=(-0.601034159022+0.835679753073j)*x_ref[2]
            arg[(2, 1, 0, 0)]+=(0.716920603981-0.313594121274j)*x[2]
            ref[(2, 1, 0, 0)]+=(0.716920603981-0.313594121274j)*x_ref[2]
            arg[(2, 1, 0, 1)]+=(-0.286047465502+0.772446964639j)*x[2]
            ref[(2, 1, 0, 1)]+=(-0.286047465502+0.772446964639j)*x_ref[2]
            arg[(2, 1, 0, 2)]+=(-0.153686405274+0.317129824023j)*x[2]
            ref[(2, 1, 0, 2)]+=(-0.153686405274+0.317129824023j)*x_ref[2]
            arg[(2, 1, 1, 0)]+=(-0.45961011427+0.183217229987j)*x[2]
            ref[(2, 1, 1, 0)]+=(-0.45961011427+0.183217229987j)*x_ref[2]
            arg[(2, 1, 1, 1)]+=(-0.724881672209+0.33233838318j)*x[2]
            ref[(2, 1, 1, 1)]+=(-0.724881672209+0.33233838318j)*x_ref[2]
            arg[(2, 1, 1, 2)]+=(0.643330094451-0.729236650512j)*x[2]
            ref[(2, 1, 1, 2)]+=(0.643330094451-0.729236650512j)*x_ref[2]
            arg[(2, 1, 2, 0)]+=(-0.595059028603+0.362914940792j)*x[2]
            ref[(2, 1, 2, 0)]+=(-0.595059028603+0.362914940792j)*x_ref[2]
            arg[(2, 1, 2, 1)]+=(0.941963192409-0.206459526976j)*x[2]
            ref[(2, 1, 2, 1)]+=(0.941963192409-0.206459526976j)*x_ref[2]
            arg[(2, 1, 2, 2)]+=(0.899566864944-0.819928631194j)*x[2]
            ref[(2, 1, 2, 2)]+=(0.899566864944-0.819928631194j)*x_ref[2]
            arg[(3, 0, 0, 0)]+=(-0.673702417628-0.874337502089j)*x[2]
            ref[(3, 0, 0, 0)]+=(-0.673702417628-0.874337502089j)*x_ref[2]
            arg[(3, 0, 0, 1)]+=(0.187356315682+0.0655007775305j)*x[2]
            ref[(3, 0, 0, 1)]+=(0.187356315682+0.0655007775305j)*x_ref[2]
            arg[(3, 0, 0, 2)]+=(-0.324836918891-0.875514960778j)*x[2]
            ref[(3, 0, 0, 2)]+=(-0.324836918891-0.875514960778j)*x_ref[2]
            arg[(3, 0, 1, 0)]+=(0.0653914486232+0.782275696005j)*x[2]
            ref[(3, 0, 1, 0)]+=(0.0653914486232+0.782275696005j)*x_ref[2]
            arg[(3, 0, 1, 1)]+=(0.627162967063+0.770196165825j)*x[2]
            ref[(3, 0, 1, 1)]+=(0.627162967063+0.770196165825j)*x_ref[2]
            arg[(3, 0, 1, 2)]+=(0.119200052307-0.249575402485j)*x[2]
            ref[(3, 0, 1, 2)]+=(0.119200052307-0.249575402485j)*x_ref[2]
            arg[(3, 0, 2, 0)]+=(0.355448779512-0.13090640004j)*x[2]
            ref[(3, 0, 2, 0)]+=(0.355448779512-0.13090640004j)*x_ref[2]
            arg[(3, 0, 2, 1)]+=(-0.00822700750923-0.742579165096j)*x[2]
            ref[(3, 0, 2, 1)]+=(-0.00822700750923-0.742579165096j)*x_ref[2]
            arg[(3, 0, 2, 2)]+=(0.717697616964+0.317754325783j)*x[2]
            ref[(3, 0, 2, 2)]+=(0.717697616964+0.317754325783j)*x_ref[2]
            arg[(3, 1, 0, 0)]+=(-0.226809588295-0.354902981371j)*x[2]
            ref[(3, 1, 0, 0)]+=(-0.226809588295-0.354902981371j)*x_ref[2]
            arg[(3, 1, 0, 1)]+=(0.375891613139+0.489110760392j)*x[2]
            ref[(3, 1, 0, 1)]+=(0.375891613139+0.489110760392j)*x_ref[2]
            arg[(3, 1, 0, 2)]+=(-0.764003692939-0.564303897996j)*x[2]
            ref[(3, 1, 0, 2)]+=(-0.764003692939-0.564303897996j)*x_ref[2]
            arg[(3, 1, 1, 0)]+=(-0.735343429976+0.390257203507j)*x[2]
            ref[(3, 1, 1, 0)]+=(-0.735343429976+0.390257203507j)*x_ref[2]
            arg[(3, 1, 1, 1)]+=(0.495812432428-0.250446588005j)*x[2]
            ref[(3, 1, 1, 1)]+=(0.495812432428-0.250446588005j)*x_ref[2]
            arg[(3, 1, 1, 2)]+=(0.297565528298-0.86583084313j)*x[2]
            ref[(3, 1, 1, 2)]+=(0.297565528298-0.86583084313j)*x_ref[2]
            arg[(3, 1, 2, 0)]+=(-0.595901779105-0.258669628759j)*x[2]
            ref[(3, 1, 2, 0)]+=(-0.595901779105-0.258669628759j)*x_ref[2]
            arg[(3, 1, 2, 1)]+=(0.730474106402+0.91925381975j)*x[2]
            ref[(3, 1, 2, 1)]+=(0.730474106402+0.91925381975j)*x_ref[2]
            arg[(3, 1, 2, 2)]+=(-0.755073260976-0.0846858081931j)*x[2]
            ref[(3, 1, 2, 2)]+=(-0.755073260976-0.0846858081931j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.0406609911973-0.168033909129j)*x[0] + ((0.28792669004-0.603224148966j))*x[1]
        ref=(0.0406609911973-0.168033909129j)*x_ref[0] + ((0.28792669004-0.603224148966j))*x_ref[1]
        if dim==3:
            arg+=((-0.584816523938-0.974667351102j))*x[2]
            ref+=((-0.584816523938-0.974667351102j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=(-0.913742926459+0.884922710354j)*x[0] + ((-0.427328475932+0.50881548187j))*x[1]
        ref[(0,)]=(-0.913742926459+0.884922710354j)*x_ref[0] + ((-0.427328475932+0.50881548187j))*x_ref[1]
        arg[(1,)]=(-0.21653466788+0.069915622011j)*x[0] + ((0.663387563549+0.723358641039j))*x[1]
        ref[(1,)]=(-0.21653466788+0.069915622011j)*x_ref[0] + ((0.663387563549+0.723358641039j))*x_ref[1]
        arg[(2,)]=(-0.0274520411917+0.250834941682j)*x[0] + ((-0.229477868008+0.866661472128j))*x[1]
        ref[(2,)]=(-0.0274520411917+0.250834941682j)*x_ref[0] + ((-0.229477868008+0.866661472128j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.8998719581+0.697545906481j)*x[2]
            ref[(0,)]+=(-0.8998719581+0.697545906481j)*x_ref[2]
            arg[(1,)]+=(-0.140648210013-0.565618065588j)*x[2]
            ref[(1,)]+=(-0.140648210013-0.565618065588j)*x_ref[2]
            arg[(2,)]+=(0.0444223848106-0.150718320212j)*x[2]
            ref[(2,)]+=(0.0444223848106-0.150718320212j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref = Data(0,(2, 3),w_ref)
        arg[(0, 0)]=(-0.709551966713+0.390066752847j)*x[0] + ((0.717238571856-0.151473873557j))*x[1]
        ref[(0, 0)]=(-0.709551966713+0.390066752847j)*x_ref[0] + ((0.717238571856-0.151473873557j))*x_ref[1]
        arg[(0, 1)]=(0.215115184247+0.931357620524j)*x[0] + ((0.732415022402+0.916347086831j))*x[1]
        ref[(0, 1)]=(0.215115184247+0.931357620524j)*x_ref[0] + ((0.732415022402+0.916347086831j))*x_ref[1]
        arg[(0, 2)]=(0.323236772853+0.374207781055j)*x[0] + ((0.891135886098+0.63073159444j))*x[1]
        ref[(0, 2)]=(0.323236772853+0.374207781055j)*x_ref[0] + ((0.891135886098+0.63073159444j))*x_ref[1]
        arg[(1, 0)]=(0.343927919422+0.0172607455561j)*x[0] + ((-0.60724422473+0.172215790324j))*x[1]
        ref[(1, 0)]=(0.343927919422+0.0172607455561j)*x_ref[0] + ((-0.60724422473+0.172215790324j))*x_ref[1]
        arg[(1, 1)]=(0.381078603131-0.852915256442j)*x[0] + ((-0.953743138654-0.80633126029j))*x[1]
        ref[(1, 1)]=(0.381078603131-0.852915256442j)*x_ref[0] + ((-0.953743138654-0.80633126029j))*x_ref[1]
        arg[(1, 2)]=(0.600581027335-0.228476557179j)*x[0] + ((0.727319491614+0.901679773324j))*x[1]
        ref[(1, 2)]=(0.600581027335-0.228476557179j)*x_ref[0] + ((0.727319491614+0.901679773324j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(-0.660180405395-0.581277501349j)*x[2]
            ref[(0, 0)]+=(-0.660180405395-0.581277501349j)*x_ref[2]
            arg[(0, 1)]+=(0.12908119151+0.0818813586945j)*x[2]
            ref[(0, 1)]+=(0.12908119151+0.0818813586945j)*x_ref[2]
            arg[(0, 2)]+=(0.613882163112-0.0329342624342j)*x[2]
            ref[(0, 2)]+=(0.613882163112-0.0329342624342j)*x_ref[2]
            arg[(1, 0)]+=(0.0523172067612-0.162174844546j)*x[2]
            ref[(1, 0)]+=(0.0523172067612-0.162174844546j)*x_ref[2]
            arg[(1, 1)]+=(-0.709282355921-0.0605222892963j)*x[2]
            ref[(1, 1)]+=(-0.709282355921-0.0605222892963j)*x_ref[2]
            arg[(1, 2)]+=(-0.191370170459+0.0273281072635j)*x[2]
            ref[(1, 2)]+=(-0.191370170459+0.0273281072635j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 3),w)
        ref = Data(0,(2, 2, 3),w_ref)
        arg[(0, 0, 0)]=(0.761717125023-0.949497016364j)*x[0] + ((0.818645962303+0.781100802343j))*x[1]
        ref[(0, 0, 0)]=(0.761717125023-0.949497016364j)*x_ref[0] + ((0.818645962303+0.781100802343j))*x_ref[1]
        arg[(0, 0, 1)]=(0.325428276485-0.113165213568j)*x[0] + ((-0.686483586419+0.357197196965j))*x[1]
        ref[(0, 0, 1)]=(0.325428276485-0.113165213568j)*x_ref[0] + ((-0.686483586419+0.357197196965j))*x_ref[1]
        arg[(0, 0, 2)]=(0.28822036533-0.323980287376j)*x[0] + ((0.75167131465-0.436217457706j))*x[1]
        ref[(0, 0, 2)]=(0.28822036533-0.323980287376j)*x_ref[0] + ((0.75167131465-0.436217457706j))*x_ref[1]
        arg[(0, 1, 0)]=(0.0926088946391-0.797789117838j)*x[0] + ((-0.691370372526-0.498821917376j))*x[1]
        ref[(0, 1, 0)]=(0.0926088946391-0.797789117838j)*x_ref[0] + ((-0.691370372526-0.498821917376j))*x_ref[1]
        arg[(0, 1, 1)]=(0.778092731141+0.0893948955817j)*x[0] + ((0.481998612216+0.396743236922j))*x[1]
        ref[(0, 1, 1)]=(0.778092731141+0.0893948955817j)*x_ref[0] + ((0.481998612216+0.396743236922j))*x_ref[1]
        arg[(0, 1, 2)]=(0.593156999652+0.443685608092j)*x[0] + ((0.467018422018-0.425700027401j))*x[1]
        ref[(0, 1, 2)]=(0.593156999652+0.443685608092j)*x_ref[0] + ((0.467018422018-0.425700027401j))*x_ref[1]
        arg[(1, 0, 0)]=(0.0113255422704+0.0685413443542j)*x[0] + ((0.992217798797+0.154223840043j))*x[1]
        ref[(1, 0, 0)]=(0.0113255422704+0.0685413443542j)*x_ref[0] + ((0.992217798797+0.154223840043j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.175890064951+0.175560063012j)*x[0] + ((0.786841531115+0.887029912407j))*x[1]
        ref[(1, 0, 1)]=(-0.175890064951+0.175560063012j)*x_ref[0] + ((0.786841531115+0.887029912407j))*x_ref[1]
        arg[(1, 0, 2)]=(-0.990194023733+0.964117359657j)*x[0] + ((-0.147200131724-0.547535196978j))*x[1]
        ref[(1, 0, 2)]=(-0.990194023733+0.964117359657j)*x_ref[0] + ((-0.147200131724-0.547535196978j))*x_ref[1]
        arg[(1, 1, 0)]=(0.849194478427+0.265634355385j)*x[0] + ((-0.310398422049+0.586450499141j))*x[1]
        ref[(1, 1, 0)]=(0.849194478427+0.265634355385j)*x_ref[0] + ((-0.310398422049+0.586450499141j))*x_ref[1]
        arg[(1, 1, 1)]=(-0.129753249836-0.886798084796j)*x[0] + ((-0.0801485310909+0.539917985796j))*x[1]
        ref[(1, 1, 1)]=(-0.129753249836-0.886798084796j)*x_ref[0] + ((-0.0801485310909+0.539917985796j))*x_ref[1]
        arg[(1, 1, 2)]=(0.872865043632-0.392595070193j)*x[0] + ((0.24407834141-0.51243737178j))*x[1]
        ref[(1, 1, 2)]=(0.872865043632-0.392595070193j)*x_ref[0] + ((0.24407834141-0.51243737178j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.0241204011376+0.969289854172j)*x[2]
            ref[(0, 0, 0)]+=(0.0241204011376+0.969289854172j)*x_ref[2]
            arg[(0, 0, 1)]+=(0.528547759035-0.320514719826j)*x[2]
            ref[(0, 0, 1)]+=(0.528547759035-0.320514719826j)*x_ref[2]
            arg[(0, 0, 2)]+=(0.377308164547+0.438543636373j)*x[2]
            ref[(0, 0, 2)]+=(0.377308164547+0.438543636373j)*x_ref[2]
            arg[(0, 1, 0)]+=(0.0297085078339+0.645918756639j)*x[2]
            ref[(0, 1, 0)]+=(0.0297085078339+0.645918756639j)*x_ref[2]
            arg[(0, 1, 1)]+=(-0.469028770657-0.504746313132j)*x[2]
            ref[(0, 1, 1)]+=(-0.469028770657-0.504746313132j)*x_ref[2]
            arg[(0, 1, 2)]+=(-0.650242320831-0.922270646249j)*x[2]
            ref[(0, 1, 2)]+=(-0.650242320831-0.922270646249j)*x_ref[2]
            arg[(1, 0, 0)]+=(0.868383965116-0.522575513438j)*x[2]
            ref[(1, 0, 0)]+=(0.868383965116-0.522575513438j)*x_ref[2]
            arg[(1, 0, 1)]+=(0.798536380186+0.723216688287j)*x[2]
            ref[(1, 0, 1)]+=(0.798536380186+0.723216688287j)*x_ref[2]
            arg[(1, 0, 2)]+=(0.982004819826+0.2539954586j)*x[2]
            ref[(1, 0, 2)]+=(0.982004819826+0.2539954586j)*x_ref[2]
            arg[(1, 1, 0)]+=(-0.58316361761+0.131370564629j)*x[2]
            ref[(1, 1, 0)]+=(-0.58316361761+0.131370564629j)*x_ref[2]
            arg[(1, 1, 1)]+=(-0.687560606204-0.785628713134j)*x[2]
            ref[(1, 1, 1)]+=(-0.687560606204-0.785628713134j)*x_ref[2]
            arg[(1, 1, 2)]+=(0.840329888741-0.599980500917j)*x[2]
            ref[(1, 1, 2)]+=(0.840329888741-0.599980500917j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 2, 3),w)
        ref = Data(0,(2, 3, 2, 3),w_ref)
        arg[(0, 0, 0, 0)]=(0.698058553877-0.979894581492j)*x[0] + ((0.208629594841+0.202373305456j))*x[1]
        ref[(0, 0, 0, 0)]=(0.698058553877-0.979894581492j)*x_ref[0] + ((0.208629594841+0.202373305456j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(0.227797042518-0.250100190278j)*x[0] + ((-0.486386747925+0.683959893742j))*x[1]
        ref[(0, 0, 0, 1)]=(0.227797042518-0.250100190278j)*x_ref[0] + ((-0.486386747925+0.683959893742j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.993599819092+0.141610301501j)*x[0] + ((-0.874974991399-0.199779459549j))*x[1]
        ref[(0, 0, 0, 2)]=(0.993599819092+0.141610301501j)*x_ref[0] + ((-0.874974991399-0.199779459549j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(-0.0662335762356-0.986130042259j)*x[0] + ((-0.424971124256+0.14672167612j))*x[1]
        ref[(0, 0, 1, 0)]=(-0.0662335762356-0.986130042259j)*x_ref[0] + ((-0.424971124256+0.14672167612j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.374323202561+0.804801711624j)*x[0] + ((-0.229232968124+0.865118652013j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.374323202561+0.804801711624j)*x_ref[0] + ((-0.229232968124+0.865118652013j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(0.588941761374-0.374932902049j)*x[0] + ((-0.724692076144+0.406179949385j))*x[1]
        ref[(0, 0, 1, 2)]=(0.588941761374-0.374932902049j)*x_ref[0] + ((-0.724692076144+0.406179949385j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.383416363612+0.358086434646j)*x[0] + ((0.327142778962-0.0561141850301j))*x[1]
        ref[(0, 1, 0, 0)]=(0.383416363612+0.358086434646j)*x_ref[0] + ((0.327142778962-0.0561141850301j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.979585012693+0.496950621244j)*x[0] + ((-0.0431555568257+0.54936677235j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.979585012693+0.496950621244j)*x_ref[0] + ((-0.0431555568257+0.54936677235j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(0.175858200567-0.841550165748j)*x[0] + ((-0.416172033521+0.581621895248j))*x[1]
        ref[(0, 1, 0, 2)]=(0.175858200567-0.841550165748j)*x_ref[0] + ((-0.416172033521+0.581621895248j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.753761949423+0.104726575224j)*x[0] + ((0.37081478359-0.379896720474j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.753761949423+0.104726575224j)*x_ref[0] + ((0.37081478359-0.379896720474j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.751347783005+0.893454673497j)*x[0] + ((0.607634530979-0.0327949107224j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.751347783005+0.893454673497j)*x_ref[0] + ((0.607634530979-0.0327949107224j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(0.675338604189+0.109060602991j)*x[0] + ((-0.568400069327-0.748462648589j))*x[1]
        ref[(0, 1, 1, 2)]=(0.675338604189+0.109060602991j)*x_ref[0] + ((-0.568400069327-0.748462648589j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.473078068796+0.240600407748j)*x[0] + ((0.457578627254-0.875532483877j))*x[1]
        ref[(0, 2, 0, 0)]=(0.473078068796+0.240600407748j)*x_ref[0] + ((0.457578627254-0.875532483877j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(-0.727297337681+0.0256707723198j)*x[0] + ((-0.72307179741-0.195435288647j))*x[1]
        ref[(0, 2, 0, 1)]=(-0.727297337681+0.0256707723198j)*x_ref[0] + ((-0.72307179741-0.195435288647j))*x_ref[1]
        arg[(0, 2, 0, 2)]=(0.322871390345+0.464364442303j)*x[0] + ((0.379946982972+0.0553357194088j))*x[1]
        ref[(0, 2, 0, 2)]=(0.322871390345+0.464364442303j)*x_ref[0] + ((0.379946982972+0.0553357194088j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(-0.889372843376-0.950748077215j)*x[0] + ((-0.753927636564-0.65755296785j))*x[1]
        ref[(0, 2, 1, 0)]=(-0.889372843376-0.950748077215j)*x_ref[0] + ((-0.753927636564-0.65755296785j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(0.382048541798+0.306150047694j)*x[0] + ((0.358252954+0.21059467817j))*x[1]
        ref[(0, 2, 1, 1)]=(0.382048541798+0.306150047694j)*x_ref[0] + ((0.358252954+0.21059467817j))*x_ref[1]
        arg[(0, 2, 1, 2)]=(0.148899061035+0.682419762637j)*x[0] + ((0.614955934563-0.434408154567j))*x[1]
        ref[(0, 2, 1, 2)]=(0.148899061035+0.682419762637j)*x_ref[0] + ((0.614955934563-0.434408154567j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.485224866-0.730666760558j)*x[0] + ((-0.144021148962-0.96244260417j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.485224866-0.730666760558j)*x_ref[0] + ((-0.144021148962-0.96244260417j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.708928902392+0.28253153842j)*x[0] + ((0.231598966681+0.214588553808j))*x[1]
        ref[(1, 0, 0, 1)]=(0.708928902392+0.28253153842j)*x_ref[0] + ((0.231598966681+0.214588553808j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(-0.793290687151+0.0973081586469j)*x[0] + ((0.176212796228+0.418614767389j))*x[1]
        ref[(1, 0, 0, 2)]=(-0.793290687151+0.0973081586469j)*x_ref[0] + ((0.176212796228+0.418614767389j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.496397323974+0.695291375397j)*x[0] + ((0.868697722971+0.989863102525j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.496397323974+0.695291375397j)*x_ref[0] + ((0.868697722971+0.989863102525j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.197693863963+0.571736622406j)*x[0] + ((0.160615757577+0.091240988214j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.197693863963+0.571736622406j)*x_ref[0] + ((0.160615757577+0.091240988214j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(0.182801867885-0.62637528442j)*x[0] + ((0.488780144733+0.57436022497j))*x[1]
        ref[(1, 0, 1, 2)]=(0.182801867885-0.62637528442j)*x_ref[0] + ((0.488780144733+0.57436022497j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.460876000885-0.860441887389j)*x[0] + ((-0.3351337787+0.679904984266j))*x[1]
        ref[(1, 1, 0, 0)]=(0.460876000885-0.860441887389j)*x_ref[0] + ((-0.3351337787+0.679904984266j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.193944328203+0.522688408541j)*x[0] + ((-0.508839382508-0.409750433412j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.193944328203+0.522688408541j)*x_ref[0] + ((-0.508839382508-0.409750433412j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(0.300583631992-0.644196547648j)*x[0] + ((-0.338846023746-0.178620931172j))*x[1]
        ref[(1, 1, 0, 2)]=(0.300583631992-0.644196547648j)*x_ref[0] + ((-0.338846023746-0.178620931172j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.0337777738972+0.921858246695j)*x[0] + ((0.926760728504-0.993858363454j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.0337777738972+0.921858246695j)*x_ref[0] + ((0.926760728504-0.993858363454j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(-0.861965882621+0.762244520423j)*x[0] + ((-0.69182777385+0.0342223677937j))*x[1]
        ref[(1, 1, 1, 1)]=(-0.861965882621+0.762244520423j)*x_ref[0] + ((-0.69182777385+0.0342223677937j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(-0.758469581796-0.646734940623j)*x[0] + ((0.571971262134+0.0117336586174j))*x[1]
        ref[(1, 1, 1, 2)]=(-0.758469581796-0.646734940623j)*x_ref[0] + ((0.571971262134+0.0117336586174j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(0.679605701211-0.0626896144053j)*x[0] + ((0.556656527172-0.272627140271j))*x[1]
        ref[(1, 2, 0, 0)]=(0.679605701211-0.0626896144053j)*x_ref[0] + ((0.556656527172-0.272627140271j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(0.0782999156998-0.776469412508j)*x[0] + ((0.866301507667+0.852829336824j))*x[1]
        ref[(1, 2, 0, 1)]=(0.0782999156998-0.776469412508j)*x_ref[0] + ((0.866301507667+0.852829336824j))*x_ref[1]
        arg[(1, 2, 0, 2)]=(-0.607101190846+0.65798951325j)*x[0] + ((-0.333159816059-0.532426263306j))*x[1]
        ref[(1, 2, 0, 2)]=(-0.607101190846+0.65798951325j)*x_ref[0] + ((-0.333159816059-0.532426263306j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(-0.0516868462163-0.994532241895j)*x[0] + ((0.937384880642+0.687266709233j))*x[1]
        ref[(1, 2, 1, 0)]=(-0.0516868462163-0.994532241895j)*x_ref[0] + ((0.937384880642+0.687266709233j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.289508150111-0.115799376847j)*x[0] + ((-0.46344450358-0.116524601483j))*x[1]
        ref[(1, 2, 1, 1)]=(0.289508150111-0.115799376847j)*x_ref[0] + ((-0.46344450358-0.116524601483j))*x_ref[1]
        arg[(1, 2, 1, 2)]=(0.215418650266+0.313252258478j)*x[0] + ((0.416375862317+0.628411107287j))*x[1]
        ref[(1, 2, 1, 2)]=(0.215418650266+0.313252258478j)*x_ref[0] + ((0.416375862317+0.628411107287j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(0.126489703087-0.208570397897j)*x[2]
            ref[(0, 0, 0, 0)]+=(0.126489703087-0.208570397897j)*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.584185510791+0.768684616476j)*x[2]
            ref[(0, 0, 0, 1)]+=(0.584185510791+0.768684616476j)*x_ref[2]
            arg[(0, 0, 0, 2)]+=(0.723480286824+0.0900874535105j)*x[2]
            ref[(0, 0, 0, 2)]+=(0.723480286824+0.0900874535105j)*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.648837240266-0.748308092761j)*x[2]
            ref[(0, 0, 1, 0)]+=(-0.648837240266-0.748308092761j)*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.234691342592+0.0782296557317j)*x[2]
            ref[(0, 0, 1, 1)]+=(-0.234691342592+0.0782296557317j)*x_ref[2]
            arg[(0, 0, 1, 2)]+=(0.148303462239+0.241656432671j)*x[2]
            ref[(0, 0, 1, 2)]+=(0.148303462239+0.241656432671j)*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.467445884065+0.266794277323j)*x[2]
            ref[(0, 1, 0, 0)]+=(-0.467445884065+0.266794277323j)*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.982871421308-0.858262618791j)*x[2]
            ref[(0, 1, 0, 1)]+=(-0.982871421308-0.858262618791j)*x_ref[2]
            arg[(0, 1, 0, 2)]+=(-0.236964610011+0.900093778363j)*x[2]
            ref[(0, 1, 0, 2)]+=(-0.236964610011+0.900093778363j)*x_ref[2]
            arg[(0, 1, 1, 0)]+=(0.962830245312-0.11653128146j)*x[2]
            ref[(0, 1, 1, 0)]+=(0.962830245312-0.11653128146j)*x_ref[2]
            arg[(0, 1, 1, 1)]+=(-0.75665521795-0.625815176525j)*x[2]
            ref[(0, 1, 1, 1)]+=(-0.75665521795-0.625815176525j)*x_ref[2]
            arg[(0, 1, 1, 2)]+=(-0.400134971551+0.400877364939j)*x[2]
            ref[(0, 1, 1, 2)]+=(-0.400134971551+0.400877364939j)*x_ref[2]
            arg[(0, 2, 0, 0)]+=(0.221127576283-0.557572368028j)*x[2]
            ref[(0, 2, 0, 0)]+=(0.221127576283-0.557572368028j)*x_ref[2]
            arg[(0, 2, 0, 1)]+=(0.377056218626+0.918304493481j)*x[2]
            ref[(0, 2, 0, 1)]+=(0.377056218626+0.918304493481j)*x_ref[2]
            arg[(0, 2, 0, 2)]+=(0.701900539083+0.390245088426j)*x[2]
            ref[(0, 2, 0, 2)]+=(0.701900539083+0.390245088426j)*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.645786930633+0.127177270611j)*x[2]
            ref[(0, 2, 1, 0)]+=(-0.645786930633+0.127177270611j)*x_ref[2]
            arg[(0, 2, 1, 1)]+=(-0.188446970165-0.640125899015j)*x[2]
            ref[(0, 2, 1, 1)]+=(-0.188446970165-0.640125899015j)*x_ref[2]
            arg[(0, 2, 1, 2)]+=(0.857992153692-0.811413270446j)*x[2]
            ref[(0, 2, 1, 2)]+=(0.857992153692-0.811413270446j)*x_ref[2]
            arg[(1, 0, 0, 0)]+=(-0.900624541887-0.788948592206j)*x[2]
            ref[(1, 0, 0, 0)]+=(-0.900624541887-0.788948592206j)*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.420906909229-0.106965408798j)*x[2]
            ref[(1, 0, 0, 1)]+=(0.420906909229-0.106965408798j)*x_ref[2]
            arg[(1, 0, 0, 2)]+=(-0.392076482611-0.708792462539j)*x[2]
            ref[(1, 0, 0, 2)]+=(-0.392076482611-0.708792462539j)*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.700010128236+0.977249757229j)*x[2]
            ref[(1, 0, 1, 0)]+=(0.700010128236+0.977249757229j)*x_ref[2]
            arg[(1, 0, 1, 1)]+=(0.0706854157127-0.899153723858j)*x[2]
            ref[(1, 0, 1, 1)]+=(0.0706854157127-0.899153723858j)*x_ref[2]
            arg[(1, 0, 1, 2)]+=(0.69219543704-0.0521438695923j)*x[2]
            ref[(1, 0, 1, 2)]+=(0.69219543704-0.0521438695923j)*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.638462601326+0.35730599308j)*x[2]
            ref[(1, 1, 0, 0)]+=(0.638462601326+0.35730599308j)*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.831212037956-0.108189351755j)*x[2]
            ref[(1, 1, 0, 1)]+=(0.831212037956-0.108189351755j)*x_ref[2]
            arg[(1, 1, 0, 2)]+=(-0.636317723941-0.461881789278j)*x[2]
            ref[(1, 1, 0, 2)]+=(-0.636317723941-0.461881789278j)*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.354285744278+0.838399781894j)*x[2]
            ref[(1, 1, 1, 0)]+=(0.354285744278+0.838399781894j)*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.282852474676-0.213293113802j)*x[2]
            ref[(1, 1, 1, 1)]+=(-0.282852474676-0.213293113802j)*x_ref[2]
            arg[(1, 1, 1, 2)]+=(0.43869613027+0.225539466316j)*x[2]
            ref[(1, 1, 1, 2)]+=(0.43869613027+0.225539466316j)*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.799696037028+0.571031275433j)*x[2]
            ref[(1, 2, 0, 0)]+=(0.799696037028+0.571031275433j)*x_ref[2]
            arg[(1, 2, 0, 1)]+=(0.211017853811-0.660307840856j)*x[2]
            ref[(1, 2, 0, 1)]+=(0.211017853811-0.660307840856j)*x_ref[2]
            arg[(1, 2, 0, 2)]+=(-0.858672182794-0.493448274592j)*x[2]
            ref[(1, 2, 0, 2)]+=(-0.858672182794-0.493448274592j)*x_ref[2]
            arg[(1, 2, 1, 0)]+=(-0.840953400141+0.0125345931931j)*x[2]
            ref[(1, 2, 1, 0)]+=(-0.840953400141+0.0125345931931j)*x_ref[2]
            arg[(1, 2, 1, 1)]+=(-0.266485442471+0.971575548697j)*x[2]
            ref[(1, 2, 1, 1)]+=(-0.266485442471+0.971575548697j)*x_ref[2]
            arg[(1, 2, 1, 2)]+=(0.138319962147+0.477366127724j)*x[2]
            ref[(1, 2, 1, 2)]+=(0.138319962147+0.477366127724j)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(-0.578978649572-0.332193337327j)*x[0]**o + ((0.787504076375+0.807789806439j))*x[0] + ((0.301451586278-0.361936287052j))*x[1]**o + ((-0.550701374093+0.178072203705j))*x[1]
        ref=(-0.578978649572-0.332193337327j)*x_ref[0]**o + ((0.787504076375+0.807789806439j))*x_ref[0] + ((0.301451586278-0.361936287052j))*x_ref[1]**o + ((-0.550701374093+0.178072203705j))*x_ref[1]
        if dim==3:
            arg+=((0.42958653894-0.16101196816j))*x[2]**o + ((-0.708738684318-0.840586182094j))*x[2]
            ref+=((0.42958653894-0.16101196816j))*x_ref[2]**o + ((-0.708738684318-0.840586182094j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=(0.147253855172+0.939227126197j)*x[0]**o + ((0.532027693967+0.0836001594637j))*x[0] + ((-0.0674254293432+0.358306953719j))*x[1]**o + ((-0.693794814287+0.298410946014j))*x[1]
        ref[(0,)]=(0.147253855172+0.939227126197j)*x_ref[0]**o + ((0.532027693967+0.0836001594637j))*x_ref[0] + ((-0.0674254293432+0.358306953719j))*x_ref[1]**o + ((-0.693794814287+0.298410946014j))*x_ref[1]
        arg[(1,)]=(-0.074971289959-0.811940814185j)*x[0]**o + ((0.11839484585-0.220538307164j))*x[0] + ((0.333347626976-0.410923154342j))*x[1]**o + ((-0.582991192893-0.639264724903j))*x[1]
        ref[(1,)]=(-0.074971289959-0.811940814185j)*x_ref[0]**o + ((0.11839484585-0.220538307164j))*x_ref[0] + ((0.333347626976-0.410923154342j))*x_ref[1]**o + ((-0.582991192893-0.639264724903j))*x_ref[1]
        arg[(2,)]=(-0.986471786269-0.277415431253j)*x[0]**o + ((0.98856176419-0.0272805652537j))*x[0] + ((0.293386068425+0.949263875853j))*x[1]**o + ((-0.0847608919575-0.419113676561j))*x[1]
        ref[(2,)]=(-0.986471786269-0.277415431253j)*x_ref[0]**o + ((0.98856176419-0.0272805652537j))*x_ref[0] + ((0.293386068425+0.949263875853j))*x_ref[1]**o + ((-0.0847608919575-0.419113676561j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(0.99337059499-0.969498895411j)*x[2]**o + ((0.893967679603-0.36751823696j))*x[2]
            ref[(0,)]+=(0.99337059499-0.969498895411j)*x_ref[2]**o + ((0.893967679603-0.36751823696j))*x_ref[2]
            arg[(1,)]+=(-0.930828036259+0.715657668799j)*x[2]**o + ((-0.845508429362+0.306982129116j))*x[2]
            ref[(1,)]+=(-0.930828036259+0.715657668799j)*x_ref[2]**o + ((-0.845508429362+0.306982129116j))*x_ref[2]
            arg[(2,)]+=(0.819442307371-0.94022223744j)*x[2]**o + ((0.401371051591+0.447160196174j))*x[2]
            ref[(2,)]+=(0.819442307371-0.94022223744j)*x_ref[2]**o + ((0.401371051591+0.447160196174j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref = Data(0,(2, 2),w_ref)
        arg[(0, 0)]=(0.445449940996+0.723235056021j)*x[0]**o + ((0.967109024542+0.428780161702j))*x[0] + ((0.247639455683-0.928297387381j))*x[1]**o + ((-0.0961727100714+0.584359167005j))*x[1]
        ref[(0, 0)]=(0.445449940996+0.723235056021j)*x_ref[0]**o + ((0.967109024542+0.428780161702j))*x_ref[0] + ((0.247639455683-0.928297387381j))*x_ref[1]**o + ((-0.0961727100714+0.584359167005j))*x_ref[1]
        arg[(0, 1)]=(-0.958980817217+0.431601980066j)*x[0]**o + ((0.47195871067-0.528309366072j))*x[0] + ((0.982377038441-0.399407058215j))*x[1]**o + ((-0.299919066168+0.75757371075j))*x[1]
        ref[(0, 1)]=(-0.958980817217+0.431601980066j)*x_ref[0]**o + ((0.47195871067-0.528309366072j))*x_ref[0] + ((0.982377038441-0.399407058215j))*x_ref[1]**o + ((-0.299919066168+0.75757371075j))*x_ref[1]
        arg[(1, 0)]=(-0.450741331747+0.353274876425j)*x[0]**o + ((0.810930871768-0.737080596971j))*x[0] + ((-0.32236159425+0.583075771663j))*x[1]**o + ((-0.213907992305-0.966246134139j))*x[1]
        ref[(1, 0)]=(-0.450741331747+0.353274876425j)*x_ref[0]**o + ((0.810930871768-0.737080596971j))*x_ref[0] + ((-0.32236159425+0.583075771663j))*x_ref[1]**o + ((-0.213907992305-0.966246134139j))*x_ref[1]
        arg[(1, 1)]=(0.510588344365-0.744655815823j)*x[0]**o + ((-0.260069446526-0.506117682246j))*x[0] + ((0.897264854431-0.311448989448j))*x[1]**o + ((-0.387990968149+0.258827182488j))*x[1]
        ref[(1, 1)]=(0.510588344365-0.744655815823j)*x_ref[0]**o + ((-0.260069446526-0.506117682246j))*x_ref[0] + ((0.897264854431-0.311448989448j))*x_ref[1]**o + ((-0.387990968149+0.258827182488j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.0883727082477-0.465701981558j)*x[2]**o + ((-0.355607299439+0.956269496236j))*x[2]
            ref[(0, 0)]+=(0.0883727082477-0.465701981558j)*x_ref[2]**o + ((-0.355607299439+0.956269496236j))*x_ref[2]
            arg[(0, 1)]+=(-0.678901932591+0.831870817162j)*x[2]**o + ((0.23990662333-0.825774452122j))*x[2]
            ref[(0, 1)]+=(-0.678901932591+0.831870817162j)*x_ref[2]**o + ((0.23990662333-0.825774452122j))*x_ref[2]
            arg[(1, 0)]+=(-0.844968623306+0.986556247481j)*x[2]**o + ((0.800460516334-0.753890751432j))*x[2]
            ref[(1, 0)]+=(-0.844968623306+0.986556247481j)*x_ref[2]**o + ((0.800460516334-0.753890751432j))*x_ref[2]
            arg[(1, 1)]+=(0.876569977407-0.0317585441771j)*x[2]**o + ((0.158154699758+0.879114962846j))*x[2]
            ref[(1, 1)]+=(0.876569977407-0.0317585441771j)*x_ref[2]**o + ((0.158154699758+0.879114962846j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 4),w)
        ref = Data(0,(2, 2, 4),w_ref)
        arg[(0, 0, 0)]=(-0.294794181708-0.907208549553j)*x[0]**o + ((0.950249492253+0.308880350197j))*x[0] + ((0.48238493766-0.815288075307j))*x[1]**o + ((0.798121860465-0.41272707741j))*x[1]
        ref[(0, 0, 0)]=(-0.294794181708-0.907208549553j)*x_ref[0]**o + ((0.950249492253+0.308880350197j))*x_ref[0] + ((0.48238493766-0.815288075307j))*x_ref[1]**o + ((0.798121860465-0.41272707741j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.282021821719+0.661804141509j)*x[0]**o + ((0.724485131909-0.402882431337j))*x[0] + ((0.755489908064-0.295563160908j))*x[1]**o + ((-0.552911138532+0.548067124613j))*x[1]
        ref[(0, 0, 1)]=(-0.282021821719+0.661804141509j)*x_ref[0]**o + ((0.724485131909-0.402882431337j))*x_ref[0] + ((0.755489908064-0.295563160908j))*x_ref[1]**o + ((-0.552911138532+0.548067124613j))*x_ref[1]
        arg[(0, 0, 2)]=(0.0828647834126-0.791371314554j)*x[0]**o + ((0.791973154541-0.314079669067j))*x[0] + ((-0.262053159956+0.689882564618j))*x[1]**o + ((-0.419716662498-0.130243306931j))*x[1]
        ref[(0, 0, 2)]=(0.0828647834126-0.791371314554j)*x_ref[0]**o + ((0.791973154541-0.314079669067j))*x_ref[0] + ((-0.262053159956+0.689882564618j))*x_ref[1]**o + ((-0.419716662498-0.130243306931j))*x_ref[1]
        arg[(0, 0, 3)]=(0.209196622571+0.16394156549j)*x[0]**o + ((-0.856757604549+0.317810914833j))*x[0] + ((0.331966800604-0.455575442694j))*x[1]**o + ((-0.530099437704-0.937682658103j))*x[1]
        ref[(0, 0, 3)]=(0.209196622571+0.16394156549j)*x_ref[0]**o + ((-0.856757604549+0.317810914833j))*x_ref[0] + ((0.331966800604-0.455575442694j))*x_ref[1]**o + ((-0.530099437704-0.937682658103j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.463875044319-0.336864296378j)*x[0]**o + ((-0.997259999832-0.398081534151j))*x[0] + ((-0.766358948081-0.40815205491j))*x[1]**o + ((0.946304670002-0.261839596151j))*x[1]
        ref[(0, 1, 0)]=(-0.463875044319-0.336864296378j)*x_ref[0]**o + ((-0.997259999832-0.398081534151j))*x_ref[0] + ((-0.766358948081-0.40815205491j))*x_ref[1]**o + ((0.946304670002-0.261839596151j))*x_ref[1]
        arg[(0, 1, 1)]=(-0.795301286214+0.599674459915j)*x[0]**o + ((0.919974180543+0.693045286991j))*x[0] + ((0.287248805556+0.308676527741j))*x[1]**o + ((-0.577885239755-0.0990410377528j))*x[1]
        ref[(0, 1, 1)]=(-0.795301286214+0.599674459915j)*x_ref[0]**o + ((0.919974180543+0.693045286991j))*x_ref[0] + ((0.287248805556+0.308676527741j))*x_ref[1]**o + ((-0.577885239755-0.0990410377528j))*x_ref[1]
        arg[(0, 1, 2)]=(0.35763527157+0.152102313954j)*x[0]**o + ((0.130951533641-0.073812392063j))*x[0] + ((0.704565164807-0.36005742097j))*x[1]**o + ((0.501628932457+0.724396679721j))*x[1]
        ref[(0, 1, 2)]=(0.35763527157+0.152102313954j)*x_ref[0]**o + ((0.130951533641-0.073812392063j))*x_ref[0] + ((0.704565164807-0.36005742097j))*x_ref[1]**o + ((0.501628932457+0.724396679721j))*x_ref[1]
        arg[(0, 1, 3)]=(-0.341737163573-0.679316850068j)*x[0]**o + ((0.529527616838-0.982639537502j))*x[0] + ((0.704639169286+0.735071881715j))*x[1]**o + ((0.5591307123-0.189532790546j))*x[1]
        ref[(0, 1, 3)]=(-0.341737163573-0.679316850068j)*x_ref[0]**o + ((0.529527616838-0.982639537502j))*x_ref[0] + ((0.704639169286+0.735071881715j))*x_ref[1]**o + ((0.5591307123-0.189532790546j))*x_ref[1]
        arg[(1, 0, 0)]=(0.0929710087726-0.912689942782j)*x[0]**o + ((-0.53493653082-0.906218991285j))*x[0] + ((-0.305780624484+0.902579304494j))*x[1]**o + ((0.38327643027-0.0381677672381j))*x[1]
        ref[(1, 0, 0)]=(0.0929710087726-0.912689942782j)*x_ref[0]**o + ((-0.53493653082-0.906218991285j))*x_ref[0] + ((-0.305780624484+0.902579304494j))*x_ref[1]**o + ((0.38327643027-0.0381677672381j))*x_ref[1]
        arg[(1, 0, 1)]=(0.262703703007+0.720790821733j)*x[0]**o + ((0.737893071998+0.890262840214j))*x[0] + ((0.677018196823+0.860555867892j))*x[1]**o + ((0.823613193196+0.0166525613933j))*x[1]
        ref[(1, 0, 1)]=(0.262703703007+0.720790821733j)*x_ref[0]**o + ((0.737893071998+0.890262840214j))*x_ref[0] + ((0.677018196823+0.860555867892j))*x_ref[1]**o + ((0.823613193196+0.0166525613933j))*x_ref[1]
        arg[(1, 0, 2)]=(0.886836592222+0.698627251186j)*x[0]**o + ((-0.0381282588353-0.701966674739j))*x[0] + ((0.318408238051-0.850089896889j))*x[1]**o + ((0.315562004582+0.709963449404j))*x[1]
        ref[(1, 0, 2)]=(0.886836592222+0.698627251186j)*x_ref[0]**o + ((-0.0381282588353-0.701966674739j))*x_ref[0] + ((0.318408238051-0.850089896889j))*x_ref[1]**o + ((0.315562004582+0.709963449404j))*x_ref[1]
        arg[(1, 0, 3)]=(0.0433435830226+0.795022373813j)*x[0]**o + ((0.15660395017-0.531512560779j))*x[0] + ((0.626600139166+0.362664011494j))*x[1]**o + ((0.432239763496+0.730317028335j))*x[1]
        ref[(1, 0, 3)]=(0.0433435830226+0.795022373813j)*x_ref[0]**o + ((0.15660395017-0.531512560779j))*x_ref[0] + ((0.626600139166+0.362664011494j))*x_ref[1]**o + ((0.432239763496+0.730317028335j))*x_ref[1]
        arg[(1, 1, 0)]=(-0.792285964179+0.683155594881j)*x[0]**o + ((-0.82540713457+0.226214140223j))*x[0] + ((0.144790614441-0.0899409286302j))*x[1]**o + ((0.110694792838+0.127157982475j))*x[1]
        ref[(1, 1, 0)]=(-0.792285964179+0.683155594881j)*x_ref[0]**o + ((-0.82540713457+0.226214140223j))*x_ref[0] + ((0.144790614441-0.0899409286302j))*x_ref[1]**o + ((0.110694792838+0.127157982475j))*x_ref[1]
        arg[(1, 1, 1)]=(0.092625308035-0.0931091161647j)*x[0]**o + ((0.266524672529+0.785763754063j))*x[0] + ((0.161515388726+0.73127515382j))*x[1]**o + ((0.459368101845-0.680400822592j))*x[1]
        ref[(1, 1, 1)]=(0.092625308035-0.0931091161647j)*x_ref[0]**o + ((0.266524672529+0.785763754063j))*x_ref[0] + ((0.161515388726+0.73127515382j))*x_ref[1]**o + ((0.459368101845-0.680400822592j))*x_ref[1]
        arg[(1, 1, 2)]=(-0.2327858608+0.833072704669j)*x[0]**o + ((0.514796640839+0.982242501826j))*x[0] + ((0.195121654991-0.335125519474j))*x[1]**o + ((0.3145953918+0.0186982915167j))*x[1]
        ref[(1, 1, 2)]=(-0.2327858608+0.833072704669j)*x_ref[0]**o + ((0.514796640839+0.982242501826j))*x_ref[0] + ((0.195121654991-0.335125519474j))*x_ref[1]**o + ((0.3145953918+0.0186982915167j))*x_ref[1]
        arg[(1, 1, 3)]=(-0.801942168185-0.797600741313j)*x[0]**o + ((0.437616868277-0.802764154476j))*x[0] + ((-0.587266856663+0.118537629045j))*x[1]**o + ((-0.864871750436+0.352222482315j))*x[1]
        ref[(1, 1, 3)]=(-0.801942168185-0.797600741313j)*x_ref[0]**o + ((0.437616868277-0.802764154476j))*x_ref[0] + ((-0.587266856663+0.118537629045j))*x_ref[1]**o + ((-0.864871750436+0.352222482315j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(-0.819239593427-0.430515612178j)*x[2]**o + ((-0.893910754386+0.900784047605j))*x[2]
            ref[(0, 0, 0)]+=(-0.819239593427-0.430515612178j)*x_ref[2]**o + ((-0.893910754386+0.900784047605j))*x_ref[2]
            arg[(0, 0, 1)]+=(0.522154223166+0.360273835831j)*x[2]**o + ((-0.04022689552-0.875052798076j))*x[2]
            ref[(0, 0, 1)]+=(0.522154223166+0.360273835831j)*x_ref[2]**o + ((-0.04022689552-0.875052798076j))*x_ref[2]
            arg[(0, 0, 2)]+=(0.074757779118-0.299857006085j)*x[2]**o + ((0.617053096537-0.116850951777j))*x[2]
            ref[(0, 0, 2)]+=(0.074757779118-0.299857006085j)*x_ref[2]**o + ((0.617053096537-0.116850951777j))*x_ref[2]
            arg[(0, 0, 3)]+=(0.918684631256+0.279292843297j)*x[2]**o + ((0.598471240455-0.90394372292j))*x[2]
            ref[(0, 0, 3)]+=(0.918684631256+0.279292843297j)*x_ref[2]**o + ((0.598471240455-0.90394372292j))*x_ref[2]
            arg[(0, 1, 0)]+=(-0.948521167125+0.200298885584j)*x[2]**o + ((-0.634596328817+0.237057362142j))*x[2]
            ref[(0, 1, 0)]+=(-0.948521167125+0.200298885584j)*x_ref[2]**o + ((-0.634596328817+0.237057362142j))*x_ref[2]
            arg[(0, 1, 1)]+=(-0.636448849894-0.946621590888j)*x[2]**o + ((0.125955831613+0.139753849868j))*x[2]
            ref[(0, 1, 1)]+=(-0.636448849894-0.946621590888j)*x_ref[2]**o + ((0.125955831613+0.139753849868j))*x_ref[2]
            arg[(0, 1, 2)]+=(-0.802220249563+0.407938336621j)*x[2]**o + ((-0.263669285982+0.0636398120152j))*x[2]
            ref[(0, 1, 2)]+=(-0.802220249563+0.407938336621j)*x_ref[2]**o + ((-0.263669285982+0.0636398120152j))*x_ref[2]
            arg[(0, 1, 3)]+=(0.607332160046-0.72190453071j)*x[2]**o + ((-0.541124729926+0.453860219156j))*x[2]
            ref[(0, 1, 3)]+=(0.607332160046-0.72190453071j)*x_ref[2]**o + ((-0.541124729926+0.453860219156j))*x_ref[2]
            arg[(1, 0, 0)]+=(0.839801237619-0.593527761873j)*x[2]**o + ((-0.882794815601-0.760953258878j))*x[2]
            ref[(1, 0, 0)]+=(0.839801237619-0.593527761873j)*x_ref[2]**o + ((-0.882794815601-0.760953258878j))*x_ref[2]
            arg[(1, 0, 1)]+=(0.119227536934+0.540357693615j)*x[2]**o + ((-0.895809318063+0.0221961168896j))*x[2]
            ref[(1, 0, 1)]+=(0.119227536934+0.540357693615j)*x_ref[2]**o + ((-0.895809318063+0.0221961168896j))*x_ref[2]
            arg[(1, 0, 2)]+=(-0.344257509491+0.0837734603936j)*x[2]**o + ((-0.651505296703-0.683823692587j))*x[2]
            ref[(1, 0, 2)]+=(-0.344257509491+0.0837734603936j)*x_ref[2]**o + ((-0.651505296703-0.683823692587j))*x_ref[2]
            arg[(1, 0, 3)]+=(0.216545089959-0.408253095532j)*x[2]**o + ((0.839343005507+0.403447310172j))*x[2]
            ref[(1, 0, 3)]+=(0.216545089959-0.408253095532j)*x_ref[2]**o + ((0.839343005507+0.403447310172j))*x_ref[2]
            arg[(1, 1, 0)]+=(-0.14549420797+0.434773405922j)*x[2]**o + ((0.128732837448+0.650718777198j))*x[2]
            ref[(1, 1, 0)]+=(-0.14549420797+0.434773405922j)*x_ref[2]**o + ((0.128732837448+0.650718777198j))*x_ref[2]
            arg[(1, 1, 1)]+=(-0.669537391207+0.0471580120153j)*x[2]**o + ((0.694014544905-0.191651397595j))*x[2]
            ref[(1, 1, 1)]+=(-0.669537391207+0.0471580120153j)*x_ref[2]**o + ((0.694014544905-0.191651397595j))*x_ref[2]
            arg[(1, 1, 2)]+=(0.528367375483+0.821915741664j)*x[2]**o + ((0.272341658996-0.998427909709j))*x[2]
            ref[(1, 1, 2)]+=(0.528367375483+0.821915741664j)*x_ref[2]**o + ((0.272341658996-0.998427909709j))*x_ref[2]
            arg[(1, 1, 3)]+=(0.0338409004427-0.583546767945j)*x[2]**o + ((0.292069725119-0.683438953119j))*x[2]
            ref[(1, 1, 3)]+=(0.0338409004427-0.583546767945j)*x_ref[2]**o + ((0.292069725119-0.683438953119j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 4, 2),w)
        ref = Data(0,(2, 3, 4, 2),w_ref)
        arg[(0, 0, 0, 0)]=(-0.614692217188+0.013867440152j)*x[0]**o + ((-0.325733287214-0.773406439718j))*x[0] + ((0.739513733511-0.319696206676j))*x[1]**o + ((-0.701337121966+0.384542626738j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.614692217188+0.013867440152j)*x_ref[0]**o + ((-0.325733287214-0.773406439718j))*x_ref[0] + ((0.739513733511-0.319696206676j))*x_ref[1]**o + ((-0.701337121966+0.384542626738j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.034763104314+0.741006127859j)*x[0]**o + ((0.183019160219+0.528073856314j))*x[0] + ((-0.253951856518-0.690995054093j))*x[1]**o + ((0.803539555939-0.758031347651j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.034763104314+0.741006127859j)*x_ref[0]**o + ((0.183019160219+0.528073856314j))*x_ref[0] + ((-0.253951856518-0.690995054093j))*x_ref[1]**o + ((0.803539555939-0.758031347651j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.520677722923-0.821225899764j)*x[0]**o + ((0.764209257813-0.268866950937j))*x[0] + ((0.756063073189+0.906718460299j))*x[1]**o + ((-0.879097999869+0.116151255622j))*x[1]
        ref[(0, 0, 1, 0)]=(0.520677722923-0.821225899764j)*x_ref[0]**o + ((0.764209257813-0.268866950937j))*x_ref[0] + ((0.756063073189+0.906718460299j))*x_ref[1]**o + ((-0.879097999869+0.116151255622j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(-0.26467729466-0.518743974009j)*x[0]**o + ((-0.126488465064-0.131781543724j))*x[0] + ((0.945862412395+0.392102196633j))*x[1]**o + ((-0.529951925378-0.680072159264j))*x[1]
        ref[(0, 0, 1, 1)]=(-0.26467729466-0.518743974009j)*x_ref[0]**o + ((-0.126488465064-0.131781543724j))*x_ref[0] + ((0.945862412395+0.392102196633j))*x_ref[1]**o + ((-0.529951925378-0.680072159264j))*x_ref[1]
        arg[(0, 0, 2, 0)]=(-0.767695116934+0.578321912763j)*x[0]**o + ((-0.554853275442-0.213106078287j))*x[0] + ((0.930348693555-0.194840838511j))*x[1]**o + ((0.447971020616-0.886921325143j))*x[1]
        ref[(0, 0, 2, 0)]=(-0.767695116934+0.578321912763j)*x_ref[0]**o + ((-0.554853275442-0.213106078287j))*x_ref[0] + ((0.930348693555-0.194840838511j))*x_ref[1]**o + ((0.447971020616-0.886921325143j))*x_ref[1]
        arg[(0, 0, 2, 1)]=(0.12609852955+0.49158692063j)*x[0]**o + ((-0.920823439426-0.352764567978j))*x[0] + ((0.222292214816-0.944032654735j))*x[1]**o + ((-0.921835263949+0.423434350198j))*x[1]
        ref[(0, 0, 2, 1)]=(0.12609852955+0.49158692063j)*x_ref[0]**o + ((-0.920823439426-0.352764567978j))*x_ref[0] + ((0.222292214816-0.944032654735j))*x_ref[1]**o + ((-0.921835263949+0.423434350198j))*x_ref[1]
        arg[(0, 0, 3, 0)]=(-0.446701740426+0.908011875501j)*x[0]**o + ((-0.347530642603+0.559506690954j))*x[0] + ((-0.747209828996+0.99723276067j))*x[1]**o + ((-0.497928940428+0.44587427698j))*x[1]
        ref[(0, 0, 3, 0)]=(-0.446701740426+0.908011875501j)*x_ref[0]**o + ((-0.347530642603+0.559506690954j))*x_ref[0] + ((-0.747209828996+0.99723276067j))*x_ref[1]**o + ((-0.497928940428+0.44587427698j))*x_ref[1]
        arg[(0, 0, 3, 1)]=(-0.47338222635+0.285069351708j)*x[0]**o + ((0.577074462593-0.702990973773j))*x[0] + ((0.128776629737-0.432177850335j))*x[1]**o + ((0.970007474162+0.809559216442j))*x[1]
        ref[(0, 0, 3, 1)]=(-0.47338222635+0.285069351708j)*x_ref[0]**o + ((0.577074462593-0.702990973773j))*x_ref[0] + ((0.128776629737-0.432177850335j))*x_ref[1]**o + ((0.970007474162+0.809559216442j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.64309675846-0.180999612817j)*x[0]**o + ((-0.580015590637-0.179451515668j))*x[0] + ((-0.409170416592+0.805019866134j))*x[1]**o + ((-0.0229416610087-0.194497881186j))*x[1]
        ref[(0, 1, 0, 0)]=(0.64309675846-0.180999612817j)*x_ref[0]**o + ((-0.580015590637-0.179451515668j))*x_ref[0] + ((-0.409170416592+0.805019866134j))*x_ref[1]**o + ((-0.0229416610087-0.194497881186j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.0456956222104-0.798046470734j)*x[0]**o + ((-0.98503321211+0.293668169099j))*x[0] + ((-0.326297299597+0.904346493533j))*x[1]**o + ((-0.996018438501+0.740267142074j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.0456956222104-0.798046470734j)*x_ref[0]**o + ((-0.98503321211+0.293668169099j))*x_ref[0] + ((-0.326297299597+0.904346493533j))*x_ref[1]**o + ((-0.996018438501+0.740267142074j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(0.0108358685829+0.958445231872j)*x[0]**o + ((-0.145655515895+0.872618962465j))*x[0] + ((-0.00865982215769+0.64673208978j))*x[1]**o + ((-0.0473028100418+0.00461381818504j))*x[1]
        ref[(0, 1, 1, 0)]=(0.0108358685829+0.958445231872j)*x_ref[0]**o + ((-0.145655515895+0.872618962465j))*x_ref[0] + ((-0.00865982215769+0.64673208978j))*x_ref[1]**o + ((-0.0473028100418+0.00461381818504j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(0.954294556036+0.506134781968j)*x[0]**o + ((0.877820164059+0.0372279161348j))*x[0] + ((0.796166515022+0.700156644773j))*x[1]**o + ((0.058122007065+0.661576009562j))*x[1]
        ref[(0, 1, 1, 1)]=(0.954294556036+0.506134781968j)*x_ref[0]**o + ((0.877820164059+0.0372279161348j))*x_ref[0] + ((0.796166515022+0.700156644773j))*x_ref[1]**o + ((0.058122007065+0.661576009562j))*x_ref[1]
        arg[(0, 1, 2, 0)]=(0.294172562365-0.881342691081j)*x[0]**o + ((0.482724375351-0.475979930461j))*x[0] + ((0.817667477575-0.765466376571j))*x[1]**o + ((0.0562753546536-0.179506488675j))*x[1]
        ref[(0, 1, 2, 0)]=(0.294172562365-0.881342691081j)*x_ref[0]**o + ((0.482724375351-0.475979930461j))*x_ref[0] + ((0.817667477575-0.765466376571j))*x_ref[1]**o + ((0.0562753546536-0.179506488675j))*x_ref[1]
        arg[(0, 1, 2, 1)]=(0.0975295056371-0.941143773369j)*x[0]**o + ((0.584704322587+0.178023854993j))*x[0] + ((0.618307073015-6.56703493571e-05j))*x[1]**o + ((0.78602542183+0.781126073042j))*x[1]
        ref[(0, 1, 2, 1)]=(0.0975295056371-0.941143773369j)*x_ref[0]**o + ((0.584704322587+0.178023854993j))*x_ref[0] + ((0.618307073015-6.56703493571e-05j))*x_ref[1]**o + ((0.78602542183+0.781126073042j))*x_ref[1]
        arg[(0, 1, 3, 0)]=(-0.97623204179+0.663603276518j)*x[0]**o + ((0.948207251432-0.257475556296j))*x[0] + ((0.91138672901-0.224732544544j))*x[1]**o + ((0.630007629468-0.414243814385j))*x[1]
        ref[(0, 1, 3, 0)]=(-0.97623204179+0.663603276518j)*x_ref[0]**o + ((0.948207251432-0.257475556296j))*x_ref[0] + ((0.91138672901-0.224732544544j))*x_ref[1]**o + ((0.630007629468-0.414243814385j))*x_ref[1]
        arg[(0, 1, 3, 1)]=(0.498556290522-0.420802597477j)*x[0]**o + ((-0.0285365620037-0.605788246859j))*x[0] + ((0.760367608325+0.103902053505j))*x[1]**o + ((-0.165974803012-0.371742495347j))*x[1]
        ref[(0, 1, 3, 1)]=(0.498556290522-0.420802597477j)*x_ref[0]**o + ((-0.0285365620037-0.605788246859j))*x_ref[0] + ((0.760367608325+0.103902053505j))*x_ref[1]**o + ((-0.165974803012-0.371742495347j))*x_ref[1]
        arg[(0, 2, 0, 0)]=(0.920869706854-0.372274294197j)*x[0]**o + ((-0.800952825763+0.925630466427j))*x[0] + ((-0.48130568695+0.044506666147j))*x[1]**o + ((0.586176467835-0.407384490547j))*x[1]
        ref[(0, 2, 0, 0)]=(0.920869706854-0.372274294197j)*x_ref[0]**o + ((-0.800952825763+0.925630466427j))*x_ref[0] + ((-0.48130568695+0.044506666147j))*x_ref[1]**o + ((0.586176467835-0.407384490547j))*x_ref[1]
        arg[(0, 2, 0, 1)]=(-0.305679731588-0.77435420682j)*x[0]**o + ((0.60288572417-0.305065631579j))*x[0] + ((0.664209454102+0.136616424698j))*x[1]**o + ((0.22379772669-0.127296843928j))*x[1]
        ref[(0, 2, 0, 1)]=(-0.305679731588-0.77435420682j)*x_ref[0]**o + ((0.60288572417-0.305065631579j))*x_ref[0] + ((0.664209454102+0.136616424698j))*x_ref[1]**o + ((0.22379772669-0.127296843928j))*x_ref[1]
        arg[(0, 2, 1, 0)]=(0.255433491301+0.901295492671j)*x[0]**o + ((0.669599229364-0.176115143547j))*x[0] + ((0.228762848387-0.338648318202j))*x[1]**o + ((-0.254086146482+0.487874243965j))*x[1]
        ref[(0, 2, 1, 0)]=(0.255433491301+0.901295492671j)*x_ref[0]**o + ((0.669599229364-0.176115143547j))*x_ref[0] + ((0.228762848387-0.338648318202j))*x_ref[1]**o + ((-0.254086146482+0.487874243965j))*x_ref[1]
        arg[(0, 2, 1, 1)]=(-0.660720044464-0.712154344442j)*x[0]**o + ((-0.647405058219-0.27571199101j))*x[0] + ((-0.16618640683-0.436448727132j))*x[1]**o + ((0.104460556824+0.587528151759j))*x[1]
        ref[(0, 2, 1, 1)]=(-0.660720044464-0.712154344442j)*x_ref[0]**o + ((-0.647405058219-0.27571199101j))*x_ref[0] + ((-0.16618640683-0.436448727132j))*x_ref[1]**o + ((0.104460556824+0.587528151759j))*x_ref[1]
        arg[(0, 2, 2, 0)]=(0.639401475764-0.576613928j)*x[0]**o + ((0.587780787677+0.471924723476j))*x[0] + ((-0.611809870129-0.35689110068j))*x[1]**o + ((-0.107533372943+0.41918940984j))*x[1]
        ref[(0, 2, 2, 0)]=(0.639401475764-0.576613928j)*x_ref[0]**o + ((0.587780787677+0.471924723476j))*x_ref[0] + ((-0.611809870129-0.35689110068j))*x_ref[1]**o + ((-0.107533372943+0.41918940984j))*x_ref[1]
        arg[(0, 2, 2, 1)]=(-0.297059862635-0.931111723235j)*x[0]**o + ((-0.344871716528+0.82291550294j))*x[0] + ((-0.481875037302+0.604265574555j))*x[1]**o + ((-0.670136773014-0.71000907644j))*x[1]
        ref[(0, 2, 2, 1)]=(-0.297059862635-0.931111723235j)*x_ref[0]**o + ((-0.344871716528+0.82291550294j))*x_ref[0] + ((-0.481875037302+0.604265574555j))*x_ref[1]**o + ((-0.670136773014-0.71000907644j))*x_ref[1]
        arg[(0, 2, 3, 0)]=(0.624926818587+0.0690252812948j)*x[0]**o + ((0.565368876443+0.769267037949j))*x[0] + ((-0.706056854632-0.652146557299j))*x[1]**o + ((-0.226600509149-0.727243189353j))*x[1]
        ref[(0, 2, 3, 0)]=(0.624926818587+0.0690252812948j)*x_ref[0]**o + ((0.565368876443+0.769267037949j))*x_ref[0] + ((-0.706056854632-0.652146557299j))*x_ref[1]**o + ((-0.226600509149-0.727243189353j))*x_ref[1]
        arg[(0, 2, 3, 1)]=(0.680945876645-0.587268931523j)*x[0]**o + ((-0.409993795834-0.660259290863j))*x[0] + ((-0.698977922096-0.169434915585j))*x[1]**o + ((0.872156086207-0.423182332915j))*x[1]
        ref[(0, 2, 3, 1)]=(0.680945876645-0.587268931523j)*x_ref[0]**o + ((-0.409993795834-0.660259290863j))*x_ref[0] + ((-0.698977922096-0.169434915585j))*x_ref[1]**o + ((0.872156086207-0.423182332915j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(0.709808858412-0.705987290843j)*x[0]**o + ((0.0273710165934-0.152554618817j))*x[0] + ((-0.559139465105-0.0640990994563j))*x[1]**o + ((-0.708336830317-0.795693748497j))*x[1]
        ref[(1, 0, 0, 0)]=(0.709808858412-0.705987290843j)*x_ref[0]**o + ((0.0273710165934-0.152554618817j))*x_ref[0] + ((-0.559139465105-0.0640990994563j))*x_ref[1]**o + ((-0.708336830317-0.795693748497j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(0.449983997095+0.175959708017j)*x[0]**o + ((-0.825350355254+0.248894252384j))*x[0] + ((0.923897790892-0.834721805712j))*x[1]**o + ((-0.092569220935+0.539670160217j))*x[1]
        ref[(1, 0, 0, 1)]=(0.449983997095+0.175959708017j)*x_ref[0]**o + ((-0.825350355254+0.248894252384j))*x_ref[0] + ((0.923897790892-0.834721805712j))*x_ref[1]**o + ((-0.092569220935+0.539670160217j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(0.462188090955-0.353401793916j)*x[0]**o + ((-0.376754786609+0.405224054616j))*x[0] + ((0.796206162121-0.661751369455j))*x[1]**o + ((0.425280740276-0.940607409475j))*x[1]
        ref[(1, 0, 1, 0)]=(0.462188090955-0.353401793916j)*x_ref[0]**o + ((-0.376754786609+0.405224054616j))*x_ref[0] + ((0.796206162121-0.661751369455j))*x_ref[1]**o + ((0.425280740276-0.940607409475j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(0.192581826059-0.734357284579j)*x[0]**o + ((-0.310330879999-0.263013483329j))*x[0] + ((0.848069337113+0.865685708972j))*x[1]**o + ((-0.565602808869-0.440952806415j))*x[1]
        ref[(1, 0, 1, 1)]=(0.192581826059-0.734357284579j)*x_ref[0]**o + ((-0.310330879999-0.263013483329j))*x_ref[0] + ((0.848069337113+0.865685708972j))*x_ref[1]**o + ((-0.565602808869-0.440952806415j))*x_ref[1]
        arg[(1, 0, 2, 0)]=(-0.61810685842-0.524095718529j)*x[0]**o + ((0.358188307228-0.724822954242j))*x[0] + ((0.679543030124-0.22127233743j))*x[1]**o + ((-0.105344957661+0.524104475041j))*x[1]
        ref[(1, 0, 2, 0)]=(-0.61810685842-0.524095718529j)*x_ref[0]**o + ((0.358188307228-0.724822954242j))*x_ref[0] + ((0.679543030124-0.22127233743j))*x_ref[1]**o + ((-0.105344957661+0.524104475041j))*x_ref[1]
        arg[(1, 0, 2, 1)]=(-0.338610141071+0.425242518352j)*x[0]**o + ((0.792110512364+0.602121807751j))*x[0] + ((-0.297532668975-0.0943575325236j))*x[1]**o + ((0.194300320775+0.975359286553j))*x[1]
        ref[(1, 0, 2, 1)]=(-0.338610141071+0.425242518352j)*x_ref[0]**o + ((0.792110512364+0.602121807751j))*x_ref[0] + ((-0.297532668975-0.0943575325236j))*x_ref[1]**o + ((0.194300320775+0.975359286553j))*x_ref[1]
        arg[(1, 0, 3, 0)]=(0.640485370728-0.623342365058j)*x[0]**o + ((-0.79850853443-0.377613110287j))*x[0] + ((0.00797229636937-0.871513826526j))*x[1]**o + ((0.277250430099+0.395487679439j))*x[1]
        ref[(1, 0, 3, 0)]=(0.640485370728-0.623342365058j)*x_ref[0]**o + ((-0.79850853443-0.377613110287j))*x_ref[0] + ((0.00797229636937-0.871513826526j))*x_ref[1]**o + ((0.277250430099+0.395487679439j))*x_ref[1]
        arg[(1, 0, 3, 1)]=(-0.397082966223-0.648811723834j)*x[0]**o + ((0.53007680902-0.275302064257j))*x[0] + ((-0.367777869718-0.222113031204j))*x[1]**o + ((0.0572942602841+0.53432061511j))*x[1]
        ref[(1, 0, 3, 1)]=(-0.397082966223-0.648811723834j)*x_ref[0]**o + ((0.53007680902-0.275302064257j))*x_ref[0] + ((-0.367777869718-0.222113031204j))*x_ref[1]**o + ((0.0572942602841+0.53432061511j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.909118860899-0.979711129623j)*x[0]**o + ((0.200522902716-0.0655673924429j))*x[0] + ((0.824968205959+0.662711976576j))*x[1]**o + ((-0.398206297189-0.829525304485j))*x[1]
        ref[(1, 1, 0, 0)]=(0.909118860899-0.979711129623j)*x_ref[0]**o + ((0.200522902716-0.0655673924429j))*x_ref[0] + ((0.824968205959+0.662711976576j))*x_ref[1]**o + ((-0.398206297189-0.829525304485j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.885325659613-0.651953462745j)*x[0]**o + ((0.265927399313-0.93577778275j))*x[0] + ((-0.905704797755+0.441740987328j))*x[1]**o + ((0.727888315885+0.745621467335j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.885325659613-0.651953462745j)*x_ref[0]**o + ((0.265927399313-0.93577778275j))*x_ref[0] + ((-0.905704797755+0.441740987328j))*x_ref[1]**o + ((0.727888315885+0.745621467335j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(0.957648639221-0.954774251333j)*x[0]**o + ((0.00389871183209+0.646422899131j))*x[0] + ((0.969404409141+0.341312132761j))*x[1]**o + ((-0.214554265217-0.02889502955j))*x[1]
        ref[(1, 1, 1, 0)]=(0.957648639221-0.954774251333j)*x_ref[0]**o + ((0.00389871183209+0.646422899131j))*x_ref[0] + ((0.969404409141+0.341312132761j))*x_ref[1]**o + ((-0.214554265217-0.02889502955j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.841424263345+0.535063732006j)*x[0]**o + ((-0.0273205337874+0.543725150739j))*x[0] + ((0.0296184927731-0.16488523394j))*x[1]**o + ((0.999635390209+0.577920999295j))*x[1]
        ref[(1, 1, 1, 1)]=(0.841424263345+0.535063732006j)*x_ref[0]**o + ((-0.0273205337874+0.543725150739j))*x_ref[0] + ((0.0296184927731-0.16488523394j))*x_ref[1]**o + ((0.999635390209+0.577920999295j))*x_ref[1]
        arg[(1, 1, 2, 0)]=(0.220155390489-0.301169233949j)*x[0]**o + ((0.0510052053802+0.275578407147j))*x[0] + ((0.660149990702-0.115463071175j))*x[1]**o + ((0.344436026761+0.939490554477j))*x[1]
        ref[(1, 1, 2, 0)]=(0.220155390489-0.301169233949j)*x_ref[0]**o + ((0.0510052053802+0.275578407147j))*x_ref[0] + ((0.660149990702-0.115463071175j))*x_ref[1]**o + ((0.344436026761+0.939490554477j))*x_ref[1]
        arg[(1, 1, 2, 1)]=(-0.415780256628+0.575861714978j)*x[0]**o + ((-0.125166662147-0.929118430655j))*x[0] + ((0.336698565232-0.565236358625j))*x[1]**o + ((0.750823537257+0.0837794774956j))*x[1]
        ref[(1, 1, 2, 1)]=(-0.415780256628+0.575861714978j)*x_ref[0]**o + ((-0.125166662147-0.929118430655j))*x_ref[0] + ((0.336698565232-0.565236358625j))*x_ref[1]**o + ((0.750823537257+0.0837794774956j))*x_ref[1]
        arg[(1, 1, 3, 0)]=(0.136749626838-0.00733062323115j)*x[0]**o + ((-0.746997723451-0.465382717975j))*x[0] + ((0.598359722857+0.257539512474j))*x[1]**o + ((-0.970087569754-0.678660034222j))*x[1]
        ref[(1, 1, 3, 0)]=(0.136749626838-0.00733062323115j)*x_ref[0]**o + ((-0.746997723451-0.465382717975j))*x_ref[0] + ((0.598359722857+0.257539512474j))*x_ref[1]**o + ((-0.970087569754-0.678660034222j))*x_ref[1]
        arg[(1, 1, 3, 1)]=(-0.12534870164+0.00397098076179j)*x[0]**o + ((-0.356506163116+0.891385920047j))*x[0] + ((0.954939701002+0.856491959414j))*x[1]**o + ((0.132139777026+0.156317674397j))*x[1]
        ref[(1, 1, 3, 1)]=(-0.12534870164+0.00397098076179j)*x_ref[0]**o + ((-0.356506163116+0.891385920047j))*x_ref[0] + ((0.954939701002+0.856491959414j))*x_ref[1]**o + ((0.132139777026+0.156317674397j))*x_ref[1]
        arg[(1, 2, 0, 0)]=(0.686488865475+0.551768156153j)*x[0]**o + ((0.776857127446+0.0858821070827j))*x[0] + ((0.805285314863+0.89285140956j))*x[1]**o + ((-0.811228594613+0.467483444386j))*x[1]
        ref[(1, 2, 0, 0)]=(0.686488865475+0.551768156153j)*x_ref[0]**o + ((0.776857127446+0.0858821070827j))*x_ref[0] + ((0.805285314863+0.89285140956j))*x_ref[1]**o + ((-0.811228594613+0.467483444386j))*x_ref[1]
        arg[(1, 2, 0, 1)]=(0.695279238003+0.486142553018j)*x[0]**o + ((0.0940567832938-0.227713769813j))*x[0] + ((-0.706021917117+0.218092115735j))*x[1]**o + ((0.709259250654-0.113042866023j))*x[1]
        ref[(1, 2, 0, 1)]=(0.695279238003+0.486142553018j)*x_ref[0]**o + ((0.0940567832938-0.227713769813j))*x_ref[0] + ((-0.706021917117+0.218092115735j))*x_ref[1]**o + ((0.709259250654-0.113042866023j))*x_ref[1]
        arg[(1, 2, 1, 0)]=(0.570817994215+0.344920022331j)*x[0]**o + ((0.0522759905973-0.093064534599j))*x[0] + ((-0.639518127607-0.825976744786j))*x[1]**o + ((-0.678842930574+0.303607228383j))*x[1]
        ref[(1, 2, 1, 0)]=(0.570817994215+0.344920022331j)*x_ref[0]**o + ((0.0522759905973-0.093064534599j))*x_ref[0] + ((-0.639518127607-0.825976744786j))*x_ref[1]**o + ((-0.678842930574+0.303607228383j))*x_ref[1]
        arg[(1, 2, 1, 1)]=(0.579673355187+0.200526076558j)*x[0]**o + ((0.31459658862-0.321873181811j))*x[0] + ((0.202313170308-0.974060188683j))*x[1]**o + ((-0.572919776021-0.918627409241j))*x[1]
        ref[(1, 2, 1, 1)]=(0.579673355187+0.200526076558j)*x_ref[0]**o + ((0.31459658862-0.321873181811j))*x_ref[0] + ((0.202313170308-0.974060188683j))*x_ref[1]**o + ((-0.572919776021-0.918627409241j))*x_ref[1]
        arg[(1, 2, 2, 0)]=(0.690128015133+0.50727386373j)*x[0]**o + ((-0.133052590124-0.042897569296j))*x[0] + ((-0.178732835723-0.0600674030199j))*x[1]**o + ((0.559002285264-0.234465394479j))*x[1]
        ref[(1, 2, 2, 0)]=(0.690128015133+0.50727386373j)*x_ref[0]**o + ((-0.133052590124-0.042897569296j))*x_ref[0] + ((-0.178732835723-0.0600674030199j))*x_ref[1]**o + ((0.559002285264-0.234465394479j))*x_ref[1]
        arg[(1, 2, 2, 1)]=(-0.978402411272-0.72571038877j)*x[0]**o + ((-0.886613833268+0.610253547471j))*x[0] + ((0.162589092819+0.0390109584103j))*x[1]**o + ((-0.129143743826+0.38773240736j))*x[1]
        ref[(1, 2, 2, 1)]=(-0.978402411272-0.72571038877j)*x_ref[0]**o + ((-0.886613833268+0.610253547471j))*x_ref[0] + ((0.162589092819+0.0390109584103j))*x_ref[1]**o + ((-0.129143743826+0.38773240736j))*x_ref[1]
        arg[(1, 2, 3, 0)]=(-0.578458085477+0.175253604555j)*x[0]**o + ((-0.0988265616621-0.0582937181999j))*x[0] + ((0.250103721575-0.640032101111j))*x[1]**o + ((-0.277459409486+0.255609588442j))*x[1]
        ref[(1, 2, 3, 0)]=(-0.578458085477+0.175253604555j)*x_ref[0]**o + ((-0.0988265616621-0.0582937181999j))*x_ref[0] + ((0.250103721575-0.640032101111j))*x_ref[1]**o + ((-0.277459409486+0.255609588442j))*x_ref[1]
        arg[(1, 2, 3, 1)]=(0.226935776501+0.906504202442j)*x[0]**o + ((-0.472668503788-0.170378014994j))*x[0] + ((-0.273121067631+0.124355185781j))*x[1]**o + ((-0.937985875397-0.331659431297j))*x[1]
        ref[(1, 2, 3, 1)]=(0.226935776501+0.906504202442j)*x_ref[0]**o + ((-0.472668503788-0.170378014994j))*x_ref[0] + ((-0.273121067631+0.124355185781j))*x_ref[1]**o + ((-0.937985875397-0.331659431297j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.679627877829+0.146226527727j)*x[2]**o + ((-0.620407622804-0.96078883843j))*x[2]
            ref[(0, 0, 0, 0)]+=(-0.679627877829+0.146226527727j)*x_ref[2]**o + ((-0.620407622804-0.96078883843j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(0.233956763104-0.198950392752j)*x[2]**o + ((0.885666292935-0.738193068083j))*x[2]
            ref[(0, 0, 0, 1)]+=(0.233956763104-0.198950392752j)*x_ref[2]**o + ((0.885666292935-0.738193068083j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(-0.157068097907-0.163243872018j)*x[2]**o + ((0.156137912272-0.199679399416j))*x[2]
            ref[(0, 0, 1, 0)]+=(-0.157068097907-0.163243872018j)*x_ref[2]**o + ((0.156137912272-0.199679399416j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.619799637921+0.0494621409503j)*x[2]**o + ((0.962246073314+0.499064722414j))*x[2]
            ref[(0, 0, 1, 1)]+=(-0.619799637921+0.0494621409503j)*x_ref[2]**o + ((0.962246073314+0.499064722414j))*x_ref[2]
            arg[(0, 0, 2, 0)]+=(0.390705876039+0.0746487035512j)*x[2]**o + ((0.672534379627-0.786985787769j))*x[2]
            ref[(0, 0, 2, 0)]+=(0.390705876039+0.0746487035512j)*x_ref[2]**o + ((0.672534379627-0.786985787769j))*x_ref[2]
            arg[(0, 0, 2, 1)]+=(0.302709967574-0.682824487135j)*x[2]**o + ((0.0425658417914+0.123873568229j))*x[2]
            ref[(0, 0, 2, 1)]+=(0.302709967574-0.682824487135j)*x_ref[2]**o + ((0.0425658417914+0.123873568229j))*x_ref[2]
            arg[(0, 0, 3, 0)]+=(-0.710319482094-0.676720264415j)*x[2]**o + ((-0.322258937159+0.0870270393519j))*x[2]
            ref[(0, 0, 3, 0)]+=(-0.710319482094-0.676720264415j)*x_ref[2]**o + ((-0.322258937159+0.0870270393519j))*x_ref[2]
            arg[(0, 0, 3, 1)]+=(-0.378273679533+0.194955068163j)*x[2]**o + ((0.371983261887+0.0874194438621j))*x[2]
            ref[(0, 0, 3, 1)]+=(-0.378273679533+0.194955068163j)*x_ref[2]**o + ((0.371983261887+0.0874194438621j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.401012185319-0.475304302763j)*x[2]**o + ((-0.150958489096+0.462881195607j))*x[2]
            ref[(0, 1, 0, 0)]+=(-0.401012185319-0.475304302763j)*x_ref[2]**o + ((-0.150958489096+0.462881195607j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(-0.481486669082+0.107847715482j)*x[2]**o + ((0.517614886389+0.426241218246j))*x[2]
            ref[(0, 1, 0, 1)]+=(-0.481486669082+0.107847715482j)*x_ref[2]**o + ((0.517614886389+0.426241218246j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.314653543372-0.380785566576j)*x[2]**o + ((-0.481687920477-0.546038838626j))*x[2]
            ref[(0, 1, 1, 0)]+=(-0.314653543372-0.380785566576j)*x_ref[2]**o + ((-0.481687920477-0.546038838626j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.956891400343+0.0732250958184j)*x[2]**o + ((-0.292907866417-0.160963102708j))*x[2]
            ref[(0, 1, 1, 1)]+=(0.956891400343+0.0732250958184j)*x_ref[2]**o + ((-0.292907866417-0.160963102708j))*x_ref[2]
            arg[(0, 1, 2, 0)]+=(0.0878855521923+0.879660066289j)*x[2]**o + ((-0.373201439116+0.46918598116j))*x[2]
            ref[(0, 1, 2, 0)]+=(0.0878855521923+0.879660066289j)*x_ref[2]**o + ((-0.373201439116+0.46918598116j))*x_ref[2]
            arg[(0, 1, 2, 1)]+=(-0.897571720163-0.603712090143j)*x[2]**o + ((-0.437391664849+0.674391321254j))*x[2]
            ref[(0, 1, 2, 1)]+=(-0.897571720163-0.603712090143j)*x_ref[2]**o + ((-0.437391664849+0.674391321254j))*x_ref[2]
            arg[(0, 1, 3, 0)]+=(-0.403820597256+0.866244491084j)*x[2]**o + ((0.872322764887+0.750812295804j))*x[2]
            ref[(0, 1, 3, 0)]+=(-0.403820597256+0.866244491084j)*x_ref[2]**o + ((0.872322764887+0.750812295804j))*x_ref[2]
            arg[(0, 1, 3, 1)]+=(0.49001741767+0.966383644415j)*x[2]**o + ((0.222439602165-0.543588119511j))*x[2]
            ref[(0, 1, 3, 1)]+=(0.49001741767+0.966383644415j)*x_ref[2]**o + ((0.222439602165-0.543588119511j))*x_ref[2]
            arg[(0, 2, 0, 0)]+=(-0.618417186061+0.263591470229j)*x[2]**o + ((0.178432903104-0.0770755938938j))*x[2]
            ref[(0, 2, 0, 0)]+=(-0.618417186061+0.263591470229j)*x_ref[2]**o + ((0.178432903104-0.0770755938938j))*x_ref[2]
            arg[(0, 2, 0, 1)]+=(-0.360697454716+0.79540872569j)*x[2]**o + ((0.575017131414+0.757978940311j))*x[2]
            ref[(0, 2, 0, 1)]+=(-0.360697454716+0.79540872569j)*x_ref[2]**o + ((0.575017131414+0.757978940311j))*x_ref[2]
            arg[(0, 2, 1, 0)]+=(-0.530473366243+0.762515586651j)*x[2]**o + ((-0.189639433284+0.423077316257j))*x[2]
            ref[(0, 2, 1, 0)]+=(-0.530473366243+0.762515586651j)*x_ref[2]**o + ((-0.189639433284+0.423077316257j))*x_ref[2]
            arg[(0, 2, 1, 1)]+=(-0.361099173387-0.569206252862j)*x[2]**o + ((-0.0433643164947-0.656162284636j))*x[2]
            ref[(0, 2, 1, 1)]+=(-0.361099173387-0.569206252862j)*x_ref[2]**o + ((-0.0433643164947-0.656162284636j))*x_ref[2]
            arg[(0, 2, 2, 0)]+=(-0.252413938302+0.716954326083j)*x[2]**o + ((0.299936896958+0.0308466811583j))*x[2]
            ref[(0, 2, 2, 0)]+=(-0.252413938302+0.716954326083j)*x_ref[2]**o + ((0.299936896958+0.0308466811583j))*x_ref[2]
            arg[(0, 2, 2, 1)]+=(-0.147253117441+0.117826587156j)*x[2]**o + ((0.879868382861-0.598048126887j))*x[2]
            ref[(0, 2, 2, 1)]+=(-0.147253117441+0.117826587156j)*x_ref[2]**o + ((0.879868382861-0.598048126887j))*x_ref[2]
            arg[(0, 2, 3, 0)]+=(0.984884115959-0.430742968339j)*x[2]**o + ((-0.0102441678459+0.965412221016j))*x[2]
            ref[(0, 2, 3, 0)]+=(0.984884115959-0.430742968339j)*x_ref[2]**o + ((-0.0102441678459+0.965412221016j))*x_ref[2]
            arg[(0, 2, 3, 1)]+=(-0.555702936467+0.375696725765j)*x[2]**o + ((-0.263957568606-0.196145609971j))*x[2]
            ref[(0, 2, 3, 1)]+=(-0.555702936467+0.375696725765j)*x_ref[2]**o + ((-0.263957568606-0.196145609971j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.88532365689-0.912779776963j)*x[2]**o + ((0.150765712165+0.541762067653j))*x[2]
            ref[(1, 0, 0, 0)]+=(0.88532365689-0.912779776963j)*x_ref[2]**o + ((0.150765712165+0.541762067653j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.529667768036-0.874383484195j)*x[2]**o + ((0.0755439019301-0.776531891879j))*x[2]
            ref[(1, 0, 0, 1)]+=(0.529667768036-0.874383484195j)*x_ref[2]**o + ((0.0755439019301-0.776531891879j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.884707310266-0.696388942768j)*x[2]**o + ((0.959838041171-0.143480891395j))*x[2]
            ref[(1, 0, 1, 0)]+=(0.884707310266-0.696388942768j)*x_ref[2]**o + ((0.959838041171-0.143480891395j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.336319409358-0.543820785365j)*x[2]**o + ((0.781642229425+0.455801413533j))*x[2]
            ref[(1, 0, 1, 1)]+=(-0.336319409358-0.543820785365j)*x_ref[2]**o + ((0.781642229425+0.455801413533j))*x_ref[2]
            arg[(1, 0, 2, 0)]+=(0.0837875412785-0.394026437898j)*x[2]**o + ((0.098704270914-0.225020673614j))*x[2]
            ref[(1, 0, 2, 0)]+=(0.0837875412785-0.394026437898j)*x_ref[2]**o + ((0.098704270914-0.225020673614j))*x_ref[2]
            arg[(1, 0, 2, 1)]+=(0.230076755737-0.228525656955j)*x[2]**o + ((-0.85644168768+0.332843424608j))*x[2]
            ref[(1, 0, 2, 1)]+=(0.230076755737-0.228525656955j)*x_ref[2]**o + ((-0.85644168768+0.332843424608j))*x_ref[2]
            arg[(1, 0, 3, 0)]+=(-0.0103799032655+0.401277311878j)*x[2]**o + ((0.524084162746+0.0017394959783j))*x[2]
            ref[(1, 0, 3, 0)]+=(-0.0103799032655+0.401277311878j)*x_ref[2]**o + ((0.524084162746+0.0017394959783j))*x_ref[2]
            arg[(1, 0, 3, 1)]+=(-0.866564854447+0.664521473062j)*x[2]**o + ((0.891065585763+0.526221479652j))*x[2]
            ref[(1, 0, 3, 1)]+=(-0.866564854447+0.664521473062j)*x_ref[2]**o + ((0.891065585763+0.526221479652j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.333455048423+0.752787395377j)*x[2]**o + ((-0.0434199977225-0.445313589569j))*x[2]
            ref[(1, 1, 0, 0)]+=(0.333455048423+0.752787395377j)*x_ref[2]**o + ((-0.0434199977225-0.445313589569j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(0.471799449197+0.858220917469j)*x[2]**o + ((0.839345799626+0.661637388509j))*x[2]
            ref[(1, 1, 0, 1)]+=(0.471799449197+0.858220917469j)*x_ref[2]**o + ((0.839345799626+0.661637388509j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(-0.00626441384564-0.515292215604j)*x[2]**o + ((0.754834314769+0.158007879069j))*x[2]
            ref[(1, 1, 1, 0)]+=(-0.00626441384564-0.515292215604j)*x_ref[2]**o + ((0.754834314769+0.158007879069j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(0.755208641513+0.101102283847j)*x[2]**o + ((-0.392857172392+0.169041220224j))*x[2]
            ref[(1, 1, 1, 1)]+=(0.755208641513+0.101102283847j)*x_ref[2]**o + ((-0.392857172392+0.169041220224j))*x_ref[2]
            arg[(1, 1, 2, 0)]+=(-0.600039335023-0.834409308388j)*x[2]**o + ((-0.81597696498-0.136972985127j))*x[2]
            ref[(1, 1, 2, 0)]+=(-0.600039335023-0.834409308388j)*x_ref[2]**o + ((-0.81597696498-0.136972985127j))*x_ref[2]
            arg[(1, 1, 2, 1)]+=(-0.915328375103-0.656242887529j)*x[2]**o + ((0.917503747793-0.328047013334j))*x[2]
            ref[(1, 1, 2, 1)]+=(-0.915328375103-0.656242887529j)*x_ref[2]**o + ((0.917503747793-0.328047013334j))*x_ref[2]
            arg[(1, 1, 3, 0)]+=(0.481449085461-0.753194907576j)*x[2]**o + ((0.659261855727-0.421551858466j))*x[2]
            ref[(1, 1, 3, 0)]+=(0.481449085461-0.753194907576j)*x_ref[2]**o + ((0.659261855727-0.421551858466j))*x_ref[2]
            arg[(1, 1, 3, 1)]+=(0.547586655213+0.0014880093705j)*x[2]**o + ((-0.740889598326-0.734004195336j))*x[2]
            ref[(1, 1, 3, 1)]+=(0.547586655213+0.0014880093705j)*x_ref[2]**o + ((-0.740889598326-0.734004195336j))*x_ref[2]
            arg[(1, 2, 0, 0)]+=(0.125975494554+0.426463808842j)*x[2]**o + ((0.932808490465-0.567410452332j))*x[2]
            ref[(1, 2, 0, 0)]+=(0.125975494554+0.426463808842j)*x_ref[2]**o + ((0.932808490465-0.567410452332j))*x_ref[2]
            arg[(1, 2, 0, 1)]+=(0.440990224509-0.0224737178458j)*x[2]**o + ((-0.589543750563-0.393036607492j))*x[2]
            ref[(1, 2, 0, 1)]+=(0.440990224509-0.0224737178458j)*x_ref[2]**o + ((-0.589543750563-0.393036607492j))*x_ref[2]
            arg[(1, 2, 1, 0)]+=(-0.133091516542-0.225898576517j)*x[2]**o + ((0.325526080004-0.291135276319j))*x[2]
            ref[(1, 2, 1, 0)]+=(-0.133091516542-0.225898576517j)*x_ref[2]**o + ((0.325526080004-0.291135276319j))*x_ref[2]
            arg[(1, 2, 1, 1)]+=(-0.0877014444776+0.445428421217j)*x[2]**o + ((0.610301405737+0.20267505342j))*x[2]
            ref[(1, 2, 1, 1)]+=(-0.0877014444776+0.445428421217j)*x_ref[2]**o + ((0.610301405737+0.20267505342j))*x_ref[2]
            arg[(1, 2, 2, 0)]+=(-0.819133807773-0.719533327772j)*x[2]**o + ((0.513966650155-0.0807994953097j))*x[2]
            ref[(1, 2, 2, 0)]+=(-0.819133807773-0.719533327772j)*x_ref[2]**o + ((0.513966650155-0.0807994953097j))*x_ref[2]
            arg[(1, 2, 2, 1)]+=(0.978944626847+0.639360498102j)*x[2]**o + ((0.0577854663927-0.0450338756869j))*x[2]
            ref[(1, 2, 2, 1)]+=(0.978944626847+0.639360498102j)*x_ref[2]**o + ((0.0577854663927-0.0450338756869j))*x_ref[2]
            arg[(1, 2, 3, 0)]+=(-0.591100589046-0.787565458293j)*x[2]**o + ((0.396452540416-0.322243291274j))*x[2]
            ref[(1, 2, 3, 0)]+=(-0.591100589046-0.787565458293j)*x_ref[2]**o + ((0.396452540416-0.322243291274j))*x_ref[2]
            arg[(1, 2, 3, 1)]+=(0.229837692622-0.0747482670748j)*x[2]**o + ((-0.473337904957+0.837579682215j))*x[2]
            ref[(1, 2, 3, 1)]+=(0.229837692622-0.0747482670748j)*x_ref[2]**o + ((-0.473337904957+0.837579682215j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=(0.899308518251+0.582920821182j)*x[0]**o + ((0.850992454003-0.902655821262j))*x[0] + ((-0.180390104131+0.374924215941j))*x[1]**o + ((-0.177565086837-0.428900070244j))*x[1]
        ref=(0.899308518251+0.582920821182j)*x_ref[0]**o + ((0.850992454003-0.902655821262j))*x_ref[0] + ((-0.180390104131+0.374924215941j))*x_ref[1]**o + ((-0.177565086837-0.428900070244j))*x_ref[1]
        if dim==3:
            arg+=((0.278410107508+0.0467298341204j))*x[2]**o + ((-0.870793278314-0.487449221584j))*x[2]
            ref+=((0.278410107508+0.0467298341204j))*x_ref[2]**o + ((-0.870793278314-0.487449221584j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=(0.959004208186+0.564003267414j)*x[0]**o + ((0.767893923764+0.154847907214j))*x[0] + ((-0.290413265913+0.0858047309481j))*x[1]**o + ((-0.941608486231+0.23202281785j))*x[1]
        ref[(0,)]=(0.959004208186+0.564003267414j)*x_ref[0]**o + ((0.767893923764+0.154847907214j))*x_ref[0] + ((-0.290413265913+0.0858047309481j))*x_ref[1]**o + ((-0.941608486231+0.23202281785j))*x_ref[1]
        arg[(1,)]=(0.338617108022+0.322143184068j)*x[0]**o + ((-0.369044597936+0.162288312914j))*x[0] + ((-0.78015568022-0.252259088661j))*x[1]**o + ((0.74994500075+0.802380108387j))*x[1]
        ref[(1,)]=(0.338617108022+0.322143184068j)*x_ref[0]**o + ((-0.369044597936+0.162288312914j))*x_ref[0] + ((-0.78015568022-0.252259088661j))*x_ref[1]**o + ((0.74994500075+0.802380108387j))*x_ref[1]
        arg[(2,)]=(-0.974682597935-0.309785765814j)*x[0]**o + ((0.0682327447696-0.141199950741j))*x[0] + ((-0.598990385785-0.575436867461j))*x[1]**o + ((-0.0555852442824-0.0955655550098j))*x[1]
        ref[(2,)]=(-0.974682597935-0.309785765814j)*x_ref[0]**o + ((0.0682327447696-0.141199950741j))*x_ref[0] + ((-0.598990385785-0.575436867461j))*x_ref[1]**o + ((-0.0555852442824-0.0955655550098j))*x_ref[1]
        arg[(3,)]=(0.757899087811+0.378383292834j)*x[0]**o + ((0.0748034900703-0.239583906323j))*x[0] + ((-0.117849971654+0.146021195923j))*x[1]**o + ((-0.583396793602+0.060019559479j))*x[1]
        ref[(3,)]=(0.757899087811+0.378383292834j)*x_ref[0]**o + ((0.0748034900703-0.239583906323j))*x_ref[0] + ((-0.117849971654+0.146021195923j))*x_ref[1]**o + ((-0.583396793602+0.060019559479j))*x_ref[1]
        if dim==3:
            arg[(0,)]+=(-0.338908290581-0.30471424984j)*x[2]**o + ((0.00571969818573-0.0958963657579j))*x[2]
            ref[(0,)]+=(-0.338908290581-0.30471424984j)*x_ref[2]**o + ((0.00571969818573-0.0958963657579j))*x_ref[2]
            arg[(1,)]+=(-0.342131004371-0.48475181701j)*x[2]**o + ((0.512846709791+0.785081069951j))*x[2]
            ref[(1,)]+=(-0.342131004371-0.48475181701j)*x_ref[2]**o + ((0.512846709791+0.785081069951j))*x_ref[2]
            arg[(2,)]+=(-0.572240577468-0.872934001615j)*x[2]**o + ((0.598474372659-0.54229815319j))*x[2]
            ref[(2,)]+=(-0.572240577468-0.872934001615j)*x_ref[2]**o + ((0.598474372659-0.54229815319j))*x_ref[2]
            arg[(3,)]+=(-0.0990021891155-0.0609960828387j)*x[2]**o + ((-0.710307251288-0.191913348315j))*x[2]
            ref[(3,)]+=(-0.0990021891155-0.0609960828387j)*x_ref[2]**o + ((-0.710307251288-0.191913348315j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref = Data(0,(2, 4),w_ref)
        arg[(0, 0)]=(0.984281051562+0.254020869844j)*x[0]**o + ((0.51249879137-0.730214979928j))*x[0] + ((-0.666067027465-0.396233762429j))*x[1]**o + ((-0.983550471287-0.910513371398j))*x[1]
        ref[(0, 0)]=(0.984281051562+0.254020869844j)*x_ref[0]**o + ((0.51249879137-0.730214979928j))*x_ref[0] + ((-0.666067027465-0.396233762429j))*x_ref[1]**o + ((-0.983550471287-0.910513371398j))*x_ref[1]
        arg[(0, 1)]=(-0.685135872607-0.865817932736j)*x[0]**o + ((0.793593067943+0.985640896214j))*x[0] + ((0.808023136026+0.838519604928j))*x[1]**o + ((-0.521891198582-0.535736117974j))*x[1]
        ref[(0, 1)]=(-0.685135872607-0.865817932736j)*x_ref[0]**o + ((0.793593067943+0.985640896214j))*x_ref[0] + ((0.808023136026+0.838519604928j))*x_ref[1]**o + ((-0.521891198582-0.535736117974j))*x_ref[1]
        arg[(0, 2)]=(-0.603491622995+0.135923816721j)*x[0]**o + ((-0.591740664423+0.851549768089j))*x[0] + ((-0.279815144156+0.308766428557j))*x[1]**o + ((-0.958742495171+0.467989310983j))*x[1]
        ref[(0, 2)]=(-0.603491622995+0.135923816721j)*x_ref[0]**o + ((-0.591740664423+0.851549768089j))*x_ref[0] + ((-0.279815144156+0.308766428557j))*x_ref[1]**o + ((-0.958742495171+0.467989310983j))*x_ref[1]
        arg[(0, 3)]=(-0.818260834717+0.491721867524j)*x[0]**o + ((-0.393332698032+0.718124784948j))*x[0] + ((0.908901683183-0.0280351864383j))*x[1]**o + ((0.617426382479-0.498620291793j))*x[1]
        ref[(0, 3)]=(-0.818260834717+0.491721867524j)*x_ref[0]**o + ((-0.393332698032+0.718124784948j))*x_ref[0] + ((0.908901683183-0.0280351864383j))*x_ref[1]**o + ((0.617426382479-0.498620291793j))*x_ref[1]
        arg[(1, 0)]=(0.101141129579-0.0554526941607j)*x[0]**o + ((0.90044231699+0.614660271706j))*x[0] + ((-0.883179243928-0.985932142523j))*x[1]**o + ((-0.663689064403-0.406122026595j))*x[1]
        ref[(1, 0)]=(0.101141129579-0.0554526941607j)*x_ref[0]**o + ((0.90044231699+0.614660271706j))*x_ref[0] + ((-0.883179243928-0.985932142523j))*x_ref[1]**o + ((-0.663689064403-0.406122026595j))*x_ref[1]
        arg[(1, 1)]=(0.291812775802-0.266325923486j)*x[0]**o + ((0.754144752636+0.374310811396j))*x[0] + ((0.921277868692+0.680360460617j))*x[1]**o + ((0.106400319006-0.778306552575j))*x[1]
        ref[(1, 1)]=(0.291812775802-0.266325923486j)*x_ref[0]**o + ((0.754144752636+0.374310811396j))*x_ref[0] + ((0.921277868692+0.680360460617j))*x_ref[1]**o + ((0.106400319006-0.778306552575j))*x_ref[1]
        arg[(1, 2)]=(-0.498818162014-0.529946769022j)*x[0]**o + ((-0.857564717305-0.96481597991j))*x[0] + ((0.405712102084-0.593539020356j))*x[1]**o + ((-0.284813557071+0.890844747667j))*x[1]
        ref[(1, 2)]=(-0.498818162014-0.529946769022j)*x_ref[0]**o + ((-0.857564717305-0.96481597991j))*x_ref[0] + ((0.405712102084-0.593539020356j))*x_ref[1]**o + ((-0.284813557071+0.890844747667j))*x_ref[1]
        arg[(1, 3)]=(-0.0107756453855-0.838722243493j)*x[0]**o + ((-0.535904793703+0.0209265701313j))*x[0] + ((-0.550148551103+0.610492852066j))*x[1]**o + ((-0.643895249352+0.0393883816739j))*x[1]
        ref[(1, 3)]=(-0.0107756453855-0.838722243493j)*x_ref[0]**o + ((-0.535904793703+0.0209265701313j))*x_ref[0] + ((-0.550148551103+0.610492852066j))*x_ref[1]**o + ((-0.643895249352+0.0393883816739j))*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=(0.154313216768+0.0489200318997j)*x[2]**o + ((0.848810717748-0.469075853929j))*x[2]
            ref[(0, 0)]+=(0.154313216768+0.0489200318997j)*x_ref[2]**o + ((0.848810717748-0.469075853929j))*x_ref[2]
            arg[(0, 1)]+=(-0.874009463251+0.676374276617j)*x[2]**o + ((0.31774648955+0.612555351953j))*x[2]
            ref[(0, 1)]+=(-0.874009463251+0.676374276617j)*x_ref[2]**o + ((0.31774648955+0.612555351953j))*x_ref[2]
            arg[(0, 2)]+=(0.776142134196+0.46893561999j)*x[2]**o + ((0.871092817678+0.294396036175j))*x[2]
            ref[(0, 2)]+=(0.776142134196+0.46893561999j)*x_ref[2]**o + ((0.871092817678+0.294396036175j))*x_ref[2]
            arg[(0, 3)]+=(0.730045753508-0.0801312908784j)*x[2]**o + ((-0.135827031322-0.874386623106j))*x[2]
            ref[(0, 3)]+=(0.730045753508-0.0801312908784j)*x_ref[2]**o + ((-0.135827031322-0.874386623106j))*x_ref[2]
            arg[(1, 0)]+=(-0.773631635815+0.751914973005j)*x[2]**o + ((0.115476877627+0.852500675095j))*x[2]
            ref[(1, 0)]+=(-0.773631635815+0.751914973005j)*x_ref[2]**o + ((0.115476877627+0.852500675095j))*x_ref[2]
            arg[(1, 1)]+=(0.197542348078-0.74104842262j)*x[2]**o + ((-0.412660705065+0.564248299302j))*x[2]
            ref[(1, 1)]+=(0.197542348078-0.74104842262j)*x_ref[2]**o + ((-0.412660705065+0.564248299302j))*x_ref[2]
            arg[(1, 2)]+=(-0.550889685302+0.809247688731j)*x[2]**o + ((0.142045946793-0.617890051549j))*x[2]
            ref[(1, 2)]+=(-0.550889685302+0.809247688731j)*x_ref[2]**o + ((0.142045946793-0.617890051549j))*x_ref[2]
            arg[(1, 3)]+=(0.553538405803+0.0858354591378j)*x[2]**o + ((0.903678349086+0.456749248809j))*x[2]
            ref[(1, 3)]+=(0.553538405803+0.0858354591378j)*x_ref[2]**o + ((0.903678349086+0.456749248809j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 4),w)
        ref = Data(0,(4, 3, 4),w_ref)
        arg[(0, 0, 0)]=(-0.0697702691476+0.845282879354j)*x[0]**o + ((0.329871939257-0.879382942814j))*x[0] + ((0.596011963021+0.11204729995j))*x[1]**o + ((0.336637875249-0.191332502485j))*x[1]
        ref[(0, 0, 0)]=(-0.0697702691476+0.845282879354j)*x_ref[0]**o + ((0.329871939257-0.879382942814j))*x_ref[0] + ((0.596011963021+0.11204729995j))*x_ref[1]**o + ((0.336637875249-0.191332502485j))*x_ref[1]
        arg[(0, 0, 1)]=(-0.428089703941+0.965871607062j)*x[0]**o + ((0.564658465543-0.0865378698241j))*x[0] + ((-0.790778331262-0.762679472756j))*x[1]**o + ((-0.535406421247-0.105025909837j))*x[1]
        ref[(0, 0, 1)]=(-0.428089703941+0.965871607062j)*x_ref[0]**o + ((0.564658465543-0.0865378698241j))*x_ref[0] + ((-0.790778331262-0.762679472756j))*x_ref[1]**o + ((-0.535406421247-0.105025909837j))*x_ref[1]
        arg[(0, 0, 2)]=(0.377791057995+0.552457737j)*x[0]**o + ((0.984829093251-0.580974456596j))*x[0] + ((0.091793091947-0.378980131466j))*x[1]**o + ((-0.644415469425-0.823517734247j))*x[1]
        ref[(0, 0, 2)]=(0.377791057995+0.552457737j)*x_ref[0]**o + ((0.984829093251-0.580974456596j))*x_ref[0] + ((0.091793091947-0.378980131466j))*x_ref[1]**o + ((-0.644415469425-0.823517734247j))*x_ref[1]
        arg[(0, 0, 3)]=(0.917283532407-0.0399901056562j)*x[0]**o + ((0.309824600747+0.548008895016j))*x[0] + ((-0.0158234733133-0.673076402817j))*x[1]**o + ((-0.774472269664-0.766805639141j))*x[1]
        ref[(0, 0, 3)]=(0.917283532407-0.0399901056562j)*x_ref[0]**o + ((0.309824600747+0.548008895016j))*x_ref[0] + ((-0.0158234733133-0.673076402817j))*x_ref[1]**o + ((-0.774472269664-0.766805639141j))*x_ref[1]
        arg[(0, 1, 0)]=(-0.192460928892+0.600925589986j)*x[0]**o + ((-0.981753803208+0.962779792792j))*x[0] + ((-0.771774580291+0.918852806363j))*x[1]**o + ((0.290837173359+0.819346900269j))*x[1]
        ref[(0, 1, 0)]=(-0.192460928892+0.600925589986j)*x_ref[0]**o + ((-0.981753803208+0.962779792792j))*x_ref[0] + ((-0.771774580291+0.918852806363j))*x_ref[1]**o + ((0.290837173359+0.819346900269j))*x_ref[1]
        arg[(0, 1, 1)]=(0.0247000725869-0.748488906579j)*x[0]**o + ((-0.298634670499-0.182219230963j))*x[0] + ((-0.355045769385+0.0856518361113j))*x[1]**o + ((0.697116913101-0.0342520242153j))*x[1]
        ref[(0, 1, 1)]=(0.0247000725869-0.748488906579j)*x_ref[0]**o + ((-0.298634670499-0.182219230963j))*x_ref[0] + ((-0.355045769385+0.0856518361113j))*x_ref[1]**o + ((0.697116913101-0.0342520242153j))*x_ref[1]
        arg[(0, 1, 2)]=(0.105774048596-0.512593631322j)*x[0]**o + ((-0.130346333757+0.246137540574j))*x[0] + ((0.0823166869953-0.659001388723j))*x[1]**o + ((0.258463866497-0.254030890036j))*x[1]
        ref[(0, 1, 2)]=(0.105774048596-0.512593631322j)*x_ref[0]**o + ((-0.130346333757+0.246137540574j))*x_ref[0] + ((0.0823166869953-0.659001388723j))*x_ref[1]**o + ((0.258463866497-0.254030890036j))*x_ref[1]
        arg[(0, 1, 3)]=(0.599629545253-0.446290654567j)*x[0]**o + ((-0.106951985973-0.823151246382j))*x[0] + ((-0.673785683749-0.724774226952j))*x[1]**o + ((0.487051237642+0.778414462593j))*x[1]
        ref[(0, 1, 3)]=(0.599629545253-0.446290654567j)*x_ref[0]**o + ((-0.106951985973-0.823151246382j))*x_ref[0] + ((-0.673785683749-0.724774226952j))*x_ref[1]**o + ((0.487051237642+0.778414462593j))*x_ref[1]
        arg[(0, 2, 0)]=(0.926364499391+0.586843013219j)*x[0]**o + ((0.495122059821-0.0195972329097j))*x[0] + ((-0.805390768892-0.0360821554388j))*x[1]**o + ((-0.68961365355-0.665891770191j))*x[1]
        ref[(0, 2, 0)]=(0.926364499391+0.586843013219j)*x_ref[0]**o + ((0.495122059821-0.0195972329097j))*x_ref[0] + ((-0.805390768892-0.0360821554388j))*x_ref[1]**o + ((-0.68961365355-0.665891770191j))*x_ref[1]
        arg[(0, 2, 1)]=(0.923456261476-0.822517436278j)*x[0]**o + ((0.777667680284+0.877474094915j))*x[0] + ((-0.98160323874-0.738952647906j))*x[1]**o + ((-0.0470011262743-0.928135662263j))*x[1]
        ref[(0, 2, 1)]=(0.923456261476-0.822517436278j)*x_ref[0]**o + ((0.777667680284+0.877474094915j))*x_ref[0] + ((-0.98160323874-0.738952647906j))*x_ref[1]**o + ((-0.0470011262743-0.928135662263j))*x_ref[1]
        arg[(0, 2, 2)]=(0.565728038998-0.115098487418j)*x[0]**o + ((0.617423141838-0.997549955877j))*x[0] + ((0.103616807072+0.126899082508j))*x[1]**o + ((-0.303753520134+0.212823027351j))*x[1]
        ref[(0, 2, 2)]=(0.565728038998-0.115098487418j)*x_ref[0]**o + ((0.617423141838-0.997549955877j))*x_ref[0] + ((0.103616807072+0.126899082508j))*x_ref[1]**o + ((-0.303753520134+0.212823027351j))*x_ref[1]
        arg[(0, 2, 3)]=(-0.753394822216-0.473900794497j)*x[0]**o + ((-0.747287417854+0.894057291469j))*x[0] + ((-0.550132867206+0.952921616819j))*x[1]**o + ((0.705547196623+0.905464323567j))*x[1]
        ref[(0, 2, 3)]=(-0.753394822216-0.473900794497j)*x_ref[0]**o + ((-0.747287417854+0.894057291469j))*x_ref[0] + ((-0.550132867206+0.952921616819j))*x_ref[1]**o + ((0.705547196623+0.905464323567j))*x_ref[1]
        arg[(1, 0, 0)]=(0.878883423787+0.1517051168j)*x[0]**o + ((-0.233154437371-0.115214606639j))*x[0] + ((-0.528030313647-0.788371366278j))*x[1]**o + ((0.297369946487-0.855455868721j))*x[1]
        ref[(1, 0, 0)]=(0.878883423787+0.1517051168j)*x_ref[0]**o + ((-0.233154437371-0.115214606639j))*x_ref[0] + ((-0.528030313647-0.788371366278j))*x_ref[1]**o + ((0.297369946487-0.855455868721j))*x_ref[1]
        arg[(1, 0, 1)]=(-0.911605985454-0.757243928741j)*x[0]**o + ((0.0397727867663-0.892001632878j))*x[0] + ((0.70412025727+0.255799557347j))*x[1]**o + ((-0.172279653311+0.0960309212263j))*x[1]
        ref[(1, 0, 1)]=(-0.911605985454-0.757243928741j)*x_ref[0]**o + ((0.0397727867663-0.892001632878j))*x_ref[0] + ((0.70412025727+0.255799557347j))*x_ref[1]**o + ((-0.172279653311+0.0960309212263j))*x_ref[1]
        arg[(1, 0, 2)]=(-0.521841220742+0.763329606725j)*x[0]**o + ((0.0365277160083+0.239067443018j))*x[0] + ((-0.526370445955-0.907181546634j))*x[1]**o + ((0.0622751927156+0.685523268125j))*x[1]
        ref[(1, 0, 2)]=(-0.521841220742+0.763329606725j)*x_ref[0]**o + ((0.0365277160083+0.239067443018j))*x_ref[0] + ((-0.526370445955-0.907181546634j))*x_ref[1]**o + ((0.0622751927156+0.685523268125j))*x_ref[1]
        arg[(1, 0, 3)]=(-0.909524505415-0.0344955677839j)*x[0]**o + ((0.439334384381+0.507997363225j))*x[0] + ((0.818203700879+0.209809049233j))*x[1]**o + ((-0.821154267211-0.150925519547j))*x[1]
        ref[(1, 0, 3)]=(-0.909524505415-0.0344955677839j)*x_ref[0]**o + ((0.439334384381+0.507997363225j))*x_ref[0] + ((0.818203700879+0.209809049233j))*x_ref[1]**o + ((-0.821154267211-0.150925519547j))*x_ref[1]
        arg[(1, 1, 0)]=(0.502990026242+0.259913923968j)*x[0]**o + ((-0.414004948149-0.395126407943j))*x[0] + ((0.597815356667-0.947319757813j))*x[1]**o + ((-0.76122419339-0.613810039174j))*x[1]
        ref[(1, 1, 0)]=(0.502990026242+0.259913923968j)*x_ref[0]**o + ((-0.414004948149-0.395126407943j))*x_ref[0] + ((0.597815356667-0.947319757813j))*x_ref[1]**o + ((-0.76122419339-0.613810039174j))*x_ref[1]
        arg[(1, 1, 1)]=(0.630446839888-0.0855773713008j)*x[0]**o + ((0.711816729445+0.0311273789222j))*x[0] + ((-0.496657990672-0.0842152815739j))*x[1]**o + ((0.72929895276-0.445479275549j))*x[1]
        ref[(1, 1, 1)]=(0.630446839888-0.0855773713008j)*x_ref[0]**o + ((0.711816729445+0.0311273789222j))*x_ref[0] + ((-0.496657990672-0.0842152815739j))*x_ref[1]**o + ((0.72929895276-0.445479275549j))*x_ref[1]
        arg[(1, 1, 2)]=(0.90132676721-0.956391021529j)*x[0]**o + ((-0.565019054115-0.579999072111j))*x[0] + ((-0.812491748302+0.229075031682j))*x[1]**o + ((0.69739211432-0.307791062144j))*x[1]
        ref[(1, 1, 2)]=(0.90132676721-0.956391021529j)*x_ref[0]**o + ((-0.565019054115-0.579999072111j))*x_ref[0] + ((-0.812491748302+0.229075031682j))*x_ref[1]**o + ((0.69739211432-0.307791062144j))*x_ref[1]
        arg[(1, 1, 3)]=(-0.22223995718-0.156436111678j)*x[0]**o + ((-0.212815569638-0.508372533377j))*x[0] + ((-0.0329396835558-0.0954939150049j))*x[1]**o + ((-0.276282459817-0.433952042252j))*x[1]
        ref[(1, 1, 3)]=(-0.22223995718-0.156436111678j)*x_ref[0]**o + ((-0.212815569638-0.508372533377j))*x_ref[0] + ((-0.0329396835558-0.0954939150049j))*x_ref[1]**o + ((-0.276282459817-0.433952042252j))*x_ref[1]
        arg[(1, 2, 0)]=(-0.109042514719-0.181751073517j)*x[0]**o + ((0.461996861386-0.893568301524j))*x[0] + ((-0.741297977845+0.582187678158j))*x[1]**o + ((0.569486261601-0.0798914644712j))*x[1]
        ref[(1, 2, 0)]=(-0.109042514719-0.181751073517j)*x_ref[0]**o + ((0.461996861386-0.893568301524j))*x_ref[0] + ((-0.741297977845+0.582187678158j))*x_ref[1]**o + ((0.569486261601-0.0798914644712j))*x_ref[1]
        arg[(1, 2, 1)]=(-0.608539965972-0.705337836846j)*x[0]**o + ((0.659013506182+0.941952528725j))*x[0] + ((0.830067514252-0.638483336946j))*x[1]**o + ((0.485009537974-0.560542496121j))*x[1]
        ref[(1, 2, 1)]=(-0.608539965972-0.705337836846j)*x_ref[0]**o + ((0.659013506182+0.941952528725j))*x_ref[0] + ((0.830067514252-0.638483336946j))*x_ref[1]**o + ((0.485009537974-0.560542496121j))*x_ref[1]
        arg[(1, 2, 2)]=(0.300386338817-0.651944077039j)*x[0]**o + ((-0.71563303724-0.374116495918j))*x[0] + ((0.0252465370672-0.56065947934j))*x[1]**o + ((0.630437728551+0.977783364264j))*x[1]
        ref[(1, 2, 2)]=(0.300386338817-0.651944077039j)*x_ref[0]**o + ((-0.71563303724-0.374116495918j))*x_ref[0] + ((0.0252465370672-0.56065947934j))*x_ref[1]**o + ((0.630437728551+0.977783364264j))*x_ref[1]
        arg[(1, 2, 3)]=(-0.818128803318+0.0454930997985j)*x[0]**o + ((0.448062088522-0.821483450586j))*x[0] + ((0.367707451909+0.113509396703j))*x[1]**o + ((0.0434836372419+0.3174636448j))*x[1]
        ref[(1, 2, 3)]=(-0.818128803318+0.0454930997985j)*x_ref[0]**o + ((0.448062088522-0.821483450586j))*x_ref[0] + ((0.367707451909+0.113509396703j))*x_ref[1]**o + ((0.0434836372419+0.3174636448j))*x_ref[1]
        arg[(2, 0, 0)]=(-0.893556477085+0.231029382226j)*x[0]**o + ((-0.242090201649+0.672659240565j))*x[0] + ((0.70902908381+0.846422672576j))*x[1]**o + ((-0.598768562123+0.510572803054j))*x[1]
        ref[(2, 0, 0)]=(-0.893556477085+0.231029382226j)*x_ref[0]**o + ((-0.242090201649+0.672659240565j))*x_ref[0] + ((0.70902908381+0.846422672576j))*x_ref[1]**o + ((-0.598768562123+0.510572803054j))*x_ref[1]
        arg[(2, 0, 1)]=(-0.910179665598-0.507958911181j)*x[0]**o + ((-0.124300834759+0.00109037622411j))*x[0] + ((-0.630292389049-0.610534872756j))*x[1]**o + ((0.247986443037+0.140676055583j))*x[1]
        ref[(2, 0, 1)]=(-0.910179665598-0.507958911181j)*x_ref[0]**o + ((-0.124300834759+0.00109037622411j))*x_ref[0] + ((-0.630292389049-0.610534872756j))*x_ref[1]**o + ((0.247986443037+0.140676055583j))*x_ref[1]
        arg[(2, 0, 2)]=(-0.939196532681-0.237984419655j)*x[0]**o + ((-0.446778854736+0.918282208096j))*x[0] + ((-0.664302071123+0.0809736553736j))*x[1]**o + ((-0.962475576719+0.388169446137j))*x[1]
        ref[(2, 0, 2)]=(-0.939196532681-0.237984419655j)*x_ref[0]**o + ((-0.446778854736+0.918282208096j))*x_ref[0] + ((-0.664302071123+0.0809736553736j))*x_ref[1]**o + ((-0.962475576719+0.388169446137j))*x_ref[1]
        arg[(2, 0, 3)]=(-0.392221854542-0.800796068047j)*x[0]**o + ((-0.359904197547-0.375436487108j))*x[0] + ((0.56164339019+0.828842213501j))*x[1]**o + ((0.0346795552466-0.852316750748j))*x[1]
        ref[(2, 0, 3)]=(-0.392221854542-0.800796068047j)*x_ref[0]**o + ((-0.359904197547-0.375436487108j))*x_ref[0] + ((0.56164339019+0.828842213501j))*x_ref[1]**o + ((0.0346795552466-0.852316750748j))*x_ref[1]
        arg[(2, 1, 0)]=(0.275619337049+0.538694176983j)*x[0]**o + ((0.228816270277+0.806008461585j))*x[0] + ((0.0736802070728-0.411506730165j))*x[1]**o + ((-0.740086719066-0.162450407667j))*x[1]
        ref[(2, 1, 0)]=(0.275619337049+0.538694176983j)*x_ref[0]**o + ((0.228816270277+0.806008461585j))*x_ref[0] + ((0.0736802070728-0.411506730165j))*x_ref[1]**o + ((-0.740086719066-0.162450407667j))*x_ref[1]
        arg[(2, 1, 1)]=(-0.170287912091+0.827848725527j)*x[0]**o + ((0.483222424912-0.406763691673j))*x[0] + ((0.842094034345-0.986717085153j))*x[1]**o + ((0.261921816031+0.250332967759j))*x[1]
        ref[(2, 1, 1)]=(-0.170287912091+0.827848725527j)*x_ref[0]**o + ((0.483222424912-0.406763691673j))*x_ref[0] + ((0.842094034345-0.986717085153j))*x_ref[1]**o + ((0.261921816031+0.250332967759j))*x_ref[1]
        arg[(2, 1, 2)]=(0.685643647643-0.695525603797j)*x[0]**o + ((0.360818224419-0.297584278772j))*x[0] + ((-0.798168326334+0.276344520641j))*x[1]**o + ((0.971684209825-0.765096946972j))*x[1]
        ref[(2, 1, 2)]=(0.685643647643-0.695525603797j)*x_ref[0]**o + ((0.360818224419-0.297584278772j))*x_ref[0] + ((-0.798168326334+0.276344520641j))*x_ref[1]**o + ((0.971684209825-0.765096946972j))*x_ref[1]
        arg[(2, 1, 3)]=(-0.164126873023-0.619509311086j)*x[0]**o + ((0.00582177356547+0.716136587782j))*x[0] + ((0.6466815844-0.274949536944j))*x[1]**o + ((-0.0460445590308-0.79183738154j))*x[1]
        ref[(2, 1, 3)]=(-0.164126873023-0.619509311086j)*x_ref[0]**o + ((0.00582177356547+0.716136587782j))*x_ref[0] + ((0.6466815844-0.274949536944j))*x_ref[1]**o + ((-0.0460445590308-0.79183738154j))*x_ref[1]
        arg[(2, 2, 0)]=(0.503666844986+0.160107518701j)*x[0]**o + ((0.165768831261+0.675363257112j))*x[0] + ((-0.168328320373+0.496401933801j))*x[1]**o + ((0.319400350381+0.592474416353j))*x[1]
        ref[(2, 2, 0)]=(0.503666844986+0.160107518701j)*x_ref[0]**o + ((0.165768831261+0.675363257112j))*x_ref[0] + ((-0.168328320373+0.496401933801j))*x_ref[1]**o + ((0.319400350381+0.592474416353j))*x_ref[1]
        arg[(2, 2, 1)]=(0.973205162848-0.69367049602j)*x[0]**o + ((0.436299763571-0.960666528149j))*x[0] + ((0.23449569953+0.0247305350509j))*x[1]**o + ((0.850595193039+0.625850719722j))*x[1]
        ref[(2, 2, 1)]=(0.973205162848-0.69367049602j)*x_ref[0]**o + ((0.436299763571-0.960666528149j))*x_ref[0] + ((0.23449569953+0.0247305350509j))*x_ref[1]**o + ((0.850595193039+0.625850719722j))*x_ref[1]
        arg[(2, 2, 2)]=(0.790255863399-0.352177865449j)*x[0]**o + ((0.414960091633+0.511037996023j))*x[0] + ((0.622842965659+0.658735448984j))*x[1]**o + ((-0.917125385868+0.966227213292j))*x[1]
        ref[(2, 2, 2)]=(0.790255863399-0.352177865449j)*x_ref[0]**o + ((0.414960091633+0.511037996023j))*x_ref[0] + ((0.622842965659+0.658735448984j))*x_ref[1]**o + ((-0.917125385868+0.966227213292j))*x_ref[1]
        arg[(2, 2, 3)]=(-0.570125516795+0.462487450383j)*x[0]**o + ((-0.156675200097-0.495904762286j))*x[0] + ((0.845261502645-0.773275900552j))*x[1]**o + ((0.936737073831+0.521017596535j))*x[1]
        ref[(2, 2, 3)]=(-0.570125516795+0.462487450383j)*x_ref[0]**o + ((-0.156675200097-0.495904762286j))*x_ref[0] + ((0.845261502645-0.773275900552j))*x_ref[1]**o + ((0.936737073831+0.521017596535j))*x_ref[1]
        arg[(3, 0, 0)]=(-0.898961724945+0.150228573005j)*x[0]**o + ((0.134385350025-0.473883863336j))*x[0] + ((0.725255835037+0.995861672427j))*x[1]**o + ((0.575629696403-0.856828332822j))*x[1]
        ref[(3, 0, 0)]=(-0.898961724945+0.150228573005j)*x_ref[0]**o + ((0.134385350025-0.473883863336j))*x_ref[0] + ((0.725255835037+0.995861672427j))*x_ref[1]**o + ((0.575629696403-0.856828332822j))*x_ref[1]
        arg[(3, 0, 1)]=(-0.478841240599-0.661718376876j)*x[0]**o + ((-0.420476217128-0.835551324787j))*x[0] + ((-0.0337193791352+0.690406583515j))*x[1]**o + ((0.00846458810935-0.983189280906j))*x[1]
        ref[(3, 0, 1)]=(-0.478841240599-0.661718376876j)*x_ref[0]**o + ((-0.420476217128-0.835551324787j))*x_ref[0] + ((-0.0337193791352+0.690406583515j))*x_ref[1]**o + ((0.00846458810935-0.983189280906j))*x_ref[1]
        arg[(3, 0, 2)]=(0.550626640999+0.612079560258j)*x[0]**o + ((0.818255527425-0.729807720817j))*x[0] + ((-0.156954173721+0.553410727606j))*x[1]**o + ((0.356924129329-0.154933809349j))*x[1]
        ref[(3, 0, 2)]=(0.550626640999+0.612079560258j)*x_ref[0]**o + ((0.818255527425-0.729807720817j))*x_ref[0] + ((-0.156954173721+0.553410727606j))*x_ref[1]**o + ((0.356924129329-0.154933809349j))*x_ref[1]
        arg[(3, 0, 3)]=(0.640065569658+0.564733680748j)*x[0]**o + ((0.707986740943+0.397487383036j))*x[0] + ((-0.871648378117+0.173713457891j))*x[1]**o + ((0.194285596765+0.340774145451j))*x[1]
        ref[(3, 0, 3)]=(0.640065569658+0.564733680748j)*x_ref[0]**o + ((0.707986740943+0.397487383036j))*x_ref[0] + ((-0.871648378117+0.173713457891j))*x_ref[1]**o + ((0.194285596765+0.340774145451j))*x_ref[1]
        arg[(3, 1, 0)]=(0.844147387475+0.281145909811j)*x[0]**o + ((-0.178684356695+0.0380839549352j))*x[0] + ((0.889862280502-0.425145250219j))*x[1]**o + ((-0.216202087401-0.686613403482j))*x[1]
        ref[(3, 1, 0)]=(0.844147387475+0.281145909811j)*x_ref[0]**o + ((-0.178684356695+0.0380839549352j))*x_ref[0] + ((0.889862280502-0.425145250219j))*x_ref[1]**o + ((-0.216202087401-0.686613403482j))*x_ref[1]
        arg[(3, 1, 1)]=(0.135633306548-0.102053177426j)*x[0]**o + ((0.119548261577-0.625144364797j))*x[0] + ((-0.781925864889-0.336667691003j))*x[1]**o + ((-0.862573129986+0.621566333597j))*x[1]
        ref[(3, 1, 1)]=(0.135633306548-0.102053177426j)*x_ref[0]**o + ((0.119548261577-0.625144364797j))*x_ref[0] + ((-0.781925864889-0.336667691003j))*x_ref[1]**o + ((-0.862573129986+0.621566333597j))*x_ref[1]
        arg[(3, 1, 2)]=(0.376192528734+0.180960349198j)*x[0]**o + ((0.372659110897+0.0722548239856j))*x[0] + ((-0.473228478673-0.0909412872305j))*x[1]**o + ((0.67149673149-0.337178371018j))*x[1]
        ref[(3, 1, 2)]=(0.376192528734+0.180960349198j)*x_ref[0]**o + ((0.372659110897+0.0722548239856j))*x_ref[0] + ((-0.473228478673-0.0909412872305j))*x_ref[1]**o + ((0.67149673149-0.337178371018j))*x_ref[1]
        arg[(3, 1, 3)]=(-0.309702509937-0.42358480479j)*x[0]**o + ((0.210858242243-0.872287008424j))*x[0] + ((-0.564840354674-0.0915128657188j))*x[1]**o + ((0.612833045709-0.256408602248j))*x[1]
        ref[(3, 1, 3)]=(-0.309702509937-0.42358480479j)*x_ref[0]**o + ((0.210858242243-0.872287008424j))*x_ref[0] + ((-0.564840354674-0.0915128657188j))*x_ref[1]**o + ((0.612833045709-0.256408602248j))*x_ref[1]
        arg[(3, 2, 0)]=(-0.408459083088+0.732901172207j)*x[0]**o + ((-0.636708924786+0.818788789235j))*x[0] + ((-0.729715581015+0.900770467892j))*x[1]**o + ((-0.218118553177+0.210492115317j))*x[1]
        ref[(3, 2, 0)]=(-0.408459083088+0.732901172207j)*x_ref[0]**o + ((-0.636708924786+0.818788789235j))*x_ref[0] + ((-0.729715581015+0.900770467892j))*x_ref[1]**o + ((-0.218118553177+0.210492115317j))*x_ref[1]
        arg[(3, 2, 1)]=(-0.291120340467-0.0212374975103j)*x[0]**o + ((-0.303623642985-0.805392331934j))*x[0] + ((-0.60563243484+0.270256283509j))*x[1]**o + ((0.685157005246-0.261755521635j))*x[1]
        ref[(3, 2, 1)]=(-0.291120340467-0.0212374975103j)*x_ref[0]**o + ((-0.303623642985-0.805392331934j))*x_ref[0] + ((-0.60563243484+0.270256283509j))*x_ref[1]**o + ((0.685157005246-0.261755521635j))*x_ref[1]
        arg[(3, 2, 2)]=(0.700538908448+0.435573587778j)*x[0]**o + ((0.0524206971052-0.0047738847476j))*x[0] + ((-0.378804080588-0.79176675783j))*x[1]**o + ((-0.83423656794-0.581836164046j))*x[1]
        ref[(3, 2, 2)]=(0.700538908448+0.435573587778j)*x_ref[0]**o + ((0.0524206971052-0.0047738847476j))*x_ref[0] + ((-0.378804080588-0.79176675783j))*x_ref[1]**o + ((-0.83423656794-0.581836164046j))*x_ref[1]
        arg[(3, 2, 3)]=(-0.607478681128-0.269094354446j)*x[0]**o + ((-0.9660024012+0.765591865299j))*x[0] + ((0.0192863919674-0.238982609451j))*x[1]**o + ((0.343968667868+0.846919064574j))*x[1]
        ref[(3, 2, 3)]=(-0.607478681128-0.269094354446j)*x_ref[0]**o + ((-0.9660024012+0.765591865299j))*x_ref[0] + ((0.0192863919674-0.238982609451j))*x_ref[1]**o + ((0.343968667868+0.846919064574j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=(0.323525813523-0.799429165859j)*x[2]**o + ((-0.555366624917+0.174866001833j))*x[2]
            ref[(0, 0, 0)]+=(0.323525813523-0.799429165859j)*x_ref[2]**o + ((-0.555366624917+0.174866001833j))*x_ref[2]
            arg[(0, 0, 1)]+=(-0.227752367903+0.0956890921545j)*x[2]**o + ((0.723805245757-0.93536745366j))*x[2]
            ref[(0, 0, 1)]+=(-0.227752367903+0.0956890921545j)*x_ref[2]**o + ((0.723805245757-0.93536745366j))*x_ref[2]
            arg[(0, 0, 2)]+=(0.485767334436+0.513648036646j)*x[2]**o + ((-0.380925890975-0.540380011097j))*x[2]
            ref[(0, 0, 2)]+=(0.485767334436+0.513648036646j)*x_ref[2]**o + ((-0.380925890975-0.540380011097j))*x_ref[2]
            arg[(0, 0, 3)]+=(0.413926618082+0.411582370544j)*x[2]**o + ((0.337209097121-0.204563931871j))*x[2]
            ref[(0, 0, 3)]+=(0.413926618082+0.411582370544j)*x_ref[2]**o + ((0.337209097121-0.204563931871j))*x_ref[2]
            arg[(0, 1, 0)]+=(0.484809743078+0.837912931519j)*x[2]**o + ((-0.0149338137465+0.754894549943j))*x[2]
            ref[(0, 1, 0)]+=(0.484809743078+0.837912931519j)*x_ref[2]**o + ((-0.0149338137465+0.754894549943j))*x_ref[2]
            arg[(0, 1, 1)]+=(-0.719880576966-0.365629407597j)*x[2]**o + ((-0.113240566428-0.51992838222j))*x[2]
            ref[(0, 1, 1)]+=(-0.719880576966-0.365629407597j)*x_ref[2]**o + ((-0.113240566428-0.51992838222j))*x_ref[2]
            arg[(0, 1, 2)]+=(0.208505063999+0.696260815841j)*x[2]**o + ((-0.624237056508+0.560800899568j))*x[2]
            ref[(0, 1, 2)]+=(0.208505063999+0.696260815841j)*x_ref[2]**o + ((-0.624237056508+0.560800899568j))*x_ref[2]
            arg[(0, 1, 3)]+=(0.677565462926-0.954395877039j)*x[2]**o + ((0.374260795839+0.891833659358j))*x[2]
            ref[(0, 1, 3)]+=(0.677565462926-0.954395877039j)*x_ref[2]**o + ((0.374260795839+0.891833659358j))*x_ref[2]
            arg[(0, 2, 0)]+=(0.234230574993-0.159170884542j)*x[2]**o + ((-0.112296099586-0.386585272408j))*x[2]
            ref[(0, 2, 0)]+=(0.234230574993-0.159170884542j)*x_ref[2]**o + ((-0.112296099586-0.386585272408j))*x_ref[2]
            arg[(0, 2, 1)]+=(0.505949918212-0.566675700436j)*x[2]**o + ((-0.888470940877+0.604572220212j))*x[2]
            ref[(0, 2, 1)]+=(0.505949918212-0.566675700436j)*x_ref[2]**o + ((-0.888470940877+0.604572220212j))*x_ref[2]
            arg[(0, 2, 2)]+=(-0.374005483935+0.49522036261j)*x[2]**o + ((0.84700195189-0.82937496775j))*x[2]
            ref[(0, 2, 2)]+=(-0.374005483935+0.49522036261j)*x_ref[2]**o + ((0.84700195189-0.82937496775j))*x_ref[2]
            arg[(0, 2, 3)]+=(0.0694123159341+0.070540174464j)*x[2]**o + ((0.735707759521-0.380392951973j))*x[2]
            ref[(0, 2, 3)]+=(0.0694123159341+0.070540174464j)*x_ref[2]**o + ((0.735707759521-0.380392951973j))*x_ref[2]
            arg[(1, 0, 0)]+=(0.386065073663-0.997461285241j)*x[2]**o + ((0.199366700999+0.152228382407j))*x[2]
            ref[(1, 0, 0)]+=(0.386065073663-0.997461285241j)*x_ref[2]**o + ((0.199366700999+0.152228382407j))*x_ref[2]
            arg[(1, 0, 1)]+=(-0.95277140328+0.210379538389j)*x[2]**o + ((0.0229935664244+0.181548185506j))*x[2]
            ref[(1, 0, 1)]+=(-0.95277140328+0.210379538389j)*x_ref[2]**o + ((0.0229935664244+0.181548185506j))*x_ref[2]
            arg[(1, 0, 2)]+=(-0.0255678633931+0.768325396953j)*x[2]**o + ((0.165976097357+0.915748985333j))*x[2]
            ref[(1, 0, 2)]+=(-0.0255678633931+0.768325396953j)*x_ref[2]**o + ((0.165976097357+0.915748985333j))*x_ref[2]
            arg[(1, 0, 3)]+=(0.0577373867551-0.53463429932j)*x[2]**o + ((-0.256478244313+0.901649963533j))*x[2]
            ref[(1, 0, 3)]+=(0.0577373867551-0.53463429932j)*x_ref[2]**o + ((-0.256478244313+0.901649963533j))*x_ref[2]
            arg[(1, 1, 0)]+=(-0.00845529372876-0.639118670368j)*x[2]**o + ((-0.751336475469-0.237887252159j))*x[2]
            ref[(1, 1, 0)]+=(-0.00845529372876-0.639118670368j)*x_ref[2]**o + ((-0.751336475469-0.237887252159j))*x_ref[2]
            arg[(1, 1, 1)]+=(0.116958049777-0.100178822402j)*x[2]**o + ((-0.913331850242+0.0577229451408j))*x[2]
            ref[(1, 1, 1)]+=(0.116958049777-0.100178822402j)*x_ref[2]**o + ((-0.913331850242+0.0577229451408j))*x_ref[2]
            arg[(1, 1, 2)]+=(0.238094396196+0.705816879319j)*x[2]**o + ((-0.650928311631-0.18264364593j))*x[2]
            ref[(1, 1, 2)]+=(0.238094396196+0.705816879319j)*x_ref[2]**o + ((-0.650928311631-0.18264364593j))*x_ref[2]
            arg[(1, 1, 3)]+=(0.609406621244+0.172710189525j)*x[2]**o + ((0.225877435646+0.528380730548j))*x[2]
            ref[(1, 1, 3)]+=(0.609406621244+0.172710189525j)*x_ref[2]**o + ((0.225877435646+0.528380730548j))*x_ref[2]
            arg[(1, 2, 0)]+=(0.349747033334-0.923371223984j)*x[2]**o + ((-0.812211255472+0.91846837354j))*x[2]
            ref[(1, 2, 0)]+=(0.349747033334-0.923371223984j)*x_ref[2]**o + ((-0.812211255472+0.91846837354j))*x_ref[2]
            arg[(1, 2, 1)]+=(-0.0674518248255+0.763874129617j)*x[2]**o + ((0.143263579941+0.163103268022j))*x[2]
            ref[(1, 2, 1)]+=(-0.0674518248255+0.763874129617j)*x_ref[2]**o + ((0.143263579941+0.163103268022j))*x_ref[2]
            arg[(1, 2, 2)]+=(0.530825672548-0.844344046877j)*x[2]**o + ((0.454577440882+0.460809964038j))*x[2]
            ref[(1, 2, 2)]+=(0.530825672548-0.844344046877j)*x_ref[2]**o + ((0.454577440882+0.460809964038j))*x_ref[2]
            arg[(1, 2, 3)]+=(0.729104301866+0.423564244818j)*x[2]**o + ((0.722141289649-0.890627116975j))*x[2]
            ref[(1, 2, 3)]+=(0.729104301866+0.423564244818j)*x_ref[2]**o + ((0.722141289649-0.890627116975j))*x_ref[2]
            arg[(2, 0, 0)]+=(-0.323601263492+0.360860119983j)*x[2]**o + ((-0.976167701824-0.66917456325j))*x[2]
            ref[(2, 0, 0)]+=(-0.323601263492+0.360860119983j)*x_ref[2]**o + ((-0.976167701824-0.66917456325j))*x_ref[2]
            arg[(2, 0, 1)]+=(-0.205145123627-0.0252011956342j)*x[2]**o + ((-0.596128546274-0.892616075045j))*x[2]
            ref[(2, 0, 1)]+=(-0.205145123627-0.0252011956342j)*x_ref[2]**o + ((-0.596128546274-0.892616075045j))*x_ref[2]
            arg[(2, 0, 2)]+=(0.982440899018-0.216530859417j)*x[2]**o + ((0.320124611111-0.691986405437j))*x[2]
            ref[(2, 0, 2)]+=(0.982440899018-0.216530859417j)*x_ref[2]**o + ((0.320124611111-0.691986405437j))*x_ref[2]
            arg[(2, 0, 3)]+=(0.997249394551+0.153731346601j)*x[2]**o + ((-0.361643721793+0.443073387355j))*x[2]
            ref[(2, 0, 3)]+=(0.997249394551+0.153731346601j)*x_ref[2]**o + ((-0.361643721793+0.443073387355j))*x_ref[2]
            arg[(2, 1, 0)]+=(-0.752546490512+0.132009256214j)*x[2]**o + ((0.549814696254-0.460012580217j))*x[2]
            ref[(2, 1, 0)]+=(-0.752546490512+0.132009256214j)*x_ref[2]**o + ((0.549814696254-0.460012580217j))*x_ref[2]
            arg[(2, 1, 1)]+=(0.394019114924+0.919135916407j)*x[2]**o + ((-0.0999214892595+0.651470936353j))*x[2]
            ref[(2, 1, 1)]+=(0.394019114924+0.919135916407j)*x_ref[2]**o + ((-0.0999214892595+0.651470936353j))*x_ref[2]
            arg[(2, 1, 2)]+=(-0.885945378751+0.541111395371j)*x[2]**o + ((-0.848958414786+0.775712729559j))*x[2]
            ref[(2, 1, 2)]+=(-0.885945378751+0.541111395371j)*x_ref[2]**o + ((-0.848958414786+0.775712729559j))*x_ref[2]
            arg[(2, 1, 3)]+=(0.0973230706914+0.623332158055j)*x[2]**o + ((0.599136606034+0.299010290216j))*x[2]
            ref[(2, 1, 3)]+=(0.0973230706914+0.623332158055j)*x_ref[2]**o + ((0.599136606034+0.299010290216j))*x_ref[2]
            arg[(2, 2, 0)]+=(-0.93748038532+0.669586114946j)*x[2]**o + ((0.78638046193-0.473709649961j))*x[2]
            ref[(2, 2, 0)]+=(-0.93748038532+0.669586114946j)*x_ref[2]**o + ((0.78638046193-0.473709649961j))*x_ref[2]
            arg[(2, 2, 1)]+=(0.787738625815-0.988080512535j)*x[2]**o + ((-0.949150145422-0.979969586531j))*x[2]
            ref[(2, 2, 1)]+=(0.787738625815-0.988080512535j)*x_ref[2]**o + ((-0.949150145422-0.979969586531j))*x_ref[2]
            arg[(2, 2, 2)]+=(0.724846738489-0.755973001048j)*x[2]**o + ((0.954985402561-0.474813555876j))*x[2]
            ref[(2, 2, 2)]+=(0.724846738489-0.755973001048j)*x_ref[2]**o + ((0.954985402561-0.474813555876j))*x_ref[2]
            arg[(2, 2, 3)]+=(-0.358955708662+0.000367329898735j)*x[2]**o + ((0.574919120024+0.557760895363j))*x[2]
            ref[(2, 2, 3)]+=(-0.358955708662+0.000367329898735j)*x_ref[2]**o + ((0.574919120024+0.557760895363j))*x_ref[2]
            arg[(3, 0, 0)]+=(-0.239552007069-0.586160741441j)*x[2]**o + ((0.735881818272-0.0221780514978j))*x[2]
            ref[(3, 0, 0)]+=(-0.239552007069-0.586160741441j)*x_ref[2]**o + ((0.735881818272-0.0221780514978j))*x_ref[2]
            arg[(3, 0, 1)]+=(0.877893408155-0.880307350135j)*x[2]**o + ((0.899737718781-0.801982486102j))*x[2]
            ref[(3, 0, 1)]+=(0.877893408155-0.880307350135j)*x_ref[2]**o + ((0.899737718781-0.801982486102j))*x_ref[2]
            arg[(3, 0, 2)]+=(-0.706642046897-0.793391883091j)*x[2]**o + ((-0.111982532514+0.351695565319j))*x[2]
            ref[(3, 0, 2)]+=(-0.706642046897-0.793391883091j)*x_ref[2]**o + ((-0.111982532514+0.351695565319j))*x_ref[2]
            arg[(3, 0, 3)]+=(-0.907229585559-0.747938007417j)*x[2]**o + ((-0.888526032629+0.790627197785j))*x[2]
            ref[(3, 0, 3)]+=(-0.907229585559-0.747938007417j)*x_ref[2]**o + ((-0.888526032629+0.790627197785j))*x_ref[2]
            arg[(3, 1, 0)]+=(0.918769232639+0.457176200718j)*x[2]**o + ((0.358964975713-0.255366642255j))*x[2]
            ref[(3, 1, 0)]+=(0.918769232639+0.457176200718j)*x_ref[2]**o + ((0.358964975713-0.255366642255j))*x_ref[2]
            arg[(3, 1, 1)]+=(-0.485635871898-0.59637029011j)*x[2]**o + ((-0.843868285266+0.175970841014j))*x[2]
            ref[(3, 1, 1)]+=(-0.485635871898-0.59637029011j)*x_ref[2]**o + ((-0.843868285266+0.175970841014j))*x_ref[2]
            arg[(3, 1, 2)]+=(-0.298677096805-0.505359599996j)*x[2]**o + ((-0.591682814176-0.277318050715j))*x[2]
            ref[(3, 1, 2)]+=(-0.298677096805-0.505359599996j)*x_ref[2]**o + ((-0.591682814176-0.277318050715j))*x_ref[2]
            arg[(3, 1, 3)]+=(-0.629914142962+0.56919736875j)*x[2]**o + ((-0.217934274706-0.515418098037j))*x[2]
            ref[(3, 1, 3)]+=(-0.629914142962+0.56919736875j)*x_ref[2]**o + ((-0.217934274706-0.515418098037j))*x_ref[2]
            arg[(3, 2, 0)]+=(0.230258801399+0.966854653403j)*x[2]**o + ((0.216473622541+0.109987187147j))*x[2]
            ref[(3, 2, 0)]+=(0.230258801399+0.966854653403j)*x_ref[2]**o + ((0.216473622541+0.109987187147j))*x_ref[2]
            arg[(3, 2, 1)]+=(0.314932735819+0.659272522887j)*x[2]**o + ((-0.731446024252-0.250758289631j))*x[2]
            ref[(3, 2, 1)]+=(0.314932735819+0.659272522887j)*x_ref[2]**o + ((-0.731446024252-0.250758289631j))*x_ref[2]
            arg[(3, 2, 2)]+=(0.154615574275-0.157825263501j)*x[2]**o + ((-0.565888993503+0.104044822706j))*x[2]
            ref[(3, 2, 2)]+=(0.154615574275-0.157825263501j)*x_ref[2]**o + ((-0.565888993503+0.104044822706j))*x_ref[2]
            arg[(3, 2, 3)]+=(-0.635570896341+0.626701555414j)*x[2]**o + ((-0.696624896596+0.834193621221j))*x[2]
            ref[(3, 2, 3)]+=(-0.635570896341+0.626701555414j)*x_ref[2]**o + ((-0.696624896596+0.834193621221j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 2, 4),w)
        ref = Data(0,(3, 2, 2, 4),w_ref)
        arg[(0, 0, 0, 0)]=(-0.108033509255+0.222736337981j)*x[0]**o + ((0.40733491878-0.194553932909j))*x[0] + ((-0.375765683759-0.136235618117j))*x[1]**o + ((-0.430323135345+0.52195923128j))*x[1]
        ref[(0, 0, 0, 0)]=(-0.108033509255+0.222736337981j)*x_ref[0]**o + ((0.40733491878-0.194553932909j))*x_ref[0] + ((-0.375765683759-0.136235618117j))*x_ref[1]**o + ((-0.430323135345+0.52195923128j))*x_ref[1]
        arg[(0, 0, 0, 1)]=(-0.654024729486+0.000792763149839j)*x[0]**o + ((0.823957023983+0.300491573288j))*x[0] + ((0.324442277655-0.00191281668606j))*x[1]**o + ((-0.267345225934-0.64820381707j))*x[1]
        ref[(0, 0, 0, 1)]=(-0.654024729486+0.000792763149839j)*x_ref[0]**o + ((0.823957023983+0.300491573288j))*x_ref[0] + ((0.324442277655-0.00191281668606j))*x_ref[1]**o + ((-0.267345225934-0.64820381707j))*x_ref[1]
        arg[(0, 0, 0, 2)]=(0.227587396843+0.422308530844j)*x[0]**o + ((0.439362243145+0.505976436494j))*x[0] + ((-0.590119027122+0.11001831358j))*x[1]**o + ((0.296647509713+0.213198673938j))*x[1]
        ref[(0, 0, 0, 2)]=(0.227587396843+0.422308530844j)*x_ref[0]**o + ((0.439362243145+0.505976436494j))*x_ref[0] + ((-0.590119027122+0.11001831358j))*x_ref[1]**o + ((0.296647509713+0.213198673938j))*x_ref[1]
        arg[(0, 0, 0, 3)]=(0.167711403172-0.0652782106889j)*x[0]**o + ((-0.401950782455-0.695886334129j))*x[0] + ((0.708805627422+0.112056791375j))*x[1]**o + ((-0.894193579703+0.283876101516j))*x[1]
        ref[(0, 0, 0, 3)]=(0.167711403172-0.0652782106889j)*x_ref[0]**o + ((-0.401950782455-0.695886334129j))*x_ref[0] + ((0.708805627422+0.112056791375j))*x_ref[1]**o + ((-0.894193579703+0.283876101516j))*x_ref[1]
        arg[(0, 0, 1, 0)]=(0.980328708753+0.595520196826j)*x[0]**o + ((-0.859198482397+0.632248860177j))*x[0] + ((0.152726910136+0.81018885359j))*x[1]**o + ((0.183690155522+0.272800869047j))*x[1]
        ref[(0, 0, 1, 0)]=(0.980328708753+0.595520196826j)*x_ref[0]**o + ((-0.859198482397+0.632248860177j))*x_ref[0] + ((0.152726910136+0.81018885359j))*x_ref[1]**o + ((0.183690155522+0.272800869047j))*x_ref[1]
        arg[(0, 0, 1, 1)]=(0.188266104678+0.950119884274j)*x[0]**o + ((-0.561514639106-0.407306996879j))*x[0] + ((0.912785705074-0.837773527387j))*x[1]**o + ((0.715071818654-0.443553962151j))*x[1]
        ref[(0, 0, 1, 1)]=(0.188266104678+0.950119884274j)*x_ref[0]**o + ((-0.561514639106-0.407306996879j))*x_ref[0] + ((0.912785705074-0.837773527387j))*x_ref[1]**o + ((0.715071818654-0.443553962151j))*x_ref[1]
        arg[(0, 0, 1, 2)]=(-0.0535662285413+0.460292973746j)*x[0]**o + ((0.448681932514+0.973694791463j))*x[0] + ((-0.0238124015565+0.600251948944j))*x[1]**o + ((0.869394044225+0.883216162322j))*x[1]
        ref[(0, 0, 1, 2)]=(-0.0535662285413+0.460292973746j)*x_ref[0]**o + ((0.448681932514+0.973694791463j))*x_ref[0] + ((-0.0238124015565+0.600251948944j))*x_ref[1]**o + ((0.869394044225+0.883216162322j))*x_ref[1]
        arg[(0, 0, 1, 3)]=(-0.821060167274-0.275666942666j)*x[0]**o + ((-0.282866176115+0.958549273667j))*x[0] + ((-0.533946970594+0.405521502508j))*x[1]**o + ((-0.0115029920202-0.84264891188j))*x[1]
        ref[(0, 0, 1, 3)]=(-0.821060167274-0.275666942666j)*x_ref[0]**o + ((-0.282866176115+0.958549273667j))*x_ref[0] + ((-0.533946970594+0.405521502508j))*x_ref[1]**o + ((-0.0115029920202-0.84264891188j))*x_ref[1]
        arg[(0, 1, 0, 0)]=(0.709231928742+0.49835399504j)*x[0]**o + ((0.952440957594+0.936480806256j))*x[0] + ((0.745869376088-0.703748223044j))*x[1]**o + ((-0.266116470489-0.377567767116j))*x[1]
        ref[(0, 1, 0, 0)]=(0.709231928742+0.49835399504j)*x_ref[0]**o + ((0.952440957594+0.936480806256j))*x_ref[0] + ((0.745869376088-0.703748223044j))*x_ref[1]**o + ((-0.266116470489-0.377567767116j))*x_ref[1]
        arg[(0, 1, 0, 1)]=(-0.309799436276+0.299653969132j)*x[0]**o + ((-0.550558120724-0.409310938729j))*x[0] + ((-0.561475677099-0.154258814392j))*x[1]**o + ((-0.456587989302-0.811859885844j))*x[1]
        ref[(0, 1, 0, 1)]=(-0.309799436276+0.299653969132j)*x_ref[0]**o + ((-0.550558120724-0.409310938729j))*x_ref[0] + ((-0.561475677099-0.154258814392j))*x_ref[1]**o + ((-0.456587989302-0.811859885844j))*x_ref[1]
        arg[(0, 1, 0, 2)]=(-0.332752969716+0.349414164333j)*x[0]**o + ((-0.67401696439-0.793400988692j))*x[0] + ((-0.720391710567+0.796406535761j))*x[1]**o + ((0.939381276416-0.0118913651507j))*x[1]
        ref[(0, 1, 0, 2)]=(-0.332752969716+0.349414164333j)*x_ref[0]**o + ((-0.67401696439-0.793400988692j))*x_ref[0] + ((-0.720391710567+0.796406535761j))*x_ref[1]**o + ((0.939381276416-0.0118913651507j))*x_ref[1]
        arg[(0, 1, 0, 3)]=(0.00177871733417+0.675489264194j)*x[0]**o + ((0.658337588417-0.913114843125j))*x[0] + ((-0.183552569229-0.71085003948j))*x[1]**o + ((0.569911101009-0.00648024026829j))*x[1]
        ref[(0, 1, 0, 3)]=(0.00177871733417+0.675489264194j)*x_ref[0]**o + ((0.658337588417-0.913114843125j))*x_ref[0] + ((-0.183552569229-0.71085003948j))*x_ref[1]**o + ((0.569911101009-0.00648024026829j))*x_ref[1]
        arg[(0, 1, 1, 0)]=(-0.330270963513-0.360599215374j)*x[0]**o + ((-0.841314893091+0.584956522075j))*x[0] + ((-0.520691003819+0.1675572849j))*x[1]**o + ((0.845253862782+0.685523775973j))*x[1]
        ref[(0, 1, 1, 0)]=(-0.330270963513-0.360599215374j)*x_ref[0]**o + ((-0.841314893091+0.584956522075j))*x_ref[0] + ((-0.520691003819+0.1675572849j))*x_ref[1]**o + ((0.845253862782+0.685523775973j))*x_ref[1]
        arg[(0, 1, 1, 1)]=(-0.474681819703-0.0217805214318j)*x[0]**o + ((0.13569030998-0.109926345962j))*x[0] + ((0.809567226052+0.0826046642512j))*x[1]**o + ((-0.14549392878-0.378650976952j))*x[1]
        ref[(0, 1, 1, 1)]=(-0.474681819703-0.0217805214318j)*x_ref[0]**o + ((0.13569030998-0.109926345962j))*x_ref[0] + ((0.809567226052+0.0826046642512j))*x_ref[1]**o + ((-0.14549392878-0.378650976952j))*x_ref[1]
        arg[(0, 1, 1, 2)]=(0.631215770571-0.0352779694431j)*x[0]**o + ((0.724502921342-0.185635395734j))*x[0] + ((-0.984002240729+0.567886875324j))*x[1]**o + ((-0.0486002008837+0.255483449498j))*x[1]
        ref[(0, 1, 1, 2)]=(0.631215770571-0.0352779694431j)*x_ref[0]**o + ((0.724502921342-0.185635395734j))*x_ref[0] + ((-0.984002240729+0.567886875324j))*x_ref[1]**o + ((-0.0486002008837+0.255483449498j))*x_ref[1]
        arg[(0, 1, 1, 3)]=(0.50445729316+0.848477354825j)*x[0]**o + ((0.0720642369462+0.96384899285j))*x[0] + ((-0.988152134438-0.164926839992j))*x[1]**o + ((0.809815254866+0.494187355261j))*x[1]
        ref[(0, 1, 1, 3)]=(0.50445729316+0.848477354825j)*x_ref[0]**o + ((0.0720642369462+0.96384899285j))*x_ref[0] + ((-0.988152134438-0.164926839992j))*x_ref[1]**o + ((0.809815254866+0.494187355261j))*x_ref[1]
        arg[(1, 0, 0, 0)]=(-0.75788631951+0.162215986047j)*x[0]**o + ((-0.0147387344888+0.0574125727859j))*x[0] + ((0.633624548308-0.926852744731j))*x[1]**o + ((-0.314643012298-0.384852254428j))*x[1]
        ref[(1, 0, 0, 0)]=(-0.75788631951+0.162215986047j)*x_ref[0]**o + ((-0.0147387344888+0.0574125727859j))*x_ref[0] + ((0.633624548308-0.926852744731j))*x_ref[1]**o + ((-0.314643012298-0.384852254428j))*x_ref[1]
        arg[(1, 0, 0, 1)]=(-0.268413514362-0.104053074568j)*x[0]**o + ((-0.738656183292+0.291384530689j))*x[0] + ((0.290144634631+0.727445863021j))*x[1]**o + ((0.987490117765+0.630890810783j))*x[1]
        ref[(1, 0, 0, 1)]=(-0.268413514362-0.104053074568j)*x_ref[0]**o + ((-0.738656183292+0.291384530689j))*x_ref[0] + ((0.290144634631+0.727445863021j))*x_ref[1]**o + ((0.987490117765+0.630890810783j))*x_ref[1]
        arg[(1, 0, 0, 2)]=(-0.127221536975+0.0949332486695j)*x[0]**o + ((-0.0594910750919+0.240055541753j))*x[0] + ((0.240023729647-0.515296597672j))*x[1]**o + ((-0.177027863555+0.327143662096j))*x[1]
        ref[(1, 0, 0, 2)]=(-0.127221536975+0.0949332486695j)*x_ref[0]**o + ((-0.0594910750919+0.240055541753j))*x_ref[0] + ((0.240023729647-0.515296597672j))*x_ref[1]**o + ((-0.177027863555+0.327143662096j))*x_ref[1]
        arg[(1, 0, 0, 3)]=(-0.485732276951-0.00101763807362j)*x[0]**o + ((0.882170408791+0.446542951845j))*x[0] + ((0.0189629829322+0.669363042854j))*x[1]**o + ((0.831010942292+0.221569140464j))*x[1]
        ref[(1, 0, 0, 3)]=(-0.485732276951-0.00101763807362j)*x_ref[0]**o + ((0.882170408791+0.446542951845j))*x_ref[0] + ((0.0189629829322+0.669363042854j))*x_ref[1]**o + ((0.831010942292+0.221569140464j))*x_ref[1]
        arg[(1, 0, 1, 0)]=(-0.736616117632+0.401806885437j)*x[0]**o + ((-0.999071889233-0.0575317089333j))*x[0] + ((0.582331699353-0.353968709849j))*x[1]**o + ((-0.796460646653-0.789113303236j))*x[1]
        ref[(1, 0, 1, 0)]=(-0.736616117632+0.401806885437j)*x_ref[0]**o + ((-0.999071889233-0.0575317089333j))*x_ref[0] + ((0.582331699353-0.353968709849j))*x_ref[1]**o + ((-0.796460646653-0.789113303236j))*x_ref[1]
        arg[(1, 0, 1, 1)]=(-0.097531669852+0.177206608958j)*x[0]**o + ((0.0874848003616+0.0392519843742j))*x[0] + ((-0.165623224697+0.840610443329j))*x[1]**o + ((-0.977430982984-0.96515460592j))*x[1]
        ref[(1, 0, 1, 1)]=(-0.097531669852+0.177206608958j)*x_ref[0]**o + ((0.0874848003616+0.0392519843742j))*x_ref[0] + ((-0.165623224697+0.840610443329j))*x_ref[1]**o + ((-0.977430982984-0.96515460592j))*x_ref[1]
        arg[(1, 0, 1, 2)]=(-0.0621066076709+0.535511729577j)*x[0]**o + ((-0.0719717418682-0.969821490539j))*x[0] + ((-0.0153733934423+0.691135546995j))*x[1]**o + ((-0.359990598278-0.506883815779j))*x[1]
        ref[(1, 0, 1, 2)]=(-0.0621066076709+0.535511729577j)*x_ref[0]**o + ((-0.0719717418682-0.969821490539j))*x_ref[0] + ((-0.0153733934423+0.691135546995j))*x_ref[1]**o + ((-0.359990598278-0.506883815779j))*x_ref[1]
        arg[(1, 0, 1, 3)]=(-0.987331373159+0.520798705301j)*x[0]**o + ((0.971874557655+0.654150976457j))*x[0] + ((-0.706596858767-0.517997542447j))*x[1]**o + ((0.245756414944-0.555532545626j))*x[1]
        ref[(1, 0, 1, 3)]=(-0.987331373159+0.520798705301j)*x_ref[0]**o + ((0.971874557655+0.654150976457j))*x_ref[0] + ((-0.706596858767-0.517997542447j))*x_ref[1]**o + ((0.245756414944-0.555532545626j))*x_ref[1]
        arg[(1, 1, 0, 0)]=(0.861814134198-0.699877177252j)*x[0]**o + ((-0.160479607162-0.0925723781927j))*x[0] + ((-0.0487439143904-0.00977249745726j))*x[1]**o + ((0.562624010704+0.496845923759j))*x[1]
        ref[(1, 1, 0, 0)]=(0.861814134198-0.699877177252j)*x_ref[0]**o + ((-0.160479607162-0.0925723781927j))*x_ref[0] + ((-0.0487439143904-0.00977249745726j))*x_ref[1]**o + ((0.562624010704+0.496845923759j))*x_ref[1]
        arg[(1, 1, 0, 1)]=(-0.0853634137243-0.254347378505j)*x[0]**o + ((-0.513464178281-0.20636458306j))*x[0] + ((0.135505440602+0.255359685858j))*x[1]**o + ((-0.653855445245-0.883645739246j))*x[1]
        ref[(1, 1, 0, 1)]=(-0.0853634137243-0.254347378505j)*x_ref[0]**o + ((-0.513464178281-0.20636458306j))*x_ref[0] + ((0.135505440602+0.255359685858j))*x_ref[1]**o + ((-0.653855445245-0.883645739246j))*x_ref[1]
        arg[(1, 1, 0, 2)]=(-0.86269811558+0.877277330269j)*x[0]**o + ((-0.278208072569-0.202696792498j))*x[0] + ((0.161920622924+0.256705246646j))*x[1]**o + ((-0.917453806826-0.291880717067j))*x[1]
        ref[(1, 1, 0, 2)]=(-0.86269811558+0.877277330269j)*x_ref[0]**o + ((-0.278208072569-0.202696792498j))*x_ref[0] + ((0.161920622924+0.256705246646j))*x_ref[1]**o + ((-0.917453806826-0.291880717067j))*x_ref[1]
        arg[(1, 1, 0, 3)]=(0.895935389395+0.485959072921j)*x[0]**o + ((-0.480698868053-0.74873195493j))*x[0] + ((0.854996650496-0.996851570864j))*x[1]**o + ((-0.69274527193-0.110782922191j))*x[1]
        ref[(1, 1, 0, 3)]=(0.895935389395+0.485959072921j)*x_ref[0]**o + ((-0.480698868053-0.74873195493j))*x_ref[0] + ((0.854996650496-0.996851570864j))*x_ref[1]**o + ((-0.69274527193-0.110782922191j))*x_ref[1]
        arg[(1, 1, 1, 0)]=(-0.280485670534-0.683287796795j)*x[0]**o + ((0.36092349472+0.825194896954j))*x[0] + ((0.54094617021-0.238405274345j))*x[1]**o + ((0.515197758249-0.199815297821j))*x[1]
        ref[(1, 1, 1, 0)]=(-0.280485670534-0.683287796795j)*x_ref[0]**o + ((0.36092349472+0.825194896954j))*x_ref[0] + ((0.54094617021-0.238405274345j))*x_ref[1]**o + ((0.515197758249-0.199815297821j))*x_ref[1]
        arg[(1, 1, 1, 1)]=(0.0214300018284+0.369557938634j)*x[0]**o + ((-0.422766140631-0.832356406162j))*x[0] + ((-0.844084243512+0.412832528042j))*x[1]**o + ((-0.83111298631-0.0124525387054j))*x[1]
        ref[(1, 1, 1, 1)]=(0.0214300018284+0.369557938634j)*x_ref[0]**o + ((-0.422766140631-0.832356406162j))*x_ref[0] + ((-0.844084243512+0.412832528042j))*x_ref[1]**o + ((-0.83111298631-0.0124525387054j))*x_ref[1]
        arg[(1, 1, 1, 2)]=(0.838443740333+0.575086785001j)*x[0]**o + ((0.0242017464409-0.75354121843j))*x[0] + ((-0.474842294925-0.297636260901j))*x[1]**o + ((0.450940971644+0.975255630095j))*x[1]
        ref[(1, 1, 1, 2)]=(0.838443740333+0.575086785001j)*x_ref[0]**o + ((0.0242017464409-0.75354121843j))*x_ref[0] + ((-0.474842294925-0.297636260901j))*x_ref[1]**o + ((0.450940971644+0.975255630095j))*x_ref[1]
        arg[(1, 1, 1, 3)]=(-0.0763745716982-0.0165348061206j)*x[0]**o + ((0.482482677312-0.87970797696j))*x[0] + ((0.89711733762+0.974806765326j))*x[1]**o + ((-0.639184412698-0.219947474138j))*x[1]
        ref[(1, 1, 1, 3)]=(-0.0763745716982-0.0165348061206j)*x_ref[0]**o + ((0.482482677312-0.87970797696j))*x_ref[0] + ((0.89711733762+0.974806765326j))*x_ref[1]**o + ((-0.639184412698-0.219947474138j))*x_ref[1]
        arg[(2, 0, 0, 0)]=(0.612143307142-0.594743814916j)*x[0]**o + ((0.0218621669868-0.0412140117961j))*x[0] + ((0.0669758270052-0.0540787106087j))*x[1]**o + ((-0.130880621895-0.602331078541j))*x[1]
        ref[(2, 0, 0, 0)]=(0.612143307142-0.594743814916j)*x_ref[0]**o + ((0.0218621669868-0.0412140117961j))*x_ref[0] + ((0.0669758270052-0.0540787106087j))*x_ref[1]**o + ((-0.130880621895-0.602331078541j))*x_ref[1]
        arg[(2, 0, 0, 1)]=(-0.0278239967655-0.695289149383j)*x[0]**o + ((0.764860988377-0.560203563428j))*x[0] + ((0.142622315385-0.58540709667j))*x[1]**o + ((0.250609188658+0.235449434524j))*x[1]
        ref[(2, 0, 0, 1)]=(-0.0278239967655-0.695289149383j)*x_ref[0]**o + ((0.764860988377-0.560203563428j))*x_ref[0] + ((0.142622315385-0.58540709667j))*x_ref[1]**o + ((0.250609188658+0.235449434524j))*x_ref[1]
        arg[(2, 0, 0, 2)]=(0.208780534805-0.275653730956j)*x[0]**o + ((0.596629172991+0.950099364473j))*x[0] + ((0.906290739152-0.359107555787j))*x[1]**o + ((-0.812768914553+0.380506620277j))*x[1]
        ref[(2, 0, 0, 2)]=(0.208780534805-0.275653730956j)*x_ref[0]**o + ((0.596629172991+0.950099364473j))*x_ref[0] + ((0.906290739152-0.359107555787j))*x_ref[1]**o + ((-0.812768914553+0.380506620277j))*x_ref[1]
        arg[(2, 0, 0, 3)]=(0.169960953477+0.90545484719j)*x[0]**o + ((-0.548557219675+0.964423768155j))*x[0] + ((-0.64157467188+0.512022895185j))*x[1]**o + ((0.741792644957+0.959279734861j))*x[1]
        ref[(2, 0, 0, 3)]=(0.169960953477+0.90545484719j)*x_ref[0]**o + ((-0.548557219675+0.964423768155j))*x_ref[0] + ((-0.64157467188+0.512022895185j))*x_ref[1]**o + ((0.741792644957+0.959279734861j))*x_ref[1]
        arg[(2, 0, 1, 0)]=(0.9613233892+0.24007807697j)*x[0]**o + ((-0.587591636204-0.740087078312j))*x[0] + ((-0.740736111428+0.0940521949054j))*x[1]**o + ((-0.933205091117+0.988815191734j))*x[1]
        ref[(2, 0, 1, 0)]=(0.9613233892+0.24007807697j)*x_ref[0]**o + ((-0.587591636204-0.740087078312j))*x_ref[0] + ((-0.740736111428+0.0940521949054j))*x_ref[1]**o + ((-0.933205091117+0.988815191734j))*x_ref[1]
        arg[(2, 0, 1, 1)]=(0.238148101213-0.676188006401j)*x[0]**o + ((-0.0575685661956+0.212548587115j))*x[0] + ((0.674524947872-0.982766695363j))*x[1]**o + ((0.582858309592+0.441105274353j))*x[1]
        ref[(2, 0, 1, 1)]=(0.238148101213-0.676188006401j)*x_ref[0]**o + ((-0.0575685661956+0.212548587115j))*x_ref[0] + ((0.674524947872-0.982766695363j))*x_ref[1]**o + ((0.582858309592+0.441105274353j))*x_ref[1]
        arg[(2, 0, 1, 2)]=(-0.741120718133-0.346959156755j)*x[0]**o + ((-0.046060072665+0.090066184194j))*x[0] + ((-0.840016868097-0.874215551301j))*x[1]**o + ((-0.0913169291523+0.0384885759912j))*x[1]
        ref[(2, 0, 1, 2)]=(-0.741120718133-0.346959156755j)*x_ref[0]**o + ((-0.046060072665+0.090066184194j))*x_ref[0] + ((-0.840016868097-0.874215551301j))*x_ref[1]**o + ((-0.0913169291523+0.0384885759912j))*x_ref[1]
        arg[(2, 0, 1, 3)]=(-0.760366426357+0.391537720411j)*x[0]**o + ((0.810029278198-0.488855312722j))*x[0] + ((-0.534709012791+0.184402326661j))*x[1]**o + ((-0.675845036414-0.0135629109035j))*x[1]
        ref[(2, 0, 1, 3)]=(-0.760366426357+0.391537720411j)*x_ref[0]**o + ((0.810029278198-0.488855312722j))*x_ref[0] + ((-0.534709012791+0.184402326661j))*x_ref[1]**o + ((-0.675845036414-0.0135629109035j))*x_ref[1]
        arg[(2, 1, 0, 0)]=(0.215453372966-0.153793314027j)*x[0]**o + ((-0.435663922707+0.349373303407j))*x[0] + ((-0.0161112195742-0.602879997341j))*x[1]**o + ((-0.00390945941373+0.165968940382j))*x[1]
        ref[(2, 1, 0, 0)]=(0.215453372966-0.153793314027j)*x_ref[0]**o + ((-0.435663922707+0.349373303407j))*x_ref[0] + ((-0.0161112195742-0.602879997341j))*x_ref[1]**o + ((-0.00390945941373+0.165968940382j))*x_ref[1]
        arg[(2, 1, 0, 1)]=(0.250734126498+0.888361779074j)*x[0]**o + ((-0.847015925807+0.975989675706j))*x[0] + ((-0.16514771892+0.797771629316j))*x[1]**o + ((-0.428097610147-0.183378450176j))*x[1]
        ref[(2, 1, 0, 1)]=(0.250734126498+0.888361779074j)*x_ref[0]**o + ((-0.847015925807+0.975989675706j))*x_ref[0] + ((-0.16514771892+0.797771629316j))*x_ref[1]**o + ((-0.428097610147-0.183378450176j))*x_ref[1]
        arg[(2, 1, 0, 2)]=(-0.0940863861672-0.574313788957j)*x[0]**o + ((0.544712467254+0.321196153478j))*x[0] + ((0.975815969097-0.634213611638j))*x[1]**o + ((-0.224517976645+0.137536431941j))*x[1]
        ref[(2, 1, 0, 2)]=(-0.0940863861672-0.574313788957j)*x_ref[0]**o + ((0.544712467254+0.321196153478j))*x_ref[0] + ((0.975815969097-0.634213611638j))*x_ref[1]**o + ((-0.224517976645+0.137536431941j))*x_ref[1]
        arg[(2, 1, 0, 3)]=(0.362290683986-0.234635109148j)*x[0]**o + ((-0.828538125183+0.201300977494j))*x[0] + ((-0.926781949928+0.202440596458j))*x[1]**o + ((-0.647156297222+0.187420151685j))*x[1]
        ref[(2, 1, 0, 3)]=(0.362290683986-0.234635109148j)*x_ref[0]**o + ((-0.828538125183+0.201300977494j))*x_ref[0] + ((-0.926781949928+0.202440596458j))*x_ref[1]**o + ((-0.647156297222+0.187420151685j))*x_ref[1]
        arg[(2, 1, 1, 0)]=(0.495340766886+0.626951860058j)*x[0]**o + ((-0.506074795468+0.153558208021j))*x[0] + ((-0.966535593918+0.0540135877131j))*x[1]**o + ((0.826773651457+0.97759971722j))*x[1]
        ref[(2, 1, 1, 0)]=(0.495340766886+0.626951860058j)*x_ref[0]**o + ((-0.506074795468+0.153558208021j))*x_ref[0] + ((-0.966535593918+0.0540135877131j))*x_ref[1]**o + ((0.826773651457+0.97759971722j))*x_ref[1]
        arg[(2, 1, 1, 1)]=(-0.151521487251-0.824400462477j)*x[0]**o + ((0.641261563814-0.328952545412j))*x[0] + ((-0.17181033104-0.806995522889j))*x[1]**o + ((-0.164396506296+0.773403849498j))*x[1]
        ref[(2, 1, 1, 1)]=(-0.151521487251-0.824400462477j)*x_ref[0]**o + ((0.641261563814-0.328952545412j))*x_ref[0] + ((-0.17181033104-0.806995522889j))*x_ref[1]**o + ((-0.164396506296+0.773403849498j))*x_ref[1]
        arg[(2, 1, 1, 2)]=(0.202775300479-0.814334206182j)*x[0]**o + ((0.906082289585+0.905688014495j))*x[0] + ((-0.673299397369+0.175335883877j))*x[1]**o + ((0.0419810597039-0.265644522059j))*x[1]
        ref[(2, 1, 1, 2)]=(0.202775300479-0.814334206182j)*x_ref[0]**o + ((0.906082289585+0.905688014495j))*x_ref[0] + ((-0.673299397369+0.175335883877j))*x_ref[1]**o + ((0.0419810597039-0.265644522059j))*x_ref[1]
        arg[(2, 1, 1, 3)]=(0.890502485921+0.46746433042j)*x[0]**o + ((0.815119971271-0.591649079425j))*x[0] + ((-0.310604231994+0.288733925952j))*x[1]**o + ((-0.277983274411+0.418332177869j))*x[1]
        ref[(2, 1, 1, 3)]=(0.890502485921+0.46746433042j)*x_ref[0]**o + ((0.815119971271-0.591649079425j))*x_ref[0] + ((-0.310604231994+0.288733925952j))*x_ref[1]**o + ((-0.277983274411+0.418332177869j))*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=(-0.016280022779-0.673207891316j)*x[2]**o + ((-0.889104026756+0.969019264222j))*x[2]
            ref[(0, 0, 0, 0)]+=(-0.016280022779-0.673207891316j)*x_ref[2]**o + ((-0.889104026756+0.969019264222j))*x_ref[2]
            arg[(0, 0, 0, 1)]+=(-0.447228359471+0.711075034512j)*x[2]**o + ((-0.939677187238+0.0855739512766j))*x[2]
            ref[(0, 0, 0, 1)]+=(-0.447228359471+0.711075034512j)*x_ref[2]**o + ((-0.939677187238+0.0855739512766j))*x_ref[2]
            arg[(0, 0, 0, 2)]+=(-0.151498343633-0.713041892462j)*x[2]**o + ((0.696087000314-0.81193613047j))*x[2]
            ref[(0, 0, 0, 2)]+=(-0.151498343633-0.713041892462j)*x_ref[2]**o + ((0.696087000314-0.81193613047j))*x_ref[2]
            arg[(0, 0, 0, 3)]+=(0.136003139583-0.0764675401136j)*x[2]**o + ((0.438862624938-0.569314589447j))*x[2]
            ref[(0, 0, 0, 3)]+=(0.136003139583-0.0764675401136j)*x_ref[2]**o + ((0.438862624938-0.569314589447j))*x_ref[2]
            arg[(0, 0, 1, 0)]+=(0.180651168652+0.841897822263j)*x[2]**o + ((0.0977594969547-0.0311119784107j))*x[2]
            ref[(0, 0, 1, 0)]+=(0.180651168652+0.841897822263j)*x_ref[2]**o + ((0.0977594969547-0.0311119784107j))*x_ref[2]
            arg[(0, 0, 1, 1)]+=(-0.659728322072-0.619132707374j)*x[2]**o + ((-0.442836798385-0.82082336708j))*x[2]
            ref[(0, 0, 1, 1)]+=(-0.659728322072-0.619132707374j)*x_ref[2]**o + ((-0.442836798385-0.82082336708j))*x_ref[2]
            arg[(0, 0, 1, 2)]+=(-0.240588840361-0.575194211014j)*x[2]**o + ((0.0972129246876+0.273172164869j))*x[2]
            ref[(0, 0, 1, 2)]+=(-0.240588840361-0.575194211014j)*x_ref[2]**o + ((0.0972129246876+0.273172164869j))*x_ref[2]
            arg[(0, 0, 1, 3)]+=(-0.99220696933+0.66758752683j)*x[2]**o + ((-0.374672484592+0.419940237627j))*x[2]
            ref[(0, 0, 1, 3)]+=(-0.99220696933+0.66758752683j)*x_ref[2]**o + ((-0.374672484592+0.419940237627j))*x_ref[2]
            arg[(0, 1, 0, 0)]+=(-0.152679077619+0.447946313024j)*x[2]**o + ((-0.378219005338+0.947147583595j))*x[2]
            ref[(0, 1, 0, 0)]+=(-0.152679077619+0.447946313024j)*x_ref[2]**o + ((-0.378219005338+0.947147583595j))*x_ref[2]
            arg[(0, 1, 0, 1)]+=(0.306978310968-0.950173861474j)*x[2]**o + ((-0.225970513278+0.399231735858j))*x[2]
            ref[(0, 1, 0, 1)]+=(0.306978310968-0.950173861474j)*x_ref[2]**o + ((-0.225970513278+0.399231735858j))*x_ref[2]
            arg[(0, 1, 0, 2)]+=(0.439495770979+0.924190226876j)*x[2]**o + ((0.905207646531-0.725277426177j))*x[2]
            ref[(0, 1, 0, 2)]+=(0.439495770979+0.924190226876j)*x_ref[2]**o + ((0.905207646531-0.725277426177j))*x_ref[2]
            arg[(0, 1, 0, 3)]+=(-0.0974645820189-0.431094247536j)*x[2]**o + ((0.885358736851-0.42803167868j))*x[2]
            ref[(0, 1, 0, 3)]+=(-0.0974645820189-0.431094247536j)*x_ref[2]**o + ((0.885358736851-0.42803167868j))*x_ref[2]
            arg[(0, 1, 1, 0)]+=(-0.0413385705155+0.620518968469j)*x[2]**o + ((-0.491637756699-0.625374416797j))*x[2]
            ref[(0, 1, 1, 0)]+=(-0.0413385705155+0.620518968469j)*x_ref[2]**o + ((-0.491637756699-0.625374416797j))*x_ref[2]
            arg[(0, 1, 1, 1)]+=(0.106058791677+0.99725740164j)*x[2]**o + ((0.143486411027-0.483136217316j))*x[2]
            ref[(0, 1, 1, 1)]+=(0.106058791677+0.99725740164j)*x_ref[2]**o + ((0.143486411027-0.483136217316j))*x_ref[2]
            arg[(0, 1, 1, 2)]+=(0.402369908264+0.419535092839j)*x[2]**o + ((-0.0741717263567+0.357683215014j))*x[2]
            ref[(0, 1, 1, 2)]+=(0.402369908264+0.419535092839j)*x_ref[2]**o + ((-0.0741717263567+0.357683215014j))*x_ref[2]
            arg[(0, 1, 1, 3)]+=(0.747547105421+0.85620551509j)*x[2]**o + ((-0.854705518901-0.977996665604j))*x[2]
            ref[(0, 1, 1, 3)]+=(0.747547105421+0.85620551509j)*x_ref[2]**o + ((-0.854705518901-0.977996665604j))*x_ref[2]
            arg[(1, 0, 0, 0)]+=(0.106188831129-0.485099566488j)*x[2]**o + ((-0.446849606699+0.589522788173j))*x[2]
            ref[(1, 0, 0, 0)]+=(0.106188831129-0.485099566488j)*x_ref[2]**o + ((-0.446849606699+0.589522788173j))*x_ref[2]
            arg[(1, 0, 0, 1)]+=(0.854687270134-0.26454745832j)*x[2]**o + ((0.658620239252+0.110744935805j))*x[2]
            ref[(1, 0, 0, 1)]+=(0.854687270134-0.26454745832j)*x_ref[2]**o + ((0.658620239252+0.110744935805j))*x_ref[2]
            arg[(1, 0, 0, 2)]+=(0.217163649684-0.590757113928j)*x[2]**o + ((-0.609634371406-0.843219995851j))*x[2]
            ref[(1, 0, 0, 2)]+=(0.217163649684-0.590757113928j)*x_ref[2]**o + ((-0.609634371406-0.843219995851j))*x_ref[2]
            arg[(1, 0, 0, 3)]+=(0.623899937079-0.244016424106j)*x[2]**o + ((-0.143276817393+0.42766840593j))*x[2]
            ref[(1, 0, 0, 3)]+=(0.623899937079-0.244016424106j)*x_ref[2]**o + ((-0.143276817393+0.42766840593j))*x_ref[2]
            arg[(1, 0, 1, 0)]+=(0.903378883165+0.620471745133j)*x[2]**o + ((-0.915899737082-0.0160572039224j))*x[2]
            ref[(1, 0, 1, 0)]+=(0.903378883165+0.620471745133j)*x_ref[2]**o + ((-0.915899737082-0.0160572039224j))*x_ref[2]
            arg[(1, 0, 1, 1)]+=(-0.275007742279+0.763004983145j)*x[2]**o + ((0.699558209694-0.294787582652j))*x[2]
            ref[(1, 0, 1, 1)]+=(-0.275007742279+0.763004983145j)*x_ref[2]**o + ((0.699558209694-0.294787582652j))*x_ref[2]
            arg[(1, 0, 1, 2)]+=(0.448714103039+0.784578655161j)*x[2]**o + ((-0.858970361247-0.117172718568j))*x[2]
            ref[(1, 0, 1, 2)]+=(0.448714103039+0.784578655161j)*x_ref[2]**o + ((-0.858970361247-0.117172718568j))*x_ref[2]
            arg[(1, 0, 1, 3)]+=(-0.824359431652+0.415834349138j)*x[2]**o + ((0.0638617834207-0.234453179975j))*x[2]
            ref[(1, 0, 1, 3)]+=(-0.824359431652+0.415834349138j)*x_ref[2]**o + ((0.0638617834207-0.234453179975j))*x_ref[2]
            arg[(1, 1, 0, 0)]+=(0.639361198862+0.055626564268j)*x[2]**o + ((0.295635101148+0.469053098611j))*x[2]
            ref[(1, 1, 0, 0)]+=(0.639361198862+0.055626564268j)*x_ref[2]**o + ((0.295635101148+0.469053098611j))*x_ref[2]
            arg[(1, 1, 0, 1)]+=(-0.00101563697996-0.204844787382j)*x[2]**o + ((-0.286835041296-0.313980212071j))*x[2]
            ref[(1, 1, 0, 1)]+=(-0.00101563697996-0.204844787382j)*x_ref[2]**o + ((-0.286835041296-0.313980212071j))*x_ref[2]
            arg[(1, 1, 0, 2)]+=(-0.685222549382-0.547052192628j)*x[2]**o + ((0.341093326022+0.620461855541j))*x[2]
            ref[(1, 1, 0, 2)]+=(-0.685222549382-0.547052192628j)*x_ref[2]**o + ((0.341093326022+0.620461855541j))*x_ref[2]
            arg[(1, 1, 0, 3)]+=(-0.15024369321-0.104117102571j)*x[2]**o + ((-0.622901714363+0.548924850339j))*x[2]
            ref[(1, 1, 0, 3)]+=(-0.15024369321-0.104117102571j)*x_ref[2]**o + ((-0.622901714363+0.548924850339j))*x_ref[2]
            arg[(1, 1, 1, 0)]+=(0.63811722849+0.39128436229j)*x[2]**o + ((-0.711189081576-0.0721204057588j))*x[2]
            ref[(1, 1, 1, 0)]+=(0.63811722849+0.39128436229j)*x_ref[2]**o + ((-0.711189081576-0.0721204057588j))*x_ref[2]
            arg[(1, 1, 1, 1)]+=(-0.230133679856+0.963076469428j)*x[2]**o + ((-0.114526012723+0.411212621096j))*x[2]
            ref[(1, 1, 1, 1)]+=(-0.230133679856+0.963076469428j)*x_ref[2]**o + ((-0.114526012723+0.411212621096j))*x_ref[2]
            arg[(1, 1, 1, 2)]+=(-0.427955202144+0.449361195661j)*x[2]**o + ((-0.967050618391+0.109822565545j))*x[2]
            ref[(1, 1, 1, 2)]+=(-0.427955202144+0.449361195661j)*x_ref[2]**o + ((-0.967050618391+0.109822565545j))*x_ref[2]
            arg[(1, 1, 1, 3)]+=(-0.874726697059+0.965151532636j)*x[2]**o + ((0.664061458317-0.798261172884j))*x[2]
            ref[(1, 1, 1, 3)]+=(-0.874726697059+0.965151532636j)*x_ref[2]**o + ((0.664061458317-0.798261172884j))*x_ref[2]
            arg[(2, 0, 0, 0)]+=(-0.528299670435-0.0472657950018j)*x[2]**o + ((-0.426377148589+0.80350971025j))*x[2]
            ref[(2, 0, 0, 0)]+=(-0.528299670435-0.0472657950018j)*x_ref[2]**o + ((-0.426377148589+0.80350971025j))*x_ref[2]
            arg[(2, 0, 0, 1)]+=(0.851236807133-0.458993721048j)*x[2]**o + ((-0.564464007597+0.925184476549j))*x[2]
            ref[(2, 0, 0, 1)]+=(0.851236807133-0.458993721048j)*x_ref[2]**o + ((-0.564464007597+0.925184476549j))*x_ref[2]
            arg[(2, 0, 0, 2)]+=(-0.756171319499-0.0210893710749j)*x[2]**o + ((0.796900830611-0.267661864814j))*x[2]
            ref[(2, 0, 0, 2)]+=(-0.756171319499-0.0210893710749j)*x_ref[2]**o + ((0.796900830611-0.267661864814j))*x_ref[2]
            arg[(2, 0, 0, 3)]+=(-0.0744303563074-0.441423858625j)*x[2]**o + ((-0.00865410631329+0.495665500844j))*x[2]
            ref[(2, 0, 0, 3)]+=(-0.0744303563074-0.441423858625j)*x_ref[2]**o + ((-0.00865410631329+0.495665500844j))*x_ref[2]
            arg[(2, 0, 1, 0)]+=(-0.032296796225+0.646067111174j)*x[2]**o + ((-0.33479484992-0.764273289931j))*x[2]
            ref[(2, 0, 1, 0)]+=(-0.032296796225+0.646067111174j)*x_ref[2]**o + ((-0.33479484992-0.764273289931j))*x_ref[2]
            arg[(2, 0, 1, 1)]+=(-0.995021175395-0.773963007428j)*x[2]**o + ((0.431899295822-0.182986861188j))*x[2]
            ref[(2, 0, 1, 1)]+=(-0.995021175395-0.773963007428j)*x_ref[2]**o + ((0.431899295822-0.182986861188j))*x_ref[2]
            arg[(2, 0, 1, 2)]+=(-0.900149766828-0.0894775030338j)*x[2]**o + ((-0.251893681265-0.782897989005j))*x[2]
            ref[(2, 0, 1, 2)]+=(-0.900149766828-0.0894775030338j)*x_ref[2]**o + ((-0.251893681265-0.782897989005j))*x_ref[2]
            arg[(2, 0, 1, 3)]+=(0.982691681136+0.508234560543j)*x[2]**o + ((-0.421107608812+0.920281374887j))*x[2]
            ref[(2, 0, 1, 3)]+=(0.982691681136+0.508234560543j)*x_ref[2]**o + ((-0.421107608812+0.920281374887j))*x_ref[2]
            arg[(2, 1, 0, 0)]+=(0.778380485405-0.902005146906j)*x[2]**o + ((0.671691181095-0.829078443579j))*x[2]
            ref[(2, 1, 0, 0)]+=(0.778380485405-0.902005146906j)*x_ref[2]**o + ((0.671691181095-0.829078443579j))*x_ref[2]
            arg[(2, 1, 0, 1)]+=(0.839445240446-0.80099811079j)*x[2]**o + ((-0.761259316122-0.371755683901j))*x[2]
            ref[(2, 1, 0, 1)]+=(0.839445240446-0.80099811079j)*x_ref[2]**o + ((-0.761259316122-0.371755683901j))*x_ref[2]
            arg[(2, 1, 0, 2)]+=(0.663709372898+0.458502914528j)*x[2]**o + ((0.441063674466+0.282926006341j))*x[2]
            ref[(2, 1, 0, 2)]+=(0.663709372898+0.458502914528j)*x_ref[2]**o + ((0.441063674466+0.282926006341j))*x_ref[2]
            arg[(2, 1, 0, 3)]+=(0.310399336681+0.784236292904j)*x[2]**o + ((0.265262618611+0.716109364983j))*x[2]
            ref[(2, 1, 0, 3)]+=(0.310399336681+0.784236292904j)*x_ref[2]**o + ((0.265262618611+0.716109364983j))*x_ref[2]
            arg[(2, 1, 1, 0)]+=(0.534690941967-0.414387438003j)*x[2]**o + ((0.803702644273-0.895115536341j))*x[2]
            ref[(2, 1, 1, 0)]+=(0.534690941967-0.414387438003j)*x_ref[2]**o + ((0.803702644273-0.895115536341j))*x_ref[2]
            arg[(2, 1, 1, 1)]+=(0.442851857409+0.209847475252j)*x[2]**o + ((-0.0567750232328+0.508772780591j))*x[2]
            ref[(2, 1, 1, 1)]+=(0.442851857409+0.209847475252j)*x_ref[2]**o + ((-0.0567750232328+0.508772780591j))*x_ref[2]
            arg[(2, 1, 1, 2)]+=(-0.45789131396-0.230451880822j)*x[2]**o + ((-0.471838738674+0.0233645559148j))*x[2]
            ref[(2, 1, 1, 2)]+=(-0.45789131396-0.230451880822j)*x_ref[2]**o + ((-0.471838738674+0.0233645559148j))*x_ref[2]
            arg[(2, 1, 1, 3)]+=(0.95275059126+0.770235410868j)*x[2]**o + ((0.765759754812+0.348066160022j))*x[2]
            ref[(2, 1, 1, 3)]+=(0.95275059126+0.770235410868j)*x_ref[2]**o + ((0.765759754812+0.348066160022j))*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.496293055965*x[0]**o + (0.694272666174)*x[0] + (-0.204425386198)*x[1]**o + (-0.337643671873)*x[1]
        ref=-0.496293055965*x_ref[0]**o + (0.694272666174)*x_ref[0] + (-0.204425386198)*x_ref[1]**o + (-0.337643671873)*x_ref[1]
        if dim==3:
            arg+=(-0.483640149629)*x[2]**o + (-0.973006887818)*x[2]
            ref+=(-0.483640149629)*x_ref[2]**o + (-0.973006887818)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=0.347351574961*x[0]**o + (-0.310196909069)*x[0] + (-0.754060834395)*x[1]**o + (0.123778850776)*x[1]
        ref[(0,)]=0.347351574961*x_ref[0]**o + (-0.310196909069)*x_ref[0] + (-0.754060834395)*x_ref[1]**o + (0.123778850776)*x_ref[1]
        arg[(1,)]=0.74234361358*x[0]**o + (-0.391864436935)*x[0] + (-0.44699633081)*x[1]**o + (0.492111349231)*x[1]
        ref[(1,)]=0.74234361358*x_ref[0]**o + (-0.391864436935)*x_ref[0] + (-0.44699633081)*x_ref[1]**o + (0.492111349231)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.0349385089555*x[2]**o + (-0.472105342431)*x[2]
            ref[(0,)]+=-0.0349385089555*x_ref[2]**o + (-0.472105342431)*x_ref[2]
            arg[(1,)]+=0.513823619574*x[2]**o + (-0.660955070184)*x[2]
            ref[(1,)]+=0.513823619574*x_ref[2]**o + (-0.660955070184)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref = Data(0,(3, 4),w_ref)
        arg[(0, 0)]=0.989759207653*x[0]**o + (0.0700648711543)*x[0] + (-0.618174472904)*x[1]**o + (-0.477782948311)*x[1]
        ref[(0, 0)]=0.989759207653*x_ref[0]**o + (0.0700648711543)*x_ref[0] + (-0.618174472904)*x_ref[1]**o + (-0.477782948311)*x_ref[1]
        arg[(0, 1)]=0.065033514999*x[0]**o + (-0.0219974060287)*x[0] + (-0.540747004161)*x[1]**o + (0.327620239621)*x[1]
        ref[(0, 1)]=0.065033514999*x_ref[0]**o + (-0.0219974060287)*x_ref[0] + (-0.540747004161)*x_ref[1]**o + (0.327620239621)*x_ref[1]
        arg[(0, 2)]=-0.591362434136*x[0]**o + (0.700759681996)*x[0] + (-0.461023810937)*x[1]**o + (0.287847477619)*x[1]
        ref[(0, 2)]=-0.591362434136*x_ref[0]**o + (0.700759681996)*x_ref[0] + (-0.461023810937)*x_ref[1]**o + (0.287847477619)*x_ref[1]
        arg[(0, 3)]=0.199899775132*x[0]**o + (-0.597380871279)*x[0] + (-0.192486880386)*x[1]**o + (0.987507116508)*x[1]
        ref[(0, 3)]=0.199899775132*x_ref[0]**o + (-0.597380871279)*x_ref[0] + (-0.192486880386)*x_ref[1]**o + (0.987507116508)*x_ref[1]
        arg[(1, 0)]=-0.56739968985*x[0]**o + (-0.663849866616)*x[0] + (0.799521793876)*x[1]**o + (-0.709293993532)*x[1]
        ref[(1, 0)]=-0.56739968985*x_ref[0]**o + (-0.663849866616)*x_ref[0] + (0.799521793876)*x_ref[1]**o + (-0.709293993532)*x_ref[1]
        arg[(1, 1)]=0.888990734713*x[0]**o + (0.0339112621023)*x[0] + (-0.789637745683)*x[1]**o + (0.718877341956)*x[1]
        ref[(1, 1)]=0.888990734713*x_ref[0]**o + (0.0339112621023)*x_ref[0] + (-0.789637745683)*x_ref[1]**o + (0.718877341956)*x_ref[1]
        arg[(1, 2)]=0.0997757227373*x[0]**o + (-0.657811280162)*x[0] + (0.294722832921)*x[1]**o + (0.0162290029711)*x[1]
        ref[(1, 2)]=0.0997757227373*x_ref[0]**o + (-0.657811280162)*x_ref[0] + (0.294722832921)*x_ref[1]**o + (0.0162290029711)*x_ref[1]
        arg[(1, 3)]=-0.298242751226*x[0]**o + (0.112708165827)*x[0] + (0.696354423334)*x[1]**o + (0.74290460909)*x[1]
        ref[(1, 3)]=-0.298242751226*x_ref[0]**o + (0.112708165827)*x_ref[0] + (0.696354423334)*x_ref[1]**o + (0.74290460909)*x_ref[1]
        arg[(2, 0)]=-0.999457841546*x[0]**o + (-0.560504464515)*x[0] + (0.965775282055)*x[1]**o + (-0.44212600876)*x[1]
        ref[(2, 0)]=-0.999457841546*x_ref[0]**o + (-0.560504464515)*x_ref[0] + (0.965775282055)*x_ref[1]**o + (-0.44212600876)*x_ref[1]
        arg[(2, 1)]=-0.820812526394*x[0]**o + (-0.0211350153416)*x[0] + (-0.877258346056)*x[1]**o + (-0.857639556281)*x[1]
        ref[(2, 1)]=-0.820812526394*x_ref[0]**o + (-0.0211350153416)*x_ref[0] + (-0.877258346056)*x_ref[1]**o + (-0.857639556281)*x_ref[1]
        arg[(2, 2)]=-0.507251536513*x[0]**o + (-0.177884447976)*x[0] + (-0.929301371104)*x[1]**o + (0.39870579869)*x[1]
        ref[(2, 2)]=-0.507251536513*x_ref[0]**o + (-0.177884447976)*x_ref[0] + (-0.929301371104)*x_ref[1]**o + (0.39870579869)*x_ref[1]
        arg[(2, 3)]=0.289934018226*x[0]**o + (-0.0903453749639)*x[0] + (-0.527244853519)*x[1]**o + (0.566285045804)*x[1]
        ref[(2, 3)]=0.289934018226*x_ref[0]**o + (-0.0903453749639)*x_ref[0] + (-0.527244853519)*x_ref[1]**o + (0.566285045804)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.713051565487*x[2]**o + (-0.218375255504)*x[2]
            ref[(0, 0)]+=0.713051565487*x_ref[2]**o + (-0.218375255504)*x_ref[2]
            arg[(0, 1)]+=0.305013896532*x[2]**o + (0.875899562008)*x[2]
            ref[(0, 1)]+=0.305013896532*x_ref[2]**o + (0.875899562008)*x_ref[2]
            arg[(0, 2)]+=-0.218075645195*x[2]**o + (0.507983482168)*x[2]
            ref[(0, 2)]+=-0.218075645195*x_ref[2]**o + (0.507983482168)*x_ref[2]
            arg[(0, 3)]+=-0.440702279308*x[2]**o + (0.324072617697)*x[2]
            ref[(0, 3)]+=-0.440702279308*x_ref[2]**o + (0.324072617697)*x_ref[2]
            arg[(1, 0)]+=0.473741423834*x[2]**o + (0.286939874679)*x[2]
            ref[(1, 0)]+=0.473741423834*x_ref[2]**o + (0.286939874679)*x_ref[2]
            arg[(1, 1)]+=0.767149811337*x[2]**o + (0.549996245622)*x[2]
            ref[(1, 1)]+=0.767149811337*x_ref[2]**o + (0.549996245622)*x_ref[2]
            arg[(1, 2)]+=-0.248077988461*x[2]**o + (-0.359321780574)*x[2]
            ref[(1, 2)]+=-0.248077988461*x_ref[2]**o + (-0.359321780574)*x_ref[2]
            arg[(1, 3)]+=0.351096305451*x[2]**o + (0.632947000545)*x[2]
            ref[(1, 3)]+=0.351096305451*x_ref[2]**o + (0.632947000545)*x_ref[2]
            arg[(2, 0)]+=-0.996152672599*x[2]**o + (0.639437104336)*x[2]
            ref[(2, 0)]+=-0.996152672599*x_ref[2]**o + (0.639437104336)*x_ref[2]
            arg[(2, 1)]+=0.998788297272*x[2]**o + (0.685677181874)*x[2]
            ref[(2, 1)]+=0.998788297272*x_ref[2]**o + (0.685677181874)*x_ref[2]
            arg[(2, 2)]+=0.495889607309*x[2]**o + (0.849453251708)*x[2]
            ref[(2, 2)]+=0.495889607309*x_ref[2]**o + (0.849453251708)*x_ref[2]
            arg[(2, 3)]+=0.667488685931*x[2]**o + (0.400227632924)*x[2]
            ref[(2, 3)]+=0.667488685931*x_ref[2]**o + (0.400227632924)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 4),w)
        ref = Data(0,(3, 2, 4),w_ref)
        arg[(0, 0, 0)]=0.924799364241*x[0]**o + (0.555151222671)*x[0] + (0.534347269823)*x[1]**o + (0.982739972998)*x[1]
        ref[(0, 0, 0)]=0.924799364241*x_ref[0]**o + (0.555151222671)*x_ref[0] + (0.534347269823)*x_ref[1]**o + (0.982739972998)*x_ref[1]
        arg[(0, 0, 1)]=-0.44717845639*x[0]**o + (-0.907146018673)*x[0] + (-0.154880964161)*x[1]**o + (0.805551622573)*x[1]
        ref[(0, 0, 1)]=-0.44717845639*x_ref[0]**o + (-0.907146018673)*x_ref[0] + (-0.154880964161)*x_ref[1]**o + (0.805551622573)*x_ref[1]
        arg[(0, 0, 2)]=-0.954485390883*x[0]**o + (-0.291173165878)*x[0] + (0.50225410496)*x[1]**o + (-0.976238559353)*x[1]
        ref[(0, 0, 2)]=-0.954485390883*x_ref[0]**o + (-0.291173165878)*x_ref[0] + (0.50225410496)*x_ref[1]**o + (-0.976238559353)*x_ref[1]
        arg[(0, 0, 3)]=-0.256453815586*x[0]**o + (-0.707670102563)*x[0] + (0.320745376548)*x[1]**o + (-0.255307288951)*x[1]
        ref[(0, 0, 3)]=-0.256453815586*x_ref[0]**o + (-0.707670102563)*x_ref[0] + (0.320745376548)*x_ref[1]**o + (-0.255307288951)*x_ref[1]
        arg[(0, 1, 0)]=-0.842054762011*x[0]**o + (0.275665588698)*x[0] + (0.233388589558)*x[1]**o + (-0.73983134446)*x[1]
        ref[(0, 1, 0)]=-0.842054762011*x_ref[0]**o + (0.275665588698)*x_ref[0] + (0.233388589558)*x_ref[1]**o + (-0.73983134446)*x_ref[1]
        arg[(0, 1, 1)]=0.78931876994*x[0]**o + (-0.0804759829226)*x[0] + (0.594310485563)*x[1]**o + (0.775296414202)*x[1]
        ref[(0, 1, 1)]=0.78931876994*x_ref[0]**o + (-0.0804759829226)*x_ref[0] + (0.594310485563)*x_ref[1]**o + (0.775296414202)*x_ref[1]
        arg[(0, 1, 2)]=0.483618451977*x[0]**o + (0.282441129596)*x[0] + (-0.662810314694)*x[1]**o + (0.166398803308)*x[1]
        ref[(0, 1, 2)]=0.483618451977*x_ref[0]**o + (0.282441129596)*x_ref[0] + (-0.662810314694)*x_ref[1]**o + (0.166398803308)*x_ref[1]
        arg[(0, 1, 3)]=-0.687454378877*x[0]**o + (-0.424278509666)*x[0] + (-0.977262527098)*x[1]**o + (-0.451220633193)*x[1]
        ref[(0, 1, 3)]=-0.687454378877*x_ref[0]**o + (-0.424278509666)*x_ref[0] + (-0.977262527098)*x_ref[1]**o + (-0.451220633193)*x_ref[1]
        arg[(1, 0, 0)]=0.646772353859*x[0]**o + (-0.521717938369)*x[0] + (0.36070161786)*x[1]**o + (0.101258891473)*x[1]
        ref[(1, 0, 0)]=0.646772353859*x_ref[0]**o + (-0.521717938369)*x_ref[0] + (0.36070161786)*x_ref[1]**o + (0.101258891473)*x_ref[1]
        arg[(1, 0, 1)]=-0.0403355924908*x[0]**o + (-0.015896821726)*x[0] + (-0.316335421566)*x[1]**o + (-0.586619016288)*x[1]
        ref[(1, 0, 1)]=-0.0403355924908*x_ref[0]**o + (-0.015896821726)*x_ref[0] + (-0.316335421566)*x_ref[1]**o + (-0.586619016288)*x_ref[1]
        arg[(1, 0, 2)]=0.129901378834*x[0]**o + (0.583010352639)*x[0] + (0.809945126343)*x[1]**o + (0.0699860004062)*x[1]
        ref[(1, 0, 2)]=0.129901378834*x_ref[0]**o + (0.583010352639)*x_ref[0] + (0.809945126343)*x_ref[1]**o + (0.0699860004062)*x_ref[1]
        arg[(1, 0, 3)]=0.684415878116*x[0]**o + (0.711268129746)*x[0] + (0.964451661026)*x[1]**o + (0.32924804732)*x[1]
        ref[(1, 0, 3)]=0.684415878116*x_ref[0]**o + (0.711268129746)*x_ref[0] + (0.964451661026)*x_ref[1]**o + (0.32924804732)*x_ref[1]
        arg[(1, 1, 0)]=-0.497668778831*x[0]**o + (-0.155571112514)*x[0] + (0.718362546497)*x[1]**o + (-0.00349203305051)*x[1]
        ref[(1, 1, 0)]=-0.497668778831*x_ref[0]**o + (-0.155571112514)*x_ref[0] + (0.718362546497)*x_ref[1]**o + (-0.00349203305051)*x_ref[1]
        arg[(1, 1, 1)]=-0.221044253523*x[0]**o + (0.947057846096)*x[0] + (0.4005427643)*x[1]**o + (0.315429405162)*x[1]
        ref[(1, 1, 1)]=-0.221044253523*x_ref[0]**o + (0.947057846096)*x_ref[0] + (0.4005427643)*x_ref[1]**o + (0.315429405162)*x_ref[1]
        arg[(1, 1, 2)]=0.362292126095*x[0]**o + (-0.819413458597)*x[0] + (0.354755953107)*x[1]**o + (0.889230260869)*x[1]
        ref[(1, 1, 2)]=0.362292126095*x_ref[0]**o + (-0.819413458597)*x_ref[0] + (0.354755953107)*x_ref[1]**o + (0.889230260869)*x_ref[1]
        arg[(1, 1, 3)]=0.908915568763*x[0]**o + (-0.724212958126)*x[0] + (-0.999442993627)*x[1]**o + (-0.59333775921)*x[1]
        ref[(1, 1, 3)]=0.908915568763*x_ref[0]**o + (-0.724212958126)*x_ref[0] + (-0.999442993627)*x_ref[1]**o + (-0.59333775921)*x_ref[1]
        arg[(2, 0, 0)]=-0.915186216489*x[0]**o + (-0.284944794056)*x[0] + (-0.332432652589)*x[1]**o + (0.268319569841)*x[1]
        ref[(2, 0, 0)]=-0.915186216489*x_ref[0]**o + (-0.284944794056)*x_ref[0] + (-0.332432652589)*x_ref[1]**o + (0.268319569841)*x_ref[1]
        arg[(2, 0, 1)]=0.327795220374*x[0]**o + (0.0659213886528)*x[0] + (-0.258850555643)*x[1]**o + (0.336595379751)*x[1]
        ref[(2, 0, 1)]=0.327795220374*x_ref[0]**o + (0.0659213886528)*x_ref[0] + (-0.258850555643)*x_ref[1]**o + (0.336595379751)*x_ref[1]
        arg[(2, 0, 2)]=0.167248900691*x[0]**o + (0.955467922325)*x[0] + (-0.955305453489)*x[1]**o + (0.541113227704)*x[1]
        ref[(2, 0, 2)]=0.167248900691*x_ref[0]**o + (0.955467922325)*x_ref[0] + (-0.955305453489)*x_ref[1]**o + (0.541113227704)*x_ref[1]
        arg[(2, 0, 3)]=0.68390453088*x[0]**o + (0.292909028481)*x[0] + (0.402078844281)*x[1]**o + (0.129825109596)*x[1]
        ref[(2, 0, 3)]=0.68390453088*x_ref[0]**o + (0.292909028481)*x_ref[0] + (0.402078844281)*x_ref[1]**o + (0.129825109596)*x_ref[1]
        arg[(2, 1, 0)]=0.375612617185*x[0]**o + (0.395594752801)*x[0] + (-0.841338299835)*x[1]**o + (-0.986080354252)*x[1]
        ref[(2, 1, 0)]=0.375612617185*x_ref[0]**o + (0.395594752801)*x_ref[0] + (-0.841338299835)*x_ref[1]**o + (-0.986080354252)*x_ref[1]
        arg[(2, 1, 1)]=-0.651939383484*x[0]**o + (-0.620939103677)*x[0] + (0.108412374487)*x[1]**o + (0.803907773614)*x[1]
        ref[(2, 1, 1)]=-0.651939383484*x_ref[0]**o + (-0.620939103677)*x_ref[0] + (0.108412374487)*x_ref[1]**o + (0.803907773614)*x_ref[1]
        arg[(2, 1, 2)]=0.785323929571*x[0]**o + (-0.184512655773)*x[0] + (0.659683359218)*x[1]**o + (0.323886295092)*x[1]
        ref[(2, 1, 2)]=0.785323929571*x_ref[0]**o + (-0.184512655773)*x_ref[0] + (0.659683359218)*x_ref[1]**o + (0.323886295092)*x_ref[1]
        arg[(2, 1, 3)]=-0.784564101185*x[0]**o + (0.40455125374)*x[0] + (0.139201672286)*x[1]**o + (0.0650663377343)*x[1]
        ref[(2, 1, 3)]=-0.784564101185*x_ref[0]**o + (0.40455125374)*x_ref[0] + (0.139201672286)*x_ref[1]**o + (0.0650663377343)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.75137023204*x[2]**o + (-0.00248633653983)*x[2]
            ref[(0, 0, 0)]+=-0.75137023204*x_ref[2]**o + (-0.00248633653983)*x_ref[2]
            arg[(0, 0, 1)]+=0.262704936793*x[2]**o + (-0.443294998801)*x[2]
            ref[(0, 0, 1)]+=0.262704936793*x_ref[2]**o + (-0.443294998801)*x_ref[2]
            arg[(0, 0, 2)]+=-0.950959868018*x[2]**o + (0.890630203212)*x[2]
            ref[(0, 0, 2)]+=-0.950959868018*x_ref[2]**o + (0.890630203212)*x_ref[2]
            arg[(0, 0, 3)]+=0.577280098152*x[2]**o + (-0.37091438533)*x[2]
            ref[(0, 0, 3)]+=0.577280098152*x_ref[2]**o + (-0.37091438533)*x_ref[2]
            arg[(0, 1, 0)]+=0.503696959589*x[2]**o + (0.317215632952)*x[2]
            ref[(0, 1, 0)]+=0.503696959589*x_ref[2]**o + (0.317215632952)*x_ref[2]
            arg[(0, 1, 1)]+=0.0604400091243*x[2]**o + (-0.510617912321)*x[2]
            ref[(0, 1, 1)]+=0.0604400091243*x_ref[2]**o + (-0.510617912321)*x_ref[2]
            arg[(0, 1, 2)]+=-0.98787272887*x[2]**o + (0.717849240685)*x[2]
            ref[(0, 1, 2)]+=-0.98787272887*x_ref[2]**o + (0.717849240685)*x_ref[2]
            arg[(0, 1, 3)]+=-0.828184365599*x[2]**o + (0.926187322187)*x[2]
            ref[(0, 1, 3)]+=-0.828184365599*x_ref[2]**o + (0.926187322187)*x_ref[2]
            arg[(1, 0, 0)]+=0.181556750208*x[2]**o + (-0.715956167193)*x[2]
            ref[(1, 0, 0)]+=0.181556750208*x_ref[2]**o + (-0.715956167193)*x_ref[2]
            arg[(1, 0, 1)]+=-0.168320731582*x[2]**o + (0.255736279366)*x[2]
            ref[(1, 0, 1)]+=-0.168320731582*x_ref[2]**o + (0.255736279366)*x_ref[2]
            arg[(1, 0, 2)]+=0.61027188121*x[2]**o + (0.465083973258)*x[2]
            ref[(1, 0, 2)]+=0.61027188121*x_ref[2]**o + (0.465083973258)*x_ref[2]
            arg[(1, 0, 3)]+=-0.00857484696968*x[2]**o + (-0.392741852924)*x[2]
            ref[(1, 0, 3)]+=-0.00857484696968*x_ref[2]**o + (-0.392741852924)*x_ref[2]
            arg[(1, 1, 0)]+=-0.138991056545*x[2]**o + (-0.029315446876)*x[2]
            ref[(1, 1, 0)]+=-0.138991056545*x_ref[2]**o + (-0.029315446876)*x_ref[2]
            arg[(1, 1, 1)]+=-0.106726298334*x[2]**o + (-0.94865679226)*x[2]
            ref[(1, 1, 1)]+=-0.106726298334*x_ref[2]**o + (-0.94865679226)*x_ref[2]
            arg[(1, 1, 2)]+=-0.931478162337*x[2]**o + (-0.332339826355)*x[2]
            ref[(1, 1, 2)]+=-0.931478162337*x_ref[2]**o + (-0.332339826355)*x_ref[2]
            arg[(1, 1, 3)]+=0.173461208569*x[2]**o + (0.175563513513)*x[2]
            ref[(1, 1, 3)]+=0.173461208569*x_ref[2]**o + (0.175563513513)*x_ref[2]
            arg[(2, 0, 0)]+=-0.734457647411*x[2]**o + (0.496553662315)*x[2]
            ref[(2, 0, 0)]+=-0.734457647411*x_ref[2]**o + (0.496553662315)*x_ref[2]
            arg[(2, 0, 1)]+=-0.432452687599*x[2]**o + (0.421379165922)*x[2]
            ref[(2, 0, 1)]+=-0.432452687599*x_ref[2]**o + (0.421379165922)*x_ref[2]
            arg[(2, 0, 2)]+=-0.167402266167*x[2]**o + (-0.506444741565)*x[2]
            ref[(2, 0, 2)]+=-0.167402266167*x_ref[2]**o + (-0.506444741565)*x_ref[2]
            arg[(2, 0, 3)]+=-0.031850653223*x[2]**o + (-0.863729079985)*x[2]
            ref[(2, 0, 3)]+=-0.031850653223*x_ref[2]**o + (-0.863729079985)*x_ref[2]
            arg[(2, 1, 0)]+=0.51165882492*x[2]**o + (0.810745924857)*x[2]
            ref[(2, 1, 0)]+=0.51165882492*x_ref[2]**o + (0.810745924857)*x_ref[2]
            arg[(2, 1, 1)]+=-0.232096162794*x[2]**o + (0.848420721279)*x[2]
            ref[(2, 1, 1)]+=-0.232096162794*x_ref[2]**o + (0.848420721279)*x_ref[2]
            arg[(2, 1, 2)]+=0.335993286842*x[2]**o + (-0.157427434057)*x[2]
            ref[(2, 1, 2)]+=0.335993286842*x_ref[2]**o + (-0.157427434057)*x_ref[2]
            arg[(2, 1, 3)]+=-0.442924543209*x[2]**o + (-0.237639010422)*x[2]
            ref[(2, 1, 3)]+=-0.442924543209*x_ref[2]**o + (-0.237639010422)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 2, 4),w)
        ref = Data(0,(4, 2, 2, 4),w_ref)
        arg[(0, 0, 0, 0)]=0.505464533471*x[0]**o + (-0.516430003189)*x[0] + (0.028115903117)*x[1]**o + (0.677954210495)*x[1]
        ref[(0, 0, 0, 0)]=0.505464533471*x_ref[0]**o + (-0.516430003189)*x_ref[0] + (0.028115903117)*x_ref[1]**o + (0.677954210495)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.650848681572*x[0]**o + (-0.219736925135)*x[0] + (-0.00223408551541)*x[1]**o + (-0.596876300832)*x[1]
        ref[(0, 0, 0, 1)]=0.650848681572*x_ref[0]**o + (-0.219736925135)*x_ref[0] + (-0.00223408551541)*x_ref[1]**o + (-0.596876300832)*x_ref[1]
        arg[(0, 0, 0, 2)]=-0.988361463321*x[0]**o + (0.695970589919)*x[0] + (0.358417062679)*x[1]**o + (0.720862389032)*x[1]
        ref[(0, 0, 0, 2)]=-0.988361463321*x_ref[0]**o + (0.695970589919)*x_ref[0] + (0.358417062679)*x_ref[1]**o + (0.720862389032)*x_ref[1]
        arg[(0, 0, 0, 3)]=-0.686315096707*x[0]**o + (-0.757259071413)*x[0] + (0.238809396088)*x[1]**o + (-0.712005919165)*x[1]
        ref[(0, 0, 0, 3)]=-0.686315096707*x_ref[0]**o + (-0.757259071413)*x_ref[0] + (0.238809396088)*x_ref[1]**o + (-0.712005919165)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.279029080602*x[0]**o + (-0.440324222718)*x[0] + (0.352578265082)*x[1]**o + (0.426162668942)*x[1]
        ref[(0, 0, 1, 0)]=0.279029080602*x_ref[0]**o + (-0.440324222718)*x_ref[0] + (0.352578265082)*x_ref[1]**o + (0.426162668942)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.597250216079*x[0]**o + (-0.539703740398)*x[0] + (-0.361824886463)*x[1]**o + (0.0741840260161)*x[1]
        ref[(0, 0, 1, 1)]=0.597250216079*x_ref[0]**o + (-0.539703740398)*x_ref[0] + (-0.361824886463)*x_ref[1]**o + (0.0741840260161)*x_ref[1]
        arg[(0, 0, 1, 2)]=0.372020994644*x[0]**o + (-0.420132552274)*x[0] + (0.296956588603)*x[1]**o + (-0.283794435185)*x[1]
        ref[(0, 0, 1, 2)]=0.372020994644*x_ref[0]**o + (-0.420132552274)*x_ref[0] + (0.296956588603)*x_ref[1]**o + (-0.283794435185)*x_ref[1]
        arg[(0, 0, 1, 3)]=-0.794988045405*x[0]**o + (-0.105311654213)*x[0] + (-0.626262091618)*x[1]**o + (0.286693827955)*x[1]
        ref[(0, 0, 1, 3)]=-0.794988045405*x_ref[0]**o + (-0.105311654213)*x_ref[0] + (-0.626262091618)*x_ref[1]**o + (0.286693827955)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.0574537701324*x[0]**o + (0.992240752726)*x[0] + (-0.683102195673)*x[1]**o + (0.978490121878)*x[1]
        ref[(0, 1, 0, 0)]=0.0574537701324*x_ref[0]**o + (0.992240752726)*x_ref[0] + (-0.683102195673)*x_ref[1]**o + (0.978490121878)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.0255665514416*x[0]**o + (-0.113637889566)*x[0] + (-0.457835627489)*x[1]**o + (0.0926006502771)*x[1]
        ref[(0, 1, 0, 1)]=0.0255665514416*x_ref[0]**o + (-0.113637889566)*x_ref[0] + (-0.457835627489)*x_ref[1]**o + (0.0926006502771)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.958177344056*x[0]**o + (-0.905983154765)*x[0] + (0.520453753393)*x[1]**o + (0.390670481835)*x[1]
        ref[(0, 1, 0, 2)]=0.958177344056*x_ref[0]**o + (-0.905983154765)*x_ref[0] + (0.520453753393)*x_ref[1]**o + (0.390670481835)*x_ref[1]
        arg[(0, 1, 0, 3)]=-0.689385615106*x[0]**o + (-0.370787675093)*x[0] + (-0.602697800902)*x[1]**o + (0.349579482468)*x[1]
        ref[(0, 1, 0, 3)]=-0.689385615106*x_ref[0]**o + (-0.370787675093)*x_ref[0] + (-0.602697800902)*x_ref[1]**o + (0.349579482468)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.334092162898*x[0]**o + (0.310253611256)*x[0] + (0.724559180122)*x[1]**o + (-0.573641366057)*x[1]
        ref[(0, 1, 1, 0)]=0.334092162898*x_ref[0]**o + (0.310253611256)*x_ref[0] + (0.724559180122)*x_ref[1]**o + (-0.573641366057)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.656551210871*x[0]**o + (-0.813797969025)*x[0] + (0.894923855931)*x[1]**o + (0.574008315456)*x[1]
        ref[(0, 1, 1, 1)]=-0.656551210871*x_ref[0]**o + (-0.813797969025)*x_ref[0] + (0.894923855931)*x_ref[1]**o + (0.574008315456)*x_ref[1]
        arg[(0, 1, 1, 2)]=-0.61099015938*x[0]**o + (-0.459336020633)*x[0] + (0.331681607458)*x[1]**o + (0.938308957193)*x[1]
        ref[(0, 1, 1, 2)]=-0.61099015938*x_ref[0]**o + (-0.459336020633)*x_ref[0] + (0.331681607458)*x_ref[1]**o + (0.938308957193)*x_ref[1]
        arg[(0, 1, 1, 3)]=0.577736405262*x[0]**o + (0.758519280148)*x[0] + (-0.0120829896576)*x[1]**o + (0.243703877446)*x[1]
        ref[(0, 1, 1, 3)]=0.577736405262*x_ref[0]**o + (0.758519280148)*x_ref[0] + (-0.0120829896576)*x_ref[1]**o + (0.243703877446)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.289359799798*x[0]**o + (-0.135676518171)*x[0] + (-0.150146562956)*x[1]**o + (-0.741599877958)*x[1]
        ref[(1, 0, 0, 0)]=-0.289359799798*x_ref[0]**o + (-0.135676518171)*x_ref[0] + (-0.150146562956)*x_ref[1]**o + (-0.741599877958)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.524781232562*x[0]**o + (0.0848122182732)*x[0] + (-0.789705131318)*x[1]**o + (-0.737941540598)*x[1]
        ref[(1, 0, 0, 1)]=-0.524781232562*x_ref[0]**o + (0.0848122182732)*x_ref[0] + (-0.789705131318)*x_ref[1]**o + (-0.737941540598)*x_ref[1]
        arg[(1, 0, 0, 2)]=-0.413787854405*x[0]**o + (0.568772402387)*x[0] + (0.793887387151)*x[1]**o + (-0.377539322206)*x[1]
        ref[(1, 0, 0, 2)]=-0.413787854405*x_ref[0]**o + (0.568772402387)*x_ref[0] + (0.793887387151)*x_ref[1]**o + (-0.377539322206)*x_ref[1]
        arg[(1, 0, 0, 3)]=0.0827536634256*x[0]**o + (0.266285991473)*x[0] + (-0.03599029315)*x[1]**o + (-0.0499298563263)*x[1]
        ref[(1, 0, 0, 3)]=0.0827536634256*x_ref[0]**o + (0.266285991473)*x_ref[0] + (-0.03599029315)*x_ref[1]**o + (-0.0499298563263)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.782412191264*x[0]**o + (-0.798926079812)*x[0] + (0.387028430055)*x[1]**o + (0.0964935373959)*x[1]
        ref[(1, 0, 1, 0)]=-0.782412191264*x_ref[0]**o + (-0.798926079812)*x_ref[0] + (0.387028430055)*x_ref[1]**o + (0.0964935373959)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.671132560604*x[0]**o + (-0.441895622987)*x[0] + (-0.563164044752)*x[1]**o + (0.914356718415)*x[1]
        ref[(1, 0, 1, 1)]=0.671132560604*x_ref[0]**o + (-0.441895622987)*x_ref[0] + (-0.563164044752)*x_ref[1]**o + (0.914356718415)*x_ref[1]
        arg[(1, 0, 1, 2)]=-0.711655890877*x[0]**o + (0.856387345582)*x[0] + (-0.236736156146)*x[1]**o + (-0.601442594697)*x[1]
        ref[(1, 0, 1, 2)]=-0.711655890877*x_ref[0]**o + (0.856387345582)*x_ref[0] + (-0.236736156146)*x_ref[1]**o + (-0.601442594697)*x_ref[1]
        arg[(1, 0, 1, 3)]=0.869769713326*x[0]**o + (-0.303088988282)*x[0] + (-0.92850873435)*x[1]**o + (-0.198062350456)*x[1]
        ref[(1, 0, 1, 3)]=0.869769713326*x_ref[0]**o + (-0.303088988282)*x_ref[0] + (-0.92850873435)*x_ref[1]**o + (-0.198062350456)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.394803571042*x[0]**o + (0.990829681267)*x[0] + (-0.213015032527)*x[1]**o + (0.334842083304)*x[1]
        ref[(1, 1, 0, 0)]=-0.394803571042*x_ref[0]**o + (0.990829681267)*x_ref[0] + (-0.213015032527)*x_ref[1]**o + (0.334842083304)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.192212072202*x[0]**o + (-0.420498094999)*x[0] + (-0.597030712238)*x[1]**o + (-0.0105061048528)*x[1]
        ref[(1, 1, 0, 1)]=0.192212072202*x_ref[0]**o + (-0.420498094999)*x_ref[0] + (-0.597030712238)*x_ref[1]**o + (-0.0105061048528)*x_ref[1]
        arg[(1, 1, 0, 2)]=-0.621075355432*x[0]**o + (-0.255382668813)*x[0] + (-0.283754827206)*x[1]**o + (0.0247312598111)*x[1]
        ref[(1, 1, 0, 2)]=-0.621075355432*x_ref[0]**o + (-0.255382668813)*x_ref[0] + (-0.283754827206)*x_ref[1]**o + (0.0247312598111)*x_ref[1]
        arg[(1, 1, 0, 3)]=-0.886000846395*x[0]**o + (-0.76906057362)*x[0] + (0.29541097983)*x[1]**o + (-0.37512768844)*x[1]
        ref[(1, 1, 0, 3)]=-0.886000846395*x_ref[0]**o + (-0.76906057362)*x_ref[0] + (0.29541097983)*x_ref[1]**o + (-0.37512768844)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.110110580493*x[0]**o + (0.0141399959414)*x[0] + (0.0238655080256)*x[1]**o + (-0.914167428043)*x[1]
        ref[(1, 1, 1, 0)]=0.110110580493*x_ref[0]**o + (0.0141399959414)*x_ref[0] + (0.0238655080256)*x_ref[1]**o + (-0.914167428043)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.330409968104*x[0]**o + (-0.227774212429)*x[0] + (-0.902543324116)*x[1]**o + (0.406759913091)*x[1]
        ref[(1, 1, 1, 1)]=-0.330409968104*x_ref[0]**o + (-0.227774212429)*x_ref[0] + (-0.902543324116)*x_ref[1]**o + (0.406759913091)*x_ref[1]
        arg[(1, 1, 1, 2)]=-0.93126178*x[0]**o + (0.502706305526)*x[0] + (-0.645062983092)*x[1]**o + (-0.0594030772081)*x[1]
        ref[(1, 1, 1, 2)]=-0.93126178*x_ref[0]**o + (0.502706305526)*x_ref[0] + (-0.645062983092)*x_ref[1]**o + (-0.0594030772081)*x_ref[1]
        arg[(1, 1, 1, 3)]=0.636787341615*x[0]**o + (-0.635787082967)*x[0] + (0.758089118573)*x[1]**o + (-0.958384430843)*x[1]
        ref[(1, 1, 1, 3)]=0.636787341615*x_ref[0]**o + (-0.635787082967)*x_ref[0] + (0.758089118573)*x_ref[1]**o + (-0.958384430843)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.941791578188*x[0]**o + (-0.425697255749)*x[0] + (-0.427594823399)*x[1]**o + (-0.154736155916)*x[1]
        ref[(2, 0, 0, 0)]=0.941791578188*x_ref[0]**o + (-0.425697255749)*x_ref[0] + (-0.427594823399)*x_ref[1]**o + (-0.154736155916)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.129772098285*x[0]**o + (0.435564838023)*x[0] + (-0.595722776064)*x[1]**o + (0.611528024179)*x[1]
        ref[(2, 0, 0, 1)]=0.129772098285*x_ref[0]**o + (0.435564838023)*x_ref[0] + (-0.595722776064)*x_ref[1]**o + (0.611528024179)*x_ref[1]
        arg[(2, 0, 0, 2)]=-0.74784200726*x[0]**o + (-0.618244679342)*x[0] + (-0.28248935793)*x[1]**o + (0.63620756145)*x[1]
        ref[(2, 0, 0, 2)]=-0.74784200726*x_ref[0]**o + (-0.618244679342)*x_ref[0] + (-0.28248935793)*x_ref[1]**o + (0.63620756145)*x_ref[1]
        arg[(2, 0, 0, 3)]=-0.0454857709101*x[0]**o + (0.272443729834)*x[0] + (-0.737725738384)*x[1]**o + (-0.919507110772)*x[1]
        ref[(2, 0, 0, 3)]=-0.0454857709101*x_ref[0]**o + (0.272443729834)*x_ref[0] + (-0.737725738384)*x_ref[1]**o + (-0.919507110772)*x_ref[1]
        arg[(2, 0, 1, 0)]=-0.0345266357602*x[0]**o + (0.629966975892)*x[0] + (0.130680576934)*x[1]**o + (0.145060972465)*x[1]
        ref[(2, 0, 1, 0)]=-0.0345266357602*x_ref[0]**o + (0.629966975892)*x_ref[0] + (0.130680576934)*x_ref[1]**o + (0.145060972465)*x_ref[1]
        arg[(2, 0, 1, 1)]=0.611810240055*x[0]**o + (-0.626162425071)*x[0] + (0.554988760791)*x[1]**o + (0.20852471902)*x[1]
        ref[(2, 0, 1, 1)]=0.611810240055*x_ref[0]**o + (-0.626162425071)*x_ref[0] + (0.554988760791)*x_ref[1]**o + (0.20852471902)*x_ref[1]
        arg[(2, 0, 1, 2)]=-0.722692353164*x[0]**o + (-0.324898099113)*x[0] + (0.980262100168)*x[1]**o + (0.62432496211)*x[1]
        ref[(2, 0, 1, 2)]=-0.722692353164*x_ref[0]**o + (-0.324898099113)*x_ref[0] + (0.980262100168)*x_ref[1]**o + (0.62432496211)*x_ref[1]
        arg[(2, 0, 1, 3)]=0.176534349621*x[0]**o + (0.763799293575)*x[0] + (0.541814651084)*x[1]**o + (0.734489118851)*x[1]
        ref[(2, 0, 1, 3)]=0.176534349621*x_ref[0]**o + (0.763799293575)*x_ref[0] + (0.541814651084)*x_ref[1]**o + (0.734489118851)*x_ref[1]
        arg[(2, 1, 0, 0)]=-0.591434907337*x[0]**o + (0.711227885548)*x[0] + (-0.818742534154)*x[1]**o + (-0.94683078592)*x[1]
        ref[(2, 1, 0, 0)]=-0.591434907337*x_ref[0]**o + (0.711227885548)*x_ref[0] + (-0.818742534154)*x_ref[1]**o + (-0.94683078592)*x_ref[1]
        arg[(2, 1, 0, 1)]=-0.964667254297*x[0]**o + (-0.953319368173)*x[0] + (0.632296215188)*x[1]**o + (0.648274760283)*x[1]
        ref[(2, 1, 0, 1)]=-0.964667254297*x_ref[0]**o + (-0.953319368173)*x_ref[0] + (0.632296215188)*x_ref[1]**o + (0.648274760283)*x_ref[1]
        arg[(2, 1, 0, 2)]=0.121180910893*x[0]**o + (0.527818475233)*x[0] + (-0.417486268113)*x[1]**o + (-0.964446532697)*x[1]
        ref[(2, 1, 0, 2)]=0.121180910893*x_ref[0]**o + (0.527818475233)*x_ref[0] + (-0.417486268113)*x_ref[1]**o + (-0.964446532697)*x_ref[1]
        arg[(2, 1, 0, 3)]=-0.750309465215*x[0]**o + (-0.0324162837316)*x[0] + (-0.184095936709)*x[1]**o + (0.750610176031)*x[1]
        ref[(2, 1, 0, 3)]=-0.750309465215*x_ref[0]**o + (-0.0324162837316)*x_ref[0] + (-0.184095936709)*x_ref[1]**o + (0.750610176031)*x_ref[1]
        arg[(2, 1, 1, 0)]=0.139387031241*x[0]**o + (-0.0528544020954)*x[0] + (0.750089004022)*x[1]**o + (0.082067987811)*x[1]
        ref[(2, 1, 1, 0)]=0.139387031241*x_ref[0]**o + (-0.0528544020954)*x_ref[0] + (0.750089004022)*x_ref[1]**o + (0.082067987811)*x_ref[1]
        arg[(2, 1, 1, 1)]=-0.110413467048*x[0]**o + (-0.592755687899)*x[0] + (-0.177418531218)*x[1]**o + (0.297766020771)*x[1]
        ref[(2, 1, 1, 1)]=-0.110413467048*x_ref[0]**o + (-0.592755687899)*x_ref[0] + (-0.177418531218)*x_ref[1]**o + (0.297766020771)*x_ref[1]
        arg[(2, 1, 1, 2)]=0.104698755202*x[0]**o + (0.471091208887)*x[0] + (0.378282319838)*x[1]**o + (-0.0948181046082)*x[1]
        ref[(2, 1, 1, 2)]=0.104698755202*x_ref[0]**o + (0.471091208887)*x_ref[0] + (0.378282319838)*x_ref[1]**o + (-0.0948181046082)*x_ref[1]
        arg[(2, 1, 1, 3)]=0.700034280077*x[0]**o + (-0.364434991036)*x[0] + (-0.788764605963)*x[1]**o + (-0.160837175405)*x[1]
        ref[(2, 1, 1, 3)]=0.700034280077*x_ref[0]**o + (-0.364434991036)*x_ref[0] + (-0.788764605963)*x_ref[1]**o + (-0.160837175405)*x_ref[1]
        arg[(3, 0, 0, 0)]=-0.568545548654*x[0]**o + (-0.41408499092)*x[0] + (0.663803049217)*x[1]**o + (0.763299804119)*x[1]
        ref[(3, 0, 0, 0)]=-0.568545548654*x_ref[0]**o + (-0.41408499092)*x_ref[0] + (0.663803049217)*x_ref[1]**o + (0.763299804119)*x_ref[1]
        arg[(3, 0, 0, 1)]=0.494950503138*x[0]**o + (-0.475028416927)*x[0] + (0.89775898474)*x[1]**o + (-0.273769273813)*x[1]
        ref[(3, 0, 0, 1)]=0.494950503138*x_ref[0]**o + (-0.475028416927)*x_ref[0] + (0.89775898474)*x_ref[1]**o + (-0.273769273813)*x_ref[1]
        arg[(3, 0, 0, 2)]=-0.77234676794*x[0]**o + (0.762797230815)*x[0] + (-0.928861378325)*x[1]**o + (-0.0369650732904)*x[1]
        ref[(3, 0, 0, 2)]=-0.77234676794*x_ref[0]**o + (0.762797230815)*x_ref[0] + (-0.928861378325)*x_ref[1]**o + (-0.0369650732904)*x_ref[1]
        arg[(3, 0, 0, 3)]=0.924264462693*x[0]**o + (-0.581519640852)*x[0] + (0.418187610302)*x[1]**o + (-0.880253410427)*x[1]
        ref[(3, 0, 0, 3)]=0.924264462693*x_ref[0]**o + (-0.581519640852)*x_ref[0] + (0.418187610302)*x_ref[1]**o + (-0.880253410427)*x_ref[1]
        arg[(3, 0, 1, 0)]=0.630923006556*x[0]**o + (0.146050958257)*x[0] + (-0.197099588815)*x[1]**o + (-0.948646314371)*x[1]
        ref[(3, 0, 1, 0)]=0.630923006556*x_ref[0]**o + (0.146050958257)*x_ref[0] + (-0.197099588815)*x_ref[1]**o + (-0.948646314371)*x_ref[1]
        arg[(3, 0, 1, 1)]=0.432897767835*x[0]**o + (0.321723686718)*x[0] + (0.379285463747)*x[1]**o + (0.569817952786)*x[1]
        ref[(3, 0, 1, 1)]=0.432897767835*x_ref[0]**o + (0.321723686718)*x_ref[0] + (0.379285463747)*x_ref[1]**o + (0.569817952786)*x_ref[1]
        arg[(3, 0, 1, 2)]=0.234327012014*x[0]**o + (0.359325774589)*x[0] + (0.448247496296)*x[1]**o + (-0.537179476937)*x[1]
        ref[(3, 0, 1, 2)]=0.234327012014*x_ref[0]**o + (0.359325774589)*x_ref[0] + (0.448247496296)*x_ref[1]**o + (-0.537179476937)*x_ref[1]
        arg[(3, 0, 1, 3)]=0.0852834377433*x[0]**o + (-0.95485627186)*x[0] + (0.255955585868)*x[1]**o + (0.310704190732)*x[1]
        ref[(3, 0, 1, 3)]=0.0852834377433*x_ref[0]**o + (-0.95485627186)*x_ref[0] + (0.255955585868)*x_ref[1]**o + (0.310704190732)*x_ref[1]
        arg[(3, 1, 0, 0)]=0.615576392468*x[0]**o + (0.709037274801)*x[0] + (0.0458085392131)*x[1]**o + (-0.533260133428)*x[1]
        ref[(3, 1, 0, 0)]=0.615576392468*x_ref[0]**o + (0.709037274801)*x_ref[0] + (0.0458085392131)*x_ref[1]**o + (-0.533260133428)*x_ref[1]
        arg[(3, 1, 0, 1)]=0.552149457878*x[0]**o + (0.804005101998)*x[0] + (-0.83345608208)*x[1]**o + (0.627746940367)*x[1]
        ref[(3, 1, 0, 1)]=0.552149457878*x_ref[0]**o + (0.804005101998)*x_ref[0] + (-0.83345608208)*x_ref[1]**o + (0.627746940367)*x_ref[1]
        arg[(3, 1, 0, 2)]=0.415556494483*x[0]**o + (-0.305524336365)*x[0] + (-0.266592414149)*x[1]**o + (-0.182102860605)*x[1]
        ref[(3, 1, 0, 2)]=0.415556494483*x_ref[0]**o + (-0.305524336365)*x_ref[0] + (-0.266592414149)*x_ref[1]**o + (-0.182102860605)*x_ref[1]
        arg[(3, 1, 0, 3)]=-0.214418756253*x[0]**o + (0.439683294369)*x[0] + (0.140125102178)*x[1]**o + (-0.913855149048)*x[1]
        ref[(3, 1, 0, 3)]=-0.214418756253*x_ref[0]**o + (0.439683294369)*x_ref[0] + (0.140125102178)*x_ref[1]**o + (-0.913855149048)*x_ref[1]
        arg[(3, 1, 1, 0)]=0.194702644276*x[0]**o + (-0.480298296174)*x[0] + (0.116680558101)*x[1]**o + (0.184952768981)*x[1]
        ref[(3, 1, 1, 0)]=0.194702644276*x_ref[0]**o + (-0.480298296174)*x_ref[0] + (0.116680558101)*x_ref[1]**o + (0.184952768981)*x_ref[1]
        arg[(3, 1, 1, 1)]=-0.470818010188*x[0]**o + (-0.434857693308)*x[0] + (-0.0379506670357)*x[1]**o + (0.2592570532)*x[1]
        ref[(3, 1, 1, 1)]=-0.470818010188*x_ref[0]**o + (-0.434857693308)*x_ref[0] + (-0.0379506670357)*x_ref[1]**o + (0.2592570532)*x_ref[1]
        arg[(3, 1, 1, 2)]=-0.445221342491*x[0]**o + (-0.62609123163)*x[0] + (-0.91409589232)*x[1]**o + (-0.986185938926)*x[1]
        ref[(3, 1, 1, 2)]=-0.445221342491*x_ref[0]**o + (-0.62609123163)*x_ref[0] + (-0.91409589232)*x_ref[1]**o + (-0.986185938926)*x_ref[1]
        arg[(3, 1, 1, 3)]=-0.958814559839*x[0]**o + (0.45369771821)*x[0] + (0.643148932298)*x[1]**o + (-0.200651835701)*x[1]
        ref[(3, 1, 1, 3)]=-0.958814559839*x_ref[0]**o + (0.45369771821)*x_ref[0] + (0.643148932298)*x_ref[1]**o + (-0.200651835701)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.186679829215*x[2]**o + (0.449079721886)*x[2]
            ref[(0, 0, 0, 0)]+=0.186679829215*x_ref[2]**o + (0.449079721886)*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.898316650723*x[2]**o + (0.52830328064)*x[2]
            ref[(0, 0, 0, 1)]+=-0.898316650723*x_ref[2]**o + (0.52830328064)*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.364797121936*x[2]**o + (-0.140200519673)*x[2]
            ref[(0, 0, 0, 2)]+=0.364797121936*x_ref[2]**o + (-0.140200519673)*x_ref[2]
            arg[(0, 0, 0, 3)]+=0.685599034265*x[2]**o + (0.727055922989)*x[2]
            ref[(0, 0, 0, 3)]+=0.685599034265*x_ref[2]**o + (0.727055922989)*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.35037989926*x[2]**o + (0.358598773222)*x[2]
            ref[(0, 0, 1, 0)]+=0.35037989926*x_ref[2]**o + (0.358598773222)*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.090940679788*x[2]**o + (-0.211851008042)*x[2]
            ref[(0, 0, 1, 1)]+=-0.090940679788*x_ref[2]**o + (-0.211851008042)*x_ref[2]
            arg[(0, 0, 1, 2)]+=0.460079593654*x[2]**o + (-0.0349521592703)*x[2]
            ref[(0, 0, 1, 2)]+=0.460079593654*x_ref[2]**o + (-0.0349521592703)*x_ref[2]
            arg[(0, 0, 1, 3)]+=-0.406112693138*x[2]**o + (0.168293725069)*x[2]
            ref[(0, 0, 1, 3)]+=-0.406112693138*x_ref[2]**o + (0.168293725069)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.234829968356*x[2]**o + (0.353652384202)*x[2]
            ref[(0, 1, 0, 0)]+=-0.234829968356*x_ref[2]**o + (0.353652384202)*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.571184154466*x[2]**o + (-0.756213653071)*x[2]
            ref[(0, 1, 0, 1)]+=0.571184154466*x_ref[2]**o + (-0.756213653071)*x_ref[2]
            arg[(0, 1, 0, 2)]+=0.588742346771*x[2]**o + (-0.878031626125)*x[2]
            ref[(0, 1, 0, 2)]+=0.588742346771*x_ref[2]**o + (-0.878031626125)*x_ref[2]
            arg[(0, 1, 0, 3)]+=0.402771973255*x[2]**o + (0.243960657985)*x[2]
            ref[(0, 1, 0, 3)]+=0.402771973255*x_ref[2]**o + (0.243960657985)*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.0578798516269*x[2]**o + (0.584615896745)*x[2]
            ref[(0, 1, 1, 0)]+=-0.0578798516269*x_ref[2]**o + (0.584615896745)*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.587091288435*x[2]**o + (0.128985935531)*x[2]
            ref[(0, 1, 1, 1)]+=-0.587091288435*x_ref[2]**o + (0.128985935531)*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.00868185566543*x[2]**o + (-0.757410286768)*x[2]
            ref[(0, 1, 1, 2)]+=0.00868185566543*x_ref[2]**o + (-0.757410286768)*x_ref[2]
            arg[(0, 1, 1, 3)]+=-0.0102680746376*x[2]**o + (0.741317427742)*x[2]
            ref[(0, 1, 1, 3)]+=-0.0102680746376*x_ref[2]**o + (0.741317427742)*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.872643035062*x[2]**o + (0.402574471797)*x[2]
            ref[(1, 0, 0, 0)]+=-0.872643035062*x_ref[2]**o + (0.402574471797)*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.716360973277*x[2]**o + (-0.7821141977)*x[2]
            ref[(1, 0, 0, 1)]+=-0.716360973277*x_ref[2]**o + (-0.7821141977)*x_ref[2]
            arg[(1, 0, 0, 2)]+=-0.558626895858*x[2]**o + (0.881275526712)*x[2]
            ref[(1, 0, 0, 2)]+=-0.558626895858*x_ref[2]**o + (0.881275526712)*x_ref[2]
            arg[(1, 0, 0, 3)]+=0.436283259058*x[2]**o + (0.598936871617)*x[2]
            ref[(1, 0, 0, 3)]+=0.436283259058*x_ref[2]**o + (0.598936871617)*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.843183366182*x[2]**o + (-0.322867304238)*x[2]
            ref[(1, 0, 1, 0)]+=0.843183366182*x_ref[2]**o + (-0.322867304238)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.611896489791*x[2]**o + (-0.667777468793)*x[2]
            ref[(1, 0, 1, 1)]+=-0.611896489791*x_ref[2]**o + (-0.667777468793)*x_ref[2]
            arg[(1, 0, 1, 2)]+=0.911496041101*x[2]**o + (0.167403546447)*x[2]
            ref[(1, 0, 1, 2)]+=0.911496041101*x_ref[2]**o + (0.167403546447)*x_ref[2]
            arg[(1, 0, 1, 3)]+=0.0189912555767*x[2]**o + (-0.893237826084)*x[2]
            ref[(1, 0, 1, 3)]+=0.0189912555767*x_ref[2]**o + (-0.893237826084)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.833793332265*x[2]**o + (-0.606117625031)*x[2]
            ref[(1, 1, 0, 0)]+=0.833793332265*x_ref[2]**o + (-0.606117625031)*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.587963895903*x[2]**o + (0.948201498683)*x[2]
            ref[(1, 1, 0, 1)]+=-0.587963895903*x_ref[2]**o + (0.948201498683)*x_ref[2]
            arg[(1, 1, 0, 2)]+=0.543694497229*x[2]**o + (-0.949089706103)*x[2]
            ref[(1, 1, 0, 2)]+=0.543694497229*x_ref[2]**o + (-0.949089706103)*x_ref[2]
            arg[(1, 1, 0, 3)]+=-0.811616943156*x[2]**o + (-0.313988329857)*x[2]
            ref[(1, 1, 0, 3)]+=-0.811616943156*x_ref[2]**o + (-0.313988329857)*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.471110361101*x[2]**o + (0.400722815874)*x[2]
            ref[(1, 1, 1, 0)]+=0.471110361101*x_ref[2]**o + (0.400722815874)*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.20760509884*x[2]**o + (0.922415186695)*x[2]
            ref[(1, 1, 1, 1)]+=0.20760509884*x_ref[2]**o + (0.922415186695)*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.0785688769979*x[2]**o + (0.912781827166)*x[2]
            ref[(1, 1, 1, 2)]+=-0.0785688769979*x_ref[2]**o + (0.912781827166)*x_ref[2]
            arg[(1, 1, 1, 3)]+=0.171761532881*x[2]**o + (-0.946594683357)*x[2]
            ref[(1, 1, 1, 3)]+=0.171761532881*x_ref[2]**o + (-0.946594683357)*x_ref[2]
            arg[(2, 0, 0, 0)]+=-0.149884999849*x[2]**o + (-0.905285079831)*x[2]
            ref[(2, 0, 0, 0)]+=-0.149884999849*x_ref[2]**o + (-0.905285079831)*x_ref[2]
            arg[(2, 0, 0, 1)]+=0.567384157889*x[2]**o + (0.115077848289)*x[2]
            ref[(2, 0, 0, 1)]+=0.567384157889*x_ref[2]**o + (0.115077848289)*x_ref[2]
            arg[(2, 0, 0, 2)]+=0.416508869237*x[2]**o + (-0.0605610809553)*x[2]
            ref[(2, 0, 0, 2)]+=0.416508869237*x_ref[2]**o + (-0.0605610809553)*x_ref[2]
            arg[(2, 0, 0, 3)]+=0.275720122862*x[2]**o + (-0.499396740643)*x[2]
            ref[(2, 0, 0, 3)]+=0.275720122862*x_ref[2]**o + (-0.499396740643)*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.183240601363*x[2]**o + (0.32612225929)*x[2]
            ref[(2, 0, 1, 0)]+=-0.183240601363*x_ref[2]**o + (0.32612225929)*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.61497457856*x[2]**o + (-0.743592706959)*x[2]
            ref[(2, 0, 1, 1)]+=0.61497457856*x_ref[2]**o + (-0.743592706959)*x_ref[2]
            arg[(2, 0, 1, 2)]+=-0.399235712748*x[2]**o + (-0.1142750833)*x[2]
            ref[(2, 0, 1, 2)]+=-0.399235712748*x_ref[2]**o + (-0.1142750833)*x_ref[2]
            arg[(2, 0, 1, 3)]+=-0.333816391859*x[2]**o + (-0.876309758641)*x[2]
            ref[(2, 0, 1, 3)]+=-0.333816391859*x_ref[2]**o + (-0.876309758641)*x_ref[2]
            arg[(2, 1, 0, 0)]+=0.709005884422*x[2]**o + (0.00781547470597)*x[2]
            ref[(2, 1, 0, 0)]+=0.709005884422*x_ref[2]**o + (0.00781547470597)*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.754700211859*x[2]**o + (-0.91745612529)*x[2]
            ref[(2, 1, 0, 1)]+=-0.754700211859*x_ref[2]**o + (-0.91745612529)*x_ref[2]
            arg[(2, 1, 0, 2)]+=-0.729509706121*x[2]**o + (-0.181807761334)*x[2]
            ref[(2, 1, 0, 2)]+=-0.729509706121*x_ref[2]**o + (-0.181807761334)*x_ref[2]
            arg[(2, 1, 0, 3)]+=-0.122766591419*x[2]**o + (0.734274847166)*x[2]
            ref[(2, 1, 0, 3)]+=-0.122766591419*x_ref[2]**o + (0.734274847166)*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.33607039957*x[2]**o + (-0.203876447822)*x[2]
            ref[(2, 1, 1, 0)]+=0.33607039957*x_ref[2]**o + (-0.203876447822)*x_ref[2]
            arg[(2, 1, 1, 1)]+=-0.645937244644*x[2]**o + (0.618733353224)*x[2]
            ref[(2, 1, 1, 1)]+=-0.645937244644*x_ref[2]**o + (0.618733353224)*x_ref[2]
            arg[(2, 1, 1, 2)]+=-0.194783107795*x[2]**o + (0.797838497867)*x[2]
            ref[(2, 1, 1, 2)]+=-0.194783107795*x_ref[2]**o + (0.797838497867)*x_ref[2]
            arg[(2, 1, 1, 3)]+=-0.276908665683*x[2]**o + (0.593797805951)*x[2]
            ref[(2, 1, 1, 3)]+=-0.276908665683*x_ref[2]**o + (0.593797805951)*x_ref[2]
            arg[(3, 0, 0, 0)]+=0.746765327754*x[2]**o + (0.124993764154)*x[2]
            ref[(3, 0, 0, 0)]+=0.746765327754*x_ref[2]**o + (0.124993764154)*x_ref[2]
            arg[(3, 0, 0, 1)]+=-0.357704402072*x[2]**o + (0.756378150597)*x[2]
            ref[(3, 0, 0, 1)]+=-0.357704402072*x_ref[2]**o + (0.756378150597)*x_ref[2]
            arg[(3, 0, 0, 2)]+=0.14972668441*x[2]**o + (-0.275780785752)*x[2]
            ref[(3, 0, 0, 2)]+=0.14972668441*x_ref[2]**o + (-0.275780785752)*x_ref[2]
            arg[(3, 0, 0, 3)]+=-0.824387661029*x[2]**o + (-0.394928367409)*x[2]
            ref[(3, 0, 0, 3)]+=-0.824387661029*x_ref[2]**o + (-0.394928367409)*x_ref[2]
            arg[(3, 0, 1, 0)]+=0.633472529879*x[2]**o + (-0.532239984083)*x[2]
            ref[(3, 0, 1, 0)]+=0.633472529879*x_ref[2]**o + (-0.532239984083)*x_ref[2]
            arg[(3, 0, 1, 1)]+=-0.103904973087*x[2]**o + (-0.102367718491)*x[2]
            ref[(3, 0, 1, 1)]+=-0.103904973087*x_ref[2]**o + (-0.102367718491)*x_ref[2]
            arg[(3, 0, 1, 2)]+=0.869198806155*x[2]**o + (-0.917622128788)*x[2]
            ref[(3, 0, 1, 2)]+=0.869198806155*x_ref[2]**o + (-0.917622128788)*x_ref[2]
            arg[(3, 0, 1, 3)]+=-0.351343741392*x[2]**o + (-0.0973790542942)*x[2]
            ref[(3, 0, 1, 3)]+=-0.351343741392*x_ref[2]**o + (-0.0973790542942)*x_ref[2]
            arg[(3, 1, 0, 0)]+=0.352817718698*x[2]**o + (-0.376453668975)*x[2]
            ref[(3, 1, 0, 0)]+=0.352817718698*x_ref[2]**o + (-0.376453668975)*x_ref[2]
            arg[(3, 1, 0, 1)]+=0.0957077746728*x[2]**o + (-0.607993745405)*x[2]
            ref[(3, 1, 0, 1)]+=0.0957077746728*x_ref[2]**o + (-0.607993745405)*x_ref[2]
            arg[(3, 1, 0, 2)]+=0.938565900606*x[2]**o + (-0.819704963067)*x[2]
            ref[(3, 1, 0, 2)]+=0.938565900606*x_ref[2]**o + (-0.819704963067)*x_ref[2]
            arg[(3, 1, 0, 3)]+=-0.830312767467*x[2]**o + (0.586600271219)*x[2]
            ref[(3, 1, 0, 3)]+=-0.830312767467*x_ref[2]**o + (0.586600271219)*x_ref[2]
            arg[(3, 1, 1, 0)]+=0.456086232406*x[2]**o + (-0.847145254252)*x[2]
            ref[(3, 1, 1, 0)]+=0.456086232406*x_ref[2]**o + (-0.847145254252)*x_ref[2]
            arg[(3, 1, 1, 1)]+=-0.770260778115*x[2]**o + (-0.306317470595)*x[2]
            ref[(3, 1, 1, 1)]+=-0.770260778115*x_ref[2]**o + (-0.306317470595)*x_ref[2]
            arg[(3, 1, 1, 2)]+=-0.00225504986891*x[2]**o + (0.891403064954)*x[2]
            ref[(3, 1, 1, 2)]+=-0.00225504986891*x_ref[2]**o + (0.891403064954)*x_ref[2]
            arg[(3, 1, 1, 3)]+=0.831327481617*x[2]**o + (0.435155241294)*x[2]
            ref[(3, 1, 1, 3)]+=0.831327481617*x_ref[2]**o + (0.435155241294)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.540261074702*x[0]**o + (0.0883068359097)*x[0] + (-0.0826559023575)*x[1]**o + (-0.858296828111)*x[1]
        ref=-0.540261074702*x_ref[0]**o + (0.0883068359097)*x_ref[0] + (-0.0826559023575)*x_ref[1]**o + (-0.858296828111)*x_ref[1]
        if dim==3:
            arg+=(0.640455816004)*x[2]**o + (-0.550686359574)*x[2]
            ref+=(0.640455816004)*x_ref[2]**o + (-0.550686359574)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=0.658561003256*x[0]**o + (0.126630489221)*x[0] + (-0.811407243301)*x[1]**o + (0.022511092734)*x[1]
        ref[(0,)]=0.658561003256*x_ref[0]**o + (0.126630489221)*x_ref[0] + (-0.811407243301)*x_ref[1]**o + (0.022511092734)*x_ref[1]
        arg[(1,)]=-0.0892217702404*x[0]**o + (-0.142776066067)*x[0] + (0.710756488971)*x[1]**o + (0.344474694936)*x[1]
        ref[(1,)]=-0.0892217702404*x_ref[0]**o + (-0.142776066067)*x_ref[0] + (0.710756488971)*x_ref[1]**o + (0.344474694936)*x_ref[1]
        arg[(2,)]=-0.531756962755*x[0]**o + (0.135290164924)*x[0] + (0.93026199894)*x[1]**o + (0.659258746643)*x[1]
        ref[(2,)]=-0.531756962755*x_ref[0]**o + (0.135290164924)*x_ref[0] + (0.93026199894)*x_ref[1]**o + (0.659258746643)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.173642217135*x[2]**o + (-0.729133498583)*x[2]
            ref[(0,)]+=0.173642217135*x_ref[2]**o + (-0.729133498583)*x_ref[2]
            arg[(1,)]+=0.337224300735*x[2]**o + (-0.868754948999)*x[2]
            ref[(1,)]+=0.337224300735*x_ref[2]**o + (-0.868754948999)*x_ref[2]
            arg[(2,)]+=-0.291453400548*x[2]**o + (0.238651929012)*x[2]
            ref[(2,)]+=-0.291453400548*x_ref[2]**o + (0.238651929012)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3),w)
        ref = Data(0,(3, 3),w_ref)
        arg[(0, 0)]=-0.422203680613*x[0]**o + (0.958448185259)*x[0] + (-0.00477121400323)*x[1]**o + (0.276583691634)*x[1]
        ref[(0, 0)]=-0.422203680613*x_ref[0]**o + (0.958448185259)*x_ref[0] + (-0.00477121400323)*x_ref[1]**o + (0.276583691634)*x_ref[1]
        arg[(0, 1)]=0.0291686007863*x[0]**o + (-0.871850649789)*x[0] + (-0.670990072351)*x[1]**o + (-0.0519551502558)*x[1]
        ref[(0, 1)]=0.0291686007863*x_ref[0]**o + (-0.871850649789)*x_ref[0] + (-0.670990072351)*x_ref[1]**o + (-0.0519551502558)*x_ref[1]
        arg[(0, 2)]=0.910323470653*x[0]**o + (0.806430990902)*x[0] + (-0.361745838419)*x[1]**o + (-0.851700640875)*x[1]
        ref[(0, 2)]=0.910323470653*x_ref[0]**o + (0.806430990902)*x_ref[0] + (-0.361745838419)*x_ref[1]**o + (-0.851700640875)*x_ref[1]
        arg[(1, 0)]=-0.307634581978*x[0]**o + (0.767453783163)*x[0] + (0.32255534299)*x[1]**o + (0.931465871084)*x[1]
        ref[(1, 0)]=-0.307634581978*x_ref[0]**o + (0.767453783163)*x_ref[0] + (0.32255534299)*x_ref[1]**o + (0.931465871084)*x_ref[1]
        arg[(1, 1)]=0.669631087935*x[0]**o + (-0.854112331169)*x[0] + (-0.923840118228)*x[1]**o + (0.893388142862)*x[1]
        ref[(1, 1)]=0.669631087935*x_ref[0]**o + (-0.854112331169)*x_ref[0] + (-0.923840118228)*x_ref[1]**o + (0.893388142862)*x_ref[1]
        arg[(1, 2)]=0.699732782472*x[0]**o + (0.209353768172)*x[0] + (-0.9185250375)*x[1]**o + (0.214120989782)*x[1]
        ref[(1, 2)]=0.699732782472*x_ref[0]**o + (0.209353768172)*x_ref[0] + (-0.9185250375)*x_ref[1]**o + (0.214120989782)*x_ref[1]
        arg[(2, 0)]=0.120827752834*x[0]**o + (0.352636519945)*x[0] + (0.179446221127)*x[1]**o + (0.691516646669)*x[1]
        ref[(2, 0)]=0.120827752834*x_ref[0]**o + (0.352636519945)*x_ref[0] + (0.179446221127)*x_ref[1]**o + (0.691516646669)*x_ref[1]
        arg[(2, 1)]=0.157641154902*x[0]**o + (0.716466507527)*x[0] + (0.477805059052)*x[1]**o + (0.591983908787)*x[1]
        ref[(2, 1)]=0.157641154902*x_ref[0]**o + (0.716466507527)*x_ref[0] + (0.477805059052)*x_ref[1]**o + (0.591983908787)*x_ref[1]
        arg[(2, 2)]=-0.259539280743*x[0]**o + (0.0862427307623)*x[0] + (0.57669939865)*x[1]**o + (-0.151339107974)*x[1]
        ref[(2, 2)]=-0.259539280743*x_ref[0]**o + (0.0862427307623)*x_ref[0] + (0.57669939865)*x_ref[1]**o + (-0.151339107974)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.558543571144*x[2]**o + (-0.436008927886)*x[2]
            ref[(0, 0)]+=-0.558543571144*x_ref[2]**o + (-0.436008927886)*x_ref[2]
            arg[(0, 1)]+=-0.834021917376*x[2]**o + (0.272265526922)*x[2]
            ref[(0, 1)]+=-0.834021917376*x_ref[2]**o + (0.272265526922)*x_ref[2]
            arg[(0, 2)]+=0.340467724703*x[2]**o + (-0.0177590516255)*x[2]
            ref[(0, 2)]+=0.340467724703*x_ref[2]**o + (-0.0177590516255)*x_ref[2]
            arg[(1, 0)]+=-0.205410086352*x[2]**o + (0.136079009667)*x[2]
            ref[(1, 0)]+=-0.205410086352*x_ref[2]**o + (0.136079009667)*x_ref[2]
            arg[(1, 1)]+=-0.220783134357*x[2]**o + (0.600754162941)*x[2]
            ref[(1, 1)]+=-0.220783134357*x_ref[2]**o + (0.600754162941)*x_ref[2]
            arg[(1, 2)]+=-0.541449261736*x[2]**o + (0.809986925358)*x[2]
            ref[(1, 2)]+=-0.541449261736*x_ref[2]**o + (0.809986925358)*x_ref[2]
            arg[(2, 0)]+=-0.0302577132867*x[2]**o + (-0.0498138844137)*x[2]
            ref[(2, 0)]+=-0.0302577132867*x_ref[2]**o + (-0.0498138844137)*x_ref[2]
            arg[(2, 1)]+=-0.410142082511*x[2]**o + (-0.57625866176)*x[2]
            ref[(2, 1)]+=-0.410142082511*x_ref[2]**o + (-0.57625866176)*x_ref[2]
            arg[(2, 2)]+=-0.0886411733153*x[2]**o + (-0.369388361724)*x[2]
            ref[(2, 2)]+=-0.0886411733153*x_ref[2]**o + (-0.369388361724)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 4),w)
        ref = Data(0,(2, 3, 4),w_ref)
        arg[(0, 0, 0)]=-0.279789445192*x[0]**o + (-0.803004545687)*x[0] + (-0.869867780338)*x[1]**o + (-0.723432397807)*x[1]
        ref[(0, 0, 0)]=-0.279789445192*x_ref[0]**o + (-0.803004545687)*x_ref[0] + (-0.869867780338)*x_ref[1]**o + (-0.723432397807)*x_ref[1]
        arg[(0, 0, 1)]=0.452838805204*x[0]**o + (0.163820948706)*x[0] + (0.384522748687)*x[1]**o + (-0.319547933731)*x[1]
        ref[(0, 0, 1)]=0.452838805204*x_ref[0]**o + (0.163820948706)*x_ref[0] + (0.384522748687)*x_ref[1]**o + (-0.319547933731)*x_ref[1]
        arg[(0, 0, 2)]=-0.26288656835*x[0]**o + (-0.502010285875)*x[0] + (-0.3952062165)*x[1]**o + (-0.874717758456)*x[1]
        ref[(0, 0, 2)]=-0.26288656835*x_ref[0]**o + (-0.502010285875)*x_ref[0] + (-0.3952062165)*x_ref[1]**o + (-0.874717758456)*x_ref[1]
        arg[(0, 0, 3)]=0.491825173849*x[0]**o + (-0.678790742797)*x[0] + (0.17700128393)*x[1]**o + (0.518036429254)*x[1]
        ref[(0, 0, 3)]=0.491825173849*x_ref[0]**o + (-0.678790742797)*x_ref[0] + (0.17700128393)*x_ref[1]**o + (0.518036429254)*x_ref[1]
        arg[(0, 1, 0)]=0.706683147488*x[0]**o + (-0.675602053079)*x[0] + (-0.832184834449)*x[1]**o + (-0.514812096121)*x[1]
        ref[(0, 1, 0)]=0.706683147488*x_ref[0]**o + (-0.675602053079)*x_ref[0] + (-0.832184834449)*x_ref[1]**o + (-0.514812096121)*x_ref[1]
        arg[(0, 1, 1)]=0.653788702582*x[0]**o + (-0.642446099899)*x[0] + (0.186613816868)*x[1]**o + (-0.55469615811)*x[1]
        ref[(0, 1, 1)]=0.653788702582*x_ref[0]**o + (-0.642446099899)*x_ref[0] + (0.186613816868)*x_ref[1]**o + (-0.55469615811)*x_ref[1]
        arg[(0, 1, 2)]=0.93366549883*x[0]**o + (-0.0581840324541)*x[0] + (-0.152961132776)*x[1]**o + (-0.168243018354)*x[1]
        ref[(0, 1, 2)]=0.93366549883*x_ref[0]**o + (-0.0581840324541)*x_ref[0] + (-0.152961132776)*x_ref[1]**o + (-0.168243018354)*x_ref[1]
        arg[(0, 1, 3)]=-0.190131849829*x[0]**o + (-0.162662483848)*x[0] + (0.658007193724)*x[1]**o + (0.736221204633)*x[1]
        ref[(0, 1, 3)]=-0.190131849829*x_ref[0]**o + (-0.162662483848)*x_ref[0] + (0.658007193724)*x_ref[1]**o + (0.736221204633)*x_ref[1]
        arg[(0, 2, 0)]=-0.100400769735*x[0]**o + (0.609652099041)*x[0] + (-0.925198058624)*x[1]**o + (0.603879642148)*x[1]
        ref[(0, 2, 0)]=-0.100400769735*x_ref[0]**o + (0.609652099041)*x_ref[0] + (-0.925198058624)*x_ref[1]**o + (0.603879642148)*x_ref[1]
        arg[(0, 2, 1)]=-0.89392302982*x[0]**o + (-0.957910286934)*x[0] + (-0.524477066769)*x[1]**o + (-0.753952272383)*x[1]
        ref[(0, 2, 1)]=-0.89392302982*x_ref[0]**o + (-0.957910286934)*x_ref[0] + (-0.524477066769)*x_ref[1]**o + (-0.753952272383)*x_ref[1]
        arg[(0, 2, 2)]=-0.538833506255*x[0]**o + (-0.811031200904)*x[0] + (0.184578229714)*x[1]**o + (-0.963522621075)*x[1]
        ref[(0, 2, 2)]=-0.538833506255*x_ref[0]**o + (-0.811031200904)*x_ref[0] + (0.184578229714)*x_ref[1]**o + (-0.963522621075)*x_ref[1]
        arg[(0, 2, 3)]=0.0732383542822*x[0]**o + (-0.440855214032)*x[0] + (0.791163269323)*x[1]**o + (-0.14083649025)*x[1]
        ref[(0, 2, 3)]=0.0732383542822*x_ref[0]**o + (-0.440855214032)*x_ref[0] + (0.791163269323)*x_ref[1]**o + (-0.14083649025)*x_ref[1]
        arg[(1, 0, 0)]=0.433657046246*x[0]**o + (-0.117619259964)*x[0] + (0.851764410042)*x[1]**o + (0.46046376776)*x[1]
        ref[(1, 0, 0)]=0.433657046246*x_ref[0]**o + (-0.117619259964)*x_ref[0] + (0.851764410042)*x_ref[1]**o + (0.46046376776)*x_ref[1]
        arg[(1, 0, 1)]=-0.199966480599*x[0]**o + (-0.0178603038091)*x[0] + (0.678994261943)*x[1]**o + (-0.420852548919)*x[1]
        ref[(1, 0, 1)]=-0.199966480599*x_ref[0]**o + (-0.0178603038091)*x_ref[0] + (0.678994261943)*x_ref[1]**o + (-0.420852548919)*x_ref[1]
        arg[(1, 0, 2)]=0.176428309221*x[0]**o + (-0.683887093229)*x[0] + (0.74408136267)*x[1]**o + (0.473901127728)*x[1]
        ref[(1, 0, 2)]=0.176428309221*x_ref[0]**o + (-0.683887093229)*x_ref[0] + (0.74408136267)*x_ref[1]**o + (0.473901127728)*x_ref[1]
        arg[(1, 0, 3)]=-0.273130116804*x[0]**o + (-0.292874589523)*x[0] + (0.259907250976)*x[1]**o + (0.412804981503)*x[1]
        ref[(1, 0, 3)]=-0.273130116804*x_ref[0]**o + (-0.292874589523)*x_ref[0] + (0.259907250976)*x_ref[1]**o + (0.412804981503)*x_ref[1]
        arg[(1, 1, 0)]=-0.630036965325*x[0]**o + (-0.263931878124)*x[0] + (-0.993544770065)*x[1]**o + (-0.440348367461)*x[1]
        ref[(1, 1, 0)]=-0.630036965325*x_ref[0]**o + (-0.263931878124)*x_ref[0] + (-0.993544770065)*x_ref[1]**o + (-0.440348367461)*x_ref[1]
        arg[(1, 1, 1)]=0.390594194647*x[0]**o + (0.646890184536)*x[0] + (0.48750253553)*x[1]**o + (-0.842224956724)*x[1]
        ref[(1, 1, 1)]=0.390594194647*x_ref[0]**o + (0.646890184536)*x_ref[0] + (0.48750253553)*x_ref[1]**o + (-0.842224956724)*x_ref[1]
        arg[(1, 1, 2)]=-0.869730078171*x[0]**o + (-0.846266679277)*x[0] + (-0.466419247749)*x[1]**o + (0.27868016482)*x[1]
        ref[(1, 1, 2)]=-0.869730078171*x_ref[0]**o + (-0.846266679277)*x_ref[0] + (-0.466419247749)*x_ref[1]**o + (0.27868016482)*x_ref[1]
        arg[(1, 1, 3)]=-0.590143257806*x[0]**o + (0.631573043054)*x[0] + (-0.264805478625)*x[1]**o + (-0.0462550488686)*x[1]
        ref[(1, 1, 3)]=-0.590143257806*x_ref[0]**o + (0.631573043054)*x_ref[0] + (-0.264805478625)*x_ref[1]**o + (-0.0462550488686)*x_ref[1]
        arg[(1, 2, 0)]=-0.968126526827*x[0]**o + (-0.875816294686)*x[0] + (-0.62516137147)*x[1]**o + (-0.803588020751)*x[1]
        ref[(1, 2, 0)]=-0.968126526827*x_ref[0]**o + (-0.875816294686)*x_ref[0] + (-0.62516137147)*x_ref[1]**o + (-0.803588020751)*x_ref[1]
        arg[(1, 2, 1)]=0.737508290988*x[0]**o + (0.138199590331)*x[0] + (0.625770001682)*x[1]**o + (0.682684119159)*x[1]
        ref[(1, 2, 1)]=0.737508290988*x_ref[0]**o + (0.138199590331)*x_ref[0] + (0.625770001682)*x_ref[1]**o + (0.682684119159)*x_ref[1]
        arg[(1, 2, 2)]=0.0164384695418*x[0]**o + (-0.00784846187135)*x[0] + (0.228852086666)*x[1]**o + (-0.555999551113)*x[1]
        ref[(1, 2, 2)]=0.0164384695418*x_ref[0]**o + (-0.00784846187135)*x_ref[0] + (0.228852086666)*x_ref[1]**o + (-0.555999551113)*x_ref[1]
        arg[(1, 2, 3)]=0.980317518879*x[0]**o + (0.0761238919031)*x[0] + (0.810394224863)*x[1]**o + (0.838590749431)*x[1]
        ref[(1, 2, 3)]=0.980317518879*x_ref[0]**o + (0.0761238919031)*x_ref[0] + (0.810394224863)*x_ref[1]**o + (0.838590749431)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.743275459123*x[2]**o + (0.613302001512)*x[2]
            ref[(0, 0, 0)]+=-0.743275459123*x_ref[2]**o + (0.613302001512)*x_ref[2]
            arg[(0, 0, 1)]+=-0.998083297141*x[2]**o + (-0.370417911613)*x[2]
            ref[(0, 0, 1)]+=-0.998083297141*x_ref[2]**o + (-0.370417911613)*x_ref[2]
            arg[(0, 0, 2)]+=-0.148284789061*x[2]**o + (0.084764305618)*x[2]
            ref[(0, 0, 2)]+=-0.148284789061*x_ref[2]**o + (0.084764305618)*x_ref[2]
            arg[(0, 0, 3)]+=0.919134535612*x[2]**o + (0.684257559449)*x[2]
            ref[(0, 0, 3)]+=0.919134535612*x_ref[2]**o + (0.684257559449)*x_ref[2]
            arg[(0, 1, 0)]+=0.430273164507*x[2]**o + (0.228585035484)*x[2]
            ref[(0, 1, 0)]+=0.430273164507*x_ref[2]**o + (0.228585035484)*x_ref[2]
            arg[(0, 1, 1)]+=0.612876446312*x[2]**o + (0.945733694426)*x[2]
            ref[(0, 1, 1)]+=0.612876446312*x_ref[2]**o + (0.945733694426)*x_ref[2]
            arg[(0, 1, 2)]+=0.874667145156*x[2]**o + (0.358641085261)*x[2]
            ref[(0, 1, 2)]+=0.874667145156*x_ref[2]**o + (0.358641085261)*x_ref[2]
            arg[(0, 1, 3)]+=0.421612822165*x[2]**o + (-0.512102660735)*x[2]
            ref[(0, 1, 3)]+=0.421612822165*x_ref[2]**o + (-0.512102660735)*x_ref[2]
            arg[(0, 2, 0)]+=0.0369554524228*x[2]**o + (-0.218165773563)*x[2]
            ref[(0, 2, 0)]+=0.0369554524228*x_ref[2]**o + (-0.218165773563)*x_ref[2]
            arg[(0, 2, 1)]+=0.029537372455*x[2]**o + (0.112166689207)*x[2]
            ref[(0, 2, 1)]+=0.029537372455*x_ref[2]**o + (0.112166689207)*x_ref[2]
            arg[(0, 2, 2)]+=-0.0590599592105*x[2]**o + (-0.699510624928)*x[2]
            ref[(0, 2, 2)]+=-0.0590599592105*x_ref[2]**o + (-0.699510624928)*x_ref[2]
            arg[(0, 2, 3)]+=-0.947456471458*x[2]**o + (0.380574711899)*x[2]
            ref[(0, 2, 3)]+=-0.947456471458*x_ref[2]**o + (0.380574711899)*x_ref[2]
            arg[(1, 0, 0)]+=-0.47113042343*x[2]**o + (0.992951373319)*x[2]
            ref[(1, 0, 0)]+=-0.47113042343*x_ref[2]**o + (0.992951373319)*x_ref[2]
            arg[(1, 0, 1)]+=-0.641520657397*x[2]**o + (0.504607483865)*x[2]
            ref[(1, 0, 1)]+=-0.641520657397*x_ref[2]**o + (0.504607483865)*x_ref[2]
            arg[(1, 0, 2)]+=0.770730107723*x[2]**o + (-0.708040888678)*x[2]
            ref[(1, 0, 2)]+=0.770730107723*x_ref[2]**o + (-0.708040888678)*x_ref[2]
            arg[(1, 0, 3)]+=0.00984418177831*x[2]**o + (0.829757844855)*x[2]
            ref[(1, 0, 3)]+=0.00984418177831*x_ref[2]**o + (0.829757844855)*x_ref[2]
            arg[(1, 1, 0)]+=-0.730735670952*x[2]**o + (-0.382889292544)*x[2]
            ref[(1, 1, 0)]+=-0.730735670952*x_ref[2]**o + (-0.382889292544)*x_ref[2]
            arg[(1, 1, 1)]+=0.548924891426*x[2]**o + (0.833213438032)*x[2]
            ref[(1, 1, 1)]+=0.548924891426*x_ref[2]**o + (0.833213438032)*x_ref[2]
            arg[(1, 1, 2)]+=0.232717232987*x[2]**o + (0.717919443436)*x[2]
            ref[(1, 1, 2)]+=0.232717232987*x_ref[2]**o + (0.717919443436)*x_ref[2]
            arg[(1, 1, 3)]+=-0.693993076093*x[2]**o + (-0.737022653667)*x[2]
            ref[(1, 1, 3)]+=-0.693993076093*x_ref[2]**o + (-0.737022653667)*x_ref[2]
            arg[(1, 2, 0)]+=-0.38411972367*x[2]**o + (0.0299800202218)*x[2]
            ref[(1, 2, 0)]+=-0.38411972367*x_ref[2]**o + (0.0299800202218)*x_ref[2]
            arg[(1, 2, 1)]+=-0.507103804642*x[2]**o + (-0.829156143047)*x[2]
            ref[(1, 2, 1)]+=-0.507103804642*x_ref[2]**o + (-0.829156143047)*x_ref[2]
            arg[(1, 2, 2)]+=-0.675891000083*x[2]**o + (0.0788334620881)*x[2]
            ref[(1, 2, 2)]+=-0.675891000083*x_ref[2]**o + (0.0788334620881)*x_ref[2]
            arg[(1, 2, 3)]+=-0.64448546121*x[2]**o + (-0.630946416575)*x[2]
            ref[(1, 2, 3)]+=-0.64448546121*x_ref[2]**o + (-0.630946416575)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 3, 2),w)
        ref = Data(0,(2, 3, 3, 2),w_ref)
        arg[(0, 0, 0, 0)]=0.808972008177*x[0]**o + (0.932115135693)*x[0] + (0.588942899445)*x[1]**o + (0.903778954161)*x[1]
        ref[(0, 0, 0, 0)]=0.808972008177*x_ref[0]**o + (0.932115135693)*x_ref[0] + (0.588942899445)*x_ref[1]**o + (0.903778954161)*x_ref[1]
        arg[(0, 0, 0, 1)]=-0.421546092866*x[0]**o + (0.45866597591)*x[0] + (-0.524663203304)*x[1]**o + (0.151410462789)*x[1]
        ref[(0, 0, 0, 1)]=-0.421546092866*x_ref[0]**o + (0.45866597591)*x_ref[0] + (-0.524663203304)*x_ref[1]**o + (0.151410462789)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.0272512534436*x[0]**o + (-0.302740295145)*x[0] + (-0.407008410911)*x[1]**o + (0.785895728238)*x[1]
        ref[(0, 0, 1, 0)]=-0.0272512534436*x_ref[0]**o + (-0.302740295145)*x_ref[0] + (-0.407008410911)*x_ref[1]**o + (0.785895728238)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.226437535945*x[0]**o + (0.484624856745)*x[0] + (0.0550081918785)*x[1]**o + (0.27177365855)*x[1]
        ref[(0, 0, 1, 1)]=0.226437535945*x_ref[0]**o + (0.484624856745)*x_ref[0] + (0.0550081918785)*x_ref[1]**o + (0.27177365855)*x_ref[1]
        arg[(0, 0, 2, 0)]=0.135371350699*x[0]**o + (-0.727661108415)*x[0] + (-0.127090766429)*x[1]**o + (0.549287039799)*x[1]
        ref[(0, 0, 2, 0)]=0.135371350699*x_ref[0]**o + (-0.727661108415)*x_ref[0] + (-0.127090766429)*x_ref[1]**o + (0.549287039799)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.613523622175*x[0]**o + (0.346974021435)*x[0] + (0.377561184775)*x[1]**o + (-0.372825512937)*x[1]
        ref[(0, 0, 2, 1)]=-0.613523622175*x_ref[0]**o + (0.346974021435)*x_ref[0] + (0.377561184775)*x_ref[1]**o + (-0.372825512937)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.668510802002*x[0]**o + (0.873119034562)*x[0] + (0.716425377022)*x[1]**o + (-0.585891419598)*x[1]
        ref[(0, 1, 0, 0)]=-0.668510802002*x_ref[0]**o + (0.873119034562)*x_ref[0] + (0.716425377022)*x_ref[1]**o + (-0.585891419598)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.399335292604*x[0]**o + (0.986864583205)*x[0] + (-0.00591549018247)*x[1]**o + (0.778554936603)*x[1]
        ref[(0, 1, 0, 1)]=0.399335292604*x_ref[0]**o + (0.986864583205)*x_ref[0] + (-0.00591549018247)*x_ref[1]**o + (0.778554936603)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.045660948039*x[0]**o + (0.318874559495)*x[0] + (-0.00514893732773)*x[1]**o + (0.108781341193)*x[1]
        ref[(0, 1, 1, 0)]=-0.045660948039*x_ref[0]**o + (0.318874559495)*x_ref[0] + (-0.00514893732773)*x_ref[1]**o + (0.108781341193)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.885823449195*x[0]**o + (-0.47728720819)*x[0] + (-0.533528827288)*x[1]**o + (0.712469744908)*x[1]
        ref[(0, 1, 1, 1)]=-0.885823449195*x_ref[0]**o + (-0.47728720819)*x_ref[0] + (-0.533528827288)*x_ref[1]**o + (0.712469744908)*x_ref[1]
        arg[(0, 1, 2, 0)]=0.145027775071*x[0]**o + (0.262873269026)*x[0] + (0.629428755632)*x[1]**o + (0.146999509703)*x[1]
        ref[(0, 1, 2, 0)]=0.145027775071*x_ref[0]**o + (0.262873269026)*x_ref[0] + (0.629428755632)*x_ref[1]**o + (0.146999509703)*x_ref[1]
        arg[(0, 1, 2, 1)]=-0.307720780386*x[0]**o + (0.550473594814)*x[0] + (0.183000007238)*x[1]**o + (-0.959727902286)*x[1]
        ref[(0, 1, 2, 1)]=-0.307720780386*x_ref[0]**o + (0.550473594814)*x_ref[0] + (0.183000007238)*x_ref[1]**o + (-0.959727902286)*x_ref[1]
        arg[(0, 2, 0, 0)]=-0.387372990858*x[0]**o + (-0.544700877199)*x[0] + (0.392215406279)*x[1]**o + (0.817481397883)*x[1]
        ref[(0, 2, 0, 0)]=-0.387372990858*x_ref[0]**o + (-0.544700877199)*x_ref[0] + (0.392215406279)*x_ref[1]**o + (0.817481397883)*x_ref[1]
        arg[(0, 2, 0, 1)]=0.785705466724*x[0]**o + (-0.785440368111)*x[0] + (-0.309906968158)*x[1]**o + (-0.507276469039)*x[1]
        ref[(0, 2, 0, 1)]=0.785705466724*x_ref[0]**o + (-0.785440368111)*x_ref[0] + (-0.309906968158)*x_ref[1]**o + (-0.507276469039)*x_ref[1]
        arg[(0, 2, 1, 0)]=-0.852753933801*x[0]**o + (-0.113663850125)*x[0] + (0.250403022034)*x[1]**o + (0.995214023661)*x[1]
        ref[(0, 2, 1, 0)]=-0.852753933801*x_ref[0]**o + (-0.113663850125)*x_ref[0] + (0.250403022034)*x_ref[1]**o + (0.995214023661)*x_ref[1]
        arg[(0, 2, 1, 1)]=-0.660116458511*x[0]**o + (0.765943616317)*x[0] + (-0.497663952834)*x[1]**o + (-0.0513901159794)*x[1]
        ref[(0, 2, 1, 1)]=-0.660116458511*x_ref[0]**o + (0.765943616317)*x_ref[0] + (-0.497663952834)*x_ref[1]**o + (-0.0513901159794)*x_ref[1]
        arg[(0, 2, 2, 0)]=0.531043045116*x[0]**o + (0.465039070753)*x[0] + (0.884032965262)*x[1]**o + (0.995567943088)*x[1]
        ref[(0, 2, 2, 0)]=0.531043045116*x_ref[0]**o + (0.465039070753)*x_ref[0] + (0.884032965262)*x_ref[1]**o + (0.995567943088)*x_ref[1]
        arg[(0, 2, 2, 1)]=-0.819768632991*x[0]**o + (-0.727041657421)*x[0] + (-0.63433110096)*x[1]**o + (-0.191118608456)*x[1]
        ref[(0, 2, 2, 1)]=-0.819768632991*x_ref[0]**o + (-0.727041657421)*x_ref[0] + (-0.63433110096)*x_ref[1]**o + (-0.191118608456)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.0878150506454*x[0]**o + (-0.205961796205)*x[0] + (0.367243972279)*x[1]**o + (-0.555958027441)*x[1]
        ref[(1, 0, 0, 0)]=0.0878150506454*x_ref[0]**o + (-0.205961796205)*x_ref[0] + (0.367243972279)*x_ref[1]**o + (-0.555958027441)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.45403661427*x[0]**o + (-0.019807317304)*x[0] + (-0.951088635888)*x[1]**o + (-0.869606757748)*x[1]
        ref[(1, 0, 0, 1)]=0.45403661427*x_ref[0]**o + (-0.019807317304)*x_ref[0] + (-0.951088635888)*x_ref[1]**o + (-0.869606757748)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.377057896181*x[0]**o + (-0.414941739379)*x[0] + (0.465455884511)*x[1]**o + (-0.618911266013)*x[1]
        ref[(1, 0, 1, 0)]=0.377057896181*x_ref[0]**o + (-0.414941739379)*x_ref[0] + (0.465455884511)*x_ref[1]**o + (-0.618911266013)*x_ref[1]
        arg[(1, 0, 1, 1)]=-0.38197310485*x[0]**o + (-0.723560841607)*x[0] + (-0.409425063229)*x[1]**o + (0.931142828957)*x[1]
        ref[(1, 0, 1, 1)]=-0.38197310485*x_ref[0]**o + (-0.723560841607)*x_ref[0] + (-0.409425063229)*x_ref[1]**o + (0.931142828957)*x_ref[1]
        arg[(1, 0, 2, 0)]=-0.739936630355*x[0]**o + (-0.849518585343)*x[0] + (0.526587455181)*x[1]**o + (0.628152367953)*x[1]
        ref[(1, 0, 2, 0)]=-0.739936630355*x_ref[0]**o + (-0.849518585343)*x_ref[0] + (0.526587455181)*x_ref[1]**o + (0.628152367953)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.622998878102*x[0]**o + (0.0163404277017)*x[0] + (-0.459325953301)*x[1]**o + (-0.701197131204)*x[1]
        ref[(1, 0, 2, 1)]=0.622998878102*x_ref[0]**o + (0.0163404277017)*x_ref[0] + (-0.459325953301)*x_ref[1]**o + (-0.701197131204)*x_ref[1]
        arg[(1, 1, 0, 0)]=0.394553779577*x[0]**o + (0.487279028663)*x[0] + (-0.925460722708)*x[1]**o + (0.512496294968)*x[1]
        ref[(1, 1, 0, 0)]=0.394553779577*x_ref[0]**o + (0.487279028663)*x_ref[0] + (-0.925460722708)*x_ref[1]**o + (0.512496294968)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.853840673247*x[0]**o + (0.241998032376)*x[0] + (-0.131422005628)*x[1]**o + (-0.061639009816)*x[1]
        ref[(1, 1, 0, 1)]=0.853840673247*x_ref[0]**o + (0.241998032376)*x_ref[0] + (-0.131422005628)*x_ref[1]**o + (-0.061639009816)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.181782049007*x[0]**o + (-0.980464826165)*x[0] + (0.257345231469)*x[1]**o + (0.671193474114)*x[1]
        ref[(1, 1, 1, 0)]=-0.181782049007*x_ref[0]**o + (-0.980464826165)*x_ref[0] + (0.257345231469)*x_ref[1]**o + (0.671193474114)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.617517694215*x[0]**o + (-0.153765418408)*x[0] + (-0.562189416761)*x[1]**o + (0.0390328917421)*x[1]
        ref[(1, 1, 1, 1)]=-0.617517694215*x_ref[0]**o + (-0.153765418408)*x_ref[0] + (-0.562189416761)*x_ref[1]**o + (0.0390328917421)*x_ref[1]
        arg[(1, 1, 2, 0)]=0.910765950175*x[0]**o + (-0.370044426411)*x[0] + (0.643208989101)*x[1]**o + (-0.380048694597)*x[1]
        ref[(1, 1, 2, 0)]=0.910765950175*x_ref[0]**o + (-0.370044426411)*x_ref[0] + (0.643208989101)*x_ref[1]**o + (-0.380048694597)*x_ref[1]
        arg[(1, 1, 2, 1)]=0.309695553446*x[0]**o + (-0.177501138503)*x[0] + (-0.186957654311)*x[1]**o + (-0.776052095943)*x[1]
        ref[(1, 1, 2, 1)]=0.309695553446*x_ref[0]**o + (-0.177501138503)*x_ref[0] + (-0.186957654311)*x_ref[1]**o + (-0.776052095943)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.648790281673*x[0]**o + (0.74988853735)*x[0] + (-0.805817728816)*x[1]**o + (-0.507950022726)*x[1]
        ref[(1, 2, 0, 0)]=-0.648790281673*x_ref[0]**o + (0.74988853735)*x_ref[0] + (-0.805817728816)*x_ref[1]**o + (-0.507950022726)*x_ref[1]
        arg[(1, 2, 0, 1)]=0.483021378981*x[0]**o + (0.997981399858)*x[0] + (-0.318726241756)*x[1]**o + (-0.583567435435)*x[1]
        ref[(1, 2, 0, 1)]=0.483021378981*x_ref[0]**o + (0.997981399858)*x_ref[0] + (-0.318726241756)*x_ref[1]**o + (-0.583567435435)*x_ref[1]
        arg[(1, 2, 1, 0)]=-0.239281740311*x[0]**o + (-0.466613097929)*x[0] + (0.758757453512)*x[1]**o + (-0.926813936263)*x[1]
        ref[(1, 2, 1, 0)]=-0.239281740311*x_ref[0]**o + (-0.466613097929)*x_ref[0] + (0.758757453512)*x_ref[1]**o + (-0.926813936263)*x_ref[1]
        arg[(1, 2, 1, 1)]=-0.306353139133*x[0]**o + (0.334377000866)*x[0] + (-0.349953570214)*x[1]**o + (-0.348191929205)*x[1]
        ref[(1, 2, 1, 1)]=-0.306353139133*x_ref[0]**o + (0.334377000866)*x_ref[0] + (-0.349953570214)*x_ref[1]**o + (-0.348191929205)*x_ref[1]
        arg[(1, 2, 2, 0)]=-0.0700604908831*x[0]**o + (0.765912795051)*x[0] + (0.111119377048)*x[1]**o + (0.262684594992)*x[1]
        ref[(1, 2, 2, 0)]=-0.0700604908831*x_ref[0]**o + (0.765912795051)*x_ref[0] + (0.111119377048)*x_ref[1]**o + (0.262684594992)*x_ref[1]
        arg[(1, 2, 2, 1)]=0.374790042099*x[0]**o + (0.720844275585)*x[0] + (0.87057329262)*x[1]**o + (0.825305993931)*x[1]
        ref[(1, 2, 2, 1)]=0.374790042099*x_ref[0]**o + (0.720844275585)*x_ref[0] + (0.87057329262)*x_ref[1]**o + (0.825305993931)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.868538174195*x[2]**o + (-0.197712916591)*x[2]
            ref[(0, 0, 0, 0)]+=-0.868538174195*x_ref[2]**o + (-0.197712916591)*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.800088525271*x[2]**o + (0.3289268375)*x[2]
            ref[(0, 0, 0, 1)]+=-0.800088525271*x_ref[2]**o + (0.3289268375)*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.633362822061*x[2]**o + (0.731268823027)*x[2]
            ref[(0, 0, 1, 0)]+=-0.633362822061*x_ref[2]**o + (0.731268823027)*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.40296568102*x[2]**o + (0.93872768826)*x[2]
            ref[(0, 0, 1, 1)]+=-0.40296568102*x_ref[2]**o + (0.93872768826)*x_ref[2]
            arg[(0, 0, 2, 0)]+=0.96924897941*x[2]**o + (0.141690525747)*x[2]
            ref[(0, 0, 2, 0)]+=0.96924897941*x_ref[2]**o + (0.141690525747)*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.466533638867*x[2]**o + (0.808453273743)*x[2]
            ref[(0, 0, 2, 1)]+=0.466533638867*x_ref[2]**o + (0.808453273743)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.512842361975*x[2]**o + (-0.685823936286)*x[2]
            ref[(0, 1, 0, 0)]+=-0.512842361975*x_ref[2]**o + (-0.685823936286)*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.678718652837*x[2]**o + (-0.883842086425)*x[2]
            ref[(0, 1, 0, 1)]+=-0.678718652837*x_ref[2]**o + (-0.883842086425)*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.386292083628*x[2]**o + (0.115670047681)*x[2]
            ref[(0, 1, 1, 0)]+=-0.386292083628*x_ref[2]**o + (0.115670047681)*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.664604265714*x[2]**o + (0.373146281594)*x[2]
            ref[(0, 1, 1, 1)]+=-0.664604265714*x_ref[2]**o + (0.373146281594)*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.0158117065519*x[2]**o + (0.822288414629)*x[2]
            ref[(0, 1, 2, 0)]+=-0.0158117065519*x_ref[2]**o + (0.822288414629)*x_ref[2]
            arg[(0, 1, 2, 1)]+=0.0158791335726*x[2]**o + (0.980186682986)*x[2]
            ref[(0, 1, 2, 1)]+=0.0158791335726*x_ref[2]**o + (0.980186682986)*x_ref[2]
            arg[(0, 2, 0, 0)]+=-0.102061122329*x[2]**o + (0.489412737555)*x[2]
            ref[(0, 2, 0, 0)]+=-0.102061122329*x_ref[2]**o + (0.489412737555)*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.256977756904*x[2]**o + (0.0147167318801)*x[2]
            ref[(0, 2, 0, 1)]+=-0.256977756904*x_ref[2]**o + (0.0147167318801)*x_ref[2]
            arg[(0, 2, 1, 0)]+=0.158616865085*x[2]**o + (-0.737760206003)*x[2]
            ref[(0, 2, 1, 0)]+=0.158616865085*x_ref[2]**o + (-0.737760206003)*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.589371361947*x[2]**o + (0.879840510852)*x[2]
            ref[(0, 2, 1, 1)]+=-0.589371361947*x_ref[2]**o + (0.879840510852)*x_ref[2]
            arg[(0, 2, 2, 0)]+=0.844742367613*x[2]**o + (0.628647035403)*x[2]
            ref[(0, 2, 2, 0)]+=0.844742367613*x_ref[2]**o + (0.628647035403)*x_ref[2]
            arg[(0, 2, 2, 1)]+=0.861511856302*x[2]**o + (-0.946300427215)*x[2]
            ref[(0, 2, 2, 1)]+=0.861511856302*x_ref[2]**o + (-0.946300427215)*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.045780322074*x[2]**o + (-0.197473294252)*x[2]
            ref[(1, 0, 0, 0)]+=-0.045780322074*x_ref[2]**o + (-0.197473294252)*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.114868095498*x[2]**o + (0.553434470887)*x[2]
            ref[(1, 0, 0, 1)]+=-0.114868095498*x_ref[2]**o + (0.553434470887)*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.343615039026*x[2]**o + (-0.841959703611)*x[2]
            ref[(1, 0, 1, 0)]+=-0.343615039026*x_ref[2]**o + (-0.841959703611)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.769130011049*x[2]**o + (0.138624365841)*x[2]
            ref[(1, 0, 1, 1)]+=-0.769130011049*x_ref[2]**o + (0.138624365841)*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.432672936925*x[2]**o + (-0.403371643794)*x[2]
            ref[(1, 0, 2, 0)]+=-0.432672936925*x_ref[2]**o + (-0.403371643794)*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.349825153573*x[2]**o + (0.733439312367)*x[2]
            ref[(1, 0, 2, 1)]+=0.349825153573*x_ref[2]**o + (0.733439312367)*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.900738907606*x[2]**o + (-0.601573045964)*x[2]
            ref[(1, 1, 0, 0)]+=-0.900738907606*x_ref[2]**o + (-0.601573045964)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.499313188488*x[2]**o + (0.720449908809)*x[2]
            ref[(1, 1, 0, 1)]+=0.499313188488*x_ref[2]**o + (0.720449908809)*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.457377673888*x[2]**o + (-0.669706177097)*x[2]
            ref[(1, 1, 1, 0)]+=-0.457377673888*x_ref[2]**o + (-0.669706177097)*x_ref[2]
            arg[(1, 1, 1, 1)]+=-0.482280249177*x[2]**o + (-0.285458922183)*x[2]
            ref[(1, 1, 1, 1)]+=-0.482280249177*x_ref[2]**o + (-0.285458922183)*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.833697598791*x[2]**o + (0.912912361033)*x[2]
            ref[(1, 1, 2, 0)]+=-0.833697598791*x_ref[2]**o + (0.912912361033)*x_ref[2]
            arg[(1, 1, 2, 1)]+=-0.0670794522936*x[2]**o + (0.593907022696)*x[2]
            ref[(1, 1, 2, 1)]+=-0.0670794522936*x_ref[2]**o + (0.593907022696)*x_ref[2]
            arg[(1, 2, 0, 0)]+=0.857745398358*x[2]**o + (-0.475080377374)*x[2]
            ref[(1, 2, 0, 0)]+=0.857745398358*x_ref[2]**o + (-0.475080377374)*x_ref[2]
            arg[(1, 2, 0, 1)]+=-0.718310177573*x[2]**o + (-0.0483406034319)*x[2]
            ref[(1, 2, 0, 1)]+=-0.718310177573*x_ref[2]**o + (-0.0483406034319)*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.837006807955*x[2]**o + (-0.228191572491)*x[2]
            ref[(1, 2, 1, 0)]+=0.837006807955*x_ref[2]**o + (-0.228191572491)*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.257907495706*x[2]**o + (0.634970806106)*x[2]
            ref[(1, 2, 1, 1)]+=0.257907495706*x_ref[2]**o + (0.634970806106)*x_ref[2]
            arg[(1, 2, 2, 0)]+=-0.695929330206*x[2]**o + (-0.827548011249)*x[2]
            ref[(1, 2, 2, 0)]+=-0.695929330206*x_ref[2]**o + (-0.827548011249)*x_ref[2]
            arg[(1, 2, 2, 1)]+=-0.37067144628*x[2]**o + (-0.74802628629)*x[2]
            ref[(1, 2, 2, 1)]+=-0.37067144628*x_ref[2]**o + (-0.74802628629)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.151903288673*x[0] + (0.852613250608)*x[1]
        ref=0.151903288673*x_ref[0] + (0.852613250608)*x_ref[1]
        if dim==3:
            arg+=(-0.471035962574)*x[2]
            ref+=(-0.471035962574)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=0.557940142953*x[0] + (0.850285246699)*x[1]
        ref[(0,)]=0.557940142953*x_ref[0] + (0.850285246699)*x_ref[1]
        arg[(1,)]=-0.341532816525*x[0] + (0.124891415512)*x[1]
        ref[(1,)]=-0.341532816525*x_ref[0] + (0.124891415512)*x_ref[1]
        arg[(2,)]=0.177680742601*x[0] + (0.340506643962)*x[1]
        ref[(2,)]=0.177680742601*x_ref[0] + (0.340506643962)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.357627946661*x[2]
            ref[(0,)]+=-0.357627946661*x_ref[2]
            arg[(1,)]+=0.123496037156*x[2]
            ref[(1,)]+=0.123496037156*x_ref[2]
            arg[(2,)]+=0.752678048538*x[2]
            ref[(2,)]+=0.752678048538*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2),w)
        ref = Data(0,(3, 2),w_ref)
        arg[(0, 0)]=0.569143684136*x[0] + (0.83004588792)*x[1]
        ref[(0, 0)]=0.569143684136*x_ref[0] + (0.83004588792)*x_ref[1]
        arg[(0, 1)]=-0.91976037804*x[0] + (-0.471801750313)*x[1]
        ref[(0, 1)]=-0.91976037804*x_ref[0] + (-0.471801750313)*x_ref[1]
        arg[(1, 0)]=-0.491419063423*x[0] + (0.747493264836)*x[1]
        ref[(1, 0)]=-0.491419063423*x_ref[0] + (0.747493264836)*x_ref[1]
        arg[(1, 1)]=-0.451296322817*x[0] + (0.722303348103)*x[1]
        ref[(1, 1)]=-0.451296322817*x_ref[0] + (0.722303348103)*x_ref[1]
        arg[(2, 0)]=0.0426721275503*x[0] + (0.0567871225572)*x[1]
        ref[(2, 0)]=0.0426721275503*x_ref[0] + (0.0567871225572)*x_ref[1]
        arg[(2, 1)]=-0.681942004161*x[0] + (-0.290347776996)*x[1]
        ref[(2, 1)]=-0.681942004161*x_ref[0] + (-0.290347776996)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.461925771287*x[2]
            ref[(0, 0)]+=-0.461925771287*x_ref[2]
            arg[(0, 1)]+=0.979940542722*x[2]
            ref[(0, 1)]+=0.979940542722*x_ref[2]
            arg[(1, 0)]+=-0.23033495794*x[2]
            ref[(1, 0)]+=-0.23033495794*x_ref[2]
            arg[(1, 1)]+=0.97211060459*x[2]
            ref[(1, 1)]+=0.97211060459*x_ref[2]
            arg[(2, 0)]+=0.901739527806*x[2]
            ref[(2, 0)]+=0.901739527806*x_ref[2]
            arg[(2, 1)]+=-0.300302547614*x[2]
            ref[(2, 1)]+=-0.300302547614*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 2),w)
        ref = Data(0,(4, 3, 2),w_ref)
        arg[(0, 0, 0)]=0.265791869043*x[0] + (0.296628397465)*x[1]
        ref[(0, 0, 0)]=0.265791869043*x_ref[0] + (0.296628397465)*x_ref[1]
        arg[(0, 0, 1)]=-0.268470281562*x[0] + (-0.170031243443)*x[1]
        ref[(0, 0, 1)]=-0.268470281562*x_ref[0] + (-0.170031243443)*x_ref[1]
        arg[(0, 1, 0)]=0.196770132723*x[0] + (-0.536717129655)*x[1]
        ref[(0, 1, 0)]=0.196770132723*x_ref[0] + (-0.536717129655)*x_ref[1]
        arg[(0, 1, 1)]=0.701409076925*x[0] + (0.175218669673)*x[1]
        ref[(0, 1, 1)]=0.701409076925*x_ref[0] + (0.175218669673)*x_ref[1]
        arg[(0, 2, 0)]=-0.346526209276*x[0] + (-0.773119645128)*x[1]
        ref[(0, 2, 0)]=-0.346526209276*x_ref[0] + (-0.773119645128)*x_ref[1]
        arg[(0, 2, 1)]=-0.672271817172*x[0] + (-0.597450328161)*x[1]
        ref[(0, 2, 1)]=-0.672271817172*x_ref[0] + (-0.597450328161)*x_ref[1]
        arg[(1, 0, 0)]=0.63213621573*x[0] + (-0.286964999571)*x[1]
        ref[(1, 0, 0)]=0.63213621573*x_ref[0] + (-0.286964999571)*x_ref[1]
        arg[(1, 0, 1)]=0.0779342113859*x[0] + (-0.150064959362)*x[1]
        ref[(1, 0, 1)]=0.0779342113859*x_ref[0] + (-0.150064959362)*x_ref[1]
        arg[(1, 1, 0)]=-0.508670271261*x[0] + (0.968592466016)*x[1]
        ref[(1, 1, 0)]=-0.508670271261*x_ref[0] + (0.968592466016)*x_ref[1]
        arg[(1, 1, 1)]=0.821909741336*x[0] + (-0.572130232761)*x[1]
        ref[(1, 1, 1)]=0.821909741336*x_ref[0] + (-0.572130232761)*x_ref[1]
        arg[(1, 2, 0)]=-0.236057468805*x[0] + (0.499264866231)*x[1]
        ref[(1, 2, 0)]=-0.236057468805*x_ref[0] + (0.499264866231)*x_ref[1]
        arg[(1, 2, 1)]=-0.314509946767*x[0] + (0.216344419344)*x[1]
        ref[(1, 2, 1)]=-0.314509946767*x_ref[0] + (0.216344419344)*x_ref[1]
        arg[(2, 0, 0)]=0.152455252311*x[0] + (-0.303450969472)*x[1]
        ref[(2, 0, 0)]=0.152455252311*x_ref[0] + (-0.303450969472)*x_ref[1]
        arg[(2, 0, 1)]=-0.283595363186*x[0] + (0.686494680598)*x[1]
        ref[(2, 0, 1)]=-0.283595363186*x_ref[0] + (0.686494680598)*x_ref[1]
        arg[(2, 1, 0)]=-0.945258784513*x[0] + (0.576525628271)*x[1]
        ref[(2, 1, 0)]=-0.945258784513*x_ref[0] + (0.576525628271)*x_ref[1]
        arg[(2, 1, 1)]=0.0284315028256*x[0] + (-0.715205878511)*x[1]
        ref[(2, 1, 1)]=0.0284315028256*x_ref[0] + (-0.715205878511)*x_ref[1]
        arg[(2, 2, 0)]=-0.639598643813*x[0] + (-0.793508842182)*x[1]
        ref[(2, 2, 0)]=-0.639598643813*x_ref[0] + (-0.793508842182)*x_ref[1]
        arg[(2, 2, 1)]=0.086653013925*x[0] + (0.125878596364)*x[1]
        ref[(2, 2, 1)]=0.086653013925*x_ref[0] + (0.125878596364)*x_ref[1]
        arg[(3, 0, 0)]=-0.3620130453*x[0] + (0.345932256677)*x[1]
        ref[(3, 0, 0)]=-0.3620130453*x_ref[0] + (0.345932256677)*x_ref[1]
        arg[(3, 0, 1)]=-0.385756430237*x[0] + (0.942489335355)*x[1]
        ref[(3, 0, 1)]=-0.385756430237*x_ref[0] + (0.942489335355)*x_ref[1]
        arg[(3, 1, 0)]=-0.218998563524*x[0] + (-0.188144738139)*x[1]
        ref[(3, 1, 0)]=-0.218998563524*x_ref[0] + (-0.188144738139)*x_ref[1]
        arg[(3, 1, 1)]=0.13074703038*x[0] + (-0.544038130627)*x[1]
        ref[(3, 1, 1)]=0.13074703038*x_ref[0] + (-0.544038130627)*x_ref[1]
        arg[(3, 2, 0)]=-0.0110718530201*x[0] + (-0.538925109142)*x[1]
        ref[(3, 2, 0)]=-0.0110718530201*x_ref[0] + (-0.538925109142)*x_ref[1]
        arg[(3, 2, 1)]=0.514635248614*x[0] + (-0.621845300596)*x[1]
        ref[(3, 2, 1)]=0.514635248614*x_ref[0] + (-0.621845300596)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.946433364553*x[2]
            ref[(0, 0, 0)]+=0.946433364553*x_ref[2]
            arg[(0, 0, 1)]+=0.9899389426*x[2]
            ref[(0, 0, 1)]+=0.9899389426*x_ref[2]
            arg[(0, 1, 0)]+=-0.439477929048*x[2]
            ref[(0, 1, 0)]+=-0.439477929048*x_ref[2]
            arg[(0, 1, 1)]+=0.922914424837*x[2]
            ref[(0, 1, 1)]+=0.922914424837*x_ref[2]
            arg[(0, 2, 0)]+=0.665177407892*x[2]
            ref[(0, 2, 0)]+=0.665177407892*x_ref[2]
            arg[(0, 2, 1)]+=0.738026230539*x[2]
            ref[(0, 2, 1)]+=0.738026230539*x_ref[2]
            arg[(1, 0, 0)]+=-0.108589137189*x[2]
            ref[(1, 0, 0)]+=-0.108589137189*x_ref[2]
            arg[(1, 0, 1)]+=-0.06968546946*x[2]
            ref[(1, 0, 1)]+=-0.06968546946*x_ref[2]
            arg[(1, 1, 0)]+=0.868967122385*x[2]
            ref[(1, 1, 0)]+=0.868967122385*x_ref[2]
            arg[(1, 1, 1)]+=0.924440051459*x[2]
            ref[(1, 1, 1)]+=0.924440051459*x_ref[2]
            arg[(1, 2, 0)]+=-0.871599155561*x[2]
            ref[(1, 2, 0)]+=-0.871599155561*x_ref[2]
            arg[(1, 2, 1)]+=-0.529685928844*x[2]
            ref[(1, 2, 1)]+=-0.529685928844*x_ref[2]
            arg[(2, 0, 0)]+=0.729361437224*x[2]
            ref[(2, 0, 0)]+=0.729361437224*x_ref[2]
            arg[(2, 0, 1)]+=-0.680950269984*x[2]
            ref[(2, 0, 1)]+=-0.680950269984*x_ref[2]
            arg[(2, 1, 0)]+=-0.130514982468*x[2]
            ref[(2, 1, 0)]+=-0.130514982468*x_ref[2]
            arg[(2, 1, 1)]+=0.270914118441*x[2]
            ref[(2, 1, 1)]+=0.270914118441*x_ref[2]
            arg[(2, 2, 0)]+=0.772381770659*x[2]
            ref[(2, 2, 0)]+=0.772381770659*x_ref[2]
            arg[(2, 2, 1)]+=-0.738712815697*x[2]
            ref[(2, 2, 1)]+=-0.738712815697*x_ref[2]
            arg[(3, 0, 0)]+=-0.172907829191*x[2]
            ref[(3, 0, 0)]+=-0.172907829191*x_ref[2]
            arg[(3, 0, 1)]+=-0.877234827604*x[2]
            ref[(3, 0, 1)]+=-0.877234827604*x_ref[2]
            arg[(3, 1, 0)]+=-0.342987054258*x[2]
            ref[(3, 1, 0)]+=-0.342987054258*x_ref[2]
            arg[(3, 1, 1)]+=-0.348607977691*x[2]
            ref[(3, 1, 1)]+=-0.348607977691*x_ref[2]
            arg[(3, 2, 0)]+=-0.510598159328*x[2]
            ref[(3, 2, 0)]+=-0.510598159328*x_ref[2]
            arg[(3, 2, 1)]+=-0.114722848103*x[2]
            ref[(3, 2, 1)]+=-0.114722848103*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 3, 2),w)
        ref = Data(0,(2, 3, 3, 2),w_ref)
        arg[(0, 0, 0, 0)]=0.104665822501*x[0] + (-0.0430827029043)*x[1]
        ref[(0, 0, 0, 0)]=0.104665822501*x_ref[0] + (-0.0430827029043)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.196353493127*x[0] + (0.859086718482)*x[1]
        ref[(0, 0, 0, 1)]=0.196353493127*x_ref[0] + (0.859086718482)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.795298513153*x[0] + (-0.797752147898)*x[1]
        ref[(0, 0, 1, 0)]=0.795298513153*x_ref[0] + (-0.797752147898)*x_ref[1]
        arg[(0, 0, 1, 1)]=-0.234033379237*x[0] + (-0.92543881976)*x[1]
        ref[(0, 0, 1, 1)]=-0.234033379237*x_ref[0] + (-0.92543881976)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.112731500382*x[0] + (-0.784928085348)*x[1]
        ref[(0, 0, 2, 0)]=-0.112731500382*x_ref[0] + (-0.784928085348)*x_ref[1]
        arg[(0, 0, 2, 1)]=0.946022857785*x[0] + (-0.336613975611)*x[1]
        ref[(0, 0, 2, 1)]=0.946022857785*x_ref[0] + (-0.336613975611)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.147117263929*x[0] + (-0.449165471138)*x[1]
        ref[(0, 1, 0, 0)]=0.147117263929*x_ref[0] + (-0.449165471138)*x_ref[1]
        arg[(0, 1, 0, 1)]=-0.561764737575*x[0] + (0.759557861586)*x[1]
        ref[(0, 1, 0, 1)]=-0.561764737575*x_ref[0] + (0.759557861586)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.666374947256*x[0] + (-0.0671378665025)*x[1]
        ref[(0, 1, 1, 0)]=0.666374947256*x_ref[0] + (-0.0671378665025)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.227385227607*x[0] + (0.924019987118)*x[1]
        ref[(0, 1, 1, 1)]=0.227385227607*x_ref[0] + (0.924019987118)*x_ref[1]
        arg[(0, 1, 2, 0)]=0.601873103228*x[0] + (-0.450944437589)*x[1]
        ref[(0, 1, 2, 0)]=0.601873103228*x_ref[0] + (-0.450944437589)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.633679890791*x[0] + (0.531814393784)*x[1]
        ref[(0, 1, 2, 1)]=0.633679890791*x_ref[0] + (0.531814393784)*x_ref[1]
        arg[(0, 2, 0, 0)]=-0.826024646784*x[0] + (0.0637391794451)*x[1]
        ref[(0, 2, 0, 0)]=-0.826024646784*x_ref[0] + (0.0637391794451)*x_ref[1]
        arg[(0, 2, 0, 1)]=0.886531730155*x[0] + (-0.448522874543)*x[1]
        ref[(0, 2, 0, 1)]=0.886531730155*x_ref[0] + (-0.448522874543)*x_ref[1]
        arg[(0, 2, 1, 0)]=0.71880396822*x[0] + (0.519051258657)*x[1]
        ref[(0, 2, 1, 0)]=0.71880396822*x_ref[0] + (0.519051258657)*x_ref[1]
        arg[(0, 2, 1, 1)]=-0.119801029271*x[0] + (-0.000777237764668)*x[1]
        ref[(0, 2, 1, 1)]=-0.119801029271*x_ref[0] + (-0.000777237764668)*x_ref[1]
        arg[(0, 2, 2, 0)]=-0.322532798589*x[0] + (-0.899533903526)*x[1]
        ref[(0, 2, 2, 0)]=-0.322532798589*x_ref[0] + (-0.899533903526)*x_ref[1]
        arg[(0, 2, 2, 1)]=0.334793391907*x[0] + (0.15574751464)*x[1]
        ref[(0, 2, 2, 1)]=0.334793391907*x_ref[0] + (0.15574751464)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.227043454411*x[0] + (0.629957186933)*x[1]
        ref[(1, 0, 0, 0)]=-0.227043454411*x_ref[0] + (0.629957186933)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.132008798476*x[0] + (-0.413343748895)*x[1]
        ref[(1, 0, 0, 1)]=-0.132008798476*x_ref[0] + (-0.413343748895)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.0260625662682*x[0] + (-0.428312960755)*x[1]
        ref[(1, 0, 1, 0)]=0.0260625662682*x_ref[0] + (-0.428312960755)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.300992930203*x[0] + (-0.306385569395)*x[1]
        ref[(1, 0, 1, 1)]=0.300992930203*x_ref[0] + (-0.306385569395)*x_ref[1]
        arg[(1, 0, 2, 0)]=-0.905845546761*x[0] + (-0.726669332671)*x[1]
        ref[(1, 0, 2, 0)]=-0.905845546761*x_ref[0] + (-0.726669332671)*x_ref[1]
        arg[(1, 0, 2, 1)]=-0.83299826907*x[0] + (-0.241551406502)*x[1]
        ref[(1, 0, 2, 1)]=-0.83299826907*x_ref[0] + (-0.241551406502)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.713734689836*x[0] + (-0.417591605103)*x[1]
        ref[(1, 1, 0, 0)]=-0.713734689836*x_ref[0] + (-0.417591605103)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.54581450823*x[0] + (0.120056472275)*x[1]
        ref[(1, 1, 0, 1)]=0.54581450823*x_ref[0] + (0.120056472275)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.439093477444*x[0] + (0.06443336665)*x[1]
        ref[(1, 1, 1, 0)]=0.439093477444*x_ref[0] + (0.06443336665)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.317279912837*x[0] + (-0.488340299455)*x[1]
        ref[(1, 1, 1, 1)]=0.317279912837*x_ref[0] + (-0.488340299455)*x_ref[1]
        arg[(1, 1, 2, 0)]=0.916180689712*x[0] + (-0.869715605854)*x[1]
        ref[(1, 1, 2, 0)]=0.916180689712*x_ref[0] + (-0.869715605854)*x_ref[1]
        arg[(1, 1, 2, 1)]=0.178421295014*x[0] + (0.584052334266)*x[1]
        ref[(1, 1, 2, 1)]=0.178421295014*x_ref[0] + (0.584052334266)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.320962847959*x[0] + (-0.0153571874371)*x[1]
        ref[(1, 2, 0, 0)]=-0.320962847959*x_ref[0] + (-0.0153571874371)*x_ref[1]
        arg[(1, 2, 0, 1)]=-0.264261474915*x[0] + (-0.235676390171)*x[1]
        ref[(1, 2, 0, 1)]=-0.264261474915*x_ref[0] + (-0.235676390171)*x_ref[1]
        arg[(1, 2, 1, 0)]=0.88830987001*x[0] + (-0.546317187796)*x[1]
        ref[(1, 2, 1, 0)]=0.88830987001*x_ref[0] + (-0.546317187796)*x_ref[1]
        arg[(1, 2, 1, 1)]=-0.204000807806*x[0] + (0.999608439739)*x[1]
        ref[(1, 2, 1, 1)]=-0.204000807806*x_ref[0] + (0.999608439739)*x_ref[1]
        arg[(1, 2, 2, 0)]=0.685699862261*x[0] + (0.261507307484)*x[1]
        ref[(1, 2, 2, 0)]=0.685699862261*x_ref[0] + (0.261507307484)*x_ref[1]
        arg[(1, 2, 2, 1)]=0.821337979111*x[0] + (0.277462188062)*x[1]
        ref[(1, 2, 2, 1)]=0.821337979111*x_ref[0] + (0.277462188062)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.0420214845041*x[2]
            ref[(0, 0, 0, 0)]+=0.0420214845041*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.0211394890758*x[2]
            ref[(0, 0, 0, 1)]+=0.0211394890758*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.83785317412*x[2]
            ref[(0, 0, 1, 0)]+=-0.83785317412*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.744769131131*x[2]
            ref[(0, 0, 1, 1)]+=0.744769131131*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.172076984898*x[2]
            ref[(0, 0, 2, 0)]+=-0.172076984898*x_ref[2]
            arg[(0, 0, 2, 1)]+=-0.456115378428*x[2]
            ref[(0, 0, 2, 1)]+=-0.456115378428*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.278917380591*x[2]
            ref[(0, 1, 0, 0)]+=-0.278917380591*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.931155314943*x[2]
            ref[(0, 1, 0, 1)]+=-0.931155314943*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.82753264127*x[2]
            ref[(0, 1, 1, 0)]+=-0.82753264127*x_ref[2]
            arg[(0, 1, 1, 1)]+=0.0330711994421*x[2]
            ref[(0, 1, 1, 1)]+=0.0330711994421*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.701778786189*x[2]
            ref[(0, 1, 2, 0)]+=-0.701778786189*x_ref[2]
            arg[(0, 1, 2, 1)]+=-0.467047010814*x[2]
            ref[(0, 1, 2, 1)]+=-0.467047010814*x_ref[2]
            arg[(0, 2, 0, 0)]+=-0.0975476808346*x[2]
            ref[(0, 2, 0, 0)]+=-0.0975476808346*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.334144587513*x[2]
            ref[(0, 2, 0, 1)]+=-0.334144587513*x_ref[2]
            arg[(0, 2, 1, 0)]+=0.641500953179*x[2]
            ref[(0, 2, 1, 0)]+=0.641500953179*x_ref[2]
            arg[(0, 2, 1, 1)]+=0.569121516049*x[2]
            ref[(0, 2, 1, 1)]+=0.569121516049*x_ref[2]
            arg[(0, 2, 2, 0)]+=0.286381995768*x[2]
            ref[(0, 2, 2, 0)]+=0.286381995768*x_ref[2]
            arg[(0, 2, 2, 1)]+=0.43824241547*x[2]
            ref[(0, 2, 2, 1)]+=0.43824241547*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.534291377155*x[2]
            ref[(1, 0, 0, 0)]+=-0.534291377155*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.716799619488*x[2]
            ref[(1, 0, 0, 1)]+=0.716799619488*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.206238489772*x[2]
            ref[(1, 0, 1, 0)]+=0.206238489772*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.215068849482*x[2]
            ref[(1, 0, 1, 1)]+=-0.215068849482*x_ref[2]
            arg[(1, 0, 2, 0)]+=0.203493484834*x[2]
            ref[(1, 0, 2, 0)]+=0.203493484834*x_ref[2]
            arg[(1, 0, 2, 1)]+=-0.631550381345*x[2]
            ref[(1, 0, 2, 1)]+=-0.631550381345*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.729716255423*x[2]
            ref[(1, 1, 0, 0)]+=-0.729716255423*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.205712741562*x[2]
            ref[(1, 1, 0, 1)]+=0.205712741562*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.790670851564*x[2]
            ref[(1, 1, 1, 0)]+=-0.790670851564*x_ref[2]
            arg[(1, 1, 1, 1)]+=-0.811248423999*x[2]
            ref[(1, 1, 1, 1)]+=-0.811248423999*x_ref[2]
            arg[(1, 1, 2, 0)]+=0.833565101982*x[2]
            ref[(1, 1, 2, 0)]+=0.833565101982*x_ref[2]
            arg[(1, 1, 2, 1)]+=-0.828088375423*x[2]
            ref[(1, 1, 2, 1)]+=-0.828088375423*x_ref[2]
            arg[(1, 2, 0, 0)]+=0.70982669843*x[2]
            ref[(1, 2, 0, 0)]+=0.70982669843*x_ref[2]
            arg[(1, 2, 0, 1)]+=0.997175627761*x[2]
            ref[(1, 2, 0, 1)]+=0.997175627761*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.766730969634*x[2]
            ref[(1, 2, 1, 0)]+=0.766730969634*x_ref[2]
            arg[(1, 2, 1, 1)]+=-0.136217214645*x[2]
            ref[(1, 2, 1, 1)]+=-0.136217214645*x_ref[2]
            arg[(1, 2, 2, 0)]+=-0.868239969479*x[2]
            ref[(1, 2, 2, 0)]+=-0.868239969479*x_ref[2]
            arg[(1, 2, 2, 1)]+=-0.482275943896*x[2]
            ref[(1, 2, 2, 1)]+=-0.482275943896*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.759711562189*x[0] + (-0.767453155826)*x[1]
        ref=0.759711562189*x_ref[0] + (-0.767453155826)*x_ref[1]
        if dim==3:
            arg+=(0.958600145101)*x[2]
            ref+=(0.958600145101)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=-0.0108640036772*x[0] + (-0.393696771891)*x[1]
        ref[(0,)]=-0.0108640036772*x_ref[0] + (-0.393696771891)*x_ref[1]
        arg[(1,)]=-0.689221088757*x[0] + (-0.90347724985)*x[1]
        ref[(1,)]=-0.689221088757*x_ref[0] + (-0.90347724985)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.78280023977*x[2]
            ref[(0,)]+=-0.78280023977*x_ref[2]
            arg[(1,)]+=-0.700731664968*x[2]
            ref[(1,)]+=-0.700731664968*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref = Data(0,(2, 2),w_ref)
        arg[(0, 0)]=-0.744263737498*x[0] + (0.0750566252916)*x[1]
        ref[(0, 0)]=-0.744263737498*x_ref[0] + (0.0750566252916)*x_ref[1]
        arg[(0, 1)]=-0.470045326943*x[0] + (-0.702903528259)*x[1]
        ref[(0, 1)]=-0.470045326943*x_ref[0] + (-0.702903528259)*x_ref[1]
        arg[(1, 0)]=-0.537267827926*x[0] + (-0.32112857843)*x[1]
        ref[(1, 0)]=-0.537267827926*x_ref[0] + (-0.32112857843)*x_ref[1]
        arg[(1, 1)]=-0.119843784533*x[0] + (-0.149710633724)*x[1]
        ref[(1, 1)]=-0.119843784533*x_ref[0] + (-0.149710633724)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.722874555913*x[2]
            ref[(0, 0)]+=-0.722874555913*x_ref[2]
            arg[(0, 1)]+=0.962790987222*x[2]
            ref[(0, 1)]+=0.962790987222*x_ref[2]
            arg[(1, 0)]+=0.876296355892*x[2]
            ref[(1, 0)]+=0.876296355892*x_ref[2]
            arg[(1, 1)]+=0.219454161652*x[2]
            ref[(1, 1)]+=0.219454161652*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 4),w)
        ref = Data(0,(2, 4, 4),w_ref)
        arg[(0, 0, 0)]=0.928565661443*x[0] + (0.526337940495)*x[1]
        ref[(0, 0, 0)]=0.928565661443*x_ref[0] + (0.526337940495)*x_ref[1]
        arg[(0, 0, 1)]=0.801449855519*x[0] + (-0.651662718795)*x[1]
        ref[(0, 0, 1)]=0.801449855519*x_ref[0] + (-0.651662718795)*x_ref[1]
        arg[(0, 0, 2)]=0.750924330614*x[0] + (-0.737801325916)*x[1]
        ref[(0, 0, 2)]=0.750924330614*x_ref[0] + (-0.737801325916)*x_ref[1]
        arg[(0, 0, 3)]=-0.267323997227*x[0] + (0.0950614932358)*x[1]
        ref[(0, 0, 3)]=-0.267323997227*x_ref[0] + (0.0950614932358)*x_ref[1]
        arg[(0, 1, 0)]=0.410386566685*x[0] + (-0.423036543022)*x[1]
        ref[(0, 1, 0)]=0.410386566685*x_ref[0] + (-0.423036543022)*x_ref[1]
        arg[(0, 1, 1)]=0.304177654786*x[0] + (0.787382372554)*x[1]
        ref[(0, 1, 1)]=0.304177654786*x_ref[0] + (0.787382372554)*x_ref[1]
        arg[(0, 1, 2)]=0.0927448622961*x[0] + (-0.0591965621066)*x[1]
        ref[(0, 1, 2)]=0.0927448622961*x_ref[0] + (-0.0591965621066)*x_ref[1]
        arg[(0, 1, 3)]=0.895298166559*x[0] + (0.620414694679)*x[1]
        ref[(0, 1, 3)]=0.895298166559*x_ref[0] + (0.620414694679)*x_ref[1]
        arg[(0, 2, 0)]=-0.217768836826*x[0] + (0.628257403967)*x[1]
        ref[(0, 2, 0)]=-0.217768836826*x_ref[0] + (0.628257403967)*x_ref[1]
        arg[(0, 2, 1)]=0.60861130942*x[0] + (0.878143238019)*x[1]
        ref[(0, 2, 1)]=0.60861130942*x_ref[0] + (0.878143238019)*x_ref[1]
        arg[(0, 2, 2)]=0.863274794843*x[0] + (-0.599233333785)*x[1]
        ref[(0, 2, 2)]=0.863274794843*x_ref[0] + (-0.599233333785)*x_ref[1]
        arg[(0, 2, 3)]=-0.997359943887*x[0] + (-0.0773286442827)*x[1]
        ref[(0, 2, 3)]=-0.997359943887*x_ref[0] + (-0.0773286442827)*x_ref[1]
        arg[(0, 3, 0)]=0.304578433046*x[0] + (0.931611814754)*x[1]
        ref[(0, 3, 0)]=0.304578433046*x_ref[0] + (0.931611814754)*x_ref[1]
        arg[(0, 3, 1)]=0.423030266365*x[0] + (-0.593950112354)*x[1]
        ref[(0, 3, 1)]=0.423030266365*x_ref[0] + (-0.593950112354)*x_ref[1]
        arg[(0, 3, 2)]=-0.722561710034*x[0] + (0.95724655426)*x[1]
        ref[(0, 3, 2)]=-0.722561710034*x_ref[0] + (0.95724655426)*x_ref[1]
        arg[(0, 3, 3)]=-0.629067041149*x[0] + (0.224674819344)*x[1]
        ref[(0, 3, 3)]=-0.629067041149*x_ref[0] + (0.224674819344)*x_ref[1]
        arg[(1, 0, 0)]=0.119670292753*x[0] + (-0.251773441893)*x[1]
        ref[(1, 0, 0)]=0.119670292753*x_ref[0] + (-0.251773441893)*x_ref[1]
        arg[(1, 0, 1)]=-0.292144611753*x[0] + (0.0526928163491)*x[1]
        ref[(1, 0, 1)]=-0.292144611753*x_ref[0] + (0.0526928163491)*x_ref[1]
        arg[(1, 0, 2)]=-0.858819068257*x[0] + (0.536308244056)*x[1]
        ref[(1, 0, 2)]=-0.858819068257*x_ref[0] + (0.536308244056)*x_ref[1]
        arg[(1, 0, 3)]=-0.00424806558931*x[0] + (-0.88756935684)*x[1]
        ref[(1, 0, 3)]=-0.00424806558931*x_ref[0] + (-0.88756935684)*x_ref[1]
        arg[(1, 1, 0)]=-0.588054962242*x[0] + (0.151582410861)*x[1]
        ref[(1, 1, 0)]=-0.588054962242*x_ref[0] + (0.151582410861)*x_ref[1]
        arg[(1, 1, 1)]=-0.55170883703*x[0] + (0.484223095226)*x[1]
        ref[(1, 1, 1)]=-0.55170883703*x_ref[0] + (0.484223095226)*x_ref[1]
        arg[(1, 1, 2)]=-0.522755725728*x[0] + (-0.251664382021)*x[1]
        ref[(1, 1, 2)]=-0.522755725728*x_ref[0] + (-0.251664382021)*x_ref[1]
        arg[(1, 1, 3)]=-0.784213375511*x[0] + (0.638257042949)*x[1]
        ref[(1, 1, 3)]=-0.784213375511*x_ref[0] + (0.638257042949)*x_ref[1]
        arg[(1, 2, 0)]=0.694108435601*x[0] + (-0.480871402414)*x[1]
        ref[(1, 2, 0)]=0.694108435601*x_ref[0] + (-0.480871402414)*x_ref[1]
        arg[(1, 2, 1)]=0.18308311519*x[0] + (-0.190309487095)*x[1]
        ref[(1, 2, 1)]=0.18308311519*x_ref[0] + (-0.190309487095)*x_ref[1]
        arg[(1, 2, 2)]=-0.218113924268*x[0] + (0.658959922036)*x[1]
        ref[(1, 2, 2)]=-0.218113924268*x_ref[0] + (0.658959922036)*x_ref[1]
        arg[(1, 2, 3)]=0.261058120098*x[0] + (0.102527973785)*x[1]
        ref[(1, 2, 3)]=0.261058120098*x_ref[0] + (0.102527973785)*x_ref[1]
        arg[(1, 3, 0)]=0.0345117953971*x[0] + (0.0178577260852)*x[1]
        ref[(1, 3, 0)]=0.0345117953971*x_ref[0] + (0.0178577260852)*x_ref[1]
        arg[(1, 3, 1)]=-0.343331681341*x[0] + (0.267475984915)*x[1]
        ref[(1, 3, 1)]=-0.343331681341*x_ref[0] + (0.267475984915)*x_ref[1]
        arg[(1, 3, 2)]=0.657000841036*x[0] + (0.281308582059)*x[1]
        ref[(1, 3, 2)]=0.657000841036*x_ref[0] + (0.281308582059)*x_ref[1]
        arg[(1, 3, 3)]=0.287938380042*x[0] + (0.745857033844)*x[1]
        ref[(1, 3, 3)]=0.287938380042*x_ref[0] + (0.745857033844)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.572308938016*x[2]
            ref[(0, 0, 0)]+=-0.572308938016*x_ref[2]
            arg[(0, 0, 1)]+=-0.403081118353*x[2]
            ref[(0, 0, 1)]+=-0.403081118353*x_ref[2]
            arg[(0, 0, 2)]+=0.456948533742*x[2]
            ref[(0, 0, 2)]+=0.456948533742*x_ref[2]
            arg[(0, 0, 3)]+=-0.11695597625*x[2]
            ref[(0, 0, 3)]+=-0.11695597625*x_ref[2]
            arg[(0, 1, 0)]+=-0.0214960051008*x[2]
            ref[(0, 1, 0)]+=-0.0214960051008*x_ref[2]
            arg[(0, 1, 1)]+=0.189819352517*x[2]
            ref[(0, 1, 1)]+=0.189819352517*x_ref[2]
            arg[(0, 1, 2)]+=0.281854120817*x[2]
            ref[(0, 1, 2)]+=0.281854120817*x_ref[2]
            arg[(0, 1, 3)]+=-0.744121834273*x[2]
            ref[(0, 1, 3)]+=-0.744121834273*x_ref[2]
            arg[(0, 2, 0)]+=0.919158563944*x[2]
            ref[(0, 2, 0)]+=0.919158563944*x_ref[2]
            arg[(0, 2, 1)]+=-0.837154108266*x[2]
            ref[(0, 2, 1)]+=-0.837154108266*x_ref[2]
            arg[(0, 2, 2)]+=-0.0933367315525*x[2]
            ref[(0, 2, 2)]+=-0.0933367315525*x_ref[2]
            arg[(0, 2, 3)]+=-0.00866721515839*x[2]
            ref[(0, 2, 3)]+=-0.00866721515839*x_ref[2]
            arg[(0, 3, 0)]+=-0.395075015466*x[2]
            ref[(0, 3, 0)]+=-0.395075015466*x_ref[2]
            arg[(0, 3, 1)]+=0.966589477369*x[2]
            ref[(0, 3, 1)]+=0.966589477369*x_ref[2]
            arg[(0, 3, 2)]+=-0.294983001973*x[2]
            ref[(0, 3, 2)]+=-0.294983001973*x_ref[2]
            arg[(0, 3, 3)]+=-0.385081146505*x[2]
            ref[(0, 3, 3)]+=-0.385081146505*x_ref[2]
            arg[(1, 0, 0)]+=-0.4149015541*x[2]
            ref[(1, 0, 0)]+=-0.4149015541*x_ref[2]
            arg[(1, 0, 1)]+=0.685013616371*x[2]
            ref[(1, 0, 1)]+=0.685013616371*x_ref[2]
            arg[(1, 0, 2)]+=0.803720628182*x[2]
            ref[(1, 0, 2)]+=0.803720628182*x_ref[2]
            arg[(1, 0, 3)]+=-0.085884269116*x[2]
            ref[(1, 0, 3)]+=-0.085884269116*x_ref[2]
            arg[(1, 1, 0)]+=0.968711058428*x[2]
            ref[(1, 1, 0)]+=0.968711058428*x_ref[2]
            arg[(1, 1, 1)]+=-0.196809385987*x[2]
            ref[(1, 1, 1)]+=-0.196809385987*x_ref[2]
            arg[(1, 1, 2)]+=-0.516925912957*x[2]
            ref[(1, 1, 2)]+=-0.516925912957*x_ref[2]
            arg[(1, 1, 3)]+=-0.999814562424*x[2]
            ref[(1, 1, 3)]+=-0.999814562424*x_ref[2]
            arg[(1, 2, 0)]+=-0.0301827970414*x[2]
            ref[(1, 2, 0)]+=-0.0301827970414*x_ref[2]
            arg[(1, 2, 1)]+=0.914055002634*x[2]
            ref[(1, 2, 1)]+=0.914055002634*x_ref[2]
            arg[(1, 2, 2)]+=0.375928154263*x[2]
            ref[(1, 2, 2)]+=0.375928154263*x_ref[2]
            arg[(1, 2, 3)]+=-0.290611775511*x[2]
            ref[(1, 2, 3)]+=-0.290611775511*x_ref[2]
            arg[(1, 3, 0)]+=-0.349208237739*x[2]
            ref[(1, 3, 0)]+=-0.349208237739*x_ref[2]
            arg[(1, 3, 1)]+=-0.701642994007*x[2]
            ref[(1, 3, 1)]+=-0.701642994007*x_ref[2]
            arg[(1, 3, 2)]+=0.899863282894*x[2]
            ref[(1, 3, 2)]+=0.899863282894*x_ref[2]
            arg[(1, 3, 3)]+=-0.832948662506*x[2]
            ref[(1, 3, 3)]+=-0.832948662506*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 3, 2),w)
        ref = Data(0,(2, 2, 3, 2),w_ref)
        arg[(0, 0, 0, 0)]=-0.173192148455*x[0] + (0.2218731191)*x[1]
        ref[(0, 0, 0, 0)]=-0.173192148455*x_ref[0] + (0.2218731191)*x_ref[1]
        arg[(0, 0, 0, 1)]=-0.213357395031*x[0] + (-0.566432223975)*x[1]
        ref[(0, 0, 0, 1)]=-0.213357395031*x_ref[0] + (-0.566432223975)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.3548923833*x[0] + (0.977033927565)*x[1]
        ref[(0, 0, 1, 0)]=0.3548923833*x_ref[0] + (0.977033927565)*x_ref[1]
        arg[(0, 0, 1, 1)]=-0.884747310252*x[0] + (-0.522064007759)*x[1]
        ref[(0, 0, 1, 1)]=-0.884747310252*x_ref[0] + (-0.522064007759)*x_ref[1]
        arg[(0, 0, 2, 0)]=0.0473000310557*x[0] + (-0.137920148617)*x[1]
        ref[(0, 0, 2, 0)]=0.0473000310557*x_ref[0] + (-0.137920148617)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.593926588516*x[0] + (0.530409475403)*x[1]
        ref[(0, 0, 2, 1)]=-0.593926588516*x_ref[0] + (0.530409475403)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.1181606728*x[0] + (0.594419309122)*x[1]
        ref[(0, 1, 0, 0)]=0.1181606728*x_ref[0] + (0.594419309122)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.741714011674*x[0] + (-0.322414879886)*x[1]
        ref[(0, 1, 0, 1)]=0.741714011674*x_ref[0] + (-0.322414879886)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.746777061816*x[0] + (0.964589474748)*x[1]
        ref[(0, 1, 1, 0)]=-0.746777061816*x_ref[0] + (0.964589474748)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.856660516821*x[0] + (-0.53474442861)*x[1]
        ref[(0, 1, 1, 1)]=-0.856660516821*x_ref[0] + (-0.53474442861)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.0565422211351*x[0] + (-0.939563184644)*x[1]
        ref[(0, 1, 2, 0)]=-0.0565422211351*x_ref[0] + (-0.939563184644)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.11624643143*x[0] + (0.235210233583)*x[1]
        ref[(0, 1, 2, 1)]=0.11624643143*x_ref[0] + (0.235210233583)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.796005676445*x[0] + (-0.108173587533)*x[1]
        ref[(1, 0, 0, 0)]=-0.796005676445*x_ref[0] + (-0.108173587533)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.239779068936*x[0] + (-0.656384625567)*x[1]
        ref[(1, 0, 0, 1)]=-0.239779068936*x_ref[0] + (-0.656384625567)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.869717039621*x[0] + (0.977633876692)*x[1]
        ref[(1, 0, 1, 0)]=0.869717039621*x_ref[0] + (0.977633876692)*x_ref[1]
        arg[(1, 0, 1, 1)]=-0.985760874168*x[0] + (0.805121857109)*x[1]
        ref[(1, 0, 1, 1)]=-0.985760874168*x_ref[0] + (0.805121857109)*x_ref[1]
        arg[(1, 0, 2, 0)]=-0.719592018867*x[0] + (-0.669364861769)*x[1]
        ref[(1, 0, 2, 0)]=-0.719592018867*x_ref[0] + (-0.669364861769)*x_ref[1]
        arg[(1, 0, 2, 1)]=-0.444308486932*x[0] + (0.421099036018)*x[1]
        ref[(1, 0, 2, 1)]=-0.444308486932*x_ref[0] + (0.421099036018)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.197330253544*x[0] + (-0.911511601033)*x[1]
        ref[(1, 1, 0, 0)]=-0.197330253544*x_ref[0] + (-0.911511601033)*x_ref[1]
        arg[(1, 1, 0, 1)]=-0.340908152155*x[0] + (-0.274752251943)*x[1]
        ref[(1, 1, 0, 1)]=-0.340908152155*x_ref[0] + (-0.274752251943)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.5722121934*x[0] + (-0.480676990301)*x[1]
        ref[(1, 1, 1, 0)]=0.5722121934*x_ref[0] + (-0.480676990301)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.113846043505*x[0] + (-0.742050031466)*x[1]
        ref[(1, 1, 1, 1)]=-0.113846043505*x_ref[0] + (-0.742050031466)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.441432904862*x[0] + (-0.141345825647)*x[1]
        ref[(1, 1, 2, 0)]=-0.441432904862*x_ref[0] + (-0.141345825647)*x_ref[1]
        arg[(1, 1, 2, 1)]=0.120512974632*x[0] + (-0.567943821884)*x[1]
        ref[(1, 1, 2, 1)]=0.120512974632*x_ref[0] + (-0.567943821884)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.0786664800174*x[2]
            ref[(0, 0, 0, 0)]+=0.0786664800174*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.610149729118*x[2]
            ref[(0, 0, 0, 1)]+=-0.610149729118*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.609932065598*x[2]
            ref[(0, 0, 1, 0)]+=-0.609932065598*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.88996323741*x[2]
            ref[(0, 0, 1, 1)]+=0.88996323741*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.7160823712*x[2]
            ref[(0, 0, 2, 0)]+=-0.7160823712*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.110880733288*x[2]
            ref[(0, 0, 2, 1)]+=0.110880733288*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.402536308926*x[2]
            ref[(0, 1, 0, 0)]+=-0.402536308926*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.230917758881*x[2]
            ref[(0, 1, 0, 1)]+=0.230917758881*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.783787438948*x[2]
            ref[(0, 1, 1, 0)]+=-0.783787438948*x_ref[2]
            arg[(0, 1, 1, 1)]+=0.0973151000337*x[2]
            ref[(0, 1, 1, 1)]+=0.0973151000337*x_ref[2]
            arg[(0, 1, 2, 0)]+=0.440366053245*x[2]
            ref[(0, 1, 2, 0)]+=0.440366053245*x_ref[2]
            arg[(0, 1, 2, 1)]+=-0.628535789015*x[2]
            ref[(0, 1, 2, 1)]+=-0.628535789015*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.478459918388*x[2]
            ref[(1, 0, 0, 0)]+=-0.478459918388*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.62853841721*x[2]
            ref[(1, 0, 0, 1)]+=-0.62853841721*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.947877669253*x[2]
            ref[(1, 0, 1, 0)]+=-0.947877669253*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.371302586394*x[2]
            ref[(1, 0, 1, 1)]+=0.371302586394*x_ref[2]
            arg[(1, 0, 2, 0)]+=0.0365257863792*x[2]
            ref[(1, 0, 2, 0)]+=0.0365257863792*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.625757345914*x[2]
            ref[(1, 0, 2, 1)]+=0.625757345914*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.124917133245*x[2]
            ref[(1, 1, 0, 0)]+=0.124917133245*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.004369631936*x[2]
            ref[(1, 1, 0, 1)]+=-0.004369631936*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.911763170402*x[2]
            ref[(1, 1, 1, 0)]+=0.911763170402*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.657937429907*x[2]
            ref[(1, 1, 1, 1)]+=0.657937429907*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.778974031617*x[2]
            ref[(1, 1, 2, 0)]+=-0.778974031617*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.0159498999733*x[2]
            ref[(1, 1, 2, 1)]+=0.0159498999733*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.945685280113*x[0]**o + (0.854161156035)*x[0] + (-0.00337357951258)*x[1]**o + (-0.738965891938)*x[1]
        ref=0.945685280113*x_ref[0]**o + (0.854161156035)*x_ref[0] + (-0.00337357951258)*x_ref[1]**o + (-0.738965891938)*x_ref[1]
        if dim==3:
            arg+=(-0.925424014778)*x[2]**o + (0.745813169098)*x[2]
            ref+=(-0.925424014778)*x_ref[2]**o + (0.745813169098)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref = Data(0,(2,),w_ref)
        arg[(0,)]=0.839605875715*x[0]**o + (-0.376383207723)*x[0] + (0.306613068042)*x[1]**o + (0.673524096746)*x[1]
        ref[(0,)]=0.839605875715*x_ref[0]**o + (-0.376383207723)*x_ref[0] + (0.306613068042)*x_ref[1]**o + (0.673524096746)*x_ref[1]
        arg[(1,)]=0.120334350427*x[0]**o + (0.25415554019)*x[0] + (-0.912602708107)*x[1]**o + (-0.761787984953)*x[1]
        ref[(1,)]=0.120334350427*x_ref[0]**o + (0.25415554019)*x_ref[0] + (-0.912602708107)*x_ref[1]**o + (-0.761787984953)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.424307406166*x[2]**o + (0.15132660322)*x[2]
            ref[(0,)]+=-0.424307406166*x_ref[2]**o + (0.15132660322)*x_ref[2]
            arg[(1,)]+=-0.627258325056*x[2]**o + (0.563424554048)*x[2]
            ref[(1,)]+=-0.627258325056*x_ref[2]**o + (0.563424554048)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref = Data(0,(3, 4),w_ref)
        arg[(0, 0)]=0.88101403626*x[0]**o + (-0.966668119023)*x[0] + (0.542200189329)*x[1]**o + (0.698577144905)*x[1]
        ref[(0, 0)]=0.88101403626*x_ref[0]**o + (-0.966668119023)*x_ref[0] + (0.542200189329)*x_ref[1]**o + (0.698577144905)*x_ref[1]
        arg[(0, 1)]=-0.404615432934*x[0]**o + (-0.42182772401)*x[0] + (-0.976801241337)*x[1]**o + (0.0405483029985)*x[1]
        ref[(0, 1)]=-0.404615432934*x_ref[0]**o + (-0.42182772401)*x_ref[0] + (-0.976801241337)*x_ref[1]**o + (0.0405483029985)*x_ref[1]
        arg[(0, 2)]=-0.38194826046*x[0]**o + (0.92600205293)*x[0] + (-0.40628235092)*x[1]**o + (-0.0904608279035)*x[1]
        ref[(0, 2)]=-0.38194826046*x_ref[0]**o + (0.92600205293)*x_ref[0] + (-0.40628235092)*x_ref[1]**o + (-0.0904608279035)*x_ref[1]
        arg[(0, 3)]=-0.362820356666*x[0]**o + (-0.482646554276)*x[0] + (-0.0516019316545)*x[1]**o + (-0.301373036254)*x[1]
        ref[(0, 3)]=-0.362820356666*x_ref[0]**o + (-0.482646554276)*x_ref[0] + (-0.0516019316545)*x_ref[1]**o + (-0.301373036254)*x_ref[1]
        arg[(1, 0)]=0.182989125097*x[0]**o + (0.776146096762)*x[0] + (0.874655896595)*x[1]**o + (0.737166314874)*x[1]
        ref[(1, 0)]=0.182989125097*x_ref[0]**o + (0.776146096762)*x_ref[0] + (0.874655896595)*x_ref[1]**o + (0.737166314874)*x_ref[1]
        arg[(1, 1)]=-0.00206373264458*x[0]**o + (0.916636907865)*x[0] + (-0.312286597214)*x[1]**o + (0.574618947587)*x[1]
        ref[(1, 1)]=-0.00206373264458*x_ref[0]**o + (0.916636907865)*x_ref[0] + (-0.312286597214)*x_ref[1]**o + (0.574618947587)*x_ref[1]
        arg[(1, 2)]=0.590565165523*x[0]**o + (-0.410022250693)*x[0] + (-0.0333478792599)*x[1]**o + (0.955341907594)*x[1]
        ref[(1, 2)]=0.590565165523*x_ref[0]**o + (-0.410022250693)*x_ref[0] + (-0.0333478792599)*x_ref[1]**o + (0.955341907594)*x_ref[1]
        arg[(1, 3)]=0.746431135551*x[0]**o + (0.848084129069)*x[0] + (-0.463531584868)*x[1]**o + (0.982506090014)*x[1]
        ref[(1, 3)]=0.746431135551*x_ref[0]**o + (0.848084129069)*x_ref[0] + (-0.463531584868)*x_ref[1]**o + (0.982506090014)*x_ref[1]
        arg[(2, 0)]=-0.056854886428*x[0]**o + (0.381611870759)*x[0] + (-0.722746733495)*x[1]**o + (0.336549926933)*x[1]
        ref[(2, 0)]=-0.056854886428*x_ref[0]**o + (0.381611870759)*x_ref[0] + (-0.722746733495)*x_ref[1]**o + (0.336549926933)*x_ref[1]
        arg[(2, 1)]=0.538398882324*x[0]**o + (0.89722487677)*x[0] + (0.889771272686)*x[1]**o + (-0.0377695739062)*x[1]
        ref[(2, 1)]=0.538398882324*x_ref[0]**o + (0.89722487677)*x_ref[0] + (0.889771272686)*x_ref[1]**o + (-0.0377695739062)*x_ref[1]
        arg[(2, 2)]=0.671856661379*x[0]**o + (0.473318723657)*x[0] + (-0.655835871783)*x[1]**o + (-0.492447376291)*x[1]
        ref[(2, 2)]=0.671856661379*x_ref[0]**o + (0.473318723657)*x_ref[0] + (-0.655835871783)*x_ref[1]**o + (-0.492447376291)*x_ref[1]
        arg[(2, 3)]=0.871015116351*x[0]**o + (-0.104650812171)*x[0] + (-0.93742520251)*x[1]**o + (0.190744875402)*x[1]
        ref[(2, 3)]=0.871015116351*x_ref[0]**o + (-0.104650812171)*x_ref[0] + (-0.93742520251)*x_ref[1]**o + (0.190744875402)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.517714337572*x[2]**o + (-0.748284055112)*x[2]
            ref[(0, 0)]+=-0.517714337572*x_ref[2]**o + (-0.748284055112)*x_ref[2]
            arg[(0, 1)]+=-0.624583453055*x[2]**o + (-0.912108863943)*x[2]
            ref[(0, 1)]+=-0.624583453055*x_ref[2]**o + (-0.912108863943)*x_ref[2]
            arg[(0, 2)]+=-0.120014011066*x[2]**o + (0.390425957255)*x[2]
            ref[(0, 2)]+=-0.120014011066*x_ref[2]**o + (0.390425957255)*x_ref[2]
            arg[(0, 3)]+=0.864932315932*x[2]**o + (-0.504099812684)*x[2]
            ref[(0, 3)]+=0.864932315932*x_ref[2]**o + (-0.504099812684)*x_ref[2]
            arg[(1, 0)]+=-0.736282378243*x[2]**o + (-0.727463684906)*x[2]
            ref[(1, 0)]+=-0.736282378243*x_ref[2]**o + (-0.727463684906)*x_ref[2]
            arg[(1, 1)]+=0.0430439086406*x[2]**o + (0.8657953283)*x[2]
            ref[(1, 1)]+=0.0430439086406*x_ref[2]**o + (0.8657953283)*x_ref[2]
            arg[(1, 2)]+=0.130755929102*x[2]**o + (0.391259668373)*x[2]
            ref[(1, 2)]+=0.130755929102*x_ref[2]**o + (0.391259668373)*x_ref[2]
            arg[(1, 3)]+=-0.0322949483955*x[2]**o + (0.970333320401)*x[2]
            ref[(1, 3)]+=-0.0322949483955*x_ref[2]**o + (0.970333320401)*x_ref[2]
            arg[(2, 0)]+=0.718806407702*x[2]**o + (-0.742765403477)*x[2]
            ref[(2, 0)]+=0.718806407702*x_ref[2]**o + (-0.742765403477)*x_ref[2]
            arg[(2, 1)]+=0.210775077172*x[2]**o + (-0.641972413777)*x[2]
            ref[(2, 1)]+=0.210775077172*x_ref[2]**o + (-0.641972413777)*x_ref[2]
            arg[(2, 2)]+=0.546787967673*x[2]**o + (-0.115890244518)*x[2]
            ref[(2, 2)]+=0.546787967673*x_ref[2]**o + (-0.115890244518)*x_ref[2]
            arg[(2, 3)]+=-0.324885171827*x[2]**o + (0.977493227892)*x[2]
            ref[(2, 3)]+=-0.324885171827*x_ref[2]**o + (0.977493227892)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 4),w)
        ref = Data(0,(4, 3, 4),w_ref)
        arg[(0, 0, 0)]=0.941149670481*x[0]**o + (0.782006598085)*x[0] + (-0.801038960261)*x[1]**o + (0.0993117358092)*x[1]
        ref[(0, 0, 0)]=0.941149670481*x_ref[0]**o + (0.782006598085)*x_ref[0] + (-0.801038960261)*x_ref[1]**o + (0.0993117358092)*x_ref[1]
        arg[(0, 0, 1)]=0.32878734794*x[0]**o + (-0.520013685436)*x[0] + (0.311143791072)*x[1]**o + (-0.208625222398)*x[1]
        ref[(0, 0, 1)]=0.32878734794*x_ref[0]**o + (-0.520013685436)*x_ref[0] + (0.311143791072)*x_ref[1]**o + (-0.208625222398)*x_ref[1]
        arg[(0, 0, 2)]=-0.500537015896*x[0]**o + (0.334654289611)*x[0] + (0.917763237174)*x[1]**o + (-0.333556190596)*x[1]
        ref[(0, 0, 2)]=-0.500537015896*x_ref[0]**o + (0.334654289611)*x_ref[0] + (0.917763237174)*x_ref[1]**o + (-0.333556190596)*x_ref[1]
        arg[(0, 0, 3)]=0.73974012163*x[0]**o + (0.833462132465)*x[0] + (0.0981056197612)*x[1]**o + (0.560750857255)*x[1]
        ref[(0, 0, 3)]=0.73974012163*x_ref[0]**o + (0.833462132465)*x_ref[0] + (0.0981056197612)*x_ref[1]**o + (0.560750857255)*x_ref[1]
        arg[(0, 1, 0)]=0.621897055204*x[0]**o + (-0.510154771296)*x[0] + (-0.716890463713)*x[1]**o + (-0.548742863777)*x[1]
        ref[(0, 1, 0)]=0.621897055204*x_ref[0]**o + (-0.510154771296)*x_ref[0] + (-0.716890463713)*x_ref[1]**o + (-0.548742863777)*x_ref[1]
        arg[(0, 1, 1)]=-0.0279820446784*x[0]**o + (0.683715608611)*x[0] + (0.479508446588)*x[1]**o + (0.167672300395)*x[1]
        ref[(0, 1, 1)]=-0.0279820446784*x_ref[0]**o + (0.683715608611)*x_ref[0] + (0.479508446588)*x_ref[1]**o + (0.167672300395)*x_ref[1]
        arg[(0, 1, 2)]=-0.0350564286792*x[0]**o + (-0.724885602619)*x[0] + (0.0948915243816)*x[1]**o + (0.290368491603)*x[1]
        ref[(0, 1, 2)]=-0.0350564286792*x_ref[0]**o + (-0.724885602619)*x_ref[0] + (0.0948915243816)*x_ref[1]**o + (0.290368491603)*x_ref[1]
        arg[(0, 1, 3)]=-0.760108805524*x[0]**o + (-0.982692566243)*x[0] + (-0.332083356653)*x[1]**o + (0.329860079782)*x[1]
        ref[(0, 1, 3)]=-0.760108805524*x_ref[0]**o + (-0.982692566243)*x_ref[0] + (-0.332083356653)*x_ref[1]**o + (0.329860079782)*x_ref[1]
        arg[(0, 2, 0)]=0.670894838123*x[0]**o + (0.684913956536)*x[0] + (0.0713037971848)*x[1]**o + (-0.0989623901595)*x[1]
        ref[(0, 2, 0)]=0.670894838123*x_ref[0]**o + (0.684913956536)*x_ref[0] + (0.0713037971848)*x_ref[1]**o + (-0.0989623901595)*x_ref[1]
        arg[(0, 2, 1)]=0.781635313137*x[0]**o + (-0.374769197131)*x[0] + (-0.514313417998)*x[1]**o + (-0.826023303518)*x[1]
        ref[(0, 2, 1)]=0.781635313137*x_ref[0]**o + (-0.374769197131)*x_ref[0] + (-0.514313417998)*x_ref[1]**o + (-0.826023303518)*x_ref[1]
        arg[(0, 2, 2)]=-0.915631307352*x[0]**o + (-0.845609668015)*x[0] + (0.85193211975)*x[1]**o + (-0.871605696929)*x[1]
        ref[(0, 2, 2)]=-0.915631307352*x_ref[0]**o + (-0.845609668015)*x_ref[0] + (0.85193211975)*x_ref[1]**o + (-0.871605696929)*x_ref[1]
        arg[(0, 2, 3)]=-0.416817991246*x[0]**o + (-0.776710390871)*x[0] + (-0.107992885465)*x[1]**o + (0.247233927792)*x[1]
        ref[(0, 2, 3)]=-0.416817991246*x_ref[0]**o + (-0.776710390871)*x_ref[0] + (-0.107992885465)*x_ref[1]**o + (0.247233927792)*x_ref[1]
        arg[(1, 0, 0)]=-0.219161672571*x[0]**o + (0.663822738855)*x[0] + (-0.618127299491)*x[1]**o + (0.0310691643496)*x[1]
        ref[(1, 0, 0)]=-0.219161672571*x_ref[0]**o + (0.663822738855)*x_ref[0] + (-0.618127299491)*x_ref[1]**o + (0.0310691643496)*x_ref[1]
        arg[(1, 0, 1)]=0.42384362132*x[0]**o + (-0.214071657362)*x[0] + (-0.799633530441)*x[1]**o + (0.20151643074)*x[1]
        ref[(1, 0, 1)]=0.42384362132*x_ref[0]**o + (-0.214071657362)*x_ref[0] + (-0.799633530441)*x_ref[1]**o + (0.20151643074)*x_ref[1]
        arg[(1, 0, 2)]=-0.0469445153846*x[0]**o + (-0.732897980777)*x[0] + (0.927897238542)*x[1]**o + (-0.80144789292)*x[1]
        ref[(1, 0, 2)]=-0.0469445153846*x_ref[0]**o + (-0.732897980777)*x_ref[0] + (0.927897238542)*x_ref[1]**o + (-0.80144789292)*x_ref[1]
        arg[(1, 0, 3)]=0.959543221774*x[0]**o + (0.679312810172)*x[0] + (-0.15658948325)*x[1]**o + (0.490121433252)*x[1]
        ref[(1, 0, 3)]=0.959543221774*x_ref[0]**o + (0.679312810172)*x_ref[0] + (-0.15658948325)*x_ref[1]**o + (0.490121433252)*x_ref[1]
        arg[(1, 1, 0)]=0.0776194954751*x[0]**o + (-0.987409008825)*x[0] + (-0.535675764835)*x[1]**o + (-0.522023429969)*x[1]
        ref[(1, 1, 0)]=0.0776194954751*x_ref[0]**o + (-0.987409008825)*x_ref[0] + (-0.535675764835)*x_ref[1]**o + (-0.522023429969)*x_ref[1]
        arg[(1, 1, 1)]=-0.633313850855*x[0]**o + (-0.581555555793)*x[0] + (-0.0521922617452)*x[1]**o + (0.390457617856)*x[1]
        ref[(1, 1, 1)]=-0.633313850855*x_ref[0]**o + (-0.581555555793)*x_ref[0] + (-0.0521922617452)*x_ref[1]**o + (0.390457617856)*x_ref[1]
        arg[(1, 1, 2)]=-0.395469625341*x[0]**o + (0.450112624228)*x[0] + (0.473327538339)*x[1]**o + (0.735934107039)*x[1]
        ref[(1, 1, 2)]=-0.395469625341*x_ref[0]**o + (0.450112624228)*x_ref[0] + (0.473327538339)*x_ref[1]**o + (0.735934107039)*x_ref[1]
        arg[(1, 1, 3)]=0.0376127776571*x[0]**o + (-0.967394489723)*x[0] + (0.0937420879198)*x[1]**o + (0.0960426996751)*x[1]
        ref[(1, 1, 3)]=0.0376127776571*x_ref[0]**o + (-0.967394489723)*x_ref[0] + (0.0937420879198)*x_ref[1]**o + (0.0960426996751)*x_ref[1]
        arg[(1, 2, 0)]=0.371831345438*x[0]**o + (0.676415511442)*x[0] + (-0.280985757432)*x[1]**o + (0.690479268807)*x[1]
        ref[(1, 2, 0)]=0.371831345438*x_ref[0]**o + (0.676415511442)*x_ref[0] + (-0.280985757432)*x_ref[1]**o + (0.690479268807)*x_ref[1]
        arg[(1, 2, 1)]=-0.501380259601*x[0]**o + (-0.811677595745)*x[0] + (0.26784084657)*x[1]**o + (-0.0410812858756)*x[1]
        ref[(1, 2, 1)]=-0.501380259601*x_ref[0]**o + (-0.811677595745)*x_ref[0] + (0.26784084657)*x_ref[1]**o + (-0.0410812858756)*x_ref[1]
        arg[(1, 2, 2)]=-0.654902806283*x[0]**o + (0.0148879004714)*x[0] + (-0.788524841076)*x[1]**o + (-0.611321780465)*x[1]
        ref[(1, 2, 2)]=-0.654902806283*x_ref[0]**o + (0.0148879004714)*x_ref[0] + (-0.788524841076)*x_ref[1]**o + (-0.611321780465)*x_ref[1]
        arg[(1, 2, 3)]=0.053814894929*x[0]**o + (-0.462528044204)*x[0] + (-0.944852310245)*x[1]**o + (0.18065401179)*x[1]
        ref[(1, 2, 3)]=0.053814894929*x_ref[0]**o + (-0.462528044204)*x_ref[0] + (-0.944852310245)*x_ref[1]**o + (0.18065401179)*x_ref[1]
        arg[(2, 0, 0)]=-0.774657122988*x[0]**o + (0.634873888387)*x[0] + (-0.333184309081)*x[1]**o + (-0.637737580745)*x[1]
        ref[(2, 0, 0)]=-0.774657122988*x_ref[0]**o + (0.634873888387)*x_ref[0] + (-0.333184309081)*x_ref[1]**o + (-0.637737580745)*x_ref[1]
        arg[(2, 0, 1)]=0.358905964014*x[0]**o + (0.960817938699)*x[0] + (-0.439676149434)*x[1]**o + (-0.219647763718)*x[1]
        ref[(2, 0, 1)]=0.358905964014*x_ref[0]**o + (0.960817938699)*x_ref[0] + (-0.439676149434)*x_ref[1]**o + (-0.219647763718)*x_ref[1]
        arg[(2, 0, 2)]=0.803283652742*x[0]**o + (-0.338108770778)*x[0] + (-0.30660377652)*x[1]**o + (-0.276977493665)*x[1]
        ref[(2, 0, 2)]=0.803283652742*x_ref[0]**o + (-0.338108770778)*x_ref[0] + (-0.30660377652)*x_ref[1]**o + (-0.276977493665)*x_ref[1]
        arg[(2, 0, 3)]=0.23019198698*x[0]**o + (-0.0859933948655)*x[0] + (-0.989879062061)*x[1]**o + (0.172730491543)*x[1]
        ref[(2, 0, 3)]=0.23019198698*x_ref[0]**o + (-0.0859933948655)*x_ref[0] + (-0.989879062061)*x_ref[1]**o + (0.172730491543)*x_ref[1]
        arg[(2, 1, 0)]=0.799943114376*x[0]**o + (-0.380941655532)*x[0] + (-0.315378840058)*x[1]**o + (0.308146849859)*x[1]
        ref[(2, 1, 0)]=0.799943114376*x_ref[0]**o + (-0.380941655532)*x_ref[0] + (-0.315378840058)*x_ref[1]**o + (0.308146849859)*x_ref[1]
        arg[(2, 1, 1)]=-0.975679940658*x[0]**o + (0.582488491679)*x[0] + (0.55078060847)*x[1]**o + (0.361716030863)*x[1]
        ref[(2, 1, 1)]=-0.975679940658*x_ref[0]**o + (0.582488491679)*x_ref[0] + (0.55078060847)*x_ref[1]**o + (0.361716030863)*x_ref[1]
        arg[(2, 1, 2)]=-0.0606415689185*x[0]**o + (-0.47239788243)*x[0] + (0.162220984092)*x[1]**o + (0.301507140466)*x[1]
        ref[(2, 1, 2)]=-0.0606415689185*x_ref[0]**o + (-0.47239788243)*x_ref[0] + (0.162220984092)*x_ref[1]**o + (0.301507140466)*x_ref[1]
        arg[(2, 1, 3)]=-0.732243529614*x[0]**o + (0.474666805355)*x[0] + (0.0240638452894)*x[1]**o + (-0.338051893823)*x[1]
        ref[(2, 1, 3)]=-0.732243529614*x_ref[0]**o + (0.474666805355)*x_ref[0] + (0.0240638452894)*x_ref[1]**o + (-0.338051893823)*x_ref[1]
        arg[(2, 2, 0)]=0.366425397957*x[0]**o + (-0.11855634638)*x[0] + (-0.501669241224)*x[1]**o + (0.419362984024)*x[1]
        ref[(2, 2, 0)]=0.366425397957*x_ref[0]**o + (-0.11855634638)*x_ref[0] + (-0.501669241224)*x_ref[1]**o + (0.419362984024)*x_ref[1]
        arg[(2, 2, 1)]=0.484420309672*x[0]**o + (0.360409963447)*x[0] + (-0.25268960821)*x[1]**o + (-0.499020310696)*x[1]
        ref[(2, 2, 1)]=0.484420309672*x_ref[0]**o + (0.360409963447)*x_ref[0] + (-0.25268960821)*x_ref[1]**o + (-0.499020310696)*x_ref[1]
        arg[(2, 2, 2)]=-0.00224172493344*x[0]**o + (-0.224090696651)*x[0] + (-0.586520765291)*x[1]**o + (0.170878748959)*x[1]
        ref[(2, 2, 2)]=-0.00224172493344*x_ref[0]**o + (-0.224090696651)*x_ref[0] + (-0.586520765291)*x_ref[1]**o + (0.170878748959)*x_ref[1]
        arg[(2, 2, 3)]=0.417900407904*x[0]**o + (0.0504927800101)*x[0] + (0.981631152276)*x[1]**o + (0.314719737306)*x[1]
        ref[(2, 2, 3)]=0.417900407904*x_ref[0]**o + (0.0504927800101)*x_ref[0] + (0.981631152276)*x_ref[1]**o + (0.314719737306)*x_ref[1]
        arg[(3, 0, 0)]=-0.876599281656*x[0]**o + (0.654191890186)*x[0] + (0.529941569315)*x[1]**o + (-0.458908268236)*x[1]
        ref[(3, 0, 0)]=-0.876599281656*x_ref[0]**o + (0.654191890186)*x_ref[0] + (0.529941569315)*x_ref[1]**o + (-0.458908268236)*x_ref[1]
        arg[(3, 0, 1)]=-0.707607135905*x[0]**o + (0.986116744831)*x[0] + (-0.464949207397)*x[1]**o + (0.0617282847992)*x[1]
        ref[(3, 0, 1)]=-0.707607135905*x_ref[0]**o + (0.986116744831)*x_ref[0] + (-0.464949207397)*x_ref[1]**o + (0.0617282847992)*x_ref[1]
        arg[(3, 0, 2)]=0.211773968172*x[0]**o + (-0.500227946944)*x[0] + (-0.642554069458)*x[1]**o + (0.180256633856)*x[1]
        ref[(3, 0, 2)]=0.211773968172*x_ref[0]**o + (-0.500227946944)*x_ref[0] + (-0.642554069458)*x_ref[1]**o + (0.180256633856)*x_ref[1]
        arg[(3, 0, 3)]=-0.102493541069*x[0]**o + (-0.745114195592)*x[0] + (0.274125913411)*x[1]**o + (0.170311536533)*x[1]
        ref[(3, 0, 3)]=-0.102493541069*x_ref[0]**o + (-0.745114195592)*x_ref[0] + (0.274125913411)*x_ref[1]**o + (0.170311536533)*x_ref[1]
        arg[(3, 1, 0)]=0.666979014255*x[0]**o + (-0.575923079299)*x[0] + (-0.934032125921)*x[1]**o + (0.74986331242)*x[1]
        ref[(3, 1, 0)]=0.666979014255*x_ref[0]**o + (-0.575923079299)*x_ref[0] + (-0.934032125921)*x_ref[1]**o + (0.74986331242)*x_ref[1]
        arg[(3, 1, 1)]=0.720560208548*x[0]**o + (-0.77390093008)*x[0] + (0.0877832965942)*x[1]**o + (0.570248615507)*x[1]
        ref[(3, 1, 1)]=0.720560208548*x_ref[0]**o + (-0.77390093008)*x_ref[0] + (0.0877832965942)*x_ref[1]**o + (0.570248615507)*x_ref[1]
        arg[(3, 1, 2)]=0.369624003423*x[0]**o + (0.910926962972)*x[0] + (0.254048596643)*x[1]**o + (-0.910798473745)*x[1]
        ref[(3, 1, 2)]=0.369624003423*x_ref[0]**o + (0.910926962972)*x_ref[0] + (0.254048596643)*x_ref[1]**o + (-0.910798473745)*x_ref[1]
        arg[(3, 1, 3)]=-0.356543067173*x[0]**o + (-0.667262661494)*x[0] + (-0.651521090594)*x[1]**o + (-0.625059501035)*x[1]
        ref[(3, 1, 3)]=-0.356543067173*x_ref[0]**o + (-0.667262661494)*x_ref[0] + (-0.651521090594)*x_ref[1]**o + (-0.625059501035)*x_ref[1]
        arg[(3, 2, 0)]=-0.535285294611*x[0]**o + (-0.469669491365)*x[0] + (-0.964159871642)*x[1]**o + (-0.00329885354097)*x[1]
        ref[(3, 2, 0)]=-0.535285294611*x_ref[0]**o + (-0.469669491365)*x_ref[0] + (-0.964159871642)*x_ref[1]**o + (-0.00329885354097)*x_ref[1]
        arg[(3, 2, 1)]=0.349202401256*x[0]**o + (0.946999958006)*x[0] + (0.43667373089)*x[1]**o + (0.708054945293)*x[1]
        ref[(3, 2, 1)]=0.349202401256*x_ref[0]**o + (0.946999958006)*x_ref[0] + (0.43667373089)*x_ref[1]**o + (0.708054945293)*x_ref[1]
        arg[(3, 2, 2)]=-0.826648209643*x[0]**o + (-0.599213498998)*x[0] + (0.17671502632)*x[1]**o + (0.464030723323)*x[1]
        ref[(3, 2, 2)]=-0.826648209643*x_ref[0]**o + (-0.599213498998)*x_ref[0] + (0.17671502632)*x_ref[1]**o + (0.464030723323)*x_ref[1]
        arg[(3, 2, 3)]=0.608726967328*x[0]**o + (-0.603701588583)*x[0] + (-0.190586486338)*x[1]**o + (0.131281314265)*x[1]
        ref[(3, 2, 3)]=0.608726967328*x_ref[0]**o + (-0.603701588583)*x_ref[0] + (-0.190586486338)*x_ref[1]**o + (0.131281314265)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.690782477332*x[2]**o + (0.0268822557512)*x[2]
            ref[(0, 0, 0)]+=0.690782477332*x_ref[2]**o + (0.0268822557512)*x_ref[2]
            arg[(0, 0, 1)]+=-0.203858778706*x[2]**o + (-0.269540986822)*x[2]
            ref[(0, 0, 1)]+=-0.203858778706*x_ref[2]**o + (-0.269540986822)*x_ref[2]
            arg[(0, 0, 2)]+=0.60332366507*x[2]**o + (0.272699952393)*x[2]
            ref[(0, 0, 2)]+=0.60332366507*x_ref[2]**o + (0.272699952393)*x_ref[2]
            arg[(0, 0, 3)]+=-0.480110483989*x[2]**o + (-0.515246235441)*x[2]
            ref[(0, 0, 3)]+=-0.480110483989*x_ref[2]**o + (-0.515246235441)*x_ref[2]
            arg[(0, 1, 0)]+=-0.500998745166*x[2]**o + (0.237789314309)*x[2]
            ref[(0, 1, 0)]+=-0.500998745166*x_ref[2]**o + (0.237789314309)*x_ref[2]
            arg[(0, 1, 1)]+=0.279029475037*x[2]**o + (-0.900872154197)*x[2]
            ref[(0, 1, 1)]+=0.279029475037*x_ref[2]**o + (-0.900872154197)*x_ref[2]
            arg[(0, 1, 2)]+=-0.840725871144*x[2]**o + (-0.396090851699)*x[2]
            ref[(0, 1, 2)]+=-0.840725871144*x_ref[2]**o + (-0.396090851699)*x_ref[2]
            arg[(0, 1, 3)]+=0.984547896095*x[2]**o + (-0.471971030844)*x[2]
            ref[(0, 1, 3)]+=0.984547896095*x_ref[2]**o + (-0.471971030844)*x_ref[2]
            arg[(0, 2, 0)]+=-0.760255909651*x[2]**o + (-0.559238984569)*x[2]
            ref[(0, 2, 0)]+=-0.760255909651*x_ref[2]**o + (-0.559238984569)*x_ref[2]
            arg[(0, 2, 1)]+=-0.293221475725*x[2]**o + (-0.532627649878)*x[2]
            ref[(0, 2, 1)]+=-0.293221475725*x_ref[2]**o + (-0.532627649878)*x_ref[2]
            arg[(0, 2, 2)]+=-0.0753425348369*x[2]**o + (0.129168027311)*x[2]
            ref[(0, 2, 2)]+=-0.0753425348369*x_ref[2]**o + (0.129168027311)*x_ref[2]
            arg[(0, 2, 3)]+=0.389030445191*x[2]**o + (-0.125546268104)*x[2]
            ref[(0, 2, 3)]+=0.389030445191*x_ref[2]**o + (-0.125546268104)*x_ref[2]
            arg[(1, 0, 0)]+=0.592716903269*x[2]**o + (0.369890306826)*x[2]
            ref[(1, 0, 0)]+=0.592716903269*x_ref[2]**o + (0.369890306826)*x_ref[2]
            arg[(1, 0, 1)]+=-0.244419943902*x[2]**o + (-0.0626117893091)*x[2]
            ref[(1, 0, 1)]+=-0.244419943902*x_ref[2]**o + (-0.0626117893091)*x_ref[2]
            arg[(1, 0, 2)]+=0.302271094866*x[2]**o + (0.650630553929)*x[2]
            ref[(1, 0, 2)]+=0.302271094866*x_ref[2]**o + (0.650630553929)*x_ref[2]
            arg[(1, 0, 3)]+=0.856641830412*x[2]**o + (0.883860627408)*x[2]
            ref[(1, 0, 3)]+=0.856641830412*x_ref[2]**o + (0.883860627408)*x_ref[2]
            arg[(1, 1, 0)]+=-0.555377000301*x[2]**o + (-0.620404202146)*x[2]
            ref[(1, 1, 0)]+=-0.555377000301*x_ref[2]**o + (-0.620404202146)*x_ref[2]
            arg[(1, 1, 1)]+=-0.968456318891*x[2]**o + (0.444477187421)*x[2]
            ref[(1, 1, 1)]+=-0.968456318891*x_ref[2]**o + (0.444477187421)*x_ref[2]
            arg[(1, 1, 2)]+=0.613494718728*x[2]**o + (0.633688375422)*x[2]
            ref[(1, 1, 2)]+=0.613494718728*x_ref[2]**o + (0.633688375422)*x_ref[2]
            arg[(1, 1, 3)]+=0.772235775531*x[2]**o + (-0.666222546761)*x[2]
            ref[(1, 1, 3)]+=0.772235775531*x_ref[2]**o + (-0.666222546761)*x_ref[2]
            arg[(1, 2, 0)]+=-0.912062415742*x[2]**o + (-0.743135594482)*x[2]
            ref[(1, 2, 0)]+=-0.912062415742*x_ref[2]**o + (-0.743135594482)*x_ref[2]
            arg[(1, 2, 1)]+=-0.692314417233*x[2]**o + (0.756172275073)*x[2]
            ref[(1, 2, 1)]+=-0.692314417233*x_ref[2]**o + (0.756172275073)*x_ref[2]
            arg[(1, 2, 2)]+=0.98278999212*x[2]**o + (0.577638825629)*x[2]
            ref[(1, 2, 2)]+=0.98278999212*x_ref[2]**o + (0.577638825629)*x_ref[2]
            arg[(1, 2, 3)]+=0.268254267267*x[2]**o + (0.1635032162)*x[2]
            ref[(1, 2, 3)]+=0.268254267267*x_ref[2]**o + (0.1635032162)*x_ref[2]
            arg[(2, 0, 0)]+=-0.153402799959*x[2]**o + (-0.951000496246)*x[2]
            ref[(2, 0, 0)]+=-0.153402799959*x_ref[2]**o + (-0.951000496246)*x_ref[2]
            arg[(2, 0, 1)]+=-0.714920962825*x[2]**o + (0.128863272404)*x[2]
            ref[(2, 0, 1)]+=-0.714920962825*x_ref[2]**o + (0.128863272404)*x_ref[2]
            arg[(2, 0, 2)]+=0.0427378564319*x[2]**o + (0.733941410342)*x[2]
            ref[(2, 0, 2)]+=0.0427378564319*x_ref[2]**o + (0.733941410342)*x_ref[2]
            arg[(2, 0, 3)]+=0.747695744923*x[2]**o + (-0.250384680079)*x[2]
            ref[(2, 0, 3)]+=0.747695744923*x_ref[2]**o + (-0.250384680079)*x_ref[2]
            arg[(2, 1, 0)]+=-0.134885559398*x[2]**o + (-0.00455545356756)*x[2]
            ref[(2, 1, 0)]+=-0.134885559398*x_ref[2]**o + (-0.00455545356756)*x_ref[2]
            arg[(2, 1, 1)]+=0.219562905935*x[2]**o + (-0.211004993888)*x[2]
            ref[(2, 1, 1)]+=0.219562905935*x_ref[2]**o + (-0.211004993888)*x_ref[2]
            arg[(2, 1, 2)]+=0.178632169094*x[2]**o + (-0.294572155631)*x[2]
            ref[(2, 1, 2)]+=0.178632169094*x_ref[2]**o + (-0.294572155631)*x_ref[2]
            arg[(2, 1, 3)]+=-0.615127778722*x[2]**o + (0.978216595752)*x[2]
            ref[(2, 1, 3)]+=-0.615127778722*x_ref[2]**o + (0.978216595752)*x_ref[2]
            arg[(2, 2, 0)]+=-0.423031992659*x[2]**o + (-0.765602862709)*x[2]
            ref[(2, 2, 0)]+=-0.423031992659*x_ref[2]**o + (-0.765602862709)*x_ref[2]
            arg[(2, 2, 1)]+=-0.789109321176*x[2]**o + (0.634703695704)*x[2]
            ref[(2, 2, 1)]+=-0.789109321176*x_ref[2]**o + (0.634703695704)*x_ref[2]
            arg[(2, 2, 2)]+=-0.51173170939*x[2]**o + (0.636674422821)*x[2]
            ref[(2, 2, 2)]+=-0.51173170939*x_ref[2]**o + (0.636674422821)*x_ref[2]
            arg[(2, 2, 3)]+=0.920562397958*x[2]**o + (-0.590981243252)*x[2]
            ref[(2, 2, 3)]+=0.920562397958*x_ref[2]**o + (-0.590981243252)*x_ref[2]
            arg[(3, 0, 0)]+=-0.946051059722*x[2]**o + (0.511294083147)*x[2]
            ref[(3, 0, 0)]+=-0.946051059722*x_ref[2]**o + (0.511294083147)*x_ref[2]
            arg[(3, 0, 1)]+=0.986330940883*x[2]**o + (0.543101538329)*x[2]
            ref[(3, 0, 1)]+=0.986330940883*x_ref[2]**o + (0.543101538329)*x_ref[2]
            arg[(3, 0, 2)]+=0.926948753976*x[2]**o + (-0.780099827303)*x[2]
            ref[(3, 0, 2)]+=0.926948753976*x_ref[2]**o + (-0.780099827303)*x_ref[2]
            arg[(3, 0, 3)]+=-0.312423644847*x[2]**o + (0.624618367156)*x[2]
            ref[(3, 0, 3)]+=-0.312423644847*x_ref[2]**o + (0.624618367156)*x_ref[2]
            arg[(3, 1, 0)]+=0.186519909488*x[2]**o + (-0.832373019837)*x[2]
            ref[(3, 1, 0)]+=0.186519909488*x_ref[2]**o + (-0.832373019837)*x_ref[2]
            arg[(3, 1, 1)]+=-0.0687128951268*x[2]**o + (0.38291725509)*x[2]
            ref[(3, 1, 1)]+=-0.0687128951268*x_ref[2]**o + (0.38291725509)*x_ref[2]
            arg[(3, 1, 2)]+=0.0404203996605*x[2]**o + (0.442217983541)*x[2]
            ref[(3, 1, 2)]+=0.0404203996605*x_ref[2]**o + (0.442217983541)*x_ref[2]
            arg[(3, 1, 3)]+=-0.643183515455*x[2]**o + (-0.842403752468)*x[2]
            ref[(3, 1, 3)]+=-0.643183515455*x_ref[2]**o + (-0.842403752468)*x_ref[2]
            arg[(3, 2, 0)]+=0.312647693625*x[2]**o + (-0.497099179855)*x[2]
            ref[(3, 2, 0)]+=0.312647693625*x_ref[2]**o + (-0.497099179855)*x_ref[2]
            arg[(3, 2, 1)]+=-0.251049600525*x[2]**o + (-0.224453250333)*x[2]
            ref[(3, 2, 1)]+=-0.251049600525*x_ref[2]**o + (-0.224453250333)*x_ref[2]
            arg[(3, 2, 2)]+=0.420879074392*x[2]**o + (-0.890127677103)*x[2]
            ref[(3, 2, 2)]+=0.420879074392*x_ref[2]**o + (-0.890127677103)*x_ref[2]
            arg[(3, 2, 3)]+=-0.442783128387*x[2]**o + (0.579864555185)*x[2]
            ref[(3, 2, 3)]+=-0.442783128387*x_ref[2]**o + (0.579864555185)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 3, 4),w)
        ref = Data(0,(2, 3, 3, 4),w_ref)
        arg[(0, 0, 0, 0)]=-0.475873326195*x[0]**o + (-0.25459848093)*x[0] + (0.808256401965)*x[1]**o + (0.0915419753649)*x[1]
        ref[(0, 0, 0, 0)]=-0.475873326195*x_ref[0]**o + (-0.25459848093)*x_ref[0] + (0.808256401965)*x_ref[1]**o + (0.0915419753649)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.59349041997*x[0]**o + (0.921366948301)*x[0] + (-0.416922172111)*x[1]**o + (-0.555658808397)*x[1]
        ref[(0, 0, 0, 1)]=0.59349041997*x_ref[0]**o + (0.921366948301)*x_ref[0] + (-0.416922172111)*x_ref[1]**o + (-0.555658808397)*x_ref[1]
        arg[(0, 0, 0, 2)]=-0.326477608861*x[0]**o + (-0.572782109749)*x[0] + (-0.505001551049)*x[1]**o + (-0.252526718694)*x[1]
        ref[(0, 0, 0, 2)]=-0.326477608861*x_ref[0]**o + (-0.572782109749)*x_ref[0] + (-0.505001551049)*x_ref[1]**o + (-0.252526718694)*x_ref[1]
        arg[(0, 0, 0, 3)]=0.968031852522*x[0]**o + (-0.598720057415)*x[0] + (-0.222012932861)*x[1]**o + (-0.129199040525)*x[1]
        ref[(0, 0, 0, 3)]=0.968031852522*x_ref[0]**o + (-0.598720057415)*x_ref[0] + (-0.222012932861)*x_ref[1]**o + (-0.129199040525)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.406652395684*x[0]**o + (-0.538206530626)*x[0] + (-0.466036556926)*x[1]**o + (-0.447431628945)*x[1]
        ref[(0, 0, 1, 0)]=0.406652395684*x_ref[0]**o + (-0.538206530626)*x_ref[0] + (-0.466036556926)*x_ref[1]**o + (-0.447431628945)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.494756075516*x[0]**o + (0.301928845543)*x[0] + (0.228793686511)*x[1]**o + (-0.52215129289)*x[1]
        ref[(0, 0, 1, 1)]=0.494756075516*x_ref[0]**o + (0.301928845543)*x_ref[0] + (0.228793686511)*x_ref[1]**o + (-0.52215129289)*x_ref[1]
        arg[(0, 0, 1, 2)]=0.0348333755553*x[0]**o + (-0.16814924338)*x[0] + (-0.728118836271)*x[1]**o + (-0.762904085786)*x[1]
        ref[(0, 0, 1, 2)]=0.0348333755553*x_ref[0]**o + (-0.16814924338)*x_ref[0] + (-0.728118836271)*x_ref[1]**o + (-0.762904085786)*x_ref[1]
        arg[(0, 0, 1, 3)]=0.0735027560622*x[0]**o + (0.631489794936)*x[0] + (-0.495089093735)*x[1]**o + (-0.27763211513)*x[1]
        ref[(0, 0, 1, 3)]=0.0735027560622*x_ref[0]**o + (0.631489794936)*x_ref[0] + (-0.495089093735)*x_ref[1]**o + (-0.27763211513)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.648954885676*x[0]**o + (-0.110766978832)*x[0] + (0.487838428827)*x[1]**o + (-0.335520567147)*x[1]
        ref[(0, 0, 2, 0)]=-0.648954885676*x_ref[0]**o + (-0.110766978832)*x_ref[0] + (0.487838428827)*x_ref[1]**o + (-0.335520567147)*x_ref[1]
        arg[(0, 0, 2, 1)]=0.93703881306*x[0]**o + (-0.0124956627072)*x[0] + (0.046580991118)*x[1]**o + (-0.024597490531)*x[1]
        ref[(0, 0, 2, 1)]=0.93703881306*x_ref[0]**o + (-0.0124956627072)*x_ref[0] + (0.046580991118)*x_ref[1]**o + (-0.024597490531)*x_ref[1]
        arg[(0, 0, 2, 2)]=0.906558123269*x[0]**o + (-0.0752015042967)*x[0] + (-0.679214278446)*x[1]**o + (-0.0697182460268)*x[1]
        ref[(0, 0, 2, 2)]=0.906558123269*x_ref[0]**o + (-0.0752015042967)*x_ref[0] + (-0.679214278446)*x_ref[1]**o + (-0.0697182460268)*x_ref[1]
        arg[(0, 0, 2, 3)]=-0.217688332904*x[0]**o + (-0.112382118371)*x[0] + (-0.229466021485)*x[1]**o + (0.311229060841)*x[1]
        ref[(0, 0, 2, 3)]=-0.217688332904*x_ref[0]**o + (-0.112382118371)*x_ref[0] + (-0.229466021485)*x_ref[1]**o + (0.311229060841)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.397590636664*x[0]**o + (-0.408285619151)*x[0] + (0.768968087635)*x[1]**o + (-0.87721799892)*x[1]
        ref[(0, 1, 0, 0)]=-0.397590636664*x_ref[0]**o + (-0.408285619151)*x_ref[0] + (0.768968087635)*x_ref[1]**o + (-0.87721799892)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.608514626348*x[0]**o + (-0.595020814146)*x[0] + (0.932603363642)*x[1]**o + (-0.86581297269)*x[1]
        ref[(0, 1, 0, 1)]=0.608514626348*x_ref[0]**o + (-0.595020814146)*x_ref[0] + (0.932603363642)*x_ref[1]**o + (-0.86581297269)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.316030814467*x[0]**o + (-0.281049929804)*x[0] + (0.556469470511)*x[1]**o + (-0.981817261982)*x[1]
        ref[(0, 1, 0, 2)]=0.316030814467*x_ref[0]**o + (-0.281049929804)*x_ref[0] + (0.556469470511)*x_ref[1]**o + (-0.981817261982)*x_ref[1]
        arg[(0, 1, 0, 3)]=0.658225326772*x[0]**o + (0.312973094361)*x[0] + (0.0442633289916)*x[1]**o + (0.756033922962)*x[1]
        ref[(0, 1, 0, 3)]=0.658225326772*x_ref[0]**o + (0.312973094361)*x_ref[0] + (0.0442633289916)*x_ref[1]**o + (0.756033922962)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.445929140612*x[0]**o + (-0.423794921033)*x[0] + (0.178483089237)*x[1]**o + (-0.766014046491)*x[1]
        ref[(0, 1, 1, 0)]=0.445929140612*x_ref[0]**o + (-0.423794921033)*x_ref[0] + (0.178483089237)*x_ref[1]**o + (-0.766014046491)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.218496526429*x[0]**o + (-0.954395042641)*x[0] + (0.0518994085396)*x[1]**o + (-0.161614620425)*x[1]
        ref[(0, 1, 1, 1)]=0.218496526429*x_ref[0]**o + (-0.954395042641)*x_ref[0] + (0.0518994085396)*x_ref[1]**o + (-0.161614620425)*x_ref[1]
        arg[(0, 1, 1, 2)]=0.526496104899*x[0]**o + (-0.674643823158)*x[0] + (-0.228108392755)*x[1]**o + (-0.964306317364)*x[1]
        ref[(0, 1, 1, 2)]=0.526496104899*x_ref[0]**o + (-0.674643823158)*x_ref[0] + (-0.228108392755)*x_ref[1]**o + (-0.964306317364)*x_ref[1]
        arg[(0, 1, 1, 3)]=-0.639107355833*x[0]**o + (0.977401058322)*x[0] + (0.574298877549)*x[1]**o + (-0.889821108237)*x[1]
        ref[(0, 1, 1, 3)]=-0.639107355833*x_ref[0]**o + (0.977401058322)*x_ref[0] + (0.574298877549)*x_ref[1]**o + (-0.889821108237)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.156777660908*x[0]**o + (0.100465828124)*x[0] + (0.206098671085)*x[1]**o + (0.0989156397479)*x[1]
        ref[(0, 1, 2, 0)]=-0.156777660908*x_ref[0]**o + (0.100465828124)*x_ref[0] + (0.206098671085)*x_ref[1]**o + (0.0989156397479)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.966923879115*x[0]**o + (0.287501732976)*x[0] + (0.136103858932)*x[1]**o + (0.405337713219)*x[1]
        ref[(0, 1, 2, 1)]=0.966923879115*x_ref[0]**o + (0.287501732976)*x_ref[0] + (0.136103858932)*x_ref[1]**o + (0.405337713219)*x_ref[1]
        arg[(0, 1, 2, 2)]=-0.140245143689*x[0]**o + (0.903503258455)*x[0] + (0.114390789304)*x[1]**o + (-0.170896509723)*x[1]
        ref[(0, 1, 2, 2)]=-0.140245143689*x_ref[0]**o + (0.903503258455)*x_ref[0] + (0.114390789304)*x_ref[1]**o + (-0.170896509723)*x_ref[1]
        arg[(0, 1, 2, 3)]=-0.049704521361*x[0]**o + (0.910663554572)*x[0] + (0.0316167671501)*x[1]**o + (-0.991741980592)*x[1]
        ref[(0, 1, 2, 3)]=-0.049704521361*x_ref[0]**o + (0.910663554572)*x_ref[0] + (0.0316167671501)*x_ref[1]**o + (-0.991741980592)*x_ref[1]
        arg[(0, 2, 0, 0)]=-0.878965490807*x[0]**o + (0.317599069776)*x[0] + (0.379810074187)*x[1]**o + (-0.759355640517)*x[1]
        ref[(0, 2, 0, 0)]=-0.878965490807*x_ref[0]**o + (0.317599069776)*x_ref[0] + (0.379810074187)*x_ref[1]**o + (-0.759355640517)*x_ref[1]
        arg[(0, 2, 0, 1)]=0.334163799519*x[0]**o + (-0.434498782758)*x[0] + (0.557787477309)*x[1]**o + (0.215116846565)*x[1]
        ref[(0, 2, 0, 1)]=0.334163799519*x_ref[0]**o + (-0.434498782758)*x_ref[0] + (0.557787477309)*x_ref[1]**o + (0.215116846565)*x_ref[1]
        arg[(0, 2, 0, 2)]=-0.0329077269808*x[0]**o + (-0.201191531973)*x[0] + (-0.308157520932)*x[1]**o + (-0.128900708598)*x[1]
        ref[(0, 2, 0, 2)]=-0.0329077269808*x_ref[0]**o + (-0.201191531973)*x_ref[0] + (-0.308157520932)*x_ref[1]**o + (-0.128900708598)*x_ref[1]
        arg[(0, 2, 0, 3)]=0.896037815697*x[0]**o + (-0.645354763089)*x[0] + (-0.58467431588)*x[1]**o + (-0.649159692827)*x[1]
        ref[(0, 2, 0, 3)]=0.896037815697*x_ref[0]**o + (-0.645354763089)*x_ref[0] + (-0.58467431588)*x_ref[1]**o + (-0.649159692827)*x_ref[1]
        arg[(0, 2, 1, 0)]=0.620272056495*x[0]**o + (-0.118579193196)*x[0] + (0.30087775908)*x[1]**o + (0.703029576594)*x[1]
        ref[(0, 2, 1, 0)]=0.620272056495*x_ref[0]**o + (-0.118579193196)*x_ref[0] + (0.30087775908)*x_ref[1]**o + (0.703029576594)*x_ref[1]
        arg[(0, 2, 1, 1)]=0.863192033923*x[0]**o + (-0.633095040917)*x[0] + (-0.35674636301)*x[1]**o + (0.0174580783489)*x[1]
        ref[(0, 2, 1, 1)]=0.863192033923*x_ref[0]**o + (-0.633095040917)*x_ref[0] + (-0.35674636301)*x_ref[1]**o + (0.0174580783489)*x_ref[1]
        arg[(0, 2, 1, 2)]=0.704449591429*x[0]**o + (-0.578356416683)*x[0] + (0.241335076459)*x[1]**o + (0.206700046203)*x[1]
        ref[(0, 2, 1, 2)]=0.704449591429*x_ref[0]**o + (-0.578356416683)*x_ref[0] + (0.241335076459)*x_ref[1]**o + (0.206700046203)*x_ref[1]
        arg[(0, 2, 1, 3)]=0.588927883864*x[0]**o + (0.775619683052)*x[0] + (0.880388933546)*x[1]**o + (-0.477613721909)*x[1]
        ref[(0, 2, 1, 3)]=0.588927883864*x_ref[0]**o + (0.775619683052)*x_ref[0] + (0.880388933546)*x_ref[1]**o + (-0.477613721909)*x_ref[1]
        arg[(0, 2, 2, 0)]=0.00795418837889*x[0]**o + (-0.293505971061)*x[0] + (0.902549997052)*x[1]**o + (-0.745237301688)*x[1]
        ref[(0, 2, 2, 0)]=0.00795418837889*x_ref[0]**o + (-0.293505971061)*x_ref[0] + (0.902549997052)*x_ref[1]**o + (-0.745237301688)*x_ref[1]
        arg[(0, 2, 2, 1)]=-0.667688422755*x[0]**o + (-0.959894639093)*x[0] + (-0.0850607696948)*x[1]**o + (0.203749929149)*x[1]
        ref[(0, 2, 2, 1)]=-0.667688422755*x_ref[0]**o + (-0.959894639093)*x_ref[0] + (-0.0850607696948)*x_ref[1]**o + (0.203749929149)*x_ref[1]
        arg[(0, 2, 2, 2)]=0.475843087846*x[0]**o + (-0.751477319472)*x[0] + (-0.443752968685)*x[1]**o + (0.447103361648)*x[1]
        ref[(0, 2, 2, 2)]=0.475843087846*x_ref[0]**o + (-0.751477319472)*x_ref[0] + (-0.443752968685)*x_ref[1]**o + (0.447103361648)*x_ref[1]
        arg[(0, 2, 2, 3)]=0.449898338596*x[0]**o + (0.114834661824)*x[0] + (0.802948248298)*x[1]**o + (0.861875400166)*x[1]
        ref[(0, 2, 2, 3)]=0.449898338596*x_ref[0]**o + (0.114834661824)*x_ref[0] + (0.802948248298)*x_ref[1]**o + (0.861875400166)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.539144745545*x[0]**o + (0.995284404266)*x[0] + (-0.893630338082)*x[1]**o + (0.000417927375993)*x[1]
        ref[(1, 0, 0, 0)]=-0.539144745545*x_ref[0]**o + (0.995284404266)*x_ref[0] + (-0.893630338082)*x_ref[1]**o + (0.000417927375993)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.376484217189*x[0]**o + (-0.378484402174)*x[0] + (-0.980748280755)*x[1]**o + (0.996066100869)*x[1]
        ref[(1, 0, 0, 1)]=0.376484217189*x_ref[0]**o + (-0.378484402174)*x_ref[0] + (-0.980748280755)*x_ref[1]**o + (0.996066100869)*x_ref[1]
        arg[(1, 0, 0, 2)]=0.106659510084*x[0]**o + (-0.984022218023)*x[0] + (0.38322877004)*x[1]**o + (-0.10023794004)*x[1]
        ref[(1, 0, 0, 2)]=0.106659510084*x_ref[0]**o + (-0.984022218023)*x_ref[0] + (0.38322877004)*x_ref[1]**o + (-0.10023794004)*x_ref[1]
        arg[(1, 0, 0, 3)]=0.797582124118*x[0]**o + (-0.142875305789)*x[0] + (0.784016680119)*x[1]**o + (0.513624589004)*x[1]
        ref[(1, 0, 0, 3)]=0.797582124118*x_ref[0]**o + (-0.142875305789)*x_ref[0] + (0.784016680119)*x_ref[1]**o + (0.513624589004)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.380908279949*x[0]**o + (0.446747635154)*x[0] + (0.293213231623)*x[1]**o + (0.13992495448)*x[1]
        ref[(1, 0, 1, 0)]=0.380908279949*x_ref[0]**o + (0.446747635154)*x_ref[0] + (0.293213231623)*x_ref[1]**o + (0.13992495448)*x_ref[1]
        arg[(1, 0, 1, 1)]=-0.778904000138*x[0]**o + (-0.424643563342)*x[0] + (-0.376650675758)*x[1]**o + (0.388623089437)*x[1]
        ref[(1, 0, 1, 1)]=-0.778904000138*x_ref[0]**o + (-0.424643563342)*x_ref[0] + (-0.376650675758)*x_ref[1]**o + (0.388623089437)*x_ref[1]
        arg[(1, 0, 1, 2)]=-0.272524007382*x[0]**o + (0.0118174988841)*x[0] + (0.274100850827)*x[1]**o + (-0.880577476856)*x[1]
        ref[(1, 0, 1, 2)]=-0.272524007382*x_ref[0]**o + (0.0118174988841)*x_ref[0] + (0.274100850827)*x_ref[1]**o + (-0.880577476856)*x_ref[1]
        arg[(1, 0, 1, 3)]=-0.778324670231*x[0]**o + (-0.994450355724)*x[0] + (-0.966574861083)*x[1]**o + (0.718876058213)*x[1]
        ref[(1, 0, 1, 3)]=-0.778324670231*x_ref[0]**o + (-0.994450355724)*x_ref[0] + (-0.966574861083)*x_ref[1]**o + (0.718876058213)*x_ref[1]
        arg[(1, 0, 2, 0)]=-0.146339365392*x[0]**o + (-0.0750423391754)*x[0] + (-0.119930542209)*x[1]**o + (0.438742803238)*x[1]
        ref[(1, 0, 2, 0)]=-0.146339365392*x_ref[0]**o + (-0.0750423391754)*x_ref[0] + (-0.119930542209)*x_ref[1]**o + (0.438742803238)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.280743482595*x[0]**o + (0.483562865444)*x[0] + (0.228560617658)*x[1]**o + (-0.655556976278)*x[1]
        ref[(1, 0, 2, 1)]=0.280743482595*x_ref[0]**o + (0.483562865444)*x_ref[0] + (0.228560617658)*x_ref[1]**o + (-0.655556976278)*x_ref[1]
        arg[(1, 0, 2, 2)]=-0.963494677923*x[0]**o + (0.82165853321)*x[0] + (-0.150500736337)*x[1]**o + (0.147962706461)*x[1]
        ref[(1, 0, 2, 2)]=-0.963494677923*x_ref[0]**o + (0.82165853321)*x_ref[0] + (-0.150500736337)*x_ref[1]**o + (0.147962706461)*x_ref[1]
        arg[(1, 0, 2, 3)]=-0.778944069615*x[0]**o + (-0.828554171671)*x[0] + (-0.687195603092)*x[1]**o + (-0.991879072603)*x[1]
        ref[(1, 0, 2, 3)]=-0.778944069615*x_ref[0]**o + (-0.828554171671)*x_ref[0] + (-0.687195603092)*x_ref[1]**o + (-0.991879072603)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.597462007314*x[0]**o + (-0.541847074452)*x[0] + (0.981305272739)*x[1]**o + (-0.764135918944)*x[1]
        ref[(1, 1, 0, 0)]=-0.597462007314*x_ref[0]**o + (-0.541847074452)*x_ref[0] + (0.981305272739)*x_ref[1]**o + (-0.764135918944)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.741106858122*x[0]**o + (-0.16864808869)*x[0] + (0.80831987977)*x[1]**o + (-0.0843464338186)*x[1]
        ref[(1, 1, 0, 1)]=0.741106858122*x_ref[0]**o + (-0.16864808869)*x_ref[0] + (0.80831987977)*x_ref[1]**o + (-0.0843464338186)*x_ref[1]
        arg[(1, 1, 0, 2)]=-0.660802659541*x[0]**o + (0.627488872564)*x[0] + (-0.0404335920799)*x[1]**o + (0.32770113522)*x[1]
        ref[(1, 1, 0, 2)]=-0.660802659541*x_ref[0]**o + (0.627488872564)*x_ref[0] + (-0.0404335920799)*x_ref[1]**o + (0.32770113522)*x_ref[1]
        arg[(1, 1, 0, 3)]=-0.856673490176*x[0]**o + (0.261798965583)*x[0] + (0.0537730901225)*x[1]**o + (-0.326164756351)*x[1]
        ref[(1, 1, 0, 3)]=-0.856673490176*x_ref[0]**o + (0.261798965583)*x_ref[0] + (0.0537730901225)*x_ref[1]**o + (-0.326164756351)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.00981439772531*x[0]**o + (-0.524408214056)*x[0] + (-0.136664066922)*x[1]**o + (-0.460003943574)*x[1]
        ref[(1, 1, 1, 0)]=0.00981439772531*x_ref[0]**o + (-0.524408214056)*x_ref[0] + (-0.136664066922)*x_ref[1]**o + (-0.460003943574)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.0206130122735*x[0]**o + (-0.856056516195)*x[0] + (0.167692235132)*x[1]**o + (0.579762716281)*x[1]
        ref[(1, 1, 1, 1)]=0.0206130122735*x_ref[0]**o + (-0.856056516195)*x_ref[0] + (0.167692235132)*x_ref[1]**o + (0.579762716281)*x_ref[1]
        arg[(1, 1, 1, 2)]=0.492618002866*x[0]**o + (-0.264425604278)*x[0] + (-0.430247250551)*x[1]**o + (0.835476872029)*x[1]
        ref[(1, 1, 1, 2)]=0.492618002866*x_ref[0]**o + (-0.264425604278)*x_ref[0] + (-0.430247250551)*x_ref[1]**o + (0.835476872029)*x_ref[1]
        arg[(1, 1, 1, 3)]=0.652353048164*x[0]**o + (0.852267260002)*x[0] + (-0.78054658946)*x[1]**o + (0.421935547645)*x[1]
        ref[(1, 1, 1, 3)]=0.652353048164*x_ref[0]**o + (0.852267260002)*x_ref[0] + (-0.78054658946)*x_ref[1]**o + (0.421935547645)*x_ref[1]
        arg[(1, 1, 2, 0)]=0.0172188273084*x[0]**o + (0.388798278724)*x[0] + (0.512257655379)*x[1]**o + (0.409336136471)*x[1]
        ref[(1, 1, 2, 0)]=0.0172188273084*x_ref[0]**o + (0.388798278724)*x_ref[0] + (0.512257655379)*x_ref[1]**o + (0.409336136471)*x_ref[1]
        arg[(1, 1, 2, 1)]=0.819832174873*x[0]**o + (0.543599843263)*x[0] + (-0.51988823384)*x[1]**o + (0.432089825643)*x[1]
        ref[(1, 1, 2, 1)]=0.819832174873*x_ref[0]**o + (0.543599843263)*x_ref[0] + (-0.51988823384)*x_ref[1]**o + (0.432089825643)*x_ref[1]
        arg[(1, 1, 2, 2)]=-0.044056397327*x[0]**o + (-0.391838879901)*x[0] + (0.372227431832)*x[1]**o + (-0.280296836743)*x[1]
        ref[(1, 1, 2, 2)]=-0.044056397327*x_ref[0]**o + (-0.391838879901)*x_ref[0] + (0.372227431832)*x_ref[1]**o + (-0.280296836743)*x_ref[1]
        arg[(1, 1, 2, 3)]=-0.812125145487*x[0]**o + (-0.886372967773)*x[0] + (-0.797277656863)*x[1]**o + (-0.092792138893)*x[1]
        ref[(1, 1, 2, 3)]=-0.812125145487*x_ref[0]**o + (-0.886372967773)*x_ref[0] + (-0.797277656863)*x_ref[1]**o + (-0.092792138893)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.0223809806612*x[0]**o + (0.0742788144382)*x[0] + (-0.998141180671)*x[1]**o + (0.228197427568)*x[1]
        ref[(1, 2, 0, 0)]=-0.0223809806612*x_ref[0]**o + (0.0742788144382)*x_ref[0] + (-0.998141180671)*x_ref[1]**o + (0.228197427568)*x_ref[1]
        arg[(1, 2, 0, 1)]=0.291569308246*x[0]**o + (-0.59494867584)*x[0] + (0.0665646071351)*x[1]**o + (0.898228129093)*x[1]
        ref[(1, 2, 0, 1)]=0.291569308246*x_ref[0]**o + (-0.59494867584)*x_ref[0] + (0.0665646071351)*x_ref[1]**o + (0.898228129093)*x_ref[1]
        arg[(1, 2, 0, 2)]=0.248578989223*x[0]**o + (0.104628158781)*x[0] + (0.564921093391)*x[1]**o + (0.339882093945)*x[1]
        ref[(1, 2, 0, 2)]=0.248578989223*x_ref[0]**o + (0.104628158781)*x_ref[0] + (0.564921093391)*x_ref[1]**o + (0.339882093945)*x_ref[1]
        arg[(1, 2, 0, 3)]=0.777177289466*x[0]**o + (-0.87508109608)*x[0] + (0.991865317171)*x[1]**o + (0.707923001192)*x[1]
        ref[(1, 2, 0, 3)]=0.777177289466*x_ref[0]**o + (-0.87508109608)*x_ref[0] + (0.991865317171)*x_ref[1]**o + (0.707923001192)*x_ref[1]
        arg[(1, 2, 1, 0)]=0.532627959988*x[0]**o + (-0.443926741551)*x[0] + (-0.92678449587)*x[1]**o + (-0.0153448974164)*x[1]
        ref[(1, 2, 1, 0)]=0.532627959988*x_ref[0]**o + (-0.443926741551)*x_ref[0] + (-0.92678449587)*x_ref[1]**o + (-0.0153448974164)*x_ref[1]
        arg[(1, 2, 1, 1)]=-0.722095602451*x[0]**o + (-0.0267741349213)*x[0] + (0.64848359753)*x[1]**o + (0.85201604205)*x[1]
        ref[(1, 2, 1, 1)]=-0.722095602451*x_ref[0]**o + (-0.0267741349213)*x_ref[0] + (0.64848359753)*x_ref[1]**o + (0.85201604205)*x_ref[1]
        arg[(1, 2, 1, 2)]=-0.590926376415*x[0]**o + (0.339717133202)*x[0] + (0.704901709939)*x[1]**o + (0.443509075299)*x[1]
        ref[(1, 2, 1, 2)]=-0.590926376415*x_ref[0]**o + (0.339717133202)*x_ref[0] + (0.704901709939)*x_ref[1]**o + (0.443509075299)*x_ref[1]
        arg[(1, 2, 1, 3)]=-0.312862748772*x[0]**o + (0.900355694087)*x[0] + (-0.0266732578158)*x[1]**o + (-0.422136388381)*x[1]
        ref[(1, 2, 1, 3)]=-0.312862748772*x_ref[0]**o + (0.900355694087)*x_ref[0] + (-0.0266732578158)*x_ref[1]**o + (-0.422136388381)*x_ref[1]
        arg[(1, 2, 2, 0)]=0.999436363554*x[0]**o + (0.194717818023)*x[0] + (-0.00120270783173)*x[1]**o + (-0.0538168053635)*x[1]
        ref[(1, 2, 2, 0)]=0.999436363554*x_ref[0]**o + (0.194717818023)*x_ref[0] + (-0.00120270783173)*x_ref[1]**o + (-0.0538168053635)*x_ref[1]
        arg[(1, 2, 2, 1)]=-0.958449334935*x[0]**o + (-0.773232880045)*x[0] + (0.814394339241)*x[1]**o + (0.261614197411)*x[1]
        ref[(1, 2, 2, 1)]=-0.958449334935*x_ref[0]**o + (-0.773232880045)*x_ref[0] + (0.814394339241)*x_ref[1]**o + (0.261614197411)*x_ref[1]
        arg[(1, 2, 2, 2)]=-0.566475062929*x[0]**o + (0.946649910073)*x[0] + (-0.101904535748)*x[1]**o + (0.38740896466)*x[1]
        ref[(1, 2, 2, 2)]=-0.566475062929*x_ref[0]**o + (0.946649910073)*x_ref[0] + (-0.101904535748)*x_ref[1]**o + (0.38740896466)*x_ref[1]
        arg[(1, 2, 2, 3)]=0.202313073579*x[0]**o + (-0.108191117356)*x[0] + (0.897203748265)*x[1]**o + (-0.101670493861)*x[1]
        ref[(1, 2, 2, 3)]=0.202313073579*x_ref[0]**o + (-0.108191117356)*x_ref[0] + (0.897203748265)*x_ref[1]**o + (-0.101670493861)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.951053666942*x[2]**o + (-0.549593911897)*x[2]
            ref[(0, 0, 0, 0)]+=-0.951053666942*x_ref[2]**o + (-0.549593911897)*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.442679151747*x[2]**o + (-0.102031885964)*x[2]
            ref[(0, 0, 0, 1)]+=-0.442679151747*x_ref[2]**o + (-0.102031885964)*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.0449137351199*x[2]**o + (-0.748798005805)*x[2]
            ref[(0, 0, 0, 2)]+=0.0449137351199*x_ref[2]**o + (-0.748798005805)*x_ref[2]
            arg[(0, 0, 0, 3)]+=0.722126522122*x[2]**o + (0.591254468756)*x[2]
            ref[(0, 0, 0, 3)]+=0.722126522122*x_ref[2]**o + (0.591254468756)*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.292786786984*x[2]**o + (0.384563185354)*x[2]
            ref[(0, 0, 1, 0)]+=0.292786786984*x_ref[2]**o + (0.384563185354)*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.726826509383*x[2]**o + (0.114784036018)*x[2]
            ref[(0, 0, 1, 1)]+=0.726826509383*x_ref[2]**o + (0.114784036018)*x_ref[2]
            arg[(0, 0, 1, 2)]+=-0.254009788757*x[2]**o + (0.289852111697)*x[2]
            ref[(0, 0, 1, 2)]+=-0.254009788757*x_ref[2]**o + (0.289852111697)*x_ref[2]
            arg[(0, 0, 1, 3)]+=-0.853827769213*x[2]**o + (-0.518772078981)*x[2]
            ref[(0, 0, 1, 3)]+=-0.853827769213*x_ref[2]**o + (-0.518772078981)*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.419498173867*x[2]**o + (-0.478331042394)*x[2]
            ref[(0, 0, 2, 0)]+=-0.419498173867*x_ref[2]**o + (-0.478331042394)*x_ref[2]
            arg[(0, 0, 2, 1)]+=-0.644287674768*x[2]**o + (0.678698271622)*x[2]
            ref[(0, 0, 2, 1)]+=-0.644287674768*x_ref[2]**o + (0.678698271622)*x_ref[2]
            arg[(0, 0, 2, 2)]+=0.200554892208*x[2]**o + (-0.570075808055)*x[2]
            ref[(0, 0, 2, 2)]+=0.200554892208*x_ref[2]**o + (-0.570075808055)*x_ref[2]
            arg[(0, 0, 2, 3)]+=0.22151412894*x[2]**o + (-0.651554103549)*x[2]
            ref[(0, 0, 2, 3)]+=0.22151412894*x_ref[2]**o + (-0.651554103549)*x_ref[2]
            arg[(0, 1, 0, 0)]+=0.676707226575*x[2]**o + (0.349656188572)*x[2]
            ref[(0, 1, 0, 0)]+=0.676707226575*x_ref[2]**o + (0.349656188572)*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.177997399174*x[2]**o + (-0.161468815578)*x[2]
            ref[(0, 1, 0, 1)]+=0.177997399174*x_ref[2]**o + (-0.161468815578)*x_ref[2]
            arg[(0, 1, 0, 2)]+=-0.588753387942*x[2]**o + (-0.284461898532)*x[2]
            ref[(0, 1, 0, 2)]+=-0.588753387942*x_ref[2]**o + (-0.284461898532)*x_ref[2]
            arg[(0, 1, 0, 3)]+=-0.347383199468*x[2]**o + (0.776774377646)*x[2]
            ref[(0, 1, 0, 3)]+=-0.347383199468*x_ref[2]**o + (0.776774377646)*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.434490637191*x[2]**o + (-0.0834125422565)*x[2]
            ref[(0, 1, 1, 0)]+=-0.434490637191*x_ref[2]**o + (-0.0834125422565)*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.374674228364*x[2]**o + (-0.126648750059)*x[2]
            ref[(0, 1, 1, 1)]+=-0.374674228364*x_ref[2]**o + (-0.126648750059)*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.162057208077*x[2]**o + (-0.227538648833)*x[2]
            ref[(0, 1, 1, 2)]+=0.162057208077*x_ref[2]**o + (-0.227538648833)*x_ref[2]
            arg[(0, 1, 1, 3)]+=0.19248381148*x[2]**o + (-0.0332378650295)*x[2]
            ref[(0, 1, 1, 3)]+=0.19248381148*x_ref[2]**o + (-0.0332378650295)*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.442529968881*x[2]**o + (0.979099721218)*x[2]
            ref[(0, 1, 2, 0)]+=-0.442529968881*x_ref[2]**o + (0.979099721218)*x_ref[2]
            arg[(0, 1, 2, 1)]+=0.0695017336341*x[2]**o + (-0.971588084892)*x[2]
            ref[(0, 1, 2, 1)]+=0.0695017336341*x_ref[2]**o + (-0.971588084892)*x_ref[2]
            arg[(0, 1, 2, 2)]+=0.360222290214*x[2]**o + (0.281793433767)*x[2]
            ref[(0, 1, 2, 2)]+=0.360222290214*x_ref[2]**o + (0.281793433767)*x_ref[2]
            arg[(0, 1, 2, 3)]+=-0.0074091364752*x[2]**o + (-0.772900582257)*x[2]
            ref[(0, 1, 2, 3)]+=-0.0074091364752*x_ref[2]**o + (-0.772900582257)*x_ref[2]
            arg[(0, 2, 0, 0)]+=-0.926131323156*x[2]**o + (0.26132198019)*x[2]
            ref[(0, 2, 0, 0)]+=-0.926131323156*x_ref[2]**o + (0.26132198019)*x_ref[2]
            arg[(0, 2, 0, 1)]+=0.67131385914*x[2]**o + (-0.386177412006)*x[2]
            ref[(0, 2, 0, 1)]+=0.67131385914*x_ref[2]**o + (-0.386177412006)*x_ref[2]
            arg[(0, 2, 0, 2)]+=-0.0140986332157*x[2]**o + (0.258414169813)*x[2]
            ref[(0, 2, 0, 2)]+=-0.0140986332157*x_ref[2]**o + (0.258414169813)*x_ref[2]
            arg[(0, 2, 0, 3)]+=0.849421318172*x[2]**o + (0.528547538734)*x[2]
            ref[(0, 2, 0, 3)]+=0.849421318172*x_ref[2]**o + (0.528547538734)*x_ref[2]
            arg[(0, 2, 1, 0)]+=-0.18553115317*x[2]**o + (-0.0258850454404)*x[2]
            ref[(0, 2, 1, 0)]+=-0.18553115317*x_ref[2]**o + (-0.0258850454404)*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.070668994221*x[2]**o + (0.837126061382)*x[2]
            ref[(0, 2, 1, 1)]+=-0.070668994221*x_ref[2]**o + (0.837126061382)*x_ref[2]
            arg[(0, 2, 1, 2)]+=-0.151797266702*x[2]**o + (-0.442052546175)*x[2]
            ref[(0, 2, 1, 2)]+=-0.151797266702*x_ref[2]**o + (-0.442052546175)*x_ref[2]
            arg[(0, 2, 1, 3)]+=-0.42534697495*x[2]**o + (0.869701502997)*x[2]
            ref[(0, 2, 1, 3)]+=-0.42534697495*x_ref[2]**o + (0.869701502997)*x_ref[2]
            arg[(0, 2, 2, 0)]+=0.328971036214*x[2]**o + (-0.90236497432)*x[2]
            ref[(0, 2, 2, 0)]+=0.328971036214*x_ref[2]**o + (-0.90236497432)*x_ref[2]
            arg[(0, 2, 2, 1)]+=0.645481701248*x[2]**o + (-0.678503379212)*x[2]
            ref[(0, 2, 2, 1)]+=0.645481701248*x_ref[2]**o + (-0.678503379212)*x_ref[2]
            arg[(0, 2, 2, 2)]+=0.461484562544*x[2]**o + (0.474228013457)*x[2]
            ref[(0, 2, 2, 2)]+=0.461484562544*x_ref[2]**o + (0.474228013457)*x_ref[2]
            arg[(0, 2, 2, 3)]+=-0.452723741241*x[2]**o + (0.732763203702)*x[2]
            ref[(0, 2, 2, 3)]+=-0.452723741241*x_ref[2]**o + (0.732763203702)*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.54436493142*x[2]**o + (-0.675294281719)*x[2]
            ref[(1, 0, 0, 0)]+=0.54436493142*x_ref[2]**o + (-0.675294281719)*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.720194557446*x[2]**o + (-0.117447218021)*x[2]
            ref[(1, 0, 0, 1)]+=-0.720194557446*x_ref[2]**o + (-0.117447218021)*x_ref[2]
            arg[(1, 0, 0, 2)]+=0.625654814627*x[2]**o + (0.721998356606)*x[2]
            ref[(1, 0, 0, 2)]+=0.625654814627*x_ref[2]**o + (0.721998356606)*x_ref[2]
            arg[(1, 0, 0, 3)]+=0.393493301801*x[2]**o + (0.706403621737)*x[2]
            ref[(1, 0, 0, 3)]+=0.393493301801*x_ref[2]**o + (0.706403621737)*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.875076720832*x[2]**o + (0.715095117369)*x[2]
            ref[(1, 0, 1, 0)]+=-0.875076720832*x_ref[2]**o + (0.715095117369)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.829920368999*x[2]**o + (-0.454981038909)*x[2]
            ref[(1, 0, 1, 1)]+=-0.829920368999*x_ref[2]**o + (-0.454981038909)*x_ref[2]
            arg[(1, 0, 1, 2)]+=-0.606696099691*x[2]**o + (0.67072930441)*x[2]
            ref[(1, 0, 1, 2)]+=-0.606696099691*x_ref[2]**o + (0.67072930441)*x_ref[2]
            arg[(1, 0, 1, 3)]+=-0.0264128797981*x[2]**o + (0.00676192505957)*x[2]
            ref[(1, 0, 1, 3)]+=-0.0264128797981*x_ref[2]**o + (0.00676192505957)*x_ref[2]
            arg[(1, 0, 2, 0)]+=0.83332949844*x[2]**o + (-0.600575905493)*x[2]
            ref[(1, 0, 2, 0)]+=0.83332949844*x_ref[2]**o + (-0.600575905493)*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.278552803838*x[2]**o + (-0.256086440103)*x[2]
            ref[(1, 0, 2, 1)]+=0.278552803838*x_ref[2]**o + (-0.256086440103)*x_ref[2]
            arg[(1, 0, 2, 2)]+=-0.329039802912*x[2]**o + (0.967099437682)*x[2]
            ref[(1, 0, 2, 2)]+=-0.329039802912*x_ref[2]**o + (0.967099437682)*x_ref[2]
            arg[(1, 0, 2, 3)]+=0.84141084105*x[2]**o + (0.101450674181)*x[2]
            ref[(1, 0, 2, 3)]+=0.84141084105*x_ref[2]**o + (0.101450674181)*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.21293335896*x[2]**o + (0.763522365708)*x[2]
            ref[(1, 1, 0, 0)]+=-0.21293335896*x_ref[2]**o + (0.763522365708)*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.965977703171*x[2]**o + (0.573706534614)*x[2]
            ref[(1, 1, 0, 1)]+=-0.965977703171*x_ref[2]**o + (0.573706534614)*x_ref[2]
            arg[(1, 1, 0, 2)]+=0.987901646063*x[2]**o + (-0.0585489770481)*x[2]
            ref[(1, 1, 0, 2)]+=0.987901646063*x_ref[2]**o + (-0.0585489770481)*x_ref[2]
            arg[(1, 1, 0, 3)]+=-0.0180071042802*x[2]**o + (0.856216150228)*x[2]
            ref[(1, 1, 0, 3)]+=-0.0180071042802*x_ref[2]**o + (0.856216150228)*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.0614495603079*x[2]**o + (0.903403476451)*x[2]
            ref[(1, 1, 1, 0)]+=0.0614495603079*x_ref[2]**o + (0.903403476451)*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.307836281633*x[2]**o + (-0.259074264646)*x[2]
            ref[(1, 1, 1, 1)]+=0.307836281633*x_ref[2]**o + (-0.259074264646)*x_ref[2]
            arg[(1, 1, 1, 2)]+=0.625343768091*x[2]**o + (0.0361417058321)*x[2]
            ref[(1, 1, 1, 2)]+=0.625343768091*x_ref[2]**o + (0.0361417058321)*x_ref[2]
            arg[(1, 1, 1, 3)]+=-0.168968438496*x[2]**o + (0.303330452834)*x[2]
            ref[(1, 1, 1, 3)]+=-0.168968438496*x_ref[2]**o + (0.303330452834)*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.0557972020139*x[2]**o + (0.806168366657)*x[2]
            ref[(1, 1, 2, 0)]+=-0.0557972020139*x_ref[2]**o + (0.806168366657)*x_ref[2]
            arg[(1, 1, 2, 1)]+=-0.801882071725*x[2]**o + (0.980565068462)*x[2]
            ref[(1, 1, 2, 1)]+=-0.801882071725*x_ref[2]**o + (0.980565068462)*x_ref[2]
            arg[(1, 1, 2, 2)]+=-0.908713544445*x[2]**o + (0.0279494445762)*x[2]
            ref[(1, 1, 2, 2)]+=-0.908713544445*x_ref[2]**o + (0.0279494445762)*x_ref[2]
            arg[(1, 1, 2, 3)]+=0.773397665446*x[2]**o + (-0.75988629325)*x[2]
            ref[(1, 1, 2, 3)]+=0.773397665446*x_ref[2]**o + (-0.75988629325)*x_ref[2]
            arg[(1, 2, 0, 0)]+=-0.486400903326*x[2]**o + (0.703384637191)*x[2]
            ref[(1, 2, 0, 0)]+=-0.486400903326*x_ref[2]**o + (0.703384637191)*x_ref[2]
            arg[(1, 2, 0, 1)]+=0.496759483615*x[2]**o + (-0.840075116561)*x[2]
            ref[(1, 2, 0, 1)]+=0.496759483615*x_ref[2]**o + (-0.840075116561)*x_ref[2]
            arg[(1, 2, 0, 2)]+=0.139174171933*x[2]**o + (0.391735882884)*x[2]
            ref[(1, 2, 0, 2)]+=0.139174171933*x_ref[2]**o + (0.391735882884)*x_ref[2]
            arg[(1, 2, 0, 3)]+=-0.706491779558*x[2]**o + (0.229035091668)*x[2]
            ref[(1, 2, 0, 3)]+=-0.706491779558*x_ref[2]**o + (0.229035091668)*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.82253899367*x[2]**o + (0.605421045854)*x[2]
            ref[(1, 2, 1, 0)]+=0.82253899367*x_ref[2]**o + (0.605421045854)*x_ref[2]
            arg[(1, 2, 1, 1)]+=-0.742313279876*x[2]**o + (0.231884778944)*x[2]
            ref[(1, 2, 1, 1)]+=-0.742313279876*x_ref[2]**o + (0.231884778944)*x_ref[2]
            arg[(1, 2, 1, 2)]+=-0.708451491169*x[2]**o + (0.955764900747)*x[2]
            ref[(1, 2, 1, 2)]+=-0.708451491169*x_ref[2]**o + (0.955764900747)*x_ref[2]
            arg[(1, 2, 1, 3)]+=-0.00280398147748*x[2]**o + (0.289484951577)*x[2]
            ref[(1, 2, 1, 3)]+=-0.00280398147748*x_ref[2]**o + (0.289484951577)*x_ref[2]
            arg[(1, 2, 2, 0)]+=-0.295858452649*x[2]**o + (0.988475382188)*x[2]
            ref[(1, 2, 2, 0)]+=-0.295858452649*x_ref[2]**o + (0.988475382188)*x_ref[2]
            arg[(1, 2, 2, 1)]+=-0.808157163792*x[2]**o + (-0.423389687991)*x[2]
            ref[(1, 2, 2, 1)]+=-0.808157163792*x_ref[2]**o + (-0.423389687991)*x_ref[2]
            arg[(1, 2, 2, 2)]+=0.219144215129*x[2]**o + (-0.785391066525)*x[2]
            ref[(1, 2, 2, 2)]+=0.219144215129*x_ref[2]**o + (-0.785391066525)*x_ref[2]
            arg[(1, 2, 2, 3)]+=0.920851247811*x[2]**o + (-0.352349727173)*x[2]
            ref[(1, 2, 2, 3)]+=0.920851247811*x_ref[2]**o + (-0.352349727173)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.451221910163*x[0]**o + (0.72717948605)*x[0] + (-0.957336100839)*x[1]**o + (0.322645873351)*x[1]
        ref=-0.451221910163*x_ref[0]**o + (0.72717948605)*x_ref[0] + (-0.957336100839)*x_ref[1]**o + (0.322645873351)*x_ref[1]
        if dim==3:
            arg+=(-0.514571991712)*x[2]**o + (0.871442509333)*x[2]
            ref+=(-0.514571991712)*x_ref[2]**o + (0.871442509333)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=-0.662393271784*x[0]**o + (-0.0792646125681)*x[0] + (0.959406606569)*x[1]**o + (0.371686508676)*x[1]
        ref[(0,)]=-0.662393271784*x_ref[0]**o + (-0.0792646125681)*x_ref[0] + (0.959406606569)*x_ref[1]**o + (0.371686508676)*x_ref[1]
        arg[(1,)]=-0.175955236444*x[0]**o + (-0.658103042988)*x[0] + (-0.59474038936)*x[1]**o + (0.787098171203)*x[1]
        ref[(1,)]=-0.175955236444*x_ref[0]**o + (-0.658103042988)*x_ref[0] + (-0.59474038936)*x_ref[1]**o + (0.787098171203)*x_ref[1]
        arg[(2,)]=-0.27098686842*x[0]**o + (-0.625372291971)*x[0] + (-0.443095007585)*x[1]**o + (-0.0341450470626)*x[1]
        ref[(2,)]=-0.27098686842*x_ref[0]**o + (-0.625372291971)*x_ref[0] + (-0.443095007585)*x_ref[1]**o + (-0.0341450470626)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.649491075758*x[2]**o + (-0.174039442765)*x[2]
            ref[(0,)]+=-0.649491075758*x_ref[2]**o + (-0.174039442765)*x_ref[2]
            arg[(1,)]+=-0.226845813697*x[2]**o + (-0.568421166342)*x[2]
            ref[(1,)]+=-0.226845813697*x_ref[2]**o + (-0.568421166342)*x_ref[2]
            arg[(2,)]+=-0.620521353766*x[2]**o + (0.410197069293)*x[2]
            ref[(2,)]+=-0.620521353766*x_ref[2]**o + (0.410197069293)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2),w)
        ref = Data(0,(3, 2),w_ref)
        arg[(0, 0)]=0.00660461584307*x[0]**o + (-0.783157923035)*x[0] + (0.626217993262)*x[1]**o + (0.698376139795)*x[1]
        ref[(0, 0)]=0.00660461584307*x_ref[0]**o + (-0.783157923035)*x_ref[0] + (0.626217993262)*x_ref[1]**o + (0.698376139795)*x_ref[1]
        arg[(0, 1)]=-0.120649312524*x[0]**o + (-0.374659507388)*x[0] + (0.343424249208)*x[1]**o + (0.532846986013)*x[1]
        ref[(0, 1)]=-0.120649312524*x_ref[0]**o + (-0.374659507388)*x_ref[0] + (0.343424249208)*x_ref[1]**o + (0.532846986013)*x_ref[1]
        arg[(1, 0)]=-0.15077518907*x[0]**o + (0.365860540506)*x[0] + (-0.987188835809)*x[1]**o + (-0.240138494428)*x[1]
        ref[(1, 0)]=-0.15077518907*x_ref[0]**o + (0.365860540506)*x_ref[0] + (-0.987188835809)*x_ref[1]**o + (-0.240138494428)*x_ref[1]
        arg[(1, 1)]=-0.634784068717*x[0]**o + (-0.579420951696)*x[0] + (0.0139060143613)*x[1]**o + (-0.575714618048)*x[1]
        ref[(1, 1)]=-0.634784068717*x_ref[0]**o + (-0.579420951696)*x_ref[0] + (0.0139060143613)*x_ref[1]**o + (-0.575714618048)*x_ref[1]
        arg[(2, 0)]=-0.0641024227432*x[0]**o + (-0.200264639871)*x[0] + (-0.859667742164)*x[1]**o + (0.441408544407)*x[1]
        ref[(2, 0)]=-0.0641024227432*x_ref[0]**o + (-0.200264639871)*x_ref[0] + (-0.859667742164)*x_ref[1]**o + (0.441408544407)*x_ref[1]
        arg[(2, 1)]=0.226549490405*x[0]**o + (0.780196795151)*x[0] + (-0.622970732608)*x[1]**o + (0.918121801203)*x[1]
        ref[(2, 1)]=0.226549490405*x_ref[0]**o + (0.780196795151)*x_ref[0] + (-0.622970732608)*x_ref[1]**o + (0.918121801203)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.493703157826*x[2]**o + (-0.521316135922)*x[2]
            ref[(0, 0)]+=-0.493703157826*x_ref[2]**o + (-0.521316135922)*x_ref[2]
            arg[(0, 1)]+=-0.941663621128*x[2]**o + (0.878789662533)*x[2]
            ref[(0, 1)]+=-0.941663621128*x_ref[2]**o + (0.878789662533)*x_ref[2]
            arg[(1, 0)]+=-0.813299729212*x[2]**o + (-0.156772096132)*x[2]
            ref[(1, 0)]+=-0.813299729212*x_ref[2]**o + (-0.156772096132)*x_ref[2]
            arg[(1, 1)]+=-0.312560135814*x[2]**o + (0.521442841728)*x[2]
            ref[(1, 1)]+=-0.312560135814*x_ref[2]**o + (0.521442841728)*x_ref[2]
            arg[(2, 0)]+=-0.241234815932*x[2]**o + (-0.233483094891)*x[2]
            ref[(2, 0)]+=-0.241234815932*x_ref[2]**o + (-0.233483094891)*x_ref[2]
            arg[(2, 1)]+=0.0907982976834*x[2]**o + (-0.81742229996)*x[2]
            ref[(2, 1)]+=0.0907982976834*x_ref[2]**o + (-0.81742229996)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 4),w)
        ref = Data(0,(4, 4, 4),w_ref)
        arg[(0, 0, 0)]=-0.869764624095*x[0]**o + (-0.526708529025)*x[0] + (0.352496822919)*x[1]**o + (0.343827733671)*x[1]
        ref[(0, 0, 0)]=-0.869764624095*x_ref[0]**o + (-0.526708529025)*x_ref[0] + (0.352496822919)*x_ref[1]**o + (0.343827733671)*x_ref[1]
        arg[(0, 0, 1)]=-0.443246265563*x[0]**o + (-0.956491202084)*x[0] + (0.518970316148)*x[1]**o + (-0.699614415759)*x[1]
        ref[(0, 0, 1)]=-0.443246265563*x_ref[0]**o + (-0.956491202084)*x_ref[0] + (0.518970316148)*x_ref[1]**o + (-0.699614415759)*x_ref[1]
        arg[(0, 0, 2)]=0.505892115935*x[0]**o + (0.752371705789)*x[0] + (0.0122804015407)*x[1]**o + (0.0603248727114)*x[1]
        ref[(0, 0, 2)]=0.505892115935*x_ref[0]**o + (0.752371705789)*x_ref[0] + (0.0122804015407)*x_ref[1]**o + (0.0603248727114)*x_ref[1]
        arg[(0, 0, 3)]=0.501011666158*x[0]**o + (-0.746760101313)*x[0] + (0.714172146128)*x[1]**o + (0.476135253433)*x[1]
        ref[(0, 0, 3)]=0.501011666158*x_ref[0]**o + (-0.746760101313)*x_ref[0] + (0.714172146128)*x_ref[1]**o + (0.476135253433)*x_ref[1]
        arg[(0, 1, 0)]=-0.305594066806*x[0]**o + (0.196903358055)*x[0] + (-0.322196911723)*x[1]**o + (-0.403285161551)*x[1]
        ref[(0, 1, 0)]=-0.305594066806*x_ref[0]**o + (0.196903358055)*x_ref[0] + (-0.322196911723)*x_ref[1]**o + (-0.403285161551)*x_ref[1]
        arg[(0, 1, 1)]=-0.241772077078*x[0]**o + (0.932398823392)*x[0] + (-0.275945486529)*x[1]**o + (-0.678729433128)*x[1]
        ref[(0, 1, 1)]=-0.241772077078*x_ref[0]**o + (0.932398823392)*x_ref[0] + (-0.275945486529)*x_ref[1]**o + (-0.678729433128)*x_ref[1]
        arg[(0, 1, 2)]=0.323251749761*x[0]**o + (-0.512603397497)*x[0] + (-0.61732151688)*x[1]**o + (-0.131144623796)*x[1]
        ref[(0, 1, 2)]=0.323251749761*x_ref[0]**o + (-0.512603397497)*x_ref[0] + (-0.61732151688)*x_ref[1]**o + (-0.131144623796)*x_ref[1]
        arg[(0, 1, 3)]=-0.567980915605*x[0]**o + (-0.065310237872)*x[0] + (-0.191303513631)*x[1]**o + (0.247179916279)*x[1]
        ref[(0, 1, 3)]=-0.567980915605*x_ref[0]**o + (-0.065310237872)*x_ref[0] + (-0.191303513631)*x_ref[1]**o + (0.247179916279)*x_ref[1]
        arg[(0, 2, 0)]=-0.539852031699*x[0]**o + (0.207566133842)*x[0] + (0.407577809477)*x[1]**o + (0.10800207595)*x[1]
        ref[(0, 2, 0)]=-0.539852031699*x_ref[0]**o + (0.207566133842)*x_ref[0] + (0.407577809477)*x_ref[1]**o + (0.10800207595)*x_ref[1]
        arg[(0, 2, 1)]=0.514588673128*x[0]**o + (0.213984598634)*x[0] + (0.0306128886079)*x[1]**o + (-0.907781174612)*x[1]
        ref[(0, 2, 1)]=0.514588673128*x_ref[0]**o + (0.213984598634)*x_ref[0] + (0.0306128886079)*x_ref[1]**o + (-0.907781174612)*x_ref[1]
        arg[(0, 2, 2)]=-0.558947516361*x[0]**o + (-0.561216606873)*x[0] + (-0.158415075182)*x[1]**o + (0.383046347444)*x[1]
        ref[(0, 2, 2)]=-0.558947516361*x_ref[0]**o + (-0.561216606873)*x_ref[0] + (-0.158415075182)*x_ref[1]**o + (0.383046347444)*x_ref[1]
        arg[(0, 2, 3)]=-0.147185682274*x[0]**o + (0.870333855599)*x[0] + (0.297166945546)*x[1]**o + (-0.375593007974)*x[1]
        ref[(0, 2, 3)]=-0.147185682274*x_ref[0]**o + (0.870333855599)*x_ref[0] + (0.297166945546)*x_ref[1]**o + (-0.375593007974)*x_ref[1]
        arg[(0, 3, 0)]=0.0143601733529*x[0]**o + (-0.63662558127)*x[0] + (-0.632254334306)*x[1]**o + (-0.267499781509)*x[1]
        ref[(0, 3, 0)]=0.0143601733529*x_ref[0]**o + (-0.63662558127)*x_ref[0] + (-0.632254334306)*x_ref[1]**o + (-0.267499781509)*x_ref[1]
        arg[(0, 3, 1)]=0.579020336987*x[0]**o + (-0.486012903258)*x[0] + (0.880296879019)*x[1]**o + (-0.133075445409)*x[1]
        ref[(0, 3, 1)]=0.579020336987*x_ref[0]**o + (-0.486012903258)*x_ref[0] + (0.880296879019)*x_ref[1]**o + (-0.133075445409)*x_ref[1]
        arg[(0, 3, 2)]=-0.808263442574*x[0]**o + (0.334681513624)*x[0] + (-0.398432808743)*x[1]**o + (-0.831155998355)*x[1]
        ref[(0, 3, 2)]=-0.808263442574*x_ref[0]**o + (0.334681513624)*x_ref[0] + (-0.398432808743)*x_ref[1]**o + (-0.831155998355)*x_ref[1]
        arg[(0, 3, 3)]=0.601006981285*x[0]**o + (0.10741827835)*x[0] + (0.90391463193)*x[1]**o + (0.582752880332)*x[1]
        ref[(0, 3, 3)]=0.601006981285*x_ref[0]**o + (0.10741827835)*x_ref[0] + (0.90391463193)*x_ref[1]**o + (0.582752880332)*x_ref[1]
        arg[(1, 0, 0)]=0.601583292797*x[0]**o + (-0.777627039722)*x[0] + (-0.575190024747)*x[1]**o + (-0.889428696845)*x[1]
        ref[(1, 0, 0)]=0.601583292797*x_ref[0]**o + (-0.777627039722)*x_ref[0] + (-0.575190024747)*x_ref[1]**o + (-0.889428696845)*x_ref[1]
        arg[(1, 0, 1)]=0.302699215095*x[0]**o + (-0.834364509942)*x[0] + (-0.0881251711515)*x[1]**o + (-0.711405379787)*x[1]
        ref[(1, 0, 1)]=0.302699215095*x_ref[0]**o + (-0.834364509942)*x_ref[0] + (-0.0881251711515)*x_ref[1]**o + (-0.711405379787)*x_ref[1]
        arg[(1, 0, 2)]=-0.508852117787*x[0]**o + (0.0669685898694)*x[0] + (-0.285707475939)*x[1]**o + (0.985241088152)*x[1]
        ref[(1, 0, 2)]=-0.508852117787*x_ref[0]**o + (0.0669685898694)*x_ref[0] + (-0.285707475939)*x_ref[1]**o + (0.985241088152)*x_ref[1]
        arg[(1, 0, 3)]=0.792519189415*x[0]**o + (0.550103638271)*x[0] + (0.196023578879)*x[1]**o + (0.696734366367)*x[1]
        ref[(1, 0, 3)]=0.792519189415*x_ref[0]**o + (0.550103638271)*x_ref[0] + (0.196023578879)*x_ref[1]**o + (0.696734366367)*x_ref[1]
        arg[(1, 1, 0)]=-0.620700846497*x[0]**o + (0.968883590609)*x[0] + (-0.0957829063366)*x[1]**o + (0.471742728836)*x[1]
        ref[(1, 1, 0)]=-0.620700846497*x_ref[0]**o + (0.968883590609)*x_ref[0] + (-0.0957829063366)*x_ref[1]**o + (0.471742728836)*x_ref[1]
        arg[(1, 1, 1)]=0.346674662754*x[0]**o + (-0.354330852476)*x[0] + (-0.14164319134)*x[1]**o + (0.974696226583)*x[1]
        ref[(1, 1, 1)]=0.346674662754*x_ref[0]**o + (-0.354330852476)*x_ref[0] + (-0.14164319134)*x_ref[1]**o + (0.974696226583)*x_ref[1]
        arg[(1, 1, 2)]=0.609190425985*x[0]**o + (0.400765630609)*x[0] + (-0.463102751694)*x[1]**o + (-0.187843374518)*x[1]
        ref[(1, 1, 2)]=0.609190425985*x_ref[0]**o + (0.400765630609)*x_ref[0] + (-0.463102751694)*x_ref[1]**o + (-0.187843374518)*x_ref[1]
        arg[(1, 1, 3)]=-0.608699818097*x[0]**o + (0.359178134956)*x[0] + (0.347109725162)*x[1]**o + (0.503953368566)*x[1]
        ref[(1, 1, 3)]=-0.608699818097*x_ref[0]**o + (0.359178134956)*x_ref[0] + (0.347109725162)*x_ref[1]**o + (0.503953368566)*x_ref[1]
        arg[(1, 2, 0)]=0.0619155219339*x[0]**o + (-0.564445233601)*x[0] + (0.440839537959)*x[1]**o + (0.727916350723)*x[1]
        ref[(1, 2, 0)]=0.0619155219339*x_ref[0]**o + (-0.564445233601)*x_ref[0] + (0.440839537959)*x_ref[1]**o + (0.727916350723)*x_ref[1]
        arg[(1, 2, 1)]=-0.824045525851*x[0]**o + (0.9588440889)*x[0] + (-0.345706625215)*x[1]**o + (-0.569216131686)*x[1]
        ref[(1, 2, 1)]=-0.824045525851*x_ref[0]**o + (0.9588440889)*x_ref[0] + (-0.345706625215)*x_ref[1]**o + (-0.569216131686)*x_ref[1]
        arg[(1, 2, 2)]=-0.733637888293*x[0]**o + (0.272224283163)*x[0] + (-0.817238639294)*x[1]**o + (0.0395517578792)*x[1]
        ref[(1, 2, 2)]=-0.733637888293*x_ref[0]**o + (0.272224283163)*x_ref[0] + (-0.817238639294)*x_ref[1]**o + (0.0395517578792)*x_ref[1]
        arg[(1, 2, 3)]=0.237326170338*x[0]**o + (0.57686483117)*x[0] + (-0.688242779026)*x[1]**o + (0.480858646237)*x[1]
        ref[(1, 2, 3)]=0.237326170338*x_ref[0]**o + (0.57686483117)*x_ref[0] + (-0.688242779026)*x_ref[1]**o + (0.480858646237)*x_ref[1]
        arg[(1, 3, 0)]=0.640961994314*x[0]**o + (-0.145632467826)*x[0] + (-0.19672721486)*x[1]**o + (-0.837266615171)*x[1]
        ref[(1, 3, 0)]=0.640961994314*x_ref[0]**o + (-0.145632467826)*x_ref[0] + (-0.19672721486)*x_ref[1]**o + (-0.837266615171)*x_ref[1]
        arg[(1, 3, 1)]=0.356946878888*x[0]**o + (-0.999054924576)*x[0] + (-0.267282736542)*x[1]**o + (-0.932773996621)*x[1]
        ref[(1, 3, 1)]=0.356946878888*x_ref[0]**o + (-0.999054924576)*x_ref[0] + (-0.267282736542)*x_ref[1]**o + (-0.932773996621)*x_ref[1]
        arg[(1, 3, 2)]=0.913382110689*x[0]**o + (-0.43341766803)*x[0] + (0.811374345615)*x[1]**o + (-0.693387883479)*x[1]
        ref[(1, 3, 2)]=0.913382110689*x_ref[0]**o + (-0.43341766803)*x_ref[0] + (0.811374345615)*x_ref[1]**o + (-0.693387883479)*x_ref[1]
        arg[(1, 3, 3)]=0.557258228398*x[0]**o + (0.621665806073)*x[0] + (-0.152437379257)*x[1]**o + (0.359465047152)*x[1]
        ref[(1, 3, 3)]=0.557258228398*x_ref[0]**o + (0.621665806073)*x_ref[0] + (-0.152437379257)*x_ref[1]**o + (0.359465047152)*x_ref[1]
        arg[(2, 0, 0)]=0.678693446511*x[0]**o + (-0.525543939265)*x[0] + (0.89459562066)*x[1]**o + (-0.940120023721)*x[1]
        ref[(2, 0, 0)]=0.678693446511*x_ref[0]**o + (-0.525543939265)*x_ref[0] + (0.89459562066)*x_ref[1]**o + (-0.940120023721)*x_ref[1]
        arg[(2, 0, 1)]=0.158332305555*x[0]**o + (-0.0436654034938)*x[0] + (-0.0632256772121)*x[1]**o + (0.945088048986)*x[1]
        ref[(2, 0, 1)]=0.158332305555*x_ref[0]**o + (-0.0436654034938)*x_ref[0] + (-0.0632256772121)*x_ref[1]**o + (0.945088048986)*x_ref[1]
        arg[(2, 0, 2)]=0.465522647354*x[0]**o + (0.89874962592)*x[0] + (-0.862964300063)*x[1]**o + (0.628839917794)*x[1]
        ref[(2, 0, 2)]=0.465522647354*x_ref[0]**o + (0.89874962592)*x_ref[0] + (-0.862964300063)*x_ref[1]**o + (0.628839917794)*x_ref[1]
        arg[(2, 0, 3)]=-0.703827816215*x[0]**o + (-0.407476891259)*x[0] + (0.852787836829)*x[1]**o + (0.0378025169802)*x[1]
        ref[(2, 0, 3)]=-0.703827816215*x_ref[0]**o + (-0.407476891259)*x_ref[0] + (0.852787836829)*x_ref[1]**o + (0.0378025169802)*x_ref[1]
        arg[(2, 1, 0)]=0.0579576077348*x[0]**o + (-0.55399769223)*x[0] + (-0.619571009503)*x[1]**o + (-0.347802660503)*x[1]
        ref[(2, 1, 0)]=0.0579576077348*x_ref[0]**o + (-0.55399769223)*x_ref[0] + (-0.619571009503)*x_ref[1]**o + (-0.347802660503)*x_ref[1]
        arg[(2, 1, 1)]=0.929715673429*x[0]**o + (-0.0233996853874)*x[0] + (-0.707202635204)*x[1]**o + (0.336675711344)*x[1]
        ref[(2, 1, 1)]=0.929715673429*x_ref[0]**o + (-0.0233996853874)*x_ref[0] + (-0.707202635204)*x_ref[1]**o + (0.336675711344)*x_ref[1]
        arg[(2, 1, 2)]=-0.188457109798*x[0]**o + (-0.195750471737)*x[0] + (-0.461950760709)*x[1]**o + (0.873446839484)*x[1]
        ref[(2, 1, 2)]=-0.188457109798*x_ref[0]**o + (-0.195750471737)*x_ref[0] + (-0.461950760709)*x_ref[1]**o + (0.873446839484)*x_ref[1]
        arg[(2, 1, 3)]=-0.216264596114*x[0]**o + (-0.274511612338)*x[0] + (0.391356018324)*x[1]**o + (0.273810712849)*x[1]
        ref[(2, 1, 3)]=-0.216264596114*x_ref[0]**o + (-0.274511612338)*x_ref[0] + (0.391356018324)*x_ref[1]**o + (0.273810712849)*x_ref[1]
        arg[(2, 2, 0)]=0.851203378362*x[0]**o + (0.199946899661)*x[0] + (0.0891270976538)*x[1]**o + (0.141371781759)*x[1]
        ref[(2, 2, 0)]=0.851203378362*x_ref[0]**o + (0.199946899661)*x_ref[0] + (0.0891270976538)*x_ref[1]**o + (0.141371781759)*x_ref[1]
        arg[(2, 2, 1)]=0.519752833436*x[0]**o + (0.493734548789)*x[0] + (0.876282664237)*x[1]**o + (-0.836822905829)*x[1]
        ref[(2, 2, 1)]=0.519752833436*x_ref[0]**o + (0.493734548789)*x_ref[0] + (0.876282664237)*x_ref[1]**o + (-0.836822905829)*x_ref[1]
        arg[(2, 2, 2)]=-0.00969849139248*x[0]**o + (0.874830870675)*x[0] + (0.364045862115)*x[1]**o + (0.626939394519)*x[1]
        ref[(2, 2, 2)]=-0.00969849139248*x_ref[0]**o + (0.874830870675)*x_ref[0] + (0.364045862115)*x_ref[1]**o + (0.626939394519)*x_ref[1]
        arg[(2, 2, 3)]=-0.117393175769*x[0]**o + (-0.762370237991)*x[0] + (0.977698990434)*x[1]**o + (-0.138034599321)*x[1]
        ref[(2, 2, 3)]=-0.117393175769*x_ref[0]**o + (-0.762370237991)*x_ref[0] + (0.977698990434)*x_ref[1]**o + (-0.138034599321)*x_ref[1]
        arg[(2, 3, 0)]=0.665358563022*x[0]**o + (0.104220395267)*x[0] + (-0.706431753337)*x[1]**o + (0.00395691203053)*x[1]
        ref[(2, 3, 0)]=0.665358563022*x_ref[0]**o + (0.104220395267)*x_ref[0] + (-0.706431753337)*x_ref[1]**o + (0.00395691203053)*x_ref[1]
        arg[(2, 3, 1)]=0.0966428081676*x[0]**o + (-0.412790132908)*x[0] + (0.41846142249)*x[1]**o + (-0.23076758306)*x[1]
        ref[(2, 3, 1)]=0.0966428081676*x_ref[0]**o + (-0.412790132908)*x_ref[0] + (0.41846142249)*x_ref[1]**o + (-0.23076758306)*x_ref[1]
        arg[(2, 3, 2)]=-0.715271592514*x[0]**o + (0.101470191714)*x[0] + (0.836141410107)*x[1]**o + (0.0266650368541)*x[1]
        ref[(2, 3, 2)]=-0.715271592514*x_ref[0]**o + (0.101470191714)*x_ref[0] + (0.836141410107)*x_ref[1]**o + (0.0266650368541)*x_ref[1]
        arg[(2, 3, 3)]=-0.838692732139*x[0]**o + (-0.00921931495127)*x[0] + (0.0673507215727)*x[1]**o + (0.943780549818)*x[1]
        ref[(2, 3, 3)]=-0.838692732139*x_ref[0]**o + (-0.00921931495127)*x_ref[0] + (0.0673507215727)*x_ref[1]**o + (0.943780549818)*x_ref[1]
        arg[(3, 0, 0)]=0.444111837694*x[0]**o + (0.0740805770707)*x[0] + (0.704758016531)*x[1]**o + (0.540967516062)*x[1]
        ref[(3, 0, 0)]=0.444111837694*x_ref[0]**o + (0.0740805770707)*x_ref[0] + (0.704758016531)*x_ref[1]**o + (0.540967516062)*x_ref[1]
        arg[(3, 0, 1)]=-0.638521169415*x[0]**o + (0.613231522004)*x[0] + (-0.163756897698)*x[1]**o + (-0.327531948571)*x[1]
        ref[(3, 0, 1)]=-0.638521169415*x_ref[0]**o + (0.613231522004)*x_ref[0] + (-0.163756897698)*x_ref[1]**o + (-0.327531948571)*x_ref[1]
        arg[(3, 0, 2)]=0.27191823208*x[0]**o + (0.979120810965)*x[0] + (0.68645459643)*x[1]**o + (-0.531439410403)*x[1]
        ref[(3, 0, 2)]=0.27191823208*x_ref[0]**o + (0.979120810965)*x_ref[0] + (0.68645459643)*x_ref[1]**o + (-0.531439410403)*x_ref[1]
        arg[(3, 0, 3)]=-0.565166214944*x[0]**o + (-0.790112162305)*x[0] + (-0.277231428466)*x[1]**o + (-0.175484140693)*x[1]
        ref[(3, 0, 3)]=-0.565166214944*x_ref[0]**o + (-0.790112162305)*x_ref[0] + (-0.277231428466)*x_ref[1]**o + (-0.175484140693)*x_ref[1]
        arg[(3, 1, 0)]=0.316346251279*x[0]**o + (0.195866387097)*x[0] + (-0.41501475715)*x[1]**o + (0.165519282074)*x[1]
        ref[(3, 1, 0)]=0.316346251279*x_ref[0]**o + (0.195866387097)*x_ref[0] + (-0.41501475715)*x_ref[1]**o + (0.165519282074)*x_ref[1]
        arg[(3, 1, 1)]=0.649312374537*x[0]**o + (0.744964049492)*x[0] + (-0.513146749931)*x[1]**o + (0.164833040037)*x[1]
        ref[(3, 1, 1)]=0.649312374537*x_ref[0]**o + (0.744964049492)*x_ref[0] + (-0.513146749931)*x_ref[1]**o + (0.164833040037)*x_ref[1]
        arg[(3, 1, 2)]=-0.455219706573*x[0]**o + (-0.206942138949)*x[0] + (-0.736253667362)*x[1]**o + (-0.546734823221)*x[1]
        ref[(3, 1, 2)]=-0.455219706573*x_ref[0]**o + (-0.206942138949)*x_ref[0] + (-0.736253667362)*x_ref[1]**o + (-0.546734823221)*x_ref[1]
        arg[(3, 1, 3)]=-0.792907517092*x[0]**o + (-0.562180155974)*x[0] + (0.12880949264)*x[1]**o + (0.755943263969)*x[1]
        ref[(3, 1, 3)]=-0.792907517092*x_ref[0]**o + (-0.562180155974)*x_ref[0] + (0.12880949264)*x_ref[1]**o + (0.755943263969)*x_ref[1]
        arg[(3, 2, 0)]=0.888296108831*x[0]**o + (0.129349371203)*x[0] + (0.35729594018)*x[1]**o + (0.245912946802)*x[1]
        ref[(3, 2, 0)]=0.888296108831*x_ref[0]**o + (0.129349371203)*x_ref[0] + (0.35729594018)*x_ref[1]**o + (0.245912946802)*x_ref[1]
        arg[(3, 2, 1)]=-0.240817470386*x[0]**o + (-0.371235694175)*x[0] + (0.994882653835)*x[1]**o + (0.84369708018)*x[1]
        ref[(3, 2, 1)]=-0.240817470386*x_ref[0]**o + (-0.371235694175)*x_ref[0] + (0.994882653835)*x_ref[1]**o + (0.84369708018)*x_ref[1]
        arg[(3, 2, 2)]=-0.403763624461*x[0]**o + (-0.0298936817233)*x[0] + (0.319975318048)*x[1]**o + (-0.773330845978)*x[1]
        ref[(3, 2, 2)]=-0.403763624461*x_ref[0]**o + (-0.0298936817233)*x_ref[0] + (0.319975318048)*x_ref[1]**o + (-0.773330845978)*x_ref[1]
        arg[(3, 2, 3)]=-0.0399850118419*x[0]**o + (0.358549475694)*x[0] + (0.773695268853)*x[1]**o + (-0.27891210474)*x[1]
        ref[(3, 2, 3)]=-0.0399850118419*x_ref[0]**o + (0.358549475694)*x_ref[0] + (0.773695268853)*x_ref[1]**o + (-0.27891210474)*x_ref[1]
        arg[(3, 3, 0)]=-0.0110612694649*x[0]**o + (0.37793379353)*x[0] + (-0.0281761016408)*x[1]**o + (-0.281035160358)*x[1]
        ref[(3, 3, 0)]=-0.0110612694649*x_ref[0]**o + (0.37793379353)*x_ref[0] + (-0.0281761016408)*x_ref[1]**o + (-0.281035160358)*x_ref[1]
        arg[(3, 3, 1)]=-0.262801398982*x[0]**o + (-0.980245055386)*x[0] + (-0.444850419299)*x[1]**o + (-0.573955861827)*x[1]
        ref[(3, 3, 1)]=-0.262801398982*x_ref[0]**o + (-0.980245055386)*x_ref[0] + (-0.444850419299)*x_ref[1]**o + (-0.573955861827)*x_ref[1]
        arg[(3, 3, 2)]=-0.412018915922*x[0]**o + (-0.0781479328526)*x[0] + (0.661063188286)*x[1]**o + (-0.0865294391509)*x[1]
        ref[(3, 3, 2)]=-0.412018915922*x_ref[0]**o + (-0.0781479328526)*x_ref[0] + (0.661063188286)*x_ref[1]**o + (-0.0865294391509)*x_ref[1]
        arg[(3, 3, 3)]=0.882783673825*x[0]**o + (0.153999841347)*x[0] + (0.148874475289)*x[1]**o + (0.298751635586)*x[1]
        ref[(3, 3, 3)]=0.882783673825*x_ref[0]**o + (0.153999841347)*x_ref[0] + (0.148874475289)*x_ref[1]**o + (0.298751635586)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.566507279209*x[2]**o + (0.42733663324)*x[2]
            ref[(0, 0, 0)]+=-0.566507279209*x_ref[2]**o + (0.42733663324)*x_ref[2]
            arg[(0, 0, 1)]+=0.160973859073*x[2]**o + (-0.0771230963968)*x[2]
            ref[(0, 0, 1)]+=0.160973859073*x_ref[2]**o + (-0.0771230963968)*x_ref[2]
            arg[(0, 0, 2)]+=0.604357059681*x[2]**o + (-0.728800095992)*x[2]
            ref[(0, 0, 2)]+=0.604357059681*x_ref[2]**o + (-0.728800095992)*x_ref[2]
            arg[(0, 0, 3)]+=0.380238170986*x[2]**o + (-0.613304628307)*x[2]
            ref[(0, 0, 3)]+=0.380238170986*x_ref[2]**o + (-0.613304628307)*x_ref[2]
            arg[(0, 1, 0)]+=-0.834859940014*x[2]**o + (0.404214973642)*x[2]
            ref[(0, 1, 0)]+=-0.834859940014*x_ref[2]**o + (0.404214973642)*x_ref[2]
            arg[(0, 1, 1)]+=-0.511339365751*x[2]**o + (0.203158549191)*x[2]
            ref[(0, 1, 1)]+=-0.511339365751*x_ref[2]**o + (0.203158549191)*x_ref[2]
            arg[(0, 1, 2)]+=0.646547047977*x[2]**o + (0.822332754138)*x[2]
            ref[(0, 1, 2)]+=0.646547047977*x_ref[2]**o + (0.822332754138)*x_ref[2]
            arg[(0, 1, 3)]+=0.1412717115*x[2]**o + (0.596140512238)*x[2]
            ref[(0, 1, 3)]+=0.1412717115*x_ref[2]**o + (0.596140512238)*x_ref[2]
            arg[(0, 2, 0)]+=-0.449574763475*x[2]**o + (0.417798719292)*x[2]
            ref[(0, 2, 0)]+=-0.449574763475*x_ref[2]**o + (0.417798719292)*x_ref[2]
            arg[(0, 2, 1)]+=0.0626164383965*x[2]**o + (-0.271209405373)*x[2]
            ref[(0, 2, 1)]+=0.0626164383965*x_ref[2]**o + (-0.271209405373)*x_ref[2]
            arg[(0, 2, 2)]+=0.307991006435*x[2]**o + (-0.461911187547)*x[2]
            ref[(0, 2, 2)]+=0.307991006435*x_ref[2]**o + (-0.461911187547)*x_ref[2]
            arg[(0, 2, 3)]+=-0.839168130321*x[2]**o + (-0.33246265904)*x[2]
            ref[(0, 2, 3)]+=-0.839168130321*x_ref[2]**o + (-0.33246265904)*x_ref[2]
            arg[(0, 3, 0)]+=-0.705191200806*x[2]**o + (-0.631752518411)*x[2]
            ref[(0, 3, 0)]+=-0.705191200806*x_ref[2]**o + (-0.631752518411)*x_ref[2]
            arg[(0, 3, 1)]+=0.718835782939*x[2]**o + (0.200813610019)*x[2]
            ref[(0, 3, 1)]+=0.718835782939*x_ref[2]**o + (0.200813610019)*x_ref[2]
            arg[(0, 3, 2)]+=-0.517053712389*x[2]**o + (-0.430853779484)*x[2]
            ref[(0, 3, 2)]+=-0.517053712389*x_ref[2]**o + (-0.430853779484)*x_ref[2]
            arg[(0, 3, 3)]+=-0.925142466723*x[2]**o + (0.180148533133)*x[2]
            ref[(0, 3, 3)]+=-0.925142466723*x_ref[2]**o + (0.180148533133)*x_ref[2]
            arg[(1, 0, 0)]+=0.677206317064*x[2]**o + (0.782845906495)*x[2]
            ref[(1, 0, 0)]+=0.677206317064*x_ref[2]**o + (0.782845906495)*x_ref[2]
            arg[(1, 0, 1)]+=-0.118819306986*x[2]**o + (0.486711160326)*x[2]
            ref[(1, 0, 1)]+=-0.118819306986*x_ref[2]**o + (0.486711160326)*x_ref[2]
            arg[(1, 0, 2)]+=-0.619472199518*x[2]**o + (-0.120007891305)*x[2]
            ref[(1, 0, 2)]+=-0.619472199518*x_ref[2]**o + (-0.120007891305)*x_ref[2]
            arg[(1, 0, 3)]+=0.458369292954*x[2]**o + (0.547109651301)*x[2]
            ref[(1, 0, 3)]+=0.458369292954*x_ref[2]**o + (0.547109651301)*x_ref[2]
            arg[(1, 1, 0)]+=0.359655731037*x[2]**o + (-0.35004019608)*x[2]
            ref[(1, 1, 0)]+=0.359655731037*x_ref[2]**o + (-0.35004019608)*x_ref[2]
            arg[(1, 1, 1)]+=-0.512405019364*x[2]**o + (-0.561533920625)*x[2]
            ref[(1, 1, 1)]+=-0.512405019364*x_ref[2]**o + (-0.561533920625)*x_ref[2]
            arg[(1, 1, 2)]+=-0.740109501435*x[2]**o + (-0.569059647881)*x[2]
            ref[(1, 1, 2)]+=-0.740109501435*x_ref[2]**o + (-0.569059647881)*x_ref[2]
            arg[(1, 1, 3)]+=-0.482687621786*x[2]**o + (-0.0857933431466)*x[2]
            ref[(1, 1, 3)]+=-0.482687621786*x_ref[2]**o + (-0.0857933431466)*x_ref[2]
            arg[(1, 2, 0)]+=-0.81680037825*x[2]**o + (0.136661074115)*x[2]
            ref[(1, 2, 0)]+=-0.81680037825*x_ref[2]**o + (0.136661074115)*x_ref[2]
            arg[(1, 2, 1)]+=0.342758419356*x[2]**o + (0.492062804558)*x[2]
            ref[(1, 2, 1)]+=0.342758419356*x_ref[2]**o + (0.492062804558)*x_ref[2]
            arg[(1, 2, 2)]+=0.903617903917*x[2]**o + (0.254542195172)*x[2]
            ref[(1, 2, 2)]+=0.903617903917*x_ref[2]**o + (0.254542195172)*x_ref[2]
            arg[(1, 2, 3)]+=-0.899593121439*x[2]**o + (0.61633634841)*x[2]
            ref[(1, 2, 3)]+=-0.899593121439*x_ref[2]**o + (0.61633634841)*x_ref[2]
            arg[(1, 3, 0)]+=-0.157406238237*x[2]**o + (0.203984019814)*x[2]
            ref[(1, 3, 0)]+=-0.157406238237*x_ref[2]**o + (0.203984019814)*x_ref[2]
            arg[(1, 3, 1)]+=-0.037109020693*x[2]**o + (0.940615336543)*x[2]
            ref[(1, 3, 1)]+=-0.037109020693*x_ref[2]**o + (0.940615336543)*x_ref[2]
            arg[(1, 3, 2)]+=-0.220309755703*x[2]**o + (0.79411930649)*x[2]
            ref[(1, 3, 2)]+=-0.220309755703*x_ref[2]**o + (0.79411930649)*x_ref[2]
            arg[(1, 3, 3)]+=-0.388708070707*x[2]**o + (-0.285277146026)*x[2]
            ref[(1, 3, 3)]+=-0.388708070707*x_ref[2]**o + (-0.285277146026)*x_ref[2]
            arg[(2, 0, 0)]+=-0.420087574105*x[2]**o + (-0.953213994979)*x[2]
            ref[(2, 0, 0)]+=-0.420087574105*x_ref[2]**o + (-0.953213994979)*x_ref[2]
            arg[(2, 0, 1)]+=0.295491776107*x[2]**o + (-0.796623689765)*x[2]
            ref[(2, 0, 1)]+=0.295491776107*x_ref[2]**o + (-0.796623689765)*x_ref[2]
            arg[(2, 0, 2)]+=-0.668544770858*x[2]**o + (0.990114288009)*x[2]
            ref[(2, 0, 2)]+=-0.668544770858*x_ref[2]**o + (0.990114288009)*x_ref[2]
            arg[(2, 0, 3)]+=0.565833171431*x[2]**o + (0.296441591444)*x[2]
            ref[(2, 0, 3)]+=0.565833171431*x_ref[2]**o + (0.296441591444)*x_ref[2]
            arg[(2, 1, 0)]+=0.343052512996*x[2]**o + (0.73092273387)*x[2]
            ref[(2, 1, 0)]+=0.343052512996*x_ref[2]**o + (0.73092273387)*x_ref[2]
            arg[(2, 1, 1)]+=0.606750139501*x[2]**o + (-0.10470166811)*x[2]
            ref[(2, 1, 1)]+=0.606750139501*x_ref[2]**o + (-0.10470166811)*x_ref[2]
            arg[(2, 1, 2)]+=0.792782920814*x[2]**o + (-0.795170971488)*x[2]
            ref[(2, 1, 2)]+=0.792782920814*x_ref[2]**o + (-0.795170971488)*x_ref[2]
            arg[(2, 1, 3)]+=-0.81898866066*x[2]**o + (-0.372743487471)*x[2]
            ref[(2, 1, 3)]+=-0.81898866066*x_ref[2]**o + (-0.372743487471)*x_ref[2]
            arg[(2, 2, 0)]+=-0.91148675988*x[2]**o + (0.705676216216)*x[2]
            ref[(2, 2, 0)]+=-0.91148675988*x_ref[2]**o + (0.705676216216)*x_ref[2]
            arg[(2, 2, 1)]+=0.557395432728*x[2]**o + (-0.720647876396)*x[2]
            ref[(2, 2, 1)]+=0.557395432728*x_ref[2]**o + (-0.720647876396)*x_ref[2]
            arg[(2, 2, 2)]+=0.76218301823*x[2]**o + (0.535393003126)*x[2]
            ref[(2, 2, 2)]+=0.76218301823*x_ref[2]**o + (0.535393003126)*x_ref[2]
            arg[(2, 2, 3)]+=0.367388143721*x[2]**o + (0.0964669035246)*x[2]
            ref[(2, 2, 3)]+=0.367388143721*x_ref[2]**o + (0.0964669035246)*x_ref[2]
            arg[(2, 3, 0)]+=0.296247737212*x[2]**o + (0.57245905981)*x[2]
            ref[(2, 3, 0)]+=0.296247737212*x_ref[2]**o + (0.57245905981)*x_ref[2]
            arg[(2, 3, 1)]+=-0.0230309827552*x[2]**o + (0.930075994896)*x[2]
            ref[(2, 3, 1)]+=-0.0230309827552*x_ref[2]**o + (0.930075994896)*x_ref[2]
            arg[(2, 3, 2)]+=0.830615004614*x[2]**o + (0.63851447839)*x[2]
            ref[(2, 3, 2)]+=0.830615004614*x_ref[2]**o + (0.63851447839)*x_ref[2]
            arg[(2, 3, 3)]+=0.816901017222*x[2]**o + (0.780887521758)*x[2]
            ref[(2, 3, 3)]+=0.816901017222*x_ref[2]**o + (0.780887521758)*x_ref[2]
            arg[(3, 0, 0)]+=-0.955314569483*x[2]**o + (0.285022181891)*x[2]
            ref[(3, 0, 0)]+=-0.955314569483*x_ref[2]**o + (0.285022181891)*x_ref[2]
            arg[(3, 0, 1)]+=-0.140238293626*x[2]**o + (0.855209291208)*x[2]
            ref[(3, 0, 1)]+=-0.140238293626*x_ref[2]**o + (0.855209291208)*x_ref[2]
            arg[(3, 0, 2)]+=0.128903925311*x[2]**o + (-0.921403230238)*x[2]
            ref[(3, 0, 2)]+=0.128903925311*x_ref[2]**o + (-0.921403230238)*x_ref[2]
            arg[(3, 0, 3)]+=0.611949478794*x[2]**o + (0.925709160636)*x[2]
            ref[(3, 0, 3)]+=0.611949478794*x_ref[2]**o + (0.925709160636)*x_ref[2]
            arg[(3, 1, 0)]+=0.199403113063*x[2]**o + (-0.799837893881)*x[2]
            ref[(3, 1, 0)]+=0.199403113063*x_ref[2]**o + (-0.799837893881)*x_ref[2]
            arg[(3, 1, 1)]+=-0.247924733692*x[2]**o + (0.594241914573)*x[2]
            ref[(3, 1, 1)]+=-0.247924733692*x_ref[2]**o + (0.594241914573)*x_ref[2]
            arg[(3, 1, 2)]+=-0.901264776574*x[2]**o + (-0.0192768527128)*x[2]
            ref[(3, 1, 2)]+=-0.901264776574*x_ref[2]**o + (-0.0192768527128)*x_ref[2]
            arg[(3, 1, 3)]+=0.414960126028*x[2]**o + (0.217306631405)*x[2]
            ref[(3, 1, 3)]+=0.414960126028*x_ref[2]**o + (0.217306631405)*x_ref[2]
            arg[(3, 2, 0)]+=-0.451007460618*x[2]**o + (-0.852477705121)*x[2]
            ref[(3, 2, 0)]+=-0.451007460618*x_ref[2]**o + (-0.852477705121)*x_ref[2]
            arg[(3, 2, 1)]+=-0.201164940285*x[2]**o + (-0.406256994613)*x[2]
            ref[(3, 2, 1)]+=-0.201164940285*x_ref[2]**o + (-0.406256994613)*x_ref[2]
            arg[(3, 2, 2)]+=0.61157921982*x[2]**o + (0.321665030632)*x[2]
            ref[(3, 2, 2)]+=0.61157921982*x_ref[2]**o + (0.321665030632)*x_ref[2]
            arg[(3, 2, 3)]+=-0.734622925361*x[2]**o + (0.361058761123)*x[2]
            ref[(3, 2, 3)]+=-0.734622925361*x_ref[2]**o + (0.361058761123)*x_ref[2]
            arg[(3, 3, 0)]+=-0.07278738473*x[2]**o + (0.848164861318)*x[2]
            ref[(3, 3, 0)]+=-0.07278738473*x_ref[2]**o + (0.848164861318)*x_ref[2]
            arg[(3, 3, 1)]+=-0.576878280959*x[2]**o + (0.915970122676)*x[2]
            ref[(3, 3, 1)]+=-0.576878280959*x_ref[2]**o + (0.915970122676)*x_ref[2]
            arg[(3, 3, 2)]+=-0.470124462161*x[2]**o + (0.0929925726422)*x[2]
            ref[(3, 3, 2)]+=-0.470124462161*x_ref[2]**o + (0.0929925726422)*x_ref[2]
            arg[(3, 3, 3)]+=-0.88549354451*x[2]**o + (-0.0637984547827)*x[2]
            ref[(3, 3, 3)]+=-0.88549354451*x_ref[2]**o + (-0.0637984547827)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactOne_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 4, 4),w)
        ref = Data(0,(3, 2, 4, 4),w_ref)
        arg[(0, 0, 0, 0)]=-0.110830262216*x[0]**o + (-0.679197782635)*x[0] + (-0.426094435441)*x[1]**o + (-0.496759848638)*x[1]
        ref[(0, 0, 0, 0)]=-0.110830262216*x_ref[0]**o + (-0.679197782635)*x_ref[0] + (-0.426094435441)*x_ref[1]**o + (-0.496759848638)*x_ref[1]
        arg[(0, 0, 0, 1)]=-0.711077899508*x[0]**o + (0.682657814972)*x[0] + (0.463057168976)*x[1]**o + (0.571905417368)*x[1]
        ref[(0, 0, 0, 1)]=-0.711077899508*x_ref[0]**o + (0.682657814972)*x_ref[0] + (0.463057168976)*x_ref[1]**o + (0.571905417368)*x_ref[1]
        arg[(0, 0, 0, 2)]=0.56334552751*x[0]**o + (0.551709802733)*x[0] + (0.612682604084)*x[1]**o + (-0.624994859774)*x[1]
        ref[(0, 0, 0, 2)]=0.56334552751*x_ref[0]**o + (0.551709802733)*x_ref[0] + (0.612682604084)*x_ref[1]**o + (-0.624994859774)*x_ref[1]
        arg[(0, 0, 0, 3)]=0.881957022629*x[0]**o + (0.0645998755063)*x[0] + (0.14454611769)*x[1]**o + (-0.25875762141)*x[1]
        ref[(0, 0, 0, 3)]=0.881957022629*x_ref[0]**o + (0.0645998755063)*x_ref[0] + (0.14454611769)*x_ref[1]**o + (-0.25875762141)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.180541823681*x[0]**o + (0.200063747285)*x[0] + (-0.212021012348)*x[1]**o + (0.954174471307)*x[1]
        ref[(0, 0, 1, 0)]=-0.180541823681*x_ref[0]**o + (0.200063747285)*x_ref[0] + (-0.212021012348)*x_ref[1]**o + (0.954174471307)*x_ref[1]
        arg[(0, 0, 1, 1)]=-0.769812507885*x[0]**o + (-0.54357661598)*x[0] + (0.0981806577927)*x[1]**o + (0.173916476675)*x[1]
        ref[(0, 0, 1, 1)]=-0.769812507885*x_ref[0]**o + (-0.54357661598)*x_ref[0] + (0.0981806577927)*x_ref[1]**o + (0.173916476675)*x_ref[1]
        arg[(0, 0, 1, 2)]=-0.94279434723*x[0]**o + (-0.648425327272)*x[0] + (-0.821661813889)*x[1]**o + (-0.146608074892)*x[1]
        ref[(0, 0, 1, 2)]=-0.94279434723*x_ref[0]**o + (-0.648425327272)*x_ref[0] + (-0.821661813889)*x_ref[1]**o + (-0.146608074892)*x_ref[1]
        arg[(0, 0, 1, 3)]=0.354543749534*x[0]**o + (-0.77178983511)*x[0] + (0.783342570904)*x[1]**o + (0.800872877284)*x[1]
        ref[(0, 0, 1, 3)]=0.354543749534*x_ref[0]**o + (-0.77178983511)*x_ref[0] + (0.783342570904)*x_ref[1]**o + (0.800872877284)*x_ref[1]
        arg[(0, 0, 2, 0)]=0.514134133657*x[0]**o + (-0.838127827444)*x[0] + (0.400709687125)*x[1]**o + (0.834340552279)*x[1]
        ref[(0, 0, 2, 0)]=0.514134133657*x_ref[0]**o + (-0.838127827444)*x_ref[0] + (0.400709687125)*x_ref[1]**o + (0.834340552279)*x_ref[1]
        arg[(0, 0, 2, 1)]=-0.221201525526*x[0]**o + (-0.111620696111)*x[0] + (-0.468267896309)*x[1]**o + (0.126267854475)*x[1]
        ref[(0, 0, 2, 1)]=-0.221201525526*x_ref[0]**o + (-0.111620696111)*x_ref[0] + (-0.468267896309)*x_ref[1]**o + (0.126267854475)*x_ref[1]
        arg[(0, 0, 2, 2)]=-0.712239237068*x[0]**o + (0.63268285624)*x[0] + (-0.740070475619)*x[1]**o + (-0.970058839121)*x[1]
        ref[(0, 0, 2, 2)]=-0.712239237068*x_ref[0]**o + (0.63268285624)*x_ref[0] + (-0.740070475619)*x_ref[1]**o + (-0.970058839121)*x_ref[1]
        arg[(0, 0, 2, 3)]=-0.989968764652*x[0]**o + (-0.244366760662)*x[0] + (0.623662047859)*x[1]**o + (-0.361889495518)*x[1]
        ref[(0, 0, 2, 3)]=-0.989968764652*x_ref[0]**o + (-0.244366760662)*x_ref[0] + (0.623662047859)*x_ref[1]**o + (-0.361889495518)*x_ref[1]
        arg[(0, 0, 3, 0)]=0.286684376724*x[0]**o + (-0.64115686113)*x[0] + (0.890221012697)*x[1]**o + (0.0263084434815)*x[1]
        ref[(0, 0, 3, 0)]=0.286684376724*x_ref[0]**o + (-0.64115686113)*x_ref[0] + (0.890221012697)*x_ref[1]**o + (0.0263084434815)*x_ref[1]
        arg[(0, 0, 3, 1)]=0.452379152411*x[0]**o + (-0.917883018984)*x[0] + (-0.208391359072)*x[1]**o + (-0.333034280302)*x[1]
        ref[(0, 0, 3, 1)]=0.452379152411*x_ref[0]**o + (-0.917883018984)*x_ref[0] + (-0.208391359072)*x_ref[1]**o + (-0.333034280302)*x_ref[1]
        arg[(0, 0, 3, 2)]=-0.76243958955*x[0]**o + (-0.580654666825)*x[0] + (0.788384818669)*x[1]**o + (0.0637445107725)*x[1]
        ref[(0, 0, 3, 2)]=-0.76243958955*x_ref[0]**o + (-0.580654666825)*x_ref[0] + (0.788384818669)*x_ref[1]**o + (0.0637445107725)*x_ref[1]
        arg[(0, 0, 3, 3)]=0.730970215003*x[0]**o + (-0.606911073603)*x[0] + (-0.554350253912)*x[1]**o + (-0.927684922193)*x[1]
        ref[(0, 0, 3, 3)]=0.730970215003*x_ref[0]**o + (-0.606911073603)*x_ref[0] + (-0.554350253912)*x_ref[1]**o + (-0.927684922193)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.426345614965*x[0]**o + (0.099535500205)*x[0] + (0.720078595033)*x[1]**o + (-0.427965882372)*x[1]
        ref[(0, 1, 0, 0)]=-0.426345614965*x_ref[0]**o + (0.099535500205)*x_ref[0] + (0.720078595033)*x_ref[1]**o + (-0.427965882372)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.641386660913*x[0]**o + (-0.20158219441)*x[0] + (0.319471010992)*x[1]**o + (-0.422633381176)*x[1]
        ref[(0, 1, 0, 1)]=0.641386660913*x_ref[0]**o + (-0.20158219441)*x_ref[0] + (0.319471010992)*x_ref[1]**o + (-0.422633381176)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.714071486715*x[0]**o + (-0.235866219797)*x[0] + (0.0673256771368)*x[1]**o + (0.953446867113)*x[1]
        ref[(0, 1, 0, 2)]=0.714071486715*x_ref[0]**o + (-0.235866219797)*x_ref[0] + (0.0673256771368)*x_ref[1]**o + (0.953446867113)*x_ref[1]
        arg[(0, 1, 0, 3)]=0.0814520158613*x[0]**o + (0.0621852386327)*x[0] + (0.89759245011)*x[1]**o + (-0.398958814522)*x[1]
        ref[(0, 1, 0, 3)]=0.0814520158613*x_ref[0]**o + (0.0621852386327)*x_ref[0] + (0.89759245011)*x_ref[1]**o + (-0.398958814522)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.770850719373*x[0]**o + (0.309637523341)*x[0] + (-0.706667420742)*x[1]**o + (0.530158994979)*x[1]
        ref[(0, 1, 1, 0)]=-0.770850719373*x_ref[0]**o + (0.309637523341)*x_ref[0] + (-0.706667420742)*x_ref[1]**o + (0.530158994979)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.210160830342*x[0]**o + (-0.6607740026)*x[0] + (0.797058379144)*x[1]**o + (-0.489375156621)*x[1]
        ref[(0, 1, 1, 1)]=0.210160830342*x_ref[0]**o + (-0.6607740026)*x_ref[0] + (0.797058379144)*x_ref[1]**o + (-0.489375156621)*x_ref[1]
        arg[(0, 1, 1, 2)]=0.878008106403*x[0]**o + (-0.634064566227)*x[0] + (0.415081179737)*x[1]**o + (-0.848986492021)*x[1]
        ref[(0, 1, 1, 2)]=0.878008106403*x_ref[0]**o + (-0.634064566227)*x_ref[0] + (0.415081179737)*x_ref[1]**o + (-0.848986492021)*x_ref[1]
        arg[(0, 1, 1, 3)]=0.51957601356*x[0]**o + (-0.817527620899)*x[0] + (0.652619573079)*x[1]**o + (0.712349575611)*x[1]
        ref[(0, 1, 1, 3)]=0.51957601356*x_ref[0]**o + (-0.817527620899)*x_ref[0] + (0.652619573079)*x_ref[1]**o + (0.712349575611)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.442680190551*x[0]**o + (-0.878788287447)*x[0] + (-0.869584617688)*x[1]**o + (-0.450553563384)*x[1]
        ref[(0, 1, 2, 0)]=-0.442680190551*x_ref[0]**o + (-0.878788287447)*x_ref[0] + (-0.869584617688)*x_ref[1]**o + (-0.450553563384)*x_ref[1]
        arg[(0, 1, 2, 1)]=-0.58772465033*x[0]**o + (0.921040797416)*x[0] + (-0.634690587074)*x[1]**o + (0.544459716058)*x[1]
        ref[(0, 1, 2, 1)]=-0.58772465033*x_ref[0]**o + (0.921040797416)*x_ref[0] + (-0.634690587074)*x_ref[1]**o + (0.544459716058)*x_ref[1]
        arg[(0, 1, 2, 2)]=0.612558309928*x[0]**o + (0.497362143267)*x[0] + (-0.0592839357012)*x[1]**o + (-0.12081994011)*x[1]
        ref[(0, 1, 2, 2)]=0.612558309928*x_ref[0]**o + (0.497362143267)*x_ref[0] + (-0.0592839357012)*x_ref[1]**o + (-0.12081994011)*x_ref[1]
        arg[(0, 1, 2, 3)]=-0.666790784863*x[0]**o + (-0.569834716244)*x[0] + (-0.0162587159895)*x[1]**o + (0.809863459443)*x[1]
        ref[(0, 1, 2, 3)]=-0.666790784863*x_ref[0]**o + (-0.569834716244)*x_ref[0] + (-0.0162587159895)*x_ref[1]**o + (0.809863459443)*x_ref[1]
        arg[(0, 1, 3, 0)]=-0.340952007692*x[0]**o + (-0.241881363006)*x[0] + (0.696820907124)*x[1]**o + (-0.799326695858)*x[1]
        ref[(0, 1, 3, 0)]=-0.340952007692*x_ref[0]**o + (-0.241881363006)*x_ref[0] + (0.696820907124)*x_ref[1]**o + (-0.799326695858)*x_ref[1]
        arg[(0, 1, 3, 1)]=0.851099873656*x[0]**o + (0.858589291399)*x[0] + (0.122063551126)*x[1]**o + (0.777686053085)*x[1]
        ref[(0, 1, 3, 1)]=0.851099873656*x_ref[0]**o + (0.858589291399)*x_ref[0] + (0.122063551126)*x_ref[1]**o + (0.777686053085)*x_ref[1]
        arg[(0, 1, 3, 2)]=0.959413778713*x[0]**o + (0.619130526859)*x[0] + (-0.132516110471)*x[1]**o + (-0.338583295196)*x[1]
        ref[(0, 1, 3, 2)]=0.959413778713*x_ref[0]**o + (0.619130526859)*x_ref[0] + (-0.132516110471)*x_ref[1]**o + (-0.338583295196)*x_ref[1]
        arg[(0, 1, 3, 3)]=0.810977950851*x[0]**o + (0.843891383726)*x[0] + (0.788928858002)*x[1]**o + (0.870316334347)*x[1]
        ref[(0, 1, 3, 3)]=0.810977950851*x_ref[0]**o + (0.843891383726)*x_ref[0] + (0.788928858002)*x_ref[1]**o + (0.870316334347)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.235292696374*x[0]**o + (0.0244702077219)*x[0] + (0.927021933701)*x[1]**o + (-0.337853223474)*x[1]
        ref[(1, 0, 0, 0)]=0.235292696374*x_ref[0]**o + (0.0244702077219)*x_ref[0] + (0.927021933701)*x_ref[1]**o + (-0.337853223474)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.402452941233*x[0]**o + (0.651306773475)*x[0] + (-0.363186572997)*x[1]**o + (-0.397596655346)*x[1]
        ref[(1, 0, 0, 1)]=-0.402452941233*x_ref[0]**o + (0.651306773475)*x_ref[0] + (-0.363186572997)*x_ref[1]**o + (-0.397596655346)*x_ref[1]
        arg[(1, 0, 0, 2)]=-0.563122181705*x[0]**o + (-0.538377861195)*x[0] + (-0.372335021094)*x[1]**o + (0.989771384589)*x[1]
        ref[(1, 0, 0, 2)]=-0.563122181705*x_ref[0]**o + (-0.538377861195)*x_ref[0] + (-0.372335021094)*x_ref[1]**o + (0.989771384589)*x_ref[1]
        arg[(1, 0, 0, 3)]=-0.889402205451*x[0]**o + (-0.473036189595)*x[0] + (-0.850402099413)*x[1]**o + (-0.131210700606)*x[1]
        ref[(1, 0, 0, 3)]=-0.889402205451*x_ref[0]**o + (-0.473036189595)*x_ref[0] + (-0.850402099413)*x_ref[1]**o + (-0.131210700606)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.991272915236*x[0]**o + (0.0679907456569)*x[0] + (0.186523556696)*x[1]**o + (-0.338055272099)*x[1]
        ref[(1, 0, 1, 0)]=-0.991272915236*x_ref[0]**o + (0.0679907456569)*x_ref[0] + (0.186523556696)*x_ref[1]**o + (-0.338055272099)*x_ref[1]
        arg[(1, 0, 1, 1)]=-0.578250181763*x[0]**o + (-0.828781568116)*x[0] + (-0.481188107881)*x[1]**o + (-0.466944818278)*x[1]
        ref[(1, 0, 1, 1)]=-0.578250181763*x_ref[0]**o + (-0.828781568116)*x_ref[0] + (-0.481188107881)*x_ref[1]**o + (-0.466944818278)*x_ref[1]
        arg[(1, 0, 1, 2)]=-0.544117150057*x[0]**o + (0.652674623293)*x[0] + (0.571603539746)*x[1]**o + (0.566808822781)*x[1]
        ref[(1, 0, 1, 2)]=-0.544117150057*x_ref[0]**o + (0.652674623293)*x_ref[0] + (0.571603539746)*x_ref[1]**o + (0.566808822781)*x_ref[1]
        arg[(1, 0, 1, 3)]=0.613782978654*x[0]**o + (-0.722149798639)*x[0] + (0.776215679077)*x[1]**o + (0.190815665584)*x[1]
        ref[(1, 0, 1, 3)]=0.613782978654*x_ref[0]**o + (-0.722149798639)*x_ref[0] + (0.776215679077)*x_ref[1]**o + (0.190815665584)*x_ref[1]
        arg[(1, 0, 2, 0)]=0.417193908837*x[0]**o + (0.377660027405)*x[0] + (0.892579283611)*x[1]**o + (0.697370889451)*x[1]
        ref[(1, 0, 2, 0)]=0.417193908837*x_ref[0]**o + (0.377660027405)*x_ref[0] + (0.892579283611)*x_ref[1]**o + (0.697370889451)*x_ref[1]
        arg[(1, 0, 2, 1)]=0.348588727481*x[0]**o + (0.525072191408)*x[0] + (0.000810265285708)*x[1]**o + (-0.517782115588)*x[1]
        ref[(1, 0, 2, 1)]=0.348588727481*x_ref[0]**o + (0.525072191408)*x_ref[0] + (0.000810265285708)*x_ref[1]**o + (-0.517782115588)*x_ref[1]
        arg[(1, 0, 2, 2)]=0.556502641798*x[0]**o + (0.974004592136)*x[0] + (-0.834305789911)*x[1]**o + (-0.147147615127)*x[1]
        ref[(1, 0, 2, 2)]=0.556502641798*x_ref[0]**o + (0.974004592136)*x_ref[0] + (-0.834305789911)*x_ref[1]**o + (-0.147147615127)*x_ref[1]
        arg[(1, 0, 2, 3)]=0.242422905337*x[0]**o + (-0.763517812834)*x[0] + (0.953508008845)*x[1]**o + (-0.232392942409)*x[1]
        ref[(1, 0, 2, 3)]=0.242422905337*x_ref[0]**o + (-0.763517812834)*x_ref[0] + (0.953508008845)*x_ref[1]**o + (-0.232392942409)*x_ref[1]
        arg[(1, 0, 3, 0)]=-0.700316303184*x[0]**o + (-0.755341652141)*x[0] + (0.537981831066)*x[1]**o + (0.716885484275)*x[1]
        ref[(1, 0, 3, 0)]=-0.700316303184*x_ref[0]**o + (-0.755341652141)*x_ref[0] + (0.537981831066)*x_ref[1]**o + (0.716885484275)*x_ref[1]
        arg[(1, 0, 3, 1)]=0.331367559501*x[0]**o + (-0.675011619092)*x[0] + (0.970206225773)*x[1]**o + (-0.088030215878)*x[1]
        ref[(1, 0, 3, 1)]=0.331367559501*x_ref[0]**o + (-0.675011619092)*x_ref[0] + (0.970206225773)*x_ref[1]**o + (-0.088030215878)*x_ref[1]
        arg[(1, 0, 3, 2)]=0.881799615123*x[0]**o + (0.0983131282049)*x[0] + (0.710930620466)*x[1]**o + (-0.289027748935)*x[1]
        ref[(1, 0, 3, 2)]=0.881799615123*x_ref[0]**o + (0.0983131282049)*x_ref[0] + (0.710930620466)*x_ref[1]**o + (-0.289027748935)*x_ref[1]
        arg[(1, 0, 3, 3)]=0.606249791009*x[0]**o + (-0.61527997884)*x[0] + (0.608319256033)*x[1]**o + (-0.281480686721)*x[1]
        ref[(1, 0, 3, 3)]=0.606249791009*x_ref[0]**o + (-0.61527997884)*x_ref[0] + (0.608319256033)*x_ref[1]**o + (-0.281480686721)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.109000634182*x[0]**o + (-0.770938364719)*x[0] + (-0.204440177139)*x[1]**o + (-0.226477440345)*x[1]
        ref[(1, 1, 0, 0)]=-0.109000634182*x_ref[0]**o + (-0.770938364719)*x_ref[0] + (-0.204440177139)*x_ref[1]**o + (-0.226477440345)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.349847688981*x[0]**o + (0.815264021889)*x[0] + (0.948707784218)*x[1]**o + (-0.206377329396)*x[1]
        ref[(1, 1, 0, 1)]=0.349847688981*x_ref[0]**o + (0.815264021889)*x_ref[0] + (0.948707784218)*x_ref[1]**o + (-0.206377329396)*x_ref[1]
        arg[(1, 1, 0, 2)]=0.0102907070936*x[0]**o + (-0.0923525446675)*x[0] + (-0.965226740236)*x[1]**o + (0.1230662572)*x[1]
        ref[(1, 1, 0, 2)]=0.0102907070936*x_ref[0]**o + (-0.0923525446675)*x_ref[0] + (-0.965226740236)*x_ref[1]**o + (0.1230662572)*x_ref[1]
        arg[(1, 1, 0, 3)]=0.966605988107*x[0]**o + (0.208725503081)*x[0] + (-0.557030645988)*x[1]**o + (-0.425418691494)*x[1]
        ref[(1, 1, 0, 3)]=0.966605988107*x_ref[0]**o + (0.208725503081)*x_ref[0] + (-0.557030645988)*x_ref[1]**o + (-0.425418691494)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.700315484293*x[0]**o + (-0.195608589689)*x[0] + (0.0267359518911)*x[1]**o + (-0.487878754989)*x[1]
        ref[(1, 1, 1, 0)]=-0.700315484293*x_ref[0]**o + (-0.195608589689)*x_ref[0] + (0.0267359518911)*x_ref[1]**o + (-0.487878754989)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.145961498764*x[0]**o + (-0.286237980675)*x[0] + (-0.407330354218)*x[1]**o + (-0.691744388392)*x[1]
        ref[(1, 1, 1, 1)]=-0.145961498764*x_ref[0]**o + (-0.286237980675)*x_ref[0] + (-0.407330354218)*x_ref[1]**o + (-0.691744388392)*x_ref[1]
        arg[(1, 1, 1, 2)]=0.0246669448239*x[0]**o + (0.18716962763)*x[0] + (0.526749519988)*x[1]**o + (0.309893998998)*x[1]
        ref[(1, 1, 1, 2)]=0.0246669448239*x_ref[0]**o + (0.18716962763)*x_ref[0] + (0.526749519988)*x_ref[1]**o + (0.309893998998)*x_ref[1]
        arg[(1, 1, 1, 3)]=0.209049319458*x[0]**o + (0.478086814987)*x[0] + (0.461270725638)*x[1]**o + (0.1865991357)*x[1]
        ref[(1, 1, 1, 3)]=0.209049319458*x_ref[0]**o + (0.478086814987)*x_ref[0] + (0.461270725638)*x_ref[1]**o + (0.1865991357)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.408313687325*x[0]**o + (0.0796345931769)*x[0] + (-0.0176655924625)*x[1]**o + (0.577296033639)*x[1]
        ref[(1, 1, 2, 0)]=-0.408313687325*x_ref[0]**o + (0.0796345931769)*x_ref[0] + (-0.0176655924625)*x_ref[1]**o + (0.577296033639)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.12775247548*x[0]**o + (-0.79772317745)*x[0] + (-0.895724621108)*x[1]**o + (-0.332386535066)*x[1]
        ref[(1, 1, 2, 1)]=-0.12775247548*x_ref[0]**o + (-0.79772317745)*x_ref[0] + (-0.895724621108)*x_ref[1]**o + (-0.332386535066)*x_ref[1]
        arg[(1, 1, 2, 2)]=0.689853921505*x[0]**o + (-0.815534800024)*x[0] + (0.132095069007)*x[1]**o + (-0.135827590598)*x[1]
        ref[(1, 1, 2, 2)]=0.689853921505*x_ref[0]**o + (-0.815534800024)*x_ref[0] + (0.132095069007)*x_ref[1]**o + (-0.135827590598)*x_ref[1]
        arg[(1, 1, 2, 3)]=0.927759722538*x[0]**o + (-0.263002336614)*x[0] + (0.261419636968)*x[1]**o + (0.848282224972)*x[1]
        ref[(1, 1, 2, 3)]=0.927759722538*x_ref[0]**o + (-0.263002336614)*x_ref[0] + (0.261419636968)*x_ref[1]**o + (0.848282224972)*x_ref[1]
        arg[(1, 1, 3, 0)]=-0.254758115703*x[0]**o + (0.253305410083)*x[0] + (0.077825909501)*x[1]**o + (-0.347159322658)*x[1]
        ref[(1, 1, 3, 0)]=-0.254758115703*x_ref[0]**o + (0.253305410083)*x_ref[0] + (0.077825909501)*x_ref[1]**o + (-0.347159322658)*x_ref[1]
        arg[(1, 1, 3, 1)]=-0.176507062894*x[0]**o + (-0.945528230758)*x[0] + (0.308498203691)*x[1]**o + (-0.155515260754)*x[1]
        ref[(1, 1, 3, 1)]=-0.176507062894*x_ref[0]**o + (-0.945528230758)*x_ref[0] + (0.308498203691)*x_ref[1]**o + (-0.155515260754)*x_ref[1]
        arg[(1, 1, 3, 2)]=0.709884228349*x[0]**o + (-0.126365767138)*x[0] + (0.953560832833)*x[1]**o + (-0.471959957123)*x[1]
        ref[(1, 1, 3, 2)]=0.709884228349*x_ref[0]**o + (-0.126365767138)*x_ref[0] + (0.953560832833)*x_ref[1]**o + (-0.471959957123)*x_ref[1]
        arg[(1, 1, 3, 3)]=-0.969147535492*x[0]**o + (-0.810141361359)*x[0] + (0.879335977773)*x[1]**o + (-0.892955615113)*x[1]
        ref[(1, 1, 3, 3)]=-0.969147535492*x_ref[0]**o + (-0.810141361359)*x_ref[0] + (0.879335977773)*x_ref[1]**o + (-0.892955615113)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.951329649615*x[0]**o + (-0.147534568694)*x[0] + (0.722872744349)*x[1]**o + (0.552372125574)*x[1]
        ref[(2, 0, 0, 0)]=0.951329649615*x_ref[0]**o + (-0.147534568694)*x_ref[0] + (0.722872744349)*x_ref[1]**o + (0.552372125574)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.9929508986*x[0]**o + (0.428638268276)*x[0] + (-0.110208668687)*x[1]**o + (-0.607559629885)*x[1]
        ref[(2, 0, 0, 1)]=0.9929508986*x_ref[0]**o + (0.428638268276)*x_ref[0] + (-0.110208668687)*x_ref[1]**o + (-0.607559629885)*x_ref[1]
        arg[(2, 0, 0, 2)]=0.119964303568*x[0]**o + (-0.930554646734)*x[0] + (0.999020296352)*x[1]**o + (0.672179076122)*x[1]
        ref[(2, 0, 0, 2)]=0.119964303568*x_ref[0]**o + (-0.930554646734)*x_ref[0] + (0.999020296352)*x_ref[1]**o + (0.672179076122)*x_ref[1]
        arg[(2, 0, 0, 3)]=-0.884397100741*x[0]**o + (0.180421690492)*x[0] + (-0.212124701983)*x[1]**o + (0.549257350202)*x[1]
        ref[(2, 0, 0, 3)]=-0.884397100741*x_ref[0]**o + (0.180421690492)*x_ref[0] + (-0.212124701983)*x_ref[1]**o + (0.549257350202)*x_ref[1]
        arg[(2, 0, 1, 0)]=-0.246112198632*x[0]**o + (0.474568861766)*x[0] + (0.834770600013)*x[1]**o + (0.497729768856)*x[1]
        ref[(2, 0, 1, 0)]=-0.246112198632*x_ref[0]**o + (0.474568861766)*x_ref[0] + (0.834770600013)*x_ref[1]**o + (0.497729768856)*x_ref[1]
        arg[(2, 0, 1, 1)]=0.0023020001562*x[0]**o + (0.867113893618)*x[0] + (-0.0568692560398)*x[1]**o + (0.471484772955)*x[1]
        ref[(2, 0, 1, 1)]=0.0023020001562*x_ref[0]**o + (0.867113893618)*x_ref[0] + (-0.0568692560398)*x_ref[1]**o + (0.471484772955)*x_ref[1]
        arg[(2, 0, 1, 2)]=-0.301160404632*x[0]**o + (-0.115192475719)*x[0] + (-0.692633741107)*x[1]**o + (0.358578390473)*x[1]
        ref[(2, 0, 1, 2)]=-0.301160404632*x_ref[0]**o + (-0.115192475719)*x_ref[0] + (-0.692633741107)*x_ref[1]**o + (0.358578390473)*x_ref[1]
        arg[(2, 0, 1, 3)]=-0.881550951203*x[0]**o + (-0.611725939974)*x[0] + (0.357642435941)*x[1]**o + (0.574719709772)*x[1]
        ref[(2, 0, 1, 3)]=-0.881550951203*x_ref[0]**o + (-0.611725939974)*x_ref[0] + (0.357642435941)*x_ref[1]**o + (0.574719709772)*x_ref[1]
        arg[(2, 0, 2, 0)]=0.465075193062*x[0]**o + (-0.389955028576)*x[0] + (-0.871059509422)*x[1]**o + (0.808457210403)*x[1]
        ref[(2, 0, 2, 0)]=0.465075193062*x_ref[0]**o + (-0.389955028576)*x_ref[0] + (-0.871059509422)*x_ref[1]**o + (0.808457210403)*x_ref[1]
        arg[(2, 0, 2, 1)]=0.295635428581*x[0]**o + (0.120164971171)*x[0] + (0.992697391741)*x[1]**o + (-0.54183198432)*x[1]
        ref[(2, 0, 2, 1)]=0.295635428581*x_ref[0]**o + (0.120164971171)*x_ref[0] + (0.992697391741)*x_ref[1]**o + (-0.54183198432)*x_ref[1]
        arg[(2, 0, 2, 2)]=-0.834412816329*x[0]**o + (0.64475677422)*x[0] + (-0.512548262622)*x[1]**o + (-0.826624824206)*x[1]
        ref[(2, 0, 2, 2)]=-0.834412816329*x_ref[0]**o + (0.64475677422)*x_ref[0] + (-0.512548262622)*x_ref[1]**o + (-0.826624824206)*x_ref[1]
        arg[(2, 0, 2, 3)]=0.585904339096*x[0]**o + (0.842208449633)*x[0] + (-0.625621648514)*x[1]**o + (-0.682721659454)*x[1]
        ref[(2, 0, 2, 3)]=0.585904339096*x_ref[0]**o + (0.842208449633)*x_ref[0] + (-0.625621648514)*x_ref[1]**o + (-0.682721659454)*x_ref[1]
        arg[(2, 0, 3, 0)]=0.0831378575763*x[0]**o + (0.895357581791)*x[0] + (0.137104192017)*x[1]**o + (0.159691070644)*x[1]
        ref[(2, 0, 3, 0)]=0.0831378575763*x_ref[0]**o + (0.895357581791)*x_ref[0] + (0.137104192017)*x_ref[1]**o + (0.159691070644)*x_ref[1]
        arg[(2, 0, 3, 1)]=-0.521581193132*x[0]**o + (-0.0061915951532)*x[0] + (-0.853351941514)*x[1]**o + (0.084887511758)*x[1]
        ref[(2, 0, 3, 1)]=-0.521581193132*x_ref[0]**o + (-0.0061915951532)*x_ref[0] + (-0.853351941514)*x_ref[1]**o + (0.084887511758)*x_ref[1]
        arg[(2, 0, 3, 2)]=0.981766376679*x[0]**o + (0.157541303817)*x[0] + (-0.104794286229)*x[1]**o + (0.505803130137)*x[1]
        ref[(2, 0, 3, 2)]=0.981766376679*x_ref[0]**o + (0.157541303817)*x_ref[0] + (-0.104794286229)*x_ref[1]**o + (0.505803130137)*x_ref[1]
        arg[(2, 0, 3, 3)]=-0.923736683533*x[0]**o + (0.486760018345)*x[0] + (0.0701371725521)*x[1]**o + (-0.504731361188)*x[1]
        ref[(2, 0, 3, 3)]=-0.923736683533*x_ref[0]**o + (0.486760018345)*x_ref[0] + (0.0701371725521)*x_ref[1]**o + (-0.504731361188)*x_ref[1]
        arg[(2, 1, 0, 0)]=-0.120201071641*x[0]**o + (-0.000699120992862)*x[0] + (-0.588828294307)*x[1]**o + (-0.185114047734)*x[1]
        ref[(2, 1, 0, 0)]=-0.120201071641*x_ref[0]**o + (-0.000699120992862)*x_ref[0] + (-0.588828294307)*x_ref[1]**o + (-0.185114047734)*x_ref[1]
        arg[(2, 1, 0, 1)]=-0.965452150799*x[0]**o + (-0.612643136826)*x[0] + (0.888031789914)*x[1]**o + (0.670524872745)*x[1]
        ref[(2, 1, 0, 1)]=-0.965452150799*x_ref[0]**o + (-0.612643136826)*x_ref[0] + (0.888031789914)*x_ref[1]**o + (0.670524872745)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.644448307497*x[0]**o + (-0.152727122933)*x[0] + (-0.794530225575)*x[1]**o + (0.620480659725)*x[1]
        ref[(2, 1, 0, 2)]=-0.644448307497*x_ref[0]**o + (-0.152727122933)*x_ref[0] + (-0.794530225575)*x_ref[1]**o + (0.620480659725)*x_ref[1]
        arg[(2, 1, 0, 3)]=-0.647562866937*x[0]**o + (0.210794696285)*x[0] + (0.713556317328)*x[1]**o + (-0.937706817968)*x[1]
        ref[(2, 1, 0, 3)]=-0.647562866937*x_ref[0]**o + (0.210794696285)*x_ref[0] + (0.713556317328)*x_ref[1]**o + (-0.937706817968)*x_ref[1]
        arg[(2, 1, 1, 0)]=0.93981323673*x[0]**o + (-0.15784111495)*x[0] + (-0.099636319791)*x[1]**o + (-0.810916557731)*x[1]
        ref[(2, 1, 1, 0)]=0.93981323673*x_ref[0]**o + (-0.15784111495)*x_ref[0] + (-0.099636319791)*x_ref[1]**o + (-0.810916557731)*x_ref[1]
        arg[(2, 1, 1, 1)]=-0.358547731815*x[0]**o + (-0.0700636524674)*x[0] + (-0.33053596683)*x[1]**o + (-0.41123650182)*x[1]
        ref[(2, 1, 1, 1)]=-0.358547731815*x_ref[0]**o + (-0.0700636524674)*x_ref[0] + (-0.33053596683)*x_ref[1]**o + (-0.41123650182)*x_ref[1]
        arg[(2, 1, 1, 2)]=-0.687587943671*x[0]**o + (0.31040951514)*x[0] + (-0.367386808224)*x[1]**o + (-0.623306827128)*x[1]
        ref[(2, 1, 1, 2)]=-0.687587943671*x_ref[0]**o + (0.31040951514)*x_ref[0] + (-0.367386808224)*x_ref[1]**o + (-0.623306827128)*x_ref[1]
        arg[(2, 1, 1, 3)]=0.959312744918*x[0]**o + (-0.925933411323)*x[0] + (0.673315423504)*x[1]**o + (-0.282820946458)*x[1]
        ref[(2, 1, 1, 3)]=0.959312744918*x_ref[0]**o + (-0.925933411323)*x_ref[0] + (0.673315423504)*x_ref[1]**o + (-0.282820946458)*x_ref[1]
        arg[(2, 1, 2, 0)]=-0.0214247627706*x[0]**o + (0.901960910991)*x[0] + (-0.98047426369)*x[1]**o + (-0.736372607039)*x[1]
        ref[(2, 1, 2, 0)]=-0.0214247627706*x_ref[0]**o + (0.901960910991)*x_ref[0] + (-0.98047426369)*x_ref[1]**o + (-0.736372607039)*x_ref[1]
        arg[(2, 1, 2, 1)]=0.261777232894*x[0]**o + (0.303503536685)*x[0] + (-0.139300022421)*x[1]**o + (-0.219574280136)*x[1]
        ref[(2, 1, 2, 1)]=0.261777232894*x_ref[0]**o + (0.303503536685)*x_ref[0] + (-0.139300022421)*x_ref[1]**o + (-0.219574280136)*x_ref[1]
        arg[(2, 1, 2, 2)]=-0.0676712547684*x[0]**o + (-0.891328536203)*x[0] + (-0.242225970519)*x[1]**o + (0.578856488969)*x[1]
        ref[(2, 1, 2, 2)]=-0.0676712547684*x_ref[0]**o + (-0.891328536203)*x_ref[0] + (-0.242225970519)*x_ref[1]**o + (0.578856488969)*x_ref[1]
        arg[(2, 1, 2, 3)]=-0.0116239655704*x[0]**o + (0.922981225169)*x[0] + (0.167237564695)*x[1]**o + (0.593067934567)*x[1]
        ref[(2, 1, 2, 3)]=-0.0116239655704*x_ref[0]**o + (0.922981225169)*x_ref[0] + (0.167237564695)*x_ref[1]**o + (0.593067934567)*x_ref[1]
        arg[(2, 1, 3, 0)]=0.196242321749*x[0]**o + (0.0232595425373)*x[0] + (0.671695939954)*x[1]**o + (-0.247813334243)*x[1]
        ref[(2, 1, 3, 0)]=0.196242321749*x_ref[0]**o + (0.0232595425373)*x_ref[0] + (0.671695939954)*x_ref[1]**o + (-0.247813334243)*x_ref[1]
        arg[(2, 1, 3, 1)]=0.271086450034*x[0]**o + (0.0848040847399)*x[0] + (-0.550744067078)*x[1]**o + (-0.00228532861863)*x[1]
        ref[(2, 1, 3, 1)]=0.271086450034*x_ref[0]**o + (0.0848040847399)*x_ref[0] + (-0.550744067078)*x_ref[1]**o + (-0.00228532861863)*x_ref[1]
        arg[(2, 1, 3, 2)]=0.493803641572*x[0]**o + (0.485530196395)*x[0] + (0.713035236628)*x[1]**o + (0.152539797552)*x[1]
        ref[(2, 1, 3, 2)]=0.493803641572*x_ref[0]**o + (0.485530196395)*x_ref[0] + (0.713035236628)*x_ref[1]**o + (0.152539797552)*x_ref[1]
        arg[(2, 1, 3, 3)]=0.812313833419*x[0]**o + (0.5013343952)*x[0] + (0.312262760912)*x[1]**o + (0.237558685305)*x[1]
        ref[(2, 1, 3, 3)]=0.812313833419*x_ref[0]**o + (0.5013343952)*x_ref[0] + (0.312262760912)*x_ref[1]**o + (0.237558685305)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.517690017265*x[2]**o + (0.375255442564)*x[2]
            ref[(0, 0, 0, 0)]+=-0.517690017265*x_ref[2]**o + (0.375255442564)*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.116078776843*x[2]**o + (0.685345355149)*x[2]
            ref[(0, 0, 0, 1)]+=0.116078776843*x_ref[2]**o + (0.685345355149)*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.461535947321*x[2]**o + (0.691106755641)*x[2]
            ref[(0, 0, 0, 2)]+=0.461535947321*x_ref[2]**o + (0.691106755641)*x_ref[2]
            arg[(0, 0, 0, 3)]+=0.566145405498*x[2]**o + (0.258433799461)*x[2]
            ref[(0, 0, 0, 3)]+=0.566145405498*x_ref[2]**o + (0.258433799461)*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.400379372051*x[2]**o + (-0.182737655892)*x[2]
            ref[(0, 0, 1, 0)]+=0.400379372051*x_ref[2]**o + (-0.182737655892)*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.613384971723*x[2]**o + (-0.449116248765)*x[2]
            ref[(0, 0, 1, 1)]+=0.613384971723*x_ref[2]**o + (-0.449116248765)*x_ref[2]
            arg[(0, 0, 1, 2)]+=-0.278835190335*x[2]**o + (-0.224647178615)*x[2]
            ref[(0, 0, 1, 2)]+=-0.278835190335*x_ref[2]**o + (-0.224647178615)*x_ref[2]
            arg[(0, 0, 1, 3)]+=0.521346391117*x[2]**o + (0.75377599969)*x[2]
            ref[(0, 0, 1, 3)]+=0.521346391117*x_ref[2]**o + (0.75377599969)*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.730219985949*x[2]**o + (-0.283488102761)*x[2]
            ref[(0, 0, 2, 0)]+=-0.730219985949*x_ref[2]**o + (-0.283488102761)*x_ref[2]
            arg[(0, 0, 2, 1)]+=-0.176238569721*x[2]**o + (-0.826148916189)*x[2]
            ref[(0, 0, 2, 1)]+=-0.176238569721*x_ref[2]**o + (-0.826148916189)*x_ref[2]
            arg[(0, 0, 2, 2)]+=-0.0635561307597*x[2]**o + (-0.716713422892)*x[2]
            ref[(0, 0, 2, 2)]+=-0.0635561307597*x_ref[2]**o + (-0.716713422892)*x_ref[2]
            arg[(0, 0, 2, 3)]+=0.112641734014*x[2]**o + (0.956713597441)*x[2]
            ref[(0, 0, 2, 3)]+=0.112641734014*x_ref[2]**o + (0.956713597441)*x_ref[2]
            arg[(0, 0, 3, 0)]+=-0.767087484169*x[2]**o + (-0.658474673206)*x[2]
            ref[(0, 0, 3, 0)]+=-0.767087484169*x_ref[2]**o + (-0.658474673206)*x_ref[2]
            arg[(0, 0, 3, 1)]+=0.625469380793*x[2]**o + (0.581131670645)*x[2]
            ref[(0, 0, 3, 1)]+=0.625469380793*x_ref[2]**o + (0.581131670645)*x_ref[2]
            arg[(0, 0, 3, 2)]+=0.164369572943*x[2]**o + (-0.596923445242)*x[2]
            ref[(0, 0, 3, 2)]+=0.164369572943*x_ref[2]**o + (-0.596923445242)*x_ref[2]
            arg[(0, 0, 3, 3)]+=0.574697526213*x[2]**o + (0.177221190011)*x[2]
            ref[(0, 0, 3, 3)]+=0.574697526213*x_ref[2]**o + (0.177221190011)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.57934129207*x[2]**o + (0.58247047615)*x[2]
            ref[(0, 1, 0, 0)]+=-0.57934129207*x_ref[2]**o + (0.58247047615)*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.114601173018*x[2]**o + (-0.27614856099)*x[2]
            ref[(0, 1, 0, 1)]+=0.114601173018*x_ref[2]**o + (-0.27614856099)*x_ref[2]
            arg[(0, 1, 0, 2)]+=-0.194164976489*x[2]**o + (0.123732793382)*x[2]
            ref[(0, 1, 0, 2)]+=-0.194164976489*x_ref[2]**o + (0.123732793382)*x_ref[2]
            arg[(0, 1, 0, 3)]+=0.0430456489953*x[2]**o + (0.425336318806)*x[2]
            ref[(0, 1, 0, 3)]+=0.0430456489953*x_ref[2]**o + (0.425336318806)*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.345174849755*x[2]**o + (0.12679150517)*x[2]
            ref[(0, 1, 1, 0)]+=-0.345174849755*x_ref[2]**o + (0.12679150517)*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.275435262451*x[2]**o + (-0.987886681593)*x[2]
            ref[(0, 1, 1, 1)]+=-0.275435262451*x_ref[2]**o + (-0.987886681593)*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.111234561191*x[2]**o + (0.53694817775)*x[2]
            ref[(0, 1, 1, 2)]+=0.111234561191*x_ref[2]**o + (0.53694817775)*x_ref[2]
            arg[(0, 1, 1, 3)]+=-0.814757622373*x[2]**o + (0.41684173008)*x[2]
            ref[(0, 1, 1, 3)]+=-0.814757622373*x_ref[2]**o + (0.41684173008)*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.436607618427*x[2]**o + (-0.146400805619)*x[2]
            ref[(0, 1, 2, 0)]+=-0.436607618427*x_ref[2]**o + (-0.146400805619)*x_ref[2]
            arg[(0, 1, 2, 1)]+=-0.886606284389*x[2]**o + (0.889066162106)*x[2]
            ref[(0, 1, 2, 1)]+=-0.886606284389*x_ref[2]**o + (0.889066162106)*x_ref[2]
            arg[(0, 1, 2, 2)]+=1.54788126261e-05*x[2]**o + (0.903584013347)*x[2]
            ref[(0, 1, 2, 2)]+=1.54788126261e-05*x_ref[2]**o + (0.903584013347)*x_ref[2]
            arg[(0, 1, 2, 3)]+=-0.780164205265*x[2]**o + (-0.720860723592)*x[2]
            ref[(0, 1, 2, 3)]+=-0.780164205265*x_ref[2]**o + (-0.720860723592)*x_ref[2]
            arg[(0, 1, 3, 0)]+=0.344352758779*x[2]**o + (0.602174321955)*x[2]
            ref[(0, 1, 3, 0)]+=0.344352758779*x_ref[2]**o + (0.602174321955)*x_ref[2]
            arg[(0, 1, 3, 1)]+=0.694073647988*x[2]**o + (0.671821715829)*x[2]
            ref[(0, 1, 3, 1)]+=0.694073647988*x_ref[2]**o + (0.671821715829)*x_ref[2]
            arg[(0, 1, 3, 2)]+=-0.356726761893*x[2]**o + (0.900640725609)*x[2]
            ref[(0, 1, 3, 2)]+=-0.356726761893*x_ref[2]**o + (0.900640725609)*x_ref[2]
            arg[(0, 1, 3, 3)]+=-0.226407187328*x[2]**o + (0.728594369392)*x[2]
            ref[(0, 1, 3, 3)]+=-0.226407187328*x_ref[2]**o + (0.728594369392)*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.0547411405299*x[2]**o + (0.655738585014)*x[2]
            ref[(1, 0, 0, 0)]+=0.0547411405299*x_ref[2]**o + (0.655738585014)*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.298170536896*x[2]**o + (0.801851890424)*x[2]
            ref[(1, 0, 0, 1)]+=-0.298170536896*x_ref[2]**o + (0.801851890424)*x_ref[2]
            arg[(1, 0, 0, 2)]+=-0.239512742606*x[2]**o + (0.0337907336015)*x[2]
            ref[(1, 0, 0, 2)]+=-0.239512742606*x_ref[2]**o + (0.0337907336015)*x_ref[2]
            arg[(1, 0, 0, 3)]+=-0.233944803607*x[2]**o + (0.184280134656)*x[2]
            ref[(1, 0, 0, 3)]+=-0.233944803607*x_ref[2]**o + (0.184280134656)*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.298882932415*x[2]**o + (0.573956244747)*x[2]
            ref[(1, 0, 1, 0)]+=-0.298882932415*x_ref[2]**o + (0.573956244747)*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.0216599935054*x[2]**o + (0.258958668673)*x[2]
            ref[(1, 0, 1, 1)]+=0.0216599935054*x_ref[2]**o + (0.258958668673)*x_ref[2]
            arg[(1, 0, 1, 2)]+=-0.797556868326*x[2]**o + (0.132583957945)*x[2]
            ref[(1, 0, 1, 2)]+=-0.797556868326*x_ref[2]**o + (0.132583957945)*x_ref[2]
            arg[(1, 0, 1, 3)]+=0.406535906532*x[2]**o + (0.355901132687)*x[2]
            ref[(1, 0, 1, 3)]+=0.406535906532*x_ref[2]**o + (0.355901132687)*x_ref[2]
            arg[(1, 0, 2, 0)]+=0.121043316697*x[2]**o + (0.764889116506)*x[2]
            ref[(1, 0, 2, 0)]+=0.121043316697*x_ref[2]**o + (0.764889116506)*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.790660492566*x[2]**o + (0.233480776188)*x[2]
            ref[(1, 0, 2, 1)]+=0.790660492566*x_ref[2]**o + (0.233480776188)*x_ref[2]
            arg[(1, 0, 2, 2)]+=-0.186212511911*x[2]**o + (0.917697369155)*x[2]
            ref[(1, 0, 2, 2)]+=-0.186212511911*x_ref[2]**o + (0.917697369155)*x_ref[2]
            arg[(1, 0, 2, 3)]+=-0.176574405239*x[2]**o + (-0.476111154806)*x[2]
            ref[(1, 0, 2, 3)]+=-0.176574405239*x_ref[2]**o + (-0.476111154806)*x_ref[2]
            arg[(1, 0, 3, 0)]+=0.508236971884*x[2]**o + (0.430139545985)*x[2]
            ref[(1, 0, 3, 0)]+=0.508236971884*x_ref[2]**o + (0.430139545985)*x_ref[2]
            arg[(1, 0, 3, 1)]+=-0.124851084559*x[2]**o + (0.876720031949)*x[2]
            ref[(1, 0, 3, 1)]+=-0.124851084559*x_ref[2]**o + (0.876720031949)*x_ref[2]
            arg[(1, 0, 3, 2)]+=-0.132759375051*x[2]**o + (-0.585538576091)*x[2]
            ref[(1, 0, 3, 2)]+=-0.132759375051*x_ref[2]**o + (-0.585538576091)*x_ref[2]
            arg[(1, 0, 3, 3)]+=-0.986431500998*x[2]**o + (0.403082162737)*x[2]
            ref[(1, 0, 3, 3)]+=-0.986431500998*x_ref[2]**o + (0.403082162737)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.00279184104028*x[2]**o + (0.0517667064971)*x[2]
            ref[(1, 1, 0, 0)]+=0.00279184104028*x_ref[2]**o + (0.0517667064971)*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.35645975895*x[2]**o + (0.603021870636)*x[2]
            ref[(1, 1, 0, 1)]+=-0.35645975895*x_ref[2]**o + (0.603021870636)*x_ref[2]
            arg[(1, 1, 0, 2)]+=0.019370675061*x[2]**o + (-0.308202763941)*x[2]
            ref[(1, 1, 0, 2)]+=0.019370675061*x_ref[2]**o + (-0.308202763941)*x_ref[2]
            arg[(1, 1, 0, 3)]+=0.267845540397*x[2]**o + (0.694819962102)*x[2]
            ref[(1, 1, 0, 3)]+=0.267845540397*x_ref[2]**o + (0.694819962102)*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.931291433387*x[2]**o + (-0.789286653524)*x[2]
            ref[(1, 1, 1, 0)]+=-0.931291433387*x_ref[2]**o + (-0.789286653524)*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.984980134033*x[2]**o + (0.850648190995)*x[2]
            ref[(1, 1, 1, 1)]+=0.984980134033*x_ref[2]**o + (0.850648190995)*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.80676532506*x[2]**o + (-0.985207312509)*x[2]
            ref[(1, 1, 1, 2)]+=-0.80676532506*x_ref[2]**o + (-0.985207312509)*x_ref[2]
            arg[(1, 1, 1, 3)]+=-0.159029507856*x[2]**o + (0.655175726424)*x[2]
            ref[(1, 1, 1, 3)]+=-0.159029507856*x_ref[2]**o + (0.655175726424)*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.855054773285*x[2]**o + (0.738891839663)*x[2]
            ref[(1, 1, 2, 0)]+=-0.855054773285*x_ref[2]**o + (0.738891839663)*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.470871444473*x[2]**o + (0.0378358059166)*x[2]
            ref[(1, 1, 2, 1)]+=0.470871444473*x_ref[2]**o + (0.0378358059166)*x_ref[2]
            arg[(1, 1, 2, 2)]+=0.224898292426*x[2]**o + (-0.541942413165)*x[2]
            ref[(1, 1, 2, 2)]+=0.224898292426*x_ref[2]**o + (-0.541942413165)*x_ref[2]
            arg[(1, 1, 2, 3)]+=0.738177553125*x[2]**o + (-0.776709557024)*x[2]
            ref[(1, 1, 2, 3)]+=0.738177553125*x_ref[2]**o + (-0.776709557024)*x_ref[2]
            arg[(1, 1, 3, 0)]+=-0.0697891747193*x[2]**o + (0.201115641186)*x[2]
            ref[(1, 1, 3, 0)]+=-0.0697891747193*x_ref[2]**o + (0.201115641186)*x_ref[2]
            arg[(1, 1, 3, 1)]+=0.301913397046*x[2]**o + (-0.21946537969)*x[2]
            ref[(1, 1, 3, 1)]+=0.301913397046*x_ref[2]**o + (-0.21946537969)*x_ref[2]
            arg[(1, 1, 3, 2)]+=0.790699695794*x[2]**o + (-0.947612204952)*x[2]
            ref[(1, 1, 3, 2)]+=0.790699695794*x_ref[2]**o + (-0.947612204952)*x_ref[2]
            arg[(1, 1, 3, 3)]+=-0.330405159991*x[2]**o + (-0.829815610651)*x[2]
            ref[(1, 1, 3, 3)]+=-0.330405159991*x_ref[2]**o + (-0.829815610651)*x_ref[2]
            arg[(2, 0, 0, 0)]+=-0.181229211116*x[2]**o + (0.602820976358)*x[2]
            ref[(2, 0, 0, 0)]+=-0.181229211116*x_ref[2]**o + (0.602820976358)*x_ref[2]
            arg[(2, 0, 0, 1)]+=-0.0576332115209*x[2]**o + (0.0111017543991)*x[2]
            ref[(2, 0, 0, 1)]+=-0.0576332115209*x_ref[2]**o + (0.0111017543991)*x_ref[2]
            arg[(2, 0, 0, 2)]+=-0.368358896049*x[2]**o + (0.713610051856)*x[2]
            ref[(2, 0, 0, 2)]+=-0.368358896049*x_ref[2]**o + (0.713610051856)*x_ref[2]
            arg[(2, 0, 0, 3)]+=-0.23874049979*x[2]**o + (-0.592641208316)*x[2]
            ref[(2, 0, 0, 3)]+=-0.23874049979*x_ref[2]**o + (-0.592641208316)*x_ref[2]
            arg[(2, 0, 1, 0)]+=0.263358197925*x[2]**o + (-0.421952418367)*x[2]
            ref[(2, 0, 1, 0)]+=0.263358197925*x_ref[2]**o + (-0.421952418367)*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.322555650008*x[2]**o + (0.29967361442)*x[2]
            ref[(2, 0, 1, 1)]+=0.322555650008*x_ref[2]**o + (0.29967361442)*x_ref[2]
            arg[(2, 0, 1, 2)]+=0.826261708988*x[2]**o + (-0.794261028208)*x[2]
            ref[(2, 0, 1, 2)]+=0.826261708988*x_ref[2]**o + (-0.794261028208)*x_ref[2]
            arg[(2, 0, 1, 3)]+=0.683087092178*x[2]**o + (0.233732895633)*x[2]
            ref[(2, 0, 1, 3)]+=0.683087092178*x_ref[2]**o + (0.233732895633)*x_ref[2]
            arg[(2, 0, 2, 0)]+=-0.462565993709*x[2]**o + (0.322059282099)*x[2]
            ref[(2, 0, 2, 0)]+=-0.462565993709*x_ref[2]**o + (0.322059282099)*x_ref[2]
            arg[(2, 0, 2, 1)]+=-0.360887926403*x[2]**o + (-0.634204504614)*x[2]
            ref[(2, 0, 2, 1)]+=-0.360887926403*x_ref[2]**o + (-0.634204504614)*x_ref[2]
            arg[(2, 0, 2, 2)]+=-0.770169289405*x[2]**o + (0.582292119329)*x[2]
            ref[(2, 0, 2, 2)]+=-0.770169289405*x_ref[2]**o + (0.582292119329)*x_ref[2]
            arg[(2, 0, 2, 3)]+=-0.0739586778746*x[2]**o + (0.457386336467)*x[2]
            ref[(2, 0, 2, 3)]+=-0.0739586778746*x_ref[2]**o + (0.457386336467)*x_ref[2]
            arg[(2, 0, 3, 0)]+=0.898350664958*x[2]**o + (0.0431123558434)*x[2]
            ref[(2, 0, 3, 0)]+=0.898350664958*x_ref[2]**o + (0.0431123558434)*x_ref[2]
            arg[(2, 0, 3, 1)]+=-0.949492345655*x[2]**o + (0.901077361216)*x[2]
            ref[(2, 0, 3, 1)]+=-0.949492345655*x_ref[2]**o + (0.901077361216)*x_ref[2]
            arg[(2, 0, 3, 2)]+=-0.759234867855*x[2]**o + (0.493792940379)*x[2]
            ref[(2, 0, 3, 2)]+=-0.759234867855*x_ref[2]**o + (0.493792940379)*x_ref[2]
            arg[(2, 0, 3, 3)]+=0.511004679761*x[2]**o + (0.0531831546112)*x[2]
            ref[(2, 0, 3, 3)]+=0.511004679761*x_ref[2]**o + (0.0531831546112)*x_ref[2]
            arg[(2, 1, 0, 0)]+=-0.940021465616*x[2]**o + (-0.810792043755)*x[2]
            ref[(2, 1, 0, 0)]+=-0.940021465616*x_ref[2]**o + (-0.810792043755)*x_ref[2]
            arg[(2, 1, 0, 1)]+=0.435380199189*x[2]**o + (0.0903379566933)*x[2]
            ref[(2, 1, 0, 1)]+=0.435380199189*x_ref[2]**o + (0.0903379566933)*x_ref[2]
            arg[(2, 1, 0, 2)]+=0.0794354965115*x[2]**o + (-0.271336949063)*x[2]
            ref[(2, 1, 0, 2)]+=0.0794354965115*x_ref[2]**o + (-0.271336949063)*x_ref[2]
            arg[(2, 1, 0, 3)]+=0.83063856958*x[2]**o + (0.790690159508)*x[2]
            ref[(2, 1, 0, 3)]+=0.83063856958*x_ref[2]**o + (0.790690159508)*x_ref[2]
            arg[(2, 1, 1, 0)]+=-0.249660588763*x[2]**o + (-0.429012960318)*x[2]
            ref[(2, 1, 1, 0)]+=-0.249660588763*x_ref[2]**o + (-0.429012960318)*x_ref[2]
            arg[(2, 1, 1, 1)]+=0.443726066913*x[2]**o + (-0.291587288076)*x[2]
            ref[(2, 1, 1, 1)]+=0.443726066913*x_ref[2]**o + (-0.291587288076)*x_ref[2]
            arg[(2, 1, 1, 2)]+=0.849235816194*x[2]**o + (0.00142781434306)*x[2]
            ref[(2, 1, 1, 2)]+=0.849235816194*x_ref[2]**o + (0.00142781434306)*x_ref[2]
            arg[(2, 1, 1, 3)]+=0.953548959681*x[2]**o + (-0.539750616272)*x[2]
            ref[(2, 1, 1, 3)]+=0.953548959681*x_ref[2]**o + (-0.539750616272)*x_ref[2]
            arg[(2, 1, 2, 0)]+=-0.560249475159*x[2]**o + (-0.319832301801)*x[2]
            ref[(2, 1, 2, 0)]+=-0.560249475159*x_ref[2]**o + (-0.319832301801)*x_ref[2]
            arg[(2, 1, 2, 1)]+=-0.414150392355*x[2]**o + (-0.185631005895)*x[2]
            ref[(2, 1, 2, 1)]+=-0.414150392355*x_ref[2]**o + (-0.185631005895)*x_ref[2]
            arg[(2, 1, 2, 2)]+=-0.566842953093*x[2]**o + (0.494219168289)*x[2]
            ref[(2, 1, 2, 2)]+=-0.566842953093*x_ref[2]**o + (0.494219168289)*x_ref[2]
            arg[(2, 1, 2, 3)]+=-0.571334938917*x[2]**o + (-0.638000603222)*x[2]
            ref[(2, 1, 2, 3)]+=-0.571334938917*x_ref[2]**o + (-0.638000603222)*x_ref[2]
            arg[(2, 1, 3, 0)]+=0.389142911761*x[2]**o + (0.227853739427)*x[2]
            ref[(2, 1, 3, 0)]+=0.389142911761*x_ref[2]**o + (0.227853739427)*x_ref[2]
            arg[(2, 1, 3, 1)]+=0.669428098557*x[2]**o + (-0.377773704946)*x[2]
            ref[(2, 1, 3, 1)]+=0.669428098557*x_ref[2]**o + (-0.377773704946)*x_ref[2]
            arg[(2, 1, 3, 2)]+=-0.855866061242*x[2]**o + (-0.988644285111)*x[2]
            ref[(2, 1, 3, 2)]+=-0.855866061242*x_ref[2]**o + (-0.988644285111)*x_ref[2]
            arg[(2, 1, 3, 3)]+=0.315015520367*x[2]**o + (0.213786408019)*x[2]
            ref[(2, 1, 3, 3)]+=0.315015520367*x_ref[2]**o + (0.213786408019)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 2, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.183891430692*x[0]**o + (0.486596289931)*x[0] + (0.393300819669)*x[1]**o + (0.948921424376)*x[1]
        ref=-0.183891430692*x_ref[0]**o + (0.486596289931)*x_ref[0] + (0.393300819669)*x_ref[1]**o + (0.948921424376)*x_ref[1]
        if dim==3:
            arg+=(0.743498194626)*x[2]**o + (-0.399595781689)*x[2]
            ref+=(0.743498194626)*x_ref[2]**o + (-0.399595781689)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=0.590975732151*x[0]**o + (0.0947988776011)*x[0] + (0.732171524315)*x[1]**o + (-0.271980853478)*x[1]
        ref[(0,)]=0.590975732151*x_ref[0]**o + (0.0947988776011)*x_ref[0] + (0.732171524315)*x_ref[1]**o + (-0.271980853478)*x_ref[1]
        arg[(1,)]=-0.774924291133*x[0]**o + (0.998981528388)*x[0] + (0.37834014129)*x[1]**o + (0.320334953212)*x[1]
        ref[(1,)]=-0.774924291133*x_ref[0]**o + (0.998981528388)*x_ref[0] + (0.37834014129)*x_ref[1]**o + (0.320334953212)*x_ref[1]
        arg[(2,)]=0.958064587493*x[0]**o + (-0.100263060452)*x[0] + (-0.38770460031)*x[1]**o + (0.954826363305)*x[1]
        ref[(2,)]=0.958064587493*x_ref[0]**o + (-0.100263060452)*x_ref[0] + (-0.38770460031)*x_ref[1]**o + (0.954826363305)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.297078224516*x[2]**o + (0.648216815577)*x[2]
            ref[(0,)]+=0.297078224516*x_ref[2]**o + (0.648216815577)*x_ref[2]
            arg[(1,)]+=-0.82808380069*x[2]**o + (-0.793445030896)*x[2]
            ref[(1,)]+=-0.82808380069*x_ref[2]**o + (-0.793445030896)*x_ref[2]
            arg[(2,)]+=0.12587614358*x[2]**o + (0.619164756411)*x[2]
            ref[(2,)]+=0.12587614358*x_ref[2]**o + (0.619164756411)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref = Data(0,(3, 4),w_ref)
        arg[(0, 0)]=0.631222515602*x[0]**o + (0.199371860562)*x[0] + (-0.178106523124)*x[1]**o + (0.0651111676114)*x[1]
        ref[(0, 0)]=0.631222515602*x_ref[0]**o + (0.199371860562)*x_ref[0] + (-0.178106523124)*x_ref[1]**o + (0.0651111676114)*x_ref[1]
        arg[(0, 1)]=0.534994745084*x[0]**o + (-0.35067731101)*x[0] + (0.255004898384)*x[1]**o + (0.914436957216)*x[1]
        ref[(0, 1)]=0.534994745084*x_ref[0]**o + (-0.35067731101)*x_ref[0] + (0.255004898384)*x_ref[1]**o + (0.914436957216)*x_ref[1]
        arg[(0, 2)]=0.575532448074*x[0]**o + (-0.412038795199)*x[0] + (0.875779948284)*x[1]**o + (-0.152824847)*x[1]
        ref[(0, 2)]=0.575532448074*x_ref[0]**o + (-0.412038795199)*x_ref[0] + (0.875779948284)*x_ref[1]**o + (-0.152824847)*x_ref[1]
        arg[(0, 3)]=-0.319921250543*x[0]**o + (0.883046195102)*x[0] + (-0.205024091952)*x[1]**o + (-0.690033659062)*x[1]
        ref[(0, 3)]=-0.319921250543*x_ref[0]**o + (0.883046195102)*x_ref[0] + (-0.205024091952)*x_ref[1]**o + (-0.690033659062)*x_ref[1]
        arg[(1, 0)]=0.0345632393429*x[0]**o + (0.974766545426)*x[0] + (-0.645911285209)*x[1]**o + (0.779138502292)*x[1]
        ref[(1, 0)]=0.0345632393429*x_ref[0]**o + (0.974766545426)*x_ref[0] + (-0.645911285209)*x_ref[1]**o + (0.779138502292)*x_ref[1]
        arg[(1, 1)]=0.761827719869*x[0]**o + (0.136778278262)*x[0] + (-0.300555992417)*x[1]**o + (0.05562235659)*x[1]
        ref[(1, 1)]=0.761827719869*x_ref[0]**o + (0.136778278262)*x_ref[0] + (-0.300555992417)*x_ref[1]**o + (0.05562235659)*x_ref[1]
        arg[(1, 2)]=0.792680500079*x[0]**o + (-0.932069716537)*x[0] + (0.42531987643)*x[1]**o + (-0.299926258699)*x[1]
        ref[(1, 2)]=0.792680500079*x_ref[0]**o + (-0.932069716537)*x_ref[0] + (0.42531987643)*x_ref[1]**o + (-0.299926258699)*x_ref[1]
        arg[(1, 3)]=-0.997113418184*x[0]**o + (0.387782347212)*x[0] + (0.815898466586)*x[1]**o + (0.968865786019)*x[1]
        ref[(1, 3)]=-0.997113418184*x_ref[0]**o + (0.387782347212)*x_ref[0] + (0.815898466586)*x_ref[1]**o + (0.968865786019)*x_ref[1]
        arg[(2, 0)]=-0.656990914365*x[0]**o + (0.762178876048)*x[0] + (-0.954746972936)*x[1]**o + (0.788042249103)*x[1]
        ref[(2, 0)]=-0.656990914365*x_ref[0]**o + (0.762178876048)*x_ref[0] + (-0.954746972936)*x_ref[1]**o + (0.788042249103)*x_ref[1]
        arg[(2, 1)]=-0.307557487468*x[0]**o + (0.684406243498)*x[0] + (-0.32001340093)*x[1]**o + (-0.230650803635)*x[1]
        ref[(2, 1)]=-0.307557487468*x_ref[0]**o + (0.684406243498)*x_ref[0] + (-0.32001340093)*x_ref[1]**o + (-0.230650803635)*x_ref[1]
        arg[(2, 2)]=0.138313035964*x[0]**o + (-0.56805279084)*x[0] + (0.546570537772)*x[1]**o + (-0.68530664546)*x[1]
        ref[(2, 2)]=0.138313035964*x_ref[0]**o + (-0.56805279084)*x_ref[0] + (0.546570537772)*x_ref[1]**o + (-0.68530664546)*x_ref[1]
        arg[(2, 3)]=-0.694069153083*x[0]**o + (0.581433139045)*x[0] + (0.973281505453)*x[1]**o + (0.126176606373)*x[1]
        ref[(2, 3)]=-0.694069153083*x_ref[0]**o + (0.581433139045)*x_ref[0] + (0.973281505453)*x_ref[1]**o + (0.126176606373)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.696084034434*x[2]**o + (-0.655932477215)*x[2]
            ref[(0, 0)]+=0.696084034434*x_ref[2]**o + (-0.655932477215)*x_ref[2]
            arg[(0, 1)]+=0.0880693111792*x[2]**o + (0.771363976256)*x[2]
            ref[(0, 1)]+=0.0880693111792*x_ref[2]**o + (0.771363976256)*x_ref[2]
            arg[(0, 2)]+=-0.958950187128*x[2]**o + (-0.766300898903)*x[2]
            ref[(0, 2)]+=-0.958950187128*x_ref[2]**o + (-0.766300898903)*x_ref[2]
            arg[(0, 3)]+=0.711608091417*x[2]**o + (-0.18073876633)*x[2]
            ref[(0, 3)]+=0.711608091417*x_ref[2]**o + (-0.18073876633)*x_ref[2]
            arg[(1, 0)]+=0.101744960974*x[2]**o + (0.0131330355869)*x[2]
            ref[(1, 0)]+=0.101744960974*x_ref[2]**o + (0.0131330355869)*x_ref[2]
            arg[(1, 1)]+=-0.466045624977*x[2]**o + (0.266075585438)*x[2]
            ref[(1, 1)]+=-0.466045624977*x_ref[2]**o + (0.266075585438)*x_ref[2]
            arg[(1, 2)]+=0.560509360615*x[2]**o + (0.070015666153)*x[2]
            ref[(1, 2)]+=0.560509360615*x_ref[2]**o + (0.070015666153)*x_ref[2]
            arg[(1, 3)]+=-0.089619297629*x[2]**o + (-0.801372963469)*x[2]
            ref[(1, 3)]+=-0.089619297629*x_ref[2]**o + (-0.801372963469)*x_ref[2]
            arg[(2, 0)]+=0.579036800502*x[2]**o + (-0.978820023423)*x[2]
            ref[(2, 0)]+=0.579036800502*x_ref[2]**o + (-0.978820023423)*x_ref[2]
            arg[(2, 1)]+=-0.428181091746*x[2]**o + (-0.178549227067)*x[2]
            ref[(2, 1)]+=-0.428181091746*x_ref[2]**o + (-0.178549227067)*x_ref[2]
            arg[(2, 2)]+=-0.63505264149*x[2]**o + (-0.789577322591)*x[2]
            ref[(2, 2)]+=-0.63505264149*x_ref[2]**o + (-0.789577322591)*x_ref[2]
            arg[(2, 3)]+=0.710007905641*x[2]**o + (0.34293434072)*x[2]
            ref[(2, 3)]+=0.710007905641*x_ref[2]**o + (0.34293434072)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 4),w)
        ref = Data(0,(3, 4, 4),w_ref)
        arg[(0, 0, 0)]=-0.90762435417*x[0]**o + (-0.193713238832)*x[0] + (-0.583842158943)*x[1]**o + (-0.891313148967)*x[1]
        ref[(0, 0, 0)]=-0.90762435417*x_ref[0]**o + (-0.193713238832)*x_ref[0] + (-0.583842158943)*x_ref[1]**o + (-0.891313148967)*x_ref[1]
        arg[(0, 0, 1)]=-0.0601227668012*x[0]**o + (-0.74797380721)*x[0] + (0.254855660045)*x[1]**o + (-0.22206307144)*x[1]
        ref[(0, 0, 1)]=-0.0601227668012*x_ref[0]**o + (-0.74797380721)*x_ref[0] + (0.254855660045)*x_ref[1]**o + (-0.22206307144)*x_ref[1]
        arg[(0, 0, 2)]=-0.676017015182*x[0]**o + (-0.381421055673)*x[0] + (0.735685614947)*x[1]**o + (0.601355624625)*x[1]
        ref[(0, 0, 2)]=-0.676017015182*x_ref[0]**o + (-0.381421055673)*x_ref[0] + (0.735685614947)*x_ref[1]**o + (0.601355624625)*x_ref[1]
        arg[(0, 0, 3)]=-0.713873333078*x[0]**o + (-0.838658627663)*x[0] + (-0.630800296613)*x[1]**o + (-0.979485517178)*x[1]
        ref[(0, 0, 3)]=-0.713873333078*x_ref[0]**o + (-0.838658627663)*x_ref[0] + (-0.630800296613)*x_ref[1]**o + (-0.979485517178)*x_ref[1]
        arg[(0, 1, 0)]=-0.60758693239*x[0]**o + (-0.905021155861)*x[0] + (0.552920288019)*x[1]**o + (-0.590970128745)*x[1]
        ref[(0, 1, 0)]=-0.60758693239*x_ref[0]**o + (-0.905021155861)*x_ref[0] + (0.552920288019)*x_ref[1]**o + (-0.590970128745)*x_ref[1]
        arg[(0, 1, 1)]=0.9945636927*x[0]**o + (0.428723266853)*x[0] + (0.970381921657)*x[1]**o + (0.172617087433)*x[1]
        ref[(0, 1, 1)]=0.9945636927*x_ref[0]**o + (0.428723266853)*x_ref[0] + (0.970381921657)*x_ref[1]**o + (0.172617087433)*x_ref[1]
        arg[(0, 1, 2)]=0.651266560591*x[0]**o + (0.182394096361)*x[0] + (-0.327293326909)*x[1]**o + (-0.692348156789)*x[1]
        ref[(0, 1, 2)]=0.651266560591*x_ref[0]**o + (0.182394096361)*x_ref[0] + (-0.327293326909)*x_ref[1]**o + (-0.692348156789)*x_ref[1]
        arg[(0, 1, 3)]=-0.90229447235*x[0]**o + (0.913806003311)*x[0] + (0.510481171016)*x[1]**o + (-0.896895093658)*x[1]
        ref[(0, 1, 3)]=-0.90229447235*x_ref[0]**o + (0.913806003311)*x_ref[0] + (0.510481171016)*x_ref[1]**o + (-0.896895093658)*x_ref[1]
        arg[(0, 2, 0)]=0.91585879965*x[0]**o + (0.534341295158)*x[0] + (-0.392740405726)*x[1]**o + (-0.591998605839)*x[1]
        ref[(0, 2, 0)]=0.91585879965*x_ref[0]**o + (0.534341295158)*x_ref[0] + (-0.392740405726)*x_ref[1]**o + (-0.591998605839)*x_ref[1]
        arg[(0, 2, 1)]=0.866403858469*x[0]**o + (-0.300447644264)*x[0] + (-0.26958481964)*x[1]**o + (-0.362162715036)*x[1]
        ref[(0, 2, 1)]=0.866403858469*x_ref[0]**o + (-0.300447644264)*x_ref[0] + (-0.26958481964)*x_ref[1]**o + (-0.362162715036)*x_ref[1]
        arg[(0, 2, 2)]=0.224735225916*x[0]**o + (0.629020851499)*x[0] + (0.265800063152)*x[1]**o + (-0.956392579127)*x[1]
        ref[(0, 2, 2)]=0.224735225916*x_ref[0]**o + (0.629020851499)*x_ref[0] + (0.265800063152)*x_ref[1]**o + (-0.956392579127)*x_ref[1]
        arg[(0, 2, 3)]=-0.553302752791*x[0]**o + (0.823330444908)*x[0] + (-0.995383529468)*x[1]**o + (0.0215082181763)*x[1]
        ref[(0, 2, 3)]=-0.553302752791*x_ref[0]**o + (0.823330444908)*x_ref[0] + (-0.995383529468)*x_ref[1]**o + (0.0215082181763)*x_ref[1]
        arg[(0, 3, 0)]=0.43222465862*x[0]**o + (-0.772399248726)*x[0] + (0.0771374296292)*x[1]**o + (0.562774742861)*x[1]
        ref[(0, 3, 0)]=0.43222465862*x_ref[0]**o + (-0.772399248726)*x_ref[0] + (0.0771374296292)*x_ref[1]**o + (0.562774742861)*x_ref[1]
        arg[(0, 3, 1)]=-0.605777730718*x[0]**o + (-0.703657591003)*x[0] + (-0.494142949881)*x[1]**o + (0.877633027306)*x[1]
        ref[(0, 3, 1)]=-0.605777730718*x_ref[0]**o + (-0.703657591003)*x_ref[0] + (-0.494142949881)*x_ref[1]**o + (0.877633027306)*x_ref[1]
        arg[(0, 3, 2)]=-0.924639257665*x[0]**o + (-0.342828359606)*x[0] + (0.706965280229)*x[1]**o + (-0.578604905821)*x[1]
        ref[(0, 3, 2)]=-0.924639257665*x_ref[0]**o + (-0.342828359606)*x_ref[0] + (0.706965280229)*x_ref[1]**o + (-0.578604905821)*x_ref[1]
        arg[(0, 3, 3)]=-0.627349928588*x[0]**o + (0.481955222978)*x[0] + (-0.154628979164)*x[1]**o + (-0.340574216612)*x[1]
        ref[(0, 3, 3)]=-0.627349928588*x_ref[0]**o + (0.481955222978)*x_ref[0] + (-0.154628979164)*x_ref[1]**o + (-0.340574216612)*x_ref[1]
        arg[(1, 0, 0)]=0.657951855958*x[0]**o + (0.706846733457)*x[0] + (0.574928281817)*x[1]**o + (-0.674213824782)*x[1]
        ref[(1, 0, 0)]=0.657951855958*x_ref[0]**o + (0.706846733457)*x_ref[0] + (0.574928281817)*x_ref[1]**o + (-0.674213824782)*x_ref[1]
        arg[(1, 0, 1)]=-0.612904230714*x[0]**o + (0.055843476907)*x[0] + (-0.928648193198)*x[1]**o + (0.229474485006)*x[1]
        ref[(1, 0, 1)]=-0.612904230714*x_ref[0]**o + (0.055843476907)*x_ref[0] + (-0.928648193198)*x_ref[1]**o + (0.229474485006)*x_ref[1]
        arg[(1, 0, 2)]=0.376064026391*x[0]**o + (0.11530036853)*x[0] + (-0.61877856641)*x[1]**o + (0.632768522517)*x[1]
        ref[(1, 0, 2)]=0.376064026391*x_ref[0]**o + (0.11530036853)*x_ref[0] + (-0.61877856641)*x_ref[1]**o + (0.632768522517)*x_ref[1]
        arg[(1, 0, 3)]=0.727918327305*x[0]**o + (-0.597269449377)*x[0] + (-0.380148661855)*x[1]**o + (-0.620073724196)*x[1]
        ref[(1, 0, 3)]=0.727918327305*x_ref[0]**o + (-0.597269449377)*x_ref[0] + (-0.380148661855)*x_ref[1]**o + (-0.620073724196)*x_ref[1]
        arg[(1, 1, 0)]=-0.201033071542*x[0]**o + (0.67208341049)*x[0] + (0.283485673404)*x[1]**o + (-0.438122808924)*x[1]
        ref[(1, 1, 0)]=-0.201033071542*x_ref[0]**o + (0.67208341049)*x_ref[0] + (0.283485673404)*x_ref[1]**o + (-0.438122808924)*x_ref[1]
        arg[(1, 1, 1)]=-0.788484553443*x[0]**o + (-0.0918120570184)*x[0] + (0.668962833644)*x[1]**o + (-0.331281291319)*x[1]
        ref[(1, 1, 1)]=-0.788484553443*x_ref[0]**o + (-0.0918120570184)*x_ref[0] + (0.668962833644)*x_ref[1]**o + (-0.331281291319)*x_ref[1]
        arg[(1, 1, 2)]=0.492036161321*x[0]**o + (0.074932627897)*x[0] + (0.729237298296)*x[1]**o + (-0.140793593934)*x[1]
        ref[(1, 1, 2)]=0.492036161321*x_ref[0]**o + (0.074932627897)*x_ref[0] + (0.729237298296)*x_ref[1]**o + (-0.140793593934)*x_ref[1]
        arg[(1, 1, 3)]=0.345581906807*x[0]**o + (-0.891468645073)*x[0] + (-0.373581751983)*x[1]**o + (-0.994317320191)*x[1]
        ref[(1, 1, 3)]=0.345581906807*x_ref[0]**o + (-0.891468645073)*x_ref[0] + (-0.373581751983)*x_ref[1]**o + (-0.994317320191)*x_ref[1]
        arg[(1, 2, 0)]=0.707786140575*x[0]**o + (0.334662075499)*x[0] + (-0.937661258281)*x[1]**o + (0.970561770202)*x[1]
        ref[(1, 2, 0)]=0.707786140575*x_ref[0]**o + (0.334662075499)*x_ref[0] + (-0.937661258281)*x_ref[1]**o + (0.970561770202)*x_ref[1]
        arg[(1, 2, 1)]=-0.427660671099*x[0]**o + (-0.158454826151)*x[0] + (0.631731929984)*x[1]**o + (0.674219589996)*x[1]
        ref[(1, 2, 1)]=-0.427660671099*x_ref[0]**o + (-0.158454826151)*x_ref[0] + (0.631731929984)*x_ref[1]**o + (0.674219589996)*x_ref[1]
        arg[(1, 2, 2)]=0.939935425106*x[0]**o + (0.0683809815342)*x[0] + (-0.502597232439)*x[1]**o + (-0.515121364994)*x[1]
        ref[(1, 2, 2)]=0.939935425106*x_ref[0]**o + (0.0683809815342)*x_ref[0] + (-0.502597232439)*x_ref[1]**o + (-0.515121364994)*x_ref[1]
        arg[(1, 2, 3)]=0.837295769411*x[0]**o + (-0.213581749832)*x[0] + (-0.11413994556)*x[1]**o + (-0.363192485476)*x[1]
        ref[(1, 2, 3)]=0.837295769411*x_ref[0]**o + (-0.213581749832)*x_ref[0] + (-0.11413994556)*x_ref[1]**o + (-0.363192485476)*x_ref[1]
        arg[(1, 3, 0)]=-0.906099000992*x[0]**o + (0.41582510293)*x[0] + (-0.425036402803)*x[1]**o + (0.529038756743)*x[1]
        ref[(1, 3, 0)]=-0.906099000992*x_ref[0]**o + (0.41582510293)*x_ref[0] + (-0.425036402803)*x_ref[1]**o + (0.529038756743)*x_ref[1]
        arg[(1, 3, 1)]=0.00347917700468*x[0]**o + (-0.314157293828)*x[0] + (0.129417838544)*x[1]**o + (0.244391214969)*x[1]
        ref[(1, 3, 1)]=0.00347917700468*x_ref[0]**o + (-0.314157293828)*x_ref[0] + (0.129417838544)*x_ref[1]**o + (0.244391214969)*x_ref[1]
        arg[(1, 3, 2)]=-0.125131619115*x[0]**o + (-0.311814852346)*x[0] + (-0.600769388959)*x[1]**o + (0.17121978936)*x[1]
        ref[(1, 3, 2)]=-0.125131619115*x_ref[0]**o + (-0.311814852346)*x_ref[0] + (-0.600769388959)*x_ref[1]**o + (0.17121978936)*x_ref[1]
        arg[(1, 3, 3)]=-0.0197582913631*x[0]**o + (-0.881378342237)*x[0] + (0.023766547644)*x[1]**o + (-0.621087288446)*x[1]
        ref[(1, 3, 3)]=-0.0197582913631*x_ref[0]**o + (-0.881378342237)*x_ref[0] + (0.023766547644)*x_ref[1]**o + (-0.621087288446)*x_ref[1]
        arg[(2, 0, 0)]=0.93135408621*x[0]**o + (-0.721370175081)*x[0] + (0.01956545011)*x[1]**o + (0.425277511016)*x[1]
        ref[(2, 0, 0)]=0.93135408621*x_ref[0]**o + (-0.721370175081)*x_ref[0] + (0.01956545011)*x_ref[1]**o + (0.425277511016)*x_ref[1]
        arg[(2, 0, 1)]=0.108834511245*x[0]**o + (-0.365516563453)*x[0] + (-0.315695516603)*x[1]**o + (0.979820735783)*x[1]
        ref[(2, 0, 1)]=0.108834511245*x_ref[0]**o + (-0.365516563453)*x_ref[0] + (-0.315695516603)*x_ref[1]**o + (0.979820735783)*x_ref[1]
        arg[(2, 0, 2)]=0.9126811747*x[0]**o + (-0.917502401059)*x[0] + (-0.552935415728)*x[1]**o + (0.287515187426)*x[1]
        ref[(2, 0, 2)]=0.9126811747*x_ref[0]**o + (-0.917502401059)*x_ref[0] + (-0.552935415728)*x_ref[1]**o + (0.287515187426)*x_ref[1]
        arg[(2, 0, 3)]=0.443144333077*x[0]**o + (0.627597368223)*x[0] + (0.628614677249)*x[1]**o + (0.664766286013)*x[1]
        ref[(2, 0, 3)]=0.443144333077*x_ref[0]**o + (0.627597368223)*x_ref[0] + (0.628614677249)*x_ref[1]**o + (0.664766286013)*x_ref[1]
        arg[(2, 1, 0)]=-0.827459387556*x[0]**o + (0.410784767334)*x[0] + (-0.297692873979)*x[1]**o + (-0.339480313006)*x[1]
        ref[(2, 1, 0)]=-0.827459387556*x_ref[0]**o + (0.410784767334)*x_ref[0] + (-0.297692873979)*x_ref[1]**o + (-0.339480313006)*x_ref[1]
        arg[(2, 1, 1)]=0.662912696511*x[0]**o + (-0.148596165496)*x[0] + (-0.40475377168)*x[1]**o + (0.776216895877)*x[1]
        ref[(2, 1, 1)]=0.662912696511*x_ref[0]**o + (-0.148596165496)*x_ref[0] + (-0.40475377168)*x_ref[1]**o + (0.776216895877)*x_ref[1]
        arg[(2, 1, 2)]=-0.92501412108*x[0]**o + (0.203743600584)*x[0] + (0.937087888137)*x[1]**o + (-0.981996122331)*x[1]
        ref[(2, 1, 2)]=-0.92501412108*x_ref[0]**o + (0.203743600584)*x_ref[0] + (0.937087888137)*x_ref[1]**o + (-0.981996122331)*x_ref[1]
        arg[(2, 1, 3)]=-0.49903799192*x[0]**o + (-0.142041300345)*x[0] + (-0.271888451317)*x[1]**o + (-0.580793614069)*x[1]
        ref[(2, 1, 3)]=-0.49903799192*x_ref[0]**o + (-0.142041300345)*x_ref[0] + (-0.271888451317)*x_ref[1]**o + (-0.580793614069)*x_ref[1]
        arg[(2, 2, 0)]=0.858335877724*x[0]**o + (-0.398230613192)*x[0] + (-0.248382603402)*x[1]**o + (0.972257311852)*x[1]
        ref[(2, 2, 0)]=0.858335877724*x_ref[0]**o + (-0.398230613192)*x_ref[0] + (-0.248382603402)*x_ref[1]**o + (0.972257311852)*x_ref[1]
        arg[(2, 2, 1)]=-0.102823477071*x[0]**o + (0.408476591692)*x[0] + (-0.24921580902)*x[1]**o + (0.961942892319)*x[1]
        ref[(2, 2, 1)]=-0.102823477071*x_ref[0]**o + (0.408476591692)*x_ref[0] + (-0.24921580902)*x_ref[1]**o + (0.961942892319)*x_ref[1]
        arg[(2, 2, 2)]=0.885742602255*x[0]**o + (0.469922404829)*x[0] + (0.580916965995)*x[1]**o + (-0.455905186185)*x[1]
        ref[(2, 2, 2)]=0.885742602255*x_ref[0]**o + (0.469922404829)*x_ref[0] + (0.580916965995)*x_ref[1]**o + (-0.455905186185)*x_ref[1]
        arg[(2, 2, 3)]=-0.259006602096*x[0]**o + (0.456437694575)*x[0] + (-0.908783718613)*x[1]**o + (-0.790710700238)*x[1]
        ref[(2, 2, 3)]=-0.259006602096*x_ref[0]**o + (0.456437694575)*x_ref[0] + (-0.908783718613)*x_ref[1]**o + (-0.790710700238)*x_ref[1]
        arg[(2, 3, 0)]=0.155253535192*x[0]**o + (0.928713318084)*x[0] + (-0.318742947558)*x[1]**o + (-0.983198879148)*x[1]
        ref[(2, 3, 0)]=0.155253535192*x_ref[0]**o + (0.928713318084)*x_ref[0] + (-0.318742947558)*x_ref[1]**o + (-0.983198879148)*x_ref[1]
        arg[(2, 3, 1)]=-0.345455538339*x[0]**o + (-0.913596930492)*x[0] + (-0.227033450061)*x[1]**o + (0.392635150938)*x[1]
        ref[(2, 3, 1)]=-0.345455538339*x_ref[0]**o + (-0.913596930492)*x_ref[0] + (-0.227033450061)*x_ref[1]**o + (0.392635150938)*x_ref[1]
        arg[(2, 3, 2)]=0.893024636108*x[0]**o + (-0.768573505968)*x[0] + (0.558178657044)*x[1]**o + (-0.925356312821)*x[1]
        ref[(2, 3, 2)]=0.893024636108*x_ref[0]**o + (-0.768573505968)*x_ref[0] + (0.558178657044)*x_ref[1]**o + (-0.925356312821)*x_ref[1]
        arg[(2, 3, 3)]=-0.95908413944*x[0]**o + (-0.637131000077)*x[0] + (0.715706311047)*x[1]**o + (-0.176858078844)*x[1]
        ref[(2, 3, 3)]=-0.95908413944*x_ref[0]**o + (-0.637131000077)*x_ref[0] + (0.715706311047)*x_ref[1]**o + (-0.176858078844)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.641737550786*x[2]**o + (0.488921310853)*x[2]
            ref[(0, 0, 0)]+=-0.641737550786*x_ref[2]**o + (0.488921310853)*x_ref[2]
            arg[(0, 0, 1)]+=-0.313438520382*x[2]**o + (0.992025227604)*x[2]
            ref[(0, 0, 1)]+=-0.313438520382*x_ref[2]**o + (0.992025227604)*x_ref[2]
            arg[(0, 0, 2)]+=-0.343442659173*x[2]**o + (-0.525276594533)*x[2]
            ref[(0, 0, 2)]+=-0.343442659173*x_ref[2]**o + (-0.525276594533)*x_ref[2]
            arg[(0, 0, 3)]+=-0.113018534019*x[2]**o + (0.171794836477)*x[2]
            ref[(0, 0, 3)]+=-0.113018534019*x_ref[2]**o + (0.171794836477)*x_ref[2]
            arg[(0, 1, 0)]+=-0.22640701526*x[2]**o + (0.352517742612)*x[2]
            ref[(0, 1, 0)]+=-0.22640701526*x_ref[2]**o + (0.352517742612)*x_ref[2]
            arg[(0, 1, 1)]+=-0.425788096856*x[2]**o + (-0.160012725402)*x[2]
            ref[(0, 1, 1)]+=-0.425788096856*x_ref[2]**o + (-0.160012725402)*x_ref[2]
            arg[(0, 1, 2)]+=-0.840765498295*x[2]**o + (0.290493117521)*x[2]
            ref[(0, 1, 2)]+=-0.840765498295*x_ref[2]**o + (0.290493117521)*x_ref[2]
            arg[(0, 1, 3)]+=0.795845255066*x[2]**o + (0.837374489095)*x[2]
            ref[(0, 1, 3)]+=0.795845255066*x_ref[2]**o + (0.837374489095)*x_ref[2]
            arg[(0, 2, 0)]+=0.385029443664*x[2]**o + (-0.981274983694)*x[2]
            ref[(0, 2, 0)]+=0.385029443664*x_ref[2]**o + (-0.981274983694)*x_ref[2]
            arg[(0, 2, 1)]+=-0.827622737993*x[2]**o + (-0.435200623119)*x[2]
            ref[(0, 2, 1)]+=-0.827622737993*x_ref[2]**o + (-0.435200623119)*x_ref[2]
            arg[(0, 2, 2)]+=0.821415949654*x[2]**o + (0.486140218821)*x[2]
            ref[(0, 2, 2)]+=0.821415949654*x_ref[2]**o + (0.486140218821)*x_ref[2]
            arg[(0, 2, 3)]+=0.0228021993967*x[2]**o + (-0.985197419643)*x[2]
            ref[(0, 2, 3)]+=0.0228021993967*x_ref[2]**o + (-0.985197419643)*x_ref[2]
            arg[(0, 3, 0)]+=0.977208318252*x[2]**o + (0.25987766936)*x[2]
            ref[(0, 3, 0)]+=0.977208318252*x_ref[2]**o + (0.25987766936)*x_ref[2]
            arg[(0, 3, 1)]+=-0.586070763742*x[2]**o + (0.997943272045)*x[2]
            ref[(0, 3, 1)]+=-0.586070763742*x_ref[2]**o + (0.997943272045)*x_ref[2]
            arg[(0, 3, 2)]+=0.940829114411*x[2]**o + (0.754466068802)*x[2]
            ref[(0, 3, 2)]+=0.940829114411*x_ref[2]**o + (0.754466068802)*x_ref[2]
            arg[(0, 3, 3)]+=0.996023425819*x[2]**o + (0.0633389183816)*x[2]
            ref[(0, 3, 3)]+=0.996023425819*x_ref[2]**o + (0.0633389183816)*x_ref[2]
            arg[(1, 0, 0)]+=-0.0598560111808*x[2]**o + (-0.873707173319)*x[2]
            ref[(1, 0, 0)]+=-0.0598560111808*x_ref[2]**o + (-0.873707173319)*x_ref[2]
            arg[(1, 0, 1)]+=0.646664138739*x[2]**o + (-0.33505905431)*x[2]
            ref[(1, 0, 1)]+=0.646664138739*x_ref[2]**o + (-0.33505905431)*x_ref[2]
            arg[(1, 0, 2)]+=0.172988422104*x[2]**o + (0.0472355421456)*x[2]
            ref[(1, 0, 2)]+=0.172988422104*x_ref[2]**o + (0.0472355421456)*x_ref[2]
            arg[(1, 0, 3)]+=0.623618752449*x[2]**o + (-0.488116843092)*x[2]
            ref[(1, 0, 3)]+=0.623618752449*x_ref[2]**o + (-0.488116843092)*x_ref[2]
            arg[(1, 1, 0)]+=0.738914719146*x[2]**o + (0.0660301102493)*x[2]
            ref[(1, 1, 0)]+=0.738914719146*x_ref[2]**o + (0.0660301102493)*x_ref[2]
            arg[(1, 1, 1)]+=0.0427284334646*x[2]**o + (0.148848821917)*x[2]
            ref[(1, 1, 1)]+=0.0427284334646*x_ref[2]**o + (0.148848821917)*x_ref[2]
            arg[(1, 1, 2)]+=-0.444278377596*x[2]**o + (0.792447913641)*x[2]
            ref[(1, 1, 2)]+=-0.444278377596*x_ref[2]**o + (0.792447913641)*x_ref[2]
            arg[(1, 1, 3)]+=0.516756745303*x[2]**o + (0.542200026586)*x[2]
            ref[(1, 1, 3)]+=0.516756745303*x_ref[2]**o + (0.542200026586)*x_ref[2]
            arg[(1, 2, 0)]+=-0.787007309567*x[2]**o + (-0.376807551177)*x[2]
            ref[(1, 2, 0)]+=-0.787007309567*x_ref[2]**o + (-0.376807551177)*x_ref[2]
            arg[(1, 2, 1)]+=0.67399872443*x[2]**o + (-0.0375013399141)*x[2]
            ref[(1, 2, 1)]+=0.67399872443*x_ref[2]**o + (-0.0375013399141)*x_ref[2]
            arg[(1, 2, 2)]+=-0.930447543613*x[2]**o + (0.415052681284)*x[2]
            ref[(1, 2, 2)]+=-0.930447543613*x_ref[2]**o + (0.415052681284)*x_ref[2]
            arg[(1, 2, 3)]+=-0.646742078477*x[2]**o + (-0.170131719615)*x[2]
            ref[(1, 2, 3)]+=-0.646742078477*x_ref[2]**o + (-0.170131719615)*x_ref[2]
            arg[(1, 3, 0)]+=0.307346310596*x[2]**o + (-0.636098236631)*x[2]
            ref[(1, 3, 0)]+=0.307346310596*x_ref[2]**o + (-0.636098236631)*x_ref[2]
            arg[(1, 3, 1)]+=0.903620459421*x[2]**o + (-0.481828100297)*x[2]
            ref[(1, 3, 1)]+=0.903620459421*x_ref[2]**o + (-0.481828100297)*x_ref[2]
            arg[(1, 3, 2)]+=-0.0370973454381*x[2]**o + (-0.202706143136)*x[2]
            ref[(1, 3, 2)]+=-0.0370973454381*x_ref[2]**o + (-0.202706143136)*x_ref[2]
            arg[(1, 3, 3)]+=-0.93743935246*x[2]**o + (0.602039425808)*x[2]
            ref[(1, 3, 3)]+=-0.93743935246*x_ref[2]**o + (0.602039425808)*x_ref[2]
            arg[(2, 0, 0)]+=0.410084596045*x[2]**o + (0.533510212928)*x[2]
            ref[(2, 0, 0)]+=0.410084596045*x_ref[2]**o + (0.533510212928)*x_ref[2]
            arg[(2, 0, 1)]+=0.70079709576*x[2]**o + (-0.865145599736)*x[2]
            ref[(2, 0, 1)]+=0.70079709576*x_ref[2]**o + (-0.865145599736)*x_ref[2]
            arg[(2, 0, 2)]+=-0.702699052799*x[2]**o + (-0.0952291841322)*x[2]
            ref[(2, 0, 2)]+=-0.702699052799*x_ref[2]**o + (-0.0952291841322)*x_ref[2]
            arg[(2, 0, 3)]+=-0.550049938786*x[2]**o + (0.188576021667)*x[2]
            ref[(2, 0, 3)]+=-0.550049938786*x_ref[2]**o + (0.188576021667)*x_ref[2]
            arg[(2, 1, 0)]+=-0.34848587612*x[2]**o + (-0.687492925703)*x[2]
            ref[(2, 1, 0)]+=-0.34848587612*x_ref[2]**o + (-0.687492925703)*x_ref[2]
            arg[(2, 1, 1)]+=0.995477360989*x[2]**o + (0.629196828391)*x[2]
            ref[(2, 1, 1)]+=0.995477360989*x_ref[2]**o + (0.629196828391)*x_ref[2]
            arg[(2, 1, 2)]+=-0.586029899217*x[2]**o + (-0.711500395735)*x[2]
            ref[(2, 1, 2)]+=-0.586029899217*x_ref[2]**o + (-0.711500395735)*x_ref[2]
            arg[(2, 1, 3)]+=0.7234398573*x[2]**o + (0.938004152955)*x[2]
            ref[(2, 1, 3)]+=0.7234398573*x_ref[2]**o + (0.938004152955)*x_ref[2]
            arg[(2, 2, 0)]+=0.561441549952*x[2]**o + (-0.701126861928)*x[2]
            ref[(2, 2, 0)]+=0.561441549952*x_ref[2]**o + (-0.701126861928)*x_ref[2]
            arg[(2, 2, 1)]+=-0.477794545452*x[2]**o + (-0.162614155046)*x[2]
            ref[(2, 2, 1)]+=-0.477794545452*x_ref[2]**o + (-0.162614155046)*x_ref[2]
            arg[(2, 2, 2)]+=-0.546791653638*x[2]**o + (0.327148612672)*x[2]
            ref[(2, 2, 2)]+=-0.546791653638*x_ref[2]**o + (0.327148612672)*x_ref[2]
            arg[(2, 2, 3)]+=-0.18788219457*x[2]**o + (-0.650366512223)*x[2]
            ref[(2, 2, 3)]+=-0.18788219457*x_ref[2]**o + (-0.650366512223)*x_ref[2]
            arg[(2, 3, 0)]+=-0.0984165720518*x[2]**o + (0.0886346297964)*x[2]
            ref[(2, 3, 0)]+=-0.0984165720518*x_ref[2]**o + (0.0886346297964)*x_ref[2]
            arg[(2, 3, 1)]+=0.280295596485*x[2]**o + (0.526499903833)*x[2]
            ref[(2, 3, 1)]+=0.280295596485*x_ref[2]**o + (0.526499903833)*x_ref[2]
            arg[(2, 3, 2)]+=-0.43122605267*x[2]**o + (-0.694160766478)*x[2]
            ref[(2, 3, 2)]+=-0.43122605267*x_ref[2]**o + (-0.694160766478)*x_ref[2]
            arg[(2, 3, 3)]+=-0.996711072296*x[2]**o + (-0.0482308289872)*x[2]
            ref[(2, 3, 3)]+=-0.996711072296*x_ref[2]**o + (-0.0482308289872)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 2, 3),w)
        ref = Data(0,(3, 3, 2, 3),w_ref)
        arg[(0, 0, 0, 0)]=-0.0318805155471*x[0]**o + (-0.499117251548)*x[0] + (0.52744053906)*x[1]**o + (-0.655722915931)*x[1]
        ref[(0, 0, 0, 0)]=-0.0318805155471*x_ref[0]**o + (-0.499117251548)*x_ref[0] + (0.52744053906)*x_ref[1]**o + (-0.655722915931)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.0955586709496*x[0]**o + (-0.705866705723)*x[0] + (-0.582480579066)*x[1]**o + (0.00401025061252)*x[1]
        ref[(0, 0, 0, 1)]=0.0955586709496*x_ref[0]**o + (-0.705866705723)*x_ref[0] + (-0.582480579066)*x_ref[1]**o + (0.00401025061252)*x_ref[1]
        arg[(0, 0, 0, 2)]=0.143802099233*x[0]**o + (0.0898767973948)*x[0] + (0.506045706907)*x[1]**o + (0.894718637325)*x[1]
        ref[(0, 0, 0, 2)]=0.143802099233*x_ref[0]**o + (0.0898767973948)*x_ref[0] + (0.506045706907)*x_ref[1]**o + (0.894718637325)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.25292705724*x[0]**o + (0.913963723905)*x[0] + (0.86909938799)*x[1]**o + (0.712924504042)*x[1]
        ref[(0, 0, 1, 0)]=-0.25292705724*x_ref[0]**o + (0.913963723905)*x_ref[0] + (0.86909938799)*x_ref[1]**o + (0.712924504042)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.755947918543*x[0]**o + (0.975947691947)*x[0] + (-0.252591843604)*x[1]**o + (-0.483972020163)*x[1]
        ref[(0, 0, 1, 1)]=0.755947918543*x_ref[0]**o + (0.975947691947)*x_ref[0] + (-0.252591843604)*x_ref[1]**o + (-0.483972020163)*x_ref[1]
        arg[(0, 0, 1, 2)]=0.720955255508*x[0]**o + (0.606414870531)*x[0] + (0.931270679119)*x[1]**o + (-0.191355071086)*x[1]
        ref[(0, 0, 1, 2)]=0.720955255508*x_ref[0]**o + (0.606414870531)*x_ref[0] + (0.931270679119)*x_ref[1]**o + (-0.191355071086)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.053453524942*x[0]**o + (-0.940669528576)*x[0] + (0.598287281985)*x[1]**o + (-0.381533344029)*x[1]
        ref[(0, 1, 0, 0)]=-0.053453524942*x_ref[0]**o + (-0.940669528576)*x_ref[0] + (0.598287281985)*x_ref[1]**o + (-0.381533344029)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.424231655891*x[0]**o + (0.214047443035)*x[0] + (0.732075993216)*x[1]**o + (0.677835609584)*x[1]
        ref[(0, 1, 0, 1)]=0.424231655891*x_ref[0]**o + (0.214047443035)*x_ref[0] + (0.732075993216)*x_ref[1]**o + (0.677835609584)*x_ref[1]
        arg[(0, 1, 0, 2)]=-0.532231289805*x[0]**o + (-0.40376824886)*x[0] + (0.790175443801)*x[1]**o + (-0.740135794091)*x[1]
        ref[(0, 1, 0, 2)]=-0.532231289805*x_ref[0]**o + (-0.40376824886)*x_ref[0] + (0.790175443801)*x_ref[1]**o + (-0.740135794091)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.366704788183*x[0]**o + (-0.685669422037)*x[0] + (0.821557888479)*x[1]**o + (0.768287421783)*x[1]
        ref[(0, 1, 1, 0)]=-0.366704788183*x_ref[0]**o + (-0.685669422037)*x_ref[0] + (0.821557888479)*x_ref[1]**o + (0.768287421783)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.0861949030096*x[0]**o + (-0.084935255057)*x[0] + (0.53169126584)*x[1]**o + (0.634560974033)*x[1]
        ref[(0, 1, 1, 1)]=-0.0861949030096*x_ref[0]**o + (-0.084935255057)*x_ref[0] + (0.53169126584)*x_ref[1]**o + (0.634560974033)*x_ref[1]
        arg[(0, 1, 1, 2)]=0.922481901683*x[0]**o + (0.743555704223)*x[0] + (0.15519828037)*x[1]**o + (-0.395145067931)*x[1]
        ref[(0, 1, 1, 2)]=0.922481901683*x_ref[0]**o + (0.743555704223)*x_ref[0] + (0.15519828037)*x_ref[1]**o + (-0.395145067931)*x_ref[1]
        arg[(0, 2, 0, 0)]=-0.591928215634*x[0]**o + (-0.332567632996)*x[0] + (0.815305378507)*x[1]**o + (-0.199511126356)*x[1]
        ref[(0, 2, 0, 0)]=-0.591928215634*x_ref[0]**o + (-0.332567632996)*x_ref[0] + (0.815305378507)*x_ref[1]**o + (-0.199511126356)*x_ref[1]
        arg[(0, 2, 0, 1)]=0.235616389343*x[0]**o + (-0.104296925852)*x[0] + (0.355857973118)*x[1]**o + (-0.218805945961)*x[1]
        ref[(0, 2, 0, 1)]=0.235616389343*x_ref[0]**o + (-0.104296925852)*x_ref[0] + (0.355857973118)*x_ref[1]**o + (-0.218805945961)*x_ref[1]
        arg[(0, 2, 0, 2)]=0.129277696712*x[0]**o + (-0.763771384229)*x[0] + (-0.871289791062)*x[1]**o + (-0.995802119438)*x[1]
        ref[(0, 2, 0, 2)]=0.129277696712*x_ref[0]**o + (-0.763771384229)*x_ref[0] + (-0.871289791062)*x_ref[1]**o + (-0.995802119438)*x_ref[1]
        arg[(0, 2, 1, 0)]=0.895894253646*x[0]**o + (-0.326714500019)*x[0] + (-0.00167957640935)*x[1]**o + (-0.071466011922)*x[1]
        ref[(0, 2, 1, 0)]=0.895894253646*x_ref[0]**o + (-0.326714500019)*x_ref[0] + (-0.00167957640935)*x_ref[1]**o + (-0.071466011922)*x_ref[1]
        arg[(0, 2, 1, 1)]=-0.768024586914*x[0]**o + (0.621013631804)*x[0] + (-0.165824054634)*x[1]**o + (-0.956374511329)*x[1]
        ref[(0, 2, 1, 1)]=-0.768024586914*x_ref[0]**o + (0.621013631804)*x_ref[0] + (-0.165824054634)*x_ref[1]**o + (-0.956374511329)*x_ref[1]
        arg[(0, 2, 1, 2)]=0.822424726206*x[0]**o + (0.715520452224)*x[0] + (-0.594124319513)*x[1]**o + (0.465192715915)*x[1]
        ref[(0, 2, 1, 2)]=0.822424726206*x_ref[0]**o + (0.715520452224)*x_ref[0] + (-0.594124319513)*x_ref[1]**o + (0.465192715915)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.208425068869*x[0]**o + (-0.572559490236)*x[0] + (-0.0283823835203)*x[1]**o + (0.233233011312)*x[1]
        ref[(1, 0, 0, 0)]=0.208425068869*x_ref[0]**o + (-0.572559490236)*x_ref[0] + (-0.0283823835203)*x_ref[1]**o + (0.233233011312)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.109230080532*x[0]**o + (0.43758148193)*x[0] + (0.779060214446)*x[1]**o + (0.617295227987)*x[1]
        ref[(1, 0, 0, 1)]=-0.109230080532*x_ref[0]**o + (0.43758148193)*x_ref[0] + (0.779060214446)*x_ref[1]**o + (0.617295227987)*x_ref[1]
        arg[(1, 0, 0, 2)]=-0.153821452877*x[0]**o + (0.0464539594873)*x[0] + (-0.840490540438)*x[1]**o + (-0.548571893046)*x[1]
        ref[(1, 0, 0, 2)]=-0.153821452877*x_ref[0]**o + (0.0464539594873)*x_ref[0] + (-0.840490540438)*x_ref[1]**o + (-0.548571893046)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.309249671169*x[0]**o + (-0.989200844932)*x[0] + (0.989889268701)*x[1]**o + (-0.439091609102)*x[1]
        ref[(1, 0, 1, 0)]=-0.309249671169*x_ref[0]**o + (-0.989200844932)*x_ref[0] + (0.989889268701)*x_ref[1]**o + (-0.439091609102)*x_ref[1]
        arg[(1, 0, 1, 1)]=-0.430647739803*x[0]**o + (-0.210406385946)*x[0] + (-0.179466121717)*x[1]**o + (0.482873334381)*x[1]
        ref[(1, 0, 1, 1)]=-0.430647739803*x_ref[0]**o + (-0.210406385946)*x_ref[0] + (-0.179466121717)*x_ref[1]**o + (0.482873334381)*x_ref[1]
        arg[(1, 0, 1, 2)]=-0.105759089131*x[0]**o + (-0.361794405074)*x[0] + (-0.58590664762)*x[1]**o + (0.94042121812)*x[1]
        ref[(1, 0, 1, 2)]=-0.105759089131*x_ref[0]**o + (-0.361794405074)*x_ref[0] + (-0.58590664762)*x_ref[1]**o + (0.94042121812)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.308141275714*x[0]**o + (0.392537010874)*x[0] + (0.202191903867)*x[1]**o + (-0.906572245076)*x[1]
        ref[(1, 1, 0, 0)]=-0.308141275714*x_ref[0]**o + (0.392537010874)*x_ref[0] + (0.202191903867)*x_ref[1]**o + (-0.906572245076)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.769640153468*x[0]**o + (-0.627874616006)*x[0] + (-0.97303517254)*x[1]**o + (0.431899302942)*x[1]
        ref[(1, 1, 0, 1)]=0.769640153468*x_ref[0]**o + (-0.627874616006)*x_ref[0] + (-0.97303517254)*x_ref[1]**o + (0.431899302942)*x_ref[1]
        arg[(1, 1, 0, 2)]=-0.516006280542*x[0]**o + (-0.97461149988)*x[0] + (0.836603951147)*x[1]**o + (-0.977025870239)*x[1]
        ref[(1, 1, 0, 2)]=-0.516006280542*x_ref[0]**o + (-0.97461149988)*x_ref[0] + (0.836603951147)*x_ref[1]**o + (-0.977025870239)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.396083102925*x[0]**o + (-0.329431182691)*x[0] + (-0.795717120229)*x[1]**o + (-0.23192515908)*x[1]
        ref[(1, 1, 1, 0)]=-0.396083102925*x_ref[0]**o + (-0.329431182691)*x_ref[0] + (-0.795717120229)*x_ref[1]**o + (-0.23192515908)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.697590869873*x[0]**o + (0.983747297359)*x[0] + (-0.741915535783)*x[1]**o + (0.082304774991)*x[1]
        ref[(1, 1, 1, 1)]=-0.697590869873*x_ref[0]**o + (0.983747297359)*x_ref[0] + (-0.741915535783)*x_ref[1]**o + (0.082304774991)*x_ref[1]
        arg[(1, 1, 1, 2)]=0.372901803287*x[0]**o + (0.284757800537)*x[0] + (0.369306275381)*x[1]**o + (0.585102277081)*x[1]
        ref[(1, 1, 1, 2)]=0.372901803287*x_ref[0]**o + (0.284757800537)*x_ref[0] + (0.369306275381)*x_ref[1]**o + (0.585102277081)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.626966462879*x[0]**o + (-0.448791309197)*x[0] + (-0.00409750416145)*x[1]**o + (0.0118885813816)*x[1]
        ref[(1, 2, 0, 0)]=-0.626966462879*x_ref[0]**o + (-0.448791309197)*x_ref[0] + (-0.00409750416145)*x_ref[1]**o + (0.0118885813816)*x_ref[1]
        arg[(1, 2, 0, 1)]=-0.0501459800815*x[0]**o + (-0.0779566508231)*x[0] + (-0.14238507657)*x[1]**o + (-0.0841556236338)*x[1]
        ref[(1, 2, 0, 1)]=-0.0501459800815*x_ref[0]**o + (-0.0779566508231)*x_ref[0] + (-0.14238507657)*x_ref[1]**o + (-0.0841556236338)*x_ref[1]
        arg[(1, 2, 0, 2)]=-0.827541555146*x[0]**o + (-0.551709305656)*x[0] + (0.557289066617)*x[1]**o + (0.294223566218)*x[1]
        ref[(1, 2, 0, 2)]=-0.827541555146*x_ref[0]**o + (-0.551709305656)*x_ref[0] + (0.557289066617)*x_ref[1]**o + (0.294223566218)*x_ref[1]
        arg[(1, 2, 1, 0)]=-0.837654386978*x[0]**o + (0.0519307877283)*x[0] + (-0.906861582192)*x[1]**o + (-0.0776988115479)*x[1]
        ref[(1, 2, 1, 0)]=-0.837654386978*x_ref[0]**o + (0.0519307877283)*x_ref[0] + (-0.906861582192)*x_ref[1]**o + (-0.0776988115479)*x_ref[1]
        arg[(1, 2, 1, 1)]=-0.499684037198*x[0]**o + (0.145701108717)*x[0] + (0.203351812671)*x[1]**o + (0.0553439385473)*x[1]
        ref[(1, 2, 1, 1)]=-0.499684037198*x_ref[0]**o + (0.145701108717)*x_ref[0] + (0.203351812671)*x_ref[1]**o + (0.0553439385473)*x_ref[1]
        arg[(1, 2, 1, 2)]=0.754120535068*x[0]**o + (-0.888626448076)*x[0] + (0.093770199704)*x[1]**o + (-0.296846333094)*x[1]
        ref[(1, 2, 1, 2)]=0.754120535068*x_ref[0]**o + (-0.888626448076)*x_ref[0] + (0.093770199704)*x_ref[1]**o + (-0.296846333094)*x_ref[1]
        arg[(2, 0, 0, 0)]=-0.168485058082*x[0]**o + (-0.589338946557)*x[0] + (0.743645371713)*x[1]**o + (0.800112364623)*x[1]
        ref[(2, 0, 0, 0)]=-0.168485058082*x_ref[0]**o + (-0.589338946557)*x_ref[0] + (0.743645371713)*x_ref[1]**o + (0.800112364623)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.350583686443*x[0]**o + (-0.0596627545853)*x[0] + (-0.212422277216)*x[1]**o + (-0.778893549895)*x[1]
        ref[(2, 0, 0, 1)]=0.350583686443*x_ref[0]**o + (-0.0596627545853)*x_ref[0] + (-0.212422277216)*x_ref[1]**o + (-0.778893549895)*x_ref[1]
        arg[(2, 0, 0, 2)]=-0.972275339834*x[0]**o + (-0.968811515235)*x[0] + (-0.999220254428)*x[1]**o + (-0.105573417605)*x[1]
        ref[(2, 0, 0, 2)]=-0.972275339834*x_ref[0]**o + (-0.968811515235)*x_ref[0] + (-0.999220254428)*x_ref[1]**o + (-0.105573417605)*x_ref[1]
        arg[(2, 0, 1, 0)]=-0.928395808785*x[0]**o + (-0.46408619409)*x[0] + (0.521633247047)*x[1]**o + (0.0684758782818)*x[1]
        ref[(2, 0, 1, 0)]=-0.928395808785*x_ref[0]**o + (-0.46408619409)*x_ref[0] + (0.521633247047)*x_ref[1]**o + (0.0684758782818)*x_ref[1]
        arg[(2, 0, 1, 1)]=-0.292595109916*x[0]**o + (-0.867387021047)*x[0] + (0.0487229430919)*x[1]**o + (0.3966051461)*x[1]
        ref[(2, 0, 1, 1)]=-0.292595109916*x_ref[0]**o + (-0.867387021047)*x_ref[0] + (0.0487229430919)*x_ref[1]**o + (0.3966051461)*x_ref[1]
        arg[(2, 0, 1, 2)]=-0.0382603428233*x[0]**o + (0.191632654345)*x[0] + (0.159602302136)*x[1]**o + (-0.385567162519)*x[1]
        ref[(2, 0, 1, 2)]=-0.0382603428233*x_ref[0]**o + (0.191632654345)*x_ref[0] + (0.159602302136)*x_ref[1]**o + (-0.385567162519)*x_ref[1]
        arg[(2, 1, 0, 0)]=-0.388101172886*x[0]**o + (-0.0505857247134)*x[0] + (-0.254169314678)*x[1]**o + (0.701591331991)*x[1]
        ref[(2, 1, 0, 0)]=-0.388101172886*x_ref[0]**o + (-0.0505857247134)*x_ref[0] + (-0.254169314678)*x_ref[1]**o + (0.701591331991)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.564656528002*x[0]**o + (0.511488326832)*x[0] + (-0.00409930013108)*x[1]**o + (0.512057883855)*x[1]
        ref[(2, 1, 0, 1)]=0.564656528002*x_ref[0]**o + (0.511488326832)*x_ref[0] + (-0.00409930013108)*x_ref[1]**o + (0.512057883855)*x_ref[1]
        arg[(2, 1, 0, 2)]=0.460459189321*x[0]**o + (-0.473920002616)*x[0] + (0.32691080905)*x[1]**o + (0.624067454588)*x[1]
        ref[(2, 1, 0, 2)]=0.460459189321*x_ref[0]**o + (-0.473920002616)*x_ref[0] + (0.32691080905)*x_ref[1]**o + (0.624067454588)*x_ref[1]
        arg[(2, 1, 1, 0)]=0.60918690939*x[0]**o + (0.126093388157)*x[0] + (0.350799384253)*x[1]**o + (-0.529916621451)*x[1]
        ref[(2, 1, 1, 0)]=0.60918690939*x_ref[0]**o + (0.126093388157)*x_ref[0] + (0.350799384253)*x_ref[1]**o + (-0.529916621451)*x_ref[1]
        arg[(2, 1, 1, 1)]=-0.326383225773*x[0]**o + (-0.660448872494)*x[0] + (-0.450207852103)*x[1]**o + (-0.0197577475673)*x[1]
        ref[(2, 1, 1, 1)]=-0.326383225773*x_ref[0]**o + (-0.660448872494)*x_ref[0] + (-0.450207852103)*x_ref[1]**o + (-0.0197577475673)*x_ref[1]
        arg[(2, 1, 1, 2)]=-0.0998819630354*x[0]**o + (-0.236962518438)*x[0] + (0.920762152422)*x[1]**o + (0.328376042136)*x[1]
        ref[(2, 1, 1, 2)]=-0.0998819630354*x_ref[0]**o + (-0.236962518438)*x_ref[0] + (0.920762152422)*x_ref[1]**o + (0.328376042136)*x_ref[1]
        arg[(2, 2, 0, 0)]=0.723845079659*x[0]**o + (0.722571405085)*x[0] + (-0.75050240127)*x[1]**o + (-0.848546975514)*x[1]
        ref[(2, 2, 0, 0)]=0.723845079659*x_ref[0]**o + (0.722571405085)*x_ref[0] + (-0.75050240127)*x_ref[1]**o + (-0.848546975514)*x_ref[1]
        arg[(2, 2, 0, 1)]=-0.411348468159*x[0]**o + (-0.863182282027)*x[0] + (-0.553334677117)*x[1]**o + (0.0231552575184)*x[1]
        ref[(2, 2, 0, 1)]=-0.411348468159*x_ref[0]**o + (-0.863182282027)*x_ref[0] + (-0.553334677117)*x_ref[1]**o + (0.0231552575184)*x_ref[1]
        arg[(2, 2, 0, 2)]=-0.577471093799*x[0]**o + (0.135525116149)*x[0] + (0.0560037592199)*x[1]**o + (0.951150002002)*x[1]
        ref[(2, 2, 0, 2)]=-0.577471093799*x_ref[0]**o + (0.135525116149)*x_ref[0] + (0.0560037592199)*x_ref[1]**o + (0.951150002002)*x_ref[1]
        arg[(2, 2, 1, 0)]=0.573566772151*x[0]**o + (-0.139456195028)*x[0] + (0.566118576707)*x[1]**o + (0.0886998408493)*x[1]
        ref[(2, 2, 1, 0)]=0.573566772151*x_ref[0]**o + (-0.139456195028)*x_ref[0] + (0.566118576707)*x_ref[1]**o + (0.0886998408493)*x_ref[1]
        arg[(2, 2, 1, 1)]=0.281480373139*x[0]**o + (0.880329657775)*x[0] + (-0.865490325487)*x[1]**o + (0.191326628407)*x[1]
        ref[(2, 2, 1, 1)]=0.281480373139*x_ref[0]**o + (0.880329657775)*x_ref[0] + (-0.865490325487)*x_ref[1]**o + (0.191326628407)*x_ref[1]
        arg[(2, 2, 1, 2)]=-0.370111598244*x[0]**o + (0.766799230949)*x[0] + (0.0851296345886)*x[1]**o + (-0.791029147236)*x[1]
        ref[(2, 2, 1, 2)]=-0.370111598244*x_ref[0]**o + (0.766799230949)*x_ref[0] + (0.0851296345886)*x_ref[1]**o + (-0.791029147236)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.391532626334*x[2]**o + (-0.545802519395)*x[2]
            ref[(0, 0, 0, 0)]+=0.391532626334*x_ref[2]**o + (-0.545802519395)*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.795715050406*x[2]**o + (0.819990913514)*x[2]
            ref[(0, 0, 0, 1)]+=0.795715050406*x_ref[2]**o + (0.819990913514)*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.0135009883172*x[2]**o + (-0.210965569148)*x[2]
            ref[(0, 0, 0, 2)]+=0.0135009883172*x_ref[2]**o + (-0.210965569148)*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.828008335847*x[2]**o + (0.792403493778)*x[2]
            ref[(0, 0, 1, 0)]+=-0.828008335847*x_ref[2]**o + (0.792403493778)*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.197332395995*x[2]**o + (0.927333357986)*x[2]
            ref[(0, 0, 1, 1)]+=-0.197332395995*x_ref[2]**o + (0.927333357986)*x_ref[2]
            arg[(0, 0, 1, 2)]+=-0.52342316773*x[2]**o + (0.0529625971697)*x[2]
            ref[(0, 0, 1, 2)]+=-0.52342316773*x_ref[2]**o + (0.0529625971697)*x_ref[2]
            arg[(0, 1, 0, 0)]+=0.215959870463*x[2]**o + (0.0426406764904)*x[2]
            ref[(0, 1, 0, 0)]+=0.215959870463*x_ref[2]**o + (0.0426406764904)*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.0103762421578*x[2]**o + (-0.850738486633)*x[2]
            ref[(0, 1, 0, 1)]+=0.0103762421578*x_ref[2]**o + (-0.850738486633)*x_ref[2]
            arg[(0, 1, 0, 2)]+=-0.820657196698*x[2]**o + (0.780143760525)*x[2]
            ref[(0, 1, 0, 2)]+=-0.820657196698*x_ref[2]**o + (0.780143760525)*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.28362244379*x[2]**o + (0.157515326811)*x[2]
            ref[(0, 1, 1, 0)]+=0.28362244379*x_ref[2]**o + (0.157515326811)*x_ref[2]
            arg[(0, 1, 1, 1)]+=0.195396543144*x[2]**o + (0.787285195317)*x[2]
            ref[(0, 1, 1, 1)]+=0.195396543144*x_ref[2]**o + (0.787285195317)*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.611069826874*x[2]**o + (0.477043939877)*x[2]
            ref[(0, 1, 1, 2)]+=0.611069826874*x_ref[2]**o + (0.477043939877)*x_ref[2]
            arg[(0, 2, 0, 0)]+=0.47876902848*x[2]**o + (0.303429886913)*x[2]
            ref[(0, 2, 0, 0)]+=0.47876902848*x_ref[2]**o + (0.303429886913)*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.376153967814*x[2]**o + (0.290561274253)*x[2]
            ref[(0, 2, 0, 1)]+=-0.376153967814*x_ref[2]**o + (0.290561274253)*x_ref[2]
            arg[(0, 2, 0, 2)]+=0.113781733174*x[2]**o + (0.748033671233)*x[2]
            ref[(0, 2, 0, 2)]+=0.113781733174*x_ref[2]**o + (0.748033671233)*x_ref[2]
            arg[(0, 2, 1, 0)]+=-0.176848940061*x[2]**o + (-0.199774807592)*x[2]
            ref[(0, 2, 1, 0)]+=-0.176848940061*x_ref[2]**o + (-0.199774807592)*x_ref[2]
            arg[(0, 2, 1, 1)]+=0.743368393629*x[2]**o + (0.433181767915)*x[2]
            ref[(0, 2, 1, 1)]+=0.743368393629*x_ref[2]**o + (0.433181767915)*x_ref[2]
            arg[(0, 2, 1, 2)]+=0.474154699738*x[2]**o + (-0.842972936181)*x[2]
            ref[(0, 2, 1, 2)]+=0.474154699738*x_ref[2]**o + (-0.842972936181)*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.10470247242*x[2]**o + (-0.488788114589)*x[2]
            ref[(1, 0, 0, 0)]+=0.10470247242*x_ref[2]**o + (-0.488788114589)*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.776757311478*x[2]**o + (0.816771569279)*x[2]
            ref[(1, 0, 0, 1)]+=0.776757311478*x_ref[2]**o + (0.816771569279)*x_ref[2]
            arg[(1, 0, 0, 2)]+=0.689606187486*x[2]**o + (0.126960740771)*x[2]
            ref[(1, 0, 0, 2)]+=0.689606187486*x_ref[2]**o + (0.126960740771)*x_ref[2]
            arg[(1, 0, 1, 0)]+=0.765609702289*x[2]**o + (-0.219699513998)*x[2]
            ref[(1, 0, 1, 0)]+=0.765609702289*x_ref[2]**o + (-0.219699513998)*x_ref[2]
            arg[(1, 0, 1, 1)]+=0.697123957538*x[2]**o + (-0.549826622918)*x[2]
            ref[(1, 0, 1, 1)]+=0.697123957538*x_ref[2]**o + (-0.549826622918)*x_ref[2]
            arg[(1, 0, 1, 2)]+=-0.720942837298*x[2]**o + (0.564877658994)*x[2]
            ref[(1, 0, 1, 2)]+=-0.720942837298*x_ref[2]**o + (0.564877658994)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.417366344124*x[2]**o + (0.466065768224)*x[2]
            ref[(1, 1, 0, 0)]+=0.417366344124*x_ref[2]**o + (0.466065768224)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.785539149198*x[2]**o + (-0.583777405748)*x[2]
            ref[(1, 1, 0, 1)]+=0.785539149198*x_ref[2]**o + (-0.583777405748)*x_ref[2]
            arg[(1, 1, 0, 2)]+=-0.567192955302*x[2]**o + (0.40289353494)*x[2]
            ref[(1, 1, 0, 2)]+=-0.567192955302*x_ref[2]**o + (0.40289353494)*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.966787243234*x[2]**o + (0.529741603252)*x[2]
            ref[(1, 1, 1, 0)]+=-0.966787243234*x_ref[2]**o + (0.529741603252)*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.982627779838*x[2]**o + (-0.784312921239)*x[2]
            ref[(1, 1, 1, 1)]+=0.982627779838*x_ref[2]**o + (-0.784312921239)*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.310056991192*x[2]**o + (0.604072467005)*x[2]
            ref[(1, 1, 1, 2)]+=-0.310056991192*x_ref[2]**o + (0.604072467005)*x_ref[2]
            arg[(1, 2, 0, 0)]+=0.854672534929*x[2]**o + (0.298996804238)*x[2]
            ref[(1, 2, 0, 0)]+=0.854672534929*x_ref[2]**o + (0.298996804238)*x_ref[2]
            arg[(1, 2, 0, 1)]+=-0.478022221304*x[2]**o + (0.593233785644)*x[2]
            ref[(1, 2, 0, 1)]+=-0.478022221304*x_ref[2]**o + (0.593233785644)*x_ref[2]
            arg[(1, 2, 0, 2)]+=-0.196548189449*x[2]**o + (-0.748427844295)*x[2]
            ref[(1, 2, 0, 2)]+=-0.196548189449*x_ref[2]**o + (-0.748427844295)*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.624905338921*x[2]**o + (-0.378262616379)*x[2]
            ref[(1, 2, 1, 0)]+=0.624905338921*x_ref[2]**o + (-0.378262616379)*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.546155581748*x[2]**o + (0.732384602216)*x[2]
            ref[(1, 2, 1, 1)]+=0.546155581748*x_ref[2]**o + (0.732384602216)*x_ref[2]
            arg[(1, 2, 1, 2)]+=0.857807538062*x[2]**o + (0.70064636592)*x[2]
            ref[(1, 2, 1, 2)]+=0.857807538062*x_ref[2]**o + (0.70064636592)*x_ref[2]
            arg[(2, 0, 0, 0)]+=0.91875930288*x[2]**o + (-0.661218444319)*x[2]
            ref[(2, 0, 0, 0)]+=0.91875930288*x_ref[2]**o + (-0.661218444319)*x_ref[2]
            arg[(2, 0, 0, 1)]+=-0.426380275316*x[2]**o + (-0.971948465052)*x[2]
            ref[(2, 0, 0, 1)]+=-0.426380275316*x_ref[2]**o + (-0.971948465052)*x_ref[2]
            arg[(2, 0, 0, 2)]+=-0.631064028537*x[2]**o + (-0.73066975193)*x[2]
            ref[(2, 0, 0, 2)]+=-0.631064028537*x_ref[2]**o + (-0.73066975193)*x_ref[2]
            arg[(2, 0, 1, 0)]+=-0.594804747935*x[2]**o + (-0.286365627638)*x[2]
            ref[(2, 0, 1, 0)]+=-0.594804747935*x_ref[2]**o + (-0.286365627638)*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.406553519299*x[2]**o + (-0.677186561151)*x[2]
            ref[(2, 0, 1, 1)]+=0.406553519299*x_ref[2]**o + (-0.677186561151)*x_ref[2]
            arg[(2, 0, 1, 2)]+=0.0584099303938*x[2]**o + (0.0570622304605)*x[2]
            ref[(2, 0, 1, 2)]+=0.0584099303938*x_ref[2]**o + (0.0570622304605)*x_ref[2]
            arg[(2, 1, 0, 0)]+=-0.379259392722*x[2]**o + (0.946039730042)*x[2]
            ref[(2, 1, 0, 0)]+=-0.379259392722*x_ref[2]**o + (0.946039730042)*x_ref[2]
            arg[(2, 1, 0, 1)]+=0.157837837609*x[2]**o + (0.0268004544887)*x[2]
            ref[(2, 1, 0, 1)]+=0.157837837609*x_ref[2]**o + (0.0268004544887)*x_ref[2]
            arg[(2, 1, 0, 2)]+=0.82133131664*x[2]**o + (-0.795026941772)*x[2]
            ref[(2, 1, 0, 2)]+=0.82133131664*x_ref[2]**o + (-0.795026941772)*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.839237917738*x[2]**o + (0.618024310867)*x[2]
            ref[(2, 1, 1, 0)]+=0.839237917738*x_ref[2]**o + (0.618024310867)*x_ref[2]
            arg[(2, 1, 1, 1)]+=0.839894270624*x[2]**o + (0.12106395663)*x[2]
            ref[(2, 1, 1, 1)]+=0.839894270624*x_ref[2]**o + (0.12106395663)*x_ref[2]
            arg[(2, 1, 1, 2)]+=-0.540611145442*x[2]**o + (-0.224441911601)*x[2]
            ref[(2, 1, 1, 2)]+=-0.540611145442*x_ref[2]**o + (-0.224441911601)*x_ref[2]
            arg[(2, 2, 0, 0)]+=0.119905928069*x[2]**o + (-0.604084040166)*x[2]
            ref[(2, 2, 0, 0)]+=0.119905928069*x_ref[2]**o + (-0.604084040166)*x_ref[2]
            arg[(2, 2, 0, 1)]+=-0.492150165551*x[2]**o + (0.965439975387)*x[2]
            ref[(2, 2, 0, 1)]+=-0.492150165551*x_ref[2]**o + (0.965439975387)*x_ref[2]
            arg[(2, 2, 0, 2)]+=0.960273468038*x[2]**o + (0.602849026817)*x[2]
            ref[(2, 2, 0, 2)]+=0.960273468038*x_ref[2]**o + (0.602849026817)*x_ref[2]
            arg[(2, 2, 1, 0)]+=-0.572763881855*x[2]**o + (0.652287120066)*x[2]
            ref[(2, 2, 1, 0)]+=-0.572763881855*x_ref[2]**o + (0.652287120066)*x_ref[2]
            arg[(2, 2, 1, 1)]+=-0.88943237775*x[2]**o + (-0.195897374177)*x[2]
            ref[(2, 2, 1, 1)]+=-0.88943237775*x_ref[2]**o + (-0.195897374177)*x_ref[2]
            arg[(2, 2, 1, 2)]+=0.958846887221*x[2]**o + (-0.165357176068)*x[2]
            ref[(2, 2, 1, 2)]+=0.958846887221*x_ref[2]**o + (-0.165357176068)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3, 3, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=0.560046998768*x[0]**o + (0.210433898255)*x[0] + (-0.204978280678)*x[1]**o + (0.0321362261964)*x[1]
        ref=0.560046998768*x_ref[0]**o + (0.210433898255)*x_ref[0] + (-0.204978280678)*x_ref[1]**o + (0.0321362261964)*x_ref[1]
        if dim==3:
            arg+=(-0.607219150083)*x[2]**o + (-0.87837736897)*x[2]
            ref+=(-0.607219150083)*x_ref[2]**o + (-0.87837736897)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=-0.426173943913*x[0]**o + (-0.810776907581)*x[0] + (0.723812978424)*x[1]**o + (0.201178058441)*x[1]
        ref[(0,)]=-0.426173943913*x_ref[0]**o + (-0.810776907581)*x_ref[0] + (0.723812978424)*x_ref[1]**o + (0.201178058441)*x_ref[1]
        arg[(1,)]=-0.569953164795*x[0]**o + (-0.700938901759)*x[0] + (0.751244000279)*x[1]**o + (-0.811542824308)*x[1]
        ref[(1,)]=-0.569953164795*x_ref[0]**o + (-0.700938901759)*x_ref[0] + (0.751244000279)*x_ref[1]**o + (-0.811542824308)*x_ref[1]
        arg[(2,)]=-0.802875985895*x[0]**o + (0.552254119317)*x[0] + (-0.717306598545)*x[1]**o + (-0.736479495436)*x[1]
        ref[(2,)]=-0.802875985895*x_ref[0]**o + (0.552254119317)*x_ref[0] + (-0.717306598545)*x_ref[1]**o + (-0.736479495436)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.165009021042*x[2]**o + (-0.823280515544)*x[2]
            ref[(0,)]+=0.165009021042*x_ref[2]**o + (-0.823280515544)*x_ref[2]
            arg[(1,)]+=-0.696071321481*x[2]**o + (-0.171680737647)*x[2]
            ref[(1,)]+=-0.696071321481*x_ref[2]**o + (-0.171680737647)*x_ref[2]
            arg[(2,)]+=-0.899917933743*x[2]**o + (0.370956344457)*x[2]
            ref[(2,)]+=-0.899917933743*x_ref[2]**o + (0.370956344457)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref = Data(0,(4, 4),w_ref)
        arg[(0, 0)]=0.669450336531*x[0]**o + (-0.332037548318)*x[0] + (0.27460934073)*x[1]**o + (0.0125366258001)*x[1]
        ref[(0, 0)]=0.669450336531*x_ref[0]**o + (-0.332037548318)*x_ref[0] + (0.27460934073)*x_ref[1]**o + (0.0125366258001)*x_ref[1]
        arg[(0, 1)]=-0.187256696816*x[0]**o + (0.92838292151)*x[0] + (0.211308778009)*x[1]**o + (-0.36274109424)*x[1]
        ref[(0, 1)]=-0.187256696816*x_ref[0]**o + (0.92838292151)*x_ref[0] + (0.211308778009)*x_ref[1]**o + (-0.36274109424)*x_ref[1]
        arg[(0, 2)]=0.905730491649*x[0]**o + (0.712191765709)*x[0] + (0.906848185692)*x[1]**o + (0.998777386902)*x[1]
        ref[(0, 2)]=0.905730491649*x_ref[0]**o + (0.712191765709)*x_ref[0] + (0.906848185692)*x_ref[1]**o + (0.998777386902)*x_ref[1]
        arg[(0, 3)]=-0.485544352962*x[0]**o + (-0.476455858006)*x[0] + (-0.319368053911)*x[1]**o + (-0.487131653176)*x[1]
        ref[(0, 3)]=-0.485544352962*x_ref[0]**o + (-0.476455858006)*x_ref[0] + (-0.319368053911)*x_ref[1]**o + (-0.487131653176)*x_ref[1]
        arg[(1, 0)]=-0.497272296455*x[0]**o + (0.0299509470518)*x[0] + (0.902165492503)*x[1]**o + (-0.302640470181)*x[1]
        ref[(1, 0)]=-0.497272296455*x_ref[0]**o + (0.0299509470518)*x_ref[0] + (0.902165492503)*x_ref[1]**o + (-0.302640470181)*x_ref[1]
        arg[(1, 1)]=0.0584616888263*x[0]**o + (-0.337273821991)*x[0] + (0.558857761275)*x[1]**o + (-0.436583721662)*x[1]
        ref[(1, 1)]=0.0584616888263*x_ref[0]**o + (-0.337273821991)*x_ref[0] + (0.558857761275)*x_ref[1]**o + (-0.436583721662)*x_ref[1]
        arg[(1, 2)]=-0.233501698224*x[0]**o + (-0.782095292925)*x[0] + (-0.120788452174)*x[1]**o + (0.279988902798)*x[1]
        ref[(1, 2)]=-0.233501698224*x_ref[0]**o + (-0.782095292925)*x_ref[0] + (-0.120788452174)*x_ref[1]**o + (0.279988902798)*x_ref[1]
        arg[(1, 3)]=0.0674699636904*x[0]**o + (0.242502553962)*x[0] + (0.0918885367097)*x[1]**o + (-0.425619062669)*x[1]
        ref[(1, 3)]=0.0674699636904*x_ref[0]**o + (0.242502553962)*x_ref[0] + (0.0918885367097)*x_ref[1]**o + (-0.425619062669)*x_ref[1]
        arg[(2, 0)]=-0.936645573456*x[0]**o + (-0.656642200367)*x[0] + (-0.113092280598)*x[1]**o + (0.6132468233)*x[1]
        ref[(2, 0)]=-0.936645573456*x_ref[0]**o + (-0.656642200367)*x_ref[0] + (-0.113092280598)*x_ref[1]**o + (0.6132468233)*x_ref[1]
        arg[(2, 1)]=0.624407674302*x[0]**o + (-0.441668132707)*x[0] + (0.888409602365)*x[1]**o + (0.832409799237)*x[1]
        ref[(2, 1)]=0.624407674302*x_ref[0]**o + (-0.441668132707)*x_ref[0] + (0.888409602365)*x_ref[1]**o + (0.832409799237)*x_ref[1]
        arg[(2, 2)]=0.468140572564*x[0]**o + (0.593591340468)*x[0] + (-0.197335765082)*x[1]**o + (-0.22568617624)*x[1]
        ref[(2, 2)]=0.468140572564*x_ref[0]**o + (0.593591340468)*x_ref[0] + (-0.197335765082)*x_ref[1]**o + (-0.22568617624)*x_ref[1]
        arg[(2, 3)]=0.733357764902*x[0]**o + (-0.691883631373)*x[0] + (-0.766711255017)*x[1]**o + (-0.402394709226)*x[1]
        ref[(2, 3)]=0.733357764902*x_ref[0]**o + (-0.691883631373)*x_ref[0] + (-0.766711255017)*x_ref[1]**o + (-0.402394709226)*x_ref[1]
        arg[(3, 0)]=-0.699773788061*x[0]**o + (0.700298175849)*x[0] + (-0.769890889097)*x[1]**o + (0.282618478558)*x[1]
        ref[(3, 0)]=-0.699773788061*x_ref[0]**o + (0.700298175849)*x_ref[0] + (-0.769890889097)*x_ref[1]**o + (0.282618478558)*x_ref[1]
        arg[(3, 1)]=0.787930989474*x[0]**o + (-0.18977222974)*x[0] + (0.974085509865)*x[1]**o + (0.210437408474)*x[1]
        ref[(3, 1)]=0.787930989474*x_ref[0]**o + (-0.18977222974)*x_ref[0] + (0.974085509865)*x_ref[1]**o + (0.210437408474)*x_ref[1]
        arg[(3, 2)]=-0.606308165617*x[0]**o + (0.302451636037)*x[0] + (-0.159024560779)*x[1]**o + (-0.900729642836)*x[1]
        ref[(3, 2)]=-0.606308165617*x_ref[0]**o + (0.302451636037)*x_ref[0] + (-0.159024560779)*x_ref[1]**o + (-0.900729642836)*x_ref[1]
        arg[(3, 3)]=0.0903931872916*x[0]**o + (-0.651824388875)*x[0] + (0.852438276143)*x[1]**o + (-0.545190675463)*x[1]
        ref[(3, 3)]=0.0903931872916*x_ref[0]**o + (-0.651824388875)*x_ref[0] + (0.852438276143)*x_ref[1]**o + (-0.545190675463)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.634479470434*x[2]**o + (-0.185352348141)*x[2]
            ref[(0, 0)]+=-0.634479470434*x_ref[2]**o + (-0.185352348141)*x_ref[2]
            arg[(0, 1)]+=0.47187562974*x[2]**o + (0.523241652681)*x[2]
            ref[(0, 1)]+=0.47187562974*x_ref[2]**o + (0.523241652681)*x_ref[2]
            arg[(0, 2)]+=-0.165228959372*x[2]**o + (0.599530805822)*x[2]
            ref[(0, 2)]+=-0.165228959372*x_ref[2]**o + (0.599530805822)*x_ref[2]
            arg[(0, 3)]+=-0.20918308263*x[2]**o + (0.0434945070886)*x[2]
            ref[(0, 3)]+=-0.20918308263*x_ref[2]**o + (0.0434945070886)*x_ref[2]
            arg[(1, 0)]+=0.231738920998*x[2]**o + (0.89483078921)*x[2]
            ref[(1, 0)]+=0.231738920998*x_ref[2]**o + (0.89483078921)*x_ref[2]
            arg[(1, 1)]+=0.446303238636*x[2]**o + (-0.314798571244)*x[2]
            ref[(1, 1)]+=0.446303238636*x_ref[2]**o + (-0.314798571244)*x_ref[2]
            arg[(1, 2)]+=0.842925376608*x[2]**o + (-0.20789044023)*x[2]
            ref[(1, 2)]+=0.842925376608*x_ref[2]**o + (-0.20789044023)*x_ref[2]
            arg[(1, 3)]+=0.467585248742*x[2]**o + (0.377528483379)*x[2]
            ref[(1, 3)]+=0.467585248742*x_ref[2]**o + (0.377528483379)*x_ref[2]
            arg[(2, 0)]+=0.0746574871248*x[2]**o + (0.568116179827)*x[2]
            ref[(2, 0)]+=0.0746574871248*x_ref[2]**o + (0.568116179827)*x_ref[2]
            arg[(2, 1)]+=0.388029469289*x[2]**o + (0.0468826077199)*x[2]
            ref[(2, 1)]+=0.388029469289*x_ref[2]**o + (0.0468826077199)*x_ref[2]
            arg[(2, 2)]+=0.538990594058*x[2]**o + (-0.363146984845)*x[2]
            ref[(2, 2)]+=0.538990594058*x_ref[2]**o + (-0.363146984845)*x_ref[2]
            arg[(2, 3)]+=0.13196780958*x[2]**o + (0.336398895535)*x[2]
            ref[(2, 3)]+=0.13196780958*x_ref[2]**o + (0.336398895535)*x_ref[2]
            arg[(3, 0)]+=-0.163923631162*x[2]**o + (0.0103271472424)*x[2]
            ref[(3, 0)]+=-0.163923631162*x_ref[2]**o + (0.0103271472424)*x_ref[2]
            arg[(3, 1)]+=0.730069693987*x[2]**o + (-0.438331932001)*x[2]
            ref[(3, 1)]+=0.730069693987*x_ref[2]**o + (-0.438331932001)*x_ref[2]
            arg[(3, 2)]+=0.516359614467*x[2]**o + (-0.394894154585)*x[2]
            ref[(3, 2)]+=0.516359614467*x_ref[2]**o + (-0.394894154585)*x_ref[2]
            arg[(3, 3)]+=-0.0122810971408*x[2]**o + (-0.533685787264)*x[2]
            ref[(3, 3)]+=-0.0122810971408*x_ref[2]**o + (-0.533685787264)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 4),w)
        ref = Data(0,(4, 3, 4),w_ref)
        arg[(0, 0, 0)]=-0.322217602689*x[0]**o + (-0.180772797473)*x[0] + (0.429231230166)*x[1]**o + (-0.745969139735)*x[1]
        ref[(0, 0, 0)]=-0.322217602689*x_ref[0]**o + (-0.180772797473)*x_ref[0] + (0.429231230166)*x_ref[1]**o + (-0.745969139735)*x_ref[1]
        arg[(0, 0, 1)]=-0.483203769269*x[0]**o + (0.287237747617)*x[0] + (0.701210256321)*x[1]**o + (0.696722837861)*x[1]
        ref[(0, 0, 1)]=-0.483203769269*x_ref[0]**o + (0.287237747617)*x_ref[0] + (0.701210256321)*x_ref[1]**o + (0.696722837861)*x_ref[1]
        arg[(0, 0, 2)]=-0.620069352556*x[0]**o + (-0.465474680428)*x[0] + (0.359361388788)*x[1]**o + (0.338604772433)*x[1]
        ref[(0, 0, 2)]=-0.620069352556*x_ref[0]**o + (-0.465474680428)*x_ref[0] + (0.359361388788)*x_ref[1]**o + (0.338604772433)*x_ref[1]
        arg[(0, 0, 3)]=-0.43445317197*x[0]**o + (-0.641503215875)*x[0] + (0.122710101144)*x[1]**o + (0.911416497569)*x[1]
        ref[(0, 0, 3)]=-0.43445317197*x_ref[0]**o + (-0.641503215875)*x_ref[0] + (0.122710101144)*x_ref[1]**o + (0.911416497569)*x_ref[1]
        arg[(0, 1, 0)]=0.613875912689*x[0]**o + (0.315937641112)*x[0] + (0.200471615612)*x[1]**o + (-0.964922619557)*x[1]
        ref[(0, 1, 0)]=0.613875912689*x_ref[0]**o + (0.315937641112)*x_ref[0] + (0.200471615612)*x_ref[1]**o + (-0.964922619557)*x_ref[1]
        arg[(0, 1, 1)]=-0.716471962222*x[0]**o + (-0.219919151603)*x[0] + (-0.0390703754612)*x[1]**o + (-0.105107332214)*x[1]
        ref[(0, 1, 1)]=-0.716471962222*x_ref[0]**o + (-0.219919151603)*x_ref[0] + (-0.0390703754612)*x_ref[1]**o + (-0.105107332214)*x_ref[1]
        arg[(0, 1, 2)]=-0.44030605033*x[0]**o + (-0.402977385601)*x[0] + (-0.183666881139)*x[1]**o + (0.0246512443561)*x[1]
        ref[(0, 1, 2)]=-0.44030605033*x_ref[0]**o + (-0.402977385601)*x_ref[0] + (-0.183666881139)*x_ref[1]**o + (0.0246512443561)*x_ref[1]
        arg[(0, 1, 3)]=-0.547683305159*x[0]**o + (-0.00283746243392)*x[0] + (0.661893381564)*x[1]**o + (0.182024300974)*x[1]
        ref[(0, 1, 3)]=-0.547683305159*x_ref[0]**o + (-0.00283746243392)*x_ref[0] + (0.661893381564)*x_ref[1]**o + (0.182024300974)*x_ref[1]
        arg[(0, 2, 0)]=-0.522809817128*x[0]**o + (-0.975953703846)*x[0] + (-0.100150021796)*x[1]**o + (-0.106939027182)*x[1]
        ref[(0, 2, 0)]=-0.522809817128*x_ref[0]**o + (-0.975953703846)*x_ref[0] + (-0.100150021796)*x_ref[1]**o + (-0.106939027182)*x_ref[1]
        arg[(0, 2, 1)]=0.202765204329*x[0]**o + (0.220603205713)*x[0] + (-0.358851035197)*x[1]**o + (0.4332637228)*x[1]
        ref[(0, 2, 1)]=0.202765204329*x_ref[0]**o + (0.220603205713)*x_ref[0] + (-0.358851035197)*x_ref[1]**o + (0.4332637228)*x_ref[1]
        arg[(0, 2, 2)]=0.585595109289*x[0]**o + (0.459274271317)*x[0] + (0.302716853435)*x[1]**o + (0.902883082261)*x[1]
        ref[(0, 2, 2)]=0.585595109289*x_ref[0]**o + (0.459274271317)*x_ref[0] + (0.302716853435)*x_ref[1]**o + (0.902883082261)*x_ref[1]
        arg[(0, 2, 3)]=-0.87854320325*x[0]**o + (-0.642545379031)*x[0] + (-0.32214860439)*x[1]**o + (-0.361496892385)*x[1]
        ref[(0, 2, 3)]=-0.87854320325*x_ref[0]**o + (-0.642545379031)*x_ref[0] + (-0.32214860439)*x_ref[1]**o + (-0.361496892385)*x_ref[1]
        arg[(1, 0, 0)]=-0.268347769229*x[0]**o + (-0.302177265266)*x[0] + (0.323642331448)*x[1]**o + (-0.541036361273)*x[1]
        ref[(1, 0, 0)]=-0.268347769229*x_ref[0]**o + (-0.302177265266)*x_ref[0] + (0.323642331448)*x_ref[1]**o + (-0.541036361273)*x_ref[1]
        arg[(1, 0, 1)]=0.82205393104*x[0]**o + (0.773203448949)*x[0] + (-0.884580596272)*x[1]**o + (0.589118236554)*x[1]
        ref[(1, 0, 1)]=0.82205393104*x_ref[0]**o + (0.773203448949)*x_ref[0] + (-0.884580596272)*x_ref[1]**o + (0.589118236554)*x_ref[1]
        arg[(1, 0, 2)]=0.158698865155*x[0]**o + (0.79463944491)*x[0] + (0.763984656735)*x[1]**o + (0.203770159447)*x[1]
        ref[(1, 0, 2)]=0.158698865155*x_ref[0]**o + (0.79463944491)*x_ref[0] + (0.763984656735)*x_ref[1]**o + (0.203770159447)*x_ref[1]
        arg[(1, 0, 3)]=-0.813210099168*x[0]**o + (0.348158634065)*x[0] + (0.561845790864)*x[1]**o + (0.549058145623)*x[1]
        ref[(1, 0, 3)]=-0.813210099168*x_ref[0]**o + (0.348158634065)*x_ref[0] + (0.561845790864)*x_ref[1]**o + (0.549058145623)*x_ref[1]
        arg[(1, 1, 0)]=-0.0463860389518*x[0]**o + (0.247995275568)*x[0] + (0.627929983723)*x[1]**o + (0.176525596344)*x[1]
        ref[(1, 1, 0)]=-0.0463860389518*x_ref[0]**o + (0.247995275568)*x_ref[0] + (0.627929983723)*x_ref[1]**o + (0.176525596344)*x_ref[1]
        arg[(1, 1, 1)]=-0.0951000823342*x[0]**o + (0.519846256087)*x[0] + (-0.191162482236)*x[1]**o + (0.187517378188)*x[1]
        ref[(1, 1, 1)]=-0.0951000823342*x_ref[0]**o + (0.519846256087)*x_ref[0] + (-0.191162482236)*x_ref[1]**o + (0.187517378188)*x_ref[1]
        arg[(1, 1, 2)]=-0.0722916483436*x[0]**o + (0.362529185372)*x[0] + (-0.434093512129)*x[1]**o + (-0.779876348086)*x[1]
        ref[(1, 1, 2)]=-0.0722916483436*x_ref[0]**o + (0.362529185372)*x_ref[0] + (-0.434093512129)*x_ref[1]**o + (-0.779876348086)*x_ref[1]
        arg[(1, 1, 3)]=-0.0533821862631*x[0]**o + (-0.587779052755)*x[0] + (-0.482678614409)*x[1]**o + (-0.868003085465)*x[1]
        ref[(1, 1, 3)]=-0.0533821862631*x_ref[0]**o + (-0.587779052755)*x_ref[0] + (-0.482678614409)*x_ref[1]**o + (-0.868003085465)*x_ref[1]
        arg[(1, 2, 0)]=-0.0845313519519*x[0]**o + (0.555767710043)*x[0] + (-0.895282808602)*x[1]**o + (0.663706026218)*x[1]
        ref[(1, 2, 0)]=-0.0845313519519*x_ref[0]**o + (0.555767710043)*x_ref[0] + (-0.895282808602)*x_ref[1]**o + (0.663706026218)*x_ref[1]
        arg[(1, 2, 1)]=0.00173292604508*x[0]**o + (0.237710022802)*x[0] + (0.883414943364)*x[1]**o + (0.832996910152)*x[1]
        ref[(1, 2, 1)]=0.00173292604508*x_ref[0]**o + (0.237710022802)*x_ref[0] + (0.883414943364)*x_ref[1]**o + (0.832996910152)*x_ref[1]
        arg[(1, 2, 2)]=0.337297518271*x[0]**o + (-0.630660971232)*x[0] + (-0.86685511355)*x[1]**o + (0.369026716324)*x[1]
        ref[(1, 2, 2)]=0.337297518271*x_ref[0]**o + (-0.630660971232)*x_ref[0] + (-0.86685511355)*x_ref[1]**o + (0.369026716324)*x_ref[1]
        arg[(1, 2, 3)]=0.103325804244*x[0]**o + (0.50880298567)*x[0] + (-0.591654620107)*x[1]**o + (-0.0796602235621)*x[1]
        ref[(1, 2, 3)]=0.103325804244*x_ref[0]**o + (0.50880298567)*x_ref[0] + (-0.591654620107)*x_ref[1]**o + (-0.0796602235621)*x_ref[1]
        arg[(2, 0, 0)]=0.214017443515*x[0]**o + (-0.74274959791)*x[0] + (-0.12213176528)*x[1]**o + (-0.673740180878)*x[1]
        ref[(2, 0, 0)]=0.214017443515*x_ref[0]**o + (-0.74274959791)*x_ref[0] + (-0.12213176528)*x_ref[1]**o + (-0.673740180878)*x_ref[1]
        arg[(2, 0, 1)]=-0.43885989351*x[0]**o + (0.51912252429)*x[0] + (-0.386138185282)*x[1]**o + (-0.94839723442)*x[1]
        ref[(2, 0, 1)]=-0.43885989351*x_ref[0]**o + (0.51912252429)*x_ref[0] + (-0.386138185282)*x_ref[1]**o + (-0.94839723442)*x_ref[1]
        arg[(2, 0, 2)]=-0.831192642477*x[0]**o + (0.277005853879)*x[0] + (-0.745090547687)*x[1]**o + (-0.429361610559)*x[1]
        ref[(2, 0, 2)]=-0.831192642477*x_ref[0]**o + (0.277005853879)*x_ref[0] + (-0.745090547687)*x_ref[1]**o + (-0.429361610559)*x_ref[1]
        arg[(2, 0, 3)]=0.431760215449*x[0]**o + (-0.506045642126)*x[0] + (0.66696938099)*x[1]**o + (0.594218836295)*x[1]
        ref[(2, 0, 3)]=0.431760215449*x_ref[0]**o + (-0.506045642126)*x_ref[0] + (0.66696938099)*x_ref[1]**o + (0.594218836295)*x_ref[1]
        arg[(2, 1, 0)]=-0.5295164538*x[0]**o + (-0.0993172746405)*x[0] + (0.624722187169)*x[1]**o + (0.0293010549736)*x[1]
        ref[(2, 1, 0)]=-0.5295164538*x_ref[0]**o + (-0.0993172746405)*x_ref[0] + (0.624722187169)*x_ref[1]**o + (0.0293010549736)*x_ref[1]
        arg[(2, 1, 1)]=0.375080460048*x[0]**o + (-0.563747997658)*x[0] + (0.939889531539)*x[1]**o + (0.0318662849816)*x[1]
        ref[(2, 1, 1)]=0.375080460048*x_ref[0]**o + (-0.563747997658)*x_ref[0] + (0.939889531539)*x_ref[1]**o + (0.0318662849816)*x_ref[1]
        arg[(2, 1, 2)]=0.220082280892*x[0]**o + (-0.163826822821)*x[0] + (-0.362875476203)*x[1]**o + (-0.0871814482314)*x[1]
        ref[(2, 1, 2)]=0.220082280892*x_ref[0]**o + (-0.163826822821)*x_ref[0] + (-0.362875476203)*x_ref[1]**o + (-0.0871814482314)*x_ref[1]
        arg[(2, 1, 3)]=-0.739845967575*x[0]**o + (-0.342597356508)*x[0] + (0.658022939844)*x[1]**o + (0.333534209579)*x[1]
        ref[(2, 1, 3)]=-0.739845967575*x_ref[0]**o + (-0.342597356508)*x_ref[0] + (0.658022939844)*x_ref[1]**o + (0.333534209579)*x_ref[1]
        arg[(2, 2, 0)]=-0.29829514388*x[0]**o + (-0.424131611306)*x[0] + (0.400007186859)*x[1]**o + (-0.425228545389)*x[1]
        ref[(2, 2, 0)]=-0.29829514388*x_ref[0]**o + (-0.424131611306)*x_ref[0] + (0.400007186859)*x_ref[1]**o + (-0.425228545389)*x_ref[1]
        arg[(2, 2, 1)]=-0.849762425458*x[0]**o + (0.743065216132)*x[0] + (0.348259322888)*x[1]**o + (0.126508201406)*x[1]
        ref[(2, 2, 1)]=-0.849762425458*x_ref[0]**o + (0.743065216132)*x_ref[0] + (0.348259322888)*x_ref[1]**o + (0.126508201406)*x_ref[1]
        arg[(2, 2, 2)]=-0.391007975419*x[0]**o + (-0.36875898044)*x[0] + (-0.525913157782)*x[1]**o + (-0.839466003493)*x[1]
        ref[(2, 2, 2)]=-0.391007975419*x_ref[0]**o + (-0.36875898044)*x_ref[0] + (-0.525913157782)*x_ref[1]**o + (-0.839466003493)*x_ref[1]
        arg[(2, 2, 3)]=-0.0832793738061*x[0]**o + (-0.813795170004)*x[0] + (0.0680758867095)*x[1]**o + (-0.252761072544)*x[1]
        ref[(2, 2, 3)]=-0.0832793738061*x_ref[0]**o + (-0.813795170004)*x_ref[0] + (0.0680758867095)*x_ref[1]**o + (-0.252761072544)*x_ref[1]
        arg[(3, 0, 0)]=-0.974863716536*x[0]**o + (-0.0902045306026)*x[0] + (-0.607032422545)*x[1]**o + (0.31998529868)*x[1]
        ref[(3, 0, 0)]=-0.974863716536*x_ref[0]**o + (-0.0902045306026)*x_ref[0] + (-0.607032422545)*x_ref[1]**o + (0.31998529868)*x_ref[1]
        arg[(3, 0, 1)]=-0.670793421798*x[0]**o + (-0.336745622177)*x[0] + (-0.687433213063)*x[1]**o + (-0.482140993717)*x[1]
        ref[(3, 0, 1)]=-0.670793421798*x_ref[0]**o + (-0.336745622177)*x_ref[0] + (-0.687433213063)*x_ref[1]**o + (-0.482140993717)*x_ref[1]
        arg[(3, 0, 2)]=-0.498926173425*x[0]**o + (-0.552260587672)*x[0] + (0.842261246418)*x[1]**o + (0.0278506700363)*x[1]
        ref[(3, 0, 2)]=-0.498926173425*x_ref[0]**o + (-0.552260587672)*x_ref[0] + (0.842261246418)*x_ref[1]**o + (0.0278506700363)*x_ref[1]
        arg[(3, 0, 3)]=-0.721575601387*x[0]**o + (0.803778609648)*x[0] + (0.858232940304)*x[1]**o + (0.164227706767)*x[1]
        ref[(3, 0, 3)]=-0.721575601387*x_ref[0]**o + (0.803778609648)*x_ref[0] + (0.858232940304)*x_ref[1]**o + (0.164227706767)*x_ref[1]
        arg[(3, 1, 0)]=0.793766167522*x[0]**o + (-0.669685836937)*x[0] + (0.505892675702)*x[1]**o + (0.00168579849307)*x[1]
        ref[(3, 1, 0)]=0.793766167522*x_ref[0]**o + (-0.669685836937)*x_ref[0] + (0.505892675702)*x_ref[1]**o + (0.00168579849307)*x_ref[1]
        arg[(3, 1, 1)]=-0.421793213502*x[0]**o + (-0.53604599783)*x[0] + (0.252017798635)*x[1]**o + (0.829194794464)*x[1]
        ref[(3, 1, 1)]=-0.421793213502*x_ref[0]**o + (-0.53604599783)*x_ref[0] + (0.252017798635)*x_ref[1]**o + (0.829194794464)*x_ref[1]
        arg[(3, 1, 2)]=-0.585859782244*x[0]**o + (0.787270534677)*x[0] + (-0.793498035624)*x[1]**o + (0.374942823506)*x[1]
        ref[(3, 1, 2)]=-0.585859782244*x_ref[0]**o + (0.787270534677)*x_ref[0] + (-0.793498035624)*x_ref[1]**o + (0.374942823506)*x_ref[1]
        arg[(3, 1, 3)]=-0.840393417997*x[0]**o + (-0.492810896927)*x[0] + (-0.365986015031)*x[1]**o + (0.2263717202)*x[1]
        ref[(3, 1, 3)]=-0.840393417997*x_ref[0]**o + (-0.492810896927)*x_ref[0] + (-0.365986015031)*x_ref[1]**o + (0.2263717202)*x_ref[1]
        arg[(3, 2, 0)]=0.690809683418*x[0]**o + (0.930252323901)*x[0] + (0.20051160689)*x[1]**o + (0.964974678877)*x[1]
        ref[(3, 2, 0)]=0.690809683418*x_ref[0]**o + (0.930252323901)*x_ref[0] + (0.20051160689)*x_ref[1]**o + (0.964974678877)*x_ref[1]
        arg[(3, 2, 1)]=0.638348641439*x[0]**o + (-0.0734324835985)*x[0] + (0.187243502108)*x[1]**o + (0.224826120426)*x[1]
        ref[(3, 2, 1)]=0.638348641439*x_ref[0]**o + (-0.0734324835985)*x_ref[0] + (0.187243502108)*x_ref[1]**o + (0.224826120426)*x_ref[1]
        arg[(3, 2, 2)]=0.617244247354*x[0]**o + (0.190756059346)*x[0] + (0.268618134762)*x[1]**o + (0.809194198182)*x[1]
        ref[(3, 2, 2)]=0.617244247354*x_ref[0]**o + (0.190756059346)*x_ref[0] + (0.268618134762)*x_ref[1]**o + (0.809194198182)*x_ref[1]
        arg[(3, 2, 3)]=-0.443246219878*x[0]**o + (-0.664851319415)*x[0] + (0.449373275921)*x[1]**o + (0.0384907843914)*x[1]
        ref[(3, 2, 3)]=-0.443246219878*x_ref[0]**o + (-0.664851319415)*x_ref[0] + (0.449373275921)*x_ref[1]**o + (0.0384907843914)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.649369927131*x[2]**o + (-0.152120039891)*x[2]
            ref[(0, 0, 0)]+=0.649369927131*x_ref[2]**o + (-0.152120039891)*x_ref[2]
            arg[(0, 0, 1)]+=-0.252790079435*x[2]**o + (0.981016801829)*x[2]
            ref[(0, 0, 1)]+=-0.252790079435*x_ref[2]**o + (0.981016801829)*x_ref[2]
            arg[(0, 0, 2)]+=0.713901488677*x[2]**o + (0.223127481069)*x[2]
            ref[(0, 0, 2)]+=0.713901488677*x_ref[2]**o + (0.223127481069)*x_ref[2]
            arg[(0, 0, 3)]+=-0.410690682118*x[2]**o + (0.658777400638)*x[2]
            ref[(0, 0, 3)]+=-0.410690682118*x_ref[2]**o + (0.658777400638)*x_ref[2]
            arg[(0, 1, 0)]+=0.771156109551*x[2]**o + (0.245370731532)*x[2]
            ref[(0, 1, 0)]+=0.771156109551*x_ref[2]**o + (0.245370731532)*x_ref[2]
            arg[(0, 1, 1)]+=-0.110515222707*x[2]**o + (-0.71111275568)*x[2]
            ref[(0, 1, 1)]+=-0.110515222707*x_ref[2]**o + (-0.71111275568)*x_ref[2]
            arg[(0, 1, 2)]+=-0.121274825341*x[2]**o + (0.101984023168)*x[2]
            ref[(0, 1, 2)]+=-0.121274825341*x_ref[2]**o + (0.101984023168)*x_ref[2]
            arg[(0, 1, 3)]+=0.433632391307*x[2]**o + (-0.27572797688)*x[2]
            ref[(0, 1, 3)]+=0.433632391307*x_ref[2]**o + (-0.27572797688)*x_ref[2]
            arg[(0, 2, 0)]+=0.288334556271*x[2]**o + (-0.0540618805407)*x[2]
            ref[(0, 2, 0)]+=0.288334556271*x_ref[2]**o + (-0.0540618805407)*x_ref[2]
            arg[(0, 2, 1)]+=0.849742392414*x[2]**o + (0.979556831894)*x[2]
            ref[(0, 2, 1)]+=0.849742392414*x_ref[2]**o + (0.979556831894)*x_ref[2]
            arg[(0, 2, 2)]+=0.0149377151334*x[2]**o + (-0.0321486496351)*x[2]
            ref[(0, 2, 2)]+=0.0149377151334*x_ref[2]**o + (-0.0321486496351)*x_ref[2]
            arg[(0, 2, 3)]+=0.554417049891*x[2]**o + (-0.645137619383)*x[2]
            ref[(0, 2, 3)]+=0.554417049891*x_ref[2]**o + (-0.645137619383)*x_ref[2]
            arg[(1, 0, 0)]+=-0.148275072947*x[2]**o + (0.808702903292)*x[2]
            ref[(1, 0, 0)]+=-0.148275072947*x_ref[2]**o + (0.808702903292)*x_ref[2]
            arg[(1, 0, 1)]+=0.0634171051153*x[2]**o + (0.0579428437062)*x[2]
            ref[(1, 0, 1)]+=0.0634171051153*x_ref[2]**o + (0.0579428437062)*x_ref[2]
            arg[(1, 0, 2)]+=0.579174465176*x[2]**o + (0.777855541852)*x[2]
            ref[(1, 0, 2)]+=0.579174465176*x_ref[2]**o + (0.777855541852)*x_ref[2]
            arg[(1, 0, 3)]+=-0.853742952185*x[2]**o + (0.366477670983)*x[2]
            ref[(1, 0, 3)]+=-0.853742952185*x_ref[2]**o + (0.366477670983)*x_ref[2]
            arg[(1, 1, 0)]+=-0.745663175204*x[2]**o + (-0.332488509872)*x[2]
            ref[(1, 1, 0)]+=-0.745663175204*x_ref[2]**o + (-0.332488509872)*x_ref[2]
            arg[(1, 1, 1)]+=0.833413088096*x[2]**o + (-0.526865811612)*x[2]
            ref[(1, 1, 1)]+=0.833413088096*x_ref[2]**o + (-0.526865811612)*x_ref[2]
            arg[(1, 1, 2)]+=0.83934039032*x[2]**o + (-0.53599749954)*x[2]
            ref[(1, 1, 2)]+=0.83934039032*x_ref[2]**o + (-0.53599749954)*x_ref[2]
            arg[(1, 1, 3)]+=0.0205647822717*x[2]**o + (-0.854984563289)*x[2]
            ref[(1, 1, 3)]+=0.0205647822717*x_ref[2]**o + (-0.854984563289)*x_ref[2]
            arg[(1, 2, 0)]+=0.989107812373*x[2]**o + (0.0858763451613)*x[2]
            ref[(1, 2, 0)]+=0.989107812373*x_ref[2]**o + (0.0858763451613)*x_ref[2]
            arg[(1, 2, 1)]+=0.342238342837*x[2]**o + (0.928520239499)*x[2]
            ref[(1, 2, 1)]+=0.342238342837*x_ref[2]**o + (0.928520239499)*x_ref[2]
            arg[(1, 2, 2)]+=0.808384998291*x[2]**o + (-0.456637897861)*x[2]
            ref[(1, 2, 2)]+=0.808384998291*x_ref[2]**o + (-0.456637897861)*x_ref[2]
            arg[(1, 2, 3)]+=-0.684804692357*x[2]**o + (0.677105703714)*x[2]
            ref[(1, 2, 3)]+=-0.684804692357*x_ref[2]**o + (0.677105703714)*x_ref[2]
            arg[(2, 0, 0)]+=0.161945806076*x[2]**o + (-0.132397583611)*x[2]
            ref[(2, 0, 0)]+=0.161945806076*x_ref[2]**o + (-0.132397583611)*x_ref[2]
            arg[(2, 0, 1)]+=0.367152107153*x[2]**o + (0.0232801267725)*x[2]
            ref[(2, 0, 1)]+=0.367152107153*x_ref[2]**o + (0.0232801267725)*x_ref[2]
            arg[(2, 0, 2)]+=-0.584194586136*x[2]**o + (-0.572752986438)*x[2]
            ref[(2, 0, 2)]+=-0.584194586136*x_ref[2]**o + (-0.572752986438)*x_ref[2]
            arg[(2, 0, 3)]+=-0.373550780319*x[2]**o + (-0.0318873923828)*x[2]
            ref[(2, 0, 3)]+=-0.373550780319*x_ref[2]**o + (-0.0318873923828)*x_ref[2]
            arg[(2, 1, 0)]+=-0.251790810981*x[2]**o + (0.702192709268)*x[2]
            ref[(2, 1, 0)]+=-0.251790810981*x_ref[2]**o + (0.702192709268)*x_ref[2]
            arg[(2, 1, 1)]+=0.657189361023*x[2]**o + (0.650150790557)*x[2]
            ref[(2, 1, 1)]+=0.657189361023*x_ref[2]**o + (0.650150790557)*x_ref[2]
            arg[(2, 1, 2)]+=-0.38852474178*x[2]**o + (-0.537683782781)*x[2]
            ref[(2, 1, 2)]+=-0.38852474178*x_ref[2]**o + (-0.537683782781)*x_ref[2]
            arg[(2, 1, 3)]+=0.652430822228*x[2]**o + (0.32940217906)*x[2]
            ref[(2, 1, 3)]+=0.652430822228*x_ref[2]**o + (0.32940217906)*x_ref[2]
            arg[(2, 2, 0)]+=-0.723522541576*x[2]**o + (0.0259131194841)*x[2]
            ref[(2, 2, 0)]+=-0.723522541576*x_ref[2]**o + (0.0259131194841)*x_ref[2]
            arg[(2, 2, 1)]+=0.40067062719*x[2]**o + (-0.326256124021)*x[2]
            ref[(2, 2, 1)]+=0.40067062719*x_ref[2]**o + (-0.326256124021)*x_ref[2]
            arg[(2, 2, 2)]+=0.912611108947*x[2]**o + (0.541313607832)*x[2]
            ref[(2, 2, 2)]+=0.912611108947*x_ref[2]**o + (0.541313607832)*x_ref[2]
            arg[(2, 2, 3)]+=-0.327505669888*x[2]**o + (-0.817387539088)*x[2]
            ref[(2, 2, 3)]+=-0.327505669888*x_ref[2]**o + (-0.817387539088)*x_ref[2]
            arg[(3, 0, 0)]+=0.782884763061*x[2]**o + (-0.0964674251759)*x[2]
            ref[(3, 0, 0)]+=0.782884763061*x_ref[2]**o + (-0.0964674251759)*x_ref[2]
            arg[(3, 0, 1)]+=-0.935519054017*x[2]**o + (-0.703127426015)*x[2]
            ref[(3, 0, 1)]+=-0.935519054017*x_ref[2]**o + (-0.703127426015)*x_ref[2]
            arg[(3, 0, 2)]+=-0.924911831387*x[2]**o + (-0.327158332121)*x[2]
            ref[(3, 0, 2)]+=-0.924911831387*x_ref[2]**o + (-0.327158332121)*x_ref[2]
            arg[(3, 0, 3)]+=-0.862221801738*x[2]**o + (-0.530907618421)*x[2]
            ref[(3, 0, 3)]+=-0.862221801738*x_ref[2]**o + (-0.530907618421)*x_ref[2]
            arg[(3, 1, 0)]+=0.383549829692*x[2]**o + (-0.0398571676401)*x[2]
            ref[(3, 1, 0)]+=0.383549829692*x_ref[2]**o + (-0.0398571676401)*x_ref[2]
            arg[(3, 1, 1)]+=-0.508940367429*x[2]**o + (0.986772717657)*x[2]
            ref[(3, 1, 1)]+=-0.508940367429*x_ref[2]**o + (0.986772717657)*x_ref[2]
            arg[(3, 1, 2)]+=0.776892220292*x[2]**o + (0.464551675789)*x[2]
            ref[(3, 1, 2)]+=0.776892220292*x_ref[2]**o + (0.464551675789)*x_ref[2]
            arg[(3, 1, 3)]+=0.259081424008*x[2]**o + (-0.510709588741)*x[2]
            ref[(3, 1, 3)]+=0.259081424008*x_ref[2]**o + (-0.510709588741)*x_ref[2]
            arg[(3, 2, 0)]+=-0.903014780423*x[2]**o + (0.742332030042)*x[2]
            ref[(3, 2, 0)]+=-0.903014780423*x_ref[2]**o + (0.742332030042)*x_ref[2]
            arg[(3, 2, 1)]+=-0.519468460302*x[2]**o + (-0.297549467841)*x[2]
            ref[(3, 2, 1)]+=-0.519468460302*x_ref[2]**o + (-0.297549467841)*x_ref[2]
            arg[(3, 2, 2)]+=0.395843455303*x[2]**o + (-0.0152340424679)*x[2]
            ref[(3, 2, 2)]+=0.395843455303*x_ref[2]**o + (-0.0152340424679)*x_ref[2]
            arg[(3, 2, 3)]+=0.32534723587*x[2]**o + (-0.289610435244)*x[2]
            ref[(3, 2, 3)]+=0.32534723587*x_ref[2]**o + (-0.289610435244)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_Solution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports interpolation from Solution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 3, 3),w)
        ref = Data(0,(4, 4, 3, 3),w_ref)
        arg[(0, 0, 0, 0)]=0.0806085157452*x[0]**o + (0.745397072562)*x[0] + (-0.57244740673)*x[1]**o + (0.924905168252)*x[1]
        ref[(0, 0, 0, 0)]=0.0806085157452*x_ref[0]**o + (0.745397072562)*x_ref[0] + (-0.57244740673)*x_ref[1]**o + (0.924905168252)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.418988733226*x[0]**o + (-0.579488754644)*x[0] + (-0.849372839461)*x[1]**o + (-0.125305595719)*x[1]
        ref[(0, 0, 0, 1)]=0.418988733226*x_ref[0]**o + (-0.579488754644)*x_ref[0] + (-0.849372839461)*x_ref[1]**o + (-0.125305595719)*x_ref[1]
        arg[(0, 0, 0, 2)]=-0.328682495779*x[0]**o + (0.431431717991)*x[0] + (0.777453651618)*x[1]**o + (-0.448668276718)*x[1]
        ref[(0, 0, 0, 2)]=-0.328682495779*x_ref[0]**o + (0.431431717991)*x_ref[0] + (0.777453651618)*x_ref[1]**o + (-0.448668276718)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.981677114253*x[0]**o + (-0.518479943419)*x[0] + (0.0178165226435)*x[1]**o + (-0.612054488763)*x[1]
        ref[(0, 0, 1, 0)]=0.981677114253*x_ref[0]**o + (-0.518479943419)*x_ref[0] + (0.0178165226435)*x_ref[1]**o + (-0.612054488763)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.981929658836*x[0]**o + (-0.529293735207)*x[0] + (0.946465087303)*x[1]**o + (0.777854925309)*x[1]
        ref[(0, 0, 1, 1)]=0.981929658836*x_ref[0]**o + (-0.529293735207)*x_ref[0] + (0.946465087303)*x_ref[1]**o + (0.777854925309)*x_ref[1]
        arg[(0, 0, 1, 2)]=0.943691552637*x[0]**o + (0.207707248416)*x[0] + (0.390873269993)*x[1]**o + (0.478681117533)*x[1]
        ref[(0, 0, 1, 2)]=0.943691552637*x_ref[0]**o + (0.207707248416)*x_ref[0] + (0.390873269993)*x_ref[1]**o + (0.478681117533)*x_ref[1]
        arg[(0, 0, 2, 0)]=0.544444409882*x[0]**o + (0.951562927991)*x[0] + (-0.516425837574)*x[1]**o + (-0.663106720564)*x[1]
        ref[(0, 0, 2, 0)]=0.544444409882*x_ref[0]**o + (0.951562927991)*x_ref[0] + (-0.516425837574)*x_ref[1]**o + (-0.663106720564)*x_ref[1]
        arg[(0, 0, 2, 1)]=0.742216023981*x[0]**o + (-0.583317674519)*x[0] + (0.190480413155)*x[1]**o + (-0.265983207546)*x[1]
        ref[(0, 0, 2, 1)]=0.742216023981*x_ref[0]**o + (-0.583317674519)*x_ref[0] + (0.190480413155)*x_ref[1]**o + (-0.265983207546)*x_ref[1]
        arg[(0, 0, 2, 2)]=0.579075019377*x[0]**o + (-0.0555656560429)*x[0] + (-0.346076850764)*x[1]**o + (0.277038481733)*x[1]
        ref[(0, 0, 2, 2)]=0.579075019377*x_ref[0]**o + (-0.0555656560429)*x_ref[0] + (-0.346076850764)*x_ref[1]**o + (0.277038481733)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.406719747158*x[0]**o + (0.778608253656)*x[0] + (0.653090778471)*x[1]**o + (-0.346868083843)*x[1]
        ref[(0, 1, 0, 0)]=0.406719747158*x_ref[0]**o + (0.778608253656)*x_ref[0] + (0.653090778471)*x_ref[1]**o + (-0.346868083843)*x_ref[1]
        arg[(0, 1, 0, 1)]=-0.0474244245248*x[0]**o + (0.37629662848)*x[0] + (0.853593370135)*x[1]**o + (0.0431230951266)*x[1]
        ref[(0, 1, 0, 1)]=-0.0474244245248*x_ref[0]**o + (0.37629662848)*x_ref[0] + (0.853593370135)*x_ref[1]**o + (0.0431230951266)*x_ref[1]
        arg[(0, 1, 0, 2)]=-0.276114901764*x[0]**o + (0.675174172003)*x[0] + (0.912843374176)*x[1]**o + (-0.258918881825)*x[1]
        ref[(0, 1, 0, 2)]=-0.276114901764*x_ref[0]**o + (0.675174172003)*x_ref[0] + (0.912843374176)*x_ref[1]**o + (-0.258918881825)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.221506622618*x[0]**o + (-0.128074716103)*x[0] + (0.0675428215742)*x[1]**o + (-0.503064972894)*x[1]
        ref[(0, 1, 1, 0)]=-0.221506622618*x_ref[0]**o + (-0.128074716103)*x_ref[0] + (0.0675428215742)*x_ref[1]**o + (-0.503064972894)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.244210050031*x[0]**o + (0.142354192013)*x[0] + (-0.58231792117)*x[1]**o + (0.0722140449825)*x[1]
        ref[(0, 1, 1, 1)]=0.244210050031*x_ref[0]**o + (0.142354192013)*x_ref[0] + (-0.58231792117)*x_ref[1]**o + (0.0722140449825)*x_ref[1]
        arg[(0, 1, 1, 2)]=0.47399250593*x[0]**o + (-0.125821154534)*x[0] + (-0.508679516925)*x[1]**o + (-0.302330619201)*x[1]
        ref[(0, 1, 1, 2)]=0.47399250593*x_ref[0]**o + (-0.125821154534)*x_ref[0] + (-0.508679516925)*x_ref[1]**o + (-0.302330619201)*x_ref[1]
        arg[(0, 1, 2, 0)]=0.320106132337*x[0]**o + (0.970182512311)*x[0] + (0.510813693926)*x[1]**o + (-0.276913820102)*x[1]
        ref[(0, 1, 2, 0)]=0.320106132337*x_ref[0]**o + (0.970182512311)*x_ref[0] + (0.510813693926)*x_ref[1]**o + (-0.276913820102)*x_ref[1]
        arg[(0, 1, 2, 1)]=-0.60162657092*x[0]**o + (0.60876209478)*x[0] + (0.109481215427)*x[1]**o + (0.39622137673)*x[1]
        ref[(0, 1, 2, 1)]=-0.60162657092*x_ref[0]**o + (0.60876209478)*x_ref[0] + (0.109481215427)*x_ref[1]**o + (0.39622137673)*x_ref[1]
        arg[(0, 1, 2, 2)]=0.40872851314*x[0]**o + (-0.584962642792)*x[0] + (0.480412639318)*x[1]**o + (-0.0476955493753)*x[1]
        ref[(0, 1, 2, 2)]=0.40872851314*x_ref[0]**o + (-0.584962642792)*x_ref[0] + (0.480412639318)*x_ref[1]**o + (-0.0476955493753)*x_ref[1]
        arg[(0, 2, 0, 0)]=-0.360617234265*x[0]**o + (0.901076716376)*x[0] + (-0.0295062149193)*x[1]**o + (-0.24555452555)*x[1]
        ref[(0, 2, 0, 0)]=-0.360617234265*x_ref[0]**o + (0.901076716376)*x_ref[0] + (-0.0295062149193)*x_ref[1]**o + (-0.24555452555)*x_ref[1]
        arg[(0, 2, 0, 1)]=-0.695787796025*x[0]**o + (0.491029250753)*x[0] + (0.363416595201)*x[1]**o + (0.680720992921)*x[1]
        ref[(0, 2, 0, 1)]=-0.695787796025*x_ref[0]**o + (0.491029250753)*x_ref[0] + (0.363416595201)*x_ref[1]**o + (0.680720992921)*x_ref[1]
        arg[(0, 2, 0, 2)]=-0.405935414182*x[0]**o + (0.625800211694)*x[0] + (-0.230132538649)*x[1]**o + (-0.0781275599289)*x[1]
        ref[(0, 2, 0, 2)]=-0.405935414182*x_ref[0]**o + (0.625800211694)*x_ref[0] + (-0.230132538649)*x_ref[1]**o + (-0.0781275599289)*x_ref[1]
        arg[(0, 2, 1, 0)]=-0.667715621901*x[0]**o + (0.833495674542)*x[0] + (0.565521287037)*x[1]**o + (-0.988249130645)*x[1]
        ref[(0, 2, 1, 0)]=-0.667715621901*x_ref[0]**o + (0.833495674542)*x_ref[0] + (0.565521287037)*x_ref[1]**o + (-0.988249130645)*x_ref[1]
        arg[(0, 2, 1, 1)]=-0.432558957793*x[0]**o + (-0.835717335436)*x[0] + (0.463544441931)*x[1]**o + (-0.976186467034)*x[1]
        ref[(0, 2, 1, 1)]=-0.432558957793*x_ref[0]**o + (-0.835717335436)*x_ref[0] + (0.463544441931)*x_ref[1]**o + (-0.976186467034)*x_ref[1]
        arg[(0, 2, 1, 2)]=-0.912154354877*x[0]**o + (-0.495744992694)*x[0] + (0.210272454612)*x[1]**o + (0.434387693561)*x[1]
        ref[(0, 2, 1, 2)]=-0.912154354877*x_ref[0]**o + (-0.495744992694)*x_ref[0] + (0.210272454612)*x_ref[1]**o + (0.434387693561)*x_ref[1]
        arg[(0, 2, 2, 0)]=0.374325347842*x[0]**o + (-0.885502772485)*x[0] + (-0.388943150609)*x[1]**o + (-0.629324446941)*x[1]
        ref[(0, 2, 2, 0)]=0.374325347842*x_ref[0]**o + (-0.885502772485)*x_ref[0] + (-0.388943150609)*x_ref[1]**o + (-0.629324446941)*x_ref[1]
        arg[(0, 2, 2, 1)]=0.511840039998*x[0]**o + (-0.0992851248567)*x[0] + (0.634135515578)*x[1]**o + (-0.16912881683)*x[1]
        ref[(0, 2, 2, 1)]=0.511840039998*x_ref[0]**o + (-0.0992851248567)*x_ref[0] + (0.634135515578)*x_ref[1]**o + (-0.16912881683)*x_ref[1]
        arg[(0, 2, 2, 2)]=-0.962137577318*x[0]**o + (-0.251434159353)*x[0] + (0.823556390167)*x[1]**o + (0.156779125217)*x[1]
        ref[(0, 2, 2, 2)]=-0.962137577318*x_ref[0]**o + (-0.251434159353)*x_ref[0] + (0.823556390167)*x_ref[1]**o + (0.156779125217)*x_ref[1]
        arg[(0, 3, 0, 0)]=0.705603199869*x[0]**o + (0.314117794364)*x[0] + (-0.295079776077)*x[1]**o + (0.0967171624702)*x[1]
        ref[(0, 3, 0, 0)]=0.705603199869*x_ref[0]**o + (0.314117794364)*x_ref[0] + (-0.295079776077)*x_ref[1]**o + (0.0967171624702)*x_ref[1]
        arg[(0, 3, 0, 1)]=0.195343047843*x[0]**o + (0.13844734058)*x[0] + (-0.752013949531)*x[1]**o + (0.327836087634)*x[1]
        ref[(0, 3, 0, 1)]=0.195343047843*x_ref[0]**o + (0.13844734058)*x_ref[0] + (-0.752013949531)*x_ref[1]**o + (0.327836087634)*x_ref[1]
        arg[(0, 3, 0, 2)]=-0.47604811076*x[0]**o + (-0.366254669474)*x[0] + (0.619834492529)*x[1]**o + (0.48074740224)*x[1]
        ref[(0, 3, 0, 2)]=-0.47604811076*x_ref[0]**o + (-0.366254669474)*x_ref[0] + (0.619834492529)*x_ref[1]**o + (0.48074740224)*x_ref[1]
        arg[(0, 3, 1, 0)]=-0.294124486637*x[0]**o + (-0.678636752141)*x[0] + (0.97150647576)*x[1]**o + (-0.112056511532)*x[1]
        ref[(0, 3, 1, 0)]=-0.294124486637*x_ref[0]**o + (-0.678636752141)*x_ref[0] + (0.97150647576)*x_ref[1]**o + (-0.112056511532)*x_ref[1]
        arg[(0, 3, 1, 1)]=0.734331905377*x[0]**o + (0.133454469412)*x[0] + (-0.702681219162)*x[1]**o + (-0.0362890286963)*x[1]
        ref[(0, 3, 1, 1)]=0.734331905377*x_ref[0]**o + (0.133454469412)*x_ref[0] + (-0.702681219162)*x_ref[1]**o + (-0.0362890286963)*x_ref[1]
        arg[(0, 3, 1, 2)]=-0.492960570077*x[0]**o + (0.26362121253)*x[0] + (-0.107773080897)*x[1]**o + (0.370637555782)*x[1]
        ref[(0, 3, 1, 2)]=-0.492960570077*x_ref[0]**o + (0.26362121253)*x_ref[0] + (-0.107773080897)*x_ref[1]**o + (0.370637555782)*x_ref[1]
        arg[(0, 3, 2, 0)]=0.913733681561*x[0]**o + (-0.437863281836)*x[0] + (0.93734214912)*x[1]**o + (-0.529720120957)*x[1]
        ref[(0, 3, 2, 0)]=0.913733681561*x_ref[0]**o + (-0.437863281836)*x_ref[0] + (0.93734214912)*x_ref[1]**o + (-0.529720120957)*x_ref[1]
        arg[(0, 3, 2, 1)]=0.680853861273*x[0]**o + (0.684174532796)*x[0] + (0.667614182669)*x[1]**o + (-0.888762625517)*x[1]
        ref[(0, 3, 2, 1)]=0.680853861273*x_ref[0]**o + (0.684174532796)*x_ref[0] + (0.667614182669)*x_ref[1]**o + (-0.888762625517)*x_ref[1]
        arg[(0, 3, 2, 2)]=-0.691380704662*x[0]**o + (0.462639415048)*x[0] + (0.698291273068)*x[1]**o + (0.0622831747585)*x[1]
        ref[(0, 3, 2, 2)]=-0.691380704662*x_ref[0]**o + (0.462639415048)*x_ref[0] + (0.698291273068)*x_ref[1]**o + (0.0622831747585)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.944002089798*x[0]**o + (0.613785636079)*x[0] + (-0.0443825693662)*x[1]**o + (0.162844116056)*x[1]
        ref[(1, 0, 0, 0)]=-0.944002089798*x_ref[0]**o + (0.613785636079)*x_ref[0] + (-0.0443825693662)*x_ref[1]**o + (0.162844116056)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.497958264533*x[0]**o + (0.65059415198)*x[0] + (0.0473130347662)*x[1]**o + (-0.480915845936)*x[1]
        ref[(1, 0, 0, 1)]=-0.497958264533*x_ref[0]**o + (0.65059415198)*x_ref[0] + (0.0473130347662)*x_ref[1]**o + (-0.480915845936)*x_ref[1]
        arg[(1, 0, 0, 2)]=0.284194674046*x[0]**o + (-0.740377061673)*x[0] + (0.865967208919)*x[1]**o + (0.689490035161)*x[1]
        ref[(1, 0, 0, 2)]=0.284194674046*x_ref[0]**o + (-0.740377061673)*x_ref[0] + (0.865967208919)*x_ref[1]**o + (0.689490035161)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.707329628344*x[0]**o + (-0.820283402969)*x[0] + (0.382057971791)*x[1]**o + (-0.618709810935)*x[1]
        ref[(1, 0, 1, 0)]=-0.707329628344*x_ref[0]**o + (-0.820283402969)*x_ref[0] + (0.382057971791)*x_ref[1]**o + (-0.618709810935)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.367414747626*x[0]**o + (-0.244801374036)*x[0] + (0.272718139797)*x[1]**o + (0.0987663692151)*x[1]
        ref[(1, 0, 1, 1)]=0.367414747626*x_ref[0]**o + (-0.244801374036)*x_ref[0] + (0.272718139797)*x_ref[1]**o + (0.0987663692151)*x_ref[1]
        arg[(1, 0, 1, 2)]=0.0967434077819*x[0]**o + (-0.412128404434)*x[0] + (0.0599447353494)*x[1]**o + (0.105948287523)*x[1]
        ref[(1, 0, 1, 2)]=0.0967434077819*x_ref[0]**o + (-0.412128404434)*x_ref[0] + (0.0599447353494)*x_ref[1]**o + (0.105948287523)*x_ref[1]
        arg[(1, 0, 2, 0)]=-0.25230769002*x[0]**o + (-0.948062034749)*x[0] + (-0.978082351271)*x[1]**o + (0.391356529176)*x[1]
        ref[(1, 0, 2, 0)]=-0.25230769002*x_ref[0]**o + (-0.948062034749)*x_ref[0] + (-0.978082351271)*x_ref[1]**o + (0.391356529176)*x_ref[1]
        arg[(1, 0, 2, 1)]=-0.414217098482*x[0]**o + (0.154143732461)*x[0] + (0.707357613471)*x[1]**o + (-0.372673001937)*x[1]
        ref[(1, 0, 2, 1)]=-0.414217098482*x_ref[0]**o + (0.154143732461)*x_ref[0] + (0.707357613471)*x_ref[1]**o + (-0.372673001937)*x_ref[1]
        arg[(1, 0, 2, 2)]=0.889286156699*x[0]**o + (-0.947600249299)*x[0] + (0.279456388337)*x[1]**o + (-0.81776523498)*x[1]
        ref[(1, 0, 2, 2)]=0.889286156699*x_ref[0]**o + (-0.947600249299)*x_ref[0] + (0.279456388337)*x_ref[1]**o + (-0.81776523498)*x_ref[1]
        arg[(1, 1, 0, 0)]=0.462982346697*x[0]**o + (0.397638032469)*x[0] + (-0.680138017764)*x[1]**o + (-0.639609101771)*x[1]
        ref[(1, 1, 0, 0)]=0.462982346697*x_ref[0]**o + (0.397638032469)*x_ref[0] + (-0.680138017764)*x_ref[1]**o + (-0.639609101771)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.363583154311*x[0]**o + (0.110939904556)*x[0] + (0.267550644968)*x[1]**o + (-0.431089696389)*x[1]
        ref[(1, 1, 0, 1)]=0.363583154311*x_ref[0]**o + (0.110939904556)*x_ref[0] + (0.267550644968)*x_ref[1]**o + (-0.431089696389)*x_ref[1]
        arg[(1, 1, 0, 2)]=0.415873367791*x[0]**o + (0.0165985729573)*x[0] + (-0.261704645249)*x[1]**o + (-0.105771536746)*x[1]
        ref[(1, 1, 0, 2)]=0.415873367791*x_ref[0]**o + (0.0165985729573)*x_ref[0] + (-0.261704645249)*x_ref[1]**o + (-0.105771536746)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.682665131084*x[0]**o + (0.509175679093)*x[0] + (0.750421682031)*x[1]**o + (0.587241619844)*x[1]
        ref[(1, 1, 1, 0)]=0.682665131084*x_ref[0]**o + (0.509175679093)*x_ref[0] + (0.750421682031)*x_ref[1]**o + (0.587241619844)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.434499963977*x[0]**o + (0.239156456786)*x[0] + (0.389508934288)*x[1]**o + (0.129109157821)*x[1]
        ref[(1, 1, 1, 1)]=-0.434499963977*x_ref[0]**o + (0.239156456786)*x_ref[0] + (0.389508934288)*x_ref[1]**o + (0.129109157821)*x_ref[1]
        arg[(1, 1, 1, 2)]=0.609271789591*x[0]**o + (0.683128799228)*x[0] + (-0.633848289485)*x[1]**o + (0.500743545175)*x[1]
        ref[(1, 1, 1, 2)]=0.609271789591*x_ref[0]**o + (0.683128799228)*x_ref[0] + (-0.633848289485)*x_ref[1]**o + (0.500743545175)*x_ref[1]
        arg[(1, 1, 2, 0)]=0.536170752887*x[0]**o + (-0.157315560884)*x[0] + (-0.715324749332)*x[1]**o + (0.0588422787032)*x[1]
        ref[(1, 1, 2, 0)]=0.536170752887*x_ref[0]**o + (-0.157315560884)*x_ref[0] + (-0.715324749332)*x_ref[1]**o + (0.0588422787032)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.643396983991*x[0]**o + (-0.386268872491)*x[0] + (-0.252481912796)*x[1]**o + (-0.980220903262)*x[1]
        ref[(1, 1, 2, 1)]=-0.643396983991*x_ref[0]**o + (-0.386268872491)*x_ref[0] + (-0.252481912796)*x_ref[1]**o + (-0.980220903262)*x_ref[1]
        arg[(1, 1, 2, 2)]=0.957745995507*x[0]**o + (-0.492967135472)*x[0] + (0.681626597794)*x[1]**o + (0.374082143715)*x[1]
        ref[(1, 1, 2, 2)]=0.957745995507*x_ref[0]**o + (-0.492967135472)*x_ref[0] + (0.681626597794)*x_ref[1]**o + (0.374082143715)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.0148267975235*x[0]**o + (-0.582733439851)*x[0] + (-0.46662561314)*x[1]**o + (-0.230384263904)*x[1]
        ref[(1, 2, 0, 0)]=-0.0148267975235*x_ref[0]**o + (-0.582733439851)*x_ref[0] + (-0.46662561314)*x_ref[1]**o + (-0.230384263904)*x_ref[1]
        arg[(1, 2, 0, 1)]=-0.217176918641*x[0]**o + (-0.0620643148388)*x[0] + (-0.946858639277)*x[1]**o + (-0.811311849855)*x[1]
        ref[(1, 2, 0, 1)]=-0.217176918641*x_ref[0]**o + (-0.0620643148388)*x_ref[0] + (-0.946858639277)*x_ref[1]**o + (-0.811311849855)*x_ref[1]
        arg[(1, 2, 0, 2)]=-0.547585039987*x[0]**o + (0.520143540732)*x[0] + (-0.446262665365)*x[1]**o + (0.243328449006)*x[1]
        ref[(1, 2, 0, 2)]=-0.547585039987*x_ref[0]**o + (0.520143540732)*x_ref[0] + (-0.446262665365)*x_ref[1]**o + (0.243328449006)*x_ref[1]
        arg[(1, 2, 1, 0)]=-0.704404806442*x[0]**o + (-0.704778707087)*x[0] + (-0.565712661659)*x[1]**o + (0.946462302243)*x[1]
        ref[(1, 2, 1, 0)]=-0.704404806442*x_ref[0]**o + (-0.704778707087)*x_ref[0] + (-0.565712661659)*x_ref[1]**o + (0.946462302243)*x_ref[1]
        arg[(1, 2, 1, 1)]=0.571710609191*x[0]**o + (-0.0492346144272)*x[0] + (0.119546676394)*x[1]**o + (-0.993023565258)*x[1]
        ref[(1, 2, 1, 1)]=0.571710609191*x_ref[0]**o + (-0.0492346144272)*x_ref[0] + (0.119546676394)*x_ref[1]**o + (-0.993023565258)*x_ref[1]
        arg[(1, 2, 1, 2)]=-0.869837265427*x[0]**o + (-0.0544514849216)*x[0] + (0.288000475587)*x[1]**o + (0.286001411095)*x[1]
        ref[(1, 2, 1, 2)]=-0.869837265427*x_ref[0]**o + (-0.0544514849216)*x_ref[0] + (0.288000475587)*x_ref[1]**o + (0.286001411095)*x_ref[1]
        arg[(1, 2, 2, 0)]=-0.743888006628*x[0]**o + (-0.00981252253807)*x[0] + (-0.642149621723)*x[1]**o + (-0.34863005022)*x[1]
        ref[(1, 2, 2, 0)]=-0.743888006628*x_ref[0]**o + (-0.00981252253807)*x_ref[0] + (-0.642149621723)*x_ref[1]**o + (-0.34863005022)*x_ref[1]
        arg[(1, 2, 2, 1)]=-0.386286679284*x[0]**o + (-0.187149941942)*x[0] + (-0.913587992103)*x[1]**o + (-0.339271706316)*x[1]
        ref[(1, 2, 2, 1)]=-0.386286679284*x_ref[0]**o + (-0.187149941942)*x_ref[0] + (-0.913587992103)*x_ref[1]**o + (-0.339271706316)*x_ref[1]
        arg[(1, 2, 2, 2)]=0.97923663002*x[0]**o + (-0.934597174121)*x[0] + (-0.377218721901)*x[1]**o + (-0.945422043855)*x[1]
        ref[(1, 2, 2, 2)]=0.97923663002*x_ref[0]**o + (-0.934597174121)*x_ref[0] + (-0.377218721901)*x_ref[1]**o + (-0.945422043855)*x_ref[1]
        arg[(1, 3, 0, 0)]=-0.710416522126*x[0]**o + (-0.692815002341)*x[0] + (-0.911369386564)*x[1]**o + (0.592054182229)*x[1]
        ref[(1, 3, 0, 0)]=-0.710416522126*x_ref[0]**o + (-0.692815002341)*x_ref[0] + (-0.911369386564)*x_ref[1]**o + (0.592054182229)*x_ref[1]
        arg[(1, 3, 0, 1)]=0.907588837853*x[0]**o + (0.994460145852)*x[0] + (0.739477496112)*x[1]**o + (-0.836237149936)*x[1]
        ref[(1, 3, 0, 1)]=0.907588837853*x_ref[0]**o + (0.994460145852)*x_ref[0] + (0.739477496112)*x_ref[1]**o + (-0.836237149936)*x_ref[1]
        arg[(1, 3, 0, 2)]=-0.635419547005*x[0]**o + (-0.783851484961)*x[0] + (-0.0610806639267)*x[1]**o + (-0.962782206351)*x[1]
        ref[(1, 3, 0, 2)]=-0.635419547005*x_ref[0]**o + (-0.783851484961)*x_ref[0] + (-0.0610806639267)*x_ref[1]**o + (-0.962782206351)*x_ref[1]
        arg[(1, 3, 1, 0)]=0.439317909852*x[0]**o + (-0.565283618192)*x[0] + (0.366820861337)*x[1]**o + (-0.701308283242)*x[1]
        ref[(1, 3, 1, 0)]=0.439317909852*x_ref[0]**o + (-0.565283618192)*x_ref[0] + (0.366820861337)*x_ref[1]**o + (-0.701308283242)*x_ref[1]
        arg[(1, 3, 1, 1)]=0.775764470437*x[0]**o + (0.990426958109)*x[0] + (-0.67770387023)*x[1]**o + (0.945234230227)*x[1]
        ref[(1, 3, 1, 1)]=0.775764470437*x_ref[0]**o + (0.990426958109)*x_ref[0] + (-0.67770387023)*x_ref[1]**o + (0.945234230227)*x_ref[1]
        arg[(1, 3, 1, 2)]=0.0793403866472*x[0]**o + (0.840175922467)*x[0] + (-0.209136557284)*x[1]**o + (0.414709752426)*x[1]
        ref[(1, 3, 1, 2)]=0.0793403866472*x_ref[0]**o + (0.840175922467)*x_ref[0] + (-0.209136557284)*x_ref[1]**o + (0.414709752426)*x_ref[1]
        arg[(1, 3, 2, 0)]=0.62267827376*x[0]**o + (0.943004813008)*x[0] + (-0.861859701074)*x[1]**o + (-0.990435808446)*x[1]
        ref[(1, 3, 2, 0)]=0.62267827376*x_ref[0]**o + (0.943004813008)*x_ref[0] + (-0.861859701074)*x_ref[1]**o + (-0.990435808446)*x_ref[1]
        arg[(1, 3, 2, 1)]=-0.238770689719*x[0]**o + (0.966024841681)*x[0] + (-0.963420737557)*x[1]**o + (-0.14362007818)*x[1]
        ref[(1, 3, 2, 1)]=-0.238770689719*x_ref[0]**o + (0.966024841681)*x_ref[0] + (-0.963420737557)*x_ref[1]**o + (-0.14362007818)*x_ref[1]
        arg[(1, 3, 2, 2)]=0.434852911545*x[0]**o + (0.814041824511)*x[0] + (-0.582952852198)*x[1]**o + (-0.55085367808)*x[1]
        ref[(1, 3, 2, 2)]=0.434852911545*x_ref[0]**o + (0.814041824511)*x_ref[0] + (-0.582952852198)*x_ref[1]**o + (-0.55085367808)*x_ref[1]
        arg[(2, 0, 0, 0)]=0.580594713244*x[0]**o + (-0.401874967959)*x[0] + (-0.41313036463)*x[1]**o + (-0.811294241457)*x[1]
        ref[(2, 0, 0, 0)]=0.580594713244*x_ref[0]**o + (-0.401874967959)*x_ref[0] + (-0.41313036463)*x_ref[1]**o + (-0.811294241457)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.714917577328*x[0]**o + (0.0858682595996)*x[0] + (0.19130797189)*x[1]**o + (-0.783291244711)*x[1]
        ref[(2, 0, 0, 1)]=0.714917577328*x_ref[0]**o + (0.0858682595996)*x_ref[0] + (0.19130797189)*x_ref[1]**o + (-0.783291244711)*x_ref[1]
        arg[(2, 0, 0, 2)]=0.461778902526*x[0]**o + (-0.678434294822)*x[0] + (-0.101506479907)*x[1]**o + (0.148073409275)*x[1]
        ref[(2, 0, 0, 2)]=0.461778902526*x_ref[0]**o + (-0.678434294822)*x_ref[0] + (-0.101506479907)*x_ref[1]**o + (0.148073409275)*x_ref[1]
        arg[(2, 0, 1, 0)]=-0.953982594056*x[0]**o + (-0.708926876449)*x[0] + (-0.964732545368)*x[1]**o + (-0.968066963447)*x[1]
        ref[(2, 0, 1, 0)]=-0.953982594056*x_ref[0]**o + (-0.708926876449)*x_ref[0] + (-0.964732545368)*x_ref[1]**o + (-0.968066963447)*x_ref[1]
        arg[(2, 0, 1, 1)]=0.751356260881*x[0]**o + (0.14681559692)*x[0] + (-0.368173534076)*x[1]**o + (0.452226751202)*x[1]
        ref[(2, 0, 1, 1)]=0.751356260881*x_ref[0]**o + (0.14681559692)*x_ref[0] + (-0.368173534076)*x_ref[1]**o + (0.452226751202)*x_ref[1]
        arg[(2, 0, 1, 2)]=-0.802851007596*x[0]**o + (-0.749200370174)*x[0] + (-0.822086827828)*x[1]**o + (-0.470688488051)*x[1]
        ref[(2, 0, 1, 2)]=-0.802851007596*x_ref[0]**o + (-0.749200370174)*x_ref[0] + (-0.822086827828)*x_ref[1]**o + (-0.470688488051)*x_ref[1]
        arg[(2, 0, 2, 0)]=-0.0523744697569*x[0]**o + (0.110505219785)*x[0] + (-0.223694863988)*x[1]**o + (0.405086226285)*x[1]
        ref[(2, 0, 2, 0)]=-0.0523744697569*x_ref[0]**o + (0.110505219785)*x_ref[0] + (-0.223694863988)*x_ref[1]**o + (0.405086226285)*x_ref[1]
        arg[(2, 0, 2, 1)]=0.150479551933*x[0]**o + (0.740208919001)*x[0] + (-0.247700629559)*x[1]**o + (-0.422797820244)*x[1]
        ref[(2, 0, 2, 1)]=0.150479551933*x_ref[0]**o + (0.740208919001)*x_ref[0] + (-0.247700629559)*x_ref[1]**o + (-0.422797820244)*x_ref[1]
        arg[(2, 0, 2, 2)]=-0.339077918788*x[0]**o + (-0.118392013492)*x[0] + (0.0879029210813)*x[1]**o + (-0.541970963949)*x[1]
        ref[(2, 0, 2, 2)]=-0.339077918788*x_ref[0]**o + (-0.118392013492)*x_ref[0] + (0.0879029210813)*x_ref[1]**o + (-0.541970963949)*x_ref[1]
        arg[(2, 1, 0, 0)]=0.124226544823*x[0]**o + (-0.211768674138)*x[0] + (-0.0503951570569)*x[1]**o + (0.284719895208)*x[1]
        ref[(2, 1, 0, 0)]=0.124226544823*x_ref[0]**o + (-0.211768674138)*x_ref[0] + (-0.0503951570569)*x_ref[1]**o + (0.284719895208)*x_ref[1]
        arg[(2, 1, 0, 1)]=0.523440904179*x[0]**o + (-0.461659703853)*x[0] + (0.332619231146)*x[1]**o + (-0.856749673391)*x[1]
        ref[(2, 1, 0, 1)]=0.523440904179*x_ref[0]**o + (-0.461659703853)*x_ref[0] + (0.332619231146)*x_ref[1]**o + (-0.856749673391)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.775181458608*x[0]**o + (0.843333333523)*x[0] + (0.701113730955)*x[1]**o + (-0.370655253721)*x[1]
        ref[(2, 1, 0, 2)]=-0.775181458608*x_ref[0]**o + (0.843333333523)*x_ref[0] + (0.701113730955)*x_ref[1]**o + (-0.370655253721)*x_ref[1]
        arg[(2, 1, 1, 0)]=-0.455314847554*x[0]**o + (0.845229477355)*x[0] + (-0.603658088914)*x[1]**o + (0.704975334396)*x[1]
        ref[(2, 1, 1, 0)]=-0.455314847554*x_ref[0]**o + (0.845229477355)*x_ref[0] + (-0.603658088914)*x_ref[1]**o + (0.704975334396)*x_ref[1]
        arg[(2, 1, 1, 1)]=-0.850616071792*x[0]**o + (-0.902187202743)*x[0] + (-0.854571946272)*x[1]**o + (-0.963318732788)*x[1]
        ref[(2, 1, 1, 1)]=-0.850616071792*x_ref[0]**o + (-0.902187202743)*x_ref[0] + (-0.854571946272)*x_ref[1]**o + (-0.963318732788)*x_ref[1]
        arg[(2, 1, 1, 2)]=-0.544048457739*x[0]**o + (-0.456985802082)*x[0] + (-0.0568441648202)*x[1]**o + (-0.950060951978)*x[1]
        ref[(2, 1, 1, 2)]=-0.544048457739*x_ref[0]**o + (-0.456985802082)*x_ref[0] + (-0.0568441648202)*x_ref[1]**o + (-0.950060951978)*x_ref[1]
        arg[(2, 1, 2, 0)]=-0.356220620391*x[0]**o + (0.679841162821)*x[0] + (0.119739341139)*x[1]**o + (-0.741383485959)*x[1]
        ref[(2, 1, 2, 0)]=-0.356220620391*x_ref[0]**o + (0.679841162821)*x_ref[0] + (0.119739341139)*x_ref[1]**o + (-0.741383485959)*x_ref[1]
        arg[(2, 1, 2, 1)]=-0.871022581124*x[0]**o + (-0.768150935293)*x[0] + (-0.59413131754)*x[1]**o + (-0.603343017339)*x[1]
        ref[(2, 1, 2, 1)]=-0.871022581124*x_ref[0]**o + (-0.768150935293)*x_ref[0] + (-0.59413131754)*x_ref[1]**o + (-0.603343017339)*x_ref[1]
        arg[(2, 1, 2, 2)]=-0.0172304697641*x[0]**o + (0.741903067652)*x[0] + (0.630932334274)*x[1]**o + (-0.547328212577)*x[1]
        ref[(2, 1, 2, 2)]=-0.0172304697641*x_ref[0]**o + (0.741903067652)*x_ref[0] + (0.630932334274)*x_ref[1]**o + (-0.547328212577)*x_ref[1]
        arg[(2, 2, 0, 0)]=0.31918301081*x[0]**o + (-0.671428888522)*x[0] + (0.15821521073)*x[1]**o + (0.635584059912)*x[1]
        ref[(2, 2, 0, 0)]=0.31918301081*x_ref[0]**o + (-0.671428888522)*x_ref[0] + (0.15821521073)*x_ref[1]**o + (0.635584059912)*x_ref[1]
        arg[(2, 2, 0, 1)]=0.735578457757*x[0]**o + (0.328122568816)*x[0] + (0.802279332362)*x[1]**o + (0.560719803324)*x[1]
        ref[(2, 2, 0, 1)]=0.735578457757*x_ref[0]**o + (0.328122568816)*x_ref[0] + (0.802279332362)*x_ref[1]**o + (0.560719803324)*x_ref[1]
        arg[(2, 2, 0, 2)]=0.979247702166*x[0]**o + (-0.31560727465)*x[0] + (-0.508223610187)*x[1]**o + (0.366134200137)*x[1]
        ref[(2, 2, 0, 2)]=0.979247702166*x_ref[0]**o + (-0.31560727465)*x_ref[0] + (-0.508223610187)*x_ref[1]**o + (0.366134200137)*x_ref[1]
        arg[(2, 2, 1, 0)]=-0.84781047353*x[0]**o + (0.399035700392)*x[0] + (-0.194334000332)*x[1]**o + (-0.360142802053)*x[1]
        ref[(2, 2, 1, 0)]=-0.84781047353*x_ref[0]**o + (0.399035700392)*x_ref[0] + (-0.194334000332)*x_ref[1]**o + (-0.360142802053)*x_ref[1]
        arg[(2, 2, 1, 1)]=0.807302428418*x[0]**o + (0.45499413872)*x[0] + (0.0367864566206)*x[1]**o + (-0.261163229873)*x[1]
        ref[(2, 2, 1, 1)]=0.807302428418*x_ref[0]**o + (0.45499413872)*x_ref[0] + (0.0367864566206)*x_ref[1]**o + (-0.261163229873)*x_ref[1]
        arg[(2, 2, 1, 2)]=-0.148083929062*x[0]**o + (-0.709220978278)*x[0] + (-0.100272312119)*x[1]**o + (0.201118977985)*x[1]
        ref[(2, 2, 1, 2)]=-0.148083929062*x_ref[0]**o + (-0.709220978278)*x_ref[0] + (-0.100272312119)*x_ref[1]**o + (0.201118977985)*x_ref[1]
        arg[(2, 2, 2, 0)]=-0.364306657969*x[0]**o + (0.396578813207)*x[0] + (-0.293227493463)*x[1]**o + (-0.01809654143)*x[1]
        ref[(2, 2, 2, 0)]=-0.364306657969*x_ref[0]**o + (0.396578813207)*x_ref[0] + (-0.293227493463)*x_ref[1]**o + (-0.01809654143)*x_ref[1]
        arg[(2, 2, 2, 1)]=0.944748960504*x[0]**o + (0.249225762763)*x[0] + (-0.979719385941)*x[1]**o + (-0.186459204587)*x[1]
        ref[(2, 2, 2, 1)]=0.944748960504*x_ref[0]**o + (0.249225762763)*x_ref[0] + (-0.979719385941)*x_ref[1]**o + (-0.186459204587)*x_ref[1]
        arg[(2, 2, 2, 2)]=-0.797746080904*x[0]**o + (-0.724415004932)*x[0] + (0.498439162262)*x[1]**o + (-0.934158653089)*x[1]
        ref[(2, 2, 2, 2)]=-0.797746080904*x_ref[0]**o + (-0.724415004932)*x_ref[0] + (0.498439162262)*x_ref[1]**o + (-0.934158653089)*x_ref[1]
        arg[(2, 3, 0, 0)]=0.212494337021*x[0]**o + (-0.753151610418)*x[0] + (-0.969069346225)*x[1]**o + (-0.978565219972)*x[1]
        ref[(2, 3, 0, 0)]=0.212494337021*x_ref[0]**o + (-0.753151610418)*x_ref[0] + (-0.969069346225)*x_ref[1]**o + (-0.978565219972)*x_ref[1]
        arg[(2, 3, 0, 1)]=-0.24040760034*x[0]**o + (-0.109154576802)*x[0] + (0.503078202889)*x[1]**o + (0.539435107634)*x[1]
        ref[(2, 3, 0, 1)]=-0.24040760034*x_ref[0]**o + (-0.109154576802)*x_ref[0] + (0.503078202889)*x_ref[1]**o + (0.539435107634)*x_ref[1]
        arg[(2, 3, 0, 2)]=0.357971073288*x[0]**o + (-0.878077731275)*x[0] + (-0.618243193369)*x[1]**o + (0.401615353141)*x[1]
        ref[(2, 3, 0, 2)]=0.357971073288*x_ref[0]**o + (-0.878077731275)*x_ref[0] + (-0.618243193369)*x_ref[1]**o + (0.401615353141)*x_ref[1]
        arg[(2, 3, 1, 0)]=-0.00156241575712*x[0]**o + (0.190144202132)*x[0] + (-0.435545291702)*x[1]**o + (0.783268308406)*x[1]
        ref[(2, 3, 1, 0)]=-0.00156241575712*x_ref[0]**o + (0.190144202132)*x_ref[0] + (-0.435545291702)*x_ref[1]**o + (0.783268308406)*x_ref[1]
        arg[(2, 3, 1, 1)]=-0.322937055121*x[0]**o + (0.180331166133)*x[0] + (-0.837416147609)*x[1]**o + (0.872481727551)*x[1]
        ref[(2, 3, 1, 1)]=-0.322937055121*x_ref[0]**o + (0.180331166133)*x_ref[0] + (-0.837416147609)*x_ref[1]**o + (0.872481727551)*x_ref[1]
        arg[(2, 3, 1, 2)]=-0.671447704487*x[0]**o + (0.394789854499)*x[0] + (0.0796371334856)*x[1]**o + (0.858618044377)*x[1]
        ref[(2, 3, 1, 2)]=-0.671447704487*x_ref[0]**o + (0.394789854499)*x_ref[0] + (0.0796371334856)*x_ref[1]**o + (0.858618044377)*x_ref[1]
        arg[(2, 3, 2, 0)]=0.0824083164867*x[0]**o + (0.865017710513)*x[0] + (-0.498853867835)*x[1]**o + (-0.870448818938)*x[1]
        ref[(2, 3, 2, 0)]=0.0824083164867*x_ref[0]**o + (0.865017710513)*x_ref[0] + (-0.498853867835)*x_ref[1]**o + (-0.870448818938)*x_ref[1]
        arg[(2, 3, 2, 1)]=0.0528787105556*x[0]**o + (0.707528409176)*x[0] + (-0.153871387425)*x[1]**o + (0.456671161014)*x[1]
        ref[(2, 3, 2, 1)]=0.0528787105556*x_ref[0]**o + (0.707528409176)*x_ref[0] + (-0.153871387425)*x_ref[1]**o + (0.456671161014)*x_ref[1]
        arg[(2, 3, 2, 2)]=-0.993679065842*x[0]**o + (0.934175345278)*x[0] + (0.486141426652)*x[1]**o + (0.683865056896)*x[1]
        ref[(2, 3, 2, 2)]=-0.993679065842*x_ref[0]**o + (0.934175345278)*x_ref[0] + (0.486141426652)*x_ref[1]**o + (0.683865056896)*x_ref[1]
        arg[(3, 0, 0, 0)]=0.452066887441*x[0]**o + (-0.695473732892)*x[0] + (0.570092759457)*x[1]**o + (0.55915994027)*x[1]
        ref[(3, 0, 0, 0)]=0.452066887441*x_ref[0]**o + (-0.695473732892)*x_ref[0] + (0.570092759457)*x_ref[1]**o + (0.55915994027)*x_ref[1]
        arg[(3, 0, 0, 1)]=-0.815107614924*x[0]**o + (-0.473232292032)*x[0] + (-0.305018607879)*x[1]**o + (-0.187859026405)*x[1]
        ref[(3, 0, 0, 1)]=-0.815107614924*x_ref[0]**o + (-0.473232292032)*x_ref[0] + (-0.305018607879)*x_ref[1]**o + (-0.187859026405)*x_ref[1]
        arg[(3, 0, 0, 2)]=-0.665946412399*x[0]**o + (0.865328521311)*x[0] + (-0.00487269217181)*x[1]**o + (0.850742871661)*x[1]
        ref[(3, 0, 0, 2)]=-0.665946412399*x_ref[0]**o + (0.865328521311)*x_ref[0] + (-0.00487269217181)*x_ref[1]**o + (0.850742871661)*x_ref[1]
        arg[(3, 0, 1, 0)]=-0.52917106747*x[0]**o + (-0.979234823461)*x[0] + (-0.548893450609)*x[1]**o + (0.625992454069)*x[1]
        ref[(3, 0, 1, 0)]=-0.52917106747*x_ref[0]**o + (-0.979234823461)*x_ref[0] + (-0.548893450609)*x_ref[1]**o + (0.625992454069)*x_ref[1]
        arg[(3, 0, 1, 1)]=-0.0498934640033*x[0]**o + (0.474987526172)*x[0] + (-0.101983622537)*x[1]**o + (-0.974760085753)*x[1]
        ref[(3, 0, 1, 1)]=-0.0498934640033*x_ref[0]**o + (0.474987526172)*x_ref[0] + (-0.101983622537)*x_ref[1]**o + (-0.974760085753)*x_ref[1]
        arg[(3, 0, 1, 2)]=0.638027974769*x[0]**o + (-0.458805418128)*x[0] + (0.481975731758)*x[1]**o + (-0.4072433282)*x[1]
        ref[(3, 0, 1, 2)]=0.638027974769*x_ref[0]**o + (-0.458805418128)*x_ref[0] + (0.481975731758)*x_ref[1]**o + (-0.4072433282)*x_ref[1]
        arg[(3, 0, 2, 0)]=0.999583661192*x[0]**o + (0.624262941021)*x[0] + (-0.838820358302)*x[1]**o + (0.0715742259912)*x[1]
        ref[(3, 0, 2, 0)]=0.999583661192*x_ref[0]**o + (0.624262941021)*x_ref[0] + (-0.838820358302)*x_ref[1]**o + (0.0715742259912)*x_ref[1]
        arg[(3, 0, 2, 1)]=0.446200385024*x[0]**o + (-0.549090078966)*x[0] + (-0.792135718394)*x[1]**o + (0.410376496134)*x[1]
        ref[(3, 0, 2, 1)]=0.446200385024*x_ref[0]**o + (-0.549090078966)*x_ref[0] + (-0.792135718394)*x_ref[1]**o + (0.410376496134)*x_ref[1]
        arg[(3, 0, 2, 2)]=-0.675658058869*x[0]**o + (0.862230932168)*x[0] + (-0.0399155516966)*x[1]**o + (-0.572789524474)*x[1]
        ref[(3, 0, 2, 2)]=-0.675658058869*x_ref[0]**o + (0.862230932168)*x_ref[0] + (-0.0399155516966)*x_ref[1]**o + (-0.572789524474)*x_ref[1]
        arg[(3, 1, 0, 0)]=-0.429113319096*x[0]**o + (0.295311592128)*x[0] + (-0.715582852707)*x[1]**o + (-0.114975160446)*x[1]
        ref[(3, 1, 0, 0)]=-0.429113319096*x_ref[0]**o + (0.295311592128)*x_ref[0] + (-0.715582852707)*x_ref[1]**o + (-0.114975160446)*x_ref[1]
        arg[(3, 1, 0, 1)]=0.16068882895*x[0]**o + (-0.318575924516)*x[0] + (-0.509686148317)*x[1]**o + (-0.72338150462)*x[1]
        ref[(3, 1, 0, 1)]=0.16068882895*x_ref[0]**o + (-0.318575924516)*x_ref[0] + (-0.509686148317)*x_ref[1]**o + (-0.72338150462)*x_ref[1]
        arg[(3, 1, 0, 2)]=-0.312580387808*x[0]**o + (-0.7614611254)*x[0] + (0.0224698271887)*x[1]**o + (-0.414227837581)*x[1]
        ref[(3, 1, 0, 2)]=-0.312580387808*x_ref[0]**o + (-0.7614611254)*x_ref[0] + (0.0224698271887)*x_ref[1]**o + (-0.414227837581)*x_ref[1]
        arg[(3, 1, 1, 0)]=0.729930183926*x[0]**o + (0.249224709445)*x[0] + (0.282842037974)*x[1]**o + (0.79897595749)*x[1]
        ref[(3, 1, 1, 0)]=0.729930183926*x_ref[0]**o + (0.249224709445)*x_ref[0] + (0.282842037974)*x_ref[1]**o + (0.79897595749)*x_ref[1]
        arg[(3, 1, 1, 1)]=-0.358317453384*x[0]**o + (0.456776281446)*x[0] + (0.738592504463)*x[1]**o + (0.139021189966)*x[1]
        ref[(3, 1, 1, 1)]=-0.358317453384*x_ref[0]**o + (0.456776281446)*x_ref[0] + (0.738592504463)*x_ref[1]**o + (0.139021189966)*x_ref[1]
        arg[(3, 1, 1, 2)]=-0.290463935518*x[0]**o + (0.247760437242)*x[0] + (0.355414047847)*x[1]**o + (-0.43632077343)*x[1]
        ref[(3, 1, 1, 2)]=-0.290463935518*x_ref[0]**o + (0.247760437242)*x_ref[0] + (0.355414047847)*x_ref[1]**o + (-0.43632077343)*x_ref[1]
        arg[(3, 1, 2, 0)]=-0.355592475462*x[0]**o + (-0.565946370101)*x[0] + (-0.809286193079)*x[1]**o + (0.322944241314)*x[1]
        ref[(3, 1, 2, 0)]=-0.355592475462*x_ref[0]**o + (-0.565946370101)*x_ref[0] + (-0.809286193079)*x_ref[1]**o + (0.322944241314)*x_ref[1]
        arg[(3, 1, 2, 1)]=-0.241748837647*x[0]**o + (0.245859421319)*x[0] + (-0.919452815578)*x[1]**o + (-0.783444451589)*x[1]
        ref[(3, 1, 2, 1)]=-0.241748837647*x_ref[0]**o + (0.245859421319)*x_ref[0] + (-0.919452815578)*x_ref[1]**o + (-0.783444451589)*x_ref[1]
        arg[(3, 1, 2, 2)]=0.77548942199*x[0]**o + (-0.143188654788)*x[0] + (0.723569536666)*x[1]**o + (-0.644931342934)*x[1]
        ref[(3, 1, 2, 2)]=0.77548942199*x_ref[0]**o + (-0.143188654788)*x_ref[0] + (0.723569536666)*x_ref[1]**o + (-0.644931342934)*x_ref[1]
        arg[(3, 2, 0, 0)]=0.405396172867*x[0]**o + (-0.107329157922)*x[0] + (0.76346533969)*x[1]**o + (0.297982839964)*x[1]
        ref[(3, 2, 0, 0)]=0.405396172867*x_ref[0]**o + (-0.107329157922)*x_ref[0] + (0.76346533969)*x_ref[1]**o + (0.297982839964)*x_ref[1]
        arg[(3, 2, 0, 1)]=-0.0944765997802*x[0]**o + (0.0606619076861)*x[0] + (-0.166778004425)*x[1]**o + (0.69692410422)*x[1]
        ref[(3, 2, 0, 1)]=-0.0944765997802*x_ref[0]**o + (0.0606619076861)*x_ref[0] + (-0.166778004425)*x_ref[1]**o + (0.69692410422)*x_ref[1]
        arg[(3, 2, 0, 2)]=-0.89130791008*x[0]**o + (-0.555787398572)*x[0] + (-0.650607248839)*x[1]**o + (-0.875978037051)*x[1]
        ref[(3, 2, 0, 2)]=-0.89130791008*x_ref[0]**o + (-0.555787398572)*x_ref[0] + (-0.650607248839)*x_ref[1]**o + (-0.875978037051)*x_ref[1]
        arg[(3, 2, 1, 0)]=-0.867264407642*x[0]**o + (0.0253504045218)*x[0] + (-0.572899876767)*x[1]**o + (-0.0415750459123)*x[1]
        ref[(3, 2, 1, 0)]=-0.867264407642*x_ref[0]**o + (0.0253504045218)*x_ref[0] + (-0.572899876767)*x_ref[1]**o + (-0.0415750459123)*x_ref[1]
        arg[(3, 2, 1, 1)]=0.560445537243*x[0]**o + (-0.223802896332)*x[0] + (-0.643657873112)*x[1]**o + (0.150405265235)*x[1]
        ref[(3, 2, 1, 1)]=0.560445537243*x_ref[0]**o + (-0.223802896332)*x_ref[0] + (-0.643657873112)*x_ref[1]**o + (0.150405265235)*x_ref[1]
        arg[(3, 2, 1, 2)]=-0.745092674197*x[0]**o + (0.600540496562)*x[0] + (-0.869100994697)*x[1]**o + (0.377343812469)*x[1]
        ref[(3, 2, 1, 2)]=-0.745092674197*x_ref[0]**o + (0.600540496562)*x_ref[0] + (-0.869100994697)*x_ref[1]**o + (0.377343812469)*x_ref[1]
        arg[(3, 2, 2, 0)]=-0.881892340397*x[0]**o + (-0.295007566766)*x[0] + (-0.126838280388)*x[1]**o + (-0.474964683925)*x[1]
        ref[(3, 2, 2, 0)]=-0.881892340397*x_ref[0]**o + (-0.295007566766)*x_ref[0] + (-0.126838280388)*x_ref[1]**o + (-0.474964683925)*x_ref[1]
        arg[(3, 2, 2, 1)]=-0.348330961991*x[0]**o + (-0.820204057104)*x[0] + (-0.517588088468)*x[1]**o + (0.74535448394)*x[1]
        ref[(3, 2, 2, 1)]=-0.348330961991*x_ref[0]**o + (-0.820204057104)*x_ref[0] + (-0.517588088468)*x_ref[1]**o + (0.74535448394)*x_ref[1]
        arg[(3, 2, 2, 2)]=-0.965130837913*x[0]**o + (0.352980982433)*x[0] + (0.780553860564)*x[1]**o + (-0.0313987846668)*x[1]
        ref[(3, 2, 2, 2)]=-0.965130837913*x_ref[0]**o + (0.352980982433)*x_ref[0] + (0.780553860564)*x_ref[1]**o + (-0.0313987846668)*x_ref[1]
        arg[(3, 3, 0, 0)]=0.523617719015*x[0]**o + (-0.175248245533)*x[0] + (0.588768637049)*x[1]**o + (0.720562365696)*x[1]
        ref[(3, 3, 0, 0)]=0.523617719015*x_ref[0]**o + (-0.175248245533)*x_ref[0] + (0.588768637049)*x_ref[1]**o + (0.720562365696)*x_ref[1]
        arg[(3, 3, 0, 1)]=0.437730665202*x[0]**o + (-0.220638654529)*x[0] + (-0.406515741936)*x[1]**o + (-0.929753943596)*x[1]
        ref[(3, 3, 0, 1)]=0.437730665202*x_ref[0]**o + (-0.220638654529)*x_ref[0] + (-0.406515741936)*x_ref[1]**o + (-0.929753943596)*x_ref[1]
        arg[(3, 3, 0, 2)]=-0.899469211474*x[0]**o + (-0.740651836136)*x[0] + (-0.530765693227)*x[1]**o + (-0.566823930796)*x[1]
        ref[(3, 3, 0, 2)]=-0.899469211474*x_ref[0]**o + (-0.740651836136)*x_ref[0] + (-0.530765693227)*x_ref[1]**o + (-0.566823930796)*x_ref[1]
        arg[(3, 3, 1, 0)]=0.979730224219*x[0]**o + (-0.279998504784)*x[0] + (0.97422976287)*x[1]**o + (-0.475914911378)*x[1]
        ref[(3, 3, 1, 0)]=0.979730224219*x_ref[0]**o + (-0.279998504784)*x_ref[0] + (0.97422976287)*x_ref[1]**o + (-0.475914911378)*x_ref[1]
        arg[(3, 3, 1, 1)]=0.832592196005*x[0]**o + (0.591272846843)*x[0] + (0.980256707769)*x[1]**o + (0.656626012494)*x[1]
        ref[(3, 3, 1, 1)]=0.832592196005*x_ref[0]**o + (0.591272846843)*x_ref[0] + (0.980256707769)*x_ref[1]**o + (0.656626012494)*x_ref[1]
        arg[(3, 3, 1, 2)]=0.160777570193*x[0]**o + (-0.644965677963)*x[0] + (0.531557651065)*x[1]**o + (0.109146774056)*x[1]
        ref[(3, 3, 1, 2)]=0.160777570193*x_ref[0]**o + (-0.644965677963)*x_ref[0] + (0.531557651065)*x_ref[1]**o + (0.109146774056)*x_ref[1]
        arg[(3, 3, 2, 0)]=0.250038873776*x[0]**o + (-0.270774413342)*x[0] + (0.411670520311)*x[1]**o + (-0.632129775653)*x[1]
        ref[(3, 3, 2, 0)]=0.250038873776*x_ref[0]**o + (-0.270774413342)*x_ref[0] + (0.411670520311)*x_ref[1]**o + (-0.632129775653)*x_ref[1]
        arg[(3, 3, 2, 1)]=0.660138197466*x[0]**o + (0.593650866411)*x[0] + (0.233583760032)*x[1]**o + (0.584687942334)*x[1]
        ref[(3, 3, 2, 1)]=0.660138197466*x_ref[0]**o + (0.593650866411)*x_ref[0] + (0.233583760032)*x_ref[1]**o + (0.584687942334)*x_ref[1]
        arg[(3, 3, 2, 2)]=0.534077861503*x[0]**o + (0.867610241545)*x[0] + (0.301155006582)*x[1]**o + (0.203602440982)*x[1]
        ref[(3, 3, 2, 2)]=0.534077861503*x_ref[0]**o + (0.867610241545)*x_ref[0] + (0.301155006582)*x_ref[1]**o + (0.203602440982)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.344889218877*x[2]**o + (0.897479076066)*x[2]
            ref[(0, 0, 0, 0)]+=0.344889218877*x_ref[2]**o + (0.897479076066)*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.465596080015*x[2]**o + (0.487043036439)*x[2]
            ref[(0, 0, 0, 1)]+=0.465596080015*x_ref[2]**o + (0.487043036439)*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.549754914203*x[2]**o + (-0.980609299342)*x[2]
            ref[(0, 0, 0, 2)]+=0.549754914203*x_ref[2]**o + (-0.980609299342)*x_ref[2]
            arg[(0, 0, 1, 0)]+=0.600475012483*x[2]**o + (0.91762164965)*x[2]
            ref[(0, 0, 1, 0)]+=0.600475012483*x_ref[2]**o + (0.91762164965)*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.509679525854*x[2]**o + (0.422051856083)*x[2]
            ref[(0, 0, 1, 1)]+=-0.509679525854*x_ref[2]**o + (0.422051856083)*x_ref[2]
            arg[(0, 0, 1, 2)]+=-0.319409305768*x[2]**o + (-0.964953097518)*x[2]
            ref[(0, 0, 1, 2)]+=-0.319409305768*x_ref[2]**o + (-0.964953097518)*x_ref[2]
            arg[(0, 0, 2, 0)]+=-0.309544820436*x[2]**o + (-0.415760108087)*x[2]
            ref[(0, 0, 2, 0)]+=-0.309544820436*x_ref[2]**o + (-0.415760108087)*x_ref[2]
            arg[(0, 0, 2, 1)]+=-0.829585418235*x[2]**o + (-0.487263329245)*x[2]
            ref[(0, 0, 2, 1)]+=-0.829585418235*x_ref[2]**o + (-0.487263329245)*x_ref[2]
            arg[(0, 0, 2, 2)]+=0.397937351829*x[2]**o + (0.804392603433)*x[2]
            ref[(0, 0, 2, 2)]+=0.397937351829*x_ref[2]**o + (0.804392603433)*x_ref[2]
            arg[(0, 1, 0, 0)]+=0.00986650618863*x[2]**o + (-0.318740882772)*x[2]
            ref[(0, 1, 0, 0)]+=0.00986650618863*x_ref[2]**o + (-0.318740882772)*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.170936481747*x[2]**o + (0.0936698061411)*x[2]
            ref[(0, 1, 0, 1)]+=-0.170936481747*x_ref[2]**o + (0.0936698061411)*x_ref[2]
            arg[(0, 1, 0, 2)]+=0.713166814727*x[2]**o + (-0.564585972608)*x[2]
            ref[(0, 1, 0, 2)]+=0.713166814727*x_ref[2]**o + (-0.564585972608)*x_ref[2]
            arg[(0, 1, 1, 0)]+=-0.205204717099*x[2]**o + (0.348182796734)*x[2]
            ref[(0, 1, 1, 0)]+=-0.205204717099*x_ref[2]**o + (0.348182796734)*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.583402950379*x[2]**o + (0.055767362638)*x[2]
            ref[(0, 1, 1, 1)]+=-0.583402950379*x_ref[2]**o + (0.055767362638)*x_ref[2]
            arg[(0, 1, 1, 2)]+=-0.222702326743*x[2]**o + (-0.71632379523)*x[2]
            ref[(0, 1, 1, 2)]+=-0.222702326743*x_ref[2]**o + (-0.71632379523)*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.721083131033*x[2]**o + (-0.149464481818)*x[2]
            ref[(0, 1, 2, 0)]+=-0.721083131033*x_ref[2]**o + (-0.149464481818)*x_ref[2]
            arg[(0, 1, 2, 1)]+=-0.376407483378*x[2]**o + (0.724939997231)*x[2]
            ref[(0, 1, 2, 1)]+=-0.376407483378*x_ref[2]**o + (0.724939997231)*x_ref[2]
            arg[(0, 1, 2, 2)]+=-0.860712116828*x[2]**o + (-0.807216516275)*x[2]
            ref[(0, 1, 2, 2)]+=-0.860712116828*x_ref[2]**o + (-0.807216516275)*x_ref[2]
            arg[(0, 2, 0, 0)]+=0.568188579732*x[2]**o + (-0.027325784189)*x[2]
            ref[(0, 2, 0, 0)]+=0.568188579732*x_ref[2]**o + (-0.027325784189)*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.977745642966*x[2]**o + (-0.208930870224)*x[2]
            ref[(0, 2, 0, 1)]+=-0.977745642966*x_ref[2]**o + (-0.208930870224)*x_ref[2]
            arg[(0, 2, 0, 2)]+=0.359919165088*x[2]**o + (-0.399538000253)*x[2]
            ref[(0, 2, 0, 2)]+=0.359919165088*x_ref[2]**o + (-0.399538000253)*x_ref[2]
            arg[(0, 2, 1, 0)]+=-0.430228961766*x[2]**o + (-0.288443823952)*x[2]
            ref[(0, 2, 1, 0)]+=-0.430228961766*x_ref[2]**o + (-0.288443823952)*x_ref[2]
            arg[(0, 2, 1, 1)]+=0.851053342563*x[2]**o + (-0.851105645897)*x[2]
            ref[(0, 2, 1, 1)]+=0.851053342563*x_ref[2]**o + (-0.851105645897)*x_ref[2]
            arg[(0, 2, 1, 2)]+=-0.460486968138*x[2]**o + (-0.916283949778)*x[2]
            ref[(0, 2, 1, 2)]+=-0.460486968138*x_ref[2]**o + (-0.916283949778)*x_ref[2]
            arg[(0, 2, 2, 0)]+=0.744667384611*x[2]**o + (0.634879827622)*x[2]
            ref[(0, 2, 2, 0)]+=0.744667384611*x_ref[2]**o + (0.634879827622)*x_ref[2]
            arg[(0, 2, 2, 1)]+=-0.447843540455*x[2]**o + (0.0741085331183)*x[2]
            ref[(0, 2, 2, 1)]+=-0.447843540455*x_ref[2]**o + (0.0741085331183)*x_ref[2]
            arg[(0, 2, 2, 2)]+=-0.681381692837*x[2]**o + (-0.662403984942)*x[2]
            ref[(0, 2, 2, 2)]+=-0.681381692837*x_ref[2]**o + (-0.662403984942)*x_ref[2]
            arg[(0, 3, 0, 0)]+=-0.0977489322069*x[2]**o + (-0.370852022753)*x[2]
            ref[(0, 3, 0, 0)]+=-0.0977489322069*x_ref[2]**o + (-0.370852022753)*x_ref[2]
            arg[(0, 3, 0, 1)]+=0.265229719546*x[2]**o + (0.734213844159)*x[2]
            ref[(0, 3, 0, 1)]+=0.265229719546*x_ref[2]**o + (0.734213844159)*x_ref[2]
            arg[(0, 3, 0, 2)]+=0.840435927738*x[2]**o + (0.62818321566)*x[2]
            ref[(0, 3, 0, 2)]+=0.840435927738*x_ref[2]**o + (0.62818321566)*x_ref[2]
            arg[(0, 3, 1, 0)]+=0.503468010059*x[2]**o + (-0.537056323055)*x[2]
            ref[(0, 3, 1, 0)]+=0.503468010059*x_ref[2]**o + (-0.537056323055)*x_ref[2]
            arg[(0, 3, 1, 1)]+=0.882466467165*x[2]**o + (0.132589068997)*x[2]
            ref[(0, 3, 1, 1)]+=0.882466467165*x_ref[2]**o + (0.132589068997)*x_ref[2]
            arg[(0, 3, 1, 2)]+=0.735032774076*x[2]**o + (-0.931519495339)*x[2]
            ref[(0, 3, 1, 2)]+=0.735032774076*x_ref[2]**o + (-0.931519495339)*x_ref[2]
            arg[(0, 3, 2, 0)]+=-0.523829095706*x[2]**o + (-0.416054473508)*x[2]
            ref[(0, 3, 2, 0)]+=-0.523829095706*x_ref[2]**o + (-0.416054473508)*x_ref[2]
            arg[(0, 3, 2, 1)]+=-0.529546898656*x[2]**o + (0.554202574721)*x[2]
            ref[(0, 3, 2, 1)]+=-0.529546898656*x_ref[2]**o + (0.554202574721)*x_ref[2]
            arg[(0, 3, 2, 2)]+=-0.0374445446333*x[2]**o + (0.618602286922)*x[2]
            ref[(0, 3, 2, 2)]+=-0.0374445446333*x_ref[2]**o + (0.618602286922)*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.452295779819*x[2]**o + (0.891146153059)*x[2]
            ref[(1, 0, 0, 0)]+=0.452295779819*x_ref[2]**o + (0.891146153059)*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.0761192907315*x[2]**o + (-0.392611632906)*x[2]
            ref[(1, 0, 0, 1)]+=-0.0761192907315*x_ref[2]**o + (-0.392611632906)*x_ref[2]
            arg[(1, 0, 0, 2)]+=0.418514822508*x[2]**o + (-0.887311498033)*x[2]
            ref[(1, 0, 0, 2)]+=0.418514822508*x_ref[2]**o + (-0.887311498033)*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.933738063291*x[2]**o + (-0.643872812941)*x[2]
            ref[(1, 0, 1, 0)]+=-0.933738063291*x_ref[2]**o + (-0.643872812941)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.0150475678842*x[2]**o + (0.073756467564)*x[2]
            ref[(1, 0, 1, 1)]+=-0.0150475678842*x_ref[2]**o + (0.073756467564)*x_ref[2]
            arg[(1, 0, 1, 2)]+=-0.0533022361014*x[2]**o + (0.652186115307)*x[2]
            ref[(1, 0, 1, 2)]+=-0.0533022361014*x_ref[2]**o + (0.652186115307)*x_ref[2]
            arg[(1, 0, 2, 0)]+=0.850388220921*x[2]**o + (0.664102332346)*x[2]
            ref[(1, 0, 2, 0)]+=0.850388220921*x_ref[2]**o + (0.664102332346)*x_ref[2]
            arg[(1, 0, 2, 1)]+=-0.500935662812*x[2]**o + (0.339898895682)*x[2]
            ref[(1, 0, 2, 1)]+=-0.500935662812*x_ref[2]**o + (0.339898895682)*x_ref[2]
            arg[(1, 0, 2, 2)]+=0.0552944023408*x[2]**o + (0.890363246497)*x[2]
            ref[(1, 0, 2, 2)]+=0.0552944023408*x_ref[2]**o + (0.890363246497)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.0890987358538*x[2]**o + (-0.970875798606)*x[2]
            ref[(1, 1, 0, 0)]+=0.0890987358538*x_ref[2]**o + (-0.970875798606)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.750955074103*x[2]**o + (-0.72730217464)*x[2]
            ref[(1, 1, 0, 1)]+=0.750955074103*x_ref[2]**o + (-0.72730217464)*x_ref[2]
            arg[(1, 1, 0, 2)]+=0.031885862369*x[2]**o + (-0.841655574218)*x[2]
            ref[(1, 1, 0, 2)]+=0.031885862369*x_ref[2]**o + (-0.841655574218)*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.772125867824*x[2]**o + (-0.616757689818)*x[2]
            ref[(1, 1, 1, 0)]+=0.772125867824*x_ref[2]**o + (-0.616757689818)*x_ref[2]
            arg[(1, 1, 1, 1)]+=-0.657134018325*x[2]**o + (-0.912183573123)*x[2]
            ref[(1, 1, 1, 1)]+=-0.657134018325*x_ref[2]**o + (-0.912183573123)*x_ref[2]
            arg[(1, 1, 1, 2)]+=0.294626993944*x[2]**o + (-0.542128153711)*x[2]
            ref[(1, 1, 1, 2)]+=0.294626993944*x_ref[2]**o + (-0.542128153711)*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.106589015741*x[2]**o + (0.00371148399166)*x[2]
            ref[(1, 1, 2, 0)]+=-0.106589015741*x_ref[2]**o + (0.00371148399166)*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.438909288651*x[2]**o + (0.91499367774)*x[2]
            ref[(1, 1, 2, 1)]+=0.438909288651*x_ref[2]**o + (0.91499367774)*x_ref[2]
            arg[(1, 1, 2, 2)]+=0.02255587083*x[2]**o + (-0.806368757835)*x[2]
            ref[(1, 1, 2, 2)]+=0.02255587083*x_ref[2]**o + (-0.806368757835)*x_ref[2]
            arg[(1, 2, 0, 0)]+=-0.548971574546*x[2]**o + (-0.125091497077)*x[2]
            ref[(1, 2, 0, 0)]+=-0.548971574546*x_ref[2]**o + (-0.125091497077)*x_ref[2]
            arg[(1, 2, 0, 1)]+=-0.432251279586*x[2]**o + (0.00875781187435)*x[2]
            ref[(1, 2, 0, 1)]+=-0.432251279586*x_ref[2]**o + (0.00875781187435)*x_ref[2]
            arg[(1, 2, 0, 2)]+=0.282690901597*x[2]**o + (-0.345539741423)*x[2]
            ref[(1, 2, 0, 2)]+=0.282690901597*x_ref[2]**o + (-0.345539741423)*x_ref[2]
            arg[(1, 2, 1, 0)]+=-0.463049212889*x[2]**o + (-0.618979903371)*x[2]
            ref[(1, 2, 1, 0)]+=-0.463049212889*x_ref[2]**o + (-0.618979903371)*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.810073534772*x[2]**o + (-0.755049222598)*x[2]
            ref[(1, 2, 1, 1)]+=0.810073534772*x_ref[2]**o + (-0.755049222598)*x_ref[2]
            arg[(1, 2, 1, 2)]+=-0.232640507314*x[2]**o + (-0.435895765756)*x[2]
            ref[(1, 2, 1, 2)]+=-0.232640507314*x_ref[2]**o + (-0.435895765756)*x_ref[2]
            arg[(1, 2, 2, 0)]+=0.170733013798*x[2]**o + (0.661116598308)*x[2]
            ref[(1, 2, 2, 0)]+=0.170733013798*x_ref[2]**o + (0.661116598308)*x_ref[2]
            arg[(1, 2, 2, 1)]+=0.707149815239*x[2]**o + (-0.82507878369)*x[2]
            ref[(1, 2, 2, 1)]+=0.707149815239*x_ref[2]**o + (-0.82507878369)*x_ref[2]
            arg[(1, 2, 2, 2)]+=0.189241543155*x[2]**o + (-0.820912487211)*x[2]
            ref[(1, 2, 2, 2)]+=0.189241543155*x_ref[2]**o + (-0.820912487211)*x_ref[2]
            arg[(1, 3, 0, 0)]+=0.484044792316*x[2]**o + (-0.446629192475)*x[2]
            ref[(1, 3, 0, 0)]+=0.484044792316*x_ref[2]**o + (-0.446629192475)*x_ref[2]
            arg[(1, 3, 0, 1)]+=0.00171819334611*x[2]**o + (0.480653390778)*x[2]
            ref[(1, 3, 0, 1)]+=0.00171819334611*x_ref[2]**o + (0.480653390778)*x_ref[2]
            arg[(1, 3, 0, 2)]+=-0.739740002094*x[2]**o + (0.464395874461)*x[2]
            ref[(1, 3, 0, 2)]+=-0.739740002094*x_ref[2]**o + (0.464395874461)*x_ref[2]
            arg[(1, 3, 1, 0)]+=0.391905403051*x[2]**o + (-0.704183406959)*x[2]
            ref[(1, 3, 1, 0)]+=0.391905403051*x_ref[2]**o + (-0.704183406959)*x_ref[2]
            arg[(1, 3, 1, 1)]+=-0.557053386356*x[2]**o + (-0.954648161773)*x[2]
            ref[(1, 3, 1, 1)]+=-0.557053386356*x_ref[2]**o + (-0.954648161773)*x_ref[2]
            arg[(1, 3, 1, 2)]+=0.802123765656*x[2]**o + (-0.957526807407)*x[2]
            ref[(1, 3, 1, 2)]+=0.802123765656*x_ref[2]**o + (-0.957526807407)*x_ref[2]
            arg[(1, 3, 2, 0)]+=-0.79903077215*x[2]**o + (-0.167037977527)*x[2]
            ref[(1, 3, 2, 0)]+=-0.79903077215*x_ref[2]**o + (-0.167037977527)*x_ref[2]
            arg[(1, 3, 2, 1)]+=0.056893038986*x[2]**o + (0.888067562632)*x[2]
            ref[(1, 3, 2, 1)]+=0.056893038986*x_ref[2]**o + (0.888067562632)*x_ref[2]
            arg[(1, 3, 2, 2)]+=-0.389756531267*x[2]**o + (0.538467370975)*x[2]
            ref[(1, 3, 2, 2)]+=-0.389756531267*x_ref[2]**o + (0.538467370975)*x_ref[2]
            arg[(2, 0, 0, 0)]+=-0.934694162147*x[2]**o + (0.638427587822)*x[2]
            ref[(2, 0, 0, 0)]+=-0.934694162147*x_ref[2]**o + (0.638427587822)*x_ref[2]
            arg[(2, 0, 0, 1)]+=0.898138999505*x[2]**o + (-0.957780273534)*x[2]
            ref[(2, 0, 0, 1)]+=0.898138999505*x_ref[2]**o + (-0.957780273534)*x_ref[2]
            arg[(2, 0, 0, 2)]+=-0.848982982992*x[2]**o + (-0.260343391946)*x[2]
            ref[(2, 0, 0, 2)]+=-0.848982982992*x_ref[2]**o + (-0.260343391946)*x_ref[2]
            arg[(2, 0, 1, 0)]+=0.788616110057*x[2]**o + (0.328034217682)*x[2]
            ref[(2, 0, 1, 0)]+=0.788616110057*x_ref[2]**o + (0.328034217682)*x_ref[2]
            arg[(2, 0, 1, 1)]+=0.818619096039*x[2]**o + (0.644125459861)*x[2]
            ref[(2, 0, 1, 1)]+=0.818619096039*x_ref[2]**o + (0.644125459861)*x_ref[2]
            arg[(2, 0, 1, 2)]+=0.350565419046*x[2]**o + (0.835732662934)*x[2]
            ref[(2, 0, 1, 2)]+=0.350565419046*x_ref[2]**o + (0.835732662934)*x_ref[2]
            arg[(2, 0, 2, 0)]+=0.127736978351*x[2]**o + (-0.766573198546)*x[2]
            ref[(2, 0, 2, 0)]+=0.127736978351*x_ref[2]**o + (-0.766573198546)*x_ref[2]
            arg[(2, 0, 2, 1)]+=-0.189438873158*x[2]**o + (0.164093244416)*x[2]
            ref[(2, 0, 2, 1)]+=-0.189438873158*x_ref[2]**o + (0.164093244416)*x_ref[2]
            arg[(2, 0, 2, 2)]+=-0.78444499298*x[2]**o + (-0.717091435143)*x[2]
            ref[(2, 0, 2, 2)]+=-0.78444499298*x_ref[2]**o + (-0.717091435143)*x_ref[2]
            arg[(2, 1, 0, 0)]+=-0.559340937189*x[2]**o + (-0.568459180351)*x[2]
            ref[(2, 1, 0, 0)]+=-0.559340937189*x_ref[2]**o + (-0.568459180351)*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.660604028428*x[2]**o + (0.661602242847)*x[2]
            ref[(2, 1, 0, 1)]+=-0.660604028428*x_ref[2]**o + (0.661602242847)*x_ref[2]
            arg[(2, 1, 0, 2)]+=-0.691415225374*x[2]**o + (-0.141588783612)*x[2]
            ref[(2, 1, 0, 2)]+=-0.691415225374*x_ref[2]**o + (-0.141588783612)*x_ref[2]
            arg[(2, 1, 1, 0)]+=0.399564713325*x[2]**o + (-0.296830536997)*x[2]
            ref[(2, 1, 1, 0)]+=0.399564713325*x_ref[2]**o + (-0.296830536997)*x_ref[2]
            arg[(2, 1, 1, 1)]+=-0.92018206026*x[2]**o + (0.35956658673)*x[2]
            ref[(2, 1, 1, 1)]+=-0.92018206026*x_ref[2]**o + (0.35956658673)*x_ref[2]
            arg[(2, 1, 1, 2)]+=-0.162882584986*x[2]**o + (-0.966988950876)*x[2]
            ref[(2, 1, 1, 2)]+=-0.162882584986*x_ref[2]**o + (-0.966988950876)*x_ref[2]
            arg[(2, 1, 2, 0)]+=-0.941631195976*x[2]**o + (0.0993891335548)*x[2]
            ref[(2, 1, 2, 0)]+=-0.941631195976*x_ref[2]**o + (0.0993891335548)*x_ref[2]
            arg[(2, 1, 2, 1)]+=0.443682250326*x[2]**o + (0.464309315849)*x[2]
            ref[(2, 1, 2, 1)]+=0.443682250326*x_ref[2]**o + (0.464309315849)*x_ref[2]
            arg[(2, 1, 2, 2)]+=-0.523323129457*x[2]**o + (-0.246463067769)*x[2]
            ref[(2, 1, 2, 2)]+=-0.523323129457*x_ref[2]**o + (-0.246463067769)*x_ref[2]
            arg[(2, 2, 0, 0)]+=-0.715448388703*x[2]**o + (0.196923177373)*x[2]
            ref[(2, 2, 0, 0)]+=-0.715448388703*x_ref[2]**o + (0.196923177373)*x_ref[2]
            arg[(2, 2, 0, 1)]+=-0.691220858117*x[2]**o + (-0.239047350323)*x[2]
            ref[(2, 2, 0, 1)]+=-0.691220858117*x_ref[2]**o + (-0.239047350323)*x_ref[2]
            arg[(2, 2, 0, 2)]+=-0.377026490179*x[2]**o + (0.875420415641)*x[2]
            ref[(2, 2, 0, 2)]+=-0.377026490179*x_ref[2]**o + (0.875420415641)*x_ref[2]
            arg[(2, 2, 1, 0)]+=0.0919429342102*x[2]**o + (0.0924546954513)*x[2]
            ref[(2, 2, 1, 0)]+=0.0919429342102*x_ref[2]**o + (0.0924546954513)*x_ref[2]
            arg[(2, 2, 1, 1)]+=-0.0935071764586*x[2]**o + (0.122637309514)*x[2]
            ref[(2, 2, 1, 1)]+=-0.0935071764586*x_ref[2]**o + (0.122637309514)*x_ref[2]
            arg[(2, 2, 1, 2)]+=0.552797897408*x[2]**o + (0.556968728628)*x[2]
            ref[(2, 2, 1, 2)]+=0.552797897408*x_ref[2]**o + (0.556968728628)*x_ref[2]
            arg[(2, 2, 2, 0)]+=0.417104610923*x[2]**o + (-0.945652895397)*x[2]
            ref[(2, 2, 2, 0)]+=0.417104610923*x_ref[2]**o + (-0.945652895397)*x_ref[2]
            arg[(2, 2, 2, 1)]+=-0.0219255297629*x[2]**o + (-0.295795468562)*x[2]
            ref[(2, 2, 2, 1)]+=-0.0219255297629*x_ref[2]**o + (-0.295795468562)*x_ref[2]
            arg[(2, 2, 2, 2)]+=-0.0992232627865*x[2]**o + (0.460882267076)*x[2]
            ref[(2, 2, 2, 2)]+=-0.0992232627865*x_ref[2]**o + (0.460882267076)*x_ref[2]
            arg[(2, 3, 0, 0)]+=-0.627157909435*x[2]**o + (0.241655270667)*x[2]
            ref[(2, 3, 0, 0)]+=-0.627157909435*x_ref[2]**o + (0.241655270667)*x_ref[2]
            arg[(2, 3, 0, 1)]+=0.537435902657*x[2]**o + (0.41212193274)*x[2]
            ref[(2, 3, 0, 1)]+=0.537435902657*x_ref[2]**o + (0.41212193274)*x_ref[2]
            arg[(2, 3, 0, 2)]+=-0.421569811899*x[2]**o + (0.460855493074)*x[2]
            ref[(2, 3, 0, 2)]+=-0.421569811899*x_ref[2]**o + (0.460855493074)*x_ref[2]
            arg[(2, 3, 1, 0)]+=0.331498752327*x[2]**o + (-0.787712612483)*x[2]
            ref[(2, 3, 1, 0)]+=0.331498752327*x_ref[2]**o + (-0.787712612483)*x_ref[2]
            arg[(2, 3, 1, 1)]+=0.90663238513*x[2]**o + (-0.272193461064)*x[2]
            ref[(2, 3, 1, 1)]+=0.90663238513*x_ref[2]**o + (-0.272193461064)*x_ref[2]
            arg[(2, 3, 1, 2)]+=0.0652420623521*x[2]**o + (-0.449313446166)*x[2]
            ref[(2, 3, 1, 2)]+=0.0652420623521*x_ref[2]**o + (-0.449313446166)*x_ref[2]
            arg[(2, 3, 2, 0)]+=-0.349124523168*x[2]**o + (-0.301720704009)*x[2]
            ref[(2, 3, 2, 0)]+=-0.349124523168*x_ref[2]**o + (-0.301720704009)*x_ref[2]
            arg[(2, 3, 2, 1)]+=-0.62366452116*x[2]**o + (-0.493921442592)*x[2]
            ref[(2, 3, 2, 1)]+=-0.62366452116*x_ref[2]**o + (-0.493921442592)*x_ref[2]
            arg[(2, 3, 2, 2)]+=0.319205980848*x[2]**o + (0.703713845258)*x[2]
            ref[(2, 3, 2, 2)]+=0.319205980848*x_ref[2]**o + (0.703713845258)*x_ref[2]
            arg[(3, 0, 0, 0)]+=-0.666376775332*x[2]**o + (-0.596698200966)*x[2]
            ref[(3, 0, 0, 0)]+=-0.666376775332*x_ref[2]**o + (-0.596698200966)*x_ref[2]
            arg[(3, 0, 0, 1)]+=-0.875748824418*x[2]**o + (0.0822846837538)*x[2]
            ref[(3, 0, 0, 1)]+=-0.875748824418*x_ref[2]**o + (0.0822846837538)*x_ref[2]
            arg[(3, 0, 0, 2)]+=-0.615729196419*x[2]**o + (0.467811078237)*x[2]
            ref[(3, 0, 0, 2)]+=-0.615729196419*x_ref[2]**o + (0.467811078237)*x_ref[2]
            arg[(3, 0, 1, 0)]+=-0.650621796254*x[2]**o + (0.908597858963)*x[2]
            ref[(3, 0, 1, 0)]+=-0.650621796254*x_ref[2]**o + (0.908597858963)*x_ref[2]
            arg[(3, 0, 1, 1)]+=-0.0990922695276*x[2]**o + (0.716984708885)*x[2]
            ref[(3, 0, 1, 1)]+=-0.0990922695276*x_ref[2]**o + (0.716984708885)*x_ref[2]
            arg[(3, 0, 1, 2)]+=0.0978543648946*x[2]**o + (-0.899513951531)*x[2]
            ref[(3, 0, 1, 2)]+=0.0978543648946*x_ref[2]**o + (-0.899513951531)*x_ref[2]
            arg[(3, 0, 2, 0)]+=-0.306636856354*x[2]**o + (-0.0200243551591)*x[2]
            ref[(3, 0, 2, 0)]+=-0.306636856354*x_ref[2]**o + (-0.0200243551591)*x_ref[2]
            arg[(3, 0, 2, 1)]+=0.41392483152*x[2]**o + (-0.197149965066)*x[2]
            ref[(3, 0, 2, 1)]+=0.41392483152*x_ref[2]**o + (-0.197149965066)*x_ref[2]
            arg[(3, 0, 2, 2)]+=0.614313733134*x[2]**o + (-0.745224068266)*x[2]
            ref[(3, 0, 2, 2)]+=0.614313733134*x_ref[2]**o + (-0.745224068266)*x_ref[2]
            arg[(3, 1, 0, 0)]+=0.744602277236*x[2]**o + (-0.398466587476)*x[2]
            ref[(3, 1, 0, 0)]+=0.744602277236*x_ref[2]**o + (-0.398466587476)*x_ref[2]
            arg[(3, 1, 0, 1)]+=-0.4869835381*x[2]**o + (-0.143254561548)*x[2]
            ref[(3, 1, 0, 1)]+=-0.4869835381*x_ref[2]**o + (-0.143254561548)*x_ref[2]
            arg[(3, 1, 0, 2)]+=-0.755861593221*x[2]**o + (-0.347154227111)*x[2]
            ref[(3, 1, 0, 2)]+=-0.755861593221*x_ref[2]**o + (-0.347154227111)*x_ref[2]
            arg[(3, 1, 1, 0)]+=-0.453424915676*x[2]**o + (0.60532206567)*x[2]
            ref[(3, 1, 1, 0)]+=-0.453424915676*x_ref[2]**o + (0.60532206567)*x_ref[2]
            arg[(3, 1, 1, 1)]+=0.565148914691*x[2]**o + (0.1062125493)*x[2]
            ref[(3, 1, 1, 1)]+=0.565148914691*x_ref[2]**o + (0.1062125493)*x_ref[2]
            arg[(3, 1, 1, 2)]+=0.0585466874179*x[2]**o + (0.634448814857)*x[2]
            ref[(3, 1, 1, 2)]+=0.0585466874179*x_ref[2]**o + (0.634448814857)*x_ref[2]
            arg[(3, 1, 2, 0)]+=-0.396291978765*x[2]**o + (0.44104964549)*x[2]
            ref[(3, 1, 2, 0)]+=-0.396291978765*x_ref[2]**o + (0.44104964549)*x_ref[2]
            arg[(3, 1, 2, 1)]+=0.0462306101757*x[2]**o + (-0.470453248522)*x[2]
            ref[(3, 1, 2, 1)]+=0.0462306101757*x_ref[2]**o + (-0.470453248522)*x_ref[2]
            arg[(3, 1, 2, 2)]+=-0.670739286017*x[2]**o + (-0.612463124128)*x[2]
            ref[(3, 1, 2, 2)]+=-0.670739286017*x_ref[2]**o + (-0.612463124128)*x_ref[2]
            arg[(3, 2, 0, 0)]+=0.167642513638*x[2]**o + (0.895772141845)*x[2]
            ref[(3, 2, 0, 0)]+=0.167642513638*x_ref[2]**o + (0.895772141845)*x_ref[2]
            arg[(3, 2, 0, 1)]+=0.939970079342*x[2]**o + (0.296039381091)*x[2]
            ref[(3, 2, 0, 1)]+=0.939970079342*x_ref[2]**o + (0.296039381091)*x_ref[2]
            arg[(3, 2, 0, 2)]+=-0.104202699185*x[2]**o + (0.857568263873)*x[2]
            ref[(3, 2, 0, 2)]+=-0.104202699185*x_ref[2]**o + (0.857568263873)*x_ref[2]
            arg[(3, 2, 1, 0)]+=0.962690902643*x[2]**o + (0.568828013245)*x[2]
            ref[(3, 2, 1, 0)]+=0.962690902643*x_ref[2]**o + (0.568828013245)*x_ref[2]
            arg[(3, 2, 1, 1)]+=0.0712969530624*x[2]**o + (0.592154155248)*x[2]
            ref[(3, 2, 1, 1)]+=0.0712969530624*x_ref[2]**o + (0.592154155248)*x_ref[2]
            arg[(3, 2, 1, 2)]+=-0.273786617173*x[2]**o + (0.589985509153)*x[2]
            ref[(3, 2, 1, 2)]+=-0.273786617173*x_ref[2]**o + (0.589985509153)*x_ref[2]
            arg[(3, 2, 2, 0)]+=-0.73919997767*x[2]**o + (0.356727372182)*x[2]
            ref[(3, 2, 2, 0)]+=-0.73919997767*x_ref[2]**o + (0.356727372182)*x_ref[2]
            arg[(3, 2, 2, 1)]+=-0.061112920431*x[2]**o + (0.645267715163)*x[2]
            ref[(3, 2, 2, 1)]+=-0.061112920431*x_ref[2]**o + (0.645267715163)*x_ref[2]
            arg[(3, 2, 2, 2)]+=0.0380020301112*x[2]**o + (0.851737669039)*x[2]
            ref[(3, 2, 2, 2)]+=0.0380020301112*x_ref[2]**o + (0.851737669039)*x_ref[2]
            arg[(3, 3, 0, 0)]+=-0.535509773574*x[2]**o + (0.149852922007)*x[2]
            ref[(3, 3, 0, 0)]+=-0.535509773574*x_ref[2]**o + (0.149852922007)*x_ref[2]
            arg[(3, 3, 0, 1)]+=-0.518748981715*x[2]**o + (-0.13103704636)*x[2]
            ref[(3, 3, 0, 1)]+=-0.518748981715*x_ref[2]**o + (-0.13103704636)*x_ref[2]
            arg[(3, 3, 0, 2)]+=-0.689212364603*x[2]**o + (-0.72498464473)*x[2]
            ref[(3, 3, 0, 2)]+=-0.689212364603*x_ref[2]**o + (-0.72498464473)*x_ref[2]
            arg[(3, 3, 1, 0)]+=0.220146797115*x[2]**o + (0.377452333172)*x[2]
            ref[(3, 3, 1, 0)]+=0.220146797115*x_ref[2]**o + (0.377452333172)*x_ref[2]
            arg[(3, 3, 1, 1)]+=0.850960922537*x[2]**o + (-0.365583694354)*x[2]
            ref[(3, 3, 1, 1)]+=0.850960922537*x_ref[2]**o + (-0.365583694354)*x_ref[2]
            arg[(3, 3, 1, 2)]+=0.0685972040734*x[2]**o + (-0.21299264686)*x[2]
            ref[(3, 3, 1, 2)]+=0.0685972040734*x_ref[2]**o + (-0.21299264686)*x_ref[2]
            arg[(3, 3, 2, 0)]+=0.372047074924*x[2]**o + (0.587014427395)*x[2]
            ref[(3, 3, 2, 0)]+=0.372047074924*x_ref[2]**o + (0.587014427395)*x_ref[2]
            arg[(3, 3, 2, 1)]+=0.618609053946*x[2]**o + (-0.547613338903)*x[2]
            ref[(3, 3, 2, 1)]+=0.618609053946*x_ref[2]**o + (-0.547613338903)*x_ref[2]
            arg[(3, 3, 2, 2)]+=0.100972281361*x[2]**o + (0.714725561296)*x[2]
            ref[(3, 3, 2, 2)]+=0.100972281361*x_ref[2]**o + (0.714725561296)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.69032340068*x[0] + (-0.622130695958)*x[1]
        ref=-0.69032340068*x_ref[0] + (-0.622130695958)*x_ref[1]
        if dim==3:
            arg+=(0.398684099635)*x[2]
            ref+=(0.398684099635)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=-0.606593432397*x[0] + (-0.047184380172)*x[1]
        ref[(0,)]=-0.606593432397*x_ref[0] + (-0.047184380172)*x_ref[1]
        arg[(1,)]=0.201020639553*x[0] + (-0.943919049061)*x[1]
        ref[(1,)]=0.201020639553*x_ref[0] + (-0.943919049061)*x_ref[1]
        arg[(2,)]=-0.494934963176*x[0] + (0.786382740707)*x[1]
        ref[(2,)]=-0.494934963176*x_ref[0] + (0.786382740707)*x_ref[1]
        arg[(3,)]=-0.0107114267844*x[0] + (-0.891652710566)*x[1]
        ref[(3,)]=-0.0107114267844*x_ref[0] + (-0.891652710566)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.636520051647*x[2]
            ref[(0,)]+=0.636520051647*x_ref[2]
            arg[(1,)]+=0.592345673244*x[2]
            ref[(1,)]+=0.592345673244*x_ref[2]
            arg[(2,)]+=0.56521347906*x[2]
            ref[(2,)]+=0.56521347906*x_ref[2]
            arg[(3,)]+=-0.90543087067*x[2]
            ref[(3,)]+=-0.90543087067*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref = Data(0,(2, 3),w_ref)
        arg[(0, 0)]=0.24511143118*x[0] + (0.101836763509)*x[1]
        ref[(0, 0)]=0.24511143118*x_ref[0] + (0.101836763509)*x_ref[1]
        arg[(0, 1)]=-0.47893740709*x[0] + (-0.506003380391)*x[1]
        ref[(0, 1)]=-0.47893740709*x_ref[0] + (-0.506003380391)*x_ref[1]
        arg[(0, 2)]=0.687104569635*x[0] + (0.633871616609)*x[1]
        ref[(0, 2)]=0.687104569635*x_ref[0] + (0.633871616609)*x_ref[1]
        arg[(1, 0)]=-0.183242723026*x[0] + (0.68486171759)*x[1]
        ref[(1, 0)]=-0.183242723026*x_ref[0] + (0.68486171759)*x_ref[1]
        arg[(1, 1)]=0.886533577164*x[0] + (0.246611293063)*x[1]
        ref[(1, 1)]=0.886533577164*x_ref[0] + (0.246611293063)*x_ref[1]
        arg[(1, 2)]=0.237749097846*x[0] + (0.93658622397)*x[1]
        ref[(1, 2)]=0.237749097846*x_ref[0] + (0.93658622397)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.483985126237*x[2]
            ref[(0, 0)]+=-0.483985126237*x_ref[2]
            arg[(0, 1)]+=-0.586908460063*x[2]
            ref[(0, 1)]+=-0.586908460063*x_ref[2]
            arg[(0, 2)]+=-0.0578907779376*x[2]
            ref[(0, 2)]+=-0.0578907779376*x_ref[2]
            arg[(1, 0)]+=-0.902713502344*x[2]
            ref[(1, 0)]+=-0.902713502344*x_ref[2]
            arg[(1, 1)]+=0.427780722364*x[2]
            ref[(1, 1)]+=0.427780722364*x_ref[2]
            arg[(1, 2)]+=-0.590752701517*x[2]
            ref[(1, 2)]+=-0.590752701517*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 4),w)
        ref = Data(0,(2, 2, 4),w_ref)
        arg[(0, 0, 0)]=-0.0714628281151*x[0] + (-0.572284045063)*x[1]
        ref[(0, 0, 0)]=-0.0714628281151*x_ref[0] + (-0.572284045063)*x_ref[1]
        arg[(0, 0, 1)]=0.220534697109*x[0] + (0.266027059066)*x[1]
        ref[(0, 0, 1)]=0.220534697109*x_ref[0] + (0.266027059066)*x_ref[1]
        arg[(0, 0, 2)]=0.54054403625*x[0] + (0.978806579298)*x[1]
        ref[(0, 0, 2)]=0.54054403625*x_ref[0] + (0.978806579298)*x_ref[1]
        arg[(0, 0, 3)]=-0.0679103574518*x[0] + (-0.467100156181)*x[1]
        ref[(0, 0, 3)]=-0.0679103574518*x_ref[0] + (-0.467100156181)*x_ref[1]
        arg[(0, 1, 0)]=0.993238545771*x[0] + (0.973308211929)*x[1]
        ref[(0, 1, 0)]=0.993238545771*x_ref[0] + (0.973308211929)*x_ref[1]
        arg[(0, 1, 1)]=-0.653762636648*x[0] + (0.135149324806)*x[1]
        ref[(0, 1, 1)]=-0.653762636648*x_ref[0] + (0.135149324806)*x_ref[1]
        arg[(0, 1, 2)]=-0.309030044739*x[0] + (-0.0070245021943)*x[1]
        ref[(0, 1, 2)]=-0.309030044739*x_ref[0] + (-0.0070245021943)*x_ref[1]
        arg[(0, 1, 3)]=0.676642406119*x[0] + (-0.315794495768)*x[1]
        ref[(0, 1, 3)]=0.676642406119*x_ref[0] + (-0.315794495768)*x_ref[1]
        arg[(1, 0, 0)]=0.0788387964701*x[0] + (-0.574220641142)*x[1]
        ref[(1, 0, 0)]=0.0788387964701*x_ref[0] + (-0.574220641142)*x_ref[1]
        arg[(1, 0, 1)]=0.772982588528*x[0] + (0.321069825664)*x[1]
        ref[(1, 0, 1)]=0.772982588528*x_ref[0] + (0.321069825664)*x_ref[1]
        arg[(1, 0, 2)]=0.115321410501*x[0] + (0.949340448167)*x[1]
        ref[(1, 0, 2)]=0.115321410501*x_ref[0] + (0.949340448167)*x_ref[1]
        arg[(1, 0, 3)]=-0.294571632308*x[0] + (0.0933688062338)*x[1]
        ref[(1, 0, 3)]=-0.294571632308*x_ref[0] + (0.0933688062338)*x_ref[1]
        arg[(1, 1, 0)]=-0.666761799402*x[0] + (0.173308613334)*x[1]
        ref[(1, 1, 0)]=-0.666761799402*x_ref[0] + (0.173308613334)*x_ref[1]
        arg[(1, 1, 1)]=0.826283748986*x[0] + (-0.700833043346)*x[1]
        ref[(1, 1, 1)]=0.826283748986*x_ref[0] + (-0.700833043346)*x_ref[1]
        arg[(1, 1, 2)]=0.877254069382*x[0] + (0.658885703135)*x[1]
        ref[(1, 1, 2)]=0.877254069382*x_ref[0] + (0.658885703135)*x_ref[1]
        arg[(1, 1, 3)]=0.385142677505*x[0] + (-0.930368563677)*x[1]
        ref[(1, 1, 3)]=0.385142677505*x_ref[0] + (-0.930368563677)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.276380178135*x[2]
            ref[(0, 0, 0)]+=0.276380178135*x_ref[2]
            arg[(0, 0, 1)]+=0.479518361679*x[2]
            ref[(0, 0, 1)]+=0.479518361679*x_ref[2]
            arg[(0, 0, 2)]+=0.146884981568*x[2]
            ref[(0, 0, 2)]+=0.146884981568*x_ref[2]
            arg[(0, 0, 3)]+=-0.833461083515*x[2]
            ref[(0, 0, 3)]+=-0.833461083515*x_ref[2]
            arg[(0, 1, 0)]+=0.106262105309*x[2]
            ref[(0, 1, 0)]+=0.106262105309*x_ref[2]
            arg[(0, 1, 1)]+=-0.568412338055*x[2]
            ref[(0, 1, 1)]+=-0.568412338055*x_ref[2]
            arg[(0, 1, 2)]+=-0.0258701503054*x[2]
            ref[(0, 1, 2)]+=-0.0258701503054*x_ref[2]
            arg[(0, 1, 3)]+=0.983962331136*x[2]
            ref[(0, 1, 3)]+=0.983962331136*x_ref[2]
            arg[(1, 0, 0)]+=0.713206804397*x[2]
            ref[(1, 0, 0)]+=0.713206804397*x_ref[2]
            arg[(1, 0, 1)]+=0.791461858674*x[2]
            ref[(1, 0, 1)]+=0.791461858674*x_ref[2]
            arg[(1, 0, 2)]+=-0.519223005203*x[2]
            ref[(1, 0, 2)]+=-0.519223005203*x_ref[2]
            arg[(1, 0, 3)]+=-0.476001877762*x[2]
            ref[(1, 0, 3)]+=-0.476001877762*x_ref[2]
            arg[(1, 1, 0)]+=0.80086341799*x[2]
            ref[(1, 1, 0)]+=0.80086341799*x_ref[2]
            arg[(1, 1, 1)]+=0.324004877043*x[2]
            ref[(1, 1, 1)]+=0.324004877043*x_ref[2]
            arg[(1, 1, 2)]+=-0.0121916915003*x[2]
            ref[(1, 1, 2)]+=-0.0121916915003*x_ref[2]
            arg[(1, 1, 3)]+=0.329996771254*x[2]
            ref[(1, 1, 3)]+=0.329996771254*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports interpolation from ReducedSolution to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 2, 2),w)
        ref = Data(0,(2, 3, 2, 2),w_ref)
        arg[(0, 0, 0, 0)]=0.113487563779*x[0] + (-0.633682203759)*x[1]
        ref[(0, 0, 0, 0)]=0.113487563779*x_ref[0] + (-0.633682203759)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.143796121594*x[0] + (0.503336547988)*x[1]
        ref[(0, 0, 0, 1)]=0.143796121594*x_ref[0] + (0.503336547988)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.102595090024*x[0] + (0.546052157875)*x[1]
        ref[(0, 0, 1, 0)]=0.102595090024*x_ref[0] + (0.546052157875)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.018417690058*x[0] + (-0.78774433258)*x[1]
        ref[(0, 0, 1, 1)]=0.018417690058*x_ref[0] + (-0.78774433258)*x_ref[1]
        arg[(0, 1, 0, 0)]=-0.299454529489*x[0] + (0.203517438146)*x[1]
        ref[(0, 1, 0, 0)]=-0.299454529489*x_ref[0] + (0.203517438146)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.191730410638*x[0] + (-0.902722533607)*x[1]
        ref[(0, 1, 0, 1)]=0.191730410638*x_ref[0] + (-0.902722533607)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.000635298718865*x[0] + (0.31694377868)*x[1]
        ref[(0, 1, 1, 0)]=0.000635298718865*x_ref[0] + (0.31694377868)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.855428324664*x[0] + (-0.0159819801585)*x[1]
        ref[(0, 1, 1, 1)]=0.855428324664*x_ref[0] + (-0.0159819801585)*x_ref[1]
        arg[(0, 2, 0, 0)]=-0.732458853594*x[0] + (-0.275378738472)*x[1]
        ref[(0, 2, 0, 0)]=-0.732458853594*x_ref[0] + (-0.275378738472)*x_ref[1]
        arg[(0, 2, 0, 1)]=-0.373617476651*x[0] + (0.546362772817)*x[1]
        ref[(0, 2, 0, 1)]=-0.373617476651*x_ref[0] + (0.546362772817)*x_ref[1]
        arg[(0, 2, 1, 0)]=0.0186839232644*x[0] + (-0.566652093935)*x[1]
        ref[(0, 2, 1, 0)]=0.0186839232644*x_ref[0] + (-0.566652093935)*x_ref[1]
        arg[(0, 2, 1, 1)]=-0.308264099375*x[0] + (0.0686171269866)*x[1]
        ref[(0, 2, 1, 1)]=-0.308264099375*x_ref[0] + (0.0686171269866)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.166453482816*x[0] + (-0.244128090873)*x[1]
        ref[(1, 0, 0, 0)]=-0.166453482816*x_ref[0] + (-0.244128090873)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.117899025161*x[0] + (-0.716822873682)*x[1]
        ref[(1, 0, 0, 1)]=-0.117899025161*x_ref[0] + (-0.716822873682)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.99361485574*x[0] + (-0.637560719601)*x[1]
        ref[(1, 0, 1, 0)]=-0.99361485574*x_ref[0] + (-0.637560719601)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.436755591882*x[0] + (-0.000438577020933)*x[1]
        ref[(1, 0, 1, 1)]=0.436755591882*x_ref[0] + (-0.000438577020933)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.699712863625*x[0] + (0.298932408972)*x[1]
        ref[(1, 1, 0, 0)]=-0.699712863625*x_ref[0] + (0.298932408972)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.162353035142*x[0] + (0.980527727253)*x[1]
        ref[(1, 1, 0, 1)]=0.162353035142*x_ref[0] + (0.980527727253)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.603905200052*x[0] + (0.551754046768)*x[1]
        ref[(1, 1, 1, 0)]=0.603905200052*x_ref[0] + (0.551754046768)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.751351261064*x[0] + (0.617250072053)*x[1]
        ref[(1, 1, 1, 1)]=0.751351261064*x_ref[0] + (0.617250072053)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.51358334563*x[0] + (0.436468669223)*x[1]
        ref[(1, 2, 0, 0)]=-0.51358334563*x_ref[0] + (0.436468669223)*x_ref[1]
        arg[(1, 2, 0, 1)]=-0.613128275188*x[0] + (-0.359685747211)*x[1]
        ref[(1, 2, 0, 1)]=-0.613128275188*x_ref[0] + (-0.359685747211)*x_ref[1]
        arg[(1, 2, 1, 0)]=0.191610309493*x[0] + (-0.910365026007)*x[1]
        ref[(1, 2, 1, 0)]=0.191610309493*x_ref[0] + (-0.910365026007)*x_ref[1]
        arg[(1, 2, 1, 1)]=0.479258639154*x[0] + (0.997510533998)*x[1]
        ref[(1, 2, 1, 1)]=0.479258639154*x_ref[0] + (0.997510533998)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=0.681571634473*x[2]
            ref[(0, 0, 0, 0)]+=0.681571634473*x_ref[2]
            arg[(0, 0, 0, 1)]+=0.614838153773*x[2]
            ref[(0, 0, 0, 1)]+=0.614838153773*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.220849645348*x[2]
            ref[(0, 0, 1, 0)]+=-0.220849645348*x_ref[2]
            arg[(0, 0, 1, 1)]+=-0.340490520644*x[2]
            ref[(0, 0, 1, 1)]+=-0.340490520644*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.476501923484*x[2]
            ref[(0, 1, 0, 0)]+=-0.476501923484*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.865149466572*x[2]
            ref[(0, 1, 0, 1)]+=-0.865149466572*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.80912105102*x[2]
            ref[(0, 1, 1, 0)]+=0.80912105102*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.565234597609*x[2]
            ref[(0, 1, 1, 1)]+=-0.565234597609*x_ref[2]
            arg[(0, 2, 0, 0)]+=0.507292777421*x[2]
            ref[(0, 2, 0, 0)]+=0.507292777421*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.712627327105*x[2]
            ref[(0, 2, 0, 1)]+=-0.712627327105*x_ref[2]
            arg[(0, 2, 1, 0)]+=0.0288573461923*x[2]
            ref[(0, 2, 1, 0)]+=0.0288573461923*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.175124519968*x[2]
            ref[(0, 2, 1, 1)]+=-0.175124519968*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.657164178091*x[2]
            ref[(1, 0, 0, 0)]+=-0.657164178091*x_ref[2]
            arg[(1, 0, 0, 1)]+=-0.0227874147178*x[2]
            ref[(1, 0, 0, 1)]+=-0.0227874147178*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.460284979154*x[2]
            ref[(1, 0, 1, 0)]+=-0.460284979154*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.982750006904*x[2]
            ref[(1, 0, 1, 1)]+=-0.982750006904*x_ref[2]
            arg[(1, 1, 0, 0)]+=-0.726584747916*x[2]
            ref[(1, 1, 0, 0)]+=-0.726584747916*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.078486450621*x[2]
            ref[(1, 1, 0, 1)]+=-0.078486450621*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.656516668495*x[2]
            ref[(1, 1, 1, 0)]+=-0.656516668495*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.476916878995*x[2]
            ref[(1, 1, 1, 1)]+=0.476916878995*x_ref[2]
            arg[(1, 2, 0, 0)]+=0.458838201093*x[2]
            ref[(1, 2, 0, 0)]+=0.458838201093*x_ref[2]
            arg[(1, 2, 0, 1)]+=0.602653398054*x[2]
            ref[(1, 2, 0, 1)]+=0.602653398054*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.376102083282*x[2]
            ref[(1, 2, 1, 0)]+=0.376102083282*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.0199320930354*x[2]
            ref[(1, 2, 1, 1)]+=0.0199320930354*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.118681421618*x[0] + (0.990659765123)*x[1]
        ref=-0.118681421618*x_ref[0] + (0.990659765123)*x_ref[1]
        if dim==3:
            arg+=(-0.921536834836)*x[2]
            ref+=(-0.921536834836)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref = Data(0,(4,),w_ref)
        arg[(0,)]=-0.593125731329*x[0] + (0.651049909063)*x[1]
        ref[(0,)]=-0.593125731329*x_ref[0] + (0.651049909063)*x_ref[1]
        arg[(1,)]=-0.669524095338*x[0] + (-0.859770185998)*x[1]
        ref[(1,)]=-0.669524095338*x_ref[0] + (-0.859770185998)*x_ref[1]
        arg[(2,)]=-0.074137006965*x[0] + (-0.0217309056075)*x[1]
        ref[(2,)]=-0.074137006965*x_ref[0] + (-0.0217309056075)*x_ref[1]
        arg[(3,)]=-0.054055424268*x[0] + (-0.942686523909)*x[1]
        ref[(3,)]=-0.054055424268*x_ref[0] + (-0.942686523909)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.641652612726*x[2]
            ref[(0,)]+=0.641652612726*x_ref[2]
            arg[(1,)]+=0.727552208432*x[2]
            ref[(1,)]+=0.727552208432*x_ref[2]
            arg[(2,)]+=-0.572120144846*x[2]
            ref[(2,)]+=-0.572120144846*x_ref[2]
            arg[(3,)]+=-0.551306472836*x[2]
            ref[(3,)]+=-0.551306472836*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref = Data(0,(2, 3),w_ref)
        arg[(0, 0)]=0.844549018598*x[0] + (-0.999740823313)*x[1]
        ref[(0, 0)]=0.844549018598*x_ref[0] + (-0.999740823313)*x_ref[1]
        arg[(0, 1)]=0.41238903538*x[0] + (0.196729021268)*x[1]
        ref[(0, 1)]=0.41238903538*x_ref[0] + (0.196729021268)*x_ref[1]
        arg[(0, 2)]=-0.121446706435*x[0] + (-0.0369106046355)*x[1]
        ref[(0, 2)]=-0.121446706435*x_ref[0] + (-0.0369106046355)*x_ref[1]
        arg[(1, 0)]=-0.842646683887*x[0] + (-0.737852891809)*x[1]
        ref[(1, 0)]=-0.842646683887*x_ref[0] + (-0.737852891809)*x_ref[1]
        arg[(1, 1)]=0.987180727237*x[0] + (-0.368287535615)*x[1]
        ref[(1, 1)]=0.987180727237*x_ref[0] + (-0.368287535615)*x_ref[1]
        arg[(1, 2)]=0.505020739808*x[0] + (-0.891038640141)*x[1]
        ref[(1, 2)]=0.505020739808*x_ref[0] + (-0.891038640141)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=-0.670350705167*x[2]
            ref[(0, 0)]+=-0.670350705167*x_ref[2]
            arg[(0, 1)]+=0.87896926076*x[2]
            ref[(0, 1)]+=0.87896926076*x_ref[2]
            arg[(0, 2)]+=-0.699194070009*x[2]
            ref[(0, 2)]+=-0.699194070009*x_ref[2]
            arg[(1, 0)]+=0.799375439908*x[2]
            ref[(1, 0)]+=0.799375439908*x_ref[2]
            arg[(1, 1)]+=0.436617181551*x[2]
            ref[(1, 1)]+=0.436617181551*x_ref[2]
            arg[(1, 2)]+=-0.859514212022*x[2]
            ref[(1, 2)]+=-0.859514212022*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 2),w)
        ref = Data(0,(2, 4, 2),w_ref)
        arg[(0, 0, 0)]=-0.0833941203095*x[0] + (0.715440268613)*x[1]
        ref[(0, 0, 0)]=-0.0833941203095*x_ref[0] + (0.715440268613)*x_ref[1]
        arg[(0, 0, 1)]=0.568064881495*x[0] + (-0.537592253557)*x[1]
        ref[(0, 0, 1)]=0.568064881495*x_ref[0] + (-0.537592253557)*x_ref[1]
        arg[(0, 1, 0)]=-0.329653105619*x[0] + (-0.395105719367)*x[1]
        ref[(0, 1, 0)]=-0.329653105619*x_ref[0] + (-0.395105719367)*x_ref[1]
        arg[(0, 1, 1)]=-0.655979952272*x[0] + (0.258453378528)*x[1]
        ref[(0, 1, 1)]=-0.655979952272*x_ref[0] + (0.258453378528)*x_ref[1]
        arg[(0, 2, 0)]=-0.269675397278*x[0] + (-0.0144753474292)*x[1]
        ref[(0, 2, 0)]=-0.269675397278*x_ref[0] + (-0.0144753474292)*x_ref[1]
        arg[(0, 2, 1)]=-0.77898104251*x[0] + (-0.895375085209)*x[1]
        ref[(0, 2, 1)]=-0.77898104251*x_ref[0] + (-0.895375085209)*x_ref[1]
        arg[(0, 3, 0)]=0.89006000505*x[0] + (0.824305834763)*x[1]
        ref[(0, 3, 0)]=0.89006000505*x_ref[0] + (0.824305834763)*x_ref[1]
        arg[(0, 3, 1)]=0.372004968637*x[0] + (0.969245516024)*x[1]
        ref[(0, 3, 1)]=0.372004968637*x_ref[0] + (0.969245516024)*x_ref[1]
        arg[(1, 0, 0)]=-0.0701218012598*x[0] + (0.310146284517)*x[1]
        ref[(1, 0, 0)]=-0.0701218012598*x_ref[0] + (0.310146284517)*x_ref[1]
        arg[(1, 0, 1)]=0.364446477692*x[0] + (0.0560010022934)*x[1]
        ref[(1, 0, 1)]=0.364446477692*x_ref[0] + (0.0560010022934)*x_ref[1]
        arg[(1, 1, 0)]=0.519586939444*x[0] + (0.0427614917717)*x[1]
        ref[(1, 1, 0)]=0.519586939444*x_ref[0] + (0.0427614917717)*x_ref[1]
        arg[(1, 1, 1)]=0.541898262849*x[0] + (0.729321860773)*x[1]
        ref[(1, 1, 1)]=0.541898262849*x_ref[0] + (0.729321860773)*x_ref[1]
        arg[(1, 2, 0)]=0.171148726716*x[0] + (0.250290999404)*x[1]
        ref[(1, 2, 0)]=0.171148726716*x_ref[0] + (0.250290999404)*x_ref[1]
        arg[(1, 2, 1)]=0.0845378277169*x[0] + (0.679731081852)*x[1]
        ref[(1, 2, 1)]=0.0845378277169*x_ref[0] + (0.679731081852)*x_ref[1]
        arg[(1, 3, 0)]=-0.92972323688*x[0] + (-0.129094622304)*x[1]
        ref[(1, 3, 0)]=-0.92972323688*x_ref[0] + (-0.129094622304)*x_ref[1]
        arg[(1, 3, 1)]=-0.197851453972*x[0] + (0.133637462389)*x[1]
        ref[(1, 3, 1)]=-0.197851453972*x_ref[0] + (0.133637462389)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.790196275046*x[2]
            ref[(0, 0, 0)]+=-0.790196275046*x_ref[2]
            arg[(0, 0, 1)]+=0.734630902283*x[2]
            ref[(0, 0, 1)]+=0.734630902283*x_ref[2]
            arg[(0, 1, 0)]+=0.938527177667*x[2]
            ref[(0, 1, 0)]+=0.938527177667*x_ref[2]
            arg[(0, 1, 1)]+=0.772506949696*x[2]
            ref[(0, 1, 1)]+=0.772506949696*x_ref[2]
            arg[(0, 2, 0)]+=-0.0455406656276*x[2]
            ref[(0, 2, 0)]+=-0.0455406656276*x_ref[2]
            arg[(0, 2, 1)]+=-0.336500153212*x[2]
            ref[(0, 2, 1)]+=-0.336500153212*x_ref[2]
            arg[(0, 3, 0)]+=0.863517123476*x[2]
            ref[(0, 3, 0)]+=0.863517123476*x_ref[2]
            arg[(0, 3, 1)]+=0.813913696846*x[2]
            ref[(0, 3, 1)]+=0.813913696846*x_ref[2]
            arg[(1, 0, 0)]+=-0.943150455518*x[2]
            ref[(1, 0, 0)]+=-0.943150455518*x_ref[2]
            arg[(1, 0, 1)]+=0.089399096157*x[2]
            ref[(1, 0, 1)]+=0.089399096157*x_ref[2]
            arg[(1, 1, 0)]+=0.851743150621*x[2]
            ref[(1, 1, 0)]+=0.851743150621*x_ref[2]
            arg[(1, 1, 1)]+=0.0403297270159*x[2]
            ref[(1, 1, 1)]+=0.0403297270159*x_ref[2]
            arg[(1, 2, 0)]+=-0.324251661199*x[2]
            ref[(1, 2, 0)]+=-0.324251661199*x_ref[2]
            arg[(1, 2, 1)]+=-0.153197851935*x[2]
            ref[(1, 2, 1)]+=-0.153197851935*x_ref[2]
            arg[(1, 3, 0)]+=-0.49888415047*x[2]
            ref[(1, 3, 0)]+=-0.49888415047*x_ref[2]
            arg[(1, 3, 1)]+=0.133850830603*x[2]
            ref[(1, 3, 1)]+=0.133850830603*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports interpolation from ReducedContinuousFunction to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 3, 3),w)
        ref = Data(0,(4, 2, 3, 3),w_ref)
        arg[(0, 0, 0, 0)]=0.719775542908*x[0] + (-0.841899929244)*x[1]
        ref[(0, 0, 0, 0)]=0.719775542908*x_ref[0] + (-0.841899929244)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.588998527072*x[0] + (-0.777344535964)*x[1]
        ref[(0, 0, 0, 1)]=0.588998527072*x_ref[0] + (-0.777344535964)*x_ref[1]
        arg[(0, 0, 0, 2)]=-0.308653521355*x[0] + (0.493170795836)*x[1]
        ref[(0, 0, 0, 2)]=-0.308653521355*x_ref[0] + (0.493170795836)*x_ref[1]
        arg[(0, 0, 1, 0)]=0.170664535949*x[0] + (-0.677281220856)*x[1]
        ref[(0, 0, 1, 0)]=0.170664535949*x_ref[0] + (-0.677281220856)*x_ref[1]
        arg[(0, 0, 1, 1)]=-0.872064182682*x[0] + (0.648223205129)*x[1]
        ref[(0, 0, 1, 1)]=-0.872064182682*x_ref[0] + (0.648223205129)*x_ref[1]
        arg[(0, 0, 1, 2)]=0.570743888193*x[0] + (-0.268629618989)*x[1]
        ref[(0, 0, 1, 2)]=0.570743888193*x_ref[0] + (-0.268629618989)*x_ref[1]
        arg[(0, 0, 2, 0)]=0.802456432757*x[0] + (-0.258366508912)*x[1]
        ref[(0, 0, 2, 0)]=0.802456432757*x_ref[0] + (-0.258366508912)*x_ref[1]
        arg[(0, 0, 2, 1)]=0.478023953043*x[0] + (-0.722709938108)*x[1]
        ref[(0, 0, 2, 1)]=0.478023953043*x_ref[0] + (-0.722709938108)*x_ref[1]
        arg[(0, 0, 2, 2)]=0.369065772054*x[0] + (-0.301255272042)*x[1]
        ref[(0, 0, 2, 2)]=0.369065772054*x_ref[0] + (-0.301255272042)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.944617606764*x[0] + (0.179420230079)*x[1]
        ref[(0, 1, 0, 0)]=0.944617606764*x_ref[0] + (0.179420230079)*x_ref[1]
        arg[(0, 1, 0, 1)]=0.230797298631*x[0] + (0.934098934608)*x[1]
        ref[(0, 1, 0, 1)]=0.230797298631*x_ref[0] + (0.934098934608)*x_ref[1]
        arg[(0, 1, 0, 2)]=-0.242344761625*x[0] + (0.749181273498)*x[1]
        ref[(0, 1, 0, 2)]=-0.242344761625*x_ref[0] + (0.749181273498)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.91874479393*x[0] + (0.0837830512174)*x[1]
        ref[(0, 1, 1, 0)]=-0.91874479393*x_ref[0] + (0.0837830512174)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.810547401238*x[0] + (-0.56396691935)*x[1]
        ref[(0, 1, 1, 1)]=0.810547401238*x_ref[0] + (-0.56396691935)*x_ref[1]
        arg[(0, 1, 1, 2)]=-0.688690118291*x[0] + (-0.74696930811)*x[1]
        ref[(0, 1, 1, 2)]=-0.688690118291*x_ref[0] + (-0.74696930811)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.947886851958*x[0] + (0.63070811827)*x[1]
        ref[(0, 1, 2, 0)]=-0.947886851958*x_ref[0] + (0.63070811827)*x_ref[1]
        arg[(0, 1, 2, 1)]=-0.933954681271*x[0] + (0.186116465867)*x[1]
        ref[(0, 1, 2, 1)]=-0.933954681271*x_ref[0] + (0.186116465867)*x_ref[1]
        arg[(0, 1, 2, 2)]=0.851141961372*x[0] + (-0.0625228223146)*x[1]
        ref[(0, 1, 2, 2)]=0.851141961372*x_ref[0] + (-0.0625228223146)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.547336052496*x[0] + (0.488064306311)*x[1]
        ref[(1, 0, 0, 0)]=0.547336052496*x_ref[0] + (0.488064306311)*x_ref[1]
        arg[(1, 0, 0, 1)]=-0.563197467273*x[0] + (-0.989141932427)*x[1]
        ref[(1, 0, 0, 1)]=-0.563197467273*x_ref[0] + (-0.989141932427)*x_ref[1]
        arg[(1, 0, 0, 2)]=0.537192392153*x[0] + (0.788283971831)*x[1]
        ref[(1, 0, 0, 2)]=0.537192392153*x_ref[0] + (0.788283971831)*x_ref[1]
        arg[(1, 0, 1, 0)]=-0.623202068421*x[0] + (0.719843594312)*x[1]
        ref[(1, 0, 1, 0)]=-0.623202068421*x_ref[0] + (0.719843594312)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.448989311259*x[0] + (0.0798747301544)*x[1]
        ref[(1, 0, 1, 1)]=0.448989311259*x_ref[0] + (0.0798747301544)*x_ref[1]
        arg[(1, 0, 1, 2)]=-0.0672320439386*x[0] + (0.16628074509)*x[1]
        ref[(1, 0, 1, 2)]=-0.0672320439386*x_ref[0] + (0.16628074509)*x_ref[1]
        arg[(1, 0, 2, 0)]=0.859728547873*x[0] + (-0.695992971479)*x[1]
        ref[(1, 0, 2, 0)]=0.859728547873*x_ref[0] + (-0.695992971479)*x_ref[1]
        arg[(1, 0, 2, 1)]=-0.880392746774*x[0] + (-0.870249638557)*x[1]
        ref[(1, 0, 2, 1)]=-0.880392746774*x_ref[0] + (-0.870249638557)*x_ref[1]
        arg[(1, 0, 2, 2)]=-0.757492809527*x[0] + (0.658882589484)*x[1]
        ref[(1, 0, 2, 2)]=-0.757492809527*x_ref[0] + (0.658882589484)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.765949588026*x[0] + (-0.530347340442)*x[1]
        ref[(1, 1, 0, 0)]=-0.765949588026*x_ref[0] + (-0.530347340442)*x_ref[1]
        arg[(1, 1, 0, 1)]=-0.51225797749*x[0] + (-0.283550013794)*x[1]
        ref[(1, 1, 0, 1)]=-0.51225797749*x_ref[0] + (-0.283550013794)*x_ref[1]
        arg[(1, 1, 0, 2)]=0.43530694229*x[0] + (0.622003951475)*x[1]
        ref[(1, 1, 0, 2)]=0.43530694229*x_ref[0] + (0.622003951475)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.721983440777*x[0] + (-0.840661706015)*x[1]
        ref[(1, 1, 1, 0)]=0.721983440777*x_ref[0] + (-0.840661706015)*x_ref[1]
        arg[(1, 1, 1, 1)]=-0.587600897755*x[0] + (-0.0765237596805)*x[1]
        ref[(1, 1, 1, 1)]=-0.587600897755*x_ref[0] + (-0.0765237596805)*x_ref[1]
        arg[(1, 1, 1, 2)]=-0.796338284106*x[0] + (0.480421996626)*x[1]
        ref[(1, 1, 1, 2)]=-0.796338284106*x_ref[0] + (0.480421996626)*x_ref[1]
        arg[(1, 1, 2, 0)]=-0.23288376238*x[0] + (-0.253429588026)*x[1]
        ref[(1, 1, 2, 0)]=-0.23288376238*x_ref[0] + (-0.253429588026)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.570753575209*x[0] + (-0.812606890874)*x[1]
        ref[(1, 1, 2, 1)]=-0.570753575209*x_ref[0] + (-0.812606890874)*x_ref[1]
        arg[(1, 1, 2, 2)]=-0.821571115323*x[0] + (-0.0952331206977)*x[1]
        ref[(1, 1, 2, 2)]=-0.821571115323*x_ref[0] + (-0.0952331206977)*x_ref[1]
        arg[(2, 0, 0, 0)]=-0.902800415098*x[0] + (0.143935889279)*x[1]
        ref[(2, 0, 0, 0)]=-0.902800415098*x_ref[0] + (0.143935889279)*x_ref[1]
        arg[(2, 0, 0, 1)]=0.0928055854543*x[0] + (-0.681956870274)*x[1]
        ref[(2, 0, 0, 1)]=0.0928055854543*x_ref[0] + (-0.681956870274)*x_ref[1]
        arg[(2, 0, 0, 2)]=-0.353030126798*x[0] + (-0.480594746941)*x[1]
        ref[(2, 0, 0, 2)]=-0.353030126798*x_ref[0] + (-0.480594746941)*x_ref[1]
        arg[(2, 0, 1, 0)]=-0.00341378094007*x[0] + (-0.263660176783)*x[1]
        ref[(2, 0, 1, 0)]=-0.00341378094007*x_ref[0] + (-0.263660176783)*x_ref[1]
        arg[(2, 0, 1, 1)]=0.454258534143*x[0] + (-0.0723222081186)*x[1]
        ref[(2, 0, 1, 1)]=0.454258534143*x_ref[0] + (-0.0723222081186)*x_ref[1]
        arg[(2, 0, 1, 2)]=0.859487082554*x[0] + (-0.861590932805)*x[1]
        ref[(2, 0, 1, 2)]=0.859487082554*x_ref[0] + (-0.861590932805)*x_ref[1]
        arg[(2, 0, 2, 0)]=-0.719639284995*x[0] + (-0.073806809252)*x[1]
        ref[(2, 0, 2, 0)]=-0.719639284995*x_ref[0] + (-0.073806809252)*x_ref[1]
        arg[(2, 0, 2, 1)]=0.419221639354*x[0] + (-0.827962851522)*x[1]
        ref[(2, 0, 2, 1)]=0.419221639354*x_ref[0] + (-0.827962851522)*x_ref[1]
        arg[(2, 0, 2, 2)]=0.17733548076*x[0] + (0.44928946518)*x[1]
        ref[(2, 0, 2, 2)]=0.17733548076*x_ref[0] + (0.44928946518)*x_ref[1]
        arg[(2, 1, 0, 0)]=0.626354554993*x[0] + (0.011737487851)*x[1]
        ref[(2, 1, 0, 0)]=0.626354554993*x_ref[0] + (0.011737487851)*x_ref[1]
        arg[(2, 1, 0, 1)]=-0.957930951594*x[0] + (0.836034592776)*x[1]
        ref[(2, 1, 0, 1)]=-0.957930951594*x_ref[0] + (0.836034592776)*x_ref[1]
        arg[(2, 1, 0, 2)]=-0.253289545508*x[0] + (-0.018778835251)*x[1]
        ref[(2, 1, 0, 2)]=-0.253289545508*x_ref[0] + (-0.018778835251)*x_ref[1]
        arg[(2, 1, 1, 0)]=0.349230496572*x[0] + (0.650188575864)*x[1]
        ref[(2, 1, 1, 0)]=0.349230496572*x_ref[0] + (0.650188575864)*x_ref[1]
        arg[(2, 1, 1, 1)]=-0.468048372295*x[0] + (0.696965150536)*x[1]
        ref[(2, 1, 1, 1)]=-0.468048372295*x_ref[0] + (0.696965150536)*x_ref[1]
        arg[(2, 1, 1, 2)]=0.56213654436*x[0] + (0.0461946225697)*x[1]
        ref[(2, 1, 1, 2)]=0.56213654436*x_ref[0] + (0.0461946225697)*x_ref[1]
        arg[(2, 1, 2, 0)]=-0.614553364577*x[0] + (-0.147227860179)*x[1]
        ref[(2, 1, 2, 0)]=-0.614553364577*x_ref[0] + (-0.147227860179)*x_ref[1]
        arg[(2, 1, 2, 1)]=0.083077477696*x[0] + (-0.18708096379)*x[1]
        ref[(2, 1, 2, 1)]=0.083077477696*x_ref[0] + (-0.18708096379)*x_ref[1]
        arg[(2, 1, 2, 2)]=0.464530016071*x[0] + (0.22604272521)*x[1]
        ref[(2, 1, 2, 2)]=0.464530016071*x_ref[0] + (0.22604272521)*x_ref[1]
        arg[(3, 0, 0, 0)]=-0.115990517004*x[0] + (0.0919509329682)*x[1]
        ref[(3, 0, 0, 0)]=-0.115990517004*x_ref[0] + (0.0919509329682)*x_ref[1]
        arg[(3, 0, 0, 1)]=-0.520082122204*x[0] + (0.596488992035)*x[1]
        ref[(3, 0, 0, 1)]=-0.520082122204*x_ref[0] + (0.596488992035)*x_ref[1]
        arg[(3, 0, 0, 2)]=-0.963767964236*x[0] + (0.63448634864)*x[1]
        ref[(3, 0, 0, 2)]=-0.963767964236*x_ref[0] + (0.63448634864)*x_ref[1]
        arg[(3, 0, 1, 0)]=0.271711491387*x[0] + (0.52676272953)*x[1]
        ref[(3, 0, 1, 0)]=0.271711491387*x_ref[0] + (0.52676272953)*x_ref[1]
        arg[(3, 0, 1, 1)]=-0.835043964897*x[0] + (-0.72788962063)*x[1]
        ref[(3, 0, 1, 1)]=-0.835043964897*x_ref[0] + (-0.72788962063)*x_ref[1]
        arg[(3, 0, 1, 2)]=0.0260181694197*x[0] + (0.387734350018)*x[1]
        ref[(3, 0, 1, 2)]=0.0260181694197*x_ref[0] + (0.387734350018)*x_ref[1]
        arg[(3, 0, 2, 0)]=-0.187823975298*x[0] + (0.344205740066)*x[1]
        ref[(3, 0, 2, 0)]=-0.187823975298*x_ref[0] + (0.344205740066)*x_ref[1]
        arg[(3, 0, 2, 1)]=0.110011086914*x[0] + (-0.231012255181)*x[1]
        ref[(3, 0, 2, 1)]=0.110011086914*x_ref[0] + (-0.231012255181)*x_ref[1]
        arg[(3, 0, 2, 2)]=0.894786107047*x[0] + (0.824737621514)*x[1]
        ref[(3, 0, 2, 2)]=0.894786107047*x_ref[0] + (0.824737621514)*x_ref[1]
        arg[(3, 1, 0, 0)]=-0.540627241379*x[0] + (0.399388642274)*x[1]
        ref[(3, 1, 0, 0)]=-0.540627241379*x_ref[0] + (0.399388642274)*x_ref[1]
        arg[(3, 1, 0, 1)]=-0.32345929616*x[0] + (0.214859362457)*x[1]
        ref[(3, 1, 0, 1)]=-0.32345929616*x_ref[0] + (0.214859362457)*x_ref[1]
        arg[(3, 1, 0, 2)]=0.864346857901*x[0] + (-0.745660596808)*x[1]
        ref[(3, 1, 0, 2)]=0.864346857901*x_ref[0] + (-0.745660596808)*x_ref[1]
        arg[(3, 1, 1, 0)]=-0.979016284711*x[0] + (-0.808936543765)*x[1]
        ref[(3, 1, 1, 0)]=-0.979016284711*x_ref[0] + (-0.808936543765)*x_ref[1]
        arg[(3, 1, 1, 1)]=-0.279831097005*x[0] + (-0.798337908896)*x[1]
        ref[(3, 1, 1, 1)]=-0.279831097005*x_ref[0] + (-0.798337908896)*x_ref[1]
        arg[(3, 1, 1, 2)]=-0.881275561054*x[0] + (-0.919046976565)*x[1]
        ref[(3, 1, 1, 2)]=-0.881275561054*x_ref[0] + (-0.919046976565)*x_ref[1]
        arg[(3, 1, 2, 0)]=0.234509380086*x[0] + (-0.113355382125)*x[1]
        ref[(3, 1, 2, 0)]=0.234509380086*x_ref[0] + (-0.113355382125)*x_ref[1]
        arg[(3, 1, 2, 1)]=0.940922599521*x[0] + (0.553645009252)*x[1]
        ref[(3, 1, 2, 1)]=0.940922599521*x_ref[0] + (0.553645009252)*x_ref[1]
        arg[(3, 1, 2, 2)]=0.26764927968*x[0] + (-0.665606901664)*x[1]
        ref[(3, 1, 2, 2)]=0.26764927968*x_ref[0] + (-0.665606901664)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.318042615517*x[2]
            ref[(0, 0, 0, 0)]+=-0.318042615517*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.0662052197375*x[2]
            ref[(0, 0, 0, 1)]+=-0.0662052197375*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.811147564362*x[2]
            ref[(0, 0, 0, 2)]+=0.811147564362*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.13438779707*x[2]
            ref[(0, 0, 1, 0)]+=-0.13438779707*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.658751612901*x[2]
            ref[(0, 0, 1, 1)]+=0.658751612901*x_ref[2]
            arg[(0, 0, 1, 2)]+=0.546516446881*x[2]
            ref[(0, 0, 1, 2)]+=0.546516446881*x_ref[2]
            arg[(0, 0, 2, 0)]+=0.541550204005*x[2]
            ref[(0, 0, 2, 0)]+=0.541550204005*x_ref[2]
            arg[(0, 0, 2, 1)]+=-0.0614547787613*x[2]
            ref[(0, 0, 2, 1)]+=-0.0614547787613*x_ref[2]
            arg[(0, 0, 2, 2)]+=-0.121284745006*x[2]
            ref[(0, 0, 2, 2)]+=-0.121284745006*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.649835896389*x[2]
            ref[(0, 1, 0, 0)]+=-0.649835896389*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.50744902467*x[2]
            ref[(0, 1, 0, 1)]+=-0.50744902467*x_ref[2]
            arg[(0, 1, 0, 2)]+=-0.373054459547*x[2]
            ref[(0, 1, 0, 2)]+=-0.373054459547*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.575617214868*x[2]
            ref[(0, 1, 1, 0)]+=0.575617214868*x_ref[2]
            arg[(0, 1, 1, 1)]+=0.699876039726*x[2]
            ref[(0, 1, 1, 1)]+=0.699876039726*x_ref[2]
            arg[(0, 1, 1, 2)]+=-0.81081663402*x[2]
            ref[(0, 1, 1, 2)]+=-0.81081663402*x_ref[2]
            arg[(0, 1, 2, 0)]+=-0.0701430736375*x[2]
            ref[(0, 1, 2, 0)]+=-0.0701430736375*x_ref[2]
            arg[(0, 1, 2, 1)]+=-0.200095632674*x[2]
            ref[(0, 1, 2, 1)]+=-0.200095632674*x_ref[2]
            arg[(0, 1, 2, 2)]+=0.55066114299*x[2]
            ref[(0, 1, 2, 2)]+=0.55066114299*x_ref[2]
            arg[(1, 0, 0, 0)]+=0.307654776506*x[2]
            ref[(1, 0, 0, 0)]+=0.307654776506*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.518455649014*x[2]
            ref[(1, 0, 0, 1)]+=0.518455649014*x_ref[2]
            arg[(1, 0, 0, 2)]+=-0.625738162909*x[2]
            ref[(1, 0, 0, 2)]+=-0.625738162909*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.224026794653*x[2]
            ref[(1, 0, 1, 0)]+=-0.224026794653*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.392653056705*x[2]
            ref[(1, 0, 1, 1)]+=-0.392653056705*x_ref[2]
            arg[(1, 0, 1, 2)]+=-0.746339863718*x[2]
            ref[(1, 0, 1, 2)]+=-0.746339863718*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.726591066389*x[2]
            ref[(1, 0, 2, 0)]+=-0.726591066389*x_ref[2]
            arg[(1, 0, 2, 1)]+=-0.164314705679*x[2]
            ref[(1, 0, 2, 1)]+=-0.164314705679*x_ref[2]
            arg[(1, 0, 2, 2)]+=-0.691209029368*x[2]
            ref[(1, 0, 2, 2)]+=-0.691209029368*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.827528828419*x[2]
            ref[(1, 1, 0, 0)]+=0.827528828419*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.197854998523*x[2]
            ref[(1, 1, 0, 1)]+=0.197854998523*x_ref[2]
            arg[(1, 1, 0, 2)]+=-0.199461842604*x[2]
            ref[(1, 1, 0, 2)]+=-0.199461842604*x_ref[2]
            arg[(1, 1, 1, 0)]+=-0.518324551558*x[2]
            ref[(1, 1, 1, 0)]+=-0.518324551558*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.183735165067*x[2]
            ref[(1, 1, 1, 1)]+=0.183735165067*x_ref[2]
            arg[(1, 1, 1, 2)]+=0.403864377476*x[2]
            ref[(1, 1, 1, 2)]+=0.403864377476*x_ref[2]
            arg[(1, 1, 2, 0)]+=-0.694398265233*x[2]
            ref[(1, 1, 2, 0)]+=-0.694398265233*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.654034301059*x[2]
            ref[(1, 1, 2, 1)]+=0.654034301059*x_ref[2]
            arg[(1, 1, 2, 2)]+=0.938972873224*x[2]
            ref[(1, 1, 2, 2)]+=0.938972873224*x_ref[2]
            arg[(2, 0, 0, 0)]+=0.799825501841*x[2]
            ref[(2, 0, 0, 0)]+=0.799825501841*x_ref[2]
            arg[(2, 0, 0, 1)]+=-0.90578996068*x[2]
            ref[(2, 0, 0, 1)]+=-0.90578996068*x_ref[2]
            arg[(2, 0, 0, 2)]+=0.279678874112*x[2]
            ref[(2, 0, 0, 2)]+=0.279678874112*x_ref[2]
            arg[(2, 0, 1, 0)]+=0.23632307896*x[2]
            ref[(2, 0, 1, 0)]+=0.23632307896*x_ref[2]
            arg[(2, 0, 1, 1)]+=-0.0665728735094*x[2]
            ref[(2, 0, 1, 1)]+=-0.0665728735094*x_ref[2]
            arg[(2, 0, 1, 2)]+=0.412851896106*x[2]
            ref[(2, 0, 1, 2)]+=0.412851896106*x_ref[2]
            arg[(2, 0, 2, 0)]+=-0.79862948771*x[2]
            ref[(2, 0, 2, 0)]+=-0.79862948771*x_ref[2]
            arg[(2, 0, 2, 1)]+=-0.836134710249*x[2]
            ref[(2, 0, 2, 1)]+=-0.836134710249*x_ref[2]
            arg[(2, 0, 2, 2)]+=-0.667569411873*x[2]
            ref[(2, 0, 2, 2)]+=-0.667569411873*x_ref[2]
            arg[(2, 1, 0, 0)]+=0.592739881226*x[2]
            ref[(2, 1, 0, 0)]+=0.592739881226*x_ref[2]
            arg[(2, 1, 0, 1)]+=-0.345085690784*x[2]
            ref[(2, 1, 0, 1)]+=-0.345085690784*x_ref[2]
            arg[(2, 1, 0, 2)]+=0.393488579345*x[2]
            ref[(2, 1, 0, 2)]+=0.393488579345*x_ref[2]
            arg[(2, 1, 1, 0)]+=-0.225740657926*x[2]
            ref[(2, 1, 1, 0)]+=-0.225740657926*x_ref[2]
            arg[(2, 1, 1, 1)]+=-0.0600074442022*x[2]
            ref[(2, 1, 1, 1)]+=-0.0600074442022*x_ref[2]
            arg[(2, 1, 1, 2)]+=0.112207737944*x[2]
            ref[(2, 1, 1, 2)]+=0.112207737944*x_ref[2]
            arg[(2, 1, 2, 0)]+=-0.445034230858*x[2]
            ref[(2, 1, 2, 0)]+=-0.445034230858*x_ref[2]
            arg[(2, 1, 2, 1)]+=-0.20537535916*x[2]
            ref[(2, 1, 2, 1)]+=-0.20537535916*x_ref[2]
            arg[(2, 1, 2, 2)]+=0.7982664634*x[2]
            ref[(2, 1, 2, 2)]+=0.7982664634*x_ref[2]
            arg[(3, 0, 0, 0)]+=0.717377256924*x[2]
            ref[(3, 0, 0, 0)]+=0.717377256924*x_ref[2]
            arg[(3, 0, 0, 1)]+=0.392398531299*x[2]
            ref[(3, 0, 0, 1)]+=0.392398531299*x_ref[2]
            arg[(3, 0, 0, 2)]+=0.825527526539*x[2]
            ref[(3, 0, 0, 2)]+=0.825527526539*x_ref[2]
            arg[(3, 0, 1, 0)]+=0.12473894876*x[2]
            ref[(3, 0, 1, 0)]+=0.12473894876*x_ref[2]
            arg[(3, 0, 1, 1)]+=0.34896329044*x[2]
            ref[(3, 0, 1, 1)]+=0.34896329044*x_ref[2]
            arg[(3, 0, 1, 2)]+=-0.130412234895*x[2]
            ref[(3, 0, 1, 2)]+=-0.130412234895*x_ref[2]
            arg[(3, 0, 2, 0)]+=-0.133198287921*x[2]
            ref[(3, 0, 2, 0)]+=-0.133198287921*x_ref[2]
            arg[(3, 0, 2, 1)]+=-0.413514418969*x[2]
            ref[(3, 0, 2, 1)]+=-0.413514418969*x_ref[2]
            arg[(3, 0, 2, 2)]+=0.111856668613*x[2]
            ref[(3, 0, 2, 2)]+=0.111856668613*x_ref[2]
            arg[(3, 1, 0, 0)]+=-0.767443560802*x[2]
            ref[(3, 1, 0, 0)]+=-0.767443560802*x_ref[2]
            arg[(3, 1, 0, 1)]+=0.298505134285*x[2]
            ref[(3, 1, 0, 1)]+=0.298505134285*x_ref[2]
            arg[(3, 1, 0, 2)]+=-0.115491794289*x[2]
            ref[(3, 1, 0, 2)]+=-0.115491794289*x_ref[2]
            arg[(3, 1, 1, 0)]+=-0.0301453990033*x[2]
            ref[(3, 1, 1, 0)]+=-0.0301453990033*x_ref[2]
            arg[(3, 1, 1, 1)]+=0.300456258554*x[2]
            ref[(3, 1, 1, 1)]+=0.300456258554*x_ref[2]
            arg[(3, 1, 1, 2)]+=0.0982956942527*x[2]
            ref[(3, 1, 1, 2)]+=0.0982956942527*x_ref[2]
            arg[(3, 1, 2, 0)]+=-0.809589727345*x[2]
            ref[(3, 1, 2, 0)]+=-0.809589727345*x_ref[2]
            arg[(3, 1, 2, 1)]+=-0.510255295098*x[2]
            ref[(3, 1, 2, 1)]+=-0.510255295098*x_ref[2]
            arg[(3, 1, 2, 2)]+=0.321149616057*x[2]
            ref[(3, 1, 2, 2)]+=0.321149616057*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.376799320001*x[0]**o + (0.72030889118)*x[0] + (0.0821405922467)*x[1]**o + (0.569454350694)*x[1]
        ref=-0.376799320001*x_ref[0]**o + (0.72030889118)*x_ref[0] + (0.0821405922467)*x_ref[1]**o + (0.569454350694)*x_ref[1]
        if dim==3:
            arg+=(-0.95955739919)*x[2]**o + (0.0108061076362)*x[2]
            ref+=(-0.95955739919)*x_ref[2]**o + (0.0108061076362)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=0.39387913936*x[0]**o + (-0.147169478403)*x[0] + (0.721343723921)*x[1]**o + (-0.3599542584)*x[1]
        ref[(0,)]=0.39387913936*x_ref[0]**o + (-0.147169478403)*x_ref[0] + (0.721343723921)*x_ref[1]**o + (-0.3599542584)*x_ref[1]
        arg[(1,)]=-0.44562467517*x[0]**o + (0.263594734982)*x[0] + (-0.639475848868)*x[1]**o + (-0.969156714895)*x[1]
        ref[(1,)]=-0.44562467517*x_ref[0]**o + (0.263594734982)*x_ref[0] + (-0.639475848868)*x_ref[1]**o + (-0.969156714895)*x_ref[1]
        arg[(2,)]=-0.0569765569915*x[0]**o + (0.553800582826)*x[0] + (-0.541859703801)*x[1]**o + (-0.891407455528)*x[1]
        ref[(2,)]=-0.0569765569915*x_ref[0]**o + (0.553800582826)*x_ref[0] + (-0.541859703801)*x_ref[1]**o + (-0.891407455528)*x_ref[1]
        if dim==3:
            arg[(0,)]+=-0.95329210676*x[2]**o + (-0.185757460412)*x[2]
            ref[(0,)]+=-0.95329210676*x_ref[2]**o + (-0.185757460412)*x_ref[2]
            arg[(1,)]+=0.257969123564*x[2]**o + (0.146938122433)*x[2]
            ref[(1,)]+=0.257969123564*x_ref[2]**o + (0.146938122433)*x_ref[2]
            arg[(2,)]+=-0.960585765123*x[2]**o + (0.838242945142)*x[2]
            ref[(2,)]+=-0.960585765123*x_ref[2]**o + (0.838242945142)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref = Data(0,(2, 2),w_ref)
        arg[(0, 0)]=-0.620194237611*x[0]**o + (-0.581184541716)*x[0] + (-0.983656267365)*x[1]**o + (0.525282885173)*x[1]
        ref[(0, 0)]=-0.620194237611*x_ref[0]**o + (-0.581184541716)*x_ref[0] + (-0.983656267365)*x_ref[1]**o + (0.525282885173)*x_ref[1]
        arg[(0, 1)]=-0.00512526655122*x[0]**o + (0.168628841496)*x[0] + (-0.711423954092)*x[1]**o + (-0.774434788804)*x[1]
        ref[(0, 1)]=-0.00512526655122*x_ref[0]**o + (0.168628841496)*x_ref[0] + (-0.711423954092)*x_ref[1]**o + (-0.774434788804)*x_ref[1]
        arg[(1, 0)]=-0.502383159265*x[0]**o + (0.482778992676)*x[0] + (0.642543429683)*x[1]**o + (-0.664443257479)*x[1]
        ref[(1, 0)]=-0.502383159265*x_ref[0]**o + (0.482778992676)*x_ref[0] + (0.642543429683)*x_ref[1]**o + (-0.664443257479)*x_ref[1]
        arg[(1, 1)]=0.188068568567*x[0]**o + (0.832973356892)*x[0] + (0.724177174787)*x[1]**o + (-0.328246038655)*x[1]
        ref[(1, 1)]=0.188068568567*x_ref[0]**o + (0.832973356892)*x_ref[0] + (0.724177174787)*x_ref[1]**o + (-0.328246038655)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.510899233239*x[2]**o + (-0.0572352070754)*x[2]
            ref[(0, 0)]+=0.510899233239*x_ref[2]**o + (-0.0572352070754)*x_ref[2]
            arg[(0, 1)]+=-0.86475678166*x[2]**o + (0.715417153955)*x[2]
            ref[(0, 1)]+=-0.86475678166*x_ref[2]**o + (0.715417153955)*x_ref[2]
            arg[(1, 0)]+=0.694134294229*x[2]**o + (0.189235522727)*x[2]
            ref[(1, 0)]+=0.694134294229*x_ref[2]**o + (0.189235522727)*x_ref[2]
            arg[(1, 1)]+=-0.961817173911*x[2]**o + (-0.00107734585214)*x[2]
            ref[(1, 1)]+=-0.961817173911*x_ref[2]**o + (-0.00107734585214)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 4),w)
        ref = Data(0,(4, 2, 4),w_ref)
        arg[(0, 0, 0)]=0.721890600056*x[0]**o + (0.601865084986)*x[0] + (-0.521738733733)*x[1]**o + (-0.175894394564)*x[1]
        ref[(0, 0, 0)]=0.721890600056*x_ref[0]**o + (0.601865084986)*x_ref[0] + (-0.521738733733)*x_ref[1]**o + (-0.175894394564)*x_ref[1]
        arg[(0, 0, 1)]=-0.0431316328574*x[0]**o + (-0.319426717524)*x[0] + (-0.195014184372)*x[1]**o + (-0.820710673746)*x[1]
        ref[(0, 0, 1)]=-0.0431316328574*x_ref[0]**o + (-0.319426717524)*x_ref[0] + (-0.195014184372)*x_ref[1]**o + (-0.820710673746)*x_ref[1]
        arg[(0, 0, 2)]=0.614468712456*x[0]**o + (-0.459017520933)*x[0] + (0.334432275868)*x[1]**o + (0.00415215145876)*x[1]
        ref[(0, 0, 2)]=0.614468712456*x_ref[0]**o + (-0.459017520933)*x_ref[0] + (0.334432275868)*x_ref[1]**o + (0.00415215145876)*x_ref[1]
        arg[(0, 0, 3)]=0.0162523987848*x[0]**o + (-0.671771759491)*x[0] + (0.200394253032)*x[1]**o + (0.415991907863)*x[1]
        ref[(0, 0, 3)]=0.0162523987848*x_ref[0]**o + (-0.671771759491)*x_ref[0] + (0.200394253032)*x_ref[1]**o + (0.415991907863)*x_ref[1]
        arg[(0, 1, 0)]=-0.0351934794465*x[0]**o + (-0.656124212196)*x[0] + (-0.770515750422)*x[1]**o + (-0.0162475827262)*x[1]
        ref[(0, 1, 0)]=-0.0351934794465*x_ref[0]**o + (-0.656124212196)*x_ref[0] + (-0.770515750422)*x_ref[1]**o + (-0.0162475827262)*x_ref[1]
        arg[(0, 1, 1)]=-0.897912370221*x[0]**o + (0.632951434873)*x[0] + (0.879822316377)*x[1]**o + (-0.508856047369)*x[1]
        ref[(0, 1, 1)]=-0.897912370221*x_ref[0]**o + (0.632951434873)*x_ref[0] + (0.879822316377)*x_ref[1]**o + (-0.508856047369)*x_ref[1]
        arg[(0, 1, 2)]=0.578270100472*x[0]**o + (0.803477070404)*x[0] + (-0.531953190394)*x[1]**o + (-0.380147260233)*x[1]
        ref[(0, 1, 2)]=0.578270100472*x_ref[0]**o + (0.803477070404)*x_ref[0] + (-0.531953190394)*x_ref[1]**o + (-0.380147260233)*x_ref[1]
        arg[(0, 1, 3)]=0.655846456861*x[0]**o + (0.229913827083)*x[0] + (0.527667953071)*x[1]**o + (0.627065513202)*x[1]
        ref[(0, 1, 3)]=0.655846456861*x_ref[0]**o + (0.229913827083)*x_ref[0] + (0.527667953071)*x_ref[1]**o + (0.627065513202)*x_ref[1]
        arg[(1, 0, 0)]=0.646880395168*x[0]**o + (-0.122046459199)*x[0] + (0.345743015928)*x[1]**o + (-0.274050830137)*x[1]
        ref[(1, 0, 0)]=0.646880395168*x_ref[0]**o + (-0.122046459199)*x_ref[0] + (0.345743015928)*x_ref[1]**o + (-0.274050830137)*x_ref[1]
        arg[(1, 0, 1)]=-0.818561952674*x[0]**o + (-0.758054526443)*x[0] + (-0.979167837484)*x[1]**o + (0.627695928399)*x[1]
        ref[(1, 0, 1)]=-0.818561952674*x_ref[0]**o + (-0.758054526443)*x_ref[0] + (-0.979167837484)*x_ref[1]**o + (0.627695928399)*x_ref[1]
        arg[(1, 0, 2)]=-0.550811943933*x[0]**o + (0.43234915819)*x[0] + (-0.795118705151)*x[1]**o + (-0.313890272799)*x[1]
        ref[(1, 0, 2)]=-0.550811943933*x_ref[0]**o + (0.43234915819)*x_ref[0] + (-0.795118705151)*x_ref[1]**o + (-0.313890272799)*x_ref[1]
        arg[(1, 0, 3)]=-0.283087101407*x[0]**o + (0.157816671899)*x[0] + (-0.88957154117)*x[1]**o + (0.729708737367)*x[1]
        ref[(1, 0, 3)]=-0.283087101407*x_ref[0]**o + (0.157816671899)*x_ref[0] + (-0.88957154117)*x_ref[1]**o + (0.729708737367)*x_ref[1]
        arg[(1, 1, 0)]=-0.330519735397*x[0]**o + (0.232981669684)*x[0] + (-0.652989703277)*x[1]**o + (-0.7285097295)*x[1]
        ref[(1, 1, 0)]=-0.330519735397*x_ref[0]**o + (0.232981669684)*x_ref[0] + (-0.652989703277)*x_ref[1]**o + (-0.7285097295)*x_ref[1]
        arg[(1, 1, 1)]=0.95472906736*x[0]**o + (-0.0368248427551)*x[0] + (-0.798908242737)*x[1]**o + (-0.617460070074)*x[1]
        ref[(1, 1, 1)]=0.95472906736*x_ref[0]**o + (-0.0368248427551)*x_ref[0] + (-0.798908242737)*x_ref[1]**o + (-0.617460070074)*x_ref[1]
        arg[(1, 1, 2)]=-0.211411368048*x[0]**o + (0.332311199972)*x[0] + (-0.0339126495831)*x[1]**o + (0.626582934864)*x[1]
        ref[(1, 1, 2)]=-0.211411368048*x_ref[0]**o + (0.332311199972)*x_ref[0] + (-0.0339126495831)*x_ref[1]**o + (0.626582934864)*x_ref[1]
        arg[(1, 1, 3)]=-0.662114239834*x[0]**o + (0.653278815732)*x[0] + (0.141706075531)*x[1]**o + (-0.203202320031)*x[1]
        ref[(1, 1, 3)]=-0.662114239834*x_ref[0]**o + (0.653278815732)*x_ref[0] + (0.141706075531)*x_ref[1]**o + (-0.203202320031)*x_ref[1]
        arg[(2, 0, 0)]=0.907949066902*x[0]**o + (0.462340617013)*x[0] + (0.358425565443)*x[1]**o + (-0.649195494984)*x[1]
        ref[(2, 0, 0)]=0.907949066902*x_ref[0]**o + (0.462340617013)*x_ref[0] + (0.358425565443)*x_ref[1]**o + (-0.649195494984)*x_ref[1]
        arg[(2, 0, 1)]=-0.77002271856*x[0]**o + (0.587098777344)*x[0] + (-0.0184065443168)*x[1]**o + (0.145211189084)*x[1]
        ref[(2, 0, 1)]=-0.77002271856*x_ref[0]**o + (0.587098777344)*x_ref[0] + (-0.0184065443168)*x_ref[1]**o + (0.145211189084)*x_ref[1]
        arg[(2, 0, 2)]=0.337665597527*x[0]**o + (-0.385834756386)*x[0] + (0.47462164883)*x[1]**o + (-0.446793837408)*x[1]
        ref[(2, 0, 2)]=0.337665597527*x_ref[0]**o + (-0.385834756386)*x_ref[0] + (0.47462164883)*x_ref[1]**o + (-0.446793837408)*x_ref[1]
        arg[(2, 0, 3)]=0.258660067907*x[0]**o + (-0.676612043594)*x[0] + (-0.148370540694)*x[1]**o + (-0.075365296916)*x[1]
        ref[(2, 0, 3)]=0.258660067907*x_ref[0]**o + (-0.676612043594)*x_ref[0] + (-0.148370540694)*x_ref[1]**o + (-0.075365296916)*x_ref[1]
        arg[(2, 1, 0)]=-0.621992495078*x[0]**o + (0.622775205117)*x[0] + (-0.044953240202)*x[1]**o + (0.434118246044)*x[1]
        ref[(2, 1, 0)]=-0.621992495078*x_ref[0]**o + (0.622775205117)*x_ref[0] + (-0.044953240202)*x_ref[1]**o + (0.434118246044)*x_ref[1]
        arg[(2, 1, 1)]=-0.182429944948*x[0]**o + (-0.88872988888)*x[0] + (0.391746563723)*x[1]**o + (-0.199096577582)*x[1]
        ref[(2, 1, 1)]=-0.182429944948*x_ref[0]**o + (-0.88872988888)*x_ref[0] + (0.391746563723)*x_ref[1]**o + (-0.199096577582)*x_ref[1]
        arg[(2, 1, 2)]=-0.126374551674*x[0]**o + (-0.416597486927)*x[0] + (-0.144220769982)*x[1]**o + (0.280088356521)*x[1]
        ref[(2, 1, 2)]=-0.126374551674*x_ref[0]**o + (-0.416597486927)*x_ref[0] + (-0.144220769982)*x_ref[1]**o + (0.280088356521)*x_ref[1]
        arg[(2, 1, 3)]=0.24987273919*x[0]**o + (-0.310326246261)*x[0] + (0.424453573437)*x[1]**o + (-0.40588870511)*x[1]
        ref[(2, 1, 3)]=0.24987273919*x_ref[0]**o + (-0.310326246261)*x_ref[0] + (0.424453573437)*x_ref[1]**o + (-0.40588870511)*x_ref[1]
        arg[(3, 0, 0)]=0.0570302560054*x[0]**o + (0.369061981947)*x[0] + (0.483255016198)*x[1]**o + (0.366336673888)*x[1]
        ref[(3, 0, 0)]=0.0570302560054*x_ref[0]**o + (0.369061981947)*x_ref[0] + (0.483255016198)*x_ref[1]**o + (0.366336673888)*x_ref[1]
        arg[(3, 0, 1)]=-0.84427552697*x[0]**o + (-0.700122752443)*x[0] + (0.0760980722292)*x[1]**o + (-0.677638939089)*x[1]
        ref[(3, 0, 1)]=-0.84427552697*x_ref[0]**o + (-0.700122752443)*x_ref[0] + (0.0760980722292)*x_ref[1]**o + (-0.677638939089)*x_ref[1]
        arg[(3, 0, 2)]=-0.117643454169*x[0]**o + (-0.469170832101)*x[0] + (-0.455372753746)*x[1]**o + (0.0356174805039)*x[1]
        ref[(3, 0, 2)]=-0.117643454169*x_ref[0]**o + (-0.469170832101)*x_ref[0] + (-0.455372753746)*x_ref[1]**o + (0.0356174805039)*x_ref[1]
        arg[(3, 0, 3)]=0.259558997677*x[0]**o + (-0.5018518802)*x[0] + (-0.531611805586)*x[1]**o + (0.0978730329991)*x[1]
        ref[(3, 0, 3)]=0.259558997677*x_ref[0]**o + (-0.5018518802)*x_ref[0] + (-0.531611805586)*x_ref[1]**o + (0.0978730329991)*x_ref[1]
        arg[(3, 1, 0)]=-0.693664024477*x[0]**o + (-0.759105080235)*x[0] + (0.177192777893)*x[1]**o + (-0.372224885529)*x[1]
        ref[(3, 1, 0)]=-0.693664024477*x_ref[0]**o + (-0.759105080235)*x_ref[0] + (0.177192777893)*x_ref[1]**o + (-0.372224885529)*x_ref[1]
        arg[(3, 1, 1)]=-0.191931201556*x[0]**o + (0.391241864183)*x[0] + (-0.805581046952)*x[1]**o + (0.999482157249)*x[1]
        ref[(3, 1, 1)]=-0.191931201556*x_ref[0]**o + (0.391241864183)*x_ref[0] + (-0.805581046952)*x_ref[1]**o + (0.999482157249)*x_ref[1]
        arg[(3, 1, 2)]=0.0780841418548*x[0]**o + (0.883031124039)*x[0] + (0.268012947368)*x[1]**o + (-0.996755942654)*x[1]
        ref[(3, 1, 2)]=0.0780841418548*x_ref[0]**o + (0.883031124039)*x_ref[0] + (0.268012947368)*x_ref[1]**o + (-0.996755942654)*x_ref[1]
        arg[(3, 1, 3)]=-0.14909296892*x[0]**o + (-0.133785667056)*x[0] + (-0.598821308952)*x[1]**o + (0.0108219605757)*x[1]
        ref[(3, 1, 3)]=-0.14909296892*x_ref[0]**o + (-0.133785667056)*x_ref[0] + (-0.598821308952)*x_ref[1]**o + (0.0108219605757)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=-0.127862185542*x[2]**o + (0.89260960002)*x[2]
            ref[(0, 0, 0)]+=-0.127862185542*x_ref[2]**o + (0.89260960002)*x_ref[2]
            arg[(0, 0, 1)]+=0.0867063855781*x[2]**o + (-0.0149693287174)*x[2]
            ref[(0, 0, 1)]+=0.0867063855781*x_ref[2]**o + (-0.0149693287174)*x_ref[2]
            arg[(0, 0, 2)]+=0.980276807988*x[2]**o + (-0.194780924769)*x[2]
            ref[(0, 0, 2)]+=0.980276807988*x_ref[2]**o + (-0.194780924769)*x_ref[2]
            arg[(0, 0, 3)]+=-0.967930652808*x[2]**o + (-0.517370857241)*x[2]
            ref[(0, 0, 3)]+=-0.967930652808*x_ref[2]**o + (-0.517370857241)*x_ref[2]
            arg[(0, 1, 0)]+=0.245963065942*x[2]**o + (-0.891403140964)*x[2]
            ref[(0, 1, 0)]+=0.245963065942*x_ref[2]**o + (-0.891403140964)*x_ref[2]
            arg[(0, 1, 1)]+=-0.915634588253*x[2]**o + (0.391314253192)*x[2]
            ref[(0, 1, 1)]+=-0.915634588253*x_ref[2]**o + (0.391314253192)*x_ref[2]
            arg[(0, 1, 2)]+=0.0194330387922*x[2]**o + (0.64641308294)*x[2]
            ref[(0, 1, 2)]+=0.0194330387922*x_ref[2]**o + (0.64641308294)*x_ref[2]
            arg[(0, 1, 3)]+=-0.758093819102*x[2]**o + (0.52891355722)*x[2]
            ref[(0, 1, 3)]+=-0.758093819102*x_ref[2]**o + (0.52891355722)*x_ref[2]
            arg[(1, 0, 0)]+=-0.658478934026*x[2]**o + (-0.56110146348)*x[2]
            ref[(1, 0, 0)]+=-0.658478934026*x_ref[2]**o + (-0.56110146348)*x_ref[2]
            arg[(1, 0, 1)]+=0.61987793528*x[2]**o + (-0.593153726731)*x[2]
            ref[(1, 0, 1)]+=0.61987793528*x_ref[2]**o + (-0.593153726731)*x_ref[2]
            arg[(1, 0, 2)]+=0.567104397263*x[2]**o + (0.923947253161)*x[2]
            ref[(1, 0, 2)]+=0.567104397263*x_ref[2]**o + (0.923947253161)*x_ref[2]
            arg[(1, 0, 3)]+=-0.952993783388*x[2]**o + (-0.420966108849)*x[2]
            ref[(1, 0, 3)]+=-0.952993783388*x_ref[2]**o + (-0.420966108849)*x_ref[2]
            arg[(1, 1, 0)]+=-0.301904152484*x[2]**o + (0.471778767692)*x[2]
            ref[(1, 1, 0)]+=-0.301904152484*x_ref[2]**o + (0.471778767692)*x_ref[2]
            arg[(1, 1, 1)]+=-0.900900305947*x[2]**o + (0.117638696248)*x[2]
            ref[(1, 1, 1)]+=-0.900900305947*x_ref[2]**o + (0.117638696248)*x_ref[2]
            arg[(1, 1, 2)]+=0.480295673628*x[2]**o + (0.639296900048)*x[2]
            ref[(1, 1, 2)]+=0.480295673628*x_ref[2]**o + (0.639296900048)*x_ref[2]
            arg[(1, 1, 3)]+=0.743102617014*x[2]**o + (-0.21585947276)*x[2]
            ref[(1, 1, 3)]+=0.743102617014*x_ref[2]**o + (-0.21585947276)*x_ref[2]
            arg[(2, 0, 0)]+=0.248738405612*x[2]**o + (-0.68632199112)*x[2]
            ref[(2, 0, 0)]+=0.248738405612*x_ref[2]**o + (-0.68632199112)*x_ref[2]
            arg[(2, 0, 1)]+=0.548952270215*x[2]**o + (-0.556856278785)*x[2]
            ref[(2, 0, 1)]+=0.548952270215*x_ref[2]**o + (-0.556856278785)*x_ref[2]
            arg[(2, 0, 2)]+=-0.801056380244*x[2]**o + (-0.785635815801)*x[2]
            ref[(2, 0, 2)]+=-0.801056380244*x_ref[2]**o + (-0.785635815801)*x_ref[2]
            arg[(2, 0, 3)]+=-0.110261920582*x[2]**o + (-0.104600776501)*x[2]
            ref[(2, 0, 3)]+=-0.110261920582*x_ref[2]**o + (-0.104600776501)*x_ref[2]
            arg[(2, 1, 0)]+=-0.943128740985*x[2]**o + (-0.766614429796)*x[2]
            ref[(2, 1, 0)]+=-0.943128740985*x_ref[2]**o + (-0.766614429796)*x_ref[2]
            arg[(2, 1, 1)]+=0.378974890783*x[2]**o + (-0.294054901575)*x[2]
            ref[(2, 1, 1)]+=0.378974890783*x_ref[2]**o + (-0.294054901575)*x_ref[2]
            arg[(2, 1, 2)]+=0.646675979391*x[2]**o + (0.985120797585)*x[2]
            ref[(2, 1, 2)]+=0.646675979391*x_ref[2]**o + (0.985120797585)*x_ref[2]
            arg[(2, 1, 3)]+=0.399837572608*x[2]**o + (-0.59192189078)*x[2]
            ref[(2, 1, 3)]+=0.399837572608*x_ref[2]**o + (-0.59192189078)*x_ref[2]
            arg[(3, 0, 0)]+=0.32952423235*x[2]**o + (0.930165115076)*x[2]
            ref[(3, 0, 0)]+=0.32952423235*x_ref[2]**o + (0.930165115076)*x_ref[2]
            arg[(3, 0, 1)]+=0.44882147943*x[2]**o + (0.760213810004)*x[2]
            ref[(3, 0, 1)]+=0.44882147943*x_ref[2]**o + (0.760213810004)*x_ref[2]
            arg[(3, 0, 2)]+=-0.626660004481*x[2]**o + (-0.177004634539)*x[2]
            ref[(3, 0, 2)]+=-0.626660004481*x_ref[2]**o + (-0.177004634539)*x_ref[2]
            arg[(3, 0, 3)]+=0.614097767003*x[2]**o + (-0.223157231344)*x[2]
            ref[(3, 0, 3)]+=0.614097767003*x_ref[2]**o + (-0.223157231344)*x_ref[2]
            arg[(3, 1, 0)]+=-0.358248112969*x[2]**o + (0.680613601223)*x[2]
            ref[(3, 1, 0)]+=-0.358248112969*x_ref[2]**o + (0.680613601223)*x_ref[2]
            arg[(3, 1, 1)]+=0.830912277733*x[2]**o + (-0.618495115228)*x[2]
            ref[(3, 1, 1)]+=0.830912277733*x_ref[2]**o + (-0.618495115228)*x_ref[2]
            arg[(3, 1, 2)]+=-0.0670317487795*x[2]**o + (-0.963255943446)*x[2]
            ref[(3, 1, 2)]+=-0.0670317487795*x_ref[2]**o + (-0.963255943446)*x_ref[2]
            arg[(3, 1, 3)]+=0.00797257517127*x[2]**o + (-0.303796336369)*x[2]
            ref[(3, 1, 3)]+=0.00797257517127*x_ref[2]**o + (-0.303796336369)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactZero_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactZero to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 2, 3),w)
        ref = Data(0,(2, 4, 2, 3),w_ref)
        arg[(0, 0, 0, 0)]=0.0113253421012*x[0]**o + (-0.734641217036)*x[0] + (0.114731398727)*x[1]**o + (0.768719610948)*x[1]
        ref[(0, 0, 0, 0)]=0.0113253421012*x_ref[0]**o + (-0.734641217036)*x_ref[0] + (0.114731398727)*x_ref[1]**o + (0.768719610948)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.324813065248*x[0]**o + (-0.771049736194)*x[0] + (0.048121594792)*x[1]**o + (-0.660683794214)*x[1]
        ref[(0, 0, 0, 1)]=0.324813065248*x_ref[0]**o + (-0.771049736194)*x_ref[0] + (0.048121594792)*x_ref[1]**o + (-0.660683794214)*x_ref[1]
        arg[(0, 0, 0, 2)]=0.839031267045*x[0]**o + (0.965680604824)*x[0] + (0.707390362761)*x[1]**o + (-0.869245393526)*x[1]
        ref[(0, 0, 0, 2)]=0.839031267045*x_ref[0]**o + (0.965680604824)*x_ref[0] + (0.707390362761)*x_ref[1]**o + (-0.869245393526)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.990666476693*x[0]**o + (0.326619009989)*x[0] + (0.55994741845)*x[1]**o + (-0.775293602032)*x[1]
        ref[(0, 0, 1, 0)]=-0.990666476693*x_ref[0]**o + (0.326619009989)*x_ref[0] + (0.55994741845)*x_ref[1]**o + (-0.775293602032)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.237600428413*x[0]**o + (-0.892502733716)*x[0] + (0.14074069683)*x[1]**o + (0.182559766578)*x[1]
        ref[(0, 0, 1, 1)]=0.237600428413*x_ref[0]**o + (-0.892502733716)*x_ref[0] + (0.14074069683)*x_ref[1]**o + (0.182559766578)*x_ref[1]
        arg[(0, 0, 1, 2)]=0.112549465018*x[0]**o + (0.637499516998)*x[0] + (-0.912160316493)*x[1]**o + (0.217073559751)*x[1]
        ref[(0, 0, 1, 2)]=0.112549465018*x_ref[0]**o + (0.637499516998)*x_ref[0] + (-0.912160316493)*x_ref[1]**o + (0.217073559751)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.0128847395016*x[0]**o + (-0.945525927539)*x[0] + (0.34036871408)*x[1]**o + (0.136045783004)*x[1]
        ref[(0, 1, 0, 0)]=0.0128847395016*x_ref[0]**o + (-0.945525927539)*x_ref[0] + (0.34036871408)*x_ref[1]**o + (0.136045783004)*x_ref[1]
        arg[(0, 1, 0, 1)]=-0.655029552407*x[0]**o + (-0.961056228194)*x[0] + (0.704764651921)*x[1]**o + (0.428600751355)*x[1]
        ref[(0, 1, 0, 1)]=-0.655029552407*x_ref[0]**o + (-0.961056228194)*x_ref[0] + (0.704764651921)*x_ref[1]**o + (0.428600751355)*x_ref[1]
        arg[(0, 1, 0, 2)]=-0.794910487776*x[0]**o + (-0.397030856759)*x[0] + (0.927884733603)*x[1]**o + (0.120947651985)*x[1]
        ref[(0, 1, 0, 2)]=-0.794910487776*x_ref[0]**o + (-0.397030856759)*x_ref[0] + (0.927884733603)*x_ref[1]**o + (0.120947651985)*x_ref[1]
        arg[(0, 1, 1, 0)]=-0.26458600963*x[0]**o + (-0.0969801553876)*x[0] + (-0.411667450508)*x[1]**o + (-0.878275021331)*x[1]
        ref[(0, 1, 1, 0)]=-0.26458600963*x_ref[0]**o + (-0.0969801553876)*x_ref[0] + (-0.411667450508)*x_ref[1]**o + (-0.878275021331)*x_ref[1]
        arg[(0, 1, 1, 1)]=-0.822266581258*x[0]**o + (0.952551247088)*x[0] + (0.779520562082)*x[1]**o + (0.569402492496)*x[1]
        ref[(0, 1, 1, 1)]=-0.822266581258*x_ref[0]**o + (0.952551247088)*x_ref[0] + (0.779520562082)*x_ref[1]**o + (0.569402492496)*x_ref[1]
        arg[(0, 1, 1, 2)]=-0.718816473251*x[0]**o + (-0.499210296401)*x[0] + (-0.873156146568)*x[1]**o + (0.923337582598)*x[1]
        ref[(0, 1, 1, 2)]=-0.718816473251*x_ref[0]**o + (-0.499210296401)*x_ref[0] + (-0.873156146568)*x_ref[1]**o + (0.923337582598)*x_ref[1]
        arg[(0, 2, 0, 0)]=0.81526645876*x[0]**o + (0.99368631639)*x[0] + (0.890817747327)*x[1]**o + (0.76424930884)*x[1]
        ref[(0, 2, 0, 0)]=0.81526645876*x_ref[0]**o + (0.99368631639)*x_ref[0] + (0.890817747327)*x_ref[1]**o + (0.76424930884)*x_ref[1]
        arg[(0, 2, 0, 1)]=-0.227184632154*x[0]**o + (0.693888529854)*x[0] + (-0.8582143786)*x[1]**o + (-0.674750973628)*x[1]
        ref[(0, 2, 0, 1)]=-0.227184632154*x_ref[0]**o + (0.693888529854)*x_ref[0] + (-0.8582143786)*x_ref[1]**o + (-0.674750973628)*x_ref[1]
        arg[(0, 2, 0, 2)]=0.400220410544*x[0]**o + (-0.398797560853)*x[0] + (-0.365425451315)*x[1]**o + (0.0795794304888)*x[1]
        ref[(0, 2, 0, 2)]=0.400220410544*x_ref[0]**o + (-0.398797560853)*x_ref[0] + (-0.365425451315)*x_ref[1]**o + (0.0795794304888)*x_ref[1]
        arg[(0, 2, 1, 0)]=0.0481023499105*x[0]**o + (0.311797379004)*x[0] + (0.859067907155)*x[1]**o + (-0.841672764112)*x[1]
        ref[(0, 2, 1, 0)]=0.0481023499105*x_ref[0]**o + (0.311797379004)*x_ref[0] + (0.859067907155)*x_ref[1]**o + (-0.841672764112)*x_ref[1]
        arg[(0, 2, 1, 1)]=0.938745282898*x[0]**o + (0.819277967595)*x[0] + (0.526825325751)*x[1]**o + (-0.614942623567)*x[1]
        ref[(0, 2, 1, 1)]=0.938745282898*x_ref[0]**o + (0.819277967595)*x_ref[0] + (0.526825325751)*x_ref[1]**o + (-0.614942623567)*x_ref[1]
        arg[(0, 2, 1, 2)]=0.815112295025*x[0]**o + (0.73817183642)*x[0] + (0.301528654679)*x[1]**o + (-0.668801298297)*x[1]
        ref[(0, 2, 1, 2)]=0.815112295025*x_ref[0]**o + (0.73817183642)*x_ref[0] + (0.301528654679)*x_ref[1]**o + (-0.668801298297)*x_ref[1]
        arg[(0, 3, 0, 0)]=-0.252823696037*x[0]**o + (0.656120351491)*x[0] + (0.254782762172)*x[1]**o + (0.0201518442006)*x[1]
        ref[(0, 3, 0, 0)]=-0.252823696037*x_ref[0]**o + (0.656120351491)*x_ref[0] + (0.254782762172)*x_ref[1]**o + (0.0201518442006)*x_ref[1]
        arg[(0, 3, 0, 1)]=0.495794418813*x[0]**o + (0.403331704937)*x[0] + (-0.982931812785)*x[1]**o + (-0.948423767775)*x[1]
        ref[(0, 3, 0, 1)]=0.495794418813*x_ref[0]**o + (0.403331704937)*x_ref[0] + (-0.982931812785)*x_ref[1]**o + (-0.948423767775)*x_ref[1]
        arg[(0, 3, 0, 2)]=0.962620716495*x[0]**o + (0.297371614924)*x[0] + (-0.180819176324)*x[1]**o + (0.73477944469)*x[1]
        ref[(0, 3, 0, 2)]=0.962620716495*x_ref[0]**o + (0.297371614924)*x_ref[0] + (-0.180819176324)*x_ref[1]**o + (0.73477944469)*x_ref[1]
        arg[(0, 3, 1, 0)]=0.895010064361*x[0]**o + (-0.62639537595)*x[0] + (0.802628096806)*x[1]**o + (-0.550301208177)*x[1]
        ref[(0, 3, 1, 0)]=0.895010064361*x_ref[0]**o + (-0.62639537595)*x_ref[0] + (0.802628096806)*x_ref[1]**o + (-0.550301208177)*x_ref[1]
        arg[(0, 3, 1, 1)]=0.527660391142*x[0]**o + (-0.585293721668)*x[0] + (0.380162299233)*x[1]**o + (0.151224533466)*x[1]
        ref[(0, 3, 1, 1)]=0.527660391142*x_ref[0]**o + (-0.585293721668)*x_ref[0] + (0.380162299233)*x_ref[1]**o + (0.151224533466)*x_ref[1]
        arg[(0, 3, 1, 2)]=0.236858604134*x[0]**o + (0.915240911084)*x[0] + (0.0586825834281)*x[1]**o + (0.547654545828)*x[1]
        ref[(0, 3, 1, 2)]=0.236858604134*x_ref[0]**o + (0.915240911084)*x_ref[0] + (0.0586825834281)*x_ref[1]**o + (0.547654545828)*x_ref[1]
        arg[(1, 0, 0, 0)]=0.659747656955*x[0]**o + (0.0662684482178)*x[0] + (0.653690791245)*x[1]**o + (-0.293741086584)*x[1]
        ref[(1, 0, 0, 0)]=0.659747656955*x_ref[0]**o + (0.0662684482178)*x_ref[0] + (0.653690791245)*x_ref[1]**o + (-0.293741086584)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.0437009781905*x[0]**o + (-0.680129549679)*x[0] + (0.755987495953)*x[1]**o + (0.424377013947)*x[1]
        ref[(1, 0, 0, 1)]=0.0437009781905*x_ref[0]**o + (-0.680129549679)*x_ref[0] + (0.755987495953)*x_ref[1]**o + (0.424377013947)*x_ref[1]
        arg[(1, 0, 0, 2)]=0.58152178103*x[0]**o + (0.843667768132)*x[0] + (-0.624553361071)*x[1]**o + (0.309418351595)*x[1]
        ref[(1, 0, 0, 2)]=0.58152178103*x_ref[0]**o + (0.843667768132)*x_ref[0] + (-0.624553361071)*x_ref[1]**o + (0.309418351595)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.51500318991*x[0]**o + (-0.0131284151854)*x[0] + (0.261356125431)*x[1]**o + (0.54950420532)*x[1]
        ref[(1, 0, 1, 0)]=0.51500318991*x_ref[0]**o + (-0.0131284151854)*x_ref[0] + (0.261356125431)*x_ref[1]**o + (0.54950420532)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.846603436419*x[0]**o + (-0.615395733442)*x[0] + (0.660578106551)*x[1]**o + (0.421463211236)*x[1]
        ref[(1, 0, 1, 1)]=0.846603436419*x_ref[0]**o + (-0.615395733442)*x_ref[0] + (0.660578106551)*x_ref[1]**o + (0.421463211236)*x_ref[1]
        arg[(1, 0, 1, 2)]=-0.690028359033*x[0]**o + (0.139744205832)*x[0] + (0.991668805662)*x[1]**o + (-0.991304371219)*x[1]
        ref[(1, 0, 1, 2)]=-0.690028359033*x_ref[0]**o + (0.139744205832)*x_ref[0] + (0.991668805662)*x_ref[1]**o + (-0.991304371219)*x_ref[1]
        arg[(1, 1, 0, 0)]=0.0683716565567*x[0]**o + (-0.420562918856)*x[0] + (0.935529009192)*x[1]**o + (0.915381070116)*x[1]
        ref[(1, 1, 0, 0)]=0.0683716565567*x_ref[0]**o + (-0.420562918856)*x_ref[0] + (0.935529009192)*x_ref[1]**o + (0.915381070116)*x_ref[1]
        arg[(1, 1, 0, 1)]=-0.882650278586*x[0]**o + (0.42673554624)*x[0] + (0.858352545573)*x[1]**o + (-0.0832093726807)*x[1]
        ref[(1, 1, 0, 1)]=-0.882650278586*x_ref[0]**o + (0.42673554624)*x_ref[0] + (0.858352545573)*x_ref[1]**o + (-0.0832093726807)*x_ref[1]
        arg[(1, 1, 0, 2)]=-0.800432581097*x[0]**o + (0.380908965291)*x[0] + (-0.380822798363)*x[1]**o + (-0.692744310869)*x[1]
        ref[(1, 1, 0, 2)]=-0.800432581097*x_ref[0]**o + (0.380908965291)*x_ref[0] + (-0.380822798363)*x_ref[1]**o + (-0.692744310869)*x_ref[1]
        arg[(1, 1, 1, 0)]=0.427469954264*x[0]**o + (-0.685202130936)*x[0] + (0.452893272353)*x[1]**o + (-0.264364022138)*x[1]
        ref[(1, 1, 1, 0)]=0.427469954264*x_ref[0]**o + (-0.685202130936)*x_ref[0] + (0.452893272353)*x_ref[1]**o + (-0.264364022138)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.873217062587*x[0]**o + (-0.0824823103137)*x[0] + (-0.596818762462)*x[1]**o + (-0.0359261088583)*x[1]
        ref[(1, 1, 1, 1)]=0.873217062587*x_ref[0]**o + (-0.0824823103137)*x_ref[0] + (-0.596818762462)*x_ref[1]**o + (-0.0359261088583)*x_ref[1]
        arg[(1, 1, 1, 2)]=-0.768569262599*x[0]**o + (0.470553089037)*x[0] + (-0.0417730261189)*x[1]**o + (-0.348922967684)*x[1]
        ref[(1, 1, 1, 2)]=-0.768569262599*x_ref[0]**o + (0.470553089037)*x_ref[0] + (-0.0417730261189)*x_ref[1]**o + (-0.348922967684)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.789737172723*x[0]**o + (-0.195526169222)*x[0] + (0.00402823575456)*x[1]**o + (-0.676623095614)*x[1]
        ref[(1, 2, 0, 0)]=-0.789737172723*x_ref[0]**o + (-0.195526169222)*x_ref[0] + (0.00402823575456)*x_ref[1]**o + (-0.676623095614)*x_ref[1]
        arg[(1, 2, 0, 1)]=-0.220994171444*x[0]**o + (-0.473946790463)*x[0] + (0.346183250516)*x[1]**o + (0.593952048633)*x[1]
        ref[(1, 2, 0, 1)]=-0.220994171444*x_ref[0]**o + (-0.473946790463)*x_ref[0] + (0.346183250516)*x_ref[1]**o + (0.593952048633)*x_ref[1]
        arg[(1, 2, 0, 2)]=-0.0331937755549*x[0]**o + (0.214137004123)*x[0] + (0.423511728385)*x[1]**o + (-0.37132453664)*x[1]
        ref[(1, 2, 0, 2)]=-0.0331937755549*x_ref[0]**o + (0.214137004123)*x_ref[0] + (0.423511728385)*x_ref[1]**o + (-0.37132453664)*x_ref[1]
        arg[(1, 2, 1, 0)]=0.391462615809*x[0]**o + (-0.282684242404)*x[0] + (-0.616067322787)*x[1]**o + (-0.950541455907)*x[1]
        ref[(1, 2, 1, 0)]=0.391462615809*x_ref[0]**o + (-0.282684242404)*x_ref[0] + (-0.616067322787)*x_ref[1]**o + (-0.950541455907)*x_ref[1]
        arg[(1, 2, 1, 1)]=-0.665715124507*x[0]**o + (-0.996362004615)*x[0] + (-0.629806996138)*x[1]**o + (0.0041521195589)*x[1]
        ref[(1, 2, 1, 1)]=-0.665715124507*x_ref[0]**o + (-0.996362004615)*x_ref[0] + (-0.629806996138)*x_ref[1]**o + (0.0041521195589)*x_ref[1]
        arg[(1, 2, 1, 2)]=0.444724439968*x[0]**o + (-0.490452744174)*x[0] + (-0.485862306022)*x[1]**o + (0.652467101323)*x[1]
        ref[(1, 2, 1, 2)]=0.444724439968*x_ref[0]**o + (-0.490452744174)*x_ref[0] + (-0.485862306022)*x_ref[1]**o + (0.652467101323)*x_ref[1]
        arg[(1, 3, 0, 0)]=0.271975406858*x[0]**o + (0.0229274164027)*x[0] + (0.681727304148)*x[1]**o + (0.0202599031268)*x[1]
        ref[(1, 3, 0, 0)]=0.271975406858*x_ref[0]**o + (0.0229274164027)*x_ref[0] + (0.681727304148)*x_ref[1]**o + (0.0202599031268)*x_ref[1]
        arg[(1, 3, 0, 1)]=-0.897893558938*x[0]**o + (-0.382138050483)*x[0] + (0.334638587882)*x[1]**o + (0.669728523712)*x[1]
        ref[(1, 3, 0, 1)]=-0.897893558938*x_ref[0]**o + (-0.382138050483)*x_ref[0] + (0.334638587882)*x_ref[1]**o + (0.669728523712)*x_ref[1]
        arg[(1, 3, 0, 2)]=0.794267004308*x[0]**o + (0.697154099163)*x[0] + (-0.126448950644)*x[1]**o + (-0.707374218459)*x[1]
        ref[(1, 3, 0, 2)]=0.794267004308*x_ref[0]**o + (0.697154099163)*x_ref[0] + (-0.126448950644)*x_ref[1]**o + (-0.707374218459)*x_ref[1]
        arg[(1, 3, 1, 0)]=-0.090208014807*x[0]**o + (-0.267452565912)*x[0] + (-0.559935593682)*x[1]**o + (0.769415194126)*x[1]
        ref[(1, 3, 1, 0)]=-0.090208014807*x_ref[0]**o + (-0.267452565912)*x_ref[0] + (-0.559935593682)*x_ref[1]**o + (0.769415194126)*x_ref[1]
        arg[(1, 3, 1, 1)]=0.621109374911*x[0]**o + (0.442668854356)*x[0] + (-0.567415790872)*x[1]**o + (0.570422647543)*x[1]
        ref[(1, 3, 1, 1)]=0.621109374911*x_ref[0]**o + (0.442668854356)*x_ref[0] + (-0.567415790872)*x_ref[1]**o + (0.570422647543)*x_ref[1]
        arg[(1, 3, 1, 2)]=0.354381473768*x[0]**o + (-0.477874675711)*x[0] + (-0.8134631009)*x[1]**o + (-0.966229449918)*x[1]
        ref[(1, 3, 1, 2)]=0.354381473768*x_ref[0]**o + (-0.477874675711)*x_ref[0] + (-0.8134631009)*x_ref[1]**o + (-0.966229449918)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.0989051979727*x[2]**o + (-0.658033163763)*x[2]
            ref[(0, 0, 0, 0)]+=-0.0989051979727*x_ref[2]**o + (-0.658033163763)*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.582900756588*x[2]**o + (-0.851588640624)*x[2]
            ref[(0, 0, 0, 1)]+=-0.582900756588*x_ref[2]**o + (-0.851588640624)*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.0611428109483*x[2]**o + (-0.183647149829)*x[2]
            ref[(0, 0, 0, 2)]+=0.0611428109483*x_ref[2]**o + (-0.183647149829)*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.705628116377*x[2]**o + (0.73714821095)*x[2]
            ref[(0, 0, 1, 0)]+=-0.705628116377*x_ref[2]**o + (0.73714821095)*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.920400230644*x[2]**o + (-0.995431797457)*x[2]
            ref[(0, 0, 1, 1)]+=0.920400230644*x_ref[2]**o + (-0.995431797457)*x_ref[2]
            arg[(0, 0, 1, 2)]+=-0.836569878051*x[2]**o + (0.0979627354586)*x[2]
            ref[(0, 0, 1, 2)]+=-0.836569878051*x_ref[2]**o + (0.0979627354586)*x_ref[2]
            arg[(0, 1, 0, 0)]+=0.591552032285*x[2]**o + (0.487132911007)*x[2]
            ref[(0, 1, 0, 0)]+=0.591552032285*x_ref[2]**o + (0.487132911007)*x_ref[2]
            arg[(0, 1, 0, 1)]+=0.589578455913*x[2]**o + (0.151130274432)*x[2]
            ref[(0, 1, 0, 1)]+=0.589578455913*x_ref[2]**o + (0.151130274432)*x_ref[2]
            arg[(0, 1, 0, 2)]+=-0.154832010531*x[2]**o + (0.678890486531)*x[2]
            ref[(0, 1, 0, 2)]+=-0.154832010531*x_ref[2]**o + (0.678890486531)*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.0333918521437*x[2]**o + (0.153310029667)*x[2]
            ref[(0, 1, 1, 0)]+=0.0333918521437*x_ref[2]**o + (0.153310029667)*x_ref[2]
            arg[(0, 1, 1, 1)]+=-0.780495575336*x[2]**o + (-0.985162728939)*x[2]
            ref[(0, 1, 1, 1)]+=-0.780495575336*x_ref[2]**o + (-0.985162728939)*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.391035455342*x[2]**o + (-0.0779476989226)*x[2]
            ref[(0, 1, 1, 2)]+=0.391035455342*x_ref[2]**o + (-0.0779476989226)*x_ref[2]
            arg[(0, 2, 0, 0)]+=0.806567783479*x[2]**o + (-0.513939035518)*x[2]
            ref[(0, 2, 0, 0)]+=0.806567783479*x_ref[2]**o + (-0.513939035518)*x_ref[2]
            arg[(0, 2, 0, 1)]+=-0.781442333304*x[2]**o + (0.883530020549)*x[2]
            ref[(0, 2, 0, 1)]+=-0.781442333304*x_ref[2]**o + (0.883530020549)*x_ref[2]
            arg[(0, 2, 0, 2)]+=-0.967121761525*x[2]**o + (-0.450496752909)*x[2]
            ref[(0, 2, 0, 2)]+=-0.967121761525*x_ref[2]**o + (-0.450496752909)*x_ref[2]
            arg[(0, 2, 1, 0)]+=-0.796376067664*x[2]**o + (0.855642898912)*x[2]
            ref[(0, 2, 1, 0)]+=-0.796376067664*x_ref[2]**o + (0.855642898912)*x_ref[2]
            arg[(0, 2, 1, 1)]+=0.661379360305*x[2]**o + (0.83905412534)*x[2]
            ref[(0, 2, 1, 1)]+=0.661379360305*x_ref[2]**o + (0.83905412534)*x_ref[2]
            arg[(0, 2, 1, 2)]+=-0.215198203075*x[2]**o + (0.0974984583552)*x[2]
            ref[(0, 2, 1, 2)]+=-0.215198203075*x_ref[2]**o + (0.0974984583552)*x_ref[2]
            arg[(0, 3, 0, 0)]+=0.214539899639*x[2]**o + (-0.525928755777)*x[2]
            ref[(0, 3, 0, 0)]+=0.214539899639*x_ref[2]**o + (-0.525928755777)*x_ref[2]
            arg[(0, 3, 0, 1)]+=0.327068941402*x[2]**o + (0.926128488054)*x[2]
            ref[(0, 3, 0, 1)]+=0.327068941402*x_ref[2]**o + (0.926128488054)*x_ref[2]
            arg[(0, 3, 0, 2)]+=0.772657228301*x[2]**o + (-0.493325153942)*x[2]
            ref[(0, 3, 0, 2)]+=0.772657228301*x_ref[2]**o + (-0.493325153942)*x_ref[2]
            arg[(0, 3, 1, 0)]+=0.930090322139*x[2]**o + (-0.116391133566)*x[2]
            ref[(0, 3, 1, 0)]+=0.930090322139*x_ref[2]**o + (-0.116391133566)*x_ref[2]
            arg[(0, 3, 1, 1)]+=0.885426994457*x[2]**o + (-0.326479082303)*x[2]
            ref[(0, 3, 1, 1)]+=0.885426994457*x_ref[2]**o + (-0.326479082303)*x_ref[2]
            arg[(0, 3, 1, 2)]+=0.0146429787244*x[2]**o + (-0.634440673418)*x[2]
            ref[(0, 3, 1, 2)]+=0.0146429787244*x_ref[2]**o + (-0.634440673418)*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.680424760003*x[2]**o + (0.551831752051)*x[2]
            ref[(1, 0, 0, 0)]+=-0.680424760003*x_ref[2]**o + (0.551831752051)*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.307516026797*x[2]**o + (-0.0902419044052)*x[2]
            ref[(1, 0, 0, 1)]+=0.307516026797*x_ref[2]**o + (-0.0902419044052)*x_ref[2]
            arg[(1, 0, 0, 2)]+=0.889979770963*x[2]**o + (-0.760142116796)*x[2]
            ref[(1, 0, 0, 2)]+=0.889979770963*x_ref[2]**o + (-0.760142116796)*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.902647596305*x[2]**o + (-0.468237947554)*x[2]
            ref[(1, 0, 1, 0)]+=-0.902647596305*x_ref[2]**o + (-0.468237947554)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.455574604371*x[2]**o + (-0.477787882414)*x[2]
            ref[(1, 0, 1, 1)]+=-0.455574604371*x_ref[2]**o + (-0.477787882414)*x_ref[2]
            arg[(1, 0, 1, 2)]+=-0.82189861178*x[2]**o + (0.0106744562853)*x[2]
            ref[(1, 0, 1, 2)]+=-0.82189861178*x_ref[2]**o + (0.0106744562853)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.987351179729*x[2]**o + (-0.342631000513)*x[2]
            ref[(1, 1, 0, 0)]+=0.987351179729*x_ref[2]**o + (-0.342631000513)*x_ref[2]
            arg[(1, 1, 0, 1)]+=-0.175250824714*x[2]**o + (-0.462800966355)*x[2]
            ref[(1, 1, 0, 1)]+=-0.175250824714*x_ref[2]**o + (-0.462800966355)*x_ref[2]
            arg[(1, 1, 0, 2)]+=0.144450525401*x[2]**o + (-0.489697130772)*x[2]
            ref[(1, 1, 0, 2)]+=0.144450525401*x_ref[2]**o + (-0.489697130772)*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.805297750693*x[2]**o + (0.913885084656)*x[2]
            ref[(1, 1, 1, 0)]+=0.805297750693*x_ref[2]**o + (0.913885084656)*x_ref[2]
            arg[(1, 1, 1, 1)]+=-0.858332572957*x[2]**o + (-0.782317795748)*x[2]
            ref[(1, 1, 1, 1)]+=-0.858332572957*x_ref[2]**o + (-0.782317795748)*x_ref[2]
            arg[(1, 1, 1, 2)]+=-0.525009114509*x[2]**o + (-0.726044473633)*x[2]
            ref[(1, 1, 1, 2)]+=-0.525009114509*x_ref[2]**o + (-0.726044473633)*x_ref[2]
            arg[(1, 2, 0, 0)]+=0.614283205373*x[2]**o + (0.554304648934)*x[2]
            ref[(1, 2, 0, 0)]+=0.614283205373*x_ref[2]**o + (0.554304648934)*x_ref[2]
            arg[(1, 2, 0, 1)]+=0.0624249717314*x[2]**o + (-0.402658280113)*x[2]
            ref[(1, 2, 0, 1)]+=0.0624249717314*x_ref[2]**o + (-0.402658280113)*x_ref[2]
            arg[(1, 2, 0, 2)]+=0.338077047714*x[2]**o + (0.706000819118)*x[2]
            ref[(1, 2, 0, 2)]+=0.338077047714*x_ref[2]**o + (0.706000819118)*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.583926791498*x[2]**o + (-0.112855684795)*x[2]
            ref[(1, 2, 1, 0)]+=0.583926791498*x_ref[2]**o + (-0.112855684795)*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.361865255933*x[2]**o + (0.958072740476)*x[2]
            ref[(1, 2, 1, 1)]+=0.361865255933*x_ref[2]**o + (0.958072740476)*x_ref[2]
            arg[(1, 2, 1, 2)]+=-0.299294768225*x[2]**o + (0.67770166824)*x[2]
            ref[(1, 2, 1, 2)]+=-0.299294768225*x_ref[2]**o + (0.67770166824)*x_ref[2]
            arg[(1, 3, 0, 0)]+=-0.196439984146*x[2]**o + (0.0786387233057)*x[2]
            ref[(1, 3, 0, 0)]+=-0.196439984146*x_ref[2]**o + (0.0786387233057)*x_ref[2]
            arg[(1, 3, 0, 1)]+=-0.281445072617*x[2]**o + (-0.0784106358307)*x[2]
            ref[(1, 3, 0, 1)]+=-0.281445072617*x_ref[2]**o + (-0.0784106358307)*x_ref[2]
            arg[(1, 3, 0, 2)]+=-0.782841568899*x[2]**o + (-0.210746036573)*x[2]
            ref[(1, 3, 0, 2)]+=-0.782841568899*x_ref[2]**o + (-0.210746036573)*x_ref[2]
            arg[(1, 3, 1, 0)]+=0.0720585909441*x[2]**o + (-0.33008959048)*x[2]
            ref[(1, 3, 1, 0)]+=0.0720585909441*x_ref[2]**o + (-0.33008959048)*x_ref[2]
            arg[(1, 3, 1, 1)]+=0.968806494845*x[2]**o + (-0.433563704399)*x[2]
            ref[(1, 3, 1, 1)]+=0.968806494845*x_ref[2]**o + (-0.433563704399)*x_ref[2]
            arg[(1, 3, 1, 2)]+=-0.802702954641*x[2]**o + (-0.411817436088)*x[2]
            ref[(1, 3, 1, 2)]+=-0.802702954641*x_ref[2]**o + (-0.411817436088)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank0(self):
        """
        tests interpolation of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        ref = Data(0,(),w_ref)
        arg=-0.294858128628*x[0]**o + (0.129754865954)*x[0] + (-0.729601963043)*x[1]**o + (0.875621687839)*x[1]
        ref=-0.294858128628*x_ref[0]**o + (0.129754865954)*x_ref[0] + (-0.729601963043)*x_ref[1]**o + (0.875621687839)*x_ref[1]
        if dim==3:
            arg+=(-0.11420347978)*x[2]**o + (-0.296738925613)*x[2]
            ref+=(-0.11420347978)*x_ref[2]**o + (-0.296738925613)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank1(self):
        """
        tests interpolation of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref = Data(0,(3,),w_ref)
        arg[(0,)]=-0.173505345299*x[0]**o + (-0.0637155494277)*x[0] + (-0.566485756465)*x[1]**o + (0.131508228492)*x[1]
        ref[(0,)]=-0.173505345299*x_ref[0]**o + (-0.0637155494277)*x_ref[0] + (-0.566485756465)*x_ref[1]**o + (0.131508228492)*x_ref[1]
        arg[(1,)]=-0.266407818457*x[0]**o + (0.75222834696)*x[0] + (0.785609712085)*x[1]**o + (0.321927862552)*x[1]
        ref[(1,)]=-0.266407818457*x_ref[0]**o + (0.75222834696)*x_ref[0] + (0.785609712085)*x_ref[1]**o + (0.321927862552)*x_ref[1]
        arg[(2,)]=0.274831978604*x[0]**o + (0.129914582651)*x[0] + (0.358516202842)*x[1]**o + (0.663567316362)*x[1]
        ref[(2,)]=0.274831978604*x_ref[0]**o + (0.129914582651)*x_ref[0] + (0.358516202842)*x_ref[1]**o + (0.663567316362)*x_ref[1]
        if dim==3:
            arg[(0,)]+=0.524446323814*x[2]**o + (0.853649995093)*x[2]
            ref[(0,)]+=0.524446323814*x_ref[2]**o + (0.853649995093)*x_ref[2]
            arg[(1,)]+=0.0244978725833*x[2]**o + (0.73585343739)*x[2]
            ref[(1,)]+=0.0244978725833*x_ref[2]**o + (0.73585343739)*x_ref[2]
            arg[(2,)]+=-0.69379992731*x[2]**o + (0.498524980568)*x[2]
            ref[(2,)]+=-0.69379992731*x_ref[2]**o + (0.498524980568)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank2(self):
        """
        tests interpolation of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2),w)
        ref = Data(0,(4, 2),w_ref)
        arg[(0, 0)]=-0.769889271865*x[0]**o + (0.599053564709)*x[0] + (0.599323253913)*x[1]**o + (0.946253642644)*x[1]
        ref[(0, 0)]=-0.769889271865*x_ref[0]**o + (0.599053564709)*x_ref[0] + (0.599323253913)*x_ref[1]**o + (0.946253642644)*x_ref[1]
        arg[(0, 1)]=0.18188646188*x[0]**o + (-0.646964220014)*x[0] + (-0.969128712854)*x[1]**o + (-0.580218348719)*x[1]
        ref[(0, 1)]=0.18188646188*x_ref[0]**o + (-0.646964220014)*x_ref[0] + (-0.969128712854)*x_ref[1]**o + (-0.580218348719)*x_ref[1]
        arg[(1, 0)]=0.859604939349*x[0]**o + (0.529169399072)*x[0] + (0.437693924302)*x[1]**o + (-0.478369825349)*x[1]
        ref[(1, 0)]=0.859604939349*x_ref[0]**o + (0.529169399072)*x_ref[0] + (0.437693924302)*x_ref[1]**o + (-0.478369825349)*x_ref[1]
        arg[(1, 1)]=0.728937290844*x[0]**o + (-0.552705584183)*x[0] + (0.302404657534)*x[1]**o + (0.0329546719139)*x[1]
        ref[(1, 1)]=0.728937290844*x_ref[0]**o + (-0.552705584183)*x_ref[0] + (0.302404657534)*x_ref[1]**o + (0.0329546719139)*x_ref[1]
        arg[(2, 0)]=0.623504893779*x[0]**o + (0.268878898226)*x[0] + (-0.533828021916)*x[1]**o + (-0.4114074867)*x[1]
        ref[(2, 0)]=0.623504893779*x_ref[0]**o + (0.268878898226)*x_ref[0] + (-0.533828021916)*x_ref[1]**o + (-0.4114074867)*x_ref[1]
        arg[(2, 1)]=0.940573693226*x[0]**o + (0.167818162219)*x[0] + (-0.296831245246)*x[1]**o + (-0.389432762234)*x[1]
        ref[(2, 1)]=0.940573693226*x_ref[0]**o + (0.167818162219)*x_ref[0] + (-0.296831245246)*x_ref[1]**o + (-0.389432762234)*x_ref[1]
        arg[(3, 0)]=0.623184576032*x[0]**o + (0.9452066268)*x[0] + (-0.842558543084)*x[1]**o + (0.946111911798)*x[1]
        ref[(3, 0)]=0.623184576032*x_ref[0]**o + (0.9452066268)*x_ref[0] + (-0.842558543084)*x_ref[1]**o + (0.946111911798)*x_ref[1]
        arg[(3, 1)]=0.851363215154*x[0]**o + (-0.411618251121)*x[0] + (-0.968281116671)*x[1]**o + (0.0325740632594)*x[1]
        ref[(3, 1)]=0.851363215154*x_ref[0]**o + (-0.411618251121)*x_ref[0] + (-0.968281116671)*x_ref[1]**o + (0.0325740632594)*x_ref[1]
        if dim==3:
            arg[(0, 0)]+=0.558494081401*x[2]**o + (0.699721007748)*x[2]
            ref[(0, 0)]+=0.558494081401*x_ref[2]**o + (0.699721007748)*x_ref[2]
            arg[(0, 1)]+=-0.84836831095*x[2]**o + (0.380774229599)*x[2]
            ref[(0, 1)]+=-0.84836831095*x_ref[2]**o + (0.380774229599)*x_ref[2]
            arg[(1, 0)]+=-0.565344990991*x[2]**o + (0.941603915181)*x[2]
            ref[(1, 0)]+=-0.565344990991*x_ref[2]**o + (0.941603915181)*x_ref[2]
            arg[(1, 1)]+=-0.797138393014*x[2]**o + (-0.553385548579)*x[2]
            ref[(1, 1)]+=-0.797138393014*x_ref[2]**o + (-0.553385548579)*x_ref[2]
            arg[(2, 0)]+=0.728871232*x[2]**o + (-0.854439796477)*x[2]
            ref[(2, 0)]+=0.728871232*x_ref[2]**o + (-0.854439796477)*x_ref[2]
            arg[(2, 1)]+=0.485847198402*x[2]**o + (0.439103169785)*x[2]
            ref[(2, 1)]+=0.485847198402*x_ref[2]**o + (0.439103169785)*x_ref[2]
            arg[(3, 0)]+=-0.736798990337*x[2]**o + (-0.589450427738)*x[2]
            ref[(3, 0)]+=-0.736798990337*x_ref[2]**o + (-0.589450427738)*x_ref[2]
            arg[(3, 1)]+=-0.985311092263*x[2]**o + (-0.16054981985)*x[2]
            ref[(3, 1)]+=-0.985311092263*x_ref[2]**o + (-0.16054981985)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank3(self):
        """
        tests interpolation of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 3),w)
        ref = Data(0,(4, 4, 3),w_ref)
        arg[(0, 0, 0)]=-0.840164215234*x[0]**o + (-0.828720129665)*x[0] + (-0.492897330373)*x[1]**o + (-0.377419003849)*x[1]
        ref[(0, 0, 0)]=-0.840164215234*x_ref[0]**o + (-0.828720129665)*x_ref[0] + (-0.492897330373)*x_ref[1]**o + (-0.377419003849)*x_ref[1]
        arg[(0, 0, 1)]=0.717305820057*x[0]**o + (0.728830123804)*x[0] + (0.328792171561)*x[1]**o + (0.936787347651)*x[1]
        ref[(0, 0, 1)]=0.717305820057*x_ref[0]**o + (0.728830123804)*x_ref[0] + (0.328792171561)*x_ref[1]**o + (0.936787347651)*x_ref[1]
        arg[(0, 0, 2)]=0.99052759677*x[0]**o + (0.445562118803)*x[0] + (0.684407643613)*x[1]**o + (-0.402081568529)*x[1]
        ref[(0, 0, 2)]=0.99052759677*x_ref[0]**o + (0.445562118803)*x_ref[0] + (0.684407643613)*x_ref[1]**o + (-0.402081568529)*x_ref[1]
        arg[(0, 1, 0)]=-0.792940137244*x[0]**o + (-0.359068790812)*x[0] + (-0.240161897107)*x[1]**o + (0.742731543744)*x[1]
        ref[(0, 1, 0)]=-0.792940137244*x_ref[0]**o + (-0.359068790812)*x_ref[0] + (-0.240161897107)*x_ref[1]**o + (0.742731543744)*x_ref[1]
        arg[(0, 1, 1)]=0.578565072209*x[0]**o + (0.680387144445)*x[0] + (0.185838911228)*x[1]**o + (-0.697688308639)*x[1]
        ref[(0, 1, 1)]=0.578565072209*x_ref[0]**o + (0.680387144445)*x_ref[0] + (0.185838911228)*x_ref[1]**o + (-0.697688308639)*x_ref[1]
        arg[(0, 1, 2)]=-0.97850635348*x[0]**o + (-0.153308584417)*x[0] + (-0.00800995905602)*x[1]**o + (0.57363837471)*x[1]
        ref[(0, 1, 2)]=-0.97850635348*x_ref[0]**o + (-0.153308584417)*x_ref[0] + (-0.00800995905602)*x_ref[1]**o + (0.57363837471)*x_ref[1]
        arg[(0, 2, 0)]=0.0602803098167*x[0]**o + (0.597785916584)*x[0] + (-0.286967690424)*x[1]**o + (-0.431480038961)*x[1]
        ref[(0, 2, 0)]=0.0602803098167*x_ref[0]**o + (0.597785916584)*x_ref[0] + (-0.286967690424)*x_ref[1]**o + (-0.431480038961)*x_ref[1]
        arg[(0, 2, 1)]=-0.30625195894*x[0]**o + (0.189839679081)*x[0] + (-0.67107103516)*x[1]**o + (0.423383441101)*x[1]
        ref[(0, 2, 1)]=-0.30625195894*x_ref[0]**o + (0.189839679081)*x_ref[0] + (-0.67107103516)*x_ref[1]**o + (0.423383441101)*x_ref[1]
        arg[(0, 2, 2)]=0.16688414742*x[0]**o + (0.601329359646)*x[0] + (0.815725229144)*x[1]**o + (-0.476770463196)*x[1]
        ref[(0, 2, 2)]=0.16688414742*x_ref[0]**o + (0.601329359646)*x_ref[0] + (0.815725229144)*x_ref[1]**o + (-0.476770463196)*x_ref[1]
        arg[(0, 3, 0)]=0.963966707223*x[0]**o + (-0.242158411175)*x[0] + (0.921754467341)*x[1]**o + (-0.148514121501)*x[1]
        ref[(0, 3, 0)]=0.963966707223*x_ref[0]**o + (-0.242158411175)*x_ref[0] + (0.921754467341)*x_ref[1]**o + (-0.148514121501)*x_ref[1]
        arg[(0, 3, 1)]=-0.858334618223*x[0]**o + (0.0620943652602)*x[0] + (-0.74895526366)*x[1]**o + (0.675521921251)*x[1]
        ref[(0, 3, 1)]=-0.858334618223*x_ref[0]**o + (0.0620943652602)*x_ref[0] + (-0.74895526366)*x_ref[1]**o + (0.675521921251)*x_ref[1]
        arg[(0, 3, 2)]=0.250541687717*x[0]**o + (-0.501090513981)*x[0] + (-0.446614572393)*x[1]**o + (0.586676305597)*x[1]
        ref[(0, 3, 2)]=0.250541687717*x_ref[0]**o + (-0.501090513981)*x_ref[0] + (-0.446614572393)*x_ref[1]**o + (0.586676305597)*x_ref[1]
        arg[(1, 0, 0)]=0.929473049555*x[0]**o + (0.532312365321)*x[0] + (0.132392507088)*x[1]**o + (-0.652317699994)*x[1]
        ref[(1, 0, 0)]=0.929473049555*x_ref[0]**o + (0.532312365321)*x_ref[0] + (0.132392507088)*x_ref[1]**o + (-0.652317699994)*x_ref[1]
        arg[(1, 0, 1)]=-0.531199386193*x[0]**o + (-0.337336259032)*x[0] + (-0.305630886422)*x[1]**o + (0.0669261935486)*x[1]
        ref[(1, 0, 1)]=-0.531199386193*x_ref[0]**o + (-0.337336259032)*x_ref[0] + (-0.305630886422)*x_ref[1]**o + (0.0669261935486)*x_ref[1]
        arg[(1, 0, 2)]=0.391594509186*x[0]**o + (0.44897227136)*x[0] + (-0.724682667053)*x[1]**o + (-0.348361142453)*x[1]
        ref[(1, 0, 2)]=0.391594509186*x_ref[0]**o + (0.44897227136)*x_ref[0] + (-0.724682667053)*x_ref[1]**o + (-0.348361142453)*x_ref[1]
        arg[(1, 1, 0)]=-0.470203628724*x[0]**o + (-0.711696278321)*x[0] + (0.068731652388)*x[1]**o + (0.0259102691552)*x[1]
        ref[(1, 1, 0)]=-0.470203628724*x_ref[0]**o + (-0.711696278321)*x_ref[0] + (0.068731652388)*x_ref[1]**o + (0.0259102691552)*x_ref[1]
        arg[(1, 1, 1)]=0.839554986422*x[0]**o + (0.49611805538)*x[0] + (-0.110911345666)*x[1]**o + (0.740627978164)*x[1]
        ref[(1, 1, 1)]=0.839554986422*x_ref[0]**o + (0.49611805538)*x_ref[0] + (-0.110911345666)*x_ref[1]**o + (0.740627978164)*x_ref[1]
        arg[(1, 1, 2)]=-0.702594659649*x[0]**o + (0.576247859814)*x[0] + (-0.775827810175)*x[1]**o + (0.453575171272)*x[1]
        ref[(1, 1, 2)]=-0.702594659649*x_ref[0]**o + (0.576247859814)*x_ref[0] + (-0.775827810175)*x_ref[1]**o + (0.453575171272)*x_ref[1]
        arg[(1, 2, 0)]=0.833160199078*x[0]**o + (0.31696937243)*x[0] + (0.474939612916)*x[1]**o + (-0.189334837983)*x[1]
        ref[(1, 2, 0)]=0.833160199078*x_ref[0]**o + (0.31696937243)*x_ref[0] + (0.474939612916)*x_ref[1]**o + (-0.189334837983)*x_ref[1]
        arg[(1, 2, 1)]=-0.230831967748*x[0]**o + (0.904539049293)*x[0] + (-0.592278076697)*x[1]**o + (-0.0511920222158)*x[1]
        ref[(1, 2, 1)]=-0.230831967748*x_ref[0]**o + (0.904539049293)*x_ref[0] + (-0.592278076697)*x_ref[1]**o + (-0.0511920222158)*x_ref[1]
        arg[(1, 2, 2)]=-0.446026989177*x[0]**o + (-0.53669587275)*x[0] + (0.104922021786)*x[1]**o + (-0.812307568392)*x[1]
        ref[(1, 2, 2)]=-0.446026989177*x_ref[0]**o + (-0.53669587275)*x_ref[0] + (0.104922021786)*x_ref[1]**o + (-0.812307568392)*x_ref[1]
        arg[(1, 3, 0)]=0.836800877429*x[0]**o + (0.388684140482)*x[0] + (0.61621081963)*x[1]**o + (-0.711697577497)*x[1]
        ref[(1, 3, 0)]=0.836800877429*x_ref[0]**o + (0.388684140482)*x_ref[0] + (0.61621081963)*x_ref[1]**o + (-0.711697577497)*x_ref[1]
        arg[(1, 3, 1)]=-0.915231452717*x[0]**o + (-0.209859734581)*x[0] + (0.96719457335)*x[1]**o + (-0.672303427769)*x[1]
        ref[(1, 3, 1)]=-0.915231452717*x_ref[0]**o + (-0.209859734581)*x_ref[0] + (0.96719457335)*x_ref[1]**o + (-0.672303427769)*x_ref[1]
        arg[(1, 3, 2)]=0.563217806193*x[0]**o + (-0.0750005301103)*x[0] + (-0.466749472759)*x[1]**o + (-0.602047971485)*x[1]
        ref[(1, 3, 2)]=0.563217806193*x_ref[0]**o + (-0.0750005301103)*x_ref[0] + (-0.466749472759)*x_ref[1]**o + (-0.602047971485)*x_ref[1]
        arg[(2, 0, 0)]=-0.0823847312719*x[0]**o + (0.952474614824)*x[0] + (-0.889559805258)*x[1]**o + (-0.455496522459)*x[1]
        ref[(2, 0, 0)]=-0.0823847312719*x_ref[0]**o + (0.952474614824)*x_ref[0] + (-0.889559805258)*x_ref[1]**o + (-0.455496522459)*x_ref[1]
        arg[(2, 0, 1)]=0.507347888925*x[0]**o + (-0.371720733934)*x[0] + (0.96037807576)*x[1]**o + (0.674706847997)*x[1]
        ref[(2, 0, 1)]=0.507347888925*x_ref[0]**o + (-0.371720733934)*x_ref[0] + (0.96037807576)*x_ref[1]**o + (0.674706847997)*x_ref[1]
        arg[(2, 0, 2)]=-0.953277962176*x[0]**o + (0.399654967303)*x[0] + (0.600505157781)*x[1]**o + (-0.57479390767)*x[1]
        ref[(2, 0, 2)]=-0.953277962176*x_ref[0]**o + (0.399654967303)*x_ref[0] + (0.600505157781)*x_ref[1]**o + (-0.57479390767)*x_ref[1]
        arg[(2, 1, 0)]=0.691703422363*x[0]**o + (-0.990887425631)*x[0] + (-0.564526335969)*x[1]**o + (-0.749054005962)*x[1]
        ref[(2, 1, 0)]=0.691703422363*x_ref[0]**o + (-0.990887425631)*x_ref[0] + (-0.564526335969)*x_ref[1]**o + (-0.749054005962)*x_ref[1]
        arg[(2, 1, 1)]=-0.400623184778*x[0]**o + (-0.977392588961)*x[0] + (0.801729844236)*x[1]**o + (-0.457634236371)*x[1]
        ref[(2, 1, 1)]=-0.400623184778*x_ref[0]**o + (-0.977392588961)*x_ref[0] + (0.801729844236)*x_ref[1]**o + (-0.457634236371)*x_ref[1]
        arg[(2, 1, 2)]=-0.371424768358*x[0]**o + (-0.652727227203)*x[0] + (0.07512632707)*x[1]**o + (0.158441371267)*x[1]
        ref[(2, 1, 2)]=-0.371424768358*x_ref[0]**o + (-0.652727227203)*x_ref[0] + (0.07512632707)*x_ref[1]**o + (0.158441371267)*x_ref[1]
        arg[(2, 2, 0)]=0.958368212771*x[0]**o + (-0.651905320827)*x[0] + (0.0470226116932)*x[1]**o + (-0.689864644956)*x[1]
        ref[(2, 2, 0)]=0.958368212771*x_ref[0]**o + (-0.651905320827)*x_ref[0] + (0.0470226116932)*x_ref[1]**o + (-0.689864644956)*x_ref[1]
        arg[(2, 2, 1)]=-0.995996960882*x[0]**o + (0.524540835582)*x[0] + (-0.382829678382)*x[1]**o + (-0.403708050592)*x[1]
        ref[(2, 2, 1)]=-0.995996960882*x_ref[0]**o + (0.524540835582)*x_ref[0] + (-0.382829678382)*x_ref[1]**o + (-0.403708050592)*x_ref[1]
        arg[(2, 2, 2)]=0.996133448178*x[0]**o + (0.910649810409)*x[0] + (0.0531741785885)*x[1]**o + (0.607527450886)*x[1]
        ref[(2, 2, 2)]=0.996133448178*x_ref[0]**o + (0.910649810409)*x_ref[0] + (0.0531741785885)*x_ref[1]**o + (0.607527450886)*x_ref[1]
        arg[(2, 3, 0)]=-0.844439331871*x[0]**o + (0.26074027089)*x[0] + (-0.950442729294)*x[1]**o + (-0.825556168722)*x[1]
        ref[(2, 3, 0)]=-0.844439331871*x_ref[0]**o + (0.26074027089)*x_ref[0] + (-0.950442729294)*x_ref[1]**o + (-0.825556168722)*x_ref[1]
        arg[(2, 3, 1)]=0.537986584233*x[0]**o + (0.99595241359)*x[0] + (0.67065268972)*x[1]**o + (0.391514752212)*x[1]
        ref[(2, 3, 1)]=0.537986584233*x_ref[0]**o + (0.99595241359)*x_ref[0] + (0.67065268972)*x_ref[1]**o + (0.391514752212)*x_ref[1]
        arg[(2, 3, 2)]=-0.251290498744*x[0]**o + (0.796883193586)*x[0] + (-0.6777489921)*x[1]**o + (0.23636693919)*x[1]
        ref[(2, 3, 2)]=-0.251290498744*x_ref[0]**o + (0.796883193586)*x_ref[0] + (-0.6777489921)*x_ref[1]**o + (0.23636693919)*x_ref[1]
        arg[(3, 0, 0)]=-0.629287247371*x[0]**o + (-0.78911025418)*x[0] + (0.762628792099)*x[1]**o + (0.936997724352)*x[1]
        ref[(3, 0, 0)]=-0.629287247371*x_ref[0]**o + (-0.78911025418)*x_ref[0] + (0.762628792099)*x_ref[1]**o + (0.936997724352)*x_ref[1]
        arg[(3, 0, 1)]=0.0976004309208*x[0]**o + (0.72349585127)*x[0] + (-0.701542349443)*x[1]**o + (0.694041067069)*x[1]
        ref[(3, 0, 1)]=0.0976004309208*x_ref[0]**o + (0.72349585127)*x_ref[0] + (-0.701542349443)*x_ref[1]**o + (0.694041067069)*x_ref[1]
        arg[(3, 0, 2)]=-0.870724287272*x[0]**o + (-0.717621955624)*x[0] + (-0.672740748078)*x[1]**o + (-0.0566808276322)*x[1]
        ref[(3, 0, 2)]=-0.870724287272*x_ref[0]**o + (-0.717621955624)*x_ref[0] + (-0.672740748078)*x_ref[1]**o + (-0.0566808276322)*x_ref[1]
        arg[(3, 1, 0)]=0.432360447085*x[0]**o + (-0.428534069477)*x[0] + (-0.0206555364006)*x[1]**o + (0.694878820212)*x[1]
        ref[(3, 1, 0)]=0.432360447085*x_ref[0]**o + (-0.428534069477)*x_ref[0] + (-0.0206555364006)*x_ref[1]**o + (0.694878820212)*x_ref[1]
        arg[(3, 1, 1)]=0.295376401732*x[0]**o + (0.548208392052)*x[0] + (-0.618585776337)*x[1]**o + (-0.294145531123)*x[1]
        ref[(3, 1, 1)]=0.295376401732*x_ref[0]**o + (0.548208392052)*x_ref[0] + (-0.618585776337)*x_ref[1]**o + (-0.294145531123)*x_ref[1]
        arg[(3, 1, 2)]=0.103910521347*x[0]**o + (0.807397907206)*x[0] + (-0.434517186231)*x[1]**o + (0.442108265736)*x[1]
        ref[(3, 1, 2)]=0.103910521347*x_ref[0]**o + (0.807397907206)*x_ref[0] + (-0.434517186231)*x_ref[1]**o + (0.442108265736)*x_ref[1]
        arg[(3, 2, 0)]=-0.397592841805*x[0]**o + (0.668997861943)*x[0] + (-0.469022870317)*x[1]**o + (0.916561725096)*x[1]
        ref[(3, 2, 0)]=-0.397592841805*x_ref[0]**o + (0.668997861943)*x_ref[0] + (-0.469022870317)*x_ref[1]**o + (0.916561725096)*x_ref[1]
        arg[(3, 2, 1)]=-0.0775339521228*x[0]**o + (0.426220783164)*x[0] + (0.74854838927)*x[1]**o + (-0.929511885583)*x[1]
        ref[(3, 2, 1)]=-0.0775339521228*x_ref[0]**o + (0.426220783164)*x_ref[0] + (0.74854838927)*x_ref[1]**o + (-0.929511885583)*x_ref[1]
        arg[(3, 2, 2)]=0.269976440472*x[0]**o + (0.382262377084)*x[0] + (0.481661128633)*x[1]**o + (0.184841613036)*x[1]
        ref[(3, 2, 2)]=0.269976440472*x_ref[0]**o + (0.382262377084)*x_ref[0] + (0.481661128633)*x_ref[1]**o + (0.184841613036)*x_ref[1]
        arg[(3, 3, 0)]=-0.681275615146*x[0]**o + (0.0867309573896)*x[0] + (0.983303127284)*x[1]**o + (-0.986093720221)*x[1]
        ref[(3, 3, 0)]=-0.681275615146*x_ref[0]**o + (0.0867309573896)*x_ref[0] + (0.983303127284)*x_ref[1]**o + (-0.986093720221)*x_ref[1]
        arg[(3, 3, 1)]=0.893257778269*x[0]**o + (0.943012493469)*x[0] + (0.439196309855)*x[1]**o + (-0.411934210513)*x[1]
        ref[(3, 3, 1)]=0.893257778269*x_ref[0]**o + (0.943012493469)*x_ref[0] + (0.439196309855)*x_ref[1]**o + (-0.411934210513)*x_ref[1]
        arg[(3, 3, 2)]=0.883451067582*x[0]**o + (-0.116806074401)*x[0] + (0.286527995466)*x[1]**o + (-0.883326297421)*x[1]
        ref[(3, 3, 2)]=0.883451067582*x_ref[0]**o + (-0.116806074401)*x_ref[0] + (0.286527995466)*x_ref[1]**o + (-0.883326297421)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0)]+=0.87936405845*x[2]**o + (-0.0870170873789)*x[2]
            ref[(0, 0, 0)]+=0.87936405845*x_ref[2]**o + (-0.0870170873789)*x_ref[2]
            arg[(0, 0, 1)]+=-0.429966272794*x[2]**o + (-0.528394199392)*x[2]
            ref[(0, 0, 1)]+=-0.429966272794*x_ref[2]**o + (-0.528394199392)*x_ref[2]
            arg[(0, 0, 2)]+=-0.971406148898*x[2]**o + (0.31644386837)*x[2]
            ref[(0, 0, 2)]+=-0.971406148898*x_ref[2]**o + (0.31644386837)*x_ref[2]
            arg[(0, 1, 0)]+=0.240529253076*x[2]**o + (0.557265723573)*x[2]
            ref[(0, 1, 0)]+=0.240529253076*x_ref[2]**o + (0.557265723573)*x_ref[2]
            arg[(0, 1, 1)]+=0.205763765837*x[2]**o + (-0.137066789293)*x[2]
            ref[(0, 1, 1)]+=0.205763765837*x_ref[2]**o + (-0.137066789293)*x_ref[2]
            arg[(0, 1, 2)]+=-0.176201340683*x[2]**o + (0.82420694478)*x[2]
            ref[(0, 1, 2)]+=-0.176201340683*x_ref[2]**o + (0.82420694478)*x_ref[2]
            arg[(0, 2, 0)]+=-0.478123304507*x[2]**o + (0.083201720793)*x[2]
            ref[(0, 2, 0)]+=-0.478123304507*x_ref[2]**o + (0.083201720793)*x_ref[2]
            arg[(0, 2, 1)]+=0.220858631487*x[2]**o + (-0.863079881717)*x[2]
            ref[(0, 2, 1)]+=0.220858631487*x_ref[2]**o + (-0.863079881717)*x_ref[2]
            arg[(0, 2, 2)]+=0.167017662333*x[2]**o + (0.14694559005)*x[2]
            ref[(0, 2, 2)]+=0.167017662333*x_ref[2]**o + (0.14694559005)*x_ref[2]
            arg[(0, 3, 0)]+=0.495504090544*x[2]**o + (-0.218229062769)*x[2]
            ref[(0, 3, 0)]+=0.495504090544*x_ref[2]**o + (-0.218229062769)*x_ref[2]
            arg[(0, 3, 1)]+=0.205813615281*x[2]**o + (-0.538717628776)*x[2]
            ref[(0, 3, 1)]+=0.205813615281*x_ref[2]**o + (-0.538717628776)*x_ref[2]
            arg[(0, 3, 2)]+=-0.00743092242137*x[2]**o + (0.0424989364184)*x[2]
            ref[(0, 3, 2)]+=-0.00743092242137*x_ref[2]**o + (0.0424989364184)*x_ref[2]
            arg[(1, 0, 0)]+=0.497116956894*x[2]**o + (0.0193432983156)*x[2]
            ref[(1, 0, 0)]+=0.497116956894*x_ref[2]**o + (0.0193432983156)*x_ref[2]
            arg[(1, 0, 1)]+=0.28933566494*x[2]**o + (0.322128285654)*x[2]
            ref[(1, 0, 1)]+=0.28933566494*x_ref[2]**o + (0.322128285654)*x_ref[2]
            arg[(1, 0, 2)]+=0.5489836604*x[2]**o + (-0.153600145641)*x[2]
            ref[(1, 0, 2)]+=0.5489836604*x_ref[2]**o + (-0.153600145641)*x_ref[2]
            arg[(1, 1, 0)]+=0.800325939676*x[2]**o + (-0.208568657071)*x[2]
            ref[(1, 1, 0)]+=0.800325939676*x_ref[2]**o + (-0.208568657071)*x_ref[2]
            arg[(1, 1, 1)]+=0.0061330670081*x[2]**o + (-0.669264283315)*x[2]
            ref[(1, 1, 1)]+=0.0061330670081*x_ref[2]**o + (-0.669264283315)*x_ref[2]
            arg[(1, 1, 2)]+=0.151370641654*x[2]**o + (-0.479232352646)*x[2]
            ref[(1, 1, 2)]+=0.151370641654*x_ref[2]**o + (-0.479232352646)*x_ref[2]
            arg[(1, 2, 0)]+=0.805565081923*x[2]**o + (-0.182813810655)*x[2]
            ref[(1, 2, 0)]+=0.805565081923*x_ref[2]**o + (-0.182813810655)*x_ref[2]
            arg[(1, 2, 1)]+=0.677105023169*x[2]**o + (0.00745210315208)*x[2]
            ref[(1, 2, 1)]+=0.677105023169*x_ref[2]**o + (0.00745210315208)*x_ref[2]
            arg[(1, 2, 2)]+=-0.75660924383*x[2]**o + (0.29119357815)*x[2]
            ref[(1, 2, 2)]+=-0.75660924383*x_ref[2]**o + (0.29119357815)*x_ref[2]
            arg[(1, 3, 0)]+=-0.35566633826*x[2]**o + (-0.521818373257)*x[2]
            ref[(1, 3, 0)]+=-0.35566633826*x_ref[2]**o + (-0.521818373257)*x_ref[2]
            arg[(1, 3, 1)]+=0.776535486856*x[2]**o + (0.52759646193)*x[2]
            ref[(1, 3, 1)]+=0.776535486856*x_ref[2]**o + (0.52759646193)*x_ref[2]
            arg[(1, 3, 2)]+=-0.389742930386*x[2]**o + (-0.0395320110145)*x[2]
            ref[(1, 3, 2)]+=-0.389742930386*x_ref[2]**o + (-0.0395320110145)*x_ref[2]
            arg[(2, 0, 0)]+=-0.874406778559*x[2]**o + (-0.400192566137)*x[2]
            ref[(2, 0, 0)]+=-0.874406778559*x_ref[2]**o + (-0.400192566137)*x_ref[2]
            arg[(2, 0, 1)]+=0.471869524239*x[2]**o + (0.681619806218)*x[2]
            ref[(2, 0, 1)]+=0.471869524239*x_ref[2]**o + (0.681619806218)*x_ref[2]
            arg[(2, 0, 2)]+=0.909401898586*x[2]**o + (-0.156415733327)*x[2]
            ref[(2, 0, 2)]+=0.909401898586*x_ref[2]**o + (-0.156415733327)*x_ref[2]
            arg[(2, 1, 0)]+=-0.044838397427*x[2]**o + (-0.0841898448374)*x[2]
            ref[(2, 1, 0)]+=-0.044838397427*x_ref[2]**o + (-0.0841898448374)*x_ref[2]
            arg[(2, 1, 1)]+=-0.391664729644*x[2]**o + (0.390549463671)*x[2]
            ref[(2, 1, 1)]+=-0.391664729644*x_ref[2]**o + (0.390549463671)*x_ref[2]
            arg[(2, 1, 2)]+=-0.745160368154*x[2]**o + (0.669894856535)*x[2]
            ref[(2, 1, 2)]+=-0.745160368154*x_ref[2]**o + (0.669894856535)*x_ref[2]
            arg[(2, 2, 0)]+=0.257788206355*x[2]**o + (-0.00735158658505)*x[2]
            ref[(2, 2, 0)]+=0.257788206355*x_ref[2]**o + (-0.00735158658505)*x_ref[2]
            arg[(2, 2, 1)]+=-0.316534118331*x[2]**o + (0.973918454845)*x[2]
            ref[(2, 2, 1)]+=-0.316534118331*x_ref[2]**o + (0.973918454845)*x_ref[2]
            arg[(2, 2, 2)]+=0.589389436357*x[2]**o + (-0.47067691692)*x[2]
            ref[(2, 2, 2)]+=0.589389436357*x_ref[2]**o + (-0.47067691692)*x_ref[2]
            arg[(2, 3, 0)]+=-0.422240879323*x[2]**o + (-0.0163593247341)*x[2]
            ref[(2, 3, 0)]+=-0.422240879323*x_ref[2]**o + (-0.0163593247341)*x_ref[2]
            arg[(2, 3, 1)]+=0.965982560096*x[2]**o + (-0.465597966255)*x[2]
            ref[(2, 3, 1)]+=0.965982560096*x_ref[2]**o + (-0.465597966255)*x_ref[2]
            arg[(2, 3, 2)]+=-0.18861435244*x[2]**o + (0.230473847505)*x[2]
            ref[(2, 3, 2)]+=-0.18861435244*x_ref[2]**o + (0.230473847505)*x_ref[2]
            arg[(3, 0, 0)]+=0.423620709078*x[2]**o + (0.16349180271)*x[2]
            ref[(3, 0, 0)]+=0.423620709078*x_ref[2]**o + (0.16349180271)*x_ref[2]
            arg[(3, 0, 1)]+=-0.651299386326*x[2]**o + (-0.563401593939)*x[2]
            ref[(3, 0, 1)]+=-0.651299386326*x_ref[2]**o + (-0.563401593939)*x_ref[2]
            arg[(3, 0, 2)]+=0.634712782796*x[2]**o + (-0.948065925362)*x[2]
            ref[(3, 0, 2)]+=0.634712782796*x_ref[2]**o + (-0.948065925362)*x_ref[2]
            arg[(3, 1, 0)]+=-0.0219246682763*x[2]**o + (0.672448364552)*x[2]
            ref[(3, 1, 0)]+=-0.0219246682763*x_ref[2]**o + (0.672448364552)*x_ref[2]
            arg[(3, 1, 1)]+=0.897939716172*x[2]**o + (-0.642443266409)*x[2]
            ref[(3, 1, 1)]+=0.897939716172*x_ref[2]**o + (-0.642443266409)*x_ref[2]
            arg[(3, 1, 2)]+=0.736998839291*x[2]**o + (0.696587417889)*x[2]
            ref[(3, 1, 2)]+=0.736998839291*x_ref[2]**o + (0.696587417889)*x_ref[2]
            arg[(3, 2, 0)]+=0.326661848932*x[2]**o + (-0.422497940858)*x[2]
            ref[(3, 2, 0)]+=0.326661848932*x_ref[2]**o + (-0.422497940858)*x_ref[2]
            arg[(3, 2, 1)]+=0.438705767023*x[2]**o + (-0.43973011509)*x[2]
            ref[(3, 2, 1)]+=0.438705767023*x_ref[2]**o + (-0.43973011509)*x_ref[2]
            arg[(3, 2, 2)]+=-0.582200995538*x[2]**o + (-0.279242162981)*x[2]
            ref[(3, 2, 2)]+=-0.582200995538*x_ref[2]**o + (-0.279242162981)*x_ref[2]
            arg[(3, 3, 0)]+=-0.597338868958*x[2]**o + (0.463740602691)*x[2]
            ref[(3, 3, 0)]+=-0.597338868958*x_ref[2]**o + (0.463740602691)*x_ref[2]
            arg[(3, 3, 1)]+=0.608277081346*x[2]**o + (0.406456160265)*x[2]
            ref[(3, 3, 1)]+=0.608277081346*x_ref[2]**o + (0.406456160265)*x_ref[2]
            arg[(3, 3, 2)]+=-0.729067742001*x[2]**o + (-0.882363342905)*x[2]
            ref[(3, 3, 2)]+=-0.729067742001*x_ref[2]**o + (-0.882363342905)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (4, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_interpolate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank4(self):
        """
        tests interpolation of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports interpolation from ReducedFunctionOnContactOne to ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        x_ref = w_ref.getX()
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 4, 4),w)
        ref = Data(0,(2, 4, 4, 4),w_ref)
        arg[(0, 0, 0, 0)]=0.580164423151*x[0]**o + (-0.222193655086)*x[0] + (-0.0741857937968)*x[1]**o + (-0.535860711173)*x[1]
        ref[(0, 0, 0, 0)]=0.580164423151*x_ref[0]**o + (-0.222193655086)*x_ref[0] + (-0.0741857937968)*x_ref[1]**o + (-0.535860711173)*x_ref[1]
        arg[(0, 0, 0, 1)]=0.236696023369*x[0]**o + (-0.78649041653)*x[0] + (0.40246009142)*x[1]**o + (0.949880490989)*x[1]
        ref[(0, 0, 0, 1)]=0.236696023369*x_ref[0]**o + (-0.78649041653)*x_ref[0] + (0.40246009142)*x_ref[1]**o + (0.949880490989)*x_ref[1]
        arg[(0, 0, 0, 2)]=0.55185500939*x[0]**o + (0.433651622853)*x[0] + (0.59460978449)*x[1]**o + (0.332195937988)*x[1]
        ref[(0, 0, 0, 2)]=0.55185500939*x_ref[0]**o + (0.433651622853)*x_ref[0] + (0.59460978449)*x_ref[1]**o + (0.332195937988)*x_ref[1]
        arg[(0, 0, 0, 3)]=0.604553519545*x[0]**o + (-0.526793658435)*x[0] + (-0.915929372166)*x[1]**o + (0.247351657351)*x[1]
        ref[(0, 0, 0, 3)]=0.604553519545*x_ref[0]**o + (-0.526793658435)*x_ref[0] + (-0.915929372166)*x_ref[1]**o + (0.247351657351)*x_ref[1]
        arg[(0, 0, 1, 0)]=-0.371605716163*x[0]**o + (-0.00298736467728)*x[0] + (0.969984865114)*x[1]**o + (-0.787278253074)*x[1]
        ref[(0, 0, 1, 0)]=-0.371605716163*x_ref[0]**o + (-0.00298736467728)*x_ref[0] + (0.969984865114)*x_ref[1]**o + (-0.787278253074)*x_ref[1]
        arg[(0, 0, 1, 1)]=0.175431238465*x[0]**o + (-0.424779410292)*x[0] + (0.460471168545)*x[1]**o + (0.769033288415)*x[1]
        ref[(0, 0, 1, 1)]=0.175431238465*x_ref[0]**o + (-0.424779410292)*x_ref[0] + (0.460471168545)*x_ref[1]**o + (0.769033288415)*x_ref[1]
        arg[(0, 0, 1, 2)]=0.684914486541*x[0]**o + (-0.044878266068)*x[0] + (-0.394322378855)*x[1]**o + (-0.372228112532)*x[1]
        ref[(0, 0, 1, 2)]=0.684914486541*x_ref[0]**o + (-0.044878266068)*x_ref[0] + (-0.394322378855)*x_ref[1]**o + (-0.372228112532)*x_ref[1]
        arg[(0, 0, 1, 3)]=-0.750228922862*x[0]**o + (0.157891297069)*x[0] + (0.112981952807)*x[1]**o + (0.0802716572209)*x[1]
        ref[(0, 0, 1, 3)]=-0.750228922862*x_ref[0]**o + (0.157891297069)*x_ref[0] + (0.112981952807)*x_ref[1]**o + (0.0802716572209)*x_ref[1]
        arg[(0, 0, 2, 0)]=-0.769549257544*x[0]**o + (0.574215998529)*x[0] + (-0.789824706416)*x[1]**o + (0.543084097169)*x[1]
        ref[(0, 0, 2, 0)]=-0.769549257544*x_ref[0]**o + (0.574215998529)*x_ref[0] + (-0.789824706416)*x_ref[1]**o + (0.543084097169)*x_ref[1]
        arg[(0, 0, 2, 1)]=0.836293796221*x[0]**o + (-0.337119838864)*x[0] + (-0.998242004288)*x[1]**o + (0.731017415076)*x[1]
        ref[(0, 0, 2, 1)]=0.836293796221*x_ref[0]**o + (-0.337119838864)*x_ref[0] + (-0.998242004288)*x_ref[1]**o + (0.731017415076)*x_ref[1]
        arg[(0, 0, 2, 2)]=0.912184208463*x[0]**o + (-0.24946726222)*x[0] + (0.253610034609)*x[1]**o + (-0.588048398526)*x[1]
        ref[(0, 0, 2, 2)]=0.912184208463*x_ref[0]**o + (-0.24946726222)*x_ref[0] + (0.253610034609)*x_ref[1]**o + (-0.588048398526)*x_ref[1]
        arg[(0, 0, 2, 3)]=-0.0600423242318*x[0]**o + (-0.793408535094)*x[0] + (-0.166269558151)*x[1]**o + (-0.130401288195)*x[1]
        ref[(0, 0, 2, 3)]=-0.0600423242318*x_ref[0]**o + (-0.793408535094)*x_ref[0] + (-0.166269558151)*x_ref[1]**o + (-0.130401288195)*x_ref[1]
        arg[(0, 0, 3, 0)]=0.493832867014*x[0]**o + (0.00598841966125)*x[0] + (-0.998520033341)*x[1]**o + (-0.321920126858)*x[1]
        ref[(0, 0, 3, 0)]=0.493832867014*x_ref[0]**o + (0.00598841966125)*x_ref[0] + (-0.998520033341)*x_ref[1]**o + (-0.321920126858)*x_ref[1]
        arg[(0, 0, 3, 1)]=-0.838085964477*x[0]**o + (-0.963805073601)*x[0] + (-0.36829595052)*x[1]**o + (0.661539262412)*x[1]
        ref[(0, 0, 3, 1)]=-0.838085964477*x_ref[0]**o + (-0.963805073601)*x_ref[0] + (-0.36829595052)*x_ref[1]**o + (0.661539262412)*x_ref[1]
        arg[(0, 0, 3, 2)]=0.0456539600465*x[0]**o + (0.872025045793)*x[0] + (0.614052825328)*x[1]**o + (0.813017863468)*x[1]
        ref[(0, 0, 3, 2)]=0.0456539600465*x_ref[0]**o + (0.872025045793)*x_ref[0] + (0.614052825328)*x_ref[1]**o + (0.813017863468)*x_ref[1]
        arg[(0, 0, 3, 3)]=-0.846627905611*x[0]**o + (0.875485543769)*x[0] + (0.488813022591)*x[1]**o + (-0.386660628761)*x[1]
        ref[(0, 0, 3, 3)]=-0.846627905611*x_ref[0]**o + (0.875485543769)*x_ref[0] + (0.488813022591)*x_ref[1]**o + (-0.386660628761)*x_ref[1]
        arg[(0, 1, 0, 0)]=0.266335710122*x[0]**o + (-0.657395311303)*x[0] + (0.339839351885)*x[1]**o + (0.290902470425)*x[1]
        ref[(0, 1, 0, 0)]=0.266335710122*x_ref[0]**o + (-0.657395311303)*x_ref[0] + (0.339839351885)*x_ref[1]**o + (0.290902470425)*x_ref[1]
        arg[(0, 1, 0, 1)]=-0.828881124927*x[0]**o + (0.629740708466)*x[0] + (0.543383057952)*x[1]**o + (-0.328768410001)*x[1]
        ref[(0, 1, 0, 1)]=-0.828881124927*x_ref[0]**o + (0.629740708466)*x_ref[0] + (0.543383057952)*x_ref[1]**o + (-0.328768410001)*x_ref[1]
        arg[(0, 1, 0, 2)]=0.563945005799*x[0]**o + (-0.375528858447)*x[0] + (0.693352535291)*x[1]**o + (-0.719218051185)*x[1]
        ref[(0, 1, 0, 2)]=0.563945005799*x_ref[0]**o + (-0.375528858447)*x_ref[0] + (0.693352535291)*x_ref[1]**o + (-0.719218051185)*x_ref[1]
        arg[(0, 1, 0, 3)]=0.375376651338*x[0]**o + (0.726023645674)*x[0] + (-0.249928867528)*x[1]**o + (0.779710068551)*x[1]
        ref[(0, 1, 0, 3)]=0.375376651338*x_ref[0]**o + (0.726023645674)*x_ref[0] + (-0.249928867528)*x_ref[1]**o + (0.779710068551)*x_ref[1]
        arg[(0, 1, 1, 0)]=0.88940414108*x[0]**o + (0.0732302559883)*x[0] + (0.253313066712)*x[1]**o + (-0.488712807849)*x[1]
        ref[(0, 1, 1, 0)]=0.88940414108*x_ref[0]**o + (0.0732302559883)*x_ref[0] + (0.253313066712)*x_ref[1]**o + (-0.488712807849)*x_ref[1]
        arg[(0, 1, 1, 1)]=0.129970734617*x[0]**o + (0.563902718592)*x[0] + (0.54604012223)*x[1]**o + (-0.223845035511)*x[1]
        ref[(0, 1, 1, 1)]=0.129970734617*x_ref[0]**o + (0.563902718592)*x_ref[0] + (0.54604012223)*x_ref[1]**o + (-0.223845035511)*x_ref[1]
        arg[(0, 1, 1, 2)]=-0.705437942462*x[0]**o + (0.237559402434)*x[0] + (-0.328257204561)*x[1]**o + (0.821839176133)*x[1]
        ref[(0, 1, 1, 2)]=-0.705437942462*x_ref[0]**o + (0.237559402434)*x_ref[0] + (-0.328257204561)*x_ref[1]**o + (0.821839176133)*x_ref[1]
        arg[(0, 1, 1, 3)]=0.740208686589*x[0]**o + (-0.700907863749)*x[0] + (-0.751861398576)*x[1]**o + (-0.887142229283)*x[1]
        ref[(0, 1, 1, 3)]=0.740208686589*x_ref[0]**o + (-0.700907863749)*x_ref[0] + (-0.751861398576)*x_ref[1]**o + (-0.887142229283)*x_ref[1]
        arg[(0, 1, 2, 0)]=-0.0448499611122*x[0]**o + (0.376976747707)*x[0] + (-0.256555692487)*x[1]**o + (-0.77856080663)*x[1]
        ref[(0, 1, 2, 0)]=-0.0448499611122*x_ref[0]**o + (0.376976747707)*x_ref[0] + (-0.256555692487)*x_ref[1]**o + (-0.77856080663)*x_ref[1]
        arg[(0, 1, 2, 1)]=0.889179162879*x[0]**o + (0.00110470944187)*x[0] + (0.965258754399)*x[1]**o + (-0.919678463479)*x[1]
        ref[(0, 1, 2, 1)]=0.889179162879*x_ref[0]**o + (0.00110470944187)*x_ref[0] + (0.965258754399)*x_ref[1]**o + (-0.919678463479)*x_ref[1]
        arg[(0, 1, 2, 2)]=-0.194781930024*x[0]**o + (-0.873422648705)*x[0] + (0.0478710132668)*x[1]**o + (-0.61321234963)*x[1]
        ref[(0, 1, 2, 2)]=-0.194781930024*x_ref[0]**o + (-0.873422648705)*x_ref[0] + (0.0478710132668)*x_ref[1]**o + (-0.61321234963)*x_ref[1]
        arg[(0, 1, 2, 3)]=-0.497978190355*x[0]**o + (0.942925059105)*x[0] + (0.46848562331)*x[1]**o + (-0.686032464862)*x[1]
        ref[(0, 1, 2, 3)]=-0.497978190355*x_ref[0]**o + (0.942925059105)*x_ref[0] + (0.46848562331)*x_ref[1]**o + (-0.686032464862)*x_ref[1]
        arg[(0, 1, 3, 0)]=-0.104598001766*x[0]**o + (0.0739604694342)*x[0] + (0.884255655981)*x[1]**o + (0.932736302748)*x[1]
        ref[(0, 1, 3, 0)]=-0.104598001766*x_ref[0]**o + (0.0739604694342)*x_ref[0] + (0.884255655981)*x_ref[1]**o + (0.932736302748)*x_ref[1]
        arg[(0, 1, 3, 1)]=-0.614058496591*x[0]**o + (0.184317354223)*x[0] + (0.299910764895)*x[1]**o + (0.326855819176)*x[1]
        ref[(0, 1, 3, 1)]=-0.614058496591*x_ref[0]**o + (0.184317354223)*x_ref[0] + (0.299910764895)*x_ref[1]**o + (0.326855819176)*x_ref[1]
        arg[(0, 1, 3, 2)]=-0.805157746123*x[0]**o + (0.535021016725)*x[0] + (0.0204325571075)*x[1]**o + (-0.239962753709)*x[1]
        ref[(0, 1, 3, 2)]=-0.805157746123*x_ref[0]**o + (0.535021016725)*x_ref[0] + (0.0204325571075)*x_ref[1]**o + (-0.239962753709)*x_ref[1]
        arg[(0, 1, 3, 3)]=-0.430844536328*x[0]**o + (-0.442492895595)*x[0] + (0.81111350893)*x[1]**o + (-0.597680393369)*x[1]
        ref[(0, 1, 3, 3)]=-0.430844536328*x_ref[0]**o + (-0.442492895595)*x_ref[0] + (0.81111350893)*x_ref[1]**o + (-0.597680393369)*x_ref[1]
        arg[(0, 2, 0, 0)]=0.822591046491*x[0]**o + (-0.278306734554)*x[0] + (-0.0451376069359)*x[1]**o + (0.392839077564)*x[1]
        ref[(0, 2, 0, 0)]=0.822591046491*x_ref[0]**o + (-0.278306734554)*x_ref[0] + (-0.0451376069359)*x_ref[1]**o + (0.392839077564)*x_ref[1]
        arg[(0, 2, 0, 1)]=-0.650922270216*x[0]**o + (0.625250563608)*x[0] + (-0.55071785467)*x[1]**o + (0.488093969417)*x[1]
        ref[(0, 2, 0, 1)]=-0.650922270216*x_ref[0]**o + (0.625250563608)*x_ref[0] + (-0.55071785467)*x_ref[1]**o + (0.488093969417)*x_ref[1]
        arg[(0, 2, 0, 2)]=-0.216767996559*x[0]**o + (-0.454777519358)*x[0] + (-0.940141242903)*x[1]**o + (0.01651425168)*x[1]
        ref[(0, 2, 0, 2)]=-0.216767996559*x_ref[0]**o + (-0.454777519358)*x_ref[0] + (-0.940141242903)*x_ref[1]**o + (0.01651425168)*x_ref[1]
        arg[(0, 2, 0, 3)]=-0.105688352826*x[0]**o + (0.525427714172)*x[0] + (-0.786588024779)*x[1]**o + (-0.399257946625)*x[1]
        ref[(0, 2, 0, 3)]=-0.105688352826*x_ref[0]**o + (0.525427714172)*x_ref[0] + (-0.786588024779)*x_ref[1]**o + (-0.399257946625)*x_ref[1]
        arg[(0, 2, 1, 0)]=0.556234123183*x[0]**o + (0.439962279041)*x[0] + (0.628895787727)*x[1]**o + (-0.0514844148814)*x[1]
        ref[(0, 2, 1, 0)]=0.556234123183*x_ref[0]**o + (0.439962279041)*x_ref[0] + (0.628895787727)*x_ref[1]**o + (-0.0514844148814)*x_ref[1]
        arg[(0, 2, 1, 1)]=0.786541259676*x[0]**o + (-0.23925951584)*x[0] + (-0.633791053094)*x[1]**o + (-0.998586528762)*x[1]
        ref[(0, 2, 1, 1)]=0.786541259676*x_ref[0]**o + (-0.23925951584)*x_ref[0] + (-0.633791053094)*x_ref[1]**o + (-0.998586528762)*x_ref[1]
        arg[(0, 2, 1, 2)]=0.194556541826*x[0]**o + (0.28275964984)*x[0] + (0.310688225769)*x[1]**o + (0.614166965887)*x[1]
        ref[(0, 2, 1, 2)]=0.194556541826*x_ref[0]**o + (0.28275964984)*x_ref[0] + (0.310688225769)*x_ref[1]**o + (0.614166965887)*x_ref[1]
        arg[(0, 2, 1, 3)]=0.961733457465*x[0]**o + (-0.398628479569)*x[0] + (0.594917846139)*x[1]**o + (-0.258486241791)*x[1]
        ref[(0, 2, 1, 3)]=0.961733457465*x_ref[0]**o + (-0.398628479569)*x_ref[0] + (0.594917846139)*x_ref[1]**o + (-0.258486241791)*x_ref[1]
        arg[(0, 2, 2, 0)]=-0.831900408126*x[0]**o + (-0.0905898144939)*x[0] + (0.599700346933)*x[1]**o + (-0.748722915036)*x[1]
        ref[(0, 2, 2, 0)]=-0.831900408126*x_ref[0]**o + (-0.0905898144939)*x_ref[0] + (0.599700346933)*x_ref[1]**o + (-0.748722915036)*x_ref[1]
        arg[(0, 2, 2, 1)]=0.316356589247*x[0]**o + (-0.0155737628829)*x[0] + (-0.884730503827)*x[1]**o + (0.559152835532)*x[1]
        ref[(0, 2, 2, 1)]=0.316356589247*x_ref[0]**o + (-0.0155737628829)*x_ref[0] + (-0.884730503827)*x_ref[1]**o + (0.559152835532)*x_ref[1]
        arg[(0, 2, 2, 2)]=0.128299531268*x[0]**o + (-0.126674645457)*x[0] + (0.840994119336)*x[1]**o + (0.457566338331)*x[1]
        ref[(0, 2, 2, 2)]=0.128299531268*x_ref[0]**o + (-0.126674645457)*x_ref[0] + (0.840994119336)*x_ref[1]**o + (0.457566338331)*x_ref[1]
        arg[(0, 2, 2, 3)]=0.0984059845964*x[0]**o + (0.896400967327)*x[0] + (0.784393387228)*x[1]**o + (-0.0478227877188)*x[1]
        ref[(0, 2, 2, 3)]=0.0984059845964*x_ref[0]**o + (0.896400967327)*x_ref[0] + (0.784393387228)*x_ref[1]**o + (-0.0478227877188)*x_ref[1]
        arg[(0, 2, 3, 0)]=0.257673300679*x[0]**o + (-0.887330458149)*x[0] + (0.420465543233)*x[1]**o + (-0.293620924755)*x[1]
        ref[(0, 2, 3, 0)]=0.257673300679*x_ref[0]**o + (-0.887330458149)*x_ref[0] + (0.420465543233)*x_ref[1]**o + (-0.293620924755)*x_ref[1]
        arg[(0, 2, 3, 1)]=0.165705328788*x[0]**o + (-0.032295083405)*x[0] + (0.922237920391)*x[1]**o + (0.461469039053)*x[1]
        ref[(0, 2, 3, 1)]=0.165705328788*x_ref[0]**o + (-0.032295083405)*x_ref[0] + (0.922237920391)*x_ref[1]**o + (0.461469039053)*x_ref[1]
        arg[(0, 2, 3, 2)]=0.642889268679*x[0]**o + (-0.99528915398)*x[0] + (-0.728938814001)*x[1]**o + (0.30333602914)*x[1]
        ref[(0, 2, 3, 2)]=0.642889268679*x_ref[0]**o + (-0.99528915398)*x_ref[0] + (-0.728938814001)*x_ref[1]**o + (0.30333602914)*x_ref[1]
        arg[(0, 2, 3, 3)]=0.268916439729*x[0]**o + (0.561118356764)*x[0] + (-0.226199322817)*x[1]**o + (0.736559293858)*x[1]
        ref[(0, 2, 3, 3)]=0.268916439729*x_ref[0]**o + (0.561118356764)*x_ref[0] + (-0.226199322817)*x_ref[1]**o + (0.736559293858)*x_ref[1]
        arg[(0, 3, 0, 0)]=-0.669261381488*x[0]**o + (-0.0159344337713)*x[0] + (-0.168038160212)*x[1]**o + (0.0383246655906)*x[1]
        ref[(0, 3, 0, 0)]=-0.669261381488*x_ref[0]**o + (-0.0159344337713)*x_ref[0] + (-0.168038160212)*x_ref[1]**o + (0.0383246655906)*x_ref[1]
        arg[(0, 3, 0, 1)]=0.275365233475*x[0]**o + (-0.274538775999)*x[0] + (0.58809825285)*x[1]**o + (-0.479078134167)*x[1]
        ref[(0, 3, 0, 1)]=0.275365233475*x_ref[0]**o + (-0.274538775999)*x_ref[0] + (0.58809825285)*x_ref[1]**o + (-0.479078134167)*x_ref[1]
        arg[(0, 3, 0, 2)]=-0.131769146131*x[0]**o + (0.894644193315)*x[0] + (0.739788658622)*x[1]**o + (-0.499166028174)*x[1]
        ref[(0, 3, 0, 2)]=-0.131769146131*x_ref[0]**o + (0.894644193315)*x_ref[0] + (0.739788658622)*x_ref[1]**o + (-0.499166028174)*x_ref[1]
        arg[(0, 3, 0, 3)]=0.263293756688*x[0]**o + (-0.865441881442)*x[0] + (0.639512469421)*x[1]**o + (-0.142351283423)*x[1]
        ref[(0, 3, 0, 3)]=0.263293756688*x_ref[0]**o + (-0.865441881442)*x_ref[0] + (0.639512469421)*x_ref[1]**o + (-0.142351283423)*x_ref[1]
        arg[(0, 3, 1, 0)]=-0.741932307703*x[0]**o + (-0.762224860638)*x[0] + (0.553250203243)*x[1]**o + (-0.284594664732)*x[1]
        ref[(0, 3, 1, 0)]=-0.741932307703*x_ref[0]**o + (-0.762224860638)*x_ref[0] + (0.553250203243)*x_ref[1]**o + (-0.284594664732)*x_ref[1]
        arg[(0, 3, 1, 1)]=0.341220067111*x[0]**o + (0.107810698716)*x[0] + (-0.799322972968)*x[1]**o + (0.941699298937)*x[1]
        ref[(0, 3, 1, 1)]=0.341220067111*x_ref[0]**o + (0.107810698716)*x_ref[0] + (-0.799322972968)*x_ref[1]**o + (0.941699298937)*x_ref[1]
        arg[(0, 3, 1, 2)]=-0.709277764927*x[0]**o + (0.648391362226)*x[0] + (0.0598900318036)*x[1]**o + (0.777942308518)*x[1]
        ref[(0, 3, 1, 2)]=-0.709277764927*x_ref[0]**o + (0.648391362226)*x_ref[0] + (0.0598900318036)*x_ref[1]**o + (0.777942308518)*x_ref[1]
        arg[(0, 3, 1, 3)]=-0.477118237633*x[0]**o + (0.314012097611)*x[0] + (0.564575109914)*x[1]**o + (-0.115217288053)*x[1]
        ref[(0, 3, 1, 3)]=-0.477118237633*x_ref[0]**o + (0.314012097611)*x_ref[0] + (0.564575109914)*x_ref[1]**o + (-0.115217288053)*x_ref[1]
        arg[(0, 3, 2, 0)]=0.721472640079*x[0]**o + (-0.516182743814)*x[0] + (0.135527183579)*x[1]**o + (0.800116141683)*x[1]
        ref[(0, 3, 2, 0)]=0.721472640079*x_ref[0]**o + (-0.516182743814)*x_ref[0] + (0.135527183579)*x_ref[1]**o + (0.800116141683)*x_ref[1]
        arg[(0, 3, 2, 1)]=-0.680602425156*x[0]**o + (-0.402782280715)*x[0] + (-0.324602581142)*x[1]**o + (-0.210044504228)*x[1]
        ref[(0, 3, 2, 1)]=-0.680602425156*x_ref[0]**o + (-0.402782280715)*x_ref[0] + (-0.324602581142)*x_ref[1]**o + (-0.210044504228)*x_ref[1]
        arg[(0, 3, 2, 2)]=0.255198857197*x[0]**o + (-0.783943555898)*x[0] + (-0.649891405292)*x[1]**o + (0.721533551802)*x[1]
        ref[(0, 3, 2, 2)]=0.255198857197*x_ref[0]**o + (-0.783943555898)*x_ref[0] + (-0.649891405292)*x_ref[1]**o + (0.721533551802)*x_ref[1]
        arg[(0, 3, 2, 3)]=0.437122116781*x[0]**o + (0.692627906085)*x[0] + (-0.498951851815)*x[1]**o + (0.491375100245)*x[1]
        ref[(0, 3, 2, 3)]=0.437122116781*x_ref[0]**o + (0.692627906085)*x_ref[0] + (-0.498951851815)*x_ref[1]**o + (0.491375100245)*x_ref[1]
        arg[(0, 3, 3, 0)]=0.13774283897*x[0]**o + (-0.595304763076)*x[0] + (-0.173632025634)*x[1]**o + (-0.97946892307)*x[1]
        ref[(0, 3, 3, 0)]=0.13774283897*x_ref[0]**o + (-0.595304763076)*x_ref[0] + (-0.173632025634)*x_ref[1]**o + (-0.97946892307)*x_ref[1]
        arg[(0, 3, 3, 1)]=0.488717847779*x[0]**o + (0.186256457387)*x[0] + (-0.594744493547)*x[1]**o + (-0.221934670618)*x[1]
        ref[(0, 3, 3, 1)]=0.488717847779*x_ref[0]**o + (0.186256457387)*x_ref[0] + (-0.594744493547)*x_ref[1]**o + (-0.221934670618)*x_ref[1]
        arg[(0, 3, 3, 2)]=0.343986907696*x[0]**o + (0.725853431549)*x[0] + (0.389880574428)*x[1]**o + (0.263057084505)*x[1]
        ref[(0, 3, 3, 2)]=0.343986907696*x_ref[0]**o + (0.725853431549)*x_ref[0] + (0.389880574428)*x_ref[1]**o + (0.263057084505)*x_ref[1]
        arg[(0, 3, 3, 3)]=-0.830098562995*x[0]**o + (0.344732283774)*x[0] + (0.753633438935)*x[1]**o + (0.732522497552)*x[1]
        ref[(0, 3, 3, 3)]=-0.830098562995*x_ref[0]**o + (0.344732283774)*x_ref[0] + (0.753633438935)*x_ref[1]**o + (0.732522497552)*x_ref[1]
        arg[(1, 0, 0, 0)]=-0.757242186608*x[0]**o + (0.403269076468)*x[0] + (-0.2964335468)*x[1]**o + (0.0953499702814)*x[1]
        ref[(1, 0, 0, 0)]=-0.757242186608*x_ref[0]**o + (0.403269076468)*x_ref[0] + (-0.2964335468)*x_ref[1]**o + (0.0953499702814)*x_ref[1]
        arg[(1, 0, 0, 1)]=0.699432613756*x[0]**o + (-0.331715427701)*x[0] + (-0.115428093445)*x[1]**o + (-0.278319899391)*x[1]
        ref[(1, 0, 0, 1)]=0.699432613756*x_ref[0]**o + (-0.331715427701)*x_ref[0] + (-0.115428093445)*x_ref[1]**o + (-0.278319899391)*x_ref[1]
        arg[(1, 0, 0, 2)]=-0.245183847019*x[0]**o + (0.478290634104)*x[0] + (0.847017214891)*x[1]**o + (0.96804987868)*x[1]
        ref[(1, 0, 0, 2)]=-0.245183847019*x_ref[0]**o + (0.478290634104)*x_ref[0] + (0.847017214891)*x_ref[1]**o + (0.96804987868)*x_ref[1]
        arg[(1, 0, 0, 3)]=0.565253439564*x[0]**o + (-0.530222942571)*x[0] + (0.244049514235)*x[1]**o + (-0.414362025266)*x[1]
        ref[(1, 0, 0, 3)]=0.565253439564*x_ref[0]**o + (-0.530222942571)*x_ref[0] + (0.244049514235)*x_ref[1]**o + (-0.414362025266)*x_ref[1]
        arg[(1, 0, 1, 0)]=0.361264782625*x[0]**o + (-0.189890174871)*x[0] + (-0.202530168728)*x[1]**o + (0.594549481449)*x[1]
        ref[(1, 0, 1, 0)]=0.361264782625*x_ref[0]**o + (-0.189890174871)*x_ref[0] + (-0.202530168728)*x_ref[1]**o + (0.594549481449)*x_ref[1]
        arg[(1, 0, 1, 1)]=0.694336461119*x[0]**o + (-0.397572313291)*x[0] + (0.0454747057992)*x[1]**o + (-0.36579405994)*x[1]
        ref[(1, 0, 1, 1)]=0.694336461119*x_ref[0]**o + (-0.397572313291)*x_ref[0] + (0.0454747057992)*x_ref[1]**o + (-0.36579405994)*x_ref[1]
        arg[(1, 0, 1, 2)]=0.629384873257*x[0]**o + (-0.171558531791)*x[0] + (-0.57301167511)*x[1]**o + (-0.706918828465)*x[1]
        ref[(1, 0, 1, 2)]=0.629384873257*x_ref[0]**o + (-0.171558531791)*x_ref[0] + (-0.57301167511)*x_ref[1]**o + (-0.706918828465)*x_ref[1]
        arg[(1, 0, 1, 3)]=-0.757036990613*x[0]**o + (0.0408740849484)*x[0] + (0.0344643037895)*x[1]**o + (0.541550601865)*x[1]
        ref[(1, 0, 1, 3)]=-0.757036990613*x_ref[0]**o + (0.0408740849484)*x_ref[0] + (0.0344643037895)*x_ref[1]**o + (0.541550601865)*x_ref[1]
        arg[(1, 0, 2, 0)]=-0.659151677563*x[0]**o + (-0.655519375144)*x[0] + (-0.898736502682)*x[1]**o + (0.776907764123)*x[1]
        ref[(1, 0, 2, 0)]=-0.659151677563*x_ref[0]**o + (-0.655519375144)*x_ref[0] + (-0.898736502682)*x_ref[1]**o + (0.776907764123)*x_ref[1]
        arg[(1, 0, 2, 1)]=-0.464629675914*x[0]**o + (-0.0142786425273)*x[0] + (0.800041692731)*x[1]**o + (0.139828809376)*x[1]
        ref[(1, 0, 2, 1)]=-0.464629675914*x_ref[0]**o + (-0.0142786425273)*x_ref[0] + (0.800041692731)*x_ref[1]**o + (0.139828809376)*x_ref[1]
        arg[(1, 0, 2, 2)]=-0.54743330998*x[0]**o + (0.788832401365)*x[0] + (0.378845055329)*x[1]**o + (-0.878691980682)*x[1]
        ref[(1, 0, 2, 2)]=-0.54743330998*x_ref[0]**o + (0.788832401365)*x_ref[0] + (0.378845055329)*x_ref[1]**o + (-0.878691980682)*x_ref[1]
        arg[(1, 0, 2, 3)]=-0.600196794147*x[0]**o + (0.409363691377)*x[0] + (0.925509081219)*x[1]**o + (-0.368793408584)*x[1]
        ref[(1, 0, 2, 3)]=-0.600196794147*x_ref[0]**o + (0.409363691377)*x_ref[0] + (0.925509081219)*x_ref[1]**o + (-0.368793408584)*x_ref[1]
        arg[(1, 0, 3, 0)]=-0.133764549002*x[0]**o + (-0.429246587536)*x[0] + (-0.00903526239009)*x[1]**o + (-0.624707223524)*x[1]
        ref[(1, 0, 3, 0)]=-0.133764549002*x_ref[0]**o + (-0.429246587536)*x_ref[0] + (-0.00903526239009)*x_ref[1]**o + (-0.624707223524)*x_ref[1]
        arg[(1, 0, 3, 1)]=-0.802674673605*x[0]**o + (-0.320023062189)*x[0] + (0.262274721742)*x[1]**o + (-0.372703298355)*x[1]
        ref[(1, 0, 3, 1)]=-0.802674673605*x_ref[0]**o + (-0.320023062189)*x_ref[0] + (0.262274721742)*x_ref[1]**o + (-0.372703298355)*x_ref[1]
        arg[(1, 0, 3, 2)]=0.943636887307*x[0]**o + (0.419339216045)*x[0] + (-0.764247222464)*x[1]**o + (-0.473329226998)*x[1]
        ref[(1, 0, 3, 2)]=0.943636887307*x_ref[0]**o + (0.419339216045)*x_ref[0] + (-0.764247222464)*x_ref[1]**o + (-0.473329226998)*x_ref[1]
        arg[(1, 0, 3, 3)]=0.628187005439*x[0]**o + (-0.999878663117)*x[0] + (0.0887000221029)*x[1]**o + (-0.526195512314)*x[1]
        ref[(1, 0, 3, 3)]=0.628187005439*x_ref[0]**o + (-0.999878663117)*x_ref[0] + (0.0887000221029)*x_ref[1]**o + (-0.526195512314)*x_ref[1]
        arg[(1, 1, 0, 0)]=-0.17294195965*x[0]**o + (0.0173274118779)*x[0] + (-0.701612233902)*x[1]**o + (-0.515665335581)*x[1]
        ref[(1, 1, 0, 0)]=-0.17294195965*x_ref[0]**o + (0.0173274118779)*x_ref[0] + (-0.701612233902)*x_ref[1]**o + (-0.515665335581)*x_ref[1]
        arg[(1, 1, 0, 1)]=0.713230320233*x[0]**o + (-0.681861390264)*x[0] + (0.884039304766)*x[1]**o + (-0.646891541658)*x[1]
        ref[(1, 1, 0, 1)]=0.713230320233*x_ref[0]**o + (-0.681861390264)*x_ref[0] + (0.884039304766)*x_ref[1]**o + (-0.646891541658)*x_ref[1]
        arg[(1, 1, 0, 2)]=-0.110752429675*x[0]**o + (0.637653165309)*x[0] + (-0.284976836898)*x[1]**o + (-0.748369461106)*x[1]
        ref[(1, 1, 0, 2)]=-0.110752429675*x_ref[0]**o + (0.637653165309)*x_ref[0] + (-0.284976836898)*x_ref[1]**o + (-0.748369461106)*x_ref[1]
        arg[(1, 1, 0, 3)]=-0.249109355835*x[0]**o + (-0.807053262293)*x[0] + (-0.783372156528)*x[1]**o + (-0.03938605078)*x[1]
        ref[(1, 1, 0, 3)]=-0.249109355835*x_ref[0]**o + (-0.807053262293)*x_ref[0] + (-0.783372156528)*x_ref[1]**o + (-0.03938605078)*x_ref[1]
        arg[(1, 1, 1, 0)]=-0.319963445005*x[0]**o + (-0.554554064062)*x[0] + (0.948436269255)*x[1]**o + (-0.53647144689)*x[1]
        ref[(1, 1, 1, 0)]=-0.319963445005*x_ref[0]**o + (-0.554554064062)*x_ref[0] + (0.948436269255)*x_ref[1]**o + (-0.53647144689)*x_ref[1]
        arg[(1, 1, 1, 1)]=0.953547411836*x[0]**o + (-0.125119945286)*x[0] + (-0.967670064537)*x[1]**o + (0.260163693003)*x[1]
        ref[(1, 1, 1, 1)]=0.953547411836*x_ref[0]**o + (-0.125119945286)*x_ref[0] + (-0.967670064537)*x_ref[1]**o + (0.260163693003)*x_ref[1]
        arg[(1, 1, 1, 2)]=0.693785397858*x[0]**o + (0.887349438965)*x[0] + (-0.155320056077)*x[1]**o + (0.996052155705)*x[1]
        ref[(1, 1, 1, 2)]=0.693785397858*x_ref[0]**o + (0.887349438965)*x_ref[0] + (-0.155320056077)*x_ref[1]**o + (0.996052155705)*x_ref[1]
        arg[(1, 1, 1, 3)]=0.910064330868*x[0]**o + (-0.914654095987)*x[0] + (-0.0496934891052)*x[1]**o + (-0.464697914826)*x[1]
        ref[(1, 1, 1, 3)]=0.910064330868*x_ref[0]**o + (-0.914654095987)*x_ref[0] + (-0.0496934891052)*x_ref[1]**o + (-0.464697914826)*x_ref[1]
        arg[(1, 1, 2, 0)]=0.245776482657*x[0]**o + (-0.0953729944695)*x[0] + (0.142566787891)*x[1]**o + (-0.755857483421)*x[1]
        ref[(1, 1, 2, 0)]=0.245776482657*x_ref[0]**o + (-0.0953729944695)*x_ref[0] + (0.142566787891)*x_ref[1]**o + (-0.755857483421)*x_ref[1]
        arg[(1, 1, 2, 1)]=-0.154032641414*x[0]**o + (0.0866375241162)*x[0] + (-0.351511159973)*x[1]**o + (-0.187096263668)*x[1]
        ref[(1, 1, 2, 1)]=-0.154032641414*x_ref[0]**o + (0.0866375241162)*x_ref[0] + (-0.351511159973)*x_ref[1]**o + (-0.187096263668)*x_ref[1]
        arg[(1, 1, 2, 2)]=0.270670236924*x[0]**o + (-0.807027121121)*x[0] + (-0.911851287083)*x[1]**o + (0.298143062073)*x[1]
        ref[(1, 1, 2, 2)]=0.270670236924*x_ref[0]**o + (-0.807027121121)*x_ref[0] + (-0.911851287083)*x_ref[1]**o + (0.298143062073)*x_ref[1]
        arg[(1, 1, 2, 3)]=0.559598618823*x[0]**o + (0.67052407428)*x[0] + (-0.137359380008)*x[1]**o + (-0.51513426878)*x[1]
        ref[(1, 1, 2, 3)]=0.559598618823*x_ref[0]**o + (0.67052407428)*x_ref[0] + (-0.137359380008)*x_ref[1]**o + (-0.51513426878)*x_ref[1]
        arg[(1, 1, 3, 0)]=0.120133257184*x[0]**o + (0.0455319493175)*x[0] + (-0.682662143099)*x[1]**o + (0.736555044296)*x[1]
        ref[(1, 1, 3, 0)]=0.120133257184*x_ref[0]**o + (0.0455319493175)*x_ref[0] + (-0.682662143099)*x_ref[1]**o + (0.736555044296)*x_ref[1]
        arg[(1, 1, 3, 1)]=-0.542032088646*x[0]**o + (0.745946019704)*x[0] + (0.0279995674497)*x[1]**o + (0.46712657333)*x[1]
        ref[(1, 1, 3, 1)]=-0.542032088646*x_ref[0]**o + (0.745946019704)*x_ref[0] + (0.0279995674497)*x_ref[1]**o + (0.46712657333)*x_ref[1]
        arg[(1, 1, 3, 2)]=0.650836075346*x[0]**o + (-0.404411662405)*x[0] + (-0.498730656204)*x[1]**o + (-0.950891728521)*x[1]
        ref[(1, 1, 3, 2)]=0.650836075346*x_ref[0]**o + (-0.404411662405)*x_ref[0] + (-0.498730656204)*x_ref[1]**o + (-0.950891728521)*x_ref[1]
        arg[(1, 1, 3, 3)]=-0.094073203313*x[0]**o + (-0.842711405423)*x[0] + (-0.80751419236)*x[1]**o + (-0.191457076651)*x[1]
        ref[(1, 1, 3, 3)]=-0.094073203313*x_ref[0]**o + (-0.842711405423)*x_ref[0] + (-0.80751419236)*x_ref[1]**o + (-0.191457076651)*x_ref[1]
        arg[(1, 2, 0, 0)]=-0.820030685593*x[0]**o + (0.699266354812)*x[0] + (0.856888476628)*x[1]**o + (0.591286317647)*x[1]
        ref[(1, 2, 0, 0)]=-0.820030685593*x_ref[0]**o + (0.699266354812)*x_ref[0] + (0.856888476628)*x_ref[1]**o + (0.591286317647)*x_ref[1]
        arg[(1, 2, 0, 1)]=-0.0390576450703*x[0]**o + (0.126435021653)*x[0] + (-0.145601529618)*x[1]**o + (-0.1652226015)*x[1]
        ref[(1, 2, 0, 1)]=-0.0390576450703*x_ref[0]**o + (0.126435021653)*x_ref[0] + (-0.145601529618)*x_ref[1]**o + (-0.1652226015)*x_ref[1]
        arg[(1, 2, 0, 2)]=0.609340507817*x[0]**o + (-0.0311995912562)*x[0] + (-0.829241085657)*x[1]**o + (0.758611416542)*x[1]
        ref[(1, 2, 0, 2)]=0.609340507817*x_ref[0]**o + (-0.0311995912562)*x_ref[0] + (-0.829241085657)*x_ref[1]**o + (0.758611416542)*x_ref[1]
        arg[(1, 2, 0, 3)]=-0.289245474398*x[0]**o + (-0.541315724289)*x[0] + (-0.710860952064)*x[1]**o + (-0.404984835448)*x[1]
        ref[(1, 2, 0, 3)]=-0.289245474398*x_ref[0]**o + (-0.541315724289)*x_ref[0] + (-0.710860952064)*x_ref[1]**o + (-0.404984835448)*x_ref[1]
        arg[(1, 2, 1, 0)]=-0.0772940871136*x[0]**o + (-0.548305963525)*x[0] + (-0.671256308402)*x[1]**o + (0.571176219933)*x[1]
        ref[(1, 2, 1, 0)]=-0.0772940871136*x_ref[0]**o + (-0.548305963525)*x_ref[0] + (-0.671256308402)*x_ref[1]**o + (0.571176219933)*x_ref[1]
        arg[(1, 2, 1, 1)]=0.668086350572*x[0]**o + (-0.469397354079)*x[0] + (-0.928943755899)*x[1]**o + (-0.462861141588)*x[1]
        ref[(1, 2, 1, 1)]=0.668086350572*x_ref[0]**o + (-0.469397354079)*x_ref[0] + (-0.928943755899)*x_ref[1]**o + (-0.462861141588)*x_ref[1]
        arg[(1, 2, 1, 2)]=-0.744218311856*x[0]**o + (0.981657479346)*x[0] + (0.291621714158)*x[1]**o + (-0.107193830645)*x[1]
        ref[(1, 2, 1, 2)]=-0.744218311856*x_ref[0]**o + (0.981657479346)*x_ref[0] + (0.291621714158)*x_ref[1]**o + (-0.107193830645)*x_ref[1]
        arg[(1, 2, 1, 3)]=0.64365499714*x[0]**o + (0.506448376439)*x[0] + (0.0153721857471)*x[1]**o + (-0.742402732912)*x[1]
        ref[(1, 2, 1, 3)]=0.64365499714*x_ref[0]**o + (0.506448376439)*x_ref[0] + (0.0153721857471)*x_ref[1]**o + (-0.742402732912)*x_ref[1]
        arg[(1, 2, 2, 0)]=0.716428336966*x[0]**o + (0.401626023971)*x[0] + (-0.494639430928)*x[1]**o + (-0.879253959723)*x[1]
        ref[(1, 2, 2, 0)]=0.716428336966*x_ref[0]**o + (0.401626023971)*x_ref[0] + (-0.494639430928)*x_ref[1]**o + (-0.879253959723)*x_ref[1]
        arg[(1, 2, 2, 1)]=0.977841980557*x[0]**o + (0.537720495152)*x[0] + (0.967854035227)*x[1]**o + (-0.404107741554)*x[1]
        ref[(1, 2, 2, 1)]=0.977841980557*x_ref[0]**o + (0.537720495152)*x_ref[0] + (0.967854035227)*x_ref[1]**o + (-0.404107741554)*x_ref[1]
        arg[(1, 2, 2, 2)]=-0.855738288559*x[0]**o + (0.36568964913)*x[0] + (0.00579524688075)*x[1]**o + (0.213669648021)*x[1]
        ref[(1, 2, 2, 2)]=-0.855738288559*x_ref[0]**o + (0.36568964913)*x_ref[0] + (0.00579524688075)*x_ref[1]**o + (0.213669648021)*x_ref[1]
        arg[(1, 2, 2, 3)]=-0.00859358993073*x[0]**o + (-0.144838214496)*x[0] + (0.606664046129)*x[1]**o + (-0.0665802020909)*x[1]
        ref[(1, 2, 2, 3)]=-0.00859358993073*x_ref[0]**o + (-0.144838214496)*x_ref[0] + (0.606664046129)*x_ref[1]**o + (-0.0665802020909)*x_ref[1]
        arg[(1, 2, 3, 0)]=0.436099001557*x[0]**o + (-0.99010185342)*x[0] + (0.0931532549611)*x[1]**o + (-0.427125974397)*x[1]
        ref[(1, 2, 3, 0)]=0.436099001557*x_ref[0]**o + (-0.99010185342)*x_ref[0] + (0.0931532549611)*x_ref[1]**o + (-0.427125974397)*x_ref[1]
        arg[(1, 2, 3, 1)]=0.945226251807*x[0]**o + (-0.991340616301)*x[0] + (0.156055139402)*x[1]**o + (-0.138511163979)*x[1]
        ref[(1, 2, 3, 1)]=0.945226251807*x_ref[0]**o + (-0.991340616301)*x_ref[0] + (0.156055139402)*x_ref[1]**o + (-0.138511163979)*x_ref[1]
        arg[(1, 2, 3, 2)]=0.294489125715*x[0]**o + (-0.891810607918)*x[0] + (0.291198545684)*x[1]**o + (0.487681032445)*x[1]
        ref[(1, 2, 3, 2)]=0.294489125715*x_ref[0]**o + (-0.891810607918)*x_ref[0] + (0.291198545684)*x_ref[1]**o + (0.487681032445)*x_ref[1]
        arg[(1, 2, 3, 3)]=-0.2094061864*x[0]**o + (-0.497288356817)*x[0] + (0.351580022175)*x[1]**o + (-0.568196624681)*x[1]
        ref[(1, 2, 3, 3)]=-0.2094061864*x_ref[0]**o + (-0.497288356817)*x_ref[0] + (0.351580022175)*x_ref[1]**o + (-0.568196624681)*x_ref[1]
        arg[(1, 3, 0, 0)]=0.151292782351*x[0]**o + (-0.526954967077)*x[0] + (0.163378266778)*x[1]**o + (-0.259660473574)*x[1]
        ref[(1, 3, 0, 0)]=0.151292782351*x_ref[0]**o + (-0.526954967077)*x_ref[0] + (0.163378266778)*x_ref[1]**o + (-0.259660473574)*x_ref[1]
        arg[(1, 3, 0, 1)]=0.117030359252*x[0]**o + (0.939660458381)*x[0] + (-0.322396553243)*x[1]**o + (-0.492216558799)*x[1]
        ref[(1, 3, 0, 1)]=0.117030359252*x_ref[0]**o + (0.939660458381)*x_ref[0] + (-0.322396553243)*x_ref[1]**o + (-0.492216558799)*x_ref[1]
        arg[(1, 3, 0, 2)]=0.959804233925*x[0]**o + (-0.205278919714)*x[0] + (0.798420010316)*x[1]**o + (-0.951517576277)*x[1]
        ref[(1, 3, 0, 2)]=0.959804233925*x_ref[0]**o + (-0.205278919714)*x_ref[0] + (0.798420010316)*x_ref[1]**o + (-0.951517576277)*x_ref[1]
        arg[(1, 3, 0, 3)]=-0.739862803281*x[0]**o + (-0.802955065805)*x[0] + (0.490989208623)*x[1]**o + (-0.35092205639)*x[1]
        ref[(1, 3, 0, 3)]=-0.739862803281*x_ref[0]**o + (-0.802955065805)*x_ref[0] + (0.490989208623)*x_ref[1]**o + (-0.35092205639)*x_ref[1]
        arg[(1, 3, 1, 0)]=-0.324041800705*x[0]**o + (0.86773907508)*x[0] + (-0.293705237271)*x[1]**o + (0.849217230594)*x[1]
        ref[(1, 3, 1, 0)]=-0.324041800705*x_ref[0]**o + (0.86773907508)*x_ref[0] + (-0.293705237271)*x_ref[1]**o + (0.849217230594)*x_ref[1]
        arg[(1, 3, 1, 1)]=0.00957380959786*x[0]**o + (0.387257272664)*x[0] + (0.699514133474)*x[1]**o + (-0.574248531301)*x[1]
        ref[(1, 3, 1, 1)]=0.00957380959786*x_ref[0]**o + (0.387257272664)*x_ref[0] + (0.699514133474)*x_ref[1]**o + (-0.574248531301)*x_ref[1]
        arg[(1, 3, 1, 2)]=-0.240769752394*x[0]**o + (0.786367445948)*x[0] + (0.571337349813)*x[1]**o + (-0.770703576378)*x[1]
        ref[(1, 3, 1, 2)]=-0.240769752394*x_ref[0]**o + (0.786367445948)*x_ref[0] + (0.571337349813)*x_ref[1]**o + (-0.770703576378)*x_ref[1]
        arg[(1, 3, 1, 3)]=0.226686721203*x[0]**o + (0.356915917428)*x[0] + (-0.716917089127)*x[1]**o + (0.382751438075)*x[1]
        ref[(1, 3, 1, 3)]=0.226686721203*x_ref[0]**o + (0.356915917428)*x_ref[0] + (-0.716917089127)*x_ref[1]**o + (0.382751438075)*x_ref[1]
        arg[(1, 3, 2, 0)]=-0.446427484109*x[0]**o + (-0.971198701881)*x[0] + (-0.908182593601)*x[1]**o + (-0.218742458414)*x[1]
        ref[(1, 3, 2, 0)]=-0.446427484109*x_ref[0]**o + (-0.971198701881)*x_ref[0] + (-0.908182593601)*x_ref[1]**o + (-0.218742458414)*x_ref[1]
        arg[(1, 3, 2, 1)]=0.39791650181*x[0]**o + (-0.753043881006)*x[0] + (-0.0163374980927)*x[1]**o + (-0.184583069918)*x[1]
        ref[(1, 3, 2, 1)]=0.39791650181*x_ref[0]**o + (-0.753043881006)*x_ref[0] + (-0.0163374980927)*x_ref[1]**o + (-0.184583069918)*x_ref[1]
        arg[(1, 3, 2, 2)]=-0.621834663001*x[0]**o + (0.978120095896)*x[0] + (-0.739525686376)*x[1]**o + (0.049081502497)*x[1]
        ref[(1, 3, 2, 2)]=-0.621834663001*x_ref[0]**o + (0.978120095896)*x_ref[0] + (-0.739525686376)*x_ref[1]**o + (0.049081502497)*x_ref[1]
        arg[(1, 3, 2, 3)]=-0.585887715107*x[0]**o + (0.290263427246)*x[0] + (-0.3788762965)*x[1]**o + (0.364817601611)*x[1]
        ref[(1, 3, 2, 3)]=-0.585887715107*x_ref[0]**o + (0.290263427246)*x_ref[0] + (-0.3788762965)*x_ref[1]**o + (0.364817601611)*x_ref[1]
        arg[(1, 3, 3, 0)]=-0.119788946383*x[0]**o + (-0.817257149499)*x[0] + (-0.0065409250288)*x[1]**o + (-0.269708354698)*x[1]
        ref[(1, 3, 3, 0)]=-0.119788946383*x_ref[0]**o + (-0.817257149499)*x_ref[0] + (-0.0065409250288)*x_ref[1]**o + (-0.269708354698)*x_ref[1]
        arg[(1, 3, 3, 1)]=0.410078853495*x[0]**o + (-0.345902363119)*x[0] + (0.665995425929)*x[1]**o + (-0.491137670173)*x[1]
        ref[(1, 3, 3, 1)]=0.410078853495*x_ref[0]**o + (-0.345902363119)*x_ref[0] + (0.665995425929)*x_ref[1]**o + (-0.491137670173)*x_ref[1]
        arg[(1, 3, 3, 2)]=-0.024275853602*x[0]**o + (0.0131847117437)*x[0] + (-0.652517222087)*x[1]**o + (0.0243256312635)*x[1]
        ref[(1, 3, 3, 2)]=-0.024275853602*x_ref[0]**o + (0.0131847117437)*x_ref[0] + (-0.652517222087)*x_ref[1]**o + (0.0243256312635)*x_ref[1]
        arg[(1, 3, 3, 3)]=0.0334889683804*x[0]**o + (-0.561337026076)*x[0] + (0.737104172172)*x[1]**o + (0.491612627019)*x[1]
        ref[(1, 3, 3, 3)]=0.0334889683804*x_ref[0]**o + (-0.561337026076)*x_ref[0] + (0.737104172172)*x_ref[1]**o + (0.491612627019)*x_ref[1]
        if dim==3:
            arg[(0, 0, 0, 0)]+=-0.354822360839*x[2]**o + (-0.28204262433)*x[2]
            ref[(0, 0, 0, 0)]+=-0.354822360839*x_ref[2]**o + (-0.28204262433)*x_ref[2]
            arg[(0, 0, 0, 1)]+=-0.182476333361*x[2]**o + (-0.537346236239)*x[2]
            ref[(0, 0, 0, 1)]+=-0.182476333361*x_ref[2]**o + (-0.537346236239)*x_ref[2]
            arg[(0, 0, 0, 2)]+=0.841939059087*x[2]**o + (0.317587393818)*x[2]
            ref[(0, 0, 0, 2)]+=0.841939059087*x_ref[2]**o + (0.317587393818)*x_ref[2]
            arg[(0, 0, 0, 3)]+=0.910820406551*x[2]**o + (-0.941482792514)*x[2]
            ref[(0, 0, 0, 3)]+=0.910820406551*x_ref[2]**o + (-0.941482792514)*x_ref[2]
            arg[(0, 0, 1, 0)]+=-0.963681593143*x[2]**o + (0.615561929929)*x[2]
            ref[(0, 0, 1, 0)]+=-0.963681593143*x_ref[2]**o + (0.615561929929)*x_ref[2]
            arg[(0, 0, 1, 1)]+=0.661274860699*x[2]**o + (0.114192240575)*x[2]
            ref[(0, 0, 1, 1)]+=0.661274860699*x_ref[2]**o + (0.114192240575)*x_ref[2]
            arg[(0, 0, 1, 2)]+=-0.285266600351*x[2]**o + (0.0513472948633)*x[2]
            ref[(0, 0, 1, 2)]+=-0.285266600351*x_ref[2]**o + (0.0513472948633)*x_ref[2]
            arg[(0, 0, 1, 3)]+=-0.168437711912*x[2]**o + (-0.155403453723)*x[2]
            ref[(0, 0, 1, 3)]+=-0.168437711912*x_ref[2]**o + (-0.155403453723)*x_ref[2]
            arg[(0, 0, 2, 0)]+=0.0625105501581*x[2]**o + (0.267553944644)*x[2]
            ref[(0, 0, 2, 0)]+=0.0625105501581*x_ref[2]**o + (0.267553944644)*x_ref[2]
            arg[(0, 0, 2, 1)]+=0.578951657569*x[2]**o + (0.598663072206)*x[2]
            ref[(0, 0, 2, 1)]+=0.578951657569*x_ref[2]**o + (0.598663072206)*x_ref[2]
            arg[(0, 0, 2, 2)]+=-0.669120063902*x[2]**o + (-0.860720322425)*x[2]
            ref[(0, 0, 2, 2)]+=-0.669120063902*x_ref[2]**o + (-0.860720322425)*x_ref[2]
            arg[(0, 0, 2, 3)]+=-0.524353448793*x[2]**o + (0.309196229856)*x[2]
            ref[(0, 0, 2, 3)]+=-0.524353448793*x_ref[2]**o + (0.309196229856)*x_ref[2]
            arg[(0, 0, 3, 0)]+=0.795335854754*x[2]**o + (-0.0359625315779)*x[2]
            ref[(0, 0, 3, 0)]+=0.795335854754*x_ref[2]**o + (-0.0359625315779)*x_ref[2]
            arg[(0, 0, 3, 1)]+=0.997695946248*x[2]**o + (0.933178508467)*x[2]
            ref[(0, 0, 3, 1)]+=0.997695946248*x_ref[2]**o + (0.933178508467)*x_ref[2]
            arg[(0, 0, 3, 2)]+=0.0996068814032*x[2]**o + (-0.324966394492)*x[2]
            ref[(0, 0, 3, 2)]+=0.0996068814032*x_ref[2]**o + (-0.324966394492)*x_ref[2]
            arg[(0, 0, 3, 3)]+=-0.840240895729*x[2]**o + (-0.56300077064)*x[2]
            ref[(0, 0, 3, 3)]+=-0.840240895729*x_ref[2]**o + (-0.56300077064)*x_ref[2]
            arg[(0, 1, 0, 0)]+=-0.625926893898*x[2]**o + (0.667822700303)*x[2]
            ref[(0, 1, 0, 0)]+=-0.625926893898*x_ref[2]**o + (0.667822700303)*x_ref[2]
            arg[(0, 1, 0, 1)]+=-0.29543141481*x[2]**o + (0.663604778195)*x[2]
            ref[(0, 1, 0, 1)]+=-0.29543141481*x_ref[2]**o + (0.663604778195)*x_ref[2]
            arg[(0, 1, 0, 2)]+=0.264324916027*x[2]**o + (0.988930734328)*x[2]
            ref[(0, 1, 0, 2)]+=0.264324916027*x_ref[2]**o + (0.988930734328)*x_ref[2]
            arg[(0, 1, 0, 3)]+=-0.0675078846211*x[2]**o + (-0.43215909653)*x[2]
            ref[(0, 1, 0, 3)]+=-0.0675078846211*x_ref[2]**o + (-0.43215909653)*x_ref[2]
            arg[(0, 1, 1, 0)]+=0.408785342499*x[2]**o + (-0.675605557157)*x[2]
            ref[(0, 1, 1, 0)]+=0.408785342499*x_ref[2]**o + (-0.675605557157)*x_ref[2]
            arg[(0, 1, 1, 1)]+=0.923826524352*x[2]**o + (-0.986749959981)*x[2]
            ref[(0, 1, 1, 1)]+=0.923826524352*x_ref[2]**o + (-0.986749959981)*x_ref[2]
            arg[(0, 1, 1, 2)]+=0.817288789237*x[2]**o + (-0.678627231865)*x[2]
            ref[(0, 1, 1, 2)]+=0.817288789237*x_ref[2]**o + (-0.678627231865)*x_ref[2]
            arg[(0, 1, 1, 3)]+=-0.954479742428*x[2]**o + (0.160376795692)*x[2]
            ref[(0, 1, 1, 3)]+=-0.954479742428*x_ref[2]**o + (0.160376795692)*x_ref[2]
            arg[(0, 1, 2, 0)]+=0.656012904378*x[2]**o + (-0.59342229801)*x[2]
            ref[(0, 1, 2, 0)]+=0.656012904378*x_ref[2]**o + (-0.59342229801)*x_ref[2]
            arg[(0, 1, 2, 1)]+=-0.175926232565*x[2]**o + (0.115082810971)*x[2]
            ref[(0, 1, 2, 1)]+=-0.175926232565*x_ref[2]**o + (0.115082810971)*x_ref[2]
            arg[(0, 1, 2, 2)]+=0.369959329587*x[2]**o + (-0.676460244659)*x[2]
            ref[(0, 1, 2, 2)]+=0.369959329587*x_ref[2]**o + (-0.676460244659)*x_ref[2]
            arg[(0, 1, 2, 3)]+=0.695779058585*x[2]**o + (0.921248181488)*x[2]
            ref[(0, 1, 2, 3)]+=0.695779058585*x_ref[2]**o + (0.921248181488)*x_ref[2]
            arg[(0, 1, 3, 0)]+=-0.506337145528*x[2]**o + (0.8446425121)*x[2]
            ref[(0, 1, 3, 0)]+=-0.506337145528*x_ref[2]**o + (0.8446425121)*x_ref[2]
            arg[(0, 1, 3, 1)]+=-0.177479644972*x[2]**o + (-0.235617459289)*x[2]
            ref[(0, 1, 3, 1)]+=-0.177479644972*x_ref[2]**o + (-0.235617459289)*x_ref[2]
            arg[(0, 1, 3, 2)]+=0.0379297579754*x[2]**o + (-0.968020376281)*x[2]
            ref[(0, 1, 3, 2)]+=0.0379297579754*x_ref[2]**o + (-0.968020376281)*x_ref[2]
            arg[(0, 1, 3, 3)]+=0.291089965807*x[2]**o + (0.33551424709)*x[2]
            ref[(0, 1, 3, 3)]+=0.291089965807*x_ref[2]**o + (0.33551424709)*x_ref[2]
            arg[(0, 2, 0, 0)]+=-0.619739021212*x[2]**o + (-0.897793192975)*x[2]
            ref[(0, 2, 0, 0)]+=-0.619739021212*x_ref[2]**o + (-0.897793192975)*x_ref[2]
            arg[(0, 2, 0, 1)]+=0.134305097671*x[2]**o + (0.100248871685)*x[2]
            ref[(0, 2, 0, 1)]+=0.134305097671*x_ref[2]**o + (0.100248871685)*x_ref[2]
            arg[(0, 2, 0, 2)]+=0.671700901348*x[2]**o + (-0.758952117952)*x[2]
            ref[(0, 2, 0, 2)]+=0.671700901348*x_ref[2]**o + (-0.758952117952)*x_ref[2]
            arg[(0, 2, 0, 3)]+=0.56107003303*x[2]**o + (0.995813429786)*x[2]
            ref[(0, 2, 0, 3)]+=0.56107003303*x_ref[2]**o + (0.995813429786)*x_ref[2]
            arg[(0, 2, 1, 0)]+=0.437483053132*x[2]**o + (-0.882156170862)*x[2]
            ref[(0, 2, 1, 0)]+=0.437483053132*x_ref[2]**o + (-0.882156170862)*x_ref[2]
            arg[(0, 2, 1, 1)]+=-0.654544196118*x[2]**o + (-0.998650048858)*x[2]
            ref[(0, 2, 1, 1)]+=-0.654544196118*x_ref[2]**o + (-0.998650048858)*x_ref[2]
            arg[(0, 2, 1, 2)]+=-0.8385652258*x[2]**o + (-0.0893285610414)*x[2]
            ref[(0, 2, 1, 2)]+=-0.8385652258*x_ref[2]**o + (-0.0893285610414)*x_ref[2]
            arg[(0, 2, 1, 3)]+=0.288594828994*x[2]**o + (0.089123754379)*x[2]
            ref[(0, 2, 1, 3)]+=0.288594828994*x_ref[2]**o + (0.089123754379)*x_ref[2]
            arg[(0, 2, 2, 0)]+=0.318601022281*x[2]**o + (-0.885808339742)*x[2]
            ref[(0, 2, 2, 0)]+=0.318601022281*x_ref[2]**o + (-0.885808339742)*x_ref[2]
            arg[(0, 2, 2, 1)]+=0.62990457089*x[2]**o + (0.198078150959)*x[2]
            ref[(0, 2, 2, 1)]+=0.62990457089*x_ref[2]**o + (0.198078150959)*x_ref[2]
            arg[(0, 2, 2, 2)]+=0.511313181006*x[2]**o + (0.334240990633)*x[2]
            ref[(0, 2, 2, 2)]+=0.511313181006*x_ref[2]**o + (0.334240990633)*x_ref[2]
            arg[(0, 2, 2, 3)]+=0.465458952102*x[2]**o + (-0.203624573287)*x[2]
            ref[(0, 2, 2, 3)]+=0.465458952102*x_ref[2]**o + (-0.203624573287)*x_ref[2]
            arg[(0, 2, 3, 0)]+=0.837755044737*x[2]**o + (0.565425117059)*x[2]
            ref[(0, 2, 3, 0)]+=0.837755044737*x_ref[2]**o + (0.565425117059)*x_ref[2]
            arg[(0, 2, 3, 1)]+=-0.0280806172415*x[2]**o + (0.626585709309)*x[2]
            ref[(0, 2, 3, 1)]+=-0.0280806172415*x_ref[2]**o + (0.626585709309)*x_ref[2]
            arg[(0, 2, 3, 2)]+=0.752680834862*x[2]**o + (0.126063857601)*x[2]
            ref[(0, 2, 3, 2)]+=0.752680834862*x_ref[2]**o + (0.126063857601)*x_ref[2]
            arg[(0, 2, 3, 3)]+=-0.655731040889*x[2]**o + (0.69091862546)*x[2]
            ref[(0, 2, 3, 3)]+=-0.655731040889*x_ref[2]**o + (0.69091862546)*x_ref[2]
            arg[(0, 3, 0, 0)]+=0.416154700882*x[2]**o + (0.33686390172)*x[2]
            ref[(0, 3, 0, 0)]+=0.416154700882*x_ref[2]**o + (0.33686390172)*x_ref[2]
            arg[(0, 3, 0, 1)]+=0.825379774034*x[2]**o + (0.743416672614)*x[2]
            ref[(0, 3, 0, 1)]+=0.825379774034*x_ref[2]**o + (0.743416672614)*x_ref[2]
            arg[(0, 3, 0, 2)]+=0.416807706665*x[2]**o + (0.726525511782)*x[2]
            ref[(0, 3, 0, 2)]+=0.416807706665*x_ref[2]**o + (0.726525511782)*x_ref[2]
            arg[(0, 3, 0, 3)]+=0.394856138284*x[2]**o + (0.50556548156)*x[2]
            ref[(0, 3, 0, 3)]+=0.394856138284*x_ref[2]**o + (0.50556548156)*x_ref[2]
            arg[(0, 3, 1, 0)]+=-0.928303631104*x[2]**o + (-0.00761365757309)*x[2]
            ref[(0, 3, 1, 0)]+=-0.928303631104*x_ref[2]**o + (-0.00761365757309)*x_ref[2]
            arg[(0, 3, 1, 1)]+=0.530638644525*x[2]**o + (-0.777735497666)*x[2]
            ref[(0, 3, 1, 1)]+=0.530638644525*x_ref[2]**o + (-0.777735497666)*x_ref[2]
            arg[(0, 3, 1, 2)]+=0.2426879138*x[2]**o + (-0.843376336373)*x[2]
            ref[(0, 3, 1, 2)]+=0.2426879138*x_ref[2]**o + (-0.843376336373)*x_ref[2]
            arg[(0, 3, 1, 3)]+=0.61407151696*x[2]**o + (-0.994096889838)*x[2]
            ref[(0, 3, 1, 3)]+=0.61407151696*x_ref[2]**o + (-0.994096889838)*x_ref[2]
            arg[(0, 3, 2, 0)]+=0.568438357355*x[2]**o + (0.640296862781)*x[2]
            ref[(0, 3, 2, 0)]+=0.568438357355*x_ref[2]**o + (0.640296862781)*x_ref[2]
            arg[(0, 3, 2, 1)]+=-0.296056680035*x[2]**o + (-0.792613403206)*x[2]
            ref[(0, 3, 2, 1)]+=-0.296056680035*x_ref[2]**o + (-0.792613403206)*x_ref[2]
            arg[(0, 3, 2, 2)]+=-0.234144317411*x[2]**o + (0.900139863039)*x[2]
            ref[(0, 3, 2, 2)]+=-0.234144317411*x_ref[2]**o + (0.900139863039)*x_ref[2]
            arg[(0, 3, 2, 3)]+=-0.288597090039*x[2]**o + (0.277689927419)*x[2]
            ref[(0, 3, 2, 3)]+=-0.288597090039*x_ref[2]**o + (0.277689927419)*x_ref[2]
            arg[(0, 3, 3, 0)]+=-0.269464171345*x[2]**o + (0.595402760877)*x[2]
            ref[(0, 3, 3, 0)]+=-0.269464171345*x_ref[2]**o + (0.595402760877)*x_ref[2]
            arg[(0, 3, 3, 1)]+=0.342209539036*x[2]**o + (0.910922456263)*x[2]
            ref[(0, 3, 3, 1)]+=0.342209539036*x_ref[2]**o + (0.910922456263)*x_ref[2]
            arg[(0, 3, 3, 2)]+=-0.201084629317*x[2]**o + (0.989292788637)*x[2]
            ref[(0, 3, 3, 2)]+=-0.201084629317*x_ref[2]**o + (0.989292788637)*x_ref[2]
            arg[(0, 3, 3, 3)]+=0.307720069024*x[2]**o + (0.503038760841)*x[2]
            ref[(0, 3, 3, 3)]+=0.307720069024*x_ref[2]**o + (0.503038760841)*x_ref[2]
            arg[(1, 0, 0, 0)]+=-0.670380459056*x[2]**o + (0.724212590758)*x[2]
            ref[(1, 0, 0, 0)]+=-0.670380459056*x_ref[2]**o + (0.724212590758)*x_ref[2]
            arg[(1, 0, 0, 1)]+=0.559242335518*x[2]**o + (0.0149938181344)*x[2]
            ref[(1, 0, 0, 1)]+=0.559242335518*x_ref[2]**o + (0.0149938181344)*x_ref[2]
            arg[(1, 0, 0, 2)]+=-0.264925985939*x[2]**o + (-0.151349803799)*x[2]
            ref[(1, 0, 0, 2)]+=-0.264925985939*x_ref[2]**o + (-0.151349803799)*x_ref[2]
            arg[(1, 0, 0, 3)]+=0.388537966573*x[2]**o + (0.625858552279)*x[2]
            ref[(1, 0, 0, 3)]+=0.388537966573*x_ref[2]**o + (0.625858552279)*x_ref[2]
            arg[(1, 0, 1, 0)]+=-0.559907679414*x[2]**o + (0.223109116527)*x[2]
            ref[(1, 0, 1, 0)]+=-0.559907679414*x_ref[2]**o + (0.223109116527)*x_ref[2]
            arg[(1, 0, 1, 1)]+=-0.558249132963*x[2]**o + (-0.168527578981)*x[2]
            ref[(1, 0, 1, 1)]+=-0.558249132963*x_ref[2]**o + (-0.168527578981)*x_ref[2]
            arg[(1, 0, 1, 2)]+=0.67265618843*x[2]**o + (0.45750077565)*x[2]
            ref[(1, 0, 1, 2)]+=0.67265618843*x_ref[2]**o + (0.45750077565)*x_ref[2]
            arg[(1, 0, 1, 3)]+=-0.0942928911615*x[2]**o + (0.665703271464)*x[2]
            ref[(1, 0, 1, 3)]+=-0.0942928911615*x_ref[2]**o + (0.665703271464)*x_ref[2]
            arg[(1, 0, 2, 0)]+=-0.902434599709*x[2]**o + (-0.536665137693)*x[2]
            ref[(1, 0, 2, 0)]+=-0.902434599709*x_ref[2]**o + (-0.536665137693)*x_ref[2]
            arg[(1, 0, 2, 1)]+=0.667787493949*x[2]**o + (-0.274846790208)*x[2]
            ref[(1, 0, 2, 1)]+=0.667787493949*x_ref[2]**o + (-0.274846790208)*x_ref[2]
            arg[(1, 0, 2, 2)]+=0.0529521031859*x[2]**o + (0.845950112087)*x[2]
            ref[(1, 0, 2, 2)]+=0.0529521031859*x_ref[2]**o + (0.845950112087)*x_ref[2]
            arg[(1, 0, 2, 3)]+=0.535214349781*x[2]**o + (-0.38377023811)*x[2]
            ref[(1, 0, 2, 3)]+=0.535214349781*x_ref[2]**o + (-0.38377023811)*x_ref[2]
            arg[(1, 0, 3, 0)]+=-0.06319335443*x[2]**o + (0.49879011801)*x[2]
            ref[(1, 0, 3, 0)]+=-0.06319335443*x_ref[2]**o + (0.49879011801)*x_ref[2]
            arg[(1, 0, 3, 1)]+=-0.156501811688*x[2]**o + (-0.46054594725)*x[2]
            ref[(1, 0, 3, 1)]+=-0.156501811688*x_ref[2]**o + (-0.46054594725)*x_ref[2]
            arg[(1, 0, 3, 2)]+=-0.636168944901*x[2]**o + (0.0725632198102)*x[2]
            ref[(1, 0, 3, 2)]+=-0.636168944901*x_ref[2]**o + (0.0725632198102)*x_ref[2]
            arg[(1, 0, 3, 3)]+=0.524829067931*x[2]**o + (0.488181992449)*x[2]
            ref[(1, 0, 3, 3)]+=0.524829067931*x_ref[2]**o + (0.488181992449)*x_ref[2]
            arg[(1, 1, 0, 0)]+=0.158720091548*x[2]**o + (0.232813379021)*x[2]
            ref[(1, 1, 0, 0)]+=0.158720091548*x_ref[2]**o + (0.232813379021)*x_ref[2]
            arg[(1, 1, 0, 1)]+=0.190327108713*x[2]**o + (-0.165984659579)*x[2]
            ref[(1, 1, 0, 1)]+=0.190327108713*x_ref[2]**o + (-0.165984659579)*x_ref[2]
            arg[(1, 1, 0, 2)]+=-0.104754994212*x[2]**o + (-0.0768706765056)*x[2]
            ref[(1, 1, 0, 2)]+=-0.104754994212*x_ref[2]**o + (-0.0768706765056)*x_ref[2]
            arg[(1, 1, 0, 3)]+=0.143222234196*x[2]**o + (-0.713416306767)*x[2]
            ref[(1, 1, 0, 3)]+=0.143222234196*x_ref[2]**o + (-0.713416306767)*x_ref[2]
            arg[(1, 1, 1, 0)]+=0.768727881317*x[2]**o + (0.870181669389)*x[2]
            ref[(1, 1, 1, 0)]+=0.768727881317*x_ref[2]**o + (0.870181669389)*x_ref[2]
            arg[(1, 1, 1, 1)]+=0.92722384995*x[2]**o + (-0.819861222461)*x[2]
            ref[(1, 1, 1, 1)]+=0.92722384995*x_ref[2]**o + (-0.819861222461)*x_ref[2]
            arg[(1, 1, 1, 2)]+=0.94319100388*x[2]**o + (-0.333876462713)*x[2]
            ref[(1, 1, 1, 2)]+=0.94319100388*x_ref[2]**o + (-0.333876462713)*x_ref[2]
            arg[(1, 1, 1, 3)]+=0.0833783599583*x[2]**o + (0.960185242701)*x[2]
            ref[(1, 1, 1, 3)]+=0.0833783599583*x_ref[2]**o + (0.960185242701)*x_ref[2]
            arg[(1, 1, 2, 0)]+=0.237349431522*x[2]**o + (-0.599854378813)*x[2]
            ref[(1, 1, 2, 0)]+=0.237349431522*x_ref[2]**o + (-0.599854378813)*x_ref[2]
            arg[(1, 1, 2, 1)]+=0.953911243011*x[2]**o + (0.335621783673)*x[2]
            ref[(1, 1, 2, 1)]+=0.953911243011*x_ref[2]**o + (0.335621783673)*x_ref[2]
            arg[(1, 1, 2, 2)]+=0.59348562858*x[2]**o + (-0.135498610249)*x[2]
            ref[(1, 1, 2, 2)]+=0.59348562858*x_ref[2]**o + (-0.135498610249)*x_ref[2]
            arg[(1, 1, 2, 3)]+=-0.92229832495*x[2]**o + (-0.125912815555)*x[2]
            ref[(1, 1, 2, 3)]+=-0.92229832495*x_ref[2]**o + (-0.125912815555)*x_ref[2]
            arg[(1, 1, 3, 0)]+=-0.623230055104*x[2]**o + (0.763268241175)*x[2]
            ref[(1, 1, 3, 0)]+=-0.623230055104*x_ref[2]**o + (0.763268241175)*x_ref[2]
            arg[(1, 1, 3, 1)]+=-0.236278482249*x[2]**o + (0.58596286819)*x[2]
            ref[(1, 1, 3, 1)]+=-0.236278482249*x_ref[2]**o + (0.58596286819)*x_ref[2]
            arg[(1, 1, 3, 2)]+=-0.975478027389*x[2]**o + (-0.45010522421)*x[2]
            ref[(1, 1, 3, 2)]+=-0.975478027389*x_ref[2]**o + (-0.45010522421)*x_ref[2]
            arg[(1, 1, 3, 3)]+=0.735688118742*x[2]**o + (0.803054730677)*x[2]
            ref[(1, 1, 3, 3)]+=0.735688118742*x_ref[2]**o + (0.803054730677)*x_ref[2]
            arg[(1, 2, 0, 0)]+=-0.0752871630694*x[2]**o + (0.0876727207136)*x[2]
            ref[(1, 2, 0, 0)]+=-0.0752871630694*x_ref[2]**o + (0.0876727207136)*x_ref[2]
            arg[(1, 2, 0, 1)]+=-0.310188806749*x[2]**o + (-0.467093025979)*x[2]
            ref[(1, 2, 0, 1)]+=-0.310188806749*x_ref[2]**o + (-0.467093025979)*x_ref[2]
            arg[(1, 2, 0, 2)]+=-0.316331554841*x[2]**o + (0.376531026852)*x[2]
            ref[(1, 2, 0, 2)]+=-0.316331554841*x_ref[2]**o + (0.376531026852)*x_ref[2]
            arg[(1, 2, 0, 3)]+=0.443507290032*x[2]**o + (0.260533251216)*x[2]
            ref[(1, 2, 0, 3)]+=0.443507290032*x_ref[2]**o + (0.260533251216)*x_ref[2]
            arg[(1, 2, 1, 0)]+=0.497031604686*x[2]**o + (0.536108363607)*x[2]
            ref[(1, 2, 1, 0)]+=0.497031604686*x_ref[2]**o + (0.536108363607)*x_ref[2]
            arg[(1, 2, 1, 1)]+=0.802656768783*x[2]**o + (-0.513056286485)*x[2]
            ref[(1, 2, 1, 1)]+=0.802656768783*x_ref[2]**o + (-0.513056286485)*x_ref[2]
            arg[(1, 2, 1, 2)]+=0.197440607572*x[2]**o + (0.155077929009)*x[2]
            ref[(1, 2, 1, 2)]+=0.197440607572*x_ref[2]**o + (0.155077929009)*x_ref[2]
            arg[(1, 2, 1, 3)]+=0.91935289968*x[2]**o + (-0.995317199616)*x[2]
            ref[(1, 2, 1, 3)]+=0.91935289968*x_ref[2]**o + (-0.995317199616)*x_ref[2]
            arg[(1, 2, 2, 0)]+=-0.170874939872*x[2]**o + (0.563508633934)*x[2]
            ref[(1, 2, 2, 0)]+=-0.170874939872*x_ref[2]**o + (0.563508633934)*x_ref[2]
            arg[(1, 2, 2, 1)]+=0.532311157439*x[2]**o + (-0.900017368614)*x[2]
            ref[(1, 2, 2, 1)]+=0.532311157439*x_ref[2]**o + (-0.900017368614)*x_ref[2]
            arg[(1, 2, 2, 2)]+=-0.2530269203*x[2]**o + (0.733296855795)*x[2]
            ref[(1, 2, 2, 2)]+=-0.2530269203*x_ref[2]**o + (0.733296855795)*x_ref[2]
            arg[(1, 2, 2, 3)]+=-0.147673123503*x[2]**o + (-0.0391052342532)*x[2]
            ref[(1, 2, 2, 3)]+=-0.147673123503*x_ref[2]**o + (-0.0391052342532)*x_ref[2]
            arg[(1, 2, 3, 0)]+=-0.548810825906*x[2]**o + (-0.645422565578)*x[2]
            ref[(1, 2, 3, 0)]+=-0.548810825906*x_ref[2]**o + (-0.645422565578)*x_ref[2]
            arg[(1, 2, 3, 1)]+=0.00756914488622*x[2]**o + (-0.955503581222)*x[2]
            ref[(1, 2, 3, 1)]+=0.00756914488622*x_ref[2]**o + (-0.955503581222)*x_ref[2]
            arg[(1, 2, 3, 2)]+=-0.339680511022*x[2]**o + (0.36858287689)*x[2]
            ref[(1, 2, 3, 2)]+=-0.339680511022*x_ref[2]**o + (0.36858287689)*x_ref[2]
            arg[(1, 2, 3, 3)]+=-0.98436744662*x[2]**o + (-0.152905511429)*x[2]
            ref[(1, 2, 3, 3)]+=-0.98436744662*x_ref[2]**o + (-0.152905511429)*x_ref[2]
            arg[(1, 3, 0, 0)]+=-0.39055997147*x[2]**o + (0.701217545453)*x[2]
            ref[(1, 3, 0, 0)]+=-0.39055997147*x_ref[2]**o + (0.701217545453)*x_ref[2]
            arg[(1, 3, 0, 1)]+=0.68484848781*x[2]**o + (0.53322287774)*x[2]
            ref[(1, 3, 0, 1)]+=0.68484848781*x_ref[2]**o + (0.53322287774)*x_ref[2]
            arg[(1, 3, 0, 2)]+=-0.46815803374*x[2]**o + (0.147582254454)*x[2]
            ref[(1, 3, 0, 2)]+=-0.46815803374*x_ref[2]**o + (0.147582254454)*x_ref[2]
            arg[(1, 3, 0, 3)]+=-0.506594063071*x[2]**o + (-0.576198413014)*x[2]
            ref[(1, 3, 0, 3)]+=-0.506594063071*x_ref[2]**o + (-0.576198413014)*x_ref[2]
            arg[(1, 3, 1, 0)]+=0.865671107983*x[2]**o + (-0.680394776522)*x[2]
            ref[(1, 3, 1, 0)]+=0.865671107983*x_ref[2]**o + (-0.680394776522)*x_ref[2]
            arg[(1, 3, 1, 1)]+=0.136952800633*x[2]**o + (-0.930829194016)*x[2]
            ref[(1, 3, 1, 1)]+=0.136952800633*x_ref[2]**o + (-0.930829194016)*x_ref[2]
            arg[(1, 3, 1, 2)]+=0.0117021997808*x[2]**o + (0.369501523469)*x[2]
            ref[(1, 3, 1, 2)]+=0.0117021997808*x_ref[2]**o + (0.369501523469)*x_ref[2]
            arg[(1, 3, 1, 3)]+=-0.127483200153*x[2]**o + (-0.0132949685505)*x[2]
            ref[(1, 3, 1, 3)]+=-0.127483200153*x_ref[2]**o + (-0.0132949685505)*x_ref[2]
            arg[(1, 3, 2, 0)]+=0.583260707258*x[2]**o + (0.133481780386)*x[2]
            ref[(1, 3, 2, 0)]+=0.583260707258*x_ref[2]**o + (0.133481780386)*x_ref[2]
            arg[(1, 3, 2, 1)]+=-0.286717598836*x[2]**o + (0.651762055693)*x[2]
            ref[(1, 3, 2, 1)]+=-0.286717598836*x_ref[2]**o + (0.651762055693)*x_ref[2]
            arg[(1, 3, 2, 2)]+=0.916724082161*x[2]**o + (-0.0968197813034)*x[2]
            ref[(1, 3, 2, 2)]+=0.916724082161*x_ref[2]**o + (-0.0968197813034)*x_ref[2]
            arg[(1, 3, 2, 3)]+=0.930789413831*x[2]**o + (0.254648320405)*x[2]
            ref[(1, 3, 2, 3)]+=0.930789413831*x_ref[2]**o + (0.254648320405)*x_ref[2]
            arg[(1, 3, 3, 0)]+=-0.235770401371*x[2]**o + (-0.401153576338)*x[2]
            ref[(1, 3, 3, 0)]+=-0.235770401371*x_ref[2]**o + (-0.401153576338)*x_ref[2]
            arg[(1, 3, 3, 1)]+=-0.408964789689*x[2]**o + (0.922706127051)*x[2]
            ref[(1, 3, 3, 1)]+=-0.408964789689*x_ref[2]**o + (0.922706127051)*x_ref[2]
            arg[(1, 3, 3, 2)]+=-0.967090953117*x[2]**o + (-0.870668225578)*x[2]
            ref[(1, 3, 3, 2)]+=-0.967090953117*x_ref[2]**o + (-0.870668225578)*x_ref[2]
            arg[(1, 3, 3, 3)]+=0.624076645106*x[2]**o + (-0.142708755695)*x[2]
            ref[(1, 3, 3, 3)]+=0.624076645106*x_ref[2]**o + (-0.142708755695)*x_ref[2]
        res=interpolate(arg, where=w_ref)
        self.assertTrue(isinstance(res,Data),'wrong type of result.')
        self.assertEqual(res.getFunctionSpace(),w_ref,'wrong function space of result.')
        self.assertEqual(res.getShape(), (2, 4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

class Test_Util_Point_Data_Interpolation(unittest.TestCase):
    def test_point_data_interpolation(self):
        data=Scalar(0., DiracDeltaFunctions(self.domain))
        self.assertEqual(integrate(data),0.0,"point data")
        data.setTaggedValue("A1", 1.)
        self.assertEqual(integrate(data),1.0,"point data")
        data.setTaggedValue("A2", 1.)
        self.assertEqual(integrate(data),2.0,"point data")
        data.setTaggedValue("A3", 1.)
        self.assertEqual(integrate(data),3.0,"point data")
        data.setTaggedValue("A4", 1.)
        self.assertEqual(integrate(data),4.0,"point data")