xref: /petsc/src/ksp/pc/impls/deflation/deflation.h (revision 292e2e671b084eef5d973b8b5e75ade2ec8cff20)
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   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