xref: /petsc/src/ksp/pc/impls/deflation/deflation.h (revision 8a71cb68ad51445d5b1bd34db6a8647f90f4156a)
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 
18   PCDeflationSpaceType spacetype;
19   PetscInt             spacesize;
20   PetscInt             nestedlvl;
21   PetscInt             maxnestedlvl;
22   PetscBool            extendsp;
23 } PC_Deflation;
24 
25 PETSC_INTERN PetscErrorCode PCDeflationComputeSpace(PC);
26 
27 #endif
28 
29