template<typename _MatrixType, typename _Preconditioner> class Eigen::DGMRES< _MatrixType, _Preconditioner >
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.
Template Parameters
_MatrixType
тип разреженной матрицы A, может быть плотной или разреженной.
SparseMatrix<double> A;
VectorXd x, b;
//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);
x = solver.solve(b);
DGMRES также можно использовать в контексте без матриц, см. следующий пример.
Ссылки: [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.
Инициализирует решатель матрицей A для дальнейшего Ax=b решения.
Этот конструктор — сокращение для конструктора по умолчанию, за которым следует вызов compute().
Предупреждение
Этот класс хранит ссылку на матрицу A, а также некоторые предварительно вычисленные значения, которые зависят от неё. Поэтому, если A изменена, этот класс становится недействительным. Вызовите compute(), чтобы обновить его новой матрицей A, или измените копию A.