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
Copy file name to clipboardExpand all lines: src/interpolation.jl
+19-19Lines changed: 19 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ end
81
81
continuity::Symbol=:left) where {I, D}
82
82
t = id.t
83
83
u = id.u
84
-
typeof(id) <:HermiteInterpolation&& (du = id.du)
84
+
id isa HermiteInterpolation && (du = id.du)
85
85
tdir =sign(t[end] - t[1])
86
86
idx =sortperm(tvals, rev = tdir <0)
87
87
i =2# Start the search thinking it's between t[1] and t[2]
@@ -91,17 +91,17 @@ end
91
91
error("Solution interpolation cannot extrapolate past the final timepoint. Either solve on a longer timespan or use the local extrapolation from the integrator interface.")
92
92
tdir * tvals[idx[1]] < tdir * t[1] &&
93
93
error("Solution interpolation cannot extrapolate before the first timepoint. Either start solving earlier or use the local extrapolation from the integrator interface.")
@@ -206,7 +206,7 @@ times t (sorted), with values u and derivatives ks
206
206
continuity::Symbol=:left) where {I, D}
207
207
t = id.t
208
208
u = id.u
209
-
typeof(id) <:HermiteInterpolation&& (du = id.du)
209
+
id isa HermiteInterpolation && (du = id.du)
210
210
tdir =sign(t[end] - t[1])
211
211
t[end] == t[1] && tval != t[end] &&
212
212
error("Solution interpolation cannot extrapolate from a single timepoint. Either solve on a longer timespan or use the local extrapolation from the integrator interface.")
@@ -215,7 +215,7 @@ times t (sorted), with values u and derivatives ks
215
215
tdir * tval < tdir * t[1] &&
216
216
error("Solution interpolation cannot extrapolate before the first timepoint. Either start solving earlier or use the local extrapolation from the integrator interface.")
217
217
@inbounds i =searchsortedfirst(t, tval, rev = tdir <0) # It's in the interval t[i-1] to t[i]
@@ -256,7 +256,7 @@ times t (sorted), with values u and derivatives ks
256
256
continuity::Symbol=:left) where {I, D}
257
257
t = id.t
258
258
u = id.u
259
-
typeof(id) <:HermiteInterpolation&& (du = id.du)
259
+
id isa HermiteInterpolation && (du = id.du)
260
260
tdir =sign(t[end] - t[1])
261
261
t[end] == t[1] && tval != t[end] &&
262
262
error("Solution interpolation cannot extrapolate from a single timepoint. Either solve on a longer timespan or use the local extrapolation from the integrator interface.")
@@ -265,7 +265,7 @@ times t (sorted), with values u and derivatives ks
265
265
tdir * tval < tdir * t[1] &&
266
266
error("Solution interpolation cannot extrapolate before the first timepoint. Either start solving earlier or use the local extrapolation from the integrator interface.")
267
267
@inbounds i =searchsortedfirst(t, tval, rev = tdir <0) # It's in the interval t[i-1] to t[i]
0 commit comments