Open ranocha opened 3 years ago
I noticed using SSPRK43
sometimes the tests would pass locally but fail on github because the error differences would be on the order of 1e-8
. This was many version ago of the unstructured solver, but it might be something to keep in mind.
Well, it's reasonable to expect differences like these I guess. Thus, we will probably need to adapt tests, too, if we make this switch
Intuitively, I would consider it a breaking change, at least for default_example()
. Also, I think it would be good to get some comparisons of the different schemes available with our current examples to get a better idea of what the "best" scheme with "optimal" parameters is.
In case we figure out a good parameter set for the tolerances, is there any chance we can get these as new defaults into OrdinaryDiffeq.jl
:grimacing: Otherwise we should also consider what we consider acceptable errors in comparison to a standard, high-order time integration scheme, and if the default parameters fit our our bill. I'd hate to see replacing one parameter (CFL) by another (tolerances).
Overall, I am all for this change, but at the moment feel like it would require some more preparatory work (thus also the suggestion for a joint thesis project).
Sure, this will need some work. I just wanted to start this discussion on GitHub such that it doesn't get lost in Slack.
is there any chance we can get these as new defaults into
OrdinaryDiffeq.jl
I don't think so - at least I would be quite surprised.
"best" scheme with "optimal" parameters
Do we really want to have that? Doesn't it suffice to have a reasonably good scheme? I'm sure many of the scheme/CFL parameters we have right now are far from "optimal".
I'd hate to see replacing one parameter (CFL) by another (tolerances)
At least the sensitivity will change dramatically (from linear to roughly logarithmic unless we're in the stability-limited regime and the tolerances are not too coarse).
Sure, this will need some work. I just wanted to start this discussion on GitHub such that it doesn't get lost in Slack.
:+1:
"best" scheme with "optimal" parameters
Do we really want to have that? Doesn't it suffice to have a reasonably good scheme? I'm sure many of the scheme/CFL parameters we have right now are far from "optimal".
Yes, but that "reasonably" is key for me. I have very little experience with these schemes (unlike you), so I'd feel more comfortable to see a few more numbers for Trixi and the typical problems we have been looking at so far. Especially, when we have a mixture of error-limited and stability-limited setups.
I'd hate to see replacing one parameter (CFL) by another (tolerances)
At least the sensitivity will change dramatically (from linear to roughly logarithmic unless we're in the stability-limited regime and the tolerances are not too coarse).
I agree, this is one of the great benefits I am looking forward to :+1:
I used the RDPK3SpFSAL49
time integrator mentioned above in the new APE unstructured test in #615 . There were no issues with tolerance checks or anything. (It is also very fast!)
I agree that these new methods work like a charm. I think that these methods are very well suited for applications and production runs. And I would support the idea that our elixirs with "applications" will have this method as a standard.
However, I am not sure if we should change all elixirs to this type of time integration. Here is my reasoning: (i) CFL based time stepping is the current standard and what people are used to/know about (ii) When implementing/trying out/debugging/testing I personally like to have full control over the time stepping in the sense that with the choice of the CFL number I can directly play around with time step sizes etc. This often comes in very handy so I would argue that our "verification" elixirs keep the CFL based time stepping (eoc, ec, ...)
When implementing/trying out/debugging/testing I personally like to have full control over the time stepping in the sense that with the choice of the CFL number I can directly play around with time step sizes etc. This often comes in very handy so I would argue that our "verification" elixirs keep the CFL based time stepping (eoc, ec, ...)
Same here, but could we also do this by defaulting to adaptive=false
and specifying dt
?
Yes, you can set solve(ode, ..., adaptive=false)
and set dt
or add the step size callback. The new RK methods will still work with these arguments.
That is a good idea. I think it would be good to have some elixirs (maybe always the eoc ones that are available anyway for each PDE) with explicit time step callback and CFL. Then I do not mind having all others with the adatpive time stepping. If we have a "rule" that all eoc files use the dt calculation, it would also be easy to find for the PDE when needed...
The Runge-Kutta methods with automatic step size control optimized for compressible fluid dynamics Lisandro Dalcin, Matteo Parsani, David Ketcheson, and I published a few weeks ago in a preprint on arXiv are now available in the Julia differential equations ecosystem.
As discussed on Slack, it would be nice to use these improvements by switching our default time integration methods.
However, we should discuss whether we consider this to be a breaking change. I don't think so since it's not documented anywhere. On the other hand, people might argue that their code could behaves differently when they just
trixi_include
some elixir distributed with Trixi.