← Back to team overview

yade-dev team mailing list archive

[Bug 607836] Re: b.dynamic and b->isDynamic() out of synchro in case of save/load

 

Ok. Thank you for the explanations. I think a clear warning in the user's manual is indeed required : for me it was clearly not expected....
It makes python-use of Yade less intuitive :-( ...

(I'll try to respect this discovered convention now !)

-- 
b.dynamic and b->isDynamic() out of synchro in case of save/load
https://bugs.launchpad.net/bugs/607836
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.

Status in Yet Another Dynamic Engine: Invalid

Bug description:
The attached script will illustrate the title.

It is about a sphere which is created as dynamic=False, then updated to dynamic=True, in order to let rotate it with NewtonIntegrator. 

Directly with the script as it is joined, you will observe that the orientation of the sphere is unfortunately not at all modified.

But, "hokus pokus", (magic expression) comment l.27-28 about the save/load, re-run and you will have the orientation which evolves...

The reason is in b->isDynamic() (in C++). In the first case (with save/load), you will have b->isDynamic()=0 (in C++), even if b.dynamic=True (in python)
Whereas, in the second case, things are as they should : b->isDynamic() = b.dynamic = True

You can easily check this with logs from NewtonIntegrator.cpp (I could not attach the file with cout typed I used : no more than one attachment it seems)





References