diff --git a/Source/Hydro/CAMR_construct_hydro_source.cpp b/Source/Hydro/CAMR_construct_hydro_source.cpp index 1d4c8c1..4086578 100644 --- a/Source/Hydro/CAMR_construct_hydro_source.cpp +++ b/Source/Hydro/CAMR_construct_hydro_source.cpp @@ -211,7 +211,6 @@ CAMR::construct_hydro_source (const MultiFab& S, getFluxReg(level + 1).CrseAdd(mfi, {{AMREX_D_DECL(&(flux[0]), &(flux[1]), &(flux[2]))}}, dxDp, fac_for_reflux*dt, (*volfrac)[mfi], - // dxDp, 0.0*dt, (*volfrac)[mfi], {AMREX_D_DECL(&(*areafrac[0])[mfi], &(*areafrac[1])[mfi], &(*areafrac[2])[mfi])}, amrex::RunOn::Device); } @@ -219,7 +218,6 @@ CAMR::construct_hydro_source (const MultiFab& S, getFluxReg(level).FineAdd(mfi, {{AMREX_D_DECL(&(flux[0]), &(flux[1]), &(flux[2]))}}, dxDp, fac_for_reflux*dt, (*volfrac)[mfi], - // dxDp, 0.0*dt, (*volfrac)[mfi], {AMREX_D_DECL(&(*areafrac[0])[mfi], &(*areafrac[1])[mfi], &(*areafrac[2])[mfi])}, dm_as_fine, amrex::RunOn::Device); } // level > 0 diff --git a/Source/Hydro/Hydro.H b/Source/Hydro/Hydro.H index 0d3911f..16edcac 100644 --- a/Source/Hydro/Hydro.H +++ b/Source/Hydro/Hydro.H @@ -100,7 +100,7 @@ void adjust_fluxes_eb ( const amrex::GpuArray dx, const amrex::GpuArray dxInv, const amrex::GpuArray, AMREX_SPACEDIM> flux, - const int* domlo, const int* domhi, + const amrex::Geometry& geom, const int* bclo, const int* bchi, const amrex::Real l_difmag); diff --git a/Source/Hydro/Hydro_adjust_fluxes.cpp b/Source/Hydro/Hydro_adjust_fluxes.cpp index c1813e5..8111d71 100644 --- a/Source/Hydro/Hydro_adjust_fluxes.cpp +++ b/Source/Hydro/Hydro_adjust_fluxes.cpp @@ -57,7 +57,7 @@ adjust_fluxes_eb ( const GpuArray dx, const GpuArray dxinv, const GpuArray, AMREX_SPACEDIM> flux, - const int* domlo, const int* domhi, + const Geometry& geom, const int* bclo, const int* bchi, Real l_difmag) { @@ -74,12 +74,13 @@ adjust_fluxes_eb ( FArrayBox divu(bx_divu,NVAR); divu.setVal(0.0); + Box nddom = amrex::convert(geom.growPeriodicDomain(16), IntVect(1)); + bx_divu &= nddom; + auto const& divu_arr = divu.array(); amrex::ParallelFor(bx_divu, [=] AMREX_GPU_DEVICE (int i, int j, int k) noexcept { - if (vfrac(i,j,k) > 0.) { - eb_divu(i, j, k, q_arr, divu_arr, vfrac, dxinv); - } + eb_divu(i, j, k, q_arr, divu_arr, vfrac, dxinv); }); // Flux alterations @@ -90,6 +91,9 @@ adjust_fluxes_eb ( areafac = dx[1]*dx[2]; #endif + auto const* domlo = geom.Domain().loVect(); + auto const* domhi = geom.Domain().hiVect(); + int domlo_dir = domlo[0]; int domhi_dir = domhi[0]; int bclo_dir = bclo[0]; diff --git a/Source/Hydro/Hydro_umdrv_eb.cpp b/Source/Hydro/Hydro_umdrv_eb.cpp index eb6c71e..24c679c 100644 --- a/Source/Hydro/Hydro_umdrv_eb.cpp +++ b/Source/Hydro/Hydro_umdrv_eb.cpp @@ -153,7 +153,7 @@ hydro_umdrv_eb( const bool do_mol, Box const& bx, adjust_fluxes_eb(bx, q_arr, uin_arr, AMREX_D_DECL(apx, apy, apz), vf_arr, dx, dxinv, flux_tmp_arr, - domlo, domhi, bclo, bchi, difmag); + geom, bclo, bchi, difmag); hydro_consup_eb(bx, q_arr, qaux_arr, divc_arr, redistwgt_arr,