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