Skip to content
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

New algorithm FineRKN4() #1977

Merged
merged 5 commits into from
Jul 2, 2023

Conversation

HenryLangner
Copy link
Contributor

The last PR #1975 got a little messed up with all the changes across the three PRs (#1975, #1973 and #1976).

Just to be safe I added all the features introduced in #1975 to this up to date branch. With this PR I will close #1975.

The new algorithm FineRKN4() is added. In addition I have added the necessary tests (convergence, regression and the comparison tests between fixed step size and adaptive step size).

Furthermore there is now a convergence test for the damped oscillator. Since FineRKN4() and FineRKN5() are generalized RK-Nyström methods, they can be directly applied on velocity depended second order ODEs. To test their convergence on these type of ODEs the damped oscillator is added.

CC @ranocha

Copy link
Member

@ranocha ranocha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

src/caches/rkn_caches.jl Show resolved Hide resolved
Comment on lines +401 to +409
sim = test_convergence(dts, prob, Nystrom4(), dense_errors = true)
@test sim.𝒪est[:l2]≈4 rtol=1e-1
@test sim.𝒪est[:L2]≈4 rtol=1e-1
sim = test_convergence(dts, prob, FineRKN4(), dense_errors = true)
@test sim.𝒪est[:l2]≈4 rtol=1e-1
@test sim.𝒪est[:L2]≈4 rtol=1e-1
sim = test_convergence(dts, prob, FineRKN5(), dense_errors = true)
@test sim.𝒪est[:l2]≈5 rtol=1e-1
@test sim.𝒪est[:L2]≈4 rtol=1e-1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting! So the methods seem to have some superconvergence properties for the harmonic oscillator without damping but not for the version with damping used here.
(nothing blocking this PR from being merged, just an observation)

@ranocha
Copy link
Member

ranocha commented Jul 2, 2023

@ChrisRackauckas This is ready to be merged from my point of view. I don't see how the SciMLSensitivity failures could be related to this.

@ChrisRackauckas
Copy link
Member

Oh yes, I just missed this one sorry.

@ChrisRackauckas ChrisRackauckas merged commit 5789fd3 into SciML:master Jul 2, 2023
@ranocha
Copy link
Member

ranocha commented Jul 2, 2023

No problem, this can easily happen given the amount of packages you maintain. Thanks

@HenryLangner HenryLangner deleted the New_Algorithm_FineRKN4 branch July 3, 2023 11:50
@ranocha ranocha mentioned this pull request Jun 20, 2023
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants