-
Notifications
You must be signed in to change notification settings - Fork 7
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
Ferrite says that detJ is negative, but Gmsh says that all element have a positive detJ #15
Comments
Looks like the noder order is messed up:
which gives roughly
(clockwise), but Ferrite wants anti-clockwise:
I guess something goes wrong in the mesh transfer @koehlerson ? |
I'm not sure what we can do about it, since the gmsh docs say that the elements are provided anti-clockwise as we expect them: That's the reason why all other tested triangle meshes worked ootb |
https://gitlab.onelab.info/gmsh/gmsh/-/issues/1169 Could you try to reverse the mesh:
This works for me
So following the logic of gmsh the following goes wrong: gmsh provides clockwise or anti-clockwise counting based on your surface definition, which is clockwise and thus the elements are defined in this way as well. Unfortunately, I don't know how we can check this beforehand and call the appropriate API function to reverse the mesh |
Ah, that makes sense I guess. Perhaps there is a way to check the normal of the surface or something? |
yes, there is
|
Then we can probably check that and revert the order ourselves if needed? |
There is also
But I think there is no easy accessible global criterion to check the definition. So probably best way is, as you say, to check it in the |
Thank you very much, this solved my problem! Should I close the issue, or maybe you want to leave it open to automate the solution ? |
leave it open, I will close it as soon as we have an automated check! |
Hi, |
Calling this would be a no brainer, but I don't know how to obtain the tag of the bounding surface or more specifically how to distinguish any surface from the bounding surface |
I just re-read your message and noticed: |
Hello,
I'm new in FEM and in Ferrite. So far I have been able to use this library and Gmsh with different geometry and it worked fine, but this one gives me trouble:
Here is the error message:
Here is a minimal geo file that reproduce the problem:
And here is a minimal Julia code to reproduce the error:
I have tried with different mesh type and size. I also tried feeding the geo file to Ferrite instead of a msh file, but the problem persist. Quad gives a higher detJ, and reducing the mesh size also gives higher detJ, but detJ stays negative. I can't really decrease the mesh size further.
Is there anything else I can try?
The text was updated successfully, but these errors were encountered: