Commit 2995a32e authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

fix

parent b3a7dee0
Pipeline #9417 failed with stages
in 1 minute and 10 seconds
......@@ -608,7 +608,7 @@ class ParticleProblem :
raise NameError("Wrong lengths of particle data vectors.")
x = np.sum(positions*masses.reshape((-1,1)),axis=0)/np.sum(masses)
I = np.sum(masses.reshape((-1,1))*radii.reshape((-1,1))**2/2 + np.sum((positions-x)**2,axis=1)*masses.reshape((-1,1)))
I = np.sum(masses*radii**2/2 + np.sum((positions-x)**2,axis=1)*masses)
invertI = 0 if forced else 1/I
invertM = 0 if forced else 1/np.sum(masses)
idd = self.add_body(x, invertM, invertI)
......
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