← Back to team overview

yade-users team mailing list archive

Re: [Question #703571]: How to reset the stiffness of the particles at a later stage?

 

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

Jan Stránský proposed the following answer:
>> 'Omega' object has no attribute 'bodise'?
> What's the meaning of this?

exactly as the error says, 'Omega' object has no attribute 'bodise'.
You try to access "bodise" attribute of Omega object, but Omega object has no attribute "bodise"

> Does "Omega" here refer to the Greek letter Ω?

No.
Omega is Yade class [2], basically "The simulation". Usually Omega is used as "O" object in Yade scripts, (O.bodies, O.interactions, O.engines, ... ).
Try
print(O)
in Yade terminal.

> What I add to the list is the particle ID (shuzu. append (b.id)), and
I use O. bodies [I] Material=mat2, which cannot solve this problem.

This is invalid syntax, you cannot expect it to solve any problem..

>> 'Omega' object has no attribute 'bodise'?
> The code is as follows:

you have no "bodise" in the code, please be consistent

> Error will be reported:
> ArgumentError: Python argument types in
>     BodyContainer.__getitem__(BodyContainer, Body)
> did not match C++ signature:
>    __getitem__(pyBodyContainer {lvalue}, int)

It says, that O.bodies[arg] expects "arg" to be int, but actually it is Body.
To solve it, put arg.id (Body.id as int)

Why do you mention the same error twice?

> and use i mat=mat2, error will still be reported: ArgumentError

if you use this, SyntaxError should be reported.

Moreover, I have no problem with both codes you have posted..

Cheers
Jan

[2] https://yade-dem.org/doc/yade.wrapper.html#omega

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.