Actual source code: petscpf.h

petsc-master 2019-08-22
Report Typos and Errors
  1: /*
  2:       mathematical function module.
  3: */
  4: #if !defined(PETSCPF_H)
  5: #define PETSCPF_H
  6:  #include <petscvec.h>

  8: /*
  9:     PFList contains the list of mathematical functions currently registered
 10:    These are added with PFRegister()
 11: */
 12: PETSC_EXTERN PetscFunctionList PFList;

 14: /*J
 15:     PFType - Type of PETSc mathematical function, a string name

 17:    Level: beginner

 19: .seealso: PFSetType(), PF
 20: J*/
 21: typedef const char* PFType;
 22: #define PFCONSTANT      "constant"
 23: #define PFMAT           "mat"
 24: #define PFSTRING        "string"
 25: #define PFQUICK         "quick"
 26: #define PFIDENTITY      "identity"
 27: #define PFMATLAB        "matlab"

 29: /*S
 30:      PF - Abstract PETSc mathematical function

 32:    Level: beginner

 34: .seealso:  PFCreate(), PFDestroy(), PFSetType(), PFApply(), PFApplyVec(), PFSet(), PFType
 35: S*/
 36: typedef struct _p_PF* PF;

 38: PETSC_EXTERN PetscClassId PF_CLASSID;

 40: PETSC_EXTERN PetscErrorCode PFCreate(MPI_Comm,PetscInt,PetscInt,PF*);
 41: PETSC_EXTERN PetscErrorCode PFSetType(PF,PFType,void*);
 42: PETSC_EXTERN PetscErrorCode PFSet(PF,PetscErrorCode(*)(void*,PetscInt,const PetscScalar*,PetscScalar*),PetscErrorCode(*)(void*,Vec,Vec),PetscErrorCode(*)(void*,PetscViewer),PetscErrorCode(*)(void*),void*);
 43: PETSC_EXTERN PetscErrorCode PFApply(PF,PetscInt,const PetscScalar*,PetscScalar*);
 44: PETSC_EXTERN PetscErrorCode PFApplyVec(PF,Vec,Vec);

 46: PETSC_EXTERN PetscErrorCode PFInitializePackage(void);

 48: PETSC_EXTERN PetscErrorCode PFRegister(const char[],PetscErrorCode (*)(PF,void*));

 50: PETSC_EXTERN PetscErrorCode PFDestroy(PF*);
 51: PETSC_EXTERN PetscErrorCode PFSetFromOptions(PF);
 52: PETSC_EXTERN PetscErrorCode PFGetType(PF,PFType*);

 54: PETSC_EXTERN PetscErrorCode PFView(PF,PetscViewer);
 55: PETSC_STATIC_INLINE PetscErrorCode PFViewFromOptions(PF A,PetscObject obj,const char name[]) {return PetscObjectViewFromOptions((PetscObject)A,obj,name);}

 57: #define PFSetOptionsPrefix(a,s) PetscObjectSetOptionsPrefix((PetscObject)(a),s)

 59: #endif