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 { 12c4b75bccSAlp Dener Vec G_old, X_old, W, work; 13*89da521bSAlp Dener Vec unprojected_gradient, unprojected_gradient_old; 1461be54a6SAlp Dener IS active_lower, active_upper, active_fixed, active_idx, inactive_idx, inactive_old, new_inactives; 15ac9112b8SAlp Dener Vec inactive_grad, inactive_step; 16ac9112b8SAlp Dener 1761be54a6SAlp Dener PetscInt as_type; 1861be54a6SAlp Dener PetscReal as_step, as_tol; 1961be54a6SAlp Dener 20c0f10754SAlp Dener PetscReal f; 21ac9112b8SAlp Dener PetscReal rho, pow; 22ac9112b8SAlp Dener PetscReal eta; /* Restart tolerance */ 23ac9112b8SAlp Dener PetscReal delta_max; /* Minimum value for scaling */ 24ac9112b8SAlp Dener PetscReal delta_min; /* Maximum value for scaling */ 25ac9112b8SAlp Dener 26c0f10754SAlp Dener PetscBool recycle; 27c0f10754SAlp Dener 28ac9112b8SAlp Dener PetscInt cg_type; /* Formula to use */ 29ac9112b8SAlp Dener 30ac9112b8SAlp Dener PetscInt ls_fails, resets, broken_ortho, descent_error; 31ac9112b8SAlp Dener } TAO_BNCG; 32ac9112b8SAlp Dener 33ac9112b8SAlp Dener #endif /* ifndef __TAO_BNCG_H */ 34ac9112b8SAlp Dener 3561be54a6SAlp Dener PETSC_INTERN PetscErrorCode TaoBNCGEstimateActiveSet(Tao, PetscInt); 3661be54a6SAlp Dener PETSC_INTERN PetscErrorCode TaoBNCGBoundStep(Tao, Vec); 37c0f10754SAlp Dener PETSC_EXTERN PetscErrorCode TaoBNCGSetRecycleFlag(Tao, PetscBool); 38