VTK
9.4.20250106
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Filters
CellGrid
Basis
HGrad
PyrC2Gradient.h
Go to the documentation of this file.
1
const
RealT
ZERO
= 0.;
2
const
RealT
HALF
= 0.5;
3
const
RealT
FOURTH
= 0.25;
4
const
RealT
NINTH
= 1. / 9.;
5
const
RealT
FOURNINTHS
= 4. / 9.;
6
const
RealT
ONE
= 1.;
7
const
RealT
TWO
= 2.;
8
const
RealT
FOUR
= 4.;
9
const
RealT
EIGHT
= 9.;
10
const
RealT
TWENTYSEVEN
= 27.;
11
12
const
RealT
K1
= -
FOURTH
;
13
const
RealT
K5
=
ONE
;
14
const
RealT
K6
= -
HALF
;
15
const
RealT
K10
= -
ONE
;
16
const
RealT
K14
=
ONE
;
17
const
RealT
K15A
=
TWENTYSEVEN
/
EIGHT
;
18
const
RealT
K15B
= -
TWENTYSEVEN
/
EIGHT
;
19
20
// Evaluate common rr,ss,tt multiplication terms
21
RealT
r2
= rr * rr;
22
RealT
s2
= ss * ss;
23
RealT
t2
= tt * tt;
24
RealT
rs
= rr * ss;
25
RealT
rt
= rr * tt;
26
RealT
st
= ss * tt;
27
RealT
r2s
=
r2
* ss;
28
RealT
rs2
= rr *
s2
;
29
RealT
r2s2
=
r2
*
s2
;
30
31
// Evaluate numerical values of (tt-1), (tt-1)^2, (tt-1)^3, and (tt-1)^4
32
RealT
tm
= tt -
ONE
;
33
RealT
tm2
=
tm
*
tm
;
34
RealT
tm3
=
tm2
*
tm
;
35
RealT
tm4
=
tm3
*
tm
;
36
37
// Evaluate numerical value of 1/(tt-1)
38
RealT
mt
= abs(
tm
) > eps ?
ONE
/
tm
:
ZERO
;
39
RealT
m2t
= abs(
tm2
) > eps ?
ONE
/
tm2
:
ZERO
;
40
RealT
m3t
= abs(
tm3
) > eps ?
ONE
/
tm3
:
ZERO
;
41
RealT
m4t
= abs(
tm4
) > eps ?
ONE
/
tm4
:
ZERO
;
42
43
// BASELINE DHDR
44
basisGradient
[0] =
K1
* (
rs
*
mt
- rr - ss + tt + (ss *
mt
-
ONE
) * (rr + ss -
ONE
) -
ONE
);
45
basisGradient
[3] =
K1
* (
rs
*
mt
- rr + ss - tt + (-ss *
mt
+
ONE
) * (-rr + ss -
ONE
) +
ONE
);
46
basisGradient
[6] =
K1
* (-
rs
*
mt
- rr - ss - tt + (ss *
mt
+
ONE
) * (-rr - ss -
ONE
) +
ONE
);
47
basisGradient
[9] =
K1
* (-
rs
*
mt
- rr + ss + tt + (-ss *
mt
-
ONE
) * (rr - ss -
ONE
) -
ONE
);
48
basisGradient
[12] =
ZERO
;
49
basisGradient
[15] =
K6
* (-
TWO
*
rs
*
mt
+
TWO
* rr);
50
basisGradient
[18] =
K6
* (
s2
*
mt
- tt +
ONE
);
51
basisGradient
[21] =
K6
* (
TWO
*
rs
*
mt
+
TWO
* rr);
52
basisGradient
[24] =
K6
* (-
s2
*
mt
+ tt -
ONE
);
53
basisGradient
[27] =
K10
* (ss + ss *
mt
- tt);
54
basisGradient
[30] =
K10
* (-ss - ss *
mt
+ tt);
55
basisGradient
[33] =
K10
* (ss + ss *
mt
+ tt);
56
basisGradient
[36] =
K10
* (-ss - ss *
mt
- tt);
57
basisGradient
[39] =
K14
* (
TWO
*
rs2
*
m2t
-
TWO
* rr);
58
basisGradient
[42] =
K15A
* (
TWO
*
rs
+
TWO
*
rs
*
mt
-
TWO
*
rs2
*
mt
-
TWO
*
rs2
*
m2t
);
59
basisGradient
[45] =
K15B
* (
TWO
*
rs2
*
mt
+
TWO
*
rs2
*
m2t
-
TWO
*
rt
+
s2
+
s2
*
mt
+ tt -
t2
);
60
basisGradient
[48] =
K15B
* (
TWO
*
rs
+
TWO
*
rs
*
mt
+
TWO
*
rs2
*
mt
+
TWO
*
rs2
*
m2t
);
61
basisGradient
[51] =
K15A
* (-
TWO
*
rs2
*
mt
-
TWO
*
rs2
*
m2t
+
TWO
*
rt
+
s2
+
s2
*
mt
+ tt -
t2
);
62
63
// BASELINE DHDS
64
65
basisGradient
[1] =
K1
* (
rs
*
mt
- rr - ss + tt + (rr *
mt
-
ONE
) * (rr + ss -
ONE
) -
ONE
);
66
basisGradient
[4] =
K1
* (-
rs
*
mt
+ rr - ss + tt + (-rr *
mt
-
ONE
) * (-rr + ss -
ONE
) -
ONE
);
67
basisGradient
[7] =
K1
* (-
rs
*
mt
- rr - ss - tt + (rr *
mt
+
ONE
) * (-rr - ss -
ONE
) +
ONE
);
68
basisGradient
[10] =
K1
* (
rs
*
mt
+ rr - ss - tt + (-rr *
mt
+
ONE
) * (rr - ss -
ONE
) +
ONE
);
69
basisGradient
[13] =
ZERO
;
70
basisGradient
[16] =
K6
* (-
r2
*
mt
+ tt -
ONE
);
71
basisGradient
[19] =
K6
* (
TWO
*
rs
*
mt
+
TWO
* ss);
72
basisGradient
[22] =
K6
* (
r2
*
mt
- tt +
ONE
);
73
basisGradient
[25] =
K6
* (-
TWO
*
rs
*
mt
+
TWO
* ss);
74
basisGradient
[28] =
K10
* (rr + rr *
mt
- tt);
75
basisGradient
[31] =
K10
* (-rr - rr *
mt
- tt);
76
basisGradient
[34] =
K10
* (rr + rr *
mt
+ tt);
77
basisGradient
[37] =
K10
* (-rr - rr *
mt
+ tt);
78
basisGradient
[40] =
K14
* (
TWO
*
r2s
*
m2t
-
TWO
* ss);
79
basisGradient
[43] =
K15A
* (-
TWO
*
r2s
*
mt
-
TWO
*
r2s
*
m2t
+
r2
+
r2
*
mt
+
TWO
*
st
+ tt -
t2
);
80
basisGradient
[46] =
K15B
* (
TWO
*
rs
+
TWO
*
rs
*
mt
+
TWO
*
r2s
*
mt
+
TWO
*
r2s
*
m2t
);
81
basisGradient
[49] =
K15B
* (
TWO
*
r2s
*
mt
+
TWO
*
r2s
*
m2t
+
r2
+
r2
*
mt
-
TWO
*
st
+ tt -
t2
);
82
basisGradient
[52] =
K15A
* (
TWO
*
rs
+
TWO
*
rs
*
mt
-
TWO
*
r2s
*
mt
-
TWO
*
r2s
*
m2t
);
83
84
// BASELINE DHDT
85
86
basisGradient
[2] =
K1
* (-
rs
*
m2t
+
ONE
) * (rr + ss -
ONE
);
87
basisGradient
[5] =
K1
* (
rs
*
m2t
+
ONE
) * (-rr + ss -
ONE
);
88
basisGradient
[8] =
K1
* (-
rs
*
m2t
+
ONE
) * (-rr - ss -
ONE
);
89
basisGradient
[11] =
K1
* (
rs
*
m2t
+
ONE
) * (rr - ss -
ONE
);
90
basisGradient
[14] =
K5
* (
FOUR
* tt -
ONE
);
91
basisGradient
[17] =
K6
* (
r2s
*
m2t
+ ss -
TWO
* tt +
TWO
);
92
basisGradient
[20] =
K6
* (-
rs2
*
m2t
- rr -
TWO
* tt +
TWO
);
93
basisGradient
[23] =
K6
* (-
r2s
*
m2t
- ss -
TWO
* tt +
TWO
);
94
basisGradient
[26] =
K6
* (
rs2
*
m2t
+ rr -
TWO
* tt +
TWO
);
95
basisGradient
[29] =
K10
* (-
rs
*
m2t
- rr - ss +
TWO
* tt -
ONE
);
96
basisGradient
[32] =
K10
* (
rs
*
m2t
+ rr - ss +
TWO
* tt -
ONE
);
97
basisGradient
[35] =
K10
* (-
rs
*
m2t
+ rr + ss +
TWO
* tt -
ONE
);
98
basisGradient
[38] =
K10
* (
rs
*
m2t
- rr + ss +
TWO
* tt -
ONE
);
99
basisGradient
[41] =
K14
* (-
TWO
*
r2s2
*
m3t
+
TWO
* tt -
TWO
);
100
basisGradient
[44] =
101
K15A
* (-
r2s
*
m2t
-
r2s2
* (-
TWO
* tt +
TWO
) *
m4t
+
r2s2
*
m2t
-
TWO
*
st
+ ss +
s2
);
102
basisGradient
[47] =
103
K15B
* (-
rs2
*
m2t
-
TWO
*
rt
+ rr +
r2s2
* (-
TWO
* tt +
TWO
) *
m4t
-
r2s2
*
m2t
-
r2
);
104
basisGradient
[50] =
105
K15B
* (-
r2s
*
m2t
+
r2s2
* (-
TWO
* tt +
TWO
) *
m4t
-
r2s2
*
m2t
-
TWO
*
st
+ ss -
s2
);
106
basisGradient
[53] =
107
K15A
* (-
rs2
*
m2t
-
TWO
*
rt
+ rr -
r2s2
* (-
TWO
* tt +
TWO
) *
m4t
+
r2s2
*
m2t
+
r2
);
108
109
// MODIFICATIONS TO DHDR
110
111
basisGradient
[0] =
112
basisGradient
[0] +
basisGradient
[39] *
FOURTH
+
NINTH
* (
basisGradient
[42] +
basisGradient
[51]);
113
basisGradient
[3] =
114
basisGradient
[3] +
basisGradient
[39] *
FOURTH
+
NINTH
* (
basisGradient
[42] +
basisGradient
[45]);
115
basisGradient
[6] =
116
basisGradient
[6] +
basisGradient
[39] *
FOURTH
+
NINTH
* (
basisGradient
[45] +
basisGradient
[48]);
117
basisGradient
[9] =
118
basisGradient
[9] +
basisGradient
[39] *
FOURTH
+
NINTH
* (
basisGradient
[48] +
basisGradient
[51]);
119
basisGradient
[12] =
basisGradient
[12] +
120
NINTH
* (
basisGradient
[42] +
basisGradient
[45] +
basisGradient
[48] +
basisGradient
[51]);
121
basisGradient
[15] =
basisGradient
[15] -
basisGradient
[39] *
HALF
-
basisGradient
[42] *
FOURNINTHS
;
122
basisGradient
[18] =
basisGradient
[18] -
basisGradient
[39] *
HALF
-
basisGradient
[45] *
FOURNINTHS
;
123
basisGradient
[21] =
basisGradient
[21] -
basisGradient
[39] *
HALF
-
basisGradient
[48] *
FOURNINTHS
;
124
basisGradient
[24] =
basisGradient
[24] -
basisGradient
[39] *
HALF
-
basisGradient
[51] *
FOURNINTHS
;
125
basisGradient
[27] =
basisGradient
[27] +
FOURNINTHS
* (-
basisGradient
[42] -
basisGradient
[51]);
126
basisGradient
[30] =
basisGradient
[30] +
FOURNINTHS
* (-
basisGradient
[42] -
basisGradient
[45]);
127
basisGradient
[33] =
basisGradient
[33] +
FOURNINTHS
* (-
basisGradient
[45] -
basisGradient
[48]);
128
basisGradient
[36] =
basisGradient
[36] +
FOURNINTHS
* (-
basisGradient
[48] -
basisGradient
[51]);
129
130
// MODIFICATIONS TO DHDS
131
132
basisGradient
[1] =
133
basisGradient
[1] +
basisGradient
[40] *
FOURTH
+
NINTH
* (
basisGradient
[43] +
basisGradient
[52]);
134
basisGradient
[4] =
135
basisGradient
[4] +
basisGradient
[40] *
FOURTH
+
NINTH
* (
basisGradient
[43] +
basisGradient
[46]);
136
basisGradient
[7] =
137
basisGradient
[7] +
basisGradient
[40] *
FOURTH
+
NINTH
* (
basisGradient
[46] +
basisGradient
[49]);
138
basisGradient
[10] =
139
basisGradient
[10] +
basisGradient
[40] *
FOURTH
+
NINTH
* (
basisGradient
[49] +
basisGradient
[52]);
140
basisGradient
[13] =
basisGradient
[13] +
141
NINTH
* (
basisGradient
[43] +
basisGradient
[46] +
basisGradient
[49] +
basisGradient
[52]);
142
basisGradient
[16] =
basisGradient
[16] -
basisGradient
[40] *
HALF
-
basisGradient
[43] *
FOURNINTHS
;
143
basisGradient
[19] =
basisGradient
[19] -
basisGradient
[40] *
HALF
-
basisGradient
[46] *
FOURNINTHS
;
144
basisGradient
[22] =
basisGradient
[22] -
basisGradient
[40] *
HALF
-
basisGradient
[49] *
FOURNINTHS
;
145
basisGradient
[25] =
basisGradient
[25] -
basisGradient
[40] *
HALF
-
basisGradient
[52] *
FOURNINTHS
;
146
basisGradient
[28] =
basisGradient
[28] +
FOURNINTHS
* (-
basisGradient
[43] -
basisGradient
[52]);
147
basisGradient
[31] =
basisGradient
[31] +
FOURNINTHS
* (-
basisGradient
[43] -
basisGradient
[46]);
148
basisGradient
[34] =
basisGradient
[34] +
FOURNINTHS
* (-
basisGradient
[46] -
basisGradient
[49]);
149
basisGradient
[37] =
basisGradient
[37] +
FOURNINTHS
* (-
basisGradient
[49] -
basisGradient
[52]);
150
151
// MODIFICATIONS TO DHDT
152
153
basisGradient
[2] =
154
basisGradient
[2] +
basisGradient
[41] *
FOURTH
+
NINTH
* (
basisGradient
[44] +
basisGradient
[53]);
155
basisGradient
[5] =
156
basisGradient
[5] +
basisGradient
[41] *
FOURTH
+
NINTH
* (
basisGradient
[44] +
basisGradient
[47]);
157
basisGradient
[8] =
158
basisGradient
[8] +
basisGradient
[41] *
FOURTH
+
NINTH
* (
basisGradient
[47] +
basisGradient
[50]);
159
basisGradient
[11] =
160
basisGradient
[11] +
basisGradient
[41] *
FOURTH
+
NINTH
* (
basisGradient
[50] +
basisGradient
[53]);
161
basisGradient
[14] =
basisGradient
[14] +
162
NINTH
* (
basisGradient
[44] +
basisGradient
[47] +
basisGradient
[50] +
basisGradient
[53]);
163
basisGradient
[17] =
basisGradient
[17] -
basisGradient
[41] *
HALF
-
basisGradient
[44] *
FOURNINTHS
;
164
basisGradient
[20] =
basisGradient
[20] -
basisGradient
[41] *
HALF
-
basisGradient
[47] *
FOURNINTHS
;
165
basisGradient
[23] =
basisGradient
[23] -
basisGradient
[41] *
HALF
-
basisGradient
[50] *
FOURNINTHS
;
166
basisGradient
[26] =
basisGradient
[26] -
basisGradient
[41] *
HALF
-
basisGradient
[53] *
FOURNINTHS
;
167
basisGradient
[29] =
basisGradient
[29] +
FOURNINTHS
* (-
basisGradient
[44] -
basisGradient
[53]);
168
basisGradient
[32] =
basisGradient
[32] +
FOURNINTHS
* (-
basisGradient
[44] -
basisGradient
[47]);
169
basisGradient
[35] =
basisGradient
[35] +
FOURNINTHS
* (-
basisGradient
[47] -
basisGradient
[50]);
170
basisGradient
[38] =
basisGradient
[38] +
FOURNINTHS
* (-
basisGradient
[50] -
basisGradient
[53]);
K1
const RealT K1
Definition
PyrC2Gradient.h:12
r2
RealT r2
Definition
PyrC2Gradient.h:21
K14
const RealT K14
Definition
PyrC2Gradient.h:16
m2t
RealT m2t
Definition
PyrC2Gradient.h:39
tm4
RealT tm4
Definition
PyrC2Gradient.h:35
st
RealT st
Definition
PyrC2Gradient.h:26
K5
const RealT K5
Definition
PyrC2Gradient.h:13
r2s2
RealT r2s2
Definition
PyrC2Gradient.h:29
NINTH
const RealT NINTH
Definition
PyrC2Gradient.h:4
EIGHT
const RealT EIGHT
Definition
PyrC2Gradient.h:9
K15A
const RealT K15A
Definition
PyrC2Gradient.h:17
FOUR
const RealT FOUR
Definition
PyrC2Gradient.h:8
FOURTH
const RealT FOURTH
Definition
PyrC2Gradient.h:3
t2
RealT t2
Definition
PyrC2Gradient.h:23
m3t
RealT m3t
Definition
PyrC2Gradient.h:40
tm
RealT tm
Definition
PyrC2Gradient.h:32
rs2
RealT rs2
Definition
PyrC2Gradient.h:28
tm2
RealT tm2
Definition
PyrC2Gradient.h:33
TWENTYSEVEN
const RealT TWENTYSEVEN
Definition
PyrC2Gradient.h:10
TWO
const RealT TWO
Definition
PyrC2Gradient.h:7
basisGradient
basisGradient[0]
Definition
PyrC2Gradient.h:44
r2s
RealT r2s
Definition
PyrC2Gradient.h:27
ONE
const RealT ONE
Definition
PyrC2Gradient.h:6
K15B
const RealT K15B
Definition
PyrC2Gradient.h:18
s2
RealT s2
Definition
PyrC2Gradient.h:22
m4t
RealT m4t
Definition
PyrC2Gradient.h:41
ZERO
const RealT ZERO
Definition
PyrC2Gradient.h:1
mt
RealT mt
Definition
PyrC2Gradient.h:38
K6
const RealT K6
Definition
PyrC2Gradient.h:14
HALF
const RealT HALF
Definition
PyrC2Gradient.h:2
FOURNINTHS
const RealT FOURNINTHS
Definition
PyrC2Gradient.h:5
rt
RealT rt
Definition
PyrC2Gradient.h:25
K10
const RealT K10
Definition
PyrC2Gradient.h:15
rs
RealT rs
Definition
PyrC2Gradient.h:24
tm3
RealT tm3
Definition
PyrC2Gradient.h:34
Generated on Mon Jan 6 2025 08:59:52 for VTK by
1.9.7