← Back to team overview

yade-users team mailing list archive

Re: [Question #234129]: plastic energy dissipation

 

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.