1: #pragma once 3: #include <petscpf.h> 4: #include <petsc/private/petscimpl.h> 5: #include <petscviewer.h> 7: PETSC_EXTERN PetscBool PFRegisterAllCalled; 8: PETSC_EXTERN PetscErrorCode PFRegisterAll(void); 10: typedef struct _PFOps *PFOps; 11: struct _PFOps { 12: PetscErrorCode (*apply)(void *, PetscInt, const PetscScalar *, PetscScalar *); 13: PetscErrorCode (*applyvec)(void *, Vec, Vec); 14: PetscErrorCode (*destroy)(void *); 15: PetscErrorCode (*view)(void *, PetscViewer); 16: PetscErrorCode (*setfromoptions)(PF, PetscOptionItems *); 17: }; 19: struct _p_PF { 20: PETSCHEADER(struct _PFOps); 21: PetscInt dimin, dimout; /* dimension of input and output spaces */ 22: void *data; 23: };