Commit 115d5f09 authored by Georg Martin Reinke's avatar Georg Martin Reinke
Browse files

remove old functions for current calculation

parent 5be5b051
...@@ -67,35 +67,3 @@ void SystemModel::switchSystemMatrix(Int systemMatrixIndex) { ...@@ -67,35 +67,3 @@ void SystemModel::switchSystemMatrix(Int systemMatrixIndex) {
void SystemModel::setRightSideVectorToZero() { void SystemModel::setRightSideVectorToZero() {
mRightSideVector.setZero(); mRightSideVector.setZero();
} }
void SystemModel::resetCurrents() {
mCurrentMatrix.setZero();
}
void SystemModel::addCurrent(Int node1, Int node2, Complex value) {
if (node1 >= 0) {
if (node2 >= 0) {
mCurrentMatrix.coeffRef(node1, node2) += value;
mCurrentMatrix.coeffRef(node2, node1) -= value;
} else {
mCurrentMatrix.coeffRef(node1, node1) += value;
}
} else if (node2 >= 0) {
mCurrentMatrix.coeffRef(node2, node2) -= value;
}
}
Complex SystemModel::getCurrent(Int node1, Int node2) {
if (node1 >= 0) {
if (node2 >= 0) {
return mCurrentMatrix.coeffRef(node1, node2);
}
return mCurrentMatrix.coeffRef(node1, node1);
}
else if (node2 >= 0) {
return -mCurrentMatrix.coeffRef(node2, node2);
}
// shouldn't happen, but return a sensible value anyway
return Complex(0, 0);
}
...@@ -75,10 +75,6 @@ namespace DPsim { ...@@ -75,10 +75,6 @@ namespace DPsim {
void addRealToRightSideVector(Int row, Real value); void addRealToRightSideVector(Int row, Real value);
void setRightSideVectorToZero(); void setRightSideVectorToZero();
void resetCurrents();
void addCurrent(Int node1, Int node2, Complex value);
Complex getCurrent(Int node1, Int node2);
void solve(); void solve();
}; };
} }
......
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