← Back to team overview

yade-dev team mailing list archive

Re: [Bug 1475844] Re: Swap problem in InteractionLoop

 

Hi,
My next questions (result of not knowing the code well enough):
- is asssert necessary in [1]?
Not really necessary. It just means that goReverse would have to be implemented properly, which, back then, was not the case with any of the existing Ip2 functors. With swap==true, you'd have to call goReverse instead of go (line 122), and also remember along with the cached functor object, that goReverse must be called subsequently (in next steps) as well.

In Woo, I removed this functor caching, since it does not seem to bring any benefit performance-wise.
- why is IPhysDispatcher defined as autosymmetric (default template argument) [3]?
The two arguments are materials (same type), and their order is "arbitrary" (depending on geometry), hence it is desirable that both orderings are handled by the functor. I have yet to see an Ip2 functor which properly implements goReverse.

Hope this makes sense.

Vaclav



References