Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ACS
Public
Power System Simulation and Optimization
DPsim
DPsim
Commits
115d5f09
Commit
115d5f09
authored
May 15, 2017
by
Georg Martin Reinke
Browse files
remove old functions for current calculation
parent
5be5b051
Changes
2
Hide whitespace changes
Inline
Side-by-side
Source/SystemModel.cpp
View file @
115d5f09
...
...
@@ -67,35 +67,3 @@ void SystemModel::switchSystemMatrix(Int systemMatrixIndex) {
void
SystemModel
::
setRightSideVectorToZero
()
{
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
);
}
Source/SystemModel.h
View file @
115d5f09
...
...
@@ -75,10 +75,6 @@ namespace DPsim {
void
addRealToRightSideVector
(
Int
row
,
Real
value
);
void
setRightSideVectorToZero
();
void
resetCurrents
();
void
addCurrent
(
Int
node1
,
Int
node2
,
Complex
value
);
Complex
getCurrent
(
Int
node1
,
Int
node2
);
void
solve
();
};
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment