xref: /petsc/include/petscpf.h (revision a7a1495cff6e7d7f13bcb4a602de4e22c1c115f6)
1 /* $Id: pf.h,v 1.2 2000/01/24 04:05:37 bsmith Exp bsmith $ */
2 
3 /*
4       mathematical function module.
5 */
6 #if !defined(__PF_H)
7 #define __PF_H
8 #include "mat.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 
23 typedef struct _p_PF* PF;
24 #define PF_COOKIE     PETSC_COOKIE+9
25 
26 
27 extern int PFCreate(MPI_Comm,int,int,PF*);
28 extern int PFSetType(PF,PFType,void*);
29 extern int PFSet(PF,int(*)(void*,int,Scalar*,Scalar*),int(*)(void*,Vec,Vec),int(*)(void*,Viewer),int(*)(void*),void*);
30 extern int PFApply(PF,int,Scalar*,Scalar*);
31 extern int PFApplyVec(PF,Vec,Vec);
32 
33 extern int PFRegisterDestroy(void);
34 extern int PFRegisterAll(char*);
35 extern int PFRegisterAllCalled;
36 
37 extern int PFRegister(char*,char*,char*,int(*)(PF,void*));
38 #if defined(PETSC_USE_DYNAMIC_LIBRARIES)
39 #define PFRegisterDynamic(a,b,c,d) PFRegister(a,b,c,0)
40 #else
41 #define PFRegisterDynamic(a,b,c,d) PFRegister(a,b,c,d)
42 #endif
43 
44 extern int PFDestroy(PF);
45 extern int PFSetFromOptions(PF);
46 extern int PFSetTypeFromOptions(PF);
47 extern int PFGetType(PF,PFType*);
48 
49 extern int PFView(PF,Viewer);
50 
51 #endif
52 
53 
54 
55 
56