53{
54 const double L1 = x[0];
55 const double L2 = x[1];
56 const double L0 = 1.0 - L1 - L2;
57 const double t = x[2];
58 const double tt1 = 1.0 - t * t;
59
60
61 double v1 = (4.0 * L0 - 1);
62 double v2 = (4.0 * L1 - 1);
63
64 dN[0] = -0.5 * (v1 * (1.0 - t) - tt1);
65 dN[1] = 0.5 * (v2 * (1.0 - t) - tt1);
66 dN[2] = 0.0;
67
68 dN[3] = -0.5 * (v1 * (1.0 + t) - tt1);
69 dN[4] = 0.5 * (v2 * (1.0 + t) - tt1);
70 dN[5] = 0.0;
71
72 dN[6] = 2.0 * (L0 - L1) * (1.0 - t);
73 dN[7] = 2.0 * L2 * (1.0 - t);
74 dN[8] = -dN[7];
75
76 dN[9] = 2.0 * (L0 - L1) * (1.0 + t);
77 dN[10] = 2.0 * L2 * (1.0 + t);
78 dN[11] = -dN[10];
79
80 dN[12] = -tt1;
81 dN[13] = tt1;
82 dN[14] = 0.0;
83
84
85 v1 = (4.0 * L2 - 1);
86
87 dN[15] = dN[0];
88 dN[16] = 0.0;
89 dN[17] = 0.5 * (v1 * (1.0 - t) - tt1);
90
91 dN[18] = dN[3];
92 dN[19] = 0.0;
93 dN[20] = 0.5 * (v1 * (1.0 + t) - tt1);
94
95 dN[21] = -2.0 * L1 * (1.0 - t);
96 dN[22] = -dN[21];
97 v1 = 2.0 * (L0 - L2);
98 dN[23] = v1 * (1.0 - t);
99
100 dN[24] = -2.0 * L1 * (1.0 + t);
101 dN[25] = -dN[24];
102 dN[26] = v1 * (1.0 + t);
103
104 dN[27] = -tt1;
105 dN[28] = 0.0;
106 dN[29] = tt1;
107
108
109 v1 = 2.0 * L0 - 1;
110 v2 = 2.0 * L1 - 1;
111 double v3 = 2.0 * L2 - 1;
112
113 dN[30] = 0.5 * L0 * (-v1 + 2.0 * t);
114 dN[31] = 0.5 * L1 * (-v2 + 2.0 * t);
115 dN[32] = 0.5 * L2 * (-v3 + 2.0 * t);
116
117 dN[33] = 0.5 * L0 * (v1 + 2.0 * t);
118 dN[34] = 0.5 * L1 * (v2 + 2.0 * t);
119 dN[35] = 0.5 * L2 * (v3 + 2.0 * t);
120
121 dN[36] = -2.0 * L0 * L1;
122 dN[37] = -2.0 * L1 * L2;
123 dN[38] = -2.0 * L2 * L0;
124
125 dN[39] = -dN[36];
126 dN[40] = -dN[37];
127 dN[41] = -dN[38];
128
129 dN[42] = -2.0 * L0 * t;
130 dN[43] = -2.0 * L1 * t;
131 dN[44] = -2.0 * L2 * t;
132}