1 /* 2 Private data structure used for blmvm method. 3 */ 4 5 #if !defined(__TAO_BLMVM_H) 6 #define __TAO_BLMVM_H 7 8 #include <petsc/private/taoimpl.h> 9 10 /* 11 Context for limited memory variable metric method for bound constrained 12 optimization. 13 */ 14 typedef struct { 15 Mat M; 16 17 Vec unprojected_gradient; 18 Vec red_grad; 19 Vec Xold, Gold; 20 Vec W, work; 21 22 PetscInt as_type; 23 PetscReal as_step, as_tol, eps; 24 IS active_lower, active_upper, active_fixed; 25 IS inactive_idx, active_idx; 26 27 PetscInt n_free; 28 PetscInt n_bind; 29 30 PetscInt bfgs; 31 PetscInt grad; 32 Mat H0; 33 34 PetscBool recycle, no_scale; 35 } TAO_BLMVM; 36 37 #define BLMVM_STEP_GRAD 0 38 #define BLMVM_STEP_QN 1 39 40 #endif /* if !defined(__TAO_BLMVM_H) */ 41