Add test for inhomogeneous term that during numerical integration is equal to zero#90
Merged
clinssen merged 19 commits intonest:masterfrom Aug 14, 2025
Merged
Conversation
added 4 commits
June 21, 2025 13:34
added 5 commits
July 2, 2025 18:46
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #90 +/- ##
==========================================
+ Coverage 61.71% 61.81% +0.10%
==========================================
Files 15 15
Lines 1460 1464 +4
==========================================
+ Hits 901 905 +4
Misses 559 559 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
382002e to
bf46dd4
Compare
added 7 commits
August 5, 2025 12:43
pnbabu
requested changes
Aug 13, 2025
pnbabu
approved these changes
Aug 13, 2025
Contributor
pnbabu
left a comment
There was a problem hiding this comment.
Looks good to me, thanks!
Contributor
Author
|
Thank you for the review! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the dynamics of the system is defined such that there is an inhomogeneous (constant-term) component in an ODE, but if numerically, if the inhomogeneous part is zero (this could happen in the case that one or more parameters get set to zero), then because of the way the update expressions are formulated, you could get a division by zero and this results in NaNs in the output.
To address this (but not completely fix it, see #89), ODE-toolbox should automatically check whether setting the inhomogenous part to zero results in a division by zero, and if this is the case, issue a warning. This is akin to checking for singularities in the propagators, but it occurs for the update expressions instead.
A flag is added so that singularity detection (also singularity detection in the propagators) can be disabled for the sake of faster processing. On some systems of equations, singularity detection can take a very long time.