Question #234129 on Yade changed:
https://answers.launchpad.net/yade/+question/234129
Bruno Chareyre proposed the following answer:
Wow! Thanks a tone. We shall include that.
You are lucky that it does not simply crash when combined with
Law2_ScGeom_FrictPhys_CundallStrack.
I think you are actually trying to get phys->moment_bending for an
object that does not have the member moment_bending (a FrictPhys object).
You need to filter the interactions. An efficient (i.e. avoiding
dynamic_casts) method is this:
if (phys->getClassIndex() == CohFrictPhys::getClassIndexStatic()) {
//... do something with CohFrictPhys object }
Another interesting addition would be
Law2_ScGeom6D_CohFrictPhys_CohesionMoment::elasticEnergy(), since
currently we are forced to compute the total in the scripts...
It could be also added to Law2_ScGeom_FrictPhys_CundallStrack, in fact,
then overloaded in CohesionMoment.
Would you please fix that before inclusion in trunk?
Cheers.
Bruno
--
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