From 6e1acca322a640b3d7290b54fb6a04d1c5455bc3 Mon Sep 17 00:00:00 2001 From: Weiqun Zhang Date: Fri, 1 Mar 2019 22:21:45 -0800 Subject: [PATCH] fix gpu fillboundary --- Src/Base/AMReX_FabArrayCommI.H | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Src/Base/AMReX_FabArrayCommI.H b/Src/Base/AMReX_FabArrayCommI.H index 0566d68c5d3..b3c68fe8dd2 100644 --- a/Src/Base/AMReX_FabArrayCommI.H +++ b/Src/Base/AMReX_FabArrayCommI.H @@ -301,8 +301,6 @@ FabArray::FBEP_nowait (int scomp, int ncomp, const IntVect& nghost, if (Gpu::inLaunchRegion()) { - LayoutData >,AMREX_SPACEDIM> > - dtags(loc_copy_tags.boxArray(), loc_copy_tags.DistributionMap()); for (MFIter mfi(*this); mfi.isValid(); ++mfi) { FAB* dfab = this->fabPtr(mfi); @@ -318,7 +316,7 @@ FabArray::FBEP_nowait (int scomp, int ncomp, const IntVect& nghost, gbx_lo.grow(jdim,nghost[jdim]); } const int ncells_to_hi = vbx.length(idim)+nghost[idim]; - const Box gbx_hi = gbx_lo + IntVect{ncells_to_hi}; + const Box gbx_hi = amrex::shift(gbx_lo, idim, ncells_to_hi); Vector > tags_lo, tags_hi; for (const auto& lc_tag : lc_tags) { @@ -1503,8 +1501,6 @@ FillBoundary (Vector*> const& mf, const Periodicity& period) if (Gpu::inLaunchRegion()) { - LayoutData >,AMREX_SPACEDIM> > - dtags(loc_copy_tags.boxArray(), loc_copy_tags.DistributionMap()); for (MFIter mfi(fa); mfi.isValid(); ++mfi) { FAB* dfab = fa.fabPtr(mfi); @@ -1520,7 +1516,7 @@ FillBoundary (Vector*> const& mf, const Periodicity& period) gbx_lo.grow(jdim,ng[jdim]); } const int ncells_to_hi = vbx.length(idim)+ng[idim]; - const Box gbx_hi = gbx_lo + IntVect{ncells_to_hi}; + const Box gbx_hi = amrex::shift(gbx_lo, idim, ncells_to_hi); Vector > vtags_lo, vtags_hi; for (const auto& lc_tag : lc_tags) {