:orphan:
# KSPMonitorSAWs
monitor `KSP` solution using SAWs 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode KSPMonitorSAWs(KSP ksp, PetscInt n, PetscReal rnorm, void *ctx)
```
Logically Collective


## Input Parameters

- ***ksp   -*** iterative context
- ***n     -*** iteration number
- ***rnorm -*** 2-norm (preconditioned) residual value (may be estimated).
- ***ctx -*** created with `KSPMonitorSAWsCreate()`





## Note
Create the ctx with `KSPMonitorSAWsCreate()` then call `KSPMonitorSet()` with the context, this function, and `KSPMonitorSAWsDestroy()`


## See Also
 [](ch_ksp), `KSP`, `KSPMonitorSet()`, `KSPMonitorSAWsCreate()`, `KSPMonitorSAWsDestroy()`, `KSPMonitorSingularValue()`, `KSPComputeExtremeSingularValues()`, `PetscViewerSAWsOpen()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/interface/saws/kspsaws.c.html#KSPMonitorSAWs">src/ksp/ksp/interface/saws/kspsaws.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/ksp/interface/saws/kspsaws.c)


[Index of all KSP routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
