OGS
NumLib::ShapePyra13 Class Reference

Detailed Description

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

Definition at line 21 of file ShapePyra13.h.

#include <ShapePyra13.h>

Public Types

using MeshElement = MeshLib::Pyramid13
 

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

Member Typedef Documentation

◆ MeshElement

Member Function Documentation

◆ computeGradShapeFunction()

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

45{
46 const double r = x[0];
47 const double s = x[1];
48 const double t = x[2];
49 //---dN/dr
50 dN[0] = 0.0625 * (1.0 - s) * (1.0 - t) *
51 (1.0 + 6.0 * r + s + 4.0 * r * s + t + 2.0 * r * t - s * t +
52 4.0 * r * s * t);
53 dN[1] = -0.0625 * (1.0 - s) * (1.0 - t) *
54 (1.0 - 6.0 * r + s - 4.0 * r * s + t - 2.0 * r * t - s * t -
55 4.0 * r * s * t);
56 dN[2] = -0.0625 * (1.0 + s) * (1.0 - t) *
57 (1.0 - 6.0 * r - s + 4.0 * r * s + t - 2.0 * r * t + s * t +
58 4.0 * r * s * t);
59 dN[3] = 0.0625 * (1.0 + s) * (1.0 - t) *
60 (1.0 + 6.0 * r - s - 4.0 * r * s + t + 2.0 * r * t + s * t -
61 4.0 * r * s * t);
62 dN[4] = 0.0;
63 dN[5] = -0.25 * r * (1.0 - s) * (1.0 - t) * (2.0 + s + s * t);
64 dN[6] = 0.125 * (1.0 - s * s) * (1.0 - t) * (1.0 - 2.0 * r - t - 2 * r * t);
65 dN[7] = -0.25 * r * (1.0 + s) * (1.0 - t) * (2.0 - s - s * t);
66 dN[8] =
67 -0.125 * (1.0 - s * s) * (1.0 - t) * (1.0 + 2.0 * r - t + 2 * r * t);
68 dN[9] = -0.25 * (1.0 - s) * (1.0 - t * t);
69 dN[10] = 0.25 * (1.0 - s) * (1.0 - t * t);
70 dN[11] = 0.25 * (1.0 + s) * (1.0 - t * t);
71 dN[12] = -0.25 * (1.0 + s) * (1.0 - t * t);
72
73 //---dN/ds
74 dN[13] = 0.0625 * (1.0 - r) * (1.0 - t) *
75 (1.0 + r + 6.0 * s + 4.0 * r * s + t - r * t + 2.0 * s * t +
76 4.0 * r * s * t);
77 dN[14] = 0.0625 * (1.0 + r) * (1.0 - t) *
78 (1.0 - r + 6.0 * s - 4.0 * r * s + t + r * t + 2.0 * s * t -
79 4.0 * r * s * t);
80 dN[15] = -0.0625 * (1.0 + r) * (1.0 - t) *
81 (1.0 - r - 6.0 * s + 4.0 * r * s + t + r * t - 2.0 * s * t +
82 4.0 * r * s * t);
83 dN[16] = -0.0625 * (1.0 - r) * (1.0 - t) *
84 (1.0 + r - 6.0 * s - 4.0 * r * s + t - r * t - 2.0 * s * t -
85 4.0 * r * s * t);
86 dN[17] = 0.0;
87 dN[18] =
88 -0.125 * (1.0 - r * r) * (1.0 - t) * (1.0 + 2.0 * s - t + 2.0 * s * t);
89 dN[19] = -0.25 * (1.0 + r) * s * (1.0 - t) * (2.0 - r - r * t);
90 dN[20] =
91 0.125 * (1.0 - r * r) * (1.0 - t) * (1.0 - 2.0 * s - t - 2.0 * s * t);
92 dN[21] = -0.25 * (1.0 - r) * s * (1.0 - t) * (2.0 + r + r * t);
93 dN[22] = -0.25 * (1.0 - r) * (1.0 - t * t);
94 dN[23] = -0.25 * (1.0 + r) * (1.0 - t * t);
95 dN[24] = 0.25 * (1.0 + r) * (1.0 - t * t);
96 dN[25] = 0.25 * (1.0 - r) * (1.0 - t * t);
97
98 //---dN/dt
99 dN[26] = 0.125 * (1.0 - r) * (1.0 - s) *
100 (1.0 + r + s + 2.0 * t + r * t + s * t + 2.0 * r * s * t);
101 dN[27] = 0.125 * (1.0 + r) * (1.0 - s) *
102 (1.0 - r + s + 2.0 * t - r * t + s * t - 2.0 * r * s * t);
103 dN[28] = 0.125 * (1.0 + r) * (1.0 + s) *
104 (1.0 - r - s + 2.0 * t - r * t - s * t + 2.0 * r * s * t);
105 dN[29] = 0.125 * (1.0 - r) * (1.0 + s) *
106 (1.0 + r - s + 2.0 * t + r * t - s * t - 2.0 * r * s * t);
107 dN[30] = 0.5 + t;
108 dN[31] = -0.25 * (1.0 - r * r) * (1.0 - s) * (1.0 + s * t);
109 dN[32] = -0.25 * (1.0 + r) * (1.0 - s * s) * (1.0 - r * t);
110 dN[33] = -0.25 * (1.0 - r * r) * (1.0 + s) * (1.0 - s * t);
111 dN[34] = -0.25 * (1.0 - r) * (1.0 - s * s) * (1.0 + r * t);
112 dN[35] = -0.5 * (1.0 - r) * (1.0 - s) * t;
113 dN[36] = -0.5 * (1.0 + r) * (1.0 - s) * t;
114 dN[37] = -0.5 * (1.0 + r) * (1.0 + s) * t;
115 dN[38] = -0.5 * (1.0 - r) * (1.0 + s) * t;
116}

