Actual source code: aijspooles.c
1: /*$Id: aijspooles.c,v 1.10 2001/08/15 15:56:50 bsmith Exp $*/
2: /*
3: Provides an interface to the Spooles serial sparse solver
4: */
6: #include src/mat/impls/aij/seq/aij.h
8: #if defined(PETSC_HAVE_SPOOLES) && !defined(PETSC_USE_SINGLE) && !defined(PETSC_USE_COMPLEX)
9: #include src/mat/impls/aij/seq/spooles.h
11: /* Note the Petsc r and c permutations are ignored */
12: int MatLUFactorSymbolic_SeqAIJ_Spooles(Mat A,IS r,IS c,MatLUInfo *info,Mat *F)
13: {
14: Mat_Spooles *lu;
15: int ierr,m=A->m,n=A->n;
18: /* Create the factorization matrix F */
19: MatCreateSeqAIJ(A->comm,m,n,PETSC_NULL,PETSC_NULL,F);
21: (*F)->ops->lufactornumeric = MatFactorNumeric_SeqAIJ_Spooles;
22: (*F)->factor = FACTOR_LU;
24: ierr = PetscNew(Mat_Spooles,&lu);
25: (*F)->spptr = (void*)lu;
26: lu->options.symflag = SPOOLES_NONSYMMETRIC;
27: lu->options.pivotingflag = SPOOLES_PIVOTING;
28: lu->flg = DIFFERENT_NONZERO_PATTERN;
30: if (info && info->dtcol == 0.0) {
31: lu->options.pivotingflag = SPOOLES_NO_PIVOTING;
32: }
33:
34: return(0);
35: }
37: int MatUseSpooles_SeqAIJ(Mat A)
38: {
40: A->ops->lufactorsymbolic = MatLUFactorSymbolic_SeqAIJ_Spooles;
41: return(0);
42: }
44: #else
46: int MatUseSpooles_SeqAIJ(Mat A)
47: {
49: return(0);
50: }
52: #endif