Question #234129 on Yade changed:
https://answers.launchpad.net/yade/+question/234129

Václav Šmilauer posted a new comment:
> You need to filter the interactions. An efficient (i.e. avoiding
> dynamic_casts) method is this:
> if (phys->getClassIndex() == CohFrictPhys::getClassIndexStatic())

I am almost sure that dynamic_cast is just as fast, or likely faster,
than getClassIndex() - it is a virtual method, so the exact class of the
object has to be looked up anyway. Try and measure.

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.

_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp

Reply via email to