Commit 32f4bc5d authored by Markus Mirz's avatar Markus Mirz
Browse files

fix mna solver call to comp initialize


Former-commit-id: f044648f
parent fff8e136
......@@ -114,9 +114,10 @@ void MnaSolver<Real>::initializeComponents() {
// This intialization according to power flow information is not MNA specific.
mSLog->info("-- Initialize components from power flow");
for (auto comp : mPowerComponents) {
auto pComp = std::dynamic_pointer_cast<PowerComponent<Real>>(comp);
auto pComp = std::dynamic_pointer_cast<PowerComponent<Complex>>(comp);
if (!pComp) continue;
pComp->initializeFromPowerflow(mSystem.mSystemFrequency);
pComp->initialize(mSystem.mFrequencies);
}
// Initialize signal components.
......@@ -146,10 +147,10 @@ void MnaSolver<Complex>::initializeComponents() {
// Initialize power components with frequencies and from powerflow results
for (auto comp : mPowerComponents) {
comp->initialize(mSystem.mFrequencies);
auto pComp = std::dynamic_pointer_cast<PowerComponent<Complex>>(comp);
if (!pComp) continue;
pComp->initializeFromPowerflow(mSystem.mSystemFrequency);
pComp->initialize(mSystem.mFrequencies);
}
// Initialize signal components.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment