Skip to main content
`Ctrl`+`K`

# KSPMonitorFn

A function prototype for functions provided to `KSPMonitorSet()`

## Synopsis

    PETSC_EXTERN_TYPEDEF typedef PetscErrorCode KSPMonitorFn(KSP ksp, PetscInt it, PetscReal rnorm, void *ctx);

## Calling Sequence

- ksp - iterative solver obtained from `KSPCreate()`

- it - iteration number

- rnorm - (estimated) 2-norm of (preconditioned) residual

- ctx - optional monitoring context, as provided with `KSPMonitorSet()`

## See Also

SNES: Nonlinear Solvers, `KSP`, `KSPMonitorSet()`

## Level

beginner

## Location

include/petscksp.h

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