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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3641 - (show annotations)
Thu Oct 27 02:16:12 2011 UTC (7 years, 11 months ago) by gross
File MIME type: text/plain
File size: 86139 byte(s)
more work on the assemblage
1 /*******************************************************
2 *
3 * Copyright (c) 2003-2010 by University of Queensland
4 * Earth Systems Science Computational Center (ESSCC)
5 * http://www.uq.edu.au/esscc
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 *******************************************************/
12 /**************************************************************/
13 /* */
14 /* assembles single PDEs into the stiffness matrix S right hand side F */
15 /* */
16 /* -(A_{i,j} u=,j)_i-(B_{i} u)_i+C_{j} u,j-D u and -(X_{,i})_i + Y */
17 /* */
18 /* u has p.numComp components in a 2D domain. The shape functions for test and solution must be identical */
19 /* */
20 /* Shape of the coefficients: */
21 /* A = DIM x DIM */
22 /* B = DIM */
23 /* C = DIM */
24 /* D = scalar */
25 /* X = DIM */
26 /* Y = scalar */
27 /* */
28 /**************************************************************/
29 #include "Assemble.h"
30 #include "Util.h"
31 #ifdef _OPENMP
32 #include <omp.h>
33 #endif
34 /**************************************************************/
35 void Finley_Assemble_PDE_Single_2D(Finley_Assemble_Parameters p,
36 Finley_ElementFile* elements,
37 Paso_SystemMatrix* Mat, escriptDataC* F,
38 escriptDataC* A, escriptDataC* B, escriptDataC* C, escriptDataC* D, escriptDataC* X, escriptDataC* Y) {
39 #define DIM 2
40 index_t color;
41 dim_t e, isub;
42 __const double *A_p, *B_p, *C_p, *D_p, *X_p, *Y_p, *A_q, *B_q, *C_q, *D_q, *X_q, *Y_q;
43 double *EM_S, *EM_F, *Vol, *DSDX;
44 index_t *row_index;
45 register dim_t q, s,r,k,m;
46 register double rtmp, rtmp0, rtmp1, rtmp2, rtmp00, rtmp01, rtmp02, rtmp10, rtmp11, rtmp12, rtmp20, rtmp21, rtmp22;
47 bool_t add_EM_F, add_EM_S;
48 bool_t extendedA=isExpanded(A);
49 bool_t extendedB=isExpanded(B);
50 bool_t extendedC=isExpanded(C);
51 bool_t extendedD=isExpanded(D);
52 bool_t extendedX=isExpanded(X);
53 bool_t extendedY=isExpanded(Y);
54 double *F_p=(requireWrite(F), getSampleDataRW(F,0)); /* use comma, to get around the mixed code and declarations thing */
55 dim_t len_EM_S=p.row_numShapesTotal*p.col_numShapesTotal*p.numEqu*p.numComp;
56 dim_t len_EM_F=p.row_numShapesTotal*p.numEqu;
57 {
58 /* GENERATOR SNIP_PRE TOP */
59 const double w56 = -0.048598662630909980773*h1;
60 const double w13 = -0.049382716049382716049*h1/h0;
61 const double w67 = -0.0034784464623227873914*h0;
62 const double w23 = -0.0077160493827160493827*h0/h1;
63 const double w60 = -0.0061728395061728395062*h0;
64 const double w10 = -0.030864197530864197531*h1/h0;
65 const double w74 = 0.0034784464623227873914*h1;
66 const double w95 = -0.083333333333333333333*h0;
67 const double w127 = 0.10954300427416564056*h1;
68 const double w65 = -0.00086961161558069684786*h0;
69 const double w98 = 0.083333333333333333333*h0;
70 const double w68 = -0.00086961161558069684786*h1;
71 const double w128 = 0.061728395061728395062*h1;
72 const double w130 = 0.0086961161558069684786*h1;
73 const double w75 = 0.00086961161558069684786*h0;
74 const double w91 = 0.048598662630909980773*h0;
75 const double w121 = -0.098765432098765432099*h1;
76 const double w102 = 0.0060748328288637475966*h0*h1;
77 const double w27 = -0.049382716049382716049*h0/h1;
78 const double w29 = 0.060748328288637475966*h0/h1;
79 const double w28 = 0.060748328288637475966*h1/h0;
80 const double w148 = 0.25*h0*h1;
81 const double w107 = 0.00039202670923636763834*h0*h1;
82 const double w86 = -0.048598662630909980773*h0;
83 const double w2 = -0.060748328288637475966;
84 const double w45 = 0.25000000000000000000;
85 const double w55 = -0.0068464377671353525349*h0;
86 const double w12 = 0.012345679012345679012*h0/h1;
87 const double w25 = -0.030864197530864197531*h0/h1;
88 const double w8 = 0.060748328288637475966;
89 const double w62 = -0.024691358024691358025*h0;
90 const double w125 = -0.013913785849291149566*h1;
91 const double w104 = 0.0030864197530864197531*h0*h1;
92 const double w109 = 0.047827057692638375834*h0*h1;
93 const double w48 = -0.16666666666666666667*h1/h0;
94 const double w40 = 0.012345679012345679012*h1/h0;
95 const double w119 = -0.061728395061728395062*h1;
96 const double w32 = 0.030864197530864197531*h1/h0;
97 const double w81 = 0.053901890521502123431*h1;
98 const double w19 = 0.00098006677309091909584;
99 const double w39 = -0.00098006677309091909584*h0/h1;
100 const double w77 = 0.0034784464623227873914*h0;
101 const double w14 = 0.049382716049382716049;
102 const double w138 = -0.5*h1;
103 const double w110 = 0.0000124484802011303384*h0*h1;
104 const double w1 = 0.0077160493827160493827;
105 const double w42 = -0.0015681068369454705533*h0/h1;
106 const double w99 = -0.16666666666666666667*h0;
107 const double w115 = -0.068464377671353525349*h0;
108 const double w58 = -0.053901890521502123431*h1;
109 const double w118 = -0.0086961161558069684786*h0;
110 const double w103 = 0.024299331315454990386*h0*h1;
111 const double w140 = 0.5*h1;
112 const double w22 = -0.0077160493827160493827*h1/h0;
113 const double w97 = 0.16666666666666666667*h1;
114 const double w146 = 0.0069568929246455747829*h0*h1;
115 const double w87 = -0.00078405341847273527667*h0;
116 const double w51 = 0.33333333333333333333*h0/h1;
117 const double w61 = -0.024691358024691358025*h1;
118 const double w83 = 0.048598662630909980773*h1;
119 const double w124 = -0.0086961161558069684786*h1;
120 const double w117 = -0.061728395061728395062*h0;
121 const double w20 = -0.0015681068369454705533*h1/h0;
122 const double w84 = 0.027385751068541410139*h0;
123 const double w96 = 0.083333333333333333333*h1;
124 const double w137 = 0.013913785849291149566*h0;
125 const double w11 = 0.0069568929246455747828;
126 const double w135 = 0.10954300427416564056*h0;
127 const double w26 = -0.012345679012345679012*h0/h1;
128 const double w116 = -0.10954300427416564056*h1;
129 const double w92 = 0.053901890521502123431*h0;
130 const double w38 = 0.0077160493827160493827*h1/h0;
131 const double w17 = -0.0069568929246455747828;
132 const double w69 = 0.0068464377671353525349*h1;
133 const double w113 = 0.11111111111111111111*h0*h1;
134 const double w141 = 0.5*h0;
135 const double w36 = 0.00098006677309091909584*h1/h0;
136 const double w131 = 0.013913785849291149566*h1;
137 const double w50 = 0.33333333333333333333*h1/h0;
138 const double w16 = 0.049382716049382716049*h0/h1;
139 const double w143 = 0.054771502137082820279*h0*h1;
140 const double w0 = -0.060748328288637475966*h1/h0;
141 const double w144 = 0.0077160493827160493827*h0*h1;
142 const double w85 = -0.053901890521502123431*h0;
143 const double w79 = 0.0061728395061728395062*h0;
144 const double w3 = 0.0077160493827160493827*h0/h1;
145 const double w35 = 0.0015681068369454705533*h0/h1;
146 const double w53 = -0.33333333333333333333*h0/h1;
147 const double w114 = -0.068464377671353525349*h1;
148 const double w49 = -0.16666666666666666667*h0/h1;
149 const double w126 = 0.068464377671353525349*h1;
150 const double w44 = -0.33333333333333333333*h1/h0;
151 const double w4 = -0.097197325261819961546*h1/h0;
152 const double w82 = 0.0068464377671353525349*h0;
153 const double w46 = -0.25000000000000000000;
154 const double w139 = -0.5*h0;
155 const double w94 = -0.16666666666666666667*h1;
156 const double w37 = 0.0015681068369454705533*h1/h0;
157 const double w64 = -0.00011045515751022224798*h1;
158 const double w78 = 0.00011045515751022224798*h1;
159 const double w89 = 0.00011045515751022224798*h0;
160 const double w111 = 0.055555555555555555556*h0*h1;
161 const double w101 = -0.083333333333333333333*h1;
162 const double w136 = 0.098765432098765432099*h0;
163 const double w9 = -0.0077160493827160493827;
164 const double w31 = 0.00098006677309091909584*h0/h1;
165 const double w18 = -0.00098006677309091909584*h1/h0;
166 const double w73 = 0.024691358024691358025*h1;
167 const double w132 = 0.068464377671353525349*h0;
168 const double w122 = -0.098765432098765432099*h0;
169 const double w34 = 0.049382716049382716049*h1/h0;
170 const double w76 = 0.00078405341847273527667*h1;
171 const double w108 = 0.00077160493827160493827*h0*h1;
172 const double w54 = -0.0068464377671353525349*h1;
173 const double w33 = 0.097197325261819961546*h0/h1;
174 const double w47 = 0.16666666666666666667*h0/h1;
175 const double w80 = 0.024691358024691358025*h0;
176 const double w21 = -0.00098006677309091909584;
177 const double w88 = -0.00011045515751022224798*h0;
178 const double w129 = 0.098765432098765432099*h1;
179 const double w63 = -0.027385751068541410139*h1;
180 const double w123 = -0.013913785849291149566*h0;
181 const double w30 = 0.097197325261819961546*h1/h0;
182 const double w90 = 0.00078405341847273527667*h0;
183 const double w105 = 0.012345679012345679012*h0*h1;
184 const double w7 = 0.030864197530864197531*h0/h1;
185 const double w147 = 0.00098006677309091909584*h0*h1;
186 const double w142 = 0.060748328288637475966*h0*h1;
187 const double w120 = -0.10954300427416564056*h0;
188 const double w66 = -0.00078405341847273527667*h1;
189 const double w145 = 0.049382716049382716049*h0*h1;
190 const double w71 = 0.00086961161558069684786*h1;
191 const double w24 = -0.012345679012345679012*h1/h0;
192 const double w43 = -0.097197325261819961546*h0/h1;
193 const double w72 = 0.027385751068541410139*h1;
194 const double w106 = 0.000098006677309091909584*h0*h1;
195 const double w6 = -0.054771502137082820279;
196 const double w41 = -0.060748328288637475966*h0/h1;
197 const double w59 = -0.0034784464623227873914*h1;
198 const double w134 = 0.0086961161558069684786*h0;
199 const double w112 = 0.027777777777777777778*h0*h1;
200 const double w57 = -0.027385751068541410139*h0;
201 const double w52 = 0.16666666666666666667*h1/h0;
202 const double w5 = 0.054771502137082820279;
203 const double w70 = 0.0061728395061728395062*h1;
204 const double w93 = -0.0061728395061728395062*h1;
205 const double w100 = 0.16666666666666666667*h0;
206 const double w133 = 0.061728395061728395062*h0;
207 const double w15 = -0.049382716049382716049;
208 /* GENERATOR SNIP_PRE BOTTOM */
209 #pragma omp parallel private(EM_S, EM_F,k2_0, k0, k1, k2, *A_p, *B_p, *C_p, *D_p, *X_p, *Y_p)
210 {
211 EM_S=THREAD_MEMALLOC(len_EM_S,double);
212 EM_F=THREAD_MEMALLOC(len_EM_F,double);
213 if (!Finley_checkPtr(EM_S) && !Finley_checkPtr(EM_F) && !Finley_checkPtr(row_index) ) {
214 for (k2_0 = 0; k2_0 <2; k2_0++) { /* coloring */
215 #pragma omp parallel for private(i2, i1,i0)
216 for (k2 = k2_0; k2< N0; k2=k2+2) {
217 for (k1 = 0; k1< N1; ++k1) {
218 for (k0 = 0; k0< N0; ++k0) {
219 bool_t add_EM_F=FALSE;
220 bool_t add_EM_S=FALSE;
221 index_t e = k0 + M0 * k1 + M0*M1 * k2;
222 A_p=getSampleDataRO(A,e);
223 B_p=getSampleDataRO(B,e);
224 C_p=getSampleDataRO(C,e);
225 D_p=getSampleDataRO(D,e);
226 X_p=getSampleDataRO(X,e);
227 Y_p=getSampleDataRO(Y,e);
228 for (q=0;q<len_EM_S;++q) EM_S[q]=0;
229 for (q=0;q<len_EM_F;++q) EM_F[q]=0;
230 /* GENERATOR SNIP TOP */
231 /**************************************************************/
232 /* process A: */
233 /**************************************************************/
234 if (NULL!=A_p) {
235 add_EM_S=TRUE;
236 if (extendedA) {
237 const register double A_00_0 = A_p[INDEX3(0,0,0,2,2)];
238 const register double A_01_0 = A_p[INDEX3(0,1,0,2,2)];
239 const register double A_10_0 = A_p[INDEX3(1,0,0,2,2)];
240 const register double A_11_0 = A_p[INDEX3(1,1,0,2,2)];
241 const register double A_00_1 = A_p[INDEX3(0,0,1,2,2)];
242 const register double A_01_1 = A_p[INDEX3(0,1,1,2,2)];
243 const register double A_10_1 = A_p[INDEX3(1,0,1,2,2)];
244 const register double A_11_1 = A_p[INDEX3(1,1,1,2,2)];
245 const register double A_00_2 = A_p[INDEX3(0,0,2,2,2)];
246 const register double A_01_2 = A_p[INDEX3(0,1,2,2,2)];
247 const register double A_10_2 = A_p[INDEX3(1,0,2,2,2)];
248 const register double A_11_2 = A_p[INDEX3(1,1,2,2,2)];
249 const register double A_00_3 = A_p[INDEX3(0,0,3,2,2)];
250 const register double A_01_3 = A_p[INDEX3(0,1,3,2,2)];
251 const register double A_10_3 = A_p[INDEX3(1,0,3,2,2)];
252 const register double A_11_3 = A_p[INDEX3(1,1,3,2,2)];
253 const register double A_00_4 = A_p[INDEX3(0,0,4,2,2)];
254 const register double A_01_4 = A_p[INDEX3(0,1,4,2,2)];
255 const register double A_10_4 = A_p[INDEX3(1,0,4,2,2)];
256 const register double A_11_4 = A_p[INDEX3(1,1,4,2,2)];
257 const register double A_00_5 = A_p[INDEX3(0,0,5,2,2)];
258 const register double A_01_5 = A_p[INDEX3(0,1,5,2,2)];
259 const register double A_10_5 = A_p[INDEX3(1,0,5,2,2)];
260 const register double A_11_5 = A_p[INDEX3(1,1,5,2,2)];
261 const register double A_00_6 = A_p[INDEX3(0,0,6,2,2)];
262 const register double A_01_6 = A_p[INDEX3(0,1,6,2,2)];
263 const register double A_10_6 = A_p[INDEX3(1,0,6,2,2)];
264 const register double A_11_6 = A_p[INDEX3(1,1,6,2,2)];
265 const register double A_00_7 = A_p[INDEX3(0,0,7,2,2)];
266 const register double A_01_7 = A_p[INDEX3(0,1,7,2,2)];
267 const register double A_10_7 = A_p[INDEX3(1,0,7,2,2)];
268 const register double A_11_7 = A_p[INDEX3(1,1,7,2,2)];
269 const register double A_00_8 = A_p[INDEX3(0,0,8,2,2)];
270 const register double A_01_8 = A_p[INDEX3(0,1,8,2,2)];
271 const register double A_10_8 = A_p[INDEX3(1,0,8,2,2)];
272 const register double A_11_8 = A_p[INDEX3(1,1,8,2,2)];
273 const register double tmp34_0 = A_01_5 + A_01_7;
274 const register double tmp14_0 = A_01_5 + A_01_7 + A_10_1 + A_10_3;
275 const register double tmp38_0 = A_01_3 + A_01_7 + A_10_3 + A_10_7;
276 const register double tmp1_0 = A_00_0 + A_00_2;
277 const register double tmp29_0 = A_01_1 + A_01_5 + A_10_3 + A_10_7;
278 const register double tmp8_0 = A_10_2 + A_10_6;
279 const register double tmp27_0 = A_01_6 + A_10_2;
280 const register double tmp19_0 = A_01_1 + A_01_3 + A_10_5 + A_10_7;
281 const register double tmp26_0 = A_01_2 + A_10_6;
282 const register double tmp16_0 = A_00_0 + A_00_2 + A_00_6 + A_00_8;
283 const register double tmp12_0 = A_01_0 + A_10_8;
284 const register double tmp0_0 = A_01_0 + A_01_8;
285 const register double tmp24_0 = A_01_8 + A_10_8;
286 const register double tmp23_0 = A_01_5 + A_01_7 + A_10_5 + A_10_7;
287 const register double tmp21_0 = A_11_0 + A_11_6;
288 const register double tmp32_0 = A_10_1 + A_10_5;
289 const register double tmp17_0 = A_01_8 + A_10_0;
290 const register double tmp35_0 = A_01_2 + A_01_6;
291 const register double tmp20_0 = A_01_0 + A_10_0;
292 const register double tmp11_0 = A_00_6 + A_00_8;
293 const register double tmp7_0 = A_10_1 + A_10_3;
294 const register double tmp37_0 = A_01_6 + A_10_6;
295 const register double tmp18_0 = A_00_1 + A_00_7;
296 const register double tmp10_0 = A_10_5 + A_10_7;
297 const register double tmp9_0 = A_11_3 + A_11_5;
298 const register double tmp5_0 = A_11_1 + A_11_7;
299 const register double tmp30_0 = A_01_0 + A_01_8 + A_10_0 + A_10_8;
300 const register double tmp40_0 = A_01_2 + A_10_2;
301 const register double tmp22_0 = A_11_2 + A_11_8;
302 const register double tmp4_0 = A_01_3 + A_01_7;
303 const register double tmp28_0 = A_01_3 + A_01_7 + A_10_1 + A_10_5;
304 const register double tmp13_0 = A_01_2 + A_01_6 + A_10_2 + A_10_6;
305 const register double tmp33_0 = A_10_3 + A_10_7;
306 const register double tmp6_0 = A_00_3 + A_00_5;
307 const register double tmp15_0 = A_01_4 + A_10_4;
308 const register double tmp3_0 = A_01_1 + A_01_5;
309 const register double tmp25_0 = A_01_1 + A_01_3 + A_10_1 + A_10_3;
310 const register double tmp31_0 = A_10_0 + A_10_8;
311 const register double tmp2_0 = A_11_0 + A_11_2 + A_11_6 + A_11_8;
312 const register double tmp36_0 = A_01_1 + A_01_3;
313 const register double tmp39_0 = A_01_1 + A_01_5 + A_10_1 + A_10_5;
314 const register double tmp29_1 = tmp17_0*w19;
315 const register double tmp100_1 = tmp22_0*w39;
316 const register double tmp115_1 = tmp40_0*w21;
317 const register double tmp89_1 = A_11_3*w42;
318 const register double tmp83_1 = tmp33_0*w11;
319 const register double tmp75_1 = tmp28_0*w6;
320 const register double tmp30_1 = A_11_4*w27;
321 const register double tmp4_1 = tmp3_0*w5;
322 const register double tmp87_1 = A_01_4*w15;
323 const register double tmp93_1 = tmp22_0*w41;
324 const register double tmp81_1 = A_01_8*w2;
325 const register double tmp99_1 = tmp14_0*w5;
326 const register double tmp1_1 = tmp1_0*w0;
327 const register double tmp70_1 = tmp21_0*w31;
328 const register double tmp95_1 = A_10_6*w19;
329 const register double tmp38_1 = tmp3_0*w11;
330 const register double tmp79_1 = tmp21_0*w39;
331 const register double tmp77_1 = tmp30_0*w9;
332 const register double tmp25_1 = tmp14_0*w11;
333 const register double tmp117_1 = tmp26_0*w2;
334 const register double tmp2_1 = tmp2_0*w3;
335 const register double tmp72_1 = tmp15_0*w15;
336 const register double tmp18_1 = A_00_7*w20;
337 const register double tmp44_1 = A_01_2*w19;
338 const register double tmp52_1 = tmp24_0*w19;
339 const register double tmp15_1 = A_01_4*w14;
340 const register double tmp50_1 = tmp23_0*w11;
341 const register double tmp102_1 = tmp33_0*w5;
342 const register double tmp21_1 = tmp11_0*w18;
343 const register double tmp64_1 = tmp25_0*w11;
344 const register double tmp109_1 = tmp21_0*w41;
345 const register double tmp106_1 = A_11_5*w42;
346 const register double tmp35_1 = A_10_8*w2;
347 const register double tmp16_1 = tmp10_0*w17;
348 const register double tmp49_1 = tmp22_0*w31;
349 const register double tmp118_1 = tmp29_0*w6;
350 const register double tmp114_1 = tmp39_0*w17;
351 const register double tmp19_1 = A_10_8*w21;
352 const register double tmp68_1 = A_11_5*w33;
353 const register double tmp73_1 = tmp26_0*w21;
354 const register double tmp46_1 = tmp20_0*w8;
355 const register double tmp36_1 = tmp4_0*w5;
356 const register double tmp12_1 = tmp9_0*w12;
357 const register double tmp111_1 = A_10_2*w19;
358 const register double tmp31_1 = tmp18_0*w24;
359 const register double tmp105_1 = A_10_6*w8;
360 const register double tmp10_1 = A_00_4*w13;
361 const register double tmp82_1 = tmp32_0*w5;
362 const register double tmp51_1 = A_11_5*w35;
363 const register double tmp57_1 = tmp1_0*w28;
364 const register double tmp80_1 = tmp16_0*w38;
365 const register double tmp48_1 = tmp21_0*w29;
366 const register double tmp47_1 = tmp6_0*w32;
367 const register double tmp110_1 = A_01_8*w21;
368 const register double tmp85_1 = tmp35_0*w9;
369 const register double tmp28_1 = tmp16_0*w22;
370 const register double tmp34_1 = tmp11_0*w0;
371 const register double tmp55_1 = A_00_4*w34;
372 const register double tmp123_1 = tmp40_0*w2;
373 const register double tmp91_1 = A_11_5*w43;
374 const register double tmp7_1 = tmp5_0*w7;
375 const register double tmp41_1 = tmp7_0*w17;
376 const register double tmp0_1 = tmp0_0*w1;
377 const register double tmp32_1 = tmp2_0*w23;
378 const register double tmp98_1 = tmp12_0*w19;
379 const register double tmp107_1 = tmp34_0*w17;
380 const register double tmp76_1 = tmp29_0*w17;
381 const register double tmp120_1 = tmp37_0*w21;
382 const register double tmp40_1 = A_01_6*w8;
383 const register double tmp53_1 = A_00_1*w30;
384 const register double tmp116_1 = tmp27_0*w21;
385 const register double tmp101_1 = A_01_0*w2;
386 const register double tmp45_1 = tmp1_0*w18;
387 const register double tmp67_1 = A_00_7*w30;
388 const register double tmp61_1 = A_00_1*w37;
389 const register double tmp17_1 = A_11_4*w16;
390 const register double tmp66_1 = tmp20_0*w19;
391 const register double tmp84_1 = tmp34_0*w6;
392 const register double tmp92_1 = tmp18_0*w40;
393 const register double tmp23_1 = tmp13_0*w1;
394 const register double tmp97_1 = tmp19_0*w11;
395 const register double tmp5_1 = A_00_1*w4;
396 const register double tmp62_1 = tmp24_0*w8;
397 const register double tmp39_1 = tmp10_0*w6;
398 const register double tmp9_1 = tmp7_0*w6;
399 const register double tmp63_1 = tmp1_0*w36;
400 const register double tmp65_1 = A_11_3*w35;
401 const register double tmp69_1 = tmp11_0*w28;
402 const register double tmp96_1 = tmp17_0*w8;
403 const register double tmp108_1 = A_11_3*w43;
404 const register double tmp14_1 = A_10_4*w15;
405 const register double tmp6_1 = tmp4_0*w11;
406 const register double tmp3_1 = A_10_0*w2;
407 const register double tmp22_1 = tmp12_0*w8;
408 const register double tmp26_1 = tmp9_0*w26;
409 const register double tmp8_1 = tmp6_0*w10;
410 const register double tmp113_1 = tmp38_0*w6;
411 const register double tmp33_1 = tmp19_0*w5;
412 const register double tmp60_1 = tmp22_0*w29;
413 const register double tmp27_1 = tmp15_0*w14;
414 const register double tmp54_1 = A_11_3*w33;
415 const register double tmp71_1 = tmp23_0*w5;
416 const register double tmp37_1 = A_00_7*w4;
417 const register double tmp43_1 = A_10_0*w21;
418 const register double tmp59_1 = A_00_7*w37;
419 const register double tmp58_1 = tmp25_0*w5;
420 const register double tmp78_1 = tmp31_0*w1;
421 const register double tmp20_1 = A_01_6*w19;
422 const register double tmp119_1 = tmp28_0*w17;
423 const register double tmp121_1 = tmp39_0*w6;
424 const register double tmp122_1 = tmp38_0*w17;
425 const register double tmp88_1 = A_10_4*w14;
426 const register double tmp56_1 = tmp11_0*w36;
427 const register double tmp103_1 = tmp32_0*w11;
428 const register double tmp104_1 = tmp36_0*w6;
429 const register double tmp94_1 = A_01_0*w21;
430 const register double tmp11_1 = tmp8_0*w9;
431 const register double tmp86_1 = A_10_2*w8;
432 const register double tmp42_1 = A_00_1*w20;
433 const register double tmp74_1 = tmp27_0*w2;
434 const register double tmp24_1 = tmp5_0*w25;
435 const register double tmp112_1 = tmp37_0*w2;
436 const register double tmp90_1 = tmp36_0*w17;
437 const register double tmp13_1 = A_01_2*w8;
438 EM_S[INDEX2(0,1,4)]+=tmp0_1 + tmp10_1 + tmp11_1 + tmp12_1 + tmp13_1 + tmp14_1 + tmp15_1 + tmp16_1 + tmp17_1 + tmp18_1 + tmp19_1 + tmp1_1 + tmp20_1 + tmp21_1 + tmp2_1 + tmp3_1 + tmp4_1 + tmp5_1 + tmp6_1 + tmp7_1 + tmp8_1 + tmp9_1;
439 EM_S[INDEX2(1,2,4)]+=tmp10_1 + tmp22_1 + tmp23_1 + tmp24_1 + tmp25_1 + tmp26_1 + tmp27_1 + tmp28_1 + tmp29_1 + tmp30_1 + tmp31_1 + tmp32_1 + tmp33_1 + tmp8_1;
440 EM_S[INDEX2(3,2,4)]+=tmp0_1 + tmp10_1 + tmp11_1 + tmp12_1 + tmp14_1 + tmp15_1 + tmp17_1 + tmp2_1 + tmp34_1 + tmp35_1 + tmp36_1 + tmp37_1 + tmp38_1 + tmp39_1 + tmp40_1 + tmp41_1 + tmp42_1 + tmp43_1 + tmp44_1 + tmp45_1 + tmp7_1 + tmp8_1;
441 EM_S[INDEX2(0,0,4)]+=tmp17_1 + tmp23_1 + tmp27_1 + tmp46_1 + tmp47_1 + tmp48_1 + tmp49_1 + tmp50_1 + tmp51_1 + tmp52_1 + tmp53_1 + tmp54_1 + tmp55_1 + tmp56_1 + tmp57_1 + tmp58_1 + tmp59_1 + tmp7_1;
442 EM_S[INDEX2(3,3,4)]+=tmp17_1 + tmp23_1 + tmp27_1 + tmp47_1 + tmp55_1 + tmp60_1 + tmp61_1 + tmp62_1 + tmp63_1 + tmp64_1 + tmp65_1 + tmp66_1 + tmp67_1 + tmp68_1 + tmp69_1 + tmp70_1 + tmp71_1 + tmp7_1;
443 EM_S[INDEX2(3,0,4)]+=tmp10_1 + tmp24_1 + tmp26_1 + tmp28_1 + tmp30_1 + tmp31_1 + tmp32_1 + tmp72_1 + tmp73_1 + tmp74_1 + tmp75_1 + tmp76_1 + tmp77_1 + tmp8_1;
444 EM_S[INDEX2(3,1,4)]+=tmp24_1 + tmp30_1 + tmp47_1 + tmp55_1 + tmp78_1 + tmp79_1 + tmp80_1 + tmp81_1 + tmp82_1 + tmp83_1 + tmp84_1 + tmp85_1 + tmp86_1 + tmp87_1 + tmp88_1 + tmp89_1 + tmp90_1 + tmp91_1 + tmp92_1 + tmp93_1 + tmp94_1 + tmp95_1;
445 EM_S[INDEX2(2,1,4)]+=tmp10_1 + tmp23_1 + tmp24_1 + tmp26_1 + tmp27_1 + tmp28_1 + tmp30_1 + tmp31_1 + tmp32_1 + tmp8_1 + tmp96_1 + tmp97_1 + tmp98_1 + tmp99_1;
446 EM_S[INDEX2(0,2,4)]+=tmp100_1 + tmp101_1 + tmp102_1 + tmp103_1 + tmp104_1 + tmp105_1 + tmp106_1 + tmp107_1 + tmp108_1 + tmp109_1 + tmp110_1 + tmp111_1 + tmp24_1 + tmp30_1 + tmp47_1 + tmp55_1 + tmp78_1 + tmp80_1 + tmp85_1 + tmp87_1 + tmp88_1 + tmp92_1;
447 EM_S[INDEX2(2,0,4)]+=tmp0_1 + tmp100_1 + tmp106_1 + tmp108_1 + tmp109_1 + tmp11_1 + tmp14_1 + tmp15_1 + tmp16_1 + tmp19_1 + tmp24_1 + tmp30_1 + tmp36_1 + tmp38_1 + tmp3_1 + tmp40_1 + tmp44_1 + tmp47_1 + tmp55_1 + tmp80_1 + tmp92_1 + tmp9_1;
448 EM_S[INDEX2(1,3,4)]+=tmp0_1 + tmp11_1 + tmp13_1 + tmp14_1 + tmp15_1 + tmp20_1 + tmp24_1 + tmp30_1 + tmp35_1 + tmp39_1 + tmp41_1 + tmp43_1 + tmp47_1 + tmp4_1 + tmp55_1 + tmp6_1 + tmp79_1 + tmp80_1 + tmp89_1 + tmp91_1 + tmp92_1 + tmp93_1;
449 EM_S[INDEX2(2,3,4)]+=tmp102_1 + tmp103_1 + tmp105_1 + tmp10_1 + tmp111_1 + tmp12_1 + tmp17_1 + tmp2_1 + tmp34_1 + tmp37_1 + tmp42_1 + tmp45_1 + tmp78_1 + tmp7_1 + tmp81_1 + tmp84_1 + tmp85_1 + tmp87_1 + tmp88_1 + tmp8_1 + tmp90_1 + tmp94_1;
450 EM_S[INDEX2(2,2,4)]+=tmp112_1 + tmp113_1 + tmp114_1 + tmp115_1 + tmp17_1 + tmp47_1 + tmp48_1 + tmp49_1 + tmp51_1 + tmp54_1 + tmp55_1 + tmp61_1 + tmp63_1 + tmp67_1 + tmp69_1 + tmp72_1 + tmp77_1 + tmp7_1;
451 EM_S[INDEX2(1,0,4)]+=tmp101_1 + tmp104_1 + tmp107_1 + tmp10_1 + tmp110_1 + tmp12_1 + tmp17_1 + tmp18_1 + tmp1_1 + tmp21_1 + tmp2_1 + tmp5_1 + tmp78_1 + tmp7_1 + tmp82_1 + tmp83_1 + tmp85_1 + tmp86_1 + tmp87_1 + tmp88_1 + tmp8_1 + tmp95_1;
452 EM_S[INDEX2(0,3,4)]+=tmp10_1 + tmp116_1 + tmp117_1 + tmp118_1 + tmp119_1 + tmp24_1 + tmp26_1 + tmp28_1 + tmp30_1 + tmp31_1 + tmp32_1 + tmp72_1 + tmp77_1 + tmp8_1;
453 EM_S[INDEX2(1,1,4)]+=tmp120_1 + tmp121_1 + tmp122_1 + tmp123_1 + tmp17_1 + tmp47_1 + tmp53_1 + tmp55_1 + tmp56_1 + tmp57_1 + tmp59_1 + tmp60_1 + tmp65_1 + tmp68_1 + tmp70_1 + tmp72_1 + tmp77_1 + tmp7_1;
454 } else { /* constant data */
455 const register double A_00 = A_p[INDEX2(0,0,2)];
456 const register double A_01 = A_p[INDEX2(0,1,2)];
457 const register double A_10 = A_p[INDEX2(1,0,2)];
458 const register double A_11 = A_p[INDEX2(1,1,2)];
459 const register double tmp0_0 = A_01 + A_10;
460 const register double tmp5_1 = A_00*w48;
461 const register double tmp3_1 = A_01*w45;
462 const register double tmp4_1 = A_11*w49;
463 const register double tmp11_1 = A_00*w52;
464 const register double tmp7_1 = A_00*w50;
465 const register double tmp2_1 = A_10*w46;
466 const register double tmp0_1 = A_00*w44;
467 const register double tmp13_1 = A_10*w45;
468 const register double tmp10_1 = A_01*w46;
469 const register double tmp6_1 = tmp0_0*w45;
470 const register double tmp8_1 = A_11*w51;
471 const register double tmp12_1 = A_11*w53;
472 const register double tmp9_1 = tmp0_0*w46;
473 const register double tmp1_1 = A_11*w47;
474 EM_S[INDEX2(0,1,4)]+=tmp0_1 + tmp1_1 + tmp2_1 + tmp3_1;
475 EM_S[INDEX2(1,2,4)]+=tmp4_1 + tmp5_1 + tmp6_1;
476 EM_S[INDEX2(3,2,4)]+=tmp0_1 + tmp1_1 + tmp2_1 + tmp3_1;
477 EM_S[INDEX2(0,0,4)]+=tmp6_1 + tmp7_1 + tmp8_1;
478 EM_S[INDEX2(3,3,4)]+=tmp6_1 + tmp7_1 + tmp8_1;
479 EM_S[INDEX2(3,0,4)]+=tmp4_1 + tmp5_1 + tmp9_1;
480 EM_S[INDEX2(3,1,4)]+=tmp10_1 + tmp11_1 + tmp12_1 + tmp13_1;
481 EM_S[INDEX2(2,1,4)]+=tmp4_1 + tmp5_1 + tmp6_1;
482 EM_S[INDEX2(0,2,4)]+=tmp10_1 + tmp11_1 + tmp12_1 + tmp13_1;
483 EM_S[INDEX2(2,0,4)]+=tmp11_1 + tmp12_1 + tmp2_1 + tmp3_1;
484 EM_S[INDEX2(1,3,4)]+=tmp11_1 + tmp12_1 + tmp2_1 + tmp3_1;
485 EM_S[INDEX2(2,3,4)]+=tmp0_1 + tmp10_1 + tmp13_1 + tmp1_1;
486 EM_S[INDEX2(2,2,4)]+=tmp7_1 + tmp8_1 + tmp9_1;
487 EM_S[INDEX2(1,0,4)]+=tmp0_1 + tmp10_1 + tmp13_1 + tmp1_1;
488 EM_S[INDEX2(0,3,4)]+=tmp4_1 + tmp5_1 + tmp9_1;
489 EM_S[INDEX2(1,1,4)]+=tmp7_1 + tmp8_1 + tmp9_1;
490 }
491 }
492 /**************************************************************/
493 /* process B: */
494 /**************************************************************/
495 if (NULL!=B_p) {
496 add_EM_S=TRUE;
497 if (extendedB) {
498 const register double B_0_0 = B_p[INDEX2(0,0,2)];
499 const register double B_1_0 = B_p[INDEX2(1,0,2)];
500 const register double B_0_1 = B_p[INDEX2(0,1,2)];
501 const register double B_1_1 = B_p[INDEX2(1,1,2)];
502 const register double B_0_2 = B_p[INDEX2(0,2,2)];
503 const register double B_1_2 = B_p[INDEX2(1,2,2)];
504 const register double B_0_3 = B_p[INDEX2(0,3,2)];
505 const register double B_1_3 = B_p[INDEX2(1,3,2)];
506 const register double B_0_4 = B_p[INDEX2(0,4,2)];
507 const register double B_1_4 = B_p[INDEX2(1,4,2)];
508 const register double B_0_5 = B_p[INDEX2(0,5,2)];
509 const register double B_1_5 = B_p[INDEX2(1,5,2)];
510 const register double B_0_6 = B_p[INDEX2(0,6,2)];
511 const register double B_1_6 = B_p[INDEX2(1,6,2)];
512 const register double B_0_7 = B_p[INDEX2(0,7,2)];
513 const register double B_1_7 = B_p[INDEX2(1,7,2)];
514 const register double B_0_8 = B_p[INDEX2(0,8,2)];
515 const register double B_1_8 = B_p[INDEX2(1,8,2)];
516 const register double tmp1_0 = B_1_6 + B_1_8;
517 const register double tmp2_0 = B_1_0 + B_1_2;
518 const register double tmp3_0 = B_0_2 + B_0_8;
519 const register double tmp5_0 = B_0_0 + B_0_6;
520 const register double tmp4_0 = B_0_1 + B_0_7;
521 const register double tmp0_0 = B_1_3 + B_1_5;
522 const register double tmp37_1 = B_1_0*w85;
523 const register double tmp89_1 = B_1_8*w85;
524 const register double tmp97_1 = B_0_6*w54;
525 const register double tmp83_1 = B_1_5*w90;
526 const register double tmp71_1 = tmp4_0*w93;
527 const register double tmp3_1 = B_0_1*w56;
528 const register double tmp4_1 = B_0_6*w64;
529 const register double tmp95_1 = B_0_8*w58;
530 const register double tmp38_1 = B_0_5*w59;
531 const register double tmp17_1 = B_0_5*w74;
532 const register double tmp64_1 = B_1_1*w84;
533 const register double tmp119_1 = B_0_6*w78;
534 const register double tmp102_1 = B_0_0*w68;
535 const register double tmp24_1 = B_1_1*w67;
536 const register double tmp74_1 = B_1_6*w85;
537 const register double tmp36_1 = B_0_2*w78;
538 const register double tmp77_1 = B_1_0*w55;
539 const register double tmp46_1 = B_1_8*w88;
540 const register double tmp2_1 = B_0_3*w59;
541 const register double tmp57_1 = B_1_3*w90;
542 const register double tmp52_1 = B_0_8*w81;
543 const register double tmp111_1 = B_0_7*w76;
544 const register double tmp92_1 = B_0_7*w56;
545 const register double tmp9_1 = tmp2_0*w55;
546 const register double tmp99_1 = B_1_8*w75;
547 const register double tmp0_1 = B_1_1*w57;
548 const register double tmp19_1 = tmp1_0*w55;
549 const register double tmp26_1 = B_1_4*w80;
550 const register double tmp33_1 = B_0_7*w83;
551 const register double tmp45_1 = B_0_2*w54;
552 const register double tmp44_1 = B_1_5*w87;
553 const register double tmp85_1 = B_1_8*w89;
554 const register double tmp79_1 = tmp5_0*w54;
555 const register double tmp15_1 = tmp3_0*w71;
556 const register double tmp112_1 = B_0_8*w71;
557 const register double tmp23_1 = B_0_3*w72;
558 const register double tmp109_1 = B_0_1*w83;
559 const register double tmp21_1 = B_0_4*w73;
560 const register double tmp54_1 = B_1_2*w82;
561 const register double tmp29_1 = tmp1_0*w82;
562 const register double tmp43_1 = B_1_6*w55;
563 const register double tmp47_1 = B_0_3*w63;
564 const register double tmp94_1 = B_0_2*w68;
565 const register double tmp116_1 = B_1_0*w65;
566 const register double tmp7_1 = B_0_4*w61;
567 const register double tmp56_1 = B_0_5*w72;
568 const register double tmp12_1 = B_0_0*w54;
569 const register double tmp30_1 = B_1_1*w77;
570 const register double tmp10_1 = B_1_4*w62;
571 const register double tmp13_1 = B_0_5*w63;
572 const register double tmp107_1 = B_0_0*w81;
573 const register double tmp66_1 = B_1_2*w92;
574 const register double tmp65_1 = tmp5_0*w71;
575 const register double tmp14_1 = B_1_7*w67;
576 const register double tmp106_1 = B_0_6*w71;
577 const register double tmp113_1 = B_1_2*w85;
578 const register double tmp63_1 = tmp2_0*w82;
579 const register double tmp93_1 = B_0_0*w64;
580 const register double tmp28_1 = B_1_7*w84;
581 const register double tmp75_1 = tmp3_0*w68;
582 const register double tmp80_1 = B_1_0*w92;
583 const register double tmp53_1 = B_1_8*w92;
584 const register double tmp49_1 = B_0_2*w71;
585 const register double tmp76_1 = B_1_8*w65;
586 const register double tmp40_1 = B_0_0*w58;
587 const register double tmp31_1 = B_0_1*w76;
588 const register double tmp86_1 = B_1_5*w86;
589 const register double tmp50_1 = B_0_6*w69;
590 const register double tmp22_1 = tmp5_0*w69;
591 const register double tmp90_1 = B_1_3*w87;
592 const register double tmp87_1 = B_1_6*w65;
593 const register double tmp88_1 = B_1_2*w55;
594 const register double tmp98_1 = B_1_6*w92;
595 const register double tmp6_1 = B_0_8*w68;
596 const register double tmp11_1 = B_0_7*w66;
597 const register double tmp58_1 = B_0_0*w78;
598 const register double tmp69_1 = tmp3_0*w69;
599 const register double tmp48_1 = B_0_6*w68;
600 const register double tmp68_1 = B_1_8*w82;
601 const register double tmp108_1 = B_0_2*w69;
602 const register double tmp96_1 = B_0_1*w66;
603 const register double tmp101_1 = B_1_0*w82;
604 const register double tmp34_1 = tmp0_0*w79;
605 const register double tmp70_1 = B_1_6*w89;
606 const register double tmp18_1 = tmp4_0*w70;
607 const register double tmp59_1 = B_1_6*w75;
608 const register double tmp72_1 = tmp5_0*w68;
609 const register double tmp51_1 = B_0_3*w74;
610 const register double tmp25_1 = B_0_0*w71;
611 const register double tmp118_1 = B_1_6*w88;
612 const register double tmp61_1 = tmp1_0*w75;
613 const register double tmp78_1 = B_1_2*w88;
614 const register double tmp16_1 = B_1_7*w57;
615 const register double tmp35_1 = tmp2_0*w75;
616 const register double tmp5_1 = B_0_2*w58;
617 const register double tmp105_1 = B_1_2*w89;
618 const register double tmp100_1 = B_0_2*w64;
619 const register double tmp84_1 = B_1_2*w75;
620 const register double tmp114_1 = B_0_2*w81;
621 const register double tmp62_1 = B_1_7*w77;
622 const register double tmp91_1 = B_1_0*w88;
623 const register double tmp110_1 = B_0_8*w78;
624 const register double tmp27_1 = B_0_6*w81;
625 const register double tmp32_1 = B_0_8*w69;
626 const register double tmp42_1 = B_1_2*w65;
627 const register double tmp8_1 = tmp1_0*w65;
628 const register double tmp1_1 = tmp0_0*w60;
629 const register double tmp104_1 = B_0_8*w54;
630 const register double tmp117_1 = B_0_0*w69;
631 const register double tmp67_1 = B_1_0*w75;
632 const register double tmp20_1 = tmp2_0*w65;
633 const register double tmp103_1 = B_0_6*w58;
634 const register double tmp115_1 = B_1_8*w55;
635 const register double tmp60_1 = B_1_0*w89;
636 const register double tmp41_1 = B_1_3*w86;
637 const register double tmp55_1 = B_1_5*w91;
638 const register double tmp82_1 = B_1_6*w82;
639 const register double tmp39_1 = B_0_8*w64;
640 const register double tmp73_1 = tmp3_0*w54;
641 const register double tmp81_1 = B_1_3*w91;
642 EM_S[INDEX2(0,1,4)]+=tmp0_1 + tmp10_1 + tmp11_1 + tmp12_1 + tmp13_1 + tmp14_1 + tmp1_1 + tmp2_1 + tmp3_1 + tmp4_1 + tmp5_1 + tmp6_1 + tmp7_1 + tmp8_1 + tmp9_1;
643 EM_S[INDEX2(1,2,4)]+=tmp10_1 + tmp15_1 + tmp16_1 + tmp17_1 + tmp18_1 + tmp19_1 + tmp1_1 + tmp20_1 + tmp21_1 + tmp22_1 + tmp23_1 + tmp24_1;
644 EM_S[INDEX2(3,2,4)]+=tmp17_1 + tmp21_1 + tmp23_1 + tmp25_1 + tmp26_1 + tmp27_1 + tmp28_1 + tmp29_1 + tmp30_1 + tmp31_1 + tmp32_1 + tmp33_1 + tmp34_1 + tmp35_1 + tmp36_1;
645 EM_S[INDEX2(0,0,4)]+=tmp0_1 + tmp10_1 + tmp11_1 + tmp14_1 + tmp37_1 + tmp38_1 + tmp39_1 + tmp3_1 + tmp40_1 + tmp41_1 + tmp42_1 + tmp43_1 + tmp44_1 + tmp45_1 + tmp46_1 + tmp47_1 + tmp48_1 + tmp7_1;
646 EM_S[INDEX2(3,3,4)]+=tmp21_1 + tmp26_1 + tmp28_1 + tmp30_1 + tmp31_1 + tmp33_1 + tmp49_1 + tmp50_1 + tmp51_1 + tmp52_1 + tmp53_1 + tmp54_1 + tmp55_1 + tmp56_1 + tmp57_1 + tmp58_1 + tmp59_1 + tmp60_1;
647 EM_S[INDEX2(3,0,4)]+=tmp15_1 + tmp17_1 + tmp18_1 + tmp21_1 + tmp22_1 + tmp23_1 + tmp26_1 + tmp34_1 + tmp61_1 + tmp62_1 + tmp63_1 + tmp64_1;
648 EM_S[INDEX2(3,1,4)]+=tmp18_1 + tmp21_1 + tmp26_1 + tmp51_1 + tmp55_1 + tmp56_1 + tmp57_1 + tmp62_1 + tmp64_1 + tmp65_1 + tmp66_1 + tmp67_1 + tmp68_1 + tmp69_1 + tmp70_1;
649 EM_S[INDEX2(2,1,4)]+=tmp13_1 + tmp26_1 + tmp2_1 + tmp34_1 + tmp61_1 + tmp62_1 + tmp63_1 + tmp64_1 + tmp71_1 + tmp72_1 + tmp73_1 + tmp7_1;
650 EM_S[INDEX2(0,2,4)]+=tmp10_1 + tmp16_1 + tmp24_1 + tmp38_1 + tmp41_1 + tmp44_1 + tmp47_1 + tmp71_1 + tmp74_1 + tmp75_1 + tmp76_1 + tmp77_1 + tmp78_1 + tmp79_1 + tmp7_1;
651 EM_S[INDEX2(2,0,4)]+=tmp26_1 + tmp38_1 + tmp47_1 + tmp62_1 + tmp64_1 + tmp71_1 + tmp75_1 + tmp79_1 + tmp7_1 + tmp80_1 + tmp81_1 + tmp82_1 + tmp83_1 + tmp84_1 + tmp85_1;
652 EM_S[INDEX2(1,3,4)]+=tmp10_1 + tmp16_1 + tmp18_1 + tmp21_1 + tmp24_1 + tmp51_1 + tmp56_1 + tmp65_1 + tmp69_1 + tmp86_1 + tmp87_1 + tmp88_1 + tmp89_1 + tmp90_1 + tmp91_1;
653 EM_S[INDEX2(2,3,4)]+=tmp13_1 + tmp26_1 + tmp28_1 + tmp29_1 + tmp2_1 + tmp30_1 + tmp34_1 + tmp35_1 + tmp7_1 + tmp92_1 + tmp93_1 + tmp94_1 + tmp95_1 + tmp96_1 + tmp97_1;
654 EM_S[INDEX2(2,2,4)]+=tmp100_1 + tmp101_1 + tmp102_1 + tmp103_1 + tmp104_1 + tmp105_1 + tmp26_1 + tmp28_1 + tmp30_1 + tmp38_1 + tmp47_1 + tmp7_1 + tmp81_1 + tmp83_1 + tmp92_1 + tmp96_1 + tmp98_1 + tmp99_1;
655 EM_S[INDEX2(1,0,4)]+=tmp0_1 + tmp106_1 + tmp107_1 + tmp108_1 + tmp109_1 + tmp10_1 + tmp110_1 + tmp111_1 + tmp14_1 + tmp17_1 + tmp1_1 + tmp21_1 + tmp23_1 + tmp8_1 + tmp9_1;
656 EM_S[INDEX2(0,3,4)]+=tmp10_1 + tmp13_1 + tmp16_1 + tmp19_1 + tmp1_1 + tmp20_1 + tmp24_1 + tmp2_1 + tmp71_1 + tmp72_1 + tmp73_1 + tmp7_1;
657 EM_S[INDEX2(1,1,4)]+=tmp0_1 + tmp109_1 + tmp10_1 + tmp111_1 + tmp112_1 + tmp113_1 + tmp114_1 + tmp115_1 + tmp116_1 + tmp117_1 + tmp118_1 + tmp119_1 + tmp14_1 + tmp21_1 + tmp51_1 + tmp56_1 + tmp86_1 + tmp90_1;
658 } else { /* constant data */
659 const register double B_0 = B_p[0];
660 const register double B_1 = B_p[1];
661 const register double tmp1_1 = B_1*w95;
662 const register double tmp2_1 = B_0*w96;
663 const register double tmp0_1 = B_0*w94;
664 const register double tmp6_1 = B_1*w100;
665 const register double tmp7_1 = B_0*w101;
666 const register double tmp4_1 = B_0*w97;
667 const register double tmp3_1 = B_1*w98;
668 const register double tmp5_1 = B_1*w99;
669 EM_S[INDEX2(0,1,4)]+=tmp0_1 + tmp1_1;
670 EM_S[INDEX2(1,2,4)]+=tmp1_1 + tmp2_1;
671 EM_S[INDEX2(3,2,4)]+=tmp3_1 + tmp4_1;
672 EM_S[INDEX2(0,0,4)]+=tmp0_1 + tmp5_1;
673 EM_S[INDEX2(3,3,4)]+=tmp4_1 + tmp6_1;
674 EM_S[INDEX2(3,0,4)]+=tmp2_1 + tmp3_1;
675 EM_S[INDEX2(3,1,4)]+=tmp2_1 + tmp6_1;
676 EM_S[INDEX2(2,1,4)]+=tmp3_1 + tmp7_1;
677 EM_S[INDEX2(0,2,4)]+=tmp5_1 + tmp7_1;
678 EM_S[INDEX2(2,0,4)]+=tmp6_1 + tmp7_1;
679 EM_S[INDEX2(1,3,4)]+=tmp2_1 + tmp5_1;
680 EM_S[INDEX2(2,3,4)]+=tmp0_1 + tmp3_1;
681 EM_S[INDEX2(2,2,4)]+=tmp0_1 + tmp6_1;
682 EM_S[INDEX2(1,0,4)]+=tmp1_1 + tmp4_1;
683 EM_S[INDEX2(0,3,4)]+=tmp1_1 + tmp7_1;
684 EM_S[INDEX2(1,1,4)]+=tmp4_1 + tmp5_1;
685 }
686 }
687 /**************************************************************/
688 /* process C: */
689 /**************************************************************/
690 if (NULL!=C_p) {
691 add_EM_S=TRUE;
692 if (extendedC) {
693 const register double C_0_0 = C_p[INDEX2(0,0,2)];
694 const register double C_1_0 = C_p[INDEX2(1,0,2)];
695 const register double C_0_1 = C_p[INDEX2(0,1,2)];
696 const register double C_1_1 = C_p[INDEX2(1,1,2)];
697 const register double C_0_2 = C_p[INDEX2(0,2,2)];
698 const register double C_1_2 = C_p[INDEX2(1,2,2)];
699 const register double C_0_3 = C_p[INDEX2(0,3,2)];
700 const register double C_1_3 = C_p[INDEX2(1,3,2)];
701 const register double C_0_4 = C_p[INDEX2(0,4,2)];
702 const register double C_1_4 = C_p[INDEX2(1,4,2)];
703 const register double C_0_5 = C_p[INDEX2(0,5,2)];
704 const register double C_1_5 = C_p[INDEX2(1,5,2)];
705 const register double C_0_6 = C_p[INDEX2(0,6,2)];
706 const register double C_1_6 = C_p[INDEX2(1,6,2)];
707 const register double C_0_7 = C_p[INDEX2(0,7,2)];
708 const register double C_1_7 = C_p[INDEX2(1,7,2)];
709 const register double C_0_8 = C_p[INDEX2(0,8,2)];
710 const register double C_1_8 = C_p[INDEX2(1,8,2)];
711 const register double tmp5_0 = C_0_2 + C_0_8;
712 const register double tmp2_0 = C_1_0 + C_1_2;
713 const register double tmp0_0 = C_1_3 + C_1_5;
714 const register double tmp3_0 = C_0_1 + C_0_7;
715 const register double tmp4_0 = C_0_0 + C_0_6;
716 const register double tmp1_0 = C_1_6 + C_1_8;
717 const register double tmp68_1 = C_1_1*w67;
718 const register double tmp110_1 = C_0_8*w68;
719 const register double tmp85_1 = tmp4_0*w54;
720 const register double tmp25_1 = C_0_5*w63;
721 const register double tmp43_1 = C_1_2*w65;
722 const register double tmp19_1 = C_0_4*w61;
723 const register double tmp41_1 = C_0_0*w58;
724 const register double tmp9_1 = C_0_2*w69;
725 const register double tmp103_1 = C_1_0*w82;
726 const register double tmp47_1 = C_0_2*w54;
727 const register double tmp51_1 = C_0_2*w71;
728 const register double tmp95_1 = C_1_6*w89;
729 const register double tmp72_1 = C_1_6*w65;
730 const register double tmp7_1 = tmp2_0*w55;
731 const register double tmp4_1 = C_0_0*w81;
732 const register double tmp30_1 = C_0_2*w68;
733 const register double tmp79_1 = tmp4_0*w69;
734 const register double tmp82_1 = C_1_3*w91;
735 const register double tmp63_1 = C_1_6*w75;
736 const register double tmp71_1 = C_1_5*w86;
737 const register double tmp67_1 = tmp1_0*w55;
738 const register double tmp20_1 = tmp4_0*w68;
739 const register double tmp24_1 = tmp5_0*w54;
740 const register double tmp118_1 = C_1_6*w88;
741 const register double tmp97_1 = C_0_6*w81;
742 const register double tmp96_1 = C_0_0*w71;
743 const register double tmp70_1 = tmp3_0*w70;
744 const register double tmp34_1 = C_0_1*w66;
745 const register double tmp113_1 = C_1_2*w85;
746 const register double tmp99_1 = C_0_2*w78;
747 const register double tmp54_1 = C_0_8*w81;
748 const register double tmp42_1 = C_1_3*w86;
749 const register double tmp87_1 = C_1_8*w89;
750 const register double tmp61_1 = C_1_3*w90;
751 const register double tmp48_1 = C_1_8*w88;
752 const register double tmp55_1 = C_1_8*w92;
753 const register double tmp0_1 = C_1_1*w57;
754 const register double tmp65_1 = C_1_7*w57;
755 const register double tmp94_1 = C_1_8*w82;
756 const register double tmp116_1 = C_1_0*w65;
757 const register double tmp1_1 = C_0_6*w71;
758 const register double tmp101_1 = C_1_8*w75;
759 const register double tmp32_1 = tmp1_0*w82;
760 const register double tmp2_1 = C_0_5*w74;
761 const register double tmp108_1 = C_0_6*w64;
762 const register double tmp8_1 = C_1_4*w62;
763 const register double tmp90_1 = C_1_0*w55;
764 const register double tmp14_1 = C_0_7*w76;
765 const register double tmp22_1 = C_1_7*w77;
766 const register double tmp40_1 = C_0_8*w64;
767 const register double tmp5_1 = C_0_4*w73;
768 const register double tmp74_1 = C_1_8*w85;
769 const register double tmp78_1 = tmp5_0*w71;
770 const register double tmp76_1 = C_1_3*w87;
771 const register double tmp57_1 = C_0_7*w83;
772 const register double tmp21_1 = tmp2_0*w82;
773 const register double tmp52_1 = C_0_6*w69;
774 const register double tmp39_1 = C_0_1*w56;
775 const register double tmp88_1 = C_1_6*w85;
776 const register double tmp31_1 = C_0_8*w58;
777 const register double tmp38_1 = C_0_5*w59;
778 const register double tmp10_1 = C_0_3*w72;
779 const register double tmp102_1 = C_0_2*w64;
780 const register double tmp80_1 = C_1_0*w92;
781 const register double tmp49_1 = C_0_3*w63;
782 const register double tmp75_1 = tmp5_0*w69;
783 const register double tmp77_1 = C_1_0*w88;
784 const register double tmp104_1 = C_0_0*w68;
785 const register double tmp60_1 = C_0_5*w72;
786 const register double tmp56_1 = C_1_2*w82;
787 const register double tmp69_1 = tmp4_0*w71;
788 const register double tmp91_1 = C_1_2*w88;
789 const register double tmp93_1 = C_1_0*w75;
790 const register double tmp107_1 = C_1_2*w89;
791 const register double tmp106_1 = C_0_8*w54;
792 const register double tmp13_1 = C_0_8*w78;
793 const register double tmp64_1 = C_1_0*w89;
794 const register double tmp33_1 = C_1_1*w77;
795 const register double tmp115_1 = C_1_8*w55;
796 const register double tmp11_1 = C_0_1*w83;
797 const register double tmp86_1 = C_1_2*w75;
798 const register double tmp83_1 = C_1_6*w82;
799 const register double tmp109_1 = C_0_2*w58;
800 const register double tmp98_1 = C_0_8*w69;
801 const register double tmp23_1 = tmp0_0*w79;
802 const register double tmp114_1 = C_0_2*w81;
803 const register double tmp81_1 = tmp5_0*w68;
804 const register double tmp53_1 = C_0_3*w74;
805 const register double tmp92_1 = C_1_2*w92;
806 const register double tmp119_1 = C_0_6*w78;
807 const register double tmp50_1 = C_0_6*w68;
808 const register double tmp18_1 = tmp1_0*w75;
809 const register double tmp15_1 = tmp3_0*w93;
810 const register double tmp73_1 = C_1_2*w55;
811 const register double tmp36_1 = tmp2_0*w75;
812 const register double tmp17_1 = C_0_3*w59;
813 const register double tmp45_1 = C_1_5*w87;
814 const register double tmp27_1 = C_0_7*w56;
815 const register double tmp84_1 = C_1_5*w90;
816 const register double tmp59_1 = C_1_5*w91;
817 const register double tmp105_1 = C_0_6*w58;
818 const register double tmp44_1 = C_1_6*w55;
819 const register double tmp89_1 = C_1_8*w65;
820 const register double tmp62_1 = C_0_0*w78;
821 const register double tmp12_1 = C_1_7*w67;
822 const register double tmp100_1 = C_1_6*w92;
823 const register double tmp46_1 = C_0_7*w66;
824 const register double tmp117_1 = C_0_0*w69;
825 const register double tmp6_1 = tmp1_0*w65;
826 const register double tmp3_1 = tmp0_0*w60;
827 const register double tmp37_1 = C_1_0*w85;
828 const register double tmp111_1 = C_0_0*w54;
829 const register double tmp66_1 = tmp2_0*w65;
830 const register double tmp35_1 = C_0_6*w54;
831 const register double tmp112_1 = C_0_8*w71;
832 const register double tmp29_1 = C_0_0*w64;
833 const register double tmp28_1 = C_1_7*w84;
834 const register double tmp16_1 = C_1_4*w80;
835 const register double tmp26_1 = C_1_1*w84;
836 const register double tmp58_1 = C_0_1*w76;
837 EM_S[INDEX2(0,1,4)]+=tmp0_1 + tmp10_1 + tmp11_1 + tmp12_1 + tmp13_1 + tmp14_1 + tmp1_1 + tmp2_1 + tmp3_1 + tmp4_1 + tmp5_1 + tmp6_1 + tmp7_1 + tmp8_1 + tmp9_1;
838 EM_S[INDEX2(1,2,4)]+=tmp15_1 + tmp16_1 + tmp17_1 + tmp18_1 + tmp19_1 + tmp20_1 + tmp21_1 + tmp22_1 + tmp23_1 + tmp24_1 + tmp25_1 + tmp26_1;
839 EM_S[INDEX2(3,2,4)]+=tmp16_1 + tmp17_1 + tmp19_1 + tmp23_1 + tmp25_1 + tmp27_1 + tmp28_1 + tmp29_1 + tmp30_1 + tmp31_1 + tmp32_1 + tmp33_1 + tmp34_1 + tmp35_1 + tmp36_1;
840 EM_S[INDEX2(0,0,4)]+=tmp0_1 + tmp12_1 + tmp19_1 + tmp37_1 + tmp38_1 + tmp39_1 + tmp40_1 + tmp41_1 + tmp42_1 + tmp43_1 + tmp44_1 + tmp45_1 + tmp46_1 + tmp47_1 + tmp48_1 + tmp49_1 + tmp50_1 + tmp8_1;
841 EM_S[INDEX2(3,3,4)]+=tmp16_1 + tmp28_1 + tmp33_1 + tmp51_1 + tmp52_1 + tmp53_1 + tmp54_1 + tmp55_1 + tmp56_1 + tmp57_1 + tmp58_1 + tmp59_1 + tmp5_1 + tmp60_1 + tmp61_1 + tmp62_1 + tmp63_1 + tmp64_1;
842 EM_S[INDEX2(3,0,4)]+=tmp15_1 + tmp17_1 + tmp19_1 + tmp20_1 + tmp24_1 + tmp25_1 + tmp3_1 + tmp65_1 + tmp66_1 + tmp67_1 + tmp68_1 + tmp8_1;
843 EM_S[INDEX2(3,1,4)]+=tmp53_1 + tmp5_1 + tmp60_1 + tmp65_1 + tmp68_1 + tmp69_1 + tmp70_1 + tmp71_1 + tmp72_1 + tmp73_1 + tmp74_1 + tmp75_1 + tmp76_1 + tmp77_1 + tmp8_1;
844 EM_S[INDEX2(2,1,4)]+=tmp10_1 + tmp2_1 + tmp3_1 + tmp5_1 + tmp65_1 + tmp66_1 + tmp67_1 + tmp68_1 + tmp70_1 + tmp78_1 + tmp79_1 + tmp8_1;
845 EM_S[INDEX2(0,2,4)]+=tmp15_1 + tmp16_1 + tmp19_1 + tmp22_1 + tmp26_1 + tmp38_1 + tmp49_1 + tmp80_1 + tmp81_1 + tmp82_1 + tmp83_1 + tmp84_1 + tmp85_1 + tmp86_1 + tmp87_1;
846 EM_S[INDEX2(2,0,4)]+=tmp15_1 + tmp19_1 + tmp38_1 + tmp42_1 + tmp45_1 + tmp49_1 + tmp65_1 + tmp68_1 + tmp81_1 + tmp85_1 + tmp88_1 + tmp89_1 + tmp8_1 + tmp90_1 + tmp91_1;
847 EM_S[INDEX2(1,3,4)]+=tmp16_1 + tmp22_1 + tmp26_1 + tmp53_1 + tmp59_1 + tmp5_1 + tmp60_1 + tmp61_1 + tmp69_1 + tmp70_1 + tmp75_1 + tmp92_1 + tmp93_1 + tmp94_1 + tmp95_1;
848 EM_S[INDEX2(2,3,4)]+=tmp10_1 + tmp16_1 + tmp23_1 + tmp28_1 + tmp2_1 + tmp32_1 + tmp33_1 + tmp36_1 + tmp57_1 + tmp58_1 + tmp5_1 + tmp96_1 + tmp97_1 + tmp98_1 + tmp99_1;
849 EM_S[INDEX2(2,2,4)]+=tmp100_1 + tmp101_1 + tmp102_1 + tmp103_1 + tmp104_1 + tmp105_1 + tmp106_1 + tmp107_1 + tmp16_1 + tmp19_1 + tmp27_1 + tmp28_1 + tmp33_1 + tmp34_1 + tmp38_1 + tmp49_1 + tmp82_1 + tmp84_1;
850 EM_S[INDEX2(1,0,4)]+=tmp0_1 + tmp108_1 + tmp109_1 + tmp110_1 + tmp111_1 + tmp12_1 + tmp17_1 + tmp19_1 + tmp25_1 + tmp39_1 + tmp3_1 + tmp46_1 + tmp6_1 + tmp7_1 + tmp8_1;
851 EM_S[INDEX2(0,3,4)]+=tmp10_1 + tmp16_1 + tmp18_1 + tmp21_1 + tmp22_1 + tmp23_1 + tmp26_1 + tmp2_1 + tmp5_1 + tmp70_1 + tmp78_1 + tmp79_1;
852 EM_S[INDEX2(1,1,4)]+=tmp0_1 + tmp112_1 + tmp113_1 + tmp114_1 + tmp115_1 + tmp116_1 + tmp117_1 + tmp118_1 + tmp119_1 + tmp11_1 + tmp12_1 + tmp14_1 + tmp53_1 + tmp5_1 + tmp60_1 + tmp71_1 + tmp76_1 + tmp8_1;
853 } else { /* constant data */
854 const register double C_0 = C_p[0];
855 const register double C_1 = C_p[1];
856 const register double tmp1_1 = C_1*w95;
857 const register double tmp3_1 = C_0*w101;
858 const register double tmp0_1 = C_0*w97;
859 const register double tmp6_1 = C_1*w100;
860 const register double tmp7_1 = C_0*w96;
861 const register double tmp4_1 = C_0*w94;
862 const register double tmp2_1 = C_1*w98;
863 const register double tmp5_1 = C_1*w99;
864 EM_S[INDEX2(0,1,4)]+=tmp0_1 + tmp1_1;
865 EM_S[INDEX2(1,2,4)]+=tmp2_1 + tmp3_1;
866 EM_S[INDEX2(3,2,4)]+=tmp2_1 + tmp4_1;
867 EM_S[INDEX2(0,0,4)]+=tmp4_1 + tmp5_1;
868 EM_S[INDEX2(3,3,4)]+=tmp0_1 + tmp6_1;
869 EM_S[INDEX2(3,0,4)]+=tmp1_1 + tmp3_1;
870 EM_S[INDEX2(3,1,4)]+=tmp5_1 + tmp7_1;
871 EM_S[INDEX2(2,1,4)]+=tmp1_1 + tmp7_1;
872 EM_S[INDEX2(0,2,4)]+=tmp3_1 + tmp6_1;
873 EM_S[INDEX2(2,0,4)]+=tmp3_1 + tmp5_1;
874 EM_S[INDEX2(1,3,4)]+=tmp6_1 + tmp7_1;
875 EM_S[INDEX2(2,3,4)]+=tmp0_1 + tmp2_1;
876 EM_S[INDEX2(2,2,4)]+=tmp4_1 + tmp6_1;
877 EM_S[INDEX2(1,0,4)]+=tmp1_1 + tmp4_1;
878 EM_S[INDEX2(0,3,4)]+=tmp2_1 + tmp7_1;
879 EM_S[INDEX2(1,1,4)]+=tmp0_1 + tmp5_1;
880 }
881 }
882 /**************************************************************/
883 /* process D: */
884 /**************************************************************/
885 if (NULL!=D_p) {
886 add_EM_S=TRUE;
887 if (extendedD) {
888 const register double D_0 = D_p[0];
889 const register double D_1 = D_p[1];
890 const register double D_2 = D_p[2];
891 const register double D_3 = D_p[3];
892 const register double D_4 = D_p[4];
893 const register double D_5 = D_p[5];
894 const register double D_6 = D_p[6];
895 const register double D_7 = D_p[7];
896 const register double D_8 = D_p[8];
897 const register double tmp12_0 = D_1 + D_5;
898 const register double tmp7_0 = D_1 + D_3;
899 const register double tmp3_0 = D_1 + D_3 + D_5 + D_7;
900 const register double tmp11_0 = D_0 + D_8;
901 const register double tmp2_0 = D_0 + D_2;
902 const register double tmp9_0 = D_1 + D_7;
903 const register double tmp0_0 = D_6 + D_8;
904 const register double tmp8_0 = D_0 + D_6;
905 const register double tmp10_0 = D_2 + D_8;
906 const register double tmp1_0 = D_3 + D_5;
907 const register double tmp6_0 = D_5 + D_7;
908 const register double tmp5_0 = D_2 + D_6;
909 const register double tmp4_0 = D_0 + D_2 + D_6 + D_8;
910 const register double tmp13_0 = D_3 + D_7;
911 const register double tmp2_1 = D_7*w107;
912 const register double tmp18_1 = tmp7_0*w107;
913 const register double tmp5_1 = tmp2_0*w102;
914 const register double tmp25_1 = tmp10_0*w102;
915 const register double tmp32_1 = tmp12_0*w107;
916 const register double tmp30_1 = tmp11_0*w108;
917 const register double tmp35_1 = D_6*w110;
918 const register double tmp31_1 = D_2*w110;
919 const register double tmp22_1 = D_5*w103;
920 const register double tmp24_1 = tmp9_0*w104;
921 const register double tmp29_1 = tmp8_0*w102;
922 const register double tmp38_1 = tmp12_0*w103;
923 const register double tmp9_1 = D_7*w103;
924 const register double tmp23_1 = D_3*w107;
925 const register double tmp1_1 = D_1*w103;
926 const register double tmp27_1 = D_3*w103;
927 const register double tmp34_1 = tmp13_0*w103;
928 const register double tmp15_1 = D_0*w109;
929 const register double tmp36_1 = tmp13_0*w107;
930 const register double tmp16_1 = tmp7_0*w103;
931 const register double tmp19_1 = D_8*w109;
932 const register double tmp26_1 = tmp10_0*w106;
933 const register double tmp33_1 = D_6*w109;
934 const register double tmp12_1 = tmp5_0*w108;
935 const register double tmp8_1 = tmp2_0*w106;
936 const register double tmp13_1 = D_8*w110;
937 const register double tmp6_1 = tmp3_0*w104;
938 const register double tmp20_1 = D_0*w110;
939 const register double tmp28_1 = D_5*w107;
940 const register double tmp0_1 = tmp0_0*w106;
941 const register double tmp37_1 = D_2*w109;
942 const register double tmp17_1 = tmp6_0*w103;
943 const register double tmp14_1 = tmp6_0*w107;
944 const register double tmp21_1 = tmp8_0*w106;
945 const register double tmp3_1 = tmp1_0*w104;
946 const register double tmp7_1 = tmp4_0*w108;
947 const register double tmp11_1 = tmp0_0*w102;
948 const register double tmp4_1 = D_4*w105;
949 const register double tmp10_1 = D_1*w107;
950 EM_S[INDEX2(0,1,4)]+=tmp0_1 + tmp1_1 + tmp2_1 + tmp3_1 + tmp4_1 + tmp5_1;
951 EM_S[INDEX2(1,2,4)]+=tmp4_1 + tmp6_1 + tmp7_1;
952 EM_S[INDEX2(3,2,4)]+=tmp10_1 + tmp11_1 + tmp3_1 + tmp4_1 + tmp8_1 + tmp9_1;
953 EM_S[INDEX2(0,0,4)]+=tmp12_1 + tmp13_1 + tmp14_1 + tmp15_1 + tmp16_1 + tmp4_1;
954 EM_S[INDEX2(3,3,4)]+=tmp12_1 + tmp17_1 + tmp18_1 + tmp19_1 + tmp20_1 + tmp4_1;
955 EM_S[INDEX2(3,0,4)]+=tmp4_1 + tmp6_1 + tmp7_1;
956 EM_S[INDEX2(3,1,4)]+=tmp21_1 + tmp22_1 + tmp23_1 + tmp24_1 + tmp25_1 + tmp4_1;
957 EM_S[INDEX2(2,1,4)]+=tmp4_1 + tmp6_1 + tmp7_1;
958 EM_S[INDEX2(0,2,4)]+=tmp24_1 + tmp26_1 + tmp27_1 + tmp28_1 + tmp29_1 + tmp4_1;
959 EM_S[INDEX2(2,0,4)]+=tmp24_1 + tmp26_1 + tmp27_1 + tmp28_1 + tmp29_1 + tmp4_1;
960 EM_S[INDEX2(1,3,4)]+=tmp21_1 + tmp22_1 + tmp23_1 + tmp24_1 + tmp25_1 + tmp4_1;
961 EM_S[INDEX2(2,3,4)]+=tmp10_1 + tmp11_1 + tmp3_1 + tmp4_1 + tmp8_1 + tmp9_1;
962 EM_S[INDEX2(2,2,4)]+=tmp30_1 + tmp31_1 + tmp32_1 + tmp33_1 + tmp34_1 + tmp4_1;
963 EM_S[INDEX2(1,0,4)]+=tmp0_1 + tmp1_1 + tmp2_1 + tmp3_1 + tmp4_1 + tmp5_1;
964 EM_S[INDEX2(0,3,4)]+=tmp4_1 + tmp6_1 + tmp7_1;
965 EM_S[INDEX2(1,1,4)]+=tmp30_1 + tmp35_1 + tmp36_1 + tmp37_1 + tmp38_1 + tmp4_1;
966 } else { /* constant data */
967 const register double D_0 = D_p[0];
968 const register double tmp0_1 = D_0*w111;
969 const register double tmp2_1 = D_0*w113;
970 const register double tmp1_1 = D_0*w112;
971 EM_S[INDEX2(0,1,4)]+=tmp0_1;
972 EM_S[INDEX2(1,2,4)]+=tmp1_1;
973 EM_S[INDEX2(3,2,4)]+=tmp0_1;
974 EM_S[INDEX2(0,0,4)]+=tmp2_1;
975 EM_S[INDEX2(3,3,4)]+=tmp2_1;
976 EM_S[INDEX2(3,0,4)]+=tmp1_1;
977 EM_S[INDEX2(3,1,4)]+=tmp0_1;
978 EM_S[INDEX2(2,1,4)]+=tmp1_1;
979 EM_S[INDEX2(0,2,4)]+=tmp0_1;
980 EM_S[INDEX2(2,0,4)]+=tmp0_1;
981 EM_S[INDEX2(1,3,4)]+=tmp0_1;
982 EM_S[INDEX2(2,3,4)]+=tmp0_1;
983 EM_S[INDEX2(2,2,4)]+=tmp2_1;
984 EM_S[INDEX2(1,0,4)]+=tmp0_1;
985 EM_S[INDEX2(0,3,4)]+=tmp1_1;
986 EM_S[INDEX2(1,1,4)]+=tmp2_1;
987 }
988 }
989 /**************************************************************/
990 /* process X: */
991 /**************************************************************/
992 if (NULL!=X_p) {
993 add_EM_F=TRUE;
994 if (extendedX) {
995 const register double X_0_0 = X_p[INDEX2(0,0,2];
996 const register double X_1_0 = X_p[INDEX2(1,0,2];
997 const register double X_0_1 = X_p[INDEX2(0,1,2];
998 const register double X_1_1 = X_p[INDEX2(1,1,2];
999 const register double X_0_2 = X_p[INDEX2(0,2,2];
1000 const register double X_1_2 = X_p[INDEX2(1,2,2];
1001 const register double X_0_3 = X_p[INDEX2(0,3,2];
1002 const register double X_1_3 = X_p[INDEX2(1,3,2];
1003 const register double X_0_4 = X_p[INDEX2(0,4,2];
1004 const register double X_1_4 = X_p[INDEX2(1,4,2];
1005 const register double X_0_5 = X_p[INDEX2(0,5,2];
1006 const register double X_1_5 = X_p[INDEX2(1,5,2];
1007 const register double X_0_6 = X_p[INDEX2(0,6,2];
1008 const register double X_1_6 = X_p[INDEX2(1,6,2];
1009 const register double X_0_7 = X_p[INDEX2(0,7,2];
1010 const register double X_1_7 = X_p[INDEX2(1,7,2];
1011 const register double X_0_8 = X_p[INDEX2(0,8,2];
1012 const register double X_1_8 = X_p[INDEX2(1,8,2];
1013 const register double tmp0_0 = X_1_0 + X_1_6;
1014 const register double tmp4_0 = X_0_3 + X_0_5;
1015 const register double tmp2_0 = X_0_0 + X_0_2;
1016 const register double tmp5_0 = X_1_2 + X_1_8;
1017 const register double tmp1_0 = X_0_6 + X_0_8;
1018 const register double tmp3_0 = X_1_1 + X_1_7;
1019 const register double tmp24_1 = X_1_3*w135;
1020 const register double tmp14_1 = tmp2_0*w126;
1021 const register double tmp8_1 = X_0_1*w116;
1022 const register double tmp22_1 = tmp2_0*w124;
1023 const register double tmp34_1 = X_1_5*w135;
1024 const register double tmp15_1 = X_0_4*w129;
1025 const register double tmp20_1 = X_1_5*w120;
1026 const register double tmp36_1 = tmp0_0*w134;
1027 const register double tmp39_1 = tmp5_0*w132;
1028 const register double tmp0_1 = X_0_4*w121;
1029 const register double tmp5_1 = X_1_5*w123;
1030 const register double tmp38_1 = X_1_3*w137;
1031 const register double tmp3_1 = X_1_4*w122;
1032 const register double tmp2_1 = tmp1_0*w124;
1033 const register double tmp11_1 = X_0_7*w125;
1034 const register double tmp19_1 = X_0_7*w131;
1035 const register double tmp1_1 = tmp0_0*w115;
1036 const register double tmp10_1 = tmp5_0*w118;
1037 const register double tmp12_1 = tmp5_0*w115;
1038 const register double tmp16_1 = X_0_1*w127;
1039 const register double tmp23_1 = X_1_4*w136;
1040 const register double tmp31_1 = X_0_1*w125;
1041 const register double tmp17_1 = tmp4_0*w128;
1042 const register double tmp37_1 = tmp1_0*w126;
1043 const register double tmp30_1 = tmp0_0*w132;
1044 const register double tmp26_1 = tmp5_0*w134;
1045 const register double tmp29_1 = X_1_5*w137;
1046 const register double tmp7_1 = tmp4_0*w119;
1047 const register double tmp4_1 = tmp2_0*w114;
1048 const register double tmp18_1 = X_1_3*w123;
1049 const register double tmp33_1 = X_0_1*w131;
1050 const register double tmp9_1 = X_1_3*w120;
1051 const register double tmp32_1 = X_0_7*w127;
1052 const register double tmp13_1 = tmp1_0*w130;
1053 const register double tmp35_1 = tmp2_0*w130;
1054 const register double tmp6_1 = tmp3_0*w117;
1055 const register double tmp28_1 = X_0_7*w116;
1056 const register double tmp21_1 = tmp0_0*w118;
1057 const register double tmp27_1 = tmp3_0*w133;
1058 const register double tmp25_1 = tmp1_0*w114;
1059 EM_F[0]+=tmp0_1 + tmp10_1 + tmp11_1 + tmp1_1 + tmp2_1 + tmp3_1 + tmp4_1 + tmp5_1 + tmp6_1 + tmp7_1 + tmp8_1 + tmp9_1;
1060 EM_F[1]+=tmp12_1 + tmp13_1 + tmp14_1 + tmp15_1 + tmp16_1 + tmp17_1 + tmp18_1 + tmp19_1 + tmp20_1 + tmp21_1 + tmp3_1 + tmp6_1;
1061 EM_F[2]+=tmp0_1 + tmp22_1 + tmp23_1 + tmp24_1 + tmp25_1 + tmp26_1 + tmp27_1 + tmp28_1 + tmp29_1 + tmp30_1 + tmp31_1 + tmp7_1;
1062 EM_F[3]+=tmp15_1 + tmp17_1 + tmp23_1 + tmp27_1 + tmp32_1 + tmp33_1 + tmp34_1 + tmp35_1 + tmp36_1 + tmp37_1 + tmp38_1 + tmp39_1;
1063 } else { /* constant data */
1064 const register double X_0 = X_p[0];
1065 const register double X_1 = X_p[1];
1066 const register double tmp2_1 = X_0*w140;
1067 const register double tmp3_1 = X_1*w141;
1068 const register double tmp1_1 = X_1*w139;
1069 const register double tmp0_1 = X_0*w138;
1070 EM_F[0]+=tmp0_1 + tmp1_1;
1071 EM_F[1]+=tmp1_1 + tmp2_1;
1072 EM_F[2]+=tmp0_1 + tmp3_1;
1073 EM_F[3]+=tmp2_1 + tmp3_1;
1074 }
1075 }
1076 /**************************************************************/
1077 /* process Y: */
1078 /**************************************************************/
1079 if (NULL!=Y_p) {
1080 add_EM_F=TRUE;
1081 if (extendedY) {
1082 const register double Y_0 = Y_p[0];
1083 const register double Y_1 = Y_p[1];
1084 const register double Y_2 = Y_p[2];
1085 const register double Y_3 = Y_p[3];
1086 const register double Y_4 = Y_p[4];
1087 const register double Y_5 = Y_p[5];
1088 const register double Y_6 = Y_p[6];
1089 const register double Y_7 = Y_p[7];
1090 const register double Y_8 = Y_p[8];
1091 const register double tmp5_0 = Y_0 + Y_8;
1092 const register double tmp0_0 = Y_5 + Y_7;
1093 const register double tmp1_0 = Y_1 + Y_3;
1094 const register double tmp4_0 = Y_1 + Y_5;
1095 const register double tmp3_0 = Y_3 + Y_7;
1096 const register double tmp2_0 = Y_2 + Y_6;
1097 const register double tmp14_1 = tmp3_0*w143;
1098 const register double tmp11_1 = tmp4_0*w146;
1099 const register double tmp6_1 = tmp3_0*w146;
1100 const register double tmp17_1 = Y_0*w147;
1101 const register double tmp16_1 = Y_8*w142;
1102 const register double tmp13_1 = Y_2*w147;
1103 const register double tmp18_1 = tmp0_0*w143;
1104 const register double tmp10_1 = tmp5_0*w144;
1105 const register double tmp3_1 = tmp1_0*w143;
1106 const register double tmp12_1 = Y_6*w142;
1107 const register double tmp0_1 = tmp0_0*w146;
1108 const register double tmp9_1 = tmp4_0*w143;
1109 const register double tmp4_1 = tmp2_0*w144;
1110 const register double tmp2_1 = Y_8*w147;
1111 const register double tmp15_1 = tmp1_0*w146;
1112 const register double tmp8_1 = Y_6*w147;
1113 const register double tmp7_1 = Y_2*w142;
1114 const register double tmp5_1 = Y_4*w145;
1115 const register double tmp1_1 = Y_0*w142;
1116 EM_F[0]+=tmp0_1 + tmp1_1 + tmp2_1 + tmp3_1 + tmp4_1 + tmp5_1;
1117 EM_F[1]+=tmp10_1 + tmp5_1 + tmp6_1 + tmp7_1 + tmp8_1 + tmp9_1;
1118 EM_F[2]+=tmp10_1 + tmp11_1 + tmp12_1 + tmp13_1 + tmp14_1 + tmp5_1;
1119 EM_F[3]+=tmp15_1 + tmp16_1 + tmp17_1 + tmp18_1 + tmp4_1 + tmp5_1;
1120 } else { /* constant data */
1121 const register double Y_0 = Y_p[0];
1122 const register double tmp0_1 = Y_0*w148;
1123 EM_F[0]+=tmp0_1;
1124 EM_F[1]+=tmp0_1;
1125 EM_F[2]+=tmp0_1;
1126 EM_F[3]+=tmp0_1;
1127 }
1128 }
1129 /* GENERATOR SNIP BOTTOM */
1130 /* add to matrix (if add_EM_S) and RHS (if add_EM_F)*/
1131 } /* end k0 */
1132 } /* end k1 */
1133 } /* end k2 */
1134 } /* end coloring */
1135 } /* end of pointer check */
1136 THREAD_MEMFREE(EM_S);
1137 THREAD_MEMFREE(EM_F);
1138 } /* end parallel region */
1139 } /* end of presettings */
1140 }

  ViewVC Help
Powered by ViewVC 1.1.26