BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
cl_IFG_TRI3A.hpp
Go to the documentation of this file.
1
/*
2
* BELFEM -- The Berkeley Lab Finite Element Framework
3
* Copyright (c) 2026, The Regents of the University of California,
4
* through Lawrence Berkeley National Laboratory (subject to receipt of any required
5
* approvals from the U.S. Dept. of Energy). All rights reserved.
6
*
7
* Developers: Christian Messe, Gregory Giard
8
*
9
* See the top-level LICENSE file for the complete license and disclaimer.
10
*/
11
12
#ifndef BELFEM_CL_IFG_TRI3A_HPP
13
#define BELFEM_CL_IFG_TRI3A_HPP
14
15
#include "
cl_IF_InterpolationFunctionTemplate.hpp
"
16
17
namespace
belfem
18
{
19
namespace
fem
20
{
21
//------------------------------------------------------------------------------
26
//------------------------------------------------------------------------------
27
28
template
<>
29
InterpolationOrder
30
InterpolationFunctionTemplate
<
31
GeometryType::TRI
,
InterpolationType::BubbleEdge0
, 2, 1 >
32
::interpolation_order
()
const
33
{
34
return
InterpolationOrder::QUADRATIC
;
35
}
36
37
//------------------------------------------------------------------------------
38
39
template
<>
40
ElementType
41
InterpolationFunctionTemplate
<
42
GeometryType::TRI
,
InterpolationType::BubbleEdge0
, 2, 1 >
43
::element_type
()
const
44
{
45
return
ElementType::TRI3
;
46
}
47
48
//------------------------------------------------------------------------------
49
50
51
template
<>
52
void
53
InterpolationFunctionTemplate
<
54
GeometryType::TRI
,
InterpolationType::BubbleEdge0
, 2, 1 >
55
::param_coords
( Matrix <real> & aXiHat )
const
56
{
57
aXiHat.
set_size
( 2, 1 );
58
59
aXiHat( 0, 0 ) = 0.5;
60
aXiHat( 1, 0 ) = 0.5;
61
}
62
63
//------------------------------------------------------------------------------
64
65
template
<>
66
void
67
InterpolationFunctionTemplate
<
68
GeometryType::TRI
,
InterpolationType::BubbleEdge0
, 2, 1 >
::N
(
69
const
Vector <real> & aXi,
70
Matrix <real> & aN )
const
71
{
72
const
real
xi = aXi( 0 );
73
const
real
eta = aXi( 1 );
74
aN.
set_size
( 1, 1 );
75
aN( 0, 0 ) = 4.0 * xi * eta ;
76
}
77
78
79
//------------------------------------------------------------------------------
80
81
template
<>
82
void
83
InterpolationFunctionTemplate
<
84
GeometryType::TRI
,
InterpolationType::BubbleEdge0
, 2, 1 >
::dNdXi
(
85
const
Vector <real> & aXi,
86
Matrix <real> & adNdXi )
const
87
{
88
const
real
xi = aXi( 0 );
89
const
real
eta = aXi( 1 );
90
adNdXi.
set_size
( 2, 1 );
91
adNdXi( 0, 0 ) = 4.0 * eta ;
// dN/dxi
92
adNdXi( 1, 0 ) = 4.0 * xi ;
// dN/deta
93
}
94
95
//------------------------------------------------------------------------------
96
97
98
template
<>
99
void
100
InterpolationFunctionTemplate
<
101
GeometryType::TRI
,
InterpolationType::BubbleEdge0
, 2, 1 >
::d2NdXi2
(
102
const
Vector <real> & aXi,
103
Matrix <real> & ad2NdXi2 )
const
104
{
105
ad2NdXi2.
set_size
( 3, 1 );
106
ad2NdXi2( 0, 0 ) = 0.0 ;
// d²N/dxi²
107
ad2NdXi2( 1, 0 ) = 0.0 ;
// d²N/deta²
108
ad2NdXi2( 2, 0 ) = 4.0 ;
// d²N/(dxi*deta)
109
}
110
111
//------------------------------------------------------------------------------
112
}
113
}
114
#endif
//BELFEM_CL_IFG_TRI3A_HPP
cl_IF_InterpolationFunctionTemplate.hpp
belfem::Matrix::set_size
void set_size(const size_t aNumRows, const size_t aNumCols)
Definition
cl_AR_Matrix.hpp:186
belfem::fem::InterpolationFunctionTemplate
shape function templated class G : Geometry T : Type D : Dimension B : Number of Basis
Definition
cl_IF_InterpolationFunctionTemplate.hpp:25
belfem::fem::InterpolationFunctionTemplate::param_coords
void param_coords(Matrix< real > &aXiHat) const override
returns a matrix containing the parameter coordinates of the nodes < number of dimensions x number of...
Definition
cl_IF_InterpolationFunctionTemplate.hpp:49
belfem::fem::InterpolationFunctionTemplate::interpolation_order
InterpolationOrder interpolation_order() const override
returns the interpolation order
Definition
cl_IF_InterpolationFunctionTemplate.hpp:145
belfem::fem::InterpolationFunctionTemplate::d2NdXi2
void d2NdXi2(const Vector< real > &aXi, Matrix< real > &ad2NdXi2) const override
calculates the second derivative of the shape function in parameter space
Definition
cl_IF_InterpolationFunctionTemplate.hpp:110
belfem::fem::InterpolationFunctionTemplate::dNdXi
void dNdXi(const Vector< real > &aXi, Matrix< real > &adNdXi) const override
calculates the first derivative of the shape function in parameter space
Definition
cl_IF_InterpolationFunctionTemplate.hpp:89
belfem::fem::InterpolationFunctionTemplate::N
void N(const Vector< real > &aXi, Matrix< real > &aN) const override
evaluates the shape function at a given point
Definition
cl_IF_InterpolationFunctionTemplate.hpp:68
belfem::fem
Definition
cl_IFB_LINE3.hpp:21
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::InterpolationType::BubbleEdge0
@ BubbleEdge0
Definition
Mesh_Enums.hpp:103
belfem::element_type
ElementType element_type(const std::string &aStr)
Definition
Mesh_Enums.hpp:370
belfem::ElementType
ElementType
Element types.
Definition
Mesh_Enums.hpp:27
belfem::ElementType::TRI3
@ TRI3
Definition
Mesh_Enums.hpp:30
belfem::InterpolationOrder
InterpolationOrder
Definition
Mesh_Enums.hpp:85
belfem::InterpolationOrder::QUADRATIC
@ QUADRATIC
Definition
Mesh_Enums.hpp:88
belfem::real
double real
Definition
typedefs.hpp:36
belfem::GeometryType::TRI
@ TRI
Definition
Mesh_Enums.hpp:73
src
fem
interpolation
bubble
cl_IFG_TRI3A.hpp
Generated by
1.18.0