← Back to team overview

yade-users team mailing list archive

Re: [Question #152385]: Can not run the old code in the new version even if changed something following the instruction

 

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

    Status: Open => Answered

Chareyre proposed the following answer:
Hi,

I tried your script with a recent version (not sure what would happen in
0.6). It gave me this:

DeprecationWarning: Class `Ip2_2xCohFrictMat_CohFrictPhys' was renamed to (or replaced by) `Ip2_CohFrictMat_CohFrictMat_CohFrictPhys', update your code! (you can run 'yade --update script.py' to do that automatically)
DeprecationWarning: Class `Law2_ScGeom_CohFrictPhys_CohesionMoment' was renamed to (or replaced by) `Law2_ScGeom6D_CohFrictPhys_CohesionMoment', update your code! (you can run 'yade --update script.py' to do that automatically)

So, I ran "yade --update yourScript.py", and then Interaction loop
looked like this:

InteractionLoop(
        [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()],
        [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=False,setCohesionOnNewContacts=True)],
        [Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
    ),

At that point the type mismatch is obvious:  ScGeom are generated while
the contact law needs ScGeom6D. Actually, using substepping in the qt
window, there is a clear error message (not sure why we don't have this
output when a full step is done...):

"None of given Law2 functors can handle interaction #3677+0, types
geom:ScGeom=1 and phys:CohFrictPhys=6"

It is possible that yade0.6 is still using the old misleading names, I'd
have to check. I recommend using the last bzr version, then with this
loop, your script works:

InteractionLoop(
        [Ig2_Sphere_Sphere_ScGeom6D(),Ig2_Box_Sphere_ScGeom6D()],
        [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=False,setCohesionOnNewContacts=True)],
        [Law2_ScGeom6D_CohFrictPhys_CohesionMoment()]
    ),

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