diff options
author | 2014-09-01 17:21:47 +0200 | |
---|---|---|
committer | 2014-09-01 17:21:47 +0200 | |
commit | b051bbd64fcde21a352ff35d23adcd00afaf845d (patch) | |
tree | 8bd3aeaa0f499ee0e21455f8a50f474aafddab94 /unsupported/Eigen/src/IterativeSolvers/DGMRES.h | |
parent | b3d63b4db21e746ef3ef260caa28773c8d3ae77b (diff) |
Make unsupport sparse solvers use SparseSolverBase
Diffstat (limited to 'unsupported/Eigen/src/IterativeSolvers/DGMRES.h')
-rw-r--r-- | unsupported/Eigen/src/IterativeSolvers/DGMRES.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/unsupported/Eigen/src/IterativeSolvers/DGMRES.h b/unsupported/Eigen/src/IterativeSolvers/DGMRES.h index 9fcc8a8d9..fe0bfd948 100644 --- a/unsupported/Eigen/src/IterativeSolvers/DGMRES.h +++ b/unsupported/Eigen/src/IterativeSolvers/DGMRES.h @@ -108,6 +108,7 @@ class DGMRES : public IterativeSolverBase<DGMRES<_MatrixType,_Preconditioner> > using Base::m_isInitialized; using Base::m_tolerance; public: + using Base::_solve_impl; typedef _MatrixType MatrixType; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::Index Index; @@ -138,6 +139,7 @@ class DGMRES : public IterativeSolverBase<DGMRES<_MatrixType,_Preconditioner> > ~DGMRES() {} +#ifndef EIGEN_TEST_EVALUATORS /** \returns the solution x of \f$ A x = b \f$ using the current decomposition of A * \a x0 as an initial solution. * @@ -153,10 +155,11 @@ class DGMRES : public IterativeSolverBase<DGMRES<_MatrixType,_Preconditioner> > return internal::solve_retval_with_guess <DGMRES, Rhs, Guess>(*this, b.derived(), x0); } +#endif /** \internal */ template<typename Rhs,typename Dest> - void _solveWithGuess(const Rhs& b, Dest& x) const + void _solve_with_guess_impl(const Rhs& b, Dest& x) const { bool failed = false; for(int j=0; j<b.cols(); ++j) @@ -175,10 +178,10 @@ class DGMRES : public IterativeSolverBase<DGMRES<_MatrixType,_Preconditioner> > /** \internal */ template<typename Rhs,typename Dest> - void _solve(const Rhs& b, Dest& x) const + void _solve_impl(const Rhs& b, MatrixBase<Dest>& x) const { x = b; - _solveWithGuess(b,x); + _solve_with_guess_impl(b,x.derived()); } /** * Get the restart value @@ -522,6 +525,7 @@ int DGMRES<_MatrixType, _Preconditioner>::dgmresApplyDeflation(const RhsType &x, return 0; } +#ifndef EIGEN_TEST_EVALUATORS namespace internal { template<typename _MatrixType, typename _Preconditioner, typename Rhs> @@ -533,10 +537,11 @@ struct solve_retval<DGMRES<_MatrixType, _Preconditioner>, Rhs> template<typename Dest> void evalTo(Dest& dst) const { - dec()._solve(rhs(),dst); + dec()._solve_impl(rhs(),dst); } }; } // end namespace internal +#endif } // end namespace Eigen #endif |