Skip to content

Commit

Permalink
Fixed bug in u∇w! operator.
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-ramadhan committed Jan 29, 2019
1 parent 26e5a30 commit d7326c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/operators/ops_regular_cartesian_grid.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d7326c8

Please sign in to comment.