DPsim
Loading...
Searching...
No Matches
DPsim::MnaSolver< VarType > Class Template Referenceabstract

Solver class using Modified Nodal Analysis (MNA). More...

#include <MNASolver.h>

Inheritance diagram for DPsim::MnaSolver< VarType >:
[legend]
Collaboration diagram for DPsim::MnaSolver< VarType >:
[legend]

Public Member Functions

virtual ~MnaSolver ()
 Destructor.
 
virtual void initialize () override
 Calls subroutines to set up everything that is required before simulation.
 
virtual void setSystem (const CPS::SystemTopology &system) override
 
Matrix & leftSideVector ()
 
Matrix & rightSideVector ()
 
virtual CPS::Task::List getTasks () override
 Get tasks for scheduler.
 
void doStateSpaceExtraction (Bool value=true)
 Enable or disable MNA state-space extraction.
 
const MNAStateSpaceExtractor & getStateSpaceExtractor () const
 Read-only access to the MNA state-space extractor.
 
- Public Member Functions inherited from DPsim::Solver
 Solver (String name, CPS::Logger::Level logLevel)
 
virtual ~Solver ()
 
void setTimeStep (Real timeStep)
 
void doFrequencyParallelization (Bool freqParallel)
 
void setSystemMatrixRecomputationMode (SystemMatrixRecomputationMode mode)
 Set the system-matrix recomputation mode.
 
void doSystemMatrixRecomputation (Bool value)
 
void setLogSolveTimes (Bool value)
 
void setZeroSkipping (Bool enabled)
 Enable or disable skipping exact zero matrix contributions.
 
Bool getZeroSkipping () const
 
void doSteadyStateInit (Bool f)
 activate steady state initialization
 
void setSteadStIniTimeLimit (Real v)
 set steady state initialization time limit
 
void setSteadStIniAccLimit (Real v)
 set steady state initialization accuracy limit
 
virtual void setSolverAndComponentBehaviour (Solver::Behaviour behaviour)
 set solver and component to initialization or simulation behaviour
 
void doInitFromNodesAndTerminals (Bool f)
 activate powerflow initialization
 
virtual void setDirectLinearSolverConfiguration (DirectLinearSolverConfiguration &)
 set direct linear solver configuration (only available in MNA for now)
 
virtual void logLUTimes ()
 log LU decomposition times, if applicable
 
void setMaxNumberOfIterations (int maxIterations)
 

Public Attributes

CPS::Attribute< Matrix >::Ptr mLeftSideVector
 Solution vector of unknown quantities.
 
Matrix * mLeftSideVectorValue = nullptr
 Cached payload for the per-step solver hot path.
 
std::vector< CPS::Attribute< Matrix >::Ptr > mLeftSideVectorHarm
 Solution vector of unknown quantities (parallel frequencies)
 
- Public Attributes inherited from DPsim::Solver
int mMaxIterations = 10
 

Protected Member Functions

void updateSwitchStatus ()
 Collects the status of switches to select correct system matrix.
 
 MnaSolver (String name, CPS::Domain domain=CPS::Domain::DP, CPS::Logger::Level logLevel=CPS::Logger::Level::info)
 Constructor should not be called by users but by Simulation.
 
void initializeComponents ()
 Initialization of individual components.
 
void addRightVectorStamp (const CPS::MNAInterface::Ptr &component)
 Add a component's RHS stamp and cache any known structural row indices.
 
void addRightVectorStamps (Matrix &rightVector, Int stampColumn=-1) const
 Accumulate component RHS stamps, using sparse indices when available.
 
virtual void initializeSystem ()
 Initialization of system matrices and source vector.
 
void initializeSystemWithParallelFrequencies ()
 Initialization of system matrices and source vector.
 
void initializeSystemWithPrecomputedMatrices ()
 Initialization of system matrices and source vector.
 
void initializeSystemWithVariableMatrix ()
 Initialization of system matrices and source vector.
 
void initializeStateSpaceExtractor ()
 Initialization of state-space extraction.
 
void identifyTopologyObjects ()
 Identify Nodes and SimPowerComps and SimSignalComps.
 
void resolveSystemMatrixRecomputationMode ()
 Resolve the requested system-matrix recomputation mode.
 
void assignMatrixNodeIndices ()
 Assign simulation node index according to index in the vector.
 
void collectVirtualNodes ()
 
void steadyStateInitialization ()
 
void createEmptyVectors ()
 Create left and right side vector.
 
