Actual source code: mpisbaijspooles.c
1: /*$Id: mpisbaijspooles.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/sbaij/mpi/mpisbaij.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 permutation is ignored */
13: #undef __FUNCT__
15: int MatCholeskyFactorSymbolic_MPISBAIJ_Spooles(Mat A,IS r,PetscReal f,Mat *F)
16: {
17: Mat_MPISBAIJ *mat = (Mat_MPISBAIJ*)A->data;
18: Mat_Spooles *lu;
19: int ierr;
20:
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->choleskyfactornumeric = MatFactorNumeric_MPIAIJ_Spooles;
28: (*F)->factor = FACTOR_CHOLESKY;
30: ierr = PetscNew(Mat_Spooles,&lu);
31: (*F)->spptr = (void*)lu;
32: lu->options.symflag = SPOOLES_SYMMETRIC;
33: lu->options.pivotingflag = SPOOLES_NO_PIVOTING;
34: lu->flg = DIFFERENT_NONZERO_PATTERN;
35: lu->options.useQR = PETSC_FALSE;
37: return(0);
38: }
40: #undef __FUNCT__
42: int MatUseSpooles_MPISBAIJ(Mat A)
43: {
44: Mat_MPISBAIJ *sbaij = (Mat_MPISBAIJ*)A->data;
45: int bs = sbaij->bs;
48: if (bs > 1) SETERRQ1(1,"Block size %d not supported by Spooles",bs);
49: A->ops->choleskyfactorsymbolic = MatCholeskyFactorSymbolic_MPISBAIJ_Spooles;
50: return(0);
51: }
53: #else
55: #undef __FUNCT__
57: int MatUseSpooles_MPISBAIJ(Mat A)
58: {
60: return(0);
61: }
63: #endif