VTK  9.4.20241103
PyrC1Gradient.h
Go to the documentation of this file.
1// Be sure that the basis functions are defined when tt is very close to 1.
2// Warning: the derivatives are discontinuous in (0, 0, 1).
3if (abs(tt - 1.0) < eps)
4{
5 if (tt <= 1.0)
6 {
7 tt = 1.0 - eps;
8 }
9 else
10 {
11 tt = 1.0 + eps;
12 }
13}
14
15RealT ttTerm = 0.25 / (1.0 - tt);
16RealT ttTerm2 = 4.0 * ttTerm * ttTerm;
17
18basisGradient[0] = (ss + tt - 1.0) * ttTerm;
19basisGradient[1] = (rr + tt - 1.0) * ttTerm;
20basisGradient[2] = rr * ss * ttTerm2 - 0.25;
21
22basisGradient[3] = (1.0 - ss - tt) * ttTerm;
23basisGradient[4] = (tt - rr - 1.0) * ttTerm;
24basisGradient[5] = rr * ss * ttTerm2 - 0.25;
25
26basisGradient[6] = (1.0 + ss - tt) * ttTerm;
27basisGradient[7] = (1.0 + rr - tt) * ttTerm;
28basisGradient[8] = rr * ss * ttTerm2 - 0.25;
29
30basisGradient[9] = (tt - ss - 1.0) * ttTerm;
31basisGradient[10] = (1.0 - rr - tt) * ttTerm;
32basisGradient[11] = rr * ss * ttTerm2 - 0.25;
33
34basisGradient[12] = 0.0;
35basisGradient[13] = 0.0;
36basisGradient[14] = 1.0;
RealT ttTerm2
basisGradient[0]
RealT ttTerm