Actual source code: mgimpl.h

  1: /* $Id: mgimpl.h,v 1.13 2000/05/05 22:17:11 balay Exp $ */

  3: /*
  4:       Data structure used for Multigrid preconditioner.
  5: */
  8: #include "src/sles/pc/pcimpl.h"
  9: #include "petscmg.h"
 10: #include "petscsles.h"

 12: typedef struct _MG* MG;

 14: /*
 15:      Structure for abstract multigrid solver. 

 17:      Level (0) is always the coarsest level and Level (levels-1) is the finest.
 18: */
 19: struct _MG
 20: {
 21:     MGType   am;                           /* Multiplicative, additive or full */
 22:     int      cycles;                       /* Number cycles to run */
 23:     int      level;                        /* level = 0 coarsest level */
 24:     int      levels;                       /* number of active levels used */
 25:     int      maxlevels;                    /* total number of levels allocated */
 26:     Vec      b;                            /* Right hand side */
 27:     Vec      x;                            /* Solution */
 28:     Vec      r;                            /* Residual */
 29:     int      (*residual)(Mat,Vec,Vec,Vec);
 30:     Mat      A;                            /* matrix used in forming residual*/
 31:     SLES     smoothd;                      /* pre smoother */
 32:     SLES     smoothu;                      /* post smoother */
 33:     Mat      interpolate;
 34:     Mat      restrct;                      /* restrict is a reserved word on the Cray!!!*/
 35:     int      default_smoothu;              /* number of smooths per level if not over-ridden */
 36:     int      default_smoothd;              /*  with calls to KSPSetTolerances() */
 37: };


 40: #endif