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

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

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

revision 2747 by gross, Fri Oct 16 06:45:01 2009 UTC revision 2748 by gross, Tue Nov 17 07:32:59 2009 UTC
# Line 20  Line 20 
20    
21  #include "ReferenceElements.h"  #include "ReferenceElements.h"
22    
23  /**************************************************************/  /**************************************************************
24    
25        this list has been generated by generateReferenceElementList.py:.
26    */
27    
28  Finley_RefElementInfo Finley_RefElement_InfoList[]={  Finley_ReferenceElementInfo Finley_ReferenceElement_InfoList[]={
29    {Point1,     "Point1", 0,     0,  1,  1, 1, 1,  { Point1, "Point1", 1, 1, 1, { 0, 1 }, Point1,
30      Point1, {0},      { 0 }, PointQuad, Point1Shape, Point1Shape,
31      Finley_Shape_Point1, Finley_Quad_getNodesPoint,       Finley_Quad_getNumNodesPoint,      { 0 },
32       1,{0},    1, { 0 },
33       1,{0}, {0},{-1}},    1, { 0 },
34    {Line2,      "Line2", 1,      1,  2,  2, 1, 2,      { 0 },
35       Line2, {0,1},      { -1 } },
36       Finley_Shape_Line2,  Finley_Quad_getNodesLine,        Finley_Quad_getNumNodesLine,  { Line2, "Line2", 2, 1, 1, { 0, 2 }, Line2,
37       2,{0,1},      { 0, 1 }, LineQuad, Line2Shape, Line2Shape,
38       2,{0,1}, {1,0},{-1}},      { 0, 1 },
39      2, { 0, 1 },
40    {Line3, "Line3", 1,      1,  3,  3, 2, 2,    2, { 0, 1 },
41       Line2, {0,1},      { 1, 0 },
42       Finley_Shape_Line3,  Finley_Quad_getNodesLine,        Finley_Quad_getNumNodesLine,      { -1 } },
43       3,{0,1,2},  { Line3, "Line3", 3, 1, 1, { 0, 3 }, Line2,
44       3,{0,1,2}, {1,0,2},{-1}},      { 0, 1 }, LineQuad, Line3Shape, Line3Shape,
45        { 0, 1, 2 },
46    {Line4, "Line4", 1,      1,  4,  4, 3, 2,    3, { 0, 1, 2 },
47       Line2, {0,1},    3, { 0, 1, 2 },
48       Finley_Shape_Line4,  Finley_Quad_getNodesLine,        Finley_Quad_getNumNodesLine,      { 1, 0, 2 },
49       4,{0,1,2,3},      { -1 } },
50       4,{0,1,2,3}, {1,0,3,2},{-1}},  { Line4, "Line4", 4, 1, 1, { 0, 4 }, Line2,
51    {Tri3,       "Tri3", 2,       2,  3,  3, 1, 3,      { 0, 1 }, LineQuad, Line4Shape, Line4Shape,
52       Tri3, {0,1,2},      { 0, 1, 2, 3 },
53       Finley_Shape_Tri3,   Finley_Quad_getNodesTri,         Finley_Quad_getNumNodesTri,    4, { 0, 1, 2, 3 },
54       3,{0,1,2},    4, { 0, 1, 2, 3 },
55       3,{0,1,2}, {1,2,0},{0,2,1}},      { 1, 0, 3, 2 },
56    {Tri6,       "Tri6", 2,      2,  6,  6, 2, 3,      { -1 } },
57       Tri3, {0,1,2},  { Tri3, "Tri3", 3, 1, 1, { 0, 3 }, Tri3,
58       Finley_Shape_Tri6,   Finley_Quad_getNodesTri,         Finley_Quad_getNumNodesTri,      { 0, 1, 2 }, TriQuad, Tri3Shape, Tri3Shape,
59       6,{0,1,2,3,4,5},      { 0, 1, 2 },
60       6,{0,1,2,3,4,5}, {1,2,0,4,5,3},{0,2,1,5,4,3}},    3, { 0, 1, 2 },
61    {Tri9,       "Tri9", 2,      2,  9,  9, 3, 3,    3, { 0, 1, 2 },
62       Tri3, {0,1,2},      { 1, 2, 0 },
63       Finley_Shape_Tri9,   Finley_Quad_getNodesTri,         Finley_Quad_getNumNodesTri,      { 0, 2, 1 } },
64       9,{0,1,2,3,4,5,6,7,8},  { Tri6, "Tri6", 6, 1, 1, { 0, 6 }, Tri3,
65       9,{0,1,2,3,4,5,6,7,8}, {1,2,0,5,6,7,8,3,4},{0,2,1,8,7,6,5,4,3}},      { 0, 1, 2 }, TriQuad, Tri6Shape, Tri6Shape,
66    {Tri10, "Tri10", 2,      2, 10, 10, 3, 3,      { 0, 1, 2, 3, 4, 5 },
67       Tri3, {0,1,2},    6, { 0, 1, 2, 3, 4, 5 },
68       Finley_Shape_Tri10,  Finley_Quad_getNodesTri,         Finley_Quad_getNumNodesTri,    6, { 0, 1, 2, 3, 4, 5 },
69       10,{0,1,2,3,4,5,6,7,8,9},      { 1, 2, 0, 4, 5, 3 },
70       10,{0,1,2,3,4,5,6,7,8,9}, {1,2,0,5,6,7,8,3,4,9},{0,2,1,8,7,6,5,4,3,9}},      { 0, 2, 1, 5, 4, 3 } },
71    {Rec4, "Rec4", 2,       2,  4,  4, 1, 4,  { Tri9, "Tri9", 9, 1, 1, { 0, 9 }, Tri3,
72       Rec4, {0,1,2,3},      { 0, 1, 2 }, TriQuad, Tri9Shape, Tri9Shape,
73       Finley_Shape_Rec4,   Finley_Quad_getNodesRec,         Finley_Quad_getNumNodesRec,      { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
74       4,{0,1,2,3},    9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
75       4,{0,1,2,3}, {1,2,3,0},{0,3,2,1}},    9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
76    {Rec8,       "Rec8", 2,       2,  8,  8, 2, 4,      { 1, 2, 0, 5, 6, 7, 8, 3, 4 },
77       Rec4, {0,1,2,3},      { 0, 2, 1, 8, 7, 6, 5, 4, 3 } },
78       Finley_Shape_Rec8,   Finley_Quad_getNodesRec,         Finley_Quad_getNumNodesRec,  { Tri10, "Tri10", 10, 1, 1, { 0, 10 }, Tri3,
79       8,{0,1,2,3,4,5,6,7},      { 0, 1, 2 }, TriQuad, Tri10Shape, Tri10Shape,
80       8,{0,1,2,3,4,5,6,7}, {1,2,3,0,5,6,7,4},{0,3,2,1,7,6,5,4}},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
81    {Rec9,       "Rec9", 2,       2,  9,  9, 2, 4,    10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
82       Rec4, {0,1,2,3},    10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
83       Finley_Shape_Rec9,   Finley_Quad_getNodesRec,         Finley_Quad_getNumNodesRec,      { 1, 2, 0, 5, 6, 7, 8, 3, 4, 9 },
84       9,{0,1,2,3,4,5,6,7,8},      { 0, 2, 1, 8, 7, 6, 5, 4, 3, 9 } },
85       9,{0,1,2,3,4,5,6,7,8}, {1,2,3,0,5,6,7,4,8},{0,3,2,1,7,6,5,4,8}},  { Rec4, "Rec4", 4, 1, 1, { 0, 4 }, Rec4,
86    {Rec12,      "Rec12", 2,      2, 12, 12, 3, 4,      { 0, 1, 2, 3 }, RecQuad, Rec4Shape, Rec4Shape,
87       Rec4, {0,1,2,3},      { 0, 1, 2, 3 },
88       Finley_Shape_Rec12,  Finley_Quad_getNodesRec,         Finley_Quad_getNumNodesRec,    4, { 0, 1, 2, 3 },
89       12,{0,1,2,3,4,5,6,7,8,9,10,11},    4, { 0, 1, 2, 3 },
90       12,{0,1,2,3,4,5,6,7,8,9,10,11}, {1,2,3,0,6,7,8,9,10,11,4,5},{0,3,2,1,11,10,9,8,7,6,5,4}},      { 1, 2, 3, 0 },
91    {Rec16,      "Rec16", 2,      2, 16, 16, 3, 4,      { 0, 3, 2, 1 } },
92       Rec4, {0,1,2,3},  { Rec8, "Rec8", 8, 1, 1, { 0, 8 }, Rec4,
93       Finley_Shape_Rec16,  Finley_Quad_getNodesRec,         Finley_Quad_getNumNodesRec,      { 0, 1, 2, 3 }, RecQuad, Rec8Shape, Rec8Shape,
94       16,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},      { 0, 1, 2, 3, 4, 5, 6, 7 },
95       16,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}, {1,2,3,0,6,7,8,9,10,11,4,5,13,14,15,12},{0,3,2,1,11,10,9,8,7,6,5,4,12,15,14,13}},    8, { 0, 1, 2, 3, 4, 5, 6, 7 },
96    {Tet4,       "Tet4", 3,       3,  4,  4, 1, 4,    8, { 0, 1, 2, 3, 4, 5, 6, 7 },
97       Tet4, {0,1,2,3},      { 1, 2, 3, 0, 5, 6, 7, 4 },
98       Finley_Shape_Tet4,   Finley_Quad_getNodesTet,         Finley_Quad_getNumNodesTet,      { 0, 3, 2, 1, 7, 6, 5, 4 } },
99       4,{0,1,2,3},  { Rec9, "Rec9", 9, 1, 1, { 0, 9 }, Rec4,
100       -1,{999}, {999},{999}},      { 0, 1, 2, 3 }, RecQuad, Rec9Shape, Rec9Shape,
101    {Tet10,      "Tet10", 3,      3, 10, 10, 2, 4,      { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
102       Tet4, {0,1,2,3},    9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
103       Finley_Shape_Tet10,  Finley_Quad_getNodesTet,         Finley_Quad_getNumNodesTet,    9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
104       10,{0,1,2,3,4,5,6,7,8,9},      { 1, 2, 3, 0, 5, 6, 7, 4, 8 },
105       -1,{999}, {999},{999}},      { 0, 3, 2, 1, 7, 6, 5, 4, 8 } },
106    {Tet16,      "Tet16", 3,      3, 16, 16, 3, 4,  { Rec12, "Rec12", 12, 1, 1, { 0, 12 }, Rec4,
107       Tet4, {0,1,2,3},      { 0, 1, 2, 3 }, RecQuad, Rec12Shape, Rec12Shape,
108       Finley_Shape_Tet16,  Finley_Quad_getNodesTet,         Finley_Quad_getNumNodesTet,      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
109       16,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},    12, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
110       -1,{999}, {999},{999}},    12, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
111    {Hex8,       "Hex8", 3,       3,  8,  8, 1, 8,      { 1, 2, 3, 0, 6, 7, 8, 9, 10, 11, 4, 5 },
112       Hex8, {0,1,2,3,4,5,6,7},      { 0, 3, 2, 1, 11, 10, 9, 8, 7, 6, 5, 4 } },
113       Finley_Shape_Hex8,   Finley_Quad_getNodesHex,         Finley_Quad_getNumNodesHex,  { Rec16, "Rec16", 16, 1, 1, { 0, 16 }, Rec4,
114       8,{0,1,2,3,4,5,6,7},      { 0, 1, 2, 3 }, RecQuad, Rec16Shape, Rec16Shape,
115       -1,{999}, {999},{999}},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
116    {Hex20,      "Hex20", 3,      3, 20, 20, 2, 8,    16, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
117       Hex8, {0,1,2,3,4,5,6,7},    16, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
118       Finley_Shape_Hex20,  Finley_Quad_getNodesHex,         Finley_Quad_getNumNodesHex,      { 1, 2, 3, 0, 6, 7, 8, 9, 10, 11, 4, 5, 13, 14, 15, 12 },
119       20,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19},      { 0, 3, 2, 1, 11, 10, 9, 8, 7, 6, 5, 4, 12, 15, 14, 13 } },
120       -1,{999}, {999},{999}},  { Tet4, "Tet4", 4, 1, 1, { 0, 4 }, Tet4,
121    {Hex27,      "Hex27", 3,      3, 27, 27, 2, 8,      { 0, 1, 2, 3 }, TetQuad, Tet4Shape, Tet4Shape,
122       Hex8, {0,1,2,3,4,5,6,7},      { 0, 1, 2, 3 },
123       Finley_Shape_Hex27,  Finley_Quad_getNodesHex,         Finley_Quad_getNumNodesHex,    4, { 0, 1, 2, 3 },
124       27,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26},    4, { 0, 1, 2, 3 },
125       -1,{999}, {999},{999}},      { -1 },
126    {Hex32,      "Hex32", 3,      3, 32, 32, 3, 8,      { -1 } },
127       Hex8, {0,1,2,3,4,5,6,7},  { Tet10, "Tet10", 10, 1, 1, { 0, 10 }, Tet4,
128       Finley_Shape_Hex32,  Finley_Quad_getNodesHex,         Finley_Quad_getNumNodesHex,      { 0, 1, 2, 3 }, TetQuad, Tet10Shape, Tet10Shape,
129       32,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
130       -1,{999}, {999},{999}},    10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
131    {Line2Face,  "Line2Face", 0,  1,  2,  2, 1, 1,    10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
132       Line2Face, {0,1},      { -1 },
133       Finley_Shape_Line2,  Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,      { -1 } },
134       1,{0},  { Tet16, "Tet16", 16, 1, 1, { 0, 16 }, Tet4,
135       1,{0}, {0,1,2},{-1}},      { 0, 1, 2, 3 }, TetQuad, Tet16Shape, Tet16Shape,
136    {Line3Face,  "Line3Face", 0,  1,  3,  3, 2, 1,      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
137       Line2Face, {0,1},    16, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
138       Finley_Shape_Line3,  Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,    16, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
139       1,{0},      { -1 },
140       1,{0}, {0,1,2},{-1}},      { -1 } },
141    {Line4Face,  "Line4Face", 0,  1,  4,  4, 3, 1,  { Hex8, "Hex8", 8, 1, 1, { 0, 8 }, Hex8,
142       Line2Face, {0,1},      { 0, 1, 2, 3, 4, 5, 6, 7 }, HexQuad, Hex8Shape, Hex8Shape,
143       Finley_Shape_Line4,  Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,      { 0, 1, 2, 3, 4, 5, 6, 7 },
144       1,{0},    8, { 0, 1, 2, 3, 4, 5, 6, 7 },
145       1,{0}, {0,1,2},{-1}},    8, { 0, 1, 2, 3, 4, 5, 6, 7 },
146    {Tri3Face,   "Tri3Face", 1,   2,  3,  3, 1, 2,      { -1 },
147       Tri3Face, {0,1,2},      { -1 } },
148       Finley_Shape_Tri3,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,  { Hex20, "Hex20", 20, 1, 1, { 0, 20 }, Hex8,
149       2,{0,1},      { 0, 1, 2, 3, 4, 5, 6, 7 }, HexQuad, Hex20Shape, Hex20Shape,
150       2,{0,1}, {1,0,2},{-1}},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
151    {Tri6Face,   "Tri6Face", 1,   2,  6,  6, 2, 2,    20, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
152       Tri3Face, {0,1,2},    20, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
153       Finley_Shape_Tri6,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { -1 },
154       3,{0,1,3},      { -1 } },
155       3,{0,1,3}, {1,0,2,3,5,4},{-1}},  { Hex27, "Hex27", 27, 1, 1, { 0, 27 }, Hex8,
156    {Tri9Face,   "Tri9Face", 1,   2,  9,  9, 3, 2,      { 0, 1, 2, 3, 4, 5, 6, 7 }, HexQuad, Hex27Shape, Hex27Shape,
157       Tri3Face, {0,1,2},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 },
158       Finley_Shape_Tri9,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,    27, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 },
159       4,{0,1,3,4},    27, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 },
160       4,{0,1,3,4}, {1,0,2,4,3,7,8,6,5},{-1}},      { -1 },
161    {Tri10Face,  "Tri10Face", 1,  2, 10, 10, 3, 2,      { -1 } },
162       Tri3Face, {0,1,2},  { Hex32, "Hex32", 32, 1, 1, { 0, 32 }, Hex8,
163       Finley_Shape_Tri10,  Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { 0, 1, 2, 3, 4, 5, 6, 7 }, HexQuad, Hex32Shape, Hex32Shape,
164       4,{0,1,3,4},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 },
165       4,{0,1,3,4}, {1,0,2,4,3,7,8,6,5,9},{-1}},    32, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 },
166    {Rec4Face,   "Rec4Face", 1,   2,  4,  4, 1, 2,    32, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 },
167       Rec4Face, {0,1,2,3},      { -1 },
168       Finley_Shape_Rec4,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { -1 } },
169       2,{0,1},  { Line2Face, "Line2Face", 2, 1, 1, { 0, 2 }, Line2Face,
170       2,{0,1}, {1,0,3,2},{-1}},      { 0, 1 }, PointQuad, Line2Shape, Line2Shape,
171    {Rec8Face,   "Rec8Face", 1,   2,  8,  8, 2, 2,      { 0, 1 },
172       Rec4Face, {0,1,2,3},    1, { 0 },
173       Finley_Shape_Rec8,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,    1, { 0 },
174       3,{0,1,4},      { 0, 1, 2 },
175       3,{0,1,4}, {1,0,3,2,4,7,6,5},{-1}},      { -1 } },
176    {Rec9Face,   "Rec9Face", 1,   2,  9,  9, 2, 2,  { Line3Face, "Line3Face", 3, 1, 1, { 0, 3 }, Line2Face,
177       Rec4Face, {0,1,2,3},      { 0, 1 }, PointQuad, Line3Shape, Line3Shape,
178       Finley_Shape_Rec9,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { 0, 1, 2 },
179       3,{0,1,4},    1, { 0 },
180       3,{0,1,4}, {1,0,3,2,4,7,6,5,8},{-1}},    1, { 0 },
181    {Rec12Face,  "Rec12Face", 1,  2, 12, 12, 3, 2,      { 0, 1, 2 },
182       Rec4Face, {0,1,2,3},      { -1 } },
183       Finley_Shape_Rec12,  Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,  { Line4Face, "Line4Face", 4, 1, 1, { 0, 4 }, Line2Face,
184       4,{0,1,4,5},      { 0, 1 }, PointQuad, Line4Shape, Line4Shape,
185       4,{0,1,4,5}, {1,0,3,2,5,4,11,10,9,8,7,6},{-1}},      { 0, 1, 2, 3 },
186    {Rec16Face,  "Rec16Face", 1,  2, 16, 16, 3, 2,    1, { 0 },
187       Rec4Face, {0,1,2,3},    1, { 0 },
188       Finley_Shape_Rec16,  Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { 0, 1, 2 },
189       4,{0,1,4,5},      { -1 } },
190       4,{0,1,4,5}, {1,0,3,2,5,4,11,10,9,8,7,6,13,12,15,14},{-1}},  { Tri3Face, "Tri3Face", 3, 1, 1, { 0, 3 }, Tri3Face,
191    {Tet4Face,   "Tet4Face", 2,   3,  4,  4, 1, 3,      { 0, 1, 2 }, LineQuad, Tri3Shape, Tri3Shape,
192       Tet4Face, {0,1,2,3},      { 0, 1, 2 },
193       Finley_Shape_Tet4,   Finley_Quad_getNodesTriOnFace,   Finley_Quad_getNumNodesTri,    2, { 0, 1 },
194       3,{0,1,2},    2, { 0, 1 },
195       3,{0,1,2}, {1,2,0,3},{0,2,1,3}},      { 1, 0, 2 },
196    {Tet10Face,  "Tet10Face", 2,  3, 10, 10, 2, 3,      { -1 } },
197       Tet4Face, {0,1,2,3},  { Tri6Face, "Tri6Face", 6, 1, 1, { 0, 6 }, Tri3Face,
198       Finley_Shape_Tet10,  Finley_Quad_getNodesTriOnFace,   Finley_Quad_getNumNodesTri,      { 0, 1, 2 }, LineQuad, Tri6Shape, Tri6Shape,
199       4,{0,1,2,4,5,6},      { 0, 1, 2, 3, 4, 5 },
200       4,{0,1,2,4,5,6}, {1,2,0,3,5,6,4,8,9,7},{0,2,1,3,6,7,9,8}},    3, { 0, 1, 3 },
201    {Tet16Face,  "Tet16Face", 2,  3, 16, 16, 3, 3,    3, { 0, 1, 3 },
202       Tet4Face, {0,1,2,3},      { 1, 0, 2, 3, 5, 4 },
203       Finley_Shape_Tet16,  Finley_Quad_getNodesTriOnFace,   Finley_Quad_getNumNodesTri,      { -1 } },
204       5,{0,1,2,4,5,6,7,8,9},  { Tri9Face, "Tri9Face", 9, 1, 1, { 0, 9 }, Tri3Face,
205       5,{0,1,2,4,5,6,7,8,9}, {1,2,0,3,6,7,8,9,4,5,11,12,10,14,15,13},{0,2,1,3,9,8,7,6,5,4,9,8,7,6,10,12,11,13,15,14}},      { 0, 1, 2 }, LineQuad, Tri9Shape, Tri9Shape,
206    {Hex8Face,   "Hex8Face", 2,   3,  8,  8, 1, 4,      { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
207       Hex8Face, {0,1,2,3,4,5,6,7},    4, { 0, 1, 3, 4 },
208       Finley_Shape_Hex8,   Finley_Quad_getNodesRecOnFace,   Finley_Quad_getNumNodesRec,    4, { 0, 1, 3, 4 },
209       4,{0,1,2,3},      { 1, 0, 2, 4, 3, 7, 8, 6, 5 },
210       4,{0,1,2,3}, {1,2,3,0,5,6,7,4},{0,3,2,1,4,7,6,5}},      { -1 } },
211    {Hex20Face,  "Hex20Face", 2,  3, 20, 20, 2, 4,  { Tri10Face, "Tri10Face", 10, 1, 1, { 0, 10 }, Tri3Face,
212       Hex8Face, {0,1,2,3,4,5,6,7},      { 0, 1, 2 }, LineQuad, Tri10Shape, Tri10Shape,
213       Finley_Shape_Hex20,  Finley_Quad_getNodesRecOnFace,   Finley_Quad_getNumNodesRec,      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
214       8,{0,1,2,3,8,9,10,11},    4, { 0, 1, 3, 4 },
215       8,{0,1,2,3,8,9,10,11}, {1,2,3,0,5,6,7,4,9,10,11,8,13,14,15,12,17,18,19,16},{0,3,2,1,4,7,6,5,11,10,9,8,12,15,14,13,19,18,17,16}},    4, { 0, 1, 3, 4 },
216    {Hex27Face,  "Hex27Face", 2,  3, 27, 27, 2, 4,      { 1, 0, 2, 4, 3, 7, 8, 6, 5, 9 },
217       Hex8Face, {0,1,2,3,4,5,6,7},      { -1 } },
218       Finley_Shape_Hex27,  Finley_Quad_getNodesRecOnFace,   Finley_Quad_getNumNodesRec,  { Rec4Face, "Rec4Face", 4, 1, 1, { 0, 4 }, Rec4Face,
219       9,{0,1,2,3,8,9,10,11,20},      { 0, 1, 2, 3 }, LineQuad, Rec4Shape, Rec4Shape,
220       9,{0,1,2,3,8,9,10,11,20}, {1,2,3,0,5,6,7,4,9,10,11,8,13,14,15,12,17,18,19,16,20,22,23,24,22,25,26},{0,3,2,1,4,7,6,5,11,10,9,8,12,15,14,13,19,18,17,16,20,24,23,22,21,25,26}},      { 0, 1, 2, 3 },
221    {Hex32Face,  "Hex32Face", 2,  3, 32, 32, 3, 4,    2, { 0, 1 },
222       Hex8Face, {0,1,2,3,4,5,6,7},    2, { 0, 1 },
223       Finley_Shape_Hex32,  Finley_Quad_getNodesRecOnFace,   Finley_Quad_getNumNodesRec,      { 1, 0, 3, 2 },
224       12,{0,1,2,3,8,9,10,11,12,13,14,15},      { -1 } },
225       12,{0,1,2,3,8,9,10,11,12,13,14,15},  { Rec8Face, "Rec8Face", 8, 1, 1, { 0, 8 }, Rec4Face,
226       {1,2,3,0,5,6,7,4,10,11,12,13,14,15,8,9,17,18,19,16,21,22,23,20,26,27,28,29,30,31,34,25},      { 0, 1, 2, 3 }, LineQuad, Rec8Shape, Rec8Shape,
227                     {0,3,2,1,4,7,6,5,15,14,13,12,11,10,9,8,16,19,18,17,20,23,22,21,31,30,29,28,27,26,25,24}},      { 0, 1, 2, 3, 4, 5, 6, 7 },
228      3, { 0, 1, 4 },
229    {Point1_Contact, "Point1_Contact", 0, 0,  2,  1, 1, 1,    3, { 0, 1, 4 },
230       Point1_Contact, {0,1},      { 1, 0, 3, 2, 4, 7, 6, 5 },
231       Finley_Shape_Point1, Finley_Quad_getNodesPoint, Finley_Quad_getNumNodesPoint,      { -1 } },
232       1,{0},  { Rec9Face, "Rec9Face", 9, 1, 1, { 0, 9 }, Rec4Face,
233       -1,{999}, {999},{999}},      { 0, 1, 2, 3 }, LineQuad, Rec9Shape, Rec9Shape,
234    {Line2_Contact,  "Line2_Contact", 1,  1,  4,  2, 1, 2,      { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
235       Line2_Contact, {0,1,2,3},    3, { 0, 1, 4 },
236       Finley_Shape_Line2,   Finley_Quad_getNodesLine,  Finley_Quad_getNumNodesLine,    3, { 0, 1, 4 },
237       2,{0,1},      { 1, 0, 3, 2, 4, 7, 6, 5, 8 },
238       -1,{999}, {999},{999}},      { -1 } },
239    {Line3_Contact,  "Line3_Contact", 1,  1,  6,  3, 2, 2,  { Rec12Face, "Rec12Face", 12, 1, 1, { 0, 12 }, Rec4Face,
240       Line2_Contact, {0,1,3,4},      { 0, 1, 2, 3 }, LineQuad, Rec12Shape, Rec12Shape,
241       Finley_Shape_Line3,   Finley_Quad_getNodesLine,  Finley_Quad_getNumNodesLine,      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
242       3,{0,1,2},    4, { 0, 1, 4, 5 },
243       -1,{999}, {999},{999}},    4, { 0, 1, 4, 5 },
244    {Line4_Contact,  "Line4_Contact", 1,  1,  8,  4, 3, 2,      { 1, 0, 3, 2, 5, 4, 11, 10, 9, 8, 7, 6 },
245       Line2_Contact, {0,1,4,5},      { -1 } },
246       Finley_Shape_Line4,   Finley_Quad_getNodesLine,  Finley_Quad_getNumNodesLine,  { Rec16Face, "Rec16Face", 16, 1, 1, { 0, 16 }, Rec4Face,
247       4,{0,1,2,3},      { 0, 1, 2, 3 }, LineQuad, Rec16Shape, Rec16Shape,
248       -1,{999}, {999},{999}},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
249    {Tri3_Contact,   "Tri3_Contact",  2,  2,  6,  3, 1, 3,    4, { 0, 1, 4, 5 },
250       Tri3_Contact, {0,1,2,3,4,5},    4, { 0, 1, 4, 5 },
251       Finley_Shape_Tri3,     Finley_Quad_getNodesTri,   Finley_Quad_getNumNodesTri,      { 1, 0, 3, 2, 5, 4, 11, 10, 9, 8, 7, 6, 13, 12, 15, 14 },
252       3,{0,1,2},      { -1 } },
253       -1,{999}, {999},{999}},  { Tet4Face, "Tet4Face", 4, 1, 1, { 0, 4 }, Tet4Face,
254    {Tri6_Contact,   "Tri6_Contact", 2,   2, 12,  6, 2, 3,      { 0, 1, 2, 3 }, TriQuad, Tet4Shape, Tet4Shape,
255       Tri3_Contact, {0,1,2,6,7,8},      { 0, 1, 2, 3 },
256       Finley_Shape_Tri6,     Finley_Quad_getNodesTri,   Finley_Quad_getNumNodesTri,    3, { 0, 1, 2 },
257       6,{0,1,2,3,4,5},    4, { 0, 1, 2, 3 },
258       -1,{999}, {999},{999}},      { 1, 2, 0, 3 },
259    {Tri9_Contact,   "Tri9_Contact", 2,   2, 18,  9, 3, 3,      { 0, 2, 1, 3 } },
260       Tri3_Contact, {0,1,2,9,10,11},  { Tet10Face, "Tet10Face", 10, 1, 1, { 0, 10 }, Tet4Face,
261       Finley_Shape_Tri9,     Finley_Quad_getNodesTri,   Finley_Quad_getNumNodesTri,      { 0, 1, 2, 3 }, TriQuad, Tet10Shape, Tet10Shape,
262       9,{0,1,2,3,4,5,6,7,8},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
263       -1,{999}, {999},{999}},    6, { 0, 1, 2, 4, 5, 6 },
264    {Tri10_Contact,  "Tri10_Contact", 2,  2, 20, 10, 3, 3,    6, { 0, 1, 2, 4, 5, 6 },
265       Tri3_Contact, {0,1,2,10,11,12},      { 1, 2, 0, 3, 5, 6, 4, 8, 9, 7 },
266       Finley_Shape_Tri10,    Finley_Quad_getNodesTri,   Finley_Quad_getNumNodesTri,      { 0, 2, 1, 3, 6, 7, 9, 8 } },
267       10,{0,1,2,3,4,5,6,7,8,9},  { Tet16Face, "Tet16Face", 16, 1, 1, { 0, 16 }, Tet4Face,
268       -1,{999}, {999},{999}},      { 0, 1, 2, 3 }, TriQuad, Tet16Shape, Tet16Shape,
269    {Rec4_Contact,   "Rec4_Contact", 2,   2,  8,  4, 1, 4,      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
270       Rec4_Contact, {0,1,2,3,4,5,6,7},    9, { 0, 1, 2, 4, 5, 6, 7, 8, 9 },
271       Finley_Shape_Rec4,     Finley_Quad_getNodesRec,   Finley_Quad_getNumNodesRec,    9, { 0, 1, 2, 4, 5, 6, 7, 8, 9 },
272       4,{0,1,2,3},      { 1, 2, 0, 3, 6, 7, 8, 9, 4, 5, 11, 12, 10, 14, 15, 13 },
273       -1,{999}, {999},{999}},      { 0, 2, 1, 3, 9, 8, 7, 6, 5, 4, 9, 8, 7, 6, 10, 12, 11, 13, 15, 14 } },
274    {Rec8_Contact,   "Rec8_Contact", 2,   2, 16,  8, 2, 4,  { Hex8Face, "Hex8Face", 8, 1, 1, { 0, 8 }, Hex8Face,
275       Rec4_Contact, {0,1,2,3,8,9,10,11},      { 0, 1, 2, 3, 4, 5, 6, 7 }, RecQuad, Hex8Shape, Hex8Shape,
276       Finley_Shape_Rec8,     Finley_Quad_getNodesRec,   Finley_Quad_getNumNodesRec,      { 0, 1, 2, 3, 4, 5, 6, 7 },
277       8,{0,1,2,3,4,5,6,7},    4, { 0, 1, 2, 3 },
278       -1,{999}, {999},{999}},    4, { 0, 1, 2, 3 },
279    {Rec9_Contact,   "Rec9_Contact", 2,   2, 18,  9, 2, 4,      { 1, 2, 3, 0, 5, 6, 7, 4 },
280       Rec4_Contact, {0,1,2,3,9,10,11,12},      { 0, 3, 2, 1, 4, 7, 6, 5 } },
281       Finley_Shape_Rec9,     Finley_Quad_getNodesRec,   Finley_Quad_getNumNodesRec,  { Hex20Face, "Hex20Face", 20, 1, 1, { 0, 20 }, Hex8Face,
282       9,{0,1,2,3,4,5,6,7,8},      { 0, 1, 2, 3, 4, 5, 6, 7 }, RecQuad, Hex20Shape, Hex20Shape,
283       -1,{999}, {999},{999}},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
284    {Rec12_Contact,  "Rec12_Contact", 2,  2, 24, 12, 3, 4,    8, { 0, 1, 2, 3, 8, 9, 10, 11 },
285       Rec4_Contact, {0,1,2,3,12,13,14,15},    8, { 0, 1, 2, 3, 8, 9, 10, 11 },
286       Finley_Shape_Rec12,    Finley_Quad_getNodesRec,   Finley_Quad_getNumNodesRec,      { 1, 2, 3, 0, 5, 6, 7, 4, 9, 10, 11, 8, 13, 14, 15, 12, 17, 18, 19, 16 },
287       12,{0,1,2,3,4,5,6,7,8,9,10,11},      { 0, 3, 2, 1, 4, 7, 6, 5, 11, 10, 9, 8, 12, 15, 14, 13, 19, 18, 17, 16 } },
288       -1,{999}, {999},{999}},  { Hex27Face, "Hex27Face", 27, 1, 1, { 0, 27 }, Hex8Face,
289    {Rec16_Contact,  "Rec16_Contact", 2,  2, 32, 16, 3, 4,      { 0, 1, 2, 3, 4, 5, 6, 7 }, RecQuad, Hex27Shape, Hex27Shape,
290       Rec4_Contact, {0,1,2,3,16,17,18,19},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 },
291       Finley_Shape_Rec16,    Finley_Quad_getNodesRec,   Finley_Quad_getNumNodesRec,    9, { 0, 1, 2, 3, 8, 9, 10, 11, 20 },
292       16,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},    9, { 0, 1, 2, 3, 8, 9, 10, 11, 20 },
293       -1,{999}, {999},{999}},      { 1, 2, 3, 0, 5, 6, 7, 4, 9, 10, 11, 8, 13, 14, 15, 12, 17, 18, 19, 16, 20, 22, 23, 24, 22, 25, 26 },
294    {Line2Face_Contact,  "Line2Face_Contact", 0,  1,  4,  2, 1, 1,      { 0, 3, 2, 1, 4, 7, 6, 5, 11, 10, 9, 8, 12, 15, 14, 13, 19, 18, 17, 16, 20, 24, 23, 22, 21, 25, 26 } },
295       Line2Face_Contact,  {0,1,2,3},  { Hex32Face, "Hex32Face", 32, 1, 1, { 0, 32 }, Hex8Face,
296       Finley_Shape_Line2,  Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,      { 0, 1, 2, 3, 4, 5, 6, 7 }, RecQuad, Hex32Shape, Hex32Shape,
297       1,{0},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 },
298       -1,{999}, {999},{999}},    12, { 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15 },
299    {Line3Face_Contact,  "Line3Face_Contact", 0,  1,  6,  3, 2, 1,    12, { 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15 },
300       Line2Face_Contact, {0,1,3,4},      { 1, 2, 3, 0, 5, 6, 7, 4, 10, 11, 12, 13, 14, 15, 8, 9, 17, 18, 19, 16, 21, 22, 23, 20, 26, 27, 28, 29, 30, 31, 34, 25 },
301       Finley_Shape_Line3,  Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,      { 0, 3, 2, 1, 4, 7, 6, 5, 15, 14, 13, 12, 11, 10, 9, 8, 16, 19, 18, 17, 20, 23, 22, 21, 31, 30, 29, 28, 27, 26, 25, 24 } },
302       1,{0},  { Point1_Contact, "Point1_Contact", 2, 1, 2, { 0, 1, 2 }, Point1_Contact,
303       -1,{999}, {999},{999}},      { 0, 1 }, PointQuad, Point1Shape, Point1Shape,
304    {Line4Face_Contact,  "Line4Face_Contact", 0,  1,  8,  4, 3, 1,      { 0, 1 },
305       Line2Face_Contact, {0,1,4,5},    1, { 0 },
306       Finley_Shape_Line4,  Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,    -1, { -1 },
307       1,{0},      { -1 },
308       -1,{999}, {999},{999}},      { -1 } },
309    {Tri3Face_Contact,   "Tri3Face_Contact", 1,   2,  6,  3, 1, 2,  { Line2_Contact, "Line2_Contact", 4, 1, 2, { 0, 2, 4 }, Line2_Contact,
310       Tri3Face_Contact, {0,1,2,3,4,5},      { 0, 1, 2, 3 }, LineQuad, Line2Shape, Line2Shape,
311       Finley_Shape_Tri3,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { 0, 1, 2, 3 },
312       2,{0,1},    2, { 0, 1 },
313       -1,{999}, {999},{999}},    -1, { -1 },
314    {Tri6Face_Contact,   "Tri6Face_Contact", 1,   2,  12,  6, 2, 2,      { -1 },
315       Tri3Face_Contact, {0,1,2,6,7,8},      { -1 } },
316       Finley_Shape_Tri6,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,  { Line3_Contact, "Line3_Contact", 6, 1, 2, { 0, 3, 6 }, Line2_Contact,
317       3,{0,1,3},      { 0, 1, 3, 4 }, LineQuad, Line3Shape, Line3Shape,
318       -1,{999}, {999},{999}},      { 0, 1, 2, 3, 4, 5 },
319    {Tri9Face_Contact,   "Tri9Face_Contact", 1,   2,  18,  9, 3, 2,    3, { 0, 1, 2 },
320       Tri3Face_Contact, {0,1,2,9,10,11},    -1, { -1 },
321       Finley_Shape_Tri9,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { -1 },
322       4,{0,1,3,4},      { -1 } },
323       -1,{999}, {999},{999}},  { Line4_Contact, "Line4_Contact", 8, 1, 2, { 0, 4, 8 }, Line2_Contact,
324    {Tri10Face_Contact,  "Tri10Face_Contact", 1,  2, 20, 10, 3, 2,      { 0, 1, 4, 5 }, LineQuad, Line4Shape, Line4Shape,
325       Tri3Face_Contact, {0,1,2,10,11,12},      { 0, 1, 2, 3, 4, 5, 6, 7 },
326       Finley_Shape_Tri10,  Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,    4, { 0, 1, 2, 3 },
327       4,{0,1,3,4},    -1, { -1 },
328       -1,{999}, {999},{999}},      { -1 },
329    {Rec4Face_Contact,   "Rec4Face_Contact",  1,  2,  8,  4, 1, 2,      { -1 } },
330       Rec4Face_Contact, {0,1,2,3,4,5,6,7},  { Tri3_Contact, "Tri3_Contact", 6, 1, 2, { 0, 3, 6 }, Tri3_Contact,
331       Finley_Shape_Rec4,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { 0, 1, 2, 3, 4, 5 }, TriQuad, Tri3Shape, Tri3Shape,
332       2,{0,1},      { 0, 1, 2, 3, 4, 5 },
333       -1,{999}, {999},{999}},    3, { 0, 1, 2 },
334    {Rec8Face_Contact,   "Rec8Face_Contact", 1,   2, 16,  8, 2, 2,    -1, { -1 },
335       Rec4Face_Contact, {0,1,2,3,8,9,10,11},      { -1 },
336       Finley_Shape_Rec8,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { -1 } },
337       3,{0,1,4},  { Tri6_Contact, "Tri6_Contact", 12, 1, 2, { 0, 6, 12 }, Tri3_Contact,
338       -1,{999}, {999},{999}},      { 0, 1, 2, 6, 7, 8 }, TriQuad, Tri6Shape, Tri6Shape,
339    {Rec9Face_Contact,   "Rec9Face_Contact", 1,   2, 18,  9, 2, 2,      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
340       Rec4Face_Contact, {0,1,2,3,9,10,11,12},    6, { 0, 1, 2, 3, 4, 5 },
341       Finley_Shape_Rec9,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,    -1, { -1 },
342       3,{0,1,4},      { -1 },
343       -1,{999}, {999},{999}},      { -1 } },
344    {Rec12Face_Contact,  "Rec12Face_Contact", 1,  2, 24, 12, 3, 2,  { Tri9_Contact, "Tri9_Contact", 18, 1, 2, { 0, 9, 18 }, Tri3_Contact,
345       Rec4Face_Contact, {0,1,2,3,12,13,14,15},      { 0, 1, 2, 9, 10, 11 }, TriQuad, Tri9Shape, Tri9Shape,
346       Finley_Shape_Rec12,  Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 },
347       4,{0,1,4,5},    9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
348       -1,{999}, {999},{999}},    -1, { -1 },
349    {Rec16Face_Contact,  "Rec16Face_Contact", 1,  2, 32, 16, 3, 2,      { -1 },
350       Rec4Face_Contact, {0,1,2,3,16,17,18,19},      { -1 } },
351       Finley_Shape_Rec16,  Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,  { Tri10_Contact, "Tri10_Contact", 20, 1, 2, { 0, 10, 20 }, Tri3_Contact,
352       4,{0,1,4,5},      { 0, 1, 2, 10, 11, 12 }, TriQuad, Tri10Shape, Tri10Shape,
353       -1,{999}, {999},{999}},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
354    {Tet4Face_Contact,   "Tet4Face_Contact",  2,  3,  8,  4, 1, 3,    10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
355       Tet4Face_Contact, {0,1,2,3,4,5,6,7},    -1, { -1 },
356       Finley_Shape_Tet4,   Finley_Quad_getNodesTriOnFace,   Finley_Quad_getNumNodesTri,      { -1 },
357       3,{0,1,2},      { -1 } },
358       -1,{999}, {999},{999}},  { Rec4_Contact, "Rec4_Contact", 8, 1, 2, { 0, 4, 8 }, Rec4_Contact,
359    {Tet10Face_Contact,  "Tet10Face_Contact", 2,  3, 20, 10, 2, 3,      { 0, 1, 2, 3, 4, 5, 6, 7 }, RecQuad, Rec4Shape, Rec4Shape,
360       Tet4Face_Contact, {0,1,2,3,10,11,12,13},      { 0, 1, 2, 3, 4, 5, 6, 7 },
361       Finley_Shape_Tet10,  Finley_Quad_getNodesTriOnFace,   Finley_Quad_getNumNodesTri,    4, { 0, 1, 2, 3 },
362       4,{0,1,2,4,5,6},    -1, { -1 },
363       -1,{999}, {999},{999}},      { -1 },
364    {Tet16Face_Contact,  "Tet16Face_Contact", 2,  3, 32, 16, 3, 3,      { -1 } },
365       Tet4Face_Contact, {0,1,2,3,16,17,18,19},  { Rec8_Contact, "Rec8_Contact", 16, 1, 2, { 0, 8, 16 }, Rec4_Contact,
366       Finley_Shape_Tet16,  Finley_Quad_getNodesTriOnFace,   Finley_Quad_getNumNodesTri,      { 0, 1, 2, 3, 8, 9, 10, 11 }, RecQuad, Rec8Shape, Rec8Shape,
367       5,{0,1,2,4,5,6,7,8,9},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
368       -1,{999}, {999},{999}},    8, { 0, 1, 2, 3, 4, 5, 6, 7 },
369    {Hex8Face_Contact,   "Hex8Face_Contact", 2,   3, 16,  8, 1, 4,    -1, { -1 },
370       Hex8Face_Contact, {0,1,2,3,4,5,6,7, 8,9,10,11,12,13,14,15},      { -1 },
371       Finley_Shape_Hex8,   Finley_Quad_getNodesRecOnFace,   Finley_Quad_getNumNodesRec,      { -1 } },
372       4,{0,1,2,3},  { Rec9_Contact, "Rec9_Contact", 18, 1, 2, { 0, 9, 18 }, Rec4_Contact,
373       -1,{999}, {999},{999}},      { 0, 1, 2, 3, 9, 10, 11, 12 }, RecQuad, Rec9Shape, Rec9Shape,
374    {Hex20Face_Contact,  "Hex20Face_Contact", 2,  3, 40, 20, 2, 4,      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 },
375       Hex8Face_Contact, {0,1,2,3,4,5,6,7, 20,21,22,23,24,25,26,27},    9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
376       Finley_Shape_Hex20,  Finley_Quad_getNodesRecOnFace,   Finley_Quad_getNumNodesRec,    -1, { -1 },
377       8,{0,1,2,3,8,9,10,11},      { -1 },
378       -1,{999}, {999},{999}},      { -1 } },
379    {Hex27Face_Contact,  "Hex27Face_Contact", 2,  3, 54, 27, 2, 4,  { Rec12_Contact, "Rec12_Contact", 24, 1, 2, { 0, 12, 24 }, Rec4_Contact,
380       Hex8Face_Contact, {0,1,2,3,4,5,6,7, 27,28,29,30,31,32,33,34},      { 0, 1, 2, 3, 12, 13, 14, 15 }, RecQuad, Rec12Shape, Rec12Shape,
381       Finley_Shape_Hex27,  Finley_Quad_getNodesRecOnFace,   Finley_Quad_getNumNodesRec,      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 },
382       9,{0,1,2,3,8,9,10,11,20},    12, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
383       -1,{999}, {999},{999}},    -1, { -1 },
384    {Hex32Face_Contact,  "Hex32Face_Contact", 2,  3, 64, 32, 3, 4,      { -1 },
385       Hex8Face_Contact, {0,1,2,3,4,5,6,7, 32,33,34,35,36,37,38,39},      { -1 } },
386       Finley_Shape_Hex32,  Finley_Quad_getNodesRecOnFace,   Finley_Quad_getNumNodesRec,  { Rec16_Contact, "Rec16_Contact", 32, 1, 2, { 0, 16, 32 }, Rec4_Contact,
387       12,{0,1,2,3,8,9,10,11,12,13,14,15},      { 0, 1, 2, 3, 16, 17, 18, 19 }, RecQuad, Rec16Shape, Rec16Shape,
388       -1,{999}, {999},{999}},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 },
389      16, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
390    {Line3Macro, "Line3Macro", 1,      1,  3,  3, 2, 2,    -1, { -1 },
391       Line2, {0,1},      { -1 },
392       Finley_Shape_Line3,  Finley_Quad_getNodesLine,        Finley_Quad_getNumNodesLine,      { -1 } },
393       3,{0,1,2},  { Line2Face_Contact, "Line2Face_Contact", 4, 1, 2, { 0, 2, 4 }, Line2Face_Contact,
394       3,{0,1,2}, {1,0,2},{-1}},      { 0, 1, 2, 3 }, PointQuad, Line2Shape, Line2Shape,
395        { 0, 1, 2, 3 },
396    {Tri6Macro,       "Tri6Macro", 2,      2,  6,  6, 2, 3,    1, { 0 },
397       Tri3, {0,1,2},    -1, { -1 },
398       Finley_Shape_Tri6,   Finley_Quad_getNodesTri,         Finley_Quad_getNumNodesTri,      { -1 },
399       6,{0,1,2,3,4,5},      { -1 } },
400       6,{0,1,2,3,4,5}, {1,2,0,4,5,3},{0,2,1,5,4,3}},  { Line3Face_Contact, "Line3Face_Contact", 6, 1, 2, { 0, 3, 6 }, Line2Face_Contact,
401        { 0, 1, 3, 4 }, PointQuad, Line3Shape, Line3Shape,
402    {Rec9Macro,       "Rec9Macro", 2,       2,  9,  9, 2, 4,      { 0, 1, 2, 3, 4, 5 },
403       Rec4, {0,1,2,3},    1, { 0 },
404       Finley_Shape_Rec9,   Finley_Quad_getNodesRec,         Finley_Quad_getNumNodesRec,    -1, { -1 },
405       9,{0,1,2,3,4,5,6,7,8},      { -1 },
406       9,{0,1,2,3,4,5,6,7,8}, {1,2,3,0,5,6,7,4,8},{0,3,2,1,7,6,5,4,8}},      { -1 } },
407    { Line4Face_Contact, "Line4Face_Contact", 8, 1, 2, { 0, 4, 8 }, Line2Face_Contact,
408    {Tet10Macro,      "Tet10Macro", 3,      3, 10, 10, 2, 4,      { 0, 1, 4, 5 }, PointQuad, Line4Shape, Line4Shape,
409       Tet4, {0,1,2,3},      { 0, 1, 2, 3, 4, 5, 6, 7 },
410       Finley_Shape_Tet10,  Finley_Quad_getNodesTet,         Finley_Quad_getNumNodesTet,    1, { 0 },
411       10,{0,1,2,3,4,5,6,7,8,9},    -1, { -1 },
412       -1,{999}, {999},{999}},      { -1 },
413        { -1 } },
414    {Hex27Macro,      "Hex27Macro", 3,      3, 27, 27, 2, 8,  { Tri3Face_Contact, "Tri3Face_Contact", 6, 1, 2, { 0, 3, 6 }, Tri3Face_Contact,
415       Hex8, {0,1,2,3,4,5,6,7},      { 0, 1, 2, 3, 4, 5 }, LineQuad, Tri3Shape, Tri3Shape,
416       Finley_Shape_Hex27,  Finley_Quad_getNodesHex,         Finley_Quad_getNumNodesHex,      { 0, 1, 2, 3, 4, 5 },
417       27,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26},    2, { 0, 1 },
418       -1,{999}, {999},{999}},    -1, { -1 },
419        { -1 },
420        { -1 } },
421    { Tri6Face_Contact, "Tri6Face_Contact", 12, 1, 2, { 0, 6, 12 }, Tri3Face_Contact,
422        { 0, 1, 2, 6, 7, 8 }, LineQuad, Tri6Shape, Tri6Shape,
423        { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
424      3, { 0, 1, 3 },
425      -1, { -1 },
426        { -1 },
427        { -1 } },
428    { Tri9Face_Contact, "Tri9Face_Contact", 18, 1, 2, { 0, 9, 18 }, Tri3Face_Contact,
429        { 0, 1, 2, 9, 10, 11 }, LineQuad, Tri9Shape, Tri9Shape,
430        { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 },
431      4, { 0, 1, 3, 4 },
432      -1, { -1 },
433        { -1 },
434        { -1 } },
435    { Tri10Face_Contact, "Tri10Face_Contact", 20, 1, 2, { 0, 10, 20 }, Tri3Face_Contact,
436        { 0, 1, 2, 10, 11, 12 }, LineQuad, Tri10Shape, Tri10Shape,
437        { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
438      4, { 0, 1, 3, 4 },
439      -1, { -1 },
440        { -1 },
441        { -1 } },
442    { Rec4Face_Contact, "Rec4Face_Contact", 8, 1, 2, { 0, 4, 8 }, Rec4Face_Contact,
443        { 0, 1, 2, 3, 4, 5, 6, 7 }, LineQuad, Rec4Shape, Rec4Shape,
444        { 0, 1, 2, 3, 4, 5, 6, 7 },
445      2, { 0, 1 },
446      -1, { -1 },
447        { -1 },
448        { -1 } },
449    { Rec8Face_Contact, "Rec8Face_Contact", 16, 1, 2, { 0, 8, 16 }, Rec4Face_Contact,
450        { 0, 1, 2, 3, 8, 9, 10, 11 }, LineQuad, Rec8Shape, Rec8Shape,
451        { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
452      3, { 0, 1, 4 },
453      -1, { -1 },
454        { -1 },
455        { -1 } },
456    { Rec9Face_Contact, "Rec9Face_Contact", 18, 1, 2, { 0, 9, 18 }, Rec4Face_Contact,
457        { 0, 1, 2, 3, 9, 10, 11, 12 }, LineQuad, Rec9Shape, Rec9Shape,
458        { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 },
459      3, { 0, 1, 4 },
460      -1, { -1 },
461        { -1 },
462        { -1 } },
463    { Rec12Face_Contact, "Rec12Face_Contact", 24, 1, 2, { 0, 12, 24 }, Rec4Face_Contact,
464        { 0, 1, 2, 3, 12, 13, 14, 15 }, LineQuad, Rec12Shape, Rec12Shape,
465        { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 },
466      4, { 0, 1, 4, 5 },
467      -1, { -1 },
468        { -1 },
469        { -1 } },
470    { Rec16Face_Contact, "Rec16Face_Contact", 32, 1, 2, { 0, 16, 32 }, Rec4Face_Contact,
471        { 0, 1, 2, 3, 16, 17, 18, 19 }, LineQuad, Rec16Shape, Rec16Shape,
472        { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 },
473      4, { 0, 1, 4, 5 },
474      -1, { -1 },
475        { -1 },
476        { -1 } },
477    { Tet4Face_Contact, "Tet4Face_Contact", 8, 1, 2, { 0, 4, 8 }, Tet4Face_Contact,
478        { 0, 1, 2, 3, 4, 5, 6, 7 }, TriQuad, Tet4Shape, Tet4Shape,
479        { 0, 1, 2, 3, 4, 5, 6, 7 },
480      3, { 0, 1, 2 },
481      -1, { -1 },
482        { -1 },
483        { -1 } },
484    { Tet10Face_Contact, "Tet10Face_Contact", 20, 1, 2, { 0, 10, 20 }, Tet4Face_Contact,
485        { 0, 1, 2, 3, 10, 11, 12, 13 }, TriQuad, Tet10Shape, Tet10Shape,
486        { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
487      6, { 0, 1, 2, 4, 5, 6 },
488      -1, { -1 },
489        { -1 },
490        { -1 } },
491    { Tet16Face_Contact, "Tet16Face_Contact", 32, 1, 2, { 0, 16, 32 }, Tet4Face_Contact,
492        { 0, 1, 2, 3, 16, 17, 18, 19 }, TriQuad, Tet16Shape, Tet16Shape,
493        { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 },
494      9, { 0, 1, 2, 4, 5, 6, 7, 8, 9 },
495      -1, { -1 },
496        { -1 },
497        { -1 } },
498    { Hex8Face_Contact, "Hex8Face_Contact", 16, 1, 2, { 0, 8, 16 }, Hex8Face_Contact,
499        { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }, RecQuad, Hex8Shape, Hex8Shape,
500        { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
501      4, { 0, 1, 2, 3 },
502      -1, { -1 },
503        { -1 },
504        { -1 } },
505    { Hex20Face_Contact, "Hex20Face_Contact", 40, 1, 2, { 0, 20, 40 }, Hex8Face_Contact,
506        { 0, 1, 2, 3, 4, 5, 6, 7, 20, 21, 22, 23, 24, 25, 26, 27 }, RecQuad, Hex20Shape, Hex20Shape,
507        { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 },
508      8, { 0, 1, 2, 3, 8, 9, 10, 11 },
509      -1, { -1 },
510        { -1 },
511        { -1 } },
512    { Hex27Face_Contact, "Hex27Face_Contact", 54, 1, 2, { 0, 27, 54 }, Hex8Face_Contact,
513        { 0, 1, 2, 3, 4, 5, 6, 7, 27, 28, 29, 30, 31, 32, 33, 34 }, RecQuad, Hex27Shape, Hex27Shape,
514        { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 },
515      9, { 0, 1, 2, 3, 8, 9, 10, 11, 20 },
516      -1, { -1 },
517        { -1 },
518        { -1 } },
519    { Hex32Face_Contact, "Hex32Face_Contact", 64, 1, 2, { 0, 32, 64 }, Hex8Face_Contact,
520        { 0, 1, 2, 3, 4, 5, 6, 7, 32, 33, 34, 35, 36, 37, 38, 39 }, RecQuad, Hex32Shape, Hex32Shape,
521        { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63 },
522      12, { 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15 },
523      -1, { -1 },
524        { -1 },
525        { -1 } },
526    { Line3Macro, "Line3Macro", 3, 2, 1, { 0, 3 }, Line2,
527        { 0, 1 }, LineQuad, Line3Shape, Line2Shape,
528        { 0, 2, 2, 1 },
529      3, { 0, 1, 2 },
530      3, { 0, 1, 2 },
531        { 1, 0, 2 },
532        { -1 } },
533    { Tri6Macro, "Tri6Macro", 6, 4, 1, { 0, 6 }, Tri3,
534        { 0, 1, 2 }, TriQuad, Tri6Shape, Tri3Shape,
535        { 0, 3, 5,  5, 4, 2,  3, 1, 4,  4, 5, 3},
536      6, { 0, 1, 2, 3, 4, 5 },
537      6, { 0, 1, 2, 3, 4, 5 },
538        { 1, 2, 0, 4, 5, 3 },
539        { 0, 2, 1, 5, 4, 3 } },
540    { Rec9Macro, "Rec9Macro", 9, 4, 1, { 0, 9 }, Rec4,
541        { 0, 1, 2, 3 }, RecQuad, Rec9Shape, Rec4Shape,
542        { 0, 4, 8, 7, 7, 8, 6, 3, 4, 1, 5, 8, 8, 5, 2, 6 },
543      9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
544      9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
545        { 1, 2, 3, 0, 5, 6, 7, 4, 8 },
546        { 0, 3, 2, 1, 7, 6, 5, 4, 8 } },
547    { Tet10Macro, "Tet10Macro", 10, 8, 1, { 0, 10 }, Tet4,
548        { 0, 1, 2, 3 }, TetQuad, Tet10Shape, Tet4Shape,
549        { 0, 4, 6, 7, 4, 1, 5, 8, 6, 5, 2, 9, 7, 8, 9, 3, 4, 5, 6, 8, 5, 9, 8, 6, 9, 7, 6, 8, 7, 4, 6, 8 },
550      10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
551      10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
552        { -1 },
553        { -1 } },
554    { Hex27Macro, "Hex27Macro", 27, 8, 1, { 0, 27 }, Hex8,
555        { 0, 1, 2, 3, 4, 5, 6, 7 }, HexQuad, Hex27Shape, Hex8Shape,
556        { 0, 8, 20, 11, 12, 21, 26, 24, 8, 1, 9, 20, 21, 13, 22, 26, 11, 20, 10, 3, 24, 26, 23, 15, 20, 9, 2, 10, 26, 22, 14, 23, 12, 21, 26, 24, 4, 16, 25, 19, 21, 13, 22, 26, 16, 5, 17, 25, 24, 26, 23, 15, 19, 25, 18, 7, 26, 22, 14, 23, 25, 17, 6, 18 },
557      27, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 },
558      27, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 },
559        { -1 },
560        { -1 } },
561    { NoRef, "noElement", 0, 0, 0, { 0 }, NoRef,
562        { 0 }, NoQuad, NoShape, NoShape,
563        { 0 },
564      -1, { 0 },
565      -1, { 0 },
566        { 0 },
567        { 0 } }
568    
   {NoType, "noElement", 0, 0,  0,  0, 0, 0, NoType, {999}, Finley_Shape_Point1, Finley_Quad_getNodesPoint, Finley_Quad_getNumNodesPoint,0,{999},-1,{999},{999},{999}}  /* marks end of list */  
569  };  };
570    /**************************************************************
571      
572      creates a ReferenceElement of type id and a given integration order
573    
574  /**************************************************************/    */
575    
 /*   get a quadrature scheme with NumQuadNodes quadrature nodes for the tri  */  
 /*   as a queezed scheme on a quad [0,1]^2 */  
576    
577  Finley_RefElement* Finley_RefElement_alloc(ElementTypeId id,int numQuadNodes) {  Finley_ReferenceElement* Finley_ReferenceElement_alloc(ElementTypeId id, int order)
578    Finley_RefElement *out=NULL;  {
579    int Ndim, NS;      dim_t nsub, numQuadNodes, numQuadNodes2;
580          double *quadWeights=NULL, *quadNodes=NULL, *quadWeights2=NULL, *quadNodes2=NULL;
581    /*  allocate the Finley_RefElement to be returned: */      Finley_ReferenceElement *out=NULL;
582          Finley_QuadInfo* quadscheme;
583    out=MEMALLOC(1,Finley_RefElement);      Finley_ShapeFunctionInfo* parametrization, *basisfunction, *linearbasisfunction;
584    if (Finley_checkPtr(out)) return NULL;      Finley_ReferenceElementInfo *type, *linear_type;
585    out->Type=&(Finley_RefElement_InfoList[id]);  
586    out->numQuadNodes=numQuadNodes;          type=Finley_ReferenceElement_getInfo(id);
587    out->QuadNodes=NULL;          if (type == NULL) {
588    out->QuadWeights=NULL;               Finley_setError(VALUE_ERROR,"Finley_ReferenceElement_alloc: unable to identify element type.");
589    out->S=NULL;              return NULL;
590    out->dSdv=NULL;          }
591              linear_type=Finley_ReferenceElement_getInfo(type->LinearTypeId);
592    /*  allocate memory: */          if (linear_type == NULL) {
593                  Finley_setError(VALUE_ERROR,"Finley_ReferenceElement_alloc: unable to identify linear element type.");
594    Ndim=Finley_RefElement_InfoList[id].numDim;              return NULL;
595    NS=Finley_RefElement_InfoList[id].numShapes;          }
596    out->QuadNodes=MEMALLOC(numQuadNodes*Ndim,double);          
597    out->QuadWeights=MEMALLOC(numQuadNodes,double);      
598    out->S=MEMALLOC(NS*numQuadNodes,double);      
599    out->dSdv=MEMALLOC(NS*Ndim*numQuadNodes,double);      out=MEMALLOC(1,Finley_ReferenceElement);
600    if ( Finley_checkPtr(out->QuadNodes) || Finley_checkPtr(out->QuadWeights) || Finley_checkPtr(out->S) || Finley_checkPtr(out->dSdv) ) {      if (Finley_checkPtr(out)) return NULL;
601           Finley_RefElement_dealloc(out);      
602           return NULL;      out->reference_counter=0;
603    }      out->Parametrization=NULL;
604          out->BasisFunctions=NULL;
605    /*  set the quadrature nodes: */      out->LinearBasisFunctions=NULL;
606          out->Type=type;
607    Finley_RefElement_InfoList[id].getQuadNodes(numQuadNodes,out->QuadNodes,out->QuadWeights);      out->numNodes=out->Type->numNodes;
608    if (! Finley_noError()) {      out->LinearType=linear_type;
609           Finley_RefElement_dealloc(out);      out->numLinearNodes=out->LinearType->numNodes;
610           return NULL;          out->DBasisFunctionDv=NULL;
611    }          out->DBasisFunctionDvShared=TRUE;
612      
613    /*  eval shape functions on quadrature node: */      quadscheme=Finley_QuadInfo_getInfo(out->Type->Quadrature);
614          parametrization=Finley_ShapeFunction_getInfo(out->Type->Parametrization);
615    Finley_RefElement_InfoList[id].getValues(numQuadNodes,out->QuadNodes,out->S,out->dSdv);      basisfunction=Finley_ShapeFunction_getInfo(out->Type->BasisFunctions);
616    if (! Finley_noError()) {      linearbasisfunction=Finley_ShapeFunction_getInfo(Finley_ReferenceElement_InfoList[out->Type->LinearTypeId].BasisFunctions);
617           Finley_RefElement_dealloc(out);      nsub=out->Type->numSubElements;
618           return NULL;          out->numLocalDim=quadscheme->numDim;
619    }          
620          
621    /*  all done: */      /*  set up the basic integration scheme
622              note that quadscheme->numDim is not necessarily the diemnsion of the element
623    #ifdef Finley_TRACE      */
624    printf("reference element %s with %d quadrature nodes allocated.\n",Finley_RefElement_InfoList[id].Name,numQuadNodes);      
625    #endif      if (order<0) order=MAX(2*basisfunction->numOrder,0);
626    return out;      
627        numQuadNodes=quadscheme->getNumQuadNodes(order);
628        
629        quadNodes=MEMALLOC(numQuadNodes*quadscheme->numDim*nsub,double);
630        quadWeights=MEMALLOC(numQuadNodes*nsub,double);
631        if ( !( Finley_checkPtr(quadNodes) || Finley_checkPtr(quadWeights) ) ) {
632        
633            quadscheme->getQuadNodes(numQuadNodes, quadNodes, quadWeights);
634        
635            /*  set the basis functions on the quadrature points:
636             *  note: Finley_ShapeFunction_alloc will introduce 0. if the dimensions of the quadrature scheme and the dimension of the element don;t match.
637             */
638    
639    
640            /*
641             *    before we can set the shape function for the parametrization the quadrature scheme needs to be replicated :
642             */
643        
644            if (nsub>1) {
645                            out->DBasisFunctionDv=MEMALLOC(numQuadNodes*nsub* (basisfunction->numShapes) * (basisfunction->numDim), double );
646                            out->DBasisFunctionDvShared=FALSE;
647                            
648                    out->BasisFunctions=Finley_ShapeFunction_alloc(basisfunction->TypeId, quadscheme->numDim, numQuadNodes, quadNodes, quadWeights);
649                quadNodes2=MEMALLOC(numQuadNodes*quadscheme->numDim*nsub,double);
650                quadWeights2=MEMALLOC(numQuadNodes*nsub,double);
651                if ( !( Finley_checkPtr(quadNodes2) || Finley_checkPtr(quadWeights2) || Finley_checkPtr(out->DBasisFunctionDv)) ) {
652    
653                    numQuadNodes2=quadscheme->getMacro(nsub,out->BasisFunctions->numQuadNodes,
654                                                                            out->BasisFunctions->QuadNodes,
655                                                                            out->BasisFunctions->QuadWeights,
656                                                                            out->BasisFunctions->Type->numShapes, out->BasisFunctions->dSdv,
657                                                                            numQuadNodes*nsub, quadNodes2, quadWeights2,
658                                                                            out->DBasisFunctionDv);
659                    if (Finley_noError()) {
660                        out->Parametrization=Finley_ShapeFunction_alloc(parametrization->TypeId, quadscheme->numDim, numQuadNodes2, quadNodes2, quadWeights2);
661                        out->LinearBasisFunctions=Finley_ShapeFunction_alloc(linearbasisfunction->TypeId, quadscheme->numDim, numQuadNodes2, quadNodes2, quadWeights2);
662                    }
663                    
664                }
665                MEMFREE(quadNodes2);
666                MEMFREE(quadWeights2);
667                
668            } else {
669                out->Parametrization=Finley_ShapeFunction_alloc(parametrization->TypeId, quadscheme->numDim, numQuadNodes*nsub, quadNodes, quadWeights);
670                    out->BasisFunctions=Finley_ShapeFunction_alloc(basisfunction->TypeId, quadscheme->numDim, numQuadNodes, quadNodes, quadWeights);
671                out->LinearBasisFunctions=Finley_ShapeFunction_alloc(linearbasisfunction->TypeId, quadscheme->numDim, numQuadNodes, quadNodes, quadWeights);
672                            out->DBasisFunctionDv=out->BasisFunctions->dSdv;
673                            out->DBasisFunctionDvShared=TRUE;
674            }
675        }
676        MEMFREE(quadNodes);
677        MEMFREE(quadWeights);
678        if (Finley_noError()) {
679            return Finley_ReferenceElement_reference(out);
680        } else {
681            Finley_ReferenceElement_dealloc(out);
682            return NULL;
683        }
684  }  }
685    
686  /**************************************************************/  /**************************************************************/
687    
688  void Finley_RefElement_dealloc(Finley_RefElement* in) {  void Finley_ReferenceElement_dealloc(Finley_ReferenceElement* in) {
689    if (in!=NULL) {      if (in!=NULL) {
690       #ifdef Finley_TRACE          in->reference_counter--;
691       printf("reference element %s is deallocated.\n",in->Type->Name);          if (in->reference_counter<1) {
692       #endif              Finley_ShapeFunction_dealloc(in->Parametrization);
693       MEMFREE(in->QuadNodes);              Finley_ShapeFunction_dealloc(in->BasisFunctions);
694       MEMFREE(in->QuadWeights);              Finley_ShapeFunction_dealloc(in->LinearBasisFunctions);
695       MEMFREE(in->S);                          if (! in->DBasisFunctionDvShared) MEMFREE(in->DBasisFunctionDv);
696       MEMFREE(in->dSdv);              MEMFREE(in);
697       MEMFREE(in);          }
698    }      }
699    
700  }  }
701    
702  /**************************************************************/  /**************************************************************/
703    
704  ElementTypeId Finley_RefElement_getTypeId(char* element_type) {  ElementTypeId Finley_ReferenceElement_getTypeId(char* element_type) {
705      int ptr=0;      int ptr=0;
706      ElementTypeId out=NoType;      ElementTypeId out=NoRef;
707      while (Finley_RefElement_InfoList[ptr].TypeId!=NoType && out==NoType) {      while (Finley_ReferenceElement_InfoList[ptr].TypeId!=NoRef && out==NoRef) {
708         if (strcmp(element_type,Finley_RefElement_InfoList[ptr].Name)==0) out=Finley_RefElement_InfoList[ptr].TypeId;         if (strcmp(element_type,Finley_ReferenceElement_InfoList[ptr].Name)==0) out=Finley_ReferenceElement_InfoList[ptr].TypeId;
709         ptr++;         ptr++;
710      }      }
711      return out;      return out;
712  }  }
713    
714    Finley_ReferenceElement* Finley_ReferenceElement_reference(Finley_ReferenceElement* in) {
715         if (in!=NULL) ++(in->reference_counter);
716         return in;
717    }
718    
719    Finley_ReferenceElementInfo* Finley_ReferenceElement_getInfo(ElementTypeId id)
720    {
721        int ptr=0;
722        Finley_ReferenceElementInfo* out=NULL;
723        while (Finley_ReferenceElement_InfoList[ptr].TypeId!=NoRef && out==NULL) {
724           if (Finley_ReferenceElement_InfoList[ptr].TypeId==id) out=&(Finley_ReferenceElement_InfoList[ptr]);
725           ptr++;
726        }
727        if (out==NULL) {
728            Finley_setError(VALUE_ERROR,"Finley_ReferenceElement_getInfo: cannot find requested reference element.");
729        }
730        return out;
731    }
732    
733    

Legend:
Removed from v.2747  
changed lines
  Added in v.2748

  ViewVC Help
Powered by ViewVC 1.1.26