virtual void createEmptySystemMatrix ()=0
 Create system matrix.
 
virtual void switchedMatrixEmpty (std::size_t index)=0
 Sets all entries in the matrix with the given switch index to zero.
 
virtual void switchedMatrixEmpty (std::size_t swIdx, Int freqIdx)=0
 Sets all entries in the matrix with the given switch index and frequency index to zero.
 
virtual void switchedMatrixStamp (std::size_t index, std::vector< std::shared_ptr< CPS::MNAInterface > > &comp)=0
 Applies a component stamp to the matrix with the given switch index.
 
virtual void switchedMatrixStamp (std::size_t swIdx, Int freqIdx, CPS::MNAInterface::List &components, CPS::MNASwitchInterface::List &switches)
 Applies a component and switch stamp to the matrix with the given switch index.
 
Bool hasVariableComponentChanged ()
 Checks whether the status of variable MNA elements have changed.
 
virtual void stampVariableSystemMatrix ()=0
 Stamps components into the variable system matrix.
 
virtual void solveWithSystemMatrixRecomputation (Real time, Int timeStepCount)=0
 Solves the system with variable system matrix.
 
virtual std::shared_ptr< CPS::Task > createSolveTaskRecomp ()=0
 Create a solve task for recomputation solver.
 
virtual void logSystemMatrices ()=0
 Logging of system matrices and source vector.
 
virtual std::shared_ptr< CPS::Task > createSolveTask ()=0
 Create a solve task for this solver implementation.
 
virtual std::shared_ptr< CPS::Task > createLogTask ()=0
 Create a solve task for this solver implementation.
 
virtual std::shared_ptr< CPS::Task > createSolveTaskHarm (UInt freqIdx)=0
 Create a solve task for this solver implementation.
 
virtual std::shared_ptr< CPS::Task > createStateSpaceExtractionTask ()=0
 Create state-space extraction task for this solver implementation.
 
virtual void solve (Real time, Int timeStepCount)=0
 Solves system for single frequency.
 
virtual void solveWithHarmonics (Real time, Int timeStepCount, Int freqIdx)=0
 Solves system for multiple frequencies.
 
virtual void log (Real time, Int timeStepCount) override
 Logs left and right vector.
 
void initializeComponents ()
 
void initializeComponents ()
 
void createEmptyVectors ()
 
void createEmptyVectors ()
 

Protected Attributes

CPS::Domain mDomain
 Simulation domain, which can be dynamic phasor (DP) or EMT.
 
UInt mNumNodes = 0
 Number of network and virtual nodes, single line equivalent.
 
UInt mNumNetNodes = 0
 Number of network nodes, single line equivalent.
 
UInt mNumVirtualNodes = 0
 Number of virtual nodes, single line equivalent.
 
UInt mNumMatrixNodeIndices = 0
 Number of network and virtual nodes, considering individual phases.
 
UInt mNumNetMatrixNodeIndices = 0
 Number of network nodes, considering individual phases.
 
UInt mNumVirtualMatrixNodeIndices = 0
 Number of virtual nodes, considering individual phases.
 
UInt mNumHarmMatrixNodeIndices = 0
 Number of nodes, excluding the primary frequency.
 
UInt mNumTotalMatrixNodeIndices = 0
 Total number of network and virtual nodes, considering individual phases and additional frequencies.
 
std::vector< std::pair< UInt, UInt > > mListVariableSystemMatrixEntries
 List of index pairs of varying matrix entries.
 
CPS::SystemTopology mSystem
 System topology.
 
CPS::SimNode< VarType >::List mNodes
 List of simulation nodes.
 
CPS::MNAInterface::List mMNAComponents
 List of MNA components with static stamp into system matrix.
 
CPS::MNASwitchInterface::List mSwitches
 
CPS::MNAInterface::List mMNAIntfSwitches
 List of switches if they must be accessed as MNAInterface objects.
 
CPS::SimSignalComp::List mSimSignalComps
 List of signal type components that do not directly interact with the MNA solver.
 
std::bitset< SWITCH_NUM > mCurrentSwitchStatus
 Current status of all switches encoded as bitset.
 
CPS::MNASyncGenInterface::List mSyncGen
 List of synchronous generators that need iterate to solve the differential equations.
 
CPS::MNANonlinearCompInterface::List mNonlinearComps
 
Matrix mRightSideVector
 Source vector of known quantities.
 
std::vector< CPS::Attribute< Matrix >::Ptr > mRightVectorStamps
 List of all right side vector contributions.
 
