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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/esys2/finley/src/finleyC/ReferenceElements.c revision 150 by jgs, Thu Sep 15 03:44:45 2005 UTC trunk/finley/src/ReferenceElements.c revision 2748 by gross, Tue Nov 17 07:32:59 2009 UTC
# Line 1  Line 1 
 /*  
  ******************************************************************************  
  *                                                                            *  
  *       COPYRIGHT  ACcESS 2003,2004,2005 -  All Rights Reserved              *  
  *                                                                            *  
  * This software is the property of ACcESS. No part of this code              *  
  * may be copied in any form or by any means without the expressed written    *  
  * consent of ACcESS.  Copying, use or modification of this software          *  
  * by any unauthorised person is illegal unless that person has a software    *  
  * license agreement with ACcESS.                                             *  
  *                                                                            *  
  ******************************************************************************  
 */  
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    
 /*   Finley: Reference elements */  
14    
15  /**************************************************************/  /**************************************************************/
16    
17  /*   Author: gross@access.edu.au */  /*   Finley: Reference elements */
 /*   Version: $Id$ */  
18    
19  /**************************************************************/  /**************************************************************/
20    
21  #include "ReferenceElements.h"  #include "ReferenceElements.h"
22    
23  /**************************************************************/  /**************************************************************
24    
25        this list has been generated by generateReferenceElementList.py:.
26    */
27    
28  Finley_RefElementInfo Finley_RefElement_InfoList[]={  Finley_ReferenceElementInfo Finley_ReferenceElement_InfoList[]={
29    {Point1,     "Point1",     0,  1,  1, 1, 1,  { Point1, "Point1", 1, 1, 1, { 0, 1 }, Point1,
30      Point1, {0},      { 0 }, PointQuad, Point1Shape, Point1Shape,
31      Finley_Shape_Point1, Finley_Quad_getNodesPoint,       Finley_Quad_getNumNodesPoint,      { 0 },
32       1,{0},    1, { 0 },
33       1,{0}, {0},{-1}},    1, { 0 },
34    {Line2,      "Line2",      1,  2,  2, 1, 2,      { 0 },
35       Line2, {0,1},      { -1 } },
36       Finley_Shape_Line2,  Finley_Quad_getNodesLine,        Finley_Quad_getNumNodesLine,  { Line2, "Line2", 2, 1, 1, { 0, 2 }, Line2,
37       2,{0,1},      { 0, 1 }, LineQuad, Line2Shape, Line2Shape,
38       2,{0,1}, {1,0},{-1}},      { 0, 1 },
39    {Line3, "Line3",      1,  3,  3, 2, 2,    2, { 0, 1 },
40       Line2, {0,1},    2, { 0, 1 },
41       Finley_Shape_Line3,  Finley_Quad_getNodesLine,        Finley_Quad_getNumNodesLine,      { 1, 0 },
42       3,{0,1,2},      { -1 } },
43       3,{0,1,2}, {1,0,2},{-1}},  { Line3, "Line3", 3, 1, 1, { 0, 3 }, Line2,
44    {Line4, "Line4",      1,  4,  4, 3, 2,      { 0, 1 }, LineQuad, Line3Shape, Line3Shape,
45       Line2, {0,1},      { 0, 1, 2 },
46       Finley_Shape_Line4,  Finley_Quad_getNodesLine,        Finley_Quad_getNumNodesLine,    3, { 0, 1, 2 },
47       4,{0,1,2,3},    3, { 0, 1, 2 },
48       4,{0,1,2,3}, {1,0,3,2},{-1}},      { 1, 0, 2 },
49    {Tri3,       "Tri3",       2,  3,  3, 1, 3,      { -1 } },
50       Tri3, {0,1,2},  { Line4, "Line4", 4, 1, 1, { 0, 4 }, Line2,
51       Finley_Shape_Tri3,   Finley_Quad_getNodesTri,         Finley_Quad_getNumNodesTri,      { 0, 1 }, LineQuad, Line4Shape, Line4Shape,
52       3,{0,1,2},      { 0, 1, 2, 3 },
53       3,{0,1,2}, {1,2,0},{0,2,1}},    4, { 0, 1, 2, 3 },
54    {Tri6,       "Tri6",       2,  6,  6, 2, 3,    4, { 0, 1, 2, 3 },
55       Tri3, {0,1,2},      { 1, 0, 3, 2 },
56       Finley_Shape_Tri6,   Finley_Quad_getNodesTri,         Finley_Quad_getNumNodesTri,      { -1 } },
57       6,{0,1,2,3,4,5},  { Tri3, "Tri3", 3, 1, 1, { 0, 3 }, Tri3,
58       6,{0,1,2,3,4,5}, {1,2,0,4,5,3},{0,2,1,5,4,3}},      { 0, 1, 2 }, TriQuad, Tri3Shape, Tri3Shape,
59    {Tri9,       "Tri9",       2,  9,  9, 3, 3,      { 0, 1, 2 },
60       Tri3, {0,1,2},    3, { 0, 1, 2 },
61       Finley_Shape_Tri9,   Finley_Quad_getNodesTri,         Finley_Quad_getNumNodesTri,    3, { 0, 1, 2 },
62       9,{0,1,2,3,4,5,6,7,8},      { 1, 2, 0 },
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}},      { 0, 2, 1 } },
64    {Tri10, "Tri10",      2, 10, 10, 3, 3,  { Tri6, "Tri6", 6, 1, 1, { 0, 6 }, Tri3,
65       Tri3, {0,1,2},      { 0, 1, 2 }, TriQuad, Tri6Shape, Tri6Shape,
66       Finley_Shape_Tri10,  Finley_Quad_getNodesTri,         Finley_Quad_getNumNodesTri,      { 0, 1, 2, 3, 4, 5 },
67       10,{0,1,2,3,4,5,6,7,8,9},    6, { 0, 1, 2, 3, 4, 5 },
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}},    6, { 0, 1, 2, 3, 4, 5 },
69    {Rec4, "Rec4",       2,  4,  4, 1, 4,      { 1, 2, 0, 4, 5, 3 },
70       Rec4, {0,1,2,3},      { 0, 2, 1, 5, 4, 3 } },
71       Finley_Shape_Rec4,   Finley_Quad_getNodesRec,         Finley_Quad_getNumNodesRec,  { Tri9, "Tri9", 9, 1, 1, { 0, 9 }, Tri3,
72       4,{0,1,2,3},      { 0, 1, 2 }, TriQuad, Tri9Shape, Tri9Shape,
73       4,{0,1,2,3}, {1,2,3,0},{0,3,2,1}},      { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
74    {Rec8,       "Rec8",       2,  8,  8, 2, 4,    9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
75       Rec4, {0,1,2,3},    9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
76       Finley_Shape_Rec8,   Finley_Quad_getNodesRec,         Finley_Quad_getNumNodesRec,      { 1, 2, 0, 5, 6, 7, 8, 3, 4 },
77       8,{0,1,2,3,4,5,6,7},      { 0, 2, 1, 8, 7, 6, 5, 4, 3 } },
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}},  { Tri10, "Tri10", 10, 1, 1, { 0, 10 }, Tri3,
79    {Rec9,       "Rec9",       2,  9,  9, 2, 4,      { 0, 1, 2 }, TriQuad, Tri10Shape, Tri10Shape,
80       Rec4, {0,1,2,3},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
81       Finley_Shape_Rec9,   Finley_Quad_getNodesRec,         Finley_Quad_getNumNodesRec,    10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
82       9,{0,1,2,3,4,5,6,7,8},    10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
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}},      { 1, 2, 0, 5, 6, 7, 8, 3, 4, 9 },
84    {Rec12,      "Rec12",      2, 12, 12, 3, 4,      { 0, 2, 1, 8, 7, 6, 5, 4, 3, 9 } },
85       Rec4, {0,1,2,3},  { Rec4, "Rec4", 4, 1, 1, { 0, 4 }, Rec4,
86       Finley_Shape_Rec12,  Finley_Quad_getNodesRec,         Finley_Quad_getNumNodesRec,      { 0, 1, 2, 3 }, RecQuad, Rec4Shape, Rec4Shape,
87       12,{0,1,2,3,4,5,6,7,8,9,10,11},      { 0, 1, 2, 3 },
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}},    4, { 0, 1, 2, 3 },
89    {Rec16,      "Rec16",      2, 16, 16, 3, 4,    4, { 0, 1, 2, 3 },
90       Rec4, {0,1,2,3},      { 1, 2, 3, 0 },
91       Finley_Shape_Rec16,  Finley_Quad_getNodesRec,         Finley_Quad_getNumNodesRec,      { 0, 3, 2, 1 } },
92       16,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},  { Rec8, "Rec8", 8, 1, 1, { 0, 8 }, Rec4,
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}},      { 0, 1, 2, 3 }, RecQuad, Rec8Shape, Rec8Shape,
94    {Tet4,       "Tet4",       3,  4,  4, 1, 4,      { 0, 1, 2, 3, 4, 5, 6, 7 },
95       Tet4, {0,1,2,3},    8, { 0, 1, 2, 3, 4, 5, 6, 7 },
96       Finley_Shape_Tet4,   Finley_Quad_getNodesTet,         Finley_Quad_getNumNodesTet,    8, { 0, 1, 2, 3, 4, 5, 6, 7 },
97       4,{0,1,2,3},      { 1, 2, 3, 0, 5, 6, 7, 4 },
98       -1,{}, {},{}},      { 0, 3, 2, 1, 7, 6, 5, 4 } },
99    {Tet10,      "Tet10",      3, 10, 10, 2, 4,  { Rec9, "Rec9", 9, 1, 1, { 0, 9 }, Rec4,
100       Tet4, {0,1,2,3},      { 0, 1, 2, 3 }, RecQuad, Rec9Shape, Rec9Shape,
101       Finley_Shape_Tet10,  Finley_Quad_getNodesTet,         Finley_Quad_getNumNodesTet,      { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
102       10,{0,1,2,3,4,5,6,7,8,9},    9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
103       -1,{}, {},{}},    9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
104    {Tet16,      "Tet16",      3, 16, 16, 3, 4,      { 1, 2, 3, 0, 5, 6, 7, 4, 8 },
105       Tet4, {0,1,2,3},      { 0, 3, 2, 1, 7, 6, 5, 4, 8 } },
106       Finley_Shape_Tet16,  Finley_Quad_getNodesTet,         Finley_Quad_getNumNodesTet,  { Rec12, "Rec12", 12, 1, 1, { 0, 12 }, Rec4,
107       16,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},      { 0, 1, 2, 3 }, RecQuad, Rec12Shape, Rec12Shape,
108       -1,{}, {},{}},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
109    {Hex8,       "Hex8",       3,  8,  8, 1, 8,    12, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
110       Hex8, {0,1,2,3,4,5,6,7},    12, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
111       Finley_Shape_Hex8,   Finley_Quad_getNodesHex,         Finley_Quad_getNumNodesHex,      { 1, 2, 3, 0, 6, 7, 8, 9, 10, 11, 4, 5 },
112       8,{0,1,2,3,4,5,6,7},      { 0, 3, 2, 1, 11, 10, 9, 8, 7, 6, 5, 4 } },
113       -1,{}, {},{}},  { Rec16, "Rec16", 16, 1, 1, { 0, 16 }, Rec4,
114    {Hex20,      "Hex20",      3, 20, 20, 2, 8,      { 0, 1, 2, 3 }, RecQuad, Rec16Shape, Rec16Shape,
115       Hex8, {0,1,2,3,4,5,6,7},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
116       Finley_Shape_Hex20,  Finley_Quad_getNodesHex,         Finley_Quad_getNumNodesHex,    16, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
117       20,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19},    16, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
118       -1,{}, {},{}},      { 1, 2, 3, 0, 6, 7, 8, 9, 10, 11, 4, 5, 13, 14, 15, 12 },
119    {Hex32,      "Hex32",      3, 32, 32, 3, 8,      { 0, 3, 2, 1, 11, 10, 9, 8, 7, 6, 5, 4, 12, 15, 14, 13 } },
120       Hex8, {0,1,2,3,4,5,6,7},  { Tet4, "Tet4", 4, 1, 1, { 0, 4 }, Tet4,
121       Finley_Shape_Hex32,  Finley_Quad_getNodesHex,         Finley_Quad_getNumNodesHex,      { 0, 1, 2, 3 }, TetQuad, Tet4Shape, Tet4Shape,
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},      { 0, 1, 2, 3 },
123       -1,{}, {},{}},    4, { 0, 1, 2, 3 },
124    {Line2Face,  "Line2Face",  1,  2,  2, 1, 1,    4, { 0, 1, 2, 3 },
125       Line2Face, {0,1},      { -1 },
126       Finley_Shape_Line2,  Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,      { -1 } },
127       1,{0},  { Tet10, "Tet10", 10, 1, 1, { 0, 10 }, Tet4,
128       1,{0}, {0,1,2},{-1}},      { 0, 1, 2, 3 }, TetQuad, Tet10Shape, Tet10Shape,
129    {Line3Face,  "Line3Face",  1,  3,  3, 2, 1,      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
130       Line2Face, {0,1},    10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
131       Finley_Shape_Line3,  Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,    10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
132       1,{0},      { -1 },
133       1,{0}, {0,1,2},{-1}},      { -1 } },
134    {Line4Face,  "Line4Face",  1,  4,  4, 3, 1,  { Tet16, "Tet16", 16, 1, 1, { 0, 16 }, Tet4,
135       Line2Face, {0,1},      { 0, 1, 2, 3 }, TetQuad, Tet16Shape, Tet16Shape,
136       Finley_Shape_Line4,  Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
137       1,{0},    16, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
138       1,{0}, {0,1,2},{-1}},    16, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
139    {Tri3Face,   "Tri3Face",   2,  3,  3, 1, 2,      { -1 },
140       Tri3Face, {0,1,2},      { -1 } },
141       Finley_Shape_Tri3,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,  { Hex8, "Hex8", 8, 1, 1, { 0, 8 }, Hex8,
142       2,{0,1},      { 0, 1, 2, 3, 4, 5, 6, 7 }, HexQuad, Hex8Shape, Hex8Shape,
143       2,{0,1}, {1,0,2},{-1}},      { 0, 1, 2, 3, 4, 5, 6, 7 },
144    {Tri6Face,   "Tri6Face",   2,  6,  6, 2, 2,    8, { 0, 1, 2, 3, 4, 5, 6, 7 },
145       Tri3Face, {0,1,2},    8, { 0, 1, 2, 3, 4, 5, 6, 7 },
146       Finley_Shape_Tri6,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { -1 },
147       3,{0,1,3},      { -1 } },
148       3,{0,1,3}, {1,0,2,3,5,4},{-1}},  { Hex20, "Hex20", 20, 1, 1, { 0, 20 }, Hex8,
149    {Tri9Face,   "Tri9Face",   2,  9,  9, 3, 2,      { 0, 1, 2, 3, 4, 5, 6, 7 }, HexQuad, Hex20Shape, Hex20Shape,
150       Tri3Face, {0,1,2},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
151       Finley_Shape_Tri9,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,    20, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
152       4,{0,1,3,4},    20, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
153       4,{0,1,3,4}, {1,0,2,4,3,7,8,6,5},{-1}},      { -1 },
154    {Tri10Face,  "Tri10Face",  2, 10, 10, 3, 2,      { -1 } },
155       Tri3Face, {0,1,2},  { Hex27, "Hex27", 27, 1, 1, { 0, 27 }, Hex8,
156       Finley_Shape_Tri10,  Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { 0, 1, 2, 3, 4, 5, 6, 7 }, HexQuad, Hex27Shape, Hex27Shape,
157       4,{0,1,3,4},      { 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       4,{0,1,3,4}, {1,0,2,4,3,7,8,6,5,9},{-1}},    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    {Rec4Face,   "Rec4Face",   2,  4,  4, 1, 2,    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       Rec4Face, {0,1,2,3},      { -1 },
161       Finley_Shape_Rec4,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { -1 } },
162       2,{0,1},  { Hex32, "Hex32", 32, 1, 1, { 0, 32 }, Hex8,
163       2,{0,1}, {1,0,3,2},{-1}},      { 0, 1, 2, 3, 4, 5, 6, 7 }, HexQuad, Hex32Shape, Hex32Shape,
164    {Rec8Face,   "Rec8Face",   2,  8,  8, 2, 2,      { 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       Rec4Face, {0,1,2,3},    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       Finley_Shape_Rec8,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,    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       3,{0,1,4},      { -1 },
168       3,{0,1,4}, {1,0,3,2,4,7,6,5},{-1}},      { -1 } },
169    {Rec9Face,   "Rec9Face",   2,  9,  9, 2, 2,  { Line2Face, "Line2Face", 2, 1, 1, { 0, 2 }, Line2Face,
170       Rec4Face, {0,1,2,3},      { 0, 1 }, PointQuad, Line2Shape, Line2Shape,
171       Finley_Shape_Rec9,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { 0, 1 },
172       3,{0,1,4},    1, { 0 },
173       3,{0,1,4}, {1,0,3,2,4,7,6,5,8},{-1}},    1, { 0 },
174    {Rec12Face,  "Rec12Face",  2, 12, 12, 3, 2,      { 0, 1, 2 },
175       Rec4Face, {0,1,2,3},      { -1 } },
176       Finley_Shape_Rec12,  Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,  { Line3Face, "Line3Face", 3, 1, 1, { 0, 3 }, Line2Face,
177       4,{0,1,4,5},      { 0, 1 }, PointQuad, Line3Shape, Line3Shape,
178       4,{0,1,4,5}, {1,0,3,2,5,4,11,10,9,8,7,6},{-1}},      { 0, 1, 2 },
179    {Rec16Face,  "Rec16Face",  2, 16, 16, 3, 2,    1, { 0 },
180       Rec4Face, {0,1,2,3},    1, { 0 },
181       Finley_Shape_Rec16,  Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { 0, 1, 2 },
182       4,{0,1,4,5},      { -1 } },
183       4,{0,1,4,5}, {1,0,3,2,5,4,11,10,9,8,7,6,13,12,15,14},{-1}},  { Line4Face, "Line4Face", 4, 1, 1, { 0, 4 }, Line2Face,
184    {Tet4Face,   "Tet4Face",   3,  4,  4, 1, 3,      { 0, 1 }, PointQuad, Line4Shape, Line4Shape,
185       Tet4Face, {0,1,2,3},      { 0, 1, 2, 3 },
186       Finley_Shape_Tet4,   Finley_Quad_getNodesTriOnFace,   Finley_Quad_getNumNodesTri,    1, { 0 },
187       3,{0,1,2},    1, { 0 },
188       3,{0,1,2}, {1,2,0,3},{0,2,1,3}},      { 0, 1, 2 },
189    {Tet10Face,  "Tet10Face",  3, 10, 10, 2, 3,      { -1 } },
190       Tet4Face, {0,1,2,3},  { Tri3Face, "Tri3Face", 3, 1, 1, { 0, 3 }, Tri3Face,
191       Finley_Shape_Tet10,  Finley_Quad_getNodesTriOnFace,   Finley_Quad_getNumNodesTri,      { 0, 1, 2 }, LineQuad, Tri3Shape, Tri3Shape,
192       4,{0,1,2,4,5,6},      { 0, 1, 2 },
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}},    2, { 0, 1 },
194    {Tet16Face,  "Tet16Face",  3, 16, 16, 3, 3,    2, { 0, 1 },
195       Tet4Face, {0,1,2,3},      { 1, 0, 2 },
196       Finley_Shape_Tet16,  Finley_Quad_getNodesTriOnFace,   Finley_Quad_getNumNodesTri,      { -1 } },
197       5,{0,1,2,4,5,6,7,8,9},  { Tri6Face, "Tri6Face", 6, 1, 1, { 0, 6 }, Tri3Face,
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}},      { 0, 1, 2 }, LineQuad, Tri6Shape, Tri6Shape,
199    {Hex8Face,   "Hex8Face",   3,  8,  8, 1, 4,      { 0, 1, 2, 3, 4, 5 },
200       Hex8Face, {0,1,2,3,4,5,6,7},    3, { 0, 1, 3 },
201       Finley_Shape_Hex8,   Finley_Quad_getNodesRecOnFace,   Finley_Quad_getNumNodesRec,    3, { 0, 1, 3 },
202       4,{0,1,2,3},      { 1, 0, 2, 3, 5, 4 },
203       4,{0,1,2,3}, {1,2,3,0,5,6,7,4},{0,3,2,1,4,7,6,5}},      { -1 } },
204    {Hex20Face,  "Hex20Face",  3, 20, 20, 2, 4,  { Tri9Face, "Tri9Face", 9, 1, 1, { 0, 9 }, Tri3Face,
205       Hex8Face, {0,1,2,3,4,5,6,7},      { 0, 1, 2 }, LineQuad, Tri9Shape, Tri9Shape,
206       Finley_Shape_Hex20,  Finley_Quad_getNodesRecOnFace,   Finley_Quad_getNumNodesRec,      { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
207       8,{0,1,2,3,8,9,10,11},    4, { 0, 1, 3, 4 },
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}},    4, { 0, 1, 3, 4 },
209    {Hex32Face,  "Hex32Face",  3, 32, 32, 3, 4,      { 1, 0, 2, 4, 3, 7, 8, 6, 5 },
210       Hex8Face, {0,1,2,3,4,5,6,7},      { -1 } },
211       Finley_Shape_Hex32,  Finley_Quad_getNodesRecOnFace,   Finley_Quad_getNumNodesRec,  { Tri10Face, "Tri10Face", 10, 1, 1, { 0, 10 }, Tri3Face,
212       12,{0,1,2,3,8,9,10,11,12,13,14,15},      { 0, 1, 2 }, LineQuad, Tri10Shape, Tri10Shape,
213       12,{0,1,2,3,8,9,10,11,12,13,14,15},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
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},    4, { 0, 1, 3, 4 },
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}},    4, { 0, 1, 3, 4 },
216        { 1, 0, 2, 4, 3, 7, 8, 6, 5, 9 },
217    {Point1_Contact, "Point1_Contact", 0,  2,  1, 1, 1,      { -1 } },
218       Point1_Contact, {0,1},  { Rec4Face, "Rec4Face", 4, 1, 1, { 0, 4 }, Rec4Face,
219       Finley_Shape_Point1, Finley_Quad_getNodesPoint, Finley_Quad_getNumNodesPoint,      { 0, 1, 2, 3 }, LineQuad, Rec4Shape, Rec4Shape,
220       1,{0},      { 0, 1, 2, 3 },
221       -1,{}, {},{}},    2, { 0, 1 },
222    {Line2_Contact,  "Line2_Contact",  1,  4,  2, 1, 2,    2, { 0, 1 },
223       Line2_Contact, {0,1,2,3},      { 1, 0, 3, 2 },
224       Finley_Shape_Line2,   Finley_Quad_getNodesLine,  Finley_Quad_getNumNodesLine,      { -1 } },
225       2,{0,1},  { Rec8Face, "Rec8Face", 8, 1, 1, { 0, 8 }, Rec4Face,
226       -1,{}, {},{}},      { 0, 1, 2, 3 }, LineQuad, Rec8Shape, Rec8Shape,
227    {Line3_Contact,  "Line3_Contact",  1,  6,  3, 2, 2,      { 0, 1, 2, 3, 4, 5, 6, 7 },
228       Line2_Contact, {0,1,3,4},    3, { 0, 1, 4 },
229       Finley_Shape_Line3,   Finley_Quad_getNodesLine,  Finley_Quad_getNumNodesLine,    3, { 0, 1, 4 },
230       3,{0,1,2},      { 1, 0, 3, 2, 4, 7, 6, 5 },
231       -1,{}, {},{}},      { -1 } },
232    {Line4_Contact,  "Line4_Contact",  1,  8,  4, 3, 2,  { Rec9Face, "Rec9Face", 9, 1, 1, { 0, 9 }, Rec4Face,
233       Line2_Contact, {0,1,4,5},      { 0, 1, 2, 3 }, LineQuad, Rec9Shape, Rec9Shape,
234       Finley_Shape_Line4,   Finley_Quad_getNodesLine,  Finley_Quad_getNumNodesLine,      { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
235       4,{0,1,2,3},    3, { 0, 1, 4 },
236       -1,{}, {},{}},    3, { 0, 1, 4 },
237    {Tri3_Contact,   "Tri3_Contact",   2,  6,  3, 1, 3,      { 1, 0, 3, 2, 4, 7, 6, 5, 8 },
238       Tri3_Contact, {0,1,2,3,4,5},      { -1 } },
239       Finley_Shape_Tri3,     Finley_Quad_getNodesTri,   Finley_Quad_getNumNodesTri,  { Rec12Face, "Rec12Face", 12, 1, 1, { 0, 12 }, Rec4Face,
240       3,{0,1,2},      { 0, 1, 2, 3 }, LineQuad, Rec12Shape, Rec12Shape,
241       -1,{}, {},{}},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
242    {Tri6_Contact,   "Tri6_Contact",   2, 12,  6, 2, 3,    4, { 0, 1, 4, 5 },
243       Tri3_Contact, {0,1,2,6,7,8},    4, { 0, 1, 4, 5 },
244       Finley_Shape_Tri6,     Finley_Quad_getNodesTri,   Finley_Quad_getNumNodesTri,      { 1, 0, 3, 2, 5, 4, 11, 10, 9, 8, 7, 6 },
245       6,{0,1,2,3,4,5},      { -1 } },
246       -1,{}, {},{}},  { Rec16Face, "Rec16Face", 16, 1, 1, { 0, 16 }, Rec4Face,
247    {Tri9_Contact,   "Tri9_Contact",   2, 18,  9, 3, 3,      { 0, 1, 2, 3 }, LineQuad, Rec16Shape, Rec16Shape,
248       Tri3_Contact, {0,1,2,9,10,11},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
249       Finley_Shape_Tri9,     Finley_Quad_getNodesTri,   Finley_Quad_getNumNodesTri,    4, { 0, 1, 4, 5 },
250       9,{0,1,2,3,4,5,6,7,8},    4, { 0, 1, 4, 5 },
251       -1,{}, {},{}},      { 1, 0, 3, 2, 5, 4, 11, 10, 9, 8, 7, 6, 13, 12, 15, 14 },
252    {Tri10_Contact,  "Tri10_Contact",  2, 20, 10, 3, 3,      { -1 } },
253       Tri3_Contact, {0,1,2,10,11,12},  { Tet4Face, "Tet4Face", 4, 1, 1, { 0, 4 }, Tet4Face,
254       Finley_Shape_Tri10,    Finley_Quad_getNodesTri,   Finley_Quad_getNumNodesTri,      { 0, 1, 2, 3 }, TriQuad, Tet4Shape, Tet4Shape,
255       10,{0,1,2,3,4,5,6,7,8,9},      { 0, 1, 2, 3 },
256       -1,{}, {},{}},    3, { 0, 1, 2 },
257    {Rec4_Contact,   "Rec4_Contact",   2,  8,  4, 1, 4,    4, { 0, 1, 2, 3 },
258       Rec4_Contact, {0,1,2,3,4,5,6,7},      { 1, 2, 0, 3 },
259       Finley_Shape_Rec4,     Finley_Quad_getNodesRec,   Finley_Quad_getNumNodesRec,      { 0, 2, 1, 3 } },
260       4,{0,1,2,3},  { Tet10Face, "Tet10Face", 10, 1, 1, { 0, 10 }, Tet4Face,
261       -1,{}, {},{}},      { 0, 1, 2, 3 }, TriQuad, Tet10Shape, Tet10Shape,
262    {Rec8_Contact,   "Rec8_Contact",   2, 16,  8, 2, 4,      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
263       Rec4_Contact, {0,1,2,3,8,9,10,11},    6, { 0, 1, 2, 4, 5, 6 },
264       Finley_Shape_Rec8,     Finley_Quad_getNodesRec,   Finley_Quad_getNumNodesRec,    6, { 0, 1, 2, 4, 5, 6 },
265       8,{0,1,2,3,4,5,6,7},      { 1, 2, 0, 3, 5, 6, 4, 8, 9, 7 },
266       -1,{}, {},{}},      { 0, 2, 1, 3, 6, 7, 9, 8 } },
267    {Rec9_Contact,   "Rec9_Contact",   2, 18,  9, 2, 4,  { Tet16Face, "Tet16Face", 16, 1, 1, { 0, 16 }, Tet4Face,
268       Rec4_Contact, {0,1,2,3,9,10,11,12},      { 0, 1, 2, 3 }, TriQuad, Tet16Shape, Tet16Shape,
269       Finley_Shape_Rec9,     Finley_Quad_getNodesRec,   Finley_Quad_getNumNodesRec,      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
270       9,{0,1,2,3,4,5,6,7,8},    9, { 0, 1, 2, 4, 5, 6, 7, 8, 9 },
271       -1,{}, {},{}},    9, { 0, 1, 2, 4, 5, 6, 7, 8, 9 },
272    {Rec12_Contact,  "Rec12_Contact",  2, 24, 12, 3, 4,      { 1, 2, 0, 3, 6, 7, 8, 9, 4, 5, 11, 12, 10, 14, 15, 13 },
273       Rec4_Contact, {0,1,2,3,12,13,14,15},      { 0, 2, 1, 3, 9, 8, 7, 6, 5, 4, 9, 8, 7, 6, 10, 12, 11, 13, 15, 14 } },
274       Finley_Shape_Rec12,    Finley_Quad_getNodesRec,   Finley_Quad_getNumNodesRec,  { Hex8Face, "Hex8Face", 8, 1, 1, { 0, 8 }, Hex8Face,
275       12,{0,1,2,3,4,5,6,7,8,9,10,11},      { 0, 1, 2, 3, 4, 5, 6, 7 }, RecQuad, Hex8Shape, Hex8Shape,
276       -1,{}, {},{}},      { 0, 1, 2, 3, 4, 5, 6, 7 },
277    {Rec16_Contact,  "Rec16_Contact",  2, 32, 16, 3, 4,    4, { 0, 1, 2, 3 },
278       Rec4_Contact, {0,1,2,3,16,17,18,19},    4, { 0, 1, 2, 3 },
279       Finley_Shape_Rec16,    Finley_Quad_getNodesRec,   Finley_Quad_getNumNodesRec,      { 1, 2, 3, 0, 5, 6, 7, 4 },
280       16,{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15},      { 0, 3, 2, 1, 4, 7, 6, 5 } },
281       -1,{}, {},{}},  { Hex20Face, "Hex20Face", 20, 1, 1, { 0, 20 }, Hex8Face,
282    {Line2Face_Contact,  "Line2Face_Contact",  1,  4,  2, 1, 1,      { 0, 1, 2, 3, 4, 5, 6, 7 }, RecQuad, Hex20Shape, Hex20Shape,
283       Line2Face_Contact,  {0,1,2,3},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
284       Finley_Shape_Line2,  Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,    8, { 0, 1, 2, 3, 8, 9, 10, 11 },
285       1,{0},    8, { 0, 1, 2, 3, 8, 9, 10, 11 },
286       -1,{}, {},{}},      { 1, 2, 3, 0, 5, 6, 7, 4, 9, 10, 11, 8, 13, 14, 15, 12, 17, 18, 19, 16 },
287    {Line3Face_Contact,  "Line3Face_Contact",  1,  6,  3, 2, 1,      { 0, 3, 2, 1, 4, 7, 6, 5, 11, 10, 9, 8, 12, 15, 14, 13, 19, 18, 17, 16 } },
288       Line2Face_Contact, {0,1,3,4},  { Hex27Face, "Hex27Face", 27, 1, 1, { 0, 27 }, Hex8Face,
289       Finley_Shape_Line3,  Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,      { 0, 1, 2, 3, 4, 5, 6, 7 }, RecQuad, Hex27Shape, Hex27Shape,
290       1,{0},      { 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       -1,{}, {},{}},    9, { 0, 1, 2, 3, 8, 9, 10, 11, 20 },
292    {Line4Face_Contact,  "Line4Face_Contact",  1,  8,  4, 3, 1,    9, { 0, 1, 2, 3, 8, 9, 10, 11, 20 },
293       Line2Face_Contact, {0,1,4,5},      { 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       Finley_Shape_Line4,  Finley_Quad_getNodesPointOnFace, Finley_Quad_getNumNodesPoint,      { 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       1,{0},  { Hex32Face, "Hex32Face", 32, 1, 1, { 0, 32 }, Hex8Face,
296       -1,{}, {},{}},      { 0, 1, 2, 3, 4, 5, 6, 7 }, RecQuad, Hex32Shape, Hex32Shape,
297    {Tri3Face_Contact,   "Tri3Face_Contact",   2,  6,  3, 1, 2,      { 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       Tri3Face_Contact, {0,1,2,3,4,5},    12, { 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15 },
299       Finley_Shape_Tri3,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,    12, { 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15 },
300       2,{0,1},      { 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       -1,{}, {},{}},      { 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    {Tri6Face_Contact,   "Tri6Face_Contact",   2,  12,  6, 2, 2,  { Point1_Contact, "Point1_Contact", 2, 1, 2, { 0, 1, 2 }, Point1_Contact,
303       Tri3Face_Contact, {0,1,2,6,7,8},      { 0, 1 }, PointQuad, Point1Shape, Point1Shape,
304       Finley_Shape_Tri6,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { 0, 1 },
305       3,{0,1,3},    1, { 0 },
306       -1,{}, {},{}},    -1, { -1 },
307    {Tri9Face_Contact,   "Tri9Face_Contact",   2,  18,  9, 3, 2,      { -1 },
308       Tri3Face_Contact, {0,1,2,9,10,11},      { -1 } },
309       Finley_Shape_Tri9,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,  { Line2_Contact, "Line2_Contact", 4, 1, 2, { 0, 2, 4 }, Line2_Contact,
310       4,{0,1,3,4},      { 0, 1, 2, 3 }, LineQuad, Line2Shape, Line2Shape,
311       -1,{}, {},{}},      { 0, 1, 2, 3 },
312    {Tri10Face_Contact,  "Tri10Face_Contact",  2, 20, 10, 3, 2,    2, { 0, 1 },
313       Tri3Face_Contact, {0,1,2,10,11,12},    -1, { -1 },
314       Finley_Shape_Tri10,  Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { -1 },
315       4,{0,1,3,4},      { -1 } },
316       -1,{}, {},{}},  { Line3_Contact, "Line3_Contact", 6, 1, 2, { 0, 3, 6 }, Line2_Contact,
317    {Rec4Face_Contact,   "Rec4Face_Contact",   2,  8,  4, 1, 2,      { 0, 1, 3, 4 }, LineQuad, Line3Shape, Line3Shape,
318       Rec4Face_Contact, {0,1,2,3,4,5,6,7},      { 0, 1, 2, 3, 4, 5 },
319       Finley_Shape_Rec4,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,    3, { 0, 1, 2 },
320       2,{0,1},    -1, { -1 },
321       -1,{}, {},{}},      { -1 },
322    {Rec8Face_Contact,   "Rec8Face_Contact",   2, 16,  8, 2, 2,      { -1 } },
323       Rec4Face_Contact, {0,1,2,3,8,9,10,11},  { Line4_Contact, "Line4_Contact", 8, 1, 2, { 0, 4, 8 }, Line2_Contact,
324       Finley_Shape_Rec8,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { 0, 1, 4, 5 }, LineQuad, Line4Shape, Line4Shape,
325       3,{0,1,4},      { 0, 1, 2, 3, 4, 5, 6, 7 },
326       -1,{}, {},{}},    4, { 0, 1, 2, 3 },
327    {Rec9Face_Contact,   "Rec9Face_Contact",   2, 18,  9, 2, 2,    -1, { -1 },
328       Rec4Face_Contact, {0,1,2,3,9,10,11,12},      { -1 },
329       Finley_Shape_Rec9,   Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { -1 } },
330       3,{0,1,4},  { Tri3_Contact, "Tri3_Contact", 6, 1, 2, { 0, 3, 6 }, Tri3_Contact,
331       -1,{}, {},{}},      { 0, 1, 2, 3, 4, 5 }, TriQuad, Tri3Shape, Tri3Shape,
332    {Rec12Face_Contact,  "Rec12Face_Contact",  2, 24, 12, 3, 2,      { 0, 1, 2, 3, 4, 5 },
333       Rec4Face_Contact, {0,1,2,3,12,13,14,15},    3, { 0, 1, 2 },
334       Finley_Shape_Rec12,  Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,    -1, { -1 },
335       4,{0,1,4,5},      { -1 },
336       -1,{}, {},{}},      { -1 } },
337    {Rec16Face_Contact,  "Rec16Face_Contact",  2, 32, 16, 3, 2,  { Tri6_Contact, "Tri6_Contact", 12, 1, 2, { 0, 6, 12 }, Tri3_Contact,
338       Rec4Face_Contact, {0,1,2,3,16,17,18,19},      { 0, 1, 2, 6, 7, 8 }, TriQuad, Tri6Shape, Tri6Shape,
339       Finley_Shape_Rec16,  Finley_Quad_getNodesLineOnFace,  Finley_Quad_getNumNodesLine,      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
340       4,{0,1,4,5},    6, { 0, 1, 2, 3, 4, 5 },
341       -1,{}, {},{}},    -1, { -1 },
342    {Tet4Face_Contact,   "Tet4Face_Contact",   3,  8,  4, 1, 3,      { -1 },
343       Tet4Face_Contact, {0,1,2,3,4,5,6,7},      { -1 } },
344       Finley_Shape_Tet4,   Finley_Quad_getNodesTriOnFace,   Finley_Quad_getNumNodesTri,  { Tri9_Contact, "Tri9_Contact", 18, 1, 2, { 0, 9, 18 }, Tri3_Contact,
345       3,{0,1,2},      { 0, 1, 2, 9, 10, 11 }, TriQuad, Tri9Shape, Tri9Shape,
346       -1,{}, {},{}},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 },
347    {Tet10Face_Contact,  "Tet10Face_Contact",  3, 20, 10, 2, 3,    9, { 0, 1, 2, 3, 4, 5, 6, 7, 8 },
348       Tet4Face_Contact, {0,1,2,3,10,11,12,13},    -1, { -1 },
349       Finley_Shape_Tet10,  Finley_Quad_getNodesTriOnFace,   Finley_Quad_getNumNodesTri,      { -1 },
350       4,{0,1,2,4,5,6},      { -1 } },
351       -1,{}, {},{}},  { Tri10_Contact, "Tri10_Contact", 20, 1, 2, { 0, 10, 20 }, Tri3_Contact,
352    {Tet16Face_Contact,  "Tet16Face_Contact",  3, 32, 16, 3, 3,      { 0, 1, 2, 10, 11, 12 }, TriQuad, Tri10Shape, Tri10Shape,
353       Tet4Face_Contact, {0,1,2,3,16,17,18,19},      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 },
354       Finley_Shape_Tet16,  Finley_Quad_getNodesTriOnFace,   Finley_Quad_getNumNodesTri,    10, { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 },
355       5,{0,1,2,4,5,6,7,8,9},    -1, { -1 },
356       -1,{}, {},{}},      { -1 },
357    {Hex8Face_Contact,   "Hex8Face_Contact",   3, 16,  8, 1, 4,      { -1 } },
358       Hex8Face_Contact, {0,1,2,3,4,5,6,7, 8,9,10,11,12,13,14,15},  { Rec4_Contact, "Rec4_Contact", 8, 1, 2, { 0, 4, 8 }, Rec4_Contact,
359       Finley_Shape_Hex8,   Finley_Quad_getNodesRecOnFace,   Finley_Quad_getNumNodesTri,      { 0, 1, 2, 3, 4, 5, 6, 7 }, RecQuad, Rec4Shape, Rec4Shape,
360       4,{0,1,2,3},      { 0, 1, 2, 3, 4, 5, 6, 7 },
361       -1,{}, {},{}},    4, { 0, 1, 2, 3 },
362    {Hex20Face_Contact,  "Hex20Face_Contact",  3, 40, 20, 2, 4,    -1, { -1 },
363       Hex8Face_Contact, {0,1,2,3,4,5,6,7, 20,21,22,23,24,25,26,27},      { -1 },
364       Finley_Shape_Hex20,  Finley_Quad_getNodesRecOnFace,   Finley_Quad_getNumNodesTri,      { -1 } },
365       8,{0,1,2,3,8,9,10,11},  { Rec8_Contact, "Rec8_Contact", 16, 1, 2, { 0, 8, 16 }, Rec4_Contact,
366       -1,{}, {},{}},      { 0, 1, 2, 3, 8, 9, 10, 11 }, RecQuad, Rec8Shape, Rec8Shape,
367    {Hex32Face_Contact,  "Hex32Face_Contact",  3, 64, 32, 3, 4,      { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
368       Hex8Face_Contact, {0,1,2,3,4,5,6,7, 32,33,34,35,36,37,38,39},    8, { 0, 1, 2, 3, 4, 5, 6, 7 },
369       Finley_Shape_Hex32,  Finley_Quad_getNodesRecOnFace,   Finley_Quad_getNumNodesTri,    -1, { -1 },
370       12,{0,1,2,3,8,9,10,11,12,13,14,15},      { -1 },
371       -1,{}, {},{}},      { -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    
   {NoType, "noElement", 0,  0,  0, 0, 0, NoType, {}, Finley_Shape_Point1, Finley_Quad_getNodesPoint, Finley_Quad_getNumNodesPoint,0,{},-1,{},{},{}}  /* marks end of list */  
569  };  };
570    /**************************************************************
571      
572      creates a ReferenceElement of type id and a given integration order
573    
574  /**************************************************************/    */
575    
 /*   get a quadrature scheme with NumQuadNodes quadrature nodes for the tri  */  
 /*   as a queezed scheme on a quad [0,1]^2 */  
576    
577  Finley_RefElement* Finley_RefElement_alloc(ElementTypeId id,int numQuadNodes) {  Finley_ReferenceElement* Finley_ReferenceElement_alloc(ElementTypeId id, int order)
578    Finley_RefElement *out=NULL;  {
579          dim_t nsub, numQuadNodes, numQuadNodes2;
580    /*  allocate the Finley_RefElement to be returned: */      double *quadWeights=NULL, *quadNodes=NULL, *quadWeights2=NULL, *quadNodes2=NULL;
581          Finley_ReferenceElement *out=NULL;
582    out=MEMALLOC(1,Finley_RefElement);      Finley_QuadInfo* quadscheme;
583    if (Finley_checkPtr(out)) return NULL;      Finley_ShapeFunctionInfo* parametrization, *basisfunction, *linearbasisfunction;
584    out->Type=&(Finley_RefElement_InfoList[id]);      Finley_ReferenceElementInfo *type, *linear_type;
585    out->numQuadNodes=numQuadNodes;  
586    out->QuadNodes=NULL;          type=Finley_ReferenceElement_getInfo(id);
587    out->QuadWeights=NULL;          if (type == NULL) {
588    out->S=NULL;               Finley_setError(VALUE_ERROR,"Finley_ReferenceElement_alloc: unable to identify element type.");
589    out->dSdv=NULL;              return NULL;
590              }
591    /*  allocate memory: */          linear_type=Finley_ReferenceElement_getInfo(type->LinearTypeId);
592              if (linear_type == NULL) {
593    int Ndim=Finley_RefElement_InfoList[id].numDim;              Finley_setError(VALUE_ERROR,"Finley_ReferenceElement_alloc: unable to identify linear element type.");
594    int NS=Finley_RefElement_InfoList[id].numShapes;              return NULL;
595    out->QuadNodes=MEMALLOC(numQuadNodes*Ndim,double);          }
596    out->QuadWeights=MEMALLOC(numQuadNodes,double);          
597    out->S=MEMALLOC(NS*numQuadNodes,double);      
598    out->dSdv=MEMALLOC(NS*Ndim*numQuadNodes,double);      
599    if ( Finley_checkPtr(out->QuadNodes) || Finley_checkPtr(out->QuadWeights) || Finley_checkPtr(out->S) || Finley_checkPtr(out->dSdv) ) {      out=MEMALLOC(1,Finley_ReferenceElement);
600           Finley_RefElement_dealloc(out);      if (Finley_checkPtr(out)) return NULL;
601           return NULL;      
602    }      out->reference_counter=0;
603          out->Parametrization=NULL;
604    /*  set the quadrature nodes: */      out->BasisFunctions=NULL;
605          out->LinearBasisFunctions=NULL;
606    Finley_RefElement_InfoList[id].getQuadNodes(numQuadNodes,out->QuadNodes,out->QuadWeights);      out->Type=type;
607    if (! Finley_noError()) {      out->numNodes=out->Type->numNodes;
608           Finley_RefElement_dealloc(out);      out->LinearType=linear_type;
609           return NULL;      out->numLinearNodes=out->LinearType->numNodes;
610    }          out->DBasisFunctionDv=NULL;
611              out->DBasisFunctionDvShared=TRUE;
612    /*  eval shape functions on quadrature node: */  
613          quadscheme=Finley_QuadInfo_getInfo(out->Type->Quadrature);
614    Finley_RefElement_InfoList[id].getValues(numQuadNodes,out->QuadNodes,out->S,out->dSdv);      parametrization=Finley_ShapeFunction_getInfo(out->Type->Parametrization);
615    if (! Finley_noError()) {      basisfunction=Finley_ShapeFunction_getInfo(out->Type->BasisFunctions);
616           Finley_RefElement_dealloc(out);      linearbasisfunction=Finley_ShapeFunction_getInfo(Finley_ReferenceElement_InfoList[out->Type->LinearTypeId].BasisFunctions);
617           return NULL;      nsub=out->Type->numSubElements;
618    }          out->numLocalDim=quadscheme->numDim;
619              
620    /*  all done: */      
621          /*  set up the basic integration scheme
622    #ifdef Finley_TRACE          note that quadscheme->numDim is not necessarily the diemnsion of the element
623    printf("reference element %s with %d quadrature nodes allocated.\n",Finley_RefElement_InfoList[id].Name,numQuadNodes);      */
624    #endif      
625    return out;      if (order<0) order=MAX(2*basisfunction->numOrder,0);
626        
627        numQuadNodes=quadscheme->getNumQuadNodes(order);
628        
629        quadNodes=MEMALLOC(numQuadNodes*quadscheme->numDim*nsub,double);
630        quadWeights=MEMALLOC(numQuadNodes*nsub,double);
631        if ( !( Finley_checkPtr(quadNodes) || Finley_checkPtr(quadWeights) ) ) {
632        
633            quadscheme->getQuadNodes(numQuadNodes, quadNodes, quadWeights);
634        
635            /*  set the basis functions on the quadrature points:
636             *  note: Finley_ShapeFunction_alloc will introduce 0. if the dimensions of the quadrature scheme and the dimension of the element don;t match.
637             */
638    
639    
640            /*
641             *    before we can set the shape function for the parametrization the quadrature scheme needs to be replicated :
642             */
643        
644            if (nsub>1) {
645                            out->DBasisFunctionDv=MEMALLOC(numQuadNodes*nsub* (basisfunction->numShapes) * (basisfunction->numDim), double );
646                            out->DBasisFunctionDvShared=FALSE;
647                            
648                    out->BasisFunctions=Finley_ShapeFunction_alloc(basisfunction->TypeId, quadscheme->numDim, numQuadNodes, quadNodes, quadWeights);
649                quadNodes2=MEMALLOC(numQuadNodes*quadscheme->numDim*nsub,double);
650                quadWeights2=MEMALLOC(numQuadNodes*nsub,double);
651                if ( !( Finley_checkPtr(quadNodes2) || Finley_checkPtr(quadWeights2) || Finley_checkPtr(out->DBasisFunctionDv)) ) {
652    
653                    numQuadNodes2=quadscheme->getMacro(nsub,out->BasisFunctions->numQuadNodes,
654                                                                            out->BasisFunctions->QuadNodes,
655                                                                            out->BasisFunctions->QuadWeights,
656                                                                            out->BasisFunctions->Type->numShapes, out->BasisFunctions->dSdv,
657                                                                            numQuadNodes*nsub, quadNodes2, quadWeights2,
658                                                                            out->DBasisFunctionDv);
659                    if (Finley_noError()) {
660                        out->Parametrization=Finley_ShapeFunction_alloc(parametrization->TypeId, quadscheme->numDim, numQuadNodes2, quadNodes2, quadWeights2);
661                        out->LinearBasisFunctions=Finley_ShapeFunction_alloc(linearbasisfunction->TypeId, quadscheme->numDim, numQuadNodes2, quadNodes2, quadWeights2);
662                    }
663                    
664                }
665                MEMFREE(quadNodes2);
666                MEMFREE(quadWeights2);
667                
668            } else {
669                out->Parametrization=Finley_ShapeFunction_alloc(parametrization->TypeId, quadscheme->numDim, numQuadNodes*nsub, quadNodes, quadWeights);
670                    out->BasisFunctions=Finley_ShapeFunction_alloc(basisfunction->TypeId, quadscheme->numDim, numQuadNodes, quadNodes, quadWeights);
671                out->LinearBasisFunctions=Finley_ShapeFunction_alloc(linearbasisfunction->TypeId, quadscheme->numDim, numQuadNodes, quadNodes, quadWeights);
672                            out->DBasisFunctionDv=out->BasisFunctions->dSdv;
673                            out->DBasisFunctionDvShared=TRUE;
674            }
675        }
676        MEMFREE(quadNodes);
677        MEMFREE(quadWeights);
678        if (Finley_noError()) {
679            return Finley_ReferenceElement_reference(out);
680        } else {
681            Finley_ReferenceElement_dealloc(out);
682            return NULL;
683        }
684  }  }
685    
686  /**************************************************************/  /**************************************************************/
687    
688  void Finley_RefElement_dealloc(Finley_RefElement* in) {  void Finley_ReferenceElement_dealloc(Finley_ReferenceElement* in) {
689    if (in!=NULL) {      if (in!=NULL) {
690       #ifdef Finley_TRACE          in->reference_counter--;
691       printf("reference element %s is deallocated.\n",in->Type->Name);          if (in->reference_counter<1) {
692       #endif              Finley_ShapeFunction_dealloc(in->Parametrization);
693       MEMFREE(in->QuadNodes);              Finley_ShapeFunction_dealloc(in->BasisFunctions);
694       MEMFREE(in->QuadWeights);              Finley_ShapeFunction_dealloc(in->LinearBasisFunctions);
695       MEMFREE(in->S);                          if (! in->DBasisFunctionDvShared) MEMFREE(in->DBasisFunctionDv);
696       MEMFREE(in->dSdv);              MEMFREE(in);
697       MEMFREE(in);          }
698    }      }
699    
700  }  }
701    
702  /**************************************************************/  /**************************************************************/
703    
704  ElementTypeId Finley_RefElement_getTypeId(char* element_type) {  ElementTypeId Finley_ReferenceElement_getTypeId(char* element_type) {
705      int ptr=0;      int ptr=0;
706      ElementTypeId out=NoType;      ElementTypeId out=NoRef;
707      while (Finley_RefElement_InfoList[ptr].TypeId!=NoType && out==NoType) {      while (Finley_ReferenceElement_InfoList[ptr].TypeId!=NoRef && out==NoRef) {
708         if (strcmp(element_type,Finley_RefElement_InfoList[ptr].Name)==0) out=Finley_RefElement_InfoList[ptr].TypeId;         if (strcmp(element_type,Finley_ReferenceElement_InfoList[ptr].Name)==0) out=Finley_ReferenceElement_InfoList[ptr].TypeId;
709         ptr++;         ptr++;
710      }      }
711      return out;      return out;
712  }  }
713  /*  
714  * $Log$  Finley_ReferenceElement* Finley_ReferenceElement_reference(Finley_ReferenceElement* in) {
715  * Revision 1.5  2005/09/15 03:44:23  jgs       if (in!=NULL) ++(in->reference_counter);
716  * Merge of development branch dev-02 back to main trunk on 2005-09-15       return in;
717  *  }
718  * Revision 1.4.2.1  2005/09/07 06:26:21  gross  
719  * the solver from finley are put into the standalone package paso now  Finley_ReferenceElementInfo* Finley_ReferenceElement_getInfo(ElementTypeId id)
720  *  {
721  * Revision 1.4  2004/12/15 07:08:33  jgs      int ptr=0;
722  * *** empty log message ***      Finley_ReferenceElementInfo* out=NULL;
723  *      while (Finley_ReferenceElement_InfoList[ptr].TypeId!=NoRef && out==NULL) {
724  *         if (Finley_ReferenceElement_InfoList[ptr].TypeId==id) out=&(Finley_ReferenceElement_InfoList[ptr]);
725  *         ptr++;
726  */      }
727        if (out==NULL) {
728            Finley_setError(VALUE_ERROR,"Finley_ReferenceElement_getInfo: cannot find requested reference element.");
729        }
730        return out;
731    }
732    
733    

Legend:
Removed from v.150  
changed lines
  Added in v.2748

  ViewVC Help
Powered by ViewVC 1.1.26