I have solved the problem by removing a bm.order() which I was calling
before creating the mesh.
However, MeshView looks like a better way to implement this so I will
watch that issue.
Thanks,
Matthew
Matthew Scroggs
PhD Student
Department of Mathematics
University College London
On 21/01/15 10:39, Garth N. Wells wrote:
Fixing/removing BoundaryMesh is in my sights for when MeshView is
implemented (https://bitbucket.org/fenics-project/dolfin/issue/329).
There are problems with BoundaryMesh (particularly in parallel) that
have been causing headaches.
Garth
On 21 January 2015 at 07:55, Martin Sandve Alnæs <[email protected]
<mailto:[email protected]>> wrote:
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] <mailto:[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] <mailto:[email protected]>
http://fenicsproject.org/mailman/listinfo/fenics
_______________________________________________
fenics mailing list
[email protected] <mailto:[email protected]>
http://fenicsproject.org/mailman/listinfo/fenics
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics