This routine uses the ‘Flexible Generalized Minimal Residual’ method with restarts every iterations, FGMRES(), to solve the unsymmetric linear system , optionally using preconditioning. FGMRES() generalises the preconditioned GMRES() allowing the possibility of using a diﬀerent right preconditioner at each step in solving the preconditioned system
where and and is a left preconditioner. Reverse communication is used for preconditioning operations and matrix-vector products of the form .
If does not change at each step , in exact arithmetic the algorithm computes the same solution as GMRES() applied to (1). FGMRES() needs more memory than GMRES() and, in particular, stores an additional real matrix. However, in ﬂoating point arithmetic, FGMRES() is numerically more stable than the GMRES() method.
If Gaussian elimination with static pivoting option has been used to compute an approximate factorization of , FGMRES() can be used to recover full backward error stability. In this case the left preconditioner should be chosen to be the identity and the right preconditioner should be chosen to be = = .