xref: /petsc/include/petscpf.h (revision 0a835dfde17e989aa2dfc49c3e55e39ea1705529)
1 /* $Id: petscpf.h,v 1.4 2000/04/09 03:11:53 bsmith Exp balay $ */
2 
3 /*
4       mathematical function module.
5 */
6 #if !defined(__PETSCPF_H)
7 #define __PETSCPF_H
8 #include "petscmat.h"
9 
10 /*
11     PFList contains the list of preconditioners currently registered
12    These are added with the PFRegisterDynamic() macro
13 */
14 extern FList PFList;
15 typedef char *PFType;
16 
17 /*
18     Standard PETSc functions
19 */
20 #define PFCONSTANT      "constant"
21 #define PFMAT           "mat"
22 #define PFSTRING        "string"
23 #define PFQUICK         "quick"
24 
25 typedef struct _p_PF* PF;
26 #define PF_COOKIE     PETSC_COOKIE+9
27 
28 
29 extern int PFCreate(MPI_Comm,int,int,PF*);
30 extern int PFSetType(PF,PFType,void*);
31 extern int PFSet(PF,int(*)(void*,int,Scalar*,Scalar*),int(*)(void*,Vec,Vec),int(*)(void*,Viewer),int(*)(void*),void*);
32 extern int PFApply(PF,int,Scalar*,Scalar*);
33 extern int PFApplyVec(PF,Vec,Vec);
34 
35 extern int        PFRegisterDestroy(void);
36 extern int        PFRegisterAll(char*);
37 extern PetscTruth PFRegisterAllCalled;
38 
39 extern int PFRegister(char*,char*,char*,int(*)(PF,void*));
40 #if defined(PETSC_USE_DYNAMIC_LIBRARIES)
41 #define PFRegisterDynamic(a,b,c,d) PFRegister(a,b,c,0)
42 #else
43 #define PFRegisterDynamic(a,b,c,d) PFRegister(a,b,c,d)
44 #endif
45 
46 extern int PFDestroy(PF);
47 extern int PFSetFromOptions(PF);
48 extern int PFSetTypeFromOptions(PF);
49 extern int PFGetType(PF,PFType*);
50 
51 extern int PFView(PF,Viewer);
52 extern int PFPrintHelp(PF);
53 
54 #define PFSetOptionsPrefix(a,s) PetscObjectSetOptionsPrefix((PetscObject)(a),s)
55 #endif
56 
57 
58 
59 
60