Actual source code: ls.h
1: /* $Id: ls.h,v 1.12 2001/08/06 21:17:15 bsmith Exp $ */
3: /*
4: Private context for a Newton line search method for solving
5: systems of nonlinear equations
6: */
8: #ifndef __SNES_LS_H
10: #include src/snes/snesimpl.h
12: typedef struct {
13: int (*LineSearch)(SNES,void*,Vec,Vec,Vec,Vec,Vec,PetscReal,PetscReal*,PetscReal*,int*);
14: void *lsP; /* user-defined line-search context (optional) */
15: /* --------------- Parameters used by line search method ----------------- */
16: PetscReal alpha; /* used to determine sufficient reduction */
17: PetscReal maxstep; /* maximum step size */
18: PetscReal steptol; /* step convergence tolerance */
19: int (*CheckStep)(SNES,void*,Vec,PetscTruth*); /* step-checking routine (optional) */
20: void *checkP; /* user-defined step-checking context (optional) */
21: } SNES_LS;
23: #endif