1
1
# #### fill halo points based on topology
2
- @inline fill_halo_west! (c, H:: Int64 , N:: Int64 , :: Periodic ) = @views @. c[1 : H, :, :] = c[N+ 1 : N+ H, :, :]
3
- @inline fill_halo_south! (c, H:: Int64 , N:: Int64 , :: Periodic ) = @views @. c[:, 1 : H, :] = c[:, N+ 1 : N+ H, :]
4
- @inline fill_halo_top! (c, H:: Int64 , N:: Int64 , :: Periodic ) = @views @. c[:, :, 1 : H] = c[:, :, N+ 1 : N+ H]
2
+ @inline fill_halo_west! (c, H:: Int , N:: Int , :: Periodic ) = @views @. c[1 : H, :, :] = c[N+ 1 : N+ H, :, :]
3
+ @inline fill_halo_south! (c, H:: Int , N:: Int , :: Periodic ) = @views @. c[:, 1 : H, :] = c[:, N+ 1 : N+ H, :]
4
+ @inline fill_halo_top! (c, H:: Int , N:: Int , :: Periodic ) = @views @. c[:, :, 1 : H] = c[:, :, N+ 1 : N+ H]
5
5
6
- @inline fill_halo_east! (c, H:: Int64 , N:: Int64 , :: Periodic ) = @views @. c[N+ H+ 1 : N+ 2 H, :, :] = c[1 + H: 2 H, :, :]
7
- @inline fill_halo_north! (c, H:: Int64 , N:: Int64 , :: Periodic ) = @views @. c[:, N+ H+ 1 : N+ 2 H, :] = c[:, 1 + H: 2 H, :]
8
- @inline fill_halo_bottom! (c, H:: Int64 , N:: Int64 , :: Periodic ) = @views @. c[:, :, N+ H+ 1 : N+ 2 H] = c[:, :, 1 + H: 2 H]
6
+ @inline fill_halo_east! (c, H:: Int , N:: Int , :: Periodic ) = @views @. c[N+ H+ 1 : N+ 2 H, :, :] = c[1 + H: 2 H, :, :]
7
+ @inline fill_halo_north! (c, H:: Int , N:: Int , :: Periodic ) = @views @. c[:, N+ H+ 1 : N+ 2 H, :] = c[:, 1 + H: 2 H, :]
8
+ @inline fill_halo_bottom! (c, H:: Int , N:: Int , :: Periodic ) = @views @. c[:, :, N+ H+ 1 : N+ 2 H] = c[:, :, 1 + H: 2 H]
9
9
10
- @inline fill_halo_west! (c, H:: Int64 , N:: Int64 , :: Bounded ) = @views @. c[1 : H, :, :] = c[H+ 1 : H+ 1 , :, :]
11
- @inline fill_halo_south! (c, H:: Int64 , N:: Int64 , :: Bounded ) = @views @. c[:, 1 : H, :] = c[:, H+ 1 : H+ 1 , :]
12
- @inline fill_halo_top! (c, H:: Int64 , N:: Int64 , :: Bounded ) = @views @. c[:, :, 1 : H] = c[:, :, H+ 1 : H+ 1 ]
10
+ @inline fill_halo_west! (c, H:: Int , N:: Int , :: Bounded ) = @views @. c[1 : H, :, :] = c[H+ 1 : H+ 1 , :, :]
11
+ @inline fill_halo_south! (c, H:: Int , N:: Int , :: Bounded ) = @views @. c[:, 1 : H, :] = c[:, H+ 1 : H+ 1 , :]
12
+ @inline fill_halo_top! (c, H:: Int , N:: Int , :: Bounded ) = @views @. c[:, :, 1 : H] = c[:, :, H+ 1 : H+ 1 ]
13
13
14
- @inline fill_halo_east! (c, H:: Int64 , N:: Int64 , :: Bounded ) = @views @. c[N+ H+ 1 : N+ 2 H, :, :] = c[N+ H: N+ H, :, :]
15
- @inline fill_halo_north! (c, H:: Int64 , N:: Int64 , :: Bounded ) = @views @. c[:, N+ H+ 1 : N+ 2 H, :] = c[:, N+ H: N+ H, :]
16
- @inline fill_halo_bottom! (c, H:: Int64 , N:: Int64 , :: Bounded ) = @views @. c[:, :, N+ H+ 1 : N+ 2 H] = c[:, :, N+ H: N+ H]
14
+ @inline fill_halo_east! (c, H:: Int , N:: Int , :: Bounded ) = @views @. c[N+ H+ 1 : N+ 2 H, :, :] = c[N+ H: N+ H, :, :]
15
+ @inline fill_halo_north! (c, H:: Int , N:: Int , :: Bounded ) = @views @. c[:, N+ H+ 1 : N+ 2 H, :] = c[:, N+ H: N+ H, :]
16
+ @inline fill_halo_bottom! (c, H:: Int , N:: Int , :: Bounded ) = @views @. c[:, :, N+ H+ 1 : N+ 2 H] = c[:, :, N+ H: N+ H]
17
17
18
- @inline fill_halo_east_vel! (c, H:: Int64 , N:: Int64 , :: Bounded ) = @views @. c[N+ H+ 2 : N+ 2 H, :, :] = c[N+ H+ 1 : N+ H+ 1 , :, :]
19
- @inline fill_halo_north_vel! (c, H:: Int64 , N:: Int64 , :: Bounded ) = @views @. c[:, N+ H+ 2 : N+ 2 H, :] = c[:, N+ H+ 1 : N+ H+ 1 , :]
20
- @inline fill_halo_bottom_vel! (c, H:: Int64 , N:: Int64 , :: Bounded ) = @views @. c[:, :, N+ H+ 2 : N+ 2 H] = c[:, :, N+ H+ 1 : N+ H+ 1 ]
18
+ @inline fill_halo_east_vel! (c, H:: Int , N:: Int , :: Bounded ) = @views @. c[N+ H+ 2 : N+ 2 H, :, :] = c[N+ H+ 1 : N+ H+ 1 , :, :]
19
+ @inline fill_halo_north_vel! (c, H:: Int , N:: Int , :: Bounded ) = @views @. c[:, N+ H+ 2 : N+ 2 H, :] = c[:, N+ H+ 1 : N+ H+ 1 , :]
20
+ @inline fill_halo_bottom_vel! (c, H:: Int , N:: Int , :: Bounded ) = @views @. c[:, :, N+ H+ 2 : N+ 2 H] = c[:, :, N+ H+ 1 : N+ H+ 1 ]
21
21
22
- @inline fill_halo_east_Gc! (c, H:: Int64 , N:: Int64 , :: Bounded ) = @views @. c[N+ H+ 1 : N+ 2 H, :, :] = 0.0
23
- @inline fill_halo_north_Gc! (c, H:: Int64 , N:: Int64 , :: Bounded ) = @views @. c[:, N+ H+ 1 : N+ 2 H, :] = 0.0
24
- @inline fill_halo_bottom_Gc! (c, H:: Int64 , N:: Int64 , :: Bounded ) = @views @. c[:, :, N+ H+ 1 : N+ 2 H] = 0.0
22
+ @inline fill_halo_east_Gc! (c, H:: Int , N:: Int , :: Bounded ) = @views @. c[N+ H+ 1 : N+ 2 H, :, :] = 0.0
23
+ @inline fill_halo_north_Gc! (c, H:: Int , N:: Int , :: Bounded ) = @views @. c[:, N+ H+ 1 : N+ 2 H, :] = 0.0
24
+ @inline fill_halo_bottom_Gc! (c, H:: Int , N:: Int , :: Bounded ) = @views @. c[:, :, N+ H+ 1 : N+ 2 H] = 0.0
25
25
26
- fill_halo_east_vel! (c, H:: Int64 , N:: Int64 , TX:: Periodic ) = fill_halo_east! (c, H, N, TX)
27
- fill_halo_north_vel! (c, H:: Int64 , N:: Int64 , TY:: Periodic ) = fill_halo_north! (c, H, N, TY)
28
- fill_halo_bottom_vel! (c, H:: Int64 , N:: Int64 , TZ:: Periodic ) = fill_halo_bottom! (c, H, N, TZ)
26
+ fill_halo_east_vel! (c, H:: Int , N:: Int , TX:: Periodic ) = fill_halo_east! (c, H, N, TX)
27
+ fill_halo_north_vel! (c, H:: Int , N:: Int , TY:: Periodic ) = fill_halo_north! (c, H, N, TY)
28
+ fill_halo_bottom_vel! (c, H:: Int , N:: Int , TZ:: Periodic ) = fill_halo_bottom! (c, H, N, TZ)
29
29
30
- fill_halo_east_Gc! (c, H:: Int64 , N:: Int64 , TX:: Periodic ) = fill_halo_east! (c, H, N, TX)
31
- fill_halo_north_Gc! (c, H:: Int64 , N:: Int64 , TY:: Periodic ) = fill_halo_north! (c, H, N, TY)
32
- fill_halo_bottom_Gc! (c, H:: Int64 , N:: Int64 , TZ:: Periodic ) = fill_halo_bottom! (c, H, N, TZ)
30
+ fill_halo_east_Gc! (c, H:: Int , N:: Int , TX:: Periodic ) = fill_halo_east! (c, H, N, TX)
31
+ fill_halo_north_Gc! (c, H:: Int , N:: Int , TY:: Periodic ) = fill_halo_north! (c, H, N, TY)
32
+ fill_halo_bottom_Gc! (c, H:: Int , N:: Int , TZ:: Periodic ) = fill_halo_bottom! (c, H, N, TZ)
33
33
34
- @inline function fill_halo_nut! (nuts:: NamedTuple , g:: AbstractGrid{TX, TY, TZ} ) where {TX, TY, TZ}
34
+ @inline function fill_halo_nut! (nuts:: NamedTuple , g:: AbstractGrid{FT, TX, TY, TZ} ) where {FT, TX, TY, TZ}
35
35
for nut in nuts
36
36
fill_halo_west! (nut. data, g. Hx, g. Nx, TX ())
37
37
fill_halo_east! (nut. data, g. Hx, g. Nx, TX ())
@@ -43,7 +43,7 @@ fill_halo_bottom_Gc!(c, H::Int64, N::Int64, TZ::Periodic) = fill_halo_bottom!(c,
43
43
return nothing
44
44
end
45
45
46
- @inline function fill_halo_Gcs! (nuts:: NamedTuple , g:: AbstractGrid{TX, TY, TZ} ) where {TX, TY, TZ}
46
+ @inline function fill_halo_Gcs! (nuts:: NamedTuple , g:: AbstractGrid{FT, TX, TY, TZ} ) where {FT, TX, TY, TZ}
47
47
for nut in nuts
48
48
fill_halo_east_Gc! (nut. data, g. Hx, g. Nx, TX ())
49
49
fill_halo_north_Gc! (nut. data, g. Hy, g. Ny, TY ())
52
52
return nothing
53
53
end
54
54
55
- @inline function fill_halo_u! (u, g:: AbstractGrid{TX, TY, TZ} ) where {TX, TY, TZ}
55
+ @inline function fill_halo_u! (u, g:: AbstractGrid{FT, TX, TY, TZ} ) where {FT, TX, TY, TZ}
56
56
fill_halo_east_vel! (u, g. Hx, g. Nx, TX ())
57
57
58
58
fill_halo_west! (u, g. Hx, g. Nx, TX ())
62
62
fill_halo_bottom! (u, g. Hz, g. Nz, TZ ())
63
63
end
64
64
65
- @inline function fill_halo_v! (v, g:: AbstractGrid{TX, TY, TZ} ) where {TX, TY, TZ}
65
+ @inline function fill_halo_v! (v, g:: AbstractGrid{FT, TX, TY, TZ} ) where {FT, TX, TY, TZ}
66
66
fill_halo_north_vel! (v, g. Hy, g. Ny, TY ())
67
67
68
68
fill_halo_west! (v, g. Hx, g. Nx, TX ())
72
72
fill_halo_bottom! (v, g. Hz, g. Nz, TZ ())
73
73
end
74
74
75
- @inline function fill_halo_w! (w, g:: AbstractGrid{TX, TY, TZ} ) where {TX, TY, TZ}
75
+ @inline function fill_halo_w! (w, g:: AbstractGrid{FT, TX, TY, TZ} ) where {FT, TX, TY, TZ}
76
76
fill_halo_bottom_vel! (w, g. Hz, g. Nz, TZ ())
77
77
78
78
fill_halo_west! (w, g. Hx, g. Nx, TX ())
0 commit comments