On Thu, 29 Aug 2013, Manav Bhatia wrote:

>   The mesh.sub_point_locator() method, however, warns that this
>   should not be used in a multithreaded or non-parallel_only code.

That's not the full sentence; read that comment again.

"This should not be used in threaded or non-parallel_only code

...
unless the master has already been constructed."

So you make sure a master point locator gets constructed.

Basically, call sub_point_locator() once in a part of the code which
isn't multi-threaded and is being run simultaneously on all processors
(that's what the parallel_only terminology is about), and that will do
the non-thread-safe parallel-synchronization-required work of creating
a master point locator.  After that's done then you (or classes you
use, like MeshFunction) can call sub_point_locator() from inside
threaded or asynchronous parallel code and safely use the result.

If you change the mesh afterward (refinement, read from new file,
whatever) then you'll need to construct a new master point locator
under the same restrictions.
---
Roy

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to