Skip to content

Commit

Permalink
Merge pull request #876 from ErikQQY/qqy/maxsubintervals
Browse files Browse the repository at this point in the history
Add MaxNumSub return code
  • Loading branch information
ChrisRackauckas authored Dec 3, 2024
2 parents 7d4a687 + e925d61 commit 55c8717
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SciMLBase"
uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
authors = ["Chris Rackauckas <[email protected]> and contributors"]
version = "2.65.1"
version = "2.66.0"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down
1 change: 1 addition & 0 deletions docs/src/interfaces/Solutions.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ SciMLBase.ReturnCode.Success
SciMLBase.ReturnCode.Terminated
SciMLBase.ReturnCode.DtNaN
SciMLBase.ReturnCode.MaxIters
SciMLBase.ReturnCode.MaxNumSub
SciMLBase.ReturnCode.DtLessThanMin
SciMLBase.ReturnCode.Unstable
SciMLBase.ReturnCode.InitialFailure
Expand Down
22 changes: 22 additions & 0 deletions src/retcodes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,26 @@ EnumX.@enumx ReturnCode begin
"""
MaxIters

"""
ReturnCode.MaxNumSub
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`
in solvers, or decrease the tolerance.
## Properties
- `successful_retcode` = `false`
"""
MaxNumSub

"""
ReturnCode.DtLessThanMin
Expand Down Expand Up @@ -417,6 +437,8 @@ function Base.convert(::Type{ReturnCode.T}, retcode::Symbol)
ReturnCode.Terminated
elseif retcode == :MaxIters || retcode == :MAXITERS_EXCEED
ReturnCode.MaxIters
elseif retcode == :MaxNumSub
ReturnCode.MaxNumSub
elseif retcode == :MaxTime || retcode == :TIME_LIMIT
ReturnCode.MaxTime
elseif retcode == :DtLessThanMin
Expand Down

0 comments on commit 55c8717

Please sign in to comment.