xref: /petsc/src/snes/impls/tr/trimpl.h (revision 7cb011f58c32087171e6c65e6b5293ee2291f1f1)
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 
7519f805aSKarl Rupp #if !defined(__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 */
23*7cb011f5SBarry Smith   PetscErrorCode (*postcheck)(SNES,Vec,Vec,Vec,PetscBool*,void*);
24*7cb011f5SBarry Smith   void           *postcheckctx;
2504d7464bSBarry Smith } SNES_NEWTONTR;
26acbee50cSBarry Smith 
27acbee50cSBarry Smith #endif
28