Base class for every circuit component. More...
#include <cl_Component.hpp>
Public Member Functions | |
| Component (const uint aNumTerminals, Cell< ElectricNode * > &aTerminals, string aLabel="") | |
| ~Component () override | |
| virtual ComponentType | component_type () const |
| uint | number_of_terminals () const |
| ElectricNode * | node (index_t tIndex) const |
| virtual real | get_value () const |
| virtual real | dIdV () const |
| virtual real | get_discretized_resistance () const |
| virtual real | get_discretized_source () const |
| virtual real | get_current () const |
| string | get_label () const |
| virtual void | set_current (const real aCurrent) |
| virtual void | compute_current () |
| virtual void | set_timestep (const real aDeltaTime) |
| virtual void | shift (const real aTime, const real aDeltaTime) |
| virtual void | shift_back () |
| virtual void | save_state (hid_t aGroup, const string &aPrefix) |
| write this component's time-stepping state into the restart group, dataset names prefixed with aPrefix. | |
| virtual void | load_state (hid_t aGroup, const string &aPrefix) |
| restore the state written by save_state(). | |
| virtual bool | is_closed () const |
| virtual void | switch_state () |
| virtual ElectricNode * | get_node_plus () const |
| virtual ElectricNode * | get_node_minus () const |
| 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 Vertex * | vertex (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 () |
Protected Attributes | |
| 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 |
Base class for every circuit component.
| belfem::electronics::Component::Component | ( | const uint | aNumTerminals, |
| Cell< ElectricNode * > & | aTerminals, | ||
| string | aLabel = "" ) |
|
override |
|
virtual |
Reimplemented in belfem::electronics::Capacitor, belfem::electronics::CurrentSource, belfem::electronics::Diode, belfem::electronics::FEMTwoTerminals, belfem::electronics::Inductor, belfem::electronics::Resistor, belfem::electronics::Superconductor, belfem::electronics::Switch, belfem::electronics::TwoTerminals, and belfem::electronics::VoltageSource.
|
virtual |
|
virtual |
Reimplemented in belfem::electronics::Diode, and belfem::electronics::Superconductor.
|
virtual |
Reimplemented in belfem::electronics::TwoTerminals.
|
virtual |
Reimplemented in belfem::electronics::Capacitor, and belfem::electronics::Inductor.
|
virtual |
Reimplemented in belfem::electronics::Capacitor, and belfem::electronics::Inductor.
| string belfem::electronics::Component::get_label | ( | ) | const |
|
virtual |
Reimplemented in belfem::electronics::TwoTerminals.
|
virtual |
Reimplemented in belfem::electronics::TwoTerminals.
|
virtual |
|
virtual |
Reimplemented in belfem::electronics::Switch.
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 in belfem::electronics::Capacitor, belfem::electronics::CurrentSource, belfem::electronics::FEMTwoTerminals, belfem::electronics::Inductor, belfem::electronics::Switch, and belfem::electronics::VoltageSource.
| ElectricNode * belfem::electronics::Component::node | ( | index_t | tIndex | ) | const |
| uint belfem::electronics::Component::number_of_terminals | ( | ) | const |
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 in belfem::electronics::Capacitor, belfem::electronics::CurrentSource, belfem::electronics::FEMTwoTerminals, belfem::electronics::Inductor, belfem::electronics::Switch, and belfem::electronics::VoltageSource.
|
virtual |
Reimplemented in belfem::electronics::TwoTerminals.
|
virtual |
Reimplemented in belfem::electronics::Capacitor, and belfem::electronics::Inductor.
|
virtual |
|
virtual |
Reimplemented in belfem::electronics::Switch.
|
protected |
Label.
|
protected |
Number of terminals.
|
protected |
Nodes at each terminal ( non-owning ).