[yt-svn] commit/yt: ngoldbaum: Merged in MatthewTurk/yt (pull request #1152)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue Sep 2 15:48:26 PDT 2014
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/f25f41eb4304/
Changeset: f25f41eb4304
Branch: yt
User: ngoldbaum
Date: 2014-09-03 00:48:18
Summary: Merged in MatthewTurk/yt (pull request #1152)
Revert my changes to disk selector
Affected #: 1 file
diff -r 632fa696f6d4edab835eb717bd985f3cee4dbb91 -r f25f41eb4304ada81288cad3ce022e5e9214eed1 yt/geometry/selection_routines.pyx
--- a/yt/geometry/selection_routines.pyx
+++ b/yt/geometry/selection_routines.pyx
@@ -802,14 +802,9 @@
cdef np.float64_t h, d, r2, temp, spos
cdef int i, j, k
h = d = 0
- for ax in range(3):
- temp = 1e30
- for i in range(3):
- if self.periodicity[ax] == 0 and i != 1: continue
- spos = pos[ax] + (i-1)*self.domain_width[ax]
- if fabs(spos - self.center[ax]) < fabs(temp):
- temp = spos - self.center[ax]
- h += temp * self.norm_vec[ax]
+ for i in range(3):
+ temp = self.difference(pos[i], self.center[i], i)
+ h += temp * self.norm_vec[i]
d += temp*temp
r2 = (d - h*h)
if fabs(h) <= self.height and r2 <= self.radius2: return 1
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