BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_FEM_PhysicalBoundaryCondition.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_FEM_BOUNDARYCONDITION_HPP
13#define BELFEM_CL_FEM_BOUNDARYCONDITION_HPP
14
15#include "cl_InputFile.hpp"
16#include "cl_SourceFunction.hpp"
18
19namespace belfem
20{
21 namespace fem
22 {
23//-----------------------------------------------------------------------------
24
25 // pointer-only members below: the .cpp includes
26 // cl_FEM_DofManager.hpp ( which itself pulls cl_FEM_Dof.hpp ).
27 // Keeping the fat DofManager header out of this one keeps the
28 // circuit library ( which includes this file ) off the
29 // DofManager → Mesh/IWG/Material include graph — the fact that
30 // lets circuit's CMake drop those include dirs
31 class DofManager ;
32 class Dof ;
33
34//-----------------------------------------------------------------------------
35
37 {
38//-----------------------------------------------------------------------------
39 protected :
40//-----------------------------------------------------------------------------
41
43
45
50 string mLabel = "" ;
51
53
55
56 //Scaling
57 real mScale = 1.0 ;
58
59 Vector < real > mDirection = Vector < real >(3,0.0) ;
60
62
69
70 Vector < id_t > mDomains;
71
73
74 DofManager * mDofMngr = nullptr;
75
76 Dof * mAbstractDof = nullptr;
77
78//-----------------------------------------------------------------------------
79
80 public :
81//-----------------------------------------------------------------------------
82
83 PhysicalBoundaryCondition( const index_t aIndex ) ;
84
86
87//-----------------------------------------------------------------------------
88
90 index() const ;
91
92//-----------------------------------------------------------------------------
93
94 void
95 set_function( SourceFunction * aBCFunction ) ;
96
97//-----------------------------------------------------------------------------
98
99 void
100 set_direction( real x, real y, real z ) ;
101
102//-----------------------------------------------------------------------------
103
104 void
106
107//-----------------------------------------------------------------------------
108
109 void
110 set_units( unit aUnits ) ;
111
112//-----------------------------------------------------------------------------
113
114 void
115 set_amplitude_is_flux_density( const bool aFlag ) ;
116
117//-----------------------------------------------------------------------------
118
119 bool
121
122//-----------------------------------------------------------------------------
123
124 void
125 set_domains( Vector < id_t > aDomains, const bool aIsThinShell = false ) ;
126
127//-----------------------------------------------------------------------------
128
129 void
130 set_field( DofManager * aField ) ;
131
132//-----------------------------------------------------------------------------
133
134 void
135 set_scale( real aScale ) ;
136
137//-----------------------------------------------------------------------------
138
139 real &
140 scale() ;
141
142//-----------------------------------------------------------------------------
143
145 function() ;
146
147//-----------------------------------------------------------------------------
148
150 domains() ;
151
152//-----------------------------------------------------------------------------
153
155 type() ;
156
157//-----------------------------------------------------------------------------
158
159 bool
160 is_thinshell() ;
161
162//-----------------------------------------------------------------------------
163
164 real
165 value() ;
166
167//-----------------------------------------------------------------------------
168
169 void
170 fix( real aValue ) ;
171
172//-----------------------------------------------------------------------------
173
174 Vector < real > &
175 direction() ;
176
177//-----------------------------------------------------------------------------
178
179 unit
180 units() ;
181
182//-----------------------------------------------------------------------------
183
184 void
185 impose_bc( real aTime ) ;
186
187//-----------------------------------------------------------------------------
188
191 void
192 set_label( const string & aLabel ) ;
193
194//-----------------------------------------------------------------------------
195
196 const string &
197 label() const ;
198
199//-----------------------------------------------------------------------------
200
211 void
212 update_global() ;
213
214//-----------------------------------------------------------------------------
215 };
216 }
217}
218
219#endif //BELFEM_CL_FEM_BOUNDARYCONDITION_HPP
Definition cl_SourceFunction.hpp:80
Definition cl_FEM_Dof.hpp:28
this class creates the DOFs based on the passed equation object.
Definition cl_FEM_DofManager.hpp:55
void set_amplitude_is_flux_density(const bool aFlag)
Definition cl_FEM_PhysicalBoundaryCondition.cpp:77
const index_t mIndex
Definition cl_FEM_PhysicalBoundaryCondition.hpp:42
string mLabel
Definition cl_FEM_PhysicalBoundaryCondition.hpp:50
SourceFunction * mFunction
Definition cl_FEM_PhysicalBoundaryCondition.hpp:52
void set_scale(real aScale)
Definition cl_FEM_PhysicalBoundaryCondition.cpp:180
Vector< real > mDirection
Definition cl_FEM_PhysicalBoundaryCondition.hpp:59
PhysicalBoundaryCondition(const index_t aIndex)
Definition cl_FEM_PhysicalBoundaryCondition.cpp:20
real mScale
Definition cl_FEM_PhysicalBoundaryCondition.hpp:57
void impose_bc(real aTime)
Definition cl_FEM_PhysicalBoundaryCondition.cpp:225
const string & label() const
Definition cl_FEM_PhysicalBoundaryCondition.cpp:204
unit units()
Definition cl_FEM_PhysicalBoundaryCondition.cpp:163
void set_label(const string &aLabel)
Definition cl_FEM_PhysicalBoundaryCondition.cpp:196
Vector< id_t > & domains()
Definition cl_FEM_PhysicalBoundaryCondition.cpp:110
bool mAmplitudeIsFluxDensity
Definition cl_FEM_PhysicalBoundaryCondition.hpp:68
void set_direction(real x, real y, real z)
Definition cl_FEM_PhysicalBoundaryCondition.cpp:51
DofManager * mDofMngr
Definition cl_FEM_PhysicalBoundaryCondition.hpp:74
BoundaryConditionType type()
Definition cl_FEM_PhysicalBoundaryCondition.cpp:118
void set_units(unit aUnits)
Definition cl_FEM_PhysicalBoundaryCondition.cpp:69
index_t index() const
Definition cl_FEM_PhysicalBoundaryCondition.cpp:35
Vector< real > & direction()
Definition cl_FEM_PhysicalBoundaryCondition.cpp:155
real & scale()
Definition cl_FEM_PhysicalBoundaryCondition.cpp:188
void set_type(BoundaryConditionType aType)
Definition cl_FEM_PhysicalBoundaryCondition.cpp:61
void set_field(DofManager *aField)
Definition cl_FEM_PhysicalBoundaryCondition.cpp:172
bool mIsThinShell
Definition cl_FEM_PhysicalBoundaryCondition.hpp:72
bool amplitude_is_flux_density() const
Definition cl_FEM_PhysicalBoundaryCondition.cpp:85
SourceFunction * function()
Definition cl_FEM_PhysicalBoundaryCondition.cpp:102
bool is_thinshell()
Definition cl_FEM_PhysicalBoundaryCondition.cpp:126
Dof * mAbstractDof
Definition cl_FEM_PhysicalBoundaryCondition.hpp:76
void update_global()
Definition cl_FEM_PhysicalBoundaryCondition.cpp:212
BoundaryConditionType mType
Definition cl_FEM_PhysicalBoundaryCondition.hpp:44
void set_function(SourceFunction *aBCFunction)
Definition cl_FEM_PhysicalBoundaryCondition.cpp:43
real mValue
Definition cl_FEM_PhysicalBoundaryCondition.hpp:54
void set_domains(Vector< id_t > aDomains, const bool aIsThinShell=false)
Definition cl_FEM_PhysicalBoundaryCondition.cpp:93
void fix(real aValue)
Definition cl_FEM_PhysicalBoundaryCondition.cpp:142
real value()
Definition cl_FEM_PhysicalBoundaryCondition.cpp:134
unit mUnits
Definition cl_FEM_PhysicalBoundaryCondition.hpp:61
Vector< id_t > mDomains
Definition cl_FEM_PhysicalBoundaryCondition.hpp:70
Definition cl_IFB_LINE3.hpp:21
BoundaryConditionType
Definition en_FEM_BoundaryConditionType.hpp:24
USER GUIDES:
Definition cl_Capacitor.cpp:16
std::array< real, 7 > unit
Definition typedefs.hpp:72
constexpr real BELFEM_EPS
Definition typedefs.hpp:91
uint32_t index_t
Definition typedefs.hpp:52
double real
Definition typedefs.hpp:36