linearAlgebraSolverLib
Loading...
Searching...
No Matches
linearAlgebraLib::ConjugateGradient Class Reference

Implements the Conjugate Gradient method for solving linear systems. More...

#include <conjugateGradient.hpp>

Inheritance diagram for linearAlgebraLib::ConjugateGradient:
Collaboration diagram for linearAlgebraLib::ConjugateGradient:

Public Member Functions

Constructors and destructors
 ConjugateGradient (unsigned numberOfCells)
 
API interface that exposes behaviour to the caller
virtual Vector solve (unsigned maxIterations, double convergenceThreshold) final override
 
- Public Member Functions inherited from linearAlgebraLib::LinearAlgebraSolverBase
 LinearAlgebraSolverBase (unsigned numberOfCells)
 
void setCoefficientMatrix (const SparseMatrixCSR &matrix)
 
void setRightHandSide (const Vector &rhs)
 

Additional Inherited Members

- Protected Attributes inherited from linearAlgebraLib::LinearAlgebraSolverBase
SparseMatrixCSR _coefficientMatrix
 
Vector _rightHandSide
 

Detailed Description

Implements the Conjugate Gradient method for solving linear systems.

This class implements the Conjugate Gradient method based on the base class LinearAlgebraSolverBase. The only method implemented is the solve() function. To see how to use this class and how to obtaint he solution vector \(\mathbf{x}\), refer to the Creating a linear system of equations documentation to see an example code usage.

Member Function Documentation

◆ solve()

Vector linearAlgebraLib::ConjugateGradient::solve ( unsigned  maxIterations,
double  convergenceThreshold 
)
finaloverridevirtual

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