20 #ifndef SELDON_FILE_PRECOND_SSOR_CXX
29 nb_iter = 1; omega = 1;
30 symmetric_precond =
true;
38 return symmetric_precond;
47 symmetric_precond =
true;
56 symmetric_precond =
false;
73 nb_iter = nb_iterations;
84 omega = prec_sor.
omega;
88 #ifdef SELDON_WITH_VIRTUAL
89 template<
class T>
template<
class T0>
99 if (!symmetric_precond)
107 A.ApplySor(trans, z, r, omega, nb_iter, stage);
114 ::Solve(
const VirtualMatrix<T>& A,
const Vector<T>& r, Vector<T>& z,
bool init)
119 if (symmetric_precond)
120 A.ApplySor(SeldonNoTrans, z, r, omega, nb_iter, 0);
122 A.ApplySor(SeldonNoTrans, z, r, omega, nb_iter, 2);
130 ::TransSolve(
const VirtualMatrix<T>& A,
const Vector<T>& r, Vector<T>& z,
bool init)
135 if (symmetric_precond)
136 A.ApplySor(SeldonTrans, z, r, omega, nb_iter, 0);
138 A.ApplySor(SeldonTrans, z, r, omega, nb_iter, 3);
145 ::Solve(
const VirtualMatrix<T>& A,
const Vector<T>& r, Vector<T>& z)
147 Solve(A, r, z,
true);
154 ::TransSolve(
const VirtualMatrix<T>& A,
const Vector<T>& r, Vector<T>& z)
156 TransSolve(A, r, z,
true);
161 template<
class T>
template<
class Vector1,
class Matrix1>
163 Solve(
const Matrix1& A,
const Vector1& r, Vector1& z,
bool init_guess_null)
168 if (symmetric_precond)
169 SOR(A, z, r, omega, nb_iter, 0);
171 SOR(A, z, r, omega, nb_iter, 2);
176 template<
class T>
template<
class Vector1,
class Matrix1>
179 Vector1& z,
bool init_guess_null)
184 if (symmetric_precond)
185 SOR(SeldonTrans, A, z, r, omega, nb_iter, 0);
187 SOR(SeldonTrans, A, z, r, omega, nb_iter, 3);
195 #define SELDON_FILE_PRECOND_SSOR_CXX