Skip to content

Commit

Permalink
fix Brusselator right-hand side in some examples
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl committed Aug 13, 2024
1 parent 8576eb0 commit 491b643
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bench/runbenchmarks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ u0 = [0.2, 0.03]
function Brusselator!(du, u, p, t)
a, μ = 1, 4
du[1] = a -+ 1) * u[1] + (u[1])^2 * u[2]
return du[2] = μ * u[1] - (u[1])^2 * u[1]
return du[2] = μ * u[1] - (u[1])^2 * u[2]
end

prob = FODEProblem(Brusselator!, α, u0, (0, 20))
Expand Down
6 changes: 3 additions & 3 deletions docs/ChaosGallery/Gallery/Brusselator.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
```math
\begin{cases}
{_{t_0}D_t^\alpha}y_1(t)=a-(\mu+1)y_1(t)+(y_1(t))^2y_2(t)\\
{_{t_0}D_t^\alpha}y_2(t)=\mu y_1(t)-(y_1(t))^2y_1(t)\\
{_{t_0}D_t^\alpha}y_2(t)=\mu y_1(t)-(y_1(t))^2y_2(t)\\
y_1(t_0)=y_{1,0}\\
y_2(t_0)=y_{2,0}
\end{cases}
Expand All @@ -20,7 +20,7 @@ tspan = (0, 100)
function Brusselator!(du, u, p, t)
a, μ = 1, 4
du[1] = a-+1)*u[1]+(u[1])^2*u[2]
du[2] = μ*u[1]-(u[1])^2*u[1]
du[2] = μ*u[1]-(u[1])^2*u[2]
end

prob = FODEProblem(Brusselator!, α, u0, tspan)
Expand All @@ -35,4 +35,4 @@ plot(sol, vars=(0,1,2))

![BrusselatorPhase](./assets/Brusselator.png)

![BrusselatorTime](./assets/BrusselatorTime.png)
![BrusselatorTime](./assets/BrusselatorTime.png)
2 changes: 1 addition & 1 deletion examples/Brusselator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ h = 0.001
function Brusselator!(du, u, p, t)
a, μ = 1, 4
du[1] = a -+ 1) * u[1] + (u[1])^2 * u[2]
du[2] = μ * u[1] - (u[1])^2 * u[1]
du[2] = μ * u[1] - (u[1])^2 * u[2]
end

prob = FODESystem(Brusselator!, α, u0, (0, 100))
Expand Down

0 comments on commit 491b643

Please sign in to comment.