# IDR(s)

The Induced Dimension Reduction method is a family of simple and fast Krylov subspace algorithms for solving large nonsymmetric linear systems. The idea behind the IDR(s) variant is to generate residuals that are in the nested subspaces of shrinking dimensions.

## Usage

`IterativeSolvers.idrs`

— Function`idrs(A, b; s = 8, kwargs...) -> x, [history]`

Same as `idrs!`

, but allocates a solution vector `x`

initialized with zeros.

`IterativeSolvers.idrs!`

— Function`idrs!(x, A, b; s = 8, kwargs...) -> x, [history]`

Solve the problem $Ax = b$ approximately with IDR(s), where `s`

is the dimension of the shadow space.

**Arguments**

`x`

: Initial guess, will be updated in-place;`A`

: linear operator;`b`

: right-hand side.

**Keywords**

`s::Integer = 8`

: dimension of the shadow space;`abstol::Real = zero(real(eltype(b)))`

,`reltol::Real = sqrt(eps(real(eltype(b))))`

: absolute and relative tolerance for the stopping condition`|r_k| / |r_0| ≤ max(reltol * resnorm, abstol)`

, where`r_k = A * x_k - b`

is the residual in the`k`

th iteration;`maxiter::Int = size(A, 2)`

: maximum number of iterations;`log::Bool`

: keep track of the residual norm in each iteration;`verbose::Bool`

: print convergence information during the iterations.

**Return values**

**if log is false**

`x`

: approximate solution.

**if log is true**

`x`

: approximate solution;`history`

: convergence history.

## Implementation details

The current implementation is based on the MATLAB version by Van Gijzen and Sonneveld. For background see ^{[Sonneveld2008]}, ^{[VanGijzen2011]} and the IDR(s) webpage.

- Sonneveld2008IDR(s): a family of simple and fast algorithms for solving large nonsymmetric linear systems. P. Sonneveld and M. B. van Gijzen SIAM J. Sci. Comput. Vol. 31, No. 2, pp. 1035–1062, 2008
- VanGijzen2011Algorithm 913: An Elegant IDR(s) Variant that Efficiently Exploits Bi-orthogonality Properties. M. B. van Gijzen and P. Sonneveld ACM Trans. Math. Software,, Vol. 38, No. 1, pp. 5:1-5:19, 2011