/[escript]/branches/doubleplusgood/dudley/src/ShapeTable.cpp
ViewVC logotype

Diff of /branches/doubleplusgood/dudley/src/ShapeTable.cpp

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

revision 4331 by jfenwick, Wed Feb 27 06:09:33 2013 UTC revision 4332 by jfenwick, Thu Mar 21 04:21:14 2013 UTC
# Line 49  bool_t getQuadShape(dim_t dim, bool_t re Line 49  bool_t getQuadShape(dim_t dim, bool_t re
49      if (arr == 0)      if (arr == 0)
50      {      {
51      int i;      int i;
52      arr = MEMALLOC(8,double*);  /* point occupies two slots to make things simpler */      arr = new double*[8];   /* point occupies two slots to make things simpler */
53      arr[0] = MEMALLOC(1,double);      arr[0] = new double[1];
54      arr[0][0] = 1.;     /* point */      arr[0][0] = 1.;     /* point */
55      arr[1] = arr[0];      arr[1] = arr[0];
56      arr[2] = MEMALLOC(4,double);    /* Line Single */      arr[2] = new double[4]; /* Line Single */
57      arr[3] = MEMALLOC(4,double);    /* Line 2 */      arr[3] = new double[4]; /* Line 2 */
58    
59  /*  /*
60      for (i = 0; i < 2; ++i)      for (i = 0; i < 2; ++i)
# Line 80  bool_t getQuadShape(dim_t dim, bool_t re Line 80  bool_t getQuadShape(dim_t dim, bool_t re
80    
81    
82    
83      arr[4] = MEMALLOC(3,double);    /* Tri single */      arr[4] = new double[3]; /* Tri single */
84      arr[4][0] = 1. - _dudley_V[2][0] - _dudley_V[2][1];      arr[4][0] = 1. - _dudley_V[2][0] - _dudley_V[2][1];
85      arr[4][1] = _dudley_V[2][0];      arr[4][1] = _dudley_V[2][0];
86      arr[4][2] = _dudley_V[2][1];      arr[4][2] = _dudley_V[2][1];
87    
88      arr[5] = MEMALLOC(9,double);    /* Tri 3 */      arr[5] = new double[9]; /* Tri 3 */
89      for (i = 0; i < 3; ++i)      for (i = 0; i < 3; ++i)
90      {      {
91          arr[5][3 * i] = 1 - _dudley_V[3][2 * i] - _dudley_V[3][2 * i + 1];          arr[5][3 * i] = 1 - _dudley_V[3][2 * i] - _dudley_V[3][2 * i + 1];
92          arr[5][3 * i + 1] = _dudley_V[3][2 * i];          arr[5][3 * i + 1] = _dudley_V[3][2 * i];
93          arr[5][3 * i + 2] = _dudley_V[3][2 * i + 1];          arr[5][3 * i + 2] = _dudley_V[3][2 * i + 1];
94      }      }
95      arr[6] = MEMALLOC(4, double);   /* Tet single */      arr[6] = new  double[4];    /* Tet single */
96      arr[6][0] = 1 - _dudley_V[4][0] - _dudley_V[4][1] - _dudley_V[4][2];      arr[6][0] = 1 - _dudley_V[4][0] - _dudley_V[4][1] - _dudley_V[4][2];
97      arr[6][1] = _dudley_V[4][0];      arr[6][1] = _dudley_V[4][0];
98      arr[6][2] = _dudley_V[4][1];      arr[6][2] = _dudley_V[4][1];
99      arr[6][3] = _dudley_V[4][2];      arr[6][3] = _dudley_V[4][2];
100    
101      arr[7] = MEMALLOC(16,double);   /* Tet 4 */      arr[7] = new double[16];    /* Tet 4 */
102      for (i = 0; i < 4; ++i)      for (i = 0; i < 4; ++i)
103      {      {
104          double x = _dudley_V[5][3 * i];          double x = _dudley_V[5][3 * i];

Legend:
Removed from v.4331  
changed lines
  Added in v.4332

  ViewVC Help
Powered by ViewVC 1.1.26