On Sun, 27 Jan 2013, Roy Stogner wrote:
> On Sun, 27 Jan 2013, Paul T. Bauman wrote:
>> I see the docs say that MeshBase::point_locator() is a deprecated function.
>> Is there an alternative to this function that's not deprecated? I have a
>> need for exactly this functionality - locating an element at specific point
>> (actually a handful of points) that isn't known until run time.
> There's some "sublocator" function in there that's thread-safe
> Sorry can't be more specific, leaving in a hurry
Okay, sorry, back. Check out the use of MeshBase::sub_point_locator()
in constructing periodic boundary conditions for a good example. The
trick is to first call that method *outside* of any threaded code so
that the thread-unsafe construction of the master locator occurs, then
you can call it from any thread and get a sub-locator. If you
reinit() and it changes the mesh then you'll have to reconstruct the
master locator afterwards.