16 #ifndef dealii_precondition_selector_h
17 #define dealii_precondition_selector_h
31 template <
class number>
33 template <
class number>
101 template <
typename MatrixType = SparseMatrix<
double>,
102 typename VectorType = ::Vector<
double>>
116 const typename VectorType::value_type &
omega = 1.);
149 vmult(VectorType &dst,
const VectorType &src)
const;
156 Tvmult(VectorType &dst,
const VectorType &src)
const;
200 const typename VectorType::value_type
omega;
207 template <
typename MatrixType,
typename VectorType>
209 const std::string & preconditioning,
210 const typename VectorType::value_type &omega)
211 : preconditioning(preconditioning)
216 template <
typename MatrixType,
typename VectorType>
224 template <
typename MatrixType,
typename VectorType>
232 template <
typename MatrixType,
typename VectorType>
236 Assert(
A !=
nullptr, ExcNoMatrixGivenToUse());
241 template <
typename MatrixType,
typename VectorType>
245 Assert(
A !=
nullptr, ExcNoMatrixGivenToUse());
251 template <
typename MatrixType,
typename VectorType>
254 const VectorType &src)
const
256 if (preconditioning ==
"none")
262 Assert(
A !=
nullptr, ExcNoMatrixGivenToUse());
264 if (preconditioning ==
"jacobi")
266 A->precondition_Jacobi(dst, src, omega);
268 else if (preconditioning ==
"sor")
270 A->precondition_SOR(dst, src, omega);
272 else if (preconditioning ==
"ssor")
274 A->precondition_SSOR(dst, src, omega);
282 template <
typename MatrixType,
typename VectorType>
286 const VectorType &src)
const
288 if (preconditioning ==
"none")
294 Assert(
A !=
nullptr, ExcNoMatrixGivenToUse());
296 if (preconditioning ==
"jacobi")
298 A->precondition_Jacobi(dst, src, omega);
300 else if (preconditioning ==
"sor")
302 A->precondition_TSOR(dst, src, omega);
304 else if (preconditioning ==
"ssor")
306 A->precondition_SSOR(dst, src, omega);
314 template <
typename MatrixType,
typename VectorType>
318 return "none|jacobi|sor|ssor";