|
1 |
| -""" |
2 |
| - RobustMultiNewton( |
3 |
| - ::Type{T} = Float64; |
4 |
| - concrete_jac = nothing, |
5 |
| - linsolve = nothing, |
6 |
| - autodiff = nothing, vjp_autodiff = nothing, jvp_autodiff = nothing |
7 |
| - ) |
8 |
| -
|
9 |
| -A polyalgorithm focused on robustness. It uses a mixture of Newton methods with different |
10 |
| -globalizing techniques (trust region updates, line searches, etc.) in order to find a |
11 |
| -method that is able to adequately solve the minimization problem. |
12 |
| -
|
13 |
| -Basically, if this algorithm fails, then "most" good ways of solving your problem fail and |
14 |
| -you may need to think about reformulating the model (either there is an issue with the model, |
15 |
| -or more precision / more stable linear solver choice is required). |
16 |
| -
|
17 |
| -### Arguments |
18 |
| -
|
19 |
| - - `T`: The eltype of the initial guess. It is only used to check if some of the algorithms |
20 |
| - are compatible with the problem type. Defaults to `Float64`. |
21 |
| -""" |
22 |
| -function RobustMultiNewton( |
23 |
| - ::Type{T} = Float64; |
24 |
| - concrete_jac = nothing, |
25 |
| - linsolve = nothing, |
26 |
| - autodiff = nothing, vjp_autodiff = nothing, jvp_autodiff = nothing |
27 |
| -) where {T} |
28 |
| - common_kwargs = (; concrete_jac, linsolve, autodiff, vjp_autodiff, jvp_autodiff) |
29 |
| - if T <: Complex # Let's atleast have something here for complex numbers |
30 |
| - algs = ( |
31 |
| - NewtonRaphson(; common_kwargs...), |
32 |
| - ) |
33 |
| - else |
34 |
| - algs = ( |
35 |
| - TrustRegion(; common_kwargs...), |
36 |
| - TrustRegion(; common_kwargs..., radius_update_scheme = RUS.Bastin), |
37 |
| - NewtonRaphson(; common_kwargs...), |
38 |
| - NewtonRaphson(; common_kwargs..., linesearch = BackTracking()), |
39 |
| - TrustRegion(; common_kwargs..., radius_update_scheme = RUS.NLsolve), |
40 |
| - TrustRegion(; common_kwargs..., radius_update_scheme = RUS.Fan) |
41 |
| - ) |
42 |
| - end |
43 |
| - return NonlinearSolvePolyAlgorithm(algs) |
44 |
| -end |
45 |
| - |
46 | 1 | """
|
47 | 2 | FastShortcutNonlinearPolyalg(
|
48 | 3 | ::Type{T} = Float64;
|
|
0 commit comments