Skip to content

Commit 9019f83

Browse files
Rename run for krylov method
1 parent 4d2523f commit 9019f83

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/solvers/newtons_method.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ end
335335
Finds an approximation `Δx[n] ≈ j(x[n]) \\ f(x[n])` for Newton's method such
336336
that `‖f(x[n]) - j(x[n]) * Δx[n]‖ ≤ rtol[n] * ‖f(x[n])‖`, where `rtol[n]` is the
337337
value 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
340340
of `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
349349
is 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...)`.
352352
The solver's type can be changed by specifying a different value for `type`,
353353
though 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
)
420420
end
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

Comments
 (0)