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

mStrainSize and mSpaceDimension by nature are positive integer types #11784

Merged
merged 2 commits into from
Nov 10, 2023

Conversation

WPK4FEM
Copy link
Contributor

@WPK4FEM WPK4FEM commented Nov 9, 2023

Constitutive laws generally should use kratos/includes/constitutive_law.h . Its member variables mStrainSize and mSpaceDimension are currently double, this PR changes them to SizeType.
That should avoid unnatural type conversions in the places where constitutive_law.h is used. E.g. see applications\StructuralMechanicsApplication\custom_response_functions\adjoint_elements\adjoint_finite_difference_small_displacement_element.cpp at line 168.

…pe in add_constitutive_law_to_python.cpp. Repetition of GetStrainSize removed.
@WPK4FEM WPK4FEM added Cleanup FastPR This Pr is simple and / or has been already tested and the revision should be fast labels Nov 9, 2023
@WPK4FEM WPK4FEM requested a review from avdg81 November 9, 2023 13:16
@WPK4FEM WPK4FEM self-assigned this Nov 9, 2023
@WPK4FEM WPK4FEM requested a review from a team as a code owner November 9, 2023 13:16
Copy link
Contributor

@avdg81 avdg81 left a comment

Choose a reason for hiding this comment

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

Nice improvement Wijtze Pieter!

@WPK4FEM WPK4FEM merged commit f249619 into master Nov 10, 2023
10 of 11 checks passed
@WPK4FEM WPK4FEM deleted the geo/request_SizeType_for_Size_and_Dimension branch November 10, 2023 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup FastPR This Pr is simple and / or has been already tested and the revision should be fast
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants