335335Finds an approximation `Δx[n] ≈ j(x[n]) \\ f(x[n])` for Newton's method such
336336that `‖f(x[n]) - j(x[n]) * Δx[n]‖ ≤ rtol[n] * ‖f(x[n])‖`, where `rtol[n]` is the
337337value of the forcing term on iteration `n`. This is done by calling
338- `run !(::KrylovMethod, cache, Δx, x, f!, f, n, j = nothing)`, where `f` is
338+ `solve_krylov !(::KrylovMethod, cache, Δx, x, f!, f, n, j = nothing)`, where `f` is
339339`f(x[n])` and, if it is specified, `j` is either `j(x[n])` or an approximation
340340of `j(x[n])`. The `Δx` passed to a Krylov method is modified in-place. The
341341`cache` can be obtained with `allocate_cache(::KrylovMethod, x_prototype)`,
@@ -347,7 +347,7 @@ This is primarily a wrapper for a `Krylov.KrylovSolver` from `Krylov.jl`. In
347347`l = length(x_prototype)` and `Krylov.ktypeof(x_prototype)` is a subtype of
348348`DenseVector` that can be used to store `x_prototype`. By default, the solver
349349is a `Krylov.GmresSolver` with a Krylov subspace size of 20 (the default Krylov
350- subspace size for this solver in `Krylov.jl`). In `run !`, the solver is run with
350+ subspace size for this solver in `Krylov.jl`). In `solve_krylov !`, the solver is run with
351351`Krylov.solve!(solver, opj, f; M, ldiv, atol, rtol, verbose, solve_kwargs...)`.
352352The solver's type can be changed by specifying a different value for `type`,
353353though this value has to be wrapped in a `Val` to avoid runtime compilation.
@@ -419,7 +419,7 @@ function allocate_cache(alg::KrylovMethod, x_prototype)
419419 )
420420end
421421
422- function run ! (alg:: KrylovMethod , cache, Δx, x, f!, f, n, j = nothing )
422+ function solve_krylov ! (alg:: KrylovMethod , cache, Δx, x, f!, f, n, j = nothing )
423423 (; jacobian_free_jvp, forcing_term, solve_kwargs) = alg
424424 (; disable_preconditioner, verbose, debugger) = alg
425425 type = solver_type (alg)
@@ -581,7 +581,7 @@ function run!(alg::NewtonsMethod, cache, x, f!, j! = nothing)
581581 ldiv! (Δx, j, f)
582582 end
583583 else
584- run ! (krylov_method, krylov_method_cache, Δx, x, f!, f, n, j)
584+ solve_krylov ! (krylov_method, krylov_method_cache, Δx, x, f!, f, n, j)
585585 end
586586 verbose && @info " Newton iteration $n : ‖x‖ = $(norm (x)) , ‖Δx‖ = $(norm (Δx)) "
587587
0 commit comments