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