Commit 7b521f8b authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles
Browse files

add save velocity

parent 15f3220b
......@@ -200,6 +200,7 @@ class CTree:
v=v[shuffle_idx_threshold, ]
v=np.reshape(v,(-1,))
cxv=CSnapshot(None).center(p,v,m*rho)
if v is None: # no velocities
cxv[3]=0.0
cxv[4]=0.0
......@@ -208,6 +209,8 @@ class CTree:
unso=CunsOut(outfile,"nemo")
unso.setValueF("time",self.__time)
unso.setArrayF("all","pos",p)
if self.__vel is not None:
unso.setArrayF("all","vel",v)
unso.setArrayF("all","mass",m)
unso.setArrayF("all","rho",rho)
unso.setArrayF("all","hsml",hsml)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment