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