From 5670b8eb6c8c2b0f51283f8b7ca82f097bc0292b Mon Sep 17 00:00:00 2001 From: Charlie Vanaret Date: Wed, 4 Dec 2024 23:46:35 +0100 Subject: [PATCH] Perform analysis only when the problem structure changes + set a setting in MUMPS to recompute scaling before each factorization --- uno/linear_algebra/SymmetricIndefiniteLinearSystem.hpp | 2 +- uno/solvers/MUMPS/MUMPSSolver.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/uno/linear_algebra/SymmetricIndefiniteLinearSystem.hpp b/uno/linear_algebra/SymmetricIndefiniteLinearSystem.hpp index b53d072c..37aa9bf8 100644 --- a/uno/linear_algebra/SymmetricIndefiniteLinearSystem.hpp +++ b/uno/linear_algebra/SymmetricIndefiniteLinearSystem.hpp @@ -91,7 +91,7 @@ namespace uno { template void SymmetricIndefiniteLinearSystem::factorize_matrix(DirectSymmetricIndefiniteLinearSolver& linear_solver, const WarmstartInformation& warmstart_information) { - if (true) { + if (warmstart_information.problem_structure_changed) { DEBUG << "Performing symbolic analysis of the indefinite system\n"; linear_solver.do_symbolic_analysis(this->matrix); } diff --git a/uno/solvers/MUMPS/MUMPSSolver.cpp b/uno/solvers/MUMPS/MUMPSSolver.cpp index 62d6482f..791a0d78 100644 --- a/uno/solvers/MUMPS/MUMPSSolver.cpp +++ b/uno/solvers/MUMPS/MUMPSSolver.cpp @@ -62,6 +62,7 @@ namespace uno { this->mumps_structure.jcn = this->column_indices.data(); this->mumps_structure.a = nullptr; dmumps_c(&this->mumps_structure); + this->mumps_structure.icntl[7] = 8; // ICNTL(8) = 8: recompute scaling before factorization } void MUMPSSolver::do_numerical_factorization(const SymmetricMatrix& matrix) {