Skip to content

Commit 30ffc61

Browse files
committed
allow for bool verbose for backwards compatibility
1 parent af761b2 commit 30ffc61

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/common.jl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ function SciMLBase.init(prob::LinearProblem, alg::SciMLLinearSolveAlgorithm,
143143
abstol = default_tol(real(eltype(prob.b))),
144144
reltol = default_tol(real(eltype(prob.b))),
145145
maxiters::Int = length(prob.b),
146-
verbose::LinearVerbosity = LinearVerbosity(),
146+
verbose = LinearVerbosity(),
147147
Pl = nothing,
148148
Pr = nothing,
149149
assumptions = OperatorAssumptions(issquare(prob.A)),
@@ -200,6 +200,16 @@ function SciMLBase.init(prob::LinearProblem, alg::SciMLLinearSolveAlgorithm,
200200
deepcopy(A)
201201
end
202202

203+
if verbose isa Bool
204+
#@warn "Using `true` or `false` for `verbose` is being deprecated. Please use a `LinearVerbosity` type to specify verbosity settings.
205+
# For details see the verbosity section of the common solver options documentation page."
206+
if verbose
207+
verbose = LinearVerbosity()
208+
else
209+
verbose = LinearVerbosity(Verbosity.None())
210+
end
211+
end
212+
203213
b = if issparsematrix(b) && !(A isa Diagonal)
204214
Array(b) # the solution to a linear solve will always be dense!
205215
elseif alias_b || b isa SVector

0 commit comments

Comments
 (0)