Actual source code: deflation.h

      1: #pragma once

      3: #include <petsc/private/pcimpl.h>
      4: #include <petscksp.h>

      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;

     19:   PCDeflationSpaceType spacetype;
     20:   PetscInt             spacesize;
     21:   PetscInt             lvl;
     22:   PetscInt             maxlvl;
     23:   PetscBool            extendsp;
     24: } PC_Deflation;

     26: PETSC_INTERN PetscErrorCode PCDeflationComputeSpace(PC);