  The convergence of the restarted GMRES method can be significantly improved,
for some problems, by using a weighted inner product that changes at each
restart. How does this weighting affect convergence, and when is it useful? We
show that weighted inner products can help in two distinct ways: when the
coefficient matrix has localized eigenvectors, weighting can allow restarted
GMRES to focus on eigenvalues that otherwise slow convergence; for general
problems, weighting can break the cyclic convergence pattern into which
restarted GMRES often settles. The eigenvectors of matrices derived from
differential equations are often not localized, thus limiting the impact of
weighting. For such problems, incorporating the discrete cosine transform into
the inner product can significantly improve GMRES convergence, giving a method
we call W-GMRES-DCT. Integrating weighting with eigenvalue deflation via
GMRES-DR also can give effective solutions.
