OGS
ShapeTet10-impl.h
Go to the documentation of this file.
1
11namespace NumLib
12{
13template <class T_X, class T_N>
14void ShapeTet10::computeShapeFunction(const T_X& r, T_N& N)
15{
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];
26}
27
28template <class T_X, class T_N>
29void ShapeTet10::computeGradShapeFunction(const T_X& r, T_N& dN)
30{
31 dN[0] = 4.0 * (r[0] + r[1] + r[2]) - 3.0;
32 dN[1] = 4. * r[0] - 1.;
33 dN[2] = 0.0;
34 dN[3] = 0.0;
35 dN[4] = 4.0 * (1.0 - 2.0 * r[0] - r[1] - r[2]);
36 dN[5] = 4.0 * r[1];
37 dN[6] = -4.0 * r[1];
38 dN[7] = -4.0 * r[2];
39 dN[8] = 4.0 * r[2];
40 dN[9] = 0.0;
41
42 dN[10] = 4. * (r[0] + r[1] + r[2]) - 3.;
43 dN[11] = 0.0;
44 dN[12] = 4. * r[1] - 1.;
45 dN[13] = 0.;
46 dN[14] = -4.0 * r[0];
47 dN[15] = 4.0 * r[0];
48 dN[16] = 4.0 * (1.0 - r[0] - 2.0 * r[1] - r[2]);
49 dN[17] = -4.0 * r[2];
50 dN[18] = 0.0;
51 dN[19] = 4.0 * r[2];
52
53 dN[20] = 4. * (r[0] + r[1] + r[2]) - 3.;
54 dN[21] = 0.;
55 dN[22] = 0.;
56 dN[23] = 4. * r[2] - 1.;
57 dN[24] = -4.0 * r[0];
58 dN[25] = 0.0;
59 dN[26] = -4.0 * r[1];
60 dN[27] = 4.0 * (1.0 - r[0] - r[1] - 2.0 * r[2]);
61 dN[28] = 4.0 * r[0];
62 dN[29] = 4.0 * r[1];
63}
64
65} // namespace NumLib
static void computeShapeFunction(const T_X &r, T_N &N)
static void computeGradShapeFunction(const T_X &r, T_N &dN)