This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

mesh.domains().facet_domains() has gone away?

+1 vote

In version 1.2 of DOLFIN there was such function that I could use. Now I moved to latest git revision and it seems there is not any more such function. Any idea what's wrong?

Also mesh.closest_cell() seems to be gone.

The mesh I am using has been converted by dolfin-convert from (netgen generated) diffpack to xml.

asked Oct 17, 2013 by Tuomas FEniCS Novice (350 points)
edited Oct 17, 2013 by Tuomas

1 Answer

+1 vote
 
Best answer

I'm not quite sure how mesh.domains().facet_domains() worked earlier, but the same data can be accessed from mesh.domains() and a mesh function can be created:

facet_domains = MeshFunction("size_t", mesh, D-1, mesh.domains())

The intersection code has been completely refurbished, and now use the class BoundingBoxTree:

mesh = UnitCubeMesh(4,4,4)
bbtree = BoundingBoxTree()
bbtree.build(mesh)
bbtree.compute_closest_entity(Point(2.0,0.0,0.0))
answered Oct 18, 2013 by Øyvind Evju FEniCS Expert (17,700 points)
selected Oct 18, 2013 by Tuomas
...