xref: /petsc/src/snes/impls/richardson/snesrichardsonimpl.h (revision 42f4f86d694fb53cb4294575ec6d71954f75b2e7)
1028b6e76SBarry Smith /*
2*42f4f86dSBarry Smith    Private context for Richardson iteration
3028b6e76SBarry Smith */
4028b6e76SBarry Smith 
5*42f4f86dSBarry Smith #ifndef __SNES_RICHARDSON_H
6*42f4f86dSBarry Smith #define __SNES_RICHARDSON_H
7028b6e76SBarry Smith #include <private/snesimpl.h>
8028b6e76SBarry Smith 
9028b6e76SBarry Smith typedef struct {
10028b6e76SBarry Smith   SNESLineSearchType type;
11028b6e76SBarry Smith   PetscErrorCode     (*LineSearch)(SNES,void*,Vec,Vec,Vec,PetscReal,PetscReal,Vec,Vec,PetscReal*,PetscReal*,PetscBool *);
12028b6e76SBarry Smith   /* Line Search Parameters */
13028b6e76SBarry Smith   PetscReal          damping;
14028b6e76SBarry Smith   PetscReal          maxstep;                                                        /* maximum step size */
15028b6e76SBarry Smith   PetscReal          steptol;                                                        /* step convergence tolerance */
16028b6e76SBarry Smith   PetscErrorCode     (*precheckstep)(SNES,Vec,Vec,void*,PetscBool *);                  /* step-checking routine (optional) */
17028b6e76SBarry Smith   void               *precheck;                                                       /* user-defined step-checking context (optional) */
18028b6e76SBarry Smith   PetscErrorCode     (*postcheckstep)(SNES,Vec,Vec,Vec,void*,PetscBool *,PetscBool *); /* step-checking routine (optional) */
19028b6e76SBarry Smith   void               *postcheck;                                                      /* user-defined step-checking context (optional) */
20028b6e76SBarry Smith   void               *lsP;                                                            /* user-defined line-search context (optional) */
21028b6e76SBarry Smith   PetscViewer        monitor;
22*42f4f86dSBarry Smith } SNES_Richardson;
23028b6e76SBarry Smith 
24028b6e76SBarry Smith #endif
25028b6e76SBarry Smith 
26