[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Mar 23 13:52:22 PDT 2016
2 new commits in yt:
http://link.bitbucket.org/wf/click?upn=8USRlNyft-2BCzk2l4Ywl6gDx2lD2xxoS9E7MwXb2SMR-2BXcTD42YocdnOFkyGBVHOUAchk22Bra1uPzfcVEmVhjmBR0Xd4fD3pVn-2FmBxUXF1Q-3D_ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27BNEC8-2FBDb7f-2FFuAwaAoCXwGA9Rg78h-2BLhm2A7p-2F7B5py5Pr-2BY04XsQ-2FkEB7z2sZvU8teSEE4gYUQ4I4HQOfRHv2Qsjvrgp7Eb67PmxYwkVrHti3YjzQuDAkcIdxhxF-2FGUlMkuV3l2knJr5FcXSkEvsKThtrzKRX7Rhb8l9Hq9NaPnl1B4GoNhzgteExCF7wro-3D
Changeset: ba537a082b93
Branch: yt
User: xarthisius
Date: 2016-03-22 02:38:46+00:00
Summary: Drop units from tight loop in _integrate_through_brick
Affected #: 1 file
diff -r de823c10fed9f0b5fd4acf0512c45fc7d9cc491a -r ba537a082b939d99286d80583eaed0ec76052695 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
http://link.bitbucket.org/wf/click?upn=8USRlNyft-2BCzk2l4Ywl6gDx2lD2xxoS9E7MwXb2SMR-2BXcTD42YocdnOFkyGBVHOU35mN8twSTI1Gi7VsPekIpMUswTuj9bKnpbC0mpd3P4I-3D_ll4ctv0L-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27BNEC8-2FBDb7f-2FFuAwaAoCXwGA9Rg78h-2BLhm2A7p-2F7B5p73-2B8V0ld9n69gZ-2BwU4mQnDAeiB5sb6bd3CbH5y-2BYRNFIOUXh8bAW-2Fm2geukCMNUd-2Fn8HxLryGIzhQKugmihLryFj2kWXueLM0djmpR0dDye7Ft74doSk-2Fx96E9a9MVpDip3Cr890QiQwjujbXjJFq8-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-2ByeRZFC1LslHcg6aJmnQ70VruLbmeLQr27BNEC8-2FBDb7f-2FFuAwaAoCXwGA9Rg78h-2BLhm2A7p-2F7B5p-2BQ-2BjFQB-2FJMfrnsfzvGvINQIDfGhZU4UIBml2XlgY7w8GZahBhwswriX80GZQRvpEQMLi8dtyjNeOWUpH-2FhpJasun7cs004DfSfv92DUyoXT-2F5w4vGC8TTXZAIWiwak-2FrMbxuOK0Ce9kbzb-2BlXbwB4M-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/999b6540/attachment.html>
More information about the yt-svn
mailing list