On Wed, 17 Nov 2010, Cody Permann wrote:

> Found it!  There is a call to MeshBase::contract() inside of
> EquationSystems::reinit() which certainly changes the Mesh.  I
> commented out that line of code and my example ran without seg
> faulting.

That's just a workaround - if we never delete coarsened elements then
certainly we're never going to hit a segfault when trying to reference
them again.

> Please advise on the correct resolution.  Do we need to
> add in a subsequent call to prepare_for_use() or clear() inside of
> EquationSystems::reinit() or is it the caller's responsibility?

It definitely should not be the caller's responsibility.  And no need
to call the whole prepare_for_use(); clear_point_locator() alone
should be sufficient.

But I'm still not certain why it isn't already being cleared
appropriately.  MeshRefinement::refine_and_coarsen_elements() should
be calling prepare_for_use whenever the mesh has changed.  And because
PointLocatorTree only operates on active elements, it shouldn't care
whether or not we delete subactive elements after it's constructed.
---
Roy

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel

Reply via email to