Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MaxNumSub return code #876

Merged
merged 2 commits into from
Dec 3, 2024
Merged

Conversation

ErikQQY
Copy link
Member

@ErikQQY ErikQQY commented Nov 23, 2024

Part of SciML/BoundaryValueDiffEq.jl#257

Add MaxNumSub return code to indicate the maximum number of subintervals are exceeded during the adaptivity process and throw proper warning

Comment on lines +155 to +163
A failure exit state of the solver. If this return code is given, then the
solving process was unsuccessful and exited early because during the solver's
adaptivity, mesh length exceeded the `max_num_subintervals` either set by default or specified
by users in the solver.

## Common Reasons for Seeing this Return Code

- This commonly occurs in BVP solving if the original mesh are too coarse or
the tolerance are too stringent. It is recommended that in such cases, one tries to increase the default `max_num_subintervals`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this maxiters?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, MaxIters is used for the exit because the default iteration number exceeded, say, number of Newton iterations, but for cases when solving ill-conditioned problems with adaptivity(we redistribute or halve the mesh), the mesh would become so large that we need to warn users instead of just throw Failure. Although the reasons for MaxIters and MaxNumSub are similar, tolerance is stringent or nonstiff solvers on stiff problems, etc, I believe these failure statuses are two different things.

@ChrisRackauckas ChrisRackauckas merged commit 55c8717 into SciML:master Dec 3, 2024
@ErikQQY ErikQQY deleted the qqy/maxsubintervals branch December 3, 2024 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants