BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_Mesh_GlobalVariable.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_MESH_GLOBALVARIABLE_HPP
13#define BELFEM_CL_MESH_GLOBALVARIABLE_HPP
14
15#include "typedefs.hpp"
16
17namespace belfem
18{
19 namespace mesh
20 {
21//------------------------------------------------------------------------------
22
24 {
25 string mLabel;
26 const id_t mID;
27 real mValue;
28
29//------------------------------------------------------------------------------
30 public:
31//------------------------------------------------------------------------------
32
34 const string & aLabel,
35 const id_t & aID,
36 const real aValue = 0.0 );
37
38//------------------------------------------------------------------------------
39
40 ~GlobalVariable() = default;
41
42//------------------------------------------------------------------------------
43
44 inline const string &
45 label() const;
46
47//------------------------------------------------------------------------------
48
49 inline const id_t &
50 id() const;
51
52//------------------------------------------------------------------------------
53
54 inline real &
55 value();
56
57//------------------------------------------------------------------------------
58
59 inline const real &
60 value() const;
61
62//------------------------------------------------------------------------------
63
64 inline size_t
65 memory() const;
66
67//------------------------------------------------------------------------------
68 };
69
70//------------------------------------------------------------------------------
71
72 inline const string &
74 {
75 return mLabel;
76 }
77
78//------------------------------------------------------------------------------
79
80 inline const id_t &
82 {
83 return mID;
84 }
85
86//------------------------------------------------------------------------------
87
88 inline real &
90 {
91 return mValue;
92 }
93
94//------------------------------------------------------------------------------
95
96 inline const real &
98 {
99 return mValue;
100 }
101
102//------------------------------------------------------------------------------
103
104 inline size_t
106 {
107 return sizeof( GlobalVariable ) + mLabel.capacity() * sizeof( char );
108 }
109
110//------------------------------------------------------------------------------
111
112 }
113}
114#endif //BELFEM_CL_MESH_GLOBALVARIABLE_HPP
GlobalVariable(const string &aLabel, const id_t &aID, const real aValue=0.0)
Definition cl_Mesh_GlobalVariable.cpp:20
const string & label() const
Definition cl_Mesh_GlobalVariable.hpp:73
size_t memory() const
Definition cl_Mesh_GlobalVariable.hpp:105
real & value()
Definition cl_Mesh_GlobalVariable.hpp:89
const id_t & id() const
Definition cl_Mesh_GlobalVariable.hpp:81
Definition cl_EF_EdgeFunction.hpp:17
USER GUIDES:
Definition cl_Capacitor.cpp:16
unsigned int id_t
Definition typedefs.hpp:41
double real
Definition typedefs.hpp:36