From a25aec4614826e1a55352cb0725ad4f7c8cb0549 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Thu, 26 Sep 2024 05:20:29 -0400 Subject: [PATCH] fix: forward reinit_cache to SciMLBase.reinit --- src/globalization/line_search.jl | 4 ++++ src/internal/termination.jl | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/globalization/line_search.jl b/src/globalization/line_search.jl index 38cdd809f..c7c342bee 100644 --- a/src/globalization/line_search.jl +++ b/src/globalization/line_search.jl @@ -27,3 +27,7 @@ Base.@deprecate LiFukushimaLineSearch(; nan_max_iter::Int = 5, kwargs...) LineSe function callback_into_cache!(topcache, cache::AbstractLineSearchCache, args...) LineSearch.callback_into_cache!(cache, get_fu(topcache)) end + +function reinit_cache!(cache::AbstractLineSearchCache, args...; kwargs...) + return SciMLBase.reinit!(cache, args...; kwargs...) +end diff --git a/src/internal/termination.jl b/src/internal/termination.jl index e09cfcdda..ef3f7c4c0 100644 --- a/src/internal/termination.jl +++ b/src/internal/termination.jl @@ -45,7 +45,7 @@ function update_from_termination_cache!(tc_cache, cache, u = get_u(cache)) end function update_from_termination_cache!( - _, cache, ::AbstractNonlinearTerminationMode, u = get_u(cache)) + tc_cache, cache, ::AbstractNonlinearTerminationMode, u = get_u(cache)) evaluate_f!(cache, u, cache.p) end