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 coarser level in the hierarchy */ 21 SNES previous; /* the SNES instance for the next finer level in the hierarchy */ 22 Mat interpolate; /* interpolation */ 23 Mat inject; /* injection operator (unscaled) */ 24 Mat restrct; /* restriction operator */ 25 Vec rscale; /* the pointwise scaling of the restriction operator */ 26 27 /* method parameters */ 28 PetscInt n_cycles; /* number of cycles on this level */ 29 PetscInt max_up_it; /* number of pre-smooths */ 30 PetscInt max_down_it; /* number of post-smooth cycles */ 31 PetscBool usedmfornumberoflevels; /* uses a DM to generate a number of the levels */ 32 33 /* Galerkin FAS state */ 34 PetscBool galerkin; /* use Galerkin formation of the coarse problem */ 35 Vec Xg; /* Galerkin solution projection */ 36 Vec Fg; /* Galerkin function projection */ 37 38 } SNES_FAS; 39 40 #endif 41