From 8166937513bc870ee7d81f0c2b88bcf3898af466 Mon Sep 17 00:00:00 2001 From: Charlie Vanaret Date: Tue, 19 Nov 2024 13:23:09 +0100 Subject: [PATCH] Compute symbolic factorization only when the problem structure changed (once at the beginning and at every phase switch) --- uno/linear_algebra/SymmetricIndefiniteLinearSystem.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/uno/linear_algebra/SymmetricIndefiniteLinearSystem.hpp b/uno/linear_algebra/SymmetricIndefiniteLinearSystem.hpp index 0d6c948b..86f9b741 100644 --- a/uno/linear_algebra/SymmetricIndefiniteLinearSystem.hpp +++ b/uno/linear_algebra/SymmetricIndefiniteLinearSystem.hpp @@ -90,9 +90,8 @@ namespace uno { template void SymmetricIndefiniteLinearSystem::factorize_matrix(DirectSymmetricIndefiniteLinearSolver& linear_solver, - const WarmstartInformation& /*warmstart_information*/) { - // TODO compute the symbolic factorization only when the problem definition changes - if (true) { + const WarmstartInformation& warmstart_information) { + if (warmstart_information.problem_structure_changed) { DEBUG << "Performing symbolic factorization of the indefinite system\n"; linear_solver.do_symbolic_factorization(this->matrix); }