Skip to content

Commit

Permalink
Add override specifiers for functions overriden in DP Ph1 resistor an…
Browse files Browse the repository at this point in the history
…d switch

Signed-off-by: Georgii Tishenin <georgii.tishenin@eonerc.rwth-aachen.de>
  • Loading branch information
georgii-tishenin committed Jun 23, 2024
1 parent 7c90b45 commit 7aea9ad
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
24 changes: 12 additions & 12 deletions dpsim-models/include/dpsim-models/DP/DP_Ph1_Resistor.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,37 +32,37 @@ class Resistor : public MNASimPowerComp<Complex>,
Resistor(String name, Logger::Level logLevel = Logger::Level::off)
: Resistor(name, name, logLevel) {}

SimPowerComp<Complex>::Ptr clone(String name);
SimPowerComp<Complex>::Ptr clone(String name) override;

// #### General ####
/// Initializes component from power flow data
void initializeFromNodesAndTerminals(Real frequency);
void initializeFromNodesAndTerminals(Real frequency) override;

// #### MNA section ####
void mnaCompInitialize(Real omega, Real timeStep,
Attribute<Matrix>::Ptr leftVector);
Attribute<Matrix>::Ptr leftVector) override;
void mnaCompInitializeHarm(Real omega, Real timeStep,
std::vector<Attribute<Matrix>::Ptr> leftVector);
std::vector<Attribute<Matrix>::Ptr> leftVector) override;
/// Stamps system matrix
void mnaCompApplySystemMatrixStamp(SparseMatrixRow &systemMatrix);
void mnaCompApplySystemMatrixStamp(SparseMatrixRow &systemMatrix) override;
/// Stamps system matrix considering the frequency index
void mnaCompApplySystemMatrixStampHarm(SparseMatrixRow &systemMatrix,
Int freqIdx);
Int freqIdx) override;
/// Update interface voltage from MNA system result
void mnaCompUpdateVoltage(const Matrix &leftVector);
void mnaCompUpdateVoltage(const Matrix &leftVector) override;
void mnaCompUpdateVoltageHarm(const Matrix &leftVector, Int freqIdx);
/// Update interface current from MNA system result
void mnaCompUpdateCurrent(const Matrix &leftVector);
void mnaCompUpdateCurrent(const Matrix &leftVector) override;
void mnaCompUpdateCurrentHarm();
/// MNA pre and post step operations
void mnaCompPostStep(Real time, Int timeStepCount,
Attribute<Matrix>::Ptr &leftVector);
Attribute<Matrix>::Ptr &leftVector) override;
/// add MNA pre and post step dependencies
void
mnaCompAddPostStepDependencies(AttributeBase::List &prevStepDependencies,
AttributeBase::List &attributeDependencies,
AttributeBase::List &modifiedAttributes,
Attribute<Matrix>::Ptr &leftVector);
Attribute<Matrix>::Ptr &leftVector) override;

class MnaPostStepHarm : public Task {
public:
Expand All @@ -88,9 +88,9 @@ class Resistor : public MNASimPowerComp<Complex>,
// #### DAE Section ####
///Residual Function for DAE Solver
void daeResidual(double ttime, const double state[], const double dstate_dt[],
double resid[], std::vector<int> &off);
double resid[], std::vector<int> &off) override;
///Voltage Getter
Complex daeInitialize();
Complex daeInitialize() override;

// #### Implementation of eigenvalue component interface ####
void stampBranchNodeIncidenceMatrix(Matrix &branchNodeIncidenceMatrix) final;
Expand Down
22 changes: 11 additions & 11 deletions dpsim-models/include/dpsim-models/DP/DP_Ph1_Switch.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,40 +36,40 @@ class Switch : public MNASimPowerComp<Complex>,
Switch(String name, Logger::Level logLevel = Logger::Level::off)
: Switch(name, name, logLevel) {}

SimPowerComp<Complex>::Ptr clone(String name);
SimPowerComp<Complex>::Ptr clone(String name) override;

// #### General ####
/// Initializes component from power flow data
void initializeFromNodesAndTerminals(Real frequency);
void initializeFromNodesAndTerminals(Real frequency) override;

// #### General MNA section ####
void mnaCompInitialize(Real omega, Real timeStep,
Attribute<Matrix>::Ptr leftVector);
Attribute<Matrix>::Ptr leftVector) override;
/// Stamps system matrix
void mnaCompApplySystemMatrixStamp(SparseMatrixRow &systemMatrix);
void mnaCompApplySystemMatrixStamp(SparseMatrixRow &systemMatrix) override;
/// Stamps right side (source) vector
void mnaCompApplyRightSideVectorStamp(Matrix &rightVector);
void mnaCompApplyRightSideVectorStamp(Matrix &rightVector) override;
/// Update interface voltage from MNA system result
void mnaCompUpdateVoltage(const Matrix &leftVector);
void mnaCompUpdateVoltage(const Matrix &leftVector) override;
/// Update interface current from MNA system result
void mnaCompUpdateCurrent(const Matrix &leftVector);
void mnaCompUpdateCurrent(const Matrix &leftVector) override;
/// MNA post step operations
void mnaCompPostStep(Real time, Int timeStepCount,
Attribute<Matrix>::Ptr &leftVector);
Attribute<Matrix>::Ptr &leftVector) override;
/// Add MNA post step dependencies
void
mnaCompAddPostStepDependencies(AttributeBase::List &prevStepDependencies,
AttributeBase::List &attributeDependencies,
AttributeBase::List &modifiedAttributes,
Attribute<Matrix>::Ptr &leftVector);
Attribute<Matrix>::Ptr &leftVector) override;

// #### MNA section for switch ####
/// Check if switch is closed
Bool mnaIsClosed();
Bool mnaIsClosed() override;
/// Stamps system matrix considering the defined switch position
void mnaCompApplySwitchSystemMatrixStamp(Bool closed,
SparseMatrixRow &systemMatrix,
Int freqIdx);
Int freqIdx) override;

// #### Implementation of eigenvalue component interface ####
void stampBranchNodeIncidenceMatrix(Matrix &branchNodeIncidenceMatrix) final;
Expand Down

0 comments on commit 7aea9ad

Please sign in to comment.