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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6651 - (hide annotations)
Wed Feb 7 02:12:08 2018 UTC (21 months, 1 week ago) by jfenwick
File MIME type: text/plain
File size: 5891 byte(s)
Make everyone sad by touching all the files

Copyright dates update

1 jgs 82
2 jfenwick 3981 /*****************************************************************************
3 ksteube 1811 *
4 jfenwick 6651 * Copyright (c) 2003-2018 by The University of Queensland
5 jfenwick 3981 * http://www.uq.edu.au
6 ksteube 1811 *
7     * Primary Business: Queensland, Australia
8 jfenwick 6112 * Licensed under the Apache License, version 2.0
9     * http://www.apache.org/licenses/LICENSE-2.0
10 ksteube 1811 *
11 jfenwick 3981 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 jfenwick 4657 * Development 2012-2013 by School of Earth Sciences
13     * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 jfenwick 3981 *
15     *****************************************************************************/
16 jgs 82
17 ksteube 1811
18 caltinay 4492 /****************************************************************************
19 jgs 82
20 caltinay 4492 Finley: Reference elements
21 jgs 82
22 caltinay 4492 *****************************************************************************/
23 jgs 82
24 caltinay 4492 #ifndef __FINLEY_REFERENCEELEMENTS_H__
25     #define __FINLEY_REFERENCEELEMENTS_H__
26 jgs 150
27     #include "Finley.h"
28 jgs 82 #include "ShapeFunctions.h"
29     #include "Quadrature.h"
30    
31 caltinay 4492 // The ids of the allowed reference elements:
32 jgs 82 #define MAX_numNodes 64
33 gross 2748 #define MAX_numSubElements 8
34     #define MAX_numSides 2
35 jgs 82
36 caltinay 4492 namespace finley {
37    
38 jgs 82 typedef enum {
39 caltinay 4499 Point1,
40     Line2,
41     Line3,
42     Line4,
43     Tri3,
44     Tri6,
45     Tri9,
46     Tri10,
47     Rec4,
48     Rec8,
49     Rec9,
50     Rec12,
51     Rec16,
52     Tet4,
53     Tet10,
54     Tet16,
55     Hex8,
56     Hex20,
57     Hex27,
58     Hex32,
59     Line2Face,
60     Line3Face,
61     Line4Face,
62     Tri3Face,
63     Tri6Face,
64     Tri9Face,
65     Tri10Face,
66     Rec4Face,
67     Rec8Face,
68     Rec9Face,
69     Rec12Face,
70     Rec16Face,
71     Tet4Face,
72     Tet10Face,
73     Tet16Face,
74     Hex8Face,
75     Hex20Face,
76     Hex27Face,
77     Hex32Face,
78     Point1_Contact,
79     Line2_Contact,
80     Line3_Contact,
81     Line4_Contact,
82     Tri3_Contact,
83     Tri6_Contact,
84     Tri9_Contact,
85     Tri10_Contact,
86     Rec4_Contact,
87     Rec8_Contact,
88     Rec9_Contact,
89     Rec12_Contact,
90     Rec16_Contact,
91     Line2Face_Contact,
92     Line3Face_Contact,
93     Line4Face_Contact,
94     Tri3Face_Contact,
95     Tri6Face_Contact,
96     Tri9Face_Contact,
97     Tri10Face_Contact,
98     Rec4Face_Contact,
99     Rec8Face_Contact,
100     Rec9Face_Contact,
101     Rec12Face_Contact,
102     Rec16Face_Contact,
103     Tet4Face_Contact,
104     Tet10Face_Contact,
105     Tet16Face_Contact,
106     Hex8Face_Contact,
107     Hex20Face_Contact,
108     Hex27Face_Contact,
109     Hex32Face_Contact,
110     Line3Macro,
111     Tri6Macro,
112     Rec9Macro,
113     Tet10Macro,
114     Hex27Macro,
115     NoRef // marks end of list
116 caltinay 4492 } ElementTypeId;
117 jgs 82
118    
119 caltinay 4492 /// this struct holds the definition of the reference element
120     struct ReferenceElementInfo {
121     /// the type
122     ElementTypeId TypeId;
123     /// the name in text form e.g. "Line1", "Rec12", ...
124     const char* Name;
125     /// number of nodes defining the element
126     int numNodes;
127     /// number of subelements (>1 if macro elements are used)
128     int numSubElements;
129     /// the number of sides the element supports (=2 if contact elements are
130     /// used, otherwise =1)
131     int numSides;
132     /// offset to the side nodes: offsets[s]...offsets[s+1]-1 refer to the
133     /// nodes to be used for side s
134     int offsets[MAX_numSides+1];
135 jgs 82
136 caltinay 4492 /// type id of the linear version of the element
137     ElementTypeId LinearTypeId;
138     /// stores the list of nodes defining the linear or macro element
139     int linearNodes[MAX_numNodes*MAX_numSides];
140     /// quadrature scheme
141     QuadTypeId Quadrature;
142     /// shape function for parametrization of the element
143     ShapeFunctionTypeId Parametrization;
144     /// shape function for the basis functions
145     ShapeFunctionTypeId BasisFunctions;
146 gross 2748
147 caltinay 4492 /// the list of nodes defining the subelements, i.e.
148     /// subElementNodes[INDEX2(i,s,BasisFunctions->numShape*numSides)] is
149     /// the i-th node in the s-th subelement
150     int subElementNodes[MAX_numNodes*MAX_numSides*MAX_numSubElements];
151 gross 2748
152 caltinay 4492 /// deprecated
153     int numRelevantGeoNodes;
154     int relevantGeoNodes[MAX_numNodes];
155 gross 2748
156 caltinay 4492 /// if the element is allowed as a face element, numNodesOnFace defines
157     /// the number of nodes defining the face
158     int numNodesOnFace;
159 jgs 82
160 caltinay 4492 // the following lists are only used for face elements defined by
161     // numNodesOnFace>0:
162 gross 2748
163 caltinay 4492 /// list of the nodes defining the face
164     int faceNodes[MAX_numNodes];
165 jgs 82
166 caltinay 4492 // shiftNodes={-1} or reverseNodes={-1} are ignored.
167     /// defines a permutation of the nodes which rotates the nodes on the face
168     int shiftNodes[MAX_numNodes];
169     /// reverses the order of the nodes on a face. The permutation has to keep
170     /// 0 fixed.
171     int reverseNodes[MAX_numNodes];
172     };
173 jgs 82
174    
175 caltinay 4492 /// this struct holds the realization of a reference element
176     struct ReferenceElement {
177 caltinay 4496 /// constructor with type ID and integration order
178     ReferenceElement(ElementTypeId id, int order);
179    
180     /// destructor
181     ~ReferenceElement();
182    
183     /// returns the element information structure for the given type id
184     static const ReferenceElementInfo* getInfo(ElementTypeId id);
185    
186     /// returns the element type id from its textual representation
187     static ElementTypeId getTypeId(const char*);
188    
189     ///
190     int getNumNodes() const { return Type->numNodes; }
191    
192 caltinay 4492 /// type of the reference element
193 caltinay 4496 const ReferenceElementInfo* Type;
194 caltinay 4492 /// type of the linear reference element
195 caltinay 4496 const ReferenceElementInfo* LinearType;
196 caltinay 4492 /// used integration order
197     int integrationOrder;
198     int numNodes;
199     int numLocalDim;
200     int numLinearNodes;
201 caltinay 4496 const_ShapeFunction_ptr Parametrization;
202     const_ShapeFunction_ptr BasisFunctions;
203     const_ShapeFunction_ptr LinearBasisFunctions;
204 caltinay 4492 /// pointer to derivatives to basis function corresponding to the
205     /// Parametrization of quad points
206     double* DBasisFunctionDv;
207 caltinay 4496 /// if true indicates that DBasisFunctionDv is shared with another object
208 caltinay 4492 /// which is managing it
209 caltinay 4496 bool DBasisFunctionDvShared;
210 caltinay 4492 };
211 gross 2748
212 caltinay 4496 typedef boost::shared_ptr<ReferenceElement> ReferenceElement_ptr;
213     typedef boost::shared_ptr<const ReferenceElement> const_ReferenceElement_ptr;
214 jgs 82
215 caltinay 4492 } // namespace finley
216 gross 2748
217 caltinay 4492 #endif // __FINLEY_REFERENCEELEMENTS_H__
218 jfenwick 3259

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26