OGS
NumLib::ShapeQuad4 Class Reference

Detailed Description

Shape function for a quadrilateral element of four nodes in natural coordinates

*  2 (-1,1)     1 (1,1)
*     *--------*
*     |        |
*     |        |
*     |        |
*     *--------*
*  3 (-1,-1)    4 (1,-1)
* 

Definition at line 33 of file ShapeQuad4.h.

#include <ShapeQuad4.h>

Public Types

using MeshElement = MeshLib::Quad
 

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 const unsigned DIM = MeshElement::dimension
 
static const unsigned NPOINTS = MeshElement::n_all_nodes
 
static constexpr int ORDER = 1
 

Member Typedef Documentation

◆ MeshElement

Definition at line 54 of file ShapeQuad4.h.

Member Function Documentation

◆ computeGradShapeFunction()

template<class T_X , class T_N >
void NumLib::ShapeQuad4::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 25 of file ShapeQuad4-impl.h.

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}

◆ computeShapeFunction()

template<class T_X , class T_N >
void NumLib::ShapeQuad4::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 16 of file ShapeQuad4-impl.h.

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}

References NumLib::N.

Member Data Documentation

◆ DIM

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

Definition at line 55 of file ShapeQuad4.h.

◆ NPOINTS

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

Definition at line 56 of file ShapeQuad4.h.

◆ ORDER

int NumLib::ShapeQuad4::ORDER = 1
staticconstexpr

Definition at line 57 of file ShapeQuad4.h.


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