← Back to team overview

yade-users team mailing list archive

Re: [Question #165210]: Saving, loading cylinders

 

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

    Status: Open => Answered

Chareyre proposed the following answer:
Thank you for detailed report.
currentChain is only a static attribute pointing to the chain where next
bodies will be appended. Therefore it is not registered at the bodies
level (only chainNumber is), and it is not surprising if currentChain is
not preserved in save/load cycles. It should be harmless in itslef.
I guess there is something else going wrong at reload time.

Since this code is still in development, I can't give any ETA for a fix.
Could you please open a bug so we don't forget this problem? You can
just copy/paste you message below. If you investigate more, please let
us know what you find and append the data in the same bug.

Thanks.

Bruno

On 18/07/11 16:21, franz wrote:
> New question #165210 on Yade:
> https://answers.launchpad.net/yade/+question/165210
>
> Hi
>
> I've got a problem while saving/loading simulations with chainedCylinders.
> This appends only when :
> - I run a simulation with more than one chainedCylinder.
> - I have some interactions between some spheres and the cylinders
> - I save/load the simulation (I succeed to load the simulation)
> Then if I try to perform one more step of DEM, I get a segmentation fault.
> The debug mode displays this error :
>
> in Ig2_Sphere_ChainedCylinder_CylScGeom::go (this=0x7f83b09fd880, cm1=..., cm2=..., state1=..., state2=..., shift2=..., force=@0x7f839f0398ab, c=...) at pkg/common/Cylinder.cpp:56
>
> and at line 56 of my Cylinder.cpp :
>
> 54     shared_ptr<const ChainedState> statePrev;
> 55     if (cylinderSt->rank>0)
> 56     	statePrev = YADE_PTR_CAST<const ChainedState> (Body::byId(cylinderSt->chains[cylinderSt->chainNumber][cylinderSt->rank-1],scene)->state);
>
> I think that when saving/loading the simulation YADE creates the chainedCylinders, but the information about which cylinder belongs to which chainedCylinder is not totally created. Maybe the chains array is not completed ?
>
> I noticed that in the Python console the chainNumber argument of the cylinder's state is preserved through the saving/loading operation. The currentChain attribute of each cylinder is lost and set to 0 when I load a simulation.
>
> Do you think there is a way to bypass the problem ?
>
> Thanks
>


-- 
_______________
Bruno Chareyre
Associate Professor
ENSE³ - Grenoble INP
Lab. 3SR
BP 53 - 38041, Grenoble cedex 9 - France
Tél : +33 4 56 52 86 21
Fax : +33 4 76 82 70 43
________________

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