On Thu, 1 Nov 2012, David Knezevic wrote: > On 11/01/2012 03:44 PM, Roy Stogner wrote: >> >> >> On Thu, 1 Nov 2012, David Knezevic wrote: >> >>> This is all very good stuff. But I'm not too worried about this efficiency >>> bottleneck for now, so I'll just change sum() to max(). I'll keep these >>> optimizations in mind for later though, thanks! >> >> Looks like you're done, then. Re-enable rb6 with parmesh? > > Yep, done in r6281.
We wish. I'm getting lookups of un-ghosted indices when I run with PETSc in devel mode on more than one processor. Ah - when MeshFunction finds an element, it dutifully tries to interpolate on that element, even if that element isn't semilocal. I'm going to change that behavior - now, unless it's been given a serialized vector, MeshFunction should return the out-of-mesh value (or in the gradient/hessian case, an empty vector) if it's asked for a point that's not on a local element. If anyone is depending on MeshFunction returning sane values from ghosted-but-non-local points using ghosted vectors, this will break that functionality; I can't think of a case where an algorithm would want to do that rather than just looking up local points and communicating, though. So my first thought for the implementation was just to test the located element to see if it's local, test its neighbors to see if it's ghosted, and done. That should fix things on SerialMesh (where all processors will always agree on which element the point_locator() finds) and for 99.999% of ParallelMesh cases, but we're not quite fixed - suppose the point being located is on a vertex where four quads meet, each from a different processor, and due to the different PointLocatorTree structures in the distributed mesh, each processor finds its own element's catty-corner neighbor in the lookup? We now do a point_neighbors search instead; this passes the tests we have and theoretically passes the hideous corner cases (literally!) I can think up. ...unless someone creates a mesh in which two parts of the domain locally touch at only a single point, thereby fooling Elem::point_neighbors(). I'm willing to just not care about that case. --- Roy ------------------------------------------------------------------------------ LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d _______________________________________________ Libmesh-devel mailing list Libmesh-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-devel