Actual source code: schur.h

  1: #ifdef PETSC_RCS_HEADER
  2: static char vcid[] = "$Id: schur.h,v 1.3 1999/07/30 02:21:38 knepley Exp $";
  3: #endif
  4: /* 
  5:    Private data structure for Schur complement preconditioner.
  6: */

 10:  #include petscsles.h
 11:  #include grid.h
 12:  #include gvec.h
 13:  #include gsolver.h

 15: typedef struct {
 16:   Grid             grid;                /* The problem grid */
 17:   PetscTruth       isConstrained;       /* The flag for constrained problems */
 18:   PetscTruth       explicitConstraints; /* Form the constrained matrix explicitly */
 19:   PetscTruth       useMath;             /* Use Mathematica functions instead */
 20:   PetscViewer      mathViewer;          /* The link to Mathematica */

 22:   /* Division of the problem into fields */
 23:   Vec              u, uNew, uNew2;      /* The velocity variables */
 24:   Vec              p, pNew;             /* The pressure variables */
 25:   VecScatter       uScatter;            /* The scatter from x to the velocity variables u */
 26:   VecScatter       pScatter;            /* The scatter from x to the pressure variables p */
 27:   Vec              projX, projY, projZ; /* The projected vectors for systems with implicit constraints */

 29:   /* Inner solvers */
 30:   SLES             sles;                /* The solver for A^{-1} */
 31:   SLES             schurSles;           /* The solver for B^T A^{-1} B */
 32:   PetscTruth       useLaplacian;        /* Use Laplacian preconditioning of the Schur complement */
 33:   int              iter, schurIter;     /* The number of iterations when solving A and B^T A^{-1} B */

 35:   /* Field variables */
 36:   int              numMomOps;           /* The number of momentum operators */
 37:   int              gradOp;              /* The gradient operator */
 38:   int              divOp;               /* The divergence operator */
 39:   int             *momOps;              /* The momentum operators */
 40:   PetscTruth      *momOpIsALE;          /* The flags for ALE momentum operators */
 41:   PetscScalar     *momOpAlphas;         /* The scalar multipliers for the momentum operators*/
 42:   PetscScalar      gradOpAlpha;         /* The scalar multiplier for the gradient operator */
 43:   int              sField;              /* The shape function field */
 44:   int              tField;              /* The test function field */
 45:   VarOrdering      sOrder;              /* The global variable ordering for the shape function in B */
 46:   LocalVarOrdering sLocOrder;           /* The local  variable ordering for the shape function in B */
 47:   VarOrdering      tOrder;              /* The global variable ordering for the test  function in B */
 48:   LocalVarOrdering tLocOrder;           /* The local  variable ordering for the test  function in B */
 49:   GMat             A;                   /* The momentum matrix */
 50:   GMat             sparseA;             /* The sparsified momentum matrix */
 51:   GMat             B;                   /* The gradient matrix */
 52:   GMat             S;                   /* The Schur complement matrix */
 53:   IS               rowPerm;             /* The bandwidth reducing reordering for the rows of A */
 54:   IS               colPerm;             /* The bandwidth reducing reordering for the cols of A */
 55:   /* THIS IS ONLY A TEST */
 56:   GMat             lap;                 /* The laplacian to precondition the Schur complement */

 58: } PC_Schur;

 60: #endif