1
0

modify leapfrog to take velocities instead of momenta, add new initial conditions

This commit is contained in:
Thibault Barnouin
2021-11-05 17:12:16 +01:00
parent d5f948f4a1
commit fff1832e61
5 changed files with 51 additions and 41 deletions

View File

@@ -34,6 +34,9 @@ class System:
def get_positions(self): #return the positions of the bodies
return np.array([body.q for body in self.bodylist])
def get_velocities(self): #return the positions of the bodies
return np.array([body.v for body in self.bodylist])
def get_momenta(self): #return the momenta of the bodies
return np.array([body.p for body in self.bodylist])