Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
zhichen3 committed Nov 19, 2024
1 parent 7bf9636 commit d2bf1e6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 35 deletions.
14 changes: 0 additions & 14 deletions Source/hydro/Castro_ctu_hydro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1268,20 +1268,6 @@ Castro::construct_ctu_hydro_source(Real time, Real dt) // NOLINT(readability-co
scale_rad_flux(nbx, rad_flux_arr, area_arr, dt);
#endif

#if AMREX_SPACEDIM <= 2
// get the scaled radial pressure -- we need to treat this specially

if (idir == 0 && !mom_flux_has_p(0, 0, coord)) {
Array4<Real> pradial_fab = pradial.array();

amrex::ParallelFor(nbx,
[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
{
pradial_fab(i,j,k) = qex_arr(i,j,k,GDPRES) * dt;
});
}
#endif

// Store the fluxes from this advance. For simplified SDC integration we
// only need to do this on the last iteration.

Expand Down
20 changes: 0 additions & 20 deletions Source/hydro/Castro_mol_hydro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -647,13 +647,6 @@ Castro::construct_mol_hydro_source(Real time, Real dt, MultiFab& A_update)
#endif

// scale the fluxes
#if AMREX_SPACEDIM <= 2
if (!Geom().IsCartesian()) {
pradial.resize(xbx, 1);
}

Array4<Real> pradial_fab = pradial.array();
#endif

for (int idir = 0; idir < AMREX_SPACEDIM; ++idir) {

Expand All @@ -664,19 +657,6 @@ Castro::construct_mol_hydro_source(Real time, Real dt, MultiFab& A_update)

scale_flux(nbx, flux_arr, area_arr, dt);

#if AMREX_SPACEDIM <= 2
// get the scaled radial pressure -- we need to treat this specially

if (idir == 0 && !mom_flux_has_p(0, 0, coord)) {
Array4<Real> const qex_arr = qe[idir].array();

amrex::ParallelFor(nbx,
[=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept
{
pradial_fab(i,j,k) = qex_arr(i,j,k,GDPRES) * dt;
});
#endif
}
}


Expand Down
2 changes: 1 addition & 1 deletion Source/hydro/trace_ppm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ Castro::trace_ppm(const Box& bx,
#ifndef AMREX_USE_GPU
do_trace = do_source_trace[QUN];
#else
if (coord == 2 || (idir == 0 && coord = 1)) {
if (coord == 2 || (idir == 0 && coord == 1)) {
do_trace = 1;
} else {
do_trace = check_trace_source(srcQ, idir, i, j, k, QUN);
Expand Down

0 comments on commit d2bf1e6

Please sign in to comment.