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