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

Fix Quadrature rule docs and syms #1007

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Conversation

termi-official
Copy link
Member

Following the discussion in #1001 I just noticed that some references for the quadrature roles and the doc strings were not correct. This PR fixes both.

Copy link
Member

@KnutAM KnutAM left a comment

Choose a reason for hiding this comment

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

Nice that you found this!

Since we probably don't want to change the defaults in the future, are these reasonable defaults? Seems strange to switch at order = 8?

(Side-note: Also looks like dispatching on a type would be nicer as @fredrikekre suggested, but that would be a different PR)

src/Quadrature/quadrature.jl Outdated Show resolved Hide resolved
src/Quadrature/quadrature.jl Outdated Show resolved Hide resolved
@termi-official
Copy link
Member Author

Nice that you found this!

Thanks, took me a while to realize too tbh.

Since we probably don't want to change the defaults in the future, are these reasonable defaults? Seems strange to switch at order = 8?

Actually I am really not sure about the rule or why it works in the in first place, because it comes with negative weights. I am pretty sure this can cause some trouble, but I cannot pin down why. See e.g. https://www.math.ntnu.no/emner/TMA4130/2021h/lectures/GaussQuadrature.pdf . But on the other hand rules with positive weights have more points in general.

(Side-note: Also looks like dispatching on a type would be nicer as @fredrikekre suggested, but that would be a different PR)

I am not super sure about this. I think it would also be nice to provide extensions which add new quadrature rules.

Copy link

codecov bot commented Jul 1, 2024

Codecov Report

Attention: Patch coverage is 94.25287% with 5 lines in your changes missing coverage. Please review.

Project coverage is 93.23%. Comparing base (2c8b751) to head (c029106).

Files Patch % Lines
src/Quadrature/gaussquad_tet_table.jl 91.66% 4 Missing ⚠️
src/Quadrature/gaussquad_tri_table.jl 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1007      +/-   ##
==========================================
+ Coverage   93.20%   93.23%   +0.02%     
==========================================
  Files          38       38              
  Lines        5816     5879      +63     
==========================================
+ Hits         5421     5481      +60     
- Misses        395      398       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fredrikekre
Copy link
Member

The triangle ones are from #514 (comment) (unless you found it already).

@termi-official
Copy link
Member Author

The triangle ones are from #514 (comment) (unless you found it already).

Yes, and going into the basics source code tracking down the call graph manually I arrived at a call to Gauss-Jacobi generators.

@termi-official termi-official marked this pull request as draft July 2, 2024 10:50
@termi-official termi-official marked this pull request as ready for review July 2, 2024 11:58
@termi-official
Copy link
Member Author

Someone should verify this independently and then it should be good to go.

@termi-official termi-official added the awaiting review PR is finished from the authors POV, waiting for feedback label Jul 2, 2024
Comment on lines +181 to +182
It defaults to the default rules for the individual face reference elements. Elements with mixed facet types
requires passing a tuple of symbols for the rule, one for each facet type.
Copy link
Member

Choose a reason for hiding this comment

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

The ordering of the quad_rule_type is not clear/obvious here. I'm not sure if we want to introduce this as public API now?

Would it be better (at least for now), to rather say that if you want non-default rules, you need to pass the face_rules manually?

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed. I also struggle a bit with the wording in the docstring. It is essentially implemented as "first triangle, then quad" in the sense of "increasing size".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review PR is finished from the authors POV, waiting for feedback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants