JUK1
Component< T > Struct Template Reference

A template base class to define the fundamental things a component should define. More...

#include <Component.hpp>

Inheritance diagram for Component< T >:

Public Member Functions

virtual void addStaticStampTo (Stamp< T > &destination) const
 Adds this component's static stamp to the target stamp. More...
 
virtual void addDynamicStampTo (Stamp< T > &destination, const Matrix< T > &solutionMatrix, const size_t currentSolutionIndex, T timestep) const
 Adds this component's dynamic 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 updateStoredState (const Matrix< T > &solutionMatrix, const size_t currentSolutionIndex, T timestep, size_t numCurrents)
 Updates any stored state based on the current solution index. More...
 
virtual void addDCAnalysisStampTo (Stamp< T > &destination, const Matrix< T > &solutionVector, size_t numCurrents) const
 adds this component's DC 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)
 Called as a helper to add the component to the elements class. More...
 

Public Attributes

std::string designator = ""
 The designator as in the netlist for e.g. More...
 

Detailed Description

template<typename T>
struct Component< T >

A template base class to define the fundamental things a component should define.

Template Parameters
TThe value type

Definition at line 108 of file Component.hpp.

Constructor & Destructor Documentation

◆ ~Component()

template<typename T >
virtual Component< T >::~Component ( )
inlinevirtual

Definition at line 194 of file Component.hpp.

Member Function Documentation

◆ addDCAnalysisStampTo()

template<typename T >
virtual void Component< 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 in VoltageSource< T >, TimeSeriesVoltageSource< T >, SParameterBlockVF< T >, SParameterBlock< T >, SinusoidalVoltageSource< T >, Resistor< T >, NLCurrentSource< T >, NLCapacitor< T >, Inductor< T >, Diode< T >, CurrentSource< T >, Capacitor< T >, BJTP< T >, and BJTN< T >.

Definition at line 159 of file Component.hpp.

◆ addDynamicStampTo()

template<typename T >
virtual void Component< 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 in TimeSeriesVoltageSource< T >, SinusoidalVoltageSource< T >, Inductor< T >, Capacitor< T >, SParameterBlockVF< T >, and SParameterBlock< T >.

Definition at line 125 of file Component.hpp.

◆ addNonLinearStampTo()

template<typename T >
virtual void Component< T >::addNonLinearStampTo ( Stamp< T > &  destination,
const Matrix< T > &  solutionMatrix,
const size_t  currentSolutionIndex,
timestep = 0 
) const
inlinevirtual

adds this component's non-linear 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 in NLNMOS< T >, NLCurrentSource< T >, NLCapacitor< T >, Diode< T >, BJTP< T >, and BJTN< T >.

Definition at line 136 of file Component.hpp.

◆ addStaticStampTo()

template<typename T >
virtual void Component< T >::addStaticStampTo ( Stamp< T > &  destination) const
inlinevirtual

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

Parameters
destinationThe stamp to be added to.

Reimplemented in VoltageSource< T >, SParameterBlockVF< T >, SParameterBlock< T >, Resistor< T >, and CurrentSource< T >.

Definition at line 115 of file Component.hpp.

◆ addToElements()

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

Called as a helper to add the component to the elements class.

Parameters
lineThe line to be parsed.
elementsA reference to the elements object the component is being added to.
numNodesA reference to the current max number of nodes.
numCurrentsA reference to the current max number of currents.
numDCCurrentsA reference to the current max number of DC currents.

Definition at line 189 of file Component.hpp.

◆ setTimestep()

template<typename T >
virtual void Component< T >::setTimestep ( timestep)
inlinevirtual

initialises the component

Parameters
timestepThe length of each time step

Reimplemented in SParameterBlockVF< T >.

Definition at line 177 of file Component.hpp.

◆ updateDCStoredState()

template<typename T >
virtual void Component< T >::updateDCStoredState ( const Matrix< T > &  solutionVector,
size_t  sizeG_A,
size_t  numCurrents 
)
inlinevirtual

a function to update the stored state of a component based on a DC value

Parameters
solutionVectorThe DC vector
sizeG_Athe number of voltages
numCurrentsthe number of transient currents

Reimplemented in NLCapacitor< T >, and Inductor< T >.

Definition at line 170 of file Component.hpp.

◆ updateStoredState()

template<typename T >
virtual void Component< 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 in TimeSeriesVoltageSource< T >, SParameterBlockVF< T >, SParameterBlock< T >, SinusoidalVoltageSource< T >, NLNMOS< T >, NLCapacitor< T >, Inductor< T >, Diode< T >, Capacitor< T >, BJTP< T >, and BJTN< T >.

Definition at line 148 of file Component.hpp.

Member Data Documentation

◆ designator

template<typename T >
std::string Component< T >::designator = ""

The designator as in the netlist for e.g.

Definition at line 110 of file Component.hpp.


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