From: willems Date: Mon, 26 Apr 2010 14:45:49 +0000 (+0000) Subject: declaration of computation of generalized eigenvalues for symmetric lapack matrices... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8afe11259632b504557fd06b4b6faa15a743047;p=dealii-svn.git declaration of computation of generalized eigenvalues for symmetric lapack matrices included git-svn-id: https://svn.dealii.org/trunk@21039 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/lapack_full_matrix.h b/deal.II/lac/include/lac/lapack_full_matrix.h index a6fbbec891..2180de1e7c 100644 --- a/deal.II/lac/include/lac/lapack_full_matrix.h +++ b/deal.II/lac/include/lac/lapack_full_matrix.h @@ -290,6 +290,56 @@ class LAPACKFullMatrix : public TransposeTable void compute_eigenvalues (const bool right_eigenvectors = false, const bool left_eigenvectors = false); + /** + * Compute generalized eigenvalues + * and (optionally) eigenvectors of + * a real generalized symmetric + * eigenproblem of the form + * itype = 1: A*x=\lambda*B*x + * itype = 2: A*B*x=\lambda*x + * itype = 3: B*A*x=\lambda*x, + * where A is this matrix. + * A and B are assumed to be symmetric, + * and B has to be positive definite. + * After this routine has + * been called, eigenvalues can + * be retrieved using the + * eigenvalue() function. The + * matrix itself will be + * LAPACKSupport::unusable after + * this operation. The number of + * computed eigenvectors is equal + * to eigenvectors.size() + * + * Note that the function does + * not return the computed + * eigenvalues right away since + * that involves copying data + * around between the output + * arrays of the LAPACK functions + * and any return array. This is + * often unnecessary since one + * may not be interested in all + * eigenvalues at once, but for + * example only the extreme + * ones. In that case, it is + * cheaper to just have this + * function compute the + * eigenvalues and have a + * separate function that returns + * whatever eigenvalue is + * requested. + * + * @note Calls the LAPACK + * function Xsygv. For this to + * work, ./configure has to + * be told to use LAPACK. + */ + void compute_generalized_eigenvalues_symmetric ( + LAPACKFullMatrix & B, + std::vector > & eigenvectors, + const int itype = 1); + /** * Retrieve eigenvalue after * compute_eigenvalues() was