1ac9112b8SAlp Dener /* 2ac9112b8SAlp Dener Context for bound-constrained nonlinear conjugate gradient method 3ac9112b8SAlp Dener */ 4ac9112b8SAlp Dener 5ac9112b8SAlp Dener 6ac9112b8SAlp Dener #ifndef __TAO_BNCG_H 7ac9112b8SAlp Dener #define __TAO_BNCG_H 8ac9112b8SAlp Dener 9ac9112b8SAlp Dener #include <petsc/private/taoimpl.h> 10ac9112b8SAlp Dener 11ac9112b8SAlp Dener typedef struct { 12ac9112b8SAlp Dener Vec G_old; 13ac9112b8SAlp Dener Vec X_old; 14ac9112b8SAlp Dener Vec unprojected_gradient; 15ac9112b8SAlp Dener Vec unprojected_gradient_old; 16ac9112b8SAlp Dener IS inactive_set; 17ac9112b8SAlp Dener Vec inactive_grad, inactive_step; 18ac9112b8SAlp Dener 19*c0f10754SAlp Dener PetscReal f; 20ac9112b8SAlp Dener PetscReal rho, pow; 21ac9112b8SAlp Dener PetscReal eta; /* Restart tolerance */ 22ac9112b8SAlp Dener PetscReal delta_max; /* Minimum value for scaling */ 23ac9112b8SAlp Dener PetscReal delta_min; /* Maximum value for scaling */ 24ac9112b8SAlp Dener 25*c0f10754SAlp Dener PetscBool recycle; 26*c0f10754SAlp Dener 27ac9112b8SAlp Dener PetscInt cg_type; /* Formula to use */ 28ac9112b8SAlp Dener 29ac9112b8SAlp Dener PetscInt ls_fails, resets, broken_ortho, descent_error; 30ac9112b8SAlp Dener } TAO_BNCG; 31ac9112b8SAlp Dener 32ac9112b8SAlp Dener #endif /* ifndef __TAO_BNCG_H */ 33ac9112b8SAlp Dener 34ac9112b8SAlp Dener PETSC_INTERN PetscErrorCode TaoBNCGResetStepForNewInactives(Tao, Vec); 35*c0f10754SAlp Dener PETSC_EXTERN PetscErrorCode TaoBNCGSetRecycleFlag(Tao, PetscBool); 36