[petsc-users] KSPMonitorSingularValue

Jed Brown jedbrown at mcs.anl.gov
Thu Oct 20 09:38:46 CDT 2011


On Thu, Oct 20, 2011 at 09:34, Klaij, Christiaan <C.Klaij at marin.nl> wrote:

> call KSPMonitorSet(ksp,KSPMonitorSingularValue,PETSC_NULL,PETSC_NULL,ierr);
>

This gets KSPMonitorSingularValue called after each iteration. That routine
prints the singular values.


> call KSPSetComputeSingularValues(ksp,PETSC_TRUE,ierr)
>

This instructs the KSP to save the extra information needed by the monitor
above.


>
> in the part where I initialize the KSP. But where to call
> KSPMonitorSingularValue? And how do I get "n" and "rnorm"?
>

Do you want a monitor or do you want to extract estimates of the singular
values after KSPSolve has converged? You might be interested
in KSPComputeExtremeSingularValues(), for example.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111020/4e84eea3/attachment.htm>


More information about the petsc-users mailing list