|
256 | 256 |
|
257 | 257 | Prints information about the Jacobian matrix `j` and the preconditioner `M` (if |
258 | 258 | it is available) that are passed to a Krylov method. This is done by calling |
259 | | -`run!(::KrylovMethodDebugger, cache, j, M)`. The `cache` can be obtained with |
| 259 | +`print_debug!(::KrylovMethodDebugger, cache, j, M)`. The `cache` can be obtained with |
260 | 260 | `allocate_cache(::KrylovMethodDebugger, x_prototype)`, where `x_prototype` is |
261 | 261 | `similar` to `x`. |
262 | 262 | """ |
@@ -284,7 +284,9 @@ function allocate_cache(::PrintConditionNumber, x_prototype) |
284 | 284 | ) |
285 | 285 | end |
286 | 286 |
|
287 | | -function run!(::PrintConditionNumber, cache, j, M) |
| 287 | +print_debug!(::Nothing, cache, j, M) = nothing |
| 288 | + |
| 289 | +function print_debug!(::PrintConditionNumber, cache, j, M) |
288 | 290 | (; dense_vector, dense_j, dense_inv_M, dense_inv_M_j) = cache |
289 | 291 | dense_matrix_from_operator!(dense_j, dense_vector, j) |
290 | 292 | if M === I |
@@ -429,7 +431,7 @@ function solve_krylov!(alg::KrylovMethod, cache, Δx, x, f!, f, n, j = nothing) |
429 | 431 | jvp!(jacobian_free_jvp, jacobian_free_jvp_cache, jΔx, Δx, x, f!, f) |
430 | 432 | opj = LinearOperator(eltype(x), length(x), length(x), false, false, jΔx!) |
431 | 433 | M = disable_preconditioner || isnothing(j) || isnothing(jacobian_free_jvp) ? I : j |
432 | | - run!(debugger, debugger_cache, opj, M) |
| 434 | + print_debug!(debugger, debugger_cache, opj, M) |
433 | 435 | ldiv = true |
434 | 436 | atol = zero(eltype(Δx)) |
435 | 437 | rtol = get_rtol!(forcing_term, forcing_term_cache, f, n) |
|
0 commit comments