diff --git a/Source/TimeIntegration/ROMSX_uv3dmix.cpp b/Source/TimeIntegration/ROMSX_uv3dmix.cpp index d92af3e6..35a4dc9e 100644 --- a/Source/TimeIntegration/ROMSX_uv3dmix.cpp +++ b/Source/TimeIntegration/ROMSX_uv3dmix.cpp @@ -23,6 +23,9 @@ ROMSX::uv3dmix (const Box& bx, Box gbx2 = bx; gbx2.grow(IntVect(NGROW,NGROW,0)); + // This might need to be done with a grown tilebox instead + Box gbx1 = bx; + gbx1.grow(IntVect(NGROW-1,NGROW-1,0)); int ncomp = 1; FArrayBox fab_UFx(gbx2,1,amrex::The_Async_Arena()); @@ -48,7 +51,7 @@ ROMSX::uv3dmix (const Box& bx, //DO j=JstrV-1,Jend //DO i=IstrU-1,Iend // Should these be on ubox/vbox? - amrex::ParallelFor(bx, ncomp, + amrex::ParallelFor(gbx1, ncomp, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) { // cff depends on k, but UFx and VFe will only be affected by the last cell? @@ -66,7 +69,7 @@ ROMSX::uv3dmix (const Box& bx, //K_LOOP : DO k=1,N(ng) //DO j=Jstr,Jend+1 //DO i=Istr,Iend+1 - amrex::ParallelFor(bx, ncomp, + amrex::ParallelFor(gbx1, ncomp, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) { //printf("%d %d %d %15.15g %15.15g %15.15g %15.15g\n",i,j,k,Hz(i-1,j,k),Hz(i,j,k),Hz(i-1,j-1,k),Hz(i,j-1,k)); @@ -90,7 +93,7 @@ ROMSX::uv3dmix (const Box& bx, //K_LOOP : DO k=1,N(ng) //DO j=Jstr,Jend //DO i=IstrU,Iend - amrex::ParallelFor(bx, ncomp, + amrex::ParallelFor(gbx1, ncomp, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) { const amrex::Real cff=dt_lev*0.25*(pm(i-1,j,0)+pm(i,j,0))*(pn(i-1,j,0)+pn(i,j,0)); @@ -112,7 +115,7 @@ ROMSX::uv3dmix (const Box& bx, //K_LOOP : DO k=1,N(ng) //DO j=JstrV,Jend //DO i=Istr,Iend - amrex::ParallelFor(bx, ncomp, + amrex::ParallelFor(gbx1, ncomp, [=] AMREX_GPU_DEVICE (int i, int j, int k, int n) { const amrex::Real cff=dt_lev*0.25*(pm(i,j,0)+pm(i,j-1,0))*(pn(i,j,0)+pn(i,j-1,0));