Actual source code: mpiaijspooles.c
1: /*
2: Provides an interface to the Spooles parallel sparse solver (MPI SPOOLES)
3: */
6: #include src/mat/impls/aij/mpi/mpiaij.h
7: #include src/mat/impls/aij/seq/spooles/spooles.h
11: PetscErrorCode MatAssemblyEnd_MPIAIJSpooles(Mat A,MatAssemblyType mode) {
13: Mat_Spooles *lu=(Mat_Spooles *)(A->spptr);
16: (*lu->MatAssemblyEnd)(A,mode);
17: lu->MatLUFactorSymbolic = A->ops->lufactorsymbolic;
18: A->ops->lufactorsymbolic = MatLUFactorSymbolic_MPIAIJSpooles;
19: return(0);
20: }
22: /* Note the Petsc r and c permutations are ignored */
25: PetscErrorCode MatLUFactorSymbolic_MPIAIJSpooles(Mat A,IS r,IS c,MatFactorInfo *info,Mat *F)
26: {
27: Mat_Spooles *lu;
28: Mat B;
33: /* Create the factorization matrix F */
34: MatCreate(A->comm,A->m,A->n,A->M,A->N,&B);
35: MatSetType(B,A->type_name);
36: MatMPIAIJSetPreallocation(B,0,PETSC_NULL,0,PETSC_NULL);
38: B->ops->lufactornumeric = MatFactorNumeric_MPIAIJSpooles;
39: B->factor = FACTOR_LU;
41: lu = (Mat_Spooles *)(B->spptr);
42: lu->options.symflag = SPOOLES_NONSYMMETRIC;
43: lu->options.pivotingflag = SPOOLES_PIVOTING;
44: lu->flg = DIFFERENT_NONZERO_PATTERN;
45: lu->options.useQR = PETSC_FALSE;
47: MPI_Comm_dup(A->comm,&(lu->comm_spooles));
49: if (!info->dtcol) {
50: lu->options.pivotingflag = SPOOLES_NO_PIVOTING;
51: }
52: *F = B;
53: return(0);
54: }