[Yt-svn] yt-commit r1127 - trunk/yt/lagos

britton at wrangler.dreamhost.com britton at wrangler.dreamhost.com
Sun Jan 18 09:11:53 PST 2009


Author: britton
Date: Sun Jan 18 09:11:50 2009
New Revision: 1127
URL: http://yt.spacepope.org/changeset/1127

Log:
Removed a factor of 2 in front of the calculation of gravitational potential 
energy in IsBound that seems to have been an error.


Modified:
   trunk/yt/lagos/DerivedQuantities.py

Modified: trunk/yt/lagos/DerivedQuantities.py
==============================================================================
--- trunk/yt/lagos/DerivedQuantities.py	(original)
+++ trunk/yt/lagos/DerivedQuantities.py	Sun Jan 18 09:11:50 2009
@@ -235,11 +235,11 @@
     import time
     t1 = time.time()
     try:
-        pot = 2*G*_cudaIsBound(data, truncate, kinetic/(2*G))
+        pot = G*_cudaIsBound(data, truncate, kinetic/G)
     except (ImportError, AssertionError):
-        pot = 2*G*PointCombine.FindBindingEnergy(data["CellMass"],
-                                      data['x'],data['y'],data['z'],
-                                      truncate, kinetic/(2*G))
+        pot = G*PointCombine.FindBindingEnergy(data["CellMass"],
+                                               data['x'],data['y'],data['z'],
+                                               truncate, kinetic/G)
     mylog.info("Boundedness check took %0.3e seconds", time.time()-t1)
     return [(pot / kinetic)]
 def _combIsBound(data, bound):



More information about the yt-svn mailing list