Actual source code: petscpctypes.h

  1: #pragma once

  3: /* SUBMANSEC = PC */

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

  8:    Level: beginner

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

 14: /*J
 15:    PCType - String with the name of a PETSc preconditioner

 17:    Level: beginner

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

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

 80: /*E
 81:     PCSide - If the preconditioner is to be applied to the left, right
 82:              or symmetrically around the operator.

 84:    Values:
 85: +  `PC_LEFT`      - applied after the operator is applied
 86: .  `PC_RIGHT`     - applied before the operator is applied
 87: -  `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.

 89:    Level: beginner

 91:    Note:
 92:    Certain `KSPType` support only a subset of `PCSide` values

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

104: /*E
105:     PCRichardsonConvergedReason - reason a `PCApplyRichardson()` method terminated

107:    Level: advanced

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

118: /*E
119:     PCJacobiType - What elements of the matrix are used to form the Jacobi preconditioner

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

127:    Level: intermediate

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

138: /*E
139:     PCASMType - Type of additive Schwarz method to use

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

152:    Level: beginner

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

163: /*E
164:     PCGASMType - Type of generalized additive Schwarz method to use (differs from `PCASM` in allowing multiple processors per subdomain).

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

179:    Level: beginner

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

187:    Developer Note:
188:    Perhaps better to remove this since it matches `PCASMType`

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

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

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

213:    Level: beginner

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

226: /*E
227:     PCFieldSplitSchurPreType - Determines how to precondition a Schur complement

229:     Values:
230: +  `PC_FIELDSPLIT_SCHUR_PRE_SELF`  - the preconditioner for the Schur complement is generated from the symbolic representation of the Schur complement matrix.
231:                                      The only preconditioners that currently work with this symbolic representation matrix object are `PCLSC` and `PCHPDDM`
232: .  `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$.
233:                                      This is only a good preconditioner when $diag(A00)$ is a good preconditioner for $A00$. Optionally, $A00$ can be
234:                                      lumped before extracting the diagonal using the additional option `-fieldsplit_1_mat_schur_complement_ainv_type lump`
235: .  `PC_FIELDSPLIT_SCHUR_PRE_A11`   - the preconditioner for the Schur complement is generated from $A11$, not the Schur complement matrix
236: .  `PC_FIELDSPLIT_SCHUR_PRE_USER`  - the preconditioner for the Schur complement is generated from the user provided matrix (pre argument
237:                                      to this function).
238: -  `PC_FIELDSPLIT_SCHUR_PRE_FULL`  - the preconditioner for the Schur complement is generated from the exact Schur complement matrix representation
239:                                      computed internally by `PCFIELDSPLIT` (this is expensive) useful mostly as a test that the Schur complement approach can work for your problem

241:     Level: intermediate

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

253: /*E
254:     PCFieldSplitSchurFactType - determines which off-diagonal parts of the approximate block factorization to use

256:     Values:
257: +   `PC_FIELDSPLIT_SCHUR_FACT_DIAG`  - the preconditioner is solving `D`
258: .   `PC_FIELDSPLIT_SCHUR_FACT_LOWER` - the preconditioner is solving `L D`
259: .   `PC_FIELDSPLIT_SCHUR_FACT_UPPER` - the preconditioner is solving `D U`
260: -   `PC_FIELDSPLIT_SCHUR_FACT_FULL`  - the preconditioner is solving `L(D U)`

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

268:     Level: intermediate

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

279: /*E
280:     PCPARMSGlobalType - Determines the global preconditioner method in `PCPARMS`

282:     Level: intermediate

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

292: /*E
293:     PCPARMSLocalType - Determines the local preconditioner method in `PCPARMS`

295:     Level: intermediate

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

306: /*J
307:     PCGAMGType - type of generalized algebraic multigrid `PCGAMG` method

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

314:      Level: intermediate

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

323: typedef const char *PCGAMGClassicalType;
324: #define PCGAMGCLASSICALDIRECT   "direct"
325: #define PCGAMGCLASSICALSTANDARD "standard"

327: /*E
328:    PCMGType - Determines the type of multigrid method that is run.

330:    Values:
331: +  `PC_MG_MULTIPLICATIVE` (default) - traditional V or W cycle as determined by `PCMGSetCycleType()`
332: .  `PC_MG_ADDITIVE`                 - the additive multigrid preconditioner where all levels are
333:                                       smoothed before updating the residual. This only uses the
334:                                       down smoother, in the preconditioner the upper smoother is ignored
335: .  `PC_MG_FULL`                     - same as multiplicative except one also performs grid sequencing,
336:                                       that is starts on the coarsest grid, performs a cycle, interpolates
337:                                       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
338:                                       algorithm supports smoothing on before the restriction on each level in the initial restriction to the coarsest stage. In addition that algorithm
339:                                       calls the V-cycle only on the coarser level and has a post-smoother instead.
340: -  `PC_MG_KASKADE`                  - like full multigrid except one never goes back to a coarser level from a finer

342:    Level: beginner

344: .seealso: [](sec_pc), `PCMG`, `PC`, `PCMGSetType()`, `PCMGSetCycleType()`, `PCMGSetCycleTypeOnLevel()`
345: E*/
346: typedef enum {
347:   PC_MG_MULTIPLICATIVE,
348:   PC_MG_ADDITIVE,
349:   PC_MG_FULL,
350:   PC_MG_KASKADE
351: } PCMGType;
352: #define PC_MG_CASCADE PC_MG_KASKADE;

