Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cvanaret committed Nov 18, 2024
1 parent b247a15 commit 1c1d3ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions uno/linear_algebra/SymmetricIndefiniteLinearSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,13 @@ namespace uno {
size_t number_attempts = 1;
DEBUG << "Testing factorization with regularization factors (" << this->primal_regularization << ", " << this->dual_regularization << ")\n";

auto [number_pos_eigenvalues, number_neg_eigenvalues, number_zero_eigenvalues] = linear_solver.get_inertia();
DEBUG << "Inertia (" << number_pos_eigenvalues << ", " << number_neg_eigenvalues << ", " << number_zero_eigenvalues << ")\n";
if (not linear_solver.matrix_is_singular() && linear_solver.number_negative_eigenvalues() == size_dual_block) {
DEBUG << "Inertia is good\n";
DEBUG << "Inertia is correct\n";
statistics.set("regulariz", this->primal_regularization);
return;
}
auto [number_pos_eigenvalues, number_neg_eigenvalues, number_zero_eigenvalues] = linear_solver.get_inertia();
DEBUG << "Expected inertia (" << size_primal_block << ", " << size_dual_block << ", 0), ";
DEBUG << "got (" << number_pos_eigenvalues << ", " << number_neg_eigenvalues << ", " << number_zero_eigenvalues << ")\n";
DEBUG << "Number of attempts: " << number_attempts << "\n\n";
Expand Down
3 changes: 1 addition & 2 deletions uno/solvers/MUMPS/MUMPSSolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ namespace uno {
#if defined(HAS_MPI) && defined(MUMPS_PARALLEL)
// TODO load number of processes from option file
this->mumps_structure.par = 1;
#endif
#ifdef MUMPS_SEQUENTIAL
#else
this->mumps_structure.par = 1;
#endif
this->mumps_structure.job = MUMPSSolver::JOB_INIT;
Expand Down

0 comments on commit 1c1d3ff

Please sign in to comment.