BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_EF_HEX8.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, through
4 * 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_HEX8_HPP
13#define BELFEM_CL_EF_HEX8_HPP
14
16#include "cl_FEM_Element.hpp"
17
18namespace belfem
19{
20 namespace fem
21 {
22 class Element;
23
24 class EF_HEX8 : public EdgeFunction
25 {
26 Matrix< real > mX ; // node coordinates
27 InterpolationFunction * mHex8 = nullptr;
28
31
32 Cell< Matrix< real > > mHex8Nxi ;
33
39 Cell< Matrix< real > > mHex8Nxi2 ;
40
41 Matrix< real > mEx ;
42 Matrix< real > mEy ;
43 Matrix< real > mEz ;
44
45 Matrix< real > mNx ;
46
47 // help vectors for volume estimation
50
51 // edge directions
52 real mS[ 12 ];
53
54 uint mLastIndex = BELFEM_UINT_MAX ;
55
56 real mApproxVolume = BELFEM_QUIET_NAN ;
57 bool mSmallVolume = false ;
58
59 const Vector< uint > mXLengthA = { 0, 3, 4, 7 };
60 const Vector< uint > mXLengthB = { 1, 2, 5, 6 };
61
62 const Vector< uint > mYLengthA = { 0, 1, 4, 5 };
63 const Vector< uint > mYLengthB = { 2, 3, 6, 7 };
64
65 const Vector< uint > mZLengthA = { 0, 1, 2, 3 };
66 const Vector< uint > mZLengthB = { 4, 5, 6, 7 };
67
68//------------------------------------------------------------------------------
69 public:
70//------------------------------------------------------------------------------
71
75 EF_HEX8();
76
80 ~EF_HEX8() override;
81
82//------------------------------------------------------------------------------
83
84 void
85 precompute( const Matrix< real > & aXi ) override ;
86
87//------------------------------------------------------------------------------
88
92 void
93 link( Element *aElement ) override;
94
95//------------------------------------------------------------------------------
96
97 const Matrix <real> &
98 E( const uint aIndex ) override ;
99
100//------------------------------------------------------------------------------
101
102 const Matrix <real> &
103 C( const uint aIndex ) override ;
104
105//------------------------------------------------------------------------------
106
112 const Matrix< real > &
113 G( const uint aIndex ) override ;
114
115//------------------------------------------------------------------------------
116
117 void
118 update_nabla( const uint aIndex ) override ;
119
120//------------------------------------------------------------------------------
121 private:
122
123 void
124 estimate_volume();
125
126 };
127 }
128}
129#endif //BELFEM_CL_EF_HEX8_HPP
Cell is a wrapper around the standard vector.
Definition cl_Cell.hpp:42
EF_HEX8()
constructor
Definition cl_EF_HEX8.cpp:24
void update_nabla(const uint aIndex) override
Definition cl_EF_HEX8.cpp:527
void link(Element *aElement) override
connect function with element
Definition cl_EF_HEX8.cpp:178
const Matrix< real > & E(const uint aIndex) override
Definition cl_EF_HEX8.cpp:297
const Matrix< real > & G(const uint aIndex) override
gradient operator for h-field ( point-dependent; carries the inverse-map Hessian term the curl cancel...
Definition cl_EF_HEX8.cpp:567
const Matrix< real > & C(const uint aIndex) override
Definition cl_EF_HEX8.cpp:357
void precompute(const Matrix< real > &aXi) override
only needed for higher order elements
Definition cl_EF_HEX8.cpp:67
EdgeFunction()=default
trivial constructor
Definition cl_FEM_Element.hpp:41
the shape function base class
Definition cl_IF_InterpolationFunction.hpp:24
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:80
#define BELFEM_QUIET_NAN
Definition typedefs.hpp:87