You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
7. Use the `max_g` function in the timestep `dt` definition (instead of `maximum`) as one now needs to gather the global maximum among all MPI processes.
84
-
85
-
8. Moving to the time loop, add halo update function `update_halo!` after the kernel that computes the fluid fluxes. You can additionally wrap it in the `@hide_communication` block to enable communication/computation overlap (using `b_width` defined above)
83
+
7. Moving to the time loop, add halo update function `update_halo!` after the kernel that computes the fluid fluxes. You can additionally wrap it in the `@hide_communication` block to enable communication/computation overlap (using `b_width` defined above)
86
84
87
85
````julia:ex6
88
86
@hide_communication b_width begin
@@ -91,7 +89,7 @@ end
91
89
end
92
90
````
93
91
94
-
9. Apply a similar step to the temperature update, where you can also include boundary condition computation as following (⚠️ no other construct is currently allowed)
92
+
8. Apply a similar step to the temperature update, where you can also include boundary condition computation as following (⚠️ no other construct is currently allowed)
95
93
96
94
````julia:ex7
97
95
@hide_communication b_width begin
@@ -102,7 +100,7 @@ end
102
100
end
103
101
````
104
102
105
-
10. Use now the `max_g` function instead of `maximum` to collect the global maximum among all local arrays spanning all MPI processes.
103
+
9. Use now the `max_g` function instead of `maximum` to collect the global maximum among all local arrays spanning all MPI processes. Use it in the timestep `dt` definition and in the error calculation (instead of `maximum`).
106
104
107
105
````julia:ex8
108
106
# time step
@@ -113,9 +111,9 @@ else
113
111
end
114
112
````
115
113
116
-
11. Make sure all printing statements are only executed by `me==0` in order to avoid each MPI process to print to screen, and use `nx_g()` instead of local `nx` in the printed statements when assessing the iteration per number of grid points.
114
+
10. Make sure all printing statements are only executed by `me==0` in order to avoid each MPI process to print to screen, and use `nx_g()` instead of local `nx` in the printed statements when assessing the iteration per number of grid points.
117
115
118
-
12. Update the visualisation and output saving part
116
+
11. Update the visualisation and output saving part
119
117
120
118
````julia:ex9
121
119
# visualisation
@@ -130,7 +128,7 @@ if do_viz && (it % nvis == 0)
130
128
end
131
129
````
132
130
133
-
13. Finalise the global grid before returning from the main function
131
+
12. Finalise the global grid before returning from the main function
0 commit comments