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 33 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 const unsigned DIM = MeshElement::dimension

static const unsigned NPOINTS = MeshElement::n_all_nodes

static constexpr int ORDER = 1

## ◆ MeshElement

Definition at line 55 of file ShapeTri3.h.

## Member Function Documentation

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] r point coordinates [out] dN a matrix of the derivatives

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

26{
27 // dN/dr
28 dN[0] = -1.0;
29 dN[1] = 1.0;
30 dN[2] = 0.0;
31 // dN/ds
32 dN[3] = -1.0;
33 dN[4] = 0.0;
34 dN[5] = 1.0;
35}

## ◆ 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] r point coordinates [out] N a vector of calculated shape function.

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

18{
19 N[0] = 1. - r[0] - r[1];
20 N[1] = r[0];
21 N[2] = r[1];
22}

References NumLib::N.

## ◆ DIM

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

Definition at line 56 of file ShapeTri3.h.

## ◆ NPOINTS

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

Definition at line 57 of file ShapeTri3.h.

## ◆ ORDER

 constexpr int NumLib::ShapeTri3::ORDER = 1
staticconstexpr

Definition at line 58 of file ShapeTri3.h.

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