xref: /petsc/src/snes/impls/richardson/snesrichardsonimpl.h (revision 028b6e763ad4b43dad2546398a0b7c4c9de6b45e)
1*028b6e76SBarry Smith /*
2*028b6e76SBarry Smith    Private context for Picard iteration
3*028b6e76SBarry Smith */
4*028b6e76SBarry Smith 
5*028b6e76SBarry Smith #ifndef __SNES_PICARD_H
6*028b6e76SBarry Smith #define __SNES_PICARD_H
7*028b6e76SBarry Smith #include <private/snesimpl.h>
8*028b6e76SBarry Smith 
9*028b6e76SBarry Smith typedef struct {
10*028b6e76SBarry Smith   SNESLineSearchType type;
11*028b6e76SBarry Smith   PetscErrorCode     (*LineSearch)(SNES,void*,Vec,Vec,Vec,PetscReal,PetscReal,Vec,Vec,PetscReal*,PetscReal*,PetscBool *);
12*028b6e76SBarry Smith   /* Line Search Parameters */
13*028b6e76SBarry Smith   PetscReal          damping;
14*028b6e76SBarry Smith   PetscReal          maxstep;                                                        /* maximum step size */
15*028b6e76SBarry Smith   PetscReal          steptol;                                                        /* step convergence tolerance */
16*028b6e76SBarry Smith   PetscErrorCode     (*precheckstep)(SNES,Vec,Vec,void*,PetscBool *);                  /* step-checking routine (optional) */
17*028b6e76SBarry Smith   void               *precheck;                                                       /* user-defined step-checking context (optional) */
18*028b6e76SBarry Smith   PetscErrorCode     (*postcheckstep)(SNES,Vec,Vec,Vec,void*,PetscBool *,PetscBool *); /* step-checking routine (optional) */
19*028b6e76SBarry Smith   void               *postcheck;                                                      /* user-defined step-checking context (optional) */
20*028b6e76SBarry Smith   void               *lsP;                                                            /* user-defined line-search context (optional) */
21*028b6e76SBarry Smith   PetscViewer        monitor;
22*028b6e76SBarry Smith } SNES_Picard;
23*028b6e76SBarry Smith 
24*028b6e76SBarry Smith #endif
25*028b6e76SBarry Smith 
26