std::vector< std::vector< UInt > > mRightVectorStampIndices
 Sparse row indices for stamps that can provide their structural support.
 
std::vector< Bool > mRightVectorStampUsesIndices
 Whether each RHS stamp has valid sparse row indices.
 
std::vector< Matrix > mRightSideVectorHarm
 Source vector of known quantities.
 
Int mNumRecomputations = 0
 Number of system matrix recomputations.
 
CPS::MNAVariableCompInterface::List mVariableComps
 
std::vector< Bool > mVariableCompAlwaysDirty
 
CPS::MNAInterface::List mMNAIntfVariableComps
 List of variable components if they must be accessed as MNAInterface objects.
 
UInt mSwitchTimeIndex = 0
 Index of the next switching event.
 
std::vector< SwitchConfiguration > mSwitchEvents
 Vector of switch times.
 
Int mLastLogTimeStep = 0
 Last simulation time step when log was updated.
 
std::shared_ptr< DataLogger > mLeftVectorLog
 Left side vector logger.
 
std::shared_ptr< DataLogger > mRightVectorLog
 Right side vector logger.
 
std::vector< Real > mFactorizeTimes
 LU factorization measurements.
 
std::vector< Real > mSolveTimes
 Right-hand side solution measurements.
 
std::vector< Real > mRecomputationTimes
 LU refactorization measurements.
 
Bool mStateSpaceExtraction = false
 Enables extraction of the MNA-coupled discrete-time state matrix.
 
MNAStateSpaceExtractor::Ptr mStateSpaceExtractor
 Extractor for the MNA-coupled state-space model.
 
- Protected Attributes inherited from DPsim::Solver
String mName
 Name for logging.
 
CPS::Logger::Level mLogLevel
 Logging level.
 
Bool mLogSolveTimes = true
 Collect step time for logging.
 
CPS::Logger::Log mSLog
 Logger.
 
Real mTimeStep
 Time step for fixed step solvers.
 
Bool mFrequencyParallel = false
 Activates parallelized computation of frequencies.
 
Real mSteadStIniTimeLimit = DEFAULT_STEAD_ST_INI_TIME_LIMIT
 steady state initialization time limit
 
Real mSteadStIniAccLimit = DEFAULT_STEAD_ST_INI_ACC_LIMIT
 steady state initialization accuracy limit
 
Bool mSteadyStateInit = false
 Activates steady state initialization.
 
Bool mIsInInitialization = false
 Determines if solver is in initialization phase, which requires different behavior.
 
Bool mInitFromNodesAndTerminals = true
 
SystemMatrixRecomputationMode mSystemMatrixRecomputationMode
 Requested system-matrix recomputation mode.
 
Bool mSystemMatrixRecomputationEnabled = false
 Effective system-matrix recomputation setting used by the solver.
 
Bool mZeroSkipping = true
 Skip exact zero contributions during matrix assembly (enabled by default).
 
Behaviour mBehaviour = Solver::Behaviour::Simulation
 Solver behaviour initialization or simulation.
 

Additional Inherited Members

- Public Types inherited from DPsim::Solver
enum  Behaviour { Initialization , Simulation }
 
enum class  SystemMatrixRecomputationMode { Auto , Enabled , Disabled }
 System-matrix recomputation mode for MNA solvers. More...
 
enum class  Type { MNA , DAE , NRP }
 
typedef std::shared_ptr< Solver > Ptr
 
typedef std::vector< Ptr > List
 
- Static Public Attributes inherited from DPsim::Solver
static constexpr Real DEFAULT_STEAD_ST_INI_TIME_LIMIT = 10
 Default steady state initialization time limit.
 
static constexpr Real DEFAULT_STEAD_ST_INI_ACC_LIMIT = 1e-8
 Default steady state initialization accuracy limit.
 

Detailed Description

template<typename VarType>
class DPsim::MnaSolver< VarType >

Solver class using Modified Nodal Analysis (MNA).

Definition at line 40 of file MNASolver.h.

Constructor & Destructor Documentation

◆ MnaSolver()

template<typename VarType>
DPsim::MnaSolver< VarType >::MnaSolver ( String name,
CPS::Domain domain = CPS::Domain::DP,
CPS::Logger::Level logLevel = CPS::Logger::Level::info )
protected

Constructor should not be called by users but by Simulation.

Definition at line 24 of file MNASolver.cpp.

◆ ~MnaSolver()

template<typename VarType>
virtual DPsim::MnaSolver< VarType >::~MnaSolver ( )
inlinevirtual

Destructor.

Definition at line 230 of file MNASolver.h.

Member Function Documentation

◆ addRightVectorStamp()

template<typename VarType>
void DPsim::MnaSolver< VarType >::addRightVectorStamp ( const CPS::MNAInterface::Ptr & component)
protected

Add a component's RHS stamp and cache any known structural row indices.

Definition at line 41 of file MNASolver.cpp.

◆ addRightVectorStamps()

template<typename VarType>
void DPsim::MnaSolver< VarType >::addRightVectorStamps ( Matrix & rightVector,
Int stampColumn = -1 ) const
protected

Accumulate component RHS stamps, using sparse indices when available.

Definition at line 56 of file MNASolver.cpp.

◆ assignMatrixNodeIndices()

template<typename VarType>
void DPsim::MnaSolver< VarType >::assignMatrixNodeIndices ( )
protected

Assign simulation node index according to index in the vector.

Definition at line 575 of file MNASolver.cpp.

◆ collectVirtualNodes()

template<typename VarType>
void DPsim::MnaSolver< VarType >::collectVirtualNodes ( )
protected

Collects virtual nodes inside components. The MNA algorithm handles these nodes in the same way as network nodes.

Definition at line 641 of file MNASolver.cpp.

◆ createEmptySystemMatrix()

template<typename VarType>
virtual void DPsim::MnaSolver< VarType >::createEmptySystemMatrix ( )
protectedpure virtual

◆ createEmptyVectors() [1/3]

template<typename VarType>
void DPsim::MnaSolver< VarType >::createEmptyVectors ( )
protected

Create left and right side vector.

◆ createEmptyVectors() [2/3]

void DPsim::MnaSolver< Real >::createEmptyVectors ( )
protected

Definition at line 619 of file MNASolver.cpp.

◆ createEmptyVectors() [3/3]

void DPsim::MnaSolver< Complex >::createEmptyVectors ( )
protected

Definition at line 624 of file MNASolver.cpp.

◆ createLogTask()

template<typename VarType>
virtual std::shared_ptr< CPS::Task > DPsim::MnaSolver< VarType >::createLogTask ( )
protectedpure virtual

Create a solve task for this solver implementation.

Implemented in DPsim::MnaSolverDirect< VarType >.

◆ createSolveTask()

template<typename VarType>
virtual std::shared_ptr< CPS::Task > DPsim::MnaSolver< VarType >::createSolveTask ( )
protectedpure virtual

Create a solve task for this solver implementation.

Implemented in DPsim::MnaSolverDirect< VarType >.

◆ createSolveTaskHarm()

template<typename VarType>
virtual std::shared_ptr< CPS::Task > DPsim::MnaSolver< VarType >::createSolveTaskHarm ( UInt freqIdx)
protectedpure virtual

Create a solve task for this solver implementation.

Implemented in DPsim::MnaSolverDirect< VarType >.

◆ createSolveTaskRecomp()

template<typename VarType>
virtual std::shared_ptr< CPS::Task > DPsim::MnaSolver< VarType >::createSolveTaskRecomp ( )
protectedpure virtual

Create a solve task for recomputation solver.

Implemented in DPsim::MnaSolverDirect< VarType >.

◆ createStateSpaceExtractionTask()

template<typename VarType>
virtual std::shared_ptr< CPS::Task > DPsim::MnaSolver< VarType >::createStateSpaceExtractionTask ( )
protectedpure virtual

Create state-space extraction task for this solver implementation.

Implemented in DPsim::MnaSolverDirect< VarType >.

◆ doStateSpaceExtraction()

template<typename VarType>
void DPsim::MnaSolver< VarType >::doStateSpaceExtraction ( Bool value = true)

Enable or disable MNA state-space extraction.

Definition at line 77 of file MNASolver.cpp.

◆ getStateSpaceExtractor()

template<typename VarType>
const MNAStateSpaceExtractor & DPsim::MnaSolver< VarType >::getStateSpaceExtractor ( ) const

Read-only access to the MNA state-space extractor.

Definition at line 83 of file MNASolver.cpp.

◆ getTasks()

template<typename VarType>
Task::List DPsim::MnaSolver< VarType >::getTasks ( )
overridevirtual

Get tasks for scheduler.

Implements DPsim::Solver.

Reimplemented in DPsim::MnaSolverPlugin< VarType >.

Definition at line 817 of file MNASolver.cpp.

