Date: 2015-10-02T22:26:12+00:00

Actual source code: linesearchimpl.h
petsc-3.6.2 2015-10-02
Report Typos and Errors

      1: #ifndef __LINESEARCHIMPL_H

      4: #include <petscsnes.h>
      5: #include <petsc/private/petscimpl.h>

      7: PETSC_EXTERN PetscBool SNESLineSearchRegisterAllCalled;
      8: PETSC_EXTERN PetscErrorCode SNESLineSearchRegisterAll(void);

     10: typedef struct _LineSearchOps *LineSearchOps;

     12: struct _LineSearchOps {
     13:   PetscErrorCode (*view)(SNESLineSearch, PetscViewer);
     14:   SNESLineSearchApplyFunc        apply;
     15:   PetscErrorCode (*precheck)(SNESLineSearch,Vec,Vec,PetscBool*,void*);
     16:   SNESLineSearchVIProjectFunc    viproject;
     17:   SNESLineSearchVINormFunc       vinorm;
     18:   PetscErrorCode (*postcheck)(SNESLineSearch,Vec,Vec,Vec,PetscBool *,PetscBool *,void*);
     19:   PetscErrorCode (*setfromoptions)(PetscOptions*,SNESLineSearch);
     20:   PetscErrorCode (*reset)(SNESLineSearch);
     21:   PetscErrorCode (*destroy)(SNESLineSearch);
     22:   PetscErrorCode (*setup)(SNESLineSearch);
     23:   PetscErrorCode (*snesfunc)(SNES,Vec,Vec);
     24: };

     26: struct _p_LineSearch {
     27:   PETSCHEADER(struct _LineSearchOps);

     29:   SNES                 snes;

     31:   void                 *data;

     33:   PetscBool            setupcalled;

     35:   Vec                  vec_sol;
     36:   Vec                  vec_sol_new;
     37:   Vec                  vec_func;
     38:   Vec                  vec_func_new;
     39:   Vec                  vec_update;

     41:   PetscInt             nwork;
     42:   Vec                  *work;

     44:   PetscReal            lambda;

     46:   PetscBool            norms;
     47:   PetscReal            fnorm;
     48:   PetscReal            ynorm;
     49:   PetscReal            xnorm;
     50:   SNESLineSearchReason result;
     51:   PetscBool            keeplambda;

     53:   PetscReal            damping;
     54:   PetscReal            maxstep;
     55:   PetscReal            steptol;
     56:   PetscInt             max_its;
     57:   PetscReal            rtol;
     58:   PetscReal            atol;
     59:   PetscReal            ltol;
     60:   PetscInt             order;

     62:   PetscReal            precheck_picard_angle;

     64:   void *               precheckctx;
     65:   void *               postcheckctx;

     67:   PetscViewer          monitor;

     69: };

     71: #endif