[yt-svn] commit/yt: ngoldbaum: Merged in xarthisius/yt (pull request #2063)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Mar 23 13:52:17 PDT 2016
1 new commit in yt:
http://link.bitbucket.org/wf/click?upn=8USRlNyft-2BCzk2l4Ywl6gDx2lD2xxoS9E7MwXb2SMR-2BXcTD42YocdnOFkyGBVHOU35mN8twSTI1Gi7VsPekIpMUswTuj9bKnpbC0mpd3P4I-3D_ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27CCJEexGM2WTORe9TTa6cibFsQq8VIzu6nZs2PWx3m-2Fft0dW2JvL6Mb37V7us6Fm6b-2FXuYIqLdVi-2BM1gevEhdUpgcb3yhDgucdd-2BlapCiraIws-2Ff9Pz0XC80PR5Q2MhHZx6QXmZXDX3f91leIZNFmNCYNw0wAcWSOmOKtC19w2mb6ggHBtEAatUOS2qKu5THco-3D
Changeset: 7538e9cb964c
Branch: yt
User: ngoldbaum
Date: 2016-03-23 20:52:08+00:00
Summary: Merged in xarthisius/yt (pull request #2063)
[opt] Drop units from tight loop in _integrate_through_brick
Affected #: 1 file
diff -r b00711a542af2b45a03e6aec8ee35ee83b0d3ccc -r 7538e9cb964c701a9bef8dcb3a788119997b97a8 yt/visualization/streamlines.py
--- a/yt/visualization/streamlines.py
+++ b/yt/visualization/streamlines.py
@@ -168,9 +168,11 @@
if self.get_magnitude:
self.magnitudes = self.comm.mpi_allreduce(
self.magnitudes, op='sum')
-
+
def _integrate_through_brick(self, node, stream, step,
periodic=False, mag=None):
+ LE = self.ds.domain_left_edge.d
+ RE = self.ds.domain_right_edge.d
while (step > 1):
self.volume.get_brick_data(node)
brick = node.data
@@ -183,13 +185,14 @@
brick.integrate_streamline(
stream[-step+1], self.direction*self.dx, marr)
mag[-step+1] = marr[0]
-
- if np.any(stream[-step+1,:] <= self.ds.domain_left_edge) | \
- np.any(stream[-step+1,:] >= self.ds.domain_right_edge):
+
+ cur_stream = stream[-step+1, :]
+ if np.sum(np.logical_or(cur_stream < LE, cur_stream >= RE)):
return 0
- if np.any(stream[-step+1,:] < node.get_left_edge()) | \
- np.any(stream[-step+1,:] >= node.get_right_edge()):
+ nLE = node.get_left_edge()
+ nRE = node.get_right_edge()
+ if np.sum(np.logical_or(cur_stream < nLE, cur_stream >= nRE)):
return step-1
step -= 1
return step
Repository URL: http://link.bitbucket.org/wf/click?upn=8USRlNyft-2BCzk2l4Ywl6gDx2lD2xxoS9E7MwXb2SMR-2BI0v8SbQq-2B8-2FZaaHaJT85r_ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27CCJEexGM2WTORe9TTa6cibFsQq8VIzu6nZs2PWx3m-2FfgJf6-2Fgu74FUHQiEMr8ai3KjZ4ny9R7c6NuTjrGv5km4BvwkualO-2Bp69KohafIs6gblC8VYwWeZRbAf13oIR0qYLf-2BsdiGZryAAMIRLs6z2G6ASlC2QOW4-2BCrYmvfXLAowmbu9V-2BA98kR1kvxOk1U7g-3D
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-svn-spacepope.org/attachments/20160323/de810c60/attachment.htm>
More information about the yt-svn
mailing list