Skip to content

Commit 610b57b

Browse files
committed
more tutorial corrections
1 parent da6d06b commit 610b57b

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

docs/src/man/Tutorial_Chmy_MPI.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ EditURL = "../../../tutorials/Tutorial_Chmy_MPI.jl"
77
## Aim
88
In this tutorial, your will learn how to use [Chmy](https://github.com/PTsolvers/Chmy.jl) to perform a 2D diffusion simulation
99
on one or multiple CPU's or GPU's.
10-
`Chmy` is a package that allows you to specify grids and fields and create finite difference simulations
10+
`Chmy` is a package that allows you to specify grids and fields and create finite difference simulations, by
11+
applying stencil-based kernels in an efficient manner.
1112

1213
## 1. Load Chmy and required packages
1314

@@ -46,7 +47,7 @@ You need to specify compute kernel for the gradients:
4647
end
4748
```
4849

49-
You need to specify compute kernel to update the concentration
50+
You need to specify a compute kernel to update the concentration
5051

5152
```julia
5253
@kernel inbounds = true function update_C!(C, q, Δt, g::StructuredGrid, O)
@@ -56,7 +57,7 @@ You need to specify compute kernel to update the concentration
5657
end
5758
```
5859

59-
And a main function is required:
60+
And the main function is:
6061

6162
```julia
6263
@views function main(backend=CPU(); nxy_l=(126, 126))
@@ -121,7 +122,8 @@ In the code above, the part that calls `GMG` is:
121122
```julia
122123
add_box!(P,C,grid, xlim=(-1.0,1.0), zlim=(-1.0,1.0), phase=ConstantPhase(4), T=ConstantTemp(400))
123124
```
124-
which works just like any of the other GMG function.
125+
which works just like any of the other GMG function, except that you pass Chmy Scalar Fields and a Chmy grid object.
126+
Note that this also works in MPI-parallel.
125127

126128
## 3. Run the simulation on one CPU machine or GPU card:
127129

tutorials/Tutorial_Chmy_MPI.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
# ## Aim
44
# In this tutorial, your will learn how to use [Chmy](https://github.com/PTsolvers/Chmy.jl) to perform a 2D diffusion simulation
55
# on one or multiple CPU's or GPU's.
6-
# `Chmy` is a package that allows you to specify grids and fields and create finite difference simulations
6+
# `Chmy` is a package that allows you to specify grids and fields and create finite difference simulations, by
7+
# applying stencil-based kernels in an efficient manner.
78
#
89
# ## 1. Load Chmy and required packages
910
using Chmy, Chmy.Architectures, Chmy.Grids, Chmy.Fields, Chmy.BoundaryConditions, Chmy.GridOperators, Chmy.KernelLaunch
@@ -35,14 +36,14 @@ MPI.Init()
3536
q.y[I...] = -χ * ∂y(C, g, I...)
3637
end
3738

38-
# You need to specify compute kernel to update the concentration
39+
# You need to specify a compute kernel to update the concentration
3940
@kernel inbounds = true function update_C!(C, q, Δt, g::StructuredGrid, O)
4041
I = @index(Global, NTuple)
4142
I = I + O
4243
C[I...] -= Δt * divg(q, g, I...)
4344
end
4445

45-
# And a main function is required:
46+
# And the main function is:
4647
@views function main(backend=CPU(); nxy_l=(126, 126))
4748
arch = Arch(backend, MPI.COMM_WORLD, (0, 0))
4849
topo = topology(arch)
@@ -104,7 +105,8 @@ end
104105
# ```julia
105106
# add_box!(P,C,grid, xlim=(-1.0,1.0), zlim=(-1.0,1.0), phase=ConstantPhase(4), T=ConstantTemp(400))
106107
# ```
107-
# which works just like any of the other GMG function.
108+
# which works just like any of the other GMG function, except that you pass Chmy Scalar Fields and a Chmy grid object.
109+
# Note that this also works in MPI-parallel.
108110

109111
# ## 3. Run the simulation on one CPU machine or GPU card:
110112

0 commit comments

Comments
 (0)