Actual source code: petscpc.h
petsc-3.13.6 2020-09-29
1: /*
2: Preconditioner module.
3: */
4: #if !defined(PETSCPC_H)
5: #define PETSCPC_H
6: #include <petscmat.h>
7: #include <petscdmtypes.h>
8: #include <petscpctypes.h>
10: PETSC_EXTERN PetscErrorCode PCInitializePackage(void);
12: /*
13: PCList contains the list of preconditioners currently registered
14: These are added with PCRegister()
15: */
16: PETSC_EXTERN PetscFunctionList PCList;
18: /* Logging support */
19: PETSC_EXTERN PetscClassId PC_CLASSID;
21: /* Arrays of names for options in implementation PCs */
22: PETSC_EXTERN const char *const *const PCSides;
23: PETSC_EXTERN const char *const PCJacobiTypes[];
24: PETSC_EXTERN const char *const PCASMTypes[];
25: PETSC_EXTERN const char *const PCGASMTypes[];
26: PETSC_EXTERN const char *const PCCompositeTypes[];
27: PETSC_EXTERN const char *const PCFieldSplitSchurPreTypes[];
28: PETSC_EXTERN const char *const PCFieldSplitSchurFactTypes[];
29: PETSC_EXTERN const char *const PCPARMSGlobalTypes[];
30: PETSC_EXTERN const char *const PCPARMSLocalTypes[];
31: PETSC_EXTERN const char *const PCMGTypes[];
32: PETSC_EXTERN const char *const PCMGCycleTypes[];
33: PETSC_EXTERN const char *const PCMGGalerkinTypes[];
34: PETSC_EXTERN const char *const PCExoticTypes[];
35: PETSC_EXTERN const char *const PCPatchConstructTypes[];
36: PETSC_EXTERN const char *const PCDeflationTypes[];
37: PETSC_EXTERN const char *const PCFailedReasons[];
39: PETSC_EXTERN PetscErrorCode PCCreate(MPI_Comm,PC*);
40: PETSC_EXTERN PetscErrorCode PCSetType(PC,PCType);
41: PETSC_EXTERN PetscErrorCode PCGetType(PC,PCType*);
42: PETSC_EXTERN PetscErrorCode PCSetUp(PC);
43: PETSC_EXTERN PetscErrorCode PCGetFailedReason(PC,PCFailedReason*);
44: PETSC_DEPRECATED_FUNCTION("Use PCGetFailedReason() (since version 3.11)") PETSC_STATIC_INLINE PetscErrorCode PCGetSetUpFailedReason(PC pc,PCFailedReason *reason) {return PCGetFailedReason(pc,reason);}
45: PETSC_EXTERN PetscErrorCode PCSetUpOnBlocks(PC);
46: PETSC_EXTERN PetscErrorCode PCApply(PC,Vec,Vec);
47: PETSC_EXTERN PetscErrorCode PCApplySymmetricLeft(PC,Vec,Vec);
48: PETSC_EXTERN PetscErrorCode PCApplySymmetricRight(PC,Vec,Vec);
49: PETSC_EXTERN PetscErrorCode PCApplyBAorAB(PC,PCSide,Vec,Vec,Vec);
50: PETSC_EXTERN PetscErrorCode PCApplyTranspose(PC,Vec,Vec);
51: PETSC_EXTERN PetscErrorCode PCApplyTransposeExists(PC,PetscBool *);
52: PETSC_EXTERN PetscErrorCode PCApplyBAorABTranspose(PC,PCSide,Vec,Vec,Vec);
53: PETSC_EXTERN PetscErrorCode PCSetReusePreconditioner(PC,PetscBool);
54: PETSC_EXTERN PetscErrorCode PCGetReusePreconditioner(PC,PetscBool*);
55: PETSC_EXTERN PetscErrorCode PCSetErrorIfFailure(PC,PetscBool);
57: #define PC_FILE_CLASSID 1211222
59: PETSC_EXTERN PetscErrorCode PCApplyRichardson(PC,Vec,Vec,Vec,PetscReal,PetscReal,PetscReal,PetscInt,PetscBool ,PetscInt*,PCRichardsonConvergedReason*);
60: PETSC_EXTERN PetscErrorCode PCApplyRichardsonExists(PC,PetscBool *);
61: PETSC_EXTERN PetscErrorCode PCSetUseAmat(PC,PetscBool);
62: PETSC_EXTERN PetscErrorCode PCGetUseAmat(PC,PetscBool*);
64: PETSC_EXTERN PetscErrorCode PCRegister(const char[],PetscErrorCode(*)(PC));
66: PETSC_EXTERN PetscErrorCode PCReset(PC);
67: PETSC_EXTERN PetscErrorCode PCDestroy(PC*);
68: PETSC_EXTERN PetscErrorCode PCSetFromOptions(PC);
70: PETSC_EXTERN PetscErrorCode PCFactorGetMatrix(PC,Mat*);
71: PETSC_EXTERN PetscErrorCode PCSetModifySubMatrices(PC,PetscErrorCode(*)(PC,PetscInt,const IS[],const IS[],Mat[],void*),void*);
72: PETSC_EXTERN PetscErrorCode PCModifySubMatrices(PC,PetscInt,const IS[],const IS[],Mat[],void*);
74: PETSC_EXTERN PetscErrorCode PCSetOperators(PC,Mat,Mat);
75: PETSC_EXTERN PetscErrorCode PCGetOperators(PC,Mat*,Mat*);
76: PETSC_EXTERN PetscErrorCode PCGetOperatorsSet(PC,PetscBool *,PetscBool *);
78: PETSC_EXTERN PetscErrorCode PCView(PC,PetscViewer);
79: PETSC_EXTERN PetscErrorCode PCLoad(PC,PetscViewer);
80: PETSC_EXTERN PetscErrorCode PCViewFromOptions(PC,PetscObject,const char[]);
82: PETSC_EXTERN PetscErrorCode PCSetOptionsPrefix(PC,const char[]);
83: PETSC_EXTERN PetscErrorCode PCAppendOptionsPrefix(PC,const char[]);
84: PETSC_EXTERN PetscErrorCode PCGetOptionsPrefix(PC,const char*[]);
86: PETSC_EXTERN PetscErrorCode PCComputeOperator(PC,MatType,Mat*);
87: PETSC_DEPRECATED_FUNCTION("Use PCComputeOperator() (since version 3.12)") PETSC_STATIC_INLINE PetscErrorCode PCComputeExplicitOperator(PC A,Mat* B) { return PCComputeOperator(A,NULL,B); }
89: /*
90: These are used to provide extra scaling of preconditioned
91: operator for time-stepping schemes like in SUNDIALS
92: */
93: PETSC_EXTERN PetscErrorCode PCGetDiagonalScale(PC,PetscBool *);
94: PETSC_EXTERN PetscErrorCode PCDiagonalScaleLeft(PC,Vec,Vec);
95: PETSC_EXTERN PetscErrorCode PCDiagonalScaleRight(PC,Vec,Vec);
96: PETSC_EXTERN PetscErrorCode PCSetDiagonalScale(PC,Vec);
98: PETSC_EXTERN PetscErrorCode PCSetDM(PC,DM);
99: PETSC_EXTERN PetscErrorCode PCGetDM(PC,DM*);
101: PETSC_EXTERN PetscErrorCode PCGetInterpolations(PC,PetscInt*,Mat*[]);
102: PETSC_EXTERN PetscErrorCode PCGetCoarseOperators(PC pc,PetscInt*,Mat*[]);
104: PETSC_EXTERN PetscErrorCode PCSetCoordinates(PC,PetscInt,PetscInt,PetscReal*);
106: PETSC_EXTERN PetscErrorCode PCSetApplicationContext(PC,void*);
107: PETSC_EXTERN PetscErrorCode PCGetApplicationContext(PC,void*);
109: /* ------------- options specific to particular preconditioners --------- */
111: PETSC_EXTERN PetscErrorCode PCJacobiSetType(PC,PCJacobiType);
112: PETSC_EXTERN PetscErrorCode PCJacobiGetType(PC,PCJacobiType*);
113: PETSC_EXTERN PetscErrorCode PCJacobiSetUseAbs(PC,PetscBool);
114: PETSC_EXTERN PetscErrorCode PCJacobiGetUseAbs(PC,PetscBool*);
115: PETSC_EXTERN PetscErrorCode PCSORSetSymmetric(PC,MatSORType);
116: PETSC_EXTERN PetscErrorCode PCSORGetSymmetric(PC,MatSORType*);
117: PETSC_EXTERN PetscErrorCode PCSORSetOmega(PC,PetscReal);
118: PETSC_EXTERN PetscErrorCode PCSORGetOmega(PC,PetscReal*);
119: PETSC_EXTERN PetscErrorCode PCSORSetIterations(PC,PetscInt,PetscInt);
120: PETSC_EXTERN PetscErrorCode PCSORGetIterations(PC,PetscInt*,PetscInt*);
122: PETSC_EXTERN PetscErrorCode PCEisenstatSetOmega(PC,PetscReal);
123: PETSC_EXTERN PetscErrorCode PCEisenstatGetOmega(PC,PetscReal*);
124: PETSC_EXTERN PetscErrorCode PCEisenstatSetNoDiagonalScaling(PC,PetscBool);
125: PETSC_EXTERN PetscErrorCode PCEisenstatGetNoDiagonalScaling(PC,PetscBool*);
127: PETSC_EXTERN PetscErrorCode PCBJacobiSetTotalBlocks(PC,PetscInt,const PetscInt[]);
128: PETSC_EXTERN PetscErrorCode PCBJacobiGetTotalBlocks(PC,PetscInt*,const PetscInt*[]);
129: PETSC_EXTERN PetscErrorCode PCBJacobiSetLocalBlocks(PC,PetscInt,const PetscInt[]);
130: PETSC_EXTERN PetscErrorCode PCBJacobiGetLocalBlocks(PC,PetscInt*,const PetscInt*[]);
132: PETSC_EXTERN PetscErrorCode PCShellSetApply(PC,PetscErrorCode (*)(PC,Vec,Vec));
133: PETSC_EXTERN PetscErrorCode PCShellSetApplySymmetricLeft(PC,PetscErrorCode (*)(PC,Vec,Vec));
134: PETSC_EXTERN PetscErrorCode PCShellSetApplySymmetricRight(PC,PetscErrorCode (*)(PC,Vec,Vec));
135: PETSC_EXTERN PetscErrorCode PCShellSetApplyBA(PC,PetscErrorCode (*)(PC,PCSide,Vec,Vec,Vec));
136: PETSC_EXTERN PetscErrorCode PCShellSetApplyTranspose(PC,PetscErrorCode (*)(PC,Vec,Vec));
137: PETSC_EXTERN PetscErrorCode PCShellSetSetUp(PC,PetscErrorCode (*)(PC));
138: PETSC_EXTERN PetscErrorCode PCShellSetApplyRichardson(PC,PetscErrorCode (*)(PC,Vec,Vec,Vec,PetscReal,PetscReal,PetscReal,PetscInt,PetscBool ,PetscInt*,PCRichardsonConvergedReason*));
139: PETSC_EXTERN PetscErrorCode PCShellSetView(PC,PetscErrorCode (*)(PC,PetscViewer));
140: PETSC_EXTERN PetscErrorCode PCShellSetDestroy(PC,PetscErrorCode (*)(PC));
141: PETSC_EXTERN PetscErrorCode PCShellSetContext(PC,void*);
142: PETSC_EXTERN PetscErrorCode PCShellGetContext(PC,void**);
143: PETSC_EXTERN PetscErrorCode PCShellSetName(PC,const char[]);
144: PETSC_EXTERN PetscErrorCode PCShellGetName(PC,const char*[]);
146: PETSC_EXTERN PetscErrorCode PCFactorSetZeroPivot(PC,PetscReal);
148: PETSC_EXTERN PetscErrorCode PCFactorSetShiftType(PC,MatFactorShiftType);
149: PETSC_EXTERN PetscErrorCode PCFactorSetShiftAmount(PC,PetscReal);
151: PETSC_EXTERN PetscErrorCode PCFactorSetMatSolverType(PC,MatSolverType);
152: PETSC_EXTERN PetscErrorCode PCFactorGetMatSolverType(PC,MatSolverType*);
153: PETSC_EXTERN PetscErrorCode PCFactorSetUpMatSolverType(PC);
154: PETSC_DEPRECATED_FUNCTION("Use PCFactorSetMatSolverType() (since version 3.9)") PETSC_STATIC_INLINE PetscErrorCode PCFactorSetMatSolverPackage(PC pc,MatSolverType stype) {return PCFactorSetMatSolverType(pc,stype);}
155: PETSC_DEPRECATED_FUNCTION("Use PCFactorGetMatSolverType() (since version 3.9)") PETSC_STATIC_INLINE PetscErrorCode PCFactorGetMatSolverPackage(PC pc,MatSolverType *stype) {return PCFactorGetMatSolverType(pc,stype);}
156: PETSC_DEPRECATED_FUNCTION("Use PCFactorSetUpMatSolverType() (since version 3.9)") PETSC_STATIC_INLINE PetscErrorCode PCFactorSetUpMatSolverPackage(PC pc) {return PCFactorSetUpMatSolverType(pc);}
158: PETSC_EXTERN PetscErrorCode PCFactorSetFill(PC,PetscReal);
159: PETSC_EXTERN PetscErrorCode PCFactorSetColumnPivot(PC,PetscReal);
160: PETSC_EXTERN PetscErrorCode PCFactorReorderForNonzeroDiagonal(PC,PetscReal);
162: PETSC_EXTERN PetscErrorCode PCFactorSetMatOrderingType(PC,MatOrderingType);
163: PETSC_EXTERN PetscErrorCode PCFactorSetReuseOrdering(PC,PetscBool );
164: PETSC_EXTERN PetscErrorCode PCFactorSetReuseFill(PC,PetscBool );
165: PETSC_EXTERN PetscErrorCode PCFactorSetUseInPlace(PC,PetscBool);
166: PETSC_EXTERN PetscErrorCode PCFactorGetUseInPlace(PC,PetscBool*);
167: PETSC_EXTERN PetscErrorCode PCFactorSetAllowDiagonalFill(PC,PetscBool);
168: PETSC_EXTERN PetscErrorCode PCFactorGetAllowDiagonalFill(PC,PetscBool*);
169: PETSC_EXTERN PetscErrorCode PCFactorSetPivotInBlocks(PC,PetscBool);
171: PETSC_EXTERN PetscErrorCode PCFactorSetLevels(PC,PetscInt);
172: PETSC_EXTERN PetscErrorCode PCFactorGetLevels(PC,PetscInt*);
173: PETSC_EXTERN PetscErrorCode PCFactorSetDropTolerance(PC,PetscReal,PetscReal,PetscInt);
174: PETSC_EXTERN PetscErrorCode PCFactorGetZeroPivot(PC,PetscReal*);
175: PETSC_EXTERN PetscErrorCode PCFactorGetShiftAmount(PC,PetscReal*);
176: PETSC_EXTERN PetscErrorCode PCFactorGetShiftType(PC,MatFactorShiftType*);
178: PETSC_EXTERN PetscErrorCode PCASMSetLocalSubdomains(PC,PetscInt,IS[],IS[]);
179: PETSC_EXTERN PetscErrorCode PCASMSetTotalSubdomains(PC,PetscInt,IS[],IS[]);
180: PETSC_EXTERN PetscErrorCode PCASMSetOverlap(PC,PetscInt);
181: PETSC_EXTERN PetscErrorCode PCASMSetDMSubdomains(PC,PetscBool);
182: PETSC_EXTERN PetscErrorCode PCASMGetDMSubdomains(PC,PetscBool*);
183: PETSC_EXTERN PetscErrorCode PCASMSetSortIndices(PC,PetscBool);
185: PETSC_EXTERN PetscErrorCode PCASMSetType(PC,PCASMType);
186: PETSC_EXTERN PetscErrorCode PCASMGetType(PC,PCASMType*);
187: PETSC_EXTERN PetscErrorCode PCASMSetLocalType(PC,PCCompositeType);
188: PETSC_EXTERN PetscErrorCode PCASMGetLocalType(PC,PCCompositeType*);
189: PETSC_EXTERN PetscErrorCode PCASMCreateSubdomains(Mat,PetscInt,IS*[]);
190: PETSC_EXTERN PetscErrorCode PCASMDestroySubdomains(PetscInt,IS[],IS[]);
191: PETSC_EXTERN PetscErrorCode PCASMCreateSubdomains2D(PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt*,IS**,IS**);
192: PETSC_EXTERN PetscErrorCode PCASMGetLocalSubdomains(PC,PetscInt*,IS*[],IS*[]);
193: PETSC_EXTERN PetscErrorCode PCASMGetLocalSubmatrices(PC,PetscInt*,Mat*[]);
194: PETSC_EXTERN PetscErrorCode PCASMGetSubMatType(PC,MatType*);
195: PETSC_EXTERN PetscErrorCode PCASMSetSubMatType(PC,MatType);
197: PETSC_EXTERN PetscErrorCode PCGASMSetTotalSubdomains(PC,PetscInt);
198: PETSC_EXTERN PetscErrorCode PCGASMSetSubdomains(PC,PetscInt,IS[],IS[]);
199: PETSC_EXTERN PetscErrorCode PCGASMSetOverlap(PC,PetscInt);
200: PETSC_EXTERN PetscErrorCode PCGASMSetUseDMSubdomains(PC,PetscBool);
201: PETSC_EXTERN PetscErrorCode PCGASMGetUseDMSubdomains(PC,PetscBool*);
202: PETSC_EXTERN PetscErrorCode PCGASMSetSortIndices(PC,PetscBool );
204: PETSC_EXTERN PetscErrorCode PCGASMSetType(PC,PCGASMType);
205: PETSC_EXTERN PetscErrorCode PCGASMCreateSubdomains(Mat,PetscInt,PetscInt*,IS*[]);
206: PETSC_EXTERN PetscErrorCode PCGASMDestroySubdomains(PetscInt,IS*[],IS*[]);
207: PETSC_EXTERN PetscErrorCode PCGASMCreateSubdomains2D(PC,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt*,IS**,IS**);
208: PETSC_EXTERN PetscErrorCode PCGASMGetSubdomains(PC,PetscInt*,IS*[],IS*[]);
209: PETSC_EXTERN PetscErrorCode PCGASMGetSubmatrices(PC,PetscInt*,Mat*[]);
211: PETSC_EXTERN PetscErrorCode PCCompositeSetType(PC,PCCompositeType);
212: PETSC_EXTERN PetscErrorCode PCCompositeGetType(PC,PCCompositeType*);
213: PETSC_EXTERN PetscErrorCode PCCompositeAddPC(PC,PCType);
214: PETSC_EXTERN PetscErrorCode PCCompositeGetNumberPC(PC,PetscInt *);
215: PETSC_EXTERN PetscErrorCode PCCompositeGetPC(PC,PetscInt,PC *);
216: PETSC_EXTERN PetscErrorCode PCCompositeSpecialSetAlpha(PC,PetscScalar);
218: PETSC_EXTERN PetscErrorCode PCRedundantSetNumber(PC,PetscInt);
219: PETSC_EXTERN PetscErrorCode PCRedundantSetScatter(PC,VecScatter,VecScatter);
220: PETSC_EXTERN PetscErrorCode PCRedundantGetOperators(PC,Mat*,Mat*);
222: PETSC_EXTERN PetscErrorCode PCSPAISetEpsilon(PC,double);
223: PETSC_EXTERN PetscErrorCode PCSPAISetNBSteps(PC,PetscInt);
224: PETSC_EXTERN PetscErrorCode PCSPAISetMax(PC,PetscInt);
225: PETSC_EXTERN PetscErrorCode PCSPAISetMaxNew(PC,PetscInt);
226: PETSC_EXTERN PetscErrorCode PCSPAISetBlockSize(PC,PetscInt);
227: PETSC_EXTERN PetscErrorCode PCSPAISetCacheSize(PC,PetscInt);
228: PETSC_EXTERN PetscErrorCode PCSPAISetVerbose(PC,PetscInt);
229: PETSC_EXTERN PetscErrorCode PCSPAISetSp(PC,PetscInt);
231: PETSC_EXTERN PetscErrorCode PCHYPRESetType(PC,const char[]);
232: PETSC_EXTERN PetscErrorCode PCHYPREGetType(PC,const char*[]);
233: PETSC_EXTERN PetscErrorCode PCHYPRESetDiscreteGradient(PC,Mat);
234: PETSC_EXTERN PetscErrorCode PCHYPRESetDiscreteCurl(PC,Mat);
235: PETSC_EXTERN PetscErrorCode PCHYPRESetInterpolations(PC,PetscInt,Mat,Mat[],Mat,Mat[]);
236: PETSC_EXTERN PetscErrorCode PCHYPRESetEdgeConstantVectors(PC,Vec,Vec,Vec);
237: PETSC_EXTERN PetscErrorCode PCHYPRESetAlphaPoissonMatrix(PC,Mat);
238: PETSC_EXTERN PetscErrorCode PCHYPRESetBetaPoissonMatrix(PC,Mat);
240: PETSC_EXTERN PetscErrorCode PCFieldSplitSetFields(PC,const char[],PetscInt,const PetscInt*,const PetscInt*);
241: PETSC_EXTERN PetscErrorCode PCFieldSplitSetType(PC,PCCompositeType);
242: PETSC_EXTERN PetscErrorCode PCFieldSplitGetType(PC,PCCompositeType*);
243: PETSC_EXTERN PetscErrorCode PCFieldSplitSetBlockSize(PC,PetscInt);
244: PETSC_EXTERN PetscErrorCode PCFieldSplitSetIS(PC,const char[],IS);
245: PETSC_EXTERN PetscErrorCode PCFieldSplitGetIS(PC,const char[],IS*);
246: PETSC_EXTERN PetscErrorCode PCFieldSplitGetISByIndex(PC,PetscInt,IS*);
247: PETSC_EXTERN PetscErrorCode PCFieldSplitRestrictIS(PC,IS);
248: PETSC_EXTERN PetscErrorCode PCFieldSplitSetDMSplits(PC,PetscBool);
249: PETSC_EXTERN PetscErrorCode PCFieldSplitGetDMSplits(PC,PetscBool*);
250: PETSC_EXTERN PetscErrorCode PCFieldSplitSetDiagUseAmat(PC,PetscBool);
251: PETSC_EXTERN PetscErrorCode PCFieldSplitGetDiagUseAmat(PC,PetscBool*);
252: PETSC_EXTERN PetscErrorCode PCFieldSplitSetOffDiagUseAmat(PC,PetscBool);
253: PETSC_EXTERN PetscErrorCode PCFieldSplitGetOffDiagUseAmat(PC,PetscBool*);
255: PETSC_EXTERN PETSC_DEPRECATED_FUNCTION("Use PCFieldSplitSetSchurPre() (since version 3.5)") PetscErrorCode PCFieldSplitSchurPrecondition(PC,PCFieldSplitSchurPreType,Mat);
256: PETSC_EXTERN PetscErrorCode PCFieldSplitSetSchurPre(PC,PCFieldSplitSchurPreType,Mat);
257: PETSC_EXTERN PetscErrorCode PCFieldSplitGetSchurPre(PC,PCFieldSplitSchurPreType*,Mat*);
258: PETSC_EXTERN PetscErrorCode PCFieldSplitSetSchurFactType(PC,PCFieldSplitSchurFactType);
259: PETSC_EXTERN PetscErrorCode PCFieldSplitSetSchurScale(PC,PetscScalar);
260: PETSC_EXTERN PetscErrorCode PCFieldSplitGetSchurBlocks(PC,Mat*,Mat*,Mat*,Mat*);
261: PETSC_EXTERN PetscErrorCode PCFieldSplitSchurGetS(PC,Mat *S);
262: PETSC_EXTERN PetscErrorCode PCFieldSplitSchurRestoreS(PC,Mat *S);
263: PETSC_EXTERN PetscErrorCode PCFieldSplitGetDetectSaddlePoint(PC,PetscBool*);
264: PETSC_EXTERN PetscErrorCode PCFieldSplitSetDetectSaddlePoint(PC,PetscBool);
265: PETSC_EXTERN PetscErrorCode PCFieldSplitSetGKBTol(PC,PetscReal);
266: PETSC_EXTERN PetscErrorCode PCFieldSplitSetGKBNu(PC,PetscReal);
267: PETSC_EXTERN PetscErrorCode PCFieldSplitSetGKBMaxit(PC,PetscInt);
268: PETSC_EXTERN PetscErrorCode PCFieldSplitSetGKBDelay(PC,PetscInt);
270: PETSC_EXTERN PetscErrorCode PCGalerkinSetRestriction(PC,Mat);
271: PETSC_EXTERN PetscErrorCode PCGalerkinSetInterpolation(PC,Mat);
272: PETSC_EXTERN PetscErrorCode PCGalerkinSetComputeSubmatrix(PC,PetscErrorCode (*)(PC,Mat,Mat,Mat*,void*),void*);
274: PETSC_EXTERN PetscErrorCode PCPythonSetType(PC,const char[]);
276: PETSC_EXTERN PetscErrorCode PCBiCGStabCUSPSetTolerance(PC,PetscReal);
277: PETSC_EXTERN PetscErrorCode PCBiCGStabCUSPSetIterations(PC,PetscInt);
278: PETSC_EXTERN PetscErrorCode PCBiCGStabCUSPSetUseVerboseMonitor(PC,PetscBool);
280: PETSC_EXTERN PetscErrorCode PCAINVCUSPSetDropTolerance(PC,PetscReal);
281: PETSC_EXTERN PetscErrorCode PCAINVCUSPUseScaling(PC,PetscBool);
282: PETSC_EXTERN PetscErrorCode PCAINVCUSPSetNonzeros(PC,PetscInt);
283: PETSC_EXTERN PetscErrorCode PCAINVCUSPSetLinParameter(PC,PetscInt);
285: PETSC_EXTERN PetscErrorCode PCPARMSSetGlobal(PC,PCPARMSGlobalType);
286: PETSC_EXTERN PetscErrorCode PCPARMSSetLocal(PC,PCPARMSLocalType);
287: PETSC_EXTERN PetscErrorCode PCPARMSSetSolveTolerances(PC,PetscReal,PetscInt);
288: PETSC_EXTERN PetscErrorCode PCPARMSSetSolveRestart(PC,PetscInt);
289: PETSC_EXTERN PetscErrorCode PCPARMSSetNonsymPerm(PC,PetscBool);
290: PETSC_EXTERN PetscErrorCode PCPARMSSetFill(PC,PetscInt,PetscInt,PetscInt);
292: PETSC_EXTERN PetscErrorCode PCGAMGSetType( PC,PCGAMGType);
293: PETSC_EXTERN PetscErrorCode PCGAMGGetType( PC,PCGAMGType*);
294: PETSC_EXTERN PetscErrorCode PCGAMGSetProcEqLim(PC,PetscInt);
296: PETSC_EXTERN PetscErrorCode PCGAMGSetRepartition(PC,PetscBool);
297: PETSC_EXTERN PetscErrorCode PCGAMGSetUseSAEstEig(PC,PetscBool);
298: PETSC_EXTERN PetscErrorCode PCGAMGSetEstEigKSPMaxIt(PC,PetscInt);
299: PETSC_EXTERN PetscErrorCode PCGAMGSetEstEigKSPType(PC,char[]);
300: PETSC_EXTERN PetscErrorCode PCGAMGSetEigenvalues(PC,PetscReal,PetscReal);
301: PETSC_EXTERN PetscErrorCode PCGAMGASMSetUseAggs(PC,PetscBool);
302: PETSC_EXTERN PetscErrorCode PCGAMGSetUseParallelCoarseGridSolve(PC,PetscBool);
303: PETSC_EXTERN PetscErrorCode PCGAMGSetCpuPinCoarseGrids(PC,PetscBool);
304: PETSC_EXTERN PetscErrorCode PCGAMGSetCoarseGridLayoutType(PC,PCGAMGLayoutType);
305: PETSC_EXTERN PetscErrorCode PCGAMGSetThreshold(PC,PetscReal[],PetscInt);
306: PETSC_EXTERN PetscErrorCode PCGAMGSetThresholdScale(PC,PetscReal);
307: PETSC_EXTERN PetscErrorCode PCGAMGSetCoarseEqLim(PC,PetscInt);
308: PETSC_EXTERN PetscErrorCode PCGAMGSetNlevels(PC,PetscInt);
309: PETSC_EXTERN PetscErrorCode PCGAMGSetNSmooths(PC,PetscInt);
310: PETSC_EXTERN PetscErrorCode PCGAMGSetSymGraph(PC,PetscBool);
311: PETSC_EXTERN PetscErrorCode PCGAMGSetSquareGraph(PC,PetscInt);
312: PETSC_EXTERN PetscErrorCode PCGAMGSetReuseInterpolation(PC,PetscBool);
313: PETSC_EXTERN PetscErrorCode PCGAMGFinalizePackage(void);
314: PETSC_EXTERN PetscErrorCode PCGAMGInitializePackage(void);
315: PETSC_EXTERN PetscErrorCode PCGAMGRegister(PCGAMGType,PetscErrorCode (*)(PC));
317: PETSC_EXTERN PetscErrorCode PCGAMGClassicalSetType(PC,PCGAMGClassicalType);
318: PETSC_EXTERN PetscErrorCode PCGAMGClassicalGetType(PC,PCGAMGClassicalType*);
320: PETSC_EXTERN PetscErrorCode PCBDDCSetDiscreteGradient(PC,Mat,PetscInt,PetscInt,PetscBool,PetscBool);
321: PETSC_EXTERN PetscErrorCode PCBDDCSetDivergenceMat(PC,Mat,PetscBool,IS);
322: PETSC_EXTERN PetscErrorCode PCBDDCSetChangeOfBasisMat(PC,Mat,PetscBool);
323: PETSC_EXTERN PetscErrorCode PCBDDCSetPrimalVerticesIS(PC,IS);
324: PETSC_EXTERN PetscErrorCode PCBDDCSetPrimalVerticesLocalIS(PC,IS);
325: PETSC_EXTERN PetscErrorCode PCBDDCGetPrimalVerticesIS(PC,IS*);
326: PETSC_EXTERN PetscErrorCode PCBDDCGetPrimalVerticesLocalIS(PC,IS*);
327: PETSC_EXTERN PetscErrorCode PCBDDCSetCoarseningRatio(PC,PetscInt);
328: PETSC_EXTERN PetscErrorCode PCBDDCSetLevels(PC,PetscInt);
329: PETSC_EXTERN PetscErrorCode PCBDDCSetDirichletBoundaries(PC,IS);
330: PETSC_EXTERN PetscErrorCode PCBDDCSetDirichletBoundariesLocal(PC,IS);
331: PETSC_EXTERN PetscErrorCode PCBDDCGetDirichletBoundaries(PC,IS*);
332: PETSC_EXTERN PetscErrorCode PCBDDCGetDirichletBoundariesLocal(PC,IS*);
333: PETSC_EXTERN PetscErrorCode PCBDDCSetInterfaceExtType(PC,PCBDDCInterfaceExtType);
334: PETSC_EXTERN PetscErrorCode PCBDDCSetNeumannBoundaries(PC,IS);
335: PETSC_EXTERN PetscErrorCode PCBDDCSetNeumannBoundariesLocal(PC,IS);
336: PETSC_EXTERN PetscErrorCode PCBDDCGetNeumannBoundaries(PC,IS*);
337: PETSC_EXTERN PetscErrorCode PCBDDCGetNeumannBoundariesLocal(PC,IS*);
338: PETSC_EXTERN PetscErrorCode PCBDDCSetDofsSplitting(PC,PetscInt,IS[]);
339: PETSC_EXTERN PetscErrorCode PCBDDCSetDofsSplittingLocal(PC,PetscInt,IS[]);
340: PETSC_EXTERN PetscErrorCode PCBDDCSetLocalAdjacencyGraph(PC,PetscInt,const PetscInt[],const PetscInt[],PetscCopyMode);
341: PETSC_EXTERN PetscErrorCode PCBDDCCreateFETIDPOperators(PC,PetscBool,const char*,Mat*,PC*);
342: PETSC_EXTERN PetscErrorCode PCBDDCMatFETIDPGetRHS(Mat,Vec,Vec);
343: PETSC_EXTERN PetscErrorCode PCBDDCMatFETIDPGetSolution(Mat,Vec,Vec);
344: PETSC_EXTERN PetscErrorCode PCBDDCFinalizePackage(void);
345: PETSC_EXTERN PetscErrorCode PCBDDCInitializePackage(void);
347: PETSC_EXTERN PetscErrorCode PCISSetUseStiffnessScaling(PC,PetscBool);
348: PETSC_EXTERN PetscErrorCode PCISSetSubdomainScalingFactor(PC,PetscScalar);
349: PETSC_EXTERN PetscErrorCode PCISSetSubdomainDiagonalScaling(PC,Vec);
351: PETSC_EXTERN PetscInt PetscMGLevelId;
352: PETSC_EXTERN PetscErrorCode PCMGSetType(PC,PCMGType);
353: PETSC_EXTERN PetscErrorCode PCMGGetType(PC,PCMGType*);
354: PETSC_EXTERN PetscErrorCode PCMGSetLevels(PC,PetscInt,MPI_Comm*);
355: PETSC_EXTERN PetscErrorCode PCMGGetLevels(PC,PetscInt*);
357: PETSC_EXTERN PetscErrorCode PCMGSetDistinctSmoothUp(PC);
358: PETSC_EXTERN PetscErrorCode PCMGSetNumberSmooth(PC,PetscInt);
359: PETSC_EXTERN PetscErrorCode PCMGSetCycleType(PC,PCMGCycleType);
360: PETSC_EXTERN PetscErrorCode PCMGSetCycleTypeOnLevel(PC,PetscInt,PCMGCycleType);
361: PETSC_DEPRECATED_FUNCTION("Use PCMGSetCycleTypeOnLevel() (since version 3.5)") PETSC_STATIC_INLINE PetscErrorCode PCMGSetCyclesOnLevel(PC pc,PetscInt l,PetscInt t) {return PCMGSetCycleTypeOnLevel(pc,l,(PCMGCycleType)t);}
362: PETSC_EXTERN PetscErrorCode PCMGMultiplicativeSetCycles(PC,PetscInt);
363: PETSC_EXTERN PetscErrorCode PCMGSetGalerkin(PC,PCMGGalerkinType);
364: PETSC_EXTERN PetscErrorCode PCMGGetGalerkin(PC,PCMGGalerkinType*);
366: PETSC_EXTERN PetscErrorCode PCMGSetRhs(PC,PetscInt,Vec);
367: PETSC_EXTERN PetscErrorCode PCMGSetX(PC,PetscInt,Vec);
368: PETSC_EXTERN PetscErrorCode PCMGSetR(PC,PetscInt,Vec);
370: PETSC_EXTERN PetscErrorCode PCMGSetRestriction(PC,PetscInt,Mat);
371: PETSC_EXTERN PetscErrorCode PCMGGetRestriction(PC,PetscInt,Mat*);
372: PETSC_EXTERN PetscErrorCode PCMGSetInjection(PC,PetscInt,Mat);
373: PETSC_EXTERN PetscErrorCode PCMGGetInjection(PC,PetscInt,Mat*);
374: PETSC_EXTERN PetscErrorCode PCMGSetInterpolation(PC,PetscInt,Mat);
375: PETSC_EXTERN PetscErrorCode PCMGSetOperators(PC,PetscInt,Mat,Mat);
376: PETSC_EXTERN PetscErrorCode PCMGGetInterpolation(PC,PetscInt,Mat*);
377: PETSC_EXTERN PetscErrorCode PCMGSetRScale(PC,PetscInt,Vec);
378: PETSC_EXTERN PetscErrorCode PCMGGetRScale(PC,PetscInt,Vec*);
379: PETSC_EXTERN PetscErrorCode PCMGSetResidual(PC,PetscInt,PetscErrorCode (*)(Mat,Vec,Vec,Vec),Mat);
380: PETSC_EXTERN PetscErrorCode PCMGResidualDefault(Mat,Vec,Vec,Vec);
382: PETSC_EXTERN PetscErrorCode PCHMGSetReuseInterpolation(PC,PetscBool);
383: PETSC_EXTERN PetscErrorCode PCHMGSetUseSubspaceCoarsening(PC,PetscBool);
384: PETSC_EXTERN PetscErrorCode PCHMGSetInnerPCType(PC,PCType);
385: PETSC_EXTERN PetscErrorCode PCHMGSetCoarseningComponent(PC,PetscInt);
386: PETSC_EXTERN PetscErrorCode PCHMGUseMatMAIJ(PC,PetscBool);
388: PETSC_EXTERN PetscErrorCode PCTelescopeGetSubcommType(PC,PetscSubcommType*);
389: PETSC_EXTERN PetscErrorCode PCTelescopeSetSubcommType(PC,PetscSubcommType);
390: PETSC_EXTERN PetscErrorCode PCTelescopeGetReductionFactor(PC,PetscInt*);
391: PETSC_EXTERN PetscErrorCode PCTelescopeSetReductionFactor(PC,PetscInt);
392: PETSC_EXTERN PetscErrorCode PCTelescopeGetIgnoreDM(PC,PetscBool*);
393: PETSC_EXTERN PetscErrorCode PCTelescopeSetIgnoreDM(PC,PetscBool);
394: PETSC_EXTERN PetscErrorCode PCTelescopeGetUseCoarseDM(PC,PetscBool*);
395: PETSC_EXTERN PetscErrorCode PCTelescopeSetUseCoarseDM(PC,PetscBool);
396: PETSC_EXTERN PetscErrorCode PCTelescopeGetIgnoreKSPComputeOperators(PC,PetscBool*);
397: PETSC_EXTERN PetscErrorCode PCTelescopeSetIgnoreKSPComputeOperators(PC,PetscBool);
398: PETSC_EXTERN PetscErrorCode PCTelescopeGetDM(PC,DM*);
400: PETSC_EXTERN PetscErrorCode PCPatchSetSaveOperators(PC, PetscBool);
401: PETSC_EXTERN PetscErrorCode PCPatchGetSaveOperators(PC, PetscBool *);
402: PETSC_EXTERN PetscErrorCode PCPatchSetPrecomputeElementTensors(PC, PetscBool);
403: PETSC_EXTERN PetscErrorCode PCPatchGetPrecomputeElementTensors(PC, PetscBool *);
404: PETSC_EXTERN PetscErrorCode PCPatchSetPartitionOfUnity(PC, PetscBool);
405: PETSC_EXTERN PetscErrorCode PCPatchGetPartitionOfUnity(PC, PetscBool *);
406: PETSC_EXTERN PetscErrorCode PCPatchSetMultiplicative(PC, PetscBool);
407: PETSC_EXTERN PetscErrorCode PCPatchGetMultiplicative(PC, PetscBool *);
408: PETSC_EXTERN PetscErrorCode PCPatchSetSubMatType(PC, MatType);
409: PETSC_EXTERN PetscErrorCode PCPatchGetSubMatType(PC, MatType *);
410: PETSC_EXTERN PetscErrorCode PCPatchSetCellNumbering(PC, PetscSection);
411: PETSC_EXTERN PetscErrorCode PCPatchGetCellNumbering(PC, PetscSection *);
412: PETSC_EXTERN PetscErrorCode PCPatchSetConstructType(PC, PCPatchConstructType, PetscErrorCode (*)(PC, PetscInt *, IS **, IS *, void *), void *);
413: PETSC_EXTERN PetscErrorCode PCPatchGetConstructType(PC, PCPatchConstructType *, PetscErrorCode (**)(PC, PetscInt *, IS **, IS *, void *), void **);
414: PETSC_EXTERN PetscErrorCode PCPatchSetDiscretisationInfo(PC, PetscInt, DM *, PetscInt *, PetscInt *, const PetscInt **, const PetscInt *, PetscInt, const PetscInt *, PetscInt, const PetscInt *);
415: PETSC_EXTERN PetscErrorCode PCPatchSetComputeOperator(PC, PetscErrorCode (*)(PC,PetscInt,Vec,Mat,IS,PetscInt,const PetscInt *,const PetscInt *, void *), void *);
416: PETSC_EXTERN PetscErrorCode PCPatchSetComputeFunction(PC pc, PetscErrorCode (*func)(PC, PetscInt, Vec, Vec, IS, PetscInt, const PetscInt *, const PetscInt *, void *), void *ctx);
417: PETSC_EXTERN PetscErrorCode PCPatchSetComputeOperatorInteriorFacets(PC, PetscErrorCode (*)(PC,PetscInt,Vec,Mat,IS,PetscInt,const PetscInt *,const PetscInt *, void *), void *);
418: PETSC_EXTERN PetscErrorCode PCPatchSetComputeFunctionInteriorFacets(PC pc, PetscErrorCode (*func)(PC, PetscInt, Vec, Vec, IS, PetscInt, const PetscInt *, const PetscInt *, void *), void *ctx);
420: PETSC_EXTERN PetscErrorCode PCLMVMSetMatLMVM(PC, Mat);
421: PETSC_EXTERN PetscErrorCode PCLMVMGetMatLMVM(PC, Mat*);
422: PETSC_EXTERN PetscErrorCode PCLMVMSetIS(PC, IS);
423: PETSC_EXTERN PetscErrorCode PCLMVMClearIS(PC);
425: PETSC_EXTERN PetscErrorCode PCExoticSetType(PC,PCExoticType);
427: PETSC_EXTERN PetscErrorCode PCDeflationSetInitOnly(PC,PetscBool);
428: PETSC_EXTERN PetscErrorCode PCDeflationSetLevels(PC,PetscInt);
429: PETSC_EXTERN PetscErrorCode PCDeflationSetReductionFactor(PC,PetscInt);
430: PETSC_EXTERN PetscErrorCode PCDeflationSetCorrectionFactor(PC,PetscScalar);
431: PETSC_EXTERN PetscErrorCode PCDeflationSetSpaceToCompute(PC,PCDeflationSpaceType,PetscInt);
432: PETSC_EXTERN PetscErrorCode PCDeflationSetSpace(PC,Mat,PetscBool);
433: PETSC_EXTERN PetscErrorCode PCDeflationSetProjectionNullSpaceMat(PC,Mat);
434: PETSC_EXTERN PetscErrorCode PCDeflationSetCoarseMat(PC,Mat);
435: PETSC_EXTERN PetscErrorCode PCDeflationGetPC(PC,PC*);
437: PETSC_EXTERN PetscErrorCode PCHPDDMSetAuxiliaryMat(PC,IS,Mat,PetscErrorCode (*)(Mat,PetscReal,Vec,Vec,PetscReal,IS,void*),void*);
438: PETSC_EXTERN PetscErrorCode PCHPDDMSetRHSMat(PC,Mat);
439: PETSC_EXTERN PetscErrorCode PCHPDDMHasNeumannMat(PC,PetscBool);
440: PETSC_EXTERN PetscErrorCode PCHPDDMSetCoarseCorrectionType(PC,PCHPDDMCoarseCorrectionType);
441: PETSC_EXTERN PetscErrorCode PCHPDDMGetCoarseCorrectionType(PC,PCHPDDMCoarseCorrectionType*);
442: PETSC_EXTERN PetscErrorCode PCHPDDMFinalizePackage(void);
443: PETSC_EXTERN PetscErrorCode PCHPDDMInitializePackage(void);
445: #endif /* PETSCPC_H */