-
-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch RK methods to use an inf norm for eigen_est
#2204
Switch RK methods to use an inf norm for eigen_est
#2204
Conversation
Rebase? |
d99b50d
to
d9a9bdf
Compare
rebased. This isn't quite ready to merge yet due to the issues with |
d9a9bdf
to
5edf7ac
Compare
This now is actually working. The problem I was seeing before is that |
@@ -15,7 +15,7 @@ function is_stiff(integrator, alg, ntol, stol, is_stiffalg) | |||
stiffness = abs(eigen_est * dt / alg_stability_size(alg)) # `abs` here is just for safety | |||
tol = is_stiffalg ? stol : ntol | |||
os = oneunit(stiffness) | |||
bool = stiffness > os * tol | |||
bool = !(stiffness <= os * tol) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case eigen_est
is NaN
. It's a pretty good sign that things are going wrong, but since it's an estimate, if the estimate is NaN
we really shouldn't be using an explicit solver.
fixes #2198.
Originally, something seemed to be wrong since
but further investigation shows that this is expected given the magnitude of u.