Skip to content

Commit

Permalink
Fix potentially incorrect disabling of Newton's method by `SteadyStat…
Browse files Browse the repository at this point in the history
…eSensitivityMode::integrationOnly` (#2576)

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.
  • Loading branch information
dweindl authored Nov 10, 2024
1 parent 94b616f commit 9e7f06b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/steadystateproblem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9e7f06b

Please sign in to comment.