Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Brusselator right-hand side in some examples #114

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading