Newton-type solvers for systems of nonlinear equations, including the
damped multivariate Newton method newton.
newton is the damped Newton method; homotopy gradually deforms an
identity problem into the target system.
call newton(residual_jacobian, x, tol, max_its, iterations)
Callback interface for a square nonlinear system and dense Jacobian.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=pr), | intent(in) | :: | X(:) |
Current unknown vector. |
||
| real(kind=pr), | intent(out) | :: | F(:) |
Residual vector . |
||
| real(kind=pr), | intent(out) | :: | J(:,:) |
Jacobian . |
Attempt a homotopy solve from an easy identity system to the target.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| procedure(to_solve) | :: | sub |
Target residual/Jacobian callback. |
|||
| real(kind=pr), | intent(inout) | :: | x(:) |
Initial guess, updated homotopy solution. |
||
| real(kind=pr), | intent(in) | :: | tol |
Absolute residual tolerance at each stage. |
||
| integer, | intent(in) | :: | max_its |
Present for interface compatibility; current implementation uses a fixed stage limit. |
||
| integer, | intent(out) | :: | its |
Iterations reported by the last Newton stage. |
Multidimensional Newton method with simple step damping.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| procedure(to_solve) | :: | sub |
Callback returning residuals and the Jacobian. |
|||
| real(kind=pr), | intent(inout) | :: | x(:) |
Initial guess, overwritten by the current solution estimate. |
||
| real(kind=pr), | intent(in) | :: | tol |
Absolute infinity-norm tolerance on the residual. |
||
| integer, | intent(in) | :: | max_its |
Maximum number of Newton iterations. |
||
| integer, | intent(out) | :: | its |
Iteration count at exit. |