/[escript]/branches/trilinos_from_5897/dudley/src/ShapeTable.h
ViewVC logotype

Diff of /branches/trilinos_from_5897/dudley/src/ShapeTable.h

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

revision 6078 by caltinay, Wed Mar 2 04:13:26 2016 UTC revision 6079 by caltinay, Mon Mar 21 12:22:38 2016 UTC
# Line 28  This file is not to be included in .h fi Line 28  This file is not to be included in .h fi
28    
29  namespace dudley {  namespace dudley {
30    
31  /* These are constructed from dsdv in ShapeFunction.c in finley  // These are constructed from dsdv in ShapeFunction.cpp in finley.
32     The first two are just there for functions that want a pointer  // The first one is just there for functions that want a pointer
 */  
 static const double DTDV_0D[1][1] = { {0} };  
33  static const double DTDV_1D[2][2] = { {-1., 1}, {-1., 1.} };  static const double DTDV_1D[2][2] = { {-1., 1}, {-1., 1.} };
34    
35  /* The repetition here is a hack to prevent out of bounds access */  // The repetition here is a hack to prevent out of bounds access
36  static const double DTDV_2D[3 * 3][2] = { {-1, 1}, {0, -1.}, {0, 1},  static const double DTDV_2D[3 * 3][2] = {
37  {-1, 1}, {0, -1.}, {0, 1},      {-1, 1}, {0, -1.}, {0, 1},
38  {-1, 1}, {0, -1.}, {0, 1}      {-1, 1}, {0, -1.}, {0, 1},
39        {-1, 1}, {0, -1.}, {0, 1}
40  };  };
 static const double DTDV_3D[4][3] = { {-1, -1, -1}, {1, 0, 0}, {0, 1, 0}, {0, 0, 1} };  
41    
42  /* Index by the following by Dudley_ElementTypeID  static const double DTDV_3D[4][3] = {
43   * The number of local dimensions (as opposed to dimension of the embedding space) */      {-1, -1, -1},
44  static const dim_t localDims[8] = { 0, 1, 2, 3, 0, 1, 2, 0 };      { 1,  0,  0},
45  static const dim_t Dims[8] = { 0, 1, 2, 3, 1, 2, 3, 0 };      { 0,  1,  0},
46        { 0,  0,  1}
47  /* the following lists are only used for face elements defined by numNodesOnFace>0 */  };
48  static const dim_t numNodesOnFaceMap[8] = { 1, 2, 3, 4, 1, 2, 4, -1 };  /* if the element is allowed as a face element, numNodesOnFace defines the number of nodes defining the face */  
49  static const dim_t shiftNodesMap[8][4] = { {0}, {1, 0}, {1, 2, 0}, {-1}, {0, 1, 2}, {1, 0, 2}, {1, 2, 0, 3}, {0} }; /* defines a permutation of the nodes which rotates the nodes on the face */  // Index the following by ElementTypeID
50  static const dim_t reverseNodesMap[8][4] = { {-1}, {-1}, {0, 2, 1}, {-1}, {-1}, {-1}, {0, 2, 1, 3}, {0} };  /* reverses the order of the nodes on a face. the permutation has keep 0 fixed. */  // The number of local dimensions (as opposed to dimension of the embedding
51                            /* shiftNodes={-1} or reverseNodes={-1} are ignored. */  // space)
52    static const int localDims[8] = { 0, 1, 2, 3, 0, 1, 2, 0 };
53    static const int Dims[8] = { 0, 1, 2, 3, 1, 2, 3, 0 };
54    
55    // the following lists are only used for face elements defined by
56    // numNodesOnFace>0
57    
58    // if the element is allowed as a face element, numNodesOnFace defines the
59    // number of nodes defining the face
60    static const int numNodesOnFaceMap[8] = { 1, 2, 3, 4, 1, 2, 4, -1 };
61    
62    // defines a permutation of the nodes which rotates the nodes on the face
63    static const int shiftNodesMap[8][4] = { {0}, {1, 0}, {1, 2, 0}, {-1}, {0, 1, 2}, {1, 0, 2}, {1, 2, 0, 3}, {0} };
64    
65    // reverses the order of the nodes on a face. the permutation has keep 0 fixed.
66    // shiftNodes={-1} or reverseNodes={-1} are ignored.
67    static const int reverseNodesMap[8][4] = { {-1}, {-1}, {0, 2, 1}, {-1}, {-1}, {-1}, {0, 2, 1, 3}, {0} };
68    
69  /* [0] is reduced quadrature, [1] is full quadrature */  // [0] is reduced quadrature, [1] is full quadrature
70  /* in order the positions are POINT, LINE, TRI, TET */  // in order the positions are POINT, LINE, TRI, TET
71  static const double QuadWeight[4][2] = { {0, 0}, {1., 0.5}, {0.5, 1. / 6}, {1. / 6, 1. / 24} };  static const double QuadWeight[4][2] = { {0, 0}, {1., 0.5}, {0.5, 1. / 6}, {1. / 6, 1. / 24} };
72    
73  /* number of quadrature points per element */  // number of quadrature points per element
74  static const dim_t QuadNums[4][2] = { {0, 0}, {1, 2}, {1, 3}, {1, 4} };  static const int QuadNums[4][2] = { {0, 0}, {1, 2}, {1, 3}, {1, 4} };
75    
76  /*shape functions at quadrature nodes */  // shape functions at quadrature nodes
77  bool getQuadShape(dim_t sim, bool reduced, const double **shapearr);  bool getQuadShape(dim_t sim, bool reduced, const double **shapearr);
78    
79  const char *getElementName(Dudley_ElementTypeId id);  const char* getElementName(ElementTypeId id);
80    
81  } // namespace dudley  } // namespace dudley
82    

Legend:
Removed from v.6078  
changed lines
  Added in v.6079

  ViewVC Help
Powered by ViewVC 1.1.26