xref: /petsc/src/snes/impls/tr/trimpl.h (revision 6524c165f7ddaf30fd7457737f668f984c8ababf)
1acbee50cSBarry Smith 
2acbee50cSBarry Smith /*
3acbee50cSBarry Smith    Context for a Newton trust region method for solving a system
4acbee50cSBarry Smith    of nonlinear equations
5acbee50cSBarry Smith  */
6acbee50cSBarry Smith 
7*6524c165SJacob Faibussowitsch #ifndef __SNES_TR_H
8acbee50cSBarry Smith #define __SNES_TR_H
9af0996ceSBarry Smith #include <petsc/private/snesimpl.h>
10acbee50cSBarry Smith 
11acbee50cSBarry Smith typedef struct {
12acbee50cSBarry Smith   /* ---- Parameters used by the trust region method  ---- */
13acbee50cSBarry Smith   PetscReal mu;           /* used to compute trust region parameter */
14acbee50cSBarry Smith   PetscReal eta;          /* used to compute trust region parameter */
15acbee50cSBarry Smith   PetscReal delta;        /* trust region parameter */
16acbee50cSBarry Smith   PetscReal delta0;       /* used to initialize trust region parameter */
17acbee50cSBarry Smith   PetscReal delta1;       /* used to compute trust region parameter */
18acbee50cSBarry Smith   PetscReal delta2;       /* used to compute trust region parameter */
19acbee50cSBarry Smith   PetscReal delta3;       /* used to compute trust region parameter */
20acbee50cSBarry Smith   PetscReal sigma;        /* used to detemine termination */
21ace3abfcSBarry Smith   PetscBool itflag;       /* flag for convergence testing */
22acbee50cSBarry Smith   PetscReal rnorm0, ttol; /* used for KSP convergence test */
23c9368356SGlenn Hammond   PetscErrorCode (*precheck)(SNES, Vec, Vec, PetscBool *, void *);
24c9368356SGlenn Hammond   void *precheckctx;
25c9368356SGlenn Hammond   PetscErrorCode (*postcheck)(SNES, Vec, Vec, Vec, PetscBool *, PetscBool *, void *);
267cb011f5SBarry Smith   void *postcheckctx;
2704d7464bSBarry Smith } SNES_NEWTONTR;
28acbee50cSBarry Smith 
29acbee50cSBarry Smith #endif
30