1 #ifndef _SNES_FASIMPLS 2 #define _SNES_FASIMPLS 3 4 #include <private/snesimpl.h> 5 #include <private/dmimpl.h> 6 7 typedef struct { 8 9 /* flags for knowing the global place of this FAS object */ 10 PetscInt level; /* level = 0 coarsest level */ 11 PetscInt levels; /* if level + 1 = levels; we're the last turtle */ 12 13 PetscViewer monitor; /* debuggging output for FAS */ 14 15 /* smoothing objects */ 16 SNES upsmooth; /* the SNES for presmoothing */ 17 SNES downsmooth; /* the SNES for postsmoothing */ 18 19 /* coarse grid correction objects */ 20 SNES next; /* the SNES instance for the next level in the hierarchy */ 21 Mat interpolate; /* interpolation */ 22 Mat inject; /* injection operator (unscaled) */ 23 Mat restrct; /* restriction operator */ 24 Vec rscale; /* the pointwise scaling of the restriction operator */ 25 26 /* method parameters */ 27 PetscInt n_cycles; /* number of cycles on this level */ 28 PetscInt max_up_it; /* number of pre-smooths */ 29 PetscInt max_down_it; /* number of post-smooth cycles */ 30 PetscBool usedmfornumberoflevels; /* uses a DM to generate a number of the levels */ 31 PetscBool useGS; /* use the user Gauss-Seidel routine if available */ 32 33 } SNES_FAS; 34 35 #endif 36