Skip to content

Commit

Permalink
Update diffeqr for ModelingToolkit v9
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Mar 17, 2024
1 parent 0a77c20 commit 216116a
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$structural_simplify(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$structural_simplify(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 216116a

Please sign in to comment.