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

[Core] Fix Average Element size calculator for 2D9N #12301

Merged
merged 3 commits into from
Apr 29, 2024

Conversation

sunethwarna
Copy link
Member

@sunethwarna sunethwarna commented Apr 22, 2024

📝 Description
As mentioned in the title, this corrects the average length calculation of the Quad2D9N to be consistent with the linear computation.

closes #12300

🆕 Changelog

  • Fixes average legth computation of Quad2D9N

@sunethwarna sunethwarna requested a review from a team as a code owner April 22, 2024 12:00
@sunethwarna sunethwarna self-assigned this Apr 22, 2024
@sunethwarna sunethwarna added Bugfix Kratos Core FastPR This Pr is simple and / or has been already tested and the revision should be fast labels Apr 22, 2024
@jgonzalezusua
Copy link
Member

Thanks for the fix @sunethwarna. After passing the checks I will approve it.

@@ -867,7 +867,7 @@ double ElementSizeCalculator<2,4>::AverageElementSizeDerivative(
template<>
double ElementSizeCalculator<2,9>::AverageElementSize(const Geometry<Node >& rGeometry)
{
return rGeometry.Length();
return rGeometry.Length() * 2.0;
Copy link
Member

Choose a reason for hiding this comment

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

hm so thats a hack for the hack?
Can you add a comment? :D

Copy link
Member Author

Choose a reason for hiding this comment

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

done :)

Copy link
Member

@philbucher philbucher left a comment

Choose a reason for hiding this comment

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

also if this passes, it is missing a test

given that this is a bit hackish, can you please add a test?

@sunethwarna
Copy link
Member Author

I am planning to add tests for all the geometries :)

@jgonzalezusua
Copy link
Member

Will you add the tests in this PR or in future?

@sunethwarna
Copy link
Member Author

I will do it with the same PR, but not today. Would you be able to wait until this Friday?

@jgonzalezusua
Copy link
Member

Sure, we can wait.

@sunethwarna
Copy link
Member Author

Ok I have added the tests. @philbucher @jgonzalezusua :)

@sunethwarna sunethwarna requested a review from philbucher April 29, 2024 06:10
@sunethwarna sunethwarna merged commit 9705391 into master Apr 29, 2024
11 checks passed
@sunethwarna sunethwarna deleted the core/bugfix/element_size_calculator_2d9n branch April 29, 2024 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix FastPR This Pr is simple and / or has been already tested and the revision should be fast Kratos Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Element size for quadratic elements
3 participants