BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
cl_VoltageSource.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_VOLTAGESOURCE_HPP
13#define BELFEM_CL_VOLTAGESOURCE_HPP
14
15
16#include "cl_TwoTerminals.hpp"
17#include "cl_SourceFunction.hpp"
18
19namespace belfem
20{
21 namespace electronics
22 {
23//-----------------------------------------------------------------------------
24
26 {
27
29 real mValueTime = 0.0 ;
30
32 SourceFunction * mFunction ;
33
34//------------------------------------------------------------------------------
35 public:
36//------------------------------------------------------------------------------
37
38 VoltageSource( SourceFunction * aFunction, Cell < ElectricNode* > & aTerminals, string aLabel = "") ;
39
40 ~VoltageSource() override ;
41
42//------------------------------------------------------------------------------
43
45 component_type() const override ;
46
47//-----------------------------------------------------------------------------
48
49 real
50 get_value() const override ;
51
52//-----------------------------------------------------------------------------
53
54 void
55 set_value( const real aValue ) ;
56
57//-----------------------------------------------------------------------------
58
59 void
60 shift( const real aTime, const real aDeltaTime ) override ;
61
62//------------------------------------------------------------------------------
63
64 void
65 save_state( hid_t aGroup, const string & aPrefix ) override ;
66
67//------------------------------------------------------------------------------
68
69 void
70 load_state( hid_t aGroup, const string & aPrefix ) override ;
71
72//------------------------------------------------------------------------------
73
74
75 };
76
77 inline ComponentType
82
83//-----------------------------------------------------------------------------
84 }
85}
86
87#endif //BELFEM_CL_VOLTAGESOURCE_HPP
Definition cl_SourceFunction.hpp:80
TwoTerminals(Cell< ElectricNode * > &aTerminals, string aLabel="")
Definition cl_TwoTerminals.cpp:20
ComponentType component_type() const override
Definition cl_VoltageSource.hpp:78
void shift(const real aTime, const real aDeltaTime) override
Definition cl_VoltageSource.cpp:54
void set_value(const real aValue)
Definition cl_VoltageSource.cpp:46
real get_value() const override
Definition cl_VoltageSource.cpp:38
void load_state(hid_t aGroup, const string &aPrefix) override
restore the state written by save_state().
Definition cl_VoltageSource.cpp:73
VoltageSource(SourceFunction *aFunction, Cell< ElectricNode * > &aTerminals, string aLabel="")
Definition cl_VoltageSource.cpp:24
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_VoltageSource.cpp:62
Definition cl_Capacitor.cpp:18
ComponentType
Definition Component_Enums.hpp:22
@ VOLTAGESOURCE
Definition Component_Enums.hpp:26
USER GUIDES:
Definition cl_Capacitor.cpp:16
int hid_t
Definition hdf5_types.hpp:20
double real
Definition typedefs.hpp:36