# KSPCheckDot
Checks if the result of a dot product used by the corresponding `KSP` contains Inf or NaN. These indicate that the previous application of the preconditioner generated an error. Sets a `KSPConvergedReason` and returns if the `PC` set a `PCFailedReason`. Collective on ksp


## Input Parameter

- ***ksp -*** the linear solver `KSP` context.



## Output Parameter

- ***beta -*** the result of the inner product





## Developer Notes
Used to manage returning from `KSP` solvers whose preconditioners have failed, possibly only a subset of MPI ranks, in some way

It uses the fact that `KSP` piggy-backs the collectivity of certain error conditions on the results of norms and inner products.


## See Also
 `PCFailedReason`, `KSPConvergedReason`, `PCGetFailedReasonRank()`, `KSP`, `KSPCreate()`, `KSPSetType()`, `KSP`, `KSPCheckNorm()`, `KSPCheckSolve()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petsc/private/kspimpl.h.html#KSPCheckDot">include/petsc/private/kspimpl.h</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petsc/private/kspimpl.h)


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