AMGCL provides several iterative solvers, but it should be easy to use AMGCL
preconditioners with a user-provided solver as well. Each solver in AMGCL is a
class template. Its single template parameter specifies the backend to use.
This allows to preallocate necessary resources at class construction.
Obviously, the solver backend has to coincide with the preconditioner backend.

Each of the solvers in AMGCL provides two overloads for the operator():

Computes the solution for the given system matrix A and the right-hand
side rhs. Returns the number of iterations made and the achieved
residual as a boost::tuple. The solution vector x provides initial
approximation on input and holds the computed solution on output.

The system matrix may differ from the matrix used during initialization.
This may be used for the solution of non-stationary problems with slowly
changing coefficients. There is a strong chance that a preconditioner built
for a time step will act as a reasonably good preconditioner for several
subsequent time steps [DeSh12].

Computes the solution for the given right-hand side rhs. The system
matrix is the same that was used for the setup of the preconditioner P.
Returns the number of iterations made and the achieved residual as a
boost::tuple. The solution vector x provides initial approximation
on input and holds the computed solution on output.

According to [BaJM05], good values are in the range of 1…3. However, note that if you want to use the additional vectors to accelerate solving multiple similar problems, larger values may be beneficial.

If the solver is used to repeatedly solve similar problems, then keeping the augmented vectors between solves may speed up subsequent solves. This flag, when set, resets the augmented vectors at the beginning of each solve.