Date: 2022-08-02T03:14:53+00:00

Actual source code: trimpl.h

      2: /*
      3:    Context for a Newton trust region method for solving a system
      4:    of nonlinear equations
      5:  */

      9: #include <petsc/private/snesimpl.h>

     11: typedef struct {
     12:   /* ---- Parameters used by the trust region method  ---- */
     13:   PetscReal      mu;             /* used to compute trust region parameter */
     14:   PetscReal      eta;            /* used to compute trust region parameter */
     15:   PetscReal      delta;          /* trust region parameter */
     16:   PetscReal      delta0;         /* used to initialize trust region parameter */
     17:   PetscReal      delta1;         /* used to compute trust region parameter */
     18:   PetscReal      delta2;         /* used to compute trust region parameter */
     19:   PetscReal      delta3;         /* used to compute trust region parameter */
     20:   PetscReal      sigma;          /* used to detemine termination */
     21:   PetscBool      itflag;         /* flag for convergence testing */
     22:   PetscReal      rnorm0,ttol;    /* used for KSP convergence test */
     23:   PetscErrorCode (*precheck)(SNES,Vec,Vec,PetscBool*,void*);
     24:   void           *precheckctx;
     25:   PetscErrorCode (*postcheck)(SNES,Vec,Vec,Vec,PetscBool*,PetscBool*,void*);
     26:   void           *postcheckctx;
     27: } SNES_NEWTONTR;

     29: #endif