petsc-3.7.1 2016-05-15
Report Typos and Errors

SNESSetLagJacobian

Determines when the Jacobian is rebuilt in the nonlinear solve. See SNESSetLagPreconditioner() for determining how often the preconditioner is rebuilt.

Synopsis

#include "petscsnes.h"  
PetscErrorCode  SNESSetLagJacobian(SNES snes,PetscInt lag)
Logically Collective on SNES Many br

Input Parameters

snes - the SNES context Many br
lag - -1 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is computed within a single nonlinear solve, 2 means every second time Many brthe Jacobian is built etc. -2 means rebuild at next chance but then never again Many br

Options Database Keys

-snes_lag_jacobian <lag> - Many brNotes: Many brThe default is 1 Many brThe Jacobian is ALWAYS built in the first iteration of a nonlinear solve unless lag is -1 Many brIf -1 is used before the very first nonlinear solve the CODE WILL FAIL! because no Jacobian is used, use -2 to indicate you want it recomputed Many brat the next Newton step but never again (unless it is reset to another value) Many br

Many br

Keywords

SNES, nonlinear, set, convergence, tolerances

See Also

SNESSetTrustRegionTolerance(), SNESGetLagPreconditioner(), SNESSetLagPreconditioner(), SNESGetLagJacobian()

Level:intermediate
Location:
src/snes/interface/snes.c
Index of all SNES routines
Table of Contents for all manual pages
Index of all manual pages