13template < OperatorLike OperatorT >
29 : iterations_( iterations )
41 for (
int iteration = 0; iteration < iterations_; ++iteration )
44 lincomb( x, { 1.0, omega_, -omega_ }, { x, b, r_ } );
55static_assert( SolverLike< Richardson< linalg::detail::DummyConcreteOperator > > );
Richardson iterative solver for linear systems. Satisfies the SolverLike concept (see solver....
Definition richardson.hpp:15
SrcOf< OperatorType > SolutionVectorType
Solution vector type.
Definition richardson.hpp:20
OperatorT OperatorType
Operator type to be solved.
Definition richardson.hpp:18
Richardson(const int iterations, const double omega, const RHSVectorType &r_tmp)
Construct a Richardson solver.
Definition richardson.hpp:28
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 ...
Definition richardson.hpp:39
DstOf< OperatorType > RHSVectorType
Right-hand side vector type.
Definition richardson.hpp:22
Definition block_preconditioner_2x2.hpp:7
void lincomb(Vector &y, const std::vector< ScalarOf< Vector > > &c, const std::vector< Vector > &x, const ScalarOf< Vector > &c0)
Compute a linear combination of vectors. Implements: .
Definition vector.hpp:72
Operator::SrcVectorType SrcOf
Alias for the source vector type of an operator.
Definition operator.hpp:145
void apply(LinearForm &L, typename LinearForm::DstVectorType &dst)
Apply a linear form and write to a destination vector.
Definition linear_form.hpp:37
Operator::DstVectorType DstOf
Alias for the destination vector type of an operator.
Definition operator.hpp:149