@@ -56,8 +56,12 @@ function KrylovConstructor(vm, vn; vm_empty=vm, vn_empty=vn)
5656 return KrylovConstructor (vm, vn, vm_empty, vn_empty)
5757end
5858
59+ # TODO : in the next breaking release, change to KrylovWorkspace{T,FC,Sm,Sn}
60+ # and delete the alias below
61+ abstract type KrylovWorkspaceNext{T,FC,Sm,Sn} end
62+
5963" Abstract type for using Krylov solvers in-place."
60- abstract type KrylovWorkspace{T,FC,Sm,Sn} end
64+ const KrylovWorkspace{T,FC,S} = KrylovWorkspaceNext{T,FC,S,S}
6165
6266"""
6367Workspace for the in-place method [`minres!`](@ref).
@@ -68,7 +72,7 @@ The following outer constructors can be used to initialize this workspace:
6872 workspace = MinresWorkspace(A, b; window = 5)
6973 workspace = MinresWorkspace(kc::KrylovConstructor; window = 5)
7074"""
71- mutable struct MinresWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
75+ mutable struct MinresWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
7276 m :: Int
7377 n :: Int
7478 Δx :: S
@@ -140,7 +144,7 @@ The following outer constructors can be used to initialize this workspace:
140144 workspace = MinaresWorkspace(A, b)
141145 workspace = MinaresWorkspace(kc::KrylovConstructor)
142146"""
143- mutable struct MinaresWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
147+ mutable struct MinaresWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
144148 m :: Int
145149 n :: Int
146150 Δx :: S
@@ -209,7 +213,7 @@ The following outer constructors can be used to initialize this workspace:
209213 workspace = CgWorkspace(A, b)
210214 workspace = CgWorkspace(kc::KrylovConstructor)
211215"""
212- mutable struct CgWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
216+ mutable struct CgWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
213217 m :: Int
214218 n :: Int
215219 Δx :: S
@@ -272,7 +276,7 @@ The following outer constructors can be used to initialize this workspace:
272276 workspace = CrWorkspace(A, b)
273277 workspace = CrWorkspace(kc::KrylovConstructor)
274278"""
275- mutable struct CrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
279+ mutable struct CrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
276280 m :: Int
277281 n :: Int
278282 Δx :: S
@@ -338,7 +342,7 @@ The following outer constructors can be used to initialize this workspace:
338342 workspace = CarWorkspace(A, b)
339343 workspace = CarWorkspace(kc::KrylovConstructor)
340344"""
341- mutable struct CarWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
345+ mutable struct CarWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
342346 m :: Int
343347 n :: Int
344348 Δx :: S
@@ -407,7 +411,7 @@ The following outer constructors can be used to initialize this workspace:
407411 workspace = SymmlqWorkspace(A, b)
408412 workspace = SymmlqWorkspace(kc::KrylovConstructor)
409413"""
410- mutable struct SymmlqWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
414+ mutable struct SymmlqWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
411415 m :: Int
412416 n :: Int
413417 Δx :: S
@@ -479,7 +483,7 @@ The following outer constructors can be used to initialize this workspace:
479483 workspace = CgLanczosWorkspace(A, b)
480484 workspace = CgLanczosWorkspace(kc::KrylovConstructor)
481485"""
482- mutable struct CgLanczosWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
486+ mutable struct CgLanczosWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
483487 m :: Int
484488 n :: Int
485489 Δx :: S
@@ -542,7 +546,7 @@ The following outer constructors can be used to initialize this workspace:
542546 workspace = CgLanczosShiftWorkspace(A, b, nshifts)
543547 workspace = CgLanczosShiftWorkspace(kc::KrylovConstructor, nshifts)
544548"""
545- mutable struct CgLanczosShiftWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
549+ mutable struct CgLanczosShiftWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
546550 m :: Int
547551 n :: Int
548552 nshifts :: Int
@@ -625,7 +629,7 @@ The following outer constructors can be used to initialize this workspace:
625629 workspace = MinresQlpWorkspace(A, b)
626630 workspace = MinresQlpWorkspace(kc::KrylovConstructor)
627631"""
628- mutable struct MinresQlpWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
632+ mutable struct MinresQlpWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
629633 m :: Int
630634 n :: Int
631635 Δx :: S
@@ -696,7 +700,7 @@ The following outer constructors can be used to initialize this workspace:
696700
697701`memory` is set to `n` if the value given is larger than `n`.
698702"""
699- mutable struct DqgmresWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
703+ mutable struct DqgmresWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
700704 m :: Int
701705 n :: Int
702706 Δx :: S
@@ -772,7 +776,7 @@ The following outer constructors can be used to initialize this workspace:
772776
773777`memory` is set to `n` if the value given is larger than `n`.
774778"""
775- mutable struct DiomWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
779+ mutable struct DiomWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
776780 m :: Int
777781 n :: Int
778782 Δx :: S
@@ -843,7 +847,7 @@ The following outer constructors can be used to initialize this workspace:
843847 workspace = UsymlqWorkspace(A, b)
844848 workspace = UsymlqWorkspace(kc::KrylovConstructor)
845849"""
846- mutable struct UsymlqWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
850+ mutable struct UsymlqWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
847851 m :: Int
848852 n :: Int
849853 uₖ₋₁ :: S
@@ -912,7 +916,7 @@ The following outer constructors can be used to initialize this workspace:
912916 workspace = UsymqrWorkspace(A, b)
913917 workspace = UsymqrWorkspace(kc::KrylovConstructor)
914918"""
915- mutable struct UsymqrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
919+ mutable struct UsymqrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
916920 m :: Int
917921 n :: Int
918922 vₖ₋₁ :: S
@@ -984,7 +988,7 @@ The following outer constructors can be used to initialize this workspace:
984988 workspace = TricgWorkspace(A, b)
985989 workspace = TricgWorkspace(kc::KrylovConstructor)
986990"""
987- mutable struct TricgWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
991+ mutable struct TricgWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
988992 m :: Int
989993 n :: Int
990994 y :: S
@@ -1074,7 +1078,7 @@ The following outer constructors can be used to initialize this workspace:
10741078 workspace = TrimrWorkspace(A, b)
10751079 workspace = TrimrWorkspace(kc::KrylovConstructor)
10761080"""
1077- mutable struct TrimrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
1081+ mutable struct TrimrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
10781082 m :: Int
10791083 n :: Int
10801084 y :: S
@@ -1176,7 +1180,7 @@ The following outer constructors can be used to initialize this workspace:
11761180 workspace = TrilqrWorkspace(A, b)
11771181 workspace = TrilqrWorkspace(kc::KrylovConstructor)
11781182"""
1179- mutable struct TrilqrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
1183+ mutable struct TrilqrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
11801184 m :: Int
11811185 n :: Int
11821186 uₖ₋₁ :: S
@@ -1257,7 +1261,7 @@ The following outer constructors can be used to initialize this workspace:s
12571261 workspace = CgsWorkspace(A, b)
12581262 workspace = CgsWorkspace(kc::KrylovConstructor)
12591263"""
1260- mutable struct CgsWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
1264+ mutable struct CgsWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
12611265 m :: Int
12621266 n :: Int
12631267 Δx :: S
@@ -1326,7 +1330,7 @@ The following outer constructors can be used to initialize this workspace:
13261330 workspace = BicgstabWorkspace(A, b)
13271331 workspace = BicgstabWorkspace(kc::KrylovConstructor)
13281332"""
1329- mutable struct BicgstabWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
1333+ mutable struct BicgstabWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
13301334 m :: Int
13311335 n :: Int
13321336 Δx :: S
@@ -1395,7 +1399,7 @@ The following outer constructors can be used to initialize this workspace:
13951399 workspace = BilqWorkspace(A, b)
13961400 workspace = BilqWorkspace(kc::KrylovConstructor)
13971401"""
1398- mutable struct BilqWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
1402+ mutable struct BilqWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
13991403 m :: Int
14001404 n :: Int
14011405 uₖ₋₁ :: S
@@ -1470,7 +1474,7 @@ The following outer constructors can be used to initialize this workspace:
14701474 workspace = QmrWorkspace(A, b)
14711475 workspace = QmrWorkspace(kc::KrylovConstructor)
14721476"""
1473- mutable struct QmrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
1477+ mutable struct QmrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
14741478 m :: Int
14751479 n :: Int
14761480 uₖ₋₁ :: S
@@ -1548,7 +1552,7 @@ The following outer constructors can be used to initialize this workspace:
15481552 workspace = BilqrWorkspace(A, b)
15491553 workspace = BilqrWorkspace(kc::KrylovConstructor)
15501554"""
1551- mutable struct BilqrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
1555+ mutable struct BilqrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
15521556 m :: Int
15531557 n :: Int
15541558 uₖ₋₁ :: S
@@ -1629,7 +1633,7 @@ The following outer constructors can be used to initialize this workspace:
16291633 workspace = CglsWorkspace(A, b)
16301634 workspace = CglsWorkspace(kc::KrylovConstructor)
16311635"""
1632- mutable struct CglsWorkspace{T,FC,Sm,Sn} <: KrylovWorkspace {T,FC,Sm,Sn}
1636+ mutable struct CglsWorkspace{T,FC,Sm,Sn} <: KrylovWorkspaceNext {T,FC,Sm,Sn}
16331637 m :: Int
16341638 n :: Int
16351639 x :: Sn
@@ -1687,7 +1691,7 @@ The following outer constructors can be used to initialize this workspace::
16871691 workspace = CglsLanczosShiftWorkspace(A, b, nshifts)
16881692 workspace = CglsLanczosShiftWorkspace(kc::KrylovConstructor, nshifts)
16891693"""
1690- mutable struct CglsLanczosShiftWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
1694+ mutable struct CglsLanczosShiftWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
16911695 m :: Int
16921696 n :: Int
16931697 nshifts :: Int
@@ -1773,7 +1777,7 @@ The following outer constructors can be used to initialize this workspace:
17731777 workspace = CrlsWorkspace(A, b)
17741778 workspace = CrlsWorkspace(kc::KrylovConstructor)
17751779"""
1776- mutable struct CrlsWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
1780+ mutable struct CrlsWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
17771781 m :: Int
17781782 n :: Int
17791783 x :: S
@@ -1838,7 +1842,7 @@ The following outer constructors can be used to initialize this workspace:
18381842 workspace = CgneWorkspace(A, b)
18391843 workspace = CgneWorkspace(kc::KrylovConstructor)
18401844"""
1841- mutable struct CgneWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
1845+ mutable struct CgneWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
18421846 m :: Int
18431847 n :: Int
18441848 x :: S
@@ -1900,7 +1904,7 @@ The following outer constructors can be used to initialize this workspace:
19001904 workspace = CrmrWorkspace(A, b)
19011905 workspace = CrmrWorkspace(kc::KrylovConstructor)
19021906"""
1903- mutable struct CrmrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
1907+ mutable struct CrmrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
19041908 m :: Int
19051909 n :: Int
19061910 x :: S
@@ -1962,7 +1966,7 @@ The following outer constructors can be used to initialize this workspace:
19621966 workspace = LslqWorkspace(A, b)
19631967 workspace = LslqWorkspace(kc::KrylovConstructor)
19641968"""
1965- mutable struct LslqWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
1969+ mutable struct LslqWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
19661970 m :: Int
19671971 n :: Int
19681972 x :: S
@@ -2030,7 +2034,7 @@ The following outer constructors can be used to initialize this workspace:
20302034 workspace = LsqrWorkspace(A, b)
20312035 workspace = LsqrWorkspace(kc::KrylovConstructor)
20322036"""
2033- mutable struct LsqrWorkspace{T,FC,Sm,Sn} <: KrylovWorkspace {T,FC,Sm,Sn}
2037+ mutable struct LsqrWorkspace{T,FC,Sm,Sn} <: KrylovWorkspaceNext {T,FC,Sm,Sn}
20342038 m :: Int
20352039 n :: Int
20362040 x :: Sn
@@ -2098,7 +2102,7 @@ The following outer constructors can be used to initialize this workspace:
20982102 workspace = LsmrWorkspace(A, b)
20992103 workspace = LsmrWorkspace(kc::KrylovConstructor)
21002104"""
2101- mutable struct LsmrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
2105+ mutable struct LsmrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
21022106 m :: Int
21032107 n :: Int
21042108 x :: S
@@ -2169,7 +2173,7 @@ The following outer constructors can be used to initialize this workspace:
21692173 workspace = LnlqWorkspace(A, b)
21702174 workspace = LnlqWorkspace(kc::KrylovConstructor)
21712175"""
2172- mutable struct LnlqWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
2176+ mutable struct LnlqWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
21732177 m :: Int
21742178 n :: Int
21752179 x :: S
@@ -2240,7 +2244,7 @@ The following outer constructors can be used to initialize this workspace:
22402244 workspace = CraigWorkspace(A, b)
22412245 workspace = CraigWorkspace(kc::KrylovConstructor)
22422246"""
2243- mutable struct CraigWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
2247+ mutable struct CraigWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
22442248 m :: Int
22452249 n :: Int
22462250 x :: S
@@ -2311,7 +2315,7 @@ The following outer constructors can be used to initialize this workspace:
23112315 workspace = CraigmrWorkspace(A, b)
23122316 workspace = CraigmrWorkspace(kc::KrylovConstructor)
23132317"""
2314- mutable struct CraigmrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
2318+ mutable struct CraigmrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
23152319 m :: Int
23162320 n :: Int
23172321 x :: S
@@ -2390,7 +2394,7 @@ The following outer constructors can be used to initialize this workspace:
23902394
23912395`memory` is set to `n` if the value given is larger than `n`.
23922396"""
2393- mutable struct GmresWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
2397+ mutable struct GmresWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
23942398 m :: Int
23952399 n :: Int
23962400 Δx :: S
@@ -2467,7 +2471,7 @@ The following outer constructors can be used to initialize this workspace:
24672471
24682472`memory` is set to `n` if the value given is larger than `n`.
24692473"""
2470- mutable struct FgmresWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
2474+ mutable struct FgmresWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
24712475 m :: Int
24722476 n :: Int
24732477 Δx :: S
@@ -2544,7 +2548,7 @@ The following outer constructors can be used to initialize this workspace:
25442548
25452549`memory` is set to `n` if the value given is larger than `n`.
25462550"""
2547- mutable struct FomWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
2551+ mutable struct FomWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
25482552 m :: Int
25492553 n :: Int
25502554 Δx :: S
@@ -2617,7 +2621,7 @@ The following outer constructors can be used to initialize this workspace:
26172621
26182622`memory` is set to `n + m` if the value given is larger than `n + m`.
26192623"""
2620- mutable struct GpmrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S,S }
2624+ mutable struct GpmrWorkspace{T,FC,S} <: KrylovWorkspace{T,FC,S}
26212625 m :: Int
26222626 n :: Int
26232627 wA :: S
0 commit comments