BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
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
15
#include "
nedelec/cl_EF_EdgeFunction.hpp
"
16
#include "
cl_FEM_Element.hpp
"
17
18
namespace
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
29
Cell< Vector< real >
> mF ;
30
Cell< Matrix< real >
> mFxi ;
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
48
Vector< real >
mU ;
49
Vector< real >
mV ;
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
cl_EF_EdgeFunction.hpp
cl_FEM_Element.hpp
belfem::Cell
Cell is a wrapper around the standard vector.
Definition
cl_Cell.hpp:42
belfem::Matrix< real >
belfem::Vector< real >
belfem::fem::EF_HEX8::EF_HEX8
EF_HEX8()
constructor
Definition
cl_EF_HEX8.cpp:24
belfem::fem::EF_HEX8::update_nabla
void update_nabla(const uint aIndex) override
Definition
cl_EF_HEX8.cpp:527
belfem::fem::EF_HEX8::link
void link(Element *aElement) override
connect function with element
Definition
cl_EF_HEX8.cpp:178
belfem::fem::EF_HEX8::E
const Matrix< real > & E(const uint aIndex) override
Definition
cl_EF_HEX8.cpp:297
belfem::fem::EF_HEX8::G
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
belfem::fem::EF_HEX8::C
const Matrix< real > & C(const uint aIndex) override
Definition
cl_EF_HEX8.cpp:357
belfem::fem::EF_HEX8::precompute
void precompute(const Matrix< real > &aXi) override
only needed for higher order elements
Definition
cl_EF_HEX8.cpp:67
belfem::fem::EdgeFunction::EdgeFunction
EdgeFunction()=default
trivial constructor
belfem::fem::Element
Definition
cl_FEM_Element.hpp:41
belfem::fem::InterpolationFunction
the shape function base class
Definition
cl_IF_InterpolationFunction.hpp:24
belfem::fem
Definition
cl_IFB_LINE3.hpp:21
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::uint
unsigned int uint
Definition
typedefs.hpp:30
belfem::real
double real
Definition
typedefs.hpp:36
BELFEM_UINT_MAX
#define BELFEM_UINT_MAX
Definition
typedefs.hpp:80
BELFEM_QUIET_NAN
#define BELFEM_QUIET_NAN
Definition
typedefs.hpp:87
src
fem
interpolation
nedelec
cl_EF_HEX8.hpp
Generated by
1.18.0