Actual source code: mpiaijspooles.c

  1: /*$Id: mpiaijspooles.c,v 1.10 2001/08/15 15:56:50 bsmith Exp $*/
  2: /* 
  3:    Provides an interface to the Spooles parallel sparse solver (MPI SPOOLES)
  4: */


 7:  #include src/mat/impls/aij/mpi/mpiaij.h

  9: #if defined(PETSC_HAVE_SPOOLES) && !defined(PETSC_USE_SINGLE) && !defined(PETSC_USE_COMPLEX)
 10:  #include src/mat/impls/aij/seq/spooles.h

 12: /* Note the Petsc r and c permutations are ignored */
 13: int MatLUFactorSymbolic_MPIAIJ_Spooles(Mat A,IS r,IS c,MatLUInfo *info,Mat *F)
 14: {
 15:   Mat_MPIAIJ    *mat = (Mat_MPIAIJ*)A->data;
 16:   Mat_Spooles   *lu;
 17:   int           ierr,M=A->M,N=A->N;

 20:   A->ops->lufactornumeric = MatFactorNumeric_MPIAIJ_Spooles;

 22:   /* Create the factorization matrix F */
 23:   MatCreateMPIAIJ(A->comm,PETSC_DECIDE,PETSC_DECIDE,M,N,0,PETSC_NULL,0,PETSC_NULL,F);
 24: 
 25:   (*F)->ops->lufactornumeric = MatFactorNumeric_MPIAIJ_Spooles;
 26:   (*F)->factor               = FACTOR_LU;

 28:   ierr                     = PetscNew(Mat_Spooles,&lu);
 29:   (*F)->spptr              = (void*)lu;
 30:   lu->options.symflag      = SPOOLES_NONSYMMETRIC;
 31:   lu->options.pivotingflag = SPOOLES_PIVOTING;
 32:   lu->flg                  = DIFFERENT_NONZERO_PATTERN;

 34:   if (info && info->dtcol == 0.0) {
 35:     lu->options.pivotingflag  = SPOOLES_NO_PIVOTING;
 36:   }

 38:   return(0);
 39: }

 41: int MatUseSpooles_MPIAIJ(Mat A)
 42: {
 44:   A->ops->lufactorsymbolic = MatLUFactorSymbolic_MPIAIJ_Spooles;
 45:   return(0);
 46: }

 48: #else

 50: int MatUseSpooles_MPIAIJ(Mat A)
 51: {
 53:   return(0);
 54: }

 56: #endif