1: #ifndef __TAO_GPCG_H 3: #include <petsc/private/taoimpl.h> 4: #include <petsctaolinesearch.h> 6: typedef struct{ 8: /* Parameters */ 9: PetscReal pg_ftol; 10: PetscReal actred; 11: PetscReal f_new; 12: PetscReal minstep; 13: PetscReal stepsize; 14: PetscReal gnorm; 16: PetscReal sigma1,sigma2,sigma3; 18: PetscInt maxgpits; 20: /* Problem variables, vectors and index sets */ 22: /* Problem statistics */ 24: PetscInt n; /* Dimension of the Problem */ 26: PetscInt total_cgits; 27: PetscInt cg_iterates; 28: PetscInt total_gp_its; 29: PetscInt gp_iterates; 30: PetscInt cgits; 32: Vec G_New; 33: Vec DXFree; 34: Vec R; 35: Vec DX; 36: Vec X; 37: Vec X_New; 38: Vec G, PG; 39: Vec Work; 41: Mat H; 42: Vec B; 43: PetscReal c; 45: PetscReal f; 46: PetscReal step; 47: Mat Hsub; 48: Mat Hsub_pre; 50: IS Free_Local; /* Indices of local variables equal to lower bound */ 51: IS TT; /* Indices of local variables equal to upper bound */ 53: PetscInt n_free; /* Number of free variables */ 54: PetscInt n_upper; 55: PetscInt n_lower; 56: PetscInt n_bind; /* Number of binding varibles */ 57: PetscInt ksp_type; 58: PetscInt subset_type; 59: }TAO_GPCG; 63: #endif