[petsc-users] FGMRES - Hessenberg matrix size and eigenvalues

Pierre Seize Pierre.Seize at onera.fr
Thu Jun 6 07:56:59 CDT 2019


Dear PETSc,

I have been reading the sources about the GMRES (mostly the FGMRES) 
solver, and there are a few things I do not understand.

     - Aren't the arrays used to represent the Hessenberg matrix too 
wide ? The hh_origin and hes_origin arrays are allocated using (max_k + 
2) * (max_k + 1) and (max_k + 1) * (max_k + 1) scalars respectively. But 
when I monitor those two matrices I see that the last columns (and 
therefore the last line of hh_origin) are not used. Is there a reason 
why the hh_origin array is not of size (max_k + 1) * (max_k) ?


     - In KSPComputeExtremeSingularValues_GMRES we compute the singular 
values of the hh_origin array, which is an upper diagonal (R) matrix 
from a QR decomposition of the Hessenberg matrix. Therefore it has the 
same singular values as the original Hessenberg matrix. In this 
function, we don't forget to "zero the below diagonal garbage". But in 
KSPComputeEigenvalues_GMRES we just use hh_origin right away, without 
removing the sub-diagonal. I don't understand what's computed here : the 
eigenvalues of the upper diagonal representation of the Hessenberg 
matrix + the subdiagonal part of the Hessenberg matrix ? Why don't we 
use the hes_origin matrix ? Finally, in KSPComputeRitz_GMRES we use 
hes_ritz, the last full Hessenberg matrix if available (gmres->fullcycle 
 > 0), and hh_origin otherwise. But hes_ritz is a copy of the last full 
hh_origin, so my question is the same as before :

*TLDR* : why do we use hh_origin to compute the eigenvalues, and not 
hes_origin ? Why is hes_ritz a copy of hh_origin and not of hes_origin ?


     - I have also noticed that the fullcycle attribute is not used for 
FGMRES (it is for GMRES). Is that intentional ? This attribute is only 
used in the KSPComputeRitz_GMRES function, does that mean that 
KSPComputeRitz should not be called with a FGMRES type ? If so, should 
there be a test to check if the KSP type is indeed GMRES and raise a 
warning/error if not ?


I hope I'm not bothering too much, I've tried to answer theses questions 
by myself but I can't seem to find out.


Thanks in advance,

Pierre Seize


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190606/ba1b462b/attachment.html>


More information about the petsc-users mailing list