OGS
NumLib::ShapeQuad8 Class Reference

Detailed Description

Shape function for a 8-nodes quadrilateral element

Definition at line 20 of file ShapeQuad8.h.

#include <ShapeQuad8.h>

Public Types

using MeshElement = MeshLib::Quad8
 

Static Public Member Functions

template<class T_X , class T_N >
static void computeShapeFunction (const T_X &r, T_N &N)
 
template<class T_X , class T_N >
static void computeGradShapeFunction (const T_X &rs, T_N &dN)
 

Static Public Attributes

static const unsigned DIM = MeshElement::dimension
 
static const unsigned NPOINTS = MeshElement::n_all_nodes
 
static constexpr int ORDER = 2
 

Member Typedef Documentation

◆ MeshElement

Definition at line 41 of file ShapeQuad8.h.

Member Function Documentation

◆ computeGradShapeFunction()

template<class T_X , class T_N >
void NumLib::ShapeQuad8::computeGradShapeFunction ( const T_X & rs,
T_N & dN )
static

Evaluate derivatives of the shape function at the given point

Parameters
[in]rspoint coordinates
[out]dNa matrix of the derivatives

Definition at line 28 of file ShapeQuad8-impl.h.

29{
30 const double r = rs[0];
31 const double s = rs[1];
32
33 // dN/dr
34 dN[0] = (1 + s) * (2 * r + s) * 0.25;
35 dN[1] = (1 + s) * (2 * r - s) * 0.25;
36 dN[2] = (1 - s) * (2 * r + s) * 0.25;
37 dN[3] = (1 - s) * (2 * r - s) * 0.25;
38
39 dN[4] = -r * (1 + s);
40 dN[5] = -(1 - s * s) * 0.5;
41 dN[6] = -r * (1 - s);
42 dN[7] = (1 - s * s) * 0.5;
43
44 // dN/ds
45 dN[8] = (1 + r) * (r + 2 * s) * 0.25;
46 dN[9] = -(1 - r) * (r - 2 * s) * 0.25;
47 dN[10] = (1 - r) * (r + 2 * s) * 0.25;
48 dN[11] = -(1 + r) * (r - 2 * s) * 0.25;
49
50 dN[12] = (1 - r * r) * 0.5;
51 dN[13] = -(1 - r) * s;
52 dN[14] = -(1 - r * r) * 0.5;
53 dN[15] = -(1 + r) * s;
54}

◆ computeShapeFunction()

template<class T_X , class T_N >
void NumLib::ShapeQuad8::computeShapeFunction ( const T_X & r,
T_N & N )
static

Evaluate the shape function at the given point

Parameters
[in]rpoint coordinates
[out]Na vector of calculated shape function.

Definition at line 14 of file ShapeQuad8-impl.h.

15{
16 N[0] = 0.25 * (1.0 + r[0]) * (1.0 + r[1]) * (-1.0 + r[0] + r[1]);
17 N[1] = -0.25 * (1.0 - r[0]) * (1.0 + r[1]) * (1.0 + r[0] - r[1]);
18 N[2] = -0.25 * (1.0 - r[0]) * (1.0 - r[1]) * (1.0 + r[0] + r[1]);
19 N[3] = 0.25 * (1.0 + r[0]) * (1.0 - r[1]) * (-1.0 + r[0] - r[1]);
20 //
21 N[4] = 0.5 * (1.0 - r[0] * r[0]) * (1.0 + r[1]);
22 N[5] = 0.5 * (1.0 - r[1] * r[1]) * (1.0 - r[0]);
23 N[6] = 0.5 * (1.0 - r[0] * r[0]) * (1.0 - r[1]);
24 N[7] = 0.5 * (1.0 - r[1] * r[1]) * (1.0 + r[0]);
25}

References NumLib::N.

Member Data Documentation

◆ DIM

const unsigned NumLib::ShapeQuad8::DIM = MeshElement::dimension
static

Definition at line 42 of file ShapeQuad8.h.

◆ NPOINTS

const unsigned NumLib::ShapeQuad8::NPOINTS = MeshElement::n_all_nodes
static

Definition at line 43 of file ShapeQuad8.h.

◆ ORDER

constexpr int NumLib::ShapeQuad8::ORDER = 2
staticconstexpr

Definition at line 44 of file ShapeQuad8.h.


The documentation for this class was generated from the following files: