OGS
NumLib::ShapePrism15 Class Reference

Detailed Description

Shape function for a 15-nodes prism element in natural coordinates

Definition at line 21 of file ShapePrism15.h.

#include <ShapePrism15.h>

Public Types

using MeshElement = MeshLib::Prism15
 

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::ShapePrism15::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 52 of file ShapePrism15-impl.h.

53 {
54  const double L1 = x[0];
55  const double L2 = x[1];
56  const double L0 = 1.0 - L1 - L2;
57  const double t = x[2];
58  const double tt1 = 1.0 - t * t;
59 
60  //---dN/dL1
61  double v1 = (4.0 * L0 - 1);
62  double v2 = (4.0 * L1 - 1);
63  // Vertex, bottom
64  dN[0] = -0.5 * (v1 * (1.0 - t) - tt1);
65  dN[1] = 0.5 * (v2 * (1.0 - t) - tt1);
66  dN[2] = 0.0;
67  // Vertex, top
68  dN[3] = -0.5 * (v1 * (1.0 + t) - tt1);
69  dN[4] = 0.5 * (v2 * (1.0 + t) - tt1);
70  dN[5] = 0.0;
71  // Middle point, bottom
72  dN[6] = 2.0 * (L0 - L1) * (1.0 - t);
73  dN[7] = 2.0 * L2 * (1.0 - t);
74  dN[8] = -dN[7];
75  // Middle point, top
76  dN[9] = 2.0 * (L0 - L1) * (1.0 + t);
77  dN[10] = 2.0 * L2 * (1.0 + t);
78  dN[11] = -dN[10];
79  // Middle point, center
80  dN[12] = -tt1;
81  dN[13] = tt1;
82  dN[14] = 0.0;
83 
84  //---dN/dL2
85  v1 = (4.0 * L2 - 1);
86  // Vertex, bottom
87  dN[15] = dN[0];
88  dN[16] = 0.0;
89  dN[17] = 0.5 * (v1 * (1.0 - t) - tt1);
90  // Vertex, top
91  dN[18] = dN[3];
92  dN[19] = 0.0;
93  dN[20] = 0.5 * (v1 * (1.0 + t) - tt1);
94  // Middle point, bottom
95  dN[21] = -2.0 * L1 * (1.0 - t);
96  dN[22] = -dN[21];
97  v1 = 2.0 * (L0 - L2);
98  dN[23] = v1 * (1.0 - t);
99  // Middle point, top
100  dN[24] = -2.0 * L1 * (1.0 + t);
101  dN[25] = -dN[24];
102  dN[26] = v1 * (1.0 + t);
103  // Middle point, center
104  dN[27] = -tt1;
105  dN[28] = 0.0;
106  dN[29] = tt1;
107 
108  //---dN/dt
109  v1 = 2.0 * L0 - 1;
110  v2 = 2.0 * L1 - 1;
111  double v3 = 2.0 * L2 - 1;
112  // Vertex, bottom
113  dN[30] = 0.5 * L0 * (-v1 + 2.0 * t);
114  dN[31] = 0.5 * L1 * (-v2 + 2.0 * t);
115  dN[32] = 0.5 * L2 * (-v3 + 2.0 * t);
116  // Vertex, top
117  dN[33] = 0.5 * L0 * (v1 + 2.0 * t);
118  dN[34] = 0.5 * L1 * (v2 + 2.0 * t);
119  dN[35] = 0.5 * L2 * (v3 + 2.0 * t);
120  // Middle point, bottom
121  dN[36] = -2.0 * L0 * L1;
122  dN[37] = -2.0 * L1 * L2;
123  dN[38] = -2.0 * L2 * L0;
124  // Middle point, top
125  dN[39] = -dN[36];
126  dN[40] = -dN[37];
127  dN[41] = -dN[38];
128  // Middle point, center
129  dN[42] = -2.0 * L0 * t;
130  dN[43] = -2.0 * L1 * t;
131  dN[44] = -2.0 * L2 * t;
132 }

◆ computeShapeFunction()

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

15 {
16  const double L1 = x[0];
17  const double L2 = x[1];
18  const double L0 = 1.0 - L1 - L2;
19  const double t = x[2];
20  const double tt1 = 1.0 - t * t;
21 
22  double v1 = 2.0 * L0 - 1;
23  double v2 = 2.0 * L1 - 1;
24  double v3 = 2.0 * L2 - 1;
25  // Vertex, bottom
26  N[0] = 0.5 * L0 * (v1 * (1.0 - t) - tt1);
27  N[1] = 0.5 * L1 * (v2 * (1.0 - t) - tt1);
28  N[2] = 0.5 * L2 * (v3 * (1.0 - t) - tt1);
29  // Vertex, top
30  N[3] = 0.5 * L0 * (v1 * (1.0 + t) - tt1);
31  N[4] = 0.5 * L1 * (v2 * (1.0 + t) - tt1);
32  N[5] = 0.5 * L2 * (v3 * (1.0 + t) - tt1);
33 
34  v1 = 2.0 * L0 * L1;
35  v2 = 2.0 * L1 * L2;
36  v3 = 2.0 * L2 * L0;
37  // Middle point, bottom
38  N[6] = v1 * (1.0 - t);
39  N[7] = v2 * (1.0 - t);
40  N[8] = v3 * (1.0 - t);
41  // Middle point, top
42  N[9] = v1 * (1.0 + t);
43  N[10] = v2 * (1.0 + t);
44  N[11] = v3 * (1.0 + t);
45  // Middle point, center
46  N[12] = L0 * tt1;
47  N[13] = L1 * tt1;
48  N[14] = L2 * tt1;
49 }

References NumLib::N.

Member Data Documentation

◆ DIM

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

Definition at line 43 of file ShapePrism15.h.

◆ NPOINTS

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

Definition at line 44 of file ShapePrism15.h.

◆ ORDER

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

Definition at line 45 of file ShapePrism15.h.


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