From bc2d115c29f6ff5063d3360195fc2a1337699e41 Mon Sep 17 00:00:00 2001 From: Mert Kipcak <77884642+mertkipcak@users.noreply.github.com> Date: Fri, 11 Oct 2024 04:41:05 -0700 Subject: [PATCH] Fix preconditioner unit test (#283) --- test/runtests.jl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 0455b63d..fa1cfcc2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -85,12 +85,9 @@ end function DiagPrecon(x) H = Matrix(hess(nlp, x)) λmin = minimum(eigvals(H)) - Diagonal(H + λmin * I) + Diagonal(H + (λmin+1e-6)*I ) end M = DiagPrecon(x0) - function LinearAlgebra.ldiv!(y, M::Diagonal, x) - y .= M \ x - end function callback(nlp, solver, stats) M[:] = DiagPrecon(solver.x) end