Skip to content

Commit fb4af80

Browse files
implicit update of the linear operator
1 parent a65a1a5 commit fb4af80

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/R2N.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function R2NSolver(
6767
has_bnds ? shifted(reg_nlp.h, xk, l_bound_m_x, u_bound_m_x, reg_nlp.selected) :
6868
shifted(reg_nlp.h, xk)
6969

70-
Bk = hess_op(reg_nlp.model, x0)
70+
Bk = hess_op(reg_nlp.model, xk)
7171
sub_nlp = R2NModel(Bk, ∇fk, T(1), x0)
7272
subpb = RegularizedNLPModel(sub_nlp, ψ)
7373
substats = RegularizedExecutionStats(subpb)
@@ -292,7 +292,6 @@ function SolverCore.solve!(
292292
quasiNewtTest = isa(nlp, QuasiNewtonModel)
293293
λmax::T = T(1)
294294
found_λ = true
295-
solver.subpb.model.B = hess_op(nlp, xk)
296295

297296
if opnorm_maxiter 0
298297
λmax, found_λ = opnorm(solver.subpb.model.B)
@@ -445,7 +444,6 @@ function SolverCore.solve!(
445444
push!(nlp, s, solver.y)
446445
qn_copy!(nlp, solver, stats)
447446
end
448-
solver.subpb.model.B = hess_op(nlp, xk)
449447

450448
if opnorm_maxiter 0
451449
λmax, found_λ = opnorm(solver.subpb.model.B)

0 commit comments

Comments
 (0)