Skip to content

Commit

Permalink
fix divu
Browse files Browse the repository at this point in the history
  • Loading branch information
zhichen3 committed Oct 24, 2024
1 parent 1686df3 commit f86b06e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Source/hydro/advection_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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 {

Expand Down

0 comments on commit f86b06e

Please sign in to comment.