KSPMonitorLGRange#

Prints line graphs summarizing the residual norm, the fraction of elements that dominate the residual, and the convergence factor at each iteration of the KSP solver

Synopsis#

#include "petscksp.h"   
PetscErrorCode KSPMonitorLGRange(KSP ksp, PetscInt n, PetscReal rnorm, void *monctx)

Collective

Input Parameters#

  • ksp - iterative context

  • n - iteration number

  • rnorm - the 2-norm of the residual (or an approximation)

  • monctx - a PetscViewer (typically of type PETSCVIEWERDRAW) containing the line graphs to update

Note#

Suitable for use as a KSP monitor via KSPMonitorSet(). Draws four line graphs: the log residual norm, the percentage of entries whose magnitude exceeds \(0.2\) times the maximum, the relative change in residual norm per iteration, and their product.

See Also#

KSP: Linear System Solvers, KSP, KSPMonitorSet(), KSPMonitorResidual(), PETSCVIEWERDRAW, PetscDrawLG

Level#

intermediate

Location#

src/ksp/ksp/interface/xmon.c


Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages