← 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: Answered => Open

Liqing Jiao is still having a problem:
Dear Chareyre,

Thank you for your reply and warm help.
I followed what you said to change my code. But it also can't run, and give me the error like this:

Welcome to Yade 0.60
TCP python prompt on localhost:9000, auth cookie `asudes'
XMLRPC info provider on http://localhost:21000
Running script 16-09-re-3d.py
Traceback (most recent call last):
  File "/home/jiaoliqing/YADE/bin/yade", line 152, in runScript
    execfile(script,globals())
  File "16-09-re-3d.py", line 35, in <module>
    [Ip2_CohFrictMat_CohFrictMat_CohFrictPhys(setCohesionNow=False,setCohesionOnNewContacts=True)],
NameError: name 'Ip2_CohFrictMat_CohFrictMat_CohFrictPhys' is not defined
[[ ^L clears screen, ^U kills line. F12 controller, F11 3d view, F10 both, F9 generator, F8 plot. ]]
Yade [1]:

It looks like the Ip2 file is not suitable. I also saw the
Ip2_2xCohFrictMat_CohFrictPhys in the install files. I think maybe it is
not the cause of that problem. Could you help me to check it again?

Cheers
Liqing


At 2011-04-13,Chareyre <question152385@xxxxxxxxxxxxxxxxxxxxx> wrote:

>Your 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()]
>    ),
>
>-- 
>If this answers your question, please go to the following page to let us
>know that it is solved:
>https://answers.launchpad.net/yade/+question/152385/+confirm?answer_id=4
>
>If you still need help, you can reply to this email or go to the
>following page to enter your feedback:
>https://answers.launchpad.net/yade/+question/152385
>
>You received this question notification because you are a direct
>subscriber of the question.

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