diff --git a/src/bicgstabl.jl b/src/bicgstabl.jl index 0aa05f1e..ef2fddf5 100644 --- a/src/bicgstabl.jl +++ b/src/bicgstabl.jl @@ -29,7 +29,6 @@ function bicgstabl_iterator!(x, A, b, l::Int = 2; max_mv_products = size(A, 2), abstol::Real = zero(real(eltype(b))), reltol::Real = sqrt(eps(real(eltype(b)))), - tol = nothing, # TODO: Deprecations introduced in v0.8 initial_zero = false) T = eltype(x) n = size(A, 1) @@ -42,12 +41,6 @@ function bicgstabl_iterator!(x, A, b, l::Int = 2; residual = view(rs, :, 1) - # TODO: Deprecations introduced in v0.8 - if tol !== nothing - Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :bicgstabl_iterator!) - reltol = tol - end - # Compute the initial residual rs[:, 1] = b - A * x # Avoid computing A * 0. if initial_zero @@ -188,7 +181,6 @@ For BiCGStab(l) this is a less dubious term than "number of iterations"; function bicgstabl!(x, A, b, l = 2; abstol::Real = zero(real(eltype(b))), reltol::Real = sqrt(eps(real(eltype(b)))), - tol = nothing, # TODO: Deprecations introduced in v0.8 max_mv_products::Int = size(A, 2), log::Bool = false, verbose::Bool = false, @@ -201,12 +193,6 @@ function bicgstabl!(x, A, b, l = 2; # This doesn't yet make sense: the number of iters is smaller. log && reserve!(history, :resnorm, max_mv_products) - # TODO: Deprecations introduced in v0.8 - if tol !== nothing - Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :bicgstabl!) - reltol = tol - end - # Actually perform iterative solve iterable = bicgstabl_iterator!(x, A, b, l; Pl = Pl, abstol = abstol, reltol = reltol, diff --git a/src/cg.jl b/src/cg.jl index 804ddf7d..764ada16 100644 --- a/src/cg.jl +++ b/src/cg.jl @@ -120,7 +120,6 @@ end function cg_iterator!(x, A, b, Pl = Identity(); abstol::Real = zero(real(eltype(b))), reltol::Real = sqrt(eps(real(eltype(b)))), - tol = nothing, # TODO: Deprecations introduced in v0.8 maxiter::Int = size(A, 2), statevars::CGStateVariables = CGStateVariables(zero(x), similar(x), similar(x)), initially_zero::Bool = false) @@ -130,12 +129,6 @@ function cg_iterator!(x, A, b, Pl = Identity(); u .= zero(eltype(x)) copyto!(r, b) - # TODO: Deprecations introduced in v0.8 - if tol !== nothing - Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :cg_iterator!) - reltol = tol - end - # Compute r with an MV-product or not. if initially_zero mv_products = 0 @@ -213,7 +206,6 @@ cg(A, b; kwargs...) = cg!(zerox(A, b), A, b; initially_zero = true, kwargs...) function cg!(x, A, b; abstol::Real = zero(real(eltype(b))), reltol::Real = sqrt(eps(real(eltype(b)))), - tol = nothing, # TODO: Deprecations introduced in v0.8 maxiter::Int = size(A, 2), log::Bool = false, statevars::CGStateVariables = CGStateVariables(zero(x), similar(x), similar(x)), @@ -225,12 +217,6 @@ function cg!(x, A, b; history[:reltol] = reltol log && reserve!(history, :resnorm, maxiter + 1) - # TODO: Deprecations introduced in v0.8 - if tol !== nothing - Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :cg!) - reltol = tol - end - # Actually perform CG iterable = cg_iterator!(x, A, b, Pl; abstol = abstol, reltol = reltol, maxiter = maxiter, statevars = statevars, kwargs...) diff --git a/src/chebyshev.jl b/src/chebyshev.jl index f4b697b1..c28989f8 100644 --- a/src/chebyshev.jl +++ b/src/chebyshev.jl @@ -59,7 +59,6 @@ end function chebyshev_iterable!(x, A, b, λmin::Real, λmax::Real; abstol::Real = zero(real(eltype(b))), reltol::Real = sqrt(eps(real(eltype(b)))), - tol = nothing, # TODO: Deprecations introduced in v0.8 maxiter = size(A, 2), Pl = Identity(), initially_zero = false) @@ -73,12 +72,6 @@ function chebyshev_iterable!(x, A, b, λmin::Real, λmax::Real; u = zero(x) c = similar(x) - # TODO: Deprecations introduced in v0.8 - if tol !== nothing - Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :chebyshev_iterable!) - reltol = tol - end - # One MV product less if initially_zero mv_products = 0 @@ -148,7 +141,6 @@ Solve Ax = b for symmetric, definite matrices A using Chebyshev iteration. function chebyshev!(x, A, b, λmin::Real, λmax::Real; abstol::Real = zero(real(eltype(b))), reltol::Real = sqrt(eps(real(eltype(b)))), - tol = nothing, # TODO: Deprecations introduced in v0.8 Pl = Identity(), maxiter::Int=size(A, 2), log::Bool=false, @@ -161,12 +153,6 @@ function chebyshev!(x, A, b, λmin::Real, λmax::Real; verbose && @printf("=== chebyshev ===\n%4s\t%7s\n","iter","resnorm") - # TODO: Deprecations introduced in v0.8 - if tol !== nothing - Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :chebyshev!) - reltol = tol - end - iterable = chebyshev_iterable!(x, A, b, λmin, λmax; abstol=abstol, reltol=reltol, maxiter=maxiter, Pl=Pl, initially_zero=initially_zero) history.mvps = iterable.mv_products diff --git a/src/gmres.jl b/src/gmres.jl index 3573b284..b8fec7f1 100644 --- a/src/gmres.jl +++ b/src/gmres.jl @@ -107,18 +107,11 @@ function gmres_iterable!(x, A, b; Pr = Identity(), abstol::Real = zero(real(eltype(b))), reltol::Real = sqrt(eps(real(eltype(b)))), - tol = nothing, # TODO: Deprecations introduced in v0.8 restart::Int = min(20, size(A, 2)), maxiter::Int = size(A, 2), initially_zero::Bool = false) T = eltype(x) - # TODO: Deprecations introduced in v0.8 - if tol !== nothing - Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :gmres_iterable!) - reltol = tol - end - # Approximate solution arnoldi = ArnoldiDecomp(A, restart, T) residual = Residual(restart, T) @@ -187,7 +180,6 @@ function gmres!(x, A, b; Pr = Identity(), abstol::Real = zero(real(eltype(b))), reltol::Real = sqrt(eps(real(eltype(b)))), - tol = nothing, # TODO: Deprecations introduced in v0.8 restart::Int = min(20, size(A, 2)), maxiter::Int = size(A, 2), log::Bool = false, @@ -198,12 +190,6 @@ function gmres!(x, A, b; history[:reltol] = reltol log && reserve!(history, :resnorm, maxiter) - # TODO: Deprecations introduced in v0.8 - if tol !== nothing - Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :gmres!) - reltol = tol - end - iterable = gmres_iterable!(x, A, b; Pl = Pl, Pr = Pr, abstol = abstol, reltol = reltol, maxiter = maxiter, restart = restart, initially_zero = initially_zero) diff --git a/src/idrs.jl b/src/idrs.jl index 9a62d5d7..f501c516 100644 --- a/src/idrs.jl +++ b/src/idrs.jl @@ -48,7 +48,6 @@ function idrs!(x, A, b; s = 8, abstol::Real = zero(real(eltype(b))), reltol::Real = sqrt(eps(real(eltype(b)))), - tol = nothing, # TODO: Deprecations introduced in v0.8 maxiter=size(A, 2), log::Bool=false, kwargs...) @@ -56,13 +55,6 @@ function idrs!(x, A, b; history[:abstol] = abstol history[:reltol] = reltol log && reserve!(history, :resnorm, maxiter) - - # TODO: Deprecations introduced in v0.8 - if tol !== nothing - Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :idrs!) - reltol = tol - end - idrs_method!(history, x, A, b, s, abstol, reltol, maxiter; kwargs...) log && shrink!(history) log ? (x, history) : x diff --git a/src/minres.jl b/src/minres.jl index 96e7cdb3..9606b138 100644 --- a/src/minres.jl +++ b/src/minres.jl @@ -41,7 +41,6 @@ function minres_iterable!(x, A, b; skew_hermitian::Bool = false, abstol::Real = zero(real(eltype(b))), reltol::Real = sqrt(eps(real(eltype(b)))), - tol = nothing, # TODO: Deprecations introduced in v0.8 maxiter = size(A, 2)) T = eltype(x) HessenbergT = skew_hermitian ? T : real(T) @@ -54,12 +53,6 @@ function minres_iterable!(x, A, b; w_curr = similar(x) w_next = similar(x) - # TODO: Deprecations introduced in v0.8 - if tol !== nothing - Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :minres_iterable!) - reltol = tol - end - mv_products = 0 # For nonzero x's, we must do an MV for the initial residual vec @@ -212,7 +205,6 @@ function minres!(x, A, b; log::Bool = false, abstol::Real = zero(real(eltype(b))), reltol::Real = sqrt(eps(real(eltype(b)))), - tol = nothing, # TODO: Deprecations introduced in v0.8 maxiter::Int = size(A, 2), initially_zero::Bool = false) history = ConvergenceHistory(partial = !log) @@ -220,12 +212,6 @@ function minres!(x, A, b; history[:reltol] = reltol log && reserve!(history, :resnorm, maxiter) - # TODO: Deprecations introduced in v0.8 - if tol !== nothing - Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :minres!) - reltol = tol - end - iterable = minres_iterable!(x, A, b; skew_hermitian = skew_hermitian, abstol = abstol, reltol = reltol, diff --git a/src/qmr.jl b/src/qmr.jl index 6ec9bd92..69b6c4f9 100644 --- a/src/qmr.jl +++ b/src/qmr.jl @@ -120,18 +120,11 @@ end function qmr_iterable!(x, A, b; abstol::Real = zero(real(eltype(b))), reltol::Real = sqrt(eps(real(eltype(b)))), - tol = nothing, # TODO: Deprecations introduced in v0.8 maxiter::Int = size(A, 2), initially_zero::Bool = false, lookahead::Bool = false) T = eltype(x) - # TODO: Deprecations introduced in v0.8 - if tol !== nothing - Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :qmr_iterable!) - reltol = tol - end - lanczos = LanczosDecomp(x, A, b, initially_zero = initially_zero) resnorm = lanczos.resnorm @@ -272,7 +265,6 @@ Solves the problem ``Ax = b`` with the Quasi-Minimal Residual (QMR) method. function qmr!(x, A, b; abstol::Real = zero(real(eltype(b))), reltol::Real = sqrt(eps(real(eltype(b)))), - tol = nothing, # TODO: Deprecations introduced in v0.8 maxiter::Int = size(A, 2), lookahead::Bool = false, log::Bool = false, @@ -283,12 +275,6 @@ function qmr!(x, A, b; history[:reltol] = reltol log && reserve!(history, :resnorm, maxiter) - # TODO: Deprecations introduced in v0.8 - if tol !== nothing - Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :qmr!) - reltol = tol - end - iterable = qmr_iterable!(x, A, b; abstol = abstol, reltol = reltol, maxiter = maxiter, initially_zero = initially_zero) diff --git a/test/deprecations.jl b/test/deprecations.jl index 782cfe4c..b6475c70 100644 --- a/test/deprecations.jl +++ b/test/deprecations.jl @@ -3,17 +3,7 @@ module TestDeprecations using IterativeSolvers using Test -@testset "Test depwarn for tol" begin - A = rand(2, 2) - b = rand(2) - - @test_deprecated cg(A, b, tol=1.0, maxiter=1) - @test_deprecated bicgstabl(A, b, 1, tol=1.0, max_mv_products=1) - @test_deprecated chebyshev(A, b, 0.0, 1.0, tol=1.0, maxiter=1) - @test_deprecated gmres(A, b, tol=1.0, maxiter=1) - @test_deprecated idrs(A, b, tol=1.0, maxiter=1) - @test_deprecated minres(A, b, tol=1.0, maxiter=1) - @test_deprecated qmr(A, b, tol=1.0, maxiter=1) -end +# Currently nothing here. +@test true end # module