[yt-svn] commit/yt: MatthewTurk: Backporting volume / progressbar fix to stable.

Bitbucket commits-noreply at bitbucket.org
Wed Sep 19 06:08:25 PDT 2012


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/f22174bd62d5/
changeset:   f22174bd62d5
branch:      stable
user:        MatthewTurk
date:        2012-09-19 15:08:03
summary:     Backporting volume / progressbar fix to stable.
affected #:  1 file

diff -r b076773c7f269f5044e1ff98a02f9e82709ef674 -r f22174bd62d5b5c140b19bb38c99d20f34b037ee yt/utilities/amr_kdtree/amr_kdtree.py
--- a/yt/utilities/amr_kdtree/amr_kdtree.py
+++ b/yt/utilities/amr_kdtree/amr_kdtree.py
@@ -998,11 +998,11 @@
         anprocs = 2**par_tree_depth
 
         volume_partitioned = 0.0
-        pbar = get_pbar("Building kd-Tree",
-                na.prod(self.domain_right_edge-self.domain_left_edge))
+        total_vol = na.prod(self.domain_right_edge-self.domain_left_edge)
+        pbar = get_pbar("Building kd-Tree", total_vol)
 
         while current_node is not None:
-            pbar.update(volume_partitioned)
+            pbar.update(min(volume_partitioned, total_vol))
 
             # If we don't have any grids, that means we are revisiting
             # a dividing node, and there is nothing to be done.

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