Skip to content

Commit

Permalink
Cleanup (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
luraess authored Dec 18, 2024
2 parents d780c84 + b9887ef commit b1a5354
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/LevelSets/compute_levelsets.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@kernel inbounds = true function init_levelset!::Field, dem::AbstractField, dem_grid::UniformGrid, Ψ_grid::UniformGrid, cutoff, R, O)
@kernel inbounds = true function init_levelset!::Field, dem::AbstractField, dem_grid::UniformGrid, Ψ_grid::UniformGrid, cutoff, R, O=Offset())
I = @index(Global, NTuple)
I = I + O
x, y, z = coord(Ψ_grid, location(Ψ), I...)
Expand All @@ -7,7 +7,7 @@
Ψ[I...] = ud * sgn
end

@kernel inbounds = true function invert_levelset!::Field, O)
@kernel inbounds = true function _invert_levelset!::Field, O=Offset())
I = @index(Global, NTuple)
I = I + O
Ψ[I...] = -Ψ[I...]
Expand All @@ -30,6 +30,6 @@ end
Invert level set `Ψ` to set what's below the surface as "inside".
"""
function invert_levelset!(arch::Architecture, launch, Ψ::Field, grid::UniformGrid)
launch(arch, grid, invert_levelset! => (Ψ,); bc=batch(grid, Ψ => Neumann(); exchange=Ψ))
launch(arch, grid, _invert_levelset! => (Ψ,); bc=batch(grid, Ψ => Neumann(); exchange=Ψ))
return
end

0 comments on commit b1a5354

Please sign in to comment.