xref: /petsc/src/ksp/pc/impls/deflation/deflation.h (revision 22b0793ea0a27dcaec2f0ace1007f3cc42835011)
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 pre;             /* start with x0 being the solution in the deflation space */
9   PetscBool correct;         /* add CP (Qr) correction to descent direction */
10   PetscBool truenorm;
11   PetscBool adaptiveconv;
12   PetscReal adaptiveconst;
13   PetscInt  reductionfact;
14   Mat       W,Wt,AW,WtAW;    /* deflation space, coarse problem mats */
15   KSP       WtAWinv;         /* deflation coarse problem */
16   KSPType   ksptype;
17   PC        pc;              /* additional preconditioner */
18   Vec       work;
19   Vec       *workcoarse;
20 
21   PCDeflationSpaceType spacetype;
22   PetscInt             spacesize;
23   PetscInt             nestedlvl;
24   PetscInt             maxnestedlvl;
25   PetscBool            extendsp;
26 } PC_Deflation;
27 
28 PETSC_INTERN PetscErrorCode PCDeflationComputeSpace(PC);
29 
30 #endif
31 
32