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

add a note in the grid section about anti-clockwise ordering #517

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

Conversation

koehlerson
Copy link
Member

something like this maybe? #515

@termi-official
Copy link
Member

Can the error message contain a link to this?

@KnutAM
Copy link
Member

KnutAM commented Oct 10, 2022

Nice!
At least I haven't found it, so it would be nice to document Ferrite's ordering scheme.
Then, as @termi-official says but instead refer to the ordering scheme in the docs in the error message.
And then I would say that the note is no longer necessary. But until then, this would be good to have!

docs/src/manual/grid.md Outdated Show resolved Hide resolved
@koehlerson
Copy link
Member Author

Nice! At least I haven't found it, so it would be nice to document Ferrite's ordering scheme.

In the docs the quadrilateral ordering is introduced in anti-clockwise ordering, but I agree that could be written down explicitly with a reference to reference_coordinates

@fredrikekre
Copy link
Member

Would be good with some plots for every element type (and interpolation) with numbering. Perhaps this can be done with Makie or FerriteViz?

@koehlerson
Copy link
Member Author

there is at least an issue about it :D Ferrite-FEM/FerriteViz.jl#15

@koehlerson
Copy link
Member Author

grafik
So I would do something like this? Will include the local face and edge number and maybe I can make some markers for the dofs, but I'm not sure about it, will probably be a bit harder

@fredrikekre
Copy link
Member

That looks great. I don't think dof markers are necessary, they follow the same order

@termi-official
Copy link
Member

While they follow the same ordering the exact dof numbering can be different if we have different interpolations for geometry and the solution. Also note that dofs can also be associated to higher order entities than only nodes.

@koehlerson koehlerson changed the title add a note in the grid section about clockwise ordering add a note in the grid section about anti-clockwise ordering Oct 18, 2022
@codecov-commenter
Copy link

codecov-commenter commented Oct 18, 2022

Codecov Report

Patch coverage has no change and project coverage change: +0.02 🎉

Comparison is base (f6c7e23) 92.34% compared to head (06153e5) 92.37%.

❗ Current head 06153e5 differs from pull request most recent head 36b1abb. Consider uploading reports for the commit 36b1abb to get more accurate results

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #517      +/-   ##
==========================================
+ Coverage   92.34%   92.37%   +0.02%     
==========================================
  Files          22       22              
  Lines        3762     3776      +14     
==========================================
+ Hits         3474     3488      +14     
  Misses        288      288              

see 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@termi-official
Copy link
Member

Maybe as followup we can provide an example to find the flipped elements in FerriteVis.jl. Should be very straight forward (i.e. plot L2 element of order 0 with value of det(J)).

@koehlerson
Copy link
Member Author

Maybe as followup we can provide an example to find the flipped elements in FerriteVis.jl. Should be very straight forward (i.e. plot L2 element of order 0 with value of det(J)).

What do you mean by this? The flipped elements only occur if you read yourself a mesh 🤔

@termi-official
Copy link
Member

AFAIK we currently only have a guarantee that elements are not flipped if we utilize the provided grid generators, yes. But I think it might be helpful to plot the determinants and hence detect flipped elements.

@KnutAM
Copy link
Member

KnutAM commented Nov 23, 2022

LGTM otherwise, but I don't feel experienced enough to press the approve button :)

@lijas
Copy link
Collaborator

lijas commented Nov 23, 2022

Should we add a note about note ordering here aswell, and maybe a link to the docs? :P

@noinline throw_detJ_not_pos(detJ) = throw(ArgumentError("det(J) is not positive: det(J) = $(detJ)"))

@KnutAM
Copy link
Member

KnutAM commented May 17, 2023

I think it is a nice PR that would be nice to get merged! I've closed my previous concern above.

Should we add a note about note ordering here aswell, and maybe a link to the docs? :P

My suggestion would be to change:
"det(J) is not positive: det(J) = $(detJ)"
to
"det(J) is not positive: det(J) = $(detJ) (hint: check node ordering)"

A merge with master would be needed as well

@koehlerson: Let me know if you want me to do anything!

@koehlerson
Copy link
Member Author

I can finalize it, I wasn't sure how to deal with the gh-page branch upload, so if this should be merged with a ref to the gh-pages upload, let me know

@KnutAM
Copy link
Member

KnutAM commented May 17, 2023

I wasn't sure how to deal with the gh-page branch upload, so if this should be merged with a ref to the gh-pages upload, let me know

I think it can be merged in any way as I think including FerriteViz in the doc is possible now with Julia 1.9.
Edit: And it is of course nice that it will update in case something changes in Ferrite (+ that the code to generate the figure is available, so I like your initial solution!)

Previously, I've uploaded figures to the gh-branch assets folder and added the figures to the list of downloads. But sometimes the download fails, don't know why though.

@termi-official
Copy link
Member

termi-official commented May 17, 2023

The JSServe bug does not affect this PR, because on the current FerriteViz release we have an older Makie version, right?

@koehlerson
Copy link
Member Author

The JSServe bug does not affect this PR, because on the current FerriteViz release we have an older Makie version, right?

No it's not related, since it uses CairoMakie and you only need JSServe for WGLMakie and interactivity stuff of the plot

@termi-official
Copy link
Member

Ah, you are right. Thanks.

@koehlerson
Copy link
Member Author

need Ferrite-FEM/FerriteViz.jl#78 before rebasing and merging

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.

6 participants