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
Negative det in MappingFE on some simplex mesh #13346
Comments
This is a known bug (or rather, something we have not implemented yet): Lines 562 to 565 in 9df2fdc
|
I am cautiously optimistic, since its not possible to tangle a tetrahedron like it is a hexahedron, that we can implement these functions ourselves for simplices without too much trouble. In particular, in 2D, it should suffice to switch the order of two vertices for a negative triangle to get things working correctly. |
I would have hoped that the mesh-generation tools are doing this themselves... |
I recall seeing a gmsh example once that set all the cells to have (in our opinion) negative measure: in this particular case I suspect that by changing two columns of vertex numbers in the input file we can use the file without problems. I'm not sure how GMSH sets the orientation convention but I think it is consistent between elements. |
It is not. Even with quads in 2d GMSH sometimes produces meshes with all negative or all positive measure. If you mesh a mesh with two pieces, this can also happen in the same file. We fail to read it right now. My student will open a PR with a fix soon. Maybe I should create an issue now... See #13347 |
The previous PRs fixed this so lets close the issue. |
I imported a triangular mesh using
read_msh()
, but got negative det:@peterrum said that the mesh has normal showing in the negative z direction, which leads to the negative determinant. The mesh has to be reoriented, which should be simple in 2D, but complicated in 3D.
This is the mesh
This is a test that reproduces this
https://github.com/zjiaqi2018/read-msh
The text was updated successfully, but these errors were encountered: