1
0

debugg COMShift

This commit is contained in:
Thibault Barnouin
2022-01-07 11:57:10 +01:00
parent 209cb0aabb
commit d64d947f44

View File

@@ -106,9 +106,11 @@ class System(Body):
return coord
def COMShift(self): #Shift coordinates of bodies in system to COM frame and set COM at rest
COM = self.COM
COMV = self.COMV
for body in self.bodylist:
body.q = body.q - self.COM
body.v = body.v - self.COMV
body.q = body.q - COM
body.v = body.v - COMV
@property
def LCOM(self): #return angular momentum of the center of mass