Skip to content

Commit ef2b7ad

Browse files
committed
Some more return codes
1 parent 294b115 commit ef2b7ad

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

src/retcodes.jl

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ EnumX.@enumx ReturnCode begin
237237
nonlinear solver was chosen. If fixed point iteration is used on a stiff problem,
238238
it will be faster by avoiding the Jacobian but it will make a stiff ODE solver not
239239
stable for stiff problems!
240+
* For nonlinear solvers, this can occur if certain threshold was exceeded. For example,
241+
in approximate jacobian solvers like Broyden, Klement, etc. if the number of jacobian
242+
resets exceeds the threshold, then this return code is given.
240243
241244
## Properties
242245
@@ -354,6 +357,30 @@ EnumX.@enumx ReturnCode begin
354357
* successful_retcode = false
355358
"""
356359
InternalLineSearchFailed
360+
361+
"""
362+
`ReturnCode.ShrinkThresholdExceeded`
363+
364+
The trust region radius was shrunk more times than the provided threshold.
365+
366+
## Properties
367+
368+
* successful_retcode = false
369+
"""
370+
ShrinkThresholdExceeded
371+
372+
"""
373+
`ReturnCode.Stalled`
374+
375+
The solution has stalled. This is only returned by algorithms for which stalling is a
376+
failure mode. Certain solvers like Nonlinear Least Squares solvers are considered
377+
successful if the solution has stalled, in those cases `ReturnCode.Success` is returned.
378+
379+
## Properties
380+
381+
* successful_retcode = false
382+
"""
383+
Stalled
357384
end
358385

359386
Base.:(!=)(retcode::ReturnCode.T, s::Symbol) = Symbol(retcode) != s

0 commit comments

Comments
 (0)