Skip to content

Commit ca13e7e

Browse files
committed
Support Krylov.jl v0.10
1 parent 54a765e commit ca13e7e

3 files changed

Lines changed: 11 additions & 11 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Stopping = "c4fe5a9e-e7fb-5c3d-89d5-7f405ab2214f"
1616
StoppingInterface = "53949629-e8ff-437b-b6e7-14da1a85bf25"
1717

1818
[compat]
19-
Krylov = "^0.8.2, 0.9"
19+
Krylov = "0.10"
2020
LinearOperators = "1, 2"
2121
NLPModels = "0.18, 0.19, 0.20, 0.21"
2222
SolverCore = "0.2, 0.3"

docs/src/doityourself.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ mutable struct PDataST{S,T} <: AdaptiveRegularization.TPData{T}
3131
cgrtol # Relative tolerance for `cg_lanczos`
3232
3333
OK::Bool # Mandatory: preprocess success
34-
solver::CgSolver # Memory pre-allocation for `cg_lanczos`
34+
solver::CgWorkspace # Memory pre-allocation for `cg_lanczos`
3535
end
3636
```
3737
The `TPData` stuctures have a unified constructor with `(::Type{S}, ::Type{T}, n)` as arguments.

src/utils/pdata_struct.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ mutable struct PDataKARC{S, T, Fatol, Frtol} <: PDataIter{T}
6868
norm_dirs::Array{T, 1} # norms of xShifts
6969
OK::Bool # preprocess success
7070

71-
solver::CgLanczosShiftSolver{T, T, S}
71+
solver::CgLanczosShiftWorkspace{T, T, S}
7272
end
7373

7474
function PDataKARC(
@@ -95,7 +95,7 @@ function PDataKARC(
9595
end
9696
norm_dirs = S(undef, nshifts)
9797
OK = true
98-
solver = CgLanczosShiftSolver(n, n, nshifts, S)
98+
solver = CgLanczosShiftWorkspace(n, n, nshifts, S)
9999
return PDataKARC(
100100
d,
101101
λ,
@@ -139,7 +139,7 @@ mutable struct PDataTRK{S, T, Fatol, Frtol} <: PDataIter{T}
139139
norm_dirs::Array{T, 1} # norms of xShifts
140140
OK::Bool # preprocess success
141141

142-
solver::CgLanczosShiftSolver{T, T, S}
142+
solver::CgLanczosShiftWorkspace{T, T, S}
143143
end
144144

145145
function PDataTRK(
@@ -166,7 +166,7 @@ function PDataTRK(
166166
end
167167
norm_dirs = S(undef, nshifts)
168168
OK = true
169-
solver = CgLanczosShiftSolver(n, n, nshifts, S)
169+
solver = CgLanczosShiftWorkspace(n, n, nshifts, S)
170170
return PDataTRK(
171171
d,
172172
λ,
@@ -202,7 +202,7 @@ mutable struct PDataST{S, T, Fatol, Frtol} <: PDataIter{T}
202202
cgrtol::Frtol
203203

204204
OK::Bool # preprocess success
205-
solver::CgSolver{T, T, S}
205+
solver::CgWorkspace{T, T, S}
206206
end
207207

208208
function PDataST(
@@ -220,7 +220,7 @@ function PDataST(
220220
d = S(undef, n)
221221
λ = zero(T)
222222
OK = true
223-
solver = CgSolver(n, n, S)
223+
solver = CgWorkspace(n, n, S)
224224
return PDataST(d, λ, ζ, ξ, maxtol, mintol, cgatol, cgrtol, OK, solver)
225225
end
226226

@@ -239,7 +239,7 @@ mutable struct PDataNLSST{S, T, Fatol, Frtol} <: PDataIterLS{T}
239239
cgrtol::Frtol
240240

241241
OK::Bool # preprocess success
242-
solver::Union{CglsSolver{T, T, S}, LsqrSolver{T, T, S}}
242+
solver::Union{CglsWorkspace{T, T, S}, LsqrWorkspace{T, T, S}}
243243
end
244244

245245
function PDataNLSST(
@@ -260,9 +260,9 @@ function PDataNLSST(
260260
λ = zero(T)
261261
OK = true
262262
solver = if solver_method == :cgls
263-
CglsSolver(m, n, S)
263+
CglsWorkspace(m, n, S)
264264
else
265-
LsqrSolver(m, n, S)
265+
LsqrWorkspace(m, n, S)
266266
end
267267
return PDataNLSST(d, λ, ζ, ξ, maxtol, mintol, cgatol, cgrtol, OK, solver)
268268
end

0 commit comments

Comments
 (0)