dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #23317
Re: [Bug 783894] [NEW] Incorrect intersection mesh intersection after changing mesh coordinates.
Also, mesh.init() should not be used unless you really want to compute
*all* connectivy of the mesh.
--
Anders
On Wed, May 18, 2011 at 03:21:24PM -0000, Johan Hake wrote:
> Also, mesh.init() will only calculate the connectivity between the topological
> entities. These will not change if you change the coordinates of a mesh.
>
> Johan
>
>
> On Tuesday May 17 2011 02:31:22 Neilen Marais wrote:
> > Public bug reported:
> >
> > It seems like a call to any/all_intersected_entities() bakes in a lookup
> > structure that is not updated when mesh coordinates are changed. I
> > expected a call to mesh.init() would re-set that data, but it makes no
> > difference.
> >
> > from dolfin import *
> > els1 = [] ; els2 = []
> > mesh = UnitCube(1,1,1)
> > pt1 = Point(0,0,0)
> > els1 = mesh.all_intersected_entities(pt1)
> > mesh.coordinates()[:] -= 1/2.
> > pt2 = Point(-1/2.,-1/2.,-1/2.)
> > els2 = mesh.all_intersected_entities(pt2)
> > print els1, els2
> >
> > produces: [0 1 2 3 4 5] []
> >
> > If the line els1 = mesh.all_intersected_entities(pt1) is commented out,
> > it produces: [] [0 1 2 3 4 5]
> >
> > ** Affects: dolfin
> > Importance: Undecided
> > Status: New
>
References