/[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 150 - (hide annotations)
Thu Sep 15 03:44:45 2005 UTC (14 years, 3 months ago) by jgs
Original Path: trunk/esys2/finley/src/finleyC/ReferenceElements.c
File MIME type: text/plain
File size: 20284 byte(s)
Merge of development branch dev-02 back to main trunk on 2005-09-15

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26