Skip to content

Commit

Permalink
update grid generation
Browse files Browse the repository at this point in the history
  • Loading branch information
simone-silvestri committed Jan 20, 2025
1 parent d243578 commit 4250a9d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Grids/grid_generation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,11 @@ function generate_coordinate(FT, topo::AT, N, H, node_interval::Tuple{<:Number,
F = range(FT(F₋), FT(F₊), length = TF)
C = range(FT(C₋), FT(C₊), length = TC)

F = StepRangeLen(FT(F.ref), FT(F.step), F.len, F.offset)
C = StepRangeLen(FT(C.ref), FT(C.step), C.len, C.offset)
# MetalGPU cannot use a Float64 as a step, so we need to convert to Float32
if arch isa MetalGPU
F = StepRangeLen(FT(F.ref), FT(F.step), F.len, F.offset)
C = StepRangeLen(FT(C.ref), FT(C.step), C.len, C.offset)
end

F = OffsetArray(F, -H)
C = OffsetArray(C, -H)
Expand Down

0 comments on commit 4250a9d

Please sign in to comment.