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
Fix Manifold<3, 3>::normal_vector #14183
Fix Manifold<3, 3>::normal_vector #14183
Conversation
* to the triangulation. | ||
* | ||
* In 2d, all manifold ids are set to zero, and a SphericalManifold is | ||
* attached to the triangulation. In 3d, only the manifold id of the curved |
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.
Why is this different in 2d? I would think there are also flat faces in 2d!
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.
Then we may also need to fix quarter_hyper_shell()?
dealii/source/grid/grid_generator.cc
Line 6313 in d7aca55
quarter_hyper_shell(Triangulation<3> & tria, |
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.
I would think so. Can you try to address that as well and see what happens?
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.
If we remove the spherical manifold on the flat surface, the mesh quality there gets worse as we refine the mesh, as discussed here #14176
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.
This is not the right solution, see #14176 (comment).
873f712
to
03e99f0
Compare
It should work now, @tjhei @luca-heltai |
Can you add a changelog and update the text of the PR (when you scroll up here)? |
fix #14176
On very coarse meshes, with very particular manifolds, e.g., spherical manifold, polar manifolds, cylindrical manifolds, etc,
Manifold<3, 3>::normal_vector
may return a zero vector. This issues can be fixed by choosing different combinations of vertices to compute the normal vector.