diff --git a/Source/driver/Castro.cpp b/Source/driver/Castro.cpp index 8f7090a024..c499274250 100644 --- a/Source/driver/Castro.cpp +++ b/Source/driver/Castro.cpp @@ -2885,9 +2885,19 @@ Castro::reflux (int crse_level, int fine_level, bool in_post_timestep) reg = &getLevel(lev).pres_reg; MultiFab rdtheta(crse_lev.grids, crse_lev.dmap, 1, 0); - rdtheta.setVal(crse_lev.geom.CellSize(1)); - // Need to multiply by r for rdtheta + auto problo = Geom().ProbLo(); + auto dr = crse_lev.geom.CellSize(0); + auto dtheta = crse_lev.geom.CellSize(1); + + auto const& ma = rdtheta.arrays(); + + amrex:ParallelFor(rdtheta, + [=] AMREX_GPU_DEVICE (int b, int i, int j, int k) noexcept + { + Real r = problo[0] + static_cast(i + 0.5_rt) * dr; + ma[b](i,j,k) = r * dtheta; + }); reg->ClearInternalBorders(crse_lev.geom);