xref: /petsc/include/petscpf.h (revision 37e93019d958c82a17ba35bccd46909a573bf1c3)
1f97fa5f8SBarry Smith /*
23e3e4676SBarry Smith       mathematical function module.
3f97fa5f8SBarry Smith */
40a835dfdSSatish Balay #if !defined(__PETSCPF_H)
50a835dfdSSatish Balay #define __PETSCPF_H
62c8e378dSBarry Smith #include <petscvec.h>
7f97fa5f8SBarry Smith 
8f97fa5f8SBarry Smith /*
9*37e93019SBarry Smith     PFList contains the list of mathematical functions currently registered
10bdf89e91SBarry Smith    These are added with PFRegister()
11f97fa5f8SBarry Smith */
12*37e93019SBarry Smith PETSC_EXTERN PetscFunctionList PFList;
13f97fa5f8SBarry Smith 
1476bdecfbSBarry Smith /*J
15b9617806SBarry Smith     PFType - Type of PETSc mathematical function, a string name
16b9617806SBarry Smith 
17b9617806SBarry Smith    Level: beginner
18b9617806SBarry Smith 
19b9617806SBarry Smith .seealso: PFSetType(), PF
2076bdecfbSBarry Smith J*/
2119fd82e9SBarry Smith typedef const char* PFType;
223e3e4676SBarry Smith #define PFCONSTANT      "constant"
233e3e4676SBarry Smith #define PFMAT           "mat"
243eda8832SBarry Smith #define PFSTRING        "string"
253eda8832SBarry Smith #define PFQUICK         "quick"
2674637425SBarry Smith #define PFIDENTITY      "identity"
2774637425SBarry Smith #define PFMATLAB        "matlab"
28f97fa5f8SBarry Smith 
29b9617806SBarry Smith /*S
30b9617806SBarry Smith      PF - Abstract PETSc mathematical function
31f97fa5f8SBarry Smith 
32b9617806SBarry Smith    Level: beginner
33b9617806SBarry Smith 
34b9617806SBarry Smith   Concepts: functions
35b9617806SBarry Smith 
36b9617806SBarry Smith .seealso:  PFCreate(), PFDestroy(), PFSetType(), PFApply(), PFApplyVec(), PFSet(), PFType
37b9617806SBarry Smith S*/
38b9617806SBarry Smith typedef struct _p_PF* PF;
39b9617806SBarry Smith 
40014dd563SJed Brown PETSC_EXTERN PetscClassId PF_CLASSID;
41f97fa5f8SBarry Smith 
42014dd563SJed Brown PETSC_EXTERN PetscErrorCode PFCreate(MPI_Comm,PetscInt,PetscInt,PF*);
4319fd82e9SBarry Smith PETSC_EXTERN PetscErrorCode PFSetType(PF,PFType,void*);
44014dd563SJed Brown PETSC_EXTERN PetscErrorCode PFSet(PF,PetscErrorCode(*)(void*,PetscInt,const PetscScalar*,PetscScalar*),PetscErrorCode(*)(void*,Vec,Vec),PetscErrorCode(*)(void*,PetscViewer),PetscErrorCode(*)(void*),void*);
45014dd563SJed Brown PETSC_EXTERN PetscErrorCode PFApply(PF,PetscInt,const PetscScalar*,PetscScalar*);
46014dd563SJed Brown PETSC_EXTERN PetscErrorCode PFApplyVec(PF,Vec,Vec);
47f97fa5f8SBarry Smith 
48014dd563SJed Brown PETSC_EXTERN PetscErrorCode PFRegisterDestroy(void);
49607a6623SBarry Smith PETSC_EXTERN PetscErrorCode PFRegisterAll(void);
50607a6623SBarry Smith PETSC_EXTERN PetscErrorCode PFInitializePackage(void);
51014dd563SJed Brown PETSC_EXTERN PetscBool PFRegisterAllCalled;
52f97fa5f8SBarry Smith 
53bdf89e91SBarry Smith PETSC_EXTERN PetscErrorCode PFRegister(const char[],PetscErrorCode (*)(PF,void*));
54f97fa5f8SBarry Smith 
55014dd563SJed Brown PETSC_EXTERN PetscErrorCode PFDestroy(PF*);
56014dd563SJed Brown PETSC_EXTERN PetscErrorCode PFSetFromOptions(PF);
5719fd82e9SBarry Smith PETSC_EXTERN PetscErrorCode PFGetType(PF,PFType*);
58f97fa5f8SBarry Smith 
59014dd563SJed Brown PETSC_EXTERN PetscErrorCode PFView(PF,PetscViewer);
60f97fa5f8SBarry Smith 
613eda8832SBarry Smith #define PFSetOptionsPrefix(a,s) PetscObjectSetOptionsPrefix((PetscObject)(a),s)
62e9fa29b7SSatish Balay 
63f97fa5f8SBarry Smith #endif
64