[yt-svn] commit/yt: samskillman: In some situations the -1 in here was causing the AMRKDTree to break. i.e. for one simulation with exactly 8 processors. This also seems to balance the kdtree a bit better, so that's also a plus.

Bitbucket commits-noreply at bitbucket.org
Mon Mar 12 17:35:53 PDT 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/f395f81cd252/
changeset:   f395f81cd252
branch:      yt
user:        samskillman
date:        2012-03-13 01:35:37
summary:     In some situations the -1 in here was causing the AMRKDTree to break. i.e. for one simulation with exactly 8 processors.  This also seems to balance the kdtree a bit better, so that's also a plus.
affected #:  1 file

diff -r afd860cd46d8dfca26bf7aa7a33049b654cd79c5 -r f395f81cd25249e217e90c04df84dba1ce478d44 yt/utilities/_amr_utils/misc_utilities.pyx
--- a/yt/utilities/_amr_utils/misc_utilities.pyx
+++ b/yt/utilities/_amr_utils/misc_utilities.pyx
@@ -228,7 +228,7 @@
         if n_unique > my_max:
             best_dim = dim
             my_max = n_unique
-            my_split = (n_unique-1)/2
+            my_split = (n_unique)/2
     # I recognize how lame this is.
     cdef np.ndarray[np.float64_t, ndim=1] tarr = np.empty(my_max, dtype='float64')
     for i in range(my_max):

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