JUK1
Resistor< T > Struct Template Reference

An ideal resistor model. More...

#include <Resistor.hpp>

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

Public Member Functions

void addStaticStampTo (Stamp< T > &stamp) const
 Adds this component's static stamp to the target stamp. 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...
 
- Public Member Functions inherited from Component< T >
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 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

value = 0
 
size_t n1 = 0
 
size_t n2 = 0
 
size_t currentIndex = 0
 
bool group1 = true
 
- 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 Resistor< T >

An ideal resistor model.

Template Parameters
Tthe value type

Definition at line 10 of file Resistor.hpp.

Member Function Documentation

◆ addDCAnalysisStampTo()

template<typename T >
void Resistor< 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 54 of file Resistor.hpp.

Here is the call graph for this function:

◆ addStaticStampTo()

template<typename T >
void Resistor< 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 from Component< T >.

Definition at line 20 of file Resistor.hpp.

Here is the caller graph for this function:

◆ addToElements()

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

Definition at line 60 of file Resistor.hpp.

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

Member Data Documentation

◆ currentIndex

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

Definition at line 16 of file Resistor.hpp.

◆ group1

template<typename T >
bool Resistor< T >::group1 = true

Definition at line 18 of file Resistor.hpp.

◆ n1

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

Definition at line 14 of file Resistor.hpp.

◆ n2

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

Definition at line 15 of file Resistor.hpp.

◆ value

template<typename T >
T Resistor< T >::value = 0

Definition at line 12 of file Resistor.hpp.


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