Skip to content

Commit b77d998

Browse files
Merge pull request #2719 from SciML/dw/odefunctionexpr_sys
Forward system in `ODEFunction` expression
2 parents e16c180 + f6df5dc commit b77d998

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ModelingToolkit"
22
uuid = "961ee093-0014-501f-94e3-6117800e7a78"
33
authors = ["Yingbo Ma <[email protected]>", "Chris Rackauckas <[email protected]> and contributors"]
4-
version = "9.13.0"
4+
version = "9.14.0"
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"

src/systems/diffeqs/abstractodesystem.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,7 @@ function ODEFunctionExpr{iip}(sys::AbstractODESystem, dvs = unknowns(sys),
752752
$_jac
753753
M = $_M
754754
ODEFunction{$iip}($fsym,
755+
sys = $sys,
755756
jac = $jacsym,
756757
tgrad = $tgradsym,
757758
mass_matrix = M,

test/odesystem.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ for f in [
5858
ODEFunction(de, [x, y, z], [σ, ρ, β], tgrad = true, jac = true),
5959
eval(ODEFunctionExpr(de, [x, y, z], [σ, ρ, β], tgrad = true, jac = true))
6060
]
61+
# system
62+
@test f.sys === de
63+
6164
# iip
6265
du = zeros(3)
6366
u = collect(1:3)

0 commit comments

Comments
 (0)