diff options
author | allen <allen@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 1999-10-19 09:55:58 +0000 |
---|---|---|
committer | allen <allen@ebee0441-1374-4afa-a3b5-247f3ba15b9a> | 1999-10-19 09:55:58 +0000 |
commit | 58c62068f65f29cf701a4d1b17e690abb25022ca (patch) | |
tree | 3ca3c2f2c5dcf4889052cb9fcaef3d3d8c35f588 /src/Write2D.c | |
parent | 9c5b6dcd66381ba4dc64ada18103e1f4e283f748 (diff) |
Changing the DI macro to DATINDEX from Pugh, so that we can now
just have one macro in PUGH to calculate the data index
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOFlexIO/trunk@52 ebee0441-1374-4afa-a3b5-247f3ba15b9a
Diffstat (limited to 'src/Write2D.c')
-rw-r--r-- | src/Write2D.c | 18 |
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]); |