Question #681105 on Yade changed: https://answers.launchpad.net/yade/+question/681105
Jan Stránský proposed the following answer: > think is there a function in yade that calculates the displacement? of course there is :-) ### script saving current position, reference position and displacement # a simple case to save from yade import export s1,s2 = sphs = ( sphere((1,2,3),4), sphere((5,6,7),8), ) s1.state.vel = (2,3,4) s2.state.vel = (5,6,7) O.bodies.append(sphs) O.step() # actual save export.textExt( # [1] "dspl.dat", # file name format="x_y_z_r_attrs", # if you would like to load it again comment="xr yr zr dx dy dz", # 1st line of the file (x y z radius is there by default) attrs=["b.state.refPos","b.state.displ()"] # saving reference position and displacement vector ) ### cheers Jan -- You received this question notification because your team yade-users is an answer contact for Yade. _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : [email protected] Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp

