From 13c01a549c7ab7acbc21a5a7db5be6db742298e0 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. This was because only the sensitivity method was checked, but not the sensitivity order. 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..ce8096dee8 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()