Actual source code: bncg.h

petsc-3.9.4 2018-09-11
Report Typos and Errors
  1: /*
  2:     Context for bound-constrained nonlinear conjugate gradient method
  3:  */


  6: #ifndef __TAO_BNCG_H

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

 11: typedef struct {
 12:     Vec G_old;
 13:     Vec X_old;
 14:     Vec unprojected_gradient;
 15:     Vec unprojected_gradient_old;
 16:     IS  inactive_set;
 17:     Vec inactive_grad, inactive_step;

 19:     PetscReal rho, pow;
 20:     PetscReal eta;         /*  Restart tolerance */
 21:     PetscReal delta_max;   /*  Minimum value for scaling */
 22:     PetscReal delta_min;   /*  Maximum value for scaling */

 24:     PetscInt cg_type;           /*  Formula to use */

 26:     PetscInt ls_fails, resets, broken_ortho, descent_error;
 27: } TAO_BNCG;

 29: #endif /* ifndef __TAO_BNCG_H */

 31: PETSC_INTERN PetscErrorCode TaoBNCGResetStepForNewInactives(Tao, Vec);