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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6939 - (hide annotations)
Mon Jan 20 03:37:18 2020 UTC (5 weeks, 2 days ago) by uqaeller
File MIME type: text/plain
File size: 5967 byte(s)
Updated the copyright header.


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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26