BELFEM 0.9.3
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_EF_TET10.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_TET10_HPP
13#define BELFEM_CL_EF_TET10_HPP
14
16
17namespace belfem
18{
19 namespace mesh
20 {
21 class Element ;
22 }
23
24 namespace fem
25 {
26 class Element ;
27
28 class EF_TET10 : public EdgeFunction
29 {
31 Matrix< real > mNodeCoords ;
32
37
39 Matrix< real > mNxi ;
40 Matrix< real > mNeta ;
41 Matrix< real > mNzeta ;
42
43 // matrix for second derivatives
44 // N_xi2, N_eta2, N_zeta2, N_etazeta, N_xizeta, N_xieta
46
48 real mS[ 6 ];
49
51 uint mT[ 4 ];
52
55
59
64
65
67 real mNablaXi[ 3 ];
68 real mNablaEta[ 3 ];
69 real mNablaZeta[ 3 ];
70 real mNablaTau[ 3 ];
71
72 // edge shape functions
73 Matrix< real > mExi ;
74 Matrix< real > mEeta ;
75 Matrix< real > mEzeta ;
76
77 // face shape functions
78 Matrix< real > mFxi ;
79 Matrix< real > mFeta ;
80 Matrix< real > mFzeta ;
81
82 // containers with precomputed factors for edges
83 Matrix< real > mGxi ;
84 Matrix< real > mGeta ;
85 Matrix< real > mGzeta ;
86
87 // containers with precomputed factors for edges
88 Matrix< real > mHxi ;
89 Matrix< real > mHeta ;
90 Matrix< real > mHzeta ;
91
92 // containers with precomputed factors for faces
93 Matrix< real > mUxi ;
94 Matrix< real > mUeta ;
95 Matrix< real > mUzeta ;
96
97 Matrix< real > mVxi ;
98 Matrix< real > mVeta ;
99 Matrix< real > mVzeta ;
100
101 Matrix< real > mWxi ;
102 Matrix< real > mWeta ;
103 Matrix< real > mWzeta ;
104
105
106
107 // additional work vector
108 real mM [ 76 ];
109
110 // contracted second derivatives of the quadratic geometry map,
111 // S^(pq)_m ( IF-Voigt rows xx, yy, zz, yz, xz, xy — the mD
112 // member IS the d2N table, reused ), constant per element;
113 // filled on the CURVED branch of link(), NaN-filled on the
114 // straight branch ( the hess channel of G must never read it
115 // there — the affine map has S = 0 and the channel is skipped )
116 real mCurv[ 6 ][ 3 ];
117
118 uint mLastJ = BELFEM_UINT_MAX ;
119 uint mLastNabla = BELFEM_UINT_MAX ;
120
121 void
122 ( EF_TET10::*mFunInterpolation )( const uint aIndex );
123
124 void
125 ( EF_TET10::*mFunDerivatives )( const uint aIndex );
126
127 void
128 ( EF_TET10::*mFunGrad )( const uint aIndex );
129
130//------------------------------------------------------------------------------
131 public:
132//------------------------------------------------------------------------------
133
137 EF_TET10();
138
139//------------------------------------------------------------------------------
140
144 ~EF_TET10() override = default;
145
146//------------------------------------------------------------------------------
147
151 void
152 link( Element * aElement ) override ;
153
154//------------------------------------------------------------------------------
155
156 void
157 precompute( const Matrix< real > & aXi ) override ;
158
159//------------------------------------------------------------------------------
160
161 // compute the edge function
162 const Matrix< real > &
163 E( const uint aIndex ) override ;
164
165//------------------------------------------------------------------------------
166
167 // compute the curl function
168 const Matrix< real > &
169 C( const uint aIndex = 0 ) override ;
170
171//------------------------------------------------------------------------------
172
180 const Matrix< real > &
181 G( const uint aIndex = 0 ) override ;
182
183//------------------------------------------------------------------------------
184 private:
185//------------------------------------------------------------------------------
186
187 void
188 E_curved( const uint aIndex );
189
190//------------------------------------------------------------------------------
191
192 void
193 E_straight( const uint aIndex );
194
195//------------------------------------------------------------------------------
196
197 void
198 E_xi_curved( const uint aIndex );
199
200//------------------------------------------------------------------------------
201
202 void
203 E_xi_straight( const uint aIndex );
204
205//------------------------------------------------------------------------------
206
207 void
208 compute_nabla( const uint aIndex ) ;
209
210//------------------------------------------------------------------------------
211
212 void
213 compute_edge_functions( const uint aIndex );
214
215//------------------------------------------------------------------------------
216
217 void
218 compute_face_functions( const uint aIndex );
219
220//------------------------------------------------------------------------------
221
228 void
229 G_term1( const uint aIndex );
230
231//------------------------------------------------------------------------------
232
233 void
234 G_straight( const uint aIndex );
235
236//------------------------------------------------------------------------------
237
238 void
239 G_curved( const uint aIndex );
240
241//------------------------------------------------------------------------------
242
251 void
252 combine_functions( Matrix< real > & aE, const Matrix< real > & aF );
253
254//------------------------------------------------------------------------------
255
256 void
257 compute_edge_derivatives( const uint aIndex );
258
259//------------------------------------------------------------------------------
260
261 void
262 compute_face_derivatives( const uint aIndex );
263
264//------------------------------------------------------------------------------
265 } ;
266
267//------------------------------------------------------------------------------
268
269 // compute the edge function
270 inline const Matrix< real > &
271 EF_TET10::E( const uint aIndex )
272 {
273 // compute the matrix
274 ( this->*mFunInterpolation )( aIndex );
275
276 // return the result
277 return mE ;
278 }
279
280//------------------------------------------------------------------------------
281
282 } /* end namespace fem */
283} /* end namespace belfem */
284#endif //BELFEM_CL_EF_TET10_HPP
void link(Element *aElement) override
connect function with element
Definition cl_EF_TET10.cpp:65
const Matrix< real > & E(const uint aIndex) override
Definition cl_EF_TET10.hpp:271
const Matrix< real > & C(const uint aIndex=0) override
Definition cl_EF_TET10.cpp:1181
const Matrix< real > & G(const uint aIndex=0) override
gradient operator for h-field ( straight path: term1 from the pre-signed combined partials with froze...
Definition cl_EF_TET10.cpp:1428
~EF_TET10() override=default
trivial destructor
EF_TET10()
constructor
Definition cl_EF_TET10.cpp:25
void precompute(const Matrix< real > &aXi) override
only needed for higher order elements
Definition cl_EF_TET10.cpp:181
Matrix< real > mE
Definition cl_EF_EdgeFunction.hpp:57
EdgeFunction()=default
trivial constructor
Definition cl_FEM_Element.hpp:41
Lagrange Element baseclass.
Definition cl_Element.hpp:35
Definition cl_IFB_LINE3.hpp:21
Definition cl_EF_EdgeFunction.hpp:24
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