Actual source code: petsc-linesearchimpl.h

petsc-3.3-p7 2013-05-11
  1: #ifndef __LINESEARCHIMPL_H

  4: #include <petscsnes.h>

  6: typedef struct _LineSearchOps *LineSearchOps;

  8: struct _LineSearchOps {
  9:   PetscErrorCode (*view)          (SNESLineSearch, PetscViewer);
 10:   SNESLineSearchApplyFunc        apply;
 11:   SNESLineSearchPreCheckFunc     precheckstep;
 12:   SNESLineSearchVIProjectFunc    viproject;
 13:   SNESLineSearchVINormFunc       vinorm;
 14:   SNESLineSearchPostCheckFunc    postcheckstep;
 15:   PetscErrorCode (*setfromoptions)(SNESLineSearch);
 16:   PetscErrorCode (*reset)         (SNESLineSearch);
 17:   PetscErrorCode (*destroy)       (SNESLineSearch);
 18:   PetscErrorCode (*setup)         (SNESLineSearch);
 19: };

 21: struct _p_LineSearch {
 22:   PETSCHEADER(struct _LineSearchOps);

 24:   SNES                snes;     /* temporary -- so we can pull out the function evaluation */

 26:   void                *data;

 28:   PetscBool           setupcalled;

 30:   Vec                 vec_sol;
 31:   Vec                 vec_sol_new;
 32:   Vec                 vec_func;
 33:   Vec                 vec_func_new;
 34:   Vec                 vec_update;

 36:   PetscInt            nwork;
 37:   Vec                 *work;

 39:   PetscReal           lambda;

 41:   PetscBool           norms;
 42:   PetscReal           fnorm;
 43:   PetscReal           ynorm;
 44:   PetscReal           xnorm;
 45:   PetscBool           success;
 46:   PetscBool           keeplambda;

 48:   PetscReal           damping;
 49:   PetscReal           maxstep;
 50:   PetscReal           steptol;
 51:   PetscInt            max_its;
 52:   PetscReal           rtol;
 53:   PetscReal           atol;
 54:   PetscReal           ltol;
 55:   PetscInt            order;

 57:   PetscReal           precheck_picard_angle;

 59:   void *              precheckctx;
 60:   void *              postcheckctx;

 62:   PetscViewer         monitor;

 64: };

 66: #endif