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: #undef __FUNCT__  
 15: int MatLUFactorSymbolic_MPIAIJ_Spooles(Mat A,IS r,IS c,MatLUInfo *info,Mat *F)
 16: {
 17:   Mat_MPIAIJ    *mat = (Mat_MPIAIJ*)A->data;
 18:   Mat_Spooles   *lu;
 19:   int           ierr;

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

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

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

 37:   if (info->dtcol == 0.0) {
 38:     lu->options.pivotingflag  = SPOOLES_NO_PIVOTING;
 39:   }

 41:   return(0);
 42: }

 44: #undef __FUNCT__  
 46: int MatUseSpooles_MPIAIJ(Mat A)
 47: {
 49:   A->ops->lufactorsymbolic = MatLUFactorSymbolic_MPIAIJ_Spooles;
 50:   return(0);
 51: }

 53: #else

 55: #undef __FUNCT__  
 57: int MatUseSpooles_MPIAIJ(Mat A)
 58: {
 60:   return(0);
 61: }

 63: #endif