:orphan:
# KSPConvergedDefaultSetUIRNorm
makes the default convergence test use || B*(b - A*(initial guess))|| instead of || B*b ||. In the case of right preconditioner or if `KSPSetNormType`(ksp,`KSP_NORM_UNPRECONDITIONED`) is used there is no B in the above formula. UIRNorm is short for Use Initial Residual Norm. 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode KSPConvergedDefaultSetUIRNorm(KSP ksp)
```
Collective


## Input Parameters

- ***ksp   -*** iterative context



## Options Database Key

- ***-ksp_converged_use_initial_residual_norm <bool> -*** Use initial residual norm for computing relative convergence





## Notes
Use `KSPSetTolerances()` to alter the defaults for rtol, abstol, dtol.

The precise values of reason are macros such as `KSP_CONVERGED_RTOL`, which
are defined in petscksp.h.

If the convergence test is not `KSPConvergedDefault()` then this is ignored.

If right preconditioning is being used then B does not appear in the above formula.


## See Also
 [](ch_ksp), `KSP`, `KSPSetConvergenceTest()`, `KSPSetTolerances()`, `KSPConvergedSkip()`, `KSPConvergedReason`, `KSPGetConvergedReason()`, `KSPConvergedDefaultSetUMIRNorm()`, `KSPConvergedDefaultSetConvergedMaxits()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/interface/iterativ.c.html#KSPConvergedDefaultSetUIRNorm">src/ksp/ksp/interface/iterativ.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/ksp/interface/iterativ.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)  
