← Back to team overview

yade-users team mailing list archive

Re: [Question #269486]: we can have 2 engines in a script?

 

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

Bruno Chareyre posted a new comment:
Dear Yor1,
Error messages are usually of great help. The complete message includes a very important part that you skipped:

File "test.py", line 22, in <module>
    O.bodies[piston].state.vel[1]=1
ArgumentError: Python argument types in
    BodyContainer.__getitem__(BodyContainer, list)

It is rather explicit, in O.bodies[piston] "piston" is wrong. So let's
check:

Yade [1]: print piston
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79]

This is the collection of facets. Unlike matlab, python will not accept
a list of integers in [] brackets (at least body container will not).
You'll have to impose the velocity of every facet. Or you clump them,
then you assign the velocity of the clump.

Bruno

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