-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eigenvalues #262
base: master
Are you sure you want to change the base?
Eigenvalues #262
Conversation
f4fc990
to
c3b062e
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs 0.0% Coverage The version of Java (11.0.14.1) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
93f004e
to
ffe67b6
Compare
4f0d47e
to
a40b53d
Compare
049ad09
to
4a0966b
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@georgii-tishenin Why do you have the two different classes EigenvalueCompInterface
and EigenvalueDynamicCompInterface
. Could these classes be merged?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@georgii-tishenin I think the parameter mBranchIdx
could be part of the class EigenvalueCompInterface
or EigenvalueDynamicCompInterface
because this parameter is a specific parameter of the eigenvalue extraction interface
Hey @martinmoraga,
There are dynamic components, like inductor or capacitor, and non-dynamic components, like resistor, switch or voltage source.
Yes, @dinkelbachjan actually had a similar comment. This is what I replied:
So, if you guys insist, I can do it. But personally I would prefer keeping the interface without data members. |
yes, I know what you mean but C++ doesn't have interfaces "enforced by the language", so I my opinion you can define these classes like normal class definition without any special rules. Another option is to move this variable (and his setter) to |
Regarding the classes
It is only an idea to avoid having different interfaces for one "solver"... what do you think about that? |
dpsim-models/src/MathUtils.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have a macro defining the "tolerance" to compare doubles.
dpsim/dpsim/include/dpsim/Definitions.h
Line 14 in 0f4d17c
#define DOUBLE_EPSILON 1E-12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice to know, will use it👍
you could add to the docu which components are supported by the eigenvalue extraction "solver" |
yes, that makes sense👍. Will add that. |
I personally like the 2nd option you propose better: to move the variable |
Thanks for the idea! I think these two options are equivalent, I sort of like the option with |
5201d7f
to
ff4b7d9
Compare
Quality Gate passedIssues Measures |
class EigenvalueCompInterface { | ||
public: | ||
using Ptr = std::shared_ptr<EigenvalueCompInterface>; | ||
using List = std::vector<Ptr>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done in the other component interfaces as well, but generally I think it is better to be explicit about data types. It might not be clear that EigenvalueCompInterface::List is a vector of shared pointers of exactly the class the type was defined in.
It might be hard to understand since EigenvalueCompInterface::List could be any "list"-type containing anything within the interface class. However, once you do know what it means and use it often it may improve readability. I still vote against it though personally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for your feedback! I agree with your arguments. In this particular case even the actual type would not read too bad std::vector<std::shared_ptr<EigenvalueCompInterface>>
. However, if there were no aliases at all, codebase in general would become less readable. So, for now let's just keep consistent with the other component interfaces.
a63c480
to
7aea9ad
Compare
Quality Gate passedIssues Measures |
@georgii-tishenin I also prefer interface classes without member variables. One issue that we have in dpsim is a deep inheritance hierarchy, each hierarchy level adding new member variables. |
@m-mirz, thanks for your feedback! I will keep interfaces without member variables. |
Signed-off-by: Georgii Tishenin <georgii.tishenin@eonerc.rwth-aachen.de>
Signed-off-by: Georgii Tishenin <georgii.tishenin@eonerc.rwth-aachen.de>
… source Signed-off-by: Georgii Tishenin <georgii.tishenin@eonerc.rwth-aachen.de>
Signed-off-by: Georgii Tishenin <georgii.tishenin@eonerc.rwth-aachen.de>
Signed-off-by: Georgii Tishenin <georgii.tishenin@eonerc.rwth-aachen.de>
Signed-off-by: Georgii Tishenin <georgii.tishenin@eonerc.rwth-aachen.de>
Signed-off-by: Georgii Tishenin <georgii.tishenin@eonerc.rwth-aachen.de>
Signed-off-by: Georgii Tishenin <georgii.tishenin@eonerc.rwth-aachen.de>
override specifier was removed by accident Signed-off-by: Georgii Tishenin <georgii.tishenin@eonerc.rwth-aachen.de>
…unctions There is no intention that they can be further overriden in derived classes Signed-off-by: Georgii Tishenin <georgii.tishenin@eonerc.rwth-aachen.de>
…d switch Signed-off-by: Georgii Tishenin <georgii.tishenin@eonerc.rwth-aachen.de>
Signed-off-by: Georgii Tishenin <georgii.tishenin@eonerc.rwth-aachen.de>
Signed-off-by: Georgii Tishenin <georgii.tishenin@eonerc.rwth-aachen.de>
fa77a69
to
bf1fd55
Compare
Quality Gate passedIssues Measures |
This is a pull request for the first prototype of eigenvalue extraction. The prototype supports eigenvalue extraction at every time step in EMT and DP domains for topologies containing single-phase R, L, C elements, switches and voltage sources.