Skip to content

Commit a63c0ad

Browse files
committed
Merge branch 'master' into myb/lin
2 parents a86916b + d5fef6a commit a63c0ad

File tree

7 files changed

+59
-27
lines changed

7 files changed

+59
-27
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ on:
33
pull_request:
44
branches:
55
- master
6+
paths-ignore:
7+
- 'docs/**'
68
push:
79
branches:
810
- master
11+
paths-ignore:
12+
- 'docs/**'
913
jobs:
1014
test:
1115
runs-on: ubuntu-latest

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 = "8.69.0"
4+
version = "8.69.1"
55

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

docs/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
2121
BenchmarkTools = "1.3"
2222
DifferentialEquations = "7.6"
2323
Distributions = "0.25"
24-
Documenter = "0.27, 1"
24+
Documenter = "1"
2525
ModelingToolkit = "8.33"
2626
NonlinearSolve = "0.3, 1"
2727
Optim = "1.7"

docs/make.jl

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,8 @@ makedocs(sitename = "ModelingToolkit.jl",
2323
authors = "Chris Rackauckas",
2424
modules = [ModelingToolkit],
2525
clean = true, doctest = false, linkcheck = true,
26+
warnonly = [:docs_block, :missing_docs, :cross_references],
2627
linkcheck_ignore = ["https://epubs.siam.org/doi/10.1137/0903023"],
27-
strict = [
28-
:doctest,
29-
:linkcheck,
30-
:parse_error,
31-
:example_block,
32-
# Other available options are
33-
# :autodocs_block, :cross_references, :docs_block, :eval_block, :example_block, :footnote, :meta_block, :missing_docs, :setup_block
34-
],
3528
format = Documenter.HTML(; analytics = "UA-90474609-3",
3629
assets = ["assets/favicon.ico"],
3730
mathengine,

docs/src/index.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,11 @@ You can also download the
230230

231231
```@eval
232232
using TOML
233+
using Markdown
233234
version = TOML.parse(read("../../Project.toml", String))["version"]
234235
name = TOML.parse(read("../../Project.toml", String))["name"]
235-
link = "https://github.com/SciML/" * name * ".jl/tree/gh-pages/v" * version *
236-
"/assets/Manifest.toml"
236+
link = Markdown.MD("https://github.com/SciML/" * name * ".jl/tree/gh-pages/v" * version *
237+
"/assets/Manifest.toml")
237238
```
238239

239240
```@raw html
@@ -243,10 +244,11 @@ link = "https://github.com/SciML/" * name * ".jl/tree/gh-pages/v" * version *
243244

244245
```@eval
245246
using TOML
247+
using Markdown
246248
version = TOML.parse(read("../../Project.toml", String))["version"]
247249
name = TOML.parse(read("../../Project.toml", String))["name"]
248-
link = "https://github.com/SciML/" * name * ".jl/tree/gh-pages/v" * version *
249-
"/assets/Project.toml"
250+
link = Markdown.MD("https://github.com/SciML/" * name * ".jl/tree/gh-pages/v" * version *
251+
"/assets/Project.toml")
250252
```
251253

252254
```@raw html

src/systems/connectors.jl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -299,14 +299,10 @@ function generate_connection_set!(connectionsets, domain_csets,
299299
else
300300
if lhs isa Number || lhs isa Symbolic
301301
push!(eqs, eq) # split connections and equations
302-
elseif lhs isa Connection
303-
if get_systems(lhs) === :domain
304-
connection2set!(domain_csets, namespace, get_systems(rhs), isouter)
305-
else
306-
push!(cts, get_systems(rhs))
307-
end
302+
elseif lhs isa Connection && get_systems(lhs) === :domain
303+
connection2set!(domain_csets, namespace, get_systems(rhs), isouter)
308304
else
309-
error("$eq is not a legal equation!")
305+
push!(cts, get_systems(rhs))
310306
end
311307
end
312308
end

src/systems/diffeqs/abstractodesystem.jl

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,37 @@ function generate_tgrad(sys::AbstractODESystem, dvs = states(sys), ps = paramete
8484
simplify = false, kwargs...)
8585
tgrad = calculate_tgrad(sys, simplify = simplify)
8686
pre = get_preprocess_constants(tgrad)
87-
return build_function(tgrad, dvs, ps, get_iv(sys); postprocess_fbody = pre, kwargs...)
87+
if ps isa Tuple
88+
return build_function(tgrad,
89+
dvs,
90+
ps...,
91+
get_iv(sys);
92+
postprocess_fbody = pre,
93+
kwargs...)
94+
else
95+
return build_function(tgrad,
96+
dvs,
97+
ps,
98+
get_iv(sys);
99+
postprocess_fbody = pre,
100+
kwargs...)
101+
end
88102
end
89103

90104
function generate_jacobian(sys::AbstractODESystem, dvs = states(sys), ps = parameters(sys);
91105
simplify = false, sparse = false, kwargs...)
92106
jac = calculate_jacobian(sys; simplify = simplify, sparse = sparse)
93107
pre = get_preprocess_constants(jac)
94-
return build_function(jac, dvs, ps, get_iv(sys); postprocess_fbody = pre, kwargs...)
108+
if ps isa Tuple
109+
return build_function(jac,
110+
dvs,
111+
ps...,
112+
get_iv(sys);
113+
postprocess_fbody = pre,
114+
kwargs...)
115+
else
116+
return build_function(jac, dvs, ps, get_iv(sys); postprocess_fbody = pre, kwargs...)
117+
end
95118
end
96119

97120
function generate_control_jacobian(sys::AbstractODESystem, dvs = states(sys),
@@ -364,8 +387,15 @@ function DiffEqBase.ODEFunction{iip, specialize}(sys::AbstractODESystem, dvs = s
364387
tgrad_oop, tgrad_iip = eval_expression ?
365388
(drop_expr(@RuntimeGeneratedFunction(eval_module, ex)) for ex in tgrad_gen) :
366389
tgrad_gen
367-
_tgrad(u, p, t) = tgrad_oop(u, p, t)
368-
_tgrad(J, u, p, t) = tgrad_iip(J, u, p, t)
390+
if p isa Tuple
391+
__tgrad(u, p, t) = tgrad_oop(u, p..., t)
392+
__tgrad(J, u, p, t) = tgrad_iip(J, u, p..., t)
393+
_tgrad = __tgrad
394+
else
395+
___tgrad(u, p, t) = tgrad_oop(u, p, t)
396+
___tgrad(J, u, p, t) = tgrad_iip(J, u, p, t)
397+
_tgrad = ___tgrad
398+
end
369399
else
370400
_tgrad = nothing
371401
end
@@ -379,8 +409,15 @@ function DiffEqBase.ODEFunction{iip, specialize}(sys::AbstractODESystem, dvs = s
379409
jac_oop, jac_iip = eval_expression ?
380410
(drop_expr(@RuntimeGeneratedFunction(eval_module, ex)) for ex in jac_gen) :
381411
jac_gen
382-
_jac(u, p, t) = jac_oop(u, p, t)
383-
_jac(J, u, p, t) = jac_iip(J, u, p, t)
412+
if p isa Tuple
413+
__jac(u, p, t) = jac_oop(u, p..., t)
414+
__jac(J, u, p, t) = jac_iip(J, u, p..., t)
415+
_jac = __jac
416+
else
417+
___jac(u, p, t) = jac_oop(u, p, t)
418+
___jac(J, u, p, t) = jac_iip(J, u, p, t)
419+
_jac = ___jac
420+
end
384421
else
385422
_jac = nothing
386423
end

0 commit comments

Comments
 (0)