-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
Towards Common Perform step #717
Conversation
@@ -34,7 +51,28 @@ alg_cache(alg::SSPRK22,u,rate_prototype,uEltypeNoUnits,uBottomEltypeNoUnits,tTyp | |||
step_limiter!::StepLimiter | |||
end | |||
|
|||
struct SSPRK33ConstantCache <: OrdinaryDiffEqConstantCache 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.
you can probably make this cache and the previous the same?
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.
we need to be careful about the ones that have a different interpolation though.
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.
Yeah we can have same caches but different constructors (I mean using inheritence).
Shifting to SArrays makes us very close to our previous performance stats, atleast for this small script: using BenchmarkTools, OrdinaryDiffEq
f(u,p,t) = 1.01*u
u0=1/2
tspan = (0.0,1.0)
prob = ODEProblem(f,u0,tspan)
@btime sol = solve(prob,SSPRK33(),reltol=1e-8,abstol=1e-8,dt=0.01) Master:
PR:
|
Switch broadcasts to |
Ref: #233 |
This is a very rough implementation for common perform step for SSPRK22 and SSPRK33, which I am expanding to more algorithms.
This implementation is not at all feasible to be merged as it allocates in constant cache. I am learning the metaprogramming in Julia to know what all is possible for us.
Ideas I am thinking:
@unpack
which if an entry is not found in the object, assigns some specific default value. Like ifc0
doesn't exist in cache, it should be set to1.0
.