◆ hasVariableComponentChanged()

template<typename VarType>
Bool DPsim::MnaSolver< VarType >::hasVariableComponentChanged ( )
protected

Checks whether the status of variable MNA elements have changed.

Definition at line 440 of file MNASolver.cpp.

◆ identifyTopologyObjects()

template<typename VarType>
void DPsim::MnaSolver< VarType >::identifyTopologyObjects ( )
protected

Identify Nodes and SimPowerComps and SimSignalComps.

Definition at line 519 of file MNASolver.cpp.

◆ initialize()

template<typename VarType>
void DPsim::MnaSolver< VarType >::initialize ( )
overridevirtual

Calls subroutines to set up everything that is required before simulation.

FIXME: This is kinda ugly... At least we should somehow unify mLeftSideVector and mLeftSideVectorHarm.

Reimplemented from DPsim::Solver.

Reimplemented in DPsim::MnaSolverPlugin< VarType >.

Definition at line 91 of file MNASolver.cpp.

◆ initializeComponents() [1/3]

template<typename VarType>
void DPsim::MnaSolver< VarType >::initializeComponents ( )
protected

Initialization of individual components.

◆ initializeComponents() [2/3]

void DPsim::MnaSolver< Real >::initializeComponents ( )
protected

Definition at line 216 of file MNASolver.cpp.

◆ initializeComponents() [3/3]

void DPsim::MnaSolver< Complex >::initializeComponents ( )
protected

Definition at line 252 of file MNASolver.cpp.

◆ initializeStateSpaceExtractor()

template<typename VarType>
void DPsim::MnaSolver< VarType >::initializeStateSpaceExtractor ( )
protected

Initialization of state-space extraction.

Definition at line 408 of file MNASolver.cpp.

◆ initializeSystem()

template<typename VarType>
void DPsim::MnaSolver< VarType >::initializeSystem ( )
protectedvirtual

Initialization of system matrices and source vector.

Definition at line 310 of file MNASolver.cpp.

◆ initializeSystemWithParallelFrequencies()

template<typename VarType>
void DPsim::MnaSolver< VarType >::initializeSystemWithParallelFrequencies ( )
protected

Initialization of system matrices and source vector.

Definition at line 330 of file MNASolver.cpp.

◆ initializeSystemWithPrecomputedMatrices()

template<typename VarType>
void DPsim::MnaSolver< VarType >::initializeSystemWithPrecomputedMatrices ( )
protected

Initialization of system matrices and source vector.

Definition at line 350 of file MNASolver.cpp.

◆ initializeSystemWithVariableMatrix()

template<typename VarType>
void DPsim::MnaSolver< VarType >::initializeSystemWithVariableMatrix ( )
protected

Initialization of system matrices and source vector.

Definition at line 381 of file MNASolver.cpp.

◆ leftSideVector()

template<typename VarType>
Matrix & DPsim::MnaSolver< VarType >::leftSideVector ( )
inline

Definition at line 243 of file MNASolver.h.

◆ log()

template<typename VarType>
void DPsim::MnaSolver< VarType >::log ( Real time,
Int timeStepCount )
overrideprotectedvirtual

Logs left and right vector.

Reimplemented from DPsim::Solver.

Definition at line 863 of file MNASolver.cpp.

◆ logSystemMatrices()

template<typename VarType>
virtual void DPsim::MnaSolver< VarType >::logSystemMatrices ( )
protectedpure virtual

Logging of system matrices and source vector.

Implemented in DPsim::MnaSolverDirect< VarType >.

◆ resolveSystemMatrixRecomputationMode()

template<typename VarType>
void DPsim::MnaSolver< VarType >::resolveSystemMatrixRecomputationMode ( )
protected

Resolve the requested system-matrix recomputation mode.

Definition at line 461 of file MNASolver.cpp.

◆ rightSideVector()

template<typename VarType>
Matrix & DPsim::MnaSolver< VarType >::rightSideVector ( )
inline

Definition at line 245 of file MNASolver.h.

◆ setSystem()

template<typename VarType>
void DPsim::MnaSolver< VarType >::setSystem ( const CPS::SystemTopology & system)
overridevirtual

Reimplemented from DPsim::Solver.

Definition at line 36 of file MNASolver.cpp.

◆ solve()

template<typename VarType>
virtual void DPsim::MnaSolver< VarType >::solve ( Real time,
Int timeStepCount )
protectedpure virtual

Solves system for single frequency.

