From f86b06e7ada1bc5f8d414d0a2d95d91f524731f2 Mon Sep 17 00:00:00 2001 From: Zhi Date: Wed, 23 Oct 2024 22:01:36 -0400 Subject: [PATCH] fix divu --- Source/hydro/advection_util.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Source/hydro/advection_util.cpp b/Source/hydro/advection_util.cpp index 27d3befa3c..515778c4d1 100644 --- a/Source/hydro/advection_util.cpp +++ b/Source/hydro/advection_util.cpp @@ -270,7 +270,6 @@ Castro::divu(const Box& bx, if (i == 0) { ux = 0.0_rt; - vy = 0.0_rt; // is this part correct? } else { Real rl = (i - 0.5_rt) * dx[0] + problo[0]; Real rr = (i + 0.5_rt) * dx[0] + problo[0]; @@ -282,13 +281,13 @@ Castro::divu(const Box& bx, // Take 1/r d/dr(r*u) ux = (rr * ur - rl * ul) * dxinv / rc; + } - // These are transverse averages in the x-direction - Real vb = 0.5_rt * (q_arr(i,j-1,k,QV) + q_arr(i-1,j-1,k,QV)); - Real vt = 0.5_rt * (q_arr(i,j,k,QV) + q_arr(i-1,j,k,QV)); + // These are transverse averages in the x-direction + Real vb = 0.5_rt * (q_arr(i,j-1,k,QV) + q_arr(i-1,j-1,k,QV)); + Real vt = 0.5_rt * (q_arr(i,j,k,QV) + q_arr(i-1,j,k,QV)); - vy = (vt - vb) * dyinv; - } + vy = (vt - vb) * dyinv; } else {