From b6a55fe83329e36d5f1bbe427567d8e7a2f4a5c0 Mon Sep 17 00:00:00 2001 From: Daniel Weindl Date: Sat, 9 Nov 2024 09:59:49 +0100 Subject: [PATCH] Fix potentially incorrect disabling of Newton's method by `SteadyStateSensitivityMode::integrationOnly` Fixes a bug that would result in disabling Newton's method for steady-state computation when steady-state sensitivity mode is set to `integrationOnly`, even if no senitivities are computed. Fixes #2575. --- src/steadystateproblem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/steadystateproblem.cpp b/src/steadystateproblem.cpp index d2923d5bcd..ae8f8a00a8 100644 --- a/src/steadystateproblem.cpp +++ b/src/steadystateproblem.cpp @@ -133,7 +133,8 @@ void SteadystateProblem::findSteadyState( = model.getSteadyStateComputationMode() == SteadyStateComputationMode::integrationOnly || solver.getNewtonMaxSteps() == 0 - || (model.getSteadyStateSensitivityMode() + || (solver.getSensitivityOrder() > SensitivityOrder::first + && model.getSteadyStateSensitivityMode() == SteadyStateSensitivityMode::integrationOnly && ((it == -1 && solver.getSensitivityMethodPreequilibration()