Skip to content

Commit

Permalink
Merge pull request festim-dev#759 from RemDelaporteMathurin/tqdm-auto
Browse files Browse the repository at this point in the history
`tqdm.auto` instead of `tqdm.autonotebook` + refresh
  • Loading branch information
RemDelaporteMathurin authored Apr 22, 2024
2 parents b85ad9e + fa260c3 commit c7a4641
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions festim/hydrogen_transport_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import ufl
from mpi4py import MPI
import numpy as np
import tqdm.autonotebook
import tqdm.auto as tqdm
import festim as F

from dolfinx.mesh import meshtags
Expand Down Expand Up @@ -753,13 +753,14 @@ def run(self):

if self.settings.transient:
# Solve transient
self.progress = tqdm.autonotebook.tqdm(
self.progress = tqdm.tqdm(
desc="Solving H transport problem",
total=self.settings.final_time,
unit_scale=True,
)
while self.t.value < self.settings.final_time:
self.iterate()
self.progress.refresh() # refresh progress bar to show 100%
else:
# Solve steady-state
self.solver.solve(self.u)
Expand Down

0 comments on commit c7a4641

Please sign in to comment.