ESScript
Revision_
Main Page
Namespaces
Classes
Files
File List
File Members
finley
src
ReferenceElements.h
Go to the documentation of this file.
1
2
/*****************************************************************************
3
*
4
* Copyright (c) 2003-2013 by University of Queensland
5
* http://www.uq.edu.au
6
*
7
* Primary Business: Queensland, Australia
8
* Licensed under the Open Software License version 3.0
9
* http://www.opensource.org/licenses/osl-3.0.php
10
*
11
* Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12
* Development since 2012 by School of Earth Sciences
13
*
14
*****************************************************************************/
15
16
17
/****************************************************************************
18
19
Finley: Reference elements
20
21
*****************************************************************************/
22
23
#ifndef __FINLEY_REFERENCEELEMENTS_H__
24
#define __FINLEY_REFERENCEELEMENTS_H__
25
26
#include "
Finley.h
"
27
#include "
ShapeFunctions.h
"
28
#include "
Quadrature.h
"
29
30
// The ids of the allowed reference elements:
31
#define MAX_numNodes 64
32
#define MAX_numSubElements 8
33
#define MAX_numSides 2
34
35
namespace
finley {
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
NoRef
// marks end of list
115
}
ElementTypeId
;
116
117
119
struct
ReferenceElementInfo
{
121
ElementTypeId
TypeId
;
123
const
char
*
Name
;
125
int
numNodes
;
127
int
numSubElements
;
130
int
numSides
;
133
int
offsets
[
MAX_numSides
+1];
134
136
ElementTypeId
LinearTypeId
;
138
int
linearNodes
[
MAX_numNodes
*
MAX_numSides
];
140
QuadTypeId
Quadrature
;
142
ShapeFunctionTypeId
Parametrization
;
144
ShapeFunctionTypeId
BasisFunctions
;
145
149
int
subElementNodes
[
MAX_numNodes
*
MAX_numSides
*
MAX_numSubElements
];
150
152
int
numRelevantGeoNodes
;
153
int
relevantGeoNodes
[
MAX_numNodes
];
154
157
int
numNodesOnFace
;
158
159
// the following lists are only used for face elements defined by
160
// numNodesOnFace>0:
161
163
int
faceNodes
[
MAX_numNodes
];
164
165
// shiftNodes={-1} or reverseNodes={-1} are ignored.
167
int
shiftNodes
[
MAX_numNodes
];
170
int
reverseNodes
[
MAX_numNodes
];
171
};
172
173
175
struct
ReferenceElement
{
177
ReferenceElement
(
ElementTypeId
id
,
int
order);
178
180
~ReferenceElement
();
181
183
static
const
ReferenceElementInfo
*
getInfo
(
ElementTypeId
id
);
184
186
static
ElementTypeId
getTypeId
(
const
char
*);
187
189
int
getNumNodes
()
const
{
return
Type
->
numNodes
; }
190
192
const
ReferenceElementInfo
*
Type
;
194
const
ReferenceElementInfo
*
LinearType
;
196
int
integrationOrder
;
197
int
numNodes
;
198
int
numLocalDim
;
199
int
numLinearNodes
;
200
const_ShapeFunction_ptr
Parametrization
;
201
const_ShapeFunction_ptr
BasisFunctions
;
202
const_ShapeFunction_ptr
LinearBasisFunctions
;
205
double
*
DBasisFunctionDv
;
208
bool
DBasisFunctionDvShared
;
209
};
210
211
typedef
boost::shared_ptr<ReferenceElement>
ReferenceElement_ptr
;
212
typedef
boost::shared_ptr<const ReferenceElement>
const_ReferenceElement_ptr
;
213
214
}
// namespace finley
215
216
#endif // __FINLEY_REFERENCEELEMENTS_H__
217
Generated on Thu Dec 12 2013 03:47:18 for ESScript by
1.8.1.2