/[escript]/trunk/finley/src/ShapeFunctions.c
ViewVC logotype

Contents of /trunk/finley/src/ShapeFunctions.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1312 - (show annotations)
Mon Sep 24 06:18:44 2007 UTC (12 years ago) by ksteube
File MIME type: text/plain
File size: 69976 byte(s)
The MPI branch is hereby closed. All future work should be in trunk.

Previously in revision 1295 I merged the latest changes to trunk into trunk-mpi-branch.
In this revision I copied all files from trunk-mpi-branch over the corresponding
trunk files. I did not use 'svn merge', it was a copy.

1
2 /* $Id$ */
3
4 /*******************************************************
5 *
6 * Copyright 2003-2007 by ACceSS MNRF
7 * Copyright 2007 by University of Queensland
8 *
9 * http://esscc.uq.edu.au
10 * Primary Business: Queensland, Australia
11 * Licensed under the Open Software License version 3.0
12 * http://www.opensource.org/licenses/osl-3.0.php
13 *
14 *******************************************************/
15
16 /**************************************************************/
17
18 /* Finley: Shape functions */
19
20 /**************************************************************/
21
22 #include "ShapeFunctions.h"
23
24 /**************************************************************/
25
26 #define V(_K_,_I_) v[INDEX2((_K_)-1,(_I_),DIM)]
27 #define S(_J_,_I_) s[S_INDEX((_J_)-1,(_I_),NUMSHAPES)]
28 #define DSDV(_J_,_K_,_I_) dsdv[DSDV_INDEX((_J_)-1,(_K_)-1,(_I_),NUMSHAPES,DIM)]
29
30 /**************************************************************/
31
32 void Finley_Shape_Point1(int NumV,double* v,double* s,double* dsdv) {
33 #define NUMSHAPES 1
34 #define DIM 0
35 int i;
36 for (i=0;i<NumV;i++) {
37 S(1,i)=1.;
38 }
39 #undef NUMSHAPES
40 #undef DIM
41 }
42
43 /**************************************************************/
44
45 void Finley_Shape_Line2(int NumV,double* v,double* s,double* dsdv) {
46 #define NUMSHAPES 2
47 #define DIM 1
48 double x;
49 int i;
50 for (i=0;i<NumV;i++) {
51 x=V(1,i);
52 S(1,i)=1.-x;
53 S(2,i)= x;
54 DSDV(1,1,i)=-1.;
55 DSDV(2,1,i)= 1.;
56 }
57 #undef NUMSHAPES
58 #undef DIM
59 }
60
61 /**************************************************************/
62
63 void Finley_Shape_Line3(int NumV,double* v,double* s,double* dsdv) {
64 #define NUMSHAPES 3
65 #define DIM 1
66 double x;
67 int i;
68 for (i=0;i<NumV;i++) {
69 x=V(1,i);
70 S(1,i)=(2.*x -1. )*(x -1.);
71 S(2,i)=(2.*x -1.)*x;
72 S(3,i)= 4.*x*(1. -x );
73 DSDV(1,1,i)= 4.*x -3.;
74 DSDV(2,1,i)= 4.*x -1.;
75 DSDV(3,1,i)=-8.*x+4.;
76 }
77 #undef NUMSHAPES
78 #undef DIM
79 }
80
81 /**************************************************************/
82
83 void Finley_Shape_Line4(int NumV,double* v,double* s,double* dsdv) {
84 #define NUMSHAPES 4
85 #define DIM 1
86 double x;
87 int i;
88 for (i=0;i<NumV;i++) {
89 x=V(1,i);
90 S(1,i)=(10.)+(-5.5)*x+(9.)*x*x+(-4.5)*x*x*x ;
91 S(2,i)=(10.)*x+(-4.5)*x*x+(4.5)*x*x*x ;
92 S(3,i)=(9.)*x+(-22.5)*x*x+(13.5)*x*x*x ;
93 S(4,i)=(-4.5)*x+(18.)*x*x+(-13.5)*x*x*x;
94 DSDV(1,1,i)=(-5.5)+(18.)*x+(-13.5)*x*x;
95 DSDV(2,1,i)=(10.)+(-9.)*x+(13.5)*x*x;
96 DSDV(3,1,i)=(9.)+(-45.)*x+(0.405e2)*x*x;
97 DSDV(4,1,i)=(-4.5)+(36.)*x+(-0.405e2)*x*x;
98 }
99 #undef NUMSHAPES
100 #undef DIM
101 }
102
103 /**************************************************************/
104
105 void Finley_Shape_Tri3(int NumV,double* v,double* s,double* dsdv) {
106 #define NUMSHAPES 3
107 #define DIM 2
108 double x,y;
109 int i;
110 for (i=0;i<NumV;i++) {
111 x=V(1,i);
112 y=V(2,i);
113 S(1,i)=1.-x-y;
114 S(2,i)= x;
115 S(3,i)= y;
116 DSDV(1,1,i)=-1.;
117 DSDV(1,2,i)=-1.;
118 DSDV(2,1,i)= 1.;
119 DSDV(2,2,i)= 0.;
120 DSDV(3,1,i)= 0.;
121 DSDV(3,2,i)= 1.;
122 }
123 #undef NUMSHAPES
124 #undef DIM
125 }
126
127 /**************************************************************/
128
129 void Finley_Shape_Tri6(int NumV,double* v,double* s,double* dsdv) {
130 #define NUMSHAPES 6
131 #define DIM 2
132 double x,y;
133 int i;
134 for (i=0;i<NumV;i++) {
135 x=V(1,i);
136 y=V(2,i);
137 S(1,i)= (1. -x -y)*(1. -2.*x -2.* y);
138 S(2,i)= x*(2.* x -1.);
139 S(3,i)= y*(2.* y -1.);
140 S(4,i)= (1. -x -y)*4.* x;
141 S(5,i)= 4.*x*y;
142 S(6,i)= (1. -x -y)*4.* y;
143 DSDV(1,1,i)= -3.+4.*x+4.*y;
144 DSDV(1,2,i)= -3.+4.*x+4.*y;
145 DSDV(2,1,i)= -1.+4.*x;
146 DSDV(2,2,i)= 0.;
147 DSDV(3,1,i)= 0.;
148 DSDV(3,2,i)= -1. +4.*y;
149 DSDV(4,1,i)= 4. -8.*x -4.*y;
150 DSDV(4,2,i)= -4.*x;
151 DSDV(5,1,i)= 4.*y;
152 DSDV(5,2,i)= 4.*x;
153 DSDV(6,1,i)= -4.*y;
154 DSDV(6,2,i)= 4. -4.*x -8.*y;
155 }
156 #undef NUMSHAPES
157 #undef DIM
158 }
159
160 /**************************************************************/
161
162 void Finley_Shape_Tri9(int NumV,double* v,double* s,double* dsdv) {
163 #define NUMSHAPES 9
164 #define DIM 2
165 double x,y;
166 int i;
167 for (i=0;i<NumV;i++) {
168 x=V(1,i);
169 y=V(2,i);
170 S(1,i)=(10.)+(-5.5)*x+(-5.5)*y+(9.)*x*x+(-4.5)*x*x*x+(9.)*y*y+(-4.5)*y*y*y+(4.5)*x*y*y+(4.5)*x*x*y;
171 S(2,i)=(10.)*x+(-4.5)*x*x+(4.5)*x*x*x;
172 S(3,i)=(10.)*y+(-4.5)*y*y+(4.5)*y*y*y;
173 S(4,i)=(9.)*x+(-22.5)*x*x+(13.5)*x*x*x+(-9.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2)*y*y+(9.)*x*y+(-9.)*x*x;
197 }
198 #undef NUMSHAPES
199 #undef DIM
200 }
201
202 /**************************************************************/
203
204 void Finley_Shape_Tri10(int NumV,double* v,double* s,double* dsdv) {
205 #define NUMSHAPES 10
206 #define DIM 2
207 double x,y;
208 int i;
209 for (i=0;i<NumV;i++) {
210 x=V(1,i);
211 y=V(2,i);
212 S(1,i)=(10.)+(-5.5)*x+(-5.5)*y+(9.)*x*x+(-4.5)*x*x*x+(9.)*y*y+(-4.5)*y*y*y+(-13.5)*x*y*y+(-13.5)*x*x*y+(18.)*x*y;
213 S(2,i)=(10.)*x+(-4.5)*x*x+(4.5)*x*x*x;
214 S(3,i)=(10.)*y+(-4.5)*y*y+(4.5)*y*y*y;
215 S(4,i)=(9.)*x+(-22.5)*x*x+(13.5)*x*x*x+(13.5)*x*y*y+(0.27e2)*x*x*y+(-22.5)*x*y;
216 S(5,i)=(-4.5)*x+(18.)*x*x+(-13.5)*x*x*x+(-13.5)*x*x*y+(4.5)*x*y;
217 S(6,i)=(13.5)*x*x*y+(-4.5)*x*y;
218 S(7,i)=(13.5)*x*y*y+(-4.5)*x*y;
219 S(8,i)=(-4.5)*y+(18.)*y*y+(-13.5)*y*y*y+(-13.5)*x*y*y+(4.5)*x*y;
220 S(9,i)=(9.)*y+(-22.5)*y*y+(13.5)*y*y*y+(0.27e2)*x*y*y+(13.5)*x*x*y+(-22.5)*x*y;
221 S(10,i)=(-0.27e2)*x*y*y+(-0.27e2)*x*x*y+(0.27e2)*x*y;
222 DSDV(1, 1,i)=(-5.5)+(18.)*x+(-13.5)*x*x+(-13.5)*y*y+(-0.27e2)*x*y+(18.)*y;
223 DSDV(2, 1,i)=(10.)+(-9.)*x+(13.5)*x*x;
224 DSDV(3, 1,i)= 0.;
225 DSDV(4, 1,i)=(9.)+(-45.)*x+(0.405e2)*x*x+(13.5)*y*y+(0.54e2)*x*y+(-22.5)*y;
226 DSDV(5, 1,i)=(-4.5)+(36.)*x+(-0.405e2)*x*x+(-0.27e2)*x*y+(4.5)*y;
227 DSDV(6, 1,i)=(0.27e2)*x*y+(-4.5)*y;
228 DSDV(7, 1,i)=(13.5)*y*y+(-4.5)*y;
229 DSDV(8, 1,i)=(-13.5)*y*y+(4.5)*y;
230 DSDV(9, 1,i)=(0.27e2)*y*y+(0.27e2)*x*y+(-22.5)*y;
231 DSDV(10, 1,i)=(-0.27e2)*y*y+(-0.54e2)*x*y+(0.27e2)*y;
232 DSDV(1, 2,i)=(-5.5)+(18.)*y+(-13.5)*y*y+(-0.27e2)*x*y+(-13.5)*x*x+(18.)*x;
233 DSDV(2, 2,i)=0.;
234 DSDV(3, 2,i)=(10.)+(-9.)*y+(13.5)*y*y;
235 DSDV(4, 2,i)=(0.27e2)*x*y+(0.27e2)*x*x+(-22.5)*x;
236 DSDV(5, 2,i)=(-13.5)*x*x+(4.5)*x;
237 DSDV(6, 2,i)=(13.5)*x*x+(-4.5)*x;
238 DSDV(7, 2,i)=(0.27e2)*x*y+(-4.5)*x;
239 DSDV(8, 2,i)=(-4.5)+(36.)*y+(-0.405e2)*y*y+(-0.27e2)*x*y+(4.5)*x;
240 DSDV(9, 2,i)=(9.)+(-45.)*y+(0.405e2)*y*y+(0.54e2)*x*y+(13.5)*x*x+(-22.5)*x;
241 DSDV(10, 2,i)=(-0.54e2)*x*y+(-0.27e2)*x*x+(0.27e2)*x;
242 }
243 #undef NUMSHAPES
244 #undef DIM
245 }
246
247 /**************************************************************/
248
249 void Finley_Shape_Rec4(int NumV,double* v,double* s,double* dsdv) {
250 #define NUMSHAPES 4
251 #define DIM 2
252 double x,y;
253 int i;
254 for (i=0;i<NumV;i++) {
255 x=V(1,i);
256 y=V(2,i);
257 S(1,i)=(1.-x)*(1.-y);
258 S(2,i)= x*(1.-y);
259 S(3,i)= x*y;
260 S(4,i)= (1.-x)*y;
261 DSDV(1,1,i)=y-1.;
262 DSDV(1,2,i)=x-1.;
263 DSDV(2,1,i)= 1.-y;
264 DSDV(2,2,i)=-x;
265 DSDV(3,1,i)= y;
266 DSDV(3,2,i)= x;
267 DSDV(4,1,i)=-y;
268 DSDV(4,2,i)= 1.-x;
269 }
270 #undef NUMSHAPES
271 #undef DIM
272 }
273
274 /**************************************************************/
275
276 void Finley_Shape_Rec8(int NumV,double* v,double* s,double* dsdv) {
277 #define NUMSHAPES 8
278 #define DIM 2
279 double x,y;
280 int i;
281 for (i=0;i<NumV;i++) {
282 x=V(1,i);
283 y=V(2,i);
284 S(1,i)= 1. -3.*(x+y )+2.*x*x*(1. -y )+2.*y*y*(1. -x )+5.*x*y;
285 S(2,i)= x*(-1. -y+2.*x+2.*y*y -2.*x*y );
286 S(3,i)= x*y*(-3.+2.*(x+y ));
287 S(4,i)= y*(-1. -x+2.*y+2.*x*x -2.*x*y );
288 S(5,i)=4.*x*(1. -x -y+x* y);
289 S(6,i)= 4.*x*y*(1. -y );
290 S(7,i)= 4.*x*y*(1. -x );
291 S(8,i)=4.*y*(1. -x -y+x* y);
292 DSDV(1,1,i)=-3.+4.*x*(1. -y )+y*(5. -2.*y );
293 DSDV(1,2,i)=-3.+4.*y*(1. -x )+x*(5. -2.*x );
294 DSDV(2,1,i)=-1.+4.*x*(1. -y )+y*(-1.+2.*y );
295 DSDV(2,2,i)= x*(-1. -2.*x+4.*y);
296 DSDV(3,1,i)= y*(-3.+4.*x+2.*y);
297 DSDV(3,2,i)= x*(-3.+4.*y+2.*x);
298 DSDV(4,1,i)= y*(-1. -2.*y+4.*x);
299 DSDV(4,2,i)=-1.+4.*y*(1. -x )+x*(-1.+2.*x );
300 DSDV(5,1,i)= 4.*(1. -y )+8.*x*(y -1. );
301 DSDV(5,2,i)= 4.*x*(x -1.);
302 DSDV(6,1,i)= 4.*y*(1. -y );
303 DSDV(6,2,i)= 4.*x*(1. -2.*y );
304 DSDV(7,1,i)= 4.*y*(1. -2.*x );
305 DSDV(7,2,i)= 4.*x*(1. -x );
306 DSDV(8,1,i)= 4.*y*(y -1.);
307 DSDV(8,2,i)= 4.*(1. -x )+8.*y*(x -1. );
308 }
309 #undef NUMSHAPES
310 #undef DIM
311 }
312
313 /**************************************************************/
314
315 void Finley_Shape_Rec9(int NumV,double* v,double* s,double* dsdv) {
316 #define NUMSHAPES 9
317 #define DIM 2
318 double x,y;
319 int i;
320 for (i=0;i<NumV;i++) {
321 x=V(1,i);
322 y=V(2,i);
323 S(1,i)= + 1.0 - 3.0*x + 2.0*x*x - 3.0*y + 9.0*x*y - 6.0*x*x*y + 2.0*y*y - 6.0*x*y*y + 4.0*x*x*y*y;
324 S(2,i)= - 1.0*x + 2.0*x*x + 3.0*x*y - 6.0*x*x*y - 2.0*x*y*y + 4.0*x*x*y*y;
325 S(3,i)= + 1.0*x*y - 2.0*x*x*y - 2.0*x*y*y + 4.0*x*x*y*y;
326 S(4,i)= - 1.0*y + 3.0*x*y - 2.0*x*x*y + 2.0*y*y - 6.0*x*y*y + 4.0*x*x*y*y;
327 S(5,i)= + 4.0*x - 4.0*x*x - 12.0*x*y + 12.0*x*x*y + 8.0*x*y*y - 8.0*x*x*y*y;
328 S(6,i)= - 4.0*x*y + 8.0*x*x*y + 4.0*x*y*y - 8.0*x*x*y*y;
329 S(7,i)= - 4.0*x*y + 4.0*x*x*y + 8.0*x*y*y - 8.0*x*x*y*y;
330 S(8,i)= + 4.0*y - 12.0*x*y + 8.0*x*x*y - 4.0*y*y + 12.0*x*y*y - 8.0*x*x*y*y;
331 S(9,i)= + 16.0*x*y - 16.0*x*x*y - 16.0*x*y*y + 16.0*x*x*y*y;
332 DSDV(1,1,i)= - 3.0 + 4.0*x + 9.0*y - 12.0*x*y - 6.0*y*y + 8.0*x*y*y;
333 DSDV(1,2,i)= - 3.0 + 9.0*x - 6.0*x*x + 4.0*y - 12.0*x*y + 8.0*x*x*y;
334 DSDV(2,1,i)= - 1.0 + 4.0*x + 3.0*y - 12.0*x*y - 2.0*y*y + 8.0*x*y*y;
335 DSDV(2,2,i)= + 3.0*x - 6.0*x*x - 4.0*x*y + 8.0*x*x*y;
336 DSDV(3,1,i)= + 1.0*y - 4.0*x*y - 2.0*y*y + 8.0*x*y*y;
337 DSDV(3,2,i)= + 1.0*x - 2.0*x*x - 4.0*x*y + 8.0*x*x*y;
338 DSDV(4,1,i)= + 3.0*y - 4.0*x*y - 6.0*y*y + 8.0*x*y*y;
339 DSDV(4,2,i)= - 1.0 + 3.0*x - 2.0*x*x + 4.0*y - 12.0*x*y + 8.0*x*x*y;
340 DSDV(5,1,i)= + 4.0 - 8.0*x - 12.0*y + 24.0*x*y + 8.0*y*y - 16.0*x*y*y;
341 DSDV(5,2,i)= - 12.0*x + 12.0*x*x + 16.0*x*y - 16.0*x*x*y;
342 DSDV(6,1,i)= - 4.0*y + 16.0*x*y + 4.0*y*y - 16.0*x*y*y;
343 DSDV(6,2,i)= - 4.0*x + 8.0*x*x + 8.0*x*y - 16.0*x*x*y;
344 DSDV(7,1,i)= - 4.0*y + 8.0*x*y + 8.0*y*y - 16.0*x*y*y;
345 DSDV(7,2,i)= - 4.0*x + 4.0*x*x + 16.0*x*y - 16.0*x*x*y;
346 DSDV(8,1,i)= - 12.0*y + 16.0*x*y + 12.0*y*y - 16.0*x*y*y;
347 DSDV(8,2,i)= + 4.0 - 12.0*x + 8.0*x*x - 8.0*y + 24.0*x*y - 16.0*x*x*y;
348 DSDV(9,1,i)= + 16.0*y - 32.0*x*y - 16.0*y*y + 32.0*x*y*y;
349 DSDV(9,2,i)= + 16.0*x - 16.0*x*x - 32.0*x*y + 32.0*x*x*y;
350 }
351 #undef NUMSHAPES
352 #undef DIM
353 }
354
355 /**************************************************************/
356
357 void Finley_Shape_Rec12(int NumV,double* v,double* s,double* dsdv) {
358 #define NUMSHAPES 12
359 #define DIM 2
360 double x,y;
361 int i;
362 for (i=0;i<NumV;i++) {
363 x=V(1,i);
364 y=V(2,i);
365 S(1,i)=(10.)+(-5.5)*x+(10.)*x*y+(-5.5)*y+(9.)*x*x+(-4.5)*x*x*x+(-9.)*x*y*y+(4.5)*x*y*y*y+(4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+(-0.405e2)*x*y*y;
397 DSDV(9,2,i)=(-4.5)*x+(-13.5)*x*x*x+(18.)*x*x;
398 DSDV(10,2,i)=(9.)*x+(13.5)*x*x*x+(-22.5)*x*x;
399 DSDV(11,2,i)=(4.5)*x+(-4.5)+(-36.)*x*y+(0.405e2)*x*y*y+(-0.405e2)*y*y+(36.)*y;
400 DSDV(12,2,i)=(-9.)*x+(9.)+(45.)*x*y+(-0.405e2)*x*y*y+(0.405e2)*y*y+(-45.)*y;
401 }
402 #undef NUMSHAPES
403 #undef DIM
404 }
405
406 /**************************************************************/
407
408 void Finley_Shape_Rec16(int NumV,double* v,double* s,double* dsdv) {
409 #define NUMSHAPES 16
410 #define DIM 2
411 double x,y;
412 int i;
413 for (i=0;i<NumV;i++) {
414 x=V(1,i);
415 y=V(2,i);
416 S(1,i)=(10.)+(-5.5)*x+(0.3025e2)*x*y+(-5.5)*y+(9.)*x*x+(-4.5)*x*x*x+(-0.495e2)*x*y*y+(0.2475e2)*x*y*y*y+(0.2475e2)*x*x*x*y+(-0.495e2)*x*x*y+(-4.5)*y*y*y+(9.)*y*y+(0.81e2)*x*x*y*y+(-0.405e2)*x*x*x*y*y+(0.2025e2)*x*x*x*y*y*y+(-0.405e2)*x*x*y*y*y;
417 S(2,i)=(10.)*x+(-5.5)*x*y+(-4.5)*x*x+(4.5)*x*x*x+(9.)*x*y*y+(-4.5)*x*y*y*y+(-0.2475e2)*x*x*x*y+(0.2475e2)*x*x*y+(-0.405e2)*x*x*y*y+(0.405e2)*x*x*x*y*y+(-0.2025e2)*x*x*x*y*y*y+(0.2025e2)*x*x*y*y*y;
418 S(3,i)=(10.)*x*y+(-4.5)*x*y*y+(4.5)*x*y*y*y+(4.5)*x*x*x*y+(-4.5)*x*x*y+(0.2025e2)*x*x*y*y+(-0.2025e2)*x*x*x*y*y+(0.2025e2)*x*x*x*y*y*y+(-0.2025e2)*x*x*y*y*y;
419 S(4,i)=(-5.5)*x*y+(10.)*y+(0.2475e2)*x*y*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405e2)*x*y*y+(0.405e2)*x*y*y*y+(13.5)*x*x*x*y+(-22.5)*x*x*y+(0.10125e3)*x*x*y*y+(-0.6075e2)*x*x*x*y*y+(0.6075e2)*x*x*x*y*y*y+(-0.10125e3)*x*x*y*y*y;
426 S(11,i)=(0.2475e2)*x*y+(-4.5)*y+(-0.99e2)*x*y*y+(0.7425e2)*x*y*y*y+(0.2025e2)*x*x*x*y+(-0.405e2)*x*x*y+(-13.5)*y*y*y+(18.)*y*y+(0.162e3)*x*x*y*y+(-0.81e2)*x*x*x*y*y+(0.6075e2)*x*x*x*y*y*y+(-0.1215e3)*x*x*y*y*y;
427 S(12,i)=(-0.495e2)*x*y+(9.)*y+(0.12375e3)*x*y*y+(-0.7425e2)*x*y*y*y+(-0.405e2)*x*x*x*y+(0.81e2)*x*x*y+(13.5)*y*y*y+(-22.5)*y*y+(-0.2025e3)*x*x*y*y+(0.10125e3)*x*x*x*y*y+(-0.6075e2)*x*x*x*y*y*y+(0.1215e3)*x*x*y*y*y;
428 S(13,i)=(0.81e2)*x*y+(-0.2025e3)*x*y*y+(0.1215e3)*x*y*y*y+(0.1215e3)*x*x*x*y+(-0.2025e3)*x*x*y+(0.50625e3)*x*x*y*y+(-0.30375e3)*x*x*x*y*y+(0.18225e3)*x*x*x*y*y*y+(-0.30375e3)*x*x*y*y*y;
429 S(14,i)=(-0.405e2)*x*y+(0.10125e3)*x*y*y+(-0.6075e2)*x*y*y*y+(-0.1215e3)*x*x*x*y+(0.162e3)*x*x*y+(-0.405e3)*x*x*y*y+(0.30375e3)*x*x*x*y*y+(-0.18225e3)*x*x*x*y*y*y+(0.243e3)*x*x*y*y*y;
430 S(15,i)=(0.2025e2)*x*y+(-0.81e2)*x*y*y+(0.6075e2)*x*y*y*y+(0.6075e2)*x*x*x*y+(-0.81e2)*x*x*y+(0.324e3)*x*x*y*y+(-0.243e3)*x*x*x*y*y+(0.18225e3)*x*x*x*y*y*y+(-0.243e3)*x*x*y*y*y;
431 S(16,i)=(-0.405e2)*x*y+(0.162e3)*x*y*y+(-0.1215e3)*x*y*y*y+(-0.6075e2)*x*x*x*y+(0.10125e3)*x*x*y+(-0.405e3)*x*x*y*y+(0.243e3)*x*x*x*y*y+(-0.18225e3)*x*x*x*y*y*y+(0.30375e3)*x*x*y*y*y;
432 DSDV(1, 1,i)=(-5.5)+(0.3025e2)*y+(18.)*x+(-13.5)*x*x+(-0.495e2)*y*y+(0.2475e2)*y*y*y+(0.7425e2)*x*x*y+(-0.99e2)*x*y+(0.162e3)*x*y*y+(-0.1215e3)*x*x*y*y+(0.6075e2)*x*x*y*y*y+(-0.81e2)*x*y*y*y;
433 DSDV(2, 1,i)=(10.)+(-5.5)*y+(-9.)*x+(13.5)*x*x+(9.)*y*y+(-4.5)*y*y*y+(-0.7425e2)*x*x*y+(0.495e2)*x*y+(-0.81e2)*x*y*y+(0.1215e3)*x*x*y*y+(-0.6075e2)*x*x*y*y*y+(0.405e2)*x*y*y*y;
434 DSDV(3, 1,i)=(10.)*y+(-4.5)*y*y+(4.5)*y*y*y+(13.5)*x*x*y+(-9.)*x*y+(0.405e2)*x*y*y+(-0.6075e2)*x*x*y*y+(0.6075e2)*x*x*y*y*y+(-0.405e2)*x*y*y*y;
435 DSDV(4, 1,i)=(-5.5)*y+(0.2475e2)*y*y+(-0.2475e2)*y*y*y+(-13.5)*x*x*y+(18.)*x*y+(-0.81e2)*x*y*y+(0.6075e2)*x*x*y*y+(-0.6075e2)*x*x*y*y*y+(0.81e2)*x*y*y*y;
436 DSDV(5, 1,i)=(9.)+(-0.495e2)*y+(-45.)*x+(0.405e2)*x*x+(0.81e2)*y*y+(-0.405e2)*y*y*y+(-0.22275e3)*x*x*y+(0.2475e3)*x*y+(-0.405e3)*x*y*y+(0.3645e3)*x*x*y*y+(-0.18225e3)*x*x*y*y*y+(0.2025e3)*x*y*y*y;
437 DSDV(6, 1,i)=(-4.5)+(0.2475e2)*y+(36.)*x+(-0.405e2)*x*x+(-0.405e2)*y*y+(0.2025e2)*y*y*y+(0.22275e3)*x*x*y+(-0.198e3)*x*y+(0.324e3)*x*y*y+(-0.3645e3)*x*x*y*y+(0.18225e3)*x*x*y*y*y+(-0.162e3)*x*y*y*y;
438 DSDV(7, 1,i)=(9.)*y+(-22.5)*y*y+(13.5)*y*y*y+(0.1215e3)*x*x*y+(-0.81e2)*x*y+(0.2025e3)*x*y*y+(-0.30375e3)*x*x*y*y+(0.18225e3)*x*x*y*y*y+(-0.1215e3)*x*y*y*y;
439 DSDV(8, 1,i)=(-4.5)*y+(18.)*y*y+(-13.5)*y*y*y+(-0.6075e2)*x*x*y+(0.405e2)*x*y+(-0.162e3)*x*y*y+(0.243e3)*x*x*y*y+(-0.18225e3)*x*x*y*y*y+(0.1215e3)*x*y*y*y;
440 DSDV(9, 1,i)=(-4.5)*y+(0.2025e2)*y*y+(-0.2025e2)*y*y*y+(-0.405e2)*x*x*y+(36.)*x*y+(-0.162e3)*x*y*y+(0.18225e3)*x*x*y*y+(-0.18225e3)*x*x*y*y*y+(0.162e3)*x*y*y*y;
441 DSDV(10, 1,i)=(9.)*y+(-0.405e2)*y*y+(0.405e2)*y*y*y+(0.405e2)*x*x*y+(-45.)*x*y+(0.2025e3)*x*y*y+(-0.18225e3)*x*x*y*y+(0.18225e3)*x*x*y*y*y+(-0.2025e3)*x*y*y*y;
442 DSDV(11, 1,i)=(0.2475e2)*y+(-0.99e2)*y*y+(0.7425e2)*y*y*y+(0.6075e2)*x*x*y+(-0.81e2)*x*y+(0.324e3)*x*y*y+(-0.243e3)*x*x*y*y+(0.18225e3)*x*x*y*y*y+(-0.243e3)*x*y*y*y;
443 DSDV(12, 1,i)=(-0.495e2)*y+(0.12375e3)*y*y+(-0.7425e2)*y*y*y+(-0.1215e3)*x*x*y+(0.162e3)*x*y+(-0.405e3)*x*y*y+(0.30375e3)*x*x*y*y+(-0.18225e3)*x*x*y*y*y+(0.243e3)*x*y*y*y;
444 DSDV(13, 1,i)=(0.81e2)*y+(-0.2025e3)*y*y+(0.1215e3)*y*y*y+(0.3645e3)*x*x*y+(-0.405e3)*x*y+(0.10125e4)*x*y*y+(-0.91125e3)*x*x*y*y+(0.54675e3)*x*x*y*y*y+(-0.6075e3)*x*y*y*y;
445 DSDV(14, 1,i)=(-0.405e2)*y+(0.10125e3)*y*y+(-0.6075e2)*y*y*y+(-0.3645e3)*x*x*y+(0.324e3)*x*y+(-0.81e3)*x*y*y+(0.91125e3)*x*x*y*y+(-0.54675e3)*x*x*y*y*y+(0.486e3)*x*y*y*y;
446 DSDV(15, 1,i)=(0.2025e2)*y+(-0.81e2)*y*y+(0.6075e2)*y*y*y+(0.18225e3)*x*x*y+(-0.162e3)*x*y+(0.648e3)*x*y*y+(-0.729e3)*x*x*y*y+(0.54675e3)*x*x*y*y*y+(-0.486e3)*x*y*y*y;
447 DSDV(16, 1,i)=(-0.405e2)*y+(0.162e3)*y*y+(-0.1215e3)*y*y*y+(-0.18225e3)*x*x*y+(0.2025e3)*x*y+(-0.81e3)*x*y*y+(0.729e3)*x*x*y*y+(-0.54675e3)*x*x*y*y*y+(0.6075e3)*x*y*y*y;
448 DSDV(1, 2,i)=(0.3025e2)*x+(-5.5)+(-0.99e2)*x*y+(0.7425e2)*x*y*y+(0.2475e2)*x*x*x+(-0.495e2)*x*x+(-13.5)*y*y+(18.)*y+(0.162e3)*x*x*y+(-0.81e2)*x*x*x*y+(0.6075e2)*x*x*x*y*y+(-0.1215e3)*x*x*y*y;
449 DSDV(2, 2,i)=(-5.5)*x+(18.)*x*y+(-13.5)*x*y*y+(-0.2475e2)*x*x*x+(0.2475e2)*x*x+(-0.81e2)*x*x*y+(0.81e2)*x*x*x*y+(-0.6075e2)*x*x*x*y*y+(0.6075e2)*x*x*y*y;
450 DSDV(3, 2,i)=(10.)*x+(-9.)*x*y+(13.5)*x*y*y+(4.5)*x*x*x+(-4.5)*x*x+(0.405e2)*x*x*y+(-0.405e2)*x*x*x*y+(0.6075e2)*x*x*x*y*y+(-0.6075e2)*x*x*y*y;
451 DSDV(4, 2,i)=(-5.5)*x+(10.)+(0.495e2)*x*y+(-0.7425e2)*x*y*y+(-4.5)*x*x*x+(9.)*x*x+(13.5)*y*y+(-9.)*y+(-0.81e2)*x*x*y+(0.405e2)*x*x*x*y+(-0.6075e2)*x*x*x*y*y+(0.1215e3)*x*x*y*y;
452 DSDV(5, 2,i)=(-0.495e2)*x+(0.162e3)*x*y+(-0.1215e3)*x*y*y+(-0.7425e2)*x*x*x+(0.12375e3)*x*x+(-0.405e3)*x*x*y+(0.243e3)*x*x*x*y+(-0.18225e3)*x*x*x*y*y+(0.30375e3)*x*x*y*y;
453 DSDV(6, 2,i)=(0.2475e2)*x+(-0.81e2)*x*y+(0.6075e2)*x*y*y+(0.7425e2)*x*x*x+(-0.99e2)*x*x+(0.324e3)*x*x*y+(-0.243e3)*x*x*x*y+(0.18225e3)*x*x*x*y*y+(-0.243e3)*x*x*y*y;
454 DSDV(7, 2,i)=(9.)*x+(-45.)*x*y+(0.405e2)*x*y*y+(0.405e2)*x*x*x+(-.405e2)*x*x+(0.2025e3)*x*x*y+(-0.2025e3)*x*x*x*y+(0.18225e3)*x*x*x*y*y+(-0.18225e3)*x*x*y*y;
455 DSDV(8, 2,i)=(-4.5)*x+(36.)*x*y+(-0.405e2)*x*y*y+(-0.2025e2)*x*x*x+(0.2025e2)*x*x+(-0.162e3)*x*x*y+(0.162e3)*x*x*x*y+(-0.18225e3)*x*x*x*y*y+(0.18225e3)*x*x*y*y;
456 DSDV(9, 2,i)=(-4.5)*x+(0.405e2)*x*y+(-0.6075e2)*x*y*y+(-13.5)*x*x*x+(18.)*x*x+(-0.162e3)*x*x*y+(0.1215e3)*x*x*x*y+(-0.18225e3)*x*x*x*y*y+(0.243e3)*x*x*y*y;
457 DSDV(10, 2,i)=(9.)*x+(-0.81e2)*x*y+(0.1215e3)*x*y*y+(13.5)*x*x*x+(-22.5)*x*x+(0.2025e3)*x*x*y+(-0.1215e3)*x*x*x*y+(0.18225e3)*x*x*x*y*y+(-0.30375e3)*x*x*y*y;
458 DSDV(11, 2,i)=(0.2475e2)*x+(-4.5)+(-0.198e3)*x*y+(0.22275e3)*x*y*y+(0.2025e2)*x*x*x+(-0.405e2)*x*x+(-0.405e2)*y*y+(36.)*y+(0.324e3)*x*x*y+(-0.162e3)*x*x*x*y+(0.18225e3)*x*x*x*y*y+(-0.3645e3)*x*x*y*y;
459 DSDV(12, 2,i)=(-0.495e2)*x+(9.)+(0.2475e3)*x*y+(-0.22275e3)*x*y*y+(-0.405e2)*x*x*x+(0.81e2)*x*x+(0.405e2)*y*y+(-45.)*y+(-0.405e3)*x*x*y+(0.2025e3)*x*x*x*y+(-0.18225e3)*x*x*x*y*y+(0.3645e3)*x*x*y*y;
460 DSDV(13, 2,i)=(0.81e2)*x+(-0.405e3)*x*y+(0.3645e3)*x*y*y+(0.1215e3)*x*x*x+(-0.2025e3)*x*x+(0.10125e4)*x*x*y+(-0.6075e3)*x*x*x*y+(0.54675e3)*x*x*x*y*y+(-0.91125e3)*x*x*y*y;
461 DSDV(14, 2,i)=(-0.405e2)*x+(0.2025e3)*x*y+(-0.18225e3)*x*y*y+(-0.1215e3)*x*x*x+(0.162e3)*x*x+(-0.81e3)*x*x*y+(0.6075e3)*x*x*x*y+(-0.54675e3)*x*x*x*y*y+(0.729e3)*x*x*y*y;
462 DSDV(15, 2,i)=(0.2025e2)*x+(-0.162e3)*x*y+(0.18225e3)*x*y*y+(0.6075e2)*x*x*x+(-0.81e2)*x*x+(0.648e3)*x*x*y+(-0.486e3)*x*x*x*y+(0.54675e3)*x*x*x*y*y+(-0.729e3)*x*x*y*y;
463 DSDV(16, 2,i)=(-0.405e2)*x+(0.324e3)*x*y+(-0.3645e3)*x*y*y+(-0.6075e2)*x*x*x+(0.10125e3)*x*x+(-0.81e3)*x*x*y+(0.486e3)*x*x*x*y+(-0.54675e3)*x*x*x*y*y+(0.91125e3)*x*x*y*y;
464 }
465 #undef NUMSHAPES
466 #undef DIM
467 }
468
469 /**************************************************************/
470
471 void Finley_Shape_Tet4(int NumV,double* v,double* s,double* dsdv) {
472 #define NUMSHAPES 4
473 #define DIM 3
474 double x,y,z;
475 int i;
476 for (i=0;i<NumV;i++) {
477 x=V(1,i);
478 y=V(2,i);
479 z=V(3,i);
480 S(1,i)=1.-x-y-z;
481 S(2,i)=x;
482 S(3,i)=y;
483 S(4,i)=z;
484 DSDV(1,1,i)=-1.;
485 DSDV(1,2,i)=-1.;
486 DSDV(1,3,i)=-1.;
487 DSDV(2,1,i)= 1.;
488 DSDV(2,2,i)= 0.;
489 DSDV(2,3,i)= 0.;
490 DSDV(3,1,i)= 0.;
491 DSDV(3,2,i)= 1.;
492 DSDV(3,3,i)= 0.;
493 DSDV(4,1,i)= 0.;
494 DSDV(4,2,i)= 0.;
495 DSDV(4,3,i)= 1.;
496 }
497 #undef NUMSHAPES
498 #undef DIM
499 }
500
501 /**************************************************************/
502
503 void Finley_Shape_Tet10(int NumV,double* v,double* s,double* dsdv) {
504 #define NUMSHAPES 10
505 #define DIM 3
506 double x,y,z;
507 int i;
508 for (i=0;i<NumV;i++) {
509 x=V(1,i);
510 y=V(2,i);
511 z=V(3,i);
512 S(1,i) = (1.-x-y-z)*(1.-2.*x-2.*y-2.*z);
513 S(2,i) = x*(2.*x-1.);
514 S(3,i) = y*(2.*y-1.);
515 S(4,i) = z*(2.*z-1.);
516 S(5,i) = (1.-x-y-z)*4.*x;
517 S(6,i) = 4.*x*y;
518 S(7,i) = (1.-x-y-z)*4.*y;
519 S(8,i) = (1.-x-y-z)*4.*z;
520 S(9,i) = 4.*x*z;
521 S(10,i)= 4.*y*z;
522
523 DSDV(1,1,i)= -3.+4.*x+4.*y+4.*z;
524 DSDV(1,2,i)= -3.+4.*x+4.*y+4.*z;
525 DSDV(1,3,i)= -3.+4.*x+4.*y+4.*z;
526
527
528 DSDV(2,1,i)= -1.+4.*x;
529 DSDV(2,2,i)= 0.;
530 DSDV(2,3,i)= 0.;
531
532 DSDV(3,1,i)= 0.;
533 DSDV(3,2,i)= -1. +4.*y;
534 DSDV(3,3,i)= 0.;
535
536 DSDV(4,1,i)= 0.;
537 DSDV(4,2,i)= 0.;
538 DSDV(4,3,i)= -1. +4.*z;
539
540 DSDV(5,1,i)= 4. -8.*x -4.*y -4.*z;
541 DSDV(5,2,i)= -4.*x;
542 DSDV(5,3,i)= -4.*x;
543
544 DSDV(6,1,i)= 4.*y;
545 DSDV(6,2,i)= 4.*x;
546 DSDV(6,3,i)= 0.;
547
548 DSDV(7,1,i)= -4.*y;
549 DSDV(7,2,i)= 4. -4.*x -8.*y -4.*z;
550 DSDV(7,3,i)= -4.*y;
551
552 DSDV(8,1,i)= -4.*z;
553 DSDV(8,2,i)= -4.*z;
554 DSDV(8,3,i)= 4. -4.*x -4.*y -8.*z;
555
556 DSDV(9,1,i)= 4.*z;
557 DSDV(9,2,i)= 0.;
558 DSDV(9,3,i)= 4.*x;
559
560 DSDV(10,1,i)= 0.;
561 DSDV(10,2,i)= 4.*z;
562 DSDV(10,3,i)= 4.*y;
563 }
564 #undef NUMSHAPES
565 #undef DIM
566 }
567
568 /**************************************************************/
569
570 void Finley_Shape_Tet16(int NumV,double* v,double* s,double* dsdv) {
571 #define NUMSHAPES 16
572 #define DIM 3
573 double x,y,z;
574 int i;
575 for (i=0;i<NumV;i++) {
576 x=V(1,i);
577 y=V(2,i);
578 z=V(3,i);
579 S(1,i)=(10.)+(-5.5)*x+(-5.5)*y+(-5.5)*z+(9.)*x*x+(-4.5)*x*x*x+(4.5)*x*x*y+(4.5)*x*y*y+(-4.5)*y*y*y+(9.)*y*y+(9.)*z*z+(4.5)*x*x*z+(4.5)*y*y*z+(-4.5)*z*z*z+(4.5)*x*z*z+(4.5)*y*z*z;
580 S(2,i)=(1.e0)*x+(-4.5)*x*x+(4.5)*x*x*x;
581 S(3,i)=(1.e0)*y+(4.5)*y*y*y+(-4.5)*y*y;
582 S(4,i)=(1.e0)*z+(-4.5)*z*z+(4.5)*z*z*z;
583 S(5,i)=(9.)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4.5)*y*y+(-13.5)*z*z+(.9e1)*x*z+(9.)*y*z;
628 DSDV(2, 3,i)= 0.;
629 DSDV(3, 3,i)= 0.;
630 DSDV(4, 3,i)=(1.e0)+(-9.)*z+(13.5)*z*z;
631 DSDV(5, 3,i)=(4.5)*x*x+(-18.)*x*z;
632 DSDV(6, 3,i)=(-9.)*x*x+(9.)*x*z;
633 DSDV(7, 3,i)= 0.;
634 DSDV(8, 3,i)= 0.;
635 DSDV(9, 3,i)=(-9.)*y*y+(9.)*y*z;
636 DSDV(10, 3,i)=(4.5)*y*y+(-18.)*y*z;
637 DSDV(11, 3,i)=(9.)+(-45.)*z+(-9.)*x*x+(-9.)*y*y+(0.405e2)*z*z+(.9e1)*x*z+(9.)*y*z;
638 DSDV(12, 3,i)=(9.)*x*x+(-9.)*x*z;
639 DSDV(13, 3,i)=(9.)*y*y+(-9.)*y*z;
640 DSDV(14, 3,i)=(-4.5)+(36.)*z+(4.5)*x*x+(4.5)*y*y+(-0.405e2)*z*z+(-18.)*x*z+(-18.)*y*z;
641 DSDV(15, 3,i)=(-4.5)*x*x+(18.)*x*z;
642 DSDV(16, 3,i)=(-4.5)*y*y+(18.)*y*z;
643 }
644 #undef NUMSHAPES
645 #undef DIM
646 }
647
648 /**************************************************************/
649
650 void Finley_Shape_Hex8(int NumV,double* v,double* s,double* dsdv) {
651 #define NUMSHAPES 8
652 #define DIM 3
653 double x,y,z;
654 int i;
655 for (i=0;i<NumV;i++) {
656 x=V(1,i);
657 y=V(2,i);
658 z=V(3,i);
659 S(1,i)=(1.-x)*(1.-y)*(1.-z);
660 S(2,i)= x*(1.-z)*(1.-y);
661 S(3,i)= x*(1.-z)*y;
662 S(4,i)= (1.-z)*(1.-x)*y;
663 S(5,i)= (1.-x)*z*(1.-y);
664 S(6,i)= x*z*(1.-y);
665 S(7,i)= x*y*z;
666 S(8,i)= y*z*(1.-x);
667 DSDV(1,1,i)= (1.-z)*(y-1.);
668 DSDV(1,2,i)= (1.-x)*(z-1.);
669 DSDV(1,3,i)= (1.-x)*(y-1.);
670 DSDV(2,1,i)= (1.-z)*(1.-y);
671 DSDV(2,2,i)= (z-1.)*x;
672 DSDV(2,3,i)= (y-1.)*x;
673 DSDV(3,1,i)= (1.-z)*y;
674 DSDV(3,2,i)= (1.-z)*x;
675 DSDV(3,3,i)=-y*x;
676 DSDV(4,1,i)= y*(z-1.);
677 DSDV(4,2,i)= (1.-z)*(1.-x);
678 DSDV(4,3,i)= y*(x-1.);
679 DSDV(5,1,i)= z*(y-1.);
680 DSDV(5,2,i)= z*(x-1.);
681 DSDV(5,3,i)= (x-1.)*(y-1.);
682 DSDV(6,1,i)= z*(1.-y);
683 DSDV(6,2,i)= -x*z;
684 DSDV(6,3,i)= (1.-y)*x;
685 DSDV(7,1,i)= y*z;
686 DSDV(7,2,i)= x*z;
687 DSDV(7,3,i)= x*y;
688 DSDV(8,1,i)=-y*z;
689 DSDV(8,2,i)= z*(1.-x);
690 DSDV(8,3,i)= y*(1.-x);
691 }
692 #undef NUMSHAPES
693 #undef DIM
694 }
695
696 /**************************************************************/
697
698 void Finley_Shape_Hex20(int NumV,double* v,double* s,double* dsdv) {
699 #define NUMSHAPES 20
700 #define DIM 3
701 double x,y,z;
702 int i;
703 for (i=0;i<NumV;i++) {
704 x=V(1,i);
705 y=V(2,i);
706 z=V(3,i);
707 S(1,i)=1.+(-3.)*x+(-3.)*y+(-3.)*z+(5.)*x*y+(5.)*x*z+(5.)*y*z+(2.)*x*x+(2.)*y*y+(2.)*z*z+(-2.)*x*x*y+(-2.)*x*x*z+(-2.)*x*y*y+(-2.)*y*y*z+(-2.)*x*z*z+(-2.)*y*z*z+(-7.)*x*y*z+(2.)*x*x*y*z+(2.)*x*y*y*z+(2.)*x*y*z*z;
708 S(2,i)=(-1.)*x+(-1.)*x*y+(-1.)*x*z+(2.)*x*x+(-2.)*x*x*y+(-2.)*x*x*z+(2.)*x*y*y+(2.)*x*z*z+(3.)*x*y*z+(2.)*x*x*y*z+(-2.)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.)*x*y+(-4.)*x*y*y;
785 DSDV(19,3,i)=(4.)*x*y+(-4.)*x*x*y;
786 DSDV(20,3,i)=(4.)*y+(-4.)*y*y+(-4.)*x*y+(4.)*x*y*y;
787 }
788 #undef NUMSHAPES
789 #undef DIM
790 }
791
792 /**************************************************************/
793
794 void Finley_Shape_Hex27(int NumV,double* v,double* s,double* dsdv) {
795 #define NUMSHAPES 27
796 #define DIM 3
797 double x,y,z;
798 int i;
799 for (i=0;i<NumV;i++) {
800 x=V(1,i);
801 y=V(2,i);
802 z=V(3,i);
803 S(1,i)= + 1.0 - 3.0*x + 2.0*x*x - 3.0*y + 9.0*x*y - 6.0*x*x*y + 2.0*y*y - 6.0*x*y*y + 4.0*x*x*y*y - 3.0*z + 9.0*x*z - 6.0*x*x*z + 9.0*y*z - 27.0*x*y*z + 18.0*x*x*y*z - 6.0*y*y*z + 18.0*x*y*y*z - 12.0*x*x*y*y*z + 2.0*z*z - 6.0*x*z*z + 4.0*x*x*z*z - 6.0*y*z*z + 18.0*x*y*z*z - 12.0*x*x*y*z*z + 4.0*y*y*z*z - 12.0*x*y*y*z*z + 8.0*x*x*y*y*z*z;
804 S(2,i)= - 1.0*x + 2.0*x*x + 3.0*x*y - 6.0*x*x*y - 2.0*x*y*y + 4.0*x*x*y*y + 3.0*x*z - 6.0*x*x*z - 9.0*x*y*z + 18.0*x*x*y*z + 6.0*x*y*y*z - 12.0*x*x*y*y*z - 2.0*x*z*z + 4.0*x*x*z*z + 6.0*x*y*z*z - 12.0*x*x*y*z*z - 4.0*x*y*y*z*z + 8.0*x*x*y*y*z*z;
805 S(3,i)= + 1.0*x*y - 2.0*x*x*y - 2.0*x*y*y + 4.0*x*x*y*y - 3.0*x*y*z + 6.0*x*x*y*z + 6.0*x*y*y*z - 12.0*x*x*y*y*z + 2.0*x*y*z*z - 4.0*x*x*y*z*z - 4.0*x*y*y*z*z + 8.0*x*x*y*y*z*z;
806 S(4,i)= - 1.0*y + 3.0*x*y - 2.0*x*x*y + 2.0*y*y - 6.0*x*y*y + 4.0*x*x*y*y + 3.0*y*z - 9.0*x*y*z + 6.0*x*x*y*z - 6.0*y*y*z + 18.0*x*y*y*z - 12.0*x*x*y*y*z - 2.0*y*z*z + 6.0*x*y*z*z - 4.0*x*x*y*z*z + 4.0*y*y*z*z - 12.0*x*y*y*z*z + 8.0*x*x*y*y*z*z;
807 S(5,i)= - 1.0*z + 3.0*x*z - 2.0*x*x*z + 3.0*y*z - 9.0*x*y*z + 6.0*x*x*y*z - 2.0*y*y*z + 6.0*x*y*y*z - 4.0*x*x*y*y*z + 2.0*z*z - 6.0*x*z*z + 4.0*x*x*z*z - 6.0*y*z*z + 18.0*x*y*z*z - 12.0*x*x*y*z*z + 4.0*y*y*z*z - 12.0*x*y*y*z*z + 8.0*x*x*y*y*z*z;
808 S(6,i)= + 1.0*x*z - 2.0*x*x*z - 3.0*x*y*z + 6.0*x*x*y*z + 2.0*x*y*y*z - 4.0*x*x*y*y*z - 2.0*x*z*z + 4.0*x*x*z*z + 6.0*x*y*z*z - 12.0*x*x*y*z*z - 4.0*x*y*y*z*z + 8.0*x*x*y*y*z*z;
809 S(7,i)= - 1.0*x*y*z + 2.0*x*x*y*z + 2.0*x*y*y*z - 4.0*x*x*y*y*z + 2.0*x*y*z*z - 4.0*x*x*y*z*z - 4.0*x*y*y*z*z + 8.0*x*x*y*y*z*z;
810 S(8,i)= + 1.0*y*z - 3.0*x*y*z + 2.0*x*x*y*z - 2.0*y*y*z + 6.0*x*y*y*z - 4.0*x*x*y*y*z - 2.0*y*z*z + 6.0*x*y*z*z - 4.0*x*x*y*z*z + 4.0*y*y*z*z - 12.0*x*y*y*z*z + 8.0*x*x*y*y*z*z;
811 S(9,i)= + 4.0*x - 4.0*x*x - 12.0*x*y + 12.0*x*x*y + 8.0*x*y*y - 8.0*x*x*y*y - 12.0*x*z + 12.0*x*x*z + 36.0*x*y*z - 36.0*x*x*y*z - 24.0*x*y*y*z + 24.0*x*x*y*y*z + 8.0*x*z*z - 8.0*x*x*z*z - 24.0*x*y*z*z + 24.0*x*x*y*z*z + 16.0*x*y*y*z*z - 16.0*x*x*y*y*z*z;
812 S(10,i)= - 4.0*x*y + 8.0*x*x*y + 4.0*x*y*y - 8.0*x*x*y*y + 12.0*x*y*z - 24.0*x*x*y*z - 12.0*x*y*y*z + 24.0*x*x*y*y*z - 8.0*x*y*z*z + 16.0*x*x*y*z*z + 8.0*x*y*y*z*z - 16.0*x*x*y*y*z*z;
813 S(11,i)= - 4.0*x*y + 4.0*x*x*y + 8.0*x*y*y - 8.0*x*x*y*y + 12.0*x*y*z - 12.0*x*x*y*z - 24.0*x*y*y*z + 24.0*x*x*y*y*z - 8.0*x*y*z*z + 8.0*x*x*y*z*z + 16.0*x*y*y*z*z - 16.0*x*x*y*y*z*z;
814 S(12,i)= + 4.0*y - 12.0*x*y + 8.0*x*x*y - 4.0*y*y + 12.0*x*y*y - 8.0*x*x*y*y - 12.0*y*z + 36.0*x*y*z - 24.0*x*x*y*z + 12.0*y*y*z - 36.0*x*y*y*z + 24.0*x*x*y*y*z + 8.0*y*z*z - 24.0*x*y*z*z + 16.0*x*x*y*z*z - 8.0*y*y*z*z + 24.0*x*y*y*z*z - 16.0*x*x*y*y*z*z;
815 S(13,i)= + 4.0*z - 12.0*x*z + 8.0*x*x*z - 12.0*y*z + 36.0*x*y*z - 24.0*x*x*y*z + 8.0*y*y*z - 24.0*x*y*y*z + 16.0*x*x*y*y*z - 4.0*z*z + 12.0*x*z*z - 8.0*x*x*z*z + 12.0*y*z*z - 36.0*x*y*z*z + 24.0*x*x*y*z*z - 8.0*y*y*z*z + 24.0*x*y*y*z*z - 16.0*x*x*y*y*z*z;
816 S(14,i)= - 4.0*x*z + 8.0*x*x*z + 12.0*x*y*z - 24.0*x*x*y*z - 8.0*x*y*y*z + 16.0*x*x*y*y*z + 4.0*x*z*z - 8.0*x*x*z*z - 12.0*x*y*z*z + 24.0*x*x*y*z*z + 8.0*x*y*y*z*z - 16.0*x*x*y*y*z*z;
817 S(15,i)= + 4.0*x*y*z - 8.0*x*x*y*z - 8.0*x*y*y*z + 16.0*x*x*y*y*z - 4.0*x*y*z*z + 8.0*x*x*y*z*z + 8.0*x*y*y*z*z - 16.0*x*x*y*y*z*z;
818 S(16,i)= - 4.0*y*z + 12.0*x*y*z - 8.0*x*x*y*z + 8.0*y*y*z - 24.0*x*y*y*z + 16.0*x*x*y*y*z + 4.0*y*z*z - 12.0*x*y*z*z + 8.0*x*x*y*z*z - 8.0*y*y*z*z + 24.0*x*y*y*z*z - 16.0*x*x*y*y*z*z;
819 S(17,i)= - 4.0*x*z + 4.0*x*x*z + 12.0*x*y*z - 12.0*x*x*y*z - 8.0*x*y*y*z + 8.0*x*x*y*y*z + 8.0*x*z*z - 8.0*x*x*z*z - 24.0*x*y*z*z + 24.0*x*x*y*z*z + 16.0*x*y*y*z*z - 16.0*x*x*y*y*z*z;
820 S(18,i)= + 4.0*x*y*z - 8.0*x*x*y*z - 4.0*x*y*y*z + 8.0*x*x*y*y*z - 8.0*x*y*z*z + 16.0*x*x*y*z*z + 8.0*x*y*y*z*z - 16.0*x*x*y*y*z*z;
821 S(19,i)= + 4.0*x*y*z - 4.0*x*x*y*z - 8.0*x*y*y*z + 8.0*x*x*y*y*z - 8.0*x*y*z*z + 8.0*x*x*y*z*z + 16.0*x*y*y*z*z - 16.0*x*x*y*y*z*z;
822 S(20,i)= - 4.0*y*z + 12.0*x*y*z - 8.0*x*x*y*z + 4.0*y*y*z - 12.0*x*y*y*z + 8.0*x*x*y*y*z + 8.0*y*z*z - 24.0*x*y*z*z + 16.0*x*x*y*z*z - 8.0*y*y*z*z + 24.0*x*y*y*z*z - 16.0*x*x*y*y*z*z;
823 S(21,i)= + 16.0*x*y - 16.0*x*x*y - 16.0*x*y*y + 16.0*x*x*y*y - 48.0*x*y*z + 48.0*x*x*y*z + 48.0*x*y*y*z - 48.0*x*x*y*y*z + 32.0*x*y*z*z - 32.0*x*x*y*z*z - 32.0*x*y*y*z*z + 32.0*x*x*y*y*z*z;
824 S(22,i)= + 16.0*x*z - 16.0*x*x*z - 48.0*x*y*z + 48.0*x*x*y*z + 32.0*x*y*y*z - 32.0*x*x*y*y*z - 16.0*x*z*z + 16.0*x*x*z*z + 48.0*x*y*z*z - 48.0*x*x*y*z*z - 32.0*x*y*y*z*z + 32.0*x*x*y*y*z*z;
825 S(23,i)= - 16.0*x*y*z + 32.0*x*x*y*z + 16.0*x*y*y*z - 32.0*x*x*y*y*z + 16.0*x*y*z*z - 32.0*x*x*y*z*z - 16.0*x*y*y*z*z + 32.0*x*x*y*y*z*z;
826 S(24,i)= - 16.0*x*y*z + 16.0*x*x*y*z + 32.0*x*y*y*z - 32.0*x*x*y*y*z + 16.0*x*y*z*z - 16.0*x*x*y*z*z - 32.0*x*y*y*z*z + 32.0*x*x*y*y*z*z;
827 S(25,i)= + 16.0*y*z - 48.0*x*y*z + 32.0*x*x*y*z - 16.0*y*y*z + 48.0*x*y*y*z - 32.0*x*x*y*y*z - 16.0*y*z*z + 48.0*x*y*z*z - 32.0*x*x*y*z*z + 16.0*y*y*z*z - 48.0*x*y*y*z*z + 32.0*x*x*y*y*z*z;
828 S(26,i)= - 16.0*x*y*z + 16.0*x*x*y*z + 16.0*x*y*y*z - 16.0*x*x*y*y*z + 32.0*x*y*z*z - 32.0*x*x*y*z*z - 32.0*x*y*y*z*z + 32.0*x*x*y*y*z*z;
829 S(27,i)= + 64.0*x*y*z - 64.0*x*x*y*z - 64.0*x*y*y*z + 64.0*x*x*y*y*z - 64.0*x*y*z*z + 64.0*x*x*y*z*z + 64.0*x*y*y*z*z - 64.0*x*x*y*y*z*z;
830 DSDV(1,1,i)= - 3.0 + 4.0*x + 9.0*y - 12.0*x*y - 6.0*y*y + 8.0*x*y*y + 9.0*z - 12.0*x*z - 27.0*y*z + 36.0*x*y*z + 18.0*y*y*z - 24.0*x*y*y*z - 6.0*z*z + 8.0*x*z*z + 18.0*y*z*z - 24.0*x*y*z*z - 12.0*y*y*z*z + 16.0*x*y*y*z*z;
831 DSDV(1,2,i)= - 3.0 + 9.0*x - 6.0*x*x + 4.0*y - 12.0*x*y + 8.0*x*x*y + 9.0*z - 27.0*x*z + 18.0*x*x*z - 12.0*y*z + 36.0*x*y*z - 24.0*x*x*y*z - 6.0*z*z + 18.0*x*z*z - 12.0*x*x*z*z + 8.0*y*z*z - 24.0*x*y*z*z + 16.0*x*x*y*z*z;
832 DSDV(1,3,i)= - 3.0 + 9.0*x - 6.0*x*x + 9.0*y - 27.0*x*y + 18.0*x*x*y - 6.0*y*y + 18.0*x*y*y - 12.0*x*x*y*y + 4.0*z - 12.0*x*z + 8.0*x*x*z - 12.0*y*z + 36.0*x*y*z - 24.0*x*x*y*z + 8.0*y*y*z - 24.0*x*y*y*z + 16.0*x*x*y*y*z;
833 DSDV(2,1,i)= - 1.0 + 4.0*x + 3.0*y - 12.0*x*y - 2.0*y*y + 8.0*x*y*y + 3.0*z - 12.0*x*z - 9.0*y*z + 36.0*x*y*z + 6.0*y*y*z - 24.0*x*y*y*z - 2.0*z*z + 8.0*x*z*z + 6.0*y*z*z - 24.0*x*y*z*z - 4.0*y*y*z*z + 16.0*x*y*y*z*z;
834 DSDV(2,2,i)= + 3.0*x - 6.0*x*x - 4.0*x*y + 8.0*x*x*y - 9.0*x*z + 18.0*x*x*z + 12.0*x*y*z - 24.0*x*x*y*z + 6.0*x*z*z - 12.0*x*x*z*z - 8.0*x*y*z*z + 16.0*x*x*y*z*z;
835 DSDV(2,3,i)= + 3.0*x - 6.0*x*x - 9.0*x*y + 18.0*x*x*y + 6.0*x*y*y - 12.0*x*x*y*y - 4.0*x*z + 8.0*x*x*z + 12.0*x*y*z - 24.0*x*x*y*z - 8.0*x*y*y*z + 16.0*x*x*y*y*z;
836 DSDV(3,1,i)= + 1.0*y - 4.0*x*y - 2.0*y*y + 8.0*x*y*y - 3.0*y*z + 12.0*x*y*z + 6.0*y*y*z - 24.0*x*y*y*z + 2.0*y*z*z - 8.0*x*y*z*z - 4.0*y*y*z*z + 16.0*x*y*y*z*z;
837 DSDV(3,2,i)= + 1.0*x - 2.0*x*x - 4.0*x*y + 8.0*x*x*y - 3.0*x*z + 6.0*x*x*z + 12.0*x*y*z - 24.0*x*x*y*z + 2.0*x*z*z - 4.0*x*x*z*z - 8.0*x*y*z*z + 16.0*x*x*y*z*z;
838 DSDV(3,3,i)= - 3.0*x*y + 6.0*x*x*y + 6.0*x*y*y - 12.0*x*x*y*y + 4.0*x*y*z - 8.0*x*x*y*z - 8.0*x*y*y*z + 16.0*x*x*y*y*z;
839 DSDV(4,1,i)= + 3.0*y - 4.0*x*y - 6.0*y*y + 8.0*x*y*y - 9.0*y*z + 12.0*x*y*z + 18.0*y*y*z - 24.0*x*y*y*z + 6.0*y*z*z - 8.0*x*y*z*z - 12.0*y*y*z*z + 16.0*x*y*y*z*z;
840 DSDV(4,2,i)= - 1.0 + 3.0*x - 2.0*x*x + 4.0*y - 12.0*x*y + 8.0*x*x*y + 3.0*z - 9.0*x*z + 6.0*x*x*z - 12.0*y*z + 36.0*x*y*z - 24.0*x*x*y*z - 2.0*z*z + 6.0*x*z*z - 4.0*x*x*z*z + 8.0*y*z*z - 24.0*x*y*z*z + 16.0*x*x*y*z*z;
841 DSDV(4,3,i)= + 3.0*y - 9.0*x*y + 6.0*x*x*y - 6.0*y*y + 18.0*x*y*y - 12.0*x*x*y*y - 4.0*y*z + 12.0*x*y*z - 8.0*x*x*y*z + 8.0*y*y*z - 24.0*x*y*y*z + 16.0*x*x*y*y*z;
842 DSDV(5,1,i)= + 3.0*z - 4.0*x*z - 9.0*y*z + 12.0*x*y*z + 6.0*y*y*z - 8.0*x*y*y*z - 6.0*z*z + 8.0*x*z*z + 18.0*y*z*z - 24.0*x*y*z*z - 12.0*y*y*z*z + 16.0*x*y*y*z*z;
843 DSDV(5,2,i)= + 3.0*z - 9.0*x*z + 6.0*x*x*z - 4.0*y*z + 12.0*x*y*z - 8.0*x*x*y*z - 6.0*z*z + 18.0*x*z*z - 12.0*x*x*z*z + 8.0*y*z*z - 24.0*x*y*z*z + 16.0*x*x*y*z*z;
844 DSDV(5,3,i)= - 1.0 + 3.0*x - 2.0*x*x + 3.0*y - 9.0*x*y + 6.0*x*x*y - 2.0*y*y + 6.0*x*y*y - 4.0*x*x*y*y + 4.0*z - 12.0*x*z + 8.0*x*x*z - 12.0*y*z + 36.0*x*y*z - 24.0*x*x*y*z + 8.0*y*y*z - 24.0*x*y*y*z + 16.0*x*x*y*y*z;
845 DSDV(6,1,i)= + 1.0*z - 4.0*x*z - 3.0*y*z + 12.0*x*y*z + 2.0*y*y*z - 8.0*x*y*y*z - 2.0*z*z + 8.0*x*z*z + 6.0*y*z*z - 24.0*x*y*z*z - 4.0*y*y*z*z + 16.0*x*y*y*z*z;
846 DSDV(6,2,i)= - 3.0*x*z + 6.0*x*x*z + 4.0*x*y*z - 8.0*x*x*y*z + 6.0*x*z*z - 12.0*x*x*z*z - 8.0*x*y*z*z + 16.0*x*x*y*z*z;
847 DSDV(6,3,i)= + 1.0*x - 2.0*x*x - 3.0*x*y + 6.0*x*x*y + 2.0*x*y*y - 4.0*x*x*y*y - 4.0*x*z + 8.0*x*x*z + 12.0*x*y*z - 24.0*x*x*y*z - 8.0*x*y*y*z + 16.0*x*x*y*y*z;
848 DSDV(7,1,i)= - 1.0*y*z + 4.0*x*y*z + 2.0*y*y*z - 8.0*x*y*y*z + 2.0*y*z*z - 8.0*x*y*z*z - 4.0*y*y*z*z + 16.0*x*y*y*z*z;
849 DSDV(7,2,i)= - 1.0*x*z + 2.0*x*x*z + 4.0*x*y*z - 8.0*x*x*y*z + 2.0*x*z*z - 4.0*x*x*z*z - 8.0*x*y*z*z + 16.0*x*x*y*z*z;
850 DSDV(7,3,i)= - 1.0*x*y + 2.0*x*x*y + 2.0*x*y*y - 4.0*x*x*y*y + 4.0*x*y*z - 8.0*x*x*y*z - 8.0*x*y*y*z + 16.0*x*x*y*y*z;
851 DSDV(8,1,i)= - 3.0*y*z + 4.0*x*y*z + 6.0*y*y*z - 8.0*x*y*y*z + 6.0*y*z*z - 8.0*x*y*z*z - 12.0*y*y*z*z + 16.0*x*y*y*z*z;
852 DSDV(8,2,i)= + 1.0*z - 3.0*x*z + 2.0*x*x*z - 4.0*y*z + 12.0*x*y*z - 8.0*x*x*y*z - 2.0*z*z + 6.0*x*z*z - 4.0*x*x*z*z + 8.0*y*z*z - 24.0*x*y*z*z + 16.0*x*x*y*z*z;
853 DSDV(8,3,i)= + 1.0*y - 3.0*x*y + 2.0*x*x*y - 2.0*y*y + 6.0*x*y*y - 4.0*x*x*y*y - 4.0*y*z + 12.0*x*y*z - 8.0*x*x*y*z + 8.0*y*y*z - 24.0*x*y*y*z + 16.0*x*x*y*y*z;
854 DSDV(9,1,i)= + 4.0 - 8.0*x - 12.0*y + 24.0*x*y + 8.0*y*y - 16.0*x*y*y - 12.0*z + 24.0*x*z + 36.0*y*z - 72.0*x*y*z - 24.0*y*y*z + 48.0*x*y*y*z + 8.0*z*z - 16.0*x*z*z - 24.0*y*z*z + 48.0*x*y*z*z + 16.0*y*y*z*z - 32.0*x*y*y*z*z;
855 DSDV(9,2,i)= - 12.0*x + 12.0*x*x + 16.0*x*y - 16.0*x*x*y + 36.0*x*z - 36.0*x*x*z - 48.0*x*y*z + 48.0*x*x*y*z - 24.0*x*z*z + 24.0*x*x*z*z + 32.0*x*y*z*z - 32.0*x*x*y*z*z;
856 DSDV(9,3,i)= - 12.0*x + 12.0*x*x + 36.0*x*y - 36.0*x*x*y - 24.0*x*y*y + 24.0*x*x*y*y + 16.0*x*z - 16.0*x*x*z - 48.0*x*y*z + 48.0*x*x*y*z + 32.0*x*y*y*z - 32.0*x*x*y*y*z;
857 DSDV(10,1,i)= - 4.0*y + 16.0*x*y + 4.0*y*y - 16.0*x*y*y + 12.0*y*z - 48.0*x*y*z - 12.0*y*y*z + 48.0*x*y*y*z - 8.0*y*z*z + 32.0*x*y*z*z + 8.0*y*y*z*z - 32.0*x*y*y*z*z;
858 DSDV(10,2,i)= - 4.0*x + 8.0*x*x + 8.0*x*y - 16.0*x*x*y + 12.0*x*z - 24.0*x*x*z - 24.0*x*y*z + 48.0*x*x*y*z - 8.0*x*z*z + 16.0*x*x*z*z + 16.0*x*y*z*z - 32.0*x*x*y*z*z;
859 DSDV(10,3,i)= + 12.0*x*y - 24.0*x*x*y - 12.0*x*y*y + 24.0*x*x*y*y - 16.0*x*y*z + 32.0*x*x*y*z + 16.0*x*y*y*z - 32.0*x*x*y*y*z;
860 DSDV(11,1,i)= - 4.0*y + 8.0*x*y + 8.0*y*y - 16.0*x*y*y + 12.0*y*z - 24.0*x*y*z - 24.0*y*y*z + 48.0*x*y*y*z - 8.0*y*z*z + 16.0*x*y*z*z + 16.0*y*y*z*z - 32.0*x*y*y*z*z;
861 DSDV(11,2,i)= - 4.0*x + 4.0*x*x + 16.0*x*y - 16.0*x*x*y + 12.0*x*z - 12.0*x*x*z - 48.0*x*y*z + 48.0*x*x*y*z - 8.0*x*z*z + 8.0*x*x*z*z + 32.0*x*y*z*z - 32.0*x*x*y*z*z;
862 DSDV(11,3,i)= + 12.0*x*y - 12.0*x*x*y - 24.0*x*y*y + 24.0*x*x*y*y - 16.0*x*y*z + 16.0*x*x*y*z + 32.0*x*y*y*z - 32.0*x*x*y*y*z;
863 DSDV(12,1,i)= - 12.0*y + 16.0*x*y + 12.0*y*y - 16.0*x*y*y + 36.0*y*z - 48.0*x*y*z - 36.0*y*y*z + 48.0*x*y*y*z - 24.0*y*z*z + 32.0*x*y*z*z + 24.0*y*y*z*z - 32.0*x*y*y*z*z;
864 DSDV(12,2,i)= + 4.0 - 12.0*x + 8.0*x*x - 8.0*y + 24.0*x*y - 16.0*x*x*y - 12.0*z + 36.0*x*z - 24.0*x*x*z + 24.0*y*z - 72.0*x*y*z + 48.0*x*x*y*z + 8.0*z*z - 24.0*x*z*z + 16.0*x*x*z*z - 16.0*y*z*z + 48.0*x*y*z*z - 32.0*x*x*y*z*z;
865 DSDV(12,3,i)= - 12.0*y + 36.0*x*y - 24.0*x*x*y + 12.0*y*y - 36.0*x*y*y + 24.0*x*x*y*y + 16.0*y*z - 48.0*x*y*z + 32.0*x*x*y*z - 16.0*y*y*z + 48.0*x*y*y*z - 32.0*x*x*y*y*z;
866 DSDV(13,1,i)= - 12.0*z + 16.0*x*z + 36.0*y*z - 48.0*x*y*z - 24.0*y*y*z + 32.0*x*y*y*z + 12.0*z*z - 16.0*x*z*z - 36.0*y*z*z + 48.0*x*y*z*z + 24.0*y*y*z*z - 32.0*x*y*y*z*z;
867 DSDV(13,2,i)= - 12.0*z + 36.0*x*z - 24.0*x*x*z + 16.0*y*z - 48.0*x*y*z + 32.0*x*x*y*z + 12.0*z*z - 36.0*x*z*z + 24.0*x*x*z*z - 16.0*y*z*z + 48.0*x*y*z*z - 32.0*x*x*y*z*z;
868 DSDV(13,3,i)= + 4.0 - 12.0*x + 8.0*x*x - 12.0*y + 36.0*x*y - 24.0*x*x*y + 8.0*y*y - 24.0*x*y*y + 16.0*x*x*y*y - 8.0*z + 24.0*x*z - 16.0*x*x*z + 24.0*y*z - 72.0*x*y*z + 48.0*x*x*y*z - 16.0*y*y*z + 48.0*x*y*y*z - 32.0*x*x*y*y*z;
869 DSDV(14,1,i)= - 4.0*z + 16.0*x*z + 12.0*y*z - 48.0*x*y*z - 8.0*y*y*z + 32.0*x*y*y*z + 4.0*z*z - 16.0*x*z*z - 12.0*y*z*z + 48.0*x*y*z*z + 8.0*y*y*z*z - 32.0*x*y*y*z*z;
870 DSDV(14,2,i)= + 12.0*x*z - 24.0*x*x*z - 16.0*x*y*z + 32.0*x*x*y*z - 12.0*x*z*z + 24.0*x*x*z*z + 16.0*x*y*z*z - 32.0*x*x*y*z*z;
871 DSDV(14,3,i)= - 4.0*x + 8.0*x*x + 12.0*x*y - 24.0*x*x*y - 8.0*x*y*y + 16.0*x*x*y*y + 8.0*x*z - 16.0*x*x*z - 24.0*x*y*z + 48.0*x*x*y*z + 16.0*x*y*y*z - 32.0*x*x*y*y*z;
872 DSDV(15,1,i)= + 4.0*y*z - 16.0*x*y*z - 8.0*y*y*z + 32.0*x*y*y*z - 4.0*y*z*z + 16.0*x*y*z*z + 8.0*y*y*z*z - 32.0*x*y*y*z*z;
873 DSDV(15,2,i)= + 4.0*x*z - 8.0*x*x*z - 16.0*x*y*z + 32.0*x*x*y*z - 4.0*x*z*z + 8.0*x*x*z*z + 16.0*x*y*z*z - 32.0*x*x*y*z*z;
874 DSDV(15,3,i)= + 4.0*x*y - 8.0*x*x*y - 8.0*x*y*y + 16.0*x*x*y*y - 8.0*x*y*z + 16.0*x*x*y*z + 16.0*x*y*y*z - 32.0*x*x*y*y*z;
875 DSDV(16,1,i)= + 12.0*y*z - 16.0*x*y*z - 24.0*y*y*z + 32.0*x*y*y*z - 12.0*y*z*z + 16.0*x*y*z*z + 24.0*y*y*z*z - 32.0*x*y*y*z*z;
876 DSDV(16,2,i)= - 4.0*z + 12.0*x*z - 8.0*x*x*z + 16.0*y*z - 48.0*x*y*z + 32.0*x*x*y*z + 4.0*z*z - 12.0*x*z*z + 8.0*x*x*z*z - 16.0*y*z*z + 48.0*x*y*z*z - 32.0*x*x*y*z*z;
877 DSDV(16,3,i)= - 4.0*y + 12.0*x*y - 8.0*x*x*y + 8.0*y*y - 24.0*x*y*y + 16.0*x*x*y*y + 8.0*y*z - 24.0*x*y*z + 16.0*x*x*y*z - 16.0*y*y*z + 48.0*x*y*y*z - 32.0*x*x*y*y*z;
878 DSDV(17,1,i)= - 4.0*z + 8.0*x*z + 12.0*y*z - 24.0*x*y*z - 8.0*y*y*z + 16.0*x*y*y*z + 8.0*z*z - 16.0*x*z*z - 24.0*y*z*z + 48.0*x*y*z*z + 16.0*y*y*z*z - 32.0*x*y*y*z*z;
879 DSDV(17,2,i)= + 12.0*x*z - 12.0*x*x*z - 16.0*x*y*z + 16.0*x*x*y*z - 24.0*x*z*z + 24.0*x*x*z*z + 32.0*x*y*z*z - 32.0*x*x*y*z*z;
880 DSDV(17,3,i)= - 4.0*x + 4.0*x*x + 12.0*x*y - 12.0*x*x*y - 8.0*x*y*y + 8.0*x*x*y*y + 16.0*x*z - 16.0*x*x*z - 48.0*x*y*z + 48.0*x*x*y*z + 32.0*x*y*y*z - 32.0*x*x*y*y*z;
881 DSDV(18,1,i)= + 4.0*y*z - 16.0*x*y*z - 4.0*y*y*z + 16.0*x*y*y*z - 8.0*y*z*z + 32.0*x*y*z*z + 8.0*y*y*z*z - 32.0*x*y*y*z*z;
882 DSDV(18,2,i)= + 4.0*x*z - 8.0*x*x*z - 8.0*x*y*z + 16.0*x*x*y*z - 8.0*x*z*z + 16.0*x*x*z*z + 16.0*x*y*z*z - 32.0*x*x*y*z*z;
883 DSDV(18,3,i)= + 4.0*x*y - 8.0*x*x*y - 4.0*x*y*y + 8.0*x*x*y*y - 16.0*x*y*z + 32.0*x*x*y*z + 16.0*x*y*y*z - 32.0*x*x*y*y*z;
884 DSDV(19,1,i)= + 4.0*y*z - 8.0*x*y*z - 8.0*y*y*z + 16.0*x*y*y*z - 8.0*y*z*z + 16.0*x*y*z*z + 16.0*y*y*z*z - 32.0*x*y*y*z*z;
885 DSDV(19,2,i)= + 4.0*x*z - 4.0*x*x*z - 16.0*x*y*z + 16.0*x*x*y*z - 8.0*x*z*z + 8.0*x*x*z*z + 32.0*x*y*z*z - 32.0*x*x*y*z*z;
886 DSDV(19,3,i)= + 4.0*x*y - 4.0*x*x*y - 8.0*x*y*y + 8.0*x*x*y*y - 16.0*x*y*z + 16.0*x*x*y*z + 32.0*x*y*y*z - 32.0*x*x*y*y*z;
887 DSDV(20,1,i)= + 12.0*y*z - 16.0*x*y*z - 12.0*y*y*z + 16.0*x*y*y*z - 24.0*y*z*z + 32.0*x*y*z*z + 24.0*y*y*z*z - 32.0*x*y*y*z*z;
888 DSDV(20,2,i)= - 4.0*z + 12.0*x*z - 8.0*x*x*z + 8.0*y*z - 24.0*x*y*z + 16.0*x*x*y*z + 8.0*z*z - 24.0*x*z*z + 16.0*x*x*z*z - 16.0*y*z*z + 48.0*x*y*z*z - 32.0*x*x*y*z*z;
889 DSDV(20,3,i)= - 4.0*y + 12.0*x*y - 8.0*x*x*y + 4.0*y*y - 12.0*x*y*y + 8.0*x*x*y*y + 16.0*y*z - 48.0*x*y*z + 32.0*x*x*y*z - 16.0*y*y*z + 48.0*x*y*y*z - 32.0*x*x*y*y*z;
890 DSDV(21,1,i)= + 16.0*y - 32.0*x*y - 16.0*y*y + 32.0*x*y*y - 48.0*y*z + 96.0*x*y*z + 48.0*y*y*z - 96.0*x*y*y*z + 32.0*y*z*z - 64.0*x*y*z*z - 32.0*y*y*z*z + 64.0*x*y*y*z*z;
891 DSDV(21,2,i)= + 16.0*x - 16.0*x*x - 32.0*x*y + 32.0*x*x*y - 48.0*x*z + 48.0*x*x*z + 96.0*x*y*z - 96.0*x*x*y*z + 32.0*x*z*z - 32.0*x*x*z*z - 64.0*x*y*z*z + 64.0*x*x*y*z*z;
892 DSDV(21,3,i)= - 48.0*x*y + 48.0*x*x*y + 48.0*x*y*y - 48.0*x*x*y*y + 64.0*x*y*z - 64.0*x*x*y*z - 64.0*x*y*y*z + 64.0*x*x*y*y*z;
893 DSDV(22,1,i)= + 16.0*z - 32.0*x*z - 48.0*y*z + 96.0*x*y*z + 32.0*y*y*z - 64.0*x*y*y*z - 16.0*z*z + 32.0*x*z*z + 48.0*y*z*z - 96.0*x*y*z*z - 32.0*y*y*z*z + 64.0*x*y*y*z*z;
894 DSDV(22,2,i)= - 48.0*x*z + 48.0*x*x*z + 64.0*x*y*z - 64.0*x*x*y*z + 48.0*x*z*z - 48.0*x*x*z*z - 64.0*x*y*z*z + 64.0*x*x*y*z*z;
895 DSDV(22,3,i)= + 16.0*x - 16.0*x*x - 48.0*x*y + 48.0*x*x*y + 32.0*x*y*y - 32.0*x*x*y*y - 32.0*x*z + 32.0*x*x*z + 96.0*x*y*z - 96.0*x*x*y*z - 64.0*x*y*y*z + 64.0*x*x*y*y*z;
896 DSDV(23,1,i)= - 16.0*y*z + 64.0*x*y*z + 16.0*y*y*z - 64.0*x*y*y*z + 16.0*y*z*z - 64.0*x*y*z*z - 16.0*y*y*z*z + 64.0*x*y*y*z*z;
897 DSDV(23,2,i)= - 16.0*x*z + 32.0*x*x*z + 32.0*x*y*z - 64.0*x*x*y*z + 16.0*x*z*z - 32.0*x*x*z*z - 32.0*x*y*z*z + 64.0*x*x*y*z*z;
898 DSDV(23,3,i)= - 16.0*x*y + 32.0*x*x*y + 16.0*x*y*y - 32.0*x*x*y*y + 32.0*x*y*z - 64.0*x*x*y*z - 32.0*x*y*y*z + 64.0*x*x*y*y*z;
899 DSDV(24,1,i)= - 16.0*y*z + 32.0*x*y*z + 32.0*y*y*z - 64.0*x*y*y*z + 16.0*y*z*z - 32.0*x*y*z*z - 32.0*y*y*z*z + 64.0*x*y*y*z*z;
900 DSDV(24,2,i)= - 16.0*x*z + 16.0*x*x*z + 64.0*x*y*z - 64.0*x*x*y*z + 16.0*x*z*z - 16.0*x*x*z*z - 64.0*x*y*z*z + 64.0*x*x*y*z*z;
901 DSDV(24,3,i)= - 16.0*x*y + 16.0*x*x*y + 32.0*x*y*y - 32.0*x*x*y*y + 32.0*x*y*z - 32.0*x*x*y*z - 64.0*x*y*y*z + 64.0*x*x*y*y*z;
902 DSDV(25,1,i)= - 48.0*y*z + 64.0*x*y*z + 48.0*y*y*z - 64.0*x*y*y*z + 48.0*y*z*z - 64.0*x*y*z*z - 48.0*y*y*z*z + 64.0*x*y*y*z*z;
903 DSDV(25,2,i)= + 16.0*z - 48.0*x*z + 32.0*x*x*z - 32.0*y*z + 96.0*x*y*z - 64.0*x*x*y*z - 16.0*z*z + 48.0*x*z*z - 32.0*x*x*z*z + 32.0*y*z*z - 96.0*x*y*z*z + 64.0*x*x*y*z*z;
904 DSDV(25,3,i)= + 16.0*y - 48.0*x*y + 32.0*x*x*y - 16.0*y*y + 48.0*x*y*y - 32.0*x*x*y*y - 32.0*y*z + 96.0*x*y*z - 64.0*x*x*y*z + 32.0*y*y*z - 96.0*x*y*y*z + 64.0*x*x*y*y*z;
905 DSDV(26,1,i)= - 16.0*y*z + 32.0*x*y*z + 16.0*y*y*z - 32.0*x*y*y*z + 32.0*y*z*z - 64.0*x*y*z*z - 32.0*y*y*z*z + 64.0*x*y*y*z*z;
906 DSDV(26,2,i)= - 16.0*x*z + 16.0*x*x*z + 32.0*x*y*z - 32.0*x*x*y*z + 32.0*x*z*z - 32.0*x*x*z*z - 64.0*x*y*z*z + 64.0*x*x*y*z*z;
907 DSDV(26,3,i)= - 16.0*x*y + 16.0*x*x*y + 16.0*x*y*y - 16.0*x*x*y*y + 64.0*x*y*z - 64.0*x*x*y*z - 64.0*x*y*y*z + 64.0*x*x*y*y*z;
908 DSDV(27,1,i)= + 64.0*y*z - 128.0*x*y*z - 64.0*y*y*z + 128.0*x*y*y*z - 64.0*y*z*z + 128.0*x*y*z*z + 64.0*y*y*z*z - 128.0*x*y*y*z*z;
909 DSDV(27,2,i)= + 64.0*x*z - 64.0*x*x*z - 128.0*x*y*z + 128.0*x*x*y*z - 64.0*x*z*z + 64.0*x*x*z*z + 128.0*x*y*z*z - 128.0*x*x*y*z*z;
910 DSDV(27,3,i)= + 64.0*x*y - 64.0*x*x*y - 64.0*x*y*y + 64.0*x*x*y*y - 128.0*x*y*z + 128.0*x*x*y*z + 128.0*x*y*y*z - 128.0*x*x*y*y*z;
911 }
912 #undef NUMSHAPES
913 #undef DIM
914 }
915
916 /**************************************************************/
917
918 void Finley_Shape_Hex32(int NumV,double* v,double* s,double* dsdv) {
919 #define NUMSHAPES 32
920 #define DIM 3
921 double x,y,z;
922 int i;
923 for (i=0;i<NumV;i++) {
924 x=V(1,i);
925 y=V(2,i);
926 z=V(3,i);
927 S(1,i)=(10.)+(-5.5)*x+(10.)*x*y+(-5.5)*y+(-5.5)*z+(10.)*x*z+(-0.145e2)*x*y*z+(10.)*y*z+(9.)*x*x+(-4.5)*x*x*x+(-9.)*x*y*y+(4.5)*x*y*y*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x*z+(-45.)*x*y*z+(45.)*y*z+(0.405e2)*z*z+(-0.405e2)*x*z*z+(0.405e2)*x*y*z*z+(-0.405e2)*y*z*z;
1040 DSDV(18, 3,i)=(9.)*x+(-9.)*x*y+(-45.)*x*z+(45.)*x*y*z+(0.405e2)*x*z*z+(-0.405e2)*x*y*z*z;
1041 DSDV(19, 3,i)=(9.)*x*y+(-45.)*x*y*z+(0.405e2)*x*y*z*z;
1042 DSDV(20, 3,i)=(-9.)*x*y+(9.)*y+(45.)*x*y*z+(-45.)*y*z+(-0.405e2)*x*y*z*z+(0.405e2)*y*z*z;
1043 DSDV(21, 3,i)=(-4.5)+(4.5)*x+(-4.5)*x*y+(4.5)*y+(36.)*z+(-36.)*x*z+(36.)*x*y*z+(-36.)*y*z+(-0.405e2)*z*z+(0.405e2)*x*z*z+(-0.405e2)*x*y*z*z+(0.405e2)*y*z*z;
1044 DSDV(22, 3,i)=(-4.5)*x+(4.5)*x*y+(36.)*x*z+(-36.)*x*y*z+(-0.405e2)*x*z*z+(0.405e2)*x*y*z*z;
1045 DSDV(23, 3,i)=(-4.5)*x*y+(36.)*x*y*z+(-0.405e2)*x*y*z*z;
1046 DSDV(24, 3,i)=(4.5)*x*y+(-4.5)*y+(-36.)*x*y*z+(36.)*y*z+(0.405e2)*x*y*z*z+(-0.405e2)*y*z*z;
1047 DSDV(25, 3,i)=(9.)*x+(-9.)*x*y+(-22.5)*x*x+(13.5)*x*x*x+(-13.5)*x*x*x*y+(22.5)*x*x*y;
1048 DSDV(26, 3,i)=(-4.5)*x+(4.5)*x*y+(18.)*x*x+(-13.5)*x*x*x+(13.5)*x*x*x*y+(-18.)*x*x*y;
1049 DSDV(27, 3,i)=(9.)*x*y+(-22.5)*x*y*y+(13.5)*x*y*y*y;
1050 DSDV(28, 3,i)=(-4.5)*x*y+(18.)*x*y*y+(-13.5)*x*y*y*y;
1051 DSDV(29, 3,i)=(-4.5)*x*y+(-13.5)*x*x*x*y+(18.)*x*x*y;
1052 DSDV(30, 3,i)=(9.)*x*y+(13.5)*x*x*x*y+(-22.5)*x*x*y;
1053 DSDV(31, 3,i)=(4.5)*x*y+(-4.5)*y+(-18.)*x*y*y+(13.5)*x*y*y*y+(-13.5)*y*y*y+(18.)*y*y;
1054 DSDV(32, 3,i)=(-9.)*x*y+(9.)*y+(22.5)*x*y*y+(-13.5)*x*y*y*y+(13.5)*y*y*y+(-22.5)*y*y;
1055 }
1056 #undef NUMSHAPES
1057 #undef DIM
1058 }
1059 #undef V
1060 #undef S
1061 #undef DSDV
1062
1063 /*
1064 * $Log$
1065 * Revision 1.2 2005/09/15 03:44:23 jgs
1066 * Merge of development branch dev-02 back to main trunk on 2005-09-15
1067 *
1068 * Revision 1.1.1.1.6.1 2005/09/07 06:26:21 gross
1069 * the solver from finley are put into the standalone package paso now
1070 *
1071 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
1072 * initial import of project esys2
1073 *
1074 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
1075 * Initial version of eys using boost-python.
1076 *
1077 *
1078 */

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26