Actual source code: pcimpl.h
1: /* $Id: pcimpl.h,v 1.31 2001/03/22 20:30:53 bsmith Exp $ */
3: #ifndef _PCIMPL
4: #define _PCIMPL
6: #include "petscksp.h"
7: #include "petscpc.h"
9: typedef struct _PCOps *PCOps;
10: struct _PCOps {
11: int (*setup)(PC);
12: int (*apply)(PC,Vec,Vec);
13: int (*applyrichardson)(PC,Vec,Vec,Vec,int);
14: int (*applyBA)(PC,int,Vec,Vec,Vec);
15: int (*applytranspose)(PC,Vec,Vec);
16: int (*applyBAtranspose)(PC,int,Vec,Vec,Vec);
17: int (*setfromoptions)(PC);
18: int (*presolve)(PC,KSP,Vec,Vec);
19: int (*postsolve)(PC,KSP,Vec,Vec);
20: int (*getfactoredmatrix)(PC,Mat*);
21: int (*applysymmetricleft)(PC,Vec,Vec);
22: int (*applysymmetricright)(PC,Vec,Vec);
23: int (*setuponblocks)(PC);
24: int (*destroy)(PC);
25: int (*view)(PC,PetscViewer);
26: };
28: /*
29: Preconditioner context
30: */
31: struct _p_PC {
32: PETSCHEADER(struct _PCOps)
33: int setupcalled;
34: MatStructure flag;
35: Mat mat,pmat;
36: Vec vec;
37: Vec diagonalscaleright,diagonalscaleleft; /* used for time integration scaling */
38: PetscTruth diagonalscale;
39: MatNullSpace nullsp;
40: int (*modifysubmatrices)(PC,int,IS*,IS*,Mat*,void*); /* user provided routine */
41: void *modifysubmatricesP; /* context for user routine */
42: void *data;
43: };
47: #endif