JUK1
|
a glorified container for the different types of components. More...
#include <CircuitElements.hpp>
Public Member Functions | |
CircuitElements (size_t numNodes=0, size_t numCurrents=0, size_t numDCCurrents=0) | |
Initialisation. More... | |
void | setNewStampSize (size_t numNodes, size_t numCurrents, size_t numDCCurrents=0) |
Updates the size of all stamps. More... | |
Stamp< T > & | generateStaticStamp () |
Forces a clear of the static stamp, and generates a new one. More... | |
Stamp< T > & | generateDynamicStamp (const Matrix< T > &solutionMatrix, const size_t currentSolutionIndex, T timestep) |
Obtains the static stamp, then adds dynamic components to it. More... | |
Stamp< T > & | generateNonLinearStamp (const Matrix< T > &solutionMatrix, const size_t currentSolutionIndex, T timestep) |
Obtains the dynamic stamp, then adds dynamic components to it. More... | |
Stamp< T > & | generateCompleteStamp (SolutionStage stage, const Matrix< T > &solutionMatrix, const size_t currentSolutionIndex, T timestep) |
Generates the complete stamp up to a certain point. More... | |
Stamp< T > & | generateDCStamp (const Matrix< T > &solutionVector, size_t numCurrents) |
Generates the complete DC stamp. More... | |
void | updateTimeStep (const Matrix< T > &solutionMatrix, const size_t currentSolutionIndex, T timestep) |
Updates the components at the end of each time step. Applies to dynamic and non-linear components. More... | |
void | updateDCStoredState (const Matrix< T > &solutionVector, size_t numCurrents) |
Updates the components based on their DC value. Applies to dynamic and non-linear components. More... | |
Public Attributes | |
Stamp< T > | staticStamp |
Preallocated stamp. Used for caching between loop iterations. Static stamps will only be generated once as a result. More... | |
Stamp< T > | dynamicStamp |
Preallocated stamp. Used for caching between loop iterations. Dynamic stamps need to be updated on every timestep. More... | |
Stamp< T > | nonLinearStamp |
Preallocated stamp. Used for caching between loop iterations. Non-Linear stamps must be updated on every newton-raphson iteration. More... | |
Stamp< T > | dcStamp |
Preallocated stamp. Used for caching between loop iterations. DC stamps must be updated on every newton-raphson iteration. More... | |
std::vector< std::shared_ptr< Component< T > > > | staticElements |
A container to store the static components. More... | |
std::vector< std::shared_ptr< Component< T > > > | dynamicElements |
A container to store the dynamic components. More... | |
std::vector< std::shared_ptr< Component< T > > > | nonLinearElements |
A container to store the Non-Linear components. More... | |
bool | staticStampIsFresh = false |
A variable used to track if the cached stamp is current. More... | |
bool | dynamicStampIsFresh = false |
A variable used to track if the cached stamp is current. More... | |
bool | nonLinearStampIsFresh = false |
A variable used to track if the cached stamp is current. More... | |
std::multimap< size_t, std::shared_ptr< Component< T > > > | nodeComponentMap |
A map to pair nodes with the components connected to them. More... | |
a glorified container for the different types of components.
T |
Definition at line 46 of file CircuitElements.hpp.
|
inline |
Initialisation.
numNodes | The size of the stamps voltage dependants |
numCurrents | The size of the stamps voltage dependants |
numDCCurrents | The size of the stamps voltage dependants |
Definition at line 88 of file CircuitElements.hpp.
|
inline |
Generates the complete stamp up to a certain point.
solutionMatrix | The solution matrix to use for the dynamic and non-linear stamp. |
currentSolutionIndex | The current index we are at. |
timestep | The time step being used. |
Definition at line 196 of file CircuitElements.hpp.
|
inline |
Generates the complete DC stamp.
solutionVector | The solution vector to use for the dynamic and non-linear stamp. |
currentSolutionIndex | The current index we are at. |
timestep | The time step being used. |
Definition at line 234 of file CircuitElements.hpp.
|
inline |
Obtains the static stamp, then adds dynamic components to it.
solutionMatrix | The solution matrix to use for the dynamic and non-linear stamp. |
currentSolutionIndex | The current index we are at. |
timestep | The time step being used. |
Definition at line 141 of file CircuitElements.hpp.
|
inline |
Obtains the dynamic stamp, then adds dynamic components to it.
solutionMatrix | The solution matrix to use for the dynamic and non-linear stamp. |
currentSolutionIndex | The current index we are at. |
timestep | The time step being used. |
Definition at line 171 of file CircuitElements.hpp.
|
inline |
Forces a clear of the static stamp, and generates a new one.
Definition at line 114 of file CircuitElements.hpp.
|
inline |
Updates the size of all stamps.
numNodes | The size of the stamps voltage dependants |
numCurrents | The size of the stamps voltage dependants |
numDCCurrents | The size of the stamps voltage dependants |
Definition at line 101 of file CircuitElements.hpp.
|
inline |
Updates the components based on their DC value. Applies to dynamic and non-linear components.
solutionVector | The solution vector to use for DC value |
numCurrents | The number of currents used by the transient simulation. |
Definition at line 278 of file CircuitElements.hpp.
|
inline |
Updates the components at the end of each time step. Applies to dynamic and non-linear components.
solutionMatrix | The solution matrix to use for the dynamic and non-linear stamp. |
currentSolutionIndex | The current index we are at. |
timestep | The time step being used. |
Definition at line 259 of file CircuitElements.hpp.
Stamp<T> CircuitElements< T >::dcStamp |
Preallocated stamp. Used for caching between loop iterations. DC stamps must be updated on every newton-raphson iteration.
Definition at line 60 of file CircuitElements.hpp.
std::vector<std::shared_ptr<Component<T> > > CircuitElements< T >::dynamicElements |
A container to store the dynamic components.
Definition at line 69 of file CircuitElements.hpp.
Stamp<T> CircuitElements< T >::dynamicStamp |
Preallocated stamp. Used for caching between loop iterations. Dynamic stamps need to be updated on every timestep.
Definition at line 52 of file CircuitElements.hpp.
bool CircuitElements< T >::dynamicStampIsFresh = false |
A variable used to track if the cached stamp is current.
Definition at line 76 of file CircuitElements.hpp.
std::multimap<size_t, std::shared_ptr<Component<T> > > CircuitElements< T >::nodeComponentMap |
A map to pair nodes with the components connected to them.
Definition at line 81 of file CircuitElements.hpp.
std::vector<std::shared_ptr<Component<T> > > CircuitElements< T >::nonLinearElements |
A container to store the Non-Linear components.
Definition at line 71 of file CircuitElements.hpp.
Stamp<T> CircuitElements< T >::nonLinearStamp |
Preallocated stamp. Used for caching between loop iterations. Non-Linear stamps must be updated on every newton-raphson iteration.
Definition at line 56 of file CircuitElements.hpp.
bool CircuitElements< T >::nonLinearStampIsFresh = false |
A variable used to track if the cached stamp is current.
Definition at line 78 of file CircuitElements.hpp.
std::vector<std::shared_ptr<Component<T> > > CircuitElements< T >::staticElements |
A container to store the static components.
Definition at line 67 of file CircuitElements.hpp.
Stamp<T> CircuitElements< T >::staticStamp |
Preallocated stamp. Used for caching between loop iterations. Static stamps will only be generated once as a result.
Definition at line 49 of file CircuitElements.hpp.
bool CircuitElements< T >::staticStampIsFresh = false |
A variable used to track if the cached stamp is current.
Definition at line 74 of file CircuitElements.hpp.