Actual source code: petscpctypes.h

  1: #pragma once

  3: /* MANSEC = KSP */
  4: /* SUBMANSEC = PC */

  6: /*S
  7:    PC - Abstract PETSc object that manages all preconditioners including direct solvers such as `PCLU`

  9:    Level: beginner

 11: .seealso: [](doc_linsolve), [](sec_pc), `PCCreate()`, `PCSetType()`, `PCType`
 12: S*/
 13: typedef struct _p_PC *PC;

 15: /*J
 16:    PCType - String with the name of a PETSc preconditioner.  These are all the preconditioners and direct solvers that PETSc provides.

 18:    Level: beginner

 20:    Notes:
 21:    Use `PCSetType()` or the options database key `-pc_type` to set the preconditioner to use with a given `PC` object

 23:    `PCRegister()` is used to register preconditioners that are then accessible via `PCSetType()`

 25: .seealso: [](doc_linsolve), [](sec_pc), `PCSetType()`, `PC`, `PCCreate()`, `PCRegister()`, `PCSetFromOptions()`, `PCLU`, `PCJACOBI`, `PCBJACOBI`
 26: J*/
 27: typedef const char *PCType;
 28: #define PCNONE               "none"
 29: #define PCJACOBI             "jacobi"
 30: #define PCSOR                "sor"
 31: #define PCLU                 "lu"
 32: #define PCQR                 "qr"
 33: #define PCSHELL              "shell"
 34: #define PCAMGX               "amgx"
 35: #define PCBJACOBI            "bjacobi"
 36: #define PCMG                 "mg"
 37: #define PCEISENSTAT          "eisenstat"
 38: #define PCILU                "ilu"
 39: #define PCICC                "icc"
 40: #define PCASM                "asm"
 41: #define PCGASM               "gasm"
 42: #define PCKSP                "ksp"
 43: #define PCBJKOKKOS           "bjkokkos"
 44: #define PCCOMPOSITE          "composite"
 45: #define PCREDUNDANT          "redundant"
 46: #define PCSPAI               "spai"
 47: #define PCNN                 "nn"
 48: #define PCCHOLESKY           "cholesky"
 49: #define PCPBJACOBI           "pbjacobi"
 50: #define PCVPBJACOBI          "vpbjacobi"
 51: #define PCMAT                "mat"
 52: #define PCHYPRE              "hypre"
 53: #define PCPARMS              "parms"
 54: #define PCFIELDSPLIT         "fieldsplit"
 55: #define PCTFS                "tfs"
 56: #define PCML                 "ml"
 57: #define PCGALERKIN           "galerkin"
 58: #define PCEXOTIC             "exotic"
 59: #define PCCP                 "cp"
 60: #define PCLSC                "lsc"
 61: #define PCPYTHON             "python"
 62: #define PCPFMG               "pfmg"
 63: #define PCSMG                "smg"
 64: #define PCSYSPFMG            "syspfmg"
 65: #define PCREDISTRIBUTE       "redistribute"
 66: #define PCSVD                "svd"
 67: #define PCGAMG               "gamg"
 68: #define PCCHOWILUVIENNACL    "chowiluviennacl"
 69: #define PCROWSCALINGVIENNACL "rowscalingviennacl"
 70: #define PCSAVIENNACL         "saviennacl"
 71: #define PCBDDC               "bddc"
 72: #define PCKACZMARZ           "kaczmarz"
 73: #define PCTELESCOPE          "telescope"
 74: #define PCPATCH              "patch"
 75: #define PCLMVM               "lmvm"
 76: #define PCHMG                "hmg"
 77: #define PCDEFLATION          "deflation"
 78: #define PCHPDDM              "hpddm"
 79: #define PCH2OPUS             "h2opus"
 80: #define PCMPI                "mpi"

 82: /*E
 83:     PCSide - Determines if the preconditioner is to be applied to the left, right
 84:              or symmetrically around the operator in `KSPSolve()`.

 86:    Values:
 87: +  `PC_LEFT`      - applied after the operator is applied
 88: .  `PC_RIGHT`     - applied before the operator is applied
 89: -  `PC_SYMMETRIC` - a portion of the preconditioner is applied before the operator and the transpose of this portion is applied after the operator is applied.

 91:    Level: beginner

 93:    Note:
 94:    Certain `KSPType` support only a subset of `PCSide` values

 96: .seealso: [](sec_pc), `PC`, `KSPSetPCSide()`, `KSP`, `KSPType`, `KSPGetPCSide()`, `KSPSolve()`
 97: E*/
 98: typedef enum {
 99:   PC_SIDE_DEFAULT = -1,
100:   PC_LEFT         = 0,
101:   PC_RIGHT        = 1,
102:   PC_SYMMETRIC    = 2
103: } PCSide;
104: #define PC_SIDE_MAX (PC_SYMMETRIC + 1)

106: /*E
107:     PCRichardsonConvergedReason - reason a `PCApplyRichardson()` method terminated

109:    Level: advanced

111: .seealso: [](sec_pc), `KSPRICHARDSON`, `PC`, `PCApplyRichardson()`
112: E*/
113: typedef enum {
114:   PCRICHARDSON_NOT_SET        = 0,
115:   PCRICHARDSON_CONVERGED_RTOL = 2,
116:   PCRICHARDSON_CONVERGED_ATOL = 3,
117:   PCRICHARDSON_CONVERGED_ITS  = 4,
118:   PCRICHARDSON_DIVERGED_DTOL  = -4
119: } PCRichardsonConvergedReason;

121: /*E
122:     PCJacobiType - Determines what elements of the matrix are used to form the Jacobi preconditioner, that is with the `PCType` of `PCJACOBI`

124:    Values:
125: +  `PC_JACOBI_DIAGONAL` - use the diagonal entry, if it is zero use one
126: .  `PC_JACOBI_ROWL1`    - add sum of absolute values in row i, j != i, to diag_ii
127: .  `PC_JACOBI_ROWMAX`   - use the maximum absolute value in the row
128: -  `PC_JACOBI_ROWSUM`   - use the sum of the values in the row (not the absolute values)

130:    Level: intermediate

132: .seealso: [](sec_pc), `PCJACOBI`, `PC`
133: E*/
134: typedef enum {
135:   PC_JACOBI_DIAGONAL,
136:   PC_JACOBI_ROWL1,
137:   PC_JACOBI_ROWMAX,
138:   PC_JACOBI_ROWSUM
139: } PCJacobiType;

141: /*E
142:     PCASMType - Determines the type of additive Schwarz method, `PCASM`, to use

144:    Values:
145: +  `PC_ASM_BASIC`        - Symmetric version where residuals from the ghost points are used
146:                            and computed values in ghost regions are added together.
147:                            Classical standard additive Schwarz as introduced in {cite}`dryja1987additive`.
148: .  `PC_ASM_RESTRICT`     - Residuals from ghost points are used but computed values in ghost
149:                            region are discarded {cite}`cs99`. Default.
150: .  `PC_ASM_INTERPOLATE`  - Residuals from ghost points are not used, computed values in ghost
151:                            region are added back in.
152: -  `PC_ASM_NONE`         - Residuals from ghost points are not used, computed ghost values are
153:                            discarded. Not very good.

155:    Level: beginner

157: .seealso: [](sec_pc), `PC`, `PCASM`, `PCASMSetType()`, `PCGASMType`
158: E*/
159: typedef enum {
160:   PC_ASM_BASIC       = 3,
161:   PC_ASM_RESTRICT    = 1,
162:   PC_ASM_INTERPOLATE = 2,
163:   PC_ASM_NONE        = 0
164: } PCASMType;

166: /*E
167:     PCGASMType - Determines the type of generalized additive Schwarz method to use (differs from `PCASM` in allowing multiple processors per subdomain) with the `PCType` of `PCGASM`

169:    Values:
170: +  `PC_GASM_BASIC`       - Symmetric version where the full from the outer subdomain is used, and the resulting correction is applied
171:                            over the outer subdomains.  As a result, points in the overlap will receive the sum of the corrections
172:                            from neighboring subdomains. Classical standard additive Schwarz {cite}`dryja1987additive`.
173: .  `PC_GASM_RESTRICT`    - Residual from the outer subdomain is used but the correction is restricted to the inner subdomain only
174:                            (i.e., zeroed out over the overlap portion of the outer subdomain before being applied).  As a result,
175:                            each point will receive a correction only from the unique inner subdomain containing it (nonoverlapping covering
176:                            assumption) {cite}`cs99`. Default.
177: .  `PC_GASM_INTERPOLATE` - Residual is zeroed out over the overlap portion of the outer subdomain, but the resulting correction is
178:                            applied over the outer subdomain. As a result, points in the overlap will receive the sum of the corrections
179:                            from neighboring subdomains.
180: -  `PC_GASM_NONE`        - Residuals and corrections are zeroed out outside the local subdomains. Not very good.

182:    Level: beginner

184:    Note:
185:    Each subdomain has nested inner and outer parts.  The inner subdomains are assumed to form a non-overlapping covering of the computational
186:    domain, while the outer subdomains contain the inner subdomains and overlap with each other. The `PCGASM` preconditioner will compute
187:    a subdomain correction over each *outer* subdomain from a residual computed there, but its different variants will differ in
188:    (a) how the outer subdomain residual is computed, and (b) how the outer subdomain correction is computed.

190:    Developer Note:
191:    Perhaps better to remove this since it matches `PCASMType`

193: .seealso: [](sec_pc), `PCGASM`, `PCASM`, `PC`, `PCGASMSetType()`, `PCASMType`
194: E*/
195: typedef enum {
196:   PC_GASM_BASIC       = 3,
197:   PC_GASM_RESTRICT    = 1,
198:   PC_GASM_INTERPOLATE = 2,
199:   PC_GASM_NONE        = 0
200: } PCGASMType;

202: /*E
203:     PCCompositeType - Determines how two or more preconditioner are composed with the `PCType` of `PCCOMPOSITE`

205:   Values:
206: +  `PC_COMPOSITE_ADDITIVE`                 - results from application of all preconditioners are added together
207: .  `PC_COMPOSITE_MULTIPLICATIVE`           - preconditioners are applied sequentially to the residual freshly
208:                                              computed after the previous preconditioner application
209: .  `PC_COMPOSITE_SYMMETRIC_MULTIPLICATIVE` - preconditioners are applied sequentially to the residual freshly
210:                                              computed from first preconditioner to last and then back (Use only for symmetric matrices and preconditioners)
211: .  `PC_COMPOSITE_SPECIAL`                  - This is very special for a matrix of the form $ \alpha I + R + S$
212:                                              where the first preconditioner is built from $\alpha I + S$ and second from $\alpha I + R$
213: .  `PC_COMPOSITE_SCHUR`                    - composes the Schur complement of the matrix from two blocks, see `PCFIELDSPLIT`
214: -  `PC_COMPOSITE_GKB`                      - the generalized Golub-Kahan bidiagonalization preconditioner, see `PCFIELDSPLIT`

216:    Level: beginner

218: .seealso: [](sec_pc), `PCCOMPOSITE`, `PCFIELDSPLIT`, `PC`, `PCCompositeSetType()`, `SNESCompositeType`, `PCCompositeSpecialSetAlpha()`
219: E*/
220: typedef enum {
221:   PC_COMPOSITE_ADDITIVE,
222:   PC_COMPOSITE_MULTIPLICATIVE,
223:   PC_COMPOSITE_SYMMETRIC_MULTIPLICATIVE,
224:   PC_COMPOSITE_SPECIAL,
225:   PC_COMPOSITE_SCHUR,
226:   PC_COMPOSITE_GKB
227: } PCCompositeType;

229: /*E
230:     PCFieldSplitSchurPreType - Determines how to precondition a Schur complement arising with the `PCType` of `PCFIELDSPLIT`

232:     Values:
233: +  `PC_FIELDSPLIT_SCHUR_PRE_SELF`  - the preconditioner for the Schur complement is generated from the symbolic representation of the Schur complement matrix.
234:                                      The only preconditioners that currently work with this symbolic representation matrix object are `PCLSC` and `PCHPDDM`
235: .  `PC_FIELDSPLIT_SCHUR_PRE_SELFP` - the preconditioning for the Schur complement is generated from an explicitly-assembled approximation $Sp = A11 - A10 diag(A00)^{-1} A01$.
236:                                      This is only a good preconditioner when $diag(A00)$ is a good preconditioner for $A00$. Optionally, $A00$ can be
237:                                      lumped before extracting the diagonal using the additional option `-fieldsplit_1_mat_schur_complement_ainv_type lump`
238: .  `PC_FIELDSPLIT_SCHUR_PRE_A11`   - the preconditioner for the Schur complement is generated from $A11$, not the Schur complement matrix
239: .  `PC_FIELDSPLIT_SCHUR_PRE_USER`  - the preconditioner for the Schur complement is generated from the user provided matrix (pre argument
240:                                      to this function).
241: -  `PC_FIELDSPLIT_SCHUR_PRE_FULL`  - the preconditioner for the Schur complement is generated from the exact Schur complement matrix representation
242:                                      computed internally by `PCFIELDSPLIT` (this is expensive) useful mostly as a test that the Schur complement approach can work for your problem

244:     Level: intermediate

246: .seealso: [](sec_pc), `PCFIELDSPLIT`, `PCFieldSplitSetSchurPre()`, `PC`
247: E*/
248: typedef enum {
249:   PC_FIELDSPLIT_SCHUR_PRE_SELF,
250:   PC_FIELDSPLIT_SCHUR_PRE_SELFP,
251:   PC_FIELDSPLIT_SCHUR_PRE_A11,
252:   PC_FIELDSPLIT_SCHUR_PRE_USER,
253:   PC_FIELDSPLIT_SCHUR_PRE_FULL
254: } PCFieldSplitSchurPreType;

256: /*E
257:     PCFieldSplitSchurFactType - determines which off-diagonal parts of the approximate block factorization to use with the `PCType` of `PCFIELDSPLIT`

259:     Values:
260: +   `PC_FIELDSPLIT_SCHUR_FACT_DIAG`  - the preconditioner is solving `D`
261: .   `PC_FIELDSPLIT_SCHUR_FACT_LOWER` - the preconditioner is solving `L D`
262: .   `PC_FIELDSPLIT_SCHUR_FACT_UPPER` - the preconditioner is solving `D U`
263: -   `PC_FIELDSPLIT_SCHUR_FACT_FULL`  - the preconditioner is solving `L(D U)`

265:     where the matrix is factorized as
266: .vb
267:    (A   B)  = (1       0) (A   0) (1  Ainv*B)  = L D U
268:    (C   E)    (C*Ainv  1) (0   S) (0       1)
269: .ve

271:     Level: intermediate

273: .seealso: [](sec_pc), `PCFIELDSPLIT`, `PCFieldSplitSetSchurFactType()`, `PC`
274: E*/
275: typedef enum {
276:   PC_FIELDSPLIT_SCHUR_FACT_DIAG,
277:   PC_FIELDSPLIT_SCHUR_FACT_LOWER,
278:   PC_FIELDSPLIT_SCHUR_FACT_UPPER,
279:   PC_FIELDSPLIT_SCHUR_FACT_FULL
280: } PCFieldSplitSchurFactType;

282: /*E
283:     PCPARMSGlobalType - Determines the global preconditioner method in `PCPARMS`

285:     Level: intermediate

287: .seealso: [](sec_pc), `PCPARMS`, `PCPARMSSetGlobal()`, `PC`
288: E*/
289: typedef enum {
290:   PC_PARMS_GLOBAL_RAS,
291:   PC_PARMS_GLOBAL_SCHUR,
292:   PC_PARMS_GLOBAL_BJ
293: } PCPARMSGlobalType;

295: /*E
296:     PCPARMSLocalType - Determines the local preconditioner method in `PCPARMS`

298:     Level: intermediate

300: .seealso: [](sec_pc), `PCPARMS`, `PCPARMSSetLocal()`, `PC`
301: E*/
302: typedef enum {
303:   PC_PARMS_LOCAL_ILU0,
304:   PC_PARMS_LOCAL_ILUK,
305:   PC_PARMS_LOCAL_ILUT,
306:   PC_PARMS_LOCAL_ARMS
307: } PCPARMSLocalType;

309: /*J
310:     PCGAMGType - type of generalized algebraic multigrid `PCGAMG` method

312:    Values:
313: +   `PCGAMGAGG`       - (the default) smoothed aggregation algorithm, robust, very well tested
314: .   `PCGAMGGEO`       - geometric coarsening, uses mesh generator to produce coarser meshes, limited to triangles, not supported, reference implementation (2D)
315: -   `PCGAMGCLASSICAL` - classical algebraic multigrid preconditioner, incomplete, not supported, reference implementation

317:      Level: intermediate

319: .seealso: [](sec_pc), `PCGAMG`, `PCMG`, `PC`, `PCSetType()`, `PCGAMGSetThreshold()`, `PCGAMGSetReuseInterpolation()`
320: J*/
321: typedef const char *PCGAMGType;
322: #define PCGAMGAGG       "agg"
323: #define PCGAMGGEO       "geo"
324: #define PCGAMGCLASSICAL "classical"

326: /*J
327:    PCGAMGClassicalType - String name selecting the prolongator construction used by the classical algebraic multigrid `PCGAMGCLASSICAL` implementation

329:    Values:
330: +   `PCGAMGCLASSICALDIRECT`   - Ruge--Stueben direct (also called "matching") interpolation
331: -   `PCGAMGCLASSICALSTANDARD` - the standard Ruge--Stueben interpolation

333:    Level: intermediate

335: .seealso: [](sec_pc), `PCGAMG`, `PCGAMGCLASSICAL`, `PCGAMGClassicalSetType()`, `PCGAMGClassicalGetType()`, `PCGAMGType`
336: J*/
337: typedef const char *PCGAMGClassicalType;
338: #define PCGAMGCLASSICALDIRECT   "direct"
339: #define PCGAMGCLASSICALSTANDARD "standard"

341: /*E
342:    PCMGType - Determines the type of multigrid method that is run with the `PCType` of `PCMG`

344:    Values:
345: +  `PC_MG_MULTIPLICATIVE` (default) - traditional V or W cycle as determined by `PCMGSetCycleType()`
346: .  `PC_MG_ADDITIVE`                 - the additive multigrid preconditioner where all levels are
347:                                       smoothed before updating the residual. This only uses the
348:                                       down smoother, in the preconditioner the upper smoother is ignored
349: .  `PC_MG_FULL`                     - same as multiplicative except one also performs grid sequencing,
350:                                       that is starts on the coarsest grid, performs a cycle, interpolates
351:                                       to the next, performs a cycle etc. This is much like the F-cycle presented in "Multigrid" by Trottenberg, Oosterlee, Schuller page 49, but that
352:                                       algorithm supports smoothing on before the restriction on each level in the initial restriction to the coarsest stage. In addition that algorithm
353:                                       calls the V-cycle only on the coarser level and has a post-smoother instead.
354: -  `PC_MG_KASKADE`                  - Cascadic or Kaskadic multigrid, like full multigrid except one never goes back to a coarser level from a finer

356:    Level: beginner

358: .seealso: [](sec_pc), `PCMG`, `PC`, `PCMGSetType()`, `PCMGSetCycleType()`, `PCMGSetCycleTypeOnLevel()`
359: E*/
360: typedef enum {
361:   PC_MG_MULTIPLICATIVE,
362:   PC_MG_ADDITIVE,
363:   PC_MG_FULL,
364:   PC_MG_KASKADE
365: } PCMGType;
366: #define PC_MG_CASCADE PC_MG_KASKADE;

