Skip to content

Commit bb03943

Browse files
authored
Update brusselator.md
Alex, There is a typos At line 137 & line 146, the position of the variable time, here described using the indices (k), should be at the 3rd position as in solu = sol[u(x, y, t)] and in solv = sol[v(x, y, t)] I had also to remove the plots directory in 139 & line 148 and left only the just created gif file. This way the example runs perfectly. Naceur
1 parent 9a6b069 commit bb03943

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/src/tutorials/brusselator.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,17 @@ For `u`:
134134
```julia
135135
using Plots
136136
anim = @animate for k in 1:length(discrete_t)
137-
heatmap(solu[k, 2:end, 2:end], title="$(discrete_t[k])") # 2:end since end = 1, periodic condition
137+
heatmap(solu[2:end, 2:end, k], title="$(discrete_t[k])") # 2:end since end = 1, periodic condition
138138
end
139-
gif(anim, "plots/Brusselator2Dsol_u.gif", fps = 8)
139+
gif(anim, "Brusselator2Dsol_u.gif", fps = 8)
140140
```
141141
![Brusselator2Dsol_u](https://user-images.githubusercontent.com/9698054/159934498-e5c21b13-c63b-4cd2-9149-49e521765141.gif)
142142

143143
For `v`:
144144
```julia
145145
anim = @animate for k in 1:length(discrete_t)
146-
heatmap(solv[k, 2:end, 2:end], title="$(discrete_t[k])")
146+
heatmap(solv[k, 2:end, 2:end, k], title="$(discrete_t[k])")
147147
end
148-
gif(anim, "plots/Brusselator2Dsol_v.gif", fps = 8)
148+
gif(anim, "Brusselator2Dsol_v.gif", fps = 8)
149149
```
150150
![Brusselator2Dsol_v](https://i.imgur.com/3kQNMI3.gif)

0 commit comments

Comments
 (0)