You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if!avoid_constant_ends && ts[notsaveat_idxs[i]] == t
182
186
if idxs ==nothing
183
187
vals[j] = timeseries[notsaveat_idxs[i]]
184
188
else
185
189
vals[j] = timeseries[notsaveat_idxs[i]][idxs]
186
190
end
187
-
elseifderiv == Val{0}&& ts[notsaveat_idxs[i-1]] == t # Can happen if it's the first value!
191
+
elseif!avoid_constant_ends&& ts[notsaveat_idxs[i-1]] == t # Can happen if it's the first value!
188
192
if idxs ==nothing
189
193
vals[j] = timeseries[notsaveat_idxs[i-1]]
190
194
else
@@ -242,13 +246,15 @@ times ts (sorted), with values timeseries and derivatives ks
242
246
tval < ts[1] &&error("Solution interpolation cannot extrapolate before the first timepoint. Either start solving earlier or use the local extrapolation from the integrator interface.")
243
247
tdir =sign(ts[end]-ts[1])
244
248
@inbounds i =searchsortedfirst(@view(ts[notsaveat_idxs]),tval,rev=tdir<0) # It's in the interval ts[i-1] to ts[i]
elseifderiv == Val{0}&& ts[notsaveat_idxs[i-1]] == tval # Can happen if it's the first value!
257
+
elseif!avoid_constant_ends&& ts[notsaveat_idxs[i-1]] == tval # Can happen if it's the first value!
252
258
if idxs ==nothing
253
259
val = timeseries[notsaveat_idxs[i-1]]
254
260
else
@@ -273,8 +279,6 @@ times ts (sorted), with values timeseries and derivatives ks
273
279
val =ode_interpolant(Θ,dt,timeseries[notsaveat_idxs[i-1]],timeseries[notsaveat_idxs[i]],ks[i],cache.caches[id.alg_choice[notsaveat_idxs[i-1]]],idxs_internal,deriv)
274
280
else
275
281
ode_addsteps!(ks[i],ts[notsaveat_idxs[i-1]],timeseries[notsaveat_idxs[i-1]],timeseries[notsaveat_idxs[i]],dt,f,cache) # update the kcurrent
val =ode_interpolant(Θ,dt,timeseries[notsaveat_idxs[i-1]],timeseries[notsaveat_idxs[i]],ks[i],cache,idxs_internal,deriv)
279
283
end
280
284
end
@@ -294,13 +298,15 @@ times ts (sorted), with values timeseries and derivatives ks
294
298
tval < ts[1] &&error("Solution interpolation cannot extrapolate before the first timepoint. Either start solving earlier or use the local extrapolation from the integrator interface.")
295
299
tdir =sign(ts[end]-ts[1])
296
300
@inbounds i =searchsortedfirst(@view(ts[notsaveat_idxs]),tval,rev=tdir<0) # It's in the interval ts[i-1] to ts[i]
0 commit comments