Skip to content

Commit d63010f

Browse files
committed
imports
1 parent fa33bd2 commit d63010f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ext/LinearSolveKrylovKitExt.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module LinearSolveKrylovKitExt
22

33
using LinearSolve, KrylovKit, LinearAlgebra
4+
using SciMLVerbosity: @match, Verbosity
45
using LinearSolve: LinearCache, DEFAULT_PRECS
56

67
function LinearSolve.KrylovKitJL(args...;
@@ -25,8 +26,7 @@ function SciMLBase.solve!(cache::LinearCache, alg::KrylovKitJL; kwargs...)
2526
atol = float(cache.abstol)
2627
rtol = float(cache.reltol)
2728
maxiter = cache.maxiters
28-
verbosity = cache.verbose ? 1 : 0
29-
verbosity = verbosity_to_KrylovKit(cache.verbose.numerical.Krylovkit_verbosity)
29+
verbosity = verbosity_to_KrylovKit(cache.verbose.numerical.KrylovKit_verbosity)
3030
krylovdim = (alg.gmres_restart == 0) ? min(20, size(cache.A, 1)) : alg.gmres_restart
3131

3232
kwargs = (atol = atol, rtol = rtol, maxiter = maxiter, verbosity = verbosity,
@@ -43,12 +43,14 @@ function SciMLBase.solve!(cache::LinearCache, alg::KrylovKitJL; kwargs...)
4343
end
4444

4545
function verbosity_to_KrylovKit(verb::Verbosity.Type)
46-
SciML.@match verb begin
46+
@match verb begin
4747
Verbosity.None() => 0
4848
Verbosity.Warn() => 1
4949
Verbosity.Error() => 2
5050
Verbosity.Info() => 3
51-
Level(x) => x
51+
Verbosity.Level(x) => x
5252
_ => error("Not a valid verbosity level for KrylovKit.")
5353
end
5454
end
55+
56+
end

0 commit comments

Comments
 (0)