[Yt-svn] commit/yt: MatthewTurk: Fix issue with id_offset in amr_kdtree. This fixes issues with non-Enzo codes
Bitbucket
commits-noreply at bitbucket.org
Mon Jun 20 17:14:13 PDT 2011
1 new changeset in yt:
http://bitbucket.org/yt_analysis/yt/changeset/e58ca7f8823a/
changeset: e58ca7f8823a
branch: yt
user: MatthewTurk
date: 2011-06-21 02:14:05
summary: Fix issue with id_offset in amr_kdtree. This fixes issues with non-Enzo codes
finding incorrect data sizes.
affected #: 1 file (79 bytes)
--- a/yt/utilities/amr_kdtree/amr_kdtree.py Mon Jun 20 16:29:49 2011 -0400
+++ b/yt/utilities/amr_kdtree/amr_kdtree.py Mon Jun 20 17:14:05 2011 -0700
@@ -259,6 +259,7 @@
self.current_split_dim = 0
self.pf = pf
+ self._id_offset = pf.h.grids[0]._id_offset
if nprocs > len(pf.h.grids):
print('Parallel rendering requires that the number of \n \
grids in the dataset is greater or equal to the number of \n \
@@ -568,7 +569,7 @@
None
"""
- thisnode.grid = self.pf.hierarchy.grids[thisnode.grid - 1]
+ thisnode.grid = self.pf.hierarchy.grids[thisnode.grid - self._id_offset]
dds = thisnode.grid.dds
gle = thisnode.grid.LeftEdge
@@ -844,7 +845,7 @@
# Check if we have children and have not exceeded l_max
if len(thisgrid.Children) > 0 and thisgrid.Level < self.l_max:
# Get the children that are actually in the current volume
- children = [child.id - 1 for child in thisgrid.Children
+ children = [child.id - self._id_offset for child in thisgrid.Children
if na.all(child.LeftEdge < current_node.r_corner) &
na.all(child.RightEdge > current_node.l_corner)]
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list