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

[GeoMechanicsApplication] Avoid hiding of overloaded virtual members #12849

Merged
merged 28 commits into from
Nov 14, 2024

Conversation

avdg81
Copy link
Contributor

@avdg81 avdg81 commented Nov 14, 2024

📝 Description

SonarQube has found a significant number of code smells related to hiding of overloaded virtual members. This PR adds overloads of members Create where needed. In other places, using statements were sufficient to overcome the issues.

…fOrderCondition`

Also reformatted three unrelated files.
@avdg81 avdg81 added Cleanup GeoMechanics Issues related to the GeoMechanicsApplication labels Nov 14, 2024
@avdg81 avdg81 self-assigned this Nov 14, 2024
Copy link
Contributor

@WPK4FEM WPK4FEM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks consistent.
Please explain to me why for U_Pw_condition.cpp this->create is used and for the others just create.

Comment on lines 123 to +124
bool& GetValue(const Variable<bool>& rThisVariable, bool& rValue) override;
using LinearElastic2DInterfaceLaw::GetValue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is a candidate for using a plane strain and a 3D stress state.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact, we may want to look into the differences with the recently introduced class GeoIncrementalLinearElasticInterfaceLaw, and discuss whether we'd still like to keep this class or replace it by the new one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. These should disappear when we remove the interface elements that derive from planes i.s.o. 2 lines and volumes i.s.o. 2 planes. They use continuum material properties ( E, nu ) i.s.o. distributed stiffnesses that are natural for interfaces.

@avdg81
Copy link
Contributor Author

avdg81 commented Nov 14, 2024

Looks consistent. Please explain to me why for U_Pw_condition.cpp this->create is used and for the others just create.

Thank you for the code review. I hope that my explanation (see below) is clear enough. If not, feel free to ask for clarification.

Copy link
Contributor

@markelov208 markelov208 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Anne, many thanks that you spent your time on this work which looks stupid on the first glance only.
I copied your explanation on this-> in my notes. ;)

@avdg81 avdg81 merged commit 25bfe54 into master Nov 14, 2024
11 checks passed
@avdg81 avdg81 deleted the geo/avoid-hiding-of-virtual-members branch November 14, 2024 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup GeoMechanics Issues related to the GeoMechanicsApplication
Development

Successfully merging this pull request may close these issues.

3 participants