jacobi.template
|
Go to the source code of this file.
Classes | |
class | Multigrid |
The Multigrid hierarchy including meshes, vectors and matrices, prolongations is stored. More... | |
Functions | |
void | JacobiSolve (CRS_Matrix const &SK, std::vector< double > const &f, std::vector< double > &u) |
void | JacobiSmoother (Matrix const &SK, std::vector< double > const &f, std::vector< double > &u, std::vector< double > &r, int nsmooth=1, double const omega=1.0, bool zero=false) |
void | DiagPrecond (Matrix const &SK, std::vector< double > const &r, std::vector< double > &w, double const omega=1.0) |
Simple diagonale preconditioning. More... | |
void DiagPrecond | ( | Matrix const & | SK, |
std::vector< double > const & | r, | ||
std::vector< double > & | w, | ||
double const | omega = 1.0 |
||
) |
Simple diagonale preconditioning.
The residuum r
scaled by the inverse diagonal of matrĂx SK
results in the correction w
.
\( w := \omega D^{-1}*r \)
[in] | SK | matrix |
[in] | r | distributed local vector storing the residuum |
[out] | w | accumulated local vector storing the correction. |
[in] | omega | relaxation parameter. |
Definition at line 89 of file jacsolve.cpp.
void JacobiSmoother | ( | Matrix const & | SK, |
std::vector< double > const & | f, | ||
std::vector< double > & | u, | ||
std::vector< double > & | r, | ||
int | nsmooth = 1 , |
||
double const | omega = 1.0 , |
||
bool | zero = false |
||
) |
Solves linear system of equations K u
= f
via the Jacobi iteration. We use a distributed symmetric CSR matrix SK
and initial guess of the solution is set to 0.
In each smoothing step: \( \widehat{u} := u + \omega D^{-1}\left({f-K*u}\right) \)
[in] | SK | CSR matrix |
[in] | f | distributed local vector storing the right hand side |
[out] | u | accumulated local vector storing the solution. |
[in,out] | r | auxiliary local vector. |
[in] | nsmooth | number of smoothing steps. |
[in] | omega | relaxation parameter. |
[in] | zero | initial solution u is assumed to be zero. |
Definition at line 65 of file jacsolve.cpp.
void JacobiSolve | ( | CRS_Matrix const & | SK, |
std::vector< double > const & | f, | ||
std::vector< double > & | u | ||
) |
Solves linear system of equations K u
= f
via the Jacobi iteration. We use a distributed symmetric CSR matrix SK
and initial guess of the solution is set to 0.
[in] | SK | CSR matrix |
[in] | f | distributed local vector storing the right hand side |
[out] | u | accumulated local vector storing the solution. |