-
Notifications
You must be signed in to change notification settings - Fork 248
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
Conversation
@@ -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); |
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.
?, when you do resize does not assign the value you give?
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.
Otherwise maybe remove the false
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.
apparently not. Currently you get random numbers in the posts
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.
Okay I just checked, the resize only assigns value to the new elements
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.
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
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.
I would remove the false is misleading
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.
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 ); |
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.
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
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.
yes, the assing not only puts values but also resizes. I remove the resize
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.