354: /*E
355:    PCMGCycleType - Use V-cycle or W-cycle

357:    Values:
358: +  `PC_MG_V_CYCLE` - use the V cycle
359: -  `PC_MG_W_CYCLE` - use the W cycle

361:    Level: beginner

363: .seealso: [](sec_pc), `PCMG`, `PC`, `PCMGSetCycleType()`
364: E*/
365: typedef enum {
366:   PC_MG_CYCLE_V = 1,
367:   PC_MG_CYCLE_W = 2
368: } PCMGCycleType;

370: /*E
371:     PCMGalerkinType - Determines if the coarse grid operators are computed via the Galerkin process

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

379:    Level: beginner

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

384: .seealso: [](sec_pc), `PCMG`, `PC`, `PCMGSetCycleType()`
385: E*/
386: typedef enum {
387:   PC_MG_GALERKIN_BOTH,
388:   PC_MG_GALERKIN_PMAT,
389:   PC_MG_GALERKIN_MAT,
390:   PC_MG_GALERKIN_NONE,
391:   PC_MG_GALERKIN_EXTERNAL
392: } PCMGGalerkinType;

394: /*E
395:     PCExoticType - Face based or wirebasket based coarse grid space

397:    Level: beginner

399: .seealso: [](sec_pc), `PCExoticSetType()`, `PCEXOTIC`
400: E*/
401: typedef enum {
402:   PC_EXOTIC_FACE,
403:   PC_EXOTIC_WIREBASKET
404: } PCExoticType;

406: /*E
407:    PCBDDCInterfaceExtType - Defines how interface balancing is extended into the interior of subdomains.

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

413:    Level: intermediate

415: .seealso: [](sec_pc), `PCBDDC`, `PC`
416: E*/
417: typedef enum {
418:   PC_BDDC_INTERFACE_EXT_DIRICHLET,
419:   PC_BDDC_INTERFACE_EXT_LUMP
420: } PCBDDCInterfaceExtType;

422: /*E
423:   PCMGCoarseSpaceType - Function space for coarse space for adaptive interpolation

425:   Level: beginner

427: .seealso: [](sec_pc), `PCMGSetAdaptCoarseSpaceType()`, `PCMG`, `PC`
428: E*/
429: typedef enum {
430:   PCMG_ADAPT_NONE,
431:   PCMG_ADAPT_POLYNOMIAL,
432:   PCMG_ADAPT_HARMONIC,
433:   PCMG_ADAPT_EIGENVECTOR,
434:   PCMG_ADAPT_GENERALIZED_EIGENVECTOR,
435:   PCMG_ADAPT_GDSW
436: } PCMGCoarseSpaceType;

438: /*E
439:     PCPatchConstructType - The algorithm used to construct patches for the `PCPATCH` preconditioner

441:    Level: beginner

443: .seealso: [](sec_pc), `PCPatchSetConstructType()`, `PCPATCH`, `PC`
444: E*/
445: typedef enum {
446:   PC_PATCH_STAR,
447:   PC_PATCH_VANKA,
448:   PC_PATCH_PARDECOMP,
449:   PC_PATCH_USER,
450:   PC_PATCH_PYTHON
451: } PCPatchConstructType;

