[Yt-svn] yt-commit r1703 - trunk/yt/lagos
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Tue Apr 27 20:54:11 PDT 2010
Author: mturk
Date: Tue Apr 27 20:54:10 2010
New Revision: 1703
URL: http://yt.enzotools.org/changeset/1703
Log:
This fixes a projection bug for some cases where epsilon shows up in the
dds1/dds2 calculation to get refinement factors between grids, thus changing
rounding from one value to another.
Modified:
trunk/yt/lagos/BaseDataTypes.py
Modified: trunk/yt/lagos/BaseDataTypes.py
==============================================================================
--- trunk/yt/lagos/BaseDataTypes.py (original)
+++ trunk/yt/lagos/BaseDataTypes.py Tue Apr 27 20:54:10 2010
@@ -1337,8 +1337,11 @@
args = []
args += self.__retval_coords[grid2.id] + [self.__retval_fields[grid2.id]]
args += self.__retval_coords[grid1.id] + [self.__retval_fields[grid1.id]]
- # Refinement factor, which is same in all directions
- args.append(int(grid2.dds[0] / grid1.dds[0]))
+ # Refinement factor, which is same in all directions. Note
+ # that this complicated rounding is because sometimes
+ # epsilon differences in dds between the grids causes this
+ # to round to up or down from the expected value.
+ args.append(int(na.rint(grid2.dds / grid1.dds)[0]))
args.append(na.ones(args[0].shape, dtype='int64'))
kk = PointCombine.CombineGrids(*args)
goodI = args[-1].astype('bool')
More information about the yt-svn
mailing list