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

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Thu Apr 1 13:18:07 PDT 2010


Author: mturk
Date: Thu Apr  1 13:18:05 2010
New Revision: 1679
URL: http://yt.enzotools.org/changeset/1679

Log:
Changing from ceil to rint fixes some roundoff errors with certain datasets.  I
believe, because this is how it is done in the L>0 grids, that this is a valid
change.



Modified:
   trunk/yt/lagos/BaseDataTypes.py

Modified: trunk/yt/lagos/BaseDataTypes.py
==============================================================================
--- trunk/yt/lagos/BaseDataTypes.py	(original)
+++ trunk/yt/lagos/BaseDataTypes.py	Thu Apr  1 13:18:05 2010
@@ -2747,7 +2747,7 @@
         elif level == 0 and self.level == 0:
             DLE = self.pf["DomainLeftEdge"]
             self.global_startindex = na.array(na.floor(LL/ dx), dtype='int64')
-            idims = na.ceil((self.right_edge-self.left_edge)/dx)
+            idims = na.rint((self.right_edge-self.left_edge)/dx).astype('int64')
             self[field] = na.zeros(idims,dtype='float64')-999
 
     def _refine(self, dlevel, field):



More information about the yt-svn mailing list