BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
cl_Pipette.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_PIPETTE_HPP
13
#define BELFEM_CL_PIPETTE_HPP
14
15
#include "
typedefs.hpp
"
16
#include "
cl_Vector.hpp
"
17
#include "
cl_Matrix.hpp
"
18
#include "
cl_Element.hpp
"
19
#include "
cl_Facet.hpp
"
20
#include "
cl_IF_IntegrationData.hpp
"
21
22
namespace
belfem
23
{
24
namespace
mesh
25
{
26
//------------------------------------------------------------------------------
27
31
class
Pipette
32
{
33
34
ElementType
mType =
ElementType::UNDEFINED
;
35
uint
mNumDim = 0 ;
36
uint
mNumNodes = 0 ;
37
uint
mNumCornerNodes = 0 ;
38
39
uint
mNumIntPoints = 0 ;
40
uint
mNumIntPointsLinear = 0 ;
41
42
43
// help fector
44
real
* mW = nullptr ;
45
46
// raw vector for coordinates
47
real
* mX = nullptr ;
48
real
* mY = nullptr ;
49
real
* mZ = nullptr ;
50
51
Matrix< real >
mNodeCoords ;
52
Matrix< real >
mNodeCoordsLinear ;
53
54
// for thin shells
55
Vector< real >
mN ;
// normal
56
Matrix< real >
mJ ;
// jacobian
57
58
// the default integration function
59
fem::IntegrationData
* mIntegrationData = nullptr ;
60
61
// special integration function for non-curved elements
62
// used for all elements except tri and tet
63
fem::IntegrationData
* mIntegrationDataLinear = nullptr ;
64
65
real
66
(
Pipette
::*mVolumeFunction )(
const
Element
* aElement );
67
68
// function that we can use if the element is not curved
69
real
70
(
Pipette
::*mVolumeFunctionLinear )(
const
Element
* aElement );
71
72
real
73
(
Pipette
::*mSurfaceFunction )(
const
Facet
* aFacet );
74
75
//------------------------------------------------------------------------------
76
public
:
77
//------------------------------------------------------------------------------
78
79
Pipette
();
80
81
//------------------------------------------------------------------------------
82
83
~Pipette
();
84
85
//------------------------------------------------------------------------------
86
87
void
88
set_element_type
(
const
ElementType
aType );
89
90
//------------------------------------------------------------------------------
91
92
void
93
set_facet_type
(
const
ElementType
aType );
94
95
//------------------------------------------------------------------------------
96
97
real
98
measure
(
const
Element
* aElement );
99
100
//------------------------------------------------------------------------------
101
102
real
103
measure
(
const
Facet
* aFacet );
104
105
//------------------------------------------------------------------------------
106
private
:
107
//------------------------------------------------------------------------------
108
109
void
110
reset_containers();
111
112
//------------------------------------------------------------------------------
113
114
void
115
collect_node_coords(
const
Element
* aElement );
116
117
//------------------------------------------------------------------------------
118
119
real
120
measure_tri3(
const
Element
* aElement );
121
122
//------------------------------------------------------------------------------
123
124
real
125
measure_quad4(
const
Element
* aElement );
126
127
//------------------------------------------------------------------------------
128
129
real
130
measure_tet4(
const
Element
* aElement );
131
132
//------------------------------------------------------------------------------
133
134
real
135
measure_linear(
const
Element
* aElement );
136
137
//------------------------------------------------------------------------------
138
139
real
140
measure_quad4ts(
const
Element
* aElement );
141
142
//------------------------------------------------------------------------------
143
144
real
145
measure_higher_order(
const
Element
* aElement );
146
147
//------------------------------------------------------------------------------
148
149
real
150
measure_surface_tri3(
const
Facet
* aFacet );
151
152
real
153
measure_surface_line2(
const
Facet
* aFacet );
154
155
real
156
measure_surface_higher_order(
const
Facet
* aFacet );
157
158
//------------------------------------------------------------------------------
159
};
160
//------------------------------------------------------------------------------
161
162
inline
real
163
Pipette::measure
(
const
Element
* aElement )
164
{
165
return
( this->*mVolumeFunction )( aElement );
166
}
167
168
//------------------------------------------------------------------------------
169
170
inline
real
171
Pipette::measure
(
const
Facet
* aFacet )
172
{
173
return
( this->*mSurfaceFunction )( aFacet );
174
}
175
176
//------------------------------------------------------------------------------
177
}
178
}
179
180
#endif
//BELFEM_CL_PIPETTE_HPP
cl_Element.hpp
cl_Facet.hpp
cl_IF_IntegrationData.hpp
cl_Matrix.hpp
cl_Vector.hpp
belfem::Matrix< real >
belfem::Vector< real >
belfem::fem::IntegrationData
Precomputed bundle of integration points, weights and shape-function values.
Definition
cl_IF_IntegrationData.hpp:28
belfem::mesh::Element
Lagrange Element baseclass.
Definition
cl_Element.hpp:35
belfem::mesh::Facet
Definition
cl_Facet.hpp:24
belfem::mesh::Pipette::measure
real measure(const Element *aElement)
Definition
cl_Pipette.hpp:163
belfem::mesh::Pipette::set_facet_type
void set_facet_type(const ElementType aType)
Definition
cl_Pipette.cpp:385
belfem::mesh::Pipette::set_element_type
void set_element_type(const ElementType aType)
Definition
cl_Pipette.cpp:87
belfem::mesh::Pipette::Pipette
Pipette()
Definition
cl_Pipette.cpp:28
belfem::mesh
Definition
cl_EF_EdgeFunction.hpp:17
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::uint
unsigned int uint
Definition
typedefs.hpp:30
belfem::ElementType
ElementType
Element types.
Definition
Mesh_Enums.hpp:27
belfem::ElementType::UNDEFINED
@ UNDEFINED
Definition
Mesh_Enums.hpp:64
belfem::real
double real
Definition
typedefs.hpp:36
typedefs.hpp
src
fem
kernel
cl_Pipette.hpp
Generated by
1.18.0