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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #889 +/- ##
=======================================
Coverage 93.30% 93.30%
=======================================
Files 36 36
Lines 5257 5257
=======================================
Hits 4905 4905
Misses 352 352 ☔ 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...
@@ -86,7 +86,7 @@ In this space a local numbering of nodes and faces exists, i.e. | |||
The example shows a local face ID ordering, defined as: | |||
|
|||
```julia | |||
faces(::Lagrange{2,RefCube,1}) = ((1,2), (2,3), (3,4), (4,1)) | |||
faces(::Lagrange{RefQuadrilateral,1}) = ((1,2), (2,3), (3,4), (4,1)) | |||
``` | |||
|
|||
Other face ID definitions [can be found in the src files](https://github.com/Ferrite-FEM/Ferrite.jl/blob/8224282ab4d67cb523ef342e4a6ceb1716764ada/src/interpolations.jl#L154) in the corresponding `faces` dispatch. |
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.
Sidenote: Should this really point to a specific commit? (The current one points to a commit made 5 years ago...)
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.
No, but we do not have docs for these yet. #689 maybe? Also, this doc must be specified further. I just remembered that faces
does not exist anymore for interpolations (and that this doc string was a bit misleading in first place).
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.
faces
does not exist anymore for interpolations
What do you mean? On master e.g. Ferrite.faces(Lagrange{RefQuadrilateral,1}())
works fine?
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.
It is really tricky with those deprecations since we don't see anything unless running tests (or explicitly asking for depwarn) - since many users will just run scripts, would it perhaps be better to give an explicit warning?
Sorry for spamming this PR, but just to save the idea in case this could be a valuable pattern, what about
function foo(::AbstractFloat)
println("Allowed")
end
@generated function foo(v::Integer)
@warn "Calling foo(::Integer) is deprecated"
return :(println("Was allowed before"))
end
Giving
julia> foo(1.)
Allowed
julia> foo(1)
┌ Warning: Calling foo(::Integer) is deprecated
└ @ Main REPL[11]:2
Was allowed before
julia> foo(1)
Was allowed before
CC @fredrikekre
Co-authored-by: Knut Andreas Meyer <knutam@gmail.com>
No description provided.