diff --git a/resolve/LinSolverDirectLUSOL.cpp b/resolve/LinSolverDirectLUSOL.cpp index 993f8fb8..c9c3f8f2 100644 --- a/resolve/LinSolverDirectLUSOL.cpp +++ b/resolve/LinSolverDirectLUSOL.cpp @@ -211,6 +211,12 @@ namespace ReSolve return -1; } + /** + * @pre The input matrix has been factorized + * + * @post A pointer to the L factor of the input matrix is returned in CSC + * format. The linear solver instance owns this data + */ matrix::Sparse* LinSolverDirectLUSOL::getLFactor() { if (!is_factorized_) { @@ -271,7 +277,7 @@ namespace ReSolve // fill the destination arrays. iterates over the stored columns, depermuting the // column indices to fully compute P*L*Pt while sorting each column's contents using - // insertion sort + // insertion sort (where L is the L factor as stored in LUSOL's workspace) offset = lena_ - 1; for (index_type i = 0; i < initial_m; i++) { @@ -312,6 +318,12 @@ namespace ReSolve return L_; } + /** + * @pre The input matrix has been factorized + * + * @post A pointer to the U factor of the input matrix is returned in CSR + * format. The linear solver instance owns this data + */ matrix::Sparse* LinSolverDirectLUSOL::getUFactor() { if (!is_factorized_) { diff --git a/resolve/LinSolverDirectLUSOL.hpp b/resolve/LinSolverDirectLUSOL.hpp index 43fff1b2..acc33830 100644 --- a/resolve/LinSolverDirectLUSOL.hpp +++ b/resolve/LinSolverDirectLUSOL.hpp @@ -43,7 +43,7 @@ namespace ReSolve int solve(vector_type* rhs, vector_type* x) override; int solve(vector_type* x) override; - /// @brief Returns the L factor of the solution in CSC format (?) + /// @brief Returns the L factor of the solution in CSC format matrix::Sparse* getLFactor() override; /// @brief Returns the U factor of the solution in CSR format