-
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 commentThe 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 commentThe 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 commentThe 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 commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Just noting that |
||
|
||
if (mConstitutiveLawVector[0]->Has( rVariable)) { | ||
GetValueOnConstitutiveLaw(rVariable, rOutput); | ||
|
@@ -827,7 +828,7 @@ void BaseSolidElement::CalculateOnIntegrationPoints( | |
detJ = r_geometry.DeterminantOfJacobian(detJ); | ||
} else { | ||
for (IndexType point_number = 0; point_number < number_of_integration_points; ++point_number) { | ||
detJ[point_number] = r_geometry.DeterminantOfJacobian(integration_points[point_number]); | ||
detJ[point_number] = r_geometry.DeterminantOfJacobian(integration_points[point_number]); | ||
} | ||
} | ||
|
||
|
@@ -937,6 +938,7 @@ void BaseSolidElement::CalculateOnIntegrationPoints( | |
const SizeType number_of_integration_points = integration_points.size(); | ||
if ( rOutput.size() != number_of_integration_points ) | ||
rOutput.resize( number_of_integration_points ); | ||
rOutput.assign(number_of_integration_points, array_1d<double, 3>(3, 0.0)); | ||
|
||
const auto& r_geom = GetGeometry(); | ||
const SizeType number_of_nodes = r_geom.size(); | ||
|
@@ -986,6 +988,7 @@ void BaseSolidElement::CalculateOnIntegrationPoints( | |
const SizeType number_of_integration_points = integration_points.size(); | ||
if (rOutput.size() != number_of_integration_points) | ||
rOutput.resize(number_of_integration_points); | ||
rOutput.assign(number_of_integration_points, array_1d<double, 6>(6, 0.0)); | ||
|
||
if (mConstitutiveLawVector[0]->Has( rVariable)) { | ||
GetValueOnConstitutiveLaw(rVariable, rOutput); | ||
|
@@ -1012,6 +1015,7 @@ void BaseSolidElement::CalculateOnIntegrationPoints( | |
const SizeType number_of_integration_points = integration_points.size(); | ||
if ( rOutput.size() != number_of_integration_points ) | ||
rOutput.resize( number_of_integration_points ); | ||
rOutput.assign(number_of_integration_points, ZeroVector(strain_size)); | ||
|
||
if (mConstitutiveLawVector[0]->Has( rVariable)) { | ||
GetValueOnConstitutiveLaw(rVariable, rOutput); | ||
|
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.
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