Skip to content

Conversation

@gardner48
Copy link
Member

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 insufficient 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).

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
Copy link
Member Author

@drreynolds I've updated the correction modification to address the roundoff issues and resolved the open comments. However, this PR also includes updates from #788 (makes adding logging to the constraint checks easier), so hold off on taking another pass over this PR until that one is merged.

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.

3 participants