dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #17683
Re: [Question #101686]: cell.intersects() functionality in 0.9.7? (i.e. GTS dependencies)
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).
>
>> >
>> > The question is... is there is any equivalent functionality in CGAL
>> and is
>> > anyone interested in implementing it (either as cell.intersects(??)
>> > or some other interface). The functionality should be straightforward
>> > (and I'd be surprised if it didn't exist), given a *known cell* and a
>> > point, does the cell intersect the point. This would be useful for
>> > particle based methods as well.
>> >
>> > On a related note...are there any plans for a parallel implementation
>> > of Function::eval(Array<double>& values, const Array<double>& x) by
>> > release 1.0?
>
> I've just pushed a change for this, although it won't work for
> off-process points.
>
> Garth
>
>> >
>> > All assistance greatly appreciated
>>
>> Any feedback as well :)
>>
>> > marc
>> >
>>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help : https://help.launchpad.net/ListHelp
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.
Follow ups
References