OGS
NumLib::ShapeTri6 Class Reference

Detailed Description

Shape function for a 6-nodes triangle element

Definition at line 15 of file ShapeTri6.h.

#include <ShapeTri6.h>

Public Types

using MeshElement = MeshLib::Tri6

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 = 2

Member Typedef Documentation

◆ MeshElement

Definition at line 39 of file ShapeTri6.h.

Member Function Documentation

◆ computeGradShapeFunction()

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

19{
20 dN[0] = 4. * (r[0] + r[1]) - 3.; // dN1/dL1
21 dN[6] = dN[0]; // dN1/dL2
22
23 dN[1] = 4. * r[0] - 1.; // dN2/dL1
24 dN[7] = 0.; // dN2/dL2
25
26 dN[2] = 0.; // dN3/dL1
27 dN[8] = 4. * r[1] - 1.; // dN3/dL2
28
29 dN[3] = 4. * (1 - 2. * r[0] - r[1]); // dN4/dL1
30 dN[9] = -4. * r[0]; // dN4/dL2
31
32 dN[4] = 4. * r[1]; // dN5/dL1
33 dN[10] = -dN[9]; // dN5/dL2
34
35 dN[5] = -dN[4]; // dN6/dL1
36 dN[11] = 4. * (1 - r[0] - 2. * r[1]); // dN6/dL2
37}

◆ computeShapeFunction()

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

8{
9 N[0] = 2. * (1. - r[0] - r[1]) * (0.5 - r[0] - r[1]);
10 N[1] = r[0] * (2. * r[0] - 1.);
11 N[2] = r[1] * (2. * r[1] - 1.);
12 N[3] = 4. * r[0] * (1. - r[0] - r[1]);
13 N[4] = 4. * r[0] * r[1];
14 N[5] = 4. * r[1] * (1. - r[0] - r[1]);
15}

References NumLib::N.

Member Data Documentation

◆ DIM

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

Definition at line 40 of file ShapeTri6.h.

◆ NPOINTS

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

Definition at line 41 of file ShapeTri6.h.

◆ ORDER

int NumLib::ShapeTri6::ORDER = 2
staticconstexpr

Definition at line 42 of file ShapeTri6.h.

◆ reference_element_centre

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

Definition at line 37 of file ShapeTri6.h.

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

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