Skip to main content
`Ctrl`+`K`

# MatLMVMGetUpdateCount

Returns the number of accepted updates.

## Synopsis

    #include "petscksp.h"
    PetscErrorCode MatLMVMGetUpdateCount(Mat B, PetscInt *nupdates)

## Input Parameter

- B - A `MATLMVM` matrix

## Output Parameter

- nupdates - number of accepted updates

## Note

This number may be greater than the total number of update vectors stored in the matrix (`MatLMVMGetHistorySize()`). The counters are reset when `MatLMVMReset()` is called.

## See Also

KSP: Linear System Solvers, LMVM Matrices, `MATLMVM`, `MatLMVMGetRejectCount()`, `MatLMVMReset()`

## Level

intermediate

## Location

src/ksp/ksp/utils/lmvm/lmvmutils.c

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