JUK1
TimeSeriesVoltageSource< T > Struct Template Reference

A time series voltage source model. More...

#include <TimeSeriesVoltageSource.hpp>

Inheritance diagram for TimeSeriesVoltageSource< T >:
Collaboration diagram for TimeSeriesVoltageSource< T >:

Public Member Functions

lerp (size_t lowIndex, T timeVal) const
 
void addDynamicStampTo (Stamp< T > &stamp, const Matrix< T > &solutionMatrix, const size_t currentSolutionIndex, T timestep) const
 Adds this component's dynamic stamp to the target stamp. More...
 
void updateStoredState (const Matrix< T > &solutionMatrix, const size_t currentSolutionIndex, T timestep, size_t sizeG_A)
 Updates any stored state based on the current solution index. More...
 
void addDCAnalysisStampTo (Stamp< T > &stamp, const Matrix< T > &solutionVector, size_t numCurrents) const
 adds this component's DC stamp to the target stamp. More...
 
void readInTimeSeries (T timescale, const std::string &seriesPath)
 
- Public Member Functions inherited from Component< T >
virtual void addStaticStampTo (Stamp< T > &destination) const
 Adds this component's static stamp to the target stamp. More...
 
virtual void addNonLinearStampTo (Stamp< T > &destination, const Matrix< T > &solutionMatrix, const size_t currentSolutionIndex, T timestep=0) const
 adds this component's non-linear stamp to the target stamp. More...
 
virtual void updateDCStoredState (const Matrix< T > &solutionVector, size_t sizeG_A, size_t numCurrents)
 a function to update the stored state of a component based on a DC value More...
 
virtual void setTimestep (T timestep)
 initialises the component More...
 
virtual ~Component ()
 

Static Public Member Functions

static void addToElements (const std::string &line, CircuitElements< T > &elements, size_t &numNodes, size_t &numCurrents, size_t &numDCCurrents)
 
- Static Public Member Functions inherited from Component< T >
static void addToElements (const std::string &line, CircuitElements< T > &elements, size_t &numNodes, size_t &numCurrents, size_t &numDCCurrents)
 Called as a helper to add the component to the elements class. More...
 

Public Attributes

size_t n1 = 0
 
size_t n2 = 0
 
size_t currentIndex = 0
 
size_t lastTimeSeriesIndex = 0
 
std::vector< T > timeSeries
 
std::vector< T > dataSeries
 
- Public Attributes inherited from Component< T >
std::string designator = ""
 The designator as in the netlist for e.g. More...
 

Detailed Description

template<typename T>
struct TimeSeriesVoltageSource< T >

A time series voltage source model.

Template Parameters
Tthe value type

Definition at line 11 of file TimeSeriesVoltageSource.hpp.

Member Function Documentation

◆ addDCAnalysisStampTo()

template<typename T >
void TimeSeriesVoltageSource< T >::addDCAnalysisStampTo ( Stamp< T > &  destination,
const Matrix< T > &  solutionVector,
size_t  numCurrents 
) const
inlinevirtual

adds this component's DC stamp to the target stamp.

Parameters
destinationThe stamp to be added to.
solutionMatrixA vector containing all past solutions to the circuit
numCurrentsThe number of currents used by the transient simulation

Reimplemented from Component< T >.

Definition at line 67 of file TimeSeriesVoltageSource.hpp.

Here is the call graph for this function:

◆ addDynamicStampTo()

template<typename T >
void TimeSeriesVoltageSource< T >::addDynamicStampTo ( Stamp< T > &  destination,
const Matrix< T > &  solutionMatrix,
const size_t  currentSolutionIndex,
timestep 
) const
inlinevirtual

Adds this component's dynamic stamp to the target stamp.

Parameters
destinationThe stamp to be added to.
solutionMatrixA vector containing all past solutions to the circuit
currentSolutionIndexThe current timeStep index
timestepThe length of each time step

Reimplemented from Component< T >.

Definition at line 29 of file TimeSeriesVoltageSource.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addToElements()

template<typename T >
static void TimeSeriesVoltageSource< T >::addToElements ( const std::string &  line,
CircuitElements< T > &  elements,
size_t &  numNodes,
size_t &  numCurrents,
size_t &  numDCCurrents 
)
inlinestatic

Definition at line 73 of file TimeSeriesVoltageSource.hpp.

Here is the call graph for this function:

◆ lerp()

template<typename T >
T TimeSeriesVoltageSource< T >::lerp ( size_t  lowIndex,
timeVal 
) const
inline

Definition at line 20 of file TimeSeriesVoltageSource.hpp.

Here is the caller graph for this function:

◆ readInTimeSeries()

template<typename T >
void TimeSeriesVoltageSource< T >::readInTimeSeries ( timescale,
const std::string &  seriesPath 
)
inline

Definition at line 117 of file TimeSeriesVoltageSource.hpp.

Here is the caller graph for this function:

◆ updateStoredState()

template<typename T >
void TimeSeriesVoltageSource< T >::updateStoredState ( const Matrix< T > &  solutionMatrix,
const size_t  currentSolutionIndex,
timestep,
size_t  numCurrents 
)
inlinevirtual

Updates any stored state based on the current solution index.

Parameters
solutionMatrixA vector containing all past solutions to the circuit
currentSolutionIndexThe current timeStep index
timestepThe length of each time step
sizeG_Athe size of the A portion of G, marks the end of the equiv currents

Reimplemented from Component< T >.

Definition at line 55 of file TimeSeriesVoltageSource.hpp.

Member Data Documentation

◆ currentIndex

template<typename T >
size_t TimeSeriesVoltageSource< T >::currentIndex = 0

Definition at line 14 of file TimeSeriesVoltageSource.hpp.

◆ dataSeries

template<typename T >
std::vector<T> TimeSeriesVoltageSource< T >::dataSeries

Definition at line 18 of file TimeSeriesVoltageSource.hpp.

◆ lastTimeSeriesIndex

template<typename T >
size_t TimeSeriesVoltageSource< T >::lastTimeSeriesIndex = 0

Definition at line 15 of file TimeSeriesVoltageSource.hpp.

◆ n1

template<typename T >
size_t TimeSeriesVoltageSource< T >::n1 = 0

Definition at line 12 of file TimeSeriesVoltageSource.hpp.

◆ n2

template<typename T >
size_t TimeSeriesVoltageSource< T >::n2 = 0

Definition at line 13 of file TimeSeriesVoltageSource.hpp.

◆ timeSeries

template<typename T >
std::vector<T> TimeSeriesVoltageSource< T >::timeSeries

Definition at line 17 of file TimeSeriesVoltageSource.hpp.


The documentation for this struct was generated from the following file: