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

britton at wrangler.dreamhost.com britton at wrangler.dreamhost.com
Mon Dec 29 10:50:11 PST 2008


Author: britton
Date: Mon Dec 29 10:50:08 2008
New Revision: 1060
URL: http://yt.spacepope.org/changeset/1060

Log:
Re-added the dx's to _get_cut_mask in AMRRegionBase and removed the = from the 
same routine in AMRPeriodicRegionBase.  It seems that the alleged bug in 
parallel projections was from using the <= and >= conditions instead of < and 
>.  I do not think the bug was related to the inclusion of the dx's in the 
routine.  Then again, it's impossible for me to tell because the bug never 
showed up on any machines that I use and I only ever hear that I'm supposed to 
visit some fucking blog where someone throws up some pictures and says, "It's 
broke!"  Next time I have a problem, I'll just stick my head out my office 
window and yell "Help!" and hope the guy who's responsible is walking by 
right then.  Yeah, that'll do it.


Modified:
   trunk/yt/lagos/BaseDataTypes.py

Modified: trunk/yt/lagos/BaseDataTypes.py
==============================================================================
--- trunk/yt/lagos/BaseDataTypes.py	(original)
+++ trunk/yt/lagos/BaseDataTypes.py	Mon Dec 29 10:50:08 2008
@@ -1552,12 +1552,12 @@
         if self._is_fully_enclosed(grid):
             return True
         else:
-            cm = ( (grid['x'] < self.right_edge[0])
-                 & (grid['x'] > self.left_edge[0])
-                 & (grid['y'] < self.right_edge[1])
-                 & (grid['y'] > self.left_edge[1])
-                 & (grid['z'] < self.right_edge[2])
-                 & (grid['z'] > self.left_edge[2]) )
+            cm = ( (grid['x'] - grid['dx'] < self.right_edge[0])
+                 & (grid['x'] + grid['dx'] > self.left_edge[0])
+                 & (grid['y'] - grid['dy'] < self.right_edge[1])
+                 & (grid['y'] + grid['dy'] > self.left_edge[1])
+                 & (grid['z'] - grid['dz'] < self.right_edge[2])
+                 & (grid['z'] + grid['dz'] > self.left_edge[2]) )
         return cm
 
 class AMRPeriodicRegionBase(AMR3DData):
@@ -1605,11 +1605,11 @@
             cm = na.zeros(grid.ActiveDimensions,dtype='bool')
             for off_x, off_y, off_z in self.offsets:
                 cm = cm | ( (grid['x'] - grid['dx'] + off_x < self.right_edge[0])
-                          & (grid['x'] + grid['dx'] + off_x >= self.left_edge[0])
+                          & (grid['x'] + grid['dx'] + off_x > self.left_edge[0])
                           & (grid['y'] - grid['dy'] + off_y < self.right_edge[1])
-                          & (grid['y'] + grid['dy'] + off_y >= self.left_edge[1])
+                          & (grid['y'] + grid['dy'] + off_y > self.left_edge[1])
                           & (grid['z'] - grid['dz'] + off_z < self.right_edge[2])
-                          & (grid['z'] + grid['dz'] + off_z >= self.left_edge[2]) )
+                          & (grid['z'] + grid['dz'] + off_z > self.left_edge[2]) )
             return cm
 
 class AMRGridCollection(AMR3DData):



More information about the yt-svn mailing list