From 6bc8c55bf8cce7587303a50867cf202219d06967 Mon Sep 17 00:00:00 2001 From: oscarddssmith Date: Fri, 30 Aug 2024 08:56:30 -0400 Subject: [PATCH] reuse jacobians --- lib/OrdinaryDiffEqNonlinearSolve/src/newton.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OrdinaryDiffEqNonlinearSolve/src/newton.jl b/lib/OrdinaryDiffEqNonlinearSolve/src/newton.jl index c1c8f67db7..458d2b1fc8 100644 --- a/lib/OrdinaryDiffEqNonlinearSolve/src/newton.jl +++ b/lib/OrdinaryDiffEqNonlinearSolve/src/newton.jl @@ -81,7 +81,7 @@ end @unpack tstep, invγdt = cache nlcache = nlsolver.cache.cache - step!(nlcache) + step!(nlcache, recompute_jacobian=false) nlsolver.ztmp = nlcache.u ustep = compute_ustep(tmp, γ, z, method) @@ -103,7 +103,7 @@ end @unpack tstep, invγdt, atmp, ustep = cache nlcache = nlsolver.cache.cache - step!(nlcache) + step!(nlcache, recompute_jacobian=false) @.. broadcast=false ztmp=nlcache.u ustep = compute_ustep!(ustep, tmp, γ, z, method)