newtonMultidimensional Newton method with simple step damping.
Solves with Newton-Raphson. Each step is repeatedly halved
until its largest component is at most 0.1; this limits step size but
is not a residual-based line search. its is the loop count and does
not distinguish all convergence/failure cases.
| 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. |
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| real(kind=pr), | public | :: | F(size(X)) | ||||
| real(kind=pr), | public | :: | F2(size(X)) | ||||
| real(kind=pr), | public | :: | J(size(X),size(X)) |
Jacobian matrix. |
|||
| real(kind=pr), | public | :: | J2(size(X),size(X)) | ||||
| real(kind=pr), | public | :: | dX(size(X)) |