15template <
typename VarType>
25 std::vector<CPS::Attribute<Matrix>::Ptr> mRightVectorStamps;
34 using Ptr = std::shared_ptr<CompositePowerComp<VarType>>;
35 using List = std::vector<Ptr>;
45 Bool hasPostStep =
true,
58 return mSubcomponentsMNA;
80 Bool contributeToRightVector);
AttributePointer< Attribute< T > > Ptr
virtual void mnaParentApplySystemMatrixStamp(SparseMatrixRow &systemMatrix)
void mnaCompInitialize(Real omega, Real timeStep, Attribute< Matrix >::Ptr leftVector) override
Initializes variables of components.
void addMNASubComponent(typename SimPowerComp< VarType >::Ptr subc, MNA_SUBCOMP_TASK_ORDER preStepOrder, MNA_SUBCOMP_TASK_ORDER postStepOrder, Bool contributeToRightVector)
Add a new subcomponent implementing MNA methods.
void mnaCompAddPostStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes, Attribute< Matrix >::Ptr &leftVector) override
Add MNA post step dependencies.
virtual void initializeParentFromNodesAndTerminals(Real frequency)=0
CompositePowerComp(String name, Bool hasPreStep=true, Bool hasPostStep=true, Logger::Level logLevel=Logger::Level::off)
Basic constructor that takes name and log level and sets the UID to name as well.
std::shared_ptr< CompositePowerComp< VarType > > Ptr
virtual void mnaParentApplyRightSideVectorStamp(Matrix &rightVector)
const MNAInterface::List & mnaSubComponents() const noexcept
void initializeFromNodesAndTerminals(Real frequency) override final
virtual void mnaParentAddPreStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes)
void mnaCompApplySystemMatrixStamp(SparseMatrixRow &systemMatrix) override
Stamps system matrix.
virtual void mnaParentPostStep(Real time, Int timeStepCount, Attribute< Matrix >::Ptr &leftVector)
virtual void mnaParentInitialize(Real omega, Real timeStep, Attribute< Matrix >::Ptr leftVector)
void mnaCompPreStep(Real time, Int timeStepCount) override
MNA pre step operations.
void mnaCompApplyRightSideVectorStamp(Matrix &rightVector) override
Stamps right side (source) vector.
virtual ~CompositePowerComp()=default
Destructor - does not do anything.
virtual void mnaParentAddPostStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes, Attribute< Matrix >::Ptr &leftVector)
void mnaCompAddPreStepDependencies(AttributeBase::List &prevStepDependencies, AttributeBase::List &attributeDependencies, AttributeBase::List &modifiedAttributes) override
Add MNA pre step dependencies.
virtual void mnaParentPreStep(Real time, Int timeStepCount)
void mnaCompPostStep(Real time, Int timeStepCount, Attribute< Matrix >::Ptr &leftVector) override
MNA post step operations.
CompositePowerComp(String uid, String name, Bool hasPreStep, Bool hasPostStep, Logger::Level logLevel)
Basic constructor that takes UID, name and log level.
String uid()
Returns unique id.
spdlog::level::level_enum Level
MNASimPowerComp(String uid, String name, Bool hasPreStep, Bool hasPostStep, Logger::Level logLevel)
Basic constructor that takes UID, name and log level.
std::shared_ptr< SimPowerComp< VarType > > Ptr
Eigen::Matrix< Real, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > Matrix
Dense matrix for real numbers.
Eigen::SparseMatrix< Real, Eigen::RowMajor > SparseMatrixRow
Sparse matrix for real numbers (row major).