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

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Mon Feb 23 17:23:39 PST 2009


Author: mturk
Date: Mon Feb 23 17:23:38 2009
New Revision: 1180
URL: http://yt.spacepope.org/changeset/1180

Log:
Roundoff error fix for getting ghost zones on high levels of refinement.  This
is not a problem with intmath covering grids, but here it was.  This closes
#195.



Modified:
   trunk/yt/lagos/BaseGridType.py

Modified: trunk/yt/lagos/BaseGridType.py
==============================================================================
--- trunk/yt/lagos/BaseGridType.py	(original)
+++ trunk/yt/lagos/BaseGridType.py	Mon Feb 23 17:23:38 2009
@@ -343,8 +343,10 @@
                              smoothed=False):
         # We will attempt this by creating a datacube that is exactly bigger
         # than the grid by nZones*dx in each direction
-        new_left_edge = self.LeftEdge - n_zones * self.dds
-        new_right_edge = self.RightEdge + n_zones * self.dds
+        nl = self.get_global_startindex() - n_zones
+        nr = nl + self.ActiveDimensions + 2*n_zones
+        new_left_edge = nl * self.dds
+        new_right_edge = nr * self.dds
         # Something different needs to be done for the root grid, though
         level = self.Level
         if all_levels:



More information about the yt-svn mailing list