Commit 05d99aa2 authored by Georg Martin Reinke's avatar Georg Martin Reinke
Browse files

fix ideal current source

parent ae0acde0
......@@ -8,10 +8,14 @@ CurrentSource::CurrentSource(std::string name, int src, int dest, double current
};
void CurrentSource::applyRightSideVectorStamp(SystemModel& system) {
if (mNode1 != 0) {
if (mNode1 >= 0) {
system.addCompToRightSideVector(mNode1, currentr, currenti);
}
if (mNode2 != 0) {
if (mNode2 >= 0) {
system.addCompToRightSideVector(mNode2, -currentr, -currenti);
}
};
}
void CurrentSource::step(SystemModel& system, Real time) {
this->applyRightSideVectorStamp(system);
}
......@@ -17,8 +17,8 @@ namespace DPsim {
void init(Real om, Real dt) { }
void applySystemMatrixStamp(SystemModel& system) { }
void applyRightSideVectorStamp(SystemModel& system);
void step(SystemModel& system, Real time) { }
void step(SystemModel& system, Real time);
void postStep(SystemModel& system) { }
};
}
#endif
\ No newline at end of file
#endif
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