aboutsummaryrefslogtreecommitdiff
path: root/src/Write2D.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Write2D.c')
-rw-r--r--src/Write2D.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/Write2D.c b/src/Write2D.c
index 6cdac5f..fcd9251 100644
--- a/src/Write2D.c
+++ b/src/Write2D.c
@@ -314,9 +314,9 @@ void IOFlexIO_Write2D (cGH *GH, int index, const char *alias)
for (k = locbnd [2]; k < locbnd [3]; k++)
for (j = locbnd [0]; j < locbnd [1]; j++) {
int pt = 0;
- if (dir==0) pt = DI (pughGH, pughGH->sp2dxyz [dir], j, k);
- if (dir==1) pt = DI (pughGH, j, pughGH->sp2dxyz [dir], k);
- if (dir==2) pt = DI (pughGH, j, k, pughGH->sp2dxyz [dir]);
+ if (dir==0) pt = DATINDEX (pughGH, pughGH->sp2dxyz [dir], j, k);
+ if (dir==1) pt = DATINDEX (pughGH, j, pughGH->sp2dxyz [dir], k);
+ if (dir==2) pt = DATINDEX (pughGH, j, k, pughGH->sp2dxyz [dir]);
assert (l <= npoints && pt <= pughGH->npoints);
char_locdat [l++] = ((CCTK_CHAR *) data) [pt];
}
@@ -326,9 +326,9 @@ void IOFlexIO_Write2D (cGH *GH, int index, const char *alias)
for (k = locbnd [2]; k < locbnd [3]; k++)
for (j = locbnd [0]; j < locbnd [1]; j++) {
int pt = 0;
- if (dir==0) pt = DI (pughGH, pughGH->sp2dxyz [dir], j, k);
- if (dir==1) pt = DI (pughGH, j, pughGH->sp2dxyz [dir], k);
- if (dir==2) pt = DI (pughGH, j, k, pughGH->sp2dxyz [dir]);
+ if (dir==0) pt = DATINDEX (pughGH, pughGH->sp2dxyz [dir], j, k);
+ if (dir==1) pt = DATINDEX (pughGH, j, pughGH->sp2dxyz [dir], k);
+ if (dir==2) pt = DATINDEX (pughGH, j, k, pughGH->sp2dxyz [dir]);
assert (l <= npoints && pt <= pughGH->npoints);
int_locdat [l++] = ((CCTK_INT *) data) [pt];
}
@@ -339,9 +339,9 @@ void IOFlexIO_Write2D (cGH *GH, int index, const char *alias)
for (k = locbnd [2]; k < locbnd [3]; k++)
for (j = locbnd [0]; j < locbnd [1]; j++) {
int pt = 0;
- if (dir==0) pt = DI (pughGH, pughGH->sp2dxyz [dir], j, k);
- if (dir==1) pt = DI (pughGH, j, pughGH->sp2dxyz [dir], k);
- if (dir==2) pt = DI (pughGH, j, k, pughGH->sp2dxyz [dir]);
+ if (dir==0) pt = DATINDEX (pughGH, pughGH->sp2dxyz [dir], j, k);
+ if (dir==1) pt = DATINDEX (pughGH, j, pughGH->sp2dxyz [dir], k);
+ if (dir==2) pt = DATINDEX (pughGH, j, k, pughGH->sp2dxyz [dir]);
assert (l <= npoints && pt <= pughGH->npoints);
if (ioUtilGH->out_single)
real4_locdat [l++] = (CCTK_REAL4) (((CCTK_REAL *) data) [pt]);