◆ computeShapeFunction()

template<class T_X , class T_N >
void NumLib::ShapePyra13::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 ShapePyra13-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.0625 * (1.0 - r) * (1.0 - s) * (1.0 - t) *
21 (4.0 + 3.0 * r + 3.0 * s + 2.0 * r * s + 2.0 * t + r * t + s * t +
22 2.0 * r * s * t);
23 N[1] = -0.0625 * (1.0 + r) * (1.0 - s) * (1.0 - t) *
24 (4.0 - 3.0 * r + 3.0 * s - 2.0 * r * s + 2.0 * t - r * t + s * t -
25 2.0 * r * s * t);
26 N[2] = -0.0625 * (1.0 + r) * (1.0 + s) * (1.0 - t) *
27 (4.0 - 3.0 * r - 3.0 * s + 2.0 * r * s + 2.0 * t - r * t - s * t +
28 2.0 * r * s * t);
29 N[3] = -0.0625 * (1.0 - r) * (1.0 + s) * (1.0 - t) *
30 (4.0 + 3.0 * r - 3.0 * s - 2.0 * r * s + 2.0 * t + r * t - s * t -
31 2.0 * r * s * t);
32 N[4] = 0.5 * t * (1.0 + t);
33 N[5] = 0.125 * (1.0 - r * r) * (1.0 - s) * (1.0 - t) * (2.0 + s + s * t);
34 N[6] = 0.125 * (1.0 + r) * (1.0 - s * s) * (1.0 - t) * (2.0 - r - r * t);
35 N[7] = 0.125 * (1.0 - r * r) * (1.0 + s) * (1.0 - t) * (2.0 - s - s * t);
36 N[8] = 0.125 * (1.0 - r) * (1.0 - s * s) * (1.0 - t) * (2.0 + r + r * t);
37 N[9] = 0.25 * (1.0 - r) * (1.0 - s) * (1.0 - t * t);
38 N[10] = 0.25 * (1.0 + r) * (1.0 - s) * (1.0 - t * t);
39 N[11] = 0.25 * (1.0 + r) * (1.0 + s) * (1.0 - t * t);
40 N[12] = 0.25 * (1.0 - r) * (1.0 + s) * (1.0 - t * t);
41}

References NumLib::N.

Member Data Documentation

◆ DIM

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

Definition at line 43 of file ShapePyra13.h.

◆ NPOINTS

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

Definition at line 44 of file ShapePyra13.h.

◆ ORDER

constexpr int NumLib::ShapePyra13::ORDER = 2
staticconstexpr

Definition at line 45 of file ShapePyra13.h.


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