from mpi4py import MPI
import ptreelib

from pNbody import *

nb = Nbody('../../examples/disk.dat',ftype='gadget')
nb.Tree = ptreelib.Tree(npart=nb.npart,pos=nb.pos,vel=nb.vel,mass=nb.mass,num=nb.num,tpe=nb.tpe)

nb.ExchangeParticles()



nb.Tree.SetParticles(nb.npart,nb.pos,nb.vel,nb.mass,nb.num,nb.tpe) 


nb.Tree.BuildTree()


Pot = nb.Tree.Potential(array([[0,0,0]],float32),0.1) 
acc = nb.Tree.Acceleration(array([[0,0,0]],float32),0.1) 

print Pot
print acc
