OGS
NumLib::ShapeTri3 Class Reference

Detailed Description

Shape function for a triangle element of three nodes in natural coordinates

*  3 (0,1)
*    *
*  s | \
*    |   \
*    |     \
*    *------* r
*  1 (0,0)    2 (1,0)
* 

Definition at line 24 of file ShapeTri3.h.

#include <ShapeTri3.h>

Public Types

using MeshElement = MeshLib::Tri

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 = {1. / 3., 1. / 3.}
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 48 of file ShapeTri3.h.

Member Function Documentation

◆ computeGradShapeFunction()

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

Evaluate derivatives of the shape function at the given point The point coordinates in r are not used.

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

Definition at line 15 of file ShapeTri3-impl.h.

16{
17 // dN/dr
18 dN[0] = -1.0;
19 dN[1] = 1.0;
20 dN[2] = 0.0;
21 // dN/ds
22 dN[3] = -1.0;
23 dN[4] = 0.0;
24 dN[5] = 1.0;
25}

◆ computeShapeFunction()

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

8{
9 N[0] = 1. - r[0] - r[1];
10 N[1] = r[0];
11 N[2] = r[1];
12}

References NumLib::N.

Member Data Documentation

◆ DIM

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

Definition at line 49 of file ShapeTri3.h.

◆ NPOINTS

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

Definition at line 50 of file ShapeTri3.h.

◆ ORDER

int NumLib::ShapeTri3::ORDER = 1
staticconstexpr

Definition at line 51 of file ShapeTri3.h.

◆ reference_element_centre

std::array NumLib::ShapeTri3::reference_element_centre = {1. / 3., 1. / 3.}
staticconstexpr

Definition at line 46 of file ShapeTri3.h.

46{1. / 3., 1. / 3.};

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