On May 14, 2012, at 10:29 AM, behzad baghapour wrote: > Dear Developers, > > I wish to know when the algorithm of Linesearch used by SNESLineSearchCubic > or SNESLineSearchQuadratic calls the Jacobian calculation routine defined by > user? Is it a way to change the Jacobian before calling the line-search > routines? > > Thanks, > BehZad
The linesearch routines themselves never call a "compute Jacobian" routine. It is only SNESSolve_LS() that computes the Jacobian and then uses it in the linear solve. Some of the line search routines reuse the previously computed Jacobian in a matrix vector product to determine the appropriate descent requirements. You can see the code in src/snes/impls/ls/ls.c Barry
