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