Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n | Dimension of the problem |
||
real(kind=r8), | intent(in), | dimension(n) | :: | xcur | Array of length |
|
real(kind=r8), | intent(in), | dimension(n) | :: | fcur | Array of length |
|
real(kind=r8), | intent(inout), | dimension(n) | :: | step | Vector of of length |
|
real(kind=r8), | intent(in) | :: | eta | Relative residual reduction factor |
||
procedure(f_intr) | :: | f | User-supplied subroutine for evaluating the function the zero of which is sought. |
|||
procedure(jacv_intr) | :: | jacv | User-supplied subroutine for optionally evaluating or , where is the Jacobian of and is a right preconditioning operator. If neither analytic evaluations nor right preconditioning is used, this can be a dummy subroutine; if right preconditioning is used but not analytic evaluations, this need only evaluate . |
|||
real(kind=r8), | intent(inout), | dimension(*) | :: | rpar | Parameter/work array passed to the |
|
integer, | intent(inout), | dimension(*) | :: | ipar | Parameter/work array passed to the |
|
integer, | intent(in) | :: | ijacv | Flag for determining method of evaluation. 0 (default) indicates finite-difference evaluation, while 1 indicates analytic evaluation. |
||
integer, | intent(in) | :: | irpre | Flag for right preconditioning. 0 indicates no preconditioning, while 1 inidcates right preconditioning. |
||
integer, | intent(in) | :: | iksmax | Maximum allowable number of GMRES iterations |
||
integer, | intent(in) | :: | iresup | Residual update flag. On GMRES restarts, the residual can
be updated using a linear combination ( |
||
integer, | intent(in) | :: | ifdord | Order of the finite-difference formula (sometimes) used on GMRES restarts when products are evaluated using finite- differences. When ijacv = 0 on input to nitsol, ifdord is set to 1, 2, or 4 in nitsol; otherwise, it is irrelevant. When ijacv = 0 on input to this subroutine, the precise meaning is as follows: With GMRES, ifdord matters only if iresup = 1, in which case |
||
integer, | intent(inout) | :: | nfe | Number of function evaluations |
||
integer, | intent(inout) | :: | njve | Number of evaluations |
||
integer, | intent(inout) | :: | nrpre | Number of evaluations |
||
integer, | intent(inout) | :: | nli | Number of linear iterations |
||
integer, | intent(in) | :: | kdmax | Maximum Krylov subspace dimension; default 10. |
||
integer, | intent(in) | :: | kdmaxp1 | kdmax + 1 |
||
real(kind=r8), | intent(out), | dimension(n, kdmaxp1) | :: | vv | Matrix for storage of Krylov basis in GMRES; on return, the residual vector is contained in the first column. |
|
real(kind=r8), | intent(out), | dimension(kdmax, kdmax) | :: | rr | Matrix for storage of triangular matrix in GMRES. |
|
real(kind=r8), | intent(out), | dimension(kdmax) | :: | svbig | Vector for storage of estimate of singular vector of |
|
real(kind=r8), | intent(out), | dimension(kdmax) | :: | svsml | Vector for storage of estimate of singular vector of |
|
real(kind=r8), | intent(out), | dimension(kdmax) | :: | w | Vector containing right-hand side of triangular system and least-squares residual norm in GMRES. |
|
real(kind=r8), | intent(out), | dimension(n) | :: | rwork | Work array |
|
real(kind=r8), | intent(out) | :: | rsnrm | GMRES residual norm on return |
||
procedure(dinpr_intr) | :: | dinpr | Inner-product routine, either user-supplied or BLAS |
|||
procedure(dnorm_intr) | :: | dnorm | Norm routine, either user supplied or BLAS dnrm2. |
|||
integer, | intent(out) | :: | itrmks | Termination flag. Values have the following meanings:
|
An interface to my modified versino of the nitsol implementation of the generalised minimal residual method (GMRES) for iteratively solving linear systems. It has been modified so that the user provides a non-zero initial guess of the solution.