Actual source code: petscpf.h

  1: /*
  2:       mathematical function module. 
  3: */
 6:  #include petscvec.h

  9: /*
 10:     PPetscFList contains the list of preconditioners currently registered
 11:    These are added with the PFRegisterDynamic() macro
 12: */

 15: /*E
 16:     PFType - Type of PETSc mathematical function, a string name

 18:    Level: beginner

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

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

 33:    Level: beginner

 35:   Concepts: functions

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


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

 49: EXTERN PetscErrorCode         PFRegisterDestroy(void);
 50: EXTERN PetscErrorCode         PFRegisterAll(const char[]);

 53: EXTERN PetscErrorCode  PFRegister(const char[],const char[],const char[],PetscErrorCode (*)(PF,void*));
 54: #if defined(PETSC_USE_DYNAMIC_LIBRARIES)
 55: #define PFRegisterDynamic(a,b,c,d) PFRegister(a,b,c,0)
 56: #else
 57: #define PFRegisterDynamic(a,b,c,d) PFRegister(a,b,c,d)
 58: #endif

 60: EXTERN PetscErrorCode  PFDestroy(PF);
 61: EXTERN PetscErrorCode  PFSetFromOptions(PF);
 62: EXTERN PetscErrorCode  PFGetType(PF,PFType*);

 64: EXTERN PetscErrorCode  PFView(PF,PetscViewer);

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

 69: #endif