:orphan: # SNESSetLagPreconditionerPersists Set whether or not the preconditioner lagging persists through multiple nonlinear solves ## Synopsis ``` #include "petscsnes.h" PetscErrorCode SNESSetLagPreconditionerPersists(SNES snes, PetscBool flg) ``` Logically Collective ## Input Parameters - ***snes -*** the `SNES` context - ***flg -*** preconditioner lagging persists if true ## Options Database Keys - ***-snes_lag_jacobian_persists -*** sets the persistence through multiple SNES solves - ***-snes_lag_jacobian <-*** 2,1,2,...> - sets the lag - ***-snes_lag_preconditioner_persists -*** sets the persistence through multiple SNES solves - ***-snes_lag_preconditioner <-*** 2,1,2,...> - sets the lag ## Notes Normally when `SNESSetLagPreconditioner()` is used, the preconditioner is always rebuilt at the beginning of each new nonlinear solve, this removes that. This is useful both for nonlinear preconditioning, where it's appropriate to have the preconditioner be stale by several solves, and for implicit time-stepping, where preconditioner lagging in the inner nonlinear solve over several timesteps may present huge efficiency gains. ## See Also [](ch_snes), `SNES`, `SNESSetLagJacobianPersists()`, `SNESSetLagJacobian()`, `SNESGetLagJacobian()`, `SNESGetNPC()`, `SNESSetLagPreconditioner()` ## Level developer ## Location src/snes/interface/snes.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/interface/snes.c) [Index of all SNES routines](index.md) [Table of Contents for all manual pages](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)