:orphan: # MatLMVMReset Flushes all of the accumulated updates out of the LMVM approximation. In practice, this will not actually destroy the data associated with the updates. It simply resets counters, which leads to existing data being overwritten, and `MatSolve()` being applied as if there are no updates. A boolean flag is available to force destruction of the update vectors. ## Synopsis ``` #include "petscksp.h" PetscErrorCode MatLMVMReset(Mat B, PetscBool destructive) ``` If the user has provided another LMVM matrix as J0, the J0 matrix is also reset in this function. ## Input Parameters - ***B -*** An LMVM-type matrix - ***destructive -*** flag for enabling destruction of data structures ## See Also [](ch_ksp), [LMVM Matrices](sec_matlmvm), `MATLMVM`, `MatLMVMAllocate()`, `MatLMVMUpdate()` ## Level intermediate ## Location src/ksp/ksp/utils/lmvm/lmvmutils.c --- [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](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)