Actual source code: petscpf.h

  1: /* $Id: petscpf.h,v 1.12 2001/08/06 21:19:07 bsmith Exp $ */

  3: /*
  4:       mathematical function module. 
  5: */
 8:  #include petscvec.h

 10: /*
 11:     PPetscFList contains the list of preconditioners currently registered
 12:    These are added with the PFRegisterDynamic() macro
 13: */
 14: extern PetscFList PPetscFList;

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

 19:    Level: beginner

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

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

 34:    Level: beginner

 36:   Concepts: functions

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

 42: extern int PF_COOKIE;

 44: EXTERN int PFCreate(MPI_Comm,int,int,PF*);
 45: EXTERN int PFSetType(PF,PFType,void*);
 46: EXTERN int PFSet(PF,int(*)(void*,int,PetscScalar*,PetscScalar*),int(*)(void*,Vec,Vec),int(*)(void*,PetscViewer),int(*)(void*),void*);
 47: EXTERN int PFApply(PF,int,PetscScalar*,PetscScalar*);
 48: EXTERN int PFApplyVec(PF,Vec,Vec);

 50: EXTERN int        PFRegisterDestroy(void);
 51: EXTERN int        PFRegisterAll(char*);
 52: extern PetscTruth PFRegisterAllCalled;

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

 61: EXTERN int PFDestroy(PF);
 62: EXTERN int PFSetFromOptions(PF);
 63: EXTERN int PFGetType(PF,PFType*);

 65: EXTERN int PFView(PF,PetscViewer);

 67: #define PFSetOptionsPrefix(a,s) PetscObjectSetOptionsPrefix((PetscObject)(a),s)
 68: #endif