SteadyState solver robustness updates #74
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New options for
SteadyState.solve_ptc
(ie apply to each outer timestep):SteadyState.RestartSmallValuesCallback that provides a callback function with signature
that modifies
state
to reset variables with values <modify_threshold
to valuemodify_val
, hence restarting the Newton solve frommodify_val
on the next iteration.Add to
step_callbacks
list egCheckValuesCallback (provides additional conditions to accept a timestep), provides a callback function with signature
that checks variables have
check_min_threshold
< values <check_max_threshold
and rejects timestep if not.Add to ``check_callbacks` list, eg
New options for use with
NLsolve.jl
ie apply to each Newton iteration (add tosolvekwargs
argument):SolverFunctions.StepClampMultAll! callback (restricts Newton step size to multiple or fraction
mr_maxstep
of current value, as well as projecting new value to bounded regionmr_min
-mr_max
)Requires https://github.com/PALEOtoolkit/NLsolve.jl project_region branch, with new option
apply_step!
to NLsolve:Add sparse linear solvers adapted to NLsolve interface (
linsolve
argument, supplied viasolvekwargs
)