BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_FEM_DofMgr_SideSetData.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_DOFMGR_SIDESETDATA_HPP
13#define BELFEM_CL_FEM_DOFMGR_SIDESETDATA_HPP
14
15#include "typedefs.hpp"
16#include "cl_Cell.hpp"
17#include "cl_Map.hpp"
18#include "cl_Vector.hpp"
19#include "commtools.hpp"
20#include "cl_IWG.hpp"
21#include "cl_FEM_SideSet.hpp"
22
23namespace belfem
24{
25 class Mesh;
26
27 namespace fem
28 {
29
30 class Kernel;
31
32 class DofManager;
33
34 namespace dofmgr
35 {
36 class DofData ;
37
39 {
41 DofManager * mParent;
42
44 Kernel * mKernel;
45
47 Mesh * mMesh;
48
49 // my rank
50 const proc_t mCommRank;
51
52 Cell< SideSet * > mSideSets;
53 Map< id_t, SideSet * > mSideSetMap;
54
55 // an empty sidset that is called if this set does not exist
56 // on current proc
57 SideSet * mEmptySideset = nullptr;
58
59 // counts how many nodes on all sidesets experience convection
60 index_t mNumberOfConvectionNodes ;
61
62 Cell< Vector< index_t > > mConvectionNodes ;
63
64//-----------------------------------------------------------------------------
65 public:
66//-----------------------------------------------------------------------------
67
68 SideSetData( DofManager * aParent ) ;
69
70//-----------------------------------------------------------------------------
71
73
74//-----------------------------------------------------------------------------
75
76 void
78
79//-----------------------------------------------------------------------------
80
84 SideSet *
85 sideset( const id_t aID ) ;
86
87//-----------------------------------------------------------------------------
88
93 sidesets() ;
94
95//-----------------------------------------------------------------------------
96
100 bool
101 sideset_exists( const id_t aID ) const;
102
103//-----------------------------------------------------------------------------
104
108 void
110
111//-----------------------------------------------------------------------------
112
113 void
115
116//-----------------------------------------------------------------------------
117
118 index_t
119 number_of_wetted_nodes() const ;
120
121//-----------------------------------------------------------------------------
122
127 void
129
130
131//------------------------------------------------------------------------------
132
137 void
139
140//-----------------------------------------------------------------------------
141
143 void
144 reset();
145
146//----------------------------------------------------------------------------
147 };
148
149//----------------------------------------------------------------------------
150
151 inline SideSet *
153 {
154 if ( mSideSetMap.key_exists( aID ) )
155 {
156 return mSideSetMap( aID );
157 }
158 else
159 {
160 mEmptySideset->set_mesh_id( aID );
161 return mEmptySideset ;
162 }
163 }
164
165//----------------------------------------------------------------------------
166
167 inline Cell< SideSet * > &
169 {
170 return mSideSets ;
171 }
172
173//------------------------------------------------------------------------------
174
175 inline bool
177 {
178 return mSideSetMap.key_exists( aID );
179 }
180
181//------------------------------------------------------------------------------
182
183 inline index_t
185 {
186 return mNumberOfConvectionNodes ;
187 }
188
189//------------------------------------------------------------------------------
190
191 } /* end namespace dofmgr */
192 } /* end namespace fem */
193} /* end namespace belfem */
194
195#endif //BELFEM_CL_FEM_DOFMGR_SIDESETDATA_HPP
Cell is a wrapper around the standard vector.
Definition cl_Cell.hpp:42
Hash map (unordered key-value).
Definition cl_Map.hpp:75
Top-level container for all mesh entities.
Definition cl_Mesh.hpp:60
this class creates the DOFs based on the passed equation object.
Definition cl_FEM_DofManager.hpp:55
Top-level orchestrator; owns the mesh, materials, boundary conditions and DOF managers.
Definition cl_FEM_Kernel.hpp:50
Definition cl_FEM_SideSet.hpp:60
Definition cl_FEM_DofMgr_DofData.hpp:36
Cell< SideSet * > & sidesets()
return the sideset container
Definition cl_FEM_DofMgr_SideSetData.hpp:168
SideSet * sideset(const id_t aID)
return a specific sideset
Definition cl_FEM_DofMgr_SideSetData.hpp:152
void set_boundary_conditions()
forwards set_boundary_conditions() to every sideset that exists on this proc ( currently not called b...
Definition cl_FEM_DofMgr_SideSetData.cpp:309
void reset()
restore factory settings
Definition cl_FEM_DofMgr_SideSetData.cpp:48
void count_wetted_nodes()
Definition cl_FEM_DofMgr_SideSetData.cpp:223
index_t number_of_wetted_nodes() const
Definition cl_FEM_DofMgr_SideSetData.hpp:184
SideSetData(DofManager *aParent)
Definition cl_FEM_DofMgr_SideSetData.cpp:29
void create_sidesets()
Definition cl_FEM_DofMgr_SideSetData.cpp:69
void collect_wetted_sidesets()
check if user has set the wetted sidesets
Definition cl_FEM_DofMgr_SideSetData.cpp:176
bool sideset_exists(const id_t aID) const
check if a specific sideset exists on this proc
Definition cl_FEM_DofMgr_SideSetData.hpp:176
void create_alpha_fields()
this function creates a special field for the alpha-bc if it exists.
Definition cl_FEM_DofMgr_SideSetData.cpp:254
Definition cl_FEM_DofMgr_BearingData.cpp:23
Definition cl_IFB_LINE3.hpp:21
USER GUIDES:
Definition cl_Capacitor.cpp:16
unsigned int id_t
Definition typedefs.hpp:41
int proc_t
Definition commtypes.hpp:29
uint32_t index_t
Definition typedefs.hpp:52