Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ StaticArrays = "1.9.14"
StochasticDiffEq = "6.82.0, 7"
SymbolicIndexingInterface = "0.3.46"
SymbolicUtils = "4.31"
Symbolics = "7.30"
Symbolics = "7.32"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Symbolics = "7.32"
Symbolics = "7.31"

UnPack = "0.1, 1.0"
julia = "1.10"
BenchmarkTools = "1"
Expand Down
2 changes: 1 addition & 1 deletion lib/ModelingToolkitBase/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ StochasticDiffEq = "6.82.0, 7"
Sundials = "6"
SymbolicIndexingInterface = "0.3.39"
SymbolicUtils = "4.35.3"
Symbolics = "7.30"
Symbolics = "7.32"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Symbolics = "7.32"
Symbolics = "7.31"

7.31 added CodegenFunctionOptions, not 7.32

TaskLocalValues = "0.1.3"
Test = "1"
Tracker = "0.2.30"
Expand Down
7 changes: 7 additions & 0 deletions lib/ModelingToolkitBase/test/simple_mtkcompile.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
using ModelingToolkitBase
using ModelingToolkitBase: t_nounits as t, D_nounits as D

@testset "Problem code generation" begin
@variables x(t)
@mtkcompile sys = System([D(x) ~ 2x + 1], t)
prob = ODEProblem(sys, [x => 1.0], (0.0, 1.0))
@test prob.f(prob.u0, prob.p, 0.0) == [3.0]
end

Comment on lines +4 to +10

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@testset "Problem code generation" begin
@variables x(t)
@mtkcompile sys = System([D(x) ~ 2x + 1], t)
prob = ODEProblem(sys, [x => 1.0], (0.0, 1.0))
@test prob.f(prob.u0, prob.p, 0.0) == [3.0]
end

We have a billion tests that create an ODEProblem

@testset "User-provided `observed` is respected" begin
@variables x(t) y(t) z(t)
@mtkcompile sys = System([D(x) ~ 2x, z ~ y + x], t; observed = [y ~ 2x + 3])
Expand Down
Loading