-
Notifications
You must be signed in to change notification settings - Fork 68
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
fixing auto dt sizing function #116
Conversation
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.
Hey, yes the fix seems correct.
There is this case where you choose obj.dt to be length 2 and maxCr will be infinity. I think this is mainly user problem but maybe we could have an error for length(obj.dt) = 2 and dt == 0? Saying that dt = 0 is only intended for restricting the upper bound of Cr?
elseif length(obj.dt) == 2
% minimum Courant number bound
minCr = obj.dt(2);
maxCr = inf;
```
like this?
|
Yeah except that wouldn't work because it would go into the elseif length(obj.dt) == 2 above, so like this:
|
ah yea. cool. |
fixing auto dt sizing function (CHLNDDEV#116)
The automatic selection of the numerically stable timestep for which to CFL limit the mesh sizing function should be based on the
max_cr
not themin_cr
.This appears to fix #114 with a mesh that should be numerically stable at a timestep of roughly 1.34 seconds because of the high resolution zone near New York, e.g.,
The outer patch by itself is theoretically stable with: