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