1 /* 2 Context for limited memory variable metric method for unconstrained 3 optimization. 4 */ 5 6 #ifndef __TAO_OWLQN_H 7 #define __TAO_OWLQN_H 8 #include <petsc/private/taoimpl.h> 9 10 typedef struct { 11 Mat M; 12 13 Vec X; 14 Vec G; 15 Vec D; 16 Vec W; 17 Vec GV; /* the pseudo gradient */ 18 19 Vec Xold; 20 Vec Gold; 21 22 PetscInt bfgs; 23 PetscInt sgrad; 24 PetscInt grad; 25 26 PetscReal lambda; 27 } TAO_OWLQN; 28 29 static PetscErrorCode ProjDirect_OWLQN(Vec d, Vec g); 30 31 static PetscErrorCode ComputePseudoGrad_OWLQN(Vec x, Vec gv, PetscReal lambda); 32 33 #endif /* ifndef __TAO_OWLQN_H */ 34