-
Notifications
You must be signed in to change notification settings - Fork 92
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
Increase visibility on mismatch between dof ordering and node ordering #875
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #875 +/- ##
=======================================
Coverage 93.27% 93.27%
=======================================
Files 36 36
Lines 5235 5235
=======================================
Hits 4883 4883
Misses 352 352 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Maximilian Köhler <maximilian.koehler@ruhr-uni-bochum.de>
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!
Some suggestions.
An alternative (or additional) solution if we have more of these questions could be to have a FAQ page that we can refer to.
…FEM/Ferrite.jl into do/sprincle-docs-dofs-numbering
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.
Took a second look at this, I think it makes sense to give a brief overview of the visualization options at the beginning of this how-to, before covering the details.
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.
Suggestion for the beginning of this file
# # [Post processing and visualization](@id howto-postprocessing)
# After running a simulation, we usually want to visualize the results in different ways.
# Ferrite.jl provides several tools to facilitate such tasks, and direct visualization of
# solutions, cell data, and more by using the builtin vtk export or
# our `Makie.jl`-based visualization tool `FerriteViz.jl`.
# Note that if these tools don't suit your needs, and you want to create your own
# visualization, the node numbers do not match the degrees of freedom numbering.
# You can use [`evaluate_at_grid_nodes`](@ref) to get the solution at the nodes.
#
# This how-to demonstrates
# * The basic vtk export functionality
# * The `L2Projector` for projecting quadrature point data to the FE interpolations
# * The `PointEvalHandler` to evaluate this projection at user-defined points in the grid.
#
# The results from the heat equation tutorial are used as a basis for this demonstration.
And then skip the two first sentences after introduction.
Also update the vtk block to the new syntax, and I think we should add the primary solution as well to the output.
#md # ## What next? | ||
#md # For more complicated visualization workflows we recommend either using our visualization tool [FerriteViz.jl](https://github.com/Ferrite-FEM/FerriteViz.jl) | ||
#md # or users should export the solution into vtk files and use e.g. [ParaView](https://www.paraview.org/), [Mayavi](https://docs.enthought.com/mayavi/mayavi/), ... . | ||
#md # It should be noted that the ordering of the DofHandler and the numbering of the nodes does not match, hence we cannot directly use solution | ||
#md # vectors to assign colors to discretizations. | ||
|
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.
Suggestion at top replaces this in my opinion.
#md # ## What next? | |
#md # For more complicated visualization workflows we recommend either using our visualization tool [FerriteViz.jl](https://github.com/Ferrite-FEM/FerriteViz.jl) | |
#md # or users should export the solution into vtk files and use e.g. [ParaView](https://www.paraview.org/), [Mayavi](https://docs.enthought.com/mayavi/mayavi/), ... . | |
#md # It should be noted that the ordering of the DofHandler and the numbering of the nodes does not match, hence we cannot directly use solution | |
#md # vectors to assign colors to discretizations. |
@@ -127,6 +127,9 @@ add!(dh, :u, ip_u) | |||
add!(dh, :p, ip_p) | |||
close!(dh) | |||
``` | |||
|
|||
!!! note |
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.
!!! note | |
!!! note "Dof numbering" |
(Or DoF numbering, but we are a bit inconsistent here...)
Regarding a FAQ, I remember reading https://gds.blog.gov.uk/2013/07/25/faqs-why-we-dont-have-them/ |
After seeing the latest issues with this, I've thought that it would probably be most clear for new users if we note this when you obtain the solution to the heat equation problem, not when distributing the dofs. I.e. adding a |
I assume we do not have any analytics to confirm that users actually visit (and read) the heat equation tutorial? |
No. Just guess-work that pointing it out there would be more obvious, hence the question on Slack. |
What if we add it as a small code comment instead (to heat eq. and linear elasticity)? |
Hello, a example or note on how to get the dof number from a node number could be helpful so that getting the solution at that particular node from the global solution vector would be easy. Also how to get the dof number from a node number?😅😅 |
In general this assumption does not work, so we do not have utils for this. I will try to take a look into better infrastructure for isoparametric elements, but there are short term more important things to do on my end. |
Title checks out.