diff --git a/src/Interpolations.jl b/src/Interpolations.jl index ad119bdc..d87a85f1 100644 --- a/src/Interpolations.jl +++ b/src/Interpolations.jl @@ -282,14 +282,11 @@ end @parallel_indices (i, j, k) function _velocity2vertex!(Vx_v, Vy_v, Vz_v, Vx, Vy, Vz) Vx_v[i, j, k] = - 0.25 * - (Vx[i, j, k] + Vx[i, j + 1, k] + Vx[i, j, k + 1] + Vx[i, j + 1, k + 1]) + 0.25 * (Vx[i, j, k] + Vx[i, j + 1, k] + Vx[i, j, k + 1] + Vx[i, j + 1, k + 1]) Vy_v[i, j, k] = - 0.25 * - (Vy[i, j, k] + Vy[i + 1, j, k] + Vy[i, j, k + 1] + Vy[i + 1, j, k + 1]) + 0.25 * (Vy[i, j, k] + Vy[i + 1, j, k] + Vy[i, j, k + 1] + Vy[i + 1, j, k + 1]) Vz_v[i, j, k] = - 0.25 * - (Vz[i, j, k] + Vz[i, j + 1, k] + Vz[i + 1, j, k] + Vz[i + 1, j + 1, k]) + 0.25 * (Vz[i, j, k] + Vz[i, j + 1, k] + Vz[i + 1, j, k] + Vz[i + 1, j + 1, k]) return nothing end @@ -318,4 +315,4 @@ end Vx_c[i, j, k] = (Vx[i, j + 1] + Vx[i + 1, j + 1]) / 2 Vy_c[i, j, k] = (Vy[i + 1, j] + Vy[i + 1, j + 1]) / 2 return nothing -end \ No newline at end of file +end diff --git a/src/common.jl b/src/common.jl index 97f2d4b8..18117e31 100644 --- a/src/common.jl +++ b/src/common.jl @@ -61,7 +61,8 @@ include("particles/subgrid_diffusion.jl") export subgrid_characteristic_time! include("Interpolations.jl") -export vertex2center!, center2vertex!, temperature2center!, velocity2vertex!, velocity2center! +export vertex2center!, + center2vertex!, temperature2center!, velocity2vertex!, velocity2center! include("advection/weno5.jl") export WENO_advection! diff --git a/src/ext/AMDGPU/2D.jl b/src/ext/AMDGPU/2D.jl index ef9c24b9..e3772eb0 100644 --- a/src/ext/AMDGPU/2D.jl +++ b/src/ext/AMDGPU/2D.jl @@ -263,7 +263,7 @@ end function JR2D.velocity2center!(Vx_c::T, Vy_c::T, Vx::T, Vy::T) where {T<:ROCArray} velocity2center!(Vx_c, Vy_c, Vx, Vy) - nothing + return nothing end function JR2D.velocity2displacement!( diff --git a/src/ext/AMDGPU/3D.jl b/src/ext/AMDGPU/3D.jl index 8e3fc50c..ddc8432b 100644 --- a/src/ext/AMDGPU/3D.jl +++ b/src/ext/AMDGPU/3D.jl @@ -266,8 +266,10 @@ function JR3D.velocity2vertex!( return nothing end -function JR3D.velocity2center!(Vx_c::T, Vy_c::T, Vz_c::T, Vx::T, Vy::T, Vz::T) where {T<:ROCArray} - velocity2center!(Vx_c, Vy_c, Vz_c, Vx, Vy, Vz) +function JR3D.velocity2center!( + Vx_c::T, Vy_c::T, Vz_c::T, Vx::T, Vy::T, Vz::T +) where {T<:ROCArray} + return velocity2center!(Vx_c, Vy_c, Vz_c, Vx, Vy, Vz) end function JR3D.velocity2displacement!( diff --git a/src/ext/CUDA/2D.jl b/src/ext/CUDA/2D.jl index 4978930f..f447d85c 100644 --- a/src/ext/CUDA/2D.jl +++ b/src/ext/CUDA/2D.jl @@ -245,7 +245,7 @@ end function JR2D.velocity2center!(Vx_c::T, Vy_c::T, Vx::T, Vy::T) where {T<:CuArray} velocity2center!(Vx_c, Vy_c, Vx, Vy) - nothing + return nothing end function JR2D.velocity2vertex!( diff --git a/src/ext/CUDA/3D.jl b/src/ext/CUDA/3D.jl index 23c45836..9eb49eee 100644 --- a/src/ext/CUDA/3D.jl +++ b/src/ext/CUDA/3D.jl @@ -261,13 +261,17 @@ function JR3D.center2vertex!( return center2vertex!(vertex_yz, vertex_xz, vertex_xy, center_yz, center_xz, center_xy) end -function JR3D.velocity2vertex!(Vx_v::T, Vy_v::T, Vz_v::T, Vx::T, Vy::T, Vz::T) where {T<:CuArray} +function JR3D.velocity2vertex!( + Vx_v::T, Vy_v::T, Vz_v::T, Vx::T, Vy::T, Vz::T +) where {T<:CuArray} velocity2vertex!(Vx_v, Vy_v, Vz_v, Vx, Vy, Vz) return nothing end -function JR3D.velocity2center!(Vx_c::T, Vy_c::T, Vz_c::T, Vx::T, Vy::T, Vz::T) where {T<:CuArray} - velocity2center!(Vx_c, Vy_c, Vz_c, Vx, Vy, Vz) +function JR3D.velocity2center!( + Vx_c::T, Vy_c::T, Vz_c::T, Vx::T, Vy::T, Vz::T +) where {T<:CuArray} + return velocity2center!(Vx_c, Vy_c, Vz_c, Vx, Vy, Vz) end function JR3D.velocity2displacement!(::CUDABackendTrait, stokes::JustRelax.StokesArrays, dt)