|
| 1 | +""" |
| 2 | +```julia |
| 3 | +SimpleNewtonRaphson(; chunk_size = Val{0}(), autodiff = Val{true}(), |
| 4 | + diff_type = Val{:forward}) |
| 5 | +``` |
| 6 | +
|
| 7 | +A low-overhead implementation of Newton-Raphson. This method is non-allocating on scalar |
| 8 | +and static array problems. |
| 9 | +
|
| 10 | +!!! note |
| 11 | +
|
| 12 | + As part of the decreased overhead, this method omits some of the higher level error |
| 13 | + catching of the other methods. Thus to see better error messages, use one of the other |
| 14 | + methods like `NewtonRaphson` |
| 15 | +
|
| 16 | +### Keyword Arguments |
| 17 | +
|
| 18 | +- `chunk_size`: the chunk size used by the internal ForwardDiff.jl automatic differentiation |
| 19 | + system. This allows for multiple derivative columns to be computed simultaniously, |
| 20 | + improving performance. Defaults to `0`, which is equivalent to using ForwardDiff.jl's |
| 21 | + default chunk size mechanism. For more details, see the documentation for |
| 22 | + [ForwardDiff.jl](https://juliadiff.org/ForwardDiff.jl/stable/). |
| 23 | +- `autodiff`: whether to use forward-mode automatic differentiation for the Jacobian. |
| 24 | + Note that this argument is ignored if an analytical Jacobian is passed as that will be |
| 25 | + used instead. Defaults to `Val{true}`, which means ForwardDiff.jl is used by default. |
| 26 | + If `Val{false}`, then FiniteDiff.jl is used for finite differencing. |
| 27 | +- `diff_type`: the type of finite differencing used if `autodiff = false`. Defaults to |
| 28 | + `Val{:forward}` for forward finite differences. For more details on the choices, see the |
| 29 | + [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl) documentation. |
| 30 | +""" |
1 | 31 | struct SimpleNewtonRaphson{CS, AD, FDT} <: AbstractNewtonAlgorithm{CS, AD, FDT}
|
2 | 32 | function SimpleNewtonRaphson(; chunk_size = Val{0}(), autodiff = Val{true}(),
|
3 | 33 | diff_type = Val{:forward})
|
|
0 commit comments