Skip to content

Commit

Permalink
add sol(t)
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillZubov committed Oct 28, 2024
1 parent 501496e commit e8ac7f5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pino_ode_solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ function generate_loss(
end
end

struct PINOODEInterpolation{T <: PINOPhi, T2}
@concrete struct PINOODEInterpolation{T <: PINOPhi, T2}
phi::T
θ::T2
end
Expand All @@ -226,6 +226,10 @@ end
SciMLBase.interp_summary(::PINOODEInterpolation) = "Trained neural network interpolation"
SciMLBase.allowscomplex(::PINOODE) = true

function (sol::SciMLBase.AbstractODESolution)(t::AbstractArray)
sol.interp(t)
end

function SciMLBase.__solve(prob::SciMLBase.AbstractODEProblem,
alg::PINOODE,
args...;
Expand Down

0 comments on commit e8ac7f5

Please sign in to comment.