OGS
NumLib::ShapeQuad8 Class Reference

Detailed Description

Shape function for a 8-nodes quadrilateral element

Definition at line 14 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 constexpr std::array reference_element_centre = {0.0, 0.0}
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 37 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 21 of file ShapeQuad8-impl.h.

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

◆ 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 7 of file ShapeQuad8-impl.h.

8{
9 N[0] = 0.25 * (1.0 + r[0]) * (1.0 + r[1]) * (-1.0 + r[0] + r[1]);
10 N[1] = -0.25 * (1.0 - r[0]) * (1.0 + r[1]) * (1.0 + r[0] - r[1]);
11 N[2] = -0.25 * (1.0 - r[0]) * (1.0 - r[1]) * (1.0 + r[0] + r[1]);
12 N[3] = 0.25 * (1.0 + r[0]) * (1.0 - r[1]) * (-1.0 + r[0] - r[1]);
13 //
14 N[4] = 0.5 * (1.0 - r[0] * r[0]) * (1.0 + r[1]);
15 N[5] = 0.5 * (1.0 - r[1] * r[1]) * (1.0 - r[0]);
16 N[6] = 0.5 * (1.0 - r[0] * r[0]) * (1.0 - r[1]);
17 N[7] = 0.5 * (1.0 - r[1] * r[1]) * (1.0 + r[0]);
18}

References NumLib::N.

Member Data Documentation

◆ DIM

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

Definition at line 38 of file ShapeQuad8.h.

◆ NPOINTS

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

Definition at line 39 of file ShapeQuad8.h.

◆ ORDER

int NumLib::ShapeQuad8::ORDER = 2
staticconstexpr

Definition at line 40 of file ShapeQuad8.h.

◆ reference_element_centre

std::array NumLib::ShapeQuad8::reference_element_centre = {0.0, 0.0}
staticconstexpr

Definition at line 35 of file ShapeQuad8.h.

35{0.0, 0.0};

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