Skip to content

Commit 90d4241

Browse files
committed
No more depwarns for 0.9
1 parent bf52848 commit 90d4241

File tree

8 files changed

+2
-104
lines changed

8 files changed

+2
-104
lines changed

src/bicgstabl.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ function bicgstabl_iterator!(x, A, b, l::Int = 2;
2929
max_mv_products = size(A, 2),
3030
abstol::Real = zero(real(eltype(b))),
3131
reltol::Real = sqrt(eps(real(eltype(b)))),
32-
tol = nothing, # TODO: Deprecations introduced in v0.8
3332
initial_zero = false)
3433
T = eltype(x)
3534
n = size(A, 1)
@@ -42,12 +41,6 @@ function bicgstabl_iterator!(x, A, b, l::Int = 2;
4241

4342
residual = view(rs, :, 1)
4443

45-
# TODO: Deprecations introduced in v0.8
46-
if tol !== nothing
47-
Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :bicgstabl_iterator!)
48-
reltol = tol
49-
end
50-
5144
# Compute the initial residual rs[:, 1] = b - A * x
5245
# Avoid computing A * 0.
5346
if initial_zero
@@ -188,7 +181,6 @@ For BiCGStab(l) this is a less dubious term than "number of iterations";
188181
function bicgstabl!(x, A, b, l = 2;
189182
abstol::Real = zero(real(eltype(b))),
190183
reltol::Real = sqrt(eps(real(eltype(b)))),
191-
tol = nothing, # TODO: Deprecations introduced in v0.8
192184
max_mv_products::Int = size(A, 2),
193185
log::Bool = false,
194186
verbose::Bool = false,
@@ -201,12 +193,6 @@ function bicgstabl!(x, A, b, l = 2;
201193
# This doesn't yet make sense: the number of iters is smaller.
202194
log && reserve!(history, :resnorm, max_mv_products)
203195

204-
# TODO: Deprecations introduced in v0.8
205-
if tol !== nothing
206-
Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :bicgstabl!)
207-
reltol = tol
208-
end
209-
210196
# Actually perform iterative solve
211197
iterable = bicgstabl_iterator!(x, A, b, l; Pl = Pl,
212198
abstol = abstol, reltol = reltol,

src/cg.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ end
120120
function cg_iterator!(x, A, b, Pl = Identity();
121121
abstol::Real = zero(real(eltype(b))),
122122
reltol::Real = sqrt(eps(real(eltype(b)))),
123-
tol = nothing, # TODO: Deprecations introduced in v0.8
124123
maxiter::Int = size(A, 2),
125124
statevars::CGStateVariables = CGStateVariables(zero(x), similar(x), similar(x)),
126125
initially_zero::Bool = false)
@@ -130,12 +129,6 @@ function cg_iterator!(x, A, b, Pl = Identity();
130129
u .= zero(eltype(x))
131130
copyto!(r, b)
132131

133-
# TODO: Deprecations introduced in v0.8
134-
if tol !== nothing
135-
Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :cg_iterator!)
136-
reltol = tol
137-
end
138-
139132
# Compute r with an MV-product or not.
140133
if initially_zero
141134
mv_products = 0
@@ -213,7 +206,6 @@ cg(A, b; kwargs...) = cg!(zerox(A, b), A, b; initially_zero = true, kwargs...)
213206
function cg!(x, A, b;
214207
abstol::Real = zero(real(eltype(b))),
215208
reltol::Real = sqrt(eps(real(eltype(b)))),
216-
tol = nothing, # TODO: Deprecations introduced in v0.8
217209
maxiter::Int = size(A, 2),
218210
log::Bool = false,
219211
statevars::CGStateVariables = CGStateVariables(zero(x), similar(x), similar(x)),
@@ -225,12 +217,6 @@ function cg!(x, A, b;
225217
history[:reltol] = reltol
226218
log && reserve!(history, :resnorm, maxiter + 1)
227219

228-
# TODO: Deprecations introduced in v0.8
229-
if tol !== nothing
230-
Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :cg!)
231-
reltol = tol
232-
end
233-
234220
# Actually perform CG
235221
iterable = cg_iterator!(x, A, b, Pl; abstol = abstol, reltol = reltol, maxiter = maxiter,
236222
statevars = statevars, kwargs...)

src/chebyshev.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ end
5959
function chebyshev_iterable!(x, A, b, λmin::Real, λmax::Real;
6060
abstol::Real = zero(real(eltype(b))),
6161
reltol::Real = sqrt(eps(real(eltype(b)))),
62-
tol = nothing, # TODO: Deprecations introduced in v0.8
6362
maxiter = size(A, 2),
6463
Pl = Identity(),
6564
initially_zero = false)
@@ -73,12 +72,6 @@ function chebyshev_iterable!(x, A, b, λmin::Real, λmax::Real;
7372
u = zero(x)
7473
c = similar(x)
7574

76-
# TODO: Deprecations introduced in v0.8
77-
if tol !== nothing
78-
Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :chebyshev_iterable!)
79-
reltol = tol
80-
end
81-
8275
# One MV product less
8376
if initially_zero
8477
mv_products = 0
@@ -148,7 +141,6 @@ Solve Ax = b for symmetric, definite matrices A using Chebyshev iteration.
148141
function chebyshev!(x, A, b, λmin::Real, λmax::Real;
149142
abstol::Real = zero(real(eltype(b))),
150143
reltol::Real = sqrt(eps(real(eltype(b)))),
151-
tol = nothing, # TODO: Deprecations introduced in v0.8
152144
Pl = Identity(),
153145
maxiter::Int=size(A, 2),
154146
log::Bool=false,
@@ -161,12 +153,6 @@ function chebyshev!(x, A, b, λmin::Real, λmax::Real;
161153

162154
verbose && @printf("=== chebyshev ===\n%4s\t%7s\n","iter","resnorm")
163155

164-
# TODO: Deprecations introduced in v0.8
165-
if tol !== nothing
166-
Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :chebyshev!)
167-
reltol = tol
168-
end
169-
170156
iterable = chebyshev_iterable!(x, A, b, λmin, λmax; abstol=abstol, reltol=reltol,
171157
maxiter=maxiter, Pl=Pl, initially_zero=initially_zero)
172158
history.mvps = iterable.mv_products

src/gmres.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,11 @@ function gmres_iterable!(x, A, b;
107107
Pr = Identity(),
108108
abstol::Real = zero(real(eltype(b))),
109109
reltol::Real = sqrt(eps(real(eltype(b)))),
110-
tol = nothing, # TODO: Deprecations introduced in v0.8
111110
restart::Int = min(20, size(A, 2)),
112111
maxiter::Int = size(A, 2),
113112
initially_zero::Bool = false)
114113
T = eltype(x)
115114

116-
# TODO: Deprecations introduced in v0.8
117-
if tol !== nothing
118-
Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :gmres_iterable!)
119-
reltol = tol
120-
end
121-
122115
# Approximate solution
123116
arnoldi = ArnoldiDecomp(A, restart, T)
124117
residual = Residual(restart, T)
@@ -187,7 +180,6 @@ function gmres!(x, A, b;
187180
Pr = Identity(),
188181
abstol::Real = zero(real(eltype(b))),
189182
reltol::Real = sqrt(eps(real(eltype(b)))),
190-
tol = nothing, # TODO: Deprecations introduced in v0.8
191183
restart::Int = min(20, size(A, 2)),
192184
maxiter::Int = size(A, 2),
193185
log::Bool = false,
@@ -198,12 +190,6 @@ function gmres!(x, A, b;
198190
history[:reltol] = reltol
199191
log && reserve!(history, :resnorm, maxiter)
200192

201-
# TODO: Deprecations introduced in v0.8
202-
if tol !== nothing
203-
Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :gmres!)
204-
reltol = tol
205-
end
206-
207193
iterable = gmres_iterable!(x, A, b; Pl = Pl, Pr = Pr,
208194
abstol = abstol, reltol = reltol, maxiter = maxiter,
209195
restart = restart, initially_zero = initially_zero)

src/idrs.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,13 @@ function idrs!(x, A, b;
4848
s = 8,
4949
abstol::Real = zero(real(eltype(b))),
5050
reltol::Real = sqrt(eps(real(eltype(b)))),
51-
tol = nothing, # TODO: Deprecations introduced in v0.8
5251
maxiter=size(A, 2),
5352
log::Bool=false,
5453
kwargs...)
5554
history = ConvergenceHistory(partial=!log)
5655
history[:abstol] = abstol
5756
history[:reltol] = reltol
5857
log && reserve!(history, :resnorm, maxiter)
59-
60-
# TODO: Deprecations introduced in v0.8
61-
if tol !== nothing
62-
Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :idrs!)
63-
reltol = tol
64-
end
65-
6658
idrs_method!(history, x, A, b, s, abstol, reltol, maxiter; kwargs...)
6759
log && shrink!(history)
6860
log ? (x, history) : x

src/minres.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ function minres_iterable!(x, A, b;
4141
skew_hermitian::Bool = false,
4242
abstol::Real = zero(real(eltype(b))),
4343
reltol::Real = sqrt(eps(real(eltype(b)))),
44-
tol = nothing, # TODO: Deprecations introduced in v0.8
4544
maxiter = size(A, 2))
4645
T = eltype(x)
4746
HessenbergT = skew_hermitian ? T : real(T)
@@ -54,12 +53,6 @@ function minres_iterable!(x, A, b;
5453
w_curr = similar(x)
5554
w_next = similar(x)
5655

57-
# TODO: Deprecations introduced in v0.8
58-
if tol !== nothing
59-
Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :minres_iterable!)
60-
reltol = tol
61-
end
62-
6356
mv_products = 0
6457

6558
# For nonzero x's, we must do an MV for the initial residual vec
@@ -212,20 +205,13 @@ function minres!(x, A, b;
212205
log::Bool = false,
213206
abstol::Real = zero(real(eltype(b))),
214207
reltol::Real = sqrt(eps(real(eltype(b)))),
215-
tol = nothing, # TODO: Deprecations introduced in v0.8
216208
maxiter::Int = size(A, 2),
217209
initially_zero::Bool = false)
218210
history = ConvergenceHistory(partial = !log)
219211
history[:abstol] = abstol
220212
history[:reltol] = reltol
221213
log && reserve!(history, :resnorm, maxiter)
222214

223-
# TODO: Deprecations introduced in v0.8
224-
if tol !== nothing
225-
Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :minres!)
226-
reltol = tol
227-
end
228-
229215
iterable = minres_iterable!(x, A, b;
230216
skew_hermitian = skew_hermitian,
231217
abstol = abstol, reltol = reltol,

src/qmr.jl

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -120,18 +120,11 @@ end
120120
function qmr_iterable!(x, A, b;
121121
abstol::Real = zero(real(eltype(b))),
122122
reltol::Real = sqrt(eps(real(eltype(b)))),
123-
tol = nothing, # TODO: Deprecations introduced in v0.8
124123
maxiter::Int = size(A, 2),
125124
initially_zero::Bool = false,
126125
lookahead::Bool = false)
127126
T = eltype(x)
128127

129-
# TODO: Deprecations introduced in v0.8
130-
if tol !== nothing
131-
Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :qmr_iterable!)
132-
reltol = tol
133-
end
134-
135128
lanczos = LanczosDecomp(x, A, b, initially_zero = initially_zero)
136129

137130
resnorm = lanczos.resnorm
@@ -272,7 +265,6 @@ Solves the problem ``Ax = b`` with the Quasi-Minimal Residual (QMR) method.
272265
function qmr!(x, A, b;
273266
abstol::Real = zero(real(eltype(b))),
274267
reltol::Real = sqrt(eps(real(eltype(b)))),
275-
tol = nothing, # TODO: Deprecations introduced in v0.8
276268
maxiter::Int = size(A, 2),
277269
lookahead::Bool = false,
278270
log::Bool = false,
@@ -283,12 +275,6 @@ function qmr!(x, A, b;
283275
history[:reltol] = reltol
284276
log && reserve!(history, :resnorm, maxiter)
285277

286-
# TODO: Deprecations introduced in v0.8
287-
if tol !== nothing
288-
Base.depwarn("The keyword argument `tol` is deprecated, use `reltol` instead.", :qmr!)
289-
reltol = tol
290-
end
291-
292278
iterable = qmr_iterable!(x, A, b; abstol = abstol, reltol = reltol,
293279
maxiter = maxiter, initially_zero = initially_zero)
294280

test/deprecations.jl

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,7 @@ module TestDeprecations
33
using IterativeSolvers
44
using Test
55

6-
@testset "Test depwarn for tol" begin
7-
A = rand(2, 2)
8-
b = rand(2)
9-
10-
@test_deprecated cg(A, b, tol=1.0, maxiter=1)
11-
@test_deprecated bicgstabl(A, b, 1, tol=1.0, max_mv_products=1)
12-
@test_deprecated chebyshev(A, b, 0.0, 1.0, tol=1.0, maxiter=1)
13-
@test_deprecated gmres(A, b, tol=1.0, maxiter=1)
14-
@test_deprecated idrs(A, b, tol=1.0, maxiter=1)
15-
@test_deprecated minres(A, b, tol=1.0, maxiter=1)
16-
@test_deprecated qmr(A, b, tol=1.0, maxiter=1)
17-
end
6+
# Currently nothing here.
7+
@test true
188

199
end # module

0 commit comments

Comments
 (0)