-
-
Notifications
You must be signed in to change notification settings - Fork 238
Tableau Implementation for Tsit5 #2913
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
base: master
Are you sure you want to change the base?
Tableau Implementation for Tsit5 #2913
Conversation
|
@ChrisRackauckas : Request you to kindly review this PR and provide your feedback |
| """ | ||
| Evaluate a polynomial at Θ, given coefficients for Θ¹, Θ², ..., Θ⁶. | ||
| Assumes coeffs = [a₁, a₂, ..., a₆] for Θ¹, Θ², ..., Θ⁶. | ||
| """ | ||
| function eval_poly_theta(Θ, coeffs) | ||
| # coeffs[1]*Θ + coeffs[2]*Θ^2 + ... + coeffs[6]*Θ^6 | ||
| return sum(coeffs[i] * Θ^i for i in 1:length(coeffs)) | ||
| end |
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.
isn't this just evalpoly?
| [@evalpoly(Θ, tableau[i,:]...) for i in 1:num_stages] | ||
| else | ||
| # For derivative: d/dΘ [a₀ + a₁*Θ + a₂*Θ² + ...] = a₁ + 2*a₂*Θ + 3*a₃*Θ² + ... | ||
| [@evalpoly(Θ, [j * tableau[i, j+1] for j in 1:(num_coeffs-1)]...) for i in 1:num_stages] |
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.
@oscardssmith : Thanks for the feedback and suggestion. Apologies I was not familiar with this. Could you please check if this change looks right?
|
Sorry was trying to get this repo passing tests again first. This should just be added as part of the normal ExplicitRK implementation. With a field for the interpolation values added to the Note this is the same tableau as the one that is tested https://github.com/SciML/DiffEqDevTools.jl/blob/master/src/ode_tableaus.jl#L989 |
|
Thank you for these updates. I will work on what you said and send you a new PR tomorrow. |
|
@ChrisRackauckas Could you please review the changes I have made? I will do some more testing, but I wanted to know if I have incorporated your suggestions. I have also created a new PR in DiffEqBase, can you please review that as well? Thanks! |
|
all of the generic_dense parts are missing? |
@ChrisRackauckas Does this involve implementing equivalent logic as in
|
|
Yes exactly, just for the ExplicitRK tableau with its generic coefficient vector. |
In this PR, I have attempted to implement the butcher tableau approach for the Tsit5 algorithm for both solving and interpolation.
I have used the coefficient values from OrdinaryDiffEqExplicitRK. I am working on extending the benchmark tests for interpolation.
Please review my changes and provide feedback for the following: