@@ -184,7 +184,7 @@ function __init_trace_history(::Val{show_trace}, trace_level, ::Val{store_trace}
184
184
! store_trace && ! show_trace && return nothing
185
185
entry = __trace_entry (trace_level, 0 , u, fu, J, δu)
186
186
show_trace && show (entry)
187
- store_trace && return [entry]
187
+ store_trace && return NonlinearSolveTraceEntry [entry]
188
188
return nothing
189
189
end
190
190
@@ -218,29 +218,6 @@ function update_trace!(trace::NonlinearSolveTrace{ShT, StT}, iter, u, fu, J, δu
218
218
return trace
219
219
end
220
220
221
- # Needed for Algorithms which directly use `inv(J)` instead of `J`
222
- function update_trace_with_invJ! (trace:: NonlinearSolveTrace{ShT, StT} , iter, u, fu, J, δu,
223
- α = 1 ; last:: Val{L} = Val (false )) where {ShT, StT, L}
224
- ! StT && ! ShT && return nothing
225
-
226
- if L
227
- entry = NonlinearSolveTraceEntry (- 1 , norm (fu, Inf ), NaN32 , nothing , nothing ,
228
- nothing , nothing , nothing )
229
- show (entry)
230
- return trace
231
- end
232
-
233
- show_now = ShT && (mod1 (iter, trace. trace_level. print_frequency) == 1 )
234
- store_now = StT && (mod1 (iter, trace. trace_level. store_frequency) == 1 )
235
- if show_now || store_now
236
- J_ = trace. trace_level isa TraceMinimal ? J : inv (J)
237
- entry = __trace_entry (trace. trace_level, iter, u, fu, J_, δu, α)
238
- end
239
- store_now && push! (trace. history, entry)
240
- show_now && show (entry)
241
- return trace
242
- end
243
-
244
221
function update_trace! (cache:: AbstractNonlinearSolveCache , α = true )
245
222
trace = __getproperty (cache, Val (:trace ))
246
223
trace === nothing && return nothing
@@ -252,8 +229,8 @@ function update_trace!(cache::AbstractNonlinearSolveCache, α = true)
252
229
update_trace! (trace, cache. stats. nsteps + 1 , get_u (cache), get_fu (cache),
253
230
nothing , cache. du, α)
254
231
else
255
- update_trace_with_invJ ! (trace, cache. stats. nsteps + 1 , get_u (cache),
256
- get_fu (cache) , J_inv, cache. du, α)
232
+ update_trace ! (trace, cache. stats. nsteps + 1 , get_u (cache), get_fu (cache),
233
+ ApplyArray (inv , J_inv) , cache. du, α)
257
234
end
258
235
else
259
236
update_trace! (trace, cache. stats. nsteps + 1 , get_u (cache), get_fu (cache), J,
0 commit comments