diff --git a/Source/EmbeddedBoundary/WarpXInitEB.cpp b/Source/EmbeddedBoundary/WarpXInitEB.cpp index b6c7574fadd..d4e6c4fd99a 100644 --- a/Source/EmbeddedBoundary/WarpXInitEB.cpp +++ b/Source/EmbeddedBoundary/WarpXInitEB.cpp @@ -135,9 +135,9 @@ WarpX::ComputeEdgeLengths () { #else amrex::Abort("ComputeEdgeLengths: Only implemented in 2D3V and 3D3V"); #endif - const amrex::Box& box = mfi.tilebox(m_edge_lengths[maxLevel()][idim]->ixType().toIntVect(), - m_edge_lengths[maxLevel()][idim]->nGrowVect() ); + amrex::Box box = mfi.tilebox(m_edge_lengths[maxLevel()][idim]->ixType().toIntVect() ); amrex::FabType fab_type = flags[mfi].getType(box); + box.grow(m_edge_lengths[maxLevel()][idim]->nGrowVect()); auto const &edge_lengths_dim = m_edge_lengths[maxLevel()][idim]->array(mfi); if (fab_type == amrex::FabType::regular) { @@ -210,9 +210,9 @@ WarpX::ComputeFaceAreas () { #else amrex::Abort("ComputeFaceAreas: Only implemented in 2D3V and 3D3V"); #endif - const amrex::Box& box = mfi.tilebox(m_face_areas[maxLevel()][idim]->ixType().toIntVect(), - m_face_areas[maxLevel()][idim]->nGrowVect() ); + amrex::Box box = mfi.tilebox(m_face_areas[maxLevel()][idim]->ixType().toIntVect()); amrex::FabType fab_type = flags[mfi].getType(box); + box.grow(m_face_areas[maxLevel()][idim]->nGrowVect()); auto const &face_areas_dim = m_face_areas[maxLevel()][idim]->array(mfi); if (fab_type == amrex::FabType::regular) { // every cell in box is all regular