newtonMuldimensional Newton method with simple damping.
Solves a non-lineal system of equations using the Newton-Raphson method. To help with convergence a damping is done to ensure that for each step.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| procedure(to_solve) | :: | sub |
Subroutine with the system of equations to solve and its Jacobian matrix |
|||
| real(kind=pr), | intent(inout) | :: | x(:) |
Vector of variables used for initialization, updated to the solution at the end |
||
| real(kind=pr), | intent(in) | :: | tol |
Absolute tolerance on the function equations |
||
| integer, | intent(in) | :: | max_its |
Maximum number of iterations |
||
| integer, | intent(out) | :: | its |
Number of iterations used |
| 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)) | ||||
| real(kind=pr), | public | :: | J2(size(X),size(X)) | ||||
| real(kind=pr), | public | :: | dX(size(X)) |