From d7326c8cc75e058d5e3fbc672c0b303d0cd0ee35 Mon Sep 17 00:00:00 2001 From: Ali Ramadhan Date: Tue, 29 Jan 2019 15:29:48 -0500 Subject: [PATCH] =?UTF-8?q?Fixed=20bug=20in=20u=E2=88=87w!=20operator.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/operators/ops_regular_cartesian_grid.jl | 4 ++-- test/runtests.jl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/operators/ops_regular_cartesian_grid.jl b/src/operators/ops_regular_cartesian_grid.jl index 7106c38649..86d032da21 100644 --- a/src/operators/ops_regular_cartesian_grid.jl +++ b/src/operators/ops_regular_cartesian_grid.jl @@ -365,13 +365,13 @@ function u∇w!(g::RegularCartesianGrid, ũ::VelocityFields, u∇w::FaceFieldZ, avgy!(g, ũ.w, w̅ʸ) avgz!(g, ũ.v, v̅ᶻ) wv = tmp.fE1 - @. wv.data = g.Az * w̅ʸ.data * v̅ᶻ.data + @. wv.data = g.Ay * w̅ʸ.data * v̅ᶻ.data δy!(g, wv, ∂wv∂y) w̅ᶻ = tmp.fC1 avgz!(g, ũ.w, w̅ᶻ) ww = tmp.fC1 - @. ww.data = g.Ay * w̅ᶻ.data^2 + @. ww.data = g.Az * w̅ᶻ.data^2 δz!(g, ww, ∂ww∂z) # @. ww.data[:, :, 1] .= 0 diff --git a/test/runtests.jl b/test/runtests.jl index 62007874c3..88cf874d7e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -128,7 +128,7 @@ using Oceananigans.Operators @test test_u_dot_grad_u(g) @test test_u_dot_grad_v(g) - # @test test_u_dot_grad_w(g) || "N=$(N), eltype(g)=$(eltype(g))" + @test test_u_dot_grad_w(g) || "N=$(N), eltype(g)=$(eltype(g))" @test test_κ∇²(g) @test test_𝜈∇²u(g)