Skip to content

Commit

Permalink
default to false, make true optional (for large problems)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankschae committed Nov 6, 2023
1 parent f8f2362 commit 093490a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/raphson.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ for large-scale and numerically-difficult nonlinear systems.
which means that no line search is performed. Algorithms from `LineSearches.jl` can be
used here directly, and they will be converted to the correct `LineSearch`.
- `reuse`: Determines if the Jacobian is reused between (quasi-)Newton steps. Defaults to
`true`. If `true` we check how far we stepped with the same Jacobian, and automatically
`false`. If `true` we check how far we stepped with the same Jacobian, and automatically
take a new Jacobian if we stepped more than `reusetol` or if convergence slows or starts
to diverge. If `false`, the Jacobian is updated in each step.
"""
Expand All @@ -54,7 +54,7 @@ function set_ad(alg::NewtonRaphson{CJ}, ad) where {CJ}
end

function NewtonRaphson(; concrete_jac = nothing, linsolve = nothing,
linesearch = LineSearch(), precs = DEFAULT_PRECS, reuse = true, reusetol = 1e-1,
linesearch = LineSearch(), precs = DEFAULT_PRECS, reuse = false, reusetol = 1e-1,
adkwargs...)
ad = default_adargs_to_adtype(; adkwargs...)
linesearch = linesearch isa LineSearch ? linesearch : LineSearch(; method = linesearch)
Expand Down

0 comments on commit 093490a

Please sign in to comment.