OGS
NumLib::ShapeQuad9 Class Reference

Detailed Description

Shape function for a 9-nodes quadrilateral element

Definition at line 14 of file ShapeQuad9.h.

#include <ShapeQuad9.h>

Public Types

using MeshElement = MeshLib::Quad9

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 &r, 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 ShapeQuad9.h.

Member Function Documentation

◆ computeGradShapeFunction()

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

Evaluate derivatives of the shape function at the given point

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

Definition at line 21 of file ShapeQuad9-impl.h.

22{
23 dN[0] = (r[0] + 0.5) * r[1] * (r[1] + 1) / 2;
24 dN[1] = (r[0] - 0.5) * r[1] * (r[1] + 1) / 2;
25 dN[2] = (r[0] - 0.5) * r[1] * (r[1] - 1) / 2;
26 dN[3] = (r[0] + 0.5) * r[1] * (r[1] - 1) / 2;
27 dN[4] = -r[0] * r[1] * (1 + r[1]);
28 dN[5] = (1 - r[1] * r[1]) * (r[0] - 0.5);
29 dN[6] = r[0] * r[1] * (1 - r[1]);
30 dN[7] = (1 - r[1] * r[1]) * (r[0] + 0.5);
31 dN[8] = 2 * r[0] * (r[1] * r[1] - 1);
32
33 dN[10] = (r[1] + 0.5) * r[0] * (r[0] - 1) / 2;
34 dN[11] = (r[1] - 0.5) * r[0] * (r[0] - 1) / 2;
35 dN[12] = (r[1] - 0.5) * r[0] * (r[0] + 1) / 2;
36 dN[13] = (1 - r[0] * r[0]) * (r[1] + 0.5);
37 dN[14] = r[0] * r[1] * (1 - r[0]);
38 dN[15] = (1 - r[0] * r[0]) * (r[1] - 0.5);
39 dN[16] = -r[0] * r[1] * (1 + r[0]);
40 dN[17] = 2 * r[1] * (r[0] * r[0] - 1);
41 dN[9] = (r[1] + 0.5) * r[0] * (r[0] + 1) / 2;
42}

◆ computeShapeFunction()

template<class T_X, class T_N>
void NumLib::ShapeQuad9::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 ShapeQuad9-impl.h.

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

References NumLib::N.

Member Data Documentation

◆ DIM

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

Definition at line 38 of file ShapeQuad9.h.

◆ NPOINTS

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

Definition at line 39 of file ShapeQuad9.h.

◆ ORDER

int NumLib::ShapeQuad9::ORDER = 2
staticconstexpr

Definition at line 40 of file ShapeQuad9.h.

◆ reference_element_centre

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

Definition at line 35 of file ShapeQuad9.h.

35{0.0, 0.0};

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