Jacobi iterative solver for linear systems. More...
#include <jacobi.hpp>
Public Types | |
| using | OperatorType = OperatorT |
| Operator type to be solved. | |
| using | SolutionVectorType = SrcOf< OperatorType > |
| Solution vector type. | |
| using | RHSVectorType = DstOf< OperatorType > |
| Right-hand side vector type. | |
| using | ScalarType = SolutionVectorType::ScalarType |
| Scalar type for computations. | |
Public Member Functions | |
| Jacobi (const SolutionVectorType &inverse_diagonal, const int iterations, const SolutionVectorType &tmp, const ScalarType omega=1.0) | |
| Construct a Jacobi solver. | |
| void | solve_impl (OperatorType &A, SolutionVectorType &x, const RHSVectorType &b) |
| Solve the linear system using Jacobi iteration. Applies the update rule for the specified number of iterations. | |
| SolutionVectorType & | get_inverse_diagonal () |
Jacobi iterative solver for linear systems.
Satisfies the SolverLike concept (see solver.hpp). Uses a diagonal preconditioner and supports relaxation. The update rule is:
\[ x^{(k+1)} = x^{(k)} + \omega D^{-1} (b - Ax^{(k)}) \]
where \( D \) is the diagonal of \( A \) and \( \omega \) is the relaxation parameter.
| OperatorT | Operator type (must satisfy OperatorLike). |
| using terra::linalg::solvers::Jacobi< OperatorT >::OperatorType = OperatorT |
Operator type to be solved.
| using terra::linalg::solvers::Jacobi< OperatorT >::RHSVectorType = DstOf< OperatorType > |
Right-hand side vector type.
| using terra::linalg::solvers::Jacobi< OperatorT >::ScalarType = SolutionVectorType::ScalarType |
Scalar type for computations.
| using terra::linalg::solvers::Jacobi< OperatorT >::SolutionVectorType = SrcOf< OperatorType > |
Solution vector type.
|
inline |
|
inline |
|
inline |
Solve the linear system using Jacobi iteration. Applies the update rule for the specified number of iterations.
| A | Operator (matrix). |
| x | Solution vector (output). |
| b | Right-hand side vector (input). |