-
Notifications
You must be signed in to change notification settings - Fork 7
Revive SSPKnoth #292
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
Revive SSPKnoth #292
Conversation
250e00a to
6280071
Compare
0ce232a to
30b50e6
Compare
ec07ffa to
6b747e7
Compare
|
@dennisYatunin this is ready for review when you have time |
afdf9f4 to
04aa7f5
Compare
dennisYatunin
left a comment
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.
A couple of comments/questions, but this looks really great overall. Thanks for adding the tutorial as well!
|
|
||
| Refer to the documentation for the precise meaning of the symbols below. | ||
| """ | ||
| struct RosenbrockTableau{N} |
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.
I'd like to keep the tableau structs confined to the minimal set of values needed to define a timestepping scheme, and to have all values generated from those confined to the cache. The ExplicitTableau (which I'll rename to ButcherTableau in the reformulation) has the vector b, which you defined elsewhere in this file, and the matrix A, which corresponds to your matrices α and Γ. The ExplicitTableau also has the vector c, which I think corresponds to the values αi and γi that you compute in your stage loop; it might be worth pre-computing those here as well. So, maybe the constructor here can look something like RosenbrockTableau(α, Γ, b, c = sum(α, dims = 2), γ = sum(Γ, dims = 2))?
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.
I added constructor that takes alpha, Gamma, and b. Maybe we can refine things once we work with the reformulation?
b713e3e to
6645f04
Compare
|
Documentation fails, but also fails on main with the same error. This is probably #283. I'll go ahead and merge this. I'll also refine the tableau when things are a little bit more clear for the reformulation. |
This PR brings back SSPKnoth. In its current incarnation, SSPKnoth is a 2nd-order Rosenbrock method that does not require a Newton solver. The implementation was tested with a series of convergence tests and in ClimaAtmos. The convergence tests show the expected order of convergence when SSPKnoth is used fully implicitely with the correct Jacobian. This is not the case when the the Jacobian is approximated.
In ClimaAtmos, I investigated maximium timestep and best dissipation parameters for baroclinic waves. I found that the CAM_SE parameters work well and yield a maximum timestep of 200s for our target resolution (30 horizontal elements, 63 verfical ones).
In this PR, I also fixed a couple of small things that outdated.
I also added a general tutorial on how to use ClimaTimeSteppers, but the tutorial should be expanded with more information and explanations by those who know how things work.
Closes #276