[petsc-users] snes linesearch bt vs basic?

Barry Smith bsmith at mcs.anl.gov
Mon Feb 1 14:16:56 CST 2016


> On Feb 1, 2016, at 1:46 PM, Xiangdong <epscodes at gmail.com> wrote:
> 
> Hello everyone,
> 
> I have a question on snes with line search. Under what circumstance, applying the (globalized) line search can perform WORSE than without line search (i.e. full newton step ls type basic)? 
> 
> When I apply snes with my problem, I found that at some time steps, snes diverges with linesearch_bt, but can converge with linesearch_basic (using same initial guess). For the same problem, there are also some steps, at which linearsearch_basic fails, but linesearch_bt converges.

   Here are you referring to "time steps"?  When doing time stepping, depending on the evolution of the equations, the nonlinear systems can become more difficult to solver or easier to solve. One can often adjust the time-step size to make sure the nonlinear equations are never to difficult. So for example if the nonlinear solver is taking more than, say, 10 Newton steps, or is failing, decrease the timestep by some factor and try again. If the nonlinear solver needs only 1 or 2 Newton steps one can try increasing the time-step. Ideally this is also done in conjunction with an ODE error estimator to control the error by adjusting the timestep. Some of the PETSc implicit TS ODE integrators do this automatically. Generally adjusting the timestep is a more reliable way to insure convergence than trying to produce a completely robust nonlinear solver (as Matt points out if you did develop a completely robust nonlinear solver you could retire on your fame).

   Barry


> Is there a general guide line to decide whether linesearch should be used?
> 
> Thanks.
> 
> Xiangdong 



More information about the petsc-users mailing list