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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1811 - (show annotations)
Thu Sep 25 23:11:13 2008 UTC (11 years, 2 months ago) by ksteube
File MIME type: text/plain
File size: 20854 byte(s)
Copyright updated in all files

1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2008 by University of Queensland
5 * Earth Systems Science Computational Center (ESSCC)
6 * http://www.uq.edu.au/esscc
7 *
8 * Primary Business: Queensland, Australia
9 * Licensed under the Open Software License version 3.0
10 * http://www.opensource.org/licenses/osl-3.0.php
11 *
12 *******************************************************/
13
14
15 /**************************************************************/
16
17 /* Finley: Reference elements */
18
19 /**************************************************************/
20
21 #include "ReferenceElements.h"
22
23 /**************************************************************/
24
25 Finley_RefElementInfo Finley_RefElement_InfoList[]={
26 {Point1, "Point1", 0, 0, 1, 1, 1, 1,
27 Point1, {0},
28 Finley_Shape_Point1, Finley_Quad_getNodesPoint, Finley_Quad_getNumNodesPoint,
29 1,{0},
30 1,{0}, {0},{-1}},
31 {Line2, "Line2", 1, 1, 2, 2, 1, 2,
32 Line2, {0,1},
33 Finley_Shape_Line2, Finley_Quad_getNodesLine, Finley_Quad_getNumNodesLine,
34 2,{0,1},
35 2,{0,1}, {1,0},{-1}},
36 {Line3, "Line3", 1, 1, 3, 3, 2, 2,
37 Line2, {0,1},
38 Finley_Shape_Line3, Finley_Quad_getNodesLine, Finley_Quad_getNumNodesLine,
39 3,{0,1,2},
40 3,{0,1,2}, {1,0,2},{-1}},
41 {Line4, "Line4", 1, 1, 4, 4, 3, 2,
42 Line2, {0,1},
43 Finley_Shape_Line4, Finley_Quad_getNodesLine, Finley_Quad_getNumNodesLine,
44 4,{0,1,2,3},
45 4,{0,1,2,3}, {1,0,3,2},{-1}},
46 {Tri3, "Tri3", 2, 2, 3, 3, 1, 3,
47 Tri3, {0,1,2},
48 Finley_Shape_Tri3, Finley_Quad_getNodesTri, Finley_Quad_getNumNodesTri,
49 3,{0,1,2},
50 3,{0,1,2}, {1,2,0},{0,2,1}},
51 {Tri6, "Tri6", 2, 2, 6, 6, 2, 3,
52 Tri3, {0,1,2},
53 Finley_Shape_Tri6, Finley_Quad_getNodesTri, Finley_Quad_getNumNodesTri,
54 6,{0,1,2,3,4,5},
55 6,{0,1,2,3,4,5}, {1,2,0,4,5,3},{0,2,1,5,4,3}},
56 {Tri9, "Tri9", 2, 2, 9, 9, 3, 3,
57 Tri3, {0,1,2},
58 Finley_Shape_Tri9, Finley_Quad_getNodesTri, Finley_Quad_getNumNodesTri,
59 9,{0,1,2,3,4,5,6,7,8},
60 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}},
61 {Tri10, "Tri10", 2, 2, 10, 10, 3, 3,
62 Tri3, {0,1,2},
63 Finley_Shape_Tri10, Finley_Quad_getNodesTri, Finley_Quad_getNumNodesTri,
64 10,{0,1,2,3,4,5,6,7,8,9},
65 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}},
66 {Rec4, "Rec4", 2, 2, 4, 4, 1, 4,
67 Rec4, {0,1,2,3},
68 Finley_Shape_Rec4, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
69 4,{0,1,2,3},
70 4,{0,1,2,3}, {1,2,3,0},{0,3,2,1}},
71 {Rec8, "Rec8", 2, 2, 8, 8, 2, 4,
72 Rec4, {0,1,2,3},
73 Finley_Shape_Rec8, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
74 8,{0,1,2,3,4,5,6,7},
75 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}},
76 {Rec9, "Rec9", 2, 2, 9, 9, 2, 4,
77 Rec4, {0,1,2,3},
78 Finley_Shape_Rec9, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
79 9,{0,1,2,3,4,5,6,7,8},
80 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}},
81 {Rec12, "Rec12", 2, 2, 12, 12, 3, 4,
82 Rec4, {0,1,2,3},
83 Finley_Shape_Rec12, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
84 12,{0,1,2,3,4,5,6,7,8,9,10,11},
85 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}},
86 {Rec16, "Rec16", 2, 2, 16, 16, 3, 4,
87 Rec4, {0,1,2,3},
88 Finley_Shape_Rec16, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
89 16,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},
90 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}},
91 {Tet4, "Tet4", 3, 3, 4, 4, 1, 4,
92 Tet4, {0,1,2,3},
93 Finley_Shape_Tet4, Finley_Quad_getNodesTet, Finley_Quad_getNumNodesTet,
94 4,{0,1,2,3},
95 -1,{999}, {999},{999}},
96 {Tet10, "Tet10", 3, 3, 10, 10, 2, 4,
97 Tet4, {0,1,2,3},
98 Finley_Shape_Tet10, Finley_Quad_getNodesTet, Finley_Quad_getNumNodesTet,
99 10,{0,1,2,3,4,5,6,7,8,9},
100 -1,{999}, {999},{999}},
101 {Tet16, "Tet16", 3, 3, 16, 16, 3, 4,
102 Tet4, {0,1,2,3},
103 Finley_Shape_Tet16, Finley_Quad_getNodesTet, Finley_Quad_getNumNodesTet,
104 16,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},
105 -1,{999}, {999},{999}},
106 {Hex8, "Hex8", 3, 3, 8, 8, 1, 8,
107 Hex8, {0,1,2,3,4,5,6,7},
108 Finley_Shape_Hex8, Finley_Quad_getNodesHex, Finley_Quad_getNumNodesHex,
109 8,{0,1,2,3,4,5,6,7},
110 -1,{999}, {999},{999}},
111 {Hex20, "Hex20", 3, 3, 20, 20, 2, 8,
112 Hex8, {0,1,2,3,4,5,6,7},
113 Finley_Shape_Hex20, Finley_Quad_getNodesHex, Finley_Quad_getNumNodesHex,
114 20,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19},
115 -1,{999}, {999},{999}},
116 {Hex27, "Hex27", 3, 3, 27, 27, 2, 8,
117 Hex8, {0,1,2,3,4,5,6,7},
118 Finley_Shape_Hex27, Finley_Quad_getNodesHex, Finley_Quad_getNumNodesHex,
119 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},
120 -1,{999}, {999},{999}},
121 {Hex32, "Hex32", 3, 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,{999}, {999},{999}},
126 {Line2Face, "Line2Face", 0, 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", 0, 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", 0, 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", 1, 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", 1, 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", 1, 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", 1, 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", 1, 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", 1, 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", 1, 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", 1, 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", 1, 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", 2, 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", 2, 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", 2, 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", 2, 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", 2, 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 {Hex27Face, "Hex27Face", 2, 3, 27, 27, 2, 4,
212 Hex8Face, {0,1,2,3,4,5,6,7},
213 Finley_Shape_Hex27, Finley_Quad_getNodesRecOnFace, Finley_Quad_getNumNodesRec,
214 9,{0,1,2,3,8,9,10,11,20},
215 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}},
216 {Hex32Face, "Hex32Face", 2, 3, 32, 32, 3, 4,
217 Hex8Face, {0,1,2,3,4,5,6,7},
218 Finley_Shape_Hex32, Finley_Quad_getNodesRecOnFace, Finley_Quad_getNumNodesRec,
219 12,{0,1,2,3,8,9,10,11,12,13,14,15},
220 12,{0,1,2,3,8,9,10,11,12,13,14,15},
221 {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},
222 {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}},
223
224 {Point1_Contact, "Point1_Contact", 0, 0, 2, 1, 1, 1,
225 Point1_Contact, {0,1},
226 Finley_Shape_Point1, Finley_Quad_getNodesPoint, Finley_Quad_getNumNodesPoint,
227 1,{0},
228 -1,{999}, {999},{999}},
229 {Line2_Contact, "Line2_Contact", 1, 1, 4, 2, 1, 2,
230 Line2_Contact, {0,1,2,3},
231 Finley_Shape_Line2, Finley_Quad_getNodesLine, Finley_Quad_getNumNodesLine,
232 2,{0,1},
233 -1,{999}, {999},{999}},
234 {Line3_Contact, "Line3_Contact", 1, 1, 6, 3, 2, 2,
235 Line2_Contact, {0,1,3,4},
236 Finley_Shape_Line3, Finley_Quad_getNodesLine, Finley_Quad_getNumNodesLine,
237 3,{0,1,2},
238 -1,{999}, {999},{999}},
239 {Line4_Contact, "Line4_Contact", 1, 1, 8, 4, 3, 2,
240 Line2_Contact, {0,1,4,5},
241 Finley_Shape_Line4, Finley_Quad_getNodesLine, Finley_Quad_getNumNodesLine,
242 4,{0,1,2,3},
243 -1,{999}, {999},{999}},
244 {Tri3_Contact, "Tri3_Contact", 2, 2, 6, 3, 1, 3,
245 Tri3_Contact, {0,1,2,3,4,5},
246 Finley_Shape_Tri3, Finley_Quad_getNodesTri, Finley_Quad_getNumNodesTri,
247 3,{0,1,2},
248 -1,{999}, {999},{999}},
249 {Tri6_Contact, "Tri6_Contact", 2, 2, 12, 6, 2, 3,
250 Tri3_Contact, {0,1,2,6,7,8},
251 Finley_Shape_Tri6, Finley_Quad_getNodesTri, Finley_Quad_getNumNodesTri,
252 6,{0,1,2,3,4,5},
253 -1,{999}, {999},{999}},
254 {Tri9_Contact, "Tri9_Contact", 2, 2, 18, 9, 3, 3,
255 Tri3_Contact, {0,1,2,9,10,11},
256 Finley_Shape_Tri9, Finley_Quad_getNodesTri, Finley_Quad_getNumNodesTri,
257 9,{0,1,2,3,4,5,6,7,8},
258 -1,{999}, {999},{999}},
259 {Tri10_Contact, "Tri10_Contact", 2, 2, 20, 10, 3, 3,
260 Tri3_Contact, {0,1,2,10,11,12},
261 Finley_Shape_Tri10, Finley_Quad_getNodesTri, Finley_Quad_getNumNodesTri,
262 10,{0,1,2,3,4,5,6,7,8,9},
263 -1,{999}, {999},{999}},
264 {Rec4_Contact, "Rec4_Contact", 2, 2, 8, 4, 1, 4,
265 Rec4_Contact, {0,1,2,3,4,5,6,7},
266 Finley_Shape_Rec4, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
267 4,{0,1,2,3},
268 -1,{999}, {999},{999}},
269 {Rec8_Contact, "Rec8_Contact", 2, 2, 16, 8, 2, 4,
270 Rec4_Contact, {0,1,2,3,8,9,10,11},
271 Finley_Shape_Rec8, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
272 8,{0,1,2,3,4,5,6,7},
273 -1,{999}, {999},{999}},
274 {Rec9_Contact, "Rec9_Contact", 2, 2, 18, 9, 2, 4,
275 Rec4_Contact, {0,1,2,3,9,10,11,12},
276 Finley_Shape_Rec9, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
277 9,{0,1,2,3,4,5,6,7,8},
278 -1,{999}, {999},{999}},
279 {Rec12_Contact, "Rec12_Contact", 2, 2, 24, 12, 3, 4,
280 Rec4_Contact, {0,1,2,3,12,13,14,15},
281 Finley_Shape_Rec12, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
282 12,{0,1,2,3,4,5,6,7,8,9,10,11},
283 -1,{999}, {999},{999}},
284 {Rec16_Contact, "Rec16_Contact", 2, 2, 32, 16, 3, 4,
285 Rec4_Contact, {0,1,2,3,16,17,18,19},
286 Finley_Shape_Rec16, Finley_Quad_getNodesRec, Finley_Quad_getNumNodesRec,
287 16,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},
288 -1,{999}, {999},{999}},
289 {Line2Face_Contact, "Line2Face_Contact", 0, 1, 4, 2, 1, 1,
290 Line2Face_Contact, {0,1,2,3},
291 Finley_Shape_Line2, Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,
292 1,{0},
293 -1,{999}, {999},{999}},
294 {Line3Face_Contact, "Line3Face_Contact", 0, 1, 6, 3, 2, 1,
295 Line2Face_Contact, {0,1,3,4},
296 Finley_Shape_Line3, Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,
297 1,{0},
298 -1,{999}, {999},{999}},
299 {Line4Face_Contact, "Line4Face_Contact", 0, 1, 8, 4, 3, 1,
300 Line2Face_Contact, {0,1,4,5},
301 Finley_Shape_Line4, Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,
302 1,{0},
303 -1,{999}, {999},{999}},
304 {Tri3Face_Contact, "Tri3Face_Contact", 1, 2, 6, 3, 1, 2,
305 Tri3Face_Contact, {0,1,2,3,4,5},
306 Finley_Shape_Tri3, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
307 2,{0,1},
308 -1,{999}, {999},{999}},
309 {Tri6Face_Contact, "Tri6Face_Contact", 1, 2, 12, 6, 2, 2,
310 Tri3Face_Contact, {0,1,2,6,7,8},
311 Finley_Shape_Tri6, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
312 3,{0,1,3},
313 -1,{999}, {999},{999}},
314 {Tri9Face_Contact, "Tri9Face_Contact", 1, 2, 18, 9, 3, 2,
315 Tri3Face_Contact, {0,1,2,9,10,11},
316 Finley_Shape_Tri9, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
317 4,{0,1,3,4},
318 -1,{999}, {999},{999}},
319 {Tri10Face_Contact, "Tri10Face_Contact", 1, 2, 20, 10, 3, 2,
320 Tri3Face_Contact, {0,1,2,10,11,12},
321 Finley_Shape_Tri10, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
322 4,{0,1,3,4},
323 -1,{999}, {999},{999}},
324 {Rec4Face_Contact, "Rec4Face_Contact", 1, 2, 8, 4, 1, 2,
325 Rec4Face_Contact, {0,1,2,3,4,5,6,7},
326 Finley_Shape_Rec4, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
327 2,{0,1},
328 -1,{999}, {999},{999}},
329 {Rec8Face_Contact, "Rec8Face_Contact", 1, 2, 16, 8, 2, 2,
330 Rec4Face_Contact, {0,1,2,3,8,9,10,11},
331 Finley_Shape_Rec8, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
332 3,{0,1,4},
333 -1,{999}, {999},{999}},
334 {Rec9Face_Contact, "Rec9Face_Contact", 1, 2, 18, 9, 2, 2,
335 Rec4Face_Contact, {0,1,2,3,9,10,11,12},
336 Finley_Shape_Rec9, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
337 3,{0,1,4},
338 -1,{999}, {999},{999}},
339 {Rec12Face_Contact, "Rec12Face_Contact", 1, 2, 24, 12, 3, 2,
340 Rec4Face_Contact, {0,1,2,3,12,13,14,15},
341 Finley_Shape_Rec12, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
342 4,{0,1,4,5},
343 -1,{999}, {999},{999}},
344 {Rec16Face_Contact, "Rec16Face_Contact", 1, 2, 32, 16, 3, 2,
345 Rec4Face_Contact, {0,1,2,3,16,17,18,19},
346 Finley_Shape_Rec16, Finley_Quad_getNodesLineOnFace, Finley_Quad_getNumNodesLine,
347 4,{0,1,4,5},
348 -1,{999}, {999},{999}},
349 {Tet4Face_Contact, "Tet4Face_Contact", 2, 3, 8, 4, 1, 3,
350 Tet4Face_Contact, {0,1,2,3,4,5,6,7},
351 Finley_Shape_Tet4, Finley_Quad_getNodesTriOnFace, Finley_Quad_getNumNodesTri,
352 3,{0,1,2},
353 -1,{999}, {999},{999}},
354 {Tet10Face_Contact, "Tet10Face_Contact", 2, 3, 20, 10, 2, 3,
355 Tet4Face_Contact, {0,1,2,3,10,11,12,13},
356 Finley_Shape_Tet10, Finley_Quad_getNodesTriOnFace, Finley_Quad_getNumNodesTri,
357 4,{0,1,2,4,5,6},
358 -1,{999}, {999},{999}},
359 {Tet16Face_Contact, "Tet16Face_Contact", 2, 3, 32, 16, 3, 3,
360 Tet4Face_Contact, {0,1,2,3,16,17,18,19},
361 Finley_Shape_Tet16, Finley_Quad_getNodesTriOnFace, Finley_Quad_getNumNodesTri,
362 5,{0,1,2,4,5,6,7,8,9},
363 -1,{999}, {999},{999}},
364 {Hex8Face_Contact, "Hex8Face_Contact", 2, 3, 16, 8, 1, 4,
365 Hex8Face_Contact, {0,1,2,3,4,5,6,7, 8,9,10,11,12,13,14,15},
366 Finley_Shape_Hex8, Finley_Quad_getNodesRecOnFace, Finley_Quad_getNumNodesRec,
367 4,{0,1,2,3},
368 -1,{999}, {999},{999}},
369 {Hex20Face_Contact, "Hex20Face_Contact", 2, 3, 40, 20, 2, 4,
370 Hex8Face_Contact, {0,1,2,3,4,5,6,7, 20,21,22,23,24,25,26,27},
371 Finley_Shape_Hex20, Finley_Quad_getNodesRecOnFace, Finley_Quad_getNumNodesRec,
372 8,{0,1,2,3,8,9,10,11},
373 -1,{999}, {999},{999}},
374 {Hex27Face_Contact, "Hex27Face_Contact", 2, 3, 54, 27, 2, 4,
375 Hex8Face_Contact, {0,1,2,3,4,5,6,7, 27,28,29,30,31,32,33,34},
376 Finley_Shape_Hex27, Finley_Quad_getNodesRecOnFace, Finley_Quad_getNumNodesRec,
377 9,{0,1,2,3,8,9,10,11,20},
378 -1,{999}, {999},{999}},
379 {Hex32Face_Contact, "Hex32Face_Contact", 2, 3, 64, 32, 3, 4,
380 Hex8Face_Contact, {0,1,2,3,4,5,6,7, 32,33,34,35,36,37,38,39},
381 Finley_Shape_Hex32, Finley_Quad_getNodesRecOnFace, Finley_Quad_getNumNodesRec,
382 12,{0,1,2,3,8,9,10,11,12,13,14,15},
383 -1,{999}, {999},{999}},
384
385 {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 */
386 };
387
388 /**************************************************************/
389
390 /* get a quadrature scheme with NumQuadNodes quadrature nodes for the tri */
391 /* as a queezed scheme on a quad [0,1]^2 */
392
393 Finley_RefElement* Finley_RefElement_alloc(ElementTypeId id,int numQuadNodes) {
394 Finley_RefElement *out=NULL;
395 int Ndim, NS;
396
397 /* allocate the Finley_RefElement to be returned: */
398
399 out=MEMALLOC(1,Finley_RefElement);
400 if (Finley_checkPtr(out)) return NULL;
401 out->Type=&(Finley_RefElement_InfoList[id]);
402 out->numQuadNodes=numQuadNodes;
403 out->QuadNodes=NULL;
404 out->QuadWeights=NULL;
405 out->S=NULL;
406 out->dSdv=NULL;
407
408 /* allocate memory: */
409
410 Ndim=Finley_RefElement_InfoList[id].numDim;
411 NS=Finley_RefElement_InfoList[id].numShapes;
412 out->QuadNodes=MEMALLOC(numQuadNodes*Ndim,double);
413 out->QuadWeights=MEMALLOC(numQuadNodes,double);
414 out->S=MEMALLOC(NS*numQuadNodes,double);
415 out->dSdv=MEMALLOC(NS*Ndim*numQuadNodes,double);
416 if ( Finley_checkPtr(out->QuadNodes) || Finley_checkPtr(out->QuadWeights) || Finley_checkPtr(out->S) || Finley_checkPtr(out->dSdv) ) {
417 Finley_RefElement_dealloc(out);
418 return NULL;
419 }
420
421 /* set the quadrature nodes: */
422
423 Finley_RefElement_InfoList[id].getQuadNodes(numQuadNodes,out->QuadNodes,out->QuadWeights);
424 if (! Finley_noError()) {
425 Finley_RefElement_dealloc(out);
426 return NULL;
427 }
428
429 /* eval shape functions on quadrature node: */
430
431 Finley_RefElement_InfoList[id].getValues(numQuadNodes,out->QuadNodes,out->S,out->dSdv);
432 if (! Finley_noError()) {
433 Finley_RefElement_dealloc(out);
434 return NULL;
435 }
436
437 /* all done: */
438
439 #ifdef Finley_TRACE
440 printf("reference element %s with %d quadrature nodes allocated.\n",Finley_RefElement_InfoList[id].Name,numQuadNodes);
441 #endif
442 return out;
443 }
444
445 /**************************************************************/
446
447 void Finley_RefElement_dealloc(Finley_RefElement* in) {
448 if (in!=NULL) {
449 #ifdef Finley_TRACE
450 printf("reference element %s is deallocated.\n",in->Type->Name);
451 #endif
452 MEMFREE(in->QuadNodes);
453 MEMFREE(in->QuadWeights);
454 MEMFREE(in->S);
455 MEMFREE(in->dSdv);
456 MEMFREE(in);
457 }
458 }
459
460 /**************************************************************/
461
462 ElementTypeId Finley_RefElement_getTypeId(char* element_type) {
463 int ptr=0;
464 ElementTypeId out=NoType;
465 while (Finley_RefElement_InfoList[ptr].TypeId!=NoType && out==NoType) {
466 if (strcmp(element_type,Finley_RefElement_InfoList[ptr].Name)==0) out=Finley_RefElement_InfoList[ptr].TypeId;
467 ptr++;
468 }
469 return out;
470 }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26