xref: /petsc/src/snes/impls/fas/fasimpls.h (revision d1adcc6f22524de47068b5de09203384b2ee3bf5)
1421d9b32SPeter Brune #ifndef _SNES_FASIMPLS
2421d9b32SPeter Brune #define _SNES_FASIMPLS
3421d9b32SPeter Brune 
4421d9b32SPeter Brune #include <private/snesimpl.h>
5*ee78dd50SPeter Brune #include <private/dmimpl.h>
6421d9b32SPeter Brune 
7421d9b32SPeter Brune typedef struct {
8421d9b32SPeter Brune 
9421d9b32SPeter Brune   /* flags for knowing the global place of this FAS object */
10421d9b32SPeter Brune   PetscInt       level;                        /* level = 0 coarsest level */
11421d9b32SPeter Brune   PetscInt       levels;                       /* if level + 1 = levels; we're the last turtle */
12421d9b32SPeter Brune 
13646217ecSPeter Brune   PetscViewer    monitor;                      /* debuggging output for FAS */
14421d9b32SPeter Brune 
15421d9b32SPeter Brune   /* smoothing objects */
16*ee78dd50SPeter Brune   SNES           upsmooth;                     /* the SNES for presmoothing */
17*ee78dd50SPeter Brune   SNES           downsmooth;                   /* the SNES for postsmoothing */
18421d9b32SPeter Brune 
19421d9b32SPeter Brune   /* coarse grid correction objects */
20421d9b32SPeter Brune   SNES           next;                         /* the SNES instance for the next level in the hierarchy */
21421d9b32SPeter Brune   Mat            interpolate;                  /* interpolation */
22efe1f98aSPeter Brune   Mat            inject;                       /* injection operator (unscaled) */
23421d9b32SPeter Brune   Mat            restrct;                      /* restriction operator */
24421d9b32SPeter Brune   Vec            rscale;                       /* the pointwise scaling of the restriction operator */
25421d9b32SPeter Brune 
26*ee78dd50SPeter Brune   /* method parameters */
27*ee78dd50SPeter Brune   PetscInt       n_cycles;                     /* number of cycles on this level */
28*ee78dd50SPeter Brune   PetscInt       max_up_it;                    /* number of pre-smooths */
29*ee78dd50SPeter Brune   PetscInt       max_down_it;                  /* number of post-smooth cycles */
30d1adcc6fSPeter Brune   PetscBool      usedmfornumberoflevels;       /* uses a DM to generate a number of the levels */
31421d9b32SPeter Brune 
32421d9b32SPeter Brune } SNES_FAS;
33421d9b32SPeter Brune 
34421d9b32SPeter Brune #endif
35