Skip to content

Commit

Permalink
make the comment clearer
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Sep 19, 2024
1 parent 45cc18f commit d6a1b4b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Source/hydro/advection_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ Castro::shock(const Box& bx,
// We subtract off the hydrostatic force, since the pressure that
// balances that is not available to make a shock. We compute this
// as:
// P'_{i+1} = P_{i+1} - [ P_i - \int_{x_i}^{x_{i+1}} rho g dx ]
//
// P'_{i+1} = P_{i+1} - [ P_i + \int_{x_i}^{x_{i+1}} rho g dx ]
//
// where the term in the [ ] is the hydrostatic pressure in i+1
// computed by integrating from x_i to x_{i+1}
//
// We'll use a centered diff for the pressure gradient.
Real dP_x = 0.5_rt * (q_arr(i+1,j,k,QPRES) - q_arr(i-1,j,k,QPRES));
Expand Down

0 comments on commit d6a1b4b

Please sign in to comment.