# dfgmres_get

Retrieves the number of the current iteration and updates the solution.

## Syntax

dfgmres_get(n, x, b, RCI_request, ipar, dpar, tmp, itercount)

## Description

The routine dfgmres_get retrieves the current iteration number of the solution process and updates the solution according to the computations performed by the dfgmres routine. To retrieve the current iteration number only, set the parameter ipar(13)= -1 beforehand. This is normally recommended to do to proceed further with the computations. If the intermediate solution is needed, the method parameters must be set properly, see for details FGMRES Common Parameters and Iterative Sparse Solver Code Examples section in the Appendix C.

## Input Parameters

n

  INTEGER. Contains the size of the problem, and the sizes of the arrays x and b.

ipar

  INTEGER array of size 128. Refer to the FGMRES Common Parameters.

dpar

  DOUBLE PRECISION array of size 128. Refer to the FGMRES Common Parameters.

tmp

  DOUBLE PRECISION array of size `((2*ipar(15)+1)*n+ipar(15)*ipar(15)+9)/2 + 1)`. Refer to the FGMRES Common Parameters.

## Output Parameters

x

  DOUBLE PRECISION array of size n. If ipar(13)= 0, it contains the updated approximation to the solution according to the computations done in dfgmres routine. Otherwise, it is not changed.

b

  DOUBLE PRECISION array of size n. If ipar(13)> 0, it contains the updated approximation to the solution according to the computations done in dfgmres routine. Otherwise, it is not changed.

RCI_request

  INTEGER. Informs about result of work of the routine.

itercount

  INTEGER argument. Contains the value of the current iteration number.

## Return Values

RCI_request= 0

  The routine completes task normally.

RCI_request= -12

  The routine is interrupted because errors are found in the method parameters. Normally this happens if the parameters ipar and dpar are altered by mistake outside the routine.

RCI_request= -10000

  The routine fails to complete the task.

Parent topic: Iterative Sparse Solvers based on Reverse Communication Interface (RCI ISS)