Skip to content

Commit

Permalink
fix: rely on defaults of jit-ed system
Browse files Browse the repository at this point in the history
  • Loading branch information
AayushSabharwal committed Nov 19, 2024
1 parent 56c7061 commit 1b2f134
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions R/diffeqr.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,8 @@ jitoptimize_ode <- function (de,prob){
odesys = mtk$modelingtoolkitize(prob)

JuliaCall::julia_assign("odesys", odesys)
jul_f = JuliaCall::julia_eval("jitf = ODEFunction(complete(odesys, split=false),jac=true)")
JuliaCall::julia_assign("u0", prob$u0)
JuliaCall::julia_assign("p", prob$p)
JuliaCall::julia_assign("tspan", prob$tspan)
new_prob <- JuliaCall::julia_eval("ODEProblem(jitf, u0, tspan, p)")
new_prob <- JuliaCall::julia_eval("ODEProblem(complete(odesys, split=false), [], tspan; jac=true)")
}

#' Jit Optimize an SDEProblem
Expand Down Expand Up @@ -106,11 +103,8 @@ jitoptimize_sde <- function (de,prob){

sdesys = mtk$modelingtoolkitize(prob)
JuliaCall::julia_assign("sdesys", sdesys)
jul_f = JuliaCall::julia_eval("jitf = SDEFunction(complete(sdesys, split=false),jac=true)")
JuliaCall::julia_assign("u0", prob$u0)
JuliaCall::julia_assign("p", prob$p)
JuliaCall::julia_assign("tspan", prob$tspan)
new_prob <- JuliaCall::julia_eval("SDEProblem(jitf, jitf.g, u0, tspan, p)")
new_prob <- JuliaCall::julia_eval("SDEProblem(complete(sdesys, split=false), [], tspan; jac=true)")
}

#' Setup DiffEqGPU
Expand Down

0 comments on commit 1b2f134

Please sign in to comment.