aboutsummaryrefslogtreecommitdiff
path: root/src/WaveBinary.c
diff options
context:
space:
mode:
authorlanfer <lanfer@b9286e40-80fe-41ab-903a-d6b447012e1e>2000-08-25 12:23:10 +0000
committerlanfer <lanfer@b9286e40-80fe-41ab-903a-d6b447012e1e>2000-08-25 12:23:10 +0000
commitfc2408a04ec4422b3617446f7de95369e6740d1e (patch)
tree083c00f1800773ec712102efc0b85a0a88e3da99 /src/WaveBinary.c
parent1b44d542df1481f4636196d101a9cdced4f286bb (diff)
bug fix: ghostzones not treated properly
git-svn-id: http://svn.cactuscode.org/arrangements/CactusWave/WaveBinarySource/trunk@12 b9286e40-80fe-41ab-903a-d6b447012e1e
Diffstat (limited to 'src/WaveBinary.c')
-rw-r--r--src/WaveBinary.c49
1 files changed, 22 insertions, 27 deletions
diff --git a/src/WaveBinary.c b/src/WaveBinary.c
index bd2dcb1..68f1fe9 100644
--- a/src/WaveBinary.c
+++ b/src/WaveBinary.c
@@ -37,7 +37,7 @@ void WaveBinaryC(CCTK_ARGUMENTS)
int mingp[3], maxgp[3];
/* some flags */
- int onthisproc, sign;
+ int onthisproc, xproc, sign;
static int firstcall;
CCTK_REAL xs,ys,zs,rad;
@@ -107,34 +107,29 @@ void WaveBinaryC(CCTK_ARGUMENTS)
Increase onthisproc : if equal to three, we have the source
*/
- if ((lbin[d]>=minc[d]) && (ubin[d]<=minc[d]))
- {
- lowerloc[d]=IndexFloorC(cctkGH, lbin[d],d);
- upperloc[d]=IndexCeilC (cctkGH, ubin[d],d);
- onthisproc += 1;
- }
- else if ((lbin[d]>=minc[d]) && (lbin[d]<=maxc[d]))
- {
- lowerloc[d]=IndexFloorC(cctkGH, lbin[d],d);
- upperloc[d]=maxgp[d];
- onthisproc += 1;
- }
- else if ((ubin[d]>=minc[d]) && (ubin[d]<=maxc[d]))
- {
- lowerloc[d]=mingp[d];
- upperloc[d]=IndexCeilC (cctkGH, ubin[d],d);
- onthisproc += 1;
- }
- else if ((ubin[d]>=maxc[d]) && (lbin[d]<=minc[d]))
+
+ xproc = 0;
+ lowerloc[d]=mingp[d];
+ upperloc[d]=maxgp[d];
+
+ if ((lbin[d]<=minc[d]) && (ubin[d]>=maxc[d]))
+ {
+ xproc = 1;
+ }
+ else
{
- lowerloc[d]=mingp[d];
- upperloc[d]=maxgp[d];
- onthisproc += 1;
- }
- else {
- lowerloc[d] = -1;
- upperloc[d] = -1;
+ if ((minc[d]<=lbin[d]) && (lbin[d]<=maxc[d]))
+ {
+ lowerloc[d]=IndexFloorC(cctkGH, lbin[d],d);
+ xproc = 1;
+ }
+ if ((minc[d]<=ubin[d]) && (ubin[d]<=maxc[d]))
+ {
+ upperloc[d]=IndexCeilC (cctkGH, ubin[d],d);
+ xproc = 1;
+ }
}
+ onthisproc+=xproc;
}
/* Debugging debugging */