-
Notifications
You must be signed in to change notification settings - Fork 83
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
Update some missing Lagrange docs #889
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #889 +/- ##
==========================================
- Coverage 93.69% 93.30% -0.39%
==========================================
Files 36 36
Lines 5438 5440 +2
==========================================
- Hits 5095 5076 -19
- Misses 343 364 +21 ☔ View full report in Codecov by Sentry. |
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.
Nice!
Just some formatting fix suggestions while we are at it...
Co-authored-by: Knut Andreas Meyer <knutam@gmail.com>
I noticed that on master some things can be now done in a better way (i.e. without relying on assumptions taken between the interpolation and cell) so I updated it. Also some dispatches were missing, which I added for completeness of the API. |
I just saw that #935 has quite a bit of overlap here, so we need to decide on a merge order. |
CI failure seems to be the github CDN or CI servers choking
|
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.
LGTM if if removing changes in grid.md as discussed on Slack, and fixes the comments
|
||
Each `AbstractCell` type has a unique geometric interpolation describing its geometry. | ||
This function returns that interpolation. | ||
""" | ||
geometric_interpolation(::AbstractCell) | ||
geometric_interpolation(::T) where T <: AbstractCell = geometric_interpolation(T) |
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.
Missing test
Please note that if your cell holds a single tuple called `nodes` to carry the node numbers, then | ||
this method will work automatically. Almost all functions work automatically with the information | ||
provided by the reference element. |
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.
Already mentioned in the docstring
Please note that if your cell holds a single tuple called `nodes` to carry the node numbers, then | |
this method will work automatically. Almost all functions work automatically with the information | |
provided by the reference element. |
Please note that if you want to implement a custom element which does not have a reference shape, | ||
then the relevant functions below need to be dispatched. |
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 don't think this is possible, AbstractCell{RT}
requires RT<:AbstractRefShape
?
Please note that if you want to implement a custom element which does not have a reference shape, | |
then the relevant functions below need to be dispatched. |
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.
struct MyFancyDynamicCell
nodes::Vector{Int}
end
?
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.
But that won't fit in the grid which requires
struct MyFancyDynamicCell <: AbstractCell{RefShape}
nodes::Vector{Int}
end
?
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.
And I guess lot of the codebase assumes that the refshape can be determined only by the type, so not sure how an arbitrary polygon element would work. Do we already have an issue for this? Otherwise, that would be good.
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.
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.
But I would leave this issue for later, as it does not have any priority for me.
@inline reference_faces(::AbstractCell{refshape}) where refshape = reference_faces(refshape) | ||
@inline reference_edges(::AbstractCell{refshape}) where refshape = reference_edges(refshape) | ||
@inline reference_vertices(::AbstractCell{refshape}) where refshape = reference_vertices(refshape) |
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.
Use here?
@inline reference_faces(::AbstractCell{refshape}) where refshape = reference_faces(refshape) | ||
@inline reference_edges(::AbstractCell{refshape}) where refshape = reference_edges(refshape) | ||
@inline reference_vertices(::AbstractCell{refshape}) where refshape = reference_vertices(refshape) | ||
@inline reference_facets(::AbstractCell{refshape}) where refshape = reference_facets(refshape) |
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.
Missing test
No description provided.