[Yt-svn] yt-commit r1676 - trunk/yt/lagos
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Mon Mar 29 23:24:00 PDT 2010
Author: mturk
Date: Mon Mar 29 23:24:00 2010
New Revision: 1676
URL: http://yt.enzotools.org/changeset/1676
Log:
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 w ill be front-loaded to object instantiation.
Modified:
trunk/yt/lagos/BaseDataTypes.py
Modified: trunk/yt/lagos/BaseDataTypes.py
==============================================================================
--- trunk/yt/lagos/BaseDataTypes.py (original)
+++ trunk/yt/lagos/BaseDataTypes.py Mon Mar 29 23:24:00 2010
@@ -2028,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()
@@ -2050,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