MatrixSparse.cpp
1 #include "SeldonFlag.hxx"
2 
3 #include "SeldonSolverHeader.hxx"
4 #include "SeldonSolverInline.hxx"
5 
6 #ifndef SELDON_WITH_COMPILED_LIBRARY
7 #include "matrix_sparse/Matrix_Sparse.cxx"
8 #include "matrix_sparse/Matrix_SymSparse.cxx"
9 #include "matrix_sparse/Matrix_ArraySparse.cxx"
10 #include "matrix/Matrix_Base.cxx"
11 #endif
12 
13 namespace Seldon
14 {
15 
16  SELDON_EXTERN template class Matrix_Sparse<int, General, RowSparse>;
17  SELDON_EXTERN template class Matrix_Sparse<int, General, ColSparse>;
18  SELDON_EXTERN template class Matrix_Sparse<Real_wp, General, RowSparse>;
19  SELDON_EXTERN template class Matrix_Sparse<Real_wp, General, ColSparse>;
20  SELDON_EXTERN template class Matrix_Sparse<Complex_wp, General, RowSparse>;
21  SELDON_EXTERN template class Matrix_Sparse<Complex_wp, General, ColSparse>;
22  SELDON_EXTERN template class Matrix<int, General, RowSparse>;
23  SELDON_EXTERN template class Matrix<int, General, ColSparse>;
24  SELDON_EXTERN template class Matrix<Real_wp, General, RowSparse>;
25  SELDON_EXTERN template class Matrix<Real_wp, General, ColSparse>;
26  SELDON_EXTERN template class Matrix<Complex_wp, General, RowSparse>;
27  SELDON_EXTERN template class Matrix<Complex_wp, General, ColSparse>;
28 
29  SELDON_EXTERN template void Matrix_Sparse<int, General, RowSparse>::Fill(const int&);
30  SELDON_EXTERN template void Matrix_Sparse<int, General, ColSparse>::Fill(const int&);
31  SELDON_EXTERN template void Matrix_Sparse<Real_wp, General, RowSparse>::Fill(const int&);
32  SELDON_EXTERN template void Matrix_Sparse<Real_wp, General, RowSparse>::Fill(const Real_wp&);
33  SELDON_EXTERN template void Matrix_Sparse<Complex_wp, General, RowSparse>::Fill(const int&);
34  SELDON_EXTERN template void Matrix_Sparse<Complex_wp, General, RowSparse>::Fill(const Real_wp&);
35  SELDON_EXTERN template void Matrix_Sparse<Complex_wp, General, RowSparse>::Fill(const Complex_wp&);
36  SELDON_EXTERN template void Matrix_Sparse<Real_wp, General, ColSparse>::Fill(const int&);
37  SELDON_EXTERN template void Matrix_Sparse<Real_wp, General, ColSparse>::Fill(const Real_wp&);
38  SELDON_EXTERN template void Matrix_Sparse<Complex_wp, General, ColSparse>::Fill(const int&);
39  SELDON_EXTERN template void Matrix_Sparse<Complex_wp, General, ColSparse>::Fill(const Real_wp&);
40  SELDON_EXTERN template void Matrix_Sparse<Complex_wp, General, ColSparse>::Fill(const Complex_wp&);
41 
42  SELDON_EXTERN template void Matrix_Sparse<int, General, RowSparse>::SetData(int, int, Vector<int>&, Vector<long>&, Vector<int>&);
43  SELDON_EXTERN template void Matrix_Sparse<int, General, ColSparse>::SetData(int, int, Vector<int>&, Vector<long>&, Vector<int>&);
44  SELDON_EXTERN template void Matrix_Sparse<Real_wp, General, RowSparse>::SetData(int, int, Vector<Real_wp>&, Vector<long>&, Vector<int>&);
45  SELDON_EXTERN template void Matrix_Sparse<Complex_wp, General, RowSparse>::SetData(int, int, Vector<Complex_wp>&, Vector<long>&, Vector<int>&);
46  SELDON_EXTERN template void Matrix_Sparse<Real_wp, General, ColSparse>::SetData(int, int, Vector<Real_wp>&, Vector<long>&, Vector<int>&);
47  SELDON_EXTERN template void Matrix_Sparse<Complex_wp, General, ColSparse>::SetData(int, int, Vector<Complex_wp>&, Vector<long>&, Vector<int>&);
48 
49  SELDON_EXTERN template class Matrix_SymSparse<int, Symmetric, RowSymSparse>;
50  SELDON_EXTERN template class Matrix_SymSparse<Real_wp, Symmetric, RowSymSparse>;
51  SELDON_EXTERN template class Matrix_SymSparse<Complex_wp, Symmetric, RowSymSparse>;
52  SELDON_EXTERN template class Matrix<Real_wp, Symmetric, RowSymSparse>;
53  SELDON_EXTERN template class Matrix<Complex_wp, Symmetric, RowSymSparse>;
54 
55  SELDON_EXTERN template void Matrix_SymSparse<int, Symmetric, RowSymSparse>::Fill(const int&);
56  SELDON_EXTERN template void Matrix_SymSparse<Real_wp, Symmetric, RowSymSparse>::Fill(const int&);
57  SELDON_EXTERN template void Matrix_SymSparse<Real_wp, Symmetric, RowSymSparse>::Fill(const Real_wp&);
58  SELDON_EXTERN template void Matrix_SymSparse<Complex_wp, Symmetric, RowSymSparse>::Fill(const int&);
59  SELDON_EXTERN template void Matrix_SymSparse<Complex_wp, Symmetric, RowSymSparse>::Fill(const Real_wp&);
60  SELDON_EXTERN template void Matrix_SymSparse<Complex_wp, Symmetric, RowSymSparse>::Fill(const Complex_wp&);
61 
62  SELDON_EXTERN template void Matrix_SymSparse<int, Symmetric, RowSymSparse>::SetData(int, int, Vector<int>&, Vector<long>&, Vector<int>&);
63  SELDON_EXTERN template void Matrix_SymSparse<Real_wp, Symmetric, RowSymSparse>::SetData(int, int, Vector<Real_wp>&, Vector<long>&, Vector<int>&);
64  SELDON_EXTERN template void Matrix_SymSparse<Complex_wp, Symmetric, RowSymSparse>::SetData(int, int, Vector<Complex_wp>&, Vector<long>&, Vector<int>&);
65 
66  SELDON_EXTERN template class Matrix_ArraySparse<Real_wp, General, ArrayRowSparse>;
67  SELDON_EXTERN template class Matrix_ArraySparse<Complex_wp, General, ArrayRowSparse>;
68  SELDON_EXTERN template class Matrix<Real_wp, General, ArrayRowSparse>;
69  SELDON_EXTERN template class Matrix<Complex_wp, General, ArrayRowSparse>;
70 
71  SELDON_EXTERN template void Matrix_ArraySparse<Real_wp, General, ArrayRowSparse>::Fill(const int&);
72  SELDON_EXTERN template void Matrix_ArraySparse<Real_wp, General, ArrayRowSparse>::Fill(const Real_wp&);
73  SELDON_EXTERN template void Matrix_ArraySparse<Real_wp, General, ArrayRowSparse>::RemoveSmallEntry(const Real_wp&);
74  SELDON_EXTERN template void Matrix_ArraySparse<Complex_wp, General, ArrayRowSparse>::Fill(const int&);
75  SELDON_EXTERN template void Matrix_ArraySparse<Complex_wp, General, ArrayRowSparse>::Fill(const Real_wp&);
76  SELDON_EXTERN template void Matrix_ArraySparse<Complex_wp, General, ArrayRowSparse>::Fill(const Complex_wp&);
77  SELDON_EXTERN template void Matrix_ArraySparse<Complex_wp, General, ArrayRowSparse>::RemoveSmallEntry(const Real_wp&);
78 
79 
80  SELDON_EXTERN template class Matrix_ArraySparse<Real_wp, General, ArrayColSparse>;
81  SELDON_EXTERN template class Matrix_ArraySparse<Complex_wp, General, ArrayColSparse>;
82  SELDON_EXTERN template class Matrix<Real_wp, General, ArrayColSparse>;
83  SELDON_EXTERN template class Matrix<Complex_wp, General, ArrayColSparse>;
84 
85  SELDON_EXTERN template void Matrix_ArraySparse<Real_wp, General, ArrayColSparse>::Fill(const int&);
86  SELDON_EXTERN template void Matrix_ArraySparse<Real_wp, General, ArrayColSparse>::Fill(const Real_wp&);
87  SELDON_EXTERN template void Matrix_ArraySparse<Real_wp, General, ArrayColSparse>::RemoveSmallEntry(const Real_wp&);
88  SELDON_EXTERN template void Matrix_ArraySparse<Complex_wp, General, ArrayColSparse>::Fill(const int&);
89  SELDON_EXTERN template void Matrix_ArraySparse<Complex_wp, General, ArrayColSparse>::Fill(const Real_wp&);
90  SELDON_EXTERN template void Matrix_ArraySparse<Complex_wp, General, ArrayColSparse>::Fill(const Complex_wp&);
91  SELDON_EXTERN template void Matrix_ArraySparse<Complex_wp, General, ArrayColSparse>::RemoveSmallEntry(const Real_wp&);
92 
93  SELDON_EXTERN template class Matrix_ArraySparse<Real_wp, Symmetric, ArrayRowSymSparse>;
94  SELDON_EXTERN template class Matrix_ArraySparse<Complex_wp, Symmetric, ArrayRowSymSparse>;
95  SELDON_EXTERN template class Matrix<Real_wp, Symmetric, ArrayRowSymSparse>;
96  SELDON_EXTERN template class Matrix<Complex_wp, Symmetric, ArrayRowSymSparse>;
97 
98  SELDON_EXTERN template void Matrix_ArraySparse<Real_wp, Symmetric, ArrayRowSymSparse>::Fill(const int&);
99  SELDON_EXTERN template void Matrix_ArraySparse<Real_wp, Symmetric, ArrayRowSymSparse>::Fill(const Real_wp&);
100  SELDON_EXTERN template void Matrix_ArraySparse<Real_wp, Symmetric, ArrayRowSymSparse>::RemoveSmallEntry(const Real_wp&);
101  SELDON_EXTERN template void Matrix_ArraySparse<Complex_wp, Symmetric, ArrayRowSymSparse>::Fill(const int&);
102  SELDON_EXTERN template void Matrix_ArraySparse<Complex_wp, Symmetric, ArrayRowSymSparse>::Fill(const Real_wp&);
103  SELDON_EXTERN template void Matrix_ArraySparse<Complex_wp, Symmetric, ArrayRowSymSparse>::Fill(const Complex_wp&);
104  SELDON_EXTERN template void Matrix_ArraySparse<Complex_wp, Symmetric, ArrayRowSymSparse>::RemoveSmallEntry(const Real_wp&);
105 
106 
107  SELDON_EXTERN template ostream& operator<<(ostream&, const Matrix<Real_wp, General, RowSparse>&);
108  SELDON_EXTERN template ostream& operator<<(ostream&, const Matrix<Real_wp, General, ArrayRowSparse>&);
109  SELDON_EXTERN template ostream& operator<<(ostream&, const Matrix<Real_wp, Symmetric, RowSymSparse>&);
110  SELDON_EXTERN template ostream& operator<<(ostream&, const Matrix<Real_wp, Symmetric, ArrayRowSymSparse>&);
111 
112  SELDON_EXTERN template ostream& operator<<(ostream&, const Matrix<Complex_wp, General, RowSparse>&);
113  SELDON_EXTERN template ostream& operator<<(ostream&, const Matrix<Complex_wp, General, ArrayRowSparse>&);
114  SELDON_EXTERN template ostream& operator<<(ostream&, const Matrix<Complex_wp, Symmetric, RowSymSparse>&);
115  SELDON_EXTERN template ostream& operator<<(ostream&, const Matrix<Complex_wp, Symmetric, ArrayRowSymSparse>&);
116 
117 }
Seldon::Matrix_Sparse::Fill
void Fill()
Fills the non-zero entries with 0, 1, 2, ...
Definition: Matrix_Sparse.cxx:1196
Seldon::Matrix_SymSparse::Fill
void Fill()
Fills the non-zero entries with 0, 1, 2, ...
Definition: Matrix_SymSparse.cxx:1161
Seldon::Matrix_Sparse::SetData
void SetData(int i, int j, Vector< T, Storage0, Allocator0 > &values, Vector< long, Storage1, Allocator1 > &ptr, Vector< int, Storage2, Allocator2 > &ind)
Redefines the matrix.
Definition: Matrix_Sparse.cxx:241
Seldon::Matrix_ArraySparse::RemoveSmallEntry
void RemoveSmallEntry(const T0 &epsilon)
Removes small coefficients from entries.
Definition: Matrix_ArraySparse.cxx:173
Seldon::Matrix_ArraySparse::Fill
void Fill()
Non-zero entries are filled with values 0, 1, 2, 3 ...
Definition: Matrix_ArraySparse.cxx:206
Seldon::Matrix_SymSparse::SetData
void SetData(int i, int j, Vector< T, Storage0, Allocator0 > &values, Vector< long, Storage1, Allocator1 > &ptr, Vector< int, Storage2, Allocator2 > &ind)
Redefines the matrix.
Definition: Matrix_SymSparse.cxx:226
Seldon
Seldon namespace.
Definition: Array.cxx:24
Seldon::operator<<
ostream & operator<<(ostream &out, const Array< T, N, Allocator > &A)
operator<< overloaded for a 3D array.
Definition: Array.cxx:1617