1 #if !defined(__DEFLATION_H) 2 #define __DEFLATION_H 3 4 #include <petsc/private/pcimpl.h> /*I "petscpc.h" I*/ 5 #include <petscksp.h> 6 7 typedef struct { 8 PetscBool init; /* do only init step - error correction of direction is omitted */ 9 PetscBool correct; /* add CP (Qr) correction to descent direction */ 10 PetscScalar correctfact; 11 PetscInt reductionfact; 12 Mat W, Wt, WtA, WtAW; /* deflation space, coarse problem mats */ 13 KSP WtAWinv; /* deflation coarse problem */ 14 KSPType ksptype; 15 PC pc; /* additional preconditioner */ 16 Vec work; 17 Vec *workcoarse; 18 const char *prefix; 19 20 PCDeflationSpaceType spacetype; 21 PetscInt spacesize; 22 PetscInt lvl; 23 PetscInt maxlvl; 24 PetscBool extendsp; 25 } PC_Deflation; 26 27 PETSC_INTERN PetscErrorCode PCDeflationComputeSpace(PC); 28 29 #endif 30