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

Inconsistent normal orientation of Fenics mesh #223

Open
evantwout opened this issue Nov 25, 2024 · 0 comments
Open

Inconsistent normal orientation of Fenics mesh #223

evantwout opened this issue Nov 25, 2024 · 0 comments

Comments

@evantwout
Copy link
Collaborator

The normal orientation of the surface meshes extracted from FEniCSx has changed from version 0.8.0 to 0.9.0. The normals can be inspected with Gmsh following this example code.

from mpi4py import MPI
import dolfinx
from dolfinx.fem import functionspace
from dolfinx.mesh import create_unit_cube
import bempp.api
from bempp.api.external import fenicsx

mesh = create_unit_cube(MPI.COMM_WORLD, 10, 10, 10)
fenics_space = functionspace(mesh, ("CG", 1))
trace_space, trace_matrix = fenicsx.fenics_to_bempp_trace_data(fenics_space)

bempp.api.export("cube"+str(dolfinx.__version__)+".msh", grid=trace_space.grid)

For Dolfin 0.8.0, all normals of the surface mesh are pointing outwards. However, for Dolfin 0.9.0, half of the triangles have outward pointing normals, and the other half have inward pointing normals. Hence, the FEM-BEM tutorial provides a wrong result.

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

No branches or pull requests

1 participant