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

Update some missing Lagrange docs #889

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

termi-official
Copy link
Member

No description provided.

Copy link

codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.30%. Comparing base (f6a7d3d) to head (b19fad7).

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.
📢 Have feedback on the report? Share it here.

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!
Just some formatting fix suggestions while we are at it...

docs/src/topics/degrees_of_freedom.md Outdated Show resolved Hide resolved
docs/src/topics/degrees_of_freedom.md Outdated Show resolved Hide resolved
docs/src/topics/grid.md Outdated Show resolved Hide resolved
@@ -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.
Copy link
Member

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...)

Copy link
Member Author

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).

Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

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>
@termi-official termi-official marked this pull request as draft March 4, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants