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