← Back to team overview

yade-users team mailing list archive

Re: [Question #706864]: unable to export text

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

> if it is correct to put the code under def checkunbalancedForce()

please use actual names to prevent confusion.
by checkunbalancedForce, do you mean already defined checkUnbalanced function?
Or a new function?
Or ... ?

What is "under"? in?

If already existing checkUnbalanced function like in the code, why not,
if it suits your purposes.

BUT! do not put export function inside "for body in O.bodies:" loop, it
does not make sense.

> export.txt(...)

export.txt does not exist

> I want to export the text of sphere position excluding the clump
sphere

for selective export, use mask parameter (and properly mask your
particles)

> and why do I get the error that said
> if body not in idClump:
> (argument of type 'int' is not iterable)

idClump is integer, one number.
You cannot do "in number" in Python
###
3 in [1,2,3] # True
4 in [1,2,3] # False
5 in 6 # TypeError: argument of type 'int' is not iterable
###

Cheers
Jan

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