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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1573 by trankine, Fri Jan 11 07:45:58 2008 UTC revision 1574 by gross, Mon May 26 13:59:58 2008 UTC
# Line 33  void Finley_Shape_Point1(int NumV,double Line 33  void Finley_Shape_Point1(int NumV,double
33    #define NUMSHAPES 1    #define NUMSHAPES 1
34    #define DIM 0    #define DIM 0
35    int i;    int i;
36      #pragma ivdep
37    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
38      S(1,i)=1.;      S(1,i)=1.;
39    }    }
# Line 45  void Finley_Shape_Point1(int NumV,double Line 46  void Finley_Shape_Point1(int NumV,double
46  void Finley_Shape_Line2(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Line2(int NumV,double* v,double* s,double* dsdv) {
47    #define NUMSHAPES 2    #define NUMSHAPES 2
48    #define DIM 1    #define DIM 1
49    double x;    register double x;
50    int i;    int i;
51      #pragma ivdep
52    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
53      x=V(1,i);      x=V(1,i);
54      S(1,i)=1.-x;      S(1,i)=1.-x;
# Line 63  void Finley_Shape_Line2(int NumV,double* Line 65  void Finley_Shape_Line2(int NumV,double*
65  void Finley_Shape_Line3(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Line3(int NumV,double* v,double* s,double* dsdv) {
66    #define NUMSHAPES 3    #define NUMSHAPES 3
67    #define DIM 1    #define DIM 1
68    double x;    register double x;
69    int i;    int i;
70      #pragma ivdep
71    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
72      x=V(1,i);      x=V(1,i);
73      S(1,i)=(2.*x -1. )*(x -1.);      S(1,i)=(2.*x -1. )*(x -1.);
# Line 83  void Finley_Shape_Line3(int NumV,double* Line 86  void Finley_Shape_Line3(int NumV,double*
86  void Finley_Shape_Line4(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Line4(int NumV,double* v,double* s,double* dsdv) {
87    #define NUMSHAPES 4    #define NUMSHAPES 4
88    #define DIM 1    #define DIM 1
89    double x;    register double x;
90    int i;    int i;
91      #pragma ivdep
92    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
93      x=V(1,i);      x=V(1,i);
94      S(1,i)=(10.)+(-5.5)*x+(9.)*x*x+(-4.5)*x*x*x ;      S(1,i)=(10.)+(-5.5)*x+(9.)*x*x+(-4.5)*x*x*x ;
# Line 105  void Finley_Shape_Line4(int NumV,double* Line 109  void Finley_Shape_Line4(int NumV,double*
109  void Finley_Shape_Tri3(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Tri3(int NumV,double* v,double* s,double* dsdv) {
110    #define NUMSHAPES 3    #define NUMSHAPES 3
111    #define DIM 2    #define DIM 2
112    double x,y;    register double x,y;
113    int i;    int i;
114      #pragma ivdep
115    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
116      x=V(1,i);      x=V(1,i);
117      y=V(2,i);      y=V(2,i);
# Line 129  void Finley_Shape_Tri3(int NumV,double* Line 134  void Finley_Shape_Tri3(int NumV,double*
134  void Finley_Shape_Tri6(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Tri6(int NumV,double* v,double* s,double* dsdv) {
135    #define NUMSHAPES 6    #define NUMSHAPES 6
136    #define DIM 2    #define DIM 2
137    double x,y;    register double x,y;
138    int i;    int i;
139      #pragma ivdep
140    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
141      x=V(1,i);      x=V(1,i);
142      y=V(2,i);      y=V(2,i);
# Line 162  void Finley_Shape_Tri6(int NumV,double* Line 168  void Finley_Shape_Tri6(int NumV,double*
168  void Finley_Shape_Tri9(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Tri9(int NumV,double* v,double* s,double* dsdv) {
169    #define NUMSHAPES 9    #define NUMSHAPES 9
170    #define DIM 2    #define DIM 2
171    double x,y;    register double x,y;
172    int i;    int i;
173      #pragma ivdep
174    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
175      x=V(1,i);      x=V(1,i);
176      y=V(2,i);      y=V(2,i);
# Line 204  void Finley_Shape_Tri9(int NumV,double* Line 211  void Finley_Shape_Tri9(int NumV,double*
211  void Finley_Shape_Tri10(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Tri10(int NumV,double* v,double* s,double* dsdv) {
212    #define NUMSHAPES 10    #define NUMSHAPES 10
213    #define DIM 2    #define DIM 2
214    double x,y;    register double x,y;
215    int i;    int i;
216      #pragma ivdep
217    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
218      x=V(1,i);      x=V(1,i);
219      y=V(2,i);      y=V(2,i);
# Line 249  void Finley_Shape_Tri10(int NumV,double* Line 257  void Finley_Shape_Tri10(int NumV,double*
257  void Finley_Shape_Rec4(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Rec4(int NumV,double* v,double* s,double* dsdv) {
258    #define NUMSHAPES 4    #define NUMSHAPES 4
259    #define DIM 2    #define DIM 2
260    double x,y;    register double x,y;
261    int i;    int i;
262      #pragma ivdep
263    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
264      x=V(1,i);      x=V(1,i);
265      y=V(2,i);      y=V(2,i);
# Line 276  void Finley_Shape_Rec4(int NumV,double* Line 285  void Finley_Shape_Rec4(int NumV,double*
285  void Finley_Shape_Rec8(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Rec8(int NumV,double* v,double* s,double* dsdv) {
286    #define NUMSHAPES 8    #define NUMSHAPES 8
287    #define DIM 2    #define DIM 2
288    double x,y;    register double x,y;
289    int i;    int i;
290      #pragma ivdep
291    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
292      x=V(1,i);      x=V(1,i);
293      y=V(2,i);      y=V(2,i);
# Line 315  void Finley_Shape_Rec8(int NumV,double* Line 325  void Finley_Shape_Rec8(int NumV,double*
325  void Finley_Shape_Rec9(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Rec9(int NumV,double* v,double* s,double* dsdv) {
326    #define NUMSHAPES 9    #define NUMSHAPES 9
327    #define DIM 2    #define DIM 2
328    double x,y;    register double x,y;
329    int i;    int i;
330      #pragma ivdep
331    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
332      x=V(1,i);      x=V(1,i);
333      y=V(2,i);      y=V(2,i);
# Line 357  void Finley_Shape_Rec9(int NumV,double* Line 368  void Finley_Shape_Rec9(int NumV,double*
368  void Finley_Shape_Rec12(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Rec12(int NumV,double* v,double* s,double* dsdv) {
369    #define NUMSHAPES 12    #define NUMSHAPES 12
370    #define DIM 2    #define DIM 2
371    double x,y;    register double x,y;
372    int i;    int i;
373      #pragma ivdep
374    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
375      x=V(1,i);      x=V(1,i);
376      y=V(2,i);      y=V(2,i);
# Line 408  void Finley_Shape_Rec12(int NumV,double* Line 420  void Finley_Shape_Rec12(int NumV,double*
420  void Finley_Shape_Rec16(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Rec16(int NumV,double* v,double* s,double* dsdv) {
421    #define NUMSHAPES 16    #define NUMSHAPES 16
422    #define DIM 2    #define DIM 2
423    double x,y;    register double x,y;
424    int i;    int i;
425      #pragma ivdep
426    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
427      x=V(1,i);      x=V(1,i);
428      y=V(2,i);      y=V(2,i);
# Line 471  void Finley_Shape_Rec16(int NumV,double* Line 484  void Finley_Shape_Rec16(int NumV,double*
484  void Finley_Shape_Tet4(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Tet4(int NumV,double* v,double* s,double* dsdv) {
485    #define NUMSHAPES 4    #define NUMSHAPES 4
486    #define DIM 3    #define DIM 3
487    double x,y,z;    register double x,y,z;
488    int i;    int i;
489      #pragma ivdep
490    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
491      x=V(1,i);      x=V(1,i);
492      y=V(2,i);      y=V(2,i);
# Line 503  void Finley_Shape_Tet4(int NumV,double* Line 517  void Finley_Shape_Tet4(int NumV,double*
517  void Finley_Shape_Tet10(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Tet10(int NumV,double* v,double* s,double* dsdv) {
518    #define NUMSHAPES 10    #define NUMSHAPES 10
519    #define DIM 3    #define DIM 3
520    double x,y,z;    register double x,y,z;
521    int i;    int i;
522      #pragma ivdep
523    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
524      x=V(1,i);      x=V(1,i);
525      y=V(2,i);      y=V(2,i);
# Line 570  void Finley_Shape_Tet10(int NumV,double* Line 585  void Finley_Shape_Tet10(int NumV,double*
585  void Finley_Shape_Tet16(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Tet16(int NumV,double* v,double* s,double* dsdv) {
586    #define NUMSHAPES 16    #define NUMSHAPES 16
587    #define DIM 3    #define DIM 3
588    double x,y,z;    register double x,y,z;
589    int i;    int i;
590      #pragma ivdep
591    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
592      x=V(1,i);      x=V(1,i);
593      y=V(2,i);      y=V(2,i);
# Line 650  void Finley_Shape_Tet16(int NumV,double* Line 666  void Finley_Shape_Tet16(int NumV,double*
666  void Finley_Shape_Hex8(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Hex8(int NumV,double* v,double* s,double* dsdv) {
667    #define NUMSHAPES 8    #define NUMSHAPES 8
668    #define DIM 3    #define DIM 3
669    double x,y,z;    register double x,y,z;
670    int i;    int i;
671      #pragma ivdep
672    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
673      x=V(1,i);      x=V(1,i);
674      y=V(2,i);      y=V(2,i);
# Line 698  void Finley_Shape_Hex8(int NumV,double* Line 715  void Finley_Shape_Hex8(int NumV,double*
715  void Finley_Shape_Hex20(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Hex20(int NumV,double* v,double* s,double* dsdv) {
716    #define NUMSHAPES 20    #define NUMSHAPES 20
717    #define DIM 3    #define DIM 3
718    double x,y,z;    register double x,y,z;
719    int i;    int i;
720      #pragma ivdep
721    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
722      x=V(1,i);      x=V(1,i);
723      y=V(2,i);      y=V(2,i);
# Line 794  void Finley_Shape_Hex20(int NumV,double* Line 812  void Finley_Shape_Hex20(int NumV,double*
812  void Finley_Shape_Hex27(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Hex27(int NumV,double* v,double* s,double* dsdv) {
813    #define NUMSHAPES 27    #define NUMSHAPES 27
814    #define DIM 3    #define DIM 3
815    double x,y,z;    register double x,y,z;
816    int i;    int i;
817      #pragma ivdep
818    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
819      x=V(1,i);      x=V(1,i);
820      y=V(2,i);      y=V(2,i);
# Line 918  void Finley_Shape_Hex27(int NumV,double* Line 937  void Finley_Shape_Hex27(int NumV,double*
937  void Finley_Shape_Hex32(int NumV,double* v,double* s,double* dsdv) {  void Finley_Shape_Hex32(int NumV,double* v,double* s,double* dsdv) {
938    #define NUMSHAPES 32    #define NUMSHAPES 32
939    #define DIM 3    #define DIM 3
940    double x,y,z;    register double x,y,z;
941    int i;    int i;
942      #pragma ivdep
943    for (i=0;i<NumV;i++) {    for (i=0;i<NumV;i++) {
944      x=V(1,i);      x=V(1,i);
945      y=V(2,i);      y=V(2,i);

Legend:
Removed from v.1573  
changed lines
  Added in v.1574

  ViewVC Help
Powered by ViewVC 1.1.26