From 491b643b71e2d5c6dba44559b557f54915bd5a72 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Tue, 13 Aug 2024 15:22:42 +0300 Subject: [PATCH] fix Brusselator right-hand side in some examples --- bench/runbenchmarks.jl | 2 +- docs/ChaosGallery/Gallery/Brusselator.md | 6 +++--- examples/Brusselator.jl | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bench/runbenchmarks.jl b/bench/runbenchmarks.jl index c62ed28e..711d1b41 100644 --- a/bench/runbenchmarks.jl +++ b/bench/runbenchmarks.jl @@ -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)) diff --git a/docs/ChaosGallery/Gallery/Brusselator.md b/docs/ChaosGallery/Gallery/Brusselator.md index eeabd7ff..6c9d7a12 100644 --- a/docs/ChaosGallery/Gallery/Brusselator.md +++ b/docs/ChaosGallery/Gallery/Brusselator.md @@ -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} @@ -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) @@ -35,4 +35,4 @@ plot(sol, vars=(0,1,2)) ![BrusselatorPhase](./assets/Brusselator.png) -![BrusselatorTime](./assets/BrusselatorTime.png) \ No newline at end of file +![BrusselatorTime](./assets/BrusselatorTime.png) diff --git a/examples/Brusselator.jl b/examples/Brusselator.jl index dcac97d8..90d56ddd 100644 --- a/examples/Brusselator.jl +++ b/examples/Brusselator.jl @@ -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))