[petsc-users] user defined algorithm for newton solver

Barry Smith bsmith at mcs.anl.gov
Thu Oct 8 12:58:01 CDT 2015


> On Oct 8, 2015, at 12:26 PM, Michael Povolotskyi <mpovolot at purdue.edu> wrote:
> 
> Dear Petsc developers and users,
> I'm solving a nonlinear system with PETSc.
> Often simple Newton iterations do not work and I have to use either linear search or trust region.
> I would like to use my own algorithm to find a next iteration approximation to solution if the Newton step does not improve the residual. As far as I can see I have to define my own SNELLineSearch object. Is there any example that shows how to do it?

   The line search model is 1) select direction based on approximate solution of approximate Jacobian  2) search in THAT direction for a decrease in the function evaluation. You state "if the Newton step does not improve the residual." so will you be computing the DIRECTION in a different way than (1) or will you be using the same direction but trying somehow to find a decrease in the function evaluation using a different technique then the standard line searchs we provide?

   Frankly if the line searches we provide don't work that means the direction is not good and no "special" line search will recover.  I really recommend you go through our suggestions on the FAQ http://www.mcs.anl.gov/petsc/documentation/faq.html#newton on trying to figure out why Newton is not converging before you think about writing a special line search.

  Barry



> Thank you,
> Michael.
> 
> -- 
> Michael Povolotskyi, PhD
> Research Assistant Professor
> Network for Computational Nanotechnology
> Hall for Discover and Learning Research, Room 441
> West Lafayette, IN 47907
> Phone (765) 4949396
> 



More information about the petsc-users mailing list