[petsc-users] SNES line search basic

Gong Ding gdiso at ustc.edu
Tue Oct 22 23:04:12 CDT 2013


Hi all,
The problem is solved.
I previously use

ierr = SNESSetType(snes,SNESNEWTONLS);
ierr = SNESLineSearchCreate(PETSC_COMM_WORLD, &snesls);
ierr = SNESLineSearchSetType(snesls, SNESLINESEARCHBASIC);
This method create a new snesls, but not work.

 
Barry told me that I should use 
ierr = SNESGetLineSearch(snes, &snesls);
instead of 
ierr = SNESLineSearchCreate(PETSC_COMM_WORLD, &snesls);

Then everything is ok now.

Thanks very much.

Gong Ding
      


> Hi,
> I updated petsc from 3.2 to 3.4. However, I found that the nonlinear solver previously worked well now failed with massage DIVERGED_LINE_SEARCH. 
> My problem is extremely nonlinear, cubic line search may fail but Newton method works.
>   
> With petsc 3.2, I only use basic Newton by calling 
> SNESLineSearchSet(snes, SNESLineSearchNo, PETSC_NULL) 
> With 3.4 I call basic Newton by  
> SNESLineSearchSetType(snes, SNESLINESEARCHBASIC).
> 
> However, petsc 3.4 still reports 
> [0] SNESSolve_NEWTONLS(): fnorm=3.7500000000000006e-02, gnorm=3.7500000000000006e-02, ynorm=1.0000000000000000e+00, lssucceed=0
> [0] SNESNEWTONLSCheckLocalMin_Private(): || J^T F|| 1.414213562373e+00 near zero implies found a local minimum  
> 
> 
> It seems petsc 3.4 can not disable line search. Does anyone have the same problem?
> 
> Gong Ding
>  
> 
> 


More information about the petsc-users mailing list