1*724775ccSBarry Smith /* 2*724775ccSBarry Smith Private context for a Newton line search method for solving 3*724775ccSBarry Smith systems of nonlinear equations 4*724775ccSBarry Smith */ 5*724775ccSBarry Smith 6*724775ccSBarry Smith #ifndef __SNES_LS_H 7*724775ccSBarry Smith #define __SNES_LS_H 8*724775ccSBarry Smith #include "private/snesimpl.h" 9*724775ccSBarry Smith 10*724775ccSBarry Smith typedef struct { 11*724775ccSBarry Smith PetscErrorCode (*LineSearch)(SNES,void*,Vec,Vec,Vec,Vec,Vec,PetscReal,PetscReal,PetscReal*,PetscReal*,PetscTruth*); 12*724775ccSBarry Smith void *lsP; /* user-defined line-search context (optional) */ 13*724775ccSBarry Smith /* --------------- Parameters used by line search method ----------------- */ 14*724775ccSBarry Smith PetscReal alpha; /* used to determine sufficient reduction */ 15*724775ccSBarry Smith PetscReal maxstep; /* maximum step size */ 16*724775ccSBarry Smith PetscReal minlambda; /* determines smallest line search lambda used */ 17*724775ccSBarry Smith PetscErrorCode (*precheckstep)(SNES,Vec,Vec,void*,PetscTruth*); /* step-checking routine (optional) */ 18*724775ccSBarry Smith void *precheck; /* user-defined step-checking context (optional) */ 19*724775ccSBarry Smith PetscErrorCode (*postcheckstep)(SNES,Vec,Vec,Vec,void*,PetscTruth*,PetscTruth*); /* step-checking routine (optional) */ 20*724775ccSBarry Smith void *postcheck; /* user-defined step-checking context (optional) */ 21*724775ccSBarry Smith PetscViewerASCIIMonitor monitor; 22*724775ccSBarry Smith } SNES_LS; 23*724775ccSBarry Smith 24*724775ccSBarry Smith #endif 25*724775ccSBarry Smith 26