|  | 
| 68 | 68 |     retcode::ReturnCode.T | 
| 69 | 69 |     force_stop::Bool | 
| 70 | 70 |     kwargs | 
|  | 71 | + | 
|  | 72 | +    initializealg | 
| 71 | 73 | end | 
| 72 | 74 | 
 | 
| 73 | 75 | function InternalAPI.reinit_self!( | 
| @@ -112,7 +114,7 @@ function SciMLBase.__init( | 
| 112 | 114 |         prob::AbstractNonlinearProblem, alg::GeneralizedDFSane, args...; | 
| 113 | 115 |         stats = NLStats(0, 0, 0, 0, 0), alias_u0 = false, maxiters = 1000, | 
| 114 | 116 |         abstol = nothing, reltol = nothing, termination_condition = nothing, | 
| 115 |  | -        maxtime = nothing, kwargs... | 
|  | 117 | +        maxtime = nothing, initializealg = NonlinearSolveBase.NonlinearSolveDefaultInit(), kwargs... | 
| 116 | 118 | ) | 
| 117 | 119 |     timer = get_timer_output() | 
| 118 | 120 | 
 | 
| @@ -145,13 +147,16 @@ function SciMLBase.__init( | 
| 145 | 147 |             σ_n = T(alg.σ_1) | 
| 146 | 148 |         end | 
| 147 | 149 | 
 | 
| 148 |  | -        return GeneralizedDFSaneCache( | 
|  | 150 | +        cache = GeneralizedDFSaneCache( | 
| 149 | 151 |             fu, fu_cache, u, u_cache, prob.p, du, alg, prob, | 
| 150 | 152 |             σ_n, T(alg.σ_min), T(alg.σ_max), | 
| 151 | 153 |             linesearch_cache, stats, 0, maxiters, maxtime, timer, 0.0, | 
| 152 |  | -            tc_cache, trace, ReturnCode.Default, false, kwargs | 
|  | 154 | +            tc_cache, trace, ReturnCode.Default, false, kwargs, initializealg, | 
| 153 | 155 |         ) | 
| 154 | 156 |     end | 
|  | 157 | + | 
|  | 158 | +    NonlinearSolveBase.initialize_cache!(cache) | 
|  | 159 | +    return cache | 
| 155 | 160 | end | 
| 156 | 161 | 
 | 
| 157 | 162 | function InternalAPI.step!( | 
|  | 
0 commit comments