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