Implemented in DPsim::MnaSolverDirect< VarType >, and DPsim::MnaSolverPlugin< VarType >.

◆ solveWithHarmonics()

template<typename VarType>
virtual void DPsim::MnaSolver< VarType >::solveWithHarmonics ( Real time,
Int timeStepCount,
Int freqIdx )
protectedpure virtual

Solves system for multiple frequencies.

Implemented in DPsim::MnaSolverDirect< VarType >.

◆ solveWithSystemMatrixRecomputation()

template<typename VarType>
virtual void DPsim::MnaSolver< VarType >::solveWithSystemMatrixRecomputation ( Real time,
Int timeStepCount )
protectedpure virtual

Solves the system with variable system matrix.

Implemented in DPsim::MnaSolverDirect< VarType >.

◆ stampVariableSystemMatrix()

template<typename VarType>
virtual void DPsim::MnaSolver< VarType >::stampVariableSystemMatrix ( )
protectedpure virtual

Stamps components into the variable system matrix.

Implemented in DPsim::MnaSolverDirect< VarType >.

◆ steadyStateInitialization()

template<typename VarType>
void DPsim::MnaSolver< VarType >::steadyStateInitialization ( )
protected

Definition at line 713 of file MNASolver.cpp.

◆ switchedMatrixEmpty() [1/2]

template<typename VarType>
virtual void DPsim::MnaSolver< VarType >::switchedMatrixEmpty ( std::size_t index)
protectedpure virtual

Sets all entries in the matrix with the given switch index to zero.

Implemented in DPsim::MnaSolverDirect< VarType >.

◆ switchedMatrixEmpty() [2/2]

template<typename VarType>
virtual void DPsim::MnaSolver< VarType >::switchedMatrixEmpty ( std::size_t swIdx,
Int freqIdx )
protectedpure virtual

Sets all entries in the matrix with the given switch index and frequency index to zero.

Implemented in DPsim::MnaSolverDirect< VarType >.

◆ switchedMatrixStamp() [1/2]

template<typename VarType>
virtual void DPsim::MnaSolver< VarType >::switchedMatrixStamp ( std::size_t index,
std::vector< std::shared_ptr< CPS::MNAInterface > > & comp )
protectedpure virtual

Applies a component stamp to the matrix with the given switch index.

Implemented in DPsim::MnaSolverDirect< VarType >.

◆ switchedMatrixStamp() [2/2]

template<typename VarType>
virtual void DPsim::MnaSolver< VarType >::switchedMatrixStamp ( std::size_t swIdx,
Int freqIdx,
CPS::MNAInterface::List & components,
CPS::MNASwitchInterface::List & switches )
inlineprotectedvirtual

Applies a component and switch stamp to the matrix with the given switch index.

Reimplemented in DPsim::MnaSolverDirect< VarType >.

Definition at line 184 of file MNASolver.h.

◆ updateSwitchStatus()

template<typename VarType>
void DPsim::MnaSolver< VarType >::updateSwitchStatus ( )
protected

Collects the status of switches to select correct system matrix.

Definition at line 454 of file MNASolver.cpp.

Member Data Documentation

◆ mCurrentSwitchStatus

template<typename VarType>
std::bitset<SWITCH_NUM> DPsim::MnaSolver< VarType >::mCurrentSwitchStatus
protected

Current status of all switches encoded as bitset.

Definition at line 80 of file MNASolver.h.

◆ mDomain

template<typename VarType>
CPS::Domain DPsim::MnaSolver< VarType >::mDomain
protected

Simulation domain, which can be dynamic phasor (DP) or EMT.

Definition at line 44 of file MNASolver.h.

◆ mFactorizeTimes

template<typename VarType>
std::vector<Real> DPsim::MnaSolver< VarType >::mFactorizeTimes
protected

LU factorization measurements.

Definition at line 126 of file MNASolver.h.

◆ mLastLogTimeStep

template<typename VarType>
Int DPsim::MnaSolver< VarType >::mLastLogTimeStep = 0
protected

Last simulation time step when log was updated.

Definition at line 119 of file MNASolver.h.

◆ mLeftSideVector

template<typename VarType>
CPS::Attribute<Matrix>::Ptr DPsim::MnaSolver< VarType >::mLeftSideVector

Solution vector of unknown quantities.

Definition at line 222 of file MNASolver.h.

◆ mLeftSideVectorHarm

template<typename VarType>
std::vector<CPS::Attribute<Matrix>::Ptr> DPsim::MnaSolver< VarType >::mLeftSideVectorHarm

