Skip to content

Commit 55c8717

Browse files
Merge pull request #876 from ErikQQY/qqy/maxsubintervals
Add MaxNumSub return code
2 parents 7d4a687 + e925d61 commit 55c8717

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "SciMLBase"
22
uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
33
authors = ["Chris Rackauckas <accounts@chrisrackauckas.com> and contributors"]
4-
version = "2.65.1"
4+
version = "2.66.0"
55

66
[deps]
77
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"

docs/src/interfaces/Solutions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ SciMLBase.ReturnCode.Success
8181
SciMLBase.ReturnCode.Terminated
8282
SciMLBase.ReturnCode.DtNaN
8383
SciMLBase.ReturnCode.MaxIters
84+
SciMLBase.ReturnCode.MaxNumSub
8485
SciMLBase.ReturnCode.DtLessThanMin
8586
SciMLBase.ReturnCode.Unstable
8687
SciMLBase.ReturnCode.InitialFailure

src/retcodes.jl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,26 @@ EnumX.@enumx ReturnCode begin
149149
"""
150150
MaxIters
151151

152+
"""
153+
ReturnCode.MaxNumSub
154+
155+
A failure exit state of the solver. If this return code is given, then the
156+
solving process was unsuccessful and exited early because during the solver's
157+
adaptivity, mesh length exceeded the `max_num_subintervals` either set by default or specified
158+
by users in the solver.
159+
160+
## Common Reasons for Seeing this Return Code
161+
162+
- This commonly occurs in BVP solving if the original mesh are too coarse or
163+
the tolerance are too stringent. It is recommended that in such cases, one tries to increase the default `max_num_subintervals`
164+
in solvers, or decrease the tolerance.
165+
166+
## Properties
167+
168+
- `successful_retcode` = `false`
169+
"""
170+
MaxNumSub
171+
152172
"""
153173
ReturnCode.DtLessThanMin
154174
@@ -417,6 +437,8 @@ function Base.convert(::Type{ReturnCode.T}, retcode::Symbol)
417437
ReturnCode.Terminated
418438
elseif retcode == :MaxIters || retcode == :MAXITERS_EXCEED
419439
ReturnCode.MaxIters
440+
elseif retcode == :MaxNumSub
441+
ReturnCode.MaxNumSub
420442
elseif retcode == :MaxTime || retcode == :TIME_LIMIT
421443
ReturnCode.MaxTime
422444
elseif retcode == :DtLessThanMin

0 commit comments

Comments
 (0)