Hi Matthew, a BoundaryMesh is 'just a mesh' and FEniCS does not preserve cell orientation, instead the vertex list in each cell is sorted by global vertex number. This gives implicit agreement of the edge direction between cells.
Martin On 20 January 2015 at 18:17, Matthew Scroggs <[email protected]> wrote: > Dear all, > > I have been attempting to implement FEM BEM coupling with Fenics and BEM++ > and have encountered the following issue: > > When importing a mesh into Fenics then exporting the Boundary mesh, the > normal vectors for each element are a mixture of inward pointing and > outward pointing. (Before importing, they were all outward pointing). > > The following code is where the issue occurs: > > import dolfin > from bempp.grid import grid_from_element_data > from bempp.file_interfaces import export > > mesh = dolfin.Mesh('sphere.xml') > bm = dolfin.BoundaryMesh(mesh, "exterior", False) > bm_coords = bm.coordinates() > bm_cells = bm.cells() > bm_nodes = bm.entity_map(0).array().astype(np.int64) > bd_grid = grid_from_element_data(bm_coords.transpose(),bm_cells. > transpose()) > export(bd_grid,'grid.msh') > > > I have attached the imported and exported meshes. > > Matthew > -- > Matthew Scroggs > PhD Student > Department of Mathematics > University College London > > _______________________________________________ > fenics mailing list > [email protected] > http://fenicsproject.org/mailman/listinfo/fenics > >
_______________________________________________ fenics mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics
