@@ -260,7 +260,10 @@ p,t = rand(1, 50, 10), rand(1, 50, 10)
260260interp(p, t)
261261```
262262"""
263- function (f:: PINOODEInterpolation )(p:: AbstractArray , t:: AbstractArray )
263+ (f:: PINOODEInterpolation )(p, t) = f (t, nothing , Val{0 }, p, nothing )
264+
265+ function (f:: PINOODEInterpolation )(
266+ t:: AbstractArray , :: Nothing , :: Type{Val{0}} , p:: AbstractArray , continuity)
264267 if f. phi. model isa DeepONet
265268 f. phi ((p, t), f. θ)
266269 elseif f. phi. model isa Chain
@@ -273,7 +276,8 @@ function (f::PINOODEInterpolation)(p::AbstractArray, t::AbstractArray)
273276 end
274277end
275278
276- function (f:: PINOODEInterpolation )(p:: AbstractArray , t:: Number )
279+ function (f:: PINOODEInterpolation )(
280+ t:: Number , :: Nothing , :: Type{Val{0}} , p:: AbstractArray , continuity)
277281 if f. phi. model isa DeepONet
278282 t_ = [t]
279283 f. phi ((p, t_), f. θ)
288292SciMLBase. interp_summary (:: PINOODEInterpolation ) = " Trained neural network interpolation"
289293SciMLBase. allowscomplex (:: PINOODE ) = true
290294
291- function (sol:: SciMLBase.AbstractODESolution )(t:: Union{Number, AbstractArray} )
292- sol. interp (sol. prob. p, t)
295+ function (sol:: ODESolution{T, N, U, U2, D, T2, R, D2, P, A} )(
296+ t:: AbstractArray , :: Type{deriv} , idxs:: Nothing ,
297+ continuity) where {T, N, U, U2, D, T2, R, D2, P, A <: PINOODE , deriv}
298+ sol. interp (t, idxs, deriv, sol. prob. p, continuity)
299+ end
300+
301+ function (sol:: ODESolution{T, N, U, U2, D, T2, R, D2, P, A} )(
302+ t:: AbstractVector{<:Number} , :: Type{deriv} , idxs:: Nothing ,
303+ continuity) where {T, N, U, U2, D, T2, R, D2, P, A <: PINOODE , deriv}
304+ sol. interp (t, idxs, deriv, sol. prob. p, continuity)
293305end
294306
295307function SciMLBase. __solve (prob:: SciMLBase.AbstractODEProblem ,
0 commit comments