On Sat, Feb 20, 2010 at 01:06:17AM -0000, Andre Massing wrote: > Question #101686 on DOLFIN changed: > https://answers.launchpad.net/dolfin/+question/101686 > > Andre Massing proposed the following answer: > > Garth N. Wells wrote: > > > > Andre Massing wrote: > >> Question #101686 on DOLFIN changed: > >> https://answers.launchpad.net/dolfin/+question/101686 > >> > >> Status: Open => Answered > >> > >> Andre Massing proposed the following answer: > >> On Friday 19. February 2010 18.33.47 marc spiegelman wrote: > >> > New question #101686 on DOLFIN: > >> > https://answers.launchpad.net/dolfin/+question/101686 > >> > > >> > Hi All, > >> > I've implemented a rather nifty semi-lagrangian advection scheme in > >> > dolfin that requires rapid checking to see if a point intersects a > >> > cell > >> > (without necessarily firing up the full intersection operator). Pre > >> > 0.9.7 > >> > this was implemented as cell.intersects(point). > >> > > >> > Everything works fine in 0.9.6 with the new CGAL intersection > >> > operator > >> > replacing the GTS intersection operator (with about a 20% speedup). > >> > >> Did you only use the intersection between meshentities and points or did > >> you > >> use also the new mesh intersection operator? Just curious, because the > >> former > >> code for intersection between points og e.g. triangles did not change. > >> > >> > However, in 0.9.7 the code breaks because cell.intersects() has been > >> > removed as a GTS dependency (actually, looking at > >> > TriangleCell.intersects(point), it looks like it simply reproduces > >> > GTS > >> > code but wasn't actually dependent on GTS) > >> > >> Yep that's true, the intersection functions was removed and there is a new > >> PrimitiveIntersector class in C++ with two static functions. These computes > >> the intersection between rather arbitrary mesh entities (exact or only > >> using > >> doubling precision). The functions are exposed as do_intersect and > >> do_intersect_exact in the python interface. But you are right, a point - > >> meshentity intersection is not provided. I attached a patch against the > >> recent > >> 0.9.7 release. Could you can apply to you sources and see whether it > >> works for > >> you? > >> > > > > Andre: Did you forget to attach it? > > Hmm, I did not, at least in my sent box it also appeared with > attachment. Strange... resend it (CC to the DOLFIN-ml).
We also need to add back the simple interface bool MeshEntity::intersects(const Foo& foo) const; where foo can be either a Point or another MeshEntity. do_intersect looks a bit strange to me. (But it might be good for the low-level interface that interacts with the CGAL templates.) -- Anders
signature.asc
Description: Digital signature
_______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : [email protected] Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp

