← Back to team overview

dolfin team mailing list archive

Re: Memory leak in IntersectionDetector

 

Kristen Kaasbjerg wrote:
Hi again

One more thing I discovered is that the IntersectionDetector has
a memory leak (probably due to the undeleted GNode pointer).
This is relevant for the new eval function of the DiscreteFunction
class, which initiates an IntersectionDetector everytime the
DiscreteFunction is evaluated at a point. So many calls to the
eval function will eat up the memory!

Why do you create a new intersection detector on each evaluation??? It cost a lot more computation to initialize the search tree than to do the search. That is, if your mesh is constant you save a lot of computation by only constructing the IntersectionDetector once.

As for the memory leak, it is a known bug (http://www.fenics.org/cgi-bin/bugzilla/show_bug.cgi?id=26) and some work has been done to figure out what is going on.

  Dag



Follow ups

References