Skip to content

Commit 98eb1d0

Browse files
Repair documentation example setup
Supply the position-domain initialization equations, bind OnePort's extended names explicitly, and make OrdinaryDiffEqSDIRK a direct documentation dependency for ImplicitEuler. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
1 parent 37ae899 commit 98eb1d0

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

docs/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ IfElse = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"
77
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
88
ModelingToolkitStandardLibrary = "16a59e39-deab-5bd0-87e4-056b12336739"
99
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
10+
OrdinaryDiffEqSDIRK = "2d112036-d095-4a1e-ab9a-08536f3ecdbf"
1011
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
1112
SciCompDSL = "91a8cdf1-4ca6-467b-a780-87fda3fff15e"
1213

@@ -19,5 +20,6 @@ IfElse = "0.1"
1920
ModelingToolkit = "11"
2021
ModelingToolkitStandardLibrary = "2.28.0"
2122
OrdinaryDiffEq = "6, 7"
23+
OrdinaryDiffEqSDIRK = "1, 2"
2224
Plots = "1.36"
2325
SciCompDSL = "1"

docs/src/connectors/connections.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ nothing # hide
191191
As can be seen, we get exactly the same result. The only difference here is that we are solving an extra equation, which allows us to plot the body position as well.
192192

193193
```@example connections
194-
prob = ODEProblem(sys, [], (0, 10.0), fully_determined = true)
194+
prob = ODEProblem(
195+
sys, [], (0, 10.0); initialization_eqs = [sys.body.s ~ 0, sys.body.v ~ 1])
195196
sol_p = solve(prob)
196197
197198
p1 = plot(sol_p, idxs = [body.v])

docs/src/tutorials/custom_component.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ this can almost be directly translated to the syntax of `ModelingToolkit`.
3636

3737
```@example components
3838
@mtkmodel NonlinearResistor begin
39-
@extend OnePort()
39+
@extend v, i = oneport = OnePort()
4040
@parameters begin
4141
Ga
4242
Gb
@@ -58,7 +58,7 @@ nothing # hide
5858
Since the non-linear resistor is essentially a standard electrical component with two ports, we can extend from the `OnePort` component of the library.
5959

6060
```julia
61-
@extend OnePort()
61+
@extend v, i = oneport = OnePort()
6262
```
6363

6464
This extends `OnePort` and unpacks `v` and `i` variables.

0 commit comments

Comments
 (0)