From b9887ef938ead31a57bb6d57a9729829f53cedaa Mon Sep 17 00:00:00 2001 From: Ludovic Raess Date: Wed, 18 Dec 2024 09:54:20 +0100 Subject: [PATCH] Cleanup --- src/LevelSets/compute_levelsets.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/LevelSets/compute_levelsets.jl b/src/LevelSets/compute_levelsets.jl index 8a41ab0f..f7f70fef 100644 --- a/src/LevelSets/compute_levelsets.jl +++ b/src/LevelSets/compute_levelsets.jl @@ -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...) @@ -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...] @@ -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