BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_FEM_DofMgr_BearingData.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_BEARINGDATA_HPP
13#define BELFEM_CL_FEM_DOFMGR_BEARINGDATA_HPP
14
15#include "typedefs.hpp"
16#include "cl_Cell.hpp"
17#include "cl_Map.hpp"
18#include "cl_Vector.hpp"
19#include "cl_IWG.hpp"
20
21namespace belfem
22{
23 class Mesh;
24
25 namespace fem
26 {
27 class Bearing;
28
29 class Kernel;
30
31 class DofManager;
32
33 namespace dofmgr
34 {
36 {
38 DofManager * mParent;
39
41 Kernel * mKernel;
42
44 Mesh * mMesh;
45
46 // my rank
47 const proc_t mCommRank;
48
49 Cell< Bearing * > mBearings;
50
51 Bearing * mEmptyBearing = nullptr;
52
53 Map< id_t, Bearing * > mBearingMap;
54
55//------------------------------------------------------------------------------
56 public:
57//------------------------------------------------------------------------------
58
59 BearingData( DofManager * aParent );
60
61//------------------------------------------------------------------------------
62
64
65//------------------------------------------------------------------------------
66
68 void
70
71//------------------------------------------------------------------------------
72
76 Bearing *
77 bearing( const id_t aID );
78
79//------------------------------------------------------------------------------
80
81 void
82 reset();
83
84//------------------------------------------------------------------------------
85 };
86
87//------------------------------------------------------------------------------
88
89 inline Bearing *
91 {
92 if ( mBearingMap.key_exists( aID ) )
93 {
94 return mBearingMap( aID );
95 }
96 else
97 {
98 return mEmptyBearing ;
99 }
100 }
101
102//-----------------------------------------------------------------------------
103 } /* end namespace dofmgr */
104 } /* end namespace fem */
105} /* end namespace belfem */
106
107#endif //BELFEM_CL_FEM_DOFMGR_BEARINGDATA_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
Definition cl_FEM_Bearing.hpp:31
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
Bearing * bearing(const id_t aID)
return one specific bearing
Definition cl_FEM_DofMgr_BearingData.hpp:90
BearingData(DofManager *aParent)
Definition cl_FEM_DofMgr_BearingData.cpp:26
void reset()
Definition cl_FEM_DofMgr_BearingData.cpp:45
void create_bearings()
called by dof manager
Definition cl_FEM_DofMgr_BearingData.cpp:68
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