JUK1
Stamp< T > Struct Template Reference

A helper struct to store the preallocated stamps for MNA. More...

#include <Component.hpp>

Public Member Functions

 Stamp (size_t _sizeG_A, size_t _sizeG_D)
 Sets the initial size of the stamp pair. More...
 
void clear ()
 Clears the stamps to 0s. More...
 
void add (const Stamp< T > &rhs)
 Combines two stamps together into the current stamp. This is not done via the operator, as it has side-effects. More...
 
void addStaticStamp (const std::shared_ptr< Component< T > > &rhs)
 A helper function to add a static component to the stamp. More...
 
void addDynamicStamp (const std::shared_ptr< Component< T > > &rhs, const Matrix< T > &solutionMatrix, const size_t currentSolutionIndex, T timestep)
 A helper function to add a dynamic component to the stamp. More...
 
void addNonLinearStamp (const std::shared_ptr< Component< T > > &rhs, const Matrix< T > &solutionMatrix, const size_t currentSolutionIndex, T timestep=0)
 A helper function to add a non-linear component to the stamp. More...
 
void addDCAnalysisStamp (const std::shared_ptr< Component< T > > &rhs, const Matrix< T > &solutionMatrix, const size_t numCurrents)
 A helper function to add a DC component to the stamp. More...
 
Matrix< T > solve ()
 An alias for left dividing G by s. More...
 

Public Attributes

size_t sizeG_A
 
size_t sizeG_D
 
Matrix< T > G
 
Matrix< T > s
 

Detailed Description

template<typename T>
struct Stamp< T >

A helper struct to store the preallocated stamps for MNA.

Template Parameters
TThe value type

The matrix has the following structure:

///       | G_A | G_B |
///   G = ------|------
///       | G_C | G_D |

Definition at line 23 of file Component.hpp.

Constructor & Destructor Documentation

◆ Stamp()

template<typename T >
Stamp< T >::Stamp ( size_t  _sizeG_A,
size_t  _sizeG_D 
)
inline

Sets the initial size of the stamp pair.

Parameters
_sizeG_ASize of the voltage dependence portion of the stamps (Group I)
_sizeG_DSize of the current dependence portion of the stamps (Group II)

Definition at line 36 of file Component.hpp.

Member Function Documentation

◆ add()

template<typename T >
void Stamp< T >::add ( const Stamp< T > &  rhs)
inline

Combines two stamps together into the current stamp. This is not done via the operator, as it has side-effects.

Parameters
rhsThe stamps to add to the current stamp

Definition at line 52 of file Component.hpp.

◆ addDCAnalysisStamp()

template<typename T >
void Stamp< T >::addDCAnalysisStamp ( const std::shared_ptr< Component< T > > &  rhs,
const Matrix< T > &  solutionMatrix,
const size_t  numCurrents 
)
inline

A helper function to add a DC component to the stamp.

Parameters
rhsComponent to be added

Definition at line 88 of file Component.hpp.

◆ addDynamicStamp()

template<typename T >
void Stamp< T >::addDynamicStamp ( const std::shared_ptr< Component< T > > &  rhs,
const Matrix< T > &  solutionMatrix,
const size_t  currentSolutionIndex,
timestep 
)
inline

A helper function to add a dynamic component to the stamp.

Parameters
rhsComponent to be added

Definition at line 67 of file Component.hpp.

◆ addNonLinearStamp()

template<typename T >
void Stamp< T >::addNonLinearStamp ( const std::shared_ptr< Component< T > > &  rhs,
const Matrix< T > &  solutionMatrix,
const size_t  currentSolutionIndex,
timestep = 0 
)
inline

A helper function to add a non-linear component to the stamp.

Parameters
rhsComponent to be added

Definition at line 77 of file Component.hpp.

◆ addStaticStamp()

template<typename T >
void Stamp< T >::addStaticStamp ( const std::shared_ptr< Component< T > > &  rhs)
inline

A helper function to add a static component to the stamp.

Parameters
rhsComponent to be added

Definition at line 60 of file Component.hpp.

◆ clear()

template<typename T >
void Stamp< T >::clear ( )
inline

Clears the stamps to 0s.

Definition at line 43 of file Component.hpp.

◆ solve()

template<typename T >
Matrix<T> Stamp< T >::solve ( )
inline

An alias for left dividing G by s.

Returns
a solution vector the same dimension as s.

Definition at line 96 of file Component.hpp.

Member Data Documentation

◆ G

template<typename T >
Matrix<T> Stamp< T >::G

Definition at line 27 of file Component.hpp.

◆ s

template<typename T >
Matrix<T> Stamp< T >::s

Definition at line 28 of file Component.hpp.

◆ sizeG_A

template<typename T >
size_t Stamp< T >::sizeG_A

Definition at line 24 of file Component.hpp.

◆ sizeG_D

template<typename T >
size_t Stamp< T >::sizeG_D

Definition at line 25 of file Component.hpp.


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