Solves a system of nonlinear equations of several variables using a trust region method. This version requires a last argument of type `TrustRegionWA`
which holds various working arrays used in the function (avoiding array instantiations). Results of the solver are available in `wa.x` if `info=1`.
which holds various working arrays used in the function (avoiding array instantiations). Results of the solver are available in `wa.x` if `info=1`.
# Arguments
- `f!::Function`: Function evaluating the residuals of the nonlinear equations to be solved. This function admits two arguments, a vector holding the values of the residuals and the vector of unknowns (to be solved for).
...
...
@@ -272,7 +271,7 @@ function trustregion(f!::Function, j!::Function, x0::Vector{Float64}, factor::Fl
ifratio<p1
# Reduction is much smaller than predicted… Reduce the radius of the trust region.