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

Annotation of /trunk/finley/src/finleyC/ReferenceElements.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 82 - (hide annotations)
Tue Oct 26 06:53:54 2004 UTC (15 years, 1 month ago) by jgs
Original Path: trunk/esys2/finley/src/finleyC/ReferenceElements.c
File MIME type: text/plain
File size: 19438 byte(s)
Initial revision

1 jgs 82 /* $Id$ */
2    
3     /**************************************************************/
4    
5     /* Finley: Reference elements */
6    
7     /**************************************************************/
8    
9     /* Copyrights by ACcESS Australia 2003 */
10     /* Author: gross@access.edu.au */
11     /* Version: $Id$ */
12    
13     /**************************************************************/
14    
15     #include "Finley.h"
16     #include "ReferenceElements.h"
17    
18     /**************************************************************/
19    
20     Finley_RefElementInfo Finley_RefElement_InfoList[]={
21     {Point1, "Point1", 0, 1, 1, 1, 1,
22     Point1, {0},
23     Finley_Shape_Point1, Finley_Quad_getNodesPoint, Finley_Quad_getNumNodesPoint,
24     1,{0},
25     1,{0}, {0},{-1}},
26     {Line2, "Line2", 1, 2, 2, 1, 2,
27     Line2, {0,1},
28     Finley_Shape_Line2, Finley_Quad_getNodesLine, Finley_Quad_getNumNodesLine,
29     2,{0,1},
30     2,{0,1}, {1,0},{-1}},
31     {Line3, "Line3", 1, 3, 3, 2, 2,
32     Line2, {0,1},
33     Finley_Shape_Line3, Finley_Quad_getNodesLine, Finley_Quad_getNumNodesLine,
34     3,{0,1,2},
35     3,{0,1,2}, {1,0,2},{-1}},
36     {Line4, "Line4", 1, 4, 4, 3, 2,
37     Line2, {0,1},
38     Finley_Shape_Line4, Finley_Quad_getNodesLine, Finley_Quad_getNumNodesLine,
39     4,{0,1,2,3},
40     4,{0,1,2,3}, {1,0,3,2},{-1}},
41     {Tri3, "Tri3", 2, 3, 3, 1, 3,
42     Tri3, {0,1,2},
43     Finley_Shape_Tri3, Finley_Quad_getNodesTri, Finley_Quad_getNumNodesTri,
44     3,{0,1,2},
45     3,{0,1,2}, {1,2,0},{0,2,1}},
46     {Tri6, "Tri6", 2, 6, 6, 2, 3,
47     Tri3, {0,1,2},
48     Finley_Shape_Tri6, Finley_Quad_getNodesTri, Finley_Quad_getNumNodesTri,
49     6,{0,1,2,3,4,5},
50     6,{0,1,2,3,4,5}, {1,2,0,4,5,3},{0,2,1,5,4,3}},
51     {Tri9, "Tri9", 2, 9, 9, 3, 3,
52     Tri3, {0,1,2},
53     Finley_Shape_Tri9, Finley_Quad_getNodesTri, Finley_Quad_getNumNodesTri,
54     9,{0,1,2,3,4,5,6,7,8},
55     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}},
56     {Tri10, "Tri10", 2, 10, 10, 3, 3,
57     Tri3, {0,1,2},
58     Finley_Shape_Tri10, Finley_Quad_getNodesTri, Finley_Quad_getNumNodesTri,
59     10,{0,1,2,3,4,5,6,7,8,9},
60     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}},
61     {Rec4, "Rec4", 2, 4, 4, 1, 4,
62     Rec4, {0,1,2,3},
63     Finley_Shape_Rec4, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
64     4,{0,1,2,3},
65     4,{0,1,2,3}, {1,2,3,0},{0,3,2,1}},
66     {Rec8, "Rec8", 2, 8, 8, 2, 4,
67     Rec4, {0,1,2,3},
68     Finley_Shape_Rec8, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
69     8,{0,1,2,3,4,5,6,7},
70     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}},
71     {Rec9, "Rec9", 2, 9, 9, 2, 4,
72     Rec4, {0,1,2,3},
73     Finley_Shape_Rec9, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
74     9,{0,1,2,3,4,5,6,7,8},
75     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}},
76     {Rec12, "Rec12", 2, 12, 12, 3, 4,
77     Rec4, {0,1,2,3},
78     Finley_Shape_Rec12, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
79     12,{0,1,2,3,4,5,6,7,8,9,10,11},
80     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}},
81     {Rec16, "Rec16", 2, 16, 16, 3, 4,
82     Rec4, {0,1,2,3},
83     Finley_Shape_Rec16, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
84     16,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},
85     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}},
86     {Tet4, "Tet4", 3, 4, 4, 1, 4,
87     Tet4, {0,1,2,3},
88     Finley_Shape_Tet4, Finley_Quad_getNodesTet, Finley_Quad_getNumNodesTet,
89     4,{0,1,2,3},
90     -1,{}, {},{}},
91     {Tet10, "Tet10", 3, 10, 10, 2, 4,
92     Tet4, {0,1,2,3},
93     Finley_Shape_Tet10, Finley_Quad_getNodesTet, Finley_Quad_getNumNodesTet,
94     10,{0,1,2,3,4,5,6,7,8,9},
95     -1,{}, {},{}},
96     {Tet16, "Tet16", 3, 16, 16, 3, 4,
97     Tet4, {0,1,2,3},
98     Finley_Shape_Tet16, Finley_Quad_getNodesTet, Finley_Quad_getNumNodesTet,
99     16,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},
100     -1,{}, {},{}},
101     {Hex8, "Hex8", 3, 8, 8, 1, 8,
102     Hex8, {0,1,2,3,4,5,6,7},
103     Finley_Shape_Hex8, Finley_Quad_getNodesHex, Finley_Quad_getNumNodesHex,
104     8,{0,1,2,3,4,5,6,7},
105     -1,{}, {},{}},
106     {Hex20, "Hex20", 3, 20, 20, 2, 8,
107     Hex8, {0,1,2,3,4,5,6,7},
108     Finley_Shape_Hex20, Finley_Quad_getNodesHex, Finley_Quad_getNumNodesHex,
109     20,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19},
110     -1,{}, {},{}},
111     {Hex32, "Hex32", 3, 32, 32, 3, 8,
112     Hex8, {0,1,2,3,4,5,6,7},
113     Finley_Shape_Hex32, Finley_Quad_getNodesHex, Finley_Quad_getNumNodesHex,
114     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},
115     -1,{}, {},{}},
116     {Line2Face, "Line2Face", 1, 2, 2, 1, 1,
117     Line2Face, {0,1},
118     Finley_Shape_Line2, Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,
119     1,{0},
120     1,{0}, {0,1,2},{-1}},
121     {Line3Face, "Line3Face", 1, 3, 3, 2, 1,
122     Line2Face, {0,1},
123     Finley_Shape_Line3, Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,
124     1,{0},
125     1,{0}, {0,1,2},{-1}},
126     {Line4Face, "Line4Face", 1, 4, 4, 3, 1,
127     Line2Face, {0,1},
128     Finley_Shape_Line4, Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,
129     1,{0},
130     1,{0}, {0,1,2},{-1}},
131     {Tri3Face, "Tri3Face", 2, 3, 3, 1, 2,
132     Tri3Face, {0,1,2},
133     Finley_Shape_Tri3, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
134     2,{0,1},
135     2,{0,1}, {1,0,2},{-1}},
136     {Tri6Face, "Tri6Face", 2, 6, 6, 2, 2,
137     Tri3Face, {0,1,2},
138     Finley_Shape_Tri6, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
139     3,{0,1,3},
140     3,{0,1,3}, {1,0,2,3,5,4},{-1}},
141     {Tri9Face, "Tri9Face", 2, 9, 9, 3, 2,
142     Tri3Face, {0,1,2},
143     Finley_Shape_Tri9, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
144     4,{0,1,3,4},
145     4,{0,1,3,4}, {1,0,2,4,3,7,8,6,5},{-1}},
146     {Tri10Face, "Tri10Face", 2, 10, 10, 3, 2,
147     Tri3Face, {0,1,2},
148     Finley_Shape_Tri10, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
149     4,{0,1,3,4},
150     4,{0,1,3,4}, {1,0,2,4,3,7,8,6,5,9},{-1}},
151     {Rec4Face, "Rec4Face", 2, 4, 4, 1, 2,
152     Rec4Face, {0,1,2,3},
153     Finley_Shape_Rec4, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
154     2,{0,1},
155     2,{0,1}, {1,0,3,2},{-1}},
156     {Rec8Face, "Rec8Face", 2, 8, 8, 2, 2,
157     Rec4Face, {0,1,2,3},
158     Finley_Shape_Rec8, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
159     3,{0,1,4},
160     3,{0,1,4}, {1,0,3,2,4,7,6,5},{-1}},
161     {Rec9Face, "Rec9Face", 2, 9, 9, 2, 2,
162     Rec4Face, {0,1,2,3},
163     Finley_Shape_Rec9, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
164     3,{0,1,4},
165     3,{0,1,4}, {1,0,3,2,4,7,6,5,8},{-1}},
166     {Rec12Face, "Rec12Face", 2, 12, 12, 3, 2,
167     Rec4Face, {0,1,2,3},
168     Finley_Shape_Rec12, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
169     4,{0,1,4,5},
170     4,{0,1,4,5}, {1,0,3,2,5,4,11,10,9,8,7,6},{-1}},
171     {Rec16Face, "Rec16Face", 2, 16, 16, 3, 2,
172     Rec4Face, {0,1,2,3},
173     Finley_Shape_Rec16, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
174     4,{0,1,4,5},
175     4,{0,1,4,5}, {1,0,3,2,5,4,11,10,9,8,7,6,13,12,15,14},{-1}},
176     {Tet4Face, "Tet4Face", 3, 4, 4, 1, 3,
177     Tet4Face, {0,1,2,3},
178     Finley_Shape_Tet4, Finley_Quad_getNodesTriOnFace, Finley_Quad_getNumNodesTri,
179     3,{0,1,2},
180     3,{0,1,2}, {1,2,0,3},{0,2,1,3}},
181     {Tet10Face, "Tet10Face", 3, 10, 10, 2, 3,
182     Tet4Face, {0,1,2,3},
183     Finley_Shape_Tet10, Finley_Quad_getNodesTriOnFace, Finley_Quad_getNumNodesTri,
184     4,{0,1,2,4,5,6},
185     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}},
186     {Tet16Face, "Tet16Face", 3, 16, 16, 3, 3,
187     Tet4Face, {0,1,2,3},
188     Finley_Shape_Tet16, Finley_Quad_getNodesTriOnFace, Finley_Quad_getNumNodesTri,
189     5,{0,1,2,4,5,6,7,8,9},
190     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}},
191     {Hex8Face, "Hex8Face", 3, 8, 8, 1, 4,
192     Hex8Face, {0,1,2,3,4,5,6,7},
193     Finley_Shape_Hex8, Finley_Quad_getNodesRecOnFace, Finley_Quad_getNumNodesRec,
194     4,{0,1,2,3},
195     4,{0,1,2,3}, {1,2,3,0,5,6,7,4},{0,3,2,1,4,7,6,5}},
196     {Hex20Face, "Hex20Face", 3, 20, 20, 2, 4,
197     Hex8Face, {0,1,2,3,4,5,6,7},
198     Finley_Shape_Hex20, Finley_Quad_getNodesRecOnFace, Finley_Quad_getNumNodesRec,
199     8,{0,1,2,3,8,9,10,11},
200     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}},
201     {Hex32Face, "Hex32Face", 3, 32, 32, 3, 4,
202     Hex8Face, {0,1,2,3,4,5,6,7},
203     Finley_Shape_Hex32, Finley_Quad_getNodesRecOnFace, Finley_Quad_getNumNodesRec,
204     12,{0,1,2,3,8,9,10,11,12,13,14,15},
205     12,{0,1,2,3,8,9,10,11,12,13,14,15},
206     {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},
207     {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}},
208    
209     {Point1_Contact, "Point1_Contact", 0, 2, 1, 1, 1,
210     Point1_Contact, {0,1},
211     Finley_Shape_Point1, Finley_Quad_getNodesPoint, Finley_Quad_getNumNodesPoint,
212     1,{0},
213     -1,{}, {},{}},
214     {Line2_Contact, "Line2_Contact", 1, 4, 2, 1, 2,
215     Line2_Contact, {0,1,2,3},
216     Finley_Shape_Line2, Finley_Quad_getNodesLine, Finley_Quad_getNumNodesLine,
217     2,{0,1},
218     -1,{}, {},{}},
219     {Line3_Contact, "Line3_Contact", 1, 6, 3, 2, 2,
220     Line2_Contact, {0,1,3,4},
221     Finley_Shape_Line3, Finley_Quad_getNodesLine, Finley_Quad_getNumNodesLine,
222     3,{0,1,2},
223     -1,{}, {},{}},
224     {Line4_Contact, "Line4_Contact", 1, 8, 4, 3, 2,
225     Line2_Contact, {0,1,4,5},
226     Finley_Shape_Line4, Finley_Quad_getNodesLine, Finley_Quad_getNumNodesLine,
227     4,{0,1,2,3},
228     -1,{}, {},{}},
229     {Tri3_Contact, "Tri3_Contact", 2, 6, 3, 1, 3,
230     Tri3_Contact, {0,1,2,3,4,5},
231     Finley_Shape_Tri3, Finley_Quad_getNodesTri, Finley_Quad_getNumNodesTri,
232     3,{0,1,2},
233     -1,{}, {},{}},
234     {Tri6_Contact, "Tri6_Contact", 2, 12, 6, 2, 3,
235     Tri3_Contact, {0,1,2,6,7,8},
236     Finley_Shape_Tri6, Finley_Quad_getNodesTri, Finley_Quad_getNumNodesTri,
237     6,{0,1,2,3,4,5},
238     -1,{}, {},{}},
239     {Tri9_Contact, "Tri9_Contact", 2, 18, 9, 3, 3,
240     Tri3_Contact, {0,1,2,9,10,11},
241     Finley_Shape_Tri9, Finley_Quad_getNodesTri, Finley_Quad_getNumNodesTri,
242     9,{0,1,2,3,4,5,6,7,8},
243     -1,{}, {},{}},
244     {Tri10_Contact, "Tri10_Contact", 2, 20, 10, 3, 3,
245     Tri3_Contact, {0,1,2,10,11,12},
246     Finley_Shape_Tri10, Finley_Quad_getNodesTri, Finley_Quad_getNumNodesTri,
247     10,{0,1,2,3,4,5,6,7,8,9},
248     -1,{}, {},{}},
249     {Rec4_Contact, "Rec4_Contact", 2, 8, 4, 1, 4,
250     Rec4_Contact, {0,1,2,3,4,5,6,7},
251     Finley_Shape_Rec4, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
252     4,{0,1,2,3},
253     -1,{}, {},{}},
254     {Rec8_Contact, "Rec8_Contact", 2, 16, 8, 2, 4,
255     Rec4_Contact, {0,1,2,3,8,9,10,11},
256     Finley_Shape_Rec8, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
257     8,{0,1,2,3,4,5,6,7},
258     -1,{}, {},{}},
259     {Rec9_Contact, "Rec9_Contact", 2, 18, 9, 2, 4,
260     Rec4_Contact, {0,1,2,3,9,10,11,12},
261     Finley_Shape_Rec9, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
262     9,{0,1,2,3,4,5,6,7,8},
263     -1,{}, {},{}},
264     {Rec12_Contact, "Rec12_Contact", 2, 24, 12, 3, 4,
265     Rec4_Contact, {0,1,2,3,12,13,14,15},
266     Finley_Shape_Rec12, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
267     12,{0,1,2,3,4,5,6,7,8,9,10,11},
268     -1,{}, {},{}},
269     {Rec16_Contact, "Rec16_Contact", 2, 32, 16, 3, 4,
270     Rec4_Contact, {0,1,2,3,16,17,18,19},
271     Finley_Shape_Rec16, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
272     16,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},
273     -1,{}, {},{}},
274     {Line2Face_Contact, "Line2Face_Contact", 1, 4, 2, 1, 1,
275     Line2Face_Contact, {0,1,2,3},
276     Finley_Shape_Line2, Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,
277     1,{0},
278     -1,{}, {},{}},
279     {Line3Face_Contact, "Line3Face_Contact", 1, 6, 3, 2, 1,
280     Line2Face_Contact, {0,1,3,4},
281     Finley_Shape_Line3, Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,
282     1,{0},
283     -1,{}, {},{}},
284     {Line4Face_Contact, "Line4Face_Contact", 1, 8, 4, 3, 1,
285     Line2Face_Contact, {0,1,4,5},
286     Finley_Shape_Line4, Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,
287     1,{0},
288     -1,{}, {},{}},
289     {Tri3Face_Contact, "Tri3Face_Contact", 2, 6, 3, 1, 2,
290     Tri3Face_Contact, {0,1,2,3,4,5},
291     Finley_Shape_Tri3, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
292     2,{0,1},
293     -1,{}, {},{}},
294     {Tri6Face_Contact, "Tri6Face_Contact", 2, 12, 6, 2, 2,
295     Tri3Face_Contact, {0,1,2,6,7,8},
296     Finley_Shape_Tri6, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
297     3,{0,1,3},
298     -1,{}, {},{}},
299     {Tri9Face_Contact, "Tri9Face_Contact", 2, 18, 9, 3, 2,
300     Tri3Face_Contact, {0,1,2,9,10,11},
301     Finley_Shape_Tri9, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
302     4,{0,1,3,4},
303     -1,{}, {},{}},
304     {Tri10Face_Contact, "Tri10Face_Contact", 2, 20, 10, 3, 2,
305     Tri3Face_Contact, {0,1,2,10,11,12},
306     Finley_Shape_Tri10, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
307     4,{0,1,3,4},
308     -1,{}, {},{}},
309     {Rec4Face_Contact, "Rec4Face_Contact", 2, 8, 4, 1, 2,
310     Rec4Face_Contact, {0,1,2,3,4,5,6,7},
311     Finley_Shape_Rec4, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
312     2,{0,1},
313     -1,{}, {},{}},
314     {Rec8Face_Contact, "Rec8Face_Contact", 2, 16, 8, 2, 2,
315     Rec4Face_Contact, {0,1,2,3,8,9,10,11},
316     Finley_Shape_Rec8, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
317     3,{0,1,4},
318     -1,{}, {},{}},
319     {Rec9Face_Contact, "Rec9Face_Contact", 2, 18, 9, 2, 2,
320     Rec4Face_Contact, {0,1,2,3,9,10,11,12},
321     Finley_Shape_Rec9, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
322     3,{0,1,4},
323     -1,{}, {},{}},
324     {Rec12Face_Contact, "Rec12Face_Contact", 2, 24, 12, 3, 2,
325     Rec4Face_Contact, {0,1,2,3,12,13,14,15},
326     Finley_Shape_Rec12, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
327     4,{0,1,4,5},
328     -1,{}, {},{}},
329     {Rec16Face_Contact, "Rec16Face_Contact", 2, 32, 16, 3, 2,
330     Rec4Face_Contact, {0,1,2,3,16,17,18,19},
331     Finley_Shape_Rec16, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
332     4,{0,1,4,5},
333     -1,{}, {},{}},
334     {Tet4Face_Contact, "Tet4Face_Contact", 3, 8, 4, 1, 3,
335     Tet4Face_Contact, {0,1,2,3,4,5,6,7},
336     Finley_Shape_Tet4, Finley_Quad_getNodesTriOnFace, Finley_Quad_getNumNodesTri,
337     3,{0,1,2},
338     -1,{}, {},{}},
339     {Tet10Face_Contact, "Tet10Face_Contact", 3, 20, 10, 2, 3,
340     Tet4Face_Contact, {0,1,2,3,10,11,12,13},
341     Finley_Shape_Tet10, Finley_Quad_getNodesTriOnFace, Finley_Quad_getNumNodesTri,
342     4,{0,1,2,4,5,6},
343     -1,{}, {},{}},
344     {Tet16Face_Contact, "Tet16Face_Contact", 3, 32, 16, 3, 3,
345     Tet4Face_Contact, {0,1,2,3,16,17,18,19},
346     Finley_Shape_Tet16, Finley_Quad_getNodesTriOnFace, Finley_Quad_getNumNodesTri,
347     5,{0,1,2,4,5,6,7,8,9},
348     -1,{}, {},{}},
349     {Hex8Face_Contact, "Hex8Face_Contact", 3, 16, 8, 1, 4,
350     Hex8Face_Contact, {0,1,2,3,4,5,6,7, 8,9,10,11,12,13,14,15},
351     Finley_Shape_Hex8, Finley_Quad_getNodesRecOnFace, Finley_Quad_getNumNodesTri,
352     4,{0,1,2,3},
353     -1,{}, {},{}},
354     {Hex20Face_Contact, "Hex20Face_Contact", 3, 40, 20, 2, 4,
355     Hex8Face_Contact, {0,1,2,3,4,5,6,7, 20,21,22,23,24,25,26,27},
356     Finley_Shape_Hex20, Finley_Quad_getNodesRecOnFace, Finley_Quad_getNumNodesTri,
357     8,{0,1,2,3,8,9,10,11},
358     -1,{}, {},{}},
359     {Hex32Face_Contact, "Hex32Face_Contact", 3, 64, 32, 3, 4,
360     Hex8Face_Contact, {0,1,2,3,4,5,6,7, 32,33,34,35,36,37,38,39},
361     Finley_Shape_Hex32, Finley_Quad_getNodesRecOnFace, Finley_Quad_getNumNodesTri,
362     12,{0,1,2,3,8,9,10,11,12,13,14,15},
363     -1,{}, {},{}},
364    
365     {NoType, "noElement", 0, 0, 0, 0, 0, NoType, {}, Finley_Shape_Point1, Finley_Quad_getNodesPoint, Finley_Quad_getNumNodesPoint,0,{},-1,{},{},{}} /* marks end of list */
366     };
367    
368     /**************************************************************/
369    
370     /* get a quadrature scheme with NumQuadNodes quadrature nodes for the tri */
371     /* as a queezed scheme on a quad [0,1]^2 */
372    
373     Finley_RefElement* Finley_RefElement_alloc(ElementTypeId id,int numQuadNodes) {
374     Finley_RefElement *out=NULL;
375    
376     /* allocate the Finley_RefElement to be returned: */
377    
378     out=(Finley_RefElement*)MEMALLOC(sizeof(Finley_RefElement));
379     if (Finley_checkPtr(out)) return NULL;
380     out->Type=&(Finley_RefElement_InfoList[id]);
381     out->numQuadNodes=numQuadNodes;
382     out->QuadNodes=NULL;
383     out->QuadWeights=NULL;
384     out->S=NULL;
385     out->dSdv=NULL;
386    
387     /* allocate memory: */
388    
389     int Ndim=Finley_RefElement_InfoList[id].numDim;
390     int NS=Finley_RefElement_InfoList[id].numShapes;
391     out->QuadNodes=(double *)MEMALLOC(numQuadNodes*Ndim*sizeof(double));
392     out->QuadWeights=(double *)MEMALLOC(numQuadNodes*sizeof(double));
393     out->S=(double *)MEMALLOC(NS*numQuadNodes*sizeof(double));
394     out->dSdv=(double *)MEMALLOC(NS*Ndim*numQuadNodes*sizeof(double));
395     if ( Finley_checkPtr(out->QuadNodes) || Finley_checkPtr(out->QuadWeights) || Finley_checkPtr(out->S) || Finley_checkPtr(out->dSdv) ) {
396     Finley_RefElement_dealloc(out);
397     return NULL;
398     }
399    
400     /* set the quadrature nodes: */
401    
402     Finley_RefElement_InfoList[id].getQuadNodes(numQuadNodes,out->QuadNodes,out->QuadWeights);
403     if (Finley_ErrorCode!=NO_ERROR) {
404     Finley_RefElement_dealloc(out);
405     return NULL;
406     }
407    
408     /* eval shape functions on quadrature node: */
409    
410     Finley_RefElement_InfoList[id].getValues(numQuadNodes,out->QuadNodes,out->S,out->dSdv);
411     if (Finley_ErrorCode!=NO_ERROR) {
412     Finley_RefElement_dealloc(out);
413     return NULL;
414     }
415    
416     /* all done: */
417    
418     #ifdef Finley_TRACE
419     printf("reference element %s with %d quadrature nodes allocated.\n",Finley_RefElement_InfoList[id].Name,numQuadNodes);
420     #endif
421     return out;
422     }
423    
424     /**************************************************************/
425    
426     void Finley_RefElement_dealloc(Finley_RefElement* in) {
427     if (in!=NULL) {
428     #ifdef Finley_TRACE
429     printf("reference element %s is deallocated.\n",in->Type->Name);
430     #endif
431     MEMFREE(in->QuadNodes);
432     MEMFREE(in->QuadWeights);
433     MEMFREE(in->S);
434     MEMFREE(in->dSdv);
435     MEMFREE(in);
436     }
437     }
438    
439     /**************************************************************/
440    
441     ElementTypeId Finley_RefElement_getTypeId(char* element_type) {
442     int ptr=0;
443     ElementTypeId out=NoType;
444     while (Finley_RefElement_InfoList[ptr].TypeId!=NoType && out==NoType) {
445     if (strcmp(element_type,Finley_RefElement_InfoList[ptr].Name)==0) out=Finley_RefElement_InfoList[ptr].TypeId;
446     ptr++;
447     }
448     return out;
449     }
450     /*
451     * $Log$
452     * Revision 1.1 2004/10/26 06:53:57 jgs
453     * Initial revision
454     *
455     * Revision 1.1.1.1 2004/06/24 04:00:40 johng
456     * Initial version of eys using boost-python.
457     *
458     *
459     */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26