Actual source code: bjacobi.h

  1: /* $Id: bjacobi.h,v 1.24 2001/03/22 20:31:04 bsmith Exp $ */

  5: /*
  6:     Private data for block Jacobi and block Gauss-Seidel preconditioner.
  7: */
 8:  #include petscsles.h
 9:  #include src/sles/pc/pcimpl.h

 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:   SLES       *sles;             /* SLES 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;

 26: /*
 27:        This data is specific for certain implementations
 28: */

 30: /*  This is for multiple blocks per processor */

 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;

 39: /*  This is for a single block per processor */
 40: typedef struct {
 41:   Vec  x,y;
 42: } PC_BJacobi_Singleblock;

 44: #endif