45{
46 const double r = x[0];
47 const double s = x[1];
48 const double t = x[2];
49
50 dN[0] = 0.0625 * (1.0 - s) * (1.0 - t) *
51 (1.0 + 6.0 * r + s + 4.0 * r * s + t + 2.0 * r * t - s * t +
52 4.0 * r * s * t);
53 dN[1] = -0.0625 * (1.0 - s) * (1.0 - t) *
54 (1.0 - 6.0 * r + s - 4.0 * r * s + t - 2.0 * r * t - s * t -
55 4.0 * r * s * t);
56 dN[2] = -0.0625 * (1.0 + s) * (1.0 - t) *
57 (1.0 - 6.0 * r - s + 4.0 * r * s + t - 2.0 * r * t + s * t +
58 4.0 * r * s * t);
59 dN[3] = 0.0625 * (1.0 + s) * (1.0 - t) *
60 (1.0 + 6.0 * r - s - 4.0 * r * s + t + 2.0 * r * t + s * t -
61 4.0 * r * s * t);
62 dN[4] = 0.0;
63 dN[5] = -0.25 * r * (1.0 - s) * (1.0 - t) * (2.0 + s + s * t);
64 dN[6] = 0.125 * (1.0 - s * s) * (1.0 - t) * (1.0 - 2.0 * r - t - 2 * r * t);
65 dN[7] = -0.25 * r * (1.0 + s) * (1.0 - t) * (2.0 - s - s * t);
66 dN[8] =
67 -0.125 * (1.0 - s * s) * (1.0 - t) * (1.0 + 2.0 * r - t + 2 * r * t);
68 dN[9] = -0.25 * (1.0 - s) * (1.0 - t * t);
69 dN[10] = 0.25 * (1.0 - s) * (1.0 - t * t);
70 dN[11] = 0.25 * (1.0 + s) * (1.0 - t * t);
71 dN[12] = -0.25 * (1.0 + s) * (1.0 - t * t);
72
73
74 dN[13] = 0.0625 * (1.0 - r) * (1.0 - t) *
75 (1.0 + r + 6.0 * s + 4.0 * r * s + t - r * t + 2.0 * s * t +
76 4.0 * r * s * t);
77 dN[14] = 0.0625 * (1.0 + r) * (1.0 - t) *
78 (1.0 - r + 6.0 * s - 4.0 * r * s + t + r * t + 2.0 * s * t -
79 4.0 * r * s * t);
80 dN[15] = -0.0625 * (1.0 + r) * (1.0 - t) *
81 (1.0 - r - 6.0 * s + 4.0 * r * s + t + r * t - 2.0 * s * t +
82 4.0 * r * s * t);
83 dN[16] = -0.0625 * (1.0 - r) * (1.0 - t) *
84 (1.0 + r - 6.0 * s - 4.0 * r * s + t - r * t - 2.0 * s * t -
85 4.0 * r * s * t);
86 dN[17] = 0.0;
87 dN[18] =
88 -0.125 * (1.0 - r * r) * (1.0 - t) * (1.0 + 2.0 * s - t + 2.0 * s * t);
89 dN[19] = -0.25 * (1.0 + r) * s * (1.0 - t) * (2.0 - r - r * t);
90 dN[20] =
91 0.125 * (1.0 - r * r) * (1.0 - t) * (1.0 - 2.0 * s - t - 2.0 * s * t);
92 dN[21] = -0.25 * (1.0 - r) * s * (1.0 - t) * (2.0 + r + r * t);
93 dN[22] = -0.25 * (1.0 - r) * (1.0 - t * t);
94 dN[23] = -0.25 * (1.0 + r) * (1.0 - t * t);
95 dN[24] = 0.25 * (1.0 + r) * (1.0 - t * t);
96 dN[25] = 0.25 * (1.0 - r) * (1.0 - t * t);
97
98
99 dN[26] = 0.125 * (1.0 - r) * (1.0 - s) *
100 (1.0 + r + s + 2.0 * t + r * t + s * t + 2.0 * r * s * t);
101 dN[27] = 0.125 * (1.0 + r) * (1.0 - s) *
102 (1.0 - r + s + 2.0 * t - r * t + s * t - 2.0 * r * s * t);
103 dN[28] = 0.125 * (1.0 + r) * (1.0 + s) *
104 (1.0 - r - s + 2.0 * t - r * t - s * t + 2.0 * r * s * t);
105 dN[29] = 0.125 * (1.0 - r) * (1.0 + s) *
106 (1.0 + r - s + 2.0 * t + r * t - s * t - 2.0 * r * s * t);
107 dN[30] = 0.5 + t;
108 dN[31] = -0.25 * (1.0 - r * r) * (1.0 - s) * (1.0 + s * t);
109 dN[32] = -0.25 * (1.0 + r) * (1.0 - s * s) * (1.0 - r * t);
110 dN[33] = -0.25 * (1.0 - r * r) * (1.0 + s) * (1.0 - s * t);
111 dN[34] = -0.25 * (1.0 - r) * (1.0 - s * s) * (1.0 + r * t);
112 dN[35] = -0.5 * (1.0 - r) * (1.0 - s) * t;
113 dN[36] = -0.5 * (1.0 + r) * (1.0 - s) * t;
114 dN[37] = -0.5 * (1.0 + r) * (1.0 + s) * t;
115 dN[38] = -0.5 * (1.0 - r) * (1.0 + s) * t;
116}