diff --git a/src/LinearSolve.jl b/src/LinearSolve.jl index ef86452b..eacfafab 100644 --- a/src/LinearSolve.jl +++ b/src/LinearSolve.jl @@ -251,7 +251,7 @@ export KrylovJL, KrylovJL_CG, KrylovJL_MINRES, KrylovJL_GMRES, KrylovJL_BICGSTAB, KrylovJL_LSMR, KrylovJL_CRAIGMR, IterativeSolversJL, IterativeSolversJL_CG, IterativeSolversJL_GMRES, IterativeSolversJL_BICGSTAB, IterativeSolversJL_MINRES, IterativeSolversJL_IDRS, - KrylovKitJL, KrylovKitJL_CG, KrylovKitJL_GMRES + KrylovKitJL, KrylovKitJL_CG, KrylovKitJL_GMRES, KrylovJL_MINARES export SimpleGMRES diff --git a/src/iterative_wrappers.jl b/src/iterative_wrappers.jl index f487463c..05891cc7 100644 --- a/src/iterative_wrappers.jl +++ b/src/iterative_wrappers.jl @@ -96,6 +96,17 @@ function KrylovJL_CRAIGMR(args...; kwargs...) KrylovJL(args...; KrylovAlg = Krylov.craigmr!, kwargs...) end +""" +```julia +KrylovJL_MINARES(args...; kwargs...) +``` + +A generic MINARES implementation for Hermitian linear systems +""" +function KrylovJL_MINARES(args...; kwargs...) + KrylovJL(args...; KrylovAlg = Krylov.minares!, kwargs...) +end + function get_KrylovJL_solver(KrylovAlg) KS = if (KrylovAlg === Krylov.lsmr!) Krylov.LsmrSolver @@ -163,6 +174,8 @@ function get_KrylovJL_solver(KrylovAlg) Krylov.GpmrSolver elseif (KrylovAlg === Krylov.fom!) Krylov.FomSolver + elseif (KrylovAlg === Krylov.minares!) + Krylov.MinaresSolver else error("Invalid Krylov method detected") end diff --git a/test/basictests.jl b/test/basictests.jl index f9ddd302..64ea0c3d 100644 --- a/test/basictests.jl +++ b/test/basictests.jl @@ -274,7 +274,8 @@ end ("GMRES", KrylovJL_GMRES(kwargs...)), ("GMRES_prec", KrylovJL_GMRES(; precs, ldiv = false, kwargs...)), # ("BICGSTAB",KrylovJL_BICGSTAB(kwargs...)), - ("MINRES", KrylovJL_MINRES(kwargs...)) + ("MINRES", KrylovJL_MINRES(kwargs...)), + ("MINARES", KrylovJL_MINARES(kwargs...)) ) for (name, algorithm) in algorithms @testset "$name" begin