Skip to content

Commit

Permalink
Merge pull request #276 from hklion/check_box_ok
Browse files Browse the repository at this point in the history
check on boxes being ok rather than empty
  • Loading branch information
hklion authored Oct 18, 2024
2 parents 0f9f83c + e130791 commit 1eb5021
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 1eb5021

Please sign in to comment.