Actual source code: petscpf.h

petsc-3.5.2 2014-09-08
Report Typos and Errors
  1: /*
  2:       mathematical function module.
  3: */
  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:   Concepts: functions

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

 40: PETSC_EXTERN PetscClassId PF_CLASSID;

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

 48: PETSC_EXTERN PetscErrorCode PFRegisterAll(void);
 49: PETSC_EXTERN PetscErrorCode PFInitializePackage(void);
 50: PETSC_EXTERN PetscBool PFRegisterAllCalled;

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

 54: PETSC_EXTERN PetscErrorCode PFDestroy(PF*);
 55: PETSC_EXTERN PetscErrorCode PFSetFromOptions(PF);
 56: PETSC_EXTERN PetscErrorCode PFGetType(PF,PFType*);

 58: PETSC_EXTERN PetscErrorCode PFView(PF,PetscViewer);
 59: PETSC_STATIC_INLINE PetscErrorCode PFViewFromOptions(PF A,const char prefix[],const char name[]) {return PetscObjectViewFromOptions((PetscObject)A,prefix,name);}

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

 63: #endif