1 /* $Id: bjacobi.h,v 1.24 2001/03/22 20:31:04 bsmith Exp $ */ 2 3 #if !defined(__BJACOBI_H) 4 #define __BJACOBI_H 5 /* 6 Private data for block Jacobi and block Gauss-Seidel preconditioner. 7 */ 8 #include "petscksp.h" 9 #include "src/ksp/pc/pcimpl.h" 10 11 /* 12 This data is general for all implementations 13 */ 14 typedef struct { 15 int n,n_local; /* number of blocks (global, local) */ 16 int first_local; /* number of first block on processor */ 17 PetscTruth use_true_local; /* use block from true matrix, not preconditioner matrix for local MatMult() */ 18 KSP *ksp; /* KSP contexts for blocks */ 19 void *data; /* implementation-specific data */ 20 PetscTruth same_local_solves; /* flag indicating whether all local solvers are same (used for PCView()) */ 21 int *l_lens; /* lens of each block */ 22 int *g_lens; 23 Mat tp_mat,tp_pmat; /* diagonal block of matrix for this processor */ 24 } PC_BJacobi; 25 26 /* 27 This data is specific for certain implementations 28 */ 29 30 /* This is for multiple blocks per processor */ 31 32 typedef struct { 33 Vec *x,*y; /* work vectors for solves on each block */ 34 int *starts; /* starting point of each block */ 35 Mat *mat,*pmat; /* submatrices for each block */ 36 IS *is; /* for gathering the submatrices */ 37 } PC_BJacobi_Multiblock; 38 39 /* This is for a single block per processor */ 40 typedef struct { 41 Vec x,y; 42 } PC_BJacobi_Singleblock; 43 44 #endif 45 46 47