Skip to content

Commit 13f8d82

Browse files
Rename run for debugger
1 parent 6d991de commit 13f8d82

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/solvers/newtons_method.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ end
256256
257257
Prints information about the Jacobian matrix `j` and the preconditioner `M` (if
258258
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
260260
`allocate_cache(::KrylovMethodDebugger, x_prototype)`, where `x_prototype` is
261261
`similar` to `x`.
262262
"""
@@ -284,7 +284,9 @@ function allocate_cache(::PrintConditionNumber, x_prototype)
284284
)
285285
end
286286

287-
function run!(::PrintConditionNumber, cache, j, M)
287+
print_debug!(::Nothing, cache, j, M) = nothing
288+
289+
function print_debug!(::PrintConditionNumber, cache, j, M)
288290
(; dense_vector, dense_j, dense_inv_M, dense_inv_M_j) = cache
289291
dense_matrix_from_operator!(dense_j, dense_vector, j)
290292
if M === I
@@ -429,7 +431,7 @@ function solve_krylov!(alg::KrylovMethod, cache, Δx, x, f!, f, n, j = nothing)
429431
jvp!(jacobian_free_jvp, jacobian_free_jvp_cache, jΔx, Δx, x, f!, f)
430432
opj = LinearOperator(eltype(x), length(x), length(x), false, false, jΔx!)
431433
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)
433435
ldiv = true
434436
atol = zero(eltype(Δx))
435437
rtol = get_rtol!(forcing_term, forcing_term_cache, f, n)

0 commit comments

Comments
 (0)