[pyfr] 35/88: Minor tweaks to the progress bar.

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Wed Nov 16 12:05:27 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository pyfr.

commit ad4d452dba60160a2e435b512e120cb5a1c065fb
Author: Freddie Witherden <freddie at witherden.org>
Date:   Fri May 20 09:11:07 2016 -0700

    Minor tweaks to the progress bar.
---
 pyfr/progress_bar.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pyfr/progress_bar.py b/pyfr/progress_bar.py
index dc492a3..ea22ac0 100644
--- a/pyfr/progress_bar.py
+++ b/pyfr/progress_bar.py
@@ -60,14 +60,14 @@ class ProgressBar(object):
         if delta < self._mindelta and self.stcurr != self.stend:
             return
 
-        # Starting, current, elapsed and ending simulation times
+        # Starting, current, elapsed, and ending simulation times
         st, cu, el, en = self.ststrt, self.stcurr, self.stelap, self.stend
 
         # Relative times
         rcu, ren = cu - st,  en - st
 
         # Fraction of the simulation we've completed
-        frac = float(rcu) / ren
+        frac = rcu / ren
 
         # Elapsed and estimated remaining wall time
         wela = format_hms(wallt)
@@ -76,7 +76,7 @@ class ProgressBar(object):
         # Decide how many '+', '=' and ' ' to output for the progress bar
         n = self._nbarcol - len(wela) - len(wrem) - 1
         nps = int(n * (rcu - el)/ren)
-        neq = int(n * el/ren)
+        neq = int(round(n * el/ren))
         nsp = n - nps - neq
 
         # Render the progress bar

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pyfr.git



More information about the debian-science-commits mailing list