VTK
9.4.20241103
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Filters
CellGrid
Basis
HGrad
PyrF2Gradient.h
Go to the documentation of this file.
1
const
RealT
HALF
= 0.5;
2
const
RealT
ONE
= 1.;
3
const
RealT
ZERO
= 0.;
4
const
RealT
TWO
= 2.;
5
const
RealT
THREE
= 3.;
6
const
RealT
FOUR
= 4.;
7
const
RealT
SIXTEENTHIRDS
= 16. / 3.;
8
const
RealT
EIGHT
= 8.;
9
const
RealT
TWENTYSEVEN
= 27.;
10
const
RealT
FOURTH
= 0.25;
11
const
RealT
NINTH
= 1. / 9.;
12
const
RealT
THREESIXTYFOURTHS
= 3. / 64.;
13
const
RealT
EIGHTH
= 1. / 8.;
14
const
RealT
FOURNINTHS
= 4. / 9.;
15
const
RealT
THREESIXTEENTHS
= 3. / 16.;
16
const
RealT
NINESIXTEENTHS
= 9. / 16.;
17
18
const
RealT
K1
= -0.25;
19
const
RealT
K5
=
ONE
;
20
const
RealT
K6
= -
HALF
;
21
const
RealT
K10
= -
ONE
;
22
const
RealT
K14
=
ONE
;
23
const
RealT
K15A
=
TWENTYSEVEN
/
EIGHT
;
24
const
RealT
K15B
= -
TWENTYSEVEN
/
EIGHT
;
25
const
RealT
K19
= -
SIXTEENTHIRDS
;
26
27
RealT
r2
= rr * rr;
28
RealT
s2
= ss * ss;
29
RealT
t2
= tt * tt;
30
RealT
rs
= rr * ss;
31
RealT
rt
= rr * tt;
32
RealT
st
= ss * tt;
33
RealT
r2s
=
r2
* ss;
34
RealT
rs2
= rr *
s2
;
35
RealT
r2s2
=
r2
*
s2
;
36
37
RealT
tm
= tt -
ONE
;
38
RealT
tm2
=
tm
*
tm
;
39
RealT
tm3
=
tm2
*
tm
;
40
RealT
tm4
=
tm3
*
tm
;
41
42
// Be sure that the basis functions are defined when tt is very close to 1.
43
RealT
mt
= abs(
tm
) > eps ?
ONE
/
tm
:
ZERO
;
44
RealT
m2t
= abs(
tm2
) > eps ?
ONE
/
tm2
:
ZERO
;
45
RealT
m3t
= abs(
tm3
) > eps ?
ONE
/
tm3
:
ZERO
;
46
RealT
m4t
= abs(
tm4
) > eps ?
ONE
/
tm4
:
ZERO
;
47
48
basisGradient
[0] =
K1
* (
rs
*
mt
- rr - ss + tt + (ss *
mt
-
ONE
) * (rr + ss -
ONE
) -
ONE
);
49
basisGradient
[1] =
K1
* (
rs
*
mt
- rr - ss + tt + (rr *
mt
-
ONE
) * (rr + ss -
ONE
) -
ONE
);
50
basisGradient
[2] =
K1
* (-
rs
*
m2t
+
ONE
) * (rr + ss -
ONE
);
51
52
basisGradient
[3] =
K1
* (
rs
*
mt
- rr + ss - tt + (-ss *
mt
+
ONE
) * (-rr + ss -
ONE
) +
ONE
);
53
basisGradient
[4] =
K1
* (-
rs
*
mt
+ rr - ss + tt + (-rr *
mt
-
ONE
) * (-rr + ss -
ONE
) -
ONE
);
54
basisGradient
[5] =
K1
* (
rs
*
m2t
+
ONE
) * (-rr + ss -
ONE
);
55
56
basisGradient
[6] =
K1
* (-
rs
*
mt
- rr - ss - tt + (ss *
mt
+
ONE
) * (-rr - ss -
ONE
) +
ONE
);
57
basisGradient
[7] =
K1
* (-
rs
*
mt
- rr - ss - tt + (rr *
mt
+
ONE
) * (-rr - ss -
ONE
) +
ONE
);
58
basisGradient
[8] =
K1
* (-
rs
*
m2t
+
ONE
) * (-rr - ss -
ONE
);
59
60
basisGradient
[9] =
K1
* (-
rs
*
mt
- rr + ss + tt + (-ss *
mt
-
ONE
) * (rr - ss -
ONE
) -
ONE
);
61
basisGradient
[10] =
K1
* (
rs
*
mt
+ rr - ss - tt + (-rr *
mt
+
ONE
) * (rr - ss -
ONE
) +
ONE
);
62
basisGradient
[11] =
K1
* (
rs
*
m2t
+
ONE
) * (rr - ss -
ONE
);
63
64
basisGradient
[12] =
ZERO
;
65
basisGradient
[13] =
ZERO
;
66
basisGradient
[14] =
K5
* (
FOUR
* tt -
ONE
);
67
68
basisGradient
[15] =
K6
* (-
TWO
*
rs
*
mt
+
TWO
* rr);
69
basisGradient
[16] =
K6
* (-
r2
*
mt
+ tt -
ONE
);
70
basisGradient
[17] =
K6
* (
r2s
*
m2t
+ ss -
TWO
* tt +
TWO
);
71
72
basisGradient
[18] =
K6
* (
s2
*
mt
- tt +
ONE
);
73
basisGradient
[19] =
K6
* (
TWO
*
rs
*
mt
+
TWO
* ss);
74
basisGradient
[20] =
K6
* (-
rs2
*
m2t
- rr -
TWO
* tt +
TWO
);
75
76
basisGradient
[21] =
K6
* (
TWO
*
rs
*
mt
+
TWO
* rr);
77
basisGradient
[22] =
K6
* (
r2
*
mt
- tt +
ONE
);
78
basisGradient
[23] =
K6
* (-
r2s
*
m2t
- ss -
TWO
* tt +
TWO
);
79
80
basisGradient
[24] =
K6
* (-
s2
*
mt
+ tt -
ONE
);
81
basisGradient
[25] =
K6
* (-
TWO
*
rs
*
mt
+
TWO
* ss);
82
basisGradient
[26] =
K6
* (
rs2
*
m2t
+ rr -
TWO
* tt +
TWO
);
83
84
basisGradient
[27] =
K10
* (ss + ss *
mt
- tt);
85
basisGradient
[28] =
K10
* (rr + rr *
mt
- tt);
86
basisGradient
[29] =
K10
* (-
rs
*
m2t
- rr - ss +
TWO
* tt -
ONE
);
87
88
basisGradient
[30] =
K10
* (-ss - ss *
mt
+ tt);
89
basisGradient
[31] =
K10
* (-rr - rr *
mt
- tt);
90
basisGradient
[32] =
K10
* (
rs
*
m2t
+ rr - ss +
TWO
* tt -
ONE
);
91
92
basisGradient
[33] =
K10
* (ss + ss *
mt
+ tt);
93
basisGradient
[34] =
K10
* (rr + rr *
mt
+ tt);
94
basisGradient
[35] =
K10
* (-
rs
*
m2t
+ rr + ss +
TWO
* tt -
ONE
);
95
96
basisGradient
[36] =
K10
* (-ss - ss *
mt
- tt);
97
basisGradient
[37] =
K10
* (-rr - rr *
mt
+ tt);
98
basisGradient
[38] =
K10
* (
rs
*
m2t
- rr + ss +
TWO
* tt -
ONE
);
99
100
basisGradient
[39] =
K14
* (
TWO
*
rs2
*
m2t
-
TWO
* rr);
101
basisGradient
[40] =
K14
* (
TWO
*
r2s
*
m2t
-
TWO
* ss);
102
basisGradient
[41] =
K14
* (-
TWO
*
r2s2
*
m3t
+
TWO
* tt -
TWO
);
103
104
basisGradient
[42] =
K15A
* (
TWO
*
rs
+
TWO
*
rs
*
mt
-
TWO
*
rs2
*
mt
-
TWO
*
rs2
*
m2t
);
105
basisGradient
[43] =
K15A
* (-
TWO
*
r2s
*
mt
-
TWO
*
r2s
*
m2t
+
r2
+
r2
*
mt
+
TWO
*
st
+ tt -
t2
);
106
basisGradient
[44] =
107
K15A
* (-
r2s
*
m2t
-
r2s2
* (-
TWO
* tt +
TWO
) *
m4t
+
r2s2
*
m2t
-
TWO
*
st
+ ss +
s2
);
108
109
basisGradient
[45] =
K15B
* (
TWO
*
rs2
*
mt
+
TWO
*
rs2
*
m2t
-
TWO
*
rt
+
s2
+
s2
*
mt
+ tt -
t2
);
110
basisGradient
[46] =
K15B
* (
TWO
*
rs
+
TWO
*
rs
*
mt
+
TWO
*
r2s
*
mt
+
TWO
*
r2s
*
m2t
);
111
basisGradient
[47] =
112
K15B
* (-
rs2
*
m2t
-
TWO
*
rt
+ rr +
r2s2
* (-
TWO
* tt +
TWO
) *
m4t
-
r2s2
*
m2t
-
r2
);
113
114
basisGradient
[48] =
K15B
* (
TWO
*
rs
+
TWO
*
rs
*
mt
+
TWO
*
rs2
*
mt
+
TWO
*
rs2
*
m2t
);
115
basisGradient
[49] =
K15B
* (
TWO
*
r2s
*
mt
+
TWO
*
r2s
*
m2t
+
r2
+
r2
*
mt
-
TWO
*
st
+ tt -
t2
);
116
basisGradient
[50] =
117
K15B
* (-
r2s
*
m2t
+
r2s2
* (-
TWO
* tt +
TWO
) *
m4t
-
r2s2
*
m2t
-
TWO
*
st
+ ss -
s2
);
118
119
basisGradient
[51] =
K15A
* (-
TWO
*
rs2
*
mt
-
TWO
*
rs2
*
m2t
+
TWO
*
rt
+
s2
+
s2
*
mt
+ tt -
t2
);
120
basisGradient
[52] =
K15A
* (
TWO
*
rs
+
TWO
*
rs
*
mt
-
TWO
*
r2s
*
mt
-
TWO
*
r2s
*
m2t
);
121
basisGradient
[53] =
122
K15A
* (-
rs2
*
m2t
-
TWO
*
rt
+ rr -
r2s2
* (-
TWO
* tt +
TWO
) *
m4t
+
r2s2
*
m2t
+
r2
);
123
124
basisGradient
[54] =
K19
* (
TWO
*
rs2
*
m2t
+
TWO
*
rs2
*
m3t
-
TWO
* rr -
TWO
* rr *
mt
);
125
basisGradient
[55] =
K19
* (
TWO
*
r2s
*
m2t
+
TWO
*
r2s
*
m3t
-
TWO
* ss -
TWO
* ss *
mt
);
126
basisGradient
[56] =
127
K19
* (-
TWO
*
r2s2
*
m3t
-
THREE
*
r2s2
*
m4t
+
r2
*
m2t
+
s2
*
m2t
+
TWO
* tt -
ONE
);
128
129
// MODIFICATIONS TO d/dr(basis)
130
131
basisGradient
[0] =
basisGradient
[0] +
basisGradient
[39] *
FOURTH
+
132
basisGradient
[54] *
THREESIXTYFOURTHS
+
NINTH
* (
basisGradient
[42] +
basisGradient
[51]);
133
basisGradient
[3] =
basisGradient
[3] +
basisGradient
[39] *
FOURTH
+
134
basisGradient
[54] *
THREESIXTYFOURTHS
+
NINTH
* (
basisGradient
[42] +
basisGradient
[45]);
135
basisGradient
[6] =
basisGradient
[6] +
basisGradient
[39] *
FOURTH
+
136
basisGradient
[54] *
THREESIXTYFOURTHS
+
NINTH
* (
basisGradient
[45] +
basisGradient
[48]);
137
basisGradient
[9] =
basisGradient
[9] +
basisGradient
[39] *
FOURTH
+
138
basisGradient
[54] *
THREESIXTYFOURTHS
+
NINTH
* (
basisGradient
[48] +
basisGradient
[51]);
139
basisGradient
[12] =
basisGradient
[12] +
basisGradient
[54] *
EIGHTH
+
140
NINTH
* (
basisGradient
[42] +
basisGradient
[45] +
basisGradient
[48] +
basisGradient
[51]);
141
basisGradient
[15] =
basisGradient
[15] -
basisGradient
[39] *
HALF
-
basisGradient
[42] *
FOURNINTHS
;
142
basisGradient
[18] =
basisGradient
[18] -
basisGradient
[39] *
HALF
-
basisGradient
[45] *
FOURNINTHS
;
143
basisGradient
[21] =
basisGradient
[21] -
basisGradient
[39] *
HALF
-
basisGradient
[48] *
FOURNINTHS
;
144
basisGradient
[24] =
basisGradient
[24] -
basisGradient
[39] *
HALF
-
basisGradient
[51] *
FOURNINTHS
;
145
basisGradient
[27] =
basisGradient
[27] -
basisGradient
[54] *
THREESIXTEENTHS
+
146
FOURNINTHS
* (-
basisGradient
[42] -
basisGradient
[51]);
147
basisGradient
[30] =
basisGradient
[30] -
basisGradient
[54] *
THREESIXTEENTHS
+
148
FOURNINTHS
* (-
basisGradient
[42] -
basisGradient
[45]);
149
basisGradient
[33] =
basisGradient
[33] -
basisGradient
[54] *
THREESIXTEENTHS
+
150
FOURNINTHS
* (-
basisGradient
[45] -
basisGradient
[48]);
151
basisGradient
[36] =
basisGradient
[36] -
basisGradient
[54] *
THREESIXTEENTHS
+
152
FOURNINTHS
* (-
basisGradient
[48] -
basisGradient
[51]);
153
basisGradient
[39] =
basisGradient
[39] -
basisGradient
[54] *
NINESIXTEENTHS
;
154
155
// MODIFICATIONS TO d/ds(basis)
156
157
basisGradient
[1] =
basisGradient
[1] +
basisGradient
[40] *
FOURTH
+
158
basisGradient
[55] *
THREESIXTYFOURTHS
+
NINTH
* (
basisGradient
[43] +
basisGradient
[52]);
159
basisGradient
[4] =
basisGradient
[4] +
basisGradient
[40] *
FOURTH
+
160
basisGradient
[55] *
THREESIXTYFOURTHS
+
NINTH
* (
basisGradient
[43] +
basisGradient
[46]);
161
basisGradient
[7] =
basisGradient
[7] +
basisGradient
[40] *
FOURTH
+
162
basisGradient
[55] *
THREESIXTYFOURTHS
+
NINTH
* (
basisGradient
[46] +
basisGradient
[49]);
163
basisGradient
[10] =
basisGradient
[10] +
basisGradient
[40] *
FOURTH
+
164
basisGradient
[55] *
THREESIXTYFOURTHS
+
NINTH
* (
basisGradient
[49] +
basisGradient
[52]);
165
basisGradient
[13] =
basisGradient
[13] +
basisGradient
[55] *
EIGHTH
+
166
NINTH
* (
basisGradient
[43] +
basisGradient
[46] +
basisGradient
[49] +
basisGradient
[52]);
167
basisGradient
[16] =
basisGradient
[16] -
basisGradient
[40] *
HALF
-
basisGradient
[43] *
FOURNINTHS
;
168
basisGradient
[19] =
basisGradient
[19] -
basisGradient
[40] *
HALF
-
basisGradient
[46] *
FOURNINTHS
;
169
basisGradient
[22] =
basisGradient
[22] -
basisGradient
[40] *
HALF
-
basisGradient
[49] *
FOURNINTHS
;
170
basisGradient
[25] =
basisGradient
[25] -
basisGradient
[40] *
HALF
-
basisGradient
[52] *
FOURNINTHS
;
171
basisGradient
[28] =
basisGradient
[28] -
basisGradient
[55] *
THREESIXTEENTHS
+
172
FOURNINTHS
* (-
basisGradient
[43] -
basisGradient
[52]);
173
basisGradient
[31] =
basisGradient
[31] -
basisGradient
[55] *
THREESIXTEENTHS
+
174
FOURNINTHS
* (-
basisGradient
[43] -
basisGradient
[46]);
175
basisGradient
[34] =
basisGradient
[34] -
basisGradient
[55] *
THREESIXTEENTHS
+
176
FOURNINTHS
* (-
basisGradient
[46] -
basisGradient
[49]);
177
basisGradient
[37] =
basisGradient
[37] -
basisGradient
[55] *
THREESIXTEENTHS
+
178
FOURNINTHS
* (-
basisGradient
[49] -
basisGradient
[52]);
179
basisGradient
[40] =
basisGradient
[40] -
basisGradient
[55] *
NINESIXTEENTHS
;
180
181
// MODIFICATIONS TO d/dt(basis)
182
183
basisGradient
[2] =
basisGradient
[2] +
basisGradient
[41] *
FOURTH
+
184
basisGradient
[56] *
THREESIXTYFOURTHS
+
NINTH
* (
basisGradient
[44] +
basisGradient
[53]);
185
basisGradient
[5] =
basisGradient
[5] +
basisGradient
[41] *
FOURTH
+
186
basisGradient
[56] *
THREESIXTYFOURTHS
+
NINTH
* (
basisGradient
[44] +
basisGradient
[47]);
187
basisGradient
[8] =
basisGradient
[8] +
basisGradient
[41] *
FOURTH
+
188
basisGradient
[56] *
THREESIXTYFOURTHS
+
NINTH
* (
basisGradient
[47] +
basisGradient
[50]);
189
basisGradient
[11] =
basisGradient
[11] +
basisGradient
[41] *
FOURTH
+
190
basisGradient
[56] *
THREESIXTYFOURTHS
+
NINTH
* (
basisGradient
[50] +
basisGradient
[53]);
191
basisGradient
[14] =
basisGradient
[14] +
basisGradient
[56] *
EIGHTH
+
192
NINTH
* (
basisGradient
[44] +
basisGradient
[47] +
basisGradient
[50] +
basisGradient
[53]);
193
basisGradient
[17] =
basisGradient
[17] -
basisGradient
[41] *
HALF
-
basisGradient
[44] *
FOURNINTHS
;
194
basisGradient
[20] =
basisGradient
[20] -
basisGradient
[41] *
HALF
-
basisGradient
[47] *
FOURNINTHS
;
195
basisGradient
[23] =
basisGradient
[23] -
basisGradient
[41] *
HALF
-
basisGradient
[50] *
FOURNINTHS
;
196
basisGradient
[26] =
basisGradient
[26] -
basisGradient
[41] *
HALF
-
basisGradient
[53] *
FOURNINTHS
;
197
basisGradient
[29] =
basisGradient
[29] -
basisGradient
[56] *
THREESIXTEENTHS
+
198
FOURNINTHS
* (-
basisGradient
[44] -
basisGradient
[53]);
199
basisGradient
[32] =
basisGradient
[32] -
basisGradient
[56] *
THREESIXTEENTHS
+
200
FOURNINTHS
* (-
basisGradient
[44] -
basisGradient
[47]);
201
basisGradient
[35] =
basisGradient
[35] -
basisGradient
[56] *
THREESIXTEENTHS
+
202
FOURNINTHS
* (-
basisGradient
[47] -
basisGradient
[50]);
203
basisGradient
[38] =
basisGradient
[38] -
basisGradient
[56] *
THREESIXTEENTHS
+
204
FOURNINTHS
* (-
basisGradient
[50] -
basisGradient
[53]);
205
basisGradient
[41] =
basisGradient
[41] -
basisGradient
[56] *
NINESIXTEENTHS
;
K1
const RealT K1
Definition
PyrF2Gradient.h:18
r2
RealT r2
Definition
PyrF2Gradient.h:27
K14
const RealT K14
Definition
PyrF2Gradient.h:22
m2t
RealT m2t
Definition
PyrF2Gradient.h:44
tm4
RealT tm4
Definition
PyrF2Gradient.h:40
st
RealT st
Definition
PyrF2Gradient.h:32
K5
const RealT K5
Definition
PyrF2Gradient.h:19
r2s2
RealT r2s2
Definition
PyrF2Gradient.h:35
NINTH
const RealT NINTH
Definition
PyrF2Gradient.h:11
EIGHT
const RealT EIGHT
Definition
PyrF2Gradient.h:8
K15A
const RealT K15A
Definition
PyrF2Gradient.h:23
FOUR
const RealT FOUR
Definition
PyrF2Gradient.h:6
FOURTH
const RealT FOURTH
Definition
PyrF2Gradient.h:10
t2
RealT t2
Definition
PyrF2Gradient.h:29
m3t
RealT m3t
Definition
PyrF2Gradient.h:45
tm
RealT tm
Definition
PyrF2Gradient.h:37
rs2
RealT rs2
Definition
PyrF2Gradient.h:34
tm2
RealT tm2
Definition
PyrF2Gradient.h:38
TWENTYSEVEN
const RealT TWENTYSEVEN
Definition
PyrF2Gradient.h:9
TWO
const RealT TWO
Definition
PyrF2Gradient.h:4
r2s
RealT r2s
Definition
PyrF2Gradient.h:33
SIXTEENTHIRDS
const RealT SIXTEENTHIRDS
Definition
PyrF2Gradient.h:7
ONE
const RealT ONE
Definition
PyrF2Gradient.h:2
K19
const RealT K19
Definition
PyrF2Gradient.h:25
THREESIXTYFOURTHS
const RealT THREESIXTYFOURTHS
Definition
PyrF2Gradient.h:12
K15B
const RealT K15B
Definition
PyrF2Gradient.h:24
s2
RealT s2
Definition
PyrF2Gradient.h:28
THREESIXTEENTHS
const RealT THREESIXTEENTHS
Definition
PyrF2Gradient.h:15
m4t
RealT m4t
Definition
PyrF2Gradient.h:46
ZERO
const RealT ZERO
Definition
PyrF2Gradient.h:3
basisGradient
basisGradient[0]
Definition
PyrF2Gradient.h:48
mt
RealT mt
Definition
PyrF2Gradient.h:43
K6
const RealT K6
Definition
PyrF2Gradient.h:20
HALF
const RealT HALF
Definition
PyrF2Gradient.h:1
FOURNINTHS
const RealT FOURNINTHS
Definition
PyrF2Gradient.h:14
rt
RealT rt
Definition
PyrF2Gradient.h:31
EIGHTH
const RealT EIGHTH
Definition
PyrF2Gradient.h:13
K10
const RealT K10
Definition
PyrF2Gradient.h:21
THREE
const RealT THREE
Definition
PyrF2Gradient.h:5
rs
RealT rs
Definition
PyrF2Gradient.h:30
tm3
RealT tm3
Definition
PyrF2Gradient.h:39
NINESIXTEENTHS
const RealT NINESIXTEENTHS
Definition
PyrF2Gradient.h:16
Generated on Sun Nov 3 2024 08:56:30 for VTK by
1.9.7