VTK
9.4.20241010
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Filters
CellGrid
Basis
HGrad
PyrC2Basis.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
EIGHT
= 9.;
9
const
RealT
TWENTYSEVEN
= 27.;
10
11
const
RealT
K1
= -
FOURTH
;
12
const
RealT
K5
=
ONE
;
13
const
RealT
K6
= -
HALF
;
14
const
RealT
K10
= -
ONE
;
15
const
RealT
K14
=
ONE
;
16
const
RealT
K15A
=
TWENTYSEVEN
/
EIGHT
;
17
const
RealT
K15B
= -
TWENTYSEVEN
/
EIGHT
;
18
19
// Evaluate common rr,ss,tt multiplication terms
20
RealT
r2
= rr * rr;
21
RealT
s2
= ss * ss;
22
RealT
t2
= tt * tt;
23
RealT
rs
= rr * ss;
24
RealT
rt
= rr * tt;
25
RealT
st
= ss * tt;
26
RealT
r2s
=
r2
* ss;
27
RealT
r2t
=
r2
* tt;
28
RealT
rs2
= rr *
s2
;
29
RealT
s2t
=
s2
* tt;
30
RealT
rt2
= rr *
t2
;
31
RealT
st2
= ss *
t2
;
32
RealT
r2s2
=
r2
*
s2
;
33
34
// Evaluate numerical values of (tt-1), (tt-1)^2, (tt-1)^3, and (tt-1)^4
35
RealT
tm
= tt -
ONE
;
36
RealT
tm2
=
tm
*
tm
;
37
38
// Evaluate numerical value of 1/(tt-1)
39
RealT
mt
= abs(
tm
) > eps ?
ONE
/
tm
:
ZERO
;
40
RealT
m2t
= abs(
tm2
) > eps ?
ONE
/
tm2
:
ZERO
;
41
42
// Baseline shape functions:
43
basis
[0] =
K1
* (rr + ss -
ONE
) * (
rs
*
mt
- rr - ss + tt -
ONE
);
44
basis
[1] =
K1
* (-rr + ss -
ONE
) * (-
rs
*
mt
+ rr - ss + tt -
ONE
);
45
basis
[2] =
K1
* (-rr - ss -
ONE
) * (
rs
*
mt
+ rr + ss + tt -
ONE
);
46
basis
[3] =
K1
* (rr - ss -
ONE
) * (-
rs
*
mt
- rr + ss + tt -
ONE
);
47
basis
[4] =
K5
* (-tt +
TWO
*
t2
);
48
basis
[5] =
K6
* (-
r2s
*
mt
+
r2
+
st
- ss -
tm2
);
49
basis
[6] =
K6
* (
rs2
*
mt
-
rt
+ rr +
s2
-
tm2
);
50
basis
[7] =
K6
* (
r2s
*
mt
+
r2
-
st
+ ss -
tm2
);
51
basis
[8] =
K6
* (-
rs2
*
mt
+
rt
- rr +
s2
-
tm2
);
52
basis
[9] =
K10
* (
rs
+
rs
*
mt
-
rt
-
st
- tt +
t2
);
53
basis
[10] =
K10
* (-
rs
-
rs
*
mt
+
rt
-
st
- tt +
t2
);
54
basis
[11] =
K10
* (
rs
+
rs
*
mt
+
rt
+
st
- tt +
t2
);
55
basis
[12] =
K10
* (-
rs
-
rs
*
mt
-
rt
+
st
- tt +
t2
);
56
basis
[13] =
K14
* (
r2s2
*
m2t
-
r2
-
s2
+
tm2
);
57
basis
[14] =
K15A
* (
r2s
+
r2s
*
mt
-
r2s2
*
mt
-
r2s2
*
m2t
+
st
-
st2
+
s2t
);
58
basis
[15] =
K15B
* (
rs2
+
rs2
*
mt
+
rt
-
rt2
+
r2s2
*
mt
+
r2s2
*
m2t
-
r2t
);
59
basis
[16] =
K15B
* (
r2s
+
r2s
*
mt
+
r2s2
*
mt
+
r2s2
*
m2t
+
st
-
st2
-
s2t
);
60
basis
[17] =
K15A
* (
rs2
+
rs2
*
mt
+
rt
-
rt2
-
r2s2
*
mt
-
r2s2
*
m2t
+
r2t
);
61
62
// MODIFICATIONS TO H
63
64
basis
[0] =
basis
[0] +
FOURTH
*
basis
[13] +
NINTH
* (
basis
[14] +
basis
[17]);
65
basis
[1] =
basis
[1] +
FOURTH
*
basis
[13] +
NINTH
* (
basis
[14] +
basis
[15]);
66
basis
[2] =
basis
[2] +
FOURTH
*
basis
[13] +
NINTH
* (
basis
[15] +
basis
[16]);
67
basis
[3] =
basis
[3] +
FOURTH
*
basis
[13] +
NINTH
* (
basis
[16] +
basis
[17]);
68
basis
[4] =
basis
[4] +
NINTH
* (
basis
[14] +
basis
[15] +
basis
[16] +
basis
[17]);
69
basis
[5] =
basis
[5] -
FOURNINTHS
*
basis
[14] -
basis
[13] *
HALF
;
70
basis
[6] =
basis
[6] -
FOURNINTHS
*
basis
[15] -
basis
[13] *
HALF
;
71
basis
[7] =
basis
[7] -
FOURNINTHS
*
basis
[16] -
basis
[13] *
HALF
;
72
basis
[8] =
basis
[8] -
FOURNINTHS
*
basis
[17] -
basis
[13] *
HALF
;
73
basis
[9] =
basis
[9] -
FOURNINTHS
* (
basis
[14] +
basis
[17]);
74
basis
[10] =
basis
[10] -
FOURNINTHS
* (
basis
[14] +
basis
[15]);
75
basis
[11] =
basis
[11] -
FOURNINTHS
* (
basis
[15] +
basis
[16]);
76
basis
[12] =
basis
[12] -
FOURNINTHS
* (
basis
[16] +
basis
[17]);
K1
const RealT K1
Definition
PyrC2Basis.h:11
r2
RealT r2
Definition
PyrC2Basis.h:20
K14
const RealT K14
Definition
PyrC2Basis.h:15
m2t
RealT m2t
Definition
PyrC2Basis.h:40
rt2
RealT rt2
Definition
PyrC2Basis.h:30
st
RealT st
Definition
PyrC2Basis.h:25
K5
const RealT K5
Definition
PyrC2Basis.h:12
r2s2
RealT r2s2
Definition
PyrC2Basis.h:32
NINTH
const RealT NINTH
Definition
PyrC2Basis.h:4
EIGHT
const RealT EIGHT
Definition
PyrC2Basis.h:8
K15A
const RealT K15A
Definition
PyrC2Basis.h:16
FOURTH
const RealT FOURTH
Definition
PyrC2Basis.h:3
t2
RealT t2
Definition
PyrC2Basis.h:22
tm
RealT tm
Definition
PyrC2Basis.h:35
rs2
RealT rs2
Definition
PyrC2Basis.h:28
tm2
RealT tm2
Definition
PyrC2Basis.h:36
TWENTYSEVEN
const RealT TWENTYSEVEN
Definition
PyrC2Basis.h:9
TWO
const RealT TWO
Definition
PyrC2Basis.h:7
r2s
RealT r2s
Definition
PyrC2Basis.h:26
ONE
const RealT ONE
Definition
PyrC2Basis.h:6
basis
basis[0]
Definition
PyrC2Basis.h:43
K15B
const RealT K15B
Definition
PyrC2Basis.h:17
s2
RealT s2
Definition
PyrC2Basis.h:21
s2t
RealT s2t
Definition
PyrC2Basis.h:29
st2
RealT st2
Definition
PyrC2Basis.h:31
ZERO
const RealT ZERO
Definition
PyrC2Basis.h:1
r2t
RealT r2t
Definition
PyrC2Basis.h:27
mt
RealT mt
Definition
PyrC2Basis.h:39
K6
const RealT K6
Definition
PyrC2Basis.h:13
HALF
const RealT HALF
Definition
PyrC2Basis.h:2
FOURNINTHS
const RealT FOURNINTHS
Definition
PyrC2Basis.h:5
rt
RealT rt
Definition
PyrC2Basis.h:24
K10
const RealT K10
Definition
PyrC2Basis.h:14
rs
RealT rs
Definition
PyrC2Basis.h:23
Generated on Thu Oct 10 2024 12:24:10 for VTK by
1.9.7