Actual source code: petscpf.h

petsc-3.3-p7 2013-05-11
  1: /*
  2:       mathematical function module. 
  3: */
 6:  #include petscvec.h

  8: /*
  9:     PFList contains the list of preconditioners currently registered
 10:    These are added with the PFRegisterDynamic() macro
 11: */
 12: PETSC_EXTERN PetscFList PFList;

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

 17:    Level: beginner

 19: .seealso: PFSetType(), PF
 20: J*/
 21: #define PFType char*
 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,const 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 PFRegisterDestroy(void);
 49: PETSC_EXTERN PetscErrorCode PFRegisterAll(const char[]);
 50: PETSC_EXTERN PetscErrorCode PFInitializePackage(const char[]);
 51: PETSC_EXTERN PetscBool PFRegisterAllCalled;

 53: PETSC_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: PETSC_EXTERN PetscErrorCode PFDestroy(PF*);
 61: PETSC_EXTERN PetscErrorCode PFSetFromOptions(PF);
 62: PETSC_EXTERN PetscErrorCode PFGetType(PF,const PFType*);

 64: PETSC_EXTERN PetscErrorCode PFView(PF,PetscViewer);

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

 68: #endif