### HSL_MI20 Unsymmetric system: algebraic multigrid preconditioner

Given an $n\times n$
sparse matrix $A$
HSL_MI20 has two functions.

- Given an $n-$vector
$z$,
HSL_MI20 computes the vector $x=Mz$,
where $M$
is an algebraic multigrid (AMG) v-cycle preconditioner for A.
- Alternatively, given a right-hand-side $n-$vector
$b$,
HSL_MI20 solves the linear system of equations $Ax=b$
by an AMG method with or without a Krylov accelerator.

A classical AMG method is used, as described in [1] (see also Section
5 below for a brief description of the algorithm). The matrix
$A$ must
have positive diagonal entries and (most of) the oﬀ-diagonal entries must be negative
(the diagonal should be large compared to the sum of the oﬀ-diagonals). During the
multigrid coarsening process, positive oﬀ-diagonal entries are ignored and, when
calculating the interpolation weights, positive oﬀ-diagonal entries are added to the
diagonal.

Precision: At least 8-byte arithmetic is recommended.