Why falling back to linear interpolation once I use saveat?

julia> solve(prob,Tsit5(),calck=false)
retcode: Success
Interpolation: specialized 4th order "free" interpolation
t: 7-element Vector{Float64}:
 -1.0
 -0.9999
 -0.9989
 -0.9889
 -0.8889
  0.11109999999999953
  1.0
u: 7-element Vector{Vector{Float64}}:
 [0.0]
 [-9.999499999999994e-5]
 [-0.0010993949999999993]
 [-0.011038394999999993]
 [-0.10492839499999992]
 [-0.493828395]
 [-3.1837508629450926e-16]
julia> solve(prob,Tsit5(),saveat=x,calck=false)
retcode: Success
Interpolation: 1st order linear
t: 20-element Vector{Float64}:
 -1.0
 -0.9863613034027223
 -0.9458172417006346
 -0.879473751206489
 -0.7891405093963935
 -0.6772815716257409
 -0.5469481581224267
 -0.40169542465296926
 -0.24548548714079912
 -0.08257934547233227
  0.0825793454723324
  0.24548548714079924
  0.40169542465296953
  0.5469481581224269
  0.6772815716257411
  0.7891405093963936
  0.8794737512064891
  0.9458172417006346
  0.9863613034027223
  1.0
u: 20-element Vector{Vector{Float64}}:
 [0.0]
 [-0.013545689574841376]
 [-0.052714872650901676]
 [-0.11326296046939333]
 [-0.18862862821480028]
 [-0.2706448363680832]
 [-0.3504238561632425]
 [-0.4193203929064355]
 [-0.4698684378016226]
 [-0.4965903258506811]
 [-0.496590325850681]
 [-0.4698684378016221]
 [-0.41932039290643514]
 [-0.3504238561632428]
 [-0.270644836368083]
 [-0.1886286282148038]
 [-0.11326296046939634]
 [-0.05271487265090303]
 [-0.013545689574844788]
 [-3.1837508629450926e-16]

Because it’s assumed that you’ve already calculated at the points you wanted so there’s no reason to save the extra memory.

2 Likes