Skip to content

Commit

Permalink
Missing link between factors and matrix passed.
Browse files Browse the repository at this point in the history
  • Loading branch information
worc4021 committed Nov 30, 2024
1 parent e048dc2 commit c6e48fe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions uno/solvers/MA27/MA27Solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ enum eIFLAG {
}
}

void MA27Solver::repeat_factorization_after_resizing() {
void MA27Solver::repeat_factorization_after_resizing([[maybe_unused]]const SymmetricMatrix<size_t, double> &matrix) {
if (eIFLAG::INSUFFICIENTINTEGER == info[eINFO::IFLAG])
{
INFO << "MA27: insufficient integer workspace, resizing and retrying. \n";
Expand All @@ -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);
}
}

Expand All @@ -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])
Expand Down Expand Up @@ -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<int>(row_index + fortran_shift));
icn.emplace_back(static_cast<int>(column_index + fortran_shift));
factor.emplace_back(element);
}
}

Expand Down
2 changes: 1 addition & 1 deletion uno/solvers/MA27/MA27Solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<size_t, double>& matrix);
void repeat_factorization_after_resizing();
void repeat_factorization_after_resizing(const SymmetricMatrix<size_t, double> &matrix);
};

} // namespace uno
Expand Down

0 comments on commit c6e48fe

Please sign in to comment.