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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26