# MatLMVMGetUpdateCount
Returns the number of accepted updates. This number may be greater than the total number of update vectors stored in the matrix. The counters are reset when `MatLMVMReset()` is called. 
## Synopsis
```
#include "petscksp.h" 
PetscErrorCode MatLMVMGetUpdateCount(Mat B, PetscInt *nupdates)
```

## Input Parameters

- ***B -*** An LMVM-type matrix



## Output Parameter

- ***nupdates -*** number of accepted updates





## See Also
 [](chapter_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMGetRejectCount()`, `MatLMVMReset()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/utils/lmvm/lmvmutils.c.html#MatLMVMGetUpdateCount">src/ksp/ksp/utils/lmvm/lmvmutils.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/ksp/ksp/utils/lmvm/lmvmutils.c)


[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)  
