1 #include "SeldonFlag.hxx"
3 #include "SeldonSolverHeader.hxx"
4 #include "SeldonSolverInline.hxx"
7 #include "SeldonDistributedHeader.hxx"
8 #include "SeldonDistributedInline.hxx"
11 #ifndef SELDON_WITH_COMPILED_LIBRARY
12 #include "computation/solver/iterative/Iterative.cxx"
13 #include "computation/solver/preconditioner/Precond_Ssor.cxx"
18 SELDON_EXTERN
template class Iteration<Real_wp>;
24 #ifdef SELDON_WITH_MPI
31 #ifdef SELDON_WITH_PRECONDITIONING
32 SELDON_EXTERN
template class SorPreconditioner<Real_wp>;
33 SELDON_EXTERN
template class SorPreconditioner<Complex_wp >;
35 SELDON_EXTERN
template void SorPreconditioner<Real_wp>::SolveGen(
const SeldonTranspose&,
const VirtualMatrix<Real_wp>&,
const Vector<Real_wp>&, Vector<Real_wp>&,
bool);
36 SELDON_EXTERN
template void SorPreconditioner<Real_wp>::SolveGen(
const SeldonTranspose&,
const VirtualMatrix<Real_wp>&,
const Vector<Complex_wp>&, Vector<Complex_wp>&,
bool);
37 SELDON_EXTERN
template void SorPreconditioner<Complex_wp>::SolveGen(
const SeldonTranspose&,
const VirtualMatrix<Complex_wp>&,
const Vector<Complex_wp>&, Vector<Complex_wp>&,
bool);
40 SELDON_EXTERN
template int BiCg(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
41 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
43 SELDON_EXTERN
template int BiCg(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
44 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
46 SELDON_EXTERN
template int BiCgStab(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
47 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
49 SELDON_EXTERN
template int BiCgStab(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
50 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
52 SELDON_EXTERN
template int BiCgStabl(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
53 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
55 SELDON_EXTERN
template int BiCgStabl(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
56 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
58 SELDON_EXTERN
template int BiCgcr(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
59 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
61 SELDON_EXTERN
template int BiCgcr(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
62 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
64 SELDON_EXTERN
template int Cg(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
65 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
67 SELDON_EXTERN
template int Cg(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
68 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
70 SELDON_EXTERN
template int Cgne(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
71 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
73 SELDON_EXTERN
template int Cgne(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
74 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
76 SELDON_EXTERN
template int Cgs(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
77 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
79 SELDON_EXTERN
template int Cgs(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
80 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
82 SELDON_EXTERN
template int CoCg(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
83 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
85 SELDON_EXTERN
template int CoCg(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
86 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
88 SELDON_EXTERN
template int Gcr(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
89 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
91 SELDON_EXTERN
template int Gcr(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
92 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
94 #ifdef SELDON_WITH_BLAS
95 SELDON_EXTERN
template int Gmres(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
96 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
98 SELDON_EXTERN
template int Gmres(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
99 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
102 SELDON_EXTERN
template int Lsqr(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
103 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
105 SELDON_EXTERN
template int Lsqr(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
106 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
108 SELDON_EXTERN
template int MinRes(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
109 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
111 SELDON_EXTERN
template int MinRes(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
112 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
114 SELDON_EXTERN
template int QCgs(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
115 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
117 SELDON_EXTERN
template int QCgs(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
118 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
120 SELDON_EXTERN
template int Qmr(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
121 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
123 SELDON_EXTERN
template int Qmr(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
124 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
126 SELDON_EXTERN
template int QmrSym(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
127 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
129 SELDON_EXTERN
template int QmrSym(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
130 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
132 SELDON_EXTERN
template int Symmlq(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
133 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
135 SELDON_EXTERN
template int Symmlq(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
136 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
138 SELDON_EXTERN
template int TfQmr(
const VirtualMatrix<Real_wp>&, Vector<Real_wp>&,
const Vector<Real_wp>&,
139 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
141 SELDON_EXTERN
template int TfQmr(
const VirtualMatrix<Complex_wp >&, Vector<Complex_wp >&,
const Vector<Complex_wp >&,
142 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
146 #ifdef SELDON_WITH_MPI
147 SELDON_EXTERN
template int BiCg(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
148 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
150 SELDON_EXTERN
template int BiCg(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
151 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
153 SELDON_EXTERN
template int BiCgStab(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
154 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
156 SELDON_EXTERN
template int BiCgStab(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
157 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
159 SELDON_EXTERN
template int BiCgStabl(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
160 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
162 SELDON_EXTERN
template int BiCgStabl(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
163 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
165 SELDON_EXTERN
template int BiCgcr(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
166 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
168 SELDON_EXTERN
template int BiCgcr(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
169 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
171 SELDON_EXTERN
template int Cg(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
172 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
174 SELDON_EXTERN
template int Cg(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
175 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
177 SELDON_EXTERN
template int Cgne(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
178 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
180 SELDON_EXTERN
template int Cgne(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
181 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
183 SELDON_EXTERN
template int Cgs(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
184 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
186 SELDON_EXTERN
template int Cgs(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
187 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
189 SELDON_EXTERN
template int CoCg(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
190 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
192 SELDON_EXTERN
template int CoCg(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
193 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
195 SELDON_EXTERN
template int Gcr(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
196 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
198 SELDON_EXTERN
template int Gcr(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
199 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
201 #ifdef SELDON_WITH_BLAS
202 SELDON_EXTERN
template int Gmres(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
203 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
205 SELDON_EXTERN
template int Gmres(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
206 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
209 SELDON_EXTERN
template int Lsqr(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
210 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
212 SELDON_EXTERN
template int Lsqr(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
213 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
215 SELDON_EXTERN
template int MinRes(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
216 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
218 SELDON_EXTERN
template int MinRes(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
219 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
221 SELDON_EXTERN
template int QCgs(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
222 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
224 SELDON_EXTERN
template int QCgs(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
225 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
227 SELDON_EXTERN
template int Qmr(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
228 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
230 SELDON_EXTERN
template int Qmr(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
231 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
233 SELDON_EXTERN
template int QmrSym(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
234 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
236 SELDON_EXTERN
template int QmrSym(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
237 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
239 SELDON_EXTERN
template int Symmlq(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
240 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
242 SELDON_EXTERN
template int Symmlq(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
243 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);
245 SELDON_EXTERN
template int TfQmr(
const VirtualMatrix<Real_wp>&, DistributedVector<Real_wp>&,
const DistributedVector<Real_wp>&,
246 Preconditioner_Base<Real_wp>&, Iteration<Real_wp>&);
248 SELDON_EXTERN
template int TfQmr(
const VirtualMatrix<Complex_wp >&, DistributedVector<Complex_wp >&,
const DistributedVector<Complex_wp >&,
249 Preconditioner_Base<Complex_wp >&, Iteration<Real_wp>&);