From: Menno Fraters Date: Wed, 11 Sep 2019 23:54:02 +0000 (-0700) Subject: add functions to access svd u and vt variables X-Git-Tag: v9.2.0-rc1~1053^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b85334dead850fcbea715ae6f925d6dd4aaf2ca1;p=dealii.git add functions to access svd u and vt variables --- diff --git a/include/deal.II/lac/lapack_full_matrix.h b/include/deal.II/lac/lapack_full_matrix.h index 1662150329..2c3cef64fe 100644 --- a/include/deal.II/lac/lapack_full_matrix.h +++ b/include/deal.II/lac/lapack_full_matrix.h @@ -862,6 +862,20 @@ public: number singular_value(const size_type i) const; + /** + * Retrieves #svd_u matrix after compute_svd() or compute_inverse_svd() was + * called. + */ + inline const LAPACKFullMatrix & + get_svd_u() const; + + /** + * Retrieves #svd_vt matrix after compute_svd() or compute_inverse_svd() was + * called. + */ + inline const LAPACKFullMatrix& + get_svd_vt() const; + /** * Print the matrix and allow formatting of entries. * @@ -1174,6 +1188,28 @@ LAPACKFullMatrix::singular_value(const size_type i) const } +template +inline const LAPACKFullMatrix & +LAPACKFullMatrix::get_svd_u() const +{ + Assert(state == LAPACKSupport::svd || state == LAPACKSupport::inverse_svd, + LAPACKSupport::ExcState(state)); + + return *svd_u; +} + + +template +inline const LAPACKFullMatrix & +LAPACKFullMatrix::get_svd_vt() const +{ + Assert(state == LAPACKSupport::svd || state == LAPACKSupport::inverse_svd, + LAPACKSupport::ExcState(state)); + + return *svd_vt; +} + + DEAL_II_NAMESPACE_CLOSE