Pastix.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/Pastix.cxx"
8 #endif
9 
10 namespace Seldon
11 {
12  SELDON_EXTERN template class MatrixPastix<double>;
13  SELDON_EXTERN template class MatrixPastix<complex<double> >;
14 
15  SELDON_EXTERN template void MatrixPastix<double>::FindOrdering(Matrix<double, Symmetric, RowSymSparse>&, IVect&, bool);
16  SELDON_EXTERN template void MatrixPastix<complex<double> >::FindOrdering(Matrix<complex<double> , Symmetric, RowSymSparse>&, IVect&, bool);
17  SELDON_EXTERN template void MatrixPastix<double>::FindOrdering(Matrix<double, Symmetric, ArrayRowSymSparse>&, IVect&, bool);
18  SELDON_EXTERN template void MatrixPastix<complex<double> >::FindOrdering(Matrix<complex<double> , Symmetric, ArrayRowSymSparse>&, IVect&, bool);
19  SELDON_EXTERN template void MatrixPastix<double>::FindOrdering(Matrix<double, General, RowSparse>&, IVect&, bool);
20  SELDON_EXTERN template void MatrixPastix<complex<double> >::FindOrdering(Matrix<complex<double> , General, RowSparse>&, IVect&, bool);
21  SELDON_EXTERN template void MatrixPastix<double>::FindOrdering(Matrix<double, General, ArrayRowSparse>&, IVect&, bool);
22  SELDON_EXTERN template void MatrixPastix<complex<double> >::FindOrdering(Matrix<complex<double> , General, ArrayRowSparse>&, IVect&, bool);
23 
24  SELDON_EXTERN template void MatrixPastix<double>::FactorizeMatrix(Matrix<double, Symmetric, RowSymSparse>&, bool);
25  SELDON_EXTERN template void MatrixPastix<complex<double> >::FactorizeMatrix(Matrix<complex<double> , Symmetric, RowSymSparse>&, bool);
26  SELDON_EXTERN template void MatrixPastix<double>::FactorizeMatrix(Matrix<double, Symmetric, ArrayRowSymSparse>&, bool);
27  SELDON_EXTERN template void MatrixPastix<complex<double> >::FactorizeMatrix(Matrix<complex<double> , Symmetric, ArrayRowSymSparse>&, bool);
28  SELDON_EXTERN template void MatrixPastix<double>::FactorizeMatrix(Matrix<double, General, RowSparse>&, bool);
29  SELDON_EXTERN template void MatrixPastix<complex<double> >::FactorizeMatrix(Matrix<complex<double> , General, RowSparse>&, bool);
30  SELDON_EXTERN template void MatrixPastix<double>::FactorizeMatrix(Matrix<double, General, ArrayRowSparse>&, bool);
31  SELDON_EXTERN template void MatrixPastix<complex<double> >::FactorizeMatrix(Matrix<complex<double> , General, ArrayRowSparse>&, bool);
32 
33  SELDON_EXTERN template void MatrixPastix<double>::Solve(Vector<double>&);
34  SELDON_EXTERN template void MatrixPastix<double>::Solve(const SeldonTranspose&, Vector<double>&);
35  SELDON_EXTERN template void MatrixPastix<double>::Solve(const SeldonTranspose&, Matrix<double, General, ColMajor>&);
36 
37  SELDON_EXTERN template void MatrixPastix<complex<double> >::Solve(Vector<complex<double> >&);
38  SELDON_EXTERN template void MatrixPastix<complex<double> >::Solve(const SeldonTranspose&, Vector<complex<double> >&);
39  SELDON_EXTERN template void MatrixPastix<complex<double> >::Solve(const SeldonTranspose&, Matrix<complex<double> , General, ColMajor>&);
40 
41  SELDON_EXTERN template void GetLU(Matrix<double, Symmetric, RowSymSparse>&, MatrixPastix<double>&, bool);
42  SELDON_EXTERN template void GetLU(Matrix<complex<double> , Symmetric, RowSymSparse>&, MatrixPastix<complex<double> >&, bool);
43  SELDON_EXTERN template void GetLU(Matrix<double, Symmetric, ArrayRowSymSparse>&, MatrixPastix<double>&, bool);
44  SELDON_EXTERN template void GetLU(Matrix<complex<double> , Symmetric, ArrayRowSymSparse>&, MatrixPastix<complex<double> >&, bool);
45 
46  SELDON_EXTERN template void GetLU(Matrix<double, General, RowSparse>&, MatrixPastix<double>&, bool);
47  SELDON_EXTERN template void GetLU(Matrix<complex<double> , General, RowSparse>&, MatrixPastix<complex<double> >&, bool);
48  SELDON_EXTERN template void GetLU(Matrix<double, General, ArrayRowSparse>&, MatrixPastix<double>&, bool);
49  SELDON_EXTERN template void GetLU(Matrix<complex<double> , General, ArrayRowSparse>&, MatrixPastix<complex<double> >&, bool);
50 
51  SELDON_EXTERN template void SolveLU(MatrixPastix<double>&, Vector<double>&);
52  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixPastix<double>&, Vector<double>&);
53  SELDON_EXTERN template void SolveLU(MatrixPastix<double>&, Matrix<double, General, ColMajor>&);
54 
55  SELDON_EXTERN template void SolveLU(MatrixPastix<double>&, Vector<complex<double> >&);
56  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixPastix<double>&, Vector<complex<double> >&);
57 
58  SELDON_EXTERN template void SolveLU(MatrixPastix<complex<double> >&, Vector<double>&);
59  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixPastix<complex<double> >&, Vector<double>&);
60 
61  SELDON_EXTERN template void SolveLU(MatrixPastix<complex<double> >&, Vector<complex<double> >&);
62  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixPastix<complex<double> >&, Vector<complex<double> >&);
63  SELDON_EXTERN template void SolveLU(MatrixPastix<complex<double> >&, Matrix<complex<double> , General, ColMajor>&);
64  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, MatrixPastix<complex<double> >&, Matrix<complex<double> , General, ColMajor>&);
65 
66 
67  SELDON_EXTERN template void GetCholesky(Matrix<double, Symmetric, ArrayRowSymSparse>&, MatrixPastix<double>&, bool);
68  SELDON_EXTERN template void GetCholesky(Matrix<double, Symmetric, RowSymSparse>&, MatrixPastix<double>&, bool);
69 
70  SELDON_EXTERN template void SolveCholesky(const SeldonTranspose&, MatrixPastix<double>&, Vector<double>&);
71  SELDON_EXTERN template void MltCholesky(const SeldonTranspose&, MatrixPastix<double>&, Vector<double>&);
72 
73 
74 #ifdef SELDON_WITH_MPI
75  SELDON_EXTERN template void MatrixPastix<double >
76  ::SolveDistributed(MPI_Comm&, const SeldonTranspose&, Vector<double >&, const IVect&);
77 
78  SELDON_EXTERN template void MatrixPastix<double >
79  ::SolveDistributed(MPI_Comm&, const SeldonTranspose&,
80  Matrix<double, General, ColMajor>&, const Vector<int>&);
81 
82  SELDON_EXTERN template void MatrixPastix<complex<double> >
83  ::SolveDistributed(MPI_Comm&, const SeldonTranspose&, Vector<complex<double> >&, const IVect&);
84 
85  SELDON_EXTERN template void MatrixPastix<complex<double> >
86  ::SolveDistributed(MPI_Comm&, const SeldonTranspose&,
87  Matrix<complex<double>, General, ColMajor>&, const Vector<int>&);
88 
89  SELDON_EXTERN template void MatrixPastix<double >
90  ::MltDistributed(MPI_Comm&, const SeldonTranspose&, Vector<double >&, const IVect&);
91 
92  SELDON_EXTERN template void MatrixPastix<double >
93  ::MltDistributed(MPI_Comm&, const SeldonTranspose&,
94  Matrix<double, General, ColMajor>&, const Vector<int>&);
95 
96  SELDON_EXTERN template void MatrixPastix<complex<double> >
97  ::MltDistributed(MPI_Comm&, const SeldonTranspose&, Vector<complex<double> >&, const IVect&);
98 
99  SELDON_EXTERN template void MatrixPastix<complex<double> >
100  ::MltDistributed(MPI_Comm&, const SeldonTranspose&,
101  Matrix<complex<double>, General, ColMajor>&, const Vector<int>&);
102 
103 #endif
104 
105 }
106 
107 
108 
Seldon::MatrixPastix::MltDistributed
void MltDistributed(MPI_Comm &comm_facto, const SeldonTranspose &TransA, Vector< T, VectFull, Allocator2 > &x, const Vector< int > &glob_num)
computes L x or L^T x
Definition: Pastix.cxx:622
Seldon::MatrixPastix::Solve
void Solve(Vector< T, VectFull, Allocator2 > &x)
solving A x = b (A is already factorized)
Definition: Pastix.cxx:360
Seldon::GetLU
void GetLU(Matrix< T0, Prop0, Storage0, Allocator0 > &A)
Returns the LU factorization of a matrix.
Definition: Functions_Matrix.cxx:2073
Seldon::MatrixPastix::FactorizeMatrix
void FactorizeMatrix(Matrix< T0, General, Storage, Allocator > &mat, bool keep_matrix=false)
Factorization of unsymmetric matrix.
Definition: Pastix.cxx:223
Seldon::MatrixPastix::FindOrdering
void FindOrdering(Matrix< T0, Prop, Storage, Allocator > &mat, Vector< Tint > &numbers, bool keep_matrix=false)
Returning ordering found by Scotch.
Definition: Pastix.cxx:197
Seldon::MatrixPastix::SolveDistributed
void SolveDistributed(MPI_Comm &comm_facto, const SeldonTranspose &TransA, Vector< T, VectFull, Allocator2 > &x, const Vector< int > &glob_num)
solves A x = b or A^T x = b in parallel
Definition: Pastix.cxx:561
Seldon
Seldon namespace.
Definition: Array.cxx:24