BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
belfem::electronics::VoltageSource Class Reference

#include <cl_VoltageSource.hpp>

Inheritance diagram for belfem::electronics::VoltageSource:
[legend]
Collaboration diagram for belfem::electronics::VoltageSource:
[legend]

Public Member Functions

 VoltageSource (SourceFunction *aFunction, Cell< ElectricNode * > &aTerminals, string aLabel="")
 ~VoltageSource () override
ComponentType component_type () const override
real get_value () const override
void set_value (const real aValue)
void shift (const real aTime, const real aDeltaTime) override
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 aPrefix.
void load_state (hid_t aGroup, const string &aPrefix) override
 restore the state written by save_state().
Public Member Functions inherited from belfem::electronics::TwoTerminals
 TwoTerminals (Cell< ElectricNode * > &aTerminals, string aLabel="")
real get_current () const override
void set_current (const real aCurrent) override
ElectricNodeget_node_plus () const override
ElectricNodeget_node_minus () const override
Public Member Functions inherited from belfem::electronics::Component
 Component (const uint aNumTerminals, Cell< ElectricNode * > &aTerminals, string aLabel="")
 ~Component () override
uint number_of_terminals () const
ElectricNodenode (index_t tIndex) const
virtual real dIdV () const
virtual real get_discretized_resistance () const
virtual real get_discretized_source () const
string get_label () const
virtual void compute_current ()
virtual void set_timestep (const real aDeltaTime)
virtual void shift_back ()
virtual bool is_closed () const
virtual void switch_state ()
Public Member Functions inherited from belfem::graph::Vertex
 Vertex ()=default
virtual ~Vertex ()
void set_id (const id_t aID)
id_t id () const
virtual void set_index (const index_t aIndex)
virtual index_t index () const
virtual void set_owner (const proc_t aOwner)
virtual proc_t owner () const
index_t level () const
void set_level (const index_t aLevel)
virtual void flag (const uint8_t aIndex=0)
virtual void unflag (const uint8_t aIndex=0)
virtual bool is_flagged (const uint8_t aIndex=0) const
void increment_vertex_counter ()
void init_vertex_container ()
void init_vertex_container (const uint aSize)
void reset_vertex_container ()
void insert_vertex (Vertex *aVertex)
uint number_of_vertices () const
virtual Vertexvertex (const uint aIndex)
virtual auto vertex (const uint aIndex) const -> decltype(this)
virtual void init_element_container ()
virtual void reset_element_container ()
void sort_vertices ()
 sorts the vertices according to their index
void reverse_vertices ()

Additional Inherited Members

Protected Attributes inherited from belfem::electronics::TwoTerminals
real mCurrent = 0.0
 Current.
Protected Attributes inherited from belfem::electronics::Component
const uint mNumTerminals
 Number of terminals.
string mLabel
 Label.
ElectricNode ** mTerminals = nullptr
 Nodes at each terminal ( non-owning ).
Protected Attributes inherited from belfem::graph::Vertex
uint32_t mVertexCounter = 0
Vertex ** mVertices = nullptr

Constructor & Destructor Documentation

◆ VoltageSource()

belfem::electronics::VoltageSource::VoltageSource ( SourceFunction * aFunction,
Cell< ElectricNode * > & aTerminals,
string aLabel = "" )

◆ ~VoltageSource()

belfem::electronics::VoltageSource::~VoltageSource ( )
override

Member Function Documentation

◆ component_type()

ComponentType belfem::electronics::VoltageSource::component_type ( ) const
inlineoverridevirtual

Reimplemented from belfem::electronics::TwoTerminals.

◆ get_value()

real belfem::electronics::VoltageSource::get_value ( ) const
overridevirtual

Reimplemented from belfem::electronics::Component.

◆ load_state()

void belfem::electronics::VoltageSource::load_state ( hid_t aGroup,
const string & aPrefix )
overridevirtual

restore the state written by save_state().

The loaded object is coherent for both legal continuations: the controller triad ( set_timestep - shift - stamp ) and a stamp without shift. Calling shift_back() before the first post-restore shift() is forbidden

Reimplemented from belfem::electronics::Component.

◆ save_state()

void belfem::electronics::VoltageSource::save_state ( hid_t aGroup,
const string & aPrefix )
overridevirtual

write this component's time-stepping state into the restart group, dataset names prefixed with aPrefix.

Default: no state ( resistors, diodes and superconductors recompute from voltages )

Reimplemented from belfem::electronics::Component.

◆ set_value()

void belfem::electronics::VoltageSource::set_value ( const real aValue)

◆ shift()

void belfem::electronics::VoltageSource::shift ( const real aTime,
const real aDeltaTime )
overridevirtual

Reimplemented from belfem::electronics::Component.


The documentation for this class was generated from the following files: