BELFEM 0.9.3
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_EF_TRI6.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_EF_TRI6_HPP
13#define BELFEM_CL_EF_TRI6_HPP
14
16#include "cl_FEM_Element.hpp"
17
18namespace belfem
19{
20 namespace fem
21 {
22 class Element;
23
24 class EF_TRI6 : public EdgeFunction
25 {
26 // node coordinates in matrix
27 Matrix< real > mNodeCoords ;
28
29 // node coordinates in vectors
32
33 real mS[ 3 ];
34
35 real mNablaXi[ 2 ];
36 real mNablaEta[ 2 ];
37
39 Matrix< real > mNxi ;
40 Matrix< real > mNeta ;
41
42 // help coefficients for shape function
44 Matrix< real > mGxi ;
45 Matrix< real > mGeta ;
46
48 Matrix< real > mHxi ;
49 Matrix< real > mHeta ;
50
51 real mExi[ 16 ] ;
52 real mEeta[ 16 ] ;
53
54 // additional work vector
55 real mW[ 16 ];
56
57 // contracted second derivatives of the quadratic geometry map,
58 // S^(pq)_m ( IF-Voigt rows xx, yy, xy ), constant per element;
59 // filled on the CURVED branch of link(), NaN-filled on the
60 // straight branch ( the hess channel of G must never read it
61 // there — the affine map has S = 0 and the channel is skipped )
62 real mCurv[ 3 ][ 2 ];
63
64 uint mLastJ = BELFEM_UINT_MAX ;
65 uint mLastNabla = BELFEM_UINT_MAX ;
66 void
67 ( EF_TRI6::*mFunInterpolation )( const uint aIndex );
68
69 void
70 ( EF_TRI6::*mFunCurl )( const uint aIndex );
71
72 void
73 ( EF_TRI6::*mFunGrad )( const uint aIndex );
74
75//------------------------------------------------------------------------------
76 public:
77//------------------------------------------------------------------------------
78
82 EF_TRI6();
83
84//------------------------------------------------------------------------------
85
89 ~EF_TRI6() override = default;
90
91//------------------------------------------------------------------------------
92
93 void
94 precompute( const Matrix< real > & aXi ) override;
95
96//------------------------------------------------------------------------------
97
101 void
102 link( Element * aElement ) override;
103
104//------------------------------------------------------------------------------
105
109 const Matrix< real > &
110 E( const uint aIndex ) override;
111
112//------------------------------------------------------------------------------
113
117 const Matrix< real > &
118 C( const uint aIndex = 0 ) override;
119
120//------------------------------------------------------------------------------
121
128 const Matrix< real > &
129 G( const uint aIndex = 0 ) override ;
130
131//------------------------------------------------------------------------------
132 private:
133//------------------------------------------------------------------------------
134
135 void
136 E_curved( const uint aIndex );
137
138//------------------------------------------------------------------------------
139
140 void
141 C_curved( const uint aIndex );
142
143//------------------------------------------------------------------------------
144
145 void
146 C_straight( const uint aIndex );
147
148//------------------------------------------------------------------------------
149
150 void
151 compute_J( const uint aIndex );
152
153//------------------------------------------------------------------------------
154
155 void
156 compute_nabla( const uint aIndex );
157
158//------------------------------------------------------------------------------
159
160 void
161 compute_E( const uint aIndex );
162
163//------------------------------------------------------------------------------
164
165 void
166 compute_E_xi( const uint aIndex );
167
168//------------------------------------------------------------------------------
169
170 void
171 compute_E_eta( const uint aIndex );
172
173//------------------------------------------------------------------------------
174
175 void
176 compute_C();
177
178//------------------------------------------------------------------------------
179
185 void
186 G_term1( const uint aIndex );
187
188//------------------------------------------------------------------------------
189
190 void
191 G_straight( const uint aIndex );
192
193//------------------------------------------------------------------------------
194
195 void
196 G_curved( const uint aIndex );
197
198//------------------------------------------------------------------------------
199 };
200
201
202//------------------------------------------------------------------------------
203
204 inline const Matrix< real > &
205 EF_TRI6::E( const uint aIndex )
206 {
207 ( this->*mFunInterpolation )( aIndex );
208 return mE ;
209 }
210
211//------------------------------------------------------------------------------
212
213 inline const Matrix< real > &
214 EF_TRI6::C( const uint aIndex )
215 {
216 ( this->*mFunCurl )( aIndex );
217 return mC ;
218 }
219
220//------------------------------------------------------------------------------
221 } /* end namespace fem */
222} /* end namespace belfem */
223
224#endif //BELFEM_CL_EF_TRI6_HPP
~EF_TRI6() override=default
trivial destructor
const Matrix< real > & C(const uint aIndex=0) override
curl operator for h-field
Definition cl_EF_TRI6.hpp:214
const Matrix< real > & G(const uint aIndex=0) override
gradient operator for h-field ( straight path: signed term1 with frozen nablas; curved path: + the Q-...
Definition cl_EF_TRI6.cpp:555
const Matrix< real > & E(const uint aIndex) override
interpolation operator for h-field
Definition cl_EF_TRI6.hpp:205
void link(Element *aElement) override
connect function with element
Definition cl_EF_TRI6.cpp:157
EF_TRI6()
constructor
Definition cl_EF_TRI6.cpp:25
void precompute(const Matrix< real > &aXi) override
only needed for higher order elements
Definition cl_EF_TRI6.cpp:46
Matrix< real > mE
Definition cl_EF_EdgeFunction.hpp:57
EdgeFunction()=default
trivial constructor
Matrix< real > mC
matrix containing the curl for the H-Function
Definition cl_EF_EdgeFunction.hpp:60
Definition cl_FEM_Element.hpp:41
Definition cl_IFB_LINE3.hpp:21
USER GUIDES:
Definition cl_Capacitor.cpp:16
unsigned int uint
Definition typedefs.hpp:30
double real
Definition typedefs.hpp:36
#define BELFEM_UINT_MAX
Definition typedefs.hpp:79