Loading...
Searching...
No Matches
terra::linalg::solvers::Richardson< OperatorT > Class Template Reference

Richardson iterative solver for linear systems. Satisfies the SolverLike concept (see solver.hpp). Implements the update rule: More...

#include <richardson.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.
 

Public Member Functions

 Richardson (const int iterations, const double omega, const RHSVectorType &r_tmp)
 Construct a Richardson solver.
 
void solve_impl (OperatorType &A, SolutionVectorType &x, const RHSVectorType &b)
 Solve the linear system using Richardson iteration. Applies the update rule for the specified number of iterations.
 

Detailed Description

template<OperatorLike OperatorT>
class terra::linalg::solvers::Richardson< OperatorT >

Richardson iterative solver for linear systems. Satisfies the SolverLike concept (see solver.hpp). Implements the update rule:

\[ x^{(k+1)} = x^{(k)} + \omega (b - Ax^{(k)}) \]

where \( \omega \) is the relaxation parameter.

Template Parameters
OperatorTOperator type (must satisfy OperatorLike).

Member Typedef Documentation

◆ OperatorType

template<OperatorLike OperatorT>
using terra::linalg::solvers::Richardson< OperatorT >::OperatorType = OperatorT

Operator type to be solved.

◆ RHSVectorType

template<OperatorLike OperatorT>
using terra::linalg::solvers::Richardson< OperatorT >::RHSVectorType = DstOf< OperatorType >

Right-hand side vector type.

◆ SolutionVectorType

template<OperatorLike OperatorT>
using terra::linalg::solvers::Richardson< OperatorT >::SolutionVectorType = SrcOf< OperatorType >

Solution vector type.

Constructor & Destructor Documentation

◆ Richardson()

template<OperatorLike OperatorT>
terra::linalg::solvers::Richardson< OperatorT >::Richardson ( const int  iterations,
const double  omega,
const RHSVectorType r_tmp 
)
inline

Construct a Richardson solver.

Parameters
iterationsNumber of Richardson iterations to perform.
omegaRelaxation parameter.
r_tmpTemporary vector for workspace.

Member Function Documentation

◆ solve_impl()

template<OperatorLike OperatorT>
void terra::linalg::solvers::Richardson< OperatorT >::solve_impl ( OperatorType A,
SolutionVectorType x,
const RHSVectorType b 
)
inline

Solve the linear system using Richardson iteration. Applies the update rule for the specified number of iterations.

Parameters
AOperator (matrix).
xSolution vector (output).
bRight-hand side vector (input).

The documentation for this class was generated from the following file: