BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
cl_CurrentSource.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_CURRENTSOURCE_HPP
13
#define BELFEM_CL_CURRENTSOURCE_HPP
14
15
#include "
cl_TwoTerminals.hpp
"
16
#include "
cl_SourceFunction.hpp
"
17
18
namespace
belfem
19
{
20
namespace
electronics
21
{
22
//-----------------------------------------------------------------------------
23
24
class
CurrentSource
:
public
TwoTerminals
25
{
26
28
SourceFunction
* mFunction ;
29
30
//------------------------------------------------------------------------------
31
public
:
32
//------------------------------------------------------------------------------
33
34
CurrentSource
(
SourceFunction
* aFunction, Cell < ElectricNode* > & aTerminals,
string
aLabel =
""
) ;
35
36
//------------------------------------------------------------------------------
37
38
~CurrentSource
()
override
;
39
40
//------------------------------------------------------------------------------
41
42
ComponentType
43
component_type
()
const override
;
44
45
//-----------------------------------------------------------------------------
46
47
real
48
get_value
()
const override
;
49
50
//-----------------------------------------------------------------------------
51
52
void
53
shift
(
const
real
aTime,
const
real
aDeltaTime )
override
;
54
55
//------------------------------------------------------------------------------
56
57
void
58
save_state
(
hid_t
aGroup,
const
string
& aPrefix )
override
;
59
60
//------------------------------------------------------------------------------
61
62
void
63
load_state
(
hid_t
aGroup,
const
string
& aPrefix )
override
;
64
65
//------------------------------------------------------------------------------
66
67
68
};
69
70
inline
ComponentType
71
CurrentSource::component_type
()
const
72
{
73
return
ComponentType::CURRENTSOURCE
;
74
}
75
76
//-----------------------------------------------------------------------------
77
}
78
}
79
80
#endif
//BELFEM_CL_CURRENTSOURCE_HPP
cl_SourceFunction.hpp
cl_TwoTerminals.hpp
belfem::SourceFunction
Definition
cl_SourceFunction.hpp:80
belfem::electronics::CurrentSource::component_type
ComponentType component_type() const override
Definition
cl_CurrentSource.hpp:71
belfem::electronics::CurrentSource::save_state
void save_state(hid_t aGroup, const string &aPrefix) override
write this component's time-stepping state into the restart group, dataset names prefixed with aPrefi...
Definition
cl_CurrentSource.cpp:58
belfem::electronics::CurrentSource::load_state
void load_state(hid_t aGroup, const string &aPrefix) override
restore the state written by save_state().
Definition
cl_CurrentSource.cpp:70
belfem::electronics::CurrentSource::get_value
real get_value() const override
Definition
cl_CurrentSource.cpp:42
belfem::electronics::CurrentSource::CurrentSource
CurrentSource(SourceFunction *aFunction, Cell< ElectricNode * > &aTerminals, string aLabel="")
Definition
cl_CurrentSource.cpp:25
belfem::electronics::CurrentSource::shift
void shift(const real aTime, const real aDeltaTime) override
Definition
cl_CurrentSource.cpp:50
belfem::electronics::TwoTerminals::TwoTerminals
TwoTerminals(Cell< ElectricNode * > &aTerminals, string aLabel="")
Definition
cl_TwoTerminals.cpp:20
belfem::electronics
Definition
cl_Capacitor.cpp:18
belfem::electronics::ComponentType
ComponentType
Definition
Component_Enums.hpp:22
belfem::electronics::ComponentType::CURRENTSOURCE
@ CURRENTSOURCE
Definition
Component_Enums.hpp:27
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::hid_t
int hid_t
Definition
hdf5_types.hpp:20
belfem::real
double real
Definition
typedefs.hpp:36
src
circuit
cl_CurrentSource.hpp
Generated by
1.18.0