OGS
ShapeQuad4-impl.h
Go to the documentation of this file.
1
13namespace NumLib
14{
15template <class T_X, class T_N>
16void ShapeQuad4::computeShapeFunction(const T_X& r, T_N& N)
17{
18 N[0] = (1.0 + r[0]) * (1.0 + r[1]) / 4;
19 N[1] = (1.0 - r[0]) * (1.0 + r[1]) / 4;
20 N[2] = (1.0 - r[0]) * (1.0 - r[1]) / 4;
21 N[3] = (1.0 + r[0]) * (1.0 - r[1]) / 4;
22}
23
24template <class T_X, class T_N>
25void ShapeQuad4::computeGradShapeFunction(const T_X& r, T_N& dN)
26{
27 dN[0] = +(1.0 + r[1]) / 4;
28 dN[1] = -(1.0 + r[1]) / 4;
29 dN[2] = -(1.0 - r[1]) / 4;
30 dN[3] = +(1.0 - r[1]) / 4;
31 dN[4] = +(1.0 + r[0]) / 4;
32 dN[5] = +(1.0 - r[0]) / 4;
33 dN[6] = -(1.0 - r[0]) / 4;
34 dN[7] = -(1.0 + r[0]) / 4;
35}
36
37} // namespace NumLib
static void computeGradShapeFunction(const T_X &r, T_N &dN)
static void computeShapeFunction(const T_X &r, T_N &N)