]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add functions to access svd u and vt variables
authorMenno Fraters <menno.fraters@outlook.com>
Wed, 11 Sep 2019 23:54:02 +0000 (16:54 -0700)
committerMenno Fraters <menno.fraters@outlook.com>
Thu, 12 Sep 2019 15:43:32 +0000 (08:43 -0700)
include/deal.II/lac/lapack_full_matrix.h

index 166215032980cc6bb72d3763064f38f402de56e7..2c3cef64fe1ea234f81088e30feaac99c9ec855a 100644 (file)
@@ -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<number> &
+  get_svd_u() const;
+
+  /**
+   * Retrieves #svd_vt matrix after compute_svd() or compute_inverse_svd() was
+   * called.
+   */
+  inline const LAPACKFullMatrix<number>&
+  get_svd_vt() const;
+
   /**
    * Print the matrix and allow formatting of entries.
    *
@@ -1174,6 +1188,28 @@ LAPACKFullMatrix<number>::singular_value(const size_type i) const
 }
 
 
+template <typename number>
+inline const LAPACKFullMatrix<number> &
+LAPACKFullMatrix<number>::get_svd_u() const
+{
+  Assert(state == LAPACKSupport::svd || state == LAPACKSupport::inverse_svd,
+         LAPACKSupport::ExcState(state));
+
+  return *svd_u;
+}
+
+
+template <typename number>
+inline const LAPACKFullMatrix<number> &
+LAPACKFullMatrix<number>::get_svd_vt() const
+{
+  Assert(state == LAPACKSupport::svd || state == LAPACKSupport::inverse_svd,
+         LAPACKSupport::ExcState(state));
+
+  return *svd_vt;
+}
+
+
 
 DEAL_II_NAMESPACE_CLOSE
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.