OGS
ShapePrism6-impl.h
Go to the documentation of this file.
1
11namespace NumLib
12{
13template <class T_X, class T_N>
14void ShapePrism6::computeShapeFunction(const T_X& x, T_N& N)
15{
16 const double L1 = x[0];
17 const double L2 = x[1];
18 const double t = x[2];
19 N[0] = 0.5 * (1.0 - L1 - L2) * (1.0 - t);
20 N[1] = 0.5 * L1 * (1.0 - t);
21 N[2] = 0.5 * L2 * (1.0 - t);
22 N[3] = 0.5 * (1.0 - L1 - L2) * (1.0 + t);
23 N[4] = 0.5 * L1 * (1.0 + t);
24 N[5] = 0.5 * L2 * (1.0 + t);
25}
26
27template <class T_X, class T_N>
28void ShapePrism6::computeGradShapeFunction(const T_X& x, T_N& dN)
29{
30 const double L1 = x[0];
31 const double L2 = x[1];
32 const double t = x[2];
33 // dN/dL1
34 dN[0] = -0.5 * (1.0 - t);
35 dN[1] = -dN[0];
36 dN[2] = 0.0;
37 dN[3] = -0.5 * (1.0 + t);
38 dN[4] = -dN[3];
39 dN[5] = 0.0;
40 // dN/dL2
41 dN[6] = dN[0];
42 dN[7] = 0.0;
43 dN[8] = -dN[0];
44 dN[9] = dN[3];
45 dN[10] = 0.0;
46 dN[11] = -dN[3];
47 // dN/dt
48 dN[12] = -0.5 * (1.0 - L1 - L2);
49 dN[13] = -0.5 * L1;
50 dN[14] = -0.5 * L2;
51 dN[15] = -dN[12];
52 dN[16] = -dN[13];
53 dN[17] = -dN[14];
54}
55
56} // namespace NumLib
static void computeGradShapeFunction(const T_X &x, T_N &dN)
static void computeShapeFunction(const T_X &x, T_N &N)