Skip to content

Commit

Permalink
Merge pull request #44 from SciML/ChrisRackauckas-patch-1
Browse files Browse the repository at this point in the history
Update diffeqr for ModelingToolkit v9
  • Loading branch information
ChrisRackauckas authored Mar 18, 2024
2 parents 0a77c20 + 05a6845 commit cfcc2d4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/diffeqr.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ jitoptimize_ode <- function (de,prob){
mtk <- julia_pkg_import("ModelingToolkit",functions)

odesys = mtk$modelingtoolkitize(prob)
odesys = mtk$complete(odesys)

JuliaCall::julia_assign("odesys", odesys)
jul_f = JuliaCall::julia_eval("jitf = ODEFunction(odesys,jac=true)")
JuliaCall::julia_assign("u0", prob$u0)
Expand Down Expand Up @@ -104,6 +106,7 @@ jitoptimize_sde <- function (de,prob){
mtk <- julia_pkg_import("ModelingToolkit",functions)

sdesys = mtk$modelingtoolkitize(prob)
sdesys = mtk$complete(sdesys)
JuliaCall::julia_assign("sdesys", sdesys)
jul_f = JuliaCall::julia_eval("jitf = SDEFunction(sdesys,jac=true)")
JuliaCall::julia_assign("u0", prob$u0)
Expand Down

0 comments on commit cfcc2d4

Please sign in to comment.