Implement wrapper for matrix-free iterative solvers

This commit is contained in:
Gael Guennebaud
2015-12-07 12:23:22 +01:00
parent f4ca8ad917
commit b37036afce
10 changed files with 189 additions and 51 deletions

View File

@@ -257,7 +257,7 @@ template< typename _MatrixType, typename _Preconditioner>
class GMRES : public IterativeSolverBase<GMRES<_MatrixType,_Preconditioner> >
{
typedef IterativeSolverBase<GMRES> Base;
using Base::mp_matrix;
using Base::matrix;
using Base::m_error;
using Base::m_iterations;
using Base::m_info;
@@ -313,7 +313,7 @@ public:
m_error = Base::m_tolerance;
typename Dest::ColXpr xj(x,j);
if(!internal::gmres(mp_matrix, b.col(j), xj, Base::m_preconditioner, m_iterations, m_restart, m_error))
if(!internal::gmres(matrix(), b.col(j), xj, Base::m_preconditioner, m_iterations, m_restart, m_error))
failed = true;
}
m_info = failed ? NumericalIssue