Skip to content

Commit 9365b77

Browse files
Merge pull request #450 from SciML/ap/simple_gmres
Type stable path to construct SimpleGMRES
2 parents 3b4f4ed + 593cd43 commit 9365b77

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/simplegmres.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,16 @@ struct SimpleGMRES{UBD} <: AbstractKrylovSubspaceMethod
3737
blocksize::Int
3838
warm_start::Bool
3939

40+
function SimpleGMRES{UBD}(; restart::Bool = true, blocksize::Int = 0,
41+
warm_start::Bool = false, memory::Int = 20) where {UBD}
42+
UBD && @assert blocksize > 0
43+
return new{UBD}(restart, memory, blocksize, warm_start)
44+
end
45+
4046
function SimpleGMRES(; restart::Bool = true, blocksize::Int = 0,
4147
warm_start::Bool = false, memory::Int = 20)
42-
return new{blocksize > 0}(restart, memory, blocksize, warm_start)
48+
return SimpleGMRES{blocksize > 0}(; restart, memory, blocksize,
49+
warm_start)
4350
end
4451
end
4552

0 commit comments

Comments
 (0)