Skip to content

Commit

Permalink
check on boxes being ok rather than empty
Browse files Browse the repository at this point in the history
  • Loading branch information
hklion committed Oct 18, 2024
1 parent 0f9f83c commit e130791
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Source/TimeIntegration/REMORA_prestep_t_advection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,13 @@ REMORA::prestep_t_advection (const Box& tbx, const Box& gbx,

Box utbxp1_slab_lo = makeSlab(utbxp1,0,dlo.x-1) & utbxp1;
Box utbxp1_slab_hi = makeSlab(utbxp1,0,dhi.x+1) & utbxp1;
if (!utbxp1_slab_lo.isEmpty() && !is_periodic_in_x) {
if (!utbxp1_slab_lo.ok() && !is_periodic_in_x) {
ParallelFor(utbxp1_slab_lo, [=] AMREX_GPU_DEVICE (int i, int j, int k)
{
FX(i,j,k) = FX(i+1,j,k);
});
}
if (!utbxp1_slab_hi.isEmpty() && !is_periodic_in_x) {
if (!utbxp1_slab_hi.ok() && !is_periodic_in_x) {
ParallelFor(utbxp1_slab_hi, [=] AMREX_GPU_DEVICE (int i, int j, int k)
{
FX(i+1,j,k) = FX(i,j,k);
Expand All @@ -187,13 +187,13 @@ REMORA::prestep_t_advection (const Box& tbx, const Box& gbx,

Box vtbxp1_slab_lo = makeSlab(vtbxp1,1,dlo.y-1) & vtbxp1;
Box vtbxp1_slab_hi = makeSlab(vtbxp1,1,dhi.y+1) & vtbxp1;
if (!vtbxp1_slab_lo.isEmpty() && !is_periodic_in_y) {
if (!vtbxp1_slab_lo.ok() && !is_periodic_in_y) {
ParallelFor(vtbxp1_slab_lo, [=] AMREX_GPU_DEVICE (int i, int j, int k)
{
FE(i,j,k) = FE(i,j+1,k);
});
}
if (!vtbxp1_slab_hi.isEmpty() && !is_periodic_in_y) {
if (!vtbxp1_slab_hi.ok() && !is_periodic_in_y) {
ParallelFor(vtbxp1_slab_hi, [=] AMREX_GPU_DEVICE (int i, int j, int k)
{
FE(i,j+1,k) = FE(i,j,k);
Expand Down
8 changes: 4 additions & 4 deletions Source/TimeIntegration/REMORA_rhs_t_3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ REMORA::rhs_t_3d (const Box& bx, const Box& gbx,

Box utbxp1_slab_lo = makeSlab(utbxp1,0,dlo.x-1) & utbxp1;
Box utbxp1_slab_hi = makeSlab(utbxp1,0,dhi.x+1) & utbxp1;
if (!utbxp1_slab_lo.isEmpty() && !is_periodic_in_x) {
if (!utbxp1_slab_lo.ok() && !is_periodic_in_x) {
ParallelFor(utbxp1_slab_lo, [=] AMREX_GPU_DEVICE (int i, int j, int k)
{
FX(i,j,k) = FX(i+1,j,k);
});
}
if (!utbxp1_slab_hi.isEmpty() && !is_periodic_in_x) {
if (!utbxp1_slab_hi.ok() && !is_periodic_in_x) {
ParallelFor(utbxp1_slab_hi, [=] AMREX_GPU_DEVICE (int i, int j, int k)
{
FX(i+1,j,k) = FX(i,j,k);
Expand Down Expand Up @@ -188,13 +188,13 @@ REMORA::rhs_t_3d (const Box& bx, const Box& gbx,

Box vtbxp1_slab_lo = makeSlab(vtbxp1,1,dlo.y-1) & vtbxp1;
Box vtbxp1_slab_hi = makeSlab(vtbxp1,1,dhi.y+1) & vtbxp1;
if (!vtbxp1_slab_lo.isEmpty() && !is_periodic_in_y) {
if (!vtbxp1_slab_lo.ok() && !is_periodic_in_y) {
ParallelFor(vtbxp1_slab_lo, [=] AMREX_GPU_DEVICE (int i, int j, int k)
{
FE(i,j,k) = FE(i,j+1,k);
});
}
if (!vtbxp1_slab_hi.isEmpty() && !is_periodic_in_y) {
if (!vtbxp1_slab_hi.ok() && !is_periodic_in_y) {
ParallelFor(vtbxp1_slab_hi, [=] AMREX_GPU_DEVICE (int i, int j, int k)
{
FE(i,j+1,k) = FE(i,j,k);
Expand Down

0 comments on commit e130791

Please sign in to comment.