[Yt-svn] yt: 2 new changesets

hg at spacepope.org hg at spacepope.org
Mon Mar 29 23:23:57 PDT 2010


hg Repository: yt
details:   yt/rev/b45309454513
changeset: 1496:b45309454513
user:      Matthew Turk <matthewturk at gmail.com>
date:
Mon Mar 29 23:23:13 2010 -0700
description:
Two fixes to inclined box:

 * Axis along which the box vectors are summed to get the center was wrong.  Now it's fixed.
 * The first-pass grid identification routine is, it seems, giving bad results.  Until I can dig in harder, I have disabled it.  The second stage works.  This may result in longer run times, but that will be front-loaded to object instantiation.

hg Repository: yt
details:   yt/rev/c7ec83927137
changeset: 1497:c7ec83927137
user:      Matthew Turk <matthewturk at gmail.com>
date:
Mon Mar 29 23:23:53 2010 -0700
description:
Merging with tip

diffstat:

 yt/lagos/BaseDataTypes.py |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r c248cd4313a8 -r c7ec83927137 yt/lagos/BaseDataTypes.py
--- a/yt/lagos/BaseDataTypes.py	Sun Mar 28 23:31:52 2010 -0700
+++ b/yt/lagos/BaseDataTypes.py	Mon Mar 29 23:23:53 2010 -0700
@@ -593,7 +593,8 @@
             # Now the next field can use this field
             self[field] = temp_data[field] 
         # We finalize
-        temp_data = self._mpi_catdict(temp_data)
+        if temp_data != {}:
+            temp_data = self._mpi_catdict(temp_data)
         # And set, for the next group
         for field in temp_data.keys():
             self[field] = temp_data[field]
@@ -2027,7 +2028,7 @@
         self.origin = na.array(origin)
         self.box_vectors = na.array(box_vectors, dtype='float64')
         self.box_lengths = (self.box_vectors**2.0).sum(axis=1)**0.5
-        center = origin + 0.5*self.box_vectors.sum(axis=1)
+        center = origin + 0.5*self.box_vectors.sum(axis=0)
         AMR3DData.__init__(self, center, fields, pf, **kwargs)
         self._setup_rotation_parameters()
         self._refresh_data()
@@ -2049,6 +2050,8 @@
         goodI = amr_utils.find_grids_in_inclined_box(
                     self.box_vectors, self.center, GLE, GRE)
         cgrids = self.pf.h.grids[goodI.astype('bool')]
+        # find_grids_in_inclined_box seems to be broken.
+        cgrids = self.pf.h.grids[:]
         grids = []
         for i,grid in enumerate(cgrids):
             v = amr_utils.grid_points_in_volume(self.box_lengths, self.origin,



More information about the yt-svn mailing list