Skip to content

Commit

Permalink
deleteing iter_limit from all check_convergence solvers
Browse files Browse the repository at this point in the history
  • Loading branch information
amirDahari1 committed Nov 13, 2023
1 parent 9c3c3c1 commit a4f3440
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions taufactor/taufactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,7 @@ def solve(self, iter_limit=5000, verbose=True, conv_crit=2*10**-2, D_0=1):
out = out[:, 2:-2]
out /= self.nn
if self.iter % 50 == 0:
self.converged = self.check_convergence(
verbose, conv_crit, start, iter_limit)
self.converged = self.check_convergence(verbose, conv_crit)
out -= self.conc[:, 2:-2]
out *= self.cb[self.iter % 2]
self.conc[:, 2:-2] += out
Expand Down Expand Up @@ -440,16 +439,15 @@ def solve(self, iter_limit=5000, verbose=True, conv_crit=2*10**-2):
self.pre_factors[5][:, 1:-1, 1:-1, :-2]
out /= self.nn
if self.iter % 20 == 0:
self.converged = self.check_convergence(
verbose, conv_crit, start, iter_limit)
self.converged = self.check_convergence(verbose, conv_crit)
out -= self.crop(self.conc, 1)
out *= self.cb[self.iter % 2]
self.conc[:, 1:-1, 1:-1, 1:-1] += out

self.end_simulation(iter_limit, verbose, start)
return self.tau

def check_convergence(self, verbose, conv_crit, start, iter_limit):
def check_convergence(self, verbose, conv_crit):
# print progress
if self.iter % 100 == 0:
self.semi_converged, self.new_fl, err = self.check_vertical_flux(
Expand Down

0 comments on commit a4f3440

Please sign in to comment.