1 /* $Id: pf.h,v 1.1 2000/01/22 22:58:26 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(*)(int,Scalar*,Scalar*,void*),int(*)(Vec,Vec,void*),int(*)(void*,Viewer),int(*)(void*),void*); 30 extern int PFSetUp(PF); 31 extern int PFApply(PF,int,Scalar*,Scalar*); 32 extern int PFApplyVec(PF,Vec,Vec); 33 34 extern int PFRegisterDestroy(void); 35 extern int PFRegisterAll(char*); 36 extern int PFRegisterAllCalled; 37 38 extern int PFRegister(char*,char*,char*,int(*)(PF)); 39 #if defined(PETSC_USE_DYNAMIC_LIBRARIES) 40 #define PFRegisterDynamic(a,b,c,d) PFRegister(a,b,c,0) 41 #else 42 #define PFRegisterDynamic(a,b,c,d) PFRegister(a,b,c,d) 43 #endif 44 45 extern int PFDestroy(PF); 46 extern int PFSetFromOptions(PF); 47 extern int PFSetTypeFromOptions(PF); 48 extern int PFGetType(PF,PFType*); 49 50 extern int PFView(PF,Viewer); 51 52 #endif 53 54 55 56 57