template<class Scalar>
Rodin::Solver::CG<Math::Matrix<Scalar>, Math::Vector<Scalar>> class final

Conjugate gradient solver for self-adjoint problems, for use with Math::Matrix and Math::Vector.

Base classes

template<class Operator, class Vector, class Scalar>
class SolverBase<Math::Matrix<Scalar>, Math::Vector<Scalar>, Scalar>
Abstract base class for linear algebra solvers.

Public functions

void solve(OperatorType& A, VectorType& x, VectorType& b) pure virtual
Solves the linear algebra system.

Function documentation

template<class Scalar>
void Rodin::Solver::CG<Math::Matrix<Scalar>, Math::Vector<Scalar>><Scalar>::solve(OperatorType& A, VectorType& x, VectorType& b) pure virtual

Solves the linear algebra system.

Parameters
in/out Left hand side operator
in/out Input for the initial guess, and output for the solution
in/out Right hand side vector

Solves the following system:

\[ Ax = b , \]

where $ A $ has type $ \text{OperatorType} $ , the solution $ x $ has type $ \text{VectorType} $ , and the right hand side $ b $ has type $ \text{VectorType} $ .