So-Bogus
A c++ sparse block matrix library aimed at Second Order cone problems
|
Solves ( m_A * x
= b
) using the (restarted) Generalized Minimum Residual.
More...
#include <KrylovMethods.hpp>
Public Types | |
typedef KrylovSolverBase < solvers::GMRES, Matrix, Preconditioner, Traits > | Base |
typedef Traits::Scalar | Scalar |
typedef GMRES< Matrix, Preconditioner, Traits > | Derived |
typedef Signal< unsigned, Scalar > | SignalType |
enum | |
typedef BlockTraits< typename LinearSolverTraits< GMRES < Matrix, Preconditioner, Traits > >::MatrixType > | UnderlyingBlockTraits |
Public Member Functions | |
GMRES (const Matrix &A, unsigned maxIters, Scalar tol=NumTraits< Scalar >::epsilon(), const Preconditioner *P=(static_cast< const Preconditioner * >(0)), const typename Base::SignalType *callback=(static_cast< const typename Base::SignalType * >(0)), unsigned restart=0) | |
GMRES & | setRestart (unsigned restart) |
template<typename RhsT , typename ResT > | |
Scalar | vectorSolve (const RhsT &b, ResT x) const |
LinearSolverTraits< Derived > ::template Result< RhsT > ::Type | solve (const RhsT &rhs) const |
Returns the solution x of the linear system M * x = rhs . | |
Scalar | solve (const RhsT &rhs, ResT &x) const |
Returns the solution x of the linear system M * x = rhs . | |
Derived & | parallelizeRhs (bool parallelize=true) |
Whether to process multiple rhs in parallel. | |
Derived & | enableResCaching (bool doCache=true) |
Whether to enable caching of solve(rhs) result for warmstarting purposes. More... | |
const GMRES< Matrix, Preconditioner, Traits > & | derived () const |
GMRES< Matrix, Preconditioner, Traits > & | derived () |
Public Attributes | |
const Matrix * | m_A |
const Preconditioner * | m_P |
const SignalType * | m_callback |
Scalar | m_tol |
unsigned | m_maxIters |
Protected Attributes | |
unsigned | m_restart |
bool | m_parallelizeRhs |
bool | m_enableResCaching |
Solves ( m_A * x
= b
) using the (restarted) Generalized Minimum Residual.
restart | If non-zero, use the GMRES(m) restarted algorithm. Lower the storage cost, but slows-down or even forbid the convergence of the algorithm. |
Works for non-symmetric linear systems. Probably the more robust method for non symmetric systems, but with the highest storage cost.
Matrix-vector mults/iter: 1 Preconditionner calls/iter: 1 Other ops/iter: 1 k*k triangular solve, 2 k*n m-v mult, 1 k*k m-v mult Storage requirements: 2*m*( n + m )
|
inherited |
Whether to enable caching of solve(rhs) result for warmstarting purposes.