[Yt-svn] yt: Adding DomainLeftEdge offset for calculating start_index on ...

hg at spacepope.org hg at spacepope.org
Sat Aug 7 17:03:55 PDT 2010


hg Repository: yt
details:   yt/rev/557e6bd74a85
changeset: 1913:557e6bd74a85
user:      Matthew Turk <matthewturk at gmail.com>
date:
Sat Aug 07 17:03:47 2010 -0700
description:
Adding DomainLeftEdge offset for calculating start_index on root tiles

diffstat:

 yt/lagos/BaseGridType.py |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r cbba77a0d476 -r 557e6bd74a85 yt/lagos/BaseGridType.py
--- a/yt/lagos/BaseGridType.py	Thu Aug 05 15:34:51 2010 -0400
+++ b/yt/lagos/BaseGridType.py	Sat Aug 07 17:03:47 2010 -0700
@@ -60,7 +60,8 @@
         if self.start_index != None:
             return self.start_index
         if self.Parent == None:
-            start_index = self.LeftEdge / self.dds
+            iLE = self.LeftEdge - self.pf["DomainLeftEdge"]
+            start_index = iLE / self.dds
             return na.rint(start_index).astype('int64').ravel()
         pdx = self.Parent.dds
         start_index = (self.Parent.get_global_startindex()) + \



More information about the yt-svn mailing list