1 #ifndef __TAO_GPCG_H 2 #define __TAO_GPCG_H 3 #include <petsc/private/taoimpl.h> 4 #include <petsctaolinesearch.h> 5 6 typedef struct{ 7 8 /* Parameters */ 9 PetscReal pg_ftol; 10 PetscReal actred; 11 PetscReal f_new; 12 PetscReal minstep; 13 PetscReal stepsize; 14 PetscReal gnorm; 15 16 PetscReal sigma1,sigma2,sigma3; 17 18 PetscInt maxgpits; 19 20 /* Problem variables, vectors and index sets */ 21 22 /* Problem statistics */ 23 24 PetscInt n; /* Dimension of the Problem */ 25 26 PetscInt total_cgits; 27 PetscInt cg_iterates; 28 PetscInt total_gp_its; 29 PetscInt gp_iterates; 30 PetscInt cgits; 31 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; 40 41 Mat H; 42 Vec B; 43 PetscReal c; 44 45 PetscReal f; 46 PetscReal step; 47 Mat Hsub; 48 Mat Hsub_pre; 49 50 IS Free_Local; /* Indices of local variables equal to lower bound */ 51 IS TT; /* Indices of local variables equal to upper bound */ 52 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; 60 61 62 63 #endif 64 65 66 67 68 69 70