diff --git a/uno/solvers/MA27/MA27Solver.cpp b/uno/solvers/MA27/MA27Solver.cpp index 791100d6..2111ffed 100644 --- a/uno/solvers/MA27/MA27Solver.cpp +++ b/uno/solvers/MA27/MA27Solver.cpp @@ -170,7 +170,7 @@ enum eIFLAG { } } - void MA27Solver::repeat_factorization_after_resizing() { + void MA27Solver::repeat_factorization_after_resizing([[maybe_unused]]const SymmetricMatrix &matrix) { if (eIFLAG::INSUFFICIENTINTEGER == info[eINFO::IFLAG]) { INFO << "MA27: insufficient integer workspace, resizing and retrying. \n"; @@ -193,7 +193,7 @@ enum eIFLAG { if (eIFLAG::INSUFFICIENTINTEGER == info[eINFO::IFLAG] || eIFLAG::INSUFFICIENTREAL == info[eINFO::IFLAG]) { - repeat_factorization_after_resizing(); + repeat_factorization_after_resizing(matrix); } } @@ -210,7 +210,7 @@ enum eIFLAG { if (eIFLAG::INSUFFICIENTINTEGER == info[eINFO::IFLAG] || eIFLAG::INSUFFICIENTREAL == info[eINFO::IFLAG]) { - repeat_factorization_after_resizing(); + repeat_factorization_after_resizing(matrix); } switch (info[eINFO::IFLAG]) @@ -303,11 +303,13 @@ enum eIFLAG { // build the internal matrix representation irn.clear(); icn.clear(); + factor.clear(); constexpr auto fortran_shift = 1; for (const auto [row_index, column_index, element] : matrix) { irn.emplace_back(static_cast(row_index + fortran_shift)); icn.emplace_back(static_cast(column_index + fortran_shift)); + factor.emplace_back(element); } } diff --git a/uno/solvers/MA27/MA27Solver.hpp b/uno/solvers/MA27/MA27Solver.hpp index 7db2bd30..8c56b03e 100644 --- a/uno/solvers/MA27/MA27Solver.hpp +++ b/uno/solvers/MA27/MA27Solver.hpp @@ -54,7 +54,7 @@ class MA27Solver // bool use_iterative_refinement{false}; // Not sure how to do this with ma27 void save_matrix_to_local_format(const SymmetricMatrix& matrix); - void repeat_factorization_after_resizing(); + void repeat_factorization_after_resizing(const SymmetricMatrix &matrix); }; } // namespace uno