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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2856 - (show annotations)
Mon Jan 18 04:14:37 2010 UTC (9 years, 8 months ago) by gross
File MIME type: text/plain
File size: 29110 byte(s)
FunctionSpaces provide now some information about their approximation order.
1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2009 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 this list has been generated by generateReferenceElementList.py:.
26 */
27
28 Finley_ReferenceElementInfo Finley_ReferenceElement_InfoList[]={
29 { Point1, "Point1", 1, 1, 1, { 0, 1 }, Point1,
30 { 0 }, PointQuad, Point1Shape, Point1Shape,
31 { 0 },
32 1, { 0 },
33 1, { 0 },
34 { 0 },
35 { -1 } },
36 { Line2, "Line2", 2, 1, 1, { 0, 2 }, Line2,
37 { 0, 1 }, LineQuad, Line2Shape, Line2Shape,
38 { 0, 1 },
39 2, { 0, 1 },
40 2, { 0, 1 },
41 { 1, 0 },
42 { -1 } },
43 { Line3, "Line3", 3, 1, 1, { 0, 3 }, Line2,
44 { 0, 1 }, LineQuad, Line3Shape, Line3Shape,
45 { 0, 1, 2 },
46 3, { 0, 1, 2 },
47 3, { 0, 1, 2 },
48 { 1, 0, 2 },
49 { -1 } },
50 { Line4, "Line4", 4, 1, 1, { 0, 4 }, Line2,
51 { 0, 1 }, LineQuad, Line4Shape, Line4Shape,
52 { 0, 1, 2, 3 },
53 4, { 0, 1, 2, 3 },
54 4, { 0, 1, 2, 3 },
55 { 1, 0, 3, 2 },
56 { -1 } },
57 { Tri3, "Tri3", 3, 1, 1, { 0, 3 }, Tri3,
58 { 0, 1, 2 }, TriQuad, Tri3Shape, Tri3Shape,
59 { 0, 1, 2 },
60 3, { 0, 1, 2 },
61 3, { 0, 1, 2 },
62 { 1, 2, 0 },
63 { 0, 2, 1 } },
64 { Tri6, "Tri6", 6, 1, 1, { 0, 6 }, Tri3,
65 { 0, 1, 2 }, TriQuad, Tri6Shape, Tri6Shape,
66 { 0, 1, 2, 3, 4, 5 },
67 6, { 0, 1, 2, 3, 4, 5 },
68 6, { 0, 1, 2, 3, 4, 5 },
69 { 1, 2, 0, 4, 5, 3 },
70 { 0, 2, 1, 5, 4, 3 } },
71 { Tri9, "Tri9", 9, 1, 1, { 0, 9 }, Tri3,
72 { 0, 1, 2 }, TriQuad, Tri9Shape, Tri9Shape,
73 { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
74 9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
75 9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
76 { 1, 2, 0, 5, 6, 7, 8, 3, 4 },
77 { 0, 2, 1, 8, 7, 6, 5, 4, 3 } },
78 { Tri10, "Tri10", 10, 1, 1, { 0, 10 }, Tri3,
79 { 0, 1, 2 }, TriQuad, Tri10Shape, Tri10Shape,
80 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
81 10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
82 10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
83 { 1, 2, 0, 5, 6, 7, 8, 3, 4, 9 },
84 { 0, 2, 1, 8, 7, 6, 5, 4, 3, 9 } },
85 { Rec4, "Rec4", 4, 1, 1, { 0, 4 }, Rec4,
86 { 0, 1, 2, 3 }, RecQuad, Rec4Shape, Rec4Shape,
87 { 0, 1, 2, 3 },
88 4, { 0, 1, 2, 3 },
89 4, { 0, 1, 2, 3 },
90 { 1, 2, 3, 0 },
91 { 0, 3, 2, 1 } },
92 { Rec8, "Rec8", 8, 1, 1, { 0, 8 }, Rec4,
93 { 0, 1, 2, 3 }, RecQuad, Rec8Shape, Rec8Shape,
94 { 0, 1, 2, 3, 4, 5, 6, 7 },
95 8, { 0, 1, 2, 3, 4, 5, 6, 7 },
96 8, { 0, 1, 2, 3, 4, 5, 6, 7 },
97 { 1, 2, 3, 0, 5, 6, 7, 4 },
98 { 0, 3, 2, 1, 7, 6, 5, 4 } },
99 { Rec9, "Rec9", 9, 1, 1, { 0, 9 }, Rec4,
100 { 0, 1, 2, 3 }, RecQuad, Rec9Shape, Rec9Shape,
101 { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
102 9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
103 9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
104 { 1, 2, 3, 0, 5, 6, 7, 4, 8 },
105 { 0, 3, 2, 1, 7, 6, 5, 4, 8 } },
106 { Rec12, "Rec12", 12, 1, 1, { 0, 12 }, Rec4,
107 { 0, 1, 2, 3 }, RecQuad, Rec12Shape, Rec12Shape,
108 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
109 12, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
110 12, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
111 { 1, 2, 3, 0, 6, 7, 8, 9, 10, 11, 4, 5 },
112 { 0, 3, 2, 1, 11, 10, 9, 8, 7, 6, 5, 4 } },
113 { Rec16, "Rec16", 16, 1, 1, { 0, 16 }, Rec4,
114 { 0, 1, 2, 3 }, RecQuad, Rec16Shape, Rec16Shape,
115 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
116 16, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
117 16, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
118 { 1, 2, 3, 0, 6, 7, 8, 9, 10, 11, 4, 5, 13, 14, 15, 12 },
119 { 0, 3, 2, 1, 11, 10, 9, 8, 7, 6, 5, 4, 12, 15, 14, 13 } },
120 { Tet4, "Tet4", 4, 1, 1, { 0, 4 }, Tet4,
121 { 0, 1, 2, 3 }, TetQuad, Tet4Shape, Tet4Shape,
122 { 0, 1, 2, 3 },
123 4, { 0, 1, 2, 3 },
124 4, { 0, 1, 2, 3 },
125 { -1 },
126 { -1 } },
127 { Tet10, "Tet10", 10, 1, 1, { 0, 10 }, Tet4,
128 { 0, 1, 2, 3 }, TetQuad, Tet10Shape, Tet10Shape,
129 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
130 10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
131 10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
132 { -1 },
133 { -1 } },
134 { Tet16, "Tet16", 16, 1, 1, { 0, 16 }, Tet4,
135 { 0, 1, 2, 3 }, TetQuad, Tet16Shape, Tet16Shape,
136 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
137 16, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
138 16, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
139 { -1 },
140 { -1 } },
141 { Hex8, "Hex8", 8, 1, 1, { 0, 8 }, Hex8,
142 { 0, 1, 2, 3, 4, 5, 6, 7 }, HexQuad, Hex8Shape, Hex8Shape,
143 { 0, 1, 2, 3, 4, 5, 6, 7 },
144 8, { 0, 1, 2, 3, 4, 5, 6, 7 },
145 8, { 0, 1, 2, 3, 4, 5, 6, 7 },
146 { -1 },
147 { -1 } },
148 { Hex20, "Hex20", 20, 1, 1, { 0, 20 }, Hex8,
149 { 0, 1, 2, 3, 4, 5, 6, 7 }, HexQuad, Hex20Shape, Hex20Shape,
150 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
151 20, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
152 20, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
153 { -1 },
154 { -1 } },
155 { Hex27, "Hex27", 27, 1, 1, { 0, 27 }, Hex8,
156 { 0, 1, 2, 3, 4, 5, 6, 7 }, HexQuad, Hex27Shape, Hex27Shape,
157 { 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 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 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 { -1 },
161 { -1 } },
162 { Hex32, "Hex32", 32, 1, 1, { 0, 32 }, Hex8,
163 { 0, 1, 2, 3, 4, 5, 6, 7 }, HexQuad, Hex32Shape, Hex32Shape,
164 { 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 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 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 { -1 },
168 { -1 } },
169 { Line2Face, "Line2Face", 2, 1, 1, { 0, 2 }, Line2Face,
170 { 0, 1 }, PointQuad, Line2Shape, Line2Shape,
171 { 0, 1 },
172 1, { 0 },
173 1, { 0 },
174 { 0, 1, 2 },
175 { -1 } },
176 { Line3Face, "Line3Face", 3, 1, 1, { 0, 3 }, Line2Face,
177 { 0, 1 }, PointQuad, Line3Shape, Line3Shape,
178 { 0, 1, 2 },
179 1, { 0 },
180 1, { 0 },
181 { 0, 1, 2 },
182 { -1 } },
183 { Line4Face, "Line4Face", 4, 1, 1, { 0, 4 }, Line2Face,
184 { 0, 1 }, PointQuad, Line4Shape, Line4Shape,
185 { 0, 1, 2, 3 },
186 1, { 0 },
187 1, { 0 },
188 { 0, 1, 2 },
189 { -1 } },
190 { Tri3Face, "Tri3Face", 3, 1, 1, { 0, 3 }, Tri3Face,
191 { 0, 1, 2 }, LineQuad, Tri3Shape, Tri3Shape,
192 { 0, 1, 2 },
193 2, { 0, 1 },
194 2, { 0, 1 },
195 { 1, 0, 2 },
196 { -1 } },
197 { Tri6Face, "Tri6Face", 6, 1, 1, { 0, 6 }, Tri3Face,
198 { 0, 1, 2 }, LineQuad, Tri6Shape, Tri6Shape,
199 { 0, 1, 2, 3, 4, 5 },
200 3, { 0, 1, 3 },
201 3, { 0, 1, 3 },
202 { 1, 0, 2, 3, 5, 4 },
203 { -1 } },
204 { Tri9Face, "Tri9Face", 9, 1, 1, { 0, 9 }, Tri3Face,
205 { 0, 1, 2 }, LineQuad, Tri9Shape, Tri9Shape,
206 { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
207 4, { 0, 1, 3, 4 },
208 4, { 0, 1, 3, 4 },
209 { 1, 0, 2, 4, 3, 7, 8, 6, 5 },
210 { -1 } },
211 { Tri10Face, "Tri10Face", 10, 1, 1, { 0, 10 }, Tri3Face,
212 { 0, 1, 2 }, LineQuad, Tri10Shape, Tri10Shape,
213 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
214 4, { 0, 1, 3, 4 },
215 4, { 0, 1, 3, 4 },
216 { 1, 0, 2, 4, 3, 7, 8, 6, 5, 9 },
217 { -1 } },
218 { Rec4Face, "Rec4Face", 4, 1, 1, { 0, 4 }, Rec4Face,
219 { 0, 1, 2, 3 }, LineQuad, Rec4Shape, Rec4Shape,
220 { 0, 1, 2, 3 },
221 2, { 0, 1 },
222 2, { 0, 1 },
223 { 1, 0, 3, 2 },
224 { -1 } },
225 { Rec8Face, "Rec8Face", 8, 1, 1, { 0, 8 }, Rec4Face,
226 { 0, 1, 2, 3 }, LineQuad, Rec8Shape, Rec8Shape,
227 { 0, 1, 2, 3, 4, 5, 6, 7 },
228 3, { 0, 1, 4 },
229 3, { 0, 1, 4 },
230 { 1, 0, 3, 2, 4, 7, 6, 5 },
231 { -1 } },
232 { Rec9Face, "Rec9Face", 9, 1, 1, { 0, 9 }, Rec4Face,
233 { 0, 1, 2, 3 }, LineQuad, Rec9Shape, Rec9Shape,
234 { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
235 3, { 0, 1, 4 },
236 3, { 0, 1, 4 },
237 { 1, 0, 3, 2, 4, 7, 6, 5, 8 },
238 { -1 } },
239 { Rec12Face, "Rec12Face", 12, 1, 1, { 0, 12 }, Rec4Face,
240 { 0, 1, 2, 3 }, LineQuad, Rec12Shape, Rec12Shape,
241 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
242 4, { 0, 1, 4, 5 },
243 4, { 0, 1, 4, 5 },
244 { 1, 0, 3, 2, 5, 4, 11, 10, 9, 8, 7, 6 },
245 { -1 } },
246 { Rec16Face, "Rec16Face", 16, 1, 1, { 0, 16 }, Rec4Face,
247 { 0, 1, 2, 3 }, LineQuad, Rec16Shape, Rec16Shape,
248 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
249 4, { 0, 1, 4, 5 },
250 4, { 0, 1, 4, 5 },
251 { 1, 0, 3, 2, 5, 4, 11, 10, 9, 8, 7, 6, 13, 12, 15, 14 },
252 { -1 } },
253 { Tet4Face, "Tet4Face", 4, 1, 1, { 0, 4 }, Tet4Face,
254 { 0, 1, 2, 3 }, TriQuad, Tet4Shape, Tet4Shape,
255 { 0, 1, 2, 3 },
256 3, { 0, 1, 2 },
257 4, { 0, 1, 2, 3 },
258 { 1, 2, 0, 3 },
259 { 0, 2, 1, 3 } },
260 { Tet10Face, "Tet10Face", 10, 1, 1, { 0, 10 }, Tet4Face,
261 { 0, 1, 2, 3 }, TriQuad, Tet10Shape, Tet10Shape,
262 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
263 6, { 0, 1, 2, 4, 5, 6 },
264 6, { 0, 1, 2, 4, 5, 6 },
265 { 1, 2, 0, 3, 5, 6, 4, 8, 9, 7 },
266 { 0, 2, 1, 3, 6, 7, 9, 8 } },
267 { Tet16Face, "Tet16Face", 16, 1, 1, { 0, 16 }, Tet4Face,
268 { 0, 1, 2, 3 }, TriQuad, Tet16Shape, Tet16Shape,
269 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
270 9, { 0, 1, 2, 4, 5, 6, 7, 8, 9 },
271 9, { 0, 1, 2, 4, 5, 6, 7, 8, 9 },
272 { 1, 2, 0, 3, 6, 7, 8, 9, 4, 5, 11, 12, 10, 14, 15, 13 },
273 { 0, 2, 1, 3, 9, 8, 7, 6, 5, 4, 9, 8, 7, 6, 10, 12, 11, 13, 15, 14 } },
274 { Hex8Face, "Hex8Face", 8, 1, 1, { 0, 8 }, Hex8Face,
275 { 0, 1, 2, 3, 4, 5, 6, 7 }, RecQuad, Hex8Shape, Hex8Shape,
276 { 0, 1, 2, 3, 4, 5, 6, 7 },
277 4, { 0, 1, 2, 3 },
278 4, { 0, 1, 2, 3 },
279 { 1, 2, 3, 0, 5, 6, 7, 4 },
280 { 0, 3, 2, 1, 4, 7, 6, 5 } },
281 { Hex20Face, "Hex20Face", 20, 1, 1, { 0, 20 }, Hex8Face,
282 { 0, 1, 2, 3, 4, 5, 6, 7 }, RecQuad, Hex20Shape, Hex20Shape,
283 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
284 8, { 0, 1, 2, 3, 8, 9, 10, 11 },
285 8, { 0, 1, 2, 3, 8, 9, 10, 11 },
286 { 1, 2, 3, 0, 5, 6, 7, 4, 9, 10, 11, 8, 13, 14, 15, 12, 17, 18, 19, 16 },
287 { 0, 3, 2, 1, 4, 7, 6, 5, 11, 10, 9, 8, 12, 15, 14, 13, 19, 18, 17, 16 } },
288 { Hex27Face, "Hex27Face", 27, 1, 1, { 0, 27 }, Hex8Face,
289 { 0, 1, 2, 3, 4, 5, 6, 7 }, RecQuad, Hex27Shape, Hex27Shape,
290 { 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 9, { 0, 1, 2, 3, 8, 9, 10, 11, 20 },
292 9, { 0, 1, 2, 3, 8, 9, 10, 11, 20 },
293 { 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 { 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 { Hex32Face, "Hex32Face", 32, 1, 1, { 0, 32 }, Hex8Face,
296 { 0, 1, 2, 3, 4, 5, 6, 7 }, RecQuad, Hex32Shape, Hex32Shape,
297 { 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 12, { 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15 },
299 12, { 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15 },
300 { 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 { 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 { Point1_Contact, "Point1_Contact", 2, 1, 2, { 0, 1, 2 }, Point1_Contact,
303 { 0, 1 }, PointQuad, Point1Shape, Point1Shape,
304 { 0, 1 },
305 1, { 0 },
306 -1, { -1 },
307 { -1 },
308 { -1 } },
309 { Line2_Contact, "Line2_Contact", 4, 1, 2, { 0, 2, 4 }, Line2_Contact,
310 { 0, 1, 2, 3 }, LineQuad, Line2Shape, Line2Shape,
311 { 0, 1, 2, 3 },
312 2, { 0, 1 },
313 -1, { -1 },
314 { -1 },
315 { -1 } },
316 { Line3_Contact, "Line3_Contact", 6, 1, 2, { 0, 3, 6 }, Line2_Contact,
317 { 0, 1, 3, 4 }, LineQuad, Line3Shape, Line3Shape,
318 { 0, 1, 2, 3, 4, 5 },
319 3, { 0, 1, 2 },
320 -1, { -1 },
321 { -1 },
322 { -1 } },
323 { Line4_Contact, "Line4_Contact", 8, 1, 2, { 0, 4, 8 }, Line2_Contact,
324 { 0, 1, 4, 5 }, LineQuad, Line4Shape, Line4Shape,
325 { 0, 1, 2, 3, 4, 5, 6, 7 },
326 4, { 0, 1, 2, 3 },
327 -1, { -1 },
328 { -1 },
329 { -1 } },
330 { Tri3_Contact, "Tri3_Contact", 6, 1, 2, { 0, 3, 6 }, Tri3_Contact,
331 { 0, 1, 2, 3, 4, 5 }, TriQuad, Tri3Shape, Tri3Shape,
332 { 0, 1, 2, 3, 4, 5 },
333 3, { 0, 1, 2 },
334 -1, { -1 },
335 { -1 },
336 { -1 } },
337 { Tri6_Contact, "Tri6_Contact", 12, 1, 2, { 0, 6, 12 }, Tri3_Contact,
338 { 0, 1, 2, 6, 7, 8 }, TriQuad, Tri6Shape, Tri6Shape,
339 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
340 6, { 0, 1, 2, 3, 4, 5 },
341 -1, { -1 },
342 { -1 },
343 { -1 } },
344 { Tri9_Contact, "Tri9_Contact", 18, 1, 2, { 0, 9, 18 }, Tri3_Contact,
345 { 0, 1, 2, 9, 10, 11 }, TriQuad, Tri9Shape, Tri9Shape,
346 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 },
347 9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
348 -1, { -1 },
349 { -1 },
350 { -1 } },
351 { Tri10_Contact, "Tri10_Contact", 20, 1, 2, { 0, 10, 20 }, Tri3_Contact,
352 { 0, 1, 2, 10, 11, 12 }, TriQuad, Tri10Shape, Tri10Shape,
353 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
354 10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
355 -1, { -1 },
356 { -1 },
357 { -1 } },
358 { Rec4_Contact, "Rec4_Contact", 8, 1, 2, { 0, 4, 8 }, Rec4_Contact,
359 { 0, 1, 2, 3, 4, 5, 6, 7 }, RecQuad, Rec4Shape, Rec4Shape,
360 { 0, 1, 2, 3, 4, 5, 6, 7 },
361 4, { 0, 1, 2, 3 },
362 -1, { -1 },
363 { -1 },
364 { -1 } },
365 { Rec8_Contact, "Rec8_Contact", 16, 1, 2, { 0, 8, 16 }, Rec4_Contact,
366 { 0, 1, 2, 3, 8, 9, 10, 11 }, RecQuad, Rec8Shape, Rec8Shape,
367 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
368 8, { 0, 1, 2, 3, 4, 5, 6, 7 },
369 -1, { -1 },
370 { -1 },
371 { -1 } },
372 { Rec9_Contact, "Rec9_Contact", 18, 1, 2, { 0, 9, 18 }, Rec4_Contact,
373 { 0, 1, 2, 3, 9, 10, 11, 12 }, RecQuad, Rec9Shape, Rec9Shape,
374 { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 },
375 9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
376 -1, { -1 },
377 { -1 },
378 { -1 } },
379 { Rec12_Contact, "Rec12_Contact", 24, 1, 2, { 0, 12, 24 }, Rec4_Contact,
380 { 0, 1, 2, 3, 12, 13, 14, 15 }, RecQuad, Rec12Shape, Rec12Shape,
381 { 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 12, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
383 -1, { -1 },
384 { -1 },
385 { -1 } },
386 { Rec16_Contact, "Rec16_Contact", 32, 1, 2, { 0, 16, 32 }, Rec4_Contact,
387 { 0, 1, 2, 3, 16, 17, 18, 19 }, RecQuad, Rec16Shape, Rec16Shape,
388 { 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 -1, { -1 },
391 { -1 },
392 { -1 } },
393 { Line2Face_Contact, "Line2Face_Contact", 4, 1, 2, { 0, 2, 4 }, Line2Face_Contact,
394 { 0, 1, 2, 3 }, PointQuad, Line2Shape, Line2Shape,
395 { 0, 1, 2, 3 },
396 1, { 0 },
397 -1, { -1 },
398 { -1 },
399 { -1 } },
400 { Line3Face_Contact, "Line3Face_Contact", 6, 1, 2, { 0, 3, 6 }, Line2Face_Contact,
401 { 0, 1, 3, 4 }, PointQuad, Line3Shape, Line3Shape,
402 { 0, 1, 2, 3, 4, 5 },
403 1, { 0 },
404 -1, { -1 },
405 { -1 },
406 { -1 } },
407 { Line4Face_Contact, "Line4Face_Contact", 8, 1, 2, { 0, 4, 8 }, Line2Face_Contact,
408 { 0, 1, 4, 5 }, PointQuad, Line4Shape, Line4Shape,
409 { 0, 1, 2, 3, 4, 5, 6, 7 },
410 1, { 0 },
411 -1, { -1 },
412 { -1 },
413 { -1 } },
414 { Tri3Face_Contact, "Tri3Face_Contact", 6, 1, 2, { 0, 3, 6 }, Tri3Face_Contact,
415 { 0, 1, 2, 3, 4, 5 }, LineQuad, Tri3Shape, Tri3Shape,
416 { 0, 1, 2, 3, 4, 5 },
417 2, { 0, 1 },
418 -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
569 };
570 /**************************************************************
571
572 creates a ReferenceElement of type id and a given integration order
573
574 */
575
576
577 Finley_ReferenceElement* Finley_ReferenceElement_alloc(ElementTypeId id, int order)
578 {
579 dim_t nsub, numQuadNodes, numQuadNodes2;
580 double *quadWeights=NULL, *quadNodes=NULL, *quadWeights2=NULL, *quadNodes2=NULL;
581 Finley_ReferenceElement *out=NULL;
582 Finley_QuadInfo* quadscheme;
583 Finley_ShapeFunctionInfo* parametrization, *basisfunction, *linearbasisfunction;
584 Finley_ReferenceElementInfo *type, *linear_type;
585
586 type=Finley_ReferenceElement_getInfo(id);
587 if (type == NULL) {
588 Finley_setError(VALUE_ERROR,"Finley_ReferenceElement_alloc: unable to identify element type.");
589 return NULL;
590 }
591 linear_type=Finley_ReferenceElement_getInfo(type->LinearTypeId);
592 if (linear_type == NULL) {
593 Finley_setError(VALUE_ERROR,"Finley_ReferenceElement_alloc: unable to identify linear element type.");
594 return NULL;
595 }
596
597
598
599 out=MEMALLOC(1,Finley_ReferenceElement);
600 if (Finley_checkPtr(out)) return NULL;
601
602 out->reference_counter=0;
603 out->Parametrization=NULL;
604 out->BasisFunctions=NULL;
605 out->LinearBasisFunctions=NULL;
606 out->Type=type;
607 out->numNodes=out->Type->numNodes;
608 out->LinearType=linear_type;
609 out->numLinearNodes=out->LinearType->numNodes;
610 out->integrationOrder=-1;
611 out->DBasisFunctionDv=NULL;
612 out->DBasisFunctionDvShared=TRUE;
613
614 quadscheme=Finley_QuadInfo_getInfo(out->Type->Quadrature);
615 parametrization=Finley_ShapeFunction_getInfo(out->Type->Parametrization);
616 basisfunction=Finley_ShapeFunction_getInfo(out->Type->BasisFunctions);
617 linearbasisfunction=Finley_ShapeFunction_getInfo(Finley_ReferenceElement_InfoList[out->Type->LinearTypeId].BasisFunctions);
618 nsub=out->Type->numSubElements;
619 out->numLocalDim=quadscheme->numDim;
620
621
622 /* set up the basic integration scheme
623 note that quadscheme->numDim is not necessarily the diemnsion of the element
624 */
625
626 if (order<0) order=MAX(2*basisfunction->numOrder,0);
627 out->integrationOrder=order;
628
629 numQuadNodes=quadscheme->getNumQuadNodes(order);
630
631 quadNodes=MEMALLOC(numQuadNodes*quadscheme->numDim*nsub,double);
632 quadWeights=MEMALLOC(numQuadNodes*nsub,double);
633 if ( !( Finley_checkPtr(quadNodes) || Finley_checkPtr(quadWeights) ) ) {
634
635 quadscheme->getQuadNodes(numQuadNodes, quadNodes, quadWeights);
636
637 /* set the basis functions on the quadrature points:
638 * note: Finley_ShapeFunction_alloc will introduce 0. if the dimensions of the quadrature scheme and the dimension of the element don;t match.
639 */
640
641
642 /*
643 * before we can set the shape function for the parametrization the quadrature scheme needs to be replicated :
644 */
645
646 if (nsub>1) {
647 out->DBasisFunctionDv=MEMALLOC(numQuadNodes*nsub* (basisfunction->numShapes) * (basisfunction->numDim), double );
648 out->DBasisFunctionDvShared=FALSE;
649
650 out->BasisFunctions=Finley_ShapeFunction_alloc(basisfunction->TypeId, quadscheme->numDim, numQuadNodes, quadNodes, quadWeights);
651 quadNodes2=MEMALLOC(numQuadNodes*quadscheme->numDim*nsub,double);
652 quadWeights2=MEMALLOC(numQuadNodes*nsub,double);
653 if ( !( Finley_checkPtr(quadNodes2) || Finley_checkPtr(quadWeights2) || Finley_checkPtr(out->DBasisFunctionDv)) ) {
654
655 numQuadNodes2=quadscheme->getMacro(nsub,out->BasisFunctions->numQuadNodes,
656 out->BasisFunctions->QuadNodes,
657 out->BasisFunctions->QuadWeights,
658 out->BasisFunctions->Type->numShapes, out->BasisFunctions->dSdv,
659 numQuadNodes*nsub, quadNodes2, quadWeights2,
660 out->DBasisFunctionDv);
661 if (Finley_noError()) {
662 out->Parametrization=Finley_ShapeFunction_alloc(parametrization->TypeId, quadscheme->numDim, numQuadNodes2, quadNodes2, quadWeights2);
663 out->LinearBasisFunctions=Finley_ShapeFunction_alloc(linearbasisfunction->TypeId, quadscheme->numDim, numQuadNodes2, quadNodes2, quadWeights2);
664 }
665
666 }
667 MEMFREE(quadNodes2);
668 MEMFREE(quadWeights2);
669
670 } else {
671 out->Parametrization=Finley_ShapeFunction_alloc(parametrization->TypeId, quadscheme->numDim, numQuadNodes*nsub, quadNodes, quadWeights);
672 out->BasisFunctions=Finley_ShapeFunction_alloc(basisfunction->TypeId, quadscheme->numDim, numQuadNodes, quadNodes, quadWeights);
673 out->LinearBasisFunctions=Finley_ShapeFunction_alloc(linearbasisfunction->TypeId, quadscheme->numDim, numQuadNodes, quadNodes, quadWeights);
674 out->DBasisFunctionDv=out->BasisFunctions->dSdv;
675 out->DBasisFunctionDvShared=TRUE;
676 }
677 }
678 MEMFREE(quadNodes);
679 MEMFREE(quadWeights);
680 if (Finley_noError()) {
681 return Finley_ReferenceElement_reference(out);
682 } else {
683 Finley_ReferenceElement_dealloc(out);
684 return NULL;
685 }
686 }
687
688 /**************************************************************/
689
690 void Finley_ReferenceElement_dealloc(Finley_ReferenceElement* in) {
691 if (in!=NULL) {
692 in->reference_counter--;
693 if (in->reference_counter<1) {
694 Finley_ShapeFunction_dealloc(in->Parametrization);
695 Finley_ShapeFunction_dealloc(in->BasisFunctions);
696 Finley_ShapeFunction_dealloc(in->LinearBasisFunctions);
697 if (! in->DBasisFunctionDvShared) MEMFREE(in->DBasisFunctionDv);
698 MEMFREE(in);
699 }
700 }
701
702 }
703
704 /**************************************************************/
705
706 ElementTypeId Finley_ReferenceElement_getTypeId(char* element_type) {
707 int ptr=0;
708 ElementTypeId out=NoRef;
709 while (Finley_ReferenceElement_InfoList[ptr].TypeId!=NoRef && out==NoRef) {
710 if (strcmp(element_type,Finley_ReferenceElement_InfoList[ptr].Name)==0) out=Finley_ReferenceElement_InfoList[ptr].TypeId;
711 ptr++;
712 }
713 return out;
714 }
715
716 Finley_ReferenceElement* Finley_ReferenceElement_reference(Finley_ReferenceElement* in) {
717 if (in!=NULL) ++(in->reference_counter);
718 return in;
719 }
720
721 Finley_ReferenceElementInfo* Finley_ReferenceElement_getInfo(ElementTypeId id)
722 {
723 int ptr=0;
724 Finley_ReferenceElementInfo* out=NULL;
725 while (Finley_ReferenceElement_InfoList[ptr].TypeId!=NoRef && out==NULL) {
726 if (Finley_ReferenceElement_InfoList[ptr].TypeId==id) out=&(Finley_ReferenceElement_InfoList[ptr]);
727 ptr++;
728 }
729 if (out==NULL) {
730 Finley_setError(VALUE_ERROR,"Finley_ReferenceElement_getInfo: cannot find requested reference element.");
731 }
732 return out;
733 }
734
735

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26