From 593cd43e264ff940a00b612a5cc109256ba63898 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Thu, 21 Dec 2023 14:54:49 -0500 Subject: [PATCH] Update simplegmres.jl --- src/simplegmres.jl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/simplegmres.jl b/src/simplegmres.jl index 03b8014f2..76682e547 100644 --- a/src/simplegmres.jl +++ b/src/simplegmres.jl @@ -37,9 +37,16 @@ struct SimpleGMRES{UBD} <: AbstractKrylovSubspaceMethod blocksize::Int warm_start::Bool + function SimpleGMRES{UBD}(; restart::Bool = true, blocksize::Int = 0, + warm_start::Bool = false, memory::Int = 20) where {UBD} + UBD && @assert blocksize > 0 + return new{UBD}(restart, memory, blocksize, warm_start) + end + function SimpleGMRES(; restart::Bool = true, blocksize::Int = 0, warm_start::Bool = false, memory::Int = 20) - return new{blocksize > 0}(restart, memory, blocksize, warm_start) + return SimpleGMRES{blocksize > 0}(; restart, memory, blocksize, + warm_start) end end