Skip to content

Conversation

@gardner48
Copy link
Member

@gardner48 gardner48 commented Oct 19, 2025

Fix a bug in the CVODE(S) inequality constraint handling where the predicted state was used to compute the step size reduction factor instead of the prior solution which could lead to an incorrect reduction in the step size or, when the prediction violates the constraints, an infinitely large step size in the next step attempt. (Fixes #702)

Add a unit test for inequality constraint handling with all the integrators.

In CVODE(S) and IDA(S), separate inequality constraint check from the nonlinear solve check.

Add functions to set the maximum number of inequality constraint failures and get total number of failures (constraint failures are no longer included in the number of step failures due to a solver failure).

Add a function to get the number of steps modified but not failed due to constraint violations.

Synchronize some differences between CVODE/CVODES and IDA/IDAS source and docs.

Add missing return flag names to CVodeGetReturnFlagName in CVODES and IDAGetReturnFlagName in IDA.

@gardner48 gardner48 requested a review from balos1 as a code owner October 19, 2025 21:23
@gardner48 gardner48 requested a review from drreynolds November 24, 2025 19:27
balos1
balos1 previously approved these changes Jan 9, 2026
Steven-Roberts
Steven-Roberts previously approved these changes Jan 10, 2026
drreynolds
drreynolds previously approved these changes Jan 13, 2026
gardner48 added a commit to sundials-codes/answers that referenced this pull request Jan 22, 2026
@gardner48 gardner48 dismissed stale reviews from drreynolds, Steven-Roberts, and balos1 via b350704 January 22, 2026 01:17
@gardner48 gardner48 merged commit 6be6202 into develop Jan 25, 2026
95 of 97 checks passed
@gardner48 gardner48 deleted the bugfix/constraints branch January 25, 2026 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants