Skip to content

Commit 5d14526

Browse files
Update README
1 parent 1260f41 commit 5d14526

File tree

1 file changed

+18
-14
lines changed

1 file changed

+18
-14
lines changed

README.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,13 @@ generated code via:
5959
generate_function(de)
6060

6161
## Which returns:
62-
:((du, u, p, t)->begin
63-
du .= let (x, y, z, σ, ρ, β) = (u[1], u[2], u[3], p[1], p[2], p[3])
64-
* (y - x), x *- z) - y, x * y - β * z)
65-
end
62+
:((##363, u, p, t)->begin
63+
let (x, y, z, σ, ρ, β) = (u[1], u[2], u[3], p[1], p[2], p[3])
64+
##363[1] = σ * (y - x)
65+
##363[2] = x * (ρ - z) - y
66+
##363[3] = x * y - β * z
67+
end
6668
end)
67-
6869
```
6970
7071
and get the generated function via:
@@ -94,10 +95,12 @@ nlsys_func = generate_function(ns)
9495
which generates:
9596
9697
```julia
97-
:((du, u, p)->begin
98-
du .= let (y, x, z, σ, ρ, β) = (u[1], u[2], u[3], p[1], p[2], p[3])
99-
* (y - x), x *- z) - y, x * y - β * z)
100-
end
98+
:((##366, u, p, t)->begin
99+
let (y, z, x, ρ, σ, β) = (u[1], u[2], u[3], p[1], p[2], p[3])
100+
##366[1] = σ * (y - x)
101+
##366[2] = x * (ρ - z) - y
102+
##366[3] = x * y - β * z
103+
end
101104
end)
102105
```
103106
@@ -276,12 +279,13 @@ nlsys_func = generate_function(ns)
276279
expands to:
277280
278281
```julia
279-
:((du, u, p)->begin
280-
du .= let (x, y, z, σ, ρ, β) = (u[1], u[2], u[3], p[1], p[2], p[3])
281-
* (y - x), x *- z) - y, x * y - β * z)
282-
end
282+
:((##367, u, p, t)->begin
283+
let (x, y, z, σ, ρ, β) = (u[1], u[2], u[3], p[1], p[2], p[3])
284+
##367[1] = σ * (y - x)
285+
##367[2] = x * (ρ - z) - y
286+
##367[3] = x * y - β * z
287+
end
283288
end)
284-
285289
```
286290
287291
In addition, the Jacobian calculations take into account intermediate variables

0 commit comments

Comments
 (0)