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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1170 - (hide annotations)
Fri May 25 05:24:57 2007 UTC (12 years, 7 months ago) by btully
File MIME type: text/plain
File size: 20523 byte(s)
Added new methods for integration of Tri's and Tet's For Order 2 and 3.
NB: There is a conflict in the testing of the getNormal() function. On consultation with Lutz, we have concluded this is an issue with the test rather than the new methods.

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26