Skip to content
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

Introduce common base class MNASimPowerComp - deprecated #150

Closed
wants to merge 41 commits into from

Conversation

JTS22
Copy link
Contributor

@JTS22 JTS22 commented Dec 5, 2022

Unifies the behavior of all components that previously implemented MNAInterface by providing a common base class MNASimPowerComp<T>. This base class implements MNAInterface and all its methods in such a way, that common actions such as the creation and registration of the pre- and post-step tasks are done uniformly in the base class. The various mna... methods are replaced by a new set of mnaComp... methods that can be implemented by the child component classes to provide their own MNA behavior.

Based on #144

@JTS22 JTS22 marked this pull request as ready for review December 19, 2022 11:16
Signed-off-by: Jonas Schroeder <[email protected]>
Signed-off-by: Jonas Schroeder <[email protected]>
Signed-off-by: Jonas Schroeder <[email protected]>
Signed-off-by: Jonas Schroeder <[email protected]>
Signed-off-by: Jonas Schroeder <[email protected]>
Signed-off-by: Jonas Schroeder <[email protected]>
Signed-off-by: Jonas Schroeder <[email protected]>
Signed-off-by: Jonas Schroeder <[email protected]>
Signed-off-by: Jonas Schroeder <[email protected]>
Signed-off-by: Jonas Schroeder <[email protected]>
Signed-off-by: Jonas Schroeder <[email protected]>
Signed-off-by: Jonas Schroeder <[email protected]>
Signed-off-by: Jonas Schroeder <[email protected]>
@sonarcloud
Copy link

sonarcloud bot commented Dec 19, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 247 Code Smells

0.0% 0.0% Coverage
12.0% 12.0% Duplication

m-mirz added a commit that referenced this pull request Jan 22, 2023
Introduces two new base classes, MNASimPowerComp<T> and
CompositePowerComp<T>. For all composite components (as defined in
#131), MNASimPowerComp
provides default implementations for all methods in MNAInterface, as
well as default MnaPreStep and MnaPostStep tasks, such that MNAInterface
is only inherited once in the parent class and not in each component
individually. Additionally, CompositePowerComp provides mnaParent...
methods for most of the MNA methods in MNAInterface. Via the
addMNASubComponent method, a component can register subcomponents for
which the relevant MNA methods are called automatically by the
CompositePowerComp parent class. For each MNA method, the child
component class can decide to either override the normal mna... method
and provide subcomponent handling themselves, or override just the
mnaParent... method and let the subcomponents (and some other common
operations) get handled by the parent class methods.

While the MNASimPowerComp class is not used for any non-composite
components in this PR, the unification of MNA methods for these
components is covered in
#150 .

Based on #142
Related to #131
Rebase of #144
@m-mirz
Copy link
Contributor

m-mirz commented Jan 22, 2023

This one is a litte bit complicated to merge after #120. I am working on it in #178

@dinkelbachjan dinkelbachjan changed the title Introduce common base class MNASimPowerComp Introduce common base class MNASimPowerComp - deprecated Feb 21, 2023
dinkelbachjan added a commit that referenced this pull request Feb 21, 2023
Unifies the behavior of all components that previously implemented
MNAInterface by providing a common base class MNASimPowerComp<T>. This
base class implements MNAInterface and all its methods in such a way,
that common actions such as the creation and registration of the pre-
and post-step tasks are done uniformly in the base class. The various
mna... methods are replaced by a new set of mnaComp... methods that can
be implemented by the child component classes to provide their own MNA
behavior.

Based on #144

Rebase of #150
@dinkelbachjan
Copy link
Contributor

Closing, since this has been replaced by #178

m-mirz added a commit that referenced this pull request Feb 28, 2023
Documentation for subcomponents describes the behavior added in #141 
Documentation for mna components describes the behavior added in #150 

Closes #133 
Closes #135 
Closes #131
@dinkelbachjan dinkelbachjan deleted the mnasimpowercomp branch March 6, 2023 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants