Petsc command to get the conditionning of matrices

Jed Brown jed at
Thu Jul 16 05:44:36 CDT 2009


> Is there a way to get the conditionning of my Jacobian matrices? like a command when running my exectable (-ksp_.. or -snes_.. or -pc_..)

I use


  estimate at every Krylov iteration, only works with GMRES and CG


  estimate of a few eigenvalues from the iteration (GMRES and CG)


  sometimes useful for very small systems, e.g. to find the size of a
  null space while debugging


  again, only for very small problems.

Note that these eigenvalues and singular values are not reliable for
eigen-analysis, they are only intended to help understand why iterative
methods are working a certain way.  If you care about accurate
eigen/singular values, use SLEPc.

I noticed a few weeks ago that -ksp_compute_singularvalues didn't work
as advertised.  A few lines needed to be added to KSPSolve(), as for
-ksp_compute_eigenvalues.  I usually use -ksp_monitor_singular_value
instead, so it hadn't bothered me, but it's now in petsc-dev:


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the petsc-users mailing list