Skip to content

Commit

Permalink
Some more return codes
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Jan 9, 2024
1 parent 9a4bd1f commit 6785a53
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/retcodes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ EnumX.@enumx ReturnCode begin
nonlinear solver was chosen. If fixed point iteration is used on a stiff problem,
it will be faster by avoiding the Jacobian but it will make a stiff ODE solver not
stable for stiff problems!
* For nonlinear solvers, this can occur if certain threshold was exceeded. For example,
in approximate jacobian solvers like Broyden, Klement, etc. if the number of jacobian
resets exceeds the threshold, then this return code is given.
## Properties
Expand Down Expand Up @@ -354,6 +357,30 @@ EnumX.@enumx ReturnCode begin
* successful_retcode = false
"""
InternalLineSearchFailed

"""
`ReturnCode.ShrinkThresholdExceeded`
The trust region radius was shrunk more times than the provided threshold.
## Properties
* successful_retcode = false
"""
ShrinkThresholdExceeded

"""
`ReturnCode.Stalled`
The solution has stalled. This is only returned by algorithms for which stalling is a
failure mode. Certain solvers like Nonlinear Least Squares solvers are considered
successful if the solution has stalled, in those cases `ReturnCode.Success` is returned.
## Properties
* successful_retcode = false
"""
Stalled
end

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

0 comments on commit 6785a53

Please sign in to comment.