Skip to content

Commit

Permalink
fix gpu compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
zhichen3 committed Sep 19, 2024
1 parent 791db2f commit c4ebf03
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/hydro/trans.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ Castro::actual_trans_single(const Box& bx, // NOLINT(readability-convert-member

#if AMREX_SPACEDIM == 2
int coord = geom.Coord();
const auto dx = geom.CellSizeArray();
const auto problo = geom.ProbLoArray();
#endif

bool reset_density = transverse_reset_density;
Expand Down Expand Up @@ -311,7 +313,7 @@ Castro::actual_trans_single(const Box& bx, // NOLINT(readability-convert-member
Real rvnewn = rvn - hdt * (area_t(ir,jr,kr) * flux_t(ir,jr,kr,UMY) -
area_t(il,jl,kl) * flux_t(il,jl,kl,UMY)) * volinv;
if (idir_t == 1 && !mom_flux_has_p(1, idir_t, coord)) {
Real r = geom.ProbLo(0) + static_cast<Real>(il + 0.5_rt) * geom.CellSize(0);
Real r = problo[0] + static_cast<Real>(il + 0.5_rt) * dx[0];
rvnewn = rvnewn - cdtdx / r * (pgp - pgm);
}
Real rwnewn = rwn - hdt * (area_t(ir,jr,kr) * flux_t(ir,jr,kr,UMZ) -
Expand Down

0 comments on commit c4ebf03

Please sign in to comment.