OGS
ShapeTet4-impl.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (c) OpenGeoSys Community (opengeosys.org)
2
// SPDX-License-Identifier: BSD-3-Clause
3
4
namespace
NumLib
5
{
6
template
<
class
T_X,
class
T_N>
7
void
ShapeTet4::computeShapeFunction
(
const
T_X& r, T_N&
N
)
8
{
9
N
[0] = 1. - r[0] - r[1] - r[2];
10
N
[1] = r[0];
11
N
[2] = r[1];
12
N
[3] = r[2];
13
}
14
15
template
<
class
T_X,
class
T_N>
16
void
ShapeTet4::computeGradShapeFunction
(
const
T_X&
/*r*/
, T_N& dN)
17
{
18
// dr
19
dN[0] = -1.0;
20
dN[1] = 1.0;
21
dN[2] = 0.0;
22
dN[3] = 0.0;
23
24
// ds
25
dN[4] = -1.0;
26
dN[5] = 0.0;
27
dN[6] = 1.0;
28
dN[7] = 0.0;
29
30
// dt
31
dN[8] = -1.0;
32
dN[9] = 0.0;
33
dN[10] = 0.0;
34
dN[11] = 1.0;
35
}
36
37
}
// namespace NumLib
NumLib::ShapeTet4::computeShapeFunction
static void computeShapeFunction(const T_X &r, T_N &N)
Definition
ShapeTet4-impl.h:7
NumLib::ShapeTet4::computeGradShapeFunction
static void computeGradShapeFunction(const T_X &r, T_N &dN)
Definition
ShapeTet4-impl.h:16
NumLib
Definition
ProjectData.h:35
NumLib::ShapeMatrixType::N
@ N
calculates N
Definition
ShapeMatrices.h:16
NumLib
Fem
ShapeFunction
ShapeTet4-impl.h
Generated by
1.14.0