From b85334dead850fcbea715ae6f925d6dd4aaf2ca1 Mon Sep 17 00:00:00 2001 From: Menno Fraters Date: Wed, 11 Sep 2019 16:54:02 -0700 Subject: [PATCH] add functions to access svd u and vt variables --- include/deal.II/lac/lapack_full_matrix.h | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) 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 -- 2.39.5