Skip to content

Commit 19a2cd1

Browse files
authored
Properly pass tol_min in default dynamic tolerances (#221)
1 parent d6ec6c9 commit 19a2cd1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utility/defaults.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function alg_gauge(; tol=tolgauge, maxiter=maxiter, verbosity=VERBOSE_WARN,
4040
dynamic_tols=dynamic_tols, tol_min=tol_min, tol_max=tol_max,
4141
tol_factor=gauge_tolfactor)
4242
alg = (; tol, maxiter, verbosity)
43-
return dynamic_tols ? DynamicTol(alg, tol, tol_max, tol_factor) : alg
43+
return dynamic_tols ? DynamicTol(alg, tol_min, tol_max, tol_factor) : alg
4444
end
4545

4646
function alg_eigsolve(; ishermitian=true, tol=tol, maxiter=maxiter, verbosity=0,
@@ -50,15 +50,15 @@ function alg_eigsolve(; ishermitian=true, tol=tol, maxiter=maxiter, verbosity=0,
5050
tol_factor=eigs_tolfactor)
5151
alg = ishermitian ? Lanczos(; tol, maxiter, eager, krylovdim, verbosity) :
5252
Arnoldi(; tol, maxiter, eager, krylovdim, verbosity)
53-
return dynamic_tols ? DynamicTol(alg, tol, tol_max, tol_factor) : alg
53+
return dynamic_tols ? DynamicTol(alg, tol_min, tol_max, tol_factor) : alg
5454
end
5555

5656
# TODO: make verbosity and maxiter actually do something
5757
function alg_environments(; tol=tol, maxiter=maxiter, verbosity=0,
5858
dynamic_tols=dynamic_tols, tol_min=tol_min, tol_max=tol_max,
5959
tol_factor=envs_tolfactor)
6060
alg = (; tol, maxiter, verbosity)
61-
return dynamic_tols ? DynamicTol(alg, tol, tol_max, tol_factor) : alg
61+
return dynamic_tols ? DynamicTol(alg, tol_min, tol_max, tol_factor) : alg
6262
end
6363
function alg_expsolve(; tol=tol, maxiter=maxiter, verbosity=0,
6464
ishermitian=true, krylovdim=krylovdim)

0 commit comments

Comments
 (0)