/[escript]/trunk/ripley/src/Assemble_Gradient_3D.c
ViewVC logotype

Contents of /trunk/ripley/src/Assemble_Gradient_3D.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3542 - (show annotations)
Fri Jul 22 06:57:41 2011 UTC (7 years, 5 months ago) by gross
File MIME type: text/plain
File size: 82411 byte(s)
first attempts toward a multi grid solver
1 Ripley_Assemble_Gradient_3D(Ripley_Grid *grid, Escript in, Escript out)
2 {
3 /* GENERATOR SNIP TOP */
4 if (out_data_type==RIPLEY_ELEMENTS) {
5 const double tmp0_70 = -0.1/h2;
6 const double tmp0_52 = 0.056350832689629155741/h1;
7 const double tmp0_82 = 0.44364916731037084426/h2;
8 const double tmp0_1 = -0.1/h0;
9 const double tmp0_72 = 0.78729833462074168852/h2;
10 const double tmp0_49 = 0.25/h1;
11 const double tmp0_50 = -0.056350832689629155741/h1;
12 const double tmp0_3 = -0.012701665379258311482/h0;
13 const double tmp0_74 = -0.78729833462074168852/h2;
14 const double tmp0_39 = 0.44364916731037084426/h1;
15 const double tmp0_56 = -0.78729833462074168852/h1;
16 const double tmp0_76 = -0.012701665379258311482/h2;
17 const double tmp0_54 = -0.012701665379258311483/h1;
18 const double tmp0_78 = -0.25/h2;
19 const double tmp0_35 = 0.012701665379258311482/h1;
20 const double tmp0_41 = -0.012701665379258311482/h1;
21 const double tmp0_37 = -0.056350832689629155741/h1;
22 const double tmp0_28 = 0.012701665379258311482/h0;
23 const double tmp0_43 = 0.012701665379258311482/h1;
24 const double tmp0_31 = -0.1/h1;
25 const double tmp0_45 = 0.78729833462074168852/h1;
26 const double tmp0_33 = 0.1/h1;
27 const double tmp0_47 = 0.1/h1;
28 const double tmp0_22 = -0.44364916731037084426/h0;
29 const double tmp0_17 = 0.1/h0;
30 const double tmp0_20 = -0.056350832689629155741/h0;
31 const double tmp0_15 = 0.78729833462074168852/h0;
32 const double tmp0_26 = 0.1/h0;
33 const double tmp0_13 = -0.1/h0;
34 const double tmp0_24 = -0.012701665379258311483/h0;
35 const double tmp0_11 = -0.012701665379258311482/h0;
36 const double tmp0_89 = 0.78729833462074168852/h2;
37 const double tmp0_68 = 0.056350832689629155741/h2;
38 const double tmp0_8 = 0.056350832689629155741/h0;
39 const double tmp0_66 = -0.44364916731037084426/h2;
40 const double tmp0_85 = 0.012701665379258311483/h2;
41 const double tmp0_64 = -0.012701665379258311482/h2;
42 const double tmp0_59 = 0.78729833462074168852/h1;
43 const double tmp0_87 = -0.1/h2;
44 const double tmp0_4 = 0.78729833462074168852/h0;
45 const double tmp0_19 = 0.25/h0;
46 const double tmp0_62 = 0.1/h2;
47 const double tmp0_81 = 0.056350832689629155741/h2;
48 const double tmp0_6 = -0.44364916731037084426/h0;
49 const double tmp0_60 = -0.78729833462074168852/h2;
50 const double tmp0_83 = -0.44364916731037084426/h2;
51 const double tmp0_0 = -0.78729833462074168852/h0;
52 const double tmp0_71 = 0.1/h2;
53 const double tmp0_53 = 0.44364916731037084426/h1;
54 const double tmp0_2 = 0.1/h0;
55 const double tmp0_73 = 0.012701665379258311482/h2;
56 const double tmp0_48 = -0.25/h1;
57 const double tmp0_38 = 0.056350832689629155741/h1;
58 const double tmp0_51 = -0.44364916731037084426/h1;
59 const double tmp0_75 = -0.1/h2;
60 const double tmp0_57 = 0.1/h1;
61 const double tmp0_77 = 0.1/h2;
62 const double tmp0_34 = 0.78729833462074168852/h1;
63 const double tmp0_55 = -0.1/h1;
64 const double tmp0_79 = 0.25/h2;
65 const double tmp0_36 = -0.44364916731037084426/h1;
66 const double tmp0_29 = 0.78729833462074168852/h0;
67 const double tmp0_40 = -0.1/h1;
68 const double tmp0_30 = -0.78729833462074168852/h1;
69 const double tmp0_42 = -0.1/h1;
70 const double tmp0_32 = -0.012701665379258311482/h1;
71 const double tmp0_44 = -0.78729833462074168852/h1;
72 const double tmp0_23 = 0.44364916731037084426/h0;
73 const double tmp0_46 = 0.1/h1;
74 const double tmp0_16 = -0.78729833462074168852/h0;
75 const double tmp0_21 = 0.056350832689629155741/h0;
76 const double tmp0_14 = 0.1/h0;
77 const double tmp0_27 = -0.78729833462074168852/h0;
78 const double tmp0_12 = 0.012701665379258311482/h0;
79 const double tmp0_25 = -0.1/h0;
80 const double tmp0_10 = -0.1/h0;
81 const double tmp0_69 = -0.056350832689629155741/h2;
82 const double tmp0_88 = -0.78729833462074168852/h2;
83 const double tmp0_67 = 0.44364916731037084426/h2;
84 const double tmp0_9 = 0.44364916731037084426/h0;
85 const double tmp0_65 = 0.012701665379258311482/h2;
86 const double tmp0_58 = 0.012701665379258311483/h1;
87 const double tmp0_84 = -0.012701665379258311483/h2;
88 const double tmp0_18 = -0.25/h0;
89 const double tmp0_63 = -0.1/h2;
90 const double tmp0_86 = 0.1/h2;
91 const double tmp0_5 = 0.012701665379258311482/h0;
92 const double tmp0_61 = 0.78729833462074168852/h2;
93 const double tmp0_80 = -0.056350832689629155741/h2;
94 const double tmp0_7 = -0.056350832689629155741/h0;
95 #pragma omp parallel for private(i,k2,k1,k0)
96 for (k2 =0; k2 < N2; ++k2) {
97 for (k1 =0; k1 < N1; ++k1) {
98 for (k0 =0; k0 < N0; ++k0) {
99 for (i =0; i < NCOMP; ++i) {
100 register const double f_000 = in[INDEX2(i,INDEX3(k0,k1,k2, M0,M1),NCOMP)];
101 register const double f_001 = in[INDEX2(i,INDEX3(k0,k1,k2+1, M0,M1),NCOMP)];
102 register const double f_101 = in[INDEX2(i,INDEX3(k0+1,k1,k2+1, M0,M1),NCOMP)];
103 register const double f_011 = in[INDEX2(i,INDEX3(k0,k1+1,k2+1, M0,M1),NCOMP)];
104 register const double f_100 = in[INDEX2(i,INDEX3(k0+1,k1,k2, M0,M1),NCOMP)];
105 register const double f_110 = in[INDEX2(i,INDEX3(k0+1,k1+1,k2, M0,M1),NCOMP)];
106 register const double f_010 = in[INDEX2(i,INDEX3(k0,k1+1,k2, M0,M1),NCOMP)];
107 register const double f_111 = in[INDEX2(i,INDEX3(k0+1,k1+1,k2+1, M0,M1),NCOMP)];
108 out[INDEX4(i,0,0,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_0 + f_011*tmp0_3 + f_100*tmp0_4 + f_111*tmp0_5 + tmp0_1*(f_001 + f_010) + tmp0_2*(f_101 + f_110);
109 out[INDEX4(i,1,0,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_30 + f_010*tmp0_34 + f_101*tmp0_32 + f_111*tmp0_35 + tmp0_31*(f_001 + f_100) + tmp0_33*(f_011 + f_110);
110 out[INDEX4(i,2,0,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_60 + f_001*tmp0_61 + f_110*tmp0_64 + f_111*tmp0_65 + tmp0_62*(f_011 + f_101) + tmp0_63*(f_010 + f_100);
111 out[INDEX4(i,0,1,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_0 + f_011*tmp0_3 + f_100*tmp0_4 + f_111*tmp0_5 + tmp0_1*(f_001 + f_010) + tmp0_2*(f_101 + f_110);
112 out[INDEX4(i,1,1,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_36*(f_000 + f_100) + tmp0_37*(f_001 + f_101) + tmp0_38*(f_011 + f_111) + tmp0_39*(f_010 + f_110);
113 out[INDEX4(i,2,1,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_66*(f_000 + f_100) + tmp0_67*(f_001 + f_101) + tmp0_68*(f_011 + f_111) + tmp0_69*(f_010 + f_110);
114 out[INDEX4(i,0,2,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_0 + f_011*tmp0_3 + f_100*tmp0_4 + f_111*tmp0_5 + tmp0_1*(f_001 + f_010) + tmp0_2*(f_101 + f_110);
115 out[INDEX4(i,1,2,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_40 + f_001*tmp0_41 + f_010*tmp0_46 + f_011*tmp0_43 + f_100*tmp0_44 + f_101*tmp0_42 + f_110*tmp0_45 + f_111*tmp0_47;
116 out[INDEX4(i,2,2,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_70 + f_001*tmp0_71 + f_010*tmp0_76 + f_011*tmp0_73 + f_100*tmp0_74 + f_101*tmp0_72 + f_110*tmp0_75 + f_111*tmp0_77;
117 out[INDEX4(i,0,3,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_6*(f_000 + f_010) + tmp0_7*(f_001 + f_011) + tmp0_8*(f_101 + f_111) + tmp0_9*(f_100 + f_110);
118 out[INDEX4(i,1,3,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_30 + f_010*tmp0_34 + f_101*tmp0_32 + f_111*tmp0_35 + tmp0_31*(f_001 + f_100) + tmp0_33*(f_011 + f_110);
119 out[INDEX4(i,2,3,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_66*(f_000 + f_010) + tmp0_67*(f_001 + f_011) + tmp0_68*(f_101 + f_111) + tmp0_69*(f_100 + f_110);
120 out[INDEX4(i,0,4,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_6*(f_000 + f_010) + tmp0_7*(f_001 + f_011) + tmp0_8*(f_101 + f_111) + tmp0_9*(f_100 + f_110);
121 out[INDEX4(i,1,4,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_36*(f_000 + f_100) + tmp0_37*(f_001 + f_101) + tmp0_38*(f_011 + f_111) + tmp0_39*(f_010 + f_110);
122 out[INDEX4(i,2,4,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_78*(f_000 + f_010 + f_100 + f_110) + tmp0_79*(f_001 + f_011 + f_101 + f_111);
123 out[INDEX4(i,0,5,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_6*(f_000 + f_010) + tmp0_7*(f_001 + f_011) + tmp0_8*(f_101 + f_111) + tmp0_9*(f_100 + f_110);
124 out[INDEX4(i,1,5,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_40 + f_001*tmp0_41 + f_010*tmp0_46 + f_011*tmp0_43 + f_100*tmp0_44 + f_101*tmp0_42 + f_110*tmp0_45 + f_111*tmp0_47;
125 out[INDEX4(i,2,5,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_80*(f_000 + f_010) + tmp0_81*(f_001 + f_011) + tmp0_82*(f_101 + f_111) + tmp0_83*(f_100 + f_110);
126 out[INDEX4(i,0,6,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_10 + f_001*tmp0_11 + f_010*tmp0_16 + f_011*tmp0_13 + f_100*tmp0_14 + f_101*tmp0_12 + f_110*tmp0_15 + f_111*tmp0_17;
127 out[INDEX4(i,1,6,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_30 + f_010*tmp0_34 + f_101*tmp0_32 + f_111*tmp0_35 + tmp0_31*(f_001 + f_100) + tmp0_33*(f_011 + f_110);
128 out[INDEX4(i,2,6,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_70 + f_001*tmp0_71 + f_010*tmp0_74 + f_011*tmp0_72 + f_100*tmp0_76 + f_101*tmp0_73 + f_110*tmp0_75 + f_111*tmp0_77;
129 out[INDEX4(i,0,7,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_10 + f_001*tmp0_11 + f_010*tmp0_16 + f_011*tmp0_13 + f_100*tmp0_14 + f_101*tmp0_12 + f_110*tmp0_15 + f_111*tmp0_17;
130 out[INDEX4(i,1,7,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_36*(f_000 + f_100) + tmp0_37*(f_001 + f_101) + tmp0_38*(f_011 + f_111) + tmp0_39*(f_010 + f_110);
131 out[INDEX4(i,2,7,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_80*(f_000 + f_100) + tmp0_81*(f_001 + f_101) + tmp0_82*(f_011 + f_111) + tmp0_83*(f_010 + f_110);
132 out[INDEX4(i,0,8,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_10 + f_001*tmp0_11 + f_010*tmp0_16 + f_011*tmp0_13 + f_100*tmp0_14 + f_101*tmp0_12 + f_110*tmp0_15 + f_111*tmp0_17;
133 out[INDEX4(i,1,8,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_40 + f_001*tmp0_41 + f_010*tmp0_46 + f_011*tmp0_43 + f_100*tmp0_44 + f_101*tmp0_42 + f_110*tmp0_45 + f_111*tmp0_47;
134 out[INDEX4(i,2,8,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_84 + f_001*tmp0_85 + f_110*tmp0_88 + f_111*tmp0_89 + tmp0_86*(f_011 + f_101) + tmp0_87*(f_010 + f_100);
135 out[INDEX4(i,0,9,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_6*(f_000 + f_001) + tmp0_7*(f_010 + f_011) + tmp0_8*(f_110 + f_111) + tmp0_9*(f_100 + f_101);
136 out[INDEX4(i,1,9,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_36*(f_000 + f_001) + tmp0_37*(f_100 + f_101) + tmp0_38*(f_110 + f_111) + tmp0_39*(f_010 + f_011);
137 out[INDEX4(i,2,9,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_60 + f_001*tmp0_61 + f_110*tmp0_64 + f_111*tmp0_65 + tmp0_62*(f_011 + f_101) + tmp0_63*(f_010 + f_100);
138 out[INDEX4(i,0,10,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_6*(f_000 + f_001) + tmp0_7*(f_010 + f_011) + tmp0_8*(f_110 + f_111) + tmp0_9*(f_100 + f_101);
139 out[INDEX4(i,1,10,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_48*(f_000 + f_001 + f_100 + f_101) + tmp0_49*(f_010 + f_011 + f_110 + f_111);
140 out[INDEX4(i,2,10,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_66*(f_000 + f_100) + tmp0_67*(f_001 + f_101) + tmp0_68*(f_011 + f_111) + tmp0_69*(f_010 + f_110);
141 out[INDEX4(i,0,11,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_6*(f_000 + f_001) + tmp0_7*(f_010 + f_011) + tmp0_8*(f_110 + f_111) + tmp0_9*(f_100 + f_101);
142 out[INDEX4(i,1,11,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_50*(f_000 + f_001) + tmp0_51*(f_100 + f_101) + tmp0_52*(f_010 + f_011) + tmp0_53*(f_110 + f_111);
143 out[INDEX4(i,2,11,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_70 + f_001*tmp0_71 + f_010*tmp0_76 + f_011*tmp0_73 + f_100*tmp0_74 + f_101*tmp0_72 + f_110*tmp0_75 + f_111*tmp0_77;
144 out[INDEX4(i,0,12,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_18*(f_000 + f_001 + f_010 + f_011) + tmp0_19*(f_100 + f_101 + f_110 + f_111);
145 out[INDEX4(i,1,12,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_36*(f_000 + f_001) + tmp0_37*(f_100 + f_101) + tmp0_38*(f_110 + f_111) + tmp0_39*(f_010 + f_011);
146 out[INDEX4(i,2,12,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_66*(f_000 + f_010) + tmp0_67*(f_001 + f_011) + tmp0_68*(f_101 + f_111) + tmp0_69*(f_100 + f_110);
147 out[INDEX4(i,0,13,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_18*(f_000 + f_001 + f_010 + f_011) + tmp0_19*(f_100 + f_101 + f_110 + f_111);
148 out[INDEX4(i,1,13,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_48*(f_000 + f_001 + f_100 + f_101) + tmp0_49*(f_010 + f_011 + f_110 + f_111);
149 out[INDEX4(i,2,13,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_78*(f_000 + f_010 + f_100 + f_110) + tmp0_79*(f_001 + f_011 + f_101 + f_111);
150 out[INDEX4(i,0,14,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_18*(f_000 + f_001 + f_010 + f_011) + tmp0_19*(f_100 + f_101 + f_110 + f_111);
151 out[INDEX4(i,1,14,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_50*(f_000 + f_001) + tmp0_51*(f_100 + f_101) + tmp0_52*(f_010 + f_011) + tmp0_53*(f_110 + f_111);
152 out[INDEX4(i,2,14,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_80*(f_000 + f_010) + tmp0_81*(f_001 + f_011) + tmp0_82*(f_101 + f_111) + tmp0_83*(f_100 + f_110);
153 out[INDEX4(i,0,15,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_20*(f_000 + f_001) + tmp0_21*(f_100 + f_101) + tmp0_22*(f_010 + f_011) + tmp0_23*(f_110 + f_111);
154 out[INDEX4(i,1,15,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_36*(f_000 + f_001) + tmp0_37*(f_100 + f_101) + tmp0_38*(f_110 + f_111) + tmp0_39*(f_010 + f_011);
155 out[INDEX4(i,2,15,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_70 + f_001*tmp0_71 + f_010*tmp0_74 + f_011*tmp0_72 + f_100*tmp0_76 + f_101*tmp0_73 + f_110*tmp0_75 + f_111*tmp0_77;
156 out[INDEX4(i,0,16,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_20*(f_000 + f_001) + tmp0_21*(f_100 + f_101) + tmp0_22*(f_010 + f_011) + tmp0_23*(f_110 + f_111);
157 out[INDEX4(i,1,16,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_48*(f_000 + f_001 + f_100 + f_101) + tmp0_49*(f_010 + f_011 + f_110 + f_111);
158 out[INDEX4(i,2,16,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_80*(f_000 + f_100) + tmp0_81*(f_001 + f_101) + tmp0_82*(f_011 + f_111) + tmp0_83*(f_010 + f_110);
159 out[INDEX4(i,0,17,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_20*(f_000 + f_001) + tmp0_21*(f_100 + f_101) + tmp0_22*(f_010 + f_011) + tmp0_23*(f_110 + f_111);
160 out[INDEX4(i,1,17,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_50*(f_000 + f_001) + tmp0_51*(f_100 + f_101) + tmp0_52*(f_010 + f_011) + tmp0_53*(f_110 + f_111);
161 out[INDEX4(i,2,17,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_84 + f_001*tmp0_85 + f_110*tmp0_88 + f_111*tmp0_89 + tmp0_86*(f_011 + f_101) + tmp0_87*(f_010 + f_100);
162 out[INDEX4(i,0,18,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_10 + f_001*tmp0_16 + f_010*tmp0_11 + f_011*tmp0_13 + f_100*tmp0_14 + f_101*tmp0_15 + f_110*tmp0_12 + f_111*tmp0_17;
163 out[INDEX4(i,1,18,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_40 + f_001*tmp0_44 + f_010*tmp0_46 + f_011*tmp0_45 + f_100*tmp0_41 + f_101*tmp0_42 + f_110*tmp0_43 + f_111*tmp0_47;
164 out[INDEX4(i,2,18,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_60 + f_001*tmp0_61 + f_110*tmp0_64 + f_111*tmp0_65 + tmp0_62*(f_011 + f_101) + tmp0_63*(f_010 + f_100);
165 out[INDEX4(i,0,19,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_10 + f_001*tmp0_16 + f_010*tmp0_11 + f_011*tmp0_13 + f_100*tmp0_14 + f_101*tmp0_15 + f_110*tmp0_12 + f_111*tmp0_17;
166 out[INDEX4(i,1,19,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_50*(f_000 + f_100) + tmp0_51*(f_001 + f_101) + tmp0_52*(f_010 + f_110) + tmp0_53*(f_011 + f_111);
167 out[INDEX4(i,2,19,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_66*(f_000 + f_100) + tmp0_67*(f_001 + f_101) + tmp0_68*(f_011 + f_111) + tmp0_69*(f_010 + f_110);
168 out[INDEX4(i,0,20,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_10 + f_001*tmp0_16 + f_010*tmp0_11 + f_011*tmp0_13 + f_100*tmp0_14 + f_101*tmp0_15 + f_110*tmp0_12 + f_111*tmp0_17;
169 out[INDEX4(i,1,20,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_54 + f_010*tmp0_58 + f_101*tmp0_56 + f_111*tmp0_59 + tmp0_55*(f_001 + f_100) + tmp0_57*(f_011 + f_110);
170 out[INDEX4(i,2,20,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_70 + f_001*tmp0_71 + f_010*tmp0_76 + f_011*tmp0_73 + f_100*tmp0_74 + f_101*tmp0_72 + f_110*tmp0_75 + f_111*tmp0_77;
171 out[INDEX4(i,0,21,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_20*(f_000 + f_010) + tmp0_21*(f_100 + f_110) + tmp0_22*(f_001 + f_011) + tmp0_23*(f_101 + f_111);
172 out[INDEX4(i,1,21,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_40 + f_001*tmp0_44 + f_010*tmp0_46 + f_011*tmp0_45 + f_100*tmp0_41 + f_101*tmp0_42 + f_110*tmp0_43 + f_111*tmp0_47;
173 out[INDEX4(i,2,21,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_66*(f_000 + f_010) + tmp0_67*(f_001 + f_011) + tmp0_68*(f_101 + f_111) + tmp0_69*(f_100 + f_110);
174 out[INDEX4(i,0,22,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_20*(f_000 + f_010) + tmp0_21*(f_100 + f_110) + tmp0_22*(f_001 + f_011) + tmp0_23*(f_101 + f_111);
175 out[INDEX4(i,1,22,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_50*(f_000 + f_100) + tmp0_51*(f_001 + f_101) + tmp0_52*(f_010 + f_110) + tmp0_53*(f_011 + f_111);
176 out[INDEX4(i,2,22,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_78*(f_000 + f_010 + f_100 + f_110) + tmp0_79*(f_001 + f_011 + f_101 + f_111);
177 out[INDEX4(i,0,23,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_20*(f_000 + f_010) + tmp0_21*(f_100 + f_110) + tmp0_22*(f_001 + f_011) + tmp0_23*(f_101 + f_111);
178 out[INDEX4(i,1,23,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_54 + f_010*tmp0_58 + f_101*tmp0_56 + f_111*tmp0_59 + tmp0_55*(f_001 + f_100) + tmp0_57*(f_011 + f_110);
179 out[INDEX4(i,2,23,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_80*(f_000 + f_010) + tmp0_81*(f_001 + f_011) + tmp0_82*(f_101 + f_111) + tmp0_83*(f_100 + f_110);
180 out[INDEX4(i,0,24,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_24 + f_011*tmp0_27 + f_100*tmp0_28 + f_111*tmp0_29 + tmp0_25*(f_001 + f_010) + tmp0_26*(f_101 + f_110);
181 out[INDEX4(i,1,24,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_40 + f_001*tmp0_44 + f_010*tmp0_46 + f_011*tmp0_45 + f_100*tmp0_41 + f_101*tmp0_42 + f_110*tmp0_43 + f_111*tmp0_47;
182 out[INDEX4(i,2,24,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_70 + f_001*tmp0_71 + f_010*tmp0_74 + f_011*tmp0_72 + f_100*tmp0_76 + f_101*tmp0_73 + f_110*tmp0_75 + f_111*tmp0_77;
183 out[INDEX4(i,0,25,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_24 + f_011*tmp0_27 + f_100*tmp0_28 + f_111*tmp0_29 + tmp0_25*(f_001 + f_010) + tmp0_26*(f_101 + f_110);
184 out[INDEX4(i,1,25,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_50*(f_000 + f_100) + tmp0_51*(f_001 + f_101) + tmp0_52*(f_010 + f_110) + tmp0_53*(f_011 + f_111);
185 out[INDEX4(i,2,25,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = tmp0_80*(f_000 + f_100) + tmp0_81*(f_001 + f_101) + tmp0_82*(f_011 + f_111) + tmp0_83*(f_010 + f_110);
186 out[INDEX4(i,0,26,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_24 + f_011*tmp0_27 + f_100*tmp0_28 + f_111*tmp0_29 + tmp0_25*(f_001 + f_010) + tmp0_26*(f_101 + f_110);
187 out[INDEX4(i,1,26,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_54 + f_010*tmp0_58 + f_101*tmp0_56 + f_111*tmp0_59 + tmp0_55*(f_001 + f_100) + tmp0_57*(f_011 + f_110);
188 out[INDEX4(i,2,26,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,27)] = f_000*tmp0_84 + f_001*tmp0_85 + f_110*tmp0_88 + f_111*tmp0_89 + tmp0_86*(f_011 + f_101) + tmp0_87*(f_010 + f_100);
189 } /* close component loop i */
190 } /* close k0 loop */
191 } /* close k1 loop */
192 } /* close k2 loop */
193 } else if (out_data_type==RIPLEY_REDUCED_ELEMENTS) {
194 const double tmp0_0 = -0.25/h0;
195 const double tmp0_4 = -0.25/h2;
196 const double tmp0_1 = 0.25/h0;
197 const double tmp0_5 = 0.25/h2;
198 const double tmp0_2 = -0.25/h1;
199 const double tmp0_3 = 0.25/h1;
200 #pragma omp parallel for private(i,k2,k1,k0)
201 for (k2 =0; k2 < N2; ++k2) {
202 for (k1 =0; k1 < N1; ++k1) {
203 for (k0 =0; k0 < N0; ++k0) {
204 for (i =0; i < NCOMP; ++i) {
205 register const double f_000 = in[INDEX2(i,INDEX3(k0,k1,k2, M0,M1),NCOMP)];
206 register const double f_001 = in[INDEX2(i,INDEX3(k0,k1,k2+1, M0,M1),NCOMP)];
207 register const double f_101 = in[INDEX2(i,INDEX3(k0+1,k1,k2+1, M0,M1),NCOMP)];
208 register const double f_011 = in[INDEX2(i,INDEX3(k0,k1+1,k2+1, M0,M1),NCOMP)];
209 register const double f_100 = in[INDEX2(i,INDEX3(k0+1,k1,k2, M0,M1),NCOMP)];
210 register const double f_110 = in[INDEX2(i,INDEX3(k0+1,k1+1,k2, M0,M1),NCOMP)];
211 register const double f_010 = in[INDEX2(i,INDEX3(k0,k1+1,k2, M0,M1),NCOMP)];
212 register const double f_111 = in[INDEX2(i,INDEX3(k0+1,k1+1,k2+1, M0,M1),NCOMP)];
213 out[INDEX4(i,0,0,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_0*(f_000 + f_001 + f_010 + f_011) + tmp0_1*(f_100 + f_101 + f_110 + f_111);
214 out[INDEX4(i,1,0,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_2*(f_000 + f_001 + f_100 + f_101) + tmp0_3*(f_010 + f_011 + f_110 + f_111);
215 out[INDEX4(i,2,0,INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_4*(f_000 + f_010 + f_100 + f_110) + tmp0_5*(f_001 + f_011 + f_101 + f_111);
216 } /* close component loop i */
217 } /* close k0 loop */
218 } /* close k1 loop */
219 } /* close k2 loop */
220 } else if (out_data_type==RIPLEY_BOUNDARY_ELEMENTS) {
221 if (face_offset(0)>-1) {
222 const double tmp0_22 = -0.44364916731037084426/h0;
223 const double tmp0_16 = -0.78729833462074168852/h0;
224 const double tmp0_33 = 0.88729833462074168852/h1;
225 const double tmp0_0 = -0.78729833462074168852/h0;
226 const double tmp0_21 = 0.056350832689629155741/h0;
227 const double tmp0_17 = 0.1/h0;
228 const double tmp0_1 = -0.1/h0;
229 const double tmp0_20 = -0.056350832689629155741/h0;
230 const double tmp0_14 = 0.1/h0;
231 const double tmp0_49 = -0.88729833462074168852/h2;
232 const double tmp0_2 = 0.1/h0;
233 const double tmp0_27 = -0.78729833462074168852/h0;
234 const double tmp0_15 = 0.78729833462074168852/h0;
235 const double tmp0_48 = 0.88729833462074168852/h2;
236 const double tmp0_3 = -0.012701665379258311482/h0;
237 const double tmp0_26 = 0.1/h0;
238 const double tmp0_12 = 0.012701665379258311482/h0;
239 const double tmp0_25 = -0.1/h0;
240 const double tmp0_13 = -0.1/h0;
241 const double tmp0_24 = -0.012701665379258311483/h0;
242 const double tmp0_10 = -0.1/h0;
243 const double tmp0_11 = -0.012701665379258311482/h0;
244 const double tmp0_38 = 0.88729833462074168852/h1;
245 const double tmp0_34 = -0.5/h1;
246 const double tmp0_42 = 0.11270166537925831148/h2;
247 const double tmp0_35 = 0.5/h1;
248 const double tmp0_36 = -0.11270166537925831148/h1;
249 const double tmp0_41 = 0.88729833462074168852/h2;
250 const double tmp0_8 = 0.056350832689629155741/h0;
251 const double tmp0_37 = -0.88729833462074168852/h1;
252 const double tmp0_29 = 0.78729833462074168852/h0;
253 const double tmp0_40 = -0.88729833462074168852/h2;
254 const double tmp0_9 = 0.44364916731037084426/h0;
255 const double tmp0_30 = -0.88729833462074168852/h1;
256 const double tmp0_28 = 0.012701665379258311482/h0;
257 const double tmp0_43 = -0.11270166537925831148/h2;
258 const double tmp0_32 = 0.11270166537925831148/h1;
259 const double tmp0_31 = -0.11270166537925831148/h1;
260 const double tmp0_39 = 0.11270166537925831148/h1;
261 const double tmp0_18 = -0.25/h0;
262 const double tmp0_45 = 0.5/h2;
263 const double tmp0_4 = 0.78729833462074168852/h0;
264 const double tmp0_19 = 0.25/h0;
265 const double tmp0_44 = -0.5/h2;
266 const double tmp0_5 = 0.012701665379258311482/h0;
267 const double tmp0_47 = 0.11270166537925831148/h2;
268 const double tmp0_6 = -0.44364916731037084426/h0;
269 const double tmp0_23 = 0.44364916731037084426/h0;
270 const double tmp0_46 = -0.11270166537925831148/h2;
271 const double tmp0_7 = -0.056350832689629155741/h0;
272 #pragma omp parallel for private(i,k2,k1)
273 for (k2 =0; k2 < N2; ++k2) {
274 for (k1 =0; k1 < N1; ++k1) {
275 for (i =0; i < NCOMP; ++i) {
276 register const double f_000 = in[INDEX2(i,INDEX3(0,k1,k2, M0,M1),NCOMP)];
277 register const double f_001 = in[INDEX2(i,INDEX3(0,k1,k2+1, M0,M1),NCOMP)];
278 register const double f_101 = in[INDEX2(i,INDEX3(1,k1,k2+1, M0,M1),NCOMP)];
279 register const double f_011 = in[INDEX2(i,INDEX3(0,k1+1,k2+1, M0,M1),NCOMP)];
280 register const double f_100 = in[INDEX2(i,INDEX3(1,k1,k2, M0,M1),NCOMP)];
281 register const double f_110 = in[INDEX2(i,INDEX3(1,k1+1,k2, M0,M1),NCOMP)];
282 register const double f_010 = in[INDEX2(i,INDEX3(0,k1+1,k2, M0,M1),NCOMP)];
283 register const double f_111 = in[INDEX2(i,INDEX3(1,k1+1,k2+1, M0,M1),NCOMP)];
284 out[INDEX4(i,0,0,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_0 + f_011*tmp0_3 + f_100*tmp0_4 + f_111*tmp0_5 + tmp0_1*(f_001 + f_010) + tmp0_2*(f_101 + f_110);
285 out[INDEX4(i,1,0,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_30 + f_001*tmp0_31 + f_010*tmp0_33 + f_011*tmp0_32;
286 out[INDEX4(i,2,0,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_40 + f_001*tmp0_41 + f_010*tmp0_43 + f_011*tmp0_42;
287 out[INDEX4(i,0,1,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_6*(f_000 + f_010) + tmp0_7*(f_001 + f_011) + tmp0_8*(f_101 + f_111) + tmp0_9*(f_100 + f_110);
288 out[INDEX4(i,1,1,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_30 + f_001*tmp0_31 + f_010*tmp0_33 + f_011*tmp0_32;
289 out[INDEX4(i,2,1,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_44*(f_000 + f_010) + tmp0_45*(f_001 + f_011);
290 out[INDEX4(i,0,2,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_10 + f_001*tmp0_11 + f_010*tmp0_16 + f_011*tmp0_13 + f_100*tmp0_14 + f_101*tmp0_12 + f_110*tmp0_15 + f_111*tmp0_17;
291 out[INDEX4(i,1,2,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_30 + f_001*tmp0_31 + f_010*tmp0_33 + f_011*tmp0_32;
292 out[INDEX4(i,2,2,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_46 + f_001*tmp0_47 + f_010*tmp0_49 + f_011*tmp0_48;
293 out[INDEX4(i,0,3,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_6*(f_000 + f_001) + tmp0_7*(f_010 + f_011) + tmp0_8*(f_110 + f_111) + tmp0_9*(f_100 + f_101);
294 out[INDEX4(i,1,3,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_34*(f_000 + f_001) + tmp0_35*(f_010 + f_011);
295 out[INDEX4(i,2,3,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_40 + f_001*tmp0_41 + f_010*tmp0_43 + f_011*tmp0_42;
296 out[INDEX4(i,0,4,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_18*(f_000 + f_001 + f_010 + f_011) + tmp0_19*(f_100 + f_101 + f_110 + f_111);
297 out[INDEX4(i,1,4,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_34*(f_000 + f_001) + tmp0_35*(f_010 + f_011);
298 out[INDEX4(i,2,4,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_44*(f_000 + f_010) + tmp0_45*(f_001 + f_011);
299 out[INDEX4(i,0,5,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_20*(f_000 + f_001) + tmp0_21*(f_100 + f_101) + tmp0_22*(f_010 + f_011) + tmp0_23*(f_110 + f_111);
300 out[INDEX4(i,1,5,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_34*(f_000 + f_001) + tmp0_35*(f_010 + f_011);
301 out[INDEX4(i,2,5,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_46 + f_001*tmp0_47 + f_010*tmp0_49 + f_011*tmp0_48;
302 out[INDEX4(i,0,6,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_10 + f_001*tmp0_16 + f_010*tmp0_11 + f_011*tmp0_13 + f_100*tmp0_14 + f_101*tmp0_15 + f_110*tmp0_12 + f_111*tmp0_17;
303 out[INDEX4(i,1,6,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_36 + f_001*tmp0_37 + f_010*tmp0_39 + f_011*tmp0_38;
304 out[INDEX4(i,2,6,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_40 + f_001*tmp0_41 + f_010*tmp0_43 + f_011*tmp0_42;
305 out[INDEX4(i,0,7,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_20*(f_000 + f_010) + tmp0_21*(f_100 + f_110) + tmp0_22*(f_001 + f_011) + tmp0_23*(f_101 + f_111);
306 out[INDEX4(i,1,7,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_36 + f_001*tmp0_37 + f_010*tmp0_39 + f_011*tmp0_38;
307 out[INDEX4(i,2,7,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_44*(f_000 + f_010) + tmp0_45*(f_001 + f_011);
308 out[INDEX4(i,0,8,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_24 + f_011*tmp0_27 + f_100*tmp0_28 + f_111*tmp0_29 + tmp0_25*(f_001 + f_010) + tmp0_26*(f_101 + f_110);
309 out[INDEX4(i,1,8,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_36 + f_001*tmp0_37 + f_010*tmp0_39 + f_011*tmp0_38;
310 out[INDEX4(i,2,8,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_46 + f_001*tmp0_47 + f_010*tmp0_49 + f_011*tmp0_48;
311 } /* close component loop i */
312 } /* close k1 loop */
313 } /* close k2 loop */
314 } /* end of face 0 */
315 if (face_offset(1)>-1) {
316 const double tmp0_22 = -0.44364916731037084426/h0;
317 const double tmp0_16 = -0.78729833462074168852/h0;
318 const double tmp0_33 = 0.11270166537925831148/h1;
319 const double tmp0_0 = -0.78729833462074168852/h0;
320 const double tmp0_21 = 0.056350832689629155741/h0;
321 const double tmp0_17 = 0.1/h0;
322 const double tmp0_1 = -0.1/h0;
323 const double tmp0_20 = -0.056350832689629155741/h0;
324 const double tmp0_14 = 0.1/h0;
325 const double tmp0_49 = 0.88729833462074168852/h2;
326 const double tmp0_2 = 0.1/h0;
327 const double tmp0_27 = -0.78729833462074168852/h0;
328 const double tmp0_15 = 0.78729833462074168852/h0;
329 const double tmp0_48 = -0.88729833462074168852/h2;
330 const double tmp0_3 = -0.012701665379258311482/h0;
331 const double tmp0_26 = 0.1/h0;
332 const double tmp0_12 = 0.012701665379258311482/h0;
333 const double tmp0_25 = -0.1/h0;
334 const double tmp0_13 = -0.1/h0;
335 const double tmp0_24 = -0.012701665379258311483/h0;
336 const double tmp0_10 = -0.1/h0;
337 const double tmp0_11 = -0.012701665379258311482/h0;
338 const double tmp0_38 = 0.11270166537925831148/h1;
339 const double tmp0_34 = -0.5/h1;
340 const double tmp0_42 = -0.11270166537925831148/h2;
341 const double tmp0_35 = 0.5/h1;
342 const double tmp0_36 = -0.88729833462074168852/h1;
343 const double tmp0_41 = -0.88729833462074168852/h2;
344 const double tmp0_8 = 0.056350832689629155741/h0;
345 const double tmp0_37 = -0.11270166537925831148/h1;
346 const double tmp0_29 = 0.78729833462074168852/h0;
347 const double tmp0_40 = 0.88729833462074168852/h2;
348 const double tmp0_9 = 0.44364916731037084426/h0;
349 const double tmp0_30 = -0.11270166537925831148/h1;
350 const double tmp0_28 = 0.012701665379258311482/h0;
351 const double tmp0_43 = 0.11270166537925831148/h2;
352 const double tmp0_32 = 0.88729833462074168852/h1;
353 const double tmp0_31 = -0.88729833462074168852/h1;
354 const double tmp0_39 = 0.88729833462074168852/h1;
355 const double tmp0_18 = -0.25/h0;
356 const double tmp0_45 = -0.5/h2;
357 const double tmp0_4 = 0.78729833462074168852/h0;
358 const double tmp0_19 = 0.25/h0;
359 const double tmp0_44 = 0.5/h2;
360 const double tmp0_5 = 0.012701665379258311482/h0;
361 const double tmp0_47 = -0.11270166537925831148/h2;
362 const double tmp0_6 = -0.44364916731037084426/h0;
363 const double tmp0_23 = 0.44364916731037084426/h0;
364 const double tmp0_46 = 0.11270166537925831148/h2;
365 const double tmp0_7 = -0.056350832689629155741/h0;
366 #pragma omp parallel for private(i,k2,k1)
367 for (k2 =0; k2 < N2; ++k2) {
368 for (k1 =0; k1 < N1; ++k1) {
369 for (i =0; i < NCOMP; ++i) {
370 register const double f_000 = in[INDEX2(i,INDEX3(M0-2,k1,k2, M0,M1),NCOMP)];
371 register const double f_001 = in[INDEX2(i,INDEX3(M0-2,k1,k2+1, M0,M1),NCOMP)];
372 register const double f_101 = in[INDEX2(i,INDEX3(M0-1,k1,k2+1, M0,M1),NCOMP)];
373 register const double f_011 = in[INDEX2(i,INDEX3(M0-2,k1+1,k2+1, M0,M1),NCOMP)];
374 register const double f_100 = in[INDEX2(i,INDEX3(M0-1,k1,k2, M0,M1),NCOMP)];
375 register const double f_110 = in[INDEX2(i,INDEX3(M0-1,k1+1,k2, M0,M1),NCOMP)];
376 register const double f_010 = in[INDEX2(i,INDEX3(M0-2,k1+1,k2, M0,M1),NCOMP)];
377 register const double f_111 = in[INDEX2(i,INDEX3(M0-1,k1+1,k2+1, M0,M1),NCOMP)];
378 out[INDEX4(i,0,0,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_0 + f_011*tmp0_3 + f_100*tmp0_4 + f_111*tmp0_5 + tmp0_1*(f_001 + f_010) + tmp0_2*(f_101 + f_110);
379 out[INDEX4(i,1,0,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_100*tmp0_31 + f_101*tmp0_30 + f_110*tmp0_32 + f_111*tmp0_33;
380 out[INDEX4(i,2,0,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_100*tmp0_41 + f_101*tmp0_40 + f_110*tmp0_42 + f_111*tmp0_43;
381 out[INDEX4(i,0,1,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_6*(f_000 + f_010) + tmp0_7*(f_001 + f_011) + tmp0_8*(f_101 + f_111) + tmp0_9*(f_100 + f_110);
382 out[INDEX4(i,1,1,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_100*tmp0_31 + f_101*tmp0_30 + f_110*tmp0_32 + f_111*tmp0_33;
383 out[INDEX4(i,2,1,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_44*(f_101 + f_111) + tmp0_45*(f_100 + f_110);
384 out[INDEX4(i,0,2,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_10 + f_001*tmp0_11 + f_010*tmp0_16 + f_011*tmp0_13 + f_100*tmp0_14 + f_101*tmp0_12 + f_110*tmp0_15 + f_111*tmp0_17;
385 out[INDEX4(i,1,2,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_100*tmp0_31 + f_101*tmp0_30 + f_110*tmp0_32 + f_111*tmp0_33;
386 out[INDEX4(i,2,2,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_100*tmp0_47 + f_101*tmp0_46 + f_110*tmp0_48 + f_111*tmp0_49;
387 out[INDEX4(i,0,3,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_6*(f_000 + f_001) + tmp0_7*(f_010 + f_011) + tmp0_8*(f_110 + f_111) + tmp0_9*(f_100 + f_101);
388 out[INDEX4(i,1,3,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_34*(f_100 + f_101) + tmp0_35*(f_110 + f_111);
389 out[INDEX4(i,2,3,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_100*tmp0_41 + f_101*tmp0_40 + f_110*tmp0_42 + f_111*tmp0_43;
390 out[INDEX4(i,0,4,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_18*(f_000 + f_001 + f_010 + f_011) + tmp0_19*(f_100 + f_101 + f_110 + f_111);
391 out[INDEX4(i,1,4,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_34*(f_100 + f_101) + tmp0_35*(f_110 + f_111);
392 out[INDEX4(i,2,4,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_44*(f_101 + f_111) + tmp0_45*(f_100 + f_110);
393 out[INDEX4(i,0,5,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_20*(f_000 + f_001) + tmp0_21*(f_100 + f_101) + tmp0_22*(f_010 + f_011) + tmp0_23*(f_110 + f_111);
394 out[INDEX4(i,1,5,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_34*(f_100 + f_101) + tmp0_35*(f_110 + f_111);
395 out[INDEX4(i,2,5,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_100*tmp0_47 + f_101*tmp0_46 + f_110*tmp0_48 + f_111*tmp0_49;
396 out[INDEX4(i,0,6,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_10 + f_001*tmp0_16 + f_010*tmp0_11 + f_011*tmp0_13 + f_100*tmp0_14 + f_101*tmp0_15 + f_110*tmp0_12 + f_111*tmp0_17;
397 out[INDEX4(i,1,6,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_100*tmp0_37 + f_101*tmp0_36 + f_110*tmp0_38 + f_111*tmp0_39;
398 out[INDEX4(i,2,6,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_100*tmp0_41 + f_101*tmp0_40 + f_110*tmp0_42 + f_111*tmp0_43;
399 out[INDEX4(i,0,7,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_20*(f_000 + f_010) + tmp0_21*(f_100 + f_110) + tmp0_22*(f_001 + f_011) + tmp0_23*(f_101 + f_111);
400 out[INDEX4(i,1,7,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_100*tmp0_37 + f_101*tmp0_36 + f_110*tmp0_38 + f_111*tmp0_39;
401 out[INDEX4(i,2,7,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_44*(f_101 + f_111) + tmp0_45*(f_100 + f_110);
402 out[INDEX4(i,0,8,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_24 + f_011*tmp0_27 + f_100*tmp0_28 + f_111*tmp0_29 + tmp0_25*(f_001 + f_010) + tmp0_26*(f_101 + f_110);
403 out[INDEX4(i,1,8,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_100*tmp0_37 + f_101*tmp0_36 + f_110*tmp0_38 + f_111*tmp0_39;
404 out[INDEX4(i,2,8,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_100*tmp0_47 + f_101*tmp0_46 + f_110*tmp0_48 + f_111*tmp0_49;
405 } /* close component loop i */
406 } /* close k1 loop */
407 } /* close k2 loop */
408 } /* end of face 1 */
409 if (face_offset(2)>-1) {
410 const double tmp0_22 = -0.1/h1;
411 const double tmp0_16 = -0.44364916731037084426/h1;
412 const double tmp0_33 = 0.44364916731037084426/h1;
413 const double tmp0_0 = -0.88729833462074168852/h0;
414 const double tmp0_21 = -0.012701665379258311482/h1;
415 const double tmp0_17 = -0.056350832689629155741/h1;
416 const double tmp0_1 = -0.11270166537925831148/h0;
417 const double tmp0_20 = -0.1/h1;
418 const double tmp0_14 = 0.78729833462074168852/h1;
419 const double tmp0_49 = -0.88729833462074168852/h2;
420 const double tmp0_2 = 0.11270166537925831148/h0;
421 const double tmp0_27 = 0.1/h1;
422 const double tmp0_15 = 0.012701665379258311482/h1;
423 const double tmp0_48 = 0.88729833462074168852/h2;
424 const double tmp0_3 = 0.88729833462074168852/h0;
425 const double tmp0_26 = 0.1/h1;
426 const double tmp0_12 = -0.012701665379258311482/h1;
427 const double tmp0_25 = 0.78729833462074168852/h1;
428 const double tmp0_13 = 0.1/h1;
429 const double tmp0_24 = 0.012701665379258311482/h1;
430 const double tmp0_10 = -0.78729833462074168852/h1;
431 const double tmp0_11 = -0.1/h1;
432 const double tmp0_38 = 0.012701665379258311483/h1;
433 const double tmp0_34 = -0.012701665379258311483/h1;
434 const double tmp0_42 = 0.11270166537925831148/h2;
435 const double tmp0_35 = -0.1/h1;
436 const double tmp0_36 = -0.78729833462074168852/h1;
437 const double tmp0_41 = 0.88729833462074168852/h2;
438 const double tmp0_8 = 0.88729833462074168852/h0;
439 const double tmp0_37 = 0.1/h1;
440 const double tmp0_29 = 0.25/h1;
441 const double tmp0_40 = -0.88729833462074168852/h2;
442 const double tmp0_9 = 0.11270166537925831148/h0;
443 const double tmp0_30 = -0.056350832689629155741/h1;
444 const double tmp0_28 = -0.25/h1;
445 const double tmp0_43 = -0.11270166537925831148/h2;
446 const double tmp0_32 = 0.056350832689629155741/h1;
447 const double tmp0_31 = -0.44364916731037084426/h1;
448 const double tmp0_39 = 0.78729833462074168852/h1;
449 const double tmp0_18 = 0.056350832689629155741/h1;
450 const double tmp0_45 = 0.5/h2;
451 const double tmp0_4 = -0.5/h0;
452 const double tmp0_19 = 0.44364916731037084426/h1;
453 const double tmp0_44 = -0.5/h2;
454 const double tmp0_5 = 0.5/h0;
455 const double tmp0_47 = 0.11270166537925831148/h2;
456 const double tmp0_6 = -0.11270166537925831148/h0;
457 const double tmp0_23 = -0.78729833462074168852/h1;
458 const double tmp0_46 = -0.11270166537925831148/h2;
459 const double tmp0_7 = -0.88729833462074168852/h0;
460 #pragma omp parallel for private(i,k2,k0)
461 for (k2 =0; k2 < N2; ++k2) {
462 for (k0 =0; k0 < N0; ++k0) {
463 for (i =0; i < NCOMP; ++i) {
464 register const double f_000 = in[INDEX2(i,INDEX3(k0,0,k2, M0,M1),NCOMP)];
465 register const double f_001 = in[INDEX2(i,INDEX3(k0,0,k2+1, M0,M1),NCOMP)];
466 register const double f_101 = in[INDEX2(i,INDEX3(k0+1,0,k2+1, M0,M1),NCOMP)];
467 register const double f_100 = in[INDEX2(i,INDEX3(k0+1,0,k2, M0,M1),NCOMP)];
468 register const double f_011 = in[INDEX2(i,INDEX3(k0,1,k2+1, M0,M1),NCOMP)];
469 register const double f_110 = in[INDEX2(i,INDEX3(k0+1,1,k2, M0,M1),NCOMP)];
470 register const double f_010 = in[INDEX2(i,INDEX3(k0,1,k2, M0,M1),NCOMP)];
471 register const double f_111 = in[INDEX2(i,INDEX3(k0+1,1,k2+1, M0,M1),NCOMP)];
472 out[INDEX4(i,0,0,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_0 + f_001*tmp0_1 + f_100*tmp0_3 + f_101*tmp0_2;
473 out[INDEX4(i,1,0,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_10 + f_010*tmp0_14 + f_101*tmp0_12 + f_111*tmp0_15 + tmp0_11*(f_001 + f_100) + tmp0_13*(f_011 + f_110);
474 out[INDEX4(i,2,0,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_40 + f_001*tmp0_41 + f_100*tmp0_43 + f_101*tmp0_42;
475 out[INDEX4(i,0,1,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_0 + f_001*tmp0_1 + f_100*tmp0_3 + f_101*tmp0_2;
476 out[INDEX4(i,1,1,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_16*(f_000 + f_100) + tmp0_17*(f_001 + f_101) + tmp0_18*(f_011 + f_111) + tmp0_19*(f_010 + f_110);
477 out[INDEX4(i,2,1,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_44*(f_000 + f_100) + tmp0_45*(f_001 + f_101);
478 out[INDEX4(i,0,2,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_0 + f_001*tmp0_1 + f_100*tmp0_3 + f_101*tmp0_2;
479 out[INDEX4(i,1,2,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_20 + f_001*tmp0_21 + f_010*tmp0_26 + f_011*tmp0_24 + f_100*tmp0_23 + f_101*tmp0_22 + f_110*tmp0_25 + f_111*tmp0_27;
480 out[INDEX4(i,2,2,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_46 + f_001*tmp0_47 + f_100*tmp0_49 + f_101*tmp0_48;
481 out[INDEX4(i,0,3,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_4*(f_000 + f_001) + tmp0_5*(f_100 + f_101);
482 out[INDEX4(i,1,3,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_16*(f_000 + f_001) + tmp0_17*(f_100 + f_101) + tmp0_18*(f_110 + f_111) + tmp0_19*(f_010 + f_011);
483 out[INDEX4(i,2,3,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_40 + f_001*tmp0_41 + f_100*tmp0_43 + f_101*tmp0_42;
484 out[INDEX4(i,0,4,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_4*(f_000 + f_001) + tmp0_5*(f_100 + f_101);
485 out[INDEX4(i,1,4,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_28*(f_000 + f_001 + f_100 + f_101) + tmp0_29*(f_010 + f_011 + f_110 + f_111);
486 out[INDEX4(i,2,4,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_44*(f_000 + f_100) + tmp0_45*(f_001 + f_101);
487 out[INDEX4(i,0,5,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_4*(f_000 + f_001) + tmp0_5*(f_100 + f_101);
488 out[INDEX4(i,1,5,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_30*(f_000 + f_001) + tmp0_31*(f_100 + f_101) + tmp0_32*(f_010 + f_011) + tmp0_33*(f_110 + f_111);
489 out[INDEX4(i,2,5,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_46 + f_001*tmp0_47 + f_100*tmp0_49 + f_101*tmp0_48;
490 out[INDEX4(i,0,6,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_6 + f_001*tmp0_7 + f_100*tmp0_9 + f_101*tmp0_8;
491 out[INDEX4(i,1,6,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_20 + f_001*tmp0_23 + f_010*tmp0_26 + f_011*tmp0_25 + f_100*tmp0_21 + f_101*tmp0_22 + f_110*tmp0_24 + f_111*tmp0_27;
492 out[INDEX4(i,2,6,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_40 + f_001*tmp0_41 + f_100*tmp0_43 + f_101*tmp0_42;
493 out[INDEX4(i,0,7,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_6 + f_001*tmp0_7 + f_100*tmp0_9 + f_101*tmp0_8;
494 out[INDEX4(i,1,7,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_30*(f_000 + f_100) + tmp0_31*(f_001 + f_101) + tmp0_32*(f_010 + f_110) + tmp0_33*(f_011 + f_111);
495 out[INDEX4(i,2,7,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_44*(f_000 + f_100) + tmp0_45*(f_001 + f_101);
496 out[INDEX4(i,0,8,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_6 + f_001*tmp0_7 + f_100*tmp0_9 + f_101*tmp0_8;
497 out[INDEX4(i,1,8,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_34 + f_010*tmp0_38 + f_101*tmp0_36 + f_111*tmp0_39 + tmp0_35*(f_001 + f_100) + tmp0_37*(f_011 + f_110);
498 out[INDEX4(i,2,8,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_46 + f_001*tmp0_47 + f_100*tmp0_49 + f_101*tmp0_48;
499 } /* close component loop i */
500 } /* close k0 loop */
501 } /* close k2 loop */
502 } /* end of face 2 */
503 if (face_offset(3)>-1) {
504 const double tmp0_22 = 0.1/h1;
505 const double tmp0_16 = 0.056350832689629155741/h1;
506 const double tmp0_33 = -0.44364916731037084426/h1;
507 const double tmp0_0 = -0.11270166537925831148/h0;
508 const double tmp0_21 = 0.78729833462074168852/h1;
509 const double tmp0_17 = 0.44364916731037084426/h1;
510 const double tmp0_1 = 0.88729833462074168852/h0;
511 const double tmp0_20 = 0.012701665379258311482/h1;
512 const double tmp0_14 = -0.012701665379258311482/h1;
513 const double tmp0_49 = 0.88729833462074168852/h2;
514 const double tmp0_2 = -0.88729833462074168852/h0;
515 const double tmp0_27 = -0.78729833462074168852/h1;
516 const double tmp0_15 = -0.1/h1;
517 const double tmp0_48 = -0.11270166537925831148/h2;
518 const double tmp0_3 = 0.11270166537925831148/h0;
519 const double tmp0_26 = -0.012701665379258311482/h1;
520 const double tmp0_12 = 0.012701665379258311482/h1;
521 const double tmp0_25 = -0.1/h1;
522 const double tmp0_13 = -0.78729833462074168852/h1;
523 const double tmp0_24 = -0.1/h1;
524 const double tmp0_10 = 0.1/h1;
525 const double tmp0_11 = 0.78729833462074168852/h1;
526 const double tmp0_38 = -0.78729833462074168852/h1;
527 const double tmp0_34 = 0.1/h1;
528 const double tmp0_42 = -0.88729833462074168852/h2;
529 const double tmp0_35 = 0.012701665379258311483/h1;
530 const double tmp0_36 = 0.78729833462074168852/h1;
531 const double tmp0_41 = -0.11270166537925831148/h2;
532 const double tmp0_8 = -0.11270166537925831148/h0;
533 const double tmp0_37 = -0.012701665379258311483/h1;
534 const double tmp0_29 = -0.25/h1;
535 const double tmp0_40 = 0.88729833462074168852/h2;
536 const double tmp0_9 = 0.88729833462074168852/h0;
537 const double tmp0_30 = 0.056350832689629155741/h1;
538 const double tmp0_28 = 0.25/h1;
539 const double tmp0_43 = 0.11270166537925831148/h2;
540 const double tmp0_32 = -0.056350832689629155741/h1;
541 const double tmp0_31 = 0.44364916731037084426/h1;
542 const double tmp0_39 = -0.1/h1;
543 const double tmp0_18 = -0.44364916731037084426/h1;
544 const double tmp0_45 = -0.5/h2;
545 const double tmp0_4 = -0.5/h0;
546 const double tmp0_19 = -0.056350832689629155741/h1;
547 const double tmp0_44 = 0.5/h2;
548 const double tmp0_5 = 0.5/h0;
549 const double tmp0_47 = -0.88729833462074168852/h2;
550 const double tmp0_6 = -0.88729833462074168852/h0;
551 const double tmp0_23 = 0.1/h1;
552 const double tmp0_46 = 0.11270166537925831148/h2;
553 const double tmp0_7 = 0.11270166537925831148/h0;
554 #pragma omp parallel for private(i,k2,k0)
555 for (k2 =0; k2 < N2; ++k2) {
556 for (k0 =0; k0 < N0; ++k0) {
557 for (i =0; i < NCOMP; ++i) {
558 register const double f_011 = in[INDEX2(i,INDEX3(k0,M1-1,k2+1, M0,M1),NCOMP)];
559 register const double f_110 = in[INDEX2(i,INDEX3(k0+1,M1-1,k2, M0,M1),NCOMP)];
560 register const double f_010 = in[INDEX2(i,INDEX3(k0,M1-1,k2, M0,M1),NCOMP)];
561 register const double f_111 = in[INDEX2(i,INDEX3(k0+1,M1-1,k2+1, M0,M1),NCOMP)];
562 register const double f_000 = in[INDEX2(i,INDEX3(k0,M1-2,k2, M0,M1),NCOMP)];
563 register const double f_101 = in[INDEX2(i,INDEX3(k0+1,M1-2,k2+1, M0,M1),NCOMP)];
564 register const double f_001 = in[INDEX2(i,INDEX3(k0,M1-2,k2+1, M0,M1),NCOMP)];
565 register const double f_100 = in[INDEX2(i,INDEX3(k0+1,M1-2,k2, M0,M1),NCOMP)];
566 out[INDEX4(i,0,0,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_010*tmp0_2 + f_011*tmp0_0 + f_110*tmp0_1 + f_111*tmp0_3;
567 out[INDEX4(i,1,0,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_13 + f_010*tmp0_11 + f_101*tmp0_14 + f_111*tmp0_12 + tmp0_10*(f_011 + f_110) + tmp0_15*(f_001 + f_100);
568 out[INDEX4(i,2,0,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_010*tmp0_42 + f_011*tmp0_40 + f_110*tmp0_41 + f_111*tmp0_43;
569 out[INDEX4(i,0,1,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_010*tmp0_2 + f_011*tmp0_0 + f_110*tmp0_1 + f_111*tmp0_3;
570 out[INDEX4(i,1,1,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_16*(f_011 + f_111) + tmp0_17*(f_010 + f_110) + tmp0_18*(f_000 + f_100) + tmp0_19*(f_001 + f_101);
571 out[INDEX4(i,2,1,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_44*(f_011 + f_111) + tmp0_45*(f_010 + f_110);
572 out[INDEX4(i,0,2,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_010*tmp0_2 + f_011*tmp0_0 + f_110*tmp0_1 + f_111*tmp0_3;
573 out[INDEX4(i,1,2,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_24 + f_001*tmp0_26 + f_010*tmp0_22 + f_011*tmp0_20 + f_100*tmp0_27 + f_101*tmp0_25 + f_110*tmp0_21 + f_111*tmp0_23;
574 out[INDEX4(i,2,2,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_010*tmp0_48 + f_011*tmp0_46 + f_110*tmp0_47 + f_111*tmp0_49;
575 out[INDEX4(i,0,3,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_4*(f_010 + f_011) + tmp0_5*(f_110 + f_111);
576 out[INDEX4(i,1,3,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_16*(f_110 + f_111) + tmp0_17*(f_010 + f_011) + tmp0_18*(f_000 + f_001) + tmp0_19*(f_100 + f_101);
577 out[INDEX4(i,2,3,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_010*tmp0_42 + f_011*tmp0_40 + f_110*tmp0_41 + f_111*tmp0_43;
578 out[INDEX4(i,0,4,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_4*(f_010 + f_011) + tmp0_5*(f_110 + f_111);
579 out[INDEX4(i,1,4,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_28*(f_010 + f_011 + f_110 + f_111) + tmp0_29*(f_000 + f_001 + f_100 + f_101);
580 out[INDEX4(i,2,4,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_44*(f_011 + f_111) + tmp0_45*(f_010 + f_110);
581 out[INDEX4(i,0,5,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_4*(f_010 + f_011) + tmp0_5*(f_110 + f_111);
582 out[INDEX4(i,1,5,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_30*(f_010 + f_011) + tmp0_31*(f_110 + f_111) + tmp0_32*(f_000 + f_001) + tmp0_33*(f_100 + f_101);
583 out[INDEX4(i,2,5,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_010*tmp0_48 + f_011*tmp0_46 + f_110*tmp0_47 + f_111*tmp0_49;
584 out[INDEX4(i,0,6,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_010*tmp0_8 + f_011*tmp0_6 + f_110*tmp0_7 + f_111*tmp0_9;
585 out[INDEX4(i,1,6,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_24 + f_001*tmp0_27 + f_010*tmp0_22 + f_011*tmp0_21 + f_100*tmp0_26 + f_101*tmp0_25 + f_110*tmp0_20 + f_111*tmp0_23;
586 out[INDEX4(i,2,6,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_010*tmp0_42 + f_011*tmp0_40 + f_110*tmp0_41 + f_111*tmp0_43;
587 out[INDEX4(i,0,7,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_010*tmp0_8 + f_011*tmp0_6 + f_110*tmp0_7 + f_111*tmp0_9;
588 out[INDEX4(i,1,7,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_30*(f_010 + f_110) + tmp0_31*(f_011 + f_111) + tmp0_32*(f_000 + f_100) + tmp0_33*(f_001 + f_101);
589 out[INDEX4(i,2,7,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_44*(f_011 + f_111) + tmp0_45*(f_010 + f_110);
590 out[INDEX4(i,0,8,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_010*tmp0_8 + f_011*tmp0_6 + f_110*tmp0_7 + f_111*tmp0_9;
591 out[INDEX4(i,1,8,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_37 + f_010*tmp0_35 + f_101*tmp0_38 + f_111*tmp0_36 + tmp0_34*(f_011 + f_110) + tmp0_39*(f_001 + f_100);
592 out[INDEX4(i,2,8,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_010*tmp0_48 + f_011*tmp0_46 + f_110*tmp0_47 + f_111*tmp0_49;
593 } /* close component loop i */
594 } /* close k0 loop */
595 } /* close k2 loop */
596 } /* end of face 3 */
597 if (face_offset(4)>-1) {
598 const double tmp0_22 = -0.012701665379258311482/h2;
599 const double tmp0_16 = -0.11270166537925831148/h1;
600 const double tmp0_33 = -0.012701665379258311482/h2;
601 const double tmp0_0 = -0.88729833462074168852/h0;
602 const double tmp0_21 = -0.1/h2;
603 const double tmp0_17 = -0.88729833462074168852/h1;
604 const double tmp0_1 = 0.88729833462074168852/h0;
605 const double tmp0_20 = -0.78729833462074168852/h2;
606 const double tmp0_14 = -0.5/h1;
607 const double tmp0_49 = 0.78729833462074168852/h2;
608 const double tmp0_2 = 0.11270166537925831148/h0;
609 const double tmp0_27 = -0.056350832689629155741/h2;
610 const double tmp0_15 = 0.5/h1;
611 const double tmp0_48 = 0.1/h2;
612 const double tmp0_3 = -0.11270166537925831148/h0;
613 const double tmp0_26 = -0.44364916731037084426/h2;
614 const double tmp0_12 = 0.11270166537925831148/h1;
615 const double tmp0_25 = 0.012701665379258311482/h2;
616 const double tmp0_13 = 0.88729833462074168852/h1;
617 const double tmp0_24 = 0.1/h2;
618 const double tmp0_10 = -0.88729833462074168852/h1;
619 const double tmp0_11 = -0.11270166537925831148/h1;
620 const double tmp0_38 = -0.25/h2;
621 const double tmp0_34 = 0.1/h2;
622 const double tmp0_42 = 0.056350832689629155741/h2;
623 const double tmp0_35 = 0.78729833462074168852/h2;
624 const double tmp0_36 = 0.012701665379258311482/h2;
625 const double tmp0_41 = -0.44364916731037084426/h2;
626 const double tmp0_8 = 0.88729833462074168852/h0;
627 const double tmp0_37 = 0.1/h2;
628 const double tmp0_29 = 0.056350832689629155741/h2;
629 const double tmp0_40 = -0.056350832689629155741/h2;
630 const double tmp0_9 = -0.88729833462074168852/h0;
631 const double tmp0_30 = -0.1/h2;
632 const double tmp0_28 = 0.44364916731037084426/h2;
633 const double tmp0_43 = 0.44364916731037084426/h2;
634 const double tmp0_32 = -0.1/h2;
635 const double tmp0_31 = -0.78729833462074168852/h2;
636 const double tmp0_39 = 0.25/h2;
637 const double tmp0_18 = 0.88729833462074168852/h1;
638 const double tmp0_45 = -0.1/h2;
639 const double tmp0_4 = -0.5/h0;
640 const double tmp0_19 = 0.11270166537925831148/h1;
641 const double tmp0_44 = -0.012701665379258311483/h2;
642 const double tmp0_5 = 0.5/h0;
643 const double tmp0_47 = 0.012701665379258311483/h2;
644 const double tmp0_6 = -0.11270166537925831148/h0;
645 const double tmp0_23 = 0.78729833462074168852/h2;
646 const double tmp0_46 = -0.78729833462074168852/h2;
647 const double tmp0_7 = 0.11270166537925831148/h0;
648 #pragma omp parallel for private(i,k1,k0)
649 for (k1 =0; k1 < N1; ++k1) {
650 for (k0 =0; k0 < N0; ++k0) {
651 for (i =0; i < NCOMP; ++i) {
652 register const double f_000 = in[INDEX2(i,INDEX3(k0,k1,0, M0,M1),NCOMP)];
653 register const double f_100 = in[INDEX2(i,INDEX3(k0+1,k1,0, M0,M1),NCOMP)];
654 register const double f_110 = in[INDEX2(i,INDEX3(k0+1,k1+1,0, M0,M1),NCOMP)];
655 register const double f_010 = in[INDEX2(i,INDEX3(k0,k1+1,0, M0,M1),NCOMP)];
656 register const double f_001 = in[INDEX2(i,INDEX3(k0,k1,1, M0,M1),NCOMP)];
657 register const double f_101 = in[INDEX2(i,INDEX3(k0+1,k1,1, M0,M1),NCOMP)];
658 register const double f_011 = in[INDEX2(i,INDEX3(k0,k1+1,1, M0,M1),NCOMP)];
659 register const double f_111 = in[INDEX2(i,INDEX3(k0+1,k1+1,1, M0,M1),NCOMP)];
660 out[INDEX4(i,0,0,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_0 + f_010*tmp0_3 + f_100*tmp0_1 + f_110*tmp0_2;
661 out[INDEX4(i,1,0,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_10 + f_010*tmp0_13 + f_100*tmp0_11 + f_110*tmp0_12;
662 out[INDEX4(i,2,0,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_20 + f_001*tmp0_23 + f_110*tmp0_22 + f_111*tmp0_25 + tmp0_21*(f_010 + f_100) + tmp0_24*(f_011 + f_101);
663 out[INDEX4(i,0,1,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_0 + f_010*tmp0_3 + f_100*tmp0_1 + f_110*tmp0_2;
664 out[INDEX4(i,1,1,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_14*(f_000 + f_100) + tmp0_15*(f_010 + f_110);
665 out[INDEX4(i,2,1,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_26*(f_000 + f_100) + tmp0_27*(f_010 + f_110) + tmp0_28*(f_001 + f_101) + tmp0_29*(f_011 + f_111);
666 out[INDEX4(i,0,2,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_0 + f_010*tmp0_3 + f_100*tmp0_1 + f_110*tmp0_2;
667 out[INDEX4(i,1,2,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_16 + f_010*tmp0_19 + f_100*tmp0_17 + f_110*tmp0_18;
668 out[INDEX4(i,2,2,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_30 + f_001*tmp0_34 + f_010*tmp0_33 + f_011*tmp0_36 + f_100*tmp0_31 + f_101*tmp0_35 + f_110*tmp0_32 + f_111*tmp0_37;
669 out[INDEX4(i,0,3,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_4*(f_000 + f_010) + tmp0_5*(f_100 + f_110);
670 out[INDEX4(i,1,3,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_10 + f_010*tmp0_13 + f_100*tmp0_11 + f_110*tmp0_12;
671 out[INDEX4(i,2,3,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_26*(f_000 + f_010) + tmp0_27*(f_100 + f_110) + tmp0_28*(f_001 + f_011) + tmp0_29*(f_101 + f_111);
672 out[INDEX4(i,0,4,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_4*(f_000 + f_010) + tmp0_5*(f_100 + f_110);
673 out[INDEX4(i,1,4,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_14*(f_000 + f_100) + tmp0_15*(f_010 + f_110);
674 out[INDEX4(i,2,4,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_38*(f_000 + f_010 + f_100 + f_110) + tmp0_39*(f_001 + f_011 + f_101 + f_111);
675 out[INDEX4(i,0,5,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_4*(f_000 + f_010) + tmp0_5*(f_100 + f_110);
676 out[INDEX4(i,1,5,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_16 + f_010*tmp0_19 + f_100*tmp0_17 + f_110*tmp0_18;
677 out[INDEX4(i,2,5,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_40*(f_000 + f_010) + tmp0_41*(f_100 + f_110) + tmp0_42*(f_001 + f_011) + tmp0_43*(f_101 + f_111);
678 out[INDEX4(i,0,6,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_6 + f_010*tmp0_9 + f_100*tmp0_7 + f_110*tmp0_8;
679 out[INDEX4(i,1,6,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_10 + f_010*tmp0_13 + f_100*tmp0_11 + f_110*tmp0_12;
680 out[INDEX4(i,2,6,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_30 + f_001*tmp0_34 + f_010*tmp0_31 + f_011*tmp0_35 + f_100*tmp0_33 + f_101*tmp0_36 + f_110*tmp0_32 + f_111*tmp0_37;
681 out[INDEX4(i,0,7,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_6 + f_010*tmp0_9 + f_100*tmp0_7 + f_110*tmp0_8;
682 out[INDEX4(i,1,7,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_14*(f_000 + f_100) + tmp0_15*(f_010 + f_110);
683 out[INDEX4(i,2,7,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_40*(f_000 + f_100) + tmp0_41*(f_010 + f_110) + tmp0_42*(f_001 + f_101) + tmp0_43*(f_011 + f_111);
684 out[INDEX4(i,0,8,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_6 + f_010*tmp0_9 + f_100*tmp0_7 + f_110*tmp0_8;
685 out[INDEX4(i,1,8,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_16 + f_010*tmp0_19 + f_100*tmp0_17 + f_110*tmp0_18;
686 out[INDEX4(i,2,8,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_44 + f_001*tmp0_47 + f_110*tmp0_46 + f_111*tmp0_49 + tmp0_45*(f_010 + f_100) + tmp0_48*(f_011 + f_101);
687 } /* close component loop i */
688 } /* close k0 loop */
689 } /* close k1 loop */
690 } /* end of face 4 */
691 if (face_offset(5)>-1) {
692 const double tmp0_22 = 0.012701665379258311482/h2;
693 const double tmp0_16 = -0.11270166537925831148/h1;
694 const double tmp0_33 = 0.1/h2;
695 const double tmp0_0 = -0.88729833462074168852/h0;
696 const double tmp0_21 = 0.1/h2;
697 const double tmp0_17 = -0.88729833462074168852/h1;
698 const double tmp0_1 = 0.88729833462074168852/h0;
699 const double tmp0_20 = 0.78729833462074168852/h2;
700 const double tmp0_14 = -0.5/h1;
701 const double tmp0_49 = -0.78729833462074168852/h2;
702 const double tmp0_2 = -0.11270166537925831148/h0;
703 const double tmp0_27 = 0.056350832689629155741/h2;
704 const double tmp0_15 = 0.5/h1;
705 const double tmp0_48 = -0.1/h2;
706 const double tmp0_3 = 0.11270166537925831148/h0;
707 const double tmp0_26 = 0.44364916731037084426/h2;
708 const double tmp0_12 = 0.88729833462074168852/h1;
709 const double tmp0_25 = -0.012701665379258311482/h2;
710 const double tmp0_13 = 0.11270166537925831148/h1;
711 const double tmp0_24 = -0.1/h2;
712 const double tmp0_10 = -0.88729833462074168852/h1;
713 const double tmp0_11 = -0.11270166537925831148/h1;
714 const double tmp0_38 = 0.25/h2;
715 const double tmp0_34 = -0.1/h2;
716 const double tmp0_42 = -0.056350832689629155741/h2;
717 const double tmp0_35 = -0.78729833462074168852/h2;
718 const double tmp0_36 = -0.1/h2;
719 const double tmp0_41 = 0.44364916731037084426/h2;
720 const double tmp0_8 = -0.88729833462074168852/h0;
721 const double tmp0_37 = -0.012701665379258311482/h2;
722 const double tmp0_29 = -0.056350832689629155741/h2;
723 const double tmp0_40 = 0.056350832689629155741/h2;
724 const double tmp0_9 = 0.88729833462074168852/h0;
725 const double tmp0_30 = 0.1/h2;
726 const double tmp0_28 = -0.44364916731037084426/h2;
727 const double tmp0_43 = -0.44364916731037084426/h2;
728 const double tmp0_32 = 0.012701665379258311482/h2;
729 const double tmp0_31 = 0.78729833462074168852/h2;
730 const double tmp0_39 = -0.25/h2;
731 const double tmp0_18 = 0.11270166537925831148/h1;
732 const double tmp0_45 = 0.1/h2;
733 const double tmp0_4 = -0.5/h0;
734 const double tmp0_19 = 0.88729833462074168852/h1;
735 const double tmp0_44 = 0.012701665379258311483/h2;
736 const double tmp0_5 = 0.5/h0;
737 const double tmp0_47 = -0.012701665379258311483/h2;
738 const double tmp0_6 = -0.11270166537925831148/h0;
739 const double tmp0_23 = -0.78729833462074168852/h2;
740 const double tmp0_46 = 0.78729833462074168852/h2;
741 const double tmp0_7 = 0.11270166537925831148/h0;
742 #pragma omp parallel for private(i,k1,k0)
743 for (k1 =0; k1 < N1; ++k1) {
744 for (k0 =0; k0 < N0; ++k0) {
745 for (i =0; i < NCOMP; ++i) {
746 register const double f_001 = in[INDEX2(i,INDEX3(k0,k1,M2-1, M0,M1),NCOMP)];
747 register const double f_101 = in[INDEX2(i,INDEX3(k0+1,k1,M2-1, M0,M1),NCOMP)];
748 register const double f_011 = in[INDEX2(i,INDEX3(k0,k1+1,M2-1, M0,M1),NCOMP)];
749 register const double f_111 = in[INDEX2(i,INDEX3(k0+1,k1+1,M2-1, M0,M1),NCOMP)];
750 register const double f_000 = in[INDEX2(i,INDEX3(k0,k1,M2-2, M0,M1),NCOMP)];
751 register const double f_100 = in[INDEX2(i,INDEX3(k0+1,k1,M2-2, M0,M1),NCOMP)];
752 register const double f_110 = in[INDEX2(i,INDEX3(k0+1,k1+1,M2-2, M0,M1),NCOMP)];
753 register const double f_010 = in[INDEX2(i,INDEX3(k0,k1+1,M2-2, M0,M1),NCOMP)];
754 out[INDEX4(i,0,0,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_001*tmp0_0 + f_011*tmp0_2 + f_101*tmp0_1 + f_111*tmp0_3;
755 out[INDEX4(i,1,0,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_001*tmp0_10 + f_011*tmp0_12 + f_101*tmp0_11 + f_111*tmp0_13;
756 out[INDEX4(i,2,0,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_23 + f_001*tmp0_20 + f_110*tmp0_25 + f_111*tmp0_22 + tmp0_21*(f_011 + f_101) + tmp0_24*(f_010 + f_100);
757 out[INDEX4(i,0,1,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_001*tmp0_0 + f_011*tmp0_2 + f_101*tmp0_1 + f_111*tmp0_3;
758 out[INDEX4(i,1,1,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_14*(f_001 + f_101) + tmp0_15*(f_011 + f_111);
759 out[INDEX4(i,2,1,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_26*(f_001 + f_101) + tmp0_27*(f_011 + f_111) + tmp0_28*(f_000 + f_100) + tmp0_29*(f_010 + f_110);
760 out[INDEX4(i,0,2,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_001*tmp0_0 + f_011*tmp0_2 + f_101*tmp0_1 + f_111*tmp0_3;
761 out[INDEX4(i,1,2,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_001*tmp0_16 + f_011*tmp0_18 + f_101*tmp0_17 + f_111*tmp0_19;
762 out[INDEX4(i,2,2,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_34 + f_001*tmp0_30 + f_010*tmp0_37 + f_011*tmp0_32 + f_100*tmp0_35 + f_101*tmp0_31 + f_110*tmp0_36 + f_111*tmp0_33;
763 out[INDEX4(i,0,3,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_4*(f_001 + f_011) + tmp0_5*(f_101 + f_111);
764 out[INDEX4(i,1,3,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_001*tmp0_10 + f_011*tmp0_12 + f_101*tmp0_11 + f_111*tmp0_13;
765 out[INDEX4(i,2,3,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_26*(f_001 + f_011) + tmp0_27*(f_101 + f_111) + tmp0_28*(f_000 + f_010) + tmp0_29*(f_100 + f_110);
766 out[INDEX4(i,0,4,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_4*(f_001 + f_011) + tmp0_5*(f_101 + f_111);
767 out[INDEX4(i,1,4,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_14*(f_001 + f_101) + tmp0_15*(f_011 + f_111);
768 out[INDEX4(i,2,4,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_38*(f_001 + f_011 + f_101 + f_111) + tmp0_39*(f_000 + f_010 + f_100 + f_110);
769 out[INDEX4(i,0,5,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_4*(f_001 + f_011) + tmp0_5*(f_101 + f_111);
770 out[INDEX4(i,1,5,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_001*tmp0_16 + f_011*tmp0_18 + f_101*tmp0_17 + f_111*tmp0_19;
771 out[INDEX4(i,2,5,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_40*(f_001 + f_011) + tmp0_41*(f_101 + f_111) + tmp0_42*(f_000 + f_010) + tmp0_43*(f_100 + f_110);
772 out[INDEX4(i,0,6,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_001*tmp0_6 + f_011*tmp0_8 + f_101*tmp0_7 + f_111*tmp0_9;
773 out[INDEX4(i,1,6,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_001*tmp0_10 + f_011*tmp0_12 + f_101*tmp0_11 + f_111*tmp0_13;
774 out[INDEX4(i,2,6,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_34 + f_001*tmp0_30 + f_010*tmp0_35 + f_011*tmp0_31 + f_100*tmp0_37 + f_101*tmp0_32 + f_110*tmp0_36 + f_111*tmp0_33;
775 out[INDEX4(i,0,7,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_001*tmp0_6 + f_011*tmp0_8 + f_101*tmp0_7 + f_111*tmp0_9;
776 out[INDEX4(i,1,7,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_14*(f_001 + f_101) + tmp0_15*(f_011 + f_111);
777 out[INDEX4(i,2,7,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = tmp0_40*(f_001 + f_101) + tmp0_41*(f_011 + f_111) + tmp0_42*(f_000 + f_100) + tmp0_43*(f_010 + f_110);
778 out[INDEX4(i,0,8,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_001*tmp0_6 + f_011*tmp0_8 + f_101*tmp0_7 + f_111*tmp0_9;
779 out[INDEX4(i,1,8,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_001*tmp0_16 + f_011*tmp0_18 + f_101*tmp0_17 + f_111*tmp0_19;
780 out[INDEX4(i,2,8,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,9)] = f_000*tmp0_47 + f_001*tmp0_44 + f_110*tmp0_49 + f_111*tmp0_46 + tmp0_45*(f_011 + f_101) + tmp0_48*(f_010 + f_100);
781 } /* close component loop i */
782 } /* close k0 loop */
783 } /* close k1 loop */
784 } /* end of face 5 */
785 } else if (out_data_type==RIPLEY_REDUCED_BOUNDARY_ELEMENTS) {
786 if (face_offset(0)>-1) {
787 const double tmp0_0 = -0.25/h0;
788 const double tmp0_4 = -0.5/h2;
789 const double tmp0_1 = 0.25/h0;
790 const double tmp0_5 = 0.5/h2;
791 const double tmp0_2 = -0.5/h1;
792 const double tmp0_3 = 0.5/h1;
793 #pragma omp parallel for private(i,k2,k1)
794 for (k2 =0; k2 < N2; ++k2) {
795 for (k1 =0; k1 < N1; ++k1) {
796 for (i =0; i < NCOMP; ++i) {
797 register const double f_000 = in[INDEX2(i,INDEX3(0,k1,k2, M0,M1),NCOMP)];
798 register const double f_001 = in[INDEX2(i,INDEX3(0,k1,k2+1, M0,M1),NCOMP)];
799 register const double f_101 = in[INDEX2(i,INDEX3(1,k1,k2+1, M0,M1),NCOMP)];
800 register const double f_011 = in[INDEX2(i,INDEX3(0,k1+1,k2+1, M0,M1),NCOMP)];
801 register const double f_100 = in[INDEX2(i,INDEX3(1,k1,k2, M0,M1),NCOMP)];
802 register const double f_110 = in[INDEX2(i,INDEX3(1,k1+1,k2, M0,M1),NCOMP)];
803 register const double f_010 = in[INDEX2(i,INDEX3(0,k1+1,k2, M0,M1),NCOMP)];
804 register const double f_111 = in[INDEX2(i,INDEX3(1,k1+1,k2+1, M0,M1),NCOMP)];
805 out[INDEX4(i,0,0,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_0*(f_000 + f_001 + f_010 + f_011) + tmp0_1*(f_100 + f_101 + f_110 + f_111);
806 out[INDEX4(i,1,0,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_2*(f_000 + f_001) + tmp0_3*(f_010 + f_011);
807 out[INDEX4(i,2,0,face_offset(0)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_4*(f_000 + f_010) + tmp0_5*(f_001 + f_011);
808 } /* close component loop i */
809 } /* close k1 loop */
810 } /* close k2 loop */
811 } /* end of face 0 */
812 if (face_offset(1)>-1) {
813 const double tmp0_0 = -0.25/h0;
814 const double tmp0_4 = 0.5/h2;
815 const double tmp0_1 = 0.25/h0;
816 const double tmp0_5 = -0.5/h2;
817 const double tmp0_2 = -0.5/h1;
818 const double tmp0_3 = 0.5/h1;
819 #pragma omp parallel for private(i,k2,k1)
820 for (k2 =0; k2 < N2; ++k2) {
821 for (k1 =0; k1 < N1; ++k1) {
822 for (i =0; i < NCOMP; ++i) {
823 register const double f_000 = in[INDEX2(i,INDEX3(M0-2,k1,k2, M0,M1),NCOMP)];
824 register const double f_001 = in[INDEX2(i,INDEX3(M0-2,k1,k2+1, M0,M1),NCOMP)];
825 register const double f_101 = in[INDEX2(i,INDEX3(M0-1,k1,k2+1, M0,M1),NCOMP)];
826 register const double f_011 = in[INDEX2(i,INDEX3(M0-2,k1+1,k2+1, M0,M1),NCOMP)];
827 register const double f_100 = in[INDEX2(i,INDEX3(M0-1,k1,k2, M0,M1),NCOMP)];
828 register const double f_110 = in[INDEX2(i,INDEX3(M0-1,k1+1,k2, M0,M1),NCOMP)];
829 register const double f_010 = in[INDEX2(i,INDEX3(M0-2,k1+1,k2, M0,M1),NCOMP)];
830 register const double f_111 = in[INDEX2(i,INDEX3(M0-1,k1+1,k2+1, M0,M1),NCOMP)];
831 out[INDEX4(i,0,0,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_0*(f_000 + f_001 + f_010 + f_011) + tmp0_1*(f_100 + f_101 + f_110 + f_111);
832 out[INDEX4(i,1,0,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_2*(f_100 + f_101) + tmp0_3*(f_110 + f_111);
833 out[INDEX4(i,2,0,face_offset(1)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_4*(f_101 + f_111) + tmp0_5*(f_100 + f_110);
834 } /* close component loop i */
835 } /* close k1 loop */
836 } /* close k2 loop */
837 } /* end of face 1 */
838 if (face_offset(2)>-1) {
839 const double tmp0_0 = -0.5/h0;
840 const double tmp0_4 = -0.5/h2;
841 const double tmp0_1 = 0.5/h0;
842 const double tmp0_5 = 0.5/h2;
843 const double tmp0_2 = -0.25/h1;
844 const double tmp0_3 = 0.25/h1;
845 #pragma omp parallel for private(i,k2,k0)
846 for (k2 =0; k2 < N2; ++k2) {
847 for (k0 =0; k0 < N0; ++k0) {
848 for (i =0; i < NCOMP; ++i) {
849 register const double f_000 = in[INDEX2(i,INDEX3(k0,0,k2, M0,M1),NCOMP)];
850 register const double f_001 = in[INDEX2(i,INDEX3(k0,0,k2+1, M0,M1),NCOMP)];
851 register const double f_101 = in[INDEX2(i,INDEX3(k0+1,0,k2+1, M0,M1),NCOMP)];
852 register const double f_100 = in[INDEX2(i,INDEX3(k0+1,0,k2, M0,M1),NCOMP)];
853 register const double f_011 = in[INDEX2(i,INDEX3(k0,1,k2+1, M0,M1),NCOMP)];
854 register const double f_110 = in[INDEX2(i,INDEX3(k0+1,1,k2, M0,M1),NCOMP)];
855 register const double f_010 = in[INDEX2(i,INDEX3(k0,1,k2, M0,M1),NCOMP)];
856 register const double f_111 = in[INDEX2(i,INDEX3(k0+1,1,k2+1, M0,M1),NCOMP)];
857 out[INDEX4(i,0,0,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_0*(f_000 + f_001) + tmp0_1*(f_100 + f_101);
858 out[INDEX4(i,1,0,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_2*(f_000 + f_001 + f_100 + f_101) + tmp0_3*(f_010 + f_011 + f_110 + f_111);
859 out[INDEX4(i,2,0,face_offset(2)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_4*(f_000 + f_100) + tmp0_5*(f_001 + f_101);
860 } /* close component loop i */
861 } /* close k0 loop */
862 } /* close k2 loop */
863 } /* end of face 2 */
864 if (face_offset(3)>-1) {
865 const double tmp0_0 = -0.5/h0;
866 const double tmp0_4 = 0.5/h2;
867 const double tmp0_1 = 0.5/h0;
868 const double tmp0_5 = -0.5/h2;
869 const double tmp0_2 = 0.25/h1;
870 const double tmp0_3 = -0.25/h1;
871 #pragma omp parallel for private(i,k2,k0)
872 for (k2 =0; k2 < N2; ++k2) {
873 for (k0 =0; k0 < N0; ++k0) {
874 for (i =0; i < NCOMP; ++i) {
875 register const double f_011 = in[INDEX2(i,INDEX3(k0,M1-1,k2+1, M0,M1),NCOMP)];
876 register const double f_110 = in[INDEX2(i,INDEX3(k0+1,M1-1,k2, M0,M1),NCOMP)];
877 register const double f_010 = in[INDEX2(i,INDEX3(k0,M1-1,k2, M0,M1),NCOMP)];
878 register const double f_111 = in[INDEX2(i,INDEX3(k0+1,M1-1,k2+1, M0,M1),NCOMP)];
879 register const double f_000 = in[INDEX2(i,INDEX3(k0,M1-2,k2, M0,M1),NCOMP)];
880 register const double f_101 = in[INDEX2(i,INDEX3(k0+1,M1-2,k2+1, M0,M1),NCOMP)];
881 register const double f_001 = in[INDEX2(i,INDEX3(k0,M1-2,k2+1, M0,M1),NCOMP)];
882 register const double f_100 = in[INDEX2(i,INDEX3(k0+1,M1-2,k2, M0,M1),NCOMP)];
883 out[INDEX4(i,0,0,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_0*(f_010 + f_011) + tmp0_1*(f_110 + f_111);
884 out[INDEX4(i,1,0,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_2*(f_010 + f_011 + f_110 + f_111) + tmp0_3*(f_000 + f_001 + f_100 + f_101);
885 out[INDEX4(i,2,0,face_offset(3)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_4*(f_011 + f_111) + tmp0_5*(f_010 + f_110);
886 } /* close component loop i */
887 } /* close k0 loop */
888 } /* close k2 loop */
889 } /* end of face 3 */
890 if (face_offset(4)>-1) {
891 const double tmp0_0 = -0.5/h0;
892 const double tmp0_4 = -0.25/h2;
893 const double tmp0_1 = 0.5/h0;
894 const double tmp0_5 = 0.25/h2;
895 const double tmp0_2 = -0.5/h1;
896 const double tmp0_3 = 0.5/h1;
897 #pragma omp parallel for private(i,k1,k0)
898 for (k1 =0; k1 < N1; ++k1) {
899 for (k0 =0; k0 < N0; ++k0) {
900 for (i =0; i < NCOMP; ++i) {
901 register const double f_000 = in[INDEX2(i,INDEX3(k0,k1,0, M0,M1),NCOMP)];
902 register const double f_100 = in[INDEX2(i,INDEX3(k0+1,k1,0, M0,M1),NCOMP)];
903 register const double f_110 = in[INDEX2(i,INDEX3(k0+1,k1+1,0, M0,M1),NCOMP)];
904 register const double f_010 = in[INDEX2(i,INDEX3(k0,k1+1,0, M0,M1),NCOMP)];
905 register const double f_001 = in[INDEX2(i,INDEX3(k0,k1,1, M0,M1),NCOMP)];
906 register const double f_101 = in[INDEX2(i,INDEX3(k0+1,k1,1, M0,M1),NCOMP)];
907 register const double f_011 = in[INDEX2(i,INDEX3(k0,k1+1,1, M0,M1),NCOMP)];
908 register const double f_111 = in[INDEX2(i,INDEX3(k0+1,k1+1,1, M0,M1),NCOMP)];
909 out[INDEX4(i,0,0,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_0*(f_000 + f_010) + tmp0_1*(f_100 + f_110);
910 out[INDEX4(i,1,0,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_2*(f_000 + f_100) + tmp0_3*(f_010 + f_110);
911 out[INDEX4(i,2,0,face_offset(4)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_4*(f_000 + f_010 + f_100 + f_110) + tmp0_5*(f_001 + f_011 + f_101 + f_111);
912 } /* close component loop i */
913 } /* close k0 loop */
914 } /* close k1 loop */
915 } /* end of face 4 */
916 if (face_offset(5)>-1) {
917 const double tmp0_0 = -0.5/h0;
918 const double tmp0_4 = 0.25/h2;
919 const double tmp0_1 = 0.5/h0;
920 const double tmp0_5 = -0.25/h2;
921 const double tmp0_2 = -0.5/h1;
922 const double tmp0_3 = 0.5/h1;
923 #pragma omp parallel for private(i,k1,k0)
924 for (k1 =0; k1 < N1; ++k1) {
925 for (k0 =0; k0 < N0; ++k0) {
926 for (i =0; i < NCOMP; ++i) {
927 register const double f_001 = in[INDEX2(i,INDEX3(k0,k1,M2-1, M0,M1),NCOMP)];
928 register const double f_101 = in[INDEX2(i,INDEX3(k0+1,k1,M2-1, M0,M1),NCOMP)];
929 register const double f_011 = in[INDEX2(i,INDEX3(k0,k1+1,M2-1, M0,M1),NCOMP)];
930 register const double f_111 = in[INDEX2(i,INDEX3(k0+1,k1+1,M2-1, M0,M1),NCOMP)];
931 register const double f_000 = in[INDEX2(i,INDEX3(k0,k1,M2-2, M0,M1),NCOMP)];
932 register const double f_100 = in[INDEX2(i,INDEX3(k0+1,k1,M2-2, M0,M1),NCOMP)];
933 register const double f_110 = in[INDEX2(i,INDEX3(k0+1,k1+1,M2-2, M0,M1),NCOMP)];
934 register const double f_010 = in[INDEX2(i,INDEX3(k0,k1+1,M2-2, M0,M1),NCOMP)];
935 out[INDEX4(i,0,0,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_0*(f_001 + f_011) + tmp0_1*(f_101 + f_111);
936 out[INDEX4(i,1,0,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_2*(f_001 + f_101) + tmp0_3*(f_011 + f_111);
937 out[INDEX4(i,2,0,face_offset(5)+INDEX3(k0,k1,k2,N0,N1),NCOMP,3,1)] = tmp0_4*(f_001 + f_011 + f_101 + f_111) + tmp0_5*(f_000 + f_010 + f_100 + f_110);
938 } /* close component loop i */
939 } /* close k0 loop */
940 } /* close k1 loop */
941 } /* end of face 5 */
942 } /* end of out_data_type branching
943 /* GENERATOR SNIP BOTTOM */
944 }

  ViewVC Help
Powered by ViewVC 1.1.26