From 11db439420013098d8c759f3f5044a307835b3fb Mon Sep 17 00:00:00 2001 From: albert-de-montserrat Date: Tue, 28 May 2024 11:47:18 +0200 Subject: [PATCH] fix solcx on GPU --- miniapps/benchmarks/stokes2D/solcx/SolCx.jl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/miniapps/benchmarks/stokes2D/solcx/SolCx.jl b/miniapps/benchmarks/stokes2D/solcx/SolCx.jl index 970efda3..8953ab60 100644 --- a/miniapps/benchmarks/stokes2D/solcx/SolCx.jl +++ b/miniapps/benchmarks/stokes2D/solcx/SolCx.jl @@ -53,8 +53,8 @@ end function solCx( Δη = Δη; - nx = 256 - 1, - ny = 256 - 1, + nx = 64, + ny = 64, lx = 1e0, ly = 1e0, init_MPI = true, @@ -101,8 +101,11 @@ function solCx( @parallel smooth!(η2, η, 1.0) update_halo!(η2, η) end - @parallel (1:size(η2, 1)) JustRelax.JustRelax2D.free_slip_y!(η2) - η, η2 = η2, η + @views η2[1, :] .= η2[2, :] + @views η2[end, :] .= η2[end-1, :] + @views η2[:, 1] .= η2[:, 2] + @views η2[:, end] .= η2[:, end-1] + η, η2 = η2, η # swap end ## Boundary conditions @@ -129,7 +132,7 @@ function solCx( kwargs = ( iterMax = 500e3, nout = 5e3, - b_width = (4, 4, 1), + b_width = (4, 4, 0), verbose = true, ) )