@@ -277,52 +277,52 @@ end
277277
278278# Extension of the constructor for a `Field` on a `TRG` grid. We assumes that the north boundary is a zipper
279279# with a sign that depends on the location of the field (revert the value of the halos if on edges, keep it if on nodes or centers)
280- function Field (loc:: Tuple{<:LX, <:LY, <:LZ} , grid:: MPITripolarGridOfSomeKind , data, old_bcs , indices:: Tuple , op, status) where {LX, LY, LZ}
280+ function Field (loc:: Tuple{<:LX, <:LY, <:LZ} , grid:: MPITripolarGridOfSomeKind , data, global_bcs , indices:: Tuple , op, status) where {LX, LY, LZ}
281281 arch = architecture (grid)
282282 yrank = arch. local_index[2 ] - 1
283283
284284 processor_size = ranks (arch)
285285
286286 indices = validate_indices (indices, loc, grid)
287287 validate_field_data (loc, data, grid, indices)
288- validate_boundary_conditions (loc, grid, old_bcs )
288+ validate_boundary_conditions (loc, grid, global_bcs )
289289
290- if isnothing (old_bcs ) || ismissing (old_bcs )
291- new_bcs = old_bcs
290+ if isnothing (global_bcs ) || ismissing (global_bcs )
291+ local_bcs = global_bcs
292292 else
293- new_bcs = inject_halo_communication_boundary_conditions (old_bcs , loc, arch. local_rank, arch. connectivity, topology (grid))
293+ local_bcs = inject_halo_communication_boundary_conditions (global_bcs , loc, arch. local_rank, arch. connectivity, topology (grid))
294294
295295 if yrank == processor_size[2 ] - 1 && processor_size[1 ] == 1
296- north_bc = if ! (old_bcs . north isa ZBC)
296+ north_bc = if ! (global_bcs . north isa ZBC)
297297 TY = fold_topology (grid. conformal_mapping)
298298 north_fold_boundary_condition (TY)(sign (LX, LY))
299299
300300 else
301- old_bcs . north
301+ global_bcs . north
302302 end
303303
304304 elseif yrank == processor_size[2 ] - 1 && processor_size[1 ] != 1
305- sgn = old_bcs . north isa ZBC ? old_bcs . north. condition : sign (LX, LY)
305+ sgn = global_bcs . north isa ZBC ? global_bcs . north. condition : sign (LX, LY)
306306 from = arch. local_rank
307307 to = arch. connectivity. north
308308 halo_communication = ZipperHaloCommunicationRanks (sgn; from, to)
309309 north_bc = DistributedCommunicationBoundaryCondition (halo_communication)
310310
311311 else
312- north_bc = new_bcs . north
312+ north_bc = local_bcs . north
313313 end
314314
315- new_bcs = FieldBoundaryConditions (; west= new_bcs . west,
316- east= new_bcs . east,
317- south= new_bcs . south,
315+ local_bcs = FieldBoundaryConditions (; west= local_bcs . west,
316+ east= local_bcs . east,
317+ south= local_bcs . south,
318318 north= north_bc,
319- top= new_bcs . top,
320- bottom= new_bcs . bottom)
319+ top= local_bcs . top,
320+ bottom= local_bcs . bottom)
321321 end
322322
323- buffers = communication_buffers (grid, data, new_bcs , (LX (), LY (), LZ ()))
323+ buffers = communication_buffers (grid, data, local_bcs , (LX (), LY (), LZ ()))
324324
325- return Field {LX, LY, LZ} (grid, data, new_bcs , indices, op, status, buffers)
325+ return Field {LX, LY, LZ} (grid, data, local_bcs , indices, op, status, buffers)
326326end
327327
328328# Reconstruction the global tripolar grid for visualization purposes
0 commit comments