From d64d947f44c9c4469b2be1a190748d2d2e69299d Mon Sep 17 00:00:00 2001 From: Thibault Barnouin Date: Fri, 7 Jan 2022 11:57:10 +0100 Subject: [PATCH] debugg COMShift --- lib/objects.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/objects.py b/lib/objects.py index d0e2893..3e90782 100755 --- a/lib/objects.py +++ b/lib/objects.py @@ -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