@@ -6,7 +6,7 @@ using Oceananigans.Utils: configure_kernel
66 grid::AbstractGrid,
77 loc, indices)
88
9- Construct preconfigured boundary condition kernels for a given `data` array, `grid`,
9+ Construct preconfigured boundary condition kernels for a given `data` array, `grid`,
1010and the provided `bcs` (a FieldBoundaryConditions` object).
1111Return a new `FieldBoundaryConditions` object with the preconfigured kernels and
1212ordered boundary conditions.
@@ -48,7 +48,7 @@ construct_boundary_conditions_kernels(::Missing, data, grid, loc, indices) = mis
4848 for task in 1 : length (sides)
4949 side = sides[task]
5050 bc = select_bc (ordered_bcs[task])
51-
51+
5252 size = fill_halo_size (data, side, indices, bc, loc, grid)
5353 offset = fill_halo_offset (size, side, indices)
5454 kernel! = fill_halo_kernel! (side, bc, grid, size, offset, data, reduced_dimensions)
@@ -84,26 +84,26 @@ fill_halo_kernel!(value, bc::NoBC, args...) = nothing
8484# #### Two-sided fill halo kernels
8585# ####
8686
87- fill_halo_kernel! (:: WestAndEast , bc:: BoundaryCondition , grid, size, offset, data, reduced_dimensions) =
87+ fill_halo_kernel! (:: WestAndEast , bc:: BoundaryCondition , grid, size, offset, data, reduced_dimensions) =
8888 configure_kernel (architecture (grid), grid, kernel_parameters (size, offset), _fill_west_and_east_halo!; reduced_dimensions)[1 ]
8989
9090fill_halo_kernel! (:: SouthAndNorth , bc:: BoundaryCondition , grid, size, offset, data, reduced_dimensions) =
9191 configure_kernel (architecture (grid), grid, kernel_parameters (size, offset), _fill_south_and_north_halo!; reduced_dimensions)[1 ]
9292
93- fill_halo_kernel! (:: BottomAndTop , bc:: BoundaryCondition , grid, size, offset, data, reduced_dimensions) =
93+ fill_halo_kernel! (:: BottomAndTop , bc:: BoundaryCondition , grid, size, offset, data, reduced_dimensions) =
9494 configure_kernel (architecture (grid), grid, kernel_parameters (size, offset), _fill_bottom_and_top_halo!; reduced_dimensions)[1 ]
9595
9696# ####
9797# #### One-sided fill halo kernels
9898# ####
9999
100- fill_halo_kernel! (:: West , bc:: BoundaryCondition , grid, size, offset, data, reduced_dimensions) =
100+ fill_halo_kernel! (:: West , bc:: BoundaryCondition , grid, size, offset, data, reduced_dimensions) =
101101 configure_kernel (architecture (grid), grid, kernel_parameters (size, offset), _fill_only_west_halo!; reduced_dimensions)[1 ]
102102
103- fill_halo_kernel! (:: East , bc:: BoundaryCondition , grid, size, offset, data, reduced_dimensions) =
103+ fill_halo_kernel! (:: East , bc:: BoundaryCondition , grid, size, offset, data, reduced_dimensions) =
104104 configure_kernel (architecture (grid), grid, kernel_parameters (size, offset), _fill_only_east_halo!; reduced_dimensions)[1 ]
105105
106- fill_halo_kernel! (:: South , bc:: BoundaryCondition , grid, size, offset, data, reduced_dimensions) =
106+ fill_halo_kernel! (:: South , bc:: BoundaryCondition , grid, size, offset, data, reduced_dimensions) =
107107 configure_kernel (architecture (grid), grid, kernel_parameters (size, offset), _fill_only_south_halo!; reduced_dimensions)[1 ]
108108
109109fill_halo_kernel! (:: North , bc:: BoundaryCondition , grid, size, offset, data, reduced_dimensions) =
@@ -119,17 +119,17 @@ fill_halo_kernel!(::Top, bc::BoundaryCondition, grid, size, offset, data, reduce
119119# #### Periodic fill halo kernels (Always two-sided)
120120# ####
121121
122- function fill_halo_kernel! (:: WestAndEast , bc:: PBC , grid, size, offset, data, reduced_dimensions)
122+ function fill_halo_kernel! (:: WestAndEast , bc:: PBC , grid, size, offset, data, reduced_dimensions)
123123 yz_size, offset = periodic_size_and_offset (data, 2 , 3 , size, offset)
124124 return configure_kernel (architecture (grid), grid, kernel_parameters (yz_size, offset), _fill_periodic_west_and_east_halo!)[1 ]
125125end
126126
127- function fill_halo_kernel! (:: SouthAndNorth , bc:: PBC , grid, size, offset, data, reduced_dimensions)
127+ function fill_halo_kernel! (:: SouthAndNorth , bc:: PBC , grid, size, offset, data, reduced_dimensions)
128128 xz_size, offset = periodic_size_and_offset (data, 1 , 3 , size, offset)
129129 return configure_kernel (architecture (grid), grid, kernel_parameters (xz_size, offset), _fill_periodic_south_and_north_halo!)[1 ]
130130end
131131
132- function fill_halo_kernel! (:: BottomAndTop , bc:: PBC , grid, size, offset, data, reduced_dimensions)
132+ function fill_halo_kernel! (:: BottomAndTop , bc:: PBC , grid, size, offset, data, reduced_dimensions)
133133 xy_size, offset = periodic_size_and_offset (data, 1 , 2 , size, offset)
134134 return configure_kernel (architecture (grid), grid, kernel_parameters (xy_size, offset), _fill_periodic_bottom_and_top_halo!)[1 ]
135135end
@@ -149,7 +149,7 @@ for Side in (:WestAndEast, :SouthAndNorth, :BottomAndTop, :West, :East, :South,
149149end
150150
151151# ####
152- # #### MultiRegion Boundary Conditions
152+ # #### MultiRegion Boundary Conditions
153153# ####
154154
155155# A struct to hold the side of the fill_halo kernel
0 commit comments