1 #pragma once 2 3 #include <petsc/private/taoimpl.h> 4 #include <petscis.h> 5 6 typedef struct { 7 /* Parameters */ 8 PetscReal pg_ftol; 9 PetscReal actred; 10 PetscReal f_new; 11 12 PetscReal eta1, eta2, eta3, eta4; 13 PetscReal sigma1, sigma2, sigma3; 14 15 PetscInt maxgpits; 16 17 /* Problem variables, vectors and index sets */ 18 PetscReal stepsize; 19 PetscReal pgstepsize; 20 21 /* Problem statistics */ 22 23 PetscInt n; /* Dimension of the Problem */ 24 PetscReal delta; /* Trust region size */ 25 PetscReal gnorm; 26 PetscReal f; 27 28 PetscInt total_gp_its; 29 PetscInt gp_iterates; 30 31 Vec X_New; 32 Vec G_New; 33 Vec Work; 34 35 /* Subvectors and submatrices */ 36 Vec DXFree; 37 Vec R; 38 Vec rmask; 39 Vec diag; 40 Mat H_sub; 41 Mat Hpre_sub; 42 43 IS Free_Local; /* Indices of local variables equal to lower bound */ 44 VecScatter scatter; 45 46 PetscInt n_free; /* Number of free variables */ 47 PetscInt n_free_last; 48 49 } TAO_TRON; 50