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

mturk at wrangler.dreamhost.com mturk at wrangler.dreamhost.com
Tue Oct 27 07:53:47 PDT 2009


Author: mturk
Date: Tue Oct 27 07:53:46 2009
New Revision: 1502
URL: http://yt.enzotools.org/changeset/1502

Log:
Added some checks against fully-enclosed status.  This should allow variable-length particle fields in fully-enclosing regions.  I don't really like this fix, but I assert it's solid.

Modified:
   trunk/yt/lagos/BaseDataTypes.py
   trunk/yt/lagos/Profiles.py

Modified: trunk/yt/lagos/BaseDataTypes.py
==============================================================================
--- trunk/yt/lagos/BaseDataTypes.py	(original)
+++ trunk/yt/lagos/BaseDataTypes.py	Tue Oct 27 07:53:46 2009
@@ -1668,6 +1668,7 @@
             if self.pf.field_info[field].vector_field:
                 f = grid[field]
                 return na.array([f[i,:][pointI] for i in range(3)])
+            if self._is_fully_enclosed(grid): return grid[field].ravel()
             return grid[field][pointI].ravel()
         if field in self.pf.field_info and self.pf.field_info[field].vector_field:
             pointI = self._get_point_indices(grid)

Modified: trunk/yt/lagos/Profiles.py
==============================================================================
--- trunk/yt/lagos/Profiles.py	(original)
+++ trunk/yt/lagos/Profiles.py	Tue Oct 27 07:53:46 2009
@@ -160,7 +160,7 @@
         data = []
         for field in _field_mapping.get(this_field, (this_field,)):
             pointI = None
-            if check_cut:
+            if check_cut and not self._data_source._is_fully_enclosed(source):
                 if field in self.pf.field_info \
                     and self.pf.field_info[field].particle_type:
                     pointI = self._data_source._get_particle_indices(source)



More information about the yt-svn mailing list