Actual source code: mpiaijspooles.c

      1: #define PETSCMAT_DLL

      3: /*
      4:    Provides an interface to the Spooles parallel sparse solver (MPI SPOOLES)
      5: */

     8:  #include src/mat/impls/aij/mpi/mpiaij.h
     9:  #include src/mat/impls/aij/seq/spooles/spooles.h

     13: PetscErrorCode MatAssemblyEnd_MPIAIJSpooles(Mat A,MatAssemblyType mode) {
     15:   Mat_Spooles *lu=(Mat_Spooles *)(A->spptr);

     18:   (*lu->MatAssemblyEnd)(A,mode);
     19:   lu->MatLUFactorSymbolic  = A->ops->lufactorsymbolic;
     20:   A->ops->lufactorsymbolic = MatLUFactorSymbolic_MPIAIJSpooles;
     21:   return(0);
     22: }

     24: /* Note the Petsc r and c permutations are ignored */
     27: PetscErrorCode MatLUFactorSymbolic_MPIAIJSpooles(Mat A,IS r,IS c,MatFactorInfo *info,Mat *F)
     28: {
     29:   Mat_Spooles *lu;
     30:   Mat         B;

     35:   /* Create the factorization matrix F */
     36:   MatCreate(A->comm,&B);
     37:   MatSetSizes(B,A->m,A->n,A->M,A->N);
     38:   MatSetType(B,A->type_name);
     39:   MatMPIAIJSetPreallocation(B,0,PETSC_NULL,0,PETSC_NULL);

     41:   B->ops->lufactornumeric = MatFactorNumeric_MPIAIJSpooles;
     42:   B->factor               = FACTOR_LU;

     44:   lu                       = (Mat_Spooles *)(B->spptr);
     45:   lu->options.symflag      = SPOOLES_NONSYMMETRIC;
     46:   lu->options.pivotingflag = SPOOLES_PIVOTING;
     47:   lu->flg                  = DIFFERENT_NONZERO_PATTERN;
     48:   lu->options.useQR        = PETSC_FALSE;

     50:   MPI_Comm_dup(A->comm,&(lu->comm_spooles));

     52:   if (!info->dtcol) {
     53:     lu->options.pivotingflag  = SPOOLES_NO_PIVOTING;
     54:   }
     55:   *F = B;
     56:   return(0);
     57: }