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
5be5b051
Commit
5be5b051
authored
May 15, 2017
by
Georg Martin Reinke
Browse files
adjust getCurrent implementations
parent
1a8b90a6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Source/Components/BaseComponent.h
View file @
5be5b051
...
@@ -59,7 +59,11 @@ namespace DPsim {
...
@@ -59,7 +59,11 @@ namespace DPsim {
virtual
void
postStep
(
SystemModel
&
system
)
{
}
virtual
void
postStep
(
SystemModel
&
system
)
{
}
/// Return the current flowing through this component in the previous timestep
/// Return the current flowing through this component in the previous timestep
virtual
Complex
getCurrent
(
SystemModel
&
system
)
{
}
virtual
Complex
getCurrent
(
SystemModel
&
system
)
{
std
::
cerr
<<
"getCurrent implementation missing"
<<
std
::
endl
;
std
::
exit
(
1
);
return
Complex
(
0
,
0
);
}
};
};
}
}
...
...
Source/Components/CurrentSource.cpp
View file @
5be5b051
...
@@ -19,7 +19,3 @@ void CurrentSource::applyRightSideVectorStamp(SystemModel& system) {
...
@@ -19,7 +19,3 @@ void CurrentSource::applyRightSideVectorStamp(SystemModel& system) {
void
CurrentSource
::
step
(
SystemModel
&
system
,
Real
time
)
{
void
CurrentSource
::
step
(
SystemModel
&
system
,
Real
time
)
{
this
->
applyRightSideVectorStamp
(
system
);
this
->
applyRightSideVectorStamp
(
system
);
}
}
Complex
CurrentSource
::
getCurrent
(
SystemModel
&
system
)
{
return
Complex
(
currentr
,
currenti
);
}
Source/Components/CurrentSource.h
View file @
5be5b051
...
@@ -19,7 +19,6 @@ namespace DPsim {
...
@@ -19,7 +19,6 @@ namespace DPsim {
void
applyRightSideVectorStamp
(
SystemModel
&
system
);
void
applyRightSideVectorStamp
(
SystemModel
&
system
);
void
step
(
SystemModel
&
system
,
Real
time
);
void
step
(
SystemModel
&
system
,
Real
time
);
void
postStep
(
SystemModel
&
system
)
{
}
void
postStep
(
SystemModel
&
system
)
{
}
virtual
Complex
getCurrent
(
SystemModel
&
system
);
};
};
}
}
#endif
#endif
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