SparseDirectSolver.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/SparseDirectSolver.cxx"
8 #endif
9 
10 namespace Seldon
11 {
12  SELDON_EXTERN template class SparseDirectSolver<Real_wp>;
13  SELDON_EXTERN template class SparseDirectSolver<Complex_wp>;
14 
15  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::ComputeOrdering(Matrix<Real_wp, Symmetric, RowSymSparse>&);
16  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::ComputeOrdering(Matrix<Complex_wp, Symmetric, RowSymSparse>&);
17  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::ComputeOrdering(Matrix<Real_wp, Symmetric, ArrayRowSymSparse>&);
18  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::ComputeOrdering(Matrix<Complex_wp, Symmetric, ArrayRowSymSparse>&);
19  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::ComputeOrdering(Matrix<Real_wp, General, RowSparse>&);
20  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::ComputeOrdering(Matrix<Complex_wp, General, RowSparse>&);
21  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::ComputeOrdering(Matrix<Real_wp, General, ArrayRowSparse>&);
22  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::ComputeOrdering(Matrix<Complex_wp, General, ArrayRowSparse>&);
23 
24  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::Factorize(Matrix<Real_wp, Symmetric, RowSymSparse>&, bool);
25  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::Factorize(Matrix<Complex_wp, Symmetric, RowSymSparse>&, bool);
26  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::Factorize(Matrix<Real_wp, Symmetric, ArrayRowSymSparse>&, bool);
27  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::Factorize(Matrix<Complex_wp, Symmetric, ArrayRowSymSparse>&, bool);
28  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::Factorize(Matrix<Real_wp, General, RowSparse>&, bool);
29  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::Factorize(Matrix<Complex_wp, General, RowSparse>&, bool);
30  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::Factorize(Matrix<Real_wp, General, ArrayRowSparse>&, bool);
31  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::Factorize(Matrix<Complex_wp, General, ArrayRowSparse>&, bool);
32 
33  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::PerformAnalysis(Matrix<Real_wp, Symmetric, RowSymSparse>&);
34  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::PerformAnalysis(Matrix<Complex_wp, Symmetric, RowSymSparse>&);
35  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::PerformAnalysis(Matrix<Real_wp, General, RowSparse>&);
36  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::PerformAnalysis(Matrix<Complex_wp, General, RowSparse>&);
37 
38  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::PerformAnalysis(Matrix<Real_wp, Symmetric, ArrayRowSymSparse>&);
39  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::PerformAnalysis(Matrix<Complex_wp, Symmetric, ArrayRowSymSparse>&);
40  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::PerformAnalysis(Matrix<Real_wp, General, ArrayRowSparse>&);
41  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::PerformAnalysis(Matrix<Complex_wp, General, ArrayRowSparse>&);
42 
43  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::PerformFactorization(Matrix<Real_wp, Symmetric, RowSymSparse>&);
44  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::PerformFactorization(Matrix<Complex_wp, Symmetric, RowSymSparse>&);
45  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::PerformFactorization(Matrix<Real_wp, General, RowSparse>&);
46  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::PerformFactorization(Matrix<Complex_wp, General, RowSparse>&);
47 
48  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::PerformFactorization(Matrix<Real_wp, Symmetric, ArrayRowSymSparse>&);
49  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::PerformFactorization(Matrix<Complex_wp, Symmetric, ArrayRowSymSparse>&);
50  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::PerformFactorization(Matrix<Real_wp, General, ArrayRowSparse>&);
51  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::PerformFactorization(Matrix<Complex_wp, General, ArrayRowSparse>&);
52 
53 #ifdef SELDON_WITH_MPI
54  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::FactorizeDistributed(MPI_Comm&, Vector<long>&, Vector<int>&,
55  Vector<Real_wp>&, const IVect&, bool, bool);
56 
57  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::FactorizeDistributed(MPI_Comm&, Vector<long>&, Vector<int>&,
58  Vector<Complex_wp>&, const IVect&, bool, bool);
59 
60  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::FactorizeDistributed(MPI_Comm&, Vector<int64_t>&, Vector<int64_t>&,
61  Vector<Real_wp>&, const IVect&, bool, bool);
62 
63  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::FactorizeDistributed(MPI_Comm&, Vector<int64_t>&, Vector<int64_t>&,
64  Vector<Complex_wp>&, const IVect&, bool, bool);
65 
66  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::PerformAnalysisDistributed(MPI_Comm&, Vector<long>&, Vector<int>&,
67  Vector<Real_wp>&, const IVect&, bool, bool);
68 
69  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::PerformAnalysisDistributed(MPI_Comm&, Vector<long>&, Vector<int>&,
70  Vector<Complex_wp>&, const IVect&, bool, bool);
71 
72  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::PerformAnalysisDistributed(MPI_Comm&, Vector<int64_t>&, Vector<int64_t>&,
73  Vector<Real_wp>&, const IVect&, bool, bool);
74 
75  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::PerformAnalysisDistributed(MPI_Comm&, Vector<int64_t>&, Vector<int64_t>&,
76  Vector<Complex_wp>&, const IVect&, bool, bool);
77 
78  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::PerformFactorizationDistributed(MPI_Comm&, Vector<long>&, Vector<int>&,
79  Vector<Real_wp>&, const IVect&, bool, bool);
80 
81  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::PerformFactorizationDistributed(MPI_Comm&, Vector<long>&, Vector<int>&,
82  Vector<Complex_wp>&, const IVect&, bool, bool);
83 
84  SELDON_EXTERN template void SparseDirectSolver<Real_wp>::PerformFactorizationDistributed(MPI_Comm&, Vector<int64_t>&, Vector<int64_t>&,
85  Vector<Real_wp>&, const IVect&, bool, bool);
86 
87  SELDON_EXTERN template void SparseDirectSolver<Complex_wp>::PerformFactorizationDistributed(MPI_Comm&, Vector<int64_t>&, Vector<int64_t>&,
88  Vector<Complex_wp>&, const IVect&, bool, bool);
89 
90  SELDON_EXTERN template void SolveLU_Distributed(MPI_Comm&, const SeldonTranspose&, SparseDirectSolver<Real_wp>&, Vector<Real_wp>&, Vector<int>&);
91  SELDON_EXTERN template void SolveLU_Distributed(MPI_Comm&, const SeldonTranspose&, SparseDirectSolver<Real_wp>&, Vector<Complex_wp>&, Vector<int>&);
92  SELDON_EXTERN template void SolveLU_Distributed(MPI_Comm&, const SeldonTranspose&, SparseDirectSolver<Complex_wp>&, Vector<Real_wp>&, Vector<int>&);
93  SELDON_EXTERN template void SolveLU_Distributed(MPI_Comm&, const SeldonTranspose&, SparseDirectSolver<Complex_wp>&, Vector<Complex_wp>&, Vector<int>&);
94 
95  SELDON_EXTERN template void SolveLU_Distributed(MPI_Comm&, const SeldonTranspose&, SparseDirectSolver<Real_wp>&, Matrix<Real_wp, General, ColMajor>&, Vector<int>&);
96  SELDON_EXTERN template void SolveLU_Distributed(MPI_Comm&, const SeldonTranspose&, SparseDirectSolver<Real_wp>&, Matrix<Complex_wp, General, ColMajor>&, Vector<int>&);
97  SELDON_EXTERN template void SolveLU_Distributed(MPI_Comm&, const SeldonTranspose&, SparseDirectSolver<Complex_wp>&, Matrix<Real_wp, General, ColMajor>&, Vector<int>&);
98  SELDON_EXTERN template void SolveLU_Distributed(MPI_Comm&, const SeldonTranspose&, SparseDirectSolver<Complex_wp>&, Matrix<Complex_wp, General, ColMajor>&, Vector<int>&);
99 #endif
100 
101  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, SparseDirectSolver<Real_wp>&, Vector<Real_wp>&);
102  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, SparseDirectSolver<Real_wp>&, Vector<Complex_wp>&);
103  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, SparseDirectSolver<Complex_wp>&, Vector<Real_wp>&);
104  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, SparseDirectSolver<Complex_wp>&, Vector<Complex_wp>&);
105 
106  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, SparseDirectSolver<Real_wp>&, Matrix<Real_wp, General, ColMajor>&);
107  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, SparseDirectSolver<Real_wp>&, Matrix<Complex_wp, General, ColMajor>&);
108  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, SparseDirectSolver<Complex_wp>&, Matrix<Real_wp, General, ColMajor>&);
109  SELDON_EXTERN template void SolveLU(const SeldonTranspose&, SparseDirectSolver<Complex_wp>&, Matrix<Complex_wp, General, ColMajor>&);
110 
111 }
112 
113 
114 
Seldon::SparseDirectSolver::Factorize
void Factorize(Matrix< T, Prop, Storage, Allocator > &A, bool keep_matrix=false)
factorisation of matrix A
Definition: SparseDirectSolver.cxx:503
Seldon::SparseDirectSolver::ComputeOrdering
void ComputeOrdering(Matrix< T0, Prop, Storage, Alloc > &A)
computation of the permutation vector in order to reduce fill-in
Definition: SparseDirectSolver.cxx:367
Seldon::SparseDirectSolver::PerformAnalysis
void PerformAnalysis(Matrix< T, Prop, Storage, Allocator > &A)
Performs the analysis of the matrix before numerical factorization.
Definition: SparseDirectSolver.cxx:611
Seldon::SparseDirectSolver::PerformFactorization
void PerformFactorization(Matrix< T, Prop, Storage, Allocator > &A)
Performs the numerical factorization.
Definition: SparseDirectSolver.cxx:637
Seldon
Seldon namespace.
Definition: Array.cxx:24