4: #include <petscdm.h> 5: #include <petsc/private/pcimpl.h> 7: typedef struct {
8: PetscInt n, n_local, n_local_true;
9: PetscInt overlap; /* overlap requested by user */
10: KSP *ksp; /* linear solvers for each block */
11: VecScatter restriction; /* mapping from global to overlapping (process) subdomain*/
12: VecScatter *lrestriction; /* mapping from subregion to overlapping (process) subdomain */
13: VecScatter *lprolongation; /* mapping from non-overlapping subregion to overlapping (process) subdomain; used for restrict additive version of algorithms */
14: Vec lx, ly; /* work vectors */
15: Vec *x,*y; /* work vectors */
16: IS lis; /* index set that defines each overlapping multiplicative (process) subdomain */
17: IS *is; /* index set that defines each overlapping subdomain */
18: IS *is_local; /* index set that defines each non-overlapping subdomain, may be NULL */
19: Mat *mat,*pmat; /* mat is not currently used */
20: PCASMType type; /* use reduced interpolation, restriction or both */
21: PetscBool type_set; /* if user set this value (so won't change it for symmetric problems) */
22: PetscBool same_local_solves; /* flag indicating whether all local solvers are same */
23: PetscBool sort_indices; /* flag to sort subdomain indices */
24: PetscBool dm_subdomains; /* whether DM is allowed to define subdomains */
25: PCCompositeType loctype; /* the type of composition for local solves */
26: MatType sub_mat_type; /* the type of Mat used for subdomain solves (can be MATSAME or NULL) */
27: /* For multiplicative solve */
28: Mat *lmats; /* submatrices for overlapping multiplicative (process) subdomain */
29: } PC_ASM;
30: #endif