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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3259 - (hide annotations)
Mon Oct 11 01:48:14 2010 UTC (9 years ago) by jfenwick
File MIME type: text/plain
File size: 7448 byte(s)
Merging dudley and scons updates from branches

1 jgs 82
2 ksteube 1312 /*******************************************************
3 ksteube 1811 *
4 jfenwick 2881 * Copyright (c) 2003-2010 by University of Queensland
5 ksteube 1811 * 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 jgs 82
14 ksteube 1811
15 jgs 82 /**************************************************************/
16    
17 ksteube 1312 /* Finley: Reference elements */
18 jgs 82
19     /**************************************************************/
20    
21 jgs 150 #ifndef INC_FINLEY_REFERENCEELEMENTS
22     #define INC_FINLEY_REFERENCEELEMENTS
23    
24    
25     /**************************************************************/
26    
27     #include "Finley.h"
28 jgs 82 #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 gross 2748 #define MAX_numSubElements 8
37     #define MAX_numSides 2
38 jgs 82
39     typedef enum {
40 jfenwick 3259 Finley_Point1,
41     Finley_Line2,
42     Finley_Line3,
43     Finley_Line4,
44     Finley_Tri3,
45     Finley_Tri6,
46     Finley_Tri9,
47     Finley_Tri10,
48     Finley_Rec4,
49     Finley_Rec8,
50     Finley_Rec9,
51     Finley_Rec12,
52     Finley_Rec16,
53     Finley_Tet4,
54     Finley_Tet10,
55     Finley_Tet16,
56     Finley_Hex8,
57     Finley_Hex20,
58     Finley_Hex27,
59     Finley_Hex32,
60     Finley_Line2Face,
61     Finley_Line3Face,
62     Finley_Line4Face,
63     Finley_Tri3Face,
64     Finley_Tri6Face,
65     Finley_Tri9Face,
66     Finley_Tri10Face,
67     Finley_Rec4Face,
68     Finley_Rec8Face,
69     Finley_Rec9Face,
70     Finley_Rec12Face,
71     Finley_Rec16Face,
72     Finley_Tet4Face,
73     Finley_Tet10Face,
74     Finley_Tet16Face,
75     Finley_Hex8Face,
76     Finley_Hex20Face,
77     Finley_Hex27Face,
78     Finley_Hex32Face,
79     Finley_Point1_Contact,
80     Finley_Line2_Contact,
81     Finley_Line3_Contact,
82     Finley_Line4_Contact,
83     Finley_Tri3_Contact,
84     Finley_Tri6_Contact,
85     Finley_Tri9_Contact,
86     Finley_Tri10_Contact,
87     Finley_Rec4_Contact,
88     Finley_Rec8_Contact,
89     Finley_Rec9_Contact,
90     Finley_Rec12_Contact,
91     Finley_Rec16_Contact,
92     Finley_Line2Face_Contact,
93     Finley_Line3Face_Contact,
94     Finley_Line4Face_Contact,
95     Finley_Tri3Face_Contact,
96     Finley_Tri6Face_Contact,
97     Finley_Tri9Face_Contact,
98     Finley_Tri10Face_Contact,
99     Finley_Rec4Face_Contact,
100     Finley_Rec8Face_Contact,
101     Finley_Rec9Face_Contact,
102     Finley_Rec12Face_Contact,
103     Finley_Rec16Face_Contact,
104     Finley_Tet4Face_Contact,
105     Finley_Tet10Face_Contact,
106     Finley_Tet16Face_Contact,
107     Finley_Hex8Face_Contact,
108     Finley_Hex20Face_Contact,
109     Finley_Hex27Face_Contact,
110     Finley_Hex32Face_Contact,
111     Finley_Line3Macro,
112     Finley_Tri6Macro,
113     Finley_Rec9Macro,
114     Finley_Tet10Macro,
115     Finley_Hex27Macro,
116     Finley_NoRef /* marks end of list */
117     } Finley_ElementTypeId;
118 jgs 82
119     /**************************************************************/
120    
121     /* this struct holds the definition of the reference element: */
122    
123 gross 2748 typedef struct Finley_ReferenceElementInfo {
124 jfenwick 3259 Finley_ElementTypeId TypeId; /* the id */
125 jgs 82 char* Name; /* the name in text form e.g. Line1,Rec12,... */
126 jgs 123 dim_t numNodes; /* number of nodes defining the element*/
127 gross 2748 dim_t numSubElements; /* number of subelements. >1 is macro elements are used. */
128     dim_t numSides; /* specifies the number of sides the element supports. This =2 if contatact elements are used
129     otherwise =1. */
130    
131    
132     index_t offsets[MAX_numSides+1]; /* offset to the side nodes: offsets[s]...offset[s+1]-1 referes to the nodes to be used for side s*/
133    
134    
135 jfenwick 3259 Finley_ElementTypeId LinearTypeId; /* id of the linear version of the element */
136 gross 2748
137 jfenwick 3259 index_t linearNodes[MAX_numNodes*MAX_numSides]; /* gives the list of nodes defining the linear or macro element */
138 gross 2748
139     Finley_QuadTypeId Quadrature; /* quadrature scheme */
140     Finley_ShapeFunctionTypeId Parametrization; /* shape function for parametrization of the element */
141     Finley_ShapeFunctionTypeId BasisFunctions; /* shape function for the basis functions */
142    
143     index_t subElementNodes[MAX_numNodes*MAX_numSides*MAX_numSubElements]; /* gives the list of nodes defining the subelements:
144     subElementNodes[INDEX2(i,s,BasisFunctions->numShape*numSides)] is the i-th node in the s-th subelement.*/
145     /*********************************************************************************************************************************** */
146     dim_t numRelevantGeoNodes; /* number of nodes used to describe the geometry of the geometrically relevant part of the element
147     typically this is numNodes but for 'Face' elements where the quadrature points are defined on face of the element
148     this is the number of nodes on the particular face. */
149     index_t relevantGeoNodes[MAX_numNodes]; /* list to gather the geometrically relevant nodes (length used is numRelevantGeoNodes)
150     this list is used for VTK interface */
151    
152     dim_t numNodesOnFace; /* if the element is allowed as a face element, numNodesOnFace defines the number of nodes defining the face */
153     /* the following lists are only used for face elements defined by numNodesOnFace>0 */
154     index_t faceNodes[MAX_numNodes]; /* list of the nodes defining the face */
155 jgs 123 index_t shiftNodes[MAX_numNodes]; /* defines a permutation of the nodes which rotates the nodes on the face */
156 gross 2748 index_t reverseNodes[MAX_numNodes]; /* reverses the order of the nodes on a face. the permutation has keep 0 fixed. */
157 jgs 123 /* shiftNodes={-1} or reverseNodes={-1} are ignored. */
158 gross 2748 } Finley_ReferenceElementInfo;
159 jgs 82
160 gross 2748
161 jgs 82 /**************************************************************/
162    
163     /* this struct holds the realization of a reference element */
164    
165 gross 2748 typedef struct Finley_ReferenceElement {
166     Finley_ReferenceElementInfo* Type; /* type of the reference element */
167     Finley_ReferenceElementInfo* LinearType; /* type of the linear reference element */
168     index_t reference_counter; /* reference counter */
169 gross 2856 dim_t integrationOrder; /* used integration order */
170 gross 2748 dim_t numNodes;
171     dim_t numLocalDim;
172     dim_t numLinearNodes;
173     Finley_ShapeFunction* Parametrization;
174     Finley_ShapeFunction* BasisFunctions;
175     Finley_ShapeFunction* LinearBasisFunctions;
176     double* DBasisFunctionDv; /* pointer to derivatives to basis function corresponding to the Parametrization quad points */
177     bool_t DBasisFunctionDvShared; /* TRUE to indicate that DBasisFunctionDv is shared with another object which is managing it */
178 jgs 82
179 gross 2748 } Finley_ReferenceElement;
180    
181 jgs 82 /**************************************************************/
182    
183     /* interfaces: */
184    
185 jfenwick 3259 Finley_ReferenceElement* Finley_ReferenceElement_alloc(Finley_ElementTypeId,int);
186 gross 2748 void Finley_ReferenceElement_dealloc(Finley_ReferenceElement*);
187 jfenwick 3259 Finley_ElementTypeId Finley_ReferenceElement_getTypeId(char*);
188 gross 2748 Finley_ReferenceElement* Finley_ReferenceElement_reference(Finley_ReferenceElement* in);
189 jfenwick 3259 Finley_ReferenceElementInfo* Finley_ReferenceElement_getInfo(Finley_ElementTypeId id);
190 jgs 82
191 gross 2748
192     #define Finley_ReferenceElement_getNumNodes(__in__) (__in__)->Type->numNodes
193    
194 jgs 82 #endif /* #ifndef INC_FINLEY_REFERENCEELEMENTS */
195 jfenwick 3259

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26