Actual source code: pcimpl.h
2: #ifndef _PCIMPL_H
3: #define _PCIMPL_H
5: #include petscksp.h
6: #include petscpc.h
8: typedef struct _PCOps *PCOps;
9: struct _PCOps {
10: PetscErrorCode (*setup)(PC);
11: PetscErrorCode (*apply)(PC,Vec,Vec);
12: PetscErrorCode (*applyrichardson)(PC,Vec,Vec,Vec,PetscReal,PetscReal,PetscReal,PetscInt);
13: PetscErrorCode (*applyBA)(PC,PCSide,Vec,Vec,Vec);
14: PetscErrorCode (*applytranspose)(PC,Vec,Vec);
15: PetscErrorCode (*applyBAtranspose)(PC,PetscInt,Vec,Vec,Vec);
16: PetscErrorCode (*setfromoptions)(PC);
17: PetscErrorCode (*presolve)(PC,KSP,Vec,Vec);
18: PetscErrorCode (*postsolve)(PC,KSP,Vec,Vec);
19: PetscErrorCode (*getfactoredmatrix)(PC,Mat*);
20: PetscErrorCode (*applysymmetricleft)(PC,Vec,Vec);
21: PetscErrorCode (*applysymmetricright)(PC,Vec,Vec);
22: PetscErrorCode (*setuponblocks)(PC);
23: PetscErrorCode (*destroy)(PC);
24: PetscErrorCode (*view)(PC,PetscViewer);
25: };
27: /*
28: Preconditioner context
29: */
30: struct _p_PC {
31: PETSCHEADER(struct _PCOps);
32: PetscInt setupcalled;
33: MatStructure flag;
34: Mat mat,pmat;
35: Vec diagonalscaleright,diagonalscaleleft; /* used for time integration scaling */
36: PetscTruth diagonalscale;
37: PetscErrorCode (*modifysubmatrices)(PC,PetscInt,const IS[],const IS[],Mat[],void*); /* user provided routine */
38: void *modifysubmatricesP; /* context for user routine */
39: void *data;
40: };
45: #endif