A Restarted GMRES with deflation. This class implements a modification of the GMRES solver for sparse linear systems. The basis is built with modified Gram-Schmidt. At each restart, a few approximated eigenvectors corresponding to the smallest eigenvalues are used to build a preconditioner for the next cycle. This preconditioner for deflation can be combined with any other preconditioner, the IncompleteLUT for instance. The preconditioner is applied at right of the matrix and the combination is multiplicative. More...
Public Types | |
typedef Matrix< std::complex< RealScalar >, Dynamic, 1 > | ComplexVector |
typedef Matrix< Scalar, Dynamic, Dynamic > | DenseMatrix |
typedef Matrix< RealScalar, Dynamic, Dynamic > | DenseRealMatrix |
typedef Matrix< RealScalar, Dynamic, 1 > | DenseRealVector |
typedef Matrix< Scalar, Dynamic, 1 > | DenseVector |
typedef MatrixType_ | MatrixType |
typedef Preconditioner_ | Preconditioner |
typedef MatrixType::RealScalar | RealScalar |
typedef MatrixType::Scalar | Scalar |
typedef MatrixType::StorageIndex | StorageIndex |
![]() | |
typedef internal::traits< Derived >::MatrixType | MatrixType |
typedef internal::traits< Derived >::Preconditioner | Preconditioner |
typedef MatrixType::RealScalar | RealScalar |
typedef MatrixType::Scalar | Scalar |
typedef MatrixType::StorageIndex | StorageIndex |
Public Member Functions | |
void | _solve_impl (const Rhs &b, Dest &x) const |
template<typename Rhs , typename Dest > | |
void | _solve_vector_with_guess_impl (const Rhs &b, Dest &x) const |
std::enable_if_t< Rhs::ColsAtCompileTime!=1 &&DestDerived::ColsAtCompileTime!=1 > | _solve_with_guess_impl (const Rhs &b, MatrixBase< DestDerived > &aDest) const |
std::enable_if_t< Rhs::ColsAtCompileTime==1||DestDerived::ColsAtCompileTime==1 > | _solve_with_guess_impl (const Rhs &b, MatrixBase< DestDerived > &dest) const |
void | _solve_with_guess_impl (const Rhs &b, SparseMatrixBase< DestDerived > &aDest) const |
Index | deflSize () |
DGMRES () | |
template<typename MatrixDerived > | |
DGMRES (const EigenBase< MatrixDerived > &A) | |
Index | restart () |
void | set_restart (const Index restart) |
void | setEigenv (const Index neig) |
void | setMaxEigenv (const Index maxNeig) |
~DGMRES () | |
![]() | |
void | _solve_impl (const Rhs &b, Dest &x) const |
std::enable_if_t< Rhs::ColsAtCompileTime!=1 &&DestDerived::ColsAtCompileTime!=1 > | _solve_with_guess_impl (const Rhs &b, MatrixBase< DestDerived > &aDest) const |
std::enable_if_t< Rhs::ColsAtCompileTime==1||DestDerived::ColsAtCompileTime==1 > | _solve_with_guess_impl (const Rhs &b, MatrixBase< DestDerived > &dest) const |
void | _solve_with_guess_impl (const Rhs &b, SparseMatrixBase< DestDerived > &aDest) const |
Derived & | analyzePattern (const EigenBase< MatrixDerived > &A) |
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
Derived & | compute (const EigenBase< MatrixDerived > &A) |
Derived & | derived () |
const Derived & | derived () const |
RealScalar | error () const |
Derived & | factorize (const EigenBase< MatrixDerived > &A) |
ComputationInfo | info () const |
Index | iterations () const |
IterativeSolverBase () | |
IterativeSolverBase (const EigenBase< MatrixDerived > &A) | |
IterativeSolverBase (IterativeSolverBase &&)=default | |
Index | maxIterations () const |
Preconditioner & | preconditioner () |
const Preconditioner & | preconditioner () const |
EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
Derived & | setMaxIterations (Index maxIters) |
Derived & | setTolerance (const RealScalar &tolerance) |
const SolveWithGuess< Derived, Rhs, Guess > | solveWithGuess (const MatrixBase< Rhs > &b, const Guess &x0) const |
RealScalar | tolerance () const |
~IterativeSolverBase () | |
![]() | |
Derived & | derived () |
const Derived & | derived () const |
const Solve< Derived, Rhs > | solve (const MatrixBase< Rhs > &b) const |
const Solve< Derived, Rhs > | solve (const SparseMatrixBase< Rhs > &b) const |
SparseSolverBase () | |
SparseSolverBase (SparseSolverBase &&other) | |
~SparseSolverBase () | |
Protected Member Functions | |
template<typename Rhs , typename Dest > | |
void | dgmres (const MatrixType &mat, const Rhs &rhs, Dest &x, const Preconditioner &precond) const |
Perform several cycles of restarted GMRES with modified Gram Schmidt,. More... | |
template<typename RhsType , typename DestType > | |
Index | dgmresApplyDeflation (const RhsType &In, DestType &Out) const |
Index | dgmresComputeDeflationData (const MatrixType &mat, const Preconditioner &precond, const Index &it, StorageIndex &neig) const |
template<typename Dest > | |
Index | dgmresCycle (const MatrixType &mat, const Preconditioner &precond, Dest &x, DenseVector &r0, RealScalar &beta, const RealScalar &normRhs, Index &nbIts) const |
Perform one restart cycle of DGMRES. More... | |
void | dgmresInitDeflation (Index &rows) const |
ComplexVector | schurValues (const ComplexSchur< DenseMatrix > &schurofH) const |
ComplexVector | schurValues (const RealSchur< DenseMatrix > &schurofH) const |
![]() | |
void | grab (const InputType &A) |
void | init () |
const ActualMatrixType & | matrix () const |
Protected Attributes | |
bool | m_force |
DenseMatrix | m_H |
DenseMatrix | m_Hes |
bool | m_isDeflAllocated |
bool | m_isDeflInitialized |
RealScalar | m_lambdaN |
PartialPivLU< DenseMatrix > | m_luT |
Index | m_maxNeig |
DenseMatrix | m_MU |
StorageIndex | m_neig |
Index | m_r |
Index | m_restart |
RealScalar | m_smv |
DenseMatrix | m_T |
DenseMatrix | m_U |
DenseMatrix | m_V |
![]() | |
bool | m_analysisIsOk |
RealScalar | m_error |
bool | m_factorizationIsOk |
ComputationInfo | m_info |
bool | m_isInitialized |
Index | m_iterations |
MatrixWrapper | m_matrixWrapper |
Index | m_maxIterations |
Preconditioner | m_preconditioner |
RealScalar | m_tolerance |
![]() | |
bool | m_isInitialized |
Private Types | |
typedef IterativeSolverBase< DGMRES > | Base |
Private Member Functions | |
const ActualMatrixType & | matrix () const |
Private Attributes | |
RealScalar | m_error |
ComputationInfo | m_info |
bool | m_isInitialized |
Index | m_iterations |
RealScalar | m_tolerance |
Additional Inherited Members | |
![]() | |
ColsAtCompileTime | |
MaxColsAtCompileTime | |
![]() | |
typedef MatrixWrapper::ActualMatrixType | ActualMatrixType |
typedef SparseSolverBase< Derived > | Base |
typedef internal::generic_matrix_wrapper< MatrixType > | MatrixWrapper |
A Restarted GMRES with deflation. This class implements a modification of the GMRES solver for sparse linear systems. The basis is built with modified Gram-Schmidt. At each restart, a few approximated eigenvectors corresponding to the smallest eigenvalues are used to build a preconditioner for the next cycle. This preconditioner for deflation can be combined with any other preconditioner, the IncompleteLUT for instance. The preconditioner is applied at right of the matrix and the combination is multiplicative.
MatrixType_ | the type of the sparse matrix A, can be a dense or a sparse matrix. |
Preconditioner_ | the type of the preconditioner. Default is DiagonalPreconditioner Typical usage : //Fill A and b ...
DGMRES<SparseMatrix<double> > solver;
solver.set_restart(30); // Set restarting value
solver.setEigenv(1); // Set the number of eigenvalues to deflate
solver.compute(A);
BiCGSTAB< SparseMatrix< double > > solver SparseMatrix< double > A(n, n) Matrix< double, Dynamic, 1 > VectorXd Code |
DGMRES can also be used in a matrix-free context, see the following example .
References : [1] D. NUENTSA WAKAM and F. PACULL, Memory Efficient Hybrid Algebraic Solvers for Linear Systems Arising from Compressible Flows, Computers and Fluids, In Press, https://doi.org/10.1016/j.compfluid.2012.03.023
[2] K. Burrage and J. Erhel, On the performance of various adaptive preconditioned GMRES strategies, 5(1998), 101-121. [3] J. Erhel, K. Burrage and B. Pohl, Restarted GMRES preconditioned by deflation,J. Computational and Applied Mathematics, 69(1996), 303-318.
|
private |
typedef Matrix<std::complex<RealScalar>, Dynamic, 1> Eigen::DGMRES< MatrixType_, Preconditioner_ >::ComplexVector |
typedef Matrix<Scalar,Dynamic,Dynamic> Eigen::DGMRES< MatrixType_, Preconditioner_ >::DenseMatrix |
typedef Matrix<RealScalar,Dynamic,Dynamic> Eigen::DGMRES< MatrixType_, Preconditioner_ >::DenseRealMatrix |
typedef Matrix<RealScalar,Dynamic,1> Eigen::DGMRES< MatrixType_, Preconditioner_ >::DenseRealVector |
typedef Matrix<Scalar,Dynamic,1> Eigen::DGMRES< MatrixType_, Preconditioner_ >::DenseVector |
typedef MatrixType_ Eigen::DGMRES< MatrixType_, Preconditioner_ >::MatrixType |
typedef Preconditioner_ Eigen::DGMRES< MatrixType_, Preconditioner_ >::Preconditioner |
typedef MatrixType::RealScalar Eigen::DGMRES< MatrixType_, Preconditioner_ >::RealScalar |
typedef MatrixType::Scalar Eigen::DGMRES< MatrixType_, Preconditioner_ >::Scalar |
typedef MatrixType::StorageIndex Eigen::DGMRES< MatrixType_, Preconditioner_ >::StorageIndex |
|
inline |
Default constructor.
Definition at line 128 of file DGMRES.h.
|
inlineexplicit |
Initialize the solver with matrix A for further Ax=b
solving.
This constructor is a shortcut for the default constructor followed by a call to compute().
Definition at line 141 of file DGMRES.h.
|
inline |
void Eigen::IterativeSolverBase< class >::_solve_impl |
|
inline |
Definition at line 147 of file DGMRES.h.
std::enable_if_t< Rhs::ColsAtCompileTime!=1 &&DestDerived::ColsAtCompileTime!=1 > Eigen::IterativeSolverBase< class >::_solve_with_guess_impl |
std::enable_if_t< Rhs::ColsAtCompileTime==1||DestDerived::ColsAtCompileTime==1 > Eigen::IterativeSolverBase< class >::_solve_with_guess_impl |
void Eigen::IterativeSolverBase< class >::_solve_with_guess_impl |
|
inline |
|
protected |
Perform several cycles of restarted GMRES with modified Gram Schmidt,.
A right preconditioner is used combined with deflation.
Definition at line 230 of file DGMRES.h.
|
protected |
|
protected |
Definition at line 421 of file DGMRES.h.
|
protected |
Perform one restart cycle of DGMRES.
mat | The coefficient matrix |
precond | The preconditioner |
x | the new approximated solution |
r0 | The initial residual vector |
beta | The norm of the residual computed so far |
normRhs | The norm of the right hand side vector |
nbIts | The number of iterations |
Definition at line 288 of file DGMRES.h.
|
protected |
|
private |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
inline |
|
inline |
|
private |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
private |
|
mutableprotected |
|
mutableprotected |
|
private |
|
private |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
mutableprotected |
|
private |
|
mutableprotected |
|
mutableprotected |