368: /*E
369:    PCMGCycleType - Determines which of V-cycle or W-cycle to use with the `PCType` of `PCMG` or `PCGAMG`

371:    Values:
372: +  `PC_MG_V_CYCLE` - use the V cycle
373: -  `PC_MG_W_CYCLE` - use the W cycle

375:    Level: beginner

377: .seealso: [](sec_pc), `PCMG`, `PC`, `PCMGSetCycleType()`
378: E*/
379: typedef enum {
380:   PC_MG_CYCLE_V = 1,
381:   PC_MG_CYCLE_W = 2
382: } PCMGCycleType;

384: /*E
385:     PCMGGalerkinType - Determines if the coarse grid operators are computed via the Galerkin process with the `PCType` of `PCMG`

387:    Values:
388: +  `PC_MG_GALERKIN_PMAT` - computes the `pmat` (matrix from which the preconditioner is built) via the Galerkin process from the finest grid
389: .  `PC_MG_GALERKIN_MAT` -  computes the `mat` (matrix used to apply the operator) via the Galerkin process from the finest grid
390: .  `PC_MG_GALERKIN_BOTH` - computes both the `mat` and `pmat` via the Galerkin process (if pmat == mat the construction is only done once
391: -  `PC_MG_GALERKIN_NONE` - neither operator is computed via the Galerkin process, the user must provide the operator

393:    Level: beginner

395:    Note:
396:    Users should never set `PC_MG_GALERKIN_EXTERNAL`, it is used by `PCHYPRE` and `PCML`

398: .seealso: [](sec_pc), `PCMG`, `PC`, `PCMGSetCycleType()`
399: E*/
400: typedef enum {
401:   PC_MG_GALERKIN_BOTH,
402:   PC_MG_GALERKIN_PMAT,
403:   PC_MG_GALERKIN_MAT,
404:   PC_MG_GALERKIN_NONE,
405:   PC_MG_GALERKIN_EXTERNAL
406: } PCMGGalerkinType;

408: /*E
409:     PCExoticType - Determines which of the face-based or wirebasket-based coarse grid space to use with the `PCType` of `PCEXOTIC`

411:    Level: beginner

413: .seealso: [](sec_pc), `PCExoticSetType()`, `PCEXOTIC`
414: E*/
415: typedef enum {
416:   PC_EXOTIC_FACE,
417:   PC_EXOTIC_WIREBASKET
418: } PCExoticType;

420: /*E
421:    PCBDDCInterfaceExtType - Defines how interface balancing is extended into the interior of subdomains with the `PCType` of `PCBDDC`

423:    Values:
424: +  `PC_BDDC_INTERFACE_EXT_DIRICHLET` - solves Dirichlet interior problem; this is the standard BDDC algorithm
425: -  `PC_BDDC_INTERFACE_EXT_LUMP`      - skips interior solve; sometimes called $M_1$ and associated with "lumped FETI-DP"

427:    Level: intermediate

429: .seealso: [](sec_pc), `PCBDDC`, `PC`
430: E*/
431: typedef enum {
432:   PC_BDDC_INTERFACE_EXT_DIRICHLET,
433:   PC_BDDC_INTERFACE_EXT_LUMP
434: } PCBDDCInterfaceExtType;

