From 56e276aec6465df45e5a4096b3901da502a37947 Mon Sep 17 00:00:00 2001 From: Mert Kipcak Date: Wed, 9 Oct 2024 11:53:28 -0700 Subject: [PATCH] Fix preconditioner unit test --- 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