Skip to content

Commit

Permalink
Update batch.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
utkinis authored May 16, 2024
1 parent 0bfa360 commit e831650
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/BoundaryConditions/batch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ end
# exchange-only interface

function batch(grid; exchange=nothing)
exchange = regularise_exchange(grid, exchange)
return batch_set(grid, (), (), exchange)
exch = regularise_exchange(grid, exchange)
ntuple(Val(ndims(grid))) do D
batch(Side(1), Dim(D), grid, (), (); exchange=exch[D]),
batch(Side(2), Dim(D), grid, (), (); exchange=exch[D])
end
end

# custom batcher interface
Expand Down

0 comments on commit e831650

Please sign in to comment.