16 N[0] = 2. * (1 - r[0] - r[1] - r[2]) * (0.5 - r[0] - r[1] - r[2]);
17 N[1] = r[0] * (2. * r[0] - 1);
18 N[2] = r[1] * (2. * r[1] - 1);
19 N[3] = r[2] * (2. * r[2] - 1);
20 N[4] = 4.0 * r[0] * (1.0 - r[0] - r[1] - r[2]);
21 N[5] = 4.0 * r[0] * r[1];
22 N[6] = 4.0 * r[1] * (1.0 - r[0] - r[1] - r[2]);
23 N[7] = 4.0 * r[2] * (1.0 - r[0] - r[1] - r[2]);
24 N[8] = 4.0 * r[0] * r[2];
25 N[9] = 4.0 * r[1] * r[2];
31 dN[0] = 4.0 * (r[0] + r[1] + r[2]) - 3.0;
32 dN[1] = 4. * r[0] - 1.;
35 dN[4] = 4.0 * (1.0 - 2.0 * r[0] - r[1] - r[2]);
42 dN[10] = 4. * (r[0] + r[1] + r[2]) - 3.;
44 dN[12] = 4. * r[1] - 1.;
48 dN[16] = 4.0 * (1.0 - r[0] - 2.0 * r[1] - r[2]);
53 dN[20] = 4. * (r[0] + r[1] + r[2]) - 3.;
56 dN[23] = 4. * r[2] - 1.;
60 dN[27] = 4.0 * (1.0 - r[0] - r[1] - 2.0 * r[2]);