From: Bruno Turcksin Date: Mon, 9 Apr 2018 13:39:29 +0000 (-0400) Subject: Merge pull request #6062 from BenBrands/MRRR X-Git-Tag: v9.0.0-rc1~202 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18e356c0bf96468944b5127cabd564c364d4f84c;p=dealii.git Merge pull request #6062 from BenBrands/MRRR ScaLAPACKMatrix: add eigensolver routines using MRRR algorithm --- 18e356c0bf96468944b5127cabd564c364d4f84c diff --cc include/deal.II/lac/scalapack.h index c5f8b5bb9b,0f0a1bf3e7..4a12cde779 --- a/include/deal.II/lac/scalapack.h +++ b/include/deal.II/lac/scalapack.h @@@ -453,24 -421,53 +453,53 @@@ public std::vector eigenpairs_symmetric_by_value(const std::pair &value_limits, const bool compute_eigenvectors); + /** + * Computing selected eigenvalues and, optionally, the eigenvectors of the real symmetric + * matrix $\mathbf{A} \in \mathbb{R}^{M \times M}$ using the MRRR algorithm. + * + * The eigenvalues/eigenvectors are selected by prescribing a range of indices @p index_limits. + * + * If successful, the computed eigenvalues are arranged in ascending order. + * The eigenvectors are stored in the columns of the matrix, thereby + * overwriting the original content of the matrix. + * + * If all eigenvalues/eigenvectors have to be computed, pass the closed interval $ \left[ 0, M-1 \right] $ in @p index_limits. + * + * Pass the closed interval $ \left[ M-r, M-1 \right] $ if the $r$ largest eigenvalues/eigenvectors are desired. + */ + std::vector eigenpairs_symmetric_by_index_MRRR(const std::pair &index_limits, + const bool compute_eigenvectors); + + /** + * Computing selected eigenvalues and, optionally, the eigenvectors of the real symmetric + * matrix $\mathbf{A} \in \mathbb{R}^{M \times M}$ using the MRRR algorithm. + * The eigenvalues/eigenvectors are selected by prescribing a range of values @p value_limits for the eigenvalues. + * + * If successful, the computed eigenvalues are arranged in ascending order. + * The eigenvectors are stored in the columns of the matrix, thereby + * overwriting the original content of the matrix. + */ + std::vector eigenpairs_symmetric_by_value_MRRR(const std::pair &value_limits, + const bool compute_eigenvectors); + /** * Computing the singular value decomposition (SVD) of a - * matrix $A \in \mathbb{R}^{M \times N}$, optionally computing the left and/or right - * singular vectors. The SVD is written as $A = U * \Sigma * V^T$ - * with $\Sigma \in \mathbb{R}^{M \times N}$ as a diagonal matrix, - * $U \in \mathbb{R}^{M \times M}$ and $U \in \mathbb{R}^{M \times M}$ - * as orthogonal matrices. The diagonal elements of $\Sigma$ - * are the singular values of $A$ and the columns of $U$ and $V$ are the + * matrix $\mathbf{A} \in \mathbb{R}^{M \times N}$, optionally computing the left and/or right + * singular vectors. The SVD is written as $\mathbf{A} = \mathbf{U} \cdot \mathbf{\Sigma} \cdot \mathbf{V}^T$ + * with $\mathbf{\Sigma} \in \mathbb{R}^{M \times N}$ as a diagonal matrix, + * $\mathbf{U} \in \mathbb{R}^{M \times M}$ and $\mathbf{V} \in \mathbb{R}^{M \times M}$ + * as orthogonal matrices. The diagonal elements of $\mathbf{\Sigma}$ + * are the singular values of $A$ and the columns of $\mathbf{U}$ and $\mathbf{V}$ are the * corresponding left and right singular vectors, respectively. The * singular values are returned in decreasing order and only the first $\min(M,N)$ - * columns of $U$ and rows of VT = $V^T$ are computed. + * columns of $\mathbf{U}$ and rows of $\mathbf{V}^T$ are computed. * * Upon return the content of the matrix is unusable. - * The matrix A must have identical block cyclic distribution for the rows and column. + * The matrix $\mathbf{A}$ must have identical block cyclic distribution for the rows and column. * - * If left singular vectors are required matrices $A$ and $U$ + * If left singular vectors are required matrices $\mathbf{A}$ and $\mathbf{U}$ * have to be constructed with the same process grid and block cyclic distribution. - * If right singular vectors are required matrices $A$ and $V^T$ + * If right singular vectors are required matrices $\mathbf{A}$ and $\mathbf{V}^T$ * have to be constructed with the same process grid and block cyclic distribution. * * To avoid computing the left and/or right singular vectors the function accepts nullptr