Actual source code: ls.h

  1: /* 
  2:    Private context for a Newton line search method for solving
  3:    systems of nonlinear equations
  4:  */

  6: #ifndef __SNES_LS_H
 8:  #include src/snes/snesimpl.h

 10: typedef struct {
 11:   PetscErrorCode (*LineSearch)(SNES,void*,Vec,Vec,Vec,Vec,Vec,PetscReal,PetscReal*,PetscReal*,PetscTruth*);
 12:   void           *lsP;                              /* user-defined line-search context (optional) */
 13:   /* --------------- Parameters used by line search method ----------------- */
 14:   PetscReal      alpha;                                    /* used to determine sufficient reduction */
 15:   PetscReal      maxstep;                           /* maximum step size */
 16:   PetscReal      steptol;                           /* step convergence tolerance */
 17:   PetscErrorCode (*CheckStep)(SNES,void*,Vec,PetscTruth*); /* step-checking routine (optional) */
 18:   void           *checkP;                           /* user-defined step-checking context (optional) */
 19: } SNES_LS;

 21: #endif