/[escript]/trunk/finley/src/BasisFunctions.h
ViewVC logotype

Contents of /trunk/finley/src/BasisFunctions.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2881 - (show annotations)
Thu Jan 28 02:03:15 2010 UTC (9 years, 10 months ago) by jfenwick
File MIME type: text/plain
File size: 6000 byte(s)
Don't panic.
Updating copyright stamps

1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2010 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 #ifndef INC_FINLEY_REFERENCEELEMENTS
22 #define INC_FINLEY_REFERENCEELEMENTS
23
24
25 /**************************************************************/
26
27 #include "Finley.h"
28 #include "ShapeFunctions.h"
29 #include "Quadrature.h"
30
31 /**************************************************************/
32
33 /* The ids of the allowed reference ellements: */
34
35 #define MAX_numNodes 64
36
37 typedef enum {
38 Point1,
39 Line2,
40 Line3,
41 Line4,
42 Tri3,
43 Tri6,
44 Tri9,
45 Tri10,
46 Rec4,
47 Rec8,
48 Rec9,
49 Rec12,
50 Rec16,
51 Tet4,
52 Tet10,
53 Tet16,
54 Hex8,
55 Hex20,
56 Hex27,
57 Hex32,
58 Line2Face,
59 Line3Face,
60 Line4Face,
61 Tri3Face,
62 Tri6Face,
63 Tri9Face,
64 Tri10Face,
65 Rec4Face,
66 Rec8Face,
67 Rec9Face,
68 Rec12Face,
69 Rec16Face,
70 Tet4Face,
71 Tet10Face,
72 Tet16Face,
73 Hex8Face,
74 Hex20Face,
75 Hex27Face,
76 Hex32Face,
77 Point1_Contact,
78 Line2_Contact,
79 Line3_Contact,
80 Line4_Contact,
81 Tri3_Contact,
82 Tri6_Contact,
83 Tri9_Contact,
84 Tri10_Contact,
85 Rec4_Contact,
86 Rec8_Contact,
87 Rec9_Contact,
88 Rec12_Contact,
89 Rec16_Contact,
90 Line2Face_Contact,
91 Line3Face_Contact,
92 Line4Face_Contact,
93 Tri3Face_Contact,
94 Tri6Face_Contact,
95 Tri9Face_Contact,
96 Tri10Face_Contact,
97 Rec4Face_Contact,
98 Rec8Face_Contact,
99 Rec9Face_Contact,
100 Rec12Face_Contact,
101 Rec16Face_Contact,
102 Tet4Face_Contact,
103 Tet10Face_Contact,
104 Tet16Face_Contact,
105 Hex8Face_Contact,
106 Hex20Face_Contact,
107 Hex27Face_Contact,
108 Hex32Face_Contact,
109 Line3Macro,
110 Tri6Macro,
111 Rec9Macro,
112 Tet10Macro,
113 Hex27Macro,
114
115 NoType /* marks end of list */
116 } ElementTypeId;
117
118 /**************************************************************/
119
120 /* this struct holds the definition of the reference element: */
121
122 typedef struct Finley_ReferenceElementInfo {
123 ElementTypeId TypeId; /* the id */
124 char* Name; /* the name in text form e.g. Line1,Rec12,... */
125 dim_t numLocalDim; /* local dimension of the element */
126 dim_t numDim; /* dimension of the element */
127 dim_t numNodes; /* number of nodes defining the element*/
128 dim_t numShapes; /* number of shape functions, typically = numNodes*/
129 dim_t numOrder; /* order of the shape functions */
130 dim_t numVertices; /* number of vertices of the element */
131 ElementTypeId LinearTypeId; /* id of the linear version of the element */
132 index_t linearNodes[MAX_numNodes]; /* gives the list of nodes defining the linear or macro element, typically it is linearNodes[i]=i */
133 Finley_Shape_Function* getValues; /* function to evaluate the shape functions at a set of points */
134 Finley_Quad_getNodes* getQuadNodes; /* function to set the quadrature points */
135 Finley_Quad_getNumNodes* getNumQuadNodes; /* function selects the number of quadrature nodes for a given accuracy order */
136
137 /*********************************************************************************************************************************** */
138 dim_t numRelevantGeoNodes; /* number of nodes used to describe the geometry of the geometrically relevant part of the element
139 typically this is numNodes but for 'Face' elements where the quadrature points are defined on face of the element
140 this is the number of nodes on the particular face. */
141 index_t relevantGeoNodes[MAX_numNodes]; /* list to gather the geometrically relevant nodes (length used is numRelevantGeoNodes)
142 this list is used for VTK interface */
143
144 dim_t numNodesOnFace; /* if the element is allowed as a face element, numNodesOnFace defines the number of nodes defining the face */
145 /* the following lists are only used for face elements defined by numNodesOnFace>0 */
146 index_t faceNodes[MAX_numNodes]; /* list of the nodes defining the face */
147 index_t shiftNodes[MAX_numNodes]; /* defines a permutation of the nodes which rotates the nodes on the face */
148 index_t reverseNodes[MAX_numNodes]; /* reverses the order of the nodes on a face. the permutation has keep 0 fixed. */
149 /* shiftNodes={-1} or reverseNodes={-1} are ignored. */
150 } Finley_ReferenceElementInfo;
151
152 /**************************************************************/
153
154 /* this struct holds the realization of a reference element */
155
156 typedef struct Finley_ReferenceElement {
157 Finley_ReferenceElementInfo* Type; /* type of the reference element */
158 int numQuadNodes; /* number of quadrature points */
159 double *QuadNodes; /* coordinates of quadrature nodes */
160 double *QuadWeights; /* weights of the quadrature scheme */
161 double *S; /* shape functions at quadrature nodes */
162 double *dSdv; /* derivative of the shape functions at quadrature nodes */
163 } Finley_ReferenceElement;
164
165 /**************************************************************/
166
167 /* interfaces: */
168
169 Finley_ReferenceElement* Finley_ReferenceElement_alloc(ElementTypeId,int);
170 void Finley_ReferenceElement_dealloc(Finley_ReferenceElement*);
171 ElementTypeId Finley_ReferenceElement_getTypeId(char*);
172
173 #endif /* #ifndef INC_FINLEY_REFERENCEELEMENTS */

  ViewVC Help
Powered by ViewVC 1.1.26