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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 123 - (hide annotations)
Fri Jul 8 04:08:13 2005 UTC (14 years, 3 months ago) by jgs
Original Path: trunk/esys2/finley/src/finleyC/ReferenceElements.h
File MIME type: text/plain
File size: 5615 byte(s)
Merge of development branch back to main trunk on 2005-07-08

1 jgs 82 /* $Id$ */
2    
3     #ifndef INC_FINLEY_REFERENCEELEMENTS
4     #define INC_FINLEY_REFERENCEELEMENTS
5    
6     /**************************************************************/
7    
8     /* Finley: Reference elements */
9    
10     /**************************************************************/
11    
12     /* Copyrights by ACcESS Australia 2003 */
13     /* Author: gross@access.edu.au */
14     /* Version: $Id$ */
15    
16     /**************************************************************/
17    
18     #include "Common.h"
19     #include "ShapeFunctions.h"
20     #include "Quadrature.h"
21    
22     /**************************************************************/
23    
24     /* The ids of the allowed reference ellements: */
25    
26     #define MAX_numNodes 64
27    
28     typedef enum {
29     Point1,
30     Line2,
31     Line3,
32     Line4,
33     Tri3,
34     Tri6,
35     Tri9,
36     Tri10,
37     Rec4,
38     Rec8,
39     Rec9,
40     Rec12,
41     Rec16,
42     Tet4,
43     Tet10,
44     Tet16,
45     Hex8,
46     Hex20,
47     Hex32,
48     Line2Face,
49     Line3Face,
50     Line4Face,
51     Tri3Face,
52     Tri6Face,
53     Tri9Face,
54     Tri10Face,
55     Rec4Face,
56     Rec8Face,
57     Rec9Face,
58     Rec12Face,
59     Rec16Face,
60     Tet4Face,
61     Tet10Face,
62     Tet16Face,
63     Hex8Face,
64     Hex20Face,
65     Hex32Face,
66     Point1_Contact,
67     Line2_Contact,
68     Line3_Contact,
69     Line4_Contact,
70     Tri3_Contact,
71     Tri6_Contact,
72     Tri9_Contact,
73     Tri10_Contact,
74     Rec4_Contact,
75     Rec8_Contact,
76     Rec9_Contact,
77     Rec12_Contact,
78     Rec16_Contact,
79     Line2Face_Contact,
80     Line3Face_Contact,
81     Line4Face_Contact,
82     Tri3Face_Contact,
83     Tri6Face_Contact,
84     Tri9Face_Contact,
85     Tri10Face_Contact,
86     Rec4Face_Contact,
87     Rec8Face_Contact,
88     Rec9Face_Contact,
89     Rec12Face_Contact,
90     Rec16Face_Contact,
91     Tet4Face_Contact,
92     Tet10Face_Contact,
93     Tet16Face_Contact,
94     Hex8Face_Contact,
95     Hex20Face_Contact,
96     Hex32Face_Contact,
97     NoType /* marks end of list */
98     } ElementTypeId;
99    
100     /**************************************************************/
101    
102     /* this struct holds the definition of the reference element: */
103    
104     typedef struct Finley_RefElementInfo {
105     ElementTypeId TypeId; /* the id */
106     char* Name; /* the name in text form e.g. Line1,Rec12,... */
107 jgs 123 dim_t numDim; /* dimension of the element */
108     dim_t numNodes; /* number of nodes defining the element*/
109     dim_t numShapes; /* number of shape functions, typically = numNodes*/
110     dim_t numOrder; /* order of the shape functions */
111     dim_t numVertices; /* number of vertices of the element */
112 jgs 82 ElementTypeId LinearTypeId; /* id of the linear version of the element */
113 jgs 123 index_t linearNodes[MAX_numNodes]; /* gives the list of nodes defining the linear element, typically it is linearNodes[i]=i */
114 jgs 82 Finley_Shape_Function* getValues; /* function to evaluate the shape functions at a set of points */
115     Finley_Quad_getNodes* getQuadNodes; /* function to set the quadrature points */
116     Finley_Quad_getNumNodes* getNumQuadNodes; /* function selects the number of quadrature nodes for a given accuracy order */
117 jgs 123 dim_t numGeoNodes; /* nuber of nodes used to describe the geometry of the geometrically relevant part of the element */
118 jgs 82 /* typically this is numNodes but for volumenic elements used to descrbe faces this is the number of */
119     /* nodes on the particular face */
120 jgs 123 index_t geoNodes[MAX_numNodes]; /* list to gather the geometrically relevant nodes */
121     dim_t numNodesOnFace; /* if the element is allowed as a face element, numNodesOnFace defines the number of nodes */
122 jgs 82 /* defining the face */
123     /* the following lists are only used for face elements defined by numNodesOnFace>0 */
124 jgs 123 index_t faceNode[MAX_numNodes]; /* list of the nodes defining the face */
125     index_t shiftNodes[MAX_numNodes]; /* defines a permutation of the nodes which rotates the nodes on the face */
126     index_t reverseNodes[MAX_numNodes]; /* reverses the order of the nodes on a face. teh permutation has keep 0 fixed. */
127     /* shiftNodes={-1} or reverseNodes={-1} are ignored. */
128 jgs 82 } Finley_RefElementInfo;
129    
130     /**************************************************************/
131    
132     /* this struct holds the realization of a reference element */
133    
134     typedef struct Finley_RefElement {
135     Finley_RefElementInfo* Type; /* type of the reference element */
136     int numQuadNodes; /* number of quadrature points */
137     double *QuadNodes; /* coordinates of quadrature nodes */
138     double *QuadWeights; /* weights of the quadrature scheme */
139     double *S; /* shape functions at quadrature nodes */
140     double *dSdv; /* derivative of the shape functions at quadrature nodes */
141     } Finley_RefElement;
142    
143     /**************************************************************/
144    
145     /* interfaces: */
146    
147     Finley_RefElement* Finley_RefElement_alloc(ElementTypeId,int);
148     void Finley_RefElement_dealloc(Finley_RefElement*);
149     ElementTypeId Finley_RefElement_getTypeId(char*);
150    
151     #endif /* #ifndef INC_FINLEY_REFERENCEELEMENTS */
152    
153     /*
154     * $Log$
155 jgs 123 * Revision 1.2 2005/07/08 04:07:56 jgs
156     * Merge of development branch back to main trunk on 2005-07-08
157 jgs 82 *
158 jgs 123 * Revision 1.1.1.1.2.1 2005/06/29 02:34:55 gross
159     * some changes towards 64 integers in finley
160     *
161     * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
162     * initial import of project esys2
163     *
164 jgs 82 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
165     * Initial version of eys using boost-python.
166     *
167     *
168     */

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26