# dtrnlspbc_get

Retrieves the number of iterations, stop criterion, initial residual, and final residual.

## Syntax

Fortran:

res = dtrnlspbc_get(handle, iter, st_cr, r1, r2)

C:

res = dtrnlspbc_get(&handle, &iter, &st_cr, &r1, &r2);

## Description

The routine retrieves the current number of iterations, stop criterion, initial residual, and final residual.

The st_cr parameter contains the stop criterion:

st_cr = 1 indicates that the algorithm has exceeded the maximal number of iterations.

st_cr = 2 indicates that `Δk < eps(1)`

st_cr = 3 indicates that `||F(x)|| < eps(2)`

st_cr = 4 indicates that `||A(x)ij|| < eps(3)`

st_cr = 5 indicates that `||s|| < eps(4)`

st_cr = 6 indicates that `||F(x)||- ||F(x) - A(x)s|| < eps(5)`,

where A is the Jacobi matrix, `Δk` is the trust region area, `F(x)` is the value of the functional, `s` is the trial step.

## Input Parameters

handle

  Data object of the _TRNSPBC_HANDLE_t type in C/C++ and INTEGER*8 in FORTRAN.

## Output Parameters

iter

  INTEGER. Contains the current number of iterations.

st_cr

  INTEGER. Contains the stop criterion.

  See Description for the parameter values and their meanings.

r1

  DOUBLE PRECISION. Contains the initial residual, that is, the value of the function `(||y - f(x)||)` of the initial х set by the user.

r2

  DOUBLE PRECISION. Contains the final residual, that is, the value of the function `(||y - f(x)||)` of the final х resulting from the algorithm operation.

res

  INTEGER. Informs about the task completion.

  res = TR_SUCCESS means the routine completed the task normally.

Parent topic: Nonlinear Least Squares Problem with Linear (Bound) Constraints