OGS
ShapeLine3-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
ShapeLine3::computeShapeFunction
(
const
T_X& r, T_N&
N
)
8
{
9
N
[0] = 0.5 * r[0] * (r[0] - 1.0);
10
N
[1] = 0.5 * r[0] * (r[0] + 1.0);
11
N
[2] = 1.0 - r[0] * r[0];
12
}
13
14
template
<
class
T_X,
class
T_N>
15
void
ShapeLine3::computeGradShapeFunction
(
const
T_X& r, T_N& dN)
16
{
17
dN[0] = r[0] - 0.5;
18
dN[1] = r[0] + 0.5;
19
dN[2] = -2.0 * r[0];
20
}
21
22
}
// namespace NumLib
NumLib::ShapeLine3::computeShapeFunction
static void computeShapeFunction(const T_X &r, T_N &N)
Definition
ShapeLine3-impl.h:7
NumLib::ShapeLine3::computeGradShapeFunction
static void computeGradShapeFunction(const T_X &r, T_N &dN)
Definition
ShapeLine3-impl.h:15
NumLib
Definition
ProjectData.h:35
NumLib::ShapeMatrixType::N
@ N
calculates N
Definition
ShapeMatrices.h:16
NumLib
Fem
ShapeFunction
ShapeLine3-impl.h
Generated by
1.14.0