From 2117f7784c3454a355e12fffa7f568fea95d3413 Mon Sep 17 00:00:00 2001 From: Albert de Montserrat <58044444+albert-de-montserrat@users.noreply.github.com> Date: Sat, 27 Apr 2024 10:02:54 +0200 Subject: [PATCH] Fix indexing in free_surface_bcs! (#135) * fix indexing in free_surface_bcs! * fix another incorrect index --- src/boundaryconditions/BoundaryConditions.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boundaryconditions/BoundaryConditions.jl b/src/boundaryconditions/BoundaryConditions.jl index 79826a85..594da411 100644 --- a/src/boundaryconditions/BoundaryConditions.jl +++ b/src/boundaryconditions/BoundaryConditions.jl @@ -212,7 +212,7 @@ end function free_surface_bcs!( stokes, bcs::FlowBoundaryConditions, η, rheology, phase_ratios, dt, di ) - indices_range(::Any, Vy) = @idx (size(Vy, 2) - 1) + indices_range(::Any, Vy) = @idx (size(Vy, 1) - 2) indices_range(::Any, ::Any, Vz) = @idx (size(Vz, 1) - 2, size(Vz, 2) - 2) V = @velocity(stokes)