|
466 | 466 |
|
467 | 467 | Solves the equation `f(x) = 0`, using the Jacobian (or an approximation of the |
468 | 468 | Jacobian) `j(x) = f'(x)` if it is available. This is done by calling |
469 | | -`run!(::NewtonsMethod, cache, x, f!, j! = nothing)`, where `f!(f, x)` is a |
| 469 | +`solve_newton!(::NewtonsMethod, cache, x, f!, j! = nothing)`, where `f!(f, x)` is a |
470 | 470 | function that sets `f(x)` in-place and, if it is specified, `j!(j, x)` is a |
471 | 471 | function that sets `j(x)` in-place. The `x` passed to Newton's method is |
472 | 472 | modified in-place, and its initial value is used as a starting guess for the |
@@ -508,7 +508,7 @@ If `j(x)` changes sufficiently slowly, `update_j` may be changed from |
508 | 508 | `UpdateEvery(NewNewtonIteration)` to some other `UpdateSignalHandler` that |
509 | 509 | gets triggered less frequently, such as `UpdateEvery(NewNewtonSolve)`. This |
510 | 510 | can be used to make the approximation `j(x[n]) ≈ j(x₀)`, where `x₀` is a |
511 | | -previous value of `x[n]` (possibly even a value from a previous `run!` of |
| 511 | +previous value of `x[n]` (possibly even a value from a previous `solve_newton!` of |
512 | 512 | Newton's method). When Newton's method uses such an approximation, it is called |
513 | 513 | the "chord method". |
514 | 514 |
|
@@ -558,7 +558,7 @@ function allocate_cache(alg::NewtonsMethod, x_prototype, j_prototype = nothing) |
558 | 558 | ) |
559 | 559 | end |
560 | 560 |
|
561 | | -function run!(alg::NewtonsMethod, cache, x, f!, j! = nothing) |
| 561 | +function solve_newton!(alg::NewtonsMethod, cache, x, f!, j! = nothing) |
562 | 562 | (; max_iters, update_j, krylov_method, convergence_checker, verbose) = alg |
563 | 563 | (; update_j_cache, krylov_method_cache, convergence_checker_cache) = cache |
564 | 564 | (; Δx, f, j) = cache |
|
0 commit comments