Solution vector of unknown quantities (parallel frequencies)

Definition at line 227 of file MNASolver.h.

◆ mLeftSideVectorValue

template<typename VarType>
Matrix* DPsim::MnaSolver< VarType >::mLeftSideVectorValue = nullptr

Cached payload for the per-step solver hot path.

Definition at line 224 of file MNASolver.h.

◆ mLeftVectorLog

template<typename VarType>
std::shared_ptr<DataLogger> DPsim::MnaSolver< VarType >::mLeftVectorLog
protected

Left side vector logger.

Definition at line 121 of file MNASolver.h.

◆ mListVariableSystemMatrixEntries

template<typename VarType>
std::vector<std::pair<UInt, UInt> > DPsim::MnaSolver< VarType >::mListVariableSystemMatrixEntries
protected

List of index pairs of varying matrix entries.

Definition at line 62 of file MNASolver.h.

◆ mMNAComponents

template<typename VarType>
CPS::MNAInterface::List DPsim::MnaSolver< VarType >::mMNAComponents
protected

List of MNA components with static stamp into system matrix.

Definition at line 71 of file MNASolver.h.

◆ mMNAIntfSwitches

template<typename VarType>
CPS::MNAInterface::List DPsim::MnaSolver< VarType >::mMNAIntfSwitches
protected

List of switches if they must be accessed as MNAInterface objects.

Definition at line 76 of file MNASolver.h.

◆ mMNAIntfVariableComps

template<typename VarType>
CPS::MNAInterface::List DPsim::MnaSolver< VarType >::mMNAIntfVariableComps
protected

List of variable components if they must be accessed as MNAInterface objects.

Definition at line 107 of file MNASolver.h.

◆ mNodes

template<typename VarType>
CPS::SimNode<VarType>::List DPsim::MnaSolver< VarType >::mNodes
protected

List of simulation nodes.

Definition at line 67 of file MNASolver.h.

◆ mNonlinearComps

template<typename VarType>
CPS::MNANonlinearCompInterface::List DPsim::MnaSolver< VarType >::mNonlinearComps
protected

Definition at line 83 of file MNASolver.h.

◆ mNumHarmMatrixNodeIndices

template<typename VarType>
UInt DPsim::MnaSolver< VarType >::mNumHarmMatrixNodeIndices = 0
protected

Number of nodes, excluding the primary frequency.

Definition at line 58 of file MNASolver.h.

◆ mNumMatrixNodeIndices

template<typename VarType>
UInt DPsim::MnaSolver< VarType >::mNumMatrixNodeIndices = 0
protected

Number of network and virtual nodes, considering individual phases.

Definition at line 52 of file MNASolver.h.

◆ mNumNetMatrixNodeIndices

template<typename VarType>
UInt DPsim::MnaSolver< VarType >::mNumNetMatrixNodeIndices = 0
protected

Number of network nodes, considering individual phases.

Definition at line 54 of file MNASolver.h.

◆ mNumNetNodes

template<typename VarType>
UInt DPsim::MnaSolver< VarType >::mNumNetNodes = 0
protected

Number of network nodes, single line equivalent.

Definition at line 48 of file MNASolver.h.

◆ mNumNodes

template<typename VarType>
UInt DPsim::MnaSolver< VarType >::mNumNodes = 0
protected

Number of network and virtual nodes, single line equivalent.

Definition at line 46 of file MNASolver.h.

◆ mNumRecomputations

template<typename VarType>
Int DPsim::MnaSolver< VarType >::mNumRecomputations = 0
protected

Number of system matrix recomputations.

Definition at line 101 of file MNASolver.h.

◆ mNumTotalMatrixNodeIndices

template<typename VarType>
UInt DPsim::MnaSolver< VarType >::mNumTotalMatrixNodeIndices = 0
protected

Total number of network and virtual nodes, considering individual phases and additional frequencies.

Definition at line 60 of file MNASolver.h.

◆ mNumVirtualMatrixNodeIndices

template<typename VarType>
UInt DPsim::MnaSolver< VarType >::mNumVirtualMatrixNodeIndices = 0
protected

Number of virtual nodes, considering individual phases.

Definition at line 56 of file MNASolver.h.

◆ mNumVirtualNodes

template<typename VarType>
UInt DPsim::MnaSolver< VarType >::mNumVirtualNodes = 0
protected

Number of virtual nodes, single line equivalent.

Definition at line 50 of file MNASolver.h.

◆ mRecomputationTimes

