Actual source code: pcasmimpl.h
1: #pragma once
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: Vec *scaling; /* user-provided diagonal weights for each overlapping subdomain */
15: IS lis; /* index set that defines each overlapping multiplicative (process) subdomain */
16: IS *is; /* index set that defines each overlapping subdomain */
17: IS *is_local; /* index set that defines each non-overlapping subdomain, may be NULL */
18: Mat *mat, *pmat; /* mat is not currently used */
19: PCASMType type; /* use reduced interpolation, restriction or both */
20: PetscBool type_set; /* if user set this value (so won't change it for symmetric problems) */
21: PetscBool sort_indices; /* flag to sort subdomain indices */
22: PetscBool dm_subdomains; /* whether DM is allowed to define subdomains */
23: PCCompositeType loctype; /* the type of composition for local solves */
24: MatType sub_mat_type; /* the type of Mat used for subdomain solves (can be MATSAME or NULL) */
25: /* For PC_ASM_WEIGHTED */
26: PCASMWeightedComputeScalingFn *computescaling; /* callback filling scaling[] during PCSetUp() */
27: PetscCtx computescalingctx; /* user context passed to computescaling */
28: /* For multiplicative solve */
29: Mat *lmats; /* submatrices for overlapping multiplicative (process) subdomain */
30: } PC_ASM;