xref: /petsc/src/ksp/pc/impls/deflation/deflation.h (revision 6c93e71c10815f0489f70baba72067ebc1a4f754)
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   PetscScalar correctfact;
10   PetscInt    reductionfact;
11   Mat         W,Wt,WtA,WtAW;    /* deflation space, coarse problem mats */
12   KSP         WtAWinv;         /* deflation coarse problem */
13   KSPType     ksptype;
14   PC          pc;              /* additional preconditioner */
15   Vec         work;
16   Vec         *workcoarse;
17   const char  *prefix;
18 
19   PCDeflationSpaceType spacetype;
20   PetscInt             spacesize;
21   PetscInt             lvl;
22   PetscInt             maxlvl;
23   PetscBool            extendsp;
24 } PC_Deflation;
25 
26 PETSC_INTERN PetscErrorCode PCDeflationComputeSpace(PC);
27 
28 #endif
29 
30