From 6d75032de476a26d33537dff2242f9909cb7a8a1 Mon Sep 17 00:00:00 2001 From: rideout Date: Tue, 6 May 2003 12:01:42 +0000 Subject: Check that the grid size is greater than the requested boundary width. Fixes CactusBase/1501. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/Boundary/trunk@223 6a38eb6e-646e-4a02-a296-d141613ad6c4 --- src/CopyBoundary.c | 4 ++-- src/FlatBoundary.c | 4 ++-- src/RadiationBoundary.c | 4 ++-- src/ScalarBoundary.c | 4 ++-- src/StaticBoundary.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/CopyBoundary.c b/src/CopyBoundary.c index 3b91eb5..ee49deb 100644 --- a/src/CopyBoundary.c +++ b/src/CopyBoundary.c @@ -1177,8 +1177,8 @@ static int ApplyBndCopy (const cGH *GH, { lsh[i] = GH->cctk_lsh[i]; lssh[i] = GH->cctk_lssh[CCTK_LSSH_IDX (dstag[i], i)]; - doBC[i*2] &= GH->cctk_lsh[i] > 1 && GH->cctk_bbox[i*2]; - doBC[i*2+1] &= GH->cctk_lsh[i] > 1 && GH->cctk_bbox[i*2+1]; + doBC[i*2] &= GH->cctk_lsh[i] > widths[i*2] && GH->cctk_bbox[i*2]; + doBC[i*2+1] &= GH->cctk_lsh[i] > widths[i*2+1] && GH->cctk_bbox[i*2+1]; if (dir != 0) { doBC[i*2] &= (dir < 0 && (i + 1 == abs (dir))); diff --git a/src/FlatBoundary.c b/src/FlatBoundary.c index 53c2322..77d24a8 100644 --- a/src/FlatBoundary.c +++ b/src/FlatBoundary.c @@ -1012,8 +1012,8 @@ static int ApplyBndFlat (const cGH *GH, { lsh[i] = GH->cctk_lsh[i]; lssh[i] = GH->cctk_lssh[CCTK_LSSH_IDX (dstag[i], i)]; - doBC[i*2] &= GH->cctk_lsh[i] > 1 && GH->cctk_bbox[i*2]; - doBC[i*2+1] &= GH->cctk_lsh[i] > 1 && GH->cctk_bbox[i*2+1]; + doBC[i*2] &= GH->cctk_lsh[i] > widths[i*2] && GH->cctk_bbox[i*2]; + doBC[i*2+1] &= GH->cctk_lsh[i] > widths[i*2+1] && GH->cctk_bbox[i*2+1]; if (dir != 0) { doBC[i*2] &= (dir < 0 && (i + 1 == abs (dir))); diff --git a/src/RadiationBoundary.c b/src/RadiationBoundary.c index 88d6b1e..0fdfb3f 100644 --- a/src/RadiationBoundary.c +++ b/src/RadiationBoundary.c @@ -1705,8 +1705,8 @@ static int ApplyBndRadiative (const cGH *GH, } for (i = 0; i < MAXDIM; i++) { - doBC[i*2] &= GH->cctk_lsh[i] > 1 && GH->cctk_bbox[i*2]; - doBC[i*2+1] &= GH->cctk_lsh[i] > 1 && GH->cctk_bbox[i*2+1]; + doBC[i*2] &= GH->cctk_lsh[i] > widths[i*2] && GH->cctk_bbox[i*2]; + doBC[i*2+1] &= GH->cctk_lsh[i] > widths[i*2+1] && GH->cctk_bbox[i*2+1]; if (dir != 0) { doBC[i*2] &= (dir < 0 && (i + 1 == abs (dir))); diff --git a/src/ScalarBoundary.c b/src/ScalarBoundary.c index 1a7cb03..2418aff 100644 --- a/src/ScalarBoundary.c +++ b/src/ScalarBoundary.c @@ -1148,8 +1148,8 @@ static int ApplyBndScalar (const cGH *GH, { lsh[i] = GH->cctk_lsh[i]; lssh[i] = GH->cctk_lssh[CCTK_LSSH_IDX (dstag[i], i)]; - doBC[i*2] &= GH->cctk_lsh[i] > 1 && GH->cctk_bbox[i*2]; - doBC[i*2+1] &= GH->cctk_lsh[i] > 1 && GH->cctk_bbox[i*2+1]; + doBC[i*2] &= GH->cctk_lsh[i] > widths[i*2] && GH->cctk_bbox[i*2]; + doBC[i*2+1] &= GH->cctk_lsh[i] > widths[i*2+1] && GH->cctk_bbox[i*2+1]; if (dir != 0) { doBC[i*2] &= (dir < 0 && (i + 1 == abs (dir))); diff --git a/src/StaticBoundary.c b/src/StaticBoundary.c index e88415e..75396f1 100644 --- a/src/StaticBoundary.c +++ b/src/StaticBoundary.c @@ -1031,8 +1031,8 @@ static int ApplyBndStatic (const cGH *GH, { lsh[i] = GH->cctk_lsh[i]; lssh[i] = GH->cctk_lssh[CCTK_LSSH_IDX (dstag[i], i)]; - doBC[i*2] &= GH->cctk_lsh[i] > 1 && GH->cctk_bbox[i*2]; - doBC[i*2+1] &= GH->cctk_lsh[i] > 1 && GH->cctk_bbox[i*2+1]; + doBC[i*2] &= GH->cctk_lsh[i] > widths[i*2] && GH->cctk_bbox[i*2]; + doBC[i*2+1] &= GH->cctk_lsh[i] > widths[i*2+1] && GH->cctk_bbox[i*2+1]; if (dir != 0) { doBC[i*2] &= (dir < 0 && (i + 1 == abs (dir))); -- cgit v1.2.3