BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
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
17
namespace
belfem
18
{
19
namespace
mesh
20
{
21
//------------------------------------------------------------------------------
22
23
class
GlobalVariable
24
{
25
string
mLabel;
26
const
id_t
mID;
27
real
mValue;
28
29
//------------------------------------------------------------------------------
30
public
:
31
//------------------------------------------------------------------------------
32
33
GlobalVariable
(
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
&
73
GlobalVariable::label
()
const
74
{
75
return
mLabel;
76
}
77
78
//------------------------------------------------------------------------------
79
80
inline
const
id_t
&
81
GlobalVariable::id
()
const
82
{
83
return
mID;
84
}
85
86
//------------------------------------------------------------------------------
87
88
inline
real
&
89
GlobalVariable::value
()
90
{
91
return
mValue;
92
}
93
94
//------------------------------------------------------------------------------
95
96
inline
const
real
&
97
GlobalVariable::value
()
const
98
{
99
return
mValue;
100
}
101
102
//------------------------------------------------------------------------------
103
104
inline
size_t
105
GlobalVariable::memory
()
const
106
{
107
return
sizeof
(
GlobalVariable
) + mLabel.capacity() *
sizeof
( char );
108
}
109
110
//------------------------------------------------------------------------------
111
112
}
113
}
114
#endif
//BELFEM_CL_MESH_GLOBALVARIABLE_HPP
belfem::mesh::GlobalVariable::GlobalVariable
GlobalVariable(const string &aLabel, const id_t &aID, const real aValue=0.0)
Definition
cl_Mesh_GlobalVariable.cpp:20
belfem::mesh::GlobalVariable::label
const string & label() const
Definition
cl_Mesh_GlobalVariable.hpp:73
belfem::mesh::GlobalVariable::~GlobalVariable
~GlobalVariable()=default
belfem::mesh::GlobalVariable::memory
size_t memory() const
Definition
cl_Mesh_GlobalVariable.hpp:105
belfem::mesh::GlobalVariable::value
real & value()
Definition
cl_Mesh_GlobalVariable.hpp:89
belfem::mesh::GlobalVariable::id
const id_t & id() const
Definition
cl_Mesh_GlobalVariable.hpp:81
belfem::mesh
Definition
cl_EF_EdgeFunction.hpp:17
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::id_t
unsigned int id_t
Definition
typedefs.hpp:41
belfem::real
double real
Definition
typedefs.hpp:36
typedefs.hpp
src
mesh
cl_Mesh_GlobalVariable.hpp
Generated by
1.18.0