Skip to content

Commit 8cf8960

Browse files
authored
Merge branch 'SciML:master' into iss3707
2 parents 9480748 + 873bf7e commit 8cf8960

33 files changed

+251
-138
lines changed

.github/workflows/Downgrade.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Downgrade
2+
on:
3+
pull_request:
4+
branches:
5+
- master
6+
paths-ignore:
7+
- 'docs/**'
8+
- 'benchmark/**'
9+
push:
10+
branches:
11+
- master
12+
paths-ignore:
13+
- 'docs/**'
14+
- 'benchmark/**'
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
downgrade_mode: ['alldeps']
21+
julia-version: ['1.10']
22+
group: ['InterfaceI']
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: julia-actions/setup-julia@v2
26+
with:
27+
version: ${{ matrix.julia-version }}
28+
- uses: julia-actions/julia-downgrade-compat@v2
29+
with:
30+
skip: Pkg,TOML
31+
- uses: julia-actions/julia-buildpkg@1
32+
- uses: julia-actions/julia-runtest@1
33+
with:
34+
ALLOW_RERESOLVE: false
35+
env:
36+
GROUP: ${{ matrix.group }}

.github/workflows/Downstream.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
- {user: Neuroblox, repo: Neuroblox.jl, group: All}
4646
steps:
4747
- uses: actions/checkout@v4
48-
- uses: julia-actions/setup-julia@v1
48+
- uses: julia-actions/setup-julia@v2
4949
with:
5050
version: ${{ matrix.julia-version }}
5151
arch: x64

.github/workflows/ReleaseTest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- {package: Catalyst, group: All}
3030
steps:
3131
- uses: actions/checkout@v4
32-
- uses: julia-actions/setup-julia@v1
32+
- uses: julia-actions/setup-julia@v2
3333
with:
3434
version: ${{ matrix.julia-version }}
3535
arch: x64

Project.toml

Lines changed: 4 additions & 5 deletions
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 = "10.13.0"
4+
version = "10.15.0"
55

66
[deps]
77
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
@@ -41,7 +41,6 @@ LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
4141
MLStyle = "d8e11817-5142-5d16-987a-aa16d5891078"
4242
Moshi = "2e0e35c7-a2e4-4343-998d-7ef72827ed2d"
4343
NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"
44-
NonlinearSolve = "8913a72c-1f9b-4ce2-8d82-65094dcecaec"
4544
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
4645
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
4746
OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
@@ -117,7 +116,7 @@ EnumX = "1.0.4"
117116
ExprTools = "0.1.10"
118117
FMI = "0.14"
119118
FindFirstFunctions = "1"
120-
ForwardDiff = "0.10.3"
119+
ForwardDiff = "0.10.3, 1"
121120
FunctionWrappers = "1.1"
122121
FunctionWrappersWrappers = "0.1"
123122
Graphs = "1.5.2"
@@ -151,14 +150,14 @@ RecursiveArrayTools = "3.26"
151150
Reexport = "0.2, 1"
152151
RuntimeGeneratedFunctions = "0.5.9"
153152
SCCNonlinearSolve = "1.0.0"
154-
SciMLBase = "2.104.0"
153+
SciMLBase = "2.106.0"
155154
SciMLPublic = "1.0.0"
156155
SciMLStructures = "1.7"
157156
Serialization = "1"
158157
Setfield = "0.7, 0.8, 1"
159158
SimpleNonlinearSolve = "0.1.0, 1, 2"
160159
SparseArrays = "1"
161-
SpecialFunctions = "0.7, 0.8, 0.9, 0.10, 1.0, 2"
160+
SpecialFunctions = "1, 2"
162161
StaticArrays = "0.10, 0.11, 0.12, 1.0"
163162
StochasticDelayDiffEq = "1.10"
164163
StochasticDiffEq = "6.72.1"

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ eqs = [D(D(x)) ~ σ * (y - x),
4646
D(y) ~ x *- z) - y,
4747
D(z) ~ x * y - β * z]
4848

49-
@mtkbuild sys = ODESystem(eqs, t)
49+
@mtkcompile sys = System(eqs, t)
5050

5151
u0 = [D(x) => 2.0,
5252
x => 1.0,
@@ -83,13 +83,13 @@ eqs = [D(x) ~ σ * (y - x),
8383
D(y) ~ x *- z) - y,
8484
D(z) ~ x * y - β * z]
8585

86-
@named lorenz1 = ODESystem(eqs, t)
87-
@named lorenz2 = ODESystem(eqs, t)
86+
@named lorenz1 = System(eqs, t)
87+
@named lorenz2 = System(eqs, t)
8888

8989
@variables a(t)
9090
@parameters γ
9191
connections = [0 ~ lorenz1.x + lorenz2.y + a * γ]
92-
@mtkbuild connected = ODESystem(connections, t, systems = [lorenz1, lorenz2])
92+
@mtkcompile connected = System(connections, t, systems = [lorenz1, lorenz2])
9393

9494
u0 = [lorenz1.x => 1.0,
9595
lorenz1.y => 0.0,

demo.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ using ModelingToolkit: t_nounits as t, D_nounits as D
2020
eqs = [D(D(x)) ~ λ * x
2121
D(D(y)) ~ λ * y - g
2222
x^2 + y^2 ~ 1]
23-
@mtkbuild pend = System(eqs, t)
23+
@mtkcompile pend = System(eqs, t)
2424
prob = ODEProblem(pend, [x => -1, y => 0], (0.0, 10.0), [g => 1], guesses ==> 1])
2525

2626
sol = solve(prob, FBDF())
@@ -37,7 +37,7 @@ eqs = [
3737
D(z) ~ x * y - β * z + 0.1z * a
3838
]
3939

40-
@mtkbuild sys1 = System(eqs, t)
40+
@mtkcompile sys1 = System(eqs, t)
4141

4242
eqs = [
4343
D(x) ~ σ * (y - x),
@@ -49,7 +49,7 @@ noiseeqs = [0.1*x;
4949
0.1*y;
5050
0.1*z;;]
5151

52-
@mtkbuild sys2 = SDESystem(eqs, noiseeqs, t)
52+
@mtkcompile sys2 = SDESystem(eqs, noiseeqs, t)
5353

5454
u0 = [
5555
x => 1.0,
@@ -73,7 +73,7 @@ odeprob = ODEProblem(sys1, u0, (0.0, 10.0), p; check_compatibility = false)
7373
eqs = [0 ~ σ * (y - x),
7474
y ~ x *- z),
7575
β * z ~ x * y]
76-
@mtkbuild sys = System(eqs)
76+
@mtkcompile sys = System(eqs)
7777

7878
## ImplicitDiscrete Affects
7979

@@ -83,7 +83,7 @@ eqs = [D(D(x)) ~ λ * x
8383
D(D(y)) ~ λ * y - g
8484
x^2 + y^2 ~ 1]
8585
c_evt = [t ~ 5.0] => [x ~ Pre(x) + 0.1]
86-
@mtkbuild pend = System(eqs, t, continuous_events = c_evt)
86+
@mtkcompile pend = System(eqs, t, continuous_events = c_evt)
8787
prob = ODEProblem(pend, [x => -1, y => 0], (0.0, 10.0), [g => 1], guesses ==> 1])
8888

8989
sol = solve(prob, FBDF())
@@ -104,4 +104,4 @@ function SysC(; name)
104104
@named subsys = SysB(; var1 = x)
105105
return System([D(x) ~ x], t; systems = [subsys], name)
106106
end
107-
@mtkbuild sys = SysC()
107+
@mtkcompile sys = SysC()

docs/src/API/variables.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ ModelingToolkit also defines a plethora of custom operators.
337337
Pre
338338
Initial
339339
Shift
340+
EvalAt
340341
```
341342

342343
While not an operator, `ShiftIndex` is commonly used to use `Shift` operators in a more

docs/src/basics/Composition.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ sys = System(
126126
# ...
127127
# directly in the defaults argument
128128
defaults = Pair{Num, Any}[x => u,
129-
y => σ,
130-
z => u - 0.1])
129+
y => σ,
130+
z => u - 0.1])
131131
# by assigning to the parameter
132132
sys.y = u * 1.1
133133
```

docs/src/basics/MTKLanguage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ Refer the following example for different ways to define symbolic arrays.
382382
p1[1:4]
383383
p2[1:N]
384384
p3[1:N,
385-
1:M] = 10,
385+
1:M] = 10,
386386
[description = "A multi-dimensional array of arbitrary length with description"]
387387
(p4[1:N, 1:M] = 10),
388388
[description = "An alternate syntax for p3 to match the syntax of vanilla parameters macro"]

docs/src/examples/sparse_jacobians.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@ function brusselator_2d_loop(du, u, p, t)
2727
jm1 = limit(i + 1, N), limit(i - 1, N), limit(j + 1, N),
2828
limit(j - 1, N)
2929
du[i,
30-
j,
31-
1] = alpha * (u[im1, j, 1] + u[ip1, j, 1] + u[i, jp1, 1] + u[i, jm1, 1] -
32-
4u[i, j, 1]) +
33-
B + u[i, j, 1]^2 * u[i, j, 2] - (A + 1) * u[i, j, 1] +
34-
brusselator_f(x, y, t)
30+
j,
31+
1] = alpha * (u[im1, j, 1] + u[ip1, j, 1] + u[i, jp1, 1] + u[i, jm1, 1] -
32+
4u[i, j, 1]) +
33+
B + u[i, j, 1]^2 * u[i, j, 2] - (A + 1) * u[i, j, 1] +
34+
brusselator_f(x, y, t)
3535
du[i,
36-
j,
37-
2] = alpha * (u[im1, j, 2] + u[ip1, j, 2] + u[i, jp1, 2] + u[i, jm1, 2] -
38-
4u[i, j, 2]) +
39-
A * u[i, j, 1] - u[i, j, 1]^2 * u[i, j, 2]
36+
j,
37+
2] = alpha * (u[im1, j, 2] + u[ip1, j, 2] + u[i, jp1, 2] + u[i, jm1, 2] -
38+
4u[i, j, 2]) +
39+
A * u[i, j, 1] - u[i, j, 1]^2 * u[i, j, 2]
4040
end
4141
end
4242
p = (3.4, 1.0, 10.0, step(xyd_brusselator))

0 commit comments

Comments
 (0)