173f4d377SMatthew Knepley /* $Id: petscpf.h,v 1.12 2001/08/06 21:19:07 bsmith Exp $ */ 2f97fa5f8SBarry Smith 3f97fa5f8SBarry Smith /* 43e3e4676SBarry Smith mathematical function module. 5f97fa5f8SBarry Smith */ 60a835dfdSSatish Balay #if !defined(__PETSCPF_H) 70a835dfdSSatish Balay #define __PETSCPF_H 8494233caSMatthew Knepley #include "petscvec.h" 9*e9fa29b7SSatish Balay PETSC_EXTERN_CXX_BEGIN 10f97fa5f8SBarry Smith 11f97fa5f8SBarry Smith /* 12b0a32e0cSBarry Smith PPetscFList contains the list of preconditioners currently registered 133e3e4676SBarry Smith These are added with the PFRegisterDynamic() macro 14f97fa5f8SBarry Smith */ 15b0a32e0cSBarry Smith extern PetscFList PPetscFList; 16f97fa5f8SBarry Smith 17b9617806SBarry Smith /*E 18b9617806SBarry Smith PFType - Type of PETSc mathematical function, a string name 19b9617806SBarry Smith 20b9617806SBarry Smith Level: beginner 21b9617806SBarry Smith 22b9617806SBarry Smith .seealso: PFSetType(), PF 23b9617806SBarry Smith E*/ 24b9617806SBarry Smith typedef char *PFType; 253e3e4676SBarry Smith #define PFCONSTANT "constant" 263e3e4676SBarry Smith #define PFMAT "mat" 273eda8832SBarry Smith #define PFSTRING "string" 283eda8832SBarry Smith #define PFQUICK "quick" 2974637425SBarry Smith #define PFIDENTITY "identity" 3074637425SBarry Smith #define PFMATLAB "matlab" 31f97fa5f8SBarry Smith 32b9617806SBarry Smith /*S 33b9617806SBarry Smith PF - Abstract PETSc mathematical function 34f97fa5f8SBarry Smith 35b9617806SBarry Smith Level: beginner 36b9617806SBarry Smith 37b9617806SBarry Smith Concepts: functions 38b9617806SBarry Smith 39b9617806SBarry Smith .seealso: PFCreate(), PFDestroy(), PFSetType(), PFApply(), PFApplyVec(), PFSet(), PFType 40b9617806SBarry Smith S*/ 41b9617806SBarry Smith typedef struct _p_PF* PF; 42b9617806SBarry Smith 43494233caSMatthew Knepley extern int PF_COOKIE; 44f97fa5f8SBarry Smith 45ca44d042SBarry Smith EXTERN int PFCreate(MPI_Comm,int,int,PF*); 46ca44d042SBarry Smith EXTERN int PFSetType(PF,PFType,void*); 4787828ca2SBarry Smith EXTERN int PFSet(PF,int(*)(void*,int,PetscScalar*,PetscScalar*),int(*)(void*,Vec,Vec),int(*)(void*,PetscViewer),int(*)(void*),void*); 4887828ca2SBarry Smith EXTERN int PFApply(PF,int,PetscScalar*,PetscScalar*); 49ca44d042SBarry Smith EXTERN int PFApplyVec(PF,Vec,Vec); 50f97fa5f8SBarry Smith 51ca44d042SBarry Smith EXTERN int PFRegisterDestroy(void); 52ca44d042SBarry Smith EXTERN int PFRegisterAll(char*); 533eda8832SBarry Smith extern PetscTruth PFRegisterAllCalled; 54f97fa5f8SBarry Smith 55ca44d042SBarry Smith EXTERN int PFRegister(char*,char*,char*,int(*)(PF,void*)); 56f97fa5f8SBarry Smith #if defined(PETSC_USE_DYNAMIC_LIBRARIES) 573e3e4676SBarry Smith #define PFRegisterDynamic(a,b,c,d) PFRegister(a,b,c,0) 58f97fa5f8SBarry Smith #else 593e3e4676SBarry Smith #define PFRegisterDynamic(a,b,c,d) PFRegister(a,b,c,d) 60f97fa5f8SBarry Smith #endif 61f97fa5f8SBarry Smith 62ca44d042SBarry Smith EXTERN int PFDestroy(PF); 63ca44d042SBarry Smith EXTERN int PFSetFromOptions(PF); 64ca44d042SBarry Smith EXTERN int PFGetType(PF,PFType*); 65f97fa5f8SBarry Smith 66b0a32e0cSBarry Smith EXTERN int PFView(PF,PetscViewer); 67f97fa5f8SBarry Smith 683eda8832SBarry Smith #define PFSetOptionsPrefix(a,s) PetscObjectSetOptionsPrefix((PetscObject)(a),s) 69*e9fa29b7SSatish Balay 70*e9fa29b7SSatish Balay PETSC_EXTERN_CXX_END 71f97fa5f8SBarry Smith #endif 72