OGS
NumLib::ShapePyra5 Class Reference

Detailed Description

Shape function for a 5-nodes pyramid element in natural coordinates

Definition at line 21 of file ShapePyra5.h.

#include <ShapePyra5.h>

Public Types

using MeshElement = MeshLib::Pyramid
 

Static Public Member Functions

template<class T_X , class T_N >
static void computeShapeFunction (const T_X &x, T_N &N)
 
template<class T_X , class T_N >
static void computeGradShapeFunction (const T_X &x, 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 42 of file ShapePyra5.h.

Member Function Documentation

◆ computeGradShapeFunction()

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

Evaluate derivatives of the shape function at the given point

Parameters
[in]xnatural coordinates (r,s,t)
[out]dNa matrix of the derivatives

Definition at line 28 of file ShapePyra5-impl.h.

29{
30 const double r = x[0];
31 const double s = x[1];
32 const double t = x[2];
33 // dN/dL1
34 dN[0] = -0.125 * (1.0 - s) * (1.0 - t);
35 dN[1] = -dN[0];
36 dN[2] = 0.125 * (1.0 + s) * (1.0 - t);
37 dN[3] = -dN[2];
38 dN[4] = 0.0;
39 // dN/dL2
40 dN[5] = -0.125 * (1.0 - r) * (1.0 - t);
41 dN[6] = -0.125 * (1.0 + r) * (1.0 - t);
42 dN[7] = -dN[6];
43 dN[8] = -dN[5];
44 dN[9] = 0.0;
45 // dN/dt
46 dN[10] = -0.125 * (1.0 - r) * (1.0 - s);
47 dN[11] = -0.125 * (1.0 + r) * (1.0 - s);
48 dN[12] = -0.125 * (1.0 + r) * (1.0 + s);
49 dN[13] = -0.125 * (1.0 - r) * (1.0 + s);
50 dN[14] = 0.5;
51}

◆ computeShapeFunction()

template<class T_X , class T_N >
void NumLib::ShapePyra5::computeShapeFunction ( const T_X & x,
T_N & N )
static

Evaluate the shape function at the given point

Parameters
[in]xnatural coordinates (r,s,t)
[out]Na vector of calculated shape functions

Definition at line 14 of file ShapePyra5-impl.h.

15{
16 const double r = x[0];
17 const double s = x[1];
18 const double t = x[2];
19
20 N[0] = 0.125 * (1 - r) * (1 - s) * (1 - t);
21 N[1] = 0.125 * (1 + r) * (1 - s) * (1 - t);
22 N[2] = 0.125 * (1 + r) * (1 + s) * (1 - t);
23 N[3] = 0.125 * (1 - r) * (1 + s) * (1 - t);
24 N[4] = 0.5 * (1 + t);
25}

References NumLib::N.

Member Data Documentation

◆ DIM

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

Definition at line 43 of file ShapePyra5.h.

◆ NPOINTS

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

Definition at line 44 of file ShapePyra5.h.

◆ ORDER

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

Definition at line 45 of file ShapePyra5.h.


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