[petsc-users] -ksp_diagonal_scale question

Barry Smith bsmith at mcs.anl.gov
Tue Mar 20 14:05:42 CDT 2012


   Max,

    In petsc-dev it will scale both the mat and pmat by the diagonal of the pmat if they are different so it appears the documentation is simply out of date.  Note that -ksp_monitor and the various convergence tests are run in the scaled system so there is no certainty that convergence in this scaled system results in the same amount of convergence as in the original system, though for reasonably conditioned systems it should be fine. 

    In other words if the condition number of your systems is 10^14 this will not help you get a better convergence, you had better use quad precision available with that latest gcc compilers and petsc-dev


   Barry
On Mar 19, 2012, at 5:06 PM, Max Rudolph wrote:

> I was looking at the documentation for KSPSetDiagonalScale and it
> contains this comment:
> 
> "This routine is only used if the matrix and preconditioner matrix are
> the same thing."
> 
> However, I have found that even if the matrix and preconditioner are
> different, using the -ksp_diagonal_scale command line argument changes
> the convergence behavior of the solvers. Is the man page correct?
> Also, can you point me towards documentation of the type of scaling
> that is applied?
> 
> Thanks for your help,
> Max Rudolph



More information about the petsc-users mailing list