453: /*E
454:     PCDeflationSpaceType - Type of deflation

456:     Values:
457: +   `PC_DEFLATION_SPACE_HAAR`        - directly assembled based on Haar (db2) wavelet with overflowed filter cuted-off
458: .   `PC_DEFLATION_SPACE_DB2`         - `MATCOMPOSITE` of 1-lvl matices based on db2 (2 coefficient Daubechies / Haar wavelet)
459: .   `PC_DEFLATION_SPACE_DB4`         - same as above, but with db4 (4 coefficient Daubechies)
460: .   `PC_DEFLATION_SPACE_DB8`         - same as above, but with db8 (8 coefficient Daubechies)
461: .   `PC_DEFLATION_SPACE_DB16`        - same as above, but with db16 (16 coefficient Daubechies)
462: .   `PC_DEFLATION_SPACE_BIORTH22`    - same as above, but with biorthogonal 2.2 (6 coefficients)
463: .   `PC_DEFLATION_SPACE_MEYER`       - same as above, but with Meyer/FIR (62 coefficients)
464: .   `PC_DEFLATION_SPACE_AGGREGATION` - aggregates local indices (given by operator matrix distribution) into a subdomain
465: -   `PC_DEFLATION_SPACE_USER`        - indicates space set by user

467:     Level: intermediate

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

472: .seealso: [](sec_pc), `PCDeflationSetSpaceToCompute()`, `PCDEFLATION`, `PC`
473: E*/
474: typedef enum {
475:   PC_DEFLATION_SPACE_HAAR,
476:   PC_DEFLATION_SPACE_DB2,
477:   PC_DEFLATION_SPACE_DB4,
478:   PC_DEFLATION_SPACE_DB8,
479:   PC_DEFLATION_SPACE_DB16,
480:   PC_DEFLATION_SPACE_BIORTH22,
481:   PC_DEFLATION_SPACE_MEYER,
482:   PC_DEFLATION_SPACE_AGGREGATION,
483:   PC_DEFLATION_SPACE_USER
484: } PCDeflationSpaceType;

486: /*E
487:     PCHPDDMCoarseCorrectionType - Type of coarse correction used by `PCHPDDM`

489:     Values:
490: +   `PC_HPDDM_COARSE_CORRECTION_DEFLATED` (default) - eq. (1) in `PCHPDDMShellApply()`
491: .   `PC_HPDDM_COARSE_CORRECTION_ADDITIVE`           - eq. (2)
492: .   `PC_HPDDM_COARSE_CORRECTION_BALANCED`           - eq. (3)
493: -   `PC_HPDDM_COARSE_CORRECTION_NONE`               - no coarse correction (mostly useful for debugging)

495:     Level: intermediate

497: .seealso: [](sec_pc), `PCHPDDM`, `PC`, `PCSetType()`, `PCHPDDMShellApply()`
498: E*/
499: typedef enum {
500:   PC_HPDDM_COARSE_CORRECTION_DEFLATED,
501:   PC_HPDDM_COARSE_CORRECTION_ADDITIVE,
502:   PC_HPDDM_COARSE_CORRECTION_BALANCED,
503:   PC_HPDDM_COARSE_CORRECTION_NONE
504: } PCHPDDMCoarseCorrectionType;

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

509:     Values:
510: +   `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 is built by approximating the Schur complement with (inv(sqrt(diag(A00))) A01)^T (inv(sqrt(diag(A00))) A01) and by considering the associated linear least squares problem
511: -   `PC_HPDDM_SCHUR_PRE_GENEO` - only with A10 = A01^T, `PCHPDDMSetAuxiliaryMat()` called on the `PC` of the A00 block, and if A11 is nonzero, then `PCHPDDMSetAuxiliaryMat()` must be called on the associated `PC` as well (it is built automatically for the user otherwise); the Schur complement `PC` is set internally to `PCKSP`, with the prefix `-fieldsplit_1_pc_hpddm_`; the operator associated to the `PC` is spectrally equivalent to the original Schur complement

513:     Level: advanced

515: .seealso: [](sec_pc), `PCHPDDM`, `PC`, `PCFIELDSPLIT`, `PC_FIELDSPLIT_SCHUR_PRE_SELF`, `PCFieldSplitSetSchurPre()`, `PCHPDDMSetAuxiliaryMat()`
516: E*/
517: typedef enum {
518:   PC_HPDDM_SCHUR_PRE_LEAST_SQUARES,
519:   PC_HPDDM_SCHUR_PRE_GENEO,
520: } PCHPDDMSchurPreType;

522: /*E
523:     PCFailedReason - indicates type of `PC` failure

525:     Level: beginner

527: .seealso: [](sec_pc), `PC`
528: E*/
529: typedef enum {
530:   PC_SETUP_ERROR = -1,
531:   PC_NOERROR,
532:   PC_FACTOR_STRUCT_ZEROPIVOT,
533:   PC_FACTOR_NUMERIC_ZEROPIVOT,
534:   PC_FACTOR_OUTMEMORY,
535:   PC_FACTOR_OTHER,
536:   PC_INCONSISTENT_RHS,
537:   PC_SUBPC_ERROR
538: } PCFailedReason;

540: /*E
541:     PCGAMGLayoutType - Layout for reduced grids

543:     Level: intermediate

545: .seealso: [](sec_pc), `PCGAMG`, `PC`, `PCGAMGSetCoarseGridLayoutType()`
546: E*/
547: typedef enum {
548:   PCGAMG_LAYOUT_COMPACT,
549:   PCGAMG_LAYOUT_SPREAD
550: } PCGAMGLayoutType;