xref: /petsc/include/petscpc.h (revision f746d493859b98ed4db71345f1a8e48bd86b1a81)
1 /*
2       Preconditioner module.
3 */
4 #if !defined(__PETSCPC_H)
5 #define __PETSCPC_H
6 #include "petscmat.h"
7 #include "petscdm.h"
8 PETSC_EXTERN_CXX_BEGIN
9 
10 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT  PCInitializePackage(const char[]);
11 
12 /*
13     PCList contains the list of preconditioners currently registered
14    These are added with the PCRegisterDynamic() macro
15 */
16 extern PetscFList PCList;
17 
18 /*S
19      PC - Abstract PETSc object that manages all preconditioners
20 
21    Level: beginner
22 
23   Concepts: preconditioners
24 
25 .seealso:  PCCreate(), PCSetType(), PCType (for list of available types)
26 S*/
27 typedef struct _p_PC* PC;
28 
29 /*E
30     PCType - String with the name of a PETSc preconditioner method or the creation function
31        with an optional dynamic library name, for example
32        http://www.mcs.anl.gov/petsc/lib.a:mypccreate()
33 
34    Level: beginner
35 
36    Notes: Click on the links below to see details on a particular solver
37 
38 .seealso: PCSetType(), PC, PCCreate()
39 E*/
40 #define PCType char*
41 #define PCNONE            "none"
42 #define PCJACOBI          "jacobi"
43 #define PCSOR             "sor"
44 #define PCLU              "lu"
45 #define PCSHELL           "shell"
46 #define PCBJACOBI         "bjacobi"
47 #define PCMG              "mg"
48 #define PCEISENSTAT       "eisenstat"
49 #define PCILU             "ilu"
50 #define PCICC             "icc"
51 #define PCASM             "asm"
52 #define PCKSP             "ksp"
53 #define PCCOMPOSITE       "composite"
54 #define PCREDUNDANT       "redundant"
55 #define PCSPAI            "spai"
56 #define PCNN              "nn"
57 #define PCCHOLESKY        "cholesky"
58 #define PCPBJACOBI        "pbjacobi"
59 #define PCMAT             "mat"
60 #define PCHYPRE           "hypre"
61 #define PCFIELDSPLIT      "fieldsplit"
62 #define PCTFS             "tfs"
63 #define PCML              "ml"
64 #define PCPROMETHEUS      "prometheus"
65 #define PCGALERKIN        "galerkin"
66 #define PCEXOTIC          "exotic"
67 #define PCOPENMP          "openmp"
68 #define PCSUPPORTGRAPH    "supportgraph"
69 #define PCASA             "asa"
70 #define PCCP              "cp"
71 #define PCBFBT            "bfbt"
72 #define PCLSC             "lsc"
73 #define PCPYTHON          "python"
74 #define PCPFMG            "pfmg"
75 #define PCSYSPFMG         "syspfmg"
76 #define PCREDISTRIBUTE    "redistribute"
77 #define PCSACUDA          "sacuda"
78 
79 /* Logging support */
80 extern PetscClassId PETSCKSP_DLLEXPORT PC_CLASSID;
81 
82 /*E
83     PCSide - If the preconditioner is to be applied to the left, right
84      or symmetrically around the operator.
85 
86    Level: beginner
87 
88 .seealso:
89 E*/
90 typedef enum { PC_LEFT,PC_RIGHT,PC_SYMMETRIC } PCSide;
91 extern const char *PCSides[];
92 
93 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCCreate(MPI_Comm,PC*);
94 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSetType(PC,const PCType);
95 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSetUp(PC);
96 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSetUpOnBlocks(PC);
97 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCApply(PC,Vec,Vec);
98 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCApplySymmetricLeft(PC,Vec,Vec);
99 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCApplySymmetricRight(PC,Vec,Vec);
100 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCApplyBAorAB(PC,PCSide,Vec,Vec,Vec);
101 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCApplyTranspose(PC,Vec,Vec);
102 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCApplyTransposeExists(PC,PetscBool *);
103 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCApplyBAorABTranspose(PC,PCSide,Vec,Vec,Vec);
104 
105 /*E
106     PCRichardsonConvergedReason - reason a PCApplyRichardson method terminates
107 
108    Level: advanced
109 
110    Notes: this must match finclude/petscpc.h and the KSPConvergedReason values in petscksp.h
111 
112 .seealso: PCApplyRichardson()
113 E*/
114 typedef enum {
115               PCRICHARDSON_CONVERGED_RTOL               =  2,
116               PCRICHARDSON_CONVERGED_ATOL               =  3,
117               PCRICHARDSON_CONVERGED_ITS                =  4,
118               PCRICHARDSON_DIVERGED_DTOL                = -4} PCRichardsonConvergedReason;
119 
120 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCApplyRichardson(PC,Vec,Vec,Vec,PetscReal,PetscReal,PetscReal,PetscInt,PetscBool ,PetscInt*,PCRichardsonConvergedReason*);
121 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCApplyRichardsonExists(PC,PetscBool *);
122 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSetInitialGuessNonzero(PC,PetscBool );
123 
124 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCRegisterDestroy(void);
125 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCRegisterAll(const char[]);
126 extern PetscBool  PCRegisterAllCalled;
127 
128 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCRegister(const char[],const char[],const char[],PetscErrorCode(*)(PC));
129 
130 /*MC
131    PCRegisterDynamic - Adds a method to the preconditioner package.
132 
133    Synopsis:
134    PetscErrorCode PCRegisterDynamic(const char *name_solver,const char *path,const char *name_create,PetscErrorCode (*routine_create)(PC))
135 
136    Not collective
137 
138    Input Parameters:
139 +  name_solver - name of a new user-defined solver
140 .  path - path (either absolute or relative) the library containing this solver
141 .  name_create - name of routine to create method context
142 -  routine_create - routine to create method context
143 
144    Notes:
145    PCRegisterDynamic() may be called multiple times to add several user-defined preconditioners.
146 
147    If dynamic libraries are used, then the fourth input argument (routine_create)
148    is ignored.
149 
150    Sample usage:
151 .vb
152    PCRegisterDynamic("my_solver","/home/username/my_lib/lib/libO/solaris/mylib",
153               "MySolverCreate",MySolverCreate);
154 .ve
155 
156    Then, your solver can be chosen with the procedural interface via
157 $     PCSetType(pc,"my_solver")
158    or at runtime via the option
159 $     -pc_type my_solver
160 
161    Level: advanced
162 
163    Notes: ${PETSC_ARCH}, ${PETSC_DIR}, ${PETSC_LIB_DIR},  or ${any environmental variable}
164            occuring in pathname will be replaced with appropriate values.
165          If your function is not being put into a shared library then use PCRegister() instead
166 
167 .keywords: PC, register
168 
169 .seealso: PCRegisterAll(), PCRegisterDestroy()
170 M*/
171 #if defined(PETSC_USE_DYNAMIC_LIBRARIES)
172 #define PCRegisterDynamic(a,b,c,d) PCRegister(a,b,c,0)
173 #else
174 #define PCRegisterDynamic(a,b,c,d) PCRegister(a,b,c,d)
175 #endif
176 
177 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCDestroy(PC);
178 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSetFromOptions(PC);
179 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGetType(PC,const PCType*);
180 
181 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorGetMatrix(PC,Mat*);
182 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSetModifySubMatrices(PC,PetscErrorCode(*)(PC,PetscInt,const IS[],const IS[],Mat[],void*),void*);
183 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCModifySubMatrices(PC,PetscInt,const IS[],const IS[],Mat[],void*);
184 
185 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSetOperators(PC,Mat,Mat,MatStructure);
186 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGetOperators(PC,Mat*,Mat*,MatStructure*);
187 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGetOperatorsSet(PC,PetscBool *,PetscBool *);
188 
189 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCView(PC,PetscViewer);
190 
191 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSetOptionsPrefix(PC,const char[]);
192 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCAppendOptionsPrefix(PC,const char[]);
193 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGetOptionsPrefix(PC,const char*[]);
194 
195 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCComputeExplicitOperator(PC,Mat*);
196 
197 /*
198       These are used to provide extra scaling of preconditioned
199    operator for time-stepping schemes like in SUNDIALS
200 */
201 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGetDiagonalScale(PC,PetscBool *);
202 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCDiagonalScaleLeft(PC,Vec,Vec);
203 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCDiagonalScaleRight(PC,Vec,Vec);
204 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSetDiagonalScale(PC,Vec);
205 
206 /* ------------- options specific to particular preconditioners --------- */
207 
208 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCJacobiSetUseRowMax(PC);
209 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCJacobiSetUseRowSum(PC);
210 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCJacobiSetUseAbs(PC);
211 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSORSetSymmetric(PC,MatSORType);
212 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSORSetOmega(PC,PetscReal);
213 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSORSetIterations(PC,PetscInt,PetscInt);
214 
215 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCEisenstatSetOmega(PC,PetscReal);
216 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCEisenstatNoDiagonalScaling(PC);
217 
218 #define USE_PRECONDITIONER_MATRIX 0
219 #define USE_TRUE_MATRIX           1
220 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCBJacobiSetUseTrueLocal(PC);
221 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCBJacobiSetTotalBlocks(PC,PetscInt,const PetscInt[]);
222 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCBJacobiSetLocalBlocks(PC,PetscInt,const PetscInt[]);
223 
224 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCKSPSetUseTrue(PC);
225 
226 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCShellSetApply(PC,PetscErrorCode (*)(PC,Vec,Vec));
227 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCShellSetApplyBA(PC,PetscErrorCode (*)(PC,PCSide,Vec,Vec,Vec));
228 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCShellSetApplyTranspose(PC,PetscErrorCode (*)(PC,Vec,Vec));
229 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCShellSetSetUp(PC,PetscErrorCode (*)(PC));
230 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCShellSetApplyRichardson(PC,PetscErrorCode (*)(PC,Vec,Vec,Vec,PetscReal,PetscReal,PetscReal,PetscInt,PetscBool ,PetscInt*,PCRichardsonConvergedReason*));
231 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCShellSetView(PC,PetscErrorCode (*)(PC,PetscViewer));
232 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCShellSetDestroy(PC,PetscErrorCode (*)(PC));
233 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCShellGetContext(PC,void**);
234 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCShellSetContext(PC,void*);
235 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCShellSetName(PC,const char[]);
236 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCShellGetName(PC,char*[]);
237 
238 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorSetZeroPivot(PC,PetscReal);
239 
240 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorSetShiftType(PC,MatFactorShiftType);
241 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorSetShiftAmount(PC,PetscReal);
242 
243 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorSetMatSolverPackage(PC,const MatSolverPackage);
244 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorGetMatSolverPackage(PC,const MatSolverPackage*);
245 
246 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorSetFill(PC,PetscReal);
247 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorSetColumnPivot(PC,PetscReal);
248 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorReorderForNonzeroDiagonal(PC,PetscReal);
249 
250 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorSetMatOrderingType(PC,const MatOrderingType);
251 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorSetReuseOrdering(PC,PetscBool );
252 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorSetReuseFill(PC,PetscBool );
253 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorSetUseInPlace(PC);
254 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorSetAllowDiagonalFill(PC);
255 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorSetPivotInBlocks(PC,PetscBool );
256 
257 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorSetLevels(PC,PetscInt);
258 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFactorSetDropTolerance(PC,PetscReal,PetscReal,PetscInt);
259 
260 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCASMSetLocalSubdomains(PC,PetscInt,IS[],IS[]);
261 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCASMSetTotalSubdomains(PC,PetscInt,IS[],IS[]);
262 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCASMSetOverlap(PC,PetscInt);
263 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCASMSetSortIndices(PC,PetscBool );
264 
265 /*E
266     PCASMType - Type of additive Schwarz method to use
267 
268 $  PC_ASM_BASIC - symmetric version where residuals from the ghost points are used
269 $                 and computed values in ghost regions are added together. Classical
270 $                 standard additive Schwarz
271 $  PC_ASM_RESTRICT - residuals from ghost points are used but computed values in ghost
272 $                    region are discarded. Default
273 $  PC_ASM_INTERPOLATE - residuals from ghost points are not used, computed values in ghost
274 $                       region are added back in
275 $  PC_ASM_NONE - ghost point residuals are not used, computed ghost values are discarded
276 $                not very good.
277 
278    Level: beginner
279 
280 .seealso: PCASMSetType()
281 E*/
282 typedef enum {PC_ASM_BASIC = 3,PC_ASM_RESTRICT = 1,PC_ASM_INTERPOLATE = 2,PC_ASM_NONE = 0} PCASMType;
283 extern const char *PCASMTypes[];
284 
285 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCASMSetType(PC,PCASMType);
286 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCASMCreateSubdomains(Mat,PetscInt,IS*[]);
287 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCASMDestroySubdomains(PetscInt,IS[],IS[]);
288 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCASMCreateSubdomains2D(PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt*,IS**,IS**);
289 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCASMGetLocalSubdomains(PC,PetscInt*,IS*[],IS*[]);
290 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCASMGetLocalSubmatrices(PC,PetscInt*,Mat*[]);
291 
292 /*E
293     PCGASMType - Type of generalized additive Schwarz method to use (differs from ASM in allowing multiple processors per domain)
294 
295 $  PC_GASM_BASIC - symmetric version where residuals from the ghost points are used
296 $                 and computed values in ghost regions are added together. Classical
297 $                 standard additive Schwarz
298 $  PC_GASM_RESTRICT - residuals from ghost points are used but computed values in ghost
299 $                    region are discarded. Default
300 $  PC_GASM_INTERPOLATE - residuals from ghost points are not used, computed values in ghost
301 $                       region are added back in
302 $  PC_GASM_NONE - ghost point residuals are not used, computed ghost values are discarded
303 $                not very good.
304 
305    Level: beginner
306 
307 .seealso: PCGASMSetType()
308 E*/
309 typedef enum {PC_GASM_BASIC = 3,PC_GASM_RESTRICT = 1,PC_GASM_INTERPOLATE = 2,PC_GASM_NONE = 0} PCGASMType;
310 extern const char *PCGASMTypes[];
311 
312 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGASMSetLocalSubdomains(PC,PetscInt,IS[],IS[]);
313 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGASMSetSubdomains(PC,PetscInt);
314 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGASMSetOverlap(PC,PetscInt);
315 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGASMSetSortIndices(PC,PetscBool );
316 
317 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGASMSetType(PC,PCGASMType);
318 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGASMCreateSubdomains(Mat,PetscInt,IS*[]);
319 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGASMDestroySubdomains(PetscInt,IS[],IS[]);
320 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGASMCreateSubdomains2D(PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt,PetscInt*,IS**,IS**);
321 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGASMGetLocalSubdomains(PC,PetscInt*,IS*[],IS*[]);
322 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGASMGetLocalSubmatrices(PC,PetscInt*,Mat*[]);
323 
324 /*E
325     PCCompositeType - Determines how two or more preconditioner are composed
326 
327 $  PC_COMPOSITE_ADDITIVE - results from application of all preconditioners are added together
328 $  PC_COMPOSITE_MULTIPLICATIVE - preconditioners are applied sequentially to the residual freshly
329 $                                computed after the previous preconditioner application
330 $  PC_COMPOSITE_SYMMETRIC_MULTIPLICATIVE - preconditioners are applied sequentially to the residual freshly
331 $                                computed from first preconditioner to last and then back (Use only for symmetric matrices and preconditions)
332 $  PC_COMPOSITE_SPECIAL - This is very special for a matrix of the form alpha I + R + S
333 $                         where first preconditioner is built from alpha I + S and second from
334 $                         alpha I + R
335 
336    Level: beginner
337 
338 .seealso: PCCompositeSetType()
339 E*/
340 typedef enum {PC_COMPOSITE_ADDITIVE,PC_COMPOSITE_MULTIPLICATIVE,PC_COMPOSITE_SYMMETRIC_MULTIPLICATIVE,PC_COMPOSITE_SPECIAL,PC_COMPOSITE_SCHUR} PCCompositeType;
341 extern const char *PCCompositeTypes[];
342 
343 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCCompositeSetUseTrue(PC);
344 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCCompositeSetType(PC,PCCompositeType);
345 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCCompositeAddPC(PC,PCType);
346 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCCompositeGetPC(PC,PetscInt,PC *);
347 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCCompositeSpecialSetAlpha(PC,PetscScalar);
348 
349 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCRedundantSetNumber(PC,PetscInt);
350 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCRedundantSetScatter(PC,VecScatter,VecScatter);
351 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCRedundantGetOperators(PC,Mat*,Mat*);
352 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCRedundantGetPC(PC,PC*);
353 
354 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSPAISetEpsilon(PC,double);
355 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSPAISetNBSteps(PC,PetscInt);
356 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSPAISetMax(PC,PetscInt);
357 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSPAISetMaxNew(PC,PetscInt);
358 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSPAISetBlockSize(PC,PetscInt);
359 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSPAISetCacheSize(PC,PetscInt);
360 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSPAISetVerbose(PC,PetscInt);
361 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSPAISetSp(PC,PetscInt);
362 
363 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCHYPRESetType(PC,const char[]);
364 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCHYPREGetType(PC,const char*[]);
365 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCBJacobiGetLocalBlocks(PC,PetscInt*,const PetscInt*[]);
366 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCBJacobiGetTotalBlocks(PC,PetscInt*,const PetscInt*[]);
367 
368 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFieldSplitSetFields(PC,const char[],PetscInt,const PetscInt*);
369 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFieldSplitSetType(PC,PCCompositeType);
370 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFieldSplitSetBlockSize(PC,PetscInt);
371 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFieldSplitSetIS(PC,const char[],IS);
372 
373 /*E
374     PCFieldSplitSchurPreType - Determines how to precondition Schur complement
375 
376     Level: intermediate
377 
378 .seealso: PCFieldSplitSchurPrecondition()
379 E*/
380 typedef enum {PC_FIELDSPLIT_SCHUR_PRE_SELF,PC_FIELDSPLIT_SCHUR_PRE_DIAG,PC_FIELDSPLIT_SCHUR_PRE_USER} PCFieldSplitSchurPreType;
381 extern const char *const PCFieldSplitSchurPreTypes[];
382 
383 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFieldSplitSchurPrecondition(PC,PCFieldSplitSchurPreType,Mat);
384 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCFieldSplitGetSchurBlocks(PC,Mat*,Mat*,Mat*,Mat*);
385 
386 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGalerkinSetRestriction(PC,Mat);
387 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGalerkinSetInterpolation(PC,Mat);
388 
389 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSetCoordinates(PC,PetscInt,PetscReal*);
390 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSASetVectors(PC,PetscInt,PetscReal *);
391 
392 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCPythonSetType(PC,const char[]);
393 
394 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCSetDM(PC,DM);
395 EXTERN PetscErrorCode PETSCKSP_DLLEXPORT PCGetDM(PC,DM*);
396 
397 
398 PETSC_EXTERN_CXX_END
399 
400 #endif /* __PETSCPC_H */
401