SuperLU.cpp
1 #include "SeldonFlag.hxx"
2 
3 #include "SeldonSolverHeader.hxx"
4 #include "SeldonSolverInline.hxx"
5 
6 #ifndef SELDON_WITH_COMPILED_LIBRARY
7 #include "computation/interfaces/direct/SuperLU.cxx"
8 #endif
9 
10 namespace Seldon
11 {
12  SELDON_EXTERN template class MatrixSuperLU<double>;
13  SELDON_EXTERN template class MatrixSuperLU<complex<double> >;
14 
15  SELDON_EXTERN template class MatrixSuperLU_Base<double>;
16  SELDON_EXTERN template class MatrixSuperLU_Base<complex<double> >;
17 
18  SELDON_EXTERN template void MatrixSuperLU<double>::FactorizeMatrix(Matrix<double, Symmetric, RowSymSparse>&, bool);
19  SELDON_EXTERN template void MatrixSuperLU<complex<double> >::FactorizeMatrix(Matrix<complex<double> , Symmetric, RowSymSparse>&, bool);
20  SELDON_EXTERN template void MatrixSuperLU<double>::FactorizeMatrix(Matrix<double, Symmetric, ArrayRowSymSparse>&, bool);
21  SELDON_EXTERN template void MatrixSuperLU<complex<double> >::FactorizeMatrix(Matrix<complex<double> , Symmetric, ArrayRowSymSparse>&, bool);
22  SELDON_EXTERN template void MatrixSuperLU<double>::FactorizeMatrix(Matrix<double, General, RowSparse>&, bool);
23  SELDON_EXTERN template void MatrixSuperLU<complex<double> >::FactorizeMatrix(Matrix<complex<double> , General, RowSparse>&, bool);
24  SELDON_EXTERN template void MatrixSuperLU<double>::FactorizeMatrix(Matrix<double, General, ArrayRowSparse>&, bool);
25  SELDON_EXTERN template void MatrixSuperLU<complex<double> >::FactorizeMatrix(Matrix<complex<double> , General, ArrayRowSparse>&, bool);
26 
27  SELDON_EXTERN template void MatrixSuperLU<double>::Solve(Vector<double>&);
28  SELDON_EXTERN template void MatrixSuperLU<double>::Solve(const SeldonTranspose&, Vector<double>&);
29  SELDON_EXTERN template void MatrixSuperLU<double>::Solve(const SeldonTranspose&, Matrix<double, General, ColMajor>&);
30 
31  SELDON_EXTERN template void MatrixSuperLU<complex<double> >::Solve(Vector<complex<double> >&);
32  SELDON_EXTERN template void MatrixSuperLU<complex<double> >::Solve(const SeldonTranspose&, Vector<complex<double> >&);
33  SELDON_EXTERN template void MatrixSuperLU<complex<double> >::Solve(const SeldonTranspose&, Matrix<complex<double> , General, ColMajor>&);
34 
35  SELDON_EXTERN template void GetLU(Matrix<double, Symmetric, RowSymSparse>&, MatrixSuperLU<double>&, bool);
36  SELDON_EXTERN template void GetLU(Matrix<complex<double> , Symmetric, RowSymSparse>&, MatrixSuperLU<complex<double> >&, bool);
37  SELDON_EXTERN template void GetLU(Matrix<double, Symmetric, ArrayRowSymSparse>&, MatrixSuperLU<double>&, bool);
38  SELDON_EXTERN template void GetLU(Matrix<complex<double> , Symmetric, ArrayRowSymSparse>&, MatrixSuperLU<complex<double> >&, bool);
39 
40  SELDON_EXTERN template void GetLU(Matrix<double, General, RowSparse>&, MatrixSuperLU<double>&, bool);
41  SELDON_EXTERN template void GetLU(Matrix<complex<double> , General, RowSparse>&, MatrixSuperLU<complex<double> >&, bool);
42  SELDON_EXTERN template void GetLU(Matrix<double, General, ArrayRowSparse>&, MatrixSuperLU<double>&, bool);
43  SELDON_EXTERN template void GetLU(Matrix<complex<double> , General, ArrayRowSparse>&, MatrixSuperLU<complex<double> >&, bool);
44 
45  SELDON_EXTERN template void SolveLU(MatrixSuperLU<double>&, Vector<double>&);
46  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixSuperLU<double>&, Vector<double>&);
47  SELDON_EXTERN template void SolveLU(MatrixSuperLU<double>&, Matrix<double, General, ColMajor>&);
48 
49  SELDON_EXTERN template void SolveLU(MatrixSuperLU<double>&, Vector<complex<double> >&);
50  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixSuperLU<double>&, Vector<complex<double> >&);
51 
52  SELDON_EXTERN template void SolveLU(MatrixSuperLU<complex<double> >&, Vector<double>&);
53  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixSuperLU<complex<double> >&, Vector<double>&);
54 
55  SELDON_EXTERN template void SolveLU(MatrixSuperLU<complex<double> >&, Vector<complex<double> >&);
56  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixSuperLU<complex<double> >&, Vector<complex<double> >&);
57  SELDON_EXTERN template void SolveLU(MatrixSuperLU<complex<double> >&, Matrix<complex<double> , General, ColMajor>&);
58  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixSuperLU<complex<double> >&, Matrix<complex<double> , General, ColMajor>&);
59 
60 
61 #ifdef SELDON_WITH_SUPERLU_DIST
62  SELDON_EXTERN template void MatrixSuperLU<double >
63  ::SolveDistributed(MPI_Comm&, const SeldonTranspose&, Vector<double >&, const IVect&);
64 
65  SELDON_EXTERN template void MatrixSuperLU<double >
66  ::SolveDistributed(MPI_Comm&, const SeldonTranspose&, Matrix<double, General, ColMajor>&, const IVect&);
67 
68  SELDON_EXTERN template void MatrixSuperLU<complex<double> >
69  ::SolveDistributed(MPI_Comm&, const SeldonTranspose&, Vector<complex<double> >&, const IVect&);
70 
71  SELDON_EXTERN template void MatrixSuperLU<complex<double> >
72  ::SolveDistributed(MPI_Comm&, const SeldonTranspose&, Matrix<complex<double>, General, ColMajor>&, const IVect&);
73 #endif
74 
75 }
76 
77 
78 
Seldon::MatrixSuperLU< double >::Solve
void Solve(Vector< double, VectFull, Allocator2 > &x)
Solves linear system A x = b.
Definition: SuperLU.cxx:566
Seldon::MatrixSuperLU< double >::FactorizeMatrix
void FactorizeMatrix(Matrix< T0, Prop, Storage, Allocator > &mat, bool keep_matrix=false)
factorization of matrix in double precision using SuperLU
Definition: SuperLU.cxx:460
Seldon::GetLU
void GetLU(Matrix< T0, Prop0, Storage0, Allocator0 > &A)
Returns the LU factorization of a matrix.
Definition: Functions_Matrix.cxx:2073
Seldon
Seldon namespace.
Definition: Array.cxx:24