template<typename VarType>
std::vector<Real> DPsim::MnaSolver< VarType >::mRecomputationTimes
protected

LU refactorization measurements.

Definition at line 130 of file MNASolver.h.

◆ mRightSideVector

template<typename VarType>
Matrix DPsim::MnaSolver< VarType >::mRightSideVector
protected

Source vector of known quantities.

Definition at line 86 of file MNASolver.h.

◆ mRightSideVectorHarm

template<typename VarType>
std::vector<Matrix> DPsim::MnaSolver< VarType >::mRightSideVectorHarm
protected

Source vector of known quantities.

Definition at line 97 of file MNASolver.h.

◆ mRightVectorLog

template<typename VarType>
std::shared_ptr<DataLogger> DPsim::MnaSolver< VarType >::mRightVectorLog
protected

Right side vector logger.

Definition at line 123 of file MNASolver.h.

◆ mRightVectorStampIndices

template<typename VarType>
std::vector<std::vector<UInt> > DPsim::MnaSolver< VarType >::mRightVectorStampIndices
protected

Sparse row indices for stamps that can provide their structural support.

Definition at line 91 of file MNASolver.h.

◆ mRightVectorStamps

template<typename VarType>
std::vector<CPS::Attribute<Matrix>::Ptr> DPsim::MnaSolver< VarType >::mRightVectorStamps
protected

List of all right side vector contributions.

Definition at line 89 of file MNASolver.h.

◆ mRightVectorStampUsesIndices

template<typename VarType>
std::vector<Bool> DPsim::MnaSolver< VarType >::mRightVectorStampUsesIndices
protected

Whether each RHS stamp has valid sparse row indices.

Definition at line 93 of file MNASolver.h.

◆ mSimSignalComps

template<typename VarType>
CPS::SimSignalComp::List DPsim::MnaSolver< VarType >::mSimSignalComps
protected

List of signal type components that do not directly interact with the MNA solver.

Definition at line 78 of file MNASolver.h.

◆ mSolveTimes

template<typename VarType>
std::vector<Real> DPsim::MnaSolver< VarType >::mSolveTimes
protected

Right-hand side solution measurements.

Definition at line 128 of file MNASolver.h.

◆ mStateSpaceExtraction

template<typename VarType>
Bool DPsim::MnaSolver< VarType >::mStateSpaceExtraction = false
protected

Enables extraction of the MNA-coupled discrete-time state matrix.

Definition at line 134 of file MNASolver.h.

◆ mStateSpaceExtractor

template<typename VarType>
MNAStateSpaceExtractor::Ptr DPsim::MnaSolver< VarType >::mStateSpaceExtractor
protected

Extractor for the MNA-coupled state-space model.

Definition at line 137 of file MNASolver.h.

◆ mSwitches

template<typename VarType>
CPS::MNASwitchInterface::List DPsim::MnaSolver< VarType >::mSwitches
protected

List of switches that stamp differently depending on their state and indicate the solver to choose a different system matrix

Definition at line 74 of file MNASolver.h.

◆ mSwitchEvents

template<typename VarType>
std::vector<SwitchConfiguration> DPsim::MnaSolver< VarType >::mSwitchEvents
protected

Vector of switch times.

Definition at line 113 of file MNASolver.h.

◆ mSwitchTimeIndex

template<typename VarType>
UInt DPsim::MnaSolver< VarType >::mSwitchTimeIndex = 0
protected

Index of the next switching event.

Definition at line 111 of file MNASolver.h.

◆ mSyncGen

template<typename VarType>
CPS::MNASyncGenInterface::List DPsim::MnaSolver< VarType >::mSyncGen
protected

List of synchronous generators that need iterate to solve the differential equations.

Definition at line 82 of file MNASolver.h.

◆ mSystem

template<typename VarType>
CPS::SystemTopology DPsim::MnaSolver< VarType >::mSystem
protected

System topology.

Definition at line 65 of file MNASolver.h.

◆ mVariableCompAlwaysDirty

template<typename VarType>
std::vector<Bool> DPsim::MnaSolver< VarType >::mVariableCompAlwaysDirty
protected

Definition at line 105 of file MNASolver.h.

◆ mVariableComps

template<typename VarType>
CPS::MNAVariableCompInterface::List DPsim::MnaSolver< VarType >::mVariableComps
protected

List of components that indicate the solver to recompute the system matrix depending on their state

Definition at line 104 of file MNASolver.h.


The documentation for this class was generated from the following files: