xref: /petsc/include/petscpf.h (revision ac09b9214d23ea9ad238aa607de9fa447fd4e91b)
1f97fa5f8SBarry Smith /*
23e3e4676SBarry Smith       mathematical function module.
3f97fa5f8SBarry Smith */
426bd1501SBarry Smith #if !defined(PETSCPF_H)
526bd1501SBarry Smith #define PETSCPF_H
6*ac09b921SBarry Smith 
72c8e378dSBarry Smith #include <petscvec.h>
8f97fa5f8SBarry Smith 
9*ac09b921SBarry Smith /* SUBMANSEC = PF */
10*ac09b921SBarry Smith 
11f97fa5f8SBarry Smith /*
1237e93019SBarry Smith     PFList contains the list of mathematical functions currently registered
13bdf89e91SBarry Smith    These are added with PFRegister()
14f97fa5f8SBarry Smith */
1537e93019SBarry Smith PETSC_EXTERN PetscFunctionList PFList;
16f97fa5f8SBarry Smith 
1776bdecfbSBarry Smith /*J
18b9617806SBarry Smith     PFType - Type of PETSc mathematical function, a string name
19b9617806SBarry Smith 
20b9617806SBarry Smith    Level: beginner
21b9617806SBarry Smith 
22db781477SPatrick Sanan .seealso: `PFSetType()`, `PF`
2376bdecfbSBarry Smith J*/
2419fd82e9SBarry Smith typedef const 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 
37db781477SPatrick Sanan .seealso: `PFCreate()`, `PFDestroy()`, `PFSetType()`, `PFApply()`, `PFApplyVec()`, `PFSet()`, `PFType`
38b9617806SBarry Smith S*/
39b9617806SBarry Smith typedef struct _p_PF* PF;
40b9617806SBarry Smith 
41014dd563SJed Brown PETSC_EXTERN PetscClassId PF_CLASSID;
42f97fa5f8SBarry Smith 
43014dd563SJed Brown PETSC_EXTERN PetscErrorCode PFCreate(MPI_Comm,PetscInt,PetscInt,PF*);
4419fd82e9SBarry Smith PETSC_EXTERN PetscErrorCode PFSetType(PF,PFType,void*);
45014dd563SJed Brown PETSC_EXTERN PetscErrorCode PFSet(PF,PetscErrorCode(*)(void*,PetscInt,const PetscScalar*,PetscScalar*),PetscErrorCode(*)(void*,Vec,Vec),PetscErrorCode(*)(void*,PetscViewer),PetscErrorCode(*)(void*),void*);
46014dd563SJed Brown PETSC_EXTERN PetscErrorCode PFApply(PF,PetscInt,const PetscScalar*,PetscScalar*);
47014dd563SJed Brown PETSC_EXTERN PetscErrorCode PFApplyVec(PF,Vec,Vec);
48f97fa5f8SBarry Smith 
49607a6623SBarry Smith PETSC_EXTERN PetscErrorCode PFInitializePackage(void);
50f97fa5f8SBarry Smith 
51bdf89e91SBarry Smith PETSC_EXTERN PetscErrorCode PFRegister(const char[],PetscErrorCode (*)(PF,void*));
52f97fa5f8SBarry Smith 
53014dd563SJed Brown PETSC_EXTERN PetscErrorCode PFDestroy(PF*);
54014dd563SJed Brown PETSC_EXTERN PetscErrorCode PFSetFromOptions(PF);
5519fd82e9SBarry Smith PETSC_EXTERN PetscErrorCode PFGetType(PF,PFType*);
56f97fa5f8SBarry Smith 
57014dd563SJed Brown PETSC_EXTERN PetscErrorCode PFView(PF,PetscViewer);
58fe2efc57SMark PETSC_EXTERN PetscErrorCode PFViewFromOptions(PF,PetscObject,const char[]);
59f97fa5f8SBarry Smith 
603eda8832SBarry Smith #define PFSetOptionsPrefix(a,s) PetscObjectSetOptionsPrefix((PetscObject)(a),s)
61e9fa29b7SSatish Balay 
62f97fa5f8SBarry Smith #endif
63