-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
chore: minor updates to SteadyStateDiff #82
Conversation
julia> sol = solve(prob, DynamicSS(Rodas5()); abstol = 1e-9, reltol = 1e-9)
(integrator.u, integrator.uprev, t, get_du(integrator)) = ([0.00019998000133326593, 9.998000233313312e-9], [0.0, 0.0], 9.999999999999999e-5, [0.0, 0.0])
retcode: Terminated
Interpolation: specialized 4rd order "free" stiffness-aware interpolation
t: 2-element Vector{Float64}:
0.0
9.999999999999999e-5
u: 2-element Vector{Vector{Float64}}:
[0.0, 0.0]
[0.00019998000133326593, 9.998000233313312e-9]
retcode: Success
u: 2-element Vector{Float64}:
0.00019998000133326593
9.998000233313312e-9
julia> sol = solve(prob, DynamicSS(Tsit5()); abstol = 1e-9, reltol = 1e-9)
(integrator.u, integrator.uprev, t, get_du(integrator)) = ([0.00019998000133326663, 9.998000233313266e-9], [0.0, 0.0], 9.999999999999999e-5, [1.9996000399973335, 0.00019994000933233337])
(integrator.u, integrator.uprev, t, get_du(integrator)) = ([0.002197581773691028, 1.207341413014797e-6], [0.00019998000133326663, 9.998000233313266e-9], 0.0010999999999999998, [1.995604836452618, 0.002192752408038969]) @oscardssmith: Chris mentioned you might know what is going on here ("it must just be giving k1") |
@ChrisRackauckas the SciMLSensitivity test failures you mentioned the other day, have the same issue. function G(p)
tmp_prob = remake(prob, u0 = convert.(eltype(p), prob.u0), p = p)
sol = solve(tmp_prob, DynamicSS(Tsit5()); abstol = 1e-14, reltol = 1e-14)
A = convert(Array, sol)
g(A, p, nothing)
end
res1 = ForwardDiff.gradient(G, p)
res2 = Calculus.gradient(G, p) ^This fixes it (only changing the solver) |
does |
No |
@ChrisRackauckas shouldn't fsallast be an accurate derivative? |
If it's an FSAL method SciML/OrdinaryDiffEq.jl#2445 |
Rodas5
seems to give incorrect results onget_du(integrator)
-- changed the tests at least temporarily to useTsit5