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

[SMApp] Minor hotfixes in the Base solid element #13015

Merged
merged 3 commits into from
Jan 17, 2025

Conversation

AlejandroCornejo
Copy link
Member

Basically defaulting to null the components of the output in the CalculateOnIntgerationPoints. Currently, if the CL does not return the value, the output are random values, not 0.

@AlejandroCornejo AlejandroCornejo requested a review from a team as a code owner January 17, 2025 08:56
@AlejandroCornejo AlejandroCornejo self-assigned this Jan 17, 2025
@AlejandroCornejo AlejandroCornejo added the FastPR This Pr is simple and / or has been already tested and the revision should be fast label Jan 17, 2025
@@ -747,6 +747,7 @@ void BaseSolidElement::CalculateOnIntegrationPoints(

if ( rOutput.size() != number_of_integration_points )
rOutput.resize( number_of_integration_points, false );
rOutput.assign(number_of_integration_points, 0.0);
Copy link
Member

Choose a reason for hiding this comment

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

?, when you do resize does not assign the value you give?

Copy link
Member

Choose a reason for hiding this comment

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

Otherwise maybe remove the false

Copy link
Member Author

Choose a reason for hiding this comment

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

apparently not. Currently you get random numbers in the posts

Copy link
Member

Choose a reason for hiding this comment

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

Okay I just checked, the resize only assigns value to the new elements

Copy link
Member Author

Choose a reason for hiding this comment

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

Just for you to have an example. If I have 2 materials (elastic and damage) and I want to print DAMAGE, the elastic zone plots random values :S

Copy link
Member

Choose a reason for hiding this comment

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

I would remove the false is misleading

Copy link
Member

Choose a reason for hiding this comment

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

Just noting that false is to say that previous values are not kept when resizing but doesn't call the initializer of the stored type.

@@ -747,6 +747,7 @@ void BaseSolidElement::CalculateOnIntegrationPoints(

if ( rOutput.size() != number_of_integration_points )
rOutput.resize( number_of_integration_points, false );
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
rOutput.resize( number_of_integration_points, false );
rOutput.resize( number_of_integration_points);

Or 0.0 or simply remove it if we do assign later

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, the assing not only puts values but also resizes. I remove the resize

@AlejandroCornejo AlejandroCornejo merged commit 90e1804 into master Jan 17, 2025
11 checks passed
@AlejandroCornejo AlejandroCornejo deleted the hotfix-base-solid-element branch January 17, 2025 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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