xref: /petsc/src/tao/bound/impls/bncg/bncg.h (revision 00a402e09c6d62f19dbf72eef0e53394ab690d5c)
1 /*
2     Context for bound-constrained nonlinear conjugate gradient method
3  */
4 
5 
6 #ifndef __TAO_BNCG_H
7 #define __TAO_BNCG_H
8 
9 #include <petsc/private/taoimpl.h>
10 
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;
18 
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 */
23 
24     PetscInt cg_type;           /*  Formula to use */
25 
26     PetscInt ls_fails, resets, broken_ortho, descent_error;
27 } TAO_BNCG;
28 
29 #endif /* ifndef __TAO_BNCG_H */
30 
31 PETSC_INTERN PetscErrorCode TaoBNCGResetStepForNewInactives(Tao, Vec);
32