436: /*E
437:   PCMGCoarseSpaceType - Function space for coarse space for adaptive interpolation

439:   Level: beginner

441: .seealso: [](sec_pc), `PCMGSetAdaptCoarseSpaceType()`, `PCMG`, `PC`
442: E*/
443: typedef enum {
444:   PCMG_ADAPT_NONE,
445:   PCMG_ADAPT_POLYNOMIAL,
446:   PCMG_ADAPT_HARMONIC,
447:   PCMG_ADAPT_EIGENVECTOR,
448:   PCMG_ADAPT_GENERALIZED_EIGENVECTOR,
449:   PCMG_ADAPT_GDSW
450: } PCMGCoarseSpaceType;

452: /*E
453:     PCPatchConstructType - Determines the algorithm used to construct patches for the `PCPATCH` preconditioner

455:    Level: beginner

457: .seealso: [](sec_pc), `PCPatchSetConstructType()`, `PCPATCH`, `PC`
458: E*/
459: typedef enum {
460:   PC_PATCH_STAR,
461:   PC_PATCH_VANKA,
462:   PC_PATCH_PARDECOMP,
463:   PC_PATCH_USER,
464:   PC_PATCH_PYTHON
465: } PCPatchConstructType;

467: /*E
468:     PCDeflationSpaceType - Type of deflation used by `PCType` `PCDEFLATION`

470:     Values:
471: +   `PC_DEFLATION_SPACE_HAAR`        - directly assembled based on Haar (db2) wavelet with overflowed filter cuted-off
472: .   `PC_DEFLATION_SPACE_DB2`         - `MATCOMPOSITE` of 1-lvl matices based on db2 (2 coefficient Daubechies / Haar wavelet)
473: .   `PC_DEFLATION_SPACE_DB4`         - same as above, but with db4 (4 coefficient Daubechies)
474: .   `PC_DEFLATION_SPACE_DB8`         - same as above, but with db8 (8 coefficient Daubechies)
475: .   `PC_DEFLATION_SPACE_DB16`        - same as above, but with db16 (16 coefficient Daubechies)
476: .   `PC_DEFLATION_SPACE_BIORTH22`    - same as above, but with biorthogonal 2.2 (6 coefficients)
477: .   `PC_DEFLATION_SPACE_MEYER`       - same as above, but with Meyer/FIR (62 coefficients)
478: .   `PC_DEFLATION_SPACE_AGGREGATION` - aggregates local indices (given by operator matrix distribution) into a subdomain
479: -   `PC_DEFLATION_SPACE_USER`        - indicates space set by user

481:     Level: intermediate

483:     Note:
484:     Wavelet-based space (except Haar) can be used in multilevel deflation.

486: .seealso: [](sec_pc), `PCDeflationSetSpaceToCompute()`, `PCDEFLATION`, `PC`
487: E*/
488: typedef enum {
489:   PC_DEFLATION_SPACE_HAAR,
490:   PC_DEFLATION_SPACE_DB2,
491:   PC_DEFLATION_SPACE_DB4,
492:   PC_DEFLATION_SPACE_DB8,
493:   PC_DEFLATION_SPACE_DB16,
494:   PC_DEFLATION_SPACE_BIORTH22,
495:   PC_DEFLATION_SPACE_MEYER,
496:   PC_DEFLATION_SPACE_AGGREGATION,
497:   PC_DEFLATION_SPACE_USER
498: } PCDeflationSpaceType;

500: /*E
501:     PCHPDDMCoarseCorrectionType - Type of coarse correction used by `PCType` `PCHPDDM`

503:     Values:
504: +   `PC_HPDDM_COARSE_CORRECTION_DEFLATED` (default) - eq. (1) in `PCHPDDMShellApply()`
505: .   `PC_HPDDM_COARSE_CORRECTION_ADDITIVE`           - eq. (2)
506: .   `PC_HPDDM_COARSE_CORRECTION_BALANCED`           - eq. (3)
507: -   `PC_HPDDM_COARSE_CORRECTION_NONE`               - no coarse correction (mostly useful for debugging)

509:     Level: intermediate

511: .seealso: [](sec_pc), `PCHPDDM`, `PC`, `PCSetType()`, `PCHPDDMShellApply()`
512: E*/
513: typedef enum {
514:   PC_HPDDM_COARSE_CORRECTION_DEFLATED,
515:   PC_HPDDM_COARSE_CORRECTION_ADDITIVE,
516:   PC_HPDDM_COARSE_CORRECTION_BALANCED,
517:   PC_HPDDM_COARSE_CORRECTION_NONE
518: } PCHPDDMCoarseCorrectionType;

520: /*E
521:     PCHPDDMSchurPreType - Type of `PCHPDDM` preconditioner for a `MATSCHURCOMPLEMENT` generated by `PCFIELDSPLIT` with `PCFieldSplitSchurPreType` set to `PC_FIELDSPLIT_SCHUR_PRE_SELF`

523:     Values:
524: +   `PC_HPDDM_SCHUR_PRE_LEAST_SQUARES` (default) - only with a near-zero A11 block and A10 = A01^T; a preconditioner for solving A01^T A00^-1 A01 x = b
525:                                                    is built by approximating the Schur complement with (inv(sqrt(diag(A00))) A01)^T (inv(sqrt(diag(A00))) A01)
526:                                                    and by considering the associated linear least squares problem
527: -   `PC_HPDDM_SCHUR_PRE_GENEO`                   - only with A10 = A01^T, `PCHPDDMSetAuxiliaryMat()` called on the `PC` of the A00 block, and if A11 is nonzero,
528:                                                    then `PCHPDDMSetAuxiliaryMat()` must be called on the associated `PC` as well (it is built automatically for the
529:                                                    user otherwise); the Schur complement `PC` is set internally to `PCKSP`, with the prefix `-fieldsplit_1_pc_hpddm_`;
530:                                                    the operator associated to the `PC` is spectrally equivalent to the original Schur complement

532:     Level: advanced

534: .seealso: [](sec_pc), `PCHPDDM`, `PC`, `PCFIELDSPLIT`, `PC_FIELDSPLIT_SCHUR_PRE_SELF`, `PCFieldSplitSetSchurPre()`, `PCHPDDMSetAuxiliaryMat()`
535: E*/
536: typedef enum {
537:   PC_HPDDM_SCHUR_PRE_LEAST_SQUARES,
538:   PC_HPDDM_SCHUR_PRE_GENEO
539: } PCHPDDMSchurPreType;

541: /*E
542:     PCFailedReason - indicates the type of `PC` failure. That is why the construction of the preconditioner, `PCSetUp()`, or its use, `PCApply()`, failed

544:     Level: beginner

546: .seealso: [](sec_pc), `PC`, `PCGetFailedReason()`, `PCSetUp()`
547: E*/
548: typedef enum {
549:   PC_SETUP_ERROR              = -1,
550:   PC_NOERROR                  = 0,
551:   PC_FACTOR_STRUCT_ZEROPIVOT  = 1,
552:   PC_FACTOR_NUMERIC_ZEROPIVOT = 2,
553:   PC_FACTOR_OUTMEMORY         = 3,
554:   PC_FACTOR_OTHER             = 4,
555:   PC_INCONSISTENT_RHS         = 5,
556:   PC_SUBPC_ERROR              = 6
557: } PCFailedReason;

559: /*E
560:     PCGAMGLayoutType - Layout for reduced grids for `PCType` `PCGAMG`

562:     Level: intermediate

564: .seealso: [](sec_pc), `PCGAMG`, `PC`, `PCGAMGSetCoarseGridLayoutType()`
565: E*/
566: typedef enum {
567:   PCGAMG_LAYOUT_COMPACT,
568:   PCGAMG_LAYOUT_SPREAD
569: } PCGAMGLayoutType;